remove the last usage of config variables outside of the $config array ($rrd_file) + fixed adduser script

git-svn-id: http://www.observium.org/svn/observer/trunk@354 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-03-16 15:19:44 +00:00
parent 98ba6a4f83
commit 83eb114da1
18 changed files with 74 additions and 91 deletions

View File

@@ -1,10 +1,21 @@
<?php
include("includes/geshi/geshi.php");
if($_SESSION[userlevel] >= "5" && is_file($config['rancid_configs'] . $device['hostname'])) {
$file = $config['rancid_configs'] . $device['hostname'];
# $file = "/testconfig.txt";
$fh = fopen($file, 'r') or die("Can't open file");
$text = fread($fh, filesize($file));
echo(highlight_string($text));
$language = "ios";
$geshi = new GeSHi($text, $language);
$geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS);
$geshi->set_overall_style('color: black;');
# $geshi->set_line_style('color: #999999');
# echo("<div style='width:1175px;height:540px;overflow-x:hidden;overflow-y:auto;'>");
echo $geshi->parse_code();
# echo("</div>");
fclose($fh);
} else {
print_error("Error : Insufficient access.");