From 1f62f86af5225643f2a7d72c1a050c46ffc37477 Mon Sep 17 00:00:00 2001 From: eric Date: Thu, 24 Jun 2004 19:08:35 +0000 Subject: getting closer to printing package search results - also fixed some XHTML stuff --- web/lib/aur.inc | 52 +++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 7 deletions(-) (limited to 'web/lib/aur.inc') diff --git a/web/lib/aur.inc b/web/lib/aur.inc index ce3b7d9a..39c5c92f 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -22,6 +22,40 @@ $SUPPORTED_LANGS = array( # what languages we have translations for $QBUG = 1; # toggle query logging to /tmp/aurq.log $DBUG = 1; # use dbug($msg) to log to /tmp/aurd.log + +# return an array of info for each Trusted user +# +function getTrustedUsers() { + $tus = array(); + $dbh = db_connect(); + $q = "SELECT * FROM Users WHERE AccountTypeID = 2 "; + $q.= "ORDER BY Username ASC"; + $result = db_query($q, $dbh); + if ($result) { + while ($row = mysql_fetch_assoc($result)) { + $tus[] = $row; + } + } + return $tus; +} + + +# return an array of info for each Developer +# +function getDevelopers() { + $devs = array(); + $dbh = db_connect(); + $q = "SELECT * FROM Users WHERE AccountTypeID = 3 "; + $q.= "ORDER BY Username ASC"; + $result = db_query($q, $dbh); + if ($result) { + while ($row = mysql_fetch_assoc($result)) { + $devs[] = $row; + } + } + return $devs; +} + # see if the visitor is already logged in # function check_sid() { @@ -261,15 +295,19 @@ function set_lang() { # function html_header() { global $_COOKIE; + global $LANG; print "\n"; - print "\n"; - print ""; + print "\n"; + print "\n"; print "\n"; - print "AUR\n"; + print "AUR (".$LANG.")\n"; print "\n"; print "\n"; print "\n"; - print "\n"; + print "\n"; print "\n"; print "\n"; print "\n"; + print "\n"; print " "; print " \n"; print "
"; - print "ArchLinux User-community Repository
"; + print "ArchLinux User-community Repository
"; # XXX CSS help - a:link, a:visited, etc are defined, but I don't want to # use the defaults. Is this the way to override them? @@ -333,7 +371,7 @@ function html_header() { print "
\n"; - print "  
\n"; + print "  
\n"; print "\n\n"; return; -- cgit v1.2.3-24-g4f1b