{template "content","header"}
{pc:content action="lists"  catid="56" num="1"  order="listorder DESC" moreinfo="1"}
{loop $data $r}
<div class="fengge_tit" style="background:url({$r[fengge_tit]}) no-repeat bottom center;"><h3>主打风格</h3></div>
{/loop}
{/pc}
<div class="neiye fengge">
    <div id="fengge_list">
    {pc:content action="lists" catid="$catid" num="6" order="listorder DESC" moreinfo="1" }
    {loop $data $r}
        <div class="fengge_list">
            <a href="{$r[url]}">
                <img src="{$r[img]}" alt="" />
                <div class="fengge_list_nr">
                    <h3 class="f1">+{$r[title]}</h3>
                    <span class="post f2">VIEW：{$r[view]}</span><span class="post f2">POST：{date('Y/n/j',$r[inputtime])}</span>
                    <div class="clear"></div>
                    <p>{$r[jianjie]}</p>
                </div>
            </a>
        </div>
    {/loop}
    {/pc}
    </div>
    
    <div class="last">已经是最后一页了</div>
	{pc:get sql="select items from sj_category where catid=$catid" return="data2"}
    {loop $data2 $t}
    <div class="items_show" style="display:none;">
    {$t[items]}
    </div>
    {/loop}
    {/pc}
    <div class="lanmu_id" style="display:none;">
    	{$catid}
    </div>
    
 <script>    
$(document).ready(function($) {
	catid = 0;
	ci=1;//默认第一页
	sum=6;//显示行数 
	items=$(".items_show").text();
	catid=$(".lanmu_id").text();
	$(".last").hide()

    $(".fg_tj_more_bg").click(function(event) {
		if((items/6)<=1){
			$(".last").show();
			}
		else {
		  var time=new Date().getTime();
		  $.ajax({
			url: '<?php echo APP_PATH ?>index.php?m=content&c=index&a=listFengge',
			type: 'POST',
			dataType: 'json',
			data: {ci:ci,catid:catid},
			success:function(json){
				$.each(json, function(index, val) {
				var shijian= new Date(parseInt(val.inputtime) * 1000).toLocaleString().substr(0,9)
					$("#fengge_list").append('<div class="fengge_list"><a href="'+val.url+'"><img src="'+val.img+'"/><div class="fengge_list_nr"><h3 class="f1">'+val.title+'</h3><span class="post f2">VIEW：'+val.view+'</span><span class="post f2">POST：'+shijian+'</span><div class="clear"></div><p>'+val.jianjie+'</p></div>')
				})
			},
		  })
		  items=items-6;
		  ci=ci +1;
		  return;
		}	
    });
  });
</script> 

    <div class="fg_tj_more">
        <a href="javascript:void(0)" target="_self">
            <div class="fg_tj_more_bg">
                <span>点击展开更多</span>
            </div>
        </a>
    </div>
</div>
<div class="cainixihuan">
    <div class="cainixihuan_tit">
        <a href="javascript:;"></a>
    </div>
    <div class="cainixihuan_show">
        <div class="block_home_slider">
            <div id="home_slider3" class="flexslider">
                <ul class="slides">
                {pc:content action="lists"  catid="57" num="4" siteid="$siteid" order="listorder DESC" moreinfo="1"}
                {loop $data $r}
                    <li>
                        <a href="{$r[url]}">
                            <div class="slide">
                                <img src="{$r[img]}" alt="" />
                            </div>
                        </a>
                    </li>
                {/loop}
                {/pc}
                </ul>
            </div>
        </div>
    </div>
</div>

{template "content","footer"}