diff --git a/src/data/downmix.data.php b/src/data/downmix.data.php index df23d8c8..6b91b835 100755 --- a/src/data/downmix.data.php +++ b/src/data/downmix.data.php @@ -6,8 +6,8 @@ #,织梦好,好织梦 #,本文来自织梦 #,织梦内容管理系统 -#,dedecms.com -#,copyright dedecms -#,内容来自dedecms +#,dedebiz.com +#,copyright dedebiz +#,内容来自dedebiz #end# ?> diff --git a/src/data/helper.inc.php b/src/data/helper.inc.php deleted file mode 100755 index 794f7ad9..00000000 --- a/src/data/helper.inc.php +++ /dev/null @@ -1,19 +0,0 @@ - diff --git a/src/include/common.inc.php b/src/include/common.inc.php index e9f2e046..567fc84d 100755 --- a/src/include/common.inc.php +++ b/src/include/common.inc.php @@ -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); diff --git a/src/include/control.class.php b/src/include/control.class.php deleted file mode 100755 index 0e040f9a..00000000 --- a/src/include/control.class.php +++ /dev/null @@ -1,128 +0,0 @@ -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); - } -} diff --git a/src/include/model.class.php b/src/include/model.class.php deleted file mode 100755 index 2618ab2e..00000000 --- a/src/include/model.class.php +++ /dev/null @@ -1,40 +0,0 @@ -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); - } -}