Approve New Projects List

\n"; # # Of course verify that this uid has admin privs! # $isadmin = ISADMIN($uid); if (! $isadmin) { USERERROR("You do not have admin privledges to approve projects!", 1); } # # Look in the projects table to see which projects have not been approved. # Present a menu of options to either approve or deny the projects. # Approving a project implies approving the project leader. Denying a project # implies denying the project leader account, when there is just a single # project pending for that project leader. # $query_result = mysql_db_query($TBDBNAME, "SELECT * from projects where approved='0'"); if (! $query_result) { $err = mysql_error(); TBERROR("Database Error getting unapproved project list: $err\n", 1); } if (mysql_num_rows($query_result) == 0) { USERERROR("There are no projects to approve!", 1); } echo "Below is the list of projects waiting for approval or denial. Click on a particular project to act on it, and you will be zapped to a page with more information about the project, and your options menu.

\n"; echo "\n"; echo "\n"; while ($projectrow = mysql_fetch_array($query_result)) { $pid = $projectrow[pid]; $headuid = $projectrow[head_uid]; $Purl = $projectrow[URL]; $Pname = $projectrow[name]; $Paffil = $projectrow[affil]; $userinfo_result = mysql_db_query($TBDBNAME, "SELECT * from users where uid=\"$headuid\""); $row = mysql_fetch_array($userinfo_result); $name = $row[usr_name]; $email = $row[usr_email]; $title = $row[usr_title]; $affil = $row[usr_affil]; $addr = $row[usr_addr]; $addr2 = $row[usr_addr2]; $city = $row[usr_city]; $state = $row[usr_state]; $zip = $row[usr_zip]; $phone = $row[usr_phone]; echo "\n"; echo "\n"; } echo "
Act Project Info User User Name Title E-mail
Proj Name User Affil Phone
\"o\" $pid $headuid $name $title $email
$Pname $affil $phone
\n"; # # Standard Testbed Footer # PAGEFOOTER(); ?>