mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
still working on pkgsearch.php::do_Details
This commit is contained in:
parent
ab6afc990c
commit
993fcb7811
5 changed files with 174 additions and 3 deletions
|
@ -140,6 +140,24 @@ function new_sid() {
|
|||
}
|
||||
|
||||
|
||||
# obtain the username if given their Users.ID
|
||||
#
|
||||
function username_from_id($id="") {
|
||||
if (!$id) {
|
||||
return "";
|
||||
}
|
||||
$dbh = db_connect();
|
||||
$q = "SELECT Username FROM Users WHERE ID = " . mysql_escape_string($id);
|
||||
$result = db_query($q, $dbh);
|
||||
if (!$result) {
|
||||
return "None";
|
||||
}
|
||||
$row = mysql_fetch_row($result);
|
||||
|
||||
return $row[0];
|
||||
}
|
||||
|
||||
|
||||
# obtain the username if given their current SID
|
||||
#
|
||||
function username_from_sid($sid="") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue