$timer->start(); $stats = new Stats(); $t = new Template(translate('phpScheduleIt Statistics')); $t->printHTMLHeader(); // Make sure this is the admin if (!Auth::isAdmin()) { CmnFns::do_error_box(translate('This is only accessable to the administrator') . '<br />' . '<a href="ctrlpnl.php">' . translate('Back to My Control Panel') . '</a>'); } $t->printWelcome(); $t->startMain(); $t->startNavLinkTable(); $t->showNavLinksTable(Auth::isAdmin()); $t->endNavLinkTable(); $t->splitTable(); $scheduleid = isset($_GET['scheduleid']) ? $_GET['scheduleid'] : null; if (!$stats->set_schedule($scheduleid)) { $stats->print_schedule_error(); } else { $stats->load_schedule(); print_schedule_list($stats->get_schedule_list(), $stats->scheduleid); $stats->init(); ob_start(); // There is a lot of HTML being printed, so buffer the output print_quick_stats($stats); print_system_stats($stats); $stats->set_stats(MONTH); $stats->print_stats(); $stats->set_stats(DAY_OF_WEEK); $stats->print_stats(); $stats->set_stats(DAY_OF_MONTH); $stats->print_stats();