if (!$permissions[canview] or !$permissions[cangetattachment]) { show_nopermission(); }
if ($bbuserinfo['posts']<X) {show_nopermission(); exit;}