true, 'version' => $version); if (isset($_POST['login']) && isset($_POST['password'])) { $login = getparam('login'); $password = getparam('password'); $remember = isset($_POST['isRemember']) && $_POST['isRemember'] == "on"; $operator = operator_by_login($login); if ($operator && isset($operator['vcpassword']) && $operator['vcpassword'] == md5($password) && !operator_is_disabled($operator)) { $target = $password == '' ? "$webimroot/operator/operator.php?op=" . $operator['operatorid'] : (isset($_SESSION['backpath']) ? $_SESSION['backpath'] : "$webimroot/operator/index.php"); login_operator($operator, $remember); header("Location: $target"); exit; } else { if (operator_is_disabled($operator)) { $errors[] = getlocal('page_login.operator.disabled'); } else { $errors[] = getlocal("page_login.error"); } $page['formlogin'] = $login; } } else if(isset($_GET['login'])) { $login = getgetparam('login'); if (preg_match("/^(\w{1,15})$/", $login)) $page['formlogin'] = $login; } $page['localeLinks'] = get_locale_links("$webimroot/operator/login.php"); start_html_output(); require('../view/login.php'); ?>