Commit e4c7542c authored by Mac Newbold's avatar Mac Newbold
Browse files

Add expt owner/creator to the table.

parent ce93384c
......@@ -20,22 +20,22 @@ $isadmin = ISADMIN($uid);
#
if ($isadmin) {
$experiments_result = mysql_db_query($TBDBNAME,
"select pid,eid,expt_name from experiments ".
"select pid,eid,expt_head_uid,expt_name from experiments ".
"order by pid,eid,expt_name");
$batch_result = mysql_db_query($TBDBNAME,
"select pid,eid,name from batch_experiments ".
"select pid,eid,creator_uid,name from batch_experiments ".
"order by pid,eid,name");
}
else {
$experiments_result = mysql_db_query($TBDBNAME,
"select e.pid,eid,expt_name from experiments as e ".
"select e.pid,eid,expt_head_uid,expt_name from experiments as e ".
"left join proj_memb as p on p.pid=e.pid ".
"where p.uid='$uid' ".
"order by e.pid,eid,expt_name");
$batch_result = mysql_db_query($TBDBNAME,
"select e.pid,eid,name from batch_experiments as e ".
"select e.pid,eid,creator_uid,name from batch_experiments as e ".
"left join proj_memb as p on p.pid=e.pid ".
"where p.uid='$uid' ".
"order by e.pid,eid,name");
......@@ -54,17 +54,19 @@ if (mysql_num_rows($experiments_result)) {
echo "<table border=2 cols=0
cellpadding=0 cellspacing=2 align=center>
<tr>
<td width=10%>PID</td>
<td width=10%>EID</td>
<td width=8%>PID</td>
<td width=8%>EID</td>
<td width=4%>Head UID</td>
<td width=3%>PCs</td>
<td width=3%>Sharks</td>
<td width=5% align=center>Terminate</td>
<td width=65%>Name</td>
<td width=4% align=center>Terminate</td>
<td width=70%>Name</td>
</tr>\n";
while ($row = mysql_fetch_array($experiments_result)) {
$pid = $row[pid];
$eid = $row[eid];
$huid = $row[expt_head_uid];
$name = $row[expt_name];
$usage_query = mysql_db_query($TBDBNAME,
......@@ -82,6 +84,8 @@ if (mysql_num_rows($experiments_result)) {
<td><A href='showproject.php3?pid=$pid'>$pid</A></td>
<td><A href='showexp.php3?exp_pideid=$pid\$\$$eid'>
$eid</A></td>
<td><A href='showuser.php3?target_uid=$huid'>
$huid</A></td>
<td>".$usage["pc"]." &nbsp;</td>
<td>".$usage["shark"]." &nbsp;</td>
<td align=center>
......@@ -102,20 +106,24 @@ if (mysql_num_rows($batch_result)) {
cellpadding=0 cellspacing=2 align=center>
<tr>
<td width=10%>PID</td>
<td width=20%>EID</td>
<td width=10%>EID</td>
<td width=5%>Head UID</td>
<td width=5% align=center>Terminate</td>
<td width=65%>Name</td>
<td width=70%>Name</td>
</tr>\n";
while ($row = mysql_fetch_array($batch_result)) {
$pid = $row[pid];
$eid = $row[eid];
$huid = $row[creator_uid];
$name = $row[name];
echo "<tr>
<td><A href='showproject.php3?pid=$pid'>$pid</A></td>
<td><A href='showbatch.php3?exp_pideid=$pid\$\$$eid'>
$eid</A></td>
<td><A href='showuser.php3?target_uid=$huid'>
$huid</A></td>
<td align=center>
<A href='endbatch.php3?exp_pideid=$pid\$\$$eid'>
<img alt=\"o\" src=\"redball.gif\"></A></td>
......
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