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

Add back plab forms stuff and the backend code.

Also added code to push the subtypes in the perm tables so I can stop
doing it by hand. Done badly though; needs cleanup.
parent b693c12d
......@@ -198,21 +198,44 @@ elseif (strcmp($approval, "approve") == 0) {
# Temporary Plab hack.
#
$pcremote_ok = array();
$auxtypes = array();
if (isset($pcplab_okay) &&
!strcmp($pcplab_okay, "Yep")) {
$pcremote_ok[] = "pcplab";
$pcremote_ok[] = "pcplabphys";
$auxtypes[] = "pcplab";
$auxtypes[] = "pcplabinet";
$auxtypes[] = "pcplabinet2";
$auxtypes[] = "pcplabintl";
$auxtypes[] = "pcplabdsl";
}
# RON implies pcwa too.
if (isset($ron_okay) &&
!strcmp($ron_okay, "Yep")) {
$pcremote_ok[] = "pcron";
$pcremote_ok[] = "pcwa";
$auxtypes[] = "pcvron";
$auxtypes[] = "pcvroninet";
$auxtypes[] = "pcvroninet2";
$auxtypes[] = "pcvronintl";
$auxtypes[] = "pcvrondsl";
$auxtypes[] = "pcvwa";
$auxtypes[] = "pcvwainet";
$auxtypes[] = "pcvwainet2";
$auxtypes[] = "pcvwaintl";
$auxtypes[] = "pcvwadsl";
}
if (count($pcremote_ok)) {
$foo = implode(",", $pcremote_ok);
DBQueryFatal("UPDATE projects set pcremote_ok='$foo' ".
"WHERE pid='$pid'");
}
if (count($auxtypes)) {
while (list ($idx, $type) = each ($auxtypes)) {
DBQueryFatal("insert into nodetypeXpid_permissions ".
"(pid, type) ".
"values ('$pid', '$type')");
}
}
TBMAIL("$headname '$headuid' <$headuid_email>",
"Project '$pid' Approval",
......
......@@ -421,7 +421,6 @@ function SPITFORM($formfields, $returning, $errors)
</td>
</tr>\n";
if (0) {
echo "<tr>
<td colspan=2>*Estimated #of
<a href=\"$TBDOCBASE/docwrapper.php3?docname=widearea.html\">
......@@ -433,7 +432,6 @@ function SPITFORM($formfields, $returning, $errors)
size=4>
</td>
</tr>\n";
}
echo "<tr>
<td colspan=2>*Estimated #of
......@@ -706,7 +704,6 @@ elseif (! ereg("^[0-9]+$", $formfields[proj_pcs])) {
$errors["#of PCs"] = "Must be numeric";
}
if (0) {
if (!isset($formfields[proj_plabpcs]) ||
strcmp($formfields[proj_plabpcs], "") == 0) {
$errors["#of Planetlab PCs"] = "Missing Field";
......@@ -714,7 +711,6 @@ if (!isset($formfields[proj_plabpcs]) ||
elseif (! ereg("^[0-9]+$", $formfields[proj_plabpcs])) {
$errors["#of Planetlab PCs"] = "Must be numeric";
}
}
if (!isset($formfields[proj_ronpcs]) ||
strcmp($formfields[proj_ronpcs], "") == 0) {
$errors["#of RON PCs"] = "Missing Field";
......@@ -860,8 +856,7 @@ $proj_funders = addslashes($formfields[proj_funders]);
$proj_whynotpublic = addslashes($formfields[proj_whynotpublic]);
$proj_members = $formfields[proj_members];
$proj_pcs = $formfields[proj_pcs];
#$proj_plabpcs = $formfields[proj_plabpcs];
$proj_plabpcs = 0;
$proj_plabpcs = $formfields[proj_plabpcs];
$proj_ronpcs = $formfields[proj_ronpcs];
$proj_why = addslashes($formfields[proj_why]);
$proj_expires = date("Y:m:d", time() + (86400 * 120));
......
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