phpcms v9 get的强大之处(列表页调用点击数)

{pc:get sql=”select * from v9_art as g left join v9_art_data as p on p.id=g.id and g.catid=12 order by p.age desc” }
{if $data}
{loop $data $r}

{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];}
<li>
<a href=”{$r[pic_jj]}” rel=”lightbox[example]” title=”{$r[hj_url]}” rev=”画展地址”><img src=”{thumb($r[thumb],240,240)}” /></a>
<div class=”zt_info”>
<h3><a href=”{$r[url]}”>{$r[title]}</a></h3>
<div>上传时间:{date(‘Y-m-d H:i:s’,$r[inputtime])}</div>
<div>浏览量:{$views}</div>
</div>
<div class=”zt_look”><a href=”{$r[url]}”>查看</a></div>
</li>
{/loop}
{/if}
{/pc}

文章链接:,本站部分内容来自互联网,如不慎侵害的您的权益,请告知,我们将尽快删除!

发表评论