Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" action="login.php"><!-- ?mode=login -->
- <p><input name="username" type="text" id="username" /></p>
- <p><input name="password" type="password" id="password" /></p>
- <p><input name="login" class="mainoption" value="Log in" type="submit"></p>
- </form>
- ---
- <?php
- define('IN_PHPBB', true);
- $phpbb_root_path = "../../../phpBB3/"; //Path to forum (change this)
- $phpEx = substr(strrchr(__FILE__, '.'), 1);
- include($phpbb_root_path . 'common.' . $phpEx);
- // Start session management
- $user->session_begin();
- $auth->acl($user->data);
- $user->setup();
- if($user->data['is_registered'])
- {
- //Already logged in
- }
- else
- {
- $username = request_var('username', '', true);
- $password = request_var('password', '', true);
- $autologin = (!empty($_POST['autologin'])) ? true : false;
- $result = $auth->login($username, $password, $autologin);
- if ($result['status'] == LOGIN_SUCCESS)
- {
- //Right
- }
- else
- {
- //Wrong
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement