'."\n"; echo "
This page is for submitting new applications to be added to this\n"; echo "database. The application will be reviewed by the AppDB Administrator\n"; echo "and you will be notified via email if this application will be added to\n"; echo "the database.
\n"; echo "Please don't forget to mention which Wine version you used, how well it worked\n"; echo "and if any workaround were needed. Having app descriptions just sponsoring the app\n"; echo "(Yes, some vendors want to use the appdb for this) or saying \"I haven't tried this app with Wine\" "; echo "won't help Wine development or Wine users.
\n"; echo "Please only submit applications/versions that you have tested.\n"; echo "Submissions without testing information or not using the provided template will be rejected.\n"; echo "If you can't see the in-browser editors below please try Firefox, Mozilla or Opera browsers.\n"; echo "After your application has been added you'll be able to submit screenshots for it, post"; echo " messages in its forums or become a maintainer to help others trying to run the application.
"; } //deny access if not logged on if(!$_SESSION['current']->isLoggedIn()) { errorpage("Insufficient privilages to create application. Are you sure you are logged in"); exit; } if ($_REQUEST['sub']) { if($_REQUEST['apptype'] == 'application') { $oApp = new Application($_REQUEST['appId']); if($oApp->iAppId) { // if we are processing a queued application there MUST be an implicitly queued // version to go along with it. Find this version so we can display its information // during application processing so the admin can make a better choice about // whether to accept or reject the overall application $sQuery = "Select versionId from appVersion where appId='".$_REQUEST['appId']."';"; $hResult = query_appdb($sQuery); $oRow = mysql_fetch_object($hResult); // make sure the user has permission to view this version if(!$_SESSION['current']->hasPriv("admin") && (($oApp->queued=="false")?true:false) && !$_SESSION['current']->isVersionSubmitter($oApp->AppId)) { errorpage("Insufficient privileges."); exit; } $oVersion = new Version($oRow->versionId); } else { $oVersion = new Version(); } } else if($_REQUEST['apptype'] == 'version') { $oVersion = new Version($_REQUEST['versionId']); // make sure the user has permission to view this version if(!$_SESSION['current']->hasAppVersionModifyPermission($oVersion) && (($oVersion->queued=="false")?true:false) && !$_SESSION['current']->isVersionSubmitter($oVersion->versionId)) { errorpage("Insufficient privileges."); exit; } } else { //error no Id! addmsg("Application Not Found!", "red"); redirect($_SERVER['PHP_SELF']); } // Get the Testing results if they exist $sQuery = "Select testingId from testResults where versionId='".$oVersion->iVersionId."';"; $hResult = query_appdb($sQuery); if($hResult) { $oRow = mysql_fetch_object($hResult); $oTest = new testdata($oRow->testingId); } else { $oTest = new testResult(); } //process according to sub flag if ($_REQUEST['sub'] == 'Submit') { $errors = ""; $oVersion = new Version($_REQUEST['versionId']); $oTest = new testData($_REQUEST['iTestingId']); $errors .= $oVersion->CheckOutputEditorInput(); $errors .= $oTest->CheckOutputEditorInput(); $oVersion->GetOutputEditorValues(); $oTest->GetOutputEditorValues(); if ($_REQUEST['apptype'] == "application") // application { $oApp = new Application($_REQUEST['appId']); $errors .= $oApp->CheckOutputEditorInput(); $oApp->GetOutputEditorValues(); // load the values from $_REQUEST if(empty($errors)) { if($_REQUEST['appVendorName']) { $_REQUEST['vendorId']=""; //FIXME: fix this when we fix vendor submission if($_SESSION['current']->hasPriv("admin")) { $oVendor = new Vendor(); $oVendor->create($_REQUEST['appVendorName'],$_REQUEST['appWebpage']); } } //FIXME: remove this when we fix vendor submission $oApp->sKeywords = $_REQUEST['appKeywords']." *** ".$_REQUEST['appVendorName']; if(is_numeric($oApp->iAppId)) { $oApp->update(); $oApp->ReQueue(); } else { $oApp->create(); } $oVersion->iAppId = $oApp->iAppId; } } if(!empty($errors)) { addmsg("we've got Errors???:".$errors.":"); $_REQUEST['sub'] = 'view'; } else { if(is_numeric($oVersion->iVersionId)) { $oVersion->update(); $oVersion->ReQueue(); } else { $oVersion->create(); } if(!$_REQUEST['iDistributionId']) { $sDistribution = trim($_REQUEST['sDistribution']); if(!empty($sDistribution)) { $oDistribution = new distribution(); $oDistribution->sName = $sDistribution; $oDistribution->create(); $oTest->iDistributionId = $oDistribution->iDistributionId; } } $oTest->iVersionId = $oVersion->iVersionId; if(is_numeric($oTest->iTestingId)) { $oTest->update(true); $oTest->ReQueue(); } else { $oTest->create(); } redirect($_SERVER['PHP_SELF']); } } if ($_REQUEST['sub'] == 'Delete') { if (($_REQUEST['apptype'] == "application") && is_numeric($_REQUEST['appId'])) // application { // get the queued versions that refers to the application entry we just removed // and delete them as we implicitly added a version entry when adding a new application $sQuery = "SELECT versionId FROM appVersion WHERE appVersion.appId = '".$_REQUEST['appId']."' AND appVersion.queued = 'rejected';"; $hResult = query_appdb($sQuery); if($hResult) { while($oRow = mysql_fetch_object($hResult)) { $oVersion = new Version($oRow->versionId); $oVersion->delete(); } } // delete the application entry $oApp = new Application($_REQUEST['appId']); $oApp->delete(); } else if(($_REQUEST['apptype'] == "version") && is_numeric($_REQUEST['versionId'])) // version { $oVersion = new Version($_REQUEST['versionId']); $oVersion->delete(); } redirect($_SERVER['PHP_SELF']); } if ($_REQUEST['sub'] == 'view') { $x = new TableVE("view"); apidb_header("Application Queue"); echo '',"\n"; echo html_back_link(1, $_SERVER['PHP_SELF']); echo html_frame_end(" "); apidb_footer(); } else { // error no sub! addmsg("Internal Routine Not Found!!", "red"); redirect($_SERVER['PHP_SELF']); } } else // if ($_REQUEST['sub']) is not defined, display the main app queue page { apidb_header("Resubmit application"); // get queued apps that the current user should see $hResult = $_SESSION['current']->getAppRejectQueueQuery(true); // query for the app family if(!$hResult || !mysql_num_rows($hResult)) { //no apps in queue echo html_frame_start("Application Queue","90%"); echo 'The Resubmit Application Queue is empty.
',"\n"; echo html_frame_end(" "); } else { //help echo "| \n\n";
echo " This is the list of applications waiting for re-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 . |
The Resubmit Version Queue is empty.
',"\n"; echo html_frame_end(" "); } else { //help echo "| \n\n";
echo " This is the list of versions 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 . Note that versions linked to application that have not been yet approved are not displayed in this list. \n"; echo "the AppDB.\n"; echo " |