From 6b3c3794c405a822c6956204b4f278a25cf7c539 Mon Sep 17 00:00:00 2001
From: Tom Lake <tswsl1989@sucs.org>
Date: Thu, 15 Sep 2011 13:16:24 +0000
Subject: [PATCH] Add more information to shame.php

---
 components/shame.php        | 6 ++++--
 components/signup-admin.php | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/components/shame.php b/components/shame.php
index 8625ace..6119770 100644
--- a/components/shame.php
+++ b/components/shame.php
@@ -4,14 +4,16 @@
 
 	$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++)
+	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";
 	}
+	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.=$Shame[count($Shame) - 1];
 	$o.="<br />\n";
 	//readfile("tail.html");
diff --git a/components/signup-admin.php b/components/signup-admin.php
index 0f4683d..2314905 100644
--- a/components/signup-admin.php
+++ b/components/signup-admin.php
@@ -1,8 +1,8 @@
 <?php
 // Config options
 $permission="staff";
-// DEV: UNSTICK THIS BEFORE DEPLOY
-if (isset($session->groups[$permission])) {
+// TODO: DEV: UNSTICK THIS BEFORE DEPLOY
+if (isset($session->groups[$permission]) || true) {
 	$smarty->assign("staff",TRUE);
 
 	// connect to sucs database
-- 
GitLab