summaryrefslogtreecommitdiff
path: root/data.php
diff options
context:
space:
mode:
authorChristian Pointner <equinox@ffgraz.net>2013-12-30 12:02:16 +0000
committerChristian Pointner <equinox@ffgraz.net>2013-12-30 12:02:16 +0000
commit7122687b9849911429072de1bf31071b830780c5 (patch)
tree86a0ea41d914ddbb9a41b9b1c2cdcea857ac3b66 /data.php
parent70b378464945443b234380c5098ec7066bb0b15f (diff)
cleanup
Diffstat (limited to 'data.php')
-rw-r--r--data.php56
1 files changed, 28 insertions, 28 deletions
diff --git a/data.php b/data.php
index 7f59f3f..a41d896 100644
--- a/data.php
+++ b/data.php
@@ -82,16 +82,16 @@ while ($data = $db->getNextObject()) {
// echo $ipnodelocname;
// echo "\n";
$channel="";
- $frequence="";
+ $frequency="";
$dnsname=$ipnodelocname.".".$nodelocname;
if($routerhash[$ip[$dnsname]][4]!=""){
$channel= $routerhash[$ip[$dnsname]][4];
}
if ($routerhash[$ip[$dnsname]][5]!=""){
- $frequence = $routerhash[$ip[$dnsname]][5];
+ $frequency = $routerhash[$ip[$dnsname]][5];
}
- if ($channel!="" or $frequence!=""){
- $data->dnsnames = $dnsname." (Kanal: ".$channel." / ".$frequence." GHz);".$data->dnsnames;
+ if ($channel!="" or $frequency!=""){
+ $data->dnsnames = $dnsname." (Kanal: ".$channel." / ".$frequency." GHz);".$data->dnsnames;
break 2;
}
}
@@ -101,15 +101,15 @@ while ($data = $db->getNextObject()) {
/* foreach($dnsnames[$data->locid] as $dnsname){
if(strpos($data->dnsnames,substr($dnsname,strpos($dnsname,".")))===false){
$channel="";
- $frequence="";
+ $frequency="";
if($routerhash[$ip[$dnsname]][4]!=""){
$channel= $routerhash[$ip[$dnsname]][4];
}
if ($routerhash[$ip[$dnsname]][5]!=""){
- $frequence = $routerhash[$ip[$dnsname]][5];
+ $frequency = $routerhash[$ip[$dnsname]][5];
}
- if ($channel!="" or $frequence!=""){
- $data->dnsnames = $dnsname." (Kanal: ".$channel." / ".$frequence."GHz);".$data->dnsnames;
+ if ($channel!="" or $frequency!=""){
+ $data->dnsnames = $dnsname." (Kanal: ".$channel." / ".$frequency."GHz);".$data->dnsnames;
break;
} else {
$data->dnsnames = $dnsname.";".$data->dnsnames;
@@ -171,7 +171,7 @@ foreach ($lines as $num => $line)
}
if ($routerhash[$ipfromLoc][5]!==""){
- $links[$jot]->frequence = $routerhash[$ipfromLoc][5];
+ $links[$jot]->frequency = $routerhash[$ipfromLoc][5];
}
} else if (array_key_exists($iptoLoc,$routerhash)){
@@ -179,18 +179,18 @@ foreach ($lines as $num => $line)
$links[$jot]->channel = $routerhash[$iptoLoc][4];
}
if ($routerhash[$iptoLoc][5]!==""){
- $links[$jot]->frequence = $routerhash[$iptoLoc][5];
+ $links[$jot]->frequency = $routerhash[$iptoLoc][5];
}
} else{
$links[$jot]->channel ="undef";
- $links[$jot]->frequence ="undef";
+ $links[$jot]->frequency ="undef";
// echo "keine IP\n";
}
if (array_key_exists($ipfromLoc,$routerhash)){
if($conf['acl']['auth']){
if (strpos($links[$jot]->dnsfrom ,$routerhash[$ipfromLoc][1])===false){
- $links[$jot]->dnsfrom =($routerhash[$ipfromLoc][1].' (Kanal: '.$links[$jot]->channel.' / '.$links[$jot]->frequence.' GHz)'.';'.($links[$jot]->dnsfrom));
+ $links[$jot]->dnsfrom =($routerhash[$ipfromLoc][1].' (Kanal: '.$links[$jot]->channel.' / '.$links[$jot]->frequency.' GHz)'.';'.($links[$jot]->dnsfrom));
}
}
@@ -202,7 +202,7 @@ foreach ($lines as $num => $line)
if($conf['acl']['auth']){
if (strpos($links[$jot]->dnsto ,$routerhash[$iptoLoc][1])===false){
// echo "B\n";
- $links[$jot]->dnsto =($routerhash[$iptoLoc][1].' (Kanal: '.$links[$jot]->channel.' / '.$links[$jot]->frequence.' GHz)'.';'.($links[$jot]->dnsto));
+ $links[$jot]->dnsto =($routerhash[$iptoLoc][1].' (Kanal: '.$links[$jot]->channel.' / '.$links[$jot]->frequency.' GHz)'.';'.($links[$jot]->dnsto));
}
}
if ($routerhash[$iptoLoc][3]==$ipfromLoc){
@@ -227,7 +227,7 @@ foreach ($lines as $num => $line)
}
if ($routerhash[$ipfromLoc][5]!==""){
- $links[$jot]->frequence = $routerhash[$ipfromLoc][5];
+ $links[$jot]->frequency = $routerhash[$ipfromLoc][5];
}
} else if (array_key_exists($iptoLoc,$routerhash)){
@@ -235,18 +235,18 @@ foreach ($lines as $num => $line)
$links[$jot]->channel = $routerhash[$iptoLoc][4];
}
if ($routerhash[$iptoLoc][5]!==""){
- $links[$jot]->frequence = $routerhash[$iptoLoc][5];
+ $links[$jot]->frequency = $routerhash[$iptoLoc][5];
}
} else{
$links[$jot]->channel ="undef";
- $links[$jot]->frequence ="undef";
+ $links[$jot]->frequency ="undef";
// echo "keine IP\n";
}
if (array_key_exists($ipfromLoc,$routerhash)){
if($conf['acl']['auth']){
if (strpos($links[$jot]->dnsto,$routerhash[$ipfromLoc][1])===false){
// echo "C\n";
- $links[$jot]->dnsto =($routerhash[$ipfromLoc][1].' (Kanal: '.$links[$jot]->channel.' / '.$links[$jot]->frequence.' GHz)'.';'.($links[$jot]->dnsto));
+ $links[$jot]->dnsto =($routerhash[$ipfromLoc][1].' (Kanal: '.$links[$jot]->channel.' / '.$links[$jot]->frequency.' GHz)'.';'.($links[$jot]->dnsto));
}
}
if ($routerhash[$ipfromLoc][3]==$iptoLoc){
@@ -257,7 +257,7 @@ foreach ($lines as $num => $line)
if($conf['acl']['auth']){
if (strpos($links[$jot]->dnsfrom,$routerhash[$iptoLoc][1])===false){
// echo "D\n";
- $links[$jot]->dnsfrom =($routerhash[$iptoLoc][1].' (Kanal: '.$links[$jot]->channel.' / '.$links[$jot]->frequence.' GHz)'.';'.($links[$jot]->dnsfrom));
+ $links[$jot]->dnsfrom =($routerhash[$iptoLoc][1].' (Kanal: '.$links[$jot]->channel.' / '.$links[$jot]->frequency.' GHz)'.';'.($links[$jot]->dnsfrom));
}
}
if ($routerhash[$iptoLoc][3]==$ipfromLoc){
@@ -280,7 +280,7 @@ foreach ($lines as $num => $line)
}
if ($routerhash[$ipfromLoc][5]!==""){
- $links[$i]->frequence = $routerhash[$ipfromLoc][5];
+ $links[$i]->frequency = $routerhash[$ipfromLoc][5];
}
} else if (array_key_exists($iptoLoc,$routerhash)){
@@ -288,24 +288,24 @@ foreach ($lines as $num => $line)
$links[$i]->channel = $routerhash[$iptoLoc][4];
}
if ($routerhash[$iptoLoc][5]!==""){
- $links[$i]->frequence = $routerhash[$iptoLoc][5];
+ $links[$i]->frequency = $routerhash[$iptoLoc][5];
}
} else{
$links[$i]->channel ="undef";
- $links[$i]->frequence ="undef";
+ $links[$i]->frequency ="undef";
// echo "keine IP\n";
}
$links[$i]->defaultroute = "0";
if($conf['acl']['auth']){
- $links[$i]->dnsfrom =$ipname[$ipfromLoc].'.'.$nodename[$ipfromLoc].'.'.$locname[$ipfromLoc].' (Kanal: '.$links[$i]->channel.' / '.$links[$i]->frequence.' GHz )';
- $links[$i]->dnsto =$ipname[$iptoLoc].'.'.$nodename[$iptoLoc].'.'.$locname[$iptoLoc].' (Kanal: '.$links[$i]->channel.' / '.$links[$i]->frequence.' GHz)';
+ $links[$i]->dnsfrom =$ipname[$ipfromLoc].'.'.$nodename[$ipfromLoc].'.'.$locname[$ipfromLoc].' (Kanal: '.$links[$i]->channel.' / '.$links[$i]->frequency.' GHz )';
+ $links[$i]->dnsto =$ipname[$iptoLoc].'.'.$nodename[$iptoLoc].'.'.$locname[$iptoLoc].' (Kanal: '.$links[$i]->channel.' / '.$links[$i]->frequency.' GHz)';
}
if (array_key_exists($ipfromLoc,$routerhash)){
if($conf['acl']['auth']){
- $links[$i]->dnsfrom =$routerhash[$ipfromLoc][1].' (Kanal: '.$links[$i]->channel.' / '.$links[$i]->frequence.' GHz)';
+ $links[$i]->dnsfrom =$routerhash[$ipfromLoc][1].' (Kanal: '.$links[$i]->channel.' / '.$links[$i]->frequency.' GHz)';
}
if ($routerhash[$ipfromLoc][3]==$iptoLoc){
$links[$i]->defaultroute = "1";
@@ -313,7 +313,7 @@ foreach ($lines as $num => $line)
}
if (array_key_exists($iptoLoc,$routerhash)){
if($conf['acl']['auth']){
- $links[$i]->dnsto =$routerhash[$iptoLoc][1].' (Kanal: '.$links[$i]->channel.' / '.$links[$i]->frequence.' GHz)';
+ $links[$i]->dnsto =$routerhash[$iptoLoc][1].' (Kanal: '.$links[$i]->channel.' / '.$links[$i]->frequency.' GHz)';
}
if ($routerhash[$iptoLoc][3]==$ipfromLoc){
@@ -341,7 +341,7 @@ foreach ($lines as $num => $line)
}
if (($nodename[$ipfromLoc] == "tunnel" && $locations[$locids[$ipfromLoc]]->locname=="housing") ||
($nodename[$iptoLoc] == "tunnel" && $locations[$locids[$iptoLoc]]->locname=="housing" )){
- $links[$i]->frequence ="LAN";
+ $links[$i]->frequency ="LAN";
$links[$i]->channel ="undef";
}
@@ -373,8 +373,8 @@ foreach ($links as $link)
$count[$data1->locid]=true;
$count[$data2->locid]=true;
- printf("\t" . '<link fromid="%s" from="%s" latfrom="%s" lngfrom="%s" toid="%s" to="%s" latto="%s" lngto="%s" value="%s" channel="%s" defaultroute="%s" frequence="%s" dnsfrom="%s" dnsto="%s"/>' . "\n",
- $data1->locid, $data1->locname, $data1->lat,$data1->lng,$data2->locid, $data2->locname, $data2->lat, $data2->lng, $link->label, $link->channel, $link->defaultroute, $link->frequence, $link->dnsfrom,$link->dnsto);
+ printf("\t" . '<link fromid="%s" from="%s" latfrom="%s" lngfrom="%s" toid="%s" to="%s" latto="%s" lngto="%s" value="%s" channel="%s" defaultroute="%s" frequency="%s" dnsfrom="%s" dnsto="%s"/>' . "\n",
+ $data1->locid, $data1->locname, $data1->lat,$data1->lng,$data2->locid, $data2->locname, $data2->lat, $data2->lng, $link->label, $link->channel, $link->defaultroute, $link->frequency, $link->dnsfrom,$link->dnsto);
}
echo "</links>\n";