=\"$languageslist[$i]\" "; if($languageslist[$i]==$alanguage) echo "selected"; echo ">".ucfirst($languageslist[$i])."\n"; } } echo ""; } If($advanced_editor==1) { echo "

"._STORYTEXT.":
" ."
" ."
"._EXTENDEDTEXT.":
" ."
" ."("._AREYOUSURE.")

" ."" .""._HTMLNOTALLOWED."" ."

" ."  " .""; } else { echo "

"._STORYTEXT.": ("._HTMLISFINE.")
" ."
" ."
"._EXTENDEDTEXT.":
" ."
" ."("._AREYOUSURE.")

" .""._ALLOWEDHTML."
"; while (list($key,) = each($AllowableHTML)) echo " <".$key.">"; echo "

" ."  " ."  " ."" .""; } CloseTable(); include ('footer.php'); } function submitStory($name, $address, $subject, $story, $storyext, $topic, $alanguage, $posttype) { global $user, $EditedMessage, $cookie, $anonymous, $notify, $notify_email, $notify_subject, $notify_message, $notify_from, $prefix, $db, $advanced_editor; if (is_user($user)) { cookiedecode($user); $uid = $cookie[0]; $name = $cookie[1]; } else { $uid = 1; $name = "$anonymous"; } $subject = ereg_replace("\"", "''", $subject); $subject = FixQuotes(filter_text($subject, "nohtml")); If($advanced_editor==1) { $story = stripslashes(FixQuotes($story)); $storyext = stripslashes(FixQuotes($storyext)); } else { if($posttype=="exttrans") { $story = FixQuotes(nl2br(htmlspecialchars(check_words($story)))); $storyext = FixQuotes(nl2br(htmlspecialchars(check_words($storyext)))); } elseif($posttype=="plaintext") { $story = FixQuotes(nl2br(filter_text($story))); $storyext = FixQuotes(nl2br(filter_text($storyext))); } else { $story = FixQuotes(filter_text($story)); $storyext = FixQuotes(filter_text($storyext)); } } $result = $db->sql_query("INSERT INTO ".$prefix."_queue VALUES (NULL, '$uid', '$name', '$subject', '$story', '$storyext', now(), '$topic', '$alanguage')"); if(!$result) { echo ""._ERROR."
"; exit(); } if($notify) { $notify_message = "$notify_message\n\n\n========================================================\n$subject\n\n\n$story\n\n$storyext\n\n$name"; mail($notify_email, $notify_subject, $notify_message, "From: $notify_from\nX-Mailer: PHP/" . phpversion()); } include ('header.php'); OpenTable(); $waiting = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_queue")); echo "
"._SUBSENT."

" .""._THANKSSUB."

" .""._SUBTEXT."" ."
"._WEHAVESUB." $waiting "._WAITING.""; CloseTable(); include ('footer.php'); } switch($op) { case ""._PREVIEW."": PreviewStory($name, $address, $subject, $story, $storyext, $topic, $alanguage, $posttype); break; case ""._OK."": SubmitStory($name, $address, $subject, $story, $storyext, $topic, $alanguage, $posttype); break; default: defaultDisplay(); break; } ?>