%PDF- %PDF-
| Direktori : /home/bitrix/www/local/components/UB/customer.public_profile/templates/.default/ |
| Current File : //home/bitrix/www/local/components/UB/customer.public_profile/templates/.default/template.php |
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
$APPLICATION->SetAdditionalCSS('/local/templates/UB/components/bitrix/catalog/template1/bitrix/catalog.element/.default/style.css');
if (strlen($arResult["ERRORS"])) {
?>
<div class="alert-danger alert">
<button type="button" class="close" data-dismiss="alert">×</button>
<?=$arResult["ERRORS"]?>
</div>
<?
}
if (isset($arResult['CUSTOMER'])) {
$APPLICATION->SetPageProperty('title',($arResult['ISADMIN']?GetMessage("ADMINISTRATION").' ':GetMessage("CUSTOMER_PROFILE")).$arResult['CUSTOMER']['SECOND_NAME'].GetMessage("ON_WEBSITE_UB"));
$APPLICATION->SetPageProperty('titleH2',$arResult['CUSTOMER']['SECOND_NAME']);
if ($arResult['ISADMIN']) $APPLICATION->SetPageProperty('type_profile',GetMessage("ADMINISTRATION"));
$arUser = $arResult['CUSTOMER'];
?>
<div class="sidebar col-lg-3 col-md-3 col-sm-4 col-xs-12">
<div class="portfolio-item">
<a class="portfolio-item-link" >
<span class="portfolio-item-hover"></span>
<img src="<?=CFile::GetPath($arUser['PERSONAL_PHOTO'])?>" alt="<?$arUser['SECOND_NAME']?>"/></a>
</div>
<div class="block-left-b1">
<? // найдём id профиля авторизованного юзера
$res = CIBlockElement::GetList(Array(), Array("IBLOCK_ID"=>2, "PROPERTY_ACCOUNT"=>$USER->GetID()));
if($ar_fields = $res->GetNext()) $profid = $ar_fields["ID"]; // id профиля
?>
<div class=" alert-warning alert" id="need_auth" style="display: none">
<?=GetMessage("ONLY_REGISTERED_USERS_CAN_CHAT_IN_MESSENGER")?>
<a id="regform-bottom" data-toggle="modal" data-target="#auth_form"><?=GetMessage("LOG_IN")?></a><?=GetMessage("OR")?>
<a id="regform-bottom" data-toggle="modal" data-target="#register_form" rel="nofollow"><?=GetMessage("JOIN")?></a>.
</div>
</div>
<div class="block-left-b1 tag-box" style="margin-bottom: 0">
<?
$res = CIBlockElement::GetByID(intval($arUser['PERSONAL_CITY']));
if($ar_res = $res->GetNext()) {$region = $ar_res["NAME"]; $s_id=$ar_res["IBLOCK_SECTION_ID"];}
$res = CIBlockSection::GetByID($s_id);
if($ar_res = $res->GetNext()) {$region = $region.", ".$ar_res["NAME"]; $s_id=$ar_res["IBLOCK_SECTION_ID"];}
$res = CIBlockSection::GetByID($s_id);
if($ar_res = $res->GetNext()) {$region = $region.", ".$ar_res["NAME"]; $s_id=$ar_res["IBLOCK_SECTION_ID"];}
?>
<div class="profile-region"><i class="fa fa-globe"></i> <?=$region?></div>
<?
function checkLink($url) {
$k = stripos($url, "://");
if ($k!==false) return $url;
return 'http://'.$url;
}
$socLinkHosts = array(
'vk' => '',
'facebook' => '',
'instagram' => '',
'pinterest' => '',
'twitter' => ''
);
function checkSite($url,$socLinkHosts) {
$url = parse_url($url);
foreach($socLinkHosts as $key => $value)
if (strpos($url['host'],$key.'.com')!==false) return false;
return true;
}
if (strlen($arUser['PERSONAL_MOBILE'])>0) { ?><div class="profile-contact">
<i class="fa fa-phone-square"></i> <a href="callto:<?=$arUser['PERSONAL_MOBILE'];?>"><?=$arUser['PERSONAL_MOBILE'];?></a></div><?
}
?><div class="profile_soc_link"><?
if (false && strlen($arUser['PERSONAL_MAILBOX'])>0) {
?><div><a class="soc-envelope-o" href="mailto:<?=$arUser['PERSONAL_MAILBOX'];?>"><i class="fa fa-envelope-o"></i></a></div><?
}
if (strlen($arUser['PERSONAL_WWW'])>0 && checkSite(checkLink($arUser['PERSONAL_WWW']),$socLinkHosts)) {
?><div><a class="soc-external-link-square" target="_blank" href="<?=checkLink($arUser['PERSONAL_WWW']);?>" rel="nofollow"><i class="fa fa-external-link-square"></i></a></div><?
}
if (strlen($arUser['PERSONAL_ICQ'])>0) {
?><div><a class="soc-skype" href="skype:<?=$arUser['PERSONAL_ICQ'];?>"><i class="fa fa-skype"></i></a></div><?
}
if (is_array($arUser['UF_SOCIAL']) && sizeof($arUser['UF_SOCIAL'])>0) {
foreach($arUser['UF_SOCIAL'] as $item) {
$url = parse_url(stripos($item, "://")===false?'http://'.$item:$item);
foreach($socLinkHosts as $key => $value)
if (stripos($url['host'], $key)!==false) $socLinkHosts[$key] = $item;
}
foreach($socLinkHosts as $key => $value)
if (strlen($value)>0) {
?><div><a href="<?=checkLink($value)?>" target="_blank" class="soc-<?=$key?>" rel="nofollow"><i class="fa fa-<?=$key?>"></i></a></div><?
}
}
?></div><?
?>
</div>
<div class="block-left-b1" style="margin-bottom: 30px">
<div class="favourite" style="text-align: center;" >
<button class="btn-special btn-grey" style="margin-left: 0" href="javascript:void(0)" onclick="if (BX.IM) { BXIM.openMessenger(<?=$arUser['ID']?>); return false; } else { $('#need_auth').show(); return false; }"><i class="fa fa-envelope-o"></i><?=GetMessage("MESSAGE")?></button>
</div>
</div>
</div>
<div class="posts-block col-lg-9 col-md-9 col-sm-8 col-xs-12">
<?if (strlen($arUser['PERSONAL_NOTES'])>0):?>
<h3 class="title"><?=GetMessage("GENERAL_INFORMATION")?></h3>
<p><?=nl2br($arUser['PERSONAL_NOTES'])?></p>
<?endif;?>
<h3 class="title"><?=GetMessage("OPEN_VACANCIES")?></h3>
<?
$GLOBALS['arSelfFilter'] = array('CREATED_BY'=>$arUser['ID'],'ACTIVE'=>'Y','SHOW_NEW'=>'N');
$APPLICATION->IncludeComponent( "bitrix:news.list", "job", Array(
"SHOW_SELF" => 'N',
"SHOW_RIGHT_BLOCK" => 'N',
"URL_AJAX" => "/adbase/job/load_ref.php",
"URL_POST" => "/adbase/job/post.php",
"URL_POST_FEEDBACK" => "/adbase/job/post_feedback.php",
"DISPLAY_DATE" => "Y",
"DISPLAY_NAME" => "Y",
"DISPLAY_PICTURE" => "Y",
"DISPLAY_PREVIEW_TEXT" => "Y",
"AJAX_MODE" => "N",
"IBLOCK_TYPE" => "casting",
"IBLOCK_ID" => "12",
"NEWS_COUNT" => "10",
"SORT_BY1" => "ACTIVE_FROM",
"SORT_ORDER1" => "DESC",
"SORT_BY2" => "TIMESTAMP_X",
"SORT_ORDER2" => "DESC",
"FILTER_NAME" => "arSelfFilter",
"FIELD_CODE" => array('CREATED_BY','DETAIL_PICTURE','TIMESTAMP_X','WF_NEW','DATE_ACTIVE_FROM','DATE_ACTIVE_TO','ACTIVE'),
"PROPERTY_CODE" => array(
'SECTIONS','SECTION','COUNTRY','CITY','CASTING_TEXT','COMPENSATION',
'COMPENSATION_CURRENCY','COMPENSATION_TYPE','PUBLIC_DATE','FEEDBACK_COUNT'),
"CHECK_DATES" => "Y",
"DETAIL_URL" => "",
"PREVIEW_TRUNCATE_LEN" => "",
"ACTIVE_DATE_FORMAT" => "d.m.Y",
"SET_TITLE" => "N",
"SET_BROWSER_TITLE" => "Y",
"SET_META_KEYWORDS" => "Y",
"SET_META_DESCRIPTION" => "Y",
"SET_STATUS_404" => "N",
"INCLUDE_IBLOCK_INTO_CHAIN" => "Y",
"ADD_SECTIONS_CHAIN" => "Y",
"HIDE_LINK_WHEN_NO_DETAIL" => "N",
"PARENT_SECTION" => "",
"PARENT_SECTION_CODE" => "",
"INCLUDE_SUBSECTIONS" => "Y",
"CACHE_TYPE" => "N",
"CACHE_TIME" => "36000000",
"CACHE_FILTER" => "N",
"CACHE_GROUPS" => "Y",
"PAGER_TEMPLATE" => ".default",
"DISPLAY_TOP_PAGER" => "N",
"DISPLAY_BOTTOM_PAGER" => "Y",
"PAGER_TITLE" => GetMessage("SERVICES"),
"PAGER_SHOW_ALWAYS" => "Y",
"PAGER_DESC_NUMBERING" => "N",
"PAGER_DESC_NUMBERING_CACHE_TIME" => "36000",
"PAGER_SHOW_ALL" => "Y",
"AJAX_OPTION_JUMP" => "N",
"AJAX_OPTION_STYLE" => "Y",
"AJAX_OPTION_HISTORY" => "N",
),
false
);?>
</div>
<?}