uid(); $isadmin = ISADMIN(); # # Of course verify that this uid has admin privs! # if (! $isadmin) { USERERROR("You do not have admin privileges to approve projects!", 1); } # # Verify 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. # if (! ($this_project = Project::Lookup($pid))) { USERERROR("Unknown project $pid", 1); } echo "

You have the following choices:

Deny - Deny project application (kills project records)
Destroy - Deny project application, and kill the user account
Approve - Approve the project
More Info - Ask for more info
Postpone - Twiddle your thumbs some more
\n"; # # Show stuff # $this_project->Show(); $projleader = $this_project->GetLeader(); echo "

Project Leader Information

\n"; SHOWUSER($projleader->uid()); # # Check to make sure that the head user is 'unapproved' or 'active' # $headstatus = $projleader->status(); if (!strcmp($headstatus,TBDB_USERSTATUS_UNAPPROVED) || !strcmp($headstatus,TBDB_USERSTATUS_ACTIVE)) { $approvable = 1; } else { $approvable = 0; } # # Now put up the menu choice along with a text box for an email message. # echo "

What would you like to do?

\n"; echo "\n"; echo "\n"; # # Allow the approver to change the projects head UID - gotta find everyone in # the default group, first # echo "\n"; # # Set the user interface. # echo "\n"; # # XXX # Temporary Plab hack. # See if remote nodes requested and put up checkboxes to allow override. # $query_result = DBQueryFatal("select num_pcplab,num_ron from projects where pid='$pid'"); $row = mysql_fetch_array($query_result); # These are now booleans, not actual counts. $num_pcplab = $row[num_pcplab]; $num_ron = $row[num_ron]; if ($num_ron || $num_pcplab) { echo "\n"; } echo "\n"; echo "\n"; echo "
"; if (!$approvable) { echo "
WARNING: Project cannot be approved,"; echo" since head user has not been verified"; } echo "
Silent (no email sent for deny,destroy)
Head UID:
Default User Interface:
\n"; if ($num_pcplab) { echo " Allow Plab  \n"; } if ($num_ron) { echo " Allow RON (PCWA)  \n"; } echo "
Use the text box (70 columns wide) to add a message to the email notification.
\n"; # # Standard Testbed Footer # PAGEFOOTER(); ?>