Добро пожаловать на сайт <БагБД>, где вы можете задавать вопросы о программировании и разработке на Битрикс и Битрикс24, и получать быстрые и квалифицированные ответы от профессионалов!

Выходит ошибка с tamplate.php

00 голосов
1
код: if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();


if (count($arResult["ERRORS"]) > 0)
{
echo '<div class="error">';
foreach ($arResult["ERRORS"] as $key => $error)
{
if (intval($key) <= 0)
$arResult["ERRORS"][$key] = str_replace("#FIELD_NAME#", """.GetMessage("REGISTER_FIELD_".$key).""", $error);
}

echo(implode("<br />", $arResult["ERRORS"]));
echo '</div>';

{
elseif($arResult["USE_EMAIL_CONFIRMATION"] === "Y")
}
?><p class="alt"><?echo GetMessage("REGISTER_EMAIL_WILL_BE_SENT")?></p><?
?>

<form method="post" action="<?=POST_FORM_ACTION_URI?>" name="regform" enctype="multipart/form-data">
<?
if (strlen($arResult["BACKURL"]) > 0)
{
?>
<input type="hidden" name="backurl" value="<?=$arResult["BACKURL"]?>" />
<?
}
?>

<thead> <h2 class="bottom"><?=GetMessage("AUTH_REGISTER")?></h2> </thead> <tbody> <?foreach ($arResult["SHOW_FIELDS"] as $FIELD):?> <label for="REGISTER[<?=$FIELD?>]"><?=GetMessage("REGISTER_FIELD_".$FIELD)?>:<?if ($arResult["REQUIRED_FIELDS_FLAGS"][$FIELD] == "Y"):?><span class="starrequired">*</span><?endif?></label> <? switch ($FIELD) { case "PASSWORD": case "CONFIRM_PASSWORD": ?><input size="17" class="superlarge" type="password" name="REGISTER[<?=$FIELD?>]" /><? break; case "PERSONAL_GENDER": ?><select name="REGISTER[<?=$FIELD?>]"> <option value=""><?=GetMessage("USER_DONT_KNOW")?></option> <option value="M"<?=$arResult["VALUES"][$FIELD] == "M" ? " selected=\"selected\"" : ""?>><?=GetMessage("USER_MALE")?></option> <option value="F"<?=$arResult["VALUES"][$FIELD] == "F" ? " selected=\"selected\"" : ""?>><?=GetMessage("USER_FEMALE")?></option> </select><? break; case "PERSONAL_COUNTRY": //echo "<pre>"; print_r($arResult["COUNTRIES"]); echo "</pre>"; ?><select name="REGISTER[<?=$FIELD?>]" class="superlarge"><? foreach ($arResult["COUNTRIES"]["reference_id"] as $key => $value) { ?> <? $selected = ''; if (!empty($arResult["VALUES"][$FIELD]) && $value == $arResult["VALUES"][$FIELD]): $selected = 'selected="selected"'; elseif (empty($arResult["VALUES"][$FIELD]) && $value == '1'): //஠󬮫𐍂𐍨𐉂𐇐ﲱ鿧 $selected = 'selected="selected"'; endif; ?> <option value="<?=$value?>" <?=$selected?>><?=$arResult["COUNTRIES"]["reference"][$key]?></option> <? } ?></select><? break; case "PERSONAL_PHOTO": case "WORK_LOGO": ?><input size="30" type="file" name="REGISTER_FILES_<?=$FIELD?>" /><? break; case "PERSONAL_NOTES": case "WORK_NOTES": ?><textarea cols="30" rows="5" name="REGISTER[<?=$FIELD?>]"><?=$arResult["VALUES"][$FIELD]?></textarea><? break; default: if ($FIELD == "PERSONAL_BIRTHDAY"):?><small><?=$arResult["DATE_FORMAT"]?></small><br /><?endif; ?><input size="17" class="superlarge" type="text" name="REGISTER[<?=$FIELD?>]" value="<?=$arResult["VALUES"][$FIELD]?>" /><? if ($FIELD == "PERSONAL_BIRTHDAY") $APPLICATION->IncludeComponent( 'bitrix:main.calendar', '', array( 'SHOW_INPUT' => 'N', 'FORM_NAME' => 'regform', 'INPUT_NAME' => 'REGISTER[PERSONAL_BIRTHDAY]', 'SHOW_TIME' => 'N' ), null, array("HIDE_ICONS"=>"Y") ); ?><? }?> <?endforeach?> <?// ********************* User properties ***************************************************?> <?if($arResult["USER_PROPERTIES"]["SHOW"] == "Y"):?> <?foreach ($arResult["USER_PROPERTIES"]["DATA"] as $FIELD_NAME => $arUserField):?> <?endforeach;?> <?endif;?> <?// ******************** /User properties ***************************************************?> <? /* ௤ੱ먠*/?> <? if (count($arResult['SUBSCRIPTIONS']["RUBRICS"]) > 0):?>   <h3 class="">Ю尨񠲼񿠭ࡰᲱ󫪳</h3> <? endif; ?> <? foreach($arResult['SUBSCRIPTIONS']["RUBRICS"] as $itemID => $itemValue):?> <input type="checkbox" name="sf_RUB_ID[]" id="sf_RUB_ID_<?=$itemID?>" value="<?=$itemValue["ID"]?>" checked /> <label for="sf_RUB_ID_<?=$itemID?>"><?=$itemValue["NAME"]?></label> — <span><?=$itemValue["DESCRIPTION"]?></span> <?if($arResult["SHOW_COUNT"]):?> <?=$itemValue["SUBSCRIBER_COUNT"]?> <?endif?> <? endforeach;?> <? /* CAPTCHA
<?=strLen(trim($arParams["USER_PROPERTY_NAME"])) > 0 ? $arParams["USER_PROPERTY_NAME"] : GetMessage("USER_TYPE_EDIT_TAB")?>
<?=$arUserField["EDIT_FORM_LABEL"]?>:<?if ($arUserField["MANDATORY"]=="Y"):?><span class="required">*</span><?endif;?>
<?$APPLICATION->IncludeComponent(
"bitrix:system.field.edit",
$arUserField["USER_TYPE"]["USER_TYPE_ID"],
array("bVarsFromForm" => $arResult["bVarsFromForm"], "arUserField" => $arUserField, "form_name" => "regform"), null, array("HIDE_ICONS"=>"Y"));?>
спросил 15 Янв, 14 от Aitha (100 баллов)

1 Ответ

00 голосов
Жуть
Код
}
}

echo(implode("", $arResult["ERRORS"]));
echo '</div>';

{
elseif($arResult["USE_EMAIL_CONFIRMATION"] === "Y")
} 


может так:
Код
}
}
elseif($arResult["USE_EMAIL_CONFIRMATION"] === "Y")
{

} 
ответил 01 Май, 14 от NitroGeN (2,840 баллов)

Похожие вопросы

0 голосов
8 ответов
0 голосов
2 ответов
0 голосов
2 ответов