summaryrefslogtreecommitdiffstats
path: root/web/html/index.php
diff options
context:
space:
mode:
authorswiergot <swiergot>2007-02-22 16:11:54 +0100
committerswiergot <swiergot>2007-02-22 16:11:54 +0100
commite793e25823cc7579d8e5e9064b4565ca3476a89a (patch)
tree83b54a52ce10fdf0b4cd889708a4627da29d2a6e /web/html/index.php
parent500f44abd911f02f926b3ffdcb9b93ec10024c33 (diff)
downloadaur-e793e25823cc7579d8e5e9064b4565ca3476a89a.tar.gz
aur-e793e25823cc7579d8e5e9064b4565ca3476a89a.tar.xz
My Statistics instead of User Statistics. For TUs show number of packages they flagged safe, not number of their packages that were flagged safe.
Diffstat (limited to 'web/html/index.php')
-rw-r--r--web/html/index.php25
1 files changed, 18 insertions, 7 deletions
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 "<table class='boxSoft'>";
print "<tr>";
print "<th colspan='2' class='boxSoftTitle' style='text-align: right'>";
- print "<span class='f3'>".__("User Statistics")."</span>";
+ print "<span class='f3'>".__("My Statistics")."</span>";
print "</th>";
print "</tr>";
@@ -282,7 +277,23 @@ if (!empty($user)) {
# Number of safe packages
print "<tr>";
print "<td class='boxSoft'>";
- print "<span class='f4'>".__("Safe")."</span>";
+ 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 "<span class='f4'>".__("Flagged as safe by me")."</span>";
+ }
+ 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 "<span class='f4'>".__("Flagged as safe")."</span>";
+ }
print "</td>";
print "<td class='boxSoft'><span class='f4'>$flagged_safe</span></td>";
print "</tr>";