X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=login.php;h=2aa4d16e0ca693d767929bc02409947d22c3f86d;hb=c78202d78e276ef80e0d959e50f49d09b9ed5340;hp=a2d0a124f9c5676166531acf0a111371cb42f247;hpb=3dcc26f728beaeee605bad5e641759c74d83732e;p=contagged diff --git a/login.php b/login.php index a2d0a12..2aa4d16 100644 --- a/login.php +++ b/login.php @@ -1,27 +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 - header('Content-Type: text/html; charset=utf-8'); - $smarty->display('header.tpl'); - $smarty->display('login.tpl'); - $smarty->display('footer.tpl'); -?>