www.gusucode.com > mcms手机网站系统 v3.1源码程序 > mcms_v3.1.0/upload/app/cms/content.php

    <?php
/*
 * MCMS Copyright (c) 2012-2013 ZhangYiYeTai Inc.
 *
 *  http://www.mcms.cc
 *
 * The program developed by loyjers core architecture, individual all rights reserved,
 * if you have any questions please contact loyjers@126.com
 */

require_once(dirname(__FILE__) . "/../../init.php"); //公用引导启动文件

$time_start = H :: getmicrotime(); //开始时间

// 动作处理
call_mfunc();

$id=isset($_GET['id'])?intval($_GET['id']):0;
if($id<=0) H::error_show ('{"code":1,"msg":"文档不存在"}');

$con=$C->get_content($id);
if(!$con) H::error_show ('{"code":1,"msg":"文档不存在"}');
if(empty($C->categories[$con['cate_id']])) H::error_show ('{"code":1,"msg":""分类不存在"}');
$con['tpl_content']='';
$cid = $con['cate_id'];

//遍历查找文档模板
foreach($C->cate_father($con['cate_id']) as $v){
    if($v['tpl_content']!='') $con['tpl_content']=$v['tpl_content'];
}
$cate_father = $C->cate_father($cid);
$topid=$cate_father[0]['cate_id'];

if(in_array($cid,array(3,4))) $C->recently_viewed($con['info_id']);

//更新点击次数
$C->update_click($con['info_id']);
// 模板处理
if($con['tpl_content']!=''){
    require_once(assign_tpl(substr($con['tpl_content'],4), 'cms'));die();
}

require_once(assign_tpl(basename(__FILE__), 'cms'));

// ******************************************************* 函数方法 *******************************************************
function m__list() {

}