Помогите разобраться...
Код:
function PreviewStory($name, $address, $subject, $story, $storyext, $topic, $alanguage) {
global $user, $cookie, $bgcolor1, $bgcolor2, $anonymous, $prefix, $multilingual, $AllowableHTML, $db, $module_name, $nuke_editor;
include ('header.php');
$f_story = filter($story);
$f_storyext = filter($storyext);
$subject = filter($subject, nohtml, 0, preview);
$story2 = "$f_story<br><br>$f_storyext";
OpenTable();
echo "<center><font class=\"title\"><b>"._NEWSUBPREVIEW."</b></font>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><i>"._STORYLOOK."</i></center><br><br>";
echo "<table width=\"70%\" bgcolor=\"$bgcolor2\" cellpadding=\"0\" cellspacing=\"1\" border=\"0\"align=\"center\"><tr><td>"
."<table width=\"100%\" bgcolor=\"$bgcolor1\" cellpadding=\"8\" cellspacing=\"1\" border=\"0\"><tr><td>";
if ($topic=="") {
$topicimage="AllTopics.gif";
$warning = "<center><blink><b>"._SELECTTOPIC."</b></blink></center>";
} else {
$warning = "";
$row = $db->sql_fetchrow($db->sql_query("SELECT topictext, topicimage FROM ".$prefix."_topics WHERE topicid='$topic'"));
$topicimage = filter($row['topicimage'], nohtml);
}
echo "<img src=\"images/topics/$topicimage\" border=\"0\" align=\"right\" alt=\"$row[topictext]\" title=\"$row[topictext]\">";
themepreview($subject, $story2);
echo "$warning"
."</td></tr></table></td></tr></table>"
."<br><br><center><font class=\"tiny\">"._CHECKSTORY."</font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<p><form action=\"modules.php?name=$module_name\" method=\"post\">"
."<b>"._YOURNAME.":</b> ";
if (is_user($user)) {
cookiedecode($user);
echo "<a href=\"modules.php?name=Your_Account\">$cookie[1]</a> <font class=\"content\">[ <a href=\"modules.php?name=Your_Account&op=logout\">"._LOGOUT."</a> ]</font>";
} else {
echo "$anonymous";
}
echo "<br><br><b>"._SUBTITLE.":</b><br>"
."<input type=\"text\" name=\"subject\" size=\"50\" maxlength=\"80\" value=\"$subject\">"
."<br><br><b>"._TOPIC.": </b><select name=\"topic\">";
$result2 = $db->sql_query("SELECT topicid, topictext FROM ".$prefix."_topics ORDER BY topictext");
echo "<OPTION VALUE=\"\">"._SELECTTOPIC."</option>\n";
while ($row2 = $db->sql_fetchrow($result2)) {
$topicid = intval($row2['topicid']);
$topics = filter($row2['topictext'], nohtml);
if ($topicid == $topic) {
$sel = "selected ";
}
echo "<option $sel value=\"$topicid\">$topics</option>\n";
$sel = "";
}
echo "</select>";
if ($multilingual == 1) {
echo "<br><br><b>"._LANGUAGE.": </b>"
."<select name=\"alanguage\">";
$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 "<option value=\"$languageslist[$i]\" ";
if($languageslist[$i]==$alanguage) echo "selected";
echo ">".ucfirst($languageslist[$i])."</option>\n";
}
}
echo "</select>";
}
echo "<br><br><b>"._STORYTEXT.":</b><br>"
."<textarea cols=\"70\" rows=\"15\" name=\"story\">$f_story</textarea><br>"
."<br><b>"._EXTENDEDTEXT.":</b><br>"
."<textarea cols=\"70\" rows=\"15\" name=\"storyext\">$f_storyext</textarea><br>"
."<font class=\"content\">("._AREYOUSURE.")</font><br><br>";
if ($nuke_editor == 0) {
echo "<font class=\"content\">"._ALLOWEDHTML."<br>";
while (list($key,) = each($AllowableHTML)) echo " <".$key.">";
echo "</font><br><br>";
} else {
echo ""._HTMLNOTALLOWED."</font><br><br>";
}
echo "<input type=\"submit\" name=\"op\" value=\""._PREVIEW."\"> "
."<input type=\"submit\" name=\"op\" value=\""._OK."\"></form>";
CloseTable();
include ('footer.php');
}
Код:
$subject = filter($subject, "nohtml", 1);
$story = filter($story, "", 1);
$storyext = filter($storyext, "", 1);