Try this
PHP Code:
<?php
// logged in?
chdir('../forums/');
require('global.php');
?><HTML>
...
</head>
<?php
//
if ($vbulletin->userinfo['userid'] !=0){
// The user's ID # is not equal to 0, and therefore, they are not a guest
#echo ("
#Welcome back, ".$vbulletin->userinfo["username"].".<br />
#You have made ".$vbulletin->userinfo["posts"]." post(s).
#");
// === LOGGED IN, SHOW CONTENT ==========
chdir('../download/');
?>
Welcome <b><? echo $vbulletin->userinfo["username"]; ?></b>,<br>
Here you will find video, audio, and image files...
<br>
<?php
include("inc_listfiles.php");
?>
<?
}else{
// ==== NOT LOGGED IN ==========
// The user must be a guest, since their ID # is 0
#echo "izes to keep on handNOT LOGGED IN";
?>
In order to access our Download section, you must be a member of our Message Forums....
<?
}
?>
<br>
</BODY></HTML>