Fixes to the PaintWeb cron task.
[moodle/mihaisucan.git] / admin / dbperformance.php
blob648a2ec8c957a43d4612dd7c4015996e29c43dfa
1 <?PHP // $Id$
2 // dbperformance.php - shows latest ADOdb stats for the current server
4 require_once('../config.php');
6 // disable moodle specific debug messages that would be breaking the frames
7 disable_debugging();
9 $topframe = optional_param('topframe', 0, PARAM_BOOL);
10 $bottomframe = optional_param('bottomframe', 0, PARAM_BOOL);
11 $do = optional_param('do', '', PARAM_ALPHA);
13 require_login();
15 require_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
17 $strdatabaseperformance = get_string("databaseperformance");
18 $stradministration = get_string("administration");
19 $site = get_site();
21 $navigation = build_navigation(array(
22 array('name'=>$stradministration, 'link'=>'index.php', 'type'=>'misc'),
23 array('name'=>$strdatabaseperformance, 'link'=>null, 'type'=>'misc')));
24 if (!empty($topframe)) {
25 print_header("$site->shortname: $strdatabaseperformance", "$site->fullname", $navigation);
26 exit;
29 if (!empty($bottomframe) or !empty($do)) {
30 $perf =&NewPerfMonitor($db);
31 $perf->UI($pollsecs=5);
32 exit;
36 <head>
37 <title><?php echo "$site->shortname: $strdatabaseperformance" ?></title>
38 </head>
40 <frameset rows="80,*">
41 <frame src="dbperformance.php?topframe=true">
42 <frame src="dbperformance.php?bottomframe=true">
43 </frameset>