".$locale['422']." $subject
".$userdata['user_name']."
".($is_mod ? $locale['userf1'] : getuserlevel($userdata['user_level']))."

\n"; if ($userdata['user_avatar']) { echo "

\n"; $height = "200"; } else { $height = "60"; } echo "".$locale['423']." ".$userdata['user_posts']."
\n"; if ($userdata['user_location']) echo "".$locale['424']." ".$userdata['user_location']."
\n"; echo "".$locale['425']." ".showdate("%d.%m.%y", $userdata['user_joined'])."
".$locale['426'].showdate("forumdate", time())."
$previewmessage
\n"; closetable(); tablebreak(); } if (isset($_POST['postnewthread'])) { $flood = false; $error = 0; $sticky = isset($_POST['sticky']) ? "1" : "0"; $sig = isset($_POST['show_sig']) ? "1" : "0"; $smileys = isset($_POST['disable_smileys']) ? "0" : "1"; $subject = trim(stripinput(censorwords($_POST['subject']))); $message = trim(stripinput(censorwords($_POST['message']))); if (iMEMBER) { if ($subject != "" && $message != "") { $result = dbquery("SELECT MAX(post_datestamp) AS last_post FROM ".$db_prefix."posts WHERE post_author='".$userdata['user_id']."'"); if (!iSUPERADMIN || dbrows($result) > 0) { $data = dbarray($result); if ((time() - $data['last_post']) < $settings['flood_interval']) { $flood = true; $result = dbquery("INSERT INTO ".$db_prefix."flood_control (flood_ip, flood_timestamp) VALUES ('".USER_IP."', '".time()."')"); if (dbcount("(flood_ip)", "flood_control", "flood_ip='".USER_IP."'") > 4) { $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='".$userdata['user_id']."'"); } fallback("viewforum.php?forum_id=$forum_id"); } } if (!$flood) { $result = dbquery("UPDATE ".$db_prefix."forums SET forum_lastpost='".time()."', forum_lastuser='".$userdata['user_id']."' WHERE forum_id='$forum_id'"); $result = dbquery("INSERT INTO ".$db_prefix."threads (forum_id, thread_subject, thread_author, thread_views, thread_lastpost, thread_lastuser, thread_sticky, thread_locked) VALUES('$forum_id', '$subject', '".$userdata['user_id']."', '0', '".time()."', '".$userdata['user_id']."', '$sticky', '0')"); $thread_id = mysql_insert_id(); $result = dbquery("INSERT INTO ".$db_prefix."posts (forum_id, thread_id, post_subject, post_message, post_showsig, post_smileys, post_author, post_datestamp, post_ip, post_edituser, post_edittime) VALUES ('$forum_id', '$thread_id', '$subject', '$message', '$sig', '$smileys', '".$userdata['user_id']."', '".time()."', '".USER_IP."', '0', '0')"); $post_id = mysql_insert_id(); $result = dbquery("UPDATE ".$db_prefix."users SET user_posts=user_posts+1 WHERE user_id='".$userdata['user_id']."'"); if ($settings['thread_notify'] && isset($_POST['notify_me'])) $result = dbquery("INSERT INTO ".$db_prefix."thread_notify (thread_id, notify_datestamp, notify_user, notify_status) VALUES('$thread_id', '".time()."', '".$userdata['user_id']."', '1')"); $attach = $_FILES['attach']; if ($attach['name'] != "" && !empty($attach['name']) && is_uploaded_file($attach['tmp_name'])) { $attachname = substr($attach['name'], 0, strrpos($attach['name'], ".")); $attachext = strtolower(strrchr($attach['name'],".")); if (preg_match("/^[-0-9A-Z_\[\]]+$/i", $attachname) && $attach['size'] <= $settings['attachmax']) { $attachtypes = explode(",", $settings['attachtypes']); if (in_array($attachext, $attachtypes)) { $attachname = attach_exists(strtolower($attach['name'])); move_uploaded_file($attach['tmp_name'], FORUM."attachments/".$attachname); chmod(FORUM."attachments/".$attachname,0644); if (in_array($attachext, $imagetypes) && (!@getimagesize(FORUM."attachments/".$attachname) || !@verify_image(FORUM."attachments/".$attachname))) { unlink(FORUM."attachments/".$attachname); $error = 1; } if (!$error) $result = dbquery("INSERT INTO ".$db_prefix."forum_attachments (thread_id, post_id, attach_name, attach_ext, attach_size) VALUES ('$thread_id', '$post_id', '$attachname', '$attachext', '".$attach['size']."')"); } else { @unlink($attach['tmp_name']); $error = 1; } } else { @unlink($attach['tmp_name']); $error = 2; } } } } else { $error = 3; } } else { $error = 4; } if ($error > 2) { redirect("postify.php?post=new&error=$error&forum_id=$forum_id"); } else { redirect("postify.php?post=new&error=$error&forum_id=$forum_id&thread_id=$thread_id"); } } else { if (!isset($_POST['previewpost'])) { $subject = ""; $message = ""; $sticky_check = ""; $disable_smileys_check = ""; $sig_checked = " checked"; $notify_checked = ""; } opentable($locale['401']); echo "
\n"; if ($settings['attachments'] == "1") { echo "\n"; } echo "
".$locale['460']."
".$locale['461']."
 
  ".$locale['462']."
  ".displaysmileys("message")."
".$locale['463']." \n"; if (iMOD || iSUPERADMIN) { echo "".$locale['480']."
\n"; } echo "".$locale['483']; if ($userdata['user_sig']) { echo "
\n".$locale['481']; } if ($settings['thread_notify']) echo "
\n".$locale['485']; echo "
".$locale['464']."
".sprintf($locale['466'], parsebytesize($settings['attachmax']), str_replace(',', ' ', $settings['attachtypes']))."
\n"; closetable(); } ?>