mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-12 16:06:25 +02:00
restructure/reindent/htmlfix html pages, remove dead code
git-svn-id: http://www.observium.org/svn/observer/trunk@1897 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -22,7 +22,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
$select[$section] = "selected";
|
||||
|
||||
$device_query = mysql_query("SELECT * FROM `devices` WHERE `device_id` = '" . $_GET['id'] . "'");
|
||||
while($device = mysql_fetch_array($device_query))
|
||||
while ($device = mysql_fetch_array($device_query))
|
||||
{
|
||||
if ($config['os'][$device['os']]['group']) { $device['os_group'] = $config['os'][$device['os']]['group']; }
|
||||
|
||||
@@ -140,7 +140,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
</a>
|
||||
</li>');
|
||||
}
|
||||
elseif ( device_permitted($_GET['id']) && $config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `hrDevice` WHERE device_id = '".$_GET['id']."'"), 0) > '0')
|
||||
elseif (device_permitted($_GET['id']) && $config['enable_inventory'] && @mysql_result(mysql_query("SELECT * FROM `hrDevice` WHERE device_id = '".$_GET['id']."'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['hrdevice'] . '">
|
||||
<a href="'.$config['base_url'].'/device/' . $device['device_id'] . '/hrdevice/">
|
||||
@@ -148,7 +148,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
</a>
|
||||
</li>');
|
||||
}
|
||||
|
||||
|
||||
if (mysql_result(mysql_query("select count(service_id) from services WHERE device_id = '" . $device['device_id'] . "'"), 0) > '0')
|
||||
{
|
||||
echo('<li class="' . $select['srv'] . '">
|
||||
@@ -190,7 +190,7 @@ if (device_permitted($_GET['id']) || $check_device == $_GET['id'])
|
||||
|
||||
if ($_SESSION['userlevel'] >= "7") {
|
||||
if (!is_array($config['rancid_configs'])) { $config['rancid_configs'] = array($config['rancid_configs']); }
|
||||
foreach($config['rancid_configs'] as $configs) {
|
||||
foreach ($config['rancid_configs'] as $configs) {
|
||||
if ($configs[strlen($configs)-1] != '/') { $configs .= '/'; }
|
||||
if (is_file($configs . $device['hostname'])) { $device_config_file = $configs . $device['hostname']; }
|
||||
}
|
||||
@@ -226,5 +226,4 @@ else
|
||||
{
|
||||
include("includes/error-no-perm.inc.php");
|
||||
}
|
||||
?>
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user