diff --git a/html/pages/device/health.inc.php b/html/pages/device/health.inc.php index c6443c00d..034afbef5 100644 --- a/html/pages/device/health.inc.php +++ b/html/pages/device/health.inc.php @@ -39,13 +39,14 @@ foreach ($datas as $type) { echo($sep); - if ($_GET['opta'] == $type) { + if ($_GET['opta'] == $type) + { echo(""); echo(''); } else { echo(''); } - echo(" " . $type_text[$type] ."\n"); + echo(" " . $type_text[$type] ."\n"); if ($_GET['opta'] == $type) { echo(""); } $sep = " | "; } diff --git a/html/pages/device/health/current.inc.php b/html/pages/device/health/current.inc.php new file mode 100644 index 000000000..6f4343e49 --- /dev/null +++ b/html/pages/device/health/current.inc.php @@ -0,0 +1,59 @@ +"); + +$row = 1; + +while($current = mysql_fetch_array($query)) { + + if(!is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } + + echo(" + " . $current['current_descr'] . " + " . $current['current_current'] . "A + " . $current['current_limit_low'] . 'A - ' . $current['current_limit'] . "A + " . $current['current_notes'] . " + \n"); + echo(""); + + $graph_type = "current"; + +// start current graphs + + $daily_current = "graph.php?id=" . $current['current_id'] . "&type=$graph_type&from=$day&to=$now&width=211&height=100"; + $daily_url = "graph.php?id=" . $current['current_id'] . "&type=$graph_type&from=$day&to=$now&width=400&height=150"; + + $weekly_current = "graph.php?id=" . $current['current_id'] . "&type=$graph_type&from=$week&to=$now&width=211&height=100"; + $weekly_url = "graph.php?id=" . $current['current_id'] . "&type=$graph_type&from=$week&to=$now&width=400&height=150"; + + $monthly_current = "graph.php?id=" . $current['current_id'] . "&type=$graph_type&from=$month&to=$now&width=211&height=100"; + $monthly_url = "graph.php?id=" . $current['current_id'] . "&type=$graph_type&from=$month&to=$now&width=400&height=150"; + + $yearly_current = "graph.php?id=" . $current['current_id'] . "&type=$graph_type&from=$year&to=$now&width=211&height=100"; + $yearly_url = "graph.php?id=" . $current['current_id'] . "&type=$graph_type&from=$year&to=$now&width=400&height=150"; + + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + + + echo(""); + + + $row++; + +} + +echo(""); + + +?> + diff --git a/html/pages/device/health/frequencies.inc.php b/html/pages/device/health/frequencies.inc.php new file mode 100644 index 000000000..7a925f48f --- /dev/null +++ b/html/pages/device/health/frequencies.inc.php @@ -0,0 +1,58 @@ +"); + +$row = 1; + +while($freq = mysql_fetch_array($query)) { + + if(!is_integer($row/2)) { $row_colour = $list_colour_a; } else { $row_colour = $list_colour_b; } + + echo(" + " . $freq['freq_descr'] . " + " . $freq['freq_current'] . "Hz + " . $freq['freq_limit_low'] . 'Hz - ' . $freq['freq_limit'] . "Hz + " . $freq['freq_notes'] . " + \n"); + echo(""); + + $graph_type = "frequency"; + +// start frequency graphs + + $daily_freq = "graph.php?id=" . $freq['freq_id'] . "&type=$graph_type&from=$day&to=$now&width=211&height=100"; + $daily_url = "graph.php?id=" . $freq['freq_id'] . "&type=$graph_type&from=$day&to=$now&width=400&height=150"; + + $weekly_freq = "graph.php?id=" . $freq['freq_id'] . "&type=$graph_type&from=$week&to=$now&width=211&height=100"; + $weekly_url = "graph.php?id=" . $freq['freq_id'] . "&type=$graph_type&from=$week&to=$now&width=400&height=150"; + + $monthly_freq = "graph.php?id=" . $freq['freq_id'] . "&type=$graph_type&from=$month&to=$now&width=211&height=100"; + $monthly_url = "graph.php?id=" . $freq['freq_id'] . "&type=$graph_type&from=$month&to=$now&width=400&height=150"; + + $yearly_freq = "graph.php?id=" . $freq['freq_id'] . "&type=$graph_type&from=$year&to=$now&width=211&height=100"; + $yearly_url = "graph.php?id=" . $freq['freq_id'] . "&type=$graph_type&from=$year&to=$now&width=400&height=150"; + + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + echo("', LEFT);\" onmouseout=\"return nd();\"> + "); + + + echo(""); + + + $row++; + +} + +echo(""); + + +?> \ No newline at end of file diff --git a/html/pages/health.php b/html/pages/health.php index 46fdfd776..99e5db414 100644 --- a/html/pages/health.php +++ b/html/pages/health.php @@ -9,16 +9,20 @@ if(!$_GET['optb']) { $_GET['optb'] = "nographs"; } print_optionbar_start('', ''); $sep = ""; -foreach ($datas as $texttype) { +foreach ($datas as $texttype) +{ $type = strtolower($texttype); echo($sep); - if ($_GET['opta'] == $type) { + if ($_GET['opta'] == $type) + { echo(""); echo(''); - } else { + } + else + { echo(''); } - echo(" " . $texttype ."\n"); + echo(' ' . $texttype ."\n"); if ($_GET['opta'] == $type) { echo(""); } $sep = ' | '; }