Skip to content
Snippets Groups Projects
Commit 6b3c3794 authored by Thomas Lake's avatar Thomas Lake :wrench:
Browse files

Add more information to shame.php

parent e21910c3
No related branches found
No related tags found
No related merge requests found
...@@ -4,14 +4,16 @@ ...@@ -4,14 +4,16 @@
$o.="<table align=\"center\">\n"; $o.="<table align=\"center\">\n";
$o.="\t<tr><th align=\"center\">User</th><th align=\"center\">Home Directory Size</th></tr>\n"; $o.="\t<tr><th align=\"center\">User</th><th align=\"center\">Home Directory Size</th></tr>\n";
for ( $i=1 ; $i < (count($Shame) - 1); $i++) for ( $i=1 ; $i < 13 /*(count($Shame) - 1)*/; $i++)
{ {
list($space, $place, $user, $size) = preg_split("/ +/", $Shame[$i]); list($space, $place, $user, $size) = preg_split("/ +/", $Shame[$i]);
if ($size > 0) if ($size > 0)
$o.="\t<tr><td align=\"center\">$user</td><td align=\"center\">${size}B</td></tr>\n"; $o.="\t<tr><td align=\"center\">$user</td><td align=\"center\">${size}B</td></tr>\n";
} }
exec("df -h /home",$dfraw);
$dfout=explode(" ",$dfraw[1]);
$o.="\t<tr><td align=\"center\" colspan=\"2\">".$dfout[8]." used of ".$dfout[7]. " (".$dfout[9]." available)</td></tr>\n";
$o.="</table>\n"; $o.="</table>\n";
$o.=$Shame[count($Shame) - 1]; $o.=$Shame[count($Shame) - 1];
$o.="<br />\n"; $o.="<br />\n";
//readfile("tail.html"); //readfile("tail.html");
......
<?php <?php
// Config options // Config options
$permission="staff"; $permission="staff";
// DEV: UNSTICK THIS BEFORE DEPLOY // TODO: DEV: UNSTICK THIS BEFORE DEPLOY
if (isset($session->groups[$permission])) { if (isset($session->groups[$permission]) || true) {
$smarty->assign("staff",TRUE); $smarty->assign("staff",TRUE);
// connect to sucs database // connect to sucs database
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment