Commit 950a0f91 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Add distinct "funders" field as per Jay request.

parent 03528208
......@@ -49,6 +49,10 @@ if (!isset($proj_URL) ||
strcmp($proj_URL, $HTTPTAG) == 0) {
FORMERROR("Project URL");
}
if (!isset($proj_funders) ||
strcmp($proj_funders, "") == 0) {
FORMERROR("Project Funders and Grant Numbers");
}
if (!isset($usr_email) ||
strcmp($usr_email, "") == 0) {
FORMERROR("Email Address");
......@@ -120,11 +124,12 @@ VERIFYURL($proj_URL);
#
# Certain of these values must be escaped or otherwise sanitized.
#
$proj_why = addslashes($proj_why);
$proj_name = addslashes($proj_name);
$usr_affil = addslashes($usr_affil);
$usr_title = addslashes($usr_title);
$usr_addr = addslashes($usr_addr);
$proj_why = addslashes($proj_why);
$proj_name = addslashes($proj_name);
$proj_funders = addslashes($proj_funders);
$usr_affil = addslashes($usr_affil);
$usr_title = addslashes($usr_title);
$usr_addr = addslashes($usr_addr);
#
# This is a new project request. Make sure it does not already exist.
......@@ -267,10 +272,10 @@ if (! $returning) {
#
$newproj_command = "INSERT INTO projects ".
"(pid, created, expires, name, URL, head_uid, ".
" num_members, num_pcs, num_sharks, why, unix_gid)".
" num_members, num_pcs, num_sharks, why, funders, unix_gid)".
"VALUES ('$pid', now(), '$proj_expires','$proj_name','$proj_URL',".
"'$proj_head_uid', '$proj_members', '$proj_pcs', '$proj_sharks', ".
"'$proj_why', NULL)";
"'$proj_why', '$proj_funders', NULL)";
$newproj_result = mysql_db_query($TBDBNAME, $newproj_command);
if (! $newproj_result) {
$err = mysql_error();
......@@ -305,6 +310,7 @@ mail($TBMAIL_APPROVE,
"Project: $proj_name\n".
"Expires: $proj_expires\n".
"Project URL: $proj_URL\n".
"Funders: $proj_funders\n".
"Title: $usr_title\n".
"Affiliation: $usr_affil\n".
"Address: $usr_addr\n".
......
......@@ -246,6 +246,15 @@ echo "<tr>
value=\"http://\" size=\"45\"></td>
</tr>\n";
#
# Funders/Grant numbers
#
echo "<tr>
<td>*Funding Sources and Grant Numbers:<br>
(Type \"none\" if not funded)</td>
<td><input type=\"text\" name=\"proj_funders\" size=\"45\"></td>
</tr>\n";
#
# Nodes and PCs and Users
#
......
......@@ -18,6 +18,7 @@ $proj_created = $row[created];
$proj_expires = $row[expires];
$proj_name = $row[name];
$proj_URL = $row[URL];
$proj_funders = $row[funders];
$proj_head_uid = $row[head_uid];
$proj_members = $row[num_members];
$proj_pcs = $row[num_pcs];
......@@ -49,6 +50,11 @@ echo "<tr>
<A href='$proj_URL'>$proj_URL</A></td>
</tr>\n";
echo "<tr>
<td>Funders: </td>
<td class=\"left\">$proj_funders</td>
</tr>\n";
echo "<tr>
<td>#Project Members: </td>
<td class=\"left\">$proj_members</td>
......
......@@ -24,6 +24,7 @@ function SHOWPROJECT($pid, $thisuid) {
$proj_expires = $row[expires];
$proj_name = $row[name];
$proj_URL = $row[URL];
$proj_funders = $row[funders];
$proj_head_uid = $row[head_uid];
$proj_members = $row[num_members];
$proj_pcs = $row[num_pcs];
......@@ -58,6 +59,11 @@ function SHOWPROJECT($pid, $thisuid) {
<A href='$proj_URL'>$proj_URL</A></td>
</tr>\n";
echo "<tr>
<td>Funders: </td>
<td class=\"left\">$proj_funders</td>
</tr>\n";
echo "<tr>
<td>#Project Members: </td>
<td class=\"left\">$proj_members</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