\n"; # Main front page row (split into halves) print "\n"; # Left half of front page 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 "

".__("If you have feedback about the AUR, please leave it in %hFlyspray%h.", array('', ''))."
"; print __("Email discussion about the AUR takes place on the %sTUR Users List%s.", array('', ''))."

"; #print "

".__("Though we can't vouch for their contents, we provide a %hlist of user repositories%h for your convenience.", array('', ''))."

"; print "
\n"; # PACKAGE COUNTS $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); $unsupported_count = $row[0]; $q = "SELECT count(*) FROM Packages,PackageLocations WHERE Packages.LocationID = PackageLocations.ID AND PackageLocations.Location = 'community'"; $result = db_query($q, $dbh); $row = mysql_fetch_row($result); $community_count = $row[0]; $q = "SELECT count(*) from Users"; $result = db_query($q, $dbh); $row = mysql_fetch_row($result); $user_count = $row[0]; $q = "SELECT count(*) from Users,AccountTypes WHERE Users.AccountTypeID = AccountTypes.ID AND AccountTypes.AccountType = 'Trusted User'"; $result = db_query($q, $dbh); $row = mysql_fetch_row($result); $tu_count = $row[0]; 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 "".__("Registered Users").""; print "$user_count
"; print "".__("Trusted Users").""; print "$tu_count
"; #Hey, how about listing the newest pacakges? :D $q = "SELECT * FROM Packages "; $q.= "WHERE DummyPkg != 1 "; $q.= "ORDER BY SubmittedTS DESC "; $q.= "LIMIT 0 , 10"; $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 = date("r", $mod_int); } elseif ($sub_int != 0) { $modstring = ' '.date("r", $sub_int); } else { $mod_string = "(unknown)"; } print ''.$modstring.''; print '
"; # End Table 2 # Now go to the second (right) column print " "; print "   "; print " \n"; # Now present the user login stuff if (!isset($_COOKIE["AURSID"])) { # the user is not logged in, give them login widgets # if ($login_error) { print "" . $login_error . "
\n"; } print "\n"; print "\n"; print "\n"; print ""; print ""; print "\n"; print "\n"; print ""; print ""; print "\n"; print "\n"; print ""; print "\n"; print "\n"; print "
".__("Username:")."
".__("Password:")."
 
"; print "
\n"; } else { print __("Logged-in as: %h%s%h", array("", username_from_sid($_COOKIE["AURSID"]), "")); } # Close out the right column print " "; print "\n"; print "\n"; # End Table 1 html_footer("Version 1.1 \$Id$"); # vim: ts=2 sw=2 noet ft=php ?>