bcast-bridge/web/stat_hlsw.php

36 lines
936 B
PHP
Raw Normal View History

2006-12-22 00:06:05 +01:00
<?php
require_once('include.php');
function show($hlsw) {
$view = Input::getVar('view', INP_GET | INP_INT | INP_DEFAULT, 21600);
$mode = Input::getVar('mode', INP_GET | INP_STRING | INP_DEFAULT, 'normal');
switch ($mode) {
case 'overview':
Graphs::hlsw($hlsw->rrdpath, $hlsw->name, $view, 60, 400);
break;
default:
case 'normal':
Graphs::hlsw($hlsw->rrdpath, $hlsw->name, $view, 120, 800);
break;
}
}
$hlswid = Input::getVar('hlswid', INP_GET | INP_INT | INP_DEFAULT, 0);
if ($hlswid != 0) {
$hlsw = Hlsw::load($hlswid);
show($hlsw);
} else {
$view = Input::getVar('view', INP_GET | INP_INT | INP_DEFAULT, 21600);
$smarty = new MySmarty();
$masters = Hlsw::getAll();
$smarty->assign('masters', $masters);
$smarty->assign('view', $view);
$smarty->assign('views', array(21600 => "6 hours", 86400 => "1 day", 604800 => "1 week"));
$smarty->displaySite('Statistics: HLSW Master Server', 'stat_hlsw.tpl');
}
?>