Commit 09c357e3 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add showproject link to dump full project information.

parent 4a1315e8
......@@ -138,7 +138,8 @@ while ($projectrow = mysql_fetch_array($query_result)) {
<td colspan=7> </td>
</tr>
<tr>
<td rowspan=2>$pid</td>
<td rowspan=2>
<A href='showproject.php3?uid=$uid&pid=$pid'>$pid</A></td>
<td rowspan=2>$headuid</td>
<td rowspan=2>
<select name=\"$pid\$\$approval\">
......
<html>
<head>
<title>Show Project Information</title>
<link rel="stylesheet" href="tbstyle.css" type="text/css">
</head>
<body>
<?php
include("defs.php3");
#
# Note the difference with which this page gets it arguments!
# I invoke it using GET arguments, so uid and pid are are defined
# without having to find them in URI (like most of the other pages
# find the uid).
#
#
# Only known and logged in users can end experiments.
#
LOGGEDINORDIE($uid);
$isadmin = ISADMIN($uid);
#
# Verify form arguments.
#
if (!isset($pid) ||
strcmp($pid, "") == 0) {
USERERROR("You must provide a project ID.", 1);
}
#
# Check to make sure thats this is a valid PID.
#
$query_result = mysql_db_query($TBDBNAME,
"SELECT * FROM projects WHERE pid=\"$pid\"");
if (mysql_num_rows($query_result) == 0) {
USERERROR("The project $pid is not a valid project.", 1);
}
$row = mysql_fetch_array($query_result);
#
# Verify that this uid is a member of the project for the experiment
# being displayed, or is an admin person.
#
if (!$isadmin) {
$query_result = mysql_db_query($TBDBNAME,
"SELECT pid FROM proj_memb WHERE uid=\"$uid\" and pid=\"$pid\"");
if (mysql_num_rows($query_result) == 0) {
USERERROR("You are not a member of Project $pid.", 1);
}
}
echo "<center>
<h3>Project Information</h3>
</center>
<table align=center border=1>\n";
$proj_created = $row[created];
$proj_expires = $row[expires];
$proj_name = $row[name];
$proj_URL = $row[URL];
$proj_affil = $row[affil];
$proj_addr = $row[addr];
$proj_head_uid = $row[head_uid];
$control_node = $row[control_node];
#
# Generate the table.
#
echo "<tr>
<td>Name: </td>
<td class=\"left\">$pid</td>
</tr>\n";
echo "<tr>
<td>Long Name: </td>
<td class=\"left\">$proj_name</td>
</tr>\n";
echo "<tr>
<td>Project Head: </td>
<td class=\"left\">$proj_head_uid</td>
</tr>\n";
echo "<tr>
<td>URL: </td>
<td class=\"left\">
<A href='$proj_URL'>$proj_URL</A></td>
</tr>\n";
echo "<tr>
<td>Created: </td>
<td class=\"left\">$proj_created</td>
</tr>\n";
echo "<tr>
<td>Expires: </td>
<td class=\"left\">$proj_expires</td>
</tr>\n";
echo "</table>\n";
?>
</center>
</body>
</html>
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