Fix coding style part 2

This commit is contained in:
Job Snijders
2015-07-14 17:41:54 +02:00
parent ad9590df9b
commit 361653aa81
731 changed files with 37529 additions and 33991 deletions
+6 -4
View File
@@ -21,7 +21,9 @@
*/
if(!isset($vars['section'])) { $vars['section'] = "performance"; }
if(!isset($vars['section'])) {
$vars['section'] = "performance";
}
if (empty($vars['dtpickerfrom'])) {
$vars['dtpickerfrom'] = date($config['dateformat']['byminute'], time() - 3600 * 24 * 2);
@@ -57,7 +59,8 @@ if (empty($vars['dtpickerto'])) {
if (is_admin() === true || is_read() === true) {
$query = "SELECT DATE_FORMAT(timestamp, '".$config['alert_graph_date_format']."') Date, xmt,rcv,loss,min,max,avg FROM `device_perf` WHERE `device_id` = ? AND `timestamp` >= ? AND `timestamp` <= ?";
$param = array($device['device_id'], $vars['dtpickerfrom'], $vars['dtpickerto']);
} else {
}
else {
$query = "SELECT DATE_FORMAT(timestamp, '".$config['alert_graph_date_format']."') Date, xmt,rcv,loss,min,max,avg FROM `device_perf`,`devices_perms` WHERE `device_id` = ? AND alert_log.device_id = devices_perms.device_id AND devices_perms.user_id = ? AND `timestamp` >= ? AND `timestamp` <= ?";
$param = array($device['device_id'], $_SESSION['user_id'], $vars['dtpickerfrom'], $vars['dtpickerto']);
}
@@ -81,7 +84,7 @@ foreach(dbFetchRows($query, $param) as $return_value) {
$avg = $return_value['avg'];
if ($max > $max_val) {
$max_val = $max;
$max_val = $max;
}
$data[] = array('x' => $date,'y' => $loss,'group' => 0);
@@ -186,4 +189,3 @@ echo $milisec_diff;
var graph2d = new vis.Graph2d(container, items, groups, options);
</script>