国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > PhpCMS > 正文

phpcms更新首頁

2024-09-10 07:14:45
字體:
來源:轉載
供稿:網友
  1. html.class.php  
  2.  
  3. /**
  4. * 更新首頁  
  5. */ 
  6. public function index() {  
  7. if($this->siteid==1) {  
  8. $file = PHPCMS_PATH.'index.html';  
  9. //添加到發布點隊列  
  10. $this->queue->add_queue('edit','/index.html',$this->siteid);  
  11. else {  
  12. $site_dir = $this->sitelist[$this->siteid]['dirname'];  
  13. $file = $this->html_root.'/'.$site_dir.'/index.html';  
  14. //添加到發布點隊列  
  15. $this->queue->add_queue('edit',$file,$this->siteid);  
  16. $file = PHPCMS_PATH.$file;  
  17. }  
  18. define('SITEID', $this->siteid);  
  19. //SEO  
  20. $SEO = seo($this->siteid);  
  21. $siteid = $this->siteid;  
  22. $CATEGORYS = $this->categorys;  
  23. $style = $this->sitelist[$siteid]['default_style'];  
  24. ob_start();  
  25. include template('content','index',$style);  
  26. return $this->createhtml($file, 1);  
  27. }  
  28.  
  29.    
  30.  
  31. queue_model.class.php  
  32.  
  33. /**
  34. * 添加同步隊列  
  35. * @param string $type 操作類型{add:添加,edit:修改,del:刪除}  
  36. * @param string $path 文檔地址  
  37. * @param integer $siteid 站點ID  
  38. */ 
  39. final public function add_queue($type = 'add', $path, $siteid = '') {  
  40. if (empty($siteid)) $siteid = get_siteid();  
  41. $sites = pc_base::load_app_class('sites''admin');  
  42. $site = $sites->get_by_id($siteid);  
  43. if (empty($site['release_point'])) return false;  
  44.  
  45. if ($r = $this->get_one(array('type'=>$type, 'path'=>$path, 'siteid'=>$siteid), 'id')) {  
  46. if ($this->update(array('status1'=>'0''status2'=>'0''status3'=>'0''status4'=>'0''times'=>SYS_TIME), array('id'=>$r['id']))) {  
  47. return true;  
  48. else {  
  49. return false;  
  50. }  
  51. else {  
  52. if ($this->insert(array('type'=>$type, 'path'=>$path, 'siteid'=>$siteid, 'times'=>SYS_TIME))) {  
  53. return true;  
  54. else {  
  55. return false;  
  56. }  
  57. }  

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 锡林郭勒盟| 库车县| 张掖市| 宁晋县| 互助| 仁布县| 旬阳县| 莱西市| 万载县| 拉萨市| 阿拉善左旗| 杭锦旗| 泽州县| 大埔县| 义马市| 邵东县| 万年县| 南通市| 改则县| 枞阳县| 九龙坡区| 中超| 南京市| 平度市| 安远县| 龙岩市| 海安县| 新河县| 灵台县| 常宁市| 平谷区| 明星| 治县。| 福安市| 富平县| 松江区| 勃利县| 房山区| 乡城县| 华坪县| 阜宁县|