Loading components/bananas.php +17 −18 Original line number Diff line number Diff line Loading @@ -46,5 +46,4 @@ $smarty->assign('title', "Banana Awards"); $smarty->assign('body', $result); ?> components/contents.php +44 −43 Original line number Diff line number Diff line <?php function listdir($mypath, $recurse, $summaries) { function listdir($mypath, $recurse, $summaries) { global $DB, $base; $dirlist = @scandir($base . "static" . $mypath); Loading components/disk.graph.php +14 −17 Original line number Diff line number Diff line <? exec("/usr/local/bin/shame.py -a", $Shame); for ( $i=1 ; $i < (count($Shame) - 1); $i++) { for ($i = 1; $i < (count($Shame) - 1); $i++) { list($space, $place, $user, $size) = preg_split("/ +/", $Shame[$i]); if ($i <= 12) { if ($i <= 12) { $item[] = $user; $slice[] = preg_replace('/M/', '', ${size}); } else { } else { $otherSize += preg_replace('/M/', '', ${size}); } } Loading components/disk.php +38 −37 Original line number Diff line number Diff line Loading @@ -4,8 +4,7 @@ //$o="<div style='text-align: center;'><img src=\"/images/disk.graph.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 < 13 /*(count($Shame) - 1)*/; $i++) { for ($i = 1; $i < 13 /*(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"; Loading Loading @@ -44,8 +43,10 @@ </script>"; $out .= "<div id='chart_div' align='center'></div>"; $smarty->assign('body', ($out . $o)); function parseLine($l){ function parseLine($l) { $fields = explode("|", preg_filter("/[ ]+/", "|", $l)); return array(trim($fields[2]), trim(str_replace("M", "", $fields[3]))); } ?> components/election.php +125 −124 Original line number Diff line number Diff line Loading @@ -2,7 +2,8 @@ $smarty->assign("election_year", ELECTION_YEAR); $smarty->assign("title", "Executive Election " . ELECTION_YEAR); function display_ballot() { function display_ballot() { global $DB, $smarty, $output; require_once("../lib/members.php"); Loading Loading
components/bananas.php +17 −18 Original line number Diff line number Diff line Loading @@ -46,5 +46,4 @@ $smarty->assign('title', "Banana Awards"); $smarty->assign('body', $result); ?>
components/contents.php +44 −43 Original line number Diff line number Diff line <?php function listdir($mypath, $recurse, $summaries) { function listdir($mypath, $recurse, $summaries) { global $DB, $base; $dirlist = @scandir($base . "static" . $mypath); Loading
components/disk.graph.php +14 −17 Original line number Diff line number Diff line <? exec("/usr/local/bin/shame.py -a", $Shame); for ( $i=1 ; $i < (count($Shame) - 1); $i++) { for ($i = 1; $i < (count($Shame) - 1); $i++) { list($space, $place, $user, $size) = preg_split("/ +/", $Shame[$i]); if ($i <= 12) { if ($i <= 12) { $item[] = $user; $slice[] = preg_replace('/M/', '', ${size}); } else { } else { $otherSize += preg_replace('/M/', '', ${size}); } } Loading
components/disk.php +38 −37 Original line number Diff line number Diff line Loading @@ -4,8 +4,7 @@ //$o="<div style='text-align: center;'><img src=\"/images/disk.graph.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 < 13 /*(count($Shame) - 1)*/; $i++) { for ($i = 1; $i < 13 /*(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"; Loading Loading @@ -44,8 +43,10 @@ </script>"; $out .= "<div id='chart_div' align='center'></div>"; $smarty->assign('body', ($out . $o)); function parseLine($l){ function parseLine($l) { $fields = explode("|", preg_filter("/[ ]+/", "|", $l)); return array(trim($fields[2]), trim(str_replace("M", "", $fields[3]))); } ?>
components/election.php +125 −124 Original line number Diff line number Diff line Loading @@ -2,7 +2,8 @@ $smarty->assign("election_year", ELECTION_YEAR); $smarty->assign("title", "Executive Election " . ELECTION_YEAR); function display_ballot() { function display_ballot() { global $DB, $smarty, $output; require_once("../lib/members.php"); Loading