Selaa lähdekoodia

移除不必要的文件

tags/6.0.0
tianya 3 vuotta sitten
vanhempi
commit
8d75966130
5 muutettua tiedostoa jossa 25 lisäystä ja 209 poistoa
  1. +3
    -3
      src/data/downmix.data.php
  2. +0
    -19
      src/data/helper.inc.php
  3. +22
    -19
      src/include/common.inc.php
  4. +0
    -128
      src/include/control.class.php
  5. +0
    -40
      src/include/model.class.php

+ 3
- 3
src/data/downmix.data.php Näytä tiedosto

@@ -6,8 +6,8 @@
#,织梦好,好织梦
#,本文来自织梦
#,织梦内容管理系统
#,dedecms.com
#,copyright dedecms
#,内容来自dedecms
#,dedebiz.com
#,copyright dedebiz
#,内容来自dedebiz
#end#
?>

+ 0
- 19
src/data/helper.inc.php Näytä tiedosto

@@ -1,19 +0,0 @@
<?php
//小助手配置项
$cfg_helper_autoload = array
(
'charset', /* 编码小助手 */
'channelunit',/* 模型单元小助手 */
'string', /* 字符串小助手 */
'time', /* 日期小助手 */
'file', /* 文件小助手 */
'util', /* 单元小助手 */
'validate', /* 数据验证小助手 */
'filter', /* 过滤器小助手 */
'cookie', /* cookies小助手 */
'debug', /* 调试小助手 */
'archive', /* 文档小助手 */
'upload', /* 上传小助手 */
'extend', /* 扩展小助手 */
);
?>

+ 22
- 19
src/include/common.inc.php Näytä tiedosto

@@ -301,6 +301,9 @@ if($cfg_sendmail_bysmtp=='Y' && !empty($cfg_smtp_usermail))
$cfg_adminemail = $cfg_smtp_usermail;
}

// DedeBIZ商业化组件
require_once(DEDEINC.'/dedebiz.class.php');

//对全局分页传递参数进行过滤
if (isset($GLOBALS['PageNo'])) {
$GLOBALS['PageNo'] = intval($GLOBALS['PageNo']);
@@ -322,7 +325,6 @@ if ($cfg_memcache_enable == 'Y')
$cache_helper_config['memcache']['mc_cache_time'] = $GLOBALS["cfg_puccache_time"];
}


if(!isset($cfg_NotPrintHead)) {
header("Content-Type: text/html; charset={$cfg_soft_lang}");
}
@@ -353,25 +355,26 @@ if ( $GLOBALS['cfg_dbtype'] =='mysql' )
require_once(DEDEINC.'/dedesqlite.class.php');
}

//全局常用函数
require_once(DEDEINC.'/common.func.php');

// 模块MVC框架需要的控制器和模型基类
require_once(DEDEINC.'/control.class.php');
require_once(DEDEINC.'/model.class.php');

//全局常用函数
require_once(DEDEINC.'/dedebiz.class.php');
require_once(DEDEINC.'/common.func.php');

//载入小助手配置,并对其进行默认初始化
if(file_exists(DEDEDATA.'/helper.inc.php'))
{
require_once(DEDEDATA.'/helper.inc.php');
// 若没有载入配置,则初始化一个默认小助手配置
if (!isset($cfg_helper_autoload))
{
$cfg_helper_autoload = array('util', 'charset', 'string', 'time', 'cookie');
}
// 初始化小助手
helper($cfg_helper_autoload);
}
$cfg_helper_autoload = array
(
'charset', /* 编码小助手 */
'channelunit',/* 模型单元小助手 */
'string', /* 字符串小助手 */
'time', /* 日期小助手 */
'file', /* 文件小助手 */
'util', /* 单元小助手 */
'validate', /* 数据验证小助手 */
'filter', /* 过滤器小助手 */
'cookie', /* cookies小助手 */
'debug', /* 调试小助手 */
'archive', /* 文档小助手 */
'upload', /* 上传小助手 */
'extend', /* 扩展小助手 */
);
// 初始化小助手
helper($cfg_helper_autoload);

+ 0
- 128
src/include/control.class.php Näytä tiedosto

@@ -1,128 +0,0 @@
<?php if (!defined('DEDEINC')) exit("Request Error!");
/**
* 织梦控制器基类
*
* @version $Id: control.class.php 1 10:33 2010年7月6日Z tianya $
* @package DedeCMS.Libraries
* @copyright Copyright (c) 2020, DedeBIZ.COM
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/
require_once(DEDEINC . "/dedetemplate.class.php");
class Control
{
var $tpl;
var $dsql;
var $style = 'default';
var $_helpers = array();
var $apptpl = '../templates/';
function __construct()
{
$this->Control();
}
// 析构函数
function Control()
{
global $dsql;
$this->tpl = isset($this->tpl) ? $this->tpl : new DedeTemplate();
$sqltype = "DedeSql";
if ($GLOBALS['cfg_mysql_type'] == 'mysqli' && function_exists("mysqli_init")) $sqltype = "DedeSql";
else $sqltype = "DedeSqli";
$this->dsql = isset($dsql) ? $dsql : new $sqltype(FALSE);
}
//设置模板
//如果想要使用模板中指定的pagesize,必须在调用模板后才调用 SetSource($sql)
function SetTemplate($tplfile)
{
$tplfile = DEDEAPPTPL . '/' . $this->style . '/' . $tplfile;
$this->tpl->LoadTemplate($tplfile);
}
function SetTemplet($tplfile)
{
$tplfile = DEDEAPPTPL . '/' . $this->style . '/' . $tplfile;
$this->tpl->LoadTemplate($tplfile);
}
//设置/获取文档相关的各种变量
function SetVar($k, $v)
{
$this->tpl->Assign($k, $v);
}
function GetVar($k)
{
global $_vars;
return isset($_vars[$k]) ? $_vars[$k] : '';
}
function Model($name = '')
{
$name = preg_replace("#[^\w]#", "", $name);
$modelfile = DEDEMODEL . '/' . $name . '.php';
if (file_exists($modelfile)) {
require_once $modelfile;
}
if (!empty($name) && class_exists($name)) {
return new $name;
}
return false;
}
function Libraries($name = '', $data = '')
{
if (defined('APPNAME')) {
$classfile = 'MY_' . $name . '.class.php';
if (file_exists('../' . APPNAME . '/libraries/' . $classfile)) {
require '../' . APPNAME . '/libraries/' . $classfile;
return new $name($data);
} else {
if (!empty($name) && class_exists($name)) {
return new $name($data);
}
}
return FALSE;
} else {
if (!empty($name) && class_exists($name)) {
return new $name($data);
}
return FALSE;
}
}
//载入helper
function helper($helper, $path)
{
$help_path = $path . '/data/helper/' . $helper . ".helper.php";
if (file_exists($help_path)) {
include_once($help_path);
} else {
exit('Unable to load the requested file: ' . $helper . ".helper.php");
}
}
//显示数据
function Display()
{
$this->tpl->SetObject($this);
$this->tpl->Display();
}
//保存为HTML
function SaveTo($filename)
{
$this->tpl->SetObject($this);
$this->tpl->SaveTo($filename);
}
// 释放资源
function __destruct()
{
unset($this->tpl);
$this->dsql->Close(TRUE);
}
}

+ 0
- 40
src/include/model.class.php Näytä tiedosto

@@ -1,40 +0,0 @@
<?php if(!defined('DEDEINC')) exit("Request Error!");
/**
* 模型基类
*
* @version $Id: model.class.php 1 13:46 2010-12-1 tianya $
* @package DedeCMS.Libraries
* @copyright Copyright (c) 2020, DedeBIZ.COM
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/
class Model
{
var $dsql;
var $db;
function __construct()
{
$this->Model();
}
// 析构函数
function Model()
{
global $dsql;
if ($GLOBALS['cfg_mysql_type'] == 'mysqli')
{
$this->dsql = $this->db = isset($dsql)? $dsql : new DedeSqli(FALSE);
} else {
$this->dsql = $this->db = isset($dsql)? $dsql : new DedeSql(FALSE);
}
}
// 释放资源
function __destruct()
{
$this->dsql->Close(TRUE);
}
}

Loading…
Peruuta
Tallenna