hasPriv("admin")) { util_show_error_page("Insufficient privileges."); exit; } if ($aClean['sSub']) { if ($aClean['iQueueId']) { //get data $sQuery = "SELECT queueId, appId, versionId,". "userId, maintainReason, superMaintainer,". "UNIX_TIMESTAMP(submitTime) as submitTime ". "FROM appMaintainerQueue WHERE queueId = '?'"; $hResult = query_parameters($sQuery, $aClean['iQueueId']); $oRow = mysql_fetch_object($hResult); $oUser = new User($oRow->userId); mysql_free_result($hResult); } else { //error no Id! util_show_error_page("
QueueId Not Found!
"); } //process according to which request was submitted and optionally the sub flag if (!$aClean['sAdd'] && !$aClean['sReject'] && $aClean['iQueueId']) { apidb_header("Admin Maintainer Queue"); echo '"; apidb_footer(); exit; } else if ($aClean['sAdd'] && $aClean['iQueueId']) { /* create a new user object for the maintainer */ $maintainerUser = new User($oRow->userId); /* add the user as a maintainer and return the statusMessage */ $statusMessage = $maintainerUser->addAsMaintainer($oRow->appId, $oRow->versionId, $oRow->superMaintainer, $aClean['iQueueId']); //done addmsg("$statusMessage
", 'green'); } else if (($aClean['sReject'] || ($aClean['sSub'] == 'sReject')) && $aClean['iQueueId']) { $sEmail = $oUser->sEmail; if ($sEmail) { $oApp = new Application($oRow->appId); $oVersion = new Version($oRow->versionId); $sSubject = "Application Maintainer Request Report"; $sMsg = "Your application to be the maintainer of ".$oApp->sName." ".$oVersion->sName." was rejected. "; $sMsg .= $aClean['sReplyText']; $sMsg .= ""; $sMsg .= "-The AppDB admins\n"; mail_appdb($sEmail, $sSubject ,$sMsg); } //delete main item $sQuery = "DELETE from appMaintainerQueue where queueId = '?'"; $hResult = query_parameters($sQuery, $aClean['iQueueId']); if(!$hResult) addmsg("unable to delete selected maintainer application", "red"); echo html_frame_start("Delete maintainer application",400,"",0); if($hResult) { //success echo "Maintainer application was successfully deleted from the Queue.
\n"; } echo html_frame_end(" "); echo html_back_link(1,'adminMaintainerQueue.php'); } else { //error no sub! addmsg('Internal Routine Not Found!
', 'red'); } } /* display the list of all outstanding maintainer requests */ { apidb_header("Admin Maintainer Queue"); echo '"; apidb_footer(); } } ?>