<?php exit("Powered by www.wikin.cn"); ?>

<!--{if $_GET['api'] != '1'}-->
<!--{template common/header}-->
<!--{else}-->
<!--{eval include_once DISCUZ_ROOT.'./template/wq_touch/config/config.php';}-->
<!--{/if}-->

<!--{eval $showmodel = $mysetting['forumindex_showmodel'] == "-1" ? $wq_touch_setting['forumindex_showmodel'] : $mysetting['forumindex_showmodel'];}-->

<!--{eval unset($data);}-->

<!--{eval $page = max(1,intval($_GET['page']));}-->
<!--{eval $startnum = ($page - 1) * $wq_touch_setting['guide_perpage'];}-->

<!--{if $_GET['ac'] == 'myfav'}-->
<!--{eval $data['myfav'] = wq_get_guide_list_for_myfav($startnum,$wq_touch_setting['guide_perpage']);}-->
<!--{eval $threadcount =  $data['myfav']['threadcount'];}-->
<!--{else}-->
<!--{eval $data[$_GET['view']] = in_array($_GET['view'], array('hot', 'digest', 'new', 'newthread', 'sofa')) ? get_guide_list($_GET['view'], $startnum, $wq_touch_setting['guide_perpage']) : array();}-->
<!--{eval $threadcount =  $data[$_GET['view']]['threadcount'];}-->
<!--{/if}-->

<!--{if $_GET['api'] == '1'}-->
<!--{loop $data $key $list}-->
<!--{subtemplate forum/guide_list_row}-->
<!--{eval exit();}-->
<!--{/loop}-->
<!--{/if}-->
<!-- main threadlist start -->
<!--{if $wq_touch_setting[thread_carousel]==1}-->
<div class="wq_limp_g">
    <div id="wqscroll" class="scroll_lb" style="visibility: visible;">
        <div class="scroll_lump">
            <!--{eval $wqscroll= get_block_data_by_bid($wq_touch_setting['weiqing_thread_block_id']);}-->
            {$wqscroll}
        </div>
        <ul id="scroll_con">
            <!--{echo get_block_data_by_ul($wqscroll);}-->
        </ul>
    </div>
</div>
<script src="{$_G['style'][styleimgdir]}mobile/js/swipe.js"></script>
<script>
    var elem = document.getElementById('wqscroll');
    window.wqscroll = Swipe(elem, {
        auto: 3000,
        continuous: true,
        callback: function (pos) {
            var i = bullets.length;
            if (i == 2 && pos > 1) {
                pos = pos - 2
            }
            while (i--) {
                bullets[i].className = ' ';
            }
            bullets[pos].className = 'on';
        }
    });
    var bullets = document.getElementById('scroll_con').getElementsByTagName('li');
</script>
<!--{/if}-->
<div class="<!--{if $showmodel == '1'}-->forum_dis<!--{else}-->forum_dis_nav<!--{/if}-->">
    <h2 class="thread_qh b_bottom" id="guide_top">
        <a href="forum.php?mod=guide&view=newthread" <!--{if $_GET['view'] == 'newthread' && !$_GET['ac']}--> class="on"<!--{/if}-->>{$Tlang['13097feed87cf6ee']}</a>
        <a href="forum.php?mod=guide&view=hot" <!--{if $_GET['view'] == 'hot'}--> class="on"<!--{/if}-->>{$Tlang['6959da5d2e80c069']}</a>
        <a href="forum.php?mod=guide&view=digest" <!--{if $_GET['view'] == 'digest'}--> class="on"<!--{/if}-->>{$Tlang['46d1ecf7cc55b12f']}</a>
        <a href="forum.php?mod=guide&view=newthread&ac=myfav" <!--{if $_GET['ac'] == 'myfav'}--> class="on"<!--{/if}-->>{$Tlang['2c8a07313e7706bc']}</a>
        <a href="forum.php?mod=misc&action=nav&ac=myfav" class="foot_nav_add b_left">+</a>
    </h2>
    <!--{loop $data $key $list}-->
    <!--{subtemplate forum/guide_list_row}-->
    <!--{/loop}-->
    <div class="p_load_more" style="display: none"><img src="{$_G['style'][styleimgdir]}mobile/images/icon_load.gif"/>{$Tlang['d0a97567aed382e8']}</div>
</div>
<!-- main threadlist end -->
<script type="text/javascript">
    $(function () {
        var scroll_locked = true, page = 1, count = '$threadcount', perpage = '$wq_touch_setting[guide_perpage]';
        function delayload() {
            var document_top = $(document).scrollTop();
            $(".delayload").each(function () {
                var img_top = $(this).offset().top;
                if (img_top >= document_top && img_top <= document_top + wq_window_height) {
                    var img = $(this).attr("data");
                    $(this).attr("src", img).attr("class", null);
                }
            })
        }
        delayload();
        $(window).bind('scroll', function () {
            delayload();
            if (scroll_locked && count / perpage > page && $(document).scrollTop() + wq_window_height > wq_document_height - 500) {
                scroll_locked = false;
                loadthread();
            }
        });
        function loadthread() {
            $(".p_load_more").show();
            page++;
            $.ajax({
                url: 'forum.php?',
                data: {mod:'guide',api:1,view: "{$_GET['view']}", ac: "{$_GET['ac']}", page: page},
                dataType: 'html',
                success: function (data) {
                    $('.hotlist').append(data);
                    $(".p_load_more").hide();
                    scroll_locked = true;
                }
            })
        }
    });
</script>
<!--{if $wq_touch_setting[guide_scroll]==1}-->
<!--{eval $wq_scroll_top='guide_top';}-->
<!--{template common/scroll_top}-->
<!--{/if}-->
<!--<div class="pullrefresh" style="display:none;"></div>-->
<!--{if $_GET['api'] != '1'}-->
<!--{template common/footer}-->
<!--{/if}-->