<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Page extends CI_Controller {

	function __construct(){
		parent::__construct();
        	$this->load->helper('url');
        	$this->load->helper('form');
                $this->load->library('session'); //加载session
		$this->load->model('CsdjDB');
		$this->load->model('CsdjSkins');
		$this->load->model('CsdjCache');
	}

	public function index()
	{
            $data='';
            $name = $this->uri->segment(3);   //页面标示

            if(empty($name)){
                exit($this->CsdjSkins->Msg_url('出错了，页面标示为空！',Web_Path));
            }

	    $row=$this->CsdjDB->get_select ('page','CS_Name','*',''.$name.'');
	    if(!$row){
                exit($this->CsdjSkins->Msg_url('出错了，该页面标示不存在！',Web_Path));
	    }

	    $cache_id ="page_".$name;
	    if(!($this->CsdjCache->start($cache_id))){
                $Mark_Text=$this->CsdjSkins->str_decode($row[0]->CS_Html);
                $this->CsdjSkins->skins($Mark_Text,$data);
		$this->CsdjCache->end();
	    }
	}
}


