Koodi: Valitse kaikki
<?php
define("IN_LOGIN", true);
define('IN_PHPBB', true);
$phpbb_root_path = './forum/';
$phpEx=”php”;
include($phpbb_root_path . ‘common.php’);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup(’viewforum’);
if($_POST){
$username = $_POST['username'];
$password = $_POST['password'];
$validation = login_db($username, $password);
$valid = $validation['status'];
if(($valid != 3)){
die ($validation['error_msg']);
}
$authenticate = $auth->login($username, $password);
if($authenticate){
// Success! Do Something Here
}else{
// Problem! Do Something Here
}
}
?>