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 "

\n\n"; //show applist echo html_frame_start("","90%","",0); echo "\n\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "\n\n"; $c = 1; while($ob = mysql_fetch_object($hResult)) { if($_SESSION['current']->is_maintainer($ob->queueappId, $ob->queueversionId) || havepriv("admin")) { if ($c % 2 == 1) { $bgcolor = 'color0'; } else { $bgcolor = 'color1'; } echo "\n"; echo " \n"; echo " \n"; if($ob->userId) echo " \n"; else echo " \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n\n"; $c++; } } echo "
Submission DateQueue IdName (e-mail)Application NameVersionType
".date("Y-n-t h:i:sa", $ob->submitTime)."  ".$ob->queueId."".lookupRealname($ob->userId)." (".lookupEmail($ob->userId).")Anonymous".appIdToName($ob->appId)."".versionIdToName($ob->versionId)."".$ob->type."
\n\n"; echo html_frame_end(" "); } } else // shows a particular appdata { if(!(havepriv("admin") || $_SESSION['current']->is_maintainer($obj_row->queueAppId, $obj_row->queueVersionId))) { errorpage("You don't have sufficient privileges to use this page."); exit; } $sQuery="SELECT * FROM appDataQueue WHERE queueId='".$_REQUEST['queueId']."'"; $hResult=query_appdb($sQuery); $obj_row=mysql_fetch_object($hResult); if(!$_REQUEST['sub']=="inside_form") { echo '
',"\n"; // help echo "
\n\n"; echo "Please enter an accurate and personalized reply anytime a submitted scrrenshot is rejected.\n"; echo "It is not polite to reject someones attempt at trying to help out without explaining why.\n"; echo "
\n\n"; // view application details echo html_frame_start("New Application Data Form",600,"",0); echo "\n"; // app name echo '',"\n"; echo "\n"; // version echo '',"\n"; echo "\n"; //dataDescription echo '',"\n"; echo '',"\n"; //data if($obj_row->type == "image") { echo '',"\n"; echo '',"\n"; } elseif($obj_row->type == "url") { echo '',"\n"; echo '',"\n"; } //email response echo '',"\n"; echo "\n"; /* Add button */ echo '',"\n"; /* Reject button */ echo '',"\n"; echo '
App Name".appIdToName($obj_row->appId)."
App Version".versionIdToName($obj_row->versionId)."
Description
Submited image'; $imgSRC = ''; // generate random tag for popup window $randName = generate_passwd(5); // set image link based on user pref $img = ''.$imgSRC.''; if (loggedin()) { if ($_SESSION['current']->getpref("window:screenshot") == "no") { $img = ''.$imgSRC.''; } } echo $img; echo '
Submitted link
Email reply
' ,"\n"; echo '
' ,"\n"; echo '
',"\n"; echo '',"\n"; echo '',"\n"; echo '
'; } elseif ($_REQUEST['add']) // we accepted the request { $statusMessage = ""; $goodtogo = 0; if($obj_row->type == "image") { $sQuery = "INSERT INTO appData VALUES (null, ".$obj_row->appId.", ".$obj_row->versionId.", 'image', ". "'".addslashes($_REQUEST['description'])."', '')"; query_appdb($sQuery); $int_id = mysql_insert_id(); // we move the content in the live directory rename("../data/queued/screenshots/".$obj_row->queueId, "../data/screenshots/".$int_id); // we have to update the entry now that we know its name $sQuery = "UPDATE appData SET url = '".$int_id."' WHERE id = '".$int_id."'"; } elseif ($obj_row->type == "url") { $query = "INSERT INTO appData VALUES (null, ".$obj_row->appId.", ".$obj_row->versionId.", 'url', ". "'".addslashes($_REQUEST['description'])."', '".$obj_row->url."')"; } if(debugging()) addmsg("

query: $query

","green"); if (query_appdb($sQuery)) { $statusMessage = "

The application data was successfully added into the database

\n"; //delete the item from the queue query_appdb("DELETE from appDataQueue where queueId = ".$obj_row->queueId.";"); //Send Status Email if (lookupEmail($obj_row->userId)) { $ms = "Application Data Request Report\n"; $ms .= "----------------------------------\n\n"; $ms .= "Your submission of an application data for ".appIdToName($obj_row->appId).versionIdToName($obj_row->versionId)." has been accepted. "; $ms .= $_REQUEST['replyText']; $ms .= "We appreciate your help in making the Application Database better for all users.\n\n"; $ms .= "Thanks!\n"; $ms .= "-The AppDB admins\n"; mail(stripslashes(lookupEmail($obj_row->userId)),'[AppDB] Application Data Request Report',$ms); } //done echo html_frame_start("Submit App Data","600"); echo "

$statusMessage

\n"; } } elseif ($_REQUEST['reject']) { if (lookupEmail($obj_row->userId)) { $ms = "Application Data Request Report\n"; $ms .= "----------------------------------\n\n"; $ms .= "Your submission of an application data for ".appIdToName($obj_row->appId).versionIdToName($obj_row->versionId)." was rejected. "; $ms .= $_REQUEST['replyText']; $ms .= ""; $ms .= "-The AppDB admins\n"; mail(stripslashes(lookupEmail($obj_row->userId)),'[AppDB] Application Data Request Report',$ms); } //delete main item $sQuery = "DELETE from appDataQueue where queueId = ".$obj_row->queueId.";"; unlink("../data/queued/screenshots/".$obj_row->queueId); $hResult = query_appdb($sQuery); echo html_frame_start("Delete application data submission",400,"",0); if($result) { //success echo "

Application data was successfully deleted from the Queue.

\n"; } } } echo html_frame_end(" "); echo html_back_link(1,'adminAppDataQueue.php'); apidb_footer(); ?>