%PDF- %PDF-
| Direktori : /home/bitrix/www/local/templates/p4_new/components/p4/p.main.profile/.default/ |
| Current File : //home/bitrix/www/local/templates/p4_new/components/p4/p.main.profile/.default/template_profi.php |
<?
/**
* @global CMain $APPLICATION
* @param array $arParams
* @param array $arResultwew
*/
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
include_once $_SERVER['DOCUMENT_ROOT'].'/local/templates/p4_new/includes/localru.php';
//echo '<pre>'; print_r($arResult["ERROR_OLD_PASSWORD"]); echo '</pre>';
?>
<script type="text/javascript">
<?if (SITE_ID == "p4") {?>
var LO_MESS = {
'REQUIRED_FIELD': 'Required field <b>',
'IS_NOT_FILLED': '</b> is not filled.<br/>',
'FOR_REQUIRED_FIELD': 'For required field <b>',
'VALUE_IS_NOT_SELECT': '</b> value is not select.<br/>',
'SPECIFIED_YEAR_OF_BIRTH_IS_NOT_VALID': 'Specified year of birth is not valid (age less than 14 years)',
}
<? } else {?>
var LO_MESS = {
'REQUIRED_FIELD': 'Укажите ваш <b>',
'IS_NOT_FILLED': '</b>',
'FOR_REQUIRED_FIELD': 'Укажите ваш <b>',
'VALUE_IS_NOT_SELECT': '</b>',
'SPECIFIED_YEAR_OF_BIRTH_IS_NOT_VALID': 'Указан недопустимый год рождения (возраст меньше 14 лет)',
}
<?};?>
</script>
<button type="button" id="btn-reg-conf" style="display: none;" data-reg-conf="<?=isset($_SESSION['REG_CONFIRMATION']) ? 'Y' : 'N';?>" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#confirm_active">
</button>
<button type="button" id="btn-merge" style="display: none;" data-merge="<?=(strlen($arResult["arUser_prof"]["TYPE"]) > 0 && intval($arResult["arUser_prof"]["TYPE"]) > 0) ? 'Y' : 'N';?>" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#merge_act">
</button>
<div class="modal fade nopadding violetbg2" tabindex="-1" role="dialog" id="confirm_active">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" style="margin-top: -4px;"><?=GetMessage("YOUR_PROFILE_HAS_BEEN_ACTIVATED");?></h4>
</div>
<div class="modal-body">
<p style="text-align: center; margin-top: 25px;"><?=GetMessage("NOW_YOU_CAN_START_TO_FILL_YOUR_PORTFOLIO");?></p>
</div>
<div class="modal-footer">
<button type="button" style="margin-right: 36%;" class="btn btn-default btn-transparent cancel_social" data-dismiss="modal">OK</button>
</div>
</div>
</div>
</div>
<div class="modal fade nopadding violetbg2" tabindex="-1" role="dialog" id="merge_act">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" style="margin-top: -4px;"><?=GetMessage("M_ATTENTION");?></h4>
</div>
<div class="modal-body">
<p style="text-align: center; margin-top: 25px;"><?=GetMessage("M_THE_MERGE_ACTION_CANNOT_BE_UNDONE");?></p>
<p style="text-align: center; margin-top: 25px;"><?=GetMessage("M_DO_YOU_WANT_TO_CONTINUE");?></p>
</div>
<div class="modal-footer" style="padding-right: 22.1%;">
<button id="merge_yes" type="button" class="btn btn-default btn-transparent cancel_social" data-dismiss="modal"><?=GetMessage("M_YES")?></button>
<button type="button" class="btn btn-default btn-transparent cancel_social" data-dismiss="modal"><?=GetMessage("M_NO")?></button>
</div>
</div>
</div>
</div>
<?
if (isset($_SESSION['REG_CONFIRMATION'])) {
unset($_SESSION['REG_CONFIRMATION']);
};
?>
<form class="form-account" method="post" name="form1" id="form_main_profile" onsubmit="return checkForm();"
action="<?=$arResult["FORM_TARGET"]?>" enctype="multipart/form-data">
<?=$arResult["BX_SESSION_CHECK"]?>
<input type="hidden" name="lang" value="<?=LANG?>" />
<input type="hidden" name="ID" value=<?=$arResult["ID"]?> />
<section id="tabs" class="welcomemod container-fluid lightgreybg">
<div class="row">
<div class="container">
<div class="row">
<div class="col-xs-6 t">
<div class="tc">
<a class="selected"><?=GetMessage('ACCOUNT_SETTINGS')?></a>
</div>
</div>
<div class="col-xs-6 t right savesettings">
<div class="tc">
<input id="save_form_btn" data-saved="<?=$arResult['DATA_SAVED']?>" class="btn btn-default btn-lg btn-transparent" type="submit" name="save" value="<?=GetMessage('SAVE_SETTINGS')?>">
</div>
</div>
</div>
</div>
</div>
</section>
<section id="accountsettings" class="container-fluid">
<div class="row">
<div class="container">
<div class="row">
<div class="col-xs-2" style="margin-left: 50px;">
</div>
<div class="col-xs-7">
<table class="profile-table data-table">
<tbody>
<? $APPLICATION->IncludeComponent("bitrix:menu", "p.profile", array(
"ROOT_MENU_TYPE" => "profile",
"MENU_CACHE_TYPE" => "N",
"MENU_CACHE_TIME" => "3600",
"MAX_LEVEL" => "1",
"USE_EXT" => "N",
"DELAY" => "N",
"ALLOW_MULTI_SELECT" => "N"
),
false
);?>
<tr style="display:none;">
<td><?=GetMessage('EMAIL_USERNAME')?><span class="starrequired">*</span></td>
<td><input type="text" name="LOGIN" maxlength="50" value="<? echo $arResult["arUser"]["LOGIN"]?>" /></td>
</tr>
<tr class="divider" id="nametr">
<td><span id="desc-name"><?=GetMessage('NAME')?> *</span>
<span id="name_popup" class="popup_error"
data-content="<?=GetMessage('NAME_POPUP')?>"
data-placement="top"
></span>
</td>
<td><input class="prof_fio form-control" type="text" data-required="desc-name" name="NAME" maxlength="50"
value="<?=$arResult["arUser"]["NAME"]?>" /></td>
</tr>
<tr>
<td><span id="desc-last-name"><?=GetMessage('LAST_NAME')?> *</span>
<span id="last-name-popup" class="popup_error"
data-content="<?=GetMessage('LAST_NAME_POPUP')?>"
data-placement="top"
></span>
</td>
<td><input class="prof_fio form-control" type="text" data-required="desc-last-name" name="LAST_NAME" maxlength="50"
value="<?=$arResult["arUser"]["LAST_NAME"]?>" /></td>
</tr>
<tr>
<td><?=GetMessage('PAGE_ADDRESS')?>
<span class="popup_help"
data-trigger="hover"
data-content="<?=GetMessage('PAGE_ADDRESS_FOR_LINK_TO_THE_PROFILE')?>"
><!--<i class="fa fa-question-circle"></i>--></span>
</td>
<?/*if (SITE_ID=="ru"){
$spanpage = "ru/";
$widthpage = "78.7";
$widthspan = "22.3";
} else {
$spanpage = "";
$widthpage = "82.5";
$widthspan = "17.5";
};*/?>
<td><span style="width: 17.5%">port4lio.pro/</span><input style="display: inline-block; width: 82.5%" class="form-control" type="text" id="PROFILE_CODE" name="PROFILE_CODE" maxlength="50"
value="<?=$arResult["arUser_prof"]["CODE"]?>" /></td>
</tr>
<tr style="display: none;">
<td>
</td>
<td>
<?
$rsEnum = CUserFieldEnum::GetList(array(), array("ID" =>$arResult['arUser']['UF_USR']));
if ($arEnum = $rsEnum->GetNext()):
$modelID = $arEnum["XML_ID"];
?>
<input type="hidden" name="CAT_PROF" value="<?=$arEnum["XML_ID"]?>" />
<?endif;?>
</td>
</tr>
<tr>
<td><span id="desc-email"><?=GetMessage('EMAIL')?> *</span>
<span id="desc-email1" class="popup_error"
data-content=""
data-placement="top"
></span>
<span class="popup_help"
data-trigger="hover"
data-content="<?=GetMessage('EMAIL_IS_USED_AS_A_LOGIN')?>"
><i class="fa fa-question-circle"></i></span>
</td>
<td><input type="text" class="form-control" data-required="desc-email" name="EMAIL" maxlength="50"
value="<? echo $arResult["arUser"]["EMAIL"]?>" /></td>
</tr>
<tr class="password">
<td class="pad20"><span id="old_p_td" <?=$arResult['ERROR_OLD_PASSWORD'] == "Y" ? "class='required_error'" : "";?>><?=GetMessage('OLD_PASSWORD_REQ')?></span>
<span class="popup_help"
data-trigger="hover"
data-content="<?=GetMessage('LEAVE_PASSWORD_FIELDS_EMPTY')?>"
><i class="fa fa-question-circle"></i></span>
<span id="old_passw" data-old-p="<?=$arResult['ERROR_OLD_PASSWORD'] == "Y" ? "Y" : "N";?>" class="popup_error"
data-content="<?=GetMessage('INVALID_PASSWORD')?>"
data-placement="top"
></span>
</td>
<td><input type="password" class="form-control" name="OLD_PASSWORD" maxlength="50" value="" autocomplete="off" class="bx-auth-input" /></td>
</tr>
<tr class="password">
<td class="pad20"><span id="new_p_td" <?=$arResult['ERROR_LESS_SYMBOLS'] == "Y" ? "class='required_error'" : "";?>><?=GetMessage('NEW_PASSWORD_REQ')?></span>
<span class="popup_help" id="passw_requir" data-less-symb="<?=$arResult['ERROR_LESS_SYMBOLS'] == "Y" ? "Y" : "N";?>"
data-trigger="hover"
data-content="<?echo $arResult["GROUP_POLICY"]["PASSWORD_REQUIREMENTS"];?>"
><i class="fa fa-question-circle"></i></span>
</td>
<td><input type="password" class="form-control" name="NEW_PASSWORD" maxlength="50" value="" autocomplete="off" /></td>
</tr>
<tr>
<td class="pad23"><span id="desc-sex"><?=GetMessage('SEX')?> *</span>
<span id="desc-sex1" class="popup_error"
data-content="<?=GetMessage("SELECT_YOUR_GENDER");?>"
data-placement="top"
></span>
</td>
<td>
<div id="SEX">
<div class="n-active-man" id="male_outer2">
<label id="mls-lab2" title="<?=GetMessage("MALE")?>">
<div>
<input type="checkbox" <?echo $arResult["arUser_prof"]["SEX"]==19 ? 'checked="checked"': ''?>
name="male"
id="sex_male"
class="male"
value="Y"><span class="letter_sex"><?=GetMessage("SEL_MALE")?></span>
</div>
</label>
</div>
<div class="n-active-woman" id="female_outer2">
<label id="fmls-lab2" title="<?=GetMessage("FEMALE")?>">
<div>
<input type="checkbox" <?echo $arResult["arUser_prof"]["SEX"]==20 ? 'checked="checked"': ''?>
name="female"
id="sex_female"
class="female"
value="Y"><span class="letter_sex"><?=GetMessage("SEL_FEMALE")?></span>
</div>
</label>
</div>
</div>
</td>
</tr>
<?if (isset($arResult["arUser_prof"]["BDATE"]) && strlen($arResult["arUser_prof"]["BDATE"]) > 0)
{
if (SITE_ID=="p4")
{
$arBirthDate = explode("/",$arResult["arUser_prof"]["BDATE"]);
$u_month = $arBirthDate[0];
$u_day = $arBirthDate[1];
$u_year = $arBirthDate[2];
}
else
{
$arBirthDate = explode(".",$arResult["arUser_prof"]["BDATE"]);
$u_month = $arBirthDate[1];
$u_day = $arBirthDate[0];
$u_year = $arBirthDate[2];
};
};?>
<tr>
<td class="pad23"><span id="desc-bdate"><?=GetMessage("BIRTHDAY")?> *</span>
<span id="desc-bdate1" class="popup_error"
data-content=""
data-placement="top"
></span>
</td>
<td>
<span id="date_b"></span>
<input class="form-control" style="display: none;" type="text"
id="BDATE" data-required="desc-bdate" name="BDATE" value="<?=$arResult["arUser_prof"]["BDATE"]?>" />
<!--
<?if (SITE_ID == "p4"):?>
<div class="col-xs-2" id="sel_month">
<select class="selectpicker show-tick form-control">
<option value="__"><?=GetMessage("SELECT_MONTH")?></option>
<?foreach($arMonthSelect["p4"] as $key => $val):?>
<option <?echo isset($u_month) && $key == $u_month ? 'selected': ''?>
value="<?=$key?>"><?=$val?></option>
<?endforeach;?>
</select>
</div>
<?endif?>
<div class="col-xs-2" id="sel_day">
<select class="selectpicker show-tick form-control">
<option value="__"><?=GetMessage("SELECT_DAY")?></option>
<?for($i=1; $i <= 31; $i++):?>
<?$valday = $i < 10 ? "0".$i : "".$i;?>
<option <?echo isset($u_day) && $i == intval($u_day) ? 'selected': ''?>
value="<?=$valday?>"><?=$i?></option>
<?endfor;?>
</select>
</div>
<?if (SITE_ID == "ru"):?>
<div class="col-xs-2" id="sel_month">
<select class="selectpicker show-tick form-control">
<option value="__"><?=GetMessage("SELECT_MONTH")?></option>
<?foreach($arMonthSelect["ru"] as $key => $val):?>
<option <?echo isset($u_month) && $key == $u_month ? 'selected': ''?>
value="<?=$key?>"><?=$val;?></option>
<?endforeach;?>
</select>
</div>
<?endif?>
<div class="col-xs-2" id="sel_year">
<select class="selectpicker show-tick form-control">
<option value="____"><?=GetMessage("SELECT_YEAR")?></option>
<?for($j=1950; $j <= 1999; $j++):?>
<option <?echo isset($u_year) && $j == intval($u_year) ? 'selected': ''?>
value="<?="".$j?>"><?=$j?></option>
<?endfor;?>
</select>
</div>
<input class="form-control" style="display: none" type="text"
id="PERSONAL_BIRTHDAY" data-required="desc-bdate" name="PERSONAL_BIRTHDAY" value="<?=$arResult["arUser"]["PERSONAL_BIRTHDAY"]?>">
--></td>
</tr>
<tr>
<td class="pad23"><span id="desc-city"><?=GetMessage("USER_CITY");?> *</span>
<span id="desc-city1" class="popup_error"
data-content=""
data-placement="top"
></span>
</td>
<td>
<input type="hidden" id="arUser_prof_CITY" value="<?=$arResult["arUser_prof"]["CITY"]?>">
<select class="form-control" id="PERSONAL_CITY" data-required="desc-city" name="PROF_PERSONAL_CITY" data-placeholder="<?=GetMessage("SELECT_THE_CITY")?>">
</select>
</td>
</tr>
<tr>
<td>
</td>
<td class="pad20">
<label id="create_single">
<input type="checkbox" value="1" name="SINGLE_PROFILE" style="display: inline;" <?if (strlen($arResult["arUser_prof"]["TYPE"]) > 0 && intval($arResult["arUser_prof"]["TYPE"]) > 0) echo "checked='checked' disabled data-disabled='Y'";?> />
<div><?=GetMessage("CREATE_SINGLE_PROFILE");?><br/>Port4lio.pro / UnitedBeauty.pro</div>
</label>
</td>
</tr>
<tr class="divider">
<td><span id="mailing"><?=GetMessage("MAILING");?></span>
</td>
<td class="pad30">
<label id="adm_mailing">
<input type="checkbox" style="display: inline;" <?if(isset($arResult["arUser"]["UF_P4_ADM_NEWS"]) &&
intval($arResult["arUser"]["UF_P4_ADM_NEWS"]) > 0) echo "checked ";?>value="1" name="UF_P4_ADM_NEWS" />
<div><?=GetMessage("ADMINISTRATION_NEWSLETTER");?></div>
</label>
<label id="subscribe_comments">
<input type="checkbox" style="display: inline;" <?if(isset($arResult["arUser"]["UF_P4_CC_NOTIF"]) &&
intval($arResult["arUser"]["UF_P4_CC_NOTIF"]) > 0) echo "checked ";?>value="1" name="UF_P4_CC_NOTIF" />
<div><?=GetMessage("SUBSCRIBE_TO_COMMENTS");?></div>
</label>
</td>
</tr>
<tr class="divider">
<td><td>
<td></td>
<tr>
</tbody>
</table>
<!--<form class="form-account">
<div class="col-xs-6">
<input id="name" class="form-control" autofocus="" type="text" placeholder="Name" onFocus="value=''">
</div>
<div class="col-xs-6">
<input id="surname" class="form-control" required="" type="text" placeholder="Surname" onFocus="value=''">
</div>
<div class="col-xs-12 ">
<input id="inputPageAdress" class="form-control" required="" type="text" placeholder="Page adress" onFocus="value=''">
</div>
<div class="col-xs-12">
<input id="inputEmail" class="form-control" required="" type="email" placeholder="E-mail" onFocus="value=''">
</div>
<div class="col-xs-6">
<input id="oldPassword" class="form-control" required="" type="password" placeholder="Old Password" onFocus="value=''">
</div>
<div class="col-xs-6">
<input id="newPassword" class="form-control" required="" type="password" placeholder="New Password" onFocus="value=''">
</div>
<div class="col-xs-6 center">
<div id="gender">
<a id="male" title="male"><i class="fa fa-mars"></i></a>
<a id="female" title="female"><i class="fa fa-venus"></i></a></div>
</div>
<div class="col-xs-6 lolbirthday">
<select class="selectpicker show-tick form-control">
<option selected>Birthday dd-hh-year</option>
<option>Birthday</option>
<option>Birthday</option>
</select>
</div>
<div class="col-xs-6">
<select class="selectpicker show-tick form-control">
<option selected>Country</option>
<option>Country</option>
<option>Country</option>
</select>
</div>
<div class="col-xs-6">
<select class="selectpicker show-tick form-control">
<option selected>City</option>
<option>City</option>
<option>City</option>
</select>
</div>
<div class="col-xs-4">
<input id="index" class="form-control" required="" type="index" placeholder="Index" onFocus="value=''">
</div>
<div class="col-xs-8">
<input id="adress" class="form-control" required="" type="adress" placeholder="Adress" onFocus="value=''">
</div>
<div class="col-xs-8 newsandspecials">
<div class="col-xs-12 nopadding">
<h3>Mail Notification</h3>
</div>
<div class="col-xs-12 nopadding">
<input id="news" value="subscription" name="news" type="checkbox">
<label for="news" class="news"></label>
<label for="news" class="notyet light">Subscribe for news</label>
</div>
<div class="col-xs-12 nopadding">
<input id="special" value="subscription" name="special" type="checkbox">
<label for="special" class="special"></label>
<label for="special" class="notyet light">Subscribe for special offers</label>
</div>
</div>
</form>-->
</div>
<!-- col-xs-7 -->
<!-- newsandspecials -->
</div>
</div>
</div>
</section>
</form>
<script type="text/javascript">
var mdate = new Date();
yearEnd_BD = mdate.getFullYear()-14;
BX.ready(function(){
$("#date_b").simpleDatePicker({
output:"#BDATE",
months:<?=SITE_ID == "p4" ? "['January','February','March','April','May','June','July','August','September','October','November','December']" :
"['Январь','Февраль','Март','Апрель','Май','Июнь','Июль','Август','Сентябрь','Октябрь','Ноябрь','Декабрь']";?>,
format: '<?=SITE_ID == "p4" ? "mm/dd/yyyy" : "dd.mm.yyyy";?>',
text: {
day:'<?=GetMessage("SELECT_DAY")?>',
month:'<?=GetMessage("SELECT_MONTH")?>',
year:'<?=GetMessage("SELECT_YEAR")?>'
},
date: {
min: '<?=SITE_ID == "p4" ? "07/31/1966" : "31.07.1966";?>',
max: <?if (SITE_ID == "p4") {?>'03/31/'+yearEnd_BD<?} else {?>'31.03.'+yearEnd_BD<?}?>,
selected: <?if (SITE_ID == "p4") {?>'<?=$u_month?>/<?=$u_day?>/<?=$u_year?>'<?} else {?>'<?=$u_day?>.<?=$u_month?>.<?=$u_year?>'<?}?>,
},
css:'selectpicker show-tick form-control',
order: '<?=SITE_ID == "p4" ? "m-d-y" : "d-m-y";?>'
});
<?if (isset($u_day)) {?>
$("select[name='day'] [value='<?=$u_day?>']").attr("selected","selected");
<?};?>
<?if (isset($u_month)) {?>
$("select[name='month'] [value='<?=$u_month?>']").attr("selected","selected");
<?};?>
<?if (isset($u_year)) {?>
$("select[name='year'] [value='<?=$u_year?>']").attr("selected","selected");
<?};?>
<?if (strlen($arResult["strProfileError"]) > 0 && stripos($arResult["strProfileError"], "E-Mail") !== false) {
?>
var err_email = '<?=GetMessage("INCORRECT_EMAIL");?>';
$('#desc-email').addClass('required_error');
$('#desc-email1').attr("data-content",err_email);
$('#desc-email1').popover('show');
$("input[name='EMAIL']").focus(function() {
$('#desc-email1').popover('hide');
});
<?
}
elseif ($arResult['DATA_SAVED'] == 'Y') {
?>
$("#save_form_btn").addClass("grey");
<?
}?>
});
</script>
<!--<script type="text/javascript">
BX.ready(function(){
var jmonth = '<?=isset($u_month) ? $u_month : "__"?>';
var jday = '<?=isset($u_day) ? $u_day : "__"?>';
var jyear = '<?=isset($u_year) ? $u_year : "____"?>';
$("#sel_month select").change(function(){
jmonth = $(this).val();
<?if (SITE_ID=="p4"){?>
$("#PERSONAL_BIRTHDAY").val(jmonth+"/"+jday+"/"+jyear);
<?} else {?>
$("#PERSONAL_BIRTHDAY").val(jday+"."+jmonth+"."+jyear);
<?};?>
});
$("#sel_day select").change(function(){
jday = $(this).val();
<?if (SITE_ID=="p4"){?>
$("#PERSONAL_BIRTHDAY").val(jmonth+"/"+jday+"/"+jyear);
<?} else {?>
$("#PERSONAL_BIRTHDAY").val(jday+"."+jmonth+"."+jyear);
<?};?>
});
$("#sel_year select").change(function(){
jyear = $(this).val();
<?if (SITE_ID=="p4"){?>
$("#PERSONAL_BIRTHDAY").val(jmonth+"/"+jday+"/"+jyear);
<?} else {?>
$("#PERSONAL_BIRTHDAY").val(jday+"."+jmonth+"."+jyear);
<?};?>
});
});
</script>-->