if($type=='thread' AND in_array($foruminfo['forumid'], array(1,2,3,4,5))){$attachs = $vbulletin->db->query_read("SELECT attachmentidFROM " . TABLE_PREFIX . "attachment WHERE posthash = '" . $vbulletin->db->escape_string($post['posthash']) . "'AND userid = " . $vbulletin->userinfo['userid'] . "ORDER BY attachmentid");if($vbulletin->db->num_rows($attachs) <= 0)$errors[] = $vbphrase['required_attachments'];}