mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2580 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -126,10 +126,10 @@ function get_userlist()
|
||||
global $config, $ds;
|
||||
|
||||
$filter = '(' . $config['auth_ldap_prefix'] . '*)';
|
||||
|
||||
|
||||
$search = ldap_search($ds, trim($config['auth_ldap_suffix'],','), $filter);
|
||||
$entries = ldap_get_entries($ds, $search);
|
||||
|
||||
|
||||
if ($entries['count'])
|
||||
{
|
||||
foreach ($entries as $entry)
|
||||
@@ -137,14 +137,14 @@ function get_userlist()
|
||||
$username = $entry['uid'][0];
|
||||
$realname = $entry['cn'][0];
|
||||
$user_id = $entry['uidnumber'][0];
|
||||
|
||||
|
||||
if (!isset($config['auth_ldap_group']) || ldap_compare($ds,$config['auth_ldap_group'],'memberUid',$username))
|
||||
{
|
||||
$userlist[] = array('username' => $username, 'realname' => $realname, 'user_id' => $user_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $userlist;
|
||||
}
|
||||
|
||||
|
||||
@@ -251,7 +251,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
|
||||
</a>
|
||||
</li>');
|
||||
}
|
||||
echo("</ul>");
|
||||
echo("</ul>");
|
||||
}
|
||||
|
||||
if (device_permitted($device['device_id']) || $check_device == $vars['device']) {
|
||||
|
||||
@@ -11,7 +11,7 @@ $graphs = array('powerdns_latency' => 'Latency',
|
||||
'powerdns_queries_udp' => 'Detail UDP IPv4/IPv6 Queries and Answers');
|
||||
|
||||
foreach ($graphs as $key => $text) {
|
||||
$graph_type = $key;
|
||||
$graph_type = $key;
|
||||
$graph_array['height'] = "100";
|
||||
$graph_array['width'] = "215";
|
||||
$graph_array['to'] = $now;
|
||||
|
||||
@@ -247,7 +247,7 @@ if($format == "graph")
|
||||
{
|
||||
$graph_type = "device_".$subformat;
|
||||
|
||||
if($_SESSION['widescreen']) { $width=270; } else { $width=315; }
|
||||
if ($_SESSION['widescreen']) { $width=270; } else { $width=315; }
|
||||
|
||||
echo("<div style='display: block; padding: 1px; margin: 2px; min-width: ".($width+78)."px; max-width:".($width+78)."px; min-height:170px; max-height:170px; text-align: center; float: left; background-color: #f5f5f5;'>
|
||||
<a href='device/device=".$device['device_id']."/' onmouseover=\"return overlib('\
|
||||
|
||||
@@ -82,7 +82,7 @@ if (!$auth)
|
||||
|
||||
echo("<hr />");
|
||||
|
||||
if($vars['legend'] == "no")
|
||||
if ($vars['legend'] == "no")
|
||||
{
|
||||
echo(generate_link("Show Legend",$vars, array('page' => "graphs", 'legend' => NULL)));
|
||||
} else {
|
||||
|
||||
@@ -36,7 +36,7 @@ foreach ($ports as $port)
|
||||
$link = generate_url($link_array);
|
||||
$overlib_content = generate_overlib_content($graph_array, $port['hostname'] . " - " . $port['label']);
|
||||
$graph_array['title'] = "yes";
|
||||
$graph_array['width'] = 315; $graph_array['height'] = 119;
|
||||
$graph_array['width'] = 315; $graph_array['height'] = 119;
|
||||
$graph = generate_graph_tag($graph_array);
|
||||
|
||||
echo("<div style='display: block; padding: 1px; margin: 2px; min-width: 393px; max-width:393px; min-height:180px; max-height:180px; text-align: center; float: left; background-color: #f5f5f5;'>");
|
||||
|
||||
@@ -55,7 +55,7 @@ else
|
||||
|
||||
echo(" | ");
|
||||
|
||||
if ($vars['state'] == "down")
|
||||
if ($vars['state'] == "down")
|
||||
{
|
||||
echo("<span class='pagemenu-selected'>");
|
||||
echo(generate_link("Down",$vars, array('state' => NULL)));
|
||||
@@ -66,7 +66,7 @@ else
|
||||
|
||||
## End BGP Menu
|
||||
|
||||
if(!isset($vars['view'])) { $vars['view'] = 'details'; }
|
||||
if (!isset($vars['view'])) { $vars['view'] = 'details'; }
|
||||
|
||||
echo('<div style="float: right;">');
|
||||
|
||||
@@ -133,19 +133,19 @@ else
|
||||
|
||||
$i = "1";
|
||||
|
||||
if ($vars['type'] == "external")
|
||||
if ($vars['type'] == "external")
|
||||
{
|
||||
$where = "AND D.bgpLocalAs != B.bgpPeerRemoteAs";
|
||||
} elseif ($vars['type'] == "internal") {
|
||||
$where = "AND D.bgpLocalAs = B.bgpPeerRemoteAs";
|
||||
}
|
||||
|
||||
if($vars['adminstatus'] == "stop")
|
||||
if ($vars['adminstatus'] == "stop")
|
||||
{
|
||||
$where .= " AND (B.bgpPeerAdminStatus = 'stop')";
|
||||
}
|
||||
|
||||
if($vars['state'] == "down")
|
||||
if ($vars['state'] == "down")
|
||||
{
|
||||
$where .= " AND (B.bgpPeerState != 'established')";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user