closes #2992 (Added last 7 days update count)

This commit is contained in:
pjmattal 2005-07-28 16:08:17 +00:00
parent 25d3f78288
commit 05d398e07c
2 changed files with 16 additions and 1 deletions

View file

@ -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

View file

@ -81,4 +81,6 @@ $_t["en"]["Remember to vote for your favourite packages!"] = "Remember to vote f
$_t["en"]["The most popular packages will be provided as binary packages in [community]."] = "The most popular packages will be provided as binary packages in [community].";
$_t["en"]["Packages added or updated in the past 7 days"] = "Packages added or updated in the past 7 days";
?>