X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=login.php;h=2aa4d16e0ca693d767929bc02409947d22c3f86d;hb=789d4238227de4f7186f3cdfe20a9b5486c7e982;hp=f7ad08ec1d02c16886ba4aa109bfe49b7123a866;hpb=aa36c490d2218814cb6faa20e31c10b5599d4483;p=contagged diff --git a/login.php b/login.php index f7ad08e..2aa4d16 100644 --- a/login.php +++ b/login.php @@ -1,26 +1,44 @@ - array ('organizationalUnit','top'), + 'ou' => $match[1])); + } + } + + //forward to next page + if(!empty($_SESSION['ldapab']['lastlocation'])){ + header('Location: '.$_SESSION['ldapab']['lastlocation']); + }else{ + header('Location: index.php'); + } + exit; }else{ - $msg = $lang[msg_loginfail];; + $msg = $lang['msg_loginfail'];; } - } +}else{ + //logout + unset($_SESSION['ldapab']); +} + +//prepare templates +tpl_std(); +$smarty->assign('msg',$msg); +//display templates +header('Content-Type: text/html; charset=utf-8'); +$smarty->display('login.tpl'); - //prepare templates - tpl_std(); - $smarty->assign('msg',$msg); - //display templates - $smarty->display('header.tpl'); - $smarty->display('login.tpl'); - $smarty->display('footer.tpl'); -?>