$this->db->query("INSERT INTO bb".$this->n."_threads set boardid='".$this->config[15]."',topic='".addslashes($this->knuffel_betreff)."',starttime='$time',starterid='$this->config[14]',starter='".addslashes($userbotname)."',lastposttime='$time',lastposterid='".$this->config[14]."',lastposter='".addslashes($userbotname)."',visible='1',closed='".$this->config[16]."'");
$threadid = $this->db->insert_id();
$this->db->query("INSERT INTO bb".$this->n."_posts set threadid='".$threadid."',userid='".$this->config[14]."',username='".addslashes($userbotname)."',posttopic='".addslashes($this->knuffel_betreff)."',posttime='$time',message='".addslashes($this->knuffel_msg)."',ipaddress='".addslashes($REMOTE_ADDR)."',visible='1'");
$postid = $this->db->insert_id();
$board_post=$this->db->query_first("select parentlist from bb".$this->n."_boards where boardid='".$this->config[15]."'");
$s_board= $this->config[15];
$this->db->unbuffered_query("UPDATE bb".$this->n."_boards SET threadcount=threadcount+1,postcount=postcount+1,lastthreadid='".$threadid."', lastposttime='".$time."', lastposterid='".$this->config[14]."', lastposter='".$userbotname."' WHERE boardid IN (".$board_post[parentlist].",".$s_board.")",1);
$this->db->query("UPDATE bb".$this->n."_users SET userposts=userposts+1 WHERE userid = '".$this->config[14]."'"); |