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'] . '

' . sprintf($lang['Click_return_login'], '', '') . '

' . sprintf($lang['Click_return_index'], '', ''); message_die(MESSAGE, $message); } } else if ( $userdata['user_id'] != ANONYMOUS ) { $session->destroy($userdata); } // // Redirect to wherever we're supposed to go ... // $redirect_url = ( $redirect ) ? preg_replace('/^.*?redirect=(.*?)&(.*?)$/', '\\1' . $SID . '&\\2', $redirect) : 'index.'.$phpEx; header($header_location . $redirect_url); exit; } if ( $userdata['user_id'] == ANONYMOUS ) { $template->assign_vars(array( 'L_ENTER_PASSWORD' => $lang['Enter_password'], 'L_SEND_PASSWORD' => $lang['Forgotten_password'], 'U_SEND_PASSWORD' => "profile.$phpEx$SID&mode=sendpassword", 'S_HIDDEN_FIELDS' => '') ); $page_title = $lang['Login']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $template->set_filenames(array( 'body' => 'login_body.html') ); make_jumpbox('viewforum.'.$phpEx, $forum_id); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); } else { header($header_location . "index.$phpEx$SID"); exit; } ?>