Commit cc2a18d6 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add approval status to user/project lists.

parent 563923b8
......@@ -58,13 +58,14 @@ echo "<table width=\"100%\" border=2 cellpadding=0 cellspacing=2
echo "<tr>
<td>Project Info</td>
<td>Name</td>
<td>Leader</td>\n";
<td>Leader</td>
<td align=center>Approved?</td>\n";
#
# Admin users get a "delete" option.
#
if ($isadmin) {
echo "<td align=center>Delete?</td>\n";
echo "<td align=center>Delete</td>\n";
}
echo "</tr>\n";
......@@ -72,12 +73,21 @@ while ($projectrow = mysql_fetch_array($query_result)) {
$pid = $projectrow[pid];
$headuid = $projectrow[head_uid];
$Pname = $projectrow[name];
$approved = $projectrow[approved];
echo "<tr>
<td><A href='showproject.php3?pid=$pid'>$pid</A></td>
<td>$Pname</td>
<td><A href='showuser.php3?target_uid=$headuid'>
$headuid</A></td>\n";
if ($approved) {
echo "<td align=center><img alt=\"Y\" src=\"greenball.gif\"></td>\n";
}
else {
echo "<td align=center><img alt=\"N\" src=\"redball.gif\"></td>\n";
}
if ($isadmin) {
echo "<td align=center><A href='deleteproject.php3?pid=$pid'>
<img alt=\"o\" src=\"redball.gif\"></A></td>\n";
......
......@@ -57,20 +57,22 @@ echo "<table width=\"100%\" border=2 cellpadding=0 cellspacing=2
echo "<tr>
<td>UID</td>
<td>Name</td>
<td>Projects</td>\n";
<td>Projects</td>
<td align=center>Approved?</td>\n";
#
# Admin users get a "delete" and a "modify" option.
#
if ($isadmin) {
echo "<td align=center>Modify?</td>\n";
echo "<td align=center>Delete?</td>\n";
echo "<td align=center>Modify</td>\n";
echo "<td align=center>Delete</td>\n";
}
echo "</tr>\n";
while ($row = mysql_fetch_array($query_result)) {
$thisuid = $row[uid];
$name = $row[usr_name];
$status = $row[status];
#
# Suck out a list of projects too.
......@@ -97,6 +99,14 @@ while ($row = mysql_fetch_array($query_result)) {
echo "<td>--</td>\n";
}
if (strcmp($status, "active") == 0 ||
strcmp($status, "unverified") == 0) {
echo "<td align=center><img alt=\"Y\" src=\"greenball.gif\"></td>\n";
}
else {
echo "<td align=center><img alt=\"N\" src=\"redball.gif\"></td>\n";
}
if ($isadmin) {
echo "<td align=center><A href='modusr_form.php3?target_uid=$thisuid'>
<img alt=\"O\" src=\"blueball.gif\"></A></td>\n";
......
Markdown is supported
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