3 * Do the login/logout process
6 require_once('inc/init.php');
8 $msg = $lang['msg_login'];
9 if(isset($_REQUEST['username'])){
10 if (empty($_REQUEST['password'])) { $_REQUEST['password']=''; }
11 if (do_ldap_bind($_REQUEST['username'],$_REQUEST['password'])){
12 //forward to next page
13 if(!empty($_SESSION['ldapab']['lastlocation'])){
14 header('Location: '.$_SESSION['ldapab']['lastlocation']);
16 header('Location: index.php');
20 $msg = $lang['msg_loginfail'];;
26 $smarty->assign('msg',$msg);
28 header('Content-Type: text/html; charset=utf-8');
29 $smarty->display('login.tpl');