/**
  * Set languge params for page
  */
 function setLangParams()
 {
     SetLangVars($this->shortTableName . "_list");
 }
$page_layouts["login"] = $layout;
include 'include/xtempl.php';
include 'classes/runnerpage.php';
$xt = new Xtempl();
$id = postvalue("id") != "" ? postvalue("id") : 1;
//array of params for classes
$params = array("id" => $id, "pageType" => PAGE_LOGIN);
$params['xt'] =& $xt;
$params["tName"] = "global";
$params['needSearchClauseObj'] = false;
$pageObject = new RunnerPage($params);
// begin proccess captcha
$pageObject->isCaptchaOk = 1;
$useCaptcha = false;
// end proccess captcha
SetLangVars("login");
$xt->assign("languages_block", true);
//	Before Process event
if ($globalEvents->exists("BeforeProcessLogin")) {
    $globalEvents->BeforeProcessLogin($conn);
}
$myurl = @$_SESSION["MyURL"];
unset($_SESSION["MyURL"]);
$message = "";
$pUsername = postvalue("username");
$pPassword = postvalue("password");
$is508 = isEnableSection508();
$rememberbox_checked = "";
$rememberbox_attrs = ($is508 == true ? "id=\"remember_password\" " : "") . "name=\"remember_password\" value=\"1\"";
if (@$_COOKIE["username"] || @$_COOKIE["password"]) {
    $rememberbox_checked = " checked";