From f197dff5079a26b0295255cca64d02470a1add9c Mon Sep 17 00:00:00 2001 From: Callan Barrett Date: Sun, 8 Jun 2008 01:58:07 +0800 Subject: Revert "Split html from front page" This reverts commit 0cf3c5ea8bd2799e1354aa2008edb542e01635ba. --- web/html/index.php | 155 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 151 insertions(+), 4 deletions(-) (limited to 'web/html/index.php') diff --git a/web/html/index.php b/web/html/index.php index e530a85..895fc8a 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -2,20 +2,84 @@ set_include_path(get_include_path() . PATH_SEPARATOR . '../lib' . PATH_SEPARATOR . '../lang'); +# include("index_po.inc"); include("pkgfuncs_po.inc"); # Add to handle the i18n of My Packages include("aur.inc"); set_lang(); check_sid(); html_header(__("Home")); -# Hey, how about listing the newest pacakges? :D +# Big Top Level Table (Table 1) +echo "
\n"; +echo "
AUR ".__("Home")."
\n"; +echo "
\n"; +echo "\n"; + +# MAIN: Top +echo "\n"; +print ""; +print ""; + +# MAIN: Bottom Left +print ""; +print ""; +print ""; +print "\n"; +print "
"; +print "

".__("Welcome to the AUR! Please read the %hAUR User Guidelines%h and %hAUR TU Guidelines%h for more information.", array('', '', '', ''))."
"; +print __("Contributed PKGBUILDs must conform to the %hArch Packaging Standards%h otherwise they will be deleted!", array('', ''))."

"; +print "

".__("Remember to vote for your favourite packages!")."
"; +print __("The most popular packages will be provided as binary packages in [community].")."

"; +print "
"; + +#Hey, how about listing the newest pacakges? :D $q = "SELECT * FROM Packages "; $q.= "WHERE DummyPkg != 1 "; $q.= "ORDER BY GREATEST(SubmittedTS,ModifiedTS) DESC "; $q.= "LIMIT 0 , 10"; -$result_newest = db_query($q,$dbh); +$result = db_query($q,$dbh); +# Table 2 +print ''; +print ''; +print ''; +print ''; + +while ($row = mysql_fetch_assoc($result)) { + print ''; + print ''; + print ''; + print ''."\n"; +} +print ""; +print ""; +print "
'; +print ' '.__("Recent Updates").' '; +print '
'; + + print ''; + print $row["Name"]." ".$row["Version"].""; + + print ''; + + # figure out the mod string + $mod_int = intval($row["ModifiedTS"]); + $sub_int = intval($row["SubmittedTS"]); + if ($mod_int != 0) { + $modstring = gmdate("r", $mod_int); + } + elseif ($sub_int != 0) { + $modstring = ' '.gmdate("r", $sub_int); + } + else { + $mod_string = "(unknown)"; + } + print ''.$modstring.''; + print '
"; +# End Table 2 + +# MAIN: Bottom Right +print "
"; # AUR STATISTICS + $q = "SELECT count(*) FROM Packages,PackageLocations WHERE Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'unsupported'"; $result = db_query($q, $dbh); $row = mysql_fetch_row($result); @@ -57,6 +121,22 @@ if (!empty($user)) { $row = mysql_fetch_row($result); $flagged_outdated = $row[0]; + print ""; + + print ""; + print ""; + print ""; + + # Number of packages in unsupported + print ""; + print ""; + print ""; + print ""; + # If the user is a TU calculate the number of the packages $atype = account_from_sid($_COOKIE["AURSID"]); @@ -65,12 +145,79 @@ if (!empty($user)) { $result = db_query($q, $dbh); $row = mysql_fetch_row($result); $maintainer_community_count = $row[0]; + + print ""; + print ""; + print ""; + print ""; } + + # Number of outdated packages + print ""; + print ""; + print ""; + print ""; + + print "
"; + print "".__("My Statistics").""; + print "
"; + print "".__("Packages in unsupported").""; + print "$maintainer_unsupported_count
"; + print "".__("Packages in [community]").""; + print "$maintainer_community_count
"; + print "".__("Out-of-date").""; + print "$flagged_outdated

"; } -include('front_page.php'); +print ""; -html_footer(AUR_VERSION); +print ""; +print ""; +print ""; + +print ""; +print ""; +print ""; +print ""; + +print ""; +print ""; +print ""; +print ""; +print ""; +print ""; +print ""; +print ""; + +print ""; +print ""; +print ""; +print ""; + +print ""; +print ""; +print ""; +print ""; + +print "
"; +print "".__("Statistics").""; +print "
"; +print "".__("Packages in unsupported").""; +print "$unsupported_count
"; +print "".__("Packages in [community]").""; +print "$community_count
"; +print "".__("Packages added or updated in the past 7 days").""; +print "$update_count
"; +print "".__("Registered Users").""; +print "$user_count
"; +print "".__("Trusted Users").""; +print "$tu_count
"; + +# Close out the right column +print "
\n"; +# End Table 1 +echo "
".__("DISCLAIMER").""; +echo "
"; +echo "
"; +html_footer(AUR_VERSION); # vim: ts=2 sw=2 noet ft=php ?> -- cgit v1.2.3-70-g09d2