// of PHP as specified by {@link CC_FB_PHP_VERSION}. if (!version_compare(PHP_VERSION, CC_FB_PHP_VERSION, '>=')) { printMessage('Invalid PHP Version', "We're sorry but CoffeeCup Form Builder requires PHP version " . CC_FB_PHP_VERSION . ' or greater. Please contact your server ' . 'administrator.'); } // Strip slashes if the server has magic quotes enabled. if (get_magic_quotes_gpc()) { $_POST = array_map("stripslashes", $_POST); } // John will need to fix this in the swf file. foreach ($_POST as $key => $value) { $_POST[str_replace('_', ' ', $key)] = $value; } // If the '$_FILES['Filedata']' is populated, process the // file upload. if (isset($_FILES['Filedata'])) { processFileUpload(); } elseif (is_array($_POST) && count($_POST) > 0) { processMailForm(); } // If all else fails, print out a blank page with version // numbers and release dates. printMessage(); /** * Process the mail form results. * * This method is in charge of processing the mail form which * is posted from the CoffeeCup Flash Form Builder SWF. This * process includes: * * - Retrieving the preferences from the included CoffeeCup Flash * Form Builder XML preferences file.
echo $GLOBALS['upload_path']; echo "\n"; } grammafone_connect(); if (logTheUserIn($username, $password) == true) { switch ($modeRequired) { case "IS_IT_A_DUPLICATE": if (isTheFileAlreadyUploaded(basename($_POST['audioFileName'])) == true) { echo "true"; } else { echo "false"; } break; case "FILE_UPLOAD": if (isTheFileAlreadyUploaded(basename($_FILES['audioFile']['name'])) == false) { if (processFileUpload() == true) { echo $SUCCESS_CODE_PASS; } else { echo $ERROR_CODE_UPLOAD_FAILED; } } else { echo $ERROR_CODE_DUPLICATE_FILE; } break; default: echo $ERROR_CODE_INVALID_MODE; break; } } else { echo $ERROR_CODE_AUTHENTICATION_FAILED; }