%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/bitrix/www/local/templates/p4_new/components/bitrix/news.list/slider/
Upload File :
Create Path :
Current File : //home/bitrix/www/local/templates/p4_new/components/bitrix/news.list/slider/template.php

<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
/** @var array $arParams */
/** @var array $arResult */
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
global $USER;
$usrid = $USER->GetID();
if (CModule::IncludeModule("iblock")) $mod=true;
$res = CIBlockElement::GetList(Array(),array("ACTIVE"=>"Y", "PROPERTY_ACCOUNT"=>intval($usrid), "IBLOCK_ID"=>2, ">DETAIL_PICTURE"=>0, ">PROPERTY_REGION"=>0, ">PROPERTY_BDATE"=>0, ">PROPERTY_SEX"=>0, "PROPERTY_TYPE_P4"=>ProfileTypeHelper::getTypesP4()),
    false, false, array("ID", "IBLOCK_ID", "CODE", "DETAIL_PICTURE", "PROPERTY_ACCOUNT"));
if ($ar_res = $res->GetNext()){
    $disable = false;
} else {
    $disable = true;
};
?>
<?//echo '<pre>'; print_r($arResult["ITEMS"]); echo '</pre>';?>
<section id="welcome" class="welcome container-fluid center violetbg">
	<div class="row">
		<div id="keyvisual">
		</div>
	</div>
</section>

     <script type="text/javascript">

        BX.ready(function() {
            
            // Create new slider instance
            var my_slider = $('#keyvisual').fws2();
            
            //  Set slider settings (optional)
            my_slider.settings({
                cs              : 0,                                     // Current slide; 0 - first, 1 - second etc...
                duration        : 750,                                   // Slide duration; milliseconds
                hoverpause      : 1,                                     // Pause on hover; 1 - Yes, 0 - No
                pause           : 6000,                                  // Pause before go to next slide; milliseconds
                arrows          : 1,                                     // Display arrows; 1 - Yes, 0 - No
                bullets         : 0,                                     // Display bullets; 1 - Yes, 0 - No
                expandDuration  : 750,                                   // Initial height animation duration, milliseconds
                linktext        : 'Read More',                           // Button Text (Global setting)
                
                                                                         // Advanced options
                titleHTML       : '<h4">%title%</h4>',                    // Custom HTML for the Title
                descriptionHTML : '<div style="margin: 0 auto;" class="col-xs-12 t copyright"><div class="tc"><h1 style="line-height: 150%;">%desc%</h1></div></div>',                       // Custom HTML for the Description
                linkHTML        : '<div class="col-xs-12 createportfolio"><a class="btn btn-default btn-lg btn-transparent<?=$USER->IsAuthorized() ? '' : ' signuplink'?>" href="%link%">%linktext%</a></div>',     // Custom HTML for the link button
                
                beforeInit      : function() {},                         // Function to run before slider init 
                afterInit       : function() {},                         // Function to run after slider init 
                slideStart      : function(slide) {},                    // Function to run on slide start, returns the slide object
                slideEnd        : function(slide) {}                     // Function to run on slide end, returns the slide object
            });
            <?foreach($arResult["ITEMS"] as $arItem):?>
				<?
				$this->AddEditAction($arItem['ID'], $arItem['EDIT_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_EDIT"));
				$this->AddDeleteAction($arItem['ID'], $arItem['DELETE_LINK'], CIBlock::GetArrayByID($arItem["IBLOCK_ID"], "ELEMENT_DELETE"), array("CONFIRM" => GetMessage('CT_BNL_ELEMENT_DELETE_CONFIRM')));
				?>
				
            // Add slide
            my_slider.addSlide({
                image       : '<?=$arItem["DETAIL_PICTURE"]["SRC"]?>',   // Image src
                title       : '<?=$arItem["DETAIL_PICTURE"]["TITLE"]?>',           // Title
                description : '<?=SITE_ID == "p4" ? $arItem["DISPLAY_PROPERTIES"]["DETAIL"]["~VALUE"] : $arItem["DISPLAY_PROPERTIES"]["DETAIL_RU"]["~VALUE"];?>',       // Slide Description
                linktext    : '<?=SITE_ID == "p4" ? $arItem["DISPLAY_PROPERTIES"]["BUTTON_TEXT"]["VALUE"] : $arItem["DISPLAY_PROPERTIES"]["BUTTON_TEXT_RU"]["VALUE"];?>',                  // Button Text (Optional, will use the global settings otherwise )
                link        : '<?=strpos($arItem["DISPLAY_PROPERTIES"]["LINK"]["VALUE"],"ttp") ? $arItem["DISPLAY_PROPERTIES"]["LINK"]["VALUE"] : (strpos($arItem["DISPLAY_PROPERTIES"]["LINK"]["VALUE"],"uth/") ? ($USER->IsAuthorized() ? ($disable ? SITE_DIR."auth/" : SITE_DIR.$arItem["DISPLAY_PROPERTIES"]["LINK"]["VALUE"]) : SITE_DIR."index.php#signup") : SITE_DIR.$arItem["DISPLAY_PROPERTIES"]["LINK"]["VALUE"])?>'     // Read More URL link
            });
            <?endforeach;?>

            // Start the slider
            my_slider.start();
	        
	        <? $lang = LANG == 'ru' ? 'ru' : 'en' ?>
	        
	        var app_slide = $(".createportfolio a[href^='http']").parent('div');
	        app_slide.html(
	        	'<a href="https://itunes.apple.com/app/port4lio/id1067633956?l=<?=$lang?>&mt=8" target="_blank"><img src="<?=SITE_TEMPLATE_PATH?>/img/white_app_ios.png" alt="Download on the App Store" style="width: auto; height: 57px; margin: 0; padding: 0"/></a>'
		        +'<a href="https://play.google.com/store/apps/details?id=com.port4lio&hl=<?=$lang?>" target="_blank"><img src="<?=SITE_TEMPLATE_PATH?>/img/white_app_android.png" alt="Download on the Google Play" style="width: auto; height: 57px; margin: 0; padding: 0"/></a>'
	        );
        });

    </script>
              

Zerion Mini Shell 1.0