<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<SC RIPT TYPE="text/javascript">
<!--
func tion submitenter(myfield,e)
{
var keycode;
if (wind ow .event) keycode = wind ow .event.keyCode;
else if (e) keycode = e.which;
else return true;
if (keycode == 13)
{
myfield.form.submit();
return false;
}
else
return true;
}
//-->
</SCRIPT>
<?
if($arResult['ERROR'])
{
?>
<sc ript>
a lert('<?=HTMLToTxt($arResult['ERROR_MESSAGE']['MESSAGE'])?>');
</script>
<?
}
?>
<?if ($arResult["FORM_TYPE"] == "login"):?>
<a href="#">ВХОД</a>
<div class="login">
<fo rm method="post" target="_top" action="<?=$arParams["BACKURL"]?>">
<?
if (strlen($arResult["BACKURL"]) > 0)
{
?>
<input type="hidden" name="backurl" value="<?=$arParams["BACKURL"]?>" style="display:none;"/>
<?
}
?>
<?
foreach ($arResult["POST"] as $key => $value)
{
?>
<input type="hidden" name="<?=$key?>" value="<?=$value?>" style="display:none;"/>
<?
}
?>
<input type="hidden" name="AUTH_FORM" value="Y" style="display:none;"/>
<input type="hidden" name="TYPE" value="AUTH" style="display:none;"/>
<div class="login-login"><input type="text" name="USER_LOGIN" maxlength="50" value="<?=$arResult["USER_LOGIN"]?>" onK eyPress="return submitenter(this,event)"/></div>
<div class="login-password"><input type="password" name="USER_PASSWORD" maxlength="50" onK eyPress="return submitenter(this,event)"/></div>
<div class="login-checkbox"><input type="checkbox" id="USER_REMEMBER" name="USER_REMEMBER" value="Y"/></div>
<div class="login-checkbox-title">Запомнить</div>
<div class="login-submit"><input type="s ubmit" value="Вход" name="Login"/></div>
<div class="login-forgot"><a href="<?=SITE_DIR?>Recover_password/">Восстановить пароль</a></div>
</form>
</div>
<?else:?>
<?global $USER;
$rsUser = $USER->GetByID($USER->GetID());
$arUser = $rsUser->Fetch();
?>
<a href="#">Здравствуйте, <?=$arUser["NAME"];?></a>
<div class="login">
&n |