Esempio 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 
    if (!empty($feedback['login'])) {
        echo $feedback['uname'] . ' ' . $feedback['usurname'];
    } else {
        echo $feedback['login'];
    }
    ?>
">
            <img class="b-user__pic" width="50" height="50" alt="<?php 
    if (!empty($feedback['login'])) {
        echo $feedback['uname'] . ' ' . $feedback['usurname'];
    } else {
        echo $feedback['login'];
    }
    ?>
" src="<?php 
    echo tservices_helper::photo_src($feedback['photo'], $feedback['login']);
    ?>
"> 
            <?php 
    if (!empty($feedback['login'])) {
        echo $feedback['uname'] . ' ' . $feedback['usurname'] . ' [' . $feedback['login'] . ']';
    } else {
        echo $feedback['login'];
    }
    ?>
</a>
        <?php 
    if ($feedback['is_pro'] == 't') {
        ?>
        <a class="b-txt__lnk" href="/payed-emp/" title="PRO"><span class="b-icon b-icon__pro b-icon__pro_e b-icon_top_3"></span></a>
        <?php