3D-Zone
"width=400px\">";
$handle=opendir('language');
while ($file = readdir($handle)) {
if (preg_match("/^lang\-(.+)\.php/", $file, $matches)) {
$langFound = $matches[1];
$languageslist .= "$langFound ";
}
}
closedir($handle);
$languageslist = explode(" ", $languageslist);
sort($languageslist);
for ($i=0; $i < sizeof($languageslist); $i++) {
if($languageslist[$i]!="") {
echo "\n";
}
}
echo "";
}
echo "| "._STORYTEXT.": | |
"
."| "._EXTENDEDTEXT.": | |
"
.""
." "
." ";
CloseTable();
include('footer.php');
}
function submitStory($author, $address, $subject, $story, $storyext, $topic, $alanguage, $posttype) {
global $user, $anonymous, $prefix, $db;
if (is_user($user)) {
$uname = explode(":", addslashes(base64_decode($user)));
$uid = intval($uname[0]);
} else {
$uid = 1;
}
$subject = ereg_replace("\"", "''", $subject);
$subject = FixQuotes(filter_text($subject, "nohtml"));
$author = stripslashes(FixQuotes($author));
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', '$author', '$subject', '$story', '$storyext', now(), '$topic', '$alanguage')");
$waiting = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_queue"));
include("header.php");
title(""._SUBMITNEWS."");
OpenTable();
echo ""._THANKSSUB."
"._SUBTEXT."
"._WEHAVESUB." $waiting "._WAITING."";
CloseTable();
include('footer.php');
}
switch($op) {
case ""._PREVIEW."":
PreviewStory($author, $address, $subject, $story, $storyext, $topic, $alanguage, $posttype);
break;
case ""._OK."":
SubmitStory($author, $address, $subject, $story, $storyext, $topic, $alanguage, $posttype);
break;
default:
defaultDisplay();
break;
}
?>