Commit fb99487b authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Add SHOW function to list a users widearea account access, presented

in his profile output.
parent 437b8ebf
......@@ -1401,6 +1401,48 @@ function SPITOSINFOLINK($osid)
echo "<A href='showosinfo.php3?osid=$osid'>$osname</A>\n";
}
#
# A list of widearea accounts.
#
function SHOWWIDEAREAACCOUNTS($uid) {
$none = TBDB_TRUSTSTRING_NONE;
$query_result =
DBQueryFatal("SELECT * FROM widearea_accounts ".
"WHERE uid='$uid' and trust!='$none' ".
"order by node_id");
if (! mysql_num_rows($query_result)) {
return;
}
echo "<center>
<h3>Widearea Accounts</h3>
</center>
<table align=center border=1 cellpadding=1 cellspacing=2>\n";
echo "<tr>
<th>Node ID</th>
<th>Approved</th>
<th>Privs</th>
</tr>\n";
while ($row = mysql_fetch_array($query_result)) {
$node_id = $row[node_id];
$approved = $row[date_approved];
$trust = $row[trust];
if (TBTrustConvert($trust) != $TBDB_TRUST_NONE) {
echo "<tr>
<td>$node_id</td>
<td>$approved</td>
<td>$trust</td>\n";
echo "</tr>\n";
}
}
echo "</table>\n";
}
#
# This is an included file.
#
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment