code cleanups

git-svn-id: http://www.observium.org/svn/observer/trunk@753 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Tom Laermans
2010-01-31 17:30:16 +00:00
parent 20ddcab9c1
commit 7bea8d4941
5 changed files with 10 additions and 11 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
if($_SESSION[userlevel] < '5') {
if($_SESSION['userlevel'] < '5') {
print_error("Insufficient Privileges");
} else {
+2 -3
View File
@@ -6,6 +6,7 @@ if($_SESSION['userlevel'] >= "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.");
}
?>