$firstpostinfo=$DB_site->query_first("SELECT userid FROM post WHERE threadid='$threadid' ORDER BY dateline LIMIT 1"); if ($bbuserinfo[userid]!=$firstpostinfo[userid]) { show_nopermission(); } } } }