《CMS教程:phpcms v9根據欄目catid獲取欄目下最新文章的內容》要點:
本文介紹了CMS教程:phpcms v9根據欄目catid獲取欄目下最新文章的內容,希望對您有用。如果有疑問,可以聯系我們。
相關主題:PHPCMS教程
- public?function??show_cntent($catid)?
- {?
- ???????$siteids?=?getcache('category_content',?'commons');?
- ????????$MODEL?=?getcache('model',?'commons');?
- ????????$siteid?=?$siteids[$catid];?
- ????????$CATEGORYS?=?getcache('category_content_'.$siteid,?'commons');?
- ????????$category?=?$CATEGORYS[$catid];?
- ????????$modelid?=?$category['modelid'];?
- ????????$this->db->set_model($modelid);?
- ????????$cid=$this->db->select(array('catid'=>$catid),'id,thumb',1,'inputtime?DESC');????
- ????????$this->db->table_name?=?$this->db->table_name.'_data';?
- ????????$con=$this->db->get_one(array('id'=>$cid[0]['id']),'content');?
- ????????$arr[0]['content']=$con['content'];?
- ????????$arr[0]['thumb']=$cid[0]['thumb'];?
- ????????return?$arr;?
- ?
- }?
轉載請注明本頁網址:
http://www.snjht.com/jiaocheng/5852.html