if ($foruminfo['forumid'] >= 18 AND $foruminfo['forumid'] <= 68) { $t_id = $newpost['threadid']; $posttype = $vbulletin->input->clean_gpc('p', "posttype", TYPE_STR); $area = $vbulletin->input->clean_gpc('p', "area", TYPE_STR); $price = $vbulletin->input->clean_gpc('p', "price", TYPE_NUM); $posttype = $vbulletin->input->clean_gpc('p', "posttype", TYPE_STR); $posttype_firearm = $vbulletin->input->clean_gpc('p', "posttype_firearm", TYPE_STR); $caliber = $vbulletin->input->clean_gpc('p', "caliber", TYPE_ARRAY_STR); $manufacturer = $vbulletin->input->clean_gpc('p', "manufacturer", TYPE_ARRAY_STR); $action = $vbulletin->input->clean_gpc('p', "action", TYPE_ARRAY_STR); $type = $vbulletin->input->clean_gpc('p', "type", TYPE_STR); if (!empty($caliber[0])) { $caliber2 = $caliber[0]; } elseif (!empty($caliber[1])) { $caliber2 = $caliber[1]; } else { $caliber2 = $caliber[2]; } if (!empty($manufacturer[0])) { $manufacturer2 = $manufacturer[0]; } elseif (!empty($manufacturer[1])) { $manufacturer2 = $manufacturer[1]; } else { $manufacturer2 = $manufacturer[2]; } if (!empty($action[0])) { $action2 = $action[0]; } else { $action2 = $action[1]; } $vbulletin->db->query_write(" INSERT INTO " . TABLE_PREFIX . "`thread_classifieds` ( `threadid` , `price` , `area` , `posttype` , `posttype_firearm` , `caliber` , `manufacturer` , `action` , `type` ) VALUES ( '" . $t_id . "', '" . $price . "', '" . $area . "', '" . $posttype . "', '" . $posttype_firearm . "', '" . $caliber2 . "', '" . $manufacturer2 . "', '" . $action2 . "', '" . $type . "' ) "); }