\n"; if ($post == "on") { $result = dbquery("INSERT INTO ".$db_prefix."thread_notify (thread_id, notify_datestamp, notify_user, notify_status) VALUES('$thread_id', '".time()."', '".$userdata['user_id']."', '1')"); echo $locale['452']."

\n"; } else { $result = dbquery("DELETE FROM ".$db_prefix."thread_notify WHERE thread_id='$thread_id' AND notify_user='".$userdata['user_id']."'"); echo $locale['453']."

\n"; } echo "".$locale['447']." | ".$locale['448']." | ".$locale['449']."

\n"; closetable(); } else if ($post == "new") { opentable($locale['401']); echo "
\n"; if ($errorb) { echo "
$errorb

\n"; } else { echo "
".$locale['442']."

\n"; } if ($error < 3) { if (!isset($thread_id) || !isNum($thread_id)) fallback("index.php"); echo "".$locale['447']." |\n"; } echo "".$locale['448']." | ".$locale['449']."

\n"; closetable(); } else if ($post == "reply") { if (!isset($thread_id) || !isNum($thread_id)) fallback("index.php"); opentable($locale['403']); echo "

\n"; if ($errorb) { echo "$errorb

\n"; } else { echo $locale['443']."

\n"; } if ($error < "2") { if (!isset($post_id) || !isNum($post_id)) fallback("index.php"); if ($settings['thread_notify']) { $result = dbquery( "SELECT tn.*, tu.user_id,user_name,user_email FROM ".$db_prefix."thread_notify tn LEFT JOIN ".$db_prefix."users tu ON tn.notify_user=tu.user_id WHERE thread_id='$thread_id' AND notify_user!='".$userdata['user_id']."' AND notify_status='1' "); if (dbrows($result)) { require_once INCLUDES."sendmail_include.php"; $data2 = dbarray(dbquery("SELECT thread_subject FROM ".$db_prefix."threads WHERE thread_id='$thread_id'")); $link = $settings['siteurl']."forum/viewthread.php?forum_id=$forum_id&thread_id=$thread_id&pid=$post_id#post_$post_id"; while ($data = dbarray($result)) { $message_el1 = array("{USERNAME}", "{THREAD_SUBJECT}", "{THREAD_URL}"); $message_el2 = array($data['user_name'], $data2['thread_subject'], $link); $message_subject = str_replace("{THREAD_SUBJECT}", $data2['thread_subject'], $locale['550']); $message_content = str_replace($message_el1, $message_el2, $locale['551']); sendemail($data['user_name'],$data['user_email'],$settings['siteusername'],$settings['siteemail'],$message_subject,$message_content); } $result = dbquery("UPDATE ".$db_prefix."thread_notify SET notify_status='0' WHERE thread_id='$thread_id' AND notify_user!='".$userdata['user_id']."'"); } } echo "".$locale['447']." |\n"; } else { $data = dbarray(dbquery("SELECT post_id FROM ".$db_prefix."posts WHERE thread_id='".$data['thread_id']."' ORDER BY post_id DESC")); echo "".$locale['447']." |\n"; } echo "".$locale['448']." | ".$locale['449']."

\n"; closetable(); } else if ($post == "edit") { if (!isset($thread_id) || !isNum($thread_id)) fallback("index.php"); opentable($locale['409']); echo "

\n"; if ($errorb) { echo "$errorb

\n"; } else { echo $locale['446']."

\n"; } echo "".$locale['447']." | ".$locale['448']." | ".$locale['449']."

\n"; closetable(); } require_once BASEDIR."side_right.php"; require_once BASEDIR."footer.php"; ?>