Commit 1704da03 authored by Imran Hussain's avatar Imran Hussain
Browse files

Run a code reformatting tool against the sucsite php code.

parent e2bf8da2
Loading
Loading
Loading
Loading
+17 −18
Original line number Diff line number Diff line
@@ -46,5 +46,4 @@ $smarty->assign('title', "Banana Awards");
$smarty->assign('body', $result);



?>
+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);
+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});
    }
}
+38 −37
Original line number Diff line number Diff line
@@ -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";
@@ -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])));
}

?>
+125 −124
Original line number Diff line number Diff line
@@ -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