hasPriv("admin") && !$_SESSION['current']->isMaintainer()) { util_show_error_page("Insufficient privileges."); exit; } // shows the list of appdata in queue if (!$aClean['id']) { apidb_header("Admin Application Data Queue"); /* retrieve the queued apps */ $hResult = $_SESSION['current']->getAppDataQuery("*", false, true); if(!$hResult || !mysql_num_rows($hResult)) { // no appData in queue echo html_frame_start("","90%"); echo '
The App Data Queue is empty.
',"\n"; echo 'There is nothing for you to do. Check back later.
',"\n"; echo html_frame_end(" "); } else { //help echo "| \n\n";
echo " This is a list of application data submitted by users.\n"; echo "Please inspect carefully this data before accepting it.\n"; echo " |
| Submission Date | \n"; echo "Submitter | \n"; echo "Application | \n"; echo "Version | \n"; echo "Type | \n"; echo "Action | \n"; echo "
| ".print_date(mysqltimestamp_to_unixtimestamp($ob->submitTime))." | \n"; $oUser = new User($ob->submitterId); echo ""; echo $oUser->sEmail ? "sEmail."\">":""; echo $oUser->sRealname; echo $oUser->sEmail ? "":""; echo " | \n"; echo "".Application::lookup_name($ob->appId)." | \n"; echo "".Version::lookup_name($ob->versionId)." | \n"; echo "".$ob->type." | \n"; echo "[process] | \n"; echo "
The application data was successfully added into the database
\n"; //delete the item from the queue query_parameters("DELETE from appData where id = '?'", $obj_row->id); //Send Status Email $oUser = new User($obj_row->userId); if ($oUser->sEmail) { $sSubject = "Application Data Request Report"; $sMsg = "Your submission of an application data for ".Application::lookup_name($obj_row->appId).Version::lookup_name($obj_row->versionId)." has been accepted. "; $sMsg .= $aClean['replyText']; $sMsg .= "We appreciate your help in making the Application Database better for all users.\r\n"; mail_appdb($oUser->sEmail, $sSubject ,$sMsg); } } } redirect(apidb_fullurl("admin/adminAppDataQueue.php")); } elseif ($aClean['reject']) { if($obj_row->type == "image") { $oScreenshot = new Screenshot($obj_row->id); $oScreenshot->delete(); } elseif ($obj_row->type == "url") { // FIXME: use Link class $oUser = new User($obj_row->userId); if ($oUser->sEmail) { $sSubject = "Application Data Request Report"; $sMsg = "Your submission of an application data for ".Application::lookup_name($obj_row->appId).Version::lookup_name($obj_row->versionId)." was rejected. "; $sMsg .= $aClean['replyText']; mail_appdb($oUser->sEmail, $sSubject ,$sMsg); } //delete main item if($_SESSION['current']->deleteAppData($obj_row->id)) { //success echo "Application data was successfully deleted from the Queue.
\n"; } } redirect(apidb_fullurl("admin/adminAppDataQueue.php")); } } echo html_frame_end(" "); echo html_back_link(1,'adminAppDataQueue.php'); apidb_footer(); ?>