You can compress this into much smaller code:
if($user_id==0 and ($action=='stats' or $action=='manual' or $action=='search' or $action=='register' or $action=='registernew')){
echo load_header();
echo ParseTpl(makeUp('guest_denied'));
$endtime=get_microtime();
$totaltime=sprintf ("%01.3f", ($endtime-$starttime));
if(isset($includeFooter) and $includeFooter!='') include($includeFooter); else echo ParseTpl(makeUp('main_footer'));
exit;
}
Also, remove all the proper {$l_menu[...]} elements from
templates/main_header.html i.e.
$l_menu[1] for 'Search'
$l_menu[2] for 'Register'
$l_menu[3] for 'Stats'
$l_menu[4] for 'Manual'
Debbie:
Then I made a page called guest_denied.html with a message saying that it was a private forum, and saved it in my templates directory. Now an unregistered user will still see the menu links, but will only get the error message when they click on one.
Looks like a valid approach, specially if it works for you that way.
Good luck!