when inserting 'Give Up' button, if site encoding is not iso-8859-1, then set page...
[moodle.git] / admin / dbperformance.php
blobabe311bbedb7308f96be7935fc0f6ab791f430e0
1 <?PHP // $Id$
2 // dbperformance.php - shows latest ADOdb stats for the current server
4 require_once('../config.php');
6 $topframe = optional_param('topframe', 0, PARAM_BOOL);
7 $bottomframe = optional_param('bottomframe', 0, PARAM_BOOL);
8 $do = optional_param('do', '', PARAM_ALPHA);
10 require_login();
12 if (!isadmin()) {
13 error("Only the admin can use this page");
16 $strdatabaseperformance = get_string("databaseperformance");
17 $stradministration = get_string("administration");
18 $site = get_site();
20 if (!empty($topframe)) {
21 print_header("$site->shortname: $strdatabaseperformance", "$site->fullname",
22 "<a target=\"$CFG->framename\" href=\"index.php\">$stradministration</a> -> Database performance");
23 exit;
26 if (!empty($bottomframe) or !empty($do)) {
27 $perf =&NewPerfMonitor($db);
28 $perf->UI($pollsecs=5);
29 exit;
33 <head>
34 <title><?php echo "$site->shortname: $strdatabaseperformance" ?></title>
35 </head>
37 <frameset rows="80,*">
38 <frame src="dbperformance.php?topframe=true">
39 <frame src="dbperformance.php?bottomframe=true">
40 </frameset>