Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
fb99487b
Commit
fb99487b
authored
Dec 06, 2002
by
Leigh B. Stoller
Browse files
Add SHOW function to list a users widearea account access, presented
in his profile output.
parent
437b8ebf
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/showstuff.php3
View file @
fb99487b
...
...
@@ -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.
#
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment