From 37cc16182a1bb0f3088c68dc47c7100b12fa3b19 Mon Sep 17 00:00:00 2001 From: pjmattal Date: Thu, 28 Jul 2005 16:56:28 +0000 Subject: reorganized the main page for better readability --- web/html/index.php | 191 ++++++++++++++++++++++++++++------------------------- 1 file changed, 100 insertions(+), 91 deletions(-) (limited to 'web/html') diff --git a/web/html/index.php b/web/html/index.php index 4e9e93f..62cbd9a 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -76,12 +76,11 @@ html_header(); # Big Top Level Table (Table 1) print "\n"; - -# Main front page row (split into halves) print "\n"; -# Left half of front page -print ""; +print ""; +print ""; +print ""; +print ""; +#print " "; +print ""; print ""; print ""; -print ""; +print ""; print ""; print ""; print ""; -print ""; +print ""; print ""; print ""; print ""; -print ""; +print ""; print ""; print "
"; +# MAIN: Top Left +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('', ''))."
"; @@ -90,7 +89,97 @@ print "

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

"; #print "

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

"; -print "
\n"; +# MAIN: Top Right +print "
"; + +# 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"]), "")); +} + +# MAIN: Bottom Left +print "
"; + +#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 + +#print "
  \n"; + +# MAIN: Bottom Right +print ""; # AUR STATISTICS @@ -144,107 +233,27 @@ print "
"; -print "".__("Registered Users").""; +print "".__("Packages added or updated in the past 7 days").""; print "$user_count$update_count
"; -print "".__("Trusted Users").""; +print "".__("Registered Users").""; print "$tu_count$user_count
"; -print "".__("Packages added or updated in the past 7 days").""; +print "".__("Trusted Users").""; print "$update_count$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"; -- cgit v1.2.3-54-g00ecf