$db->query("INSERT INTO bb".$n."_threads (boardid,prefix,topic,iconid,starttime,starterid,starter,lastposttime,lastposterid,lastposter,attachments,pollid,important,visible) VALUES ('$boardid','".addslashes($prefix)."','".addslashes($topic)."','$iconid','$time','0','[anonym]','$time','0','[anonym]','".(($attachment_id) ? (1) : (0))."','$poll_id','$important','".(($board['moderatenew'] == 10 || $board['moderatenew'] == 11) ? (0) : (1))."')");
if(isset($_POST['pwd'])) $pwd = md5($_POST['pwd']);
else $pwd = '';
$db->query("INSERT INTO bb".$n."_threads (boardid,prefix,topic,iconid,starttime,starterid,starter,lastposttime,lastposterid,lastposter,attachments,pollid,important,visible,pwd) VALUES ('$boardid','".addslashes($prefix)."','".addslashes($topic)."','$iconid','$time','0','[anonym]','$time','0','[anonym]','".(($attachment_id) ? (1) : (0))."','$poll_id','$important','".(($board['moderatenew'] == 10 || $board['moderatenew'] == 11) ? (0) : (1))."','$pwd')");
$db->query("INSERT INTO bb".$n."_threads (boardid,prefix,topic,iconid,starttime,starterid,starter,lastposttime,lastposterid,lastposter,attachments,pollid,important,visible) VALUES ('$boardid','".addslashes($prefix)."','".addslashes($topic)."','$iconid','$time','$wbbuserdata[userid]','".addslashes($wbbuserdata['username'])."','$time','$wbbuserdata[userid]','".addslashes($wbbuserdata['username'])."','".(($attachment_id) ? (1) : (0))."','$poll_id','$important','".(($board['moderatenew'] == 10 || $board['moderatenew'] == 11) ? (0) : (1))."')");
if(isset($_POST['pwd'])) $pwd = md5($_POST['pwd']);
else $pwd = '';
$db->query("INSERT INTO bb".$n."_threads (boardid,prefix,topic,iconid,starttime,starterid,starter,lastposttime,lastposterid,lastposter,attachments,pollid,important,visible,pwd) VALUES ('$boardid','".addslashes($prefix)."','".addslashes($topic)."','$iconid','$time','$wbbuserdata[userid]','".addslashes($wbbuserdata['username'])."','$time','$wbbuserdata[userid]','".addslashes($wbbuserdata['username'])."','".(($attachment_id) ? (1) : (0))."','$poll_id','$important','".(($board['moderatenew'] == 10 || $board['moderatenew'] == 11) ? (0) : (1))."','$pwd')");