Files
xxx/publish/preview.inc.php
T

28 lines
1.0 KiB
PHP

<?php
$result = get_post_data(TRUE);
extract($result[0], EXTR_OVERWRITE);
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>';
// Keep a new image outside the web root until the story is saved;
// display.php shows it to this session only. A request that failed the
// captcha or the form token keeps nothing.
if (!isset($validate['upload']) && !isset($validate['captcha']) && !isset($validate['csrf']) &&
is_string($_FILES['upload']['tmp_name'] ?? '') && is_uploaded_file($_FILES['upload']['tmp_name'] ?? '')) {
if (store_upload($_FILES['upload']['tmp_name']))
$file_src = pending_upload_url();
else
$validate['upload'] = 'The site cannot keep more images just now. Please try again later.';
} else if (isset($uploaded) && $uploaded === 'pending' && pending_upload() && !$remove_img) {
$file_src = pending_upload_url();
}
echo display_stories();
echo "<br /><br />\n";
include('./write.inc.php');
return;
?>