EXCMS 内容文件

来自站长百科
Ahbaybface讨论 | 贡献2010年4月10日 (六) 11:59的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航、​ 搜索

导航:返回上一页

EXCMS的内容页文件为:content.php,用于显示网站的内容。

代码显示[ ]

01	<?
02	 
03	/**
04	 * Project:     EXCMS: the PHP content management system.
05	 * File:        content.php
06	 * * A product of SINOICAN Inc.
07	 *
08	 * EXCMS is a ten million data-level,high speed,human-based content management system.
09	 *
10	 * EX is Excellence & Express & Exceed & Expert.
11	 *
12	 * For questions, help, comments, discussion, please join the
13	 * EXCMS mailing list. Send a blank e-mail to
14	 * excms@sinoican.com
15	 * or join the EXCMS forum
16	 * www.excms.cn/forum
17	 *
18	 * @link http://www.excms.cn/
19	 * @copyright Copyright (c) 2007-2009 SINOICAN Inc.
20	 * @license http://www.excms.cn/licenses/LICENSE-1.0
21	 * @category EXCMS
22	 * @author zhangxuelin@sinoican.com
23	 * @version $Rev: 39 $
24	 */
25	  
26	 /* $Id: content.php 39 2009-10-29 09:22:49Z zhanghaisong $ */
27	  
28	 /**
29	  * 内容显示程序
30	  */
31	 
32	//加载系统配置文件
33	require_once ('configuration/inc/common.inc.php');
34	 
35	 
36	//获取内容ID
37	$contentid = $_GET['contentid'] ? $_GET['contentid'] : $_GET['id'];
38	$contentid = excms_func_id_decode($contentid);
39	 
40	if(!is_numeric($contentid) || !($contentid > 0)){
41	    exit('Unknow Content!');
42	}
43	 
44	//检查栏目缓存是否最新
45	excms_func_checkChannelChange();
46	 
47	excms_import('EXCMS.update.UpdateContent');
48	$update = new UpdateContent();
49	$update->setContentid($contentid);
50	$update->setDisplay(false);
51	$update->setBrowseType(0);
52	$update->setContentPageon($_GET['page']);
53	$update->doUpdate();
54	 
55	?>

代码说明[ ]

  • excms_func_checkChannelChange(); //检查栏目缓存是否最新
  • excms_import('EXCMS.update.UpdateContent'); //引入更新内容UpdateContent类
  • $update->setContentid($contentid); //设置当前内容ID,ID以是整型、以逗号分隔的字符串,以及整型数组。
  • $update->setDisplay(false);//是否显示更新状态信息。
  • $update->setBrowseType(0);//设置是否是静态浏览。
  • $update->setContentPageon($_GET['page']);// 设置内容当前页
  • $update->doUpdate(); //执行动态浏览。