Login form:
PHP Code:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include("../config.$phpEx" );
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
if($userdata['session_logged_in'] == 1)
{
header("location:$root/$redirect" );
exit;
}
else
{
echo '<div align="center">
<form action="./forum/login.'.$phpEx.'" method="post">
Name of user: <input type="text" class="post" name="username" size="20" maxlength="40" value=""/></br>
Password: <input type="password" class="post" name="password" size="20" maxlength="32"/></br>
Login automatically: <input type="checkbox" name="autologin" />
<input type="hidden" name="redirect" value="../'.$redirect.'" /></br>
<input type="submit" name="login" class="mainoption" value="Connection"/>
</form>
<a href="'.$root_forum.'/profile.'.$phpEx.'?mode=register">Sign up</a>
</div>';
}
?>
At the top of each page:
PHP Code:
define('IN_PHPBB', true);
$phpbb_root_path = './forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_SITE);
init_userprefs($userdata);
//
// End session management
//
include("config.$phpEx" );
Bookmarks