Parašė ToMis· 2008 Rugs. 25 21:09:40
#8
Tj cia jau
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; } openside($locale['120']); if (isset($_POST['post_shout'])) { if (iMEMBER) { $shout_name = $userdata['user_id']; } elseif ($settings['guestposts'] == "1") { $shout_name = trim(stripinput($_POST['shout_name'])); $shout_name = preg_replace("(^[0-9]*)", "", $shout_name); if (isNum($shout_name)) $shout_name=""; } $shout_message = str_replace("\n", " ", $_POST['shout_message']); $shout_message = preg_replace("/^(.{255}).*$/", "$1", $shout_message); $shout_message = preg_replace("/([^\s]{25})/", "$1\n", $shout_message); $shout_message = trim(stripinput(censorwords($shout_message))); $shout_message = str_replace("\n", "
", $shout_message); if ($_POST['validation'] != "" && $_POST['validation'] == $_POST['validation_answer']) { if ($shout_name != "" && $shout_message != "") { if (dbcount("(*)", "shoutbox", "shout_message='$shout_message' AND shout_datestamp+84600>".time())) { header("Location: ".FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "")); } else { $result = dbquery("INSERT INTO ".$db_prefix."shoutbox VALUES('', '$shout_name', '$shout_message', '".time()."', '".USER_IP."')"); } } header("Location: ".FUSION_SELF.(FUSION_QUERY ? "?".FUSION_QUERY : "")); } else { echo "
Jūs turite teisingai atsakyti į šį matematinį klausimą, kad jūsų pranešimas būtų įskaitytas. Tai turi apsaugoti nuo pasikartojančių žinučių.
"; } } // Calculate random equation and answer $var1 = rand(1,5); $var2 = rand(1,5); $equation = $var1 . " + " . $var2 . ":"; $validation_answer = $var1 + $var2; if (iMEMBER || $settings['guestposts'] == "1") { echo "
\n"; if (iGUEST) { echo $locale['121']."
".$locale['122']."
\n"; } echo "
".$equation."
".$locale['124']."
\n"; } else { echo "
".$locale['125']."
\n"; } $result = dbquery("SELECT count(shout_id) FROM ".$db_prefix."shoutbox"); $numrows = dbresult($result, 0); $result = dbquery( "SELECT * FROM ".$db_prefix."shoutbox LEFT JOIN ".$db_prefix."users ON ".$db_prefix."shoutbox.shout_name=".$db_prefix."users.user_id ORDER BY shout_datestamp DESC LIMIT 0,".$settings['numofshouts'] ); if (dbrows($result) != 0) { $i = 0; while ($data = dbarray($result)) { echo ""; if ($data['user_name']) { echo "".$data['user_name']."\n"; } else { echo "".$data['shout_name']."\n"; } echo "
".showdate("shortdate", $data['shout_datestamp'])."
".parsesmileys($data['shout_message'])."
\n"; if ($i != $numrows) echo "
\n"; } if ($numrows > $settings['numofshouts']) { echo "
\n ".$locale['126']."
\n"; } } else { echo "
".$locale['127']."
\n"; } closeside(); ?>
Wa tiek susivare... reike koda keisti...Srry nemoku bet padeciau jai mokeciau
Redagavo ToMis· 2008 Rugs. 25 21:09:01