2010-02-09 16:36:06 +00:00
|
|
|
<?php
|
|
|
|
|
2011-04-09 14:22:43 +00:00
|
|
|
$datas = array('processor','mempool','storage','temperature', 'humidity', 'fanspeed', 'voltage', 'frequency', 'current');
|
|
|
|
|
|
|
|
$type_text['overview'] = "Overview";
|
|
|
|
$type_text['temperature'] = "Temperature";
|
|
|
|
$type_text['humidity'] = "Humidity";
|
|
|
|
$type_text['mempool'] = "Memory";
|
|
|
|
$type_text['storage'] = "Disk Usage";
|
|
|
|
$type_text['diskio'] = "Disk I/O";
|
|
|
|
$type_text['processor'] = "Processor";
|
2011-04-13 14:12:57 +00:00
|
|
|
$type_text['voltage'] = "Voltage";
|
2011-04-09 14:22:43 +00:00
|
|
|
$type_text['fanspeed'] = "Fanspeed";
|
|
|
|
$type_text['frequency'] = "Frequency";
|
|
|
|
$type_text['current'] = "Current";
|
2010-04-11 13:45:19 +00:00
|
|
|
|
2011-04-11 09:16:50 +00:00
|
|
|
if (!$_GET['opta']) { $_GET['opta'] = "processor"; }
|
2011-03-17 00:09:20 +00:00
|
|
|
if (!$_GET['optb']) { $_GET['optb'] = "nographs"; }
|
2010-06-12 12:07:16 +00:00
|
|
|
|
|
|
|
print_optionbar_start('', '');
|
2010-02-11 01:48:55 +00:00
|
|
|
|
2010-03-06 01:32:41 +00:00
|
|
|
$sep = "";
|
2011-03-17 00:09:20 +00:00
|
|
|
foreach ($datas as $texttype)
|
2010-06-18 14:17:58 +00:00
|
|
|
{
|
2010-02-11 01:48:55 +00:00
|
|
|
$type = strtolower($texttype);
|
|
|
|
echo($sep);
|
2011-03-17 00:09:20 +00:00
|
|
|
if ($_GET['opta'] == $type)
|
|
|
|
{
|
2011-04-09 12:35:24 +00:00
|
|
|
echo("<span class='pagemenu-selected'>");
|
2011-03-17 00:09:20 +00:00
|
|
|
}
|
2011-04-09 14:22:43 +00:00
|
|
|
|
|
|
|
echo('<a href="'.$config['base_url'].'/health/' . $type . ($_GET['optb'] ? '/' . $_GET['optb'] : ''). '/">' . $type_text[$type] ."</a>");
|
2011-04-09 12:35:24 +00:00
|
|
|
|
|
|
|
if ($_GET['opta'] == $type) { echo("</span>"); }
|
|
|
|
|
2010-02-11 01:48:55 +00:00
|
|
|
$sep = ' | ';
|
|
|
|
}
|
2011-03-17 00:09:20 +00:00
|
|
|
|
2010-02-11 01:48:55 +00:00
|
|
|
unset ($sep);
|
|
|
|
|
2010-06-12 12:07:16 +00:00
|
|
|
echo('<div style="float: right;">');
|
|
|
|
|
2011-03-17 00:09:20 +00:00
|
|
|
if ($_GET['optb'] == "graphs")
|
|
|
|
{
|
2011-04-09 12:35:24 +00:00
|
|
|
echo('<span class="pagemenu-selected">');
|
2010-06-12 14:18:56 +00:00
|
|
|
}
|
2011-03-17 00:09:20 +00:00
|
|
|
|
2010-06-12 21:14:48 +00:00
|
|
|
echo('<a href="health/'. $_GET['opta'].'/graphs/"> Graphs</a>');
|
2011-03-17 00:09:20 +00:00
|
|
|
|
|
|
|
if ($_GET['optb'] == "graphs")
|
|
|
|
{
|
2011-04-09 12:35:24 +00:00
|
|
|
echo('</span>');
|
2011-03-17 00:09:20 +00:00
|
|
|
}
|
|
|
|
|
2010-06-12 12:07:16 +00:00
|
|
|
echo(' | ');
|
2011-03-17 00:09:20 +00:00
|
|
|
|
|
|
|
if ($_GET['optb'] == "nographs")
|
|
|
|
{
|
2011-04-09 12:35:24 +00:00
|
|
|
echo('<span class="pagemenu-selected">');
|
2010-06-12 14:18:56 +00:00
|
|
|
}
|
2011-03-17 00:09:20 +00:00
|
|
|
|
2010-06-12 21:14:48 +00:00
|
|
|
echo('<a href="health/'. $_GET['opta'].'/nographs/"> No Graphs</a>');
|
2010-02-11 01:48:55 +00:00
|
|
|
|
2011-04-09 12:35:24 +00:00
|
|
|
if ($_GET['optb'] == "nographs")
|
|
|
|
{
|
|
|
|
echo('</span>');
|
|
|
|
}
|
2010-02-11 01:48:55 +00:00
|
|
|
|
2010-06-12 12:07:16 +00:00
|
|
|
echo('</div>');
|
|
|
|
|
|
|
|
print_optionbar_end();
|
2010-02-11 01:48:55 +00:00
|
|
|
|
2010-02-09 16:36:06 +00:00
|
|
|
switch ($_GET['opta'])
|
|
|
|
{
|
2011-04-09 12:35:24 +00:00
|
|
|
case 'processor':
|
2010-04-11 13:45:19 +00:00
|
|
|
case 'memory':
|
|
|
|
case 'storage':
|
2011-04-09 12:35:24 +00:00
|
|
|
case 'temperature':
|
2010-06-23 15:54:56 +00:00
|
|
|
case 'humidity':
|
2011-04-09 12:35:24 +00:00
|
|
|
case 'voltage':
|
|
|
|
case 'fanspeed':
|
|
|
|
case 'frequency':
|
2010-06-09 20:03:16 +00:00
|
|
|
case 'current':
|
2010-04-11 13:45:19 +00:00
|
|
|
include('pages/health/'.$_GET['opta'].'.inc.php');
|
2010-02-09 16:36:06 +00:00
|
|
|
break;
|
|
|
|
default:
|
2011-04-09 12:35:24 +00:00
|
|
|
include('pages/health/temperature.inc.php');
|
2010-02-09 16:36:06 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2011-04-09 12:35:24 +00:00
|
|
|
?>
|