2009-02-04 16:18:11 +00:00
|
|
|
<?php
|
|
|
|
|
2009-03-16 15:19:44 +00:00
|
|
|
include("includes/geshi/geshi.php");
|
|
|
|
|
2009-02-04 16:18:11 +00:00
|
|
|
if($_SESSION[userlevel] >= "5" && is_file($config['rancid_configs'] . $device['hostname'])) {
|
|
|
|
$file = $config['rancid_configs'] . $device['hostname'];
|
2009-03-16 15:19:44 +00:00
|
|
|
# $file = "/testconfig.txt";
|
2009-02-04 16:18:11 +00:00
|
|
|
$fh = fopen($file, 'r') or die("Can't open file");
|
2009-03-02 18:12:09 +00:00
|
|
|
$text = fread($fh, filesize($file));
|
2009-03-16 15:19:44 +00:00
|
|
|
$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>");
|
2009-02-04 16:18:11 +00:00
|
|
|
fclose($fh);
|
|
|
|
} else {
|
|
|
|
print_error("Error : Insufficient access.");
|
|
|
|
}
|
|
|
|
|
2009-03-02 18:12:09 +00:00
|
|
|
|
2009-02-04 16:18:11 +00:00
|
|
|
?>
|