diff options
author | pjmattal <pjmattal> | 2005-06-10 06:52:46 +0200 |
---|---|---|
committer | pjmattal <pjmattal> | 2005-06-10 06:52:46 +0200 |
commit | c7e4f5c7fa8e4ba9e9503f70a3334d33f31b78e1 (patch) | |
tree | b49f8c311d398367269b9e6572e5b280547c7e1f /web/lib | |
parent | 45e5883a1579ef64071d161a216e7159bfab1daf (diff) | |
download | aur-c7e4f5c7fa8e4ba9e9503f70a3334d33f31b78e1.tar.gz aur-c7e4f5c7fa8e4ba9e9503f70a3334d33f31b78e1.tar.xz |
Added Simo's patch for #2579, adding user info page
also modified it slightly so that we no longer look at AURMaintainerUID for maintainer
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/acctfuncs.inc | 55 | ||||
-rw-r--r-- | web/lib/pkgfuncs.inc | 9 |
2 files changed, 60 insertions, 4 deletions
diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc index 996a70c6..8021cc67 100644 --- a/web/lib/acctfuncs.inc +++ b/web/lib/acctfuncs.inc @@ -586,5 +586,60 @@ function search_results_page($UTYPE,$O=0,$SB="",$U="",$T="", return; } +# Display non-editable account info +# +function display_account_info($U="",$T="", + $E="",$R="",$I="") { + # U: value to display for username + # T: value to display for account type + # E: value to display for email address + # R: value to display for RealName + # I: value to display for IRC nick + + global $SUPPORTED_LANGS; + + print "<center>\n"; + print "<table border='0' cellpadding='0' cellspacing='0' width='33%'>\n"; + print " <tr>\n"; + print " <td colspan='2'> </td>\n"; + print " </tr>\n"; + + print " <tr>\n"; + print " <td align='left'>".__("Username").":</td>\n"; + print " <td align='left'>".$U."</td>\n"; + print " </tr>\n"; + + print " <tr>\n"; + print " <td align='left'>".__("Account Type").":</td>\n"; + print " <td align='left'>"; + if ($T == "User") { + print __("User"); + } elseif ($T == "Trusted User") { + print __("Trusted User"); + } elseif ($T == "Developer") { + print __("Developer"); + } + print "</td>\n"; + + print " <tr>\n"; + print " <td align='left'>".__("Email Address").":</td>\n"; + print " <td align='left'><a href='mailto:".$E."'>".$E."</a></td>\n"; + print " </tr>\n"; + + print " <tr>\n"; + print " <td align='left'>".__("Real Name").":</td>\n"; + print " <td align='left'>".$R."</td>\n"; + print " </tr>\n"; + + print " <tr>\n"; + print " <td align='left'>".__("IRC Nick").":</td>\n"; + print " <td align='left'>".$I."</td>\n"; + print " </tr>\n"; + + print "</table>\n"; + print "</center>\n"; + return; +} + # vim: ts=2 sw=2 noet ft=php ?> diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 451467f9..b0743cc5 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -309,14 +309,15 @@ function package_details($id=0, $SID="") { print "</tr>\n"; print "<tr>\n"; print " <td colspan='2'><span class='f3'>".__("Maintainer").": "; - if ($row["AURMaintainerUID"]) { - $maintainer = username_from_id($row["AURMaintainerUID"]); - } elseif ($row["MaintainerUID"]) { + if ($row["MaintainerUID"]) { $maintainer = username_from_id($row["MaintainerUID"]); + print "<a href='/account.php?Action=AccountInfo&ID="; + print $row["MaintainerUID"] . "'>"; + print $maintainer . "</a></span></td>"; } else { $maintainer = "None"; + print $maintainer . "</span></td>"; } - print $maintainer . "</span></td>"; print "</tr>\n"; print "<tr>\n"; print " <td colspan='2'><img src='/images/pad.gif' height='15'></td>"; |