EXCMS 栏目文件

来自站长百科
跳转至: 导航、​ 搜索

导航:返回上一页

EXCMS的栏目文件为:channel.php,主要用于显示网站的栏目。

代码[ ]

01	<?
02	 
03	/**
04	 * Project:     EXCMS: the PHP content management system.
05	 * File:        channel.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: 15 $
24	 */
25	  
26	 /* $Id: channel.php 15 2009-10-27 09:31:46Z zhangxuelin $ */
27	  
28	 /**
29	  * 栏目程序
30	  */
31	 
32	//加载系统配置文件
33	require_once ('configuration/inc/common.inc.php');
34	 
35	//获取栏目ID
36	$channelid = $_GET['channelid'] ? $_GET['channelid'] : $_GET['id'];
37	$channelid = excms_func_id_decode($channelid);
38	 
39	if(!is_numeric($channelid) || !($channelid > 0)){
40	    exit('Unknow Channel!');
41	}
42	 
43	$crossid = excms_func_id_decode($_GET['crossid']);
44	 
45	//页码
46	$pageon = excms_func_page_decode($_GET['page']);
47	 
48	excms_import('EXCMS.update.UpdateChannel');
49	$uc = new UpdateChannel();
50	$uc->dynamicBrows($channelid, $crossid, $pageon);
51	 
52	?>

代码说明[ ]

  • require_once ('configuration/inc/common.inc.php'); //加载系统配置文件(必须)
  • $channelid = $_GET['channelid'] ? $_GET['channelid'] : $_GET['id']; //获取栏目ID
  • $channelid = excms_func_id_decode($channelid); //解密栏目ID
  • if(!is_numeric($channelid) || !($channelid > 0)){ exit('Unknow Channel!'); } //验证栏目是否是数字并大于0
  • $crossid = excms_func_id_decode($_GET['crossid']); //获取交叉栏目并解密交叉栏目ID
  • $pageon = excms_func_page_decode($_GET['page']); //获取分页并解密分页字符串
  • excms_import('EXCMS.update.UpdateChannel');// 引入更新栏目类
  • $uc->dynamicBrows($channelid, $crossid, $pageon); //根据栏目、交叉栏目、和当前分页动态浏览栏目内容。

代码修改[ ]

  • require_once ('configuration/inc/common.inc.php'); //如果系统目录发生改变时,需要修改。

如果后台管理加密编码中没有启用加密栏目ID和加密分页数字时可删除以下几行。

  • $channelid = excms_func_id_decode($channelid);
  • $crossid = excms_func_id_decode($_GET['crossid']);
  • $pageon = excms_func_page_decode($_GET['page']);