start();
$acl = new acl($userdata);
$session->configure($userdata);
//
// End session management
//
//
// This appears to work for IIS5 CGI under Win2K. Uses getenv since this doesn't exist for
// ISAPI mode and therefore the normal Location redirector is used in preference
//
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
extract($HTTP_GET_VARS);
extract($HTTP_POST_VARS);
$redirect = ( !empty($redirect) ) ? $HTTP_SERVER_VARS['QUERY_STRING'] : '';
//
// Do the login/logout/form/whatever
//
if ( isset($login) || isset($logout) )
{
if ( isset($login) && $userdata['user_id'] == ANONYMOUS )
{
$autologin = ( !empty($autologin) ) ? true : false;
//
// Is the board disabled? Are we an admin? No, then back to the index we go
//
if ( $board_config['board_disable'] && !$acl->get_acl_admin() )
{
header($header_location . "index.$phpEx$SID");
exit;
}
if ( new login($username, $password, $autologin) )
{
$template->assign_vars(array(
'META' => '')
);
$message = $lang['Error_login'] . '