diff --git a/check-services.php b/check-services.php index e19a772d8..73b160ddc 100755 --- a/check-services.php +++ b/check-services.php @@ -9,7 +9,7 @@ while ($service = mysql_fetch_array($query)) { unset($check, $service_status, $time, $status); $service_status = $service['service_status']; - $service_type = strtolower($service[service_type]); + $service_type = strtolower($service['service_type']); $service_param = $service['service_param']; $checker_script = "includes/services/" . $service_type . "/check.inc"; if(is_file($checker_script)) { diff --git a/cleanup.php b/cleanup.php index 4b9828648..664b054fb 100755 --- a/cleanup.php +++ b/cleanup.php @@ -50,7 +50,7 @@ $query = "SELECT * FROM interfaces AS I, devices as D WHERE I.device_id = D.device_id AND D.status = '1'"; $data = mysql_query($query); while($row = mysql_fetch_array($data)) { - $index = $row[ifIndex]; + $index = $row['ifIndex']; $hostname = $row['hostname']; $community = $row['community']; $port = $row['port']; diff --git a/html/pages/delsrv.php b/html/pages/delsrv.php index 672958d96..ad6e5899f 100644 --- a/html/pages/delsrv.php +++ b/html/pages/delsrv.php @@ -1,6 +1,6 @@ = "5" && is_file($config['rancid_configs'] . $device[ $file = $config['rancid_configs'] . $device['hostname']; $fh = fopen($file, 'r') or die("Can't open file"); $text = fread($fh, filesize($file)); + fclose($fh); if ($config['rancid_ignorecomments']) { $lines = split("\n",$text); @@ -20,11 +21,9 @@ if($_SESSION['userlevel'] >= "5" && is_file($config['rancid_configs'] . $device[ $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS); $geshi->set_overall_style('color: black;'); # $geshi->set_line_style('color: #999999'); - echo $geshi->parse_code(); - fclose($fh); + echo $geshi->parse_code(); } else { print_error("Error : Insufficient access."); } - ?> diff --git a/map.php b/map.php index 39db89324..8ef5516b2 100755 --- a/map.php +++ b/map.php @@ -44,7 +44,7 @@ while($loc_data = mysql_fetch_array($loc_result)) { if(strpos($host, "vax")) { $hostinfo = "shape=rect style=filled fillcolor=skyblue"; } if(strpos($host, "vsx")) { $hostinfo = "shape=box3d style=filled fillcolor=skyblue"; } - $host = $dev_data[hostname]; + $host = $dev_data['hostname']; $host = str_replace("." . $config['mydomain'],"", $host); echo("\"$host\" [$hostinfo] "); @@ -94,18 +94,18 @@ while($link_data = mysql_fetch_array($links_result)) { $i = 0; while ($i < count($linkdone)) { - $thislink = "$dst $link_data[dif] $src $link_data[sif]"; + $thislink = "$dst ".$link_data['dif']." $src ".$link_data['sif']; if ($linkdone[$i] == $thislink) { $die = "yes"; } $i++; } - $sif = makeshortif($link_data[sif]); - $dif = makeshortif($link_data[dif]); + $sif = makeshortif($link_data['sif']); + $dif = makeshortif($link_data['dif']); if(!$die){ echo("\"$src\" -> \"$dst\" [taillabel=\"$dif\" headlabel=\"$sif\" arrowhead=dot arrowtail=dot $info];\n"); # echo("\"$src\" -> \"$dst\" [ arrowhead=none arrowtail=none $info];\n"); - $linkdone[] = "$src $link_data[sif] $dst $link_data[dif]"; + $linkdone[] = "$src ".$link_data['sif']." $dst ".$link_data['dif']; $x++; } }