smachol, thanks, but i tried that it doesn't work...
RobAC, this is what i am trying to do...
i need to do the following in non-vB pages:
(1) if the user already logged use their cookies and display a welcome $username + logout link
(2) if the user is not logged use the login form before displaying the page content.
(3) prevent access to users awaiting confirmation (3) and users awaiting moderation (4)
PHP Code:
<?
require("path-to/global.php");
if (!$bbuserinfo[userid] || $bbuserinfo[usergroupid]==3 || $bbuserinfo[usergroupid]==4) {
show_nopermission();
eval("dooutput(\"".gettemplate("error_wrongpassword")."\");");
}
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
echo"Welcome Back, <b>$username</b>";
} else {
?>
<table border="0" cellpadding="0" cellspacing="0" height="99">
<form action="http://path-to/forums/member3.php" method="post">
<tr>
<td nowrap height="13" colspan="2">
<p align="center"><font face="verdana,arial,helvetica" size="1" ><b>Login with username and password:</b></font></p>
</td>
</tr><tr>
<td nowrap height="25"><font size="2">User Name</font>
</td>
<td nowrap height="25"><input type="text" class="bginput" name="username" size="13">
</td>
</tr>
<tr>
<td nowrap height="27"><font size="2">Password</font></td>
<td nowrap height="27"><input type="hidden" name="s" value="$session[sessionhash]">
<input type="hidden" name="action" value="login"><input type="password" class="bginput" name="password" size="13">
<input type="submit" class="bginput" value="Login!"></td>
</tr>
</table>
<?
}
?>
i get error almost everywhere except for the login box, there is an error on show_nopermission line, and the user is not welcomed in non-vb pages. (i changed member.php to member3.php and alreasy set the redirect to the index of my main site (non-vB) )
please help