summaryrefslogtreecommitdiffstats
path: root/web/html/index.php
diff options
context:
space:
mode:
authorpjmattal <pjmattal>2005-07-28 16:08:17 +0000
committerpjmattal <pjmattal>2005-07-28 16:08:17 +0000
commit05d398e07cfb26b4a9f14df4a3bce4d28ea9e137 (patch)
tree69af52d7d51a79716a8836a76fe9b552ee43e74b /web/html/index.php
parent25d3f782885264063c4070de5fb72cb959b30b36 (diff)
downloadaurweb-05d398e07cfb26b4a9f14df4a3bce4d28ea9e137.tar.xz
closes #2992 (Added last 7 days update count)
Diffstat (limited to 'web/html/index.php')
-rw-r--r--web/html/index.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/web/html/index.php b/web/html/index.php
index 5623426..4e9e93f 100644
--- a/web/html/index.php
+++ b/web/html/index.php
@@ -92,7 +92,7 @@ print __("The most popular packages will be provided as binary packages in [comm
print "<br>\n";
-# PACKAGE COUNTS
+# AUR STATISTICS
$q = "SELECT count(*) FROM Packages,PackageLocations WHERE Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'unsupported'";
$result = db_query($q, $dbh);
@@ -114,6 +114,12 @@ $result = db_query($q, $dbh);
$row = mysql_fetch_row($result);
$tu_count = $row[0];
+$targstamp = intval(strtotime("-7 days"));
+$q = "SELECT count(*) from Packages WHERE (Packages.SubmittedTS >= $targstamp OR Packages.ModifiedTS >= $targstamp)";
+$result = db_query($q, $dbh);
+$row = mysql_fetch_row($result);
+$update_count = $row[0];
+
print "<table class='boxSoft'>";
print "<tr>";
@@ -150,6 +156,13 @@ print "</td>";
print "<td class='boxSoft'><span class='f4'>$tu_count</span></td>";
print "</tr>";
+print "<tr>";
+print "<td class='boxSoft'>";
+print "<span class='f4'>".__("Packages added or updated in the past 7 days")."</span>";
+print "</td>";
+print "<td class='boxSoft'><span class='f4'>$update_count</span></td>";
+print "</tr>";
+
print "</table>";
#Hey, how about listing the newest pacakges? :D