Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / admin / dbperformance.php
blob77316aca5d52cabff5455339d50a3518c0f5b091
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, SITEID));
17 $strdatabaseperformance = get_string("databaseperformance");
18 $stradministration = get_string("administration");
19 $site = get_site();
21 if (!empty($topframe)) {
22 print_header("$site->shortname: $strdatabaseperformance", "$site->fullname",
23 "<a $CFG->frametarget href=\"index.php\">$stradministration</a> -> Database performance");
24 exit;
27 if (!empty($bottomframe) or !empty($do)) {
28 $perf =&NewPerfMonitor($db);
29 $perf->UI($pollsecs=5);
30 exit;
34 <head>
35 <title><?php echo "$site->shortname: $strdatabaseperformance" ?></title>
36 </head>
38 <frameset rows="80,*">
39 <frame src="dbperformance.php?topframe=true">
40 <frame src="dbperformance.php?bottomframe=true">
41 </frameset>