if ($view == 'attachments') { $attachment_querystring = '&view=attachments'; } else { $attachment_querystring = ''; } $pagenav = getpagenav($totalposts,"showthread.php?s=$session[sessionhash]&threadid=$threadid&perpage=$perpage&display=$display$attachment_querystring".iif(isset($highlight), "&highlight=$highlight", ""));