iVersionId); if(!($_SESSION['current']->hasAppVersionModifyPermission($oVersion))) util_show_error_page("Insufficient privileges."); if(($aClean['sSub'] == 'Submit') || ($aClean['sSub'] == 'Save') || ($aClean['sSub'] == 'Reject') || ($aClean['sSub'] == 'Delete')) { if(is_numeric($aClean['iTestingId'])) { $oTest = new testData($aClean['iTestingId']); $oTest->GetOutputEditorValues(); if($aClean['sSub'] == 'Submit') // submit the testing results { $oTest->update(true); $oTest->unQueue(); } else if($aClean['sSub'] == 'Save') // save the testing results { $oTest->update(); } else if($aClean['sSub'] == 'Reject') // reject testing results { $oTest->update(true); $oTest->Reject(); } else if($aClean['sSub'] == 'Delete') // delete testing results { $oTest->delete(); } redirect($_SERVER['PHP_SELF']); } } if(is_numeric($aClean['iTestingId'])) { $oTest = new testData($aClean['iTestingId']); } $oVersion = new Version($oTest->iVersionId); $oApp = new application($oVersion->iAppId); $sVersionInfo = $oApp->sName." ".$oVersion->sName; if ($aClean['sSub'] == 'view') { switch($oTest->sQueued) { case "true": apidb_header("Edit new testing results for ".$sVersionInfo); break; case "rejected": apidb_header("Edit rejected testing results for ".$sVersionInfo); break; case "false": apidb_header("Edit testing results for ".$sVersionInfo); break; } echo '
',"\n"; // View Testing Details echo "\n"; //help echo "
\n\n"; switch($oTest->sQueued) { case "false": echo "

This Testing result has already been verified and accepted int the database. \n"; echo "You can edit the entry and the save it back to the database by clicking on save. \n"; break; case "true": echo "

This Testing result has not yet been and accepted into the database. \n"; echo "You can edit the entry and ether submit it into the database by clicking on Submit or you can reject it \n"; echo "for further editing by the submitter by clicking on Reject. \n"; break; case "rejected": echo "

This Testing result has been rejected and is awaiting further information from the submitter. \n"; echo "You can edit the entry and ether submit it into the database by clicking on Submit or you can save it \n"; echo "for further editing by the submitter by clicking on Save. \n"; break; } echo "

Click delete to remove it entirly from the database. An email will automatically be sent to the\n"; echo "submitter to let them know the item was deleted.

\n\n"; echo "
\n\n"; $oTest->OutputEditor(); echo html_frame_start("Reply text", "90%", "", 0); echo "\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '
email Text
' ,"\n"; // Submit Buttons switch($oTest->sQueued) { case "false": echo ' ',"\n"; echo '',"\n"; break; case "true": echo ' ',"\n"; echo ' ',"\n"; echo '',"\n"; break; case "rejected": echo ' ',"\n"; echo ' ',"\n"; echo '',"\n"; break; } echo '
',"\n"; echo '
',"\n"; echo html_frame_end(); echo 'Back'; } else { // error no sub! addmsg("Internal Routine Not Found!!", "red"); redirect($_SERVER['PHP_SELF']); } } else // if ($aClean['sSub']) is not defined, display the Testing results queue page { $oTest = new TestData(); apidb_header("Testing Results"); // Get queued testing results. $hResult = $oTest->getTestingQueue("true"); if(!$hResult) { //no apps in queue echo html_frame_start("Submitted Testing Results","90%"); echo '

The Submitted Testing Results Queue is empty.

',"\n"; echo html_frame_end(" "); } else { //help echo "
\n\n"; echo "

This is the list of test results waiting for submition, rejection or deletion.

\n"; echo "

To view a submission, click on its name. From that page you can Submit it into \n"; echo "the AppDB reject it or delete it.
\n"; echo "

\n\n"; $oTest->ShowListofTests($hResult,"Submitted Testing Results"); } // Get rejected testing results. $hResult = $oTest->getTestingQueue("rejected"); if(!$hResult || !mysql_num_rows($hResult)) { //no rejected test results in queue echo html_frame_start("Rejected Testing Results","90%"); echo '

The Rejected Testing Results Queue is empty.

',"\n"; echo html_frame_end(" "); } else { //help echo "
\n\n"; echo "

This is the list of test results that have been rejected for some reason.

\n"; echo "

To view a submission, click on its name. From that page you can Submit it into \n"; echo "the AppDB, edit and save it or delete it.
\n"; echo "

\n\n"; $oTest->ShowListofTests($hResult,"Rejected Testing Results"); } } apidb_footer(); ?>