]> andersk Git - sql-web.git/blobdiff - tpl/index.php
minor portability fixes
[sql-web.git] / tpl / index.php
index 26ce4e87b83f677f29dd5c699a36946b65b8c1c9..e7cb30f173e9bd23f601014f8dd55d1bcdc67b12 100644 (file)
@@ -23,13 +23,13 @@ One nightly backup is available for your locker at <code>/mit/sql/backup/LOCKER_
 
 <div style="text-align:center; font-style: italic;">
 <?php
-if (!file_exists('/mit/sql/web_tmp/stat') || filemtime('/mit/sql/web_tmp/stat')+3600<time()) {
+if (!file_exists(TEMP_PATH.'/stat') || filemtime(TEMP_PATH.'/stat')+3600<time()) {
        $x = fetchRows(DBSelect("SHOW STATUS WHERE Variable_name IN ('Questions','Uptime')"),'Variable_name');
        $v = $x['Questions']['Value'];
        $t = $x['Uptime']['Value'];
-       file_put_contents('/mit/sql/web_tmp/stat',implode("\n",array($v,$t)));
+       file_put_contents(TEMP_PATH.'/stat',implode("\n",array($v,$t)));
 } else {
-       $x = file_get_contents('/mit/sql/web_tmp/stat');
+       $x = file_get_contents(TEMP_PATH.'/stat');
        list($v, $t) = explode("\n", $x);
 }
 $qavg = $v/$t;
This page took 0.389513 seconds and 4 git commands to generate.