phpcms v9 get的強大之處(列表頁呼叫點選數)

weixin_34391854發表於2013-04-11
{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}

 

相關文章