Skip to content

Commit

Permalink
Screw the free disk space left and total disk space in the footer. It…
Browse files Browse the repository at this point in the history
… caused more problems then it was useful. Got rid of that and fixed OS and SOFTWARE in the footer.
  • Loading branch information
kmark committed May 21, 2010
1 parent 9605533 commit 20df9d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
6 changes: 1 addition & 5 deletions includes/tpl/aserverstatus.tpl
Expand Up @@ -16,10 +16,6 @@
<td><strong>MySQL Version:</strong></td>
<td> %MYSQL_VERSION% </td>
</tr>
<tr>
<td><strong>Disk Total/Free Space:</strong></td>
<td> Disk total: %DISK_TOTAL_SPACE%GBs (Free %DISK_FREE_SPACE%GBs)</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
Expand All @@ -36,4 +32,4 @@
<td align="center"> <img src="../includes/status.php?link=%SERVER%:110"></td>
<td align="center"> <img src="../includes/status.php?link=%SERVER%:22"></td>
</tr>
</table>
</table>
7 changes: 2 additions & 5 deletions includes/variables.php
Expand Up @@ -33,14 +33,11 @@
$output = shell_exec('mysql -V');
preg_match('@[0-9]+\.[0-9]+\.[0-9]+@', $output, $version);
}
$diskfreespace = disk_free_space('/home/username') / 1073741824;
$disktotalspace = disk_total_space('/home/username') / 1073741824;
global $style;
$array2['OS'] = getenv(SERVER_SOFTWARE);
$array2['OS'] = PHP_OS;
$array2['SOFTWARE'] = $_SERVER["SERVER_SOFTWARE"];
$array2['PHP_VERSION'] = phpversion();
$array2['MYSQL_VERSION'] = $version[0];
$array2['DISK_FREE_SPACE'] = substr($diskfreespace,0,4);
$array2['DISK_TOTAL_SPACE'] = substr($disktotalspace,0,4);
$array['TITLE'] = $style->replaceVar('tpl/aserverstatus.tpl',$array2);
$pagegen .= $style->replaceVar('tpl/footerdebug.tpl',$array);
}
Expand Down

0 comments on commit 20df9d8

Please sign in to comment.