Exemplo n.º 1
0
<div class="b-layout b-layout_center" style="width:222px;">
    <?php 
foreach ($tservices as $tservice) {
    $user = $tservice['user'];
    $user_url = sprintf('/users/%s', $user['login']);
    $tservice_url = sprintf('/tu/%d/%s.html', $tservice['id'], tservices_helper::translit($tservice['title']));
    $avatar_url = tservices_helper::photo_src($user['photo'], $user['login']);
    $hasVideo = false;
    if ($hasVideo) {
        $video = current($tservice['videos']);
        $video_thumbnail_url = tservices_helper::setProtocol($video['image']);
        $thumbnail200x150 = '<img width="200" height="150" class="b-pic" src="' . $video_thumbnail_url . '">';
    } elseif (!empty($tservice['file'])) {
        $image_url = tservices_helper::image_src($tservice['file'], $user['login']);
        $thumbnail200x150 = '<img width="200" height="150" class="b-pic" src="' . $image_url . '">';
    } else {
        $thumbnail200x150 = '<div class="b-pic b-pic_no_img b-pic_w200_h150 b-pic_bg_f2"></div>';
    }
    $hasVideo = !empty($tservice['videos']) && count($tservice['videos']);
    $sold_count = isset($tservice['count_sold']) ? $tservice['count_sold'] : $tservice['total_feedbacks'];
    ?>
	<figure class="i-pic i-pic_pad_10 i-pic_height_265 i-pic_bord_green_hover">
            <div class="b-layout b-layout_relative">
                <a class="b-pic__lnk b-pic__lnk_relative" href="<?php 
    echo $tservice_url;
    ?>
">
                    <?php 
    if ($hasVideo) {
        ?>
<div class="b-icon b-icon__play b-icon_absolute b-icon_bot_4 b-icon_left_4"></div><?php 
Exemplo n.º 2
0
                <a data-type="video" data-autoplay="<?php 
            if ($key > 0) {
                ?>
1<?php 
            } else {
                ?>
0<?php 
            }
            ?>
" data-source="<?php 
            echo $video['video'];
            ?>
" class="b-gallery__link" href="javascript:void(0)">
                    <div class="b-gallery__play-btn"></div>
                    <img alt="" class="b-gallery__thumb" src="<?php 
            echo tservices_helper::setProtocol($video['image']);
            ?>
" />
                </a>
            </li> 
            <?php 
        }
    }
    ?>
            <?php 
    if ($cnt_img) {
        foreach ($data['images'] as $key => $image) {
            ?>
            <li class="b-gallery__item <?php 
            if ($hide_img) {
                ?>