17 include_once (
'Lib.Http.php');
24 $action->parent->AddCssRef(
"AUTHENT:loginform.css",
true);
25 $action->parent->AddJsRef($action->GetParam(
"CORE_JSURL") .
"/resizeimg.js");
26 $action->parent->AddJsRef($action->GetParam(
"CORE_JSURL") .
"/geometry.js");
27 $action->parent->addJsRef(
"AUTHENT:loginform.js",
true);
28 $ulang = GetHttpVars(
"lang");
36 $action->lay->set(
"isEnglish", substr($ulang, 0, 2) ==
"en");
37 $error = GetHttpVars(
"error", 0);
42 $merr = _(
"Too many incorrect password attempts.") . _(
" Please, see your manager");
46 $merr = _(
"This account is deactivated.") . _(
" Please, see your manager");
50 $merr = _(
"This account has expired.") . _(
" Please, see your manager");
54 $merr = _(
"auth_failure");
57 $auth_user = GetHttpVars(
"auth_user");
58 $app_redir = GetHttpVars(
"appd",
"CORE");
59 $act_redir = GetHttpVars(
"actd",
"");
60 $arg_redir = GetHttpVars(
"argd",
"");
61 $redirect_uri = GetHttpVars(
"redirect_uri",
"");
63 $action->lay->eset(
"app_redir", $app_redir);
64 $action->lay->eset(
"act_redir", $act_redir);
65 $action->lay->eset(
"arg_redir", $arg_redir);
66 $action->lay->set(
"title", _(
"welcome"));
67 $action->lay->eset(
"auth_user", $auth_user);
68 $action->lay->set(
"passfocus", ($auth_user !==
"" ?
true :
false));
69 $action->lay->set(
"error", $merr);
70 $action->lay->eset(
"redirect_uri", $redirect_uri);
71 $action->lay->set(
"baseurl", htmlspecialchars(
getParam(
"CORE_BASEURL")));
73 $action->lay->set(
'authent_show_reqpasswd', $action->
getParam(
'AUTHENT_SHOW_REQPASSWD') !=
'no');
75 $action->lay->set(
'authent_show_lang_selection', $action->
getParam(
'AUTHENT_SHOW_LANG_SELECTION') !=
'no');
78 include_once (
'CORE/lang.php');
79 $lang_block = array();
81 foreach (
$lang as $k => $v) {
82 $lang_block[$k][
'LANG_VALUE'] = $k;
83 $lang_block[$k][
'LANG_LABEL'] =
$lang[$k][
'label'];
84 $lang_block[$k][
'LANG_IS_SELECTED'] = ($ulang == $k);
86 $action->lay->setBlockData(
'LANG', $lang_block);
87 $action->lay->set(
"ulang", urlencode($ulang));
88 $action->parent->short_name = sprintf(_(
"%s Authentification") , $action->
getParam(
"CORE_CLIENT"));
90 header(
'HTTP/1.1 401 Authentication Required');
91 header(
'WWW-Authenticate: html-form');
getParam($name, $def="")
must be in core or global type