Цитата |
---|
<?
define("NEED_AUTH",true); $arAuthResult["MESSAGE"] = "Доступ к файлу закрыт"; require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); $FILE_PERM = $APPLICATION->GetFileAccessPermission($_REQUEST["DIR"]."/files/".$_REQUEST["fname"], $USER->GetUserGroupArray()); $FILE_PERM = (strlen($FILE_PERM)>0 ? $FILE_PERM : "D"); if($FILE_PERM < "R") $APPLICATION->AuthForm($arAuthResult["MESSAGE"]); else LocalRedirect($_REQUEST["DIR"]."/".urlencode($_REQUEST["fname"])); ?> |
Цитата |
---|
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php"); if($_GET['forgot_password']=='yes'): $APPLICATION->SetTitle("Запрос пароля на восстановление"); elseif($_GET['change_password']=='yes'): $APPLICATION->SetTitle("Востановление пароля"); elseif($_GET['register']=='yes'): $APPLICATION->SetTitle("Регистрация"); else: $APPLICATION->SetTitle("Авторизация"); endif; global $USER; if ($USER->IsAuthorized()) { if (isset($_REQUEST["backurl"]) && strlen($_REQUEST["backurl"])>0) LocalRedirect($backurl); } ?> <?global $USER; if ($USER->IsAuthorized()) {?> <p>Вы зарегистрированы и успешно авторизовались.</p> <p>Вернуться на главную страницу</p> <?}?> <?global $USER; if (!$USER->IsAuthorized()) {?> <?if($_GET['forgot_password']=='yes'):?> <?$APPLICATION->IncludeComponent( "bitrix:system.auth.forgotpasswd","",false );?> <?elseif($_GET['change_password']=='yes'):?> <?$APPLICATION->IncludeComponent( "bitrix:system.auth.changepasswd","",false );?> <?elseif($_GET['register']=='yes'):?> <?$APPLICATION->IncludeComponent( "bitrix:main.register", "", Array( "USER_PROPERTY_NAME" => "", "SEF_MODE" => "N", "SHOW_FIELDS" => Array("NAME", "SECOND_NAME", "LAST_NAME", "PERSONAL_MOBILE", "PERSONAL_CITY", "WORK_COMPANY", "WORK_POSITION", "WORK_WWW", "WORK_PHONE", "WORK_FAX", "WORK_PROFILE", "WORK_LOGO"), "REQUIRED_FIELDS" => Array("NAME", "SECOND_NAME", "LAST_NAME", "PERSONAL_MOBILE", "PERSONAL_CITY"), "AUTH" => "Y", "USE_BACKURL" => "Y", "SUCCESS_PAGE" => "", "SET_TITLE" => "Y", "USER_PROPERTY" => Array("UF_AGENT") ) );?> <?else:?> <?$APPLICATION->IncludeComponent( "bitrix:system.auth.form", "", Array( "REGISTER_URL" => SITE_DIR."auth.php", "PROFILE_URL" => SITE_DIR."club/", "SHOW_ERRORS" => "Y" ) );?> <p>Вы зарегистрированы и успешно авторизовались.</p> <p>Вернуться на главную страницу</p> <?endif?> <?}?> <?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?> |
Цитата |
---|
demon1486 пишет:
не понятно откуда береться стандартная форма при регистрации, просьба помочь! |
Код |
---|
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); ?> <? ShowMessage($arParams["~AUTH_RESULT"]); ShowMessage($arResult['ERROR_MESSAGE']); ?> <? if($arResult['NEW_USER_REGISTRATION'] == 'Y' && ($arResult['USE_OPENID'] == 'Y' || $arResult['USE_LIVEID'] == 'Y')){?> <script type="text/javascript"> function SAAChangeAuthForm(v) { document.getElementById('at_bitrix').style.display = (v == 'bitrix') ? 'block' : 'none'; <? if ($arResult['USE_OPENID'] == 'Y') { ?>document.getElementById('at_openid').style.display = (v == 'openid') ? 'block' : 'none';<?}?> <? if ($arResult['USE_LIVEID'] == 'Y') { ?>document.getElementById('at_liveid').style.display = (v == 'liveid') ? 'block' : 'none';<?}?> } </script> <table border="0" cellpadding="0" cellspacing="0"> <form id="choosemethod"> <tr> <td><input type="radio" id="auth_type_bitrix" name="BX_AUTH_TYPE" value="bitrix" onclick="SAAChangeAuthForm(this.value)" checked></td> <td><label for="auth_type_bitrix"><?=GetMessage('AUTH_A_INTERNAL')?></label></td> </tr> <? if ($arResult['USE_OPENID'] == 'Y') { ?> <tr> <td><input type="radio" id="auth_type_openid" name="BX_AUTH_TYPE" value="openid" onclick="SAAChangeAuthForm(this.value)"></td> <td><label for="auth_type_openid"><?=GetMessage('AUTH_A_OPENID')?></label></td> </tr> <?}?> <? if ($arResult['USE_LIVEID'] == 'Y') { ?> <tr> <td><input type="radio" id="auth_type_liveid" name="BX_AUTH_TYPE" value="liveid" onclick="SAAChangeAuthForm(this.value)"></td> <td><label for="auth_type_liveid"><?=GetMessage('AUTH_A_LIVEID')?></label></td> </tr> <? } ?> </form> </table> <?}?> <div id="at_bitrix"> <form name="form_auth" method="post" target="_top" action="<?=$arResult["AUTH_URL"]?>"> <input type="hidden" name="AUTH_FORM" value="Y" /> <input type="hidden" name="TYPE" value="AUTH" /> <?if (strlen($arResult["BACKURL"]) > 0) { ?><input type='hidden' name='backurl' value='<?=$arResult["BACKURL"]?>' /><? } ?> <? foreach ($arResult["POST"] as $key => $value) { ?> <input type="hidden" name="<?=$key?>" value="<?=$value?>" /> <? } ?> <p><?=GetMessage("AUTH_PLEASE_AUTH")?></p> <table class="data-table"> <thead> <tr> <td colspan="2"><b><?=GetMessage("AUTH_AUTH")?></b></td> </tr> </thead> <tbody> <tr> <td><?=GetMessage("AUTH_LOGIN")?></td> <td><input type="text" name="USER_LOGIN" maxlength="50" value="<?=$arResult["LAST_LOGIN"]?>" /></td> </tr> <tr> <td><?=GetMessage("AUTH_PASSWORD")?></td> <td><input type="password" name="USER_PASSWORD" maxlength="50" /></td> </tr> </tbody> <tfoot> <? if ($arResult["STORE_PASSWORD"] == "Y") { ?> <tr> <td colspan="2"><label><input type="checkbox" id="USER_REMEMBER" name="USER_REMEMBER" value="Y" /> <?=GetMessage("AUTH_REMEMBER_ME")?></label></td> </tr> <? } ?> <tr> <td colspan="2" class="authorize-submit-cell"><input type="submit" name="Login" value="<?=GetMessage("AUTH_AUTHORIZE")?>" /></td> </tr> </tfoot> </table> <? if ($arParams["NOT_SHOW_LINKS"] != "Y") { ?> <p></p> <a href="/auth/index.php?register=yes"</a><b><?=GetMessage("AUTH_REGISTER")?></b></a> Если вы впервые на сайте, заполните пожалуйста регистрационную форму. <br /> <? if($arResult["NEW_USER_REGISTRATION"] == "N" && $arParams["AUTHORIZE_REGISTRATION"] != "Y") { ?> <p> <a href="<?=$arResult["AUTH_REGISTER_URL"]?>"><b><?=GetMessage("AUTH_REGISTER")?></b></a><br /> <?=GetMessage("AUTH_FIRST_ONE")?> <a href="<?=$arResult["AUTH_REGISTER_URL"]?>"><?=GetMessage("AUTH_REG_FORM")?></a> </p> <? } ?> <p> <a href="<?=$arResult["AUTH_FORGOT_PASSWORD_URL"]?>"><b><?=GetMessage("AUTH_FORGOT_PASSWORD_2")?></b></a><br /> <?=GetMessage("AUTH_GO")?> <a href="<?=$arResult["AUTH_FORGOT_PASSWORD_URL"]?> |