Skip to content
Snippets Groups Projects
shame.php 707 B
Newer Older
  • Learn to ignore specific revisions
  • <?	exec("/usr/local/bin/shame.py -a", $Shame);
    	$smarty->assign('title',"The SUCS Hall of Shame");
    	$o="<div style='text-align: center;'><img src=\"/images/shame.php\" alt=\"pie chart of top 12 disk users\"/></div>";
    
    	$o.="<table align=\"center\">\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++)
    	{
    		list($space, $place, $user, $size) = preg_split("/ +/", $Shame[$i]);
    		if ($size > 0)
    			$o.="\t<tr><td align=\"center\">$user</td><td align=\"center\">${size}B</td></tr>\n";
    	}
    	$o.="</table>\n";
    
    	$o.=$Shame[count($Shame) - 1];
    	$o.="<br />\n";
    	//readfile("tail.html");
    	$smarty->assign('body', $o);
    ?>