. */ define('IS_LOGIN', true); require_once('head.php'); $error = 0; if(!empty($_POST['login']) && !empty($_POST['password'])) { if($nk->login($_POST['login'], $_POST['password'])) { if (isset($_GET['inFrame'])) { $tpl->assign('force_reload', true); $tpl->display('parent_reload.tpl'); } else { header('Location: ./'); } exit; } $error = 1; } if(!empty($_GET['logout'])) { $nk->logout(); $error = 2; if (isset($_GET['inFrame'])) { $tpl->assign('force_reload', true); $tpl->display('parent_reload.tpl'); exit; } } if($nk->is_logged()) { header('Location: ./'); exit; } if (!empty($_SERVER['HTTP_REFERER'])) $_SESSION['login_referer'] = $_SERVER['HTTP_REFERER']; else $_SESSION['login_referer'] = ''; $tpl->assign('error', $error); $tpl->display('login.tpl'); ?>