码迷,mamicode.com
首页 > Web开发 > 详细

phpcms之文章列表页

时间:2018-01-25 13:10:46      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:load   php   次数   pen   hits   bsp   ons   hid   eid   

  位置:

<div class="breadcrumb">您的位置: <a itemprop="breadcrumb" href="{siteurl($siteid)}">首页</a> ? <span class="current">{catpos($catid)}列表</span></div>

文章:

{pc:content action="lists" catid="$catid" num="5" order="id DESC " page="$page" moreinfo="1"}
        {loop $data $r}
        <!--article start-->
        <article class="article"> 
       {php $h_md=pc_base::load_model(‘hits_model‘);$get_db=$h_md->get_one(array(‘hitsid‘=>"c-".$modelid."-".$r[id]));$views=$get_db[views];}
      <!--views start-->
      <div class="views"><em> {$views} </em><span>次数</span></div>
      
      <!--<span class="glyphicon glyphicon-eye-open" aria-hidden="true">  </span>-->
      <!--views end--> 
      
      <!--postentry start-->
      <div class="postentry"> 
          
        <!--article_thum start-->
        <div class="article_thum">
                    <a href="{$r[url]}" title="{$r[title]}" target="_blank">                        
                        <img src="{$r[thumb]}" alt="{$r[title]}">
                    </a>
                </div>
        <!--article_thum start-->
        
        <!--article_body start-->
        <div class="article_body">
            
            <!--listtitle start-->
          <h2 class="listtitle"><a href="{$r[url]}" target="_blank" title="#" rel="bookmark"{title_style($r[style])}>{$r[title]} </a></h1>
          <!--listtitle end--> 
          
          <!--listmeta start-->
          <div class="listmeta">
              <span class="glyphicon glyphicon-time" aria-hidden="true"></span> {date(‘Y-m-d‘,$r[inputtime])}           &nbsp; 
              &nbsp; <span class="glyphicon glyphicon-user" aria-hidden="true"></span> 文章来源:<a href="#"></a> 
          </div>
          <!--listmeta end--> 
          
          <!--listdes start-->
          <p class="listdes">{$r[‘description‘]}</p>
          <!--listdes end--> 
          

        </div>
        <!--article_body end-->
       
      </div>
      <!--postentry end--> 
      
    </article>
        <!--article end-->
        {/loop}
        {/pc}

分页:

{$pages}

右侧栏:

{pc:content action="hits" catid="$catid" num="5" order="monthviews DESC"}
        {loop $data $r} 
        <li>
             <span class="hots_img">
                    <a href="{$r[url]}" target="_blank"><img src="{$r[thumb]}" class="img-responsive" alt="{$r[title]}"></a>
                 </span>
                <span class="hots_title"><a href="{$r[url]}" target="_blank">{$r[title]}</a></span>
                <span class="hots_views">
                {php $h_md=pc_base::load_model(‘hits_model‘);$get_db=$h_md->get_one(array(‘hitsid‘=>"c-".$modelid."-".$r[id]));$views=$get_db[views];}
                <span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span>{$views}
                </span>
        </li>
        {/loop}
        {/pc}

 

phpcms之文章列表页

标签:load   php   次数   pen   hits   bsp   ons   hid   eid   

原文地址:https://www.cnblogs.com/l979662050/p/8350585.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!