Esempio n. 1
0
        ?>
" target="_blank" class="btn btn-primary btn-large">立刻购买</a>&nbsp;&nbsp;&nbsp;&nbsp;<button id="X_Item-Get-Publish-Btn" data-url="http://auction1.paipai.com/<?php 
        echo get_the_share_key($item['share_key']);
        ?>
" type="button" class="btn btn-success btn-large X_Publish">我要分享</button></td></tr>
                        </tbody>
                    </table>
                </div>
                <div id="X_Item-Get-Recommend" class="xt-widget-recommend-side clearfix hide" data-platform="<?php 
        echo $item['from_type'];
        ?>
" data-cid="<?php 
        echo $item['cat'];
        ?>
" data-id="<?php 
        echo get_the_share_key($item['share_key']);
        ?>
" style="height:288px;padding-top:7px;">
                    <div class="hd"><h4><span>猜你喜欢</span></h4></div>
                    <div class="bd">
                        <ul class="media-list">
                        </ul>               
                    </div>
                </div>
            </div>
        </div>
        <?php 
    }
} else {
    xt_not_found('“请用淘宝、天猫、聚划算、拍拍的宝贝网址查返利”');
}
Esempio n. 2
0
function get_the_user_container($_params = array(), $isCatalog = false, $isAjax = false, $isScroll = true)
{
    $isFollow = false;
    $isFans = false;
    $msg = 'user_not_found';
    if (isset($_params['follow']) && $_params['follow']) {
        $isFollow = true;
        $msg = 'user_follow_not_found';
    }
    if (isset($_params['fans']) && $_params['fans']) {
        $isFans = true;
        $msg = 'user_fans_not_found';
    }
    echo '<div id="X_Wall-Result" class="clearfix">';
    echo '<div id="X_Wall-Container" class="xt-wall-container row" data-scroll="' . ($isScroll ? 'true' : 'false') . '">';
    echo '<ul class="nav nav-pills xt-user-nav-pills"><li ' . ($isFans ? 'class="active"' : '') . '><a id="X_User-Fans-Nav" href="javascript:;">粉丝列表</a></li><li ' . ($isFollow ? 'class="active"' : '') . '><a id="X_User-Follow-Nav" href="javascript:;">关注列表</a></li></ul>';
    echo '<div class="media-list clearfix xt-user-media-list">';
    $_count = 0;
    while (xt_have_users()) {
        xt_the_user();
        get_the_user_template($_count);
        $_count++;
    }
    if ($_count == 0) {
        echo xt_not_found($msg);
    }
    echo '</div>';
    echo '</div>';
    echo '<div id="X_Pagination-Bottom" class="clearfix">';
    echo '<div class="pagination xt-pagination-links">';
    xt_users_pagination_links();
    echo '</div>';
    echo '</div>';
    echo '</div>';
}
Esempio n. 3
0
function get_the_album_container($_params = array(), $isCatalog = false, $isAjax = false, $isScroll = true)
{
    if ($isAjax) {
        echo '<div id="X_Wall-Result" class="clearfix">';
    }
    echo '<div id="X_Wall-Container" class="xt-wall-container row" data-scroll="' . ($isScroll ? 'true' : 'false') . '">';
    $_user_id = 0;
    $_delClass = '';
    $msg = 'album_not_found';
    if (isset($_params['isFavorite']) && $_params['isFavorite']) {
        $_user_id = $_params['user_id'];
        $_delClass = 'xt-delete-favorite';
        $msg = 'album_favorite_not_found';
    } elseif (isset($_params['isShare']) && $_params['isShare']) {
        $msg = 'album_share_not_found';
    }
    $_count = 0;
    $isBig = xt_albumdisplay() == 'big' ? true : false;
    while (xt_have_albums()) {
        xt_the_album();
        if ($isBig) {
            get_the_album_template_big($_user_id, $_delClass);
        } else {
            get_the_album_template_small($_user_id, $_delClass);
        }
        $_count++;
    }
    if ($_count == 0) {
        echo xt_not_found($msg, 'xt-album-not-found');
    }
    echo '</div>';
    if ($isScroll) {
        echo "<div id=\"X_Page-Nav\" style=\"display: none; \"><a id=\"X_Page-Next-Link\" rel=\"nofollow\" href=\"" . admin_url('admin-ajax.php') . "?action=xt_ajax_search_albums&s_index=" . $_params['page'] . "&" . http_build_query($_params) . "\"></a></div>";
    }
    echo '<div id="X_Pagination-Bottom" class="clearfix">';
    echo '<div class="pagination xt-pagination-links">';
    xt_albums_pagination_links();
    echo '</div>';
    echo '</div>';
    if ($isAjax) {
        echo '</div>';
    }
}
Esempio n. 4
0
function get_the_share_container($_params = array(), $isCatalog = false, $isAjax = false, $isScroll = true)
{
    echo '<div id="X_Wall-Result" class="clearfix">';
    echo '<div id="X_Wall-Container" class="xt-wall-container row" data-scroll="' . ($isScroll ? 'true' : 'false') . '">';
    if ($isCatalog) {
        xt_load_template('xt-widget_catalog');
    }
    $_user_id = 0;
    $_delClass = '';
    $msg = 'share_not_found';
    if (isset($_params['isHome']) && $_params['isHome']) {
        global $xt_pageuser_follows;
        if (!empty($xt_pageuser_follows)) {
            $msg = 'share_home_not_found_other';
            if (!empty($xt_user) && $xt_user->exists()) {
                $current_user = wp_get_current_user();
                if ($current_user->exists()) {
                    if ($current_user->ID == $xt_user->ID) {
                        $msg = 'share_home_not_found_myself';
                    }
                }
            }
        } else {
            $_params['nopage'] = 1;
        }
    } elseif (isset($_params['album_id']) && $_params['album_id']) {
        //xt_load_template('xt-widget_albums');
        $_user_id = $_params['user_id'];
        $_delClass = 'xt-delete-album-share';
        $msg = 'share_album_not_found';
    } elseif (isset($_params['isFavorite']) && $_params['isFavorite']) {
        $_user_id = $_params['user_id'];
        $_delClass = 'xt-delete-favorite';
        $msg = 'share_favorite_not_found';
    } elseif (isset($_params['isShare']) && $_params['isShare']) {
        $msg = 'share_share_not_found';
    }
    $_count = 0;
    echo '<div class="span12">';
    while (xt_have_shares()) {
        xt_the_share();
        get_the_share_template($_user_id, $_delClass);
        $_count++;
    }
    echo '</div>';
    if ($_count == 0) {
        echo xt_not_found($msg, 'xt-share-not-found');
    }
    echo '</div>';
    if ($isScroll) {
        echo "<div id=\"X_Page-Nav\" style=\"display: none; \"><a id=\"X_Page-Next-Link\" rel=\"nofollow\" href=\"" . admin_url('admin-ajax.php') . "?action=xt_ajax_search_shares&s_index=" . $_params['page'] . "&" . http_build_query($_params) . "\"></a></div>";
    }
    if (isset($_params['nopage']) && $_params['nopage']) {
        //no page
    } else {
        echo '<div id="X_Pagination-Bottom" class="clearfix">';
        echo '<div class="pagination xt-pagination-links">';
        xt_shares_pagination_links();
        echo '</div>';
        echo '</div>';
    }
    echo '</div>';
}
Esempio n. 5
0
function xt_widget_template_grid($args)
{
    global $wp_query;
    $default = array('breadcrumbs' => 0, 'pager_top' => '', 'pager_bottom' => '', 'total' => 0, 'size' => '', 'count' => '', 'title' => '', 'isHd' => true, 'type' => '', 'items' => array(), 'urlType' => 'direct', 'display' => array('title', 'price', 'volume', 'seller', 'discount'), 'params' => array());
    $args = array_merge($default, $args);
    extract($args);
    $rate = xt_get_rate();
    $span = 'span3';
    switch ($size) {
        case 'big':
            $span = 'span3';
            break;
        case 'normal':
            $span = 'span2-4';
            break;
        case 'small':
            $span = 'span2';
            break;
    }
    global $xt_current_widget;
    if ($xt_current_widget == 'systaobaos') {
        $breadcrumbs = 1;
        $params = $wp_query->query_vars['xt_param'];
        $page = $params['page_no'];
        $prev_url = $next_url = '';
        if ($page > 1) {
            $prev_url = xt_get_taobao_search_url(array_merge($params, array('page_no' => $page - 1)));
        }
        if ($page < $total) {
            $next_url = xt_get_taobao_search_url(array_merge($params, array('page_no' => $page + 1)));
        }
        $base = xt_get_taobao_search_url(array_merge($params, array('page_no' => '%#%')));
        $pager_top = xt_search_pager_top($prev_url, $next_url, $page, $count, $total);
        $pager_bottom = xt_search_pager_bottom($base, $page, $count, $total);
    } elseif ($xt_current_widget == 'syspaipais') {
        $breadcrumbs = 1;
        $params = $wp_query->query_vars['xt_param'];
        $page = $params['pageIndex'];
        $prev_url = $next_url = '';
        if ($page > 1) {
            $prev_url = xt_get_paipai_search_url(array_merge($params, array('pageIndex' => $page - 1)));
        }
        if ($page < $total) {
            $next_url = xt_get_paipai_search_url(array_merge($params, array('pageIndex' => $page + 1)));
        }
        $base = xt_get_paipai_search_url(array_merge($params, array('pageIndex' => '%#%')));
        $pager_top = xt_search_pager_top($prev_url, $next_url, $page, $count, $total);
        $pager_bottom = xt_search_pager_bottom($base, $page, $count, $total);
    } elseif ($xt_current_widget == 'sysbijias') {
        $breadcrumbs = 1;
        $params = $wp_query->query_vars['xt_param'];
        $page = $params['page_no'];
        $prev_url = $next_url = '';
        if ($page > 1) {
            $prev_url = xt_get_bijia_search_url(array_merge($params, array('page_no' => $page - 1)));
        }
        if ($page < $total) {
            $next_url = xt_get_bijia_search_url(array_merge($params, array('page_no' => $page + 1)));
        }
        $base = xt_get_bijia_search_url(array_merge($params, array('page_no' => '%#%')));
        $pager_top = xt_search_pager_top($prev_url, $next_url, $page, $count, $total);
        $pager_bottom = xt_search_pager_bottom($base, $page, $count, $total);
    } elseif ($xt_current_widget == 'systuans') {
        $breadcrumbs = 0;
        $params = $wp_query->query_vars['xt_param'];
        $page = $params['page_no'];
        $prev_url = $next_url = '';
        if ($page > 1) {
            $prev_url = xt_get_tuan_search_url(array_merge($params, array('page_no' => $page - 1)));
        }
        if ($page < $total) {
            $next_url = xt_get_tuan_search_url(array_merge($params, array('page_no' => $page + 1)));
        }
        $base = xt_get_tuan_search_url(array_merge($params, array('page_no' => '%#%')));
        $pager_top = xt_search_pager_top($prev_url, $next_url, $page, $count, $total);
        $pager_bottom = xt_search_pager_bottom($base, $page, $count, $total);
    } elseif ($xt_current_widget == 'systemais') {
        $breadcrumbs = 1;
        $params = $wp_query->query_vars['xt_param'];
        $page = $params['page_no'];
        $prev_url = $next_url = '';
        if ($page > 1) {
            $prev_url = xt_get_temai_search_url(array_merge($params, array('page_no' => $page - 1)));
        }
        if ($page < $total) {
            $next_url = xt_get_temai_search_url(array_merge($params, array('page_no' => $page + 1)));
        }
        $base = xt_get_temai_search_url(array_merge($params, array('page_no' => '%#%')));
        $pager_top = xt_search_pager_top($prev_url, $next_url, $page, $count, $total, 100);
        $pager_bottom = xt_search_pager_bottom($base, $page, $count, $total, 100);
    } elseif ($xt_current_widget == 'syscoupons') {
        $breadcrumbs = 1;
        $params = $wp_query->query_vars['xt_param'];
        $page = $params['page_no'];
        $prev_url = $next_url = '';
        if ($page > 1) {
            $prev_url = xt_get_coupon_search_url(array_merge($params, array('page_no' => $page - 1)));
        }
        if ($page < $total) {
            $next_url = xt_get_coupon_search_url(array_merge($params, array('page_no' => $page + 1)));
        }
        $base = xt_get_coupon_search_url(array_merge($params, array('page_no' => '%#%')));
        $pager_top = xt_search_pager_top($prev_url, $next_url, $page, $count, $total);
        $pager_bottom = xt_search_pager_bottom($base, $page, $count, $total);
    }
    ?>
    <div class="shop-display">
        <div class="hd">
            <?php 
    if ($breadcrumbs) {
        xt_output_breadcrumbs(true, array('name' => $total . '件宝贝', 'url' => ''), false, $pager_top);
    } else {
        if ($xt_current_widget != 'systuans') {
            ?>
                    <h4 class="xt-bd-l" <?php 
            echo !empty($title) ? '' : 'style="display:none"';
            ?>
><span><?php 
            echo $title;
            ?>
</span></h4>
                    <?php 
        }
    }
    if ($xt_current_widget == 'syspaipais') {
        _xt_widget_template_grid_item_paipai_filter($params);
    } elseif ($xt_current_widget == 'sysbijias') {
        _xt_widget_template_grid_item_bijia_filter($params);
    } elseif ($xt_current_widget == 'systuans') {
        _xt_widget_template_grid_item_tuan_filter($params, $pager_top);
    } elseif ($xt_current_widget == 'systemais') {
        _xt_widget_template_grid_item_temai_filter($params, $pager_top);
    }
    ?>
        </div>
        <div class="bd">
            <?php 
    if (!empty($items)) {
        echo '<ul class="thumbnails thumbnails-' . $span . ' clearfix">';
        $_count = 0;
        if (empty($count)) {
            $count = count($items);
        }
        $fanxianText = '元';
        $platform = '';
        $isJifenbao = false;
        if ($type == 'taobao' || $type == 'coupon' || $type == 'temai') {
            $platform = 'taobao';
        } elseif ($type == 'paipai') {
            $platform = 'paipai';
        }
        if ($platform) {
            if (xt_fanxian_is_jifenbao($platform)) {
                $isJifenbao = true;
                $fanxianText = xt_jifenbao_text();
            }
        }
        foreach ($items as $item) {
            if ($_count >= $count) {
                break;
            }
            switch ($type) {
                case 'taobao':
                    xt_widget_template_grid_item_taobao($span, $rate, $item, $display, $isJifenbao, $fanxianText, $urlType);
                    break;
                case 'paipai':
                    xt_widget_template_grid_item_paipai($span, $rate, $item, $display, $isJifenbao, $fanxianText);
                    break;
                case 'share':
                    xt_widget_template_grid_item_share($span, $rate, $item, $display);
                    break;
                case 'coupon':
                    xt_widget_template_grid_item_coupon($span, $rate, $item, $display, $isJifenbao, $fanxianText, $urlType);
                    break;
                case 'temai':
                    xt_widget_template_grid_item_temai($span, $rate, $item, $display, $isJifenbao, $fanxianText, $urlType);
                    break;
                case 'bijia':
                    xt_widget_template_grid_item_bijia($span, $rate, $item, $display, $urlType);
                    break;
                case 'tuan':
                    xt_widget_template_grid_item_tuan($span, $rate, $item, $display, $urlType);
                    break;
            }
            $_count++;
        }
        echo '</ul>';
        if (!empty($pager_bottom)) {
            echo '<div id="X_Pagination-Bottom" class="clearfix">';
            echo '<div class="pagination pagination-large xt-pagination-links">';
            echo $pager_bottom;
            echo '</div>';
            echo '</div>';
        }
    } else {
        $msg = 'item_not_found';
        switch ($type) {
            case 'taobao':
                $msg = 'item_taobao_not_found';
                break;
            case 'paipai':
                $msg = 'item_paipai_not_found';
                break;
            case 'share':
                $msg = 'share_not_found';
                break;
            case 'coupon':
                $msg = 'item_coupon_not_found';
                break;
            case 'temai':
                $msg = 'item_temai_not_found';
                break;
            case 'bijia':
                $msg = 'item_bijia_not_found';
                break;
            case 'tuan':
                $msg = 'item_tuan_not_found';
                break;
        }
        echo xt_not_found($msg);
    }
    ?>
            <div class="clearfix"></div>
        </div>
    </div>			
    <?php 
}