isLoggedIn()) { // you must be logged in to submit app apidb_header("Please login"); echo "To submit an application to the database you must be logged in. Please login now or create a new account.","\n"; exit; } /* * User submitted an application */ if (isset($_REQUEST['appName'])) { $errors = ""; // Check input and exit if we found errors $oApplication = new Application(); $errors .= $oApplication->CheckOutputEditorInput(); $oVersion = new Version(); $errors .= $oVersion->CheckOutputEditorInput(); 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']); } } $oApplication->GetOutputEditorValues(); /* load the values from $_REQUEST */ //FIXME: remove this when we fix vendor submission $oApplication->sKeywords = $_REQUEST['appKeywords']." *** ".$_REQUEST['appVendorName']; $oApplication->create(); $oVersion->GetOutputEditorValues(); $oVersion->iAppId = $oApplication->iAppId; /* get the iAppId from the application that was just created */ $oVersion->create(); redirect(apidb_fullurl("index.php")); } } /* * User submitted a version */ elseif (isset($_REQUEST['versionName']) && is_numeric($_REQUEST['appId'])) { // Check input and exit if we found errors $oVersion = new Version(); $errors = $oVersion->CheckOutputEditorInput(); if(empty($errors)) { $oVersion->GetOutputEditorValues(); $oVersion->create(); redirect(apidb_fullurl("index.php")); } } /* * User wants to submit an application or version */ if (isset($_REQUEST['apptype'])) { // header apidb_header("Submit Application"); // show add to queue form echo '
'."\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 "

Before continuing please check that you have:

\n"; echo "

"; 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.

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

We found the following errors:

Please correct them.'; echo '

',"\n"; echo '

',"\n"; } if($_REQUEST['apptype'] == 1 && (trim(strip_tags($_REQUEST['appDescription']))=="")) { $_REQUEST['appDescription'] = GetDefaultApplicationDescription(); } if(trim(strip_tags($_REQUEST['versionDescription']))=="") { $_REQUEST['versionDescription'] = GetDefaultVersionDescription(); } $oApp = new Application(); $oApp->GetOutputEditorValues(); /* retrieve the values from the current $_REQUEST */ $oVersion = new Version(); $oVersion->GetOutputEditorValues(); /* retrieve the values from the current $_REQUEST */ /* output the appropriate editors depending on whether we are processing an */ /* application and a version or just a version */ if($_REQUEST['apptype'] == 1) { $oApp->OutputEditor($_REQUEST['appVendorName']); } $oVersion->OutputEditor(false, false); /* don't let the user change the parent application, don't display the rating and distribution dropdowns */ echo '',"\n"; // new application and version if ($_REQUEST['apptype'] == 1) { echo '',"\n"; echo ' ',"\n"; } // new version else { echo '',"\n"; echo ' ',"\n"; } echo '',"\n"; echo "
"; } apidb_footer(); ?>