$result = get_post_data(TRUE, TRUE); extract($result[0], EXTR_OVERWRITE); if (isset($_POST['recaptcha_challenge_field']) && isset($_POST['recaptcha_response_field'])) { include_once('../lib/recaptchalib.inc.php'); $privatekey = config('RECAPTCHA_SECRET'); $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { $validate['captcha'] = 'The words you typed in the captcha were not correct. Please try again.'; include('./write.inc.php'); return; } } echo '
Please review your submission. Once you\'ve finished, please click "Submit" at the bottom of the page, or click "Preview" to check it again.
'; if (is_uploaded_file($_FILES['upload']['tmp_name']) && !isset($validate['upload'])) { $tmp_file = $_FILES['upload']['tmp_name']; $upload = getimagesize($tmp_file); $new_file = $_SERVER['DOCUMENT_ROOT'] . "/graphics" . $tmp_file; move_uploaded_file($tmp_file, $new_file); $file_src = "/graphics" .$tmp_file; } else if (isset($uploaded) && is_file($_SERVER['DOCUMENT_ROOT'] . $uploaded) && !$remove_img) { $file_src = $uploaded; } echo display_stories(); echo "