Files
librenms-librenms/html/pages/device/showconfig.inc.php
Adam Amstrong 7fa663d9f5 add rancid config integration
git-svn-id: http://www.observium.org/svn/observer/trunk@343 61d68cd4-352d-0410-923a-c4978735b2b8
2009-02-04 16:18:11 +00:00

17 lines
349 B
PHP

<?php
if($_SESSION[userlevel] >= "5" && is_file($config['rancid_configs'] . $device['hostname'])) {
$file = $config['rancid_configs'] . $device['hostname'];
$fh = fopen($file, 'r') or die("Can't open file");
echo(highlight_string(fread($fh, filesize($file))));
fclose($fh);
} else {
print_error("Error : Insufficient access.");
}
?>