{include file='index/_header.html'}
{php $slide=db('slide')->cache()->where('type_id=1 AND status=1')->order('sort ASC,id DESC')->limit(6)->select()}
{foreach $slide as $sli} {/foreach}

产品

{php $product=db('product')->cache()->field('id,title,summary,thumb,price')->where('status=1')->order('sort ASC,id DESC')->limit(3)->select()}
    {foreach $product as $vo}
  • {$vo.title} {if $vo['price']>0:}¥{$vo.price}{else:}免费{/if}

  • {/foreach}
{php $last=db('news')->cache()->field('id,tid,title,thumb,summary,tags_ids,is_top,read_count,update_time')->where('status=1')->order('is_top DESC,id DESC')->limit(10)->select()} {php $cate=widget('common.sub_nav')->get(5)} {foreach $last as $vo}
  • {$vo.title}

    {if $vo['is_top']==1:}置顶{/if}{$vo.title}

    {:echo($cate[$vo['tid']]['title'])} {$vo.update_time|date='Y-m-d'}
    {$vo.read_count}

    {$vo.summary|str_substr=70}

{/foreach}

热门

    {php $hot=db('news')->cache()->field('id,title,thumb,read_count,update_time')->where('status=1')->order('read_count DESC,id DESC')->limit(5)->select()} {foreach $hot as $k=>$vo} {php $k=$k+1}
  • {$k}{$vo.title}
  • {/foreach}

随机

    {php $rand=db('news')->cache(10)->field('id,title,thumb,read_count,update_time')->where('status=1')->order('[rand]')->limit(5)->select()} {foreach $rand as $vo}
  • {$vo.title}

    {$vo.update_time|date='Y-m-d'}

  • {/foreach}

标签

{php $tags=widget('common.tags')->get()} {php $i=1} {foreach $tags as $sign=>$name} {php $i=$i+1} {$name} {/foreach}
{include file='index/_footer.html'}