isAuthenticated()) { header("Location: ".$conf->urlSorbet."/admin/index.php"); } else { if (isset($_POST["pass"]) && isset($_POST["login"])) { if ($user->validateUser($_POST['login'], md5($_POST['pass']))) { if (isset($_POST["url_redirect"])) { header("Location: ".$conf->urlSorbet."/admin/bm.php?url=".$_POST["url_redirect"]."&sel=".$_POST["sel"]); exit(); } else { header("Location: ".$conf->urlSorbet."/admin/index.php"); exit(); } } else { header("Location: ".$conf->urlSorbet."/login.php?error=1"); exit(); } } else { $theme = new themes; $util_class = new util(); $theme->set('version', $util_class->version()); $theme->set('redirect_url', (isset($_GET['redirect_url'])?$_GET['redirect_url']:'')); $theme->set('sel', (isset($_GET['sel'])?$_GET['sel']:'')); $theme->set('error', (isset($_GET['error'])?$_GET['error']:'')); $theme->set('conf', array( "urlSorbet"=>$conf->urlSorbet )); $theme->display(Absolute_Path.'admin/themes/admin/login.htm'); } } ?>