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; } // Check the input of a submitted form. And output with a list // of errors. () function checkInput($fields) { $errors = ""; if (strlen($fields['appName']) > 200 ) $errors .= "
  • Your application name is too long.
  • \n"; if (empty($fields['appName']) && !$fields['appId']) $errors .= "
  • Please enter an application name.
  • \n"; if (empty($fields['versionName'])) $errors .= "
  • Please enter an application version.
  • \n"; // No vendor entered, and nothing in the list is selected if (empty($fields['vendorName']) && !$fields['vendorId'] && !$fields['appId']) $errors .= "
  • Please enter a vendor.
  • \n"; if (empty($fields['appDescription']) && !$fields['appId']) $errors .= "
  • Please enter a description of your application.
  • \n"; if (empty($errors)) return ""; else return $errors; } /* * User submitted an application */ if (isset($_REQUEST['appName'])) { // Check input and exit if we found errors $errors = checkInput($_REQUEST); if(!empty($errors)) { errorpage("We found the following errors:","
    Please go back and correct them."); echo html_back_link(1); exit; } if($vendorName) $_REQUEST['vendorId']=""; $oApplication = new Application(); $oApplication->create($_REQUEST['appName'], $_REQUEST['appDescription'], $_REQUEST['keywords']." *** ".$_REQUEST['vendorName'], $_REQUEST['webpage'],$_REQUEST['vendorId'], $_REQUEST['catId']); $oVersion = new Version(); $oVersion->create($_REQUEST['versionName'], $_REQUEST['versionDescription'], null, null, $oApplication->iAppId); 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 $errors = checkInput($_REQUEST); if(!empty($errors)) { errorpage("We found the following errors:","
    Please go back and correct them."); echo html_back_link(1); exit; } $oVersion = new Version(); $oVersion->create($_REQUEST['versionName'], $_REQUEST['versionDescription'], null, null, $_REQUEST['appId']); redirect(apidb_fullurl("index.php")); } /* * User wants to submit an application or version */ elseif (isset($_REQUEST['apptype'])) { //FIXME: use absolute path in htmlarea_loader.js to avoid code duplication here ?> Enter description here

    "; $sVersionDescription = "

    This is a template; enter version-specific description here

    Wine compatibility
    What works:
    - settings
    - help

    What doesn't work:
    - erasing

    What was not tested:
    - burning

    Tested versions
    App. versionWine versionInstalls?Runs?Rating
    3.2320050111yesyesGold
    3.2320041201yesyesSilver
    3.2120040615yesyesBronze


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

    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 vendor 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 "

    After your application has been added you'll be able to submit screenshots for it.

    "; // new application and version if ($_REQUEST['apptype'] == 1) { echo html_frame_start("New Application Form",400,"",0); echo "\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; // app Category $w = new TableVE("view"); echo '',"\n"; echo '',"\n"; echo '',"\n"; // alt vendor $x = new TableVE("view"); echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '
    Application name
    Version name
    Category',"\n"; $w->make_option_list("catId","","appCategory","catId","catName"); echo '
    Vendor
     ',"\n"; $x->make_option_list("vendorId","","vendor","vendorId","vendorName"); echo '
    URL
    Keywords
    Application Description

    Version Description

    ',"\n"; echo '
    ',"\n"; echo html_frame_end(); echo "
    "; } // new version else { echo html_frame_start("New Version Form",400,"",0); echo "\n"; // app parent $x = new TableVE("view"); echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '',"\n"; echo '
    Application',"\n"; $x->make_option_list("appId",$_REQUEST['appId'],"appFamily","appId","appName"); echo '
    Version name
    Version description

    ',"\n"; echo '
    ',"\n"; echo html_frame_end(); echo ""; } } apidb_footer(); ?>