if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) { show_nopermission(); } if ((!isset($pagenumber) or $pagenumber==0) and $pagenumber!="lastpage") { $pagenumber=1; }