iVersionId = $aClean['iVersionId']; $errors = ""; // Submit or Resubmit the new testing results if (($aClean['sSub'] == 'Submit') || ($aClean['sSub'] == 'Resubmit')) { $errors = $oTest->CheckOutputEditorInput($_REQUEST); $oTest->GetOutputEditorValues($_REQUEST); // retrieve the values from the current $_REQUEST if(empty($errors)) { if(!$aClean['iDistributionId']) { if(!empty($aClean['sDistribution']) ) { $oDistribution = new distribution(); $oDistribution->sName = $aClean['sDistribution']; $oDistribution->create(); $oTest->iDistributionId = $oDistribution->iDistributionId; } } if($aClean['sSub'] == 'Submit') { $oTest->create(); } else if($aClean['sSub'] == 'Resubmit') { $oTest->update(true); $oTest->ReQueue(); } util_redirect_and_exit($_SERVER['PHP_SELF']); } else { $aClean['sSub'] = 'view'; } } // Delete testing results if ($aClean['sSub'] == 'Delete') { if(is_numeric($aClean['iTestingId'])) { $oTest = new testData($aClean['iTestingId']); $oTest->delete(); } util_redirect_and_exit($_SERVER['PHP_SELF']); } // is this an old test? if(is_numeric($aClean['iTestingId'])) { // make sure the user has permission to view this testing result $oVersion = new Version($oTest->iVersionId); if(!$_SESSION['current']->hasPriv("admin") && !$_SESSION['current']->hasAppVersionModifyPermission($oVersion)&& !(($_SESSION['current']->iUserId == $oTest->iSubmitterId) && !($oTest->sQueued == 'false'))) { util_show_error_page_and_exit("Insufficient privileges."); } else $oVersion = new version($oTest->iVersionId); } else { $oTest->iVersionId = $aClean['iVersionId']; $oVersion = new version($aClean['iVersionId']); $oTest->sQueued = "new"; } if ($aClean['sSub'] == 'view') { $oApp = new application($oVersion->iAppId); $sVersionInfo = $oApp->sName." ".$oVersion->sName; switch($oTest->sQueued) { case "new": apidb_header("Submit new testing results for ".$sVersionInfo); $oTest->sTestedDate = date('Y-m-d H:i:s'); break; case "true": apidb_header("Edit new testing results for ".$sVersionInfo); break; case "rejected": apidb_header("Resubmit testing results for ".$sVersionInfo); break; case "False": apidb_header("Edit testing results for ".$sVersionInfo); break; default: apidb_header("Edit testing results for "); } echo '
',"\n"; //help echo "

This is the Screen for inputting testing information so that others looking at the database will know \n"; echo "what was working or a particular release of Wine.

\n"; echo "

Please be as detailed as you can.

\n"; echo "

If you can not find your distribution on the list of existing Distributions please add it add it in the \n"; echo "field provided.

\n\n"; if(!empty($errors)) { echo '',"\n"; echo '

We found the following errors:

Please correct them.'; echo '

',"\n"; echo '

',"\n"; } // View Testing Details $oTest->OutputEditor($aClean['sDistribution'],true); echo 'Back to Version'; echo '',"\n"; // Submit Buttons switch($oTest->sQueued) { case "new": echo ' ',"\n"; break; case "true": case "rejected": case "False": echo ' ',"\n"; echo '',"\n"; break; } echo '',"\n"; echo "
"; echo html_frame_end(" "); } else { // error no sub! addmsg("Internal Routine Not Found!!", "red"); util_redirect_and_exit($_SERVER['PHP_SELF']); } } else // if ($aClean['sSub']) is not defined, display the Testing results queue page { apidb_header("Testing Results"); // Get queued testing results. $oTest = new TestData(); $hResult = $oTest->getTestingQueue("true"); if(!$hResult) { // no Tests 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, or to be deleted.

\n"; echo "

To view a submission, click on its name. From that page you can delete or edit and\n"; echo "re-submit it into the AppDB .
\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 Test Results in queue echo html_frame_start("Rejected Testing Results","90%"); echo '

The Rejected Testng Results Queue is empty.

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

This is the list of Rejected Test Results waiting for re-submition or deletion.

\n"; echo "

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

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