Initial commit.

This commit is contained in:
tim
2013-05-17 23:38:44 +02:00
commit 7fc40728f5
1334 changed files with 164883 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
<?
$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 '<p>Please review your submission. Once you\'ve finished, please click "Submit" at the bottom of the page, or click "Preview" to check it again.</p>';
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 "<br /><br />\n";
include('./write.inc.php');
return;
?>