-
+
参数说明
参数值
变量名
@@ -111,11 +114,11 @@ EOT;
while ($row = $dsql->GetArray()) {
$bgcolor = ($i++ % 2 == 0) ? "#F9FCEF" : "#ffffff";
- $row['info'] = preg_replace("#{$keywords}#", ''.$keywords.' ', $row['info']);
- $row['varname'] = preg_replace("#{$keywords}#", ''.$keywords.' ', $row['varname']);
+ $row['info'] = preg_replace("#{$keywords}#", ''.$keywords.' ', $row['info']);
+ $row['varname'] = preg_replace("#{$keywords}#", ''.$keywords.' ', $row['varname']);
?>
-
- :
+
+ :
+ echo '
没有找到搜索的内容
';
}
diff --git a/src/dede/sys_info_mark.php b/src/admin/sys_info_mark.php
old mode 100755
new mode 100644
similarity index 82%
rename from src/dede/sys_info_mark.php
rename to src/admin/sys_info_mark.php
index e1d426b7..a9096964
--- a/src/dede/sys_info_mark.php
+++ b/src/admin/sys_info_mark.php
@@ -1,59 +1,68 @@
-\r\n";
- $fp = fopen($ImageWaterConfigFile, "w") or die("写入文件 $ImageWaterConfigFile 失败,请检查权限");
- fwrite($fp, $configstr);
- fclose($fp);
- echo "\r\n";
-}
-require_once($ImageWaterConfigFile);
-include DedeInclude('templets/sys_info_mark.htm');
+\r\n";
+ $fp = fopen($ImageWaterConfigFile, "w") or die("写入文件 $ImageWaterConfigFile 失败,请检查权限");
+ fwrite($fp, $configstr);
+ fclose($fp);
+ echo "\r\n";
+}
+require_once($ImageWaterConfigFile);
+include DedeInclude('templets/sys_info_mark.htm');
diff --git a/src/dede/sys_passport.php b/src/admin/sys_passport.php
old mode 100755
new mode 100644
similarity index 97%
rename from src/dede/sys_passport.php
rename to src/admin/sys_passport.php
index b3b49475..203e0651
--- a/src/dede/sys_passport.php
+++ b/src/admin/sys_passport.php
@@ -1,29 +1,28 @@
-';
- $fp = fopen($ConfigFile, "w") or die("写入文件 $ConfigFile 失败,请检查权限");
- fwrite($fp, $configstr);
- fclose($fp);
- echo "\r\n";
-}
-include DedeInclude('templets/sys_passport.htm');
+';
+ $fp = fopen($ConfigFile, "w") or die("写入文件 $ConfigFile 失败,请检查权限");
+ fwrite($fp, $configstr);
+ fclose($fp);
+ echo "\r\n";
+}
+include DedeInclude('templets/sys_passport.htm');
diff --git a/src/dede/sys_payment.php b/src/admin/sys_payment.php
old mode 100755
new mode 100644
similarity index 94%
rename from src/dede/sys_payment.php
rename to src/admin/sys_payment.php
index 00c94e32..74394156
--- a/src/dede/sys_payment.php
+++ b/src/admin/sys_payment.php
@@ -1,251 +1,250 @@
-表单]解析类
-/*数组结构应该为:
- array(
- [name]=>array(
- [title]=>'当前表单项的名称',
- [type]=>'text|select',
- [description]=>'表单内容的介绍说明'
- [iterm]=>'1:使用标准双接口,使用担保交易接口', //如果含有":",则前面为value值,后面为显示内容
- [value]=>'使用担保交易接口',
- ),
- ...
- )
- 使用方法:
- 将上述的格式传入到数组中去,然后进行解析:
- 1.声明类,并创建数组
- $af = new Array2form($config);
-
- 2.设置一个表单模板(可选,如果不设置载入默认)
- $af->SetDefaultTpl($templets); $templets:为一个底册模板文件
- 表单模板格式为:
- ~title~:~form~~description~
-
- 3.获取特定项目表单
- $af->GetIterm('alipay', 1) //1.表示获取一个默认模板下的完整表单,2.仅获取一个表单项
-
- 4.获取所有表单内容
- $af->GetAll() //获取表单所有解析后的内容
-
-*/
-class Array2form
-{
- var $FormArray = array();
- var $ArrFromTPL = '';
-
- function __construct($formarray = array())
- {
- if (count($formarray) > 1) {
- $this->FormArray = $formarray;
- //var_dump($this->FormArray);
- $this->SetDefaultTpl();
- }
- }
-
- //析构函数,兼容PHP4
- /*
- function Array2form($formarray = array())
- {
- $this->__construct($formarray);
- }
- */
-
- //获取一个特定项目的表单
- function GetIterm($itermid = '', $itermtype = 1)
- {
- $reval = $reval_form = $reval_title = $reval_des = $myformItem = '';
- if (is_array($this->FormArray)) {
- foreach ($this->FormArray as $key => $val) {
- if ($key == $itermid) {
- $reval_title = $val['title'];
- $reval_des = $val['description'];
- $reval_form = $this->GetForm($key, $val, $val['type']);
- //进行模板标签替换
- if ($itermtype == 1)
- $reval = preg_replace(
- array("/~title~/", "/~form~/", "/~description~/"),
- array($reval_title, $reval_form, $reval_des),
- $this->ArrFromTPL
- );
- else return $reval_form;
- }
- }
- } else {
- return FALSE;
- }
- return empty($reval) ? '' : $reval;
- }
-
- function GetForm($key, $formarry = array(), $formtype = 'text')
- {
- switch ($formtype) {
- case 'text':
- //生成文本编辑框
- $valstr = (empty($formarry['value'])) ? "value=''" : "value='{$formarry['value']}'";
- $reval_form = " ";
- break;
- case 'select':
- //生成选择框
- $reval_title = $formarry['title'];
- $items = explode(',', $formarry['iterm']);
- $reval_form = "";
- if (is_array($items)) {
- foreach ($items as $v) {
- $v = trim($v);
- if ($v == '') continue;
- //统一将中文冒号转为英文
- $v = str_replace(":", ":", $v);
- if (preg_match("/[\:]/", $v)) {
- list($value, $name) = preg_split('#:#', $v);
- $reval_form .= ($formarry['value'] == $value) ? "$name \r\n" : "$name \r\n";
- } else {
- $reval_form .= ($formarry['value'] == $v) ? "$v \r\n" : "$v \r\n";
- }
- }
- }
- $reval_form .= " \r\n";
- break;
- }
- return $reval_form;
- }
-
-
- //获取所有的表单内容
- function GetAll()
- {
- $reval = empty($reval) ? '' : $reval;
- if (is_array($this->FormArray)) {
- foreach ($this->FormArray as $key => $val) {
- $reval .= $this->GetIterm($key);
- }
- return $reval;
- } else {
- return FALSE;
- }
- }
-
- //获取一个特定项目的表单
- function SetDefaultTpl($tplname = '')
- {
- if (empty($tplname)) {
- $this->ArrFromTPL = '~title~:~form~~description~
';
- } else {
- if (file_exists($tplname)) $this->ArrFromTPL = file_get_contents($tplname);
- else $this->ArrFromTPL = $tplname;
- }
- }
-}
-$tplstring = "
-
- ~title~:
- ~form~ ~description~
-
-";
-
-//安装支付接口
-if ($dopost == 'install') {
- $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'");
- if (is_array($row)) {
- if ($cfg_soft_lang == 'utf-8') {
- $config_row = AutoCharset(unserialize(utf82gb($row['config'])));
- } else if ($cfg_soft_lang == 'gb2312') {
- $config_row = unserialize($row['config']);
- }
- //print_r($config_row);exit;
- $af = new Array2form($config_row);
- $af->SetDefaultTpl($tplstring);
- $reval = $af->GetAll();
- }
- include DedeInclude('templets/sys_payment_install.htm');
- exit;
-}
-//配置支付接口
-else if ($dopost == 'config') {
- if ($pay_name == "" || $pay_desc == "" || $pay_fee == "") {
- ShowMsg("您有未填写的项目!", "-1");
- exit();
- }
- $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'");
- if ($cfg_soft_lang == 'utf-8') {
- $config = AutoCharset(unserialize(utf82gb($row['config'])));
- } else if ($cfg_soft_lang == 'gb2312') {
- $config = unserialize($row['config']);
- }
- $payments = "'code' => '".$row['code']."',";
- foreach ($config as $key => $v) {
- $config[$key]['value'] = ${$key};
- $payments .= "'".$key."' => '".$config[$key]['value']."',";
- }
- $payments = substr($payments, 0, -1);
- $payment = "\$payment=array(".$payments.")";
- $configstr = "<"."?php\r\n".$payment."\r\n?".">\r\n";
- if (!empty($payment)) {
- $m_file = DEDEDATA."/payment/".$row['code'].".php";
- $fp = fopen($m_file, "w") or die("写入文件 $safeconfigfile 失败,请检查权限!");
- fwrite($fp, $configstr);
- fclose($fp);
- }
- if ($cfg_soft_lang == 'utf-8') {
- $config = AutoCharset($config, 'utf-8', 'gb2312');
- $config = serialize($config);
- $config = gb2utf8($config);
- } else {
- $config = serialize($config);
- }
-
- $query = "UPDATE `#@__payment` SET name = '$pay_name',fee='$pay_fee',description='$pay_desc',config='$config',enabled='1' WHERE id='$pid'";
- $dsql->ExecuteNoneQuery($query);
- if ($pm == 'edit') $msg = "保存修改成功";
- else $msg = "安装成功!";
- ShowMsg($msg, "sys_payment.php");
- exit();
-}
-
-//删除支付接口
-else if ($dopost == 'uninstall') {
- $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'");
- if ($cfg_soft_lang == 'utf-8') {
- $config = AutoCharset(unserialize(utf82gb($row['config'])));
- } else if ($cfg_soft_lang == 'gb2312') {
- $config = unserialize($row['config']);
- }
- foreach ($config as $key => $v) $config[$key]['value'] = "";
- if ($cfg_soft_lang == 'utf-8') {
- $config = AutoCharset($config, 'utf-8', 'gb2312');
- $config = serialize($config);
- $config = gb2utf8($config);
- } else {
- $config = serialize($config);
- }
- $query = "UPDATE `#@__payment` SET fee='',config='$config',enabled='0' WHERE id='$pid'";
- $dsql->ExecuteNoneQuery($query);
- //同时需要删除对应的缓存
- $m_file = DEDEDATA."/payment/".$row['code'].".php";
- @unlink($m_file);
- ShowMsg("删除成功!", "sys_payment.php");
- exit();
-}
-$sql = "SELECT * FROM `#@__payment` ORDER BY `rank` ASC";
-$dlist = new DataListCP();
-$dlist->SetTemplet(DEDEADMIN."/templets/sys_payment.htm");
-$dlist->SetSource($sql);
-$dlist->display();
+表单]解析类
+/*数组结构应该为:
+ array(
+ [name]=>array(
+ [title]=>'当前表单项的名称',
+ [type]=>'text|select',
+ [description]=>'表单内容的介绍说明'
+ [iterm]=>'1:使用标准双接口,使用担保交易接口', //如果含有":",则前面为value值,后面为显示内容
+ [value]=>'使用担保交易接口',
+ ),
+
+ )
+ 使用方法:
+ 将上述的格式传入到数组中去,然后进行解析:
+ 1.声明类,并创建数组
+ $af = new Array2form($config);
+
+ 2.设置一个表单模板(可选,如果不设置载入默认)
+ $af->SetDefaultTpl($templets); $templets:为一个底册模板文件
+ 表单模板格式为:
+ ~title~:~form~~description~
+
+ 3.获取特定项目表单
+ $af->GetIterm('alipay', 1) //1.表示获取一个默认模板下的完整表单,2.仅获取一个表单项
+
+ 4.获取所有表单内容
+ $af->GetAll() //获取表单所有解析后的内容
+
+*/
+class Array2form
+{
+ var $FormArray = array();
+ var $ArrFromTPL = '';
+
+ function __construct($formarray = array())
+ {
+ if (count($formarray) > 1) {
+ $this->FormArray = $formarray;
+ //var_dump($this->FormArray);
+ $this->SetDefaultTpl();
+ }
+ }
+
+ //析构函数,兼容PHP4
+ /*
+ function Array2form($formarray = array())
+ {
+ $this->__construct($formarray);
+ }
+ */
+
+ //获取一个特定项目的表单
+ function GetIterm($itermid = '', $itermtype = 1)
+ {
+ $reval = $reval_form = $reval_title = $reval_des = $myformItem = '';
+ if (is_array($this->FormArray)) {
+ foreach ($this->FormArray as $key => $val) {
+ if ($key == $itermid) {
+ $reval_title = $val['title'];
+ $reval_des = $val['description'];
+ $reval_form = $this->GetForm($key, $val, $val['type']);
+ //进行模板标签替换
+ if ($itermtype == 1)
+ $reval = preg_replace(
+ array("/~title~/", "/~form~/", "/~description~/"),
+ array($reval_title, $reval_form, $reval_des),
+ $this->ArrFromTPL
+ );
+ else return $reval_form;
+ }
+ }
+ } else {
+ return FALSE;
+ }
+ return empty($reval) ? '' : $reval;
+ }
+
+ function GetForm($key, $formarry = array(), $formtype = 'text')
+ {
+ switch ($formtype) {
+ case 'text':
+ //生成文本编辑框
+ $valstr = (empty($formarry['value'])) ? "value=''" : "value='{$formarry['value']}'";
+ $reval_form = " ";
+ break;
+ case 'select':
+ //生成选择框
+ $reval_title = $formarry['title'];
+ $items = explode(',', $formarry['iterm']);
+ $reval_form = "";
+ if (is_array($items)) {
+ foreach ($items as $v) {
+ $v = trim($v);
+ if ($v == '') continue;
+ //统一将中文冒号转为英文
+ $v = str_replace(":", ":", $v);
+ if (preg_match("/[\:]/", $v)) {
+ list($value, $name) = preg_split('#:#', $v);
+ $reval_form .= ($formarry['value'] == $value) ? "$name \r\n" : "$name \r\n";
+ } else {
+ $reval_form .= ($formarry['value'] == $v) ? "$v \r\n" : "$v \r\n";
+ }
+ }
+ }
+ $reval_form .= " \r\n";
+ break;
+ }
+ return $reval_form;
+ }
+
+
+ //获取所有的表单内容
+ function GetAll()
+ {
+ $reval = empty($reval) ? '' : $reval;
+ if (is_array($this->FormArray)) {
+ foreach ($this->FormArray as $key => $val) {
+ $reval .= $this->GetIterm($key);
+ }
+ return $reval;
+ } else {
+ return FALSE;
+ }
+ }
+
+ //获取一个特定项目的表单
+ function SetDefaultTpl($tplname = '')
+ {
+ if (empty($tplname)) {
+ $this->ArrFromTPL = '~title~:~form~~description~
';
+ } else {
+ if (file_exists($tplname)) $this->ArrFromTPL = file_get_contents($tplname);
+ else $this->ArrFromTPL = $tplname;
+ }
+ }
+}
+$tplstring = "
+
+ ~title~:
+ ~form~ ~description~
+
+";
+
+//安装支付接口
+if ($dopost == 'install') {
+ $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'");
+ if (is_array($row)) {
+ if ($cfg_soft_lang == 'utf-8') {
+ $config_row = AutoCharset(unserialize(utf82gb($row['config'])));
+ } else if ($cfg_soft_lang == 'gb2312') {
+ $config_row = unserialize($row['config']);
+ }
+ //print_r($config_row);exit;
+ $af = new Array2form($config_row);
+ $af->SetDefaultTpl($tplstring);
+ $reval = $af->GetAll();
+ }
+ include DedeInclude('templets/sys_payment_install.htm');
+ exit;
+}
+//配置支付接口
+else if ($dopost == 'config') {
+ if ($pay_name == "" || $pay_desc == "" || $pay_fee == "") {
+ ShowMsg("您有未填写的项目", "-1");
+ exit();
+ }
+ $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'");
+ if ($cfg_soft_lang == 'utf-8') {
+ $config = AutoCharset(unserialize(utf82gb($row['config'])));
+ } else if ($cfg_soft_lang == 'gb2312') {
+ $config = unserialize($row['config']);
+ }
+ $payments = "'code' => '".$row['code']."',";
+ foreach ($config as $key => $v) {
+ $config[$key]['value'] = ${$key};
+ $payments .= "'".$key."' => '".$config[$key]['value']."',";
+ }
+ $payments = substr($payments, 0, -1);
+ $payment = "\$payment=array(".$payments.")";
+ $configstr = "<"."?php\r\n".$payment."\r\n?".">\r\n";
+ if (!empty($payment)) {
+ $m_file = DEDEDATA."/payment/".$row['code'].".php";
+ $fp = fopen($m_file, "w") or die("写入文件 $safeconfigfile 失败,请检查权限");
+ fwrite($fp, $configstr);
+ fclose($fp);
+ }
+ if ($cfg_soft_lang == 'utf-8') {
+ $config = AutoCharset($config, 'utf-8', 'gb2312');
+ $config = serialize($config);
+ $config = gb2utf8($config);
+ } else {
+ $config = serialize($config);
+ }
+
+ $query = "UPDATE `#@__payment` SET name = '$pay_name',fee='$pay_fee',description='$pay_desc',config='$config',enabled='1' WHERE id='$pid'";
+ $dsql->ExecuteNoneQuery($query);
+ if ($pm == 'edit') $msg = "保存修改成功";
+ else $msg = "安装成功";
+ ShowMsg($msg, "sys_payment.php");
+ exit();
+}
+
+//删除支付接口
+else if ($dopost == 'uninstall') {
+ $row = $dsql->GetOne("SELECT * FROM `#@__payment` WHERE id='$pid'");
+ if ($cfg_soft_lang == 'utf-8') {
+ $config = AutoCharset(unserialize(utf82gb($row['config'])));
+ } else if ($cfg_soft_lang == 'gb2312') {
+ $config = unserialize($row['config']);
+ }
+ foreach ($config as $key => $v) $config[$key]['value'] = "";
+ if ($cfg_soft_lang == 'utf-8') {
+ $config = AutoCharset($config, 'utf-8', 'gb2312');
+ $config = serialize($config);
+ $config = gb2utf8($config);
+ } else {
+ $config = serialize($config);
+ }
+ $query = "UPDATE `#@__payment` SET fee='',config='$config',enabled='0' WHERE id='$pid'";
+ $dsql->ExecuteNoneQuery($query);
+ //同时需要删除对应的缓存
+ $m_file = DEDEDATA."/payment/".$row['code'].".php";
+ @unlink($m_file);
+ ShowMsg("删除成功", "sys_payment.php");
+ exit();
+}
+$sql = "SELECT * FROM `#@__payment` ORDER BY `rank` ASC";
+$dlist = new DataListCP();
+$dlist->SetTemplet(DEDEADMIN."/templets/sys_payment.htm");
+$dlist->SetSource($sql);
+$dlist->display();
diff --git a/src/dede/sys_repair.php b/src/admin/sys_repair.php
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/sys_repair.php
rename to src/admin/sys_repair.php
index 4d5f9fb9..37dbb5f2
--- a/src/dede/sys_repair.php
+++ b/src/admin/sys_repair.php
@@ -1,216 +1,218 @@
-<<点击此返回>> ", "javascript:;");
-//exit();
-if (empty($dopost)) {
- $win = new OxWindow();
- $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' ");
- $win->mainTitle = "系统修复工具";
- $wecome_info = "系统主页 >> 系统错误修复工具";
- $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误');
- $msg = "
-
-
-
-
- 由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理。
- 本工具目前主要执行下面动作:
- 1、修复/优化数据表;
- 2、更新系统缓存;
- 3、检测系统变量一致性。
- 4、检测微表与主表数据一致性。
-
-
- 点击此开始进行常规检测>>
-
-
-
-
- ";
- $win->AddMsgItem("$msg
");
- $winform = $win->GetWindow('hand', '');
- $win->Display();
- exit();
-}
-/*-------------------
-数据结构常规检测
-function 1_test_db() { }
---------------------*/ else if ($dopost == 1) {
- $win = new OxWindow();
- $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' ");
- $win->mainTitle = "系统修复工具";
- $wecome_info = "系统错误修复工具 >> 检测数据结构";
- $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误');
- $msg = "
-
-
-
- 已完成数据结构完整性检测
-
-
- 如果您系统有下面几种问题之一,请检测微表正确性:
- 1、无法获得主键,因此无法进行后续操作
- 2、更新数据库archives表时出错
- 3、列表显示数据目与实际文档数不一致
-
- 点击此检测微表正确性>>
-
-
-
-
- ";
- $win->AddMsgItem("$msg
");
- $winform = $win->GetWindow('hand', '');
- $win->Display();
- exit();
-}
-/*-------------------
-检测微表正确性并尝试修复
-function 2_test_arctiny() { }
---------------------*/ else if ($dopost == 2) {
- $msg = '';
-
- $allarcnum = 0;
- $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__archives` ");
- $allarcnum = $arcnum = $row['dd'];
- $msg .= "·#@__archives 表总记录数: {$arcnum} ";
-
- $shtables = array();
- $dsql->Execute('me', " SELECT addtable FROM `#@__channeltype` WHERE id < -1 ");
- while ($row = $dsql->GetArray('me')) {
- $addtable = strtolower(trim(str_replace('#@__', $cfg_dbprefix, $row['addtable'])));
- if (empty($addtable)) {
- continue;
- } else {
- if (!isset($shtables[$addtable])) {
- $shtables[$addtable] = 1;
- $row = $dsql->GetOne("SELECT COUNT(aid) AS dd FROM `$addtable` ");
- $msg .= "·{$addtable} 表总记录数: {$row['dd']} ";
- $allarcnum += $row['dd'];
- }
- }
- }
- $msg .= "※总有效记录数: {$allarcnum} ";
- $errall = "完成修正或无错误返回>> ";
- $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` ");
- $msg .= "※微统计表记录数: {$row['dd']} ";
- if ($row['dd'] == $allarcnum) {
- $msg .= "两者记录一致,无需修正
";
- } else {
- $sql = " TRUNCATE TABLE `#@__arctiny`";
- $dsql->ExecuteNoneQuery($sql);
- $msg .= "两者记录不一致,尝试进行简单修正... ";
- //导入普通模型微数据
- $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)
- SELECT id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid FROM `#@__archives` ";
- $dsql->ExecuteNoneQuery($sql);
- //导入单表模型微数据
- foreach ($shtables as $tb => $v) {
- $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)
- SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` ";
- $rs = $dsql->ExecuteNoneQuery($sql);
- $doarray[$tb] = 1;
- }
- $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` ");
- if ($row['dd'] == $allarcnum) {
- $msg .= "修正记录成功
";
- } else {
- $msg .= "修正记录失败,建议进行高级综合检测
";
- $errall = " 进行高级结合性检测>> ";
- }
- }
- UpDateCatCache();
- $win = new OxWindow();
- $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' ");
- $win->mainTitle = "系统修复工具";
- $wecome_info = "系统错误修复工具 >> 检测微表正确性";
- $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误');
- $msg = "
-
-
-
- {$msg}
-
-
- {$errall}
-
-
-
- ";
- $win->AddMsgItem("$msg
");
- $winform = $win->GetWindow('hand', '');
- $win->Display();
- exit();
-}
-/*-------------------
-高级方式修复微表(会删除不合法主键的内容)
-function 3_re_arctiny() { }
---------------------*/ else if ($dopost == 3) {
- $errnum = 0;
- $sql = " TRUNCATE TABLE `#@__arctiny`";
- $dsql->ExecuteNoneQuery($sql);
-
- $sql = "SELECT arc.id, arc.typeid, arc.typeid2, arc.arcrank, arc.channel, arc.senddate, arc.sortrank,
- arc.mid, ch.addtable FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel ";
- $dsql->Execute('me', $sql);
- while ($row = $dsql->GetArray('me')) {
- $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)
- VALUES('{$row['id']}','{$row['typeid']}','{$row['typeid2']}','{$row['arcrank']}',
- '{$row['channel']}','{$row['senddate']}','{$row['sortrank']}','{$row['mid']}'); ";
- $rs = $dsql->ExecuteNoneQuery($sql);
- if (!$rs) {
- $addtable = trim($addtable);
- $errnum++;
- $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='{$row['id']}' ");
- if (!empty($addtable)) $dsql->ExecuteNoneQuery("DELETE FROM `$addtable` WHERE id='{$row['id']}' ");
- }
- }
- //导入单表模型微数据
- $dsql->SetQuery("SELECT id,addtable FROM `#@__channeltype` WHERE id < -1 ");
- $dsql->Execute();
- $doarray = array();
- while ($row = $dsql->GetArray()) {
- $tb = str_replace('#@__', $cfg_dbprefix, $row['addtable']);
- if (empty($tb) || isset($doarray[$tb])) {
- continue;
- } else {
- $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)
- SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` ";
- $rs = $dsql->ExecuteNoneQuery($sql);
- $doarray[$tb] = 1;
- }
- }
- $win = new OxWindow();
- $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' ");
- $win->mainTitle = "系统修复工具";
- $wecome_info = "系统错误修复工具 >> 高级综合检测修复";
- $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误');
- $msg = "
-
- ";
- $win->AddMsgItem("$msg
");
- $winform = $win->GetWindow('hand', '');
- $win->Display();
- exit();
-}
+<<点击此返回>> ", "javascript:;");
+//exit();
+if (empty($dopost)) {
+ $win = new OxWindow();
+ $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' ");
+ $win->mainTitle = "系统修复工具";
+ $wecome_info = "系统主页 >> 系统错误修复工具";
+ $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误');
+ $msg = "
+
+
+
+
+ 由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理
+ 本工具目前主要执行下面动作:
+ 1、修复/优化数据表;
+ 2、更新系统缓存;
+ 3、检测系统变量一致性
+ 4、检测微表与主表数据一致性
+
+
+ 点击此开始进行常规检测>>
+
+
+
+
+ ";
+ $win->AddMsgItem("$msg
");
+ $winform = $win->GetWindow('hand', '');
+ $win->Display();
+ exit();
+}
+/*-------------------
+数据结构常规检测
+function 1_test_db() { }
+--------------------*/
+else if ($dopost == 1) {
+ $win = new OxWindow();
+ $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' ");
+ $win->mainTitle = "系统修复工具";
+ $wecome_info = "系统错误修复工具 >> 检测数据结构";
+ $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误');
+ $msg = "
+
+
+
+ 已完成数据结构完整性检测
+
+
+ 如果您系统有下面几种问题之一,请检测微表正确性:
+ 1、无法获得主键,因此无法进行后续操作
+ 2、更新数据库archives表时出错
+ 3、列表显示数据目与实际文档数不一致
+
+ 点击此检测微表正确性>>
+
+
+
+
+ ";
+ $win->AddMsgItem("$msg
");
+ $winform = $win->GetWindow('hand', '');
+ $win->Display();
+ exit();
+}
+/*-------------------
+检测微表正确性并尝试修复
+function 2_test_arctiny() { }
+--------------------*/
+else if ($dopost == 2) {
+ $msg = '';
+
+ $allarcnum = 0;
+ $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__archives` ");
+ $allarcnum = $arcnum = $row['dd'];
+ $msg .= "·#@__archives 表总记录数:{$arcnum} ";
+
+ $shtables = array();
+ $dsql->Execute('me', " SELECT addtable FROM `#@__channeltype` WHERE id < -1 ");
+ while ($row = $dsql->GetArray('me')) {
+ $addtable = strtolower(trim(str_replace('#@__', $cfg_dbprefix, $row['addtable'])));
+ if (empty($addtable)) {
+ continue;
+ } else {
+ if (!isset($shtables[$addtable])) {
+ $shtables[$addtable] = 1;
+ $row = $dsql->GetOne("SELECT COUNT(aid) AS dd FROM `$addtable` ");
+ $msg .= "·{$addtable} 表总记录数:{$row['dd']} ";
+ $allarcnum += $row['dd'];
+ }
+ }
+ }
+ $msg .= "※总有效记录数:{$allarcnum} ";
+ $errall = "完成修正或无错误返回>> ";
+ $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` ");
+ $msg .= "※微统计表记录数:{$row['dd']} ";
+ if ($row['dd'] == $allarcnum) {
+ $msg .= "两者记录一致,无需修正
";
+ } else {
+ $sql = " TRUNCATE TABLE `#@__arctiny`";
+ $dsql->ExecuteNoneQuery($sql);
+ $msg .= "两者记录不一致,尝试进行简单修正 ";
+ //导入普通模型微数据
+ $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)
+ SELECT id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid FROM `#@__archives` ";
+ $dsql->ExecuteNoneQuery($sql);
+ //导入单表模型微数据
+ foreach ($shtables as $tb => $v) {
+ $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)
+ SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` ";
+ $rs = $dsql->ExecuteNoneQuery($sql);
+ $doarray[$tb] = 1;
+ }
+ $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` ");
+ if ($row['dd'] == $allarcnum) {
+ $msg .= "修正记录成功
";
+ } else {
+ $msg .= "修正记录失败,建议进行高级综合检测
";
+ $errall = " 进行高级结合性检测>> ";
+ }
+ }
+ UpDateCatCache();
+ $win = new OxWindow();
+ $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' ");
+ $win->mainTitle = "系统修复工具";
+ $wecome_info = "系统错误修复工具 >> 检测微表正确性";
+ $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误');
+ $msg = "
+
+
+
+ {$msg}
+
+
+ {$errall}
+
+
+
+ ";
+ $win->AddMsgItem("$msg
");
+ $winform = $win->GetWindow('hand', '');
+ $win->Display();
+ exit();
+}
+/*-------------------
+高级方式修复微表(会删除不合法主键的内容)
+function 3_re_arctiny() { }
+--------------------*/
+else if ($dopost == 3) {
+ $errnum = 0;
+ $sql = " TRUNCATE TABLE `#@__arctiny`";
+ $dsql->ExecuteNoneQuery($sql);
+
+ $sql = "SELECT arc.id, arc.typeid, arc.typeid2, arc.arcrank, arc.channel, arc.senddate, arc.sortrank,
+ arc.mid, ch.addtable FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel ";
+ $dsql->Execute('me', $sql);
+ while ($row = $dsql->GetArray('me')) {
+ $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)
+ VALUES('{$row['id']}','{$row['typeid']}','{$row['typeid2']}','{$row['arcrank']}',
+ '{$row['channel']}','{$row['senddate']}','{$row['sortrank']}','{$row['mid']}'); ";
+ $rs = $dsql->ExecuteNoneQuery($sql);
+ if (!$rs) {
+ $addtable = trim($addtable);
+ $errnum++;
+ $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='{$row['id']}' ");
+ if (!empty($addtable)) $dsql->ExecuteNoneQuery("DELETE FROM `$addtable` WHERE id='{$row['id']}' ");
+ }
+ }
+ //导入单表模型微数据
+ $dsql->SetQuery("SELECT id,addtable FROM `#@__channeltype` WHERE id < -1 ");
+ $dsql->Execute();
+ $doarray = array();
+ while ($row = $dsql->GetArray()) {
+ $tb = str_replace('#@__', $cfg_dbprefix, $row['addtable']);
+ if (empty($tb) || isset($doarray[$tb])) {
+ continue;
+ } else {
+ $sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid)
+ SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` ";
+ $rs = $dsql->ExecuteNoneQuery($sql);
+ $doarray[$tb] = 1;
+ }
+ }
+ $win = new OxWindow();
+ $win->Init("sys_repair.php", "js/blank.js", "POST' enctype='multipart/form-data' ");
+ $win->mainTitle = "系统修复工具";
+ $wecome_info = "系统错误修复工具 >> 高级综合检测修复";
+ $win->AddTitle('本工具用于检测和修复您的系统可能存在的错误');
+ $msg = "
+
+ ";
+ $win->AddMsgItem("$msg
");
+ $winform = $win->GetWindow('hand', '');
+ $win->Display();
+ exit();
+}
diff --git a/src/dede/sys_safetest.php b/src/admin/sys_safetest.php
old mode 100755
new mode 100644
similarity index 87%
rename from src/dede/sys_safetest.php
rename to src/admin/sys_safetest.php
index 15cdd737..0451e8e2
--- a/src/dede/sys_safetest.php
+++ b/src/admin/sys_safetest.php
@@ -1,141 +1,140 @@
-OpenUrl($fileHashURL);
-$filelist = $del->GetJSON();
-$offFiles = array();
-foreach ($filelist as $key => $ff) {
- $offFiles[$ff->filename] = $ff->hash;
-}
-
-$alter = "";
-
-if (count($offFiles) == 0) {
- $alter = '
-
- 无法同官方网站文件服务器通信,校验时候无法保证本地文件是否同官方服务器文件是否一致。
-
';
-}
-
-function TestOneFile($f)
-{
- global $message, $info, $offFiles;
- $str = '';
-
- //排除safefile和data/tplcache目录
- if (preg_match("#data/tplcache|.svn|data/cache#", $f)) return -1;
-
- $fp = fopen($f, 'r');
- while (!feof($fp)) {
- $str .= fgets($fp, 1024);
- }
- fclose($fp);
-
- if (preg_match("#(".$info.")[ \r\n\t]{0,}([\[\(])#i", $str)) {
- $trfile = preg_replace("#^".DEDEROOT."#", '', $f);
- $oldTrfile = $trfile;
- $trfile = substr(str_replace("/", "\\", $trfile), 1);
-
- $localFilehash = md5_file($f);
- $remoteFilehash = isset($offFiles[$trfile]) ? $offFiles[$trfile] : '';
- if ($localFilehash === $remoteFilehash) {
- return 0;
- }
-
- $message .= " \r\n";
- return 1;
- }
- return 0;
-}
-
-function TestSafe($tdir)
-{
- global $filetype;
- $dh = dir($tdir);
- while ($fname = $dh->read()) {
- $fnamef = $tdir.'/'.$fname;
- if (@is_dir($fnamef) && $fname != '.' && $fname != '..') {
- TestSafe($fnamef);
- }
- if (preg_match("#\.(".$filetype.")#i", $fnamef)) {
- TestOneFile($fnamef);
- }
- }
-}
-
-//检测
-if ($action == 'test') {
- $message = ' ';
-
- AjaxHead();
- TestSafe(DEDEROOT);
- if ($message == '') $message = "没发现可疑文件 ";
- echo $message;
- exit();
-} else if ($action == 'viewdiff') {
- $filename = isset($filename) ? $filename : "";
- if (empty($filename)) {
- ShowMsg("没有选择对应的文件", "-1");
- exit;
- }
-
- $baseFile = "https://cdn.dedebiz.com/release/{$cfg_version_detail}$filename";
- $del = new DedeHttpDown();
- $del->OpenUrl($baseFile);
- $base = $del->GetHTML();
-
- $file = "$cfg_basedir/$filename";
- $new = "";
- if (is_file($file)) {
- $fp = fopen($file, "r");
- $new = fread($fp, filesize($file));
- fclose($fp);
- }
-
- include(dirname(__FILE__).'/templets/sys_safetest_viewdiff.htm');
-
- exit();
-}
-//清空模板缓存
-else if ($action == 'clear') {
- global $cfg_tplcache_dir;
- $message = '';
- $d = DEDEROOT.$cfg_tplcache_dir;
- AjaxHead();
- sleep(1);
- if (preg_match("#data\/#", $cfg_tplcache_dir) && file_exists($d) && is_dir($d)) {
- $dh = dir($d);
- while ($filename = $dh->read()) {
- if ($filename == '.' || $filename == '..' || $filename == 'index.html') continue;
- @unlink($d.'/'.$filename);
- }
- }
- $message = "成功清空模板缓存 ";
- echo $message;
- exit();
-}
-
-include(dirname(__FILE__).'/templets/sys_safetest.htm');
+OpenUrl($fileHashURL);
+$filelist = $del->GetJSON();
+$offFiles = array();
+foreach ($filelist as $key => $ff) {
+ $offFiles[$ff->filename] = $ff->hash;
+}
+
+$alter = "";
+
+if (count($offFiles) == 0) {
+ $alter = '
+
+ 无法同官方网站文件服务器通信,校验时候无法保证本地文件是否同官方服务器文件是否一致
+
';
+}
+
+function TestOneFile($f)
+{
+ global $message, $info, $offFiles;
+ $str = '';
+
+ //排除safefile和data/tplcache目录
+ if (preg_match("#data/tplcache|.svn|data/cache#", $f)) return -1;
+
+ $fp = fopen($f, 'r');
+ while (!feof($fp)) {
+ $str .= fgets($fp, 1024);
+ }
+ fclose($fp);
+
+ if (preg_match("#(".$info.")[ \r\n\t]{0,}([\[\(])#i", $str)) {
+ $trfile = preg_replace("#^".DEDEROOT."#", '', $f);
+ $oldTrfile = $trfile;
+ $trfile = substr(str_replace("/", "\\", $trfile), 1);
+
+ $localFilehash = md5_file($f);
+ $remoteFilehash = isset($offFiles[$trfile]) ? $offFiles[$trfile] : '';
+ if ($localFilehash === $remoteFilehash) {
+ return 0;
+ }
+
+ $message .= " \r\n";
+ return 1;
+ }
+ return 0;
+}
+
+function TestSafe($tdir)
+{
+ global $filetype;
+ $dh = dir($tdir);
+ while ($fname = $dh->read()) {
+ $fnamef = $tdir.'/'.$fname;
+ if (@is_dir($fnamef) && $fname != '.' && $fname != '..') {
+ TestSafe($fnamef);
+ }
+ if (preg_match("#\.(".$filetype.")#i", $fnamef)) {
+ TestOneFile($fnamef);
+ }
+ }
+}
+
+//检测
+if ($action == 'test') {
+ $message = ' ';
+
+ AjaxHead();
+ TestSafe(DEDEROOT);
+ if ($message == '') $message = "没发现可疑文件 ";
+ echo $message;
+ exit();
+} else if ($action == 'viewdiff') {
+ $filename = isset($filename) ? $filename : "";
+ if (empty($filename)) {
+ ShowMsg("没有选择对应的文件", "-1");
+ exit;
+ }
+
+ $baseFile = "https://cdn.dedebiz.com/release/{$cfg_version_detail}$filename";
+ $del = new DedeHttpDown();
+ $del->OpenUrl($baseFile);
+ $base = $del->GetHTML();
+
+ $file = "$cfg_basedir/$filename";
+ $new = "";
+ if (is_file($file)) {
+ $fp = fopen($file, "r");
+ $new = fread($fp, filesize($file));
+ fclose($fp);
+ }
+
+ include(dirname(__FILE__).'/templets/sys_safetest_viewdiff.htm');
+
+ exit();
+}
+//清空模板缓存
+else if ($action == 'clear') {
+ global $cfg_tplcache_dir;
+ $message = '';
+ $d = DEDEROOT.$cfg_tplcache_dir;
+ AjaxHead();
+ sleep(1);
+ if (preg_match("#data\/#", $cfg_tplcache_dir) && file_exists($d) && is_dir($d)) {
+ $dh = dir($d);
+ while ($filename = $dh->read()) {
+ if ($filename == '.' || $filename == '..' || $filename == 'index.html') continue;
+ @unlink($d.'/'.$filename);
+ }
+ }
+ $message = "成功清空模板缓存 ";
+ echo $message;
+ exit();
+}
+
+include(dirname(__FILE__).'/templets/sys_safetest.htm');
?>
\ No newline at end of file
diff --git a/src/dede/sys_sql_query.php b/src/admin/sys_sql_query.php
old mode 100755
new mode 100644
similarity index 84%
rename from src/dede/sys_sql_query.php
rename to src/admin/sys_sql_query.php
index 9821eed8..08fcc76e
--- a/src/dede/sys_sql_query.php
+++ b/src/admin/sys_sql_query.php
@@ -1,5 +1,4 @@
ExecuteNoneQuery("OPTIMIZE TABLE `$tablename` ");
- if ($rs) echo "执行优化表: $tablename OK";
- else echo "执行优化表: $tablename 失败,原因是:".$dsql->GetError();
+ if ($rs) echo "执行优化表:$tablename OK";
+ else echo "执行优化表:$tablename 失败,原因是:".$dsql->GetError();
}
exit();
}
@@ -47,9 +46,9 @@ else if ($dopost == "opimizeAll") {
while ($row = $dsql->GetArray('t', MYSQL_BOTH)) {
$rs = $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `{$row[0]}` ");
if ($rs) {
- echo "优化表: {$row[0]} ok! \r\n";
+ echo "优化表: {$row[0]} ok! \r\n";
} else {
- echo "优化表: {$row[0]} 失败! 原因是: ".$dsql->GetError()." \r\n";
+ echo "优化表: {$row[0]} 失败! 原因是: ".$dsql->GetError()." \r\n";
}
}
exit();
@@ -61,8 +60,8 @@ else if ($dopost == "repair") {
echo "没有指定表名";
} else {
$rs = $dsql->ExecuteNoneQuery("REPAIR TABLE `$tablename` ");
- if ($rs) echo "修复表: $tablename OK";
- else echo "修复表: $tablename 失败,原因是:".$dsql->GetError();
+ if ($rs) echo "修复表:$tablename OK";
+ else echo "修复表:$tablename 失败,原因是:".$dsql->GetError();
}
exit();
}
@@ -74,9 +73,9 @@ else if ($dopost == "repairAll") {
while ($row = $dsql->GetArray('t', MYSQL_BOTH)) {
$rs = $dsql->ExecuteNoneQuery("REPAIR TABLE `{$row[0]}` ");
if ($rs) {
- echo "修复表: {$row[0]} ok! \r\n";
+ echo "修复表: {$row[0]} ok! \r\n";
} else {
- echo "修复表: {$row[0]} 失败! 原因是: ".$dsql->GetError()." \r\n";
+ echo "修复表: {$row[0]} 失败! 原因是: ".$dsql->GetError()." \r\n";
}
}
exit();
@@ -86,7 +85,7 @@ else if ($dopost == "query") {
CheckCSRF();
$sqlquery = trim(stripslashes($sqlquery));
if (preg_match("#drop(.*)table#i", $sqlquery) || preg_match("#drop(.*)database#", $sqlquery)) {
- echo "删除'数据表'或'数据库'的语句不允许在这里执行。 ";
+ echo "删除'数据表'或'数据库'的语句不允许在这里执行 ";
exit();
}
//运行查询语句
@@ -108,7 +107,7 @@ else if ($dopost == "query") {
echo "记录:$j";
echo " ";
foreach ($row as $k => $v) {
- echo "{$k}: {$v} \r\n";
+ echo "{$k}: {$v} \r\n";
}
}
exit();
@@ -129,7 +128,7 @@ else if ($dopost == "query") {
if ($errCode == "") {
$i++;
} else {
- $nerrCode .= "执行: $q 出错,错误提示:".$errCode." ";
+ $nerrCode .= "执行:$q 出错,错误提示:".$errCode." ";
}
}
echo "成功执行{$i}个SQL语句 ";
diff --git a/src/dede/tag_test.php b/src/admin/tag_test.php
old mode 100755
new mode 100644
similarity index 87%
rename from src/dede/tag_test.php
rename to src/admin/tag_test.php
index a9fd6bae..ed1ae62f
--- a/src/dede/tag_test.php
+++ b/src/admin/tag_test.php
@@ -1,15 +1,14 @@
-SetTemplet($partcode, "string");
if ($showsource == "" || $showsource == "yes") {
echo "模板代码:";
- echo "".dede_htmlspecialchars($partcode)." ";
+ echo "".dede_htmlspecialchars($partcode)." ";
echo "结果: ";
}
$pv->Display();
diff --git a/src/dede/tags_main.php b/src/admin/tags_main.php
old mode 100755
new mode 100644
similarity index 94%
rename from src/dede/tags_main.php
rename to src/admin/tags_main.php
index 2f0b6b82..a5b92519
--- a/src/dede/tags_main.php
+++ b/src/admin/tags_main.php
@@ -1,150 +1,151 @@
-SetParameter("tag", $tag);
- $dlist->SetParameter("orderway", $orderway);
- $dlist->SetParameter("orderby", $orderby);
- $dlist->pageSize = 20;
- $dlist->SetTemplet(DEDEADMIN."/templets/tags_main.htm");
- $dlist->SetSource($query);
- $dlist->Display();
- exit();
-}
-/*
-function update()
-*/ else if ($action == 'update') {
- $tid = (empty($tid) ? 0 : intval($tid));
- $count = (empty($count) ? 0 : intval($count));
- if (empty($tid)) {
- ShowMsg('没有选择要删除的tag!', '-1');
- exit();
- }
- $query = "UPDATE `#@__tagindex` SET `count`='$count' WHERE id='$tid' ";
- $dsql->ExecuteNoneQuery($query);
- ShowMsg("成功保存标签的点击信息!", 'tags_main.php');
- exit();
-}
-/*
-function delete()
-*/ else if ($action == 'delete') {
- if (@is_array($ids)) {
- $stringids = implode(',', $ids);
- } else if (!empty($ids)) {
- $stringids = $ids;
- } else {
- ShowMsg('没有选择要删除的tag', '-1');
- exit();
- }
- $query = "DELETE FROM `#@__tagindex` WHERE id IN ($stringids)";
- if ($dsql->ExecuteNoneQuery($query)) {
- $query = "DELETE FROM `#@__taglist` WHERE tid IN ($stringids)";
- $dsql->ExecuteNoneQuery($query);
- ShowMsg("删除tags[ $stringids ]成功", 'tags_main.php');
- } else {
- ShowMsg("删除tags[ $stringids ]失败", 'tags_main.php');
- }
- exit();
-} else if ($action == 'get_one') {
- $tid = (empty($tid) ? 0 : intval($tid));
- $row = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE id = $tid");
- echo json_encode($row);
- exit;
-} else if ($action == 'set_one') {
- $tid = (empty($tid) ? 0 : intval($tid));
- $title = empty($title) ? "" : HtmlReplace($title, 0);
- $kw = empty($kw) ? "" : HtmlReplace($kw, 0);
- $des = empty($des) ? "" : HtmlReplace($des, 0);
- $dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET title='{$title}',keywords='{$kw}',`description`='{$des}' WHERE id = {$tid}");
- echo json_encode(array('code' => 200, 'result' => true));
-}
-/*
-function fetch()
-*/ else if ($action == 'fetch') {
- $wheresql = '';
- $start = isset($start) && is_numeric($start) ? $start : 0;
- $where = array();
- if (isset($startaid) && is_numeric($startaid) && $startaid > 0) {
- $where[] = " id>=$startaid ";
- } else {
- $startaid = 0;
- }
- if (isset($endaid) && is_numeric($endaid) && $endaid > 0) {
- $where[] = " id<=$endaid ";
- } else {
- $endaid = 0;
- }
- if (!empty($where)) {
- $wheresql = " WHERE arcrank>-1 AND ".implode(' AND ', $where);
- }
- $query = "SELECT id as aid,arcrank,typeid,keywords FROM `#@__archives` $wheresql LIMIT $start, 100";
- $dsql->SetQuery($query);
- $dsql->Execute();
- $complete = true;
- $now = time();
- while ($row = $dsql->GetArray()) {
- $aid = $row['aid'];
- $typeid = $row['typeid'];
- $arcrank = $row['arcrank'];
- $row['keywords'] = trim($row['keywords']);
- if ($row['keywords'] != '' && !preg_match("#,#", $row['keywords'])) {
- $keyarr = explode(' ', $row['keywords']);
- } else {
- $keyarr = explode(',', $row['keywords']);
- }
- foreach ($keyarr as $keyword) {
- $keyword = trim($keyword);
- if ($keyword != '' && strlen($keyword) < 13) {
- $keyword = addslashes($keyword);
- $row = $dsql->GetOne("SELECT id,total FROM `#@__tagindex` WHERE tag LIKE '$keyword'");
- if (is_array($row)) {
- $tid = $row['id'];
- $trow = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__taglist` WHERE tag LIKE '$keyword'");
- if (intval($trow['dd']) != $row['total']) {
-
- $query = "UPDATE `#@__tagindex` SET `total`=".$trow['dd'].",uptime=$now WHERE id='$tid' ";
- $dsql->ExecuteNoneQuery($query);
- }
- } else {
- $query = " INSERT INTO `#@__tagindex`(`tag`,`count`,`total`,`weekcc`,`monthcc`,`weekup`,`monthup`,`addtime`,`uptime`) VALUES('$keyword','0','1','0','0','$timestamp','$timestamp','$timestamp','$now');";
- $dsql->ExecuteNoneQuery($query);
- $tid = $dsql->GetLastID();
- }
- $query = "REPLACE INTO `#@__taglist`(`tid`,`aid`,`typeid`,`arcrank`,`tag`) VALUES ('$tid', '$aid', '$typeid','$arcrank','$keyword'); ";
- $dsql->ExecuteNoneQuery($query);
- }
- }
- $complete = FALSE;
- }
- if ($complete) {
- ShowMsg("tags获取完成", 'tags_main.php');
- exit();
- }
- $start = $start + 100;
- $goto = "tags_main.php?action=fetch&startaid=$startaid&endaid=$endaid&start=$start";
- ShowMsg('继续获取tags ...', $goto, 0, 500);
- exit();
-}
+SetParameter("tag", $tag);
+ $dlist->SetParameter("orderway", $orderway);
+ $dlist->SetParameter("orderby", $orderby);
+ $dlist->pageSize = 20;
+ $dlist->SetTemplet(DEDEADMIN."/templets/tags_main.htm");
+ $dlist->SetSource($query);
+ $dlist->Display();
+ exit();
+}
+/*
+function update()
+*/
+else if ($action == 'update') {
+ $tid = (empty($tid) ? 0 : intval($tid));
+ $count = (empty($count) ? 0 : intval($count));
+ if (empty($tid)) {
+ ShowMsg('没有选择要删除的tag!', '-1');
+ exit();
+ }
+ $query = "UPDATE `#@__tagindex` SET `count`='$count' WHERE id='$tid' ";
+ $dsql->ExecuteNoneQuery($query);
+ ShowMsg("成功保存标签的点击信息!", 'tags_main.php');
+ exit();
+}
+/*
+function delete()
+*/
+else if ($action == 'delete') {
+ if (@is_array($ids)) {
+ $stringids = implode(',', $ids);
+ } else if (!empty($ids)) {
+ $stringids = $ids;
+ } else {
+ ShowMsg('没有选择要删除的tag', '-1');
+ exit();
+ }
+ $query = "DELETE FROM `#@__tagindex` WHERE id IN ($stringids)";
+ if ($dsql->ExecuteNoneQuery($query)) {
+ $query = "DELETE FROM `#@__taglist` WHERE tid IN ($stringids)";
+ $dsql->ExecuteNoneQuery($query);
+ ShowMsg("删除tags[ $stringids ]成功", 'tags_main.php');
+ } else {
+ ShowMsg("删除tags[ $stringids ]失败", 'tags_main.php');
+ }
+ exit();
+} else if ($action == 'get_one') {
+ $tid = (empty($tid) ? 0 : intval($tid));
+ $row = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE id = $tid");
+ echo json_encode($row);
+ exit;
+} else if ($action == 'set_one') {
+ $tid = (empty($tid) ? 0 : intval($tid));
+ $title = empty($title) ? "" : HtmlReplace($title, 0);
+ $kw = empty($kw) ? "" : HtmlReplace($kw, 0);
+ $des = empty($des) ? "" : HtmlReplace($des, 0);
+ $dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET title='{$title}',keywords='{$kw}',`description`='{$des}' WHERE id = {$tid}");
+ echo json_encode(array('code' => 200, 'result' => true));
+}
+/*
+function fetch()
+*/
+else if ($action == 'fetch') {
+ $wheresql = '';
+ $start = isset($start) && is_numeric($start) ? $start : 0;
+ $where = array();
+ if (isset($startaid) && is_numeric($startaid) && $startaid > 0) {
+ $where[] = " id>=$startaid ";
+ } else {
+ $startaid = 0;
+ }
+ if (isset($endaid) && is_numeric($endaid) && $endaid > 0) {
+ $where[] = " id<=$endaid ";
+ } else {
+ $endaid = 0;
+ }
+ if (!empty($where)) {
+ $wheresql = " WHERE arcrank>-1 AND ".implode(' AND ', $where);
+ }
+ $query = "SELECT id as aid,arcrank,typeid,keywords FROM `#@__archives` $wheresql LIMIT $start, 100";
+ $dsql->SetQuery($query);
+ $dsql->Execute();
+ $complete = true;
+ $now = time();
+ while ($row = $dsql->GetArray()) {
+ $aid = $row['aid'];
+ $typeid = $row['typeid'];
+ $arcrank = $row['arcrank'];
+ $row['keywords'] = trim($row['keywords']);
+ if ($row['keywords'] != '' && !preg_match("#,#", $row['keywords'])) {
+ $keyarr = explode(' ', $row['keywords']);
+ } else {
+ $keyarr = explode(',', $row['keywords']);
+ }
+ foreach ($keyarr as $keyword) {
+ $keyword = trim($keyword);
+ if ($keyword != '' && strlen($keyword) < 13) {
+ $keyword = addslashes($keyword);
+ $row = $dsql->GetOne("SELECT id,total FROM `#@__tagindex` WHERE tag LIKE '$keyword'");
+ if (is_array($row)) {
+ $tid = $row['id'];
+ $trow = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__taglist` WHERE tag LIKE '$keyword'");
+ if (intval($trow['dd']) != $row['total']) {
+
+ $query = "UPDATE `#@__tagindex` SET `total`=".$trow['dd'].",uptime=$now WHERE id='$tid' ";
+ $dsql->ExecuteNoneQuery($query);
+ }
+ } else {
+ $query = " INSERT INTO `#@__tagindex`(`tag`,`count`,`total`,`weekcc`,`monthcc`,`weekup`,`monthup`,`addtime`,`uptime`) VALUES('$keyword','0','1','0','0','$timestamp','$timestamp','$timestamp','$now');";
+ $dsql->ExecuteNoneQuery($query);
+ $tid = $dsql->GetLastID();
+ }
+ $query = "REPLACE INTO `#@__taglist`(`tid`,`aid`,`typeid`,`arcrank`,`tag`) VALUES ('$tid', '$aid', '$typeid','$arcrank','$keyword'); ";
+ $dsql->ExecuteNoneQuery($query);
+ }
+ }
+ $complete = FALSE;
+ }
+ if ($complete) {
+ ShowMsg("tags获取完成", 'tags_main.php');
+ exit();
+ }
+ $start = $start + 100;
+ $goto = "tags_main.php?action=fetch&startaid=$startaid&endaid=$endaid&start=$start";
+ ShowMsg('继续获取tags ', $goto, 0, 500);
+ exit();
+}
diff --git a/src/dede/task_do.php b/src/admin/task_do.php
old mode 100755
new mode 100644
similarity index 87%
rename from src/dede/task_do.php
rename to src/admin/task_do.php
index e595ba6c..162ae272
--- a/src/dede/task_do.php
+++ b/src/admin/task_do.php
@@ -1,161 +1,160 @@
- $v) {
- if ($k == 'nextdo') {
- $nextdo = '';
- $nextdos = explode(',', $GLOBALS[$k]);
- if (isset($nextdos[1])) {
- for ($i = 1; $i < count($nextdos); $i++) {
- if (trim($nextdos[$i]) == '') continue;
- $nextdo .= ($nextdo == '' ? $nextdos[$i] : ','.$nextdos[$i]);
- }
- }
- //如果系统有多重任务, 把下一任务和任务列表参数提交给程序处理
- if (in_array('morejob', $notallowArr)) {
- $reurl .= "&doposttmp=".$nextdos[0];
- if ($nextdo != '') $reurl .= "&nextdotmp=$nextdo";
- } else {
- $reurl .= "&dopost=".$nextdos[0];
- if ($nextdo != '') $reurl .= "&nextdo=$nextdo";
- }
- } else if (in_array($k, $notallowArr)) {
- continue;
- } else {
- $reurl .= "&{$k}=".urlencode($GLOBALS[$k]);
- }
- }
- return $reurl;
-}
-/******************************
-//更新上一篇和下一篇
-function makeprenext() { }
- ******************************/
-if ($dopost == 'makeprenext') {
- require_once(DEDEINC.'/arc.archives.class.php');
- $aid = intval($aid);
- $preRow = $dsql->GetOne("SELECT id FROM `#@__arctiny` WHERE id<$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id DESC");
- $nextRow = $dsql->GetOne("SELECT id FROM `#@__arctiny` WHERE id>$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id ASC");
- if (is_array($preRow)) {
- $envs['aid'] = $preRow['id'];
- $arc = new Archives($preRow['id']);
- $arc->MakeHtml();
- }
- if (is_array($nextRow)) {
- $envs['aid'] = $nextRow['id'];
- $arc = new Archives($nextRow['id']);
- $arc->MakeHtml();
- }
- if (empty($nextdo)) {
- ShowMsg("完成上下篇文档更新任务完成所有更新任务 ", "close::tgtable");
- exit();
- } else {
- $jumpurl = GetNextUrl();
- ShowMsg("完成下篇文档更新任务 继续执行其它任务...", $jumpurl, 0, 500);
- exit();
- }
-}
-/******************************
-//更新主页的任务
-function makeindex() { }
- ******************************/
-if ($dopost == 'makeindex') {
- require_once(DEDEINC.'/arc.partview.class.php');
- $envs = $_sys_globals = array();
- $envs['aid'] = 0;
- $pv = new PartView();
- $row = $pv->dsql->GetOne('SELECT * FROM `#@__homepageset`');
- $templet = str_replace("{style}", $cfg_df_style, $row['templet']);
- $homeFile = dirname(__FILE__).'/'.$row['position'];
- $homeFile = str_replace("//", "/", str_replace("\\", "/", $homeFile));
- $fp = fopen($homeFile, 'w') or die("无法更新网站主页到:$homeFile 位置");
- fclose($fp);
- $tpl = $cfg_basedir.$cfg_templets_dir.'/'.$templet;
- if (!file_exists($tpl)) {
- $tpl = $cfg_basedir.$cfg_templets_dir.'/default/index.htm';
- if (!file_exists($tpl)) exit("无法找到主页模板:$tpl ");
- }
- $GLOBALS['_arclistEnv'] = 'index';
- $pv->SetTemplet($tpl);
- $pv->SaveToHtml($homeFile);
- $pv->Close();
- if (empty($nextdo)) {
- ShowMsg("完成主页更新任务完成所有更新任务 ", "close::tgtable");
- exit();
- } else {
- $jumpurl = GetNextUrl();
- ShowMsg("完成主页更新 现在跳转到其它更新任务...", $jumpurl, 0, 500);
- exit();
- }
-}
-/******************************
-//更新所有关连的栏目
-function makeparenttype() { }
-******************************/
-else if ($dopost == 'makeparenttype') {
- require_once(DEDEDATA."/cache/inc_catalog_base.inc");
- require_once(DEDEINC.'/arc.listview.class.php');
- $notallowArr = array('dopost', 'f', 'del', 'curpage', 'morejob');
-
- $jumpurl = GetNextUrl($notallowArr);
-
- if (empty($typeid)) {
- ShowMsg("完成栏目更新任务完成所有更新任务 ", "close::tgtable");
- exit();
- }
- $topids = explode(',', GetTopids($typeid));
- if (empty($curpage)) $curpage = 0;
- $tid = $topids[$curpage];
-
- if (isset($cfg_Cs[$tid]) && $cfg_Cs[$tid][1] > 0) {
- require_once(DEDEINC."/arc.listview.class.php");
- $lv = new ListView($tid);
- $lv->CountRecord();
- $lv->MakeHtml();
- $lv->Close();
- } else {
- require_once(DEDEINC."/arc.sglistview.class.php");
- $lv = new SgListView($tid);
- $lv->CountRecord();
- $lv->MakeHtml();
- $lv->Close();
- }
-
- if ($curpage >= count($topids) - 1) {
- if (!empty($doposttmp)) {
- $jumpurl = preg_replace("#doposttmp|nextdotmp#", 'del', $jumpurl);
- $jumpurl .= "&dopost={$doposttmp}&nextdo={$nextdotmp}";
- ShowMsg("完成栏目:{$tid} 更新完成栏目更新任务,继续执行后续任务... ", $jumpurl, 0, 500);
- exit();
- } else {
- ShowMsg("完成栏目:{$tid} 更新完成栏目更新任务,完成所有更新任务 ", "close::tgtable");
- exit();
- }
- } else {
- $curpage++;
- $jumpurl .= "&curpage={$curpage}&dopost=makeparenttype";
- ShowMsg("完成栏目:{$tid} 更新,继续更新其它栏目...", $jumpurl, 0, 500);
- exit();
- }
-}
+ $v) {
+ if ($k == 'nextdo') {
+ $nextdo = '';
+ $nextdos = explode(',', $GLOBALS[$k]);
+ if (isset($nextdos[1])) {
+ for ($i = 1; $i < count($nextdos); $i++) {
+ if (trim($nextdos[$i]) == '') continue;
+ $nextdo .= ($nextdo == '' ? $nextdos[$i] : ','.$nextdos[$i]);
+ }
+ }
+ //如果系统有多重任务, 把下一任务和任务列表参数提交给程序处理
+ if (in_array('morejob', $notallowArr)) {
+ $reurl .= "&doposttmp=".$nextdos[0];
+ if ($nextdo != '') $reurl .= "&nextdotmp=$nextdo";
+ } else {
+ $reurl .= "&dopost=".$nextdos[0];
+ if ($nextdo != '') $reurl .= "&nextdo=$nextdo";
+ }
+ } else if (in_array($k, $notallowArr)) {
+ continue;
+ } else {
+ $reurl .= "&{$k}=".urlencode($GLOBALS[$k]);
+ }
+ }
+ return $reurl;
+}
+/******************************
+//更新上一篇和下一篇
+function makeprenext() { }
+ ******************************/
+if ($dopost == 'makeprenext') {
+ require_once(DEDEINC.'/archive/archives.class.php');
+ $aid = intval($aid);
+ $preRow = $dsql->GetOne("SELECT id FROM `#@__arctiny` WHERE id<$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id DESC");
+ $nextRow = $dsql->GetOne("SELECT id FROM `#@__arctiny` WHERE id>$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id ASC");
+ if (is_array($preRow)) {
+ $envs['aid'] = $preRow['id'];
+ $arc = new Archives($preRow['id']);
+ $arc->MakeHtml();
+ }
+ if (is_array($nextRow)) {
+ $envs['aid'] = $nextRow['id'];
+ $arc = new Archives($nextRow['id']);
+ $arc->MakeHtml();
+ }
+ if (empty($nextdo)) {
+ ShowMsg("完成上下篇文档更新任务完成所有更新任务 ", "close::tgtable");
+ exit();
+ } else {
+ $jumpurl = GetNextUrl();
+ ShowMsg("完成下篇文档更新任务 继续执行其它任务", $jumpurl, 0, 500);
+ exit();
+ }
+}
+/******************************
+//更新主页的任务
+function makeindex() { }
+ ******************************/
+if ($dopost == 'makeindex') {
+ require_once(DEDEINC.'/archive/partview.class.php');
+ $envs = $_sys_globals = array();
+ $envs['aid'] = 0;
+ $pv = new PartView();
+ $row = $pv->dsql->GetOne('SELECT * FROM `#@__homepageset`');
+ $templet = str_replace("{style}", $cfg_df_style, $row['templet']);
+ $homeFile = dirname(__FILE__).'/'.$row['position'];
+ $homeFile = str_replace("//", "/", str_replace("\\", "/", $homeFile));
+ $fp = fopen($homeFile, 'w') or die("无法更新网站主页到:$homeFile 位置");
+ fclose($fp);
+ $tpl = $cfg_basedir.$cfg_templets_dir.'/'.$templet;
+ if (!file_exists($tpl)) {
+ $tpl = $cfg_basedir.$cfg_templets_dir.'/default/index.htm';
+ if (!file_exists($tpl)) exit("无法找到主页模板:$tpl ");
+ }
+ $GLOBALS['_arclistEnv'] = 'index';
+ $pv->SetTemplet($tpl);
+ $pv->SaveToHtml($homeFile);
+ $pv->Close();
+ if (empty($nextdo)) {
+ ShowMsg("完成主页更新任务完成所有更新任务 ", "close::tgtable");
+ exit();
+ } else {
+ $jumpurl = GetNextUrl();
+ ShowMsg("完成主页更新 现在跳转到其它更新任务", $jumpurl, 0, 500);
+ exit();
+ }
+}
+/******************************
+//更新所有关连的栏目
+function makeparenttype() { }
+******************************/
+else if ($dopost == 'makeparenttype') {
+ require_once(DEDEDATA."/cache/inc_catalog_base.inc");
+ require_once(DEDEINC.'/archive/listview.class.php');
+ $notallowArr = array('dopost', 'f', 'del', 'curpage', 'morejob');
+
+ $jumpurl = GetNextUrl($notallowArr);
+
+ if (empty($typeid)) {
+ ShowMsg("完成栏目更新任务完成所有更新任务 ", "close::tgtable");
+ exit();
+ }
+ $topids = explode(',', GetTopids($typeid));
+ if (empty($curpage)) $curpage = 0;
+ $tid = $topids[$curpage];
+
+ if (isset($cfg_Cs[$tid]) && $cfg_Cs[$tid][1] > 0) {
+ require_once(DEDEINC."/archive/listview.class.php");
+ $lv = new ListView($tid);
+ $lv->CountRecord();
+ $lv->MakeHtml();
+ $lv->Close();
+ } else {
+ require_once(DEDEINC."/archive/sglistview.class.php");
+ $lv = new SgListView($tid);
+ $lv->CountRecord();
+ $lv->MakeHtml();
+ $lv->Close();
+ }
+
+ if ($curpage >= count($topids) - 1) {
+ if (!empty($doposttmp)) {
+ $jumpurl = preg_replace("#doposttmp|nextdotmp#", 'del', $jumpurl);
+ $jumpurl .= "&dopost={$doposttmp}&nextdo={$nextdotmp}";
+ ShowMsg("完成栏目:{$tid} 更新完成栏目更新任务,继续执行后续任务 ", $jumpurl, 0, 500);
+ exit();
+ } else {
+ ShowMsg("完成栏目:{$tid} 更新完成栏目更新任务,完成所有更新任务 ", "close::tgtable");
+ exit();
+ }
+ } else {
+ $curpage++;
+ $jumpurl .= "&curpage={$curpage}&dopost=makeparenttype";
+ ShowMsg("完成栏目:{$tid} 更新,继续更新其它栏目", $jumpurl, 0, 500);
+ exit();
+ }
+}
diff --git a/src/dede/templets/action_search.htm b/src/admin/templets/action_search.htm
old mode 100755
new mode 100644
similarity index 57%
rename from src/dede/templets/action_search.htm
rename to src/admin/templets/action_search.htm
index 3b3c91ca..372156bb
--- a/src/dede/templets/action_search.htm
+++ b/src/admin/templets/action_search.htm
@@ -1,53 +1,48 @@
-
-
-
-
- 操作搜索
-
-
-
-
-
-
-
-
- 当前位置 > 搜索结果
-
-
- " "的搜索结果
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 操作搜索
+
+
+
+
+
+
+
+ 当前位置 > 搜索结果
+
+
+ " "的搜索结果
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/ad_add.htm b/src/admin/templets/ad_add.htm
old mode 100755
new mode 100644
similarity index 90%
rename from src/dede/templets/ad_add.htm
rename to src/admin/templets/ad_add.htm
index a39c21ad..e9fc4224
--- a/src/dede/templets/ad_add.htm
+++ b/src/admin/templets/ad_add.htm
@@ -4,8 +4,8 @@
增加广告
-
-
+
+
@@ -18,7 +18,6 @@
return false;
}
}
-
$(document).ready(function () {
$('.datepicker').daterangepicker({
"singleDatePicker": true,
@@ -27,7 +26,7 @@
"linkedCalendars": false,
"timePicker": true,
"timePicker24Hour": true,
- // "timePickerSeconds": true,
+ //"timePickerSeconds": true,
"showCustomRangeLabel": false,
ranges: {
'今日': [moment(), moment()],
@@ -47,18 +46,15 @@
}, function (start) {
$(this).val(start.format("YYYY-MM-DD HH:mm"));
});
-
})
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 缩 略 图:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 图集主栏目:
-
-
- getUserChannel(),$channelid);
- echo "\r\n";
- echo "请选择栏目... \r\n";
- echo $typeOptions;
- echo " ";
- ?>
-
-
- 选择副栏目";
- }
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 图集选项:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 增加图片集
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 缩略图:
+
+
+
+
+
+
+
+
+
+
+
+
+ 图集主栏目:
+
+
+ getUserChannel(),$channelid);
+ echo "\r\n";
+ echo "请选择栏目 \r\n";
+ echo $typeOptions;
+ echo " ";
+ ?>
+
+
+ 选择副栏目";
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 图集选项:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/album_edit.htm b/src/admin/templets/album_edit.htm
old mode 100755
new mode 100644
similarity index 55%
rename from src/dede/templets/album_edit.htm
rename to src/admin/templets/album_edit.htm
index e5af70de..92440b8f
--- a/src/dede/templets/album_edit.htm
+++ b/src/admin/templets/album_edit.htm
@@ -1,520 +1,526 @@
-
-
-
-
-修改图片集
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 图集主栏目:
- getUserChannel(),$channelid);
- echo "\r\n";
- if($arcRow['typeid']=='0') echo "请选择主分类... \r\n";
- echo $typeOptions;
- echo ' ';
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 高级属性:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 图集选项:
-
-
-
-
- '>
-
-
- '>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 原有图片:
-
-
-
-
-
- LoadSource($imgurls);
- if(is_array($dtp->CTags))
- {
- foreach($dtp->CTags as $ctag)
- {
- if($ctag->GetName()=="img")
- {
- $bigimg = trim($ctag->GetInnerText());
- if($ctag->GetAtt('ddimg') != $bigimg && $ctag->GetAtt('ddimg')!='')
- {
- $litimg = $ctag->GetAtt('ddimg');
- }
- else
- {
- $litimg = 'swfupload.php?dopost=ddimg&img='.$bigimg;
- }
-
- $fhtml = '';
- $fhtml .= "
\r\n";
- $fhtml .= "
\r\n";
- $fhtml .= "
\r\n";
- $fhtml .= "
[删除] \r\n";
- $fhtml .= "
注释:
\r\n";
- $fhtml .= "
更换:
\r\n";
- $fhtml .= "
\r\n";
- echo $fhtml;
- $j++;
- }
- }
- }
- $dtp->Clear();
- }
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+修改图片集
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 图集主栏目:
+ getUserChannel(),$channelid);
+ echo "\r\n";
+ if($arcRow['typeid']=='0') echo "请选择主分类 \r\n";
+ echo $typeOptions;
+ echo ' ';
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 高级属性:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 图集选项:
+
+
+
+
+
+
+ '>
+
+
+
+
+ '>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 原有图片:
+
+
+
+
+
+
+ LoadSource($imgurls);
+ if(is_array($dtp->CTags))
+ {
+ foreach($dtp->CTags as $ctag)
+ {
+ if($ctag->GetName()=="img")
+ {
+ $bigimg = trim($ctag->GetInnerText());
+ if($ctag->GetAtt('ddimg') != $bigimg && $ctag->GetAtt('ddimg')!='')
+ {
+ $litimg = $ctag->GetAtt('ddimg');
+ }
+ else
+ {
+ $litimg = 'swfupload.php?dopost=ddimg&img='.$bigimg;
+ }
+
+ $fhtml = '';
+ $fhtml .= "
\r\n";
+ $fhtml .= "
\r\n";
+ $fhtml .= "
\r\n";
+ $fhtml .= "
删除 \r\n";
+ $fhtml .= "
注释:
\r\n";
+ $fhtml .= "
更换:
\r\n";
+ $fhtml .= "
\r\n";
+ echo $fhtml;
+ $j++;
+ }
+ }
+ }
+ $dtp->Clear();
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/archives_add.htm b/src/admin/templets/archives_add.htm
old mode 100755
new mode 100644
similarity index 55%
rename from src/dede/templets/archives_add.htm
rename to src/admin/templets/archives_add.htm
index e9987ccd..54d6c1a8
--- a/src/dede/templets/archives_add.htm
+++ b/src/admin/templets/archives_add.htm
@@ -1,443 +1,379 @@
-
-
-
-
- 发布文档
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- '>
-
-
-
- 缩 略 图:
-
-
-
-
-
-
-
-
-
-
-
- 0)
- {
- echo " \r\n";
- echo " \r\n";
- }
- else
- {
- ?>
-
-
-
-
- 文档主栏目:
-
-
- getUserChannel(),$channelid);
- echo "\r\n";
- echo "请选择栏目... \r\n";
- echo $typeOptions;
- echo " ";
- ?>
-
-
- 选择副栏目";
- }
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 增加商品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ '>
+
+
+
+ 缩略图:
+
+
+
+
+
+
+
+
+ 0)
+ {
+ echo " \r\n";
+ echo " \r\n";
+ } else {
+ ?>
+
+
+
+
+ 文档主栏目:
+
+
+ getUserChannel(),$channelid);
+ echo "\r\n";
+ echo "请选择栏目 \r\n";
+ echo $typeOptions;
+ echo " ";
+ ?>
+
+
+ 选择副栏目";
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/admin/templets/archives_edit.htm b/src/admin/templets/archives_edit.htm
new file mode 100644
index 00000000..8ac39233
--- /dev/null
+++ b/src/admin/templets/archives_edit.htm
@@ -0,0 +1,363 @@
+
+
+
+
+ 修改商品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ '>
+
+
+
+
+ 0)
+ {
+ echo " \r\n";
+ echo " \r\n";
+ }
+ else
+ {
+ ?>
+
+
+
+
+ 文档主栏目:
+
+ getUserChannel(),$channelid);
+ echo "\r\n";
+ if($arcRow["typeid"]=="0") echo "请选择栏目 \r\n";
+ echo $typeOptions;
+ echo " ";
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/admin/templets/archives_sg_add.htm b/src/admin/templets/archives_sg_add.htm
new file mode 100644
index 00000000..ab96febd
--- /dev/null
+++ b/src/admin/templets/archives_sg_add.htm
@@ -0,0 +1,184 @@
+
+
+
+
+增加分类
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 缩略图:
+
+
+
+
+
+
+
+
+
+
+
+
+ 浏览权限:
+
+
+ getUserRank();
+ $dsql->SetQuery("Select * from `#@__arcrank` where adminrank<='$urank'");
+ $dsql->Execute();
+ while($row = $dsql->GetObject())
+ {
+ echo "".$row->membername." \r\n";
+ }
+ ?>
+
+
+
+
+
+
+
+
+ 0)
+ {
+ echo " \r\n";
+ } else {
+ ?>
+
+
+
+
+ 文档主栏目:
+
+
+ getUserChannel(),$channelid);
+ echo "\r\n";
+ echo "请选择栏目 \r\n";
+ echo $typeOptions;
+ echo " ";
+ ?>
+
+ 栏目管理
+ 增加大栏目
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/admin/templets/archives_sg_edit.htm b/src/admin/templets/archives_sg_edit.htm
new file mode 100644
index 00000000..c93036c9
--- /dev/null
+++ b/src/admin/templets/archives_sg_edit.htm
@@ -0,0 +1,175 @@
+
+
+
+
+修改分类
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 浏览权限:
+
+
+
+ getUserRank();
+ $dsql->SetQuery("Select * from `#@__arcrank` where adminrank<='$urank' And `rank`<>'{$addRow["arcrank"]}' ");
+ $dsql->Execute();
+ while($row = $dsql->GetObject()) {
+ echo "".$row->membername." \r\n";
+ }
+ ?>
+
+
+
+
+
+
+
+ '>
+
+
+
+
+ 0)
+ {
+ echo " \r\n";
+ } else {
+ ?>
+
+
+
+ 文档主栏目:
+
+ getUserChannel(),$channelid);
+ echo "\r\n";
+ if($addRow["typeid"]=="0") echo "请选择栏目 \r\n";
+ echo $typeOptions;
+ echo " ";
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/article_add.htm b/src/admin/templets/article_add.htm
old mode 100755
new mode 100644
similarity index 85%
rename from src/dede/templets/article_add.htm
rename to src/admin/templets/article_add.htm
index 75029002..64c5b59c
--- a/src/dede/templets/article_add.htm
+++ b/src/admin/templets/article_add.htm
@@ -1,448 +1,441 @@
-
-
-
-
-增加文章
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 缩略图:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 文章主栏目:
-
-
- getUserChannel(),$channelid);
- echo "";
- echo "请选择栏目 ";
- echo $typeOptions;
- echo " ";
- ?>
-
-
- 选择副栏目";
- }
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 文章内容:
- 重置
- 保存
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+增加文章
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 缩略图:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 文章主栏目:
+
+
+ getUserChannel(),$channelid);
+ echo "";
+ echo "请选择栏目 ";
+ echo $typeOptions;
+ echo " ";
+ ?>
+
+
+ 选择副栏目";
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 文章内容:
+ 重置
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/article_coonepage_rule.htm b/src/admin/templets/article_coonepage_rule.htm
old mode 100755
new mode 100644
similarity index 83%
rename from src/dede/templets/article_coonepage_rule.htm
rename to src/admin/templets/article_coonepage_rule.htm
index 5337513b..faff4050
--- a/src/dede/templets/article_coonepage_rule.htm
+++ b/src/admin/templets/article_coonepage_rule.htm
@@ -1,211 +1,206 @@
-
-
-
-
-
- 单页采集规则管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 请稍候,正在载入...
-
-
-
-
-
-
+
+
+
+
+ 单页采集规则管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 请稍候,正在载入
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/article_description_main.htm b/src/admin/templets/article_description_main.htm
old mode 100755
new mode 100644
similarity index 57%
rename from src/dede/templets/article_description_main.htm
rename to src/admin/templets/article_description_main.htm
index 9d48ea1a..90107bd7
--- a/src/dede/templets/article_description_main.htm
+++ b/src/admin/templets/article_description_main.htm
@@ -1,108 +1,92 @@
-
-
-
-
- 文档自动摘要、自动分页
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 用于自动更新您系统没有填写摘要的文档的摘要信息或更新没分页的文档的自动分页标识(文档使用了自动分页后会降低HTML生成速度,并且在没人工干扰的情况下可能导致分页内容的HTML错误,请小心使用此功能)。
-
-
-
-
-
-
-
-
- 开始执行分析
-
-
-
-
-
-
-
- 结果:
-
-
- [增大 ] [缩小 ]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 文档自动摘要自动分页
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用于自动更新您系统没有填写摘要的文档的摘要信息或更新没分页的文档的自动分页标识(文档使用了自动分页后会降低HTML生成速度,并且在没人工干扰的情况下可能导致分页内容的HTML错误,请小心使用此功能)
+
+
+
+
+
+
+
+
+ 开始执行分析
+
+
+
+
+
+
+
+ 结果:
+
+
+ [增大 ] [缩小 ]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/article_edit.htm b/src/admin/templets/article_edit.htm
old mode 100755
new mode 100644
similarity index 88%
rename from src/dede/templets/article_edit.htm
rename to src/admin/templets/article_edit.htm
index 8993fa73..922366a5
--- a/src/dede/templets/article_edit.htm
+++ b/src/admin/templets/article_edit.htm
@@ -2,7 +2,7 @@
-更改文章
+修改文章
@@ -10,7 +10,7 @@
-
+
@@ -41,7 +41,7 @@ table{border-collapse:separate}
@@ -50,8 +50,8 @@ table{border-collapse:separate}
@@ -62,8 +62,8 @@ table{border-collapse:separate}
@@ -79,7 +79,7 @@ table{border-collapse:separate}
- 文章标题:
+ 文章标题:
简略标题:
@@ -91,7 +91,7 @@ table{border-collapse:separate}
- 自定义属性:
+ 自定义属性:
SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC");
@@ -121,7 +121,7 @@ table{border-collapse:separate}
@@ -131,10 +131,10 @@ table{border-collapse:separate}
@@ -143,19 +143,13 @@ table{border-collapse:separate}
- 缩略图:
+ 缩略图:
远程
-
-
- 选择图片
-
-
-
-
- 清空
-
+ 上传图片
+ 选择图片
+ 清空
@@ -168,7 +162,7 @@ table{border-collapse:separate}
- 文章来源:
+ 文章来源:
选择
@@ -185,7 +179,7 @@ table{border-collapse:separate}
- 文章主栏目:
+ 文章主栏目:
getUserChannel(),$channelid);
@@ -207,7 +201,7 @@ table{border-collapse:separate}
- 文章副栏目:
+ 文章副栏目:
@@ -223,18 +217,18 @@ table{border-collapse:separate}
- 文章内容:
+ 文章内容:
- 附加选项:
+ 附加选项:
> 下载远程图片和资源
> 提取第一个图片为缩略图
@@ -254,7 +248,7 @@ table{border-collapse:separate}
- 评论选项:
+ 评论选项:
> 允许评论
> 禁止评论
@@ -269,7 +263,7 @@ table{border-collapse:separate}
- 文章排序:
+ 文章排序:
- 阅读权限:
+ 阅读权限:
@@ -321,10 +315,10 @@ table{border-collapse:separate}
-
+
- 更新时间:
+ 更新时间:
";
@@ -340,7 +334,7 @@ table{border-collapse:separate}
@@ -350,7 +344,7 @@ table{border-collapse:separate}
@@ -360,7 +354,7 @@ table{border-collapse:separate}
-
+
保存
diff --git a/src/dede/templets/article_keywords_main.htm b/src/admin/templets/article_keywords_main.htm
old mode 100755
new mode 100644
similarity index 84%
rename from src/dede/templets/article_keywords_main.htm
rename to src/admin/templets/article_keywords_main.htm
index 335aefbd..72a99c22
--- a/src/dede/templets/article_keywords_main.htm
+++ b/src/admin/templets/article_keywords_main.htm
@@ -1,128 +1,126 @@
-
-
-
-
- 关键字管理
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 关键词管理
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/article_keywords_make.htm b/src/admin/templets/article_keywords_make.htm
old mode 100755
new mode 100644
similarity index 57%
rename from src/dede/templets/article_keywords_make.htm
rename to src/admin/templets/article_keywords_make.htm
index 55168fbe..e153b90e
--- a/src/dede/templets/article_keywords_make.htm
+++ b/src/admin/templets/article_keywords_make.htm
@@ -1,61 +1,66 @@
-
-
-
-
-关键字维护
-
-
-
-
-
-
-
-
-
- 关键字维护:
-
- 返回关键字管理页
-
-
-
-
-
- 本向导帮助自动分析您系统内的关键字,并统计关键字的数量,对其进行排序,您可以清理掉错误的关键字或无意义的关键字,以提高文档关连和搜索的准确性,本分析器是直接在内存中对关键字进行分析排序后加入到数据库的,因此本操作比较占用内存,如果您的文档数量很大并且使用的又是虚拟主机,可能无法完成本操作。
- 本程序只分析文章频道的关键字数据,其它频道或自定义频道请自行手工指定内容的关系字。
- 如果您的文章是采集回来的,请先用“自动获取关键字”的功能对未有关键字的文章进行分词索引,然后再检测关键字。
-
-
-
- 检测已有的关键字
-
- 自动获取关键字
-
-
-
-
-
-
- 结果:
-
- [增大 ] [缩小 ]
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+关键词维护
+
+
+
+
+
+
+
+
+
+
+ 关键词维护:
+
+ 返回关键词管理页
+
+
+
+
+
+
+ 本向导帮助自动分析您系统内的关键词,并统计关键词的数量,对其进行排序,您可以清理掉错误的关键词或无意义的关键词,以提高文档关连和搜索的准确性,本分析器是直接在内存中对关键词进行分析排序后加入到数据库的,因此本操作比较占用内存,如果您的文档数量很大并且使用的又是虚拟主机,可能无法完成本操作
+ 本程序只分析文章频道的关键词数据,其它频道或自定义频道请自行手工指定内容的关系字
+ 如果您的文章是采集回来的,请先用“自动获取关键词”的功能对未有关键词的文章进行分词索引,然后再检测关键词
+
+
+
+
+ 检测已有的关键词
+ 自动获取关键词
+
+
+
+
+
+
+ 结果:
+
+ [增大 ] [缩小 ]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/article_keywords_select.htm b/src/admin/templets/article_keywords_select.htm
old mode 100755
new mode 100644
similarity index 75%
rename from src/dede/templets/article_keywords_select.htm
rename to src/admin/templets/article_keywords_select.htm
index d7451e0e..dd7115d4
--- a/src/dede/templets/article_keywords_select.htm
+++ b/src/admin/templets/article_keywords_select.htm
@@ -1,109 +1,106 @@
-
-
-
-
-关键字管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 选择关键字
-
- 新增关键字
- 关键字管理
-
-
-
-
-
-
- {dede:datalist}
- {dede:field.keyword/}
- {/dede:datalist}
-
-
-
-
-
-
-
-
-
- {dede:pagelist listsize=3/}
-
-
-
-
-
-
-
+
+
+
+
+关键词管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择关键词
+
+ 新增关键词
+ 关键词管理
+
+
+
+
+
+
+
+ {dede:datalist}
+ {dede:field.keyword/}
+ {/dede:datalist}
+
+
+
+
+
+
+
+
+
+ {dede:pagelist listsize=3/}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/article_result_same.htm b/src/admin/templets/article_result_same.htm
old mode 100755
new mode 100644
similarity index 63%
rename from src/dede/templets/article_result_same.htm
rename to src/admin/templets/article_result_same.htm
index 80388f4c..0b1fbfba
--- a/src/dede/templets/article_result_same.htm
+++ b/src/admin/templets/article_result_same.htm
@@ -1,135 +1,96 @@
-
-
-
-
-重复文档检测
-
-
-
-
-
-
+
+
+
+
+重复文档检测
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/article_test_same.htm b/src/admin/templets/article_test_same.htm
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/templets/article_test_same.htm
rename to src/admin/templets/article_test_same.htm
index 25c7e99b..f257157a
--- a/src/dede/templets/article_test_same.htm
+++ b/src/admin/templets/article_test_same.htm
@@ -1,87 +1,82 @@
-
-
-
-
- 重复文档检测
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 分析标题重复的文档
-
-
-
-
-
- 结果:
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 重复文档检测
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 分析标题重复的文档
+
+
+
+
+ 结果:
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/baidunews.htm b/src/admin/templets/baidunews.htm
old mode 100755
new mode 100644
similarity index 83%
rename from src/dede/templets/baidunews.htm
rename to src/admin/templets/baidunews.htm
index cc131b29..efee9ffa
--- a/src/dede/templets/baidunews.htm
+++ b/src/admin/templets/baidunews.htm
@@ -1,58 +1,55 @@
-
-
-
-
- 百度新闻地图
-
-
-
-
-
-
-
-
-
-
- 百度新闻地图
-
-
-
-
- 《互联网新闻开放协议》是百度新闻搜索制定的搜索引擎新闻源收录标准,网站可将发布的新闻内容制作成遵循此开放协议的XML格式的网页(独立于原有的新闻发布形式)供搜索引擎索引。
- 详情参见
- 配置的相关参数在 【系统设置 -> 其他选项】中调整
- 只适用于文章频道,数据表为V6默认的
-
-
-
-
- 设置:
-
-
- 文件名:
-
-
-
-
-
-
- 开始生成
-
-
-
-
- 状态:
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 百度新闻地图
+
+
+
+
+
+
+
+
+
+ 百度新闻地图
+
+
+
+
+ 《互联网新闻开放协议》是百度新闻搜索制定的搜索引擎新闻源收录标准,网站可将发布的新闻内容制作成遵循此开放协议的XML格式的网页(独立于原有的新闻发布形式)供搜索引擎索引
+ 详情参见
+ 配置的相关参数在 【系统设置 -> 其他选项】中调整
+ 只适用于文章频道,数据表为V6默认的
+
+
+
+
+ 设置:
+
+
+ 文件名:
+
+
+
+
+
+
+ 开始生成
+
+
+
+
+ 状态:
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/cards_make.htm b/src/admin/templets/cards_make.htm
old mode 100755
new mode 100644
similarity index 83%
rename from src/dede/templets/cards_make.htm
rename to src/admin/templets/cards_make.htm
index 73bd81cd..680a2580
--- a/src/dede/templets/cards_make.htm
+++ b/src/admin/templets/cards_make.htm
@@ -1,109 +1,105 @@
-
-
-
-
- 点卡生成向导
-
-
-
-
-
-
-
-
-
-
-
-
-
- 点卡生成向导:
-
- 点卡产品分类
- 点卡使用记录
-
-
-
-
-
-
-
-
-
-
-
-
- 开始生成点卡
-
-
-
-
-
-
-
- 结果:
-
-
- [增大 ] [缩小 ]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 点卡生成向导
+
+
+
+
+
+
+
+
+
+
+
+
+ 点卡生成向导:
+
+ 点卡产品分类
+ 点卡使用记录
+
+
+
+
+
+
+
+
+
+
+
+
+ 开始生成点卡
+
+
+
+
+
+
+
+ 结果:
+
+
+ [增大 ] [缩小 ]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/cards_manmage.htm b/src/admin/templets/cards_manmage.htm
old mode 100755
new mode 100644
similarity index 86%
rename from src/dede/templets/cards_manmage.htm
rename to src/admin/templets/cards_manmage.htm
index b11bd014..6e5d2b09
--- a/src/dede/templets/cards_manmage.htm
+++ b/src/admin/templets/cards_manmage.htm
@@ -1,104 +1,100 @@
-
-
-
-
- 点卡业务记录
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 点卡业务记录
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/cards_type.htm b/src/admin/templets/cards_type.htm
old mode 100755
new mode 100644
similarity index 70%
rename from src/dede/templets/cards_type.htm
rename to src/admin/templets/cards_type.htm
index 0d7202fb..5d00d3a2
--- a/src/dede/templets/cards_type.htm
+++ b/src/admin/templets/cards_type.htm
@@ -1,86 +1,83 @@
-
-
-
-
- 点卡产品分类
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 点卡产品分类
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/admin/templets/catalog_add.htm b/src/admin/templets/catalog_add.htm
new file mode 100644
index 00000000..5a721b4d
--- /dev/null
+++ b/src/admin/templets/catalog_add.htm
@@ -0,0 +1,519 @@
+
+
+
+
+栏目管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 栏目管理 >> 增加栏目
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 0)
+ {
+ echo " ";
+ echo " ";
+ echo " ";
+ }
+ ?>
+
+
+
+
+
+
+
+
+ 说明:栏目内容是替代原来栏目单独页的更灵活的一种方式,可在栏目模板中用{dede:field.content/}调用,通常用于企业简介之类的用途
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/catalog_add_quick.htm b/src/admin/templets/catalog_add_quick.htm
old mode 100755
new mode 100644
similarity index 73%
rename from src/dede/templets/catalog_add_quick.htm
rename to src/admin/templets/catalog_add_quick.htm
index 31636726..7d086615
--- a/src/dede/templets/catalog_add_quick.htm
+++ b/src/admin/templets/catalog_add_quick.htm
@@ -1,314 +1,301 @@
-
-
-
-
- 栏目管理--快速创建栏目
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 栏目管理 >> 批量增加栏目
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 栏目管理--快速创建栏目
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 栏目管理 >> 批量增加栏目
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/admin/templets/catalog_edit.htm b/src/admin/templets/catalog_edit.htm
new file mode 100644
index 00000000..61ae2088
--- /dev/null
+++ b/src/admin/templets/catalog_edit.htm
@@ -0,0 +1,449 @@
+
+
+
+
+栏目管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 栏目管理 >> 修改栏目
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 说明:栏目内容是替代原来栏目单独页的更灵活的一种方式,可在栏目模板中用{dede:field.content/}调用,通常用于企业简介之类的用途
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/catalog_main.htm b/src/admin/templets/catalog_main.htm
old mode 100755
new mode 100644
similarity index 91%
rename from src/dede/templets/catalog_main.htm
rename to src/admin/templets/catalog_main.htm
index 5a063ead..f121261c
--- a/src/dede/templets/catalog_main.htm
+++ b/src/admin/templets/catalog_main.htm
@@ -1,166 +1,166 @@
-
-
-
-
-栏目管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 网站栏目管理
-
-
- 增加顶级栏目
- 批量增加栏目
- 更新栏目缓存
- 更新栏目
-
-
-
-
-
-
-
- 提示:可使用右键菜单进行操作
-
-
- 展开全部
-
- 普通模式
-
-
-
-
-
-
-
-
-
-0) $opendir=$userChannel;
-$tu = new TypeUnit();
-$tu->ListAllType($userChannel,$opendir);
-?>
-
-
-
-
-
- 更新排序
- 获取脚本
- 更新栏目
- 更新文档
-
-
-
-
+
+
+
+
+栏目管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 网站栏目管理
+
+
+ 增加顶级栏目
+ 批量增加栏目
+ 更新栏目缓存
+ 更新栏目
+
+
+
+
+
+
+
+ 温馨提示(使用鼠标右键弹出菜单)
+
+
+ 展开栏目
+
+ 收缩栏目
+
+
+
+
+
+
+
+
+
+0) $opendir=$userChannel;
+$tu = new TypeUnit();
+$tu->ListAllType($userChannel,$opendir);
+?>
+
+
+
+
+
+ 更新排序
+ 更新脚本
+ 更新栏目
+ 更新文档
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/catalog_menu.htm b/src/admin/templets/catalog_menu.htm
old mode 100755
new mode 100644
similarity index 84%
rename from src/dede/templets/catalog_menu.htm
rename to src/admin/templets/catalog_menu.htm
index 277fb20c..4eb30be7
--- a/src/dede/templets/catalog_menu.htm
+++ b/src/admin/templets/catalog_menu.htm
@@ -1,201 +1,200 @@
-
-
-
-
-类别管理
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+类别管理
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/catalog_menu2.htm b/src/admin/templets/catalog_menu2.htm
old mode 100755
new mode 100644
similarity index 92%
rename from src/dede/templets/catalog_menu2.htm
rename to src/admin/templets/catalog_menu2.htm
index 3a5cb465..b003b8ba
--- a/src/dede/templets/catalog_menu2.htm
+++ b/src/admin/templets/catalog_menu2.htm
@@ -1,150 +1,150 @@
-
-
-
-
-类别管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 批量增加栏目
- 栏目管理
-
- 菜单
- 文档列表
- 发布向导
-
-
-
-
- 站点目录树
-
-
-
- ListAllType($userChannel,$opendir);
- ?>
-
-
-
-
+
+
+
+
+类别管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 批量增加栏目
+ 栏目管理
+
+ 菜单
+ 文档列表
+ 发布向导
+
+
+
+
+ 站点目录树
+
+
+
+ ListAllType($userChannel,$opendir);
+ ?>
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/content_att.htm b/src/admin/templets/content_att.htm
old mode 100755
new mode 100644
similarity index 72%
rename from src/dede/templets/content_att.htm
rename to src/admin/templets/content_att.htm
index c8b25fab..926e5e56
--- a/src/dede/templets/content_att.htm
+++ b/src/admin/templets/content_att.htm
@@ -1,70 +1,68 @@
-
-
-
-
- 自定义属性管理
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 自定义属性管理
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/content_batch_up.htm b/src/admin/templets/content_batch_up.htm
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets/content_batch_up.htm
rename to src/admin/templets/content_batch_up.htm
index 02d2c328..4a716003
--- a/src/dede/templets/content_batch_up.htm
+++ b/src/admin/templets/content_batch_up.htm
@@ -1,213 +1,207 @@
-
-
-
-
- 文档批量管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 文档批量管理
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/admin/templets/content_i_list.htm b/src/admin/templets/content_i_list.htm
new file mode 100644
index 00000000..48af1616
--- /dev/null
+++ b/src/admin/templets/content_i_list.htm
@@ -0,0 +1,132 @@
+
+
+
+
+图片文档管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加文档
+ {dede:if $adminid == $mid }
+ 全部文档
+ {else}
+ 我的文档
+ {/dede:if}
+ {dede:global.CheckUserSend/}
+ 栏目管理
+ 更新列表
+ 更新文档
+ 文章回收站
+
+
+
+
+
+
+
+
+
+ {dede:global.positionname/}文档列表(使用鼠标右键进行常用操作)
+
+
+ 文档图片
+ 文档标题
+ 类目
+ 权限
+ 发布人
+ HTML
+ 点击
+
+
+
+ {dede:datalist}
+
+ {/dede:datalist}
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/content_list.htm b/src/admin/templets/content_list.htm
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/templets/content_list.htm
rename to src/admin/templets/content_list.htm
index 1b463bc0..5b4257ef
--- a/src/dede/templets/content_list.htm
+++ b/src/admin/templets/content_list.htm
@@ -1,136 +1,136 @@
-
-
-
-
-文档管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加文档
- {dede:if $adminid==$mid}
- 全部文档
- {else}
- 我的文档
- {/dede:if}
- {dede:global.CheckUserSend/}
- 栏目管理
- 更新列表
- 更新文档
- 文档回收站
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+所有文档管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加文档
+ {dede:if $adminid==$mid}
+ 全部文档
+ {else}
+ 我的文档
+ {/dede:if}
+ {dede:global.CheckUserSend/}
+ 栏目管理
+ 更新列表
+ 更新文档
+ 文档回收站
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/admin/templets/content_s_list.htm b/src/admin/templets/content_s_list.htm
new file mode 100644
index 00000000..a7c47cb0
--- /dev/null
+++ b/src/admin/templets/content_s_list.htm
@@ -0,0 +1,192 @@
+
+
+
+
+专题文档管理
+
+
+
+
+
+
+
+
+
+
+
+
+ 更新专题
+ 添加专题
+
+ 频道管理
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/content_select_list.htm b/src/admin/templets/content_select_list.htm
old mode 100755
new mode 100644
similarity index 84%
rename from src/dede/templets/content_select_list.htm
rename to src/admin/templets/content_select_list.htm
index 44cce0fe..7cecdbdd
--- a/src/dede/templets/content_select_list.htm
+++ b/src/admin/templets/content_select_list.htm
@@ -1,136 +1,132 @@
-
-
-
-
-
- 选择文章
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 选择文章
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/content_sg_list.htm b/src/admin/templets/content_sg_list.htm
old mode 100755
new mode 100644
similarity index 92%
rename from src/dede/templets/content_sg_list.htm
rename to src/admin/templets/content_sg_list.htm
index d72e5235..d9539a12
--- a/src/dede/templets/content_sg_list.htm
+++ b/src/admin/templets/content_sg_list.htm
@@ -1,318 +1,314 @@
-
-
-
-
-
- 文档管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加文档
- {dede:if $adminid==$mid }
- 全部文档
- {else}
- 我的文档
- {/dede:if}
- 栏目管理
- 更新列表
- 更新文档
-
-
-
-
-
-
-
-
+
+
+
+
+ 文档管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加文档
+ {dede:if $adminid==$mid }
+ 全部文档
+ {else}
+ 我的文档
+ {/dede:if}
+ 栏目管理
+ 更新列表
+ 更新文档
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/content_tj.htm b/src/admin/templets/content_tj.htm
old mode 100755
new mode 100644
similarity index 84%
rename from src/dede/templets/content_tj.htm
rename to src/admin/templets/content_tj.htm
index d8bf69d4..ce6cc508
--- a/src/dede/templets/content_tj.htm
+++ b/src/admin/templets/content_tj.htm
@@ -1,80 +1,78 @@
-
-
-
-
-文档信息统计
-
-
-
-
-
-
- 文档信息统计:
-
-
-
-
-
-
-
-
- 综合信息统计:
-
-
- 文档总数:
- []
-
-
- 评论总数:
- []
-
-
- 会员总数:
- []
-
-
-
-
- 频道信息统计:
-
-
-
- 频道名称
- 文档总数
-
- Execute("aaa","Select channel,count(channel) as dd From `#@__archives` group by channel");
- while($row = $dsql->GetArray("aaa")) $arcs[$row['channel']] = $row['dd'];
- $dsql->Execute("me","Select id,typename From `#@__channeltype`");
- while($row = $dsql->GetObject()){
- ?>
-
- typename?>
-
- [id]) ? $arcs[$row->id] : 0 ); ?>]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+文档信息统计
+
+
+
+
+
+
+ 文档信息统计:
+
+
+
+
+
+
+
+ 综合信息统计:
+
+
+ 文档总数:
+ []
+
+
+ 评论总数:
+ []
+
+
+ 会员总数:
+ []
+
+
+
+
+ 频道信息统计:
+
+
+
+ 频道名称
+ 文档总数
+
+ Execute("aaa","Select channel,count(channel) as dd From `#@__archives` group by channel");
+ while($row = $dsql->GetArray("aaa")) $arcs[$row['channel']] = $row['dd'];
+ $dsql->Execute("me","Select id,typename From `#@__channeltype`");
+ while($row = $dsql->GetObject()){
+ ?>
+
+ typename?>
+
+ [id]) ? $arcs[$row->id] : 0 ); ?>]
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/diy_add.htm b/src/admin/templets/diy_add.htm
old mode 100755
new mode 100644
similarity index 69%
rename from src/dede/templets/diy_add.htm
rename to src/admin/templets/diy_add.htm
index 5846afbb..27b325cb
--- a/src/dede/templets/diy_add.htm
+++ b/src/admin/templets/diy_add.htm
@@ -1,130 +1,124 @@
-
-
-
-
- 新增频道
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 新增频道
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/diy_edit.htm b/src/admin/templets/diy_edit.htm
old mode 100755
new mode 100644
similarity index 70%
rename from src/dede/templets/diy_edit.htm
rename to src/admin/templets/diy_edit.htm
index 36ffc84b..170a60a7
--- a/src/dede/templets/diy_edit.htm
+++ b/src/admin/templets/diy_edit.htm
@@ -1,213 +1,206 @@
-
-
-
-
- 修改自定义表单
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 修改自定义表单
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/diy_edit_content.htm b/src/admin/templets/diy_edit_content.htm
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets/diy_edit_content.htm
rename to src/admin/templets/diy_edit_content.htm
index 973fba14..cbc0b163
--- a/src/dede/templets/diy_edit_content.htm
+++ b/src/admin/templets/diy_edit_content.htm
@@ -1,72 +1,65 @@
-
-
-
-
-编辑评论
-
-
-
-
-
-
-
-
-
-
-
- 表单管理 >> 编辑评论:
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+编辑评论
+
+
+
+
+
+
+
+
+
+
+
+ 表单管理 >> 编辑评论:
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/diy_field_add.htm b/src/admin/templets/diy_field_add.htm
old mode 100755
new mode 100644
similarity index 90%
rename from src/dede/templets/diy_field_add.htm
rename to src/admin/templets/diy_field_add.htm
index b6e0dffe..5bb1d34c
--- a/src/dede/templets/diy_field_add.htm
+++ b/src/admin/templets/diy_field_add.htm
@@ -1,202 +1,202 @@
-
-
-
-
-增加字段
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+增加字段
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/diy_field_edit.htm b/src/admin/templets/diy_field_edit.htm
old mode 100755
new mode 100644
similarity index 88%
rename from src/dede/templets/diy_field_edit.htm
rename to src/admin/templets/diy_field_edit.htm
index 810e5444..e98863e7
--- a/src/dede/templets/diy_field_edit.htm
+++ b/src/admin/templets/diy_field_edit.htm
@@ -1,180 +1,180 @@
-
-
-
-
-更改字段
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+修改字段
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/diy_list.htm b/src/admin/templets/diy_list.htm
old mode 100755
new mode 100644
similarity index 88%
rename from src/dede/templets/diy_list.htm
rename to src/admin/templets/diy_list.htm
index c07e365b..e1cd1e16
--- a/src/dede/templets/diy_list.htm
+++ b/src/admin/templets/diy_list.htm
@@ -1,83 +1,83 @@
-
-
-
-
-name; ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+name; ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/diy_main.htm b/src/admin/templets/diy_main.htm
old mode 100755
new mode 100644
similarity index 87%
rename from src/dede/templets/diy_main.htm
rename to src/admin/templets/diy_main.htm
index a9d752fc..74a6905f
--- a/src/dede/templets/diy_main.htm
+++ b/src/admin/templets/diy_main.htm
@@ -1,58 +1,57 @@
-{dede:page pagesize='40'/}
-
-
-
-
-自定义表单管理
-
-
-
-
-
-
-
-
-
-
- diyid
- 名称
- 表名
- 管理
-
- {dede:datalist}
-
- {dede:field.diyid/}
- {dede:field.name/}
- {dede:field.table/}
-
- 更改
- 删除
- 导出
- 预览
-
-
- {/dede:datalist}
-
-
-
- {dede:pagelist listsize='6'/}
-
-
-
+{dede:page pagesize='40'/}
+
+
+
+自定义表单管理
+
+
+
+
+
+
+
+
+
+
+ diyid
+ 名称
+ 表名
+ 管理
+
+ {dede:datalist}
+
+ {dede:field.diyid/}
+ {dede:field.name/}
+ {dede:field.table/}
+
+ 修改
+ 删除
+ 导出
+ 预览
+
+
+ {/dede:datalist}
+
+
+
+ {dede:pagelist listsize='6'/}
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/diy_post.htm b/src/admin/templets/diy_post.htm
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/templets/diy_post.htm
rename to src/admin/templets/diy_post.htm
index acc698f6..8b7a4084
--- a/src/dede/templets/diy_post.htm
+++ b/src/admin/templets/diy_post.htm
@@ -1,55 +1,52 @@
-
-
-
-
-name;?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+name;?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/erradd.htm b/src/admin/templets/erradd.htm
old mode 100755
new mode 100644
similarity index 86%
rename from src/dede/templets/erradd.htm
rename to src/admin/templets/erradd.htm
index 3420b648..5c64562c
--- a/src/dede/templets/erradd.htm
+++ b/src/admin/templets/erradd.htm
@@ -1,106 +1,102 @@
-{dede:config.pagesize value='20'/}
-
-
-
-
-
- 挑错管理
-
-
-
-
-
-
-
-
-
-
-
-
+{dede:config.pagesize value='20'/}
+
+
+
+
+ 挑错管理
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/feedback_edit.htm b/src/admin/templets/feedback_edit.htm
old mode 100755
new mode 100644
similarity index 61%
rename from src/dede/templets/feedback_edit.htm
rename to src/admin/templets/feedback_edit.htm
index a84c316b..d53f863d
--- a/src/dede/templets/feedback_edit.htm
+++ b/src/admin/templets/feedback_edit.htm
@@ -1,86 +1,82 @@
-
-
-
-
- 编辑评论
-
-
-
-
-
-
-
-
-
- 评论管理 >> 编辑评论:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 编辑评论
+
+
+
+
+
+
+
+
+ 评论管理 >> 编辑评论:
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/feedback_main.htm b/src/admin/templets/feedback_main.htm
old mode 100755
new mode 100644
similarity index 90%
rename from src/dede/templets/feedback_main.htm
rename to src/admin/templets/feedback_main.htm
index 734986b2..9a677d1d
--- a/src/dede/templets/feedback_main.htm
+++ b/src/admin/templets/feedback_main.htm
@@ -1,185 +1,181 @@
-
-
-
-
-
- 评论管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 评论管理
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/dede/templets/file_edit.htm b/src/admin/templets/file_edit.htm
old mode 100755
new mode 100644
similarity index 63%
rename from src/dede/templets/file_edit.htm
rename to src/admin/templets/file_edit.htm
index 7952c7fc..26c88a90
--- a/src/dede/templets/file_edit.htm
+++ b/src/admin/templets/file_edit.htm
@@ -1,13 +1,11 @@
-
+
-
文件管理器
-
-
+
+
@@ -20,7 +18,7 @@
}
}
-
+
@@ -29,56 +27,46 @@
-
-
+
-
- ◇文件管理
- >> 修改/新建文件
-
+ 文件管理 >> 修改/新建文件
-
-
-
-
-
+
+
+
+
@@ -91,5 +79,4 @@
});
-
\ No newline at end of file
diff --git a/src/dede/templets/file_manage_main.htm b/src/admin/templets/file_manage_main.htm
old mode 100755
new mode 100644
similarity index 95%
rename from src/dede/templets/file_manage_main.htm
rename to src/admin/templets/file_manage_main.htm
index b03e8ac6..8357cfe5
--- a/src/dede/templets/file_manage_main.htm
+++ b/src/admin/templets/file_manage_main.htm
@@ -1,331 +1,327 @@
-
-
-
-
- 文件管理器
-
-
-
-
-
-
-
-
-
- 文件名
- 文件大小
- 最后修改时间
- 操作
-
- read()) !== false)
-{
- if($file!="." && $file!=".." && !is_dir("$inpath/$file"))
- {
- @$filesize = filesize("$inpath/$file");
- @$filesize=$filesize/1024;
- @$filetime = filemtime("$inpath/$file");
- @$filetime = MyDate("Y-m-d H:i:s",$filetime);
- if($filesize<0.1)
- {
- @list($ty1,$ty2)=explode(".",$filesize);
- $filesize=$ty1.".".substr($ty2,0,2);
- }
- else
- {
- @list($ty1,$ty2)=explode(".",$filesize);
- $filesize=$ty1.".".substr($ty2,0,1);
- }
- }
- if($file == ".")
- {
- continue;
- }
- else if($file == "..")
- {
- if($activepath == "")
- {
- continue;
- }
- $tmp = preg_replace("#[\/][^\/]*$#i","",$activepath);
- $line = "\n
-
- 上级目录
-
-
- 当前目录:$activepath
-
-
- ";
- $dirs[] = $line;
- }
- else if(is_dir("$inpath/$file"))
- {
- if(preg_match("#^_(.*)$#i",$file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录
- if(preg_match("#^\.(.*)$#i",$file)) continue;
- $line = "\n
-
- $file
-
-
-
- 改名
- 删除
-
-
- ";
- $dirs[] = $line;
- }
- else if(preg_match("#\.(gif|png)#i",$file))
- {
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(jpg)#i",$file))
- {
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(swf|fla|fly)#i",$file))
- {
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(zip|rar|tar.gz)#i",$file))
- {
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(exe)#i",$file))
- {
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(mp3|wma)#i",$file))
- {
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(wmv|api)#i",$file))
- {
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(rm|rmvb)#i",$file))
- {
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(txt|inc|pl|cgi|asp|xml|xsl|aspx|cfm)#",$file))
- {
- $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 编辑
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(htm|html)#i",$file))
- {
- $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 编辑
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(php)#i",$file))
- {
- $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 编辑
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(js)#i",$file))
- {
- $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 编辑
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else if(preg_match("#\.(css)#i",$file))
- {
- $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
- $line = "\n
-
- $file
- $filesize KB
- $filetime
-
- 编辑
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
- else
- {
- $line = "\n
- $file
- $filesize KB
- $filetime
-
- 改名
- 删除
- 移动
-
- ";
- $files[] = $line;
- }
-}
-$dh->close();
-foreach ($dirs as $dir)
-{
- echo $dir;
-}
-foreach ($files as $file)
-{
- echo $file;
-}
-?>
-
-
- 根目录
- 新建文件
- 新建目录
- 文件上传
- 空间检查
-
-
-
-
-
-
+
+
+
+
+ 文件管理器
+
+
+
+
+
+
+
+
+ 文件名
+ 文件大小
+ 最后修改时间
+ 操作
+
+ read()) !== false)
+{
+ if($file!="." && $file!=".." && !is_dir("$inpath/$file"))
+ {
+ @$filesize = filesize("$inpath/$file");
+ @$filesize=$filesize/1024;
+ @$filetime = filemtime("$inpath/$file");
+ @$filetime = MyDate("Y-m-d H:i:s",$filetime);
+ if($filesize<0.1)
+ {
+ @list($ty1,$ty2)=explode(".",$filesize);
+ $filesize=$ty1.".".substr($ty2,0,2);
+ }
+ else
+ {
+ @list($ty1,$ty2)=explode(".",$filesize);
+ $filesize=$ty1.".".substr($ty2,0,1);
+ }
+ }
+ if($file == ".")
+ {
+ continue;
+ }
+ else if($file == "..")
+ {
+ if($activepath == "")
+ {
+ continue;
+ }
+ $tmp = preg_replace("#[\/][^\/]*$#i","",$activepath);
+ $line = "\n
+
+ 上级目录
+
+
+ 当前目录:$activepath
+
+
+ ";
+ $dirs[] = $line;
+ }
+ else if(is_dir("$inpath/$file"))
+ {
+ if(preg_match("#^_(.*)$#i",$file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录
+ if(preg_match("#^\.(.*)$#i",$file)) continue;
+ $line = "\n
+
+ $file
+
+
+
+ 改名
+ 删除
+
+
+ ";
+ $dirs[] = $line;
+ }
+ else if(preg_match("#\.(gif|png)#i",$file))
+ {
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(jpg)#i",$file))
+ {
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(swf|fla|fly)#i",$file))
+ {
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(zip|rar|tar.gz)#i",$file))
+ {
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(exe)#i",$file))
+ {
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(mp3|wma)#i",$file))
+ {
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(wmv|api)#i",$file))
+ {
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(rm|rmvb)#i",$file))
+ {
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(txt|inc|pl|cgi|asp|xml|xsl|aspx|cfm)#",$file))
+ {
+ $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 编辑
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(htm|html)#i",$file))
+ {
+ $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 编辑
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(php)#i",$file))
+ {
+ $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 编辑
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(js)#i",$file))
+ {
+ $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 编辑
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+ else if(preg_match("#\.(css)#i",$file))
+ {
+ $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath);
+ $line = "\n
+
+ $file
+ $filesize KB
+ $filetime
+
+ 编辑
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ } else {
+ $line = "\n
+ $file
+ $filesize KB
+ $filetime
+
+ 改名
+ 删除
+ 移动
+
+ ";
+ $files[] = $line;
+ }
+}
+$dh->close();
+foreach ($dirs as $dir)
+{
+ echo $dir;
+}
+foreach ($files as $file)
+{
+ echo $file;
+}
+?>
+
+
+ 根目录
+ 新建文件
+ 新建目录
+ 文件上传
+ 空间检查
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/file_upload.htm b/src/admin/templets/file_upload.htm
old mode 100755
new mode 100644
similarity index 90%
rename from src/dede/templets/file_upload.htm
rename to src/admin/templets/file_upload.htm
index 9403e984..ca2daa08
--- a/src/dede/templets/file_upload.htm
+++ b/src/admin/templets/file_upload.htm
@@ -1,61 +1,61 @@
-
-
-
-
-文件上传
-
-
-
-
-
-
+
+
+
+
+文件上传
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/freelist_add.htm b/src/admin/templets/freelist_add.htm
old mode 100755
new mode 100644
similarity index 76%
rename from src/dede/templets/freelist_add.htm
rename to src/admin/templets/freelist_add.htm
index 64b858b6..e10de4cb
--- a/src/dede/templets/freelist_add.htm
+++ b/src/admin/templets/freelist_add.htm
@@ -1,354 +1,332 @@
-
-
-
-
- 新增自由列表
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- [field:imglink/]
-
-
- [field:textlink/]
-
-
-
-
-
-
-
-
-
-
-
- 日期:[field:pubdate function="MyDate('Y-m-d', @me)"/] 点击:[field:click/] 好评:[field:scores/]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 列表样式:(这里是定义自由列表模板里的{dede:freelist
- /}标记的样式和属性)
-
-
-
-
-
-
-
- 限定栏目:
- \r\n";
- echo "不限栏目... \r\n";
- $dsql->SetQuery("Select ID,typename, channeltype From #@__arctype");
- $dsql->Execute();
- while($lrow = $dsql->GetObject()){
- $disable = '';
- if($lrow->channeltype < -1)
- {
- $disable = 'disabled';
- }
- echo "{$lrow->typename} \r\n";
- }
- echo "";
- ?>
-
-
- 限定频道:
- \r\n";
- echo "不限... \r\n";
- $dsql->SetQuery("Select ID,typename From #@__channeltype where ID>0");
- $dsql->Execute();
- while($row = $dsql->GetObject())
- {
- echo "{$row->typename} \r\n";
- }
- echo "";
- ?>
- (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
-
-
- 附加属性:
- \r\n";
- echo "不限... \r\n";
- $dsql->SetQuery("Select * From #@__arcatt");
- $dsql->Execute();
- while($row = $dsql->GetObject())
- {
- echo "{$row->attname} \r\n";
- }
- echo "";
- ?>
- 文档发布时间:
-
- 天以内 (0 表示不限)
-
-
- 每页记录数:
-
- 显示列数:
-
- 标题长度:
-
- (1 字节 = 0.5个中文字)
-
-
- 高级筛选:
-
- 带缩略图
-
- 推荐
-
- 专题 关键字:
-
- (","逗号分开)
-
-
- 排列顺序:
-
- 置顶权限值
- 发布时间
- 录入时间
- 点击量
- 文档ID
- 最后评论时间
- 评论总数
-
-
-
- 由高到低
-
- 由低到高
-
-
- 循环内的单行记录样式(InnerText):[ 底层变量field参考 ]
-
-
-
-
-
-
-
-
- 支持字段(底层变量[field:varname/]):id,title,color,typeid,ismake,description,pubdate,senddate,arcrank,click,litpic,typedir,typename,arcurl,typeurl,
- stime(pubdate 的"0000-00-00"格式),textlink,typelink,imglink,image
- 普通字段直接用[field:字段名/]表示。
- ·Pubdate发布时间的调用参数 [field:pubdate function=MyDate('Y-m-d H:i:s',@me)/]
-
-
-
-
- 保存一个列表
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 新增自由列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ [field:imglink/]
+
+
+ [field:textlink/]
+
+
+
+
+
+
+
+
+
+
+ 日期:[field:pubdate function="MyDate('Y-m-d', @me)"/] 点击:[field:click/] 好评:[field:scores/]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 列表样式:(这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性)
+
+
+
+
+
+
+
+ 限定栏目:
+ \r\n";
+ echo "不限栏目 \r\n";
+ $dsql->SetQuery("Select ID,typename, channeltype From #@__arctype");
+ $dsql->Execute();
+ while($lrow = $dsql->GetObject()){
+ $disable = '';
+ if($lrow->channeltype < -1)
+ {
+ $disable = 'disabled';
+ }
+ echo "{$lrow->typename} \r\n";
+ }
+ echo "";
+ ?>
+
+
+ 限定频道:
+ \r\n";
+ echo "不限 \r\n";
+ $dsql->SetQuery("Select ID,typename From #@__channeltype where ID>0");
+ $dsql->Execute();
+ while($row = $dsql->GetObject())
+ {
+ echo "{$row->typename} \r\n";
+ }
+ echo "";
+ ?>
+ (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
+
+
+ 附加属性:
+ \r\n";
+ echo "不限 \r\n";
+ $dsql->SetQuery("Select * From #@__arcatt");
+ $dsql->Execute();
+ while($row = $dsql->GetObject())
+ {
+ echo "{$row->attname} \r\n";
+ }
+ echo "";
+ ?>
+ 文档发布时间:
+
+ 天以内 (0 表示不限)
+
+
+ 每页记录数:
+
+ 显示列数:
+
+ 标题长度:
+
+ (1 字节 = 0.5个中文字)
+
+
+ 高级筛选:
+
+ 带缩略图
+
+ 推荐
+
+ 专题 关键词:
+
+ (","逗号分开)
+
+
+ 排列顺序:
+
+ 置顶权限值
+ 发布时间
+ 录入时间
+ 点击量
+ 文档ID
+ 最后评论时间
+ 评论总数
+
+
+
+ 由高到低
+
+ 由低到高
+
+
+ 循环内的单行记录样式(InnerText):[ 底层变量field参考 ]
+
+
+
+
+
+
+
+
+ 支持字段(底层变量[field:varname/]):id,title,color,typeid,ismake,description,pubdate,senddate,arcrank,click,litpic,typedir,typename,arcurl,typeurl, stime(pubdate 的"0000-00-00"格式),textlink,typelink,imglink,image普通字段直接用[field:字段名/]表示 ·Pubdate发布时间的调用参数 [field:pubdate function=MyDate('Y-m-d H:i:s',@me)/]
+
+
+
+
+ 保存一个列表
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/freelist_edit.htm b/src/admin/templets/freelist_edit.htm
old mode 100755
new mode 100644
similarity index 76%
rename from src/dede/templets/freelist_edit.htm
rename to src/admin/templets/freelist_edit.htm
index 6fd098ec..41d59d42
--- a/src/dede/templets/freelist_edit.htm
+++ b/src/admin/templets/freelist_edit.htm
@@ -1,326 +1,308 @@
-
-
-
-
- 更改自由列表
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 列表样式:(这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性)
-
-
-
- 限定栏目:
- GetAtt('typeid');
- echo "\r\n";
- echo "不限栏目... \r\n";
- $dsql->SetQuery("Select id,typename, channeltype From #@__arctype");
- $dsql->Execute();
- while($lrow = $dsql->GetObject()){
- $disable = '';
- if($lrow->channeltype < -1)
- {
- $disable = 'disabled';
- }
- if($lrow->id==$typeid) echo "{$lrow->typename} \r\n";
- else echo "{$lrow->typename} \r\n";
- }
- echo " ";
- ?>
-
-
- 限定频道:
- GetAtt('channel');
- echo "不限 \r\n";
- $dsql->SetQuery("Select id,typename From #@__channeltype where id>0");
- $dsql->Execute();
- while($nrow = $dsql->GetObject())
- {
- if($nrow->id==$channel) echo "{$nrow->typename} \r\n";
- else echo "{$nrow->typename} \r\n";
- }
- echo " ";
- ?>
- (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
-
-
- 附加属性:
- GetAtt('att');
- echo "\r\n";
- echo "不限... \r\n";
- $dsql->SetQuery("Select * From #@__arcatt");
- $dsql->Execute();
- while($nrow = $dsql->GetObject())
- {
- if($att==$nrow->att)
- {
- echo "{$nrow->attname} \r\n";
- }
- else
- {
- echo "{$nrow->attname} \r\n";
- }
- }
- echo " ";
- ?>
- 文档发布时间:
-
- 天以内 (0 表示不限)
-
-
- 每页记录数:
-
- 显示列数:
-
- 标题长度:
-
- (1 字节 = 0.5个中文字)
-
-
-
- GetAtt('type');
- if($setype=='') $setype = 'X';
- ?>
- 高级筛选:
- >
- 带缩略图
- >
- 推荐
- >
- 专题 关键字:
-
- (","逗号分开)
-
-
-
- 排列顺序:
- GetAtt('orderby');
- $sorta = "sortrank,置顶权限值;pubdate,发布时间;senddate,录入时间;click,点击量;id,文档ID,lastpost,最后评论时间;postnum,评论总数;rand,随机获取";
- $sortas = explode(';',$sorta);
- foreach($sortas as $v)
- {
- $vs = explode(',',$v);
- $vs[0] = trim($vs[0]);
- $sortarrs[$vs[0]] = $vs[1];
- }
- ?>
-
- {$sortarrs[$orderby]}\r\n";
- ?>
- 置顶权限值
- 发布时间
- 录入时间
- 点击量
- 文档ID
- 最后评论时间
- 评论总数
-
-
- GetAtt('orderway')=='desc') echo " checked";?>>
- 由高到低
- GetAtt('orderway')=='asc') echo " checked";?>>
- 由低到高
-
-
- 循环内的单行记录样式(InnerText):[底层变量field参考 ]
-
-
-
- GetInnerText()?>
-
-
-
-
- 支持字段(底层变量[field:varname/]):id,title,color,typeid,ismake,description,pubdate,senddate,arcrank,click,litpic,typedir,typename,arcurl,typeurl,
- stime(pubdate 的"0000-00-00"格式),textlink,typelink,imglink,image
- 普通字段直接用[field:字段名/]表示。
- ·Pubdate发布时间的调用参数 [field:pubdate function=MyDate('Y--%d H:i:s',@me)/]
-
-
-
-
- 保存一个列表
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 修改自由列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 列表样式:(这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性)
+
+
+
+ 限定栏目:
+ GetAtt('typeid');
+ echo "\r\n";
+ echo "不限栏目 \r\n";
+ $dsql->SetQuery("Select id,typename, channeltype From #@__arctype");
+ $dsql->Execute();
+ while($lrow = $dsql->GetObject()){
+ $disable = '';
+ if($lrow->channeltype < -1)
+ {
+ $disable = 'disabled';
+ }
+ if($lrow->id==$typeid) echo "{$lrow->typename} \r\n";
+ else echo "{$lrow->typename} \r\n";
+ }
+ echo " ";
+ ?>
+
+
+ 限定频道:
+ GetAtt('channel');
+ echo "不限 \r\n";
+ $dsql->SetQuery("Select id,typename From #@__channeltype where id>0");
+ $dsql->Execute();
+ while($nrow = $dsql->GetObject())
+ {
+ if($nrow->id==$channel) echo "{$nrow->typename} \r\n";
+ else echo "{$nrow->typename} \r\n";
+ }
+ echo " ";
+ ?>
+ (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
+
+
+ 附加属性:
+ GetAtt('att');
+ echo "\r\n";
+ echo "不限 \r\n";
+ $dsql->SetQuery("Select * From #@__arcatt");
+ $dsql->Execute();
+ while($nrow = $dsql->GetObject())
+ {
+ if($att==$nrow->att)
+ {
+ echo "{$nrow->attname} \r\n";
+ }
+ else
+ {
+ echo "{$nrow->attname} \r\n";
+ }
+ }
+ echo " ";
+ ?>
+ 文档发布时间:
+
+ 天以内 (0 表示不限)
+
+
+ 每页记录数:
+
+ 显示列数:
+
+ 标题长度:
+
+ (1 字节 = 0.5个中文字)
+
+
+
+ GetAtt('type');
+ if($setype=='') $setype = 'X';
+ ?>
+ 高级筛选:
+ >
+ 带缩略图
+ >
+ 推荐
+ >
+ 专题 关键词:
+
+ (","逗号分开)
+
+
+
+ 排列顺序:
+ GetAtt('orderby');
+ $sorta = "sortrank,置顶权限值;pubdate,发布时间;senddate,录入时间;click,点击量;id,文档ID,lastpost,最后评论时间;postnum,评论总数;rand,随机获取";
+ $sortas = explode(';',$sorta);
+ foreach($sortas as $v)
+ {
+ $vs = explode(',',$v);
+ $vs[0] = trim($vs[0]);
+ $sortarrs[$vs[0]] = $vs[1];
+ }
+ ?>
+
+ {$sortarrs[$orderby]}\r\n";
+ ?>
+ 置顶权限值
+ 发布时间
+ 录入时间
+ 点击量
+ 文档ID
+ 最后评论时间
+ 评论总数
+
+
+ GetAtt('orderway')=='desc') echo " checked";?>>
+ 由高到低
+ GetAtt('orderway')=='asc') echo " checked";?>>
+ 由低到高
+
+
+ 循环内的单行记录样式(InnerText):[底层变量field参考 ]
+
+
+
+ GetInnerText()?>
+
+
+
+
+ 支持字段(底层变量[field:varname/]):id,title,color,typeid,ismake,description,pubdate,senddate,arcrank,click,litpic,typedir,typename,arcurl,typeurl, stime(pubdate 的"0000-00-00"格式),textlink,typelink,imglink,image普通字段直接用[field:字段名/]表示 ·Pubdate发布时间的调用参数 [field:pubdate function=MyDate('Y--%d H:i:s',@me)/]
+
+
+
+
+ 保存一个列表
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/freelist_main.htm b/src/admin/templets/freelist_main.htm
old mode 100755
new mode 100644
similarity index 74%
rename from src/dede/templets/freelist_main.htm
rename to src/admin/templets/freelist_main.htm
index 64905d69..51812efa
--- a/src/dede/templets/freelist_main.htm
+++ b/src/admin/templets/freelist_main.htm
@@ -1,157 +1,152 @@
-
-
-
-
-
- 自由列表管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 自由列表管理
- 增加列表
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 自由列表管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 自由列表管理
+ 增加列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/friendlink_add.htm b/src/admin/templets/friendlink_add.htm
old mode 100755
new mode 100644
similarity index 78%
rename from src/dede/templets/friendlink_add.htm
rename to src/admin/templets/friendlink_add.htm
index 3f3958c4..b764d1ca
--- a/src/dede/templets/friendlink_add.htm
+++ b/src/admin/templets/friendlink_add.htm
@@ -1,118 +1,118 @@
-
-
-
-
-友情链接管理
-
-
-
-
-
-
-
-
-
-
-
- 友情链接管理 >>增加链接
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+友情链接管理
+
+
+
+
+
+
+
+
+
+
+
+ 友情链接管理 >> 增加链接
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/friendlink_edit.htm b/src/admin/templets/friendlink_edit.htm
old mode 100755
new mode 100644
similarity index 68%
rename from src/dede/templets/friendlink_edit.htm
rename to src/admin/templets/friendlink_edit.htm
index 5328cbbf..4695346a
--- a/src/dede/templets/friendlink_edit.htm
+++ b/src/admin/templets/friendlink_edit.htm
@@ -1,106 +1,98 @@
-
-
-
-
- 友情链接更改
-
-
-
-
-
-
-
-
-
- 友情链接管理 >> 链接更改
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 友情链接修改
+
+
+
+
+
+
+
+
+ 友情链接管理 >> 链接修改
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/friendlink_main.htm b/src/admin/templets/friendlink_main.htm
old mode 100755
new mode 100644
similarity index 86%
rename from src/dede/templets/friendlink_main.htm
rename to src/admin/templets/friendlink_main.htm
index b784b950..fbc854fd
--- a/src/dede/templets/friendlink_main.htm
+++ b/src/admin/templets/friendlink_main.htm
@@ -1,131 +1,123 @@
-{dede:config.pagesize value="20"/}
-
-
-
-
- 友情链接管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+{dede:config.pagesize value="20"/}
+
+
+
+
+ 友情链接管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/friendlink_type.htm b/src/admin/templets/friendlink_type.htm
old mode 100755
new mode 100644
similarity index 73%
rename from src/dede/templets/friendlink_type.htm
rename to src/admin/templets/friendlink_type.htm
index d2b2de25..20f64341
--- a/src/dede/templets/friendlink_type.htm
+++ b/src/admin/templets/friendlink_type.htm
@@ -1,70 +1,68 @@
-
-
-
-
- 网站类型管理
-
-
-
-
-
-
-
-
+
+
+
+
+ 网站类型管理
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/imagecut.htm b/src/admin/templets/imagecut.htm
old mode 100755
new mode 100644
similarity index 68%
rename from src/dede/templets/imagecut.htm
rename to src/admin/templets/imagecut.htm
index 06dd3798..457fde4c
--- a/src/dede/templets/imagecut.htm
+++ b/src/admin/templets/imagecut.htm
@@ -1,198 +1,181 @@
-
-
-
-
-图片裁剪 Image Cropper
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+图片裁剪 Image Cropper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/index2.htm b/src/admin/templets/index.htm
old mode 100755
new mode 100644
similarity index 62%
rename from src/dede/templets/index2.htm
rename to src/admin/templets/index.htm
index f212f78f..73699c22
--- a/src/dede/templets/index2.htm
+++ b/src/admin/templets/index.htm
@@ -1,112 +1,118 @@
-
-
-
-
-
-后台管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+后台管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/admin/templets/index_body.htm b/src/admin/templets/index_body.htm
new file mode 100644
index 00000000..4395aaf3
--- /dev/null
+++ b/src/admin/templets/index_body.htm
@@ -0,0 +1,293 @@
+
+
+
+
+系统概况
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
欢迎使用国内流行的内容管理系统多端全媒体解决方案 --
+
+
+
+
+
+
+
+ SetNameSpace('menu','<','>');
+ $dtp->LoadTemplet($myIcoFile);
+ if(is_array($dtp->CTags)){
+ foreach($dtp->CTags as $ctag){
+ $title = $ctag->GetAtt('title');
+ $link = $ctag->GetAtt('link');
+ echo "{$title} ";
+ }
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+ 操作系统:
+ Web服务器:
+
+
+ 网站域名:
+ 网站地址:
+
+
+ 您的级别:getUserType()==10) {echo "总管理员";} else if($cuserLogin->getUserType()==5) {echo "频道总编";} else {echo "信息采集员或其它管理员";}?>
+ 版本信息:
+
+
+ PHP版本:
+ GD版本:
+
+
+ 上传文件:
+ 远程连接:
+
+
+
+
+
+
+
+
+
+
+ -2 ORDER BY arc.id DESC LIMIT 0,5";
+ $arcArr = array();
+ $dsql->Execute('m', $query);
+ while($row = $dsql->GetArray('m'))
+ {
+ $arcArr[] = $row;
+ }
+ ?>
+ 1)
+ {
+ foreach($arcArr as $row)
+ {
+ if(trim($row['editcon'])==''){
+ $row['editcon'] = 'archives_edit.php';
+ }
+ $rowarcrank = $row['arcrank']==-1? "未审核 ":"";
+ $pubdate = GetDateMk($row['pubdate']);
+ echo "{$row['title']} {$rowarcrank}{$pubdate} ";
+ }
+ } else {
+ ?>
+ 暂无文档
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/index_menu2.htm b/src/admin/templets/index_menu.htm
similarity index 87%
rename from src/dede/templets/index_menu2.htm
rename to src/admin/templets/index_menu.htm
index f391cc5d..ac6c35b2 100644
--- a/src/dede/templets/index_menu2.htm
+++ b/src/admin/templets/index_menu.htm
@@ -4,14 +4,14 @@
DedeBIZ menu
-
+
var curopenItem = '$openitem';";
?>
-
- 核心
- 模块
- 生成
+ 运维
+ 插件
+ 更新
会员
getUserType()>=10){
diff --git a/src/dede/templets/index_top2.htm b/src/admin/templets/index_top2.htm
old mode 100755
new mode 100644
similarity index 88%
rename from src/dede/templets/index_top2.htm
rename to src/admin/templets/index_top2.htm
index a4f5e76d..78502cf2
--- a/src/dede/templets/index_top2.htm
+++ b/src/admin/templets/index_top2.htm
@@ -1,151 +1,151 @@
-
-
-
-
-DedeBIZ
-
-
-
-
-
-
-
-
-
-
-
- 您好:getUserName(); ?> ,欢迎使用DedeBIZV6
-
-
-
-
-
+
+
+
+
+DedeBIZ
+
+
+
+
+
+
+
+
+
+
+
+ 您好:getUserName(); ?> ,欢迎使用DedeBIZV6
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/log_list.htm b/src/admin/templets/log_list.htm
old mode 100755
new mode 100644
similarity index 87%
rename from src/dede/templets/log_list.htm
rename to src/admin/templets/log_list.htm
index ecbe710a..8007c63b
--- a/src/dede/templets/log_list.htm
+++ b/src/admin/templets/log_list.htm
@@ -1,142 +1,134 @@
-
-
-
-
- 采集内容管理
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 采集内容管理
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/login.htm b/src/admin/templets/login.htm
old mode 100755
new mode 100644
similarity index 86%
rename from src/dede/templets/login.htm
rename to src/admin/templets/login.htm
index ce59a3ec..143e6431
--- a/src/dede/templets/login.htm
+++ b/src/admin/templets/login.htm
@@ -1,76 +1,75 @@
-
-
-
-
-
-
-
-
-
-后台登录
-
-
-
-
-
-
-
-
后台登录
-
-
-
-
-
- 用户名
-
-
-
- 密码
-
-
-
-
-
- 登录
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+后台登录
+
+
+
+
+
+
+
+
后台登录
+
+
+
+
+
+ 用户名
+
+
+
+ 密码
+
+
+
+
+
+ 登录
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mail_file_manage.htm b/src/admin/templets/mail_file_manage.htm
old mode 100755
new mode 100644
similarity index 89%
rename from src/dede/templets/mail_file_manage.htm
rename to src/admin/templets/mail_file_manage.htm
index 0dd280ef..eca4dce7
--- a/src/dede/templets/mail_file_manage.htm
+++ b/src/admin/templets/mail_file_manage.htm
@@ -1,75 +1,75 @@
-
-
-
-
-邮件列表文件管理
-
-
-
-
-
-
-
- 邮件列表管理
-
-
-
- 文件名
- 文件大小
- 创建时间
- 操作
-
-read()) !== false)
-{
- if($file!="." && $file!=".." && !is_dir("$inpath/$file"))
- {
- @$filesize = filesize("$inpath/$file");
- @$filesize=$filesize/1024;
- @$filetime = filemtime("$inpath/$file");
- @$filetime = MyDate("Y-m-d H:i:s",$filetime);
- if($filesize<0.1)
- {
- @list($ty1,$ty2)=explode(".",$filesize);
- $filesize=$ty1.".".substr($ty2,0,2);
- }
- else
- {
- @list($ty1,$ty2)=explode(".",$filesize);
- $filesize=$ty1.".".substr($ty2,0,1);
- }
- }
-
- if(!is_dir("$inpath/$file"))
- {
- $line = "\n
- $file
- $filesize KB
- $filetime
-
- [删除]
-
- ";
- $files[] = $line;
- }
-}
-$dh->close();
-foreach ($files as $file)
-{
- echo $file;
-}
-?>
-
-
-
-
-
+
+
+
+
+邮件列表文件管理
+
+
+
+
+
+
+
+ 邮件列表管理
+
+
+
+ 文件名
+ 文件大小
+ 创建时间
+ 操作
+
+read()) !== false)
+{
+ if($file!="." && $file!=".." && !is_dir("$inpath/$file"))
+ {
+ @$filesize = filesize("$inpath/$file");
+ @$filesize=$filesize/1024;
+ @$filetime = filemtime("$inpath/$file");
+ @$filetime = MyDate("Y-m-d H:i:s",$filetime);
+ if($filesize<0.1)
+ {
+ @list($ty1,$ty2)=explode(".",$filesize);
+ $filesize=$ty1.".".substr($ty2,0,2);
+ }
+ else
+ {
+ @list($ty1,$ty2)=explode(".",$filesize);
+ $filesize=$ty1.".".substr($ty2,0,1);
+ }
+ }
+
+ if(!is_dir("$inpath/$file"))
+ {
+ $line = "\n
+ $file
+ $filesize KB
+ $filetime
+
+ [删除]
+
+ ";
+ $files[] = $line;
+ }
+}
+$dh->close();
+foreach ($files as $file)
+{
+ echo $file;
+}
+?>
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mail_getfile.htm b/src/admin/templets/mail_getfile.htm
old mode 100755
new mode 100644
similarity index 74%
rename from src/dede/templets/mail_getfile.htm
rename to src/admin/templets/mail_getfile.htm
index 120ed898..623b2989
--- a/src/dede/templets/mail_getfile.htm
+++ b/src/admin/templets/mail_getfile.htm
@@ -1,50 +1,50 @@
-
-
-
-
-发送邮件
-
-
-
-
-
-
-
- 发送邮件
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+发送邮件
+
+
+
+
+
+
+
+ 发送邮件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mail_send.htm b/src/admin/templets/mail_send.htm
old mode 100755
new mode 100644
similarity index 59%
rename from src/dede/templets/mail_send.htm
rename to src/admin/templets/mail_send.htm
index d0053fcf..f9bbfbb1
--- a/src/dede/templets/mail_send.htm
+++ b/src/admin/templets/mail_send.htm
@@ -1,98 +1,93 @@
-
-
-
-
-发送邮件
-
-
-
-
-
-
-
-
- 发送邮件
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+发送邮件
+
+
+
+
+
+
+
+
+ 发送邮件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mail_title_add.htm b/src/admin/templets/mail_title_add.htm
old mode 100755
new mode 100644
similarity index 75%
rename from src/dede/templets/mail_title_add.htm
rename to src/admin/templets/mail_title_add.htm
index 133f085e..ae871a14
--- a/src/dede/templets/mail_title_add.htm
+++ b/src/admin/templets/mail_title_add.htm
@@ -1,71 +1,71 @@
-
-
-
-
-发送邮件
-
-
-
-
-
-
-
- 增加期刊
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+发送邮件
+
+
+
+
+
+
+
+ 增加期刊
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mail_title_edit.htm b/src/admin/templets/mail_title_edit.htm
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets/mail_title_edit.htm
rename to src/admin/templets/mail_title_edit.htm
index afa0f0ff..36f2d7ee
--- a/src/dede/templets/mail_title_edit.htm
+++ b/src/admin/templets/mail_title_edit.htm
@@ -1,71 +1,71 @@
-
-
-
-
-发送邮件
-
-
-
-
-
-
-
- 编辑期刊
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+发送邮件
+
+
+
+
+
+
+
+ 编辑期刊
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mail_title_main.htm b/src/admin/templets/mail_title_main.htm
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/templets/mail_title_main.htm
rename to src/admin/templets/mail_title_main.htm
index 021e2d60..36863497
--- a/src/dede/templets/mail_title_main.htm
+++ b/src/admin/templets/mail_title_main.htm
@@ -1,47 +1,47 @@
-
-
-
-
-发送邮件
-
-
-
-
-
-
-
- 期刊管理
-
-
-
-
- ID
- 期刊号
- 期刊名称
- 所属分类
- 添加时间
- 发送时间
- 编辑人
- 操作
-
- {dede:datalist}
-
- {dede:field.id/}
- {dede:field.period/}
- {dede:field.title/}
- {dede:field.typename/}
- {dede:field.addtime function='GetDateTimeMk(@me)'/}
- {dede:field.sendtime function='GetSendTimeMk(@me)'/}
- {dede:field.writer/}
- 编辑 | 删除
-
- {/dede:datalist}
-
-
-
-
-
+
+
+
+
+发送邮件
+
+
+
+
+
+
+
+ 期刊管理
+
+
+
+
+ ID
+ 期刊号
+ 期刊名称
+ 所属分类
+ 添加时间
+ 发送时间
+ 编辑人
+ 操作
+
+ {dede:datalist}
+
+ {dede:field.id/}
+ {dede:field.period/}
+ {dede:field.title/}
+ {dede:field.typename/}
+ {dede:field.addtime function='GetDateTimeMk(@me)'/}
+ {dede:field.sendtime function='GetSendTimeMk(@me)'/}
+ {dede:field.writer/}
+ 编辑 | 删除
+
+ {/dede:datalist}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mail_title_send.htm b/src/admin/templets/mail_title_send.htm
old mode 100755
new mode 100644
similarity index 83%
rename from src/dede/templets/mail_title_send.htm
rename to src/admin/templets/mail_title_send.htm
index 86925a9d..2a6c9dc3
--- a/src/dede/templets/mail_title_send.htm
+++ b/src/admin/templets/mail_title_send.htm
@@ -1,50 +1,50 @@
-
-
-
-
-发送邮件
-
-
-
-
-
-
- 群发期刊
-
-
-
-
- ID
- 期刊号
- 期刊名称
- 所属分类
- 订阅数
- 添加时间
- 发送时间
- 状态
- 发送次数
- 操作
-
- {dede:datalist}
-
- {dede:field.id/}
- {dede:field.period/}
- {dede:field.title/}
- {dede:field.typename/}
- {dede:field.typeid function='GetCount(@me)'/}
- {dede:field.addtime function='GetDateTimeMk(@me)'/}
- {dede:field.sendtime function='GetSendTimeMk(@me)'/}
- {dede:field.state function='GetState(@me)'/}
- {dede:field.count/}
- 开始发送
-
- {/dede:datalist}
-
-
-
-
-
+
+
+
+
+发送邮件
+
+
+
+
+
+
+ 群发期刊
+
+
+
+
+ ID
+ 期刊号
+ 期刊名称
+ 所属分类
+ 订阅数
+ 添加时间
+ 发送时间
+ 状态
+ 发送次数
+ 操作
+
+ {dede:datalist}
+
+ {dede:field.id/}
+ {dede:field.period/}
+ {dede:field.title/}
+ {dede:field.typename/}
+ {dede:field.typeid function='GetCount(@me)'/}
+ {dede:field.addtime function='GetDateTimeMk(@me)'/}
+ {dede:field.sendtime function='GetSendTimeMk(@me)'/}
+ {dede:field.state function='GetState(@me)'/}
+ {dede:field.count/}
+ 开始发送
+
+ {/dede:datalist}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mail_type_add.htm b/src/admin/templets/mail_type_add.htm
old mode 100755
new mode 100644
similarity index 71%
rename from src/dede/templets/mail_type_add.htm
rename to src/admin/templets/mail_type_add.htm
index 69c9eb9a..b9bccc7b
--- a/src/dede/templets/mail_type_add.htm
+++ b/src/admin/templets/mail_type_add.htm
@@ -1,44 +1,44 @@
-
-
-
-
-发送邮件
-
-
-
-
-
-
- 添加分类
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+发送邮件
+
+
+
+
+
+
+ 添加分类
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mail_type_edit.htm b/src/admin/templets/mail_type_edit.htm
old mode 100755
new mode 100644
similarity index 74%
rename from src/dede/templets/mail_type_edit.htm
rename to src/admin/templets/mail_type_edit.htm
index 2746ab81..f2510588
--- a/src/dede/templets/mail_type_edit.htm
+++ b/src/admin/templets/mail_type_edit.htm
@@ -1,46 +1,46 @@
-
-
-
-
-发送邮件
-
-
-
-
-
-
- 编辑分类
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+发送邮件
+
+
+
+
+
+
+ 编辑分类
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mail_type_main.htm b/src/admin/templets/mail_type_main.htm
old mode 100755
new mode 100644
similarity index 80%
rename from src/dede/templets/mail_type_main.htm
rename to src/admin/templets/mail_type_main.htm
index 67442901..817edadf
--- a/src/dede/templets/mail_type_main.htm
+++ b/src/admin/templets/mail_type_main.htm
@@ -1,39 +1,39 @@
-
-
-
-
-发送邮件
-
-
-
-
-
-
-
- 分类管理
-
-
-
-
- ID
- 分类名称
- 分类描述
- 操作
-
- {dede:datalist}
-
- {dede:field.id/}
- {dede:field.typename/}
- {dede:field.description/}
- 编辑 | 删除
-
- {/dede:datalist}
-
-
-
-
-
+
+
+
+
+发送邮件
+
+
+
+
+
+
+
+ 分类管理
+
+
+
+
+ ID
+ 分类名称
+ 分类描述
+ 操作
+
+ {dede:datalist}
+
+ {dede:field.id/}
+ {dede:field.typename/}
+ {dede:field.description/}
+ 编辑 | 删除
+
+ {/dede:datalist}
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/makehtml_all.htm b/src/admin/templets/makehtml_all.htm
old mode 100755
new mode 100644
similarity index 96%
rename from src/dede/templets/makehtml_all.htm
rename to src/admin/templets/makehtml_all.htm
index 52f0f19e..0f23b817
--- a/src/dede/templets/makehtml_all.htm
+++ b/src/admin/templets/makehtml_all.htm
@@ -1,114 +1,114 @@
-
-
-
-
-一键更新
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+一键更新
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/makehtml_archives.htm b/src/admin/templets/makehtml_archives.htm
old mode 100755
new mode 100644
similarity index 72%
rename from src/dede/templets/makehtml_archives.htm
rename to src/admin/templets/makehtml_archives.htm
index ab823f12..cd3116bf
--- a/src/dede/templets/makehtml_archives.htm
+++ b/src/admin/templets/makehtml_archives.htm
@@ -1,96 +1,91 @@
-
-
-
-
- 生成HTML
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 更新文档
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/makehtml_freelist.htm b/src/admin/templets/makehtml_freelist.htm
old mode 100755
new mode 100644
similarity index 70%
rename from src/dede/templets/makehtml_freelist.htm
rename to src/admin/templets/makehtml_freelist.htm
index cd0dc782..67f61f37
--- a/src/dede/templets/makehtml_freelist.htm
+++ b/src/admin/templets/makehtml_freelist.htm
@@ -1,90 +1,86 @@
-
-
-
-
- 生成HTML
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 更新自由列表
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/makehtml_homepage.htm b/src/admin/templets/makehtml_homepage.htm
old mode 100755
new mode 100644
similarity index 53%
rename from src/dede/templets/makehtml_homepage.htm
rename to src/admin/templets/makehtml_homepage.htm
index 4c7245f1..76185a59
--- a/src/dede/templets/makehtml_homepage.htm
+++ b/src/admin/templets/makehtml_homepage.htm
@@ -1,177 +1,152 @@
-
-
-
-
- 主页更新向导
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 更新首页
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/makehtml_js.htm b/src/admin/templets/makehtml_js.htm
old mode 100755
new mode 100644
similarity index 76%
rename from src/dede/templets/makehtml_js.htm
rename to src/admin/templets/makehtml_js.htm
index ffaaa62c..8861bfb7
--- a/src/dede/templets/makehtml_js.htm
+++ b/src/admin/templets/makehtml_js.htm
@@ -1,111 +1,107 @@
-
-
-
-
- 生成HTML
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 更新脚本
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/makehtml_list.htm b/src/admin/templets/makehtml_list.htm
old mode 100755
new mode 100644
similarity index 73%
rename from src/dede/templets/makehtml_list.htm
rename to src/admin/templets/makehtml_list.htm
index 214add23..0a34edf4
--- a/src/dede/templets/makehtml_list.htm
+++ b/src/admin/templets/makehtml_list.htm
@@ -1,91 +1,86 @@
-
-
-
-
- 更新栏目HTML
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 更新栏目
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/makehtml_map_guide.htm b/src/admin/templets/makehtml_map_guide.htm
old mode 100755
new mode 100644
similarity index 80%
rename from src/dede/templets/makehtml_map_guide.htm
rename to src/admin/templets/makehtml_map_guide.htm
index a69051d4..72c3f309
--- a/src/dede/templets/makehtml_map_guide.htm
+++ b/src/admin/templets/makehtml_map_guide.htm
@@ -1,69 +1,66 @@
-
-
-
-
- 更新网站地图
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 更新网站地图
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/makehtml_rss.htm b/src/admin/templets/makehtml_rss.htm
old mode 100755
new mode 100644
similarity index 78%
rename from src/dede/templets/makehtml_rss.htm
rename to src/admin/templets/makehtml_rss.htm
index 17b2a2c1..e5c432ed
--- a/src/dede/templets/makehtml_rss.htm
+++ b/src/admin/templets/makehtml_rss.htm
@@ -1,65 +1,62 @@
-
-
-
-
- 更新RSS文件
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 更新订阅
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/makehtml_spec.htm b/src/admin/templets/makehtml_spec.htm
old mode 100755
new mode 100644
similarity index 78%
rename from src/dede/templets/makehtml_spec.htm
rename to src/admin/templets/makehtml_spec.htm
index 9a74f4bc..da93d2f2
--- a/src/dede/templets/makehtml_spec.htm
+++ b/src/admin/templets/makehtml_spec.htm
@@ -1,67 +1,64 @@
-
-
-
-
- 生成专题列表HTML
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 说明:为了安全起见,专题目录建议设置仅可读写权限,发布专题后需要手动更新,默认文件为
-
-
-
-
-
-
- 开始生成HTML
-
-
-
-
-
-
-
- 进行状态:
-
-
- [增大 ] [缩小 ]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 更新专题
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 说明:为了安全起见,专题目录建议设置仅可读写权限,发布专题后需要手动更新,默认文件为
+
+
+
+
+
+
+ 开始更新
+
+
+
+
+
+
+
+ 进行状态:
+
+
+ [增大 ] [缩小 ]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/makehtml_taglist.htm b/src/admin/templets/makehtml_taglist.htm
similarity index 57%
rename from src/dede/templets/makehtml_taglist.htm
rename to src/admin/templets/makehtml_taglist.htm
index 747c5a11..83f9307b 100644
--- a/src/dede/templets/makehtml_taglist.htm
+++ b/src/admin/templets/makehtml_taglist.htm
@@ -1,77 +1,69 @@
-
- 更新Tag HTML
+ 更新标签
-
-
+
+
-
-
+
-
+
- 选择Tag:
+ 选择标签:
- GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); // 取一个平均
- $dd['tt'] = ($dd['tt'] > 5)? $dd['tt'] : 0;
- $sql="select * from #@__tagindex where total > {$dd['tt']} order by tag asc";
- $dsql->Execute('al',$sql);
- echo "\r\n";
- if($tid == 0) echo "更新所有Tag... \r\n";
-
- while($row=$dsql->GetObject('al')){
- if($tid > 0 && $tid == $row->id) echo "".$row->tag." ";
- else echo "".$row->tag." ";
- }
- echo " ";
- ?>
+ GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); //取一个平均
+ $dd['tt'] = ($dd['tt'] > 5)? $dd['tt'] : 0;
+ $sql="select * from #@__tagindex where total > {$dd['tt']} order by tag asc";
+ $dsql->Execute('al',$sql);
+ echo "\r\n";
+ if($tid == 0) echo "更新所有标签 \r\n";
+ while($row=$dsql->GetObject('al')){
+ if($tid > 0 && $tid == $row->id) echo "".$row->tag." ";
+ else echo "".$row->tag." ";
+ }
+ echo " ";
+ ?>
- 每次最大创建页数:
-
- 个文件
+ 每次最大创建页数:
+ 个文件
- 说明:
-
+ 说明:
+
仅更新文档数多于的关键词
更新所有Tag将会智能更新在[Tag标签管理]中重新获取更新的内容
Tag首页模板文件://tag.htm
Tag列表页模板文件://taglist.htm
- 生成静态文件后,访问动态文件则直接跳转到静态文件,如果需要动态访问,删除对应文件即可。
+ 生成静态文件后,访问动态文件则直接跳转到静态文件,如果需要动态访问,删除对应文件即可
-
-
- 生成Tag HTML
+
+ 生成标签
-
+
- 进行状态:
+ 进行状态:
-
-
-
-
-
-
+
+
+
+
+远程服务器同步
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/media_add.htm b/src/admin/templets/media_add.htm
old mode 100755
new mode 100644
similarity index 71%
rename from src/dede/templets/media_add.htm
rename to src/admin/templets/media_add.htm
index 914a1c2a..b92e15f0
--- a/src/dede/templets/media_add.htm
+++ b/src/admin/templets/media_add.htm
@@ -4,8 +4,8 @@
上传新文件
-
-
+
+
@@ -15,7 +15,6 @@
background-color: #F2F5E9;
height: 18px;
}
-
.pubinputs {
height: auto;
margin-top: 5px;
@@ -35,7 +34,7 @@
var endNum = Number(document.form1.picnum.value) + startNum;
if (endNum > 40) endNum = 40;
for (startNum; startNum <= endNum; startNum++) {
- upfield.innerHTML += " ";
+ upfield.innerHTML += " ";
}
}
function ResetUpload() {
@@ -45,85 +44,77 @@
}
-
-
+
-
-
- 提示:图片类型仅支持jpg、png、gif、wbmp格式,flash为.swf格式,视音频和附件为限定扩展名的类型(可在系统参数中修改)。
-
+ 提示:图片类型仅支持jpg、png、gif、wbmp格式,flash为.swf格式,视音频和附件为限定扩展名的类型(可在系统参数中修改)
-
\ No newline at end of file
diff --git a/src/dede/templets/media_edit.htm b/src/admin/templets/media_edit.htm
old mode 100755
new mode 100644
similarity index 67%
rename from src/dede/templets/media_edit.htm
rename to src/admin/templets/media_edit.htm
index d53f376a..c4bf6d3f
--- a/src/dede/templets/media_edit.htm
+++ b/src/admin/templets/media_edit.htm
@@ -1,13 +1,11 @@
-
+
-
- 更改文件
+ 修改文件
-
-
+
+
@@ -28,7 +26,6 @@
}
-
@@ -36,9 +33,8 @@
@@ -47,7 +43,7 @@
- 提示:图片类型仅支持jpg、png、gif、wbmp格式,flash为.swf格式,视音频和附件为限定扩展名的类型(可在系统参数中修改)。
+ 提示:图片类型仅支持jpg、png、gif、wbmp格式,flash为.swf格式,视音频和附件为限定扩展名的类型(可在系统参数中修改)
@@ -57,30 +53,25 @@
-
+
媒体类型:
-
- >
+
+ >
图片
- >
+ >
FLASH
- >
+ >
视频/音频
- >
+ >
附件/其它
说明标题:
-
-
+
+
@@ -90,51 +81,39 @@
附加参数:
-
- 宽:
-
- (像素) 高:
-
- (像素) 播放时间:
-
- (分钟)
+
+ 宽: (像素)
+ 高: (像素)
+ 播放时间: (分钟)
原文件:
-
+
' target='_blank'>[查看]
200) $w=200;
- else $w = $sizes[0];
-?>
+ if($myrow['mediatype']==1)
+ {
+ $fullfilename = $cfg_basedir.$myrow['url'];
+ if(file_exists($fullfilename)){
+ $info = "";
+ $sizes = getimagesize($fullfilename,$info);
+ if(is_array($sizes)){
+ if($sizes[0]>200) $w=200;
+ else $w = $sizes[0];
+ ?>
预览:
- ' target='_blank'> ' width='' border='0'
- id='picview'>
+
-
- 更改文件:
-
+ 修改文件:
@@ -156,5 +135,4 @@ if($myrow['mediatype']==1)
-
\ No newline at end of file
diff --git a/src/dede/templets/media_main.htm b/src/admin/templets/media_main.htm
old mode 100755
new mode 100644
similarity index 86%
rename from src/dede/templets/media_main.htm
rename to src/admin/templets/media_main.htm
index 390b8970..cd4d7535
--- a/src/dede/templets/media_main.htm
+++ b/src/admin/templets/media_main.htm
@@ -1,162 +1,159 @@
-
-
-
-
- 附件数据管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 附件数据管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/member_main.htm b/src/admin/templets/member_main.htm
old mode 100755
new mode 100644
similarity index 82%
rename from src/dede/templets/member_main.htm
rename to src/admin/templets/member_main.htm
index 84350245..6862df39
--- a/src/dede/templets/member_main.htm
+++ b/src/admin/templets/member_main.htm
@@ -1,163 +1,156 @@
-{dede:config.pagesize value="20"/}
-
-
-
-
- 网站会员管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+{dede:config.pagesize value="20"/}
+
+
+
+
+ 网站会员管理
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/member_operations.htm b/src/admin/templets/member_operations.htm
old mode 100755
new mode 100644
similarity index 84%
rename from src/dede/templets/member_operations.htm
rename to src/admin/templets/member_operations.htm
index d3f71242..e64aa13e
--- a/src/dede/templets/member_operations.htm
+++ b/src/admin/templets/member_operations.htm
@@ -1,156 +1,151 @@
-
-
-
-
- 业务管理
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 业务管理
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/member_pm.htm b/src/admin/templets/member_pm.htm
old mode 100755
new mode 100644
similarity index 75%
rename from src/dede/templets/member_pm.htm
rename to src/admin/templets/member_pm.htm
index 35e5e328..e74fe09b
--- a/src/dede/templets/member_pm.htm
+++ b/src/admin/templets/member_pm.htm
@@ -1,111 +1,103 @@
-{dede:page pagesize="20"/}
-
-
-
-
- 用户短信管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 发送时间
- 标题
- 已读?
- {dede:global name='postuser'/}
- 内容
- 文件夹
- 操作
-
- {dede:datalist}
-
- {dede:field.sendtime function='GetDateMk(@me)'/}
- {dede:field.subject function='dede_htmlspecialchars(@me)'/}
- {dede:field.hasview function='IsReader(@me)'/}
- {dede:field.floginid/}
- {dede:field.message function='cn_substr(HtmlReplace(@me),60)'/}
- {dede:field.folder function='GetFolders(@me)'/}
-
-
-
-
- {/dede:datalist}
-
- {dede:pagelist listsize=6/}
-
-
-
-
-
+{dede:page pagesize="20"/}
+
+
+
+
+ 用户短信管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 发送时间
+ 标题
+ 已读?
+ {dede:global name='postuser'/}
+ 内容
+ 文件夹
+ 操作
+
+ {dede:datalist}
+
+ {dede:field.sendtime function='GetDateMk(@me)'/}
+ {dede:field.subject function='dede_htmlspecialchars(@me)'/}
+ {dede:field.hasview function='IsReader(@me)'/}
+ {dede:field.floginid/}
+ {dede:field.message function='cn_substr(HtmlReplace(@me),60)'/}
+ {dede:field.folder function='GetFolders(@me)'/}
+
+
+
+
+ {/dede:datalist}
+
+ {dede:pagelist listsize=6/}
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/member_pmall.htm b/src/admin/templets/member_pmall.htm
old mode 100755
new mode 100644
similarity index 76%
rename from src/dede/templets/member_pmall.htm
rename to src/admin/templets/member_pmall.htm
index d164161d..99877120
--- a/src/dede/templets/member_pmall.htm
+++ b/src/admin/templets/member_pmall.htm
@@ -1,76 +1,75 @@
-
-
-
-
-用户短信管理
-
-
-
-
-
-
-
-
-
- 短信列表 群发短信 单独短信
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+用户短信管理
+
+
+
+
+
+
+
+
+
+ 短信列表 群发短信 单独短信
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/member_pmone.htm b/src/admin/templets/member_pmone.htm
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/templets/member_pmone.htm
rename to src/admin/templets/member_pmone.htm
index bc73965f..ed0b8263
--- a/src/dede/templets/member_pmone.htm
+++ b/src/admin/templets/member_pmone.htm
@@ -1,81 +1,81 @@
-
-
-
-
-用户短信管理
-
-
-
-
-
-
-
-
-
- 短信列表 群发短信 单独短信
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+用户短信管理
+
+
+
+
+
+
+
+
+
+ 短信列表 群发短信 单独短信
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/member_rank.htm b/src/admin/templets/member_rank.htm
old mode 100755
new mode 100644
similarity index 83%
rename from src/dede/templets/member_rank.htm
rename to src/admin/templets/member_rank.htm
index bbf2fda3..bd862f5e
--- a/src/dede/templets/member_rank.htm
+++ b/src/admin/templets/member_rank.htm
@@ -1,90 +1,88 @@
-
-
-
-
- 会员权限管理
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 会员权限管理
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/member_scores.htm b/src/admin/templets/member_scores.htm
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets/member_scores.htm
rename to src/admin/templets/member_scores.htm
index f7256c41..0784d931
--- a/src/dede/templets/member_scores.htm
+++ b/src/admin/templets/member_scores.htm
@@ -1,99 +1,96 @@
-
-
-
-
- 会员管理--积分头衔设置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 会员管理 > 积分头衔设置:
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 会员管理--积分头衔设置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 会员管理 > 积分头衔设置:
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/member_toadmin.htm b/src/admin/templets/member_toadmin.htm
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets/member_toadmin.htm
rename to src/admin/templets/member_toadmin.htm
index d8520d9a..1a369e90
--- a/src/dede/templets/member_toadmin.htm
+++ b/src/admin/templets/member_toadmin.htm
@@ -1,127 +1,122 @@
-
-
-
-
- 提升为管理员
-
-
-
-
-
-
-
-
-
-
-
-
-
- 会员管理 >> 提升为管理员
-
-
- 已经是管理员了,不要再提升了";
- }else{
- ?>
-
-
-
-
-
-
-
+
+
+
+
+ 提升为管理员
+
+
+
+
+
+
+
+
+
+
+
+
+ 会员管理 >> 提升为管理员
+
+
+ 已经是管理员了,不要再提升了";
+ } else {
+ ?>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/member_type.htm b/src/admin/templets/member_type.htm
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/templets/member_type.htm
rename to src/admin/templets/member_type.htm
index 734c974e..3458acf0
--- a/src/dede/templets/member_type.htm
+++ b/src/admin/templets/member_type.htm
@@ -1,131 +1,128 @@
-
-
-
-
- 会员类型管理
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 会员类型管理
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/member_view.htm b/src/admin/templets/member_view.htm
old mode 100755
new mode 100644
similarity index 71%
rename from src/dede/templets/member_view.htm
rename to src/admin/templets/member_view.htm
index 443d5fec..a6d48121
--- a/src/dede/templets/member_view.htm
+++ b/src/admin/templets/member_view.htm
@@ -1,211 +1,211 @@
-
-
-
-
-查看会员
-
-
-
-
-
-
-
-
-
-
-
-
- 会员管理 >> 查看会员
-
-
-
- 当前用户是网站管理员关连的帐号,请小心操作";
- ?>
-
-
-
-
-
+
+
+
+
+查看会员
+
+
+
+
+
+
+
+
+
+
+
+
+ 会员管理 >> 查看会员
+
+
+
+ 当前用户是网站管理员关连的帐号,请小心操作";
+ ?>
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/module_edit.htm b/src/admin/templets/module_edit.htm
old mode 100755
new mode 100644
similarity index 87%
rename from src/dede/templets/module_edit.htm
rename to src/admin/templets/module_edit.htm
index e3736349..2d1b13ff
--- a/src/dede/templets/module_edit.htm
+++ b/src/admin/templets/module_edit.htm
@@ -1,244 +1,239 @@
-
-
-
-
-
-
-
-
-模块打包
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+模块打包
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/module_help.htm b/src/admin/templets/module_help.htm
old mode 100755
new mode 100644
similarity index 78%
rename from src/dede/templets/module_help.htm
rename to src/admin/templets/module_help.htm
index 72909a79..2981bde7
--- a/src/dede/templets/module_help.htm
+++ b/src/admin/templets/module_help.htm
@@ -1,104 +1,101 @@
-
-
-
-
-
-
- 模块打包
-
-
-
-
-
-
-
-
- 模块管理
- > DedeBIZ模块开发指南:
-
-
-
-
-
-
-
-
- 1、Dede模块开发介绍
-
-
-
-
-
-
- 2、如何对我开发的模块进行打包?
-
-
-
-
-
- 3、开发模块安装程序和卸载程序的注意事项。
-
-
-
-
-
- 4、DedeBIZ的后台管理程序的开发注意事项。
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ 模块打包
+
+
+
+
+
+
+
+ 模块管理
+ > DedeBIZ模块开发指南:
+
+
+
+
+
+
+
+
+ 1、Dede模块开发介绍
+
+
+
+
+
+
+ 2、如何对我开发的模块进行打包
+
+
+
+
+
+ 3、开发模块安装程序和卸载程序的注意事项
+
+
+
+
+
+ 4、DedeBIZ的后台管理程序的开发注意事项
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/module_main.htm b/src/admin/templets/module_main.htm
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/templets/module_main.htm
rename to src/admin/templets/module_main.htm
index 26f7aa9b..8e4d726e
--- a/src/dede/templets/module_main.htm
+++ b/src/admin/templets/module_main.htm
@@ -1,110 +1,109 @@
-
-
-
-
- 模块管理
-
-
-
-
-
-
-
-
-
-
- 从DedeBIZV6开始,启动了
DedeBIZ商业开发者计划 ,为了保障系统及技术服务安全,请认准DedeBIZ商业认证开发者。
-
-
-
-
-
-
-
-
-
-
- 模块名称
- 发布时间
- 编码
- 类型
- 模块状态
- 管理
-
- 0)
- foreach($modules as $k=>$v)
- {
- ?>
-
-
-
-
- ".$v['lang']."";
- else echo $v['lang'];
- ?>
-
-
-
- 卸载";
- } else {
- echo "未安装 安装 ";
- }
- } else {
- echo "";
- }
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 模块管理
+
+
+
+
+
+
+
+
+
+
+ 从DedeBIZV6开始,启动了
DedeBIZ商业开发者计划 ,为了保障系统及技术服务安全,请认准DedeBIZ商业认证开发者
+
+
+
+
+
+
+
+
+
+
+ 模块名称
+ 发布时间
+ 编码
+ 类型
+ 模块状态
+ 管理
+
+ 0)
+ foreach($modules as $k=>$v)
+ {
+ ?>
+
+
+
+
+ ".$v['lang']."";
+ else echo $v['lang'];
+ ?>
+
+
+
+ 卸载";
+ } else {
+ echo "未安装 安装 ";
+ }
+ } else {
+ echo "";
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/module_make.htm b/src/admin/templets/module_make.htm
old mode 100755
new mode 100644
similarity index 84%
rename from src/dede/templets/module_make.htm
rename to src/admin/templets/module_make.htm
index 0caa4d30..b133c5d6
--- a/src/dede/templets/module_make.htm
+++ b/src/admin/templets/module_make.htm
@@ -1,251 +1,243 @@
-
-
-
-
-
-
-
-
- 模块打包
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ 模块打包
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/module_upload.htm b/src/admin/templets/module_upload.htm
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets/module_upload.htm
rename to src/admin/templets/module_upload.htm
index 4f4f2a1c..a3c0bc0c
--- a/src/dede/templets/module_upload.htm
+++ b/src/admin/templets/module_upload.htm
@@ -1,54 +1,54 @@
-
-
-
-
-模块打包
-
-
-
-
-
-
+
+
+
+
+模块打包
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mychannel_add.htm b/src/admin/templets/mychannel_add.htm
old mode 100755
new mode 100644
similarity index 82%
rename from src/dede/templets/mychannel_add.htm
rename to src/admin/templets/mychannel_add.htm
index a5d20b14..042a5b57
--- a/src/dede/templets/mychannel_add.htm
+++ b/src/admin/templets/mychannel_add.htm
@@ -1,291 +1,288 @@
-
-
-
-
- 新增频道
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 新增频道
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mychannel_edit.htm b/src/admin/templets/mychannel_edit.htm
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets/mychannel_edit.htm
rename to src/admin/templets/mychannel_edit.htm
index 0f4bf40e..1f94863b
--- a/src/dede/templets/mychannel_edit.htm
+++ b/src/admin/templets/mychannel_edit.htm
@@ -1,422 +1,414 @@
-
-
-
-
- 更改内容模型
-
-
-
-
-
-
-
-
-
-
- '>
-
-
-
- 内容模型管理
- > 更改内容模型:
-
-
-
-
-
-
-
-
-
-
-
-
- 模型字段配置(可视化模式)
-
- 添加新字段
-
-
-
-
-
- 表单提示文字
- 数据字段名
- 数据类型
- 表单类型
- 维护
-
-
-
- aid 和 typeid 是强制使用字段,这里不列出。
-
-
-
- 下面列出的字段是附加表的字段,除此外,它还包含主表dede_archives的所有字段
-
- SetNameSpace("field","<",">");
-$dtp->LoadSource($fieldset);
-if(is_array($dtp->CTags)){
-foreach($dtp->CTags as $ctag)
-{
-?>
-
- GetAtt('itemname');
- if($itname=='') echo "没指定";
- else echo $itname;
- ?>
-
- GetTagName(); ?>
-
- GetAtt('type');
- if(isset($fieldtypes[$ft])) echo $fieldtypes[$ft];
- else echo "系统专用类型";
- ?>
-
- GetAtt('autofield');
- if($ft=='' || $ft==0) {
- echo "固化字段";
- }
- else {
- echo "自动表单";
- }
- ?>
-
-
-
- '>
-
- |
-
-
-
-
-
-
-
-
-
-
- 模型字段配置(文本模式)
- 修改配置文本可调整字段顺序,但不会更改字段属性
-
-
-
-
-
-
-
-
- ShowItem2();";
-}
-?>
-
-
+
+
+
+
+ 修改内容模型
+
+
+
+
+
+
+
+
+
+ '>
+
+
+
+ 内容模型管理
+ > 修改内容模型:
+
+
+
+
+
+
+
+
+
+
+
+ 模型字段配置(可视化模式)
+
+ 添加新字段
+
+
+
+
+
+ 表单提示文字
+ 数据字段名
+ 数据类型
+ 表单类型
+ 维护
+
+
+
+ aid 和 typeid 是强制使用字段,这里不列出
+
+
+
+ 下面列出的字段是附加表的字段,除此外,它还包含主表dede_archives的所有字段
+
+ SetNameSpace("field","<",">");
+$dtp->LoadSource($fieldset);
+if(is_array($dtp->CTags)){
+foreach($dtp->CTags as $ctag)
+{
+?>
+
+ GetAtt('itemname');
+ if($itname=='') echo "没指定";
+ else echo $itname;
+ ?>
+
+ GetTagName(); ?>
+
+ GetAtt('type');
+ if(isset($fieldtypes[$ft])) echo $fieldtypes[$ft];
+ else echo "系统专用类型";
+ ?>
+
+ GetAtt('autofield');
+ if($ft=='' || $ft==0) {
+ echo "固化字段";
+ }
+ else {
+ echo "自动表单";
+ }
+ ?>
+
+
+
+ '>
+
+ |
+
+
+
+
+
+
+
+
+
+
+ 模型字段配置(文本模式)
+ 修改配置文本可调整字段顺序,但不会修改字段属性
+
+
+
+
+
+
+
+
+ ShowItem2();";
+}
+?>
+
\ No newline at end of file
diff --git a/src/dede/templets/mychannel_field_add.htm b/src/admin/templets/mychannel_field_add.htm
old mode 100755
new mode 100644
similarity index 91%
rename from src/dede/templets/mychannel_field_add.htm
rename to src/admin/templets/mychannel_field_add.htm
index 753d2fe0..da703c3c
--- a/src/dede/templets/mychannel_field_add.htm
+++ b/src/admin/templets/mychannel_field_add.htm
@@ -1,284 +1,284 @@
-
-
-
-
-增加字段
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+增加字段
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mychannel_field_edit.htm b/src/admin/templets/mychannel_field_edit.htm
old mode 100755
new mode 100644
similarity index 89%
rename from src/dede/templets/mychannel_field_edit.htm
rename to src/admin/templets/mychannel_field_edit.htm
index 18a70a09..1079c25c
--- a/src/dede/templets/mychannel_field_edit.htm
+++ b/src/admin/templets/mychannel_field_edit.htm
@@ -1,279 +1,273 @@
-
-
-
-
- 更改字段
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 修改字段
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mychannel_main.htm b/src/admin/templets/mychannel_main.htm
old mode 100755
new mode 100644
similarity index 77%
rename from src/dede/templets/mychannel_main.htm
rename to src/admin/templets/mychannel_main.htm
index 5fe2a7b4..19791505
--- a/src/dede/templets/mychannel_main.htm
+++ b/src/admin/templets/mychannel_main.htm
@@ -1,87 +1,83 @@
-{dede:config name='pagesize' value='30' /}
-
-
-
-
- 内容模型管理
-
-
-
-
-
-
-
-
-
-
-
-
-
- id号
- 频道名称
- 识别id
- 附加表
- 状态
- 模型
- 管理
-
- {dede:datalist}
-
- {dede:field.id /}
-
- {dede:field.typename /}
-
- {dede:field.nid /}
- {dede:field.addtable function="str_replace('#@__',$cfg_dbprefix,@me)" /}
- {dede:field.isshow function="GetSta(@me,$fields['id'])" /}
- {dede:field.issystem function='IsSystem(@me)'/}
-
-
-
-
-
-
-
-
-
- {/dede:datalist}
-
-
- {dede:pagelist listsize="5"/}
-
-
-
-
- 图标说明:
- 复制
- 模板
- 导出
- 修改
- 自定义搜索
- 删除
-
-
-
-
-
-
-
-
+{dede:config name='pagesize' value='30' /}
+
+
+
+
+ 内容模型管理
+
+
+
+
+
+
+
+
+
+
+
+
+ id号
+ 频道名称
+ 识别id
+ 附加表
+ 状态
+ 模型
+ 管理
+
+ {dede:datalist}
+
+ {dede:field.id /}
+
+ {dede:field.typename /}
+
+ {dede:field.nid /}
+ {dede:field.addtable function="str_replace('#@__',$cfg_dbprefix,@me)" /}
+ {dede:field.isshow function="GetSta(@me,$fields['id'])" /}
+ {dede:field.issystem function='IsSystem(@me)'/}
+
+
+
+
+
+
+
+
+
+ {/dede:datalist}
+
+
+ {dede:pagelist listsize="5"/}
+
+
+
+
+ 图标说明:
+ 复制
+ 模板
+ 导出
+ 修改
+ 自定义搜索
+ 删除
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mychannel_modifysearch.htm b/src/admin/templets/mychannel_modifysearch.htm
old mode 100755
new mode 100644
similarity index 75%
rename from src/dede/templets/mychannel_modifysearch.htm
rename to src/admin/templets/mychannel_modifysearch.htm
index d1837e9f..11a6f330
--- a/src/dede/templets/mychannel_modifysearch.htm
+++ b/src/admin/templets/mychannel_modifysearch.htm
@@ -1,132 +1,128 @@
-
-
-
-
- 修改频道
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 修改频道
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mynews_add.htm b/src/admin/templets/mynews_add.htm
old mode 100755
new mode 100644
similarity index 74%
rename from src/dede/templets/mynews_add.htm
rename to src/admin/templets/mynews_add.htm
index 9224e0b4..a04aab70
--- a/src/dede/templets/mynews_add.htm
+++ b/src/admin/templets/mynews_add.htm
@@ -1,98 +1,98 @@
-
-
-
-
-站内新闻发布
-
-
-
-
-
-
-
-
-
-
-
- 站内新闻管理->增加消息
- 返回管理页
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+站内新闻发布
+
+
+
+
+
+
+
+
+
+
+
+ 站内新闻管理->增加消息
+ 返回管理页
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mynews_edit.htm b/src/admin/templets/mynews_edit.htm
old mode 100755
new mode 100644
similarity index 70%
rename from src/dede/templets/mynews_edit.htm
rename to src/admin/templets/mynews_edit.htm
index 7fc7a8c5..562f8a64
--- a/src/dede/templets/mynews_edit.htm
+++ b/src/admin/templets/mynews_edit.htm
@@ -1,95 +1,94 @@
-
-
-
-
-站内新闻发布
-
-
-
-
-
-
-
-
-
-
-
-
- 站内新闻管理->增加消息
- 返回管理页
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+站内新闻发布
+
+
+
+
+
+
+
+
+
+
+
+
+ 站内新闻管理->增加消息
+ 返回管理页
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mynews_main.htm b/src/admin/templets/mynews_main.htm
old mode 100755
new mode 100644
similarity index 90%
rename from src/dede/templets/mynews_main.htm
rename to src/admin/templets/mynews_main.htm
index a933fc98..68214973
--- a/src/dede/templets/mynews_main.htm
+++ b/src/admin/templets/mynews_main.htm
@@ -1,51 +1,51 @@
-{dede:config.pagesize value="20"/}
-
-
-
-
-站内新闻管理
-
-
-
-
-
-
-
-
-
-
- 新闻ID
- 新闻标题
- 所属频道
- 更新时间
- 发布人
- 操作
-
- {dede:datalist}
-
- {dede:field.aid/}
- {dede:field.title /}
- {dede:field.typename /}
- {dede:field.senddate function="GetDateMk(@me)" /}
- {dede:field.writer /}
-
- [修改]
- [删除]
-
-
- {/dede:datalist}
-
-
- {dede:pagelist listsize=6/}
-
-
-
-
+{dede:config.pagesize value="20"/}
+
+
+
+
+站内新闻管理
+
+
+
+
+
+
+
+
+
+
+ 新闻ID
+ 新闻标题
+ 所属频道
+ 更新时间
+ 发布人
+ 操作
+
+ {dede:datalist}
+
+ {dede:field.aid/}
+ {dede:field.title /}
+ {dede:field.typename /}
+ {dede:field.senddate function="GetDateMk(@me)" /}
+ {dede:field.writer /}
+
+ [修改]
+ [删除]
+
+
+ {/dede:datalist}
+
+
+ {dede:pagelist listsize=6/}
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mytag_add.htm b/src/admin/templets/mytag_add.htm
old mode 100755
new mode 100644
similarity index 84%
rename from src/dede/templets/mytag_add.htm
rename to src/admin/templets/mytag_add.htm
index 426a9f4a..defb1a6c
--- a/src/dede/templets/mytag_add.htm
+++ b/src/admin/templets/mytag_add.htm
@@ -4,8 +4,8 @@
增加自定义标记
-
-
+
+
@@ -29,7 +29,7 @@
"linkedCalendars": false,
"timePicker": true,
"timePicker24Hour": true,
- // "timePickerSeconds": true,
+ //"timePickerSeconds": true,
"showCustomRangeLabel": false,
ranges: {
'今日': [moment(), moment()],
@@ -53,12 +53,10 @@
})
-
-
\ No newline at end of file
diff --git a/src/dede/templets/mytag_edit.htm b/src/admin/templets/mytag_edit.htm
old mode 100755
new mode 100644
similarity index 82%
rename from src/dede/templets/mytag_edit.htm
rename to src/admin/templets/mytag_edit.htm
index f052b6aa..226a5101
--- a/src/dede/templets/mytag_edit.htm
+++ b/src/admin/templets/mytag_edit.htm
@@ -2,13 +2,13 @@
-更改标记
-
+修改标记
+
diff --git a/src/dede/templets/mytag_main.htm b/src/admin/templets/mytag_main.htm
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets/mytag_main.htm
rename to src/admin/templets/mytag_main.htm
index 1a59f91d..35596200
--- a/src/dede/templets/mytag_main.htm
+++ b/src/admin/templets/mytag_main.htm
@@ -5,20 +5,19 @@
自定义标记
-
-
+
+
-
-
+
自定义标记管理
增加一个标记
智能标记向导
-
+
编号
标记名称
所属栏目
@@ -27,15 +26,14 @@
管理
{dede:datalist}
-
+
{dede:field.aid /}
{dede:field.tagname /}
{dede:field.typename function='TestType(@me)'/}
{dede:field.timeset function='TimeSetValue(@me)'/}
{dede:field.endtime function='GetDateMk(@me)'/}
- 更改 |
+ 修改 |
删除 |
JS调用
@@ -51,5 +49,4 @@
-
\ No newline at end of file
diff --git a/src/dede/templets/mytag_tag_guide.htm b/src/admin/templets/mytag_tag_guide.htm
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets/mytag_tag_guide.htm
rename to src/admin/templets/mytag_tag_guide.htm
index ba5e6e95..4476bb59
--- a/src/dede/templets/mytag_tag_guide.htm
+++ b/src/admin/templets/mytag_tag_guide.htm
@@ -1,236 +1,234 @@
-
-
-
-
- 智能标记向导
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ·[field:textlink/]([field:pubdate function=MyDate('m-d',@me)/])
-
-
- ·[field:typelink/] [field:textlink/]
-
-
-
-
- [field:imglink/]
-
-
- [field:textlink/]
-
-
-
-
-
-
-
-
-
-
- 自定义标记管理 >> 智能标记生成向导:
-
-
-
-
-
- 列表样式:
-
-
-
-
-
-
-
- 调用栏目:
- GetOptionArray(0,$admin_catalogs,0,1);
- echo "\r\n";
- echo "不限栏目... \r\n";
- echo $typeOptions;
- echo " ";
- ?>
-
-
- 限定频道:
- \r\n";
- echo "不限频道... \r\n";
- $tl->dsql->SetQuery("Select id,typename From #@__channeltype where id>0");
- $tl->dsql->Execute();
- while($row = $tl->dsql->GetObject())
- {
- echo "{$row->typename} \r\n";
- }
- echo "";
- ?>
- 附加属性:
- \r\n";
- echo "不限... \r\n";
- $tl->dsql->SetQuery("Select * From #@__arcatt");
- $tl->dsql->Execute();
- while($row = $tl->dsql->GetObject())
- {
- echo "{$row->attname} \r\n";
- }
- echo "";
- ?>
-
-
- 调用记录条数:
-
- 显示列数:
-
- 标题长度:
-
- (1 字节 = 0.5个中文字)
-
-
- 高级筛选:
-
- 带缩略图
-
- 推荐
-
- 专题 关键字:
-
- (","逗号分开)
-
-
- 排列顺序:
-
- 置顶权限值
- 发布时间
- 录入时间
- 点击量
- 文档ID
- 最后评论时间
- 评论积分
- 随机获取
-
-
-
- 由高到低
-
- 由低到高
-
-
- 文档发布时间:
-
- 天以内 (0 表示不限)
-
-
- 提取特定文档: 选择节点文章
-
-
-
-
- 单条记录样式(InnerText):
-
-
- ·[field:textlink/]([field:pubdate function=MyDate('m-d',@me)/])
-
-
-
-
-
- 支持字段:id,title,color,typeid,ismake,description,pubdate,senddate,arcrank,click,litpic,typedir,typename,arcurl,typeurl,
-
- stime(pubdate 的"0000-00-00"格式),textlink,typelink,imglink,image
- 普通字段直接用[field:字段名/]表示。
- ·Pubdate发布时间的调用参数 [field:pubdate function=MyDate('Y-m-d H:i:s',@me)/]
-
-
-
-
- 生成模板调用标记
-
- 生成模板调用标记
-
-
-
-
-
-
- 输出结果:
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 智能标记向导
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ·[field:textlink/]([field:pubdate function=MyDate('m-d',@me)/])
+
+
+ ·[field:typelink/] [field:textlink/]
+
+
+
+
+ [field:imglink/]
+
+
+ [field:textlink/]
+
+
+
+
+
+
+
+
+
+
+ 自定义标记管理 >> 智能标记生成向导:
+
+
+
+
+
+ 列表样式:
+
+
+
+
+
+
+
+ 调用栏目:
+ GetOptionArray(0,$admin_catalogs,0,1);
+ echo "\r\n";
+ echo "不限栏目 \r\n";
+ echo $typeOptions;
+ echo " ";
+ ?>
+
+
+ 限定频道:
+ \r\n";
+ echo "不限频道 \r\n";
+ $tl->dsql->SetQuery("Select id,typename From #@__channeltype where id>0");
+ $tl->dsql->Execute();
+ while($row = $tl->dsql->GetObject())
+ {
+ echo "{$row->typename} \r\n";
+ }
+ echo "";
+ ?>
+ 附加属性:
+ \r\n";
+ echo "不限 \r\n";
+ $tl->dsql->SetQuery("Select * From #@__arcatt");
+ $tl->dsql->Execute();
+ while($row = $tl->dsql->GetObject())
+ {
+ echo "{$row->attname} \r\n";
+ }
+ echo "";
+ ?>
+
+
+ 调用记录条数:
+
+ 显示列数:
+
+ 标题长度:
+
+ (1 字节 = 0.5个中文字)
+
+
+ 高级筛选:
+
+ 带缩略图
+
+ 推荐
+
+ 专题 关键词:
+
+ (","逗号分开)
+
+
+ 排列顺序:
+
+ 置顶权限值
+ 发布时间
+ 录入时间
+ 点击量
+ 文档ID
+ 最后评论时间
+ 评论积分
+ 随机获取
+
+
+
+ 由高到低
+
+ 由低到高
+
+
+ 文档发布时间:
+
+ 天以内 (0 表示不限)
+
+
+ 提取特定文档:选择节点文章
+
+
+
+
+ 单条记录样式(InnerText):
+
+
+ ·[field:textlink/]([field:pubdate function=MyDate('m-d',@me)/])
+
+
+
+
+
+ 支持字段:id,title,color,typeid,ismake,description,pubdate,senddate,arcrank,click,litpic,typedir,typename,arcurl,typeurl,
+
+ stime(pubdate 的"0000-00-00"格式),textlink,typelink,imglink,image
+ 普通字段直接用[field:字段名/]表示
+ ·Pubdate发布时间的调用参数 [field:pubdate function=MyDate('Y-m-d H:i:s',@me)/]
+
+
+
+
+ 生成模板调用标记
+
+ 生成模板调用标记
+
+
+
+
+
+
+ 输出结果:
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/mytag_tag_guide_ok.htm b/src/admin/templets/mytag_tag_guide_ok.htm
old mode 100755
new mode 100644
similarity index 89%
rename from src/dede/templets/mytag_tag_guide_ok.htm
rename to src/admin/templets/mytag_tag_guide_ok.htm
index ccea16d4..e0678f45
--- a/src/dede/templets/mytag_tag_guide_ok.htm
+++ b/src/admin/templets/mytag_tag_guide_ok.htm
@@ -3,12 +3,12 @@
智能标记向导
-
+
-
+
diff --git a/src/dede/templets/pic_view.htm b/src/admin/templets/pic_view.htm
old mode 100755
new mode 100644
similarity index 88%
rename from src/dede/templets/pic_view.htm
rename to src/admin/templets/pic_view.htm
index 6acfe948..4d13037a
--- a/src/dede/templets/pic_view.htm
+++ b/src/admin/templets/pic_view.htm
@@ -1,58 +1,58 @@
-
-
-
-
-图片浏览器
-
-
-
-
-
-
-
+
+
+
+
+图片浏览器
+
+
+
+
+
+
+
diff --git a/src/dede/templets/plus_edit.htm b/src/admin/templets/plus_edit.htm
old mode 100755
new mode 100644
similarity index 83%
rename from src/dede/templets/plus_edit.htm
rename to src/admin/templets/plus_edit.htm
index 084b80c1..b08c15fa
--- a/src/dede/templets/plus_edit.htm
+++ b/src/admin/templets/plus_edit.htm
@@ -1,61 +1,61 @@
-
-
-
-
-修改插件
-
-
-
-
-
-
+
+
+
+
+修改插件
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/plus_main.htm b/src/admin/templets/plus_main.htm
old mode 100755
new mode 100644
similarity index 61%
rename from src/dede/templets/plus_main.htm
rename to src/admin/templets/plus_main.htm
index 6fc75dc6..aa160a36
--- a/src/dede/templets/plus_main.htm
+++ b/src/admin/templets/plus_main.htm
@@ -1,52 +1,41 @@
-{dede:config.pagesize value="50"/}
-
-
-
-
- 插件管理
-
-
-
-
-
-
-
-
-
-
-
- 插件管理
-
- [安装新插件 ]
-
-
-
-
-
-
- ID号
- 插件名称
- 插件作者
- 管理
-
- {dede:datalist}
-
- {dede:field.aid /}
- {dede:field.plusname /}
- {dede:field.writer /}
- {dede:field.isshow function="GetSta(@me,$fields['aid'],$fields['plusname'])"/}
-
- {/dede:datalist}
-
-
- {dede:pagelist listsize=6/}
-
-
-
-
-
-
-
-
+{dede:config.pagesize value="50"/}
+
+
+
+
+ 插件管理
+
+
+
+
+
+
+
+ 插件管理
+ [安装新插件 ]
+
+
+ ID号
+ 插件名称
+ 插件作者
+ 管理
+
+ {dede:datalist}
+
+ {dede:field.aid /}
+ {dede:field.plusname /}
+ {dede:field.writer /}
+ {dede:field.isshow function="GetSta(@me,$fields['aid'],$fields['plusname'])"/}
+
+ {/dede:datalist}
+
+
+ {dede:pagelist listsize=6/}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/public_guide.htm b/src/admin/templets/public_guide.htm
old mode 100755
new mode 100644
similarity index 87%
rename from src/dede/templets/public_guide.htm
rename to src/admin/templets/public_guide.htm
index 24278e0e..c35c75e4
--- a/src/dede/templets/public_guide.htm
+++ b/src/admin/templets/public_guide.htm
@@ -1,117 +1,116 @@
-
-
-
-
-内容发布向导
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 内容发布说明:
- 1、必须先建立与频道内容模型关连的栏目才能发布内容(栏目管理 );
- 2、如果您设置了某频道为默认发布表单,以后将不再显示此向导,而是直接显示您所选的频道的发布表单,如果想要发布其它频道的内容,可以从左边的目录树中选择,如果以后您想要修改默认发布表单,请点击目录树上方的“发布向导”图标;
-
-
-
-
-
-
- 把所选的频道表单设为默认表单
-
- 取消默认表单
-
-
-
-
-
-
-
-
+
+
+
+
+内容发布向导
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 内容发布说明:
+ 1、必须先建立与频道内容模型关连的栏目才能发布内容(栏目管理 );
+ 2、如果您设置了某频道为默认发布表单,以后将不再显示此向导,而是直接显示您所选的频道的发布表单,如果想要发布其它频道的内容,可以从左边的目录树中选择,如果以后您想要修改默认发布表单,请点击目录树上方的“发布向导”图标;
+
+
+
+
+
+
+ 把所选的频道表单设为默认表单
+
+ 取消默认表单
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/recycling.htm b/src/admin/templets/recycling.htm
old mode 100755
new mode 100644
similarity index 82%
rename from src/dede/templets/recycling.htm
rename to src/admin/templets/recycling.htm
index 99c78900..ee373cdf
--- a/src/dede/templets/recycling.htm
+++ b/src/admin/templets/recycling.htm
@@ -1,120 +1,114 @@
-
-
-
-
-
- 文档管理
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 文档管理
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/search_keywords_main.htm b/src/admin/templets/search_keywords_main.htm
old mode 100755
new mode 100644
similarity index 86%
rename from src/dede/templets/search_keywords_main.htm
rename to src/admin/templets/search_keywords_main.htm
index f5d5e752..dde47fd1
--- a/src/dede/templets/search_keywords_main.htm
+++ b/src/admin/templets/search_keywords_main.htm
@@ -1,136 +1,136 @@
-
-
-
-
-搜索关键字管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索关键词维护
- 文档关键字维护
-
-
-
-
-
-
-
-
+
+
+
+
+搜索关键词管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索关键词维护
+ 文档关键词维护
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/shops_delivery.htm b/src/admin/templets/shops_delivery.htm
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets/shops_delivery.htm
rename to src/admin/templets/shops_delivery.htm
index a0412f76..0cd9029d
--- a/src/dede/templets/shops_delivery.htm
+++ b/src/admin/templets/shops_delivery.htm
@@ -1,121 +1,117 @@
-
-
-
-
- 配送方式配置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 已有配送方式列表
-
-
-
-
-
-
-
-
-
- 修改
-
-
-
-
-
-
-
+
+
+
+
+ 配送方式配置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 已有配送方式列表
+
+
+
+
+
+
+
+
+
+ 修改
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/shops_operations.htm b/src/admin/templets/shops_operations.htm
old mode 100755
new mode 100644
similarity index 83%
rename from src/dede/templets/shops_operations.htm
rename to src/admin/templets/shops_operations.htm
index 1ef76bfe..b443270f
--- a/src/dede/templets/shops_operations.htm
+++ b/src/admin/templets/shops_operations.htm
@@ -1,181 +1,175 @@
-
-
-
-
- 订单管理
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 订单管理
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/admin/templets/shops_operations_cart.htm b/src/admin/templets/shops_operations_cart.htm
new file mode 100644
index 00000000..83ee3c43
--- /dev/null
+++ b/src/admin/templets/shops_operations_cart.htm
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
+
+
+ 订单信息
+
+{dede:datalist}
+
+ 订单号:
+ {dede:field.oid/}
+
+
+ 商品名称:
+ {dede:field.title/}
+
+
+ 单价(元/单位):
+ {dede:field.uprice/}
+
+
+ 数量:
+ {dede:field.cartcount/}
+
+
+ 支付方式:
+
+
+
+ 配送:
+ {dede:field.dname/} 费用:{dede:field.dprice/}元
+
+
+ 购买时间:
+ {dede:field.stime function=GetDateTimeMk(@me)/}
+
+
+ 收货人:
+
+
+
+ 地址:
+
+
+
+ 邮编:
+
+
+
+ 联系电话:
+
+
+
+ 邮箱:
+
+
+
+ 留言:
+
+
+
+ 合计(元):
+ {dede:field.priceCount/}元
+
+{/dede:datalist}
+
+
+
+ 关闭窗口
+
+
+
+
订单总计: {dede:field.priceCount/} 元, {dede:pagelist listsize=3/}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/shops_operations_userinfo.htm b/src/admin/templets/shops_operations_userinfo.htm
old mode 100755
new mode 100644
similarity index 50%
rename from src/dede/templets/shops_operations_userinfo.htm
rename to src/admin/templets/shops_operations_userinfo.htm
index 60bdcb89..736b74bb
--- a/src/dede/templets/shops_operations_userinfo.htm
+++ b/src/admin/templets/shops_operations_userinfo.htm
@@ -1,45 +1,45 @@
-
-
-
-
-
-
-
-
-
- 订单号:
-
-
-
-
- 配送:
- 方式: 费用:元
-
-
- 收货人:
-
-
-
- 地址:
-
-
-
- 邮编:
-
-
-
- 电话:
-
-
-
- E-Mail:
-
-
-
- 留言:
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+ 订单号:
+
+
+
+
+ 配送:
+ 方式: 费用:元
+
+
+ 收货人:
+
+
+
+ 地址:
+
+
+
+ 邮编:
+
+
+
+ 电话:
+
+
+
+ E-Mail:
+
+
+
+ 留言:
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/soft_add.htm b/src/admin/templets/soft_add.htm
old mode 100755
new mode 100644
similarity index 56%
rename from src/dede/templets/soft_add.htm
rename to src/admin/templets/soft_add.htm
index b39b7da7..37c24b6e
--- a/src/dede/templets/soft_add.htm
+++ b/src/admin/templets/soft_add.htm
@@ -1,653 +1,590 @@
-
-
-
-
- 增加软件集
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 发布时间:
-
- ";
- ?>
-
- 消费金币:
-
- (此项已经独立分离)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
增加软件集
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 发布时间:
+
+ ";
+ ?>
+
+ 消费金币:
+ (此项已经独立分离)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/soft_config.htm b/src/admin/templets/soft_config.htm
old mode 100755
new mode 100644
similarity index 85%
rename from src/dede/templets/soft_config.htm
rename to src/admin/templets/soft_config.htm
index b2069f65..62737dfd
--- a/src/dede/templets/soft_config.htm
+++ b/src/admin/templets/soft_config.htm
@@ -1,160 +1,158 @@
-
-
-
-
-
软件频道设置
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
软件频道设置
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/soft_edit.htm b/src/admin/templets/soft_edit.htm
old mode 100755
new mode 100644
similarity index 53%
rename from src/dede/templets/soft_edit.htm
rename to src/admin/templets/soft_edit.htm
index fddd76a3..4e247eae
--- a/src/dede/templets/soft_edit.htm
+++ b/src/admin/templets/soft_edit.htm
@@ -1,602 +1,524 @@
-
-
-
-
-
编辑软件
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 文章主栏目:
-
- getUserChannel(),$channelid);
- echo "\r\n";
- if($arcRow["typeid"]=="0") echo "请选择主分类... \r\n";
- echo $typeOptions;
- echo " ";
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 文件类型:
-
-
- ".$addRow["filetype"]."\r\n";
- ?>
- .exe
- .zip
- .rar
- .iso
- .gz
- 其它
-
- 软件等级:
-
- ".$addRow["softrank"]."星\r\n";
- ?>
- 一星
- 二星
- 三星
- 四星
- 五星
-
-
-
-
-
-
-
-
-
- 软件类型:
-
-
- ".$addRow["softtype"]."\r\n";
- ?>
- 国产软件
- 国外软件
- 汉化补丁
-
- 界面语言:
-
- ".$addRow["language"]."\r\n";
- ?>
- 简体中文
- 英文软件
- 繁体中文
- 其它类型
-
- 授权方式:
-
-
- ".$addRow["accredit"]."\r\n";
- ?>
- 共享软件
- 免费软件
- 开源软件
- 商业软件
- 破解软件
- 游戏外挂
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 下载限制:
-
-
-
-
-
-
-
- 软件链接列表:
-
-
-
-
-
-
-
-
-
-
-
-
-
- 软件详细介绍:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 更新时间:
-
- ";
- ?>
-
- 消费金币:
-
- " />(此项已经独立分离)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
修改软件
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 文章主栏目:
+
+ getUserChannel(),$channelid);
+ echo "\r\n";
+ if($arcRow["typeid"]=="0") echo "请选择主分类 \r\n";
+ echo $typeOptions;
+ echo " ";
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 文件类型:
+
+
+ ".$addRow["filetype"]."\r\n";
+ ?>
+ .exe
+ .zip
+ .rar
+ .iso
+ .gz
+ 其它
+
+ 软件等级:
+
+ ".$addRow["softrank"]."星\r\n";
+ ?>
+ 一星
+ 二星
+ 三星
+ 四星
+ 五星
+
+
+
+
+
+
+
+
+
+
+ 软件类型:
+
+
+ ".$addRow["softtype"]."\r\n";
+ ?>
+ 国产软件
+ 国外软件
+ 汉化补丁
+
+
+ 界面语言:
+
+ ".$addRow["language"]."\r\n";
+ ?>
+ 简体中文
+ 英文软件
+ 繁体中文
+ 其它类型
+
+ 授权方式:
+
+
+ ".$addRow["accredit"]."\r\n";
+ ?>
+ 共享软件
+ 免费软件
+ 开源软件
+ 商业软件
+ 破解软件
+ 游戏外挂
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 下载限制:
+
+
+
+
+
+
+
+ 软件链接列表:
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 软件详细介绍:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 更新时间:
+
+ ";
+ ?>
+
+ 消费金币:
+ (此项已经独立分离)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/spec_add.htm b/src/admin/templets/spec_add.htm
old mode 100755
new mode 100644
similarity index 58%
rename from src/dede/templets/spec_add.htm
rename to src/admin/templets/spec_add.htm
index 82dd00ac..da7ea442
--- a/src/dede/templets/spec_add.htm
+++ b/src/admin/templets/spec_add.htm
@@ -1,460 +1,401 @@
-
-
-
-
-
专题发布向导
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 缩 略 图:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 主分类:
- getUserChannel(), 0);
- echo "\r\n";
- echo "请选择主分类... \r\n";
- echo $typeOptions;
- echo " ";
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 发布时间:
- ";
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 专题节点列表:
- 1、文章列表用ID1,ID2,ID3这样形式分开,系统会自动排除不同节点的相同文章;
- 2、关于单条记录模板里的[field:fieldname /]标记的使用,请参考关于系统帮助关于 arclist 标记的说明;
- 3、节点ID是节点的唯一标识,专题模板中用{dede:field.note noteid='标识'/}这样来表示单个节点,不指定noteid时为所有节点列表。
- 4、正常的情况下,每个节点显示的是“节点文章列表”里的文档,如果您指定为“自动获取模式”,那么必须指定关键字和栏目ID。
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
发布专题
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 缩略图:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 主分类:
+
+ getUserChannel(), 0);
+ echo "\r\n";
+ echo "请选择主分类 \r\n";
+ echo $typeOptions;
+ echo " ";
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 发布时间:
+ ";
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 专题节点列表:
+ 1、文章列表用ID1,ID2,ID3这样形式分开,系统会自动排除不同节点的相同文章;
+ 2、关于单条记录模板里的[field:fieldname /]标记的使用,请参考关于系统帮助关于 arclist 标记的说明;
+ 3、节点ID是节点的唯一标识,专题模板中用{dede:field.note noteid='标识'/}这样来表示单个节点,不指定noteid时为所有节点列表
+ 4、正常的情况下,每个节点显示的是“节点文章列表”里的文档,如果您指定为“自动获取模式”,那么必须指定关键词和栏目ID
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/spec_edit.htm b/src/admin/templets/spec_edit.htm
old mode 100755
new mode 100644
similarity index 52%
rename from src/dede/templets/spec_edit.htm
rename to src/admin/templets/spec_edit.htm
index fec4e697..e0bf3026
--- a/src/dede/templets/spec_edit.htm
+++ b/src/admin/templets/spec_edit.htm
@@ -1,586 +1,482 @@
-
-
-
-
-
更改专题
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 主 分 类:
-
- getUserChannel(),0);
- echo "\r\n";
- if($arcRow["typeid"]=="0") echo "请选择主分类... \r\n";
- echo $typeOptions;
- echo " ";
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 发布时间:
-
- ";
- ?>
-
-
-
-
-
-
-
-
-
- 更新时间:
-
-
- ";
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 专题节点列表:
- (文章列表用ID1,ID2,ID3这样形式分开,系统会自动排除不同节点的相同文章)
- 关于单条记录模板里的[field:fieldname /]标记的使用,请参考关于系统帮助关于 arclist 标记的说明。
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
修改专题
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 主分类:
+
+ getUserChannel(),0);
+ echo "\r\n";
+ if($arcRow["typeid"]=="0") echo "请选择主分类 \r\n";
+ echo $typeOptions;
+ echo " ";
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 发布时间:
+
+ ";
+ ?>
+
+
+
+
+
+
+
+
+
+ 更新时间:
+
+ ";
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 专题节点列表: (文章列表用ID1,ID2,ID3这样形式分开,系统会自动排除不同节点的相同文章) 关于单条记录模板里的[field:fieldname /]标记的使用,请参考关于系统帮助关于 arclist 标记的说明
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/stepselect_main.htm b/src/admin/templets/stepselect_main.htm
old mode 100755
new mode 100644
similarity index 84%
rename from src/dede/templets/stepselect_main.htm
rename to src/admin/templets/stepselect_main.htm
index f6338156..d03d50be
--- a/src/dede/templets/stepselect_main.htm
+++ b/src/admin/templets/stepselect_main.htm
@@ -1,427 +1,417 @@
-{dede:config.pagesize value="30"/}
-
-
-
-
-
-
联动枚举管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ·联动枚举组管理
-
-
-
-
-
-
-
- 请选择组别:
-
-
- --所有组--
- {$arr['egroup']}|{$arr['itemname']}\r\n";
- }
- else {
- echo "{$arr['egroup']}|{$arr['itemname']} \r\n";
- }
- }
- ?>
-
-
-
- 修改
- 删除
- 预览
-
-
- 新增类别组
-
-
-
-
- 灰色字的为系统内置枚举,您是不能对它进行删除修改操作的,但可以添加或修改它的元素。
-
-
-
-
-
- GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='{$egroup}' ");
- $dsql->Execute('out',"SELECT evalue,ename FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}' ORDER BY disorder ASC,evalue ASC");
- $options = '';
-
- while($row1 = $dsql->GetArray('out'))
- {
- if(!preg_match("#\.#", $row1['evalue']))
- {
- $row1['ename'] = ($row1['evalue'] % 500 == 0)? $row1['ename'] : '└─'.$row1['ename'];
- if($topvalue != $row1['evalue']) $options .= "
{$row1['ename']} \r\n";
- else $options .= "
{$row1['ename']} \r\n";
- }
- }
-
- // 如果添加3级之类
- if($topvalue % 500 != 0) $arr['issign'] = 2;
-?>
-
-
-
-
- ·
- >
- 子分类管理
-
-
- 把默认省市地区表导入 ";
- }
- ?>
-
-
-
-
-
-
-
-
-
-
- 隶属分类:
-
- ...
-
-
-
-
- 分类名称:
-
-
- 增加分类
-
-
-
如果没选择隶属分类则表示增加的是顶级分类,用半角逗号","分开可以一次增加多个分类。
-
-
-
-
-
-
-
-
-
-
-
+{dede:config.pagesize value="30"/}
+
+
+
+
+
联动枚举管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 联动枚举组管理
+
+
+
+
+
+
+
+ 请选择组别:
+
+
+ --所有组--
+ {$arr['egroup']}|{$arr['itemname']}\r\n";
+ }
+ else {
+ echo "{$arr['egroup']}|{$arr['itemname']} \r\n";
+ }
+ }
+ ?>
+
+
+
+ 修改
+ 删除
+ 预览
+
+
+ 新增类别组
+
+
+
+
+ 灰色字的为系统内置枚举,您是不能对它进行删除修改操作的,但可以添加或修改它的元素
+
+
+
+
+
+ GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='{$egroup}' ");
+ $dsql->Execute('out',"SELECT evalue,ename FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}' ORDER BY disorder ASC,evalue ASC");
+ $options = '';
+
+ while($row1 = $dsql->GetArray('out'))
+ {
+ if(!preg_match("#\.#", $row1['evalue']))
+ {
+ $row1['ename'] = ($row1['evalue'] % 500 == 0)? $row1['ename'] : '└─'.$row1['ename'];
+ if($topvalue != $row1['evalue']) $options .= "
{$row1['ename']} \r\n";
+ else $options .= "
{$row1['ename']} \r\n";
+ }
+ }
+
+ //如果添加3级之类
+ if($topvalue % 500 != 0) $arr['issign'] = 2;
+?>
+
+
+
+
+ ·
+ >
+ 子分类管理
+
+
+ 把默认省市地区表导入 ";
+ }
+ ?>
+
+
+
+
+
+
+
+
+
+
+ 隶属分类:
+
+
+
+
+
+
+ 分类名称:
+
+
+ 增加分类
+
+
+
如果没选择隶属分类则表示增加的是顶级分类,用半角逗号","分开可以一次增加多个分类
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/stepselect_showajax.htm b/src/admin/templets/stepselect_showajax.htm
old mode 100755
new mode 100644
similarity index 86%
rename from src/dede/templets/stepselect_showajax.htm
rename to src/admin/templets/stepselect_showajax.htm
index 572f7d10..acccc1fe
--- a/src/dede/templets/stepselect_showajax.htm
+++ b/src/admin/templets/stepselect_showajax.htm
@@ -1,97 +1,97 @@
-GetOne("Select * from `#@__stepselect` where id='$id' ");
-$sbjs = " onsubmit=\"alert('该分类是系统内置枚举,不允许修改'); return false;\" ";
-if($arr['issystem']==0) $sbjs = '';
-?>
-
-
修改类别
-
-
-
>
-
-
-类 别 名:
-缓存组名:
-缓存组名必须为英文或数字组合!
-确定增加
-
-
-
-
新增类别
-
-
-
-
-类 别 名:
-缓存组名:
-缓存组名必须为英文或数字组合!
-确定增加
-
-GetOne("Select * from `#@__stepselect` where id='$id' ");
-$dsql->Execute('out',"Select evalue,ename from `#@__sys_enum` where egroup='{$arr['egroup']}' And (evalue mod 500)=0 order by disorder asc,evalue asc");
-$options = '';
-if($arr['issign']==0)
-{
- while($row1 = $dsql->GetArray('out')) $options .= "
{$row1['ename']} \r\n";
-}
-?>
-
-
添加枚举
-
-
-
-
-
-
-
-隶属枚举:
-增加一级枚举
-
-
-
- 枚举名:
- 排序值:
-如果不指定,默认以枚举添加先后来排序。
-
-
-GetOne("Select * from `#@__stepselect` where id='$id' ");
- $dsql->Execute('out',"Select * From `#@__sys_enum` where egroup like '{$arr['egroup']}' order by disorder asc, evalue asc");
- $options = '';
- while($row1 = $dsql->GetArray('out'))
- {
- if($row1['evalue']%500==0 || $arr['issign']==1)
- {
- $options .= "
{$row1['ename']} \r\n";
- }
- else
- {
- $options .= "
└─{$row1['ename']} \r\n";
- }
- }
-?>
-
-
预览联动表单
-
-
-
-
-类别关系:
-
---请选择--
-
-
-
-
-这里仅显示数据关系,实际应用中,二级联动生成的表单是支持级连的,并非全部列出。
-
-
-GetOne("Select * from `#@__stepselect` where id='$id' ");
+$sbjs = " onsubmit=\"alert('该分类是系统内置枚举,不允许修改'); return false;\" ";
+if($arr['issystem']==0) $sbjs = '';
+?>
+
+
修改类别
+
+
+
>
+
+
+类 别 名:
+缓存组名:
+缓存组名必须为英文或数字组合!
+确定增加
+
+
+
+
新增类别
+
+
+
+
+类 别 名:
+缓存组名:
+缓存组名必须为英文或数字组合!
+确定增加
+
+GetOne("Select * from `#@__stepselect` where id='$id' ");
+$dsql->Execute('out',"Select evalue,ename from `#@__sys_enum` where egroup='{$arr['egroup']}' And (evalue mod 500)=0 order by disorder asc,evalue asc");
+$options = '';
+if($arr['issign']==0)
+{
+ while($row1 = $dsql->GetArray('out')) $options .= "
{$row1['ename']} \r\n";
+}
+?>
+
+
添加枚举
+
+
+
+
+
+
+
+隶属枚举:
+增加一级枚举
+
+
+
+ 枚举名:
+ 排序值:
+如果不指定,默认以枚举添加先后来排序
+
+
+GetOne("Select * from `#@__stepselect` where id='$id' ");
+ $dsql->Execute('out',"Select * From `#@__sys_enum` where egroup like '{$arr['egroup']}' order by disorder asc, evalue asc");
+ $options = '';
+ while($row1 = $dsql->GetArray('out'))
+ {
+ if($row1['evalue']%500==0 || $arr['issign']==1)
+ {
+ $options .= "
{$row1['ename']} \r\n";
+ }
+ else
+ {
+ $options .= "
└─{$row1['ename']} \r\n";
+ }
+ }
+?>
+
+
预览联动表单
+
+
+
+
+类别关系:
+
+--请选择--
+
+
+
+
+这里仅显示数据关系,实际应用中,二级联动生成的表单是支持级连的,并非全部列出
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_admin_user.htm b/src/admin/templets/sys_admin_user.htm
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/templets/sys_admin_user.htm
rename to src/admin/templets/sys_admin_user.htm
index 3452252d..6fe6c3f2
--- a/src/dede/templets/sys_admin_user.htm
+++ b/src/admin/templets/sys_admin_user.htm
@@ -1,68 +1,66 @@
-{dede:config.pagesize value="20"/}
-
-
-
-
-
管理员帐号
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 为了防止错误操作,系统不允许在管理界面删除超级管理员,如果确实要删除,请自行在数据表dede_admin中删除。
-
-
-
- 登录ID
- 笔名
- 级别
- 频道
- 管理项
-
- {dede:datalist}
-
- {dede:field.userid /}
- {dede:field.uname /}
- {dede:field.usertype function="GetUserType(@me)"/}
- {dede:field.typename function="GetChannel(@me)"/}
-
- 更改
- 删除
- 文档
-
-
-
-
- 登录时间:{dede:field.logintime function="GetDateTimeMk(@me)" /} 登录IP:{dede:field.loginip/}
-
-
- {/dede:datalist}
-
-
- {dede:pagelist listsize='7' /}
-
-
-
-
-
+{dede:config.pagesize value="20"/}
+
+
+
+
+
管理员帐号
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 为了防止错误操作,系统不允许在管理界面删除超级管理员,如果确实要删除,请自行在数据表dede_admin中删除
+
+
+
+ 登录ID
+ 笔名
+ 级别
+ 频道
+ 管理项
+
+ {dede:datalist}
+
+ {dede:field.userid /}
+ {dede:field.uname /}
+ {dede:field.usertype function="GetUserType(@me)"/}
+ {dede:field.typename function="GetChannel(@me)"/}
+
+ 修改
+ 删除
+ 文档
+
+
+
+
+ 登录时间:{dede:field.logintime function="GetDateTimeMk(@me)" /} 登录IP:{dede:field.loginip/}
+
+
+ {/dede:datalist}
+
+
+ {dede:pagelist listsize='7' /}
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_admin_user_add.htm b/src/admin/templets/sys_admin_user_add.htm
old mode 100755
new mode 100644
similarity index 78%
rename from src/dede/templets/sys_admin_user_add.htm
rename to src/admin/templets/sys_admin_user_add.htm
index affa4c67..a1d32805
--- a/src/dede/templets/sys_admin_user_add.htm
+++ b/src/admin/templets/sys_admin_user_add.htm
@@ -4,8 +4,8 @@
管理员帐号--新增帐号
-
-
+
+
@@ -30,14 +30,13 @@
}
-
@@ -46,28 +45,27 @@
-
-
+
+
-
\ No newline at end of file
diff --git a/src/dede/templets/sys_admin_user_edit.htm b/src/admin/templets/sys_admin_user_edit.htm
old mode 100755
new mode 100644
similarity index 70%
rename from src/dede/templets/sys_admin_user_edit.htm
rename to src/admin/templets/sys_admin_user_edit.htm
index 93a2f487..47960a78
--- a/src/dede/templets/sys_admin_user_edit.htm
+++ b/src/admin/templets/sys_admin_user_edit.htm
@@ -2,19 +2,18 @@
- 管理员帐号--更改帐号
+ 管理员帐号--修改帐号
-
-
+
+
-
@@ -23,34 +22,33 @@
-
-
-
+
+
+
-
\ No newline at end of file
diff --git a/src/dede/templets/sys_admin_user_tj.htm b/src/admin/templets/sys_admin_user_tj.htm
old mode 100755
new mode 100644
similarity index 65%
rename from src/dede/templets/sys_admin_user_tj.htm
rename to src/admin/templets/sys_admin_user_tj.htm
index 64c0bfab..db3655f4
--- a/src/dede/templets/sys_admin_user_tj.htm
+++ b/src/admin/templets/sys_admin_user_tj.htm
@@ -1,51 +1,51 @@
-
-
-
-
-管理员帐号--绩效统计
-
-
-
-
-
-
-
-
-
-
请稍后,正在载入中...
-
-
-
-
- 管理员帐号 > 编辑绩效统计
-
-
-
-
- Execute('me', 'Select * From `#@__admin` order by id asc');
- while( $arr = $dsql->GetArray('me') )
- {
- echo " 请稍后,正在载入中...
\r\n\r\n";
- }
- ?>
-
-
-
-
+
+
+
+
+管理员帐号--绩效统计
+
+
+
+
+
+
+
+
+
+
请稍后,正在载入
+
+
+
+
+ 管理员帐号 > 编辑绩效统计
+
+
+
+
+ Execute('me', 'Select * From `#@__admin` order by id asc');
+ while( $arr = $dsql->GetArray('me') )
+ {
+ echo " 请稍后,正在载入
\r\n\r\n";
+ }
+ ?>
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_cache_up.htm b/src/admin/templets/sys_cache_up.htm
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/templets/sys_cache_up.htm
rename to src/admin/templets/sys_cache_up.htm
index b0363d1c..b22add98
--- a/src/dede/templets/sys_cache_up.htm
+++ b/src/admin/templets/sys_cache_up.htm
@@ -1,75 +1,73 @@
-
-
-
-
- 更新系统缓存
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 更新系统缓存
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_data.htm b/src/admin/templets/sys_data.htm
old mode 100755
new mode 100644
similarity index 86%
rename from src/dede/templets/sys_data.htm
rename to src/admin/templets/sys_data.htm
index d86f1e61..2239bdce
--- a/src/dede/templets/sys_data.htm
+++ b/src/admin/templets/sys_data.htm
@@ -1,285 +1,282 @@
-
-
-
-
- 数据库维护
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 数据库维护
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_data_replace.htm b/src/admin/templets/sys_data_replace.htm
old mode 100755
new mode 100644
similarity index 81%
rename from src/dede/templets/sys_data_replace.htm
rename to src/admin/templets/sys_data_replace.htm
index c8ea83a0..554ffad9
--- a/src/dede/templets/sys_data_replace.htm
+++ b/src/admin/templets/sys_data_replace.htm
@@ -1,172 +1,169 @@
-
-
-
-
- 数据批量替换
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 数据库内容替换:
-
-
-
-
-
-
-
-
-
- 开始替换数据
-
-
-
-
-
-
-
- 结果:
-
-
- [增大 ] [缩小 ]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 数据批量替换
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 数据库内容替换:
+
+
+
+
+
+
+
+
+
+ 开始替换数据
+
+
+
+
+
+
+
+ 结果:
+
+
+ [增大 ] [缩小 ]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_data_revert.htm b/src/admin/templets/sys_data_revert.htm
old mode 100755
new mode 100644
similarity index 87%
rename from src/dede/templets/sys_data_revert.htm
rename to src/admin/templets/sys_data_revert.htm
index e51546c8..c8478a2d
--- a/src/dede/templets/sys_data_revert.htm
+++ b/src/admin/templets/sys_data_revert.htm
@@ -1,145 +1,143 @@
-
-
-
-
- 数据库维护--数据还原
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 数据库维护--数据还原
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_group.htm b/src/admin/templets/sys_group.htm
old mode 100755
new mode 100644
similarity index 76%
rename from src/dede/templets/sys_group.htm
rename to src/admin/templets/sys_group.htm
index ae881a5f..7c59666c
--- a/src/dede/templets/sys_group.htm
+++ b/src/admin/templets/sys_group.htm
@@ -1,64 +1,62 @@
-
-
-
-
- 系统用户组管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Rank
- 组名称
- 管理
-
- SetQuery("Select `rank`,`typename`,`system` From #@__admintype");
- $dsql->Execute();
- while($row = $dsql->GetObject())
- {
- ?>
-
-
- rank?>
-
-
- typename?>
-
-
- 权限设定
- 组用户
- system==0){ ?>[删除组]
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 系统用户组管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Rank
+ 组名称
+ 管理
+
+ SetQuery("Select `rank`,typename,`system` From #@__admintype");
+ $dsql->Execute();
+ while($row = $dsql->GetObject())
+ {
+ ?>
+
+
+ rank?>
+
+
+ typename?>
+
+
+ 权限设定
+ 组用户
+ system==0){ ?>[删除组]
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_group_add.htm b/src/admin/templets/sys_group_add.htm
old mode 100755
new mode 100644
similarity index 68%
rename from src/dede/templets/sys_group_add.htm
rename to src/admin/templets/sys_group_add.htm
index 8fd14267..35cfdac7
--- a/src/dede/templets/sys_group_add.htm
+++ b/src/admin/templets/sys_group_add.htm
@@ -1,105 +1,102 @@
-
-
-
-
- 组权限设置
-
-
-
-
-
-
-
-
-
-
- 系统用户组管理 >>增加用户组:
-
-
-
-
-
- 组名称:
-
-
-
-
- 级别值:
-
- (数字,系统已占用的级别值:
- SetQuery("Select rank From #@__admintype");
- $dsql->Execute();
- while($row = $dsql->GetObject()) echo ''.$row->rank.' 、';
- ?>
- ,级别值必须小于10,超过或等于10所有权限设置将无效(超级管理员),如果10个组不能完全满足您的要求,允许使用小数)
-
- >#", $line))
- {
- if($start>0) echo " \r\n";
- $start++;
- $lhead = "
-
- {$start}、".str_replace('>>','',$line)."
-
- ";
- echo $lhead;
- }
- else if(preg_match("#^>#", $line))
- {
- $ls = explode('>',$line);
- $tag = $ls[1];
- $tagname = str_replace('[br]', ' ', $ls[2]);
- if(!preg_match("# #", $tagname) ) $tagname .= "($tag) ";
- else $tagname = str_replace(' ', "($tag) ", $tagname);
- echo " $tagname \r\n";
- $k++;
- }
- }
- $start++;
- ?>
-
-
-
- 、插件权限
-
-
-
- SetQuery('Select plusname From #@__plus');
- $dsql->Execute();
- while($row=$dsql->GetObject()){
- echo " {$row->plusname} \r\n";
- $k++;
- $l++;
- if($l%6==0) echo " ";
- }
- ?>
-
-
-
-
-
- 保存
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 组权限设置
+
+
+
+
+
+
+
+
+
+ 系统用户组管理 >> 增加用户组:
+
+
+
+
+
+ 组名称:
+
+
+
+
+ 级别值:
+
+ (数字,系统已占用的级别值:
+ SetQuery("Select `rank` From `#@__admintype`");
+ $dsql->Execute();
+ while($row = $dsql->GetObject()) echo ''.$row->rank.' 、';
+ ?>
+ ,级别值必须小于10,超过或等于10所有权限设置将无效(超级管理员),如果10个组不能完全满足您的要求,允许使用小数)
+
+ >#", $line))
+ {
+ if($start>0) echo " \r\n";
+ $start++;
+ $lhead = "
+
+ {$start}、".str_replace('>>','',$line)."
+
+ ";
+ echo $lhead;
+ }
+ else if(preg_match("#^>#", $line))
+ {
+ $ls = explode('>',$line);
+ $tag = $ls[1];
+ $tagname = str_replace('[br]', ' ', $ls[2]);
+ if(!preg_match("# #", $tagname) ) $tagname .= "($tag) ";
+ else $tagname = str_replace(' ', "($tag) ", $tagname);
+ echo " $tagname \r\n";
+ $k++;
+ }
+ }
+ $start++;
+ ?>
+
+
+
+ 、插件权限
+
+
+
+ SetQuery('Select plusname From #@__plus');
+ $dsql->Execute();
+ while($row=$dsql->GetObject()){
+ echo " {$row->plusname} \r\n";
+ $k++;
+ $l++;
+ if($l%6==0) echo " ";
+ }
+ ?>
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_group_edit.htm b/src/admin/templets/sys_group_edit.htm
old mode 100755
new mode 100644
similarity index 68%
rename from src/dede/templets/sys_group_edit.htm
rename to src/admin/templets/sys_group_edit.htm
index 5b9ee127..4b3adeaa
--- a/src/dede/templets/sys_group_edit.htm
+++ b/src/admin/templets/sys_group_edit.htm
@@ -1,103 +1,99 @@
-
-
-
-
- 组权限设置
-
-
-
-
-
-
-
-
-
-
-
- 系统用户组管理 >>更改用户组:
-
-
-
-
-
- 组名称:
-
-
-
-
- 级别值:
-
-
-
-
-
- >#", $line))
- {
- if($start>0) echo " \r\n";
- $start++;
- $lhead = "
-
- {$start}、".str_replace('>>','',$line)."
-
- ";
- echo $lhead;
- }
- else if(preg_match("#^>#", $line))
- {
- $ls = explode('>',$line);
- $tag = $ls[1];
- $tagname = str_replace('[br]',' ',$ls[2]);
- if(!preg_match("# #", $tagname) ) $tagname .= "($tag) ";
- else $tagname = str_replace(' ', "($tag) ", $tagname);
- echo " $tagname \r\n";
- $k++;
- }
- }
- $start++;
- ?>
-
-
-
- 、插件权限
-
-
-
- SetQuery('SELECT plusname FROM #@__plus');
- $dsql->Execute();
- while($row=$dsql->GetObject()){
- echo " plusname}")."> {$row->plusname}\r\n";
- $k++;
- $l++;
- if($l % 6 == 0) echo " ";
- }
- ?>
-
-
-
-
-
- 保存
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 组权限设置
+
+
+
+
+
+
+
+
+
+
+ 系统用户组管理 >> 修改用户组:
+
+
+
+
+
+ 组名称:
+
+
+
+
+ 级别值:
+
+
+
+
+
+ >#", $line))
+ {
+ if($start>0) echo " \r\n";
+ $start++;
+ $lhead = "
+
+ {$start}、".str_replace('>>','',$line)."
+
+ ";
+ echo $lhead;
+ }
+ else if(preg_match("#^>#", $line))
+ {
+ $ls = explode('>',$line);
+ $tag = $ls[1];
+ $tagname = str_replace('[br]',' ',$ls[2]);
+ if(!preg_match("# #", $tagname) ) $tagname .= "($tag) ";
+ else $tagname = str_replace(' ', "($tag) ", $tagname);
+ echo " $tagname \r\n";
+ $k++;
+ }
+ }
+ $start++;
+ ?>
+
+
+
+ 、插件权限
+
+
+
+ SetQuery('SELECT plusname FROM #@__plus');
+ $dsql->Execute();
+ while($row=$dsql->GetObject()){
+ echo " plusname}")."> {$row->plusname}\r\n";
+ $k++;
+ $l++;
+ if($l % 6 == 0) echo " ";
+ }
+ ?>
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_info.htm b/src/admin/templets/sys_info.htm
old mode 100755
new mode 100644
similarity index 95%
rename from src/dede/templets/sys_info.htm
rename to src/admin/templets/sys_info.htm
index 15aa7090..5f01f97f
--- a/src/dede/templets/sys_info.htm
+++ b/src/admin/templets/sys_info.htm
@@ -2,8 +2,8 @@
-系统配置参数
-
+系统配置变量
+
-
-
-
-
-
-
- $val){
- if(!isset(${'payment_'.$value}[$k])) $payment_temp = '';
- else $payment_temp = ${'payment_'.$value}[$k];
- echo ' '."\n";
- }
-}
-?>
-
-
-
-
-
- 如果该配置无效要手动更改,可打开/data/sys_pay.cache.php文件进行手工配置。
-
-
-
-
-
-
-
-
-
+
+
+
+
+支付接口配置
+
+
+
+
+
+
+
+
+ $val){
+ if(!isset(${'payment_'.$value}[$k])) $payment_temp = '';
+ else $payment_temp = ${'payment_'.$value}[$k];
+ echo ' '."\n";
+ }
+}
+?>
+
+
+
+
+ 如果该配置无效要手动修改,可打开/data/sys_pay.cache.php文件进行手工配置
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_passport.htm b/src/admin/templets/sys_passport.htm
old mode 100755
new mode 100644
similarity index 70%
rename from src/dede/templets/sys_passport.htm
rename to src/admin/templets/sys_passport.htm
index 0457c838..cbb5ca4c
--- a/src/dede/templets/sys_passport.htm
+++ b/src/admin/templets/sys_passport.htm
@@ -1,71 +1,71 @@
-
-
-
-
-通行证设置
-
-
-
-
-
-
-
+
+
+
+
+通行证设置
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_payment.htm b/src/admin/templets/sys_payment.htm
old mode 100755
new mode 100644
similarity index 74%
rename from src/dede/templets/sys_payment.htm
rename to src/admin/templets/sys_payment.htm
index 9fd4559e..84a5bddf
--- a/src/dede/templets/sys_payment.htm
+++ b/src/admin/templets/sys_payment.htm
@@ -1,73 +1,67 @@
-
-
-
-
- 支付接口配置
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 支付方式
- 描述
- 排序
- 管理
-
- {dede:datalist}
-
- {dede:field.name /}
- {dede:field.description /}
- {dede:field.rank /}
-
-
- [安装]
-
- [更改]
- [删除]
-
-
-
- {/dede:datalist}
-
- {dede:pagelist listsize=5/}
-
-
-
-
-
-
-
-
+
+
+
+
+ 支付接口配置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 支付方式
+ 描述
+ 排序
+ 管理
+
+ {dede:datalist}
+
+ {dede:field.name /}
+ {dede:field.description /}
+ {dede:field.rank /}
+
+
+ [安装]
+
+ [修改]
+ [删除]
+
+
+
+ {/dede:datalist}
+
+ {dede:pagelist listsize=5/}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_payment_install.htm b/src/admin/templets/sys_payment_install.htm
old mode 100755
new mode 100644
similarity index 74%
rename from src/dede/templets/sys_payment_install.htm
rename to src/admin/templets/sys_payment_install.htm
index 46620eae..6da613f6
--- a/src/dede/templets/sys_payment_install.htm
+++ b/src/admin/templets/sys_payment_install.htm
@@ -1,69 +1,65 @@
-
-
-
-
-
安装支付接口
-
-
-
-
-
-
-
-
-
-
- 支付接口列表 >>
- 安装支付接口
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
安装支付接口
+
+
+
+
+
+
+
+
+
+ 支付接口列表 >>
+ 安装支付接口
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_safetest.htm b/src/admin/templets/sys_safetest.htm
old mode 100755
new mode 100644
similarity index 74%
rename from src/dede/templets/sys_safetest.htm
rename to src/admin/templets/sys_safetest.htm
index 103c2fc6..f0a584f1
--- a/src/dede/templets/sys_safetest.htm
+++ b/src/admin/templets/sys_safetest.htm
@@ -1,93 +1,85 @@
-
-
-
-
-
木马自检程序
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
请稍后,正在操作中...
-
-
-
-
-
-
-
+
+
+
+
+
木马自检程序
+
+
+
+
+
+
+
+
+
+
+
+
+
请稍后,正在操作中
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/sys_safetest_viewdiff.htm b/src/admin/templets/sys_safetest_viewdiff.htm
similarity index 96%
rename from src/dede/templets/sys_safetest_viewdiff.htm
rename to src/admin/templets/sys_safetest_viewdiff.htm
index 3c6f4ab3..36cf1d6b 100644
--- a/src/dede/templets/sys_safetest_viewdiff.htm
+++ b/src/admin/templets/sys_safetest_viewdiff.htm
@@ -1,11 +1,10 @@
-
查看差异
-
+
@@ -80,7 +79,6 @@
-
@@ -91,5 +89,4 @@
});
-
\ No newline at end of file
diff --git a/src/dede/templets/sys_sql_query.htm b/src/admin/templets/sys_sql_query.htm
old mode 100755
new mode 100644
similarity index 85%
rename from src/dede/templets/sys_sql_query.htm
rename to src/admin/templets/sys_sql_query.htm
index 93876052..b0b0568e
--- a/src/dede/templets/sys_sql_query.htm
+++ b/src/admin/templets/sys_sql_query.htm
@@ -4,21 +4,19 @@
SQL命令行工具
-
-
-
+
+
+
-
-
+
- SQL命令运行器:
+ SQL命令运行器:
数据备份
数据还原
@@ -32,17 +30,23 @@
-
+
- 系统的表信息:
+ 系统的表信息:
- SetQuery("Show Tables");
+SetQuery($query);
$dsql->Execute('t');
+
while($row = $dsql->GetArray('t',MYSQL_BOTH))
{
$dsql->SetQuery("Select count(*) From ".$row[0]);
@@ -60,17 +64,17 @@ while($row = $dsql->GetArray('t',MYSQL_BOTH))
优化选中表
-
+
修复选中表
-
+
查看表结构
优化全部表
-
+
修复全部表
@@ -88,10 +92,10 @@ while($row = $dsql->GetArray('t',MYSQL_BOTH))
-
+
- 运行SQL命令行:
+ 运行SQL命令行:
单行命令(支持简单查询)
@@ -121,5 +125,4 @@ while($row = $dsql->GetArray('t',MYSQL_BOTH))
});
-
\ No newline at end of file
diff --git a/src/dede/templets/tag_test.htm b/src/admin/templets/tag_test.htm
old mode 100755
new mode 100644
similarity index 71%
rename from src/dede/templets/tag_test.htm
rename to src/admin/templets/tag_test.htm
index d42b0496..d8abd59b
--- a/src/dede/templets/tag_test.htm
+++ b/src/admin/templets/tag_test.htm
@@ -4,10 +4,9 @@
主页更新向导
-
-
-
+
+
+
-
+
-
-
+
-
-
+
+
-
+
-
- 全局标记指的是应用在网站主页、单独页面、频道封面使用的单独的模板标记,在列表或文章模板中,一般只允许调用channel、arclist标记(hotart、coolart、imglist等都是这个标记延伸出来的标记),但是环境变量限定为文章或列表所在的栏目,如果您要测试的标记是在列表或文章中使用,请指定环境变量(栏目ID)。
- 各标记的具体含义和用途,请在模板标记参考 一章查阅。
-
+ 全局标记指的是应用在网站主页、单独页面、频道封面使用的单独的模板标记,在列表或文章模板中,一般只允许调用channel、arclist标记(hotart、coolart、imglist等都是这个标记延伸出来的标记),但是环境变量限定为文章或列表所在的栏目,如果您要测试的标记是在列表或文章中使用,请指定环境变量(栏目ID)
+ 各标记的具体含义和用途,请在模板标记参考 一章查阅
- 输入要测试的局部代码:
+ 输入要测试的局部代码:
@@ -62,30 +56,30 @@
- 环境变量:
-
+ 环境变量:
+
GetOptionArray($cid,$admin_catalogs,0);
echo "\r\n";
- if($cid=="0") echo "不使用环境ID... \r\n";
+ if($cid=="0") echo "不使用环境ID \r\n";
echo $typeOptions;
echo " ";
?>
-
+
提交测试
-
+
- 进行状态:
+ 进行状态:
-
\ No newline at end of file
diff --git a/src/admin/templets/tags_main.htm b/src/admin/templets/tags_main.htm
new file mode 100644
index 00000000..2ab8caa9
--- /dev/null
+++ b/src/admin/templets/tags_main.htm
@@ -0,0 +1,165 @@
+
+
+
+
+ 标签管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/templets_default.htm b/src/admin/templets/templets_default.htm
old mode 100755
new mode 100644
similarity index 96%
rename from src/dede/templets/templets_default.htm
rename to src/admin/templets/templets_default.htm
index 932b07cc..b9c618b1
--- a/src/dede/templets/templets_default.htm
+++ b/src/admin/templets/templets_default.htm
@@ -1,87 +1,87 @@
-
-
-
-
-模板管理器
-
-
-
-
-
-
-
-
-
-
- 文件名
- 文件描述
- 修改时间
- 操作
-
-
-
-
- 当前位置:
-
-
-
- 默认模板目录
- 插件模板目录
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 新建模板
- 上传模板
-
-
-
-
+
+
+
+
+模板管理器
+
+
+
+
+
+
+
+
+
+
+ 文件名
+ 文件描述
+ 修改时间
+ 操作
+
+
+
+
+ 当前位置:
+
+
+
+ 默认模板目录
+ 插件模板目录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新建模板
+ 上传模板
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/templets_one.htm b/src/admin/templets/templets_one.htm
old mode 100755
new mode 100644
similarity index 84%
rename from src/dede/templets/templets_one.htm
rename to src/admin/templets/templets_one.htm
index 3e84ad7b..d5d897d7
--- a/src/dede/templets/templets_one.htm
+++ b/src/admin/templets/templets_one.htm
@@ -1,107 +1,103 @@
-{dede:config.pagesize value="20"/}
-
-
-
-
-
- 单独页面管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+{dede:config.pagesize value="20"/}
+
+
+
+
+ 单独页面管理
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/templets_one_add.htm b/src/admin/templets/templets_one_add.htm
old mode 100755
new mode 100644
similarity index 82%
rename from src/dede/templets/templets_one_add.htm
rename to src/admin/templets/templets_one_add.htm
index 2de97065..bc443de9
--- a/src/dede/templets/templets_one_add.htm
+++ b/src/admin/templets/templets_one_add.htm
@@ -1,128 +1,125 @@
-
-
-
-
- 增加自定义页面
-
-
-
-
-
-
-
-
-
-
-
-
-
- ◆单独页面管理 >>增加新页面
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 增加自定义页面
+
+
+
+
+
+
+
+
+
+
+
+
+ 单独页面管理 >> 增加新页面
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/templets_one_edit.htm b/src/admin/templets/templets_one_edit.htm
old mode 100755
new mode 100644
similarity index 83%
rename from src/dede/templets/templets_one_edit.htm
rename to src/admin/templets/templets_one_edit.htm
index 3aa1b315..1a0d5c35
--- a/src/dede/templets/templets_one_edit.htm
+++ b/src/admin/templets/templets_one_edit.htm
@@ -1,120 +1,120 @@
-
-
-
-
-更改自定义页面
-
-
-
-
-
-
-
-
-
-
-
-
- ◆单独页面管理 >>更新页面
-
-
-
-
-
-
-
-
-
+
+
+
+
+修改自定义页面
+
+
+
+
+
+
+
+
+
+
+
+
+ 单独页面管理 >> 更新页面
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/templets_tagsource.htm b/src/admin/templets/templets_tagsource.htm
old mode 100755
new mode 100644
similarity index 78%
rename from src/dede/templets/templets_tagsource.htm
rename to src/admin/templets/templets_tagsource.htm
index 496a3553..1633219d
--- a/src/dede/templets/templets_tagsource.htm
+++ b/src/admin/templets/templets_tagsource.htm
@@ -1,84 +1,78 @@
-
-
-
-
- 标签源码碎片管理
-
-
-
-
-
-
-
-
-
-
- 标签文件名
- 标签说明
- 修改时间
- 操作
-
-
-
-
-
- 当前位置:标签源码碎片管理(文件存放在 ../include/taglib 文件夹)
-
-
-
-
-
- read())
- {
- if(!preg_match("#\.php$#", $filename)) continue;
- $filetime = filemtime($libdir.'/'.$filename);
- $filetime = MyDate("Y-m-d H:i",$filetime);
- $fileinfo = GetHelpInfo(str_replace('.lib.php','',$filename));
- ?>
-
-
-
-
-
-
-
-
-
-
-
- 编辑
-
-
-
-
-
-
- 修改系统标签有风险,请小心操作
-
-
-
-
-
-
+
+
+
+
+ 标签源码碎片管理
+
+
+
+
+
+
+
+
+
+ 标签文件名
+ 标签说明
+ 修改时间
+ 操作
+
+
+
+
+
+ 当前位置:标签源码碎片管理(文件存放在 ../system/taglib 文件夹)
+
+
+
+
+
+ read())
+ {
+ if(!preg_match("#\.php$#", $filename)) continue;
+ $filetime = filemtime($libdir.'/'.$filename);
+ $filetime = MyDate("Y-m-d H:i",$filetime);
+ $fileinfo = GetHelpInfo(str_replace('.lib.php','',$filename));
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+ 编辑
+
+
+
+
+
+
+ 修改系统标签有风险,请小心操作
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/tpl_edit.htm b/src/admin/templets/tpl_edit.htm
old mode 100755
new mode 100644
similarity index 51%
rename from src/dede/templets/tpl_edit.htm
rename to src/admin/templets/tpl_edit.htm
index e23d780b..11003989
--- a/src/dede/templets/tpl_edit.htm
+++ b/src/admin/templets/tpl_edit.htm
@@ -1,31 +1,16 @@
-
+
-
文件编辑
-
-
+
+
-
+
@@ -34,7 +19,7 @@
-
+ style="margin-bottom:10px" class="table maintable table-bordered mt-3">
-
- ◇模板管理 >>
- 修改/新建模板
-
+ 模板管理 >> 修改/新建模板
-
-
-
+
+
+
-
- 修改/新建模板:
+
+ 修改/新建模板:
文件名称
-
-
- (不允许用 “..” 形式的路径)
-
+ (不允许用 “..” 形式的路径)
- 参考标签:
+ 参考标签:
'.$tag.' ';
-//}
-//echo ' 隐藏全部 ';
-foreach ($helps as $key => $help)
-{
- echo ''."\r\n";
-
-}
-?>
+ foreach ($helps as $key => $help)
+ {
+ echo ''."\r\n";
+ }
+ ?>
$help)
-{
- echo '标签名称: '.$key.'
功能说明: '.trim($help[0]).'
使用实例: '.trim($help[1]).' 参数说明: '."\r\n";
- $parameters = explode("\n", $help[2]);
- foreach($parameters as $parameter)
- {
- $parameter = trim($parameter);
- if($parameter == '') continue;
- else echo $parameter,'
';
- }
- echo '
'."\r\n";
-}
-?>
+ foreach ($helps as $key => $help)
+ {
+ echo '标签名称: '.$key.'
功能说明: '.trim($help[0]).'
使用实例: '.trim($help[1]).' 参数说明: '."\r\n";
+ $parameters = explode("\n", $help[2]);
+ foreach($parameters as $parameter)
+ {
+ $parameter = trim($parameter);
+ if($parameter == '') continue;
+ else echo $parameter,'
';
+ }
+ echo '
'."\r\n";
+ }
+ ?>
-
+
-
- 保 存
+
+ 保存
取消修改
- 不理返回
+ 不理返回
@@ -153,5 +123,4 @@ foreach ($helps as $key => $help)
});
-
\ No newline at end of file
diff --git a/src/dede/templets/tpl_edit_tag.htm b/src/admin/templets/tpl_edit_tag.htm
old mode 100755
new mode 100644
similarity index 76%
rename from src/dede/templets/tpl_edit_tag.htm
rename to src/admin/templets/tpl_edit_tag.htm
index d0b892c5..3508be71
--- a/src/dede/templets/tpl_edit_tag.htm
+++ b/src/admin/templets/tpl_edit_tag.htm
@@ -4,9 +4,9 @@
标签源码碎片管理
-
-
-
+
+
+
@@ -31,7 +31,7 @@ function Post()
{
if (document.form1.filename.value=="")
{
- ShowMsg("文件名不能为空。");
+ ShowMsg("文件名不能为空");
document.form1.filename.focus();
return false;
}
@@ -46,20 +46,19 @@ function Post()
-
+
-
-
-
+
+
+
-
- (修改源码如果出现语法错误,可能导致标签无法使用,请修改前先作好数据备份)
+
+ (修改源码如果出现语法错误,可能导致标签无法使用,请修改前先作好数据备份)
@@ -72,9 +71,9 @@ function Post()
标签格式说明
- 标签文件名为:标签名.lib.php
- 接口函数定义为:function lib_标签名(&$ctag,&$refObj),返回值是结果字符串
- 修改标签时为了防止出错,您也可以修改它的名称(同时修改文件名和函数名),这样等同继承了原来标签的代码建立一个新的标签。
+ 标签文件名为:标签名.lib.php
+ 接口函数定义为:function lib_标签名(&$ctag,&$refObj),返回值是结果字符串
+ 修改标签时为了防止出错,您也可以修改它的名称(同时修改文件名和函数名),这样等同继承了原来标签的代码建立一个新的标签
@@ -83,7 +82,7 @@ function Post()
-
+
保 存
重 置
@@ -101,4 +100,4 @@ function Post()
});
-
+
\ No newline at end of file
diff --git a/src/admin/templets/tpl_newfile.htm b/src/admin/templets/tpl_newfile.htm
new file mode 100644
index 00000000..53935c39
--- /dev/null
+++ b/src/admin/templets/tpl_newfile.htm
@@ -0,0 +1,51 @@
+
+
+
+
+ 文件编辑
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/update_guide_getfiles.htm b/src/admin/templets/update_guide_getfiles.htm
old mode 100755
new mode 100644
similarity index 76%
rename from src/dede/templets/update_guide_getfiles.htm
rename to src/admin/templets/update_guide_getfiles.htm
index 616df5db..dc903c27
--- a/src/dede/templets/update_guide_getfiles.htm
+++ b/src/admin/templets/update_guide_getfiles.htm
@@ -1,56 +1,56 @@
-
-
-
-
-自动更新程序--下载更新文件
-
-
-
-
-
-
-
- 自动更新程序--下载更新文件
-
-
-
-
-
-
- 下载的文件临时存放在文件夹(../data/ )内,如果某些基础类有重要的改动导致更新中途中错,您可以从这文件夹提取文件手工更新。
-
-
-
-
-
-
-
- 进行状态:
-
-
- [增大 ] [缩小 ]
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+自动更新程序--下载更新文件
+
+
+
+
+
+
+
+ 自动更新程序--下载更新文件
+
+
+
+
+
+
+ 下载的文件临时存放在文件夹(../data/ )内,如果某些基础类有重要的改动导致更新中途中错,您可以从这文件夹提取文件手工更新
+
+
+
+
+
+
+
+ 进行状态:
+
+
+ [增大 ] [缩小 ]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/dede/templets/update_guide_getlist.htm b/src/admin/templets/update_guide_getlist.htm
old mode 100755
new mode 100644
similarity index 76%
rename from src/dede/templets/update_guide_getlist.htm
rename to src/admin/templets/update_guide_getlist.htm
index e5796c94..2fc11dca
--- a/src/dede/templets/update_guide_getlist.htm
+++ b/src/admin/templets/update_guide_getlist.htm
@@ -1,32 +1,32 @@
-
-
-
-
-自动更新程序--待下载文件列表
-
-
-
-
-
-
-
-
-
-
- 自动更新程序--待下载文件列表
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+自动更新程序--待下载文件列表
+
+
+
+
+
+
+
+
+
+
+ 自动更新程序--待下载文件列表
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/vote_add.htm b/src/admin/templets/vote_add.htm
old mode 100755
new mode 100644
similarity index 88%
rename from src/dede/templets/vote_add.htm
rename to src/admin/templets/vote_add.htm
index 40c5c732..2e643f3d
--- a/src/dede/templets/vote_add.htm
+++ b/src/admin/templets/vote_add.htm
@@ -1,173 +1,169 @@
-
-
-
-
- 增加投票
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 投票管理 >>增加投票
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 增加投票
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 投票管理 >> 增加投票
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/vote_edit.htm b/src/admin/templets/vote_edit.htm
old mode 100755
new mode 100644
similarity index 87%
rename from src/dede/templets/vote_edit.htm
rename to src/admin/templets/vote_edit.htm
index ff677d97..0d627dbc
--- a/src/dede/templets/vote_edit.htm
+++ b/src/admin/templets/vote_edit.htm
@@ -1,143 +1,137 @@
-
-
-
-
- 投票管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 投票管理 >>增加投票
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ 投票管理
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 投票管理 >> 增加投票
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/vote_getcode.htm b/src/admin/templets/vote_getcode.htm
old mode 100755
new mode 100644
similarity index 77%
rename from src/dede/templets/vote_getcode.htm
rename to src/admin/templets/vote_getcode.htm
index a7db37d7..fd95de93
--- a/src/dede/templets/vote_getcode.htm
+++ b/src/admin/templets/vote_getcode.htm
@@ -1,76 +1,72 @@
-
-
-
-
- 获取代码
-
-
-
-
-
-
-
-
- 投票管理 >>获取代码
-
-
-
-
-
-
- 在封面或主页模板中使用的标记:
-
-
-
-
-
-
-
-
-
- {dede:vote id='' lineheight='22'
-tablewidth='100%' titlebgcolor='#EDEDE2'
-titlebackground='' tablebgcolor='#FFFFFF'}
-{/dede:vote}
-
-
-
-
-
-
-
- 提交测试
-
-
-
-
-
-
-
- 在封面或主页模板中使用的JS:
-
-
-
-
-
-
-
- 默认生成的表单HTML:
-
-
-
- GetVoteForm();
- $vt->Close();
- ?>
-
-
-
-
-
-
-
-
+
+
+
+
+ 获取代码
+
+
+
+
+
+
+
+ 投票管理 >> 获取代码
+
+
+
+
+
+
+ 在封面或主页模板中使用的标记:
+
+
+
+
+
+
+
+
+
+ {dede:vote id='' lineheight='26' tablewidth='100%' titlebgcolor='#EDEDE2' titlebackground='' tablebgcolor='#FFFFFF'}{/dede:vote}
+
+
+
+
+
+
+
+ 提交测试
+
+
+
+
+
+
+
+ 在封面或主页模板中使用的JS:
+
+
+
+
+
+
+
+ 默认生成的表单HTML:
+
+
+
+
+ GetVoteForm();
+ $vt->Close();
+ ?>
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/vote_main.htm b/src/admin/templets/vote_main.htm
old mode 100755
new mode 100644
similarity index 66%
rename from src/dede/templets/vote_main.htm
rename to src/admin/templets/vote_main.htm
index 58b81b52..4a0a6cb6
--- a/src/dede/templets/vote_main.htm
+++ b/src/admin/templets/vote_main.htm
@@ -1,56 +1,52 @@
-{dede:config.pagesize value='20'/}
-
-
-
-
- 投票管理
-
-
-
-
-
-
-
-
-
- 投票管理 增加一组投票
-
-
-
- 投票ID
- 投票名称
- 开始时间
- 结束时间
- 投票总数
- 状态
- 管理
-
- {dede:datalist}
-
- {dede:field.aid /}
-
-
- {dede:field.votename /}
-
-
- {dede:field.starttime function="GetDateMk(@me)" /}
- {dede:field.endtime function="GetDateMk(@me)" /}
- {dede:field.totalcount /}
-
- 未启用";}else{echo "启用 ";} ?>
-
-
- 代码
- 更改
- 删除
-
-
- {/dede:datalist}
-
- {dede:pagelist listsize='6'/}
-
-
-
-
+{dede:config.pagesize value='20'/}
+
+
+
+
+ 投票管理
+
+
+
+
+
+
+
+
+ 投票管理
+ 增加一组投票
+
+
+
+ 投票ID
+ 投票名称
+ 开始时间
+ 结束时间
+ 投票总数
+ 状态
+ 管理
+
+ {dede:datalist}
+
+ {dede:field.aid /}
+
+
+ {dede:field.votename /}
+
+
+ {dede:field.starttime function="GetDateMk(@me)" /}
+ {dede:field.endtime function="GetDateMk(@me)" /}
+ {dede:field.totalcount /}
+ 未启用";} else {echo "启用 ";} ?>
+
+ 代码
+ 修改
+ 删除
+
+
+ {/dede:datalist}
+
+ {dede:pagelist listsize='6'/}
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/winmode.htm b/src/admin/templets/winmode.htm
old mode 100755
new mode 100644
similarity index 76%
rename from src/dede/templets/winmode.htm
rename to src/admin/templets/winmode.htm
index 4c198b9d..f33cbcbe
--- a/src/dede/templets/winmode.htm
+++ b/src/admin/templets/winmode.htm
@@ -1,50 +1,46 @@
-
-
-
-
- {dede:wintitle/}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {dede:wecome_info/}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {dede:winform/}
-
-
-
-
-
-
-
- {dede:lang_cms_powerby/}
-
-
-
-
-
+
+
+
+
+ {dede:wintitle/}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {dede:wecome_info/}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {dede:winform/}
+
+
+
+
+
+
+
+ {dede:lang_cms_powerby/}
+
+
+
\ No newline at end of file
diff --git a/src/dede/templets/winmodesmall.htm b/src/admin/templets/winmodesmall.htm
old mode 100755
new mode 100644
similarity index 82%
rename from src/dede/templets/winmodesmall.htm
rename to src/admin/templets/winmodesmall.htm
index d34d5761..6ce57a60
--- a/src/dede/templets/winmodesmall.htm
+++ b/src/admin/templets/winmodesmall.htm
@@ -1,11 +1,11 @@
-
-
-
-
-{dede:wintitle/}
-
-
-
-{dede:winform/}
-
+
+
+
+
+{dede:wintitle/}
+
+
+
+{dede:winform/}
+
\ No newline at end of file
diff --git a/src/dede/templets_main.php b/src/admin/templets_main.php
old mode 100755
new mode 100644
similarity index 92%
rename from src/dede/templets_main.php
rename to src/admin/templets_main.php
index 07a99966..695f9c70
--- a/src/dede/templets_main.php
+++ b/src/admin/templets_main.php
@@ -1,45 +1,39 @@
-SetTemplet(DEDEADMIN."/templets/templets_one.htm");
-$dlist->SetSource($sql);
-$dlist->display();
-
-function GetIsMake($im)
-{
- return $im == 1 ? '需编译' : '不编译';
-}
+SetTemplet(DEDEADMIN."/templets/templets_one.htm");
+$dlist->SetSource($sql);
+$dlist->display();
+function GetIsMake($im)
+{
+ return $im == 1 ? '需编译' : '不编译';
+}
\ No newline at end of file
diff --git a/src/dede/templets_one_add.php b/src/admin/templets_one_add.php
old mode 100755
new mode 100644
similarity index 79%
rename from src/dede/templets_one_add.php
rename to src/admin/templets_one_add.php
index 1475a542..c3dd0bba
--- a/src/dede/templets_one_add.php
+++ b/src/admin/templets_one_add.php
@@ -1,44 +1,46 @@
-GetOne("SELECT filename FROM `#@__sgpage` WHERE likeid='$likeid' AND filename LIKE '$filename' ");
- if (is_array($row)) {
- ShowMsg("已经存在相同的文件名,请更改为其它文件名", "-1");
- exit();
- }
- $inQuery = "INSERT INTO `#@__sgpage`(title,keywords,description,template,likeid,ismake,filename,uptime,body)
- VALUES('$title','$keywords','$description','$template','$likeid','$ismake','$filename','$uptime','$body'); ";
- if (!$dsql->ExecuteNoneQuery($inQuery)) {
- ShowMsg("增加页面失败,请检内容是否有问题", "-1");
- exit();
- }
- $id = $dsql->GetLastID();
- include_once(DEDEINC."/arc.sgpage.class.php");
- $sg = new sgpage($id);
- $sg->SaveToHtml();
- ShowMsg("成功增加一个页面", "templets_one.php");
- exit();
-}
-$row = $dsql->GetOne("SELECT MAX(aid) AS aid FROM `#@__sgpage` ");
-$nowid = is_array($row) ? $row['aid'] + 1 : '';
-include_once(DEDEADMIN."/templets/templets_one_add.htm");
+GetOne("SELECT filename FROM `#@__sgpage` WHERE likeid='$likeid' AND filename LIKE '$filename' ");
+ if (is_array($row)) {
+ ShowMsg("已经存在相同的文件名,请修改为其它文件名", "-1");
+ exit();
+ }
+ $inQuery = "INSERT INTO `#@__sgpage`(title,keywords,description,template,likeid,ismake,filename,uptime,body)
+ VALUES('$title','$keywords','$description','$template','$likeid','$ismake','$filename','$uptime','$body'); ";
+ if (!$dsql->ExecuteNoneQuery($inQuery)) {
+ ShowMsg("增加页面失败,请检内容是否有问题", "-1");
+ exit();
+ }
+ $id = $dsql->GetLastID();
+ include_once(DEDEINC."/archive/sgpage.class.php");
+ $sg = new sgpage($id);
+ $sg->SaveToHtml();
+ ShowMsg("成功增加一个页面", "templets_one.php");
+ exit();
+}
+$row = $dsql->GetOne("SELECT MAX(aid) AS aid FROM `#@__sgpage` ");
+$nowid = is_array($row) ? $row['aid'] + 1 : '';
+include_once(DEDEADMIN."/templets/templets_one_add.htm");
\ No newline at end of file
diff --git a/src/dede/templets_one_edit.php b/src/admin/templets_one_edit.php
old mode 100755
new mode 100644
similarity index 85%
rename from src/dede/templets_one_edit.php
rename to src/admin/templets_one_edit.php
index f2fe2453..96371029
--- a/src/dede/templets_one_edit.php
+++ b/src/admin/templets_one_edit.php
@@ -1,110 +1,111 @@
-ExecuteNoneQuery($inQuery)) {
- ShowMsg("更新页面数据时失败,请检查长相是否有问题", "-1");
- exit();
- }
- $sg = new sgpage($aid);
- $sg->SaveToHtml();
- ShowMsg("成功修改一个页面", "templets_one.php");
- exit();
-} else if ($dopost == "delete") {
- $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'");
- $filename = preg_replace("#\/{1,}#", "/", $cfg_basedir.$cfg_cmspath."/".$row['filename']);
- $dsql->ExecuteNoneQuery(" DELETE FROM `#@__sgpage` WHERE aid='$aid' ");
- if (is_file($filename)) {
- unlink($filename);
- }
- ShowMsg("成功删除一个页面", "templets_one.php");
- exit();
-} else if ($dopost == "make") {
- include_once(DEDEINC."/arc.sgpage.class.php");
- $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'");
- $fileurl = $cfg_cmsurl.'/'.preg_replace("#\/{1,}#", "/", $row['filename']);
- $sg = new sgpage($aid);
- $sg->SaveToHtml();
- ShowMsg("成功更新一个页面", $fileurl);
- exit();
-} else if ($dopost == "mkall") {
- include_once(DEDEINC."/arc.sgpage.class.php");
- $dsql->Execute("ex", "SELECT aid FROM `#@__sgpage` ");
- $i = 0;
- while ($row = $dsql->GetArray("ex")) {
- $sg = new sgpage($row['aid']);
- $sg->SaveToHtml();
- $i++;
- }
- ShowMsg("成功更新 $i 个页面", '-1');
- exit();
-} else if ($dopost == "mksel") {
- if (empty($ids)) {
- $ids = '';
- }
- include_once(DEDEINC."/arc.sgpage.class.php");
- $i = 0;
- if ($ids == 0) {
- ShowMsg('您没有选择需要更新的文档', '-1');
- exit();
- } else if (is_array($ids)) {
- foreach ($ids as $aid) {
- $sg = new sgpage($aid);
- $sg->SaveToHtml();
- $i++;
- }
- ShowMsg("成功更新 $i 个页面", '-1');
- exit();
- }
-} else if ($dopost == "view") {
- if (empty($aid)) {
- ShowMsg('错误的ID', 'javascript:;');
- exit();
- }
- include_once(DEDEINC."/arc.sgpage.class.php");
- $sg = new sgpage($aid);
- $sg->display();
- exit();
-}
-$row = $dsql->GetOne("SELECT * FROM `#@__sgpage` WHERE aid='$aid' ");
-include(DEDEADMIN."/templets/templets_one_edit.htm");
+ExecuteNoneQuery($inQuery)) {
+ ShowMsg("更新页面数据时失败,请检查长相是否有问题", "-1");
+ exit();
+ }
+ $sg = new sgpage($aid);
+ $sg->SaveToHtml();
+ ShowMsg("成功修改一个页面", "templets_one.php");
+ exit();
+} else if ($dopost == "delete") {
+ $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'");
+ $filename = preg_replace("#\/{1,}#", "/", $cfg_basedir.$cfg_cmspath."/".$row['filename']);
+ $dsql->ExecuteNoneQuery(" DELETE FROM `#@__sgpage` WHERE aid='$aid' ");
+ if (is_file($filename)) {
+ unlink($filename);
+ }
+ ShowMsg("成功删除一个页面", "templets_one.php");
+ exit();
+} else if ($dopost == "make") {
+ include_once(DEDEINC."/archive/sgpage.class.php");
+ $row = $dsql->GetOne("SELECT filename FROM `#@__sgpage` WHERE aid='$aid'");
+ $fileurl = $cfg_cmsurl.'/'.preg_replace("#\/{1,}#", "/", $row['filename']);
+ $sg = new sgpage($aid);
+ $sg->SaveToHtml();
+ ShowMsg("成功更新一个页面", $fileurl);
+ exit();
+} else if ($dopost == "mkall") {
+ include_once(DEDEINC."/archive/sgpage.class.php");
+ $dsql->Execute("ex", "SELECT aid FROM `#@__sgpage` ");
+ $i = 0;
+ while ($row = $dsql->GetArray("ex")) {
+ $sg = new sgpage($row['aid']);
+ $sg->SaveToHtml();
+ $i++;
+ }
+ ShowMsg("成功更新 $i 个页面", '-1');
+ exit();
+} else if ($dopost == "mksel") {
+ if (empty($ids)) {
+ $ids = '';
+ }
+ include_once(DEDEINC."/archive/sgpage.class.php");
+ $i = 0;
+ if ($ids == 0) {
+ ShowMsg('您没有选择需要更新的文档', '-1');
+ exit();
+ } else if (is_array($ids)) {
+ foreach ($ids as $aid) {
+ $sg = new sgpage($aid);
+ $sg->SaveToHtml();
+ $i++;
+ }
+ ShowMsg("成功更新 $i 个页面", '-1');
+ exit();
+ }
+} else if ($dopost == "view") {
+ if (empty($aid)) {
+ ShowMsg('错误的ID', 'javascript:;');
+ exit();
+ }
+ include_once(DEDEINC."/archive/sgpage.class.php");
+ $sg = new sgpage($aid);
+ $sg->display();
+ exit();
+}
+$row = $dsql->GetOne("SELECT * FROM `#@__sgpage` WHERE aid='$aid' ");
+include(DEDEADMIN."/templets/templets_one_edit.htm");
\ No newline at end of file
diff --git a/src/dede/templets_tagsource.php b/src/admin/templets_tagsource.php
old mode 100755
new mode 100644
similarity index 89%
rename from src/dede/templets_tagsource.php
rename to src/admin/templets_tagsource.php
index e2fa2eed..5675b660
--- a/src/dede/templets_tagsource.php
+++ b/src/admin/templets_tagsource.php
@@ -1,32 +1,28 @@
-
-
-
-
-
- 系统运行目录权限检测
-
-
-
-
-
-
- ';
- $reval = false;
- if (empty($rootDir)) $rootDir = DEDEROOT;
- if (TestWriteable($d)) {
- @file_put_contents($d.'/'.$filename, $testStr);
- $remoteUrl = $siteuRL.'/'.str_replace($rootDir, '', str_replace("\\", '/', realpath($d))).'/'.$filename;
- $tempStr = @PostHost($remoteUrl);
-
- $reval = (md5($d) == trim($tempStr)) ? true : false;
- unlink($d.'/'.$filename);
- return $reval;
- } else {
- return -1;
- }
- }
- }
-
-
- if (!function_exists('PostHost')) {
- function PostHost($host, $data = '', $method = 'GET', $showagent = null, $port = null, $timeout = 30)
- {
- $parse = @parse_url($host);
- if (empty($parse)) return false;
- if ((int)$port > 0) {
- $parse['port'] = $port;
- } elseif (!@$parse['port']) {
- $parse['port'] = '80';
- }
- $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://").$parse['host'];
- if (!$fp = @fsockopen($parse['host'], $parse['port'], $errnum, $errstr, $timeout)) {
- return false;
- }
- $method = strtoupper($method);
- $wlength = $wdata = $responseText = '';
- $parse['path'] = str_replace(array('\\', '//'), '/', @$parse['path'])."?".@$parse['query'];
- if ($method == 'GET') {
- $separator = @$parse['query'] ? '&' : '';
- substr($data, 0, 1) == '&' && $data = substr($data, 1);
- $parse['path'] .= $separator.$data;
- } elseif ($method == 'POST') {
- $wlength = "Content-length: ".strlen($data)."\r\n";
- $wdata = $data;
- }
- $write = "$method $parse[path] HTTP/1.0\r\nHost: $parse[host]\r\nContent-type: application/x-www-form-urlencoded\r\n{$wlength}Connection: close\r\n\r\n$wdata";
- @fwrite($fp, $write);
- while ($data = @fread($fp, 4096)) {
- $responseText .= $data;
- }
- @fclose($fp);
- empty($showagent) && $responseText = trim(stristr($responseText, "\r\n\r\n"), "\r\n");
- return $responseText;
- }
- }
-
- $allPath = array();
- $needDir = "$cfg_medias_dir|
- $cfg_image_dir|
- $ddcfg_image_dir|
- $cfg_user_dir|
- $cfg_soft_dir|
- $cfg_other_medias|
- $cfg_medias_dir/flink|
- $cfg_cmspath/data|
- $cfg_cmspath/data/$cfg_backup_dir|
- $cfg_cmspath/data/textdata|
- $cfg_cmspath/data/sessions|
- $cfg_cmspath/data/tplcache|
- $cfg_cmspath/data/admin|
- $cfg_cmspath/data/enums|
- $cfg_cmspath/data/mark|
- $cfg_cmspath/data/module|
- $cfg_cmspath/data/rss|
- $cfg_special|
- $cfg_cmspath$cfg_arcdir";
- $needDir = explode('|', $needDir);
- foreach ($needDir as $key => $val) {
- $allPath[trim($val)] = array(
- 'read' => true, // 读取
- 'write' => true, // 写入
- 'execute' => false // 执行
- );
- }
-
-
- // 所有栏目目录
- $sql = "SELECT typedir FROM #@__arctype ORDER BY id DESC";
- $dsql->SetQuery($sql);
- $dsql->Execute('al', $sql);
- while ($row = $dsql->GetArray('al')) {
- $typedir = str_replace($cfg_basehost, '', $row['typedir']);
- if (preg_match("/^http:|^ftp:/i", $row['typedir'])) continue;
- $typedir = str_replace("{cmspath}", $cfg_cmspath, $row['typedir']);
- $allPath[trim($typedir)] = array(
- 'read' => true, // 读取
- 'write' => true, // 写入
- 'execute' => false // 执行
- );
- }
-
- // 只允许读取,不允许写入的目录
- $needDir = array(
- 'include',
- 'member',
- 'plus',
- );
- // 获取子目录
- function GetSondir($d, &$dirname = array())
- {
- $dh = dir($d);
- while ($filename = $dh->read()) {
- if (
- substr($filename, 0, 1) == '.' || is_file($d.'/'.$filename) ||
- preg_match("#^(svn|bak-)#i", $filename)
- ) {
- continue;
- }
- if (is_dir($d.'/'.$filename)) {
- $dirname[] = $d.'/'.$filename;
- GetSondir($d.'/'.$filename, $dirname);
- }
- }
- $dh->close();
- return $dirname;
- }
-
- //获取所有文件列表
- function preg_ls($path = ".", $rec = FALSE, $pat = "/.*/", $ignoredir = '')
- {
- while (substr($path, -1, 1) == "/") {
- $path = substr($path, 0, -1);
- }
- if (!is_dir($path)) {
- $path = dirname($path);
- }
- if ($rec !== TRUE) {
- $rec = FALSE;
- }
- $d = dir($path);
- $ret = array();
- while (FALSE !== ($e = $d->read())) {
- if (($e == ".") || ($e == "..")) {
- continue;
- }
- if ($rec && is_dir($path."/".$e) && ($ignoredir == '' || strpos($ignoredir, $e) === FALSE)) {
- $ret = array_merge($ret, preg_ls($path."/".$e, $rec, $pat, $ignoredir));
- continue;
- }
- if (!preg_match($pat, $e)) {
- continue;
- }
- $ret[] = $path."/".$e;
- }
- return (empty($ret) && preg_match($pat, basename($path))) ? array($path."/") : $ret;
- }
-
- foreach ($needDir as $key => $val) {
- $allPath[trim('/'.$val)] = array(
- 'read' => true, // 读取
- 'write' => false, // 写入
- 'execute' => true // 执行
- );
- $sonDir = GetSondir(DEDEROOT.'/'.$val);
- foreach ($sonDir as $kk => $vv) {
- $vv = trim(str_replace(DEDEROOT, '', $vv));
- $allPath[$vv] = array(
- 'read' => true, // 读取
- 'write' => false, // 写入
- 'execute' => true // 执行
- );
- }
- }
-
- // 不需要执行的
- $needDir = array(
- '/images',
- '/templets'
- );
- foreach ($needDir as $key => $val) {
- $allPath[trim('/'.$val)] = array(
- 'read' => true, // 读取
- 'write' => false, // 写入
- 'execute' => false // 执行
- );
- $sonDir = GetSondir(DEDEROOT.'/'.$val);
- foreach ($sonDir as $kk => $vv) {
- $vv = trim(str_replace(DEDEROOT.'/', '', $vv));
- $allPath[$vv] = array(
- 'read' => true, // 读取
- 'write' => false, // 写入
- 'execute' => false // 执行
- );
- }
- }
-
- // 所有js建议只读
- $jsDir = array(
- '/images',
- '/templets',
- '/include'
- );
- foreach ($jsDir as $k => $v) {
- $jsfiles = preg_ls(DEDEROOT.$v, TRUE, "/.*\.(js)$/i");
- foreach ($jsfiles as $k => $v) {
- $vv = trim(str_replace(DEDEROOT.'/', '/', $v));
- $allPath[$vv] = array(
- 'read' => true, // 读取
- 'write' => false, // 写入
- 'execute' => false // 执行
- );
- }
- }
- ?>
-
-
- 系统运行目录权限检测 返回主页 帮助说明
-
- 说明:本程序用于检测DedeBIZ站点所涉及的目录权限,并且提供一个全面的检测说明,您可以根据检测报告来配置站点以保证站点更为安全。
-
-
-
-
-
-
-
+
+
+
+
+
+ 系统运行目录权限检测
+
+
+
+
+
+ ';
+ $reval = false;
+ if (empty($rootDir)) $rootDir = DEDEROOT;
+ if (TestWriteable($d)) {
+ @file_put_contents($d.'/'.$filename, $testStr);
+ $remoteUrl = $siteuRL.'/'.str_replace($rootDir, '', str_replace("\\", '/', realpath($d))).'/'.$filename;
+ $tempStr = @PostHost($remoteUrl);
+
+ $reval = (md5($d) == trim($tempStr)) ? true : false;
+ unlink($d.'/'.$filename);
+ return $reval;
+ } else {
+ return -1;
+ }
+ }
+ }
+ if (!function_exists('PostHost')) {
+ function PostHost($host, $data = '', $method = 'GET', $showagent = null, $port = null, $timeout = 30)
+ {
+ $parse = @parse_url($host);
+ if (empty($parse)) return false;
+ if ((int)$port > 0) {
+ $parse['port'] = $port;
+ } elseif (!@$parse['port']) {
+ $parse['port'] = '80';
+ }
+ $parse['host'] = str_replace(array('http://', 'https://'), array('', 'ssl://'), "$parse[scheme]://").$parse['host'];
+ if (!$fp = @fsockopen($parse['host'], $parse['port'], $errnum, $errstr, $timeout)) {
+ return false;
+ }
+ $method = strtoupper($method);
+ $wlength = $wdata = $responseText = '';
+ $parse['path'] = str_replace(array('\\', '//'), '/', @$parse['path'])."?".@$parse['query'];
+ if ($method == 'GET') {
+ $separator = @$parse['query'] ? '&' : '';
+ substr($data, 0, 1) == '&' && $data = substr($data, 1);
+ $parse['path'] .= $separator.$data;
+ } elseif ($method == 'POST') {
+ $wlength = "Content-length: ".strlen($data)."\r\n";
+ $wdata = $data;
+ }
+ $write = "$method $parse[path] HTTP/1.0\r\nHost: $parse[host]\r\nContent-type: application/x-www-form-urlencoded\r\n{$wlength}Connection: close\r\n\r\n$wdata";
+ @fwrite($fp, $write);
+ while ($data = @fread($fp, 4096)) {
+ $responseText .= $data;
+ }
+ @fclose($fp);
+ empty($showagent) && $responseText = trim(stristr($responseText, "\r\n\r\n"), "\r\n");
+ return $responseText;
+ }
+ }
+ $allPath = array();
+ $needDir = "$cfg_medias_dir|
+ $cfg_image_dir|
+ $ddcfg_image_dir|
+ $cfg_user_dir|
+ $cfg_soft_dir|
+ $cfg_other_medias|
+ $cfg_medias_dir/flink|
+ $cfg_cmspath/data|
+ $cfg_cmspath/data/$cfg_backup_dir|
+ $cfg_cmspath/data/textdata|
+ $cfg_cmspath/data/sessions|
+ $cfg_cmspath/data/tplcache|
+ $cfg_cmspath/data/admin|
+ $cfg_cmspath/data/enums|
+ $cfg_cmspath/data/mark|
+ $cfg_cmspath/data/module|
+ $cfg_cmspath/data/rss|
+ $cfg_special|
+ $cfg_cmspath$cfg_arcdir";
+ $needDir = explode('|', $needDir);
+ foreach ($needDir as $key => $val) {
+ $allPath[trim($val)] = array(
+ 'read' => true, //读取
+ 'write' => true, //写入
+ 'execute' => false //执行
+ );
+ }
+ //所有栏目目录
+ $sql = "SELECT typedir FROM #@__arctype ORDER BY id DESC";
+ $dsql->SetQuery($sql);
+ $dsql->Execute('al', $sql);
+ while ($row = $dsql->GetArray('al')) {
+ $typedir = str_replace($cfg_basehost, '', $row['typedir']);
+ if (preg_match("/^http:|^ftp:/i", $row['typedir'])) continue;
+ $typedir = str_replace("{cmspath}", $cfg_cmspath, $row['typedir']);
+ $allPath[trim($typedir)] = array(
+ 'read' => true, //读取
+ 'write' => true, //写入
+ 'execute' => false //执行
+ );
+ }
+ //只允许读取,不允许写入的目录
+ $needDir = array(
+ 'include',
+ 'member',
+ 'plus',
+ );
+ //获取子目录
+ function GetSondir($d, &$dirname = array())
+ {
+ $dh = dir($d);
+ while ($filename = $dh->read()) {
+ if (
+ substr($filename, 0, 1) == '.' || is_file($d.'/'.$filename) ||
+ preg_match("#^(svn|bak-)#i", $filename)
+ ) {
+ continue;
+ }
+ if (is_dir($d.'/'.$filename)) {
+ $dirname[] = $d.'/'.$filename;
+ GetSondir($d.'/'.$filename, $dirname);
+ }
+ }
+ $dh->close();
+ return $dirname;
+ }
+ //获取所有文件列表
+ function preg_ls($path = ".", $rec = FALSE, $pat = "/.*/", $ignoredir = '')
+ {
+ while (substr($path, -1, 1) == "/") {
+ $path = substr($path, 0, -1);
+ }
+ if (!is_dir($path)) {
+ $path = dirname($path);
+ }
+ if ($rec !== TRUE) {
+ $rec = FALSE;
+ }
+ $d = dir($path);
+ $ret = array();
+ while (FALSE !== ($e = $d->read())) {
+ if (($e == ".") || ($e == "..")) {
+ continue;
+ }
+ if ($rec && is_dir($path."/".$e) && ($ignoredir == '' || strpos($ignoredir, $e) === FALSE)) {
+ $ret = array_merge($ret, preg_ls($path."/".$e, $rec, $pat, $ignoredir));
+ continue;
+ }
+ if (!preg_match($pat, $e)) {
+ continue;
+ }
+ $ret[] = $path."/".$e;
+ }
+ return (empty($ret) && preg_match($pat, basename($path))) ? array($path."/") : $ret;
+ }
+ foreach ($needDir as $key => $val) {
+ $allPath[trim('/'.$val)] = array(
+ 'read' => true, //读取
+ 'write' => false, //写入
+ 'execute' => true //执行
+ );
+ $sonDir = GetSondir(DEDEROOT.'/'.$val);
+ foreach ($sonDir as $kk => $vv) {
+ $vv = trim(str_replace(DEDEROOT, '', $vv));
+ $allPath[$vv] = array(
+ 'read' => true, //读取
+ 'write' => false, //写入
+ 'execute' => true //执行
+ );
+ }
+ }
+ //不需要执行的
+ $needDir = array(
+ '/images',
+ '/templets'
+ );
+ foreach ($needDir as $key => $val) {
+ $allPath[trim('/'.$val)] = array(
+ 'read' => true, //读取
+ 'write' => false, //写入
+ 'execute' => false //执行
+ );
+ $sonDir = GetSondir(DEDEROOT.'/'.$val);
+ foreach ($sonDir as $kk => $vv) {
+ $vv = trim(str_replace(DEDEROOT.'/', '', $vv));
+ $allPath[$vv] = array(
+ 'read' => true, //读取
+ 'write' => false, //写入
+ 'execute' => false //执行
+ );
+ }
+ }
+ //所有js建议只读
+ $jsDir = array(
+ '/images',
+ '/templets',
+ '/include'
+ );
+ foreach ($jsDir as $k => $v) {
+ $jsfiles = preg_ls(DEDEROOT.$v, TRUE, "/.*\.(js)$/i");
+ foreach ($jsfiles as $k => $v) {
+ $vv = trim(str_replace(DEDEROOT.'/', '/', $v));
+ $allPath[$vv] = array(
+ 'read' => true, //读取
+ 'write' => false, //写入
+ 'execute' => false //执行
+ );
+ }
+ }
+ ?>
+
+
+ 系统运行目录权限检测 返回主页 帮助说明
+
+ 说明:本程序用于检测DedeBIZ站点所涉及的目录权限,并且提供一个全面的检测说明,您可以根据检测报告来配置站点以保证站点更为安全
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/dede/tpl.php b/src/admin/tpl.php
old mode 100755
new mode 100644
similarity index 90%
rename from src/dede/tpl.php
rename to src/admin/tpl.php
index 93589b68..892dc60c
--- a/src/dede/tpl.php
+++ b/src/admin/tpl.php
@@ -1,5 +1,4 @@
CAttribute->Items,\$attlist);
extract(\$ctag->CAttribute->Items, EXTR_SKIP);
\$revalue = '';
-
//您需编写的代码,不能用echo之类语法,把最终返回值传给\$revalue
- //------------------------------------------------------
-
\$revalue = 'Hello Word!';
-
- //------------------------------------------------------
return \$revalue;
}
?".'>';
@@ -214,13 +208,14 @@ function lib_demotag(&\$ctag,&\$refObj)
/*---------------------------
function savetagfile() { }
保存标签碎片修改
---------------------------*/ else if ($action == 'savetagfile') {
+--------------------------*/
+else if ($action == 'savetagfile') {
CheckCSRF();
if (!preg_match("#^[a-z0-9_-]{1,}\.lib\.php$#i", $filename)) {
ShowMsg('文件名不合法,不允许进行操作', '-1');
exit();
}
- require_once(DEDEINC.'/oxwindow.class.php');
+ require_once(DEDEINC.'/libraries/oxwindow.class.php');
$tagname = preg_replace("#\.lib\.php$#i", "", $filename);
$content = stripslashes($content);
$truefile = DEDEINC.'/taglib/'.$filename;
@@ -230,9 +225,9 @@ function savetagfile() { }
$msg = "
- 测试标签: (需要使用环境变量的不能在此测试)
- {dede:{$tagname} }{/dede:{$tagname}}
-
+ 测试标签: (需要使用环境变量的不能在此测试)
+ {dede:{$tagname} }{/dede:{$tagname}}
+
";
$wintitle = "成功修改/创建文件";
@@ -243,4 +238,4 @@ function savetagfile() { }
$winform = $win->GetWindow("hand", " ", false);
$win->Display();
exit();
-}
+}
\ No newline at end of file
diff --git a/src/dede/vote_add.php b/src/admin/vote_add.php
old mode 100755
new mode 100644
similarity index 96%
rename from src/dede/vote_add.php
rename to src/admin/vote_add.php
index caec47d9..29520729
--- a/src/dede/vote_add.php
+++ b/src/admin/vote_add.php
@@ -1,80 +1,76 @@
-".${"voteitem".$i}."\r\n";
- }
- }
- $inQuery = "INSERT INTO `#@__vote`(votename,starttime,endtime,totalcount,ismore,votenote,isallow,view,spec,isenable)
- VALUES('$votename','$starttime','$endtime','0','$ismore','$voteitems','$isallow','$view','$spec','$isenable'); ";
- if (!$dsql->ExecuteNoneQuery($inQuery)) {
- ShowMsg("增加投票失败,请检查数据是否非法", "-1");
- exit();
- }
- $aid = $dsql->GetLastID();
- $vt = new DedeVote($aid);
- $vote_content = $vt->GetVoteForm();
- $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义
- $vote_content = 'document.write("'.$vote_content.'");';
-
- $vote_file = DEDEDATA."/vote/vote_".$aid.".js";
- file_put_contents($vote_file, $vote_content);
- ShowMsg("成功增加一组投票", "vote_main.php");
- exit();
-} else if ($dopost == "save" && $isarc == 1) {
- $starttime = GetMkTime($starttime);
- $endtime = GetMkTime($endtime);
- $voteitems = "";
-
- $j = 0;
- for ($i = 1; $i <= 15; $i++) {
- if (!empty(${"voteitem".$i})) {
- $j++;
- $voteitems .= "".${"voteitem".$i}." \r\n";
- }
- }
- $inQuery = "INSERT INTO `#@__vote`(votename,starttime,endtime,totalcount,ismore,votenote,isallow,view,spec,isenable)
- VALUES('$votename','$starttime','$endtime','0','$ismore','$voteitems','$isallow','$view','$spec','$isenable'); ";
- if (!$dsql->ExecuteNoneQuery($inQuery)) {
- ShowMsg("增加投票失败,请检查数据是否非法", "-1");
- exit();
- }
- $aid = $dsql->GetLastID();
- $vt = new DedeVote($aid);
- $vote_content = $vt->GetVoteForm();
- $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义
- $vote_content = 'document.write("'.$vote_content.'");';
-
- $vote_file = DEDEDATA."/vote/vote_".$aid.".js";
- file_put_contents($vote_file, $vote_content);
- ShowMsg("成功增加一组投票", "vote_main.php?issel=1&aid=".$aid);
- exit();
-}
-$startDay = time();
-$endDay = AddDay($startDay, 30);
-$startDay = GetDateTimeMk($startDay);
-$endDay = GetDateTimeMk($endDay);
-include DedeInclude('templets/vote_add.htm');
+".${"voteitem".$i}."\r\n";
+ }
+ }
+ $inQuery = "INSERT INTO `#@__vote`(votename,starttime,endtime,totalcount,ismore,votenote,isallow,view,spec,isenable)
+ VALUES('$votename','$starttime','$endtime','0','$ismore','$voteitems','$isallow','$view','$spec','$isenable'); ";
+ if (!$dsql->ExecuteNoneQuery($inQuery)) {
+ ShowMsg("增加投票失败,请检查数据是否非法", "-1");
+ exit();
+ }
+ $aid = $dsql->GetLastID();
+ $vt = new DedeVote($aid);
+ $vote_content = $vt->GetVoteForm();
+ $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义
+ $vote_content = 'document.write("'.$vote_content.'");';
+ $vote_file = DEDEDATA."/vote/vote_".$aid.".js";
+ file_put_contents($vote_file, $vote_content);
+ ShowMsg("成功增加一组投票", "vote_main.php");
+ exit();
+} else if ($dopost == "save" && $isarc == 1) {
+ $starttime = GetMkTime($starttime);
+ $endtime = GetMkTime($endtime);
+ $voteitems = "";
+ $j = 0;
+ for ($i = 1; $i <= 15; $i++) {
+ if (!empty(${"voteitem".$i})) {
+ $j++;
+ $voteitems .= "".${"voteitem".$i}." \r\n";
+ }
+ }
+ $inQuery = "INSERT INTO `#@__vote`(votename,starttime,endtime,totalcount,ismore,votenote,isallow,view,spec,isenable)
+ VALUES('$votename','$starttime','$endtime','0','$ismore','$voteitems','$isallow','$view','$spec','$isenable'); ";
+ if (!$dsql->ExecuteNoneQuery($inQuery)) {
+ ShowMsg("增加投票失败,请检查数据是否非法", "-1");
+ exit();
+ }
+ $aid = $dsql->GetLastID();
+ $vt = new DedeVote($aid);
+ $vote_content = $vt->GetVoteForm();
+ $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义
+ $vote_content = 'document.write("'.$vote_content.'");';
+
+ $vote_file = DEDEDATA."/vote/vote_".$aid.".js";
+ file_put_contents($vote_file, $vote_content);
+ ShowMsg("成功增加一组投票", "vote_main.php?issel=1&aid=".$aid);
+ exit();
+}
+$startDay = time();
+$endDay = AddDay($startDay, 30);
+$startDay = GetDateTimeMk($startDay);
+$endDay = GetDateTimeMk($endDay);
+include DedeInclude('templets/vote_add.htm');
\ No newline at end of file
diff --git a/src/dede/vote_edit.php b/src/admin/vote_edit.php
old mode 100755
new mode 100644
similarity index 90%
rename from src/dede/vote_edit.php
rename to src/admin/vote_edit.php
index 855129b2..3b9e7813
--- a/src/dede/vote_edit.php
+++ b/src/admin/vote_edit.php
@@ -1,64 +1,60 @@
-ExecuteNoneQuery("DELETE FROM `#@__vote` WHERE aid='$aid'")) {
- if ($dsql->ExecuteNoneQuery("DELETE FROM `#@__vote_member` WHERE voteid='$aid'")) {
- ShowMsg('成功删除一组投票!', $ENV_GOBACK_URL);
- exit;
- }
- } else {
- ShowMsg('指定删除投票不存在!', $ENV_GOBACK_URL);
- exit;
- }
-} else if ($dopost == "saveedit") {
- CheckCSRF();
- $starttime = GetMkTime($starttime);
- $endtime = GetMkTime($endtime);
- $query = "UPDATE `#@__vote` SET votename='$votename',
- starttime='$starttime',
- endtime='$endtime',
- totalcount='$totalcount',
- ismore='$ismore',
- votenote='$votenote',
- isallow='$isallow',
- view='$view',
- spec='$spec',
- isenable='$isenable'
- WHERE aid='$aid'
- ";
- if ($dsql->ExecuteNoneQuery($query)) {
- $vt = new DedeVote($aid);
- $vote_file = DEDEDATA."/vote/vote_".$aid.".js";
- $vote_content = $vt->GetVoteForm();
- $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义
- $vote_content = 'document.write("'.$vote_content.'");';
- file_put_contents($vote_file, $vote_content);
- ShowMsg('成功更改一组投票!', $ENV_GOBACK_URL);
- } else {
- ShowMsg('更改一组投票失败!', $ENV_GOBACK_URL);
- }
-} else {
- $row = $dsql->GetOne("SELECT * FROM #@__vote WHERE aid='$aid'");
- if (!is_array($row)) {
- ShowMsg('指定投票不存在', '-1');
- exit();
- }
- include DedeInclude('templets/vote_edit.htm');
-}
+ExecuteNoneQuery("DELETE FROM `#@__vote` WHERE aid='$aid'")) {
+ if ($dsql->ExecuteNoneQuery("DELETE FROM `#@__vote_member` WHERE voteid='$aid'")) {
+ ShowMsg('成功删除一组投票!', $ENV_GOBACK_URL);
+ exit;
+ }
+ } else {
+ ShowMsg('指定删除投票不存在!', $ENV_GOBACK_URL);
+ exit;
+ }
+} else if ($dopost == "saveedit") {
+ CheckCSRF();
+ $starttime = GetMkTime($starttime);
+ $endtime = GetMkTime($endtime);
+ $query = "UPDATE `#@__vote` SET votename='$votename',
+ starttime='$starttime',
+ endtime='$endtime',
+ totalcount='$totalcount',
+ ismore='$ismore',
+ votenote='$votenote',
+ isallow='$isallow',
+ view='$view',
+ spec='$spec',
+ isenable='$isenable'
+ WHERE aid='$aid'";
+ if ($dsql->ExecuteNoneQuery($query)) {
+ $vt = new DedeVote($aid);
+ $vote_file = DEDEDATA."/vote/vote_".$aid.".js";
+ $vote_content = $vt->GetVoteForm();
+ $vote_content = preg_replace(array("#/#", "#([\r\n])[\s]+#"), array("\/", " "), $vote_content); //取出内容中的空白字符并进行转义
+ $vote_content = 'document.write("'.$vote_content.'");';
+ file_put_contents($vote_file, $vote_content);
+ ShowMsg('成功修改一组投票!', $ENV_GOBACK_URL);
+ } else {
+ ShowMsg('修改一组投票失败!', $ENV_GOBACK_URL);
+ }
+} else {
+ $row = $dsql->GetOne("SELECT * FROM #@__vote WHERE aid='$aid'");
+ if (!is_array($row)) {
+ ShowMsg('指定投票不存在', '-1');
+ exit();
+ }
+ include DedeInclude('templets/vote_edit.htm');
+}
\ No newline at end of file
diff --git a/src/dede/vote_getcode.php b/src/admin/vote_getcode.php
old mode 100755
new mode 100644
similarity index 87%
rename from src/dede/vote_getcode.php
rename to src/admin/vote_getcode.php
index c9accd49..b7c9d076
--- a/src/dede/vote_getcode.php
+++ b/src/admin/vote_getcode.php
@@ -1,15 +1,14 @@
-SetParameter('issel', $issel);
- $dlist->SetTemplet(DEDEADMIN."/templets/vote_select.htm");
-} else {
- $dlist->SetTemplet(DEDEADMIN."/templets/vote_main.htm");
-}
-$dlist->SetSource($sql);
-$dlist->display();
+SetParameter('issel', $issel);
+ $dlist->SetTemplet(DEDEADMIN."/templets/vote_select.htm");
+} else {
+ $dlist->SetTemplet(DEDEADMIN."/templets/vote_main.htm");
+}
+$dlist->SetSource($sql);
+$dlist->display();
diff --git a/src/plus/ad_js.php b/src/apps/ad_js.php
similarity index 89%
rename from src/plus/ad_js.php
rename to src/apps/ad_js.php
index 02c104aa..f6bbeb4c 100755
--- a/src/plus/ad_js.php
+++ b/src/apps/ad_js.php
@@ -1,5 +1,4 @@
$cfg_puccache_time) {
diff --git a/src/plus/advancedsearch.php b/src/apps/advancedsearch.php
similarity index 96%
rename from src/plus/advancedsearch.php
rename to src/apps/advancedsearch.php
index 7421ea21..e0eee7ef 100755
--- a/src/plus/advancedsearch.php
+++ b/src/apps/advancedsearch.php
@@ -1,5 +1,4 @@
".$row['image']."";
$row['fulltitle'] = $row['title'];
$row['title'] = cn_substr($row['title'],$titlelen);
- if($row['color']!='') $row['title'] = "".$row['title']." ";
+ if($row['color']!='') $row['title'] = "".$row['title']." ";
if(preg_match('#b#', $row['flag'])) $row['title'] = "".$row['title']." ";
//$row['title'] = "".$row['title']." ";
diff --git a/src/plus/count.php b/src/apps/count.php
similarity index 94%
rename from src/plus/count.php
rename to src/apps/count.php
index 45b7a0af..5f9c3665 100755
--- a/src/plus/count.php
+++ b/src/apps/count.php
@@ -1,5 +1,4 @@
200,
"data" => array(
@@ -100,7 +99,7 @@ if ($formurl == 'caicai') {
);
$digg = json_encode($result);
} else {
- // 兼容之前的老版本
+ //兼容之前的老版本
$digg = '
顶一下
('.$row['goodpost'].')
diff --git a/src/plus/disdls.php b/src/apps/disdls.php
similarity index 89%
rename from src/plus/disdls.php
rename to src/apps/disdls.php
index 898de7ce..250cda38 100755
--- a/src/plus/disdls.php
+++ b/src/apps/disdls.php
@@ -1,5 +1,4 @@
GetOne("SELECT SUM(downloads) AS totals FROM `#@__downloads` WHERE id='$aid' ");
if (empty($row['totals'])) $row['totals'] = 0;
diff --git a/src/plus/diy.php b/src/apps/diy.php
similarity index 91%
rename from src/plus/diy.php
rename to src/apps/diy.php
index c2ce5769..e6d3ea05 100755
--- a/src/plus/diy.php
+++ b/src/apps/diy.php
@@ -9,7 +9,7 @@
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/
-require_once(dirname(__FILE__)."/../include/common.inc.php");
+require_once(dirname(__FILE__)."/../system/common.inc.php");
$diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0;
$action = isset($action) && in_array($action, array('post', 'list', 'view')) ? $action : 'post';
$id = isset($id) && is_numeric($id) ? $id : 0;
@@ -17,7 +17,7 @@ if (empty($diyid)) {
showMsg('非法操作!', 'javascript:;');
exit();
}
-require_once DEDEINC.'/diyform.cls.php';
+require_once DEDEINC.'/diyform.class.php';
$diy = new diyform($diyid);
/*----------------------------
function Post(){ }
@@ -25,7 +25,7 @@ function Post(){ }
if ($action == 'post') {
if (empty($do)) {
$postform = $diy->getForm(true);
- include DEDEROOT."/templets/plus/{$diy->postTemplate}";
+ include DEDEROOT."/theme/plus/{$diy->postTemplate}";
exit();
} elseif ($do == 2) {
$dede_fields = empty($dede_fields) ? '' : trim($dede_fields);
@@ -103,7 +103,7 @@ else if ($action == 'list') {
$datalist->pageSize = 10;
$datalist->SetParameter('action', 'list');
$datalist->SetParameter('diyid', $diyid);
- $datalist->SetTemplate(DEDEINC."/../templets/plus/{$diy->listTemplate}");
+ $datalist->SetTemplate(DEDEINC."/../theme/plus/{$diy->listTemplate}");
$datalist->SetSource($query);
$fieldlist = $diy->getFieldList();
$datalist->Display();
@@ -128,5 +128,5 @@ else if ($action == 'list') {
exit();
}
$fieldlist = $diy->getFieldList();
- include DEDEROOT."/templets/plus/{$diy->viewTemplate}";
+ include DEDEROOT."/theme/plus/{$diy->viewTemplate}";
}
\ No newline at end of file
diff --git a/src/plus/download.php b/src/apps/download.php
similarity index 89%
rename from src/plus/download.php
rename to src/apps/download.php
index 167a97db..2c69b71b 100755
--- a/src/plus/download.php
+++ b/src/apps/download.php
@@ -1,5 +1,4 @@
ChannelFields)) {
ShowMsg('获取文档信息失败', '-1');
exit();
}
-
$vname = '';
foreach ($cu->ChannelFields as $k => $v) {
if ($v['type'] == 'softlinks') {
@@ -40,18 +35,17 @@ if ($open == 0) {
}
}
$row = $dsql->GetOne("SELECT $vname FROM `".$cu->ChannelInfos['addtable']."` WHERE aid='$aid'");
-
include_once(DEDEINC.'/taglib/channel/softlinks.lib.php');
$ctag = '';
$downlinks = ch_softlinks($row[$vname], $ctag, $cu, '', TRUE);
-
require_once(DEDETEMPLATE.'/plus/download_links_templet.htm');
exit();
}
/*------------------------
//提供软件给用户下载(旧模式)
function getSoft_old()
-------------------------*/ else if ($open == 1) {
+------------------------*/
+else if ($open == 1) {
//更新下载次数
$id = isset($id) && is_numeric($id) ? $id : 0;
$link = base64_decode(urldecode($link));
@@ -66,7 +60,6 @@ function getSoft_old()
$query = " INSERT INTO `#@__downloads`(`hash`,`id`,`downloads`) VALUES('$hash','$id',1); ";
$dsql->ExecNoneQuery($query);
}
-
$row = $dsql->GetOne("SELECT * FROM `#@__softconfig` ");
$sites = explode("\n", $row['sites']);
$allowed = array();
@@ -77,19 +70,18 @@ function getSoft_old()
$allowed[] = $domain['host'];
}
}
-
if (!in_array($linkinfo['host'], $allowed)) {
ShowMsg('非下载地址,禁止访问', 'javascript:;');
exit;
}
-
header("location:$link");
exit();
}
/*------------------------
//提供软件给用户下载(新模式)
function getSoft_new()
-------------------------*/ else if ($open == 2) {
+------------------------*/
+else if ($open == 2) {
$id = intval($id);
//获得附加表信息
$row = $dsql->GetOne("SELECT ch.addtable,arc.mid FROM `#@__arctiny` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel WHERE arc.id='$id' ");
@@ -98,7 +90,6 @@ function getSoft_new()
exit();
}
$mid = $row['mid'];
-
//读取连接列表、下载权限信息
$row = $dsql->GetOne("SELECT softlinks,daccess,needmoney FROM `{$row['addtable']}` WHERE aid='$id' ");
if (empty($row['softlinks'])) {
@@ -112,7 +103,6 @@ function getSoft_new()
$needRank = $row['daccess'];
$needMoney = $row['needmoney'];
}
-
//分析连接列表
require_once(DEDEINC.'/dedetag.class.php');
$softUrl = '';
@@ -160,16 +150,13 @@ function getSoft_new()
ShowMsg('找不到所需要的软件资源', 'javascript:;');
exit();
}
- //-------------------------
- // 读取文档信息,判断权限
- //-------------------------
+ //读取文档信息,判断权限
$arcRow = GetOneArchive($id);
if ($arcRow['aid'] == '') {
ShowMsg('无法获取未知文档的信息!', '-1');
exit();
}
extract($arcRow, EXTR_SKIP);
-
//处理需要下载权限的软件
if ($needRank > 0 || $needMoney > 0) {
require_once(DEDEINC.'/memberlogin.class.php');
@@ -178,7 +165,6 @@ function getSoft_new()
$arctitle = $title;
$arcLinktitle = "
".$arctitle." ";
$pubdate = GetDateTimeMk($pubdate);
-
//会员级别不足
if (($needRank > 1 && $cfg_ml->M_Rank < $needRank && $mid != $cfg_ml->M_ID)) {
$dsql->Execute('me', "SELECT * FROM `#@__arcrank` ");
@@ -187,11 +173,10 @@ function getSoft_new()
}
$memberTypes[0] = "游客";
$msgtitle = "您没有权限下载软件:{$arctitle}";
- $moremsg = "这个软件需要
".$memberTypes[$needRank]." 才能下载,您目前是:
".$memberTypes[$cfg_ml->M_Rank]." ";
+ $moremsg = "这个软件需要
".$memberTypes[$needRank]." 才能下载,您目前是:
".$memberTypes[$cfg_ml->M_Rank]." ";
include_once(DEDETEMPLATE.'/plus/view_msg.htm');
exit();
}
-
//以下为正常情况,自动扣点数
//如果文章需要金币,检查用户是否浏览过本文档
if ($needMoney > 0 && $mid != $cfg_ml->M_ID) {
@@ -202,7 +187,7 @@ function getSoft_new()
//没有足够的金币
if ($needMoney > $cfg_ml->M_Money || $cfg_ml->M_Money == '') {
$msgtitle = "您没有权限下载软件:{$arctitle}";
- $moremsg = "这个软件需要
".$needMoney." 金币 才能下载,您目前拥有金币:
".$cfg_ml->M_Money." 个 ";
+ $moremsg = "这个软件需要
".$needMoney." 金币 才能下载,您目前拥有金币:
".$cfg_ml->M_Money." 个 ";
include_once(DEDETEMPLATE.'/plus/view_msg.htm');
exit(0);
}
diff --git a/src/plus/erraddsave.php b/src/apps/erraddsave.php
similarity index 93%
rename from src/plus/erraddsave.php
rename to src/apps/erraddsave.php
index 5278c2c3..cf0add27 100755
--- a/src/plus/erraddsave.php
+++ b/src/apps/erraddsave.php
@@ -1,5 +1,4 @@
-1,
@@ -20,24 +18,20 @@ if ($cfg_feedback_forbid == 'Y') {
));
exit();
}
-
require_once(DEDEINC."/filter.inc.php");
if (!isset($action)) {
$action = '';
}
-
$msg = isset($msg) ? $msg : "";
$feedbacktype = isset($feedbacktype) ? $feedbacktype : "";
$validate = isset($validate) ? $validate : "";
$pwd = isset($pwd) ? $pwd : "";
$comtype = isset($comtype) ? $comtype : "";
$good = isset($good) ? intval($good) : 0;
-
$cfg_formmember = isset($cfg_formmember) ? true : false;
$ischeck = $cfg_feedbackcheck == 'Y' ? 0 : 1;
$aid = isset($aid) ? intval($aid) : 0;
-$fid = isset($fid) ? intval($fid) : 0; // 用来标记回复评论的变量
-
+$fid = isset($fid) ? intval($fid) : 0; //用来标记回复评论的变量
if (empty($aid) && empty($fid)) {
echo json_encode(array(
"code" => -1,
@@ -46,16 +40,12 @@ if (empty($aid) && empty($fid)) {
));
exit();
}
-
include_once(DEDEINC."/memberlogin.class.php");
$cfg_ml = new MemberLogin();
-
-
//查看评论
/*
function __ViewFeedback(){ }
*/
-//-----------------------------------
if ($action == '' || $action == 'show') {
//读取文档信息
$arcRow = GetOneArchive($aid);
@@ -67,7 +57,6 @@ if ($action == '' || $action == 'show') {
));
exit();
}
-
$where_sql = "WHERE 1=1";
if (!empty($fid)) {
$where_sql .= " AND fb.fid={$fid}";
@@ -75,22 +64,17 @@ if ($action == '' || $action == 'show') {
if (!empty($aid)) {
$where_sql .= " AND fb.aid={$aid}";
}
-
- // 调用20条热评
+ //调用20条热评
$querystring = "SELECT fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores,mb.sex FROM `#@__feedback` fb
LEFT JOIN `#@__member` mb on mb.mid = fb.mid $where_sql AND fb.ischeck='1' ORDER BY fb.good DESC";
-
$dsql->Execute('fb', $querystring." LIMIT 20 ");
-
$data = array();
-
while ($row = $dsql->GetArray('fb')) {
$row['face'] = empty($row['mface']) ? $GLOBALS['cfg_cmspath'].'/static/img/avatar.png' : $row['mface'];
$row['dtimestr'] = MyDate('Y-m-d', $row['dtime']);
unset($row['ip']);
$data[] = $row;
}
-
echo json_encode(array(
"code" => 200,
"msg" => "",
@@ -99,10 +83,10 @@ if ($action == '' || $action == 'show') {
exit;
}
//发表评论
-//------------------------------------
/*
function __SendFeedback(){ }
-*/ else if ($action == 'send') {
+*/
+else if ($action == 'send') {
//读取文档信息
$arcRow = GetOneArchive($aid);
if ((empty($arcRow['aid']) || $arcRow['notpost'] == '1') && empty($fid)) {
@@ -113,12 +97,11 @@ function __SendFeedback(){ }
));
exit();
}
-
//如果没有登录,则需要检查验证码
if (!$cfg_ml->IsLogin()) {
if ($feedbacktype === 'good') {
- // 未登录点good不进行数据库记录
+ //未登录点good不进行数据库记录
echo json_encode(array(
"code" => 200,
"msg" => "",
@@ -128,7 +111,7 @@ function __SendFeedback(){ }
}
$svali = GetCkVdValue();
if (strtolower($validate) != $svali || $svali == '') {
- // ResetVdValue();
+ //ResetVdValue();
echo json_encode(array(
"code" => -1,
"msg" => "验证码错误",
@@ -137,13 +120,10 @@ function __SendFeedback(){ }
exit();
}
}
-
-
//检查用户登录
if (empty($notuser)) {
$notuser = 0;
}
-
if ($cfg_feedback_guest == 'N' && $cfg_ml->M_ID < 1) {
echo json_encode(array(
"code" => -1,
@@ -152,17 +132,14 @@ function __SendFeedback(){ }
));
exit();
}
-
//匿名发表评论
if ($notuser == 1) {
$username = $cfg_ml->M_ID > 0 ? '匿名' : '游客';
}
-
//已登录的用户
else if ($cfg_ml->M_ID > 0) {
$username = $cfg_ml->M_UserName;
}
-
//用户身份验证
else {
if ($username != '' && $pwd != '') {
@@ -178,7 +155,6 @@ function __SendFeedback(){ }
}
$ip = GetIP();
$dtime = time();
-
//检查评论间隔时间;
if (!empty($cfg_feedback_time)) {
//检查最后发表评论时间,如果未登录判断当前IP最后评论时间
@@ -198,7 +174,6 @@ function __SendFeedback(){ }
exit();
}
}
-
if (empty($face)) {
$face = 0;
}
@@ -207,11 +182,9 @@ function __SendFeedback(){ }
extract($arcRow, EXTR_SKIP);
$msg = cn_substrR(TrimMsg($msg), $cfg_feedback_msglen);
$username = cn_substrR(HtmlReplace($username, 2), 20);
-
if (empty($feedbacktype) || !in_array($feedbacktype, array('good', 'bad'))) {
$feedbacktype = 'feedback';
}
-
//保存评论内容
if ($comtype == 'comments' || $comtype == 'reply') {
$arctitle = empty($title) ? "" : addslashes($title);
@@ -220,7 +193,7 @@ function __SendFeedback(){ }
$feedbacktype = preg_replace("#[^0-9a-z]#i", "", $feedbacktype);
if ($msg != '') {
$inquery = "INSERT INTO `#@__feedback`(`aid`,`typeid`,`fid`, `username`,`arctitle`,`ip`,`ischeck`,`dtime`, `mid`,`bad`,`good`,`ftype`,`face`,`msg`)
- VALUES ('$aid','$typeid','$fid','$username','$arctitle','$ip','$ischeck','$dtime', '{$cfg_ml->M_ID}','0','0','$feedbacktype','$face','$msg'); ";
+ VALUES ('$aid','$typeid','$fid','$username','$arctitle','$ip','$ischeck','$dtime', '{$cfg_ml->M_ID}','0','0','$feedbacktype','$face','$msg'); ";
$rs = $dsql->ExecuteNoneQuery($inquery);
if (!$rs) {
echo json_encode(array(
@@ -233,12 +206,10 @@ function __SendFeedback(){ }
}
}
}
-
if ($feedbacktype == 'bad') {
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET scores=scores-{cfg_feedback_sub},badpost=badpost+1,lastpost='$dtime' WHERE id='$aid' ");
} else if ($feedbacktype == 'good') {
$row = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__feedback_goodbad` WHERE fid={$fid} AND mid={$cfg_ml->M_ID} AND fgtype=0");
-
if (intval($row['dd']) <= 0) {
$dsql->ExecuteNoneQuery("INSERT INTO `#@__feedback_goodbad` (`mid`, `fid`, `fgtype`) VALUES ('$cfg_ml->M_ID', '$fid', '0');");
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET scores=scores+{$cfg_feedback_add},goodpost=goodpost+1,lastpost='$dtime' WHERE id='$aid' ");
@@ -246,7 +217,6 @@ function __SendFeedback(){ }
$dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback_goodbad` WHERE mid='{$cfg_ml->M_ID}' AND fid={$fid} AND fgtype=0");
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET scores=scores-{$cfg_feedback_add},goodpost=goodpost-1,lastpost='$dtime' WHERE id='$aid' ");
}
-
$rr = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__feedback_goodbad` WHERE fid={$fid}");
$dsql->ExecuteNoneQuery("UPDATE `#@__feedback` SET good='{$rr['dd']}' WHERE id={$fid}");
echo json_encode(array(
@@ -266,7 +236,6 @@ function __SendFeedback(){ }
$row = $dsql->GetOne("SELECT COUNT(*) AS nums FROM `#@__feedback` WHERE `mid`='".$cfg_ml->M_ID."'");
$dsql->ExecuteNoneQuery("UPDATE `#@__member_tj` SET `feedback`='$row[nums]' WHERE `mid`='".$cfg_ml->M_ID."'");
}
-
$_SESSION['sedtime'] = time();
if (empty($uid) && isset($cmtuser)) $uid = $cmtuser;
if ($ischeck == 0) {
@@ -283,4 +252,4 @@ function __SendFeedback(){ }
));
}
exit();
-}
+}
\ No newline at end of file
diff --git a/src/plus/flink.php b/src/apps/flink.php
similarity index 92%
rename from src/plus/flink.php
rename to src/apps/flink.php
index 76926ac7..94208230 100755
--- a/src/plus/flink.php
+++ b/src/apps/flink.php
@@ -1,5 +1,4 @@
Display();
+$fl->Display();
\ No newline at end of file
diff --git a/src/plus/heightsearch.php b/src/apps/heightsearch.php
similarity index 70%
rename from src/plus/heightsearch.php
rename to src/apps/heightsearch.php
index 899b3bd3..72d1e4d0 100755
--- a/src/plus/heightsearch.php
+++ b/src/apps/heightsearch.php
@@ -1,5 +1,4 @@
GetOne("SELECT tp.id,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.channeltype='$channelid' And tp.reid=0 order by sortrank asc");
if (!is_array($tinfos)) die(" No catalogs in the channel! ");
$tid = $tinfos['id'];
} else {
$tinfos = $dsql->GetOne("SELECT ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$tid' ");
}
-
if ($tinfos['issystem'] == -1) {
$nativeplace = ((empty($nativeplace) || !is_numeric($nativeplace)) ? 0 : $nativeplace);
$infotype = ((empty($infotype) || !is_numeric($infotype)) ? 0 : $infotype);
@@ -40,10 +31,10 @@ if ($tinfos['issystem'] == -1) {
if (!empty($nativeplace)) $cArr['nativeplace'] = $nativeplace;
if (!empty($infotype)) $cArr['infotype'] = $infotype;
if (!empty($keyword)) $cArr['keyword'] = $keyword;
- include(DEDEINC."/arc.sglistview.class.php");
+ include(DEDEINC."/archive/sglistview.class.php");
$lv = new SgListView($tid, $cArr);
} else {
- include(DEDEINC."/arc.listview.class.php");
+ include(DEDEINC."/archive/listview.class.php");
$lv = new ListView($tid);
//对设置了会员级别的栏目进行处理
if (isset($lv->Fields['corank']) && $lv->Fields['corank'] > 0) {
@@ -56,17 +47,15 @@ if ($tinfos['issystem'] == -1) {
}
$memberTypes[0] = "游客或没权限会员";
$msgtitle = "您没有权限浏览栏目:{$lv->Fields['typename']} ";
- $moremsg = "这个栏目需要
".$memberTypes[$lv->Fields['corank']]." 才能访问,您目前是:
".$memberTypes[$cfg_ml->M_Rank]." ";
+ $moremsg = "这个栏目需要
".$memberTypes[$lv->Fields['corank']]." 才能访问,您目前是:
".$memberTypes[$cfg_ml->M_Rank]." ";
include_once(DEDETEMPLATE.'/plus/view_msg_catalog.htm');
exit();
}
}
}
-
if ($lv->IsError) ParamError();
-
$lv->Display();
if (DEBUG_LEVEL === TRUE) {
$queryTime = ExecTime() - $t1;
echo "
页面加载总消耗时间:{$queryTime}
\r\n";
-}
+}
\ No newline at end of file
diff --git a/src/plus/mytag_js.php b/src/apps/mytag_js.php
similarity index 91%
rename from src/plus/mytag_js.php
rename to src/apps/mytag_js.php
index 3cd09b9e..09642a7c 100755
--- a/src/plus/mytag_js.php
+++ b/src/apps/mytag_js.php
@@ -1,5 +1,4 @@
debug = false;
$smtp->sendmail($email, $cfg_webname, $cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype);
diff --git a/src/plus/rss.php b/src/apps/rss.php
similarity index 63%
rename from src/plus/rss.php
rename to src/apps/rss.php
index 3b3d5dd6..d137de89 100755
--- a/src/plus/rss.php
+++ b/src/apps/rss.php
@@ -1,5 +1,4 @@
Display();
+$rv->Display();
\ No newline at end of file
diff --git a/src/plus/search.php b/src/apps/search.php
similarity index 87%
rename from src/plus/search.php
rename to src/apps/search.php
index a5bd28cc..1de515e0 100755
--- a/src/plus/search.php
+++ b/src/apps/search.php
@@ -1,5 +1,4 @@
');
fclose($fp);
}
- //引入栏目缓存并看关键字是否有相关栏目内容
+ //引入栏目缓存并看关键词是否有相关栏目内容
require_once($typenameCacheFile);
if (isset($typeArr) && is_array($typeArr)) {
foreach ($typeArr as $id => $typename) {
@@ -62,27 +54,20 @@ if (empty($typeid)) {
}
}
}
-
$keyword = addslashes(cn_substr($keyword, 30));
$typeid = intval($typeid);
-
if ($cfg_notallowstr != '' && preg_match("#".$cfg_notallowstr."#i", $keyword)) {
- ShowMsg("您的搜索关键字中存在非法内容,被系统禁止", "-1");
+ ShowMsg("您的搜索关键词中存在非法内容,被系统禁止", "-1");
exit();
}
-
if (($keyword == '' || strlen($keyword) < 2) && empty($typeid)) {
- ShowMsg('关键字不能小于2个字节', '-1');
+ ShowMsg('关键词不能小于2个字节', '-1');
exit();
}
-
//检查搜索间隔时间
-
$ip = GetIP();
$now = time();
-
$row = $dsql->GetOne("SELECT * FROM `#@__search_limits` WHERE ip='{$ip}'");
-
if (is_array($row)) {
if (($now - $row['searchtime']) < $cfg_search_time) {
ShowMsg('管理员设定搜索时间间隔为'.$cfg_search_time.'秒,请稍后再试', '-1');
@@ -92,7 +77,6 @@ if (is_array($row)) {
} else {
$dsql->ExecuteNoneQuery("INSERT INTO `#@__search_limits` (`ip`, `searchtime`) VALUES ('{$ip}', '{$now}');");
}
-
//开始时间
if (empty($starttime)) $starttime = -1;
else {
@@ -102,9 +86,7 @@ else {
$starttime = time() - ($starttime * $dayst);
}
}
-
$t1 = ExecTime();
-
$sp = new SearchView($typeid, $keyword, $orderby, $channeltype, $searchtype, $starttime, $pagesize, $kwtype, $mid);
$keyword = $oldkeyword;
$sp->Display();
diff --git a/src/plus/showphoto.php b/src/apps/showphoto.php
similarity index 93%
rename from src/plus/showphoto.php
rename to src/apps/showphoto.php
index f65222eb..4d891f44 100755
--- a/src/plus/showphoto.php
+++ b/src/apps/showphoto.php
@@ -1,5 +1,4 @@
6) exit("art_shortname too long!");
$specfile = dirname(__FILE__)."spec_1".$art_shortname;
//如果已经编译静态列表,则直接引入第一个文件
@@ -19,4 +17,4 @@ if (file_exists($specfile)) {
} else {
$sp = new SpecView();
$sp->Display();
-}
+}
\ No newline at end of file
diff --git a/src/plus/stow.php b/src/apps/stow.php
similarity index 93%
rename from src/plus/stow.php
rename to src/apps/stow.php
index 5c7c19ed..f6fcde85 100755
--- a/src/plus/stow.php
+++ b/src/apps/stow.php
@@ -1,5 +1,4 @@
Display();
-exit();
+exit();
\ No newline at end of file
diff --git a/src/plus/vdimgck.php b/src/apps/vdimgck.php
similarity index 84%
rename from src/plus/vdimgck.php
rename to src/apps/vdimgck.php
index 9055812b..4322be5d 100755
--- a/src/plus/vdimgck.php
+++ b/src/apps/vdimgck.php
@@ -1,5 +1,4 @@
20,
'img_height' => $safe_wheight,
- 'word_type' => (int)$safe_codetype, // 1:数字 2:英文 3:单词
+ 'word_type' => (int)$safe_codetype,
'img_width' => $safe_wwidth,
'use_boder' => TRUE,
'font_file' => DEDEINC.'/data/fonts/'.mt_rand(1, 6).'.ttf',
'wordlist_file' => DEDEINC.'/data/words/words.txt',
'filter_type' => 5
);
-
$enkey = substr(md5(substr($cfg_cookie_encode, 0, 5)), 0, 10);
$sessSavePath = DEDEDATA."/sessions_{$enkey}";
if (!is_dir($sessSavePath)) mkdir($sessSavePath);
-
-// Session保存路径
-
+//Session保存路径
if (is_writeable($sessSavePath) && is_readable($sessSavePath)) {
session_save_path($sessSavePath);
}
if (!empty($cfg_domain_cookie)) session_set_cookie_params(0, '/', $cfg_domain_cookie);
-
if (!echo_validate_image($config)) {
- // 如果不成功则初始化一个默认验证码
+ //如果不成功则初始化一个默认验证码
@session_start();
$_SESSION['securimage_code_value'] = strtolower('abcd');
if (function_exists('imagecreatefromjpeg')) {
@@ -56,15 +51,12 @@ if (!echo_validate_image($config)) {
echo $c;
}
}
-
function echo_validate_image($config = array())
{
@session_start();
-
if (!function_exists('imagettftext')) {
return false;
}
-
//主要参数
$font_size = isset($config['font_size']) ? $config['font_size'] : 14;
$img_height = isset($config['img_height']) ? $config['img_height'] : 38;
@@ -72,19 +64,15 @@ function echo_validate_image($config = array())
$font_file = isset($config['font_file']) ? $config['font_file'] : DEDEINC.'/data/font/'.mt_rand(1, 6).'.ttf';
$use_boder = isset($config['use_boder']) ? $config['use_boder'] : TRUE;
$filter_type = isset($config['filter_type']) ? $config['filter_type'] : 0;
-
//创建图片,并设置背景色
$im = @imagecreate($img_width, $img_height);
-
imagecolorallocate($im, mt_rand(200, 255), mt_rand(200, 255), mt_rand(200, 255));
-
//文字随机颜色
$fontColor[] = imagecolorallocate($im, 0x15, 0x15, 0x15);
$fontColor[] = imagecolorallocate($im, 0x95, 0x1e, 0x04);
$fontColor[] = imagecolorallocate($im, 0x93, 0x14, 0xa9);
$fontColor[] = imagecolorallocate($im, 0x12, 0x81, 0x0a);
$fontColor[] = imagecolorallocate($im, 0x06, 0x3a, 0xd5);
-
//获取随机字符
$rndstring = '';
if ($config['word_type'] != 3) {
@@ -107,35 +95,20 @@ function echo_validate_image($config = array())
$rndstring .= $chars[mt_rand(0, $max)];
}
}
-
$_SESSION['securimage_code_value'] = strtolower($rndstring);
-
$rndcodelen = strlen($rndstring);
-
- // //背景横线
- // $lineColor1 = imagecolorallocate($im, 0xda, 0xd9, 0xd1);
- // for ($j = 3; $j <= $img_height - 3; $j = $j + 3) {
- // imageline($im, 2, $j, $img_width - 2, $j, $lineColor1);
- // }
-
- // //背景竖线
- // $lineColor2 = imagecolorallocate($im, 0xda, 0xd9, 0xd1);
- // for ($j = 2; $j < 100; $j = $j + 6) {
- // imageline($im, $j, 0, $j + 8, $img_height, $lineColor2);
- // }
-
- // 增加一些噪线
+ //增加一些噪线
for ($i = 0; $i < 5; $i++) {
$red = mt_rand(50, 255);
$green = mt_rand(50, 255);
$blue = mt_rand(50, 255);
$tcol = imagecolorallocate($im, $red, $green, $blue);
- if (mt_rand(0, 1)) { // Horizontal
+ if (mt_rand(0, 1)) { //Horizontal
$Xa = mt_rand(0, $img_width / 2);
$Ya = mt_rand(0, $img_height);
$Xb = mt_rand($img_width / 2, $img_width);
$Yb = mt_rand(0, $img_height);
- } else { // Vertical
+ } else { //Vertical
$Xa = mt_rand(0, $img_width);
$Ya = mt_rand(0, $img_height / 2);
$Xb = mt_rand(0, $img_width);
@@ -144,14 +117,11 @@ function echo_validate_image($config = array())
imagesetthickness($im, mt_rand(1, 3));
imageline($im, $Xa, $Ya, $Xb, $Yb, $tcol);
}
-
-
//画边框
if ($use_boder && $filter_type == 0) {
$bordercolor = imagecolorallocate($im, 0x9d, 0x9e, 0x96);
imagerectangle($im, 0, 0, $img_width - 1, $img_height - 1, $bordercolor);
}
-
//输出文字
$lastc = '';
for ($i = 0; $i < $rndcodelen; $i++) {
@@ -162,7 +132,6 @@ function echo_validate_image($config = array())
@imagettftext($im, $font_size, $c, $y_pos, 28, $c_fontColor, $font_file, $rndstring[$i]);
$lastc = $rndstring[$i];
}
-
//图象效果
switch ($filter_type) {
case 1:
@@ -177,14 +146,9 @@ function echo_validate_image($config = array())
default:
break;
}
-
header("Pragma:no-cache\r\n");
header("Cache-Control:no-cache\r\n");
header("Expires:0\r\n");
-
- //输出特定类型的图片格式,优先级为 gif -> jpg ->png
- //dump(function_exists("imagejpeg"));
-
if (function_exists("imagejpeg")) {
header("content-type:image/jpeg\r\n");
imagejpeg($im);
@@ -194,4 +158,4 @@ function echo_validate_image($config = array())
}
imagedestroy($im);
exit();
-}
+}
\ No newline at end of file
diff --git a/src/plus/view.php b/src/apps/view.php
similarity index 78%
rename from src/plus/view.php
rename to src/apps/view.php
index 9786ccd4..287dfa6d 100755
--- a/src/plus/view.php
+++ b/src/apps/view.php
@@ -1,5 +1,4 @@
IsError) ParamError();
-
-
//检查阅读权限
$needMoney = $arc->Fields['money'];
$needRank = $arc->Fields['arcrank'];
-
require_once(DEDEINC.'/memberlogin.class.php');
$cfg_ml = new MemberLogin();
-
if ($needRank < 0 && $arc->Fields['mid'] != $cfg_ml->M_ID) {
ShowMsg('文章尚未审核,非作者本人无权查看!', 'javascript:;');
exit();
}
-
//设置了权限限制的文章
//arctitle msgtitle moremsg
if ($needMoney > 0 || $needRank > 1) {
$arctitle = $arc->Fields['title'];
- /*
- $arclink = GetFileUrl($arc->ArcID,$arc->Fields["typeid"],$arc->Fields["senddate"],
- $arc->Fields["title"],$arc->Fields["ismake"],$arc->Fields["arcrank"]);
- */
$arclink = $cfg_phpurl.'/view.php?aid='.$arc->ArcID;
$arcLinktitle = "
".$arctitle." ";
-
$description = $arc->Fields["description"];
$pubdate = GetDateTimeMk($arc->Fields["pubdate"]);
-
//会员级别不足
if (($needRank > 1 && $cfg_ml->M_Rank < $needRank && $arc->Fields['mid'] != $cfg_ml->M_ID)) {
$dsql->Execute('me', "SELECT * FROM `#@__arcrank` ");
@@ -64,11 +48,10 @@ if ($needMoney > 0 || $needRank > 1) {
}
$memberTypes[0] = "游客或没权限会员";
$msgtitle = "您没有权限浏览文档:{$arctitle} ";
- $moremsg = "这篇文档需要
".$memberTypes[$needRank]." 才能访问,您目前是:
".$memberTypes[$cfg_ml->M_Rank]." ";
+ $moremsg = "这篇文档需要
".$memberTypes[$needRank]." 才能访问,您目前是:
".$memberTypes[$cfg_ml->M_Rank]." ";
include_once(DEDETEMPLATE.'/plus/view_msg.htm');
exit();
}
-
//需要金币的情况
if ($needMoney > 0 && $arc->Fields['mid'] != $cfg_ml->M_ID) {
$sql = "SELECT aid,money FROM `#@__member_operation` WHERE buyid='ARCHIVE".$aid."' AND mid='".$cfg_ml->M_ID."'";
@@ -77,7 +60,7 @@ if ($needMoney > 0 || $needRank > 1) {
if (!is_array($row)) {
if ($cfg_ml->M_Money == '' || $needMoney > $cfg_ml->M_Money) {
$msgtitle = "您没有权限浏览文档:{$arctitle} ";
- $moremsg = "这篇文档需要
".$needMoney." 金币 才能访问,您目前拥有金币:
".$cfg_ml->M_Money." 个 ";
+ $moremsg = "这篇文档需要
".$needMoney." 金币 才能访问,您目前拥有金币:
".$cfg_ml->M_Money." 个 ";
include_once(DEDETEMPLATE.'/plus/view_msg.htm');
$arc->Close();
exit();
@@ -91,7 +74,6 @@ if ($needMoney > 0 || $needRank > 1) {
showmsg('购买失败, 请返回', -1);
exit;
}
-
showmsg('购买成功,购买扣点不会重扣金币,谢谢', '/plus/view.php?aid='.$aid);
exit;
} else {
@@ -99,9 +81,8 @@ if ($needMoney > 0 || $needRank > 1) {
exit;
}
}
-
$msgtitle = "扣金币购买阅读";
- $moremsg = "阅读该文档内容需要付费
这篇文档需要
".$needMoney." 金币 才能访问,您目前拥有金币
".$cfg_ml->M_Money." 个
确认阅读请点 [
确认付点阅读 ]";
+ $moremsg = "阅读该文档内容需要付费
这篇文档需要
".$needMoney." 金币 才能访问,您目前拥有金币
".$cfg_ml->M_Money." 个
确认阅读请点 [
确认付点阅读 ]";
include_once($cfg_basedir.$cfg_templets_dir."/plus/view_msg.htm");
$arc->Close();
exit();
@@ -109,9 +90,8 @@ if ($needMoney > 0 || $needRank > 1) {
}
} //金币处理付处理
}
-
$arc->Display();
if (DEBUG_LEVEL === TRUE) {
$queryTime = ExecTime() - $t1;
echo "
页面加载总消耗时间:{$queryTime}
\r\n";
-}
+}
\ No newline at end of file
diff --git a/src/plus/vote.php b/src/apps/vote.php
similarity index 80%
rename from src/plus/vote.php
rename to src/apps/vote.php
index c4505e0d..8676ca46 100755
--- a/src/plus/vote.php
+++ b/src/apps/vote.php
@@ -1,5 +1,4 @@
M_LoginID;
$time = time();
$content = $memberID.'|'.$time;
$file = DEDEDATA.'/cache/vote_'.$aid.'_'.$member->M_ID.'.inc'; //存放会员投票记录的缓存文件
-
-$loginurl = $cfg_basehost."/member";
+$loginurl = $cfg_basehost."/user";
$ENV_GOBACK_URL = empty($_SERVER['HTTP_REFERER']) ? '' : $_SERVER['HTTP_REFERER'];
-
if (empty($dopost)) $dopost = '';
-
$aid = (isset($aid) && is_numeric($aid)) ? $aid : 0;
-if ($aid == 0) die(" Request Error! ");
+if ($aid == 0) die("dedebiz");
if ($aid == 0) {
ShowMsg("没指定投票项目的ID", "-1");
@@ -35,8 +30,6 @@ if ($aid == 0) {
}
$vo = new DedeVote($aid);
$rsmsg = '';
-
-
$row = $dsql->GetOne("SELECT * FROM `#@__vote` WHERE aid='$aid'");
//判断是否允许游客进行投票
if ($row['isallow'] == 1) {
@@ -45,28 +38,23 @@ if ($row['isallow'] == 1) {
exit();
}
}
-
if ($dopost == 'send') {
if (!empty($voteitem)) {
- $rsmsg = "
您方才的投票状态:".$vo->SaveVote($voteitem)."
";
+ $rsmsg = "
您方才的投票状态:".$vo->SaveVote($voteitem)."
";
} else {
- $rsmsg = "
您刚才没选择任何投票项目
";
+ $rsmsg = "
您刚才没选择任何投票项目
";
}
-
if ($row['isenable'] == 1) {
ShowMsg('此投票项未启用,暂时不能进行投票', $ENV_GOBACK_URL);
exit();
}
}
-
$voname = $vo->VoteInfos['votename'];
$totalcount = $vo->VoteInfos['totalcount'];
$starttime = GetDateMk($vo->VoteInfos['starttime']);
$endtime = GetDateMk($vo->VoteInfos['endtime']);
$votelist = $vo->GetVoteResult("98%", 30, "30%");
-
-
//判断是否允许被查看
$admin = new userLogin;
if ($dopost == 'view') {
@@ -76,4 +64,4 @@ if ($dopost == 'view') {
}
}
//显示模板(简单PHP文件)
-include(DEDETEMPLATE.'/plus/vote.htm');
+include(DEDETEMPLATE.'/plus/vote.htm');
\ No newline at end of file
diff --git a/src/data/admin/allowurl.txt b/src/data/admin/allowurl.txt
old mode 100755
new mode 100644
index 73f28e44..5d7d43cb
--- a/src/data/admin/allowurl.txt
+++ b/src/data/admin/allowurl.txt
@@ -1,2 +1,2 @@
-www.dedebiz.com
+www.dedebiz.com
www.zhelixie.com
\ No newline at end of file
diff --git a/src/data/admin/config_update.php b/src/data/admin/config_update.php
old mode 100755
new mode 100644
index 6b921988..dc315641
--- a/src/data/admin/config_update.php
+++ b/src/data/admin/config_update.php
@@ -1,11 +1,11 @@
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/src/data/admin/quickmenu.txt b/src/data/admin/quickmenu.txt
old mode 100755
new mode 100644
index 430e1cbf..ae9bcb91
--- a/src/data/admin/quickmenu.txt
+++ b/src/data/admin/quickmenu.txt
@@ -1,3 +1,3 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/data/admin/source.txt b/src/data/admin/source.txt
old mode 100755
new mode 100644
index 2230f85a..03836d53
--- a/src/data/admin/source.txt
+++ b/src/data/admin/source.txt
@@ -1,4 +1,4 @@
-DedeBIZ
-今日头条
-微信公众号
+DedeBIZ
+今日头条
+微信公众号
百家号
\ No newline at end of file
diff --git a/src/data/admin/ver.txt b/src/data/admin/ver.txt
old mode 100755
new mode 100644
index 5d5cc26b..3ffb0534
--- a/src/data/admin/ver.txt
+++ b/src/data/admin/ver.txt
@@ -1 +1 @@
-20201030
\ No newline at end of file
+20220315
\ No newline at end of file
diff --git a/src/data/admin/verifies.txt b/src/data/admin/verifies.txt
old mode 100755
new mode 100644
index e2983bed..3ffb0534
--- a/src/data/admin/verifies.txt
+++ b/src/data/admin/verifies.txt
@@ -1 +1 @@
-20201022
\ No newline at end of file
+20220315
\ No newline at end of file
diff --git a/src/data/admin/writer.txt b/src/data/admin/writer.txt
old mode 100755
new mode 100644
diff --git a/src/data/cache/index.html b/src/data/cache/index.html
old mode 100755
new mode 100644
diff --git a/src/data/downmix.data.inc b/src/data/downmix.data.inc
new file mode 100755
index 00000000..c2da633d
--- /dev/null
+++ b/src/data/downmix.data.inc
@@ -0,0 +1,6 @@
+
\ No newline at end of file
diff --git a/src/data/downmix.data.php b/src/data/downmix.data.php
deleted file mode 100755
index 6b91b835..00000000
--- a/src/data/downmix.data.php
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/src/data/safe/inc_safe_config.php b/src/data/safe/inc_safe_config.php
index 343c1c45..20965ad1 100755
--- a/src/data/safe/inc_safe_config.php
+++ b/src/data/safe/inc_safe_config.php
@@ -10,5 +10,4 @@ $safe_faq_reg = '0';
$safe_faq_send = '0';
$safe_faq_msg = '1';
$safe_faqs = 'a:4:{i:1;a:2:{s:8:"question";s:37:"您最喜欢的网建程序是什么?";s:6:"answer";s:7:"DedeCMS";}i:2;a:2:{s:8:"question";s:6:"1+11=?";s:6:"answer";s:2:"12";}i:3;a:2:{s:8:"question";s:59:"中国哪项体育运动最让人听着伤心,看着揪心?";s:6:"answer";s:6:"足球";}i:4;a:2:{s:8:"question";s:29:"
";s:6:"answer";s:24:"织梦内容管理系统";}}';
-
-?>
+?>
\ No newline at end of file
diff --git a/src/data/safequestions.php b/src/data/safequestions.php
index 05c41bdd..30880399 100755
--- a/src/data/safequestions.php
+++ b/src/data/safequestions.php
@@ -6,18 +6,16 @@ $safequestions[0] = '没安全提示问题';
//下面的设置可以手工修改
//start****************************
-$safequestions[1] = '您最喜欢的格言什么?';
-$safequestions[2] = '您家乡的名称是什么?';
-$safequestions[3] = '您读的小学叫什么?';
-$safequestions[4] = '您的父亲叫什么名字?';
-$safequestions[5] = '您的母亲叫什么名字?';
-$safequestions[6] = '您最喜欢的偶像是谁?';
-$safequestions[7] = '您最喜欢的歌曲是什么?';
+$safequestions[1] = '您最喜欢的格言什么';
+$safequestions[2] = '您家乡的名称是什么';
+$safequestions[3] = '您读的小学叫什么';
+$safequestions[4] = '您的父亲叫什么名字';
+$safequestions[5] = '您的母亲叫什么名字';
+$safequestions[6] = '您最喜欢的偶像是谁';
+$safequestions[7] = '您最喜欢的歌曲是什么';
//end****************************
-
-
//以下不要修改
function GetSafequestion($selid=0,$formname='safequestion')
{
diff --git a/src/data/smiley.data.php b/src/data/smiley.data.php
deleted file mode 100755
index 86c6b6a0..00000000
--- a/src/data/smiley.data.php
+++ /dev/null
@@ -1,22 +0,0 @@
- array('1.gif', '24', '24', '高兴'),
- '{s:2}' => array('2.gif', '24', '24', '撇嘴'),
- '{s:3}' => array('3.gif', '24', '24', '抓狂'),
- '{s:4}' => array('4.gif', '24', '24', '汗'),
- '{s:5}' => array('5.gif', '24', '24', '惊恐'),
- '{s:6}' => array('6.gif', '24', '24', '奋斗'),
- '{s:7}' => array('7.gif', '24', '24', '疑问'),
- '{s:8}' => array('8.gif', '24', '24', '晕'),
- '{s:9}' => array('9.gif', '24', '24', '偷笑'),
- '{s:10}' => array('10.gif', '24', '24', '可爱'),
- '{s:11}' => array('11.gif', '24', '24', '疑惑'),
- '{s:12}' => array('12.gif', '24', '24', '酷'),
- '{s:13}' => array('13.gif', '24', '24', '暴汗'),
- '{s:14}' => array('14.gif', '24', '24', '呕吐'),
- '{s:15}' => array('15.gif', '24', '24', '大笑'),
- '{s:16}' => array('16.gif', '24', '24', '色'),
-);
-?>
diff --git a/src/data/tag/sql.inc.php b/src/data/tag/sql.inc.php
index cd5ac1f0..a7f7adb4 100755
--- a/src/data/tag/sql.inc.php
+++ b/src/data/tag/sql.inc.php
@@ -1,16 +1,13 @@
您是从哪儿得知本站的?<\/strong><\/td><\/tr> 朋友介绍<\/td><\/tr> 门户网站的搜索引擎<\/td><\/tr> Google或百度搜索<\/td><\/tr> 别的网站上的链接<\/td><\/tr> 其它途径<\/td><\/tr> <\/td><\/tr> <\/form> <\/table> ");
\ No newline at end of file
diff --git a/src/dede/css/base.css b/src/dede/css/base.css
deleted file mode 100644
index 590aa680..00000000
--- a/src/dede/css/base.css
+++ /dev/null
@@ -1 +0,0 @@
-*{font-size:12px;letter-spacing:.4px}body{font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;line-height:1.5}form,h1,h2,h3,ul,ol,div{margin:0;padding:0}td{line-height:1.5}td,th,div{word-break:break-all;word-wrap:break-word}b,strong{font-weight:400}li,dd{margin:0;padding:0;list-style-type:none}select{height:calc(1.5em + .75rem + 2px);padding:.25rem .5rem;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s}input{padding:.25rem .5rem;height:calc(1.5em + .75rem + 2px);line-height:18px;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}input[type=radio],input[type=checkbox]{height:auto;box-shadow:none;outline:none}input[type=button],input[type=submit],input[type=reset]{padding:.25rem .5rem;height:auto;line-height:1.5;color:#fff;background:#28a745;border-radius:.2rem;transition:all .6s;border:0}input:focus,textarea:focus{border-color:#28a745;box-shadow:0 0 2px #28a745;outline:none}textarea{padding:.25rem .5rem;line-height:18px;font-family:Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}label{display:inline-block;margin:10px 0}img{margin-right:6px;border-radius:.2rem;vertical-align:baseline}h1,h2,h3{font-size:18px;color:#424b51}a:link{color:#424b51;text-decoration:none}a:hover{opacity:.8}a:visited{color:#666}.np{border:0}.linerow{border-bottom:1px solid #ACACAC}.coolbg{padding:.25rem .5rem;background:#f2f2f2;border-bottom:1px solid #ccc;border-radius:.2rem;border:0;cursor:pointer}.coolbg2{height:18px;background:#DFDDD2;border:1px solid #000}.ll{border-right:2px solid #ACACAC;border-bottom:2px solid #ACACAC;background:#E6E6E6}.bline{height:36px;background:#fff;border-bottom:1px solid #eee}#uploadfield{float:left}.bline2{border-bottom:1px solid #eee}.coolbt{border-left:1px solid #EFEFEF;border-top:1px solid #EFEFEF;border-bottom:1px solid #ACACAC;background:#E4F7D7;cursor:pointer}.coolbt2{border-left:1px solid #EFEFEF;border-top:1px solid #EFEFEF;border-bottom:1px solid #ACACAC;background:#F7FCDA}.coolbg3{width:140px;height:20px;border:1px solid #BDC5B4;background:#DFDDD2;text-align:right}.coolbg61{width:380px;height:26px;line-height:26px;border-top:1px solid #BDC5B4;border-left:1px solid #BDC5B4;border-right:1px solid #BDC5B4;background:#E7F3B1;text-align:right}.coolbg62{padding:6px;width:380px;height:300px;border:1px solid #BDC5B4;background:#F8FDF0}.coolbg4{width:190px;height:24px;line-height:24px;border-bottom:1px solid #C9CFC1;background:#F9FCDC url(../images/dlgtitle.gif)repeat-x;text-align:right}.coolbg5{width:190px;height:6px;border-top:1px solid #BDC5B4;background:#F9FCDC}.wsselect{height:60px;line-height:24px;background:#FCFEF1;overflow:auto}.dlg{padding:.25rem .5rem;border:2px solid #008E38;background:#F0FAEB;width:360px;line-height:160%}.pubdlg{background:#fff;border:4px solid #008E38;border-radius:.2rem;z-index:8888}.pubdlg .title{height:29px;line-height:29px;border-bottom:1px solid #C9CFC1;background:url(../images/dlgtitle.gif)repeat-x;text-align:left;cursor:move}.pubdlg .titLeft{float:left;padding-left:10px;line-height:29px;font-weight:600;color:#424b51}.pubdlg .titRight{float:right;padding:0}.fullpagediv{position:absolute;top:0;left:0;width:100%;height:120%;background:#cdcdcd;opacity:.5;z-index:1999}.quicksel{margin-left:10px;margin-top:10px;width:680px;height:420px;overflow:auto;z-index:10005}.quickselfoot{padding-top:8px;border-top:1px dashed #C0CC9D}.quickselItem{margin-bottom:8px}.quickselItem .topcat{padding-left:6px;line-height:24px;border-bottom:1px dashed #ccc;background:#FBFEEF;clear:both}.quickselItem .soncat{padding-left:10px}.quickselItem .item{float:left;margin-right:8px}.mysource,.mywriter{padding:.25rem .5rem;width:280px;line-height:160%;border:4px solid #008E38;background:#F0FAEB;z-index:10001}.dlgws div{width:100%}.dlgTesttitle{padding:.25rem .5rem;width:300px;line-height:150%;border:2px solid #008E38;background:#F0FAEB}#_mysource{z-index:10003}#_mywriter{z-index:10004}#uploadwait{z-index:19999}.option1{background:#DCECA6}.option2{background:#F7FBD2}.option3{background:#fff}.ininput{width:96%;height:20px;border:1px solid #fff}.nbt{padding:2px;background:#fff url(../images/allbtbg.gif);border:1px solid #A5AF83}.tdt{padding-left:6px}.waitpage{position:absolute;top:0;left:0;opacity:.7;background:#ababab url(../../images/loading1.gif)center no-repeat;z-index:10000}.divpre img{max-width:150px;max-height:100px}.divpre{overflow:hidden}.autoinput{padding-left:6px;width:90%}.bodytitle{margin:auto;width:98%;height:28px;border:1px dotted #BFD67C;background:url(../images/wbg.gif)}.bodytitle div{float:left}.bodytitletxt{padding-left:6px;line-height:28px}.tbtitle td{padding:6px}.tblist td{padding:6px;background:#fff}.tblist td.tbsname{padding:6px;background:#F9FFE6}.colordlg{padding:.25rem .5rem;width:100px;line-height:160%;border:2px dashed #008E38;background:#F0FAEB;z-index:10005}option.alltype{padding-left:16px;height:18px;line-height:18px;background:url(../images/arr4.gif)3px 4px no-repeat}option.btype{padding-left:16px;height:18px;line-height:18px;background:url(../images/arr4.gif)3px 4px no-repeat}option.stype{padding-left:26px;height:18px;line-height:18px;background:url(../images/arrr.gif)10px 4px no-repeat}.ilist{border-top:1px dashed #eee;border-bottom:1px dashed #eee;border-left:1px dashed #eee}.ilist td{border-right:1px dashed #eee}#typeid2{padding:0;float:left;height:18px;font-size:12px;background:url(../images/typeid2bg.gif)no-repeat;border:0}#litpic{margin-left:-20px;width:85px;height:20px;opacity:0;cursor:pointer}.litpic_span{margin-left:-60px;width:76px;height:22px;overflow:hidden;cursor:pointer}#starttime,#endtime,#pubdate{padding-left:30px;background:url(../images/calendar.gif)10px no-repeat}#title{background:url(../images/ruler.gif)repeat-x 0px 10px}.spec{width:60px}.gtab a{display:block;float:left;width:80px;height:26px;line-height:26px;text-align:center}.albCt img{cursor:pointer}.maintable{width:98%!important;border:1px solid #dee2e6}span.page-link{color:#fff;background:#28a745}a.btn{color:white!important}.btn-success{background:#28a745;border-color:#28a745}.table{color:#424b51}.table td,.table th{padding:.6rem;vertical-align:middle}.table th img,.table td img{vertical-align:text-bottom}
\ No newline at end of file
diff --git a/src/dede/css/frame.css b/src/dede/css/frame.css
deleted file mode 100644
index ead8fe75..00000000
--- a/src/dede/css/frame.css
+++ /dev/null
@@ -1 +0,0 @@
-*{padding:0;margin:0;box-sizing:border-box}a{text-decoration:none}html,body{width:100%;height:100%}body{height:100%;font-size:12px;overflow:hidden;z-index:1}body.showmenu{background:url(../images/leftmenu_bg.gif)-10px top repeat-y}body.hidemenu{background:none}ul{list-style:none}form{margin:0;padding:0}.head{width:100%;height:76px;overflow:hidden;z-index:8;position:relative}.top{height:46px;width:100%;background-image:linear-gradient(135deg,#008E38 0%,#639709 100%);overflow:hidden;clear:both}.top .top_logo{float:left;margin-left:30px;height:46px;line-height:46px}.top .top_logo a{font-size:18px;font-weight:600;color:#fff}.top .top_version{display:inline-block;margin-top:12px;margin-left:10px;color:#fff}.top .top_link{float:right;margin-right:30px}.top .top_link ul{float:left;line-height:46px;overflow:hidden}.top .top_link ul li.welcome img{margin-top:-4px;margin-right:10px;width:30px;height:30px;vertical-align:middle}.top .top_link ul li{float:left;color:#fff}.top .top_link ul li a{color:#fff;padding-left:20px}.top .top_link ul li a:hover{color:#ccc}.top .top_link .quick{padding:3px 0px 0px 0px;float:left}.top .top_link .quick a{display:block;color:#C60;float:left;line-height:21px;height:21px;overflow:hidden}.topnav{width:100%;height:30px;line-height:30px;background:#393d49;overflow:hidden;clear:both}.topnav .menuact{width:168px;float:left;padding-left:30px;overflow:hidden}.topnav .menuact a{overflow:hidden;color:#eee;padding-right:10px}.topnav .menuact a:hover{color:#fff}.nav{float:left;padding-left:2px;line-height:26px;color:#999}.nav ul li{float:left;display:block;margin-left:4px}.nav ul li a{padding:0 10px 0px 10px;color:#FFCC00}.nav ul li a:hover{color:#fff}.nav ul li a.thisclass,.nav ul li a.thisclass:hover{color:#4E8100;display:block;font-weight:bold;background:#fff;line-height:23px;border-top:2px solid #FFDE59;margin-top:4px;padding:0 10px 0px 10px}.sysmsg{padding-right:30px;float:right;width:500px;color:#999;overflow:hidden}.scroll{float:right;overflow:hidden}.scroll ul li,.sysmsg ul li a{color:#bbb}.scroll ul li a:hover{text-decoration:underline}.scroll a{padding-left:10px;color:#fff}body.showmenu .left{display:block}body.hidemenu .left{display:none}body.showmenu .right{left:220px}body.hidemenu .right{left:0}.left{position:absolute;top:76px;width:220px;left:0;bottom:0;z-index:7}.menu{height:100%}.top_link{font-size:12px}.menu iframe{height:100%;width:99.99%;z-index:20}.right{position:absolute;right:0;top:76px;bottom:0;z-index:7}.main{height:100%}.main iframe{height:100%;width:99.99%;z-index:20}.qucikmenu{position:absolute;right:10px;top:32px;z-index:9;display:none}.qucikmenu ul{width:110px;list-style:none;border:1px solid #E7E7E7;background:#fff}.qucikmenu ul li{display:block;text-align:left}.qucikmenu ul li a{height:30px;line-height:30px;display:block;color:#666;padding-left:10px;padding-right:10px}.qucikmenu ul li a:hover{background:#F7F7F7}.pagemask{width:100%;height:100%;background:#424b51;position:absolute;z-index:100;filter:alpha(opacity=70);-moz-opacity:.7;opacity:.7;display:none}.iframemask{position:absolute;z-index:80;top:0;left:0;background:#fff;border:none;filter:alpha(opacity=0);-moz-opacity:0;opacity:0;height:100%;width:100%;display:none}.allmenu{margin-left:-400px;padding:10px;display:none;width:800px;position:absolute;top:76px;left:50%;z-index:999;background:#fff;border-radius:.2rem}.allmenu .allmenu-box{margin:0 auto;text-align:left;overflow:hidden;padding-left:2px}.maptop{float:left;width:130px;overflow:hidden;padding-right:6px;padding-left:6px;margin-left:-1px}.maptop dt.bigitem{padding:5px 10px;line-height:18px;color:#fff;background:#424b51}.mapitem dt{line-height:30px;font-weight:bold;text-indent:10px;background:#EFF1F1}.mapitem ul{margin-top:10px;margin-bottom:10px}.mapitem ul li{text-indent:20px;line-height:24px;background:url(../images/arrr.gif)0 8px no-repeat}.allmenu a{color:#5C604F}.allmenu a:hover{color:#F63}#login .theme{clear:both;padding:10px;width:70%;margin-top:20px}#login .theme li{margin-bottom:15px;margin-top:5px;overflow:hidden}#login .theme span{display:inline-block;float:left;width:150px;height:22px;line-height:22px;color:#424b51;text-align:right}input[type="text"],input[type="password"]{padding:2px 4px;width:140px;height:18px;line-height:18px;border-width:1px;border-style:solid;border-color:#fff;background:#fff;vertical-align:middle}input[type="text"]:focus,input[type="password"]:focus{box-shadow:none;outline:none}* html input.text{width:220px;border:1px solid #a7a6aa;background:#fff url(../images/input.gif)0 0 no-repeat;margin-top:-1px;margin-right:5px;margin-bottom:0;margin-left:2px;padding:3px;line-height:12px}* html input.radio{margin:-1px 0 0 -2px}.allsearch{float:left;margin-top:6px!important;font-size:12px;border:1px solid #fff;border-radius:.2rem}.np{margin-left:10px;width:40px;height:18px;font-size:12px;color:#fff;background:#57960f;border-radius:.2rem;border:none;cursor:pointer}
\ No newline at end of file
diff --git a/src/dede/css/indexbody.css b/src/dede/css/indexbody.css
deleted file mode 100755
index 4205d95e..00000000
--- a/src/dede/css/indexbody.css
+++ /dev/null
@@ -1 +0,0 @@
-.title{color:#666600;font-weight:bold}.title span{padding-left:3px}#addTab{position:absolute;left:455px;top:150px;width:360px;height:200px;z-index:2;background-color:#FFFFFF;border:1px solid #889D8F;padding:0px;display:none;overflow:hidden}#editTab{position:absolute;left:455px;top:120px;width:360px;height:350px;z-index:1;background-color:#FFFFFF;border:1px solid #889D8F;padding:0px;display:none}.txt{float:left}.updatedvt{width:98%;border-bottom:1px dashed #dcdcdc}.upinfotitle{border-bottom:1px solid #cccccc;color:red;font-weight:bold}.verline{border-bottom:1px dashed #cccccc}.itemTable{background:#CBD8AC}#loaddiv{top:0;left:0;background:#cccccc;filter:Alpha(opacity=70);-moz-opacity:0.7;position:absolute;z-index:10000;width:100%;height:100%}#mainmsg{padding-right:8px}.rightside{width:49%;float:left;margin-right:1%;height:670px}.column{width:49%;float:left;margin-right:0.5%}.placeholder{width:98%;margin-left:1%;background:#f0f0f0;border:1px dashed #ddd}.dbox{border:1px solid #DEEAB6;width:98%;margin-left:1%;margin-top:8px}.dbox dt{height:28px;line-height:28px;font-weight:bold;color:#4D6C2F;cursor:move}.dbox dt .l{float:left;padding-left:8px}.dbox dt .r{float:right;padding-right:8px}.dbox dt.lside{border-bottom:1px solid #CFD7C4;background-color:rgb(239,248,229)}.dbox dt.rside{border-bottom:1px solid #DEEAB6;background:url(../images/wbg.gif)repeat-x}.dbox dd{padding:0px}.dbox dd.intable{padding-top:0}#updatetest{padding:6px;padding-left:110px;background:url(../images/ico_spider.gif)no-repeat scroll 10px 15px transparent}#quickmenu{width:100%;height:46px;overflow:hidden}#quickmenu .icoitem{float:left;height:24px;line-height:24px;margin-top:10px;padding-left:30px;overflow:hidden}.dboxtable td.nline{border-bottom:1px dashed #CFD7C4;height:26px}.dboxtable1 ul li{float:left;border-bottom:1px dashed #CFD7C4;height:26px;line-height:26px;display:inline;width:48%;text-align:center}.biz p{padding:0 15px}.biz img{float:right;margin:40px 15px 0 15px}
\ No newline at end of file
diff --git a/src/dede/css/menuold.css b/src/dede/css/menuold.css
deleted file mode 100755
index 3e9f7e7e..00000000
--- a/src/dede/css/menuold.css
+++ /dev/null
@@ -1 +0,0 @@
-div{padding:0px;margin:0px;}body{scrollbar-base-color:#bae87c;scrollbar-arrow-color:#FFFFFF;scrollbar-shadow-color:#c1ea8b;padding:0px;margin:auto;text-align:center;background-color:#9ad075;}dl.bitem{width:148px;margin:0px 0px 5px 4px;}dl.bitem dt{background:url(../images/menubg.gif);height:26px;line-height:26px;text-align:center;cursor:pointer;}dl.bitem dd{padding:3px 3px 3px 3px;background-color:#fff;}.fllct{float:left;width:90px;}.flrct{padding-top:3px;float:left;}div.items{line-height:22px;background:url(../images/arr4.gif) no-repeat 10px 9px;}span.items{padding:10px 0px 10px 22px;background:url(../images/arr4.gif) no-repeat 10px 12px;}ul{padding-top:3px;}li{height:22px;}.sitemu li{padding:0px 0px 0px 22px;line-height:24px;background:url(../images/arr4.gif) no-repeat 10px 9px;}
\ No newline at end of file
diff --git a/src/dede/dialog/img/indextitle.gif b/src/dede/dialog/img/indextitle.gif
deleted file mode 100755
index 7d60004e..00000000
Binary files a/src/dede/dialog/img/indextitle.gif and /dev/null differ
diff --git a/src/dede/dialog/select_images.php b/src/dede/dialog/select_images.php
deleted file mode 100644
index 5362e512..00000000
--- a/src/dede/dialog/select_images.php
+++ /dev/null
@@ -1,241 +0,0 @@
-
-
-
-
- 图片浏览器
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 预览
- 选择图片
- 文件大小
- 修改时间
-
-
- 点击V预览图片,点击图片名选择图片,显示图片后点击该图片关闭预览
-
- read()) {
- //计算文件大小和创建时间
- if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) {
- $filesize = filesize("$inpath/$file");
- $filesize = $filesize / 1024;
- if ($filesize != "")
- if ($filesize < 0.1) {
- @list($ty1, $ty2) = split("\.", $filesize);
- $filesize = $ty1.".".substr($ty2, 0, 2);
- } else {
- @list($ty1, $ty2) = split("\.", $filesize);
- $filesize = $ty1.".".substr($ty2, 0, 1);
- }
- $filetime = filemtime("$inpath/$file");
- $filetime = MyDate("Y-m-d H:i", $filetime);
- }
- if ($file == ".") continue;
- else if ($file == "..") {
- if ($activepath == "") continue;
- $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath);
- $line = "\n
-
- 上级目录
- 当前目录:$activepath
- ";
- echo $line;
- } else if (is_dir("$inpath/$file")) {
- if (preg_match("#^_(.*)$#i", $file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录
- if (preg_match("#^\.(.*)$#i", $file)) continue;
- $line = "\n
-
- $file
-
-
- ";
- echo "$line";
- } else if (preg_match("#\.(".$cfg_imgtype.")#i", $file)) {
- $reurl = "$activeurl/$file";
- $reurl = preg_replace("#^\.\.#", "", $reurl);
- $reurl = $reurl;
- if ($file == $comeback) $lstyle = " style='color:red' ";
- else $lstyle = "";
- $line = "\n
-
-
- $file
- $filesize KB
- $filetime
- ";
- echo "$line";
- } else if (preg_match("#\.(jpg)#i", $file)) {
- $reurl = "$activeurl/$file";
- $reurl = preg_replace("#^\.\.#", "", $reurl);
- $reurl = $reurl;
- if ($file == $comeback) $lstyle = " style='color:red' ";
- else $lstyle = "";
- $line = "\n
-
- $file
- $filesize KB
- $filetime
- ";
- echo "$line";
- }
- } //End Loop
- $dh->close();
- ?>
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/dialog/select_media.php b/src/dede/dialog/select_media.php
deleted file mode 100755
index 2b70e393..00000000
--- a/src/dede/dialog/select_media.php
+++ /dev/null
@@ -1,223 +0,0 @@
-
-
-
-
-
- 媒体文件管理器
-
-
-
-
-
-
-
-
-
-
- 点击名称选择文件
- 文件大小
- 最后修改时间
-
- read()) {
- //-----计算文件大小和创建时间
- if ($file != "." && $file != ".." && !is_dir("$inpath/$file")) {
- $filesize = filesize("$inpath/$file");
- $filesize = $filesize / 1024;
- if ($filesize != "")
- if ($filesize < 0.1) {
- @list($ty1, $ty2) = split("\.", $filesize);
- $filesize = $ty1.".".substr($ty2, 0, 2);
- } else {
- @list($ty1, $ty2) = split("\.", $filesize);
- $filesize = $ty1.".".substr($ty2, 0, 1);
- }
- $filetime = filemtime("$inpath/$file");
- $filetime = MyDate("Y-m-d H:i:s", $filetime);
- }
-
- //------判断文件类型并作处理
- if ($file == ".") continue;
- else if ($file == "..") {
- if ($activepath == "") continue;
- $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath);
- $line = "\n
- 上级目录
- 当前目录:$activepath
- \r\n";
- echo $line;
- } else if (is_dir("$inpath/$file")) {
- if (preg_match("#^_(.*)$#i", $file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录
- if (preg_match("#^\.(.*)$#i", $file)) continue;
- $line = "\n
-
- $file
-
- -
- -
- ";
- echo "$line";
- } else if (preg_match("#\.(swf|fly|fla|flv)#i", $file)) {
- $reurl = "$activeurl/$file";
- $reurl = preg_replace("#^\.\.#", "", $reurl);
- $reurl = $reurl;
-
- if ($file == $comeback) $lstyle = " style='color:red' ";
- else $lstyle = "";
-
- $line = "\n
-
- $file
-
- $filesize KB
- $filetime
- ";
- echo "$line";
- } else if (preg_match("#\.(wmv|avi)#i", $file)) {
-
- $reurl = "$activeurl/$file";
- $reurl = preg_replace("#^\.\.#", "", $reurl);
- $reurl = $reurl;
-
- if ($file == $comeback) $lstyle = " style='color:red' ";
- else $lstyle = "";
-
- $line = "\n
-
- $file
-
- $filesize KB
- $filetime
- ";
- echo "$line";
- } else if (preg_match("#\.(rm|rmvb)#i", $file)) {
- $reurl = "$activeurl/$file";
- $reurl = preg_replace("#^\.\.#", "", $reurl);
- $reurl = $reurl;
-
- if ($file == $comeback) $lstyle = " style='color:red' ";
- else $lstyle = "";
-
- $line = "\n
-
- $file
-
- $filesize KB
- $filetime
- ";
- echo "$line";
- } else if (preg_match("#\.(mp3|wma)#", $file)) {
-
- $reurl = "$activeurl/$file";
- $reurl = preg_replace("#^\.\.#", "", $reurl);
- $reurl = $reurl;
-
- if ($file == $comeback) $lstyle = " style='color:red' ";
- else $lstyle = "";
-
- $line = "\n
-
- $file
-
- $filesize KB
- $filetime
- ";
- echo "$line";
- }
- } //End Loop
- $dh->close();
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/images/biz.gif b/src/dede/images/biz.gif
deleted file mode 100755
index b11a0eae..00000000
Binary files a/src/dede/images/biz.gif and /dev/null differ
diff --git a/src/dede/images/btn_fullscan.gif b/src/dede/images/btn_fullscan.gif
deleted file mode 100755
index 4ea412e7..00000000
Binary files a/src/dede/images/btn_fullscan.gif and /dev/null differ
diff --git a/src/dede/images/btn_scan.gif b/src/dede/images/btn_scan.gif
deleted file mode 100755
index 3542afab..00000000
Binary files a/src/dede/images/btn_scan.gif and /dev/null differ
diff --git a/src/dede/images/dfpic.gif b/src/dede/images/dfpic.gif
deleted file mode 100755
index 7124bce6..00000000
Binary files a/src/dede/images/dfpic.gif and /dev/null differ
diff --git a/src/dede/images/ico_spider.gif b/src/dede/images/ico_spider.gif
deleted file mode 100755
index 2469f6e3..00000000
Binary files a/src/dede/images/ico_spider.gif and /dev/null differ
diff --git a/src/dede/images/login-bg.jpg b/src/dede/images/login-bg.jpg
deleted file mode 100755
index 7b8d507e..00000000
Binary files a/src/dede/images/login-bg.jpg and /dev/null differ
diff --git a/src/dede/images/style1/admin_top_bg.jpg b/src/dede/images/style1/admin_top_bg.jpg
deleted file mode 100755
index 97d26a04..00000000
Binary files a/src/dede/images/style1/admin_top_bg.jpg and /dev/null differ
diff --git a/src/dede/images/style1/admin_top_logo.gif b/src/dede/images/style1/admin_top_logo.gif
deleted file mode 100755
index 76dce1aa..00000000
Binary files a/src/dede/images/style1/admin_top_logo.gif and /dev/null differ
diff --git a/src/dede/images/style1/dlgtitle.gif b/src/dede/images/style1/dlgtitle.gif
deleted file mode 100755
index a54ae9f2..00000000
Binary files a/src/dede/images/style1/dlgtitle.gif and /dev/null differ
diff --git a/src/dede/images/style2/admin_top_bg.gif b/src/dede/images/style2/admin_top_bg.gif
deleted file mode 100755
index 72874046..00000000
Binary files a/src/dede/images/style2/admin_top_bg.gif and /dev/null differ
diff --git a/src/dede/images/style2/admin_top_logo.gif b/src/dede/images/style2/admin_top_logo.gif
deleted file mode 100755
index c0425f02..00000000
Binary files a/src/dede/images/style2/admin_top_logo.gif and /dev/null differ
diff --git a/src/dede/images/style2/dlgtitle.gif b/src/dede/images/style2/dlgtitle.gif
deleted file mode 100755
index a861ad0c..00000000
Binary files a/src/dede/images/style2/dlgtitle.gif and /dev/null differ
diff --git a/src/dede/images/style2/leftbg2.gif b/src/dede/images/style2/leftbg2.gif
deleted file mode 100755
index 25ee9a5f..00000000
Binary files a/src/dede/images/style2/leftbg2.gif and /dev/null differ
diff --git a/src/dede/images/style2/style.css b/src/dede/images/style2/style.css
deleted file mode 100755
index d9a69f17..00000000
--- a/src/dede/images/style2/style.css
+++ /dev/null
@@ -1,63 +0,0 @@
-.top {
- height:47px;
- width:100%;
- background-image: linear-gradient(135deg, #6561FE 0%, #1C6F93 100%);
- overflow:hidden;
- clear:both;
-}
-.top .top_link ul li.welcome {
- border-right: medium none;
- color: #FFF;
- padding-right: 6px;
-}
-.top .top_link ul li a {
- color: #FFF;
- padding-left: 11px;
- padding-right: 11px;
- text-decoration: none;
-}
-.dbox dt.lside {
- background-color:rgb(198, 222, 242);
- border-bottom: 1px solid #8EBCDE;
-}
-.dbox {
- border: 1px solid #8EBCDE;
- margin-left: 1%;
- margin-top: 8px;
- width: 98%;
-}
-.dbox dt {
- color: #3B5995;
- cursor: move;
- font-weight: bold;
- height: 28px;
- line-height: 28px;
-}
-a b {
- color: #3B5995;
-}
-b, strong {
- color: #3B5995;
-}
-.topnav {
- background: url("admin_top_bg.gif") repeat-x scroll left -37px transparent;
- clear: both;
- height: 29px;
- overflow: hidden;
- width: 100%;
-}
-a.mmac div {
- background: url("leftbg2.gif") no-repeat scroll 0 0 transparent;
- color: #325304;
- font-weight: bold;
- height: 37px !important;
- padding: 6px 4px 4px 10px;
- word-wrap: break-word;
-}
-a.mm:hover div {
- background:url(leftbg2.gif) no-repeat;
- color:#4F7632;
-}
-dl.bitem dt b, dl.bitem2 dt b {
- color: #594C36;
-}
\ No newline at end of file
diff --git a/src/dede/images/style3/admin_top_bg.gif b/src/dede/images/style3/admin_top_bg.gif
deleted file mode 100755
index 2fe670e7..00000000
Binary files a/src/dede/images/style3/admin_top_bg.gif and /dev/null differ
diff --git a/src/dede/images/style3/admin_top_logo.gif b/src/dede/images/style3/admin_top_logo.gif
deleted file mode 100755
index aa490649..00000000
Binary files a/src/dede/images/style3/admin_top_logo.gif and /dev/null differ
diff --git a/src/dede/images/style3/dlgtitle.gif b/src/dede/images/style3/dlgtitle.gif
deleted file mode 100755
index 78221e7b..00000000
Binary files a/src/dede/images/style3/dlgtitle.gif and /dev/null differ
diff --git a/src/dede/images/style3/leftbg2.gif b/src/dede/images/style3/leftbg2.gif
deleted file mode 100755
index 2720f1ab..00000000
Binary files a/src/dede/images/style3/leftbg2.gif and /dev/null differ
diff --git a/src/dede/images/style3/style.css b/src/dede/images/style3/style.css
deleted file mode 100755
index 7227d89b..00000000
--- a/src/dede/images/style3/style.css
+++ /dev/null
@@ -1,63 +0,0 @@
-.top {
- height:47px;
- width:100%;
- background-image: linear-gradient(135deg, #856404 0%, #8B7859 100%);
- overflow:hidden;
- clear:both;
-}
-.top .top_link ul li.welcome {
- border-right: medium none;
- color: #FFF;
- padding-right: 6px;
-}
-.top .top_link ul li a {
- color: #FFF;
- padding-left: 11px;
- padding-right: 11px;
- text-decoration: none;
-}
-.dbox dt.lside {
- background: rgb(207, 194, 176);
- border-bottom: 1px solid #B1A27B;
-}
-.dbox {
- border: 1px solid #B1A27B;
- margin-left: 1%;
- margin-top: 8px;
- width: 98%;
-}
-.dbox dt {
- color: #594C36;
- cursor: move;
- font-weight: bold;
- height: 28px;
- line-height: 28px;
-}
-a b {
- color: #594C36;
-}
-b, strong {
- color: #594C36;
-}
-.topnav {
- background: url("admin_top_bg.gif") repeat-x scroll left -37px transparent;
- clear: both;
- height: 29px;
- overflow: hidden;
- width: 100%;
-}
-a.mmac div {
- background: url("leftbg2.gif") no-repeat scroll 0 0 transparent;
- color: #325304;
- font-weight: bold;
- height: 37px !important;
- padding: 6px 4px 4px 10px;
- word-wrap: break-word;
-}
-a.mm:hover div {
- background:url(leftbg2.gif) no-repeat;
- color:#4F7632;
-}
-dl.bitem dt b, dl.bitem2 dt b {
- color: #594C36;
-}
\ No newline at end of file
diff --git a/src/dede/images/style4/admin_top_bg.gif b/src/dede/images/style4/admin_top_bg.gif
deleted file mode 100755
index e371dbb6..00000000
Binary files a/src/dede/images/style4/admin_top_bg.gif and /dev/null differ
diff --git a/src/dede/images/style4/admin_top_logo.gif b/src/dede/images/style4/admin_top_logo.gif
deleted file mode 100755
index 924c7eba..00000000
Binary files a/src/dede/images/style4/admin_top_logo.gif and /dev/null differ
diff --git a/src/dede/images/style4/dlgtitle.gif b/src/dede/images/style4/dlgtitle.gif
deleted file mode 100755
index 783b5b78..00000000
Binary files a/src/dede/images/style4/dlgtitle.gif and /dev/null differ
diff --git a/src/dede/images/style4/leftbg2.gif b/src/dede/images/style4/leftbg2.gif
deleted file mode 100755
index c0a00e06..00000000
Binary files a/src/dede/images/style4/leftbg2.gif and /dev/null differ
diff --git a/src/dede/images/style4/style.css b/src/dede/images/style4/style.css
deleted file mode 100755
index 265d383d..00000000
--- a/src/dede/images/style4/style.css
+++ /dev/null
@@ -1,66 +0,0 @@
-.top {
- height:47px;
- width:100%;
- background-image: linear-gradient(135deg, #E2E3E5 0%, #83888C 100%);
- overflow:hidden;
- clear:both;
-}
-.top .top_link ul li.welcome {
- border-right: medium none;
- color: #424B51;
- padding-right: 6px;
-}
-.top .top_link ul li a {
- color: #424B51;
- padding-left: 11px;
- padding-right: 11px;
- text-decoration: none;
-}
-.top_version{
- color: #333 !important;
-}
-.dbox dt.lside {
- background: rgb(231, 236, 239);
- border-bottom: 1px solid #D3DBDE;
-}
-.dbox {
- border: 1px solid #D3DBDE;
- margin-left: 1%;
- margin-top: 8px;
- width: 98%;
-}
-.dbox dt {
- color: #424B51;
- cursor: move;
- font-weight: bold;
- height: 28px;
- line-height: 28px;
-}
-a b {
- color: #424B51;
-}
-b, strong {
- color: #424B51;
-}
-.topnav {
- background: url("admin_top_bg.gif") repeat-x scroll left -37px transparent;
- clear: both;
- height: 29px;
- overflow: hidden;
- width: 100%;
-}
-a.mmac div {
- background: url("leftbg2.gif") no-repeat scroll 0 0 transparent;
- color: #325304;
- font-weight: bold;
- height: 37px !important;
- padding: 6px 4px 4px 10px;
- word-wrap: break-word;
-}
-a.mm:hover div {
- background:url(leftbg2.gif) no-repeat;
- color:#424B51;
-}
-dl.bitem dt b, dl.bitem2 dt b {
- color: #424B51;
-}
\ No newline at end of file
diff --git a/src/dede/mda_main.php b/src/dede/mda_main.php
deleted file mode 100755
index 3ea43ff0..00000000
--- a/src/dede/mda_main.php
+++ /dev/null
@@ -1,438 +0,0 @@
-IsTable('#@__plus_mda_setting')) {
- $mysql_version = $dsql->GetVersion(TRUE);
-
- foreach ($install_sqls as $install_sql) {
- $sql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $install_sql);
- $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language;
-
- if ($mysql_version >= 4.1) {
- $sql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $sql);
- }
- $dsql->ExecuteNoneQuery($sql);
- }
-}
-
-/*--------------------------------
-function __update(){ }
--------------------------------*/
-
-$version = mda_get_setting('version');
-if (empty($version)) $version = '0.0.1';
-if (version_compare($version, MDA_VER, '<')) {
- $mysql_version = $dsql->GetVersion(TRUE);
-
- foreach ($update_sqls as $ver => $sqls) {
- if (version_compare($ver, $version, '<')) {
- continue;
- }
- foreach ($sqls as $sql) {
- $sql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $sql);
- $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language;
-
- if ($mysql_version >= 4.1) {
- $sql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $sql);
- }
- $dsql->ExecuteNoneQuery($sql);
- }
- mda_set_setting('version', $ver);
- $version = mda_get_setting('version');
- }
-}
-
-if (empty($dopost)) $dopost = '';
-
-/*--------------------------------
-function __link(){ }
--------------------------------*/
-if ($dopost == 'place' or $dopost == 'report' or $dopost == 'account' or $dopost == 'setting') {
- if (!mda_islogin()) {
- ShowMsg("您尚未登录德得广告,请先登录后继续使用……", '?dopost=login');
- exit();
- }
- mda_check_islogin();
-
- if ($dopost == 'place') {
- $channel_uuid = mda_get_setting('channel_uuid');
- $manage_url = MDA_APIHOST."/place?from=dedecms&uuid={$channel_uuid}";
- $ptitle = '广告管理';
- } elseif ($dopost == 'report') {
- $manage_url = MDA_APIHOST."/report";
- $ptitle = '报表管理';
- } elseif ($dopost == 'account') {
- $manage_url = MDA_APIHOST."/account";
- $ptitle = '结算中心';
- } elseif ($dopost == 'setting') {
- $manage_url = MDA_APIHOST."/setting";
- $ptitle = '德得设置';
- }
-
- echo <<
-
-
-{$ptitle}
-
-
-
-
-
-
-
-
- 您好:{$_SESSION['mda_email']} {$account_str}
-
-
-
-
-
- {$ptitle}
-
- {$addstr}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-EOT;
-}
-/*--------------------------------
-function __clearcache(){ }
--------------------------------*/ else if ($dopost == 'clearcache') {
- if (!is_dir(DEDEDATA."/cache/mda/") or RmRecurse(DEDEDATA."/cache/mda/")) {
- ShowMsg("成功清除缓存信息", -1);
- exit();
- } else {
- ShowMsg("清除缓存失败,请尝试手工删除".DEDEDATA."/cache/mda/", 'javascript:;');
- exit();
- }
-}
-/*--------------------------------
-function __bind_user(){ }
--------------------------------*/ else if ($dopost == 'bind_user') {
- $email = isset($email) ? $email : '';
- $pwd = isset($pwd) ? $pwd : '';
- $domain = isset($domain) ? $domain : '';
- $channel_name = isset($channel_name) ? $channel_name : '';
- if (!$email or !$pwd or !$domain or !$channel_name) {
- ShowMsg("填写正确的账号信息", -1);
- exit();
- }
- if ($cfg_soft_lang == 'gb2312') $channel_name = gb2utf8($channel_name);
- $paramsArr = array(
- 'email' => $email,
- 'password' => $pwd,
- 'domain' => $domain,
- 'channel_name' => $channel_name,
- );
- $rs = json_decode(mda_http_send(MDA_API_BIND_USER, 0, $paramsArr), TRUE);
- if (!$rs) {
- ShowMsg("请求API错误,请重试", -1);
- exit();
- }
- if ($rs['code'] != 0) {
- ShowMsg("请求失败,错误代码[code:{$rs['code']}],消息[{$rs['msg']}]", -1);
- exit();
- }
- $channel_uuid = $rs['data']['channel_uuid'];
- $channel_secret = $rs['data']['channel_secret'];
-
- mda_set_setting('email', $email);
- mda_set_setting('channel_uuid', $channel_uuid);
- mda_set_setting('channel_secret', $channel_secret);
- $login_url = "?dopost=login";
- echo <<
-EOT;
- ShowMsg("绑定成功,下面自动登录德得广告平台", "?dopost=login");
- exit();
-}
-/*--------------------------------
-function __login(){ }
--------------------------------*/ else if ($dopost == 'login') {
- $email = mda_get_setting('email');
- $channel_uuid = mda_get_setting('channel_uuid');
- $channel_secret = mda_get_setting('channel_secret');
- $ts = time();
- $paramsArr = array(
- 'channel_uuid' => $channel_uuid,
- 'channel_secret' => $channel_secret,
- 'email' => $email,
- 'ts' => $ts,
- 'crc' => md5($channel_uuid.$channel_secret.$ts),
- );
- $jquery_file = MDA_JQUERY;
- $api_login = MDA_API_LOGIN;
- $params = json_encode($paramsArr);
- $rs = json_decode(mda_http_send(MDA_API_LOGIN, 0, $paramsArr), TRUE);
- if (isset($rs['code']) and $rs['code'] == 0) {
- $_SESSION['mda_email'] = $email;
- } else {
- unset($_SESSION['mda_email']);
- header('Location:?logout=1');
- exit();
- }
-
- echo <<
-
-EOT;
- exit;
-}
-/*--------------------------------
-function __main(){ }
--------------------------------*/ else if ($dopost == 'main') {
- $mda_version = MDA_VER;
- $channel_uuid = mda_get_setting('channel_uuid');
- $channel_secret = mda_get_setting('channel_secret');
- $msg = <<
-
-
-
-{$login_str}
-{$change_isv_id}
-EOT;
- $wintitle = '德得广告管理';
- $wecome_info = '德得广告模块 》';
- $win = new OxWindow();
- $win->AddTitle($wintitle);
- $win->AddMsgItem($msg);
- $winform = $win->GetWindow('hand', ' ', false);
- $win->Display();
- exit;
-} else if ($dopost == 'set_secret') {
- $email = mda_get_setting('email');
- $channel_uuid = mda_get_setting('channel_uuid');
- $ts = time();
- $paramsArr = array(
- 'channel_uuid' => $channel_uuid,
- 'channel_secret' => $channel_secret,
- 'email' => $email,
- 'ts' => $ts,
- 'crc' => md5($channel_uuid.$channel_secret.$ts),
- );
- $rs = json_decode(mda_http_send(MDA_API_LOGIN, 0, $paramsArr), TRUE);
- if (!$rs) {
- ShowMsg("请求API错误,请重试", -1);
- exit();
- }
- if ($rs['code'] != 0) {
- ShowMsg("请求失败,错误代码[code:{$rs['code']}],消息[{$rs['msg']}]", '?dopost=main');
- exit();
- }
- if ($rs['code'] == 0) {
- ShowMsg("Channel Secret 修改成功……", '?dopost=main');
- mda_set_setting('channel_secret', $channel_secret);
- }
-}
-// ------------------------------------------------------------------------
-/*--------------------------------
-function __index(){ }
--------------------------------*/ else {
- if (mda_get_setting('email') and mda_get_setting('channel_uuid') and mda_get_setting('channel_secret') and empty($logout)) {
- header('Location:?dopost=login');
- exit;
- }
-
- $mda_reg_url = MDA_REG_URL;
- $mda_forget_pwd_url = MDA_FORGOT_PASSWORD_URL;
- $domain = !empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
- $mda_update_url = MDA_APIHOST."/help/dedecms_module_download";
-
- echo <<
-
-
-德得广告
-
-
-
-
-
- 德得广告 >> 配置德得广告
-
-
-
-
-
-
-
- 德得广告
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-EOT;
-}
diff --git a/src/dede/module_main.php b/src/dede/module_main.php
deleted file mode 100755
index e4ed2322..00000000
--- a/src/dede/module_main.php
+++ /dev/null
@@ -1,552 +0,0 @@
-SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC ");
- $dsql->Execute();
- while ($row = $dsql->GetArray()) {
- if ($row['type'] == 'number') fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n");
- else fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n");
- }
- fwrite($fp, "?".">");
- fclose($fp);
-}
-/*--------------
-function ShowAll();
---------------*/
-if ($action == '') {
- $types = array('soft' => '模块', 'templets' => '模板', 'plus' => '小插件', 'patch' => '补丁');
- $dm = new DedeModule($mdir);
- if (empty($moduletype)) $moduletype = '';
- $modules_remote = $dm->GetModuleUrlList($moduletype, $mdurl);
- $modules = array();
- $modules = $dm->GetModuleList($moduletype);
- is_array($modules) || $modules = array();
- if (is_array($modules_remote) && count($modules_remote) > 0) {
- $modules = array_merge($modules, $modules_remote);
- }
- require_once(dirname(__FILE__)."/templets/module_main.htm");
- $dm->Clear();
- exit();
-}
-/*--------------
-function ViewDevelopoer();
---------------*/
-else if ($action == 'view_developoer') {
- //检验开发者信息
- $dm = new DedeModule($mdir);
- $info = $dm->GetModuleInfo($hash);
- if ($info == null) {
- ShowMsg("获取模块信息错误,模块文件可能被篡改", -1);
- exit;
- }
- $dev_id = $info['dev_id'];
- $devURL = DEDECDNURL."/developers/$dev_id.json";
- $dhd = new DedeHttpDown();
- $dhd->OpenUrl($devURL);
- $devContent = $dhd->GetHtml();
- $devInfo = (array)json_decode($devContent);
- $offUrl = "";
- if ($devInfo['dev_type'] == 1) {
- $offUrl = "官方网址:{$devInfo['offurl']}
(复制在浏览器中打开)
";
- }
- $authAt = date("Y-m-d", $devInfo['auth_at']);
-
- if (!isset($info['dev_id'])) {
- $devInfo['realname'] = $devInfo['dev_name'] = $info['team']." 未认证 ";
- $authAt = "0000-00-00";
- }
- ShowMsg("开发者名称:{$devInfo['dev_name']}
开发者全称:{$devInfo['realname']}
开发者ID:{$devInfo['dev_id']} 未认证
$offUrl
认证于:{$authAt}
", "javascript:;");
- exit;
-}
-/*--------------
-function Setup();
---------------*/
-else if ($action == 'setup') {
- $dm = new DedeModule($mdir);
- $infos = $dm->GetModuleInfo($hash);
- if ($infos == null) {
- ShowMsg("获取模块信息错误,模块文件可能被篡改", -1);
- exit;
- }
- $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)');
- $filelists = $dm->GetFileLists($hash);
- $filelist = '';
- $prvdirs = array();
- $incdir = array();
- foreach ($filelists as $v) {
- if (empty($v['name'])) continue;
- if ($v['type'] == 'dir') {
- $v['type'] = '目录';
- $incdir[] = $v['name'];
- } else {
- $v['type'] = '文件';
- }
- $filelist .= "{$v['type']}|{$v['name']}\r\n";
- }
- //检测需要的目录权限
- foreach ($filelists as $v) {
- $prvdir = preg_replace("#\/([^\/]*)$#", '/', $v['name']);
- if (!preg_match("#^\.#", $prvdir)) $prvdir = './';
- $n = TRUE;
- foreach ($incdir as $k => $v) {
- if (preg_match("#^".$v."#i", $prvdir)) {
- $n = FALSE;
- break;
- }
- }
- if (!isset($prvdirs[$prvdir]) && $n && is_dir($prvdir)) {
- $prvdirs[$prvdir][0] = 1;
- $prvdirs[$prvdir][1] = TestWriteAble($prvdir);
- }
- }
- $prvdir = "
\r\n";
- $prvdir .= "目录 可写 \r\n";
- foreach ($prvdirs as $k => $v) {
- if ($v) $cw = '√';
- else $cw = '× ';
- $prvdir .= "$k ";
- $prvdir .= "$cw \r\n";
- }
- $prvdir .= "
";
- $win = new OxWindow();
- $win->Init("module_main.php", "js/blank.js", "post");
- $wecome_info = "模块管理";
- $win->AddTitle("
模块管理 >> 安装模块: {$infos['name']}");
- $win->AddHidden("hash", $hash);
- $win->AddHidden("action", 'setupstart');
- $msg = "
-
";
- $win->AddMsgItem("
$msg
");
- $winform = $win->GetWindow("ok", "");
- $win->Display();
- $dm->Clear();
- exit();
-}
-/*---------------
-function SetupRun()
---------------*/
-else if ($action == 'setupstart') {
- if (!is_writeable($mdir)) {
- ShowMsg("目录 {$mdir} 不支持写入,这将导致安装程序没法正常创建", "-1");
- exit();
- }
- $dm = new DedeModule($mdir);
- $minfos = $dm->GetModuleInfo($hash);
- extract($minfos, EXTR_SKIP);
- $menustring = addslashes($dm->GetSystemFile($hash, 'menustring'));
- $indexurl = str_replace('**', '=', $indexurl);
- $query = "INSERT INTO `#@__sys_module`(`hashcode` , `modname` , `indexname` , `indexurl` , `ismember` , `menustring` )
- VALUES ('$hash' , '$name' , '$indexname' , '$indexurl' , '$ismember' , '$menustring' ) ";
- $rs = $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' ");
- $rs = $dsql->ExecuteNoneQuery($query);
- if (!$rs) {
- ShowMsg('保存数据库信息失败,无法完成安装'.$dsql->GetError(), 'javascript:;');
- exit();
- }
- $dm->WriteFiles($hash, $isreplace);
- $filename = '';
- if (!isset($autosetup) || $autosetup == 0) $filename = $dm->WriteSystemFile($hash, 'setup');
- if (!isset($autodel) || $autodel == 0) $dm->WriteSystemFile($hash, 'uninstall');
- $dm->WriteSystemFile($hash, 'readme');
- $dm->Clear();
- //用模块的安装程序安装
- if (!isset($autosetup) || $autosetup == 0) {
- include(DEDEDATA.'/module/'.$filename);
- exit();
- }
- //系统自动安装
- else {
- $mysql_version = $dsql->GetVersion(TRUE);
- //默认使用MySQL 4.1 以下版本的SQL语句,对大于4.1版本采用替换处理 TYPE=MyISAM ==> ENGINE=MyISAM DEFAULT CHARSET=#~lang~#
- $setupsql = $dm->GetSystemFile($hash, 'setupsql40');
- $setupsql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $setupsql);
- $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language;
- if ($mysql_version >= 4.1) {
- $setupsql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $setupsql);
- }
- //_ROOTURL_
- if ($cfg_cmspath == '/') $cfg_cmspath = '';
- $rooturl = $cfg_basehost.$cfg_cmspath;
- $setupsql = preg_replace("#_ROOTURL_#i", $rooturl, $setupsql);
- $setupsql = preg_replace("#[\r\n]{1,}#", "\n", $setupsql);
- $sqls = @split(";[ \t]{0,}\n", $setupsql);
- foreach ($sqls as $sql) {
- if (trim($sql) != '') $dsql->ExecuteNoneQuery($sql);
- }
- ReWriteConfigAuto();
- $rflwft = "";
- echo $rflwft;
- UpDateCatCache();
- ShowMsg('模块安装完成...', 'module_main.php');
- exit();
- }
-}
-/*--------------
-function DelModule();
---------------*/
-else if ($action == 'del') {
- $dm = new DedeModule($mdir);
- $infos = $dm->GetModuleInfo($hash);
- $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)');
- $dev_id = empty($infos['dev_id'])? "
未认证 " : "{$infos['dev_id']}
未认证 ";
- $win = new OxWindow();
- $win->Init("module_main.php", "js/blank.js", "post");
- $wecome_info = "模块管理";
- $win->AddTitle("
模块管理 >> 删除模块: {$infos['name']}");
- $win->AddHidden('hash', $hash);
- $win->AddHidden('action', 'delok');
- $msg = "
-
-
- 模块名称:
- {$infos['name']}
-
-
- 语言:
- {$infos['lang']} {$alertMsg}
-
-
- 文件大小:
- {$infos['filesize']}
-
-
- 开发者ID:
- {$dev_id}
-
-
- 发布时间:
- {$infos['time']}
-
-
- 使用协议:
- 浏览
-
-
- 删除模块仅删除这个模块的安装包文件,如果您已经安装,请执行卸载程序 来删除
-
-
";
- $win->AddMsgItem("
$msg
");
- $winform = $win->GetWindow("ok", "");
- $win->Display();
- $dm->Clear();
- exit();
-} else if ($action == 'delok') {
- $dm = new DedeModule($mdir);
- $modfile = $mdir."/".$dm->GetHashFile($hash);
- unlink($modfile) or die("删除文件 {$modfile} 失败");
- ShowMsg("成功删除一个模块文件", "module_main.php");
- exit();
-}
-/*--------------
-function UnInstall();
---------------*/
-else if ($action == 'uninstall') {
- $dm = new DedeModule($mdir);
- $infos = $dm->GetModuleInfo($hash);
- if ($infos['url'] == '') $infos['url'] = ' ';
- $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)');
- $filelists = $dm->GetFileLists($hash);
- $filelist = '';
- foreach ($filelists as $v) {
- if (empty($v['name'])) continue;
- if ($v['type'] == 'dir') $v['type'] = '目录';
- else $v['type'] = '文件';
- $filelist .= "{$v['type']}|{$v['name']}\r\n";
- }
- $dev_id = empty($infos['dev_id'])? "
未认证 " : "{$infos['dev_id']}
未认证 ";
- $win = new OxWindow();
- $win->Init("module_main.php", "js/blank.js", "post");
- $wecome_info = "模块管理";
- $win->AddTitle("
模块管理 >> 卸载模块: {$infos['name']}");
- $win->AddHidden("hash", $hash);
- $win->AddHidden("action", 'uninstallok');
- $msg = "
-
";
- $win->AddMsgItem("
$msg
");
- $winform = $win->GetWindow("ok", "");
- $win->Display();
- $dm->Clear();
- exit();
-}
-/*--------------
-function UnInstallRun();
---------------*/
-else if ($action == 'uninstallok') {
- $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' ");
- $dm = new DedeModule($mdir);
- $minfos = $dm->GetModuleInfo($hash);
- extract($minfos, EXTR_SKIP);
- if (!isset($moduletype) || $moduletype != 'patch') {
- $dm->DeleteFiles($hash, $isreplace);
- }
- @$dm->DelSystemFile($hash, 'readme');
- @$dm->DelSystemFile($hash, 'setup');
- $dm->Clear();
- if (!isset($autodel) || $autodel == 0) {
- include(DEDEDATA."/module/{$hash}-uninstall.php");
- @unlink(DEDEDATA."/module/{$hash}-uninstall.php");
- exit();
- } else {
- @$dm->DelSystemFile($hash, 'uninstall');
- $delsql = $dm->GetSystemFile($hash, 'delsql');
- if (trim($delsql) != '') {
- $sqls = explode(';', $delsql);
- foreach ($sqls as $sql) {
- if (trim($sql) != '') $dsql->ExecuteNoneQuery($sql);
- }
- }
- ReWriteConfigAuto();
- $rflwft = "";
- echo $rflwft;
- ShowMsg('模块卸载完成...', 'module_main.php');
- exit();
- }
-}
-/*--------------
-function ShowReadme();
---------------*/
-else if ($action == 'showreadme') {
- $dm = new DedeModule($mdir);
- $msg = $dm->GetSystemFile($hash, 'readme');
- $msg = preg_replace("/(.*)(.*)/isU", "", $msg);
- $dm->Clear();
- $win = new OxWindow();
- $win->Init("module_main.php", "js/blank.js", "post");
- $wecome_info = "模块管理";
- $win->AddTitle("
模块管理 >> 使用说明:");
- $win->AddMsgItem("
$msg
");
- $winform = $win->GetWindow("hand");
- $win->Display();
- exit();
-}
-/*--------------
-function ViewOne();
---------------*/
-else if ($action == 'view') {
- $dm = new DedeModule($mdir);
- $infos = $dm->GetModuleInfo($hash);
- if ($infos['url'] == '') $infos['url'] = ' ';
- $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)');
- $filelists = $dm->GetFileLists($hash);
- $filelist = '';
- $setupinfo = '';
- foreach ($filelists as $v) {
- if (empty($v['name'])) continue;
- if ($v['type'] == 'dir') $v['type'] = '目录';
- else $v['type'] = '文件';
- $filelist .= "{$v['type']}|{$v['name']}\r\n";
- }
- if (file_exists(DEDEDATA."/module/{$hash}-readme.php")) {
- $setupinfo = "已安装
卸载 ";
- } else {
- $setupinfo = "未安装
安装 ";
- }
- $dev_id = empty($infos['dev_id'])? "
安装 未认证 " : "{$infos['dev_id']}
未认证 ";
- $win = new OxWindow();
- $win->Init("", "js/blank.js", "");
- $wecome_info = "模块管理";
- $win->AddTitle("
模块管理 >> 模块详情: {$infos['name']}");
- $msg = "
-
-
- 模块名称:
- {$infos['name']}
-
-
- 语言:
- {$infos['lang']} {$alertMsg}
-
-
- 文件大小:
- {$infos['filesize']}
-
-
- 开发者ID:
- {$dev_id}
-
-
- 发布时间:
- {$infos['time']}
-
-
- 使用协议:
- 浏览
-
-
- 模块包含的文件: (文件路径相对于当前目录)
-
-
-
- {$filelist}
-
-
-
";
- $win->AddMsgItem("
$msg
");
- $winform = $win->GetWindow('hand', '');
- $win->Display();
- $dm->Clear();
- exit();
-}
-/*--------------
-function Edit();
---------------*/
-else if ($action == 'edit') {
- $dm = new DedeModule($mdir);
- $minfos = $dm->GetModuleInfo($hash);
- extract($minfos, EXTR_SKIP);
- if (!isset($lang)) $lang = 'gb2312';
- if (!isset($moduletype)) $moduletype = 'soft';
- $menustring = $dm->GetSystemFile($hash, 'menustring');
- $setupsql40 = dede_htmlspecialchars($dm->GetSystemFile($hash, 'setupsql40'));
- $readmetxt = $dm->GetSystemFile($hash, 'readme');
- $delsql = $dm->GetSystemFile($hash, 'delsql');
- $filelist = $dm->GetSystemFile($hash, 'oldfilelist', false);
- $indexurl = str_replace('**', '=', $indexurl);
- $dm->Clear();
- require_once(dirname(__FILE__).'/templets/module_edit.htm');
- exit();
-}
-/*--------------
-function Download();
---------------*/
-else if ($action == 'download') {
- ShowMsg("暂不支持模块下载功能", "javascript:;");
-}
\ No newline at end of file
diff --git a/src/dede/templets/archives_edit.htm b/src/dede/templets/archives_edit.htm
deleted file mode 100755
index 8521bf13..00000000
--- a/src/dede/templets/archives_edit.htm
+++ /dev/null
@@ -1,434 +0,0 @@
-
-
-
-
-
更改文档
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- '>
-
-
-
-
- 0)
- {
- echo " \r\n";
- echo " \r\n";
- }
- else
- {
- ?>
-
-
-
-
- 文档主栏目:
-
- getUserChannel(),$channelid);
- echo "\r\n";
- if($arcRow["typeid"]=="0") echo "请选择栏目... \r\n";
- echo $typeOptions;
- echo " ";
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/dede/templets/archives_sg_add.htm b/src/dede/templets/archives_sg_add.htm
deleted file mode 100755
index ab4c8477..00000000
--- a/src/dede/templets/archives_sg_add.htm
+++ /dev/null
@@ -1,218 +0,0 @@
-
-
-
-
-
发布文档
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- '>
-
-
-
- 缩 略 图:
-
-
-
-
-
-
-
-
-
-
-
-
-
- 浏览权限:
-
-
- getUserRank();
- $dsql->SetQuery("Select * from `#@__arcrank` where adminrank<='$urank'");
- $dsql->Execute();
- while($row = $dsql->GetObject())
- {
- echo " ".$row->membername." \r\n";
- }
- ?>
-
-
-
-
-
-
-
-
- 0)
- {
- echo " \r\n";
- }
- else
- {
- ?>
-
-
-
-
- 文档主栏目:
-
-
- getUserChannel(),$channelid);
- echo "\r\n";
- echo "请选择栏目... \r\n";
- echo $typeOptions;
- echo " ";
- ?>
-
- 栏目管理
- 增加大栏目
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/templets/archives_sg_edit.htm b/src/dede/templets/archives_sg_edit.htm
deleted file mode 100755
index 1020225b..00000000
--- a/src/dede/templets/archives_sg_edit.htm
+++ /dev/null
@@ -1,210 +0,0 @@
-
-
-
-
-
更改文档
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 浏览权限:
-
-
-
- getUserRank();
- $dsql->SetQuery("Select * from `#@__arcrank` where adminrank<='$urank' And rank<>'{$addRow["arcrank"]}' ");
- $dsql->Execute();
- while($row = $dsql->GetObject()) {
- echo " ".$row->membername." \r\n";
- }
- ?>
-
-
-
-
-
-
-
- '>
-
-
-
- 0)
- {
- echo " \r\n";
- }
- else
- {
- ?>
-
-
-
- 文档主栏目:
-
- getUserChannel(),$channelid);
- echo "\r\n";
- if($addRow["typeid"]=="0") echo "请选择栏目... \r\n";
- echo $typeOptions;
- echo " ";
- ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/templets/catalog_add.htm b/src/dede/templets/catalog_add.htm
deleted file mode 100755
index b4c259e4..00000000
--- a/src/dede/templets/catalog_add.htm
+++ /dev/null
@@ -1,588 +0,0 @@
-
-
-
-
-
栏目管理
-
-
-
-
-
-
-
-
-
-
-
-
-
- 栏目管理 >> 增加栏目
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0)
- {
- echo " \r\n";
- echo " \r\n";
- echo " \r\n";
- }
-?>
-
-
-
-
-
-
-
-
-
-
-
-
-
- 说明:栏目内容是替代原来栏目单独页的更灵活的一种方式,可在栏目模板中用{dede:field.content/}调用,通常用于企业简介之类的用途。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/templets/catalog_edit.htm b/src/dede/templets/catalog_edit.htm
deleted file mode 100755
index 06f24ab7..00000000
--- a/src/dede/templets/catalog_edit.htm
+++ /dev/null
@@ -1,519 +0,0 @@
-
-
-
-
-
栏目管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 说明:栏目内容是替代原来栏目单独页的更灵活的一种方式,可在栏目模板中用{dede:field.content/}调用,通常用于企业简介之类的用途。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/templets/content_i_list.htm b/src/dede/templets/content_i_list.htm
deleted file mode 100755
index 72cbee9c..00000000
--- a/src/dede/templets/content_i_list.htm
+++ /dev/null
@@ -1,172 +0,0 @@
-
-
-
-
-
-
文档管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 添加文档
- {dede:if $adminid == $mid }
- 全部文档
- {else}
- 我的文档
- {/dede:if}
- {dede:global.CheckUserSend/}
- 栏目管理
- 更新列表
- 更新文档
- 文章回收站
-
-
-
-
-
-
-
- {dede:global.positionname/}文档列表 (使用鼠标右键进行常用操作)
-
-
-
- 文档图片
- 文档标题
- 类目
- 权限
- 发布人
- HTML
- 点击
-
-
-
-
- {dede:datalist}
-
- {/dede:datalist}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/templets/content_s_list.htm b/src/dede/templets/content_s_list.htm
deleted file mode 100755
index ed60ec76..00000000
--- a/src/dede/templets/content_s_list.htm
+++ /dev/null
@@ -1,219 +0,0 @@
-
-
-
-
-
- 专题管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 更新专题HTML
- 添加专题
-
- 频道管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/templets/desktop.ini b/src/dede/templets/desktop.ini
deleted file mode 100644
index 96ee15ea..00000000
--- a/src/dede/templets/desktop.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[LocalizedFileNames]
-article_edit.htm=@article_edit.htm,0
diff --git a/src/dede/templets/index_body.htm b/src/dede/templets/index_body.htm
deleted file mode 100755
index f06ea35e..00000000
--- a/src/dede/templets/index_body.htm
+++ /dev/null
@@ -1,366 +0,0 @@
-
-
-
-
-系统概况
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
欢迎使用国内流行的内容管理系统多端全媒体解决方案 --
-
-
-
-
-
-
-
- SetNameSpace('menu','<','>');
- $dtp->LoadTemplet($myIcoFile);
- if(is_array($dtp->CTags)){
- foreach($dtp->CTags as $ctag){
- $title = $ctag->GetAtt('title');
- $link = $ctag->GetAtt('link');
- echo "{$title} ";
- }
- }
- ?>
-
-
-
-
-
-
-
-
-
-
-
- 您的级别:
- getUserType()==10) {
- echo "总管理员";
- } else if($cuserLogin->getUserType()==5) {
- echo "频道总编";
- } else {
- echo "信息采集员或其它管理员";
- }
- ?>
-
- 查看更多
-
-
-
-
-
- PHP环境摘要:
-
- PHP版本:
- GD版本:
-
-
-
- 是否安全模式:
- 更改系统参数 里的FTP选项,并选择用FTP形式创建目录";
- }
- ?>
-
-
-
-
- Register_Globals:
- Magic_Quotes_Gpc:
-
-
-
- 支持上传的最大文件:
-
-
- 是否允许打开远程连接:
-
-
- 其它必须函数检测:
-
- [{$k}×] ";
- $n++;
- }
- }
- if($n==0) {
- echo "符合要求";
- } else {
- echo "被禁用的函数可能导致部份功能无法使用";
- }
- ?>
-
-
-
- 软件版本信息:
-
- 版本名称:
- 版本号:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -2 ORDER BY arc.id DESC LIMIT 0, 5";
- $arcArr = array();
- $dsql->Execute('m', $query);
- while($row = $dsql->GetArray('m'))
- {
- $arcArr[] = $row;
- }
- ?>
-
- 1)
- {
- foreach($arcArr as $row)
- {
- if(trim($row['editcon'])=='') {
- $row['editcon'] = 'archives_edit.php';
- }
- $linkstr = "{$row['title']} ";
- if($row['arcrank']==-1) $linkstr .= "未审核 ";
- ?>
-
-
-
-
-
- 暂无新增内容
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/templets/shops_operations_cart.htm b/src/dede/templets/shops_operations_cart.htm
deleted file mode 100755
index f03743e7..00000000
--- a/src/dede/templets/shops_operations_cart.htm
+++ /dev/null
@@ -1,85 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- 订单信息
-
-{dede:datalist}
-
- 订单号:
- {dede:field.oid/}
-
-
- 商品名称:
- {dede:field.title/}
-
-
- 单价(元/单位):
- {dede:field.uprice/}
-
-
- 数量:
- {dede:field.cartcount/}
-
-
- 支付方式:
-
-
-
- 配送:
- {dede:field.dname/} 费用:{dede:field.dprice/}元
-
-
- 购买时间:
- {dede:field.stime function=GetDateTimeMk(@me)/}
-
-
- 收货人:
-
-
-
- 地址:
-
-
-
- 邮编:
-
-
-
- 联系电话:
-
-
-
- 邮箱:
-
-
-
- 留言:
-
-
-
- 合计(元):
- {dede:field.priceCount/}元
-
-{/dede:datalist}
-
-
-
- 关闭窗口
-
-
-
-
订单总计: {dede:field.priceCount/} 元, {dede:pagelist listsize=3/}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/templets/tags_main.htm b/src/dede/templets/tags_main.htm
deleted file mode 100755
index 818802ab..00000000
--- a/src/dede/templets/tags_main.htm
+++ /dev/null
@@ -1,225 +0,0 @@
-
-
-
-
-
- tags管理
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/dede/templets/tpl_newfile.htm b/src/dede/templets/tpl_newfile.htm
deleted file mode 100755
index 1e902f52..00000000
--- a/src/dede/templets/tpl_newfile.htm
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
- 文件编辑
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/include/archives.func.php b/src/include/archives.func.php
deleted file mode 100755
index 71bb14b8..00000000
--- a/src/include/archives.func.php
+++ /dev/null
@@ -1,7 +0,0 @@
-=')) {
- if (!function_exists('mysql_connect') and function_exists('mysqli_connect')) {
- function mysql_connect($server, $username, $password)
- {
- return mysqli_connect($server, $username, $password);
- }
- }
- if (!function_exists('mysql_query') and function_exists('mysqli_query')) {
- function mysql_query($query, $link)
- {
- return mysqli_query($link, $query);
- }
- }
- if (!function_exists('mysql_select_db') and function_exists('mysqli_select_db')) {
- function mysql_select_db($database_name, $link)
- {
- return mysqli_select_db($link, $database_name);
- }
- }
- if (!function_exists('mysql_fetch_array') and function_exists('mysqli_fetch_array')) {
- function mysql_fetch_array($result)
- {
- return mysqli_fetch_array($result);
- }
- }
- if (!function_exists('mysql_close') and function_exists('mysqli_close')) {
- function mysql_close($link)
- {
- return mysqli_close($link);
- }
- }
- if (!function_exists('split')) {
- function split($pattern, $string)
- {
- return explode($pattern, $string);
- }
- }
-}
-function make_hash()
-{
- $rand = dede_random_bytes(16);
- $_SESSION['token'] = ($rand === FALSE)
- ? md5(uniqid(mt_rand(), TRUE))
- : bin2hex($rand);
- return $_SESSION['token'];
-}
-function dede_random_bytes($length)
-{
- if (empty($length) or !ctype_digit((string) $length)) {
- return FALSE;
- }
- if (function_exists('openssl_random_pseudo_bytes')) {
- return openssl_random_pseudo_bytes($length);
- }
- if (function_exists('random_bytes')) {
- try {
- return random_bytes((int) $length);
- } catch (Exception $e) {
- return FALSE;
- }
- }
- if (defined('MCRYPT_DEV_URANDOM') && ($output = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM)) !== FALSE) {
- return $output;
- }
- if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE) {
- version_compare(PHP_VERSION, '5.4.0', '>=') && stream_set_chunk_size($fp, $length);
- $output = fread($fp, $length);
- fclose($fp);
- if ($output !== FALSE) {
- return $output;
- }
- }
- return FALSE;
-}
-/**
- * 载入小助手,系统默认载入小助手
- * 在/data/helper.inc.php中进行默认小助手初始化的设置
- * 使用示例:
- * 在开发中,首先需要创建一个小助手函数,目录在\include\helpers中
- * 例如,我们创建一个示例为test.helper.php,文件基本内容如下:
- *
- * if ( ! function_exists('HelloDede'))
- * {
- * function HelloDede()
- * {
- * echo "Hello! Dede...";
- * }
- * }
- *
- * 则我们在开发中使用这个小助手的时候直接使用函数helper('test');初始化它
- * 然后在文件中就可以直接使用:HelloDede();来进行调用.
- *
- * @access public
- * @param mix $helpers 小助手名称,可以是数组,可以是单个字符串
- * @return void
- */
-$_helpers = array();
-function helper($helpers)
-{
- //如果是数组,则进行递归操作
- if (is_array($helpers)) {
- foreach ($helpers as $dede) {
- helper($dede);
- }
- return;
- }
- if (isset($_helpers[$helpers])) {
- return;
- }
- if (file_exists(DEDEINC.'/helpers/'.$helpers.'.helper.php')) {
- include_once(DEDEINC.'/helpers/'.$helpers.'.helper.php');
- $_helpers[$helpers] = TRUE;
- }
- //无法载入小助手
- if (!isset($_helpers[$helpers])) {
- exit('Unable to load the requested file: helpers/'.$helpers.'.helper.php');
- }
-}
-function dede_htmlspecialchars($str)
-{
- global $cfg_soft_lang;
- if (version_compare(PHP_VERSION, '5.4.0', '<')) return htmlspecialchars($str);
- if ($cfg_soft_lang == 'gb2312') return htmlspecialchars($str, ENT_COMPAT, 'ISO-8859-1');
- else return htmlspecialchars($str);
-}
-/**
- * 载入小助手,这里用户可能载入用helps载入多个小助手
- *
- * @access public
- * @param string
- * @return string
- */
-function helpers($helpers)
-{
- helper($helpers);
-}
-//兼容php4的file_put_contents
-if (!function_exists('file_put_contents')) {
- function file_put_contents($n, $d)
- {
- $f = @fopen($n, "w");
- if (!$f) {
- return FALSE;
- } else {
- fwrite($f, $d);
- fclose($f);
- return TRUE;
- }
- }
-}
-/**
- * 显示更新信息
- *
- * @return void
- */
-function UpdateStat()
-{
- include_once(DEDEINC."/inc/inc_stat.php");
- return SpUpdateStat();
-}
-$arrs1 = array();
-$arrs2 = array();
-/**
- * 短消息函数,可以在某个动作处理后友好的提示信息
- *
- * @param string $msg 消息提示信息
- * @param string $gourl 跳转地址
- * @param int $onlymsg 仅显示信息
- * @param int $limittime 限制时间
- * @return void
- */
-function ShowMsg($msg, $gourl, $onlymsg = 0, $limittime = 0)
-{
- global $cfg_soft_lang, $cfg_cmsurl;
- if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..';
- $htmlhead = "提示信息 ";
- $htmlhead .= " ".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')." ";
- $litime = ($limittime == 0 ? 1000 : $limittime);
- $func = '';
- if ($gourl == '-1') {
- if ($limittime == 0) $litime = 5000;
- $gourl = "javascript:history.go(-1);";
- }
- if ($gourl == '' || $onlymsg == 1) {
- $msg = "";
- } else {
- //当网址为:close::objname 时, 关闭父框架的id=objname元素
- if (preg_match('/close::/', $gourl)) {
- $tgobj = trim(preg_replace('/close::/', '', $gourl));
- $gourl = 'javascript:;';
- $func .= "window.parent.document.getElementById('{$tgobj}').style.display='none';\r\n";
- }
- $func .= "var pgo=0;function JumpUrl(){if (pgo==0){location='$gourl'; pgo=1;}}";
- $rmsg = $func;
- $rmsg .= "document.write(\"\");";
- $rmsg .= "document.write(\"";
- $rmsg .= "
\");";
- $rmsg .= "document.write(\"
\");";
- $rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");";
- $rmsg .= "document.write(\"";
- if($onlymsg==0)
- {
- if( $gourl != 'javascript:;' && $gourl != '')
- {
- $rmsg .= "
\");";
- $rmsg .= "setTimeout('JumpUrl()',$litime);";
- } else {
- $rmsg .= "
\");";
- }
- } else {
- $rmsg .= "
\");";
- }
- $msg = $htmlhead.$rmsg.$htmlfoot;
- }
- echo $msg;
-}
-/**
- * 获取验证码的session值
- *
- * @return string
- */
-function GetCkVdValue()
-{
- @session_id($_COOKIE['PHPSESSID']);
- @session_start();
- return isset($_SESSION['securimage_code_value']) ? $_SESSION['securimage_code_value'] : '';
-}
-/**
- * PHP某些版本有Bug,不能在同一作用域中同时读session并改注销它,因此调用后需执行本函数
- *
- * @return void
- */
-function ResetVdValue()
-{
- @session_start();
- $_SESSION['securimage_code_value'] = '';
-}
-function IndexSub($idx, $num)
-{
- return intval($idx) - intval($num) == 0 ? '0 ' : intval($idx) - intval($num);
-}
-// 用来返回index的active
-function IndexActive($idx)
-{
- if ($idx == 1) {
- return ' active';
- } else {
- return '';
- }
-}
-// 自定义函数接口
-// 这里主要兼容早期的用户扩展,v5.7之后我们建议使用小助手helper进行扩展
-if (file_exists(DEDEINC.'/extend.func.php')) {
- require_once(DEDEINC.'/extend.func.php');
-}
\ No newline at end of file
diff --git a/src/include/data/base_dic_full.zip b/src/include/data/base_dic_full.zip
deleted file mode 100755
index d2e7cc3b..00000000
Binary files a/src/include/data/base_dic_full.zip and /dev/null differ
diff --git a/src/include/extend.func.php b/src/include/extend.func.php
deleted file mode 100755
index 6fd199e6..00000000
--- a/src/include/extend.func.php
+++ /dev/null
@@ -1 +0,0 @@
- $val) {
- $str = str_replace($key, " ", $str);
- }
-
- return $ubb ? ubb($str) : $str;
- }
-}
diff --git a/src/include/payment/alipay.php b/src/include/payment/alipay.php
deleted file mode 100755
index 7304c9bf..00000000
--- a/src/include/payment/alipay.php
+++ /dev/null
@@ -1,292 +0,0 @@
-dsql = $dsql;
- }
-
- function __construct()
- {
- $this->Alipay();
- }
-
- /**
- * 设定接口会送地址
- *
- * 例如: $this->SetReturnUrl($cfg_basehost."/tuangou/control/index.php?ac=pay&orderid=".$p2_Order)
- *
- * @param string $returnurl 会送地址
- * @return void
- */
- function SetReturnUrl($returnurl='')
- {
- if (!empty($returnurl))
- {
- $this->return_url = $returnurl;
- }
- }
-
- /**
- * 生成支付代码
- * @param array $order 订单信息
- * @param array $payment 支付方式信息
- */
- function GetCode($order, $payment)
- {
- global $cfg_basehost,$cfg_cmspath,$cfg_soft_lang;
- $charset = $cfg_soft_lang;
- //对于二级目录的处理
- if(!empty($cfg_cmspath)) $cfg_basehost = $cfg_basehost.'/'.$cfg_cmspath;
-
- $real_method = $payment['alipay_pay_method'];
-
- switch ($real_method){
- case '0':
- $service = 'trade_create_by_buyer';
- break;
- case '1':
- $service = 'create_partner_trade_by_buyer';
- break;
- case '2':
- $service = 'create_direct_pay_by_user';
- break;
- }
- $agent = 'C4335994340215837114';
- $parameter = array(
- 'agent' => $agent,
- 'service' => $service,
- 'partner' => $payment['alipay_partner'],
- //'partner' => ALIPAY_ID,
- '_input_charset' => $charset,
- 'notify_url' => $cfg_basehost.$this->return_url."&code=".$payment['code'],
- 'return_url' => $cfg_basehost.$this->return_url."&code=".$payment['code'],
- /* 业务参数 */
- 'subject' => "支付订单号:".$order['out_trade_no'],
- 'out_trade_no' => $order['out_trade_no'],
- 'price' => $order['price'],
- 'quantity' => 1,
- 'payment_type' => 1,
- /* 物流参数 */
- 'logistics_type' => 'EXPRESS',
- 'logistics_fee' => 0,
- 'logistics_payment' => 'BUYER_PAY_AFTER_RECEIVE',
- /* 买卖双方信息 */
- 'seller_email' => $payment['alipay_account']
- );
-
- ksort($parameter);
- reset($parameter);
-
- $param = '';
- $sign = '';
-
- foreach ($parameter AS $key => $val)
- {
- $param .= "$key=" .urlencode($val). "&";
- $sign .= "$key=$val&";
- }
-
- $param = substr($param, 0, -1);
- $sign = substr($sign, 0, -1). $payment['alipay_key'];
-
- $button = '
';
-
- /* 清空购物车 */
- require_once DEDEINC.'/shopcar.class.php';
- $cart = new MemberShops();
- $cart->clearItem();
- $cart->MakeOrders();
- return $button;
- }
-
-
- /**
- * 响应操作
- */
- function respond()
- {
- if (!empty($_POST))
- {
- foreach($_POST as $key => $data)
- {
- $_GET[$key] = $data;
- }
- }
- /* 引入配置文件 */
- $code = preg_replace( "#[^0-9a-z-]#i", "", $_GET['code'] );
- require_once DEDEDATA.'/payment/'.$code.'.php';
-
- /* 取得订单号 */
- $order_sn = trim(addslashes($_GET['out_trade_no']));
- /*判断订单类型*/
- if(preg_match ("/S-P[0-9]+RN[0-9]/",$order_sn)) {
- //检查支付金额是否相符
- $row = $this->dsql->GetOne("SELECT * FROM #@__shops_orders WHERE oid = '{$order_sn}'");
- if ($row['priceCount'] != $_GET['total_fee'])
- {
- return $msg = "支付失败,支付金额与商品总价不相符!";
- }
- $this->mid = $row['userid'];
- $ordertype="goods";
- }else if (preg_match ("/M[0-9]+T[0-9]+RN[0-9]/", $order_sn)){
- $row = $this->dsql->GetOne("SELECT * FROM #@__member_operation WHERE buyid = '{$order_sn}'");
- //获取订单信息,检查订单的有效性
- if(!is_array($row)||$row['sta']==2) return $msg = "您的订单已经处理,请不要重复提交!";
- elseif($row['money'] != $_GET['total_fee']) return $msg = "支付失败,支付金额与商品总价不相符!";
- $ordertype = "member";
- $product = $row['product'];
- $pname= $row['pname'];
- $pid=$row['pid'];
- $this->mid = $row['mid'];
- } else {
- return $msg = "支付失败,您的订单号有问题";
- }
-
- /* 检查数字签名是否正确 */
- ksort($_GET);
- reset($_GET);
-
- $sign = '';
- foreach ($_GET AS $key=>$val)
- {
- if ($key != 'sign' && $key != 'sign_type' && $key != 'code' && $key != 'dopost')
- {
- $sign .= "$key=$val&";
- }
- }
-
- $sign = substr($sign, 0, -1).$payment['alipay_key'];
-
- if (md5($sign) != $_GET['sign'])
- {
- return $msg = "支付失败!";
- }
-
- if($_GET['trade_status'] == 'TRADE_FINISHED' || $_GET['trade_status'] == 'WAIT_SELLER_SEND_GOODS' || $_GET['trade_status'] == 'TRADE_SUCCESS')
- {
- if($ordertype=="goods"){
- if($this->success_db($order_sn)) return $msg = "支付成功! 返回主页 会员中心 ";
- else return $msg = "支付失败 返回主页 会员中心 ";
- } else if ( $ordertype=="member" ) {
- $oldinf = $this->success_mem($order_sn,$pname,$product,$pid);
- return $msg = "".$oldinf." 返回主页 会员中心 ";
- }
- } else {
- $this->log_result ("verify_failed");
- return $msg = "支付失败 返回主页 会员中心 ";
- }
- }
-
- /*处理物品交易*/
- function success_db($order_sn)
- {
- //获取订单信息,检查订单的有效性
- $row = $this->dsql->GetOne("SELECT state FROM #@__shops_orders WHERE oid='$order_sn' ");
- if($row['state'] > 0)
- {
- return TRUE;
- }
- /* 改变订单状态_支付成功 */
- $sql = "UPDATE `#@__shops_orders` SET `state`='1' WHERE `oid`='$order_sn' AND `userid`='".$this->mid."'";
- if($this->dsql->ExecuteNoneQuery($sql))
- {
- $this->log_result("verify_success,订单号:".$order_sn); //将验证结果存入文件
- return TRUE;
- } else {
- $this->log_result ("verify_failed,订单号:".$order_sn);//将验证结果存入文件
- return FALSE;
- }
- }
-
- /*处理点卡,会员升级*/
- function success_mem($order_sn,$pname,$product,$pid)
- {
- //更新交易状态为已付款
- $sql = "UPDATE `#@__member_operation` SET `sta`='1' WHERE `buyid`='$order_sn' AND `mid`='".$this->mid."'";
- $this->dsql->ExecuteNoneQuery($sql);
-
- /* 改变点卡订单状态_支付成功 */
- if($product=="card")
- {
- $row = $this->dsql->GetOne("SELECT cardid FROM #@__moneycard_record WHERE ctid='$pid' AND isexp='0' ");;
- //如果找不到某种类型的卡,直接为用户增加金币
- if(!is_array($row))
- {
- $nrow = $this->dsql->GetOne("SELECT num FROM #@__moneycard_type WHERE pname = '{$pname}'");
- $dnum = $nrow['num'];
- $sql1 = "UPDATE `#@__member` SET `money`=money+'{$nrow['num']}' WHERE `mid`='".$this->mid."'";
- $oldinf ="已经充值了".$nrow['num']."金币到您的帐号";
- } else {
- $cardid = $row['cardid'];
- $sql1=" UPDATE #@__moneycard_record SET uid='".$this->mid."',isexp='1',utime='".time()."' WHERE cardid='$cardid' ";
- $oldinf='您的充值密码是:'.$cardid.' ';
- }
- //更新交易状态为已关闭
- $sql2=" UPDATE #@__member_operation SET sta=2,oldinfo='$oldinf' WHERE buyid='$order_sn'";
- if($this->dsql->ExecuteNoneQuery($sql1) && $this->dsql->ExecuteNoneQuery($sql2))
- {
- $this->log_result("verify_success,订单号:".$order_sn); //将验证结果存入文件
- return $oldinf;
- } else {
- $this->log_result ("verify_failed,订单号:".$order_sn);//将验证结果存入文件
- return "支付失败";
- }
- /* 改变会员订单状态_支付成功 */
- } else if ( $product=="member" ){
- $row = $this->dsql->GetOne("SELECT rank,exptime FROM #@__member_type WHERE aid='$pid' ");
- $rank = $row['rank'];
- $exptime = $row['exptime'];
- /*计算原来升级剩余的天数*/
- $rs = $this->dsql->GetOne("SELECT uptime,exptime FROM #@__member WHERE mid='".$this->mid."'");
- if($rs['uptime']!=0 && $rs['exptime']!=0 )
- {
- $nowtime = time();
- $mhasDay = $rs['exptime'] - ceil(($nowtime - $rs['uptime'])/3600/24) + 1;
- $mhasDay=($mhasDay>0)? $mhasDay : 0;
- }
- //获取会员默认级别的金币和积分数
- $memrank = $this->dsql->GetOne("SELECT money,scores FROM #@__arcrank WHERE rank='$rank'");
- //更新会员信息
- $sql1 = " UPDATE #@__member SET rank='$rank',money=money+'{$memrank['money']}',
- scores=scores+'{$memrank['scores']}',exptime='$exptime'+'$mhasDay',uptime='".time()."'
- WHERE mid='".$this->mid."'";
- //更新交易状态为已关闭
- $sql2=" UPDATE #@__member_operation SET sta='2',oldinfo='会员升级成功!' WHERE buyid='$order_sn' ";
- if($this->dsql->ExecuteNoneQuery($sql1) && $this->dsql->ExecuteNoneQuery($sql2))
- {
- $this->log_result("verify_success,订单号:".$order_sn); //将验证结果存入文件
- return "会员升级成功";
- } else {
- $this->log_result ("verify_failed,订单号:".$order_sn);//将验证结果存入文件
- return "会员升级失败";
- }
- }
- }
-
- function log_result($word)
- {
- global $cfg_cmspath;
- $fp = fopen(dirname(__FILE__)."/../../data/payment/log.txt","a");
- flock($fp, LOCK_EX) ;
- fwrite($fp,$word.",执行日期:".strftime("%Y-%m-%d %H:%I:%S",time())."\r\n");
- flock($fp, LOCK_UN);
- fclose($fp);
- }
-}//End API
\ No newline at end of file
diff --git a/src/include/payment/bank.php b/src/include/payment/bank.php
deleted file mode 100755
index abd6d0ce..00000000
--- a/src/include/payment/bank.php
+++ /dev/null
@@ -1,54 +0,0 @@
-bank();
- }
-
- /**
- * 设置回送地址
- */
-
- function SetReturnUrl($returnurl='')
- {
- return "";
- }
-
- /**
- * 提交函数
- */
- function GetCode($order,$payment)
- {
- require_once DEDEINC.'/shopcar.class.php';
- $cart = new MemberShops();
- $cart->clearItem();
- $cart->MakeOrders();
- if($payment=="member") $button="您可以 返回首页 或去 会员中心 ";
- else $button="您可以 返回首页 或去 查看订单 ";
- return $button;
- }
-
-}//End API
\ No newline at end of file
diff --git a/src/include/payment/cod.php b/src/include/payment/cod.php
deleted file mode 100755
index 54233f9d..00000000
--- a/src/include/payment/cod.php
+++ /dev/null
@@ -1,51 +0,0 @@
-Cod();
- }
-
- /**
- * 设置回送地址
- */
-
- function SetReturnUrl($returnurl='')
- {
- return "";
- }
-
- /**
- * 获取代码
- */
- function GetCode($order)
- {
- require_once DEDEINC.'/shopcar.class.php';
- $cart = new MemberShops();
- $cart->clearItem();
- $cart->MakeOrders();
- $button="您可以 返回首页 或去 查看订单 ";
- return $button;
- }
-
-}//End API
\ No newline at end of file
diff --git a/src/include/payment/yeepay.php b/src/include/payment/yeepay.php
deleted file mode 100755
index b69572d5..00000000
--- a/src/include/payment/yeepay.php
+++ /dev/null
@@ -1,424 +0,0 @@
-dsql = $dsql;
- }
-
- function __construct()
- {
- $this->yeepay();
- }
-
- /**
- * 设定接口会送地址
- *
- * 例如: $this->SetReturnUrl($cfg_basehost."/tuangou/control/index.php?ac=pay&orderid=".$p2_Order)
- *
- * @param string $returnurl 会送地址
- * @return void
- */
- function SetReturnUrl($returnurl='')
- {
- if (!empty($returnurl))
- {
- $this->return_url = $returnurl;
- }
- }
-
- /**
- * 生成支付代码
- * @param array $order 订单信息
- * @param array $payment 支付方式信息
- */
- function GetCode($order, $payment)
- {
- global $cfg_basehost,$cfg_cmspath;
- //对于二级目录的处理
- if(!empty($cfg_cmspath)) $cfg_basehost = $cfg_basehost.'/'.$cfg_cmspath;
-
- # 商家设置用户购买商品的支付信息.
- ##易宝支付平台统一使用GBK/GB2312编码方式,参数如用到中文,请注意转码
-
- # 商户订单号,选填.
- ##若不为"",提交的订单号必须在自身账户交易中唯一;为""时,易宝支付会自动生成随机的商户订单号.
- $p2_Order = trim($order['out_trade_no']);
-
- # 支付金额,必填.
- ##单位:元,精确到分.
- $p3_Amt = $order['price'];
-
- # 交易币种,固定值"CNY".
- $p4_Cur = "CNY";
-
- # 商品名称
- ##用于支付时显示在易宝支付网关左侧的订单产品信息.
- $p5_Pid = trim($order['out_trade_no']);
-
- # 商品种类
- $p6_Pcat = 'cart';
-
- # 商品描述
- $p7_Pdesc = '';
-
- # 商户接收支付成功数据的地址,支付成功后易宝支付会向该地址发送两次成功通知.
- //$p8_Url = $cfg_basehost."/plus/carbuyaction.php?dopost=return&code=".$payment['code'];
- $p8_Url = $cfg_basehost.$this->return_url.'&code='.$payment['code'];
-
- # 商户扩展信息
- ##商户可以任意填写1K 的字符串,支付成功时将原样返回.
- $pa_MP = 'member';
-
- # 应答机制
- ##为"1": 需要应答机制;为"0": 不需要应答机制.
- $pr_NeedResponse = 1;
-
- # 银行编码
- ##默认为"",到易宝支付网关.若不需显示易宝支付的页面,直接跳转到各银行、神州行支付、骏网一卡通等支付页面,该字段可依照附录:银行列表设置参数值.
- $pd_FrpId = '';
- #调用签名函数生成签名串
- $hmac = $this->getReqHmacString($payment['yp_account'],$payment['yp_key'],$p2_Order,$p3_Amt,$p4_Cur,$p5_Pid,$p6_Pcat,$p7_Pdesc,$p8_Url,$pa_MP,$pd_FrpId,$pr_NeedResponse);
-
- $button = '
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ';
-
- /* 清空购物车 */
- require_once DEDEINC.'/shopcar.class.php';
- $cart = new MemberShops();
- $cart->clearItem();
- $cart->MakeOrders();
- return $button;
- }
-
- /**
- * 响应操作
- */
- function respond()
- {
-
- /* 引入配置文件 */
- $code = preg_replace( "#[^0-9a-z-]#i", "", $_REQUEST['code'] );
- require_once DEDEDATA.'/payment/'.$code.'.php';
-
- $p1_MerId = trim($payment['yp_account']);
- $merchantKey = trim($payment['yp_key']);
-
- # 解析返回参数.
- $return = $this->getCallBackValue($r0_Cmd, $r1_Code, $r2_TrxId, $r3_Amt, $r4_Cur, $r5_Pid, $r6_Order, $r7_Uid, $r8_MP, $r9_BType, $hmac);
-
- # 判断返回签名是否正确(True/False)
- $bRet = $this->CheckHmac($p1_MerId,$merchantKey,$r0_Cmd,$r1_Code,$r2_TrxId,$r3_Amt,$r4_Cur,$r5_Pid,$r6_Order,$r7_Uid,$r8_MP,$r9_BType,$hmac);
-
- # 校验码正确.
- if($bRet)
- {
- if($r1_Code=="1")
- {
- /*判断订单类型*/
- if(preg_match ("/S-P[0-9]+RN[0-9]/",$r6_Order))
- {
- //获取用户mid
- $row = $this->dsql->GetOne("SELECT * FROM #@__shops_orders WHERE oid = '{$r6_Order}'");
- $this->mid = $row['userid'];
- $ordertype="goods";
- } else if (preg_match ("/M[0-9]+T[0-9]+RN[0-9]/",$r6_Order)){
- $row = $this->dsql->GetOne("SELECT * FROM #@__member_operation WHERE buyid = '{$r6_Order}'");
- //获取订单信息,检查订单的有效性
- if(!is_array($row)||$row['sta']==2) return $msg = "您的订单已经处理,请不要重复提交!";
- $ordertype = "member";
- $product = $row['product'];
- $pname= $row['pname'];
- $pid=$row['pid'];
- $this->mid = $row['mid'];
- } else {
- return $msg = "支付失败,您的订单号有问题!";
- }
-
-
- # 需要比较返回的金额与商家数据库中订单的金额是否相等,只有相等的情况下才认为是交易成功.
- # 并且需要对返回的处理进行事务控制,进行记录的排它性处理,防止对同一条交易重复发货的情况发生.
- if($r9_BType == "1" || $r9_BType == "3"){
- if($ordertype == "goods"){
- if($this->success_db($r6_Order)) return $msg = "支付成功! 返回主页 会员中心 ";
- else return $msg = "支付失败! 返回主页 会员中心 ";
- } else if ($ordertype=="member") {
- $oldinf = $this->success_mem($r6_Order,$pname,$product,$pid);
- return $msg = "".$oldinf." 返回主页 会员中心 ";
- }
- } else if ( $r9_BType == "2" ){
- #如果需要应答机制则必须回写流,以success开头,大小写不敏感.
- echo "success";
- if($ordertype=="goods"){
- if($this->success_db($r6_Order)) return $msg = "支付成功! 返回主页 会员中心 ";
- else return $msg = "支付失败! 返回主页 会员中心 ";
- } else if ($ordertype=="member") {
- if($this->success_mem($r6_Order,$pname,$product,$pid)) return $msg = "支付成功! 返回主页 会员中心 ";
- else return $msg = "支付失败! 返回主页 会员中心 ";
- }
- }
- }
- } else {
- $this->log_result ("verify_failed");
- return $msg = "交易信息被篡! 返回主页 ";
- }
- }
-
-
- #签名函数生成签名串
- function getReqHmacString($p1_MerId,$merchantKey,$p2_Order,$p3_Amt,$p4_Cur,$p5_Pid,$p6_Pcat,$p7_Pdesc,$p8_Url,$pa_MP,$pd_FrpId,$pr_NeedResponse)
- {
- #进行签名处理,一定按照文档中标明的签名顺序进行
- $sbOld = "";
- #加入业务类型
- $sbOld = $sbOld.$this->p0_Cmd;
- #加入商户编号
- $sbOld = $sbOld.$p1_MerId;
- #加入商户订单号
- $sbOld = $sbOld.$p2_Order;
- #加入支付金额
- $sbOld = $sbOld.$p3_Amt;
- #加入交易币种
- $sbOld = $sbOld.$p4_Cur;
- #加入商品名称
- $sbOld = $sbOld.$p5_Pid;
- #加入商品分类
- $sbOld = $sbOld.$p6_Pcat;
- #加入商品描述
- $sbOld = $sbOld.$p7_Pdesc;
- #加入商户接收支付成功数据的地址
- $sbOld = $sbOld.$p8_Url;
- #加入送货地址标识
- $sbOld = $sbOld.$this->p9_SAF;
- #加入商户扩展信息
- $sbOld = $sbOld.$pa_MP;
- #加入银行编码
- $sbOld = $sbOld.$pd_FrpId;
- #加入是否需要应答机制
- $sbOld = $sbOld.$pr_NeedResponse;
-
- return $this->HmacMd5($sbOld,$merchantKey);
- }
-
- # 取得返回串中的所有参数
- function getCallBackValue(&$r0_Cmd,&$r1_Code,&$r2_TrxId,&$r3_Amt,&$r4_Cur,&$r5_Pid,&$r6_Order,&$r7_Uid,&$r8_MP,&$r9_BType,&$hmac)
- {
- $r0_Cmd = $_REQUEST['r0_Cmd'];
- $r1_Code = $_REQUEST['r1_Code'];
- $r2_TrxId = $_REQUEST['r2_TrxId'];
- $r3_Amt = $_REQUEST['r3_Amt'];
- $r4_Cur = $_REQUEST['r4_Cur'];
- $r5_Pid = $_REQUEST['r5_Pid'];
- $r6_Order = $_REQUEST['r6_Order'];
- $r7_Uid = $_REQUEST['r7_Uid'];
- $r8_MP = $_REQUEST['r8_MP'];
- $r9_BType = $_REQUEST['r9_BType'];
- $hmac = $_REQUEST['hmac'];
- return NULL;
- }
-
- function CheckHmac($p1_MerId,$merchantKey,$r0_Cmd,$r1_Code,$r2_TrxId,$r3_Amt,$r4_Cur,$r5_Pid,$r6_Order,$r7_Uid,$r8_MP,$r9_BType,$hmac)
- {
- if($hmac == $this->getCallbackHmacString($p1_MerId,$merchantKey,$r0_Cmd,$r1_Code,$r2_TrxId,$r3_Amt,$r4_Cur,$r5_Pid,$r6_Order,$r7_Uid,$r8_MP,$r9_BType))
- return TRUE;
- else
- return FALSE;
- }
-
- function getCallbackHmacString($p1_MerId,$merchantKey,$r0_Cmd,$r1_Code,$r2_TrxId,$r3_Amt,$r4_Cur,$r5_Pid,$r6_Order,$r7_Uid,$r8_MP,$r9_BType)
- {
- #取得加密前的字符串
- $sbOld = "";
- #加入商家ID
- $sbOld = $sbOld.$p1_MerId;
- #加入消息类型
- $sbOld = $sbOld.$r0_Cmd;
- #加入业务返回码
- $sbOld = $sbOld.$r1_Code;
- #加入交易ID
- $sbOld = $sbOld.$r2_TrxId;
- #加入交易金额
- $sbOld = $sbOld.$r3_Amt;
- #加入货币单位
- $sbOld = $sbOld.$r4_Cur;
- #加入产品Id
- $sbOld = $sbOld.$r5_Pid;
- #加入订单ID
- $sbOld = $sbOld.$r6_Order;
- #加入用户ID
- $sbOld = $sbOld.$r7_Uid;
- #加入商家扩展信息
- $sbOld = $sbOld.$r8_MP;
- #加入交易结果返回类型
- $sbOld = $sbOld.$r9_BType;
-
- return $this->HmacMd5($sbOld,$merchantKey,'gbk');
-
- }
-
- function HmacMd5($data,$key,$lang='utf-8')
- {
- // RFC 2104 HMAC implementation for php.
- // Creates an md5 HMAC.
- // Eliminates the need to install mhash to compute a HMAC
- // Hacked by Lance Rushing(NOTE: Hacked means written)
-
- //需要配置环境支持iconv,否则中文参数不能正常处理
- if($GLOBALS['cfg_soft_lang'] != 'utf-8' || $lang!='utf-8')
- {
- $key = gb2utf8($key);
- $data = gb2utf8($data);
- }
- $b = 64; // byte length for md5
- if (strlen($key) > $b) {
- $key = pack("H*",md5($key));
- }
- $key = str_pad($key, $b, chr(0x00));
- $ipad = str_pad('', $b, chr(0x36));
- $opad = str_pad('', $b, chr(0x5c));
- $k_ipad = $key ^ $ipad ;
- $k_opad = $key ^ $opad;
-
- return md5($k_opad.pack("H*",md5($k_ipad.$data)));
- }
-
- /*处理物品交易*/
- function success_db($order_sn)
- {
- //获取订单信息,检查订单的有效性
- $row = $this->dsql->GetOne("SELECT state FROM #@__shops_orders WHERE oid='$order_sn' ");
- if($row['state'] > 0)
- {
- return TRUE;
- }
- /* 改变订单状态_支付成功 */
- $sql = "UPDATE `#@__shops_orders` SET `state`='1' WHERE `oid`='$order_sn' AND `userid`='".$this->mid."'";
- if($this->dsql->ExecuteNoneQuery($sql))
- {
- $this->log_result("verify_success,订单号:".$order_sn); //将验证结果存入文件
- return TRUE;
- } else {
- $this->log_result ("verify_failed,订单号:".$order_sn);//将验证结果存入文件
- return FALSE;
- }
- }
-
- /*处理点卡,会员升级*/
- function success_mem($order_sn,$pname,$product,$pid)
- {
- //更新交易状态为已付款
- $sql = "UPDATE `#@__member_operation` SET `sta`='1' WHERE `buyid`='$order_sn' AND `mid`='".$this->mid."'";
- $this->dsql->ExecuteNoneQuery($sql);
-
- /* 改变点卡订单状态_支付成功 */
- if($product=="card")
- {
- $row = $this->dsql->GetOne("SELECT cardid FROM #@__moneycard_record WHERE ctid='$pid' AND isexp='0' ");;
- //如果找不到某种类型的卡,直接为用户增加金币
- if(!is_array($row))
- {
- $nrow = $this->dsql->GetOne("SELECT num FROM #@__moneycard_type WHERE pname = '{$pname}'");
- $dnum = $nrow['num'];
- $sql1 = "UPDATE `#@__member` SET `money`=money+'{$nrow['num']}' WHERE `mid`='".$this->mid."'";
- $oldinf ="已经充值了".$nrow['num']."金币到您的帐号";
- } else {
- $cardid = $row['cardid'];
- $sql1=" UPDATE #@__moneycard_record SET uid='".$this->mid."',isexp='1',utime='".time()."' WHERE cardid='$cardid' ";
- $oldinf='您的充值密码是:'.$cardid.' ';
- }
- //更新交易状态为已关闭
- $sql2=" UPDATE #@__member_operation SET sta=2,oldinfo='$oldinf' WHERE buyid='$order_sn'";
- if($this->dsql->ExecuteNoneQuery($sql1) && $this->dsql->ExecuteNoneQuery($sql2))
- {
- $this->log_result("verify_success,订单号:".$order_sn); //将验证结果存入文件
- return $oldinf;
- } else {
- $this->log_result ("verify_failed,订单号:".$order_sn);//将验证结果存入文件
- return "支付失败";
- }
- /* 改变会员订单状态_支付成功 */
- } else if ( $product=="member" ){
- $row = $this->dsql->GetOne("SELECT rank,exptime FROM #@__member_type WHERE aid='$pid' ");
- $rank = $row['rank'];
- $exptime = $row['exptime'];
- /*计算原来升级剩余的天数*/
- $rs = $this->dsql->GetOne("SELECT uptime,exptime FROM #@__member WHERE mid='".$this->mid."'");
- if($rs['uptime']!=0 && $rs['exptime']!=0 )
- {
- $nowtime = time();
- $mhasDay = $rs['exptime'] - ceil(($nowtime - $rs['uptime'])/3600/24) + 1;
- $mhasDay=($mhasDay>0)? $mhasDay : 0;
- }
- //获取会员默认级别的金币和积分数
- $memrank = $this->dsql->GetOne("SELECT money,scores FROM #@__arcrank WHERE rank='$rank'");
- //更新会员信息
- $sql1 = " UPDATE #@__member SET rank='$rank',money=money+'{$memrank['money']}',
- scores=scores+'{$memrank['scores']}',exptime='$exptime'+'$mhasDay',uptime='".time()."'
- WHERE mid='".$this->mid."'";
- //更新交易状态为已关闭
- $sql2=" UPDATE #@__member_operation SET sta='2',oldinfo='会员升级成功!' WHERE buyid='$order_sn' ";
- if($this->dsql->ExecuteNoneQuery($sql1) && $this->dsql->ExecuteNoneQuery($sql2))
- {
- $this->log_result("verify_success,订单号:".$order_sn); //将验证结果存入文件
- return "会员升级成功";
- } else {
- $this->log_result ("verify_failed,订单号:".$order_sn);//将验证结果存入文件
- return "会员升级失败";
- }
- }
- }
-
- function log_result($word) {
- global $cfg_cmspath;
- $fp = fopen(dirname(__FILE__)."/../../data/payment/log.txt","a");
- flock($fp, LOCK_EX) ;
- fwrite($fp,$word.",执行日期:".strftime("%Y-%m-%d %H:%I:%S",time())."\r\n");
- flock($fp, LOCK_UN);
- fclose($fp);
- }
-
-}//End API
\ No newline at end of file
diff --git a/src/include/qrcode/qrconfig.php b/src/include/qrcode/qrconfig.php
deleted file mode 100755
index 62e7f974..00000000
--- a/src/include/qrcode/qrconfig.php
+++ /dev/null
@@ -1,17 +0,0 @@
-isinit) {
- $GLOBALS['request']->Init();
- }
- return $GLOBALS['request']->Item($key, $df);
-}
-class Request
-{
-
- var $isinit = false;
- //用户的cookie
- var $cookies = array();
-
- //把GET、POST的变量合并一块,相当于 _REQUEST
- var $forms = array();
-
- //_GET 变量
- var $gets = array();
-
- //_POST 变量
- var $posts = array();
-
- //用户的请求模式 GET 或 POST
- var $request_type = 'GET';
-
- //文件变量
- var $files = array();
-
- //严禁保存的文件名
- var $filter_filename = '/\.(php|pl|sh|js)$/i';
-
- /**
- * 初始化用户请求
- * 对于 post、get 的数据,会转到 selfforms 数组, 并删除原来数组
- * 对于 cookie 的数据,会转到 cookies 数组,但不删除原来数组
- */
- function Init()
- {
- global $_POST, $_GET;
- //处理post、get
- $formarr = array('p' => $_POST, 'g' => $_GET);
- foreach ($formarr as $_k => $_r) {
- if (count($_r) > 0) {
- foreach ($_r as $k => $v) {
- if (preg_match('/^cfg_(.*?)/i', $k)) {
- continue;
- }
- $this->forms[$k] = $v;
- if ($_k == 'p') {
- $this->posts[$k] = $v;
- } else {
- $this->gets[$k] = $v;
- }
- }
- }
- }
- unset($_POST);
- unset($_GET);
- unset($_REQUEST);
-
- //处理cookie
- if (count($_COOKIE) > 0) {
- foreach ($_COOKIE as $k => $v) {
- if (preg_match('/^config/i', $k)) {
- continue;
- }
- $this->cookies[$k] = $v;
- }
- }
- //unset($_POST, $_GET);
-
- //上传的文件处理
- if (isset($_FILES) && count($_FILES) > 0) {
- $this->FilterFiles($_FILES);
- }
- $this->isinit = TRUE;
-
- //global变量
- //self::$forms['_global'] = $GLOBALS;
- }
-
- /**
- * 把 eval 重命名为 myeval
- */
- function MyEval($phpcode)
- {
- return eval($phpcode);
- }
-
- /**
- * 获得指定表单值
- */
- function Item($formname, $defaultvalue = '')
- {
- return isset($this->forms[$formname]) ? $this->forms[$formname] : $defaultvalue;
- }
-
- /**
- * 获得指定临时文件名值
- */
- function Upfile($formname, $defaultvalue = '')
- {
- return isset($this->files[$formname]['tmp_name']) ? $this->files[$formname]['tmp_name'] : $defaultvalue;
- }
-
- /**
- * 过滤文件相关
- */
- function FilterFiles(&$files)
- {
- foreach ($files as $k => $v) {
- $this->files[$k] = $v;
- }
- unset($_FILES);
- }
-
- /**
- * 移动上传的文件
- */
- function MoveUploadFile($formname, $filename, $filetype = '')
- {
- if ($this->IsUploadFile($formname)) {
- if (preg_match($this->filter_filename, $filename)) {
- return FALSE;
- } else {
- return move_uploaded_file($this->files[$formname]['tmp_name'], $filename);
- }
- }
- }
-
- /**
- * 获得文件的扩展名
- */
- function GetShortname($formname)
- {
- $filetype = strtolower(isset($this->files[$formname]['type']) ? $this->files[$formname]['type'] : '');
- $shortname = '';
- switch ($filetype) {
- case 'image/jpeg':
- $shortname = 'jpg';
- break;
- case 'image/pjpeg':
- $shortname = 'jpg';
- break;
- case 'image/gif':
- $shortname = 'gif';
- break;
- case 'image/png':
- $shortname = 'png';
- break;
- case 'image/xpng':
- $shortname = 'png';
- break;
- case 'image/wbmp':
- $shortname = 'bmp';
- break;
- default:
- $filename = isset($this->files[$formname]['name']) ? $this->files[$formname]['name'] : '';
- if (preg_match("/\./", $filename)) {
- $fs = explode('.', $filename);
- $shortname = strtolower($fs[count($fs) - 1]);
- }
- break;
- }
- return $shortname;
- }
-
- /**
- * 获得指定文件表单的文件详细信息
- */
- function GetFileInfo($formname, $item = '')
- {
- if (!isset($this->files[$formname]['tmp_name'])) {
- return FALSE;
- } else {
- if ($item == '') {
- return $this->files[$formname];
- } else {
- return (isset($this->files[$formname][$item]) ? $this->files[$formname][$item] : '');
- }
- }
- }
-
- /**
- * 判断是否存在上传的文件
- */
- function IsUploadFile($formname)
- {
- if (!isset($this->files[$formname]['tmp_name'])) {
- return FALSE;
- } else {
- return is_uploaded_file($this->files[$formname]['tmp_name']);
- }
- }
-
- /**
- * 检查文件后缀是否为指定值
- *
- * @param string $subfix
- * @return boolean
- */
- function CheckSubfix($formname, $subfix = 'csv')
- {
- if ($this->GetShortname($formname) != $subfix) {
- return FALSE;
- }
- return TRUE;
- }
-}
diff --git a/src/include/shopcar.class.php b/src/include/shopcar.class.php
deleted file mode 100755
index 310cbff5..00000000
--- a/src/include/shopcar.class.php
+++ /dev/null
@@ -1,240 +0,0 @@
-OrdersId = $this->getCookie("OrdersId");
- if (empty($this->OrdersId)) {
- $this->OrdersId = $this->MakeOrders();
- }
- }
-
- function MemberShops()
- {
- $this->__construct();
- }
-
- /**
- * 创建一个专有订单编号
- *
- * @return string
- */
- function MakeOrders()
- {
- $this->OrdersId = 'S-P'.time().'RN'.mt_rand(100, 999);
- $this->deCrypt($this->saveCookie("OrdersId", $this->OrdersId));
- return $this->OrdersId;
- }
-
- /**
- * 添加一个商品编号及信息
- *
- * @param string $id 购物车ID
- * @param string $value 值
- * @return void
- */
- function addItem($id, $value)
- {
- $this->productsId = DE_ItemEcode.$id;
- $this->saveCookie($this->productsId, $value);
- }
-
- /**
- * 删去一个带编号的商品
- *
- * @param string $id 购物车ID
- * @return void
- */
- function delItem($id)
- {
- $this->productsId = DE_ItemEcode.$id;
- setcookie($this->productsId, "", time() - 3600000, "/");
- }
-
- /**
- * 清空购物车商品
- *
- * @return string
- */
- function clearItem()
- {
- foreach ($_COOKIE as $key => $vals) {
- if (preg_match('/'.DE_ItemEcode.'/', $key)) {
- setcookie($key, "", time() - 3600000, "/");
- }
- }
- return 1;
- }
-
- /**
- * 得到订单记录
- *
- * @return array
- */
- function getItems()
- {
- $Products = array();
- foreach ($_COOKIE as $key => $vals) {
- if (preg_match("#".DE_ItemEcode."#", $key) && preg_match("#[^_0-9a-z]#", $key)) {
- parse_str($this->deCrypt($vals), $arrays);
- $values = @array_values($arrays);
- if (!empty($values)) {
- $arrays['price'] = sprintf("%01.2f", $arrays['price']);
- if ($arrays['buynum'] < 1) {
- $arrays['buynum'] = 0;
- }
- $Products[$key] = $arrays;
- }
- }
- }
- unset($key, $vals, $values, $arrays);
- return $Products;
- }
-
- /**
- * 得到指定商品信息
- *
- * @param string $id 购物车ID
- * @return array
- */
- function getOneItem($id)
- {
- $key = DE_ItemEcode.$id;
- if (!isset($_COOKIE[$key]) && empty($_COOKIE[$key])) {
- return '';
- }
- $itemValue = $_COOKIE[$key];
- parse_str($this->deCrypt($itemValue), $Products);
- unset($key, $itemValue);
- return $Products;
- }
-
- /**
- * 获得购物车中的商品数
- *
- * @return int
- */
- function cartCount()
- {
- $Products = $this->getItems();
- $itemsCount = count($Products);
- $i = 0;
- if ($itemsCount > 0) {
- foreach ($Products as $val) {
- $i = $i + $val['buynum'];
- }
- }
- unset($Products, $val, $itemsCount);
- return $i;
- }
-
- /**
- * 获得购物车中的总金额
- *
- * @return string
- */
- function priceCount()
- {
- $price = 0.00;
- foreach ($_COOKIE as $key => $vals) {
- if (preg_match("/".DE_ItemEcode."/", $key)) {
- $Products = $this->getOneItem(str_replace(DE_ItemEcode, "", $key));
- if ($Products['buynum'] > 0 && $Products['price'] > 0) {
- $price = $price + ($Products['price'] * $Products['buynum']);
- }
- }
- }
- unset($key, $vals, $Products);
- return sprintf("%01.2f", $price);
- }
-
- //加密接口字符
- function enCrypt($txt)
- {
- return $this->mchStrCode($txt);
- }
-
- //解密接口字符串
- function deCrypt($txt)
- {
- return $this->mchStrCode($txt, 'DECODE');
- }
-
- function mchStrCode($string, $operation = 'ENCODE')
- {
- $key_length = 4;
- $expiry = 0;
- $key = md5($GLOBALS['cfg_cookie_encode']);
- $fixedkey = md5($key);
- $egiskeys = md5(substr($fixedkey, 16, 16));
- $runtokey = $key_length ? ($operation == 'ENCODE' ? substr(md5(microtime(true)), -$key_length) : substr($string, 0, $key_length)) : '';
- $keys = md5(substr($runtokey, 0, 16).substr($fixedkey, 0, 16).substr($runtokey, 16).substr($fixedkey, 16));
- $string = $operation == 'ENCODE' ? sprintf('%010d', $expiry ? $expiry + time() : 0).substr(md5($string.$egiskeys), 0, 16).$string : base64_decode(substr($string, $key_length));
-
- $i = 0;
- $result = '';
- $string_length = strlen($string);
- for ($i = 0; $i < $string_length; $i++) {
- $result .= chr(ord($string[$i]) ^ ord($keys[$i % 32]));
- }
- if ($operation == 'ENCODE') {
- return $runtokey.str_replace('=', '', base64_encode($result));
- } else {
- if ((substr($result, 0, 10) == 0 || substr($result, 0, 10) - time() > 0) && substr($result, 10, 16) == substr(md5(substr($result, 26).$egiskeys), 0, 16)) {
- return substr($result, 26);
- } else {
- return '';
- }
- }
- }
-
- //串行化数组
- function enCode($array)
- {
- $arrayenc = array();
- foreach ($array as $key => $val) {
- $arrayenc[] = $key.'='.urlencode($val);
- }
- return implode('&', $arrayenc);
- }
-
- //创建加密的_cookie
- function saveCookie($key, $value)
- {
- if (is_array($value)) {
- $value = $this->enCrypt($this->enCode($value));
- } else {
- $value = $this->enCrypt($value);
- }
- setcookie($key, $value, time() + 36000, '/');
- }
-
- //获得解密的_cookie
- function getCookie($key)
- {
- if (isset($_COOKIE[$key]) && !empty($_COOKIE[$key])) {
- return $this->deCrypt($_COOKIE[$key]);
- }
- }
-}
diff --git a/src/include/typeunit.class.admin.php b/src/include/typeunit.class.admin.php
deleted file mode 100755
index 4177e238..00000000
--- a/src/include/typeunit.class.admin.php
+++ /dev/null
@@ -1,398 +0,0 @@
-idCounter = 0;
- $this->artDir = $GLOBALS['cfg_cmspath'].$GLOBALS['cfg_arcdir'];
- $this->baseDir = $GLOBALS['cfg_basedir'];
- $this->shortName = $GLOBALS['art_shortname'];
- $this->idArrary = '';
- $this->dsql = 0;
- }
-
- function TypeUnit()
- {
- $this->__construct();
- }
-
- //清理类
- function Close()
- {
- }
-
- //获取所有栏目的文档ID数
- function UpdateCatalogNum()
- {
- $this->dsql->SetQuery("SELECT typeid,count(typeid) as dd FROM `#@__arctiny` WHERE arcrank <>-2 group by typeid");
- $this->dsql->Execute();
- while ($row = $this->dsql->GetArray()) {
- $this->CatalogNums[$row['typeid']] = $row['dd'];
- }
- }
-
- function GetTotalArc($tid)
- {
- if (!is_array($this->CatalogNums)) {
- $this->UpdateCatalogNum();
- }
- if (!isset($this->CatalogNums[$tid])) {
- return 0;
- } else {
- $totalnum = 0;
- $ids = explode(',', GetSonIds($tid));
- foreach ($ids as $tid) {
- if (isset($this->CatalogNums[$tid])) {
- $totalnum += $this->CatalogNums[$tid];
- }
- }
- return $totalnum;
- }
- }
-
- /**
- * 读出所有分类,在类目管理页(list_type)中使用
- *
- * @access public
- * @param int $channel 频道ID
- * @param int $nowdir 当前操作ID
- * @return string
- */
- function ListAllType($channel = 0, $nowdir = 0)
- {
- global $cfg_admin_channel, $admin_catalogs;
- $this->dsql = $GLOBALS['dsql'];
-
- //检测用户有权限的顶级栏目
- if ($cfg_admin_channel == 'array') {
- $admin_catalog = join(',', $admin_catalogs);
- $this->dsql->SetQuery("SELECT reid FROM `#@__arctype` WHERE id in($admin_catalog) group by reid ");
- $this->dsql->Execute();
- $topidstr = '';
- while ($row = $this->dsql->GetObject()) {
- if ($row->reid == 0) continue;
- $topidstr .= ($topidstr == '' ? $row->reid : ','.$row->reid);
- }
- $admin_catalog .= ','.$topidstr;
- $admin_catalogs = explode(',', $admin_catalog);
- $admin_catalogs = array_unique($admin_catalogs);
- }
-
- $this->dsql->SetQuery("SELECT id,typedir,typename,ispart,sortrank,ishidden FROM `#@__arctype` WHERE reid=0 order by sortrank");
- $this->dsql->Execute(0);
- while ($row = $this->dsql->GetObject(0)) {
- if ($cfg_admin_channel == 'array' && !in_array($row->id, $admin_catalogs)) {
- continue;
- }
- $typeDir = $row->typedir;
- $typeName = $row->typename;
- $ispart = $row->ispart;
- $id = $row->id;
- $rank = $row->sortrank;
- if ($row->ishidden == '1') {
- $nss = "[隐] ";
- } else {
- $nss = '';
- }
- echo "\r\n";
- //普通列表
- if ($ispart == 0) {
- echo " \r\n";
- echo " \r\n";
- echo " \r\n";
- }
- //带封面的频道
- else if ($ispart == 1) {
- echo " \r\n";
- echo " \r\n";
- echo " \r\n";
- }
- //独立页面
- else if ($ispart == 2) {
- echo " \r\n";
- echo " \r\n";
- echo " \r\n";
- }
- echo " ";
- $lastid = GetCookie('lastCid');
- if ($channel == $id || $lastid == $id || isset($GLOBALS['exallct']) || $cfg_admin_channel == 'array') {
- echo " \r\n";
- $this->LogicListAllSunType($id, " ");
- echo "
\r\n";
- }
- echo " \r\n
\r\n";
- }
- }
-
- /**
- * 获得子类目的递归调用
- *
- * @access public
- * @param int $id 栏目ID
- * @param string $step 层级标志
- * @return void
- */
- function LogicListAllSunType($id, $step)
- {
- global $cfg_admin_channel, $admin_catalogs;
- $fid = $id;
- $this->dsql->SetQuery("SELECT id,reid,typedir,typename,ispart,sortrank,ishidden FROM `#@__arctype` WHERE reid='".$id."' order by sortrank");
- $this->dsql->Execute($fid);
- if ($this->dsql->GetTotalRow($fid) > 0) {
- while ($row = $this->dsql->GetObject($fid)) {
- if ($cfg_admin_channel == 'array' && !in_array($row->id, $admin_catalogs)) {
- continue;
- }
- $typeDir = $row->typedir;
- $typeName = $row->typename;
- $reid = $row->reid;
- $id = $row->id;
- $ispart = $row->ispart;
- if ($step == " ") {
- $stepdd = 2;
- } else {
- $stepdd = 3;
- }
- $rank = $row->sortrank;
- if ($row->ishidden == '1') {
- $nss = "[隐] ";
- } else {
- $nss = '';
- }
-
- //普通列表
- if ($ispart == 0) {
- echo "\r\n";
- echo "";
- echo " \r\n";
- }
-
- //封面频道
- else if ($ispart == 1) {
- echo " \r\n";
- echo " \r\n";
- }
-
- //独立页面
- else if ($ispart == 2) {
- echo "\r\n";
- echo " \r\n";
- }
- echo " ";
- $this->LogicListAllSunType($id, $step." ");
- echo "
\r\n";
- }
- }
- }
-
- /**
- * 返回与某个目相关的下级目录的类目ID列表(删除类目或文章时调用)
- *
- * @access public
- * @param int $id 栏目ID
- * @param int $channel 频道ID
- * @return array
- */
- function GetSunTypes($id, $channel = 0)
- {
- $this->dsql = $GLOBALS['dsql'];
- $this->idArray[$this->idCounter] = $id;
- $this->idCounter++;
- $fid = $id;
- if ($channel != 0) {
- $csql = " And channeltype=$channel ";
- } else {
- $csql = "";
- }
- $this->dsql->SetQuery("SELECT id FROM `#@__arctype` WHERE reid=$id $csql");
- $this->dsql->Execute("gs".$fid);
-
- //if($this->dsql->GetTotalRow("gs".$fid)!=0)
- //{
- while ($row = $this->dsql->GetObject("gs".$fid)) {
- $nid = $row->id;
- $this->GetSunTypes($nid, $channel);
- }
- //}
- return $this->idArray;
- }
-
- /**
- * 删除类目
- *
- * @access public
- * @param int $id 栏目ID
- * @param bool $isDelFile 是否删除文件
- * @return string
- */
- function DelType($id, $isDelFile)
- {
- $this->idCounter = 0;
- $this->idArray = array();
- $this->GetSunTypes($id);
- $query = "
- SELECT #@__arctype.*,#@__channeltype.typename AS ctypename,
- #@__channeltype.addtable
- FROM `#@__arctype` LEFT JOIN #@__channeltype
- ON #@__channeltype.id=#@__arctype.channeltype
- WHERE #@__arctype.id='$id'
- ";
- $typeinfos = $this->dsql->GetOne($query);
- $topinfos = $this->dsql->GetOne("SELECT moresite,siteurl FROM `#@__arctype` WHERE id='".$typeinfos['topid']."'");
- if (!is_array($typeinfos)) {
- return FALSE;
- }
- $indir = $typeinfos['typedir'];
- $addtable = $typeinfos['addtable'];
- $ispart = $typeinfos['ispart'];
- $defaultname = $typeinfos['defaultname'];
-
- //删除数据库里的相关记录
- foreach ($this->idArray as $id) {
- $myrow = $this->dsql->GetOne("SELECT * FROM `#@__arctype` WHERE id='$id'");
- if ($myrow['topid'] > 0) {
- $mytoprow = $this->dsql->GetOne("SELECT moresite,siteurl FROM `#@__arctype` WHERE id='".$myrow['topid']."'");
- if (is_array($mytoprow) && !empty($mytoprow)) {
- foreach ($mytoprow as $k => $v) {
- if (!preg_match("/[0-9]/", $k)) {
- $myrow[$k] = $v;
- }
- }
- }
- }
-
- //删除目录和目录里的所有文件 ### 禁止了此功能
- //删除单独页面
- if ($myrow['ispart'] == 2 && $myrow['typedir'] == '') {
- if (is_file($this->baseDir.'/'.$myrow['defaultname'])) {
- @unlink($this->baseDir.'/'.$myrow['defaultname']);
- }
- }
-
- //删除数据库信息
- $this->dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id='$id'");
- $this->dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE typeid='$id'");
- $this->dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE typeid='$id'");
- $this->dsql->ExecuteNoneQuery("DELETE FROM `#@__spec` WHERE typeid='$id'");
- $this->dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE typeid='$id'");
- if ($addtable != "") {
- $this->dsql->ExecuteNoneQuery("DELETE FROM $addtable WHERE typeid='$id'");
- }
- }
-
- //删除目录和目录里的所有文件 ### 禁止了此功能
- //删除单独页面
- if ($ispart == 2 && $indir == "") {
- if (is_file($this->baseDir."/".$defaultname)) {
- @unlink($this->baseDir."/".$defaultname);
- }
- }
- @reset($this->idArray);
- $this->idCounter = 0;
- return TRUE;
- }
-
- /**
- * 删除指定目录的所有文件
- *
- * @access public
- * @param string $indir 指定目录
- * @return int
- */
- function RmDirFile($indir)
- {
- if (!file_exists($indir)) return;
- $dh = dir($indir);
- while ($file = $dh->read()) {
- if ($file == "." || $file == "..") {
- continue;
- } else if (is_file("$indir/$file")) {
- @unlink("$indir/$file");
- } else {
- $this->RmDirFile("$indir/$file");
- }
- if (is_dir("$indir/$file")) {
- @rmdir("$indir/$file");
- }
- }
- $dh->close();
- return (1);
- }
-}//End Class
\ No newline at end of file
diff --git a/src/index.php b/src/index.php
index cfc080bf..587e5f01 100755
--- a/src/index.php
+++ b/src/index.php
@@ -1,5 +1,4 @@
GetOne("SELECT * FROM `#@__homepageset`");
$row['templet'] = MfTemplet($row['templet']);
@@ -33,4 +31,4 @@ if (isset($_GET['upcache']) || !file_exists('index.html')) {
} else {
header('HTTP/1.1 301 Moved Permanently');
header('Location:index.html');
-}
+}
\ No newline at end of file
diff --git a/src/install/config.cache.inc.php b/src/install/config.cache.inc.php
index fb3d9f68..28ee689f 100755
--- a/src/install/config.cache.inc.php
+++ b/src/install/config.cache.inc.php
@@ -4,35 +4,35 @@ $cfg_cmspath = '~basepath~';
$cfg_cookie_encode = '~cookieEncode~';
$cfg_indexurl = '~indexurl~';
$cfg_backup_dir = 'backupdata';
-$cfg_indexname = '主页';
+$cfg_indexname = '首页';
$cfg_webname = '~webname~';
$cfg_adminemail = '~adminmail~';
$cfg_html_editor = 'ckeditor';
$cfg_arcdir = '/a';
-$cfg_medias_dir = '/uploads';
-$cfg_ddimg_width = 240;
-$cfg_ddimg_height = 180;
+$cfg_medias_dir = '/static';
+$cfg_ddimg_width = 400;
+$cfg_ddimg_height = 300;
$cfg_domain_cookie = '';
$cfg_imgtype = 'jpg|gif|png';
$cfg_softtype = 'zip|gz|rar|iso|doc|xsl|ppt|wps';
-$cfg_mediatype = 'swf|mpg|mp3|rm|rmvb|wmv|wma|wav|mid|mov';
-$cfg_specnote = 6;
-$cfg_list_symbol = ' > ';
-$cfg_notallowstr = '非典|艾滋病|阳痿';
-$cfg_replacestr = '她妈|它妈|他妈|您妈|去死|贱人';
+$cfg_mediatype = 'swf|rm|rmvb|mpg|mp3|mp4|wmv|wma|wav|mid|mov';
+$cfg_specnote = 10;
+$cfg_list_symbol = '';
+$cfg_notallowstr = '神经病|废物';
+$cfg_replacestr = '他妈的|傻逼';
$cfg_feedbackcheck = 'N';
$cfg_keyword_replace = 'Y';
$cfg_fck_xhtml = 'N';
-$cfg_df_style = 'default';
+$cfg_df_style = 'templets';
$cfg_multi_site = 'N';
$cfg_dede_log = 'N';
$cfg_powerby = 'Copyright © 2022 DedeBIZ 版权所有';
$cfg_arcsptitle = 'N';
$cfg_arcautosp = 'N';
$cfg_arcautosp_size = 5;
-$cfg_auot_description = 240;
+$cfg_auot_description = 250;
$cfg_ftp_host = '';
-$cfg_ftp_port = 21;
+$cfg_ftp_port = '';
$cfg_ftp_user = '';
$cfg_ftp_pwd = '';
$cfg_ftp_root = '/';
@@ -46,7 +46,7 @@ $cfg_mb_upload_size = 1024;
$cfg_mb_sendall = 'Y';
$cfg_mb_rmdown = 'Y';
$cfg_cli_time = 8;
-$cfg_mb_addontype = 'swf|mpg|mp3|rm|rmvb|wmv|wma|wav|mid|mov|zip|rar|doc|xsl|ppt|wps';
+$cfg_mb_addontype = 'swf|rm|rmvb|mpg|mp3|mp4|wmv|wma|wav|mid|mov|zip|rar|doc|xsl|ppt|wps';
$cfg_mb_max = 500;
$cfg_keyword_like = 'N';
$cfg_index_max = 10000;
@@ -67,8 +67,8 @@ $cfg_album_pagesize = 12;
$cfg_album_style = 2;
$cfg_album_ddwidth = 200;
$cfg_mb_notallow = 'www,bbs,ftp,mail,user,users,admin,administrator';
-$cfg_mb_idmin = 3;
-$cfg_mb_pwdmin = 3;
+$cfg_mb_idmin = 6;
+$cfg_mb_pwdmin = 6;
$cfg_mb_pwdtype = '32';
$cfg_md_idurl = 'N';
$cfg_mb_rank = 10;
@@ -89,7 +89,7 @@ $cfg_search_time = 3;
$cfg_baidunews_limit = '100';
$cfg_updateperi = '15';
$cfg_sendmail_bysmtp = 'Y';
-$cfg_smtp_server = 'smtp.qq.com';
+$cfg_smtp_server = 'smtp.web.com';
$cfg_smtp_port = '25';
$cfg_smtp_usermail = '';
$cfg_smtp_user = '';
@@ -114,7 +114,7 @@ $cfg_jump_once = 'Y';
$cfg_task_pwd = '';
$cfg_addon_domainbind = 'N';
$cfg_addon_domain = '';
-$cfg_df_dutyadmin = 'admin';
+$cfg_df_dutyadmin = '网站管理员';
$cfg_mb_allowncarc = 'Y';
$cfg_mb_allowreg = 'Y';
$cfg_mb_adminlock = 'N';
@@ -142,4 +142,4 @@ $cfg_mb_msgischeck = 'N';
$cfg_mb_reginfo = 'Y';
$cfg_title_site = 'N';
$cfg_mysql_type = 'mysqli';
-$cfg_memcache_enable = 'N';
+$cfg_memcache_enable = 'N';
\ No newline at end of file
diff --git a/src/install/index.php b/src/install/index.php
index b2ecd714..72b52188 100644
--- a/src/install/index.php
+++ b/src/install/index.php
@@ -1,6 +1,6 @@
=')) {
+ mysqli_report(MYSQLI_REPORT_OFF);
+}
+
$moduleCacheFile = dirname(__FILE__).'/modules.tmp.inc';
-define('DEDEINC',dirname(__FILE__).'/../include');
+define('DEDEINC',dirname(__FILE__).'/../system');
define('DEDEDATA',dirname(__FILE__).'/../data');
define('DEDEROOT',preg_replace("#[\\\\\/]install#", '', dirname(__FILE__)));
header("Content-Type: text/html; charset=utf-8");
-if (version_compare(PHP_VERSION, '8.0.0', '>=')) {
- mysqli_report(MYSQLI_REPORT_OFF);
-}
require_once(DEDEROOT.'/install/install.inc.php');
-require_once(DEDEINC.'/zip.class.php');
+require_once(DEDEINC.'/libraries/zip.class.php');
foreach(Array('_GET','_POST','_COOKIE') as $_request)
{
foreach($$_request as $_k => $_v) ${$_k} = RunMagicQuotes($_v);
}
require_once(DEDEINC.'/common.func.php');
-if(file_exists(INSLOCKFILE))
-{
- exit(" 程序已运行安装,如果您确定要重新安装,请先从FTP中删除 install/install_lock.txt");
-}
+
if(empty($step))
{
$step = 1;
@@ -94,11 +98,11 @@ else if($step==2)
$dbhost = empty($dbhost)? "localhost" : $dbhost;
$dbuser = empty($dbuser)? "root" : $dbuser;
$dbuser = empty($dbuser)? "root" : $dbuser;
- $dbprefix = empty($dbprefix)? "dede_" : $dbprefix;
+ $dbprefix = empty($dbprefix)? "biz_" : $dbprefix;
$dbname = empty($dbname)? $dfDbname : $dbname;
$adminuser = empty($adminuser)? "admin" : $adminuser;
$adminpwd = empty($adminpwd)? "admin" : $adminpwd;
- $webname = empty($webname)? "我的网站" : $webname;
+ $webname = empty($webname)? "某某公司" : $webname;
$baseurl = empty($baseurl)? $dfbaseurl : $baseurl;
$cmspath = empty($cmspath)? $dfbasepath : $cmspath;
if ( $dbtype == 'sqlite' )
@@ -194,9 +198,7 @@ else if($step==2)
if(preg_match('#CREATE#i', $query))
{
$rs = mysql_query(preg_replace("#TYPE=MyISAM#i",$sql4tmp,$query),$conn);
- }
- else
- {
+ } else {
$rs = mysql_query($query,$conn);
}
}
@@ -269,7 +271,7 @@ else if($step==2)
$fp = fopen(INSLOCKFILE,'w');
fwrite($fp,'ok');
fclose($fp);
- header('Location:../dede/index.php');
+ header('Location:../admin/index.php');
exit();
}
/*------------------------
@@ -288,7 +290,7 @@ else if($step==10)
if(empty($dbname)){
$info = "信息正确";
} else {
- $info = mysql_select_db($dbname,$conn)? "数据库已经存在,系统将覆盖数据库": "数据库不存在,系统将自动创建";
+ $info = mysql_select_db($dbname,$conn)? "数据库已经存在,系统将覆盖数据库": "数据库不存在,系统将自动创建";
}
$result = array(
"code" => 200,
diff --git a/src/install/install.inc.php b/src/install/install.inc.php
index 7f938e21..f8b6a479 100755
--- a/src/install/install.inc.php
+++ b/src/install/install.inc.php
@@ -1,5 +1,4 @@
\r\n".$msg;
return $msg;
}
-
-
function TestWrite($d)
{
$tfile = '_dedet.txt';
@@ -60,7 +55,6 @@ function TestWrite($d)
else return false;
}
}
-
function ReWriteConfigAuto()
{
global $dsql;
@@ -82,7 +76,6 @@ function ReWriteConfigAuto()
fwrite($fp, "?".">");
fclose($fp);
}
-
//更新栏目缓存
function UpDateCatCache()
{
@@ -101,7 +94,6 @@ function UpDateCatCache()
fwrite($fp1, "{$phph}>");
fclose($fp1);
}
-
function IsDownLoad($url)
{
if (file_exists($url.'.xml')) {
@@ -109,4 +101,4 @@ function IsDownLoad($url)
} else {
return false;
}
-}
+}
\ No newline at end of file
diff --git a/src/install/sql-dfdata.txt b/src/install/sql-dfdata.txt
index 63926917..ae9131a2 100755
--- a/src/install/sql-dfdata.txt
+++ b/src/install/sql-dfdata.txt
@@ -502,12 +502,12 @@ INSERT INTO `#@__area` VALUES('1','北京市','0','0'),
('33','澳门区','0','0'),
('35','台湾省','0','0');
-INSERT INTO `#@__channeltype` VALUES('1','article','普通文章','#@__archives','#@__addonarticle','article_add.php','content_list.php','article_edit.php','article_add.php','content_list.php','article_edit.php','\t\n \t\n','','','1','1','1','-1','','10','0','1','1','标题','0','0'),
-('2','image','图片集','#@__archives','#@__addonimages','album_add.php','content_i_list.php','album_edit.php','album_add.php','content_list.php','album_edit.php',' \t\n \t\n ','','','1','1','1','-1','','10','0','1','1','标题','0','0'),
-('3','soft','软件','#@__archives','#@__addonsoft','soft_add.php','content_i_list.php','soft_edit.php','','','',' \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n ','filetype,language,softtype,os,accredit,softrank','','1','1','1','-1','','10','0','1','1','标题','0','0'),
-('-1','spec','专题','#@__archives','#@__addonspec','spec_add.php','content_s_list.php','spec_edit.php','','','',' ','','','1','1','0','-1','','10','0','1','1','标题','0','0'),
-('6','shop','商品','#@__archives','#@__addonshop','archives_add.php','content_list.php','archives_edit.php','archives_add.php','content_list.php','archives_edit.php','\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\n\t\n\n\t\n \t\n\n\t\n \t\n\n\t\n \t\n','price,trueprice,brand,units','','0','1','1','-1','','10','0','1','1','商品名称','0','0'),
-('-8','infos','分类信息','#@__archives','#@__addoninfos','archives_sg_add.php','content_sg_list.php','archives_sg_edit.php','archives_sg_add.php','content_sg_list.php','archives_sg_edit.php',' \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n','channel,arcrank,mid,click,title,senddate,flag,litpic,lastpost,scores,goodpost,badpost,nativeplace,infotype,endtime','','-1','1','1','-1','','0','0','0','1','信息标题','0','0');
+INSERT INTO `#@__channeltype` VALUES('1','article','普通文章','#@__archives','#@__addonarticle','article_add.php','content_list.php','article_edit.php','article_add.php','content_list.php','article_edit.php','\t\n \t\n','','','1','1','1','-1','','10','0','1','1','标题','0','0'),
+('2','image','图片集','#@__archives','#@__addonimages','album_add.php','content_i_list.php','album_edit.php','album_add.php','content_list.php','album_edit.php',' \t\n \t\n ','','','1','1','1','-1','','10','0','1','1','标题','0','0'),
+('3','soft','软件','#@__archives','#@__addonsoft','soft_add.php','content_i_list.php','soft_edit.php','','','',' \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n ','filetype,language,softtype,os,accredit,softrank','','1','1','1','-1','','10','0','1','1','标题','0','0'),
+('-1','spec','专题','#@__archives','#@__addonspec','spec_add.php','content_s_list.php','spec_edit.php','','','',' ','','','1','1','0','-1','','10','0','1','1','标题','0','0'),
+('6','shop','商品','#@__archives','#@__addonshop','archives_add.php','content_list.php','archives_edit.php','archives_add.php','content_list.php','archives_edit.php','\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\n\t\n\n\t\n \t\n\n\t\n \t\n\n\t\n \t\n','price,trueprice,brand,units','','0','1','1','-1','','10','0','1','1','商品名称','0','0'),
+('-8','infos','分类信息','#@__archives','#@__addoninfos','archives_sg_add.php','content_sg_list.php','archives_sg_edit.php','archives_sg_add.php','content_sg_list.php','archives_sg_edit.php',' \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n\t\n \t\n','channel,arcrank,mid,click,title,senddate,flag,litpic,lastpost,scores,goodpost,badpost,nativeplace,infotype,endtime','','-1','1','1','-1','','0','0','0','1','信息标题','0','0');
INSERT INTO `#@__co_onepage` VALUES('5','www.dedebiz.com','DedeBIZ','1','gb2312','
\r\n";
upfield.innerHTML += fhtml;
diff --git a/src/static/js/dede.js b/src/static/js/style.js
similarity index 99%
rename from src/static/js/dede.js
rename to src/static/js/style.js
index 89ecd8ba..df61d462 100644
--- a/src/static/js/dede.js
+++ b/src/static/js/style.js
@@ -53,7 +53,7 @@ args = {
// 这里用到了一个展开语法
// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax
function ShowMsg(content, ...args) {
- title = "DedeBIZ信息提示";
+ title = "系统提示";
if (typeof content == "undefined") content = "";
modalID = guid();
var footer = `确定 `;
diff --git a/src/static/js/dedeajax2.js b/src/static/js/webajax.js
old mode 100755
new mode 100644
similarity index 96%
rename from src/static/js/dedeajax2.js
rename to src/static/js/webajax.js
index a4128c9a..ca02a41f
--- a/src/static/js/dedeajax2.js
+++ b/src/static/js/webajax.js
@@ -1,281 +1,281 @@
-
+
diff --git a/src/data/js/index.html b/src/static/litimg/index.html
similarity index 100%
rename from src/data/js/index.html
rename to src/static/litimg/index.html
diff --git a/src/data/rss/index.html b/src/static/media/index.html
old mode 100755
new mode 100644
similarity index 100%
rename from src/data/rss/index.html
rename to src/static/media/index.html
diff --git a/src/data/sessions/index.html b/src/static/soft/index.html
old mode 100755
new mode 100644
similarity index 100%
rename from src/data/sessions/index.html
rename to src/static/soft/index.html
diff --git a/src/uploads/allimg/index.html b/src/static/userup/index.html
similarity index 100%
rename from src/uploads/allimg/index.html
rename to src/static/userup/index.html
diff --git a/src/include/arc.archives.class.php b/src/system/archive/archives.class.php
similarity index 96%
rename from src/include/arc.archives.class.php
rename to src/system/archive/archives.class.php
index 93c3d313..4cae9136 100755
--- a/src/include/arc.archives.class.php
+++ b/src/system/archive/archives.class.php
@@ -1,15 +1,15 @@
ChannelUnit = new ChannelUnit($arr['channel'], $aid);
$this->TypeLink = new TypeLink($arr['typeid']);
if ($this->ChannelUnit->ChannelInfos['issystem'] != -1) {
- // 如果当前文档不是系统模型,为单表模型
+ //如果当前文档不是系统模型,为单表模型
$query = "SELECT arc.*,tp.reid,tp.typedir,ch.addtable
FROM `#@__archives` arc
LEFT JOIN #@__arctype tp on tp.id=arc.typeid
@@ -244,7 +244,7 @@ class Archives
//模板里直接使用{dede:field name='image'/}获取缩略图
$this->Fields['image'] = (!preg_match('/jpg|gif|png/i', $this->Fields['picname']) ? '' : " ");
}
- // 处理投票选项
+ //处理投票选项
if (isset($this->Fields['voteid']) && !empty($this->Fields['voteid'])) {
$this->Fields['vote'] = '';
$voteid = $this->Fields['voteid'];
@@ -500,7 +500,7 @@ class Archives
if ($GLOBALS['cfg_jump_once'] == 'N') {
$pageHtml = "\r\n\r\n \r\n".$this->Fields['title']." \r\n";
$pageHtml .= " Fields['redirecturl']."\">\r\n\r\n\r\n";
- $pageHtml .= "现在正在转向:".$this->Fields['title'].",请稍候... \r\n转向内容简介:".$this->Fields['description']."\r\n\r\n\r\n";
+ $pageHtml .= "现在正在转向:".$this->Fields['title'].",请稍候 \r\n转向内容简介:".$this->Fields['description']."\r\n\r\n\r\n";
echo $pageHtml;
} else {
header("location:{$this->Fields['redirecturl']}");
@@ -522,7 +522,7 @@ class Archives
if ($this->TempSource == '') {
$tempfile = $this->GetTempletFile();
if (!file_exists($tempfile) || !is_file($tempfile)) {
- echo "文档ID:{$this->Fields['id']} - {$this->TypeLink->TypeInfos['typename']} - {$this->Fields['title']} ";
+ echo "文档ID:{$this->Fields['id']} - {$this->TypeLink->TypeInfos['typename']} - {$this->Fields['title']} ";
echo "模板文件不存在,无法解析文档";
exit();
}
@@ -795,7 +795,7 @@ class Archives
if ($totalPage == 1) {
return "";
}
- $PageList = "共".$totalPage."页: ";
+ $PageList = "".$totalPage."页 ";
$nPage = $nowPage - 1;
$lPage = $nowPage + 1;
if ($nowPage == 1) {
@@ -862,7 +862,7 @@ class Archives
if ($totalPage == 1) {
return "";
}
- $PageList = "共".$totalPage."页: ";
+ $PageList = "".$totalPage."页: ";
$nPage = $nowPage - 1;
$lPage = $nowPage + 1;
if ($nowPage == 1) {
@@ -1012,7 +1012,7 @@ class Archives
$karr = $kaarr = $GLOBALS['replaced'] = array();
//暂时屏蔽超链接
$body = preg_replace("#()(.*)(<)(\/a>)#isU", '\\1-]-\\4-[-\\6', $body);
- $query = "SELECT * FROM #@__keywords WHERE rpurl<>'' ORDER BY rank DESC";
+ $query = "SELECT * FROM `#@__keywords` WHERE rpurl<>'' ORDER BY `rank` DESC";
$this->dsql->SetQuery($query);
$this->dsql->Execute();
while($row = $this->dsql->GetArray())
@@ -1028,7 +1028,7 @@ class Archives
{
if($cfg_replace_num > 0)
{
- $query = "SELECT * FROM #@__keywords WHERE rpurl<>'' ORDER BY rank DESC";
+ $query = "SELECT * FROM `#@__keywords` WHERE rpurl<>'' ORDER BY `rank` DESC";
$this->dsql->SetQuery($query);
$this->dsql->Execute();
while($row = $this->dsql->GetArray())
@@ -1038,7 +1038,7 @@ class Archives
$body = str_replace_limit($key, " $key ", $body, $cfg_replace_num);
}
} else {
- $query = "SELECT * FROM #@__keywords WHERE rpurl<>'' ORDER BY rank DESC";
+ $query = "SELECT * FROM `#@__keywords` WHERE rpurl<>'' ORDER BY `rank` DESC";
$this->dsql->SetQuery($query);
$this->dsql->Execute();
while($row = $this->dsql->GetArray())
diff --git a/src/include/arc.freelist.class.php b/src/system/archive/freelist.class.php
similarity index 94%
rename from src/include/arc.freelist.class.php
rename to src/system/archive/freelist.class.php
index 855ce22f..1a0444f2 100755
--- a/src/include/arc.freelist.class.php
+++ b/src/system/archive/freelist.class.php
@@ -1,17 +1,16 @@
-FLInfos = $this->dsql->GetOne("SELECT * FROM `#@__freelist` WHERE aid='$fid' ");
$liststr = $this->FLInfos['listtag'];
$this->FLInfos['maxpage'] = (empty($this->FLInfos['maxpage']) ? 100 : $this->FLInfos['maxpage']);
-
//载入数据里保存的列表属性信息
$ndtp = new DedeTagParse();
$ndtp->SetNameSpace("dede", "{", "}");
@@ -60,14 +57,11 @@ class FreeList
$this->PageSize = 30;
}
$channelid = $this->ListObj->GetAtt('channel');
-
/*
if(empty($channelid))
{
showmsg('必须指定频道','-1');exit();
- }
- else
- {
+ } else {
$channelid = intval($channelid);
$channelinfo = $this->dsql->getone("select maintable from #@__channeltype where id='$channelid'");
$this->maintable = $channelinfo['maintable'];
@@ -75,12 +69,10 @@ class FreeList
*/
$channelid = intval($channelid);
$this->maintable = '#@__archives';
-
//全局模板解析器
$this->dtp = new DedeTagParse();
$this->dtp->SetNameSpace("dede", "{", "}");
$this->dtp->SetRefObj($this);
-
//设置一些全局参数的值
$this->Fields['aid'] = $this->FLInfos['aid'];
$this->Fields['title'] = $this->FLInfos['title'];
@@ -100,18 +92,15 @@ class FreeList
$this->PartView = new PartView();
$this->CountRecord();
}
-
//php4构造函数
function FreeList($fid)
{
$this->__construct($fid);
}
-
//关闭相关资源
function Close()
{
}
-
/**
* 统计列表里的记录
*
@@ -121,7 +110,6 @@ class FreeList
function CountRecord()
{
global $cfg_list_son, $cfg_needsontype;
-
//统计数据库记录
$this->TotalResult = -1;
if (isset($GLOBALS['TotalResult'])) {
@@ -132,7 +120,6 @@ class FreeList
} else {
$this->PageNo = 1;
}
-
//已经有总记录的值
if ($this->TotalResult == -1) {
$addSql = " arcrank > -1 AND channel>-1 ";
@@ -144,7 +131,6 @@ class FreeList
if (empty($channelid)) {
$channelid = 0;
}
-
//是否指定栏目条件
if (!empty($typeid)) {
if ($cfg_list_son == 'N') {
@@ -153,18 +139,15 @@ class FreeList
$addSql .= " AND typeid in (".GetSonIds($typeid, 0, TRUE).") ";
}
}
-
//自定义属性条件
if ($att != '') {
$flags = explode(',', $att);
for ($i = 0; isset($flags[$i]); $i++) $addSql .= " AND FIND_IN_SET('{$flags[$i]}',flag)>0 ";
}
-
//文档的频道模型
if ($channelid > 0 && !preg_match("#spec#i", $listtype)) {
$addSql .= " AND channel = '$channelid' ";
}
-
//推荐文档 带缩略图 专题文档
if (preg_match("#commend#i", $listtype)) {
$addSql .= " AND FIND_IN_SET('c',flag) > 0 ";
@@ -197,7 +180,6 @@ class FreeList
$this->TotalResult = $this->TotalPage * $this->PageSize;
}
}
-
/**
* 载入模板
*
@@ -215,7 +197,6 @@ class FreeList
$this->dtp->LoadTemplate($tempfile);
$this->TempletsFile = preg_replace("#^".$GLOBALS['cfg_basedir']."#", '', $tempfile);
}
-
/**
* 列表创建HTML
*
@@ -247,7 +228,6 @@ class FreeList
$firstFile = '';
for ($this->PageNo = $startpage; $this->PageNo < $endpage; $this->PageNo++) {
$this->ParseDMFields($this->PageNo, 1);
-
//文件名
$makeFile = $this->GetMakeFileRule();
if (!preg_match("#^\/#", $makeFile)) {
@@ -260,23 +240,21 @@ class FreeList
if ($this->PageNo == 1) {
$firstFile = $makeFile;
}
-
//保存文件
$this->dtp->SaveTo($makeFile);
- echo " ";
+ echo " ";
}
if ($this->FLInfos['nodefault'] == 0) {
$murl = '/'.str_replace('{cmspath}', $GLOBALS['cfg_cmspath'], $this->FLInfos['listdir']);
$murl .= '/'.$this->FLInfos['defaultpage'];
$indexfile = $GLOBALS['cfg_basedir'].$murl;
$murl = preg_replace("#\/{1,}#", "/", $murl);
- echo "复制:$firstFile 为 ".$this->FLInfos['defaultpage']."
";
+ echo "复制:$firstFile 为 ".$this->FLInfos['defaultpage']."
";
copy($firstFile, $indexfile);
}
$this->Close();
return $murl;
}
-
/**
* 显示列表
*
@@ -290,7 +268,6 @@ class FreeList
$this->ParseDMFields($this->PageNo, 0);
$this->dtp->Display();
}
-
/**
* 显示单独模板页面
*
@@ -332,7 +309,6 @@ class FreeList
}
}
}
-
/**
* 解析模板,对固定的标记进行初始给值
*
@@ -343,7 +319,6 @@ class FreeList
{
MakeOneTag($this->dtp, $this);
}
-
/**
* 解析模板,对内容里的变动进行赋值
*
@@ -375,7 +350,6 @@ class FreeList
}
}
}
-
/**
* 获得要创建的文件名称规则
*
@@ -399,7 +373,6 @@ class FreeList
return $okfile;
}
}
-
/**
* 获得一个单列的文档列表
*
@@ -425,13 +398,11 @@ class FreeList
$imgheight = AttDef($imgheight, 80);
$innertext = trim($this->ListObj->GetInnerText());
if (empty($innertext)) $innertext = GetSysTemplets("list_fulllist.htm");
-
$tablewidth = 100;
if ($col == "") $col = 1;
$colWidth = ceil(100 / $col);
$tablewidth = $tablewidth."%";
$colWidth = $colWidth."%";
-
//按不同情况设定SQL条件
$orwhere = " arc.arcrank > -1 AND channel>-1 ";
$typeid = $this->ListObj->GetAtt('typeid');
@@ -440,7 +411,6 @@ class FreeList
$att = $this->ListObj->GetAtt('att');
$channelid = $this->ListObj->GetAtt('channel');
if (empty($channelid)) $channelid = 0;
-
//是否指定栏目条件
if (!empty($typeid)) {
if ($cfg_list_son == 'N') {
@@ -449,7 +419,6 @@ class FreeList
$orwhere .= " AND arc.typeid IN (".GetSonIds($typeid, 0, TRUE).") ";
}
}
-
//自定义属性条件
if ($att != '') {
$flags = explode(',', $att);
@@ -459,7 +428,6 @@ class FreeList
if ($channelid > 0 && !preg_match("#spec#i", $listtype)) {
$orwhere .= " AND arc.channel = '$channelid' ";
}
-
//推荐文档 带缩略图 专题文档
if (preg_match("#commend#i", $listtype)) {
$orwhere .= " AND FIND_IN_SET('c',flag) > 0 ";
@@ -480,7 +448,6 @@ class FreeList
}
$orderby = $this->ListObj->GetAtt('orderby');
$orderWay = $this->ListObj->GetAtt('orderway');
-
//排序方式
$ordersql = "";
if ($orderby == "senddate") {
@@ -500,7 +467,6 @@ class FreeList
} else {
$ordersql = " ORDER BY arc.sortrank $orderWay";
}
-
//获得附加表的相关信息
$addField = "";
$addJoin = "";
@@ -524,9 +490,7 @@ class FreeList
}
}
}
-
- $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,
- tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
+ $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
$addField
FROM {$this->maintable} arc
LEFT JOIN #@__arctype tp ON arc.typeid=tp.id
@@ -552,7 +516,6 @@ class FreeList
}
if ($row = $this->dsql->GetArray("al")) {
$GLOBALS['autoindex']++;
-
//处理一些特殊字段
$row['id'] = $row['id'];
$row['arcurl'] = $this->GetArcUrl(
@@ -585,9 +548,7 @@ class FreeList
$row["siteurl"] = $GLOBALS['cfg_mainsite'];
}
}
-
$row['description'] = cn_substr($row['description'], $infolen);
-
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif';
}
@@ -607,12 +568,11 @@ class FreeList
$row['templeturl'] = $GLOBALS['cfg_templeturl'];
$row['title'] = cn_substr($row['title'], $titlelen);
if ($row['color'] != "") {
- $row['title'] = "".$row['title']." ";
+ $row['title'] = "".$row['title']." ";
}
if (preg_match("#c#", $row['flag'])) {
$row['title'] = "".$row['title']." ";
}
-
//编译附加表里的数据
if (is_object($this->ChannelUnit)) {
foreach ($row as $k => $v) {
@@ -626,7 +586,6 @@ class FreeList
}
}
}
-
//解析单条记录
if (is_array($indtp->CTags)) {
foreach ($indtp->CTags as $k => $ctag) {
@@ -645,7 +604,6 @@ class FreeList
}
$artlist .= $indtp->GetResult();
} //if hasRow
-
else {
$artlist .= "";
}
@@ -653,7 +611,6 @@ class FreeList
$artlist .= " \r\n";
}
} //Loop Col
-
if ($col > 1) {
$i += $col - 1;
}
@@ -661,14 +618,12 @@ class FreeList
$artlist .= " \r\n";
}
} //Loop Line
-
if ($col > 1) {
$artlist .= "
\r\n";
}
$this->dsql->FreeResult("al");
return $artlist;
}
-
/**
* 获取静态的分页列表
*
@@ -688,17 +643,15 @@ class FreeList
}
$totalpage = ceil($this->TotalResult / $this->PageSize);
if ($totalpage <= 1 && $this->TotalResult > 0) {
- return "共1页/".$this->TotalResult."条记录 ";
+ return "1页".$this->TotalResult."篇 ";
}
if ($this->TotalResult == 0) {
- return "共0页/".$this->TotalResult."条记录 ";
+ return "0页".$this->TotalResult."篇 ";
}
- $maininfo = "共{$totalpage}页/".$this->TotalResult."条记录 ";
+ $maininfo = "{$totalpage}页".$this->TotalResult."篇 ";
$purl = $this->GetCurUrl();
$tnamerule = $this->GetMakeFileRule();
$tnamerule = preg_replace("#^(.*)\/#", '', $tnamerule);
-
-
//获得上一页和主页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -706,7 +659,6 @@ class FreeList
} else {
$indexpage = "首页 \r\n";
}
-
//下一页,未页的链接
if ($this->PageNo != $totalpage && $totalpage > 1) {
$nextpage .= "下一页 \r\n";
@@ -714,7 +666,6 @@ class FreeList
} else {
$endpage = "末页 \r\n";
}
-
//option链接
$optionlen = strlen($totalpage);
$optionlen = $optionlen * 12 + 18;
@@ -729,7 +680,6 @@ class FreeList
}
}
$optionlist .= "";
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -745,7 +695,6 @@ class FreeList
$total_list = $totalpage;
}
}
-
for ($j; $j <= $total_list; $j++) {
if ($j == $this->PageNo) {
$listdd .= "{$j} \r\n";
@@ -777,7 +726,6 @@ class FreeList
}
return $plist;
}
-
/**
* 获取动态的分页列表
*
@@ -797,18 +745,17 @@ class FreeList
}
$totalpage = ceil($this->TotalResult / $this->PageSize);
if ($totalpage <= 1 && $this->TotalResult > 0) {
- return "共1页/".$this->TotalResult."条记录 ";
+ return "1页".$this->TotalResult."篇 ";
}
if ($this->TotalResult == 0) {
- return "共0页/".$this->TotalResult."条记录 ";
+ return "0页".$this->TotalResult."篇 ";
}
- $maininfo = "共{$totalpage}页/".$this->TotalResult."条记录 ";
+ $maininfo = "{$totalpage}页".$this->TotalResult."篇 ";
$purl = $this->GetCurUrl();
$geturl = "lid=".$this->FreeID."&TotalResult=".$this->TotalResult."&";
$hidenform = " \r\n";
$hidenform .= " \r\n";
$purl .= "?".$geturl;
-
//获得上一页和下一页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -822,7 +769,6 @@ class FreeList
} else {
$endpage = "末页 \r\n";
}
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -836,7 +782,7 @@ class FreeList
}
for ($j; $j <= $total_list; $j++) {
if ($j == $this->PageNo) {
- $listdd .= "$j \r\n";
+ $listdd .= "$j \r\n";
} else {
$listdd .= "".$j." \r\n";
}
@@ -850,7 +796,6 @@ class FreeList
$plist .= "\r\n";
return $plist;
}
-
/**
* 获得一个指定档案的链接
*
@@ -901,7 +846,6 @@ class FreeList
$sitepath
);
}
-
/**
* 获得当前的页面文件的url
*
diff --git a/src/include/arc.listview.class.php b/src/system/archive/listview.class.php
similarity index 87%
rename from src/include/arc.listview.class.php
rename to src/system/archive/listview.class.php
index 9202d3ab..9be8c595 100755
--- a/src/include/arc.listview.class.php
+++ b/src/system/archive/listview.class.php
@@ -1,18 +1,17 @@
-upPageType = $uppage;
$this->remoteDir = '';
$this->TotalResult = is_numeric($this->TotalResult) ? $this->TotalResult : "";
-
if (!is_array($this->TypeLink->TypeInfos)) {
$this->IsError = true;
}
@@ -77,15 +74,21 @@ class ListView
$this->Fields['id'] = $typeid;
$this->Fields['position'] = $this->TypeLink->GetPositionLink(true);
$this->Fields['title'] = preg_replace("/[<>]/", " / ", $this->TypeLink->GetPositionLink(false));
-
+ //添加联动多筛选
+ if (isset($_REQUEST['tid']))
+ {
+ foreach($_GET as $key => $value) {
+ if ($key!="tid" && $key!="TotalResult" && $key!="PageNo") {
+ $this->Fields[string_filter($key)] = string_filter(urldecode($value));
+ }
+ }
+ }
//设置一些全局参数的值
foreach ($GLOBALS['PubFields'] as $k => $v) $this->Fields[$k] = $v;
$this->Fields['rsslink'] = $GLOBALS['cfg_cmsurl']."/data/rss/".$this->TypeID.".xml";
-
//设置环境变量
SetSysEnv($this->TypeID, $this->Fields['typename'], 0, '', 'list');
$this->Fields['typeid'] = $this->TypeID;
-
//获得交叉栏目ID
if ($this->TypeLink->TypeInfos['cross'] > 0 && $this->TypeLink->TypeInfos['ispart'] == 0) {
$selquery = '';
@@ -105,21 +108,17 @@ class ListView
}
}
}
- } //!error
-
+ }//!error
}
-
//php4构造函数
function ListView($typeid, $uppage = 0)
{
$this->__construct($typeid, $uppage);
}
-
//关闭相关资源
function Close()
{
}
-
/**
* 统计列表里的记录
*
@@ -129,19 +128,57 @@ class ListView
*/
function CountRecord()
{
- global $cfg_list_son, $cfg_need_typeid2, $cfg_cross_sectypeid;
- if (empty($cfg_need_typeid2)) $cfg_need_typeid2 = 'N';
-
- //统计数据库记录
+ global $cfg_list_son,$cfg_need_typeid2,$cfg_cross_sectypeid;
+ if(empty($cfg_need_typeid2)) $cfg_need_typeid2 = 'N';
+ //获得附加表的相关信息
+ $addtable = $this->ChannelUnit->ChannelInfos['addtable'];
+ $filtersql = '';
+ if($addtable!="")
+ {
+ $addJoin = " LEFT JOIN `$addtable` ON arc.id = ".$addtable.'.aid ';
+ $addField = '';
+ $fields = explode(',',$this->ChannelUnit->ChannelInfos['listfields']);
+ foreach($fields as $k=>$v)
+ {
+ $nfields[$v] = $k;
+ }
+ if(is_array($this->ChannelUnit->ChannelFields) && !empty($this->ChannelUnit->ChannelFields))
+ {
+ foreach($this->ChannelUnit->ChannelFields as $k=>$arr)
+ {
+ if(isset($nfields[$k]))
+ {
+ if(!empty($arr['rename'])) {
+ $addField .= ','.$addtable.'.'.$k.' as '.$arr['rename'];
+ }
+ else {
+ $addField .= ','.$addtable.'.'.$k;
+ }
+ }
+ }
+ }
+ if (isset($_REQUEST['tid']))
+ {
+ foreach($_GET as $key => $value) {
+ $value1 = explode("|", $value);
+ foreach ($value1 as $valuea)
+ {
+ $filtersql .= ($key!="tid" && $key!="TotalResult" && $key!="PageNo") ? " AND find_in_set('".string_filter(urldecode($valuea))."', ".$addtable.".".string_filter($key).")" : '';
+ }
+ }
+ }
+ } else {
+ $addField = '';
+ $addJoin = '';
+ }
+ //统计数据库记录
$this->TotalResult = -1;
if (isset($GLOBALS['TotalResult'])) $this->TotalResult = $GLOBALS['TotalResult'];
if (isset($GLOBALS['PageNo'])) $this->PageNo = $GLOBALS['PageNo'];
else $this->PageNo = 1;
$this->addSql = " arc.arcrank > -1 ";
-
$typeid2like = " '%,{$this->TypeID},%' ";
if ($cfg_list_son == 'N') {
-
if ($cfg_need_typeid2 == 'N') {
if ($this->CrossID == '') $this->addSql .= " AND (arc.typeid='".$this->TypeID."') ";
else $this->addSql .= " AND (arc.typeid in({$this->CrossID},{$this->TypeID})) ";
@@ -180,8 +217,9 @@ class ListView
}
}
}
- if ($this->TotalResult == -1) {
- $cquery = "SELECT COUNT(*) AS dd FROM `#@__arctiny` arc WHERE ".$this->addSql;
+ if($this->TotalResult==-1)
+ {
+ $cquery = "SELECT COUNT(*) AS dd FROM `#@__arctiny` arc $addJoin WHERE ".$this->addSql.$filtersql;
$row = $this->dsql->GetOne($cquery);
if (is_array($row)) {
$this->TotalResult = $row['dd'];
@@ -189,7 +227,6 @@ class ListView
$this->TotalResult = 0;
}
}
-
//初始化列表模板,并统计页面总数
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos['templist'];
$tempfile = str_replace("{tid}", $this->TypeID, $tempfile);
@@ -203,7 +240,6 @@ class ListView
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
}
}
-
if (!file_exists($tempfile) || !is_file($tempfile)) {
echo "模板文件不存在,无法解析文档";
exit();
@@ -224,7 +260,6 @@ class ListView
}
$this->TotalPage = ceil($this->TotalResult / $this->PageSize);
}
-
/**
* 列表创建HTML
*
@@ -239,19 +274,16 @@ class ListView
if (empty($startpage)) {
$startpage = 1;
}
-
//创建封面模板文件
if ($this->TypeLink->TypeInfos['isdefault'] == -1) {
echo '这个类目是动态类目';
- return '../plus/list.php?tid='.$this->TypeLink->TypeInfos['id'];
+ return '../apps/list.php?tid='.$this->TypeLink->TypeInfos['id'];
}
-
//单独页面
else if ($this->TypeLink->TypeInfos['ispart'] > 0) {
$reurl = $this->MakePartTemplets();
return $reurl;
}
-
if (empty($this->TotalResult)) $this->CountRecord();
//初步给固定值的标记赋值
$this->ParseTempletsFirst();
@@ -304,7 +336,6 @@ class ListView
}
return $murl;
}
-
/**
* 显示列表
*
@@ -340,7 +371,6 @@ class ListView
$this->ParseDMFields($this->PageNo, 0);
$this->dtp->Display();
}
-
/**
* 创建单独模板页面
*
@@ -384,7 +414,6 @@ class ListView
}
return $this->GetTrueUrl($makeUrl);
}
-
/**
* 显示单独模板页面
*
@@ -432,7 +461,6 @@ class ListView
}
}
}
-
/**
* 获得站点的真实根路径
*
@@ -444,7 +472,6 @@ class ListView
$truepath = $GLOBALS["cfg_basedir"];
return $truepath;
}
-
/**
* 获得真实连接路径
*
@@ -462,7 +489,6 @@ class ListView
}
return $nurl;
}
-
/**
* 解析模板,对固定的标记进行初始给值
*
@@ -479,7 +505,6 @@ class ListView
$GLOBALS['envs']['cross'] = 1;
MakeOneTag($this->dtp, $this);
}
-
/**
* 解析模板,对内容里的变动进行赋值
*
@@ -538,7 +563,6 @@ class ListView
}
}
}
-
/**
* 获得要创建的文件名称规则
*
@@ -561,7 +585,6 @@ class ListView
return $namerule2;
}
}
-
/**
* 获得一个单列的文档列表
*
@@ -597,9 +620,7 @@ class ListView
$orderWay = 'desc'
) {
global $cfg_list_son, $cfg_digg_update;
-
$typeid = $this->TypeID;
-
if ($row == '') $row = 10;
if ($limitstart == '') $limitstart = 0;
if ($titlelen == '') $titlelen = 100;
@@ -608,25 +629,21 @@ class ListView
if ($imgheight == '') $imgheight = 120;
if ($listtype == '') $listtype = 'all';
if ($orderWay == '') $orderWay = 'desc';
-
if ($orderby == '') {
$orderby = 'default';
} else {
$orderby = strtolower($orderby);
}
-
$tablewidth = str_replace('%', '', $tablewidth);
if ($tablewidth == '') $tablewidth = 100;
if ($col == '') $col = 1;
$colWidth = ceil(100 / $col);
$tablewidth = $tablewidth.'%';
$colWidth = $colWidth.'%';
-
$innertext = trim($innertext);
if ($innertext == '') {
$innertext = GetSysTemplets('list_fulllist.htm');
}
-
//排序方式
$ordersql = '';
if ($orderby == "senddate" || $orderby == "id") {
@@ -638,32 +655,47 @@ class ListView
} else {
$ordersql = " ORDER BY arc.sortrank $orderWay";
}
-
- //获得附加表的相关信息
- $addtable = $this->ChannelUnit->ChannelInfos['addtable'];
- if ($addtable != "") {
- $addJoin = " LEFT JOIN `$addtable` ON arc.id = ".$addtable.'.aid ';
- $addField = '';
- $fields = explode(',', $this->ChannelUnit->ChannelInfos['listfields']);
- foreach ($fields as $k => $v) {
- $nfields[$v] = $k;
- }
- if (is_array($this->ChannelUnit->ChannelFields) && !empty($this->ChannelUnit->ChannelFields)) {
- foreach ($this->ChannelUnit->ChannelFields as $k => $arr) {
- if (isset($nfields[$k])) {
- if (!empty($arr['rename'])) {
- $addField .= ','.$addtable.'.'.$k.' as '.$arr['rename'];
- } else {
- $addField .= ','.$addtable.'.'.$k;
- }
- }
- }
- }
- } else {
- $addField = '';
- $addJoin = '';
- }
-
+ $filtersql = '';
+ //获得附加表的相关信息
+ $addtable = $this->ChannelUnit->ChannelInfos['addtable'];
+ if($addtable!="")
+ {
+ $addJoin = " LEFT JOIN `$addtable` ON arc.id = ".$addtable.'.aid ';
+ $addField = '';
+ $fields = explode(',',$this->ChannelUnit->ChannelInfos['listfields']);
+ foreach($fields as $k=>$v)
+ {
+ $nfields[$v] = $k;
+ }
+ if(is_array($this->ChannelUnit->ChannelFields) && !empty($this->ChannelUnit->ChannelFields))
+ {
+ foreach($this->ChannelUnit->ChannelFields as $k=>$arr)
+ {
+ if(isset($nfields[$k]))
+ {
+ if(!empty($arr['rename'])) {
+ $addField .= ','.$addtable.'.'.$k.' as '.$arr['rename'];
+ }
+ else {
+ $addField .= ','.$addtable.'.'.$k;
+ }
+ }
+ }
+ }
+ if (isset($_REQUEST['tid']))
+ {
+ foreach($_GET as $key => $value) {
+ $value1 = explode("|", $value);
+ foreach ($value1 as $valuea)
+ {
+ $filtersql .= ($key!="tid" && $key!="TotalResult" && $key!="PageNo") ? " AND find_in_set('".string_filter(urldecode($valuea))."', ".$addtable.".".string_filter($key).")" : '';
+ }
+ }
+ }
+ } else {
+ $addField = '';
+ $addJoin = '';
+ }
//如果不用默认的sortrank或id排序,使用联合查询(数据量大时非常缓慢)
if (preg_match('/hot|click|lastpost/', $orderby)) {
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,
@@ -672,13 +704,13 @@ class ListView
FROM `#@__archives` arc
LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
$addJoin
- WHERE {$this->addSql} $ordersql LIMIT $limitstart,$row";
+ WHERE {$this->addSql} $filtersql $ordersql LIMIT $limitstart,$row";
}
//普通情况先从arctiny表查出ID,然后按ID查询(速度非常快)
else {
$t1 = ExecTime();
$ids = array();
- $query = "SELECT id FROM `#@__arctiny` arc WHERE {$this->addSql} $ordersql LIMIT $limitstart,$row ";
+ $query = "SELECT id FROM `#@__arctiny` arc $addJoin WHERE {$this->addSql} $filtersql $ordersql LIMIT $limitstart,$row ";
$this->dsql->SetQuery($query);
$this->dsql->Execute();
while ($arr = $this->dsql->GetArray()) {
@@ -697,12 +729,10 @@ class ListView
}
$t2 = ExecTime();
//echo $t2-$t1;
-
}
$this->dsql->SetQuery($query);
$this->dsql->Execute('al');
$t2 = ExecTime();
-
//echo $t2-$t1;
$artlist = '';
$this->dtp2->LoadSource($innertext);
@@ -715,14 +745,12 @@ class ListView
if ($row = $this->dsql->GetArray("al")) {
$GLOBALS['autoindex']++;
$ids[$row['id']] = $row['id'];
-
//处理一些特殊字段
$row['infos'] = cn_substr($row['description'], $infolen);
$row['id'] = $row['id'];
if ($row['corank'] > 0 && $row['arcrank'] == 0) {
$row['arcrank'] = $row['corank'];
}
-
$row['filename'] = $row['arcurl'] = GetFileUrl(
$row['id'],
$row['typeid'],
@@ -763,7 +791,7 @@ class ListView
$row['fulltitle'] = $row['title'];
$row['title'] = cn_substr($row['title'], $titlelen);
if ($row['color'] != '') {
- $row['title'] = "".$row['title']." ";
+ $row['title'] = "".$row['title']." ";
}
if (preg_match('/c/', $row['flag'])) {
$row['title'] = "".$row['title']." ";
@@ -772,7 +800,6 @@ class ListView
$row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl'];
$row['memberurl'] = $GLOBALS['cfg_memberurl'];
$row['templeturl'] = $GLOBALS['cfg_templeturl'];
-
//编译附加表里的数据
foreach ($row as $k => $v) {
$row[strtolower($k)] = $v;
@@ -797,23 +824,18 @@ class ListView
}
}
$artlist .= $this->dtp2->GetResult();
- } //if hasRow
-
- } //Loop Col
-
+ }//if hasRow
+ }//Loop Col
if ($col > 1) {
$i += $col - 1;
$artlist .= " \r\n";
}
- } //Loop Line
-
+ }//Loop Line
$t3 = ExecTime();
-
//echo ($t3-$t2);
$this->dsql->FreeResult('al');
return $artlist;
}
-
/**
* 获取静态的分页列表
*
@@ -832,16 +854,14 @@ class ListView
}
$totalpage = ceil($this->TotalResult / $this->PageSize);
if ($totalpage <= 1 && $this->TotalResult > 0) {
-
- return "共 1 页".$this->TotalResult." 条记录 \r\n";
+ return "1页".$this->TotalResult."篇 \r\n";
}
if ($this->TotalResult == 0) {
- return "共 0 页".$this->TotalResult." 条记录 \r\n";
+ return "0页".$this->TotalResult."篇 \r\n";
}
$purl = $this->GetCurUrl();
- $maininfo = "共 {$totalpage} 页".$this->TotalResult." 条 \r\n";
+ $maininfo = "{$totalpage}页".$this->TotalResult."篇 \r\n";
$tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']);
-
//获得上一页和主页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -849,7 +869,6 @@ class ListView
} else {
$indexpage = "首页 \r\n";
}
-
//下一页,未页的链接
if ($this->PageNo != $totalpage && $totalpage > 1) {
$nextpage .= "下一页 \r\n";
@@ -857,10 +876,8 @@ class ListView
} else {
$endpage = "末页 \r\n";
}
-
//option链接
$optionlist = '';
-
$optionlen = strlen($totalpage);
$optionlen = $optionlen * 12 + 18;
if ($optionlen < 36) $optionlen = 36;
@@ -874,7 +891,6 @@ class ListView
}
}
$optionlist .= "\r\n";
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -892,7 +908,7 @@ class ListView
}
for ($j; $j <= $total_list; $j++) {
if ($j == $this->PageNo) {
- $listdd .= "$j \r\n";
+ $listdd .= "$j \r\n";
} else {
$listdd .= "".$j." \r\n";
}
@@ -905,10 +921,8 @@ class ListView
if (preg_match('/end/i', $listitem)) $plist .= $endpage;
if (preg_match('/option/i', $listitem)) $plist .= $optionlist;
if (preg_match('/info/i', $listitem)) $plist .= $maininfo;
-
return $plist;
}
-
/**
* 获取动态的分页列表
*
@@ -928,28 +942,24 @@ class ListView
}
$totalpage = ceil($this->TotalResult / $this->PageSize);
if ($totalpage <= 1 && $this->TotalResult > 0) {
- return "共 1 页/".$this->TotalResult." 条记录 \r\n";
+ return "1页".$this->TotalResult."篇 \r\n";
}
if ($this->TotalResult == 0) {
- return "共 0 页/".$this->TotalResult." 条记录 \r\n";
+ return "0页".$this->TotalResult."篇 \r\n";
}
- $maininfo = "共 {$totalpage} 页".$this->TotalResult." 条 \r\n";
-
+ $maininfo = "{$totalpage}页".$this->TotalResult."篇 \r\n";
$purl = $this->GetCurUrl();
- // 如果开启为静态,则对规则进行替换
+ //如果开启为静态,则对规则进行替换
if ($cfg_rewrite == 'Y') {
$nowurls = preg_replace("/\-/", ".php?", $purl);
$nowurls = explode("?", $nowurls);
$purl = $nowurls[0];
}
-
$geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&";
$purl .= '?'.$geturl;
-
$optionlist = '';
//$hidenform = " \r\n";
//$hidenform .= " \r\n";
-
//获得上一页和下一页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -963,8 +973,6 @@ class ListView
} else {
$endpage = "末页 \r\n";
}
-
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -982,12 +990,11 @@ class ListView
}
for ($j; $j <= $total_list; $j++) {
if ($j == $this->PageNo) {
- $listdd .= "$j \r\n";
+ $listdd .= "$j \r\n";
} else {
- $listdd .= "".$j." \r\n";
+ $listdd .= "".$j." \r\n";
}
}
-
$plist = '';
if (preg_match('/index/i', $listitem)) $plist .= $indexpage;
if (preg_match('/pre/i', $listitem)) $plist .= $prepage;
@@ -996,7 +1003,6 @@ class ListView
if (preg_match('/end/i', $listitem)) $plist .= $endpage;
if (preg_match('/option/i', $listitem)) $plist .= $optionlist;
if (preg_match('/info/i', $listitem)) $plist .= $maininfo;
-
if ($cfg_rewrite == 'Y') {
$plist = str_replace('.php?tid=', '-', $plist);
$plist = str_replace('&TotalResult=', '-', $plist);
@@ -1004,7 +1010,6 @@ class ListView
}
return $plist;
}
-
/**
* 获得当前的页面文件的url
*
diff --git a/src/include/arc.partview.class.php b/src/system/archive/partview.class.php
similarity index 93%
rename from src/include/arc.partview.class.php
rename to src/system/archive/partview.class.php
index 7e67542d..8c81c5a7 100755
--- a/src/include/arc.partview.class.php
+++ b/src/system/archive/partview.class.php
@@ -1,16 +1,16 @@
-dtp->SetNameSpace("dede", "{", "}");
$this->dtp->SetRefObj($this);
$this->remoteDir = '';
-
if ($needtypelink) {
$this->TypeLink = new TypeLink($typeid);
if (is_array($this->TypeLink->TypeInfos)) {
@@ -58,25 +56,21 @@ class PartView
}
$_sys_globals['curfile'] = 'partview';
@$_sys_globals['typename'] = $this->Fields['typename'];
-
//设置环境变量
@SetSysEnv($this->TypeID, $this->Fields['typename'], 0, '', 'partview');
}
SetSysEnv($this->TypeID, '', 0, '', 'partview');
$this->Fields['typeid'] = $this->TypeID;
-
//设置一些全局参数的值
foreach ($GLOBALS['PubFields'] as $k => $v) {
$this->Fields[$k] = $v;
}
}
-
//php4构造函数
function PartView($typeid = 0, $needtypelink = TRUE)
{
$this->__construct($typeid, $needtypelink);
}
-
/**
* 重新指定引入的对象
*
@@ -91,7 +85,6 @@ class PartView
$this->__construct($refObj->TypeID);
}
}
-
/**
* 指定typelink对象给当前类实例
*
@@ -110,7 +103,6 @@ class PartView
}
}
}
-
/**
* 设置要解析的模板
*
@@ -132,7 +124,6 @@ class PartView
}
$this->ParseTemplet();
}
-
/**
* 显示内容
*
@@ -143,7 +134,6 @@ class PartView
{
$this->dtp->Display();
}
-
/**
* 获取内容
*
@@ -154,7 +144,6 @@ class PartView
{
return $this->dtp->GetResult();
}
-
/**
* 保存结果为文件
*
@@ -167,7 +156,6 @@ class PartView
{
$this->dtp->SaveTo($filename);
}
-
/**
* 解析模板里的标签
*
@@ -190,7 +178,6 @@ class PartView
}
MakeOneTag($this->dtp, $this); //这个函数放在 channelunit.func.php 文件中
}
-
/**
* 获得限定模型或栏目的一个指定文档列表
* 这个标记由于使用了缓存,并且处理数据是支持分表模式的,因此速度更快,但不能进行整站的数据调用
@@ -258,7 +245,6 @@ class PartView
return "";
}
}
-
if (!isset($GLOBALS['__SpGetArcList'])) {
require_once(dirname(__FILE__)."/inc/inc_fun_SpGetArcList.php");
}
@@ -289,7 +275,6 @@ class PartView
$ctag
);
}
-
//关闭所占用的资源
function Close()
{
diff --git a/src/include/arc.rssview.class.php b/src/system/archive/rssview.class.php
similarity index 94%
rename from src/include/arc.rssview.class.php
rename to src/system/archive/rssview.class.php
index 6344b9e9..659aac6f 100755
--- a/src/include/arc.rssview.class.php
+++ b/src/system/archive/rssview.class.php
@@ -1,17 +1,17 @@
-ParseTemplet();
}
-
//php4构造函数
function RssView($typeid, $max_row = 50)
{
$this->__construct($typeid, $max_row);
}
-
//关闭相关资源
function Close()
{
}
-
/**
* 显示列表
*
@@ -82,7 +78,6 @@ class RssView
{
$this->dtp->Display();
}
-
/**
* 开始创建列表
*
@@ -97,7 +92,6 @@ class RssView
$this->dtp->SaveTo($mfile);
return $murl;
}
-
/**
* 解析模板
*
@@ -117,7 +111,6 @@ class RssView
}
}
}
-
/**
* 获得文档列表
*
diff --git a/src/include/arc.searchview.class.php b/src/system/archive/searchview.class.php
similarity index 93%
rename from src/include/arc.searchview.class.php
rename to src/system/archive/searchview.class.php
index 00e62ffb..fac36568 100755
--- a/src/include/arc.searchview.class.php
+++ b/src/system/archive/searchview.class.php
@@ -1,22 +1,21 @@
-dtp2 = new DedeTagParse();
$this->dtp2->SetNameSpace("field", "[", "]");
$this->TypeLink = new TypeLink($typeid);
- // 通过分词获取关键词
+ //通过分词获取关键词
$this->Keywords = $this->GetKeywords($keyword);
-
//设置一些全局参数的值
if ($this->TypeID == "0") {
$this->ChannelTypeid = 1;
@@ -116,8 +113,6 @@ class SearchView
$this->Fields[$k] = $v;
}
$this->CountRecord();
-
-
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/search.htm";
if (defined('DEDEMOB')) {
$tempfile = str_replace('.htm', '_m.htm', $tempfile);
@@ -137,7 +132,6 @@ class SearchView
$this->dsql->ExecuteNoneQuery("UPDATE `#@__search_keywords` SET result='".$this->TotalResult."' WHERE keyword='".addslashes($keyword)."'; ");
}
}
-
//php4构造函数
function SearchView(
$typeid,
@@ -152,14 +146,12 @@ class SearchView
) {
$this->__construct($typeid, $keyword, $orderby, $achanneltype, $searchtype, $starttime, $upagesize, $kwtype, $mid);
}
-
//关闭相关资源
function Close()
{
}
-
/**
- * 获得关键字的分词结果,并保存到数据库
+ * 获得关键词的分词结果,并保存到数据库
*
* @access public
* @param string $keyword 关键词
@@ -185,7 +177,7 @@ class SearchView
}
$keywords = preg_replace("/[ ]{1,}/", " ", $keywords);
$client->Close();
- // var_dump($keywords);exit;
+ //var_dump($keywords);exit;
} else {
$sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang);
$sp->SetSource($keyword, $cfg_soft_lang, $cfg_soft_lang);
@@ -202,7 +194,7 @@ class SearchView
$keywords .= ' '.$key;
}
$keywords = preg_replace("/[ ]{1,}/", " ", $keywords);
- // var_dump($keywords);exit();
+ //var_dump($keywords);exit();
unset($sp);
}
} else {
@@ -217,9 +209,8 @@ class SearchView
}
return $keywords;
}
-
/**
- * 获得关键字SQL
+ * 获得关键词SQL
*
* @access private
* @return string
@@ -259,9 +250,8 @@ class SearchView
return $kwsql;
}
}
-
/**
- * 获得相关的关键字
+ * 获得相关的关键词
*
* @access public
* @param string $num 关键词数目
@@ -306,9 +296,8 @@ class SearchView
return $likeword;
}
}
-
/**
- * 加粗关键字
+ * 加粗关键词
*
* @access private
* @param string $fstr 关键词字符
@@ -326,14 +315,13 @@ class SearchView
if (ord($k[0]) > 0x80 && strlen($k) < 2) {
continue;
}
- // 这里不区分大小写进行关键词替换
- $fstr = str_ireplace($k, "$k ", $fstr);
- // 速度更快,效率更高
- //$fstr = str_replace($k, "$k ", $fstr);
+ //这里不区分大小写进行关键词替换
+ $fstr = str_ireplace($k, "$k ", $fstr);
+ //速度更快,效率更高
+ //$fstr = str_replace($k, "$k ", $fstr);
}
return $fstr;
}
-
/**
* 统计列表里的记录
*
@@ -409,7 +397,6 @@ class SearchView
}
}
}
-
/**
* 显示列表
*
@@ -481,7 +468,6 @@ class SearchView
if (!empty($oldkeyword)) $keyword = $oldkeyword;
$this->dtp->Display();
}
-
/**
* 获得文档列表
*
@@ -531,7 +517,6 @@ class SearchView
if ($innertext == '') {
$innertext = GetSysTemplets("search_list.htm");
}
-
//排序方式
$ordersql = '';
if ($this->ChannelType < 0 || $this->ChannelTypeid < 0) {
@@ -551,7 +536,6 @@ class SearchView
$ordersql = " ORDER BY arc.sortrank desc";
}
}
-
//搜索
$query = "SELECT arc.*,act.typedir,act.typename,act.isdefault,act.defaultname,act.namerule,
act.namerule2,act.ispart,act.moresite,act.siteurl,act.sitepath
@@ -635,18 +619,15 @@ class SearchView
}
$artlist .= $this->dtp2->GetResult();
} //if hasRow
-
else {
$artlist .= "";
}
if ($col > 1) $artlist .= " \r\n";
} //Loop Col
-
if ($col > 1) {
$artlist .= " \r\n";
}
} //Loop Line
-
if ($col > 1) {
$artlist .= "
\r\n";
}
@@ -654,7 +635,6 @@ class SearchView
return $artlist;
}
-
/**
* 获取动态的分页列表
*
@@ -674,20 +654,18 @@ class SearchView
}
$totalpage = ceil($this->TotalResult / $this->PageSize);
if ($totalpage <= 1 && $this->TotalResult > 0) {
- return "";
+ return "";
}
if ($this->TotalResult == 0) {
- return "";
+ return "";
}
$purl = $this->GetCurUrl();
-
$oldkeyword = (empty($oldkeyword) ? $this->Keyword : $oldkeyword);
-
//当结果超过限制时,重设结果页数
if ($this->TotalResult > $this->SearchMaxRc) {
$totalpage = ceil($this->SearchMaxRc / $this->PageSize);
}
- $infos = "共找到".$this->TotalResult." 条记录/最大显示{$totalpage} 页 \r\n";
+ $infos = "{$totalpage}页".$this->TotalResult."篇 \r\n";
$geturl = "keyword=".urlencode($oldkeyword)."&searchtype=".$this->SearchType;
$hidenform = " \r\n";
$geturl .= "&channeltype=".$this->ChannelType."&orderby=".$this->OrderBy;
@@ -700,7 +678,6 @@ class SearchView
$hidenform .= " \r\n";
$hidenform .= " \r\n";
$purl .= "?".$geturl;
-
//获得上一页和下一页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -714,7 +691,6 @@ class SearchView
} else {
$endpage = "末页 \r\n";
}
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -738,8 +714,8 @@ class SearchView
}
}
$plist = "";
- // $plist = "\r\n";
- // $plist .= "\r\n";
+ //$plist = "\r\n";
+ //$plist .= "\r\n";
$plist .= "$hidenform";
$plist .= " \r\n";
return $plist;
}
-
/**
* 获得当前的页面文件的url
*
diff --git a/src/include/arc.sglistview.class.php b/src/system/archive/sglistview.class.php
similarity index 94%
rename from src/include/arc.sglistview.class.php
rename to src/system/archive/sglistview.class.php
index e29f506c..01313acb 100755
--- a/src/include/arc.sglistview.class.php
+++ b/src/system/archive/sglistview.class.php
@@ -1,17 +1,16 @@
-Fields['id'] = $typeid;
$this->Fields['position'] = $this->TypeLink->GetPositionLink(true);
$this->Fields['title'] = preg_replace("/[<>]/", " / ", $this->TypeLink->GetPositionLink(false));
-
//获得附加表和列表字段信息
$this->AddTable = $this->ChannelUnit->ChannelInfos['addtable'];
$listfield = trim($this->ChannelUnit->ChannelInfos['listfields']);
-
$this->ListFields = explode(',', $listfield);
-
//设置一些全局参数的值
foreach ($GLOBALS['PubFields'] as $k => $v) $this->Fields[$k] = $v;
$this->Fields['rsslink'] = $GLOBALS['cfg_cmsurl']."/data/rss/".$this->TypeID.".xml";
-
//设置环境变量
SetSysEnv($this->TypeID, $this->Fields['typename'], 0, '', 'list');
$this->Fields['typeid'] = $this->TypeID;
-
//获得交叉栏目ID
if ($this->TypeLink->TypeInfos['cross'] > 0 && $this->TypeLink->TypeInfos['ispart'] == 0) {
$selquery = '';
@@ -111,9 +104,7 @@ class SgListView
}
}
} //!error
-
}
-
//php4构造函数
function SgListView($typeid, $searchArr = array())
{
@@ -123,7 +114,6 @@ class SgListView
function Close()
{
}
-
/**
* 统计列表里的记录
*
@@ -133,14 +123,12 @@ class SgListView
function CountRecord()
{
global $cfg_list_son;
-
//统计数据库记录
$this->TotalResult = -1;
if (isset($GLOBALS['TotalResult'])) $this->TotalResult = $GLOBALS['TotalResult'];
if (isset($GLOBALS['PageNo'])) $this->PageNo = $GLOBALS['PageNo'];
else $this->PageNo = 1;
$this->addSql = " arc.arcrank > -1 ";
-
//栏目id条件
if (!empty($this->TypeID)) {
if ($cfg_list_son == 'N') {
@@ -151,7 +139,6 @@ class SgListView
else $this->addSql .= " AND (arc.typeid IN (".GetSonIds($this->TypeID, $this->Fields['channeltype']).",{$this->CrossID}) ) ";
}
}
-
$naddQuery = '';
//地区与信息类型条件
if (count($this->searchArr) > 0) {
@@ -173,12 +160,10 @@ class SgListView
$naddQuery .= "AND arc.title like '%{$this->searchArr['keyword']}%' ";
}
}
-
if ($naddQuery != '') {
$this->sAddTable = true;
$this->addSql .= $naddQuery;
}
-
if ($this->TotalResult == -1) {
if ($this->sAddTable) {
$cquery = "SELECT COUNT(*) AS dd FROM `{$this->AddTable}` arc WHERE ".$this->addSql;
@@ -225,7 +210,6 @@ class SgListView
}
$this->TotalPage = ceil($this->TotalResult / $this->PageSize);
}
-
/**
* 列表创建HTML
*
@@ -239,19 +223,16 @@ class SgListView
if (empty($startpage)) {
$startpage = 1;
}
-
//创建封面模板文件
if ($this->TypeLink->TypeInfos['isdefault'] == -1) {
echo '这个类目是动态类目';
return '';
}
-
//单独页面
else if ($this->TypeLink->TypeInfos['ispart'] > 0) {
$reurl = $this->MakePartTemplets();
return $reurl;
}
-
if (empty($this->TotalResult)) $this->CountRecord();
//初步给固定值的标记赋值
$this->ParseTempletsFirst();
@@ -304,7 +285,6 @@ class SgListView
}
return $murl;
}
-
/**
* 显示列表
*
@@ -336,7 +316,6 @@ class SgListView
$this->ParseDMFields($this->PageNo, 0);
$this->dtp->Display();
}
-
/**
* 创建单独模板页面
*
@@ -380,7 +359,6 @@ class SgListView
}
return $this->GetTrueUrl($makeUrl);
}
-
/**
* 显示单独模板页面
*
@@ -427,7 +405,6 @@ class SgListView
}
}
}
-
/**
* 获得站点的真实根路径
*
@@ -439,7 +416,6 @@ class SgListView
$truepath = $GLOBALS["cfg_basedir"];
return $truepath;
}
-
/**
* 获得真实连接路径
*
@@ -458,7 +434,6 @@ class SgListView
}
return $nurl;
}
-
/**
* 解析模板,对固定的标记进行初始给值
*
@@ -475,7 +450,6 @@ class SgListView
$GLOBALS['envs']['cross'] = 1;
MakeOneTag($this->dtp, $this);
}
-
/**
* 解析模板,对内容里的变动进行赋值
*
@@ -531,7 +505,6 @@ class SgListView
}
}
}
-
/**
* 获得要创建的文件名称规则
*
@@ -554,7 +527,6 @@ class SgListView
return $namerule2;
}
}
-
/**
* 获得一个单列的文档列表
*
@@ -578,30 +550,21 @@ class SgListView
{
global $cfg_list_son;
$typeid = $this->TypeID;
-
if ($row == '') $row = 10;
-
if ($limitstart == '') $limitstart = 0;
-
if ($titlelen == '') $titlelen = 100;
-
if ($listtype == '') $listtype = "all";
-
if ($orderby == '') $orderby = 'id';
else $orderby = strtolower($orderby);
-
if ($orderWay == '') $orderWay = 'desc';
-
$tablewidth = str_replace("%", "", $tablewidth);
if ($tablewidth == '') $tablewidth = 100;
if ($col == '') $col = 1;
$colWidth = ceil(100 / $col);
$tablewidth = $tablewidth."%";
$colWidth = $colWidth."%";
-
$innertext = trim($innertext);
if ($innertext == '') $innertext = GetSysTemplets('list_sglist.htm');
-
//排序方式
$ordersql = '';
if ($orderby == 'senddate' || $orderby == 'id') {
@@ -611,9 +574,7 @@ class SgListView
} else {
$ordersql = " ORDER BY arc.aid $orderWay";
}
-
$addField = 'arc.'.join(',arc.', $this->ListFields);
-
//如果不用默认的sortrank或id排序,使用联合查询(数据量大时非常缓慢)
if (preg_match('/hot|click/', $orderby) || $this->sAddTable) {
$query = "SELECT tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,
@@ -629,7 +590,6 @@ class SgListView
$ids = array();
$nordersql = str_replace('.aid', '.id', $ordersql);
$query = "SELECT id From `#@__arctiny` arc WHERE {$this->addSql} $nordersql LIMIT $limitstart,$row ";
-
$this->dsql->SetQuery($query);
$this->dsql->Execute();
while ($arr = $this->dsql->GetArray()) {
@@ -639,20 +599,17 @@ class SgListView
if ($idstr == '') {
return '';
} else {
- $query = "SELECT tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,
- tp.ispart,tp.moresite,tp.siteurl,tp.sitepath,arc.aid,arc.aid AS id,arc.typeid,
- $addField
- FROM `{$this->AddTable}` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
- WHERE arc.aid IN($idstr) AND arc.arcrank >-1 $ordersql ";
+ $query = "SELECT tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath,arc.aid,arc.aid AS id,arc.typeid,
+ $addField
+ FROM `{$this->AddTable}` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
+ WHERE arc.aid IN($idstr) AND arc.arcrank >-1 $ordersql ";
}
$t2 = ExecTime();
//echo $t2-$t1;
}
-
$this->dsql->SetQuery($query);
$this->dsql->Execute('al');
$t2 = ExecTime();
-
//echo $t2-$t1;
$artlist = '';
$this->dtp2->LoadSource($innertext);
@@ -665,7 +622,6 @@ class SgListView
if ($row = $this->dsql->GetArray("al")) {
$GLOBALS['autoindex']++;
$ids[$row['aid']] = $row['id'] = $row['aid'];
-
//处理一些特殊字段
$row['ismake'] = 1;
$row['money'] = 0;
@@ -686,7 +642,6 @@ class SgListView
$row['siteurl'],
$row['sitepath']
);
-
$row['typeurl'] = GetTypeUrl(
$row['typeid'],
MfTypedir($row['typedir']),
@@ -705,38 +660,25 @@ class SgListView
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
}
$row['picname'] = $row['litpic'];
-
$row['pubdate'] = $row['senddate'];
-
$row['stime'] = GetDateMK($row['pubdate']);
-
$row['typelink'] = "".$row['typename']." ";
-
$row['fulltitle'] = $row['title'];
-
$row['title'] = cn_substr($row['title'], $titlelen);
-
if (preg_match('/b/', $row['flag'])) {
$row['title'] = "".$row['title']." ";
}
-
$row['textlink'] = "".$row['title']." ";
-
$row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl'];
-
$row['memberurl'] = $GLOBALS['cfg_memberurl'];
-
$row['templeturl'] = $GLOBALS['cfg_templeturl'];
-
//编译附加表里的数据
foreach ($row as $k => $v) $row[strtolower($k)] = $v;
-
foreach ($this->ChannelUnit->ChannelFields as $k => $arr) {
if (isset($row[$k])) {
$row[$k] = $this->ChannelUnit->MakeField($k, $row[$k]);
}
}
-
if (is_array($this->dtp2->CTags)) {
foreach ($this->dtp2->CTags as $k => $ctag) {
if ($ctag->GetName() == 'array') {
@@ -753,22 +695,17 @@ class SgListView
}
$artlist .= $this->dtp2->GetResult();
} //if hasRow
-
} //Loop Col
-
if ($col > 1) {
$i += $col - 1;
$artlist .= " \r\n";
}
} //Loop Line
-
$t3 = ExecTime();
-
//echo ($t3-$t2);
$this->dsql->FreeResult('al');
return $artlist;
}
-
/**
* 获取静态的分页列表
*
@@ -788,16 +725,15 @@ class SgListView
}
$totalpage = ceil($this->TotalResult / $this->PageSize);
if ($totalpage <= 1 && $this->TotalResult > 0) {
- return "共 1 页".$this->TotalResult."条记录 ";
+ return "1页".$this->TotalResult."篇 ";
}
if ($this->TotalResult == 0) {
- return "共 0 页".$this->TotalResult."条记录 ";
+ return "0页".$this->TotalResult."篇 ";
}
$purl = $this->GetCurUrl();
- $maininfo = "共 {$totalpage} 页".$this->TotalResult."条 ";
+ $maininfo = "{$totalpage}页".$this->TotalResult."篇 ";
$tnamerule = $this->GetMakeFileRule($this->Fields['id'], "list", $this->Fields['typedir'], $this->Fields['defaultname'], $this->Fields['namerule2']);
$tnamerule = preg_replace("/^(.*)\//", '', $tnamerule);
-
//获得上一页和主页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -805,7 +741,6 @@ class SgListView
} else {
$indexpage = "首页 \r\n";
}
-
//下一页,未页的链接
if ($this->PageNo != $totalpage && $totalpage > 1) {
$nextpage .= "下一页 \r\n";
@@ -813,7 +748,6 @@ class SgListView
} else {
$endpage = "末页 ";
}
-
//option链接
$optionlist = "";
/*
@@ -825,15 +759,12 @@ class SgListView
if($mjj==$this->PageNo)
{
$optionlist .= "$mjj \r\n";
- }
- else
- {
+ } else {
$optionlist .= "$mjj \r\n";
}
}
$optionlist .= "";
*/
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -880,7 +811,6 @@ class SgListView
}
return $plist;
}
-
/**
* 获取动态的分页列表
*
@@ -903,10 +833,10 @@ class SgListView
}
$totalpage = ceil($this->TotalResult / $this->PageSize);
if ($totalpage <= 1 && $this->TotalResult > 0) {
- return " 共1页/".$this->TotalResult."条记录 ";
+ return "1页".$this->TotalResult."篇 ";
}
if ($this->TotalResult == 0) {
- return "共0页/".$this->TotalResult."条记录 ";
+ return "0页".$this->TotalResult."篇 ";
}
$purl = $this->GetCurUrl();
$geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&nativeplace=$nativeplace&infotype=$infotype&keyword=".urlencode($keyword)."&";
@@ -916,7 +846,6 @@ class SgListView
$hidenform = " \r\n";
$hidenform .= " \r\n";
$purl .= "?".$geturl;
-
//获得上一页和下一页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -930,7 +859,6 @@ class SgListView
} else {
$endpage = "末页 ";
}
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -953,11 +881,9 @@ class SgListView
$listdd .= "".$j." \r\n";
}
}
-
$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage;
return $plist;
}
-
/**
* 获得当前的页面文件的url
*
diff --git a/src/include/arc.sgpage.class.php b/src/system/archive/sgpage.class.php
similarity index 89%
rename from src/include/arc.sgpage.class.php
rename to src/system/archive/sgpage.class.php
index 267561d7..c63c54f6 100755
--- a/src/include/arc.sgpage.class.php
+++ b/src/system/archive/sgpage.class.php
@@ -1,15 +1,15 @@
-dsql = $GLOBALS['dsql'];
$this->dtp = new DedeTagParse();
$this->dtp->refObj = $this;
$this->dtp->SetNameSpace("dede", "{", "}");
$this->Fields = $this->dsql->GetOne("SELECT * FROM `#@__sgpage` WHERE aid='$aid' ");
$envs['aid'] = $this->Fields['aid'];
-
//设置一些全局参数的值
foreach ($GLOBALS['PubFields'] as $k => $v) {
$this->Fields[$k] = $v;
@@ -57,13 +54,11 @@ class sgpage
$this->dtp->LoadTemplate($tplfile);
$this->ParseTemplet();
}
-
//php4构造函数
function sgpage($aid)
{
$this->__construct($aid);
}
-
/**
* 显示内容
*
@@ -74,7 +69,6 @@ class sgpage
{
$this->dtp->Display();
}
-
/**
* 获取内容
*
@@ -85,7 +79,6 @@ class sgpage
{
return $this->dtp->GetResult();
}
-
/**
* 保存结果为文件
*
@@ -98,7 +91,6 @@ class sgpage
$filename = preg_replace("/\/{1,}/", '/', $filename);
$this->dtp->SaveTo($filename);
}
-
/**
* 解析模板里的标签
*
@@ -110,7 +102,6 @@ class sgpage
$GLOBALS['envs']['likeid'] = $this->Fields['likeid'];
MakeOneTag($this->dtp, $this);
}
-
//关闭所占用的资源
function Close()
{
diff --git a/src/include/arc.specview.class.php b/src/system/archive/specview.class.php
similarity index 92%
rename from src/include/arc.specview.class.php
rename to src/system/archive/specview.class.php
index ca6089bb..335560f7 100755
--- a/src/include/arc.specview.class.php
+++ b/src/system/archive/specview.class.php
@@ -1,17 +1,16 @@
-TypeLink = new TypeLink(0);
$this->ChannelUnit = new ChannelUnit(-1);
$this->remoteDir = '';
-
//设置一些全局参数的值
foreach ($GLOBALS['PubFields'] as $k => $v) {
$this->Fields[$k] = $v;
@@ -88,18 +85,15 @@ class SpecView
}
$this->TotalPage = ceil($this->TotalResult / $this->PageSize);
}
-
//php4构造函数
function SpecView($starttime = 0)
{
$this->__construct($starttime);
}
-
//关闭相关资源
function Close()
{
}
-
/**
* 统计列表里的记录
*
@@ -131,7 +125,6 @@ class SpecView
}
}
}
-
/**
* 显示列表
*
@@ -180,7 +173,6 @@ class SpecView
}
$this->dtp->Display();
}
-
/**
* 开始创建列表
*
@@ -232,18 +224,16 @@ class SpecView
$this->dtp->Assign($tagid, $this->GetPageListST($list_len));
}
} //End foreach
-
$makeFile = $GLOBALS['cfg_special']."/spec_".$this->PageNo.$GLOBALS['art_shortname'];
$murl = $makeFile;
$makeFile = $GLOBALS['cfg_basedir'].$makeFile;
$this->dtp->SaveTo($makeFile);
- echo "成功创建:$murl ";
+ echo "成功创建:$murl ";
}
copy($GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/spec_1".$GLOBALS['art_shortname'], $GLOBALS['cfg_basedir'].$GLOBALS['cfg_special']."/index.html");
$murl = $GLOBALS['cfg_special']."/index.html";
return $murl;
}
-
/**
* 解析模板,对固定的标记进行初始给值
*
@@ -254,7 +244,6 @@ class SpecView
{
MakeOneTag($this->dtp, $this);
}
-
/**
* 获取内容列表
*
@@ -326,13 +315,11 @@ class SpecView
if ($innertext == "") {
$innertext = GetSysTemplets("spec_list.htm");
}
-
//按不同情况设定SQL条件
$orwhere = " arc.arcrank > -1 AND arc.channel = -1 ";
if ($this->StartTime > 0) {
$orwhere .= " AND arc.senddate>'".$this->StartTime."'";
}
-
//排序方式
$ordersql = '';
if ($orderby == 'senddate') {
@@ -344,8 +331,7 @@ class SpecView
} else {
$ordersql = " ORDER BY arc.sortrank desc";
}
- $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,arc.money,
- tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
+ $query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,arc.money,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
WHERE $orwhere $ordersql LIMIT $limitstart,$row ";
$this->dsql->SetQuery($query);
@@ -401,7 +387,6 @@ class SpecView
$row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl'];
$row['memberurl'] = $GLOBALS['cfg_memberurl'];
$row['templeturl'] = $GLOBALS['cfg_templeturl'];
-
//编译附加表里的数据
foreach ($this->ChannelUnit->ChannelFields as $k => $arr) {
if (isset($row[$k])) {
@@ -424,7 +409,6 @@ class SpecView
}
$artlist .= $this->dtp2->GetResult();
} //if hasRow
-
else {
$artlist .= "";
}
@@ -432,19 +416,16 @@ class SpecView
$artlist .= "\r\n";
}
} //Loop Col
-
if ($col > 1) {
$artlist .= " \r\n";
}
} //Loop Line
-
if ($col > 1) {
$artlist .= "
\r\n";
}
$this->dsql->FreeResult("al");
return $artlist;
}
-
/**
* 获取静态的分页列表
*
@@ -463,15 +444,13 @@ class SpecView
}
$totalpage = ceil($this->TotalResult / $this->PageSize);
if ($totalpage <= 1 && $this->TotalResult > 0) {
-
- return "共 1 页".$this->TotalResult." 条记录 ";
+ return "1页".$this->TotalResult."篇 ";
}
if ($this->TotalResult == 0) {
- return "共 0 页".$this->TotalResult." 条记录 ";
+ return "0页".$this->TotalResult."篇 ";
}
$purl = $this->GetCurUrl();
$tnamerule = "spec_";
-
//获得上一页和下一页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -485,7 +464,6 @@ class SpecView
} else {
$endpage = "末页 \r\n";
}
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -503,7 +481,7 @@ class SpecView
}
for ($j; $j <= $total_list; $j++) {
if ($j == $this->PageNo) {
- $listdd .= "$j \r\n";
+ $listdd .= "$j \r\n";
} else {
$listdd .= "".$j." \r\n";
}
@@ -511,7 +489,6 @@ class SpecView
$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage;
return $plist;
}
-
/**
* 获取动态的分页列表
*
@@ -531,18 +508,16 @@ class SpecView
}
$totalpage = ceil($this->TotalResult / $this->PageSize);
if ($totalpage <= 1 && $this->TotalResult > 0) {
- return "共1页/".$this->TotalResult."条记录 ";
+ return "1页".$this->TotalResult."篇 ";
}
if ($this->TotalResult == 0) {
- return "共0页/".$this->TotalResult."条记录 ";
+ return "0页".$this->TotalResult."篇 ";
}
-
$purl = $this->GetCurUrl();
$geturl = "typeid=".$this->TypeID."&TotalResult=".$this->TotalResult."&";
$hidenform = " \r\n";
$hidenform .= " \r\n";
$purl .= "?".$geturl;
-
//获得上一页和下一页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -556,7 +531,6 @@ class SpecView
} else {
$endpage = "末页 ";
}
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -574,16 +548,14 @@ class SpecView
}
for ($j; $j <= $total_list; $j++) {
if ($j == $this->PageNo) {
- $listdd .= "$j \r\n";
+ $listdd .= "$j \r\n";
} else {
$listdd .= "".$j." \r\n";
}
}
-
$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage;
return $plist;
}
-
/**
* 获得当前的页面文件的url
*
diff --git a/src/include/arc.taglist.class.php b/src/system/archive/taglist.class.php
similarity index 92%
rename from src/include/arc.taglist.class.php
rename to src/system/archive/taglist.class.php
index be3d7df1..f8ac08fd 100755
--- a/src/include/arc.taglist.class.php
+++ b/src/system/archive/taglist.class.php
@@ -1,17 +1,16 @@
-Fields['title'] = $keyword;
}
-
$this->TempletsFile = '';
-
//设置一些全局参数的值
foreach ($GLOBALS['PubFields'] as $k => $v) $this->Fields[$k] = $v;
-
//读取Tag信息
if ($this->Tag != '') {
$this->TagInfos = $this->dsql->GetOne("Select * From `#@__tagindex` where tag like '{$this->Tag}' ");
if (!is_array($this->TagInfos)) {
$fullsearch = $GLOBALS['cfg_phpurl']."/search.php?keyword=".$this->Tag."&searchtype=titlekeyword";
- $msg = "系统无此标签,可能已经移除 您还可以尝试通过搜索程序去搜索这个关键字:前往搜索>> ";
+ $msg = "系统无此标签,可能已经移除 您还可以尝试通过搜索程序去搜索这个关键词:前往搜索>> ";
ShowMsg($msg, "-1");
exit();
}
- // 确定是否存在tag_pinyin
+ //确定是否存在tag_pinyin
if (empty($this->TagInfos['tag_pinyin'])) {
$this->TagInfos['tag_pinyin'] = $this->TagPinyinExists($this->Tag) ? GetPinyin($this->Tag).$this->TagInfos['id'] : GetPinyin($this->Tag);
$this->dsql->ExecNoneQuery("UPDATE `#@__tagindex` SET tag_pinyin = '{$this->TagInfos['tag_pinyin']}' WHERE tag LIKE '{$this->Tag}'");
}
-
$this->Fields['title'] = empty($this->TagInfos['title']) ? $this->Fields['title'] : $this->TagInfos['title'];
$this->Fields['keywords'] = empty($this->TagInfos['keywords']) ? $this->Fields['keywords'] : $this->TagInfos['keywords'];
$this->Fields['description'] = empty($this->TagInfos['description']) ? $this->Fields['description'] : $this->TagInfos['description'];
}
-
//初始化模板
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style'].'/'.$this->Templet;
if (!file_exists($tempfile) || !is_file($tempfile)) {
@@ -98,27 +91,23 @@ class TagList
$this->dtp->LoadTemplate($tempfile);
$this->TempletsFile = preg_replace("#^".$GLOBALS['cfg_basedir']."#", '', $tempfile);
}
-
function TagPinyinExists($tag)
{
$tag_py = GetPinyin($tag);
$row = $this->dsql->GetOne("Select count(*) as dd From `#@__tagindex` where tag_pinyin like '{$tag_py}' ");
return $row['dd'] > 0;
}
-
//php4构造函数
function TagList($keyword, $templet)
{
$this->__construct($keyword, $templet);
}
-
//关闭相关资源
function Close()
{
- @$this->dsql->Close();
@$this->TypeLink->Close();
+ @$this->dsql->Close();
}
-
/**
* 统计列表里的记录
*
@@ -141,20 +130,16 @@ class TagList
$cquery = "SELECT COUNT(*) AS dd FROM `#@__taglist` WHERE tid = '{$this->TagInfos['id']}' AND arcrank >-1 ";
$row = $this->dsql->GetOne($cquery);
$this->TotalResult = $row['dd'];
-
//更新Tag信息
$ntime = time();
-
//更新浏览量和记录数
$upquery = "UPDATE `#@__tagindex` SET total='{$row['dd']}',count=count+1,weekcc=weekcc+1,monthcc=monthcc+1 WHERE tag LIKE '{$this->Tag}' ";
$this->dsql->ExecuteNoneQuery($upquery);
$oneday = 24 * 3600;
-
//周统计
if (ceil(($ntime - $this->TagInfos['weekup']) / $oneday) > 7) {
$this->dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET weekcc=0,weekup='{$ntime}' WHERE tag LIKE '{$this->Tag}' ");
}
-
//月统计
if (ceil(($ntime - $this->TagInfos['monthup']) / $oneday) > 30) {
$this->dsql->ExecuteNoneQuery("UPDATE `#@__tagindex` SET monthcc=0,monthup='{$ntime}' WHERE tag LIKE '{$this->Tag}' ");
@@ -175,7 +160,6 @@ class TagList
}
$this->TotalPage = ceil($this->TotalResult / $this->PageSize);
}
-
/**
* 显示列表
*
@@ -185,7 +169,6 @@ class TagList
function Display()
{
$makeDir = empty($this->Tag) ? $this->GetTruePath()."/a/tags/index.html" : $this->GetTruePath()."/a/tags/".GetPinyin($this->Tag)."/index.html";
-
if (file_exists($makeDir)) {
header('HTTP/1.1 301 Moved Permanently');
if (!empty($this->Tag)) {
@@ -195,7 +178,6 @@ class TagList
}
exit;
}
-
if ($this->Tag != '') {
$this->CountRecord();
}
@@ -203,10 +185,9 @@ class TagList
if ($this->Tag != '') {
$this->ParseDMFields($this->PageNo, 0);
}
- $this->Close();
$this->dtp->Display();
+ // $this->Close();
}
-
/**
* 解析模板,对固定的标记进行初始给值
*
@@ -217,7 +198,6 @@ class TagList
{
MakeOneTag($this->dtp, $this);
}
-
/**
* 解析模板,对内容里的变动进行赋值
*
@@ -264,7 +244,7 @@ class TagList
if ($list_len == "") {
$list_len = 3;
}
- // var_dump($ismake);
+ //var_dump($ismake);
if ($ismake == 0) {
$this->dtp->Assign($tagid, $this->GetPageListDM($list_len, $listitem));
} else {
@@ -273,7 +253,6 @@ class TagList
}
}
}
-
/**
* 获得一个单列的文档列表
*
@@ -332,10 +311,8 @@ class TagList
$idlists .= ($idlists == '' ? $row['aid'] : ','.$row['aid']);
}
if ($idlists == '') return '';
-
//按不同情况设定SQL条件
$orwhere = " se.id IN($idlists) ";
-
//排序方式
if ($orderby == "sortrank") {
$ordersql = " ORDER BY se.sortrank $orderWay";
@@ -344,7 +321,6 @@ class TagList
}
$query = "SELECT se.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
FROM `#@__archives` se LEFT JOIN `#@__arctype` tp ON se.typeid=tp.id WHERE $orwhere $ordersql ";
-
$this->dsql->SetQuery($query);
$this->dsql->Execute('al');
$row = $this->PageSize / $col;
@@ -359,7 +335,6 @@ class TagList
if ($row = $this->dsql->GetArray("al")) {
$GLOBALS['autoindex']++;
$ids[$row['id']] = $row['id'];
-
//处理一些特殊字段
$row['infos'] = cn_substr($row['description'], $infolen);
$row['id'] = $row['id'];
@@ -403,7 +378,7 @@ class TagList
$row['fulltitle'] = $row['title'];
$row['title'] = cn_substr($row['title'], $titlelen);
if ($row['color'] != '') {
- $row['title'] = "".$row['title']." ";
+ $row['title'] = "".$row['title']." ";
}
if (preg_match('/c/', $row['flag'])) {
$row['title'] = "".$row['title']." ";
@@ -428,19 +403,15 @@ class TagList
}
$artlist .= $this->dtp2->GetResult();
} //if hasRow
-
} //Loop Col
-
if ($col > 1) {
$i += $col - 1;
$artlist .= " \r\n";
}
} //Loop Line
-
$this->dsql->FreeResult('al');
return $artlist;
}
-
/**
* 获取动态的分页列表
*
@@ -460,15 +431,14 @@ class TagList
}
$totalpage = $this->TotalPage;
if ($totalpage <= 1 && $this->TotalResult > 0) {
- return "共1页/".$this->TotalResult."条 ";
+ return "1页".$this->TotalResult."篇 ";
}
if ($this->TotalResult == 0) {
- return "共0页/".$this->TotalResult."条 ";
+ return "0页".$this->TotalResult."篇 ";
}
- $maininfo = "共{$totalpage}页/".$this->TotalResult."条 \r\n";
+ $maininfo = "{$totalpage}页".$this->TotalResult."篇 \r\n";
$purl = $this->GetCurUrl();
$purl .= "?/".urlencode($this->Tag);
-
//获得上一页和下一页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -482,7 +452,6 @@ class TagList
} else {
$endpage = "末页 \r\n";
}
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -500,7 +469,7 @@ class TagList
}
for ($j; $j <= $total_list; $j++) {
if ($j == $this->PageNo) {
- $listdd .= "$j \r\n";
+ $listdd .= "$j \r\n";
} else {
$listdd .= "".$j." \r\n";
}
@@ -526,7 +495,6 @@ class TagList
}
return $plist;
}
-
function GetPageListST($list_len, $listitem = "info,index,end,pre,next,pageno")
{
$prepage = "";
@@ -538,17 +506,15 @@ class TagList
}
$totalpage = $this->TotalPage;
if ($totalpage <= 1 && $this->TotalResult > 0) {
- return "共1页/".$this->TotalResult."条 ";
+ return "1页".$this->TotalResult."篇 ";
}
if ($this->TotalResult == 0) {
- return "共0页/".$this->TotalResult."条 ";
+ return "0页".$this->TotalResult."篇 ";
}
- $maininfo = "共{$totalpage}页/".$this->TotalResult."条 \r\n";
- // $purl = $this->GetCurUrl();
+ $maininfo = "{$totalpage}页".$this->TotalResult."篇 \r\n";
+ //$purl = $this->GetCurUrl();
$purl = "/a/tags/".GetPinyin($this->Tag);
-
- // var_dump($purl);
-
+ //var_dump($purl);
//获得上一页和下一页的链接
if ($this->PageNo != 1) {
$prepage .= "上一页 \r\n";
@@ -562,7 +528,6 @@ class TagList
} else {
$endpage = "末页 \r\n";
}
-
//获得数字链接
$listdd = "";
$total_list = $list_len * 2 + 1;
@@ -580,7 +545,7 @@ class TagList
}
for ($j; $j <= $total_list; $j++) {
if ($j == $this->PageNo) {
- $listdd .= "$j \r\n";
+ $listdd .= "$j \r\n";
} else {
$listdd .= "".$j." \r\n";
}
@@ -606,29 +571,24 @@ class TagList
}
return $plist;
}
-
function GetTruePath()
{
$truepath = $GLOBALS["cfg_basedir"];
return $truepath;
}
-
- // 生成静态Tag
+ //生成静态Tag
function MakeHtml($startpage = 1, $makepagesize = 0)
{
global $cfg_dir_purview, $envs;
-
$envs['makeTag'] = 1;
if (empty($this->TotalResult) && $this->Tag != "") $this->CountRecord();
//初步给固定值的标记赋值
$this->ParseTempletsFirst();
-
if ($this->Tag == "") {
MkdirAll($this->GetTruePath()."/a/tags/", $cfg_dir_purview);
$this->dtp->SaveTo($this->GetTruePath()."/a/tags/index.html");
} else {
$totalpage = ceil($this->TotalResult / $this->PageSize);
-
if ($totalpage == 0) {
$totalpage = 1;
}
@@ -643,7 +603,6 @@ class TagList
if ($endpage == 1) {
$endpage = 2;
}
-
$makeDir = $this->GetTruePath()."/a/tags/".$this->TagInfos['tag_pinyin']."/";
MkdirAll($makeDir, $cfg_dir_purview);
for ($this->PageNo = $startpage; $this->PageNo < $endpage; $this->PageNo++) {
@@ -658,7 +617,6 @@ class TagList
}
}
}
-
/**
* 获得一个指定的频道的链接
*
@@ -676,7 +634,6 @@ class TagList
{
return GetTypeUrl($typeid, MfTypedir($typedir), $isdefault, $defaultname, $ispart, $namerule2, $siteurl);
}
-
/**
* 获得一个指定档案的链接
*
@@ -697,7 +654,6 @@ class TagList
{
return GetFileUrl($aid, $typeid, $timetag, $title, $ismake, $rank, $namerule, $artdir, $money, $filename);
}
-
/**
* 获得当前的页面文件的url
*
diff --git a/src/system/archives.func.php b/src/system/archives.func.php
new file mode 100755
index 00000000..a41e98dc
--- /dev/null
+++ b/src/system/archives.func.php
@@ -0,0 +1,6 @@
+';
echo $classname.'类找不到';
echo '';
exit ();
- }
- else
- {
+ } else {
header ( "location:/404.html" );
die ();
}
}
-}
+}
\ No newline at end of file
diff --git a/src/include/autoload7.inc.php b/src/system/autoload7.inc.php
similarity index 80%
rename from src/include/autoload7.inc.php
rename to src/system/autoload7.inc.php
index 2a3f1e4d..187484bb 100755
--- a/src/include/autoload7.inc.php
+++ b/src/system/autoload7.inc.php
@@ -1,5 +1,5 @@
';
echo $classname.'类找不到';
echo '';
exit ();
- }
- else
- {
+ } else {
header ( "location:/404.html" );
die ();
}
}
}
-spl_autoload_register('dede_autoloader');
+spl_autoload_register('dede_autoloader');
\ No newline at end of file
diff --git a/src/include/channelunit.class.php b/src/system/channelunit.class.php
similarity index 95%
rename from src/include/channelunit.class.php
rename to src/system/channelunit.class.php
index 41a89ff8..039e170a 100755
--- a/src/include/channelunit.class.php
+++ b/src/system/channelunit.class.php
@@ -1,4 +1,5 @@
-Clear();
}
-
function ChannelUnit($cid, $aid = 0)
{
$this->__construct($cid, $aid);
}
-
/**
* 设置档案ID
*
@@ -87,7 +84,6 @@ class ChannelUnit
{
$this->ArcID = $aid;
}
-
/**
* 处理某个字段的值
*
@@ -104,7 +100,6 @@ class ChannelUnit
if ($fvalue == '') {
if ($ftype != 'checkbox') $fvalue = $this->ChannelFields[$fname]['default'];
}
-
if ($ftype == 'text') {
$fvalue = HtmlReplace($fvalue);
} else if ($ftype == 'textdata') {
@@ -129,7 +124,6 @@ class ChannelUnit
}
return $fvalue;
}
-
/**
* 获取缩略图链接
*
@@ -146,7 +140,6 @@ class ChannelUnit
if (empty($GLOBALS["stNowPage"])) $NowPage = 1;
else $NowPage = intval($GLOBALS["stNowPage"]);
}
-
$revalue = "";
$dtp = new DedeTagParse();
$dtp->LoadSource($fvalue);
@@ -176,7 +169,6 @@ class ChannelUnit
$photoid = 1;
$images = array();
$TotalPhoto = sizeof($dtp->CTags);
-
foreach ($dtp->CTags as $ctag) {
if ($ctag->GetName() == "img") {
$iw = $ctag->GetAtt('width');
@@ -204,7 +196,6 @@ class ChannelUnit
unset($images);
return $revalue;
}
-
//关闭所占用的资源
function Close()
{
diff --git a/src/include/channelunit.func.php b/src/system/channelunit.func.php
similarity index 89%
rename from src/include/channelunit.func.php
rename to src/system/channelunit.func.php
index 66a333d1..073b264b 100755
--- a/src/include/channelunit.func.php
+++ b/src/system/channelunit.func.php
@@ -1,4 +1,5 @@
-
\ No newline at end of file
diff --git a/src/include/code/datalist.utf-8.inc b/src/system/code/datalist.utf-8.inc
similarity index 77%
rename from src/include/code/datalist.utf-8.inc
rename to src/system/code/datalist.utf-8.inc
index 6d109ee2..68475e23 100755
--- a/src/include/code/datalist.utf-8.inc
+++ b/src/system/code/datalist.utf-8.inc
@@ -3,7 +3,7 @@ $lang_pre_page = '上页';
$lang_next_page = '下页';
$lang_index_page = '首页';
$lang_end_page = '末页';
-$lang_record_number = '条记录';
+$lang_record_number = '篇';
$lang_page = '页';
$lang_total = '共';
?>
\ No newline at end of file
diff --git a/src/system/common.func.php b/src/system/common.func.php
new file mode 100755
index 00000000..661c5d9f
--- /dev/null
+++ b/src/system/common.func.php
@@ -0,0 +1,400 @@
+=')) {
+ if (!function_exists('mysql_connect') and function_exists('mysqli_connect')) {
+ function mysql_connect($server, $username, $password)
+ {
+ return mysqli_connect($server, $username, $password);
+ }
+ }
+ if (!function_exists('mysql_query') and function_exists('mysqli_query')) {
+ function mysql_query($query, $link)
+ {
+ return mysqli_query($link, $query);
+ }
+ }
+ if (!function_exists('mysql_select_db') and function_exists('mysqli_select_db')) {
+ function mysql_select_db($database_name, $link)
+ {
+ return mysqli_select_db($link, $database_name);
+ }
+ }
+ if (!function_exists('mysql_fetch_array') and function_exists('mysqli_fetch_array')) {
+ function mysql_fetch_array($result)
+ {
+ return mysqli_fetch_array($result);
+ }
+ }
+ if (!function_exists('mysql_close') and function_exists('mysqli_close')) {
+ function mysql_close($link)
+ {
+ return mysqli_close($link);
+ }
+ }
+ if (!function_exists('split')) {
+ function split($pattern, $string)
+ {
+ return explode($pattern, $string);
+ }
+ }
+}
+// 一个支持在PHP Cli Server打印的方法
+function var_dump_cli($val){
+ ob_start();
+ var_dump($val);
+ error_log(ob_get_clean(), 4);
+}
+function get_mime_type($filename)
+{
+ if (! function_exists('finfo_open'))
+ {
+ return 'unknow/octet-stream';
+ }
+
+ $finfo = finfo_open(FILEINFO_MIME_TYPE);
+ $mimeType = finfo_file($finfo, $filename);
+ finfo_close($finfo);
+ return $mimeType;
+}
+function is_all_numeric(array $array){
+ foreach($array as $item){
+ if(!is_numeric($item)) return false;
+ }
+ return true;
+}
+function make_hash()
+{
+ $rand = dede_random_bytes(16);
+ $_SESSION['token'] = ($rand === FALSE)
+ ? md5(uniqid(mt_rand(), TRUE))
+ : bin2hex($rand);
+ return $_SESSION['token'];
+}
+function dede_random_bytes($length)
+{
+ if (empty($length) or !ctype_digit((string) $length)) {
+ return FALSE;
+ }
+ if (function_exists('openssl_random_pseudo_bytes')) {
+ return openssl_random_pseudo_bytes($length);
+ }
+ if (function_exists('random_bytes')) {
+ try {
+ return random_bytes((int) $length);
+ } catch (Exception $e) {
+ return FALSE;
+ }
+ }
+ if (defined('MCRYPT_DEV_URANDOM') && ($output = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM)) !== FALSE) {
+ return $output;
+ }
+ if (is_readable('/dev/urandom') && ($fp = fopen('/dev/urandom', 'rb')) !== FALSE) {
+ version_compare(PHP_VERSION, '5.4.0', '>=') && stream_set_chunk_size($fp, $length);
+ $output = fread($fp, $length);
+ fclose($fp);
+ if ($output !== FALSE) {
+ return $output;
+ }
+ }
+ return FALSE;
+}
+/**
+ * 载入小助手,系统默认载入小助手
+ * 在/data/helper.inc.php中进行默认小助手初始化的设置
+ * 使用示例:
+ * 在开发中,首先需要创建一个小助手函数,目录在\include\helpers中
+ * 例如,我们创建一个示例为test.helper.php,文件基本内容如下:
+ *
+ * if ( ! function_exists('HelloDede'))
+ * {
+ * function HelloDede()
+ * {
+ * echo "Hello! Dede";
+ * }
+ * }
+ *
+ * 则我们在开发中使用这个小助手的时候直接使用函数helper('test');初始化它
+ * 然后在文件中就可以直接使用:HelloDede();来进行调用.
+ *
+ * @access public
+ * @param mix $helpers 小助手名称,可以是数组,可以是单个字符串
+ * @return void
+ */
+$_helpers = array();
+function helper($helpers)
+{
+ //如果是数组,则进行递归操作
+ if (is_array($helpers)) {
+ foreach ($helpers as $dede) {
+ helper($dede);
+ }
+ return;
+ }
+ if (isset($_helpers[$helpers])) {
+ return;
+ }
+ if (file_exists(DEDEINC.'/helpers/'.$helpers.'.helper.php')) {
+ include_once(DEDEINC.'/helpers/'.$helpers.'.helper.php');
+ $_helpers[$helpers] = TRUE;
+ }
+ //无法载入小助手
+ if (!isset($_helpers[$helpers])) {
+ exit('Unable to load the requested file: helpers/'.$helpers.'.helper.php');
+ }
+}
+function dede_htmlspecialchars($str)
+{
+ global $cfg_soft_lang;
+ if (version_compare(PHP_VERSION, '5.4.0', '<')) return htmlspecialchars($str);
+ if ($cfg_soft_lang == 'gb2312') return htmlspecialchars($str, ENT_COMPAT, 'ISO-8859-1');
+ else return htmlspecialchars($str);
+}
+/**
+ * 载入小助手,这里用户可能载入用helps载入多个小助手
+ *
+ * @access public
+ * @param string
+ * @return string
+ */
+function helpers($helpers)
+{
+ helper($helpers);
+}
+//兼容php4的file_put_contents
+if (!function_exists('file_put_contents')) {
+ function file_put_contents($n, $d)
+ {
+ $f = @fopen($n, "w");
+ if (!$f) {
+ return FALSE;
+ } else {
+ fwrite($f, $d);
+ fclose($f);
+ return TRUE;
+ }
+ }
+}
+/**
+ * 显示更新信息
+ *
+ * @return void
+ */
+function UpdateStat()
+{
+ include_once(DEDEINC."/inc/inc_stat.php");
+ return SpUpdateStat();
+}
+$arrs1 = array();
+$arrs2 = array();
+/**
+ * 短消息函数,可以在某个动作处理后友好的提示信息
+ *
+ * @param string $msg 消息提示信息
+ * @param string $gourl 跳转地址
+ * @param int $onlymsg 仅显示信息
+ * @param int $limittime 限制时间
+ * @return void
+ */
+function ShowMsg($msg, $gourl, $onlymsg = 0, $limittime = 0)
+{
+ global $cfg_soft_lang, $cfg_cmsurl;
+ if(empty($GLOBALS['cfg_plus_dir'])) $GLOBALS['cfg_plus_dir'] = '..';
+ $htmlhead = "提示信息 ";
+ $htmlhead .= "".(isset($GLOBALS['ucsynlogin']) ? $GLOBALS['ucsynlogin'] : '')." ";
+ $litime = ($limittime == 0 ? 1000 : $limittime);
+ $func = '';
+ if ($gourl == '-1') {
+ if ($limittime == 0) $litime = 5000;
+ $gourl = "javascript:history.go(-1);";
+ }
+ if ($gourl == '' || $onlymsg == 1) {
+ $msg = "";
+ } else {
+ //当网址为:close::objname 时, 关闭父框架的id=objname元素
+ if (preg_match('/close::/', $gourl)) {
+ $tgobj = trim(preg_replace('/close::/', '', $gourl));
+ $gourl = 'javascript:;';
+ $func .= "window.parent.document.getElementById('{$tgobj}').style.display='none';\r\n";
+ }
+ $func .= "var pgo=0;function JumpUrl(){if (pgo==0){location='$gourl'; pgo=1;}}";
+ $rmsg = $func;
+ $rmsg .= "document.write(\"\");";
+ $rmsg .= "document.write(\"";
+ $rmsg .= "
\");";
+ $rmsg .= "document.write(\"
\");";
+ $rmsg .= "document.write(\"".str_replace("\"","“",$msg)."\");";
+ $rmsg .= "document.write(\"";
+ if($onlymsg==0)
+ {
+ if( $gourl != 'javascript:;' && $gourl != '')
+ {
+ $rmsg .= "
\");";
+ $rmsg .= "setTimeout('JumpUrl()',$litime);";
+ } else {
+ $rmsg .= "
\");";
+ }
+ } else {
+ $rmsg .= "
\");";
+ }
+ $msg = $htmlhead.$rmsg.$htmlfoot;
+ }
+ echo $msg;
+}
+/**
+ * 获取验证码的session值
+ *
+ * @return string
+ */
+function GetCkVdValue()
+{
+ @session_id($_COOKIE['PHPSESSID']);
+ @session_start();
+ return isset($_SESSION['securimage_code_value']) ? $_SESSION['securimage_code_value'] : '';
+}
+/**
+ * PHP某些版本有Bug,不能在同一作用域中同时读session并改注销它,因此调用后需执行本函数
+ *
+ * @return void
+ */
+function ResetVdValue()
+{
+ @session_start();
+ $_SESSION['securimage_code_value'] = '';
+}
+function IndexSub($idx, $num)
+{
+ return intval($idx) - intval($num) == 0 ? '0 ' : intval($idx) - intval($num);
+}
+//用来返回index的active
+function IndexActive($idx)
+{
+ if ($idx == 1) {
+ return ' active';
+ } else {
+ return '';
+ }
+}
+//自定义函数接口
+//这里主要兼容早期的用户扩展,v5.7之后我们建议使用小助手helper进行扩展
+if (file_exists(DEDEINC.'/extend.func.php')) {
+ require_once(DEDEINC.'/extend.func.php');
+}
+/**
+ * 添加多选联动筛选
+ *
+ * @return string
+ */
+function litimgurls($imgid=0)
+{
+ global $lit_imglist,$dsql;
+ $row = $dsql->GetOne("SELECT c.addtable FROM `#@__archives` AS a LEFT JOIN `#@__channeltype` AS c ON a.channel=c.id where a.id='$imgid'");
+ $addtable = trim($row['addtable']);
+ $row = $dsql->GetOne("Select imgurls From `$addtable` where aid='$imgid'");
+ $ChannelUnit = new ChannelUnit(2,$imgid);
+ $lit_imglist = $ChannelUnit->GetlitImgLinks($row['imgurls']);
+ return $lit_imglist;
+}
+//字符过滤函数,用于安全
+function string_filter($str,$stype="inject") {
+ if ($stype=="inject") {
+ $str = str_replace (
+ array ("select", "insert", "update", "delete", "alter", "cas", "union", "into", "load_file", "outfile", "create", "join", "where", "like", "drop", "modify", "rename", "'", "/*", "*", "../", "./"),
+ array ("","","","","","","","","","","","","","","","","","","","","",""),
+ $str);
+ } else if ($stype=="xss") {
+ $farr = array ("/\s+/" , "/<(\/?)(script|META|STYLE|HTML|HEAD|BODY|STYLE |i?frame|b|strong|style|html|img|P|o:p|iframe|u|em|strike|BR|div|a|TABLE|TBODY|object|tr|td|st1:chsdate|FONT|span|MARQUEE|body|title|\r\n|link|meta|\?|\%)([^>]*?)>/isU", "/(<[^>]*)on[a-zA-Z]+\s*=([^>]*>)/isU",);
+ $tarr = array (" ","","\\1\\2",);
+ $str = preg_replace ($farr, $tarr, $str);
+ $str = str_replace (
+ array( "<", ">", "'", "\"", ";", "/*", "*", "../", "./"),
+ array("<",">","","","","","","",""),
+ $str);
+ }
+ return $str;
+}
+//载入自定义表单,用于发布
+function AddFilter($channelid, $type=1, $fieldsnamef=array(), $defaulttid=0, $loadtype='autofield')
+{
+ global $tid,$dsql,$id;
+ $tid = $defaulttid ? $defaulttid : $tid;
+ if ($id!="")
+ {
+ $tidsq = $dsql->GetOne("SELECT typeid FROM `#@__archives` WHERE id='$id' ");
+ $tid = $tidsq["typeid"];
+ }
+ $nofilter = (isset($_REQUEST['TotalResult']) ? "&TotalResult=".$_REQUEST['TotalResult'] : '').(isset($_REQUEST['PageNo']) ? "&PageNo=".$_REQUEST['PageNo'] : '');
+ $filterarr = string_filter(stripos($_SERVER['REQUEST_URI'], "list.php?tid=") ? str_replace($nofilter, '', $_SERVER['REQUEST_URI']) : $GLOBALS['cfg_cmsurl']."/apps/list.php?tid=".$tid);
+ $cInfos = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$channelid' ");
+ $fieldset=stripslashes($cInfos['fieldset']);
+ $dtp = new DedeTagParse();
+ $dtp->SetNameSpace('field','<','>');
+ $dtp->LoadSource($fieldset);
+ $dede_addonfields = '';
+ if(is_array($dtp->CTags))
+ {
+ foreach($dtp->CTags as $tida=>$ctag)
+ {
+ $fieldsname = $fieldsnamef ? explode(",", $fieldsnamef) : explode(",", $ctag->GetName());
+ if(($loadtype!='autofield' || ($loadtype=='autofield' && $ctag->GetAtt('autofield')==1)) && in_array($ctag->GetName(), $fieldsname) )
+ {
+ $href1 = explode($ctag->GetName().'=', $filterarr);
+ $href2 = explode('&', $href1[1]);
+ $fields_value = $href2[0];
+ $fields_value1 = explode('|', $fields_value);
+ $dede_addonfields .= ''.$ctag->GetAtt('itemname').': ';
+ switch ($type) {
+ case 1:
+ $dede_addonfields .= (preg_match("/&".$ctag->GetName()."=/is",$filterarr,$regm) ? 'GetName()."=".$fields_value,"",$filterarr).'" style="display:inline-block;padding:.25rem .5rem;line-height:1.5;color:#fff;background:#008e38;border-color:#008e38;border-radius:.2rem">全部 ' : '全部 ').' ';
+ $addonfields_items = explode(",",$ctag->GetAtt('default'));
+ for ($i=0; $iGetName().'=') ? str_replace("=".$fields_value,"=".$fields_value."|".urlencode($addonfields_items[$i]),$filterarr) : $filterarr.'&'.$ctag->GetName().'='.urlencode($addonfields_items[$i]);
+ $is_select = in_array(urlencode($addonfields_items[$i]), $fields_value1) ? 1 : 0;
+ $fields_value2 = "";
+ for ($j=0; $jGetName()."=".$fields_value,$ctag->GetName()."=".$fields_value, "&".$ctag->GetName()."=&"), array("&".$ctag->GetName()."=".$fields_value2,$ctag->GetName()."=".$fields_value2, "&"), $filterarr);
+ $href3 = !end(explode("=", $href3)) ? str_replace("&".end(explode("&", $href3)), "", $href3) : $href3;
+
+ $dede_addonfields .= ($fields_value!=urlencode($addonfields_items[$i]) && $is_select!=1 ? ''.$addonfields_items[$i].' ' : ''.$addonfields_items[$i].'× ')." ";
+ }
+ $dede_addonfields .= ' ';
+ break;
+ case 2:
+ $dede_addonfields .= (preg_match("/&".$ctag->GetName()."=/is",$filterarr,$regm) ? 'GetName()."=".$fields_value,"",$filterarr).'">全部 ' : '全部 ').' ';
+ $addonfields_items = explode(",",$ctag->GetAtt('default'));
+ for ($i=0; $iGetName().'=') ? str_replace("=".$fields_value,"=".$fields_value."|".urlencode($addonfields_items[$i]),$filterarr) : $filterarr.'&'.$ctag->GetName().'='.urlencode($addonfields_items[$i]);
+ $is_select = in_array(urlencode($addonfields_items[$i]), $fields_value1) ? 1 : 0;
+ $fields_value2 = "";
+ for ($j=0; $jGetName()."=".$fields_value,$ctag->GetName()."=".$fields_value, "&".$ctag->GetName()."=&"), array("&".$ctag->GetName()."=".$fields_value2,$ctag->GetName()."=".$fields_value2, "&"), $filterarr);
+ $href3 = !end(explode("=", $href3)) ? str_replace("&".end(explode("&", $href3)), "", $href3) : $href3;
+
+ $dede_addonfields .= ($fields_value!=urlencode($addonfields_items[$i]) && $is_select!=1 ? ' '.$addonfields_items[$i].' ' : ' '.$addonfields_items[$i].' ')." ";
+ }
+ $dede_addonfields .= ' ';
+ break;
+ }
+ }
+ }
+ }
+ echo $dede_addonfields;
+}
\ No newline at end of file
diff --git a/src/include/common.inc.php b/src/system/common.inc.php
similarity index 90%
rename from src/include/common.inc.php
rename to src/system/common.inc.php
index c0ab53bf..d468240e 100755
--- a/src/include/common.inc.php
+++ b/src/system/common.inc.php
@@ -15,10 +15,10 @@ if (DEDE_ENVIRONMENT == 'production') {
}
define('DEBUG_LEVEL', FALSE);//如果设置为TRUE则会打印执行SQL的时间和标签加载时间方便调试
define('DEDEINC', str_replace("\\", '/', dirname(__FILE__)));
-define('DEDEROOT', str_replace("\\", '/', substr(DEDEINC, 0, -8)));
-define('DEDEDATA', DEDEROOT.'/data');
-define('DEDEMEMBER', DEDEROOT.'/member');
-define('DEDETEMPLATE', DEDEROOT.'/templets');
+define('DEDEROOT', str_replace("\\", '/', substr(DEDEINC, 0, -6))); // 站点根目录
+define('DEDEDATA', substr(DEDEINC, 0, -6).'data');
+define('DEDEMEMBER', DEDEROOT.'/user');
+define('DEDETEMPLATE', DEDEROOT.'/theme');
define('DEDEBIZURL', "https://www.dedebiz.com");//Dede商业支持
define('DEDEVER', 6);//当前系统大版本
define('DEDEPUB', '-----BEGIN PUBLIC KEY-----
@@ -53,9 +53,6 @@ if (version_compare(PHP_VERSION, '5.4.0', '>=')) {
}
}
}
-if (version_compare(PHP_VERSION, '8.0.0', '>=')) {
- mysqli_report(MYSQLI_REPORT_OFF);
-}
//是否启用mb_substr替换cn_substr来提高效率
$cfg_is_mb = $cfg_is_iconv = FALSE;
if (function_exists('mb_substr')) $cfg_is_mb = TRUE;
@@ -155,20 +152,20 @@ if (PHP_SAPI === 'cli') {
$cfg_clihost = 'http://'.$_SERVER['HTTP_HOST'];
}
//站点根目录
-$cfg_basedir = preg_replace('#'.$cfg_cmspath.'\/include$#i', '', DEDEINC);
+$cfg_basedir = preg_replace('#'.$cfg_cmspath.'\/system$#i', '', DEDEINC);
if ($cfg_multi_site == 'Y') {
$cfg_mainsite = $cfg_basehost;
} else {
$cfg_mainsite = '';
}
//模板的存放目录
-$cfg_templets_dir = $cfg_cmspath.'/templets';
+$cfg_templets_dir = $cfg_cmspath.'/theme';
$cfg_templeturl = $cfg_mainsite.$cfg_templets_dir;
-$cfg_templets_skin = empty($cfg_df_style) ? $cfg_mainsite.$cfg_templets_dir."/default" : $cfg_mainsite.$cfg_templets_dir."/$cfg_df_style";
+$cfg_templets_skin = empty($cfg_df_style) ? $cfg_mainsite.$cfg_templets_dir."/templets" : $cfg_mainsite.$cfg_templets_dir."/$cfg_df_style";
//cms安装目录的网址
$cfg_cmsurl = $cfg_mainsite.$cfg_cmspath;
//插件目录,这个目录是用于存放计数器、投票、评论等程序的必要动态程序
-$cfg_plus_dir = $cfg_cmspath.'/plus';
+$cfg_plus_dir = $cfg_cmspath.'/apps';
$cfg_phpurl = $cfg_mainsite.$cfg_plus_dir;
$cfg_static_dir = $cfg_cmspath.'/static';
$cfg_staticurl = $cfg_mainsite.$cfg_static_dir;
@@ -177,10 +174,10 @@ $cfg_mobileurl = $cfg_mainsite.$cfg_mobile_dir;
$cfg_data_dir = $cfg_cmspath.'/data';
$cfg_dataurl = $cfg_mainsite.$cfg_data_dir;
//会员目录
-$cfg_member_dir = $cfg_cmspath.'/member';
+$cfg_member_dir = $cfg_cmspath.'/user';
$cfg_memberurl = $cfg_mainsite.$cfg_member_dir;
//专题列表的存放路径
-$cfg_special = $cfg_cmspath.'/special';
+$cfg_special = $cfg_cmspath.'/apps/special';
$cfg_specialurl = $cfg_mainsite.$cfg_special;
//附件目录
$cfg_medias_dir = $cfg_cmspath.$cfg_medias_dir;
@@ -197,7 +194,7 @@ $cfg_soft_dir = $cfg_medias_dir.'/soft';
$cfg_other_medias = $cfg_medias_dir.'/media';
//软件摘要信息,****请不要删除本项**** 否则系统无法正确接收系统漏洞或升级信息
$cfg_version = 'V6';
-$cfg_version_detail = '6.0.4'; //详细版本号
+$cfg_version_detail = '6.1.0'; //详细版本号
$cfg_soft_lang = 'utf-8';
$cfg_soft_public = 'base';
$cfg_softname = '织梦内容管理系统';
@@ -226,7 +223,7 @@ if ($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_usermail)) {
$cfg_adminemail = $cfg_smtp_usermail;
}
//DedeBIZ商业化组件
-require_once(DEDEINC.'/dedebiz.class.php');
+require_once(DEDEINC.'/libraries/dedebiz.class.php');
//对全局分页传递参数进行过滤
if (isset($GLOBALS['PageNo'])) {
$GLOBALS['PageNo'] = intval($GLOBALS['PageNo']);
@@ -260,10 +257,19 @@ $cfg_biz_helpUrl = DEDEBIZURL."/help";
$cfg_biz_gitUrl = DEDEBIZURL."/git";
$cfg_biz_dedebizUrl = DEDEBIZURL;
//引入数据库类
+if (!defined('MYSQL_BOTH')) {
+ define('MYSQL_BOTH', MYSQLI_BOTH);
+}
+if (!defined('MYSQL_ASSOC')) {
+ define('MYSQL_ASSOC', MYSQLI_ASSOC);
+}
+if (!defined('MYSQL_NUM')) {
+ define('MYSQL_NUM', MYSQLI_NUM);
+}
if ($GLOBALS['cfg_dbtype'] == 'mysql' || $GLOBALS['cfg_dbtype'] == 'mysqli') {
- require_once(DEDEINC.'/dedesqli.class.php');
+ require_once(DEDEINC.'/database/dedesqli.class.php');
} else {
- require_once(DEDEINC.'/dedesqlite.class.php');
+ require_once(DEDEINC.'/database/dedesqlite.class.php');
}
//全局常用函数
require_once(DEDEINC.'/common.func.php');
diff --git a/src/include/customfields.func.php b/src/system/customfields.func.php
similarity index 81%
rename from src/include/customfields.func.php
rename to src/system/customfields.func.php
index 2dbdd38c..0caadb88 100755
--- a/src/include/customfields.func.php
+++ b/src/system/customfields.func.php
@@ -1,4 +1,5 @@
-GetAtt("default"));
@@ -47,11 +46,11 @@ function GetFormItem($ctag, $admintype = 'admin')
$myformItem .= " \r\n";
$myformItem .= " \r\n";
if ($hasSetEnumJs != 'hasset') {
- $myformItem .= ''."\r\n";
+ $myformItem .= ''."\r\n";
$GLOBALS['hasSetEnumJs'] = 'hasset';
}
- $myformItem .= "\r\n";
- $myformItem .= ''."\r\n";
+ $myformItem .= "\r\n";
+ $myformItem .= ''."\r\n";
$formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem);
$formitem = str_replace('~form~', $myformItem, $formitem);
return $formitem;
@@ -86,47 +85,46 @@ function GetFormItem($ctag, $admintype = 'admin')
$dfvalue = str_replace('{{', '<', $dfvalue);
$dfvalue = str_replace('}}', '>', $dfvalue);
if ($admintype == 'admin') {
- $innertext = GetEditor($fieldname, $dfvalue, 350, 'Basic', 'string');
+ $innertext = GetEditor($fieldname, $dfvalue, 360, 'Basic', 'string');
} else if ($admintype == 'diy') {
- $innertext = GetEditor($fieldname, $dfvalue, 350, 'Diy', 'string');
+ $innertext = GetEditor($fieldname, $dfvalue, 360, 'Diy', 'string');
} else {
- $innertext = GetEditor($fieldname, $dfvalue, 350, 'Member', 'string');
+ $innertext = GetEditor($fieldname, $dfvalue, 360, 'Member', 'string');
}
} else if ($fieldType == "multitext") {
- $innertext = " \r\n";
+ $innertext = " \r\n";
} else if ($fieldType == "datetime") {
$nowtime = GetDateTimeMk(time());
- $innertext = " ";
+ $innertext = " ";
} else if ($fieldType == 'img' || $fieldType == 'imgfile') {
if ($admintype == 'diy') {
- $innertext = " \r\n";
+ $innertext = " \r\n";
} else {
- $innertext = " \r\n";
+ $innertext = " \r\n";
}
} else if ($fieldType == 'media') {
if ($admintype == 'diy') {
$innertext = " 不支持的类型\r\n";
} else {
- $innertext = " \r\n";
+ $innertext = " \r\n";
}
} else if ($fieldType == 'addon') {
if ($admintype == 'diy') {
- $innertext = " \r\n";
+ $innertext = " \r\n";
} else {
- $innertext = " \r\n";
+ $innertext = " \r\n";
}
} else if ($fieldType == 'int' || $fieldType == 'float') {
$dfvalue = ($ctag->GetAtt('default') != '' ? $ctag->GetAtt('default') : '0');
- $innertext = " (填写数值)\r\n";
+ $innertext = " (填写数值)\r\n";
} else if ($fieldType == 'relation') {
$dfvalue = ($ctag->GetAtt('default') != '' ? $ctag->GetAtt('default') : '');
$channel = ($ctag->GetAtt('channel') == "") ? "1" : $ctag->GetAtt('channel');
- $innertext = "$dfvalue
- 选择关联内容 \r\n";
+ $innertext = "$dfvalue
+ 选择关联内容 \r\n";
if ($ctag->GetAtt('automake') == 1) {
$innertext .= " ";
}
-
$innertext .= <<
if(typeof SelectArcList === "undefined") {
@@ -140,14 +138,13 @@ if(typeof SelectArcList === "undefined") {
EOT;
} else {
$dfvalue = ($ctag->GetAtt('default') != '' ? $ctag->GetAtt('default') : '');
- $innertext = "
+ $innertext = "
\r\n";
}
$formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem);
$formitem = str_replace("~form~", $innertext, $formitem);
return $formitem;
}
-
/**
* 处理不同类型的数据
*
@@ -217,7 +214,6 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '', $a
}
$ipath = $ipath.'/'.$tpath;
$filename = "{$ipath}/{$aid}-".cn_substr(md5($cfg_cookie_encode), 0, 16).".txt";
-
//会员投稿内容安全处理
if ($admintype == 'member' || $admintype == 'diy') {
$dvalue = HtmlReplace($dvalue, -1);
@@ -283,7 +279,6 @@ function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '', $a
return $dvalue;
}
}
-
/**
* 获得带值的表单(编辑时用)
*
@@ -309,7 +304,7 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '')
$items = explode(',', $ctag->GetAtt('default'));
}
if ($ftype == 'select') {
- $myformItem = "";
+ $myformItem = "";
if (is_array($items)) {
foreach ($items as $v) {
$v = trim($v);
@@ -330,11 +325,11 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '')
$myformItem .= " \r\n";
$myformItem .= " \r\n";
if ($hasSetEnumJs != 'hasset') {
- $myformItem .= ''."\r\n";
+ $myformItem .= ''."\r\n";
$GLOBALS['hasSetEnumJs'] = 'hasset';
}
- $myformItem .= "\r\n";
- $myformItem .= "\r\n";
+ $myformItem .= "\r\n";
+ $myformItem .= "\r\n";
$formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem);
$formitem = str_replace('~form~', $myformItem, $formitem);
return $formitem;
@@ -348,7 +343,6 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '')
}
$innertext = $myformItem;
}
-
//checkbox
else if ($ftype == 'checkbox') {
$myformItem = '';
@@ -368,7 +362,6 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '')
}
$innertext = $myformItem;
}
-
//文本数据的特殊处理
else if ($ftype == "textdata") {
if (is_file($cfg_basedir.$fvalue)) {
@@ -382,23 +375,23 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '')
$okfvalue = '';
}
if ($admintype == 'admin') {
- $myformItem = GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string')."\r\n \r\n ";
+ $myformItem = GetEditor($fieldname, $okfvalue, 360, 'Basic', 'string')."\r\n \r\n ";
} else {
- $myformItem = GetEditor($fieldname, $okfvalue, 350, 'Member', 'string')."\r\n \r\n ";
+ $myformItem = GetEditor($fieldname, $okfvalue, 360, 'Member', 'string')."\r\n \r\n ";
}
$innertext = $myformItem;
} else if ($ftype == "htmltext") {
if ($admintype == 'admin') {
- $myformItem = GetEditor($fieldname, $fvalue, 350, 'Basic', 'string')."\r\n ";
+ $myformItem = GetEditor($fieldname, $fvalue, 360, 'Basic', 'string')."\r\n ";
} else {
- $myformItem = GetEditor($fieldname, $fvalue, 350, 'Member', 'string')."\r\n ";
+ $myformItem = GetEditor($fieldname, $fvalue, 360, 'Member', 'string')."\r\n ";
}
$innertext = $myformItem;
} else if ($ftype == "multitext") {
- $innertext = "$fvalue \r\n";
+ $innertext = "$fvalue \r\n";
} else if ($ftype == "datetime") {
$nowtime = GetDateTimeMk($fvalue);
- $innertext = " ";
+ $innertext = " ";
} else if ($ftype == "img") {
$ndtp = new DedeTagParse();
$ndtp->LoadSource($fvalue);
@@ -409,19 +402,19 @@ function GetFormItemValue($ctag, $fvalue, $admintype = 'admin', $fieldname = '')
$ntag = $ndtp->GetTag("img");
$fvalue = trim($ntag->GetInnerText());
}
- $innertext = " \r\n";
+ $innertext = " \r\n";
} else if ($ftype == "imgfile") {
- $innertext = " \r\n";
+ $innertext = " \r\n";
} else if ($ftype == "media") {
- $innertext = " \r\n";
+ $innertext = " \r\n";
} else if ($ftype == "addon") {
- $innertext = " \r\n";
+ $innertext = " \r\n";
} else if ($ftype == "int" || $ftype == "float") {
- $innertext = " (填写数值)\r\n";
+ $innertext = " (填写数值)\r\n";
} else if ($ftype == "relation") {
$channel = ($ctag->GetAtt('channel') == "") ? "1" : $ctag->GetAtt('channel');
- $innertext = "$fvalue
- 选择关联内容 \r\n";
+ $innertext = "$fvalue
+ 选择关联内容 \r\n";
if ($ctag->GetAtt('automake') == 1) {
$innertext .= " ";
}
@@ -437,9 +430,9 @@ if(typeof SelectArcList === "undefined") {
EOT;
} else {
- $innertext = " \r\n";
+ $innertext = " \r\n";
}
$formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem);
$formitem = str_replace('~form~', $innertext, $formitem);
return $formitem;
-}
+}
\ No newline at end of file
diff --git a/src/include/data/big5-gb.dat b/src/system/data/big5-gb.dat
similarity index 100%
rename from src/include/data/big5-gb.dat
rename to src/system/data/big5-gb.dat
diff --git a/src/include/data/fonts/1.ttf b/src/system/data/fonts/1.ttf
similarity index 100%
rename from src/include/data/fonts/1.ttf
rename to src/system/data/fonts/1.ttf
diff --git a/src/include/data/fonts/2.ttf b/src/system/data/fonts/2.ttf
similarity index 100%
rename from src/include/data/fonts/2.ttf
rename to src/system/data/fonts/2.ttf
diff --git a/src/include/data/fonts/3.ttf b/src/system/data/fonts/3.ttf
similarity index 100%
rename from src/include/data/fonts/3.ttf
rename to src/system/data/fonts/3.ttf
diff --git a/src/include/data/fonts/4.ttf b/src/system/data/fonts/4.ttf
similarity index 100%
rename from src/include/data/fonts/4.ttf
rename to src/system/data/fonts/4.ttf
diff --git a/src/include/data/fonts/5.ttf b/src/system/data/fonts/5.ttf
similarity index 100%
rename from src/include/data/fonts/5.ttf
rename to src/system/data/fonts/5.ttf
diff --git a/src/include/data/fonts/6.ttf b/src/system/data/fonts/6.ttf
similarity index 100%
rename from src/include/data/fonts/6.ttf
rename to src/system/data/fonts/6.ttf
diff --git a/src/include/data/gb-big5.dat b/src/system/data/gb-big5.dat
similarity index 100%
rename from src/include/data/gb-big5.dat
rename to src/system/data/gb-big5.dat
diff --git a/src/include/data/gb2312-utf8.dat b/src/system/data/gb2312-utf8.dat
similarity index 100%
rename from src/include/data/gb2312-utf8.dat
rename to src/system/data/gb2312-utf8.dat
diff --git a/src/include/data/gbk-unicode.dat b/src/system/data/gbk-unicode.dat
similarity index 100%
rename from src/include/data/gbk-unicode.dat
rename to src/system/data/gbk-unicode.dat
diff --git a/src/include/data/pinyin-utf8.dat b/src/system/data/pinyin-utf8.dat
similarity index 100%
rename from src/include/data/pinyin-utf8.dat
rename to src/system/data/pinyin-utf8.dat
diff --git a/src/include/data/pinyin.dat b/src/system/data/pinyin.dat
similarity index 100%
rename from src/include/data/pinyin.dat
rename to src/system/data/pinyin.dat
diff --git a/src/include/data/vdcode.jpg b/src/system/data/vdcode.jpg
similarity index 100%
rename from src/include/data/vdcode.jpg
rename to src/system/data/vdcode.jpg
diff --git a/src/include/data/words/words.txt b/src/system/data/words/words.txt
similarity index 100%
rename from src/include/data/words/words.txt
rename to src/system/data/words/words.txt
diff --git a/src/include/dedesqli.class.php b/src/system/database/dedesqli.class.php
similarity index 89%
rename from src/include/dedesqli.class.php
rename to src/system/database/dedesqli.class.php
index a3dc4557..6d40039f 100755
--- a/src/include/dedesqli.class.php
+++ b/src/system/database/dedesqli.class.php
@@ -1,4 +1,5 @@
-isClose = FALSE;
$this->safeCheck = TRUE;
$this->pconnect = $pconnect;
+ $this->dbHost = $GLOBALS['cfg_dbhost'];
+ $this->dbUser = $GLOBALS['cfg_dbuser'];
+ $this->dbPwd = $GLOBALS['cfg_dbpwd'];
+ $this->dbName = $GLOBALS['cfg_dbname'];
+ $this->dbPrefix = $GLOBALS['cfg_dbprefix'];
if ($nconnect) {
$this->Init($pconnect);
}
}
-
function DedeSql($pconnect = FALSE, $nconnect = TRUE)
{
$this->__construct($pconnect, $nconnect);
}
-
function Init($pconnect = FALSE)
{
$this->linkID = 0;
//$this->queryString = '';
//$this->parameters = Array();
- $this->dbHost = $GLOBALS['cfg_dbhost'];
- $this->dbUser = $GLOBALS['cfg_dbuser'];
- $this->dbPwd = $GLOBALS['cfg_dbpwd'];
- $this->dbName = $GLOBALS['cfg_dbname'];
- $this->dbPrefix = $GLOBALS['cfg_dbprefix'];
+
$this->result["me"] = 0;
$this->Open($pconnect);
}
-
//用指定参数初始数据库信息
function SetSource($host, $username, $pwd, $dbname, $dbprefix = "dede_")
{
@@ -100,13 +91,11 @@ class DedeSqli
{
mysqli_select_db($this->linkID, $dbname);
}
-
//设置SQL里的参数
function SetParameter($key, $value)
{
$this->parameters[$key] = $value;
}
-
//连接数据库
function Open($pconnect = FALSE)
{
@@ -118,19 +107,15 @@ class DedeSqli
$i = 0;
@list($dbhost, $dbport) = explode(':', $this->dbHost);
!$dbport && $dbport = 3306;
-
$this->linkID = mysqli_init();
mysqli_real_connect($this->linkID, $dbhost, $this->dbUser, $this->dbPwd, false, $dbport);
- mysqli_errno($this->linkID) != 0 && $this->DisplayError('DedeBIZ错误警告: 链接('.$this->pconnect.') 到MySQL发生错误');
-
-
+ mysqli_errno($this->linkID) != 0 && $this->DisplayError('系统提示:链接('.$this->pconnect.') 到MySQL发生错误');
//复制一个对象副本
CopySQLiPoint($this);
}
-
//处理错误,成功连接则选择数据库
if (!$this->linkID) {
- $this->DisplayError("DedeBIZ错误警告:连接数据库失败,可能数据库密码不对或数据库服务器出错 ");
+ $this->DisplayError("系统提示:连接数据库失败,可能数据库密码不对或数据库服务器出错 ");
exit();
}
$this->isInit = TRUE;
@@ -146,7 +131,6 @@ class DedeSqli
}
return TRUE;
}
-
//为了防止采集等需要较长运行时间的程序超时,在运行这类程序时设置系统等待和交互时间
function SetLongLink()
{
@@ -154,14 +138,12 @@ class DedeSqli
@mysqli_query($this->linkID, "SET interactive_timeout=3600, wait_timeout=3600 ;");
}
}
-
//获得错误描述
function GetError()
{
$str = mysqli_error($this->linkID);
return $str;
}
-
//关闭数据库
//mysql能自动管理非持久连接的连接池
//实际上关闭并无意义并且容易出错,所以取消这函数
@@ -174,27 +156,27 @@ class DedeSqli
$GLOBALS['dsql'] = NULL;
}
}
-
//定期清理死连接
function ClearErrLink()
{
}
-
//关闭指定的数据库连接
function CloseLink($dblink)
{
@mysqli_close($dblink);
}
-
function Esc($_str)
{
+ global $dsqli;
+ if (!$dsqli->isInit) {
+ $this->Init($this->pconnect);
+ }
if (version_compare(phpversion(), '4.3.0', '>=')) {
return @mysqli_real_escape_string($this->linkID, $_str);
} else {
return @mysqli_escape_string($this->linkID, $_str);
}
}
-
//执行一个不返回结果的SQL语句,如update,delete,insert等
function ExecuteNoneQuery($sql = '')
{
@@ -218,10 +200,8 @@ class DedeSqli
}
//SQL语句安全检查
if ($this->safeCheck) CheckSql($this->queryString, 'update');
-
$t1 = ExecTime();
$rs = mysqli_query($this->linkID, $this->queryString);
-
//查询性能测试
if ($this->recordLog) {
$queryTime = ExecTime() - $t1;
@@ -235,11 +215,8 @@ class DedeSqli
echo "执行SQL:".$this->queryString.",执行时间:{$queryTime}
\r\n";
}
}
-
return $rs;
}
-
-
//执行一个返回影响记录条数的SQL语句,如update,delete,insert等
function ExecuteNoneQuery2($sql = '')
{
@@ -251,7 +228,6 @@ class DedeSqli
$this->Open(FALSE);
$dsqli->isClose = FALSE;
}
-
if (!empty($sql)) {
$this->SetQuery($sql);
}
@@ -262,7 +238,6 @@ class DedeSqli
}
$t1 = ExecTime();
mysqli_query($this->linkID, $this->queryString);
-
//查询性能测试
if ($this->recordLog) {
$queryTime = ExecTime() - $t1;
@@ -277,25 +252,20 @@ class DedeSqli
echo "执行SQL:".$this->queryString.",执行时间:{$queryTime}
\r\n";
}
}
-
return mysqli_affected_rows($this->linkID);
}
-
function ExecNoneQuery($sql = '')
{
return $this->ExecuteNoneQuery($sql);
}
-
function GetFetchRow($id = 'me')
{
return @mysqli_fetch_row($this->result[$id]);
}
-
function GetAffectedRows()
{
return mysqli_affected_rows($this->linkID);
}
-
//执行一个带返回结果的SQL语句,如SELECT,SHOW等
function Execute($id = "me", $sql = '')
{
@@ -314,12 +284,10 @@ class DedeSqli
if ($this->safeCheck) {
CheckSql($this->queryString);
}
-
$t1 = ExecTime();
//var_dump($this->queryString);
$this->result[$id] = mysqli_query($this->linkID, $this->queryString);
//var_dump(mysql_error());
-
//查询性能测试
if ($this->recordLog) {
$queryTime = ExecTime() - $t1;
@@ -334,31 +302,27 @@ class DedeSqli
echo "执行SQL:".$this->queryString.",执行时间:{$queryTime}
\r\n";
}
}
-
if ($this->result[$id] === FALSE) {
- $this->DisplayError(mysqli_error($this->linkID)." Error sql: ".$this->queryString." ");
+ $this->DisplayError(mysqli_error($this->linkID)." Error sql: ".$this->queryString." ");
}
}
-
function Query($id = "me", $sql = '')
{
$this->Execute($id, $sql);
}
-
//执行一个SQL语句,返回前一条记录或仅返回一条记录
function GetOne($sql = '', $acctype = MYSQLI_ASSOC)
{
global $dsqli;
- // $t1 = ExecTime();
+ //$t1 = ExecTime();
if (!$dsqli->isInit) {
$this->Init($this->pconnect);
}
- // echo ExecTime() - $t1;
+ //echo ExecTime() - $t1;
if ($dsqli->isClose) {
$this->Open(FALSE);
$dsqli->isClose = FALSE;
}
-
if (!empty($sql)) {
if (!preg_match("/LIMIT/i", $sql)) $this->SetQuery(preg_replace("/[,;]$/i", '', trim($sql))." LIMIT 0,1;");
else $this->SetQuery($sql);
@@ -372,7 +336,6 @@ class DedeSqli
return ($arr);
}
}
-
//执行一个不与任何表名有关的SQL语句,Create等
function ExecuteSafeQuery($sql, $id = "me")
{
@@ -386,19 +349,17 @@ class DedeSqli
}
$this->result[$id] = @mysqli_query($sql, $this->linkID);
}
-
//返回当前的一条记录并把游标移向下一记录
- // MYSQLI_ASSOC、MYSQLI_NUM、MYSQLI_BOTH
+ //MYSQLI_ASSOC、MYSQLI_NUM、MYSQLI_BOTH
function GetArray($id = "me", $acctype = MYSQLI_ASSOC)
{
- // var_dump($this->result);
+ //var_dump($this->result);
if ($this->result[$id] === 0) {
return FALSE;
} else {
return @mysqli_fetch_array($this->result[$id], $acctype);
}
}
-
function GetObject($id = "me")
{
if ($this->result[$id] === 0) {
@@ -407,8 +368,7 @@ class DedeSqli
return mysqli_fetch_object($this->result[$id]);
}
}
-
- // 检测是否存在某数据表
+ //检测是否存在某数据表
function IsTable($tbname)
{
global $dsqli;
@@ -422,7 +382,6 @@ class DedeSqli
}
return FALSE;
}
-
//获得MySql的版本号
function GetVersion($isformat = TRUE)
{
@@ -444,7 +403,6 @@ class DedeSqli
}
return $mysql_version;
}
-
//获取特定表的信息
function GetTableFields($tbname, $id = "me")
{
@@ -457,13 +415,11 @@ class DedeSqli
$query = "SELECT * FROM {$tbname} LIMIT 0,1";
$this->result[$id] = mysqli_query($this->linkID, $query);
}
-
//获取字段详细信息
function GetFieldObject($id = "me")
{
return mysqli_fetch_field($this->result[$id]);
}
-
//获得查询的总记录数
function GetTotalRow($id = "me")
{
@@ -473,18 +429,16 @@ class DedeSqli
return @mysqli_num_rows($this->result[$id]);
}
}
-
//获取上一步INSERT操作产生的ID
function GetLastID()
{
- //如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值将不正确。
- //可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代。
+ //如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值将不正确
+ //可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代
//$rs = mysqli_query($this->linkID, "Select LAST_INSERT_ID() as lid");
//$row = mysqli_fetch_array($rs);
//return $row["lid"];
return mysqli_insert_id($this->linkID);
}
-
//释放记录集占用的资源
function FreeResult($id = "me")
{
@@ -495,13 +449,12 @@ class DedeSqli
if (!is_array($this->result)) {
return '';
}
- foreach ($this->result as $kk => $vv) {
+ foreach ($this->result as $vv) {
if ($vv) {
@mysqli_free_result($vv);
}
}
}
-
//设置SQL语句,会自动把SQL语句里的#@__替换为$this->dbPrefix(在配置文件中为$cfg_dbprefix)
function SetQuery($sql)
{
@@ -509,12 +462,10 @@ class DedeSqli
$sql = str_replace($prefix, $GLOBALS['cfg_dbprefix'], $sql);
$this->queryString = $sql;
}
-
function SetSql($sql)
{
$this->SetQuery($sql);
}
-
function RecordLog($runtime = 0)
{
$RecordLogFile = dirname(__FILE__).'/../data/mysqli_record_log.inc';
@@ -530,33 +481,30 @@ EOT;
@fwrite($fp, $savemsg);
@fclose($fp);
}
-
//显示数据链接错误信息
function DisplayError($msg)
{
- $errorTrackFile = dirname(__FILE__).'/../data/mysqli_error_trace.inc';
- if (file_exists(dirname(__FILE__).'/../data/mysqli_error_trace.php')) {
- @unlink(dirname(__FILE__).'/../data/mysqli_error_trace.php');
+ $errorTrackFile = dirname(__FILE__).'/../../data/mysqli_error_trace.inc';
+ if (file_exists(dirname(__FILE__).'/../../data/mysqli_error_trace.php')) {
+ @unlink(dirname(__FILE__).'/../../data/mysqli_error_trace.php');
}
if ($this->showError) {
$emsg = '';
$emsg .= "DedeBIZ Error Warning! \r\n";
$emsg .= "
";
$emsg .= "
\r\n";
- $emsg .= "
Error page: ".$this->GetCurUrl()."
\r\n";
+ $emsg .= "
Error page: ".$this->GetCurUrl()."
\r\n";
$emsg .= "
Error infos: {$msg}
\r\n";
- $emsg .= "
\r\n";
+ $emsg .= " \r\n";
echo $emsg;
}
-
$savemsg = 'Page: '.$this->GetCurUrl()."\r\nError: ".$msg."\r\nTime".date('Y-m-d H:i:s');
//保存MySql错误日志
$fp = @fopen($errorTrackFile, 'a');
@fwrite($fp, '<'.'?php exit();'."\r\n/*\r\n{$savemsg}\r\n*/\r\n?".">\r\n");
@fclose($fp);
}
-
//获得当前的脚本网址
function GetCurUrl()
{
@@ -574,13 +522,11 @@ EOT;
return $nowurl;
}
}
-
//复制一个对象副本
function CopySQLiPoint(&$ndsql)
{
$GLOBALS['dsqli'] = $ndsql;
}
-
//SQL语句过滤程序,由80sec提供,这里作了适当的修改
if (!function_exists('CheckSql')) {
function CheckSql($db_string, $querytype = 'select')
@@ -593,18 +539,15 @@ if (!function_exists('CheckSql')) {
$log_file = DEDEINC.'/../data/'.md5($cfg_cookie_encode).'_safe.txt';
$userIP = GetIP();
$getUrl = GetCurUrl();
-
//如果是普通查询语句,直接过滤一些特殊语法
if ($querytype == 'select') {
$notallow1 = "[^0-9a-z@\._-]{1,}(union|sleep|benchmark|load_file|outfile)[^0-9a-z@\.-]{1,}";
-
//$notallow2 = "--|/\*";
if (preg_match("/".$notallow1."/i", $db_string)) {
fputs(fopen($log_file, 'a+'), "$userIP||$getUrl||$db_string||SelectBreak\r\n");
- exit("Safe Alert: Request Error step 1 ! ");
+ exit("Safe Alert: Request Error step 1 ! ");
}
}
-
//完整的SQL检查
while (TRUE) {
$pos = strpos($db_string, '\'', $pos + 1);
@@ -628,7 +571,6 @@ if (!function_exists('CheckSql')) {
}
$clean .= substr($db_string, $old_pos);
$clean = trim(strtolower(preg_replace(array('~\s+~s'), array(' '), $clean)));
-
if (
strpos($clean, '@') !== FALSE or strpos($clean, 'char(') !== FALSE or strpos($clean, '"') !== FALSE
or strpos($clean, '$s$$s$') !== FALSE
@@ -637,19 +579,16 @@ if (!function_exists('CheckSql')) {
if (preg_match("#^create table#i", $clean)) $fail = FALSE;
$error = "unusual character";
}
-
//老版本的Mysql并不支持union,常用的程序里也不使用union,但是一些黑客使用它,所以检查它
if (strpos($clean, 'union') !== FALSE && preg_match('~(^|[^a-z])union($|[^[a-z])~s', $clean) != 0) {
$fail = TRUE;
$error = "union detect";
}
-
//发布版本的程序可能比较少包括--,#这样的注释,但是黑客经常使用它们
elseif (strpos($clean, '/*') > 2 || strpos($clean, '--') !== FALSE || strpos($clean, '#') !== FALSE) {
$fail = TRUE;
$error = "comment detect";
}
-
//这些函数不会被使用,但是黑客会用它来操作文件,down掉数据库
elseif (strpos($clean, 'sleep') !== FALSE && preg_match('~(^|[^a-z])sleep($|[^[a-z])~s', $clean) != 0) {
$fail = TRUE;
@@ -664,7 +603,6 @@ if (!function_exists('CheckSql')) {
$fail = TRUE;
$error = "file fun detect";
}
-
//老版本的MYSQL不支持子查询,我们的程序里可能也用得少,但是黑客可以使用它来查询数据库敏感信息
elseif (preg_match('~\([^)]*?select~s', $clean) != 0) {
$fail = TRUE;
@@ -672,9 +610,9 @@ if (!function_exists('CheckSql')) {
}
if (!empty($fail)) {
fputs(fopen($log_file, 'a+'), "$userIP||$getUrl||$db_string||$error\r\n");
- exit("Safe Alert: Request Error step 2! ");
+ exit("Safe Alert: Request Error step 2! ");
} else {
return $db_string;
}
}
-}
+}
\ No newline at end of file
diff --git a/src/include/dedesqlite.class.php b/src/system/database/dedesqlite.class.php
similarity index 84%
rename from src/include/dedesqlite.class.php
rename to src/system/database/dedesqlite.class.php
index 643727b0..c6b76df6 100755
--- a/src/include/dedesqlite.class.php
+++ b/src/system/database/dedesqlite.class.php
@@ -1,4 +1,5 @@
-=')) {
+ mysqli_report(MYSQLI_REPORT_OFF);
+}
class DedeSqlite
{
var $linkID;
@@ -46,11 +50,10 @@ class DedeSqlite
var $isClose;
var $safeCheck;
var $showError = false;
- var $recordLog = false; // 记录日志到data/mysqli_record_log.inc便于进行调试
+ var $recordLog = false; //记录日志到data/mysqli_record_log.inc便于进行调试
var $isInit = false;
var $pconnect = false;
var $_fixObject;
-
//用外部定义的变量初始类,并连接数据库
function __construct($pconnect = FALSE, $nconnect = FALSE)
{
@@ -61,12 +64,10 @@ class DedeSqlite
$this->Init($pconnect);
}
}
-
function DedeSql($pconnect = FALSE, $nconnect = TRUE)
{
$this->__construct($pconnect, $nconnect);
}
-
function Init($pconnect = FALSE)
{
$this->linkID = 0;
@@ -80,7 +81,6 @@ class DedeSqlite
$this->result["me"] = 0;
$this->Open($pconnect);
}
-
//用指定参数初始数据库信息
function SetSource($host, $username, $pwd, $dbname, $dbprefix = "dede_")
{
@@ -91,13 +91,11 @@ class DedeSqlite
$this->dbPrefix = $dbprefix;
$this->result["me"] = 0;
}
-
//设置SQL里的参数
function SetParameter($key, $value)
{
$this->parameters[$key] = $value;
}
-
//连接数据库
function Open($pconnect = FALSE)
{
@@ -106,35 +104,28 @@ class DedeSqlite
if ($dsqlite && !$dsqlite->isClose && $dsqlite->isInit) {
$this->linkID = $dsqlite->linkID;
} else {
-
- $this->linkID = new SQLite3(DEDEDATA . '/' . $this->dbName . '.db');
-
+ $this->linkID = new SQLite3(DEDEDATA.'/'.$this->dbName.'.db');
//复制一个对象副本
CopySQLiPoint($this);
}
-
//处理错误,成功连接则选择数据库
if (!$this->linkID) {
- $this->DisplayError("DedeBIZ错误警告:连接数据库失败,可能数据库密码不对或数据库服务器出错 ");
+ $this->DisplayError("系统提示:连接数据库失败,可能数据库密码不对或数据库服务器出错 ");
exit();
}
$this->isInit = TRUE;
return TRUE;
}
-
//为了防止采集等需要较长运行时间的程序超时,在运行这类程序时设置系统等待和交互时间
function SetLongLink()
{
// @mysqli_query("SET interactive_timeout=3600, wait_timeout=3600 ;", $this->linkID);
}
-
//获得错误描述
function GetError()
{
- $str = $dsqlite->lastErrorMsg();
- return $str;
+ return $this->linkID->lastErrorMsg();
}
-
//关闭数据库
//mysql能自动管理非持久连接的连接池
//实际上关闭并无意义并且容易出错,所以取消这函数
@@ -147,22 +138,22 @@ class DedeSqlite
$GLOBALS['dsql'] = NULL;
}
}
-
//定期清理死连接
function ClearErrLink()
{
}
-
//关闭指定的数据库连接
function CloseLink($dblink)
{
}
-
function Esc($_str)
{
- return addslashes($_str);
+ global $dsqlite;
+ if (!$dsqlite->isInit) {
+ $this->Init($this->pconnect);
+ }
+ return $this->linkID->escapeString($_str);
}
-
//执行一个不返回结果的SQL语句,如update,delete,insert等
function ExecuteNoneQuery($sql = '')
{
@@ -181,17 +172,13 @@ class DedeSqlite
}
if (is_array($this->parameters)) {
foreach ($this->parameters as $key => $value) {
- $this->queryString = str_replace("@" . $key, "'$value'", $this->queryString);
+ $this->queryString = str_replace("@".$key, "'$value'", $this->queryString);
}
}
//SQL语句安全检查
if ($this->safeCheck) CheckSql($this->queryString, 'update');
-
$t1 = ExecTime();
-
$rs = $this->linkID->exec($this->queryString);
-
-
//查询性能测试
if ($this->recordLog) {
$queryTime = ExecTime() - $t1;
@@ -200,8 +187,6 @@ class DedeSqlite
}
return $rs;
}
-
-
//执行一个返回影响记录条数的SQL语句,如update,delete,insert等
function ExecuteNoneQuery2($sql = '')
{
@@ -213,43 +198,36 @@ class DedeSqlite
$this->Open(FALSE);
$dsqlite->isClose = FALSE;
}
-
if (!empty($sql)) {
$this->SetQuery($sql);
}
if (is_array($this->parameters)) {
foreach ($this->parameters as $key => $value) {
- $this->queryString = str_replace("@" . $key, "'$value'", $this->queryString);
+ $this->queryString = str_replace("@".$key, "'$value'", $this->queryString);
}
}
$t1 = ExecTime();
$this->linkID->exec($this->queryString);
-
//查询性能测试
if ($this->recordLog) {
$queryTime = ExecTime() - $t1;
$this->RecordLog($queryTime);
//echo $this->queryString."--{$queryTime} \r\n";
}
-
return $this->linkID->changes();
}
-
function ExecNoneQuery($sql = '')
{
return $this->ExecuteNoneQuery($sql);
}
-
function GetFetchRow($id = 'me')
{
return $this->result[$id]->numColumns();
}
-
function GetAffectedRows()
{
return $this->linkID->changes();
}
-
//执行一个带返回结果的SQL语句,如SELECT,SHOW等
function Execute($id = "me", $sql = '')
{
@@ -268,31 +246,24 @@ class DedeSqlite
if ($this->safeCheck) {
CheckSql($this->queryString);
}
-
$t1 = ExecTime();
//var_dump($this->queryString);
-
$this->result[$id] = $this->linkID->query($this->queryString);
-
//var_dump(mysql_error());
-
//查询性能测试
if ($this->recordLog) {
$queryTime = ExecTime() - $t1;
$this->RecordLog($queryTime);
//echo $this->queryString."--{$queryTime} \r\n";
}
-
if ($this->result[$id] === FALSE) {
- $this->DisplayError($this->linkID->lastErrorMsg() . " Error sql: " . $this->queryString . " ");
+ $this->DisplayError($this->linkID->lastErrorMsg()." Error sql: ".$this->queryString." ");
}
}
-
function Query($id = "me", $sql = '')
{
$this->Execute($id, $sql);
}
-
//执行一个SQL语句,返回前一条记录或仅返回一条记录
function GetOne($sql = '', $acctype = SQLITE3_ASSOC)
{
@@ -305,7 +276,7 @@ class DedeSqlite
$dsqlite->isClose = FALSE;
}
if (!empty($sql)) {
- if (!preg_match("/LIMIT/i", $sql)) $this->SetQuery(preg_replace("/[,;]$/i", '', trim($sql)) . " LIMIT 0,1;");
+ if (!preg_match("/LIMIT/i", $sql)) $this->SetQuery(preg_replace("/[,;]$/i", '', trim($sql))." LIMIT 0,1;");
else $this->SetQuery($sql);
}
$this->Execute("one");
@@ -317,7 +288,6 @@ class DedeSqlite
return ($arr);
}
}
-
//执行一个不与任何表名有关的SQL语句,Create等
function ExecuteSafeQuery($sql, $id = "me")
{
@@ -331,9 +301,8 @@ class DedeSqlite
}
$this->result[$id] = $this->linkID->query($sql);
}
-
//返回当前的一条记录并把游标移向下一记录
- // SQLITE3_ASSOC、SQLITE3_NUM、SQLITE3_BOTH
+ //SQLITE3_ASSOC、SQLITE3_NUM、SQLITE3_BOTH
function GetArray($id = "me", $acctype = SQLITE3_ASSOC)
{
switch ($acctype) {
@@ -347,38 +316,29 @@ class DedeSqlite
$acctype = SQLITE3_BOTH;
break;
}
-
if ($this->result[$id] === 0) {
return FALSE;
} else {
- if ($this->result[$id]) {
- $rs = $this->result[$id]->fetchArray($acctype);
- if (!$rs) {
- $this->result[$id] = 0;
- return false;
- }
- return $rs;
- } else {
+ $rs = $this->result[$id]->fetchArray($acctype);
+ if (!$rs) {
+ $this->result[$id] = 0;
return false;
}
+ return $rs;
}
}
-
function GetObject($id = "me")
{
if (!isset($this->_fixObject[$id])) {
$this->_fixObject[$id] = array();
- if ($this->result[$id]) {
- while ($row = $this->result[$id]->fetchArray(SQLITE3_ASSOC)) {
- $this->_fixObject[$id][] = (object)$row;
- }
- $this->result[$id]->reset();
+ while ($row = $this->result[$id]->fetchArray(SQLITE3_ASSOC)) {
+ $this->_fixObject[$id][] = (object)$row;
}
+ $this->result[$id]->reset();
}
return array_shift($this->_fixObject[$id]);
}
-
- // 检测是否存在某数据表
+ //检测是否存在某数据表
function IsTable($tbname)
{
global $dsqlite;
@@ -387,15 +347,12 @@ class DedeSqlite
}
$prefix = "#@__";
$tbname = str_replace($prefix, $GLOBALS['cfg_dbprefix'], $tbname);
-
$row = $this->linkID->querySingle("PRAGMA table_info({$tbname});");
-
if ($row !== null) {
return TRUE;
}
return FALSE;
}
-
//获得MySql的版本号
function GetVersion($isformat = TRUE)
{
@@ -411,11 +368,10 @@ class DedeSqlite
$sqlite_version = $rs;
if ($isformat) {
$sqlite_versions = explode(".", trim($sqlite_version));
- $sqlite_version = number_format($sqlite_versions[0] . "." . $sqlite_versions[1], 2);
+ $sqlite_version = number_format($sqlite_versions[0].".".$sqlite_versions[1], 2);
}
return $sqlite_version;
}
-
//获取特定表的信息
function GetTableFields($tbname, $id = "me")
{
@@ -428,7 +384,6 @@ class DedeSqlite
$query = "SELECT * FROM {$tbname} LIMIT 0,1";
$this->result[$id] = $this->linkID->query($query);
}
-
//获取字段详细信息
function GetFieldObject($id = "me")
{
@@ -439,10 +394,8 @@ class DedeSqlite
$fields[] = $this->result[$id]->columnName($i);
}
}
-
return (object)$fields;
}
-
//获得查询的总记录数
function GetTotalRow($id = "me")
{
@@ -451,18 +404,16 @@ class DedeSqlite
$row = $rs->fetchArray();
return $row['dd'];
}
-
//获取上一步INSERT操作产生的ID
function GetLastID()
{
- //如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值将不正确。
- //可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代。
+ //如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值将不正确
+ //可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代
//$rs = mysqli_query($this->linkID, "Select LAST_INSERT_ID() as lid");
//$row = mysqli_fetch_array($rs);
//return $row["lid"];
return $this->linkID->lastInsertRowID();
}
-
//释放记录集占用的资源
function FreeResult($id = "me")
{
@@ -481,7 +432,6 @@ class DedeSqlite
}
}
}
-
//设置SQL语句,会自动把SQL语句里的#@__替换为$this->dbPrefix(在配置文件中为$cfg_dbprefix)
function SetQuery($sql)
{
@@ -493,7 +443,6 @@ class DedeSqlite
$this->queryString = preg_replace("/CONCAT\(([^\)]*?)\)/i", str_replace(",", "||", $matches[1]), $this->queryString);
$this->queryString = str_replace("'||'", "','", $this->queryString);
}
-
$this->queryString = preg_replace("/FIND_IN_SET\('([\w]+)', arc.flag\)>0/i", "(',' || arc.flag || ',') LIKE '%,\\1,%'", $this->queryString);
$this->queryString = preg_replace("/FIND_IN_SET\('([\w]+)', arc.flag\)<1/i", "(',' || arc.flag || ',') NOT LIKE '%,\\1,%'", $this->queryString);
if (preg_match("/CREATE TABLE/i", $this->queryString)) {
@@ -501,7 +450,6 @@ class DedeSqlite
$this->queryString = preg_replace('/character set (.*?) /i', '', $this->queryString);
$this->queryString = preg_replace('/unsigned/i', '', $this->queryString);
$this->queryString = str_replace('TYPE=MyISAM', '', $this->queryString);
-
$this->queryString = preg_replace('/TINYINT\(([\d]+)\)/i', 'INTEGER', $this->queryString);
$this->queryString = preg_replace('/mediumint\(([\d]+)\)/i', 'INTEGER', $this->queryString);
$this->queryString = preg_replace('/smallint\(([\d]+)\)/i', 'INTEGER', $this->queryString);
@@ -525,15 +473,13 @@ class DedeSqlite
$this->queryString = str_replace('\t\n', "", $this->queryString);
//var_dump($this->queryString);
}
-
function SetSql($sql)
{
$this->SetQuery($sql);
}
-
function RecordLog($runtime = 0)
{
- $RecordLogFile = dirname(__FILE__) . '/../data/mysqli_record_log.inc';
+ $RecordLogFile = dirname(__FILE__).'/../data/mysqli_record_log.inc';
$url = $this->GetCurUrl();
$savemsg = <<showError) {
$emsg = '';
$emsg .= "DedeBIZ Error Warning! \r\n";
$emsg .= "
";
$emsg .= "
\r\n";
- $emsg .= "
Error page: " . $this->GetCurUrl() . "
\r\n";
+ $emsg .= "
Error page: ".$this->GetCurUrl()."
\r\n";
$emsg .= "
Error infos: {$msg}
\r\n";
- $emsg .= "
\r\n";
-
+ $emsg .= " \r\n";
echo $emsg;
}
-
- $savemsg = 'Page: ' . $this->GetCurUrl() . "\r\nError: " . $msg . "\r\nTime" . date('Y-m-d H:i:s');
+ $savemsg = 'Page: '.$this->GetCurUrl()."\r\nError: ".$msg."\r\nTime".date('Y-m-d H:i:s');
//保存MySql错误日志
$fp = @fopen($errorTrackFile, 'a');
- @fwrite($fp, '<' . '?php exit();' . "\r\n/*\r\n{$savemsg}\r\n*/\r\n?" . ">\r\n");
+ @fwrite($fp, '<'.'?php exit();'."\r\n/*\r\n{$savemsg}\r\n*/\r\n?".">\r\n");
@fclose($fp);
}
-
//获得当前的脚本网址
function GetCurUrl()
{
@@ -584,19 +526,17 @@ EOT;
if (empty($_SERVER["QUERY_STRING"])) {
$nowurl = $scriptName;
} else {
- $nowurl = $scriptName . "?" . $_SERVER["QUERY_STRING"];
+ $nowurl = $scriptName."?".$_SERVER["QUERY_STRING"];
}
}
return $nowurl;
}
}
-
//复制一个对象副本
function CopySQLiPoint(&$ndsql)
{
$GLOBALS['dsqlite'] = $ndsql;
}
-
//SQL语句过滤程序,由80sec提供,这里作了适当的修改
if (!function_exists('CheckSql')) {
function CheckSql($db_string, $querytype = 'select')
@@ -606,21 +546,18 @@ if (!function_exists('CheckSql')) {
$error = '';
$old_pos = 0;
$pos = -1;
- $log_file = DEDEINC . '/../data/' . md5($cfg_cookie_encode) . '_safe.txt';
+ $log_file = DEDEINC.'/../data/'.md5($cfg_cookie_encode).'_safe.txt';
$userIP = GetIP();
$getUrl = GetCurUrl();
-
//如果是普通查询语句,直接过滤一些特殊语法
if ($querytype == 'select') {
$notallow1 = "[^0-9a-z@\._-]{1,}(union|sleep|benchmark|load_file|outfile)[^0-9a-z@\.-]{1,}";
-
//$notallow2 = "--|/\*";
- if (preg_match("/" . $notallow1 . "/i", $db_string)) {
+ if (preg_match("/".$notallow1."/i", $db_string)) {
fputs(fopen($log_file, 'a+'), "$userIP||$getUrl||$db_string||SelectBreak\r\n");
- exit("Safe Alert: Request Error step 1 ! ");
+ exit("Safe Alert: Request Error step 1 ! ");
}
}
-
//完整的SQL检查
while (TRUE) {
$pos = strpos($db_string, '\'', $pos + 1);
@@ -644,7 +581,6 @@ if (!function_exists('CheckSql')) {
}
$clean .= substr($db_string, $old_pos);
$clean = trim(strtolower(preg_replace(array('~\s+~s'), array(' '), $clean)));
-
if (
strpos($clean, '@') !== FALSE or strpos($clean, 'char(') !== FALSE or strpos($clean, '"') !== FALSE
or strpos($clean, '$s$$s$') !== FALSE
@@ -653,19 +589,16 @@ if (!function_exists('CheckSql')) {
if (preg_match("#^create table#i", $clean)) $fail = FALSE;
$error = "unusual character";
}
-
//老版本的Mysql并不支持union,常用的程序里也不使用union,但是一些黑客使用它,所以检查它
if (strpos($clean, 'union') !== FALSE && preg_match('~(^|[^a-z])union($|[^[a-z])~s', $clean) != 0) {
$fail = TRUE;
$error = "union detect";
}
-
//发布版本的程序可能比较少包括--,#这样的注释,但是黑客经常使用它们
elseif (strpos($clean, '/*') > 2 || strpos($clean, '--') !== FALSE || strpos($clean, '#') !== FALSE) {
$fail = TRUE;
$error = "comment detect";
}
-
//这些函数不会被使用,但是黑客会用它来操作文件,down掉数据库
elseif (strpos($clean, 'sleep') !== FALSE && preg_match('~(^|[^a-z])sleep($|[^[a-z])~s', $clean) != 0) {
$fail = TRUE;
@@ -680,7 +613,6 @@ if (!function_exists('CheckSql')) {
$fail = TRUE;
$error = "file fun detect";
}
-
//老版本的MYSQL不支持子查询,我们的程序里可能也用得少,但是黑客可以使用它来查询数据库敏感信息
elseif (preg_match('~\([^)]*?select~s', $clean) != 0) {
$fail = TRUE;
@@ -688,9 +620,9 @@ if (!function_exists('CheckSql')) {
}
if (!empty($fail)) {
fputs(fopen($log_file, 'a+'), "$userIP||$getUrl||$db_string||$error\r\n");
- exit("Safe Alert: Request Error step 2! ");
+ exit("Safe Alert: Request Error step 2! ");
} else {
return $db_string;
}
}
-}
+}
\ No newline at end of file
diff --git a/src/include/datalistcp.class.php b/src/system/datalistcp.class.php
similarity index 91%
rename from src/include/datalistcp.class.php
rename to src/system/datalistcp.class.php
index a5127966..5a367f16 100755
--- a/src/include/datalistcp.class.php
+++ b/src/system/datalistcp.class.php
@@ -1,4 +1,5 @@
-sourceSql = '';
$this->pageSize = 25;
$this->queryTime = 0;
@@ -88,7 +85,6 @@ class DataListCP
$this->tpl->LoadTemplate($tplfile);
}
}
-
/**
* 兼容PHP4版本
*
@@ -100,13 +96,11 @@ class DataListCP
{
$this->__construct($tplfile);
}
-
//设置SQL语句
function SetSource($sql)
{
$this->sourceSql = $sql;
}
-
//设置模板
//如果想要使用模板中指定的pagesize,必须在调用模板后才调用 SetSource($sql)
function SetTemplate($tplfile)
@@ -117,7 +111,6 @@ class DataListCP
{
$this->tpl->LoadTemplate($tplfile);
}
-
/**
* 对config参数及get参数等进行预处理
*
@@ -135,7 +128,6 @@ class DataListCP
}
$this->pageNO = $pageno;
$this->totalResult = $totalresult;
-
if (isset($this->tpl->tpCfgs['pagesize'])) {
$this->pageSize = $this->tpl->tpCfgs['pagesize'];
}
@@ -152,13 +144,11 @@ class DataListCP
$this->sourceSql .= " LIMIT ".(($this->pageNO - 1) * $this->pageSize).",".$this->pageSize;
}
}
-
//设置网址的Get参数键值
function SetParameter($key, $value)
{
$this->getValues[$key] = $value;
}
-
//设置/获取文档相关的各种变量
function SetVar($k, $v)
{
@@ -167,13 +157,11 @@ class DataListCP
$_vars[$k] = $v;
}
}
-
function GetVar($k)
{
global $_vars;
return isset($_vars[$k]) ? $_vars[$k] : '';
}
-
function XSSClean($val)
{
if (is_array($val)) {
@@ -184,7 +172,6 @@ class DataListCP
}
return $this->RemoveXss($val);
}
-
function RemoveXss($val)
{
global $cfg_soft_lang;
@@ -195,21 +182,18 @@ class DataListCP
$search .= '1234567890!@#$%^&*()';
$search .= '~`";:?+/={}[]-_|\'\\';
for ($i = 0; $i < strlen($search); $i++) {
- $val = preg_replace('/([xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;
- $val = preg_replace('/({0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;
+ $val = preg_replace('/([xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); //with a ;
+ $val = preg_replace('/({0,8}'.ord($search[$i]).';?)/', $search[$i], $val); //with a ;
}
-
$val = str_replace("`", "‘", $val);
$val = str_replace("'", "‘", $val);
$val = str_replace("\"", "“", $val);
$val = str_replace(",", ",", $val);
$val = str_replace("(", "(", $val);
$val = str_replace(")", ")", $val);
-
$ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');
$ra2 = array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');
$ra = array_merge($ra1, $ra2);
-
$found = true;
while ($found == true) {
$val_before = $val;
@@ -236,7 +220,6 @@ class DataListCP
if ($cfg_soft_lang == 'gb2312') $val = utf82gb($val);
return $val;
}
-
//获取当前页数据列表
function GetArcList($atts, $refObj = '', $fields = array())
{
@@ -255,7 +238,6 @@ class DataListCP
$this->queryTime = (Exectime() - $t1);
return $rsArray;
}
-
//获取分页导航列表
function GetPageList($atts, $refObj = '', $fields = array())
{
@@ -271,16 +253,15 @@ class DataListCP
$atts['listitem'] = "info,index,end,pre,next,pageno";
}
$totalpage = ceil($this->totalResult / $this->pageSize);
-
//echo " {$totalpage}=={$this->totalResult}=={$this->pageSize}";
//无结果或只有一页的情况
if ($totalpage <= 1 && $this->totalResult > 0) {
- return "";
+ return "";
}
if ($this->totalResult == 0) {
- return "";
+ return "";
}
- $infos = "{$lang_total} {$totalpage} {$lang_page}/{$this->totalResult}{$lang_record_number} ";
+ $infos = "{$lang_total}{$totalpage}{$lang_page}/{$this->totalResult}{$lang_record_number} ";
if ($this->totalResult != 0) {
$this->getValues['totalresult'] = $this->totalResult;
}
@@ -292,21 +273,19 @@ class DataListCP
}
}
$purl .= "?".$geturl;
-
//获得上一页和下一页的链接
if ($this->pageNO != 1) {
$prepage .= "$lang_pre_page \n";
$indexpage = "$lang_index_page \n";
} else {
- $indexpage = ""."$lang_index_page \n"." ";
+ $indexpage = ""."$lang_index_page \n"." ";
}
if ($this->pageNO != $totalpage && $totalpage > 1) {
$nextpage .= "$lang_next_page \n";
$endpage = "$lang_end_page \n";
} else {
- $endpage = " $lang_end_page \n";
+ $endpage = " $lang_end_page \n";
}
-
//获得数字链接
$listdd = "";
$total_list = $atts['listsize'] * 2 + 1;
@@ -325,9 +304,7 @@ class DataListCP
for ($j; $j <= $total_list; $j++) {
$listdd .= $j == $this->pageNO ? "$j \r\n" : "".$j." \n";
}
-
$plist = "$hidenform";
if ($totalpage > $total_list) {
- $plist .= " \r\n";
- $plist .= " \r\n";
+ $plist .= " \r\n";
+ $plist .= " \r\n";
}
$plist .= " \n";
}
$plist .= "\n";
return $plist;
}
-
//获得当前网址
function GetCurUrl()
{
@@ -371,25 +347,21 @@ class DataListCP
}
return $nowurl;
}
-
//关闭
function Close()
{
}
-
//显示数据
function Display()
{
$this->PreLoad();
-
//在PHP4中,对象引用必须放在display之前,放在其它位置中无效
$this->tpl->SetObject($this);
$this->tpl->Display();
}
-
//保存为HTML
function SaveTo($filename)
{
$this->tpl->SaveTo($filename);
}
-}
+}
\ No newline at end of file
diff --git a/src/include/dedeatt.class.php b/src/system/dedeatt.class.php
similarity index 90%
rename from src/include/dedeatt.class.php
rename to src/system/dedeatt.class.php
index 6cf5e485..e9a991a7 100755
--- a/src/include/dedeatt.class.php
+++ b/src/system/dedeatt.class.php
@@ -1,5 +1,4 @@
GetAtt($str);
}
-
/**
* 判断属性是否存在
*
@@ -59,7 +54,6 @@ class DedeAtt
{
return isset($this->Items[$str]) ? TRUE : FALSE;
}
-
/**
* 获得标记名称
*
@@ -70,7 +64,6 @@ class DedeAtt
{
return $this->GetAtt("tagname");
}
-
/**
* 获得属性个数
*
@@ -81,8 +74,7 @@ class DedeAtt
{
return $this->Count + 1;
}
-} //End DedeAtt
-
+}//End DedeAtt
/**
* 属性解析器
* function c____DedeAttParse();
@@ -97,7 +89,6 @@ class DedeAttParse
var $SourceMaxSize = 1024;
var $CAtt; //属性的数据描述类
var $CharToLow = TRUE;
-
/**
* 设置属性解析器源字符串
*
@@ -115,7 +106,6 @@ class DedeAttParse
$this->ParseAtt();
}
}
-
/**
* 解析属性(私有成员,仅给SetSource调用)
*
@@ -131,10 +121,9 @@ class DedeAttParse
$ddtag = "";
$notAttribute = TRUE;
$strLen = strlen($this->SourceString);
-
- // 这里是获得Tag的名称,可视情况是否需要
- // 如果不在这个里解析,则在解析整个Tag时解析
- // 属性中不应该存在tagname这个名称
+ //这里是获得Tag的名称,可视情况是否需要
+ //如果不在这个里解析,则在解析整个Tag时解析
+ //属性中不应该存在tagname这个名称
for ($i = 0; $i < $strLen; $i++) {
$d = substr($this->SourceString, $i, 1);
if ($d == ' ') {
@@ -151,13 +140,11 @@ class DedeAttParse
$tmpvalue .= $d;
}
}
-
//不存在属性列表的情况
if ($notAttribute) {
$this->CAtt->Count++;
$this->CAtt->Items["tagname"] = ($this->CharToLow ? strtolower(trim($tmpvalue)) : trim($tmpvalue));
}
-
//如果字符串含有属性值,遍历源字符串,并获得各属性
if (!$notAttribute) {
for ($i; $i < $strLen; $i++) {
@@ -176,7 +163,7 @@ class DedeAttParse
} else if ($startdd == 0) {
switch ($d) {
case ' ':
- // continue;
+ //continue;
break;
case '\'':
$ddtag = '\'';
@@ -210,6 +197,5 @@ class DedeAttParse
} //完成属性解析
} //for
-
} //has Attribute
}//End DedeAttParse
\ No newline at end of file
diff --git a/src/include/dedecollection.func.php b/src/system/dedecollection.func.php
similarity index 96%
rename from src/include/dedecollection.func.php
rename to src/system/dedecollection.func.php
index 1eb6883a..a4a85b4c 100755
--- a/src/include/dedecollection.func.php
+++ b/src/system/dedecollection.func.php
@@ -1,4 +1,5 @@
- $maxtime) {
break;
}
-
//到达指定大小结束
if ($i >= $contentLength) {
break;
@@ -129,7 +123,6 @@ function DownImageKeep($gurl, $rfurl, $filename, $gcookie = "", $JumpCount = 0,
fclose($m_fp);
return TRUE;
}
-
/**
* 获得某页面返回的Cookie信息
*
@@ -159,10 +152,9 @@ function RefurlCookie($gurl)
$sessionQuery .= "Connection: Close\r\n\r\n";
$errno = "";
$errstr = "";
- $m_fp = fsockopen($ghost, 80, $errno, $errstr, 10) or die($ghost.' ');
+ $m_fp = fsockopen($ghost, 80, $errno, $errstr, 10) or die($ghost.' ');
fwrite($m_fp, $sessionQuery);
$lnum = 0;
-
//获取详细应答头
$gcookie = "";
while (!feof($m_fp)) {
@@ -179,7 +171,6 @@ function RefurlCookie($gurl)
fclose($m_fp);
return $gcookie;
}
-
/**
* 获得网址的host和query部份
*
@@ -194,7 +185,6 @@ function GetHostInfo($gurl)
$garr['query'] = "/".preg_replace("/^([^\/]*)\//i", "", $gurl);
return $garr;
}
-
/**
* HTML里的图片转DEDE格式
*
@@ -225,7 +215,6 @@ function TurnImageTag(&$body)
$ttx = "\r\n{dede:pagestyle maxwidth='{$cfg_album_width}' ddmaxwidth='{$cfg_ddimg_width}' row='3' col='3' value='2'/}\r\n{dede:comments}图集类型会采集时生成此配置是正常的,不过如果后面没有跟着img标记则表示规则无效{/dede:comments}\r\n".$ttx;
return $ttx;
}
-
/**
* HTML里的网址格式转换
*
@@ -249,7 +238,6 @@ function TurnLinkTag(&$body)
}
return $ttx;
}
-
/**
* 替换XML的CDATA
*
@@ -263,7 +251,6 @@ function RpCdata($str)
$str = str_replace(']]>', '', $str);
return $str;
}
-
/**
* 分析RSS里的链接
*
@@ -277,7 +264,6 @@ function GetRssLinks($rssurl)
$dhd = new DedeHttpDown();
$dhd->OpenUrl($rssurl);
$rsshtml = $dhd->GetHtml();
-
//分析编码
preg_match("/encoding=[\"']([^\"']*)[\"']/is", $rsshtml, $infos);
if (isset($infos[1])) {
@@ -321,7 +307,6 @@ function GetRssLinks($rssurl)
}
return $rsarr;
}
-
/**
* 从RSS摘要获取图片信息
*
@@ -344,7 +329,6 @@ function GetddImgFromRss($descriptions, $refurl)
return '';
}
}
-
/**
* 补全网址
*
@@ -361,7 +345,6 @@ function FillUrl($refurl, $surl)
$surl = trim($surl);
$urls = @parse_url($refurl);
$basehost = ((!isset($urls['port']) || $urls['port'] == '80') ? $urls['host'] : $urls['host'].':'.$urls['port']);
-
//$basepath = $basehost.(!isset($urls['path']) ? '' : '/'.$urls['path']);
//由于直接获得的path在处理 http://xxxx/nnn/aaa?fdsafd 这种情况时会有错误,因此用其它方式处理
$basepath = $basehost;
@@ -380,7 +363,6 @@ function FillUrl($refurl, $surl)
if ($pos > 0) {
$surl = substr($surl, 0, $pos);
}
-
//用 '/' 表示网站根的网址
if ($surl[0] == '/') {
$okurl = $basehost.$surl;
@@ -405,7 +387,6 @@ function FillUrl($refurl, $surl)
$okurl = 'http://'.preg_replace("/\/{1,}/", '/', $okurl);
return $okurl;
}
-
/**
* 从匹配规则中获取列表网址
*
@@ -422,7 +403,6 @@ function FillUrl($refurl, $surl)
function GetUrlFromListRule($regxurl = '', $handurl = '', $startid = 0, $endid = 0, $addv = 1, $usemore = 0, $batchrule = '')
{
global $dsql, $islisten;
-
$lists = array();
$n = 0;
$islisten = (empty($islisten) ? 0 : $islisten);
@@ -450,7 +430,6 @@ function GetUrlFromListRule($regxurl = '', $handurl = '', $startid = 0, $endid =
if ($addv <= 0) {
$addv = 1;
}
-
//没指定多栏目匹配规则
if ($usemore == 0) {
while ($startid <= $endid) {
@@ -463,7 +442,6 @@ function GetUrlFromListRule($regxurl = '', $handurl = '', $startid = 0, $endid =
}
}
}
-
//匹配多个栏目
//规则表达式 [(#)=>(#)匹配的网址; (*)=>(*)的范围,如:1-20; typeid=>栏目id; addurl=>附加的网址(用|分开多个)]
else {
@@ -495,7 +473,6 @@ function GetUrlFromListRule($regxurl = '', $handurl = '', $startid = 0, $endid =
list($startid, $endid) = explode('-', $v);
}
}
-
//如果栏目用栏目名称
if (preg_match('/[^0-9]/', $typeid)) {
$arr = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE typename LIKE '$typeid' ");
@@ -505,7 +482,6 @@ function GetUrlFromListRule($regxurl = '', $handurl = '', $startid = 0, $endid =
$typeid = 0;
}
}
-
//附加网址优先
$mjj = 0;
if (isset($addurls[0])) {
@@ -523,7 +499,6 @@ function GetUrlFromListRule($regxurl = '', $handurl = '', $startid = 0, $endid =
}
}
}
-
//如果为非监听模式或监听模式没手工指定的附加网址
if ($islisten != 1 || $mjj == 0) {
//匹配规则里的网址,注:(#)的网址是是允许使用(*)的
@@ -543,10 +518,7 @@ function GetUrlFromListRule($regxurl = '', $handurl = '', $startid = 0, $endid =
}
}
} //End 匹配多栏目
-
} //End使用规则匹配的情况
-
}
-
return $lists;
}//End
\ No newline at end of file
diff --git a/src/include/dedemodule.class.php b/src/system/dedemodule.class.php
similarity index 95%
rename from src/include/dedemodule.class.php
rename to src/system/dedemodule.class.php
index 7ad3ae27..606ef64a 100755
--- a/src/include/dedemodule.class.php
+++ b/src/system/dedemodule.class.php
@@ -1,4 +1,5 @@
-__construct($modulespath);
}
-
/**
* 枚举系统里已经存在的模块(缓存功能实际上只作hash与文件名的解析,在此不特别处理)
*
@@ -53,11 +50,8 @@ class DedeModule
function GetModuleList($moduletype = '')
{
if (is_array($this->modules)) return $this->modules;
-
$dh = dir($this->modulesPath) or die("没找到模块目录:({$this->modulesPath})");
-
- $fp = @fopen($this->modulesPath.'/modulescache.php', 'w') or die('读取文件权限出错,目录文件'.$this->modulesPath.'/modulescache.php不可写!');
-
+ $fp = @fopen($this->modulesPath.'/modulescache.php', 'w') or die('读取文件权限出错,目录文件'.$this->modulesPath.'/modulescache.php不可写');
fwrite($fp, "<"."?php\r\n");
fwrite($fp, "global \$allmodules;\r\n");
while ($filename = $dh->read()) {
@@ -80,7 +74,6 @@ class DedeModule
$dh->Close();
return $this->modules;
}
-
/**
* 从远程获取模块信息
*
@@ -118,7 +111,6 @@ class DedeModule
}
}
}
-
/**
* 获得指定hash的模块文件
*
@@ -132,7 +124,6 @@ class DedeModule
if (isset($GLOBALS['allmodules'][$hash])) return $GLOBALS['allmodules'][$hash];
else return $hash.'.xml';
}
-
/**
* 获得某模块的基本信息
*
@@ -175,22 +166,18 @@ class DedeModule
}
}
fclose($fp);
-
if (empty($minfos['lang'])) {
$minfos['lang'] = "utf-8";
}
if (isset($minfos['lang'])) $this->moduleLang = trim($minfos['lang']);
else $this->moduleLang = 'gbk';
-
if ($this->sysLang == 'gb2312') $this->sysLang = 'gbk';
if ($this->moduleLang == 'gb2312') $this->moduleLang = 'gbk';
-
if ($this->sysLang != $this->moduleLang) {
foreach ($minfos as $k => $v) $minfos[$k] = $this->AppCode($v);
}
-
if (isset($minfos['pubkey'])) {
- // 验证模块信息
+ //验证模块信息
$pubKey = @base64url_decode($minfos['pubkey']);
@openssl_public_decrypt(base64url_decode($minfos['info']), $decontent, $pubKey);
$enInfo = (array)json_decode($decontent);
@@ -201,7 +188,6 @@ class DedeModule
return null;
}
}
-
return $minfos;
}
@@ -235,7 +221,6 @@ class DedeModule
fclose($fp);
return $filexml;
}
-
/**
* 获得系统文件的内容
* 指安装、删除、协议文件
@@ -256,7 +241,7 @@ class DedeModule
while (!feof($fp)) {
$line = fgets($fp, 1024);
if (!$start) {
- // 2011-6-7 修复模块打包程序中上传安装程序生成为空白文件(by:华强)
+ //2011-6-7 修复模块打包程序中上传安装程序生成为空白文件
if (preg_match("#<{$ntype}>#i", $line)) $start = TRUE;
} else {
if (preg_match("#<\/{$ntype}#i", $line)) break;
@@ -270,7 +255,6 @@ class DedeModule
$okdata = $this->AppCode($okdata);
return $okdata;
}
-
/**
* 把某系统文件转换为文件
*
@@ -289,7 +273,6 @@ class DedeModule
fclose($fp);
return $filename;
}
-
/**
* 删除系统文件
*
@@ -303,7 +286,6 @@ class DedeModule
$filename = $this->modulesPath.'/'.$hashcode."-{$ntype}.php";
unlink($filename);
}
-
/**
* 检查是否已经存在指定的模块
*
@@ -317,7 +299,6 @@ class DedeModule
if (file_exists($modulefile) && !is_dir($modulefile)) return TRUE;
else return FALSE;
}
-
/**
* 读取文件,返回编码后的文件内容
*
@@ -335,7 +316,6 @@ class DedeModule
if (!empty($str)) return base64_encode($str);
else return '';
}
-
/**
* 获取模块包里的文件名列表
*
@@ -363,7 +343,6 @@ class DedeModule
fclose($fp);
return $filelists;
}
-
/**
* 删除已安装模块附带的文件
*
@@ -408,7 +387,6 @@ class DedeModule
}
return TRUE;
}
-
/**
* 把模块包里的文件写入服务器
*
@@ -481,7 +459,6 @@ class DedeModule
fclose($fp);
return TRUE;
}
-
/**
* 测试某文件的文件夹是否创建
*
@@ -505,7 +482,6 @@ class DedeModule
}
return TRUE;
}
-
/**
* 获取某个目录或文件的打包数据
*
@@ -521,7 +497,6 @@ class DedeModule
$this->MakeEncodeFileRun($basedir, $f, $fp);
return TRUE;
}
-
/**
* 测试目标文件
*
@@ -536,7 +511,6 @@ class DedeModule
$this->MakeEncodeFileRunTest($basedir, $f);
return TRUE;
}
-
/**
* 检测某个目录或文件的打包数据,递归
*
@@ -565,7 +539,6 @@ class DedeModule
}
}
}
-
/**
* 获取个目录或文件的打包数据,递归
*
@@ -599,7 +572,6 @@ class DedeModule
fwrite($fp, $fileList);
}
}
-
/**
* 清理
*
diff --git a/src/include/dedetag.class.php b/src/system/dedetag.class.php
similarity index 89%
rename from src/include/dedetag.class.php
rename to src/system/dedetag.class.php
index 5f04fc4e..fb6f641b 100755
--- a/src/include/dedetag.class.php
+++ b/src/system/dedetag.class.php
@@ -1,6 +1,7 @@
-TagName);
}
-
/**
* 获取值
*
@@ -48,40 +47,33 @@ class DedeTag
{
return $this->TagValue;
}
-
//下面两个成员函数仅是为了兼容旧版
function GetTagName()
{
return strtolower($this->TagName);
}
-
function GetTagValue()
{
return $this->TagValue;
}
-
//获取标记的指定属性
function IsAttribute($str)
{
return $this->CAttribute->IsAttribute($str);
}
-
function GetAttribute($str)
{
return $this->CAttribute->GetAtt($str);
}
-
function GetAtt($str)
{
return $this->CAttribute->GetAtt($str);
}
-
function GetInnerText()
{
return $this->InnerText;
}
}
-
/**
* DedeTagParse Dede织梦模板类
* function c____DedeTagParse();
@@ -96,7 +88,7 @@ class DedeTagParse
var $TagStartWord = '{'; //标记起始
var $TagEndWord = '}'; //标记结束
var $TagMaxLen = 64; //标记名称的最大值
- var $CharToLow = TRUE; // TRUE表示对属性和标记名称不区分大小写
+ var $CharToLow = TRUE; //TRUE表示对属性和标记名称不区分大小写
var $IsCache = FALSE; //是否使用缓冲
var $TempMkTime = 0;
var $CacheFile = '';
@@ -105,7 +97,6 @@ class DedeTagParse
var $Count = -1; //$Tags标记个数
var $refObj = ''; //引用当前模板类的对象
var $taghashfile = '';
-
function __construct()
{
if (!isset($GLOBALS['cfg_tplcache'])) {
@@ -130,12 +121,10 @@ class DedeTagParse
$this->TempMkTime = 0;
$this->CacheFile = '';
}
-
function DedeTagParse()
{
$this->__construct();
}
-
/**
* 设置标记的命名空间,默认为dede
*
@@ -151,7 +140,6 @@ class DedeTagParse
$this->TagStartWord = $s;
$this->TagEndWord = $e;
}
-
/**
* 重置成员变量或Clear
*
@@ -164,7 +152,6 @@ class DedeTagParse
$this->CTags = array();
$this->Count = -1;
}
-
/**
* 强制引用
*
@@ -176,19 +163,14 @@ class DedeTagParse
{
$this->refObj = $refObj;
}
-
function GetCount()
{
return $this->Count + 1;
}
-
function Clear()
{
$this->SetDefault();
}
-
- // ------------------------------------------------------------------------
-
/**
* CheckDisabledFunctions
*
@@ -202,14 +184,14 @@ class DedeTagParse
{
global $cfg_disable_funs;
$cfg_disable_funs = isset($cfg_disable_funs) ? $cfg_disable_funs : 'phpinfo,eval,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,file_put_contents,fsockopen,fopen,fwrite';
- // 模板引擎增加disable_functions
+ //模板引擎增加disable_functions
if (defined('DEDEDISFUN')) {
$tokens = token_get_all_nl('");
$disabled_functions = explode(',', $cfg_disable_funs);
foreach ($tokens as $token) {
if (is_array($token)) {
if ($token[0] = '306' && in_array($token[1], $disabled_functions)) {
- $errmsg = 'DedeBIZ Error:function disabled "'.$token[1].'" more... ';
+ $errmsg = 'DedeBIZ Error:function disabled "'.$token[1].'" more ';
return FALSE;
}
}
@@ -217,7 +199,6 @@ class DedeTagParse
}
return TRUE;
}
-
/**
* 检测模板缓存
*
@@ -241,7 +222,6 @@ class DedeTagParse
if (!file_exists($ckfullfile) || !file_exists($ckfullfile_t)) {
return FALSE;
}
-
//检测模板最后更新时间
$fp = fopen($ckfullfile_t, 'r');
$time_info = trim(fgets($fp, 64));
@@ -249,11 +229,9 @@ class DedeTagParse
if ($time_info != $this->TempMkTime) {
return FALSE;
}
-
//引入缓冲数组
include($this->CacheFile);
$errmsg = '';
-
//把缓冲数组内容读入类
if (isset($z) && is_array($z)) {
foreach ($z as $k => $v) {
@@ -284,7 +262,6 @@ class DedeTagParse
}
return TRUE;
}
-
/**
* 写入缓存
*
@@ -294,47 +271,48 @@ class DedeTagParse
*/
function SaveCache()
{
- $fp = fopen($this->CacheFile.'.txt', "w");
- fwrite($fp, $this->TempMkTime."\n");
- fclose($fp);
- $fp = fopen($this->CacheFile, "w");
- flock($fp, 3);
- fwrite($fp, '<'.'?php'."\r\n");
- $errmsg = '';
- if (is_array($this->CTags)) {
- foreach ($this->CTags as $tid => $ctag) {
- $arrayValue = 'Array("'.$ctag->TagName.'",';
- if (!$this->CheckDisabledFunctions($ctag->InnerText, $errmsg)) {
- fclose($fp);
- @unlink($this->taghashfile);
- @unlink($this->CacheFile);
- @unlink($this->CacheFile.'.txt');
- die($errmsg);
- }
- $arrayValue .= '"'.str_replace('$', '\$', str_replace("\r", "\\r", str_replace("\n", "\\n", str_replace('"', '\"', str_replace("\\", "\\\\", $ctag->InnerText))))).'"';
- $arrayValue .= ",{$ctag->StartPos},{$ctag->EndPos});";
- fwrite($fp, "\$z[$tid]={$arrayValue}\n");
- if (is_array($ctag->CAttribute->Items)) {
- fwrite($fp, "\$z[$tid][4]=array();\n");
- foreach ($ctag->CAttribute->Items as $k => $v) {
- $v = str_replace("\\", "\\\\", $v);
- $v = str_replace('"', "\\".'"', $v);
- $v = str_replace('$', '\$', $v);
- $k = trim(str_replace("'", "", $k));
- if ($k == "") {
- continue;
- }
- if ($k != 'tagname') {
- fwrite($fp, "\$z[$tid][4]['$k']=\"$v\";\n");
+ if (!empty($this->CacheFile)) {
+ $fp = fopen($this->CacheFile.'.txt', "w");
+ fwrite($fp, $this->TempMkTime."\n");
+ fclose($fp);
+ $fp = fopen($this->CacheFile, "w");
+ flock($fp, 3);
+ fwrite($fp, '<'.'?php'."\r\n");
+ $errmsg = '';
+ if (is_array($this->CTags)) {
+ foreach ($this->CTags as $tid => $ctag) {
+ $arrayValue = 'Array("'.$ctag->TagName.'",';
+ if (!$this->CheckDisabledFunctions($ctag->InnerText, $errmsg)) {
+ fclose($fp);
+ @unlink($this->taghashfile);
+ @unlink($this->CacheFile);
+ @unlink($this->CacheFile.'.txt');
+ die($errmsg);
+ }
+ $arrayValue .= '"'.str_replace('$', '\$', str_replace("\r", "\\r", str_replace("\n", "\\n", str_replace('"', '\"', str_replace("\\", "\\\\", $ctag->InnerText))))).'"';
+ $arrayValue .= ",{$ctag->StartPos},{$ctag->EndPos});";
+ fwrite($fp, "\$z[$tid]={$arrayValue}\n");
+ if (is_array($ctag->CAttribute->Items)) {
+ fwrite($fp, "\$z[$tid][4]=array();\n");
+ foreach ($ctag->CAttribute->Items as $k => $v) {
+ $v = str_replace("\\", "\\\\", $v);
+ $v = str_replace('"', "\\".'"', $v);
+ $v = str_replace('$', '\$', $v);
+ $k = trim(str_replace("'", "", $k));
+ if ($k == "") {
+ continue;
+ }
+ if ($k != 'tagname') {
+ fwrite($fp, "\$z[$tid][4]['$k']=\"$v\";\n");
+ }
}
}
}
}
+ fwrite($fp, "\n".'?'.'>');
+ fclose($fp);
}
- fwrite($fp, "\n".'?'.'>');
- fclose($fp);
}
-
/**
* 载入模板文件
*
@@ -361,19 +339,16 @@ class DedeTagParse
}
}
}
-
- // 仅用于兼容旧版本
+ //仅用于兼容旧版本
function LoadTemplet($filename)
{
$this->LoadTemplate($filename);
}
-
- // 仅用于兼容旧版本
+ //仅用于兼容旧版本
function LoadFile($filename)
{
$this->LoadTemplate($filename);
}
-
/**
* 载入模板字符串
*
@@ -383,12 +358,6 @@ class DedeTagParse
*/
function LoadSource($str)
{
- /*
- $this->SetDefault();
- $this->SourceString = $str;
- $this->IsCache = FALSE;
- $this->ParseTemplet();
- */
//优化模板字符串存取读取方式
$this->taghashfile = $filename = DEDEDATA.'/tplcache/'.md5($str).'.inc';
if (!is_file($filename)) {
@@ -396,12 +365,10 @@ class DedeTagParse
}
$this->LoadTemplate($filename);
}
-
function LoadString($str)
{
$this->LoadSource($str);
}
-
/**
* 获得指定名称的Tag的ID(如果有多个同名的Tag,则取没有被取代为内容的第一个Tag)
*
@@ -425,7 +392,6 @@ class DedeTagParse
}
return -1;
}
-
/**
* 获得指定名称的CTag数据类(如果有多个同名的Tag,则取没有被分配内容的第一个Tag)
*
@@ -449,7 +415,6 @@ class DedeTagParse
}
return '';
}
-
/**
* 通过名称获取标记
*
@@ -461,7 +426,6 @@ class DedeTagParse
{
return $this->GetTag($str);
}
-
/**
* 获得指定ID的CTag数据类
*
@@ -477,7 +441,6 @@ class DedeTagParse
return '';
}
}
-
/**
* 给_vars数组传递一个元素
*
@@ -493,7 +456,6 @@ class DedeTagParse
}
$_sys_globals[$vname] = $vvalue;
}
-
/**
* 分配指定ID的标记的值
*
@@ -514,7 +476,6 @@ class DedeTagParse
}
}
}
-
/**
* 分配指定名称的标记的值,如果标记包含属性,请不要用此函数
*
@@ -531,7 +492,6 @@ class DedeTagParse
}
}
}
-
/**
* 处理特殊标记
*
@@ -544,7 +504,6 @@ class DedeTagParse
for ($i = 0; $i <= $this->Count; $i++) {
$CTag = $this->CTags[$i];
$str = '';
-
//获取一个外部变量
if ($CTag->TagName == 'global') {
$str = $this->GetGlobals($CTag->GetAtt('name'));
@@ -555,7 +514,6 @@ class DedeTagParse
$this->CTags[$i]->IsReplace = TRUE;
$this->CTags[$i]->TagValue = $str;
}
-
//引入静态文件
else if ($CTag->TagName == 'include') {
$filename = ($CTag->GetAtt('file') == '' ? $CTag->GetAtt('filename') : $CTag->GetAtt('file'));
@@ -563,7 +521,6 @@ class DedeTagParse
$this->CTags[$i]->IsReplace = TRUE;
$this->CTags[$i]->TagValue = $str;
}
-
//循环一个普通数组
else if ($CTag->TagName == 'foreach') {
$arr = $this->CTags[$i]->GetAtt('array');
@@ -577,7 +534,6 @@ class DedeTagParse
$this->CTags[$i]->IsReplace = TRUE;
$this->CTags[$i]->TagValue = $str;
}
-
//设置/获取变量值
else if ($CTag->TagName == 'var') {
$vname = $this->CTags[$i]->GetAtt('name');
@@ -591,7 +547,6 @@ class DedeTagParse
$this->CTags[$i]->IsReplace = TRUE;
$this->CTags[$i]->TagValue = $str;
}
-
//运行PHP接口
if ($CTag->GetAtt('runphp') == 'yes') {
$this->RunPHP($CTag, $i);
@@ -601,7 +556,6 @@ class DedeTagParse
}
}
}
-
//运行PHP代码
function RunPHP(&$refObj, $i)
{
@@ -613,12 +567,16 @@ class DedeTagParse
$phpcode = $refObj->GetInnerText();
}
$phpcode = preg_replace("/'@me'|\"@me\"|@me/i", '$DedeMeValue', $phpcode);
- @eval($phpcode); //or die("$phpcode ");
-
+ try {
+ @eval($phpcode);
+ $this->CTags[$i]->TagValue = $DedeMeValue;
+ $this->CTags[$i]->IsReplace = TRUE;
+ } catch (Exception $e) {
+ //or die("$phpcode ");
+ }
$this->CTags[$i]->TagValue = $DedeMeValue;
$this->CTags[$i]->IsReplace = TRUE;
}
-
/**
* 把分析模板输出到一个字符串中
* 不替换没被处理的值
@@ -651,7 +609,6 @@ class DedeTagParse
}
return $ResultString;
}
-
/**
* 把分析模板输出到一个字符串中,并返回
*
@@ -678,7 +635,6 @@ class DedeTagParse
}
return $ResultString;
}
-
/**
* 直接输出解析模板
*
@@ -689,7 +645,6 @@ class DedeTagParse
{
echo $this->GetResult();
}
-
/**
* 把解析模板输出为文件
*
@@ -699,11 +654,10 @@ class DedeTagParse
*/
function SaveTo($filename)
{
- $fp = @fopen($filename, "w") or die("DedeTag Engine Create File False");
+ $fp = @fopen($filename, "w") or die("请检查栏目文件保存目录是否填写正确");
fwrite($fp, $this->GetResult());
fclose($fp);
}
-
/**
* 解析模板
*
@@ -721,17 +675,14 @@ class DedeTagParse
$eTagEndWord = "/".$TagEndWord;
$tsLen = strlen($FullTagStartWord);
$sourceLen = strlen($this->SourceString);
-
if ($sourceLen <= ($tsLen + 3)) {
return;
}
$cAtt = new DedeAttributeParse();
$cAtt->charToLow = $this->CharToLow;
-
//遍历模板字符串,请取标记及其属性信息
for ($i = 0; $i < $sourceLen; $i++) {
$tTagName = '';
-
//如果不进行此判断,将无法识别相连的两个标记
if ($i - 1 >= 0) {
$ss = $i - 1;
@@ -751,12 +702,6 @@ class DedeTagParse
break;
}
//判断是否已经到倒数第三个字符(可能性几率极小,取消此逻辑)
- /*
- if($sPos > ($sourceLen-$tsLen-3) )
- {
- break;
- }
- */
for ($j = ($sPos + $tsLen); $j < ($sPos + $tsLen + $this->TagMaxLen); $j++) {
if ($j > ($sourceLen - 1)) {
break;
@@ -770,13 +715,10 @@ class DedeTagParse
$i = $sPos + $tsLen;
$endPos = -1;
$fullTagEndWordThis = $sTagEndWord.$tTagName.$TagEndWord;
-
$e1 = strpos($this->SourceString, $eTagEndWord, $i);
$e2 = strpos($this->SourceString, $FullTagStartWord, $i);
$e3 = strpos($this->SourceString, $fullTagEndWordThis, $i);
-
//$eTagEndWord = /} $FullTagStartWord = {tag: $fullTagEndWordThis = {/tag:xxx]
-
$e1 = trim($e1);
$e2 = trim($e2);
$e3 = trim($e3);
@@ -804,15 +746,13 @@ class DedeTagParse
$elen = $endPos + strlen($fullTagEndWordThis);
}
}
-
//not found end tag , error
if ($endPos == -1) {
- echo "Tag Character postion $sPos, '$tTagName' Error \r\n";
+ echo "Tag Character postion $sPos, '$tTagName' Error \r\n";
break;
}
$i = $elen;
$ePos = $endPos;
-
//分析所找到的标记位置等信息
$attStr = '';
$innerText = '';
@@ -847,12 +787,10 @@ class DedeTagParse
break;
}
} //结束遍历模板字符串
-
if ($this->IsCache) {
$this->SaveCache();
}
}
-
/**
* 处理某字段的函数
*
@@ -869,14 +807,18 @@ class DedeTagParse
$functionname = str_replace("\"}", "\"]", $functionname);
$functionname = preg_replace("/'@me'|\"@me\"|@me/i", '$DedeFieldValue', $functionname);
$functionname = "\$DedeFieldValue = ".$functionname;
- @eval($functionname.";"); //or die("$functionname ");
- if (empty($DedeFieldValue)) {
+ try {
+ @eval($functionname.";");
+ if (empty($DedeFieldValue)) {
+ return '';
+ } else {
+ return $DedeFieldValue;
+ }
+ } catch (Exception $e) {
+ //or die("$functionname ");
return '';
- } else {
- return $DedeFieldValue;
}
}
-
/**
* 获得一个外部变量
*
@@ -887,12 +829,10 @@ class DedeTagParse
function GetGlobals($varname)
{
$varname = trim($varname);
-
//禁止在模板文件读取数据库密码
if ($varname == "dbuserpwd" || $varname == "cfg_dbpwd") {
return "";
}
-
//正常情况
if (isset($GLOBALS[$varname])) {
return $GLOBALS[$varname];
@@ -900,7 +840,6 @@ class DedeTagParse
return "";
}
}
-
/**
* 引入文件
*
@@ -916,14 +855,13 @@ class DedeTagParse
if ($filename == '') {
return '';
}
- if (file_exists(DEDEROOT."/templets/".$filename)) {
- $okfile = DEDEROOT."/templets/".$filename;
- } else if (file_exists(DEDEROOT.'/templets/'.$cfg_df_style.'/'.$filename)) {
- $okfile = DEDEROOT.'/templets/'.$cfg_df_style.'/'.$filename;
+ if (file_exists(DEDEROOT."/theme/".$filename)) {
+ $okfile = DEDEROOT."/theme/".$filename;
+ } else if (file_exists(DEDEROOT.'/theme/'.$cfg_df_style.'/'.$filename)) {
+ $okfile = DEDEROOT.'/theme/'.$cfg_df_style.'/'.$filename;
} else {
- return "无法在这个位置找到: $filename";
+ return "无法在这个位置找到:$filename";
}
-
//编译
if ($ismake != "no") {
require_once(DEDEINC."/channelunit.func.php");
@@ -939,7 +877,6 @@ class DedeTagParse
return $restr;
}
}
-
/**********************************************
//class DedeAttribute Dede模板标记属性集合
function c____DedeAttribute();
@@ -961,33 +898,28 @@ class DedeAttribute
return "";
}
}
-
//同上
function GetAttribute($str)
{
return $this->GetAtt($str);
}
-
//判断属性是否存在
function IsAttribute($str)
{
if (isset($this->Items[$str])) return TRUE;
else return FALSE;
}
-
//获得标记名称
function GetTagName()
{
return $this->GetAtt("tagname");
}
-
- // 获得属性个数
+ //获得属性个数
function GetCount()
{
return $this->Count + 1;
}
}
-
/*******************************
//属性解析器(本版本中已经支持使用\'这种语法,和用.间隔表示name属性,如 field.body)
function c____DedeAttributeParse();
@@ -996,30 +928,21 @@ class DedeAttributeParse
{
var $sourceString = "";
var $sourceMaxSize = 1024;
- var $cAttributes = "";
+ var $cAttributes = null;
var $charToLow = TRUE;
function SetSource($str = '')
{
$this->cAttributes = new DedeAttribute();
$strLen = 0;
$this->sourceString = trim(preg_replace("/[ \r\n\t]{1,}/", " ", $str));
-
//为了在function内能使用数组,这里允许对[ ]进行转义使用
$this->sourceString = str_replace('\]', ']', $this->sourceString);
$this->sourceString = str_replace('[', '[', $this->sourceString);
- /*
- $this->sourceString = str_replace('\>','>',$this->sourceString);
- $this->sourceString = str_replace('<','>',$this->sourceString);
- $this->sourceString = str_replace('{','{',$this->sourceString);
- $this->sourceString = str_replace('\}','}',$this->sourceString);
- */
-
$strLen = strlen($this->sourceString);
if ($strLen > 0 && $strLen <= $this->sourceMaxSize) {
$this->ParseAttribute();
}
}
-
//解析属性
function ParseAttribute()
{
@@ -1031,8 +954,7 @@ class DedeAttributeParse
$hasAttribute = FALSE;
$strLen = strlen($this->sourceString);
$this->cAttributes->Items = array();
-
- // 获得Tag的名称,解析到 cAtt->GetAtt('tagname') 中
+ //获得Tag的名称,解析到 cAtt->GetAtt('tagname') 中
for ($i = 0; $i < $strLen; $i++) {
if ($this->sourceString[$i] == ' ') {
$this->cAttributes->Count++;
@@ -1048,7 +970,6 @@ class DedeAttributeParse
$tmpvalue .= $this->sourceString[$i];
}
}
-
//不存在属性列表的情况
if (!$hasAttribute) {
$this->cAttributes->Count++;
@@ -1060,7 +981,6 @@ class DedeAttributeParse
return;
}
$tmpvalue = '';
-
//如果字符串含有属性值,遍历源字符串,并获得各属性
for ($i; $i < $strLen; $i++) {
$d = $this->sourceString[$i];
@@ -1077,7 +997,6 @@ class DedeAttributeParse
$startdd = 0;
}
}
-
//查找属性的限定标志
else if ($startdd == 0) {
switch ($d) {
@@ -1108,13 +1027,12 @@ class DedeAttributeParse
$tmpvalue .= $d;
}
}
- } //for
-
+ }//for
//最后一个属性的给值
if ($tmpatt != '') {
$this->cAttributes->Count++;
$this->cAttributes->Items[$tmpatt] = trim($tmpvalue);
}
//print_r($this->cAttributes->Items);
- } // end func
-}
+ } //end func
+}
\ No newline at end of file
diff --git a/src/include/dedetemplate.class.php b/src/system/dedetemplate.class.php
similarity index 94%
rename from src/include/dedetemplate.class.php
rename to src/system/dedetemplate.class.php
index 4e017c75..68a172ad 100755
--- a/src/include/dedetemplate.class.php
+++ b/src/system/dedetemplate.class.php
@@ -1,4 +1,5 @@
-tagName);
}
-
function GetValue()
{
return $this->tagValue;
}
-
function IsAtt($str)
{
return $this->cAtt->IsAttribute($str);
}
-
function GetAtt($str)
{
return $this->cAtt->GetAtt($str);
}
-
/**
* 获取底层模板
*
@@ -150,7 +142,6 @@ class Tag
return $this->innerText;
}
}
-
/**
* 模板解析器
* function C__DedeTemplate
@@ -176,8 +167,6 @@ class DedeTemplate
var $templateFile = '';
var $sourceString = '';
var $cTags = array();
-
- //var $definedVars = array();
var $count = -1;
var $loopNum = 0;
var $refObj = '';
@@ -187,8 +176,6 @@ class DedeTemplate
var $sTagEndWord = '/}';
var $tagEndWord = '}';
var $tpCfgs = array();
-
-
/**
* 析构函数
*
@@ -199,14 +186,12 @@ class DedeTemplate
*/
function __construct($templatedir = '', $refDir = '')
{
- //$definedVars[] = 'var';
//缓存目录
if ($templatedir == '') {
$this->templateDir = DEDEROOT.'/templates';
} else {
$this->templateDir = $templatedir;
}
-
//模板include目录
if ($refDir == '') {
if (isset($GLOBALS['cfg_df_style'])) {
@@ -217,13 +202,11 @@ class DedeTemplate
}
$this->cacheDir = DEDEROOT.$GLOBALS['cfg_tplcache_dir'];
}
-
- //构造函数,兼容PHP4
+ //构造函数,兼容PHP4
function DedeTemplate($templatedir = '', $refDir = '')
{
$this->__construct($templatedir, $refDir);
}
-
/**
* 设定本类自身实例的类引用和使用本类的类实例(如果在类中使用本模板引擎,后一参数一般为$this)
*
@@ -235,7 +218,6 @@ class DedeTemplate
{
$this->refObj = $refObj;
}
-
/**
* 设定Var的键值对
*
@@ -248,7 +230,6 @@ class DedeTemplate
{
$GLOBALS['_vars'][$k] = $v;
}
-
/**
* 设定Var的键值对
*
@@ -261,7 +242,6 @@ class DedeTemplate
{
$GLOBALS['_vars'][$k] = $v;
}
-
/**
* 设定数组
*
@@ -274,7 +254,6 @@ class DedeTemplate
{
$GLOBALS[$k] = $v;
}
-
/**
* 设置标记风格
*
@@ -292,7 +271,6 @@ class DedeTemplate
$this->sTagEndWord = $stend;
$this->tagEndWord = $tend;
}
-
/**
* 获得模板设定的config值
*
@@ -304,7 +282,6 @@ class DedeTemplate
{
return (isset($this->tpCfgs[$k]) ? $this->tpCfgs[$k] : '');
}
-
/**
* 设定模板文件
*
@@ -337,7 +314,6 @@ class DedeTemplate
}
$this->cacheFile = $this->cacheDir.preg_replace("/\.(wml|html|htm|php)$/", "_".$this->GetEncodeStr($tmpfile).'.inc', $tmpfileOnlyName);
$this->configFile = $this->cacheDir.preg_replace("/\.(wml|html|htm|php)$/", "_".$this->GetEncodeStr($tmpfile).'_config.inc', $tmpfileOnlyName);
-
//不开启缓存、当缓存文件不存在、及模板为更新的文件的时候才载入模板并进行解析
if (
$this->isCache == FALSE || !file_exists($this->cacheFile)
@@ -358,7 +334,6 @@ class DedeTemplate
}
}
}
-
/**
* 载入模板字符串
*
@@ -374,7 +349,6 @@ class DedeTemplate
$this->configFile = $this->cacheDir."/string_".$hashcode."_config.inc";
$this->ParseTemplate();
}
-
/**
* 调用此函数include一个编译后的PHP文件,通常是在最后一个步骤才调用本文件
*
@@ -387,7 +361,6 @@ class DedeTemplate
$this->WriteCache();
return $this->cacheFile;
}
-
/**
* 显示内容,由于函数中会重新解压一次$GLOBALS变量,所以在动态页中,应该尽量少用本方法,
* 取代之是直接在程序中 include $tpl->CacheFile(),不过include $tpl->CacheFile()这种方式不能在类或函数内使用
@@ -403,7 +376,6 @@ class DedeTemplate
$this->WriteCache();
include $this->cacheFile;
}
-
/**
* 保存运行后的程序为文件
*
@@ -423,9 +395,6 @@ class DedeTemplate
fwrite($fp, $okstr);
fclose($fp);
}
-
- // ------------------------------------------------------------------------
-
/**
* CheckDisabledFunctions
*
@@ -439,14 +408,14 @@ class DedeTemplate
{
global $cfg_disable_funs;
$cfg_disable_funs = isset($cfg_disable_funs) ? $cfg_disable_funs : 'phpinfo,eval,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,file_put_contents,fsockopen,fopen,fwrite';
- // 模板引擎增加disable_functions
+ //模板引擎增加disable_functions
if (!defined('DEDEDISFUN')) {
$tokens = token_get_all_nl($str);
$disabled_functions = explode(',', $cfg_disable_funs);
foreach ($tokens as $token) {
if (is_array($token)) {
if ($token[0] = '306' && in_array($token[1], $disabled_functions)) {
- $errmsg = 'DedeBIZ Error:function disabled "'.$token[1].'" more... ';
+ $errmsg = 'DedeBIZ Error:function disabled "'.$token[1].'" more ';
return FALSE;
}
}
@@ -454,7 +423,6 @@ class DedeTemplate
}
return TRUE;
}
-
/**
* 解析模板并写缓存文件
*
@@ -475,7 +443,6 @@ class DedeTemplate
flock($fp, 3);
$result = trim($this->GetResult());
$errmsg = '';
- //var_dump($result);exit();
if (!$this->CheckDisabledFunctions($result, $errmsg)) {
fclose($fp);
@unlink($this->cacheFile);
@@ -496,60 +463,7 @@ class DedeTemplate
fclose($fp);
}
}
- /*
- if(!file_exists($this->cacheFile) || $this->isCache==FALSE
- || ( file_exists($this->templateFile) && (filemtime($this->templateFile) > filemtime($this->cacheFile)) ) )
- {
- if($ctype!='config')
- {
- if(!$this->isParse)
- {
- $this->ParseTemplate();
- }
- $fp = fopen($this->cacheFile,'w') or dir("Write Cache File Error! ");
- flock($fp,3);
- fwrite($fp,trim($this->GetResult()));
- fclose($fp);
-
- }
- else
- {
- if(count($this->tpCfgs) > 0)
- {
- $fp = fopen($this->configFile,'w') or dir("Write Config File Error! ");
- flock($fp,3);
- fwrite($fp,'<'.'?php'."\r\n");
- foreach($this->tpCfgs as $k=>$v)
- {
- $v = str_replace("\"","\\\"",$v);
- $v = str_replace("\$","\\\$",$v);
- fwrite($fp,"\$this->tpCfgs['$k']=\"$v\";\r\n");
- }
- fwrite($fp,'?'.'>');
- fclose($fp);
- }
- }
- }
- else
- {
- if($ctype=='config' && count($this->tpCfgs) > 0 )
- {
- $fp = fopen($this->configFile,'w') or dir("Write Config File Error! ");
- flock($fp,3);
- fwrite($fp,'<'.'?php'."\r\n");
- foreach($this->tpCfgs as $k=>$v)
- {
- $v = str_replace("\"","\\\"",$v);
- $v = str_replace("\$","\\\$",$v);
- fwrite($fp,"\$this->tpCfgs['$k']=\"$v\";\r\n");
- }
- fwrite($fp,'?'.'>');
- fclose($fp);
- }
- }
- */
}
-
/**
* 获得模板文件名的md5字符串
*
@@ -563,7 +477,6 @@ class DedeTemplate
$encodeStr = substr(md5($tmpfile), 0, 24);
return $encodeStr;
}
-
/**
* 解析模板
*
@@ -591,14 +504,12 @@ class DedeTemplate
}
$cAtt = new TagAttributeParse();
$cAtt->CharToLow = TRUE;
-
//遍历模板字符串,请取标记及其属性信息
$t = 0;
$preTag = '';
$tswLen = strlen($tagStartWord);
for ($i = 0; $i < $sourceLen; $i++) {
$ttagName = '';
-
//如果不进行此判断,将无法识别相连的两个标记
if ($i - 1 >= 0) {
$ss = $i - 1;
@@ -606,14 +517,12 @@ class DedeTemplate
$ss = 0;
}
$tagPos = strpos($this->sourceString, $tagStartWord, $ss);
-
//判断后面是否还有模板标记
if ($tagPos == 0 && ($sourceLen - $i < $tswLen
|| substr($this->sourceString, $i, $tswLen) != $tagStartWord)) {
$tagPos = -1;
break;
}
-
//获取TAG基本信息
for ($j = $tagPos + $startWordLen; $j < $tagPos + $startWordLen + $this->tagMaxLen; $j++) {
if (preg_match("/[ >\/\r\n\t\}\.]/", $this->sourceString[$j])) {
@@ -625,7 +534,6 @@ class DedeTemplate
if ($ttagName != '') {
$i = $tagPos + $startWordLen;
$endPos = -1;
-
//判断 '/}' '{tag:下一标记开始' '{/tag:标记结束' 谁最靠近
$fullTagEndWordThis = $fullTagEndWord.$ttagName.$tagEndWord;
$e1 = strpos($this->sourceString, $sTagEndWord, $i);
@@ -646,7 +554,6 @@ class DedeTemplate
$endPos = $e3;
$elen = $endPos + strlen($fullTagEndWordThis);
}
-
//同时存在 '/}' 和 '{/tag:标记'
else {
//如果 '/}' 比 '{tag:'、'{/tag:标记' 都要靠近,则认为结束标志是 '/}',否则结束标志为 '{/tag:标记'
@@ -658,14 +565,12 @@ class DedeTemplate
$elen = $endPos + strlen($fullTagEndWordThis);
}
}
-
//如果找不到结束标记,则认为这个标记存在错误
if ($endPos == -1) {
- echo "Tpl Character postion $tagPos, '$ttagName' Error \r\n";
+ echo "Tpl Character postion $tagPos, '$ttagName' Error \r\n";
break;
}
$i = $elen;
-
//分析所找到的标记位置等信息
$attStr = '';
$innerText = '';
@@ -683,7 +588,6 @@ class DedeTemplate
}
}
$ttagName = strtolower($ttagName);
-
//if、php标记,把整个属性串视为属性
if (preg_match("/^if[0-9]{0,}$/", $ttagName)) {
$cAtt->cAttributes = new TagAttribute();
@@ -718,13 +622,11 @@ class DedeTemplate
$i = $tagPos + $startWordLen;
break;
}
- } //结束遍历模板字符串
+ }//结束遍历模板字符串
if ($this->count > -1 && $this->isCompiler) {
$this->CompilerAll();
}
}
-
-
/**
* 把模板标记转换为PHP代码
*
@@ -735,7 +637,7 @@ class DedeTemplate
{
$this->loopNum++;
if ($this->loopNum > 10) {
- return; //限制最大递归深度为 10 以防止因标记出错等可能性导致死循环
+ return;//限制最大递归深度为 10 以防止因标记出错等可能性导致死循环
}
$ResultString = '';
$nextTagEnd = 0;
@@ -751,8 +653,6 @@ class DedeTemplate
$this->sourceString = $ResultString;
$this->ParseTemplate();
}
-
-
/**
* 获得最终结果
*
@@ -768,7 +668,6 @@ class DedeTemplate
$addset .= '<'.'?php'."\r\n".'if(!isset($GLOBALS[\'_vars\'])) $GLOBALS[\'_vars\'] = array(); '."\r\n".'$fields = array();'."\r\n".'?'.'>';
return preg_replace("/\?".">[ \r\n\t]{0,}<"."\?php/", "", $addset.$this->sourceString);
}
-
/**
* 编译单个标记
*
@@ -782,7 +681,6 @@ class DedeTemplate
$tagname = $cTag->tagName;
$varname = $cTag->GetAtt('name');
$rsvalue = "";
-
//用于在模板中设置一个变量以提供作扩展用途
//此变量直接提交到 this->tpCfgs 中,并会生成与模板对应的缓存文件 ***_config.php 文件
if ($tagname == 'config') {
@@ -818,7 +716,7 @@ class DedeTemplate
if ($cTag->GetAtt('function') != '') {
$cTag->tagValue = $this->CompilerFunction($cTag->GetAtt('function'), $cTag->tagValue);
}
- // 增加默认空值处理
+ //增加默认空值处理
if ($cTag->GetAtt('default') != '') {
$cTag->tagValue = '<'.'?php echo empty('.$cTag->tagValue.')? \''.addslashes($cTag->GetAtt('default')).'\':'.$cTag->tagValue.'; ?'.'>';
} else {
@@ -849,7 +747,6 @@ class DedeTemplate
$cTag->tagValue = '<'."?php\r\n".trim($cTag->GetInnerText())."\r\n?".'>';
}
}
-
//遍历数组
else if (preg_match("/^array[0-9]{0,}/", $tagname)) {
$kk = '$key';
@@ -872,8 +769,7 @@ class DedeTemplate
$rsvalue .= '<'.'?php } ?'.">\r\n";
$cTag->tagValue = $rsvalue;
}
-
- //include 文件
+ //system文件
else if ($tagname == 'include') {
$filename = $cTag->GetAtt('file');
if ($filename == '') {
@@ -914,7 +810,6 @@ class DedeTemplate
$bindType = $cTag->GetAtt('bindtype');
$rstype = ($cTag->GetAtt('resulttype') == '' ? $cTag->GetAtt('rstype') : $cTag->GetAtt('resulttype'));
$rstype = strtolower($rstype);
-
//生成属性数组
foreach ($cTag->cAtt->items as $k => $v) {
if (preg_match("/(bind|bindtype)/i", $k)) {
@@ -924,7 +819,6 @@ class DedeTemplate
$rsvalue .= '$atts[\''.$k.'\'] = \''.str_replace("'", "\\'", $v)."';\r\n";
}
$rsvalue = '<'.'?php'."\r\n".'$atts = array();'."\r\n".$rsvalue;
-
//绑定到默认函数还是指定函数(datasource属性指定)
if ($bindFunc == '') {
$rsvalue .= '$blockValue = MakePublicTag($atts,$this->refObj,$fields); '."\r\n";
@@ -933,7 +827,6 @@ class DedeTemplate
if ($bindType == '') $rsvalue .= '$blockValue = $this->refObj->'.$bindFunc.'($atts,$this->refObj,$fields); '."\r\n";
else $rsvalue .= '$blockValue = '.$bindFunc.'($atts,$this->refObj,$fields); '."\r\n";
}
-
//返回结果类型:默认为 array 是一个二维数组,string 是字符串
if ($rstype == 'string') {
$rsvalue .= 'echo $blockValue;'."\r\n".'?'.">";
@@ -947,7 +840,6 @@ class DedeTemplate
}
return $cTag->tagValue;
}
-
/**
* 编译可能为数组的变量
*
@@ -959,7 +851,6 @@ class DedeTemplate
function CompilerArrayVar($vartype, $varname)
{
$okvalue = '';
-
if (!preg_match("/\[/", $varname)) {
if (preg_match("/^value/", $vartype)) {
$varname = $vartype.'.'.$varname;
@@ -972,7 +863,6 @@ class DedeTemplate
}
}
}
-
if (preg_match("/\[/", $varname)) {
$varnames = explode('[', $varname);
$arrend = '';
@@ -1006,7 +896,6 @@ class DedeTemplate
}
return $okvalue;
}
-
/**
* 编译if标记
*
@@ -1031,7 +920,6 @@ class DedeTemplate
$rsvalue .= '<'.'?php } ?'.'>';
return $rsvalue;
}
-
/**
* 处理block区块传递的atts属性的值
*
@@ -1045,7 +933,6 @@ class DedeTemplate
$v = str_replace('?'.'>', '?>', $v);
return $v;
}
-
/**
* 函数 function 语法处理
*
@@ -1060,9 +947,8 @@ class DedeTemplate
$funcstr = str_replace('@me', $nvalue, $funcstr);
return $funcstr;
}
-
/**
- * 引入文件 include 语法处理
+ * 引入文件system语法处理
*
* @access public
* @param string $filename 文件名
@@ -1088,7 +974,6 @@ class DedeTemplate
return $itpl->CacheFile();
}
}
-
/**
* class TagAttribute Tag属性集合
* function C__TagAttribute();
@@ -1102,7 +987,6 @@ class TagAttribute
{
var $count = -1;
var $items = array(); //属性元素的集合
-
/**
* 获得某个属性
*
@@ -1121,7 +1005,6 @@ class TagAttribute
return "";
}
}
-
/**
* 同上
*
@@ -1133,7 +1016,6 @@ class TagAttribute
{
return $this->GetAtt($str);
}
-
/**
* 判断属性是否存在
*
@@ -1146,7 +1028,6 @@ class TagAttribute
if (isset($this->items[$str])) return TRUE;
else return FALSE;
}
-
/**
* 获得标记名称
*
@@ -1157,7 +1038,6 @@ class TagAttribute
{
return $this->GetAtt("tagname");
}
-
/**
* 获得属性个数
*
@@ -1168,8 +1048,7 @@ class TagAttribute
{
return $this->count + 1;
}
-} //End Class
-
+}//End Class
/**
* 属性解析器
* function C__TagAttributeParse();
@@ -1194,7 +1073,6 @@ class TagAttributeParse
$this->ParseAttribute();
}
}
-
/**
* 解析属性
*
@@ -1211,8 +1089,7 @@ class TagAttributeParse
$hasAttribute = FALSE;
$strLen = strlen($this->sourceString);
$this->cAttributes->items = array();
-
- // 获得Tag的名称,解析到 cAtt->GetAtt('tagname') 中
+ //获得Tag的名称,解析到 cAtt->GetAtt('tagname') 中
for ($i = 0; $i < $strLen; $i++) {
if ($this->sourceString[$i] == ' ') {
$this->cAttributes->count++;
@@ -1234,7 +1111,6 @@ class TagAttributeParse
$tmpvalue .= $this->sourceString[$i];
}
}
-
//不存在属性列表的情况
if (!$hasAttribute) {
$this->cAttributes->count++;
@@ -1252,7 +1128,6 @@ class TagAttributeParse
return;
}
$tmpvalue = '';
-
//如果字符串含有属性值,遍历源字符串,并获得各属性
for ($i; $i < $strLen; $i++) {
$d = $this->sourceString[$i];
@@ -1269,7 +1144,6 @@ class TagAttributeParse
$startdd = 0;
}
}
-
//查找属性的限定标志
else if ($startdd == 0) {
switch ($d) {
@@ -1301,17 +1175,13 @@ class TagAttributeParse
}
}
} //for
-
//最后一个属性的给值
if ($tmpatt != '') {
$this->cAttributes->count++;
$this->cAttributes->items[$tmpatt] = trim($tmpvalue);
} //print_r($this->cAttributes->items);
-
- } // end func
-
+ } //end func
} //End Class
-
/**
* 私有标签编译,主要用于if标签内的字符串解析
*
@@ -1326,7 +1196,6 @@ function private_rt($str)
} else {
$arr = explode('.', $str);
}
-
$rs = '$GLOBALS[\'';
if ($arr[0] == 'cfg') {
return $rs.'cfg_'.$arr[1]."']";
@@ -1348,4 +1217,4 @@ function private_rt($str)
$rs .= "']";
return $rs;
}
-}
+}
\ No newline at end of file
diff --git a/src/include/dedevote.class.php b/src/system/dedevote.class.php
similarity index 96%
rename from src/include/dedevote.class.php
rename to src/system/dedevote.class.php
index 7d742ed0..ebcae84a 100755
--- a/src/include/dedevote.class.php
+++ b/src/system/dedevote.class.php
@@ -1,4 +1,5 @@
-__construct($aid);
}
-
function Close()
{
}
-
/**
* 获得投票项目总投票次数
*
@@ -72,7 +69,6 @@ class DedeVote
return 0;
}
}
-
/**
* 增加指定的投票节点的票数
*
@@ -86,7 +82,6 @@ class DedeVote
$this->VoteNotes[$aid]['count']++;
}
}
-
/**
* 获得项目的投票表单
*
@@ -127,7 +122,6 @@ class DedeVote
$items .= " \r\n";
$items .= "".$this->VoteInfos['votename']." \r\n";
if ($this->VoteCount > 0) {
-
foreach ($this->VoteNotes as $k => $arr) {
if ($this->VoteInfos['ismore'] == 0) {
$items .= " ".$arr['name']." \r\n";
@@ -143,7 +137,6 @@ class DedeVote
$items .= "\r\n
\r\n";
return $items;
}
-
/**
* 保存投票数据
* 请不要在输出任何内容之前使用SaveVote()方法!
@@ -159,7 +152,6 @@ class DedeVote
return '您没选中任何项目';
}
$items = '';
-
//检查投票是否已过期
$nowtime = time();
if ($nowtime > $this->VoteInfos['endtime']) {
@@ -171,7 +163,6 @@ class DedeVote
ShowMsg('投票还没有开始', $ENV_GOBACK_URL);
exit();
}
-
//检测游客是否已投过票
if (isset($_COOKIE['VOTE_MEMBER_IP'])) {
if ($_COOKIE['VOTE_MEMBER_IP'] == $_SERVER['REMOTE_ADDR']) {
@@ -183,7 +174,6 @@ class DedeVote
} else {
setcookie('VOTE_MEMBER_IP', $_SERVER['REMOTE_ADDR'], time() * $row['spec'] * 3600, '/');
}
-
//检查用户是否已投过票
$nowtime = time();
$VoteMem = $this->dsql->GetOne("SELECT * FROM #@__vote_member WHERE voteid = '$this->VoteID' and userid='$memberID'");
@@ -233,7 +223,6 @@ class DedeVote
$this->dsql->ExecuteNoneQuery("UPDATE `#@__vote` SET totalcount='".($this->VoteInfos['totalcount'] + 1)."',votenote='".addslashes($items)."' WHERE aid='".$this->VoteID."'");
return "投票成功";
}
-
/**
* 获得项目的投票结果
*
diff --git a/src/include/diyform.cls.php b/src/system/diyform.class.php
similarity index 90%
rename from src/include/diyform.cls.php
rename to src/system/diyform.class.php
index 657e13f9..81c5201f 100755
--- a/src/include/diyform.cls.php
+++ b/src/system/diyform.class.php
@@ -1,17 +1,16 @@
-__construct($diyid);
@@ -46,13 +44,13 @@ class diyform
{
$this->diyid = $diyid;
$this->db = $GLOBALS['dsql'];
- $query = "SELECT * FROM #@__diyforms WHERE diyid='{$diyid}'";
+ $query = "SELECT * FROM `#@__diyforms` WHERE diyid='{$diyid}'";
$diyinfo = $this->db->GetOne($query);
if (!is_array($diyinfo)) {
showMsg('参数不正确,该自定义表单不存在', 'javascript:;');
exit();
}
- $this->info = $diyinfo['info'];
+ $this->info = stripslashes($diyinfo['info']);
$this->name = $diyinfo['name'];
$this->table = $diyinfo['table'];
$this->public = $diyinfo['public'];
@@ -60,7 +58,6 @@ class diyform
$this->viewTemplate = $diyinfo['viewtemplate'] != '' && file_exists(DEDETEMPLATE.'/plus/'.$diyinfo['viewtemplate']) ? $diyinfo['viewtemplate'] : 'view_diyform.htm';;
$this->postTemplate = $diyinfo['posttemplate'] != '' && file_exists(DEDETEMPLATE.'/plus/'.$diyinfo['posttemplate']) ? $diyinfo['posttemplate'] : 'post_diyform.htm';;
}
-
/**
* 获取表单
*
@@ -91,12 +88,10 @@ class diyform
}
}
}
-
$formstring .= " \n";
$formstring .= " ";
return $formstring;
}
-
/**
* 获取字段列表
*
diff --git a/src/include/downmix.inc.php b/src/system/downmix.inc.php
similarity index 58%
rename from src/include/downmix.inc.php
rename to src/system/downmix.inc.php
index 8924b88b..dc6ed103 100755
--- a/src/include/downmix.inc.php
+++ b/src/system/downmix.inc.php
@@ -1,4 +1,5 @@
-";
return $forms;
}
-
/**
* 获取一级数据
*
@@ -125,8 +122,6 @@ function getTopData($egroup)
}
return $data;
}
-
-
/**
* 获取数据的JS代码(二级联动)
*
@@ -141,7 +136,7 @@ function GetEnumsJs($egroup)
$jsCode = "";
return $jsCode;
}
-
/**
* 写入联动JS代码
*
@@ -167,8 +161,6 @@ function WriteEnumsJs($egroup)
fwrite($fp, GetEnumsJs($egroup));
fclose($fp);
}
-
-
/**
* 获取枚举的值
*
@@ -185,4 +177,4 @@ function GetEnumsValue($egroup, $evalue = 0)
} else {
return "保密";
}
-}
+}
\ No newline at end of file
diff --git a/src/system/extend.func.php b/src/system/extend.func.php
new file mode 100755
index 00000000..e50ed4e6
--- /dev/null
+++ b/src/system/extend.func.php
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/src/include/filter.inc.php b/src/system/filter.inc.php
similarity index 91%
rename from src/include/filter.inc.php
rename to src/system/filter.inc.php
index d05077e1..b83513b3 100755
--- a/src/include/filter.inc.php
+++ b/src/system/filter.inc.php
@@ -1,4 +1,5 @@
- $value) {
$svar[$key] = addslashes($svar[$key]);
@@ -46,10 +46,9 @@ function _FilterAll($fk, &$svar)
}
return $svar;
}
-
/* 对_GET,_POST,_COOKIE进行过滤 */
foreach (array('_GET', '_POST', '_COOKIE') as $_request) {
foreach ($$_request as $_k => $_v) {
${$_k} = _FilterAll($_k, $_v);
}
-}
+}
\ No newline at end of file
diff --git a/src/include/helpers/archive.helper.php b/src/system/helpers/archive.helper.php
similarity index 89%
rename from src/include/helpers/archive.helper.php
rename to src/system/helpers/archive.helper.php
index 9b21eac6..ac968730 100755
--- a/src/include/helpers/archive.helper.php
+++ b/src/system/helpers/archive.helper.php
@@ -1,4 +1,5 @@
-GetOne("SELECT arc.*,ch.maintable,ch.addtable,ch.issystem FROM `#@__arctiny` arc LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel WHERE arc.id='$aid' ");
-
if (!is_array($chRow)) {
return $reArr;
} else {
if (empty($chRow['maintable'])) $chRow['maintable'] = '#@__archives';
}
-
if ($chRow['issystem'] != -1) {
$nquery = " SELECT arc.*,tp.typedir,tp.topid,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath
- FROM `{$chRow['maintable']}` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid
- WHERE arc.id='$aid' ";
+ FROM `{$chRow['maintable']}` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid
+ WHERE arc.id='$aid' ";
} else {
$nquery = " SELECT arc.*,1 AS ismake,0 AS money,'' AS filename,tp.typedir,tp.topid,tp.namerule,tp.moresite,tp.siteurl,tp.sitepath
- FROM `{$chRow['addtable']}` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid
- WHERE arc.aid='$aid' ";
+ FROM `{$chRow['addtable']}` arc LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid
+ WHERE arc.aid='$aid' ";
}
-
$arcRow = $dsql->GetOne($nquery);
-
if (!is_array($arcRow)) {
return $reArr;
}
-
if (!isset($arcRow['description'])) {
$arcRow['description'] = '';
}
-
if (empty($arcRow['description']) && isset($arcRow['body'])) {
$arcRow['description'] = cn_substr(html2text($arcRow['body']), 250);
}
-
if (!isset($arcRow['pubdate'])) {
$arcRow['pubdate'] = $arcRow['senddate'];
}
-
if (!isset($arcRow['notpost'])) {
$arcRow['notpost'] = 0;
}
-
$reArr = $arcRow;
$reArr['aid'] = $aid;
$reArr['topid'] = $arcRow['topid'];
@@ -85,8 +75,6 @@ if (!function_exists('GetOneArchive')) {
return $reArr;
}
}
-
-
/**
* 获取模型的表信息
*
@@ -109,7 +97,6 @@ if (!function_exists('GetChannelTable')) {
return $row;
}
}
-
/**
* 获得某文档的所有tag
*
@@ -129,7 +116,6 @@ if (!function_exists('GetTags')) {
return $tags;
}
}
-
/**
* 获取一个微表的索引键
*
@@ -152,15 +138,13 @@ if (!function_exists('GetIndexKey')) {
$typeid2 = intval($typeid2);
$senddate = intval($senddate);
$iquery = "
- INSERT INTO `#@__arctiny` (`arcrank`,`typeid`,`typeid2`,`channel`,`senddate`, `sortrank`, `mid`)
- VALUES ('$arcrank','$typeid','$typeid2' , '$channelid','$senddate', '$sortrank', '$mid') ";
+ INSERT INTO `#@__arctiny` (`arcrank`,`typeid`,`typeid2`,`channel`,`senddate`, `sortrank`, `mid`)
+ VALUES ('$arcrank','$typeid','$typeid2' , '$channelid','$senddate', '$sortrank', '$mid') ";
$dsql->ExecuteNoneQuery($iquery);
$aid = $dsql->GetLastID();
return $aid;
}
}
-
-
/**
* 更新微表key及Tag
*
@@ -180,10 +164,7 @@ if (!function_exists('UpIndexKey')) {
$addtime = time();
$query = " UPDATE `#@__arctiny` SET `arcrank`='$arcrank', `typeid`='$typeid', `typeid2`='$typeid2', `sortrank`='$sortrank' WHERE id = '$id' ";
$dsql->ExecuteNoneQuery($query);
-
- /*
- * 处理修改后的Tag
- */
+ //处理修改后的Tag
if ($tags != '') {
$oldtag = GetTags($id);
$oldtags = explode(',', $oldtag);
@@ -208,8 +189,6 @@ if (!function_exists('UpIndexKey')) {
}
}
}
-
-
/**
* 插入Tags
*
@@ -231,8 +210,6 @@ if (!function_exists('InsertTags')) {
}
}
}
-
-
/**
* 插入一个tag
*
@@ -269,4 +246,4 @@ if (!function_exists('InsertOneTag')) {
$dsql->ExecuteNoneQuery("INSERT INTO `#@__taglist`(`tid`,`aid`,`arcrank`,`typeid` , `tag`) VALUES('$tid','$aid','$arcrank','$typeid' , '$tag'); ");
}
}
-}
+}
\ No newline at end of file
diff --git a/src/include/helpers/cache.helper.php b/src/system/helpers/cache.helper.php
similarity index 94%
rename from src/include/helpers/cache.helper.php
rename to src/system/helpers/cache.helper.php
index d6fbf4e8..1fbf7052 100755
--- a/src/include/helpers/cache.helper.php
+++ b/src/system/helpers/cache.helper.php
@@ -1,4 +1,5 @@
-= 0; $i--) {
if ($articlename[$i] == '/') {
@@ -127,9 +120,6 @@ if (!function_exists('GetFileNewName')) {
return $articlename;
}
}
-
-
-
/**
* 获得文件相对于主站点根目录的物理文件名(动态网址返回url)
*
@@ -190,8 +180,6 @@ if (!function_exists('GetFileName')) {
}
}
}
-
-
/**
* 获得指定类目的URL链接
* 对于使用封面文件和单独页面的情况,强制使用默认页名称
@@ -230,11 +218,9 @@ if (!function_exists('GetTypeUrl')) {
else $reurl = $typedir.'/';
}
}
-
if (!preg_match("/^http:\/\//", $reurl)) {
$reurl = preg_replace("/\/{1,}/i", '/', $reurl);
}
-
if ($GLOBALS['cfg_multi_site'] == 'Y') {
if ($siteurl == '') {
$siteurl = $GLOBALS['cfg_basehost'];
@@ -249,7 +235,6 @@ if (!function_exists('GetTypeUrl')) {
return $reurl;
}
}
-
/**
* 魔法变量,用于获取两个可变的值
*
@@ -263,7 +248,6 @@ if (!function_exists('MagicVar')) {
return $GLOBALS['autoindex'] % 2 == 0 ? $v1 : $v2;
}
}
-
/**
* 获取某个类目的所有上级栏目id
*
@@ -277,9 +261,6 @@ if (!function_exists('GetTopids')) {
return join(',', $arr);
}
}
-
-
-
/**
* 获取上级ID列表
*
@@ -302,8 +283,6 @@ if (!function_exists('GetParentIds')) {
}
}
}
-
-
/**
* 检测栏目是否是另一个栏目的父目录
*
@@ -319,8 +298,6 @@ if (!function_exists('IsParent')) {
return in_array($pid, $pTypeArrays);
}
}
-
-
/**
* 获取一个类目的顶级类目id
*
@@ -341,8 +318,6 @@ if (!function_exists('GetTopid')) {
}
}
}
-
-
/**
* 获得某id的所有下级id
*
@@ -363,7 +338,6 @@ function GetSonIds($id, $channel = 0, $addthis = true)
$rquery = preg_replace("/,$/", '', $rquery);
return $rquery;
}
-
//递归逻辑
function GetSonIdsLogic($id, $sArr, $channel = 0, $addthis = false)
{
@@ -378,7 +352,6 @@ function GetSonIdsLogic($id, $sArr, $channel = 0, $addthis = false)
}
}
}
-
/**
* 栏目目录规则
*
@@ -392,7 +365,6 @@ function MfTypedir($typedir)
$typedir = preg_replace("/\/{1,}/", "/", $typedir);
return $typedir;
}
-
/**
* 模板目录规则
*
@@ -405,7 +377,6 @@ function MfTemplet($tmpdir)
$tmpdir = preg_replace("/\/{1,}/", "/", $tmpdir);
return $tmpdir;
}
-
/**
* 清除用于js的空白块
*
@@ -416,7 +387,6 @@ function FormatScript($atme)
{
return $atme == ' ' ? '' : $atme;
}
-
/**
* 给属性默认值
*
@@ -434,7 +404,6 @@ function FillAttsDefault(&$atts, $attlist)
}
}
}
-
/**
* 给块标记赋值
*
@@ -458,7 +427,6 @@ function MakeOneTag(&$dtp, &$refObj, $parfield = 'Y')
}
}
$dh->Close();
-
//遍历tag元素
if (!is_array($dtp->CTags)) {
return '';
@@ -478,7 +446,6 @@ function MakeOneTag(&$dtp, &$refObj, $parfield = 'Y')
}
continue;
}
-
//由于考虑兼容性,原来文章调用使用的标记别名统一保留,这些标记实际调用的解析文件为inc_arclist.php
if (preg_match("/^(artlist|likeart|hotart|imglist|imginfolist|coolart|specart|autolist)$/", $tagname)) {
$tagname = 'arclist';
@@ -488,7 +455,7 @@ function MakeOneTag(&$dtp, &$refObj, $parfield = 'Y')
}
if (in_array($tagname, $alltags)) {
if (in_array($tagname, $disable_tags)) {
- if (DEBUG_LEVEL) echo 'DedeBIZ Error:Tag disabled:"'.$tagname.'" more... !';
+ if (DEBUG_LEVEL) echo 'DedeBIZ Error:Tag disabled:"'.$tagname.'" more !';
continue;
}
if (DEBUG_LEVEL == TRUE) {
@@ -510,7 +477,6 @@ function MakeOneTag(&$dtp, &$refObj, $parfield = 'Y')
}
}
}
-
/**
* 获取某栏目的url
*
@@ -531,7 +497,6 @@ function GetOneTypeUrlA($typeinfos)
$typeinfos['sitepath']
);
}
-
/**
* 设置全局环境变量
*
@@ -558,7 +523,6 @@ function SetSysEnv($typeid = 0, $typename = '', $aid = 0, $title = '', $curfile
$_sys_globals['aid'] = $aid;
}
}
-
/**
* 获得图书的URL
*
@@ -570,11 +534,9 @@ function SetSysEnv($typeid = 0, $typename = '', $aid = 0, $title = '', $curfile
function GetBookUrl($bid, $title, $gdir = 0)
{
global $cfg_cmspath;
- $bookurl = $gdir == 1 ?
- "{$cfg_cmspath}/book/".DedeID2Dir($bid) : "{$cfg_cmspath}/book/".DedeID2Dir($bid).'/'.GetPinyin($title).'-'.$bid.'.html';
+ $bookurl = $gdir == 1 ? "{$cfg_cmspath}/book/".DedeID2Dir($bid) : "{$cfg_cmspath}/book/".DedeID2Dir($bid).'/'.GetPinyin($title).'-'.$bid.'.html';
return $bookurl;
}
-
/**
* 根据ID生成目录
*
@@ -586,7 +548,6 @@ function DedeID2Dir($aid)
$n = ceil($aid / 1000);
return $n;
}
-
/**
* 获得自由列表的网址
*
@@ -616,9 +577,8 @@ function GetFreeListUrl($lid, $namerule, $listdir, $defaultpage, $nodefault)
}
return $okfile;
}
-
/**
- * 获取网站搜索的热门关键字
+ * 获取网站搜索的热门关键词
*
* @param object $dsql
* @param string $num 获取数目
@@ -656,7 +616,6 @@ function GetHotKeywords(&$dsql, $num = 8, $nday = 365, $klen = 16, $orderby = 'c
}
return $hotword;
}
-
/**
* 使用绝对网址
*
@@ -667,7 +626,6 @@ function Gmapurl($gurl)
{
return preg_match("/http[s]?:\/\//i", $gurl) ? $gurl : $GLOBALS['cfg_basehost'].$gurl;
}
-
/**
* 引用回复标记处理
*
@@ -687,7 +645,6 @@ function Quote_replace($quote)
$quote = str_replace('{/quote}', '', $quote);
return $quote;
}
-
/**
* 获取、写入指定cacheid的块
*
@@ -709,7 +666,6 @@ function GetCacheBlock($cacheid)
fclose($fp);
return $str;
}
-
/**
* 写入缓存块
*
@@ -723,4 +679,4 @@ function WriteCacheBlock($cacheid, $str)
$fp = fopen($cachefile, 'w');
$str = fwrite($fp, $str);
fclose($fp);
-}
+}
\ No newline at end of file
diff --git a/src/include/helpers/charset.helper.php b/src/system/helpers/charset.helper.php
similarity index 96%
rename from src/include/helpers/charset.helper.php
rename to src/system/helpers/charset.helper.php
index d1abb318..76ceb1bb 100755
--- a/src/include/helpers/charset.helper.php
+++ b/src/system/helpers/charset.helper.php
@@ -1,4 +1,5 @@
- $rndstyleValue \r\n";
-
//附机标记
$rndem[1] = 'font';
$rndem[2] = 'div';
$rndem[3] = 'span';
$rndem[4] = 'p';
-
//读取字符串数据
- $fp = fopen(DEDEDATA.'/downmix.data.php', 'r');
+ $fp = fopen(DEDEDATA.'/downmix.data.inc', 'r');
$start = 0;
$totalitem = 0;
-
while (!feof($fp)) {
$v = trim(fgets($fp, 128));
if ($start == 1) {
@@ -71,7 +64,6 @@ if (!function_exists('RndString')) {
}
}
fclose($fp);
-
//处理要防采集的字段
$bodylen = strlen($body) - 1;
$prepos = 0;
@@ -88,7 +80,7 @@ if (!function_exists('RndString')) {
if ($emname != 'font') {
$rnstr = " <$emname class='$rndstyleName'>$rnstr$emname> ";
} else {
- $rnstr = " $rnstr ";
+ $rnstr = " $rnstr ";
}
$reString .= $rnstr.$body[$i];
$prepos = $i;
@@ -99,4 +91,4 @@ if (!function_exists('RndString')) {
}
return $reString;
} //函数结束
-}
+}
\ No newline at end of file
diff --git a/src/include/helpers/extend.helper.php b/src/system/helpers/extend.helper.php
similarity index 92%
rename from src/include/helpers/extend.helper.php
rename to src/system/helpers/extend.helper.php
index e5fd8547..f3892165 100755
--- a/src/include/helpers/extend.helper.php
+++ b/src/system/helpers/extend.helper.php
@@ -1,4 +1,5 @@
-watermark(0);
}
}
-
/**
* 会对空白地方填充满
*
@@ -225,20 +217,15 @@ if (!function_exists('ImageResizeNew')) {
$img = imagecreatefromwbmp($srcFile);
break;
}
-
$width = imageSX($img);
$height = imageSY($img);
-
if (!$width || !$height) {
return FALSE;
}
-
$target_width = $toW;
$target_height = $toH;
$target_ratio = $target_width / $target_height;
-
$img_ratio = $width / $height;
-
if ($target_ratio > $img_ratio) {
$new_height = $target_height;
$new_width = $img_ratio * $target_height;
@@ -246,27 +233,21 @@ if (!function_exists('ImageResizeNew')) {
$new_height = $target_width / $img_ratio;
$new_width = $target_width;
}
-
if ($new_height > $target_height) {
$new_height = $target_height;
}
if ($new_width > $target_width) {
$new_height = $target_width;
}
-
$new_img = ImageCreateTrueColor($target_width, $target_height);
-
if ($cfg_ddimg_bgcolor == 0) $bgcolor = ImageColorAllocate($new_img, 0xff, 0xff, 0xff);
else $bgcolor = 0;
-
if (!@imagefilledrectangle($new_img, 0, 0, $target_width - 1, $target_height - 1, $bgcolor)) {
return FALSE;
}
-
if (!@imagecopyresampled($new_img, $img, ($target_width - $new_width) / 2, ($target_height - $new_height) / 2, 0, 0, $new_width, $new_height, $width, $height)) {
return FALSE;
}
-
//保存为目标文件
if ($issave) {
switch ($srcInfo[2]) {
@@ -309,4 +290,4 @@ if (!function_exists('ImageResizeNew')) {
imagedestroy($img);
return TRUE;
}
-}
+}
\ No newline at end of file
diff --git a/src/include/helpers/string.helper.php b/src/system/helpers/string.helper.php
similarity index 95%
rename from src/include/helpers/string.helper.php
rename to src/system/helpers/string.helper.php
index a85e67b1..2d038689 100755
--- a/src/include/helpers/string.helper.php
+++ b/src/system/helpers/string.helper.php
@@ -1,4 +1,5 @@
- $startdd) {
$restr .= $c;
}
-
if (ord($str[$i]) > 0x80) {
if ($str_len > $i + 1) {
$c = $str[$i].$str[$i + 1];
@@ -70,7 +68,6 @@ if (!function_exists('cn_substr')) {
} else {
$c = $str[$i];
}
-
if ($i >= $enddd) {
if (strlen($restr) + strlen($c) > $slen) {
break;
@@ -83,7 +80,6 @@ if (!function_exists('cn_substr')) {
return $restr;
}
}
-
/**
* utf-8中文截取,单字节截取模式
*
@@ -102,7 +98,6 @@ if (!function_exists('cn_substr_utf8')) {
preg_match_all("/./su", $str, $ar);
$str = '';
$tstr = '';
-
//为了兼容mysql4.1以下版本,与数据库varchar一致,这里使用按字节截取
for ($i = 0; isset($ar[0][$i]); $i++) {
if (strlen($tstr) < $start) {
@@ -118,7 +113,6 @@ if (!function_exists('cn_substr_utf8')) {
return $str;
}
}
-
/**
* HTML转换为文本
*
@@ -140,8 +134,6 @@ if (!function_exists('Html2Text')) {
}
}
}
-
-
/**
* 文本转HTML
*
@@ -154,11 +146,10 @@ if (!function_exists('Text2Html')) {
$txt = str_replace(" ", " ", $txt);
$txt = str_replace("<", "<", $txt);
$txt = str_replace(">", ">", $txt);
- $txt = preg_replace("/[\r\n]{1,}/isU", " \r\n", $txt);
+ $txt = preg_replace("/[\r\n]{1,}/isU", " \r\n", $txt);
return $txt;
}
}
-
/**
* 获取半角字符
*
@@ -179,7 +170,6 @@ if (!function_exists('GetAlabNum')) {
return $fnum;
}
}
-
/**
* 获取拼音以gbk编码为准
*
@@ -212,23 +202,18 @@ if (!function_exists('GetPinyin')) {
* @param long $options 替换的字符集
* @return string
*/
-
if (!function_exists('htmlspecialchars_decode')) {
function htmlspecialchars_decode($str, $options = ENT_COMPAT)
{
$trans = get_html_translation_table(HTML_SPECIALCHARS, $options);
-
$decode = array();
foreach ($trans as $char => $entity) {
$decode[$entity] = $char;
}
-
$str = strtr($str, $decode);
-
return $str;
}
}
-
if (!function_exists('ubb')) {
function ubb($Text)
{
@@ -237,7 +222,7 @@ if (!function_exists('ubb')) {
//$Text=ereg_replace("\n"," ",$Text);
$Text = preg_replace("/\\t/is", " ", $Text);
$Text = preg_replace("/\[hr\]/is", " ", $Text);
- $Text = preg_replace("/\[separator\]/is", " ", $Text);
+ $Text = preg_replace("/\[separator\]/is", " ", $Text);
$Text = preg_replace("/\[h1\](.+?)\[\/h1\]/is", "\\1 ", $Text);
$Text = preg_replace("/\[h2\](.+?)\[\/h2\]/is", "\\1 ", $Text);
$Text = preg_replace("/\[h3\](.+?)\[\/h3\]/is", "\\1 ", $Text);
@@ -271,7 +256,6 @@ if (!function_exists('ubb')) {
return $Text;
}
}
-
if (!function_exists('color_txt')) {
function color_txt($str)
{
@@ -286,10 +270,9 @@ if (!function_exists('color_txt')) {
return $colorTxt;
}
}
-
if (!function_exists('rand_color')) {
function rand_color()
{
return '#'.sprintf("%02X", mt_rand(0, 255)).sprintf("%02X", mt_rand(0, 255)).sprintf("%02X", mt_rand(0, 255));
}
-}
+}
\ No newline at end of file
diff --git a/src/include/helpers/test.helper.php b/src/system/helpers/test.helper.php
similarity index 79%
rename from src/include/helpers/test.helper.php
rename to src/system/helpers/test.helper.php
index 01451719..ac3a6e1c 100755
--- a/src/include/helpers/test.helper.php
+++ b/src/system/helpers/test.helper.php
@@ -1,4 +1,5 @@
- $GLOBALS['cfg_mb_upload_size'] * 1024) {
@unlink($cfg_basedir.$filename);
ShowMsg('您上传的文件超出系统大小限制', '-1');
exit();
}
-
//加水印或缩小图片
if ($utype == 'image') {
include_once(DEDEINC.'/image.func.php');
@@ -187,11 +190,11 @@ if (!function_exists('MemberUploads')) {
} else if (!preg_match("/\.(".$allAllowType.")$/", $handname)) {
exit('Not allow filename for filetype!');
}
- // 2011-4-10 修复会员中心修改相册时候错误(by:jason123j)
+ //2011-4-10 修复会员中心修改相册时候错误(by:jason123j)
else if (!preg_match('#^http:#', $handname) && !preg_match('#^'.$cfg_user_dir.'/'.$userid."#", $handname) && !$isadmin) {
exit('Not allow filename for not userdir!');
}
return $handname;
}
}
-}
+}
\ No newline at end of file
diff --git a/src/include/helpers/util.helper.php b/src/system/helpers/util.helper.php
similarity index 89%
rename from src/include/helpers/util.helper.php
rename to src/system/helpers/util.helper.php
index 42805e22..c3d752e5 100755
--- a/src/include/helpers/util.helper.php
+++ b/src/system/helpers/util.helper.php
@@ -1,4 +1,5 @@
- $val) {
if (!is_NULL($val)) {
@@ -279,14 +264,13 @@ if (!function_exists('json_encode')) {
}
}
}
- if (strlen($json) > 1) { // 加上判断 防止空数组
+ if (strlen($json) > 1) { //加上判断 防止空数组
$json = substr($json, 0, -1);
}
$json .= $assoc ? '}' : ']';
return $json;
}
}
-
/**
* json_decode兼容函数
*
@@ -298,15 +282,15 @@ if (!function_exists('json_encode')) {
if (!function_exists('json_decode')) {
function json_decode($json, $assoc = FALSE)
{
- // 目前不支持二维数组或对象
+ //目前不支持二维数组或对象
$begin = substr($json, 0, 1);
if (!in_array($begin, array('{', '[')))
- // 不是对象或者数组直接返回
+ //不是对象或者数组直接返回
return $json;
$parse = substr($json, 1, -1);
$data = explode(',', $parse);
if ($flag = $begin == '{') {
- // 转换成PHP对象
+ //转换成PHP对象
$result = new stdClass();
foreach ($data as $val) {
$item = explode(':', $val);
@@ -316,11 +300,11 @@ if (!function_exists('json_decode')) {
if ($assoc)
$result = get_object_vars($result);
} else {
- // 转换成PHP数组
+ //转换成PHP数组
$result = array();
foreach ($data as $val)
$result[] = json_decode($val, $assoc);
}
return $result;
}
-}
+}
\ No newline at end of file
diff --git a/src/include/helpers/validate.helper.php b/src/system/helpers/validate.helper.php
similarity index 88%
rename from src/include/helpers/validate.helper.php
rename to src/system/helpers/validate.helper.php
index e9053b56..817b63f1 100755
--- a/src/include/helpers/validate.helper.php
+++ b/src/system/helpers/validate.helper.php
@@ -1,4 +1,5 @@
-__construct($targetfile, $cfg_thumb, $cfg_watermarktext, $photo_waterpos, $photo_diaphaneity, $photo_wheight, $photo_wwidth, $cfg_watermarktype, $photo_marktrans, $trueMarkimg, $attach);
}
-
- // 析构函数
+ //析构函数
function __construct($targetfile, $cfg_thumb, $cfg_watermarktext, $photo_waterpos, $photo_diaphaneity, $photo_wheight, $photo_wwidth, $cfg_watermarktype, $photo_marktrans, $trueMarkimg, $attach = array())
{
$this->thumbstatus = $cfg_thumb;
@@ -42,8 +41,6 @@ class image
$this->targetfile = $targetfile;
$this->attachinfo = @getimagesize($targetfile);
$this->attach = $attach;
-
-
switch ($this->attachinfo['mime']) {
case 'image/jpeg':
$this->imagecreatefromfunc = function_exists('imagecreatefromjpeg') ? 'imagecreatefromjpeg' : '';
@@ -57,8 +54,7 @@ class image
$this->imagecreatefromfunc = function_exists('imagecreatefrompng') ? 'imagecreatefrompng' : '';
$this->imagefunc = function_exists('imagepng') ? 'imagepng' : '';
break;
- } //为空则匹配类型的函数不存在
-
+ }//为空则匹配类型的函数不存在
$this->attach['size'] = empty($this->attach['size']) ? @filesize($targetfile) : $this->attach['size'];
if ($this->attachinfo['mime'] == 'image/gif') {
$fp = fopen($targetfile, 'rb');
@@ -67,7 +63,6 @@ class image
$this->animatedgif = strpos($targetfilecontent, 'NETSCAPE2.0') === false ? 0 : 1;
}
}
-
/**
* 生成缩略图
*
@@ -80,13 +75,11 @@ class image
function thumb($thumbwidth, $thumbheight, $preview = 0)
{
$this->thumb_gd($thumbwidth, $thumbheight, $preview);
-
if ($this->thumbstatus == 2 && $this->watermarkstatus) {
$this->image($this->targetfile, $this->attach);
$this->attach['size'] = filesize($this->targetfile);
}
}
-
/**
* 图片水印
*
@@ -101,7 +94,6 @@ class image
}
$this->watermark_gd($preview);
}
-
/**
* 使用gd生成缩略图
*
@@ -113,7 +105,6 @@ class image
*/
function thumb_gd($thumbwidth, $thumbheight, $preview = 0)
{
-
if ($this->thumbstatus && function_exists('imagecreatetruecolor') && function_exists('imagecopyresampled') && function_exists('imagejpeg')) {
$imagecreatefromfunc = $this->imagecreatefromfunc;
$imagefunc = $this->thumbstatus == 1 ? 'imagejpeg' : $this->imagefunc;
@@ -141,7 +132,6 @@ class image
}
}
}
-
/**
* 使用gd进行水印
*
@@ -175,7 +165,6 @@ class image
if (($this->watermarktype < 2 && is_readable($watermark_file) || $this->watermarktype == 2) && $wmwidth > 10 && $wmheight > 10 && !$this->animatedgif) {
switch ($this->watermarkstatus) {
case 1:
-
$x = +5;
$y = +5;
break;
diff --git a/src/include/image.func.php b/src/system/image.func.php
similarity index 90%
rename from src/include/image.func.php
rename to src/system/image.func.php
index 9010290a..23e898c0 100755
--- a/src/include/image.func.php
+++ b/src/system/image.func.php
@@ -1,4 +1,5 @@
-";
+ $out = "\n";
-
return $out;
}
-
/**
* 获取编辑器
*
@@ -173,45 +167,20 @@ function SpGetEditor($fname, $fvalue, $nheight = "350", $etype = "Basic", $gtype
} else if ($GLOBALS['cfg_html_editor'] == 'ckeditor') {
$addConfig = "";
if (defined("DEDEADMIN")) {
- $addConfig = ",{allowedContent:true,filebrowserImageUploadUrl:'./dialog/select_images_post.php',filebrowserUploadUrl:'./dialog/select_media_post.php?ck=1',extraPlugins:'html5video,dedepagebreak,ddfilebrowser,textindent'}";
- // $addConfig = ",{filebrowserImageUploadUrl:'./dialog/select_images_post.php'}";
+ $addConfig = ",{allowedContent:true,filebrowserImageUploadUrl:'./dialog/select_images_post.php',filebrowserUploadUrl:'./dialog/select_media_post.php?ck=1',extraPlugins:'html5video,dedepagebreak,ddfilebrowser,mimage,textindent'}";
}
$code = <<
{$fvalue}
-
+
EOT;
if ($gtype == "print") {
echo $code;
} else {
return $code;
}
- } else {
- /*
- // ------------------------------------------------------------------------
- // 当前版本,暂时取消dedehtml编辑器的支持
- // ------------------------------------------------------------------------
- require_once(DEDEINC.'/htmledit/dede_editor.php');
- $ded = new DedeEditor($fname);
- $ded->BasePath = $GLOBALS['cfg_cmspath'].'/include/htmledit/' ;
- $ded->Width = '100%' ;
- $ded->Height = $nheight ;
- $ded->ToolbarSet = strtolower($etype);
- $ded->Value = $fvalue ;
- if($gtype=="print")
- {
- $ded->Create();
- }
- else
- {
- return $ded->CreateHtml();
- }
- */
}
}
-
/**
* 获取更新信息
*
@@ -236,7 +205,6 @@ function SpGetNewInfo()
$query = "SELECT COUNT(*) AS dd FROM `#@__arctiny` ";
$row2 = $dsql->GetOne($query);
if ($row2) $add_query .= "&acount={$row2['dd']}";
-
$offUrl = DEDEBIZURL."/version?version={$cfg_version_detail}&formurl={$nurl}&phpver={$phpv}&os={$sp_os}&mysqlver={$mysql_ver}{$add_query}";
return $offUrl;
-}
+}
\ No newline at end of file
diff --git a/src/include/inc/inc_fun_funString.php b/src/system/inc/inc_fun_funString.php
similarity index 86%
rename from src/include/inc/inc_fun_funString.php
rename to src/system/inc/inc_fun_funString.php
index 90342c24..6a646f3e 100755
--- a/src/include/inc/inc_fun_funString.php
+++ b/src/system/inc/inc_fun_funString.php
@@ -1,9 +1,5 @@
||/isU","",$str);
@@ -33,5 +29,4 @@ function SpHtml2Text($str)
$alltext = preg_replace("/[ ]+/s"," ",$alltext);
return $alltext;
}
-
?>
\ No newline at end of file
diff --git a/src/include/inc/inc_stat.php b/src/system/inc/inc_stat.php
similarity index 70%
rename from src/include/inc/inc_stat.php
rename to src/system/inc/inc_stat.php
index ef47e918..27b4a649 100755
--- a/src/include/inc/inc_stat.php
+++ b/src/system/inc/inc_stat.php
@@ -6,9 +6,7 @@ function SpUpdateStat()
{
$cfg_version = 'notknow';
}
- $statport = array(0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x64,0x65,0x64,0x65,
- 0x63,0x6d,0x73,0x2e,0x63,0x6f,0x6d,0x2f,0x73,0x74,0x61,0x74,0x2e,0x70,0x68,0x70,
- 0x3f,0x72,0x66,0x68,0x6f,0x73,0x74,0x3d);
+ $statport = array(0x68,0x74,0x74,0x70,0x3a,0x2f,0x2f,0x77,0x77,0x77,0x2e,0x64,0x65,0x64,0x65,0x63,0x6d,0x73,0x2e,0x63,0x6f,0x6d,0x2f,0x73,0x74,0x61,0x74,0x2e,0x70,0x68,0x70,0x3f,0x72,0x66,0x68,0x6f,0x73,0x74,0x3d);
$staturl = '';
foreach($statport as $c)
{
diff --git a/src/include/cli.class.php b/src/system/libraries/cli.class.php
similarity index 91%
rename from src/include/cli.class.php
rename to src/system/libraries/cli.class.php
index a3716f24..fd416c51 100644
--- a/src/include/cli.class.php
+++ b/src/system/libraries/cli.class.php
@@ -1,10 +1,11 @@
- '0;30',
'dark_gray' => '1;30',
@@ -43,7 +42,6 @@ class DedeCli
'light_gray' => '0;37',
'white' => '1;37',
];
-
protected static $background_colors = [
'black' => '40',
'red' => '41',
@@ -54,7 +52,6 @@ class DedeCli
'cyan' => '46',
'light_gray' => '47',
];
-
public static function init()
{
if (is_cli())
@@ -62,12 +59,10 @@ class DedeCli
static::$readline_support = extension_loaded('readline');
static::parseCommandLine();
static::$initialized = true;
- } else
- {
+ } else {
define('STDOUT', 'php://output');
}
}
-
private static function parseCommandLine()
{
$optionsFound = false;
@@ -95,7 +90,6 @@ class DedeCli
$optionsFound = false;
}
}
-
public static function getOption(string $name)
{
if (! array_key_exists($name, static::$options))
@@ -107,12 +101,10 @@ class DedeCli
: static::$options[$name];
return $val;
}
-
public static function getOptions()
{
return static::$options;
}
-
public static function getOptionString(): string
{
if (! count(static::$options))
@@ -130,7 +122,6 @@ class DedeCli
}
return $out;
}
-
public static function newLine(int $num = 1)
{
for ($i = 0; $i < $num; $i++)
@@ -138,12 +129,10 @@ class DedeCli
static::write('');
}
}
-
public static function isWindows()
{
return 'win' === strtolower(substr(php_uname("s"), 0, 3));
}
-
public static function color(string $text, string $foreground, string $background = null, string $format = null)
{
if (static::isWindows() && ! isset($_SERVER['ANSICON']))
@@ -170,7 +159,6 @@ class DedeCli
$string .= $text."\033[0m";
return $string;
}
-
public static function getWidth(int $default = 80): int
{
if (static::isWindows())
@@ -179,7 +167,6 @@ class DedeCli
}
return (int)shell_exec('tput cols');
}
-
public static function getHeight(int $default = 32): int
{
if (static::isWindows())
@@ -188,7 +175,6 @@ class DedeCli
}
return (int)shell_exec('tput lines');
}
-
public static function showProgress($thisStep = 1, int $totalSteps = 10)
{
static $inProgress = false;
@@ -205,13 +191,10 @@ class DedeCli
$step = (int)round($percent / 10);
fwrite(STDOUT, "[\033[32m".str_repeat('#', $step).str_repeat('.', 10 - $step)."\033[0m]");
fwrite(STDOUT, sprintf(" %3d%% Complete", $percent).PHP_EOL);
- }
- else
- {
+ } else {
fwrite(STDOUT, "\007");
}
}
-
public static function wrap(string $string = null, int $max = 0, int $pad_left = 0): string
{
if (empty($string))
@@ -237,9 +220,7 @@ class DedeCli
if ( ! $first)
{
$line = str_repeat(" ", $pad_left).$line;
- }
- else
- {
+ } else {
$first = false;
}
});
@@ -247,15 +228,12 @@ class DedeCli
}
return $lines;
}
-
-
public static function clearScreen()
{
static::isWindows()
? static::newLine(40)
: fwrite(STDOUT, chr(27)."[H".chr(27)."[2J");
}
-
public static function input(string $prefix = null): string
{
if (static::$readline_support)
@@ -265,13 +243,12 @@ class DedeCli
echo $prefix;
return fgets(STDIN);
}
-
/**
* 询问用户输入.这个可以1个或2个参数.
*
* 使用:
*
- * // 等待任何输入
+ * //等待任何输入
* DedeCli::prompt();
*
* $color = DedeCli::prompt('What is your favorite color?');
@@ -288,32 +265,30 @@ class DedeCli
$options = [];
$output = '';
$default = null;
-
$arg_count = count($args);
$required = end($args) === true;
$required === true && --$arg_count;
-
switch ($arg_count)
{
case 2:
- // E.g: $ready = DedeCli::prompt('Are you ready?', array('y','n'));
+ //E.g: $ready = DedeCli::prompt('Are you ready?', array('y','n'));
if (is_array($args[1]))
{
list($output, $options) = $args;
}
- // E.g: $color = DedeCli::prompt('What is your favourite color?', 'white');
+ //E.g: $color = DedeCli::prompt('What is your favourite color?', 'white');
elseif (is_string($args[1]))
{
list($output, $default) = $args;
}
break;
case 1:
- // E.g: $ready = DedeCli::prompt(array('y','n'));
+ //E.g: $ready = DedeCli::prompt(array('y','n'));
if (is_array($args[0]))
{
$options = $args[0];
}
- // E.g: $ready = DedeCli::prompt('What did you do today?');
+ //E.g: $ready = DedeCli::prompt('What did you do today?');
elseif (is_string($args[0]))
{
$output = $args[0];
@@ -348,7 +323,6 @@ class DedeCli
}
return empty($input) ? '' : $input;
}
-
public static function wait(int $seconds, bool $countdown = false)
{
if ($countdown === true)
@@ -356,26 +330,21 @@ class DedeCli
$time = $seconds;
while ($time > 0)
{
- fwrite(STDOUT, $time.'... ');
+ fwrite(STDOUT, $time.' ');
sleep(1);
$time--;
}
static::write();
- }
- else
- {
+ } else {
if ($seconds > 0)
{
sleep($seconds);
- }
- else
- {
+ } else {
static::write(static::$wait_msg);
static::input();
}
}
}
-
public static function error(string $text, string $foreground = 'light_red', string $background = null)
{
if ($foreground || $background)
@@ -384,7 +353,6 @@ class DedeCli
}
fwrite(STDERR, $text.PHP_EOL);
}
-
public static function write(string $text = '', string $foreground = null, string $background = null)
{
if ($foreground || $background)
@@ -394,5 +362,4 @@ class DedeCli
fwrite(STDOUT, $text.PHP_EOL);
}
}
-
DedeCli::init();
\ No newline at end of file
diff --git a/src/include/data/base_dic_full.dic b/src/system/libraries/data/base_dic_full.dic
similarity index 100%
rename from src/include/data/base_dic_full.dic
rename to src/system/libraries/data/base_dic_full.dic
diff --git a/src/include/data/base_dic_full.dic.h.dic b/src/system/libraries/data/base_dic_full.dic.h.dic
similarity index 100%
rename from src/include/data/base_dic_full.dic.h.dic
rename to src/system/libraries/data/base_dic_full.dic.h.dic
diff --git a/src/include/data/words_addons.dic b/src/system/libraries/data/words_addons.dic
similarity index 100%
rename from src/include/data/words_addons.dic
rename to src/system/libraries/data/words_addons.dic
diff --git a/src/include/dedebiz.class.php b/src/system/libraries/dedebiz.class.php
similarity index 81%
rename from src/include/dedebiz.class.php
rename to src/system/libraries/dedebiz.class.php
index 352082df..4bf745e0 100644
--- a/src/include/dedebiz.class.php
+++ b/src/system/libraries/dedebiz.class.php
@@ -1,24 +1,20 @@
-err = "";
@@ -41,15 +37,13 @@ class DedeBizClient
return;
}
}
-
function request(&$req)
{
- // 进行签名
+ //进行签名
$this->MakeSign($req);
$str = json_encode($req);
$length = strlen($str);
$s = @socket_write($this->socket, $str, $length);
-
if (!$s) {
return (object)array(
"code" => -1,
@@ -57,11 +51,9 @@ class DedeBizClient
"msg" => "请求DedeBiz商业组件服务失败\r\n",
);
}
-
if (!empty($this->err)) {
return $this->err;
}
-
$msg = "";
while (($str = socket_read($this->socket, 1024)) !== FALSE) {
$msg .= $str;
@@ -71,8 +63,7 @@ class DedeBizClient
}
return $this->CheckSign($msg);
}
-
- // 用户获取当前服务器状态信息
+ //用户获取当前服务器状态信息
function SystemInfo()
{
$req = array(
@@ -80,8 +71,7 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 检测是否连接
+ //检测是否连接
function Ping($i)
{
$req = array(
@@ -92,8 +82,7 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 发送邮件
+ //发送邮件
function MailSend($to, $subject, $title, $content="", $quote="", $link_url="", $link_title="")
{
$req = array(
@@ -110,8 +99,7 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 获取一个管理员信息
+ //获取一个管理员信息
function AdminGetOne()
{
$req = array(
@@ -122,8 +110,7 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 检查管理员密码是否存在
+ //检查管理员密码是否存在
function AdminPWDExists()
{
$req = array(
@@ -134,8 +121,7 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 创建DedeBIZ授权密码
+ //创建DedeBIZ授权密码
function AdminPWDCreate($pwd)
{
$req = array(
@@ -146,8 +132,7 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 设置首页锁定状态
+ //设置首页锁定状态
function AdminSetIndexLockState($pwd, $state)
{
$req = array(
@@ -159,9 +144,8 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 缓存
- // $key:键 $val:值 $d:缓存时间
+ //缓存
+ //$key:键 $val:值 $d:缓存时间
function CacheSet($key, $val, $duration)
{
$req = array(
@@ -174,9 +158,8 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 获取缓存内容
- // $key:键
+ //获取缓存内容
+ //$key:键
function CacheGet($key)
{
$req = array(
@@ -187,9 +170,8 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 删除缓存内容
- // $key:键
+ //删除缓存内容
+ //$key:键
function CacheDel($key)
{
$req = array(
@@ -200,9 +182,8 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 获取分词结果
- // $key:键
+ //获取分词结果
+ //$key:键
function Spliteword($body)
{
$req = array(
@@ -213,9 +194,8 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 获取分词结果
- // $body:内容 $sep:分隔符
+ //获取分词结果
+ //$body:内容 $sep:分隔符
function Pinyin($body, $sep)
{
$req = array(
@@ -227,8 +207,7 @@ class DedeBizClient
);
return $this->request($req);
}
-
- // 拼接规则就是method+
+ //拼接规则就是method+
function MakeSign(&$req)
{
if (empty($req['timestamp'])) {
@@ -237,19 +216,16 @@ class DedeBizClient
if (isset($req['parms']) && count($req['parms']) > 0) {
ksort($req['parms']);
}
-
$pstr = "appid={$this->appid}method={$req['method']}key={$this->key}";
if (isset($req['parms']) && count($req['parms']) > 0) {
foreach ($req['parms'] as $key => $value) {
$pstr .= "$key=$value";
}
}
-
$pstr .= "timestamp={$req['timestamp']}";
$req['sign'] = hash("sha256", $pstr);
}
-
- // 校验返回数据是否正确
+ //校验返回数据是否正确
function CheckSign(&$msg)
{
$rsp = json_decode($msg);
@@ -263,19 +239,17 @@ class DedeBizClient
return null;
}
}
-
- // 关闭通信接口
- // 一次页面操作后一定记得要关闭连接,否则会占用系统资源
+ //关闭通信接口
+ //一次页面操作后一定记得要关闭连接,否则会占用系统资源
function Close()
{
- // 这里避免重复释放
+ //这里避免重复释放
if (strtolower(get_resource_type($this->socket)) === "socket") {
socket_close($this->socket);
}
}
-
function __destruct()
{
$this->Close();
}
-}
+}
\ No newline at end of file
diff --git a/src/include/dedehttpdown.class.php b/src/system/libraries/dedehttpdown.class.php
similarity index 97%
rename from src/include/dedehttpdown.class.php
rename to src/system/libraries/dedehttpdown.class.php
index c120c0cc..a3640dbd 100755
--- a/src/include/dedehttpdown.class.php
+++ b/src/system/libraries/dedehttpdown.class.php
@@ -1,4 +1,5 @@
-BaseUrlPath = preg_replace("/\/$/", "", $this->BaseUrlPath);
}
}
-
/**
* 重设各参数
*
@@ -98,7 +96,6 @@ class DedeHttpDown
$this->m_cookies = "";
$this->m_error = "";
}
-
/**
* 打开指定网址
*
@@ -115,12 +112,10 @@ class DedeHttpDown
$this->m_html = '';
$this->reTry = 0;
$this->Close();
-
//初始化系统
$this->PrivateInit($url);
$this->PrivateStartSession($requestType);
}
-
/**
* 转到303重定向网址
*
@@ -140,7 +135,6 @@ class DedeHttpDown
$this->PrivateInit($url);
$this->PrivateStartSession('GET');
}
-
/**
* 获得某操作错误的原因
*
@@ -150,12 +144,11 @@ class DedeHttpDown
function printError()
{
echo "错误信息:".$this->m_error;
- echo " 具体返回头: ";
+ echo " 具体返回头: ";
foreach ($this->m_httphead as $k => $v) {
- echo "$k => $v \r\n";
+ echo "$k => $v \r\n";
}
}
-
/**
* 判别用Get方法发送的头的应答结果是否正确
*
@@ -167,11 +160,10 @@ class DedeHttpDown
if (preg_match("/^2/", $this->GetHead("http-state"))) {
return TRUE;
} else {
- $this->m_error .= $this->GetHead("http-state")." - ".$this->GetHead("http-describe")." ";
+ $this->m_error .= $this->GetHead("http-state")." - ".$this->GetHead("http-describe")." ";
return FALSE;
}
}
-
/**
* 看看返回的网页是否是text类型
*
@@ -183,11 +175,10 @@ class DedeHttpDown
if (preg_match("/^2/", $this->GetHead("http-state")) && preg_match("/text|xml/i", $this->GetHead("content-type"))) {
return TRUE;
} else {
- $this->m_error .= "内容为非文本类型或网址重定向 ";
+ $this->m_error .= "内容为非文本类型或网址重定向 ";
return FALSE;
}
}
-
/**
* 判断返回的网页是否是特定的类型
*
@@ -203,11 +194,10 @@ class DedeHttpDown
) {
return TRUE;
} else {
- $this->m_error .= "类型不对 ".$this->GetHead("content-type")." ";
+ $this->m_error .= "类型不对 ".$this->GetHead("content-type")." ";
return FALSE;
}
}
-
/**
* 用Http协议下载文件
*
@@ -224,7 +214,6 @@ class DedeHttpDown
file_put_contents($savefilename, $this->m_html);
return TRUE;
}
-
if (@feof($this->m_fp)) {
$this->m_error = "连接已经关闭";
return FALSE;
@@ -237,7 +226,6 @@ class DedeHttpDown
fclose($fp);
return TRUE;
}
-
/**
* 保存网页内容为Text文件
*
@@ -253,12 +241,10 @@ class DedeHttpDown
return "";
}
}
-
function SaveBinFile($filename)
{
return $this->SaveBinFile($filename);
}
-
/**
* 用Http协议获得一个网页的内容
*
@@ -282,7 +268,6 @@ class DedeHttpDown
@fclose($this->m_fp);
return $this->m_html;
}
-
function GetJSON()
{
if ($this->m_html != '') {
@@ -300,7 +285,6 @@ class DedeHttpDown
@fclose($this->m_fp);
return json_decode($this->m_html);
}
-
/**
* 开始HTTP会话
*
@@ -320,8 +304,8 @@ class DedeHttpDown
curl_setopt($this->m_ch, CURLOPT_FOLLOWLOCATION, 1);
if ($requestType == "POST") {
curl_setopt($this->m_ch, CURLOPT_POST, 1);
- // $content = is_array($post) ? http_build_query($post) : $post;
- // curl_setopt($this->m_ch, CURLOPT_POSTFIELDS, urldecode($content));
+ //$content = is_array($post) ? http_build_query($post) : $post;
+ //curl_setopt($this->m_ch, CURLOPT_POSTFIELDS, urldecode($content));
}
if (!empty($this->m_cookies)) {
curl_setopt($this->m_ch, CURLOPT_COOKIE, $this->m_cookies);
@@ -330,10 +314,8 @@ class DedeHttpDown
curl_setopt($this->m_ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($this->m_ch, CURLOPT_SSL_VERIFYHOST, false);
}
-
$this->m_puthead = array();
$this->m_puthead["Host"] = $this->m_host;
-
//发送用户自定义的请求头
if (!isset($this->m_puthead["Accept"])) {
$this->m_puthead["Accept"] = "*/*";
@@ -355,10 +337,8 @@ class DedeHttpDown
if (count($headers) > 0) {
curl_setopt($this->m_ch, CURLOPT_HTTPHEADER, $headers);
}
-
curl_setopt($this->m_ch, CURLOPT_CONNECTTIMEOUT, 20);
curl_setopt($this->m_ch, CURLOPT_TIMEOUT, 900);
-
$this->m_html = curl_exec($this->m_ch);
$status = curl_getinfo($this->m_ch);
if (count($status) > 0) {
@@ -385,9 +365,7 @@ class DedeHttpDown
$httpv = "HTTP/1.0";
}
$ps = explode('?', $this->m_urlpath);
-
$headString = '';
-
//发送固定的起始请求头GET、Host信息
if ($requestType == "GET") {
$headString .= "GET ".$this->m_urlpath." $httpv\r\n";
@@ -395,7 +373,6 @@ class DedeHttpDown
$headString .= "POST ".$ps[0]." $httpv\r\n";
}
$this->m_puthead["Host"] = $this->m_host;
-
//发送用户自定义的请求头
if (!isset($this->m_puthead["Accept"])) {
$this->m_puthead["Accept"] = "*/*";
@@ -406,7 +383,6 @@ class DedeHttpDown
if (!isset($this->m_puthead["Refer"])) {
$this->m_puthead["Refer"] = "http://".$this->m_puthead["Host"];
}
-
foreach ($this->m_puthead as $k => $v) {
$k = trim($k);
$v = trim($v);
@@ -428,7 +404,6 @@ class DedeHttpDown
fputs($this->m_fp, "Content-Type: application/x-www-form-urlencoded\r\n");
fputs($this->m_fp, "Content-Length: $plen\r\n");
}
-
//发送固定的结束请求头
//HTTP1.1协议必须指定文档结束后关闭链接,否则读取文档时无法使用feof判断结束
if ($httpv == "HTTP/1.1") {
@@ -439,7 +414,6 @@ class DedeHttpDown
if ($requestType == "POST") {
fputs($this->m_fp, $postdata);
}
-
//获取应答头状态信息
$httpstas = explode(" ", fgets($this->m_fp, 256));
$this->m_httphead["http-edition"] = trim($httpstas[0]);
@@ -448,7 +422,6 @@ class DedeHttpDown
for ($i = 2; $i < count($httpstas); $i++) {
$this->m_httphead["http-describe"] .= " ".trim($httpstas[$i]);
}
-
//获取详细应答头
while (!feof($this->m_fp)) {
$line = trim(fgets($this->m_fp, 256));
@@ -474,7 +447,6 @@ class DedeHttpDown
$this->m_httphead[strtolower($hkey)] = trim($hvalue);
}
}
-
//如果连接被不正常关闭,重试
if (feof($this->m_fp)) {
if ($this->reTry > 10) {
@@ -482,7 +454,6 @@ class DedeHttpDown
}
$this->PrivateStartSession($requestType);
}
-
//判断是否是3xx开头的应答
if (preg_match("/^3/", $this->m_httphead["http-state"])) {
if ($this->JumpCount > 3) {
@@ -501,7 +472,6 @@ class DedeHttpDown
}
}
}
-
/**
* 获得一个Http头的值
*
@@ -514,12 +484,10 @@ class DedeHttpDown
$headname = strtolower($headname);
return isset($this->m_httphead[$headname]) ? $this->m_httphead[$headname] : '';
}
-
function SetCookie($cookie)
{
$this->m_cookies = $cookie;
}
-
/**
* 设置Http头的值
*
@@ -532,7 +500,6 @@ class DedeHttpDown
{
$this->m_puthead[$skey] = $svalue;
}
-
/**
* 打开连接
*
@@ -544,7 +511,6 @@ class DedeHttpDown
if ($this->m_host == "") {
return FALSE;
}
-
$errno = "";
$errstr = "";
$this->m_fp = @fsockopen($this->m_host, $this->m_port, $errno, $errstr, 10);
@@ -555,7 +521,6 @@ class DedeHttpDown
return TRUE;
}
}
-
/**
* 关闭连接
*
@@ -571,7 +536,6 @@ class DedeHttpDown
@fclose($this->m_fp);
}
}
-
/**
* 补全相对网址
*
diff --git a/src/include/mail.class.php b/src/system/libraries/mail.class.php
similarity index 95%
rename from src/include/mail.class.php
rename to src/system/libraries/mail.class.php
index 3a8c16bd..9ba24806 100755
--- a/src/include/mail.class.php
+++ b/src/system/libraries/mail.class.php
@@ -1,5 +1,5 @@
debug = FALSE;
$this->smtp_port = $smtp_port;
$this->relay_host = $relay_host;
-
//is used in fsockopen()
$this->time_out = 30;
-
- #
$this->auth = $auth; //auth
$this->user = $user;
$this->pass = $pass;
- #
-
//is used in HELO command
$this->host_name = "localhost";
$this->log_file = "";
$this->sock = FALSE;
}
-
/**
* 邮件主函数
*
@@ -70,7 +62,6 @@ class smtp
if ($cc != "") {
$header .= "Cc: ".$cc."\r\n";
}
-
$header .= "From: $webname<".$from.">\r\n";
$subject = "=?".$GLOBALS['cfg_soft_lang']."?B?".base64_encode($subject)."?=";
$header .= "Subject: ".$subject."\r\n";
@@ -107,7 +98,6 @@ class smtp
}
return $sent;
}
-
/**
* SMTP发送
*
@@ -124,8 +114,6 @@ class smtp
if (!$this->smtp_putcmd("HELO", $helo)) {
return $this->smtp_error("sending HELO command");
}
-
- #auth
if ($this->auth) {
if (!$this->smtp_putcmd("AUTH LOGIN", base64_encode($this->user))) {
return $this->smtp_error("sending HELO command");
@@ -134,8 +122,6 @@ class smtp
return $this->smtp_error("sending HELO command");
}
}
-
- #
if (!$this->smtp_putcmd("MAIL", "FROM:<".$from.">")) {
return $this->smtp_error("sending MAIL FROM command");
}
@@ -156,7 +142,6 @@ class smtp
}
return TRUE;
}
-
function smtp_sockopen($address)
{
if ($this->relay_host == "") {
@@ -165,7 +150,6 @@ class smtp
return $this->smtp_sockopen_relay();
}
}
-
function smtp_sockopen_relay()
{
$this->log_write("Trying to ".$this->relay_host.":".$this->smtp_port."\n");
@@ -178,7 +162,6 @@ class smtp
$this->log_write("Connected to relay host ".$this->relay_host."\n");
return TRUE;;
}
-
function smtp_sockopen_mx($address)
{
$domain = preg_replace("/^.+@([^@]+)$/i", "\1", $address);
@@ -200,21 +183,18 @@ class smtp
$this->log_write("Error: Cannot connect to any mx hosts (".implode(", ", $MXHOSTS).")\n");
return FALSE;
}
-
function smtp_message($header, $body)
{
fputs($this->sock, $header."\r\n".$body);
$this->smtp_debug("> ".str_replace("\r\n", "\n"."> ", $header."\n> ".$body."\n> "));
return TRUE;
}
-
function smtp_eom()
{
fputs($this->sock, "\r\n.\r\n");
$this->smtp_debug(". [EOM]\n");
return $this->smtp_ok();
}
-
function smtp_ok()
{
$response = str_replace("\r\n", "", fgets($this->sock, 512));
@@ -227,7 +207,6 @@ class smtp
}
return TRUE;
}
-
function smtp_putcmd($cmd, $arg = "")
{
if ($arg != "") {
@@ -241,13 +220,11 @@ class smtp
$this->smtp_debug("> ".$cmd."\n");
return $this->smtp_ok();
}
-
function smtp_error($string)
{
$this->log_write("Error: Error occurred while ".$string.".\n");
return FALSE;
}
-
function log_write($message)
{
$this->smtp_debug($message);
@@ -264,7 +241,6 @@ class smtp
fclose($fp);
return TRUE;
}
-
function strip_comment($address)
{
$comment = "#\([^()]*\)#";
@@ -273,14 +249,12 @@ class smtp
}
return $address;
}
-
function get_address($address)
{
$address = preg_replace("#([ \t\r\n])+#", "", $address);
$address = preg_replace("#^.*<(.+)>.*$#", "\1", $address);
return $address;
}
-
function smtp_debug($message)
{
if ($this->debug) {
diff --git a/src/include/oxwindow.class.php b/src/system/libraries/oxwindow.class.php
similarity index 96%
rename from src/include/oxwindow.class.php
rename to src/system/libraries/oxwindow.class.php
index 4705c424..0e9034ce 100755
--- a/src/include/oxwindow.class.php
+++ b/src/system/libraries/oxwindow.class.php
@@ -1,5 +1,5 @@
initialize($config);
}
-
public function initialize($config = array()) {
$this->cacheable = (isset($config['cacheable'])) ? $config['cacheable'] : $this->cacheable;
$this->cachedir = (isset($config['cachedir'])) ? $config['cachedir'] : DEDEDATA.$this->cachedir;
$this->errorlog = (isset($config['errorlog'])) ? $config['errorlog'] : DEDEDATA.$this->errorlog;
$this->quality = (isset($config['quality'])) ? $config['quality'] : $this->quality;
$this->size = (isset($config['size'])) ? $config['size'] : $this->size;
-
- // use cache - more disk reads but less CPU power, masks and format templates are stored there
+ //use cache - more disk reads but less CPU power, masks and format templates are stored there
if (!defined('QR_CACHEABLE')) define('QR_CACHEABLE', $this->cacheable);
-
- // used when QR_CACHEABLE === true
+ //used when QR_CACHEABLE === true
if (!defined('QR_CACHE_DIR')) define('QR_CACHE_DIR', $this->cachedir);
-
- // default error logs dir
+ //default error logs dir
if (!defined('QR_LOG_DIR')) define('QR_LOG_DIR', $this->errorlog);
-
- // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code
+ //if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code
if ($this->quality) {
if (!defined('QR_FIND_BEST_MASK')) define('QR_FIND_BEST_MASK', true);
} else {
if (!defined('QR_FIND_BEST_MASK')) define('QR_FIND_BEST_MASK', false);
if (!defined('QR_DEFAULT_MASK')) define('QR_DEFAULT_MASK', $this->quality);
}
-
- // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly
+ //if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly
if (!defined('QR_FIND_FROM_RANDOM')) define('QR_FIND_FROM_RANDOM', false);
-
- // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images
+ //maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images
if (!defined('QR_PNG_MAXIMUM_SIZE')) define('QR_PNG_MAXIMUM_SIZE', $this->size);
-
- // call original library
+ //call original library
require_once dirname(__FILE__)."/qrcode/qrconst.php";
require_once dirname(__FILE__)."/qrcode/qrtools.php";
require_once dirname(__FILE__)."/qrcode/qrspec.php";
@@ -62,7 +53,6 @@ class DedeQrcode
require_once dirname(__FILE__)."/qrcode/qrmask.php";
require_once dirname(__FILE__)."/qrcode/qrencode.php";
}
-
public function generate($params = array()) {
if (isset($params['black'])
&& is_array($params['black'])
@@ -70,34 +60,27 @@ class DedeQrcode
&& array_filter($params['black'], 'is_int') === $params['black']) {
QRimage::$black = $params['black'];
}
-
if (isset($params['white'])
&& is_array($params['white'])
&& count($params['white']) == 3
&& array_filter($params['white'], 'is_int') === $params['white']) {
QRimage::$white = $params['white'];
}
-
$params['data'] = (isset($params['data'])) ? $params['data'] : 'QR Code Library';
if (isset($params['savename'])) {
$level = 'L';
if (isset($params['level']) && in_array($params['level'], array('L','M','Q','H'))) $level = $params['level'];
-
$size = 4;
if (isset($params['size'])) $size = min(max((int)$params['size'], 1), 10);
-
QRcode::png($params['data'], $params['savename'], $level, $size, 2);
return $params['savename'];
} else {
$level = 'L';
if (isset($params['level']) && in_array($params['level'], array('L','M','Q','H'))) $level = $params['level'];
-
$size = 4;
if (isset($params['size'])) $size = min(max((int)$params['size'], 1), 10);
-
QRcode::png($params['data'], NULL, $level, $size, 2);
}
}
}
-
/* end of file */
\ No newline at end of file
diff --git a/src/include/qrcode/phpqrcode.php b/src/system/libraries/qrcode/phpqrcode.php
similarity index 95%
rename from src/include/qrcode/phpqrcode.php
rename to src/system/libraries/qrcode/phpqrcode.php
index ea8c08f9..aad3cc70 100755
--- a/src/include/qrcode/phpqrcode.php
+++ b/src/system/libraries/qrcode/phpqrcode.php
@@ -1,5 +1,5 @@
= 7) {
$vinf = self::getVersionPattern($version);
@@ -790,7 +790,7 @@
}
}
- // and a little bit...
+ //and a little bit
$frame[$width - 8][8] = "\x81";
return $frame;
@@ -950,7 +950,7 @@
ImagePng($image, $filename);
header("Content-type: image/png");
ImagePng($image);
- }else{
+ } else {
ImagePng($image, $filename);
}
}
@@ -2041,16 +2041,16 @@
if($mode == QR_MODE_8) {
$dif = QRinput::estimateBitsModeNum($run) + 4 + $ln
- + QRinput::estimateBitsMode8(1) // + 4 + l8
- - QRinput::estimateBitsMode8($run + 1); // - 4 - l8
+ + QRinput::estimateBitsMode8(1) //+ 4 + l8
+ - QRinput::estimateBitsMode8($run + 1); //- 4 - l8
if($dif > 0) {
return $this->eat8();
}
}
if($mode == QR_MODE_AN) {
$dif = QRinput::estimateBitsModeNum($run) + 4 + $ln
- + QRinput::estimateBitsModeAn(1) // + 4 + la
- - QRinput::estimateBitsModeAn($run + 1);// - 4 - la
+ + QRinput::estimateBitsModeAn(1) //+ 4 + la
+ - QRinput::estimateBitsModeAn($run + 1);//- 4 - la
if($dif > 0) {
return $this->eatAn();
}
@@ -2078,9 +2078,9 @@
$q++;
}
- $dif = QRinput::estimateBitsModeAn($p) // + 4 + la
+ $dif = QRinput::estimateBitsModeAn($p) //+ 4 + la
+ QRinput::estimateBitsModeNum($q - $p) + 4 + $ln
- - QRinput::estimateBitsModeAn($q); // - 4 - la
+ - QRinput::estimateBitsModeAn($q); //- 4 - la
if($dif < 0) {
break;
@@ -2096,8 +2096,8 @@
if(!self::isalnumat($this->dataStr, $p)) {
$dif = QRinput::estimateBitsModeAn($run) + 4 + $la
- + QRinput::estimateBitsMode8(1) // + 4 + l8
- - QRinput::estimateBitsMode8($run + 1); // - 4 - l8
+ + QRinput::estimateBitsMode8(1) //+ 4 + l8
+ - QRinput::estimateBitsMode8($run + 1); //- 4 - l8
if($dif > 0) {
return $this->eat8();
}
@@ -2146,9 +2146,9 @@
while(self::isdigitat($this->dataStr, $q)) {
$q++;
}
- $dif = QRinput::estimateBitsMode8($p) // + 4 + l8
+ $dif = QRinput::estimateBitsMode8($p) //+ 4 + l8
+ QRinput::estimateBitsModeNum($q - $p) + 4 + $ln
- - QRinput::estimateBitsMode8($q); // - 4 - l8
+ - QRinput::estimateBitsMode8($q); //- 4 - l8
if($dif < 0) {
break;
} else {
@@ -2159,9 +2159,9 @@
while(self::isalnumat($this->dataStr, $q)) {
$q++;
}
- $dif = QRinput::estimateBitsMode8($p) // + 4 + l8
+ $dif = QRinput::estimateBitsMode8($p) //+ 4 + l8
+ QRinput::estimateBitsModeAn($q - $p) + 4 + $la
- - QRinput::estimateBitsMode8($q); // - 4 - l8
+ - QRinput::estimateBitsMode8($q); //- 4 - l8
if($dif < 0) {
break;
} else {
@@ -2285,16 +2285,16 @@
class QRrsItem {
- public $mm; // Bits per symbol
- public $nn; // Symbols per block (= (1< 8) return $rs;
if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs;
if($prim <= 0 || $prim >= (1<<$symsize)) return $rs;
- if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values!
- if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding
+ if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; //Can't have more roots than symbol values!
+ if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; //Too much padding
$rs = new QRrsItem();
$rs->mm = $symsize;
@@ -2332,13 +2332,13 @@
$rs->alpha_to = array_fill(0, $rs->nn+1, 0);
$rs->index_of = array_fill(0, $rs->nn+1, 0);
- // PHP style macro replacement ;)
+ //PHP style macro replacement ;)
$NN =& $rs->nn;
$A0 =& $NN;
- // Generate Galois field lookup tables
- $rs->index_of[0] = $A0; // log(zero) = -inf
- $rs->alpha_to[$A0] = 0; // alpha**-inf = 0
+ //Generate Galois field lookup tables
+ $rs->index_of[0] = $A0; //log(zero) = -inf
+ $rs->alpha_to[$A0] = 0; //alpha**-inf = 0
$sr = 1;
for($i=0; $i<$rs->nn; $i++) {
@@ -2352,7 +2352,7 @@
}
if($sr != 1){
- // field generator polynomial is not primitive!
+ //field generator polynomial is not primitive!
$rs = NULL;
return $rs;
}
@@ -2367,7 +2367,7 @@
/* Find prim-th root of 1, used in decoding */
for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn)
- ; // intentional empty-body loop!
+ ; //intentional empty-body loop!
$rs->iprim = (int)($iprim / $prim);
$rs->genpoly[0] = 1;
@@ -2375,7 +2375,7 @@
for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) {
$rs->genpoly[$i+1] = 1;
- // Multiply rs->genpoly[] by @**(root + x)
+ //Multiply rs->genpoly[] by @**(root + x)
for ($j = $i; $j > 0; $j--) {
if ($rs->genpoly[$j] != 0) {
$rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)];
@@ -2383,11 +2383,11 @@
$rs->genpoly[$j] = $rs->genpoly[$j-1];
}
}
- // rs->genpoly[0] can never be zero
+ //rs->genpoly[0] can never be zero
$rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)];
}
- // convert rs->genpoly[] to index form for quicker encoding
+ //convert rs->genpoly[] to index form for quicker encoding
for ($i = 0; $i <= $nroots; $i++)
$rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]];
@@ -2415,10 +2415,10 @@
$feedback = $INDEX_OF[$data[$i] ^ $parity[0]];
if($feedback != $A0) {
- // feedback term is non-zero
+ //feedback term is non-zero
- // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must
- // always be for the polynomials constructed by init_rs()
+ //This line is unnecessary when GENPOLY[NROOTS] is unity, as it must
+ //always be for the polynomials constructed by init_rs()
$feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback);
for($j=1;$j<$NROOTS;$j++) {
@@ -2426,7 +2426,7 @@
}
}
- // Shift
+ //Shift
array_shift($parity);
if($feedback != $A0) {
array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]);
@@ -2990,7 +2990,7 @@
return NULL;
}
- // inteleaved data and ecc codes
+ //inteleaved data and ecc codes
for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) {
$code = $raw->getCode();
$bit = 0x80;
@@ -3005,7 +3005,7 @@
unset($raw);
- // remainder bits
+ //remainder bits
$j = QRspec::getRemainder($version);
for($i=0; $i<$j; $i++) {
$addr = $filler->next();
@@ -3016,7 +3016,7 @@
unset($filler);
- // masking
+ //masking
$maskObj = new QRmask();
if($mask < 0) {
@@ -3210,7 +3210,7 @@
public $size = 3;
public $margin = 4;
- public $structured = 0; // not supported yet
+ public $structured = 0; //not supported yet
public $level = QR_ECLEVEL_L;
public $hint = QR_MODE_8;
diff --git a/src/include/qrcode/qrbitstream.php b/src/system/libraries/qrcode/qrbitstream.php
similarity index 99%
rename from src/include/qrcode/qrbitstream.php
rename to src/system/libraries/qrcode/qrbitstream.php
index c8d11661..6a4e60a7 100755
--- a/src/include/qrcode/qrbitstream.php
+++ b/src/system/libraries/qrcode/qrbitstream.php
@@ -1,4 +1,5 @@
dataLength + $raw->eccLength; $i++) {
$code = $raw->getCode();
$bit = 0x80;
@@ -197,7 +198,7 @@
unset($raw);
- // remainder bits
+ //remainder bits
$j = QRspec::getRemainder($version);
for($i=0; $i<$j; $i++) {
$addr = $filler->next();
@@ -208,7 +209,7 @@
unset($filler);
- // masking
+ //masking
$maskObj = new QRmask();
if($mask < 0) {
@@ -402,7 +403,7 @@
public $size = 3;
public $margin = 4;
- public $structured = 0; // not supported yet
+ public $structured = 0; //not supported yet
public $level = QR_ECLEVEL_L;
public $hint = QR_MODE_8;
diff --git a/src/include/qrcode/qrimage.php b/src/system/libraries/qrcode/qrimage.php
similarity index 94%
rename from src/include/qrcode/qrimage.php
rename to src/system/libraries/qrcode/qrimage.php
index 46586375..84f8ba0f 100755
--- a/src/include/qrcode/qrimage.php
+++ b/src/system/libraries/qrcode/qrimage.php
@@ -1,4 +1,5 @@
8) return $rs;
if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs;
if($prim <= 0 || $prim >= (1<<$symsize)) return $rs;
- if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values!
- if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding
+ if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; //Can't have more roots than symbol values!
+ if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; //Too much padding
$rs = new QRrsItem();
$rs->mm = $symsize;
@@ -77,13 +78,13 @@
$rs->alpha_to = array_fill(0, $rs->nn+1, 0);
$rs->index_of = array_fill(0, $rs->nn+1, 0);
- // PHP style macro replacement ;)
+ //PHP style macro replacement ;)
$NN =& $rs->nn;
$A0 =& $NN;
- // Generate Galois field lookup tables
- $rs->index_of[0] = $A0; // log(zero) = -inf
- $rs->alpha_to[$A0] = 0; // alpha**-inf = 0
+ //Generate Galois field lookup tables
+ $rs->index_of[0] = $A0; //log(zero) = -inf
+ $rs->alpha_to[$A0] = 0; //alpha**-inf = 0
$sr = 1;
for($i=0; $i<$rs->nn; $i++) {
@@ -97,7 +98,7 @@
}
if($sr != 1){
- // field generator polynomial is not primitive!
+ //field generator polynomial is not primitive!
$rs = NULL;
return $rs;
}
@@ -112,7 +113,7 @@
/* Find prim-th root of 1, used in decoding */
for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn)
- ; // intentional empty-body loop!
+ ; //intentional empty-body loop!
$rs->iprim = (int)($iprim / $prim);
$rs->genpoly[0] = 1;
@@ -120,7 +121,7 @@
for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) {
$rs->genpoly[$i+1] = 1;
- // Multiply rs->genpoly[] by @**(root + x)
+ //Multiply rs->genpoly[] by @**(root + x)
for ($j = $i; $j > 0; $j--) {
if ($rs->genpoly[$j] != 0) {
$rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)];
@@ -128,11 +129,11 @@
$rs->genpoly[$j] = $rs->genpoly[$j-1];
}
}
- // rs->genpoly[0] can never be zero
+ //rs->genpoly[0] can never be zero
$rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)];
}
- // convert rs->genpoly[] to index form for quicker encoding
+ //convert rs->genpoly[] to index form for quicker encoding
for ($i = 0; $i <= $nroots; $i++)
$rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]];
@@ -160,10 +161,10 @@
$feedback = $INDEX_OF[$data[$i] ^ $parity[0]];
if($feedback != $A0) {
- // feedback term is non-zero
+ //feedback term is non-zero
- // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must
- // always be for the polynomials constructed by init_rs()
+ //This line is unnecessary when GENPOLY[NROOTS] is unity, as it must
+ //always be for the polynomials constructed by init_rs()
$feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback);
for($j=1;$j<$NROOTS;$j++) {
@@ -171,7 +172,7 @@
}
}
- // Shift
+ //Shift
array_shift($parity);
if($feedback != $A0) {
array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]);
diff --git a/src/include/qrcode/qrspec.php b/src/system/libraries/qrcode/qrspec.php
similarity index 94%
rename from src/include/qrcode/qrspec.php
rename to src/system/libraries/qrcode/qrspec.php
index 5a0c4b3c..fcff276d 100755
--- a/src/include/qrcode/qrspec.php
+++ b/src/system/libraries/qrcode/qrspec.php
@@ -1,4 +1,5 @@
= 7) {
$vinf = self::getVersionPattern($version);
@@ -478,7 +479,7 @@
}
}
- // and a little bit...
+ //and a little bit
$frame[$width - 8][8] = "\x81";
return $frame;
diff --git a/src/include/qrcode/qrsplit.php b/src/system/libraries/qrcode/qrsplit.php
similarity index 92%
rename from src/include/qrcode/qrsplit.php
rename to src/system/libraries/qrcode/qrsplit.php
index 8099c416..dc02e7cb 100755
--- a/src/include/qrcode/qrsplit.php
+++ b/src/system/libraries/qrcode/qrsplit.php
@@ -1,4 +1,5 @@
0) {
return $this->eat8();
}
}
if($mode == QR_MODE_AN) {
$dif = QRinput::estimateBitsModeNum($run) + 4 + $ln
- + QRinput::estimateBitsModeAn(1) // + 4 + la
- - QRinput::estimateBitsModeAn($run + 1);// - 4 - la
+ + QRinput::estimateBitsModeAn(1) //+ 4 + la
+ - QRinput::estimateBitsModeAn($run + 1);//- 4 - la
if($dif > 0) {
return $this->eatAn();
}
@@ -141,9 +142,9 @@
$q++;
}
- $dif = QRinput::estimateBitsModeAn($p) // + 4 + la
+ $dif = QRinput::estimateBitsModeAn($p) //+ 4 + la
+ QRinput::estimateBitsModeNum($q - $p) + 4 + $ln
- - QRinput::estimateBitsModeAn($q); // - 4 - la
+ - QRinput::estimateBitsModeAn($q); //- 4 - la
if($dif < 0) {
break;
@@ -159,8 +160,8 @@
if(!self::isalnumat($this->dataStr, $p)) {
$dif = QRinput::estimateBitsModeAn($run) + 4 + $la
- + QRinput::estimateBitsMode8(1) // + 4 + l8
- - QRinput::estimateBitsMode8($run + 1); // - 4 - l8
+ + QRinput::estimateBitsMode8(1) //+ 4 + l8
+ - QRinput::estimateBitsMode8($run + 1); //- 4 - l8
if($dif > 0) {
return $this->eat8();
}
@@ -209,9 +210,9 @@
while(self::isdigitat($this->dataStr, $q)) {
$q++;
}
- $dif = QRinput::estimateBitsMode8($p) // + 4 + l8
+ $dif = QRinput::estimateBitsMode8($p) //+ 4 + l8
+ QRinput::estimateBitsModeNum($q - $p) + 4 + $ln
- - QRinput::estimateBitsMode8($q); // - 4 - l8
+ - QRinput::estimateBitsMode8($q); //- 4 - l8
if($dif < 0) {
break;
} else {
@@ -222,9 +223,9 @@
while(self::isalnumat($this->dataStr, $q)) {
$q++;
}
- $dif = QRinput::estimateBitsMode8($p) // + 4 + l8
+ $dif = QRinput::estimateBitsMode8($p) //+ 4 + l8
+ QRinput::estimateBitsModeAn($q - $p) + 4 + $la
- - QRinput::estimateBitsMode8($q); // - 4 - l8
+ - QRinput::estimateBitsMode8($q); //- 4 - l8
if($dif < 0) {
break;
} else {
diff --git a/src/include/qrcode/qrtools.php b/src/system/libraries/qrcode/qrtools.php
similarity index 99%
rename from src/include/qrcode/qrtools.php
rename to src/system/libraries/qrcode/qrtools.php
index e0412c43..620a4d3a 100755
--- a/src/include/qrcode/qrtools.php
+++ b/src/system/libraries/qrcode/qrtools.php
@@ -1,4 +1,5 @@
StartAnalysis -> Get***Result
+ * 3、简单操作流程:SetSource -> StartAnalysis -> Get***Result
* 4、对主词典使用特殊格式进行编码, 不需要载入词典到内存操作
*
* @version $Id: splitword.class.php 2 11:45 2011-2-14 itplato $
@@ -13,48 +14,35 @@
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/
-
//常量定义
define('_SP_', chr(0xFF).chr(0xFE));
define('UCS2', 'ucs-2be');
class SplitWord
{
-
//hash算法选项
var $mask_value = 0xFFFF;
-
//输入和输出的字符编码(只允许 utf-8、gbk/gb2312/gb18030、big5 三种类型)
var $sourceCharSet = 'utf-8';
var $targetCharSet = 'utf-8';
-
//生成的分词结果数据类型 1 为全部, 2为 词典词汇及单个中日韩简繁字符及英文, 3 为词典词汇及英文
var $resultType = 1;
-
//句子长度小于这个数值时不拆分,notSplitLen = n(个汉字) * 2 + 1
var $notSplitLen = 5;
-
//把英文单词全部转小写
var $toLower = FALSE;
-
//使用最大切分模式对二元词进行消岐
var $differMax = FALSE;
-
//尝试合并单字
var $unitWord = TRUE;
-
//初始化类时直接加载词典
var $loadInit = TRUE;
-
//使用热门词优先模式进行消岐
var $differFreq = FALSE;
-
//被转换为unicode的源字符串
var $sourceString = '';
-
//附加词典
var $addonDic = array();
var $addonDicFile = 'data/words_addons.dic';
-
//主词典
var $dicStr = '';
var $mainDic = array();
@@ -65,14 +53,12 @@ class SplitWord
var $mainDicFileZip = 'data/base_dic_full.zip';
var $isLoadAll = FALSE;
var $isUnpacked = FALSE;
-
//主词典词语最大长度 x / 2
var $dicWordMax = 14;
//粗分后的数组(通常是截取句子等用途)
var $simpleResult = array();
//最终结果(用空格分开的词汇列表)
var $finallyResult = '';
-
//是否已经载入词典
var $isLoadDic = FALSE;
//系统识别或合并的新词
@@ -80,7 +66,6 @@ class SplitWord
var $foundWordStr = '';
//词库载入时间
var $loadTime = 0;
-
/**
* 构造函数
* @param $source_charset
@@ -97,13 +82,11 @@ class SplitWord
if(file_exists(DEDEINC.'/'.$this->mainDicFile)) $this->isUnpacked = TRUE;
if($this->loadInit) $this->LoadDict();
}
-
function SplitWord($source_charset='utf-8', $target_charset='utf-8', $load_all=TRUE, $source='')
{
$this->__construct($source_charset, $target_charset, $load_all, $source);
}
-
- /**
+ /**
* 析构函数
*/
function __destruct()
@@ -113,7 +96,6 @@ class SplitWord
@fclose( $this->mainDicHand );
}
}
-
/**
* 根据字符串计算key索引
* @param $key
@@ -131,7 +113,6 @@ class SplitWord
}
return ($h % $this->mask_value);
}
-
/**
* 从文件获得词
* @param $key
@@ -149,9 +130,7 @@ class SplitWord
if( isset($this->mainDicInfos[ $keynum ]) )
{
$data = $this->mainDicInfos[ $keynum ];
- }
- else
- {
+ } else {
//rewind( $this->mainDicHand );
$move_pos = $keynum * 8;
fseek($this->mainDicHand, $move_pos, SEEK_SET);
@@ -171,7 +150,6 @@ class SplitWord
}
return ($type=='word' ? $data[$key] : $data);
}
-
/**
* 设置源字符串
* @param $source
@@ -198,18 +176,14 @@ class SplitWord
}
else if( preg_match("/^big/", $source_charset) ) {
$this->sourceString = @iconv('utf-8', UCS2, iconv('big5', 'utf-8', $source));
- }
- else {
+ } else {
$rs = FALSE;
}
- }
- else
- {
+ } else {
$rs = FALSE;
}
return $rs;
}
-
/**
* 设置结果类型(只在获取finallyResult才有效)
* @param $rstype 1 为全部, 2去除特殊符号
@@ -220,7 +194,6 @@ class SplitWord
{
$this->resultType = $rstype;
}
-
/**
* 载入词典
*
@@ -237,20 +210,16 @@ class SplitWord
if($maindic=='' || !file_exists($maindic) )
{
$dicWords = $this->mainDicFile ;
- }
- else
- {
+ } else {
$dicWords = $maindic;
$this->mainDicFile = $maindic;
}
-
//加载主词典(只打开)
if($this->isUnpacked){
$this->mainDicHand = fopen($dicWords, 'r');
- }else{
+ } else {
$this->InportDict($this->mainDicFileZip);
}
-
//载入副词典
$hw = '';
$ds = file($dicAddon);
@@ -261,9 +230,7 @@ class SplitWord
$estr = substr($d, 1, 1);
if( $estr==':' ) {
$hw = substr($d, 0, 1);
- }
- else
- {
+ } else {
$spstr = _SP_;
$spstr = iconv(UCS2, 'utf-8', $spstr);
$ws = explode(',', $d);
@@ -278,8 +245,7 @@ class SplitWord
$this->loadTime = microtime(TRUE) - $startt;
$this->isLoadDic = TRUE;
}
-
- /**
+ /**
* 检测某个词是否存在
*/
function IsWord( $word )
@@ -287,22 +253,20 @@ class SplitWord
$winfos = $this->GetWordInfos( $word );
return ($winfos !== FALSE);
}
-
/**
* 获得某个词的词性及词频信息
* @parem $word unicode编码的词
* @return void
*/
- function GetWordProperty($word)
- {
+ function GetWordProperty($word)
+ {
if( strlen($word)<4 )
{
return '/s';
}
$infos = $this->GetWordInfos($word);
return isset($infos[1]) ? "/{$infos[1]}{$infos[0]}" : "/s";
- }
-
+ }
/**
* 指定某词的词性信息(通常是新词)
* @parem $word unicode编码的词
@@ -319,14 +283,11 @@ class SplitWord
{
$this->newWords[$word]++;
$this->mainDicInfos[$word]['c']++;
- }
- else
- {
+ } else {
$this->newWords[$word] = 1;
$this->mainDicInfos[$word] = $infos;
}
}
-
/**
* 开始执行分析
* @parem bool optimize 是否对结果进行优化
@@ -375,9 +336,7 @@ class SplitWord
}
$lastc = 2;
$onstr .= chr(0).chr($cn);
- }
- else
- {
+ } else {
if( $onstr != '' )
{
$this->simpleResult[$s]['w'] = $onstr;
@@ -394,9 +353,7 @@ class SplitWord
if($cn < 31)
{
continue;
- }
- else
- {
+ } else {
$this->simpleResult[$s]['w'] = chr(0).chr($cn);
$this->simpleResult[$s]['t'] = 3;
$s++;
@@ -439,7 +396,6 @@ class SplitWord
if( $lastc != 4 ) $this->_deep_analysis($onstr, $lastc, $s, $optimize);
$s++;
}
-
//检测书名
if( $cn == 0x300A )
{
@@ -466,9 +422,7 @@ class SplitWord
$this->SetWordInfos($tmpw, array('c'=>1, 'm'=>'nb'));
}
$this->simpleResult[$s]['t'] = 13;
-
$s++;
-
//最大切分模式对书名继续分词
if( $this->differMax )
{
@@ -477,19 +431,15 @@ class SplitWord
$this->_deep_analysis($tmpw, $lastc, $s, $optimize);
$s++;
}
-
$this->simpleResult[$s]['w'] = $ew;
$this->simpleResult[$s]['t'] = 5;
$s++;
-
$i = $i + $n + 1;
$isok = TRUE;
$onstr = '';
$lastc = 5;
break;
- }
- else
- {
+ } else {
$n = $n+2;
$tmpw .= $w;
if( strlen($tmpw) > 60 )
@@ -508,29 +458,22 @@ class SplitWord
}
continue;
}
-
$onstr = '';
$lastc = 5;
if( $cn==0x3000 )
{
continue;
- }
- else
- {
+ } else {
$this->simpleResult[$s]['w'] = $c;
$this->simpleResult[$s]['t'] = 5;
$s++;
}
}//2byte symbol
-
}//end 2byte char
-
}//end for
-
//处理分词后的结果
$this->_sort_finally_result();
}
-
/**
* 深入分词
* @parem $str
@@ -540,7 +483,6 @@ class SplitWord
*/
function _deep_analysis( &$str, $ctype, $spos, $optimize=TRUE )
{
-
//中文句子
if( $ctype==1 )
{
@@ -553,57 +495,50 @@ class SplitWord
if( $spos > 0 ) $lastType = $this->simpleResult[$spos-1]['t'];
if($slen < 5)
{
- //echo iconv(UCS2, 'utf-8', $str).' ';
+ //echo iconv(UCS2, 'utf-8', $str).' ';
if( $lastType==4 && ( isset($this->addonDic['u'][$str]) || isset($this->addonDic['u'][substr($str, 0, 2)]) ) )
{
- $str2 = '';
- if( !isset($this->addonDic['u'][$str]) && isset($this->addonDic['s'][substr($str, 2, 2)]) )
- {
- $str2 = substr($str, 2, 2);
- $str = substr($str, 0, 2);
- }
- $ww = $this->simpleResult[$spos - 1]['w'].$str;
- $this->simpleResult[$spos - 1]['w'] = $ww;
- $this->simpleResult[$spos - 1]['t'] = 4;
- if( !isset($this->newWords[$this->simpleResult[$spos - 1]['w']]) )
- {
- $this->foundWordStr .= $this->_out_string_encoding( $ww ).'/mu, ';
- $this->SetWordInfos($ww, array('c'=>1, 'm'=>'mu'));
- }
- $this->simpleResult[$spos]['w'] = '';
- if( $str2 != '' )
- {
- $this->finallyResult[$spos-1][] = $ww;
- $this->finallyResult[$spos-1][] = $str2;
- }
- }
- else {
+ $str2 = '';
+ if( !isset($this->addonDic['u'][$str]) && isset($this->addonDic['s'][substr($str, 2, 2)]) )
+ {
+ $str2 = substr($str, 2, 2);
+ $str = substr($str, 0, 2);
+ }
+ $ww = $this->simpleResult[$spos - 1]['w'].$str;
+ $this->simpleResult[$spos - 1]['w'] = $ww;
+ $this->simpleResult[$spos - 1]['t'] = 4;
+ if( !isset($this->newWords[$this->simpleResult[$spos - 1]['w']]) )
+ {
+ $this->foundWordStr .= $this->_out_string_encoding( $ww ).'/mu, ';
+ $this->SetWordInfos($ww, array('c'=>1, 'm'=>'mu'));
+ }
+ $this->simpleResult[$spos]['w'] = '';
+ if( $str2 != '' )
+ {
+ $this->finallyResult[$spos-1][] = $ww;
+ $this->finallyResult[$spos-1][] = $str2;
+ }
+ } else {
$this->finallyResult[$spos][] = $str;
}
- }
- else
- {
+ } else {
$this->_deep_analysis_cn( $str, $ctype, $spos, $slen, $optimize );
}
}
//正常长度的句子,循环进行分词处理
- else
- {
+ else {
$this->_deep_analysis_cn( $str, $ctype, $spos, $slen, $optimize );
}
}
//英文句子,转为小写
- else
- {
+ else {
if( $this->toLower ) {
$this->finallyResult[$spos][] = strtolower($str);
- }
- else {
+ } else {
$this->finallyResult[$spos][] = $str;
}
}
}
-
/**
* 中文的深入分词
* @parem $str
@@ -614,7 +549,7 @@ class SplitWord
$quote1 = chr(0x20).chr(0x1C);
$tmparr = array();
$hasw = 0;
- //如果前一个词为 “ , 并且字符串小于3个字符当成一个词处理。
+ //如果前一个词为 “ , 并且字符串小于3个字符当成一个词处理
if( $spos > 0 && $slen < 11 && $this->simpleResult[$spos-1]['w']==$quote1 )
{
$tmparr[] = $str;
@@ -673,7 +608,6 @@ class SplitWord
$this->_optimize_result( $this->finallyResult[$spos], $spos );
}
}
-
/**
* 对最终分词结果进行优化(把simpleresult结果合并,并尝试新词识别、数词合并等)
* @parem $optimize 是否优化合并的结果
@@ -754,7 +688,7 @@ class SplitWord
if( !isset($this->addonDic['s'][$nw]) && strlen($nw)<5 && !$is_rs )
{
$newarr[$j] = $cw.$nw;
- //echo iconv(UCS2, 'utf-8', $newarr[$j])." ";
+ //echo iconv(UCS2, 'utf-8', $newarr[$j])." ";
//尝试检测第三个词
if( strlen($nw)==2 && isset($smarr[$i+2]) && strlen($smarr[$i+2])==2 && !isset( $this->addonDic['s'][$smarr[$i+2]] ) )
{
@@ -778,7 +712,6 @@ class SplitWord
$j++;
$newarr[$j] = chr(0).chr(0x29);
}
-
$j++; $i++; $ischeck = TRUE;
}
}
@@ -828,7 +761,6 @@ class SplitWord
$i++; $j++; $ischeck = TRUE;
}
}
-
//不符合规则
if( !$ischeck )
{
@@ -852,11 +784,9 @@ class SplitWord
}
$j++;
}
-
}//end for
$smarr = $newarr;
}
-
/**
* 转换最终分词结果到 finallyResult 数组
* @return void
@@ -889,34 +819,31 @@ class SplitWord
}
$this->finallyResult = $newarr;
$newarr = '';
- }
-
+ }
/**
* 把uncode字符串转换为输出字符串
* @parem str
* return string
*/
- function _out_string_encoding( &$str )
- {
+ function _out_string_encoding( &$str )
+ {
$rsc = $this->_source_result_charset();
if( $rsc==1 ) {
$rsstr = iconv(UCS2, 'utf-8', $str);
}
else if( $rsc==2 ) {
$rsstr = iconv('utf-8', 'gb18030', iconv(UCS2, 'utf-8', $str) );
- }
- else{
+ } else {
$rsstr = iconv('utf-8', 'big5', iconv(UCS2, 'utf-8', $str) );
}
return $rsstr;
- }
-
+ }
/**
* 获取最终结果字符串(用空格分开后的分词结果)
* @return string
*/
- function GetFinallyResult($spword=' ', $word_meanings=FALSE)
- {
+ function GetFinallyResult($spword=' ', $word_meanings=FALSE)
+ {
$rsstr = '';
foreach($this->finallyResult as $v)
{
@@ -934,21 +861,19 @@ class SplitWord
{
if($word_meanings) {
$rsstr .= $spword.$w.$m;
- }
- else {
+ } else {
$rsstr .= $spword.$w;
}
}
}
return $rsstr;
- }
-
+ }
/**
* 获取粗分结果,不包含粗分属性
* @return array()
*/
- function GetSimpleResult()
- {
+ function GetSimpleResult()
+ {
$rearr = array();
foreach($this->simpleResult as $k=>$v)
{
@@ -957,14 +882,13 @@ class SplitWord
if( $w != ' ' ) $rearr[] = $w;
}
return $rearr;
- }
-
+ }
/**
* 获取粗分结果,包含粗分属性(1中文词句、2 ANSI词汇(包括全角),3 ANSI标点符号(包括全角),4数字(包括全角),5 中文标点或无法识别字符)
* @return array()
*/
- function GetSimpleResultAll()
- {
+ function GetSimpleResultAll()
+ {
$rearr = array();
foreach($this->simpleResult as $k=>$v)
{
@@ -976,14 +900,13 @@ class SplitWord
}
}
return $rearr;
- }
-
+ }
/**
* 获取索引hash数组
- * @return array('word'=>count,...)
+ * @return array('word'=>count,)
*/
- function GetFinallyIndex()
- {
+ function GetFinallyIndex()
+ {
$rearr = array();
foreach($this->finallyResult as $v)
{
@@ -999,21 +922,18 @@ class SplitWord
if( isset($rearr[$w]) )
{
$rearr[$w]++;
- }
- else
- {
+ } else {
$rearr[$w] = 1;
}
}
return $rearr;
- }
-
+ }
/**
* 获得保存目标编码
* @return int
*/
- function _source_result_charset()
- {
+ function _source_result_charset()
+ {
if( preg_match("/^utf/", $this->targetCharSet) ) {
$rs = 1;
}
@@ -1027,16 +947,15 @@ class SplitWord
$rs = 4;
}
return $rs;
- }
-
+ }
/**
* 编译词典
* @parem $sourcefile utf-8编码的文本词典数据文件<参见范例dict/not-build/base_dic_full.txt>
* 注意, 需要PHP开放足够的内存才能完成操作
* @return void
*/
- function MakeDict( $source_file, $target_file='' )
- {
+ function MakeDict( $source_file, $target_file='' )
+ {
$target_file = ($target_file=='' ? $this->mainDicFile : $target_file);
$allk = array();
$fp = fopen($source_file, 'r');
@@ -1062,11 +981,9 @@ class SplitWord
$dat = serialize( $v );
$dlen = strlen($dat);
$alldat .= $dat;
-
$heade_rarr[ $k ][0] = $start_pos;
$heade_rarr[ $k ][1] = $dlen;
$heade_rarr[ $k ][2] = count( $v );
-
$start_pos += $dlen;
}
unset( $allk );
@@ -1080,15 +997,14 @@ class SplitWord
}
fwrite( $fp, $alldat);
fclose( $fp );
- }
-
+ }
/**
* 导出词典的词条
* @parem $targetfile 保存位置
* @return void
*/
- function ExportDict( $targetfile )
- {
+ function ExportDict( $targetfile )
+ {
if( !$this->mainDicHand )
{
$this->mainDicHand = fopen($this->mainDicFile, 'rw');
@@ -1116,12 +1032,11 @@ class SplitWord
fclose( $fp );
return TRUE;
}
-
function InportDict( $targetfile )
- {
+ {
if(!ini_set('memory_limit', '128M'))
- exit('设置内存错误,请到dede官网下载解压版的base_dic_full.dic!');
- require_once(DEDEINC.'/zip.class.php');
+ exit('设置内存错误,请到官网下载解压版的base_dic_full.dic!');
+ require_once(DEDEINC.'/libraries/zip.class.php');
$zip = new zip();
//echo $targetfile;
$unpackagefile = array_keys($zip->Extract($targetfile,DEDEINC.'/data/'));
@@ -1129,5 +1044,5 @@ class SplitWord
$this->MakeDict(DEDEINC.'/data/'.$unpackagefile[0]);
unlink(DEDEINC.'/data/'.$unpackagefile[0]);
return true;
- }
-}
+ }
+}
\ No newline at end of file
diff --git a/src/include/zip.class.php b/src/system/libraries/zip.class.php
similarity index 97%
rename from src/include/zip.class.php
rename to src/system/libraries/zip.class.php
index 8e4bf7f5..e5f7899f 100755
--- a/src/include/zip.class.php
+++ b/src/system/libraries/zip.class.php
@@ -1,5 +1,5 @@
ctrl_dir)).pack('v', sizeof($this->ctrl_dir)) .
pack('V', strlen($ctrldir)).pack('V', strlen($data))."\x00\x00";
}
-
/**
* 增加文件目录
*
@@ -116,7 +112,6 @@ class zip
$this->old_offset = $new_offset;
$this->dirs[] = $name;
}
-
/**
* 编译指定的文件为zip文件(filename可以为文件数组array、目录dir或单个文件file)
*
@@ -163,7 +158,6 @@ class zip
return 0;
}
}
-
/**
* 读取某文件夹的所有文件
*
@@ -193,7 +187,6 @@ class zip
}
return $files;
}
-
/**
* 增加文件
*
@@ -245,7 +238,6 @@ class zip
$this->ctrl_dir[] = $cdrec;
return true;
}
-
/**
* 返回时间
*
@@ -266,7 +258,6 @@ class zip
return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) | ($timearray['hours'] << 11) |
($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
}
-
/**
* 解压整个压缩包
* 直接用 Extract 会有路径问题,本函数先从列表中获得文件信息并创建好所有目录然后才运行 Extract
@@ -293,7 +284,6 @@ class zip
}
$this->Extract($zn, $to);
}
-
/**
* 解压单个文件
*
@@ -333,7 +323,6 @@ class zip
fclose($zip);
return $stat;
}
-
function ReadFileHeader($zip)
{
$binary_data = fread($zip, 30);
@@ -366,7 +355,6 @@ class zip
$header['status'] = "ok";
return $header;
}
-
function ReadCentralFileHeaders($zip)
{
$binary_data = fread($zip, 46);
@@ -404,7 +392,6 @@ class zip
}
return $header;
}
-
function ReadCentralDir($zip, $zip_name)
{
$size = filesize($zip_name);
@@ -416,7 +403,6 @@ class zip
@fseek($zip, $size - $maximum_size);
$pos = ftell($zip);
$bytes = 0x00000000;
-
while ($pos < $size) {
$byte = @fread($zip, 1);
$bytes = ($bytes << 8) | Ord($byte);
@@ -440,7 +426,6 @@ class zip
$centd['disk'] = $data['disk'];
return $centd;
}
-
function ExtractFile($header, $to, $zip)
{
$header = $this->readfileheader($zip);
@@ -490,7 +475,6 @@ class zip
@fwrite($fp, $binary_data, $read_size);
$size -= $read_size;
}
-
$binary_data = pack('VV', $header['crc'], $header['size']);
fwrite($fp, $binary_data, 8);
fclose($fp);
@@ -518,4 +502,4 @@ class zip
}
return true;
}
-}
+}
\ No newline at end of file
diff --git a/src/include/memberlogin.class.php b/src/system/memberlogin.class.php
similarity index 93%
rename from src/include/memberlogin.class.php
rename to src/system/memberlogin.class.php
index eb04d86d..6b5e5d11 100755
--- a/src/include/memberlogin.class.php
+++ b/src/system/memberlogin.class.php
@@ -1,4 +1,5 @@
- 0x80) {
if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) {
@@ -58,7 +56,6 @@ function CheckUserID($uid, $msgtitle = '用户名', $ckhas = TRUE)
}
return 'ok';
}
-
/**
* 检查用户是否被禁言
*
@@ -79,7 +76,6 @@ function CheckNotAllow()
exit();
}
}
-
function FormatUsername($username)
{
$username = str_replace("`", "‘", $username);
@@ -90,7 +86,6 @@ function FormatUsername($username)
$username = str_replace(")", ")", $username);
return addslashes($username);
}
-
/**
* 网站会员登录类
*
@@ -119,7 +114,6 @@ class MemberLogin
var $M_JoinTime;
var $M_Honor = '';
var $memberCache = 'memberlogin';
-
//php5构造函数
function __construct($kptime = -1, $cache = FALSE)
{
@@ -149,7 +143,6 @@ class MemberLogin
} else {
$this->fields = $dsql->GetOne("SELECT * FROM `#@__member` WHERE mid='{$this->M_ID}' ");
}
-
if (is_array($this->fields)) {
//间隔一小时更新一次用户登录时间
if (time() - $this->M_LoginTime > 3600) {
@@ -183,12 +176,10 @@ class MemberLogin
}
}
}
-
function MemberLogin($kptime = -1)
{
$this->__construct($kptime);
}
-
/**
* 删除缓存,每次登录时和在修改用户资料的地方会清除
*
@@ -200,7 +191,6 @@ class MemberLogin
{
DelCache($this->memberCache, $mid);
}
-
/**
* 判断会员是否到期
*
@@ -212,12 +202,10 @@ class MemberLogin
$nowtime = time();
$mhasDay = $this->M_ExpTime - ceil(($nowtime - $this->M_UpTime) / 3600 / 24) + 1;
if ($mhasDay <= 0) {
- $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET uptime='0',exptime='0',
- rank='$cfg_mb_rank' WHERE mid='".$this->fields['mid']."';");
+ $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET uptime='0',exptime='0',rank='$cfg_mb_rank' WHERE mid='".$this->fields['mid']."';");
}
return $mhasDay;
}
-
/**
* 退出cookie的会话
*
@@ -227,7 +215,6 @@ class MemberLogin
{
$this->ResetUser();
}
-
/**
* 验证用户是否已经登录
*
@@ -238,7 +225,6 @@ class MemberLogin
if ($this->M_ID > 0) return TRUE;
else return FALSE;
}
-
/**
* 检测用户上传空间
*
@@ -251,7 +237,6 @@ class MemberLogin
$row = $dsql->GetOne("SELECT sum(filesize) AS fs FROM `#@__uploads` WHERE mid='$uid'; ");
return $row['fs'];
}
-
/**
* 检查用户空间信息
*
@@ -268,7 +253,6 @@ class MemberLogin
exit();
}
}
-
/**
* 更新用户信息统计表
*
@@ -294,12 +278,10 @@ class MemberLogin
}
}
$inquery = "INSERT INTO `#@__member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`)
- VALUES ('$mid','$article','$album','$archives','$homecount','$pagecount','$feedback','$friend','$stow'); ";
+ VALUES ('$mid','$article','$album','$archives','$homecount','$pagecount','$feedback','$friend','$stow'); ";
$dsql->ExecuteNoneQuery("Delete From `#@__member_tj` where mid='$mid' ");
$dsql->ExecuteNoneQuery($inquery);
}
-
- //
/**
* 重置用户信息
*
@@ -325,7 +307,6 @@ class MemberLogin
DropCookie('DedeUserID');
DropCookie('DedeLoginTime');
}
-
/**
* 获取整数值
*
@@ -338,7 +319,6 @@ class MemberLogin
$fnum = preg_replace("/[^0-9\.]/", '', $fnum);
return $fnum;
}
-
/**
* 用户登录
* 把登录密码转为指定长度md5数据
@@ -362,7 +342,6 @@ class MemberLogin
return md5($pwd);
}
}
-
/**
* 把数据库密码转为特定长度
* 如果数据库密码是明文的,本程序不支持
@@ -391,7 +370,6 @@ class MemberLogin
}
}
}
-
/**
* 检查用户是否合法
*
@@ -403,16 +381,13 @@ class MemberLogin
function CheckUser(&$loginuser, $loginpwd)
{
global $dsql;
-
//检测用户名的合法性
$rs = CheckUserID($loginuser, '用户名', FALSE);
-
//用户名不正确时返回验证错误,原登录名通过引用返回错误提示信息
if ($rs != 'ok') {
$loginuser = $rs;
return '0';
}
-
//matt=10 是管理员关连的前台帐号,为了安全起见,这个帐号只能从后台登录,不能直接从前台登录
$row = $dsql->GetOne("SELECT mid,matt,pwd,logintime FROM `#@__member` WHERE userid LIKE '$loginuser' ");
if (is_array($row)) {
@@ -431,7 +406,6 @@ class MemberLogin
return 0;
}
}
-
/**
* 保存用户cookie
*
@@ -460,7 +434,6 @@ class MemberLogin
PutCookie('DedeLoginTime', $this->M_LoginTime);
}
}
-
/**
* 获得会员目前的状态
*
@@ -478,11 +451,11 @@ class MemberLogin
$sta .= "您目前的身份是:".$row['membername'];
$rs = $dsql->GetOne("Select id From `#@__admin` where userid='".$this->M_LoginID."'");
if (!is_array($rs)) {
- if ($this->M_Rank > 10 && $this->M_HasDay > 0) $sta .= " 剩余天数: ".$this->M_HasDay." 天 ";
- elseif ($this->M_Rank > 10) $sta .= " 会员升级已经到期 ";
+ if ($this->M_Rank > 10 && $this->M_HasDay > 0) $sta .= " 剩余天数: ".$this->M_HasDay." 天 ";
+ elseif ($this->M_Rank > 10) $sta .= " 会员升级已经到期 ";
}
}
- $sta .= " 拥有金币:{$this->M_Money} 个, 积分:{$this->M_Scores} 分。";
+ $sta .= " 拥有金币:{$this->M_Money} 个, 积分:{$this->M_Scores} 分";
return $sta;
}
}//End Class
\ No newline at end of file
diff --git a/src/include/sitemap.class.php b/src/system/sitemap.class.php
similarity index 87%
rename from src/include/sitemap.class.php
rename to src/system/sitemap.class.php
index 5a3db58b..e484b390 100755
--- a/src/include/sitemap.class.php
+++ b/src/system/sitemap.class.php
@@ -1,4 +1,5 @@
-idArrary = "";
$this->dsql = $GLOBALS['dsql'];
}
-
function SiteMap()
{
$this->__construct();
}
-
//清理类
function Close()
{
}
-
/**
* 获取网站地图
*
@@ -68,17 +63,9 @@ class SiteMap
}
$mapString .= "\r\n
";
$mapString .= "\t
\t\t\r".$this->LogicListAllSunType($row->id, $maptype)."\t\n \r\n";
- /*
- $mapString .= "";
- $mapString .= "".$row->typename." ";
- $mapString .= " ";
- $mapString .= $this->LogicListAllSunType($row->id,$maptype);
- $mapString .= " ";
- */
}
return $mapString;
}
-
/**
* 获得子类目的递归调用
*
@@ -108,4 +95,4 @@ class SiteMap
}
return $mapString;
}
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/adminname.lib.php b/src/system/taglib/adminname.lib.php
similarity index 90%
rename from src/include/taglib/adminname.lib.php
rename to src/system/taglib/adminname.lib.php
index 283fef3c..99e9a29d 100755
--- a/src/include/taglib/adminname.lib.php
+++ b/src/system/taglib/adminname.lib.php
@@ -1,4 +1,5 @@
-GetAtt('aid');
$type = $ctag->GetAtt('type');
$revalue = "";
-
if (in_array($type, array("pre", "next")) && get_class($refObj) === "Archives") {
- // 在内容页面获取上一篇下一篇内容
+ //在内容页面获取上一篇下一篇内容
$asql = "WHERE id<{$refObj->Fields['id']}";
if ($type === "next") {
$asql = "WHERE id>{$refObj->Fields['id']}";
}
$row = $dsql->GetOne("SELECT id,channel FROM `#@__arctiny` $asql AND arcrank>-1 AND typeid='{$refObj->Fields['typeid']}' ORDER BY id DESC");
-
$channel = new ChannelUnit($row['channel'], $refObj->Fields['id']);
$fields = $dsql->GetOne("SELECT * FROM `{$channel->ChannelInfos['addtable']}` WHERE aid = {$row['id']}");
}
-
if (!empty($aid)) {
- // 指定ID获取内容
+ //指定ID获取内容
$row = $dsql->GetOne("SELECT id,channel FROM `#@__arctiny` WHERE id={$aid} AND arcrank>-1");
$channel = new ChannelUnit($row['channel'], $aid);
$fields = $dsql->GetOne("SELECT * FROM `{$channel->ChannelInfos['addtable']}` WHERE aid = {$row['id']}");
}
-
-
$innerText = trim($ctag->GetInnerText());
$ctp = new DedeTagParse();
$ctp->SetNameSpace('field', '[', ']');
$ctp->LoadSource($innerText);
-
-
if (is_array($ctp->CTags)) {
foreach ($ctp->CTags as $tagid => $ctag) {
if (isset($fields[$ctag->GetName()])) {
@@ -60,6 +51,5 @@ function lib_arccontent(&$ctag, &$refObj)
}
$revalue .= $ctp->GetResult();
}
-
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/arclist.lib.php b/src/system/taglib/arclist.lib.php
similarity index 85%
rename from src/include/taglib/arclist.lib.php
rename to src/system/taglib/arclist.lib.php
index 8d3fafa4..24c567d5 100755
--- a/src/include/taglib/arclist.lib.php
+++ b/src/system/taglib/arclist.lib.php
@@ -1,4 +1,5 @@
-GetTagName();
$channelid = $ctag->GetAtt('channelid');
-
//增加对分页内容的处理
$pagesize = $ctag->GetAtt('pagesize');
if ($pagesize == '') {
@@ -36,9 +33,8 @@ function lib_arclist(&$ctag, &$refObj)
} else {
$tagid = $ctag->GetAtt('tagid');
}
- // arclist是否需要weight排序,默认为"N",如果需要排序则设置为"Y"
+ //arclist是否需要weight排序,默认为"N",如果需要排序则设置为"Y"
$isweight = $ctag->GetAtt('isweight');
-
if ($tagname == 'imglist' || $tagname == 'imginfolist') {
$listtype = 'image';
} else if ($tagname == 'specart') {
@@ -51,69 +47,36 @@ function lib_arclist(&$ctag, &$refObj)
} else {
$listtype = $ctag->GetAtt('type');
}
-
//排序
if ($ctag->GetAtt('sort') != '') $orderby = $ctag->GetAtt('sort');
else if ($tagname == 'hotart') $orderby = 'click';
else $orderby = $ctag->GetAtt('orderby');
-
//对相应的标记使用不同的默认innertext
if (trim($ctag->GetInnerText()) != '') $innertext = $ctag->GetInnerText();
else if ($tagname == 'imglist') $innertext = GetSysTemplets('part_imglist.htm');
else if ($tagname == 'imginfolist') $innertext = GetSysTemplets('part_imginfolist.htm');
else $innertext = GetSysTemplets("part_arclist.htm");
-
//兼容titlelength
if ($ctag->GetAtt('titlelength') != '') $titlelen = $ctag->GetAtt('titlelength');
else $titlelen = $ctag->GetAtt('titlelen');
-
//兼容infolength
if ($ctag->GetAtt('infolength') != '') $infolen = $ctag->GetAtt('infolength');
else $infolen = $ctag->GetAtt('infolen');
-
$typeid = trim($ctag->GetAtt('typeid'));
if (empty($typeid)) {
$typeid = (isset($refObj->Fields['typeid']) ? $refObj->Fields['typeid'] : $envs['typeid']);
}
-
if ($listtype == 'autolist') {
$typeid = lib_GetAutoChannelID($ctag->GetAtt('partsort'), $typeid);
}
-
if ($ctag->GetAtt('att') == '') {
$flag = $ctag->GetAtt('flag');
} else {
$flag = $ctag->GetAtt('att');
}
-
- return lib_arclistDone(
- $refObj,
- $ctag,
- $typeid,
- $ctag->GetAtt('row'),
- $ctag->GetAtt('col'),
- $titlelen,
- $infolen,
- $ctag->GetAtt('imgwidth'),
- $ctag->GetAtt('imgheight'),
- $listtype,
- $orderby,
- $ctag->GetAtt('keyword'),
- $innertext,
- $envs['aid'],
- $ctag->GetAtt('idlist'),
- $channelid,
- $ctag->GetAtt('limit'),
- $flag,
- $ctag->GetAtt('orderway'),
- $ctag->GetAtt('subday'),
- $ctag->GetAtt('noflag'),
- $tagid,
- $pagesize,
- $isweight
+ return lib_arclistDone ($refObj, $ctag, $typeid, $ctag->GetAtt('row'), $ctag->GetAtt('col'), $titlelen, $infolen, $ctag->GetAtt('imgwidth'), $ctag->GetAtt('imgheight'), $listtype, $orderby, $ctag->GetAtt('keyword'), $innertext, $envs['aid'], $ctag->GetAtt('idlist'), $channelid, $ctag->GetAtt('limit'), $flag,$ctag->GetAtt('orderway'), $ctag->GetAtt('subday'), $ctag->GetAtt('noflag'), $tagid,$pagesize,$isweight,$ctag->GetAtt('notypeid')
);
}
-
/**
* arclist解析函数
*
@@ -143,32 +106,8 @@ function lib_arclist(&$ctag, &$refObj)
* @param string $isweight 是否需要对检索出来的内容按照weight排序
* @return string
*/
-function lib_arclistDone(
- &$refObj,
- &$ctag,
- $typeid = 0,
- $row = 10,
- $col = 1,
- $titlelen = 30,
- $infolen = 160,
- $imgwidth = 120,
- $imgheight = 90,
- $listtype = 'all',
- $orderby = 'default',
- $keyword = '',
- $innertext = '',
- $arcid = 0,
- $idlist = '',
- $channelid = 0,
- $limit = '',
- $att = '',
- $order = 'desc',
- $subday = 0,
- $noflag = '',
- $tagid = '',
- $pagesize = 0,
- $isweight = 'N'
-) {
+function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlelen=30, $infolen=160, $imgwidth=120, $imgheight=90, $listtype='all', $orderby='default', $keyword='', $innertext='', $arcid=0, $idlist='', $channelid=0, $limit='', $att='', $order='desc', $subday=0, $noflag='',$tagid='', $pagesize=0, $isweight='N',$notypeid=0)
+{
global $dsql, $PubFields, $cfg_keyword_like, $cfg_index_cache, $_arclistEnv, $envs, $cfg_cache_type, $cfg_digg_update;
$row = AttDef($row, 10);
$titlelen = AttDef($titlelen, 30);
@@ -186,7 +125,6 @@ function lib_arclistDone(
$orderby = strtolower($orderby);
$keyword = trim($keyword);
$innertext = trim($innertext);
-
$tablewidth = $ctag->GetAtt('tablewidth');
$writer = $ctag->GetAtt('writer');
if ($tablewidth == "") $tablewidth = 100;
@@ -194,36 +132,14 @@ function lib_arclistDone(
$colWidth = ceil(100 / $col);
$tablewidth = $tablewidth."%";
$colWidth = $colWidth."%";
-
//记录属性,以便分页样式统一调用
- $attarray = compact(
- "row",
- "titlelen",
- 'infolen',
- 'imgwidth',
- 'imgheight',
- 'listtype',
- 'arcid',
- 'channelid',
- 'orderby',
- 'orderWay',
- 'subday',
- 'pagesize',
- 'orderby',
- 'keyword',
- 'tablewidth',
- 'col',
- 'colWidth'
- );
-
+ $attarray = compact('row', 'titlelen', 'infolen', 'imgwidth', 'imgheight', 'listtype', 'arcid', 'channelid', 'orderby', 'orderWay', 'subday', 'pagesize', 'orderby', 'keyword', 'tablewidth', 'col', 'colWidth');
if ($innertext == '') $innertext = GetSysTemplets('part_arclist.htm');
if (@$ctag->GetAtt('getall') == 1) $getall = 1;
else $getall = 0;
-
if ($att == '0') $att = '';
if ($att == '3') $att = 'f';
if ($att == '1') $att = 'h';
-
$orwheres = array();
$maintable = '#@__archives';
//按不同情况设定SQL条件 排序方式
@@ -231,19 +147,17 @@ function lib_arclistDone(
if ($orderby == 'near' && $cfg_keyword_like == 'N') {
$keyword = '';
}
-
if ($writer == 'this') {
$wmid = isset($refObj->Fields['mid']) ? $refObj->Fields['mid'] : 0;
$orwheres[] = " arc.mid = '$wmid' ";
}
-
//时间限制(用于调用最近热门文章、热门评论之类),这里的时间只能计算到天,否则缓存功能将无效
if ($subday > 0) {
$ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y'));
$limitday = $ntime - ($subday * 24 * 3600);
$orwheres[] = " arc.senddate > $limitday ";
}
- //关键字条件
+ //关键词条件
if ($keyword != '') {
$keyword = str_replace(',', '|', $keyword);
$orwheres[] = " CONCAT(arc.title,arc.keywords) REGEXP '$keyword' ";
@@ -255,7 +169,6 @@ function lib_arclistDone(
$flags = explode(',', $att);
for ($i = 0; isset($flags[$i]); $i++) $orwheres[] = " FIND_IN_SET('{$flags[$i]}', arc.flag)>0 ";
}
-
if (!empty($typeid) && $typeid != 'top') {
//指定了多个栏目时,不再获取子类的id
if (preg_match('#,#', $typeid)) {
@@ -299,12 +212,9 @@ function lib_arclistDone(
else $orwheres[] = ' arc.typeid IN ('.GetSonIds($typeid).','.$CrossID.')';
}
}
-
//频道ID
if (preg_match('#spec#i', $listtype)) $channelid == -1;
-
if (!empty($channelid)) $orwheres[] = " And arc.channel = '$channelid' ";
-
if (!empty($noflag)) {
if (!preg_match('#,#', $noflag)) {
$orwheres[] = " FIND_IN_SET('$noflag', arc.flag)<1 ";
@@ -316,13 +226,14 @@ function lib_arclistDone(
}
}
}
-
- $orwheres[] = ' arc.arcrank > -1 ';
-
+ $orwheres[] = 'arc.arcrank > -1';
+ if(!empty($notypeid))
+ {
+ $orwheres[] = "and arc.typeid NOT IN (".GetSonIds($notypeid).")";
+ }
//由于这个条件会导致缓存功能失去意义,因此取消
//if($arcid!=0) $orwheres[] = " arc.id<>'$arcid' ";
}
-
//文档排序的方式
$ordersql = '';
if ($orderby == 'hot' || $orderby == 'click') $ordersql = " ORDER BY arc.click $orderWay";
@@ -331,12 +242,11 @@ function lib_arclistDone(
else if ($orderby == 'near') $ordersql = " ORDER BY ABS(arc.id - ".$arcid.")";
else if ($orderby == 'lastpost') $ordersql = " ORDER BY arc.lastpost $orderWay";
else if ($orderby == 'scores') $ordersql = " ORDER BY arc.scores $orderWay";
- //功能:增加按好评数和差评数调用
+ //增加按好评数和差评数调用
else if ($orderby == 'goodpost') $ordersql = " order by arc.goodpost $orderWay";
else if ($orderby == 'badpost') $ordersql = " order by arc.badpost $orderWay";
else if ($orderby == 'rand') $ordersql = " ORDER BY rand()";
else $ordersql = " ORDER BY arc.sortrank $orderWay";
-
//limit条件
$limit = trim(preg_replace('#limit#is', '', $limit));
if ($limit != '') {
@@ -344,7 +254,6 @@ function lib_arclistDone(
$limitarr = explode(',', $limit);
$line = isset($limitarr[1]) ? $limitarr[1] : $line;
} else $limitsql = " LIMIT 0,$line ";
-
$orwhere = '';
if (isset($orwheres[0])) {
$orwhere = join(' And ', $orwheres);
@@ -352,7 +261,6 @@ function lib_arclistDone(
$orwhere = preg_replace("#And[ ]{1,}And#is", 'And ', $orwhere);
}
if ($orwhere != '') $orwhere = " WHERE $orwhere ";
-
//获取附加表信息
$addfield = trim($ctag->GetAtt('addfields'));
$addfieldsSql = '';
@@ -367,20 +275,17 @@ function lib_arclistDone(
$addfieldsSqlJoin = " LEFT JOIN `$addtable` addf ON addf.aid = arc.id ";
}
}
-
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,
tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
$addfieldsSql
FROM `$maintable` arc LEFT JOIN `#@__arctype` tp on arc.typeid=tp.id
$addfieldsSqlJoin
$orwhere $ordersql $limitsql";
-
//统一hash
$taghash = md5(serialize($ctag).$typeid);
$needSaveCache = true;
//进行tagid的默认处理
if ($pagesize > 0) $tagid = AttDef($tagid, 'tag'.$taghash);
-
if ($idlist != '' || $GLOBALS['_arclistEnv'] == 'index' || $cfg_index_cache == 0) {
$needSaveCache = false;
} else {
@@ -394,20 +299,16 @@ function lib_arclistDone(
return $idlist;
}
}
-
//指定了id或使用缓存中的id
if ($idlist != '') {
- $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,
- tp.moresite,tp.siteurl,tp.sitepath
- $addfieldsSql
- FROM `$maintable` arc left join `#@__arctype` tp on arc.typeid=tp.id
- $addfieldsSqlJoin
- WHERE arc.id in($idlist) $ordersql ";
+ $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
+ $addfieldsSql
+ FROM `$maintable` arc left join `#@__arctype` tp on arc.typeid=tp.id
+ $addfieldsSqlJoin
+ WHERE arc.id in($idlist) $ordersql ";
}
-
$dsql->SetQuery($query);
$dsql->Execute('al');
- //$row = $dsql->GetArray("al");
$artlist = '';
if ($pagesize > 0) $artlist .= " \r\n";
if ($col > 1) $artlist = "
\r\n";
@@ -417,7 +318,6 @@ function lib_arclistDone(
$GLOBALS['autoindex'] = 0;
$ids = array();
$orderWeight = array();
-
for ($i = 0; $i < $line; $i++) {
if ($col > 1) $artlist .= "\r\n";
for ($j = 0; $j < $col; $j++) {
@@ -427,11 +327,9 @@ function lib_arclistDone(
//处理一些特殊字段
$row['info'] = $row['infos'] = cn_substr($row['description'], $infolen);
$row['id'] = $row['id'];
-
if ($row['corank'] > 0 && $row['arcrank'] == 0) {
$row['arcrank'] = $row['corank'];
}
-
$row['filename'] = $row['arcurl'] = GetFileUrl(
$row['id'],
$row['typeid'],
@@ -447,7 +345,6 @@ function lib_arclistDone(
$row['siteurl'],
$row['sitepath']
);
-
$row['typeurl'] = GetTypeUrl(
$row['typeid'],
$row['typedir'],
@@ -459,7 +356,6 @@ function lib_arclistDone(
$row['siteurl'],
$row['sitepath']
);
-
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif';
}
@@ -473,15 +369,13 @@ function lib_arclistDone(
$row['imglink'] = "".$row['image']." ";
$row['fulltitle'] = $row['title'];
$row['title'] = cn_substr($row['title'], $titlelen);
- if ($row['color'] != '') $row['title'] = "".$row['title']." ";
+ if ($row['color'] != '') $row['title'] = "".$row['title']." ";
if (preg_match('#b#', $row['flag'])) $row['title'] = "".$row['title']." ";
//$row['title'] = "".$row['title']." ";
$row['textlink'] = "".$row['title']." ";
-
$row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl'];
$row['memberurl'] = $GLOBALS['cfg_memberurl'];
$row['templeturl'] = $GLOBALS['cfg_templeturl'];
-
if (is_array($dtp2->CTags)) {
foreach ($dtp2->CTags as $k => $ctag) {
if ($ctag->GetName() == 'array') {
@@ -513,13 +407,12 @@ function lib_arclistDone(
'weight' => $row['weight'],
'arclist' => $liststr
);
- } //if hasRow
+ }//if hasRow
else {
$artlist .= '';
}
-
- // 进行判断,如果启用排序则内容输出为重新排序后的内容
- // var_dump($isweight=='y' && count($orderWeight) == $line);
+ //进行判断,如果启用排序则内容输出为重新排序后的内容
+ //var_dump($isweight=='y' && count($orderWeight) == $line);
$isweight = strtolower($isweight);
if ($isweight == 'y') {
$artlist = '';
@@ -530,14 +423,13 @@ function lib_arclistDone(
}
}
if ($col > 1) $artlist .= " \r\n";
- } //Loop Col
+ }//Loop Col
if ($col > 1) $i += $col - 1;
if ($col > 1) $artlist .= " \r\n";
- } //loop line
+ }//loop line
if ($col > 1) $artlist .= "
\r\n";
$dsql->FreeResult("al");
$idsstr = join(',', $ids);
-
//分页特殊处理
if ($pagesize > 0) {
$artlist .= "
\r\n";
@@ -551,22 +443,10 @@ function lib_arclistDone(
";
$dsql->ExecuteNoneQuery($query);
} else {
- $query = "UPDATE `#@__arcmulti`
- SET
- uptime='$uptime',
- innertext='$innertext',
- pagesize='$pagesize',
- arcids='$idsstr',
- ordersql='$ordersql',
- addfieldsSql='$addfieldsSql',
- addfieldsSqlJoin='$addfieldsSqlJoin',
- attstr='$attstr'
- WHERE tagid='$tagid'
- ";
+ $query = "UPDATE `#@__arcmulti` SET uptime='$uptime', innertext='$innertext', pagesize='$pagesize', arcids='$idsstr', ordersql='$ordersql', addfieldsSql='$addfieldsSql', addfieldsSqlJoin='$addfieldsSqlJoin', attstr='$attstr' WHERE tagid='$tagid'";
$dsql->ExecuteNoneQuery($query);
}
}
-
//保存ID缓存
if ($needSaveCache) {
if ($idsstr == '') $idsstr = '0';
@@ -579,7 +459,6 @@ function lib_arclistDone(
}
return $artlist;
}
-
/**
* 查询缓存
*
@@ -602,7 +481,6 @@ function GetArclistCache($md5hash)
return $arr['cachedata'];
}
}
-
/**
* 获取自动频道ID
*
@@ -620,15 +498,13 @@ function lib_GetAutoChannelID($sortid, $topid)
if (!is_array($row)) return 0;
else return $row['id'];
}
-
/**
* 对查询结果集进行排序
*
* @access public
* @param array $list 查询结果
* @param string $field 排序的字段名
- * @param array $sortby 排序类型
- * asc正向排序 desc逆向排序 nat自然排序
+ * @param array $sortby 排序类型 asc正向排序 desc逆向排序 nat自然排序
* @return array
*/
function list_sort_by($list, $field, $sortby = 'asc')
@@ -638,13 +514,13 @@ function list_sort_by($list, $field, $sortby = 'asc')
foreach ($list as $i => $data)
$refer[$i] = &$data[$field];
switch ($sortby) {
- case 'asc': // 正向排序
+ case 'asc'://正向排序
asort($refer);
break;
- case 'desc': // 逆向排序
+ case 'desc'://逆向排序
arsort($refer);
break;
- case 'nat': // 自然排序
+ case 'nat'://自然排序
natcasesort($refer);
break;
}
@@ -653,4 +529,4 @@ function list_sort_by($list, $field, $sortby = 'asc')
return $resultSet;
}
return false;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/arclistsg.lib.php b/src/system/taglib/arclistsg.lib.php
similarity index 95%
rename from src/include/taglib/arclistsg.lib.php
rename to src/system/taglib/arclistsg.lib.php
index ea52fb86..c61d0f6a 100755
--- a/src/include/taglib/arclistsg.lib.php
+++ b/src/system/taglib/arclistsg.lib.php
@@ -1,5 +1,4 @@
CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$line = $row;
$orderby = strtolower($sort);
if ($col == '') $col = 1;
@@ -35,31 +30,23 @@ function lib_arclistsg(&$ctag, &$refObj)
if (empty($imgheight)) $imgheight = "";
$innertext = trim($ctag->GetInnerText());
if ($innertext == '') $innertext = GetSysTemplets("part_arclistsg.htm");
-
if (empty($channelid) && isset($GLOBALS['envs']['channelid'])) {
$channelid = $GLOBALS['envs']['channelid'];
}
-
if (empty($typeid) && !empty($envs['typeid'])) {
$typeid = $envs['typeid'];
}
-
if (empty($typeid) && empty($channelid)) {
return "No channel info!";
}
-
if (!empty($channelid)) $gquery = "SELECT addtable,listfields FROM `#@__channeltype` WHERE id='$channelid' ";
else $gquery = "SELECT ch.addtable,listfields FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE id='$typeid'";
-
$row = $dsql->GetOne($gquery);
-
$orwheres = array();
$maintable = trim($row['addtable']);
-
if ($maintable == '') {
return "No addtable info!";
}
-
//列表调用字段
$listarcs = array('aid', 'typeid');
if (!empty($row['listfields'])) {
@@ -70,7 +57,6 @@ function lib_arclistsg(&$ctag, &$refObj)
}
$arclistquery = join(',', $listarcs);
$arclistquery .= ",arc.aid AS id,arc.senddate AS pubdate";
-
//按不同情况设定SQL条件 排序方式
if ($idlist == '') {
if ($orderby == 'near' && $cfg_keyword_like == 'N') {
@@ -83,12 +69,10 @@ function lib_arclistsg(&$ctag, &$refObj)
$limitday = $ntime - ($subday * 24 * 3600);
$orwheres[] = " arc.senddate > $limitday ";
}
-
if ($flag != '') {
$flags = explode(',', $flag);
for ($i = 0; isset($flags[$i]); $i++) $orwheres[] = " FIND_IN_SET('{$flags[$i]}',flag)>0 ";
}
-
if (!empty($typeid)) {
//指定了多个栏目时,不再获取子类的id
if (preg_match('#,#', $typeid)) $orwheres[] = " typeid IN ($typeid) ";
@@ -107,7 +91,6 @@ function lib_arclistsg(&$ctag, &$refObj)
$arr['crossid'] = preg_replace('#[^0-9,]#', '', trim($arr['crossid']));
if ($arr['crossid'] != '') $selquery = "SELECT id,topid FROM `#@__arctype` WHERE id IN('{$arr['crossid']}') AND id<>'{$typeid}' AND topid<>'{$typeid}' ";
}
-
if ($selquery != '') {
$dsql->SetQuery($selquery);
$dsql->Execute();
@@ -122,9 +105,7 @@ function lib_arclistsg(&$ctag, &$refObj)
}
}
//频道ID
-
if (!empty($channelid)) $orwheres[] = " AND arc.channel = '$channelid' ";
-
//由于这个条件会导致缓存功能失去意义,因此取消
//if($arcid!=0) $orwheres[] = " arc.id<>'$arcid' ";
}
@@ -139,7 +120,6 @@ function lib_arclistsg(&$ctag, &$refObj)
$limit = trim(preg_replace('#limit#i', '', $limit));
if ($limit != '') $limitsql = " LIMIT $limit ";
else $limitsql = " LIMIT 0,$line ";
-
$orwhere = '';
if (isset($orwheres[0])) {
$orwhere = join(' AND ', $orwheres);
@@ -147,12 +127,9 @@ function lib_arclistsg(&$ctag, &$refObj)
$orwhere = preg_replace("#AND[ ]{1,}AND#i", 'AND ', $orwhere);
}
if ($orwhere != '') $orwhere = " WHERE $orwhere ";
-
- $query = "SELECT $arclistquery,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,
- tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
- FROM `$maintable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
- $orwhere AND arc.arcrank > -1 $ordersql $limitsql";
-
+ $query = "SELECT $arclistquery,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
+ FROM `$maintable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
+ $orwhere AND arc.arcrank > -1 $ordersql $limitsql";
$md5hash = md5($query);
$needcache = TRUE;
if ($idlist != '') $needcache = FALSE;
@@ -179,7 +156,6 @@ function lib_arclistsg(&$ctag, &$refObj)
if ($col > 1) $artlist .= " \r\n";
if ($row = $dsql->GetArray("al")) {
$ids[] = $row['aid'];
-
$row['filename'] = $row['arcurl'] = GetFileUrl(
$row['id'],
$row['typeid'],
@@ -195,7 +171,6 @@ function lib_arclistsg(&$ctag, &$refObj)
$row['siteurl'],
$row['sitepath']
);
-
$row['typeurl'] = GetTypeUrl(
$row['typeid'],
$row['typedir'],
@@ -207,7 +182,6 @@ function lib_arclistsg(&$ctag, &$refObj)
$row['siteurl'],
$row['sitepath']
);
-
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif';
}
@@ -215,11 +189,8 @@ function lib_arclistsg(&$ctag, &$refObj)
$row['litpic'] = $GLOBALS['cfg_mainsite'].$row['litpic'];
}
$row['picname'] = $row['litpic'];
-
$row['image'] = "
<]#", "", $row['title'])."' />";
-
$row['imglink'] = "
".$row['image']." ";
-
$row['stime'] = GetDateMK($row['pubdate']);
$row['typelink'] = "
".$row['typename']." ";
$row['fulltitle'] = $row['title'];
@@ -228,7 +199,6 @@ function lib_arclistsg(&$ctag, &$refObj)
$row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl'];
$row['memberurl'] = $GLOBALS['cfg_memberurl'];
$row['templeturl'] = $GLOBALS['cfg_templeturl'];
-
if (is_array($dtp2->CTags)) {
foreach ($dtp2->CTags as $k => $ctag) {
if ($ctag->GetName() == 'array') {
@@ -241,7 +211,6 @@ function lib_arclistsg(&$ctag, &$refObj)
}
$GLOBALS['autoindex']++;
}
-
$artlist .= $dtp2->GetResult()."\r\n";
} //if hasRow
else {
@@ -262,7 +231,6 @@ function lib_arclistsg(&$ctag, &$refObj)
}
return $artlist;
}
-
//查询缓存
function GetArclistSgCache($md5hash)
{
@@ -279,7 +247,6 @@ function GetArclistSgCache($md5hash)
//返回缓存id数据
else return $arr['cachedata'];
}
-
function lib_GetAutoChannelID2($sortid, $topid)
{
global $dsql;
@@ -288,4 +255,4 @@ function lib_GetAutoChannelID2($sortid, $topid)
$row = $dsql->GetOne("SELECT id,typename From #@__arctype WHERE reid='{$topid}' AND ispart<2 AND ishidden<>'1' ORDER BY sortrank asc limit $getstart,1");
if (!is_array($row)) return 0;
else return $row['id'];
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/arcpagelist.lib.php b/src/system/taglib/arcpagelist.lib.php
similarity index 94%
rename from src/include/taglib/arcpagelist.lib.php
rename to src/system/taglib/arcpagelist.lib.php
index f0946bf5..a7e58969 100755
--- a/src/include/taglib/arcpagelist.lib.php
+++ b/src/system/taglib/arcpagelist.lib.php
@@ -1,4 +1,5 @@
-CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$row = $dsql->GetOne("SELECT * FROM `#@__arcmulti` WHERE tagid='$tagid'");
if (is_array($row)) {
$ids = explode(',', $row['arcids']);
-
$totalnum = count($ids);
$pagestr = '
';
if ($row['pagesize'] < $totalnum) {
@@ -36,7 +34,6 @@ function lib_arcpagelist(&$ctag, &$refObj)
return $pagestr;
}
}
-
/**
* 分页函数
*
@@ -50,22 +47,16 @@ function lib_arcpagelist(&$ctag, &$refObj)
function multipage($allItemTotal, $currPageNum, $pageSize, $tagid = '')
{
if ($allItemTotal == 0) return "";
-
//计算总页数
$pagesNum = ceil($allItemTotal / $pageSize);
-
//第一页显示
$firstPage = ($currPageNum <= 1) ? $currPageNum."<<" : "
1<< ";
-
//最后一页显示
$lastPage = ($currPageNum >= $pagesNum) ? ">>".$currPageNum : "
>>".$pagesNum." ";
-
//上一页显示
$prePage = ($currPageNum <= 1) ? "上页" : "
[上一页] ";
-
//下一页显示
$nextPage = ($currPageNum >= $pagesNum) ? "下页" : "
[下一页] ";
-
//按页显示
$listNums = "";
for ($i = ($currPageNum - 4); $i < ($currPageNum + 9); $i++) {
@@ -73,7 +64,6 @@ function multipage($allItemTotal, $currPageNum, $pageSize, $tagid = '')
if ($i == $currPageNum) $listNums .= "
".$i." ";
else $listNums .= "
".$i." ";
}
-
$returnUrl = $listNums;
return $returnUrl;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/autochannel.lib.php b/src/system/taglib/autochannel.lib.php
similarity index 87%
rename from src/include/taglib/autochannel.lib.php
rename to src/system/taglib/autochannel.lib.php
index 38566f33..f50cd81f 100755
--- a/src/include/taglib/autochannel.lib.php
+++ b/src/system/taglib/autochannel.lib.php
@@ -1,4 +1,5 @@
-CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$innertext = trim($ctag->GetInnerText());
$topid = $typeid;
$sortid = $partsort;
-
if ($topid == '-1' || $topid == '') {
$topid = (isset($refObj->TypeLink->TypeInfos['id']) ? $refObj->TypeLink->TypeInfos['id'] : 0);
}
-
if (empty($sortid)) $sortid = 1;
$getstart = $sortid - 1;
-
- $row = $dsql->GetOne("SELECT id,typename FROM `#@__arctype` WHERE reid='{$topid}' AND
- ispart<2 AND ishidden<>'1' ORDER BY sortrank asc limit $getstart,1");
-
+ $row = $dsql->GetOne("SELECT id,typename FROM `#@__arctype` WHERE reid='{$topid}' AND ispart<2 AND ishidden<>'1' ORDER BY sortrank asc limit $getstart,1");
if (!is_array($row)) return '';
else $typeid = $row['id'];
-
if (trim($innertext) == '') $innertext = GetSysTemplets('part_autochannel.htm');
-
$row = $dsql->GetOne("SELECT id,typedir,isdefault,defaultname,ispart,namerule2,typename,moresite,siteurl,sitepath
- FROM `#@__arctype` WHERE id='$typeid' ");
+ FROM `#@__arctype` WHERE id='$typeid' ");
if (!is_array($row)) return '';
-
$dtp = new DedeTagParse();
$dtp->SetNameSpace('field', '[', ']');
$dtp->LoadSource($innertext);
@@ -64,4 +54,4 @@ function lib_autochannel(&$ctag, &$refObj)
unset($dtp);
return $revalue;
}
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/cattree.lib.php b/src/system/taglib/cattree.lib.php
similarity index 96%
rename from src/include/taglib/cattree.lib.php
rename to src/system/taglib/cattree.lib.php
index 5f001d47..3cd29d3e 100755
--- a/src/include/taglib/cattree.lib.php
+++ b/src/system/taglib/cattree.lib.php
@@ -1,4 +1,5 @@
-CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$revalue = '';
-
if (empty($typeid)) {
if (isset($refObj->TypeLink->TypeInfos['id'])) {
$typeid = $refObj->TypeLink->TypeInfos['id'];
@@ -65,7 +64,6 @@ function lib_cattree(&$ctag, &$refObj)
}
return $revalue;
}
-
function cattreeListSon($id, &$revalue)
{
global $dsql;
@@ -80,4 +78,4 @@ function cattreeListSon($id, &$revalue)
$thisv .= " \n";
}
if ($thisv != '') $revalue .= "
\n$thisv \n";
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/channel.lib.php b/src/system/taglib/channel.lib.php
similarity index 100%
rename from src/include/taglib/channel.lib.php
rename to src/system/taglib/channel.lib.php
diff --git a/src/include/taglib/channel/img.lib.php b/src/system/taglib/channel/img.lib.php
similarity index 91%
rename from src/include/taglib/channel/img.lib.php
rename to src/system/taglib/channel/img.lib.php
index 570e29bd..bf6bac6a 100755
--- a/src/include/taglib/channel/img.lib.php
+++ b/src/system/taglib/channel/img.lib.php
@@ -1,7 +1,5 @@
GetAtt('pagesize') > 0) {
$pagesize = $arcTag->GetAtt('pagesize');
}
@@ -105,7 +99,7 @@ function ch_img($fvalue, &$arcTag, &$refObj, $fname = '')
if ($pagestyle == 1) {
$fields['imgwidth'] = '';
$fields['linkurl'] = $fields['imgsrc'];
- $fields['textlink'] = "
{$fields['text']} ";
+ $fields['textlink'] = "
{$fields['text']} ";
} else if ($pagestyle == 2) {
if ($fields['width'] > $maxwidth) {
$fields['imgwidth'] = " width='$maxwidth' ";
@@ -114,7 +108,7 @@ function ch_img($fvalue, &$arcTag, &$refObj, $fname = '')
}
$fields['linkurl'] = $fields['imgsrc'];
if ($fields['text'] != '') {
- $fields['textlink'] = "
{$fields['text']} \r\n";
+ $fields['textlink'] = "
{$fields['text']} \r\n";
} else {
$fields['textlink'] = '';
}
@@ -136,4 +130,4 @@ function ch_img($fvalue, &$arcTag, &$refObj, $fname = '')
}
}
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/channel/softlinks.lib.php b/src/system/taglib/channel/softlinks.lib.php
similarity index 95%
rename from src/include/taglib/channel/softlinks.lib.php
rename to src/system/taglib/channel/softlinks.lib.php
index 9518ec70..02a33609 100755
--- a/src/include/taglib/channel/softlinks.lib.php
+++ b/src/system/taglib/channel/softlinks.lib.php
@@ -1,5 +1,5 @@
Clear();
return "无链接信息";
}
- // 去除链接信息
+ //去除链接信息
if (!empty($row['sites'])) {
$sertype_arr = array();
$row['sites'] = preg_replace("#[\r\n]{1,}#", "\n", $row['sites']);
@@ -61,7 +59,6 @@ function ch_softlinks_all($fvalue, &$ctag, &$refObj, &$row)
$sertype_arr[trim($serverName)] = trim($serverType);
}
}
-
$tempStr = GetSysTemplets('channel_downlinks.htm');
$downlinks = '';
foreach ($dtp->CTags as $ctag) {
@@ -70,11 +67,9 @@ function ch_softlinks_all($fvalue, &$ctag, &$refObj, &$row)
$serverName = trim($ctag->GetAtt('text'));
$islocal = trim($ctag->GetAtt('islocal'));
if (isset($sertype_arr[$serverName]) && $islinktype && $sertype_arr[$serverName] != $link_type) continue;
-
//分析本地链接
if (!isset($firstLink) && $islocal == 1) $firstLink = $link;
if ($islocal == 1 && $row['islocal'] != 1) continue;
-
//支持http,迅雷下载,ftp,flashget
if (!preg_match("#^http:\/\/|^thunder:\/\/|^ftp:\/\/|^flashget:\/\/#i", $link)) {
$link = $GLOBALS['cfg_mainsite'].$link;
@@ -116,7 +111,6 @@ function ch_softlinks_all($fvalue, &$ctag, &$refObj, &$row)
}
return $downlinks;
}
-
function getDownloads($url)
{
global $dsql;
@@ -129,4 +123,4 @@ function getDownloads($url)
$downloads = 0;
}
return $downloads;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/channel/specialtopic.lib.php b/src/system/taglib/channel/specialtopic.lib.php
similarity index 92%
rename from src/include/taglib/channel/specialtopic.lib.php
rename to src/system/taglib/channel/specialtopic.lib.php
index 07c1103f..da5718e5 100755
--- a/src/include/taglib/channel/specialtopic.lib.php
+++ b/src/system/taglib/channel/specialtopic.lib.php
@@ -1,4 +1,5 @@
-GetAtt('keywords'));
$stypeid = $ctag->GetAtt('typeid');
}
-
$listTemplet = trim($ctag->GetInnerText()) != '' ? $ctag->GetInnerText() : GetSysTemplets('spec_arclist.htm');
-
$idvalue = lib_arclistDone(
$refObj,
$ctag,
@@ -69,4 +66,4 @@ function ch_specialtopic($noteinfo, $arcTag, $refObj, $fname = '')
}
$dtp->Clear();
return $rvalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/channel/stepselect.lib.php b/src/system/taglib/channel/stepselect.lib.php
similarity index 95%
rename from src/include/taglib/channel/stepselect.lib.php
rename to src/system/taglib/channel/stepselect.lib.php
index cd4f1134..418f3dea 100755
--- a/src/include/taglib/channel/stepselect.lib.php
+++ b/src/system/taglib/channel/stepselect.lib.php
@@ -1,11 +1,9 @@
CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$innertext = trim($ctag->GetInnerText());
@@ -42,6 +42,10 @@ function lib_channelartlist(&$ctag, &$refObj)
$tpsql = " id IN($typeid) AND ispart<>2 AND ishidden<>1 ";
}
}
+ //否定指定栏目
+ if($notypeid!=0) {
+ $tpsql = $tpsql."and not(id in($notypeid))";
+ }
$dsql->SetQuery("SELECT * FROM `#@__arctype` WHERE $tpsql ORDER BY sortrank ASC LIMIT $totalnum");
$dsql->Execute();
while ($row = $dsql->GetArray()) {
diff --git a/src/include/taglib/comment.lib.php b/src/system/taglib/comment.lib.php
similarity index 91%
rename from src/include/taglib/comment.lib.php
rename to src/system/taglib/comment.lib.php
index c289cca7..c372dec2 100644
--- a/src/include/taglib/comment.lib.php
+++ b/src/system/taglib/comment.lib.php
@@ -8,9 +8,8 @@
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/
-
-// 只是用于进行注释
+//只是用于进行注释
function lib_comment(&$ctag, &$refObj)
{
return "";
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/demotag.lib.php b/src/system/taglib/demotag.lib.php
similarity index 75%
rename from src/include/taglib/demotag.lib.php
rename to src/system/taglib/demotag.lib.php
index 9b7b4080..70412a10 100755
--- a/src/include/taglib/demotag.lib.php
+++ b/src/system/taglib/demotag.lib.php
@@ -1,7 +1,5 @@
CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$revalue = '';
-
//您需编写的代码,不能用echo之类语法,把最终返回值传给$revalue
- //------------------------------------------------------
-
$revalue = 'Hello Word!';
-
- //------------------------------------------------------
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/feedback.lib.php b/src/system/taglib/feedback.lib.php
similarity index 94%
rename from src/include/taglib/feedback.lib.php
rename to src/system/taglib/feedback.lib.php
index fb10b251..fc0c32d4 100755
--- a/src/include/taglib/feedback.lib.php
+++ b/src/system/taglib/feedback.lib.php
@@ -1,7 +1,5 @@
CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
@@ -40,18 +36,14 @@ function lib_feedback(&$ctag, &$refObj)
}
}
$wsql = " WHERE fb.ischeck=1 AND fb.fid=0 ";
-
if (get_class($refObj) === "Archives" && isset($refObj->Fields["id"])) {
$wsql .= " AND fb.aid='{$refObj->Fields["id"]}'";
}
-
$equery = "SELECT fb.*,mb.userid,mb.face as mface,mb.spacesta,mb.scores,mb.sex FROM `#@__feedback` fb
LEFT JOIN `#@__member` mb on mb.mid = fb.mid $wsql $order LIMIT 0 , $totalrow";
-
$ctp = new DedeTagParse();
$ctp->SetNameSpace('field', '[', ']');
$ctp->LoadSource($innertext);
-
$dsql->Execute('fb', $equery);
while ($arr = $dsql->GetArray('fb')) {
$arr['face'] = empty($arr['mface']) ? $GLOBALS['cfg_cmspath'].'/static/img/avatar.png' : $arr['mface'];
@@ -64,7 +56,6 @@ function lib_feedback(&$ctag, &$refObj)
}
return $revalue;
}
-
function jsTrim($str, $len)
{
$str = preg_replace("/{quote}(.*){\/quote}/is", '', $str);
@@ -72,4 +63,4 @@ function jsTrim($str, $len)
$str = cn_substr($str, $len);
$str = preg_replace("#['\"\r\n]#", "", $str);
return $str;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/flink.lib.php b/src/system/taglib/flink.lib.php
similarity index 89%
rename from src/include/taglib/flink.lib.php
rename to src/system/taglib/flink.lib.php
index c70f8c65..0225f063 100755
--- a/src/include/taglib/flink.lib.php
+++ b/src/system/taglib/flink.lib.php
@@ -1,7 +1,5 @@
= '$linktype' ";
-
if ($typeid == 0) {
$wsql .= '';
} else {
@@ -38,25 +33,21 @@ function lib_flink(&$ctag, &$refObj)
} else if ($type == 'text') {
$wsql .= " And logo='' ";
}
-
$equery = "SELECT * FROM `#@__flink` $wsql order by sortrank asc limit 0,$totalrow";
-
if (trim($ctag->GetInnerText()) == '') $innertext = "[field:link /] ";
else $innertext = $ctag->GetInnerText();
-
$dsql->SetQuery($equery);
$dsql->Execute();
-
while ($dbrow = $dsql->GetObject()) {
if ($type == 'text' || $type == 'textall') {
$link = "
".cn_substr($dbrow->webname, $titlelen)." ";
} else if ($type == 'image') {
- $link = "
";
+ $link = "
";
} else {
if ($dbrow->logo == '') {
$link = "
".cn_substr($dbrow->webname, $titlelen)." ";
} else {
- $link = "
";
+ $link = "
";
}
}
$rbtext = preg_replace("/\[field:url([\/\s]{0,})\]/isU", $dbrow->url, $innertext);
@@ -66,4 +57,4 @@ function lib_flink(&$ctag, &$refObj)
$revalue .= $rbtext;
}
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/flinktype.lib.php b/src/system/taglib/flinktype.lib.php
similarity index 93%
rename from src/include/taglib/flinktype.lib.php
rename to src/system/taglib/flinktype.lib.php
index 9f787740..8e3c3f38 100755
--- a/src/include/taglib/flinktype.lib.php
+++ b/src/system/taglib/flinktype.lib.php
@@ -1,7 +1,5 @@
CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$totalrow = $row;
$revalue = '';
-
$equery = "SELECT * FROM `#@__flinktype` order by id asc limit 0,$totalrow";
-
if (trim($ctag->GetInnerText()) == '') $innertext = "
[field:typename /] ";
else $innertext = $ctag->GetInnerText();
if (!isset($type)) $type = '';
$dtp = new DedeTagParse();
$dtp->SetNameSpace("dede", "{", "}");
$dtp->LoadString($innertext);
-
$dsql->SetQuery($equery);
$dsql->Execute();
$rs = '';
@@ -43,7 +36,6 @@ function lib_flinktype(&$ctag, &$refObj)
$DedeBIZ->id = 999;
$DedeBIZ->typename = '织梦链';
if ($type == 'DedeBIZ') $row[] = $DedeBIZ;
-
foreach ($row as $key => $value) {
if (is_array($dtp->CTags)) {
$GLOBALS['envs']['flinkid'] = $value->id;
@@ -59,4 +51,4 @@ function lib_flinktype(&$ctag, &$refObj)
}
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/help/adminname.txt b/src/system/taglib/help/adminname.txt
similarity index 100%
rename from src/include/taglib/help/adminname.txt
rename to src/system/taglib/help/adminname.txt
diff --git a/src/include/taglib/help/arclist.txt b/src/system/taglib/help/arclist.txt
similarity index 91%
rename from src/include/taglib/help/arclist.txt
rename to src/system/taglib/help/arclist.txt
index 43a19dbb..2221a9cd 100755
--- a/src/include/taglib/help/arclist.txt
+++ b/src/system/taglib/help/arclist.txt
@@ -12,7 +12,7 @@ titlelen = '30' 标题长度 等同于titlelength
infolen='160' 表示内容简介长度 等同于infolength
imgwidth='120' 缩略图宽度
imgheight='90' 缩略图高度
-listtype='all' 栏目类型(顶级栏目??)
+listtype='all' 栏目类型(顶级栏目)
orderby='sortrank' 文档排序方式
§ orderby='hot' 或 orderby='click' 表示按点击数排列
§ orderby='sortrank' 或 orderby='pubdate' 按出版时间排列
@@ -21,7 +21,7 @@ orderby='sortrank' 文档排序方式
§ orderby=='scores' 按得分排序
§ orderby='id' 按文章ID排序
§ orderby='rand' 随机获得指定条件的文档列表
-keyword='' 含有指定关键字的文档列表,多个关键字用","分
+keyword='' 含有指定关键词的文档列表,多个关键词用","分
innertext = '' 单条记录样式
aid='' 指定文档ID
idlist ='' 提取特定文档(文档ID)
diff --git a/src/include/taglib/help/arclistsg.txt b/src/system/taglib/help/arclistsg.txt
similarity index 92%
rename from src/include/taglib/help/arclistsg.txt
rename to src/system/taglib/help/arclistsg.txt
index 1c34fd57..67579702 100755
--- a/src/include/taglib/help/arclistsg.txt
+++ b/src/system/taglib/help/arclistsg.txt
@@ -9,7 +9,7 @@ row='10' 返回文档列表总数
typeid='' 栏目ID,在列表模板和档案模板中一般不需要指定,在封面模板中允许用","分开表示多个栏目;
titlelen = '30' 标题长度 等同于titlelength
orderwey='desc'或'asc' 排序方向
-keyword= 含有指定关键字的文档列表,多个关键字用","分
+keyword= 含有指定关键词的文档列表,多个关键词用","分
innertext = "
[field:title/] " 单条记录样式(innertext是放在标签之间的代码)
arcid='' 指定文档ID
idlist ='' 提取特定文档(文档ID)
diff --git a/src/include/taglib/help/ask.txt b/src/system/taglib/help/ask.txt
similarity index 100%
rename from src/include/taglib/help/ask.txt
rename to src/system/taglib/help/ask.txt
diff --git a/src/include/taglib/help/autochannel.txt b/src/system/taglib/help/autochannel.txt
similarity index 100%
rename from src/include/taglib/help/autochannel.txt
rename to src/system/taglib/help/autochannel.txt
diff --git a/src/include/taglib/help/bookcontentlist.txt b/src/system/taglib/help/bookcontentlist.txt
similarity index 90%
rename from src/include/taglib/help/bookcontentlist.txt
rename to src/system/taglib/help/bookcontentlist.txt
index 3f650c4c..702c13f6 100755
--- a/src/include/taglib/help/bookcontentlist.txt
+++ b/src/system/taglib/help/bookcontentlist.txt
@@ -16,4 +16,4 @@ row='12' 调用记录条数
booktype='-1' 图书类型,0 图书、1 漫画,默认全部
orderby='lastpost' 排序类型,当按排序类型为 commend 表示推荐图书
author='' 作者
-keyword='' 关键字(用 , 分开多个关键字)
\ No newline at end of file
+keyword='' 关键词(用 , 分开多个关键词)
\ No newline at end of file
diff --git a/src/include/taglib/help/booklist.txt b/src/system/taglib/help/booklist.txt
similarity index 77%
rename from src/include/taglib/help/booklist.txt
rename to src/system/taglib/help/booklist.txt
index e07d8196..b1b5f3d4 100755
--- a/src/include/taglib/help/booklist.txt
+++ b/src/system/taglib/help/booklist.txt
@@ -1,7 +1,7 @@
连载图书调用
>>dede>>
{dede:booklist row='12' booktype='-1' orderby='lastpost' author='' keyword=''}
-
[field:bookname /]
+
[field:bookname /]
{/dede:booklist}
>>dede>>
这个标签和bookcontentlist实际是完全相同的,只是默认底层模板不同
@@ -9,4 +9,4 @@ row='12' 调用记录条数
booktype='-1' 图书类型,0 图书、1 漫画,默认全部
orderby='lastpost' 排序类型,当按排序类型为 commend 表示推荐图书
author='' 作者
-keyword='' 关键字(用 , 分开多个关键字)
\ No newline at end of file
+keyword='' 关键词(用 , 分开多个关键词)
\ No newline at end of file
diff --git a/src/include/taglib/help/channel.txt b/src/system/taglib/help/channel.txt
similarity index 100%
rename from src/include/taglib/help/channel.txt
rename to src/system/taglib/help/channel.txt
diff --git a/src/include/taglib/help/channelartlist.txt b/src/system/taglib/help/channelartlist.txt
similarity index 96%
rename from src/include/taglib/help/channelartlist.txt
rename to src/system/taglib/help/channelartlist.txt
index c383f668..5250838e 100755
--- a/src/include/taglib/help/channelartlist.txt
+++ b/src/system/taglib/help/channelartlist.txt
@@ -16,4 +16,4 @@ typeid = '0' 频道ID,多个请用","分隔
row = '20' 获取的栏目返回值
其他说明:
除了宏标记外,channelArtlist 是唯一一个可以直接嵌套其它标记的标记,不过仅限于嵌套
-{dede:type}{/dede:type} 和 {dede:arclist}{/dede:arclist} 两个标记。
\ No newline at end of file
+{dede:type}{/dede:type} 和 {dede:arclist}{/dede:arclist} 两个标记
\ No newline at end of file
diff --git a/src/include/taglib/help/demotag.txt b/src/system/taglib/help/demotag.txt
similarity index 100%
rename from src/include/taglib/help/demotag.txt
rename to src/system/taglib/help/demotag.txt
diff --git a/src/include/taglib/help/feedback.txt b/src/system/taglib/help/feedback.txt
similarity index 74%
rename from src/include/taglib/help/feedback.txt
rename to src/system/taglib/help/feedback.txt
index cd19a4b6..ec518e8b 100755
--- a/src/include/taglib/help/feedback.txt
+++ b/src/system/taglib/help/feedback.txt
@@ -3,7 +3,7 @@
{dede:feedback}
{/dede:feedback}
>>dede>>
diff --git a/src/include/taglib/help/flink.txt b/src/system/taglib/help/flink.txt
similarity index 100%
rename from src/include/taglib/help/flink.txt
rename to src/system/taglib/help/flink.txt
diff --git a/src/include/taglib/help/group.txt b/src/system/taglib/help/group.txt
similarity index 100%
rename from src/include/taglib/help/group.txt
rename to src/system/taglib/help/group.txt
diff --git a/src/include/taglib/help/groupthread.txt b/src/system/taglib/help/groupthread.txt
similarity index 100%
rename from src/include/taglib/help/groupthread.txt
rename to src/system/taglib/help/groupthread.txt
diff --git a/src/include/taglib/help/hotwords.txt b/src/system/taglib/help/hotwords.txt
similarity index 50%
rename from src/include/taglib/help/hotwords.txt
rename to src/system/taglib/help/hotwords.txt
index 2ae5ca4d..a47cb4dc 100755
--- a/src/include/taglib/help/hotwords.txt
+++ b/src/system/taglib/help/hotwords.txt
@@ -1,4 +1,4 @@
-获取网站搜索的热门关键字
+获取网站搜索的热门关键词
>>dede>>
{dede:hotwords /}
>>dede>>
diff --git a/src/include/taglib/help/infoguide.txt b/src/system/taglib/help/infoguide.txt
similarity index 100%
rename from src/include/taglib/help/infoguide.txt
rename to src/system/taglib/help/infoguide.txt
diff --git a/src/include/taglib/help/infolink.txt b/src/system/taglib/help/infolink.txt
similarity index 100%
rename from src/include/taglib/help/infolink.txt
rename to src/system/taglib/help/infolink.txt
diff --git a/src/include/taglib/help/likearticle.txt b/src/system/taglib/help/likearticle.txt
similarity index 100%
rename from src/include/taglib/help/likearticle.txt
rename to src/system/taglib/help/likearticle.txt
diff --git a/src/include/taglib/help/likepage.txt b/src/system/taglib/help/likepage.txt
similarity index 100%
rename from src/include/taglib/help/likepage.txt
rename to src/system/taglib/help/likepage.txt
diff --git a/src/include/taglib/help/likesgpage.txt b/src/system/taglib/help/likesgpage.txt
similarity index 100%
rename from src/include/taglib/help/likesgpage.txt
rename to src/system/taglib/help/likesgpage.txt
diff --git a/src/include/taglib/help/loop.txt b/src/system/taglib/help/loop.txt
similarity index 100%
rename from src/include/taglib/help/loop.txt
rename to src/system/taglib/help/loop.txt
diff --git a/src/include/taglib/help/memberlist.txt b/src/system/taglib/help/memberlist.txt
similarity index 61%
rename from src/include/taglib/help/memberlist.txt
rename to src/system/taglib/help/memberlist.txt
index cf94e891..4650b987 100755
--- a/src/include/taglib/help/memberlist.txt
+++ b/src/system/taglib/help/memberlist.txt
@@ -1,7 +1,7 @@
会员信息调用标签
>>dede>>
{dede:memberlist orderby='scores' row='20'}
-
{dede:field.userid /}
+
{dede:field.userid /}
{dede:field.scores /}
{/dede:memberlist}
>>dede>>
diff --git a/src/include/taglib/help/myad.txt b/src/system/taglib/help/myad.txt
similarity index 100%
rename from src/include/taglib/help/myad.txt
rename to src/system/taglib/help/myad.txt
diff --git a/src/include/taglib/help/mynews.txt b/src/system/taglib/help/mynews.txt
similarity index 100%
rename from src/include/taglib/help/mynews.txt
rename to src/system/taglib/help/mynews.txt
diff --git a/src/include/taglib/help/mytag.txt b/src/system/taglib/help/mytag.txt
similarity index 100%
rename from src/include/taglib/help/mytag.txt
rename to src/system/taglib/help/mytag.txt
diff --git a/src/include/taglib/help/softmsg.txt b/src/system/taglib/help/softmsg.txt
similarity index 100%
rename from src/include/taglib/help/softmsg.txt
rename to src/system/taglib/help/softmsg.txt
diff --git a/src/include/taglib/help/sonchannel.txt b/src/system/taglib/help/sonchannel.txt
similarity index 100%
rename from src/include/taglib/help/sonchannel.txt
rename to src/system/taglib/help/sonchannel.txt
diff --git a/src/include/taglib/help/sql.txt b/src/system/taglib/help/sql.txt
similarity index 100%
rename from src/include/taglib/help/sql.txt
rename to src/system/taglib/help/sql.txt
diff --git a/src/include/taglib/help/tag.txt b/src/system/taglib/help/tag.txt
similarity index 100%
rename from src/include/taglib/help/tag.txt
rename to src/system/taglib/help/tag.txt
diff --git a/src/include/taglib/help/type.txt b/src/system/taglib/help/type.txt
similarity index 100%
rename from src/include/taglib/help/type.txt
rename to src/system/taglib/help/type.txt
diff --git a/src/include/taglib/help/vote.txt b/src/system/taglib/help/vote.txt
similarity index 66%
rename from src/include/taglib/help/vote.txt
rename to src/system/taglib/help/vote.txt
index 82b812a8..d0134613 100755
--- a/src/include/taglib/help/vote.txt
+++ b/src/system/taglib/help/vote.txt
@@ -1,9 +1,9 @@
投票标签
>>dede>>
-{dede:vote id='' lineheight='22' tablewidth='100%' titlebgcolor='#EDEDE2' titlebackground='' tablebgcolor='#FFFFFF'/}
+{dede:vote id='' lineheight='26' tablewidth='100%' titlebgcolor='#EDEDE2' titlebackground='' tablebgcolor='#FFFFFF'/}
>>dede>>
id='' 数字,当前投票ID
-lineheight='24' 表格高度
+lineheight='26' 表格高度
tablewidth='100%' 表格宽度
titlebgcolor='#EDEDE2' 投票标题背景色
titlebackground=''
diff --git a/src/include/taglib/hotwords.lib.php b/src/system/taglib/hotwords.lib.php
similarity index 93%
rename from src/include/taglib/hotwords.lib.php
rename to src/system/taglib/hotwords.lib.php
index 5b300222..cfc8dfcd 100755
--- a/src/include/taglib/hotwords.lib.php
+++ b/src/system/taglib/hotwords.lib.php
@@ -1,7 +1,6 @@
CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$nowtime = time();
if (empty($subday)) $subday = 365;
if (empty($num)) $num = 6;
@@ -32,4 +27,4 @@ function lib_hotwords(&$ctag, &$refObj)
$hotword .= "
".$row['keyword']." ";
}
return $hotword;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/infoguide.lib.php b/src/system/taglib/infoguide.lib.php
similarity index 92%
rename from src/include/taglib/infoguide.lib.php
rename to src/system/taglib/infoguide.lib.php
index f13db63f..456ee145 100755
--- a/src/include/taglib/infoguide.lib.php
+++ b/src/system/taglib/infoguide.lib.php
@@ -1,4 +1,5 @@
-CAttribute->Items,$attlist);
//extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$cmspath = ((empty($cfg_cmspath) || preg_match('#[/$]#', $cfg_cmspath)) ? $cfg_cmspath.'/' : $cfg_cmspath);
-
if (empty($refObj->Fields['typeid'])) {
$row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE channeltype='-8' And reid = '0' ");
$typeid = (is_array($row) ? $row['id'] : 0);
@@ -29,39 +26,30 @@ function lib_infoguide(&$ctag, &$refObj)
} else {
$typeid = $refObj->Fields['typeid'];
}
-
$innerText = trim($ctag->GetInnerText());
if (empty($innerText)) $innerText = GetSysTemplets("info_guide.htm");
$ctp = new DedeTagParse();
$ctp->SetNameSpace('field', '[', ']');
$ctp->LoadSource($innerText);
-
$revalue = $seli = '';
-
$fields = array('nativeplace' => '', 'infotype' => '', 'typeid' => $typeid);
-
if ($hasSetEnumJs != 'has') {
$revalue .= ''."\r\n";
$GLOBALS['hasSetEnumJs'] = 'hasset';
}
-
$fields['nativeplace'] = $fields['infotype'] = '';
-
if (empty($nativeplace)) $nativeplace = 0;
if (empty($infotype)) $infotype = 0;
-
$fields['nativeplace'] .= "
\r\n";
$fields['nativeplace'] .= "
地区: \r\n";
- $fields['nativeplace'] .= "
\r\n
\r\n";
+ $fields['nativeplace'] .= "
\r\n
\r\n";
$fields['nativeplace'] .= "\r\n";
$fields['nativeplace'] .= ''."\r\n";
-
$fields['infotype'] .= "
\r\n";
$fields['infotype'] .= "
类型: \r\n";
- $fields['infotype'] .= "
\r\n";
+ $fields['infotype'] .= "
\r\n";
$fields['infotype'] .= "\r\n";
$fields['infotype'] .= ''."\r\n";
-
if (is_array($ctp->CTags)) {
foreach ($ctp->CTags as $tagid => $ctag) {
if (isset($fields[$ctag->GetName()])) {
@@ -70,6 +58,5 @@ function lib_infoguide(&$ctag, &$refObj)
}
$revalue .= $ctp->GetResult();
}
-
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/infolink.lib.php b/src/system/taglib/infolink.lib.php
similarity index 85%
rename from src/include/taglib/infolink.lib.php
rename to src/system/taglib/infolink.lib.php
index e3521947..c8e8a96e 100755
--- a/src/include/taglib/infolink.lib.php
+++ b/src/system/taglib/infolink.lib.php
@@ -1,4 +1,5 @@
-CAttribute->Items,$attlist);
//extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$cmspath = ((empty($cfg_cmspath) || !preg_match("#\/$#", $cfg_cmspath)) ? $cfg_cmspath.'/' : $cfg_cmspath);
$baseurl = preg_replace("#\/$#", '', $cfg_mainsite).$cmspath;
-
$smalltypes = '';
if (!empty($refObj->TypeLink->TypeInfos['smalltypes'])) {
$smalltypes = explode(',', $refObj->TypeLink->TypeInfos['smalltypes']);
}
-
if (empty($refObj->Fields['typeid'])) {
$row = $dsql->GetOne("SELECT id FROM `#@__arctype` WHERE channeltype='-8' And reid = '0' ");
$typeid = (is_array($row) ? $row['id'] : 0);
} else {
$typeid = $refObj->Fields['typeid'];
}
-
$innerText = trim($ctag->GetInnerText());
if (empty($innerText)) $innerText = GetSysTemplets("info_link.htm");
$ctp = new DedeTagParse();
$ctp->SetNameSpace('field', '[', ']');
$ctp->LoadSource($innerText);
-
$revalue = $seli = '';
$channelid = (empty($refObj->TypeLink->TypeInfos['channeltype']) ? -8 : $refObj->TypeLink->TypeInfos['channeltype']);
-
$fields = array(
'nativeplace' => '', 'infotype' => '', 'typeid' => $typeid,
'channelid' => $channelid, 'linkallplace' => '', 'linkalltype' => ''
);
-
$fields['nativeplace'] = $fields['infotype'] = '';
-
- $fields['linkallplace'] = "
不限 ";
- $fields['linkalltype'] = "
不限 ";
-
+ $fields['linkallplace'] = "
不限 ";
+ $fields['linkalltype'] = "
不限 ";
//地区链接
if (empty($nativeplace)) {
foreach ($em_nativeplaces as $eid => $em) {
if ($eid % 500 != 0) continue;
- $fields['nativeplace'] .= "
{$em} \r\n";
+ $fields['nativeplace'] .= "
{$em} \r\n";
}
} else {
$sontype = (($nativeplace % 500 != 0) ? $nativeplace : 0);
$toptype = (($nativeplace % 500 == 0) ? $nativeplace : ($nativeplace - ($nativeplace % 500)));
- $fields['nativeplace'] = "
{$em_nativeplaces[$toptype]} >> ";
+ $fields['nativeplace'] = "
{$em_nativeplaces[$toptype]} >> ";
foreach ($em_nativeplaces as $eid => $em) {
if ($eid < $toptype + 1 || $eid > $toptype + 499) continue;
if ($eid == $nativeplace) {
$fields['nativeplace'] .= "
{$em} \r\n";
} else {
- $fields['nativeplace'] .= "
{$em} \r\n";
+ $fields['nativeplace'] .= "
{$em} \r\n";
}
}
}
@@ -87,24 +75,22 @@ function lib_infolink(&$ctag, &$refObj)
if ($eid == $infotype) {
$fields['infotype'] .= "
{$em} \r\n";
} else {
- $fields['infotype'] .= "
{$em} \r\n";
+ $fields['infotype'] .= "
{$em} \r\n";
}
}
} else {
$sontype = (($infotype % 500 != 0) ? $infotype : 0);
$toptype = (($infotype % 500 == 0) ? $infotype : ($infotype - ($infotype % 500)));
- $fields['infotype'] .= "
{$em_infotypes[$toptype]} >> ";
+ $fields['infotype'] .= "
{$em_infotypes[$toptype]} >> ";
foreach ($em_infotypes as $eid => $em) {
if ($eid < $toptype + 1 || $eid > $toptype + 499) continue;
if ($eid == $infotype) {
$fields['infotype'] .= "
{$em} \r\n";
} else {
- $fields['infotype'] .= "
{$em} \r\n";
+ $fields['infotype'] .= "
{$em} \r\n";
}
}
}
-
-
if (is_array($ctp->CTags)) {
foreach ($ctp->CTags as $tagid => $ctag) {
if (isset($fields[$ctag->GetName()])) {
@@ -113,6 +99,5 @@ function lib_infolink(&$ctag, &$refObj)
}
$revalue .= $ctp->GetResult();
}
-
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/likearticle.lib.php b/src/system/taglib/likearticle.lib.php
similarity index 87%
rename from src/include/taglib/likearticle.lib.php
rename to src/system/taglib/likearticle.lib.php
index 3abde0fc..00b77ec8 100755
--- a/src/include/taglib/likearticle.lib.php
+++ b/src/system/taglib/likearticle.lib.php
@@ -1,4 +1,5 @@
-CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$revalue = '';
-
if (empty($tablewidth)) $tablewidth = 100;
if (empty($col)) $col = 1;
$colWidth = ceil(100 / $col);
$tablewidth = $tablewidth."%";
$colWidth = $colWidth."%";
-
$ids = array();
$tids = array();
-
if (!empty($refObj->Fields['tags'])) {
$keyword = $refObj->Fields['tags'];
} else {
$keyword = (!empty($refObj->Fields['keywords']) ? $refObj->Fields['keywords'] : '');
}
-
$typeid = (!empty($mytypeid) ? $mytypeid : 0);
if (empty($typeid)) {
if (!empty($refObj->Typelink->TypeInfos['reid'])) {
@@ -43,11 +37,9 @@ function lib_likearticle(&$ctag, &$refObj)
if (!empty($refObj->Fields['typeid'])) $typeid = $refObj->Fields['typeid'];
}
}
-
if (!empty($typeid) && !preg_match('#,#', $typeid)) {
$typeid = GetSonIds($typeid);
}
-
$limitRow = $row - count($ids);
$keyword = '';
if (!empty($refObj->Fields['keywords'])) {
@@ -74,23 +66,19 @@ function lib_likearticle(&$ctag, &$refObj)
if (!empty($typeid)) {
$typeid = " AND arc.typeid IN($typeid) AND arc.id<>$arcid ";
}
- $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,
- tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
- FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
- where arc.arcrank>-1 AND ($keyword) $typeid $orderquery limit 0, $row";
+ $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
+ FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
+ where arc.arcrank>-1 AND ($keyword) $typeid $orderquery limit 0, $row";
} else {
if (!empty($typeid)) {
$typeid = " arc.typeid IN($typeid) AND arc.id<>$arcid ";
}
- $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,
- tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
- FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
- WHERE arc.arcrank>-1 AND $typeid $orderquery limit 0, $row";
+ $query = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath
+ FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id
+ WHERE arc.arcrank>-1 AND $typeid $orderquery limit 0, $row";
}
-
$innertext = trim($ctag->GetInnerText());
if ($innertext == '') $innertext = GetSysTemplets('part_arclist.htm');
-
$dsql->SetQuery($query);
$dsql->Execute('al');
$artlist = '';
@@ -111,11 +99,9 @@ function lib_likearticle(&$ctag, &$refObj)
//处理一些特殊字段
$row['info'] = $row['infos'] = cn_substr($row['description'], $infolen);
$row['id'] = $row['id'];
-
if ($row['corank'] > 0 && $row['arcrank'] == 0) {
$row['arcrank'] = $row['corank'];
}
-
$row['filename'] = $row['arcurl'] = GetFileUrl(
$row['id'],
$row['typeid'],
@@ -131,7 +117,6 @@ function lib_likearticle(&$ctag, &$refObj)
$row['siteurl'],
$row['sitepath']
);
-
$row['typeurl'] = GetTypeUrl(
$row['typeid'],
$row['typedir'],
@@ -143,7 +128,6 @@ function lib_likearticle(&$ctag, &$refObj)
$row['siteurl'],
$row['sitepath']
);
-
if ($row['litpic'] == '-' || $row['litpic'] == '') {
$row['litpic'] = $GLOBALS['cfg_cmspath'].'/static/defaultpic.gif';
}
@@ -157,13 +141,12 @@ function lib_likearticle(&$ctag, &$refObj)
$row['imglink'] = "
".$row['image']." ";
$row['fulltitle'] = $row['title'];
$row['title'] = cn_substr($row['title'], $titlelen);
- if ($row['color'] != '') $row['title'] = "
".$row['title']." ";
+ if ($row['color'] != '') $row['title'] = "
".$row['title']." ";
if (preg_match('#b#', $row['flag'])) $row['title'] = "
".$row['title']." ";
$row['textlink'] = "
".$row['title']." ";
$row['plusurl'] = $row['phpurl'] = $GLOBALS['cfg_phpurl'];
$row['memberurl'] = $GLOBALS['cfg_memberurl'];
$row['templeturl'] = $GLOBALS['cfg_templeturl'];
-
if (is_array($dtp2->CTags)) {
foreach ($dtp2->CTags as $k => $ctag) {
if ($ctag->GetName() == 'array') {
@@ -175,7 +158,6 @@ function lib_likearticle(&$ctag, &$refObj)
}
$GLOBALS['autoindex']++;
}
-
$artlist .= $dtp2->GetResult()."\r\n";
}
//if hasRow
@@ -192,4 +174,4 @@ function lib_likearticle(&$ctag, &$refObj)
if ($col > 1) $artlist .= "
\r\n";
$dsql->FreeResult("al");
return $artlist;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/likepage.lib.php b/src/system/taglib/likepage.lib.php
similarity index 85%
rename from src/include/taglib/likepage.lib.php
rename to src/system/taglib/likepage.lib.php
index 5f71ce52..9ec741c5 100755
--- a/src/include/taglib/likepage.lib.php
+++ b/src/system/taglib/likepage.lib.php
@@ -1,5 +1,4 @@
CAttribute->Items 获得,这样也可以支持中文名
$attlist = "row|8";
FillAttsDefault($ctag->CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
$innertext = trim($ctag->GetInnerText());
-
$aid = (isset($refObj->Fields['aid']) ? $refObj->Fields['aid'] : 0);
-
$revalue = '';
if ($innertext == '') $innertext = GetSysTemplets("part_likesgpage.htm");
-
$likeid = (empty($refObj->Fields['likeid']) ? 'all' : $refObj->Fields['likeid']);
-
$dsql->SetQuery("SELECT aid,title,filename FROM `#@__sgpage` WHERE likeid LIKE '$likeid' LIMIT 0,$row");
$dsql->Execute();
$ctp = new DedeTagParse();
@@ -43,4 +38,4 @@ function lib_likesgpage(&$ctag, &$refObj)
}
}
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/loop.lib.php b/src/system/taglib/loop.lib.php
similarity index 93%
rename from src/include/taglib/loop.lib.php
rename to src/system/taglib/loop.lib.php
index 109ece5b..240dfd1b 100755
--- a/src/include/taglib/loop.lib.php
+++ b/src/system/taglib/loop.lib.php
@@ -1,7 +1,5 @@
CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$innertext = trim($ctag->GetInnertext());
$revalue = '';
if (!empty($table)) $tablename = $table;
-
if ($tablename == '' || $innertext == '') return '';
if ($if != '') $ifcase = $if;
-
if ($sort != '') $sort = " ORDER BY $sort $orderway ";
if ($ifcase != '') $ifcase = " WHERE $ifcase ";
$dsql->SetQuery("SELECT * FROM $tablename $ifcase $sort LIMIT 0,$row");
@@ -47,4 +41,4 @@ function lib_loop(&$ctag, &$refObj)
$revalue .= $ctp->GetResult();
}
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/memberlist.lib.php b/src/system/taglib/memberlist.lib.php
similarity index 82%
rename from src/include/taglib/memberlist.lib.php
rename to src/system/taglib/memberlist.lib.php
index 843d6fc8..806334c2 100755
--- a/src/include/taglib/memberlist.lib.php
+++ b/src/system/taglib/memberlist.lib.php
@@ -1,7 +1,5 @@
CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$revalue = '';
$innerText = trim($ctag->GetInnerText());
if (empty($innerText)) $innerText = GetSysTemplets('memberlist.htm');
-
$wheresql = ' WHERE mb.spacesta>-1 AND mb.matt<10 ';
-
if ($iscommend > 0) $wheresql .= " AND mb.matt='$iscommend' ";
-
$sql = "SELECT mb.*,ms.spacename,ms.sign FROM `#@__member` mb
- LEFT JOIN `#@__member_space` ms ON ms.mid = mb.mid
- $wheresql order by mb.{$orderby} DESC LIMIT 0,$row ";
-
+ LEFT JOIN `#@__member_space` ms ON ms.mid = mb.mid
+ $wheresql order by mb.{$orderby} DESC LIMIT 0,$row ";
$ctp = new DedeTagParse();
$ctp->SetNameSpace('field', '[', ']');
$ctp->LoadSource($innerText);
-
$dsql->Execute('mb', $sql);
while ($row = $dsql->GetArray('mb')) {
- $row['spaceurl'] = $GLOBALS['cfg_basehost'].'/member/index.php?uid='.$row['userid'];
+ $row['spaceurl'] = $GLOBALS['cfg_basehost'].'/user/index.php?uid='.$row['userid'];
if (empty($row['face'])) {
$row['face'] = ($row['sex'] == '女') ? $GLOBALS['cfg_memberurl'].'/templets/images/dfgirl.png' : $GLOBALS['cfg_memberurl'].'/templets/images/dfboy.png';
}
@@ -49,6 +40,5 @@ function lib_memberlist(&$ctag, &$refObj)
}
$revalue .= $ctp->GetResult();
}
-
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/myad.lib.php b/src/system/taglib/myad.lib.php
similarity index 87%
rename from src/include/taglib/myad.lib.php
rename to src/system/taglib/myad.lib.php
index ffcac12b..5e30f0d4 100755
--- a/src/include/taglib/myad.lib.php
+++ b/src/system/taglib/myad.lib.php
@@ -1,4 +1,5 @@
-CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$body = lib_GetMyTagT($refObj, $typeid, $name, '#@__myad');
-
return $body;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/mynews.lib.php b/src/system/taglib/mynews.lib.php
similarity index 96%
rename from src/include/taglib/mynews.lib.php
rename to src/system/taglib/mynews.lib.php
index b9b5cae4..47c01cff 100755
--- a/src/include/taglib/mynews.lib.php
+++ b/src/system/taglib/mynews.lib.php
@@ -1,5 +1,4 @@
CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
$innertext = trim($ctag->GetInnerText());
if (empty($row)) $row = 1;
if (empty($titlelen)) $titlelen = 30;
if (empty($innertext)) $innertext = GetSysTemplets('mynews.htm');
-
$idsql = '';
if ($envs['typeid'] > 0) $idsql = " WHERE typeid='".GetTopid($this->TypeID)."' ";
$dsql->SetQuery("SELECT * FROM #@__mynews $idsql ORDER BY senddate DESC LIMIT 0,$row");
@@ -39,4 +34,4 @@ function lib_mynews(&$ctag, &$refObj)
$revalue .= $ctp->GetResult();
}
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/mytag.lib.php b/src/system/taglib/mytag.lib.php
similarity index 89%
rename from src/include/taglib/mytag.lib.php
rename to src/system/taglib/mytag.lib.php
index 177943b8..9276b075 100755
--- a/src/include/taglib/mytag.lib.php
+++ b/src/system/taglib/mytag.lib.php
@@ -1,4 +1,5 @@
-CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
if (trim($ismake) == '') $ismake = 'no';
$body = lib_GetMyTagT($refObj, $typeid, $name, '#@__mytag');
//编译
if ($ismake == 'yes') {
- require_once(DEDEINC.'/arc.partview.class.php');
+ require_once(DEDEINC.'/archive/partview.class.php');
$pvCopy = new PartView($typeid);
$pvCopy->SetTemplet($body, "string");
$body = $pvCopy->GetResult();
}
return $body;
}
-
function lib_GetMyTagT(&$refObj, $typeid, $tagname, $tablename)
{
global $dsql;
if ($tagname == '') return '';
if (trim($typeid) == '') $typeid = 0;
if (!empty($refObj->Fields['typeid']) && $typeid == 0) $typeid = $refObj->Fields['typeid'];
-
$typesql = $row = '';
if ($typeid > 0) $typesql = " And typeid IN(0,".GetTopids($typeid).") ";
-
$row = $dsql->GetOne(" SELECT * FROM $tablename WHERE tagname LIKE '$tagname' $typesql ORDER BY typeid DESC ");
if (!is_array($row)) return '';
-
$nowtime = time();
if (
$row['timeset'] == 1
@@ -49,6 +44,5 @@ function lib_GetMyTagT(&$refObj, $typeid, $tagname, $tablename)
} else {
$body = $row['normbody'];
}
-
return $body;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/php.lib.php b/src/system/taglib/php.lib.php
similarity index 84%
rename from src/include/taglib/php.lib.php
rename to src/system/taglib/php.lib.php
index b85fc6af..e6c8bf95 100755
--- a/src/include/taglib/php.lib.php
+++ b/src/system/taglib/php.lib.php
@@ -1,6 +1,5 @@
GetInnerText());
if ($phpcode == '')
- return '';
+ return '';
ob_start();
extract($GLOBALS, EXTR_SKIP);
@eval($phpcode);
$revalue = ob_get_contents();
ob_clean();
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/productimagelist.lib.php b/src/system/taglib/productimagelist.lib.php
similarity index 96%
rename from src/include/taglib/productimagelist.lib.php
rename to src/system/taglib/productimagelist.lib.php
index 7eb30822..751aa861 100755
--- a/src/include/taglib/productimagelist.lib.php
+++ b/src/system/taglib/productimagelist.lib.php
@@ -9,23 +9,18 @@
* @license https://www.dedebiz.com/license
* @link https://www.dedebiz.com
*/
-
function lib_productimagelist(&$ctag, &$refObj)
{
global $dsql, $sqlCt;
$attlist = "desclen|80";
FillAttsDefault($ctag->CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
if (!isset($refObj->addTableRow['imgurls'])) return;
-
$revalue = '';
$innerText = trim($ctag->GetInnerText());
if (empty($innerText)) $innerText = GetSysTemplets('productimagelist.htm');
-
$dtp = new DedeTagParse();
$dtp->LoadSource($refObj->addTableRow['imgurls']);
-
$images = array();
if (is_array($dtp->CTags)) {
foreach ($dtp->CTags as $ctag) {
@@ -38,12 +33,10 @@ function lib_productimagelist(&$ctag, &$refObj)
}
}
$dtp->Clear();
-
$revalue = '';
$ctp = new DedeTagParse();
$ctp->SetNameSpace('field', '[', ']');
$ctp->LoadSource($innerText);
-
foreach ($images as $row) {
foreach ($ctp->CTags as $tagid => $ctag) {
if (isset($row[$ctag->GetName()])) {
@@ -53,4 +46,4 @@ function lib_productimagelist(&$ctag, &$refObj)
$revalue .= $ctp->GetResult();
}
return $revalue;
-}
+}
\ No newline at end of file
diff --git a/src/include/taglib/qrcode.lib.php b/src/system/taglib/qrcode.lib.php
similarity index 91%
rename from src/include/taglib/qrcode.lib.php
rename to src/system/taglib/qrcode.lib.php
index 13d23a2a..c6651b29 100755
--- a/src/include/taglib/qrcode.lib.php
+++ b/src/system/taglib/qrcode.lib.php
@@ -1,4 +1,5 @@
-CAttribute->Items, $attlist);
extract($ctag->CAttribute->Items, EXTR_SKIP);
-
//var_dump($refObj->Fields['id']);
-
+ $id = 0;
if (empty($type) and empty($id)) {
if (get_class($refObj) == 'Archives') {
$type = 'arc';
@@ -35,9 +34,8 @@ function lib_qrcode(&$ctag, &$refObj)
$id = 0;
}
}
-
$reval = <<二维码、二维码生成
+ 二维码生成
-
-
-
-
-
-
-
购物车
-
-
-
-
-
我的购物车 - 订单号:{dede:var.carts.orders_id/}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 购物车 - 订单号:{dede:var.carts.orders_id/}
+
+
+
+
+
+
+
+
+
+
+
+
+
购物车
+
+
+
+
+
我的购物车 - 订单号:{dede:var.carts.orders_id/}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/templets/plus/carbuyaction.htm b/src/theme/plus/carbuyaction.htm
old mode 100755
new mode 100644
similarity index 91%
rename from src/templets/plus/carbuyaction.htm
rename to src/theme/plus/carbuyaction.htm
index 3da61085..35594c35
--- a/src/templets/plus/carbuyaction.htm
+++ b/src/theme/plus/carbuyaction.htm
@@ -1,185 +1,181 @@
-
-
-
- 购物车 - 下单购买{dede:var.carts.orders_id/}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
商品购买
-
-
- IsLogin()){ ?>
-
-
- 您好,欢迎来到本网站, 请 登录 或 注册
-
-
-
-
-
-
-
- 下单购买
- 买家付款
- 确认收货
- 交易结束
-
-
-
-
-
- 确认订单信息
-
-
-
-
- 订单编号
- {dede:var.carts.orders_id/}
-
-
- 订单价格
- {dede:var.carts.price_count/} 元
-
-
- 商品总数
- {dede:var.carts.cart_count/}件
-
-
- 状态
- 下单
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 购物车 - 下单购买{dede:var.carts.orders_id/}
+
+
+
+
+
+
+
+
+
+
+
+
+
商品购买
+
+
+ IsLogin()){ ?>
+
+
+ 您好,欢迎来到本网站, 请 登录 或 注册
+
+
+
+
+
+
+
+ 下单购买
+ 买家付款
+ 确认收货
+ 交易结束
+
+
+
+
+
+ 确认订单信息
+
+
+
+
+ 订单编号
+ {dede:var.carts.orders_id/}
+
+
+ 订单价格
+ {dede:var.carts.price_count/} 元
+
+
+ 商品总数
+ {dede:var.carts.cart_count/}件
+
+
+ 状态
+ 下单
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/templets/plus/download_links_templet.htm b/src/theme/plus/download_links_templet.htm
old mode 100755
new mode 100644
similarity index 96%
rename from src/templets/plus/download_links_templet.htm
rename to src/theme/plus/download_links_templet.htm
index 8c49c4e0..6e40b812
--- a/src/templets/plus/download_links_templet.htm
+++ b/src/theme/plus/download_links_templet.htm
@@ -1,38 +1,38 @@
-
-
-
-
-_下载地址列表_
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+_下载地址列表_
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/templets/plus/flink-add.htm b/src/theme/plus/flink-add.htm
old mode 100755
new mode 100644
similarity index 86%
rename from src/templets/plus/flink-add.htm
rename to src/theme/plus/flink-add.htm
index 9535d51b..b5471e72
--- a/src/templets/plus/flink-add.htm
+++ b/src/theme/plus/flink-add.htm
@@ -1,89 +1,89 @@
-
-
-
-
-
-_申请友情链接
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+_申请友情链接
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/templets/plus/flink-list.htm b/src/theme/plus/flink-list.htm
old mode 100755
new mode 100644
similarity index 93%
rename from src/templets/plus/flink-list.htm
rename to src/theme/plus/flink-list.htm
index 328def20..608db22c
--- a/src/templets/plus/flink-list.htm
+++ b/src/theme/plus/flink-list.htm
@@ -1,57 +1,57 @@
-
-
-
-
-_所有链接
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SetQuery("Select * from `#@__flink` where ischeck>0 order by sortrank asc");
- $dsql->Execute();
- $revalue = "";
- for($i=1;$i<=$row;$i++)
- {
-
- if($dbrow=$dsql->GetObject())
- {
- $wtitle = cn_substr($dbrow->webname,$titlelen);
- if($dbrow->logo=="")
- $revalue.= "$wtitle ";
- else
- $revalue.= " ";
- }
- if(!$dbrow) break;
- }
- echo $revalue;
- ?>
-
-
-
-
-
-
+
+
+
+
+_所有链接
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SetQuery("Select * from `#@__flink` where ischeck>0 order by sortrank asc");
+ $dsql->Execute();
+ $revalue = "";
+ for($i=1;$i<=$row;$i++)
+ {
+
+ if($dbrow=$dsql->GetObject())
+ {
+ $wtitle = cn_substr($dbrow->webname,$titlelen);
+ if($dbrow->logo=="")
+ $revalue.= "$wtitle ";
+ else
+ $revalue.= " ";
+ }
+ if(!$dbrow) break;
+ }
+ echo $revalue;
+ ?>
+
+
+
+
+
+
diff --git a/src/templets/plus/heightsearch.htm b/src/theme/plus/heightsearch.htm
old mode 100755
new mode 100644
similarity index 95%
rename from src/templets/plus/heightsearch.htm
rename to src/theme/plus/heightsearch.htm
index 66f9f6de..97b2860e
--- a/src/templets/plus/heightsearch.htm
+++ b/src/theme/plus/heightsearch.htm
@@ -1,109 +1,108 @@
-
-
-
-
- _高级搜索
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+ _高级搜索
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/templets/plus/js.htm b/src/theme/plus/js.htm
old mode 100755
new mode 100644
similarity index 96%
rename from src/templets/plus/js.htm
rename to src/theme/plus/js.htm
index fe442fac..cf67c493
--- a/src/templets/plus/js.htm
+++ b/src/theme/plus/js.htm
@@ -1,5 +1,5 @@
-
\ No newline at end of file
diff --git a/src/templets/plus/list_diyform.htm b/src/theme/plus/list_diyform.htm
old mode 100755
new mode 100644
similarity index 91%
rename from src/templets/plus/list_diyform.htm
rename to src/theme/plus/list_diyform.htm
index 4aac9b0f..2accd570
--- a/src/templets/plus/list_diyform.htm
+++ b/src/theme/plus/list_diyform.htm
@@ -1,79 +1,78 @@
-
-
-
-
-name; ?> - Powered by DedeBIZ
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {dede:datalist}
-
- ';
- echo 'id ';
- echo ''.$fields['id'].'
';
- foreach($fieldlist as $field=>$fielddata)
- {
- if($fields[$field]=='') continue;
- if($fielddata[1]=='img')
- {
- $fields[$field] = " 图片附件 \r\n";
- }
- else if($fielddata[1]=='addon')
- {
- $fields[$field] = " 其它附件 ";
- }
- else
- {
- if($fielddata[1]=='htmltext') $fields[$field] = html2text($fields[$field]);
- else $fields[$field] = dede_htmlspecialchars($fields[$field]);
- if( strlen($fields[$field]) > 250 )
- {
- $fields[$field] = cn_substr( $fields[$field], 250).'...';
- }
- }
- echo "{$fielddata[0]} {$fields[$field]} \r\n";
- }
- echo '';
- }else{
- echo "暂无记录 ";
- }
- ?>
-
- {/dede:datalist}
-
-{dede:pagelist listsize=5 /}
-
-
-
-
-
-
-
+
+
+
+
+name; ?> - Powered by DedeBIZ
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {dede:datalist}
+
+ ';
+ echo 'id ';
+ echo ''.$fields['id'].'
';
+ foreach($fieldlist as $field=>$fielddata)
+ {
+ if($fields[$field]=='') continue;
+ if($fielddata[1]=='img')
+ {
+ $fields[$field] = " 图片附件 \r\n";
+ }
+ else if($fielddata[1]=='addon')
+ {
+ $fields[$field] = " 其它附件 ";
+ }
+ else
+ {
+ if($fielddata[1]=='htmltext') $fields[$field] = html2text($fields[$field]);
+ else $fields[$field] = dede_htmlspecialchars($fields[$field]);
+ if( strlen($fields[$field]) > 250 )
+ {
+ $fields[$field] = cn_substr( $fields[$field], 250).'';
+ }
+ }
+ echo "{$fielddata[0]} {$fields[$field]} \r\n";
+ }
+ echo '';
+ } else {
+ echo "暂无记录 ";
+ }
+ ?>
+
+ {/dede:datalist}
+
+{dede:pagelist listsize=5 /}
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/templets/plus/plus_footer.htm b/src/theme/plus/plus_footer.htm
similarity index 57%
rename from src/templets/plus/plus_footer.htm
rename to src/theme/plus/plus_footer.htm
index a4e954f4..4c1d6dfd 100644
--- a/src/templets/plus/plus_footer.htm
+++ b/src/theme/plus/plus_footer.htm
@@ -1,7 +1,7 @@