From e793e25823cc7579d8e5e9064b4565ca3476a89a Mon Sep 17 00:00:00 2001 From: swiergot Date: Thu, 22 Feb 2007 15:11:54 +0000 Subject: My Statistics instead of User Statistics. For TUs show number of packages they flagged safe, not number of their packages that were flagged safe. --- web/html/index.php | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'web') diff --git a/web/html/index.php b/web/html/index.php index 39d5a06f..0a85fdf2 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -233,16 +233,11 @@ if (!empty($user)) { $row = mysql_fetch_row($result); $flagged_outdated = $row[0]; - $q = "SELECT count(*) FROM Packages,Users WHERE Packages.Safe = 1 AND Packages.MaintainerUID = Users.ID AND Users.Username='$user'"; - $result = db_query($q, $dbh); - $row = mysql_fetch_row($result); - $flagged_safe = $row[0]; - print ""; print ""; print ""; print ""; @@ -282,7 +277,23 @@ if (!empty($user)) { # Number of safe packages print ""; print ""; print ""; print ""; -- cgit v1.2.3-24-g4f1b
"; - print "".__("User Statistics").""; + print "".__("My Statistics").""; print "
"; - print "".__("Safe").""; + if ($atype == 'Trusted User') { + $q = "SELECT count(*) FROM Packages,Users WHERE Packages.Safe = 1 AND Packages.VerifiedBy = Users.ID AND Users.Username='$user'"; + $result = db_query($q, $dbh); + $row = mysql_fetch_row($result); + $flagged_safe = $row[0]; + + print "".__("Flagged as safe by me").""; + } + else + { + $q = "SELECT count(*) FROM Packages,Users WHERE Packages.Safe = 1 AND Packages.MaintainerUID = Users.ID AND Users.Username='$user'"; + $result = db_query($q, $dbh); + $row = mysql_fetch_row($result); + $flagged_safe = $row[0]; + + print "".__("Flagged as safe").""; + } print "$flagged_safe