diff --git a/.gitignore b/.gitignore index 5643d51c..f69b4467 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ .DS_Store -src/data/tplcache/ +src/data/tplcache/*.inc +src/data/tplcache/*.txt src/data/sessions* -src/data/cache/ +src/data/cache/*.inc +src/data/cache/*.dat +src/data/cache/*/ src/data/common.inc.php src/data/config.cache.bak.php src/data/config.cache.inc.php @@ -10,12 +13,9 @@ src/install/index.php.bak src/install/index.html src/install/module-install.php.bak src/a/*/ -src/uploads/allimg/* src/.txt src/data/enums/ src/index.html -src/data/admin/ -src/data/module/ src/uploads/*.php src/data/time.lock.inc src/m/index.html @@ -36,5 +36,7 @@ src/data/sitemap.html src/data/js/ src/data/vote/*.js src/data/module/*.xml +src/data/module/*.php src/data/*.db src/uploads/soft/*/ +src/static/allimg/*/ diff --git a/README.md b/README.md index e1e18e2e..2002257c 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,22 @@ -# DedeBIZ +## DedeCMSV6 -国内流行的内容管理系统(CMS)多端全媒体解决方案,DedeBIZ系统基于PHP7.X开发,具有很强的可扩展性,并且完全开放源代码。DedeBIZ商业支持采用现流行的Go语言设计开发,让DedeCMS系统拥有简单易用、灵活扩展特性之外更安全、高效。模板设计制作简单一直是系统的一大特点,全新的版本延续了之前标签引擎,同时采用响应式模板引擎Bootstrap作为系统模板渲染引擎,让搭建跨终端(移动、PC)全媒体站点更简单。 +国内流行的内容管理系统(CMS)多端全媒体解决方案,DedeCMSV6系统基于PHP7.X开发,同时兼容PHP8,具有很强的可扩展性,并且完全开放源代码DedeBIZ商业支持采用现流行的Go语言设计开发,让系统拥有简单易用、灵活扩展特性之外更安全、高效,模板设计制作简单一直是系统的一大特点,全新的版本延续了之前标签引擎,同时采用响应式模板引擎Bootstrap作为系统模板渲染引擎,让搭建跨终端(移动、PC)全媒体站点更简单。 ## 版本说明 -DedeBIZ.x是一个LTS版本,支持将到2022年10月截止,目前DedeBIZ已经发布,可以[点击下载](https://www.dedebiz.com/download)获取。 +DedeCMSV6.x是一个LTS版本,支持将到2025年10月截止,目前DedeCMSV6已经发布,可以[点击下载](https://www.dedebiz.com/download)获取 ## 参与开源 -访问[代码托管](https://www.dedebiz.com/git),可以看到我们已经将代码托管在几个知名代码托管平台,可以通过提交Pull requests的方式来贡献您的力量。 +访问[代码托管](https://www.dedebiz.com/git),可以看到我们已经将代码托管在几个知名代码托管平台,可以通过提交Pull requests的方式来贡献您的力量 -## v6.1 Roadmap +## v6.2 Roadmap -我们将会收集、整理新的功能需求制定新的Roadmap。 +我们将会收集、整理新的功能需求制定新的Roadmap -[开发者](https://www.dedebiz.com/developer)可以到[工单管理](https://www.zhelixie.com/DedeBiz/DedeBIZ/issues)中进行交流反馈。 +[开发者](https://www.dedebiz.com/developer)可以到[工单管理](https://www.zhelixie.com/DedeBiz/DedeBIZ/issues)中进行交流反馈 -普通用户可以通过微信公众号或者邮件的方式进行反馈,详见本页底部资源。 +普通用户可以通过微信公众号或者邮件的方式进行反馈,详见本页底部资源 在这里,可以查看版本[更新记录](docs/changelog.md) @@ -24,13 +24,11 @@ DedeBIZ.x是一个LTS版本,支持将到2022年10月截止,目前DedeBIZ已 1.Windows 平台 -IIS/Apache/Nginx + PHP5/PHP7/PHP8 + MySQL5/8/10 - -如果在windows环境中使用,建议用DedeCMS提供的DedeAMPZ套件以达到最佳使用性能。 +IIS/Apache/Nginx + PHP5.3+/PHP7/PHP8 + MySQL5/8/10 2.Linux/Unix 平台 -Apache/Nginx + PHP5/PHP7 + MySQL5/8/10 (PHP必须在非安全模式下运行) +Apache/Nginx + PHP5.3+/PHP7 + MySQL5/8/10 (PHP必须在非安全模式下运行) 建议使用平台:Linux + Apache2.2 + PHP7.4 + MySQL5.0 @@ -38,6 +36,8 @@ Apache/Nginx + PHP5/PHP7 + MySQL5/8/10 (PHP必须在非安全模式下运行) CURL:数据采集 +Fileinfo:文件上传安全校验 + GD扩展库:图像验证码、水印、二维码生成 MySQL扩展库:数据存储 @@ -50,17 +50,15 @@ Sockets:支持接入DedeBIZ商业组件模块 ``` / -..../install 安装程序目录,安装完后可删除[安装时必须有可写入权限] -..../dede 默认后台管理目录(可任意改名) -..../include 类库文件目录[建议关闭对外访问权限] -..../plus 插件扩展程序目录 -..../member 会员目录 -..../static 静态资源存放目录 -..../uploads 默认上传目录[必须可写入] ..../a 默认HTML文件存放目录[必须可写入] -..../templets 系统默认内核模板目录 -..../data 系统缓存或其它可写入数据存放目录[必须可写入] -..../special 专题目录[生成一次专题后可以删除special/index.php,必须可写入] +..../admin 默认后台管理目录[可任意改名] +..../apps 插件扩展程序目录[不可写入,可执行] +..../data 系统缓存或其它可写入数据存放目录[必须可写入,但不可执行] +..../install 安装程序目录,安装完后可删除[安装时必须有可写入权限] +..../static 静态资源存放目录[必须可写入,无需执行] +..../system 类库文件目录[建议关闭对外访问权限] +..../theme 系统默认内核模板目录[建议关闭对外访问权限] +..../user 会员目录 ``` 5.PHP环境容易碰到的不兼容性问题 @@ -69,7 +67,7 @@ Sockets:支持接入DedeBIZ商业组件模块 * php的上传的临时文件夹没设置好或没写入权限,这会导致文件上传的功能无法使用; - * 出现莫名的错误,如安装时显示空白,这样能是由于系统没装载mysql扩展导致的,对于初级用户,可以下载dede的php套件包,以方便简单的使用。 + * 出现莫名的错误,如安装时显示空白,这样能是由于系统没装载mysql扩展导致的,对于初级用户,可以下载dede的php套件包,以方便简单的使用 ## 程序安装使用 @@ -77,15 +75,15 @@ Sockets:支持接入DedeBIZ商业组件模块 2.上传程序目录中的`/src`到网站根目录; -3.运行`http://www.yourname.com/install/index.php`(yourname表示你的域名),按照安装提速说明进行程序安装; +3.运行`http://www.yourname.com/install/index.php`(yourname表示您的域名),按照安装提速说明进行程序安装; 详细安装步骤可以查看[帮助文档](https://www.dedebiz.com/help) ## DedeBIZ命令行工具 -在程序包中,我们增加了一个命令行工具`dedebiz`,通过这个命令行工具,我们可以完成例如:静态文件生成、快速搭建开发环境、更新系统等功能。 +在程序包中,我们增加了一个命令行工具`dedebiz`,通过这个命令行工具,我们可以完成例如:静态文件生成、快速搭建开发环境、更新系统等功能 -保证我们系统PATH目录中含有`php`命令,如果是Linux系统,我们可以赋予`dedebiz`文件可执行的权限。 +保证我们系统PATH目录中含有`php`命令,如果是Linux系统,我们可以赋予`dedebiz`文件可执行的权限 运行`php dedebiz`命令(如果系统中有bash命令行,直接可以执行`./dedebiz`)我们可以看到如下信息: @@ -104,9 +102,9 @@ WEBSITE: https://www.dedebiz.com/help/ ``` -如果我们想要生成静态文件,可以执行`./dedebiz m o`,便可以自动生成。 +如果我们想要生成静态文件,可以执行`./dedebiz m o`,便可以自动生成 -除了上面的“程序安装使用”中的步骤,我们也可以通过命令行工具快速开始一个本地开发的站点,执行脚本`./dedebiz q`,就可以快速初始化一个本地开发的站点,非常方便。 +除了上面的“程序安装使用”中的步骤,我们也可以通过命令行工具快速开始一个本地开发的站点,执行脚本`./dedebiz q`,就可以快速初始化一个本地开发的站点,非常方便 ![DedeBIZ命令行工具](docs/dedebiz_cli.gif) @@ -114,7 +112,7 @@ WEBSITE: 详细参考:[DedeBIZ站点授权协议](https://www.dedebiz.com/license) -我们对DedeBIZ系统授权的态度是“鼓励但不强制”,购买授权是对知识产权的尊重,是对我们技术服务的认可。 +我们对DedeBIZ系统授权的态度是“鼓励但不强制”,购买授权是对知识产权的尊重,是对我们技术服务的认可 ## 相关资源 diff --git a/dedebiz b/dedebiz index a614add2..bc7df73c 100755 --- a/dedebiz +++ b/dedebiz @@ -5,12 +5,13 @@ * * @version 2020年12月11日 tianya $ * @package DedeBIZ.Command - * @copyright Copyright (c) 2021, DedeBIZ.COM + * @copyright Copyright (c) 2022, DedeBIZ.COM * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -// 切换工作目录到./src +//切换工作目录到./public $workDir = dirname(__FILE__) . "/src"; + chdir($workDir); if (substr(php_sapi_name(), 0, 3) === 'cgi') { @@ -32,7 +33,7 @@ WEBSITE: https://www.dedebiz.com/help/ "; -// 将选项转化为SQL IN参数 +//将选项转化为SQL IN参数 function Option2SQLin($str = "") { $str = preg_replace("#[^0-9-,]#", "", $str); @@ -72,8 +73,8 @@ function RandEncode($length=26) } if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { - // PHP5.4以下不支持内建服务器 - // 用于开发调试 + //PHP5.4以下不支持内建服务器 + //用于开发调试 if (phpversion() < "5.4") { die("DedeBIZ:command web server not support\n\n"); } @@ -81,18 +82,18 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { echo "Open http://localhost:8088\n\r"; passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); } else if (count($argv) > 1 && ($argv[1] == "make" || $argv[1] == "m")) { - if (!file_exists($workDir . "/include/common.inc.php")) { + if (!file_exists($workDir . "/system/common.inc.php")) { DedeCli::error("Check your root path is right"); exit; } - require_once($workDir . "/include/common.inc.php"); - require_once(DEDEINC . "/cli.class.php"); + require_once($workDir . "/system/common.inc.php"); + require_once(DEDEINC . "/libraries/cli.class.php"); - // 一个命令行的生成工具 + //一个命令行的生成工具 if (count($argv) > 2 && ($argv[2] == "arc" || $argv[2] == "a")) { - // 生成文档 - // make arc typeid=1 + //生成文档 + //make arc typeid=1 $t1 = ExecTime(); $addsql = "1=1"; $typeid = Option2SQLin(DedeCli::getOption("typeid")); @@ -120,7 +121,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { DedeCli::write($queryTime); exit; } else if (count($argv) > 2 && ($argv[2] == "list" || $argv[2] == "l")) { - // 生成栏目 + //生成栏目 $addsql = "1=1"; $typeid = Option2SQLin(DedeCli::getOption("typeid")); if (!empty($typeid)) { @@ -140,7 +141,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { } exit; } else if (count($argv) > 2 && ($argv[2] == "index" || $argv[2] == "i")) { - // 生成首页 + //生成首页 $position = DedeCli::getOption("position"); if (empty($position)) { $position = "../index.html"; @@ -162,7 +163,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { $pv->SaveToHtml($homeFile); DedeCli::write("Make index html successfull"); } else if (count($argv) > 2 && ($argv[2] == "auto" || $argv[2] == "o")) { - // 自动生成 + //自动生成 function OptimizeData($dsql) { global $cfg_dbprefix; @@ -184,7 +185,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { exit; } - // 1.生成首页 + //1.生成首页 $pv = new PartView(); $row = $pv->dsql->GetOne("SELECT * FROM `#@__homepageset` "); $templet = str_replace("{style}", $cfg_df_style, $row['templet']); @@ -199,7 +200,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { if (file_exists($homeFile)) @unlink($homeFile); } DedeCli::write("Make index html successfull"); - // 2.生成栏目 + //2.生成栏目 $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE senddate >=" . $start . " AND arcrank>-1"; $dsql->SetQuery($query); $dsql->Execute(); @@ -234,7 +235,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { DedeCli::write("Make list html successfull"); } - // 生成文档 + //生成文档 $tt = $dsql->GetOne("SELECT COUNT(id) as dd FROM `#@__arctiny` WHERE senddate >=" . $start . " AND arcrank>-1"); $total = intval($tt['dd']); $dsql->Execute('out', "SELECT id FROM `#@__arctiny` WHERE senddate >=" . $start . " AND arcrank>-1 ORDER BY typeid ASC"); @@ -248,7 +249,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { } DedeCli::write("Make archives html successfull"); - // 优化数据 + //优化数据 OptimizeData($dsql); DedeCli::write("Optimize data successfull"); } else { @@ -271,10 +272,10 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { exit; } } else if (count($argv) > 1 && ($argv[1] == "update" || $argv[1] == "u")) { - define("DEDEINC", $workDir."/include"); + define("DEDEINC", $workDir."/system"); require_once(DEDEINC."/dedehttpdown.class.php"); - require_once(DEDEINC . "/cli.class.php"); - // 更新系统 + require_once(DEDEINC . "/libraries/cli.class.php"); + //更新系统 $latestURL = "https://cdn.dedebiz.com/release/latest.txt"; $del = new DedeHttpDown(); $del->OpenUrl($latestURL); @@ -292,11 +293,11 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { $del->OpenUrl($fileHashURL); $filelist = $del->GetJSON(); $offFiles = array(); - // TODO 命令行自动更新 + //TODO 命令行自动更新 } else if (count($argv) > 1 && ($argv[1] == "quick" || $argv[1] == "q")){ - define("DEDEINC", $workDir."/include"); - require_once(DEDEINC . "/cli.class.php"); - // 快速开始一个用于开发的DedeBIZ环境,基于SQLite无其他依赖 + define("DEDEINC", $workDir."/system"); + require_once(DEDEINC . "/libraries/cli.class.php"); + //快速开始一个用于开发的DedeBIZ环境,基于SQLite无其他依赖 if (file_exists($workDir."/data/DedeBIZ.db")) { DedeCli::write("development environment has inited"); echo "Start Dev Server For DedeBIZ\n\r"; @@ -304,7 +305,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); exit; } - // 初始化安装一个开发环境 + //初始化安装一个开发环境 $db = new SQLite3($workDir.'/data/DedeBIZ.db'); $fp = fopen($workDir."/install/common.inc.php","r"); $configStr1 = fread($fp,filesize($workDir."/install/common.inc.php")); @@ -318,6 +319,8 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { $dbprefix = "dede_"; $dblang = "utf8"; + mkdir($workDir.'/data/tplcache', 0777); + //common.inc.php $configStr1 = str_replace("~dbtype~",$dbtype,$configStr1); $configStr1 = str_replace("~dbhost~",$dbhost,$configStr1); @@ -326,7 +329,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { $configStr1 = str_replace("~dbpwd~",$dbpwd,$configStr1); $configStr1 = str_replace("~dbprefix~",$dbprefix,$configStr1); $configStr1 = str_replace("~dblang~",$dblang,$configStr1); - $fp = fopen($workDir."/data/common.inc.php","w") or die("error,check ../data writeable"); + $fp = fopen($workDir."/data/common.inc.php","w") or die("error,check /data writeable"); fwrite($fp,$configStr1); fclose($fp); @@ -461,6 +464,10 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { if (phpversion() < "5.4") { die("DedeBIZ:command web server not support\n\n"); } + + // 写入安装程序锁 + file_put_contents($workDir.'/install/install_lock.txt', 'ok'); + echo "Start Dev Server For DedeBIZ\n\r"; echo "Open http://localhost:8088\n\r"; passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); diff --git a/docs/changelog.md b/docs/changelog.md index a26f83bc..10c88bde 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -1,13 +1,16 @@ # 更新记录 通过访问 https://www.dedebiz.com/git 获取完整更新记录 -## v6.0.4 +# v6.1.0 - 兼容PHP8+; - 修正已知存在的安全问题; - 优化系统管理后台界面; - 修正sqlite3下的错误; +- 系统结构调整,更合理规范; +- 增加编辑器多图上传插件; +- 修正自定义表单相关错误; -## v6.0.0 +# v6.0.0 - 调整DedeCMS目录结构,将原有include中外部访问的内容迁移出去; - 修正已知存在的安全问题; - 升级内置编辑器ckeditor4为最新版本; @@ -19,8 +22,8 @@ - 调整会员中心UI,移除对文件上传的支持,增加系统安全性; - 移除对Flash的依赖支持,今后版本采用HTML5相关特性; - 调整v6版本程序升级相关功能; -- 兼容PHP7.4,DedeCMS未来的版本以PHP7.X为主,实验性支持PHP8.X; +- 兼容PHP7.4,未来的版本以PHP7.X为主,实验性支持PHP8.X; - 系统支持HTTPS; - 默认模板重新设计制作,采用响应式布局; - 官方网站页面调整,调整部分内容以适应未来的版本更新; -- 增加DedeBIZ商业支持,构建更安全、稳定的DedeCMS生态; \ No newline at end of file +- 增加DedeBIZ商业支持,构建更安全、稳定的织梦生态; \ No newline at end of file diff --git a/docs/dedebiz_wechat_qr.jpg b/docs/dedebiz_wechat_qr.jpg index 6466bc11..4bdc7b80 100644 Binary files a/docs/dedebiz_wechat_qr.jpg and b/docs/dedebiz_wechat_qr.jpg differ diff --git a/src/dede/images/style1/style.css b/src/a/.dedekeep old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/style1/style.css rename to src/a/.dedekeep diff --git a/src/dede/action_search.php b/src/admin/action_search.php old mode 100755 new mode 100644 similarity index 88% rename from src/dede/action_search.php rename to src/admin/action_search.php index f575fff5..157bbb10 --- a/src/dede/action_search.php +++ b/src/admin/action_search.php @@ -1,21 +1,18 @@ -Search(); -include DedeInclude('templets/action_search.htm'); +Search(); +include DedeInclude('templets/action_search.htm'); \ No newline at end of file diff --git a/src/dede/actionsearch_class.php b/src/admin/actionsearch_class.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/actionsearch_class.php rename to src/admin/actionsearch_class.php index c7d6e9d2..8c501e5e --- a/src/dede/actionsearch_class.php +++ b/src/admin/actionsearch_class.php @@ -1,97 +1,90 @@ -asarray = $this->GetSearchstr(); - $this->keyword = $keyword; - } - - //初始化系统 - function ActionSearch($keyword) - { - $this->__construct($keyword); - } - - function GetSearchstr() - { - require_once(dirname(__FILE__)."/inc/inc_action_info.php"); - return is_array($actionSearch) ? $actionSearch : array(); - } - - function search() - { - $this->searchkeyword(); - return $this->result; - } - - /** - * 遍历功能配置项进行关键词匹配 - * - * @return void - */ - function searchkeyword() - { - $i = 0; //数组序列索引 - foreach ($this->asarray as $key => $value) { - //对二级项目进行匹配 - if (is_array($this->asarray[$key]['soniterm'])) { - foreach ($this->asarray[$key]['soniterm'] as $k => $val) { - //进行权限判断 - if (TestPurview($val['purview'])) { - //如果有操作权限 - if ($this->_strpos($val['title'], $this->keyword) !== false || $this->_strpos($val['description'], $this->keyword) !== false) { - //一级项目匹配 - $this->result[$i]['toptitle'] = $this->redColorKeyword($this->asarray[$key]['toptitle']); - $this->result[$i]['title'] = $this->redColorKeyword($this->asarray[$key]['title']); - $this->result[$i]['description'] = $this->redColorKeyword($this->asarray[$key]['description']); - //二级项目匹配 - $this->result[$i]['soniterm'][] = $this->redColorKeyword($val); - } - } - } - } - $i++; - } - } - - /** - * 加亮关键词 - * - * @access public - * @param string $text 关键词 - * @return string - */ - function redColorKeyword($text) - { - if (is_array($text)) { - foreach ($text as $key => $value) { - if ($key == 'title' || $key == 'description') { - //仅对title,description进行数组替换 - $text[$key] = str_replace($this->keyword, ''.$this->keyword.'', $text[$key]); - } - } - } else { - $text = str_replace($this->keyword, ''.$this->keyword.'', $text); - } - return $text; - } - - function _strpos($string, $find) - { - if (function_exists('stripos')) return stripos($string, $find); - return strpos($string, $find); - } -} +asarray = $this->GetSearchstr(); + $this->keyword = $keyword; + } + //初始化系统 + function ActionSearch($keyword) + { + $this->__construct($keyword); + } + function GetSearchstr() + { + require_once(dirname(__FILE__)."/inc/inc_action_info.php"); + return is_array($actionSearch) ? $actionSearch : array(); + } + function search() + { + $this->searchkeyword(); + return $this->result; + } + /** + * 遍历功能配置项进行关键词匹配 + * + * @return void + */ + function searchkeyword() + { + $i = 0; //数组序列索引 + foreach ($this->asarray as $key => $value) { + //对二级项目进行匹配 + if (is_array($this->asarray[$key]['soniterm'])) { + foreach ($this->asarray[$key]['soniterm'] as $k => $val) { + //进行权限判断 + if (TestPurview($val['purview'])) { + //如果有操作权限 + if ($this->_strpos($val['title'], $this->keyword) !== false || $this->_strpos($val['description'], $this->keyword) !== false) { + //一级项目匹配 + $this->result[$i]['toptitle'] = $this->redColorKeyword($this->asarray[$key]['toptitle']); + $this->result[$i]['title'] = $this->redColorKeyword($this->asarray[$key]['title']); + $this->result[$i]['description'] = $this->redColorKeyword($this->asarray[$key]['description']); + //二级项目匹配 + $this->result[$i]['soniterm'][] = $this->redColorKeyword($val); + } + } + } + } + $i++; + } + } + /** + * 加亮关键词 + * + * @access public + * @param string $text 关键词 + * @return string + */ + function redColorKeyword($text) + { + if (is_array($text)) { + foreach ($text as $key => $value) { + if ($key == 'title' || $key == 'description') { + //仅对title,description进行数组替换 + $text[$key] = str_replace($this->keyword, ''.$this->keyword.'', $text[$key]); + } + } + } else { + $text = str_replace($this->keyword, ''.$this->keyword.'', $text); + } + return $text; + } + function _strpos($string, $find) + { + if (function_exists('stripos')) return stripos($string, $find); + return strpos($string, $find); + } +} \ No newline at end of file diff --git a/src/dede/ad_add.php b/src/admin/ad_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/ad_add.php rename to src/admin/ad_add.php index 5be9c744..112ea0a7 --- a/src/dede/ad_add.php +++ b/src/admin/ad_add.php @@ -1,5 +1,4 @@ ExecuteNoneQuery("DELETE FROM `#@__myad` WHERE aid='$aid' "); ShowMsg("成功删除一则广告代码", $ENV_GOBACK_URL); exit(); } else if ($dopost == "gettag") { - require_once(DEDEINC.'/oxwindow.class.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); $jscode = ""; $showhtml = "\r\n\r\n$jscode\r\n\r\n"; $showhtml .= "预览:"; $row = $dsql->GetOne("SELECT tagname from `#@__myad` WHERE aid='$aid' "); - $showtag = '{'."dede:myad name='{$row['tagname']}'/".'}'; - $info = "说明:如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告更改后需要重新生成。
- 如果不希望重新生成所有页面,则直接调用JS代码即可。 + $info = "说明:如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告修改后需要重新生成
+ 如果不希望重新生成所有页面,则直接调用JS代码即可 "; $wintitle = "广告管理-获取广告标签"; $wecome_info = "广告管理::获取JS"; @@ -63,10 +60,9 @@ if ($dopost == 'delete') { WHERE aid='$aid' "; $dsql->ExecuteNoneQuery($query); - ShowMsg("成功更改一则广告代码", $ENV_GOBACK_URL); + ShowMsg("成功修改一则广告代码", $ENV_GOBACK_URL); exit(); } - $row = $dsql->GetOne("SELECT * FROM `#@__myad` WHERE aid='$aid'"); $dsql->Execute('dd', 'SELECT * FROM `#@__myadtype` ORDER BY id DESC'); $option = ''; @@ -77,4 +73,4 @@ while ($arr = $dsql->GetArray('dd')) { $option .= "\n\r"; } } -include DedeInclude('templets/ad_edit.htm'); +include DedeInclude('templets/ad_edit.htm'); \ No newline at end of file diff --git a/src/dede/ad_main.php b/src/admin/ad_main.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/ad_main.php rename to src/admin/ad_main.php index 7034fdb0..50eed979 --- a/src/dede/ad_main.php +++ b/src/admin/ad_main.php @@ -1,60 +1,54 @@ -Execute('dd', 'SELECT * FROM `#@__myadtype` ORDER BY id DESC'); -$option = ''; -while ($arr = $dsql->GetArray('dd')) { - if ($arr['id'] == $clsid) { - $option .= "\n\r"; - } else { - $option .= "\n\r"; - } -} -$where_sql = ' 1=1'; -if ($clsid != 0) $where_sql .= " AND clsid = $clsid"; -if ($keyword != '') $where_sql .= " AND (ad.adname like '%$keyword%') "; - -$sql = "SELECT ad.aid,ad.clsid,ad.tagname,tp.typename as typename,ad.adname,ad.timeset,ad.endtime,ap.typename as clsname -FROM `#@__myad` ad -LEFT JOIN `#@__arctype` tp on tp.id=ad.typeid -LEFT JOIN `#@__myadtype` ap on ap.id=ad.clsid -WHERE $where_sql -ORDER BY ad.aid desc"; -$dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN."/templets/ad_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); - -function TestType($tname, $type = "") -{ - if ($tname == "") { - return ($type == 1) ? "默认分类" : "所有栏目"; - } else { - return $tname; - } -} - -function TimeSetValue($ts) -{ - if ($ts == 0) { - return "不限时间"; - } else { - return "限时标记"; - } -} +Execute('dd', 'SELECT * FROM `#@__myadtype` ORDER BY id DESC'); +$option = ''; +while ($arr = $dsql->GetArray('dd')) { + if ($arr['id'] == $clsid) { + $option .= "\n\r"; + } else { + $option .= "\n\r"; + } +} +$where_sql = ' 1=1'; +if ($clsid != 0) $where_sql .= " AND clsid = $clsid"; +if ($keyword != '') $where_sql .= " AND (ad.adname like '%$keyword%') "; +$sql = "SELECT ad.aid,ad.clsid,ad.tagname,tp.typename as typename,ad.adname,ad.timeset,ad.endtime,ap.typename as clsname +FROM `#@__myad` ad +LEFT JOIN `#@__arctype` tp on tp.id=ad.typeid +LEFT JOIN `#@__myadtype` ap on ap.id=ad.clsid +WHERE $where_sql +ORDER BY ad.aid desc"; +$dlist = new DataListCP(); +$dlist->SetTemplet(DEDEADMIN."/templets/ad_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); +function TestType($tname, $type = "") +{ + if ($tname == "") { + return ($type == 1) ? "默认分类" : "所有栏目"; + } else { + return $tname; + } +} +function TimeSetValue($ts) +{ + if ($ts == 0) { + return "不限时间"; + } else { + return "限时标记"; + } +} \ No newline at end of file diff --git a/src/dede/adtype_main.php b/src/admin/adtype_main.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/adtype_main.php rename to src/admin/adtype_main.php index 42fc9db8..9c782ee2 --- a/src/dede/adtype_main.php +++ b/src/admin/adtype_main.php @@ -1,43 +1,40 @@ -ExecuteNoneQuery($query); - } - } else { - $query = "DELETE FROM `#@__myadtype` WHERE id='$tid' "; - $dsql->ExecuteNoneQuery($query); - } - } - //增加新记录 - if (isset($check_new) && $pname_new != '') { - $query = "INSERT INTO `#@__myadtype`(typename) VALUES('{$pname_new}');"; - $dsql->ExecuteNoneQuery($query); - } - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - ShowMsg("成功更新广告分类列表", 'adtype_main.php'); - exit; -} - -include DedeInclude('templets/adtype_main.htm'); +ExecuteNoneQuery($query); + } + } else { + $query = "DELETE FROM `#@__myadtype` WHERE id='$tid' "; + $dsql->ExecuteNoneQuery($query); + } + } + //增加新记录 + if (isset($check_new) && $pname_new != '') { + $query = "INSERT INTO `#@__myadtype`(typename) VALUES('{$pname_new}');"; + $dsql->ExecuteNoneQuery($query); + } + header("Content-Type: text/html; charset={$cfg_soft_lang}"); + ShowMsg("成功更新广告分类列表", 'adtype_main.php'); + exit; +} +include DedeInclude('templets/adtype_main.htm'); \ No newline at end of file diff --git a/src/dede/album_add.php b/src/admin/album_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/album_add.php rename to src/admin/album_add.php index de89b2cc..27dba502 --- a/src/dede/album_add.php +++ b/src/admin/album_add.php @@ -1,314 +1,313 @@ - 0 && $channelid == 0) { - $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); - $channelid = $row['channeltype']; - } else { - if ($channelid == 0) $channelid = 2; - } - //获得频道模型信息 - $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); - $channelid = $cInfos['id']; - //获取文章最大id以确定当前权重 - $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); - include DedeInclude("templets/album_add.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if (!isset($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (!isset($formhtml)) $formhtml = 0; - if (!isset($formzip)) $formzip = 0; - if (!isset($ddisfirst)) $ddisfirst = 0; - if (!isset($albums)) $albums = ""; - if (!isset($delzip)) $delzip = 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_New')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); - } - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $title = preg_replace("#\"#", '"', $title); - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $userip = GetIP(); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) $ddisremote = 0; - $litpic = GetDDImage('none', $picname, $ddisremote); - // 处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); - exit(); - } - $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; - $hasone = FALSE; - //处理并保存从网上复制的图片 - /*--------------------- - function _getformhtml() - ------------------*/ - if ($formhtml == 1) { - $imagebody = stripslashes($imagebody); - $imgurls .= GetCurContentAlbum($imagebody, $copysource, $litpicname); - if ($ddisfirst == 1 && $litpic == '' && !empty($litpicname)) { - $litpic = $litpicname; - $hasone = TRUE; - } - } - /*--------------------- - function _getformzip() - 处理从ZIP中解压的图片 - ---------------------*/ - if ($formzip == 1) { - include_once(DEDEINC."/zip.class.php"); - include_once(DEDEADMIN."/file_class.php"); - $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); - $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); - $ntime = time(); - if (file_exists($zipfile)) { - @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); - @chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); - $z = new zip(); - $z->ExtractAll($zipfile, $tmpzipdir); - $fm = new FileManagement(); - $imgs = array(); - $fm->GetMatchFiles($tmpzipdir, "jpg|png|gif", $imgs); - $i = 0; - foreach ($imgs as $imgold) { - $i++; - $savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); - CreateDir($savepath); - $iurl = $savepath."/".MyDate("d", $ntime).dd2char(MyDate("His", $ntime).'-'.$adminid."-{$i}".mt_rand(1000, 9999)); - $iurl = $iurl.substr($imgold, -4, 4); - $imgfile = $cfg_basedir.$iurl; - copy($imgold, $imgfile); - unlink($imgold); - if (is_file($imgfile)) { - $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; - //指定了提取第一张为缩略图的情况强制使用第一张缩略图 - if ($i == '1') { - if (!$hasone && $ddisfirst == 1 && $litpic == '' && empty($litpicname)) { - $litpicname = GetImageMapDD($iurl, $cfg_ddimg_width); - } - } - $info = ''; - $imginfos = GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; - //把图片信息保存到媒体文档管理档案中 - $inquery = " - INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; - $dsql->ExecuteNoneQuery($inquery); - $fid = $dsql->GetLastID(); - AddMyAddon($fid, $iurl); - WaterImg($imgfile, 'up'); - if (!$hasone && $ddisfirst == 1 && $litpic == '') { - if (empty($litpicname)) { - $litpicname = $iurl; - $litpicname = GetImageMapDD($iurl, $cfg_ddimg_width); - } - $litpic = $litpicname; - $hasone = TRUE; - } - } - } - if ($delzip == 1) unlink($zipfile); - $fm->RmDirFiles($tmpzipdir); - } - } - if ($albums !== "") { - $albumsArr = json_decode(stripslashes($albums), true); - for ($i = 0; $i <= count($albumsArr) - 1; $i++) { - $album = $albumsArr[$i]; - $data = explode(',', $album['img']); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - $info = ''; - $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); - $v = $fullUrl; - $imginfo = !empty($album['txt']) ? $album['txt'] : ''; - $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; - if ($ddisfirst == 1 && $litpic == '' && !empty($fullUrl)) { - $litpic = $fullUrl; - } - } - } - $imgurls = addslashes($imgurls); - //处理body字段自动摘要、自动提取缩略图等 - $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } else if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //加入主档案表 - $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, - color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) - VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', - '$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight'); "; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //加入附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if (empty($addtable)) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); - exit(); - } - $useip = GetIP(); - $query = "INSERT INTO `$addtable`(aid,typeid,redirecturl,userip,pagestyle,maxwidth,imgurls,`row`,col,isrm,ddmaxwidth,pagepicnum,body{$inadd_f}) - Values('$arcID','$typeid','$redirecturl','$useip','$pagestyle','$maxwidth','$imgurls','$row','$col','$isrm','$ddmaxwidth','$pagepicnum','$body'{$inadd_v}); "; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //生成HTML - InsertTags($tags, $arcID); - $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:继续发布图片  更改图集  预览文档  已发布图片管理  $backurl"; - $msg = "
{$msg}
".GetUpdateTest(); - - $wintitle = "成功发布一个图集"; - $wecome_info = "文章管理::发布图集"; - $win = new OxWindow(); - $win->AddTitle("成功发布一个图集:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", FALSE); - $win->Display(); + 0 && $channelid == 0) { + $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); + $channelid = $row['channeltype']; + } else { + if ($channelid == 0) $channelid = 2; + } + //获得频道模型信息 + $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); + $channelid = $cInfos['id']; + //获取文章最大id以确定当前权重 + $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); + include DedeInclude("templets/album_add.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if (!isset($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (!isset($formhtml)) $formhtml = 0; + if (!isset($formzip)) $formzip = 0; + if (!isset($ddisfirst)) $ddisfirst = 0; + if (!isset($albums)) $albums = ""; + if (!isset($delzip)) $delzip = 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_New')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); + } + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $title = preg_replace("#\"#", '"', $title); + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $userip = GetIP(); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) $ddisremote = 0; + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); + exit(); + } + $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; + $hasone = FALSE; + //处理并保存从网上复制的图片 + /*--------------------- + function _getformhtml() + ------------------*/ + if ($formhtml == 1) { + $imagebody = stripslashes($imagebody); + $imgurls .= GetCurContentAlbum($imagebody, $copysource, $litpicname); + if ($ddisfirst == 1 && $litpic == '' && !empty($litpicname)) { + $litpic = $litpicname; + $hasone = TRUE; + } + } + /*--------------------- + function _getformzip() + 处理从ZIP中解压的图片 + ---------------------*/ + if ($formzip == 1) { + include_once(DEDEINC."/libraries/zip.class.php"); + include_once(DEDEADMIN."/file_class.php"); + $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); + $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); + $ntime = time(); + if (file_exists($zipfile)) { + @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); + @chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); + $z = new zip(); + $z->ExtractAll($zipfile, $tmpzipdir); + $fm = new FileManagement(); + $imgs = array(); + $fm->GetMatchFiles($tmpzipdir, "jpg|png|gif", $imgs); + $i = 0; + foreach ($imgs as $imgold) { + $i++; + $savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); + CreateDir($savepath); + $iurl = $savepath."/".MyDate("d", $ntime).dd2char(MyDate("His", $ntime).'-'.$adminid."-{$i}".mt_rand(1000, 9999)); + $iurl = $iurl.substr($imgold, -4, 4); + $imgfile = $cfg_basedir.$iurl; + copy($imgold, $imgfile); + unlink($imgold); + if (is_file($imgfile)) { + $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; + //指定了提取第一张为缩略图的情况强制使用第一张缩略图 + if ($i == '1') { + if (!$hasone && $ddisfirst == 1 && $litpic == '' && empty($litpicname)) { + $litpicname = GetImageMapDD($iurl, $cfg_ddimg_width); + } + } + $info = ''; + $imginfos = GetImageSize($imgfile, $info); + $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + //把图片信息保存到媒体文档管理档案中 + $inquery = " + INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; + $dsql->ExecuteNoneQuery($inquery); + $fid = $dsql->GetLastID(); + AddMyAddon($fid, $iurl); + WaterImg($imgfile, 'up'); + if (!$hasone && $ddisfirst == 1 && $litpic == '') { + if (empty($litpicname)) { + $litpicname = $iurl; + $litpicname = GetImageMapDD($iurl, $cfg_ddimg_width); + } + $litpic = $litpicname; + $hasone = TRUE; + } + } + } + if ($delzip == 1) unlink($zipfile); + $fm->RmDirFiles($tmpzipdir); + } + } + if ($albums !== "") { + $albumsArr = json_decode(stripslashes($albums), true); + for ($i = 0; $i <= count($albumsArr) - 1; $i++) { + $album = $albumsArr[$i]; + $data = explode(',', $album['img']); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + $info = ''; + $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); + $v = $fullUrl; + $imginfo = !empty($album['txt']) ? $album['txt'] : ''; + $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; + if ($ddisfirst == 1 && $litpic == '' && !empty($fullUrl)) { + $litpic = $fullUrl; + } + } + } + $imgurls = addslashes($imgurls); + //处理body字段自动摘要、自动提取缩略图等 + $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } else if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //加入主档案表 + $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, + color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) + VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', + '$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight'); "; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //加入附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if (empty($addtable)) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作", "javascript:;"); + exit(); + } + $useip = GetIP(); + $query = "INSERT INTO `$addtable`(aid,typeid,redirecturl,userip,pagestyle,maxwidth,imgurls,`row`,col,isrm,ddmaxwidth,pagepicnum,body{$inadd_f}) + Values('$arcID','$typeid','$redirecturl','$useip','$pagestyle','$maxwidth','$imgurls','$row','$col','$isrm','$ddmaxwidth','$pagepicnum','$body'{$inadd_v}); "; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //生成HTML + InsertTags($tags, $arcID); + $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:继续发布图片  修改图集  预览文档  已发布图片管理  $backurl"; + $msg = "
{$msg}
".GetUpdateTest(); + + $wintitle = "成功发布一个图集"; + $wecome_info = "文章管理::发布图集"; + $win = new OxWindow(); + $win->AddTitle("成功发布一个图集:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", FALSE); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/album_edit.php b/src/admin/album_edit.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/album_edit.php rename to src/admin/album_edit.php index c9230b4b..9532bdb4 --- a/src/dede/album_edit.php +++ b/src/admin/album_edit.php @@ -1,378 +1,383 @@ -GetOne($arcQuery); - if (!is_array($arcRow)) { - ShowMsg("读取档案基本信息出错!", "-1"); - exit(); - } - $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; - $cInfos = $dsql->GetOne($query); - if (!is_array($cInfos)) { - ShowMsg("读取频道配置信息出错!", "javascript:;"); - exit(); - } - $addtable = $cInfos['addtable']; - $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); - $channelid = $arcRow['channel']; - $imgurls = $addRow["imgurls"]; - $maxwidth = $addRow["maxwidth"]; - $pagestyle = $addRow["pagestyle"]; - $irow = $addRow["row"]; - $icol = $addRow["col"]; - $isrm = $addRow["isrm"]; - $body = $addRow["body"]; - $ddmaxwidth = $addRow["ddmaxwidth"]; - $pagepicnum = $addRow["pagepicnum"]; - $tags = GetTags($aid); - $arcRow = XSSClean($arcRow); - $addRow = XSSClean($addRow); - include DedeInclude("templets/album_edit.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (!isset($formhtml)) $formhtml = 0; - if (!isset($albums)) $albums = ""; - if (!isset($formzip)) $formzip = 0; - if (!isset($ddisfirst)) $ddisfirst = 0; - if (!isset($delzip)) $delzip = 0; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_Edit')) { - if (TestPurview('a_AccEdit')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); - } else { - CheckArcAdmin($id, $cuserLogin->getUserID()); - } - } - //对保存的内容进行处理 - $pubdate = GetMkTime($pubdate); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, 250); - $keywords = trim(cn_substrR($keywords, 60)); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - // 处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //分析body里的内容 - $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //更新数据库的SQL语句 - $query = " - UPDATE `#@__archives` SET - typeid='$typeid', - typeid2='$typeid2', - sortrank='$sortrank', - flag='$flag', - click='$click', - ismake='$ismake', - arcrank='$arcrank', - money='$money', - title='$title', - color='$color', - source='$source', - writer='$writer', - litpic='$litpic', - pubdate='$pubdate', - notpost='$notpost', - description='$description', - keywords='$keywords', - shorttitle='$shorttitle', - filename='$filename', - dutyadmin='$adminid' - WHERE id='$id'; "; - if (!$dsql->ExecuteNoneQuery($query)) { - ShowMsg("更新数据库archives表时出错,请检查".$dsql->GetError(), "javascript:;"); - exit(); - } - $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; - $hasone = false; - //---------------------------------------- - //检查旧的图片是否有更新,并保存 - //----------------------------------------- - for ($i = 1; $i <= 120; $i++) { - if (!isset(${'imgurl'.$i})) continue; - $info = ''; - $iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); - $iurl = stripslashes(${'imgurl'.$i}); - $ddurl = stripslashes(${'imgddurl'.$i}); - if (preg_match("#swfupload#i", $ddurl)) $ddurl = ''; - $imgfile = $cfg_basedir.$iurl; - $litimgfile = $cfg_basedir.$ddurl; - //有上传文件的情况 - if (isset(${'imgfile'.$i}) && is_uploaded_file(${'imgfile'.$i})) { - $tmpFile = ${'imgfile'.$i}; - //检测上传的图片, 如果类型不对,保留原来图片 - $imginfos = @GetImageSize($tmpFile, $info); - if (!is_array($imginfos)) { - $imginfos = @GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; - continue; - } - move_uploaded_file($tmpFile, $imgfile); - $imginfos = @GetImageSize($imgfile, $info); - if ($ddurl == $iurl) { - $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; - $litimgfile = $cfg_basedir.$litpicname; - } else { - if ($cfg_ddimg_full == 'Y') ImageResizeNew($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); - else ImageResize($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); - $litpicname = $ddurl; - } - $imgurls .= "{dede:img ddimg='$litpicname' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; - } - //没上传图片(只修改msg信息) - else { - $iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); - $iurl = stripslashes(${'imgurl'.$i}); - $ddurl = stripslashes(${'imgddurl'.$i}); - if (preg_match("#swfupload#i", $ddurl)) { - $ddurl = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; - } - $imginfos = @GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; - } - } - //---------------------------- - //从HTML中获取新图片 - //---------------------------- - if ($formhtml == 1 && !empty($imagebody)) { - $imagebody = stripslashes($imagebody); - $imgurls .= GetCurContentAlbum($imagebody, $copysource, $litpicname); - if ($ddisfirst == 1 && $litpic == "" && !empty($litpicname)) { - $litpic = $litpicname; - $hasone = true; - } - } - /*--------------------- - function _getformzip() - 从ZIP文件中获取新图片 - ---------------------*/ - if ($formzip == 1) { - include_once(DEDEINC."/zip.class.php"); - include_once(DEDEADMIN."/file_class.php"); - $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); - $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); - $ntime = time(); - if (file_exists($zipfile)) { - @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); - @chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); - $z = new zip(); - $z->ExtractAll($zipfile, $tmpzipdir); - $fm = new FileManagement(); - $imgs = array(); - $fm->GetMatchFiles($tmpzipdir, "jpg|png|gif", $imgs); - $i = 0; - foreach ($imgs as $imgold) { - $i++; - $savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); - CreateDir($savepath); - $iurl = $savepath."/".MyDate("d", $ntime).dd2char(MyDate("His", $ntime).'-'.$adminid."-{$i}".mt_rand(1000, 9999)); - $iurl = $iurl.substr($imgold, -4, 4); - $imgfile = $cfg_basedir.$iurl; - copy($imgold, $imgfile); - unlink($imgold); - if (is_file($imgfile)) { - $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; - $info = ''; - $imginfos = GetImageSize($imgfile, $info); - $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; - //把图片信息保存到媒体文档管理档案中 - $inquery = " - INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; - $dsql->ExecuteNoneQuery($inquery); - if ( - !$hasone && $ddisfirst == 1 - && $litpic == "" && !empty($litpicname) - ) { - if (file_exists($cfg_basedir.$litpicname)) { - $litpic = $litpicname; - $hasone = true; - } - } - } - } - if ($delzip == 1) { - unlink($zipfile); - } - $fm->RmDirFiles($tmpzipdir); - } - } - if ($albums !== "") { - $albumsArr = json_decode(stripslashes($albums), true); - // var_dump($albumsArr);exit; - for ($i = 0; $i <= count($albumsArr) - 1; $i++) { - $album = $albumsArr[$i]; - $data = explode(',', $album['img']); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - $info = ''; - $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); - $v = $fullUrl; - $imginfo = !empty($album['txt']) ? $album['txt'] : ''; - $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; - } - } - $imgurls = addslashes($imgurls); - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //更新附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if ($addtable != '') { - $useip = GetIP(); - $query = "Update `$addtable` - set typeid='$typeid', - pagestyle='$pagestyle', - body='$body', - maxwidth = '$maxwidth', - ddmaxwidth = '$ddmaxwidth', - pagepicnum = '$pagepicnum', - imgurls='$imgurls', - `row`='$row', - col='$col', - isrm='$isrm'{$inadd_f}, - redirecturl='$redirecturl', - userip = '$useip' - WHERE aid='$id'; "; - if (!$dsql->ExecuteNoneQuery($query)) { - ShowMsg("更新附加表 `$addtable` 时出错,请检查原因".$dsql->GetError(), "javascript:;"); - exit(); - } - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); - $arcUrl = MakeArt($id, true, true, $isremote); - if ($arcUrl == '') { - $arcUrl = $cfg_phpurl."/view.php?aid=$id"; - } - ClearMyAddon($id, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:继续发布图片  查看更改  预览文档  管理已发布图片  $backurl"; - $wintitle = "成功更改图集"; - $wecome_info = "文章管理::更改图集"; - $win = new OxWindow(); - $win->AddTitle("成功更改一个图集:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); +GetOne($arcQuery); + if (!is_array($arcRow)) { + ShowMsg("读取档案基本信息出错!", "-1"); + exit(); + } + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; + $cInfos = $dsql->GetOne($query); + if (!is_array($cInfos)) { + ShowMsg("读取频道配置信息出错!", "javascript:;"); + exit(); + } + $addtable = $cInfos['addtable']; + $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); + $channelid = $arcRow['channel']; + $imgurls = $addRow["imgurls"]; + $maxwidth = $addRow["maxwidth"]; + $pagestyle = $addRow["pagestyle"]; + $irow = $addRow["row"]; + $icol = $addRow["col"]; + $isrm = $addRow["isrm"]; + $body = $addRow["body"]; + $ddmaxwidth = $addRow["ddmaxwidth"]; + $pagepicnum = $addRow["pagepicnum"]; + $tags = GetTags($aid); + $arcRow = XSSClean($arcRow); + $addRow = XSSClean($addRow); + include DedeInclude("templets/album_edit.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (!isset($formhtml)) $formhtml = 0; + if (!isset($albums)) $albums = ""; + if (!isset($formzip)) $formzip = 0; + if (!isset($ddisfirst)) $ddisfirst = 0; + if (!isset($delzip)) $delzip = 0; + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_Edit')) { + if (TestPurview('a_AccEdit')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); + } else { + CheckArcAdmin($id, $cuserLogin->getUserID()); + } + } + //对保存的内容进行处理 + $pubdate = GetMkTime($pubdate); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, 250); + $keywords = trim(cn_substrR($keywords, 60)); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //分析body里的内容 + $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //更新数据库的SQL语句 + $query = " + UPDATE `#@__archives` SET + typeid='$typeid', + typeid2='$typeid2', + sortrank='$sortrank', + flag='$flag', + click='$click', + ismake='$ismake', + arcrank='$arcrank', + money='$money', + title='$title', + color='$color', + source='$source', + writer='$writer', + litpic='$litpic', + pubdate='$pubdate', + notpost='$notpost', + description='$description', + keywords='$keywords', + shorttitle='$shorttitle', + filename='$filename', + dutyadmin='$adminid' + WHERE id='$id'; "; + if (!$dsql->ExecuteNoneQuery($query)) { + ShowMsg("更新数据库archives表时出错,请检查".$dsql->GetError(), "javascript:;"); + exit(); + } + $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; + $hasone = false; + //检查旧的图片是否有更新,并保存 + for ($i = 1; $i <= 120; $i++) { + if (!isset(${'imgurl'.$i})) continue; + $info = ''; + $iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); + $iurl = stripslashes(${'imgurl'.$i}); + $ddurl = stripslashes(${'imgddurl'.$i}); + if (preg_match("#swfupload#i", $ddurl)) $ddurl = ''; + $imgfile = $cfg_basedir.$iurl; + $litimgfile = $cfg_basedir.$ddurl; + //有上传文件的情况 + if (isset(${'imgfile'.$i}) && is_uploaded_file(${'imgfile'.$i})) { + $tmpFile = ${'imgfile'.$i}; + //检测上传的图片, 如果类型不对,保留原来图片 + $imginfos = @GetImageSize($tmpFile, $info); + if (!is_array($imginfos)) { + $imginfos = @GetImageSize($imgfile, $info); + $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + continue; + } + $mime = get_mime_type($tmpFile); + if (preg_match("#^unknow#", $mime)) { + ShowMsg("系统不支持fileinfo组件,建议php.ini中开启", -1); + exit; + } + if (!preg_match("#^image#i", $mime)) { + ShowMsg("非图片格式文件,无法正常上传", -1); + exit; + } + move_uploaded_file($tmpFile, $imgfile); + $imginfos = @GetImageSize($imgfile, $info); + if ($ddurl == $iurl) { + $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; + $litimgfile = $cfg_basedir.$litpicname; + } else { + if ($cfg_ddimg_full == 'Y') ImageResizeNew($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); + else ImageResize($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); + $litpicname = $ddurl; + } + $imgurls .= "{dede:img ddimg='$litpicname' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + } + //没上传图片(只修改msg信息) + else { + $iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); + $iurl = stripslashes(${'imgurl'.$i}); + $ddurl = stripslashes(${'imgddurl'.$i}); + if (preg_match("#swfupload#i", $ddurl)) { + $ddurl = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; + } + $imginfos = @GetImageSize($imgfile, $info); + $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + } + } + //从HTML中获取新图片 + if ($formhtml == 1 && !empty($imagebody)) { + $imagebody = stripslashes($imagebody); + $imgurls .= GetCurContentAlbum($imagebody, $copysource, $litpicname); + if ($ddisfirst == 1 && $litpic == "" && !empty($litpicname)) { + $litpic = $litpicname; + $hasone = true; + } + } + /*--------------------- + function _getformzip() + 从ZIP文件中获取新图片 + ---------------------*/ + if ($formzip == 1) { + include_once(DEDEINC."/libraries/zip.class.php"); + include_once(DEDEADMIN."/file_class.php"); + $zipfile = $cfg_basedir.str_replace($cfg_mainsite, '', $zipfile); + $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); + $ntime = time(); + if (file_exists($zipfile)) { + @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); + @chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); + $z = new zip(); + $z->ExtractAll($zipfile, $tmpzipdir); + $fm = new FileManagement(); + $imgs = array(); + $fm->GetMatchFiles($tmpzipdir, "jpg|png|gif", $imgs); + $i = 0; + foreach ($imgs as $imgold) { + $i++; + $savepath = $cfg_image_dir."/".MyDate("Y-m", $ntime); + CreateDir($savepath); + $iurl = $savepath."/".MyDate("d", $ntime).dd2char(MyDate("His", $ntime).'-'.$adminid."-{$i}".mt_rand(1000, 9999)); + $iurl = $iurl.substr($imgold, -4, 4); + $imgfile = $cfg_basedir.$iurl; + copy($imgold, $imgfile); + unlink($imgold); + if (is_file($imgfile)) { + $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; + $info = ''; + $imginfos = GetImageSize($imgfile, $info); + $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; + //把图片信息保存到媒体文档管理档案中 + $inquery = " + INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; + $dsql->ExecuteNoneQuery($inquery); + if ( + !$hasone && $ddisfirst == 1 + && $litpic == "" && !empty($litpicname) + ) { + if (file_exists($cfg_basedir.$litpicname)) { + $litpic = $litpicname; + $hasone = true; + } + } + } + } + if ($delzip == 1) { + unlink($zipfile); + } + $fm->RmDirFiles($tmpzipdir); + } + } + if ($albums !== "") { + $albumsArr = json_decode(stripslashes($albums), true); + //var_dump($albumsArr);exit; + for ($i = 0; $i <= count($albumsArr) - 1; $i++) { + $album = $albumsArr[$i]; + $data = explode(',', $album['img']); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + $info = ''; + $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); + $v = $fullUrl; + $imginfo = !empty($album['txt']) ? $album['txt'] : ''; + $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; + } + } + $imgurls = addslashes($imgurls); + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //更新附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if ($addtable != '') { + $useip = GetIP(); + $query = "Update `$addtable` + set typeid='$typeid', + pagestyle='$pagestyle', + body='$body', + maxwidth = '$maxwidth', + ddmaxwidth = '$ddmaxwidth', + pagepicnum = '$pagepicnum', + imgurls='$imgurls', + `row`='$row', + col='$col', + isrm='$isrm'{$inadd_f}, + redirecturl='$redirecturl', + userip = '$useip' + WHERE aid='$id'; "; + if (!$dsql->ExecuteNoneQuery($query)) { + ShowMsg("更新附加表 `$addtable` 时出错,请检查原因".$dsql->GetError(), "javascript:;"); + exit(); + } + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); + $arcUrl = MakeArt($id, true, true, $isremote); + if ($arcUrl == '') { + $arcUrl = $cfg_phpurl."/view.php?aid=$id"; + } + ClearMyAddon($id, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:继续发布图片  查看修改  预览文档  管理已发布图片  $backurl"; + $wintitle = "成功修改图集"; + $wecome_info = "文章管理::修改图集"; + $win = new OxWindow(); + $win->AddTitle("成功修改一个图集:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/album_testhtml.php b/src/admin/album_testhtml.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/album_testhtml.php rename to src/admin/album_testhtml.php index fb86c8a2..c7501efd --- a/src/dede/album_testhtml.php +++ b/src/admin/album_testhtml.php @@ -1,22 +1,20 @@ -[关闭]\r\n"; -preg_match_all("/(src|SRC)=[\"|'| ]{0,}(http:\/\/(.*)\.(gif|jpg|jpeg|png))/isU", $myhtml, $img_array); -$img_array = array_unique($img_array[2]); -echo "
"; -echo "捕获的图片:\r\n"; -print_r($img_array); -echo "
\r\n"; +[关闭]\r\n"; +preg_match_all("/(src|SRC)=[\"|'| ]{0,}(http:\/\/(.*)\.(gif|jpg|jpeg|png))/isU", $myhtml, $img_array); +$img_array = array_unique($img_array[2]); +echo "
"; +echo "捕获的图片:\r\n"; +print_r($img_array); +echo "
\r\n"; \ No newline at end of file diff --git a/src/dede/archives_add.php b/src/admin/archives_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/archives_add.php rename to src/admin/archives_add.php index 5defee9d..7c93355c --- a/src/dede/archives_add.php +++ b/src/admin/archives_add.php @@ -1,199 +1,199 @@ - 0 && $channelid == 0) { - $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); - $channelid = $row['channeltype']; - } else { - if ($channelid == 0) { - ShowMsg('无法识别模型信息,因此无法操作', '-1'); - exit(); - } - } - //获得频道模型信息 - $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); - $channelid = $cInfos['id']; - //获取文章最大id以确定当前权重 - $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); - include DedeInclude('templets/archives_add.htm'); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if (empty($litpic_b64)) $litpic_b64 = ''; - if (empty($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if ($typeid == 0) { - ShowMsg('请指定文档的栏目', '-1'); - exit(); - } - if (empty($channelid)) { - ShowMsg('文档为非指定的类型,请检查您发布内容的表单是否合法', '-1'); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg('您所选择的栏目与当前模型不相符,请选择白色的选项', '-1'); - exit(); - } - if (!TestPurview('a_New')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); - } - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $title = preg_replace("#\"#", '"', $title); - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $userip = GetIP(); - $isremote = 0; - $voteid = (empty($voteid) ? 0 : $voteid); - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - // 处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); - exit(); - } - //分析处理附加表数据 - $inadd_f = $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') continue; - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) ${$vs[0]} = ''; - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //保存到主表 - $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) - VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', - '$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$voteid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //保存到附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if (!empty($addtable)) { - $useip = GetIP(); - $query = "INSERT INTO `{$addtable}`(aid,typeid,redirecturl,userip{$inadd_f}) Values('$arcID','$typeid','$redirecturl','$useip'{$inadd_v})"; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - } - //生成HTML - InsertTags($tags, $arcID); - $artUrl = MakeArt($arcID, true, true, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:继续发布文档  查看文档  更改文档  已发布文档管理  $backurl"; - $msg = "
{$msg}
".GetUpdateTest(); - $wintitle = '成功发布文档'; - $wecome_info = '文档管理::发布文档'; - $win = new OxWindow(); - $win->AddTitle('成功发布文档:'); - $win->AddMsgItem($msg); - $winform = $win->GetWindow('hand', ' ', false); - $win->Display(); + 0 && $channelid == 0) { + $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); + $channelid = $row['channeltype']; + } else { + if ($channelid == 0) { + ShowMsg('无法识别模型信息,因此无法操作', '-1'); + exit(); + } + } + //获得频道模型信息 + $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); + $channelid = $cInfos['id']; + //获取文章最大id以确定当前权重 + $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); + include DedeInclude('templets/archives_add.htm'); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if (empty($litpic_b64)) $litpic_b64 = ''; + if (empty($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if ($typeid == 0) { + ShowMsg('请指定文档的栏目', '-1'); + exit(); + } + if (empty($channelid)) { + ShowMsg('文档为非指定的类型,请检查您发布内容的表单是否合法', '-1'); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg('您所选择的栏目与当前模型不相符,请选择白色的选项', '-1'); + exit(); + } + if (!TestPurview('a_New')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); + } + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $title = preg_replace("#\"#", '"', $title); + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $userip = GetIP(); + $isremote = 0; + $voteid = (empty($voteid) ? 0 : $voteid); + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); + exit(); + } + //分析处理附加表数据 + $inadd_f = $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') continue; + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) ${$vs[0]} = ''; + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //保存到主表 + $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) + VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', + '$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$voteid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //保存到附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if (!empty($addtable)) { + $useip = GetIP(); + $query = "INSERT INTO `{$addtable}`(aid,typeid,redirecturl,userip{$inadd_f}) Values('$arcID','$typeid','$redirecturl','$useip'{$inadd_v})"; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + } + //生成HTML + InsertTags($tags, $arcID); + $artUrl = MakeArt($arcID, true, true, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:继续发布文档  查看文档  修改文档  已发布文档管理  $backurl"; + $msg = "
{$msg}
".GetUpdateTest(); + $wintitle = '成功发布文档'; + $wecome_info = '文档管理::发布文档'; + $win = new OxWindow(); + $win->AddTitle('成功发布文档:'); + $win->AddMsgItem($msg); + $winform = $win->GetWindow('hand', ' ', false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/archives_do.php b/src/admin/archives_do.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/archives_do.php rename to src/admin/archives_do.php index 8fecc253..a3d4f227 --- a/src/dede/archives_do.php +++ b/src/admin/archives_do.php @@ -1,894 +1,894 @@ -GetOne($query); - $gurl = $row['editcon']; - if ($gurl == '') $gurl = 'article_edit.php'; - header("location:{$gurl}?aid=$aid"); - exit(); -} -/*-------------------------- -//浏览文档 -function viewArchives(){ } ----------------------------*/ -else if ($dopost == "viewArchives") { - $aid = preg_replace("#[^0-9]#", '', $aid); - //获取主表信息 - $query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon, - tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl - FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype - WHERE arc.id='$aid' "; - $trow = $dsql->GetOne($query); - $trow['maintable'] = (trim($trow['maintable']) == '' ? '#@__archives' : trim($trow['maintable'])); - if ($trow['issystem'] != -1) { - $arcQuery = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl - FROM `{$trow['maintable']}` arc LEFT JOIN `#@__arctype` tp on arc.typeid=tp.id - LEFT JOIN `#@__channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' "; - $arcRow = $dsql->GetOne($arcQuery); - PutCookie('DedeUserID', $arcRow['mid'], 1800); - PutCookie('DedeLoginTime', time(), 1800); - if ($arcRow['ismake'] == -1 || $arcRow['corank'] != 0 || $arcRow['arcrank'] != 0 || ($arcRow['typeid'] == 0 && $arcRow['channel'] != -1) || $arcRow['money'] > 0) { - echo ""; - exit(); - } - } else { - $arcRow['id'] = $aid; - $arcRow['typeid'] = $trow['typeid']; - $arcRow['senddate'] = $trow['senddate']; - $arcRow['title'] = ''; - $arcRow['ismake'] = 1; - $arcRow['arcrank'] = $trow['corank']; - $arcRow['namerule'] = $trow['namerule']; - $arcRow['typedir'] = $trow['typedir']; - $arcRow['money'] = 0; - $arcRow['filename'] = ''; - $arcRow['moresite'] = $trow['moresite']; - $arcRow['siteurl'] = $trow['siteurl']; - $arcRow['sitepath'] = $trow['sitepath']; - } - $arcurl = GetFileUrl( - $arcRow['id'], - $arcRow['typeid'], - $arcRow['senddate'], - $arcRow['title'], - $arcRow['ismake'], - $arcRow['arcrank'], - $arcRow['namerule'], - $arcRow['typedir'], - $arcRow['money'], - $arcRow['filename'], - $arcRow['moresite'], - $arcRow['siteurl'], - $arcRow['sitepath'] - ); - $arcfile = GetFileUrl( - $arcRow['id'], - $arcRow['typeid'], - $arcRow['senddate'], - $arcRow['title'], - $arcRow['ismake'], - $arcRow['arcrank'], - $arcRow['namerule'], - $arcRow['typedir'], - $arcRow['money'], - $arcRow['filename'] - ); - if (preg_match("#^http:#", $arcfile)) { - $arcfile = preg_replace("#^http:\/\/([^\/]*)\/#i", '/', $arcfile); - } - $truefile = GetTruePath().$arcfile; - if (!file_exists($truefile)) { - MakeArt($aid, TRUE); - } - echo ""; - exit(); -} -/*-------------------------- -//异步上传缩略图 -function uploadLitpic(){ } ----------------------------*/ -else if ($dopost == "uploadLitpic") { - $upfile = AdminUpload('litpic', 'imagelit', 0, false); - if ($upfile == '-1') { - $msg = ""; - } else if ($upfile == '-2') { - $msg = ""; - } else if ($upfile == '0') { - $msg = ""; - } else { - if (!empty($cfg_uplitpic_cut) && $cfg_uplitpic_cut == 'N') { - $msg = ""; - } else { - $msg = ""; - } - } - echo $msg; - exit(); -} -/*-------------------------- -//推荐文档 -function commendArchives(){ } ----------------------------*/ -else if ($dopost == "commendArchives") { - CheckPurview('a_Commend,sys_ArcBatch'); - if (!empty($aid) && empty($qstr)) { - $qstr = $aid; - } - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp on tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype - WHERE arc.id in($arcids) "; - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $aid = $row['id']; - if ($row['issystem'] != -1) { - $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); - $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); - $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); - $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); - } else { - $maintable = trim($row['addtable']); - $arr = $dsql->GetOne("SELECT flag From `{$maintable}` where aid='$aid' "); - $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); - $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); - } - } - ShowMsg("成功把所选的文档设为推荐", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//生成HTML -function makeArchives(); ----------------------------*/ -else if ($dopost == "makeArchives") { - CheckPurview('sys_MakeHtml,sys_ArcBatch'); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg('参数无效', $ENV_GOBACK_URL); - exit(); - } - require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); - $qstrs = explode('`', $qstr); - $i = 0; - foreach ($qstrs as $aid) { - $i++; - $pageurl = MakeArt($aid, false); - } - ShowMsg("成功更新指定 $i 个文件", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//审核文档 -function checkArchives() { } ----------------------------*/ -else if ($dopost == "checkArchives") { - CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); - require_once(DEDEADMIN."/inc/inc_archives_functions.php"); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype - WHERE arc.id in($arcids) "; - $dsql->SetQuery($query); - $dsql->Execute('ckall'); - while ($row = $dsql->GetArray('ckall')) { - $aid = $row['id']; - $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' "); - if ($row['issystem'] == -1) { - $dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET arcrank='0' WHERE aid='$aid' "); - } else { - $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' "); - } - $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); - $pageurl = MakeArt($aid, false); - } - ShowMsg("成功审核指定的文档", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//删除文档 -function delArchives(){ } ----------------------------*/ -else if ($dopost == "delArchives") { - CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC."/oxwindow.class.php"); - if (empty($fmdo)) $fmdo = ''; - - if ($fmdo == 'yes') { - if (!empty($aid) && empty($qstr)) { - $qstr = $aid; - } - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - $qstrs = explode("`", $qstr); - $okaids = array(); - foreach ($qstrs as $aid) { - if (!isset($okaids[$aid])) { - DelArc($aid); - } else { - $okaids[$aid] = 1; - } - } - ShowMsg("成功删除指定的文档", $ENV_GOBACK_URL); - exit(); - } else { - $wintitle = "文档管理-删除文档"; - $wecome_info = "文档管理::删除文档"; - $win = new OxWindow(); - $win->Init("archives_do.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("qstr", $qstr); - $win->AddHidden("aid", $aid); - $win->AddTitle("您确实要删除 $qstr 和 $aid 这些文档?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - } -} -/*----------------------------- -function moveArchives(){ } -------------------------------*/ -else if ($dopost == 'moveArchives') { - CheckPurview('sys_ArcBatch'); - if (empty($totype)) { - require_once(DEDEINC.'/typelink.class.php'); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - AjaxHead(); - $channelid = empty($channelid) ? 0 : $channelid; - $tl = new TypeLink($aid); - $typeOptions = $tl->GetOptionArray(0, $admin_catalogs, $channelid); - $typeOptions = ""; - //输出AJAX可移动窗体 - $divname = 'moveArchives'; - echo "
"; - echo "
移动文档
"; - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - ?> - - - - - - - - - - - -
 目标栏目:
 文档ID: - -
移动到的目标栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档。 -
- - -
-
- GetOne("SELECT tp.channeltype,tp.ispart,tp.channeltype,ch.maintable,ch.addtable,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype WHERE tp.id='$totype' "); - $idtype = "id"; - if (!is_array($typeInfos)) { - ShowMsg('参数错误', '-1'); - exit(); - } - if ($typeInfos['ispart'] != 0) { - ShowMsg('文档保存的栏目必须为最终列表栏目', '-1'); - exit(); - } - if (empty($typeInfos['addtable'])) { - $typeInfos['maintable'] = '#@__archives'; - } - //增加单表模型判断 - if ($typeInfos['issystem'] == -1) { - $typeInfos['maintable'] = $typeInfos['addtable']; - $idtype = "aid"; - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $arc = ''; - $j = 0; - $okids = array(); - $dsql->SetQuery("SELECT {$idtype},typeid FROM `{$typeInfos['maintable']}` WHERE {$idtype} in($arcids) AND channel='{$typeInfos['channeltype']}' "); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - if ($row['typeid'] != $totype) { - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$totype' WHERE id='{$row[$idtype]}' "); - $dsql->ExecuteNoneQuery("UPDATE `{$typeInfos['maintable']}` SET typeid='$totype' WHERE id='{$row[$idtype]}' "); - $dsql->ExecuteNoneQuery("UPDATE `{$typeInfos['addtable']}` SET typeid='$totype' WHERE aid='{$row[$idtype]}' "); - $okids[] = $row[$idtype]; - $j++; - } - } - //更新HTML - foreach ($okids as $aid) { - $arc = new Archives($aid); - $arc->MakeHtml(); - } - ShowMsg("成功移动 $j 个文档", $ENV_GOBACK_URL); - exit(); - } -} -/*----------------------------- -//还原文档 -function RbReturnArchives(){ } -------------------------------*/ -else if ($dopost == 'return') { - CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC."/oxwindow.class.php"); - - if (!empty($aid) && empty($qstr)) $qstr = $aid; - - if ($qstr == '') { - ShowMsg("参数无效", "recycling.php"); - exit(); - } - $qstrs = explode("`", $qstr); - foreach ($qstrs as $aid) { - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank='-1',ismake='0' WHERE id='$aid'"); - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid'; "); - } - ShowMsg("成功还原指定的文档", "recycling.php"); - exit(); -} -/*----------------------------- -//清空文档 -function RbClearArchives(){ } -------------------------------*/ -else if ($dopost == 'clear') { - CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC."/oxwindow.class.php"); - if (empty($fmdo)) $fmdo = ''; - $recycle = empty($recycle) ? "" : $recycle; - - if ($fmdo == 'yes') { - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", "recycling.php"); - exit(); - } - $qstrs = explode(",", $qstr); - $okaids = array(); - foreach ($qstrs as $qstr) { - if (!isset($okaids[$qstr])) { - DelArc($qstr, "OK", FALSE, $recycle); - $okaids[$qstr] = $qstr; - } else { - $okaids[$qstr] = 1; - } - } - ShowMsg("成功删除指定的文档", "recycling.php"); - exit(); - } else { - $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE `arcrank` = '-2'"); - $dsql->Execute(); - $qstr = ''; - while ($row = $dsql->GetArray()) { - $qstr .= $row['id'].","; - $aid = $row['id']; - } - $num = $dsql->GetTotalRow(); - if (empty($num)) { - ShowMsg("对不起,未发现相关文档", "recycling.php"); - exit(); - } - $wintitle = "文档管理-清空所有文档"; - $wecome_info = "文档回收站::清空所有文档"; - $win = new OxWindow(); - $win->Init("archives_do.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("qstr", $qstr); - $win->AddHidden("aid", $aid); - $win->AddHidden("recycle", $recycle); - $win->AddTitle("本次操作将清空回收站所有共 $num 篇文档
您确实要永久删除 $qstr 这些文档?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - } -} -/*----------------------------- -//清除文档 -function RbDelArchives(){ } -------------------------------*/ -else if ($dopost == 'del') { - CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); - require_once(DEDEINC."/oxwindow.class.php"); - if (empty($fmdo)) $fmdo = ''; - $recycle = empty($recycle) ? "" : $recycle; - if ($fmdo == 'yes') { - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", "recycling.php"); - exit(); - } - $qstrs = explode("`", $qstr); - $okaids = array(); - foreach ($qstrs as $aid) { - if (!isset($okaids[$aid])) { - DelArc($aid, "OK", "", $recycle); - } else { - $okaids[$aid] = 1; - } - } - ShowMsg("成功删除指定的文档", "recycling.php"); - exit(); - } else { - $wintitle = "文档管理-删除文档"; - $wecome_info = "文档管理::删除文档"; - $win = new OxWindow(); - $win->Init("archives_do.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("qstr", $qstr); - $win->AddHidden("aid", $aid); - $win->AddHidden("recycle", $recycle); - $win->AddTitle("您确实要永久删除 $qstr 和 $aid 这些文档?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - } -} -/*----------------------------- -//快速编辑 -function quickEdit(){ } -------------------------------*/ -else if ($dopost == 'quickEdit') { - require_once(DEDEADMIN."/inc/inc_catalog_options.php"); - AjaxHead(); - $query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* - FROM `#@__archives` arc - LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel - LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; - $arcRow = $dsql->GetOne($query); - $divname = 'quickEdit'; - echo "
"; - echo "
快速属性编辑
"; - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 所属栏目: - getUserChannel(), $arcRow['channel']); - echo ""; - ?> -
 属性: - '> - SetQuery("SELECT * FROM `#@__arcatt` ORDER BY `sortid` ASC"); - $dsql->Execute(); - while ($trow = $dsql->GetObject()) { - if ($trow->att == 'j' || $trow->att == 'p') continue; - if (preg_match("#".$trow->att."#", $arcRow['flag'])) - echo " "; - else - echo " "; - } - ?> -
 标题:
 简略标题:
 阅读权限: - - 需要金币:" style="width:100px"> -
 关键字:
- - -
-
-getUserID()); - } - } - $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); - $shorttitle = cn_substrR($shorttitle, 36); - $keywords = trim(cn_substrR($keywords, 60)); - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; - $adminid = $cuserLogin->getUserID(); - //属性处理 - $flag = isset($flags) ? join(',', $flags) : ''; - if (!empty($flag)) { - if (preg_match("#p#", $oldflag)) $flag .= ',p'; - if (preg_match("#j#", $oldflag)) $flag .= ',j'; - } - $query = "UPDATE `#@__archives` SET - typeid = '$typeid', - flag = '$flag', - arcrank = '$arcrank', - money = '$money', - title = '$title', - shorttitle = '$shorttitle', - keywords = '$keywords', - dutyadmin = '$adminid' - WHERE id = '$aid'; "; - //更新主表 - $dsql->ExecuteNoneQuery($query); - //更新微表 - $dsql->ExecuteNoneQuery(" UPDATE `#@__arctiny` SET typeid='$typeid',arcrank='$arcrank' WHERE id='$aid' "); - //更新附加表 - if ($typeid != $oldtypeid) { - $addtable = trim($addtable); - if (empty($addtable)) $addtable = '#@__addonarticle'; - else $addtable = preg_replace("#[^a-z0-9__#@-]#i", "", $addtable); - $dsql->ExecuteNoneQuery(" UPDATE `$addtable` SET typeid='$typeid' WHERE aid='$aid' "); - } - //更新HTML - $artUrl = MakeArt($aid, TRUE, TRUE); - $backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '-1'; - ShowMsg('成功更新一篇文档的基本信息', $backurl); - exit(); -} -/*-------------------------- -分析并自动获取文档关键词 -function makekw(){ } ---------------------------*/ -else if ($dopost == "makekw") { - CheckPurview('a_Commend,sys_ArcBatch'); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $query = "SELECT arc.*, addt.* From `#@__archives` arc LEFT JOIN `#@__addonarticle` addt ON addt.aid=arc.id WHERE arc.id in($arcids) AND arc.channel=1 "; - $dsql->SetQuery($query); - $dsql->Execute(); - if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { - $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); - $client->appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - while ($row = $dsql->GetArray()) { - //跳过已经有关键字的内容 - if (trim($row['keywords']) != '') continue; - $aid = $row['id']; - $keywords = ''; - $title = $row['title']; - $description = $row['description']; - $body = cn_substr($row['body'], 5000); - $data = $client->Spliteword($title.Html2Text($body)); - $keywords = $data->data; - $description = str_replace(' ', ' ', trim($description)); - $description = str_replace('[', ' ', $description); - $description = str_replace(']', ' ', $description); - $description = preg_replace("#[ \t]{1,}#is", ' ', $description); - $description = str_replace('关键字', '', $description); - $description = str_replace('关键词', '', $description); - $description = addslashes($description); - $dsql->ExecuteNoneQuery(" UPDATE `#@__archives` SET `keywords`='$keywords',`description`='$description' WHERE id='{$aid}' "); - } - $client->Close(); - } else { - include_once(DEDEINC.'/splitword.class.php'); - $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); - while ($row = $dsql->GetArray()) { - //跳过已经有关键字的内容 - if (trim($row['keywords']) != '') continue; - $aid = $row['id']; - $keywords = ''; - $title = $row['title']; - $description = $row['description']; - $body = cn_substr($row['body'], 5000); - $sp->SetSource($title, $cfg_soft_lang, $cfg_soft_lang); - $sp->StartAnalysis(); - $titleindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); - $sp->SetSource(Html2Text($body), $cfg_soft_lang, $cfg_soft_lang); - $sp->StartAnalysis(); - $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); - if (is_array($allindexs) && is_array($titleindexs)) { - foreach ($titleindexs as $k => $v) { - if (strlen($keywords.$k) >= 60) { - break; - } else { - if (strlen($k) <= 2) continue; - $keywords .= $k.','; - } - } - foreach ($allindexs as $k => $v) { - if (strlen($keywords.$k) >= 60) { - break; - } else if (!in_array($k, $titleindexs)) { - if (strlen($k) <= 2) continue; - $keywords .= $k.','; - } - } - } - $description = str_replace(' ', ' ', trim($description)); - $description = str_replace('[', ' ', $description); - $description = str_replace(']', ' ', $description); - $description = preg_replace("#[ \t]{1,}#is", ' ', $description); - $description = str_replace('关键字', '', $description); - $description = str_replace('关键词', '', $description); - $description = addslashes($description); - $dsql->ExecuteNoneQuery(" UPDATE `#@__archives` SET `keywords`='$keywords',`description`='$description' WHERE id='{$aid}' "); - } - $sp = null; - } - ShowMsg("成功分析指定文档的关键词", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//批量增加属性 -function attsAdd(){ } ----------------------------*/ -else if ($dopost == 'attsAdd') { - CheckPurview('a_Commend,sys_ArcBatch'); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - if (empty($flagname)) { - ShowMsg("必须指定要添加的属性", $ENV_GOBACK_URL); - exit(); - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype - WHERE arc.id in($arcids) "; - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $aid = $row['id']; - if ($row['issystem'] != -1) { - $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); - $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); - $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); - $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); - } else { - $maintable = trim($row['addtable']); - $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); - $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); - $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); - } - } - ShowMsg("成功对选中文档增加指定的属性", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//批量删除属性 -function attsDel(){ } ----------------------------*/ -else if ($dopost == 'attsDel') { - CheckPurview('a_Commend,sys_ArcBatch'); - if (!empty($aid) && empty($qstr)) $qstr = $aid; - if ($qstr == '') { - ShowMsg("参数无效", $ENV_GOBACK_URL); - exit(); - } - if (empty($flagname)) { - ShowMsg("必须指定要删除的属性", $ENV_GOBACK_URL); - exit(); - } - $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); - $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc - LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid - LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype - WHERE arc.id in($arcids) "; - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $aid = $row['id']; - if ($row['issystem'] != -1) { - $idname = 'id'; - $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); - $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); - } else { - $idname = 'aid'; - $maintable = trim($row['addtable']); - $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); - } - $flag = $arr['flag']; - if (trim($flag) == '' || !preg_match("#".$flagname."#", $flag)) { - continue; - } else { - $flags = explode(',', $flag); - $okflags = array(); - foreach ($flags as $f) { - if ($f != $flagname) $okflags[] = $f; - } - } - $flag = trim(join(',', $okflags)); - $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE {$idname}='{$aid}' "); - } - ShowMsg("成功对选中文档删除指定的属性", $ENV_GOBACK_URL); - exit(); -} -/*-------------------------- -//获得批量属性处理的AJAX窗体 -function attsDlg(){ } ----------------------------*/ -else if ($dopost == 'attsDlg') { - if (!empty($aid) && empty($qstr)) $qstr = $aid; - $dojobname = ($dojob == 'attsDel' ? '批量删除属性' : '批量增加属性'); - AjaxHead(); - //输出AJAX可移动窗体 - $divname = 'attsDlg'; - echo "
"; - echo "
{$dojobname}
"; - echo "
"; - echo "
"; - echo "
"; - echo ""; - echo ""; - echo ""; -?> - - - - - - - - - - - -
 属性: - '> - SetQuery("SELECT * FROM `#@__arcatt` ORDER BY `sortid` ASC"); - $dsql->Execute(); - while ($trow = $dsql->GetObject()) { - if ($trow->att == 'j' || $trow->att == 'p') continue; - echo " "; - } - ?> -
 文档ID:
- - -
-
-"; - echo "
栏目快速选择器
"; - echo "
"; - echo ""; - $tus = new TypeUnitSelector(); - ?> -
-
ListAllType($channelid); ?>
-
- - -
-
-GetOne($query); + $gurl = $row['editcon']; + if ($gurl == '') $gurl = 'article_edit.php'; + header("location:{$gurl}?aid=$aid"); + exit(); +} +/*-------------------------- +//浏览文档 +function viewArchives(){ } +---------------------------*/ +else if ($dopost == "viewArchives") { + $aid = preg_replace("#[^0-9]#", '', $aid); + //获取主表信息 + $query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon, + tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl + FROM `#@__arctiny` arc + LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype + WHERE arc.id='$aid' "; + $trow = $dsql->GetOne($query); + $trow['maintable'] = (trim($trow['maintable']) == '' ? '#@__archives' : trim($trow['maintable'])); + if ($trow['issystem'] != -1) { + $arcQuery = "SELECT arc.*,tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl + FROM `{$trow['maintable']}` arc LEFT JOIN `#@__arctype` tp on arc.typeid=tp.id + LEFT JOIN `#@__channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' "; + $arcRow = $dsql->GetOne($arcQuery); + PutCookie('DedeUserID', $arcRow['mid'], 1800); + PutCookie('DedeLoginTime', time(), 1800); + if ($arcRow['ismake'] == -1 || $arcRow['corank'] != 0 || $arcRow['arcrank'] != 0 || ($arcRow['typeid'] == 0 && $arcRow['channel'] != -1) || $arcRow['money'] > 0) { + echo ""; + exit(); + } + } else { + $arcRow['id'] = $aid; + $arcRow['typeid'] = $trow['typeid']; + $arcRow['senddate'] = $trow['senddate']; + $arcRow['title'] = ''; + $arcRow['ismake'] = 1; + $arcRow['arcrank'] = $trow['corank']; + $arcRow['namerule'] = $trow['namerule']; + $arcRow['typedir'] = $trow['typedir']; + $arcRow['money'] = 0; + $arcRow['filename'] = ''; + $arcRow['moresite'] = $trow['moresite']; + $arcRow['siteurl'] = $trow['siteurl']; + $arcRow['sitepath'] = $trow['sitepath']; + } + $arcurl = GetFileUrl( + $arcRow['id'], + $arcRow['typeid'], + $arcRow['senddate'], + $arcRow['title'], + $arcRow['ismake'], + $arcRow['arcrank'], + $arcRow['namerule'], + $arcRow['typedir'], + $arcRow['money'], + $arcRow['filename'], + $arcRow['moresite'], + $arcRow['siteurl'], + $arcRow['sitepath'] + ); + $arcfile = GetFileUrl( + $arcRow['id'], + $arcRow['typeid'], + $arcRow['senddate'], + $arcRow['title'], + $arcRow['ismake'], + $arcRow['arcrank'], + $arcRow['namerule'], + $arcRow['typedir'], + $arcRow['money'], + $arcRow['filename'] + ); + if (preg_match("#^http:#", $arcfile)) { + $arcfile = preg_replace("#^http:\/\/([^\/]*)\/#i", '/', $arcfile); + } + $truefile = GetTruePath().$arcfile; + if (!file_exists($truefile)) { + MakeArt($aid, TRUE); + } + echo ""; + exit(); +} +/*-------------------------- +//异步上传缩略图 +function uploadLitpic(){ } +---------------------------*/ +else if ($dopost == "uploadLitpic") { + $upfile = AdminUpload('litpic', 'imagelit', 0, false); + if ($upfile == '-1') { + $msg = ""; + } else if ($upfile == '-2') { + $msg = ""; + } else if ($upfile == '0') { + $msg = ""; + } else { + if (!empty($cfg_uplitpic_cut) && $cfg_uplitpic_cut == 'N') { + $msg = ""; + } else { + $msg = ""; + } + } + echo $msg; + exit(); +} +/*-------------------------- +//推荐文档 +function commendArchives(){ } +---------------------------*/ +else if ($dopost == "commendArchives") { + CheckPurview('a_Commend,sys_ArcBatch'); + if (!empty($aid) && empty($qstr)) { + $qstr = $aid; + } + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc + LEFT JOIN `#@__arctype` tp on tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype + WHERE arc.id in($arcids) "; + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $aid = $row['id']; + if ($row['issystem'] != -1) { + $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); + $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); + $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); + $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); + } else { + $maintable = trim($row['addtable']); + $arr = $dsql->GetOne("SELECT flag From `{$maintable}` where aid='$aid' "); + $flag = ($arr['flag'] == '' ? 'c' : $arr['flag'].',c'); + $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); + } + } + ShowMsg("成功把所选的文档设为推荐", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//生成HTML +function makeArchives(); +---------------------------*/ +else if ($dopost == "makeArchives") { + CheckPurview('sys_MakeHtml,sys_ArcBatch'); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg('参数无效', $ENV_GOBACK_URL); + exit(); + } + require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); + $qstrs = explode('`', $qstr); + $i = 0; + foreach ($qstrs as $aid) { + $i++; + $pageurl = MakeArt($aid, false); + } + ShowMsg("成功更新指定 $i 个文件", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//审核文档 +function checkArchives() { } +---------------------------*/ +else if ($dopost == "checkArchives") { + CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); + require_once(DEDEADMIN."/inc/inc_archives_functions.php"); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc + LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype + WHERE arc.id in($arcids) "; + $dsql->SetQuery($query); + $dsql->Execute('ckall'); + while ($row = $dsql->GetArray('ckall')) { + $aid = $row['id']; + $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' "); + if ($row['issystem'] == -1) { + $dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET arcrank='0' WHERE aid='$aid' "); + } else { + $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' "); + } + $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); + $pageurl = MakeArt($aid, false); + } + ShowMsg("成功审核指定的文档", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//删除文档 +function delArchives(){ } +---------------------------*/ +else if ($dopost == "delArchives") { + CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); + require_once(DEDEINC."/libraries/oxwindow.class.php"); + if (empty($fmdo)) $fmdo = ''; + + if ($fmdo == 'yes') { + if (!empty($aid) && empty($qstr)) { + $qstr = $aid; + } + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + $qstrs = explode("`", $qstr); + $okaids = array(); + foreach ($qstrs as $aid) { + if (!isset($okaids[$aid])) { + DelArc($aid); + } else { + $okaids[$aid] = 1; + } + } + ShowMsg("成功删除指定的文档", $ENV_GOBACK_URL); + exit(); + } else { + $wintitle = "文档管理-删除文档"; + $wecome_info = "文档管理::删除文档"; + $win = new OxWindow(); + $win->Init("archives_do.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("qstr", $qstr); + $win->AddHidden("aid", $aid); + $win->AddTitle("您确实要删除 $qstr 和 $aid 这些文档"); + $winform = $win->GetWindow("ok"); + $win->Display(); + } +} +/*----------------------------- +function moveArchives(){ } +------------------------------*/ +else if ($dopost == 'moveArchives') { + CheckPurview('sys_ArcBatch'); + if (empty($totype)) { + require_once(DEDEINC.'/typelink/typelink.class.php'); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + AjaxHead(); + $channelid = empty($channelid) ? 0 : $channelid; + $tl = new TypeLink($aid); + $typeOptions = $tl->GetOptionArray(0, $admin_catalogs, $channelid); + $typeOptions = ""; + //输出AJAX可移动窗体 + $divname = 'moveArchives'; + echo "
"; + echo "
移动文档
"; + echo "
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo ""; + ?> + + + + + + + + + + + +
 目标栏目:
 文档ID: + +
移动到的目标栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档 +
+ + +
+
+ GetOne("SELECT tp.channeltype,tp.ispart,tp.channeltype,ch.maintable,ch.addtable,ch.issystem FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch on ch.id=tp.channeltype WHERE tp.id='$totype' "); + $idtype = "id"; + if (!is_array($typeInfos)) { + ShowMsg('参数错误', '-1'); + exit(); + } + if ($typeInfos['ispart'] != 0) { + ShowMsg('文档保存的栏目必须为最终列表栏目', '-1'); + exit(); + } + if (empty($typeInfos['addtable'])) { + $typeInfos['maintable'] = '#@__archives'; + } + //增加单表模型判断 + if ($typeInfos['issystem'] == -1) { + $typeInfos['maintable'] = $typeInfos['addtable']; + $idtype = "aid"; + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $arc = ''; + $j = 0; + $okids = array(); + $dsql->SetQuery("SELECT {$idtype},typeid FROM `{$typeInfos['maintable']}` WHERE {$idtype} in($arcids) AND channel='{$typeInfos['channeltype']}' "); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + if ($row['typeid'] != $totype) { + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$totype' WHERE id='{$row[$idtype]}' "); + $dsql->ExecuteNoneQuery("UPDATE `{$typeInfos['maintable']}` SET typeid='$totype' WHERE id='{$row[$idtype]}' "); + $dsql->ExecuteNoneQuery("UPDATE `{$typeInfos['addtable']}` SET typeid='$totype' WHERE aid='{$row[$idtype]}' "); + $okids[] = $row[$idtype]; + $j++; + } + } + //更新HTML + foreach ($okids as $aid) { + $arc = new Archives($aid); + $arc->MakeHtml(); + } + ShowMsg("成功移动 $j 个文档", $ENV_GOBACK_URL); + exit(); + } +} +/*----------------------------- +//还原文档 +function RbReturnArchives(){ } +------------------------------*/ +else if ($dopost == 'return') { + CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); + require_once(DEDEINC."/libraries/oxwindow.class.php"); + + if (!empty($aid) && empty($qstr)) $qstr = $aid; + + if ($qstr == '') { + ShowMsg("参数无效", "recycling.php"); + exit(); + } + $qstrs = explode("`", $qstr); + foreach ($qstrs as $aid) { + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank='-1',ismake='0' WHERE id='$aid'"); + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid'; "); + } + ShowMsg("成功还原指定的文档", "recycling.php"); + exit(); +} +/*----------------------------- +//清空文档 +function RbClearArchives(){ } +------------------------------*/ +else if ($dopost == 'clear') { + CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); + require_once(DEDEINC."/libraries/oxwindow.class.php"); + if (empty($fmdo)) $fmdo = ''; + $recycle = empty($recycle) ? "" : $recycle; + + if ($fmdo == 'yes') { + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", "recycling.php"); + exit(); + } + $qstrs = explode(",", $qstr); + $okaids = array(); + foreach ($qstrs as $qstr) { + if (!isset($okaids[$qstr])) { + DelArc($qstr, "OK", FALSE, $recycle); + $okaids[$qstr] = $qstr; + } else { + $okaids[$qstr] = 1; + } + } + ShowMsg("成功删除指定的文档", "recycling.php"); + exit(); + } else { + $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE `arcrank` = '-2'"); + $dsql->Execute(); + $qstr = ''; + while ($row = $dsql->GetArray()) { + $qstr .= $row['id'].","; + $aid = $row['id']; + } + $num = $dsql->GetTotalRow(); + if (empty($num)) { + ShowMsg("对不起,未发现相关文档", "recycling.php"); + exit(); + } + $wintitle = "文档管理-清空所有文档"; + $wecome_info = "文档回收站::清空所有文档"; + $win = new OxWindow(); + $win->Init("archives_do.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("qstr", $qstr); + $win->AddHidden("aid", $aid); + $win->AddHidden("recycle", $recycle); + $win->AddTitle("本次操作将清空回收站所有共 $num 篇文档
您确实要永久删除 $qstr 这些文档"); + $winform = $win->GetWindow("ok"); + $win->Display(); + } +} +/*----------------------------- +//清除文档 +function RbDelArchives(){ } +------------------------------*/ +else if ($dopost == 'del') { + CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); + require_once(DEDEINC."/libraries/oxwindow.class.php"); + if (empty($fmdo)) $fmdo = ''; + $recycle = empty($recycle) ? "" : $recycle; + if ($fmdo == 'yes') { + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", "recycling.php"); + exit(); + } + $qstrs = explode("`", $qstr); + $okaids = array(); + foreach ($qstrs as $aid) { + if (!isset($okaids[$aid])) { + DelArc($aid, "OK", "", $recycle); + } else { + $okaids[$aid] = 1; + } + } + ShowMsg("成功删除指定的文档", "recycling.php"); + exit(); + } else { + $wintitle = "文档管理-删除文档"; + $wecome_info = "文档管理::删除文档"; + $win = new OxWindow(); + $win->Init("archives_do.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("qstr", $qstr); + $win->AddHidden("aid", $aid); + $win->AddHidden("recycle", $recycle); + $win->AddTitle("您确实要永久删除 $qstr 和 $aid 这些文档"); + $winform = $win->GetWindow("ok"); + $win->Display(); + } +} +/*----------------------------- +//快速编辑 +function quickEdit(){ } +------------------------------*/ +else if ($dopost == 'quickEdit') { + require_once(DEDEADMIN."/inc/inc_catalog_options.php"); + AjaxHead(); + $query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* + FROM `#@__archives` arc + LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel + LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; + $arcRow = $dsql->GetOne($query); + $divname = 'quickEdit'; + echo "
"; + echo "
快速属性编辑
"; + echo "
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo ""; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 所属栏目: + getUserChannel(), $arcRow['channel']); + echo ""; + ?> +
 属性: + '> + SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); + $dsql->Execute(); + while ($trow = $dsql->GetObject()) { + if ($trow->att == 'j' || $trow->att == 'p') continue; + if (preg_match("#".$trow->att."#", $arcRow['flag'])) + echo " "; + else + echo " "; + } + ?> +
 标题:
 简略标题:
 阅读权限: + + 需要金币:" style="width:100px"> +
 关键词:
+ + +
+
+getUserID()); + } + } + $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); + $shorttitle = cn_substrR($shorttitle, 36); + $keywords = trim(cn_substrR($keywords, 60)); + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; + $adminid = $cuserLogin->getUserID(); + //属性处理 + $flag = isset($flags) ? join(',', $flags) : ''; + if (!empty($flag)) { + if (preg_match("#p#", $oldflag)) $flag .= ',p'; + if (preg_match("#j#", $oldflag)) $flag .= ',j'; + } + $query = "UPDATE `#@__archives` SET + typeid = '$typeid', + flag = '$flag', + arcrank = '$arcrank', + money = '$money', + title = '$title', + shorttitle = '$shorttitle', + keywords = '$keywords', + dutyadmin = '$adminid' + WHERE id = '$aid'; "; + //更新主表 + $dsql->ExecuteNoneQuery($query); + //更新微表 + $dsql->ExecuteNoneQuery(" UPDATE `#@__arctiny` SET typeid='$typeid',arcrank='$arcrank' WHERE id='$aid' "); + //更新附加表 + if ($typeid != $oldtypeid) { + $addtable = trim($addtable); + if (empty($addtable)) $addtable = '#@__addonarticle'; + else $addtable = preg_replace("#[^a-z0-9__#@-]#i", "", $addtable); + $dsql->ExecuteNoneQuery(" UPDATE `$addtable` SET typeid='$typeid' WHERE aid='$aid' "); + } + //更新HTML + $artUrl = MakeArt($aid, TRUE, TRUE); + $backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '-1'; + ShowMsg('成功更新一篇文档的基本信息', $backurl); + exit(); +} +/*-------------------------- +分析并自动获取文档关键词 +function makekw(){ } +--------------------------*/ +else if ($dopost == "makekw") { + CheckPurview('a_Commend,sys_ArcBatch'); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $query = "SELECT arc.*, addt.* From `#@__archives` arc LEFT JOIN `#@__addonarticle` addt ON addt.aid=arc.id WHERE arc.id in($arcids) AND arc.channel=1 "; + $dsql->SetQuery($query); + $dsql->Execute(); + if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { + $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); + $client->appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + while ($row = $dsql->GetArray()) { + //跳过已经有关键词的内容 + if (trim($row['keywords']) != '') continue; + $aid = $row['id']; + $keywords = ''; + $title = $row['title']; + $description = $row['description']; + $body = cn_substr($row['body'], 5000); + $data = $client->Spliteword($title.Html2Text($body)); + $keywords = $data->data; + $description = str_replace(' ', ' ', trim($description)); + $description = str_replace('[', ' ', $description); + $description = str_replace(']', ' ', $description); + $description = preg_replace("#[ \t]{1,}#is", ' ', $description); + $description = str_replace('关键词', '', $description); + $description = str_replace('关键词', '', $description); + $description = addslashes($description); + $dsql->ExecuteNoneQuery(" UPDATE `#@__archives` SET `keywords`='$keywords',`description`='$description' WHERE id='{$aid}' "); + } + $client->Close(); + } else { + include_once(DEDEINC.'/libraries/splitword.class.php'); + $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); + while ($row = $dsql->GetArray()) { + //跳过已经有关键词的内容 + if (trim($row['keywords']) != '') continue; + $aid = $row['id']; + $keywords = ''; + $title = $row['title']; + $description = $row['description']; + $body = cn_substr($row['body'], 5000); + $sp->SetSource($title, $cfg_soft_lang, $cfg_soft_lang); + $sp->StartAnalysis(); + $titleindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); + $sp->SetSource(Html2Text($body), $cfg_soft_lang, $cfg_soft_lang); + $sp->StartAnalysis(); + $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); + if (is_array($allindexs) && is_array($titleindexs)) { + foreach ($titleindexs as $k => $v) { + if (strlen($keywords.$k) >= 60) { + break; + } else { + if (strlen($k) <= 2) continue; + $keywords .= $k.','; + } + } + foreach ($allindexs as $k => $v) { + if (strlen($keywords.$k) >= 60) { + break; + } else if (!in_array($k, $titleindexs)) { + if (strlen($k) <= 2) continue; + $keywords .= $k.','; + } + } + } + $description = str_replace(' ', ' ', trim($description)); + $description = str_replace('[', ' ', $description); + $description = str_replace(']', ' ', $description); + $description = preg_replace("#[ \t]{1,}#is", ' ', $description); + $description = str_replace('关键词', '', $description); + $description = str_replace('关键词', '', $description); + $description = addslashes($description); + $dsql->ExecuteNoneQuery(" UPDATE `#@__archives` SET `keywords`='$keywords',`description`='$description' WHERE id='{$aid}' "); + } + $sp = null; + } + ShowMsg("成功分析指定文档的关键词", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//批量增加属性 +function attsAdd(){ } +---------------------------*/ +else if ($dopost == 'attsAdd') { + CheckPurview('a_Commend,sys_ArcBatch'); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + if (empty($flagname)) { + ShowMsg("必须指定要添加的属性", $ENV_GOBACK_URL); + exit(); + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc + LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype + WHERE arc.id in($arcids) "; + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $aid = $row['id']; + if ($row['issystem'] != -1) { + $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); + $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); + $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); + $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE id='{$aid}' "); + } else { + $maintable = trim($row['addtable']); + $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); + $flag = ($arr['flag'] == '' ? $flagname : $arr['flag'].','.$flagname); + $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); + } + } + ShowMsg("成功对选中文档增加指定的属性", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//批量删除属性 +function attsDel(){ } +---------------------------*/ +else if ($dopost == 'attsDel') { + CheckPurview('a_Commend,sys_ArcBatch'); + if (!empty($aid) && empty($qstr)) $qstr = $aid; + if ($qstr == '') { + ShowMsg("参数无效", $ENV_GOBACK_URL); + exit(); + } + if (empty($flagname)) { + ShowMsg("必须指定要删除的属性", $ENV_GOBACK_URL); + exit(); + } + $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); + $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc + LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid + LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype + WHERE arc.id in($arcids) "; + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $aid = $row['id']; + if ($row['issystem'] != -1) { + $idname = 'id'; + $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); + $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE id='$aid' "); + } else { + $idname = 'aid'; + $maintable = trim($row['addtable']); + $arr = $dsql->GetOne("SELECT flag FROM `{$maintable}` WHERE aid='$aid' "); + } + $flag = $arr['flag']; + if (trim($flag) == '' || !preg_match("#".$flagname."#", $flag)) { + continue; + } else { + $flags = explode(',', $flag); + $okflags = array(); + foreach ($flags as $f) { + if ($f != $flagname) $okflags[] = $f; + } + } + $flag = trim(join(',', $okflags)); + $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE {$idname}='{$aid}' "); + } + ShowMsg("成功对选中文档删除指定的属性", $ENV_GOBACK_URL); + exit(); +} +/*-------------------------- +//获得批量属性处理的AJAX窗体 +function attsDlg(){ } +---------------------------*/ +else if ($dopost == 'attsDlg') { + if (!empty($aid) && empty($qstr)) $qstr = $aid; + $dojobname = ($dojob == 'attsDel' ? '批量删除属性' : '批量增加属性'); + AjaxHead(); + //输出AJAX可移动窗体 + $divname = 'attsDlg'; + echo "
"; + echo "
{$dojobname}
"; + echo "
"; + echo "
"; + echo "
"; + echo ""; + echo ""; + echo ""; +?> + + + + + + + + + + + +
 属性: + '> + SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); + $dsql->Execute(); + while ($trow = $dsql->GetObject()) { + if ($trow->att == 'j' || $trow->att == 'p') continue; + echo " "; + } + ?> +
 文档ID:
+ + +
+
+"; + echo "
栏目快速选择器
"; + echo "
"; + echo ""; + $tus = new TypeUnitSelector(); + ?> +
+
ListAllType($channelid); ?>
+
+ + +
+
+ \ No newline at end of file diff --git a/src/dede/archives_edit.php b/src/admin/archives_edit.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/archives_edit.php rename to src/admin/archives_edit.php index ce31c9b8..6b231b9b --- a/src/dede/archives_edit.php +++ b/src/admin/archives_edit.php @@ -1,210 +1,210 @@ -GetOne($arcQuery); - if (!is_array($arcRow)) { - ShowMsg("读取档案基本信息出错!", "-1"); - exit(); - } - $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; - $cInfos = $dsql->GetOne($query); - if (!is_array($cInfos)) { - ShowMsg("读取频道配置信息出错!", "javascript:;"); - exit(); - } - $addtable = $cInfos['addtable']; - $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); - $channelid = $arcRow['channel']; - $tags = GetTags($aid); - include DedeInclude("templets/archives_edit.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($litpic_b64)) $litpic_b64 = ''; - if (empty($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (!isset($writer)) $writer = ''; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_Edit')) { - if (TestPurview('a_AccEdit')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); - } else { - CheckArcAdmin($id, $cuserLogin->getUserID()); - } - } - //对保存的内容进行处理 - $pubdate = GetMkTime($pubdate); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = trim(cn_substrR($keywords, 60)); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) $ddisremote = 0; - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //更新数据库的SQL语句 - $inQuery = "UPDATE `#@__archives` SET - typeid='$typeid', - typeid2='$typeid2', - sortrank='$sortrank', - flag='$flag', - notpost='$notpost', - click='$click', - ismake='$ismake', - arcrank='$arcrank', - money='$money', - title='$title', - color='$color', - writer='$writer', - source='$source', - litpic='$litpic', - pubdate='$pubdate', - description='$description', - keywords='$keywords', - shorttitle='$shorttitle', - filename='$filename', - dutyadmin='$adminid', - weight='$weight' - WHERE id='$id'; "; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("更新数据库archives表时出错,请检查", "-1"); - exit(); - } - $cts = $dsql->GetOne("SELECT addtable From `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if ($addtable != '') { - $useip = GetIP(); - $iquery = "UPDATE `$addtable` SET typeid='$typeid'{$inadd_f},redirecturl='$redirecturl',userip='$useip' WHERE aid='$id' "; - if (!$dsql->ExecuteNoneQuery($iquery)) { - ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); - exit(); - } - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); - $artUrl = MakeArt($id, TRUE, TRUE, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$id"; - } - ClearMyAddon($id, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:发布新文档  查看更改  查看文档  管理文档  $backurl"; - $wintitle = "成功更改文档"; - $wecome_info = "文档管理::更改文档"; - $win = new OxWindow(); - $win->AddTitle("成功更改文档:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); +GetOne($arcQuery); + if (!is_array($arcRow)) { + ShowMsg("读取档案基本信息出错!", "-1"); + exit(); + } + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; + $cInfos = $dsql->GetOne($query); + if (!is_array($cInfos)) { + ShowMsg("读取频道配置信息出错!", "javascript:;"); + exit(); + } + $addtable = $cInfos['addtable']; + $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); + $channelid = $arcRow['channel']; + $tags = GetTags($aid); + include DedeInclude("templets/archives_edit.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($litpic_b64)) $litpic_b64 = ''; + if (empty($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (!isset($writer)) $writer = ''; + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_Edit')) { + if (TestPurview('a_AccEdit')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); + } else { + CheckArcAdmin($id, $cuserLogin->getUserID()); + } + } + //对保存的内容进行处理 + $pubdate = GetMkTime($pubdate); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = trim(cn_substrR($keywords, 60)); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) $ddisremote = 0; + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //更新数据库的SQL语句 + $inQuery = "UPDATE `#@__archives` SET + typeid='$typeid', + typeid2='$typeid2', + sortrank='$sortrank', + flag='$flag', + notpost='$notpost', + click='$click', + ismake='$ismake', + arcrank='$arcrank', + money='$money', + title='$title', + color='$color', + writer='$writer', + source='$source', + litpic='$litpic', + pubdate='$pubdate', + description='$description', + keywords='$keywords', + shorttitle='$shorttitle', + filename='$filename', + dutyadmin='$adminid', + weight='$weight' + WHERE id='$id'; "; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("更新数据库archives表时出错,请检查", "-1"); + exit(); + } + $cts = $dsql->GetOne("SELECT addtable From `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if ($addtable != '') { + $useip = GetIP(); + $iquery = "UPDATE `$addtable` SET typeid='$typeid'{$inadd_f},redirecturl='$redirecturl',userip='$useip' WHERE aid='$id' "; + if (!$dsql->ExecuteNoneQuery($iquery)) { + ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); + exit(); + } + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); + $artUrl = MakeArt($id, TRUE, TRUE, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$id"; + } + ClearMyAddon($id, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:发布新文档  查看修改  查看文档  管理文档  $backurl"; + $wintitle = "成功修改文档"; + $wecome_info = "文档管理::修改文档"; + $win = new OxWindow(); + $win->AddTitle("成功修改文档:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/archives_sg_add.php b/src/admin/archives_sg_add.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/archives_sg_add.php rename to src/admin/archives_sg_add.php index 36a150f0..e4cb83ac --- a/src/dede/archives_sg_add.php +++ b/src/admin/archives_sg_add.php @@ -1,152 +1,152 @@ - 0 && $channelid == 0) { - $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); - $channelid = $row['channeltype']; - } else { - if ($channelid == 0) { - ShowMsg("无法识别模型信息,因此无法操作", "-1"); - exit(); - } - } - //获得频道模型信息 - $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); - $channelid = $cInfos['id']; - include DedeInclude("templets/archives_sg_add.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_New')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); - } - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - if (empty($flags)) $flag = ''; - else $flag = join(',', $flags); - $senddate = time(); - if (empty($litpic_b64)) $litpic_b64 = ''; - $title = cn_substrR($title, $cfg_title_maxlen); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; - $adminid = $cuserLogin->getUserID(); - $userip = GetIP(); - if (empty($ddisremote)) $ddisremote = 0; - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - // 加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $senddate, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); - exit(); - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - //保存到附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if (!empty($addtable)) { - $query = "INSERT INTO `{$addtable}`(aid,typeid,channel,arcrank,mid,click,title,senddate,flag,litpic,userip{$inadd_f}) - VALUES('$arcID','$typeid','$channelid','$arcrank','$adminid','0','$title','$senddate','$flag','$litpic','$userip'{$inadd_v})"; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - } - //生成HTML - $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //返回成功信息 - $msg = "请选择您的后续操作:继续发布文档  查看文档  更改文档  已发布文档管理  网站栏目管理"; - $wintitle = "成功发布文档"; - $wecome_info = "文档管理::发布文档"; - $win = new OxWindow(); - $win->AddTitle("成功发布文档:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); + 0 && $channelid == 0) { + $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); + $channelid = $row['channeltype']; + } else { + if ($channelid == 0) { + ShowMsg("无法识别模型信息,因此无法操作", "-1"); + exit(); + } + } + //获得频道模型信息 + $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); + $channelid = $cInfos['id']; + include DedeInclude("templets/archives_sg_add.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_New')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); + } + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + if (empty($flags)) $flag = ''; + else $flag = join(',', $flags); + $senddate = time(); + if (empty($litpic_b64)) $litpic_b64 = ''; + $title = cn_substrR($title, $cfg_title_maxlen); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; + $adminid = $cuserLogin->getUserID(); + $userip = GetIP(); + if (empty($ddisremote)) $ddisremote = 0; + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $senddate, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); + exit(); + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + //保存到附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if (!empty($addtable)) { + $query = "INSERT INTO `{$addtable}`(aid,typeid,channel,arcrank,mid,click,title,senddate,flag,litpic,userip{$inadd_f}) + VALUES('$arcID','$typeid','$channelid','$arcrank','$adminid','0','$title','$senddate','$flag','$litpic','$userip'{$inadd_v})"; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + } + //生成HTML + $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //返回成功信息 + $msg = "请选择您的后续操作:继续发布文档  查看文档  修改文档  已发布文档管理  网站栏目管理"; + $wintitle = "成功发布文档"; + $wecome_info = "文档管理::发布文档"; + $win = new OxWindow(); + $win->AddTitle("成功发布文档:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/archives_sg_edit.php b/src/admin/archives_sg_edit.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/archives_sg_edit.php rename to src/admin/archives_sg_edit.php index 6631aa89..7e6a1d61 --- a/src/dede/archives_sg_edit.php +++ b/src/admin/archives_sg_edit.php @@ -1,139 +1,139 @@ -GetOne($arcQuery); - if (!is_array($cInfos)) { - ShowMsg("读频道模型信息出错", "-1"); - exit(); - } - $addtable = $cInfos['addtable']; - $addRow = $dsql->GetOne("SELECT arc.*,ar.membername as rankname FROM `$addtable` arc LEFT JOIN `#@__arcrank` ar on ar.rank=arc.arcrank WHERE arc.aid='$aid'"); - $channelid = $cInfos['channel']; - $tags = GetTags($aid); - include DedeInclude('templets/archives_sg_edit.htm'); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_Edit')) { - if (TestPurview('a_AccEdit')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); - } else { - CheckArcAdmin($id, $cuserLogin->getUserID()); - } - } - //对保存的内容进行处理 - if (empty($flags)) $flag = ''; - else $flag = join(',', $flags); - $title = cn_substrR($title, $cfg_title_maxlen); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (empty($litpic_b64)) $litpic_b64 = ''; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) $ddisremote = 0; - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - // 加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if ($addtable != '') { - $iquery = "UPDATE `$addtable` SET typeid='$typeid',arcrank='$arcrank',title='$title',flag='$flag',litpic='$litpic'{$inadd_f} WHERE aid='$id' "; - if (!$dsql->ExecuteNoneQuery($iquery)) { - ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); - exit(); - } - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); - $artUrl = MakeArt($id, TRUE, TRUE, $isremote); - if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$id"; - ClearMyAddon($id, $title); - //返回成功信息 - $msg = "请选择您的后续操作:发布新文档  查看更改  查看文档  管理文档  网站栏目管理"; - $wintitle = "成功更改文档"; - $wecome_info = "文档管理::更改文档"; - $win = new OxWindow(); - $win->AddTitle("成功更改文档:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); -} +GetOne($arcQuery); + if (!is_array($cInfos)) { + ShowMsg("读频道模型信息出错", "-1"); + exit(); + } + $addtable = $cInfos['addtable']; + $addRow = $dsql->GetOne("SELECT arc.*,ar.membername as rankname FROM `$addtable` arc LEFT JOIN `#@__arcrank` ar on ar.rank=arc.arcrank WHERE arc.aid='$aid'"); + $channelid = $cInfos['channel']; + $tags = GetTags($aid); + include DedeInclude('templets/archives_sg_edit.htm'); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_Edit')) { + if (TestPurview('a_AccEdit')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); + } else { + CheckArcAdmin($id, $cuserLogin->getUserID()); + } + } + //对保存的内容进行处理 + if (empty($flags)) $flag = ''; + else $flag = join(',', $flags); + $title = cn_substrR($title, $cfg_title_maxlen); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (empty($litpic_b64)) $litpic_b64 = ''; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) $ddisremote = 0; + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if ($addtable != '') { + $iquery = "UPDATE `$addtable` SET typeid='$typeid',arcrank='$arcrank',title='$title',flag='$flag',litpic='$litpic'{$inadd_f} WHERE aid='$id' "; + if (!$dsql->ExecuteNoneQuery($iquery)) { + ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); + exit(); + } + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); + $artUrl = MakeArt($id, TRUE, TRUE, $isremote); + if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$id"; + ClearMyAddon($id, $title); + //返回成功信息 + $msg = "请选择您的后续操作:发布新文档  查看修改  查看文档  管理文档  网站栏目管理"; + $wintitle = "成功修改文档"; + $wecome_info = "文档管理::修改文档"; + $win = new OxWindow(); + $win->AddTitle("成功修改文档:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); +} diff --git a/src/dede/article_add.php b/src/admin/article_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/article_add.php rename to src/admin/article_add.php index 9025ad26..eba7ba9b --- a/src/dede/article_add.php +++ b/src/admin/article_add.php @@ -1,235 +1,235 @@ - 0 && $channelid == 0) { - $row = $dsql->GetOne("Select channeltype From `#@__arctype` where id='$cid'; "); - $channelid = $row['channeltype']; - } else { - if ($channelid == 0) { - $channelid = 1; - } - } - //获得频道模型信息 - $cInfos = $dsql->GetOne(" Select * From `#@__channeltype` where id='$channelid' "); - //获取文章最大id以确定当前权重 - $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM `#@__archives`"); - - include DedeInclude("templets/article_add.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($typeid2)) $typeid2 = ''; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if (empty($typeid)) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_New')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); - } - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $title = preg_replace("#\"#", '"', $title); - $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $userip = GetIP(); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); - exit(); - } - if (trim($title) == '') { - ShowMsg('标题不能为空', '-1'); - exit(); - } - //处理body字段自动摘要、自动提取缩略图等 - $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); - //自动分页 - if ($sptype == 'auto') { - $body = SpLongBody($body, $spsize * 1024, "#p#分页标题#e#"); - } - //分析处理附加表数据 - $inadd_f = $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') continue; - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) ${$vs[0]} = ''; - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //保存到主表 - $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) - VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename','$adminid','$weight');"; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //保存到附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if (empty($addtable)) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); - exit(); - } - $useip = GetIP(); - $templet = empty($templet) ? '' : $templet; - $query = "INSERT INTO `{$addtable}`(aid,typeid,redirecturl,templet,userip,body{$inadd_f}) Values('$arcID','$typeid','$redirecturl','$templet','$useip','$body'{$inadd_v})"; - if (!$dsql->ExecuteNoneQuery($query)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); - $dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //生成HTML - InsertTags($tags, $arcID); - $picTitle = false; - if (count($_SESSION['bigfile_info']) > 0) { - foreach ($_SESSION['bigfile_info'] as $k => $v) { - if (!empty($v)) { - $pictitle = ${'picinfook'.$k}; - $titleSet = ''; - if (!empty($pictitle)) { - $picTitle = TRUE; - $titleSet = ",title='{$pictitle}'"; - } - $dsql->ExecuteNoneQuery("UPDATE `#@__uploads` SET arcid='{$arcID}'{$titleSet} WHERE url LIKE '{$v}'; "); - } - } - } - $artUrl = MakeArt($arcID, true, true, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:继续发布文章  查看文章  更改文章  已发布文章管理  $backurl"; - $msg = "
{$msg}
".GetUpdateTest(); - $wintitle = "成功发布文章"; - $wecome_info = "文章管理::发布文章"; - $win = new OxWindow(); - $win->AddTitle("成功发布文章:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); + 0 && $channelid == 0) { + $row = $dsql->GetOne("Select channeltype From `#@__arctype` where id='$cid'; "); + $channelid = $row['channeltype']; + } else { + if ($channelid == 0) { + $channelid = 1; + } + } + //获得频道模型信息 + $cInfos = $dsql->GetOne(" Select * From `#@__channeltype` where id='$channelid' "); + //获取文章最大id以确定当前权重 + $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM `#@__archives`"); + + include DedeInclude("templets/article_add.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($typeid2)) $typeid2 = ''; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if (empty($typeid)) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_New')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); + } + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $title = preg_replace("#\"#", '"', $title); + $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $userip = GetIP(); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); + exit(); + } + if (trim($title) == '') { + ShowMsg('标题不能为空', '-1'); + exit(); + } + //处理body字段自动摘要、自动提取缩略图等 + $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); + //自动分页 + if ($sptype == 'auto') { + $body = SpLongBody($body, $spsize * 1024, "#p#分页标题#e#"); + } + //分析处理附加表数据 + $inadd_f = $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') continue; + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) ${$vs[0]} = ''; + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //保存到主表 + $query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) + VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename','$adminid','$weight');"; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //保存到附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if (empty($addtable)) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作", "javascript:;"); + exit(); + } + $useip = GetIP(); + $templet = empty($templet) ? '' : $templet; + $query = "INSERT INTO `{$addtable}`(aid,typeid,redirecturl,templet,userip,body{$inadd_f}) Values('$arcID','$typeid','$redirecturl','$templet','$useip','$body'{$inadd_v})"; + if (!$dsql->ExecuteNoneQuery($query)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); + $dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //生成HTML + InsertTags($tags, $arcID); + $picTitle = false; + if (count($_SESSION['bigfile_info']) > 0) { + foreach ($_SESSION['bigfile_info'] as $k => $v) { + if (!empty($v)) { + $pictitle = ${'picinfook'.$k}; + $titleSet = ''; + if (!empty($pictitle)) { + $picTitle = TRUE; + $titleSet = ",title='{$pictitle}'"; + } + $dsql->ExecuteNoneQuery("UPDATE `#@__uploads` SET arcid='{$arcID}'{$titleSet} WHERE url LIKE '{$v}'; "); + } + } + } + $artUrl = MakeArt($arcID, true, true, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:继续发布文章  查看文章  修改文章  已发布文章管理  $backurl"; + $msg = "
{$msg}
".GetUpdateTest(); + $wintitle = "成功发布文章"; + $wecome_info = "文章管理::发布文章"; + $win = new OxWindow(); + $win->AddTitle("成功发布文章:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/article_allowurl_edit.php b/src/admin/article_allowurl_edit.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/article_allowurl_edit.php rename to src/admin/article_allowurl_edit.php index 04aa146e..6cbeffb1 --- a/src/dede/article_allowurl_edit.php +++ b/src/admin/article_allowurl_edit.php @@ -1,43 +1,40 @@ -alert('Save OK!');"; -} -//读出 -if (empty($allurls) && filesize($m_file) > 0) { - $fp = fopen($m_file, 'r'); - $allurls = fread($fp, filesize($m_file)); - fclose($fp); -} -$wintitle = ""; -$wecome_info = "允许的超链接"; -$win = new OxWindow(); -$win->Init('article_allowurl_edit.php', 'js/blank.js', 'POST'); -$win->AddHidden('dopost', 'save'); -$win->AddTitle("每行保存一个超链接:"); -$win->AddMsgItem(""); -$winform = $win->GetWindow('ok'); -$win->Display(); +alert('Save OK!');"; +} +//读出 +if (empty($allurls) && filesize($m_file) > 0) { + $fp = fopen($m_file, 'r'); + $allurls = fread($fp, filesize($m_file)); + fclose($fp); +} +$wintitle = ""; +$wecome_info = "允许的超链接"; +$win = new OxWindow(); +$win->Init('article_allowurl_edit.php', 'js/blank.js', 'POST'); +$win->AddHidden('dopost', 'save'); +$win->AddTitle("每行保存一个超链接:"); +$win->AddMsgItem(""); +$winform = $win->GetWindow('ok'); +$win->Display(); \ No newline at end of file diff --git a/src/dede/article_coonepage_rule.php b/src/admin/article_coonepage_rule.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/article_coonepage_rule.php rename to src/admin/article_coonepage_rule.php index 05bb6caa..848ab815 --- a/src/dede/article_coonepage_rule.php +++ b/src/admin/article_coonepage_rule.php @@ -1,120 +1,120 @@ -GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '$url' "); - if (is_array($row)) { - echo "系统已经存在这个网址的条目"; - } else { - $query = " INSERT INTO `#@__co_onepage`(`url`,`title`,`issource`,`lang`,`rule`) Values('$url','$title','$issource','$lang','$rule'); "; - $dsql->ExecuteNonequery($query); - echo $dsql->GetError(); - } -} -/*------ -function _DelNote(){ } --------*/ else if ($action == 'del') { - if (!preg_match("#,#", $ids)) { - $query = "DELETE FROM `#@__co_onepage` WHERE id='$ids' "; - } else { - $query = "DELETE FROM `#@__co_onepage` WHERE id IN($ids) "; - } - $dsql->ExecuteNonequery($query); -} - -/*------ -function _EditNote(){ } --------*/ else if ($action == 'editsave') { - $query = "UPDATE `#@__co_onepage` SET `url`='$url',`title`='$title',`issource`='$issource',`lang`='$lang',`rule`='$rule' WHERE id='$id' "; - $dsql->ExecuteNonequery($query); - echo $dsql->GetError(); -} -/*------ -function _EditNoteLoad(){ } --------*/ else if ($action == 'editload') { - $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE id='$id' "); - AjaxHead(); -?> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
网站名称:
原内容编码: - - -
用作文章来源: - - -
网站网址: - -
  - 使用不带http及任何附加目录的网址
- 如:news.dedebiz.com -
采集规则:仅针对文章内容,格式:前面HTML{@body}后面HMTL
 
  -
-
-SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm"); -$dlist->SetSource($sql); -$dlist->Display(); +GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '$url' "); + if (is_array($row)) { + echo "系统已经存在这个网址的条目"; + } else { + $query = " INSERT INTO `#@__co_onepage`(`url`,`title`,`issource`,`lang`,`rule`) Values('$url','$title','$issource','$lang','$rule'); "; + $dsql->ExecuteNonequery($query); + echo $dsql->GetError(); + } +} +/*------ +function _DelNote(){ } +-------*/ +else if ($action == 'del') { + if (!preg_match("#,#", $ids)) { + $query = "DELETE FROM `#@__co_onepage` WHERE id='$ids' "; + } else { + $query = "DELETE FROM `#@__co_onepage` WHERE id IN($ids) "; + } + $dsql->ExecuteNonequery($query); +} +/*------ +function _EditNote(){ } +-------*/ +else if ($action == 'editsave') { + $query = "UPDATE `#@__co_onepage` SET `url`='$url',`title`='$title',`issource`='$issource',`lang`='$lang',`rule`='$rule' WHERE id='$id' "; + $dsql->ExecuteNonequery($query); + echo $dsql->GetError(); +} +/*------ +function _EditNoteLoad(){ } +-------*/ +else if ($action == 'editload') { + $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE id='$id' "); + AjaxHead(); +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
网站名称:
原内容编码: + + +
用作文章来源: + + +
网站网址: + +
  + 使用不带http及任何附加目录的网址
+ 如:news.dedebiz.com +
采集规则:仅针对文章内容,格式:前面HTML{@body}后面HMTL
 
  +
+
+SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm"); +$dlist->SetSource($sql); +$dlist->Display(); \ No newline at end of file diff --git a/src/dede/article_description_main.php b/src/admin/article_description_main.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/article_description_main.php rename to src/admin/article_description_main.php index 256944cf..75d36dae --- a/src/dede/article_description_main.php +++ b/src/admin/article_description_main.php @@ -1,167 +1,157 @@ - 250) $dsize = 250; - $tjnum = 0; - - //获取自动摘要 - if ($dojob == 'des') { - if (empty($totalnum)) { - $addquery = ""; - if ($sid != 0) { - $addquery .= " AND id>='$sid' "; - } - if ($eid != 0) { - $addquery .= " AND id<='$eid' "; - } - $tjQuery = "SELECT COUNT(*) AS dd FROM #@__archives WHERE channel='{$channel}' $addquery"; - $row = $dsql->GetOne($tjQuery); - $totalnum = $row['dd']; - } - if ($totalnum > 0) { - $addquery = ""; - if ($sid != 0) { - $addquery .= " AND #@__archives.id>='$sid' "; - } - if ($eid != 0) { - $addquery .= " AND #@__archives.id<='$eid' "; - } - $fquery = "SELECT #@__archives.id,#@__archives.title,#@__archives.description,{$table}.{$field} - FROM #@__archives LEFT JOIN {$table} ON {$table}.aid=#@__archives.id - WHERE #@__archives.channel='{$channel}' $addquery LIMIT $startdd,$pagesize ; "; - $dsql->SetQuery($fquery); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $body = $row[$field]; - $description = $row['description']; - if (strlen($description) > 10 || $description == '-') { - continue; - } - $bodytext = preg_replace("/#p#|#e#|副标题|分页标题/isU", "", Html2Text($body)); - if (strlen($bodytext) < $msize) { - continue; - } - $des = trim(addslashes(cn_substr($bodytext, $dsize))); - if (strlen($des) < 3) { - $des = "-"; - } - $dsql->ExecuteNoneQuery("UPDATE #@__archives SET description='{$des}' WHERE id='{$row['id']}';"); - } - - //返回进度信息 - $startdd = $startdd + $pagesize; - if ($totalnum > $startdd) { - $tjlen = ceil(($startdd / $totalnum) * 100); - } else { - $tjlen = 100; - ShowMsg('完成所有任务', 'javascript:;'); - exit(); - } - $dvlen = $tjlen * 2; - $tjsta = "
"; - $tjsta .= "
完成处理文档总数的:$tjlen %,继续执行任务..."; - $nurl = "article_description_main.php?totalnum=$totalnum&startdd={$startdd}&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; - ShowMsg($tjsta, $nurl, 0, 500); - exit(); - } else { - ShowMsg('完成所有任务', 'javascript:;'); - exit(); - } - } //获取自动摘要代码结束 - - //更新自动分页 - if ($dojob == 'page') { - require_once(DEDEADMIN."/inc/inc_archives_functions.php"); - - $addquery = ""; - if ($sid != 0) { - $addquery .= " and aid>='$sid' "; - } - if ($eid != 0) { - $addquery .= " and aid<='$eid' "; - } - - //统计记录总数 - if ($totalnum == 0) { - $sql = "SELECT COUNT(*) AS dd FROM $table WHERE 1 $addquery"; - $row = $dsql->GetOne($sql); - $totalnum = $row['dd']; - } - - //获取记录,并分析 - if ($totalnum > $startdd + $pagesize) { - $limitSql = " LIMIT $startdd,$pagesize"; - } else if (($totalnum - $startdd) > 0) { - $limitSql = " LIMIT $startdd,".($totalnum - $startdd); - } else { - $limitSql = ""; - } - $tjnum = $startdd; - if ($limitSql != "") { - $fquery = "SELECT aid,$field FROM $table WHERE 1 $addquery $limitSql ;"; - $dsql->SetQuery($fquery); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $tjnum++; - $body = $row[$field]; - $aid = $row['aid']; - if (strlen($body) < $msize) { - continue; - } - if (!preg_match("/#p#/iU", $body)) { - $body = SpLongBody($body, $cfg_arcautosp_size * 1024, "#p#分页标题#e#"); - $body = addslashes($body); - $dsql->ExecuteNoneQuery("UPDATE $table SET $field='$body' WHERE aid='$aid' ; "); - } - } - } //end if limit - - //返回进度提示 - if ($totalnum > 0) { - $tjlen = ceil(($tjnum / $totalnum) * 100); - } else { - $tjlen = 100; - } - - $dvlen = $tjlen * 2; - - $tjsta = "
"; - $tjsta .= "
完成处理文档总数的:$tjlen %,继续执行任务..."; - - if ($tjnum < $totalnum) { - $nurl = "article_description_main.php?totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; - ShowMsg($tjsta, $nurl, 0, 500); - exit(); - } else { - ShowMsg('完成所有任务', 'javascript:;'); - exit(); - } - } //更新自动分页处理代码结束 -} + 250) $dsize = 250; + $tjnum = 0; + //获取自动摘要 + if ($dojob == 'des') { + if (empty($totalnum)) { + $addquery = ""; + if ($sid != 0) { + $addquery .= " AND id>='$sid' "; + } + if ($eid != 0) { + $addquery .= " AND id<='$eid' "; + } + $tjQuery = "SELECT COUNT(*) AS dd FROM #@__archives WHERE channel='{$channel}' $addquery"; + $row = $dsql->GetOne($tjQuery); + $totalnum = $row['dd']; + } + if ($totalnum > 0) { + $addquery = ""; + if ($sid != 0) { + $addquery .= " AND #@__archives.id>='$sid' "; + } + if ($eid != 0) { + $addquery .= " AND #@__archives.id<='$eid' "; + } + $fquery = "SELECT #@__archives.id,#@__archives.title,#@__archives.description,{$table}.{$field} + FROM #@__archives LEFT JOIN {$table} ON {$table}.aid=#@__archives.id + WHERE #@__archives.channel='{$channel}' $addquery LIMIT $startdd,$pagesize ; "; + $dsql->SetQuery($fquery); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $body = $row[$field]; + $description = $row['description']; + if (strlen($description) > 10 || $description == '-') { + continue; + } + $bodytext = preg_replace("/#p#|#e#|副标题|分页标题/isU", "", Html2Text($body)); + if (strlen($bodytext) < $msize) { + continue; + } + $des = trim(addslashes(cn_substr($bodytext, $dsize))); + if (strlen($des) < 3) { + $des = "-"; + } + $dsql->ExecuteNoneQuery("UPDATE #@__archives SET description='{$des}' WHERE id='{$row['id']}';"); + } + //返回进度信息 + $startdd = $startdd + $pagesize; + if ($totalnum > $startdd) { + $tjlen = ceil(($startdd / $totalnum) * 100); + } else { + $tjlen = 100; + ShowMsg('完成所有任务', 'javascript:;'); + exit(); + } + $dvlen = $tjlen * 2; + $tjsta = "
"; + $tjsta .= "
完成处理文档总数的:$tjlen %,继续执行任务"; + $nurl = "article_description_main.php?totalnum=$totalnum&startdd={$startdd}&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; + ShowMsg($tjsta, $nurl, 0, 500); + exit(); + } else { + ShowMsg('完成所有任务', 'javascript:;'); + exit(); + } + } //获取自动摘要代码结束 + //更新自动分页 + if ($dojob == 'page') { + require_once(DEDEADMIN."/inc/inc_archives_functions.php"); + + $addquery = ""; + if ($sid != 0) { + $addquery .= " and aid>='$sid' "; + } + if ($eid != 0) { + $addquery .= " and aid<='$eid' "; + } + //统计记录总数 + if ($totalnum == 0) { + $sql = "SELECT COUNT(*) AS dd FROM $table WHERE 1 $addquery"; + $row = $dsql->GetOne($sql); + $totalnum = $row['dd']; + } + //获取记录,并分析 + if ($totalnum > $startdd + $pagesize) { + $limitSql = " LIMIT $startdd,$pagesize"; + } else if (($totalnum - $startdd) > 0) { + $limitSql = " LIMIT $startdd,".($totalnum - $startdd); + } else { + $limitSql = ""; + } + $tjnum = $startdd; + if ($limitSql != "") { + $fquery = "SELECT aid,$field FROM $table WHERE 1 $addquery $limitSql ;"; + $dsql->SetQuery($fquery); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $tjnum++; + $body = $row[$field]; + $aid = $row['aid']; + if (strlen($body) < $msize) { + continue; + } + if (!preg_match("/#p#/iU", $body)) { + $body = SpLongBody($body, $cfg_arcautosp_size * 1024, "#p#分页标题#e#"); + $body = addslashes($body); + $dsql->ExecuteNoneQuery("UPDATE $table SET $field='$body' WHERE aid='$aid' ; "); + } + } + } //end if limit + //返回进度提示 + if ($totalnum > 0) { + $tjlen = ceil(($tjnum / $totalnum) * 100); + } else { + $tjlen = 100; + } + $dvlen = $tjlen * 2; + $tjsta = "
"; + $tjsta .= "
完成处理文档总数的:$tjlen %,继续执行任务"; + + if ($tjnum < $totalnum) { + $nurl = "article_description_main.php?totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; + ShowMsg($tjsta, $nurl, 0, 500); + exit(); + } else { + ShowMsg('完成所有任务', 'javascript:;'); + exit(); + } + } //更新自动分页处理代码结束 +} \ No newline at end of file diff --git a/src/dede/article_edit.php b/src/admin/article_edit.php old mode 100755 new mode 100644 similarity index 88% rename from src/dede/article_edit.php rename to src/admin/article_edit.php index 110c68f6..1d4d5809 --- a/src/dede/article_edit.php +++ b/src/admin/article_edit.php @@ -1,225 +1,225 @@ -GetOne($query); - if (!is_array($arcRow)) { - ShowMsg("读取档案基本信息出错", "-1"); - exit(); - } - $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; - $cInfos = $dsql->GetOne($query); - if (!is_array($cInfos)) { - ShowMsg("读取频道配置信息出错", "javascript:;"); - exit(); - } - $addtable = $cInfos['addtable']; - $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); - if (!is_array($addRow)) { - ShowMsg("读取附加信息出错", "javascript:;"); - exit(); - } - $channelid = $arcRow['channel']; - $tags = GetTags($aid); - include DedeInclude("templets/article_edit.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if (empty($litpic_b64)) $litpic_b64 = ''; - if (empty($typeid)) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_Edit')) { - if (TestPurview('a_AccEdit')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); - } else { - CheckArcAdmin($id, $cuserLogin->getUserID()); - } - } - //对保存的内容进行处理 - $pubdate = GetMkTime($pubdate); - $sortrank = AddDay($pubdate, $sortup); - $ismake = $ishtml == 0 ? -1 : 0; - $autokey = 1; - $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, 250); - $keywords = trim(cn_substrR($keywords, 60)); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - //分析body里的内容 - $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match("#p#", $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match("#j#", $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match("#j#", $flag)) $ismake = -1; - //更新数据库的SQL语句 - $query = "UPDATE `#@__archives` SET - `typeid`='$typeid', - `typeid2`='$typeid2', - `sortrank`='$sortrank', - `flag`='$flag', - `click`='$click', - `ismake`='$ismake', - `arcrank`='$arcrank', - `money`='$money', - `title`='$title', - `color`='$color', - `writer`='$writer', - `source`='$source', - `litpic`='$litpic', - `pubdate`='$pubdate', - `notpost`='$notpost', - `description`='$description', - `keywords`='$keywords', - `shorttitle`='$shorttitle', - `filename`='$filename', - `dutyadmin`='$adminid', - `weight`='$weight' - WHERE `id`='$id'; "; - if (!$dsql->ExecuteNoneQuery($query)) { - ShowMsg('更新数据库archives表时出错,请检查', -1); - exit(); - } - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if ($addtable != '') { - $useip = GetIP(); - $templet = empty($templet) ? '' : $templet; - $iquery = "UPDATE `$addtable` SET typeid='$typeid',body='$body'{$inadd_f},redirecturl='$redirecturl',templet='$templet',userip='$useip' WHERE aid='$id'"; - if (!$dsql->ExecuteNoneQuery($iquery)) { - ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); - exit(); - } - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); - $artUrl = MakeArt($id, true, true, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$id"; - } - ClearMyAddon($id, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - - //返回成功信息 - $msg = "请选择您的后续操作:发布新文章  查看更改  查看文章  管理文章  $backurl"; - $wintitle = "成功更改文章"; - $wecome_info = "文章管理::更改文章"; - $win = new OxWindow(); - $win->AddTitle("成功更改文章:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", false); - $win->Display(); +GetOne($query); + if (!is_array($arcRow)) { + ShowMsg("读取档案基本信息出错", "-1"); + exit(); + } + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; + $cInfos = $dsql->GetOne($query); + if (!is_array($cInfos)) { + ShowMsg("读取频道配置信息出错", "javascript:;"); + exit(); + } + $addtable = $cInfos['addtable']; + $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); + if (!is_array($addRow)) { + ShowMsg("读取附加信息出错", "javascript:;"); + exit(); + } + $channelid = $arcRow['channel']; + $tags = GetTags($aid); + include DedeInclude("templets/article_edit.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if (empty($litpic_b64)) $litpic_b64 = ''; + if (empty($typeid)) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_Edit')) { + if (TestPurview('a_AccEdit')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); + } else { + CheckArcAdmin($id, $cuserLogin->getUserID()); + } + } + //对保存的内容进行处理 + $pubdate = GetMkTime($pubdate); + $sortrank = AddDay($pubdate, $sortup); + $ismake = $ishtml == 0 ? -1 : 0; + $autokey = 1; + $title = dede_htmlspecialchars(cn_substrR($title, $cfg_title_maxlen)); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, 250); + $keywords = trim(cn_substrR($keywords, 60)); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //分析body里的内容 + $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match("#p#", $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match("#j#", $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match("#j#", $flag)) $ismake = -1; + //更新数据库的SQL语句 + $query = "UPDATE #@__archives SET + typeid='$typeid', + typeid2='$typeid2', + sortrank='$sortrank', + flag='$flag', + click='$click', + ismake='$ismake', + arcrank='$arcrank', + money='$money', + title='$title', + color='$color', + writer='$writer', + source='$source', + litpic='$litpic', + pubdate='$pubdate', + notpost='$notpost', + description='$description', + keywords='$keywords', + shorttitle='$shorttitle', + filename='$filename', + dutyadmin='$adminid', + weight='$weight' + WHERE id='$id'; "; + if (!$dsql->ExecuteNoneQuery($query)) { + ShowMsg('更新数据库archives表时出错,请检查', -1); + exit(); + } + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if ($addtable != '') { + $useip = GetIP(); + $templet = empty($templet) ? '' : $templet; + $iquery = "UPDATE `$addtable` SET typeid='$typeid',body='$body'{$inadd_f},redirecturl='$redirecturl',templet='$templet',userip='$useip' WHERE aid='$id'"; + if (!$dsql->ExecuteNoneQuery($iquery)) { + ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); + exit(); + } + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); + $artUrl = MakeArt($id, true, true, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$id"; + } + ClearMyAddon($id, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + + //返回成功信息 + $msg = "请选择您的后续操作:发布新文章  查看修改  查看文章  管理文章  $backurl"; + $wintitle = "成功修改文章"; + $wecome_info = "文章管理::修改文章"; + $win = new OxWindow(); + $win->AddTitle("成功修改文章:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", false); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/article_keywords_main.php b/src/admin/article_keywords_main.php old mode 100755 new mode 100644 similarity index 82% rename from src/dede/article_keywords_main.php rename to src/admin/article_keywords_main.php index 1f38fbd0..334ad6a8 --- a/src/dede/article_keywords_main.php +++ b/src/admin/article_keywords_main.php @@ -1,93 +1,90 @@ -ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); - continue; - } - - //禁用项目 - $staold = ${'staold_'.$aid}; - $sta = empty(${'isnouse_'.$aid}) ? 1 : 0; - if ($staold != $sta) { - $query1 = "UPDATE `#@__keywords` SET sta='$sta',rpurl='$rpurl' WHERE aid='$aid' "; - $dsql->ExecuteNoneQuery($query1); - continue; - } - - //更新链接网址 - if ($rpurl != $rpurlold) { - $query1 = "UPDATE `#@__keywords` SET rpurl='$rpurl' WHERE aid='$aid' "; - $dsql->ExecuteNoneQuery($query1); - } - } - ShowMsg("完成指定的更改!", $ENV_GOBACK_URL); - exit(); -} -//增加关键字 -else if ($dopost == 'add') { - $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "-1" : $_COOKIE['ENV_GOBACK_URL']; - $keyword = trim($keyword); - $rank = preg_replace("#[^0-9]#", '', $rank); - if ($keyword == '') { - ShowMsg("关键字不能为空!", -1); - exit(); - } - $row = $dsql->GetOne("SELECT * FROM `#@__keywords` WHERE keyword LIKE '$keyword'"); - if (is_array($row)) { - ShowMsg("关键字已存在库中!", "-1"); - exit(); - } - $inquery = "INSERT INTO `#@__keywords`(`keyword`,`rank`,`sta`,`rpurl`) VALUES ('$keyword','$rank','1','$rpurl');"; - $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功增加一个关键字!", $ENV_GOBACK_URL); - exit(); -} -if (empty($keyword)) { - $keyword = ''; - $addquery = ''; -} else { - $addquery = " WHERE keyword LIKE '%$keyword%' "; -} - -$sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY `rank` DESC"; -$dlist = new DataListCP(); -$dlist->pageSize = 20; -$dlist->SetParameter("keyword", $keyword); -$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); -$dlist->SetSource($sql); -$dlist->Display(); - -function GetSta($sta) -{ - if ($sta == 1) return ''; - else return ' checked="1" '; -} +ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); + continue; + } + + //禁用项目 + $staold = ${'staold_'.$aid}; + $sta = empty(${'isnouse_'.$aid}) ? 1 : 0; + if ($staold != $sta) { + $query1 = "UPDATE `#@__keywords` SET sta='$sta',rpurl='$rpurl' WHERE aid='$aid' "; + $dsql->ExecuteNoneQuery($query1); + continue; + } + + //更新链接网址 + if ($rpurl != $rpurlold) { + $query1 = "UPDATE `#@__keywords` SET rpurl='$rpurl' WHERE aid='$aid' "; + $dsql->ExecuteNoneQuery($query1); + } + } + ShowMsg("完成指定的修改", $ENV_GOBACK_URL); + exit(); +} +//增加关键词 +else if ($dopost == 'add') { + $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "-1" : $_COOKIE['ENV_GOBACK_URL']; + $keyword = trim($keyword); + $rank = preg_replace("#[^0-9]#", '', $rank); + if ($keyword == '') { + ShowMsg("关键词不能为空", -1); + exit(); + } + $row = $dsql->GetOne("SELECT * FROM `#@__keywords` WHERE keyword LIKE '$keyword'"); + if (is_array($row)) { + ShowMsg("关键词已存在库中", "-1"); + exit(); + } + $inquery = "INSERT INTO `#@__keywords`(keyword,`rank`,sta,rpurl) VALUES ('$keyword','$rank','1','$rpurl');"; + $dsql->ExecuteNoneQuery($inquery); + ShowMsg("成功增加一个关键词", $ENV_GOBACK_URL); + exit(); +} +if (empty($keyword)) { + $keyword = ''; + $addquery = ''; +} else { + $addquery = " WHERE keyword LIKE '%$keyword%' "; +} + +$sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY `rank` DESC"; +$dlist = new DataListCP(); +$dlist->pageSize = 20; +$dlist->SetParameter("keyword", $keyword); +$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); +$dlist->SetSource($sql); +$dlist->Display(); + +function GetSta($sta) +{ + if ($sta == 1) return ''; + else return ' checked="1" '; +} diff --git a/src/dede/article_keywords_make.php b/src/admin/article_keywords_make.php old mode 100755 new mode 100644 similarity index 84% rename from src/dede/article_keywords_make.php rename to src/admin/article_keywords_make.php index ec145525..e54e9ab9 --- a/src/dede/article_keywords_make.php +++ b/src/admin/article_keywords_make.php @@ -1,204 +1,202 @@ -\r\n"; - flush(); - $ws = $wserr = $wsnew = ""; - $dsql->SetQuery("SELECT * FROM `#@__keywords`"); - $dsql->Execute(); - while ($row = $dsql->GetObject()) { - if ($row->sta == 1) $ws[$row->keyword] = 1; - else $wserr[$row->keyword] = 1; - } - echo "完成关键字数据库的载入!
\r\n"; - flush(); - echo "读取档案数据库,并对禁用的关键字和生字进行处理...
\r\n"; - flush(); - $dsql->SetQuery("SELECT id,keywords FROM `#@__archives`"); - $dsql->Execute(); - while ($row = $dsql->GetObject()) { - $keywords = explode(',', trim($row->keywords)); - $nerr = false; - $mykey = ''; - if (is_array($keywords)) { - foreach ($keywords as $v) { - $v = trim($v); - if ($v == '') { - continue; - } - if (isset($ws[$v])) { - $mykey .= $v." "; - } else if (isset($wsnew[$v])) { - $mykey .= $v.' '; - $wsnew[$v]++; - } else if (isset($wserr[$v])) { - $nerr = true; - } else { - $mykey .= $v." "; - $wsnew[$v] = 1; - } - } - } - } - echo "完成档案数据库的处理!
\r\n"; - flush(); - if (is_array($wsnew)) { - echo "对关键字进行排序...
\r\n"; - flush(); - arsort($wsnew); - echo "把关键字保存到数据库...
\r\n"; - flush(); - foreach ($wsnew as $k => $v) { - if (strlen($k) > 20) { - continue; - } - $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,`rank`,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); - $dsql->Execute(); - } - echo "完成关键字的导入!
\r\n"; - flush(); - sleep(1); - } else { - echo "没发现任何新的关键字!
\r\n"; - flush(); - sleep(1); - } - ShowMsg('完成所有操作,现在转到关键字列表页!', 'article_keywords_main.php'); - exit(); -} -//自动获取关键字(适用于默认的文章模型) -else if ($dopost == 'fetch') { - require_once(DEDEINC."/splitword.class.php"); - if (empty($startdd)) { - $startdd = 0; - } - if (empty($pagesize)) { - $pagesize = 20; - } - if (empty($totalnum)) { - $totalnum = 0; - } - - //统计记录总数 - if ($totalnum == 0) { - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__archives` WHERE channel='1' "); - $totalnum = $row['dd']; - } - - //获取记录,并分析关键字 - if ($totalnum > $startdd + $pagesize) { - $limitSql = " LIMIT $startdd,$pagesize"; - } else if (($totalnum - $startdd) > 0) { - $limitSql = " LIMIT $startdd,".($totalnum - $startdd); - } else { - $limitSql = ''; - } - $tjnum = $startdd; - if ($limitSql != '') { - $fquery = "SELECT arc.id,arc.title,arc.keywords,addon.body FROM `#@__archives` arc - LEFT JOIN `#@__addonarticle` addon ON addon.aid=arc.id WHERE arc.channel='1' $limitSql "; - $dsql->SetQuery($fquery); - $dsql->Execute(); - - if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { - $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); - $client->appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - while ($row = $dsql->GetObject()) { - if ($row->keywords != '') { - continue; - } - $tjnum++; - $id = $row->id; - $keywords = ""; - $data = $client->Spliteword($row->title.Html2Text($row->body)); - $keywords = $data->data; - $keywords = addslashes($keywords); - if ($keywords == '') { - $keywords = ','; - } - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET keywords='$keywords' WHERE id='$id'"); - } - $client->Close(); - } else { - $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); - while ($row = $dsql->GetObject()) { - if ($row->keywords != '') { - continue; - } - $tjnum++; - $id = $row->id; - $keywords = ""; - - $sp->SetSource($row->title, $cfg_soft_lang, $cfg_soft_lang); - $sp->SetResultType(2); - $sp->StartAnalysis(TRUE); - - $titleindexs = $sp->GetFinallyIndex(); - - $sp->SetSource(Html2Text($row->body), $cfg_soft_lang, $cfg_soft_lang); - $sp->SetResultType(2); - $sp->StartAnalysis(TRUE); - $allindexs = $sp->GetFinallyIndex(); - if (is_array($allindexs) && is_array($titleindexs)) { - foreach ($titleindexs as $k => $v) { - if (strlen($keywords) >= 30) { - break; - } else { - if (strlen($k) <= 2) continue; - $keywords .= $k.","; - } - } - foreach ($allindexs as $k => $v) { - if (strlen($keywords) >= 30) { - break; - } else if (!in_array($k, $titleindexs)) { - if (strlen($k) <= 2) continue; - $keywords .= $k.","; - } - } - } - $keywords = addslashes($keywords); - if ($keywords == '') { - $keywords = ','; - } - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET keywords='$keywords' WHERE id='$id'"); - } - unset($sp); - } - } //end if limit - - - //返回提示信息 - if ($totalnum > 0) $tjlen = ceil(($tjnum / $totalnum) * 100); - else $tjlen = 100; - - $dvlen = $tjlen * 2; - $tjsta = "
"; - $tjsta .= "
完成处理文档总数的:$tjlen %,位置:{$startdd},继续执行任务..."; - - if ($tjnum < $totalnum) { - $nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; - ShowMsg($tjsta, $nurl, 0, 500); - } else { - ShowMsg("完成所有任务!", "javascript:;"); - } - exit(); -} -include DedeInclude('templets/article_keywords_make.htm'); +\r\n"; + flush(); + $ws = $wserr = $wsnew = ""; + $dsql->SetQuery("SELECT * FROM `#@__keywords`"); + $dsql->Execute(); + while ($row = $dsql->GetObject()) { + if ($row->sta == 1) $ws[$row->keyword] = 1; + else $wserr[$row->keyword] = 1; + } + echo "完成关键词数据库的载入
\r\n"; + flush(); + echo "读取档案数据库,并对禁用的关键词和生字进行处理
\r\n"; + flush(); + $dsql->SetQuery("SELECT id,keywords FROM `#@__archives`"); + $dsql->Execute(); + while ($row = $dsql->GetObject()) { + $keywords = explode(',', trim($row->keywords)); + $nerr = false; + $mykey = ''; + if (is_array($keywords)) { + foreach ($keywords as $v) { + $v = trim($v); + if ($v == '') { + continue; + } + if (isset($ws[$v])) { + $mykey .= $v." "; + } else if (isset($wsnew[$v])) { + $mykey .= $v.' '; + $wsnew[$v]++; + } else if (isset($wserr[$v])) { + $nerr = true; + } else { + $mykey .= $v." "; + $wsnew[$v] = 1; + } + } + } + } + echo "完成档案数据库的处理
\r\n"; + flush(); + if (is_array($wsnew)) { + echo "对关键词进行排序
\r\n"; + flush(); + arsort($wsnew); + echo "把关键词保存到数据库
\r\n"; + flush(); + foreach ($wsnew as $k => $v) { + if (strlen($k) > 20) { + continue; + } + $dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,`rank`,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); + $dsql->Execute(); + } + echo "完成关键词的导入
\r\n"; + flush(); + sleep(1); + } else { + echo "没发现任何新的关键词
\r\n"; + flush(); + sleep(1); + } + ShowMsg('完成所有操作,现在转到关键词列表页', 'article_keywords_main.php'); + exit(); +} +//自动获取关键词(适用于默认的文章模型) +else if ($dopost == 'fetch') { + require_once(DEDEINC."/libraries/splitword.class.php"); + if (empty($startdd)) { + $startdd = 0; + } + if (empty($pagesize)) { + $pagesize = 20; + } + if (empty($totalnum)) { + $totalnum = 0; + } + + //统计记录总数 + if ($totalnum == 0) { + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__archives` WHERE channel='1' "); + $totalnum = $row['dd']; + } + + //获取记录,并分析关键词 + if ($totalnum > $startdd + $pagesize) { + $limitSql = " LIMIT $startdd,$pagesize"; + } else if (($totalnum - $startdd) > 0) { + $limitSql = " LIMIT $startdd,".($totalnum - $startdd); + } else { + $limitSql = ''; + } + $tjnum = $startdd; + if ($limitSql != '') { + $fquery = "SELECT arc.id,arc.title,arc.keywords,addon.body FROM `#@__archives` arc + LEFT JOIN `#@__addonarticle` addon ON addon.aid=arc.id WHERE arc.channel='1' $limitSql "; + $dsql->SetQuery($fquery); + $dsql->Execute(); + + if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { + $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); + $client->appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + while ($row = $dsql->GetObject()) { + if ($row->keywords != '') { + continue; + } + $tjnum++; + $id = $row->id; + $keywords = ""; + $data = $client->Spliteword($row->title.Html2Text($row->body)); + $keywords = $data->data; + $keywords = addslashes($keywords); + if ($keywords == '') { + $keywords = ','; + } + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET keywords='$keywords' WHERE id='$id'"); + } + $client->Close(); + } else { + $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); + while ($row = $dsql->GetObject()) { + if ($row->keywords != '') { + continue; + } + $tjnum++; + $id = $row->id; + $keywords = ""; + + $sp->SetSource($row->title, $cfg_soft_lang, $cfg_soft_lang); + $sp->SetResultType(2); + $sp->StartAnalysis(TRUE); + + $titleindexs = $sp->GetFinallyIndex(); + + $sp->SetSource(Html2Text($row->body), $cfg_soft_lang, $cfg_soft_lang); + $sp->SetResultType(2); + $sp->StartAnalysis(TRUE); + $allindexs = $sp->GetFinallyIndex(); + if (is_array($allindexs) && is_array($titleindexs)) { + foreach ($titleindexs as $k => $v) { + if (strlen($keywords) >= 30) { + break; + } else { + if (strlen($k) <= 2) continue; + $keywords .= $k.","; + } + } + foreach ($allindexs as $k => $v) { + if (strlen($keywords) >= 30) { + break; + } else if (!in_array($k, $titleindexs)) { + if (strlen($k) <= 2) continue; + $keywords .= $k.","; + } + } + } + $keywords = addslashes($keywords); + if ($keywords == '') { + $keywords = ','; + } + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET keywords='$keywords' WHERE id='$id'"); + } + unset($sp); + } + } //end if limit + + + //返回提示信息 + if ($totalnum > 0) $tjlen = ceil(($tjnum / $totalnum) * 100); + else $tjlen = 100; + + $dvlen = $tjlen * 2; + $tjsta = "
"; + $tjsta .= "
完成处理文档总数的:$tjlen %,位置:{$startdd},继续执行任务"; + + if ($tjnum < $totalnum) { + $nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; + ShowMsg($tjsta, $nurl, 0, 500); + } else { + ShowMsg("完成所有任务", "javascript:;"); + } + exit(); +} +include DedeInclude('templets/article_keywords_make.htm'); diff --git a/src/dede/article_keywords_select.php b/src/admin/article_keywords_select.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/article_keywords_select.php rename to src/admin/article_keywords_select.php index 044e610e..d0503276 --- a/src/dede/article_keywords_select.php +++ b/src/admin/article_keywords_select.php @@ -1,38 +1,37 @@ -SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); -$dlist->pageSize = 300; -$dlist->SetParameter("f", $f); -$dlist->SetSource($sql); -$dlist->Display(); - -function GetSta($sta) -{ - if ($sta == 1) return "正常"; - else return "禁用"; -} - -function GetMan($sta) -{ - if ($sta == 1) return "禁用"; - else return "启用"; -} +SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); +$dlist->pageSize = 300; +$dlist->SetParameter("f", $f); +$dlist->SetSource($sql); +$dlist->Display(); + +function GetSta($sta) +{ + if ($sta == 1) return "正常"; + else return "禁用"; +} + +function GetMan($sta) +{ + if ($sta == 1) return "禁用"; + else return "启用"; +} diff --git a/src/dede/article_select_sw.php b/src/admin/article_select_sw.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/article_select_sw.php rename to src/admin/article_select_sw.php index c62ae27c..5bad944f --- a/src/dede/article_select_sw.php +++ b/src/admin/article_select_sw.php @@ -1,46 +1,45 @@ -[设置] "; - echo "[关闭]\r\n
\r\n"; - foreach ($allsources as $v) { - $v = trim($v); - if ($v != "") { - echo "$v | \r\n"; - } - } - echo "
 
"; -} else { - //作者列表 - $m_file = DEDEDATA."/admin/writer.txt"; - echo "
[设置] "; - echo "[关闭]
\r\n
\r\n"; - if (filesize($m_file) > 0) { - $fp = fopen($m_file, 'r'); - $str = fread($fp, filesize($m_file)); - fclose($fp); - $strs = explode(',', $str); - foreach ($strs as $str) { - $str = trim($str); - if ($str != "") { - echo "$str | "; - } - } - } - echo "
 
\r\n"; -} +[设置] "; + echo "[关闭]\r\n
\r\n"; + foreach ($allsources as $v) { + $v = trim($v); + if ($v != "") { + echo "$v | \r\n"; + } + } + echo "
 
"; +} else { + //作者列表 + $m_file = DEDEDATA."/admin/writer.txt"; + echo "
[设置] "; + echo "[关闭]
\r\n
\r\n"; + if (filesize($m_file) > 0) { + $fp = fopen($m_file, 'r'); + $str = fread($fp, filesize($m_file)); + fclose($fp); + $strs = explode(',', $str); + foreach ($strs as $str) { + $str = trim($str); + if ($str != "") { + echo "$str | "; + } + } + } + echo "
 
\r\n"; +} diff --git a/src/dede/article_source_edit.php b/src/admin/article_source_edit.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/article_source_edit.php rename to src/admin/article_source_edit.php index fd6a9aff..940c3b61 --- a/src/dede/article_source_edit.php +++ b/src/admin/article_source_edit.php @@ -1,43 +1,42 @@ -alert('Save OK!');"; -} -//读出 -if (empty($allsource) && filesize($m_file) > 0) { - $fp = fopen($m_file, 'r'); - $allsource = fread($fp, filesize($m_file)); - fclose($fp); -} -$wintitle = "文章来源管理"; -$wecome_info = "文章来源管理"; -$win = new OxWindow(); -$win->Init('article_source_edit.php', 'js/blank.js', 'POST'); -$win->AddHidden('dopost', 'save'); -$win->AddTitle("每行保存一个来源:"); -$win->AddMsgItem(""); -$winform = $win->GetWindow('ok'); -$win->Display(); +alert('Save OK!');"; +} +//读出 +if (empty($allsource) && filesize($m_file) > 0) { + $fp = fopen($m_file, 'r'); + $allsource = fread($fp, filesize($m_file)); + fclose($fp); +} +$wintitle = "文章来源管理"; +$wecome_info = "文章来源管理"; +$win = new OxWindow(); +$win->Init('article_source_edit.php', 'js/blank.js', 'POST'); +$win->AddHidden('dopost', 'save'); +$win->AddTitle("每行保存一个来源:"); +$win->AddMsgItem(""); +$winform = $win->GetWindow('ok'); +$win->Display(); diff --git a/src/dede/article_string_mix.php b/src/admin/article_string_mix.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/article_string_mix.php rename to src/admin/article_string_mix.php index 5bc16bd1..a3800529 --- a/src/dede/article_string_mix.php +++ b/src/admin/article_string_mix.php @@ -1,5 +1,4 @@ Init('article_string_mix.php', 'js/blank.js', 'POST'); $win->AddHidden('dopost', 'save'); $win->AddHidden('token', $_SESSION['token']); -$win->AddTitle("如果您要启用字符串混淆来防采集,请在文档模板需要的字段加上 function='RndString(@me)' 属性,如:{dede:field name='body' function='RndString(@me)'/}。"); +$win->AddTitle("如果您要启用字符串混淆来防采集,请在文档模板需要的字段加上 function='RndString(@me)' 属性,如:{dede:field name='body' function='RndString(@me)'/}"); $win->AddMsgItem(""); $winform = $win->GetWindow('ok'); $win->Display(); diff --git a/src/dede/article_template_rand.php b/src/admin/article_template_rand.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/article_template_rand.php rename to src/admin/article_template_rand.php index 1f260b48..e16be5f9 --- a/src/dede/article_template_rand.php +++ b/src/admin/article_template_rand.php @@ -1,5 +1,4 @@ 0) { $fp = fopen($m_file, 'r'); @@ -77,9 +72,9 @@ $wintitle = "随机模板防采集设置"; $wecome_info = "随机模板防采集设置"; make_hash(); $msg = " - + - + @@ -100,7 +95,7 @@ function DoRand(jobname) 如果您想对旧的文章应用随机模板设置,请点击此对旧文章进行处理(必须设置好模板项)   设置全部   取消全部 -   $okmsg +   $okmsg @@ -110,7 +105,6 @@ function DoRand(jobname)
"; - $win = new OxWindow(); $win->Init('article_template_rand.php', 'js/blank.js', 'POST'); $win->AddHidden('dopost', 'save'); @@ -118,4 +112,4 @@ $win->AddHidden('token', $_SESSION['token']); $win->AddTitle("本设置仅适用于系统默认的文章模型,设置后发布文章时会自动按指定的模板随机获取一个,如果不想使用此功能,把它设置为空即可"); $win->AddMsgItem($msg); $winform = $win->GetWindow('ok'); -$win->Display(); +$win->Display(); \ No newline at end of file diff --git a/src/dede/article_test_same.php b/src/admin/article_test_same.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/article_test_same.php rename to src/admin/article_test_same.php index 1d1b9e26..075651ec --- a/src/dede/article_test_same.php +++ b/src/admin/article_test_same.php @@ -1,84 +1,83 @@ -getone("SELECT maintable FROM `#@__channeltype` WHERE id='$channelid' "); - if (is_array($arr)) { - $maintable = $arr['maintable']; - } else { - showmsg('频道id不正确,无法处理', 'javascript:;'); - exit(); - } - $dsql->SetQuery("SELECT COUNT(title) AS dd,title FROM `$maintable` WHERE channel='$channelid' GROUP BY title ORDER BY dd DESC LIMIT 0, $pagesize"); - $dsql->Execute(); - $allarc = 0; - include DedeInclude('templets/article_result_same.htm'); - exit(); -} -//删除选中的内容(只保留一条) -else if ($dopost == 'delsel') { - require_once(dirname(__FILE__)."/../include/typelink.class.php"); - require_once(dirname(__FILE__)."/inc/inc_batchup.php"); - - if (empty($titles)) { - header("Content-Type: text/html; charset={$cfg_ver_lang}"); - echo "\r\n"; - echo "没有指定删除的文档"; - exit(); - } - - $titless = split('`', $titles); - - if ($channelid < -1) { - $orderby = ($deltype == 'delnew' ? " ORDER BY aid DESC " : " ORDER BY aid ASC "); - } else { - $orderby = ($deltype == 'delnew' ? " ORDER BY id DESC " : " ORDER BY id ASC "); - } - - $totalarc = 0; - - foreach ($titless as $title) { - $title = trim($title); - $title = addslashes($title == '' ? '' : urldecode($title)); - if ($channelid < -1) { - $q1 = "SELECT aid as id,title FROM `$maintable` WHERE channel='$channelid' AND title='$title' $orderby "; - } else { - $q1 = "SELECT id,title FROM `$maintable` WHERE channel='$channelid' AND title='$title' $orderby "; - } - $dsql->SetQuery($q1); - $dsql->Execute(); - $rownum = $dsql->GetTotalRow(); - if ($rownum < 2) continue; - $i = 1; - while ($row = $dsql->GetObject()) { - $i++; - $naid = $row->id; - $ntitle = $row->title; - if ($i > $rownum) continue; - $totalarc++; - DelArc($naid, 'OFF'); - } - } - $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); - ShowMsg("一共删除了[{$totalarc}]篇重复的文档", "javascript:;"); - exit(); -} - -//向导页 -$channelinfos = array(); -$dsql->setquery("SELECT id,typename,maintable,addtable FROM `#@__channeltype` "); -$dsql->execute(); -while ($row = $dsql->getarray()) $channelinfos[] = $row; -include DedeInclude('templets/article_test_same.htm'); +getone("SELECT maintable FROM `#@__channeltype` WHERE id='$channelid' "); + if (is_array($arr)) { + $maintable = $arr['maintable']; + } else { + showmsg('频道id不正确,无法处理', 'javascript:;'); + exit(); + } + $dsql->SetQuery("SELECT COUNT(title) AS dd,title FROM `$maintable` WHERE channel='$channelid' GROUP BY title ORDER BY dd DESC LIMIT 0, $pagesize"); + $dsql->Execute(); + $allarc = 0; + include DedeInclude('templets/article_result_same.htm'); + exit(); +} +//删除选中的内容(只保留一条) +else if ($dopost == 'delsel') { + require_once(DEDEINC."/typelink/typelink.class.php"); + require_once(dirname(__FILE__)."/inc/inc_batchup.php"); + + if (empty($titles)) { + header("Content-Type: text/html; charset={$cfg_ver_lang}"); + echo "\r\n"; + echo "没有指定删除的文档"; + exit(); + } + + $titless = split('`', $titles); + + if ($channelid < -1) { + $orderby = ($deltype == 'delnew' ? " ORDER BY aid DESC " : " ORDER BY aid ASC "); + } else { + $orderby = ($deltype == 'delnew' ? " ORDER BY id DESC " : " ORDER BY id ASC "); + } + + $totalarc = 0; + + foreach ($titless as $title) { + $title = trim($title); + $title = addslashes($title == '' ? '' : urldecode($title)); + if ($channelid < -1) { + $q1 = "SELECT aid as id,title FROM `$maintable` WHERE channel='$channelid' AND title='$title' $orderby "; + } else { + $q1 = "SELECT id,title FROM `$maintable` WHERE channel='$channelid' AND title='$title' $orderby "; + } + $dsql->SetQuery($q1); + $dsql->Execute(); + $rownum = $dsql->GetTotalRow(); + if ($rownum < 2) continue; + $i = 1; + while ($row = $dsql->GetObject()) { + $i++; + $naid = $row->id; + $ntitle = $row->title; + if ($i > $rownum) continue; + $totalarc++; + DelArc($naid, 'OFF'); + } + } + $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); + ShowMsg("一共删除了[{$totalarc}]篇重复的文档", "javascript:;"); + exit(); +} + +//向导页 +$channelinfos = array(); +$dsql->setquery("SELECT id,typename,maintable,addtable FROM `#@__channeltype` "); +$dsql->execute(); +while ($row = $dsql->getarray()) $channelinfos[] = $row; +include DedeInclude('templets/article_test_same.htm'); diff --git a/src/dede/article_test_title.php b/src/admin/article_test_title.php old mode 100755 new mode 100644 similarity index 68% rename from src/dede/article_test_title.php rename to src/admin/article_test_title.php index aecf7318..2a7eed31 --- a/src/dede/article_test_title.php +++ b/src/admin/article_test_title.php @@ -1,19 +1,18 @@ -GetOne("SELECT id FROM `#@__archives` WHERE title LIKE '$t' "); -if (is_array($row)) { - echo "提示:系统已经存在标题为 '$t' 的文档。[关闭]"; -} +GetOne("SELECT id FROM `#@__archives` WHERE title LIKE '$t' "); +if (is_array($row)) { + echo "提示:系统已经存在标题为 '$t' 的文档[关闭]"; +} diff --git a/src/dede/article_writer_edit.php b/src/admin/article_writer_edit.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/article_writer_edit.php rename to src/admin/article_writer_edit.php index daa5fabc..21afbdf6 --- a/src/dede/article_writer_edit.php +++ b/src/admin/article_writer_edit.php @@ -1,45 +1,44 @@ -alert('Save OK!');"; -} - -//读出 -if (empty($allwriter) && filesize($m_file) > 0) { - $fp = fopen($m_file, 'r'); - $allwriter = fread($fp, filesize($m_file)); - fclose($fp); -} -$wintitle = "文章作者管理"; -$wecome_info = "文章作者管理"; -$win = new OxWindow(); -$win->Init('article_writer_edit.php', 'js/blank.js', 'POST'); -$win->AddHidden('dopost', 'save'); -$win->AddTitle("把作者姓名用半角逗号“,”分开:"); -$win->AddMsgItem(""); -$winform = $win->GetWindow('ok'); -$win->Display(); +alert('Save OK!');"; +} + +//读出 +if (empty($allwriter) && filesize($m_file) > 0) { + $fp = fopen($m_file, 'r'); + $allwriter = fread($fp, filesize($m_file)); + fclose($fp); +} +$wintitle = "文章作者管理"; +$wecome_info = "文章作者管理"; +$win = new OxWindow(); +$win->Init('article_writer_edit.php', 'js/blank.js', 'POST'); +$win->AddHidden('dopost', 'save'); +$win->AddTitle("把作者姓名用半角逗号“,”分开:"); +$win->AddMsgItem(""); +$winform = $win->GetWindow('ok'); +$win->Display(); diff --git a/src/dede/baidunews.php b/src/admin/baidunews.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/baidunews.php rename to src/admin/baidunews.php index a4621feb..d63787df --- a/src/dede/baidunews.php +++ b/src/admin/baidunews.php @@ -1,78 +1,77 @@ -\n"; - $baidunews .= "\n"; - $baidunews .= "$cfg_webname \n"; - $baidunews .= "$cfg_adminemail \n"; - $baidunews .= "$cfg_updateperi \n"; - - $limit = $cfg_baidunews_limit; - if ($limit > 100 || $limit < 1) { - $limit = 100; - } - - $query = "SELECT maintable.*, addtable.body, arctype.typename - FROM #@__archives maintable - LEFT JOIN #@__addonarticle addtable ON addtable.aid=maintable.id - LEFT JOIN #@__arctype arctype ON arctype.ID=maintable.typeid - WHERE maintable.channel=1 and maintable.arcrank!=-1 ORDER BY maintable.pubdate DESC LIMIT $limit - "; - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $title = dede_htmlspecialchars($row['title']); - $row1 = GetOneArchive($row['id']); - if (strpos($row1['arcurl'], 'http://') === false) { - $link = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$row1['arcurl']; - } else { - $link = $row1['arcurl']; - } - $link = dede_htmlspecialchars($link); - $description = dede_htmlspecialchars(strip_tags($row['description'])); - $text = dede_htmlspecialchars(strip_tags($row['body'])); - $image = $row['litpic'] == '' ? '' : $row['litpic']; - if ($image != '' && strpos($image, 'http://') === false) { - $image = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$image; - } - //$headlineimg = ''; - $keywords = dede_htmlspecialchars($row['keywords']); - $category = dede_htmlspecialchars($row['typename']); - $author = dede_htmlspecialchars($row['writer']); - $source = dede_htmlspecialchars($row['source']); - $pubdate = dede_htmlspecialchars(gmdate('Y-m-d H:i', $row['pubdate'] + $cfg_cli_time * 3600)); - - $baidunews .= "\n"; - $baidunews .= "$title \n"; - $baidunews .= "$link \n"; - $baidunews .= "$description \n"; - $baidunews .= "$text \n"; - $baidunews .= "$image \n"; - //$baidunews .= "\n"; - $baidunews .= "$keywords \n"; - $baidunews .= "$category \n"; - $baidunews .= "$author \n"; - $baidunews .= "$source \n"; - $baidunews .= "$pubdate \n"; - $baidunews .= "\n"; - } - $baidunews .= "\n"; - - $fp = fopen(dirname(__FILE__).'/'.$filename, 'w'); - fwrite($fp, $baidunews); - fclose($fp); - showmsg("{$filename} make success", 'javascript:;'); -} +\n"; + $baidunews .= "\n"; + $baidunews .= "$cfg_webname \n"; + $baidunews .= "$cfg_adminemail \n"; + $baidunews .= "$cfg_updateperi \n"; + + $limit = $cfg_baidunews_limit; + if ($limit > 100 || $limit < 1) { + $limit = 100; + } + + $query = "SELECT maintable.*, addtable.body, arctype.typename + FROM #@__archives maintable + LEFT JOIN #@__addonarticle addtable ON addtable.aid=maintable.id + LEFT JOIN #@__arctype arctype ON arctype.ID=maintable.typeid + WHERE maintable.channel=1 and maintable.arcrank!=-1 ORDER BY maintable.pubdate DESC LIMIT $limit + "; + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $title = dede_htmlspecialchars($row['title']); + $row1 = GetOneArchive($row['id']); + if (strpos($row1['arcurl'], 'http://') === false) { + $link = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$row1['arcurl']; + } else { + $link = $row1['arcurl']; + } + $link = dede_htmlspecialchars($link); + $description = dede_htmlspecialchars(strip_tags($row['description'])); + $text = dede_htmlspecialchars(strip_tags($row['body'])); + $image = $row['litpic'] == '' ? '' : $row['litpic']; + if ($image != '' && strpos($image, 'http://') === false) { + $image = ($cfg_basehost == '' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$image; + } + //$headlineimg = ''; + $keywords = dede_htmlspecialchars($row['keywords']); + $category = dede_htmlspecialchars($row['typename']); + $author = dede_htmlspecialchars($row['writer']); + $source = dede_htmlspecialchars($row['source']); + $pubdate = dede_htmlspecialchars(gmdate('Y-m-d H:i', $row['pubdate'] + $cfg_cli_time * 3600)); + + $baidunews .= "\n"; + $baidunews .= "$title \n"; + $baidunews .= "$link \n"; + $baidunews .= "$description \n"; + $baidunews .= "$text \n"; + $baidunews .= "$image \n"; + //$baidunews .= "\n"; + $baidunews .= "$keywords \n"; + $baidunews .= "$category \n"; + $baidunews .= "$author \n"; + $baidunews .= "$source \n"; + $baidunews .= "$pubdate \n"; + $baidunews .= "\n"; + } + $baidunews .= "\n"; + + $fp = fopen(dirname(__FILE__).'/'.$filename, 'w'); + fwrite($fp, $baidunews); + fclose($fp); + showmsg("{$filename} make success", 'javascript:;'); +} diff --git a/src/dede/cards_make.php b/src/admin/cards_make.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/cards_make.php rename to src/admin/cards_make.php index 61355a57..7b16cad1 --- a/src/dede/cards_make.php +++ b/src/admin/cards_make.php @@ -1,59 +1,58 @@ -GetOne("SELECT * FROM #@__moneycard_record ORDER BY aid DESC"); - !is_array($row) ? $startid = 100000 : $startid = $row['aid'] + 100000; - $row = $dsql->GetOne("SELECT * FROM #@__moneycard_type WHERE tid='$cardtype'"); - $money = $row['money']; - $num = $row['num']; - $mtime = time(); - $utime = 0; - $ctid = $cardtype; - $startid++; - $endid = $startid + $mnum; - - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - - for (; $startid < $endid; $startid++) { - $cardid = $snprefix.$startid.'-'; - for ($p = 0; $p < $pwdgr; $p++) { - for ($i = 0; $i < $pwdlen; $i++) { - if ($ctype == 1) { - $c = mt_rand(49, 57); - $c = chr($c); - } else { - $c = mt_rand(65, 90); - if ($c == 79) { - $c = 'M'; - } else { - $c = chr($c); - } - } - $cardid .= $c; - } - if ($p < $pwdgr - 1) { - $cardid .= '-'; - } - } - $inquery = "INSERT INTO #@__moneycard_record(ctid,cardid,uid,isexp,mtime,utime,money,num) - VALUES('$ctid','$cardid','0','0','$mtime','$utime','$money','$num'); "; - $dsql->ExecuteNoneQuery($inquery); - echo "成功生成点卡:{$cardid}
"; - } - echo "成功生成 {$mnum} 个点卡"; -} +GetOne("SELECT * FROM #@__moneycard_record ORDER BY aid DESC"); + !is_array($row) ? $startid = 100000 : $startid = $row['aid'] + 100000; + $row = $dsql->GetOne("SELECT * FROM #@__moneycard_type WHERE tid='$cardtype'"); + $money = $row['money']; + $num = $row['num']; + $mtime = time(); + $utime = 0; + $ctid = $cardtype; + $startid++; + $endid = $startid + $mnum; + + header("Content-Type: text/html; charset={$cfg_soft_lang}"); + + for (; $startid < $endid; $startid++) { + $cardid = $snprefix.$startid.'-'; + for ($p = 0; $p < $pwdgr; $p++) { + for ($i = 0; $i < $pwdlen; $i++) { + if ($ctype == 1) { + $c = mt_rand(49, 57); + $c = chr($c); + } else { + $c = mt_rand(65, 90); + if ($c == 79) { + $c = 'M'; + } else { + $c = chr($c); + } + } + $cardid .= $c; + } + if ($p < $pwdgr - 1) { + $cardid .= '-'; + } + } + $inquery = "INSERT INTO #@__moneycard_record(ctid,cardid,uid,isexp,mtime,utime,money,num) + VALUES('$ctid','$cardid','0','0','$mtime','$utime','$money','$num'); "; + $dsql->ExecuteNoneQuery($inquery); + echo "成功生成点卡:{$cardid}
"; + } + echo "成功生成 {$mnum} 个点卡"; +} diff --git a/src/dede/cards_manage.php b/src/admin/cards_manage.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/cards_manage.php rename to src/admin/cards_manage.php index d90f0d25..f5a65a05 --- a/src/dede/cards_manage.php +++ b/src/admin/cards_manage.php @@ -1,67 +1,66 @@ -ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); - ShowMsg("成功删除指定的记录", "cards_manage.php"); - exit(); -} else { - $addsql = ''; - if (isset($isexp)) $addsql = " WHERE isexp='$isexp' "; - - $sql = "SELECT * FROM #@__moneycard_record $addsql ORDER BY aid DESC"; - $dlist = new DataListCP(); - $dlist->pageSize = 25; //设定每页显示记录数(默认25条) - if (isset($isexp)) $dlist->SetParameter("isexp", $isexp); - - $dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); - $dlist->dsql->Execute('ts'); - while ($rw = $dlist->dsql->GetArray('ts')) { - $TypeNames[$rw['tid']] = $rw['pname']; - } - $tplfile = DEDEADMIN."/templets/cards_manmage.htm"; - - //这两句的顺序不能更换 - $dlist->SetTemplate($tplfile); //载入模板 - $dlist->SetSource($sql); //设定查询SQL - $dlist->Display(); //显示 -} - -function GetMemberID($mid) -{ - global $dsql; - if ($mid == 0) return '0'; - $row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); - if (is_array($row)) return "".$row['userid'].""; - else return '0'; -} - -function GetUseDate($time = 0) -{ - if (!empty($time)) return GetDateMk($time); - else return '未使用'; -} -function GetSta($sta) -{ - if ($sta == 1) return '已售出'; - else if ($sta == -1) return '已使用'; - else return '未使用'; -} +ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); + ShowMsg("成功删除指定的记录", "cards_manage.php"); + exit(); +} else { + $addsql = ''; + if (isset($isexp)) $addsql = " WHERE isexp='$isexp' "; + + $sql = "SELECT * FROM #@__moneycard_record $addsql ORDER BY aid DESC"; + $dlist = new DataListCP(); + $dlist->pageSize = 25; //设定每页显示记录数(默认25条) + if (isset($isexp)) $dlist->SetParameter("isexp", $isexp); + + $dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); + $dlist->dsql->Execute('ts'); + while ($rw = $dlist->dsql->GetArray('ts')) { + $TypeNames[$rw['tid']] = $rw['pname']; + } + $tplfile = DEDEADMIN."/templets/cards_manmage.htm"; + + //这两句的顺序不能更换 + $dlist->SetTemplate($tplfile); //载入模板 + $dlist->SetSource($sql); //设定查询SQL + $dlist->Display(); //显示 +} + +function GetMemberID($mid) +{ + global $dsql; + if ($mid == 0) return '0'; + $row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); + if (is_array($row)) return "".$row['userid'].""; + else return '0'; +} + +function GetUseDate($time = 0) +{ + if (!empty($time)) return GetDateMk($time); + else return '未使用'; +} +function GetSta($sta) +{ + if ($sta == 1) return '已售出'; + else if ($sta == -1) return '已使用'; + else return '未使用'; +} diff --git a/src/dede/cards_type.php b/src/admin/cards_type.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/cards_type.php rename to src/admin/cards_type.php index 92dbd7ba..5a90a5e6 --- a/src/dede/cards_type.php +++ b/src/admin/cards_type.php @@ -1,49 +1,48 @@ -ExecuteNoneQuery($query); - $query = "UPDATE #@__moneycard_record SET money='$money',num='$num' WHERE ctid='$tid' ; "; - $dsql->ExecuteNoneQuery($query); - } - } else { - $query = "DELETE FROM #@__moneycard_type WHERE tid='$tid' "; - $dsql->ExecuteNoneQuery($query); - $query = "DELETE FROM #@__moneycard_record WHERE ctid='$tid' AND isexp<>-1 ; "; - $dsql->ExecuteNoneQuery($query); - } - } - - //增加新记录 - if (isset($check_new) && $pname_new != '') { - $query = "INSERT INTO #@__moneycard_type(num,pname,money) VALUES('{$num_new}','{$pname_new}','{$money_new}');"; - $dsql->ExecuteNoneQuery($query); - } - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - echo ""; -} -require_once(DEDEADMIN."/templets/cards_type.htm"); +ExecuteNoneQuery($query); + $query = "UPDATE #@__moneycard_record SET money='$money',num='$num' WHERE ctid='$tid' ; "; + $dsql->ExecuteNoneQuery($query); + } + } else { + $query = "DELETE FROM #@__moneycard_type WHERE tid='$tid' "; + $dsql->ExecuteNoneQuery($query); + $query = "DELETE FROM #@__moneycard_record WHERE ctid='$tid' AND isexp<>-1 ; "; + $dsql->ExecuteNoneQuery($query); + } + } + + //增加新记录 + if (isset($check_new) && $pname_new != '') { + $query = "INSERT INTO #@__moneycard_type(num,pname,money) VALUES('{$num_new}','{$pname_new}','{$money_new}');"; + $dsql->ExecuteNoneQuery($query); + } + header("Content-Type: text/html; charset={$cfg_soft_lang}"); + echo ""; +} +require_once(DEDEADMIN."/templets/cards_type.htm"); diff --git a/src/dede/catalog_add.php b/src/admin/catalog_add.php old mode 100755 new mode 100644 similarity index 83% rename from src/dede/catalog_add.php rename to src/admin/catalog_add.php index 5506db2e..63e9bbc8 --- a/src/dede/catalog_add.php +++ b/src/admin/catalog_add.php @@ -1,237 +1,212 @@ -SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $channelArray[$row->id]['typename'] = $row->typename; - $channelArray[$row->id]['nid'] = $row->nid; - if ($row->id == $channelid) { - $nid = $row->nid; - } -} -if ($dopost == 'quick') { - $tl = new TypeLink(0); - $typeOptions = $tl->GetOptionArray(0, 0, $channelid); - include DedeInclude('templets/catalog_add_quick.htm'); - exit(); -} -/*--------------------- -function action_savequick(){ } ----------------------*/ else if ($dopost == 'savequick') { - if (!isset($savetype)) $savetype = ''; - $isdefault = isset($isdefault) ? $isdefault : 0; - $tempindex = "{style}/index_{$nid}.htm"; - $templist = "{style}/list_{$nid}.htm"; - $temparticle = "{style}/article_{$nid}.htm"; - $queryTemplate = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,typedir,isdefault,defaultname,issend,channeltype, - tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) - VALUES('~reid~','~topid~','~rank~','~typename~','~typedir~','$isdefault','$defaultname','$issend','$channeltype', - '$tempindex','$templist','$temparticle','default','$namerule','$namerule2','0','0','','','~typename~','0','','','0','0','0','','')"; - - if (empty($savetype)) { - foreach ($_POST as $k => $v) { - if (preg_match("#^posttype#", $k)) { - $k = str_replace('posttype', '', $k); - } else { - continue; - } - $rank = ${'rank'.$k}; - $toptypename = trim(${'toptype'.$k}); - $sontype = trim(${'sontype'.$k}); - $toptypedir = GetPinyin(stripslashes($toptypename)); - $toptypedir = $referpath == 'parent' ? $nextdir.'/'.$toptypedir : '/'.$toptypedir; - if (empty($toptypename)) { - continue; - } - $sql = str_replace('~reid~', '0', $queryTemplate); - $sql = str_replace('~topid~', '0', $sql); - $sql = str_replace('~rank~', $rank, $sql); - $sql = str_replace('~typename~', $toptypename, $sql); - $sql = str_replace('~typedir~', $toptypedir, $sql); - $dsql->ExecuteNoneQuery($sql); - $tid = $dsql->GetLastID(); - if ($tid > 0 && $sontype != '') { - $sontypes = explode(',', $sontype); - foreach ($sontypes as $k => $v) { - $v = trim($v); - if ($v == '') { - continue; - } - $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v)); - $sql = str_replace('~reid~', $tid, $queryTemplate); - $sql = str_replace('~topid~', $tid, $sql); - $sql = str_replace('~rank~', $k, $sql); - $sql = str_replace('~typename~', $v, $sql); - $sql = str_replace('~typedir~', $typedir, $sql); - $dsql->ExecuteNoneQuery($sql); - } - } - } - } else { - - - $row = $dsql->GetOne("SELECT `typedir` FROM `#@__arctype` WHERE `id`={$reid}"); - foreach ($_POST as $k => $v) { - if (preg_match("#^posttype#", $k)) { - $k = str_replace('posttype', '', $k); - } else { - continue; - } - $rank = ${'rank'.$k}; - $toptypename = trim(${'reltype'.$k}); - $toptypedir = GetPinyin(stripslashes($toptypename)); - switch ($referpath) { - case 'parent': - $toptypedir = $nextdir.'/'.$toptypedir; - break; - case 'typepath': - $toptypedir = isset($row['typedir']) ? $row['typedir'].'/'.$toptypedir : '/'.$toptypedir; - break; - default: - $toptypedir = '/'.$toptypedir; - break; - } - - if (empty($toptypename)) { - continue; - } - $sql = str_replace('~reid~', $reid, $queryTemplate); - $sql = str_replace('~topid~', $reid, $sql); - $sql = str_replace('~rank~', $rank, $sql); - $sql = str_replace('~typename~', $toptypename, $sql); - $sql = str_replace('~typedir~', $toptypedir, $sql); - $dsql->ExecuteNoneQuery($sql); - } - } - UpDateCatCache(); - ShowMsg('成功增加指定栏目', 'catalog_main.php'); - exit(); -} -/*--------------------- -function action_save(){ } ----------------------*/ else if ($dopost == 'save') { - $smalltypes = ''; - if (empty($smalltype)) $smalltype = ''; - if (is_array($smalltype)) $smalltypes = join(',', $smalltype); - - if (!isset($sitepath)) $sitepath = ''; - if ($topid == 0 && $reid > 0) $topid = $reid; - if ($ispart != 0) $cross = 0; - - $description = Html2Text($description, 1); - $keywords = Html2Text($keywords, 1); - - if ($ispart != 2) { - //栏目的参照目录 - if ($referpath == 'cmspath') $nextdir = '{cmspath}'; - if ($referpath == 'basepath') $nextdir = ''; - //用拼音命名 - if ($upinyin == 1 || $typedir == '') { - $typedir = GetPinyin(stripslashes($typename)); - } - $typedir = $nextdir.'/'.$typedir; - $typedir = preg_replace("#\/{1,}#", "/", $typedir); - } - - //开启多站点时的设置(仅针对顶级栏目) - if ($reid == 0 && $moresite == 1) { - $sitepath = $typedir; - - //检测二级网址 - if ($siteurl != '') { - $siteurl = preg_replace("#\/$#", "", $siteurl); - if (!preg_match("#http:\/\/#i", $siteurl)) { - ShowMsg("您绑定的二级域名无效,请用(http://host)的形式", "-1"); - exit(); - } - if (preg_match("#".$cfg_basehost."#i", $siteurl)) { - ShowMsg("您绑定的二级域名与当前站点是同一个域,不需要绑定", "-1"); - exit(); - } - } - } - - //创建目录 - if ($ispart != 2) { - $true_typedir = str_replace("{cmspath}", $cfg_cmspath, $typedir); - $true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); - if (!CreateDir($true_typedir)) { - ShowMsg("创建目录 {$true_typedir} 失败,请检查您的路径是否存在问题", "-1"); - exit(); - } - } - - $in_query = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,typedir,isdefault,defaultname,issend,channeltype, - tempindex,templist,temparticle,modname,namerule,namerule2, - ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) - VALUES('$reid','$topid','$sortrank','$typename','$typedir','$isdefault','$defaultname','$issend','$channeltype', - '$tempindex','$templist','$temparticle','default','$namerule','$namerule2', - '$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes')"; - - if (!$dsql->ExecuteNoneQuery($in_query)) { - ShowMsg("保存目录数据时失败,请检查您的输入资料是否存在问题", "-1"); - exit(); - } - UpDateCatCache(); - if ($reid > 0) { - PutCookie('lastCid', GetTopid($reid), 3600 * 24, '/'); - } - ShowMsg("成功创建一个分类", "catalog_main.php"); - exit(); -} //End dopost==save - -//获取从父目录继承的默认参数 -if ($dopost == '') { - $channelid = 1; - $issend = 1; - $corank = 0; - $reid = 0; - $topid = 0; - $typedir = ''; - $moresite = 0; - if ($id > 0) { - $myrow = $dsql->GetOne(" SELECT tp.*,ch.typename AS ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id "); - $channelid = $myrow['channeltype']; - $issennd = $myrow['issend']; - $corank = $myrow['corank']; - $topid = $myrow['topid']; - $typedir = $myrow['typedir']; - } - - //父栏目是否为二级站点 - $moresite = empty($myrow['moresite']) ? 0 : $myrow['moresite']; -} - -include DedeInclude('templets/catalog_add.htm'); +SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $channelArray[$row->id]['typename'] = $row->typename; + $channelArray[$row->id]['nid'] = $row->nid; + if ($row->id == $channelid) { + $nid = $row->nid; + } +} +if ($dopost == 'quick') { + $tl = new TypeLink(0); + $typeOptions = $tl->GetOptionArray(0, 0, $channelid); + include DedeInclude('templets/catalog_add_quick.htm'); + exit(); +} +/*--------------------- +function action_savequick(){ } +---------------------*/ +else if ($dopost == 'savequick') { + if (!isset($savetype)) $savetype = ''; + $isdefault = isset($isdefault) ? $isdefault : 0; + $tempindex = "{style}/index_{$nid}.htm"; + $templist = "{style}/list_{$nid}.htm"; + $temparticle = "{style}/article_{$nid}.htm"; + $queryTemplate = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,namegk,enname,ennamegk,litpic,litimg,typedir,isdefault,defaultname,issend,channeltype,tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) + VALUES('~reid~','~topid~','~rank~','~typename~','~namegk~','~enname~','~ennamegk~','~litpic~','~litimg~','~typedir~','$isdefault','$defaultname','$issend','$channeltype','$tempindex','$templist','$temparticle','default','$namerule','$namerule2','0','0','','','~typename~','0','','','0','0','0','','')"; + if (empty($savetype)) { + foreach ($_POST as $k => $v) { + if (preg_match("#^posttype#", $k)) { + $k = str_replace('posttype', '', $k); + } else { + continue; + } + $rank = ${'rank'.$k}; + $toptypename = trim(${'toptype'.$k}); + $sontype = trim(${'sontype'.$k}); + $toptypedir = GetPinyin(stripslashes($toptypename)); + $toptypedir = $referpath == 'parent' ? $nextdir.'/'.$toptypedir : '/'.$toptypedir; + if (empty($toptypename)) { + continue; + } + $sql = str_replace('~reid~', '0', $queryTemplate); + $sql = str_replace('~topid~', '0', $sql); + $sql = str_replace('~rank~', $rank, $sql); + $sql = str_replace('~typename~', $toptypename, $sql); + $sql = str_replace('~typedir~', $toptypedir, $sql); + $dsql->ExecuteNoneQuery($sql); + $tid = $dsql->GetLastID(); + if ($tid > 0 && $sontype != '') { + $sontypes = explode(',', $sontype); + foreach ($sontypes as $k => $v) { + $v = trim($v); + if ($v == '') { + continue; + } + $typedir = $toptypedir.'/'.GetPinyin(stripslashes($v)); + $sql = str_replace('~reid~', $tid, $queryTemplate); + $sql = str_replace('~topid~', $tid, $sql); + $sql = str_replace('~rank~', $k, $sql); + $sql = str_replace('~typename~', $v, $sql); + $sql = str_replace('~typedir~', $typedir, $sql); + $dsql->ExecuteNoneQuery($sql); + } + } + } + } else { + $row = $dsql->GetOne("SELECT `typedir` FROM `#@__arctype` WHERE `id`={$reid}"); + foreach ($_POST as $k => $v) { + if (preg_match("#^posttype#", $k)) { + $k = str_replace('posttype', '', $k); + } else { + continue; + } + $rank = ${'rank'.$k}; + $toptypename = trim(${'reltype'.$k}); + $toptypedir = GetPinyin(stripslashes($toptypename)); + switch ($referpath) { + case 'parent': + $toptypedir = $nextdir.'/'.$toptypedir; + break; + case 'typepath': + $toptypedir = isset($row['typedir']) ? $row['typedir'].'/'.$toptypedir : '/'.$toptypedir; + break; + default: + $toptypedir = '/'.$toptypedir; + break; + } + if (empty($toptypename)) { + continue; + } + $sql = str_replace('~reid~', $reid, $queryTemplate); + $sql = str_replace('~topid~', $reid, $sql); + $sql = str_replace('~rank~', $rank, $sql); + $sql = str_replace('~typename~', $toptypename, $sql); + $sql = str_replace('~typedir~', $toptypedir, $sql); + $dsql->ExecuteNoneQuery($sql); + } + } + UpDateCatCache(); + ShowMsg('成功增加指定栏目', 'catalog_main.php'); + exit(); +} +/*--------------------- +function action_save(){ } +---------------------*/ +else if ($dopost == 'save') { + $smalltypes = ''; + if (empty($smalltype)) $smalltype = ''; + if (is_array($smalltype)) $smalltypes = join(',', $smalltype); + if (!isset($sitepath)) $sitepath = ''; + if ($topid == 0 && $reid > 0) $topid = $reid; + if ($ispart != 0) $cross = 0; + $description = Html2Text($description, 1); + $keywords = Html2Text($keywords, 1); + if ($ispart != 2) { + //栏目的参照目录 + if ($referpath == 'cmspath') $nextdir = '{cmspath}'; + if ($referpath == 'basepath') $nextdir = ''; + //用拼音命名 + if ($upinyin == 1 || $typedir == '') { + $typedir = GetPinyin(stripslashes($typename)); + } + $typedir = $nextdir.'/'.$typedir; + $typedir = preg_replace("#\/{1,}#", "/", $typedir); + } + //开启多站点时的设置(仅针对顶级栏目) + if ($reid == 0 && $moresite == 1) { + $sitepath = $typedir; + //检测二级网址 + if ($siteurl != '') { + $siteurl = preg_replace("#\/$#", "", $siteurl); + if (!preg_match("#http:\/\/#i", $siteurl)) { + ShowMsg("您绑定的二级域名无效,请用(http://host)的形式", "-1"); + exit(); + } + if (preg_match("#".$cfg_basehost."#i", $siteurl)) { + ShowMsg("您绑定的二级域名与当前站点是同一个域,不需要绑定", "-1"); + exit(); + } + } + } + //创建目录 + if ($ispart != 2) { + $true_typedir = str_replace("{cmspath}", $cfg_cmspath, $typedir); + $true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); + if (!CreateDir($true_typedir)) { + ShowMsg("创建目录 {$true_typedir} 失败,请检查您的路径是否存在问题", "-1"); + exit(); + } + } + $in_query = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,namegk,enname,ennamegk,litpic,litimg,typedir,isdefault,defaultname,issend,channeltype,tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) + VALUES('$reid','$topid','$sortrank','$typename','$namegk','$enname','$ennamegk','$litpic','$litimg','$typedir','$isdefault','$defaultname','$issend','$channeltype','$tempindex','$templist','$temparticle','default','$namerule','$namerule2','$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes')"; + if (!$dsql->ExecuteNoneQuery($in_query)) { + ShowMsg("保存目录数据时失败,请检查您的输入资料是否存在问题", "-1"); + exit(); + } + UpDateCatCache(); + if ($reid > 0) { + PutCookie('lastCid', GetTopid($reid), 3600 * 24, '/'); + } + ShowMsg("成功创建一个分类", "catalog_main.php"); + exit(); +}//End dopost==save +//获取从父目录继承的默认参数 +if ($dopost == '') { + $channelid = 1; + $issend = 1; + $corank = 0; + $reid = 0; + $topid = 0; + $typedir = ''; + $moresite = 0; + if ($id > 0) { + $myrow = $dsql->GetOne(" SELECT tp.*,ch.typename AS ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id "); + $channelid = $myrow['channeltype']; + $issennd = $myrow['issend']; + $corank = $myrow['corank']; + $topid = $myrow['topid']; + $typedir = $myrow['typedir']; + } + //父栏目是否为二级站点 + $moresite = empty($myrow['moresite']) ? 0 : $myrow['moresite']; +} +include DedeInclude('templets/catalog_add.htm'); \ No newline at end of file diff --git a/src/dede/catalog_del.php b/src/admin/catalog_del.php old mode 100755 new mode 100644 similarity index 86% rename from src/dede/catalog_del.php rename to src/admin/catalog_del.php index 17cc6479..ef810017 --- a/src/dede/catalog_del.php +++ b/src/admin/catalog_del.php @@ -1,42 +1,41 @@ -DelType($id, $delfile); - UpDateCatCache(); - ShowMsg("成功删除一个栏目", "catalog_main.php"); - exit(); -} -$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=".$id); -$row = $dsql->GetOne(); -$wintitle = "删除栏目确认"; -$wecome_info = "栏目管理 >> 删除栏目确认"; -$win = new OxWindow(); -$win->Init('catalog_del.php', 'js/blank.js', 'POST'); -$win->AddHidden('id', $id); -$win->AddHidden('dopost', 'ok'); -$win->AddTitle("您要确实要删除栏目: [{$row['typename']}] 吗?"); -$win->AddItem('栏目的文件保存目录:', $row['typedir']); -$win->AddItem('是否删除文件:', " "); -$winform = $win->GetWindow('ok'); -$win->Display(); +DelType($id, $delfile); + UpDateCatCache(); + ShowMsg("成功删除一个栏目", "catalog_main.php"); + exit(); +} +$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=".$id); +$row = $dsql->GetOne(); +$wintitle = "删除栏目确认"; +$wecome_info = "栏目管理 >> 删除栏目确认"; +$win = new OxWindow(); +$win->Init('catalog_del.php', 'js/blank.js', 'POST'); +$win->AddHidden('id', $id); +$win->AddHidden('dopost', 'ok'); +$win->AddTitle("您要确实要删除栏目:[{$row['typename']}] 吗"); +$win->AddItem('栏目的文件保存目录:', $row['typedir']); +$win->AddItem('是否删除文件:', " "); +$winform = $win->GetWindow('ok'); +$win->Display(); diff --git a/src/dede/catalog_do.php b/src/admin/catalog_do.php old mode 100755 new mode 100644 similarity index 82% rename from src/dede/catalog_do.php rename to src/admin/catalog_do.php index ff7773b8..25d783b6 --- a/src/dede/catalog_do.php +++ b/src/admin/catalog_do.php @@ -1,299 +1,308 @@ -GetOne("SELECT addcon FROM #@__channeltype WHERE id='$channelid'"); - } else { - //根据栏目调用发布表单 - $row = $dsql->GetOne("SELECT ch.addcon FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$cid' "); - } - $gurl = $row["addcon"]; - if ($gurl == "") { - ShowMsg("对不起,您指的栏目可能有误", "catalog_main.php"); - exit(); - } - - //跳转并传递参数 - header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); - exit(); -} -/*-------------------------- -//管理文档 -function listArchives(); ----------------------------*/ else if ($dopost == "listArchives") { - if (!empty($gurl)) { - if (empty($arcrank)) { - $arcrank = ''; - } - $gurl = str_replace('..', '', $gurl); - header("location:{$gurl}?arcrank={$arcrank}&cid={$cid}"); - exit(); - } - if ($cid > 0) { - $row = $dsql->GetOne("SELECT #@__arctype.typename,#@__channeltype.typename AS channelname,#@__channeltype.id,#@__channeltype.mancon FROM #@__arctype LEFT JOIN #@__channeltype on #@__channeltype.id=#@__arctype.channeltype WHERE #@__arctype.id='$cid'"); - $gurl = $row["mancon"]; - $channelid = $row["id"]; - $typename = $row["typename"]; - $channelname = $row["channelname"]; - if ($gurl == "") { - ShowMsg("对不起,您指的栏目可能有误", "catalog_main.php"); - exit(); - } - } else if ($channelid > 0) { - $row = $dsql->GetOne("SELECT typename,id,mancon FROM #@__channeltype WHERE id='$channelid'"); - $gurl = $row["mancon"]; - $channelid = $row["id"]; - $typename = ""; - $channelname = $row["typename"]; - } - - if (empty($gurl)) $gurl = 'content_list.php'; - header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); - exit(); -} -/*-------------------------- -//浏览通用模板目录 -function viewTempletDir(); ----------------------------*/ else if ($dopost == "viewTemplet") { - header("location:tpl.php?path=/".$cfg_df_style); - exit(); -} -/*------------------------ -浏览单个页面的栏目 -function ViewSgPage() -------------------------*/ else if ($dopost == "viewSgPage") { - require_once(DEDEINC."/arc.listview.class.php"); - $lv = new ListView($cid); - $pageurl = $lv->MakeHtml(); - ShowMsg("更新缓冲,请稍后...", $pageurl); - exit(); -} -/*------------------------ -更改栏目排列顺序 -function upRank() -------------------------*/ else if ($dopost == "upRank") { - //检查权限许可 - CheckPurview('t_Edit,t_AccEdit'); - - //检查栏目操作许可 - CheckCatalog($cid, "您无权更改本栏目"); - $row = $dsql->GetOne("SELECT reid,sortrank FROM #@__arctype WHERE id='$cid'"); - $reid = $row['reid']; - $sortrank = $row['sortrank']; - $row = $dsql->GetOne("SELECT sortrank FROM #@__arctype WHERE sortrank<=$sortrank AND reid=$reid ORDER BY sortrank DESC "); - if (is_array($row)) { - $sortrank = $row['sortrank'] - 1; - $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='$sortrank' WHERE id='$cid'"); - } - UpDateCatCache(); - ShowMsg("操作成功,返回目录...", "catalog_main.php"); - exit(); -} else if ($dopost == "upRankAll") { - //检查权限许可 - CheckPurview('t_Edit'); - $row = $dsql->GetOne("SELECT id FROM #@__arctype ORDER BY id DESC"); - if (is_array($row)) { - $maxID = $row['id']; - for ($i = 1; $i <= $maxID; $i++) { - if (isset(${'sortrank'.$i})) { - $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='".(${'sortrank'.$i})."' WHERE id='{$i}';"); - } - } - } - UpDateCatCache(); - ShowMsg("操作成功,正在返回...", "catalog_main.php"); - exit(); -} -/*-------------------------- -//更新栏目缓存 -function UpCatlogCache(); ----------------------------*/ else if ($dopost == "upcatcache") { - UpDateCatCache(); - $sql = " TRUNCATE TABLE `#@__arctiny`"; - $dsql->ExecuteNoneQuery($sql); - - //导入普通模型微数据 - $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); - - //导入单表模型微数据 - $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; - } - } - ShowMsg("操作成功,正在返回...", "catalog_main.php"); - exit(); -} -/*--------------------- -获取JS文件 -function GetJs -----------------------*/ else if ($dopost == "GetJs") { - header("location:makehtml_js.php"); - exit(); -} -/*----------- -获得子类的内容 -function GetSunListsMenu(); ------------*/ else if ($dopost == "GetSunListsMenu") { - $userChannel = $cuserLogin->getUserChannel(); - require_once(DEDEINC."/typeunit.class.menu.php"); - AjaxHead(); - PutCookie('lastCidMenu', $cid, 3600 * 24, "/"); - $tu = new TypeUnit($userChannel); - $tu->LogicListAllSunType($cid, " "); -} -/*----------- -获得子类的内容 -function GetSunLists(); ------------*/ else if ($dopost == "GetSunLists") { - require_once(DEDEINC."/typeunit.class.admin.php"); - AjaxHead(); - PutCookie('lastCid', $cid, 3600 * 24, "/"); - $tu = new TypeUnit(); - $tu->dsql = $dsql; - echo " \r\n"; - $tu->LogicListAllSunType($cid, " "); - echo "
\r\n"; - $tu->Close(); -} -/*---------------- -合并栏目 -function unitCatalog() { } ------------------*/ else if ($dopost == 'unitCatalog') { - CheckPurview('t_Move'); - require_once(DEDEINC.'/oxwindow.class.php'); - require_once(DEDEINC.'/typelink.class.php'); - require_once(DEDEINC.'/channelunit.func.php'); - if (empty($nextjob)) { - $typeid = isset($typeid) ? intval($typeid) : 0; - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE reid='$typeid' "); - $tl = new TypeLink($typeid); - $typename = $tl->TypeInfos['typename']; - $reid = $tl->TypeInfos['reid']; - $channelid = $tl->TypeInfos['channeltype']; - if (!empty($row['dd'])) { - ShowMsg("栏目: $typename($typeid) 有子栏目,不能进行合并操作", '-1'); - exit(); - } - $typeOptions = $tl->GetOptionArray(0, 0, $channelid); - $wintitle = '合并栏目'; - $wecome_info = "栏目管理 >> 合并栏目"; - $win = new OxWindow(); - $win->Init('catalog_do.php', 'js/blank.js', 'POST'); - $win->AddHidden('dopost', 'unitCatalog'); - $win->AddHidden('typeid', $typeid); - $win->AddHidden('channelid', $channelid); - $win->AddHidden('nextjob', 'unitok'); - $win->AddTitle("合并目录时不会删除原来的栏目目录,合并后需手动更新目标栏目的文档HTML和列表HTML。"); - $win->AddItem('您选择的栏目是:', "$typename($typeid)"); - $win->AddItem('您希望合并到那个栏目?', ""); - $win->AddItem('注意事项:', '栏目不能有下级子栏目,只允许子级到更高级或同级或不同父级的情况。'); - $winform = $win->GetWindow('ok'); - $win->Display(); - exit(); - } else { - if ($typeid == $unittype) { - ShowMsg("同一栏目无法合并,请后退重试", '-1'); - exit(); - } - if (IsParent($unittype, $typeid)) { - ShowMsg('不能从父类合并到子类', 'catalog_main.php'); - exit(); - } - $row = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = (empty($row['addtable']) ? '#@__addonarticle' : $row['addtable']); - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$unittype' WHERE typeid='$typeid' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__feedback` SET typeid='$unittype' WHERE typeid='$typeid' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid='$unittype' WHERE typeid='$typeid' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid2='$unittype' WHERE typeid2='$typeid' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__addonspec` SET typeid='$unittype' WHERE typeid='$typeid' "); - $dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$unittype' WHERE typeid='$typeid' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id='$typeid' "); - UpDateCatCache(); - ShowMsg('成功合并指定栏目', 'catalog_main.php'); - exit(); - } -} -/*---------------- -移动栏目 -function moveCatalog() { } ------------------*/ else if ($dopost == 'moveCatalog') { - CheckPurview('t_Move'); - require_once(DEDEINC.'/oxwindow.class.php'); - require_once(DEDEINC.'/typelink.class.php'); - require_once(DEDEINC.'/channelunit.func.php'); - if (empty($nextjob)) { - $tl = new TypeLink($typeid); - $typename = $tl->TypeInfos['typename']; - $reid = $tl->TypeInfos['reid']; - $channelid = $tl->TypeInfos['channeltype']; - $typeOptions = $tl->GetOptionArray(0, 0, $channelid); - $wintitle = "移动栏目"; - $wecome_info = "栏目管理 >> 移动栏目"; - $win = new OxWindow(); - $win->Init('catalog_do.php', 'js/blank.js', 'POST'); - $win->AddHidden('dopost', 'moveCatalog'); - $win->AddHidden('typeid', $typeid); - $win->AddHidden('channelid', $channelid); - $win->AddHidden('nextjob', 'unitok'); - $win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。"); - $win->AddItem('您选择的栏目是:', "$typename($typeid)"); - $win->AddItem('您希望移动到那个栏目?', ""); - $win->AddItem('注意事项:', '不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。'); - $winform = $win->GetWindow('ok'); - $win->Display(); - exit(); - } else { - if ($typeid == $movetype) { - ShowMsg('移对对象和目标位置相同', 'catalog_main.php'); - exit(); - } - if (IsParent($movetype, $typeid)) { - ShowMsg('不能从父类移动到子类', 'catalog_main.php'); - exit(); - } - $dsql->ExecuteNoneQuery(" UPDATE `#@__arctype` SET reid='$movetype' WHERE id='$typeid' "); - UpDateCatCache(); - ShowMsg('成功移动目录', 'catalog_main.php'); - exit(); - } -} +GetOne("SELECT addcon FROM #@__channeltype WHERE id='$channelid'"); + } else { + //根据栏目调用发布表单 + $row = $dsql->GetOne("SELECT ch.addcon FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$cid' "); + } + $gurl = $row["addcon"]; + if ($gurl == "") { + ShowMsg("对不起,您指的栏目可能有误", "catalog_main.php"); + exit(); + } + + //跳转并传递参数 + header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); + exit(); +} +/*-------------------------- +//管理文档 +function listArchives(); +---------------------------*/ +else if ($dopost == "listArchives") { + if (!empty($gurl)) { + if (empty($arcrank)) { + $arcrank = ''; + } + $gurl = str_replace('..', '', $gurl); + header("location:{$gurl}?arcrank={$arcrank}&cid={$cid}"); + exit(); + } + if ($cid > 0) { + $row = $dsql->GetOne("SELECT #@__arctype.typename,#@__channeltype.typename AS channelname,#@__channeltype.id,#@__channeltype.mancon FROM #@__arctype LEFT JOIN #@__channeltype on #@__channeltype.id=#@__arctype.channeltype WHERE #@__arctype.id='$cid'"); + $gurl = $row["mancon"]; + $channelid = $row["id"]; + $typename = $row["typename"]; + $channelname = $row["channelname"]; + if ($gurl == "") { + ShowMsg("对不起,您指的栏目可能有误", "catalog_main.php"); + exit(); + } + } else if ($channelid > 0) { + $row = $dsql->GetOne("SELECT typename,id,mancon FROM #@__channeltype WHERE id='$channelid'"); + $gurl = $row["mancon"]; + $channelid = $row["id"]; + $typename = ""; + $channelname = $row["typename"]; + } + + if (empty($gurl)) $gurl = 'content_list.php'; + header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); + exit(); +} +/*-------------------------- +//浏览通用模板目录 +function viewTempletDir(); +---------------------------*/ +else if ($dopost == "viewTemplet") { + header("location:tpl.php?path=/".$cfg_df_style); + exit(); +} +/*------------------------ +浏览单个页面的栏目 +function ViewSgPage() +------------------------*/ +else if ($dopost == "viewSgPage") { + require_once(DEDEINC."/archive/listview.class.php"); + $lv = new ListView($cid); + $pageurl = $lv->MakeHtml(); + ShowMsg("更新缓冲,请稍后", $pageurl); + exit(); +} +/*------------------------ +修改栏目排列顺序 +function upRank() +------------------------*/ +else if ($dopost == "upRank") { + //检查权限许可 + CheckPurview('t_Edit,t_AccEdit'); + + //检查栏目操作许可 + CheckCatalog($cid, "您无权修改本栏目"); + $row = $dsql->GetOne("SELECT reid,sortrank FROM #@__arctype WHERE id='$cid'"); + $reid = $row['reid']; + $sortrank = $row['sortrank']; + $row = $dsql->GetOne("SELECT sortrank FROM #@__arctype WHERE sortrank<=$sortrank AND reid=$reid ORDER BY sortrank DESC "); + if (is_array($row)) { + $sortrank = $row['sortrank'] - 1; + $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='$sortrank' WHERE id='$cid'"); + } + UpDateCatCache(); + ShowMsg("操作成功,返回目录", "catalog_main.php"); + exit(); +} else if ($dopost == "upRankAll") { + //检查权限许可 + CheckPurview('t_Edit'); + $row = $dsql->GetOne("SELECT id FROM #@__arctype ORDER BY id DESC"); + if (is_array($row)) { + $maxID = $row['id']; + for ($i = 1; $i <= $maxID; $i++) { + if (isset(${'sortrank'.$i})) { + $dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='".(${'sortrank'.$i})."' WHERE id='{$i}';"); + } + } + } + UpDateCatCache(); + ShowMsg("操作成功,正在返回", "catalog_main.php"); + exit(); +} +/*-------------------------- +//更新栏目缓存 +function UpCatlogCache(); +---------------------------*/ +else if ($dopost == "upcatcache") { + UpDateCatCache(); + $sql = " TRUNCATE TABLE `#@__arctiny`"; + $dsql->ExecuteNoneQuery($sql); + + //导入普通模型微数据 + $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); + + //导入单表模型微数据 + $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; + } + } + ShowMsg("操作成功,正在返回", "catalog_main.php"); + exit(); +} +/*--------------------- +获取JS文件 +function GetJs +----------------------*/ +else if ($dopost == "GetJs") { + header("location:makehtml_js.php"); + exit(); +} +/*----------- +获得子类的内容 +function GetSunListsMenu(); +-----------*/ +else if ($dopost == "GetSunListsMenu") { + $userChannel = $cuserLogin->getUserChannel(); + require_once(DEDEINC."/typeunit/typeunit.class.menu.php"); + AjaxHead(); + PutCookie('lastCidMenu', $cid, 3600 * 24, "/"); + $tu = new TypeUnit($userChannel); + $tu->LogicListAllSunType($cid, " "); +} +/*----------- +获得子类的内容 +function GetSunLists(); +-----------*/ +else if ($dopost == "GetSunLists") { + require_once(DEDEINC."/typelink/typeunit.class.admin.php"); + AjaxHead(); + PutCookie('lastCid', $cid, 3600 * 24, "/"); + $tu = new TypeUnit(); + $tu->dsql = $dsql; + echo " \r\n"; + $tu->LogicListAllSunType($cid, " "); + echo "
\r\n"; + $tu->Close(); +} +/*---------------- +合并栏目 +function unitCatalog() { } +-----------------*/ +else if ($dopost == 'unitCatalog') { + CheckPurview('t_Move'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + require_once(DEDEINC.'/typelink/typelink.class.php'); + require_once(DEDEINC.'/channelunit.func.php'); + if (empty($nextjob)) { + $typeid = isset($typeid) ? intval($typeid) : 0; + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE reid='$typeid' "); + $tl = new TypeLink($typeid); + $typename = $tl->TypeInfos['typename']; + $reid = $tl->TypeInfos['reid']; + $channelid = $tl->TypeInfos['channeltype']; + if (!empty($row['dd'])) { + ShowMsg("栏目:$typename($typeid) 有子栏目,不能进行合并操作", '-1'); + exit(); + } + $typeOptions = $tl->GetOptionArray(0, 0, $channelid); + $wintitle = '合并栏目'; + $wecome_info = "栏目管理 >> 合并栏目"; + $win = new OxWindow(); + $win->Init('catalog_do.php', 'js/blank.js', 'POST'); + $win->AddHidden('dopost', 'unitCatalog'); + $win->AddHidden('typeid', $typeid); + $win->AddHidden('channelid', $channelid); + $win->AddHidden('nextjob', 'unitok'); + $win->AddTitle("合并目录时不会删除原来的栏目目录,合并后需手动更新目标栏目的文档HTML和列表HTML"); + $win->AddItem('您选择的栏目是:', "$typename($typeid)"); + $win->AddItem('您希望合并到那个栏目', ""); + $win->AddItem('注意事项:', '栏目不能有下级子栏目,只允许子级到更高级或同级或不同父级的情况'); + $winform = $win->GetWindow('ok'); + $win->Display(); + exit(); + } else { + if ($typeid == $unittype) { + ShowMsg("同一栏目无法合并,请后退重试", '-1'); + exit(); + } + if (IsParent($unittype, $typeid)) { + ShowMsg('不能从父类合并到子类', 'catalog_main.php'); + exit(); + } + $row = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = (empty($row['addtable']) ? '#@__addonarticle' : $row['addtable']); + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$unittype' WHERE typeid='$typeid' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__feedback` SET typeid='$unittype' WHERE typeid='$typeid' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid='$unittype' WHERE typeid='$typeid' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid2='$unittype' WHERE typeid2='$typeid' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__addonspec` SET typeid='$unittype' WHERE typeid='$typeid' "); + $dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$unittype' WHERE typeid='$typeid' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id='$typeid' "); + UpDateCatCache(); + ShowMsg('成功合并指定栏目', 'catalog_main.php'); + exit(); + } +} +/*---------------- +移动栏目 +function moveCatalog() { } +-----------------*/ +else if ($dopost == 'moveCatalog') { + CheckPurview('t_Move'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + require_once(DEDEINC.'/typelink/typelink.class.php'); + require_once(DEDEINC.'/channelunit.func.php'); + if (empty($nextjob)) { + $tl = new TypeLink($typeid); + $typename = $tl->TypeInfos['typename']; + $reid = $tl->TypeInfos['reid']; + $channelid = $tl->TypeInfos['channeltype']; + $typeOptions = $tl->GetOptionArray(0, 0, $channelid); + $wintitle = "移动栏目"; + $wecome_info = "栏目管理 >> 移动栏目"; + $win = new OxWindow(); + $win->Init('catalog_do.php', 'js/blank.js', 'POST'); + $win->AddHidden('dopost', 'moveCatalog'); + $win->AddHidden('typeid', $typeid); + $win->AddHidden('channelid', $channelid); + $win->AddHidden('nextjob', 'unitok'); + $win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML"); + $win->AddItem('您选择的栏目是:', "$typename($typeid)"); + $win->AddItem('您希望移动到那个栏目', ""); + $win->AddItem('注意事项:', '不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况'); + $winform = $win->GetWindow('ok'); + $win->Display(); + exit(); + } else { + if ($typeid == $movetype) { + ShowMsg('移对对象和目标位置相同', 'catalog_main.php'); + exit(); + } + if (IsParent($movetype, $typeid)) { + ShowMsg('不能从父类移动到子类', 'catalog_main.php'); + exit(); + } + $dsql->ExecuteNoneQuery(" UPDATE `#@__arctype` SET reid='$movetype' WHERE id='$typeid' "); + UpDateCatCache(); + ShowMsg('成功移动目录', 'catalog_main.php'); + exit(); + } +} diff --git a/src/dede/catalog_edit.php b/src/admin/catalog_edit.php old mode 100755 new mode 100644 similarity index 89% rename from src/dede/catalog_edit.php rename to src/admin/catalog_edit.php index 3fbeefc0..5b40a6c8 --- a/src/dede/catalog_edit.php +++ b/src/admin/catalog_edit.php @@ -1,246 +1,247 @@ -ExecuteNoneQuery($upquery)) { - ShowMsg("保存当前栏目更改时失败,请检查您的输入资料是否存在问题", "-1"); - exit(); - } - //如果选择子栏目可投稿,更新顶级栏目为可投稿 - if ($topid > 0 && $issend == 1) { - $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); - } - $slinks = " id IN (".GetSonIds($id).")"; - //修改顶级栏目时强制修改下级的多站点支持属性 - if ($topid == 0 && preg_match("#,#", $slinks)) { - $upquery = "UPDATE `#@__arctype` SET moresite='$moresite', siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' WHERE 1=1 AND $slinks"; - $dsql->ExecuteNoneQuery($upquery); - } - //更改子栏目属性 - if (!empty($upnext)) { - $upquery = "UPDATE `#@__arctype` SET - issend='$issend', - defaultname='$defaultname', - channeltype='$channeltype', - tempindex='$tempindex', - templist='$templist', - temparticle='$temparticle', - namerule='$namerule', - namerule2='$namerule2', - ishidden='$ishidden' - WHERE 1=1 AND $slinks"; - if (!$dsql->ExecuteNoneQuery($upquery)) { - ShowMsg("更改当前栏目成功,但更改下级栏目属性时失败", "-1"); - exit(); - } - } - UpDateCatCache(); - ShowMsg("成功更改一个分类", "catalog_main.php"); - exit(); -} //End Save Action -else if ($dopost == "savetime") { - $uptopsql = ''; - $slinks = " id IN (".GetSonIds($id).")"; - //顶级栏目二级域名根目录处理 - if ($topid == 0 && $moresite == 1) { - $sitepath = $typedir; - $uptopsql = " ,sitepath='$sitepath' "; - if (preg_match("#,#", $slinks)) { - $upquery = "UPDATE `#@__arctype` SET sitepath='$sitepath' WHERE $slinks"; - $dsql->ExecuteNoneQuery($upquery); - } - } - //如果选择子栏目可投稿,更新顶级栏目为可投稿 - if ($topid > 0 && $issend == 1) { - $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); - } - $upquery = "UPDATE `#@__arctype` SET - issend='$issend', - sortrank='$sortrank', - typedir='$typedir', - typename='$typename', - isdefault='$isdefault', - defaultname='$defaultname', - ispart='$ispart', - corank='$corank' $uptopsql - WHERE id='$id' "; - if (!$dsql->ExecuteNoneQuery($upquery)) { - ShowMsg("保存当前栏目更改时失败,请检查您的输入资料是否存在问题", "-1"); - exit(); - } - UpDateCatCache(); - ShowMsg("成功更改一个分类", "catalog_main.php"); - exit(); -} -//读取栏目信息 -$dsql->SetQuery("SELECT tp.*,ch.typename as ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id"); -$myrow = $dsql->GetOne(); -$topid = $myrow['topid']; -if ($topid > 0) { - $toprow = $dsql->GetOne("SELECT moresite,siteurl,sitepath FROM `#@__arctype` WHERE id=$topid"); - foreach ($toprow as $k => $v) { - if (!preg_match("#[0-9]#", $k)) { - $myrow[$k] = $v; - } - } -} -$myrow['content'] = empty($myrow['content']) ? " " : $myrow['content']; -//读取频道模型信息 -$channelid = $myrow['channeltype']; -$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $channelArray[$row->id]['typename'] = $row->typename; - $channelArray[$row->id]['nid'] = $row->nid; - if ($row->id == $channelid) { - $nid = $row->nid; - } -} -PutCookie('lastCid', GetTopid($id), 3600 * 24, "/"); -if ($dopost == 'time') { -?> -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 当前是快捷编辑模式,您要修改更详细的参数,请使用高级模式 -
是否支持投稿: - - -
内容模型: - $arr) { - if ($k == $channelid) echo "{$arr['typename']} | {$arr['nid']}"; - } - ?> - 修改 -
栏目名称:
排列顺序: (由低 -> 高)
浏览权限: - (仅限制栏目里的文档浏览权限) -
文件保存目录:
栏目列表选项: - - -
默认页的名称:
栏目属性: -
-
- -
- - -
-
-ExecuteNoneQuery($upquery)) { + ShowMsg("保存当前栏目修改时失败,请检查您的输入资料是否存在问题", "-1"); + exit(); + } + //如果选择子栏目可投稿,更新顶级栏目为可投稿 + if ($topid > 0 && $issend == 1) { + $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); + } + $slinks = " id IN (".GetSonIds($id).")"; + //修改顶级栏目时强制修改下级的多站点支持属性 + if ($topid == 0 && preg_match("#,#", $slinks)) { + $upquery = "UPDATE `#@__arctype` SET moresite='$moresite', siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' WHERE 1=1 AND $slinks"; + $dsql->ExecuteNoneQuery($upquery); + } + //修改子栏目属性 + if (!empty($upnext)) { + $upquery = "UPDATE `#@__arctype` SET + issend='$issend', + defaultname='$defaultname', + channeltype='$channeltype', + tempindex='$tempindex', + templist='$templist', + temparticle='$temparticle', + namerule='$namerule', + namerule2='$namerule2', + ishidden='$ishidden' + WHERE 1=1 AND $slinks"; + if (!$dsql->ExecuteNoneQuery($upquery)) { + ShowMsg("修改当前栏目成功,但修改下级栏目属性时失败", "-1"); + exit(); + } + } + UpDateCatCache(); + ShowMsg("成功修改一个分类", "catalog_main.php"); + exit(); +} //End Save Action +else if ($dopost == "savetime") { + $uptopsql = ''; + $slinks = " id IN (".GetSonIds($id).")"; + //顶级栏目二级域名根目录处理 + if ($topid == 0 && $moresite == 1) { + $sitepath = $typedir; + $uptopsql = " ,sitepath='$sitepath' "; + if (preg_match("#,#", $slinks)) { + $upquery = "UPDATE `#@__arctype` SET sitepath='$sitepath' WHERE $slinks"; + $dsql->ExecuteNoneQuery($upquery); + } + } + //如果选择子栏目可投稿,更新顶级栏目为可投稿 + if ($topid > 0 && $issend == 1) { + $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); + } + $upquery = "UPDATE `#@__arctype` SET + issend='$issend', + sortrank='$sortrank', + typedir='$typedir', + typename='$typename', + isdefault='$isdefault', + defaultname='$defaultname', + ispart='$ispart', + corank='$corank' $uptopsql + WHERE id='$id' "; + if (!$dsql->ExecuteNoneQuery($upquery)) { + ShowMsg("保存当前栏目修改时失败,请检查您的输入资料是否存在问题", "-1"); + exit(); + } + UpDateCatCache(); + ShowMsg("成功修改一个分类", "catalog_main.php"); + exit(); +} +//读取栏目信息 +$dsql->SetQuery("SELECT tp.*,ch.typename as ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id"); +$myrow = $dsql->GetOne(); +$topid = $myrow['topid']; +if ($topid > 0) { + $toprow = $dsql->GetOne("SELECT moresite,siteurl,sitepath FROM `#@__arctype` WHERE id=$topid"); + foreach ($toprow as $k => $v) { + if (!preg_match("#[0-9]#", $k)) { + $myrow[$k] = $v; + } + } +} +$myrow['content'] = empty($myrow['content']) ? " " : $myrow['content']; +//读取频道模型信息 +$channelid = $myrow['channeltype']; +$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $channelArray[$row->id]['typename'] = $row->typename; + $channelArray[$row->id]['nid'] = $row->nid; + if ($row->id == $channelid) { + $nid = $row->nid; + } +} +PutCookie('lastCid', GetTopid($id), 3600 * 24, "/"); +if ($dopost == 'time') { +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
是否支持投稿: + + +
内容模型: + $arr) { + if ($k == $channelid) echo "{$arr['typename']} | {$arr['nid']}"; + } + ?> + 更多模型 +
栏目名称:
排列顺序: (由低 -> 高)
浏览权限: + (仅限制栏目里的文档浏览权限) +
文件保存目录:
栏目列表选项: + + + +
默认页的名称:
栏目属性: +
+
+ +
+ + +
+
+ \ No newline at end of file diff --git a/src/dede/catalog_main.php b/src/admin/catalog_main.php old mode 100755 new mode 100644 similarity index 76% rename from src/dede/catalog_main.php rename to src/admin/catalog_main.php index 974fd6ac..774d934b --- a/src/dede/catalog_main.php +++ b/src/admin/catalog_main.php @@ -1,15 +1,14 @@ -getUserChannel(); -include DedeInclude('templets/catalog_main.htm'); +getUserChannel(); +include DedeInclude('templets/catalog_main.htm'); \ No newline at end of file diff --git a/src/dede/catalog_menu.php b/src/admin/catalog_menu.php old mode 100755 new mode 100644 similarity index 89% rename from src/dede/catalog_menu.php rename to src/admin/catalog_menu.php index 18ac59ba..c1cf9797 --- a/src/dede/catalog_menu.php +++ b/src/admin/catalog_menu.php @@ -1,24 +1,23 @@ -getUserChannel(); -if (empty($opendir)) $opendir = -1; -if ($userChannel > 0) $opendir = $userChannel; - -if ($cuserLogin->adminStyle == 'dedecms') { - include DedeInclude('templets/catalog_menu.htm'); - exit(); -} else { - include DedeInclude('templets/catalog_menu2.htm'); - exit(); -} +getUserChannel(); +if (empty($opendir)) $opendir = -1; +if ($userChannel > 0) $opendir = $userChannel; + +if ($cuserLogin->adminStyle == 'dedecms') { + include DedeInclude('templets/catalog_menu.htm'); + exit(); +} else { + include DedeInclude('templets/catalog_menu2.htm'); + exit(); +} diff --git a/src/dede/config.php b/src/admin/config.php old mode 100755 new mode 100644 similarity index 78% rename from src/dede/config.php rename to src/admin/config.php index bca94e9f..a59a5e63 --- a/src/dede/config.php +++ b/src/admin/config.php @@ -9,14 +9,14 @@ * @link https://www.dedebiz.com */ define('DEDEADMIN', str_replace("\\", '/', dirname(__FILE__))); -require_once(DEDEADMIN . '/../include/common.inc.php'); -require_once(DEDEINC . '/userlogin.class.php'); +require_once(DEDEADMIN.'/../system/common.inc.php'); +require_once(DEDEINC.'/userlogin.class.php'); header('Cache-Control:private'); $dsql->safeCheck = FALSE; $dsql->SetLongLink(); $cfg_admin_skin = 1;//后台管理风格 -if (file_exists(DEDEDATA . '/admin/skin.txt')) { - $skin = file_get_contents(DEDEDATA . '/admin/skin.txt'); +if (file_exists(DEDEDATA.'/admin/skin.txt')) { + $skin = file_get_contents(DEDEDATA.'/admin/skin.txt'); $cfg_admin_skin = !in_array($skin, array(1, 2, 3, 4)) ? 1 : $skin; } //检查CSRF @@ -40,7 +40,7 @@ if (!isset($GLOBALS['csrf_token']) || $GLOBALS['csrf_token'] === null) { if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') { PutCookie('dede_csrf_token', $GLOBALS['csrf_token'], 7200, '/'); } -//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行更改这个选项 +//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行修改这个选项 $dedeNowurl = $s_scriptName = ''; $isUrlOpen = @ini_get('allow_url_fopen'); $dedeNowurl = GetCurUrl(); @@ -51,9 +51,9 @@ $cuserLogin = new userLogin(); if ($cuserLogin->getUserID() == -1) { if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { $dirname = dirname($_SERVER['SCRIPT_NAME']); - header("location:{$dirname}/login.php?gotopage=" . urlencode($dedeNowurl)); + header("location:{$dirname}/login.php?gotopage=".urlencode($dedeNowurl)); } else { - header("location:login.php?gotopage=" . urlencode($dedeNowurl)); + header("location:login.php?gotopage=".urlencode($dedeNowurl)); } exit(); } @@ -76,19 +76,22 @@ if ($cfg_dede_log == 'Y') { $s_scriptNames = explode('/', $s_scriptName); $s_scriptNames = $s_scriptNames[count($s_scriptNames) - 1]; $s_userip = GetIP(); - if ($s_method == 'POST' || (!preg_match("#" . $s_nologfile . "#i", $s_scriptNames) && $s_query != '') || preg_match("#" . $s_needlogfile . "#i", $s_scriptNames)) { + if ($s_method == 'POST' || (!preg_match("#".$s_nologfile."#i", $s_scriptNames) && $s_query != '') || preg_match("#".$s_needlogfile."#i", $s_scriptNames)) { $inquery = "INSERT INTO `#@__log`(adminid,filename,method,query,cip,dtime) - VALUES ('" . $cuserLogin->getUserID() . "','{$s_scriptNames}','{$s_method}','" . addslashes($s_query) . "','{$s_userip}','" . time() . "');"; + VALUES ('".$cuserLogin->getUserID()."','{$s_scriptNames}','{$s_method}','".addslashes($s_query)."','{$s_userip}','".time()."');"; $dsql->ExecuteNoneQuery($inquery); } } +if (file_exists(DEDEDATA."/downmix.data.php")) { + rename(DEDEDATA."/downmix.data.php",DEDEDATA."/downmix.data.inc"); +} //管理缓存管理员频道缓存 -$cache1 = DEDEDATA . '/cache/inc_catalog_base.inc'; +$cache1 = DEDEDATA.'/cache/inc_catalog_base.inc'; if (!file_exists($cache1)) UpDateCatCache(); -$cacheFile = DEDEDATA . '/cache/admincat_' . $cuserLogin->userID . '.inc'; +$cacheFile = DEDEDATA.'/cache/admincat_'.$cuserLogin->userID.'.inc'; if (file_exists($cacheFile)) require_once($cacheFile); //更新服务器 -require_once(DEDEDATA . '/admin/config_update.php'); +require_once(DEDEDATA.'/admin/config_update.php'); if (strlen($cfg_cookie_encode) <= 10) { $chars = 'abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789'; $hash = ''; @@ -98,25 +101,25 @@ if (strlen($cfg_cookie_encode) <= 10) { $hash .= $chars[mt_rand(0, $max)]; } $dsql->ExecuteNoneQuery("UPDATE `#@__sysconfig` SET `value`='{$hash}' WHERE varname='cfg_cookie_encode' "); - $configfile = DEDEDATA . '/config.cache.inc.php'; + $configfile = DEDEDATA.'/config.cache.inc.php'; if (!is_writeable($configfile)) { echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数"; exit(); } $fp = fopen($configfile, 'w'); flock($fp, 3); - fwrite($fp, "<" . "?php\r\n"); + fwrite($fp, "<"."?php\r\n"); $dsql->SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC "); $dsql->Execute(); while ($row = $dsql->GetArray()) { if ($row['type'] == 'number') { if ($row['value'] == '') $row['value'] = 0; - fwrite($fp, "\${$row['varname']} = " . $row['value'] . ";\r\n"); + fwrite($fp, "\${$row['varname']} = ".$row['value'].";\r\n"); } else { - fwrite($fp, "\${$row['varname']} = '" . str_replace("'", '', $row['value']) . "';\r\n"); + fwrite($fp, "\${$row['varname']} = '".str_replace("'", '', $row['value'])."';\r\n"); } } - fwrite($fp, "?" . ">"); + fwrite($fp, "?".">"); fclose($fp); } /** @@ -128,8 +131,8 @@ if (strlen($cfg_cookie_encode) <= 10) { function UpDateCatCache() { global $dsql, $cache1, $cuserLogin; - $cache2 = DEDEDATA . '/cache/channelsonlist.inc'; - $cache3 = DEDEDATA . '/cache/channeltoplist.inc'; + $cache2 = DEDEDATA.'/cache/channelsonlist.inc'; + $cache3 = DEDEDATA.'/cache/channeltoplist.inc'; $dsql->SetQuery("SELECT id,reid,channeltype,issend,typename FROM `#@__arctype`"); $dsql->Execute(); $fp1 = fopen($cache1, 'w'); @@ -150,8 +153,8 @@ function UpDateCatCache() //清空选项缓存 function ClearOptCache() { - $tplCache = DEDEDATA . '/tplcache/'; - $fileArray = glob($tplCache . "inc_option_*.inc"); + $tplCache = DEDEDATA.'/tplcache/'; + $fileArray = glob($tplCache."inc_option_*.inc"); if (count($fileArray) > 1) { foreach ($fileArray as $key => $value) { if (file_exists($value)) unlink($value); @@ -171,7 +174,7 @@ function ClearOptCache() */ function DedeInclude($filename, $isabs = FALSE) { - return $isabs ? $filename : DEDEADMIN . '/' . $filename; + return $isabs ? $filename : DEDEADMIN.'/'.$filename; } /** * 根据用户mid获取用户名称 diff --git a/src/dede/content_att.php b/src/admin/content_att.php old mode 100755 new mode 100644 similarity index 89% rename from src/dede/content_att.php rename to src/admin/content_att.php index 15a86bef..c660ad9c --- a/src/dede/content_att.php +++ b/src/admin/content_att.php @@ -1,30 +1,27 @@ -ExecuteNoneQuery($query); - } - echo ""; -} - -include DedeInclude('templets/content_att.htm'); +ExecuteNoneQuery($query); + } + echo ""; +} +include DedeInclude('templets/content_att.htm'); \ No newline at end of file diff --git a/src/dede/content_batch_up.php b/src/admin/content_batch_up.php old mode 100755 new mode 100644 similarity index 75% rename from src/dede/content_batch_up.php rename to src/admin/content_batch_up.php index 0d5cd4f7..fd4dae6d --- a/src/dede/content_batch_up.php +++ b/src/admin/content_batch_up.php @@ -1,14 +1,13 @@ - 0) $gwhere .= " AND id>= $startid "; -if ($endid > $startid) $gwhere .= " AND id<= $endid "; -$idsql = ''; - -if ($typeid != 0) { - $ids = GetSonIds($typeid); - $gwhere .= " AND typeid IN($ids) "; -} -if ($seltime == 1) { - $t1 = GetMkTime($starttime); - $t2 = GetMkTime($endtime); - $gwhere .= " AND (senddate >= $t1 AND senddate <= $t2) "; -} -if (!empty($userid)) { - $row = $dsql->GetOne("SELECT `mid` FROM #@__member WHERE `userid` LIKE '$userid'"); - if (is_array($row)) { - $gwhere .= " AND mid = {$row['mid']} "; - } -} -//特殊操作 -if (!empty($heightdone)) $action = $heightdone; - -//指量审核 -if ($action == 'check') { - if (empty($startid) || empty($endid) || $endid < $startid) { - ShowMsg('该操作必须指定起始ID', 'javascript:;'); - exit(); - } - $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; - $jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; - $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); - $dsql->SetQuery("SELECT id,arcrank FROM `#@__arctiny` $gwhere"); - $dsql->Execute('c'); - while ($row = $dsql->GetObject('c')) { - if ($row->arcrank == -1) { - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank=0 WHERE id='{$row->id}'"); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank=0 WHERE id='{$row->id}'"); - } - } - ShowMsg("完成数据库的审核处理,准备更新HTML...", $jumpurl); - exit(); -} -//批量删除 -else if ($action == 'del') { - if (empty($startid) || empty($endid) || $endid < $startid) { - ShowMsg('该操作必须指定起始ID', 'javascript:;'); - exit(); - } - $dsql->SetQuery("SELECT id FROM `#@__archives` $gwhere"); - $dsql->Execute('x'); - $tdd = 0; - while ($row = $dsql->GetObject('x')) { - if (DelArc($row->id)) $tdd++; - } - ShowMsg("成功删除 $tdd 条记录", "javascript:;"); - exit(); -} -//删除空标题文档 -else if ($action == 'delnulltitle') { - $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE trim(title)='' "); - $dsql->Execute('x'); - $tdd = 0; - while ($row = $dsql->GetObject('x')) { - if (DelArc($row->id)) $tdd++; - } - ShowMsg("成功删除 $tdd 条记录", "javascript:;"); - exit(); -} -//删除空内容文章 -else if ($action == 'delnullbody') { - $dsql->SetQuery("SELECT aid FROM `#@__addonarticle` WHERE LENGTH(body) < 10 "); - $dsql->Execute('x'); - $tdd = 0; - while ($row = $dsql->GetObject('x')) { - if (DelArc($row->aid)) $tdd++; - } - ShowMsg("成功删除 $tdd 条记录", "javascript:;"); - exit(); -} -//修正缩略图错误 -else if ($action == 'modddpic') { - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET litpic='' WHERE trim(litpic)='litpic' "); - ShowMsg("成功修正缩略图错误", "javascript:;"); - exit(); -} -//批量移动 -else if ($action == 'move') { - if (empty($typeid)) { - ShowMsg('该操作必须指定栏目', 'javascript:;'); - exit(); - } - $typeold = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$typeid'; "); - $typenew = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$newtypeid'; "); - if (!is_array($typenew)) { - ShowMsg("无法检测移动到的新栏目的信息,不能完成操作", "javascript:;"); - exit(); - } - if ($typenew['ispart'] != 0) { - ShowMsg("您不能把数据移动到非最终列表的栏目", "javascript:;"); - exit(); - } - if ($typenew['channeltype'] != $typeold['channeltype']) { - ShowMsg("不能把数据移动到内容类型不同的栏目", "javascript:;"); - exit(); - } - $gwhere .= " And channel='".$typenew['channeltype']."' And title like '%$keyword%'"; - - $ch = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id={$typenew['channeltype']} "); - $addtable = $ch['addtable']; - - $dsql->SetQuery("SELECT id FROM `#@__archives` $gwhere"); - $dsql->Execute('m'); - $tdd = 0; - while ($row = $dsql->GetObject('m')) { - $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$newtypeid' WHERE id='{$row->id}'"); - $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid='$newtypeid' WHERE id='{$row->id}'"); - if ($addtable != '') { - $dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$newtypeid' WHERE aid='{$row->id}' "); - } - if ($rs) $tdd++; - //DelArc($row->id,true); - } - - if ($tdd > 0) { - $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; - $jumpurl .= "&typeid=$newtypeid&pagesize=20&seltime=$seltime"; - $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); - ShowMsg("成功移动 $tdd 条记录,准备重新生成HTML...", $jumpurl); - } else { - ShowMsg("完成操作,没移动任何数据...", "javascript:;"); - } -} -//删除空标题内容 -else if ($action == 'delnulltitle') { - $dsql->SetQuery("SELECT id FROM #@__archives WHERE trim(title)='' "); - $dsql->Execute('x'); - $tdd = 0; - while ($row = $dsql->GetObject('x')) { - if (DelArc($row->id)) $tdd++; - } - ShowMsg("成功删除 $tdd 条记录", "javascript:;"); - exit(); -} -//修正缩略图错误 -else if ($action == 'modddpic') { - $dsql->ExecuteNoneQuery("UPDATE #@__archives SET litpic='' WHERE trim(litpic)='litpic' "); - ShowMsg("成功修正缩略图错误", "javascript:;"); - exit(); -} + 0) $gwhere .= " AND id>= $startid "; +if ($endid > $startid) $gwhere .= " AND id<= $endid "; +$idsql = ''; +if ($typeid != 0) { + $ids = GetSonIds($typeid); + $gwhere .= " AND typeid IN($ids) "; +} +if ($seltime == 1) { + $t1 = GetMkTime($starttime); + $t2 = GetMkTime($endtime); + $gwhere .= " AND (senddate >= $t1 AND senddate <= $t2) "; +} +if (!empty($userid)) { + $row = $dsql->GetOne("SELECT `mid` FROM #@__member WHERE `userid` LIKE '$userid'"); + if (is_array($row)) { + $gwhere .= " AND mid = {$row['mid']} "; + } +} +//特殊操作 +if (!empty($heightdone)) $action = $heightdone; +//指量审核 +if ($action == 'check') { + if (empty($startid) || empty($endid) || $endid < $startid) { + ShowMsg('该操作必须指定起始ID', 'javascript:;'); + exit(); + } + $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; + $jumpurl .= "&typeid=$typeid&pagesize=20&seltime=$seltime"; + $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); + $dsql->SetQuery("SELECT id,arcrank FROM `#@__arctiny` $gwhere"); + $dsql->Execute('c'); + while ($row = $dsql->GetObject('c')) { + if ($row->arcrank == -1) { + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank=0 WHERE id='{$row->id}'"); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank=0 WHERE id='{$row->id}'"); + } + } + ShowMsg("完成数据库的审核处理,准备更新HTML", $jumpurl); + exit(); +} +//批量删除 +else if ($action == 'del') { + if (empty($startid) || empty($endid) || $endid < $startid) { + ShowMsg('该操作必须指定起始ID', 'javascript:;'); + exit(); + } + $dsql->SetQuery("SELECT id FROM `#@__archives` $gwhere"); + $dsql->Execute('x'); + $tdd = 0; + while ($row = $dsql->GetObject('x')) { + if (DelArc($row->id)) $tdd++; + } + ShowMsg("成功删除 $tdd 条记录", "javascript:;"); + exit(); +} +//删除空标题文档 +else if ($action == 'delnulltitle') { + $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE trim(title)='' "); + $dsql->Execute('x'); + $tdd = 0; + while ($row = $dsql->GetObject('x')) { + if (DelArc($row->id)) $tdd++; + } + ShowMsg("成功删除 $tdd 条记录", "javascript:;"); + exit(); +} +//删除空内容文章 +else if ($action == 'delnullbody') { + $dsql->SetQuery("SELECT aid FROM `#@__addonarticle` WHERE LENGTH(body) < 10 "); + $dsql->Execute('x'); + $tdd = 0; + while ($row = $dsql->GetObject('x')) { + if (DelArc($row->aid)) $tdd++; + } + ShowMsg("成功删除 $tdd 条记录", "javascript:;"); + exit(); +} +//修正缩略图错误 +else if ($action == 'modddpic') { + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET litpic='' WHERE trim(litpic)='litpic' "); + ShowMsg("成功修正缩略图错误", "javascript:;"); + exit(); +} +//批量移动 +else if ($action == 'move') { + if (empty($typeid)) { + ShowMsg('该操作必须指定栏目', 'javascript:;'); + exit(); + } + $typeold = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$typeid'; "); + $typenew = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$newtypeid'; "); + if (!is_array($typenew)) { + ShowMsg("无法检测移动到的新栏目的信息,不能完成操作", "javascript:;"); + exit(); + } + if ($typenew['ispart'] != 0) { + ShowMsg("您不能把数据移动到非最终列表的栏目", "javascript:;"); + exit(); + } + if ($typenew['channeltype'] != $typeold['channeltype']) { + ShowMsg("不能把数据移动到内容类型不同的栏目", "javascript:;"); + exit(); + } + $gwhere .= " And channel='".$typenew['channeltype']."' And title like '%$keyword%'"; + + $ch = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id={$typenew['channeltype']} "); + $addtable = $ch['addtable']; + + $dsql->SetQuery("SELECT id FROM `#@__archives` $gwhere"); + $dsql->Execute('m'); + $tdd = 0; + while ($row = $dsql->GetObject('m')) { + $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$newtypeid' WHERE id='{$row->id}'"); + $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid='$newtypeid' WHERE id='{$row->id}'"); + if ($addtable != '') { + $dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$newtypeid' WHERE aid='{$row->id}' "); + } + if ($rs) $tdd++; + //DelArc($row->id,true); + } + if ($tdd > 0) { + $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; + $jumpurl .= "&typeid=$newtypeid&pagesize=20&seltime=$seltime"; + $jumpurl .= "&stime=".urlencode($starttime)."&etime=".urlencode($endtime); + ShowMsg("成功移动 $tdd 条记录,准备重新生成HTML", $jumpurl); + } else { + ShowMsg("完成操作,没移动任何数据", "javascript:;"); + } +} +//删除空标题内容 +else if ($action == 'delnulltitle') { + $dsql->SetQuery("SELECT id FROM #@__archives WHERE trim(title)='' "); + $dsql->Execute('x'); + $tdd = 0; + while ($row = $dsql->GetObject('x')) { + if (DelArc($row->id)) $tdd++; + } + ShowMsg("成功删除 $tdd 条记录", "javascript:;"); + exit(); +} +//修正缩略图错误 +else if ($action == 'modddpic') { + $dsql->ExecuteNoneQuery("UPDATE #@__archives SET litpic='' WHERE trim(litpic)='litpic' "); + ShowMsg("成功修正缩略图错误", "javascript:;"); + exit(); +} \ No newline at end of file diff --git a/src/dede/content_i_list.php b/src/admin/content_i_list.php old mode 100755 new mode 100644 similarity index 84% rename from src/dede/content_i_list.php rename to src/admin/content_i_list.php index e9444ce1..909436b8 --- a/src/dede/content_i_list.php +++ b/src/admin/content_i_list.php @@ -1,13 +1,12 @@ -getUserID(); -} - -$adminid = $cuserLogin->getUserID(); -$maintable = '#@__archives'; -setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); -$tl = new TypeLink($cid); - -//---------------------------------------- -//在不指定排序条件和关键字的情况下直接统计微表 -//---------------------------------------- -if (empty($totalresult) && empty($keyword) && empty($orderby) && empty($flag)) { - $tinyQuerys = array(); - - if (!empty($userCatalogSql)) { - $tinyQuerys[] = str_replace('arc.', '', $userCatalogSql); - } - - if (!empty($channelid) && empty($cid)) { - $tinyQuerys[] = " channel = '$channelid' "; - } else { - $tinyQuerys[] = " channel>0 "; - } - - if (!empty($arcrank)) { - $tinyQuerys[] = " arcrank='$arcrank' "; - } else { - $tinyQuerys[] = " arcrank > -2 "; - } - - if (!empty($mid)) { - $tinyQuerys[] = " mid='$mid' "; - } - - if (!empty($cid)) { - $tinyQuerys[] = " typeid in(".GetSonIds($cid).") "; - } - - if (count($tinyQuerys) > 0) { - $tinyQuery = "WHERE ".join(' AND ', $tinyQuerys); - } - // 缓存处理 - $sql = "SELECT COUNT(*) AS dd FROM `#@__arctiny` $tinyQuery "; - $arr = $dsql->GetOne($sql); - $totalresult = $arr['dd']; -} - -if ($cid == 0) { - if ($channelid == 0) { - $positionname = '所有栏目>'; - } else { - $row = $tl->dsql->GetOne("SELECT id,typename,maintable FROM `#@__channeltype` WHERE id='$channelid'"); - $positionname = $row['typename']." > "; - $maintable = $row['maintable']; - $channelid = $row['id']; - } -} else { - $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; -} - -//当选择的是单表模型栏目时,直接跳转到单表模型管理区 -if ( - empty($channelid) - && isset($tl->TypeInfos['channeltype']) -) { - $channelid = $tl->TypeInfos['channeltype']; -} -if ($channelid < -1) { - header("location:content_sg_list.php?f=$f&cid=$cid&channelid=$channelid&keyword=$keyword"); - exit(); -} - - -// 栏目大于800则需要缓存数据 -$optHash = md5($cid.serialize($admin_catalogs).$channelid); -$optCache = DEDEDATA."/tplcache/inc_option_$optHash.inc"; - -$typeCount = 0; -if (file_exists($cache1)) require_once($cache1); -else $cfg_Cs = array(); -$typeCount = count($cfg_Cs); -if ($typeCount > 800) { - if (file_exists($optCache)) { - $optionarr = file_get_contents($optCache); - } else { - $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); - file_put_contents($optCache, $optionarr); - } -} else { - $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); -} - -$whereSql = empty($channelid) ? " WHERE arc.channel > 0 AND arc.arcrank > -2 " : " WHERE arc.channel = '$channelid' AND arc.arcrank > -2 "; - -$flagsArr = ''; -$dsql->Execute('f', 'SELECT * FROM `#@__arcatt` ORDER BY sortid ASC'); -while ($frow = $dsql->GetArray('f')) { - $flagsArr .= ($frow['att'] == $flag ? "\r\n" : "\r\n"); -} - - -if (!empty($userCatalogSql)) { - $whereSql .= " AND ".$userCatalogSql; -} -if (!empty($mid)) { - $whereSql .= " AND arc.mid = '$mid' "; -} -if ($keyword != '') { - $whereSql .= " AND ( CONCAT(arc.title,arc.writer) LIKE '%$keyword%') "; -} -if ($flag != '') { - $whereSql .= " AND FIND_IN_SET('$flag', arc.flag) "; -} -if ($cid != 0) { - $whereSql .= ' AND arc.typeid IN ('.GetSonIds($cid).')'; -} -if ($arcrank != '') { - $whereSql .= " AND arc.arcrank = '$arcrank' "; - $CheckUserSend = ""; -} else { - $CheckUserSend = ""; -} - -$orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z0-9]#", "", $orderby); -$orderbyField = 'arc.'.$orderby; - -$query = "SELECT arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake, -arc.channel,arc.arcrank,arc.click,arc.title,arc.color,arc.litpic,arc.pubdate,arc.mid -FROM `$maintable` arc -$whereSql -ORDER BY $orderbyField DESC"; - -if (empty($f) || !preg_match("#form#", $f)) $f = 'form1.arcid1'; - -//初始化 -$dlist = new DataListCP(); -$dlist->pageSize = 30; - -//GET参数 -$dlist->SetParameter('dopost', 'listArchives'); -$dlist->SetParameter('keyword', $keyword); -if (!empty($mid)) $dlist->SetParameter('mid', $mid); -$dlist->SetParameter('cid', $cid); -$dlist->SetParameter('flag', $flag); -$dlist->SetParameter('orderby', $orderby); -$dlist->SetParameter('arcrank', $arcrank); -$dlist->SetParameter('channelid', $channelid); -$dlist->SetParameter('f', $f); - -//模板 -if (empty($s_tmplets)) $s_tmplets = 'templets/content_list.htm'; -$dlist->SetTemplate(DEDEADMIN.'/'.$s_tmplets); - -//查询 -$dlist->SetSource($query); - -//显示 -$dlist->Display(); -// echo $dlist->queryTime; -$dlist->Close(); +getUserID(); +} + +$adminid = $cuserLogin->getUserID(); +$maintable = '#@__archives'; +setcookie('ENV_GOBACK_URL', $dedeNowurl, time() + 3600, '/'); +$tl = new TypeLink($cid); +//在不指定排序条件和关键词的情况下直接统计微表 +if (empty($totalresult) && empty($keyword) && empty($orderby) && empty($flag)) { + $tinyQuerys = array(); + if (!empty($userCatalogSql)) { + $tinyQuerys[] = str_replace('arc.', '', $userCatalogSql); + } + if (!empty($channelid) && empty($cid)) { + $tinyQuerys[] = " channel = '$channelid' "; + } else { + $tinyQuerys[] = " channel>0 "; + } + if (!empty($arcrank)) { + $tinyQuerys[] = " arcrank='$arcrank' "; + } else { + $tinyQuerys[] = " arcrank > -2 "; + } + if (!empty($mid)) { + $tinyQuerys[] = " mid='$mid' "; + } + if (!empty($cid)) { + $tinyQuerys[] = " typeid in(".GetSonIds($cid).") "; + } + if (count($tinyQuerys) > 0) { + $tinyQuery = "WHERE ".join(' AND ', $tinyQuerys); + } + //缓存处理 + $sql = "SELECT COUNT(*) AS dd FROM `#@__arctiny` $tinyQuery "; + $arr = $dsql->GetOne($sql); + $totalresult = $arr['dd']; +} +if ($cid == 0) { + if ($channelid == 0) { + $positionname = '所有栏目>'; + } else { + $row = $tl->dsql->GetOne("SELECT id,typename,maintable FROM `#@__channeltype` WHERE id='$channelid'"); + $positionname = $row['typename']." > "; + $maintable = $row['maintable']; + $channelid = $row['id']; + } +} else { + $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; +} +//当选择的是单表模型栏目时,直接跳转到单表模型管理区 +if ( + empty($channelid) + && isset($tl->TypeInfos['channeltype']) +) { + $channelid = $tl->TypeInfos['channeltype']; +} +if ($channelid < -1) { + header("location:content_sg_list.php?f=$f&cid=$cid&channelid=$channelid&keyword=$keyword"); + exit(); +} +//栏目大于800则需要缓存数据 +$optHash = md5($cid.serialize($admin_catalogs).$channelid); +$optCache = DEDEDATA."/tplcache/inc_option_$optHash.inc"; +$typeCount = 0; +if (file_exists($cache1)) require_once($cache1); +else $cfg_Cs = array(); +$typeCount = count($cfg_Cs); +if ($typeCount > 800) { + if (file_exists($optCache)) { + $optionarr = file_get_contents($optCache); + } else { + $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); + file_put_contents($optCache, $optionarr); + } +} else { + $optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); +} +$whereSql = empty($channelid) ? " WHERE arc.channel > 0 AND arc.arcrank > -2 " : " WHERE arc.channel = '$channelid' AND arc.arcrank > -2 "; +$flagsArr = ''; +$dsql->Execute('f', 'SELECT * FROM `#@__arcatt` ORDER BY sortid ASC'); +while ($frow = $dsql->GetArray('f')) { + $flagsArr .= ($frow['att'] == $flag ? "\r\n" : "\r\n"); +} +if (!empty($userCatalogSql)) { + $whereSql .= " AND ".$userCatalogSql; +} +if (!empty($mid)) { + $whereSql .= " AND arc.mid = '$mid' "; +} +if ($keyword != '') { + $whereSql .= " AND ( CONCAT(arc.title,arc.writer) LIKE '%$keyword%') "; +} +if ($flag != '') { + $whereSql .= " AND FIND_IN_SET('$flag', arc.flag) "; +} +if ($cid != 0) { + $whereSql .= ' AND arc.typeid IN ('.GetSonIds($cid).')'; +} +if ($arcrank != '') { + $whereSql .= " AND arc.arcrank = '$arcrank' "; + $CheckUserSend = ""; +} else { + $CheckUserSend = ""; +} +$orderby = empty($orderby) ? 'id' : preg_replace("#[^a-z0-9]#", "", $orderby); +$orderbyField = 'arc.'.$orderby; +$query = "SELECT arc.id,arc.typeid,arc.senddate,arc.flag,arc.ismake, +arc.channel,arc.arcrank,arc.click,arc.title,arc.color,arc.litpic,arc.pubdate,arc.mid +FROM `$maintable` arc +$whereSql +ORDER BY $orderbyField DESC"; +if (empty($f) || !preg_match("#form#", $f)) $f = 'form1.arcid1'; +//初始化 +$dlist = new DataListCP(); +$dlist->pageSize = 40; +//GET参数 +$dlist->SetParameter('dopost', 'listArchives'); +$dlist->SetParameter('keyword', $keyword); +if (!empty($mid)) $dlist->SetParameter('mid', $mid); +$dlist->SetParameter('cid', $cid); +$dlist->SetParameter('flag', $flag); +$dlist->SetParameter('orderby', $orderby); +$dlist->SetParameter('arcrank', $arcrank); +$dlist->SetParameter('channelid', $channelid); +$dlist->SetParameter('f', $f); +//模板 +if (empty($s_tmplets)) $s_tmplets = 'templets/content_list.htm'; +$dlist->SetTemplate(DEDEADMIN.'/'.$s_tmplets); +//查询 +$dlist->SetSource($query); +//显示 +$dlist->Display(); +$dlist->Close(); \ No newline at end of file diff --git a/src/dede/content_s_list.php b/src/admin/content_s_list.php old mode 100755 new mode 100644 similarity index 86% rename from src/dede/content_s_list.php rename to src/admin/content_s_list.php index 75cb8ec2..048d28c7 --- a/src/dede/content_s_list.php +++ b/src/admin/content_s_list.php @@ -1,16 +1,15 @@ -getUserChannel(); - } else { - CheckCatalog($cid, "您无权浏览非指定栏目的内容"); - } -} - -$adminid = $cuserLogin->getUserID(); -$maintable = '#@__archives'; -require_once(DEDEINC."/typelink.class.php"); -require_once(DEDEINC."/datalistcp.class.php"); -require_once(DEDEADMIN."/inc/inc_list_functions.php"); -setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); -$tl = new TypeLink($cid); -$listtable = @trim($tl->TypeInfos['addtable']); -if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $channelid) { - ShowMsg('您没权限访问此页', 'javascript:;'); - exit(); -} - -if ($cid == 0) { - $row = $tl->dsql->GetOne("SELECT typename,addtable FROM `#@__channeltype` WHERE id='$channelid'"); - $positionname = $row['typename']." > "; - $listtable = $row['addtable']; -} else { - $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; -} - -$optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); -$whereSql = $channelid == 0 ? " WHERE arc.channel < -1 " : " WHERE arc.channel = '$channelid' "; - -if (!empty($mid)) $whereSql .= " AND arc.mid = '$mid' "; -if ($keyword != '') $whereSql .= " AND (arc.title like '%$keyword%') "; -if ($cid != 0) $whereSql .= " AND arc.typeid in (".GetSonIds($cid).")"; - -if ($arcrank != '') { - $whereSql .= " AND arc.arcrank = '$arcrank' "; - $CheckUserSend = ""; -} else { - $CheckUserSend = ""; -} - -$query = "SELECT arc.aid,arc.aid as id,arc.typeid,arc.arcrank,arc.flag,arc.senddate,arc.channel,arc.title,arc.mid,arc.click,tp.typename,ch.typename as channelname -FROM `$listtable` arc -LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid -LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel -$whereSql -ORDER BY arc.aid DESC"; -$dlist = new DataListCP(); -$dlist->pageSize = 20; -$dlist->SetParameter("dopost", "listArchives"); -$dlist->SetParameter("keyword", $keyword); -$dlist->SetParameter("cid", $cid); -$dlist->SetParameter("channelid", $channelid); -$dlist->SetTemplate(DEDEADMIN."/templets/content_sg_list.htm"); -$dlist->SetSource($query); -$dlist->Display(); -$dlist->Close(); +getUserChannel(); + } else { + CheckCatalog($cid, "您无权浏览非指定栏目的内容"); + } +} +$adminid = $cuserLogin->getUserID(); +$maintable = '#@__archives'; +require_once(DEDEINC."/typelink/typelink.class.php"); +require_once(DEDEINC."/datalistcp.class.php"); +require_once(DEDEADMIN."/inc/inc_list_functions.php"); +setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); +$tl = new TypeLink($cid); +$listtable = @trim($tl->TypeInfos['addtable']); +if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $channelid) { + ShowMsg('您没权限访问此页', 'javascript:;'); + exit(); +} +if ($cid == 0) { + $row = $tl->dsql->GetOne("SELECT typename,addtable FROM `#@__channeltype` WHERE id='$channelid'"); + $positionname = $row['typename']." > "; + $listtable = $row['addtable']; +} else { + $positionname = str_replace($cfg_list_symbol, " > ", $tl->GetPositionName())." > "; +} +$optionarr = $tl->GetOptionArray($cid, $admin_catalogs, $channelid); +$whereSql = $channelid == 0 ? " WHERE arc.channel < -1 " : " WHERE arc.channel = '$channelid' "; +if (!empty($mid)) $whereSql .= " AND arc.mid = '$mid' "; +if ($keyword != '') $whereSql .= " AND (arc.title like '%$keyword%') "; +if ($cid != 0) $whereSql .= " AND arc.typeid in (".GetSonIds($cid).")"; +if ($arcrank != '') { + $whereSql .= " AND arc.arcrank = '$arcrank' "; + $CheckUserSend = ""; +} else { + $CheckUserSend = ""; +} +$query = "SELECT arc.aid,arc.aid as id,arc.typeid,arc.arcrank,arc.flag,arc.senddate,arc.channel,arc.title,arc.mid,arc.click,tp.typename,ch.typename as channelname +FROM `$listtable` arc +LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid +LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel +$whereSql +ORDER BY arc.aid DESC"; +$dlist = new DataListCP(); +$dlist->pageSize = 20; +$dlist->SetParameter("dopost", "listArchives"); +$dlist->SetParameter("keyword", $keyword); +$dlist->SetParameter("cid", $cid); +$dlist->SetParameter("channelid", $channelid); +$dlist->SetTemplate(DEDEADMIN."/templets/content_sg_list.htm"); +$dlist->SetSource($query); +$dlist->Display(); +$dlist->Close(); \ No newline at end of file diff --git a/src/dede/content_tj.php b/src/admin/content_tj.php old mode 100755 new mode 100644 similarity index 85% rename from src/dede/content_tj.php rename to src/admin/content_tj.php index a1df8f24..27a31ced --- a/src/dede/content_tj.php +++ b/src/admin/content_tj.php @@ -1,51 +1,49 @@ -GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); -$row2 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__feedback` "); -$row3 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__member` "); - -/** - * 获取文档 - * - * @param object $dsql - * @param string $ordertype 排序类型 - * @return string - */ -function GetArchives($dsql, $ordertype) -{ - $starttime = time() - (24 * 3600 * 30); - if ($ordertype == 'monthFeedback' || $ordertype == 'monthHot') { - $swhere = " where senddate>$starttime "; - } else { - $swhere = ""; - } - if (preg_match("#feedback#", $ordertype)) { - $ordersql = " ORDER BY scores DESC "; - } else { - $ordersql = " ORDER BY click DESC "; - } - $query = "SELECT id,title,click,scores FROM `#@__archives` $swhere $ordersql LIMIT 0,20 "; - $dsql->SetQuery($query); - $dsql->Execute('ga'); - while ($row = $dsql->GetObject('ga')) { - if (preg_match("#feedback#i", $ordertype)) { - $moreinfo = "[id}'>评论:{$row->scores}]"; - } else { - $moreinfo = "[点击:{$row->click}]"; - } - echo "·"; - echo cn_substr($row->title, 30)."{$moreinfo}
\r\n"; - } -} -include DedeInclude('templets/content_tj.htm'); +GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` "); +$row2 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__feedback` "); +$row3 = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__member` "); +/** + * 获取文档 + * + * @param object $dsql + * @param string $ordertype 排序类型 + * @return string + */ +function GetArchives($dsql, $ordertype) +{ + $starttime = time() - (24 * 3600 * 30); + if ($ordertype == 'monthFeedback' || $ordertype == 'monthHot') { + $swhere = " where senddate>$starttime "; + } else { + $swhere = ""; + } + if (preg_match("#feedback#", $ordertype)) { + $ordersql = " ORDER BY scores DESC "; + } else { + $ordersql = " ORDER BY click DESC "; + } + $query = "SELECT id,title,click,scores FROM #@__archives $swhere $ordersql LIMIT 0,20 "; + $dsql->SetQuery($query); + $dsql->Execute('ga'); + while ($row = $dsql->GetObject('ga')) { + if (preg_match("#feedback#i", $ordertype)) { + $moreinfo = "[id}'>评论:{$row->scores}]"; + } else { + $moreinfo = "[点击:{$row->click}]"; + } + echo "·"; + echo cn_substr($row->title, 30)."{$moreinfo}
\r\n"; + } +} +include DedeInclude('templets/content_tj.htm'); \ No newline at end of file diff --git a/src/dede/css/albumupload.css b/src/admin/css/albumupload.css similarity index 53% rename from src/dede/css/albumupload.css rename to src/admin/css/albumupload.css index 70f2cae4..757ecd2f 100644 --- a/src/dede/css/albumupload.css +++ b/src/admin/css/albumupload.css @@ -1 +1 @@ -div.flash{margin:10px 5px;width:375px;border-color:#D9E4FF;border-radius:.2rem}#btnSubmit{margin:0 0 0 155px}.progressWrapper{width:357px;overflow:hidden}.progressContainer{padding:4px;margin:5px;background-color:#f8f8f8;border:solid 1px #E8E8E8;overflow:hidden}.message{margin:10px 0;padding:10px 20px;background-color:#FFC;border:solid 1px #FD9;overflow:hidden}.red{background-color:#FFEBEB;border:solid 1px #B50000}.green{background-color:#EBFFEB;border:solid 1px #DDF0DD}.blue{background-color:#F0F5FF;border:solid 1px #CEE2F2}.progressName{width:320px;height:14px;text-align:left;white-space:nowrap;overflow:hidden}.progressBarInProgress,.progressBarComplete,.progressBarError{margin-top:2px;width:0;height:2px;font-size:0;background-color:blue}.progressBarComplete{width:100%;background-color:green;visibility:hidden}.progressBarError{width:100%;background-color:red;visibility:hidden}.progressBarStatus{margin-top:2px;width:340px;text-align:left;white-space:nowrap}a.progressCancel{font-size:0;display:block;height:14px;width:14px;background-image:url(../images/cancelbutton.gif);background-repeat:no-repeat;background-position:-14px 0;float:right}a.progressCancel:hover{background-position:0 0}.swfupload{vertical-align:top}.albCt{float:left;width:240px;height:180px;margin-right:10px;margin-bottom:10px;border:1px dashed #eee;background:#f8f8f8;text-align:center;padding:10px}.albEdit{height:180px}.picinfo{height:30px;line-height:30px;margin:10px 0}.thumbnails img,.thumbnailsEdit img{margin:5px}.albCt img{height:100px!important} \ No newline at end of file +div.flash{margin:10px 5px;width:375px;border-color:#D9E4FF;border-radius:.2rem}#btnSubmit{margin:0 0 0 155px}.progressWrapper{width:357px;overflow:hidden}.progressContainer{padding:4px;margin:5px;background-color:#f8f8f8;border:solid 1px #E8E8E8;overflow:hidden}.message{margin:10px 0;padding:10px 20px;background-color:#FFC;border:solid 1px #FD9;overflow:hidden}.red{background-color:#FFEBEB;border:solid 1px #B50000}.green{background-color:#EBFFEB;border:solid 1px #DDF0DD}.blue{background-color:#F0F5FF;border:solid 1px #CEE2F2}.progressName{width:320px;height:14px;text-align:left;white-space:nowrap;overflow:hidden}.progressBarInProgress,.progressBarComplete,.progressBarError{margin-top:2px;width:0;height:2px;font-size:0;background-color:blue}.progressBarComplete{width:100%;background-color:green;visibility:hidden}.progressBarError{width:100%;background-color:#dc3545;visibility:hidden}.progressBarStatus{margin-top:2px;width:340px;text-align:left;white-space:nowrap}a.progressCancel{font-size:0;display:block;height:14px;width:14px;background-image:url(../images/cancelbutton.gif);background-repeat:no-repeat;background-position:-14px 0;float:right}a.progressCancel:hover{background-position:0 0}.swfupload{vertical-align:top}.albCt{float:left;width:240px;height:180px;margin-right:10px;margin-bottom:10px;border:1px dashed #eee;background:#f8f8f8;text-align:center;padding:10px}.albEdit{height:180px}.picinfo{height:30px;line-height:30px;margin:10px 0}.thumbnails img,.thumbnailsEdit img{margin:5px}.albCt img{height:100px!important} \ No newline at end of file diff --git a/src/admin/css/base.css b/src/admin/css/base.css new file mode 100644 index 00000000..646d3fb5 --- /dev/null +++ b/src/admin/css/base.css @@ -0,0 +1 @@ +*{font-size:12px;letter-spacing:.4px}body{line-height:1.5;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff}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}label{display:inline-block;margin:10px 0}input{padding:.25rem .5rem;height:calc(1.6em + .8rem);color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s;vertical-align:middle}input[type=radio],input[type=checkbox]{margin:0;height:auto;box-shadow:none;outline:none;vertical-align:text-top}input[type=button],input[type=submit],input[type=reset]{padding:.25rem .5rem;height:auto;color:#fff;background:#28a745;border-radius:.2rem;border:0;transition:all .6s}input[type=button]:focus,input[type=submit]:focus,input[type=reset]:focus{background:#006829;border-color:#005b24;box-shadow:0 0 0 0.2rem rgba(38,159,86,.5)}textarea{padding:.25rem .5rem;color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s}input:focus,textarea:focus{border-color:#28a745;box-shadow:0 0 2px #28a745;outline:none}select{padding:.25rem .5rem;height:calc(1.6em + .8rem);color:#424b51;background:#fff;border:1px solid #eee;border-radius:.2rem;transition:all .6s}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:30px;line-height:30px;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;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:10px 0;border-top:1px dashed #C0CC9D}.quickselItem{margin-bottom:8px}.quickselItem .topcat{padding-left:10px;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:30px;border:1px dotted #BFD67C;background:url(../images/wbg.gif)}.bodytitle div{float:left;line-height:30px}.bodytitletxt{padding-left:10px}.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{float:left;padding:0;height:18px;background:url(../images/typeid2bg.gif)no-repeat;border:0}#litpic{margin-left:-20px;width:80px;height:22px;cursor:pointer;opacity:0}.litpic_span{margin-left:-60px;width:80px;height:22px;overflow:hidden;cursor:pointer}#starttime,#endtime,#pubdate,#uptime{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/boxy.css b/src/admin/css/boxy.css old mode 100755 new mode 100644 similarity index 97% rename from src/dede/css/boxy.css rename to src/admin/css/boxy.css index f64e7786..e9faef37 --- a/src/dede/css/boxy.css +++ b/src/admin/css/boxy.css @@ -1,53 +1,53 @@ -.boxy-wrapper { position: absolute; } -.boxy-wrapper.fixed { position: fixed; } - - /* Modal */ - - .boxy-modal-blackout { position: absolute; background-color: black; left: 0; top: 0; } - - /* Border */ - - .boxy-wrapper { empty-cells: show; } - .boxy-wrapper .top-left, - .boxy-wrapper .top-right, - .boxy-wrapper .bottom-right, - .boxy-wrapper .bottom-left { width: 10px; height: 10px; padding: 0 } - - .boxy-wrapper .top-left { background: url('../images/boxy-nw.png'); } - .boxy-wrapper .top-right { background: url('../images/boxy-ne.png'); } - .boxy-wrapper .bottom-right { background: url('../images/boxy-se.png'); } - .boxy-wrapper .bottom-left { background: url('../images/boxy-sw.png'); } - - /* IE6+7 hacks for the border. IE7 should support this natively but fails in conjuction with modal blackout bg. */ - /* NB: these must be absolute paths or URLs to your images */ - .boxy-wrapper .top-left { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-nw.png'); } - .boxy-wrapper .top-right { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-ne.png'); } - .boxy-wrapper .bottom-right { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-se.png'); } - .boxy-wrapper .bottom-left { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-sw.png'); } - - .boxy-wrapper .top, - .boxy-wrapper .bottom { height: 10px; background-color: #693; opacity: 0.6; filter: alpha(opacity=60); padding: 0 } - - .boxy-wrapper .left, - .boxy-wrapper .right { width: 10px; background-color: #693; opacity: 0.6; filter: alpha(opacity=60); padding: 0 } - - /* Title bar */ - - .boxy-wrapper .title-bar { - padding: 6px; - position: relative; - background: #693; -} - .boxy-wrapper .title-bar.dragging { cursor: move; } - .boxy-wrapper .title-bar h2 { font-size: 12px; color: white; line-height: 1; margin: 0; padding: 0; font-weight: normal; } - .boxy-wrapper .title-bar .close { color: white; position: absolute; top: 6px; right: 6px; font-size: 90%; line-height: 1; } - - /* Content Region */ - - .boxy-inner { background-color: white; padding: 0 } - .boxy-content { padding: 15px; } - - /* Question Boxes */ - - .boxy-wrapper .question { width: 350px; min-height: 80px; } - .boxy-wrapper .answers { text-align: right; } +.boxy-wrapper { position: absolute; } +.boxy-wrapper.fixed { position: fixed; } + + /* Modal */ + + .boxy-modal-blackout { position: absolute; background-color: black; left: 0; top: 0; } + + /* Border */ + + .boxy-wrapper { empty-cells: show; } + .boxy-wrapper .top-left, + .boxy-wrapper .top-right, + .boxy-wrapper .bottom-right, + .boxy-wrapper .bottom-left { width: 10px; height: 10px; padding: 0 } + + .boxy-wrapper .top-left { background: url('../images/boxy-nw.png'); } + .boxy-wrapper .top-right { background: url('../images/boxy-ne.png'); } + .boxy-wrapper .bottom-right { background: url('../images/boxy-se.png'); } + .boxy-wrapper .bottom-left { background: url('../images/boxy-sw.png'); } + + /* IE6+7 hacks for the border. IE7 should support this natively but fails in conjuction with modal blackout bg. */ + /* NB: these must be absolute paths or URLs to your images */ + .boxy-wrapper .top-left { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-nw.png'); } + .boxy-wrapper .top-right { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-ne.png'); } + .boxy-wrapper .bottom-right { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-se.png'); } + .boxy-wrapper .bottom-left { #background: none; #filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/images/boxy-sw.png'); } + + .boxy-wrapper .top, + .boxy-wrapper .bottom { height: 10px; background-color: #693; opacity: 0.6; filter: alpha(opacity=60); padding: 0 } + + .boxy-wrapper .left, + .boxy-wrapper .right { width: 10px; background-color: #693; opacity: 0.6; filter: alpha(opacity=60); padding: 0 } + + /* Title bar */ + + .boxy-wrapper .title-bar { + padding: 6px; + position: relative; + background: #693; +} + .boxy-wrapper .title-bar.dragging { cursor: move; } + .boxy-wrapper .title-bar h2 { font-size: 12px; color: white; line-height: 1; margin: 0; padding: 0; font-weight: normal; } + .boxy-wrapper .title-bar .close { color: white; position: absolute; top: 6px; right: 6px; font-size: 90%; line-height: 1; } + + /* Content Region */ + + .boxy-inner { background-color: white; padding: 0 } + .boxy-content { padding: 15px; } + + /* Question Boxes */ + + .boxy-wrapper .question { width: 350px; min-height: 80px; } + .boxy-wrapper .answers { text-align: right; } diff --git a/src/dede/css/codemirror.css b/src/admin/css/codemirror.css similarity index 100% rename from src/dede/css/codemirror.css rename to src/admin/css/codemirror.css diff --git a/src/admin/css/frame.css b/src/admin/css/frame.css new file mode 100644 index 00000000..a8c2059f --- /dev/null +++ b/src/admin/css/frame.css @@ -0,0 +1 @@ +*{padding:0;margin:0;letter-spacing:.4px;box-sizing:border-box}body{line-height:1.5;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#424b51;background:#fff;overflow:hidden}body.hidemenu{background:none}a{text-decoration:none}ul{list-style:none}.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 50%);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:-2px;margin-right:10px;width:30px;height:30px;vertical-align:middle;border-radius:50%}.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%}.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{display:block;padding:0 10px;height:30px;line-height:30px;color:#666}.qucikmenu ul li a:hover{background:#f6f6f6}.pagemask{position:absolute;display:none;width:100%;height:100%;background:#424b51;opacity:.7;z-index:100}.iframemask{position:absolute;display:none;z-index:80;top:0;left:0;width:100%;height:100%;background:#fff;border:none;opacity:0}.allmenu{position:absolute;display:none;margin-left:-400px;padding:10px;width:800px;top:76px;left:50%;background:#fff;border-radius:.2rem;z-index:999}.allmenu .allmenu-box{margin:0 auto;text-align:left;overflow:hidden;padding-left:2px}.maptop{margin-left:-1px;padding-right:6px;padding-left:6px;float:left;width:130px;overflow:hidden}.maptop dt.bigitem{padding:6px 10px;line-height:18px;color:#fff;background:#424b51}.mapitem dt{line-height:30px;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{padding:10px;margin-top:20px;width:70%;clear:both}#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;font-size:12px;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}.allsearch{float:left;margin-top:6px;border:1px solid #fff;border-radius:.2rem}.np{margin-top:6px;margin-left:10px;width:40px;height:18px;font-size:12px;color:#fff;background:#57960f;border-radius:.2rem;border:0;cursor:pointer} \ No newline at end of file diff --git a/src/admin/css/indexbody.css b/src/admin/css/indexbody.css new file mode 100644 index 00000000..9b5d9f08 --- /dev/null +++ b/src/admin/css/indexbody.css @@ -0,0 +1 @@ +.title{color:#666600}.title span{padding-left:6px}#addTab{position:absolute;left:460px;top:260px;min-width:360px;height:200px;z-index:2;background:#fff;border:1px solid #ccc;padding:0px;display:none;border-radius:.2rem}#editTab{position:absolute;left:460px;top:260px;min-width:360px;height:300px;z-index:1;background:#fff;border:1px solid #ccc;padding:0px;display:none;border-radius:.2rem}.txt{float:left}.updatedvt{width:98%;border-bottom:1px dashed #dcdcdc}.upinfotitle{border-bottom:1px solid #ccc;color:#dc3545;font-weight:bold}.verline{border-bottom:1px dashed #ccc}.itemTable{background:#CBD8AC}#loaddiv{top:0;left:0;background:#ccc;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: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{height:26px;border-bottom:1px dashed #CFD7C4}.dboxtable1 ul li{float:left;display:inline;width:48%;height:26px;line-height:26px;border-bottom:1px dashed #CFD7C4;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/lurd.css b/src/admin/css/lurd.css old mode 100755 new mode 100644 similarity index 100% rename from src/dede/css/lurd.css rename to src/admin/css/lurd.css diff --git a/src/admin/css/menuold.css b/src/admin/css/menuold.css new file mode 100644 index 00000000..3ccb9cf9 --- /dev/null +++ b/src/admin/css/menuold.css @@ -0,0 +1 @@ +div{margin:0px;padding:0px}body{margin:auto;padding:0px;background:#9ad075;text-align:center}dl.bitem{width:148px;margin:0px 0px 6px 6px}dl.bitem dt{background:url(../images/menubg.gif);height:26px;line-height:26px;text-align:center;cursor:pointer}dl.bitem dd{padding:6px;background-color:#fff}.fllct{float:left;width:90px}.flrct{padding-top:2px;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:2px}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/css/tb-box.css b/src/admin/css/tb-box.css old mode 100755 new mode 100644 similarity index 100% rename from src/dede/css/tb-box.css rename to src/admin/css/tb-box.css diff --git a/src/dede/dialog/config.php b/src/admin/dialog/config.php old mode 100755 new mode 100644 similarity index 63% rename from src/dede/dialog/config.php rename to src/admin/dialog/config.php index ba230da9..89addce4 --- a/src/dede/dialog/config.php +++ b/src/admin/dialog/config.php @@ -1,37 +1,31 @@ -getUserID() <= 0) { - if (empty($adminDirHand)) { - ShowMsg("提示:需输入后台管理目录才能登录
请输入后台管理目录名:
", "javascript:;"); - exit(); - } - $adminDirHand = HtmlReplace($adminDirHand, 1); - $gurl = "../../{$adminDirHand}/login.php?gotopage=".urlencode($dedeNowurl); - echo ""; - exit(); -} +getUserID() <= 0) { + if (empty($adminDirHand)) { + ShowMsg("提示:需输入后台管理目录才能登录
请输入后台管理目录名:
", "javascript:;"); + exit(); + } + $adminDirHand = HtmlReplace($adminDirHand, 1); + $gurl = "../../{$adminDirHand}/login.php?gotopage=".urlencode($dedeNowurl); + echo ""; + exit(); +} \ No newline at end of file diff --git a/src/dede/dialog/img/addnews.gif b/src/admin/dialog/img/addnews.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/addnews.gif rename to src/admin/dialog/img/addnews.gif diff --git a/src/dede/dialog/img/adminuserico.gif b/src/admin/dialog/img/adminuserico.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/adminuserico.gif rename to src/admin/dialog/img/adminuserico.gif diff --git a/src/dede/dialog/img/allbg.gif b/src/admin/dialog/img/allbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/allbg.gif rename to src/admin/dialog/img/allbg.gif diff --git a/src/dede/dialog/img/book1.gif b/src/admin/dialog/img/book1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/book1.gif rename to src/admin/dialog/img/book1.gif diff --git a/src/dede/dialog/img/css.gif b/src/admin/dialog/img/css.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/css.gif rename to src/admin/dialog/img/css.gif diff --git a/src/dede/dialog/img/dir.gif b/src/admin/dialog/img/dir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/dir.gif rename to src/admin/dialog/img/dir.gif diff --git a/src/dede/dialog/img/dir2.gif b/src/admin/dialog/img/dir2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/dir2.gif rename to src/admin/dialog/img/dir2.gif diff --git a/src/dede/dialog/img/exe.gif b/src/admin/dialog/img/exe.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/exe.gif rename to src/admin/dialog/img/exe.gif diff --git a/src/dede/dialog/img/flash.gif b/src/admin/dialog/img/flash.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/flash.gif rename to src/admin/dialog/img/flash.gif diff --git a/src/dede/dialog/img/gif.gif b/src/admin/dialog/img/gif.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/gif.gif rename to src/admin/dialog/img/gif.gif diff --git a/src/dede/dialog/img/htm.gif b/src/admin/dialog/img/htm.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/htm.gif rename to src/admin/dialog/img/htm.gif diff --git a/src/dede/dialog/img/img.gif b/src/admin/dialog/img/img.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/img.gif rename to src/admin/dialog/img/img.gif diff --git a/src/dede/dialog/img/jpg.gif b/src/admin/dialog/img/jpg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/jpg.gif rename to src/admin/dialog/img/jpg.gif diff --git a/src/dede/dialog/img/js.gif b/src/admin/dialog/img/js.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/js.gif rename to src/admin/dialog/img/js.gif diff --git a/src/dede/dialog/img/mp3.gif b/src/admin/dialog/img/mp3.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/mp3.gif rename to src/admin/dialog/img/mp3.gif diff --git a/src/dede/dialog/img/php.gif b/src/admin/dialog/img/php.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/php.gif rename to src/admin/dialog/img/php.gif diff --git a/src/dede/dialog/img/picviewnone.gif b/src/admin/dialog/img/picviewnone.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/picviewnone.gif rename to src/admin/dialog/img/picviewnone.gif diff --git a/src/dede/dialog/img/rm.gif b/src/admin/dialog/img/rm.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/rm.gif rename to src/admin/dialog/img/rm.gif diff --git a/src/dede/dialog/img/sp_bg.gif b/src/admin/dialog/img/sp_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/sp_bg.gif rename to src/admin/dialog/img/sp_bg.gif diff --git a/src/dede/dialog/img/tbg.gif b/src/admin/dialog/img/tbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/tbg.gif rename to src/admin/dialog/img/tbg.gif diff --git a/src/dede/dialog/img/tbgv.gif b/src/admin/dialog/img/tbgv.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/tbgv.gif rename to src/admin/dialog/img/tbgv.gif diff --git a/src/dede/dialog/img/txt.gif b/src/admin/dialog/img/txt.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/txt.gif rename to src/admin/dialog/img/txt.gif diff --git a/src/dede/dialog/img/wbg.gif b/src/admin/dialog/img/wbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/wbg.gif rename to src/admin/dialog/img/wbg.gif diff --git a/src/dede/dialog/img/wmv.gif b/src/admin/dialog/img/wmv.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/wmv.gif rename to src/admin/dialog/img/wmv.gif diff --git a/src/dede/dialog/img/zip.gif b/src/admin/dialog/img/zip.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/dialog/img/zip.gif rename to src/admin/dialog/img/zip.gif diff --git a/src/admin/dialog/select_images.php b/src/admin/dialog/select_images.php new file mode 100644 index 00000000..0ebf1f75 --- /dev/null +++ b/src/admin/dialog/select_images.php @@ -0,0 +1,227 @@ + + + + + 选择图片 + + + + + + + +
+ 关闭预览 +
+ + + + + + + + + + + + + + + + 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 = " + + + "; + echo $line; + } else if (is_dir("$inpath/$file")) { + if (preg_match("#^_(.*)$#i", $file)) continue; + if (preg_match("#^\.(.*)$#i", $file)) continue; + $line = " + + + + "; + 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:#dc3545' "; + else $lstyle = ""; + $line = " + + + + + "; + echo "$line"; + } else if (preg_match("#\.(jpg)#i", $file)) { + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ""; + $line = " + + + + + "; + echo "$line"; + } + }//End Loop + $dh->close(); + ?> + +
+
+ " : ''; echo $noeditor; ?> + + + + + + + 上传: + + + 宽: + 高: + +
+
预览选择图片文件大小修改时间
点击图片预览,点击图片名选择图片,显示图片后点击该图片关闭预览
+ 上级目录当前目录:$activepath
+ $file
$file$filesize KB$filetime
$file$filesize KB$filetime
+ + \ No newline at end of file diff --git a/src/dede/dialog/select_images_post.php b/src/admin/dialog/select_images_post.php old mode 100755 new mode 100644 similarity index 85% rename from src/dede/dialog/select_images_post.php rename to src/admin/dialog/select_images_post.php index 978283be..2a01d97b --- a/src/dede/dialog/select_images_post.php +++ b/src/admin/dialog/select_images_post.php @@ -1,100 +1,100 @@ -<\|\":]{1,}#", '', $imgfile_name)); - -if (!preg_match("#\.(".$cfg_imgtype.")#i", $imgfile_name)) { - ShowMsg("您所上传的图片类型不在许可列表,请更改系统对扩展名限定的配置", "-1"); - exit(); -} -$nowtme = time(); -$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); -$imgfile_type = strtolower(trim($imgfile_type)); -if (!in_array($imgfile_type, $sparr)) { - ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG、WBMP格式的其中一种", "-1"); - exit(); -} -$mdir = MyDate($cfg_addon_savetype, $nowtme); -if (!is_dir($cfg_basedir.$activepath."/$mdir")) { - MkdirAll($cfg_basedir.$activepath."/$mdir", $cfg_dir_purview); - CloseFtp(); -} -$filename_name = $cuserLogin->getUserID().'-'.dd2char(MyDate("ymdHis", $nowtme).mt_rand(100, 999)); -$filename = $mdir.'/'.$filename_name; -$fs = explode('.', $imgfile_name); -$filename = $filename.'.'.$fs[count($fs) - 1]; -$filename_name = $filename_name.'.'.$fs[count($fs) - 1]; -$fullfilename = $cfg_basedir.$activepath."/".$filename; -move_uploaded_file($imgfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); - -@unlink($imgfile); -if (empty($resize)) { - $resize = 0; -} -if ($resize == 1) { - if (in_array($imgfile_type, $cfg_photo_typenames)) { - ImageResize($fullfilename, $iwidth, $iheight); - } -} else { - if (in_array($imgfile_type, $cfg_photo_typenames)) { - WaterImg($fullfilename, 'up'); - } -} - -$info = ''; -$sizes[0] = 0; -$sizes[1] = 0; -$sizes = getimagesize($fullfilename, $info); -$imgwidthValue = $sizes[0]; -$imgheightValue = $sizes[1]; -$imgsize = filesize($fullfilename); -$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','".$activepath."/".$filename."','1','$imgwidthValue','$imgheightValue','0','{$imgsize}','{$nowtme}','".$cuserLogin->getUserID()."'); "; -$dsql->ExecuteNoneQuery($inquery); -$fid = $dsql->GetLastID(); -AddMyAddon($fid, $activepath.'/'.$filename); -$CKUpload = isset($CKUpload) ? $CKUpload : FALSE; -if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { - $fileurl = $activepath.'/'.$filename; - $result = array('url' => $fileurl, "uploaded" => 1, 'fileName' => $filename); - echo json_encode($result); - exit; -} - - -if (!empty($noeditor)) { - ShowMsg("成功上传一幅图片", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&noeditor=yes&activepath=".urlencode($activepath)."/$mdir&d=".time()); -} else { - ShowMsg("成功上传一幅图片", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."/$mdir&d=".time()); -} -exit(); +<\|\":]{1,}#", '', $imgfile_name)); + +if (!preg_match("#\.(".$cfg_imgtype.")#i", $imgfile_name)) { + ShowMsg("您所上传的图片类型不在许可列表,请修改系统对扩展名限定的配置", "-1"); + exit(); +} +$nowtme = time(); +$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); +$imgfile_type = strtolower(trim($imgfile_type)); +if (!in_array($imgfile_type, $sparr)) { + ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG、WBMP格式的其中一种", "-1"); + exit(); +} +$mdir = MyDate($cfg_addon_savetype, $nowtme); +if (!is_dir($cfg_basedir.$activepath."/$mdir")) { + MkdirAll($cfg_basedir.$activepath."/$mdir", $cfg_dir_purview); + CloseFtp(); +} +$filename_name = $cuserLogin->getUserID().'-'.dd2char(MyDate("ymdHis", $nowtme).mt_rand(100, 999)); +$filename = $mdir.'/'.$filename_name; +$fs = explode('.', $imgfile_name); +$filename = $filename.'.'.$fs[count($fs) - 1]; +$filename_name = $filename_name.'.'.$fs[count($fs) - 1]; +$fullfilename = $cfg_basedir.$activepath."/".$filename; +$mime = get_mime_type($imgfile); +if (preg_match("#^unknow#", $mime)) { + ShowMsg("系统不支持fileinfo组件,建议php.ini中开启", -1); + exit; +} +if (!preg_match("#^(image|video|audio|application)#i", $mime)) { + ShowMsg("仅支持媒体文件及应用程序上传", -1); + exit; +} +move_uploaded_file($imgfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); +@unlink($imgfile); +if (empty($resize)) { + $resize = 0; +} +if ($resize == 1) { + if (in_array($imgfile_type, $cfg_photo_typenames)) { + ImageResize($fullfilename, $iwidth, $iheight); + } +} else { + if (in_array($imgfile_type, $cfg_photo_typenames)) { + WaterImg($fullfilename, 'up'); + } +} +$info = ''; +$sizes[0] = 0; +$sizes[1] = 0; +$sizes = getimagesize($fullfilename, $info); +$imgwidthValue = $sizes[0]; +$imgheightValue = $sizes[1]; +$imgsize = filesize($fullfilename); +$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('0','$filename','".$activepath."/".$filename."','1','$imgwidthValue','$imgheightValue','0','{$imgsize}','{$nowtme}','".$cuserLogin->getUserID()."'); "; +$dsql->ExecuteNoneQuery($inquery); +$fid = $dsql->GetLastID(); +AddMyAddon($fid, $activepath.'/'.$filename); +$CKUpload = isset($CKUpload) ? $CKUpload : FALSE; +if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { + $fileurl = $activepath.'/'.$filename; + $result = array('url' => $fileurl, "uploaded" => 1, 'fileName' => $filename); + echo json_encode($result); + exit; +} +if (!empty($noeditor)) { + ShowMsg("成功上传一幅图片", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&noeditor=yes&activepath=".urlencode($activepath)."/$mdir&d=".time()); +} else { + ShowMsg("成功上传一幅图片", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."/$mdir&d=".time()); +} +exit(); \ No newline at end of file diff --git a/src/admin/dialog/select_media.php b/src/admin/dialog/select_media.php new file mode 100644 index 00000000..e52d286d --- /dev/null +++ b/src/admin/dialog/select_media.php @@ -0,0 +1,185 @@ + + + + + 选择多媒体 + + + + + + + + + + + + + + + + + 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 = " + + + "; + echo $line; + } else if (is_dir("$inpath/$file")) { + if (preg_match("#^_(.*)$#i", $file)) continue; + if (preg_match("#^\.(.*)$#i", $file)) continue; + $line = " + + + + "; + 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:#dc3545' "; + else $lstyle = ""; + $line = " + + + + "; + 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:#dc3545' "; + else $lstyle = ""; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(rm|rmvb|mp3|mp4)#i", $file)) { + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ""; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(mp3|wma)#", $file)) { + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ""; + $line = " + + + + "; + echo "$line"; + } + }//End Loop + $dh->close(); + ?> +
+
+ + + + + 上传: + +
+
点击名称选择文件文件大小最后修改时间
上级目录当前目录:$activepath
$file
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
+ + \ No newline at end of file diff --git a/src/dede/dialog/select_media_post.php b/src/admin/dialog/select_media_post.php old mode 100755 new mode 100644 similarity index 89% rename from src/dede/dialog/select_media_post.php rename to src/admin/dialog/select_media_post.php index 31ff0483..67a8d849 --- a/src/dede/dialog/select_media_post.php +++ b/src/admin/dialog/select_media_post.php @@ -1,27 +1,25 @@ - + + + + + + + + + +插入多图 + + + +
+
+ + + + +
+ +
+ + + \ No newline at end of file diff --git a/src/dede/dialog/select_soft.php b/src/admin/dialog/select_soft.php similarity index 88% rename from src/dede/dialog/select_soft.php rename to src/admin/dialog/select_soft.php index bb6e6243..149fc35f 100644 --- a/src/dede/dialog/select_soft.php +++ b/src/admin/dialog/select_soft.php @@ -1,175 +1,172 @@ - - - - - 软件管理器 - - - - - - - - - - - - - - - - - -
-
- - - -  上传: -   - 改名: -   - -
-
- - - - - - - 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 - - - \r\n"; - echo $line; - } else if (is_dir("$inpath/$file")) { - if (preg_match("#^_(.*)$#i", $file)) continue; - if (preg_match("#^\.(.*)$#i", $file)) continue; - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(zip|rar|tgr.gz)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#^\.\.#", "", $reurl); - $reurl = $reurl; - $line = "\n - - - - "; - echo "$line"; - } else { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ''; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#^\.\.#", "", $reurl); - $reurl = $reurl; - $line = "\n - - - - "; - echo "$line"; - } - }//End Loop - $dh->close(); - ?> -
选择文件文件大小修改时间
上级目录当前目录:$activepath
$file
$file$filesize KB$filetime
$file$filesize KB$filetime
-
点击选择的文件,红色字样的为刚上传的文件
- + + + + + 选择软件 + + + + + + + + + + + + + + + + + +
+
+ + + + 上传: + 改名: + +
+
+ + + + + + + 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 = " + + + \r\n"; + echo $line; + } else if (is_dir("$inpath/$file")) { + if (preg_match("#^_(.*)$#i", $file)) continue; + if (preg_match("#^\.(.*)$#i", $file)) continue; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(zip|rar|tgr.gz)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + $line = " + + + + "; + echo "$line"; + } else { + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ''; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#^\.\.#", "", $reurl); + $reurl = $reurl; + $line = " + + + + "; + echo "$line"; + } + }//End Loop + $dh->close(); + ?> +
选择文件文件大小修改时间
上级目录当前目录:$activepath
$file
$file$filesize KB$filetime
$file$filesize KB$filetime
+
点击选择的文件,红色字样的为刚上传的文件
+ \ No newline at end of file diff --git a/src/dede/dialog/select_soft_post.php b/src/admin/dialog/select_soft_post.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/dialog/select_soft_post.php rename to src/admin/dialog/select_soft_post.php index cfa37d36..f1b3fc6f --- a/src/dede/dialog/select_soft_post.php +++ b/src/admin/dialog/select_soft_post.php @@ -1,104 +1,100 @@ -':\/|]#", "", $newname)); - -$uploadfile = isset($imgfile) && empty($uploadfile) ? $imgfile : $uploadfile; -$uploadfile_name = isset($imgfile_name) && empty($uploadfile_name) ? $imgfile_name : $uploadfile_name; - -if (!is_uploaded_file($uploadfile)) { - ShowMsg("您没有选择上传的文件或选择的文件大小超出限制!", "-1"); - exit(); -} - -//软件类型所有支持的附件 -$cfg_softtype = $cfg_softtype; - -$cfg_softtype = str_replace('||', '|', $cfg_softtype); -$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); -if (!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name)) { - ShowMsg("您所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置", "-1"); - exit(); -} - -$nowtme = time(); -if ($activepath == $cfg_soft_dir) { - $newdir = MyDate($cfg_addon_savetype, $nowtme); - $activepath = $activepath.'/'.$newdir; - if (!is_dir($cfg_basedir.$activepath)) { - MkdirAll($cfg_basedir.$activepath, $cfg_dir_purview); - CloseFtp(); - } -} - -//文件名(前为手工指定, 后者自动处理) -if (!empty($newname)) { - $filename = $newname; - if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); - else $fs = explode('.', $filename); - if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { - ShowMsg("您指定的文件名被系统禁止", 'javascript:;'); - exit(); - } - if (!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs) - 1]; -} else { - $filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', $nowtme)); - $fs = explode('.', $uploadfile_name); - if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { - ShowMsg("您上传了某些可能存在不安全因素的文件,系统拒绝操作", 'javascript:;'); - exit(); - } - $filename = $filename.'.'.$fs[count($fs) - 1]; -} - -$fullfilename = $cfg_basedir.$activepath.'/'.$filename; -$fullfileurl = $activepath.'/'.$filename; -move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); -@unlink($uploadfile); - -if ($uploadfile_type == 'application/x-shockwave-flash') { - $mediatype = 2; -} else if (preg_match('#image#i', $uploadfile_type)) { - $mediatype = 1; -} else if (preg_match('#audio|media|video#i', $uploadfile_type)) { - $mediatype = 3; -} else { - $mediatype = 4; -} - - -$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('0','$filename','$fullfileurl','$mediatype','0','0','0','{$uploadfile_size}','{$nowtme}','".$cuserLogin->getUserID()."'); "; - -$dsql->ExecuteNoneQuery($inquery); -$fid = $dsql->GetLastID(); -AddMyAddon($fid, $fullfileurl); - -if ($ck == 1) { - $funcNum = isset($_GET['CKEditorFuncNum']) ? $_GET['CKEditorFuncNum'] : 1; - $url = $fullfileurl; - $arr = array( - "uploaded" => 1, - "fileName" => $filename, - "url" => $url, - ); - echo json_encode($arr); -} else { - ShowMsg("成功上传文件", $bkurl."?comeback=".urlencode($filename)."&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."&d=".time()); - exit(); -} +':\/|]#", "", $newname)); +$uploadfile = isset($imgfile) && empty($uploadfile) ? $imgfile : $uploadfile; +$uploadfile_name = isset($imgfile_name) && empty($uploadfile_name) ? $imgfile_name : $uploadfile_name; +if (!is_uploaded_file($uploadfile)) { + ShowMsg("您没有选择上传的文件或选择的文件大小超出限制!", "-1"); + exit(); +} +//软件类型所有支持的附件 +$cfg_softtype = $cfg_softtype; +$cfg_softtype = str_replace('||', '|', $cfg_softtype); +$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); +if (!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name)) { + ShowMsg("您所上传的{$uploadmbtype}不在许可列表,请修改系统对扩展名限定的配置", "-1"); + exit(); +} +$nowtme = time(); +if ($activepath == $cfg_soft_dir) { + $newdir = MyDate($cfg_addon_savetype, $nowtme); + $activepath = $activepath.'/'.$newdir; + if (!is_dir($cfg_basedir.$activepath)) { + MkdirAll($cfg_basedir.$activepath, $cfg_dir_purview); + CloseFtp(); + } +} +//文件名(前为手工指定, 后者自动处理) +if (!empty($newname)) { + $filename = $newname; + if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); + else $fs = explode('.', $filename); + if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { + ShowMsg("您指定的文件名被系统禁止", 'javascript:;'); + exit(); + } + if (!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs) - 1]; +} else { + $filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', $nowtme)); + $fs = explode('.', $uploadfile_name); + if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { + ShowMsg("您上传了某些可能存在不安全因素的文件,系统拒绝操作", "-1"); + exit(); + } + $filename = $filename.'.'.$fs[count($fs) - 1]; +} +$fullfilename = $cfg_basedir.$activepath.'/'.$filename; +$fullfileurl = $activepath.'/'.$filename; +$mime = get_mime_type($uploadfile); +if (preg_match("#^unknow#", $mime)) { + ShowMsg("系统不支持fileinfo组件,建议php.ini中开启", -1); + exit; +} +if (!preg_match("#^(image|video|audio|application)#i", $mime)) { + ShowMsg("仅支持媒体文件及应用程序上传", -1); + exit; +} +move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); +@unlink($uploadfile); +if ($uploadfile_type == 'application/x-shockwave-flash') { + $mediatype = 2; +} else if (preg_match('#image#i', $uploadfile_type)) { + $mediatype = 1; +} else if (preg_match('#audio|media|video#i', $uploadfile_type)) { + $mediatype = 3; +} else { + $mediatype = 4; +} +$inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('0','$filename','$fullfileurl','$mediatype','0','0','0','{$uploadfile_size}','{$nowtme}','".$cuserLogin->getUserID()."'); "; +$dsql->ExecuteNoneQuery($inquery); +$fid = $dsql->GetLastID(); +AddMyAddon($fid, $fullfileurl); +if ($ck == 1) { + $funcNum = isset($_GET['CKEditorFuncNum']) ? $_GET['CKEditorFuncNum'] : 1; + $url = $fullfileurl; + $arr = array( + "uploaded" => 1, + "fileName" => $filename, + "url" => $url, + ); + echo json_encode($arr); +} else { + ShowMsg("成功上传文件", $bkurl."?comeback=".urlencode($filename)."&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."&d=".time()); + exit(); +} \ No newline at end of file diff --git a/src/dede/dialog/select_templets.php b/src/admin/dialog/select_templets.php similarity index 81% rename from src/dede/dialog/select_templets.php rename to src/admin/dialog/select_templets.php index 0a591423..d6a29ecf 100644 --- a/src/dede/dialog/select_templets.php +++ b/src/admin/dialog/select_templets.php @@ -1,201 +1,194 @@ - - - - - 模板管理器 - - - - - - - - - - - - - - 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("#[\/][^\/]*$#", "", $activepath); - $line = "\n - - - \r\n"; - echo $line; - } else if (is_dir("$inpath/$file")) { - if (preg_match("#^_(.*)$#i", $file)) continue; - if (preg_match("#^\.(.*)$#i", $file)) continue; - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(htm|html)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(css)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."/#", "", $reurl); - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(js)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(jpg)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(gif|png)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); - $line = "\n - - - - "; - echo "$line"; - } else if (preg_match("#\.(txt)#i", $file)) { - if ($file == $comeback) $lstyle = " style='color:red' "; - else $lstyle = ""; - $reurl = "$activeurl/$file"; - $reurl = preg_replace("#\.\.#", "", $reurl); - $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); - $line = "\n - - - "; - echo "$line"; - } - }//End Loop - $dh->close(); - ?> - - - -
选择文件文件大小修改时间
上级目录当前目录:$activepath
$file
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
- - - - - - - - - -
- 上传: - 改名: - -
-
- + + + + + 选择模板 + + + + + + + + + + + + + + + + + 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("#[\/][^\/]*$#", "", $activepath); + $line = " + + + \r\n"; + echo $line; + } else if (is_dir("$inpath/$file")) { + if (preg_match("#^_(.*)$#i", $file)) continue; + if (preg_match("#^\.(.*)$#i", $file)) continue; + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(htm|html)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(css)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."/#", "", $reurl); + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(js)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(jpg)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(gif|png)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); + $line = " + + + + "; + echo "$line"; + } else if (preg_match("#\.(txt)#i", $file)) { + if ($file == $comeback) $lstyle = " style='color:#dc3545' "; + else $lstyle = ""; + $reurl = "$activeurl/$file"; + $reurl = preg_replace("#\.\.#", "", $reurl); + $reurl = preg_replace("#".$templetdir."\/#", "", $reurl); + $line = " + + + "; + echo "$line"; + } + }//End Loop + $dh->close(); + ?> +
+
+ + + + 上传: + 改名: + +
+
选择文件文件大小修改时间
上级目录当前目录:$activepath
$file
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
$file$filesize KB$filetime
+ \ No newline at end of file diff --git a/src/dede/dialog/select_templets_post.php b/src/admin/dialog/select_templets_post.php old mode 100755 new mode 100644 similarity index 71% rename from src/dede/dialog/select_templets_post.php rename to src/admin/dialog/select_templets_post.php index 6d75a36a..f7ec977b --- a/src/dede/dialog/select_templets_post.php +++ b/src/admin/dialog/select_templets_post.php @@ -1,44 +1,39 @@ -<\|\":]{1,}#", '', $filename)); -} else { - $uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); - $filename = $uploadfile_name; - if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) { - ShowMsg("您所上传的文件存在问题,请检查文件类型是否适合", "-1"); - exit(); - } -} -$fullfilename = $cfg_basedir.$activepath."/".$filename; -move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); -@unlink($uploadfile); -ShowMsg("成功上传文件", "select_templets.php?comeback=".urlencode($filename)."&f=$f&activepath=".urlencode($activepath)."&d=".time()); -exit(); +<\|\":]{1,}#", '', $filename)); +if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) { + ShowMsg("您所上传的文件存在问题,请检查文件类型是否适合", "-1"); +} +$fullfilename = $cfg_basedir.$activepath."/".$filename; +move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); +@unlink($uploadfile); +ShowMsg("成功上传文件", "select_templets.php?comeback=".urlencode($filename)."&f=$f&activepath=".urlencode($activepath)."&d=".time()); +exit(); \ No newline at end of file diff --git a/src/dede/diy_add.php b/src/admin/diy_add.php old mode 100755 new mode 100644 similarity index 87% rename from src/dede/diy_add.php rename to src/admin/diy_add.php index c0c407bf..346f17be --- a/src/dede/diy_add.php +++ b/src/admin/diy_add.php @@ -1,64 +1,69 @@ -GetVersion(); -$mysql_versions = explode(".", trim($mysql_version)); -$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; -if (empty($action)) { - $row = $dsql->GetOne("SELECT diyid FROM #@__diyforms ORDER BY diyid DESC LIMIT 0,1 "); - if (is_array($row)) $newdiyid = $row['diyid'] + 1; - else $newdiyid = 1; - include(DEDEADMIN."/templets/diy_add.htm"); -} else { - if (preg_match("#[^0-9-]#", $diyid) || empty($diyid)) { - ShowMsg("'自定义表单diyid'必须为数字", "-1"); - exit(); - } - if ($table == "") { - ShowMsg("表名不能为空", "-1"); - exit(); - } - $public = isset($public) && is_numeric($public) ? $public : 0; - $name = dede_htmlspecialchars($name); - $row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='$diyid' OR `table` LIKE '$table' OR name LIKE '$name' "); - if (is_array($row)) { - ShowMsg("可能自定义表单的‘diyid’、‘名称’在数据库中已存在,不能重复使用", "-1"); - exit(); - } - $query = "SHOW TABLES FROM {$dsql->dbName} "; - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->getarray()) { - if (empty($row[0])) $row[0] = ''; - if ($table == $row[0]) { - showmsg('指定的表在数据库中重复', '-1'); - exit(); - } - } - $sql = "CREATE TABLE IF NOT EXISTS `$table`( - `id` int(10) unsigned NOT NULL auto_increment, - `ifcheck` tinyint(1) NOT NULL default '0', - "; - if ($mysql_version < 4.1) { - $sql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; - } else { - $sql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; - } - if ($dsql->ExecuteNoneQuery($sql)) { - $query = "INSERT INTO #@__diyforms (`diyid`, `name`, `table`, `info`, `listtemplate`, `viewtemplate`, `posttemplate`, `public` ) VALUES ('$diyid', '$name', '$table', '', '$listtemplate', '$viewtemplate', '$posttemplate', '$public')"; - $dsql->ExecuteNoneQuery($query); - showmsg('自定义表单创建成功,请自行添加字段', 'diy_main.php'); - } else { - showmsg('自定义表单创建失败', '-1'); - } -} +GetVersion(); +$mysql_versions = explode(".", trim($mysql_version)); +$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; +if (empty($action)) { + $row = $dsql->GetOne("SELECT diyid FROM #@__diyforms ORDER BY diyid DESC LIMIT 0,1 "); + if (is_array($row)) $newdiyid = $row['diyid'] + 1; + else $newdiyid = 1; + include(DEDEADMIN."/templets/diy_add.htm"); +} else { + if (preg_match("#[^0-9-]#", $diyid) || empty($diyid)) { + ShowMsg("'自定义表单diyid'必须为数字", "-1"); + exit(); + } + if ($table == "") { + ShowMsg("表名不能为空", "-1"); + exit(); + } + $public = isset($public) && is_numeric($public) ? $public : 0; + $name = dede_htmlspecialchars($name); + $row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='$diyid' OR `table` LIKE '$table' OR name LIKE '$name' "); + if (is_array($row)) { + ShowMsg("可能自定义表单的‘diyid’、‘名称’在数据库中已存在,不能重复使用", "-1"); + exit(); + } + if ($cfg_dbtype=="sqlite") { + $query = " SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;"; + } else { + $query = "SHOW TABLES"; + } + + $dsql->SetQuery($query); + $dsql->Execute("biz"); + + while ($row = $dsql->GetArray("biz")) { + if (empty($row[0])) $row[0] = ''; + if ($table == $row[0]) { + showmsg('指定的表在数据库中重复', '-1'); + exit(); + } + } + $sql = "CREATE TABLE IF NOT EXISTS `$table`( + `id` int(10) unsigned NOT NULL auto_increment, + `ifcheck` tinyint(1) NOT NULL default '0', + "; + if ($mysql_version < 4.1) { + $sql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; + } else { + $sql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; + } + if ($dsql->ExecuteNoneQuery($sql)) { + $query = "INSERT INTO #@__diyforms (`diyid`, `name`, `table`, `info`, `listtemplate`, `viewtemplate`, `posttemplate`, `public` ) VALUES ('$diyid', '$name', '$table', '', '$listtemplate', '$viewtemplate', '$posttemplate', '$public')"; + $dsql->ExecuteNoneQuery($query); + showmsg('自定义表单创建成功,请自行添加字段', 'diy_main.php'); + } else { + showmsg('自定义表单创建失败', '-1'); + } +} diff --git a/src/dede/diy_edit.php b/src/admin/diy_edit.php old mode 100755 new mode 100644 similarity index 81% rename from src/dede/diy_edit.php rename to src/admin/diy_edit.php index 4c330b4f..3c8aecfc --- a/src/dede/diy_edit.php +++ b/src/admin/diy_edit.php @@ -1,76 +1,69 @@ -ExecuteNoneQuery($query); - ShowMsg("成功更改一个自定义表单", "diy_main.php"); - exit(); -} -/*---------------- -function __Delete() ------------------*/ else if ($dopost == "delete") { - @set_time_limit(0); - CheckPurview('c_Del'); - $row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='$diyid'"); - if (empty($job)) $job = ""; - - //确认提示 - if ($job == "") { - $wintitle = "自定义表单管理-删除自定义表单"; - $wecome_info = "自定义表单管理::删除自定义表单"; - $win = new OxWindow(); - $win->Init("diy_edit.php", "js/blank.js", "POST"); - $win->AddHidden("job", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("diyid", $diyid); - $win->AddTitle("将删除所有与该自定义表单相关的文件和数据
您确实要删除 \"".$row['name']."\" 这个自定义表单?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - exit(); - } - - //操作 - else if ($job == "yes") { - $row = $dsql->GetOne("SELECT `table` FROM `#@__diyforms` WHERE diyid='$diyid'", MYSQL_ASSOC); - if (!is_array($row)) { - ShowMsg("您所指定的自定义表单信息不存在!", "-1"); - exit(); - } - - //删除表 - $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$row['table']}`;"); - - //删除频道配置信息 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__diyforms` WHERE diyid='$diyid'"); - ShowMsg("成功删除一个自定义表单", "diy_main.php"); - exit(); - } -} - -/*---------------- -function edit() ------------------*/ -$row = $dsql->GetOne("Select * From #@__diyforms where diyid='$diyid'"); -include DEDEADMIN."/templets/diy_edit.htm"; +ExecuteNoneQuery($query); + ShowMsg("成功修改一个自定义表单", "diy_main.php"); + exit(); +} +/*---------------- +function __Delete() +-----------------*/ +else if ($dopost == "delete") { + @set_time_limit(0); + CheckPurview('c_Del'); + $row = $dsql->GetOne("SELECT * FROM `#@__diyforms` WHERE diyid='$diyid'"); + if (empty($job)) $job = ""; + //确认提示 + if ($job == "") { + $wintitle = "自定义表单管理-删除自定义表单"; + $wecome_info = "自定义表单管理::删除自定义表单"; + $win = new OxWindow(); + $win->Init("diy_edit.php", "js/blank.js", "POST"); + $win->AddHidden("job", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("diyid", $diyid); + $win->AddTitle("将删除所有与该自定义表单相关的文件和数据
您确实要删除 \"".$row['name']."\" 这个自定义表单?"); + $winform = $win->GetWindow("ok"); + $win->Display(); + exit(); + } + //操作 + else if ($job == "yes") { + $row = $dsql->GetOne("SELECT `table` FROM `#@__diyforms` WHERE diyid='$diyid'", MYSQL_ASSOC); + if (!is_array($row)) { + ShowMsg("您所指定的自定义表单信息不存在!", "-1"); + exit(); + } + //删除表 + $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$row['table']}`;"); + //删除频道配置信息 + $dsql->ExecuteNoneQuery("DELETE FROM `#@__diyforms` WHERE diyid='$diyid'"); + ShowMsg("成功删除一个自定义表单", "diy_main.php"); + exit(); + } +} +/*---------------- +function edit() +-----------------*/ +$row = $dsql->GetOne("SELECT * FROM `#@__diyforms` WHERE diyid='$diyid'"); +include DEDEADMIN."/templets/diy_edit.htm"; \ No newline at end of file diff --git a/src/dede/diy_field_add.php b/src/admin/diy_field_add.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/diy_field_add.php rename to src/admin/diy_field_add.php index 893d6d2f..decfa6a2 --- a/src/dede/diy_field_add.php +++ b/src/admin/diy_field_add.php @@ -1,109 +1,99 @@ -GetVersion(); -$mysql_versions = explode(".", trim($mysql_version)); -$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; -/*---------------------- -function Save() ----------------------*/ -if ($action == 'save') { - //模型信息 - $fieldname = strtolower($fieldname); - $row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); - $fieldset = $row['info']; - require_once(DEDEINC."/dedetag.class.php"); - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource($fieldset); - $trueTable = $row['table']; - - //修改字段配置信息 - $dfvalue = trim($vdefault); - $isnull = ($isnull == 1 ? "true" : "false"); - $mxlen = $maxlength; - - //检测被修改的字段类型 - $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - $ntabsql = $fieldinfos[0]; - $buideType = $fieldinfos[1]; - - $rs = $dsql->ExecuteNoneQuery(" ALTER TABLE `$trueTable` ADD $ntabsql "); - - if (!$rs) { - $gerr = $dsql->GetError(); - ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); - exit(); - } - $ok = FALSE; - - //检测旧配置信息,并替换为新配置 - if (is_array($dtp->CTags)) { - //遍历旧配置 - foreach ($dtp->CTags as $tagid => $ctag) { - if ($fieldname == strtolower($ctag->GetName())) { - $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); - $ok = TRUE; - break; - } - } - $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); - } else { - //原来的配置为空 - $oksetting = $fieldset."\n".stripslashes($fieldstring); - } - $addlist = GetAddFieldList($dtp, $oksetting); - $oksetting = addslashes($oksetting); - $rs = $dsql->ExecuteNoneQuery("Update #@__diyforms set `info`='$oksetting' where diyid='$diyid' "); - if (!$rs) { - $grr = $dsql->GetError(); - ShowMsg("保存节点配置出错".$grr, "javascript:;"); - exit(); - } - ShowMsg("成功增加一个字段", "diy_edit.php?diyid=$diyid"); - exit(); -} - -//检测模型相关信息,并初始化相关数据 -/*---------------------- -function ShowPage() ----------------------*/ -$row = $dsql->GetOne("SELECT `table` FROM #@__diyforms WHERE diyid='$diyid'"); -$trueTable = $row['table']; -$tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( -`id` int(10) unsigned NOT NULL auto_increment, -`ifcheck` tinyint(1) NOT NULL default '0', -"; -if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; -} else { - $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; -} -$dsql->ExecuteNoneQuery($tabsql); - -//检测附加表里含有的字段 -$fields = array(); -$rs = $dsql->SetQuery("show fields from `$trueTable`"); -$dsql->Execute('a'); -while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { - $fields[strtolower($nrow['Field'])] = 1; -} -$f = ''; -foreach ($fields as $k => $v) { - $f .= ($f == '' ? $k : ' '.$k); -} -require_once(DEDEADMIN."/templets/diy_field_add.htm"); +GetVersion(); +$mysql_versions = explode(".", trim($mysql_version)); +$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; +/*---------------------- +function Save() +---------------------*/ +if ($action == 'save') { + //模型信息 + $fieldname = strtolower($fieldname); + $row = $dsql->GetOne("SELECT `table`,`info` FROM `#@__diyforms` WHERE diyid='$diyid'"); + $fieldset = stripslashes($row['info']); + require_once(DEDEINC."/dedetag.class.php"); + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource($fieldset); + $trueTable = $row['table']; + //修改字段配置信息 + $dfvalue = trim($vdefault); + $isnull = ($isnull == 1 ? "true" : "false"); + $mxlen = $maxlength; + //检测被修改的字段类型 + $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); + $ntabsql = $fieldinfos[0]; + $buideType = $fieldinfos[1]; + $rs = $dsql->ExecuteNoneQuery(" ALTER TABLE `$trueTable` ADD $ntabsql "); + if (!$rs) { + $gerr = $dsql->GetError(); + ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); + exit(); + } + $ok = FALSE; + //检测旧配置信息,并替换为新配置 + if (is_array($dtp->CTags)) { + //遍历旧配置 + foreach ($dtp->CTags as $tagid => $ctag) { + if ($fieldname == strtolower($ctag->GetName())) { + $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); + $ok = TRUE; + break; + } + } + $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); + } else { + //原来的配置为空 + $oksetting = $fieldset."\n".stripslashes($fieldstring); + } + $addlist = GetAddFieldList($dtp, $oksetting); + $oksetting = addslashes($oksetting); + $rs = $dsql->ExecuteNoneQuery("Update #@__diyforms set `info`='$oksetting' where diyid='$diyid' "); + if (!$rs) { + $grr = $dsql->GetError(); + ShowMsg("保存节点配置出错".$grr, "javascript:;"); + exit(); + } + ShowMsg("成功增加一个字段", "diy_edit.php?diyid=$diyid"); + exit(); +} +//检测模型相关信息,并初始化相关数据 +/*---------------------- +function ShowPage() +---------------------*/ +$row = $dsql->GetOne("SELECT `table` FROM #@__diyforms WHERE diyid='$diyid'"); +$trueTable = $row['table']; +$tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( +`id` int(10) unsigned NOT NULL auto_increment, +`ifcheck` tinyint(1) NOT NULL default '0', +"; +if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; +} else { + $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; +} +$dsql->ExecuteNoneQuery($tabsql); +//检测附加表里含有的字段 +$fields = array(); +$rs = $dsql->SetQuery("show fields from `$trueTable`"); +$dsql->Execute('a'); +while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { + $fields[strtolower($nrow['Field'])] = 1; +} +$f = ''; +foreach ($fields as $k => $v) { + $f .= ($f == '' ? $k : ' '.$k); +} +require_once(DEDEADMIN."/templets/diy_field_add.htm"); \ No newline at end of file diff --git a/src/dede/diy_field_edit.php b/src/admin/diy_field_edit.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/diy_field_edit.php rename to src/admin/diy_field_edit.php index a8bf9a70..35d0acc6 --- a/src/dede/diy_field_edit.php +++ b/src/admin/diy_field_edit.php @@ -1,123 +1,112 @@ -GetVersion(); -$mysql_versions = explode(".", trim($mysql_version)); -$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; -$row = $dsql->GetOne("SELECT `table`,`info` FROM #@__diyforms WHERE diyid='$diyid'"); -$fieldset = $row['info']; -$trueTable = $row['table']; -$dtp = new DedeTagParse(); -$dtp->SetNameSpace("field", "<", ">"); -$dtp->LoadSource($fieldset); -foreach ($dtp->CTags as $ctag) { - if (strtolower($ctag->GetName()) == strtolower($fname)) break; -} - -//字段类型信息 -$ds = file(DEDEADMIN."/inc/fieldtype.txt"); -foreach ($ds as $d) { - $dds = explode(',', trim($d)); - $fieldtypes[$dds[0]] = $dds[1]; -} - -//保存更改 -/*-------------------- -function _SAVE() -----------------------*/ -if ($action == 'save') { - - if (!isset($fieldtypes[$dtype])) { - ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); - exit(); - } - - //检测数据库是否存在附加表,不存在则新建一个 - $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( - `id` int(10) unsigned NOT NULL auto_increment, - `ifcheck` tinyint(1) NOT NULL default '0', - "; - if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; - } else { - $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; - } - $dsql->ExecuteNoneQuery($tabsql); - - //检测表里含有的字段 - $fields = array(); - $rs = $dsql->SetQuery("show fields from `$trueTable`"); - $dsql->Execute('a'); - while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { - $fields[strtolower($nrow['Field'])] = $nrow['Type']; - } - - //修改字段配置信息 - $dfvalue = $vdefault; - $isnull = ($isnull == 1 ? "true" : "false"); - $mxlen = $maxlength; - $fieldname = strtolower($fname); - - //检测被修改的字段类型,并更新数据表 - $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - $ntabsql = $fieldinfos[0]; - $buideType = $fieldinfos[1]; - $tabsql = ''; - - //检测旧数据类型,并替换为新配置 - foreach ($dtp->CTags as $tagid => $ctag) { - if (trim($fieldname) == trim(strtolower($ctag->GetName()))) { - - if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { - $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; - $dsql->ExecuteNoneQuery($tabsql); - } else if (!isset($fields[$fieldname])) { - $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; - $dsql->ExecuteNoneQuery($tabsql); - } else { - $tabsql = ''; - } - $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); - break; - } - } - $oksetting = $dtp->GetResultNP(); - $oksetting = addslashes($oksetting); - $dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); - ShowMsg("成功更改一个字段的配置", "diy_edit.php?diyid={$diyid}"); - exit(); -} -/*------------------ -删除字段 -function _DELETE() --------------------*/ else if ($action == "delete") { - //检测旧数据类型,并替换为新配置 - foreach ($dtp->CTags as $tagid => $ctag) { - if (strtolower($ctag->GetName()) == strtolower($fname)) { - $dtp->Assign($tagid, "#@Delete@#"); - } - } - $oksetting = addslashes($dtp->GetResultNP()); - $dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); - $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); - ShowMsg("成功删除一个字段", "diy_edit.php?diyid=$diyid"); - exit(); -} -require_once(DEDEADMIN."/templets/diy_field_edit.htm"); +GetVersion(); +$mysql_versions = explode(".", trim($mysql_version)); +$mysql_version = $mysql_versions[0].".".$mysql_versions[1]; +$row = $dsql->GetOne("SELECT `table`,`info` FROM `#@__diyforms` WHERE diyid='$diyid'"); +$fieldset = stripslashes($row['info']); +$trueTable = $row['table']; +$dtp = new DedeTagParse(); +$dtp->SetNameSpace("field", "<", ">"); +$dtp->LoadSource($fieldset); +foreach ($dtp->CTags as $ctag) { + if (strtolower($ctag->GetName()) == strtolower($fname)) break; +} +//字段类型信息 +$ds = file(DEDEADMIN."/inc/fieldtype.txt"); +foreach ($ds as $d) { + $dds = explode(',', trim($d)); + $fieldtypes[$dds[0]] = $dds[1]; +} +//保存修改 +/*-------------------- +function _SAVE() +----------------------*/ +if ($action == 'save') { + + if (!isset($fieldtypes[$dtype])) { + ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); + exit(); + } + //检测数据库是否存在附加表,不存在则新建一个 + $tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( + `id` int(10) unsigned NOT NULL auto_increment, + `ifcheck` tinyint(1) NOT NULL default '0', + "; + if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`id`)\r\n) TYPE=MyISAM; "; + } else { + $tabsql .= " PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; + } + $dsql->ExecuteNoneQuery($tabsql); + //检测表里含有的字段 + $fields = array(); + $rs = $dsql->SetQuery("show fields from `$trueTable`"); + $dsql->Execute('a'); + while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { + $fields[strtolower($nrow['Field'])] = $nrow['Type']; + } + //修改字段配置信息 + $dfvalue = $vdefault; + $isnull = ($isnull == 1 ? "true" : "false"); + $mxlen = $maxlength; + $fieldname = strtolower($fname); + //检测被修改的字段类型,并更新数据表 + $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); + $ntabsql = $fieldinfos[0]; + $buideType = $fieldinfos[1]; + $tabsql = ''; + //检测旧数据类型,并替换为新配置 + foreach ($dtp->CTags as $tagid => $ctag) { + if (trim($fieldname) == trim(strtolower($ctag->GetName()))) { + if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { + $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; + $dsql->ExecuteNoneQuery($tabsql); + } else if (!isset($fields[$fieldname])) { + $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; + $dsql->ExecuteNoneQuery($tabsql); + } else { + $tabsql = ''; + } + $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); + break; + } + } + $oksetting = $dtp->GetResultNP(); + $oksetting = addslashes($oksetting); + $dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); + ShowMsg("成功修改一个字段的配置", "diy_edit.php?diyid={$diyid}"); + exit(); +} +/*------------------ +删除字段 +function _DELETE() +-------------------*/ +else if ($action == "delete") { + //检测旧数据类型,并替换为新配置 + foreach ($dtp->CTags as $tagid => $ctag) { + if (strtolower($ctag->GetName()) == strtolower($fname)) { + $dtp->Assign($tagid, "#@Delete@#"); + } + } + $oksetting = addslashes($dtp->GetResultNP()); + $dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); + $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); + ShowMsg("成功删除一个字段", "diy_edit.php?diyid=$diyid"); + exit(); +} +require_once(DEDEADMIN."/templets/diy_field_edit.htm"); \ No newline at end of file diff --git a/src/dede/diy_list.php b/src/admin/diy_list.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/diy_list.php rename to src/admin/diy_list.php index 5eb83b06..37ddf820 --- a/src/dede/diy_list.php +++ b/src/admin/diy_list.php @@ -1,204 +1,204 @@ -getForm('post', '', 'admin'); - include DEDEADMIN.'/templets/diy_post.htm'; - } else if ($do == 2) { - $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); - $dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash); - if (!empty($dede_fields)) { - if ($dede_fieldshash != md5($dede_fields.$cfg_cookie_encode)) { - showMsg("数据校验不对,程序返回", '-1'); - exit(); - } - } - $diyform = $dsql->getOne("SELECT * FROM #@__diyforms WHERE diyid=$diyid"); - if (!is_array($diyform)) { - showmsg("自定义表单不存在", '-1'); - exit(); - } - $addvar = $addvalue = ''; - if (!empty($dede_fields)) { - $fieldarr = explode(';', $dede_fields); - if (is_array($fieldarr)) { - foreach ($fieldarr as $field) { - if ($field == '') { - continue; - } - $fieldinfo = explode(',', $field); - if ($fieldinfo[1] == 'htmltext' || $fieldinfo[1] == 'textdata') { - ${$fieldinfo[0]} = filterscript(stripslashes(${$fieldinfo[0]})); - ${$fieldinfo[0]} = addslashes(${$fieldinfo[0]}); - ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); - } else { - ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); - } - $addvar .= ', `'.$fieldinfo[0].'`'; - $addvalue .= ", '".${$fieldinfo[0]}."'"; - } - } - } - $query = "INSERT INTO `{$diy->table}` (`id`, `ifcheck` $addvar) VALUES (NULL, 0 $addvalue)"; - if ($dsql->ExecuteNoneQuery($query)) { - $goto = "diy_list.php?action=list&diyid={$diy->diyid}"; - showmsg('发布成功', $goto); - } else { - showmsg('对不起,发布不成功', '-1'); - } - } -} else if ($action == 'list') { - include_once DEDEINC.'/datalistcp.class.php'; - $query = "SELECT * FROM {$diy->table} ORDER BY id DESC"; - $datalist = new DataListCP(); - $datalist->pageSize = 10; - $datalist->SetParameter('action', 'list'); - $datalist->SetParameter('diyid', $diyid); - $datalist->SetTemplate(DEDEADMIN.'/templets/diy_list.htm'); - $datalist->SetSource($query); - $fieldlist = $diy->getFieldList(); - $datalist->Display(); -} else if ($action == 'edit') { - if (empty($do)) { - $id = isset($id) && is_numeric($id) ? $id : 0; - if (empty($id)) { - showMsg('非法操作未指定id', 'javascript:;'); - exit(); - } - $query = "SELECT * FROM {$diy->table} WHERE id=$id"; - $row = $dsql->GetOne($query); - if (!is_array($row)) { - showmsg("您访问的记录不存在或未经审核", '-1'); - exit(); - } - $postform = $diy->getForm('edit', $row, 'admin'); - $fieldlist = $diy->getFieldList(); - $c1 = $row['ifcheck'] == 1 ? 'checked' : ''; - $c2 = $row['ifcheck'] == 0 ? 'checked' : ''; - include DEDEADMIN.'/templets/diy_edit_content.htm'; - } else if ($do == 2) { - $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); - $diyform = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid=$diyid"); - $diyco = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'"); - if (!is_array($diyform)) { - showmsg("自定义表单不存在", '-1'); - exit(); - } - $addsql = ''; - if (!empty($dede_fields)) { - $fieldarr = explode(';', $dede_fields); - if (is_array($fieldarr)) { - foreach ($fieldarr as $field) { - if ($field == '') { - continue; - } - $fieldinfo = explode(',', $field); - if ($fieldinfo[1] == 'htmltext' || $fieldinfo[1] == 'textdata') { - ${$fieldinfo[0]} = filterscript(stripslashes(${$fieldinfo[0]})); - ${$fieldinfo[0]} = addslashes(${$fieldinfo[0]}); - ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); - ${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]}; - } else { - - ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'diy', $fieldinfo[0]); - ${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]}; - } - $addsql .= !empty($addsql) ? ',`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'" : '`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'"; - } - } - } - $query = "UPDATE `$diy->table` SET $addsql WHERE id=$id"; - if ($dsql->ExecuteNoneQuery($query)) { - $goto = "diy_list.php?action=list&diyid={$diy->diyid}"; - showmsg('编辑成功', $goto); - } else { - showmsg('编辑成功', '-1'); - } - } -} elseif ($action == 'check') { - if (is_array($id)) { - $ids = implode(',', $id); - } else { - showmsg('未选中要操作的内容', '-1'); - exit(); - } - $query = "UPDATE `$diy->table` SET ifcheck=1 WHERE id IN ($ids)"; - if ($dsql->ExecuteNoneQuery($query)) { - showmsg('审核成功', "diy_list.php?action=list&diyid={$diy->diyid}"); - } else { - showmsg('审核失败', "diy_list.php?action=list&diyid={$diy->diyid}"); - } -} elseif ($action == 'delete') { - if (empty($do)) { - if (is_array($id)) { - $ids = implode(',', $id); - } else { - showmsg('未选中要操作的内容', '-1'); - exit(); - } - $query = "DELETE FROM `$diy->table` WHERE id IN ($ids)"; - if ($dsql->ExecuteNoneQuery($query)) { - showmsg('删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); - } else { - showmsg('删除失败', "diy_list.php?action=list&diyid={$diy->diyid}"); - } - } else if ($do = 1) { - $row = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'"); - if (file_exists($cfg_basedir.$row[$name])) { - unlink($cfg_basedir.$row[$name]); - $dsql->ExecuteNoneQuery("UPDATE `$diy->table` SET $name='' WHERE id='$id'"); - showmsg('文件删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); - } else { - showmsg('文件不存在', '-1'); - } - } -} -elseif($action == 'excel') { - ob_end_clean();//清除缓冲区,避免乱码 - header("Content-type:application/vnd.ms-excel"); - header("Content-Disposition:attachment;filename={$diy->name}_".date("Y-m-d").".xls"); - print(chr(0xEF).chr(0xBB).chr(0xBF));//清除bom - $fieldlist = $diy->getFieldList(); - echo ""; - foreach($fieldlist as $field=>$fielddata) - { - echo ""; - } - echo ""; - echo ""; - $sql = "SELECT * FROM {$diy->table} ORDER BY id DESC"; - $dsql->SetQuery($sql); - $dsql->Execute('t'); - while($arr = $dsql->GetArray('t')) - { - echo ""; - foreach($fieldlist as $key => $field) - { - echo ""; - } - $status = $arr['ifcheck'] == 1 ? '已审核' : '未审核'; - echo ""; - echo ""; - } - echo "
{$fielddata[0]}状态
".$arr[$key]."".$status."
"; -} else { - showmsg('未定义操作', "-1"); +getForm('post', '', 'admin'); + include DEDEADMIN.'/templets/diy_post.htm'; + } else if ($do == 2) { + $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); + $dede_fieldshash = empty($dede_fieldshash) ? '' : trim($dede_fieldshash); + if (!empty($dede_fields)) { + if ($dede_fieldshash != md5($dede_fields.$cfg_cookie_encode)) { + showMsg("数据校验不对,程序返回", '-1'); + exit(); + } + } + $diyform = $dsql->getOne("SELECT * FROM `#@__diyforms` WHERE diyid=$diyid"); + if (!is_array($diyform)) { + showmsg("自定义表单不存在", '-1'); + exit(); + } + $addvar = $addvalue = ''; + if (!empty($dede_fields)) { + $fieldarr = explode(';', $dede_fields); + if (is_array($fieldarr)) { + foreach ($fieldarr as $field) { + if ($field == '') { + continue; + } + $fieldinfo = explode(',', $field); + if ($fieldinfo[1] == 'htmltext' || $fieldinfo[1] == 'textdata') { + ${$fieldinfo[0]} = HtmlReplace(stripslashes(${$fieldinfo[0]}),1); + ${$fieldinfo[0]} = addslashes(${$fieldinfo[0]}); + ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); + } else { + ${$fieldinfo[0]} = getFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); + } + $addvar .= ', `'.$fieldinfo[0].'`'; + $addvalue .= ", '".${$fieldinfo[0]}."'"; + } + } + } + $query = "INSERT INTO `{$diy->table}` (`id`, `ifcheck` $addvar) VALUES (NULL, 0 $addvalue)"; + if ($dsql->ExecuteNoneQuery($query)) { + $goto = "diy_list.php?action=list&diyid={$diy->diyid}"; + showmsg('发布成功', $goto); + } else { + showmsg('对不起,发布不成功', '-1'); + } + } +} else if ($action == 'list') { + include_once DEDEINC.'/datalistcp.class.php'; + $query = "SELECT * FROM {$diy->table} ORDER BY id DESC"; + $datalist = new DataListCP(); + $datalist->pageSize = 10; + $datalist->SetParameter('action', 'list'); + $datalist->SetParameter('diyid', $diyid); + $datalist->SetTemplate(DEDEADMIN.'/templets/diy_list.htm'); + $datalist->SetSource($query); + $fieldlist = $diy->getFieldList(); + $datalist->Display(); +} else if ($action == 'edit') { + if (empty($do)) { + $id = isset($id) && is_numeric($id) ? $id : 0; + if (empty($id)) { + showMsg('非法操作未指定id', 'javascript:;'); + exit(); + } + $query = "SELECT * FROM {$diy->table} WHERE id=$id"; + $row = $dsql->GetOne($query); + if (!is_array($row)) { + showmsg("您访问的记录不存在或未经审核", '-1'); + exit(); + } + $postform = $diy->getForm('edit', $row, 'admin'); + $fieldlist = $diy->getFieldList(); + $c1 = $row['ifcheck'] == 1 ? 'checked' : ''; + $c2 = $row['ifcheck'] == 0 ? 'checked' : ''; + include DEDEADMIN.'/templets/diy_edit_content.htm'; + } else if ($do == 2) { + $dede_fields = empty($dede_fields) ? '' : trim($dede_fields); + $diyform = $dsql->GetOne("SELECT * FROM `#@__diyforms` WHERE diyid=$diyid"); + $diyco = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'"); + if (!is_array($diyform)) { + showmsg("自定义表单不存在", '-1'); + exit(); + } + $addsql = ''; + if (!empty($dede_fields)) { + $fieldarr = explode(';', $dede_fields); + if (is_array($fieldarr)) { + foreach ($fieldarr as $field) { + if ($field == '') { + continue; + } + $fieldinfo = explode(',', $field); + if ($fieldinfo[1] == 'htmltext' || $fieldinfo[1] == 'textdata') { + ${$fieldinfo[0]} = HtmlReplace(stripslashes(${$fieldinfo[0]}),1); + ${$fieldinfo[0]} = addslashes(${$fieldinfo[0]}); + ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'member'); + ${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]}; + } else { + + ${$fieldinfo[0]} = GetFieldValue(${$fieldinfo[0]}, $fieldinfo[1], 0, 'add', '', 'diy', $fieldinfo[0]); + ${$fieldinfo[0]} = empty(${$fieldinfo[0]}) ? $diyco[$fieldinfo[0]] : ${$fieldinfo[0]}; + } + $addsql .= !empty($addsql) ? ',`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'" : '`'.$fieldinfo[0]."`='".${$fieldinfo[0]}."'"; + } + } + } + $query = "UPDATE `$diy->table` SET $addsql WHERE id=$id"; + if ($dsql->ExecuteNoneQuery($query)) { + $goto = "diy_list.php?action=list&diyid={$diy->diyid}"; + showmsg('编辑成功', $goto); + } else { + showmsg('编辑成功', '-1'); + } + } +} elseif ($action == 'check') { + if (is_array($id) && is_all_numeric($id)) { + $ids = implode(',', $id); + } else { + showmsg('未选中要操作的内容', '-1'); + exit(); + } + $query = "UPDATE `$diy->table` SET ifcheck=1 WHERE id IN ($ids)"; + if ($dsql->ExecuteNoneQuery($query)) { + showmsg('审核成功', "diy_list.php?action=list&diyid={$diy->diyid}"); + } else { + showmsg('审核失败', "diy_list.php?action=list&diyid={$diy->diyid}"); + } +} elseif ($action == 'delete') { + if (empty($do)) { + if (is_array($id)) { + $ids = implode(',', $id); + } else { + showmsg('未选中要操作的内容', '-1'); + exit(); + } + $query = "DELETE FROM `$diy->table` WHERE id IN ($ids)"; + if ($dsql->ExecuteNoneQuery($query)) { + showmsg('删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); + } else { + showmsg('删除失败', "diy_list.php?action=list&diyid={$diy->diyid}"); + } + } else if ($do = 1) { + $row = $dsql->GetOne("SELECT * FROM `$diy->table` WHERE id='$id'"); + if (file_exists($cfg_basedir.$row[$name])) { + unlink($cfg_basedir.$row[$name]); + $dsql->ExecuteNoneQuery("UPDATE `$diy->table` SET $name='' WHERE id='$id'"); + showmsg('文件删除成功', "diy_list.php?action=list&diyid={$diy->diyid}"); + } else { + showmsg('文件不存在', '-1'); + } + } +} +elseif($action == 'excel') { + ob_end_clean();//清除缓冲区,避免乱码 + header("Content-type:application/vnd.ms-excel"); + header("Content-Disposition:attachment;filename={$diy->name}_".date("Y-m-d").".xls"); + print(chr(0xEF).chr(0xBB).chr(0xBF));//清除bom + $fieldlist = (array)$diy->getFieldList(); + echo ""; + foreach($fieldlist as $field=>$fielddata) + { + echo ""; + } + echo ""; + echo ""; + $sql = "SELECT * FROM {$diy->table} ORDER BY id DESC"; + $dsql->SetQuery($sql); + $dsql->Execute('t'); + while($arr = $dsql->GetArray('t')) + { + echo ""; + foreach($fieldlist as $key => $field) + { + echo ""; + } + $status = $arr['ifcheck'] == 1 ? '已审核' : '未审核'; + echo ""; + echo ""; + } + echo "
{$fielddata[0]}状态
".$arr[$key]."".$status."
"; +} else { + showmsg('未定义操作', "-1"); } \ No newline at end of file diff --git a/src/dede/diy_main.php b/src/admin/diy_main.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/diy_main.php rename to src/admin/diy_main.php index fe053326..1db994ce --- a/src/dede/diy_main.php +++ b/src/admin/diy_main.php @@ -1,22 +1,21 @@ -SetTemplet(DEDEADMIN."/templets/diy_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); -$dlist->Close(); +SetTemplet(DEDEADMIN."/templets/diy_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); +$dlist->Close(); \ No newline at end of file diff --git a/src/dede/erraddsave.php b/src/admin/erraddsave.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/erraddsave.php rename to src/admin/erraddsave.php index 7fefb37a..4eccbaf5 --- a/src/dede/erraddsave.php +++ b/src/admin/erraddsave.php @@ -1,100 +1,92 @@ -GetOne($sql); - return $row['uname']; - exit(); - } - exit(); -} - -function typename($me) -{ - switch ($me) { - case $me == 1: - return $me = "错别字"; - break; - case $me == 2: - return $me = "成语运用不当"; - break; - case $me == 3: - return $me = "专业术语写法不规则"; - break; - case $me == 4: - return $me = "产品与图片不符"; - break; - case $me == 5: - return $me = "事实年代以及内容错误"; - break; - case $me == 6: - return $me = "事实年代以及内容错误"; - break; - case $me == 7: - return $me = "其他错误"; - break; - default: - return $me = "未知错误"; - break; - } -} - -if ($dopost == "delete") { - if ($id == '') { - ShowMsg("参数无效", "-1"); - exit(); - } - - - if ($fmdo == 'yes') { - $id = explode("`", $id); - foreach ($id as $var) { - $query = "DELETE FROM `#@__erradd` WHERE `id` = '$var'"; - $dsql->ExecuteNoneQuery($query); - } - ShowMsg("成功删除指定的文档", "erraddsave.php"); - exit(); - } else { - require_once(DEDEINC."/oxwindow.class.php"); - $wintitle = "删除"; - $wecome_info = "错误管理::删除错误"; - $win = new OxWindow(); - $win->Init("erraddsave.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("id", $id); - $win->AddTitle("您确实要删除“ $id ”这些错误提示?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - exit(); - } - exit(); -} - -$sql = "SELECT * FROM `#@__erradd` ORDER BY id desc"; -$dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN."/templets/erradd.htm"); -$dlist->SetSource($sql); -$dlist->display(); +GetOne($sql); + return $row['uname']; + exit(); + } + exit(); +} +function typename($me) +{ + switch ($me) { + case $me == 1: + return $me = "错别字"; + break; + case $me == 2: + return $me = "成语运用不当"; + break; + case $me == 3: + return $me = "专业术语写法不规则"; + break; + case $me == 4: + return $me = "产品与图片不符"; + break; + case $me == 5: + return $me = "事实年代以及内容错误"; + break; + case $me == 6: + return $me = "事实年代以及内容错误"; + break; + case $me == 7: + return $me = "其他错误"; + break; + default: + return $me = "未知错误"; + break; + } +} +if ($dopost == "delete") { + if ($id == '') { + ShowMsg("参数无效", "-1"); + exit(); + } + if ($fmdo == 'yes') { + $id = explode("`", $id); + foreach ($id as $var) { + $query = "DELETE FROM `#@__erradd` WHERE `id` = '$var'"; + $dsql->ExecuteNoneQuery($query); + } + ShowMsg("成功删除指定的文档", "erraddsave.php"); + exit(); + } else { + require_once(DEDEINC."/libraries/oxwindow.class.php"); + $wintitle = "删除"; + $wecome_info = "错误管理::删除错误"; + $win = new OxWindow(); + $win->Init("erraddsave.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("id", $id); + $win->AddTitle("您确实要删除“ $id ”这些错误提示"); + $winform = $win->GetWindow("ok"); + $win->Display(); + exit(); + } + exit(); +} +$sql = "SELECT * FROM `#@__erradd` ORDER BY id desc"; +$dlist = new DataListCP(); +$dlist->SetTemplet(DEDEADMIN."/templets/erradd.htm"); +$dlist->SetSource($sql); +$dlist->display(); \ No newline at end of file diff --git a/src/dede/exit.php b/src/admin/exit.php old mode 100755 new mode 100644 similarity index 86% rename from src/dede/exit.php rename to src/admin/exit.php index f907b11c..8fc0b64d --- a/src/dede/exit.php +++ b/src/admin/exit.php @@ -1,24 +1,23 @@ -exitUser(); -if (empty($needclose)) { - header('location:index.php'); -} else { - $msg = ""; - echo $msg; -} +exitUser(); +if (empty($needclose)) { + header('location:index.php'); +} else { + $msg = ""; + echo $msg; +} \ No newline at end of file diff --git a/src/dede/feedback_edit.php b/src/admin/feedback_edit.php old mode 100755 new mode 100644 similarity index 85% rename from src/dede/feedback_edit.php rename to src/admin/feedback_edit.php index ca85804a..e4d4d1f4 --- a/src/dede/feedback_edit.php +++ b/src/admin/feedback_edit.php @@ -1,43 +1,41 @@ -", ">", $adminmsg); - $adminmsg = str_replace(" ", "  ", $adminmsg); - $adminmsg = str_replace("\r\n", "
\n", $adminmsg); - $msg = $msg."
\n"."管理员回复: $adminmsg\n"; - } - $query = "UPDATE `#@__feedback` SET username='$username',msg='$msg',ischeck=1 WHERE id=$id"; - $dsql->ExecuteNoneQuery($query); - ShowMsg("成功回复一则留言", $ENV_GOBACK_URL); - exit(); -} elseif ($dopost === 'makehtml') { - require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); - $query = "SELECT * FROM `#@__feedback` WHERE id=$id"; - $row = $dsql->GetOne($query); - MakeArt($row['aid']); - ShowMsg("成功更新评论所在的文档内容", $ENV_GOBACK_URL); - exit(); -} -$query = "SELECT * FROM `#@__feedback` WHERE id=$id"; -$row = $dsql->GetOne($query); -include DedeInclude('templets/feedback_edit.htm'); +", ">", $adminmsg); + $adminmsg = str_replace(" ", "  ", $adminmsg); + $adminmsg = str_replace("\r\n", "
\n", $adminmsg); + $msg = $msg."
\n"."管理员回复:$adminmsg\n"; + } + $query = "UPDATE `#@__feedback` SET username='$username',msg='$msg',ischeck=1 WHERE id=$id"; + $dsql->ExecuteNoneQuery($query); + ShowMsg("成功回复一则留言", $ENV_GOBACK_URL); + exit(); +} elseif ($dopost === 'makehtml') { + require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); + $query = "SELECT * FROM `#@__feedback` WHERE id=$id"; + $row = $dsql->GetOne($query); + MakeArt($row['aid']); + ShowMsg("成功更新评论所在的文档内容", $ENV_GOBACK_URL); + exit(); +} +$query = "SELECT * FROM `#@__feedback` WHERE id=$id"; +$row = $dsql->GetOne($query); +include DedeInclude('templets/feedback_edit.htm'); \ No newline at end of file diff --git a/src/dede/feedback_main.php b/src/admin/feedback_main.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/feedback_main.php rename to src/admin/feedback_main.php index 51967c61..bd32d349 --- a/src/dede/feedback_main.php +++ b/src/admin/feedback_main.php @@ -1,123 +1,111 @@ -[未审核]"; -} - -function jsTrimjajx($str, $len) -{ - $str = preg_replace("/{quote}(.*){\/quote}/is", '', $str); - $str = str_replace('<br/>', ' ', $str); - $str = cn_substr($str, $len); - $str = preg_replace("/['\"\r\n]/", "", $str); - $str = str_replace('<', '<', $str); - $str = str_replace('>', '>', $str); - return $str; -} - -if (!empty($job)) { - $ids = preg_replace("#[^0-9,]#", '', $fid); - if (empty($ids)) { - ShowMsg("您没选中任何选项", $_COOKIE['ENV_GOBACK_URL'], 0, 500); - exit; - } -} else { - $job = ''; -} - -// 更新回复统计 -function UpdateReplycount($id) -{ - global $dsql; - $row = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__feedback` WHERE fid = $id AND ischeck=1"); - $dsql->ExecNoneQuery("UPDATE `#@__feedback` SET `replycount`='{$row['dd']}' WHERE `id`=$id;"); -} - -//删除评论 -if ($job == 'del') { - $query = "DELETE FROM `#@__feedback` WHERE id IN($ids) "; - $dsql->ExecuteNoneQuery($query); - ShowMsg("成功删除指定的评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); - exit(); -} -//删除相同IP的所有评论 -else if ($job == 'delall') { - $dsql->SetQuery("SELECT ip FROM `#@__feedback` WHERE id IN ($ids) "); - $dsql->Execute(); - $ips = ''; - while ($row = $dsql->GetArray()) { - $ips .= ($ips == '' ? " ip = '{$row['ip']}' " : " Or ip = '{$row['ip']}' "); - } - if ($ips != '') { - $query = "DELETE FROM `#@__feedback` WHERE $ips "; - $dsql->ExecuteNoneQuery($query); - } - ShowMsg("成功删除指定相同IP的所有评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); - exit(); -} -//审核评论 -else if ($job == 'check') { - - $query = "UPDATE `#@__feedback` SET ischeck=1 WHERE id IN($ids) "; - $dsql->ExecuteNoneQuery($query); - - $dquery = "SELECT * FROM `#@__feedback` WHERE id IN($ids)"; - $dsql->SetQuery($dquery); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - UpdateReplycount($row['fid']); - } - - ShowMsg("成功审核指定评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); - exit(); -} -//浏览评论 -else { - $bgcolor = ''; - $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; - $aid = isset($aid) && is_numeric($aid) ? $aid : 0; - $fid = isset($fid) && is_numeric($fid) ? $fid : 0; - $keyword = !isset($keyword) ? '' : $keyword; - $ip = !isset($ip) ? '' : $ip; - - $tl = new TypeLink($typeid); - $openarray = $tl->GetOptionArray($typeid, $admin_catalogs, 0); - - $addsql = ($typeid != 0 ? " And typeid IN (".GetSonIds($typeid).")" : ''); - $addsql .= ($aid != 0 ? " And aid=$aid " : ''); - $addsql .= ($ip != '' ? " And ip LIKE '$ip' " : ''); - - if ($fid > 0) { - $addsql .= " AND fid={$fid} "; - } - - $querystring = "SELECT * FROM `#@__feedback` WHERE msg LIKE '%$keyword%' $addsql ORDER BY dtime DESC"; - - $dlist = new DataListCP(); - $dlist->pageSize = 15; - $dlist->SetParameter('aid', $aid); - $dlist->SetParameter('ip', $ip); - $dlist->SetParameter('typeid', $typeid); - $dlist->SetParameter('keyword', $keyword); - $dlist->SetTemplate(DEDEADMIN.'/templets/feedback_main.htm'); - $dlist->SetSource($querystring); - $dlist->Display(); -} +[未审核]"; +} +function jsTrimjajx($str, $len) +{ + $str = preg_replace("/{quote}(.*){\/quote}/is", '', $str); + $str = str_replace('<br/>', ' ', $str); + $str = cn_substr($str, $len); + $str = preg_replace("/['\"\r\n]/", "", $str); + $str = str_replace('<', '<', $str); + $str = str_replace('>', '>', $str); + return $str; +} +if (!empty($job)) { + $ids = preg_replace("#[^0-9,]#", '', $fid); + if (empty($ids)) { + ShowMsg("您没选中任何选项", $_COOKIE['ENV_GOBACK_URL'], 0, 500); + exit; + } +} else { + $job = ''; +} +//更新回复统计 +function UpdateReplycount($id) +{ + global $dsql; + $row = $dsql->GetOne("SELECT COUNT(*) as dd FROM `#@__feedback` WHERE fid = $id AND ischeck=1"); + $dsql->ExecNoneQuery("UPDATE `#@__feedback` SET `replycount`='{$row['dd']}' WHERE `id`=$id;"); +} +//删除评论 +if ($job == 'del') { + $query = "DELETE FROM `#@__feedback` WHERE id IN($ids) "; + $dsql->ExecuteNoneQuery($query); + ShowMsg("成功删除指定的评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); + exit(); +} +//删除相同IP的所有评论 +else if ($job == 'delall') { + $dsql->SetQuery("SELECT ip FROM `#@__feedback` WHERE id IN ($ids) "); + $dsql->Execute(); + $ips = ''; + while ($row = $dsql->GetArray()) { + $ips .= ($ips == '' ? " ip = '{$row['ip']}' " : " Or ip = '{$row['ip']}' "); + } + if ($ips != '') { + $query = "DELETE FROM `#@__feedback` WHERE $ips "; + $dsql->ExecuteNoneQuery($query); + } + ShowMsg("成功删除指定相同IP的所有评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); + exit(); +} +//审核评论 +else if ($job == 'check') { + + $query = "UPDATE `#@__feedback` SET ischeck=1 WHERE id IN($ids) "; + $dsql->ExecuteNoneQuery($query); + + $dquery = "SELECT * FROM `#@__feedback` WHERE id IN($ids)"; + $dsql->SetQuery($dquery); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + UpdateReplycount($row['fid']); + } + ShowMsg("成功审核指定评论!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); + exit(); +} +//浏览评论 +else { + $bgcolor = ''; + $typeid = isset($typeid) && is_numeric($typeid) ? $typeid : 0; + $aid = isset($aid) && is_numeric($aid) ? $aid : 0; + $fid = isset($fid) && is_numeric($fid) ? $fid : 0; + $keyword = !isset($keyword) ? '' : $keyword; + $ip = !isset($ip) ? '' : $ip; + $tl = new TypeLink($typeid); + $openarray = $tl->GetOptionArray($typeid, $admin_catalogs, 0); + $addsql = ($typeid != 0 ? " And typeid IN (".GetSonIds($typeid).")" : ''); + $addsql .= ($aid != 0 ? " And aid=$aid " : ''); + $addsql .= ($ip != '' ? " And ip LIKE '$ip' " : ''); + if ($fid > 0) { + $addsql .= " AND fid={$fid} "; + } + $querystring = "SELECT * FROM `#@__feedback` WHERE msg LIKE '%$keyword%' $addsql ORDER BY dtime DESC"; + + $dlist = new DataListCP(); + $dlist->pageSize = 15; + $dlist->SetParameter('aid', $aid); + $dlist->SetParameter('ip', $ip); + $dlist->SetParameter('typeid', $typeid); + $dlist->SetParameter('keyword', $keyword); + $dlist->SetTemplate(DEDEADMIN.'/templets/feedback_main.htm'); + $dlist->SetSource($querystring); + $dlist->Display(); +} \ No newline at end of file diff --git a/src/dede/file_class.php b/src/admin/file_class.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/file_class.php rename to src/admin/file_class.php index 43d58e3b..be96f2b5 --- a/src/dede/file_class.php +++ b/src/admin/file_class.php @@ -1,208 +1,196 @@ -baseDir = $cfg_basedir; - $this->activeDir = $activepath; - } - - //更改文件名 - function RenameFile($oldname, $newname) - { - $oldname = $this->baseDir.$this->activeDir."/".$oldname; - $newname = $this->baseDir.$this->activeDir."/".$newname; - if (($newname != $oldname) && is_writable($oldname)) { - rename($oldname, $newname); - } - ShowMsg("成功更改一个文件名", "file_manage_main.php?activepath=".$this->activeDir); - return 0; - } - - //创建新目录 - function NewDir($dirname) - { - $newdir = $dirname; - $dirname = $this->baseDir.$this->activeDir."/".$dirname; - if (is_writable($this->baseDir.$this->activeDir)) { - MkdirAll($dirname, $GLOBALS['cfg_dir_purview']); - CloseFtp(); - ShowMsg("成功创建一个新目录", "file_manage_main.php?activepath=".$this->activeDir."/".$newdir); - return 1; - } else { - ShowMsg("创建新目录失败,因为这个位置不允许写入", "file_manage_main.php?activepath=".$this->activeDir); - return 0; - } - } - - /** - * 移动文件 - * - * @access public - * @param string $mfile 文件 - * @param string $mpath 路径 - * @return string - */ - function MoveFile($mfile, $mpath) - { - if ($mpath != "" && !preg_match("#\.\.#", $mpath)) { - $oldfile = $this->baseDir.$this->activeDir."/$mfile"; - $mpath = str_replace("\\", "/", $mpath); - $mpath = preg_replace("#\/{1,}#", "/", $mpath); - if (!preg_match("#^/#", $mpath)) { - $mpath = $this->activeDir."/".$mpath; - } - $truepath = $this->baseDir.$mpath; - if (is_readable($oldfile) && is_readable($truepath) && is_writable($truepath)) { - if (is_dir($truepath)) { - copy($oldfile, $truepath."/$mfile"); - } else { - MkdirAll($truepath, $GLOBALS['cfg_dir_purview']); - CloseFtp(); - copy($oldfile, $truepath."/$mfile"); - } - unlink($oldfile); - ShowMsg("成功移动文件", "file_manage_main.php?activepath=$mpath", 0, 1000); - return 1; - } else { - ShowMsg("移动文件 $oldfile -> $truepath/$mfile 失败,可能是某个位置权限不足", "file_manage_main.php?activepath=$mpath", 0, 1000); - return 0; - } - } else { - ShowMsg("对不起,您移动的路径不合法", "-1", 0, 5000); - return 0; - } - } - - /** - * 删除目录 - * - * @param unknown_type $indir - */ - function RmDirFiles($indir) - { - if (!is_dir($indir)) { - return; - } - $dh = dir($indir); - while ($filename = $dh->read()) { - if ($filename == "." || $filename == "..") { - continue; - } else if (is_file("$indir/$filename")) { - @unlink("$indir/$filename"); - } else { - $this->RmDirFiles("$indir/$filename"); - } - } - $dh->close(); - @rmdir($indir); - } - - /** - * 获得某目录合符规则的文件 - * - * @param unknown_type $indir - * @param unknown_type $fileexp - * @param unknown_type $filearr - */ - function GetMatchFiles($indir, $fileexp, &$filearr) - { - $dh = dir($indir); - while ($filename = $dh->read()) { - $truefile = $indir.'/'.$filename; - if ($filename == "." || $filename == "..") { - continue; - } else if (is_dir($truefile)) { - $this->GetMatchFiles($truefile, $fileexp, $filearr); - } else if (substr($filename, -strlen($fileexp)) === $fileexp) { - $filearr[] = $truefile; - } - } - $dh->close(); - } - - /** - * 删除文件 - * - * @param unknown_type $filename - * @return unknown - */ - function DeleteFile($filename) - { - $filename = $this->baseDir.$this->activeDir."/$filename"; - if (is_file($filename)) { - @unlink($filename); - $t = "文件"; - } else { - $t = "目录"; - if ($this->allowDeleteDir == 1) { - $this->RmDirFiles($filename); - } else { - // 完善用户体验,by:sumic - ShowMsg("系统禁止删除".$t."", "file_manage_main.php?activepath=".$this->activeDir); - exit; - } - } - ShowMsg("成功删除一个".$t."", "file_manage_main.php?activepath=".$this->activeDir); - return 0; - } -} - -//目录文件大小检测类 -class SpaceUse -{ - var $totalsize = 0; - - function checksize($indir) - { - $dh = dir($indir); - while ($filename = $dh->read()) { - if (!preg_match("#^\.#", $filename)) { - if (is_dir("$indir/$filename")) { - $this->checksize("$indir/$filename"); - } else { - $this->totalsize = $this->totalsize + filesize("$indir/$filename"); - } - } - } - } - - function setkb($size) - { - $size = $size / 1024; - - if ($size > 0) { - list($t1, $t2) = explode(".", $size); - $size = $t1.".".substr($t2, 0, 1); - } - return $size; - } - - function setmb($size) - { - $size = $size / 1024 / 1024; - if ($size > 0) { - list($t1, $t2) = explode(".", $size); - $size = $t1.".".substr($t2, 0, 2); - } - return $size; - } -} +baseDir = $cfg_basedir; + $this->activeDir = $activepath; + } + //修改文件名 + function RenameFile($oldname, $newname) + { + $oldname = $this->baseDir.$this->activeDir."/".$oldname; + $newname = $this->baseDir.$this->activeDir."/".$newname; + if (($newname != $oldname) && is_writable($oldname)) { + rename($oldname, $newname); + } + ShowMsg("成功修改一个文件名", "file_manage_main.php?activepath=".$this->activeDir); + return 0; + } + //创建新目录 + function NewDir($dirname) + { + $newdir = $dirname; + $dirname = $this->baseDir.$this->activeDir."/".$dirname; + if (is_writable($this->baseDir.$this->activeDir)) { + MkdirAll($dirname, $GLOBALS['cfg_dir_purview']); + CloseFtp(); + ShowMsg("成功创建一个新目录", "file_manage_main.php?activepath=".$this->activeDir."/".$newdir); + return 1; + } else { + ShowMsg("创建新目录失败,因为这个位置不允许写入", "file_manage_main.php?activepath=".$this->activeDir); + return 0; + } + } + /** + * 移动文件 + * + * @access public + * @param string $mfile 文件 + * @param string $mpath 路径 + * @return string + */ + function MoveFile($mfile, $mpath) + { + if ($mpath != "" && !preg_match("#\.\.#", $mpath)) { + $oldfile = $this->baseDir.$this->activeDir."/$mfile"; + $mpath = str_replace("\\", "/", $mpath); + $mpath = preg_replace("#\/{1,}#", "/", $mpath); + if (!preg_match("#^/#", $mpath)) { + $mpath = $this->activeDir."/".$mpath; + } + $truepath = $this->baseDir.$mpath; + if (is_readable($oldfile) && is_readable($truepath) && is_writable($truepath)) { + if (is_dir($truepath)) { + copy($oldfile, $truepath."/$mfile"); + } else { + MkdirAll($truepath, $GLOBALS['cfg_dir_purview']); + CloseFtp(); + copy($oldfile, $truepath."/$mfile"); + } + unlink($oldfile); + ShowMsg("成功移动文件", "file_manage_main.php?activepath=$mpath", 0, 1000); + return 1; + } else { + ShowMsg("移动文件 $oldfile -> $truepath/$mfile 失败,可能是某个位置权限不足", "file_manage_main.php?activepath=$mpath", 0, 1000); + return 0; + } + } else { + ShowMsg("对不起,您移动的路径不合法", "-1", 0, 5000); + return 0; + } + } + /** + * 删除目录 + * + * @param unknown_type $indir + */ + function RmDirFiles($indir) + { + if (!is_dir($indir)) { + return; + } + $dh = dir($indir); + while ($filename = $dh->read()) { + if ($filename == "." || $filename == "..") { + continue; + } else if (is_file("$indir/$filename")) { + @unlink("$indir/$filename"); + } else { + $this->RmDirFiles("$indir/$filename"); + } + } + $dh->close(); + @rmdir($indir); + } + /** + * 获得某目录合符规则的文件 + * + * @param unknown_type $indir + * @param unknown_type $fileexp + * @param unknown_type $filearr + */ + function GetMatchFiles($indir, $fileexp, &$filearr) + { + $dh = dir($indir); + while ($filename = $dh->read()) { + $truefile = $indir.'/'.$filename; + if ($filename == "." || $filename == "..") { + continue; + } else if (is_dir($truefile)) { + $this->GetMatchFiles($truefile, $fileexp, $filearr); + } else if (substr($filename, -strlen($fileexp)) === $fileexp) { + $filearr[] = $truefile; + } + } + $dh->close(); + } + /** + * 删除文件 + * + * @param unknown_type $filename + * @return unknown + */ + function DeleteFile($filename) + { + $filename = $this->baseDir.$this->activeDir."/$filename"; + if (is_file($filename)) { + @unlink($filename); + $t = "文件"; + } else { + $t = "目录"; + if ($this->allowDeleteDir == 1) { + $this->RmDirFiles($filename); + } else { + //完善用户体验,by:sumic + ShowMsg("系统禁止删除".$t."", "file_manage_main.php?activepath=".$this->activeDir); + exit; + } + } + ShowMsg("成功删除一个".$t."", "file_manage_main.php?activepath=".$this->activeDir); + return 0; + } +} +//目录文件大小检测类 +class SpaceUse +{ + var $totalsize = 0; + function checksize($indir) + { + $dh = dir($indir); + while ($filename = $dh->read()) { + if (!preg_match("#^\.#", $filename)) { + if (is_dir("$indir/$filename")) { + $this->checksize("$indir/$filename"); + } else { + $this->totalsize = $this->totalsize + filesize("$indir/$filename"); + } + } + } + } + function setkb($size) + { + $size = $size / 1024; + if ($size > 0) { + list($t1, $t2) = explode(".", $size); + $size = $t1.".".substr($t2, 0, 1); + } + return $size; + } + function setmb($size) + { + $size = $size / 1024 / 1024; + if ($size > 0) { + list($t1, $t2) = explode(".", $size); + $size = $t1.".".substr($t2, 0, 2); + } + return $size; + } +} \ No newline at end of file diff --git a/src/dede/file_manage_control.php b/src/admin/file_manage_control.php old mode 100755 new mode 100644 similarity index 77% rename from src/dede/file_manage_control.php rename to src/admin/file_manage_control.php index 288d9149..35ccddc6 --- a/src/dede/file_manage_control.php +++ b/src/admin/file_manage_control.php @@ -1,5 +1,4 @@ Init(); - /*--------------- function __rename(); ----------------*/ if ($fmdo == "rename") { $fmm->RenameFile($oldfilename, $newfilename); } - //新建目录 - /*--------------- function __newdir(); -----------------*/ else if ($fmdo == "newdir") { +----------------*/ +else if ($fmdo == "newdir") { CheckCSRF(); $fmm->NewDir($newpath); } - //移动文件 - /*--------------- function __move(); -----------------*/ else if ($fmdo == "move") { +----------------*/ +else if ($fmdo == "move") { $fmm->MoveFile($filename, $newpath); } - //删除文件 - /*--------------- function __delfile(); -----------------*/ else if ($fmdo == "del") { +----------------*/ +else if ($fmdo == "del") { $fmm->DeleteFile($filename); } - //文件编辑 - /*--------------- function __saveEdit(); -----------------*/ else if ($fmdo == "edit") { +----------------*/ +else if ($fmdo == "edit") { CheckCSRF(); $filename = str_replace("..", "", $filename); + if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)$#i', trim($filename))) { + ShowMsg("您指定的文件名被系统禁止", "javascript:;"); + exit(); + } $file = "$cfg_basedir$activepath/$filename"; $str = stripslashes($str); $fp = fopen($file, "w"); @@ -97,7 +94,8 @@ else if($fmdo=="editview") //文件上传 /*--------------- function __upload(); -----------------*/ else if ($fmdo == "upload") { +----------------*/ +else if ($fmdo == "upload") { $j = 0; for ($i = 1; $i <= 50; $i++) { $upfile = "upfile".$i; @@ -108,6 +106,16 @@ function __upload(); $upfile = ${$upfile}; $upfile_name = ${$upfile_name}; if (is_uploaded_file($upfile)) { + // 检查文件类型 + $mime = get_mime_type($upfile); + if (preg_match("#^unknow#", $mime)) { + ShowMsg("系统不支持fileinfo组件,建议php.ini中开启", -1); + exit; + } + if (!preg_match("#^(image|video|audio|application)#i", $mime)) { + ShowMsg("仅支持媒体文件及应用程序上传", -1); + exit; + } if (!file_exists($cfg_basedir.$activepath."/".$upfile_name)) { move_uploaded_file($upfile, $cfg_basedir.$activepath."/".$upfile_name); } @@ -118,7 +126,6 @@ function __upload(); ShowMsg("成功上传 $j 个文件到: $activepath", "file_manage_main.php?activepath=$activepath"); exit(); } - //空间检查 else if ($fmdo == "space") { if ($activepath == "") { @@ -126,7 +133,7 @@ else if ($fmdo == "space") { } else { $ecpath = $activepath; } - $titleinfo = "目录 $ecpath 空间使用状况:
"; + $titleinfo = "目录 $ecpath 空间使用状况:
"; $wintitle = "文件管理"; $wecome_info = "文件管理::空间大小检查 [文件浏览器]"; $activepath = $cfg_basedir.$activepath; @@ -138,7 +145,7 @@ else if ($fmdo == "space") { $win = new OxWindow(); $win->Init("", "js/blank.js", "POST"); $win->AddTitle($titleinfo); - $win->AddMsgItem("  $totalmb M
  $totalkb KB
  $total 字节"); + $win->AddMsgItem("  $totalmb M
  $totalkb KB
  $total 字节"); $winform = $win->GetWindow(""); $win->Display(); -} +} \ No newline at end of file diff --git a/src/dede/file_manage_main.php b/src/admin/file_manage_main.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/file_manage_main.php rename to src/admin/file_manage_main.php index bc9448b6..409485bf --- a/src/dede/file_manage_main.php +++ b/src/admin/file_manage_main.php @@ -1,30 +1,26 @@ -文件浏览器]"; + $wecome_info = "文件管理::修改文件名 [文件浏览器]"; $win = new OxWindow(); $win->Init("file_manage_control.php", "js/blank.js", "POST"); $win->AddHidden("fmdo", $fmdo); $win->AddHidden("activepath", $activepath); $win->AddHidden("filename", $filename); - $win->AddTitle("更改文件名,当前路径:$ndirstring"); + $win->AddTitle("修改文件名,当前路径:$ndirstring"); $win->AddItem("旧名称:", ""); $win->AddItem("新名称:", ""); $winform = $win->GetWindow("ok"); @@ -40,7 +38,6 @@ if ($fmdo == "rename") { else if ($fmdo == "newdir") { if ($activepath == "") $activepathname = "根目录"; else $activepathname = $activepath; - $wintitle = " 文件管理"; $wecome_info = " 文件管理::新建目录 [文件浏览器]"; $win = new OxWindow(); @@ -53,7 +50,6 @@ else if ($fmdo == "newdir") { $winform = $win->GetWindow("ok"); $win->Display(); } - //移动文件 else if ($fmdo == "move") { $wintitle = " 文件管理"; @@ -63,14 +59,13 @@ else if ($fmdo == "move") { $win->AddHidden("fmdo", $fmdo); $win->AddHidden("activepath", $activepath); $win->AddHidden("filename", $filename); - $win->AddTitle("新位置前面不加'/'表示相对于当前位置,加'/'表示相对于根目录。"); + $win->AddTitle("新位置前面不加'/'表示相对于当前位置,加'/'表示相对于根目录"); $win->AddItem("被移动文件:", $filename); $win->AddItem("当前位置:", $activepath); $win->AddItem("新位置:", ""); $winform = $win->GetWindow("ok"); $win->Display(); } - //删除文件 else if ($fmdo == "del") { $wintitle = " 文件管理"; @@ -81,22 +76,20 @@ else if ($fmdo == "del") { $win->AddHidden("activepath", $activepath); $win->AddHidden("filename", $filename); if (@is_dir($cfg_basedir.$activepath."/$filename")) { - $wmsg = "您确信要删除目录:$filename 吗?"; + $wmsg = "您确信要删除目录:$filename 吗"; } else { - $wmsg = "您确信要删除文件:$filename 吗?"; + $wmsg = "您确信要删除文件:$filename 吗"; } $win->AddTitle("删除文件确认"); $win->AddMsgItem($wmsg, "50"); $winform = $win->GetWindow("ok"); $win->Display(); } - //编辑文件 else if ($fmdo == "edit") { if (!isset($backurl)) { $backurl = ""; } - $activepath = str_replace("..", "", $activepath); $filename = str_replace("..", "", $filename); $file = "$cfg_basedir$activepath/$filename"; @@ -143,9 +136,7 @@ else if($fmdo=="editview") if((eregi("LoadTemplate(DEDEADMIN."/templets/file_edit.htm"); $ctp->display(); } - //上传文件 else if ($fmdo == "upload") { $ctp = new DedeTagParse(); $ctp->LoadTemplate(DEDEADMIN."/templets/file_upload.htm"); $ctp->display(); -} +} \ No newline at end of file diff --git a/src/dede/freelist_add.php b/src/admin/freelist_add.php old mode 100755 new mode 100644 similarity index 78% rename from src/dede/freelist_add.php rename to src/admin/freelist_add.php index 2a32de96..e57511d4 --- a/src/dede/freelist_add.php +++ b/src/admin/freelist_add.php @@ -1,51 +1,47 @@ -ExecuteNoneQuery($inquery); - ShowMsg("成功增加一个自由列表!", "freelist_main.php"); - exit(); -} +ExecuteNoneQuery($inquery); + ShowMsg("成功增加一个自由列表!", "freelist_main.php"); + exit(); +} \ No newline at end of file diff --git a/src/dede/freelist_edit.php b/src/admin/freelist_edit.php old mode 100755 new mode 100644 similarity index 77% rename from src/dede/freelist_edit.php rename to src/admin/freelist_edit.php index fd262b23..2923d368 --- a/src/dede/freelist_edit.php +++ b/src/admin/freelist_edit.php @@ -1,57 +1,53 @@ -GetOne("Select * From `#@__freelist` where aid='$aid' "); - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("dede", "{", "}"); - $dtp->LoadSource("--".$row['listtag']."--"); - $ctag = $dtp->GetTag('list'); - include DedeInclude('templets/freelist_edit.htm'); - exit(); -} else if ($dopost == 'save') { - if (!isset($types)) $types = ''; - if (!isset($nodefault)) $nodefault = '0'; - $atts = " pagesize='$pagesize' col='$col' titlelen='$titlelen' orderby='$orderby' orderway='$order' \r\n"; - $ntype = ''; - $edtime = time(); - if (is_array($types)) { - foreach ($types as $v) $ntype .= $v.' '; - } - - if ($ntype != '') $atts .= " type='".trim($ntype)."' "; - if (!empty($typeid)) $atts .= " typeid='$typeid' "; - if (!empty($channel)) $atts .= " channel='$channel' "; - if (!empty($subday)) $atts .= " subday='$subday' "; - if (!empty($keywordarc)) $atts .= " keyword='$keywordarc' "; - if (!empty($att)) $atts .= " att='$att' "; - - $innertext = trim($innertext); - if (!empty($innertext)) $innertext = stripslashes($innertext); - - $listTag = "{dede:list $atts}$innertext{/dede:list}"; - $listTag = addslashes($listTag); - $inquery = " - UPDATE `#@__freelist` set - title='$title', namerule='$namerule', - listdir='$listdir', defaultpage='$defaultpage', - nodefault='$nodefault', templet='$templet', - edtime='$edtime', `maxpage`='$maxpage', listtag='$listTag', keywords='$keywords', - description='$description' WHERE aid='$aid'; - "; - $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功更改一个自由列表!", "freelist_main.php"); - exit(); -} +GetOne("Select * From `#@__freelist` where aid='$aid' "); + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("dede", "{", "}"); + $dtp->LoadSource("--".$row['listtag']."--"); + $ctag = $dtp->GetTag('list'); + include DedeInclude('templets/freelist_edit.htm'); + exit(); +} else if ($dopost == 'save') { + if (!isset($types)) $types = ''; + if (!isset($nodefault)) $nodefault = '0'; + $atts = " pagesize='$pagesize' col='$col' titlelen='$titlelen' orderby='$orderby' orderway='$order' \r\n"; + $ntype = ''; + $edtime = time(); + if (is_array($types)) { + foreach ($types as $v) $ntype .= $v.' '; + } + if ($ntype != '') $atts .= " type='".trim($ntype)."' "; + if (!empty($typeid)) $atts .= " typeid='$typeid' "; + if (!empty($channel)) $atts .= " channel='$channel' "; + if (!empty($subday)) $atts .= " subday='$subday' "; + if (!empty($keywordarc)) $atts .= " keyword='$keywordarc' "; + if (!empty($att)) $atts .= " att='$att' "; + $innertext = trim($innertext); + if (!empty($innertext)) $innertext = stripslashes($innertext); + $listTag = "{dede:list $atts}$innertext{/dede:list}"; + $listTag = addslashes($listTag); + $inquery = " + UPDATE `#@__freelist` set + title='$title', namerule='$namerule', + listdir='$listdir', defaultpage='$defaultpage', + nodefault='$nodefault', templet='$templet', + edtime='$edtime', `maxpage`='$maxpage', listtag='$listTag', keywords='$keywords', + description='$description' WHERE aid='$aid'; + "; + $dsql->ExecuteNoneQuery($inquery); + ShowMsg("成功修改一个自由列表", "freelist_main.php"); + exit(); +} \ No newline at end of file diff --git a/src/dede/freelist_main.php b/src/admin/freelist_main.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/freelist_main.php rename to src/admin/freelist_main.php index aa1239a0..d9180984 --- a/src/dede/freelist_main.php +++ b/src/admin/freelist_main.php @@ -1,99 +1,92 @@ -ExecuteNoneQuery("DELETE FROM `#@__freelist` WHERE aid='$aid'; "); - AjaxHead(); - GetTagList($dsql,$pageno,$pagesize,$orderby); - exit(); -} - -//第一次进入这个页面 -if($dopost=='') -{ - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__freelist` $addsql "); - $totalRow = $row['dd']; - include(DEDEADMIN."/templets/freelist_main.htm"); -} - -/** - * 获得特定的Tag列表 - * - * @param object $dsql - * @param int $pageno - * @param int $pagesize - * @param string $orderby - */ -function GetTagList($dsql,$pageno,$pagesize,$orderby='aid') -{ - global $cfg_phpurl,$addsql; - $start = ($pageno-1) * $pagesize; - $printhead =" - - - - - - - - \r\n"; - echo $printhead; - $dsql->SetQuery("Select aid,title,templet,click,edtime,namerule,listdir,defaultpage,nodefault From #@__freelist $addsql order by $orderby desc limit $start,$pagesize "); - $dsql->Execute(); - while($row = $dsql->GetArray()) - { - $listurl = GetFreeListUrl($row['aid'],$row['namerule'],$row['listdir'],$row['defaultpage'],$row['nodefault']); - $line = " - - - - - - - - "; - echo $line; - } - echo "
ID列表名称模板文件点击创建时间管理
{$row['aid']} {$row['title']} {$row['templet']} {$row['click']} ".MyDate("y-m-d",$row['edtime'])." 更改 - 更新 - 删除 -
\r\n"; -} +ExecuteNoneQuery("DELETE FROM `#@__freelist` WHERE aid='$aid'; "); + AjaxHead(); + GetTagList($dsql,$pageno,$pagesize,$orderby); + exit(); +} +//第一次进入这个页面 +if($dopost=='') +{ + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__freelist` $addsql "); + $totalRow = $row['dd']; + include(DEDEADMIN."/templets/freelist_main.htm"); +} +/** + * 获得特定的Tag列表 + * + * @param object $dsql + * @param int $pageno + * @param int $pagesize + * @param string $orderby + */ +function GetTagList($dsql,$pageno,$pagesize,$orderby='aid') +{ + global $cfg_phpurl,$addsql; + $start = ($pageno-1) * $pagesize; + $printhead =" + + + + + + + + \r\n"; + echo $printhead; + $dsql->SetQuery("Select aid,title,templet,click,edtime,namerule,listdir,defaultpage,nodefault From #@__freelist $addsql order by $orderby desc limit $start,$pagesize "); + $dsql->Execute(); + while($row = $dsql->GetArray()) + { + $listurl = GetFreeListUrl($row['aid'],$row['namerule'],$row['listdir'],$row['defaultpage'],$row['nodefault']); + $line = " + + + + + + + "; + echo $line; + } + echo "
ID列表名称模板文件点击创建时间管理
{$row['aid']} {$row['title']} {$row['templet']} {$row['click']} ".MyDate("y-m-d",$row['edtime'])." 修改 + 更新 + 删除 +
\r\n"; +} \ No newline at end of file diff --git a/src/dede/friendlink_add.php b/src/admin/friendlink_add.php old mode 100755 new mode 100644 similarity index 79% rename from src/dede/friendlink_add.php rename to src/admin/friendlink_add.php index 9a0f5e53..2dda1b53 --- a/src/dede/friendlink_add.php +++ b/src/admin/friendlink_add.php @@ -1,55 +1,61 @@ -ExecuteNoneQuery("ALTER TABLE `#@__flinktype` CHANGE `ID` `id` MEDIUMINT( 8 ) UNSIGNED DEFAULT NULL AUTO_INCREMENT; "); - } - - $query = "INSERT INTO `#@__flink`(sortrank,url,webname,logo,msg,email,typeid,dtime,ischeck) - VALUES('$sortrank','$url','$webname','$imgurl','$msg','$email','$typeid','$dtime','$ischeck'); "; - $rs = $dsql->ExecuteNoneQuery($query); - $burl = empty($_COOKIE['ENV_GOBACK_URL']) ? "friendlink_main.php" : $_COOKIE['ENV_GOBACK_URL']; - if ($rs) { - ShowMsg("成功增加一个链接!", $burl, 0, 500); - exit(); - } else { - ShowMsg("增加链接时出错,请向官方反馈,原因:".$dsql->GetError(), "javascript:;"); - exit(); - } -} -include DedeInclude('templets/friendlink_add.htm'); +ExecuteNoneQuery("ALTER TABLE `#@__flinktype` CHANGE `ID` `id` MEDIUMINT( 8 ) UNSIGNED DEFAULT NULL AUTO_INCREMENT; "); + } + $query = "INSERT INTO `#@__flink`(sortrank,url,webname,logo,msg,email,typeid,dtime,ischeck) + VALUES('$sortrank','$url','$webname','$imgurl','$msg','$email','$typeid','$dtime','$ischeck'); "; + $rs = $dsql->ExecuteNoneQuery($query); + $burl = empty($_COOKIE['ENV_GOBACK_URL']) ? "friendlink_main.php" : $_COOKIE['ENV_GOBACK_URL']; + if ($rs) { + ShowMsg("成功增加一个链接!", $burl, 0, 500); + exit(); + } else { + ShowMsg("增加链接时出错,请向官方反馈,原因:".$dsql->GetError(), "javascript:;"); + exit(); + } +} +include DedeInclude('templets/friendlink_add.htm'); \ No newline at end of file diff --git a/src/dede/friendlink_edit.php b/src/admin/friendlink_edit.php old mode 100755 new mode 100644 similarity index 76% rename from src/dede/friendlink_edit.php rename to src/admin/friendlink_edit.php index 8b7132d7..39fcf7f0 --- a/src/dede/friendlink_edit.php +++ b/src/admin/friendlink_edit.php @@ -1,68 +1,62 @@ -ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$id'"); - ShowMsg("成功删除一个链接", $ENV_GOBACK_URL); - exit(); -} else if ($dopost == "delall") { - $aids = explode(',', $aids); - if (isset($aids) && is_array($aids)) { - foreach ($aids as $aid) { - $aid = preg_replace("#[^0-9]#", "", $aid); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$aid'"); - } - ShowMsg("成功删除指定链接", $ENV_GOBACK_URL); - exit(); - } else { - ShowMsg("您没选定任何链接", $ENV_GOBACK_URL); - exit(); - } -} else if ($dopost == "saveedit") { - require_once DEDEINC.'/request.class.php'; - $request = new Request(); - $request->Init(); - $id = preg_replace("#[^0-9]#", "", $request->Item('id', 0)); - $logo = $request->Item('logo', ''); - $logoimg = $request->Upfile('logoimg', ''); - if (!empty($logoimg)) { - $request->MoveUploadFile('logoimg', DEDEROOT.'/uploads/flink/'.$request->GetFileInfo('logoimg', 'name')); - $logo = $cfg_cmspath.'/uploads/flink/'.$request->GetFileInfo('logoimg', 'name'); - } - $sortrank = $request->Item('sortrank', 1); - $url = $request->Item('url', ''); - $webname = $request->Item('webname', ''); - $msg = $request->Item('msg', ''); - $email = $request->Item('email', ''); - $typeid = $request->Item('typeid', 0); - $ischeck = $request->Item('ischeck', 0); - - $query = "UPDATE `#@__flink` SET sortrank='$sortrank',url='$url',webname='$webname',logo='$logo',msg='$msg', - email='$email',typeid='$typeid',ischeck='$ischeck' WHERE id='$id' "; - $dsql->ExecuteNoneQuery($query); - ShowMsg("成功更改一个链接", $ENV_GOBACK_URL); - exit(); -} -$myLink = $dsql->GetOne("SELECT #@__flink.*,#@__flinktype.typename FROM #@__flink LEFT JOIN #@__flinktype ON #@__flink.typeid=#@__flinktype.id WHERE #@__flink.id=$id"); -include DedeInclude('templets/friendlink_edit.htm'); +ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$id'"); + ShowMsg("成功删除一个链接", $ENV_GOBACK_URL); + exit(); +} else if ($dopost == "delall") { + $aids = explode(',', $aids); + if (isset($aids) && is_array($aids)) { + foreach ($aids as $aid) { + $aid = preg_replace("#[^0-9]#", "", $aid); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$aid'"); + } + ShowMsg("成功删除指定链接", $ENV_GOBACK_URL); + exit(); + } else { + ShowMsg("您没选定任何链接", $ENV_GOBACK_URL); + exit(); + } +} else if ($dopost == "saveedit") { + $id = preg_replace("#[^0-9]#", "", $id); + $logo = $request->Item('logo', ''); + $logoimg = $request->Upfile('logoimg', ''); + if (!empty($logoimg)) { + $request->MoveUploadFile('logoimg', DEDEROOT.'/uploads/flink/'.$request->GetFileInfo('logoimg', 'name')); + $logo = $cfg_cmspath.'/uploads/flink/'.$request->GetFileInfo('logoimg', 'name'); + } + $sortrank = $request->Item('sortrank', 1); + $url = $request->Item('url', ''); + $webname = $request->Item('webname', ''); + $msg = $request->Item('msg', ''); + $email = $request->Item('email', ''); + $typeid = $request->Item('typeid', 0); + $ischeck = $request->Item('ischeck', 0); + $query = "UPDATE `#@__flink` SET sortrank='$sortrank',url='$url',webname='$webname',logo='$logo',msg='$msg', email='$email',typeid='$typeid',ischeck='$ischeck' WHERE id='$id' "; + $dsql->ExecuteNoneQuery($query); + ShowMsg("成功修改一个链接", $ENV_GOBACK_URL); + exit(); +} +$myLink = $dsql->GetOne("SELECT `#@__flink`.*,`#@__flinktype`.typename FROM `#@__flink` LEFT JOIN `#@__flinktype` ON `#@__flink`.typeid=`#@__flinktype`.id WHERE `#@__flink`.id=$id"); +include DedeInclude('templets/friendlink_edit.htm'); \ No newline at end of file diff --git a/src/dede/friendlink_main.php b/src/admin/friendlink_main.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/friendlink_main.php rename to src/admin/friendlink_main.php index 58755156..ba73d1e5 --- a/src/dede/friendlink_main.php +++ b/src/admin/friendlink_main.php @@ -1,47 +1,40 @@ - '不限类型', -1 => '未审核', 1 => '内页', 2 => '首页'); - -$sql = "SELECT * FROM `#@__flink` WHERE CONCAT(`url`,`webname`,`email`) LIKE '%$keyword%' $ischeckSql ORDER BY dtime desc"; - -$dlist = new DataListCP(); -$dlist->SetParameter('keyword', $keyword); -$dlist->SetParameter('ischeck', $ischeck); -$dlist->SetTemplet(DEDEADMIN.'/templets/friendlink_main.htm'); -$dlist->SetSource($sql); -$dlist->display(); - -function GetPic($pic) -{ - if ($pic == '') return '无图标'; - else return ""; -} - -function GetSta($sta) -{ - if ($sta == 1) return '内页'; - if ($sta == 2) return '首页'; - else return '未审核'; -} + '不限类型', -1 => '未审核', 1 => '内页', 2 => '首页'); +$sql = "SELECT * FROM `#@__flink` WHERE CONCAT(`url`,`webname`,`email`) LIKE '%$keyword%' $ischeckSql ORDER BY dtime desc"; +$dlist = new DataListCP(); +$dlist->SetParameter('keyword', $keyword); +$dlist->SetParameter('ischeck', $ischeck); +$dlist->SetTemplet(DEDEADMIN.'/templets/friendlink_main.htm'); +$dlist->SetSource($sql); +$dlist->display(); +function GetPic($pic) +{ + if ($pic == '') return '无图标'; + else return ""; +} +function GetSta($sta) +{ + if ($sta == 1) return '内页'; + if ($sta == 2) return '首页'; + else return '未审核'; +} \ No newline at end of file diff --git a/src/dede/friendlink_type.php b/src/admin/friendlink_type.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/friendlink_type.php rename to src/admin/friendlink_type.php index 5f6bef01..02bbd9a5 --- a/src/dede/friendlink_type.php +++ b/src/admin/friendlink_type.php @@ -1,42 +1,39 @@ -ExecuteNoneQuery($query); - } - } else { - $query = "DELETE FROM `#@__flinktype` WHERE id='$tid' "; - $dsql->ExecuteNoneQuery($query); - } - } - //增加新记录 - if (isset($check_new) && $pname_new != '') { - $query = "INSERT INTO `#@__flinktype`(typename) VALUES('{$pname_new}');"; - $dsql->ExecuteNoneQuery($query); - } - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - echo ""; -} - -include DedeInclude('templets/friendlink_type.htm'); +ExecuteNoneQuery($query); + } + } else { + $query = "DELETE FROM `#@__flinktype` WHERE id='$tid' "; + $dsql->ExecuteNoneQuery($query); + } + } + //增加新记录 + if (isset($check_new) && $pname_new != '') { + $query = "INSERT INTO `#@__flinktype`(typename) VALUES('{$pname_new}');"; + $dsql->ExecuteNoneQuery($query); + } + header("Content-Type: text/html; charset={$cfg_soft_lang}"); + echo ""; +} +include DedeInclude('templets/friendlink_type.htm'); \ No newline at end of file diff --git a/src/dede/imagecut.php b/src/admin/imagecut.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/imagecut.php rename to src/admin/imagecut.php index 85ec2bca..b16d50f6 --- a/src/dede/imagecut.php +++ b/src/admin/imagecut.php @@ -1,126 +1,117 @@ -点击'站内选择', 上传或选择一个图片,然后才能进行裁剪", "./dialog/select_images.php?f=form1.picname&imgstick=small", 0, 10000); - exit(); - } - include DEDEADMIN.'/templets/imagecut.htm'; - exit(); -} elseif ($action == 'cut') { - require_once(DEDEINC.'/image.func.php'); - - if (!@is_file($cfg_basedir.$file)) { - ShowMsg('对不起,请重新选择裁剪图片', '-1'); - exit(); - } - if (empty($width)) { - ShowMsg('对不起,请选择裁剪图片的尺寸', '-1'); - exit(); - } - if (empty($height)) { - ShowMsg('对不起,请选择裁剪图片的尺寸', '-1'); - exit(); - } - $imginfo = getimagesize($cfg_basedir.$file); - $imgw = $imginfo[0]; - $imgh = $imginfo[1]; - $temp = 400 / $imgw; - $newwidth = 400; - $newheight = $imgh * $temp; - $srcFile = $cfg_basedir.$file; - $thumb = imagecreatetruecolor($newwidth, $newheight); - $thumba = imagecreatetruecolor($width, $height); - - switch ($imginfo['mime']) { - case 'image/jpeg': - $source = imagecreatefromjpeg($srcFile); - break; - case 'image/gif': - $source = imagecreatefromgif($srcFile); - break; - case 'image/png': - $source = imagecreatefrompng($srcFile); - break; - default: - ShowMsg('对不起,裁剪图片类型不支持请选择其他类型图片', '-1'); - break; - } - - imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $imgw, $imgh); - imagecopy($thumba, $thumb, 0, 0, $left, $top, $newwidth, $newheight); - - $ddn = substr($srcFile, -3); - - $ddpicok = $reObjJs = ''; - if (empty($isupload)) { - $ddpicok = preg_replace("#\.".$ddn."$#", '-lp.'.$ddn, $file); - $reObjJs = " var backObj = window.opener.document.form1.picname; - var prvObj = window.opener.document.getElementById('divpicview');\r\n"; - } else { - $ddpicok = $file; - $reObjJs = " var backObj = window.opener.parent.document.form1.picname; - var prvObj = window.opener.parent.document.getElementById('divpicview');\r\n"; - } - - $ddpicokurl = $cfg_basedir.$ddpicok; - - switch ($imginfo['mime']) { - case 'image/jpeg': - imagejpeg($thumba, $ddpicokurl, 85); - break; - case 'image/gif': - imagegif($thumba, $ddpicokurl); - break; - case 'image/png': - imagepng($thumba, $ddpicokurl); - break; - default: - ShowMsg("对不起,裁剪图片类型不支持请选择其他类型图片", "-1"); - break; - } - - //对任意裁剪方式再次缩小图片至限定大小 - if ($newwidth > $cfg_ddimg_width || $newheight > $cfg_ddimg_height) { - ImageResize($ddpicokurl, $cfg_ddimg_width, $cfg_ddimg_height); - } - - //如果从其它图中剪出, 保存附件信息 - if (empty($isupload)) { - $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$ddpicok','$ddpicok','1','0','0','0','".filesize($ddpicokurl)."','".time()."','".$cuserLogin->getUserID()."'); "; - $dsql->ExecuteNoneQuery($inquery); - $fid = $dsql->GetLastID(); - AddMyAddon($fid, $ddpicok); - } - -?> - -点击'站内选择', 上传或选择一个图片,然后才能进行裁剪", "./dialog/select_images.php?f=form1.picname&imgstick=small", 0, 10000); + exit(); + } + include DEDEADMIN.'/templets/imagecut.htm'; + exit(); +} elseif ($action == 'cut') { + require_once(DEDEINC.'/image.func.php'); + + if (!@is_file($cfg_basedir.$file)) { + ShowMsg('对不起,请重新选择裁剪图片', '-1'); + exit(); + } + if (empty($width)) { + ShowMsg('对不起,请选择裁剪图片的尺寸', '-1'); + exit(); + } + if (empty($height)) { + ShowMsg('对不起,请选择裁剪图片的尺寸', '-1'); + exit(); + } + $imginfo = getimagesize($cfg_basedir.$file); + $imgw = $imginfo[0]; + $imgh = $imginfo[1]; + $temp = 400 / $imgw; + $newwidth = 400; + $newheight = $imgh * $temp; + $srcFile = $cfg_basedir.$file; + $thumb = imagecreatetruecolor($newwidth, $newheight); + $thumba = imagecreatetruecolor($width, $height); + switch ($imginfo['mime']) { + case 'image/jpeg': + $source = imagecreatefromjpeg($srcFile); + break; + case 'image/gif': + $source = imagecreatefromgif($srcFile); + break; + case 'image/png': + $source = imagecreatefrompng($srcFile); + break; + default: + ShowMsg('对不起,裁剪图片类型不支持请选择其他类型图片', '-1'); + break; + } + imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $imgw, $imgh); + imagecopy($thumba, $thumb, 0, 0, $left, $top, $newwidth, $newheight); + $ddn = substr($srcFile, -3); + $ddpicok = $reObjJs = ''; + if (empty($isupload)) { + $ddpicok = preg_replace("#\.".$ddn."$#", '-lp.'.$ddn, $file); + $reObjJs = " var backObj = window.opener.document.form1.picname; + var prvObj = window.opener.document.getElementById('divpicview');\r\n"; + } else { + $ddpicok = $file; + $reObjJs = " var backObj = window.opener.parent.document.form1.picname; + var prvObj = window.opener.parent.document.getElementById('divpicview');\r\n"; + } + $ddpicokurl = $cfg_basedir.$ddpicok; + switch ($imginfo['mime']) { + case 'image/jpeg': + imagejpeg($thumba, $ddpicokurl, 85); + break; + case 'image/gif': + imagegif($thumba, $ddpicokurl); + break; + case 'image/png': + imagepng($thumba, $ddpicokurl); + break; + default: + ShowMsg("对不起,裁剪图片类型不支持请选择其他类型图片", "-1"); + break; + } + //对任意裁剪方式再次缩小图片至限定大小 + if ($newwidth > $cfg_ddimg_width || $newheight > $cfg_ddimg_height) { + ImageResize($ddpicokurl, $cfg_ddimg_width, $cfg_ddimg_height); + } + //如果从其它图中剪出, 保存附件信息 + if (empty($isupload)) { + $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('$ddpicok','$ddpicok','1','0','0','0','".filesize($ddpicokurl)."','".time()."','".$cuserLogin->getUserID()."'); "; + $dsql->ExecuteNoneQuery($inquery); + $fid = $dsql->GetLastID(); + AddMyAddon($fid, $ddpicok); + } + +?> + + \ No newline at end of file diff --git a/src/dede/images/SmallSpyGlassWithTransperancy_17x18.png b/src/admin/images/SmallSpyGlassWithTransperancy_17x18.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/SmallSpyGlassWithTransperancy_17x18.png rename to src/admin/images/SmallSpyGlassWithTransperancy_17x18.png diff --git a/src/dede/images/addnews.gif b/src/admin/images/addnews.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/addnews.gif rename to src/admin/images/addnews.gif diff --git a/src/dede/images/admin_top_bg.jpg b/src/admin/images/admin_top_bg.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/admin_top_bg.jpg rename to src/admin/images/admin_top_bg.jpg diff --git a/src/dede/images/adminico.gif b/src/admin/images/adminico.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/adminico.gif rename to src/admin/images/adminico.gif diff --git a/src/dede/images/adminuserico.gif b/src/admin/images/adminuserico.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/adminuserico.gif rename to src/admin/images/adminuserico.gif diff --git a/src/dede/images/adtype_act.gif b/src/admin/images/adtype_act.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/adtype_act.gif rename to src/admin/images/adtype_act.gif diff --git a/src/dede/images/adtype_link.gif b/src/admin/images/adtype_link.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/adtype_link.gif rename to src/admin/images/adtype_link.gif diff --git a/src/dede/images/alb1.jpg b/src/admin/images/alb1.jpg similarity index 100% rename from src/dede/images/alb1.jpg rename to src/admin/images/alb1.jpg diff --git a/src/dede/images/alb2.jpg b/src/admin/images/alb2.jpg similarity index 100% rename from src/dede/images/alb2.jpg rename to src/admin/images/alb2.jpg diff --git a/src/dede/images/alb3.jpg b/src/admin/images/alb3.jpg similarity index 100% rename from src/dede/images/alb3.jpg rename to src/admin/images/alb3.jpg diff --git a/src/dede/images/albviewbg.jpg b/src/admin/images/albviewbg.jpg similarity index 100% rename from src/dede/images/albviewbg.jpg rename to src/admin/images/albviewbg.jpg diff --git a/src/dede/images/allbg.gif b/src/admin/images/allbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/allbg.gif rename to src/admin/images/allbg.gif diff --git a/src/dede/images/allbtbg.gif b/src/admin/images/allbtbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/allbtbg.gif rename to src/admin/images/allbtbg.gif diff --git a/src/dede/images/allbtbg2.gif b/src/admin/images/allbtbg2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/allbtbg2.gif rename to src/admin/images/allbtbg2.gif diff --git a/src/dede/images/allmenu.gif b/src/admin/images/allmenu.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/allmenu.gif rename to src/admin/images/allmenu.gif diff --git a/src/dede/images/arr3.gif b/src/admin/images/arr3.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arr3.gif rename to src/admin/images/arr3.gif diff --git a/src/dede/images/arr4.gif b/src/admin/images/arr4.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arr4.gif rename to src/admin/images/arr4.gif diff --git a/src/dede/images/arrfc.gif b/src/admin/images/arrfc.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arrfc.gif rename to src/admin/images/arrfc.gif diff --git a/src/dede/images/arrl.gif b/src/admin/images/arrl.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arrl.gif rename to src/admin/images/arrl.gif diff --git a/src/dede/images/arrr.gif b/src/admin/images/arrr.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arrr.gif rename to src/admin/images/arrr.gif diff --git a/src/dede/images/arttag.gif b/src/admin/images/arttag.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/arttag.gif rename to src/admin/images/arttag.gif diff --git a/src/dede/images/bk.gif b/src/admin/images/bk.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/bk.gif rename to src/admin/images/bk.gif diff --git a/src/dede/images/blank.gif b/src/admin/images/blank.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/blank.gif rename to src/admin/images/blank.gif diff --git a/src/dede/images/blankbg.gif b/src/admin/images/blankbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/blankbg.gif rename to src/admin/images/blankbg.gif diff --git a/src/dede/images/bodybg.gif b/src/admin/images/bodybg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/bodybg.gif rename to src/admin/images/bodybg.gif diff --git a/src/dede/images/book.gif b/src/admin/images/book.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/book.gif rename to src/admin/images/book.gif diff --git a/src/dede/images/book1.gif b/src/admin/images/book1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/book1.gif rename to src/admin/images/book1.gif diff --git a/src/dede/images/booknopic.gif b/src/admin/images/booknopic.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/booknopic.gif rename to src/admin/images/booknopic.gif diff --git a/src/dede/images/bottombg.gif b/src/admin/images/bottombg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/bottombg.gif rename to src/admin/images/bottombg.gif diff --git a/src/dede/images/boxy-ne.png b/src/admin/images/boxy-ne.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/boxy-ne.png rename to src/admin/images/boxy-ne.png diff --git a/src/dede/images/boxy-nw.png b/src/admin/images/boxy-nw.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/boxy-nw.png rename to src/admin/images/boxy-nw.png diff --git a/src/dede/images/boxy-se.png b/src/admin/images/boxy-se.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/boxy-se.png rename to src/admin/images/boxy-se.png diff --git a/src/dede/images/boxy-sw.png b/src/admin/images/boxy-sw.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/boxy-sw.png rename to src/admin/images/boxy-sw.png diff --git a/src/dede/images/bt.gif b/src/admin/images/bt.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/bt.gif rename to src/admin/images/bt.gif diff --git a/src/dede/images/bulebg.gif b/src/admin/images/bulebg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/bulebg.gif rename to src/admin/images/bulebg.gif diff --git a/src/dede/images/button_back.gif b/src/admin/images/button_back.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_back.gif rename to src/admin/images/button_back.gif diff --git a/src/dede/images/button_bg1.jpg b/src/admin/images/button_bg1.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_bg1.jpg rename to src/admin/images/button_bg1.jpg diff --git a/src/dede/images/button_ok.gif b/src/admin/images/button_ok.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_ok.gif rename to src/admin/images/button_ok.gif diff --git a/src/dede/images/button_reset.gif b/src/admin/images/button_reset.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_reset.gif rename to src/admin/images/button_reset.gif diff --git a/src/dede/images/button_save.gif b/src/admin/images/button_save.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_save.gif rename to src/admin/images/button_save.gif diff --git a/src/dede/images/button_search.gif b/src/admin/images/button_search.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/button_search.gif rename to src/admin/images/button_search.gif diff --git a/src/dede/images/calendar.gif b/src/admin/images/calendar.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/calendar.gif rename to src/admin/images/calendar.gif diff --git a/src/dede/images/cd.gif b/src/admin/images/cd.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/cd.gif rename to src/admin/images/cd.gif diff --git a/src/dede/images/channeladd.gif b/src/admin/images/channeladd.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/channeladd.gif rename to src/admin/images/channeladd.gif diff --git a/src/dede/images/channellist.gif b/src/admin/images/channellist.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/channellist.gif rename to src/admin/images/channellist.gif diff --git a/src/dede/images/close.gif b/src/admin/images/close.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/close.gif rename to src/admin/images/close.gif diff --git a/src/dede/images/color.htm b/src/admin/images/color.htm old mode 100755 new mode 100644 similarity index 97% rename from src/dede/images/color.htm rename to src/admin/images/color.htm index ce84d278..3ab70288 --- a/src/dede/images/color.htm +++ b/src/admin/images/color.htm @@ -1,45 +1,45 @@ - - - -颜色选框 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     
     
     
    
- - + + + +颜色选框 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
    
+ + diff --git a/src/dede/images/colornew.htm b/src/admin/images/colornew.htm old mode 100755 new mode 100644 similarity index 98% rename from src/dede/images/colornew.htm rename to src/admin/images/colornew.htm index b55ed4d7..5ae2de92 --- a/src/dede/images/colornew.htm +++ b/src/admin/images/colornew.htm @@ -1,30 +1,30 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     
     
     
    N
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     
     
     
    N
diff --git a/src/dede/images/copy.gif b/src/admin/images/copy.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/copy.gif rename to src/admin/images/copy.gif diff --git a/src/dede/images/css.gif b/src/admin/images/css.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/css.gif rename to src/admin/images/css.gif diff --git a/src/dede/images/dedecontract.gif b/src/admin/images/dedecontract.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dedecontract.gif rename to src/admin/images/dedecontract.gif diff --git a/src/dede/images/dedeexplode.gif b/src/admin/images/dedeexplode.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dedeexplode.gif rename to src/admin/images/dedeexplode.gif diff --git a/src/dede/images/dedeexplode2.gif b/src/admin/images/dedeexplode2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dedeexplode2.gif rename to src/admin/images/dedeexplode2.gif diff --git a/src/dede/images/dir.gif b/src/admin/images/dir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dir.gif rename to src/admin/images/dir.gif diff --git a/src/dede/images/dir2.gif b/src/admin/images/dir2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dir2.gif rename to src/admin/images/dir2.gif diff --git a/src/dede/images/dlgtitle.gif b/src/admin/images/dlgtitle.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/dlgtitle.gif rename to src/admin/images/dlgtitle.gif diff --git a/src/dede/images/exbg.gif b/src/admin/images/exbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/exbg.gif rename to src/admin/images/exbg.gif diff --git a/src/dede/images/exe.gif b/src/admin/images/exe.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/exe.gif rename to src/admin/images/exe.gif diff --git a/src/dede/images/exit.gif b/src/admin/images/exit.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/exit.gif rename to src/admin/images/exit.gif diff --git a/src/dede/images/feedback-edit.gif b/src/admin/images/feedback-edit.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/feedback-edit.gif rename to src/admin/images/feedback-edit.gif diff --git a/src/dede/images/file_del.gif b/src/admin/images/file_del.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_del.gif rename to src/admin/images/file_del.gif diff --git a/src/dede/images/file_dir.gif b/src/admin/images/file_dir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_dir.gif rename to src/admin/images/file_dir.gif diff --git a/src/dede/images/file_edit.gif b/src/admin/images/file_edit.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_edit.gif rename to src/admin/images/file_edit.gif diff --git a/src/dede/images/file_htm.gif b/src/admin/images/file_htm.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_htm.gif rename to src/admin/images/file_htm.gif diff --git a/src/dede/images/file_move.gif b/src/admin/images/file_move.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_move.gif rename to src/admin/images/file_move.gif diff --git a/src/dede/images/file_newdir.gif b/src/admin/images/file_newdir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_newdir.gif rename to src/admin/images/file_newdir.gif diff --git a/src/dede/images/file_newfile.gif b/src/admin/images/file_newfile.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_newfile.gif rename to src/admin/images/file_newfile.gif diff --git a/src/dede/images/file_pic.gif b/src/admin/images/file_pic.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_pic.gif rename to src/admin/images/file_pic.gif diff --git a/src/dede/images/file_rename.gif b/src/admin/images/file_rename.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_rename.gif rename to src/admin/images/file_rename.gif diff --git a/src/dede/images/file_script.gif b/src/admin/images/file_script.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_script.gif rename to src/admin/images/file_script.gif diff --git a/src/dede/images/file_swf.gif b/src/admin/images/file_swf.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_swf.gif rename to src/admin/images/file_swf.gif diff --git a/src/dede/images/file_topdir.gif b/src/admin/images/file_topdir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_topdir.gif rename to src/admin/images/file_topdir.gif diff --git a/src/dede/images/file_tt.gif b/src/admin/images/file_tt.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_tt.gif rename to src/admin/images/file_tt.gif diff --git a/src/dede/images/file_txt.gif b/src/admin/images/file_txt.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_txt.gif rename to src/admin/images/file_txt.gif diff --git a/src/dede/images/file_unknow.gif b/src/admin/images/file_unknow.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_unknow.gif rename to src/admin/images/file_unknow.gif diff --git a/src/dede/images/file_uploadfile.gif b/src/admin/images/file_uploadfile.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_uploadfile.gif rename to src/admin/images/file_uploadfile.gif diff --git a/src/dede/images/file_view.gif b/src/admin/images/file_view.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/file_view.gif rename to src/admin/images/file_view.gif diff --git a/src/dede/images/flash.gif b/src/admin/images/flash.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/flash.gif rename to src/admin/images/flash.gif diff --git a/src/dede/images/fold.gif b/src/admin/images/fold.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/fold.gif rename to src/admin/images/fold.gif diff --git a/src/dede/images/g_t1.jpg b/src/admin/images/g_t1.jpg similarity index 100% rename from src/dede/images/g_t1.jpg rename to src/admin/images/g_t1.jpg diff --git a/src/dede/images/g_t2.jpg b/src/admin/images/g_t2.jpg similarity index 100% rename from src/dede/images/g_t2.jpg rename to src/admin/images/g_t2.jpg diff --git a/src/dede/images/g_t3.jpg b/src/admin/images/g_t3.jpg similarity index 100% rename from src/dede/images/g_t3.jpg rename to src/admin/images/g_t3.jpg diff --git a/src/dede/images/g_t4.jpg b/src/admin/images/g_t4.jpg similarity index 100% rename from src/dede/images/g_t4.jpg rename to src/admin/images/g_t4.jpg diff --git a/src/dede/images/gif.gif b/src/admin/images/gif.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gif.gif rename to src/admin/images/gif.gif diff --git a/src/dede/images/gtk-copy.png b/src/admin/images/gtk-copy.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-copy.png rename to src/admin/images/gtk-copy.png diff --git a/src/dede/images/gtk-del.png b/src/admin/images/gtk-del.png similarity index 100% rename from src/dede/images/gtk-del.png rename to src/admin/images/gtk-del.png diff --git a/src/dede/images/gtk-edit.png b/src/admin/images/gtk-edit.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-edit.png rename to src/admin/images/gtk-edit.png diff --git a/src/dede/images/gtk-ex.png b/src/admin/images/gtk-ex.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-ex.png rename to src/admin/images/gtk-ex.png diff --git a/src/dede/images/gtk-ok.png b/src/admin/images/gtk-ok.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-ok.png rename to src/admin/images/gtk-ok.png diff --git a/src/dede/images/gtk-sadd.png b/src/admin/images/gtk-sadd.png similarity index 100% rename from src/dede/images/gtk-sadd.png rename to src/admin/images/gtk-sadd.png diff --git a/src/dede/images/gtk-search.png b/src/admin/images/gtk-search.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-search.png rename to src/admin/images/gtk-search.png diff --git a/src/dede/images/gtk-tmp.png b/src/admin/images/gtk-tmp.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/gtk-tmp.png rename to src/admin/images/gtk-tmp.png diff --git a/src/dede/images/help.gif b/src/admin/images/help.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/help.gif rename to src/admin/images/help.gif diff --git a/src/dede/images/htm.gif b/src/admin/images/htm.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/htm.gif rename to src/admin/images/htm.gif diff --git a/src/dede/images/ico-close.gif b/src/admin/images/ico-close.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/ico-close.gif rename to src/admin/images/ico-close.gif diff --git a/src/dede/images/ico-sysmsg.png b/src/admin/images/ico-sysmsg.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/ico-sysmsg.png rename to src/admin/images/ico-sysmsg.png diff --git a/src/dede/images/idnbg1.gif b/src/admin/images/idnbg1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/idnbg1.gif rename to src/admin/images/idnbg1.gif diff --git a/src/dede/images/idnbgfoot.gif b/src/admin/images/idnbgfoot.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/idnbgfoot.gif rename to src/admin/images/idnbgfoot.gif diff --git a/src/dede/images/image.gif b/src/admin/images/image.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/image.gif rename to src/admin/images/image.gif diff --git a/src/dede/images/img.gif b/src/admin/images/img.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/img.gif rename to src/admin/images/img.gif diff --git a/src/dede/images/img_pre_none.gif b/src/admin/images/img_pre_none.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/img_pre_none.gif rename to src/admin/images/img_pre_none.gif diff --git a/src/dede/images/indextbg.gif b/src/admin/images/indextbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/indextbg.gif rename to src/admin/images/indextbg.gif diff --git a/src/dede/images/indextitlebg.gif b/src/admin/images/indextitlebg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/indextitlebg.gif rename to src/admin/images/indextitlebg.gif diff --git a/src/dede/images/input.gif b/src/admin/images/input.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/input.gif rename to src/admin/images/input.gif diff --git a/src/dede/images/input.png b/src/admin/images/input.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/input.png rename to src/admin/images/input.png diff --git a/src/dede/images/item_tt2.gif b/src/admin/images/item_tt2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/item_tt2.gif rename to src/admin/images/item_tt2.gif diff --git a/src/dede/images/itemcomenu.gif b/src/admin/images/itemcomenu.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/itemcomenu.gif rename to src/admin/images/itemcomenu.gif diff --git a/src/dede/images/itemcomenu2.gif b/src/admin/images/itemcomenu2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/itemcomenu2.gif rename to src/admin/images/itemcomenu2.gif diff --git a/src/dede/images/itemnote1.gif b/src/admin/images/itemnote1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/itemnote1.gif rename to src/admin/images/itemnote1.gif diff --git a/src/dede/images/itemnote2.gif b/src/admin/images/itemnote2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/itemnote2.gif rename to src/admin/images/itemnote2.gif diff --git a/src/dede/images/itemnote3.gif b/src/admin/images/itemnote3.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/itemnote3.gif rename to src/admin/images/itemnote3.gif diff --git a/src/dede/images/jpg.gif b/src/admin/images/jpg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/jpg.gif rename to src/admin/images/jpg.gif diff --git a/src/dede/images/js.gif b/src/admin/images/js.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/js.gif rename to src/admin/images/js.gif diff --git a/src/dede/images/lbg.gif b/src/admin/images/lbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/lbg.gif rename to src/admin/images/lbg.gif diff --git a/src/dede/images/left_bg_top.gif b/src/admin/images/left_bg_top.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/left_bg_top.gif rename to src/admin/images/left_bg_top.gif diff --git a/src/dede/images/leftbg2.gif b/src/admin/images/leftbg2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/leftbg2.gif rename to src/admin/images/leftbg2.gif diff --git a/src/dede/images/leftmbg1.gif b/src/admin/images/leftmbg1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/leftmbg1.gif rename to src/admin/images/leftmbg1.gif diff --git a/src/dede/images/leftmenu_bg.gif b/src/admin/images/leftmenu_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/leftmenu_bg.gif rename to src/admin/images/leftmenu_bg.gif diff --git a/src/dede/images/list.gif b/src/admin/images/list.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/list.gif rename to src/admin/images/list.gif diff --git a/src/dede/images/listtag.gif b/src/admin/images/listtag.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/listtag.gif rename to src/admin/images/listtag.gif diff --git a/src/dede/images/lmenubg.gif b/src/admin/images/lmenubg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/lmenubg.gif rename to src/admin/images/lmenubg.gif diff --git a/src/dede/images/loadinglit.gif b/src/admin/images/loadinglit.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/loadinglit.gif rename to src/admin/images/loadinglit.gif diff --git a/src/dede/images/login-btn.jpg b/src/admin/images/login-btn.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/login-btn.jpg rename to src/admin/images/login-btn.jpg diff --git a/src/dede/images/login-top.jpg b/src/admin/images/login-top.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/login-top.jpg rename to src/admin/images/login-top.jpg diff --git a/src/dede/images/m-contract.gif b/src/admin/images/m-contract.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/m-contract.gif rename to src/admin/images/m-contract.gif diff --git a/src/dede/images/m-expand.gif b/src/admin/images/m-expand.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/m-expand.gif rename to src/admin/images/m-expand.gif diff --git a/src/dede/images/macFFBgHack.png b/src/admin/images/macFFBgHack.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/macFFBgHack.png rename to src/admin/images/macFFBgHack.png diff --git a/src/dede/images/manage1.gif b/src/admin/images/manage1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/manage1.gif rename to src/admin/images/manage1.gif diff --git a/src/dede/images/mbcbg.gif b/src/admin/images/mbcbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mbcbg.gif rename to src/admin/images/mbcbg.gif diff --git a/src/dede/images/mbtbg.gif b/src/admin/images/mbtbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mbtbg.gif rename to src/admin/images/mbtbg.gif diff --git a/src/dede/images/menu-ex.png b/src/admin/images/menu-ex.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menu-ex.png rename to src/admin/images/menu-ex.png diff --git a/src/dede/images/menu_bg.gif b/src/admin/images/menu_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menu_bg.gif rename to src/admin/images/menu_bg.gif diff --git a/src/dede/images/menu_bottom.gif b/src/admin/images/menu_bottom.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menu_bottom.gif rename to src/admin/images/menu_bottom.gif diff --git a/src/dede/images/menu_top.gif b/src/admin/images/menu_top.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menu_top.gif rename to src/admin/images/menu_top.gif diff --git a/src/dede/images/menuarrow.gif b/src/admin/images/menuarrow.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menuarrow.gif rename to src/admin/images/menuarrow.gif diff --git a/src/dede/images/menubg.gif b/src/admin/images/menubg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menubg.gif rename to src/admin/images/menubg.gif diff --git a/src/dede/images/menumember.gif b/src/admin/images/menumember.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menumember.gif rename to src/admin/images/menumember.gif diff --git a/src/dede/images/menunewbg.gif b/src/admin/images/menunewbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menunewbg.gif rename to src/admin/images/menunewbg.gif diff --git a/src/dede/images/menunewbg2.gif b/src/admin/images/menunewbg2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menunewbg2.gif rename to src/admin/images/menunewbg2.gif diff --git a/src/dede/images/menusearch.gif b/src/admin/images/menusearch.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menusearch.gif rename to src/admin/images/menusearch.gif diff --git a/src/dede/images/menusearch2.gif b/src/admin/images/menusearch2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/menusearch2.gif rename to src/admin/images/menusearch2.gif diff --git a/src/dede/images/mmenubg.gif b/src/admin/images/mmenubg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mmenubg.gif rename to src/admin/images/mmenubg.gif diff --git a/src/dede/images/mmenubg2.gif b/src/admin/images/mmenubg2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mmenubg2.gif rename to src/admin/images/mmenubg2.gif diff --git a/src/dede/images/mp3.gif b/src/admin/images/mp3.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mp3.gif rename to src/admin/images/mp3.gif diff --git a/src/dede/images/mtbg1.gif b/src/admin/images/mtbg1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtbg1.gif rename to src/admin/images/mtbg1.gif diff --git a/src/dede/images/mtimg1.gif b/src/admin/images/mtimg1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtimg1.gif rename to src/admin/images/mtimg1.gif diff --git a/src/dede/images/mtitle_bg.gif b/src/admin/images/mtitle_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtitle_bg.gif rename to src/admin/images/mtitle_bg.gif diff --git a/src/dede/images/mtitle_bg.jpg b/src/admin/images/mtitle_bg.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtitle_bg.jpg rename to src/admin/images/mtitle_bg.jpg diff --git a/src/dede/images/mtitle_l.jpg b/src/admin/images/mtitle_l.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtitle_l.jpg rename to src/admin/images/mtitle_l.jpg diff --git a/src/dede/images/mtitle_r.jpg b/src/admin/images/mtitle_r.jpg old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/mtitle_r.jpg rename to src/admin/images/mtitle_r.jpg diff --git a/src/dede/images/newitem.gif b/src/admin/images/newitem.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/newitem.gif rename to src/admin/images/newitem.gif diff --git a/src/dede/images/newlinebg3.gif b/src/admin/images/newlinebg3.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/newlinebg3.gif rename to src/admin/images/newlinebg3.gif diff --git a/src/dede/images/newmenu-topright.gif b/src/admin/images/newmenu-topright.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/newmenu-topright.gif rename to src/admin/images/newmenu-topright.gif diff --git a/src/dede/images/next.gif b/src/admin/images/next.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/next.gif rename to src/admin/images/next.gif diff --git a/src/dede/images/open.gif b/src/admin/images/open.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/open.gif rename to src/admin/images/open.gif diff --git a/src/dede/images/paramater.gif b/src/admin/images/paramater.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/paramater.gif rename to src/admin/images/paramater.gif diff --git a/src/dede/images/part-index.gif b/src/admin/images/part-index.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/part-index.gif rename to src/admin/images/part-index.gif diff --git a/src/dede/images/part-list.gif b/src/admin/images/part-list.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/part-list.gif rename to src/admin/images/part-list.gif diff --git a/src/dede/images/part-sgpage.gif b/src/admin/images/part-sgpage.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/part-sgpage.gif rename to src/admin/images/part-sgpage.gif diff --git a/src/dede/images/part-url.gif b/src/admin/images/part-url.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/part-url.gif rename to src/admin/images/part-url.gif diff --git a/src/dede/images/parttag.gif b/src/admin/images/parttag.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/parttag.gif rename to src/admin/images/parttag.gif diff --git a/src/dede/images/pbg.gif b/src/admin/images/pbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/pbg.gif rename to src/admin/images/pbg.gif diff --git a/src/dede/images/php.gif b/src/admin/images/php.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/php.gif rename to src/admin/images/php.gif diff --git a/src/dede/images/pic_dir.gif b/src/admin/images/pic_dir.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/pic_dir.gif rename to src/admin/images/pic_dir.gif diff --git a/src/dede/images/picview.gif b/src/admin/images/picview.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/picview.gif rename to src/admin/images/picview.gif diff --git a/src/dede/images/picviewnone.gif b/src/admin/images/picviewnone.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/picviewnone.gif rename to src/admin/images/picviewnone.gif diff --git a/src/dede/images/plan.gif b/src/admin/images/plan.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/plan.gif rename to src/admin/images/plan.gif diff --git a/src/dede/images/pview.gif b/src/admin/images/pview.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/pview.gif rename to src/admin/images/pview.gif diff --git a/src/dede/images/question-balloon.png b/src/admin/images/question-balloon.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/question-balloon.png rename to src/admin/images/question-balloon.png diff --git a/src/dede/images/quick_bg.gif b/src/admin/images/quick_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/quick_bg.gif rename to src/admin/images/quick_bg.gif diff --git a/src/dede/images/re-write1.gif b/src/admin/images/re-write1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/re-write1.gif rename to src/admin/images/re-write1.gif diff --git a/src/dede/images/righttopbg.gif b/src/admin/images/righttopbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/righttopbg.gif rename to src/admin/images/righttopbg.gif diff --git a/src/dede/images/rm.gif b/src/admin/images/rm.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/rm.gif rename to src/admin/images/rm.gif diff --git a/src/dede/images/ruler.gif b/src/admin/images/ruler.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/ruler.gif rename to src/admin/images/ruler.gif diff --git a/src/dede/images/safe-tips.gif b/src/admin/images/safe-tips.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/safe-tips.gif rename to src/admin/images/safe-tips.gif diff --git a/src/dede/images/scrdw.gif b/src/admin/images/scrdw.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/scrdw.gif rename to src/admin/images/scrdw.gif diff --git a/src/dede/images/scrup.gif b/src/admin/images/scrup.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/scrup.gif rename to src/admin/images/scrup.gif diff --git a/src/dede/images/search_bn.gif b/src/admin/images/search_bn.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/search_bn.gif rename to src/admin/images/search_bn.gif diff --git a/src/dede/images/skinbutton.png b/src/admin/images/skinbutton.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/skinbutton.png rename to src/admin/images/skinbutton.png diff --git a/src/dede/images/slide.png b/src/admin/images/slide.png old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/slide.png rename to src/admin/images/slide.png diff --git a/src/dede/images/sp_bg.gif b/src/admin/images/sp_bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/sp_bg.gif rename to src/admin/images/sp_bg.gif diff --git a/src/dede/images/spectag.gif b/src/admin/images/spectag.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/spectag.gif rename to src/admin/images/spectag.gif diff --git a/src/dede/images/style2tbgr.gif b/src/admin/images/style2tbgr.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/style2tbgr.gif rename to src/admin/images/style2tbgr.gif diff --git a/src/dede/images/tbg.gif b/src/admin/images/tbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tbg.gif rename to src/admin/images/tbg.gif diff --git a/src/dede/images/tbgv.gif b/src/admin/images/tbgv.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tbgv.gif rename to src/admin/images/tbgv.gif diff --git a/src/dede/images/tbody_toggle.gif b/src/admin/images/tbody_toggle.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tbody_toggle.gif rename to src/admin/images/tbody_toggle.gif diff --git a/src/dede/images/toggle_menu.gif b/src/admin/images/toggle_menu.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/toggle_menu.gif rename to src/admin/images/toggle_menu.gif diff --git a/src/dede/images/topbg.gif b/src/admin/images/topbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/topbg.gif rename to src/admin/images/topbg.gif diff --git a/src/dede/images/topbg2.gif b/src/admin/images/topbg2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/topbg2.gif rename to src/admin/images/topbg2.gif diff --git a/src/dede/images/topitem2.gif b/src/admin/images/topitem2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/topitem2.gif rename to src/admin/images/topitem2.gif diff --git a/src/dede/images/topitembg.gif b/src/admin/images/topitembg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/topitembg.gif rename to src/admin/images/topitembg.gif diff --git a/src/dede/images/toprightbg.gif b/src/admin/images/toprightbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/toprightbg.gif rename to src/admin/images/toprightbg.gif diff --git a/src/dede/images/tree_explode.gif b/src/admin/images/tree_explode.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tree_explode.gif rename to src/admin/images/tree_explode.gif diff --git a/src/dede/images/tree_page.gif b/src/admin/images/tree_page.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tree_page.gif rename to src/admin/images/tree_page.gif diff --git a/src/dede/images/tree_part.gif b/src/admin/images/tree_part.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/tree_part.gif rename to src/admin/images/tree_part.gif diff --git a/src/dede/images/trun.gif b/src/admin/images/trun.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/trun.gif rename to src/admin/images/trun.gif diff --git a/src/dede/images/txt.gif b/src/admin/images/txt.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/txt.gif rename to src/admin/images/txt.gif diff --git a/src/dede/images/typeid2bg.gif b/src/admin/images/typeid2bg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/typeid2bg.gif rename to src/admin/images/typeid2bg.gif diff --git a/src/dede/images/view_img.gif b/src/admin/images/view_img.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/view_img.gif rename to src/admin/images/view_img.gif diff --git a/src/dede/images/wbg.gif b/src/admin/images/wbg.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/wbg.gif rename to src/admin/images/wbg.gif diff --git a/src/dede/images/wmv.gif b/src/admin/images/wmv.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/wmv.gif rename to src/admin/images/wmv.gif diff --git a/src/dede/images/write1.gif b/src/admin/images/write1.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/write1.gif rename to src/admin/images/write1.gif diff --git a/src/dede/images/write2.gif b/src/admin/images/write2.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/write2.gif rename to src/admin/images/write2.gif diff --git a/src/dede/images/zip.gif b/src/admin/images/zip.gif old mode 100755 new mode 100644 similarity index 100% rename from src/dede/images/zip.gif rename to src/admin/images/zip.gif diff --git a/src/dede/inc/configgroup.txt b/src/admin/inc/configgroup.txt old mode 100755 new mode 100644 similarity index 83% rename from src/dede/inc/configgroup.txt rename to src/admin/inc/configgroup.txt index 71777803..f68e20cc --- a/src/dede/inc/configgroup.txt +++ b/src/admin/inc/configgroup.txt @@ -1,8 +1,8 @@ -1,站点设置 -2,核心设置 -3,附件设置 -4,会员设置 -5,互动设置 -6,性能选项 -7,其它选项 +1,站点设置 +2,核心设置 +3,附件设置 +4,会员设置 +5,互动设置 +6,性能选项 +7,其它选项 8,模块设置 \ No newline at end of file diff --git a/src/dede/inc/fieldtype.txt b/src/admin/inc/fieldtype.txt old mode 100755 new mode 100644 similarity index 83% rename from src/dede/inc/fieldtype.txt rename to src/admin/inc/fieldtype.txt index 8771bd1e..468b0903 --- a/src/dede/inc/fieldtype.txt +++ b/src/admin/inc/fieldtype.txt @@ -1,17 +1,17 @@ -text,单行文本(varchar) -textchar,单行文本(char) -multitext,多行文本 -htmltext,HTML文本 -textdata,文本保存HTML数据 -int,整数类型 -float,小数类型 -datetime,时间类型 -img,图片 -imgfile,图片(无格式) -media,多媒体文件 -addon,附件类型 -select,使用select下拉框 -radio,使用radio选项卡 -checkbox,checkbox多选框 -stepselect,联动类型 +text,单行文本(varchar) +textchar,单行文本(char) +multitext,多行文本 +htmltext,HTML文本 +textdata,HTML形式保存数据 +int,整数类型 +float,小数类型 +datetime,时间类型 +img,图片 +imgfile,图片(无格式) +media,多媒体文件 +addon,附件类型 +select,使用select下拉框 +radio,使用radio选项卡 +checkbox,checkbox多选框 +stepselect,联动类型 relation,关联内容 \ No newline at end of file diff --git a/src/dede/inc/grouplist.txt b/src/admin/inc/grouplist.txt old mode 100755 new mode 100644 similarity index 91% rename from src/dede/inc/grouplist.txt rename to src/admin/inc/grouplist.txt index 56f70c95..953d9e03 --- a/src/dede/inc/grouplist.txt +++ b/src/admin/inc/grouplist.txt @@ -1,90 +1,90 @@ ->>特别权限(仅超级管理员使用) - ->admin_AllowAll>可以进行任意操作 - - ->>频道管理 - ->c_List>列出频道 ->c_New>新建频道 ->c_Edit>修改频道 ->c_Del>删除频道 ->c_Stepselect>联动类别管理 - ->>栏目管理 - ->t_List>列出任意栏目 ->t_New>新建任意栏目 ->t_Edit>修改任意栏目 ->t_Move>移动任意栏目 ->t_Del>删除任意栏目 ->t_AccList>列出授权栏目 ->t_AccNew>新建授权子栏目 ->t_AccEdit>修改授权子栏目 ->t_AccDel>删除授权子栏目 - ->>内容管理 - ->a_List>列出内容 ->a_New>发布任意文档 ->a_Edit>修改任意文档 ->a_Del>删除任意文档 ->a_Commend>推荐任意文档 ->a_Check>审核任意文档 ->a_AccNew>发布授权文档 ->a_AccList>列出授权文档 ->a_AccEdit>修改授权文档 ->a_AccDel>删除授权文档 ->a_AccCheck>审核授权文档 ->a_MyList>列出我发布的文档 ->a_MyEdit>修改我发布的文档 ->a_MyDel>删除我发布的文档 ->a_MyCheck>审核我发布的文档 ->a_Recycling>管理回收站 - ->>模板管理 - ->temp_All>管理所有模板 ->temp_New>新建模板 ->temp_Edit>修改模板 ->temp_Del>删除模板 ->temp_One>单页模板管理 ->temp_MyTag>自定义标记 ->temp_Test>测试标记 ->temp_Other>模板其它管理 - ->>专题管理 - ->spec_New>新建专题 ->spec_List>列出专题 ->spec_Edit>修改专题 - ->>系统管理权限 - ->sys_User>系统用户管理 ->sys_Group>系统组管理 ->sys_MdPwd>更改个人密码 ->sys_DelUpload>删除附件 ->sys_Edit>修改系统参数 ->sys_Log>管理日志 ->sys_plus>插件管理 ->sys_Data>数据备份还原 ->sys_Att>自定义文档属性 ->sys_ArcBatch>文档批量维护 ->sys_ArcTj>文档信息统计 ->sys_Source>新闻来源 ->sys_Writer>作者管理 ->sys_SoftConfig>软件频道参数 ->sys_Keyword>关键字管理 ->sys_MakeHtml>更新HTML ->sys_Feedback>评论管理 ->sys_Upload>管理任意上传 ->sys_MyUpload>管理我的上传 ->pic_view>图片浏览器 - ->>会员管理 - ->member_Type>会员类型管理 ->member_List>列出会员 ->member_Edit>更改会员 ->member_Del>删除会员 +>>特别权限(仅超级管理员使用) + +>admin_AllowAll>可以进行任意操作 + + +>>频道管理 + +>c_List>列出频道 +>c_New>新建频道 +>c_Edit>修改频道 +>c_Del>删除频道 +>c_Stepselect>联动类别管理 + +>>栏目管理 + +>t_List>列出任意栏目 +>t_New>新建任意栏目 +>t_Edit>修改任意栏目 +>t_Move>移动任意栏目 +>t_Del>删除任意栏目 +>t_AccList>列出授权栏目 +>t_AccNew>新建授权子栏目 +>t_AccEdit>修改授权子栏目 +>t_AccDel>删除授权子栏目 + +>>内容管理 + +>a_List>列出内容 +>a_New>发布任意文档 +>a_Edit>修改任意文档 +>a_Del>删除任意文档 +>a_Commend>推荐任意文档 +>a_Check>审核任意文档 +>a_AccNew>发布授权文档 +>a_AccList>列出授权文档 +>a_AccEdit>修改授权文档 +>a_AccDel>删除授权文档 +>a_AccCheck>审核授权文档 +>a_MyList>列出我发布的文档 +>a_MyEdit>修改我发布的文档 +>a_MyDel>删除我发布的文档 +>a_MyCheck>审核我发布的文档 +>a_Recycling>管理回收站 + +>>模板管理 + +>temp_All>管理所有模板 +>temp_New>新建模板 +>temp_Edit>修改模板 +>temp_Del>删除模板 +>temp_One>单页模板管理 +>temp_MyTag>自定义标记 +>temp_Test>测试标记 +>temp_Other>模板其它管理 + +>>专题管理 + +>spec_New>新建专题 +>spec_List>列出专题 +>spec_Edit>修改专题 + +>>系统管理权限 + +>sys_User>系统用户管理 +>sys_Group>系统组管理 +>sys_MdPwd>修改个人密码 +>sys_DelUpload>删除附件 +>sys_Edit>修改系统参数 +>sys_Log>管理日志 +>sys_plus>插件管理 +>sys_Data>数据备份还原 +>sys_Att>自定义文档属性 +>sys_ArcBatch>文档批量维护 +>sys_ArcTj>文档信息统计 +>sys_Source>新闻来源 +>sys_Writer>作者管理 +>sys_SoftConfig>软件频道参数 +>sys_Keyword>关键词管理 +>sys_MakeHtml>更新HTML +>sys_Feedback>评论管理 +>sys_Upload>管理任意上传 +>sys_MyUpload>管理我的上传 +>pic_view>图片浏览器 + +>>会员管理 + +>member_Type>会员类型管理 +>member_List>列出会员 +>member_Edit>修改会员 +>member_Del>删除会员 diff --git a/src/dede/inc/inc_action_info.php b/src/admin/inc/inc_action_info.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/inc/inc_action_info.php rename to src/admin/inc/inc_action_info.php index c0a69d08..3ce130ee --- a/src/dede/inc/inc_action_info.php +++ b/src/admin/inc/inc_action_info.php @@ -1,457 +1,456 @@ - '核心', - 'title' => '常规操作', - 'description' => '站点档案常规功能操作', - 'soniterm' => array( - 0 => array( - 'title' => '网站栏目管理', - 'description' => '站点所有栏目管理', - 'purview' => 't_List,t_AccList', - 'linkurl' => 'catalog_main.php' - ), - 1 => array( - 'title' => '等审核的档案', - 'description' => '所有内容模型发表的未经审核内容列表', - 'purview' => 'a_Check,a_AccCheck', - 'linkurl' => 'content_list.php?arcrank=-1' - ), - 2 => array( - 'title' => '我发布的文档', - 'description' => '现在登录的管理员所发表的所有内容模型中的文档', - 'purview' => 'a_List,a_AccList,a_MyList', - 'linkurl' => 'content_list.php?mid='.$cuserLogin->userID - ), - 3 => array( - 'title' => '评论管理', - 'description' => '网站所有评论管理', - 'purview' => 'sys_Feedback', - 'linkurl' => 'feedback_main.php' - ), - 4 => array( - 'title' => '内容回收站', - 'description' => '如果在"系统基本参数"的"核心设置"中开启了"文章回收站(是/否)开启功能",后台删除的文档将会存放在此处', - 'purview' => 'a_List,a_AccList,a_MyList', - 'linkurl' => 'recycling.php' - ) - ) -); -$actionSearch[1] = array( - 'toptitle' => '核心', - 'title' => '内容管理', - 'description' => '网站对应内容模型的文档管理', - 'soniterm' => array( - 0 => array( - 'title' => '专题管理', - 'description' => '所有专题内容的管理', - 'purview' => 'spec_New', - 'linkurl' => 'content_s_list.php' - ), - ) -); -$actionSearch[2] = array( - 'toptitle' => '核心', - 'title' => '附件管理', - 'description' => '所有上传的附件管理', - 'soniterm' => array( - 0 => array( - 'title' => '上传新文件 ', - 'description' => '通过这可以上传图片、FLASH、视频/音频、附件/其它等附件 ', - 'purview' => '', - 'linkurl' => 'media_add.php' - ), - 1 => array( - 'title' => '附件数据管理 ', - 'description' => '列出所有上传的附件', - 'purview' => 'sys_Upload,sys_MyUpload', - 'linkurl' => 'media_main.php' - ), - 2 => array( - 'title' => '文件式管理器 ', - 'description' => '应用文件浏览的模式进行附件的管理', - 'purview' => 'plus_文件管理器', - 'linkurl' => 'media_main.php?dopost=filemanager' - ), - ) -); -$actionSearch[3] = array( - 'toptitle' => '核心', - 'title' => '频道模型', - 'description' => '所有上传的附件管理', - 'soniterm' => array( - 0 => array( - 'title' => '内容模型管理 ', - 'description' => '可以对现有商品、软件、图片集、普通文章、专题、分类信息等模型就行管理,也可以创建新的内容模型', - 'purview' => 'c_List', - 'linkurl' => 'mychannel_main.php' - ), - 1 => array( - 'title' => '单页文档管理 ', - 'description' => '创建和管理单页面', - 'purview' => 'temp_One', - 'linkurl' => 'templets_one.php' - ), - 2 => array( - 'title' => '联动类别管理 ', - 'description' => '创建和管理所有的联动', - 'purview' => 'c_Stepseclect', - 'linkurl' => 'stepselect_main.php?dopost=filemanager' - ), - 3 => array( - 'title' => '自由列表管理 ', - 'description' => '创建不同的列表形式', - 'purview' => 'c_List', - 'linkurl' => 'freelist_main.php' - ), - 4 => array( - 'title' => '自定义表单 ', - 'description' => '创建和管理自定义表单', - 'purview' => 'c_List', - 'linkurl' => 'diy_main.php' - ), - ) -); -$actionSearch[4] = array( - 'toptitle' => '核心', - 'title' => '批量维护', - 'description' => '对一些东西进行批量的删除,添加等等', - 'soniterm' => array( - 0 => array( - 'title' => '更新系统缓存 ', - 'description' => '更新栏目缓存、更新枚举缓存 、清理arclist调用缓存 、清理过期会员访问历史 、删除过期短信', - 'purview' => 'sys_ArcBatch', - 'linkurl' => 'sys_cache_up.php' - ), - 1 => array( - 'title' => '文档批量维护 ', - 'description' => '批量的对某个栏目或者全部栏目的内容进行审核文档、更新HTML、移动文档、删除文档', - 'purview' => 'sys_ArcBatch', - 'linkurl' => 'content_batch_up.php' - ), - 2 => array( - 'title' => '搜索关键词维护 ', - 'description' => '对已经进行的所有所搜的关键词进行管理', - 'purview' => 'sys_Keyword', - 'linkurl' => 'search_keywords_main.php?dopost=filemanager' - ), - 3 => array( - 'title' => '文档关键词维护 ', - 'description' => '对文档中的关键词进行批量的维护', - 'purview' => 'sys_Keyword', - 'linkurl' => 'article_keywords_main.php' - ), - 4 => array( - 'title' => '重复文档检测 ', - 'description' => '可以对网站中出现的重复标题的文档进行处理', - 'purview' => 'sys_ArcBatch', - 'linkurl' => 'article_test_same.php' - ), - 5 => array( - 'title' => '自动摘要|分页 ', - 'description' => '用于自动更新您系统没有填写摘要的文档的摘要信息或更新没分页的文档的自动分页标识', - 'purview' => 'sys_Keyword', - 'linkurl' => 'article_description_main.php' - ), - 6 => array( - 'title' => 'Tag标签管理 ', - 'description' => '对整个网站的tag进行批量的维护', - 'purview' => 'sys_Keyword', - 'linkurl' => 'tags_main.php' - ), - 7 => array( - 'title' => '数据库内容替换 ', - 'description' => '可以对数据库中的某张表中的字段进行内容的批量替换', - 'purview' => 'sys_ArcBatch', - 'linkurl' => 'sys_data_replace.php' - ), - ) -); -$actionSearch[5] = array( - 'toptitle' => '会员', - 'title' => '会员管理', - 'description' => '注册会员及积分等配置管理', - 'soniterm' => array( - 0 => array( - 'title' => '注册会员列表', - 'description' => '所有注册会员的管理项,其中包含修改,删除,查看会员文档以及提升管理员等操作', - 'purview' => 'member_List', - 'linkurl' => 'member_main.php' - ), - 1 => array( - 'title' => '会员级别设置', - 'description' => '设置会员的级别,可以通过设计不同会员的访问权限来对会员级别进行一个扩展', - 'purview' => 'member_Type', - 'linkurl' => 'member_rank.php' - ), - 2 => array( - 'title' => '积分头衔设置', - 'description' => '会员积分等级设置,根据会员活动积分对会员进行头衔划分', - 'purview' => 'member_Type', - 'linkurl' => 'member_scores.php' - ), - 4 => array( - 'title' => '会员短信管理', - 'description' => '会员之间发送的短消息管理,其中包含群发短消息和对单个会员发送短消息两种', - 'purview' => 'member_Type', - 'linkurl' => 'member_pm.php' - ), - ) -); -$actionSearch[6] = array( - 'toptitle' => '会员', - 'title' => '支付工具', - 'description' => '站点财务相关设置,包含点卡,商店订单等操作', - 'soniterm' => array( - 0 => array( - 'title' => '点卡产品分类', - 'description' => '网站点卡产品分类,可以添加不同点数的点卡产品类型', - 'purview' => 'sys_Data', - 'linkurl' => 'cards_type.php' - ), - 1 => array( - 'title' => '点卡产品管理', - 'description' => '管理网站点卡,可以在这里生成点卡以及查看点卡的当前状态', - 'purview' => 'sys_Data', - 'linkurl' => 'cards_manage.php' - ), - 2 => array( - 'title' => '会员产品分类', - 'description' => '可以将会员类型进行产品划分,比如出售高级会员1年这种,在这里可以对会员产品进行定义', - 'purview' => 'sys_Data', - 'linkurl' => 'member_type.php' - ), - 3 => array( - 'title' => '会员消费记录', - 'description' => '会员在前台进行操作、消费积分的消费记录,同时可以查看消费充值订单的付款情况', - 'purview' => 'sys_Data', - 'linkurl' => 'member_operations.php' - ), - 4 => array( - 'title' => '商店订单记录', - 'description' => '前台会员商店提交的订单记录,这里可以对这些订单进行一个统一的管理', - 'purview' => 'sys_Data', - 'linkurl' => 'shops_operations.php' - ), - 5 => array( - 'title' => '支付接口设置', - 'description' => '商店以及会员产品付款用到的在线付款方式需要设置的支付接口,这里含有常用的接口,例如:支付宝,易宝等', - 'purview' => 'sys_Data', - 'linkurl' => 'sys_payment.php' - ), - 6 => array( - 'title' => '配货方式设置', - 'description' => '网站在线商城的送货方式,这里可以对其进行编辑管理', - 'purview' => 'sys_Data', - 'linkurl' => 'shops_delivery.php' - ), - 7 => array( - 'title' => '汇款账号设置', - 'description' => '银行付款的账号设置,用户可以查看到您的银行付款账号方便支付', - 'purview' => 'sys_Data', - 'linkurl' => 'shops_bank.php' - ), - ) -); -$actionSearch[7] = array( - 'toptitle' => '生成', - 'title' => '自动任务', - 'description' => '一键生成静态管理', - 'soniterm' => array( - 0 => array( - 'title' => '一键更新网站', - 'description' => '可以一键生成所有静态页面', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_all.php' - ), - 1 => array( - 'title' => '更新系统缓存', - 'description' => '更新栏目缓存、更新枚举缓存、清理arclist调用缓存、清理过期会员访问历史、删除过期短信 ', - 'purview' => 'sys_ArcBatch', - 'linkurl' => 'sys_cache_up.php' - ), - ) -); -$actionSearch[8] = array( - 'toptitle' => '生成', - 'title' => 'HTML更新', - 'description' => '针对主页、栏目、文档、专题等等进行更新', - 'soniterm' => array( - 0 => array( - 'title' => '更新主页HTML', - 'description' => '生成网站主页面的HTML', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_homepage.php' - ), - 1 => array( - 'title' => '更新栏目 HTML', - 'description' => '对每个栏目进行静态HTML页面的生成', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_list.php' - ), - 2 => array( - 'title' => '更新文档HTML', - 'description' => '对每个栏目下的文档进行静态HTML页面的生成', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_archives.php' - ), - 3 => array( - 'title' => '更新网站地图', - 'description' => '生成网站地图的静态HTML页面', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_map_guide.php' - ), - 4 => array( - 'title' => '更新RSS文件 HTML', - 'description' => '对全站的RSS进行更新', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_rss.php' - ), - 5 => array( - 'title' => '获取JS文件', - 'description' => '可以获取某个栏目的js连接', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_js.php' - ), - 6 => array( - 'title' => '更新专题 HTML', - 'description' => '对专题进行静态HTML页面的生成', - 'purview' => 'sys_MakeHtml', - 'linkurl' => 'makehtml_spec.php' - ), - ) -); -$actionSearch[9] = array( - 'toptitle' => '模板', - 'title' => '模板管理', - 'description' => '针对主页、栏目、文档、专题等等进行更新', - 'soniterm' => array( - 0 => array( - 'title' => '默认模板管理 ', - 'description' => '对网站正在采用的模板文件进行管理', - 'purview' => 'temp_All', - 'linkurl' => 'templets_main.php' - ), - 1 => array( - 'title' => '标签源码管理 ', - 'description' => '对现有的标签文件进行修改、添加', - 'purview' => 'temp_All', - 'linkurl' => 'templets_tagsource.php' - ), - 2 => array( - 'title' => '自定义宏标记', - 'description' => '管理自定义标记', - 'purview' => 'temp_MyTag', - 'linkurl' => 'mytag_main.php' - ), - 3 => array( - 'title' => '智能标记向导', - 'description' => '可以根据需要生成相应的调用标签', - 'purview' => 'temp_Other', - 'linkurl' => 'mytag_tag_guide.php' - ), - 4 => array( - 'title' => '全局标记测试 ', - 'description' => '可以对全局的标签调用进行测试', - 'purview' => 'temp_Test', - 'linkurl' => 'tag_test.php' - ), - ) -); -$actionSearch[10] = array( - 'toptitle' => '系统', - 'title' => '系统设置', - 'description' => '对网站的一些基本信息和配置进行管理', - 'soniterm' => array( - 0 => array( - 'title' => '系统基本参数', - 'description' => '包含站点设置、核心设置 、附件设置、会员设置、互动设置、性能选项、其它选项、模块设置、添加新变量等分类,其中有网站基本信息和网站的基本设置选项', - 'purview' => 'sys_Edit', - 'linkurl' => 'sys_info.php' - ), - 1 => array( - 'title' => '系统用户管理', - 'description' => '对现有的网站管理员进行管理', - 'purview' => 'sys_User', - 'linkurl' => 'sys_admin_user.php' - ), - 2 => array( - 'title' => '用户组设定', - 'description' => '对网站管理员进行用户组别的划分', - 'purview' => 'sys_Group', - 'linkurl' => 'sys_group.php' - ), - 3 => array( - 'title' => '系统日志管理', - 'description' => '对每个登录后台的管理员进行的操作进行记录', - 'purview' => 'sys_Log', - 'linkurl' => 'log_list.php' - ), - 5 => array( - 'title' => '图片水印设置', - 'description' => '对于上传的图片添加的水印进行配置', - 'purview' => 'sys_Edit', - 'linkurl' => 'sys_info_mark.php' - ), - 6 => array( - 'title' => '自定义文档属性', - 'description' => '在以往的版本中,网站主页、频道封面的设计,都只能单调的用 arclist 标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档。', - 'purview' => 'sys_Att', - 'linkurl' => 'content_att.php' - ), - 7 => array( - 'title' => '软件频道设置', - 'description' => '可以对软件下载时的连接显示方式,下载方式,镜像服务器等等进行配置', - 'purview' => 'sys_SoftConfig', - 'linkurl' => 'soft_config.php' - ), - 8 => array( - 'title' => '防采集串混淆', - 'description' => '防采集混淆字符串管理', - 'purview' => 'sys_StringMix', - 'linkurl' => 'article_string_mix.php' - ), - 9 => array( - 'title' => '随机模板设置', - 'description' => '本设置仅适用于系统默认的文章模型,设置后发布文章时会自动按指定的模板随机获取一个,如果不想使用此功能,把它设置为空即可', - 'purview' => 'sys_StringMix', - 'linkurl' => 'article_template_rand.php' - ), - 11 => array( - 'title' => '数据库备份/还原', - 'description' => '对数据库进行备份和还原', - 'purview' => 'sys_data', - 'linkurl' => 'sys_data.php' - ), - 12 => array( - 'title' => 'SQL命令行工具', - 'description' => '可以在针对每张数据表执行单行或者多行的SQL语句', - 'purview' => 'sys_data', - 'linkurl' => 'sys_sql_query.php' - ), - 14 => array( - 'title' => '病毒扫描[S]', - 'description' => '以DedeBIZ开发模式为标准对现有的文件进行扫描并进行判断', - 'purview' => 'sys_verifies', - 'linkurl' => 'sys_safetest.php' - ), - 15 => array( - 'title' => '系统错误修复[S]', - 'description' => '由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理。', - 'purview' => 'sys_verifies', - 'linkurl' => 'sys_repair.php' - ), - ) -); + '核心', + 'title' => '常规操作', + 'description' => '站点档案常规功能操作', + 'soniterm' => array( + 0 => array( + 'title' => '网站栏目管理', + 'description' => '站点所有栏目管理', + 'purview' => 't_List,t_AccList', + 'linkurl' => 'catalog_main.php' + ), + 1 => array( + 'title' => '等审核的档案', + 'description' => '所有内容模型发表的未经审核内容列表', + 'purview' => 'a_Check,a_AccCheck', + 'linkurl' => 'content_list.php?arcrank=-1' + ), + 2 => array( + 'title' => '我发布的文档', + 'description' => '现在登录的管理员所发表的所有内容模型中的文档', + 'purview' => 'a_List,a_AccList,a_MyList', + 'linkurl' => 'content_list.php?mid='.$cuserLogin->userID + ), + 3 => array( + 'title' => '评论管理', + 'description' => '网站所有评论管理', + 'purview' => 'sys_Feedback', + 'linkurl' => 'feedback_main.php' + ), + 4 => array( + 'title' => '内容回收站', + 'description' => '如果在"系统配置变量"的"核心设置"中开启了"文章回收站(是/否)开启功能",后台删除的文档将会存放在此处', + 'purview' => 'a_List,a_AccList,a_MyList', + 'linkurl' => 'recycling.php' + ) + ) +); +$actionSearch[1] = array( + 'toptitle' => '核心', + 'title' => '内容管理', + 'description' => '网站对应内容模型的文档管理', + 'soniterm' => array( + 0 => array( + 'title' => '专题管理', + 'description' => '所有专题内容的管理', + 'purview' => 'spec_New', + 'linkurl' => 'content_s_list.php' + ), + ) +); +$actionSearch[2] = array( + 'toptitle' => '核心', + 'title' => '附件管理', + 'description' => '所有上传的附件管理', + 'soniterm' => array( + 0 => array( + 'title' => '上传新文件 ', + 'description' => '通过这可以上传图片、FLASH、视频/音频、附件/其它等附件 ', + 'purview' => '', + 'linkurl' => 'media_add.php' + ), + 1 => array( + 'title' => '附件数据管理 ', + 'description' => '列出所有上传的附件', + 'purview' => 'sys_Upload,sys_MyUpload', + 'linkurl' => 'media_main.php' + ), + 2 => array( + 'title' => '文件式管理器 ', + 'description' => '应用文件浏览的模式进行附件的管理', + 'purview' => 'plus_文件管理器', + 'linkurl' => 'media_main.php?dopost=filemanager' + ), + ) +); +$actionSearch[3] = array( + 'toptitle' => '核心', + 'title' => '频道模型', + 'description' => '所有上传的附件管理', + 'soniterm' => array( + 0 => array( + 'title' => '内容模型管理 ', + 'description' => '可以对现有商品、软件、图片集、普通文章、专题、分类信息等模型就行管理,也可以创建新的内容模型', + 'purview' => 'c_List', + 'linkurl' => 'mychannel_main.php' + ), + 1 => array( + 'title' => '单页文档管理 ', + 'description' => '创建和管理单页面', + 'purview' => 'temp_One', + 'linkurl' => 'templets_one.php' + ), + 2 => array( + 'title' => '联动类别管理 ', + 'description' => '创建和管理所有的联动', + 'purview' => 'c_Stepseclect', + 'linkurl' => 'stepselect_main.php?dopost=filemanager' + ), + 3 => array( + 'title' => '自由列表管理 ', + 'description' => '创建不同的列表形式', + 'purview' => 'c_List', + 'linkurl' => 'freelist_main.php' + ), + 4 => array( + 'title' => '自定义表单 ', + 'description' => '创建和管理自定义表单', + 'purview' => 'c_List', + 'linkurl' => 'diy_main.php' + ), + ) +); +$actionSearch[4] = array( + 'toptitle' => '核心', + 'title' => '批量维护', + 'description' => '对一些东西进行批量的删除,添加等等', + 'soniterm' => array( + 0 => array( + 'title' => '更新系统缓存 ', + 'description' => '更新栏目缓存、更新枚举缓存 、清理arclist调用缓存 、清理过期会员访问历史 、删除过期短信', + 'purview' => 'sys_ArcBatch', + 'linkurl' => 'sys_cache_up.php' + ), + 1 => array( + 'title' => '文档批量维护 ', + 'description' => '批量的对某个栏目或者全部栏目的内容进行审核文档、更新HTML、移动文档、删除文档', + 'purview' => 'sys_ArcBatch', + 'linkurl' => 'content_batch_up.php' + ), + 2 => array( + 'title' => '搜索关键词维护 ', + 'description' => '对已经进行的所有所搜的关键词进行管理', + 'purview' => 'sys_Keyword', + 'linkurl' => 'search_keywords_main.php?dopost=filemanager' + ), + 3 => array( + 'title' => '文档关键词维护 ', + 'description' => '对文档中的关键词进行批量的维护', + 'purview' => 'sys_Keyword', + 'linkurl' => 'article_keywords_main.php' + ), + 4 => array( + 'title' => '重复文档检测 ', + 'description' => '可以对网站中出现的重复标题的文档进行处理', + 'purview' => 'sys_ArcBatch', + 'linkurl' => 'article_test_same.php' + ), + 5 => array( + 'title' => '自动摘要|分页 ', + 'description' => '用于自动更新您系统没有填写摘要的文档的摘要信息或更新没分页的文档的自动分页标识', + 'purview' => 'sys_Keyword', + 'linkurl' => 'article_description_main.php' + ), + 6 => array( + 'title' => 'Tag标签管理 ', + 'description' => '对整个网站的tag进行批量的维护', + 'purview' => 'sys_Keyword', + 'linkurl' => 'tags_main.php' + ), + 7 => array( + 'title' => '数据库内容替换 ', + 'description' => '可以对数据库中的某张表中的字段进行内容的批量替换', + 'purview' => 'sys_ArcBatch', + 'linkurl' => 'sys_data_replace.php' + ), + ) +); +$actionSearch[5] = array( + 'toptitle' => '会员', + 'title' => '会员管理', + 'description' => '注册会员及积分等配置管理', + 'soniterm' => array( + 0 => array( + 'title' => '注册会员列表', + 'description' => '所有注册会员的管理项,其中包含修改,删除,查看会员文档以及提升管理员等操作', + 'purview' => 'member_List', + 'linkurl' => 'member_main.php' + ), + 1 => array( + 'title' => '会员级别设置', + 'description' => '设置会员的级别,可以通过设计不同会员的访问权限来对会员级别进行一个扩展', + 'purview' => 'member_Type', + 'linkurl' => 'member_rank.php' + ), + 2 => array( + 'title' => '积分头衔设置', + 'description' => '会员积分等级设置,根据会员活动积分对会员进行头衔划分', + 'purview' => 'member_Type', + 'linkurl' => 'member_scores.php' + ), + 4 => array( + 'title' => '会员短信管理', + 'description' => '会员之间发送的短消息管理,其中包含群发短消息和对单个会员发送短消息两种', + 'purview' => 'member_Type', + 'linkurl' => 'member_pm.php' + ), + ) +); +$actionSearch[6] = array( + 'toptitle' => '会员', + 'title' => '支付工具', + 'description' => '站点财务相关设置,包含点卡,商店订单等操作', + 'soniterm' => array( + 0 => array( + 'title' => '点卡产品分类', + 'description' => '网站点卡产品分类,可以添加不同点数的点卡产品类型', + 'purview' => 'sys_Data', + 'linkurl' => 'cards_type.php' + ), + 1 => array( + 'title' => '点卡产品管理', + 'description' => '管理网站点卡,可以在这里生成点卡以及查看点卡的当前状态', + 'purview' => 'sys_Data', + 'linkurl' => 'cards_manage.php' + ), + 2 => array( + 'title' => '会员产品分类', + 'description' => '可以将会员类型进行产品划分,比如出售高级会员1年这种,在这里可以对会员产品进行定义', + 'purview' => 'sys_Data', + 'linkurl' => 'member_type.php' + ), + 3 => array( + 'title' => '会员消费记录', + 'description' => '会员在前台进行操作、消费积分的消费记录,同时可以查看消费充值订单的付款情况', + 'purview' => 'sys_Data', + 'linkurl' => 'member_operations.php' + ), + 4 => array( + 'title' => '商店订单记录', + 'description' => '前台会员商店提交的订单记录,这里可以对这些订单进行一个统一的管理', + 'purview' => 'sys_Data', + 'linkurl' => 'shops_operations.php' + ), + 5 => array( + 'title' => '支付接口设置', + 'description' => '商店以及会员产品付款用到的在线付款方式需要设置的支付接口,这里含有常用的接口,例如:支付宝,易宝等', + 'purview' => 'sys_Data', + 'linkurl' => 'sys_payment.php' + ), + 6 => array( + 'title' => '配货方式设置', + 'description' => '网站在线商城的送货方式,这里可以对其进行编辑管理', + 'purview' => 'sys_Data', + 'linkurl' => 'shops_delivery.php' + ), + 7 => array( + 'title' => '汇款账号设置', + 'description' => '银行付款的账号设置,用户可以查看到您的银行付款账号方便支付', + 'purview' => 'sys_Data', + 'linkurl' => 'shops_bank.php' + ), + ) +); +$actionSearch[7] = array( + 'toptitle' => '生成', + 'title' => '自动任务', + 'description' => '一键生成静态管理', + 'soniterm' => array( + 0 => array( + 'title' => '一键更新网站', + 'description' => '可以一键生成所有静态页面', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_all.php' + ), + 1 => array( + 'title' => '更新系统缓存', + 'description' => '更新栏目缓存、更新枚举缓存、清理arclist调用缓存、清理过期会员访问历史、删除过期短信 ', + 'purview' => 'sys_ArcBatch', + 'linkurl' => 'sys_cache_up.php' + ), + ) +); +$actionSearch[8] = array( + 'toptitle' => '生成', + 'title' => 'HTML更新', + 'description' => '针对主页、栏目、文档、专题等等进行更新', + 'soniterm' => array( + 0 => array( + 'title' => '更新主页HTML', + 'description' => '生成网站主页面的HTML', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_homepage.php' + ), + 1 => array( + 'title' => '更新栏目 HTML', + 'description' => '对每个栏目进行静态HTML页面的生成', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_list.php' + ), + 2 => array( + 'title' => '更新文档H', + 'description' => '对每个栏目下的文档进行静态HTML页面的生成', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_archives.php' + ), + 3 => array( + 'title' => '更新网站地图', + 'description' => '生成网站地图的静态HTML页面', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_map_guide.php' + ), + 4 => array( + 'title' => '更新订阅 HTML', + 'description' => '对全站的RSS进行更新', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_rss.php' + ), + 5 => array( + 'title' => '获取JS文件', + 'description' => '可以获取某个栏目的js连接', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_js.php' + ), + 6 => array( + 'title' => '更新专题 HTML', + 'description' => '对专题进行静态HTML页面的生成', + 'purview' => 'sys_MakeHtml', + 'linkurl' => 'makehtml_spec.php' + ), + ) +); +$actionSearch[9] = array( + 'toptitle' => '模板', + 'title' => '模板管理', + 'description' => '针对主页、栏目、文档、专题等等进行更新', + 'soniterm' => array( + 0 => array( + 'title' => '默认模板管理 ', + 'description' => '对网站正在采用的模板文件进行管理', + 'purview' => 'temp_All', + 'linkurl' => 'templets_main.php' + ), + 1 => array( + 'title' => '标签源码管理 ', + 'description' => '对现有的标签文件进行修改、添加', + 'purview' => 'temp_All', + 'linkurl' => 'templets_tagsource.php' + ), + 2 => array( + 'title' => '自定义宏标记', + 'description' => '管理自定义标记', + 'purview' => 'temp_MyTag', + 'linkurl' => 'mytag_main.php' + ), + 3 => array( + 'title' => '智能标记向导', + 'description' => '可以根据需要生成相应的调用标签', + 'purview' => 'temp_Other', + 'linkurl' => 'mytag_tag_guide.php' + ), + 4 => array( + 'title' => '全局标记测试 ', + 'description' => '可以对全局的标签调用进行测试', + 'purview' => 'temp_Test', + 'linkurl' => 'tag_test.php' + ), + ) +); +$actionSearch[10] = array( + 'toptitle' => '系统', + 'title' => '系统设置', + 'description' => '对网站的一些基本信息和配置进行管理', + 'soniterm' => array( + 0 => array( + 'title' => '系统配置变量', + 'description' => '包含站点设置、核心设置 、附件设置、会员设置、互动设置、性能选项、其它选项、模块设置、添加新变量等分类,其中有网站基本信息和网站的基本设置选项', + 'purview' => 'sys_Edit', + 'linkurl' => 'sys_info.php' + ), + 1 => array( + 'title' => '系统用户管理', + 'description' => '对现有的网站管理员进行管理', + 'purview' => 'sys_User', + 'linkurl' => 'sys_admin_user.php' + ), + 2 => array( + 'title' => '用户组设定', + 'description' => '对网站管理员进行用户组别的划分', + 'purview' => 'sys_Group', + 'linkurl' => 'sys_group.php' + ), + 3 => array( + 'title' => '系统日志管理', + 'description' => '对每个登录后台的管理员进行的操作进行记录', + 'purview' => 'sys_Log', + 'linkurl' => 'log_list.php' + ), + 5 => array( + 'title' => '图片水印设置', + 'description' => '对于上传的图片添加的水印进行配置', + 'purview' => 'sys_Edit', + 'linkurl' => 'sys_info_mark.php' + ), + 6 => array( + 'title' => '自定义文档属性', + 'description' => '在以往的版本中,网站主页、频道封面的设计,都只能单调的用 arclist 标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档', + 'purview' => 'sys_Att', + 'linkurl' => 'content_att.php' + ), + 7 => array( + 'title' => '软件频道设置', + 'description' => '可以对软件下载时的连接显示方式,下载方式,镜像服务器等等进行配置', + 'purview' => 'sys_SoftConfig', + 'linkurl' => 'soft_config.php' + ), + 8 => array( + 'title' => '防采集串混淆', + 'description' => '防采集混淆字符串管理', + 'purview' => 'sys_StringMix', + 'linkurl' => 'article_string_mix.php' + ), + 9 => array( + 'title' => '随机模板设置', + 'description' => '本设置仅适用于系统默认的文章模型,设置后发布文章时会自动按指定的模板随机获取一个,如果不想使用此功能,把它设置为空即可', + 'purview' => 'sys_StringMix', + 'linkurl' => 'article_template_rand.php' + ), + 11 => array( + 'title' => '数据库备份/还原', + 'description' => '对数据库进行备份和还原', + 'purview' => 'sys_data', + 'linkurl' => 'sys_data.php' + ), + 12 => array( + 'title' => 'SQL命令行工具', + 'description' => '可以在针对每张数据表执行单行或者多行的SQL语句', + 'purview' => 'sys_data', + 'linkurl' => 'sys_sql_query.php' + ), + 14 => array( + 'title' => '病毒扫描[S]', + 'description' => '以DedeBIZ开发模式为标准对现有的文件进行扫描并进行判断', + 'purview' => 'sys_verifies', + 'linkurl' => 'sys_safetest.php' + ), + 15 => array( + 'title' => '系统错误修复[S]', + 'description' => '由于手动升级时用户没运行指定的SQL语句,或自动升级的遗漏处理或处理出错,可能会导致一些错误,使用本工具会自动检测并处理', + 'purview' => 'sys_verifies', + 'linkurl' => 'sys_repair.php' + ), + ) +); diff --git a/src/dede/inc/inc_admin_channel.php b/src/admin/inc/inc_admin_channel.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/inc/inc_admin_channel.php rename to src/admin/inc/inc_admin_channel.php index 4514b64b..fb29c5d5 --- a/src/dede/inc/inc_admin_channel.php +++ b/src/admin/inc/inc_admin_channel.php @@ -1,134 +1,131 @@ - 255) $mxlen = 100; - - $fields[0] = " `$fieldname` varchar($mxlen) NOT NULL default '$dfvalue';"; - $fields[1] = "varchar($mxlen)"; - } - else if($dtype == "multitext" || $dtype == "htmltext") - { - $fields[0] = " `$fieldname` mediumtext;"; - $fields[1] = "mediumtext"; - } - else if($dtype=="textdata") - { - if(empty($dfvalue)) $dfvalue = ''; - - $fields[0] = " `$fieldname` varchar(100) NOT NULL default '';"; - $fields[1] = "varchar(100)"; - } - else if($dtype=="relation") { - if(empty($dfvalue)) $dfvalue = ''; - - $fields[0] = " `$fieldname` TEXT NOT NULL default '$dfvalue';"; - $fields[1] = "TEXT"; - } - else if($dtype=="textchar") - { - if(empty($dfvalue)) $dfvalue = ''; - - $fields[0] = " `$fieldname` char(100) NOT NULL default '$dfvalue';"; - $fields[1] = "char(100)"; - } - else if($dtype=="checkbox") - { - $dfvalue = str_replace(',',"','",$dfvalue); - $dfvalue = "'".$dfvalue."'"; - $fields[0] = " `$fieldname` SET($dfvalue) NULL;"; - $fields[1] = "SET($dfvalue)"; - } - else if($dtype=="select" || $dtype=="radio") - { - $dfvalue = str_replace(',', "','", $dfvalue); - $dfvalue = "'".$dfvalue."'"; - $fields[0] = " `$fieldname` enum($dfvalue) NULL;"; - $fields[1] = "enum($dfvalue)"; - } - else - { - if(empty($dfvalue)) - { - $dfvalue = ''; - } - if(empty($mxlen)) - { - $mxlen = 100; - } - if($mxlen > 255) - { - $mxlen = 250; - } - $fields[0] = " `$fieldname` varchar($mxlen) NOT NULL default '$dfvalue';"; - $fields[1] = "varchar($mxlen)"; - } - return $fields; -} - -/** - * 获取模型列表字段 - * - * @access public - * @param object $dtp 模板引擎 - * @param string $oksetting 设置 - * @return array - */ -function GetAddFieldList(&$dtp,&$oksetting) -{ - $oklist = ''; - $dtp->SetNameSpace("field","<",">"); - $dtp->LoadSource($oksetting); - if(is_array($dtp->CTags)) - { - foreach($dtp->CTags as $tagid=>$ctag) - { - if($ctag->GetAtt('islist')==1) - { - $oklist .= ($oklist=='' ? strtolower($ctag->GetName()) : ','.strtolower($ctag->GetName()) ); - } - } - } - return $oklist; + 255) $mxlen = 100; + + $fields[0] = " `$fieldname` varchar($mxlen) NOT NULL default '$dfvalue';"; + $fields[1] = "varchar($mxlen)"; + } + else if($dtype == "multitext" || $dtype == "htmltext") + { + $fields[0] = " `$fieldname` mediumtext;"; + $fields[1] = "mediumtext"; + } + else if($dtype=="textdata") + { + if(empty($dfvalue)) $dfvalue = ''; + + $fields[0] = " `$fieldname` varchar(100) NOT NULL default '';"; + $fields[1] = "varchar(100)"; + } + else if($dtype=="relation") { + if(empty($dfvalue)) $dfvalue = ''; + + $fields[0] = " `$fieldname` TEXT NOT NULL default '$dfvalue';"; + $fields[1] = "TEXT"; + } + else if($dtype=="textchar") + { + if(empty($dfvalue)) $dfvalue = ''; + + $fields[0] = " `$fieldname` char(100) NOT NULL default '$dfvalue';"; + $fields[1] = "char(100)"; + } + else if($dtype=="checkbox") + { + $dfvalue = str_replace(',',"','",$dfvalue); + $dfvalue = "'".$dfvalue."'"; + $fields[0] = " `$fieldname` SET($dfvalue) NULL;"; + $fields[1] = "SET($dfvalue)"; + } + else if($dtype=="select" || $dtype=="radio") + { + $dfvalue = str_replace(',', "','", $dfvalue); + $dfvalue = "'".$dfvalue."'"; + $fields[0] = " `$fieldname` enum($dfvalue) NULL;"; + $fields[1] = "enum($dfvalue)"; + } else { + if(empty($dfvalue)) + { + $dfvalue = ''; + } + if(empty($mxlen)) + { + $mxlen = 100; + } + if($mxlen > 255) + { + $mxlen = 250; + } + $fields[0] = " `$fieldname` varchar($mxlen) NOT NULL default '$dfvalue';"; + $fields[1] = "varchar($mxlen)"; + } + return $fields; +} +/** + * 获取模型列表字段 + * + * @access public + * @param object $dtp 模板引擎 + * @param string $oksetting 设置 + * @return array + */ +function GetAddFieldList(&$dtp,&$oksetting) +{ + $oklist = ''; + $dtp->SetNameSpace("field","<",">"); + $dtp->LoadSource($oksetting); + if(is_array($dtp->CTags)) + { + foreach($dtp->CTags as $tagid=>$ctag) + { + if($ctag->GetAtt('islist')==1) + { + $oklist .= ($oklist=='' ? strtolower($ctag->GetName()) : ','.strtolower($ctag->GetName()) ); + } + } + } + return $oklist; } \ No newline at end of file diff --git a/src/dede/inc/inc_archives_all.php b/src/admin/inc/inc_archives_all.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/inc/inc_archives_all.php rename to src/admin/inc/inc_archives_all.php index d421a57f..06a9c941 --- a/src/dede/inc/inc_archives_all.php +++ b/src/admin/inc/inc_archives_all.php @@ -1,335 +1,332 @@ -GetName(); - $formitem = " - - - - - -
~name~~form~
\r\n"; - $innertext = trim($ctag->GetInnerText()); - if ($innertext != "") { - if ($ctag->GetAtt("type") == 'select') { - $myformItem = ''; - $items = explode(',', $innertext); - $myformItem = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $myformItem, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == 'radio') { - $myformItem = ''; - $items = explode(',', $innertext); - foreach ($items as $v) { - $v = trim($v); - $i = 0; - if ($v != '') { - if ($i == 0) { - $myformItem .= "\r\n"; - } else { - $myformItem .= "\r\n"; - } - } - } - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $myformItem, $formitem); - return $formitem; - } else { - $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace('~form~', $innertext, $formitem); - $formitem = str_replace('@value', '', $formitem); - return $formitem; - } - } - if ($ctag->GetAtt("type") == "htmltext" || $ctag->GetAtt("type") == "textdata") { - $formitem = ""; - $formitem .= "
".$ctag->GetAtt('itemname').""; - $formitem .= GetEditor($fieldname, '', 350, 'Basic', 'string'); - $formitem .= "
\r\n"; - return $formitem; - } else if ($ctag->GetAtt("type") == "multitext") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "datetime") { - $nowtime = GetDateTimeMk(time()); - $innertext = ""; - $innertext .= ""; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "img") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "media") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "addon") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "media") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "relation") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else { - if ($ctag->GetAtt('default') != "") $dfvalue = $ctag->GetAtt('default'); - else $dfvalue = ""; - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } -} - -/** - * 处理不同类型的数据 - * - * @access public - * @param string $dvalue 值 - * @param string $dtype 类型 - * @param int $aid 文档ID - * @param string $job 操作类型 - * @param string $addvar 增加值 - * @return string - */ -function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') -{ - global $cfg_cookie_encode, $cfg_dir_purview, $isUrlOpen; - if ($dtype == "int") { - $dvalue = trim(preg_replace("#[^0-9]#", "", $dvalue)); - if ($dvalue == "") $dvalue = 0; - return $dvalue; - } else if ($dtype == "float") { - $dvalue = trim(preg_replace("#[^0-9\.]#", "", $dvalue)); - if ($dvalue == "") $dvalue = 0; - return $dvalue; - } else if ($dtype == "datetime") { - return GetMkTime($dvalue); - } else if ($dtype == "textdata") { - if ($job == 'edit') { - $addvarDirs = explode('/', $addvar); - $addvarDir = preg_replace("#\/".$addvarDirs[count($addvarDirs) - 1]."$#", "", $addvar); - $mdir = $GLOBALS['cfg_basedir'].$addvarDir; - if (!is_dir($mdir)) { - MkdirAll($mdir, $GLOBALS['cfg_dir_purview']); - } - $fp = fopen($GLOBALS['cfg_basedir'].$addvar, "w"); - fwrite($fp, stripslashes($dvalue)); - fclose($fp); - CloseFtp(); - return $addvar; - } else { - $ipath = $GLOBALS['cfg_cmspath']."/data/textdata"; - $tpath = ceil($aid / 5000); - if (!is_dir($GLOBALS['cfg_basedir'].$ipath)) { - MkdirAll($GLOBALS['cfg_basedir'].$ipath, $cfg_dir_purview); - } - if (!is_dir($GLOBALS['cfg_basedir'].$ipath.'/'.$tpath)) { - MkdirAll($GLOBALS['cfg_basedir'].$ipath.'/'.$tpath, $cfg_dir_purview); - } - $ipath = $ipath.'/'.$tpath; - $filename = "{$ipath}/{$aid}-".cn_substr(md5($cfg_cookie_encode), 0, 16).".txt"; - $fp = fopen($GLOBALS['cfg_basedir'].$filename, "w"); - fwrite($fp, stripslashes($dvalue)); - fclose($fp); - CloseFtp(); - return $filename; - } - } else if ($dtype == "img") { - $iurl = stripslashes($dvalue); - if (trim($iurl) == "") { - return ""; - } - $iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl)); - $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; - if (preg_match("#^http:\/\/#i", $iurl) && $GLOBALS['isUrlOpen']) { - //远程图片 - $reimgs = ""; - if ($isUrlOpen) { - $reimgs = GetRemoteImage($iurl, $GLOBALS['adminid']); - if (is_array($reimgs)) { - $imgurl = "{dede:img text='' width='".$reimgs[1]."' height='".$reimgs[2]."'} ".$reimgs[0]." {/dede:img}"; - } - } else { - $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; - } - } else if ($iurl != "") { - //站内图片 - $imgfile = $GLOBALS['cfg_basedir'].$iurl; - if (is_file($imgfile)) { - $imginfos = GetImageSize($imgfile); - $imgurl = "{dede:img text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}"; - } - } - return addslashes($imgurl); - } else { - return $dvalue; - } -} - -/** - * 获得带值的表单(编辑时用) - * - * @access public - * @param object $ctag ctag - * @param string $fvalue 表单值 - * @return string - */ - -function GetFormItemValue($ctag, $fvalue) -{ - $fieldname = $ctag->GetName(); - $formitem = " - - - - - -
~name~~form~
\r\n"; - $innertext = trim($ctag->GetInnerText()); - if ($innertext != "") { - if ($ctag->GetAtt("type") == 'select') { - $myformItem = ''; - $items = explode(',', $innertext); - $myformItem = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $myformItem, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == 'radio') { - $myformItem = ''; - $items = explode(',', $innertext); - foreach ($items as $v) { - $v = trim($v); - if ($v != '') { - if ($fvalue == $v) { - $myformItem .= "\r\n"; - } else { - $myformItem .= "\r\n"; - } - } - } - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $myformItem, $formitem); - return $formitem; - } else { - $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace('~form~', $innertext, $formitem); - $formitem = str_replace('@value', $fvalue, $formitem); - return $formitem; - } - } - - //文本数据的特殊处理 - if ($ctag->GetAtt("type") == "textdata") { - if (is_file($GLOBALS['cfg_basedir'].$fvalue)) { - $fp = fopen($GLOBALS['cfg_basedir'].$fvalue, 'r'); - $okfvalue = ""; - while (!feof($fp)) { - $okfvalue .= fgets($fp, 1024); - } - fclose($fp); - } else { - $okfvalue = ""; - } - $formitem = "\r\n"; - $formitem .= "\r\n"; - $formitem .= "
".$ctag->GetAtt('itemname')."\r\n".GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string')."
\r\n"; - $formitem .= "\r\n"; - return $formitem; - } else if ($ctag->GetAtt("type") == "htmltext") { - $formitem = "\r\n"; - $formitem .= "\r\n"; - $formitem .= "
".$ctag->GetAtt('itemname')."\r\n".GetEditor($fieldname, $fvalue, 350, 'Basic', 'string')."
\r\n"; - return $formitem; - } else if ($ctag->GetAtt("type") == "multitext") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "datetime") { - $nowtime = GetDateTimeMk($fvalue); - $innertext = ""; - $innertext .= ""; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "img") { - $ndtp = new DedeTagParse(); - $ndtp->LoadSource($fvalue); - if (!is_array($ndtp->CTags)) { - $ndtp->Clear(); - $fvalue = ""; - } - $ntag = $ndtp->GetTag("img"); - $fvalue = trim($ntag->GetInnerText()); - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "media") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else if ($ctag->GetAtt("type") == "addon") { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } else { - $innertext = "\r\n"; - $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); - $formitem = str_replace("~form~", $innertext, $formitem); - return $formitem; - } -} +GetName(); + $formitem = " + + + + + +
~name~~form~
\r\n"; + $innertext = trim($ctag->GetInnerText()); + if ($innertext != "") { + if ($ctag->GetAtt("type") == 'select') { + $myformItem = ''; + $items = explode(',', $innertext); + $myformItem = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $myformItem, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == 'radio') { + $myformItem = ''; + $items = explode(',', $innertext); + foreach ($items as $v) { + $v = trim($v); + $i = 0; + if ($v != '') { + if ($i == 0) { + $myformItem .= "\r\n"; + } else { + $myformItem .= "\r\n"; + } + } + } + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $myformItem, $formitem); + return $formitem; + } else { + $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace('~form~', $innertext, $formitem); + $formitem = str_replace('@value', '', $formitem); + return $formitem; + } + } + if ($ctag->GetAtt("type") == "htmltext" || $ctag->GetAtt("type") == "textdata") { + $formitem = ""; + $formitem .= "
".$ctag->GetAtt('itemname').""; + $formitem .= GetEditor($fieldname, '', 350, 'Basic', 'string'); + $formitem .= "
\r\n"; + return $formitem; + } else if ($ctag->GetAtt("type") == "multitext") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "datetime") { + $nowtime = GetDateTimeMk(time()); + $innertext = ""; + $innertext .= ""; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "img") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "media") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "addon") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "media") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "relation") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else { + if ($ctag->GetAtt('default') != "") $dfvalue = $ctag->GetAtt('default'); + else $dfvalue = ""; + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } +} + +/** + * 处理不同类型的数据 + * + * @access public + * @param string $dvalue 值 + * @param string $dtype 类型 + * @param int $aid 文档ID + * @param string $job 操作类型 + * @param string $addvar 增加值 + * @return string + */ +function GetFieldValue($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') +{ + global $cfg_cookie_encode, $cfg_dir_purview, $isUrlOpen; + if ($dtype == "int") { + $dvalue = trim(preg_replace("#[^0-9]#", "", $dvalue)); + if ($dvalue == "") $dvalue = 0; + return $dvalue; + } else if ($dtype == "float") { + $dvalue = trim(preg_replace("#[^0-9\.]#", "", $dvalue)); + if ($dvalue == "") $dvalue = 0; + return $dvalue; + } else if ($dtype == "datetime") { + return GetMkTime($dvalue); + } else if ($dtype == "textdata") { + if ($job == 'edit') { + $addvarDirs = explode('/', $addvar); + $addvarDir = preg_replace("#\/".$addvarDirs[count($addvarDirs) - 1]."$#", "", $addvar); + $mdir = $GLOBALS['cfg_basedir'].$addvarDir; + if (!is_dir($mdir)) { + MkdirAll($mdir, $GLOBALS['cfg_dir_purview']); + } + $fp = fopen($GLOBALS['cfg_basedir'].$addvar, "w"); + fwrite($fp, stripslashes($dvalue)); + fclose($fp); + CloseFtp(); + return $addvar; + } else { + $ipath = $GLOBALS['cfg_cmspath']."/data/textdata"; + $tpath = ceil($aid / 5000); + if (!is_dir($GLOBALS['cfg_basedir'].$ipath)) { + MkdirAll($GLOBALS['cfg_basedir'].$ipath, $cfg_dir_purview); + } + if (!is_dir($GLOBALS['cfg_basedir'].$ipath.'/'.$tpath)) { + MkdirAll($GLOBALS['cfg_basedir'].$ipath.'/'.$tpath, $cfg_dir_purview); + } + $ipath = $ipath.'/'.$tpath; + $filename = "{$ipath}/{$aid}-".cn_substr(md5($cfg_cookie_encode), 0, 16).".txt"; + $fp = fopen($GLOBALS['cfg_basedir'].$filename, "w"); + fwrite($fp, stripslashes($dvalue)); + fclose($fp); + CloseFtp(); + return $filename; + } + } else if ($dtype == "img") { + $iurl = stripslashes($dvalue); + if (trim($iurl) == "") { + return ""; + } + $iurl = trim(str_replace($GLOBALS['cfg_basehost'], "", $iurl)); + $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; + if (preg_match("#^http:\/\/#i", $iurl) && $GLOBALS['isUrlOpen']) { + //远程图片 + $reimgs = ""; + if ($isUrlOpen) { + $reimgs = GetRemoteImage($iurl, $GLOBALS['adminid']); + if (is_array($reimgs)) { + $imgurl = "{dede:img text='' width='".$reimgs[1]."' height='".$reimgs[2]."'} ".$reimgs[0]." {/dede:img}"; + } + } else { + $imgurl = "{dede:img text='' width='' height=''} ".$iurl." {/dede:img}"; + } + } else if ($iurl != "") { + //站内图片 + $imgfile = $GLOBALS['cfg_basedir'].$iurl; + if (is_file($imgfile)) { + $imginfos = GetImageSize($imgfile); + $imgurl = "{dede:img text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}"; + } + } + return addslashes($imgurl); + } else { + return $dvalue; + } +} + +/** + * 获得带值的表单(编辑时用) + * + * @access public + * @param object $ctag ctag + * @param string $fvalue 表单值 + * @return string + */ +function GetFormItemValue($ctag, $fvalue) +{ + $fieldname = $ctag->GetName(); + $formitem = " + + + + + +
~name~~form~
\r\n"; + $innertext = trim($ctag->GetInnerText()); + if ($innertext != "") { + if ($ctag->GetAtt("type") == 'select') { + $myformItem = ''; + $items = explode(',', $innertext); + $myformItem = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $myformItem, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == 'radio') { + $myformItem = ''; + $items = explode(',', $innertext); + foreach ($items as $v) { + $v = trim($v); + if ($v != '') { + if ($fvalue == $v) { + $myformItem .= "\r\n"; + } else { + $myformItem .= "\r\n"; + } + } + } + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $myformItem, $formitem); + return $formitem; + } else { + $formitem = str_replace('~name~', $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace('~form~', $innertext, $formitem); + $formitem = str_replace('@value', $fvalue, $formitem); + return $formitem; + } + } + + //文本数据的特殊处理 + if ($ctag->GetAtt("type") == "textdata") { + if (is_file($GLOBALS['cfg_basedir'].$fvalue)) { + $fp = fopen($GLOBALS['cfg_basedir'].$fvalue, 'r'); + $okfvalue = ""; + while (!feof($fp)) { + $okfvalue .= fgets($fp, 1024); + } + fclose($fp); + } else { + $okfvalue = ""; + } + $formitem = "\r\n"; + $formitem .= "\r\n"; + $formitem .= "
".$ctag->GetAtt('itemname')."\r\n".GetEditor($fieldname, $okfvalue, 350, 'Basic', 'string')."
\r\n"; + $formitem .= "\r\n"; + return $formitem; + } else if ($ctag->GetAtt("type") == "htmltext") { + $formitem = "\r\n"; + $formitem .= "\r\n"; + $formitem .= "
".$ctag->GetAtt('itemname')."\r\n".GetEditor($fieldname, $fvalue, 350, 'Basic', 'string')."
\r\n"; + return $formitem; + } else if ($ctag->GetAtt("type") == "multitext") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "datetime") { + $nowtime = GetDateTimeMk($fvalue); + $innertext = ""; + $innertext .= ""; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "img") { + $ndtp = new DedeTagParse(); + $ndtp->LoadSource($fvalue); + if (!is_array($ndtp->CTags)) { + $ndtp->Clear(); + $fvalue = ""; + } + $ntag = $ndtp->GetTag("img"); + $fvalue = trim($ntag->GetInnerText()); + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "media") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else if ($ctag->GetAtt("type") == "addon") { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } else { + $innertext = "\r\n"; + $formitem = str_replace("~name~", $ctag->GetAtt('itemname'), $formitem); + $formitem = str_replace("~form~", $innertext, $formitem); + return $formitem; + } +} diff --git a/src/dede/inc/inc_archives_functions.php b/src/admin/inc/inc_archives_functions.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/inc/inc_archives_functions.php rename to src/admin/inc/inc_archives_functions.php index 421759de..508a05e2 --- a/src/dede/inc/inc_archives_functions.php +++ b/src/admin/inc/inc_archives_functions.php @@ -8,10 +8,10 @@ * @license https://www.dedebiz.com/license * @link https://www.dedebiz.com */ -require_once(DEDEINC.'/dedehttpdown.class.php'); +require_once(DEDEINC.'/libraries/dedehttpdown.class.php'); require_once(DEDEINC.'/image.func.php'); require_once(DEDEINC.'/archives.func.php'); -require_once(DEDEINC.'/arc.partview.class.php'); +require_once(DEDEINC.'/archive/partview.class.php'); $backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : ''; $backurl = preg_match("#content_#", $backurl) ? "记忆的列表页  " : ''; if (!isset($_NOT_ARCHIVES)) { @@ -335,7 +335,7 @@ function SpLongBody($mybody, $spsize, $sptag) function MakeArt($aid, $mkindex = FALSE, $ismakesign = FALSE, $isremote = 0) { global $envs, $typeid; - require_once(DEDEINC.'/arc.archives.class.php'); + require_once(DEDEINC.'/archive/archives.class.php'); if ($ismakesign) $envs['makesign'] = 'yes'; $arc = new Archives($aid); $reurl = $arc->MakeHtml($isremote); @@ -393,6 +393,15 @@ function GetDDImage($litpic, $picname, $isremote) } else { $fullUrl = $fullUrl.".jpg"; } + $mime = get_mime_type($_FILES[$litpic]['tmp_name']); + if (preg_match("#^unknow#", $mime)) { + ShowMsg("系统不支持fileinfo组件,建议php.ini中开启", -1); + exit; + } + if (!preg_match("#^(image|video|audio|application)#i", $mime)) { + ShowMsg("仅支持媒体文件及应用程序上传", -1); + exit; + } @move_uploaded_file($_FILES[$litpic]['tmp_name'], $cfg_basedir.$fullUrl); $litpic = $fullUrl; if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir.$fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); @@ -544,7 +553,7 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' //删除非站内链接 if ($dellink == 1) { $allow_urls = array($_SERVER['HTTP_HOST']); - // 读取允许的超链接设置 + //读取允许的超链接设置 if (file_exists(DEDEDATA."/admin/allowurl.txt")) { $allow_urls = array_merge($allow_urls, file(DEDEDATA."/admin/allowurl.txt")); } @@ -560,11 +569,11 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' if ($autolitpic == 1 && $litpic == '') { $litpic = GetDDImgFromBody($body); } - //自动获取关键字 + //自动获取关键词 if ($autokey == 2 && $keywords == '') { $subject = $title; $message = $body; - // 采用DedeBIZ Core分词组件分词 + //采用DedeBIZ Core分词组件分词 if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { $keywords = ''; $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); @@ -574,7 +583,7 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' $keywords = $data->data; $client->Close(); } else { - include_once(DEDEINC.'/splitword.class.php'); + include_once(DEDEINC.'/libraries/splitword.class.php'); $keywords = ''; $sp = new SplitWord($cfg_soft_lang, $cfg_soft_lang); $sp->SetSource($subject, $cfg_soft_lang, $cfg_soft_lang); @@ -700,7 +709,7 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') } if (!empty($handurl) && !preg_match("#^http:\/\/#i", $handurl) && file_exists($cfg_basedir.$handurl)) { if (!is_object($dsql)) { - $dsql = new DedeSql(); + $dsql = new DedeSqli(); } $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '$handurl' "); $fullUrl = preg_replace("#\.([a-z]*)$#i", "", $handurl); @@ -716,6 +725,15 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') } else { $fullUrl = $fullUrl.".jpg"; } + $mime = get_mime_type($_FILES[$upname]['tmp_name']); + if (preg_match("#^unknow#", $mime)) { + ShowMsg("系统不支持fileinfo组件,建议php.ini中开启", -1); + exit; + } + if (!preg_match("#^(image|video|audio|application)#i", $mime)) { + ShowMsg("仅支持媒体文件及应用程序上传", -1); + exit; + } //保存 @move_uploaded_file($_FILES[$upname]['tmp_name'], $cfg_basedir.$fullUrl); $filename = $fullUrl; diff --git a/src/dede/inc/inc_batchup.php b/src/admin/inc/inc_batchup.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/inc/inc_batchup.php rename to src/admin/inc/inc_batchup.php index 835f6e44..5c4a7333 --- a/src/dede/inc/inc_batchup.php +++ b/src/admin/inc/inc_batchup.php @@ -1,157 +1,143 @@ -GetOne($query); - $nid = $row['nid']; - $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); - $addtable = trim($row['addtable']); - $issystem = $row['issystem']; - - //查询档案信息 - if ($issystem == -1) { - $arcQuery = "SELECT arc.*,tp.* from `$addtable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.aid='$aid' "; - } else { - $arcQuery = "SELECT arc.*,tp.*,arc.id AS aid FROM `$maintable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.id='$aid' "; - } - - $arcRow = $dsql->GetOne($arcQuery); - - //检测权限 - if (!TestPurview('a_Del,sys_ArcBatch')) { - if (TestPurview('a_AccDel')) { - if (!in_array($arcRow['typeid'], $admin_catalogs) && (count($admin_catalogs) != 0 || $cfg_admin_channel != 'all')) { - return FALSE; - } - } else if (TestPurview('a_MyDel')) { - if ($arcRow['mid'] != $cuserLogin->getUserID()) { - return FALSE; - } - } else { - return FALSE; - } - } - - //$issystem==-1 是单表模型,不使用回收站 - if ($issystem == -1) $type = 'OK'; - if (!is_array($arcRow)) return FALSE; - - /** 删除到回收站 **/ - if ($cfg_delete == 'Y' && $type == 'ON') { - $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='-2' WHERE id='$aid' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-2' WHERE id = '$aid'; "); - } else { - //删除数据库记录 - if (!$onlyfile) { - $query = "Delete From `#@__arctiny` where id='$aid' $whererecycle"; - if ($dsql->ExecuteNoneQuery($query)) { - $dsql->ExecuteNoneQuery("Delete From `#@__feedback` where aid='$aid' "); - $dsql->ExecuteNoneQuery("Delete From `#@__member_stow` where aid='$aid' "); - $dsql->ExecuteNoneQuery("Delete From `#@__taglist` where aid='$aid' "); - $dsql->ExecuteNoneQuery("Delete From `#@__erradd` where aid='$aid' "); - if ($addtable != '') { - $dsql->ExecuteNoneQuery("Delete From `$addtable` where aid='$aid'"); - } - if ($issystem != -1) { - $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$aid' $whererecycle"); - } - //删除相关附件 - if ($cfg_upload_switch == 'Y') { - $dsql->Execute("me", "SELECT * FROM `#@__uploads` WHERE arcid = '$aid'"); - while ($row = $dsql->GetArray('me')) { - $addfile = $row['url']; - $aid = $row['aid']; - $dsql->ExecuteNoneQuery("Delete From `#@__uploads` where aid = '$aid' "); - $upfile = $cfg_basedir.$addfile; - if (@file_exists($upfile)) @unlink($upfile); - } - } - } - } - //删除文本数据 - $filenameh = DEDEDATA."/textdata/".(ceil($aid / 5000))."/{$aid}-".substr(md5($cfg_cookie_encode), 0, 16).".txt"; - if (@is_file($filenameh)) @unlink($filenameh); - } - - if (empty($arcRow['money'])) $arcRow['money'] = 0; - if (empty($arcRow['ismake'])) $arcRow['ismake'] = 1; - if (empty($arcRow['arcrank'])) $arcRow['arcrank'] = 0; - if (empty($arcRow['filename'])) $arcRow['filename'] = ''; - - //删除HTML - if ($arcRow['ismake'] == -1 || $arcRow['arcrank'] != 0 || $arcRow['typeid'] == 0 || $arcRow['money'] > 0) { - return TRUE; - } - - //强制转换非多站点模式,以便统一方式获得实际HTML文件 - $GLOBALS['cfg_multi_site'] = 'N'; - $arcurl = GetFileUrl( - $arcRow['aid'], - $arcRow['typeid'], - $arcRow['senddate'], - $arcRow['title'], - $arcRow['ismake'], - $arcRow['arcrank'], - $arcRow['namerule'], - $arcRow['typedir'], - $arcRow['money'], - $arcRow['filename'] - ); - if (!preg_match("#\?#", $arcurl)) { - $htmlfile = GetTruePath().str_replace($GLOBALS['cfg_basehost'], '', $arcurl); - if (file_exists($htmlfile) && !is_dir($htmlfile)) { - @unlink($htmlfile); - $arcurls = explode(".", $htmlfile); - $sname = $arcurls[count($arcurls) - 1]; - $fname = preg_replace("#(\.$sname)$#", "", $htmlfile); - for ($i = 2; $i <= 100; $i++) { - $htmlfile = $fname."_{$i}.".$sname; - if (@file_exists($htmlfile)) @unlink($htmlfile); - else break; - } - } - } - - return true; -} - -//获取真实路径 -function GetTruePath($siterefer = '', $sitepath = '') -{ - $truepath = $GLOBALS['cfg_basedir']; - return $truepath; -} +GetOne($query); + $nid = $row['nid']; + $maintable = (trim($row['maintable']) == '' ? '#@__archives' : trim($row['maintable'])); + $addtable = trim($row['addtable']); + $issystem = $row['issystem']; + //查询档案信息 + if ($issystem == -1) { + $arcQuery = "SELECT arc.*,tp.* from `$addtable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.aid='$aid' "; + } else { + $arcQuery = "SELECT arc.*,tp.*,arc.id AS aid FROM `$maintable` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.id='$aid' "; + } + $arcRow = $dsql->GetOne($arcQuery); + //检测权限 + if (!TestPurview('a_Del,sys_ArcBatch')) { + if (TestPurview('a_AccDel')) { + if (!in_array($arcRow['typeid'], $admin_catalogs) && (count($admin_catalogs) != 0 || $cfg_admin_channel != 'all')) { + return FALSE; + } + } else if (TestPurview('a_MyDel')) { + if ($arcRow['mid'] != $cuserLogin->getUserID()) { + return FALSE; + } + } else { + return FALSE; + } + } + //$issystem==-1 是单表模型,不使用回收站 + if ($issystem == -1) $type = 'OK'; + if (!is_array($arcRow)) return FALSE; + /** 删除到回收站 **/ + if ($cfg_delete == 'Y' && $type == 'ON') { + $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='-2' WHERE id='$aid' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-2' WHERE id = '$aid'; "); + } else { + //删除数据库记录 + if (!$onlyfile) { + $query = "Delete From `#@__arctiny` where id='$aid' $whererecycle"; + if ($dsql->ExecuteNoneQuery($query)) { + $dsql->ExecuteNoneQuery("Delete From `#@__feedback` where aid='$aid' "); + $dsql->ExecuteNoneQuery("Delete From `#@__member_stow` where aid='$aid' "); + $dsql->ExecuteNoneQuery("Delete From `#@__taglist` where aid='$aid' "); + $dsql->ExecuteNoneQuery("Delete From `#@__erradd` where aid='$aid' "); + if ($addtable != '') { + $dsql->ExecuteNoneQuery("Delete From `$addtable` where aid='$aid'"); + } + if ($issystem != -1) { + $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$aid' $whererecycle"); + } + //删除相关附件 + if ($cfg_upload_switch == 'Y') { + $dsql->Execute("me", "SELECT * FROM `#@__uploads` WHERE arcid = '$aid'"); + while ($row = $dsql->GetArray('me')) { + $addfile = $row['url']; + $aid = $row['aid']; + $dsql->ExecuteNoneQuery("Delete From `#@__uploads` where aid = '$aid' "); + $upfile = $cfg_basedir.$addfile; + if (@file_exists($upfile)) @unlink($upfile); + } + } + } + } + //删除文本数据 + $filenameh = DEDEDATA."/textdata/".(ceil($aid / 5000))."/{$aid}-".substr(md5($cfg_cookie_encode), 0, 16).".txt"; + if (@is_file($filenameh)) @unlink($filenameh); + } + if (empty($arcRow['money'])) $arcRow['money'] = 0; + if (empty($arcRow['ismake'])) $arcRow['ismake'] = 1; + if (empty($arcRow['arcrank'])) $arcRow['arcrank'] = 0; + if (empty($arcRow['filename'])) $arcRow['filename'] = ''; + //删除HTML + if ($arcRow['ismake'] == -1 || $arcRow['arcrank'] != 0 || $arcRow['typeid'] == 0 || $arcRow['money'] > 0) { + return TRUE; + } + //强制转换非多站点模式,以便统一方式获得实际HTML文件 + $GLOBALS['cfg_multi_site'] = 'N'; + $arcurl = GetFileUrl( + $arcRow['aid'], + $arcRow['typeid'], + $arcRow['senddate'], + $arcRow['title'], + $arcRow['ismake'], + $arcRow['arcrank'], + $arcRow['namerule'], + $arcRow['typedir'], + $arcRow['money'], + $arcRow['filename'] + ); + if (!preg_match("#\?#", $arcurl)) { + $htmlfile = GetTruePath().str_replace($GLOBALS['cfg_basehost'], '', $arcurl); + if (file_exists($htmlfile) && !is_dir($htmlfile)) { + @unlink($htmlfile); + $arcurls = explode(".", $htmlfile); + $sname = $arcurls[count($arcurls) - 1]; + $fname = preg_replace("#(\.$sname)$#", "", $htmlfile); + for ($i = 2; $i <= 100; $i++) { + $htmlfile = $fname."_{$i}.".$sname; + if (@file_exists($htmlfile)) @unlink($htmlfile); + else break; + } + } + } + return true; +} +//获取真实路径 +function GetTruePath($siterefer = '', $sitepath = '') +{ + $truepath = $GLOBALS['cfg_basedir']; + return $truepath; +} \ No newline at end of file diff --git a/src/dede/inc/inc_catalog_options.php b/src/admin/inc/inc_catalog_options.php old mode 100755 new mode 100644 similarity index 80% rename from src/dede/inc/inc_catalog_options.php rename to src/admin/inc/inc_catalog_options.php index 9ced1e56..2d3ffb05 --- a/src/dede/inc/inc_catalog_options.php +++ b/src/admin/inc/inc_catalog_options.php @@ -1,104 +1,94 @@ -SetQuery("SELECT id,typename FROM `#@__channeltype` "); - $dsql->Execute('dd'); - $channels = array(); - while ($row = $dsql->GetObject('dd')) $channels[$row->id] = $row->typename; - - $OptionArrayList = ''; - - //当前选中的栏目 - if ($selid > 0) { - $row = $dsql->GetOne("SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id='$selid'"); - if ($row['ispart'] == 1) $OptionArrayList .= "\r\n"; - else $OptionArrayList .= "\r\n"; - } - - //是否限定用户管理的栏目 - if ($cfg_admin_channel == 'array') { - if (count($admin_catalogs) == 0) { - $query = "SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE 1=2 "; - } else { - $admin_catalog = join(',', $admin_catalogs); - $dsql->SetQuery("SELECT reid FROM `#@__arctype` WHERE id IN($admin_catalog) GROUP BY reid "); - $dsql->Execute('qq'); - $topidstr = ''; - while ($row = $dsql->GetObject('qq')) { - 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); - $admin_catalog = join(',', $admin_catalogs); - $admin_catalog = preg_replace("#,$#", '', $admin_catalog); - $query = "SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id IN($admin_catalog) AND reid=0 AND ispart<>2 "; - } - } else { - $query = "SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE ispart<>2 AND reid=0 ORDER BY sortrank ASC "; - } - - $dsql->SetQuery($query); - $dsql->Execute('cc'); - - while ($row = $dsql->GetObject('cc')) { - $sonCats = ''; - LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); - if ($sonCats != '') { - if ($row->ispart == 1) $OptionArrayList .= "\r\n"; - else if ($row->ispart == 2) $OptionArrayList .= ''; - else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= "\r\n"; - else $OptionArrayList .= "\r\n"; - $OptionArrayList .= $sonCats; - } else { - if ($row->ispart == 0 && (!empty($channeltype) && $row->channeltype == $channeltype)) { - $OptionArrayList .= "\r\n"; - } else if ($row->ispart == 0 && empty($channeltype)) { - // 专题 - $OptionArrayList .= "\r\n"; - } - } - } - return $OptionArrayList; -} - -function LogicGetOptionArray($id, $step, $channeltype, &$dsql, &$sonCats) -{ - global $OptionArrayList, $channels, $cfg_admin_channel, $admin_catalogs; - $dsql->SetQuery("Select id,typename,ispart,channeltype From `#@__arctype` where reid='".$id."' And ispart<>2 order by sortrank asc"); - $dsql->Execute($id); - while ($row = $dsql->GetObject($id)) { - if ($cfg_admin_channel != 'all' && !in_array($row->id, $admin_catalogs)) { - continue; - } - if ($row->channeltype == $channeltype && $row->ispart == 1) { - $sonCats .= "\r\n"; - } else if (($row->channeltype == $channeltype && $row->ispart == 0) || empty($channeltype)) { - $sonCats .= "\r\n"; - } - LogicGetOptionArray($row->id, $step.'─', $channeltype, $dsql, $sonCats); - } -} +SetQuery("SELECT id,typename FROM `#@__channeltype` "); + $dsql->Execute('dd'); + $channels = array(); + while ($row = $dsql->GetObject('dd')) $channels[$row->id] = $row->typename; + $OptionArrayList = ''; + //当前选中的栏目 + if ($selid > 0) { + $row = $dsql->GetOne("SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE id='$selid'"); + if ($row['ispart'] == 1) $OptionArrayList .= ""; + else $OptionArrayList .= ""; + } + //是否限定用户管理的栏目 + if ($cfg_admin_channel == 'array') { + if (count($admin_catalogs) == 0) { + $query = "SELECT id,typename,ispart,channeltype FROM `#@__arctype` WHERE 1=2 "; + } else { + $admin_catalog = join(',', $admin_catalogs); + $dsql->SetQuery("SELECT reid FROM `#@__arctype` WHERE id IN($admin_catalog) GROUP BY reid "); + $dsql->Execute('qq'); + $topidstr = ''; + while ($row = $dsql->GetObject('qq')) { + 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); + $admin_catalog = join(',', $admin_catalogs); + $admin_catalog = preg_replace("#,$#", '', $admin_catalog); + $query = "Select id,typename,ispart,channeltype From `#@__arctype` where id in($admin_catalog) And reid=0"; + } + } else { + $query = "Select id,typename,ispart,channeltype From `#@__arctype` where reid=0 order by sortrank asc"; + } + $dsql->SetQuery($query); + $dsql->Execute('cc'); + while ($row = $dsql->GetObject('cc')) { + $sonCats = ''; + LogicGetOptionArray($row->id, '─', $channeltype, $dsql, $sonCats); + if ($sonCats != '') { + if ($row->ispart == 1) $OptionArrayList .= ""; + else if($row->ispart == 2) $OptionArrayList .= ""; + else if (empty($channeltype) && $row->ispart != 0) $OptionArrayList .= ""; + else $OptionArrayList .= ""; + $OptionArrayList .= $sonCats; + } else { + if ($row->ispart == 0 && (!empty($channeltype) && $row->channeltype == $channeltype)) { + $OptionArrayList .= ""; + } else if ($row->ispart == 0 && empty($channeltype)) { + $OptionArrayList .= ""; + } + } + } + return $OptionArrayList; +} +function LogicGetOptionArray($id, $step, $channeltype, &$dsql, &$sonCats) +{ + global $OptionArrayList, $channels, $cfg_admin_channel, $admin_catalogs; + $dsql->SetQuery("Select id,typename,ispart,channeltype From `#@__arctype` where reid='".$id."' order by sortrank asc"); + $dsql->Execute($id); + while ($row = $dsql->GetObject($id)) { + if ($cfg_admin_channel != 'all' && !in_array($row->id, $admin_catalogs)) { + continue; + } + if ($row->channeltype == $channeltype && $row->ispart == 1) { + $sonCats .= ""; + } else if (($row->channeltype == $channeltype && $row->ispart == 0) || empty($channeltype)) { + $sonCats .= ""; + } + LogicGetOptionArray($row->id, $step.'─', $channeltype, $dsql, $sonCats); + } +} \ No newline at end of file diff --git a/src/dede/inc/inc_coonepage.php b/src/admin/inc/inc_coonepage.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/inc/inc_coonepage.php rename to src/admin/inc/inc_coonepage.php index 3831ed32..d3949630 --- a/src/dede/inc/inc_coonepage.php +++ b/src/admin/inc/inc_coonepage.php @@ -1,108 +1,101 @@ - '', 'body' => '', 'source' => '', 'writer' => '', 'description' => '', 'keywords' => ''); - $redatas['source'] = preg_replace("/http:\/\//i", "", $gurl); - $redatas['source'] = preg_replace("/\/(.*)$/i", "", $redatas['source']); - $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '".$redatas['source']."' "); - $s = $e = ''; - if (is_array($row)) { - list($s, $e) = explode('{@body}', $row['rule']); - $s = trim($s); - $e = trim($e); - if ($row['issource'] == 1) { - $redatas['source'] = $row['title']; - } - } - $htd = new DedeHttpDown(); - $htd->OpenUrl($gurl); - $body = $htd->GetHtml(); - if ($body != '') { - //编码自动转换 - if ($cfg_soft_lang == 'utf-8') { - if ($row['lang'] == 'gb2312') { - $body = gb2utf8($body); - } - } else if ($cfg_soft_lang == 'gb2312') { - if ($row['lang'] == 'utf-8') { - $body = utf82gb($body); - } - } - - //获取标题 - $inarr = array(); - preg_match("/(.*)<\/title>/isU", $body, $inarr); - if (isset($inarr[1])) { - $redatas['title'] = $inarr[1]; - } - - //获取关键词 - $inarr = array(); - preg_match("/<meta[\s]+name=['\"]keywords['\"] content=['\"](.*)['\"]/isU", $body, $inarr); - if (isset($inarr[1])) { - $redatas['keywords'] = cn_substr(html2text($inarr[1]), 30); - } - - //获取摘要 - $inarr = array(); - preg_match("/<meta[\s]+name=['\"]description['\"] content=['\"](.*)['\"]/isU", $body, $inarr); - if (isset($inarr[1])) { - $redatas['description'] = cn_substr(html2text($inarr[1]), $cfg_auot_description); - } - - //获取内容 - if ($s != '' && $e != '') { - $redatas['body'] = GetHtmlAreaA($s, $e, $body); - if ($redatas['body'] != '' && $redatas['description'] == '') { - $redatas['description'] = cn_substr(html2text($redatas['body']), $GLOBALS['cfg_auot_description']); - } - } - } - return $redatas; -} - -/** - * 获取特定区域的HTML - * - * @access public - * @param string $s 开始标识符 - * @param string $e 末尾标识符 - * @param string $html 文档信息 - * @return string - */ -function GetHtmlAreaA($s, $e, &$html) -{ - if ($html == "" || $s == "") { - return ""; - } - $posstart = @strpos($html, $s); - if ($posstart === FALSE) { - return ""; - } - $posend = strpos($html, $e, $posstart); - if ($posend > $posstart && $posend !== FALSE) { - return substr($html, $posstart + strlen($s), $posend - $posstart - strlen($s)); - } else { - return ''; - } -} +<?php +/** + * 采集指定页面作为文章发布源 + * + * @version $Id: inc_coonepage.php 1 10:32 2010年7月21日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(DEDEINC.'/charset.func.php'); +/** + * 获取一个页面 + * + * @access public + * @param string $gurl 操作地址 + * @return string + */ +function CoOnePage($gurl) +{ + global $dsql, $cfg_auot_description, $cfg_soft_lang; + $redatas = array('title' => '', 'body' => '', 'source' => '', 'writer' => '', 'description' => '', 'keywords' => ''); + $redatas['source'] = preg_replace("/http:\/\//i", "", $gurl); + $redatas['source'] = preg_replace("/\/(.*)$/i", "", $redatas['source']); + $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '".$redatas['source']."' "); + $s = $e = ''; + if (is_array($row)) { + list($s, $e) = explode('{@body}', $row['rule']); + $s = trim($s); + $e = trim($e); + if ($row['issource'] == 1) { + $redatas['source'] = $row['title']; + } + } + $htd = new DedeHttpDown(); + $htd->OpenUrl($gurl); + $body = $htd->GetHtml(); + if ($body != '') { + //编码自动转换 + if ($cfg_soft_lang == 'utf-8') { + if ($row['lang'] == 'gb2312') { + $body = gb2utf8($body); + } + } else if ($cfg_soft_lang == 'gb2312') { + if ($row['lang'] == 'utf-8') { + $body = utf82gb($body); + } + } + //获取标题 + $inarr = array(); + preg_match("/<title>(.*)<\/title>/isU", $body, $inarr); + if (isset($inarr[1])) { + $redatas['title'] = $inarr[1]; + } + //获取关键词 + $inarr = array(); + preg_match("/<meta[\s]+name=['\"]keywords['\"] content=['\"](.*)['\"]/isU", $body, $inarr); + if (isset($inarr[1])) { + $redatas['keywords'] = cn_substr(html2text($inarr[1]), 30); + } + //获取摘要 + $inarr = array(); + preg_match("/<meta[\s]+name=['\"]description['\"] content=['\"](.*)['\"]/isU", $body, $inarr); + if (isset($inarr[1])) { + $redatas['description'] = cn_substr(html2text($inarr[1]), $cfg_auot_description); + } + //获取内容 + if ($s != '' && $e != '') { + $redatas['body'] = GetHtmlAreaA($s, $e, $body); + if ($redatas['body'] != '' && $redatas['description'] == '') { + $redatas['description'] = cn_substr(html2text($redatas['body']), $GLOBALS['cfg_auot_description']); + } + } + } + return $redatas; +} +/** + * 获取特定区域的HTML + * + * @access public + * @param string $s 开始标识符 + * @param string $e 末尾标识符 + * @param string $html 文档信息 + * @return string + */ +function GetHtmlAreaA($s, $e, &$html) +{ + if ($html == "" || $s == "") { + return ""; + } + $posstart = @strpos($html, $s); + if ($posstart === FALSE) { + return ""; + } + $posend = strpos($html, $e, $posstart); + if ($posend > $posstart && $posend !== FALSE) { + return substr($html, $posstart + strlen($s), $posend - $posstart - strlen($s)); + } else { + return ''; + } +} \ No newline at end of file diff --git a/src/dede/inc/inc_list_functions.php b/src/admin/inc/inc_list_functions.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/inc/inc_list_functions.php rename to src/admin/inc/inc_list_functions.php index 1a4e123a..96cf03e1 --- a/src/dede/inc/inc_list_functions.php +++ b/src/admin/inc/inc_list_functions.php @@ -9,9 +9,9 @@ * @link https://www.dedebiz.com */ if (!isset($registerGlobals)) { - require_once(dirname(__FILE__)."/../../include/common.inc.php"); + require_once(dirname(__FILE__)."/../../system/common.inc.php"); } -// 获取栏目名称 +//获取栏目名称 function GetTypename($tid) { global $dsql; diff --git a/src/dede/inc/inc_menu.php b/src/admin/inc/inc_menu.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/inc/inc_menu.php rename to src/admin/inc/inc_menu.php index 57546790..f495d7ae --- a/src/dede/inc/inc_menu.php +++ b/src/admin/inc/inc_menu.php @@ -1,129 +1,128 @@ -<?php -/** - * 后台管理菜单项 - * - * @version $Id: inc_menu.php 1 10:32 2010年7月21日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require_once(dirname(__FILE__)."/../config.php"); -//载入可发布频道 -$addset = ''; -//检测可用的内容模型 -if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { - $admin_catalog = join(',', $admin_catalogs); - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); -} else { - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); -} -$dsql->Execute(); -$candoChannel = ''; -while ($row = $dsql->GetObject()) { - $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); -} -if (empty($candoChannel)) $candoChannel = 1; -$dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); -$dsql->Execute('mm'); -while ($row = $dsql->GetObject('mm')) { - $addset .= "<m:item name='{$row->typename}' ischannel='1' link='{$row->mancon}?channelid={$row->id}' linkadd='{$row->addcon}?channelid={$row->id}' channelid='{$row->id}' rank='' target='main' />\r\n"; -} -$helpUrl = DEDEBIZURL."/help"; -$gitUrl = DEDEBIZURL."/git"; -$dedebizUrl = DEDEBIZURL; -$adminMenu1 = $adminMenu2 = ''; -if ($cuserLogin->getUserType() >= 10) { - $adminMenu1 = "<m:top item='1_' name='频道模型' display='block' rank='t_List,t_AccList,c_List,temp_One'> - <m:item name='内容模型管理' link='mychannel_main.php' rank='c_List' target='main' /> - <m:item name='单页文档管理' link='templets_one.php' rank='temp_One' target='main'/> - <m:item name='联动类别管理' link='stepselect_main.php' rank='c_Stepseclect' target='main' /> - <m:item name='自由列表管理' link='freelist_main.php' rank='c_List' target='main' /> - <m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> -</m:top>"; - $adminMenu2 = "<m:top item='7_' name='模板管理' display='none' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All'> - <m:item name='默认模板管理' link='templets_main.php' rank='temp_All' target='main'/> - <m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main'/> - <m:item name='自定义宏标记' link='mytag_main.php' rank='temp_MyTag' target='main'/> - <m:item name='智能标记向导' link='mytag_tag_guide.php' rank='temp_Other' target='main'/> - <m:item name='全局标记测试' link='tag_test.php' rank='temp_Test' target='main'/> -</m:top> -<m:top item='10_' name='系统设置' display='none' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'> - <m:item name='系统基本参数' link='sys_info.php' rank='sys_Edit' target='main' /> - <m:item name='系统用户管理' link='sys_admin_user.php' rank='sys_User' target='main' /> - <m:item name='用户组设定' link='sys_group.php' rank='sys_Group' target='main' /> - <m:item name='系统日志管理' link='log_list.php' rank='sys_Log' target='main' /> - <m:item name='图片水印设置' link='sys_info_mark.php' rank='sys_Edit' target='main' /> - <m:item name='自定义文档属性' link='content_att.php' rank='sys_Att' target='main' /> - <m:item name='软件频道设置' link='soft_config.php' rank='sys_SoftConfig' target='main' /> - <m:item name='防采集串混淆' link='article_string_mix.php' rank='sys_StringMix' target='main' /> - <m:item name='随机模板设置' link='article_template_rand.php' rank='sys_StringMix' target='main' /> - <m:item name='数据备份还原' link='sys_data.php' rank='sys_Data' target='main' /> - <m:item name='SQL命令行工具' link='sys_sql_query.php' rank='sys_Data' target='main' /> - <m:item name='病毒文件扫描' link='sys_safetest.php' rank='sys_verify' target='main' /> - <m:item name='系统错误修复' link='sys_repair.php' rank='sys_verify' target='main' /> -</m:top> -<m:top item='10_6_' name='支付工具' display='none' rank='sys_Data'> - <m:item name='点卡产品分类' link='cards_type.php' rank='sys_Data' target='main' /> - <m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> - <m:item name='会员产品分类' link='member_type.php' rank='sys_Data' target='main' /> - <m:item name='会员消费记录' link='member_operations.php' rank='sys_Data' target='main' /> - <m:item name='商店订单记录' link='shops_operations.php' rank='sys_Data' target='main' /> - <m:item name='支付接口设置' link='sys_payment.php' .php' rank='sys_Data' target='main' /> - <m:item name='配货方式设置' link='shops_delivery.php' rank='sys_Data' target='main' /> -</m:top>"; -} -$menusMain = "<m:top item='1_' name='常用操作' display='block'> - <m:item name='网站栏目管理' link='catalog_main.php' ischannel='1' addalt='创建栏目' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' /> - <m:item name='所有档案列表' link='content_list.php' rank='a_List,a_AccList' target='main' /> - <m:item name='等审核的档案' link='content_list.php?arcrank=-1' rank='a_Check,a_AccCheck' target='main' /> - <m:item name='我发布的文档' link='content_list.php?mid=".$cuserLogin->getUserID()."' rank='a_List,a_AccList,a_MyList' target='main' /> - <m:item name='评论管理' link='feedback_main.php' rank='sys_Feedback' target='main' /> - <m:item name='文档回收站' link='recycling.php' ischannel='1' addalt='清空回收站' addico='images/gtk-del.png' linkadd='archives_do.php?dopost=clear&aid=no&recycle=1' rank='a_List,a_AccList,a_MyList' target='main' /> -</m:top> -<m:top item='1_' name='内容管理' display='block'> - $addset - <m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' /> -</m:top> -<m:top item='1_' name='附件管理' display='none' rank='sys_Upload,sys_MyUpload,plus_文件管理器'> - <m:item name='上传新文件' link='media_add.php' rank='' target='main' /> - <m:item name='附件数据管理' link='media_main.php' rank='sys_Upload,sys_MyUpload' target='main' /> - <m:item name='文件式管理器' link='media_main.php?dopost=filemanager' rank='plus_文件管理器' target='main' /> -</m:top> -$adminMenu1 -<m:top item='1_3_3' name='批量维护' display='block'> - <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> - <m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> - <m:item name='搜索关键词维护' link='search_keywords_main.php' rank='sys_Keyword' target='main' /> - <m:item name='文档关键词维护' link='article_keywords_main.php' rank='sys_Keyword' target='main' /> - <m:item name='重复文档检测' link='article_test_same.php' rank='sys_ArcBatch' target='main' /> - <m:item name='自动摘要分页' link='article_description_main.php' rank='sys_Keyword' target='main' /> - <m:item name='Tag标签管理' link='tags_main.php' rank='sys_Keyword' target='main' /> - <m:item name='数据库内容替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' /> -</m:top> -<m:top item='5_' name='自动任务' notshowall='1' display='block' rank='sys_MakeHtml'> - <m:item name='一键更新网站' link='makehtml_all.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> -</m:top> -<m:top item='5_' name='更新网站' notshowall='1' display='none' rank='sys_MakeHtml'> - <m:item name='更新主页' link='makehtml_homepage.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新栏目' link='makehtml_list.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新文档' link='makehtml_archives.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新网站地图' link='makehtml_map_guide.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新订阅' link='makehtml_rss.php' rank='sys_MakeHtml' target='main' /> - <m:item name='获取脚本' link='makehtml_js.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新专题' link='makehtml_spec.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新Tag标签' link='makehtml_taglist.php' rank='sys_MakeHtml' target='main' /> -</m:top> -<m:top item='6_' name='会员管理' display='none' rank='member_List,member_Type'> - <m:item name='注册会员列表' link='member_main.php' rank='member_List' target='main' /> - <m:item name='会员级别设置' link='member_rank.php' rank='member_Type' target='main' /> - <m:item name='积分头衔设置' link='member_scores.php' rank='member_Type' target='main' /> - <m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> -</m:top> -$adminMenu2 -<m:top item='1_10_7_' name='系统帮助' display='none'> - <m:item name='参考文档' link='$cfg_biz_helpUrl' rank='' target='_blank' /> - <m:item name='代码托管' link='$cfg_biz_gitUrl' rank='' target='_blank' /> - <m:item name='商业支持' link='$cfg_biz_dedebizUrl' rank='' target='_blank' /> +<?php +/** + * 后台管理菜单项 + * + * @version $Id: inc_menu.php 1 10:32 2010年7月21日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(dirname(__FILE__)."/../config.php"); +//载入可发布频道 +$addset = ''; +//检测可用的内容模型 +if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { + $admin_catalog = join(',', $admin_catalogs); + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); +} else { + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); +} +$dsql->Execute(); +$candoChannel = ''; +while ($row = $dsql->GetObject()) { + $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); +} +if (empty($candoChannel)) $candoChannel = 1; +$dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); +$dsql->Execute('mm'); +while ($row = $dsql->GetObject('mm')) { + $addset .= "<m:item name='{$row->typename}' ischannel='1' link='{$row->mancon}?channelid={$row->id}' linkadd='{$row->addcon}?channelid={$row->id}' channelid='{$row->id}' rank='' target='main' />\r\n"; +} +$helpUrl = DEDEBIZURL."/help"; +$gitUrl = DEDEBIZURL."/git"; +$dedebizUrl = DEDEBIZURL; +$adminMenu1 = $adminMenu2 = ''; +if ($cuserLogin->getUserType() >= 10) { + $adminMenu1 = "<m:top item='1_' name='频道模型' display='block' rank='t_List,t_AccList,c_List,temp_One'> + <m:item name='内容模型管理' link='mychannel_main.php' rank='c_List' target='main' /> + <m:item name='单页文档管理' link='templets_one.php' rank='temp_One' target='main'/> + <m:item name='联动类别管理' link='stepselect_main.php' rank='c_Stepseclect' target='main' /> + <m:item name='自由列表管理' link='freelist_main.php' rank='c_List' target='main' /> + <m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> +</m:top>"; + $adminMenu2 = "<m:top item='7_' name='模板管理' display='none' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All'> + <m:item name='默认模板管理' link='templets_main.php' rank='temp_All' target='main'/> + <m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main'/> + <m:item name='自定义宏标记' link='mytag_main.php' rank='temp_MyTag' target='main'/> + <m:item name='智能标记向导' link='mytag_tag_guide.php' rank='temp_Other' target='main'/> + <m:item name='全局标记测试' link='tag_test.php' rank='temp_Test' target='main'/> +</m:top> +<m:top item='10_' name='系统设置' display='none' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'> + <m:item name='系统配置变量' link='sys_info.php' rank='sys_Edit' target='main' /> + <m:item name='系统用户管理' link='sys_admin_user.php' rank='sys_User' target='main' /> + <m:item name='用户组设定' link='sys_group.php' rank='sys_Group' target='main' /> + <m:item name='系统日志管理' link='log_list.php' rank='sys_Log' target='main' /> + <m:item name='图片水印设置' link='sys_info_mark.php' rank='sys_Edit' target='main' /> + <m:item name='自定义文档属性' link='content_att.php' rank='sys_Att' target='main' /> + <m:item name='软件频道设置' link='soft_config.php' rank='sys_SoftConfig' target='main' /> + <m:item name='防采集串混淆' link='article_string_mix.php' rank='sys_StringMix' target='main' /> + <m:item name='随机模板设置' link='article_template_rand.php' rank='sys_StringMix' target='main' /> + <m:item name='数据备份还原' link='sys_data.php' rank='sys_Data' target='main' /> + <m:item name='SQL命令行工具' link='sys_sql_query.php' rank='sys_Data' target='main' /> + <m:item name='病毒文件扫描' link='sys_safetest.php' rank='sys_verify' target='main' /> + <m:item name='系统错误修复' link='sys_repair.php' rank='sys_verify' target='main' /> +</m:top> +<m:top item='10_6_' name='支付工具' display='none' rank='sys_Data'> + <m:item name='点卡产品分类' link='cards_type.php' rank='sys_Data' target='main' /> + <m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> + <m:item name='会员产品分类' link='member_type.php' rank='sys_Data' target='main' /> + <m:item name='会员消费记录' link='member_operations.php' rank='sys_Data' target='main' /> + <m:item name='商店订单记录' link='shops_operations.php' rank='sys_Data' target='main' /> + <m:item name='支付接口设置' link='sys_payment.php' .php' rank='sys_Data' target='main' /> + <m:item name='配货方式设置' link='shops_delivery.php' rank='sys_Data' target='main' /> +</m:top>"; +} +$menusMain = "<m:top item='1_' name='常用操作' display='block'> + <m:item name='网站栏目管理' link='catalog_main.php' ischannel='1' addalt='创建栏目' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' /> + <m:item name='所有文档列表' link='content_list.php' rank='a_List,a_AccList' target='main' /> + <m:item name='等审核的档案' link='content_list.php?arcrank=-1' rank='a_Check,a_AccCheck' target='main' /> + <m:item name='我发布的文档' link='content_list.php?mid=".$cuserLogin->getUserID()."' rank='a_List,a_AccList,a_MyList' target='main' /> + <m:item name='评论管理' link='feedback_main.php' rank='sys_Feedback' target='main' /> + <m:item name='文档回收站' link='recycling.php' ischannel='1' addalt='清空回收站' addico='images/gtk-del.png' linkadd='archives_do.php?dopost=clear&aid=no&recycle=1' rank='a_List,a_AccList,a_MyList' target='main' /> +</m:top> +<m:top item='1_' name='内容管理' display='block'> + $addset + <m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' /> +</m:top> +<m:top item='1_' name='附件管理' display='none' rank='sys_Upload,sys_MyUpload,plus_文件管理器'> + <m:item name='上传新文件' link='media_add.php' rank='' target='main' /> + <m:item name='附件数据管理' link='media_main.php' rank='sys_Upload,sys_MyUpload' target='main' /> + <m:item name='文件式管理器' link='media_main.php?dopost=filemanager' rank='plus_文件管理器' target='main' /> +</m:top> +$adminMenu1 +<m:top item='1_3_3' name='批量维护' display='block'> + <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> + <m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> + <m:item name='搜索关键词维护' link='search_keywords_main.php' rank='sys_Keyword' target='main' /> + <m:item name='文档关键词维护' link='article_keywords_main.php' rank='sys_Keyword' target='main' /> + <m:item name='重复文档检测' link='article_test_same.php' rank='sys_ArcBatch' target='main' /> + <m:item name='自动摘要分页' link='article_description_main.php' rank='sys_Keyword' target='main' /> + <m:item name='Tag标签管理' link='tags_main.php' rank='sys_Keyword' target='main' /> + <m:item name='数据库内容替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' /> +</m:top> +<m:top item='5_' name='自动任务' notshowall='1' display='block' rank='sys_MakeHtml'> + <m:item name='一键更新网站' link='makehtml_all.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> +</m:top> +<m:top item='5_' name='更新网站' notshowall='1' display='none' rank='sys_MakeHtml'> + <m:item name='更新首页' link='makehtml_homepage.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新栏目' link='makehtml_list.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新文档' link='makehtml_archives.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新网站地图' link='makehtml_map_guide.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新订阅' link='makehtml_rss.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新脚本' link='makehtml_js.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新专题' link='makehtml_spec.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新标签' link='makehtml_taglist.php' rank='sys_MakeHtml' target='main' /> +</m:top> +<m:top item='6_' name='会员管理' display='none' rank='member_List,member_Type'> + <m:item name='注册会员列表' link='member_main.php' rank='member_List' target='main' /> + <m:item name='会员级别设置' link='member_rank.php' rank='member_Type' target='main' /> + <m:item name='积分头衔设置' link='member_scores.php' rank='member_Type' target='main' /> + <m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> +</m:top> +$adminMenu2 +<m:top item='1_10_7_' name='系统帮助' display='none'> + <m:item name='系统概况' link='$cfg_biz_helpUrl' rank='' target='_blank' /> + <m:item name='代码托管' link='$cfg_biz_gitUrl' rank='' target='_blank' /> </m:top>"; \ No newline at end of file diff --git a/src/dede/inc/inc_menu_func.php b/src/admin/inc/inc_menu_func.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/inc/inc_menu_func.php rename to src/admin/inc/inc_menu_func.php index 581a95af..3bd76340 --- a/src/dede/inc/inc_menu_func.php +++ b/src/admin/inc/inc_menu_func.php @@ -1,93 +1,86 @@ -<?php - -/** - * 管理菜单函数 - * - * @version $Id: inc_menu_func.php 1 10:32 2010年7月21日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require_once(dirname(__FILE__)."/../config.php"); -require_once(DEDEINC."/dedetag.class.php"); - -$headTemplet = "<dl class='bitem' id='sunitems~cc~'><dt onClick='showHide(\"items~cc~\")'><b>~channelname~</b></dt> -<dd style='display:~display~' class='sitem' id='items~cc~'> -<ul class='sitemu'>\r\n"; - -$footTemplet = "</ul>\r\n</dd>\r\n</dl>\r\n"; - -$itemTemplet = "<li>~link~</li>\r\n"; - -function GetMenus($userrank, $topos = 'main') -{ - global $openitem, $headTemplet, $footTemplet, $itemTemplet; - if ($topos == 'main') { - $openitem = (empty($openitem) ? 1 : $openitem); - $menus = $GLOBALS['menusMain']; - } else if ($topos == 'module') { - $openitem = 100; - $menus = $GLOBALS['menusMoudle']; - } - $dtp = new DedeTagParse(); - $dtp->SetNameSpace('m', '<', '>'); - $dtp->LoadSource($menus); - $dtp2 = new DedeTagParse(); - $dtp2->SetNameSpace('m', '<', '>'); - $m = 0; - foreach ($dtp->CTags as $i => $ctag) { - if ($ctag->GetName() == 'top' && ($ctag->GetAtt('rank') == '' || TestPurview($ctag->GetAtt('rank')))) { - if ($openitem != 999 && !preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) && $openitem != 100) continue; - $m++; - echo "<!-- Item ".($m + 1)." Strat -->\r\n"; - $htmp = str_replace("~channelname~", $ctag->GetAtt("name"), $headTemplet); - if (empty($openitem) || $openitem == 100) { - if ($ctag->GetAtt('notshowall') == '1') continue; - $htmp = str_replace('~display~', $ctag->GetAtt('display'), $htmp); - } else { - if ($openitem == $ctag->GetAtt('item') || preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) || $openitem == '-1') - $htmp = str_replace('~display~', 'block', $htmp); - else - $htmp = str_replace('~display~', 'none', $htmp); - } - $htmp = str_replace('~cc~', $m.'_'.$openitem, $htmp); - echo $htmp; - $dtp2->LoadSource($ctag->InnerText); - foreach ($dtp2->CTags as $j => $ctag2) { - $ischannel = trim($ctag2->GetAtt('ischannel')); - if ($ctag2->GetName() == 'item' && ($ctag2->GetAtt('rank') == '' || TestPurview($ctag2->GetAtt('rank')))) { - $link = "<a href='".$ctag2->GetAtt('link')."' target='".$ctag2->GetAtt('target')."'>".$ctag2->GetAtt('name')."</a>"; - if ($ischannel == '1') { - if ($ctag2->GetAtt('addalt') != '') { - $addalt = $ctag2->GetAtt('addalt'); - } else { - $addalt = '录入新内容'; - } - - if ($ctag2->GetAtt('addico') != '') { - $addico = $ctag2->GetAtt('addico'); - } else { - $addico = 'images/gtk-sadd.png'; - } - - //an add icos , small items use att ischannel='1' addico='ico' addalt='msg' linkadd='' - $link = " <div class='items'> - <div class='fllct'>$link</div>\r\n - <div class='flrct'> - <a href='".$ctag2->GetAtt('linkadd')."' target='".$ctag2->GetAtt('target')."'><img src='$addico' alt='$addalt' title='$addalt'/></a> - </div> - </div>\r\n"; - } else { - $link .= "\r\n"; - } - $itemtmp = str_replace('~link~', $link, $itemTemplet); - echo $itemtmp; - } - } - echo $footTemplet; - echo "<!-- Item ".($m + 1)." End -->\r\n"; - } - } -} -//End Function \ No newline at end of file +<?php +/** + * 管理菜单函数 + * + * @version $Id: inc_menu_func.php 1 10:32 2010年7月21日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(dirname(__FILE__)."/../config.php"); +require_once(DEDEINC."/dedetag.class.php"); +$headTemplet = "<dl class='bitem' id='sunitems~cc~'><dt onClick='showHide(\"items~cc~\")'><b>~channelname~</b></dt> +<dd style='display:~display~' class='sitem' id='items~cc~'> +<ul class='sitemu'>\r\n"; +$footTemplet = "</ul>\r\n</dd>\r\n</dl>\r\n"; +$itemTemplet = "<li>~link~</li>\r\n"; +function GetMenus($userrank, $topos = 'main') +{ + global $openitem, $headTemplet, $footTemplet, $itemTemplet; + if ($topos == 'main') { + $openitem = (empty($openitem) ? 1 : $openitem); + $menus = $GLOBALS['menusMain']; + } else if ($topos == 'module') { + $openitem = 100; + $menus = $GLOBALS['menusMoudle']; + } + $dtp = new DedeTagParse(); + $dtp->SetNameSpace('m', '<', '>'); + $dtp->LoadSource($menus); + $dtp2 = new DedeTagParse(); + $dtp2->SetNameSpace('m', '<', '>'); + $m = 0; + foreach ($dtp->CTags as $i => $ctag) { + if ($ctag->GetName() == 'top' && ($ctag->GetAtt('rank') == '' || TestPurview($ctag->GetAtt('rank')))) { + if ($openitem != 999 && !preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) && $openitem != 100) continue; + $m++; + echo "<!-- Item ".($m + 1)." Strat -->\r\n"; + $htmp = str_replace("~channelname~", $ctag->GetAtt("name"), $headTemplet); + if (empty($openitem) || $openitem == 100) { + if ($ctag->GetAtt('notshowall') == '1') continue; + $htmp = str_replace('~display~', $ctag->GetAtt('display'), $htmp); + } else { + if ($openitem == $ctag->GetAtt('item') || preg_match("#".$openitem.'_'."#", $ctag->GetAtt('item')) || $openitem == '-1') + $htmp = str_replace('~display~', 'block', $htmp); + else + $htmp = str_replace('~display~', 'none', $htmp); + } + $htmp = str_replace('~cc~', $m.'_'.$openitem, $htmp); + echo $htmp; + $dtp2->LoadSource($ctag->InnerText); + foreach ($dtp2->CTags as $j => $ctag2) { + $ischannel = trim($ctag2->GetAtt('ischannel')); + if ($ctag2->GetName() == 'item' && ($ctag2->GetAtt('rank') == '' || TestPurview($ctag2->GetAtt('rank')))) { + $link = "<a href='".$ctag2->GetAtt('link')."' target='".$ctag2->GetAtt('target')."'>".$ctag2->GetAtt('name')."</a>"; + if ($ischannel == '1') { + if ($ctag2->GetAtt('addalt') != '') { + $addalt = $ctag2->GetAtt('addalt'); + } else { + $addalt = '录入新内容'; + } + + if ($ctag2->GetAtt('addico') != '') { + $addico = $ctag2->GetAtt('addico'); + } else { + $addico = 'images/gtk-sadd.png'; + } + //an add icos , small items use att ischannel='1' addico='ico' addalt='msg' linkadd='' + $link = " <div class='items'> + <div class='fllct'>$link</div>\r\n + <div class='flrct'> + <a href='".$ctag2->GetAtt('linkadd')."' target='".$ctag2->GetAtt('target')."'><img src='$addico' alt='$addalt' title='$addalt'/></a> + </div> + </div>\r\n"; + } else { + $link .= "\r\n"; + } + $itemtmp = str_replace('~link~', $link, $itemTemplet); + echo $itemtmp; + } + } + echo $footTemplet; + echo "<!-- Item ".($m + 1)." End -->\r\n"; + } + } +}//End Function \ No newline at end of file diff --git a/src/dede/inc/inc_menu_map.php b/src/admin/inc/inc_menu_map.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/inc/inc_menu_map.php rename to src/admin/inc/inc_menu_map.php index b3118d65..088934e1 --- a/src/dede/inc/inc_menu_map.php +++ b/src/admin/inc/inc_menu_map.php @@ -1,157 +1,157 @@ -<?php -/** - * 菜单地图 - * - * @version $Id: inc_menu_map.php 1 10:32 2010年7月21日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require_once(dirname(__FILE__)."/../config.php"); -$maparray = array(1 => '文档相关', 2 => '系统设置', 3 => '必须辅助功能', 4 => '网站更新操作', 5 => '会员相关', 6 => '基本模块插件'); -//载入可发布频道 -$addset = ''; -//检测可用的内容模型 -if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { - $admin_catalog = join(',', $admin_catalogs); - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); -} else { - $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); -} -$dsql->Execute(); -$candoChannel = ''; -while ($row = $dsql->GetObject()) { - $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); -} -if (empty($candoChannel)) $candoChannel = 1; -$dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $addset .= "<m:item name='{$row->typename}' ischannel='1' link='{$row->mancon}?channelid={$row->id}' linkadd='{$row->addcon}?channelid={$row->id}' channelid='{$row->id}' rank='' target='main' />\r\n"; -} -$menusMain = "<m:top mapitem='1' item='1_' name='常用操作' display='block'> - <m:item name='网站栏目管理' link='catalog_main.php' ischannel='1' addalt='创建栏目' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' /> - <m:item name='所有档案列表' link='content_list.php' rank='a_List,a_AccList' target='main' /> - <m:item name='等审核的档案' link='content_list.php?arcrank=-1' rank='a_Check,a_AccCheck' target='main' /> - <m:item name='我发布的文档' link='content_list.php?mid=".$cuserLogin->getUserID()."' rank='a_List,a_AccList,a_MyList' target='main' /> - <m:item name='评论管理' link='feedback_main.php' rank='sys_Feedback' target='main' /> - <m:item name='文档回收站' link='recycling.php' ischannel='1' addalt='清空回收站' addico='img/gtk-del.png' linkadd='archives_do.php?dopost=clear&aid=no' rank='a_List' target='main' /> -</m:top> -<m:top mapitem='1' item='1_' name='内容管理' display='block'> - $addset - <m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' /> -</m:top> -<m:top mapitem='1' item='1_' name='频道模型' display='block' rank='t_List,t_AccList,c_List,temp_One'> - <m:item name='内容模型管理' link='mychannel_main.php' rank='c_List' target='main' /> - <m:item name='单页文档管理' link='templets_one.php' rank='temp_One' target='main'/> - <m:item name='联动类别管理' link='stepselect_main.php' rank='c_Stepseclect' target='main' /> - <m:item name='自由列表管理' link='freelist_main.php' rank='c_List' target='main' /> - <m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> -</m:top> -<m:top mapitem='3' item='1_3_3' name='批量维护' display='block'> - <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> - <m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> - <m:item name='搜索关键词维护' link='search_keywords_main.php' rank='sys_Keyword' target='main' /> - <m:item name='文档关键词维护' link='article_keywords_main.php' rank='sys_Keyword' target='main' /> - <m:item name='自动摘要分页' link='article_description_main.php' rank='sys_Keyword' target='main' /> - <m:item name='Tag标签管理' link='tags_main.php' rank='sys_Keyword' target='main' /> - <m:item name='数据库内容替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' /> -</m:top> -<m:top mapitem='4' item='5_' name='自动任务' notshowall='1' display='block' rank='sys_MakeHtml'> - <m:item name='一键更新网站' link='makehtml_all.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> -</m:top> -<m:top mapitem='4' item='5_' name='更新网站' notshowall='1' display='none' rank='sys_MakeHtml'> - <m:item name='更新主页' link='makehtml_homepage.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新栏目' link='makehtml_list.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新文档' link='makehtml_archives.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新网站地图' link='makehtml_map_guide.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新订阅' link='makehtml_rss.php' rank='sys_MakeHtml' target='main' /> - <m:item name='获取脚本' link='makehtml_js.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新专题' link='makehtml_spec.php' rank='sys_MakeHtml' target='main' /> - <m:item name='更新Tag' link='makehtml_taglist.php' rank='sys_MakeHtml' target='main' /> -</m:top> -<m:top mapitem='3' item='1_6_' name='附件管理' display='none' rank='sys_Upload,sys_MyUpload,plus_文件管理器'> - <m:item name='上传新文件' link='media_add.php' rank='' target='main' /> - <m:item name='附件数据管理' link='media_main.php' rank='sys_Upload,sys_MyUpload' target='main' /> - <m:item name='文件式管理器' link='media_main.php?dopost=filemanager' rank='plus_文件管理器' target='main' /> -</m:top> -<m:top mapitem='5' item='6_' name='会员管理' display='none' rank='member_List,member_Type'> - <m:item name='注册会员列表' link='member_main.php' rank='member_List' target='main' /> - <m:item name='会员级别设置' link='member_rank.php' rank='member_Type' target='main' /> - <m:item name='积分头衔设置' link='member_scores.php' rank='member_Type' target='main' /> - <m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> -</m:top> -<m:top mapitem='2' item='10_' name='系统设置' display='none' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'> - <m:item name='系统基本参数' link='sys_info.php' rank='sys_Edit' target='main' /> - <m:item name='系统用户管理' link='sys_admin_user.php' rank='sys_User' target='main' /> - <m:item name='用户组设定' link='sys_group.php' rank='sys_Group' target='main' /> - <m:item name='系统日志管理' link='log_list.php' rank='sys_Log' target='main' /> - <m:item name='图片水印设置' link='sys_info_mark.php' rank='sys_Edit' target='main' /> - <m:item name='自定义文档属性' link='content_att.php' rank='sys_Att' target='main' /> - <m:item name='软件频道设置' link='soft_config.php' rank='sys_SoftConfig' target='main' /> - <m:item name='防采集串混淆' link='article_string_mix.php' rank='sys_StringMix' target='main' /> - <m:item name='随机模板设置' link='article_template_rand.php' rank='sys_StringMix' target='main' /> - <m:item name='数据库备份还原' link='sys_data.php' rank='sys_Data' target='main' /> - <m:item name='SQL命令行工具' link='sys_sql_query.php' rank='sys_Data' target='main' /> - <m:item name='病毒文件扫描' link='sys_safetest.php' rank='sys_verify' target='main' /> - <m:item name='系统错误修复' link='sys_repair.php' rank='sys_verify' target='main' /> -</m:top> -<m:top mapitem='5' item='10_6_' name='支付工具' display='none' rank='sys_Data'> - <m:item name='点卡产品分类' link='cards_type.php' rank='sys_Data' target='main' /> - <m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> - <m:item name='会员产品分类' link='member_type.php' rank='sys_Data' target='main' /> - <m:item name='会员消费记录' link='member_operations.php' rank='sys_Data' target='main' /> - <m:item name='商店订单记录' link='shops_operations.php' rank='sys_Data' target='main' /> - <m:item name='支付接口设置' link='sys_payment.php' .php' rank='sys_Data' target='main' /> - <m:item name='配货方式设置' link='shops_delivery.php' rank='sys_Data' target='main' /> -</m:top> -<m:top mapitem='2' item='10_7_' name='模板管理' display='none' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All'> - <m:item name='默认模板管理' link='templets_main.php' rank='temp_All' target='main'/> - <m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main'/> - <m:item name='自定义宏标记' link='mytag_main.php' rank='temp_MyTag' target='main'/> - <m:item name='智能标记向导' link='mytag_tag_guide.php' rank='temp_Other' target='main'/> - <m:item name='全局标记测试' link='tag_test.php' rank='temp_Test' target='main'/> -</m:top>"; -//载入插件菜单 -$plusset = ''; -$dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $plusset .= $row->menustring."\r\n"; -} -$menusMain .= " -<m:top mapitem='6' name='模块管理' c='6,' display='block'> - <m:item name='模块管理' link='module_main.php' rank='sys_module' target='main' /> - <m:item name='上传新模块' link='module_upload.php' rank='sys_module' target='main' /> - <m:item name='模块打包' link='module_make.php' rank='sys_module' target='main' /> -</m:top> -<m:top mapitem='6' item='7' name='辅助插件' display='block'> - <m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> - $plusset -</m:top>"; -$mapstring = ''; -$dtp = new DedeTagparse(); -$dtp->SetNameSpace('m', '<', '>'); -$dtp->LoadString($menusMain); -foreach ($maparray as $k => $bigname) { - $mapstring .= "<dl class='maptop'>\r\n"; - $mapstring .= "<dt class='bigitem'>$bigname</dt>\r\n"; - $mapstring .= "<dd>\r\n"; - foreach ($dtp->CTags as $ctag) { - if ($ctag->GetAtt('mapitem') == $k) { - $mapstring .= "<dl class='mapitem'>\r\n"; - $mapstring .= "<dt>".$ctag->GetAtt('name')."</dt>\r\n"; - $mapstring .= "<dd>\r\n<ul class='item'>\r\n"; - $dtp2 = new DedeTagParse(); - $dtp2->SetNameSpace('m', '<', '>'); - $dtp2->LoadSource($ctag->InnerText); - foreach ($dtp2->CTags as $j => $ctag2) { - $mapstring .= "<li><a href='".$ctag2->GetAtt('link')."' target='".$ctag2->GetAtt('target')."'>".$ctag2->GetAtt('name')."</a></li>\r\n"; - } - $mapstring .= "</ul>\r\n</dd>\r\n</dl>\r\n"; - } - } - $mapstring .= "</dd>\r\n</dl>\r\n"; +<?php +/** + * 菜单地图 + * + * @version $Id: inc_menu_map.php 1 10:32 2010年7月21日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(dirname(__FILE__)."/../config.php"); +$maparray = array(1 => '文档相关', 2 => '系统设置', 3 => '必须辅助功能', 4 => '网站更新操作', 5 => '会员相关', 6 => '基本模块插件'); +//载入可发布频道 +$addset = ''; +//检测可用的内容模型 +if ($cfg_admin_channel = 'array' && count($admin_catalogs) > 0) { + $admin_catalog = join(',', $admin_catalogs); + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` WHERE id IN({$admin_catalog}) GROUP BY channeltype "); +} else { + $dsql->SetQuery(" SELECT channeltype FROM `#@__arctype` GROUP BY channeltype "); +} +$dsql->Execute(); +$candoChannel = ''; +while ($row = $dsql->GetObject()) { + $candoChannel .= ($candoChannel == '' ? $row->channeltype : ','.$row->channeltype); +} +if (empty($candoChannel)) $candoChannel = 1; +$dsql->SetQuery("SELECT id,typename,addcon,mancon FROM `#@__channeltype` WHERE id IN({$candoChannel}) AND id<>-1 AND isshow=1 ORDER BY id ASC"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $addset .= "<m:item name='{$row->typename}' ischannel='1' link='{$row->mancon}?channelid={$row->id}' linkadd='{$row->addcon}?channelid={$row->id}' channelid='{$row->id}' rank='' target='main' />\r\n"; +} +$menusMain = "<m:top mapitem='1' item='1_' name='常用操作' display='block'> + <m:item name='网站栏目管理' link='catalog_main.php' ischannel='1' addalt='创建栏目' linkadd='catalog_add.php?listtype=all' rank='t_List,t_AccList' target='main' /> + <m:item name='所有文档列表' link='content_list.php' rank='a_List,a_AccList' target='main' /> + <m:item name='等审核的档案' link='content_list.php?arcrank=-1' rank='a_Check,a_AccCheck' target='main' /> + <m:item name='我发布的文档' link='content_list.php?mid=".$cuserLogin->getUserID()."' rank='a_List,a_AccList,a_MyList' target='main' /> + <m:item name='评论管理' link='feedback_main.php' rank='sys_Feedback' target='main' /> + <m:item name='文档回收站' link='recycling.php' ischannel='1' addalt='清空回收站' addico='img/gtk-del.png' linkadd='archives_do.php?dopost=clear&aid=no' rank='a_List' target='main' /> +</m:top> +<m:top mapitem='1' item='1_' name='内容管理' display='block'> + $addset + <m:item name='专题管理' ischannel='1' link='content_s_list.php' linkadd='spec_add.php' channelid='-1' rank='spec_New' target='main' /> +</m:top> +<m:top mapitem='1' item='1_' name='频道模型' display='block' rank='t_List,t_AccList,c_List,temp_One'> + <m:item name='内容模型管理' link='mychannel_main.php' rank='c_List' target='main' /> + <m:item name='单页文档管理' link='templets_one.php' rank='temp_One' target='main'/> + <m:item name='联动类别管理' link='stepselect_main.php' rank='c_Stepseclect' target='main' /> + <m:item name='自由列表管理' link='freelist_main.php' rank='c_List' target='main' /> + <m:item name='自定义表单' link='diy_main.php' rank='c_List' target='main' /> +</m:top> +<m:top mapitem='3' item='1_3_3' name='批量维护' display='block'> + <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> + <m:item name='文档批量维护' link='content_batch_up.php' rank='sys_ArcBatch' target='main' /> + <m:item name='搜索关键词维护' link='search_keywords_main.php' rank='sys_Keyword' target='main' /> + <m:item name='文档关键词维护' link='article_keywords_main.php' rank='sys_Keyword' target='main' /> + <m:item name='自动摘要分页' link='article_description_main.php' rank='sys_Keyword' target='main' /> + <m:item name='Tag标签管理' link='tags_main.php' rank='sys_Keyword' target='main' /> + <m:item name='数据库内容替换' link='sys_data_replace.php' rank='sys_ArcBatch' target='main' /> +</m:top> +<m:top mapitem='4' item='5_' name='自动任务' notshowall='1' display='block' rank='sys_MakeHtml'> + <m:item name='一键更新网站' link='makehtml_all.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新系统缓存' link='sys_cache_up.php' rank='sys_ArcBatch' target='main' /> +</m:top> +<m:top mapitem='4' item='5_' name='更新网站' notshowall='1' display='none' rank='sys_MakeHtml'> + <m:item name='更新首页' link='makehtml_homepage.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新栏目' link='makehtml_list.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新文档' link='makehtml_archives.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新网站地图' link='makehtml_map_guide.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新订阅' link='makehtml_rss.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新脚本' link='makehtml_js.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新专题' link='makehtml_spec.php' rank='sys_MakeHtml' target='main' /> + <m:item name='更新标签' link='makehtml_taglist.php' rank='sys_MakeHtml' target='main' /> +</m:top> +<m:top mapitem='3' item='1_6_' name='附件管理' display='none' rank='sys_Upload,sys_MyUpload,plus_文件管理器'> + <m:item name='上传新文件' link='media_add.php' rank='' target='main' /> + <m:item name='附件数据管理' link='media_main.php' rank='sys_Upload,sys_MyUpload' target='main' /> + <m:item name='文件式管理器' link='media_main.php?dopost=filemanager' rank='plus_文件管理器' target='main' /> +</m:top> +<m:top mapitem='5' item='6_' name='会员管理' display='none' rank='member_List,member_Type'> + <m:item name='注册会员列表' link='member_main.php' rank='member_List' target='main' /> + <m:item name='会员级别设置' link='member_rank.php' rank='member_Type' target='main' /> + <m:item name='积分头衔设置' link='member_scores.php' rank='member_Type' target='main' /> + <m:item name='会员短信管理' link='member_pm.php' rank='member_Type' target='main' /> +</m:top> +<m:top mapitem='2' item='10_' name='系统设置' display='none' rank='sys_User,sys_Group,sys_Edit,sys_Log,sys_Data'> + <m:item name='系统配置变量' link='sys_info.php' rank='sys_Edit' target='main' /> + <m:item name='系统用户管理' link='sys_admin_user.php' rank='sys_User' target='main' /> + <m:item name='用户组设定' link='sys_group.php' rank='sys_Group' target='main' /> + <m:item name='系统日志管理' link='log_list.php' rank='sys_Log' target='main' /> + <m:item name='图片水印设置' link='sys_info_mark.php' rank='sys_Edit' target='main' /> + <m:item name='自定义文档属性' link='content_att.php' rank='sys_Att' target='main' /> + <m:item name='软件频道设置' link='soft_config.php' rank='sys_SoftConfig' target='main' /> + <m:item name='防采集串混淆' link='article_string_mix.php' rank='sys_StringMix' target='main' /> + <m:item name='随机模板设置' link='article_template_rand.php' rank='sys_StringMix' target='main' /> + <m:item name='数据库备份还原' link='sys_data.php' rank='sys_Data' target='main' /> + <m:item name='SQL命令行工具' link='sys_sql_query.php' rank='sys_Data' target='main' /> + <m:item name='病毒文件扫描' link='sys_safetest.php' rank='sys_verify' target='main' /> + <m:item name='系统错误修复' link='sys_repair.php' rank='sys_verify' target='main' /> +</m:top> +<m:top mapitem='5' item='10_6_' name='支付工具' display='none' rank='sys_Data'> + <m:item name='点卡产品分类' link='cards_type.php' rank='sys_Data' target='main' /> + <m:item name='点卡产品管理' link='cards_manage.php' rank='sys_Data' target='main' /> + <m:item name='会员产品分类' link='member_type.php' rank='sys_Data' target='main' /> + <m:item name='会员消费记录' link='member_operations.php' rank='sys_Data' target='main' /> + <m:item name='商店订单记录' link='shops_operations.php' rank='sys_Data' target='main' /> + <m:item name='支付接口设置' link='sys_payment.php' .php' rank='sys_Data' target='main' /> + <m:item name='配货方式设置' link='shops_delivery.php' rank='sys_Data' target='main' /> +</m:top> +<m:top mapitem='2' item='10_7_' name='模板管理' display='none' rank='temp_One,temp_Other,temp_MyTag,temp_test,temp_All'> + <m:item name='默认模板管理' link='templets_main.php' rank='temp_All' target='main'/> + <m:item name='标签源码管理' link='templets_tagsource.php' rank='temp_All' target='main'/> + <m:item name='自定义宏标记' link='mytag_main.php' rank='temp_MyTag' target='main'/> + <m:item name='智能标记向导' link='mytag_tag_guide.php' rank='temp_Other' target='main'/> + <m:item name='全局标记测试' link='tag_test.php' rank='temp_Test' target='main'/> +</m:top>"; +//载入插件菜单 +$plusset = ''; +$dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $plusset .= $row->menustring."\r\n"; +} +$menusMain .= " +<m:top mapitem='6' name='模块管理' c='6,' display='block'> + <m:item name='模块管理' link='module_main.php' rank='sys_module' target='main' /> + <m:item name='上传新模块' link='module_upload.php' rank='sys_module' target='main' /> + <m:item name='模块打包' link='module_make.php' rank='sys_module' target='main' /> +</m:top> +<m:top mapitem='6' item='7' name='辅助插件' display='block'> + <m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> + $plusset +</m:top>"; +$mapstring = ''; +$dtp = new DedeTagparse(); +$dtp->SetNameSpace('m', '<', '>'); +$dtp->LoadString($menusMain); +foreach ($maparray as $k => $bigname) { + $mapstring .= "<dl class='maptop'>\r\n"; + $mapstring .= "<dt class='bigitem'>$bigname</dt>\r\n"; + $mapstring .= "<dd>\r\n"; + foreach ($dtp->CTags as $ctag) { + if ($ctag->GetAtt('mapitem') == $k) { + $mapstring .= "<dl class='mapitem'>\r\n"; + $mapstring .= "<dt>".$ctag->GetAtt('name')."</dt>\r\n"; + $mapstring .= "<dd>\r\n<ul class='item'>\r\n"; + $dtp2 = new DedeTagParse(); + $dtp2->SetNameSpace('m', '<', '>'); + $dtp2->LoadSource($ctag->InnerText); + foreach ($dtp2->CTags as $j => $ctag2) { + $mapstring .= "<li><a href='".$ctag2->GetAtt('link')."' target='".$ctag2->GetAtt('target')."'>".$ctag2->GetAtt('name')."</a></li>\r\n"; + } + $mapstring .= "</ul>\r\n</dd>\r\n</dl>\r\n"; + } + } + $mapstring .= "</dd>\r\n</dl>\r\n"; } \ No newline at end of file diff --git a/src/dede/inc/inc_menu_module.php b/src/admin/inc/inc_menu_module.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/inc/inc_menu_module.php rename to src/admin/inc/inc_menu_module.php index 7fdc720c..c8501826 --- a/src/dede/inc/inc_menu_module.php +++ b/src/admin/inc/inc_menu_module.php @@ -1,51 +1,51 @@ -<?php -/** - * 模块菜单 - * - * @version $Id: inc_menu_module.php 1 10:32 2010年7月21日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require_once(dirname(__FILE__)."/../config.php"); -/* -模块菜单一般在不要直接改此文件,直接保存在#@__sys_module表即可,格式为 -<m:top name='问答模块管理' c='6,' display='block' rank=''> -<m:item name='问答栏目管理' link='ask_type.php' rank='' target='main' /> -<m:item name='问答问题管理' link='ask_admin.php' rank='' target='main' /> -<m:item name='问答答案管理' link='ask_answer.php' rank='' target='main' /> -</m:top> -这个菜单可在生成模块时指定 -*/ -//载入模块菜单 -$moduleset = ''; -$dsql->SetQuery("SELECT * FROM `#@__sys_module` ORDER BY id DESC"); -$dsql->Execute('mm'); -while ($row = $dsql->GetObject('mm')) { - $moduleset .= $row->menustring."\r\n"; -} -//载入插件菜单 -$plusset = ''; -$dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $row->menustring = str_replace('plus_友情链接', 'plus_友情链接模块', $row->menustring); - $plusset .= $row->menustring."\r\n"; -} -$adminMenu = ''; -if ($cuserLogin->getUserType() >= 10) { - $adminMenu = "<m:top name='模块管理' c='6,' display='block'> - <m:item name='模块管理' link='module_main.php' rank='sys_module' target='main' /> - <m:item name='上传新模块' link='module_upload.php' rank='sys_module' target='main' /> - <m:item name='模块打包' link='module_make.php' rank='sys_module' target='main' /> - </m:top>"; -} -$menusMoudle = " -$adminMenu -<m:top item='7' name='辅助插件' display='block'> - <m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> - $plusset -</m:top> -$moduleset +<?php +/** + * 模块菜单 + * + * @version $Id: inc_menu_module.php 1 10:32 2010年7月21日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(dirname(__FILE__)."/../config.php"); +/* +模块菜单一般在不要直接改此文件,直接保存在#@__sys_module表即可,格式为 +<m:top name='问答模块管理' c='6,' display='block' rank=''> +<m:item name='问答栏目管理' link='ask_type.php' rank='' target='main' /> +<m:item name='问答问题管理' link='ask_admin.php' rank='' target='main' /> +<m:item name='问答答案管理' link='ask_answer.php' rank='' target='main' /> +</m:top> +这个菜单可在生成模块时指定 +*/ +//载入模块菜单 +$moduleset = ''; +$dsql->SetQuery("SELECT * FROM `#@__sys_module` ORDER BY id DESC"); +$dsql->Execute('mm'); +while ($row = $dsql->GetObject('mm')) { + $moduleset .= $row->menustring."\r\n"; +} +//载入插件菜单 +$plusset = ''; +$dsql->SetQuery("SELECT * FROM `#@__plus` WHERE isshow=1 ORDER BY aid ASC"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $row->menustring = str_replace('plus_友情链接', 'plus_友情链接模块', $row->menustring); + $plusset .= $row->menustring."\r\n"; +} +$adminMenu = ''; +if ($cuserLogin->getUserType() >= 10) { + $adminMenu = "<m:top name='模块管理' c='6,' display='block'> + <m:item name='模块管理' link='module_main.php' rank='sys_module' target='main' /> + <m:item name='上传新模块' link='module_upload.php' rank='sys_module' target='main' /> + <m:item name='模块打包' link='module_make.php' rank='sys_module' target='main' /> + </m:top>"; +} +$menusMoudle = " +$adminMenu +<m:top item='7' name='辅助插件' display='block'> + <m:item name='插件管理器' link='plus_main.php' rank='10' target='main' /> + $plusset +</m:top> +$moduleset "; \ No newline at end of file diff --git a/src/dede/index.php b/src/admin/index.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/index.php rename to src/admin/index.php index 4f50b951..a0609c36 --- a/src/dede/index.php +++ b/src/admin/index.php @@ -1,30 +1,24 @@ -<?php - -/** - * 管理后台首页 - * - * @version $Id: index.php 1 11:06 2010年7月13日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - -if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { - if ($_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME'])) { - header('HTTP/1.1 301 Moved Permanently'); - header('Location:'.$_SERVER['REQUEST_URI'].'/'); - } -} - - -require_once(dirname(__FILE__)."/config.php"); -require_once(DEDEINC.'/dedetag.class.php'); -$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; -$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; - -if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; - -require(DEDEADMIN.'/inc/inc_menu_map.php'); -include(DEDEADMIN.'/templets/index2.htm'); -exit(); +<?php +/** + * 管理后台首页 + * + * @version $Id: index.php 1 11:06 2010年7月13日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { + if ($_SERVER['REQUEST_URI'] == dirname($_SERVER['SCRIPT_NAME'])) { + header('HTTP/1.1 301 Moved Permanently'); + header('Location:'.$_SERVER['REQUEST_URI'].'/'); + } +} +require_once(dirname(__FILE__)."/config.php"); +require_once(DEDEINC.'/dedetag.class.php'); +$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; +$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; +if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; +require(DEDEADMIN.'/inc/inc_menu_map.php'); +include(DEDEADMIN.'/templets/index.htm'); +exit(); \ No newline at end of file diff --git a/src/dede/index_body.php b/src/admin/index_body.php old mode 100755 new mode 100644 similarity index 80% rename from src/dede/index_body.php rename to src/admin/index_body.php index 23e96af4..6592a8f7 --- a/src/dede/index_body.php +++ b/src/admin/index_body.php @@ -1,254 +1,251 @@ -<?php -/** - * 管理后台首页主体 - * - * @version $Id: index_body.php 1 11:06 2010年7月13日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require(dirname(__FILE__).'/config.php'); -require(DEDEINC.'/image.func.php'); -require(DEDEINC.'/dedetag.class.php'); -$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; -$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; -if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; -//默认主页 -if (empty($dopost)) { - require(DEDEINC.'/inc/inc_fun_funAdmin.php'); - $verLockFile = DEDEDATA.'/admin/ver.txt'; - $fp = fopen($verLockFile, 'r'); - $upTime = trim(fread($fp, 64)); - fclose($fp); - $oktime = substr($upTime, 0, 4).'-'.substr($upTime, 4, 2).'-'.substr($upTime, 6, 2); - $offUrl = SpGetNewInfo(); - $dedecmsidc = DEDEDATA.'/admin/idc.txt'; - $fp = fopen($dedecmsidc, 'r'); - $dedeIDC = fread($fp, filesize($dedecmsidc)); - fclose($fp); - include DedeInclude('templets/index_body.htm'); - exit(); -} -/*----------------------- -增加新项 -function _AddNew() { } --------------------------*/ -else if ($dopost == 'addnew') { - if (empty($link) || empty($title)) { - ShowMsg("链接网址或标题不能为空", "-1"); - exit(); - } - $fp = fopen($myIcoFile, 'r'); - $oldct = trim(fread($fp, filesize($myIcoFile))); - fclose($fp); - $link = preg_replace("#['\"]#", '`', $link); - $title = preg_replace("#['\"]#", '`', $title); - $ico = preg_replace("#['\"]#", '`', $ico); - $oldct .= "\r\n<menu:item ico=\"{$ico}\" link=\"{$link}\" title=\"{$title}\">"; - $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; - $fp = fopen($myIcoFileTrue, 'w'); - fwrite($fp, $oldct); - fclose($fp); - ShowMsg("成功增加一个项目", "index_body.php?".time()); - exit(); -} -/*--------------------------- -保存修改的项 -function _EditSave() { } -----------------------------*/ -else if ($dopost == 'editsave') { - $quickmenu = stripslashes($quickmenu); - $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; - $fp = fopen($myIcoFileTrue, 'w'); - fwrite($fp, $quickmenu); - fclose($fp); - ShowMsg("成功修改快捷操作项目", "index_body.php?".time()); - exit(); -} -/*--------------------------- -保存修改的项 -function _EditSave() { } -----------------------------*/ -else if ($dopost == 'movesave') { - $movedata = str_replace('\\', "", $sortorder); - $movedata = json_decode($movedata, TRUE); - $movedata = serialize($movedata); - $myIcoFileTrue = DEDEDATA.'/admin/move-'.$cuserLogin->getUserID().'.txt'; - $fp = fopen($myIcoFileTrue, 'w'); - fwrite($fp, $movedata); - fclose($fp); -} -/*----------------------------- -显示修改表单 -function _EditShow() { } ------------------------------*/ -else if ($dopost == 'editshow') { - $fp = fopen($myIcoFile, 'r'); - $oldct = trim(fread($fp, filesize($myIcoFile))); - fclose($fp); -?> - <form name='editform' action='index_body.php' method='post'> - <input type='hidden' name='dopost' value='editsave'> - <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td height='26' background="images/tbg.gif"> - <div style='float:left'><b>修改快捷操作项</b></div> - <div style='float:right;padding:3px 10px 0 0;'> - <a href="javascript:CloseTab('editTab')"><img src="images/close.gif" width="12" height="12" border="0"></a> - </div> - </td> - </tr> - <tr> - <td style="height:6px;font-size:1px;border-top:1px solid #8DA659"> </td> - </tr> - <tr> - <td>按原格式修改/增加XML项。</td> - </tr> - <tr> - <td align='center'><textarea name="quickmenu" rows="10" cols="50" style="width:94%;height:220px"><?php echo $oldct; ?></textarea></td> - </tr> - <tr> - <td height="46" align="center"> - <input type="submit" name="Submit" value="保存项目" class="np coolbg" style="width:80px;cursor:pointer">  - <input type="reset" name="reset" value="重设" class="np coolbg" style="width:50px;cursor:pointer"> - </td> - </tr> - </table> - </form> -<?php -exit(); -} -/*--------------------------------- -载入右边内容 -function _getRightSide() { } ----------------------------------*/ -else if ($dopost == 'getRightSide') { - $query = " SELECT COUNT(*) AS dd FROM `#@__member` "; - $row1 = $dsql->GetOne($query); - $query = " SELECT COUNT(*) AS dd FROM `#@__feedback` "; - $row2 = $dsql->GetOne($query); - $chArrNames = array(); - $query = "SELECT id, typename FROM `#@__channeltype` "; - $dsql->Execute('c', $query); - while ($row = $dsql->GetArray('c')) { - $chArrNames[$row['id']] = $row['typename']; - } - $query = "SELECT COUNT(channel) AS dd, channel FROM `#@__arctiny` GROUP BY channel "; - $allArc = 0; - $chArr = array(); - $dsql->Execute('a', $query); - while ($row = $dsql->GetArray('a')) { - $allArc += $row['dd']; - $row['typename'] = $chArrNames[$row['channel']]; - $chArr[] = $row; - } -?> - <table width="100%" class="table table-borderless"> - <tr> - <td width='50%' class='nline' style="text-align:left"> 会员数: </td> - <td class='nline' style="text-align:left"> <?php echo $row1['dd']; ?> </td> - </tr> - <tr> - <td class='nline' style="text-align:left"> 文档数: </td> - <td class='nline' style="text-align:left"> <?php echo $allArc; ?> </td> - </tr> - <?php - foreach ($chArr as $row) { - ?> - <tr> - <td class='nline' style="text-align:left"> <?php echo $row['typename']; ?>: </td> - <td class='nline' style="text-align:left"> <?php echo $row['dd']; ?>  </td> - </tr> - <?php - } - ?> - <tr> - <td style="text-align:left"> 评论数: </td> - <td style="text-align:left"> <?php echo $row2['dd']; ?> </td> - </tr> - </table> -<?php -exit(); -} else if ($dopost == 'getRightSideNews') { - $query = "SELECT arc.id, arc.arcrank, arc.title, arc.channel, ch.editcon FROM `#@__archives` arc - LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel - WHERE arc.arcrank<>-2 ORDER BY arc.id DESC LIMIT 0, 6 "; - $arcArr = array(); - $dsql->Execute('m', $query); - while ($row = $dsql->GetArray('m')) { - $arcArr[] = $row; - } - AjaxHead(); -?> - <table width="100%" class="table table-borderless"> - <?php - foreach ($arcArr as $row) { - if (trim($row['editcon']) == '') { - $row['editcon'] = 'archives_edit.php'; - } - $linkstr = "·<a href='{$row['editcon']}?aid={$row['id']}&channelid={$row['channel']}'>{$row['title']}</a>"; - if ($row['arcrank'] == -1) $linkstr .= "<font color='red'>(未审核)</font>"; - ?> - <tr> - <td class='nline'><?php echo $linkstr; ?></td> - </tr> - <?php - } - ?> - </table> -<?php -exit; -} else if ($dopost == 'setskin') { - $cskin = empty($cskin) ? 1 : $cskin; - $skin = !in_array($cskin, array(1, 2, 3, 4)) ? 1 : $cskin; - $skinconfig = DEDEDATA.'/admin/skin.txt'; - PutFile($skinconfig, $skin); -} elseif ($dopost == 'get_seo') { - //直接采用DedeBIZ重写方法 - exit; -} elseif ($dopost == "system_info") { - if (!extension_loaded("openssl")) { - echo json_encode(array( - "code" => -1001, - "msg" => "PHP不支持OpenSSL,无法完成商业版授权", - "result" => null, - )); - exit; - } - if (empty($cfg_auth_code)) { - echo json_encode(array( - "code" => -1002, - "msg" => "当前站点尚未购买商业版授权", - "result" => null, - )); - exit; - } - openssl_public_decrypt(base64_decode($cfg_auth_code), $decotent, DEDEPUB); - $core_info = new stdClass; - if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { - $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); - $client->appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - $core_info = $client->SystemInfo(); - $client->Close(); - } - if (!empty($decotent)) { - $res = json_decode($decotent); - if (isset($res->sid)) { - echo json_encode(array( - "code" => 200, - "msg" => "", - "result" => array( - "domain" => $res->domain, - "title" => $res->title, - "stype" => $res->stype == 1 ? "企业单位" : "个人", - "auth_version" => $res->auth_version, - "auth_at" => date("Y-m-d", $res->auth_at), - "core" => $core_info, - ), - )); - } - } -} +<?php +/** + * 管理后台首页主体 + * + * @version $Id: index_body.php 1 11:06 2010年7月13日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require(dirname(__FILE__).'/config.php'); +require(DEDEINC.'/image.func.php'); +require(DEDEINC.'/dedetag.class.php'); +$defaultIcoFile = DEDEDATA.'/admin/quickmenu.txt'; +$myIcoFile = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; +if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; +//默认主页 +if (empty($dopost)) { + require(DEDEINC.'/inc/inc_fun_funAdmin.php'); + $verLockFile = DEDEDATA.'/admin/ver.txt'; + $fp = fopen($verLockFile, 'r'); + $upTime = trim(fread($fp, 64)); + fclose($fp); + $oktime = substr($upTime, 0, 4).'-'.substr($upTime, 4, 2).'-'.substr($upTime, 6, 2); + $offUrl = SpGetNewInfo(); + $dedecmsidc = DEDEDATA.'/admin/idc.txt'; + $fp = fopen($dedecmsidc, 'r'); + $dedeIDC = fread($fp, filesize($dedecmsidc)); + fclose($fp); + include DedeInclude('templets/index_body.htm'); + exit(); +} +/*----------------------- +增加新项 +function _AddNew() { } +-------------------------*/ +else if ($dopost == 'addnew') { + if (empty($link) || empty($title)) { + ShowMsg("链接网址或标题不能为空", "-1"); + exit(); + } + $fp = fopen($myIcoFile, 'r'); + $oldct = trim(fread($fp, filesize($myIcoFile))); + fclose($fp); + $link = preg_replace("#['\"]#", '`', $link); + $title = preg_replace("#['\"]#", '`', $title); + $ico = preg_replace("#['\"]#", '`', $ico); + $oldct .= "\r\n<menu:item ico=\"{$ico}\" link=\"{$link}\" title=\"{$title}\">"; + $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; + $fp = fopen($myIcoFileTrue, 'w'); + fwrite($fp, $oldct); + fclose($fp); + ShowMsg("成功增加一个项目", "index_body.php?".time()); + exit(); +} +/*--------------------------- +保存修改的项 +function _EditSave() { } +----------------------------*/ +else if ($dopost == 'editsave') { + $quickmenu = stripslashes($quickmenu); + $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; + $fp = fopen($myIcoFileTrue, 'w'); + fwrite($fp, $quickmenu); + fclose($fp); + ShowMsg("成功修改快捷操作项目", "index_body.php?".time()); + exit(); +} +/*--------------------------- +保存修改的项 +function _EditSave() { } +----------------------------*/ +else if ($dopost == 'movesave') { + $movedata = str_replace('\\', "", $sortorder); + $movedata = json_decode($movedata, TRUE); + $movedata = serialize($movedata); + $myIcoFileTrue = DEDEDATA.'/admin/move-'.$cuserLogin->getUserID().'.txt'; + $fp = fopen($myIcoFileTrue, 'w'); + fwrite($fp, $movedata); + fclose($fp); +} +/*----------------------------- +显示修改表单 +function _EditShow() { } +-----------------------------*/ +else if ($dopost == 'editshow') { + $fp = fopen($myIcoFile, 'r'); + $oldct = trim(fread($fp, filesize($myIcoFile))); + fclose($fp); +?> + <form name="editform" action="index_body.php" method="post"> + <input type="hidden" name="dopost" value="editsave"> + <table width="100%" border="0" cellspacing="0" cellpadding="0"> + <tr> + <td height="30" background="images/tbg.gif"> + <div style="float:left;margin-left:10px"><b>修改快捷操作项</b></div> + <div style="float:right;padding:2px 10px 0 0"> + <a href="javascript:CloseTab('editTab')"><img src="images/close.gif"></a> + </div> + </td> + </tr> + <tr> + <td style="height:10px;border-top:1px solid #8DA659"></td> + </tr> + <tr> + <td align="center"><textarea name="quickmenu" rows="10" cols="50"><?php echo $oldct; ?></textarea></td> + </tr> + <tr> + <td height="36" align="center"> + <input type="submit" name="Submit" value="保存项目" class="np coolbg" style="width:80px;cursor:pointer">  + <input type="reset" name="reset" value="重设" class="np coolbg" style="width:50px;cursor:pointer"> + </td> + </tr> + </table> + </form> +<?php +exit(); +} +/*--------------------------------- +载入右边内容 +function _getRightSide() { } +---------------------------------*/ +else if ($dopost == 'getRightSide') { + $query = " SELECT COUNT(*) AS dd FROM `#@__member` "; + $row1 = $dsql->GetOne($query); + $query = " SELECT COUNT(*) AS dd FROM `#@__feedback` "; + $row2 = $dsql->GetOne($query); + $chArrNames = array(); + $query = "SELECT id, typename FROM `#@__channeltype` "; + $dsql->Execute('c', $query); + while ($row = $dsql->GetArray('c')) { + $chArrNames[$row['id']] = $row['typename']; + } + $query = "SELECT COUNT(channel) AS dd, channel FROM `#@__arctiny` GROUP BY channel "; + $allArc = 0; + $chArr = array(); + $dsql->Execute('a', $query); + while ($row = $dsql->GetArray('a')) { + $allArc += $row['dd']; + $row['typename'] = $chArrNames[$row['channel']]; + $chArr[] = $row; + } +?> + <table width="100%" class="table table-borderless"> + <tr> + <td class="nline" style="width:50%;text-align:left">会员数:</td> + <td class="nline" style="text-align:left"><?php echo $row1['dd']; ?></td> + </tr> + <tr> + <td class="nline" style="text-align:left">文档数:</td> + <td class="nline" style="text-align:left"><?php echo $allArc; ?></td> + </tr> + <?php + foreach ($chArr as $row) { + ?> + <tr> + <td class="nline" style="text-align:left"><?php echo $row['typename']; ?>:</td> + <td class="nline" style="text-align:left"><?php echo $row['dd']; ?></td> + </tr> + <?php + } + ?> + <tr> + <td style="text-align:left">评论数:</td> + <td style="text-align:left"><?php echo $row2['dd']; ?></td> + </tr> + </table> +<?php +exit(); +} else if ($dopost == 'getRightSideNews') { + $query = "SELECT arc.id, arc.arcrank, arc.title, arc.channel, ch.editcon FROM `#@__archives` arc + LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel + WHERE arc.arcrank<>-2 ORDER BY arc.id DESC LIMIT 0, 6 "; + $arcArr = array(); + $dsql->Execute('m', $query); + while ($row = $dsql->GetArray('m')) { + $arcArr[] = $row; + } + AjaxHead(); +?> + <table width="100%" class="table table-borderless"> + <?php + foreach ($arcArr as $row) { + if (trim($row['editcon']) == '') { + $row['editcon'] = 'archives_edit.php'; + } + $linkstr = "·<a href='{$row['editcon']}?aid={$row['id']}&channelid={$row['channel']}'>{$row['title']}</a>"; + if ($row['arcrank'] == -1) $linkstr .= "<span style='color:#dc3545'>(未审核)</span>"; + ?> + <tr> + <td class="nline"><?php echo $linkstr; ?></td> + </tr> + <?php + } + ?> + </table> +<?php +exit; +} else if ($dopost == 'setskin') { + $cskin = empty($cskin) ? 1 : $cskin; + $skin = !in_array($cskin, array(1, 2, 3, 4)) ? 1 : $cskin; + $skinconfig = DEDEDATA.'/admin/skin.txt'; + PutFile($skinconfig, $skin); +} elseif ($dopost == 'get_seo') { + //直接采用DedeBIZ重写方法 + exit; +} elseif ($dopost == "system_info") { + if (!extension_loaded("openssl")) { + echo json_encode(array( + "code" => -1001, + "msg" => "PHP不支持OpenSSL,无法完成商业版授权", + "result" => null, + )); + exit; + } + if (empty($cfg_auth_code)) { + echo json_encode(array( + "code" => -1002, + "msg" => "当前站点尚未购买商业版授权", + "result" => null, + )); + exit; + } + openssl_public_decrypt(base64_decode($cfg_auth_code), $decotent, DEDEPUB); + $core_info = new stdClass; + if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { + $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); + $client->appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + $core_info = $client->SystemInfo(); + $client->Close(); + } + if (!empty($decotent)) { + $res = json_decode($decotent); + if (isset($res->sid)) { + echo json_encode(array( + "code" => 200, + "msg" => "", + "result" => array( + "domain" => $res->domain, + "title" => $res->title, + "stype" => $res->stype == 1 ? "企业单位" : "个人", + "auth_version" => $res->auth_version, + "auth_at" => date("Y-m-d", $res->auth_at), + "core" => $core_info, + ), + )); + } + } +} ?> \ No newline at end of file diff --git a/src/dede/index_menu.php b/src/admin/index_menu.php old mode 100755 new mode 100644 similarity index 87% rename from src/dede/index_menu.php rename to src/admin/index_menu.php index 01e839a8..70738f2c --- a/src/dede/index_menu.php +++ b/src/admin/index_menu.php @@ -1,16 +1,15 @@ -<?php - -/** - * 菜单项 - * - * @version $Id: index_menu.php 1 11:06 2010年7月13日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require(dirname(__FILE__).'/config.php'); -require(DEDEADMIN.'/inc/inc_menu.php'); -require(DEDEADMIN.'/inc/inc_menu_func.php'); -$openitem = (empty($openitem) ? 1 : $openitem); -include DedeInclude('templets/index_menu2.htm'); +<?php +/** + * 菜单项 + * + * @version $Id: index_menu.php 1 11:06 2010年7月13日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require(dirname(__FILE__).'/config.php'); +require(DEDEADMIN.'/inc/inc_menu.php'); +require(DEDEADMIN.'/inc/inc_menu_func.php'); +$openitem = (empty($openitem) ? 1 : $openitem); +include DedeInclude('templets/index_menu.htm'); \ No newline at end of file diff --git a/src/dede/index_menu_load.php b/src/admin/index_menu_load.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/index_menu_load.php rename to src/admin/index_menu_load.php index b504de27..7da60368 --- a/src/dede/index_menu_load.php +++ b/src/admin/index_menu_load.php @@ -1,25 +1,24 @@ -<?php - -/** - * 载入菜单 - * - * @version $Id: index_menu_load.php 1 8:48 2010年7月13日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require_once(dirname(__FILE__).'/config.php'); -AjaxHead(); -if ($openitem != 100) { - require(dirname(__FILE__).'/inc/inc_menu.php'); - require(DEDEADMIN.'/inc/inc_menu_func.php'); - GetMenus($cuserLogin->getUserRank(), 'main'); - exit(); -} else { - $openitem = 0; - require(dirname(__FILE__).'/inc/inc_menu_module.php'); - require(DEDEADMIN.'/inc/inc_menu_func.php'); - GetMenus($cuserLogin->getUserRank(), 'module'); - exit(); -} +<?php +/** + * 载入菜单 + * + * @version $Id: index_menu_load.php 1 8:48 2010年7月13日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +require_once(dirname(__FILE__).'/config.php'); +AjaxHead(); +if ($openitem != 100) { + require(dirname(__FILE__).'/inc/inc_menu.php'); + require(DEDEADMIN.'/inc/inc_menu_func.php'); + GetMenus($cuserLogin->getUserRank(), 'main'); + exit(); +} else { + $openitem = 0; + require(dirname(__FILE__).'/inc/inc_menu_module.php'); + require(DEDEADMIN.'/inc/inc_menu_func.php'); + GetMenus($cuserLogin->getUserRank(), 'module'); + exit(); +} \ No newline at end of file diff --git a/src/dede/index_menu_module.php b/src/admin/index_menu_module.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/index_menu_module.php rename to src/admin/index_menu_module.php index 1cd703f4..7bf7d354 --- a/src/dede/index_menu_module.php +++ b/src/admin/index_menu_module.php @@ -1,56 +1,51 @@ -<?php - -/** - * 快捷发布菜单 - * - * @version $Id: index_memnu_module.php 1 23:44 2011/2/16 tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2022, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -require(dirname(__FILE__)."/config.php"); -if ($cuserLogin->adminStyle != 'dedecms') { - header("location:index_menu.php?openitem=100"); - exit(); -} - -require(DEDEADMIN.'/inc/inc_menu_module.php'); -require(DEDEADMIN.'/inc/inc_menu_func.php'); -?> -<html> - -<head> - <title>DedeBIZ menu - - - - - - - - - - - - - -
- getUserRank(), 'module'); - ?> -
- - - - -
- - +adminStyle != 'dedecms') { + header("location:index_menu.php?openitem=100"); + exit(); +} +require(DEDEADMIN.'/inc/inc_menu_module.php'); +require(DEDEADMIN.'/inc/inc_menu_func.php'); +?> + + + DedeBIZ menu + + + + + + + + + + + + +
+ getUserRank(), 'module'); + ?> +
+ + + + +
+ \ No newline at end of file diff --git a/src/dede/index_testenv.php b/src/admin/index_testenv.php old mode 100755 new mode 100644 similarity index 79% rename from src/dede/index_testenv.php rename to src/admin/index_testenv.php index 169e4785..4d6866c8 --- a/src/dede/index_testenv.php +++ b/src/admin/index_testenv.php @@ -1,171 +1,161 @@ -'; - $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; - } -} - -if (!function_exists('TestAdminPWD')) { - //返回结果,-1:没有更改默认管理员名称 -2:没有更改默认管理员用户名和密码 0:没有发现默认账号 - function TestAdminPWD() - { - global $dsql; - // 查询栏目表确定栏目所在的目录 - $sql = "SELECT usertype,userid,pwd FROM #@__admin WHERE `userid`='admin'"; - $row = $dsql->GetOne($sql); - if (is_array($row)) { - if ($row['pwd'] == 'f297a57a5a743894a0e4') { - return -2; - } else { - return -1; - } - } else { - return 0; - } - } -} - -if (!function_exists('IsWritable')) { - // 检测是否可写 - function IsWritable($pathfile) - { - $isDir = substr($pathfile, -1) == '/' ? true : false; - if ($isDir) { - if (is_dir($pathfile)) { - mt_srand((float)microtime() * 1000000); - $pathfile = $pathfile.'dede_'.uniqid(mt_rand()).'.tmp'; - } elseif (@mkdir($pathfile)) { - return IsWritable($pathfile); - } else { - return false; - } - } - @chmod($pathfile, 0777); - $fp = @fopen($pathfile, 'ab'); - if ($fp === false) return false; - fclose($fp); - $isDir && @unlink($pathfile); - return true; - } -} - -// 检测权限 -$safeMsg = array(); - -$dirname = str_replace('index_body.php', '', strtolower($_SERVER['PHP_SELF'])); -if (preg_match("#[\\|/]dede[\\|/]#", $dirname)) { - $safeMsg[] = '默认管理目录为dede,需要立即将它更名;'; -} -if (IsWritable(DEDEDATA.'/common.inc.php')) { - $safeMsg[] = '强烈建议data/common.inc.php文件属性设置为644(Linux/Unix)或只读(NT);'; -} -$rs = TestAdminPWD(); -if ($rs < 0) { - $linkurl = "马上修改"; - switch ($rs) { - case -1: - $msg = "没有更改默认管理员名称admin,建议您修改为其他管理账号{$linkurl}"; - break; - case -2: - $msg = "没有更改默认的管理员名称和密码,强烈建议您进行更改{$linkurl}"; - break; - } - $safeMsg[] = $msg; -} - -?> - 0) { -?> - -'; + $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; + } +} +if (!function_exists('TestAdminPWD')) { + //返回结果,1.没有修改默认管理员名称,2.没有修改默认管理员用户名和密码,3.没有发现默认账号 + function TestAdminPWD() + { + global $dsql; + //查询栏目表确定栏目所在的目录 + $sql = "SELECT usertype,userid,pwd FROM #@__admin WHERE `userid`='admin'"; + $row = $dsql->GetOne($sql); + if (is_array($row)) { + if ($row['pwd'] == 'f297a57a5a743894a0e4') { + return -2; + } else { + return -1; + } + } else { + return 0; + } + } +} +if (!function_exists('IsWritable')) { + //检测是否可写 + function IsWritable($pathfile) + { + $isDir = substr($pathfile, -1) == '/' ? true : false; + if ($isDir) { + if (is_dir($pathfile)) { + mt_srand((float)microtime() * 1000000); + $pathfile = $pathfile.'dede_'.uniqid(mt_rand()).'.tmp'; + } elseif (@mkdir($pathfile)) { + return IsWritable($pathfile); + } else { + return false; + } + } + @chmod($pathfile, 0777); + $fp = @fopen($pathfile, 'ab'); + if ($fp === false) return false; + fclose($fp); + $isDir && @unlink($pathfile); + return true; + } +} +//检测权限 +$safeMsg = array(); +$dirname = str_replace('index_body.php', '', strtolower($_SERVER['PHP_SELF'])); +if (preg_match("#[\\|/]admin[\\|/]#", $dirname)) { + $safeMsg[] = '您的管理目录的名称中包含默认名称admin,建议改名'; +} +if (IsWritable(DEDEDATA.'/common.inc.php')) { + $safeMsg[] = '强烈建议data/common.inc.php文件属性设置为644或只读'; +} +$rs = TestAdminPWD(); +if ($rs < 0) { + $linkurl = "修改"; + switch ($rs) { + case -1: + $msg = "没有修改默认管理员名称admin,建议您修改为其他管理账号 {$linkurl}"; + break; + case -2: + $msg = "没有修改默认的管理员名称和密码,强烈建议您进行修改 {$linkurl}"; + break; + } + $safeMsg[] = $msg; +} +?> + 0) { +?> +
+ $val) { + ?> +
.
+ +
+ \ No newline at end of file diff --git a/src/dede/index_top.php b/src/admin/index_top.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/index_top.php rename to src/admin/index_top.php index 40a134ad..b3c937ad --- a/src/dede/index_top.php +++ b/src/admin/index_top.php @@ -1,17 +1,16 @@ -adminStyle == 'dedecms') { - include DedeInclude('templets/index_top1.htm'); -} else { - include DedeInclude('templets/index_top2.htm'); -} +adminStyle == 'dedecms') { + include DedeInclude('templets/index_top1.htm'); +} else { + include DedeInclude('templets/index_top2.htm'); +} \ No newline at end of file diff --git a/src/dede/js/album.js b/src/admin/js/album.js old mode 100755 new mode 100644 similarity index 92% rename from src/dede/js/album.js rename to src/admin/js/album.js index 43103b9a..f7eb46e2 --- a/src/dede/js/album.js +++ b/src/admin/js/album.js @@ -1,141 +1,141 @@ -/** - * 图集 - * - * @version $Id: album.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - - -function checkSubmitAlb() { - if (document.form1.title.value == '') { - ShowMsg("档案标题不能为空"); - return false; - } - if (document.form1.typeid.value == 0) { - ShowMsg("请选择档案的主类别"); - return false; - } - document.form1.imagebody.value = $Obj('copyhtml').innerHTML; - - if ($("#thumbnails .albCt").length > 0) { - // 这里从thumbnails中取出图片元素信息 - $("#thumbnails .albCt").each(function () { - albums.push({ - "img": $(this).find("img").attr("src"), - "txt": $(this).find("input").val() - }) - }) - } - - $("#albums").val(JSON.stringify(albums)); - - return true; -} - -function testGet() { - LoadTestDiv(); -} - -function checkMuList(psid, cmid) { - if ($Obj('pagestyle3').checked) { - $Obj('cfgmulist').style.display = 'block'; - $Obj('spagelist').style.display = 'none'; - } else if ($Obj('pagestyle1').checked) { - $Obj('cfgmulist').style.display = 'none'; - $Obj('spagelist').style.display = 'block'; - } else { - $Obj('cfgmulist').style.display = 'none'; - $Obj('spagelist').style.display = 'none'; - } -} - -//图集,显示与隐藏zip文件选项 -function showZipField(formitem, zipid, upid) { - if (formitem.checked) { - $Obj(zipid).style.display = 'block'; - $Obj(upid).style.display = 'none'; - //$Obj('handfield').style.display = 'none'; - // $Obj('formhtml').checked = false; - $Obj('copyhtml').innerHTML = ''; - } else { - $Obj(zipid).style.display = 'none'; - //$Obj('handfield').style.display = 'block'; - } -} - -//图集,显示与隐藏Html编辑框 -function showHtmlField(formitem, htmlid, upid) { - if ($Nav() != "IE") { - alert("该方法不适用于非IE浏览器"); - return; - } - if (formitem.checked) { - $Obj(htmlid).style.display = 'block'; - $Obj(upid).style.display = 'none'; - //$Obj('handfield').style.display = 'none'; - $Obj('formzip').checked = false; - } else { - $Obj(htmlid).style.display = 'none'; - //$Obj('handfield').style.display = 'block'; - $Obj('copyhtml').innerHTML = ''; - } -} - -function seePicNewAlb(f, imgdid, frname, hpos, acname) { - var newobj = null; - if (f.value == '') return; - vImg = $Obj(imgdid); - picnameObj = document.getElementById('picname'); - nFrame = $Nav() == 'IE' ? eval('document.frames.' + frname) : $Obj(frname); - nForm = f.form; - //修改form的action等参数 - if (nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmitAlb); - else nForm.removeEventListener("submit", checkSubmitAlb, false); - nForm.action = 'archives_do.php'; - nForm.target = frname; - nForm.dopost.value = 'uploadLitpic'; - nForm.submit(); - - picnameObj.value = ''; - newobj = $Obj('uploadwait'); - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = 'uploadwait'; - newobj.style.position = 'absolute'; - newobj.className = 'uploadwait'; - newobj.style.width = 120; - newobj.style.height = 20; - newobj.style.top = hpos; - newobj.style.left = 100; - document.body.appendChild(newobj); - newobj.innerHTML = '上传中...'; - } - newobj.style.display = 'block'; - //提交后还原form的action等参数 - nForm.action = acname; - nForm.dopost.value = 'save'; - nForm.target = ''; - nForm.litpic.disabled = true; - //nForm.litpic = null; - //if(nForm.attachEvent) nForm.attachEvent("onsubmit", checkSubmit); - //else nForm.addEventListener("submit", checkSubmit, true); -} - -//删除已经上传的图片 -function delAlbPic(pid) { - var tgobj = $Obj('albCtok' + pid); - var myajax = new DedeAjax(tgobj); - myajax.SendGet2('swfupload.php?dopost=del&id=' + pid); - $Obj('thumbnails').removeChild(tgobj); -} - -//删除已经上传的图片(编辑时用) -function delAlbPicOld(picfile, pid) { - var tgobj = $Obj('albold' + pid); - var myajax = new DedeAjax(tgobj); - myajax.SendGet2('swfupload.php?dopost=delold&picfile=' + picfile); - $Obj('thumbnailsEdit').removeChild(tgobj); +/** + * 图集 + * + * @version $Id: album.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + + +function checkSubmitAlb() { + if (document.form1.title.value == '') { + ShowMsg("档案标题不能为空"); + return false; + } + if (document.form1.typeid.value == 0) { + ShowMsg("请选择档案的主类别"); + return false; + } + document.form1.imagebody.value = $Obj('copyhtml').innerHTML; + + if ($("#thumbnails .albCt").length > 0) { + // 这里从thumbnails中取出图片元素信息 + $("#thumbnails .albCt").each(function () { + albums.push({ + "img": $(this).find("img").attr("src"), + "txt": $(this).find("input").val() + }) + }) + } + + $("#albums").val(JSON.stringify(albums)); + + return true; +} + +function testGet() { + LoadTestDiv(); +} + +function checkMuList(psid, cmid) { + if ($Obj('pagestyle3').checked) { + $Obj('cfgmulist').style.display = 'block'; + $Obj('spagelist').style.display = 'none'; + } else if ($Obj('pagestyle1').checked) { + $Obj('cfgmulist').style.display = 'none'; + $Obj('spagelist').style.display = 'block'; + } else { + $Obj('cfgmulist').style.display = 'none'; + $Obj('spagelist').style.display = 'none'; + } +} + +//图集,显示与隐藏zip文件选项 +function showZipField(formitem, zipid, upid) { + if (formitem.checked) { + $Obj(zipid).style.display = 'block'; + $Obj(upid).style.display = 'none'; + //$Obj('handfield').style.display = 'none'; + // $Obj('formhtml').checked = false; + $Obj('copyhtml').innerHTML = ''; + } else { + $Obj(zipid).style.display = 'none'; + //$Obj('handfield').style.display = 'block'; + } +} + +//图集,显示与隐藏Html编辑框 +function showHtmlField(formitem, htmlid, upid) { + if ($Nav() != "IE") { + alert("该方法不适用于非IE浏览器"); + return; + } + if (formitem.checked) { + $Obj(htmlid).style.display = 'block'; + $Obj(upid).style.display = 'none'; + //$Obj('handfield').style.display = 'none'; + $Obj('formzip').checked = false; + } else { + $Obj(htmlid).style.display = 'none'; + //$Obj('handfield').style.display = 'block'; + $Obj('copyhtml').innerHTML = ''; + } +} + +function seePicNewAlb(f, imgdid, frname, hpos, acname) { + var newobj = null; + if (f.value == '') return; + vImg = $Obj(imgdid); + picnameObj = document.getElementById('picname'); + nFrame = $Nav() == 'IE' ? eval('document.frames.' + frname) : $Obj(frname); + nForm = f.form; + //修改form的action等参数 + if (nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmitAlb); + else nForm.removeEventListener("submit", checkSubmitAlb, false); + nForm.action = 'archives_do.php'; + nForm.target = frname; + nForm.dopost.value = 'uploadLitpic'; + nForm.submit(); + + picnameObj.value = ''; + newobj = $Obj('uploadwait'); + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = 'uploadwait'; + newobj.style.position = 'absolute'; + newobj.className = 'uploadwait'; + newobj.style.width = 120; + newobj.style.height = 20; + newobj.style.top = hpos; + newobj.style.left = 100; + document.body.appendChild(newobj); + newobj.innerHTML = '上传中...'; + } + newobj.style.display = 'block'; + //提交后还原form的action等参数 + nForm.action = acname; + nForm.dopost.value = 'save'; + nForm.target = ''; + nForm.litpic.disabled = true; + //nForm.litpic = null; + //if(nForm.attachEvent) nForm.attachEvent("onsubmit", checkSubmit); + //else nForm.addEventListener("submit", checkSubmit, true); +} + +//删除已经上传的图片 +function delAlbPic(pid) { + var tgobj = $Obj('albCtok' + pid); + var myajax = new DedeAjax(tgobj); + myajax.SendGet2('swfupload.php?dopost=del&id=' + pid); + $Obj('thumbnails').removeChild(tgobj); +} + +//删除已经上传的图片(编辑时用) +function delAlbPicOld(picfile, pid) { + var tgobj = $Obj('albold' + pid); + var myajax = new DedeAjax(tgobj); + myajax.SendGet2('swfupload.php?dopost=delold&picfile=' + picfile); + $Obj('thumbnailsEdit').removeChild(tgobj); } \ No newline at end of file diff --git a/src/dede/js/base.js b/src/admin/js/base.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/base.js rename to src/admin/js/base.js index 53689b74..99f1c05e --- a/src/dede/js/base.js +++ b/src/admin/js/base.js @@ -1,159 +1,159 @@ - $(function(){ - //文本框Style - $(".txt").mouseover(function(){ - $(this).addClass("txt_o"); - }).mouseout(function(){ - $(this).removeClass("txt_o"); - }).focus(function(){ - $(this).addClass("txt_s"); - }).blur(function(){ - $(this).removeClass("txt_s"); - }); - - //表格折叠 - $(".tform").find("tbody tr th[_show]").each(function(i){ - //加入折叠提示 - if($(this).attr("_show")=="no"){ - $(this).append(" "); - }else{ - $(this).append(" "); - } - //折叠动作 - $(this).click(function(){ - if($(this).find("button[class^='tbody_']").attr("class")=="tbody_up"){ - $(this).find("button[class^='tbody_']").attr("class","tbody_down"); - $(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).hide(); - }else if($(this).find("button[class^='tbody_']").attr("class")=="tbody_down"){ - $(this).find("button[class^='tbody_']").attr("class","tbody_up"); - $(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).show(); - } - }).mouseover(function(){ - $(this).addClass("mouseon"); - }).mouseout(function(){ - $(this).removeClass("mouseon"); - }).click(); - }); - - //列表行高亮 - $("table[_dlist*='light']").children("tbody").children("tr").mouseover(function(){ - if($(this).attr("_nolight")!="yes")$(this).addClass("t_on"); - }).mouseout(function(){ - $(this).removeClass("t_on"); - }); - - //列表行整行选择 - $("table[_dlist*='check']").each(function(){ - //处理行点击 - $(this).find("tbody tr").click(function(){ - checkbox = $(this).find("td input[type='checkbox']"); - tr = $(this); - - if(checkbox.attr("checked")===false){ - checkbox.attr("checked","checked"); - tr.addClass("t_sl"); - }else{ - checkbox.removeAttr("checked"); - tr.removeClass("t_sl"); - } - - }); - - //处理checkbox点击 - $(this).find("td input[type='checkbox']").click(function(){ - tr = $(this).parent("td").parent("tr"); - if($(this).attr("checked")===false){ - $(this).attr("checked","checked"); - tr.removeClass("t_sl"); - }else{ - $(this).removeAttr("checked"); - tr.addClass("t_sl"); - } - }); - - //排除链接及按钮点击 - $(this).find("tbody tr td a,tbody tr td button,tbody tr td table").click(function(){ - tr = $(this).parent("td").parent("tr"); - checkbox = tr.find("td input[type='checkbox']"); - if(checkbox.attr("checked")===false){ - checkbox.attr("checked","checked"); - tr.removeClass("t_sl"); - }else{ - checkbox.removeAttr("checked"); - tr.addClass("t_sl"); - } - }); - - }); - - - - //高亮初始化 - setChecklight(); - - //全选按钮 - $("button[_click='allSelect']").click(function(){ - ckbox = $(this).parent("td").parent("tr").parent("tbody").find("td input[type='checkbox']"); - ckbox.attr("checked","checked"); - setChecklight(); - }); - - //反选按钮 - $("button[_click='unSelect']").click(function(){ - ckbox = $(this).parent("td").parent("tr").parent("tbody").find("td input[type='checkbox']"); - ckbox.each(function(){ - $(this).attr("checked") === false ? $(this).attr("checked","checked") : $(this).removeAttr("checked"); - }); - - setChecklight(); - }); - - //自定义提交 - $("button[_submit]").click(function(){ - url = $(this).attr("_submit"); - if(/\[new\].*/.test(url)){ - url = url.replace(/\[new\]/,""); - }else{ - url = $(this).parents("form").attr("action")+url; - } - $(this).parents("form").attr("action",url).submit(); - }); - - - }); - - /*高亮初始化*/ - function setChecklight(){ - $(".tlist[_dlist*='check']").find("tbody tr td input[type='checkbox']").each(function(i){ - tr = $(this).parent("td").parent("tr"); - if($(this).attr("checked")){ - tr.addClass("t_sl"); - }else{ - tr.removeClass("t_sl"); - } - }); - } - - /*栏目跳转*/ - function AC(mid){ - f = $(window.parent.document); - mlink = f.find("a[id='"+mid+"']"); - if(mlink.size()>0){ - box = mlink.parents("div[id^='menu_']"); - boxid = box.attr("id").substring(5,128); - if($("body").attr("class")!="showmenu")$("#togglemenu").click(); - if(mlink.attr("_url")){ - $("#menu").find("div[id^=menu]").hide(); - box.show(); - mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass"); - if($("#mod_"+boxid).attr("class")==""){ - $("#nav").find("a").removeClass("thisclass"); - $("#nav").find("a[id='mod_"+boxid+"']").addClass("thisclass").blur(); - } - window.location.href = mlink.attr("_url"); - }else if(mlink.attr("_open") && mlink.attr("_open")!=undefined){ - window.open(mlink.attr("_open")); - } - } - - } - + $(function(){ + //文本框Style + $(".txt").mouseover(function(){ + $(this).addClass("txt_o"); + }).mouseout(function(){ + $(this).removeClass("txt_o"); + }).focus(function(){ + $(this).addClass("txt_s"); + }).blur(function(){ + $(this).removeClass("txt_s"); + }); + + //表格折叠 + $(".tform").find("tbody tr th[_show]").each(function(i){ + //加入折叠提示 + if($(this).attr("_show")=="no"){ + $(this).append(" "); + }else{ + $(this).append(" "); + } + //折叠动作 + $(this).click(function(){ + if($(this).find("button[class^='tbody_']").attr("class")=="tbody_up"){ + $(this).find("button[class^='tbody_']").attr("class","tbody_down"); + $(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).hide(); + }else if($(this).find("button[class^='tbody_']").attr("class")=="tbody_down"){ + $(this).find("button[class^='tbody_']").attr("class","tbody_up"); + $(this).parent("tr").parent("tbody").find("tr").not($(this).parent("tr")).show(); + } + }).mouseover(function(){ + $(this).addClass("mouseon"); + }).mouseout(function(){ + $(this).removeClass("mouseon"); + }).click(); + }); + + //列表行高亮 + $("table[_dlist*='light']").children("tbody").children("tr").mouseover(function(){ + if($(this).attr("_nolight")!="yes")$(this).addClass("t_on"); + }).mouseout(function(){ + $(this).removeClass("t_on"); + }); + + //列表行整行选择 + $("table[_dlist*='check']").each(function(){ + //处理行点击 + $(this).find("tbody tr").click(function(){ + checkbox = $(this).find("td input[type='checkbox']"); + tr = $(this); + + if(checkbox.attr("checked")===false){ + checkbox.attr("checked","checked"); + tr.addClass("t_sl"); + }else{ + checkbox.removeAttr("checked"); + tr.removeClass("t_sl"); + } + + }); + + //处理checkbox点击 + $(this).find("td input[type='checkbox']").click(function(){ + tr = $(this).parent("td").parent("tr"); + if($(this).attr("checked")===false){ + $(this).attr("checked","checked"); + tr.removeClass("t_sl"); + }else{ + $(this).removeAttr("checked"); + tr.addClass("t_sl"); + } + }); + + //排除链接及按钮点击 + $(this).find("tbody tr td a,tbody tr td button,tbody tr td table").click(function(){ + tr = $(this).parent("td").parent("tr"); + checkbox = tr.find("td input[type='checkbox']"); + if(checkbox.attr("checked")===false){ + checkbox.attr("checked","checked"); + tr.removeClass("t_sl"); + }else{ + checkbox.removeAttr("checked"); + tr.addClass("t_sl"); + } + }); + + }); + + + + //高亮初始化 + setChecklight(); + + //全选按钮 + $("button[_click='allSelect']").click(function(){ + ckbox = $(this).parent("td").parent("tr").parent("tbody").find("td input[type='checkbox']"); + ckbox.attr("checked","checked"); + setChecklight(); + }); + + //反选按钮 + $("button[_click='unSelect']").click(function(){ + ckbox = $(this).parent("td").parent("tr").parent("tbody").find("td input[type='checkbox']"); + ckbox.each(function(){ + $(this).attr("checked") === false ? $(this).attr("checked","checked") : $(this).removeAttr("checked"); + }); + + setChecklight(); + }); + + //自定义提交 + $("button[_submit]").click(function(){ + url = $(this).attr("_submit"); + if(/\[new\].*/.test(url)){ + url = url.replace(/\[new\]/,""); + }else{ + url = $(this).parents("form").attr("action")+url; + } + $(this).parents("form").attr("action",url).submit(); + }); + + + }); + + /*高亮初始化*/ + function setChecklight(){ + $(".tlist[_dlist*='check']").find("tbody tr td input[type='checkbox']").each(function(i){ + tr = $(this).parent("td").parent("tr"); + if($(this).attr("checked")){ + tr.addClass("t_sl"); + }else{ + tr.removeClass("t_sl"); + } + }); + } + + /*栏目跳转*/ + function AC(mid){ + f = $(window.parent.document); + mlink = f.find("a[id='"+mid+"']"); + if(mlink.size()>0){ + box = mlink.parents("div[id^='menu_']"); + boxid = box.attr("id").substring(5,128); + if($("body").attr("class")!="showmenu")$("#togglemenu").click(); + if(mlink.attr("_url")){ + $("#menu").find("div[id^=menu]").hide(); + box.show(); + mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass"); + if($("#mod_"+boxid).attr("class")==""){ + $("#nav").find("a").removeClass("thisclass"); + $("#nav").find("a[id='mod_"+boxid+"']").addClass("thisclass").blur(); + } + window.location.href = mlink.attr("_url"); + }else if(mlink.attr("_open") && mlink.attr("_open")!=undefined){ + window.open(mlink.attr("_open")); + } + } + + } + diff --git a/src/dede/js/blank.js b/src/admin/js/blank.js old mode 100755 new mode 100644 similarity index 93% rename from src/dede/js/blank.js rename to src/admin/js/blank.js index 5b7ed62f..3c5b3d1e --- a/src/dede/js/blank.js +++ b/src/admin/js/blank.js @@ -1,3 +1,3 @@ -function CheckSubmit(){ - return true; -} +function CheckSubmit(){ + return true; +} diff --git a/src/dede/js/boxy.js b/src/admin/js/boxy.js old mode 100755 new mode 100644 similarity index 100% rename from src/dede/js/boxy.js rename to src/admin/js/boxy.js diff --git a/src/dede/js/co.js b/src/admin/js/co.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/co.js rename to src/admin/js/co.js index 99c596a6..1376c6a9 --- a/src/dede/js/co.js +++ b/src/admin/js/co.js @@ -1,154 +1,154 @@ -/** - * - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - - -function nav() { - if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; - else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; - else return "OT"; -} - -function myObj(oid) { - return document.getElementById(oid); -} - -function showHide(objname) { - var obj = myObj(objname); - if (obj.style.display == null || obj.style.display == 'none') { - if (nav() == 'IE') obj.style.display = "block"; - else obj.style.display = "table-row"; - } else { - obj.style.display = "none"; - } -} - -function showTestWin(surl) { - window.open(surl, "testWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=450,left=100, top=100"); -} - -function showItem(objname) { - var obj = myObj(objname); - if (nav() == 'IE') obj.style.display = "block"; - else obj.style.display = "table"; -} - -function showItemM(objname) { - var obj = myObj(objname); - if (nav() == 'IE') obj.style.display = "block"; - else obj.style.display = "table"; -} - -function showItem1() { - showItem('needset'); - showItem('head1'); - myObj('adset').style.display = "none"; - myObj('head2').style.display = "none"; -} -function showItem2() { - showItemM('adset'); - showItemM('head2'); - myObj('needset').style.display = "none"; - myObj('head1').style.display = "none"; -} - -function testMore() { - if (myObj('usemore').checked) { - if (nav() == 'IE') myObj('usemoretr').style.display = 'block'; - else myObj('usemoretr').style.display = 'table-row'; - myObj('handset').style.display = 'none'; - } else { - myObj('usemoretr').style.display = 'none'; - if (nav() == 'IE') myObj('handset').style.display = 'block'; - else myObj('handset').style.display = 'table-row'; - } -} - -function selSourceSet() { - if (myObj('source3').checked) { - if (nav() == 'IE') myObj('rssset').style.display = 'block'; - else myObj('rssset').style.display = 'table-row'; - myObj('batchset').style.display = 'none'; - myObj('handset').style.display = 'none'; - myObj('arturl').style.display = 'none'; - } else if (myObj('source2').checked) { - myObj('rssset').style.display = 'none'; - myObj('batchset').style.display = 'none'; - if (nav() == 'IE') myObj('handset').style.display = 'block'; - else myObj('handset').style.display = 'table-row'; - if (nav() == 'IE') myObj('arturl').style.display = 'block'; - else myObj('arturl').style.display = 'table-row'; - } else { - myObj('rssset').style.display = 'none'; - if (nav() == 'IE') myObj('batchset').style.display = 'block'; - else myObj('batchset').style.display = 'table-row'; - if (nav() == 'IE') myObj('handset').style.display = 'block'; - else myObj('handset').style.display = 'table-row'; - if (nav() == 'IE') myObj('arturl').style.display = 'block'; - else myObj('arturl').style.display = 'table-row'; - } - testMore(); -} - -function selListenSet() { - if (myObj('islisten1').checked) { - myObj('listentr').style.display = 'none'; - } else { - if (nav() == 'IE') myObj('listentr').style.display = 'block'; - else myObj('listentr').style.display = 'table-row'; - } -} - -function selUrlRuleSet() { - if (myObj('urlrule2').checked) { - myObj('arearuletr').style.display = 'none'; - if (nav() == 'IE') myObj('regxruletr').style.display = 'block'; - else myObj('regxruletr').style.display = 'table-row'; - } - else { - if (nav() == 'IE') myObj('arearuletr').style.display = 'block'; - else myObj('arearuletr').style.display = 'table-row'; - myObj('regxruletr').style.display = 'none'; - } -} - -function testRss() { - var surl = ''; - surl = escape(myObj('rssurl').value); - showTestWin("co_do.php?dopost=testrss&rssurl=" + surl); -} - -function testRegx() { - var surl = escape(myObj('regxurl').value); - var sstart = myObj('startid').value; - var send = myObj('endid').value; - var saddv = myObj('addv').value; - showTestWin("co_do.php?dopost=testregx®xurl=" + surl + "&startid=" + sstart + "&endid=" + send + "&addv=" + saddv); -} - -function toHex(n) { - var digitArray = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); - var result = '' - var start = true; - - for (var i = 32; i > 0;) { - i -= 4; - var digit = (n >> i) & 0xf; - if (!start || digit != 0) { - start = false; - result += digitArray[digit]; - } - } - return (result == '' ? '0' : result); -} - -function selTrim(selfield) { - var tagobj = myObj(selfield); - if (nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - window.open("templets/co_trimrule.html?" + selfield, "coRule", "scrollbars=no,resizable=yes,statebar=no,width=320,height=180,left=" + posLeft + ", top=" + posTop); +/** + * + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + + +function nav() { + if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; + else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; + else return "OT"; +} + +function myObj(oid) { + return document.getElementById(oid); +} + +function showHide(objname) { + var obj = myObj(objname); + if (obj.style.display == null || obj.style.display == 'none') { + if (nav() == 'IE') obj.style.display = "block"; + else obj.style.display = "table-row"; + } else { + obj.style.display = "none"; + } +} + +function showTestWin(surl) { + window.open(surl, "testWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=450,left=100, top=100"); +} + +function showItem(objname) { + var obj = myObj(objname); + if (nav() == 'IE') obj.style.display = "block"; + else obj.style.display = "table"; +} + +function showItemM(objname) { + var obj = myObj(objname); + if (nav() == 'IE') obj.style.display = "block"; + else obj.style.display = "table"; +} + +function showItem1() { + showItem('needset'); + showItem('head1'); + myObj('adset').style.display = "none"; + myObj('head2').style.display = "none"; +} +function showItem2() { + showItemM('adset'); + showItemM('head2'); + myObj('needset').style.display = "none"; + myObj('head1').style.display = "none"; +} + +function testMore() { + if (myObj('usemore').checked) { + if (nav() == 'IE') myObj('usemoretr').style.display = 'block'; + else myObj('usemoretr').style.display = 'table-row'; + myObj('handset').style.display = 'none'; + } else { + myObj('usemoretr').style.display = 'none'; + if (nav() == 'IE') myObj('handset').style.display = 'block'; + else myObj('handset').style.display = 'table-row'; + } +} + +function selSourceSet() { + if (myObj('source3').checked) { + if (nav() == 'IE') myObj('rssset').style.display = 'block'; + else myObj('rssset').style.display = 'table-row'; + myObj('batchset').style.display = 'none'; + myObj('handset').style.display = 'none'; + myObj('arturl').style.display = 'none'; + } else if (myObj('source2').checked) { + myObj('rssset').style.display = 'none'; + myObj('batchset').style.display = 'none'; + if (nav() == 'IE') myObj('handset').style.display = 'block'; + else myObj('handset').style.display = 'table-row'; + if (nav() == 'IE') myObj('arturl').style.display = 'block'; + else myObj('arturl').style.display = 'table-row'; + } else { + myObj('rssset').style.display = 'none'; + if (nav() == 'IE') myObj('batchset').style.display = 'block'; + else myObj('batchset').style.display = 'table-row'; + if (nav() == 'IE') myObj('handset').style.display = 'block'; + else myObj('handset').style.display = 'table-row'; + if (nav() == 'IE') myObj('arturl').style.display = 'block'; + else myObj('arturl').style.display = 'table-row'; + } + testMore(); +} + +function selListenSet() { + if (myObj('islisten1').checked) { + myObj('listentr').style.display = 'none'; + } else { + if (nav() == 'IE') myObj('listentr').style.display = 'block'; + else myObj('listentr').style.display = 'table-row'; + } +} + +function selUrlRuleSet() { + if (myObj('urlrule2').checked) { + myObj('arearuletr').style.display = 'none'; + if (nav() == 'IE') myObj('regxruletr').style.display = 'block'; + else myObj('regxruletr').style.display = 'table-row'; + } + else { + if (nav() == 'IE') myObj('arearuletr').style.display = 'block'; + else myObj('arearuletr').style.display = 'table-row'; + myObj('regxruletr').style.display = 'none'; + } +} + +function testRss() { + var surl = ''; + surl = escape(myObj('rssurl').value); + showTestWin("co_do.php?dopost=testrss&rssurl=" + surl); +} + +function testRegx() { + var surl = escape(myObj('regxurl').value); + var sstart = myObj('startid').value; + var send = myObj('endid').value; + var saddv = myObj('addv').value; + showTestWin("co_do.php?dopost=testregx®xurl=" + surl + "&startid=" + sstart + "&endid=" + send + "&addv=" + saddv); +} + +function toHex(n) { + var digitArray = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); + var result = '' + var start = true; + + for (var i = 32; i > 0;) { + i -= 4; + var digit = (n >> i) & 0xf; + if (!start || digit != 0) { + start = false; + result += digitArray[digit]; + } + } + return (result == '' ? '0' : result); +} + +function selTrim(selfield) { + var tagobj = myObj(selfield); + if (nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + window.open("templets/co_trimrule.html?" + selfield, "coRule", "scrollbars=no,resizable=yes,statebar=no,width=320,height=180,left=" + posLeft + ", top=" + posTop); } \ No newline at end of file diff --git a/src/dede/js/codemirror.js b/src/admin/js/codemirror.js old mode 100755 new mode 100644 similarity index 100% rename from src/dede/js/codemirror.js rename to src/admin/js/codemirror.js diff --git a/src/dede/js/context_menu.js b/src/admin/js/context_menu.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/context_menu.js rename to src/admin/js/context_menu.js index 4d05c5c6..d8d9fe5a --- a/src/dede/js/context_menu.js +++ b/src/admin/js/context_menu.js @@ -1,169 +1,169 @@ -/** - * - * @version $Id: context_menu.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - -var MenuWidth = 120; -var ItemHeight = 16; -var ItemNumber = 0; - -function curNav() { - if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; - else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; - else return 'OT'; -} - -function insertHtm(op, code, isStart) { - if (curNav() == 'IE') { - op.insertAdjacentHTML(isStart ? "beforeEnd" : "afterEnd", code); - } else { - var range = op.ownerDocument.createRange(); - range.setStartBefore(op); - var fragment = range.createContextualFragment(code); - if (isStart) op.insertBefore(fragment, op.firstChild); - else op.appendChild(fragment); - } -} - -ContextMenu.WebFX_PopUp = null; -ContextMenu.WbFX_PopUpcss = null; - -ContextMenu.intializeContextMenu = function () { - insertHtm(document.body, '', true); - - if (curNav() == 'IE') WebFX_PopUp = document.frames['WebFX_PopUp']; - else WebFX_PopUp = document.getElementById('WebFX_PopUp'); - - WebFX_PopUpcss = document.getElementById('WebFX_PopUp'); - - WebFX_PopUpcss.onfocus = function () { WebFX_PopUpcss.style.display = "inline" }; - WebFX_PopUpcss.onblur = function () { WebFX_PopUpcss.style.display = "none" }; - - if (curNav() == 'IE') document.body.attachEvent("onmousedown", function () { WebFX_PopUpcss.style.display = "none" }); - else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); - - if (curNav() == 'IE') document.attachEvent("onblur", function () { WebFX_PopUpcss.style.display = "none" }); - else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); - -} - - -function ContextSeperator() { } - -function ContextMenu() { } - -ContextMenu.showPopup = function (x, y) { - WebFX_PopUpcss.style.display = "block" -} - -ContextMenu.display = function (evt, popupoptions) { - var eobj, x, y; - - eobj = evt ? evt : (window.event ? window.event : null); - - if (curNav() == 'IE') { - x = eobj.x; y = eobj.y - } else { - x = eobj.pageX; y = eobj.pageY; - } - - ContextMenu.populatePopup(popupoptions, window) - ContextMenu.showPopup(x, y); - ContextMenu.fixSize(); - ContextMenu.fixPos(x, y); - eobj.cancelBubble = true; - eobj.returnValue = false; -} - -//TODO -ContextMenu.getScrollTop = function () { - return document.body.scrollTop; - //window.pageXOffset and window.pageYOffset for moz -} - -ContextMenu.getScrollLeft = function () { - return document.body.scrollLeft; -} - - -ContextMenu.fixPos = function (x, y) { - /*var docheight,docwidth,dh,dw; - if(!x) { x=0; y=0; } - docheight = document.body.clientHeight; - docwidth = document.body.clientWidth; - dh = (WebFX_PopUpcss.offsetHeight+y) - docheight; - dw = (WebFX_PopUpcss.offsetWidth+x) - docwidth; - if(dw>0){ - WebFX_PopUpcss.style.left = (x - dw) + ContextMenu.getScrollLeft() + "px"; - }else { - WebFX_PopUpcss.style.left = x + ContextMenu.getScrollLeft(); - } if(dh>0) { - WebFX_PopUpcss.style.top = (y - dh) + ContextMenu.getScrollTop() + "px" - }else{ - WebFX_PopUpcss.style.top = y + ContextMenu.getScrollTop(); }*/ - WebFX_PopUpcss.style.top = y + "px"; - WebFX_PopUpcss.style.left = x + "px"; -} - -ContextMenu.fixSize = function () { - WebFX_PopUpcss.style.height = (ItemHeight * ItemNember + 20) + "px"; - WebFX_PopUpcss.style.width = MenuWidth + "px"; - ItemNember = 0; -} - -ContextMenu.populatePopup = function (arr, win) { - var alen, i, tmpobj, doc, height, htmstr; - alen = arr.length; - ItemNember = alen; - - if (curNav() == 'IE') doc = WebFX_PopUp.document; - else doc = WebFX_PopUp.contentWindow.document; - - doc.body.innerHTML = ''; - //if (doc.getElementsByTagName("LINK").length == 0){ - doc.open(); - doc.write(''); - doc.close(); - //} - for (i = 0; i < alen; i++) { - if (arr[i].constructor == ContextItem) { - tmpobj = doc.createElement("DIV"); - tmpobj.noWrap = true; - tmpobj.className = "WebFX-ContextMenu-Item"; - if (arr[i].disabled) { - htmstr = '' - htmstr += arr[i].text + '' - tmpobj.innerHTML = htmstr - tmpobj.className = "WebFX-ContextMenu-Disabled"; - tmpobj.onmouseover = function () { this.className = "WebFX-ContextMenu-Disabled-Over" } - tmpobj.onmouseout = function () { this.className = "WebFX-ContextMenu-Disabled" } - } else { - tmpobj.innerHTML = arr[i].text; - tmpobj.onclick = (function (f) { - return function () { - win.WebFX_PopUpcss.style.display = 'none' - if (typeof (f) == "function") { f(); } - }; - })(arr[i].action); - - tmpobj.onmouseover = function () { this.className = "WebFX-ContextMenu-Over" } - tmpobj.onmouseout = function () { this.className = "WebFX-ContextMenu-Item" } - } - doc.body.appendChild(tmpobj); - } else { - doc.body.appendChild(doc.createElement("DIV")).className = "WebFX-ContextMenu-Separator"; - } - } - doc.body.className = "WebFX-ContextMenu-Body"; - doc.body.onselectstart = function () { return false; } -} - -function ContextItem(str, fnc, disabled) { - this.text = str; - this.action = fnc; - this.disabled = disabled || false; +/** + * + * @version $Id: context_menu.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + +var MenuWidth = 120; +var ItemHeight = 16; +var ItemNumber = 0; + +function curNav() { + if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; + else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; + else return 'OT'; +} + +function insertHtm(op, code, isStart) { + if (curNav() == 'IE') { + op.insertAdjacentHTML(isStart ? "beforeEnd" : "afterEnd", code); + } else { + var range = op.ownerDocument.createRange(); + range.setStartBefore(op); + var fragment = range.createContextualFragment(code); + if (isStart) op.insertBefore(fragment, op.firstChild); + else op.appendChild(fragment); + } +} + +ContextMenu.WebFX_PopUp = null; +ContextMenu.WbFX_PopUpcss = null; + +ContextMenu.intializeContextMenu = function () { + insertHtm(document.body, '', true); + + if (curNav() == 'IE') WebFX_PopUp = document.frames['WebFX_PopUp']; + else WebFX_PopUp = document.getElementById('WebFX_PopUp'); + + WebFX_PopUpcss = document.getElementById('WebFX_PopUp'); + + WebFX_PopUpcss.onfocus = function () { WebFX_PopUpcss.style.display = "inline" }; + WebFX_PopUpcss.onblur = function () { WebFX_PopUpcss.style.display = "none" }; + + if (curNav() == 'IE') document.body.attachEvent("onmousedown", function () { WebFX_PopUpcss.style.display = "none" }); + else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); + + if (curNav() == 'IE') document.attachEvent("onblur", function () { WebFX_PopUpcss.style.display = "none" }); + else document.addEventListener("onblur", function () { WebFX_PopUpcss.style.display = "none" }, false); + +} + + +function ContextSeperator() { } + +function ContextMenu() { } + +ContextMenu.showPopup = function (x, y) { + WebFX_PopUpcss.style.display = "block" +} + +ContextMenu.display = function (evt, popupoptions) { + var eobj, x, y; + + eobj = evt ? evt : (window.event ? window.event : null); + + if (curNav() == 'IE') { + x = eobj.x; y = eobj.y + } else { + x = eobj.pageX; y = eobj.pageY; + } + + ContextMenu.populatePopup(popupoptions, window) + ContextMenu.showPopup(x, y); + ContextMenu.fixSize(); + ContextMenu.fixPos(x, y); + eobj.cancelBubble = true; + eobj.returnValue = false; +} + +//TODO +ContextMenu.getScrollTop = function () { + return document.body.scrollTop; + //window.pageXOffset and window.pageYOffset for moz +} + +ContextMenu.getScrollLeft = function () { + return document.body.scrollLeft; +} + + +ContextMenu.fixPos = function (x, y) { + /*var docheight,docwidth,dh,dw; + if(!x) { x=0; y=0; } + docheight = document.body.clientHeight; + docwidth = document.body.clientWidth; + dh = (WebFX_PopUpcss.offsetHeight+y) - docheight; + dw = (WebFX_PopUpcss.offsetWidth+x) - docwidth; + if(dw>0){ + WebFX_PopUpcss.style.left = (x - dw) + ContextMenu.getScrollLeft() + "px"; + }else { + WebFX_PopUpcss.style.left = x + ContextMenu.getScrollLeft(); + } if(dh>0) { + WebFX_PopUpcss.style.top = (y - dh) + ContextMenu.getScrollTop() + "px" + }else{ + WebFX_PopUpcss.style.top = y + ContextMenu.getScrollTop(); }*/ + WebFX_PopUpcss.style.top = y + "px"; + WebFX_PopUpcss.style.left = x + "px"; +} + +ContextMenu.fixSize = function () { + WebFX_PopUpcss.style.height = (ItemHeight * ItemNember + 20) + "px"; + WebFX_PopUpcss.style.width = MenuWidth + "px"; + ItemNember = 0; +} + +ContextMenu.populatePopup = function (arr, win) { + var alen, i, tmpobj, doc, height, htmstr; + alen = arr.length; + ItemNember = alen; + + if (curNav() == 'IE') doc = WebFX_PopUp.document; + else doc = WebFX_PopUp.contentWindow.document; + + doc.body.innerHTML = ''; + //if (doc.getElementsByTagName("LINK").length == 0){ + doc.open(); + doc.write(''); + doc.close(); + //} + for (i = 0; i < alen; i++) { + if (arr[i].constructor == ContextItem) { + tmpobj = doc.createElement("DIV"); + tmpobj.noWrap = true; + tmpobj.className = "WebFX-ContextMenu-Item"; + if (arr[i].disabled) { + htmstr = '' + htmstr += arr[i].text + '' + tmpobj.innerHTML = htmstr + tmpobj.className = "WebFX-ContextMenu-Disabled"; + tmpobj.onmouseover = function () { this.className = "WebFX-ContextMenu-Disabled-Over" } + tmpobj.onmouseout = function () { this.className = "WebFX-ContextMenu-Disabled" } + } else { + tmpobj.innerHTML = arr[i].text; + tmpobj.onclick = (function (f) { + return function () { + win.WebFX_PopUpcss.style.display = 'none' + if (typeof (f) == "function") { f(); } + }; + })(arr[i].action); + + tmpobj.onmouseover = function () { this.className = "WebFX-ContextMenu-Over" } + tmpobj.onmouseout = function () { this.className = "WebFX-ContextMenu-Item" } + } + doc.body.appendChild(tmpobj); + } else { + doc.body.appendChild(doc.createElement("DIV")).className = "WebFX-ContextMenu-Separator"; + } + } + doc.body.className = "WebFX-ContextMenu-Body"; + doc.body.onselectstart = function () { return false; } +} + +function ContextItem(str, fnc, disabled) { + this.text = str; + this.action = fnc; + this.disabled = disabled || false; } \ No newline at end of file diff --git a/src/dede/js/contextmenu.css b/src/admin/js/contextmenu.css old mode 100755 new mode 100644 similarity index 93% rename from src/dede/js/contextmenu.css rename to src/admin/js/contextmenu.css index 32e6f115..2a9aca62 --- a/src/dede/js/contextmenu.css +++ b/src/admin/js/contextmenu.css @@ -1,86 +1,86 @@ - a { - font-size: 12px; - } - - .WebFX-ContextMenu { - border: 0; - /*2px outset;*/ - width: 10px; - } - - .WebFX-ContextMenu-Body { - background-color: #EEFFEC; - background-image: url('../images/mmenubg.gif'); - margin: 0px; - padding: 1px; - border: 1px solid #E0E7C9; - } - - .WebFX-ContextMenu-Separator { - font-size: 0pt; - border: 1px dotted #E0E7C9; - height: 1px; - overflow: hidden; - margin: 3px 1px 3px 1px; - } - - .WebFX-ContextMenu-Item { - cursor: default; - font: menu; - font-size: 13px; - color: black !important; - width: 100%; - padding: 2px 20px 2px 16px; - - } - - .WebFX-ContextMenu-Over { - cursor: default; - background-color: highlight; - font: menu; - font-size: 13px; - width: 100%; - padding: 2px 20px 2px 16px; - color: highlighttext; - } - - .WebFX-ContextMenu-Disabled { - cursor: default; - font: menu; - width: 100%; - padding: 2px 20px 2px 16px; - color: graytext; - } - - .WebFX-ContextMenu-Disabled-Over { - cursor: default; - background-color: highlight; - font: menu; - width: 100%; - padding: 2px 20px 2px 16px; - color: graytext; - } - - .WebFX-ContextMenu-Disabled-Over .WebFX-ContextMenu-DisabledContainer { - display: block; - width: 100%; - vertical-align: center; - } - - /*very nice hack by erik below */ - .WebFX-ContextMenu-Disabled .WebFX-ContextMenu-DisabledContainer { - display: block; - background: GrayText; - filter: chroma(color=#010101) dropshadow(color=ButtonHighlight, offx=1, offy=1); - width: 100%; - vertical-align: center; - } - - .WebFX-ContextMenu-Disabled .WebFX-ContextMenu-DisabledContainer .WebFX-ContextMenu-DisabledContainer { - background: Transparent; - filter: gray() - /* Remove all bright shades of gray */ - chroma(color=#ffffff) chroma(color=#fefefe) chroma(color=#fdfdfd) chroma(color=#fcfcfc) chroma(color=#fbfbfb) chroma(color=#fafafa) chroma(color=#f9f9f9) chroma(color=#f8f8f8) chroma(color=#f7f7f7) chroma(color=#f6f6f6) chroma(color=#f5f5f5) chroma(color=#f4f4f4) chroma(color=#f3f3f3) mask(color=#010101); - } - + a { + font-size: 12px; + } + + .WebFX-ContextMenu { + border: 0; + /*2px outset;*/ + width: 10px; + } + + .WebFX-ContextMenu-Body { + background-color: #EEFFEC; + background-image: url('../images/mmenubg.gif'); + margin: 0px; + padding: 1px; + border: 1px solid #E0E7C9; + } + + .WebFX-ContextMenu-Separator { + font-size: 0pt; + border: 1px dotted #E0E7C9; + height: 1px; + overflow: hidden; + margin: 3px 1px 3px 1px; + } + + .WebFX-ContextMenu-Item { + cursor: default; + font: menu; + font-size: 13px; + color: black !important; + width: 100%; + padding: 2px 20px 2px 16px; + + } + + .WebFX-ContextMenu-Over { + cursor: default; + background-color: highlight; + font: menu; + font-size: 13px; + width: 100%; + padding: 2px 20px 2px 16px; + color: highlighttext; + } + + .WebFX-ContextMenu-Disabled { + cursor: default; + font: menu; + width: 100%; + padding: 2px 20px 2px 16px; + color: graytext; + } + + .WebFX-ContextMenu-Disabled-Over { + cursor: default; + background-color: highlight; + font: menu; + width: 100%; + padding: 2px 20px 2px 16px; + color: graytext; + } + + .WebFX-ContextMenu-Disabled-Over .WebFX-ContextMenu-DisabledContainer { + display: block; + width: 100%; + vertical-align: center; + } + + /*very nice hack by erik below */ + .WebFX-ContextMenu-Disabled .WebFX-ContextMenu-DisabledContainer { + display: block; + background: GrayText; + filter: chroma(color=#010101) dropshadow(color=ButtonHighlight, offx=1, offy=1); + width: 100%; + vertical-align: center; + } + + .WebFX-ContextMenu-Disabled .WebFX-ContextMenu-DisabledContainer .WebFX-ContextMenu-DisabledContainer { + background: Transparent; + filter: gray() + /* Remove all bright shades of gray */ + chroma(color=#ffffff) chroma(color=#fefefe) chroma(color=#fdfdfd) chroma(color=#fcfcfc) chroma(color=#fbfbfb) chroma(color=#fafafa) chroma(color=#f9f9f9) chroma(color=#f8f8f8) chroma(color=#f7f7f7) chroma(color=#f6f6f6) chroma(color=#f5f5f5) chroma(color=#f4f4f4) chroma(color=#f3f3f3) mask(color=#010101); + } + .WebFX-ContextMenu-Disabled-Over .WebFX-ContextMenu-DisabledContainer .WebFX-ContextMenu-DisabledContainer {} \ No newline at end of file diff --git a/src/dede/js/dedeajax.js b/src/admin/js/dedeajax.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/dedeajax.js rename to src/admin/js/dedeajax.js index df883d07..f140fbc9 --- a/src/dede/js/dedeajax.js +++ b/src/admin/js/dedeajax.js @@ -1,146 +1,146 @@ -/** - * - * @version $Id: dedeajax.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - -//xmlhttp和xmldom对象 -DedeXHTTP = null; -DedeXDOM = null; -DedeContainer = null; - -//获取指定ID的元素 -function $(eid) { - return document.getElementById(eid); -} - -function $DE(id) { - return document.getElementById(id); -} - -//参数 gcontainer 是保存下载完成的内容的容器 - -function DedeAjax(gcontainer) { - - DedeContainer = gcontainer; - - //post或get发送数据的键值对 - this.keys = Array(); - this.values = Array(); - this.keyCount = -1; - - //http请求头 - this.rkeys = Array(); - this.rvalues = Array(); - this.rkeyCount = -1; - //请求头类型 - this.rtype = 'text'; - - //初始化xmlhttp - if (window.ActiveXObject) {//IE6、IE5 - try { DedeXHTTP = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { } - if (DedeXHTTP == null) try { DedeXHTTP = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } - } - else { - DedeXHTTP = new XMLHttpRequest(); - } - - DedeXHTTP.onreadystatechange = function () { - if (DedeXHTTP.readyState == 4) { - if (DedeXHTTP.status == 200) { - DedeContainer.innerHTML = DedeXHTTP.responseText; - DedeXHTTP = null; - } else DedeContainer.innerHTML = "下载数据失败"; - } else DedeContainer.innerHTML = "正在下载数据..."; - }; - - //增加一个POST或GET键值对 - this.AddKey = function (skey, svalue) { - this.keyCount++; - this.keys[this.keyCount] = skey; - this.values[this.keyCount] = escape(svalue); - }; - - //增加一个Http请求头键值对 - this.AddHead = function (skey, svalue) { - this.rkeyCount++; - this.rkeys[this.rkeyCount] = skey; - this.rvalues[this.rkeyCount] = svalue; - }; - - //清除当前对象的哈希表参数 - this.ClearSet = function () { - this.keyCount = -1; - this.keys = Array(); - this.values = Array(); - this.rkeyCount = -1; - this.rkeys = Array(); - this.rvalues = Array(); - }; - - //发送http请求头 - this.SendHead = function () { - if (this.rkeyCount != -1) { //发送用户自行设定的请求头 - for (; i <= this.rkeyCount; i++) { - DedeXHTTP.setRequestHeader(this.rkeys[i], this.rvalues[i]); - } - } - if (this.rtype == 'binary') { - DedeXHTTP.setRequestHeader("Content-Type", "multipart/form-data"); - } else { - DedeXHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); - } - }; - - //用Post方式发送数据 - this.SendPost = function (purl) { - var pdata = ""; - var i = 0; - this.state = 0; - DedeXHTTP.open("POST", purl, true); - this.SendHead(); - if (this.keyCount != -1) { //post数据 - for (; i <= this.keyCount; i++) { - if (pdata == "") pdata = this.keys[i] + '=' + this.values[i]; - else pdata += "&" + this.keys[i] + '=' + this.values[i]; - } - } - DedeXHTTP.send(pdata); - }; - - //用GET方式发送数据 - this.SendGet = function (purl) { - var gkey = ""; - var i = 0; - this.state = 0; - if (this.keyCount != -1) { //get参数 - for (; i <= this.keyCount; i++) { - if (gkey == "") gkey = this.keys[i] + '=' + this.values[i]; - else gkey += "&" + this.keys[i] + '=' + this.values[i]; - } - if (purl.indexOf('?') == -1) purl = purl + '?' + gkey; - else purl = purl + '&' + gkey; - } - DedeXHTTP.open("GET", purl, true); - this.SendHead(); - DedeXHTTP.send(null); - }; - -} // End Class DedeAjax - -//初始化xmldom -function InitXDom() { - if (DedeXDOM != null) return; - var obj = null; - if (typeof (DOMParser) != "undefined") { // Gecko、Mozilla、Firefox - var parser = new DOMParser(); - obj = parser.parseFromString(xmlText, "text/xml"); - } else { // IE - try { obj = new ActiveXObject("MSXML2.DOMDocument"); } catch (e) { } - if (obj == null) try { obj = new ActiveXObject("Microsoft.XMLDOM"); } catch (e) { } - } - DedeXDOM = obj; -}; +/** + * + * @version $Id: dedeajax.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + +//xmlhttp和xmldom对象 +DedeXHTTP = null; +DedeXDOM = null; +DedeContainer = null; + +//获取指定ID的元素 +function $(eid) { + return document.getElementById(eid); +} + +function $DE(id) { + return document.getElementById(id); +} + +//参数 gcontainer 是保存下载完成的内容的容器 + +function DedeAjax(gcontainer) { + + DedeContainer = gcontainer; + + //post或get发送数据的键值对 + this.keys = Array(); + this.values = Array(); + this.keyCount = -1; + + //http请求头 + this.rkeys = Array(); + this.rvalues = Array(); + this.rkeyCount = -1; + //请求头类型 + this.rtype = 'text'; + + //初始化xmlhttp + if (window.ActiveXObject) {//IE6、IE5 + try { DedeXHTTP = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { } + if (DedeXHTTP == null) try { DedeXHTTP = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { } + } + else { + DedeXHTTP = new XMLHttpRequest(); + } + + DedeXHTTP.onreadystatechange = function () { + if (DedeXHTTP.readyState == 4) { + if (DedeXHTTP.status == 200) { + DedeContainer.innerHTML = DedeXHTTP.responseText; + DedeXHTTP = null; + } else DedeContainer.innerHTML = "下载数据失败"; + } else DedeContainer.innerHTML = "正在下载数据..."; + }; + + //增加一个POST或GET键值对 + this.AddKey = function (skey, svalue) { + this.keyCount++; + this.keys[this.keyCount] = skey; + this.values[this.keyCount] = escape(svalue); + }; + + //增加一个Http请求头键值对 + this.AddHead = function (skey, svalue) { + this.rkeyCount++; + this.rkeys[this.rkeyCount] = skey; + this.rvalues[this.rkeyCount] = svalue; + }; + + //清除当前对象的哈希表参数 + this.ClearSet = function () { + this.keyCount = -1; + this.keys = Array(); + this.values = Array(); + this.rkeyCount = -1; + this.rkeys = Array(); + this.rvalues = Array(); + }; + + //发送http请求头 + this.SendHead = function () { + if (this.rkeyCount != -1) { //发送用户自行设定的请求头 + for (; i <= this.rkeyCount; i++) { + DedeXHTTP.setRequestHeader(this.rkeys[i], this.rvalues[i]); + } + } + if (this.rtype == 'binary') { + DedeXHTTP.setRequestHeader("Content-Type", "multipart/form-data"); + } else { + DedeXHTTP.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + } + }; + + //用Post方式发送数据 + this.SendPost = function (purl) { + var pdata = ""; + var i = 0; + this.state = 0; + DedeXHTTP.open("POST", purl, true); + this.SendHead(); + if (this.keyCount != -1) { //post数据 + for (; i <= this.keyCount; i++) { + if (pdata == "") pdata = this.keys[i] + '=' + this.values[i]; + else pdata += "&" + this.keys[i] + '=' + this.values[i]; + } + } + DedeXHTTP.send(pdata); + }; + + //用GET方式发送数据 + this.SendGet = function (purl) { + var gkey = ""; + var i = 0; + this.state = 0; + if (this.keyCount != -1) { //get参数 + for (; i <= this.keyCount; i++) { + if (gkey == "") gkey = this.keys[i] + '=' + this.values[i]; + else gkey += "&" + this.keys[i] + '=' + this.values[i]; + } + if (purl.indexOf('?') == -1) purl = purl + '?' + gkey; + else purl = purl + '&' + gkey; + } + DedeXHTTP.open("GET", purl, true); + this.SendHead(); + DedeXHTTP.send(null); + }; + +} // End Class DedeAjax + +//初始化xmldom +function InitXDom() { + if (DedeXDOM != null) return; + var obj = null; + if (typeof (DOMParser) != "undefined") { // Gecko、Mozilla、Firefox + var parser = new DOMParser(); + obj = parser.parseFromString(xmlText, "text/xml"); + } else { // IE + try { obj = new ActiveXObject("MSXML2.DOMDocument"); } catch (e) { } + if (obj == null) try { obj = new ActiveXObject("Microsoft.XMLDOM"); } catch (e) { } + } + DedeXDOM = obj; +}; diff --git a/src/dede/js/dialog.js b/src/admin/js/dialog.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/dialog.js rename to src/admin/js/dialog.js index 2f0542fe..749cd396 --- a/src/dede/js/dialog.js +++ b/src/admin/js/dialog.js @@ -1,126 +1,126 @@ -/** - * - * @version $Id: dialog.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -document.write("") -function editTitle(aid) { - var show = document.getElementById("show_news"); - var myajax = new DedeAjax(show, false, false, "", "", ""); - myajax.SendGet2("catalog_edit.php?dopost=time&id=" + aid); - DedeXHTTP = null; -} -function $Dede(id) { return document.getElementById(id) } -function AlertMsg(title, id) { - var msgw, msgh, msgbg, msgcolor, bordercolor, titlecolor, titlebg, content; - //弹出窗口设置 - msgw = 600;//窗口宽度 - msgbg = "#FFF";//内容背景 - msgcolor = "#000";//内容颜色 - bordercolor = "#5A6D58";//边框颜色 - titlecolor = "#254015";//标题颜色 - titlebg = "#369 url(images/tbg.gif)";//标题背景 - //遮罩背景设置 - content = "
对不起,载入失败
"; - var sWidth, sHeight; - sWidth = screen.availWidth; - if (screen.availHeight > document.body.scrollHeight) { - sHeight = screen.availHeight;//少于一屏 - } else { - sHeight = document.body.scrollHeight;//多于一屏 - } - //创建遮罩背景 - var maskObj = document.createElement("div"); - maskObj.setAttribute('id', 'maskdiv'); - maskObj.style.position = "absolute"; - maskObj.style.top = "0"; - maskObj.style.left = "0"; - maskObj.style.background = "#666"; - maskObj.style.filter = "Alpha(opacity=30);"; - maskObj.style.opacity = "0.3"; - maskObj.style.width = sWidth + "px"; - maskObj.style.height = sHeight + "px"; - maskObj.style.zIndex = "10000"; - document.body.appendChild(maskObj); - //创建弹出窗口 - var msgObj = document.createElement("div") - msgObj.setAttribute("id", "msgdiv"); - msgObj.style.position = "absolute"; - //msgObj.style.top = (screen.availHeight - msgh) / 4 + "px"; - //msgObj.style.left = (screen.availWidth - msgw) / 2 + "px"; - msgObj.style.top = "100px"; - msgObj.style.left = "100px"; - msgObj.style.width = msgw + "px"; - msgObj.style.height = msgh + "px"; - msgObj.style.fontSize = "14px"; - msgObj.style.background = msgbg; - msgObj.style.border = "1px solid " + bordercolor; - msgObj.style.zIndex = "10001"; - //创建标题 - var thObj = document.createElement("div"); - thObj.setAttribute("id", "msgth"); - thObj.className = "DragAble"; - thObj.title = "按住鼠标左键可以拖动窗口"; - thObj.style.cursor = "move"; - thObj.style.padding = "10px"; - thObj.style.color = titlecolor; - thObj.style.fontWeight = 'bold'; - thObj.style.background = titlebg; - var titleStr = "关闭" + "" + title + ""; - thObj.innerHTML = titleStr; - //创建内容 - var bodyObj = document.createElement("div"); - bodyObj.setAttribute("id", "msgbody"); - bodyObj.style.padding = "0px"; - bodyObj.style.lineHeight = "1.5em"; - var txt = document.createTextNode(content); - bodyObj.appendChild(txt); - bodyObj.innerHTML = content; - //生成窗口 - document.body.appendChild(msgObj); - $Dede("msgdiv").appendChild(thObj); - $Dede("msgdiv").appendChild(bodyObj); - editTitle(id); -} -function CloseMsg() { - //移除对象 - document.body.removeChild($Dede("maskdiv")); - $Dede("msgdiv").removeChild($Dede("msgth")); - $Dede("msgdiv").removeChild($Dede("msgbody")); - document.body.removeChild($Dede("msgdiv")); -} -//拖动窗口 -var ie = document.all; -var nn6 = document.getElementById && !document.all; -var isdrag = false; -var y, x; -var oDragObj; -function moveMouse(e) { - if (isdrag) { - oDragObj.style.top = (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y) + "px"; - oDragObj.style.left = (nn6 ? nTX + e.clientX - x : nTX + event.clientX - x) + "px"; - return false; - } -} -function initDrag(e) { - var oDragHandle = nn6 ? e.target : event.srcElement; - var topElement = "HTML"; - while (oDragHandle.tagName != topElement && oDragHandle.className != "DragAble") { - oDragHandle = nn6 ? oDragHandle.parentNode : oDragHandle.parentElement; - } - if (oDragHandle.className == "DragAble") { - isdrag = true; - oDragObj = oDragHandle.parentNode; - nTY = parseInt(oDragObj.style.top); - y = nn6 ? e.clientY : event.clientY; - nTX = parseInt(oDragObj.style.left); - x = nn6 ? e.clientX : event.clientX; - document.onmousemove = moveMouse; - return false; - } -} -document.onmousedown = initDrag; +/** + * + * @version $Id: dialog.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +document.write("") +function editTitle(aid) { + var show = document.getElementById("show_news"); + var myajax = new DedeAjax(show, false, false, "", "", ""); + myajax.SendGet2("catalog_edit.php?dopost=time&id=" + aid); + DedeXHTTP = null; +} +function $Dede(id) { return document.getElementById(id) } +function AlertMsg(title, id) { + var msgw, msgh, msgbg, msgcolor, bordercolor, titlecolor, titlebg, content; + //弹出窗口设置 + msgw = 600;//窗口宽度 + msgbg = "#FFF";//内容背景 + msgcolor = "#000";//内容颜色 + bordercolor = "#5A6D58";//边框颜色 + titlecolor = "#254015";//标题颜色 + titlebg = "#369 url(images/tbg.gif)";//标题背景 + //遮罩背景设置 + content = "
对不起,载入失败
"; + var sWidth, sHeight; + sWidth = screen.availWidth; + if (screen.availHeight > document.body.scrollHeight) { + sHeight = screen.availHeight;//少于一屏 + } else { + sHeight = document.body.scrollHeight;//多于一屏 + } + //创建遮罩背景 + var maskObj = document.createElement("div"); + maskObj.setAttribute('id', 'maskdiv'); + maskObj.style.position = "absolute"; + maskObj.style.top = "0"; + maskObj.style.left = "0"; + maskObj.style.background = "#666"; + maskObj.style.filter = "Alpha(opacity=30);"; + maskObj.style.opacity = "0.3"; + maskObj.style.width = sWidth + "px"; + maskObj.style.height = sHeight + "px"; + maskObj.style.zIndex = "10000"; + document.body.appendChild(maskObj); + //创建弹出窗口 + var msgObj = document.createElement("div") + msgObj.setAttribute("id", "msgdiv"); + msgObj.style.position = "absolute"; + //msgObj.style.top = (screen.availHeight - msgh) / 4 + "px"; + //msgObj.style.left = (screen.availWidth - msgw) / 2 + "px"; + msgObj.style.top = "100px"; + msgObj.style.left = "100px"; + msgObj.style.width = msgw + "px"; + msgObj.style.height = msgh + "px"; + msgObj.style.fontSize = "14px"; + msgObj.style.background = msgbg; + msgObj.style.border = "1px solid " + bordercolor; + msgObj.style.zIndex = "10001"; + //创建标题 + var thObj = document.createElement("div"); + thObj.setAttribute("id", "msgth"); + thObj.className = "DragAble"; + thObj.title = "按住鼠标左键可以拖动窗口"; + thObj.style.cursor = "move"; + thObj.style.padding = "10px"; + thObj.style.color = titlecolor; + thObj.style.fontWeight = 'bold'; + thObj.style.background = titlebg; + var titleStr = "关闭" + "" + title + ""; + thObj.innerHTML = titleStr; + //创建内容 + var bodyObj = document.createElement("div"); + bodyObj.setAttribute("id", "msgbody"); + bodyObj.style.padding = "0px"; + bodyObj.style.lineHeight = "1.5em"; + var txt = document.createTextNode(content); + bodyObj.appendChild(txt); + bodyObj.innerHTML = content; + //生成窗口 + document.body.appendChild(msgObj); + $Dede("msgdiv").appendChild(thObj); + $Dede("msgdiv").appendChild(bodyObj); + editTitle(id); +} +function CloseMsg() { + //移除对象 + document.body.removeChild($Dede("maskdiv")); + $Dede("msgdiv").removeChild($Dede("msgth")); + $Dede("msgdiv").removeChild($Dede("msgbody")); + document.body.removeChild($Dede("msgdiv")); +} +//拖动窗口 +var ie = document.all; +var nn6 = document.getElementById && !document.all; +var isdrag = false; +var y, x; +var oDragObj; +function moveMouse(e) { + if (isdrag) { + oDragObj.style.top = (nn6 ? nTY + e.clientY - y : nTY + event.clientY - y) + "px"; + oDragObj.style.left = (nn6 ? nTX + e.clientX - x : nTX + event.clientX - x) + "px"; + return false; + } +} +function initDrag(e) { + var oDragHandle = nn6 ? e.target : event.srcElement; + var topElement = "HTML"; + while (oDragHandle.tagName != topElement && oDragHandle.className != "DragAble") { + oDragHandle = nn6 ? oDragHandle.parentNode : oDragHandle.parentElement; + } + if (oDragHandle.className == "DragAble") { + isdrag = true; + oDragObj = oDragHandle.parentNode; + nTY = parseInt(oDragObj.style.top); + y = nn6 ? e.clientY : event.clientY; + nTX = parseInt(oDragObj.style.left); + x = nn6 ? e.clientX : event.clientX; + document.onmousemove = moveMouse; + return false; + } +} +document.onmousedown = initDrag; document.onmouseup = new Function("isdrag=false"); \ No newline at end of file diff --git a/src/dede/js/diy.js b/src/admin/js/diy.js old mode 100755 new mode 100644 similarity index 85% rename from src/dede/js/diy.js rename to src/admin/js/diy.js index 3505d9b2..2d6b2d15 --- a/src/dede/js/diy.js +++ b/src/admin/js/diy.js @@ -1,15 +1,15 @@ -/** - * - * @version $Id: diy.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - - -function showHide2(objname) { - var obj = $Obj(objname); - if (obj.style.display != 'block') { obj.style.display = 'block' } - else { obj.style.display = 'none'; } +/** + * + * @version $Id: diy.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + + +function showHide2(objname) { + var obj = $Obj(objname); + if (obj.style.display != 'block') { obj.style.display = 'block' } + else { obj.style.display = 'none'; } } \ No newline at end of file diff --git a/src/dede/js/drag.js b/src/admin/js/drag.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/drag.js rename to src/admin/js/drag.js index 7a744d9d..25ea02ab --- a/src/dede/js/drag.js +++ b/src/admin/js/drag.js @@ -1,52 +1,52 @@ -var $ = jQuery; -var disabelsort = true; //是否停止使用块级移动 -$(function(){ - $('.dbox') - .each(function(){ - $(this).hover(function(){ - $(this).find('dt').addClass('collapse'); - }, function(){ - $(this).find('dt').removeClass('collapse'); - }) - //.find('h2').hover(function(){ - // $(this).find('.configure').css('visibility', 'visible'); - //}, function(){ - // $(this).find('.configure').css('visibility', 'hidden'); - //}) - .click(function(){ - $(this).siblings('dd').toggle(); - }) - .end() - //.find('.configure').css('visibility', 'hidden'); - }); - $('.column').sortable({ - connectWith: '.column', - handle: 'dt', - disable:true, - cursor: 'pointer', - placeholder: 'placeholder', - forcePlaceholderSize: true, - opacity: 0.4, - stop: function(event, ui){ - $(ui.item).find('h2').click(); - var items=[]; - $('.column').each(function(){ - var columnId=$(this).attr('id'); - $('.dbox', this).each(function(i){ - var item={ - id: $(this).attr('id'), - order : i, - column: columnId - }; - items.push(item); - }); - }); - var sortorder = { items: items }; - $.post('index_body.php?dopost=movesave', 'sortorder='+$.toJSON(sortorder), function(response){ - }); - } - }) - .disableSelection(); - if(disabelsort) $('.column').sortable("option", "disabled", true ); -}); - +var $ = jQuery; +var disabelsort = true; //是否停止使用块级移动 +$(function(){ + $('.dbox') + .each(function(){ + $(this).hover(function(){ + $(this).find('dt').addClass('collapse'); + }, function(){ + $(this).find('dt').removeClass('collapse'); + }) + //.find('h2').hover(function(){ + // $(this).find('.configure').css('visibility', 'visible'); + //}, function(){ + // $(this).find('.configure').css('visibility', 'hidden'); + //}) + .click(function(){ + $(this).siblings('dd').toggle(); + }) + .end() + //.find('.configure').css('visibility', 'hidden'); + }); + $('.column').sortable({ + connectWith: '.column', + handle: 'dt', + disable:true, + cursor: 'pointer', + placeholder: 'placeholder', + forcePlaceholderSize: true, + opacity: 0.4, + stop: function(event, ui){ + $(ui.item).find('h2').click(); + var items=[]; + $('.column').each(function(){ + var columnId=$(this).attr('id'); + $('.dbox', this).each(function(i){ + var item={ + id: $(this).attr('id'), + order : i, + column: columnId + }; + items.push(item); + }); + }); + var sortorder = { items: items }; + $.post('index_body.php?dopost=movesave', 'sortorder='+$.toJSON(sortorder), function(response){ + }); + } + }) + .disableSelection(); + if(disabelsort) $('.column').sortable("option", "disabled", true ); +}); + diff --git a/src/dede/js/float.js b/src/admin/js/float.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/float.js rename to src/admin/js/float.js index b651799e..0fdf2ba6 --- a/src/dede/js/float.js +++ b/src/admin/js/float.js @@ -1,108 +1,108 @@ -/** - * - * @version $Id: float.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ -self.onError=null; -currentX = currentY = 0; -whichIt = null; -lastScrollX = 0; lastScrollY = 0; -NS = (document.layers) ? 1 : 0; -IE = (document.all) ? 1 : 0; -function heartBeat() { - if (IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; } - if (NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } - if (diffY != lastScrollY) { - percent = .1 * (diffY - lastScrollY); - if (percent > 0) percent = Math.ceil(percent); - else percent = Math.floor(percent); - if (IE) document.all.floater.style.pixelTop += percent; - if (NS) document.floater.top += percent; - lastScrollY = lastScrollY + percent; - } if (diffX != lastScrollX) { - percent = .1 * (diffX - lastScrollX); - if (percent > 0) percent = Math.ceil(percent); - else percent = Math.floor(percent); - if (IE) document.all.floater.style.pixelLeft += percent; - if (NS) document.floater.left += percent; - lastScrollX = lastScrollX + percent; - } - -} - -function checkFocus(x, y) { - stalkerx = document.floater.pageX; - stalkery = document.floater.pageY; - stalkerwidth = document.floater.clip.width; - stalkerheight = document.floater.clip.height; - if ((x > stalkerx && x < (stalkerx + stalkerwidth)) && (y > stalkery && y < (stalkery + stalkerheight))) return true; - else return false; -} - -function grabIt(e) { - if (IE) { - whichIt = event.srcElement; - while (whichIt.id.indexOf("floater") == -1) { - whichIt = whichIt.parentElement; - if (whichIt == null) { return true; } - } - whichIt.style.pixelLeft = whichIt.offsetLeft; - whichIt.style.pixelTop = whichIt.offsetTop; - currentX = (event.clientX + document.body.scrollLeft); - currentY = (event.clientY + document.body.scrollTop); - } else { - window.captureEvents(Event.MOUSEMOVE); - if (checkFocus(e.pageX, e.pageY)) { - whichIt = document.floater; - StalkerTouchedX = e.pageX - document.floater.pageX; - StalkerTouchedY = e.pageY - document.floater.pageY; - } - } return true; -} - -function moveIt(e) { - - if (whichIt == null) { return false; } - if (IE) { - newX = (event.clientX + document.body.scrollLeft); - newY = (event.clientY + document.body.scrollTop); - distanceX = (newX - currentX); distanceY = (newY - currentY); - currentX = newX; currentY = newY; - whichIt.style.pixelLeft += distanceX; - whichIt.style.pixelTop += distanceY; - if (whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop; - if (whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft; - if (whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20; - if (whichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5; - event.returnValue = false; - } else { - whichIt.moveTo(e.pageX - StalkerTouchedX, e.pageY - StalkerTouchedY); - if (whichIt.left < 0 + self.pageXOffset) whichIt.left = 0 + self.pageXOffset; - if (whichIt.top < 0 + self.pageYOffset) whichIt.top = 0 + self.pageYOffset; - if ((whichIt.left + whichIt.clip.width) >= (window.innerWidth + self.pageXOffset - 17)) whichIt.left = ((window.innerWidth + self.pageXOffset) - whichIt.clip.width) - 17; - if ((whichIt.top + whichIt.clip.height) >= (window.innerHeight + self.pageYOffset + 50)) whichIt.top = ((window.innerHeight + self.pageYOffset) - whichIt.clip.height) - 17; - return false; - } - return false; -} - -function dropIt() { - whichIt = null; - if (NS) window.releaseEvents(Event.MOUSEMOVE); - return true; -} -if (NS) { - window.captureEvents(Event.MOUSEUPEvent.MOUSEDOWN); - window.onmousedown = grabIt; - window.onmousemove = moveIt; - window.onmouseup = dropIt; -} -if (IE) { - document.onmousedown = grabIt; - document.onmousemove = moveIt; - document.onmouseup = dropIt; -} +/** + * + * @version $Id: float.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ +self.onError=null; +currentX = currentY = 0; +whichIt = null; +lastScrollX = 0; lastScrollY = 0; +NS = (document.layers) ? 1 : 0; +IE = (document.all) ? 1 : 0; +function heartBeat() { + if (IE) { diffY = document.body.scrollTop; diffX = document.body.scrollLeft; } + if (NS) { diffY = self.pageYOffset; diffX = self.pageXOffset; } + if (diffY != lastScrollY) { + percent = .1 * (diffY - lastScrollY); + if (percent > 0) percent = Math.ceil(percent); + else percent = Math.floor(percent); + if (IE) document.all.floater.style.pixelTop += percent; + if (NS) document.floater.top += percent; + lastScrollY = lastScrollY + percent; + } if (diffX != lastScrollX) { + percent = .1 * (diffX - lastScrollX); + if (percent > 0) percent = Math.ceil(percent); + else percent = Math.floor(percent); + if (IE) document.all.floater.style.pixelLeft += percent; + if (NS) document.floater.left += percent; + lastScrollX = lastScrollX + percent; + } + +} + +function checkFocus(x, y) { + stalkerx = document.floater.pageX; + stalkery = document.floater.pageY; + stalkerwidth = document.floater.clip.width; + stalkerheight = document.floater.clip.height; + if ((x > stalkerx && x < (stalkerx + stalkerwidth)) && (y > stalkery && y < (stalkery + stalkerheight))) return true; + else return false; +} + +function grabIt(e) { + if (IE) { + whichIt = event.srcElement; + while (whichIt.id.indexOf("floater") == -1) { + whichIt = whichIt.parentElement; + if (whichIt == null) { return true; } + } + whichIt.style.pixelLeft = whichIt.offsetLeft; + whichIt.style.pixelTop = whichIt.offsetTop; + currentX = (event.clientX + document.body.scrollLeft); + currentY = (event.clientY + document.body.scrollTop); + } else { + window.captureEvents(Event.MOUSEMOVE); + if (checkFocus(e.pageX, e.pageY)) { + whichIt = document.floater; + StalkerTouchedX = e.pageX - document.floater.pageX; + StalkerTouchedY = e.pageY - document.floater.pageY; + } + } return true; +} + +function moveIt(e) { + + if (whichIt == null) { return false; } + if (IE) { + newX = (event.clientX + document.body.scrollLeft); + newY = (event.clientY + document.body.scrollTop); + distanceX = (newX - currentX); distanceY = (newY - currentY); + currentX = newX; currentY = newY; + whichIt.style.pixelLeft += distanceX; + whichIt.style.pixelTop += distanceY; + if (whichIt.style.pixelTop < document.body.scrollTop) whichIt.style.pixelTop = document.body.scrollTop; + if (whichIt.style.pixelLeft < document.body.scrollLeft) whichIt.style.pixelLeft = document.body.scrollLeft; + if (whichIt.style.pixelLeft > document.body.offsetWidth - document.body.scrollLeft - whichIt.style.pixelWidth - 20) whichIt.style.pixelLeft = document.body.offsetWidth - whichIt.style.pixelWidth - 20; + if (whichIt.style.pixelTop > document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5) whichIt.style.pixelTop = document.body.offsetHeight + document.body.scrollTop - whichIt.style.pixelHeight - 5; + event.returnValue = false; + } else { + whichIt.moveTo(e.pageX - StalkerTouchedX, e.pageY - StalkerTouchedY); + if (whichIt.left < 0 + self.pageXOffset) whichIt.left = 0 + self.pageXOffset; + if (whichIt.top < 0 + self.pageYOffset) whichIt.top = 0 + self.pageYOffset; + if ((whichIt.left + whichIt.clip.width) >= (window.innerWidth + self.pageXOffset - 17)) whichIt.left = ((window.innerWidth + self.pageXOffset) - whichIt.clip.width) - 17; + if ((whichIt.top + whichIt.clip.height) >= (window.innerHeight + self.pageYOffset + 50)) whichIt.top = ((window.innerHeight + self.pageYOffset) - whichIt.clip.height) - 17; + return false; + } + return false; +} + +function dropIt() { + whichIt = null; + if (NS) window.releaseEvents(Event.MOUSEMOVE); + return true; +} +if (NS) { + window.captureEvents(Event.MOUSEUPEvent.MOUSEDOWN); + window.onmousedown = grabIt; + window.onmousemove = moveIt; + window.onmouseup = dropIt; +} +if (IE) { + document.onmousedown = grabIt; + document.onmousemove = moveIt; + document.onmouseup = dropIt; +} if (NS || IE) action = window.setInterval("heartBeat()", 1); \ No newline at end of file diff --git a/src/dede/js/frame.js b/src/admin/js/frame.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/frame.js rename to src/admin/js/frame.js index 5c5c8a93..38d2cb2e --- a/src/dede/js/frame.js +++ b/src/admin/js/frame.js @@ -1,149 +1,149 @@ -var $ = jQuery; -var thespeed = 5; -var navIE = document.all && navigator.userAgent.indexOf("Firefox") == -1; -var myspeed = 0; -$(function () { - - //快捷菜单 - bindQuickMenu(); - - //左侧菜单开关 - LeftMenuToggle(); - - //全部功能开关 - AllMenuToggle(); - - //取消菜单链接虚线 - $(".head").find("a").click(function () { $(this).blur() }); - $(".menu").find("a").click(function () { $(this).blur() }); - - -}).keydown(function (event) {//快捷键 - if (event.keyCode == 116) { - //url = $("#main").attr("src"); - //main.location.href = url; - //return false; - } - if (event.keyCode == 27) { - $("#qucikmenu").slideToggle("fast") - } -}); - -function bindQuickMenu() {//快捷菜单 - $("#ac_qucikmenu").bind("mouseenter", function () { - $("#qucikmenu").slideDown("fast"); - }).dblclick(function () { - $("#qucikmenu").slideToggle("fast"); - }).bind("mouseleave", function () { - hidequcikmenu = setTimeout('$("#qucikmenu").slideUp("fast");', 700); - $(this).bind("mouseenter", function () { clearTimeout(hidequcikmenu); }); - }); - $("#qucikmenu").bind("mouseleave", function () { - hidequcikmenu = setTimeout('$("#qucikmenu").slideUp("fast");', 700); - $(this).bind("mouseenter", function () { clearTimeout(hidequcikmenu); }); - }).find("a").click(function () { - $(this).blur(); - $("#qucikmenu").slideUp("fast"); - //$("#ac_qucikmenu").text($(this).text()); - }); -} - -function LeftMenuToggle() {//左侧菜单开关 - $("#togglemenu").click(function () { - if ($("body").attr("class") == "showmenu") { - $("body").attr("class", "hidemenu"); - $(this).html("显示菜单"); - } else { - $("body").attr("class", "showmenu"); - $(this).html("隐藏菜单"); - } - }); -} - - -function AllMenuToggle() {//全部功能开关 - mask = $(".pagemask,.iframemask,.allmenu"); - $("#allmenu").click(function () { - mask.show(); - }); - //mask.mousedown(function(){alert("123");}); - mask.click(function () { mask.hide(); }); -} - -function AC(act) { - //alert(act); - mlink = $("a[id='" + act + "']"); - if (mlink.size() > 0) { - box = mlink.parents("div[id^='menu_']"); - boxid = box.attr("id").substring(5, 128); - if ($("body").attr("class") != "showmenu") $("#togglemenu").click(); - if (mlink.attr("_url")) { - $("#menu").find("div[id^=menu]").hide(); - box.show(); - mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass"); - if ($("#mod_" + boxid).attr("class") == "") { - $("#nav").find("a").removeClass("thisclass"); - $("#nav").find("a[id='mod_" + boxid + "']").addClass("thisclass").blur(); - } - main.location.href = mlink.attr("_url"); - } else if (mlink.attr("_open") && mlink.attr("_open") != undefined) { - window.open(mlink.attr("_open")); - } - } -} - -/********************* - * 滚动按钮设置 -*********************/ - -function scrollwindow() { - parent.frames['menu'].scrollBy(0, myspeed); -} - -function initializeIT() { - if (myspeed != 0) { - scrollwindow(); - } -} - - -//滚动插件 -/* -(function($){ - $.fn.extend({ - Scroll:function(opt,callback){ - //参数初始化 - if(!opt) var opt={}; - var _this=this.eq(0).find("ul:first"); - var lineH=_this.find("li:first").height(), //获取行高 - line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数,默认为一屏,即父容器高度 - speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度,数值越大,速度越慢(毫秒) - timer=opt.timer?parseInt(opt.timer,10):3000; //滚动的时间间隔(毫秒) - if(line==0) line=1; - var upHeight=0-line*lineH; - //滚动函数 - scrollUp=function(){ - _this.animate({ - marginTop:upHeight - },speed,function(){ - for(i=1;i<=line;i++){ - _this.find("li:first").appendTo(_this); - } - _this.css({marginTop:0}); - }); - } - //鼠标事件绑定 - var timerID; - timerID=setInterval("scrollUp()",timer); - _this.mouseover(function(){ - clearInterval(timerID); - }).mouseout(function(){ - timerID=setInterval("scrollUp()",timer); - }); - } - }) -})(jQuery); -*/ - - - +var $ = jQuery; +var thespeed = 5; +var navIE = document.all && navigator.userAgent.indexOf("Firefox") == -1; +var myspeed = 0; +$(function () { + + //快捷菜单 + bindQuickMenu(); + + //左侧菜单开关 + LeftMenuToggle(); + + //全部功能开关 + AllMenuToggle(); + + //取消菜单链接虚线 + $(".head").find("a").click(function () { $(this).blur() }); + $(".menu").find("a").click(function () { $(this).blur() }); + + +}).keydown(function (event) {//快捷键 + if (event.keyCode == 116) { + //url = $("#main").attr("src"); + //main.location.href = url; + //return false; + } + if (event.keyCode == 27) { + $("#qucikmenu").slideToggle("fast") + } +}); + +function bindQuickMenu() {//快捷菜单 + $("#ac_qucikmenu").bind("mouseenter", function () { + $("#qucikmenu").slideDown("fast"); + }).dblclick(function () { + $("#qucikmenu").slideToggle("fast"); + }).bind("mouseleave", function () { + hidequcikmenu = setTimeout('$("#qucikmenu").slideUp("fast");', 700); + $(this).bind("mouseenter", function () { clearTimeout(hidequcikmenu); }); + }); + $("#qucikmenu").bind("mouseleave", function () { + hidequcikmenu = setTimeout('$("#qucikmenu").slideUp("fast");', 700); + $(this).bind("mouseenter", function () { clearTimeout(hidequcikmenu); }); + }).find("a").click(function () { + $(this).blur(); + $("#qucikmenu").slideUp("fast"); + //$("#ac_qucikmenu").text($(this).text()); + }); +} + +function LeftMenuToggle() {//左侧菜单开关 + $("#togglemenu").click(function () { + if ($("body").attr("class") == "showmenu") { + $("body").attr("class", "hidemenu"); + $(this).html("显示菜单"); + } else { + $("body").attr("class", "showmenu"); + $(this).html("隐藏菜单"); + } + }); +} + + +function AllMenuToggle() {//全部功能开关 + mask = $(".pagemask,.iframemask,.allmenu"); + $("#allmenu").click(function () { + mask.show(); + }); + //mask.mousedown(function(){alert("123");}); + mask.click(function () { mask.hide(); }); +} + +function AC(act) { + //alert(act); + mlink = $("a[id='" + act + "']"); + if (mlink.size() > 0) { + box = mlink.parents("div[id^='menu_']"); + boxid = box.attr("id").substring(5, 128); + if ($("body").attr("class") != "showmenu") $("#togglemenu").click(); + if (mlink.attr("_url")) { + $("#menu").find("div[id^=menu]").hide(); + box.show(); + mlink.addClass("thisclass").blur().parents("#menu").find("ul li a").not(mlink).removeClass("thisclass"); + if ($("#mod_" + boxid).attr("class") == "") { + $("#nav").find("a").removeClass("thisclass"); + $("#nav").find("a[id='mod_" + boxid + "']").addClass("thisclass").blur(); + } + main.location.href = mlink.attr("_url"); + } else if (mlink.attr("_open") && mlink.attr("_open") != undefined) { + window.open(mlink.attr("_open")); + } + } +} + +/********************* + * 滚动按钮设置 +*********************/ + +function scrollwindow() { + parent.frames['menu'].scrollBy(0, myspeed); +} + +function initializeIT() { + if (myspeed != 0) { + scrollwindow(); + } +} + + +//滚动插件 +/* +(function($){ + $.fn.extend({ + Scroll:function(opt,callback){ + //参数初始化 + if(!opt) var opt={}; + var _this=this.eq(0).find("ul:first"); + var lineH=_this.find("li:first").height(), //获取行高 + line=opt.line?parseInt(opt.line,10):parseInt(this.height()/lineH,10), //每次滚动的行数,默认为一屏,即父容器高度 + speed=opt.speed?parseInt(opt.speed,10):500, //卷动速度,数值越大,速度越慢(毫秒) + timer=opt.timer?parseInt(opt.timer,10):3000; //滚动的时间间隔(毫秒) + if(line==0) line=1; + var upHeight=0-line*lineH; + //滚动函数 + scrollUp=function(){ + _this.animate({ + marginTop:upHeight + },speed,function(){ + for(i=1;i<=line;i++){ + _this.find("li:first").appendTo(_this); + } + _this.css({marginTop:0}); + }); + } + //鼠标事件绑定 + var timerID; + timerID=setInterval("scrollUp()",timer); + _this.mouseover(function(){ + clearInterval(timerID); + }).mouseout(function(){ + timerID=setInterval("scrollUp()",timer); + }); + } + }) +})(jQuery); +*/ + + + diff --git a/src/dede/js/global.js b/src/admin/js/global.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/global.js rename to src/admin/js/global.js index 17ac70c6..78844fcc --- a/src/dede/js/global.js +++ b/src/admin/js/global.js @@ -1,23 +1,23 @@ -var BROWSER = {}; -var USERAGENT = navigator.userAgent.toLowerCase(); -browserVersion({'ie':'msie','firefox':'','chrome':'','opera':'','safari':'','maxthon':'','mozilla':'','webkit':''}); -if(BROWSER.safari) { - BROWSER.firefox = true; -} -BROWSER.opera = BROWSER.opera ? opera.version() : 0; -function browserVersion(types) { - var other = 1; - for(i in types) { - var v = types[i] ? types[i] : i; - if(USERAGENT.indexOf(v) != -1) { - var re = new RegExp(v + '(\\/|\\s)([\\d\\.]+)', 'ig'); - var matches = re.exec(USERAGENT); - var ver = matches != null ? matches[2] : 0; - other = ver !== 0 ? 0 : other; - }else { - var ver = 0; - } - eval('BROWSER.' + i + '= ver'); - } - BROWSER.other = other; -} +var BROWSER = {}; +var USERAGENT = navigator.userAgent.toLowerCase(); +browserVersion({'ie':'msie','firefox':'','chrome':'','opera':'','safari':'','maxthon':'','mozilla':'','webkit':''}); +if(BROWSER.safari) { + BROWSER.firefox = true; +} +BROWSER.opera = BROWSER.opera ? opera.version() : 0; +function browserVersion(types) { + var other = 1; + for(i in types) { + var v = types[i] ? types[i] : i; + if(USERAGENT.indexOf(v) != -1) { + var re = new RegExp(v + '(\\/|\\s)([\\d\\.]+)', 'ig'); + var matches = re.exec(USERAGENT); + var ver = matches != null ? matches[2] : 0; + other = ver !== 0 ? 0 : other; + }else { + var ver = 0; + } + eval('BROWSER.' + i + '= ver'); + } + BROWSER.other = other; +} diff --git a/src/dede/js/handlers.js b/src/admin/js/handlers.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/handlers.js rename to src/admin/js/handlers.js index 53937d89..d372b279 --- a/src/dede/js/handlers.js +++ b/src/admin/js/handlers.js @@ -1,263 +1,263 @@ -/** - * - * @version $Id: handlers.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - -//---事件句并------------------------------ -function fileQueueError(file, errorCode, message) { - try { - var imageName = "error.gif"; - var errorName = ""; - if (errorCode === SWFUpload.errorCode_QUEUE_LIMIT_EXCEEDED) { - errorName = "您添加的文件超过了限制"; - } - - if (errorName !== "") { - alert(errorName); - return; - } - - switch (errorCode) { - case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: - imageName = "zerobyte.gif"; - break; - case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT: - imageName = "toobig.gif"; - break; - case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: - case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE: - default: - alert(message); - break; - } - addImage("images/" + imageName, 0); - } catch (ex) { - this.debug(ex); - } - -} - -function fileDialogComplete(numFilesSelected, numFilesQueued) { - try { - if (numFilesQueued > 0) { - this.startUpload(); - } - } catch (ex) { - this.debug(ex); - } -} - -function uploadProgress(file, bytesLoaded) { - try { - var percent = Math.ceil((bytesLoaded / file.size) * 100); - var progress = new FileProgress(file, this.customSettings.upload_target); - progress.setProgress(percent); - if (percent === 100) { - progress.setStatus("创建缩略图..."); - progress.toggleCancel(false, this); - } else { - progress.setStatus("上传中..."); - progress.toggleCancel(true, this); - } - } catch (ex) { - this.debug(ex); - } -} - -function uploadSuccess(file, serverData) { - try { - var progress = new FileProgress(file, this.customSettings.upload_target); - - if (serverData.substring(0, 7) === "FILEID:") { - addImage("swfupload.php?dopost=thumbnail&id=" + serverData.substring(7), serverData.substring(7)); - - progress.setStatus("获取缩略图..."); - progress.toggleCancel(false); - } else { - addImage("images/error.gif", 0); - progress.setStatus("有错误"); - progress.toggleCancel(false); - alert(serverData); - - } - } catch (ex) { - this.debug(ex); - } -} - -function uploadComplete(file) { - try { - /* I want the next upload to continue automatically so I'll call startUpload here */ - if (this.getStats().files_queued > 0) { - this.startUpload(); - } else { - var progress = new FileProgress(file, this.customSettings.upload_target); - progress.setComplete(); - progress.setStatus("所有图片上传完成..."); - progress.toggleCancel(false); - } - } catch (ex) { - this.debug(ex); - } -} - -function uploadError(file, errorCode, message) { - var imageName = "error.gif"; - var progress; - try { - switch (errorCode) { - case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED: - try { - progress = new FileProgress(file, this.customSettings.upload_target); - progress.setCancelled(); - progress.setStatus("Cancelled"); - progress.toggleCancel(false); - } - catch (ex1) { - this.debug(ex1); - } - break; - case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED: - try { - progress = new FileProgress(file, this.customSettings.upload_target); - progress.setCancelled(); - progress.setStatus("Stopped"); - progress.toggleCancel(true); - } - catch (ex2) { - this.debug(ex2); - } - case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED: - imageName = "uploadlimit.gif"; - break; - default: - alert(message); - break; - } - - addImage("images/" + imageName, 0); - - } catch (ex3) { - this.debug(ex3); - } - -} - -var albImg = 0; -function addImage(src, pid) { - var newImgDiv = document.createElement("div"); - var delstr = ''; - var iptwidth = 190; - albImg++; - if (pid != 0) { - albImg = 'ok' + pid; - delstr = '[删除]'; - } else { - albImg = 'err' + albImg; - } - newImgDiv.className = 'albCt'; - newImgDiv.id = 'albCt' + albImg; - document.getElementById("thumbnails").appendChild(newImgDiv); - newImgDiv.innerHTML = '' + delstr; - if (typeof arctype != 'undefined' && arctype == 'article') { - iptwidth = 100; - if (pid != 0) { - newImgDiv.innerHTML = '' + delstr; - } - } - newImgDiv.innerHTML += '
注释:
'; -} - - -/* ****************************************** - * FileProgress Object - * Control object for displaying file info - * ****************************************** */ - -function FileProgress(file, targetID) { - this.fileProgressID = "divFileProgress"; - - this.fileProgressWrapper = document.getElementById(this.fileProgressID); - if (!this.fileProgressWrapper) { - this.fileProgressWrapper = document.createElement("div"); - this.fileProgressWrapper.className = "progressWrapper"; - this.fileProgressWrapper.id = this.fileProgressID; - - this.fileProgressElement = document.createElement("div"); - this.fileProgressElement.className = "progressContainer"; - - var progressCancel = document.createElement("a"); - progressCancel.className = "progressCancel"; - progressCancel.href = "#"; - progressCancel.style.visibility = "hidden"; - progressCancel.appendChild(document.createTextNode(" ")); - - var progressText = document.createElement("div"); - progressText.className = "progressName"; - progressText.appendChild(document.createTextNode(file.name)); - - var progressBar = document.createElement("div"); - progressBar.className = "progressBarInProgress"; - - var progressStatus = document.createElement("div"); - progressStatus.className = "progressBarStatus"; - progressStatus.innerHTML = " "; - - this.fileProgressElement.appendChild(progressCancel); - this.fileProgressElement.appendChild(progressText); - this.fileProgressElement.appendChild(progressStatus); - this.fileProgressElement.appendChild(progressBar); - - this.fileProgressWrapper.appendChild(this.fileProgressElement); - - document.getElementById(targetID).appendChild(this.fileProgressWrapper); - - } else { - this.fileProgressElement = this.fileProgressWrapper.firstChild; - this.fileProgressElement.childNodes[1].firstChild.nodeValue = file.name; - } - - this.height = this.fileProgressWrapper.offsetHeight; - -} -FileProgress.prototype.setProgress = function (percentage) { - this.fileProgressElement.className = "progressContainer blue"; - this.fileProgressElement.childNodes[3].className = "progressBarInProgress"; - this.fileProgressElement.childNodes[3].style.width = percentage + "%"; -}; -FileProgress.prototype.setComplete = function () { - this.fileProgressElement.className = "progressContainer green"; - this.fileProgressElement.childNodes[3].className = "progressBarComplete"; - this.fileProgressElement.childNodes[3].style.width = ""; - -}; -FileProgress.prototype.setError = function () { - this.fileProgressElement.className = "progressContainer red"; - this.fileProgressElement.childNodes[3].className = "progressBarError"; - this.fileProgressElement.childNodes[3].style.width = ""; - -}; -FileProgress.prototype.setCancelled = function () { - this.fileProgressElement.className = "progressContainer"; - this.fileProgressElement.childNodes[3].className = "progressBarError"; - this.fileProgressElement.childNodes[3].style.width = ""; - -}; -FileProgress.prototype.setStatus = function (status) { - this.fileProgressElement.childNodes[2].innerHTML = status; -}; - -FileProgress.prototype.toggleCancel = function (show, swfuploadInstance) { - this.fileProgressElement.childNodes[0].style.visibility = show ? "visible" : "hidden"; - if (swfuploadInstance) { - var fileID = this.fileProgressID; - this.fileProgressElement.childNodes[0].onclick = function () { - swfuploadInstance.cancelUpload(fileID); - return false; - }; - } -}; +/** + * + * @version $Id: handlers.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + +//---事件句并------------------------------ +function fileQueueError(file, errorCode, message) { + try { + var imageName = "error.gif"; + var errorName = ""; + if (errorCode === SWFUpload.errorCode_QUEUE_LIMIT_EXCEEDED) { + errorName = "您添加的文件超过了限制"; + } + + if (errorName !== "") { + alert(errorName); + return; + } + + switch (errorCode) { + case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: + imageName = "zerobyte.gif"; + break; + case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT: + imageName = "toobig.gif"; + break; + case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE: + case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE: + default: + alert(message); + break; + } + addImage("images/" + imageName, 0); + } catch (ex) { + this.debug(ex); + } + +} + +function fileDialogComplete(numFilesSelected, numFilesQueued) { + try { + if (numFilesQueued > 0) { + this.startUpload(); + } + } catch (ex) { + this.debug(ex); + } +} + +function uploadProgress(file, bytesLoaded) { + try { + var percent = Math.ceil((bytesLoaded / file.size) * 100); + var progress = new FileProgress(file, this.customSettings.upload_target); + progress.setProgress(percent); + if (percent === 100) { + progress.setStatus("创建缩略图..."); + progress.toggleCancel(false, this); + } else { + progress.setStatus("上传中..."); + progress.toggleCancel(true, this); + } + } catch (ex) { + this.debug(ex); + } +} + +function uploadSuccess(file, serverData) { + try { + var progress = new FileProgress(file, this.customSettings.upload_target); + + if (serverData.substring(0, 7) === "FILEID:") { + addImage("swfupload.php?dopost=thumbnail&id=" + serverData.substring(7), serverData.substring(7)); + + progress.setStatus("获取缩略图..."); + progress.toggleCancel(false); + } else { + addImage("images/error.gif", 0); + progress.setStatus("有错误"); + progress.toggleCancel(false); + alert(serverData); + + } + } catch (ex) { + this.debug(ex); + } +} + +function uploadComplete(file) { + try { + /* I want the next upload to continue automatically so I'll call startUpload here */ + if (this.getStats().files_queued > 0) { + this.startUpload(); + } else { + var progress = new FileProgress(file, this.customSettings.upload_target); + progress.setComplete(); + progress.setStatus("所有图片上传完成..."); + progress.toggleCancel(false); + } + } catch (ex) { + this.debug(ex); + } +} + +function uploadError(file, errorCode, message) { + var imageName = "error.gif"; + var progress; + try { + switch (errorCode) { + case SWFUpload.UPLOAD_ERROR.FILE_CANCELLED: + try { + progress = new FileProgress(file, this.customSettings.upload_target); + progress.setCancelled(); + progress.setStatus("Cancelled"); + progress.toggleCancel(false); + } + catch (ex1) { + this.debug(ex1); + } + break; + case SWFUpload.UPLOAD_ERROR.UPLOAD_STOPPED: + try { + progress = new FileProgress(file, this.customSettings.upload_target); + progress.setCancelled(); + progress.setStatus("Stopped"); + progress.toggleCancel(true); + } + catch (ex2) { + this.debug(ex2); + } + case SWFUpload.UPLOAD_ERROR.UPLOAD_LIMIT_EXCEEDED: + imageName = "uploadlimit.gif"; + break; + default: + alert(message); + break; + } + + addImage("images/" + imageName, 0); + + } catch (ex3) { + this.debug(ex3); + } + +} + +var albImg = 0; +function addImage(src, pid) { + var newImgDiv = document.createElement("div"); + var delstr = ''; + var iptwidth = 190; + albImg++; + if (pid != 0) { + albImg = 'ok' + pid; + delstr = '[删除]'; + } else { + albImg = 'err' + albImg; + } + newImgDiv.className = 'albCt'; + newImgDiv.id = 'albCt' + albImg; + document.getElementById("thumbnails").appendChild(newImgDiv); + newImgDiv.innerHTML = '' + delstr; + if (typeof arctype != 'undefined' && arctype == 'article') { + iptwidth = 100; + if (pid != 0) { + newImgDiv.innerHTML = '' + delstr; + } + } + newImgDiv.innerHTML += '
注释:
'; +} + + +/* ****************************************** + * FileProgress Object + * Control object for displaying file info + * ****************************************** */ + +function FileProgress(file, targetID) { + this.fileProgressID = "divFileProgress"; + + this.fileProgressWrapper = document.getElementById(this.fileProgressID); + if (!this.fileProgressWrapper) { + this.fileProgressWrapper = document.createElement("div"); + this.fileProgressWrapper.className = "progressWrapper"; + this.fileProgressWrapper.id = this.fileProgressID; + + this.fileProgressElement = document.createElement("div"); + this.fileProgressElement.className = "progressContainer"; + + var progressCancel = document.createElement("a"); + progressCancel.className = "progressCancel"; + progressCancel.href = "#"; + progressCancel.style.visibility = "hidden"; + progressCancel.appendChild(document.createTextNode(" ")); + + var progressText = document.createElement("div"); + progressText.className = "progressName"; + progressText.appendChild(document.createTextNode(file.name)); + + var progressBar = document.createElement("div"); + progressBar.className = "progressBarInProgress"; + + var progressStatus = document.createElement("div"); + progressStatus.className = "progressBarStatus"; + progressStatus.innerHTML = " "; + + this.fileProgressElement.appendChild(progressCancel); + this.fileProgressElement.appendChild(progressText); + this.fileProgressElement.appendChild(progressStatus); + this.fileProgressElement.appendChild(progressBar); + + this.fileProgressWrapper.appendChild(this.fileProgressElement); + + document.getElementById(targetID).appendChild(this.fileProgressWrapper); + + } else { + this.fileProgressElement = this.fileProgressWrapper.firstChild; + this.fileProgressElement.childNodes[1].firstChild.nodeValue = file.name; + } + + this.height = this.fileProgressWrapper.offsetHeight; + +} +FileProgress.prototype.setProgress = function (percentage) { + this.fileProgressElement.className = "progressContainer blue"; + this.fileProgressElement.childNodes[3].className = "progressBarInProgress"; + this.fileProgressElement.childNodes[3].style.width = percentage + "%"; +}; +FileProgress.prototype.setComplete = function () { + this.fileProgressElement.className = "progressContainer green"; + this.fileProgressElement.childNodes[3].className = "progressBarComplete"; + this.fileProgressElement.childNodes[3].style.width = ""; + +}; +FileProgress.prototype.setError = function () { + this.fileProgressElement.className = "progressContainer red"; + this.fileProgressElement.childNodes[3].className = "progressBarError"; + this.fileProgressElement.childNodes[3].style.width = ""; + +}; +FileProgress.prototype.setCancelled = function () { + this.fileProgressElement.className = "progressContainer"; + this.fileProgressElement.childNodes[3].className = "progressBarError"; + this.fileProgressElement.childNodes[3].style.width = ""; + +}; +FileProgress.prototype.setStatus = function (status) { + this.fileProgressElement.childNodes[2].innerHTML = status; +}; + +FileProgress.prototype.toggleCancel = function (show, swfuploadInstance) { + this.fileProgressElement.childNodes[0].style.visibility = show ? "visible" : "hidden"; + if (swfuploadInstance) { + var fileID = this.fileProgressID; + this.fileProgressElement.childNodes[0].onclick = function () { + swfuploadInstance.cancelUpload(fileID); + return false; + }; + } +}; diff --git a/src/dede/js/ieemu.js b/src/admin/js/ieemu.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/ieemu.js rename to src/admin/js/ieemu.js index d2ff457f..7c616d01 --- a/src/dede/js/ieemu.js +++ b/src/admin/js/ieemu.js @@ -1,286 +1,286 @@ -/** - * - * @version $Id: ieemu.js 1 22:28 2010年7月20日Z tianya $ - * @package DedeBIZ.Administrator - * @copyright Copyright (c) 2021, DedeBIZ.COM - * @license https://www.dedebiz.com/license - * @link https://www.dedebiz.com - */ - -var ie = document.all != null; -var moz = !ie && document.getElementById != null && document.layers == null; - -/* - * Extends the event object with srcElement, cancelBubble, returnValue, - * fromElement and toElement - */ -function extendEventObject() { - Event.prototype.__defineSetter__("returnValue", function (b) { - if (!b) this.preventDefault(); - }); - - Event.prototype.__defineSetter__("cancelBubble", function (b) { - if (b) this.stopPropagation(); - }); - - Event.prototype.__defineGetter__("srcElement", function () { - var node = this.target; - while (node.nodeType != 1) node = node.parentNode; - return node; - }); - - Event.prototype.__defineGetter__("fromElement", function () { - var node; - if (this.type == "mouseover") - node = this.relatedTarget; - else if (this.type == "mouseout") - node = this.target; - if (!node) return; - while (node.nodeType != 1) node = node.parentNode; - return node; - }); - - Event.prototype.__defineGetter__("toElement", function () { - var node; - if (this.type == "mouseout") - node = this.relatedTarget; - else if (this.type == "mouseover") - node = this.target; - if (!node) return; - while (node.nodeType != 1) node = node.parentNode; - return node; - }); - - Event.prototype.__defineGetter__("offsetX", function () { - return this.layerX; - }); - Event.prototype.__defineGetter__("offsetY", function () { - return this.layerY; - }); -} - -/* - * Emulates element.attachEvent as well as detachEvent - */ -function emulateAttachEvent() { - HTMLDocument.prototype.attachEvent = - HTMLElement.prototype.attachEvent = function (sType, fHandler) { - var shortTypeName = sType.replace(/on/, ""); - fHandler._ieEmuEventHandler = function (e) { - window.event = e; - return fHandler(); - }; - this.addEventListener(shortTypeName, fHandler._ieEmuEventHandler, false); - }; - - HTMLDocument.prototype.detachEvent = - HTMLElement.prototype.detachEvent = function (sType, fHandler) { - var shortTypeName = sType.replace(/on/, ""); - if (typeof fHandler._ieEmuEventHandler == "function") - this.removeEventListener(shortTypeName, fHandler._ieEmuEventHandler, false); - else - this.removeEventListener(shortTypeName, fHandler, true); - }; -} - -/* - * This function binds the event object passed along in an - * event to window.event - */ -function emulateEventHandlers(eventNames) { - for (var i = 0; i < eventNames.length; i++) { - document.addEventListener(eventNames[i], function (e) { - window.event = e; - }, true); // using capture - } -} - -/* - * Simple emulation of document.all - * this one is far from complete. Be cautious - */ - -function emulateAllModel() { - var allGetter = function () { - var a = this.getElementsByTagName("*"); - var node = this; - a.tags = function (sTagName) { - return node.getElementsByTagName(sTagName); - }; - return a; - }; - HTMLDocument.prototype.__defineGetter__("all", allGetter); - HTMLElement.prototype.__defineGetter__("all", allGetter); -} - -function extendElementModel() { - HTMLElement.prototype.__defineGetter__("parentElement", function () { - if (this.parentNode == this.ownerDocument) return null; - return this.parentNode; - }); - - HTMLElement.prototype.__defineGetter__("children", function () { - var tmp = []; - var j = 0; - var n; - for (var i = 0; i < this.childNodes.length; i++) { - n = this.childNodes[i]; - if (n.nodeType == 1) { - tmp[j++] = n; - if (n.name) { // named children - if (!tmp[n.name]) - tmp[n.name] = []; - tmp[n.name][tmp[n.name].length] = n; - } - if (n.id) // child with id - tmp[n.id] = n - } - } - return tmp; - }); - - HTMLElement.prototype.contains = function (oEl) { - if (oEl == this) return true; - if (oEl == null) return false; - return this.contains(oEl.parentNode); - }; -} - -/* - -document.defaultView.getComputedStyle(el1,
null).getPropertyValue('top'); - -*/ -function emulateCurrentStyle(properties) { - HTMLElement.prototype.__defineGetter__("currentStyle", function () { - var cs = {}; - var el = this; - for (var i = 0; i < properties.length; i++) { - //cs.__defineGetter__(properties[i], function () { - // window.status = "i: " + i ; - // return document.defaultView.getComputedStyle(el, null).getPropertyValue(properties[i]); - //}); - cs.__defineGetter__(properties[i], encapsulateObjects(el, properties[i])); - } - return cs; - }); -} -// used internally for emualteCurrentStyle -function encapsulateObjects(el, sProperty) { - return function () { - return document.defaultView.getComputedStyle(el, null).getPropertyValue(sProperty); - }; -} - -function emulateHTMLModel() { - - // This function is used to generate a html string for the text properties/methods - // It replaces '\n' with " as well as fixes consecutive white spaces - // It also repalaces some special characters - function convertTextToHTML(s) { - s = s.replace(/\&/g, "&").replace(//g, ">").replace(/\n/g, "
"); - while (/\s\s/.test(s)) - s = s.replace(/\s\s/, "  "); - return s.replace(/\s/g, " "); - } - - HTMLElement.prototype.insertAdjacentHTML = function (sWhere, sHTML) { - var df; // : DocumentFragment - var r = this.ownerDocument.createRange(); - - switch (String(sWhere).toLowerCase()) { - case "beforebegin": - r.setStartBefore(this); - df = r.createContextualFragment(sHTML); - this.parentNode.insertBefore(df, this); - break; - - case "afterbegin": - r.selectNodeContents(this); - r.collapse(true); - df = r.createContextualFragment(sHTML); - this.insertBefore(df, this.firstChild); - break; - - case "beforeend": - r.selectNodeContents(this); - r.collapse(false); - df = r.createContextualFragment(sHTML); - this.appendChild(df); - break; - - case "afterend": - r.setStartAfter(this); - df = r.createContextualFragment(sHTML); - this.parentNode.insertBefore(df, this.nextSibling); - break; - } - }; - - HTMLElement.prototype.__defineSetter__("outerHTML", function (sHTML) { - var r = this.ownerDocument.createRange(); - r.setStartBefore(this); - var df = r.createContextualFragment(sHTML); - this.parentNode.replaceChild(df, this); - - return sHTML; - }); - - HTMLElement.prototype.__defineGetter__("canHaveChildren", function () { - switch (this.tagName) { - case "AREA": - case "BASE": - case "BASEFONT": - case "COL": - case "FRAME": - case "HR": - case "IMG": - case "BR": - case "INPUT": - case "ISINDEX": - case "LINK": - case "META": - case "PARAM": - return false; - } - return true; - }); - - HTMLElement.prototype.__defineGetter__("outerHTML", function () { - var attr, attrs = this.attributes; - var str = "<" + this.tagName; - for (var i = 0; i < attrs.length; i++) { - attr = attrs[i]; - if (attr.specified) - str += " " + attr.name + '="' + attr.value + '"'; - } - if (!this.canHaveChildren) - return str + ">"; - - return str + ">" + this.innerHTML + ""; - }); - - - HTMLElement.prototype.__defineSetter__("innerText", function (sText) { - this.innerHTML = convertTextToHTML(sText); - return sText; - }); - - var tmpGet; - HTMLElement.prototype.__defineGetter__("innerText", tmpGet = function () { - var r = this.ownerDocument.createRange(); - r.selectNodeContents(this); - return r.toString(); - }); - - HTMLElement.prototype.__defineSetter__("outerText", function (sText) { - this.outerHTML = convertTextToHTML(sText); - return sText; - }); - HTMLElement.prototype.__defineGetter__("outerText", tmpGet); - - HTMLElement.prototype.insertAdjacentText = function (sWhere, sText) { - this.insertAdjacentHTML(sWhere, convertTextToHTML(sText)); - }; - +/** + * + * @version $Id: ieemu.js 1 22:28 2010年7月20日Z tianya $ + * @package DedeBIZ.Administrator + * @copyright Copyright (c) 2022, DedeBIZ.COM + * @license https://www.dedebiz.com/license + * @link https://www.dedebiz.com + */ + +var ie = document.all != null; +var moz = !ie && document.getElementById != null && document.layers == null; + +/* + * Extends the event object with srcElement, cancelBubble, returnValue, + * fromElement and toElement + */ +function extendEventObject() { + Event.prototype.__defineSetter__("returnValue", function (b) { + if (!b) this.preventDefault(); + }); + + Event.prototype.__defineSetter__("cancelBubble", function (b) { + if (b) this.stopPropagation(); + }); + + Event.prototype.__defineGetter__("srcElement", function () { + var node = this.target; + while (node.nodeType != 1) node = node.parentNode; + return node; + }); + + Event.prototype.__defineGetter__("fromElement", function () { + var node; + if (this.type == "mouseover") + node = this.relatedTarget; + else if (this.type == "mouseout") + node = this.target; + if (!node) return; + while (node.nodeType != 1) node = node.parentNode; + return node; + }); + + Event.prototype.__defineGetter__("toElement", function () { + var node; + if (this.type == "mouseout") + node = this.relatedTarget; + else if (this.type == "mouseover") + node = this.target; + if (!node) return; + while (node.nodeType != 1) node = node.parentNode; + return node; + }); + + Event.prototype.__defineGetter__("offsetX", function () { + return this.layerX; + }); + Event.prototype.__defineGetter__("offsetY", function () { + return this.layerY; + }); +} + +/* + * Emulates element.attachEvent as well as detachEvent + */ +function emulateAttachEvent() { + HTMLDocument.prototype.attachEvent = + HTMLElement.prototype.attachEvent = function (sType, fHandler) { + var shortTypeName = sType.replace(/on/, ""); + fHandler._ieEmuEventHandler = function (e) { + window.event = e; + return fHandler(); + }; + this.addEventListener(shortTypeName, fHandler._ieEmuEventHandler, false); + }; + + HTMLDocument.prototype.detachEvent = + HTMLElement.prototype.detachEvent = function (sType, fHandler) { + var shortTypeName = sType.replace(/on/, ""); + if (typeof fHandler._ieEmuEventHandler == "function") + this.removeEventListener(shortTypeName, fHandler._ieEmuEventHandler, false); + else + this.removeEventListener(shortTypeName, fHandler, true); + }; +} + +/* + * This function binds the event object passed along in an + * event to window.event + */ +function emulateEventHandlers(eventNames) { + for (var i = 0; i < eventNames.length; i++) { + document.addEventListener(eventNames[i], function (e) { + window.event = e; + }, true); // using capture + } +} + +/* + * Simple emulation of document.all + * this one is far from complete. Be cautious + */ + +function emulateAllModel() { + var allGetter = function () { + var a = this.getElementsByTagName("*"); + var node = this; + a.tags = function (sTagName) { + return node.getElementsByTagName(sTagName); + }; + return a; + }; + HTMLDocument.prototype.__defineGetter__("all", allGetter); + HTMLElement.prototype.__defineGetter__("all", allGetter); +} + +function extendElementModel() { + HTMLElement.prototype.__defineGetter__("parentElement", function () { + if (this.parentNode == this.ownerDocument) return null; + return this.parentNode; + }); + + HTMLElement.prototype.__defineGetter__("children", function () { + var tmp = []; + var j = 0; + var n; + for (var i = 0; i < this.childNodes.length; i++) { + n = this.childNodes[i]; + if (n.nodeType == 1) { + tmp[j++] = n; + if (n.name) { // named children + if (!tmp[n.name]) + tmp[n.name] = []; + tmp[n.name][tmp[n.name].length] = n; + } + if (n.id) // child with id + tmp[n.id] = n + } + } + return tmp; + }); + + HTMLElement.prototype.contains = function (oEl) { + if (oEl == this) return true; + if (oEl == null) return false; + return this.contains(oEl.parentNode); + }; +} + +/* + +document.defaultView.getComputedStyle(el1,
null).getPropertyValue('top'); + +*/ +function emulateCurrentStyle(properties) { + HTMLElement.prototype.__defineGetter__("currentStyle", function () { + var cs = {}; + var el = this; + for (var i = 0; i < properties.length; i++) { + //cs.__defineGetter__(properties[i], function () { + // window.status = "i: " + i ; + // return document.defaultView.getComputedStyle(el, null).getPropertyValue(properties[i]); + //}); + cs.__defineGetter__(properties[i], encapsulateObjects(el, properties[i])); + } + return cs; + }); +} +// used internally for emualteCurrentStyle +function encapsulateObjects(el, sProperty) { + return function () { + return document.defaultView.getComputedStyle(el, null).getPropertyValue(sProperty); + }; +} + +function emulateHTMLModel() { + + // This function is used to generate a html string for the text properties/methods + // It replaces '\n' with " as well as fixes consecutive white spaces + // It also repalaces some special characters + function convertTextToHTML(s) { + s = s.replace(/\&/g, "&").replace(//g, ">").replace(/\n/g, "
"); + while (/\s\s/.test(s)) + s = s.replace(/\s\s/, "  "); + return s.replace(/\s/g, " "); + } + + HTMLElement.prototype.insertAdjacentHTML = function (sWhere, sHTML) { + var df; // : DocumentFragment + var r = this.ownerDocument.createRange(); + + switch (String(sWhere).toLowerCase()) { + case "beforebegin": + r.setStartBefore(this); + df = r.createContextualFragment(sHTML); + this.parentNode.insertBefore(df, this); + break; + + case "afterbegin": + r.selectNodeContents(this); + r.collapse(true); + df = r.createContextualFragment(sHTML); + this.insertBefore(df, this.firstChild); + break; + + case "beforeend": + r.selectNodeContents(this); + r.collapse(false); + df = r.createContextualFragment(sHTML); + this.appendChild(df); + break; + + case "afterend": + r.setStartAfter(this); + df = r.createContextualFragment(sHTML); + this.parentNode.insertBefore(df, this.nextSibling); + break; + } + }; + + HTMLElement.prototype.__defineSetter__("outerHTML", function (sHTML) { + var r = this.ownerDocument.createRange(); + r.setStartBefore(this); + var df = r.createContextualFragment(sHTML); + this.parentNode.replaceChild(df, this); + + return sHTML; + }); + + HTMLElement.prototype.__defineGetter__("canHaveChildren", function () { + switch (this.tagName) { + case "AREA": + case "BASE": + case "BASEFONT": + case "COL": + case "FRAME": + case "HR": + case "IMG": + case "BR": + case "INPUT": + case "ISINDEX": + case "LINK": + case "META": + case "PARAM": + return false; + } + return true; + }); + + HTMLElement.prototype.__defineGetter__("outerHTML", function () { + var attr, attrs = this.attributes; + var str = "<" + this.tagName; + for (var i = 0; i < attrs.length; i++) { + attr = attrs[i]; + if (attr.specified) + str += " " + attr.name + '="' + attr.value + '"'; + } + if (!this.canHaveChildren) + return str + ">"; + + return str + ">" + this.innerHTML + ""; + }); + + + HTMLElement.prototype.__defineSetter__("innerText", function (sText) { + this.innerHTML = convertTextToHTML(sText); + return sText; + }); + + var tmpGet; + HTMLElement.prototype.__defineGetter__("innerText", tmpGet = function () { + var r = this.ownerDocument.createRange(); + r.selectNodeContents(this); + return r.toString(); + }); + + HTMLElement.prototype.__defineSetter__("outerText", function (sText) { + this.outerHTML = convertTextToHTML(sText); + return sText; + }); + HTMLElement.prototype.__defineGetter__("outerText", tmpGet); + + HTMLElement.prototype.insertAdjacentText = function (sWhere, sText) { + this.insertAdjacentHTML(sWhere, convertTextToHTML(sText)); + }; + } \ No newline at end of file diff --git a/src/dede/js/indexbody.js b/src/admin/js/indexbody.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/indexbody.js rename to src/admin/js/indexbody.js index 697339c1..9e0d5086 --- a/src/dede/js/indexbody.js +++ b/src/admin/js/indexbody.js @@ -1,26 +1,26 @@ -function AddNew() -{ - $DE('addTab').style.display = 'block'; -} - -function CloseTab(tb) -{ - $DE(tb).style.display = 'none'; -} - -function ListAll(){ - $DE('editTab').style.display = 'block'; - var myajax = new DedeAjax($DE('editTabBody')); - myajax.SendGet('index_body.php?dopost=editshow'); -} - -function ShowWaitDiv(){ - $DE('loaddiv').style.display = 'block'; - return true; -} - -window.onload = function() -{ - var myajax = new DedeAjax($DE('listCount')); - myajax.SendGet('index_body.php?dopost=getRightSide'); -}; +function AddNew() +{ + $DE('addTab').style.display = 'block'; +} + +function CloseTab(tb) +{ + $DE(tb).style.display = 'none'; +} + +function ListAll(){ + $DE('editTab').style.display = 'block'; + var myajax = new DedeAjax($DE('editTabBody')); + myajax.SendGet('index_body.php?dopost=editshow'); +} + +function ShowWaitDiv(){ + $DE('loaddiv').style.display = 'block'; + return true; +} + +window.onload = function() +{ + var myajax = new DedeAjax($DE('listCount')); + myajax.SendGet('index_body.php?dopost=getRightSide'); +}; diff --git a/src/dede/js/jquery.json-2.2.min.js b/src/admin/js/jquery.json-2.2.min.js old mode 100755 new mode 100644 similarity index 100% rename from src/dede/js/jquery.json-2.2.min.js rename to src/admin/js/jquery.json-2.2.min.js diff --git a/src/dede/js/key.js b/src/admin/js/key.js old mode 100755 new mode 100644 similarity index 95% rename from src/dede/js/key.js rename to src/admin/js/key.js index 0abc9a73..63db3479 --- a/src/dede/js/key.js +++ b/src/admin/js/key.js @@ -1,76 +1,76 @@ -function selAll() -{ - var celements = document.getElementsByName('aids[]'); - for(i=0;i0) - { - if(obj.style.display == 'block' || obj.style.display =='') - obj.style.display = 'none'; - else - obj.style.display = 'block'; - return true; - } - //正常设置cookie - var ckstr = getCookie('menuitems'); - var ckstrs = null; - var okstr =''; - var ischange = false; - if(ckstr==null) ckstr = ''; - ckstrs = ckstr.split(','); - objname = objname.replace('items',''); - if(obj.style.display == 'block' || obj.style.display =='') - { - obj.style.display = 'none'; - for(var i=0; i < ckstrs.length; i++) - { - if(ckstrs[i]=='') continue; - if(ckstrs[i]==objname){ ischange = true; } - else okstr += (okstr=='' ? ckstrs[i] : ','+ckstrs[i] ); - } - if(ischange) setCookie('menuitems',okstr,7); - objsun.className = 'bitem2'; - } - else - { - obj.style.display = 'block'; - ischange = true; - for(var i=0; i < ckstrs.length; i++) - { - if(ckstrs[i]==objname) { ischange = false; break; } - } - if(ischange) - { - ckstr = (ckstr==null ? objname : ckstr+','+objname); - setCookie('menuitems',ckstr,7); - } - objsun.className = 'bitem'; - } -} -//读写cookie函数 -function getCookie(c_name) -{ - if (document.cookie.length > 0) - { - c_start = document.cookie.indexOf(c_name + "=") - if (c_start != -1) - { - c_start = c_start + c_name.length + 1; - c_end = document.cookie.indexOf(";",c_start); - if (c_end == -1) - { - c_end = document.cookie.length; - } - return unescape(document.cookie.substring(c_start,c_end)); - } - } - return null -} -function setCookie(c_name,value,expiredays) -{ - var exdate = new Date(); - exdate.setDate(exdate.getDate() + expiredays); - document.cookie = c_name + "=" +escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString()); //使设置的有效时间正确。增加toGMTString() -} -//检查以前用户展开的菜单项 -var totalitem = 12; -function CheckOpenMenu() -{ - //setCookie('menuitems',''); - var ckstr = getCookie('menuitems'); - var curitem = ''; - var curobj = null; - - //cross_obj = document.getElementById("staticbuttons"); - //setInterval("initializeIT()",20); - - if(ckstr==null) - { - ckstr='1_1,2_1,3_1'; - setCookie('menuitems',ckstr,7); - } - ckstr = ','+ckstr+','; - for(i=0;i 0 && curobj != null) - { - curobj.style.display = 'block'; - } - else - { - if(curobj != null) curobj.style.display = 'none'; - } - } -} - -var curitem = 1; -function ShowMainMenu(n) -{ - var curLink = $DE('link'+curitem); - var targetLink = $DE('link'+n); - var curCt = $DE('ct'+curitem); - var targetCt = $DE('ct'+n); - if(curitem==n) return false; - if(targetCt.innerHTML!='') - { - curCt.style.display = 'none'; - targetCt.style.display = 'block'; - curLink.className = 'mm'; - targetLink.className = 'mmac'; - curitem = n; - } - else - { - var myajax = new DedeAjax(targetCt); - myajax.SendGet2("index_menu_load.php?openitem="+n); - if(targetCt.innerHTML!='') - { - curCt.style.display = 'none'; - targetCt.style.display = 'block'; - curLink.className = 'mm'; - targetLink.className = 'mmac'; - curitem = n; - } - DedeXHTTP = null; - } - // bindClick(); -} - + +function showHide(objname) +{ + //只对主菜单设置cookie + var obj = document.getElementById(objname); + var objsun = document.getElementById('sun'+objname); + if(objname.indexOf('_1')<0 || objname.indexOf('_10')>0) + { + if(obj.style.display == 'block' || obj.style.display =='') + obj.style.display = 'none'; + else + obj.style.display = 'block'; + return true; + } + //正常设置cookie + var ckstr = getCookie('menuitems'); + var ckstrs = null; + var okstr =''; + var ischange = false; + if(ckstr==null) ckstr = ''; + ckstrs = ckstr.split(','); + objname = objname.replace('items',''); + if(obj.style.display == 'block' || obj.style.display =='') + { + obj.style.display = 'none'; + for(var i=0; i < ckstrs.length; i++) + { + if(ckstrs[i]=='') continue; + if(ckstrs[i]==objname){ ischange = true; } + else okstr += (okstr=='' ? ckstrs[i] : ','+ckstrs[i] ); + } + if(ischange) setCookie('menuitems',okstr,7); + objsun.className = 'bitem2'; + } else { + obj.style.display = 'block'; + ischange = true; + for(var i=0; i < ckstrs.length; i++) + { + if(ckstrs[i]==objname) { ischange = false; break; } + } + if(ischange) + { + ckstr = (ckstr==null ? objname : ckstr+','+objname); + setCookie('menuitems',ckstr,7); + } + objsun.className = 'bitem'; + } +} +//读写cookie函数 +function getCookie(c_name) +{ + if (document.cookie.length > 0) + { + c_start = document.cookie.indexOf(c_name + "=") + if (c_start != -1) + { + c_start = c_start + c_name.length + 1; + c_end = document.cookie.indexOf(";",c_start); + if (c_end == -1) + { + c_end = document.cookie.length; + } + return unescape(document.cookie.substring(c_start,c_end)); + } + } + return null +} +function setCookie(c_name,value,expiredays) +{ + var exdate = new Date(); + exdate.setDate(exdate.getDate() + expiredays); + document.cookie = c_name + "=" +escape(value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString()); //使设置的有效时间正确。增加toGMTString() +} +//检查以前用户展开的菜单项 +var totalitem = 12; +function CheckOpenMenu() +{ + //setCookie('menuitems',''); + var ckstr = getCookie('menuitems'); + var curitem = ''; + var curobj = null; + + //cross_obj = document.getElementById("staticbuttons"); + //setInterval("initializeIT()",20); + + if(ckstr==null) + { + ckstr='1_1,2_1,3_1'; + setCookie('menuitems',ckstr,7); + } + ckstr = ','+ckstr+','; + for(i=0;i 0 && curobj != null) + { + curobj.style.display = 'block'; + } + else + { + if(curobj != null) curobj.style.display = 'none'; + } + } +} + +var curitem = 1; +function ShowMainMenu(n) +{ + var curLink = $DE('link'+curitem); + var targetLink = $DE('link'+n); + var curCt = $DE('ct'+curitem); + var targetCt = $DE('ct'+n); + if(curitem==n) return false; + if(targetCt.innerHTML!='') + { + curCt.style.display = 'none'; + targetCt.style.display = 'block'; + curLink.className = 'mm'; + targetLink.className = 'mmac'; + curitem = n; + } else { + var myajax = new DedeAjax(targetCt); + myajax.SendGet2("index_menu_load.php?openitem="+n); + if(targetCt.innerHTML!='') + { + curCt.style.display = 'none'; + targetCt.style.display = 'block'; + curLink.className = 'mm'; + targetLink.className = 'mmac'; + curitem = n; + } + DedeXHTTP = null; + } + // bindClick(); +} + diff --git a/src/dede/js/list.js b/src/admin/js/list.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/list.js rename to src/admin/js/list.js index 146778e3..5bf75a0f --- a/src/dede/js/list.js +++ b/src/admin/js/list.js @@ -1,158 +1,158 @@ -if(moz) { - extendEventObject(); - extendElementModel(); - emulateAttachEvent(); -} -function viewArc(aid){ - if(aid==0) aid = getOneItem(); - window.open("archives_do.php?aid="+aid+"&dopost=viewArchives"); -} -function kwArc(aid){ - var qstr=getCheckboxItem(); - if(aid==0) aid = getOneItem(); - if(qstr=='') - { - ShowMsg('必须选择一个或多个文档'); - return; - } - location="archives_do.php?aid="+aid+"&dopost=makekw&qstr="+qstr; -} -function editArc(aid){ - if(aid==0) aid = getOneItem(); - location="archives_do.php?aid="+aid+"&dopost=editArchives"; -} -function updateArc(aid){ - var qstr=getCheckboxItem(); - if(aid==0) aid = getOneItem(); - location="archives_do.php?aid="+aid+"&dopost=makeArchives&qstr="+qstr; -} -function checkArc(aid){ - var qstr=getCheckboxItem(); - if(aid==0) aid = getOneItem(); - location="archives_do.php?aid="+aid+"&dopost=checkArchives&qstr="+qstr; -} -function moveArc(e, obj, cid){ - var qstr=getCheckboxItem(); - if(qstr=='') - { - ShowMsg('必须选择一个或多个文档'); - return; - } - LoadQuickDiv(e, 'archives_do.php?dopost=moveArchives&qstr='+qstr+'&channelid='+cid+'&rnd='+Math.random(), 'moveArchives', '450px', '180px'); - ChangeFullDiv('show'); -} -function adArc(aid){ - var qstr=getCheckboxItem(); - if(aid==0) aid = getOneItem(); - location="archives_do.php?aid="+aid+"&dopost=commendArchives&qstr="+qstr; -} - -function cAtts(jname, e, obj) -{ - var qstr=getCheckboxItem(); - var screeheight = document.body.clientHeight + 20; - if(qstr=='') - { - ShowMsg('必须选择一个或多个文档'); - return; - } - LoadQuickDiv(e, 'archives_do.php?dopost=attsDlg&qstr='+qstr+'&dojob='+jname+'&rnd='+Math.random(), 'attsDlg', '450px', '160px'); - ChangeFullDiv('show', screeheight); -} - -function delArc(aid){ - var qstr=getCheckboxItem(); - if(aid==0) aid = getOneItem(); - location="archives_do.php?qstr="+qstr+"&aid="+aid+"&dopost=delArchives"; -} - -function QuickEdit(aid, e, obj) -{ - LoadQuickDiv(e, 'archives_do.php?dopost=quickEdit&aid='+aid+'&rnd='+Math.random(), 'quickEdit', 'auto', '300px'); - ChangeFullDiv('show'); -} -//上下文菜单 -function ShowMenu(evt,obj,aid,atitle) -{ - var popupoptions - popupoptions = [ - new ContextItem("浏览文档",function(){ viewArc(aid); }), - new ContextItem("编辑属性",function(){ QuickEdit(aid, evt, obj); }), - new ContextItem("编辑文档",function(){ editArc(aid); }), - new ContextSeperator(), - new ContextItem("更新HTML",function(){ updateArc(aid); }), - new ContextItem("审核文档",function(){ checkArc(aid); }), - new ContextItem("推荐文档",function(){ adArc(aid); }), - new ContextItem("删除文档",function(){ delArc(aid); }), - new ContextSeperator(), - new ContextItem("复制(C)",function(){ copyToClipboard(atitle); }), - new ContextItem("重载页面",function(){ location.reload(); }), - new ContextSeperator(), - new ContextItem("全部选择",function(){ selAll(); }), - new ContextItem("取消选择",function(){ noSelAll(); }), - new ContextSeperator(), - new ContextItem("关闭菜单",function(){}) - ] - ContextMenu.display(evt,popupoptions); - //location="catalog_main.php"; -} -//获得选中文件的文件名 -function getCheckboxItem() -{ - var allSel=""; - if(document.form2.arcID.value) return document.form2.arcID.value; - for(i=0;i= 1) return 'IE'; - else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; - else return "OT"; -} - -function $Obj(objname) { - return document.getElementById(objname); -} - -//旧的颜色选择框(已经过期) -/* -function ShowColor() -{ - var fcolor=showModalDialog("images/color.htm?ok",false,"dialogWidth:106px;dialogHeight:110px;status:0;dialogTop:"+(+120)+";dialogLeft:"+(+120)); - if(fcolor!=null && fcolor!="undefined") document.form1.color.value = fcolor; -} -*/ - -function ColorSel(c, oname) { - var tobj = $Obj(oname); - if (!tobj) tobj = eval('document.form1.' + oname); - if (!tobj) { - $Obj('colordlg').style.display = 'none'; - return false; - } - else { - tobj.value = c; - $Obj('colordlg').style.display = 'none'; - return true; - } -} - -function ShowColor(e, o) { - LoadNewDiv(e, 'images/colornew.htm', 'colordlg'); -} - -function ShowHide(objname) { - var obj = $Obj(objname); - if (obj.style.display != "none") obj.style.display = "none"; - else obj.style.display = "inline-block"; -} - -function ShowHideT(objname) { - var obj = $Obj(objname); - if (obj.style.display != "none") obj.style.display = "none"; - else obj.style.display = ($Nav() == "IE" ? "inline-block" : "table"); -} - -function ShowObj(objname) { - var obj = $Obj(objname); - if (obj == null) return false; - obj.style.display = ($Nav() == "IE" ? "inline-block" : "table"); -} - -function ShowObjRow(objname) { - var obj = $Obj(objname); - obj.style.display = ($Nav() == "IE" ? "inline-block" : "table-row"); -} - -function AddTypeid2() { - ShowObjRow('typeid2tr'); - //$Obj('typeid2ct').innerHTML = $Obj('typeidct').innerHTML.replace('typeid','typeid2'); -} - -function HideObj(objname) { - var obj = $Obj(objname); - if (obj == null) return false; - obj.style.display = "none"; -} - -function ShowItem1() { - ShowObj('needset'); ShowObj('head1'); HideObj('head2'); HideObj('adset'); ShowObj('votehead'); -} - -function ShowItem2() { - ShowObj('head2'); ShowObj('adset'); HideObj('voteset'); HideObj('head1'); HideObj('needset'); HideObj('votehead'); -} - -function SeePic(img, f) { - if (f.value != '') img.src = f.value; -} - -function SeePicNew(f, imgdid, frname, hpos, acname) { - var newobj = null; - if (f.value == '') return; - vImg = $Obj(imgdid); - picnameObj = document.getElementById('picname'); - nFrame = $Nav() == 'IE' ? eval('document.frames.' + frname) : $Obj(frname); - nForm = f.form; - //修改form的action等参数 - if (nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmit); - else nForm.removeEventListener("submit", checkSubmit, false); - nForm.action = 'archives_do.php'; - nForm.target = frname; - nForm.dopost.value = 'uploadLitpic'; - nForm.submit(); - - picnameObj.value = ''; - newobj = $Obj('uploadwait'); - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = 'uploadwait'; - newobj.style.position = 'absolute'; - newobj.className = 'uploadwait'; - newobj.style.width = 120; - newobj.style.height = 20; - newobj.style.top = hpos; - newobj.style.left = 100; - newobj.style.display = 'block'; - document.body.appendChild(newobj); - newobj.innerHTML = '上传中...'; - } - newobj.style.display = 'block'; - //提交后还原form的action等参数 - nForm.action = acname; - nForm.dopost.value = 'save'; - nForm.target = ''; - nForm.litpic.disabled = true; - //nForm.litpic = null; - //if(nForm.attachEvent) nForm.attachEvent("onsubmit", checkSubmit); - //else nForm.addEventListener("submit", checkSubmit, true); -} - -function SelectFlash() { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 300; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - window.open("./dialog/select_media.php?f=form1.flashurl", "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=" + posLeft + ", top=" + posTop); -} - -function SelectMedia(fname) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - window.open("./dialog/select_media.php?f=" + fname, "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=" + posLeft + ", top=" + posTop); -} - -function SelectSoft(fname) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY - 50; } - else { var posLeft = 100; var posTop = 100; } - window.open("./dialog/select_soft.php?f=" + fname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); -} - -function SelectImage(fname, stype, imgsel) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - if (!fname) fname = 'form1.picname'; - if (imgsel) imgsel = '&noeditor=yes'; - if (!stype) stype = ''; - window.open("./dialog/select_images.php?f=" + fname + "&noeditor=yes&imgstick=" + stype + imgsel, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=650,height=400,left=" + posLeft + ", top=" + posTop); -} - -function imageCut(fname) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - if (!fname) fname = 'picname'; - file = document.getElementById(fname).value; - if (file == '') { - alert('请先选择网站内已上传的图片'); - return false; - } - window.open("imagecut.php?f=" + fname + "&file=" + file, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + posLeft + ", top=" + posTop); -} - -function SelectImageN(fname, stype, vname) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } - else { var posLeft = 100; var posTop = 100; } - if (!fname) fname = 'form1.picname'; - if (!stype) stype = ''; - window.open("./dialog/select_images.php?f=" + fname + "&imgstick=" + stype + "&v=" + vname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); -} - -function SelectKeywords(f) { - if ($Nav() == 'IE') { var posLeft = window.event.clientX - 350; var posTop = window.event.clientY - 200; } - else { var posLeft = 100; var posTop = 100; } - window.open("article_keywords_select.php?f=" + f, "popUpkwWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=450,left=" + posLeft + ", top=" + posTop); -} - -function InitPage() { - var selsource = $Obj('selsource'); - var selwriter = $Obj('selwriter'); - var titlechange = $Obj('title'); - var colorbt = $Obj('color'); - if (selsource) { selsource.onmousedown = function (e) { SelectSource(e); } } - if (selwriter) { selwriter.onmousedown = function (e) { SelectWriter(e); } } - if (titlechange) { titlechange.onchange = function (e) { TestHasTitle(e); } } -} - -function OpenMyWin(surl) { - window.open(surl, "popUpMyWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=200, top=100"); -} - -function OpenMyWinCoOne(surl) { - window.open(surl, "popUpMyWin2", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=450,left=100,top=50"); -} - -function PutSource(str) { - var osource = $Obj('source'); - if (osource) osource.value = str; - $Obj('mysource').style.display = 'none'; - ChangeFullDiv('hide'); -} - -function PutWriter(str) { - var owriter = $Obj('writer'); - if (owriter) owriter.value = str; - $Obj('mywriter').style.display = 'none'; - ChangeFullDiv('hide'); -} - -// 增加选择投票内容 -function PutVote(str) { - var ovote = $Obj('voteid'); - if (ovote) { - ovote.value = str; - tb_remove(false); - } else { - parent.document.form1.voteid.value = str; - tb_remove(true); - } - -} - -function ClearDivCt(objname) { - if (!$Obj(objname)) return; - $Obj(objname).innerHTML = ''; - $Obj(objname).style.display = 'none'; - ChangeFullDiv("hide"); -} - -function ChangeFullDiv(showhide, screenheigt) { - var newobj = $Obj('fullpagediv'); - if (showhide == 'show') { - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = 'fullpagediv'; - newobj.style.position = 'absolute'; - newobj.className = 'fullpagediv'; - newobj.style.height = document.body.clientHeight + 50 + 'px'; - document.body.appendChild(newobj); - } - else { - newobj.style.display = 'block'; - } - } - else { - if (newobj) newobj.style.display = 'none'; - } -} - -function SelectSource(e) { - LoadNewDiv(e, 'article_select_sw.php?t=source&k=8&rnd=' + Math.random(), 'mysource'); - //ChangeFullDiv('show'); -} - -function SelectWriter(e) { - LoadNewDiv(e, 'article_select_sw.php?t=writer&k=8&rnd=' + Math.random(), 'mywriter'); - //ChangeFullDiv('show'); -} - -function LoadNewDiv(e, surl, oname) { - var pxStr = ''; - if ($Nav() == 'IE') { - var posLeft = window.event.clientX - 20; - var posTop = window.event.clientY - 30; - // IE下scrollTop的兼容性问题 - var scrollTop = document.documentElement.scrollTop || window.pageYOffset; - if (typeof (scrollTop) == 'undefined') scrollTop = document.body.scrollTop; - posTop += scrollTop; - - } - else { - var posLeft = e.pageX - 20; - var posTop = e.pageY - 30; - pxStr = 'px'; - } - posLeft = posLeft - 100; - var newobj = $Obj(oname); - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = oname; - newobj.style.position = 'absolute'; - newobj.className = oname; - newobj.className += ' dlgws'; - newobj.style.top = posTop + pxStr; - newobj.style.left = posLeft + pxStr; - document.body.appendChild(newobj); - } - else { - newobj.style.display = "block"; - } - if (newobj.innerHTML.length < 10) { - var myajax = new DedeAjax(newobj); - myajax.SendGet(surl); - } -} - -function TestHasTitle(e) { - LoadNewDiv2(e, 'article_test_title.php?t=' + $Obj('title').value, 'mytitle', "dlgTesttitle"); -} - -function LoadNewDiv2(e, surl, oname, dlgcls) { - var posLeft = 300; - var posTop = 50; - var newobj = $Obj(oname); - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = oname; - newobj.style.position = 'absolute'; - newobj.className = dlgcls; - newobj.style.top = posTop; - newobj.style.left = posLeft; - newobj.style.display = 'none'; - document.body.appendChild(newobj); - } - newobj.innerHTML = ''; - var myajax = new DedeAjax(newobj); - myajax.SendGet2(surl); - if (newobj.innerHTML == '') newobj.style.display = 'none'; - else newobj.style.display = 'block'; - jQuery(newobj).css('top', '50px').css('left', '300px'); - DedeXHTTP = null; -} - -function ShowUrlTr() { - var jumpTest = $Obj('flagsj'); - var jtr = $Obj('redirecturltr'); - var jf = $Obj('redirecturl'); - if (jumpTest.checked) jtr.style.display = "block"; - else { - jf.value = ''; - jtr.style.display = "none"; - } -} - -function ShowUrlTrEdit() { - ShowUrlTr(); - var jumpTest = $Obj('isjump'); - var rurl = $Obj('redirecturl'); - if (!jumpTest.checked) rurl.value = ""; -} - -function CkRemote() { - document.getElementById('picname').value = ''; -} - -//载入指定宽高的AJAX窗体 -function LoadQuickDiv(e, surl, oname, w, h) { - if ($Nav() == 'IE') { - if (window.event) { - var posLeft = window.event.clientX - 20; - var posTop = window.event.clientY - 30; - } - else { - var posLeft = e.clientX - 20; - var posTop = e.clientY + 30; - } - } - else { - var posLeft = e.pageX - 20; - var posTop = e.pageY - 30; - } - posTop += MyGetScrollTop(); - posLeft = posLeft - 400; - //固定位置的高度 - if (fixupPos) { - posLeft = posTop = 50; - } - var newobj = $Obj(oname); - if (!newobj) { - newobj = document.createElement("DIV"); - newobj.id = oname; - newobj.style.position = 'absolute'; - newobj.className = 'pubdlg'; - newobj.style.width = w; - newobj.style.height = h + 30; - document.body.appendChild(newobj); - } - if (posTop > 500) posTop = 500; - if (posLeft < 50) posLeft = 50; - newobj.style.minWidth = "450px"; - newobj.style.top = posTop + "px"; - newobj.style.left = posLeft + "px"; - newobj.innerHTML = '
Loading...
'; - newobj.style.display = 'block'; - var myajax = new DedeAjax(newobj); - myajax.SendGet(surl); - fixupPos = false; -} - -function MyGetScrollTop() { - return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; -} - -//通用事件获取接口 -function getEvent() { - if ($Nav() == 'IE') return window.event; - func = getEvent.caller; - while (func != null) { - var arg0 = func.arguments[0]; - if (arg0) { - if ((arg0.constructor == Event || arg0.constructor == MouseEvent) - || (typeof (arg0) == "object" && arg0.preventDefault && arg0.stopPropagation)) { - return arg0; - } - } - func = func.caller; - } - return null; -} - -//模拟ondrop事件相关代码 -/*---------------------------- -leftLeaning = 300; -如果对象内容固定,用onmousedown=DropStart去除底下的DropStop -newobj.ondblclick = DropStart; -newobj.onmousemove = DropMove; -newobj.onmousedown = DropStop; -----------------------------*/ -function DropStart() { - this.style.cursor = 'move'; -} - -function DropStop() { - this.style.cursor = 'default'; -} - -function DropMove() { - if (this.style.cursor != 'move') return; - var event = getEvent(); - if ($Nav() == 'IE') { - var posLeft = event.clientX - 20; - var posTop = event.clientY - 30; - posTop += document.body.scrollTop; - } - else { - var posLeft = event.pageX - 20; - var posTop = event.pageY - 30; - } - this.style.top = posTop; - this.style.left = posLeft - leftLeaning; -} - -//对指定的元素绑定move事件 -/*----------------------------- -onmousemove="DropMoveHand('divname', 225);" -onmousedown="DropStartHand();" -onmouseup="DropStopHand();" ------------------------------*/ -function DropStartHand() { - canMove = (canMove ? false : true); -} -function DropStopHand() { - canMove = false; -} -function DropMoveHand(objid, mleftLeaning) { - var event = getEvent(); - var obj = $Obj(objid); - if (!canMove) return; - - if ($Nav() == 'IE') { - var posLeft = event.clientX - 20; - var posTop = event.clientY - 20; - posTop += window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; - } - else { - var posLeft = event.pageX - 20; - var posTop = event.pageY - 20; - } - obj.style.top = posTop + "px"; - obj.style.left = posLeft - mleftLeaning + "px"; -} - -//复制内容到剪切板 -function copyToClipboard(txt) { - if (txt == null || txt == '') { - alert("没有选择任何内容!"); - return; - } - if (window.clipboardData) { - window.clipboardData.clearData(); - window.clipboardData.setData("Text", txt); - } - else if (navigator.userAgent.indexOf('Opera') != -1) { - window.location = txt; - } - else { - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - } catch (e) { - alert("被浏览器拒绝\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'"); - } - var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); - if (!clip) return; - - var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); - if (!trans) return; - - trans.addDataFlavor('text/unicode'); - var str = new Object(); - var len = new Object(); - var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); - var copytext = txt; - str.data = copytext; - trans.setTransferData("text/unicode", str, copytext.length * 2); - var clipid = Components.interfaces.nsIClipboard; - if (!clip) return false; - clip.setData(trans, null, clipid.kGlobalClipboard); - } -} - -function getSelTxt() { - var g, r; - if (document.all) { - g = document.selection.createRange().text; - } else { - g = document.getSelection(); - } - return g; -} - -//显示栏目Map地图 -function ShowCatMap(e, obj, cid, targetId, oldvalue) { - fixupPos = true; - LoadQuickDiv(e, 'archives_do.php?dopost=getCatMap&targetid=' + targetId + '&channelid=' + cid + '&oldvalue=' + oldvalue + '&rnd=' + Math.random(), 'getCatMap', '700px', '500px'); - ChangeFullDiv('show'); -} - -function getSelCat(targetId) { - var selBox = document.quicksel.seltypeid; - var targetObj = $Obj(targetId); - var selvalue = ''; - //副栏目(多选) - if (targetId == 'typeid2') { - var j = 0; - for (var i = 0; i < selBox.length; i++) { - if (selBox[i].checked) { - j++; - if (j == 10) break; - selvalue += (selvalue == '' ? selBox[i].value : ',' + selBox[i].value); - } - } - if (targetObj) targetObj.value = selvalue; - } - //主栏目(单选) - else { - if (selBox) { - for (var i = 0; i < selBox.length; i++) { - if (selBox[i].checked) selvalue = selBox[i].value; - } - } - if (selvalue == '') { - alert('您没有选中任何项目'); - return; - } - if (targetObj) { - for (var j = 0; j < targetObj.length; j++) { - op = targetObj.options[j]; - if (op.value == selvalue) op.selected = true; - } - } - } - HideObj("getCatMap"); - ChangeFullDiv("hide"); -} - -function getElementLeft(element) { - var actualLeft = element.offsetLeft; - var current = element.offsetParent; - - while (current !== null) { - actualLeft += current.offsetLeft; - current = current.offsetParent; - } - - return actualLeft; -} - -function getElementTop(element) { - var actualTop = element.offsetTop; - var current = element.offsetParent; - - while (current !== null) { - actualTop += current.offsetTop; - current = current.offsetParent; - } - - return actualTop; -} - -// Copyright 2020 The MuEMS Authors. All rights reserved. -// license that can be found in the LICENSE file. - -// -----msgbox------------------------------------- - -// 生成一个随机ID -function guid() { - function S4() { - return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); - } - return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4()); -} - -// 显示对话框,动态创建modal并显示,退出自动销毁窗体 -// args是以下结构体 -/* -args = { - title : "", // 标题,默认是MuEMS - footer : "", // 底部按钮,可以自定义按钮 - noClose : false, // 是否显示右上角关闭按钮,默认显示 -} -*/ -// 函数会返回一个modalID,通过这个ID可自已定义一些方法 -// 这里用到了一个展开语法 -// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax -function ShowMsg(content, ...args) { - title = "DedeBIZ信息提示"; - if (typeof content == "undefined") content = ""; - modalID = guid(); - var footer = ``; - var noClose = false; - - if (args.length == 1) { - // 存在args参数 - if (typeof args[0].title !== 'undefined' && args[0].title != "") { - title = args[0].title; - } - if (typeof args[0].footer !== 'undefined' && args[0].footer != "") { - footer = args[0].footer; - } - if (typeof args[0].noClose !== 'undefined' && args[0].noClose == true) { - noClose = true; - } - } - - footer = footer.replace("~modalID~", modalID); - content = content.replace("~modalID~", modalID); - - var modal = ``; - $("body").append(modal) - $("#GKModal" + modalID).modal({ - backdrop: 'static', - show: true - }); - $("#GKModal" + modalID).on('hidden.bs.modal', function (e) { - $("#GKModal" + modalID).remove(); - }) - return modalID; -} - -// 隐藏并销毁modal -function CloseModal(modalID) { - $("#" + modalID).modal('hide'); - $("#" + modalID).on('hidden.bs.modal', function (e) { - if ($("#" + modalID).length > 0) { - $("#" + modalID).remove(); - } - }) -} - -// 获取缩略图 -var litpicImgSrc = ""; -var litpicImg = ""; -var currentCID = 0; -var mdlCropperID = ""; -var pubAt = 0; -var optCropper = { - preview: ".pv", - crop: function (e) { - $("#cropWidth").text(Math.round(e.detail.height)); - $("#cropHeight").text(Math.round(e.detail.width)); - var dataUrl = $(this).cropper("getCroppedCanvas") - .toDataURL(); - litpicImg = dataUrl; - $("#litPic").attr("src", litpicImg); - $("#litpic_b64").val(litpicImg); - }, - aspectRatio: 4 / 3, - // 拖动截取缩略图后,截取的缩略图更新到imageItems中 - cropend: function (data) { - // 这里的ID要单独取出来 - var dataUrl = $(this).cropper("getCroppedCanvas") - .toDataURL(); - litpicImg = dataUrl; - $("#litPic").attr("src", litpicImg); - $("#litpic_b64").val(litpicImg); - } -} - -var cropperAspectRatio = { - 0: 16 / 9, - 1: 4 / 3, - 2: 1 / 1, - 3: 2 / 3, - 4: NaN, -} - -function setAspectRatio(ar) { - var opts = optCropper; - opts.aspectRatio = cropperAspectRatio[ar]; - $("#cropImg" + mdlCropperID).cropper('destroy').cropper(opts); -} - -function useDefault(modalID) { - $("#litpic_b64").val(litpicImgSrc); - $("#litPic").attr("src", litpicImgSrc); - CloseModal('GKModal' + modalID); -} - -$(document).ready(function () { - - $("#btnClearAll").click(function (event) { - litpicImgSrc = ""; - litpicImg = ""; - $("#litpic_b64").val(litpicImg); - $("#litPic").attr("src", "../static/defaultpic.gif"); - }) - - // 添加图片 - $("#iptAddImages").change(function (event) { - var files = event.target.files; - for (var i = 0, f; f = files[i]; i++) { - // 如果不是图片忽略 - if (!f.type.match('image.*')) { - continue; - } - - // 将图片渲染到浏览器 - var reader = new FileReader(); - reader.onload = (function (theFile) { - return function (e) { - litpicImgSrc = e.target.result; - SetThumb(litpicImgSrc); - }; - })(f); - reader.readAsDataURL(f); - } - $("#iptAddImages").val(""); - }); - - // 截取缩略图 - function SetThumb(srcURL) { - var footer = - "

使用原图 确定

"; - var optButton = `

- - -

`; - mdlCropperID = ShowMsg( - '

宽度:px,高度:px

' + optButton + '
', { - footer: footer, - noClose: false, - title: 'DedeBIZ缩略图裁剪', - }); - - setTimeout(function () { - $("#cropImg" + mdlCropperID).cropper(optCropper); - }, 500); - } - - if ($.fn.daterangepicker) { - $('.datepicker').daterangepicker({ - "singleDatePicker": true, - "autoApply": true, - "showDropdowns": true, - "linkedCalendars": false, - "timePicker": true, - "timePicker24Hour": true, - "timePickerSeconds": true, - "showCustomRangeLabel": false, - "drops": "up", - ranges: { - '今日': [moment(), moment()], - '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], - '本月': [moment().startOf('month'), moment().startOf('month')], - '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').startOf('month')] - }, - "locale": { - format: 'YYYY-MM-DD HH:mm:ss', - applyLabel: '确定', - cancelLabel: '取消', - daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'], - monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', - '七月', '八月', '九月', '十月', '十一月', '十二月'], - firstDay: 1 - } - }, function (start) { - $(this).val(start.format("YYYY-MM-DD HH:mm:ss")); - }); - $('.datepicker').on('show.daterangepicker', function (ev, picker) { - if (picker.element.offset().top - $(window).scrollTop() + picker.container.outerHeight() > $(window).height()) { - picker.drops = 'up'; - } else { - picker.drops = 'down'; - } - picker.move(); - }) - } - - - +var fixupPos = false; +var canMove = false; +var leftLeaning = 0; +//异步上传缩略图相关变量 +var nForm = null; +var nFrame = null; +var picnameObj = null; +var vImg = null; + +function $Nav() { + if (window.navigator.userAgent.indexOf("MSIE") >= 1) return 'IE'; + else if (window.navigator.userAgent.indexOf("Firefox") >= 1) return 'FF'; + else return "OT"; +} + +function $Obj(objname) { + return document.getElementById(objname); +} + +//旧的颜色选择框(已经过期) +/* +function ShowColor() +{ + var fcolor=showModalDialog("images/color.htm?ok",false,"dialogWidth:106px;dialogHeight:110px;status:0;dialogTop:"+(+120)+";dialogLeft:"+(+120)); + if(fcolor!=null && fcolor!="undefined") document.form1.color.value = fcolor; +} +*/ + +function ColorSel(c, oname) { + var tobj = $Obj(oname); + if (!tobj) tobj = eval('document.form1.' + oname); + if (!tobj) { + $Obj('colordlg').style.display = 'none'; + return false; + } + else { + tobj.value = c; + $Obj('colordlg').style.display = 'none'; + return true; + } +} + +function ShowColor(e, o) { + LoadNewDiv(e, 'images/colornew.htm', 'colordlg'); +} + +function ShowHide(objname) { + var obj = $Obj(objname); + if (obj.style.display != "none") obj.style.display = "none"; + else obj.style.display = "inline-block"; +} + +function ShowHideT(objname) { + var obj = $Obj(objname); + if (obj.style.display != "none") obj.style.display = "none"; + else obj.style.display = ($Nav() == "IE" ? "inline-block" : "table"); +} + +function ShowObj(objname) { + var obj = $Obj(objname); + if (obj == null) return false; + obj.style.display = ($Nav() == "IE" ? "inline-block" : "table"); +} + +function ShowObjRow(objname) { + var obj = $Obj(objname); + obj.style.display = ($Nav() == "IE" ? "inline-block" : "table-row"); +} + +function AddTypeid2() { + ShowObjRow('typeid2tr'); + //$Obj('typeid2ct').innerHTML = $Obj('typeidct').innerHTML.replace('typeid','typeid2'); +} + +function HideObj(objname) { + var obj = $Obj(objname); + if (obj == null) return false; + obj.style.display = "none"; +} + +function ShowItem1() { + ShowObj('needset'); ShowObj('head1'); HideObj('head2'); HideObj('adset'); ShowObj('votehead'); +} + +function ShowItem2() { + ShowObj('head2'); ShowObj('adset'); HideObj('voteset'); HideObj('head1'); HideObj('needset'); HideObj('votehead'); +} + +function SeePic(img, f) { + if (f.value != '') img.src = f.value; +} + +function SeePicNew(f, imgdid, frname, hpos, acname) { + var newobj = null; + if (f.value == '') return; + vImg = $Obj(imgdid); + picnameObj = document.getElementById('picname'); + nFrame = $Nav() == 'IE' ? eval('document.frames.' + frname) : $Obj(frname); + nForm = f.form; + //修改form的action等参数 + if (nForm.detachEvent) nForm.detachEvent("onsubmit", checkSubmit); + else nForm.removeEventListener("submit", checkSubmit, false); + nForm.action = 'archives_do.php'; + nForm.target = frname; + nForm.dopost.value = 'uploadLitpic'; + nForm.submit(); + + picnameObj.value = ''; + newobj = $Obj('uploadwait'); + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = 'uploadwait'; + newobj.style.position = 'absolute'; + newobj.className = 'uploadwait'; + newobj.style.width = 120; + newobj.style.height = 20; + newobj.style.top = hpos; + newobj.style.left = 100; + newobj.style.display = 'block'; + document.body.appendChild(newobj); + newobj.innerHTML = '上传中...'; + } + newobj.style.display = 'block'; + //提交后还原form的action等参数 + nForm.action = acname; + nForm.dopost.value = 'save'; + nForm.target = ''; + nForm.litpic.disabled = true; + //nForm.litpic = null; + //if(nForm.attachEvent) nForm.attachEvent("onsubmit", checkSubmit); + //else nForm.addEventListener("submit", checkSubmit, true); +} + +function SelectFlash() { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 300; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + window.open("./dialog/select_media.php?f=form1.flashurl", "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=" + posLeft + ", top=" + posTop); +} + +function SelectMedia(fname) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + window.open("./dialog/select_media.php?f=" + fname, "popUpFlashWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=" + posLeft + ", top=" + posTop); +} + +function SelectSoft(fname) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 200; var posTop = window.event.clientY - 50; } + else { var posLeft = 100; var posTop = 100; } + window.open("./dialog/select_soft.php?f=" + fname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); +} + +function SelectImage(fname, stype, imgsel) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + if (!fname) fname = 'form1.picname'; + if (imgsel) imgsel = '&noeditor=yes'; + if (!stype) stype = ''; + window.open("./dialog/select_images.php?f=" + fname + "&noeditor=yes&imgstick=" + stype + imgsel, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=650,height=400,left=" + posLeft + ", top=" + posTop); +} + +function imageCut(fname) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + if (!fname) fname = 'picname'; + file = document.getElementById(fname).value; + if (file == '') { + alert('请先选择网站内已上传的图片'); + return false; + } + window.open("imagecut.php?f=" + fname + "&file=" + file, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + posLeft + ", top=" + posTop); +} + +function SelectImageN(fname, stype, vname) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 100; var posTop = window.event.clientY; } + else { var posLeft = 100; var posTop = 100; } + if (!fname) fname = 'form1.picname'; + if (!stype) stype = ''; + window.open("./dialog/select_images.php?f=" + fname + "&imgstick=" + stype + "&v=" + vname, "popUpImagesWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop); +} + +function SelectKeywords(f) { + if ($Nav() == 'IE') { var posLeft = window.event.clientX - 350; var posTop = window.event.clientY - 200; } + else { var posLeft = 100; var posTop = 100; } + window.open("article_keywords_select.php?f=" + f, "popUpkwWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=450,left=" + posLeft + ", top=" + posTop); +} + +function InitPage() { + var selsource = $Obj('selsource'); + var selwriter = $Obj('selwriter'); + var titlechange = $Obj('title'); + var colorbt = $Obj('color'); + if (selsource) { selsource.onmousedown = function (e) { SelectSource(e); } } + if (selwriter) { selwriter.onmousedown = function (e) { SelectWriter(e); } } + if (titlechange) { titlechange.onchange = function (e) { TestHasTitle(e); } } +} + +function OpenMyWin(surl) { + window.open(surl, "popUpMyWin", "scrollbars=yes,resizable=yes,statebar=no,width=500,height=350,left=200, top=100"); +} + +function OpenMyWinCoOne(surl) { + window.open(surl, "popUpMyWin2", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=450,left=100,top=50"); +} + +function PutSource(str) { + var osource = $Obj('source'); + if (osource) osource.value = str; + $Obj('mysource').style.display = 'none'; + ChangeFullDiv('hide'); +} + +function PutWriter(str) { + var owriter = $Obj('writer'); + if (owriter) owriter.value = str; + $Obj('mywriter').style.display = 'none'; + ChangeFullDiv('hide'); +} + +// 增加选择投票内容 +function PutVote(str) { + var ovote = $Obj('voteid'); + if (ovote) { + ovote.value = str; + tb_remove(false); + } else { + parent.document.form1.voteid.value = str; + tb_remove(true); + } + +} + +function ClearDivCt(objname) { + if (!$Obj(objname)) return; + $Obj(objname).innerHTML = ''; + $Obj(objname).style.display = 'none'; + ChangeFullDiv("hide"); +} + +function ChangeFullDiv(showhide, screenheigt) { + var newobj = $Obj('fullpagediv'); + if (showhide == 'show') { + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = 'fullpagediv'; + newobj.style.position = 'absolute'; + newobj.className = 'fullpagediv'; + newobj.style.height = document.body.clientHeight + 50 + 'px'; + document.body.appendChild(newobj); + } + else { + newobj.style.display = 'block'; + } + } + else { + if (newobj) newobj.style.display = 'none'; + } +} + +function SelectSource(e) { + LoadNewDiv(e, 'article_select_sw.php?t=source&k=8&rnd=' + Math.random(), 'mysource'); + //ChangeFullDiv('show'); +} + +function SelectWriter(e) { + LoadNewDiv(e, 'article_select_sw.php?t=writer&k=8&rnd=' + Math.random(), 'mywriter'); + //ChangeFullDiv('show'); +} + +function LoadNewDiv(e, surl, oname) { + var pxStr = ''; + if ($Nav() == 'IE') { + var posLeft = window.event.clientX - 20; + var posTop = window.event.clientY - 30; + // IE下scrollTop的兼容性问题 + var scrollTop = document.documentElement.scrollTop || window.pageYOffset; + if (typeof (scrollTop) == 'undefined') scrollTop = document.body.scrollTop; + posTop += scrollTop; + + } + else { + var posLeft = e.pageX - 20; + var posTop = e.pageY - 30; + pxStr = 'px'; + } + posLeft = posLeft - 100; + var newobj = $Obj(oname); + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = oname; + newobj.style.position = 'absolute'; + newobj.className = oname; + newobj.className += ' dlgws'; + newobj.style.top = posTop + pxStr; + newobj.style.left = posLeft + pxStr; + document.body.appendChild(newobj); + } + else { + newobj.style.display = "block"; + } + if (newobj.innerHTML.length < 10) { + var myajax = new DedeAjax(newobj); + myajax.SendGet(surl); + } +} + +function TestHasTitle(e) { + LoadNewDiv2(e, 'article_test_title.php?t=' + $Obj('title').value, 'mytitle', "dlgTesttitle"); +} + +function LoadNewDiv2(e, surl, oname, dlgcls) { + var posLeft = 300; + var posTop = 50; + var newobj = $Obj(oname); + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = oname; + newobj.style.position = 'absolute'; + newobj.className = dlgcls; + newobj.style.top = posTop; + newobj.style.left = posLeft; + newobj.style.display = 'none'; + document.body.appendChild(newobj); + } + newobj.innerHTML = ''; + var myajax = new DedeAjax(newobj); + myajax.SendGet2(surl); + if (newobj.innerHTML == '') newobj.style.display = 'none'; + else newobj.style.display = 'block'; + jQuery(newobj).css('top', '50px').css('left', '300px'); + DedeXHTTP = null; +} + +function ShowUrlTr() { + var jumpTest = $Obj('flagsj'); + var jtr = $Obj('redirecturltr'); + var jf = $Obj('redirecturl'); + if (jumpTest.checked) jtr.style.display = "block"; + else { + jf.value = ''; + jtr.style.display = "none"; + } +} + +function ShowUrlTrEdit() { + ShowUrlTr(); + var jumpTest = $Obj('isjump'); + var rurl = $Obj('redirecturl'); + if (!jumpTest.checked) rurl.value = ""; +} + +function CkRemote() { + document.getElementById('picname').value = ''; +} + +//载入指定宽高的AJAX窗体 +function LoadQuickDiv(e, surl, oname, w, h) { + if ($Nav() == 'IE') { + if (window.event) { + var posLeft = window.event.clientX - 20; + var posTop = window.event.clientY - 30; + } + else { + var posLeft = e.clientX - 20; + var posTop = e.clientY + 30; + } + } + else { + var posLeft = e.pageX - 20; + var posTop = e.pageY - 30; + } + posTop += MyGetScrollTop(); + posLeft = posLeft - 400; + //固定位置的高度 + if (fixupPos) { + posLeft = posTop = 50; + } + var newobj = $Obj(oname); + if (!newobj) { + newobj = document.createElement("DIV"); + newobj.id = oname; + newobj.style.position = 'absolute'; + newobj.className = 'pubdlg'; + newobj.style.width = w; + newobj.style.height = h + 30; + document.body.appendChild(newobj); + } + if (posTop > 500) posTop = 500; + if (posLeft < 50) posLeft = 50; + newobj.style.minWidth = "450px"; + newobj.style.top = posTop + "px"; + newobj.style.left = posLeft + "px"; + newobj.innerHTML = '
Loading...
'; + newobj.style.display = 'block'; + var myajax = new DedeAjax(newobj); + myajax.SendGet(surl); + fixupPos = false; +} + +function MyGetScrollTop() { + return window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0; +} + +//通用事件获取接口 +function getEvent() { + if ($Nav() == 'IE') return window.event; + func = getEvent.caller; + while (func != null) { + var arg0 = func.arguments[0]; + if (arg0) { + if ((arg0.constructor == Event || arg0.constructor == MouseEvent) + || (typeof (arg0) == "object" && arg0.preventDefault && arg0.stopPropagation)) { + return arg0; + } + } + func = func.caller; + } + return null; +} + +//模拟ondrop事件相关代码 +/*---------------------------- +leftLeaning = 300; +如果对象内容固定,用onmousedown=DropStart去除底下的DropStop +newobj.ondblclick = DropStart; +newobj.onmousemove = DropMove; +newobj.onmousedown = DropStop; +----------------------------*/ +function DropStart() { + this.style.cursor = 'move'; +} + +function DropStop() { + this.style.cursor = 'default'; +} + +function DropMove() { + if (this.style.cursor != 'move') return; + var event = getEvent(); + if ($Nav() == 'IE') { + var posLeft = event.clientX - 20; + var posTop = event.clientY - 30; + posTop += document.body.scrollTop; + } + else { + var posLeft = event.pageX - 20; + var posTop = event.pageY - 30; + } + this.style.top = posTop; + this.style.left = posLeft - leftLeaning; +} + +//对指定的元素绑定move事件 +/*----------------------------- +onmousemove="DropMoveHand('divname', 225);" +onmousedown="DropStartHand();" +onmouseup="DropStopHand();" +-----------------------------*/ +function DropStartHand() { + canMove = (canMove ? false : true); +} +function DropStopHand() { + canMove = false; +} +function DropMoveHand(objid, mleftLeaning) { + var event = getEvent(); + var obj = $Obj(objid); + if (!canMove) return; + + if ($Nav() == 'IE') { + var posLeft = event.clientX - 20; + var posTop = event.clientY - 20; + posTop += window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; + } + else { + var posLeft = event.pageX - 20; + var posTop = event.pageY - 20; + } + obj.style.top = posTop + "px"; + obj.style.left = posLeft - mleftLeaning + "px"; +} + +//复制内容到剪切板 +function copyToClipboard(txt) { + if (txt == null || txt == '') { + alert("没有选择任何内容!"); + return; + } + if (window.clipboardData) { + window.clipboardData.clearData(); + window.clipboardData.setData("Text", txt); + } + else if (navigator.userAgent.indexOf('Opera') != -1) { + window.location = txt; + } + else { + try { + netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); + } catch (e) { + alert("被浏览器拒绝\n请在浏览器地址栏输入'about:config'并回车\n然后将'signed.applets.codebase_principal_support'设置为'true'"); + } + var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); + if (!clip) return; + + var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable); + if (!trans) return; + + trans.addDataFlavor('text/unicode'); + var str = new Object(); + var len = new Object(); + var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); + var copytext = txt; + str.data = copytext; + trans.setTransferData("text/unicode", str, copytext.length * 2); + var clipid = Components.interfaces.nsIClipboard; + if (!clip) return false; + clip.setData(trans, null, clipid.kGlobalClipboard); + } +} + +function getSelTxt() { + var g, r; + if (document.all) { + g = document.selection.createRange().text; + } else { + g = document.getSelection(); + } + return g; +} + +//显示栏目Map地图 +function ShowCatMap(e, obj, cid, targetId, oldvalue) { + fixupPos = true; + LoadQuickDiv(e, 'archives_do.php?dopost=getCatMap&targetid=' + targetId + '&channelid=' + cid + '&oldvalue=' + oldvalue + '&rnd=' + Math.random(), 'getCatMap', '700px', '500px'); + ChangeFullDiv('show'); +} + +function getSelCat(targetId) { + var selBox = document.quicksel.seltypeid; + var targetObj = $Obj(targetId); + var selvalue = ''; + //副栏目(多选) + if (targetId == 'typeid2') { + var j = 0; + for (var i = 0; i < selBox.length; i++) { + if (selBox[i].checked) { + j++; + if (j == 10) break; + selvalue += (selvalue == '' ? selBox[i].value : ',' + selBox[i].value); + } + } + if (targetObj) targetObj.value = selvalue; + } + //主栏目(单选) + else { + if (selBox) { + for (var i = 0; i < selBox.length; i++) { + if (selBox[i].checked) selvalue = selBox[i].value; + } + } + if (selvalue == '') { + alert('您没有选中任何项目'); + return; + } + if (targetObj) { + for (var j = 0; j < targetObj.length; j++) { + op = targetObj.options[j]; + if (op.value == selvalue) op.selected = true; + } + } + } + HideObj("getCatMap"); + ChangeFullDiv("hide"); +} + +function getElementLeft(element) { + var actualLeft = element.offsetLeft; + var current = element.offsetParent; + + while (current !== null) { + actualLeft += current.offsetLeft; + current = current.offsetParent; + } + + return actualLeft; +} + +function getElementTop(element) { + var actualTop = element.offsetTop; + var current = element.offsetParent; + + while (current !== null) { + actualTop += current.offsetTop; + current = current.offsetParent; + } + + return actualTop; +} + +// Copyright 2020 The MuEMS Authors. All rights reserved. +// license that can be found in the LICENSE file. + +// -----msgbox------------------------------------- + +// 生成一个随机ID +function guid() { + function S4() { + return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); + } + return (S4() + S4() + "-" + S4() + "-" + S4() + "-" + S4() + "-" + S4() + S4() + S4()); +} + +// 显示对话框,动态创建modal并显示,退出自动销毁窗体 +// args是以下结构体 +/* +args = { + title : "", // 标题,默认是MuEMS + footer : "", // 底部按钮,可以自定义按钮 + noClose : false, // 是否显示右上角关闭按钮,默认显示 +} +*/ +// 函数会返回一个modalID,通过这个ID可自已定义一些方法 +// 这里用到了一个展开语法 +// https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Spread_syntax +function ShowMsg(content, ...args) { + title = "系统提示"; + if (typeof content == "undefined") content = ""; + modalID = guid(); + var footer = ``; + var noClose = false; + + if (args.length == 1) { + // 存在args参数 + if (typeof args[0].title !== 'undefined' && args[0].title != "") { + title = args[0].title; + } + if (typeof args[0].footer !== 'undefined' && args[0].footer != "") { + footer = args[0].footer; + } + if (typeof args[0].noClose !== 'undefined' && args[0].noClose == true) { + noClose = true; + } + } + + footer = footer.replace("~modalID~", modalID); + content = content.replace("~modalID~", modalID); + + var modal = ``; + $("body").append(modal) + $("#GKModal" + modalID).modal({ + backdrop: 'static', + show: true + }); + $("#GKModal" + modalID).on('hidden.bs.modal', function (e) { + $("#GKModal" + modalID).remove(); + }) + return modalID; +} + +// 隐藏并销毁modal +function CloseModal(modalID) { + $("#" + modalID).modal('hide'); + $("#" + modalID).on('hidden.bs.modal', function (e) { + if ($("#" + modalID).length > 0) { + $("#" + modalID).remove(); + } + }) +} + +// 获取缩略图 +var litpicImgSrc = ""; +var litpicImg = ""; +var currentCID = 0; +var mdlCropperID = ""; +var pubAt = 0; +var optCropper = { + preview: ".pv", + crop: function (e) { + $("#cropWidth").text(Math.round(e.detail.height)); + $("#cropHeight").text(Math.round(e.detail.width)); + var dataUrl = $(this).cropper("getCroppedCanvas") + .toDataURL(); + litpicImg = dataUrl; + $("#litPic").attr("src", litpicImg); + $("#litpic_b64").val(litpicImg); + }, + aspectRatio: 4 / 3, + // 拖动截取缩略图后,截取的缩略图更新到imageItems中 + cropend: function (data) { + // 这里的ID要单独取出来 + var dataUrl = $(this).cropper("getCroppedCanvas") + .toDataURL(); + litpicImg = dataUrl; + $("#litPic").attr("src", litpicImg); + $("#litpic_b64").val(litpicImg); + } +} + +var cropperAspectRatio = { + 0: 16 / 9, + 1: 4 / 3, + 2: 1 / 1, + 3: 2 / 3, + 4: NaN, +} + +function setAspectRatio(ar) { + var opts = optCropper; + opts.aspectRatio = cropperAspectRatio[ar]; + $("#cropImg" + mdlCropperID).cropper('destroy').cropper(opts); +} + +function useDefault(modalID) { + $("#litpic_b64").val(litpicImgSrc); + $("#litPic").attr("src", litpicImgSrc); + CloseModal('GKModal' + modalID); +} + +$(document).ready(function () { + + $("#btnClearAll").click(function (event) { + litpicImgSrc = ""; + litpicImg = ""; + $("#litpic_b64").val(litpicImg); + $("#litPic").attr("src", "../static/defaultpic.gif"); + }) + + // 添加图片 + $("#iptAddImages").change(function (event) { + var files = event.target.files; + for (var i = 0, f; f = files[i]; i++) { + // 如果不是图片忽略 + if (!f.type.match('image.*')) { + continue; + } + + // 将图片渲染到浏览器 + var reader = new FileReader(); + reader.onload = (function (theFile) { + return function (e) { + litpicImgSrc = e.target.result; + SetThumb(litpicImgSrc); + }; + })(f); + reader.readAsDataURL(f); + } + $("#iptAddImages").val(""); + }); + + // 截取缩略图 + function SetThumb(srcURL) { + var footer = + "

使用原图 确定

"; + var optButton = `

+ + +

`; + mdlCropperID = ShowMsg( + '

宽度:px,高度:px

' + optButton + '
', { + footer: footer, + noClose: false, + title: 'DedeBIZ缩略图裁剪', + }); + + setTimeout(function () { + $("#cropImg" + mdlCropperID).cropper(optCropper); + }, 500); + } + + if ($.fn.daterangepicker) { + $('.datepicker').daterangepicker({ + "singleDatePicker": true, + "autoApply": true, + "showDropdowns": true, + "linkedCalendars": false, + "timePicker": true, + "timePicker24Hour": true, + "timePickerSeconds": true, + "showCustomRangeLabel": false, + "drops": "up", + ranges: { + '今日': [moment(), moment()], + '昨日': [moment().subtract(1, 'days'), moment().subtract(1, 'days')], + '本月': [moment().startOf('month'), moment().startOf('month')], + '上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').startOf('month')] + }, + "locale": { + format: 'YYYY-MM-DD HH:mm:ss', + applyLabel: '确定', + cancelLabel: '取消', + daysOfWeek: ['日', '一', '二', '三', '四', '五', '六'], + monthNames: ['一月', '二月', '三月', '四月', '五月', '六月', + '七月', '八月', '九月', '十月', '十一月', '十二月'], + firstDay: 1 + } + }, function (start) { + $(this).val(start.format("YYYY-MM-DD HH:mm:ss")); + }); + $('.datepicker').on('show.daterangepicker', function (ev, picker) { + if (picker.element.offset().top - $(window).scrollTop() + picker.container.outerHeight() > $(window).height()) { + picker.drops = 'up'; + } else { + picker.drops = 'down'; + } + picker.move(); + }) + } + + + }) \ No newline at end of file diff --git a/src/dede/js/member.js b/src/admin/js/member.js old mode 100755 new mode 100644 similarity index 94% rename from src/dede/js/member.js rename to src/admin/js/member.js index 2a1c09b0..e96f2849 --- a/src/dede/js/member.js +++ b/src/admin/js/member.js @@ -1,71 +1,71 @@ -if(moz == null) -{ - var ie = document.all != null; - var moz = !ie && document.getElementById != null && document.layers == null; -} -if(moz) { - extendEventObject(); - extendElementModel(); - emulateAttachEvent(); -} - -function delArc(mid){ - var qstr=getCheckboxItem(); - if(mid==0) mid = getOneItem(); - location="member_do.php?id="+qstr+"&dopost=delmembers"; -} - -//获得选中文件的文件名 -function getCheckboxItem() -{ - var allSel=""; - if(document.form2.mid.value) return document.form2.mid.value; - for(i=0;i diff --git a/src/dede/js/mode/xml/test.js b/src/admin/js/mode/xml/test.js old mode 100755 new mode 100644 similarity index 100% rename from src/dede/js/mode/xml/test.js rename to src/admin/js/mode/xml/test.js diff --git a/src/dede/js/mode/xml/xml.js b/src/admin/js/mode/xml/xml.js old mode 100755 new mode 100644 similarity index 100% rename from src/dede/js/mode/xml/xml.js rename to src/admin/js/mode/xml/xml.js diff --git a/src/dede/js/tb-box.js b/src/admin/js/tb-box.js old mode 100755 new mode 100644 similarity index 96% rename from src/dede/js/tb-box.js rename to src/admin/js/tb-box.js index 3963ccd5..7957092a --- a/src/dede/js/tb-box.js +++ b/src/admin/js/tb-box.js @@ -1,290 +1,288 @@ -/*********************************************************** - * 使用iframe模拟ajax的窗体,本JS需要引用jquery框架 - * 为了支持拖动,需要同时引入jquery.ui.core以及ui.draggable.js - * 修改自 thickbox 源码 -************************************************************/ -var $ = jQuery; -var tb_pathToImage = "images/loadinglit.gif"; -var ref_parent = false; -var tb_frameid = 0; - -/** - * 对于指定了class为'thickbox'的超链接自动监听其超链接,其中可以指定 rel=(0|1) 属性决定点击关闭后是否刷新上级窗口 - * 如果不需要侦听超链接事件,可以禁用些初始化方法 - */ -$(document).ready(function() -{ - tb_init('a.thickbox, area.thickbox, input.thickbox'); - imgLoader = new Image(); - imgLoader.src = tb_pathToImage; -}); - -function tb_init(domChunk) -{ - $(domChunk).click(function(){ - var t = this.title || this.name || null; - var a = this.href || this.alt; - var g = this.rel || false; - tb_show(t, a, g); - this.blur(); - return false; - }); -} - -/** - * 弹窗警告窗口让用户确认操作 - * refParent 参数(0|1)决定点击关闭后是否刷新上级窗口 - */ -function tb_action(msg, gourl) -{ - msg += "
<<点错了  |  确定要操作>>"; - tb_showmsg(msg); -} - -/** - * 弹窗主函数 - * refParent 参数(0|1)决定点击关闭后是否刷新上级窗口 - */ -function tb_show(caption, url, refParent) -{ - ref_parent = refParent; - if (typeof document.body.style.maxHeight === "undefined") - { - $("body","html").css({height: "100%", width: "100%"}); - $("html").css("overflow","hidden"); - if (document.getElementById("TB_HideSelect") === null) { - $("body").append("
"); - $("#TB_overlay").click(tb_remove); - } - } - else - { - if(document.getElementById("TB_overlay") === null){ - $("body").append("
"); - $("#TB_overlay").click(tb_remove); - } - } - - if(tb_detectMacXFF()){ - $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); - }else{ - $("#TB_overlay").addClass("TB_overlayBG"); - } - - if(caption===null) caption="消息窗口"; - $("body").append("
"); - $('#TB_load').show(); - - var baseURL; - if(url.indexOf("?")!==-1){ - baseURL = url.substr(0, url.indexOf("?")); - }else{ - baseURL = url; - } - - var queryString = url.replace(/^[^\?]+\??/,''); - var params = tb_parseQuery( queryString ); - - TB_WIDTH = (params['width']*1) + 30 || 630; - TB_HEIGHT = (params['height']*1) + 40 || 420; - ajaxContentW = TB_WIDTH - 30; - ajaxContentH = TB_HEIGHT - 45; - - // either iframe or ajax window - if(url.indexOf('TB_iframe') != -1) - { - urlNoQuery = url.split('TB_'); - $("#TB_iframeContent").remove(); - tb_frameid++; - if(params['modal'] != "true"){ - $("#TB_window").append("
"+caption+"
"); - }else{ - $("#TB_overlay").unbind(); - $("#TB_window").append(""); - } - } - // not an iframe, ajax - else - { - if($("#TB_window").css("display") != "block"){ - if(params['modal'] != "true"){ - $("#TB_window").append("
"+caption+"
"); - }else{ - $("#TB_overlay").unbind(); - $("#TB_window").append("
"); - } - }else{ - $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; - $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; - $("#TB_ajaxContent")[0].scrollTop = 0; - $("#TB_ajaxWindowTitle").html(caption); - } - } - - $("#TB_closeWindowButton").click(tb_remove); - - if(url.indexOf('TB_inline') != -1) - { - $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); - $("#TB_window").unload(function () { - $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished - }); - tb_position(); - $("#TB_load").remove(); - $("#TB_window").css({display:"block"}); - } - else if(url.indexOf('TB_iframe') != -1) - { - tb_position(); - if($.browser.safari){//safari needs help because it will not fire iframe onload - $("#TB_load").remove(); - $("#TB_window").css({display:"block"}); - } - } - else - { - $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method - tb_position(); - $("#TB_load").remove(); - tb_init("#TB_ajaxContent a.thickbox"); - $("#TB_window").css({display:"block"}); - }); - } - $("#TB_window").draggable(); //支持窗口拖动 - //alert( $("#TB_window").get(0).innerHTML ); - if(!params['modal']) - { - document.onkeyup = function(e){ kc = (e == null ? event.keyCode : e.which); if(kc == 27){ tb_remove(); } }; - } -} - -/** - * 弹窗信息框 - */ -function tb_showmsg(msg, caption, talign, ww, wh) -{ - //默认参数 - if(!caption || caption=="") caption="消息窗口"; - if(!talign) talign = "center"; - if(!ww) ww = "350px"; - if(!wh) wh = "180px"; - - if (typeof document.body.style.maxHeight === "undefined") { - $("body","html").css({height: "100%", width: "100%"}); - $("html").css("overflow","hidden"); - } - if(document.getElementById("TB_overlay") === null){ - $("body").append("
"); - $("#TB_overlay").click(tb_remove); - } - - if(tb_detectMacXFF()){ - $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); - }else{ - $("#TB_overlay").addClass("TB_overlayBG"); - } - - - $("#TB_window").append("
"+caption+"
"+ msg +"
"); - - $("#TB_closeWindowButton").click(tb_remove); - - $("#TB_window").css({display:"block"}); - topx = ($.browser.msie)? 150 : 50; - $("#TB_window").css({top: topx + "px"}); - $("#TB_window")[0].style.width = ww; - $("#TB_window")[0].style.height = wh; - $("#TB_window").draggable(); //支持窗口拖动 - - document.onkeyup = function(e){ kc = (e == null ? event.keyCode : e.which); if(kc == 27){ tb_remove(); } }; -} - -//helper functions below -function tb_showIframe() -{ - $("#TB_load").remove(); - $("#TB_window").css({display:"block"}); -} - -// 增加父级框架关闭内容的方法 -function tb_remove() -{ - var isparent = $("#TB_imageOff",parent.document).length; - if(isparent ) - { - $("#TB_imageOff",parent.document).unbind("click"); - $("#TB_closeWindowButton",parent.document).unbind("click"); - $("#TB_window",parent.document).fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect',parent.document).trigger("unload").unbind().remove();}); - $("#TB_load",parent.document).remove(); - //if IE 6 - if (typeof parent.document.body.style.maxHeight == "undefined") - { - $("body","html",parent.document).css({height: "auto", width: "auto"}); - $("html",parent.document).css("overflow",""); - } - document.onkeydown = ""; - document.onkeyup = ""; - if( ref_parent ) location.reload(); - return; - } else { - $("#TB_imageOff").unbind("click"); - $("#TB_closeWindowButton").unbind("click"); - $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); - $("#TB_load").remove(); - //if IE 6 - if (typeof document.body.style.maxHeight == "undefined") - { - $("body","html").css({height: "auto", width: "auto"}); - $("html").css("overflow",""); - } - document.onkeydown = ""; - document.onkeyup = ""; - if( ref_parent ) location.reload(); - return; - } -} - -function tb_position() -{ - $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); - // take away IE6 - if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) - { - $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); - } -} - -function tb_parseQuery ( query ) -{ - var Params = {}; - if ( ! query ) {return Params;}// return empty object - var Pairs = query.split(/[;&]/); - for ( var i = 0; i < Pairs.length; i++ ) { - var KeyVal = Pairs[i].split('='); - if ( ! KeyVal || KeyVal.length != 2 ) {continue;} - var key = unescape( KeyVal[0] ); - var val = unescape( KeyVal[1] ); - val = val.replace(/\+/g, ' '); - Params[key] = val; - } - return Params; -} - -function tb_getPageSize() -{ - var de = document.documentElement; - var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; - var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; - arrayPageSize = [w,h]; - return arrayPageSize; -} - -function tb_detectMacXFF() -{ - var userAgent = navigator.userAgent.toLowerCase(); - if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { - return true; - } -} - - +/*********************************************************** + * 使用iframe模拟ajax的窗体,本JS需要引用jquery框架 + * 为了支持拖动,需要同时引入jquery.ui.core以及ui.draggable.js + * 修改自 thickbox 源码 +************************************************************/ +var $ = jQuery; +var tb_pathToImage = "images/loadinglit.gif"; +var ref_parent = false; +var tb_frameid = 0; + +/** + * 对于指定了class为'thickbox'的超链接自动监听其超链接,其中可以指定 rel=(0|1) 属性决定点击关闭后是否刷新上级窗口 + * 如果不需要侦听超链接事件,可以禁用些初始化方法 + */ +$(document).ready(function() +{ + tb_init('a.thickbox, area.thickbox, input.thickbox'); + imgLoader = new Image(); + imgLoader.src = tb_pathToImage; +}); + +function tb_init(domChunk) +{ + $(domChunk).click(function(){ + var t = this.title || this.name || null; + var a = this.href || this.alt; + var g = this.rel || false; + tb_show(t, a, g); + this.blur(); + return false; + }); +} + +/** + * 弹窗警告窗口让用户确认操作 + * refParent 参数(0|1)决定点击关闭后是否刷新上级窗口 + */ +function tb_action(msg, gourl) +{ + msg += "
<<点错了  |  确定要操作>>"; + tb_showmsg(msg); +} + +/** + * 弹窗主函数 + * refParent 参数(0|1)决定点击关闭后是否刷新上级窗口 + */ +function tb_show(caption, url, refParent) +{ + ref_parent = refParent; + if (typeof document.body.style.maxHeight === "undefined") + { + $("body","html").css({height: "100%", width: "100%"}); + $("html").css("overflow","hidden"); + if (document.getElementById("TB_HideSelect") === null) { + $("body").append("
"); + $("#TB_overlay").click(tb_remove); + } + } + else + { + if(document.getElementById("TB_overlay") === null){ + $("body").append("
"); + $("#TB_overlay").click(tb_remove); + } + } + + if(tb_detectMacXFF()){ + $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); + }else{ + $("#TB_overlay").addClass("TB_overlayBG"); + } + + if(caption===null) caption="消息窗口"; + $("body").append("
"); + $('#TB_load').show(); + + var baseURL; + if(url.indexOf("?")!==-1){ + baseURL = url.substr(0, url.indexOf("?")); + }else{ + baseURL = url; + } + + var queryString = url.replace(/^[^\?]+\??/,''); + var params = tb_parseQuery( queryString ); + + TB_WIDTH = (params['width']*1) + 30 || 630; + TB_HEIGHT = (params['height']*1) + 40 || 420; + ajaxContentW = TB_WIDTH - 30; + ajaxContentH = TB_HEIGHT - 45; + + // either iframe or ajax window + if(url.indexOf('TB_iframe') != -1) + { + urlNoQuery = url.split('TB_'); + $("#TB_iframeContent").remove(); + tb_frameid++; + if(params['modal'] != "true"){ + $("#TB_window").append("
"+caption+"
"); + }else{ + $("#TB_overlay").unbind(); + $("#TB_window").append(""); + } + } + // not an iframe, ajax + else + { + if($("#TB_window").css("display") != "block"){ + if(params['modal'] != "true"){ + $("#TB_window").append("
"+caption+"
"); + }else{ + $("#TB_overlay").unbind(); + $("#TB_window").append("
"); + } + }else{ + $("#TB_ajaxContent")[0].style.width = ajaxContentW +"px"; + $("#TB_ajaxContent")[0].style.height = ajaxContentH +"px"; + $("#TB_ajaxContent")[0].scrollTop = 0; + $("#TB_ajaxWindowTitle").html(caption); + } + } + + $("#TB_closeWindowButton").click(tb_remove); + + if(url.indexOf('TB_inline') != -1) + { + $("#TB_ajaxContent").append($('#' + params['inlineId']).children()); + $("#TB_window").unload(function () { + $('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished + }); + tb_position(); + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + } + else if(url.indexOf('TB_iframe') != -1) + { + tb_position(); + if($.browser.safari){//safari needs help because it will not fire iframe onload + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); + } + } else { + $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method + tb_position(); + $("#TB_load").remove(); + tb_init("#TB_ajaxContent a.thickbox"); + $("#TB_window").css({display:"block"}); + }); + } + $("#TB_window").draggable(); //支持窗口拖动 + //alert( $("#TB_window").get(0).innerHTML ); + if(!params['modal']) + { + document.onkeyup = function(e){ kc = (e == null ? event.keyCode : e.which); if(kc == 27){ tb_remove(); } }; + } +} + +/** + * 弹窗信息框 + */ +function tb_showmsg(msg, caption, talign, ww, wh) +{ + //默认参数 + if(!caption || caption=="") caption="消息窗口"; + if(!talign) talign = "center"; + if(!ww) ww = "350px"; + if(!wh) wh = "180px"; + + if (typeof document.body.style.maxHeight === "undefined") { + $("body","html").css({height: "100%", width: "100%"}); + $("html").css("overflow","hidden"); + } + if(document.getElementById("TB_overlay") === null){ + $("body").append("
"); + $("#TB_overlay").click(tb_remove); + } + + if(tb_detectMacXFF()){ + $("#TB_overlay").addClass("TB_overlayMacFFBGHack"); + }else{ + $("#TB_overlay").addClass("TB_overlayBG"); + } + + + $("#TB_window").append("
"+caption+"
"+ msg +"
"); + + $("#TB_closeWindowButton").click(tb_remove); + + $("#TB_window").css({display:"block"}); + topx = ($.browser.msie)? 150 : 50; + $("#TB_window").css({top: topx + "px"}); + $("#TB_window")[0].style.width = ww; + $("#TB_window")[0].style.height = wh; + $("#TB_window").draggable(); //支持窗口拖动 + + document.onkeyup = function(e){ kc = (e == null ? event.keyCode : e.which); if(kc == 27){ tb_remove(); } }; +} + +//helper functions below +function tb_showIframe() +{ + $("#TB_load").remove(); + $("#TB_window").css({display:"block"}); +} + +// 增加父级框架关闭内容的方法 +function tb_remove() +{ + var isparent = $("#TB_imageOff",parent.document).length; + if(isparent ) + { + $("#TB_imageOff",parent.document).unbind("click"); + $("#TB_closeWindowButton",parent.document).unbind("click"); + $("#TB_window",parent.document).fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect',parent.document).trigger("unload").unbind().remove();}); + $("#TB_load",parent.document).remove(); + //if IE 6 + if (typeof parent.document.body.style.maxHeight == "undefined") + { + $("body","html",parent.document).css({height: "auto", width: "auto"}); + $("html",parent.document).css("overflow",""); + } + document.onkeydown = ""; + document.onkeyup = ""; + if( ref_parent ) location.reload(); + return; + } else { + $("#TB_imageOff").unbind("click"); + $("#TB_closeWindowButton").unbind("click"); + $("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();}); + $("#TB_load").remove(); + //if IE 6 + if (typeof document.body.style.maxHeight == "undefined") + { + $("body","html").css({height: "auto", width: "auto"}); + $("html").css("overflow",""); + } + document.onkeydown = ""; + document.onkeyup = ""; + if( ref_parent ) location.reload(); + return; + } +} + +function tb_position() +{ + $("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'}); + // take away IE6 + if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) + { + $("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'}); + } +} + +function tb_parseQuery ( query ) +{ + var Params = {}; + if ( ! query ) {return Params;}// return empty object + var Pairs = query.split(/[;&]/); + for ( var i = 0; i < Pairs.length; i++ ) { + var KeyVal = Pairs[i].split('='); + if ( ! KeyVal || KeyVal.length != 2 ) {continue;} + var key = unescape( KeyVal[0] ); + var val = unescape( KeyVal[1] ); + val = val.replace(/\+/g, ' '); + Params[key] = val; + } + return Params; +} + +function tb_getPageSize() +{ + var de = document.documentElement; + var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth; + var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight; + arrayPageSize = [w,h]; + return arrayPageSize; +} + +function tb_detectMacXFF() +{ + var userAgent = navigator.userAgent.toLowerCase(); + if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) { + return true; + } +} + + diff --git a/src/dede/log_edit.php b/src/admin/log_edit.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/log_edit.php rename to src/admin/log_edit.php index bc63e0f4..5075b8de --- a/src/dede/log_edit.php +++ b/src/admin/log_edit.php @@ -1,42 +1,40 @@ -ExecuteNoneQuery("DELETE FROM #@__log"); - ShowMsg("成功清空所有日志", "log_list.php"); - exit(); -} else if ($dopost == "del") { - $bkurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "log_list.php"; - $ids = explode('`', $ids); - $dquery = ""; - foreach ($ids as $id) { - if ($dquery == "") { - $dquery .= " lid='$id' "; - } else { - $dquery .= " Or lid='$id' "; - } - } - if ($dquery != "") $dquery = " where ".$dquery; - $dsql->ExecuteNoneQuery("DELETE FROM #@__log $dquery"); - ShowMsg("成功删除指定的日志", $bkurl); - exit(); -} else { - ShowMsg("无法识别您的请求", "javascript:;"); - exit(); -} +ExecuteNoneQuery("DELETE FROM #@__log"); + ShowMsg("成功清空所有日志", "log_list.php"); + exit(); +} else if ($dopost == "del") { + $bkurl = isset($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : "log_list.php"; + $ids = explode('`', $ids); + $dquery = ""; + foreach ($ids as $id) { + if ($dquery == "") { + $dquery .= " lid='$id' "; + } else { + $dquery .= " Or lid='$id' "; + } + } + if ($dquery != "") $dquery = " where ".$dquery; + $dsql->ExecuteNoneQuery("DELETE FROM #@__log $dquery"); + ShowMsg("成功删除指定的日志", $bkurl); + exit(); +} else { + ShowMsg("无法识别您的请求", "javascript:;"); + exit(); +} \ No newline at end of file diff --git a/src/dede/log_list.php b/src/admin/log_list.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/log_list.php rename to src/admin/log_list.php index 67528b58..0868204a --- a/src/dede/log_list.php +++ b/src/admin/log_list.php @@ -1,46 +1,43 @@ - 0) $where .= " AND #@__log.adminid='$adminid' "; -if ($cip != "") $where .= " AND #@__log.cip LIKE '%$cip%' "; - -if ($dtime > 0) { - $nowtime = time(); - $starttime = $nowtime - ($dtime * 24 * 3600); - $where .= " AND #@__log.dtime>'$starttime' "; -} -$sql = "SELECT #@__log.*,#@__admin.userid FROM #@__log - LEFT JOIN #@__admin ON #@__admin.id=#@__log.adminid - WHERE 1=1 $where ORDER BY #@__log.lid DESC"; -$adminlist = ""; -$dsql->SetQuery("SELECT id,uname FROM #@__admin"); -$dsql->Execute('admin'); -while ($myrow = $dsql->GetObject('admin')) { - $adminlist .= "\r\n"; -} -$dlist = new DataListCP(); -$dlist->pageSize = 20; -$dlist->SetParameter("adminid", $adminid); -$dlist->SetParameter("cip", $cip); -$dlist->SetParameter("dtime", $dtime); -$dlist->SetTemplate(DEDEADMIN."/templets/log_list.htm"); -$dlist->SetSource($sql); -$dlist->Display(); + 0) $where .= " AND #@__log.adminid='$adminid' "; +if ($cip != "") $where .= " AND #@__log.cip LIKE '%$cip%' "; +if ($dtime > 0) { + $nowtime = time(); + $starttime = $nowtime - ($dtime * 24 * 3600); + $where .= " AND #@__log.dtime>'$starttime' "; +} +$sql = "SELECT #@__log.*,#@__admin.userid FROM #@__log + LEFT JOIN #@__admin ON #@__admin.id=#@__log.adminid + WHERE 1=1 $where ORDER BY #@__log.lid DESC"; +$adminlist = ""; +$dsql->SetQuery("SELECT id,uname FROM #@__admin"); +$dsql->Execute('admin'); +while ($myrow = $dsql->GetObject('admin')) { + $adminlist .= "\r\n"; +} +$dlist = new DataListCP(); +$dlist->pageSize = 20; +$dlist->SetParameter("adminid", $adminid); +$dlist->SetParameter("cip", $cip); +$dlist->SetParameter("dtime", $dtime); +$dlist->SetTemplate(DEDEADMIN."/templets/log_list.htm"); +$dlist->SetSource($sql); +$dlist->Display(); \ No newline at end of file diff --git a/src/dede/login.php b/src/admin/login.php old mode 100755 new mode 100644 similarity index 77% rename from src/dede/login.php rename to src/admin/login.php index af4f4222..e358ed3b --- a/src/dede/login.php +++ b/src/admin/login.php @@ -1,90 +1,83 @@ -
您的管理目录的名称中包含默认名称dede,建议在FTP里把它修改为其它名称,那样会更安全
'; -} else { - $redmsg = ''; -} -//登录检测 -$admindirs = explode('/', str_replace("\\", '/', dirname(__FILE__))); -$admindir = $admindirs[count($admindirs) - 1]; -if ($dopost == 'login') { - $validate = empty($validate) ? '' : strtolower(trim($validate)); - $svali = strtolower(GetCkVdValue()); - if (($validate == '' || $validate != $svali) && preg_match("/6/", $safe_gdopen)) { - ResetVdValue(); - ShowMsg('验证码不正确', 'login.php', 0, 1000); - exit; - } else { - $cuserLogin = new userLogin($admindir); - if (!empty($userid) && !empty($pwd)) { - $res = $cuserLogin->checkUser($userid, $pwd); - //success - if ($res == 1) { - $cuserLogin->keepUser(); - if (!empty($gotopage)) { - ShowMsg('成功登录,正在转向管理管理主页', $gotopage); - exit(); - } else { - ShowMsg('成功登录,正在转向管理管理主页', "index.php"); - exit(); - } - } - //error - else if ($res == -1) { - ResetVdValue(); - ShowMsg('您的用户名不存在', 'login.php', 0, 1000); - exit; - } else { - ResetVdValue(); - ShowMsg('您的密码错误', 'login.php', 0, 1000); - exit; - } - } - //password empty - else { - ResetVdValue(); - ShowMsg('用户和密码没填写完整', 'login.php', 0, 1000); - exit; - } - } -} +
您的管理目录的名称中包含默认名称admin,建议在FTP里把它修改为其它名称,那样会更安全
'; +} else { + $redmsg = ''; +} +//登录检测 +$admindirs = explode('/', str_replace("\\", '/', dirname(__FILE__))); +$admindir = $admindirs[count($admindirs) - 1]; +if ($dopost == 'login') { + $validate = empty($validate) ? '' : strtolower(trim($validate)); + $svali = strtolower(GetCkVdValue()); + if (($validate == '' || $validate != $svali) && preg_match("/6/", $safe_gdopen)) { + ResetVdValue(); + ShowMsg('验证码不正确', 'login.php', 0, 1000); + exit; + } else { + $cuserLogin = new userLogin($admindir); + if (!empty($userid) && !empty($pwd)) { + $res = $cuserLogin->checkUser($userid, $pwd); + //success + if ($res == 1) { + $cuserLogin->keepUser(); + if (!empty($gotopage)) { + ShowMsg('成功登录,正在转向管理管理主页', $gotopage); + exit(); + } else { + ShowMsg('成功登录,正在转向管理管理主页', "index.php"); + exit(); + } + } + //error + else if ($res == -1) { + ResetVdValue(); + ShowMsg('您的用户名不存在', 'login.php', 0, 1000); + exit; + } else { + ResetVdValue(); + ShowMsg('您的密码错误', 'login.php', 0, 1000); + exit; + } + } + //password empty + else { + ResetVdValue(); + ShowMsg('用户和密码没填写完整', 'login.php', 0, 1000); + exit; + } + } +} include('templets/login.htm'); \ No newline at end of file diff --git a/src/dede/mail_file_manage.php b/src/admin/mail_file_manage.php old mode 100755 new mode 100644 similarity index 88% rename from src/dede/mail_file_manage.php rename to src/admin/mail_file_manage.php index 0823b324..8df89d9d --- a/src/dede/mail_file_manage.php +++ b/src/admin/mail_file_manage.php @@ -1,37 +1,37 @@ - \ No newline at end of file diff --git a/src/dede/mail_getfile.php b/src/admin/mail_getfile.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mail_getfile.php rename to src/admin/mail_getfile.php index c35b43e2..6d7bae31 --- a/src/dede/mail_getfile.php +++ b/src/admin/mail_getfile.php @@ -1,42 +1,42 @@ -Execute('me',$sql); - while($row = $db->GetArray()){ - $mails[]=$row; - } - $email=""; - foreach($mails as $mail){ - $email.=$mail['email'].","; - } - - $m_file = DEDEDATA."/mail/".$filename.".txt"; - - if (file_exists($m_file)) { - ShowMsg("该文件已经存在,重新换个文件名!","-1"); - exit(); - } else { - $fp = fopen($m_file,'w'); - flock($fp,3); - fwrite($fp,$email); - fclose($fp); - ShowMsg("获取邮件列表成功!","-1"); - exit(); - } -} -require_once(DEDEADMIN."/templets/mail_getfile.htm"); +Execute('me',$sql); + while($row = $db->GetArray()){ + $mails[]=$row; + } + $email=""; + foreach($mails as $mail){ + $email.=$mail['email'].","; + } + + $m_file = DEDEDATA."/mail/".$filename.".txt"; + + if (file_exists($m_file)) { + ShowMsg("该文件已经存在,重新换个文件名!","-1"); + exit(); + } else { + $fp = fopen($m_file,'w'); + flock($fp,3); + fwrite($fp,$email); + fclose($fp); + ShowMsg("获取邮件列表成功!","-1"); + exit(); + } +} +require_once(DEDEADMIN."/templets/mail_getfile.htm"); ?> \ No newline at end of file diff --git a/src/dede/mail_send.php b/src/admin/mail_send.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/mail_send.php rename to src/admin/mail_send.php index 4da64708..4ccba5b6 --- a/src/dede/mail_send.php +++ b/src/admin/mail_send.php @@ -1,94 +1,94 @@ -appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - $client->MailSend($email,$mailtitle,$mailtitle,$mailbody); - $client->Close(); - } else { - if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) - { - $mailtype = 'HTML'; - require_once(DEDEINC.'/mail.class.php'); - $smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); - $smtp->debug = false; - if(!$smtp->smtp_sockopen($cfg_smtp_server)){ - ShowMsg('邮件发送失败,请联系管理员','-1'); - exit(); - } - $smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); - }else{ - @mail($email, $mailtitle, $mailbody, $headers); - } - } -} - -if(!isset($action)){ - $action = ''; -} -if($action==""){ - $mfile = glob(DEDEDATA.'/mail/*.txt'); - $mnumber = count($mfile); - $mailfiles = array(); - if($mnumber > 0){ - if(is_array($mfile)){ - foreach( $mfile as $key=>$filename){ - $mailfiles[$key] = basename($filename); - } - } - } - unset($mfile); - require_once(DEDEADMIN."/templets/mail_send.htm"); -} -if($action=="post"){ - if($title==''){ - ShowMsg("请填写信息标题!","-1"); - exit(); - } - if($message==''){ - ShowMsg("请填写内容!","-1"); - exit(); - } - - if($mode=="group"){ - if(file_exists(DEDEDATA.'/mail/'.$mailfile)){ - $address = file(DEDEDATA.'/mail/'.$mailfile); - $address=implode(",", $address); - }else{ - ShowMsg($mailfile."不存在","-1"); - exit(); - } - }elseif($mode=="more"){ - $address=$address2; - } - if(!preg_match('/^(.+)@(.+)$/',$address)){ - ShowMsg("请填写正确的邮件地址!","-1"); - exit(); - } - - $title = cn_substrR(HtmlReplace($title,1),60); - $sendtime = time(); - $mailtitle = $title; - $mailto = $address; - $mailbody = stripslashes($message); - $pattern="/\\".$cfg_medias_dir."/"; - $mailbody =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$mailbody); - $fromid=$cuserLogin->getUserID(); - $fromuid=$cuserLogin->getUserName(); - sendmail($mailto,$mailtitle,$mailbody); - - //$inquery = "INSERT INTO `#@__member_mail` (`fromid`,`fromuid`,`address`,`title`,`sendtime`,`message`)VALUES ('$fromid','$fromuid','$mailto','$mailtitle','$sendtime','$mailbody'); "; - - //$dsql->ExecuteNoneQuery($inquery); - ShowMsg('邮件已成功发送','mail_send.php'); - exit(); - -} +appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + $client->MailSend($email,$mailtitle,$mailtitle,$mailbody); + $client->Close(); + } else { + if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) + { + $mailtype = 'HTML'; + require_once(DEDEINC.'/libraries/mail.class.php'); + $smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); + $smtp->debug = false; + if(!$smtp->smtp_sockopen($cfg_smtp_server)){ + ShowMsg('邮件发送失败,请联系管理员','-1'); + exit(); + } + $smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); + } else { + @mail($email, $mailtitle, $mailbody, $headers); + } + } +} + +if(!isset($action)){ + $action = ''; +} +if($action==""){ + $mfile = glob(DEDEDATA.'/mail/*.txt'); + $mnumber = count($mfile); + $mailfiles = array(); + if($mnumber > 0){ + if(is_array($mfile)){ + foreach( $mfile as $key=>$filename){ + $mailfiles[$key] = basename($filename); + } + } + } + unset($mfile); + require_once(DEDEADMIN."/templets/mail_send.htm"); +} +if($action=="post"){ + if($title==''){ + ShowMsg("请填写信息标题!","-1"); + exit(); + } + if($message==''){ + ShowMsg("请填写内容!","-1"); + exit(); + } + + if($mode=="group"){ + if(file_exists(DEDEDATA.'/mail/'.$mailfile)){ + $address = file(DEDEDATA.'/mail/'.$mailfile); + $address=implode(",", $address); + } else { + ShowMsg($mailfile."不存在","-1"); + exit(); + } + }elseif($mode=="more"){ + $address=$address2; + } + if(!preg_match('/^(.+)@(.+)$/',$address)){ + ShowMsg("请填写正确的邮件地址!","-1"); + exit(); + } + + $title = cn_substrR(HtmlReplace($title,1),60); + $sendtime = time(); + $mailtitle = $title; + $mailto = $address; + $mailbody = stripslashes($message); + $pattern="/\\".$cfg_medias_dir."/"; + $mailbody =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$mailbody); + $fromid=$cuserLogin->getUserID(); + $fromuid=$cuserLogin->getUserName(); + sendmail($mailto,$mailtitle,$mailbody); + + //$inquery = "INSERT INTO `#@__member_mail` (`fromid`,`fromuid`,`address`,`title`,`sendtime`,`message`)VALUES ('$fromid','$fromuid','$mailto','$mailtitle','$sendtime','$mailbody'); "; + + //$dsql->ExecuteNoneQuery($inquery); + ShowMsg('邮件已成功发送','mail_send.php'); + exit(); + +} diff --git a/src/dede/mail_title.php b/src/admin/mail_title.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mail_title.php rename to src/admin/mail_title.php index 74a588d1..b85fbff6 --- a/src/dede/mail_title.php +++ b/src/admin/mail_title.php @@ -1,103 +1,103 @@ -SetQuery("SELECT id,typename FROM `#@__mail_type` ORDER BY id"); - $dsql->Execute(); - $btypes = Array(); - while($row = $dsql->GetArray()) - { - $btypes[$row['id']] = $row['typename']; - } - require_once(DEDEADMIN."/templets/mail_title_add.htm"); -}elseif($dopost=="edit"){ - $dsql->SetQuery("SELECT id,typename FROM `#@__mail_type` ORDER BY id"); - $dsql->Execute(); - $btypes = Array(); - while($row = $dsql->GetArray()) - { - $btypes[$row['id']] = $row['typename']; - } - $row=$dsql->GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); - require_once(DEDEADMIN."/templets/mail_title_edit.htm"); -}elseif($dopost=="addsave"){ - if(!preg_match('/[0-9]/',$period)){ - ShowMsg("期刊号只能为数字!","-1"); - exit(); - } - if($typeid=="0"){ - ShowMsg("请选择类别!","-1"); - exit(); - } - if($title==''){ - ShowMsg("请填写信息标题!","-1"); - exit(); - } - if($message==''){ - ShowMsg("请填写内容!","-1"); - exit(); - } - $message = stripslashes($message); - $pattern="/\\".$cfg_medias_dir."/"; - $message =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$message); - $title = cn_substrR(HtmlReplace($title,1),60); - $addtime=$sendtime = time(); - $writer= $cuserLogin->getUserName(); - $mid=$cuserLogin->getUserID(); - $query = "INSERT INTO #@__mail_title (period,typeid,title,content,addtime,sendtime,writer,mid,state,count) VALUES ('$period','$typeid','$title','$message','$addtime',0,'$writer','$mid',0,0)"; - if(!$dsql->ExecuteNoneQuery($query)){ - ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;"); - exit(); - }else{ - ShowMsg("发表期刊成功","mail_title.php"); - exit(); - } -}elseif($dopost=="editsave"){ - if(!preg_match('/[0-9]/',$period)){ - ShowMsg("期刊号只能为数字!","-1"); - exit(); - } - if($title==''){ - ShowMsg("请填写信息标题!","-1"); - exit(); - } - if($message==''){ - ShowMsg("请填写内容!","-1"); - exit(); - } - $message = stripslashes($message); - $pattern="/\\".$cfg_medias_dir."/"; - $message =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$message); - $title = cn_substrR(HtmlReplace($title,1),60); - $writer= $cuserLogin->getUserName(); - $mid=$cuserLogin->getUserID(); - - $query = "UPDATE #@__mail_title SET period='$period',typeid='$typeid',title='$title',content='$message',writer='$writer',mid='$mid' WHERE id=$id"; - if(!$dsql->ExecuteNoneQuery($query)){ - ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;"); - exit(); - }else{ - ShowMsg("编辑期刊成功","mail_title.php"); - exit(); - } -}elseif($dopost=="delete"){ - $dsql->ExecuteNoneQuery("Delete From `#@__mail_title` where id='$id'"); - ShowMsg("删除期刊成功","mail_title.php"); - exit(); -}else{ - - function GetSendTimeMk($mktime){ - if($mktime=="0") return "未发送"; - else return MyDate('Y-m-d H:i:s',$mktime); - } - - $sql = "SELECT t.*,p.typename FROM `#@__mail_title` AS t LEFT JOIN `#@__mail_type` AS p ON t.typeid=p.id ORDER BY t.id desc"; - $dlist = new DataListCP(); - $dlist->SetTemplet(DEDEADMIN."/templets/mail_title_main.htm"); - $dlist->SetSource($sql); - $dlist->display(); -} - +SetQuery("SELECT id,typename FROM `#@__mail_type` ORDER BY id"); + $dsql->Execute(); + $btypes = Array(); + while($row = $dsql->GetArray()) + { + $btypes[$row['id']] = $row['typename']; + } + require_once(DEDEADMIN."/templets/mail_title_add.htm"); +}elseif($dopost=="edit"){ + $dsql->SetQuery("SELECT id,typename FROM `#@__mail_type` ORDER BY id"); + $dsql->Execute(); + $btypes = Array(); + while($row = $dsql->GetArray()) + { + $btypes[$row['id']] = $row['typename']; + } + $row=$dsql->GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); + require_once(DEDEADMIN."/templets/mail_title_edit.htm"); +}elseif($dopost=="addsave"){ + if(!preg_match('/[0-9]/',$period)){ + ShowMsg("期刊号只能为数字!","-1"); + exit(); + } + if($typeid=="0"){ + ShowMsg("请选择类别!","-1"); + exit(); + } + if($title==''){ + ShowMsg("请填写信息标题!","-1"); + exit(); + } + if($message==''){ + ShowMsg("请填写内容!","-1"); + exit(); + } + $message = stripslashes($message); + $pattern="/\\".$cfg_medias_dir."/"; + $message =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$message); + $title = cn_substrR(HtmlReplace($title,1),60); + $addtime=$sendtime = time(); + $writer= $cuserLogin->getUserName(); + $mid=$cuserLogin->getUserID(); + $query = "INSERT INTO #@__mail_title (period,typeid,title,content,addtime,sendtime,writer,mid,state,count) VALUES ('$period','$typeid','$title','$message','$addtime',0,'$writer','$mid',0,0)"; + if(!$dsql->ExecuteNoneQuery($query)){ + ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;"); + exit(); + } else { + ShowMsg("发表期刊成功","mail_title.php"); + exit(); + } +}elseif($dopost=="editsave"){ + if(!preg_match('/[0-9]/',$period)){ + ShowMsg("期刊号只能为数字!","-1"); + exit(); + } + if($title==''){ + ShowMsg("请填写信息标题!","-1"); + exit(); + } + if($message==''){ + ShowMsg("请填写内容!","-1"); + exit(); + } + $message = stripslashes($message); + $pattern="/\\".$cfg_medias_dir."/"; + $message =preg_replace($pattern,$cfg_basehost.$cfg_medias_dir,$message); + $title = cn_substrR(HtmlReplace($title,1),60); + $writer= $cuserLogin->getUserName(); + $mid=$cuserLogin->getUserID(); + + $query = "UPDATE #@__mail_title SET period='$period',typeid='$typeid',title='$title',content='$message',writer='$writer',mid='$mid' WHERE id=$id"; + if(!$dsql->ExecuteNoneQuery($query)){ + ShowMsg("更新数据库#@__mail_title表时出错,请检查","javascript:;"); + exit(); + } else { + ShowMsg("编辑期刊成功","mail_title.php"); + exit(); + } +}elseif($dopost=="delete"){ + $dsql->ExecuteNoneQuery("Delete From `#@__mail_title` where id='$id'"); + ShowMsg("删除期刊成功","mail_title.php"); + exit(); +} else { + + function GetSendTimeMk($mktime){ + if($mktime=="0") return "未发送"; + else return MyDate('Y-m-d H:i:s',$mktime); + } + + $sql = "SELECT t.*,p.typename FROM `#@__mail_title` AS t LEFT JOIN `#@__mail_type` AS p ON t.typeid=p.id ORDER BY t.id desc"; + $dlist = new DataListCP(); + $dlist->SetTemplet(DEDEADMIN."/templets/mail_title_main.htm"); + $dlist->SetSource($sql); + $dlist->display(); +} + ?> \ No newline at end of file diff --git a/src/dede/mail_title_send.php b/src/admin/mail_title_send.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/mail_title_send.php rename to src/admin/mail_title_send.php index ad8644d6..a99568a8 --- a/src/dede/mail_title_send.php +++ b/src/admin/mail_title_send.php @@ -1,83 +1,83 @@ -appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - $client->MailSend($email,$mailtitle,$mailtitle,$mailbody); - $client->Close(); - } else { - if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) - { - $mailtype = 'HTML'; - require_once(DEDEINC.'/mail.class.php'); - $smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); - $smtp->debug = false; - if(!$smtp->smtp_sockopen($cfg_smtp_server)){ - ShowMsg('邮件发送失败,请联系管理员','-1'); - exit(); - } - $smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); - }else{ - @mail($email, $mailtitle, $mailbody, $headers); - } - } - } - - $row=$dsql->GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); - $mailtitle=$row['title']; - $mailbody=$row['content']; - - $sql="SELECT m.email FROM `#@__member` AS m LEFT JOIN `#@__mail_order` AS o ON o.mid=m.mid WHERE o.typeid=$typeid"; - $db->Execute('me',$sql); - while($row = $db->GetArray()){ - $mails[]=$row; - } - $email=""; - foreach($mails as $mail){ - $email.=$mail['email'].","; - } - - $mailto=$email; - - sendmail($mailto,$mailtitle,$mailbody); - - $sendtime = time(); - $inquery = "UPDATE `#@__mail_title` SET count=count+1,sendtime='$sendtime',state='1' WHERE id=$id"; - if($dsql->ExecuteNoneQuery($inquery)){ - ShowMsg('邮件已成功发送','mail_title_send.php'); - exit(); - } -}else{ - - function GetState($state){ - if($state=="0") return "未发送"; - else return "已发送"; - } - - function GetSendTimeMk($mktime){ - if($mktime=="0") return "未发送"; - else return MyDate('Y-m-d H:i:s',$mktime); - } - - function GetCount($typeid){ - global $dsql; - $row=$dsql->GetOne("SELECT COUNT(typeid) as cc FROM `#@__mail_order`"); - return $row['cc']; - } - - $sql = "SELECT t.*,p.typename FROM `#@__mail_title` AS t LEFT JOIN `#@__mail_type` AS p ON t.typeid=p.id ORDER BY t.id desc"; - $dlist = new DataListCP(); - $dlist->SetTemplet(DEDEADMIN."/templets/mail_title_send.htm"); - $dlist->SetSource($sql); - $dlist->display(); -} +appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + $client->MailSend($email,$mailtitle,$mailtitle,$mailbody); + $client->Close(); + } else { + if($cfg_sendmail_bysmtp == 'Y' && !empty($cfg_smtp_server)) + { + $mailtype = 'HTML'; + require_once(DEDEINC.'/libraries/mail.class.php'); + $smtp = new smtp($cfg_smtp_server,$cfg_smtp_port,true,$cfg_smtp_usermail,$cfg_smtp_password); + $smtp->debug = false; + if(!$smtp->smtp_sockopen($cfg_smtp_server)){ + ShowMsg('邮件发送失败,请联系管理员','-1'); + exit(); + } + $smtp->sendmail($email,$cfg_webname,$cfg_smtp_usermail, $mailtitle, $mailbody, $mailtype); + } else { + @mail($email, $mailtitle, $mailbody, $headers); + } + } + } + + $row=$dsql->GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); + $mailtitle=$row['title']; + $mailbody=$row['content']; + + $sql="SELECT m.email FROM `#@__member` AS m LEFT JOIN `#@__mail_order` AS o ON o.mid=m.mid WHERE o.typeid=$typeid"; + $db->Execute('me',$sql); + while($row = $db->GetArray()){ + $mails[]=$row; + } + $email=""; + foreach($mails as $mail){ + $email.=$mail['email'].","; + } + + $mailto=$email; + + sendmail($mailto,$mailtitle,$mailbody); + + $sendtime = time(); + $inquery = "UPDATE `#@__mail_title` SET count=count+1,sendtime='$sendtime',state='1' WHERE id=$id"; + if($dsql->ExecuteNoneQuery($inquery)){ + ShowMsg('邮件已成功发送','mail_title_send.php'); + exit(); + } +} else { + + function GetState($state){ + if($state=="0") return "未发送"; + else return "已发送"; + } + + function GetSendTimeMk($mktime){ + if($mktime=="0") return "未发送"; + else return MyDate('Y-m-d H:i:s',$mktime); + } + + function GetCount($typeid){ + global $dsql; + $row=$dsql->GetOne("SELECT COUNT(typeid) as cc FROM `#@__mail_order`"); + return $row['cc']; + } + + $sql = "SELECT t.*,p.typename FROM `#@__mail_title` AS t LEFT JOIN `#@__mail_type` AS p ON t.typeid=p.id ORDER BY t.id desc"; + $dlist = new DataListCP(); + $dlist->SetTemplet(DEDEADMIN."/templets/mail_title_send.htm"); + $dlist->SetSource($sql); + $dlist->display(); +} diff --git a/src/dede/mail_type.php b/src/admin/mail_type.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/mail_type.php rename to src/admin/mail_type.php index 0f057c01..c0cd9802 --- a/src/dede/mail_type.php +++ b/src/admin/mail_type.php @@ -1,55 +1,55 @@ -GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); - require_once(DEDEADMIN."/templets/mail_title_edit.htm"); -}elseif($dopost=="addsave"){ - if($typename==""){ - ShowMsg("分类名不能为空","-1"); - exit(); - } - $typename=Html2Text($typename,1); - $description = Html2Text($description,1); - - $query = "INSERT INTO #@__mail_type (typename,description) VALUES ('$typename','$description')"; - if(!$dsql->ExecuteNoneQuery($query)){ - ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;"); - exit(); - }else{ - ShowMsg("添加分类成功","mail_type.php"); - exit(); - } -}elseif($dopost=="editsave"){ - if($typename==""){ - ShowMsg("分类名不能为空","-1"); - exit(); - } - $typename=Html2Text($typename,1); - $description = Html2Text($description,1); - - $query = "UPDATE #@__mail_type SET typename='$typename',description='$description' WHERE id=$id"; - if(!$dsql->ExecuteNoneQuery($query)){ - ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;"); - exit(); - }else{ - ShowMsg("更改分类成功","mail_type.php"); - exit(); - } -}elseif($dopost=="delete"){ - $dsql->ExecuteNoneQuery("Delete From `#@__mail_type` where id='$id'"); - ShowMsg("删除分类成功","mail_type.php"); - exit(); -}else{ - $sql = "SELECT * FROM `#@__mail_type` ORDER BY id "; - $dlist = new DataListCP(); - $dlist->SetTemplet(DEDEADMIN."/templets/mail_type_main.htm"); - $dlist->SetSource($sql); - $dlist->display(); -} +GetOne("SELECT * FROM `#@__mail_title` WHERE id=$id"); + require_once(DEDEADMIN."/templets/mail_title_edit.htm"); +}elseif($dopost=="addsave"){ + if($typename==""){ + ShowMsg("分类名不能为空","-1"); + exit(); + } + $typename=Html2Text($typename,1); + $description = Html2Text($description,1); + + $query = "INSERT INTO #@__mail_type (typename,description) VALUES ('$typename','$description')"; + if(!$dsql->ExecuteNoneQuery($query)){ + ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;"); + exit(); + } else { + ShowMsg("添加分类成功","mail_type.php"); + exit(); + } +}elseif($dopost=="editsave"){ + if($typename==""){ + ShowMsg("分类名不能为空","-1"); + exit(); + } + $typename=Html2Text($typename,1); + $description = Html2Text($description,1); + + $query = "UPDATE #@__mail_type SET typename='$typename',description='$description' WHERE id=$id"; + if(!$dsql->ExecuteNoneQuery($query)){ + ShowMsg("更新数据库#@__mail_type表时出错,请检查","javascript:;"); + exit(); + } else { + ShowMsg("修改分类成功","mail_type.php"); + exit(); + } +}elseif($dopost=="delete"){ + $dsql->ExecuteNoneQuery("Delete From `#@__mail_type` where id='$id'"); + ShowMsg("删除分类成功","mail_type.php"); + exit(); +} else { + $sql = "SELECT * FROM `#@__mail_type` ORDER BY id "; + $dlist = new DataListCP(); + $dlist->SetTemplet(DEDEADMIN."/templets/mail_type_main.htm"); + $dlist->SetSource($sql); + $dlist->display(); +} ?> \ No newline at end of file diff --git a/src/dede/makehtml_all.php b/src/admin/makehtml_all.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/makehtml_all.php rename to src/admin/makehtml_all.php index 215ab89f..b9682a32 --- a/src/dede/makehtml_all.php +++ b/src/admin/makehtml_all.php @@ -1,153 +1,155 @@ -dsql->GetOne("SELECT * FROM `#@__homepageset` "); - $templet = str_replace("{style}", $cfg_df_style, $row['templet']); - $homeFile = DEDEADMIN.'/'.$row['position']; - $homeFile = str_replace("\\", '/', $homeFile); - $homeFile = preg_replace("#\/{1,}#", '/', $homeFile); - if ($row['showmod'] == 1) { - $pv->SetTemplet($cfg_basedir.$cfg_templets_dir.'/'.$templet); - $pv->SaveToHtml($homeFile); - $pv->Close(); - } else { - if (file_exists($homeFile)) echo "启用静态生成,建议删除"+$homeFile; - } - ShowMsg("完成更新所有文档,现在开始更新栏目页", "makehtml_all.php?action=make&step=4&uptype=$uptype&mkvalue=$mkvalue"); - exit(); - } - //更新栏目 - /*------------------- - function _4_MakeCatalog() - --------------------*/ else if ($step == 4) { - $mkvalue = intval($mkvalue); - $typeidsok = $typeids = array(); - $adminID = $cuserLogin->getUserID(); - $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; - if ($uptype == 'all' || empty($mkvalue)) { - ShowMsg("不需要进行初处理,现更新所有栏目", "makehtml_list_action.php?gotype=mkallct"); - exit(); - } else { - if ($uptype == 'time') { - $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE senddate >=".GetMkTime($mkvalue)." AND arcrank>-1"; - } else { - $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE id>=$mkvalue AND arcrank>-1"; - } - $dsql->SetQuery($query); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $typeids[$row['typeid']] = 1; - } - - foreach ($typeids as $k => $v) { - $vs = array(); - $vs = GetParentIds($k); - if (!isset($typeidsok[$k])) { - $typeidsok[$k] = 1; - } - foreach ($vs as $k => $v) { - if (!isset($typeidsok[$v])) { - $typeidsok[$v] = 1; - } - } - } - } - $fp = fopen($mkcachefile, 'w') or die("无法写入缓存文件:{$mkcachefile} 所以无法更新栏目"); - if (count($typeidsok) > 0) { - fwrite($fp, "<"."?php\r\n"); - $i = -1; - foreach ($typeidsok as $k => $t) { - if ($k != '') { - $i++; - fwrite($fp, "\$idArray[$i]={$k};\r\n"); - } - } - fwrite($fp, "?".">"); - fclose($fp); - ShowMsg("完成栏目缓存处理,现转向更新栏目", "makehtml_list_action.php?gotype=mkall"); - exit(); - } else { - fclose($fp); - ShowMsg("没有可更新的栏目,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); - exit(); - } - } - //成功状态 - /*------------------- - function _10_MakeAllOK() - --------------------*/ else if ($step == 10) { - $adminID = $cuserLogin->getUserID(); - $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; - @unlink($mkcachefile); - OptimizeData($dsql); - ShowMsg("完成所有文件的更新", "javascript:;"); - exit(); - } //make step - -} //action=='make' - -/** - * 优化数据 - * - * @access public - * @param object $dsql 数据库对象 - * @return void - */ -function OptimizeData($dsql) -{ - global $cfg_dbprefix; - $tptables = array("{$cfg_dbprefix}archives", "{$cfg_dbprefix}arctiny"); - $dsql->SetQuery("SELECT maintable,addtable FROM `#@__channeltype` "); - $dsql->Execute(); - while ($row = $dsql->GetObject()) { - $addtable = str_replace('#@__', $cfg_dbprefix, $row->addtable); - if ($addtable != '' && !in_array($addtable, $tptables)) $tptables[] = $addtable; - } - $tptable = ''; - foreach ($tptables as $t) $tptable .= ($tptable == '' ? "`{$t}`" : ",`{$t}`"); - $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE $tptable; "); -} +dsql->GetOne("SELECT * FROM `#@__homepageset` "); + $templet = str_replace("{style}", $cfg_df_style, $row['templet']); + $homeFile = DEDEADMIN.'/'.$row['position']; + $homeFile = str_replace("\\", '/', $homeFile); + $homeFile = preg_replace("#\/{1,}#", '/', $homeFile); + if ($row['showmod'] == 1) { + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir.'/'.$templet); + $pv->SaveToHtml($homeFile); + $pv->Close(); + } else { + if (file_exists($homeFile)) echo "启用静态生成,建议删除"+$homeFile; + } + ShowMsg("完成更新所有文档,现在开始更新栏目页", "makehtml_all.php?action=make&step=4&uptype=$uptype&mkvalue=$mkvalue"); + exit(); + } + //更新栏目 + /*------------------- + function _4_MakeCatalog() + --------------------*/ +else if ($step == 4) { + $mkvalue = intval($mkvalue); + $typeidsok = $typeids = array(); + $adminID = $cuserLogin->getUserID(); + $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; + if ($uptype == 'all' || empty($mkvalue)) { + ShowMsg("不需要进行初处理,现更新所有栏目", "makehtml_list_action.php?gotype=mkallct"); + exit(); + } else { + if ($uptype == 'time') { + $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE senddate >=".GetMkTime($mkvalue)." AND arcrank>-1"; + } else { + $query = "SELECT DISTINCT typeid From `#@__arctiny` WHERE id>=$mkvalue AND arcrank>-1"; + } + $dsql->SetQuery($query); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $typeids[$row['typeid']] = 1; + } + + foreach ($typeids as $k => $v) { + $vs = array(); + $vs = GetParentIds($k); + if (!isset($typeidsok[$k])) { + $typeidsok[$k] = 1; + } + foreach ($vs as $k => $v) { + if (!isset($typeidsok[$v])) { + $typeidsok[$v] = 1; + } + } + } + } + $fp = fopen($mkcachefile, 'w') or die("无法写入缓存文件:{$mkcachefile} 所以无法更新栏目"); + if (count($typeidsok) > 0) { + fwrite($fp, "<"."?php\r\n"); + $i = -1; + foreach ($typeidsok as $k => $t) { + if ($k != '') { + $i++; + fwrite($fp, "\$idArray[$i]={$k};\r\n"); + } + } + fwrite($fp, "?".">"); + fclose($fp); + ShowMsg("完成栏目缓存处理,现转向更新栏目", "makehtml_list_action.php?gotype=mkall"); + exit(); + } else { + fclose($fp); + ShowMsg("没有可更新的栏目,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); + exit(); + } + } + //成功状态 + /*------------------- + function _10_MakeAllOK() + --------------------*/ +else if ($step == 10) { + $adminID = $cuserLogin->getUserID(); + $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; + @unlink($mkcachefile); + OptimizeData($dsql); + ShowMsg("完成所有文件的更新", "javascript:;"); + exit(); + } //make step + +} //action=='make' + +/** + * 优化数据 + * + * @access public + * @param object $dsql 数据库对象 + * @return void + */ +function OptimizeData($dsql) +{ + global $cfg_dbprefix; + $tptables = array("{$cfg_dbprefix}archives", "{$cfg_dbprefix}arctiny"); + $dsql->SetQuery("SELECT maintable,addtable FROM `#@__channeltype` "); + $dsql->Execute(); + while ($row = $dsql->GetObject()) { + $addtable = str_replace('#@__', $cfg_dbprefix, $row->addtable); + if ($addtable != '' && !in_array($addtable, $tptables)) $tptables[] = $addtable; + } + $tptable = ''; + foreach ($tptables as $t) $tptable .= ($tptable == '' ? "`{$t}`" : ",`{$t}`"); + $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE $tptable; "); +} diff --git a/src/dede/makehtml_archives.php b/src/admin/makehtml_archives.php old mode 100755 new mode 100644 similarity index 86% rename from src/dede/makehtml_archives.php rename to src/admin/makehtml_archives.php index dc673d15..c84a3b37 --- a/src/dede/makehtml_archives.php +++ b/src/admin/makehtml_archives.php @@ -1,14 +1,13 @@ -=$startid AND arcrank=0 "); -if ($endid > $startid && $startid > 0) $gwhere .= " AND id <= $endid "; - -if ($typeid != 0) { - $ids = GetSonIds($typeid); - $gwhere .= " AND typeid in($ids) "; -} - -if ($idsql == '') $idsql = $gwhere; - -if ($seltime == 1) { - $t1 = GetMkTime($stime); - $t2 = GetMkTime($etime); - $idsql .= " And (senddate >= $t1 And senddate <= $t2) "; -} else if (isset($t1) && is_numeric($t1)) { - $idsql .= " And senddate >= $t1 "; -} - -//统计记录总数 -if ($totalnum == 0) { - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` $idsql"); - $totalnum = $row['dd']; - //清空缓存 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache` "); -} - -//获取记录,并生成HTML -if ($totalnum > $startdd + $pagesize) { - $limitSql = " LIMIT $startdd,$pagesize"; -} else { - $limitSql = " LIMIT $startdd,".($totalnum - $startdd); -} - -$tjnum = $startdd; -if (empty($sstime)) $sstime = time(); - -//如果生成数量大于500,并且没选栏目,按栏目排序生成 -if ($totalnum > 500 && empty($typeid)) { - $dsql->Execute('out', "SELECT id FROM `#@__arctiny` $idsql ORDER BY typeid ASC $limitSql"); -} else { - $dsql->Execute('out', "SELECT id FROM `#@__arctiny` $idsql $limitSql"); -} - -while ($row = $dsql->GetObject('out')) { - $tjnum++; - $id = $row->id; - $ac = new Archives($id); - $rurl = $ac->MakeHtml(0); -} - -$t2 = ExecTime(); -$t2 = ($t2 - $est1); -$ttime = time() - $sstime; -$ttime = number_format(($ttime / 60), 2); - -//返回提示信息 -$tjlen = $totalnum > 0 ? ceil(($tjnum / $totalnum) * 100) : 100; -$dvlen = $tjlen * 2; -$tjsta = "
"; -$tjsta .= "
本次用时:".number_format($t2, 2).",总用时:$ttime 分钟,到达位置:".($startdd + $pagesize)."
完成创建文件总数的:$tjlen %,继续执行任务..."; - - -//速度测试 -/* -if($startdd > 1000) -{ - ShowMsg("生成文件:1000 总用时:{$ttime} 分钟", "javascript:;"); - exit(); -} -*/ - -if ($tjnum < $totalnum) { - $nurl = "makehtml_archives_action.php?endid=$endid&startid=$startid&typeid=$typeid"; - $nurl .= "&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; - $nurl .= "&seltime=$seltime&sstime=$sstime&stime=".urlencode($stime)."&etime=".urlencode($etime)."&uptype=$uptype&mkvalue=$mkvalue"; - ShowMsg($tjsta, $nurl, 0, 100); - exit(); -} else { - if ($typeid != '') { - ShowMsg("生成文件:$totalnum 总用时:{$ttime} 分钟,现转向当前栏目更新>>", "makehtml_list_action.php?typeid=$typeid&uptype=all&maxpagesize=50&upnext=1"); - } else { - if ($uptype == '') { - ShowMsg("完成所有创建任务,生成文件:$totalnum 总用时:{$ttime} 分钟。", "javascript:;"); - } else { - ShowMsg("完成文档HTML更新任务,现在开始进行主页更新...", "makehtml_all.php?action=make&step=3&uptype=$uptype&mkvalue=$mkvalue"); - } - } -} +=$startid AND arcrank=0 "); +if ($endid > $startid && $startid > 0) $gwhere .= " AND id <= $endid "; +if ($typeid != 0) { + $ids = GetSonIds($typeid); + $gwhere .= " AND typeid in($ids) "; +} +if ($idsql == '') $idsql = $gwhere; +if ($seltime == 1) { + $t1 = GetMkTime($stime); + $t2 = GetMkTime($etime); + $idsql .= " And (senddate >= $t1 And senddate <= $t2) "; +} else if (isset($t1) && is_numeric($t1)) { + $idsql .= " And senddate >= $t1 "; +} +//统计记录总数 +if ($totalnum == 0) { + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctiny` $idsql"); + $totalnum = $row['dd']; + //清空缓存 + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache` "); +} +//获取记录,并生成HTML +if ($totalnum > $startdd + $pagesize) { + $limitSql = " LIMIT $startdd,$pagesize"; +} else { + $limitSql = " LIMIT $startdd,".($totalnum - $startdd); +} +$tjnum = $startdd; +if (empty($sstime)) $sstime = time(); +//如果生成数量大于500,并且没选栏目,按栏目排序生成 +if ($totalnum > 500 && empty($typeid)) { + $dsql->Execute('out', "SELECT id FROM `#@__arctiny` $idsql ORDER BY typeid ASC $limitSql"); +} else { + $dsql->Execute('out', "SELECT id FROM `#@__arctiny` $idsql $limitSql"); +} +while ($row = $dsql->GetObject('out')) { + $tjnum++; + $id = $row->id; + $ac = new Archives($id); + $rurl = $ac->MakeHtml(0); +} +$t2 = ExecTime(); +$t2 = ($t2 - $est1); +$ttime = time() - $sstime; +$ttime = number_format(($ttime / 60), 2); +//返回提示信息 +$tjlen = $totalnum > 0 ? ceil(($tjnum / $totalnum) * 100) : 100; +$dvlen = $tjlen * 2; +$tjsta = "
"; +$tjsta .= "
本次用时:".number_format($t2, 2).",总用时:$ttime 分钟,到达位置:".($startdd + $pagesize)."
完成创建文件总数的:$tjlen %,继续执行任务"; +if ($tjnum < $totalnum) { + $nurl = "makehtml_archives_action.php?endid=$endid&startid=$startid&typeid=$typeid"; + $nurl .= "&totalnum=$totalnum&startdd=".($startdd + $pagesize)."&pagesize=$pagesize"; + $nurl .= "&seltime=$seltime&sstime=$sstime&stime=".urlencode($stime)."&etime=".urlencode($etime)."&uptype=$uptype&mkvalue=$mkvalue"; + ShowMsg($tjsta, $nurl, 0, 100); + exit(); +} else { + if ($typeid != '') { + ShowMsg("生成文件:$totalnum 总用时:{$ttime} 分钟,现转向当前栏目更新>>", "makehtml_list_action.php?typeid=$typeid&uptype=all&maxpagesize=50&upnext=1"); + } else { + if ($uptype == '') { + ShowMsg("完成所有创建任务,生成文件:$totalnum 总用时:{$ttime} 分钟", "javascript:;"); + } else { + ShowMsg("完成文档HTML更新任务,现在开始进行主页更新", "makehtml_all.php?action=make&step=3&uptype=$uptype&mkvalue=$mkvalue"); + } + } +} \ No newline at end of file diff --git a/src/dede/makehtml_freelist.php b/src/admin/makehtml_freelist.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/makehtml_freelist.php rename to src/admin/makehtml_freelist.php index 2216d2d9..049b125f --- a/src/dede/makehtml_freelist.php +++ b/src/admin/makehtml_freelist.php @@ -1,13 +1,12 @@ -= $startid "; -if (!empty($endid) && $endid >= $startid) { - $ci .= " And aid <= $endid "; -} -header("Content-Type: text/html; charset={$cfg_soft_lang}"); -$dsql->SetQuery("SELECT aid FROM `#@__freelist` WHERE $ci"); -$dsql->Execute(); -while ($row = $dsql->GetArray()) { - $idArray[] = $row['aid']; -} -if (!isset($pageno)) $pageno = 0; -if (empty($idArray)) $idArray = ''; -$totalpage = count($idArray); -if (isset($idArray[$pageno])) { - $lid = $idArray[$pageno]; -} else { - ShowMsg("完成所有文件创建", 'javascript:;'); - exit(); -} -$lv = new FreeList($lid); -$ntotalpage = $lv->TotalPage; -if (empty($mkpage)) $mkpage = 1; -if (empty($maxpagesize)) $maxpagesize = 50; - -//如果栏目的文档太多,分多批次更新 -if ($ntotalpage <= $maxpagesize) { - $lv->MakeHtml(); - $finishType = true; -} else { - $lv->MakeHtml($mkpage, $maxpagesize); - $finishType = false; - $mkpage = $mkpage + $maxpagesize; - if ($mkpage >= ($ntotalpage + 1)) { - $finishType = true; - } -} -$lv->Close(); -$nextpage = $pageno + 1; -if ($nextpage == $totalpage) { - ShowMsg("完成所有文件创建", 'javascript:;'); -} else { - if ($finishType) { - $gourl = "makehtml_freelist_action.php?maxpagesize=$maxpagesize&startid=$startid&endid=$endid&pageno=$nextpage"; - ShowMsg("成功创建列表:".$tid.",继续进行操作", $gourl, 0, 100); - } else { - $gourl = "makehtml_freelist_action.php?mkpage=$mkpage&maxpagesize=$maxpagesize&startid=$startid&endid=$endid&pageno=$pageno"; - ShowMsg("列表:".$tid.",继续进行操作...", $gourl, 0, 100); - } -} -$dsql->ExecuteNoneQuery("Update `#@__freelist` set nodefault='1' where aid='$startid';"); += $startid "; +if (!empty($endid) && $endid >= $startid) { + $ci .= " And aid <= $endid "; +} +header("Content-Type: text/html; charset={$cfg_soft_lang}"); +$dsql->SetQuery("SELECT aid FROM `#@__freelist` WHERE $ci"); +$dsql->Execute(); +while ($row = $dsql->GetArray()) { + $idArray[] = $row['aid']; +} +if (!isset($pageno)) $pageno = 0; +if (empty($idArray)) $idArray = ''; +$totalpage = count($idArray); +if (isset($idArray[$pageno])) { + $lid = $idArray[$pageno]; +} else { + ShowMsg("完成所有文件创建", 'javascript:;'); + exit(); +} +$lv = new FreeList($lid); +$ntotalpage = $lv->TotalPage; +if (empty($mkpage)) $mkpage = 1; +if (empty($maxpagesize)) $maxpagesize = 50; + +//如果栏目的文档太多,分多批次更新 +if ($ntotalpage <= $maxpagesize) { + $lv->MakeHtml(); + $finishType = true; +} else { + $lv->MakeHtml($mkpage, $maxpagesize); + $finishType = false; + $mkpage = $mkpage + $maxpagesize; + if ($mkpage >= ($ntotalpage + 1)) { + $finishType = true; + } +} +$lv->Close(); +$nextpage = $pageno + 1; +if ($nextpage == $totalpage) { + ShowMsg("完成所有文件创建", 'javascript:;'); +} else { + if ($finishType) { + $gourl = "makehtml_freelist_action.php?maxpagesize=$maxpagesize&startid=$startid&endid=$endid&pageno=$nextpage"; + ShowMsg("成功创建列表:".$tid.",继续进行操作", $gourl, 0, 100); + } else { + $gourl = "makehtml_freelist_action.php?mkpage=$mkpage&maxpagesize=$maxpagesize&startid=$startid&endid=$endid&pageno=$pageno"; + ShowMsg("列表:".$tid.",继续进行操作", $gourl, 0, 100); + } +} +$dsql->ExecuteNoneQuery("Update `#@__freelist` set nodefault='1' where aid='$startid';"); diff --git a/src/dede/makehtml_homepage.php b/src/admin/makehtml_homepage.php old mode 100755 new mode 100644 similarity index 84% rename from src/dede/makehtml_homepage.php rename to src/admin/makehtml_homepage.php index f5184327..62996ab2 --- a/src/dede/makehtml_homepage.php +++ b/src/admin/makehtml_homepage.php @@ -1,107 +1,106 @@ -SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); - $pv->Display(); - exit(); -} else if ($dopost == "make") { - if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { - $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); - $client->appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - $data = $client->AdminPWDExists(); - $data = json_decode($data->data); - $rs = (array)($data->result); - - if ($rs["admin_pwd_exists"] == "false") { - // 设定dedebiz admin密码 - if ($dedebiz_admin == "" || $dedebiz_admin !== $re_dedebiz_admin) { - echo ""; - echo "
DedeBIZ操作密码为空或两次指定的密码不符

"; - $client->Close(); - exit; - } - $data = $client->AdminPWDCreate($dedebiz_admin); - if ($data->data != "ok") { - echo ""; - echo "
DedeBIZ设定操作密码失败:${$data}

"; - $client->Close(); - exit; - } - } else { - if ($dedebiz_admin == "") { - echo ""; - echo "
DedeBIZ操作密码为空

"; - $client->Close(); - exit; - } - $data = $client->AdminSetIndexLockState($dedebiz_admin, $lockindex); - if ($data->data != "ok") { - echo ""; - echo "
DedeBIZ操作密码失败,填写正确的操作密码

"; - $client->Close(); - exit; - } - } - $client->Close(); - } - $remotepos = empty($remotepos) ? '/index.html' : $remotepos; - $serviterm = empty($serviterm) ? "" : $serviterm; - $homeFile = DEDEADMIN."/".$position; - $homeFile = str_replace("\\", "/", $homeFile); - $homeFile = str_replace("//", "/", $homeFile); - $fp = fopen($homeFile, "w") or die("您指定的文件名有问题,无法创建文件"); - fclose($fp); - if ($saveset == 1) { - $iquery = "UPDATE `#@__homepageset` SET templet='$templet',position='$position' "; - $dsql->ExecuteNoneQuery($iquery); - } - // 判断首页生成模式 - if ($showmod == 1) { - // 需要生成静态 - $templet = str_replace("{style}", $cfg_df_style, $templet); - $pv = new PartView(); - $GLOBALS['_arclistEnv'] = 'index'; - $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); - $pv->SaveToHtml($homeFile); - echo ""; - echo "
成功更新主页HTML:".$homeFile."
浏览...

"; - } else { - // 动态浏览 - if (file_exists($homeFile)) @unlink($homeFile); - echo ""; - echo "
采用动态浏览模式:浏览...

"; - } - - $iquery = "UPDATE `#@__homepageset` SET showmod='$showmod'"; - $dsql->ExecuteNoneQuery($iquery); - - if ($serviterm == "") { - $config = array(); - } else { - list($servurl, $servuser, $servpwd) = explode(',', $serviterm); - $config = array( - 'hostname' => $servurl, 'username' => $servuser, - 'password' => $servpwd, 'debug' => 'TRUE' - ); - } - exit(); -} -$row = $dsql->GetOne("SELECT * FROM `#@__homepageset`"); -include DedeInclude('templets/makehtml_homepage.htm'); +SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); + $pv->Display(); + exit(); +} else if ($dopost == "make") { + if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { + $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); + $client->appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + $data = $client->AdminPWDExists(); + $data = json_decode($data->data); + $rs = (array)($data->result); + if ($rs["admin_pwd_exists"] == "false") { + //设定dedebiz admin密码 + if ($dedebiz_admin == "" || $dedebiz_admin !== $re_dedebiz_admin) { + echo ""; + echo "
DedeBIZ操作密码为空或两次指定的密码不符

"; + $client->Close(); + exit; + } + $data = $client->AdminPWDCreate($dedebiz_admin); + if ($data->data != "ok") { + echo ""; + echo "
DedeBIZ设定操作密码失败:${$data}

"; + $client->Close(); + exit; + } + } else { + if ($dedebiz_admin == "") { + echo ""; + echo "
DedeBIZ操作密码为空

"; + $client->Close(); + exit; + } + $data = $client->AdminSetIndexLockState($dedebiz_admin, $lockindex); + if ($data->data != "ok") { + echo ""; + echo "
DedeBIZ操作密码失败,填写正确的操作密码

"; + $client->Close(); + exit; + } + } + $client->Close(); + } + $remotepos = empty($remotepos) ? '/index.html' : $remotepos; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (preg_match('#\.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)$#i', trim($position))) { + ShowMsg("您指定的文件名被系统禁止", "javascript:;"); + exit(); + } + $homeFile = DEDEADMIN."/".$position; + $homeFile = str_replace("\\", "/", $homeFile); + $homeFile = str_replace("//", "/", $homeFile); + $fp = fopen($homeFile, "w") or die("您指定的文件名有问题,无法创建文件"); + fclose($fp); + if ($saveset == 1) { + $iquery = "UPDATE `#@__homepageset` SET templet='$templet',position='$position' "; + $dsql->ExecuteNoneQuery($iquery); + } + //判断首页生成模式 + if ($showmod == 1) { + //需要生成静态 + $templet = str_replace("{style}", $cfg_df_style, $templet); + $pv = new PartView(); + $GLOBALS['_arclistEnv'] = 'index'; + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); + $pv->SaveToHtml($homeFile); + echo ""; + echo "
成功更新首页:".$homeFile." 浏览
"; + } else { + //动态浏览 + if (file_exists($homeFile)) @unlink($homeFile); + echo ""; + echo "
采用动态浏览:浏览
"; + } + $iquery = "UPDATE `#@__homepageset` SET showmod='$showmod'"; + $dsql->ExecuteNoneQuery($iquery); + if ($serviterm == "") { + $config = array(); + } else { + list($servurl, $servuser, $servpwd) = explode(',', $serviterm); + $config = array( + 'hostname' => $servurl, 'username' => $servuser, + 'password' => $servpwd, 'debug' => 'TRUE' + ); + } + exit(); +} +$row = $dsql->GetOne("SELECT * FROM `#@__homepageset`"); +include DedeInclude('templets/makehtml_homepage.htm'); \ No newline at end of file diff --git a/src/dede/makehtml_js.php b/src/admin/makehtml_js.php old mode 100755 new mode 100644 similarity index 86% rename from src/dede/makehtml_js.php rename to src/admin/makehtml_js.php index 1fa9f3c6..1fcba0de --- a/src/dede/makehtml_js.php +++ b/src/admin/makehtml_js.php @@ -1,14 +1,13 @@ -GetOne("SELECT id FROM `#@__arctype` WHERE id>'$typeid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); - if (!is_array($row)) { - echo ""; - echo "
完成所有文件更新
"; - exit(); - } else { - $pv = new PartView($row['id']); - $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); - $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$row['id'].".js", 0); - $typeid = $row['id'];; - ShowMsg("成功更新".$cfg_cmspath."/data/js/".$row['id'].".js,继续进行操作", "makehtml_js_action.php?typeid=$typeid", 0, 100); - exit(); - } -} else { - $pv = new PartView($typeid); - $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); - $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$typeid.".js", 0); - echo ""; - echo "
成功更新".$cfg_cmspath."/data/js/".$typeid.".js"; - echo "预览:
"; - echo "
"; - echo ""; - exit(); -} +GetOne("SELECT id FROM `#@__arctype` WHERE id>'$typeid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); + if (!is_array($row)) { + echo ""; + echo "
完成所有文件更新
"; + exit(); + } else { + $pv = new PartView($row['id']); + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); + $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$row['id'].".js", 0); + $typeid = $row['id'];; + ShowMsg("成功更新".$cfg_cmspath."/data/js/".$row['id'].".js,继续进行操作", "makehtml_js_action.php?typeid=$typeid", 0, 100); + exit(); + } +} else { + $pv = new PartView($typeid); + $pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$templet); + $pv->SaveToHtml($cfg_basedir.$cfg_cmspath."/data/js/".$typeid.".js", 0); + echo ""; + echo "
成功更新".$cfg_cmspath."/data/js/".$typeid.".js"; + echo "预览:
"; + echo "
"; + echo ""; + exit(); +} diff --git a/src/dede/makehtml_list.php b/src/admin/makehtml_list.php old mode 100755 new mode 100644 similarity index 86% rename from src/dede/makehtml_list.php rename to src/admin/makehtml_list.php index 45851f2a..910536ad --- a/src/dede/makehtml_list.php +++ b/src/admin/makehtml_list.php @@ -1,14 +1,13 @@ -getUserID(); - -//检测获取所有栏目ID -//普通生成或一键更新时更新所有栏目 -if ($gotype == '' || $gotype == 'mkallct') { - if ($upnext == 1 || $typeid == 0) { - if ($typeid > 0) { - $tidss = GetSonIds($typeid, 0); - $idArray = explode(',', $tidss); - } else { - foreach ($cfg_Cs as $k => $v) $idArray[] = $k; - } - } else { - $idArray = array(); - $idArray[] = $typeid; - } -} -//一键更新带缓存的情况 -else if ($gotype == 'mkall') { - $uppage = 1; - $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; - $idArray = array(); - if (file_exists($mkcachefile)) require_once($mkcachefile); -} - -//当前更新栏目的ID -$totalpage = count($idArray); -if (isset($idArray[$pageno])) { - $tid = $idArray[$pageno]; -} else { - if ($gotype == '') { - ShowMsg("完成所有列表更新", "javascript:;"); - exit(); - } else if ($gotype == 'mkall' || $gotype == 'mkallct') { - ShowMsg("完成所有栏目列表更新,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); - exit(); - } -} - -if ($pageno == 0 && $mkpage == 1) //清空缓存 -{ - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache` "); -} - -$reurl = ''; - -//更新数组所记录的栏目 -if (!empty($tid)) { - if (!isset($cfg_Cs[$tid])) { - ShowMsg('没有该栏目数据, 可能缓存文件(/data/cache/inc_catalog_base.inc)没有更新, 请检查是否有写入权限', 'javascript:;'); - exit(); - } - if ($cfg_Cs[$tid][1] > 0) { - require_once(DEDEINC."/arc.listview.class.php"); - $lv = new ListView($tid); - $position = MfTypedir($lv->Fields['typedir']); - } else { - require_once(DEDEINC."/arc.sglistview.class.php"); - $lv = new SgListView($tid); - } - // 这里统一统计 - $lv->CountRecord(); - if ($lv->TypeLink->TypeInfos['ispart'] == 0 && $lv->TypeLink->TypeInfos['isdefault'] != -1) $ntotalpage = $lv->TotalPage; - else $ntotalpage = 1; - //如果栏目的文档太多,分多批次更新 - if ($ntotalpage <= $maxpagesize || $lv->TypeLink->TypeInfos['ispart'] != 0 || $lv->TypeLink->TypeInfos['isdefault'] == -1) { - $reurl = $lv->MakeHtml('', '', 0); - $finishType = TRUE; - } else { - $reurl = $lv->MakeHtml($mkpage, $maxpagesize, 0); - $finishType = FALSE; - $mkpage = $mkpage + $maxpagesize; - if ($mkpage >= ($ntotalpage + 1)) $finishType = TRUE; - } -} - -$nextpage = $pageno + 1; -if ($nextpage >= $totalpage && $finishType) { - if ($gotype == '') { - if (empty($reurl)) { - $reurl = '../plus/list.php?tid='.$tid; - } - ShowMsg("完成所有栏目列表更新浏览栏目", "javascript:;"); - exit(); - } else if ($gotype == 'mkall' || $gotype == 'mkallct') { - ShowMsg("完成所有栏目列表更新,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); - exit(); - } -} else { - if ($finishType) { - $gourl = "makehtml_list_action.php?gotype={$gotype}&uppage=$uppage&maxpagesize=$maxpagesize&typeid=$typeid&pageno=$nextpage"; - ShowMsg("成功创建栏目:".$tid.",继续进行操作", $gourl, 0, 100); - exit(); - } else { - $gourl = "makehtml_list_action.php?gotype={$gotype}&uppage=$uppage&mkpage=$mkpage&maxpagesize=$maxpagesize&typeid=$typeid&pageno=$pageno"; - ShowMsg("栏目:".$tid.",继续进行操作...", $gourl, 0, 100); - exit(); - } -} +getUserID(); + +//检测获取所有栏目ID +//普通生成或一键更新时更新所有栏目 +if ($gotype == '' || $gotype == 'mkallct') { + if ($upnext == 1 || $typeid == 0) { + if ($typeid > 0) { + $tidss = GetSonIds($typeid, 0); + $idArray = explode(',', $tidss); + } else { + foreach ($cfg_Cs as $k => $v) $idArray[] = $k; + } + } else { + $idArray = array(); + $idArray[] = $typeid; + } +} +//一键更新带缓存的情况 +else if ($gotype == 'mkall') { + $uppage = 1; + $mkcachefile = DEDEDATA."/mkall_cache_{$adminID}.php"; + $idArray = array(); + if (file_exists($mkcachefile)) require_once($mkcachefile); +} + +//当前更新栏目的ID +$totalpage = count($idArray); +if (isset($idArray[$pageno])) { + $tid = $idArray[$pageno]; +} else { + if ($gotype == '') { + ShowMsg("完成所有列表更新", "javascript:;"); + exit(); + } else if ($gotype == 'mkall' || $gotype == 'mkallct') { + ShowMsg("完成所有栏目列表更新,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); + exit(); + } +} + +if ($pageno == 0 && $mkpage == 1) //清空缓存 +{ + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache` "); +} + +$reurl = ''; + +//更新数组所记录的栏目 +if (!empty($tid)) { + if (!isset($cfg_Cs[$tid])) { + ShowMsg('没有该栏目数据, 可能缓存文件(/data/cache/inc_catalog_base.inc)没有更新, 请检查是否有写入权限', 'javascript:;'); + exit(); + } + if ($cfg_Cs[$tid][1] > 0) { + require_once(DEDEINC."/archive/listview.class.php"); + $lv = new ListView($tid); + $position = MfTypedir($lv->Fields['typedir']); + } else { + require_once(DEDEINC."/archive/sglistview.class.php"); + $lv = new SgListView($tid); + } + //这里统一统计 + $lv->CountRecord(); + if ($lv->TypeLink->TypeInfos['ispart'] == 0 && $lv->TypeLink->TypeInfos['isdefault'] != -1) $ntotalpage = $lv->TotalPage; + else $ntotalpage = 1; + //如果栏目的文档太多,分多批次更新 + if ($ntotalpage <= $maxpagesize || $lv->TypeLink->TypeInfos['ispart'] != 0 || $lv->TypeLink->TypeInfos['isdefault'] == -1) { + $reurl = $lv->MakeHtml('', '', 0); + $finishType = TRUE; + } else { + $reurl = $lv->MakeHtml($mkpage, $maxpagesize, 0); + $finishType = FALSE; + $mkpage = $mkpage + $maxpagesize; + if ($mkpage >= ($ntotalpage + 1)) $finishType = TRUE; + } +} + +$nextpage = $pageno + 1; +if ($nextpage >= $totalpage && $finishType) { + if ($gotype == '') { + if (empty($reurl)) { + $reurl = '../apps/list.php?tid='.$tid; + } + ShowMsg("完成所有栏目列表更新浏览栏目", "javascript:;"); + exit(); + } else if ($gotype == 'mkall' || $gotype == 'mkallct') { + ShowMsg("完成所有栏目列表更新,现在作最后数据优化", "makehtml_all.php?action=make&step=10"); + exit(); + } +} else { + if ($finishType) { + $gourl = "makehtml_list_action.php?gotype={$gotype}&uppage=$uppage&maxpagesize=$maxpagesize&typeid=$typeid&pageno=$nextpage"; + ShowMsg("成功创建栏目:".$tid.",继续进行操作", $gourl, 0, 100); + exit(); + } else { + $gourl = "makehtml_list_action.php?gotype={$gotype}&uppage=$uppage&mkpage=$mkpage&maxpagesize=$maxpagesize&typeid=$typeid&pageno=$pageno"; + ShowMsg("栏目:".$tid.",继续进行操作", $gourl, 0, 100); + exit(); + } +} diff --git a/src/dede/makehtml_map.php b/src/admin/makehtml_map.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/makehtml_map.php rename to src/admin/makehtml_map.php index 7a032156..a11eb143 --- a/src/dede/makehtml_map.php +++ b/src/admin/makehtml_map.php @@ -1,37 +1,36 @@ -GetSiteMap($dopost); -if ($dopost == "site") { - $murl = $cfg_cmspath."/data/sitemap.html"; - $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm"; -} else { - $murl = $cfg_cmspath."/data/rssmap.html"; - $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/rssmap.htm"; -} -$dtp = new DedeTagParse(); -$dtp->LoadTemplet($tmpfile); -$dtp->SaveTo($cfg_basedir.$murl); -$dtp->Clear(); -echo ""; -echo "
成功更新文件: $murl 浏览...
"; -exit(); +GetSiteMap($dopost); +if ($dopost == "site") { + $murl = $cfg_cmspath."/data/sitemap.html"; + $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm"; +} else { + $murl = $cfg_cmspath."/data/rssmap.html"; + $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/rssmap.htm"; +} +$dtp = new DedeTagParse(); +$dtp->LoadTemplet($tmpfile); +$dtp->SaveTo($cfg_basedir.$murl); +$dtp->Clear(); +echo ""; +echo "
成功更新文件: $murl 浏览
"; +exit(); diff --git a/src/dede/makehtml_map_guide.php b/src/admin/makehtml_map_guide.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/makehtml_map_guide.php rename to src/admin/makehtml_map_guide.php index 76b21274..f8250d77 --- a/src/dede/makehtml_map_guide.php +++ b/src/admin/makehtml_map_guide.php @@ -1,13 +1,12 @@ -GetOne("SELECT id FROM `#@__arctype` WHERE id>'$tid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); -if (!is_array($row)) { - echo ""; - echo "
完成所有文件更新
"; -} else { - $rv = new RssView($row['id'], $maxrecord); - $rssurl = $rv->MakeRss(0); - $tid = $row['id']; - ShowMsg("成功更新".$rssurl.",继续进行操作", "makehtml_rss_action.php?tid=$tid&maxrecord=$maxrecord", 0, 100); -} +GetOne("SELECT id FROM `#@__arctype` WHERE id>'$tid' AND ispart<>2 ORDER BY id ASC LIMIT 0,1;"); +if (!is_array($row)) { + echo ""; + echo "
完成所有文件更新
"; +} else { + $rv = new RssView($row['id'], $maxrecord); + $rssurl = $rv->MakeRss(0); + $tid = $row['id']; + ShowMsg("成功更新".$rssurl.",继续进行操作", "makehtml_rss_action.php?tid=$tid&maxrecord=$maxrecord", 0, 100); +} diff --git a/src/dede/makehtml_spec.php b/src/admin/makehtml_spec.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/makehtml_spec.php rename to src/admin/makehtml_spec.php index 74f248d3..7d904c7d --- a/src/dede/makehtml_spec.php +++ b/src/admin/makehtml_spec.php @@ -1,24 +1,23 @@ -MakeHtml(0); - echo ""; - echo "
成功生成所有专题HTML列表预览
"; - exit(); -} -include DedeInclude('templets/makehtml_spec.htm'); +MakeHtml(0); + echo ""; + echo "
成功生成所有专题HTML列表预览
"; + exit(); +} +include DedeInclude('templets/makehtml_spec.htm'); diff --git a/src/dede/makehtml_taglist.php b/src/admin/makehtml_taglist.php similarity index 100% rename from src/dede/makehtml_taglist.php rename to src/admin/makehtml_taglist.php diff --git a/src/dede/makehtml_taglist_action.php b/src/admin/makehtml_taglist_action.php similarity index 86% rename from src/dede/makehtml_taglist_action.php rename to src/admin/makehtml_taglist_action.php index d4b7b1db..b8cc9d2c 100644 --- a/src/dede/makehtml_taglist_action.php +++ b/src/admin/makehtml_taglist_action.php @@ -1,5 +1,4 @@ 0) { - $upall = 0; // 更新单个模式 + $upall = 0; //更新单个模式 $ctagid = $tagid; } else { - $upall = 1; // 更新全部模式 + $upall = 1; //更新全部模式 } -$allfinish = false; // 是否全部完成 +$allfinish = false; //是否全部完成 -$dd = $dsql->GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); // 取一个平均 +$dd = $dsql->GetOne("SELECT ROUND(AVG(total)) as tt FROM `#@__tagindex`"); //取一个平均 if ($upall == 1 && $ctagid == 0) { $rr = $dsql->GetOne("SELECT * FROM `#@__tagindex` WHERE mktime <> uptime AND total > {$dd['tt']} LIMIT 1"); @@ -57,7 +56,7 @@ if (is_array($tag) && count($tag) > 0) { if ($ntotalpage <= $maxpagesize) { $dlist->MakeHtml('', ''); - $finishType = TRUE; // 生成一个TAG完成 + $finishType = TRUE; //生成一个TAG完成 } else { $reurl = $dlist->MakeHtml($mkpage, $maxpagesize); $finishType = FALSE; @@ -87,7 +86,7 @@ if (is_array($tag) && count($tag) > 0) { exit(); } else { if ($finishType) { - // 完成了一个跳到下一个 + //完成了一个跳到下一个 if ($upall == 1) { $query = "UPDATE `#@__tagindex` SET mktime=uptime WHERE id='$ctagid' "; $dsql->ExecuteNoneQuery($query); @@ -98,9 +97,9 @@ if (is_array($tag) && count($tag) > 0) { ShowMsg("成功生成TAG:[".$tag['tag']."],继续进行操作", $gourl, 0, 100); exit(); } else { - // 继续当前这个 + //继续当前这个 $gourl = "makehtml_taglist_action.php?mkpage=$mkpage&maxpagesize=$maxpagesize&tagid=$tagid&pageno=$pageno&upall=$upall&ctagid=$ctagid"; - ShowMsg("成功生成TAG:[".$tag['tag']."],继续进行操作...", $gourl, 0, 100); + ShowMsg("成功生成TAG:[".$tag['tag']."],继续进行操作", $gourl, 0, 100); exit(); } } diff --git a/src/dede/media_add.php b/src/admin/media_add.php old mode 100755 new mode 100644 similarity index 87% rename from src/dede/media_add.php rename to src/admin/media_add.php index dc0fccad..66cb921c --- a/src/dede/media_add.php +++ b/src/admin/media_add.php @@ -1,5 +1,4 @@ ExecuteNoneQuery($query); - ShowMsg('成功更改一则附件数据', 'media_edit.php?aid='.$aid); + ShowMsg('成功修改一则附件数据', 'media_edit.php?aid='.$aid); exit(); } diff --git a/src/dede/media_main.php b/src/admin/media_main.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/media_main.php rename to src/admin/media_main.php index 9b0cee1b..bf70dd1f --- a/src/dede/media_main.php +++ b/src/admin/media_main.php @@ -1,85 +1,77 @@ -0 "; -} else if ($membertype == 2) { - $addsql .= " AND u.mid>0 "; -} - -if (empty($mediatype)) { - $mediatype = 0; -} -if ($mediatype > 1) { - $addsql .= " AND u.mediatype='$membertype' "; -} -$sql = "SELECT u.aid,u.title,u.url,u.mediatype,u.filesize,u.mid,u.uptime -,a.userid AS adminname,m.userid AS membername -FROM #@__uploads u -LEFT JOIN #@__admin a ON a.id = u.mid -LEFT JOIN #@__member m ON m.mid = u.mid -$addsql ORDER BY u.aid DESC"; -$dlist = new DataListCP(); -$dlist->pageSize = 20; -$dlist->SetParameter("mediatype", $mediatype); -$dlist->SetParameter("keyword", $keyword); -$dlist->SetParameter("membertype", $membertype); -$dlist->SetTemplate(DEDEADMIN."/templets/media_main.htm"); -$dlist->SetSource($sql); -$dlist->Display(); - -function MediaType($tid, $nurl) -{ - if ($tid == 1) { - return "图片预览"; - } else if ($tid == 2) { - return "FLASH"; - } else if ($tid == 3) { - return "视频/音频"; - } else { - return "附件/其它"; - } -} - -function GetFileSize($fs) -{ - $fs = $fs / 1024; - return trim(sprintf("%10.1f", $fs)." K"); -} - -function UploadAdmin($adminid, $mid) -{ - if ($adminid != '') return $adminid; - else return $mid; -} +0 "; +} else if ($membertype == 2) { + $addsql .= " AND u.mid>0 "; +} + +if (empty($mediatype)) { + $mediatype = 0; +} +if ($mediatype > 1) { + $addsql .= " AND u.mediatype='$membertype' "; +} +$sql = "SELECT u.aid,u.title,u.url,u.mediatype,u.filesize,u.mid,u.uptime,a.userid AS adminname,m.userid AS membername +FROM #@__uploads u +LEFT JOIN #@__admin a ON a.id = u.mid +LEFT JOIN #@__member m ON m.mid = u.mid +$addsql ORDER BY u.aid DESC"; +$dlist = new DataListCP(); +$dlist->pageSize = 20; +$dlist->SetParameter("mediatype", $mediatype); +$dlist->SetParameter("keyword", $keyword); +$dlist->SetParameter("membertype", $membertype); +$dlist->SetTemplate(DEDEADMIN."/templets/media_main.htm"); +$dlist->SetSource($sql); +$dlist->Display(); +function MediaType($tid, $nurl) +{ + if ($tid == 1) { + return "图片预览"; + } else if ($tid == 2) { + return "FLASH"; + } else if ($tid == 3) { + return "视频/音频"; + } else { + return "附件/其它"; + } +} +function GetFileSize($fs) +{ + $fs = $fs / 1024; + return trim(sprintf("%10.1f", $fs)." K"); +} +function UploadAdmin($adminid, $mid) +{ + if ($adminid != '') return $adminid; + else return $mid; +} \ No newline at end of file diff --git a/src/dede/member_do.php b/src/admin/member_do.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/member_do.php rename to src/admin/member_do.php index 0e997ed1..38ed56be --- a/src/dede/member_do.php +++ b/src/admin/member_do.php @@ -1,234 +1,236 @@ -GetOne("SELECT * FROM `#@__member` WHERE mid='$id' LIMIT 1 "); - $rs = 0; - if ($row['matt'] == 10) { - $nrow = $dsql->GetOne("SELECT * FROM `#@__admin` WHERE id='$id' LIMIT 1 "); - //已经删除关连的管理员帐号 - if (!is_array($nrow)) $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid='$id' LIMIT 1"); - } else { - $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid='$id' LIMIT 1"); - } - if ($rs > 0) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid='$id' LIMIT 1"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid='$id' LIMIT 1"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid='$id' LIMIT 1"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid='$id' LIMIT 1"); - - //删除用户相关数据 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid='$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid='$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid='$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid='$id' Or fromid='$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid='$id' Or fid='$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid='$id' "); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid='$id'"); - } else { - ShowMsg("无法删除此会员,如果这个会员是[管理员]
必须先删除这个[管理员]才能删除此帐号", $ENV_GOBACK_URL, 0, 5000); - exit(); - } - } - ShowMsg("成功删除一个会员", $ENV_GOBACK_URL); - exit(); - } - $randcode = mt_rand(10000, 99999); - $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); - $wintitle = "会员管理-删除会员"; - $wecome_info = "会员管理::删除会员"; - $win = new OxWindow(); - $win->Init("member_do.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("id", $id); - $win->AddHidden("randcode", $randcode); - $win->AddHidden("safecode", $safecode); - $win->AddTitle("您确实要删除(ID:".$id.")这个会员?"); - $win->AddMsgItem("安全验证串: (复制本代码: $safecode )", "30"); - $winform = $win->GetWindow("ok"); - $win->Display(); -} else if ($dopost == "delmembers") { - CheckPurview('member_Del'); - if ($fmdo == 'yes') { - $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); - if ($safecodeok != $safecode) { - ShowMsg("请填写正确的安全验证串", "member_do.php?id={$id}&dopost=delmembers"); - exit(); - } - if (!empty($id)) { - //删除用户信息 - - $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid IN (".str_replace("`", ",", $id).") And matt<>10 "); - if ($rs > 0) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid IN (".str_replace("`", ",", $id).") "); - - //删除用户相关数据 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid IN (".str_replace("`", ",", $id).") Or fromid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid IN (".str_replace("`", ",", $id).") Or fid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid IN (".str_replace("`", ",", $id).") "); - $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid IN (".str_replace("`", ",", $id).")"); - } else { - ShowMsg("无法删除此会员,如果这个会员是管理员关连的ID,
必须先删除这个管理员才能删除此帐号", $ENV_GOBACK_URL, 0, 3000); - exit(); - } - } - ShowMsg("成功删除这些会员", $ENV_GOBACK_URL); - exit(); - } - $randcode = mt_rand(10000, 99999); - $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); - $wintitle = "会员管理-删除会员"; - $wecome_info = "会员管理::删除会员"; - $win = new OxWindow(); - $win->Init("member_do.php", "js/blank.js", "POST"); - $win->AddHidden("fmdo", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("id", $id); - $win->AddHidden("randcode", $randcode); - $win->AddHidden("safecode", $safecode); - $win->AddTitle("您确实要删除(ID:".$id.")这个会员?"); - $win->AddMsgItem(" 安全验证串: (复制本代码: $safecode)", "30"); - $winform = $win->GetWindow("ok"); - $win->Display(); -} -/*---------------- -function __Recommend() -推荐会员 -----------------*/ else if ($dopost == "recommend") { - CheckPurview('member_Edit'); - $id = preg_replace("#[^0-9]#", "", $id); - if ($matt == 0) { - $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=1 WHERE mid='$id' AND matt<>10 LIMIT 1"); - ShowMsg("成功设置一个会员推荐", $ENV_GOBACK_URL); - exit(); - } else { - $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=0 WHERE mid='$id' AND matt<>10 LIMIT 1"); - ShowMsg("成功取消一个会员推荐", $ENV_GOBACK_URL); - exit(); - } -} -/*---------------- -function __EditUser() -更改会员 -----------------*/ else if ($dopost == 'edituser') { - CheckPurview('member_Edit'); - if (!isset($_POST['id'])) exit('Request Error!'); - $pwdsql = empty($pwd) ? '' : ",pwd='".md5($pwd)."'"; - if (empty($sex)) $sex = '男'; - $uptime = GetMkTime($uptime); - - if ($matt == 10 && $oldmatt != 10) { - ShowMsg("对不起,为安全起见,不支持直接把前台会员转为管理的操作", "-1"); - exit(); - } - $query = "UPDATE `#@__member` SET - email = '$email', - uname = '$uname', - sex = '$sex', - matt = '$matt', - money = '$money', - scores = '$scores', - rank = '$rank', - spacesta='$spacesta', - uptime='$uptime', - exptime='$exptime' - $pwdsql - WHERE mid='$id' AND matt<>10 "; - $rs = $dsql->ExecuteNoneQuery2($query); - if ($rs == 0) { - $query = "UPDATE `#@__member` SET - email = '$email', - uname = '$uname', - sex = '$sex', - money = '$money', - scores = '$scores', - rank = '$rank', - spacesta='$spacesta', - uptime='$uptime', - exptime='$exptime' - $pwdsql - WHERE mid='$id' "; - $rs = $dsql->ExecuteNoneQuery2($query); - } - - ShowMsg('成功更改会员资料', 'member_view.php?id='.$id); - exit(); -} -/*-------------- -function __LoginCP() -登录会员的控制面板 -----------*/ else if ($dopost == "memberlogin") { - CheckPurview('member_Edit'); - PutCookie('DedeUserID', $id, 1800); - PutCookie('DedeLoginTime', time(), 1800); - if (empty($jumpurl)) header("location:../member/index.php"); - else header("location:$jumpurl"); -} else if ($dopost == "deoperations") { - $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); - $nid = explode(',', $nid); - if (is_array($nid)) { - foreach ($nid as $var) { - $query = "DELETE FROM `#@__member_operation` WHERE aid = '$var'"; - $dsql->ExecuteNoneQuery($query); - } - ShowMsg("删除成功", "member_operations.php"); - exit(); - } -} else if ($dopost == "upoperations") { - $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); - $nid = explode(',', $nid); - if (is_array($nid)) { - foreach ($nid as $var) { - $query = "UPDATE `#@__member_operation` SET sta = '1' WHERE aid = '$var'"; - $dsql->ExecuteNoneQuery($query); - ShowMsg("设置成功", "member_operations.php"); - exit(); - } - } -} else if ($dopost == "okoperations") { - $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); - $nid = explode(',', $nid); - if (is_array($nid)) { - foreach ($nid as $var) { - $query = "UPDATE `#@__member_operation` SET sta = '2' WHERE aid = '$var'"; - $dsql->ExecuteNoneQuery($query); - ShowMsg("设置成功", "member_operations.php"); - exit(); - } - } -} +GetOne("SELECT * FROM `#@__member` WHERE mid='$id' LIMIT 1 "); + $rs = 0; + if ($row['matt'] == 10) { + $nrow = $dsql->GetOne("SELECT * FROM `#@__admin` WHERE id='$id' LIMIT 1 "); + //已经删除关连的管理员帐号 + if (!is_array($nrow)) $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid='$id' LIMIT 1"); + } else { + $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid='$id' LIMIT 1"); + } + if ($rs > 0) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid='$id' LIMIT 1"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid='$id' LIMIT 1"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid='$id' LIMIT 1"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid='$id' LIMIT 1"); + + //删除用户相关数据 + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid='$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid='$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid='$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid='$id' Or fromid='$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid='$id' Or fid='$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid='$id' "); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid='$id'"); + } else { + ShowMsg("无法删除此会员,如果这个会员是[管理员]
必须先删除这个[管理员]才能删除此帐号", $ENV_GOBACK_URL, 0, 5000); + exit(); + } + } + ShowMsg("成功删除一个会员", $ENV_GOBACK_URL); + exit(); + } + $randcode = mt_rand(10000, 99999); + $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); + $wintitle = "会员管理-删除会员"; + $wecome_info = "会员管理::删除会员"; + $win = new OxWindow(); + $win->Init("member_do.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("id", $id); + $win->AddHidden("randcode", $randcode); + $win->AddHidden("safecode", $safecode); + $win->AddTitle("您确实要删除(ID:".$id.")这个会员?"); + $win->AddMsgItem("安全验证串: (复制本代码:$safecode )", "30"); + $winform = $win->GetWindow("ok"); + $win->Display(); +} else if ($dopost == "delmembers") { + CheckPurview('member_Del'); + if ($fmdo == 'yes') { + $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); + if ($safecodeok != $safecode) { + ShowMsg("请填写正确的安全验证串", "member_do.php?id={$id}&dopost=delmembers"); + exit(); + } + if (!empty($id)) { + //删除用户信息 + + $rs = $dsql->ExecuteNoneQuery2("DELETE FROM `#@__member` WHERE mid IN (".str_replace("`", ",", $id).") And matt<>10 "); + if ($rs > 0) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_tj` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_space` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_company` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_person` WHERE mid IN (".str_replace("`", ",", $id).") "); + + //删除用户相关数据 + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_stow` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_flink` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_operation` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE toid IN (".str_replace("`", ",", $id).") Or fromid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_friends` WHERE mid IN (".str_replace("`", ",", $id).") Or fid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE mid IN (".str_replace("`", ",", $id).") "); + $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET mid='0' WHERE mid IN (".str_replace("`", ",", $id).")"); + } else { + ShowMsg("无法删除此会员,如果这个会员是管理员关连的ID,
必须先删除这个管理员才能删除此帐号", $ENV_GOBACK_URL, 0, 3000); + exit(); + } + } + ShowMsg("成功删除这些会员", $ENV_GOBACK_URL); + exit(); + } + $randcode = mt_rand(10000, 99999); + $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); + $wintitle = "会员管理-删除会员"; + $wecome_info = "会员管理::删除会员"; + $win = new OxWindow(); + $win->Init("member_do.php", "js/blank.js", "POST"); + $win->AddHidden("fmdo", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("id", $id); + $win->AddHidden("randcode", $randcode); + $win->AddHidden("safecode", $safecode); + $win->AddTitle("您确实要删除(ID:".$id.")这个会员?"); + $win->AddMsgItem(" 安全验证串: (复制本代码:$safecode)", "30"); + $winform = $win->GetWindow("ok"); + $win->Display(); +} +/*---------------- +function __Recommend() +推荐会员 +----------------*/ +else if ($dopost == "recommend") { + CheckPurview('member_Edit'); + $id = preg_replace("#[^0-9]#", "", $id); + if ($matt == 0) { + $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=1 WHERE mid='$id' AND matt<>10 LIMIT 1"); + ShowMsg("成功设置一个会员推荐", $ENV_GOBACK_URL); + exit(); + } else { + $dsql->ExecuteNoneQuery("UPDATE `#@__member` SET matt=0 WHERE mid='$id' AND matt<>10 LIMIT 1"); + ShowMsg("成功取消一个会员推荐", $ENV_GOBACK_URL); + exit(); + } +} +/*---------------- +function __EditUser() +修改会员 +----------------*/ +else if ($dopost == 'edituser') { + CheckPurview('member_Edit'); + if (!isset($_POST['id'])) exit('dedebiz'); + $pwdsql = empty($pwd) ? '' : ",pwd='".md5($pwd)."'"; + if (empty($sex)) $sex = '男'; + $uptime = GetMkTime($uptime); + + if ($matt == 10 && $oldmatt != 10) { + ShowMsg("对不起,为安全起见,不支持直接把前台会员转为管理的操作", "-1"); + exit(); + } + $query = "UPDATE `#@__member` SET + email = '$email', + uname = '$uname', + sex = '$sex', + matt = '$matt', + money = '$money', + scores = '$scores', + `rank` = '$rank', + spacesta='$spacesta', + uptime='$uptime', + exptime='$exptime' + $pwdsql + WHERE mid='$id' AND matt<>10 "; + $rs = $dsql->ExecuteNoneQuery2($query); + if ($rs == 0) { + $query = "UPDATE `#@__member` SET + email = '$email', + uname = '$uname', + sex = '$sex', + money = '$money', + scores = '$scores', + `rank` = '$rank', + spacesta='$spacesta', + uptime='$uptime', + exptime='$exptime' + $pwdsql + WHERE mid='$id' "; + $rs = $dsql->ExecuteNoneQuery2($query); + } + + ShowMsg('成功修改会员资料', 'member_view.php?id='.$id); + exit(); +} +/*-------------- +function __LoginCP() +登录会员的控制面板 +----------*/ +else if ($dopost == "memberlogin") { + CheckPurview('member_Edit'); + PutCookie('DedeUserID', $id, 1800); + PutCookie('DedeLoginTime', time(), 1800); + if (empty($jumpurl)) header("location:../user/index.php"); + else header("location:$jumpurl"); +} else if ($dopost == "deoperations") { + $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); + $nid = explode(',', $nid); + if (is_array($nid)) { + foreach ($nid as $var) { + $query = "DELETE FROM `#@__member_operation` WHERE aid = '$var'"; + $dsql->ExecuteNoneQuery($query); + } + ShowMsg("删除成功", "member_operations.php"); + exit(); + } +} else if ($dopost == "upoperations") { + $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); + $nid = explode(',', $nid); + if (is_array($nid)) { + foreach ($nid as $var) { + $query = "UPDATE `#@__member_operation` SET sta = '1' WHERE aid = '$var'"; + $dsql->ExecuteNoneQuery($query); + ShowMsg("设置成功", "member_operations.php"); + exit(); + } + } +} else if ($dopost == "okoperations") { + $nid = preg_replace('#[^0-9,]#', '', preg_replace('#`#', ',', $nid)); + $nid = explode(',', $nid); + if (is_array($nid)) { + foreach ($nid as $var) { + $query = "UPDATE `#@__member_operation` SET sta = '2' WHERE aid = '$var'"; + $dsql->ExecuteNoneQuery($query); + ShowMsg("设置成功", "member_operations.php"); + exit(); + } + } +} diff --git a/src/dede/member_main.php b/src/admin/member_main.php old mode 100755 new mode 100644 similarity index 88% rename from src/dede/member_main.php rename to src/admin/member_main.php index 0ce0d9ba..81b42b03 --- a/src/dede/member_main.php +++ b/src/admin/member_main.php @@ -1,102 +1,101 @@ -类型\r\n" : "\r\n"; -$sexform = empty($sex) ? "\r\n" : "\r\n"; -$sortkey = empty($sortkey) ? 'mid' : preg_replace("#[^a-z]#i", '', $sortkey); - -$staArr = array(-2 => '限制用户(禁言)', -1 => '未通过审核', 0 => '审核通过,提示填写完整信息', 1 => '没填写详细资料', 2 => '正常使用状态'); -$staArrmatt = array(1 => '被推荐', 0 => '非普通 '); -$MemberTypes = array(); -$dsql->SetQuery("Select `rank`,`membername` From `#@__arcrank` where `rank`>0 "); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $MemberTypes[$row->rank] = $row->membername; -} - -if ($sortkey == 'mid') { - $sortform = "\r\n"; -} else if ($sortkey == 'rank') { - $sortform = "\r\n"; -} else if ($sortkey == 'money') { - $sortform = "\r\n"; -} else if ($sortkey == 'scores') { - $sortform = "\r\n"; -} else { - $sortform = "\r\n"; -} - -$wheres[] = " (userid LIKE '%$keyword%' OR uname LIKE '%$keyword%' OR email LIKE '%$keyword%') "; - -if ($sex != '') { - $wheres[] = " sex LIKE '$sex' "; -} - -if ($mtype != '') { - $wheres[] = " mtype LIKE '$mtype' "; -} - -if ($spacesta != -10) { - $wheres[] = " spacesta = '$spacesta' "; -} - -if ($matt != 10) { - $wheres[] = " matt= '$matt' "; -} - -$whereSql = join(' AND ', $wheres); -if ($whereSql != '') { - $whereSql = ' WHERE '.$whereSql; -} - -$sql = "SELECT * FROM `#@__member` $whereSql ORDER BY $sortkey DESC "; -$dlist = new DataListCP(); -$dlist->SetParameter('sex', $sex); -$dlist->SetParameter('spacesta', $spacesta); -$dlist->SetParameter('matt', $matt); -$dlist->SetParameter('mtype', $mtype); -$dlist->SetParameter('sortkey', $sortkey); -$dlist->SetParameter('keyword', $keyword); -$dlist->SetTemplet(DEDEADMIN."/templets/member_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); - -function GetMemberName($rank, $mt) -{ - global $MemberTypes; - if (isset($MemberTypes[$rank])) { - if ($mt == 'ut') return " 待升级:".$MemberTypes[$rank].""; - else return $MemberTypes[$rank]; - } else { - if ($mt == 'ut') return ''; - else return $mt; - } -} - -function GetMAtt($m) -{ - if ($m < 1) return ''; - else if ($m == 10) return " [管理员]"; - else return " [荐]"; -} +类型\r\n" : "\r\n"; +$sexform = empty($sex) ? "\r\n" : "\r\n"; +$sortkey = empty($sortkey) ? 'mid' : preg_replace("#[^a-z]#i", '', $sortkey); + +$staArr = array(-2 => '限制用户(禁言)', -1 => '未通过审核', 0 => '审核通过,提示填写完整信息', 1 => '没填写详细资料', 2 => '正常使用状态'); +$staArrmatt = array(1 => '被推荐', 0 => '非普通 '); +$MemberTypes = array(); +$dsql->SetQuery("Select `rank`,membername From `#@__arcrank` where `rank`>0 "); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $MemberTypes[$row->rank] = $row->membername; +} + +if ($sortkey == 'mid') { + $sortform = "\r\n"; +} else if ($sortkey == 'rank') { + $sortform = "\r\n"; +} else if ($sortkey == 'money') { + $sortform = "\r\n"; +} else if ($sortkey == 'scores') { + $sortform = "\r\n"; +} else { + $sortform = "\r\n"; +} + +$wheres[] = " (userid LIKE '%$keyword%' OR uname LIKE '%$keyword%' OR email LIKE '%$keyword%') "; + +if ($sex != '') { + $wheres[] = " sex LIKE '$sex' "; +} + +if ($mtype != '') { + $wheres[] = " mtype LIKE '$mtype' "; +} + +if ($spacesta != -10) { + $wheres[] = " spacesta = '$spacesta' "; +} + +if ($matt != 10) { + $wheres[] = " matt= '$matt' "; +} + +$whereSql = join(' AND ', $wheres); +if ($whereSql != '') { + $whereSql = ' WHERE '.$whereSql; +} + +$sql = "SELECT * FROM `#@__member` $whereSql ORDER BY $sortkey DESC "; +$dlist = new DataListCP(); +$dlist->SetParameter('sex', $sex); +$dlist->SetParameter('spacesta', $spacesta); +$dlist->SetParameter('matt', $matt); +$dlist->SetParameter('mtype', $mtype); +$dlist->SetParameter('sortkey', $sortkey); +$dlist->SetParameter('keyword', $keyword); +$dlist->SetTemplet(DEDEADMIN."/templets/member_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); + +function GetMemberName($rank, $mt) +{ + global $MemberTypes; + if (isset($MemberTypes[$rank])) { + if ($mt == 'ut') return " 待升级:".$MemberTypes[$rank].""; + else return $MemberTypes[$rank]; + } else { + if ($mt == 'ut') return ''; + else return $mt; + } +} + +function GetMAtt($m) +{ + if ($m < 1) return ''; + else if ($m == 10) return " [管理员]"; + else return " [荐]"; +} diff --git a/src/dede/member_operations.php b/src/admin/member_operations.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/member_operations.php rename to src/admin/member_operations.php index 4f6411a6..15773853 --- a/src/dede/member_operations.php +++ b/src/admin/member_operations.php @@ -1,72 +1,71 @@ -pageSize = 25; -$dlist->SetParameter("buyid", $buyid); -if (isset($sta)) $dlist->SetParameter("sta", $sta); - -$dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); -$dlist->dsql->Execute('ts'); -while ($rw = $dlist->dsql->GetArray('ts')) { - $TypeNames[$rw['tid']] = $rw['pname']; -} -$tplfile = DEDEADMIN."/templets/member_operations.htm"; - -//这两句的顺序不能更换 -$dlist->SetTemplate($tplfile); //载入模板 -$dlist->SetSource($sql); //设定查询SQL -$dlist->Display(); //显示 - -function GetMemberID($mid) -{ - global $dsql; - if ($mid == 0) { - return '0'; - } - $row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); - if (is_array($row)) { - return "".$row['userid'].""; - } else { - return '0'; - } -} - -function GetPType($tname) -{ - if ($tname == 'card') return '点数卡'; - else if ($tname == 'archive') return '购买文章'; - else if ($tname == 'stc') return '兑换金币'; - else return '会员升级'; -} - -function GetSta($sta) -{ - if ($sta == 0) { - return '未付款'; - } else if ($sta == 1) { - return '已付款'; - } else { - return '已完成'; - } -} +pageSize = 25; +$dlist->SetParameter("buyid", $buyid); +if (isset($sta)) $dlist->SetParameter("sta", $sta); + +$dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); +$dlist->dsql->Execute('ts'); +while ($rw = $dlist->dsql->GetArray('ts')) { + $TypeNames[$rw['tid']] = $rw['pname']; +} +$tplfile = DEDEADMIN."/templets/member_operations.htm"; + +//这两句的顺序不能更换 +$dlist->SetTemplate($tplfile); //载入模板 +$dlist->SetSource($sql); //设定查询SQL +$dlist->Display(); //显示 + +function GetMemberID($mid) +{ + global $dsql; + if ($mid == 0) { + return '0'; + } + $row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); + if (is_array($row)) { + return "".$row['userid'].""; + } else { + return '0'; + } +} + +function GetPType($tname) +{ + if ($tname == 'card') return '点数卡'; + else if ($tname == 'archive') return '购买文章'; + else if ($tname == 'stc') return '兑换金币'; + else return '会员升级'; +} + +function GetSta($sta) +{ + if ($sta == 0) { + return '未付款'; + } else if ($sta == 1) { + return '已付款'; + } else { + return '已完成'; + } +} diff --git a/src/dede/member_pm.php b/src/admin/member_pm.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/member_pm.php rename to src/admin/member_pm.php index ae3ebc39..4c3c7aba --- a/src/dede/member_pm.php +++ b/src/admin/member_pm.php @@ -1,61 +1,60 @@ -ExecuteNoneQuery("DELETE FROM #@__member_pms WHERE id='$ID'"); - } -} - -$whereSql = ''; -if (!empty($folder)) $whereSql = "WHERE folder='$folder'"; -$postuser = "收件人"; -if ($folder == "inbox" || $folder == '') $postuser = "发件人"; - -if (!empty($keyword)) { - $whereSql .= " AND (subject like '%".$keyword."%' OR message like '%".$keyword."%')"; -} -if (!empty($username)) { - $whereSql .= " AND floginid like '%".$username."%'"; -} -$sql = "SELECT * FROM #@__member_pms $whereSql ORDER BY sendtime desc"; -$dlist = new DataListCP(); -$dlist->pagesize = 25; -$dlist->SetParameter("folder", $folder); -$dlist->SetParameter("username", $username); -$dlist->SetParameter("keyword", $keyword); -$dlist->SetTemplate(DEDEADMIN."/templets/member_pm.htm"); -$dlist->SetSource($sql); -$dlist->Display(); -$dlist->Close(); - -function GetFolders($me) -{ - if ($me == "outbox") return '发件箱'; - else if ($me == "inbox") return '收件箱'; -} - -function IsReader($me) -{ - $me = preg_replace("#[^0-1]#", "", $me); - if ($me) return ""; - else return "×"; -} +ExecuteNoneQuery("DELETE FROM #@__member_pms WHERE id='$ID'"); + } +} + +$whereSql = ''; +if (!empty($folder)) $whereSql = "WHERE folder='$folder'"; +$postuser = "收件人"; +if ($folder == "inbox" || $folder == '') $postuser = "发件人"; + +if (!empty($keyword)) { + $whereSql .= " AND (subject like '%".$keyword."%' OR message like '%".$keyword."%')"; +} +if (!empty($username)) { + $whereSql .= " AND floginid like '%".$username."%'"; +} +$sql = "SELECT * FROM #@__member_pms $whereSql ORDER BY sendtime desc"; +$dlist = new DataListCP(); +$dlist->pagesize = 25; +$dlist->SetParameter("folder", $folder); +$dlist->SetParameter("username", $username); +$dlist->SetParameter("keyword", $keyword); +$dlist->SetTemplate(DEDEADMIN."/templets/member_pm.htm"); +$dlist->SetSource($sql); +$dlist->Display(); +$dlist->Close(); + +function GetFolders($me) +{ + if ($me == "outbox") return '发件箱'; + else if ($me == "inbox") return '收件箱'; +} + +function IsReader($me) +{ + $me = preg_replace("#[^0-1]#", "", $me); + if ($me) return ""; + else return "×"; +} diff --git a/src/dede/member_pmall.php b/src/admin/member_pmall.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/member_pmall.php rename to src/admin/member_pmall.php index 1dae18f4..058a22a4 --- a/src/dede/member_pmall.php +++ b/src/admin/member_pmall.php @@ -1,37 +1,36 @@ -ExecuteNoneQuery("INSERT INTO `#@__member_pms`(floginid,fromid,toid,tologinid,folder,hasview,subject,sendtime,writetime,message,isadmin) VALUES('$floginid','$fromid','$toid','$tologinid','outbox','0','$subject','$sendtime','$writetime','$message','1');"); - ShowMsg('短信已成功发送', '-1'); - exit(); -} -require_once(DEDEADMIN."/templets/member_pmall.htm"); +ExecuteNoneQuery("INSERT INTO `#@__member_pms`(floginid,fromid,toid,tologinid,folder,hasview,subject,sendtime,writetime,message,isadmin) VALUES('$floginid','$fromid','$toid','$tologinid','outbox','0','$subject','$sendtime','$writetime','$message','1');"); + ShowMsg('短信已成功发送', '-1'); + exit(); +} +require_once(DEDEADMIN."/templets/member_pmall.htm"); diff --git a/src/dede/member_pmone.php b/src/admin/member_pmone.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/member_pmone.php rename to src/admin/member_pmone.php index d164d94c..f0ba11de --- a/src/dede/member_pmone.php +++ b/src/admin/member_pmone.php @@ -1,81 +1,80 @@ - 0x80) { - if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) { - $i++; - } else { - return $msgtitle.'可能含有乱码,建议您改用英文字母和数字组合'; - } - } else { - if (preg_match("#[^0-9a-z@\.-]i#", $ck_uid[$i])) { - return $msgtitle.'不能含有 [@]、[.]、[-]以外的特殊符号'; - } - } - } - if ($ckhas) { - $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE userid LIKE '$uid' "); - if (is_array($row)) return $msgtitle."已经存在"; - } - return 'ok'; -} - -if (!isset($action)) $action = ''; -if ($action == "post") { - $floginid = $cuserLogin->getUserName(); - $fromid = $cuserLogin->getUserID(); - if ($subject == '') { - ShowMsg("请填写信息标题!", "-1"); - exit(); - } - $msg = CheckUserID($msgtoid, "用户名", false); - if ($msg != 'ok') { - ShowMsg($msg, "-1"); - exit(); - } - $row = $dsql->GetOne("Select * From `#@__member` where userid like '$msgtoid' "); - if (!is_array($row)) { - ShowMsg("您指定的用户不存在,不能发送信息!", "-1"); - exit(); - } - $subject = cn_substrR(HtmlReplace($subject, 1), 60); - $message = cn_substrR(HtmlReplace($message, 0), 1024); - $sendtime = $writetime = time(); - - //发给收件人(收件人可管理) - $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) - VALUES ('$floginid','$fromid','{$row['mid']}','{$row['userid']}','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; - - $dsql->ExecuteNoneQuery($inquery); - ShowMsg('短信已成功发送', 'member_pmone.php'); - exit(); -} -require_once(DEDEADMIN."/templets/member_pmone.htm"); + 0x80) { + if (isset($ck_uid[$i + 1]) && ord($ck_uid[$i + 1]) > 0x40) { + $i++; + } else { + return $msgtitle.'可能含有乱码,建议您改用英文字母和数字组合'; + } + } else { + if (preg_match("#[^0-9a-z@\.-]i#", $ck_uid[$i])) { + return $msgtitle.'不能含有 [@]、[.]、[-]以外的特殊符号'; + } + } + } + if ($ckhas) { + $row = $dsql->GetOne("SELECT * FROM `#@__member` WHERE userid LIKE '$uid' "); + if (is_array($row)) return $msgtitle."已经存在"; + } + return 'ok'; +} + +if (!isset($action)) $action = ''; +if ($action == "post") { + $floginid = $cuserLogin->getUserName(); + $fromid = $cuserLogin->getUserID(); + if ($subject == '') { + ShowMsg("请填写信息标题!", "-1"); + exit(); + } + $msg = CheckUserID($msgtoid, "用户名", false); + if ($msg != 'ok') { + ShowMsg($msg, "-1"); + exit(); + } + $row = $dsql->GetOne("Select * From `#@__member` where userid like '$msgtoid' "); + if (!is_array($row)) { + ShowMsg("您指定的用户不存在,不能发送信息!", "-1"); + exit(); + } + $subject = cn_substrR(HtmlReplace($subject, 1), 60); + $message = cn_substrR(HtmlReplace($message, 0), 1024); + $sendtime = $writetime = time(); + + //发给收件人(收件人可管理) + $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) + VALUES ('$floginid','$fromid','{$row['mid']}','{$row['userid']}','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; + + $dsql->ExecuteNoneQuery($inquery); + ShowMsg('短信已成功发送', 'member_pmone.php'); + exit(); +} +require_once(DEDEADMIN."/templets/member_pmone.htm"); diff --git a/src/dede/member_rank.php b/src/admin/member_rank.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/member_rank.php rename to src/admin/member_rank.php index 5f40913b..c5445265 --- a/src/dede/member_rank.php +++ b/src/admin/member_rank.php @@ -1,52 +1,51 @@ - 0) { - $query = "UPDATE `#@__arcrank` SET membername='$name',money='$money',`rank`='$rank',scores='$scores' WHERE id='$id' "; - } - } else { - $query = "DELETE FROM `#@__arcrank` WHERE id='$id' AND `rank`<>10"; - } - if ($query != '') $dsql->ExecuteNoneQuery($query); - } - if (isset($check_new)) { - if ($rank_new > 0 && $name_new != '' && $rank_new > 10) { - $inquery = "INSERT INTO `#@__arcrank`(`rank`,`membername`,`adminrank`,`money`,`scores`,`purviews`) VALUES('$rank_new','$name_new','5','$money_new','$scores',''); "; - $dsql->ExecuteNoneQuery($inquery); - } - } - echo ""; -} -if ($dopost == 'del') { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arcrank` WHERE id='$id' AND `rank`<>10"); - ShowMsg("删除成功", "member_rank.php"); - exit(); -} - -$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>0 ORDER BY `rank`"); -$dsql->Execute(); -include DedeInclude('templets/member_rank.htm'); + 0) { + $query = "UPDATE `#@__arcrank` SET membername='$name',money='$money',`rank`='$rank',scores='$scores' WHERE id='$id' "; + } + } else { + $query = "DELETE FROM `#@__arcrank` WHERE id='$id' AND `rank`<>10"; + } + if ($query != '') $dsql->ExecuteNoneQuery($query); + } + if (isset($check_new)) { + if ($rank_new > 0 && $name_new != '' && $rank_new > 10) { + $inquery = "INSERT INTO `#@__arcrank`(`rank`,`membername`,`adminrank`,`money`,`scores`,`purviews`) VALUES('$rank_new','$name_new','5','$money_new','$scores',''); "; + $dsql->ExecuteNoneQuery($inquery); + } + } + echo ""; +} +if ($dopost == 'del') { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arcrank` WHERE id='$id' AND `rank`<>10"); + ShowMsg("删除成功", "member_rank.php"); + exit(); +} + +$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>0 ORDER BY `rank`"); +$dsql->Execute(); +include DedeInclude('templets/member_rank.htm'); diff --git a/src/dede/member_scores.php b/src/admin/member_scores.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/member_scores.php rename to src/admin/member_scores.php index 2b3d24e8..9a74e793 --- a/src/dede/member_scores.php +++ b/src/admin/member_scores.php @@ -1,46 +1,45 @@ -ExecuteNoneQuery("INSERT INTO `#@__scores`(integral,icon,titles,isdefault) VALUES('$integral','$add_icon','$add_titles','$add_isdefault')"); - } - foreach ($_POST as $rk => $rv) { - if (preg_match("#-#", $rk)) { - $ID = preg_replace("#[^0-9]#", "", $rk); - $fildes = preg_replace("#[^a-z]#", "", $rk); - $k = $$rk; - if (empty($k)) { - $k = 0; - } - $sql = $fildes."='".$k."'"; - $dsql->ExecuteNoneQuery("UPDATE `#@__scores` SET ".$sql." WHERE id='{$ID}'"); - if (preg_match("#Ids-#", $rk)) { - if ($k) $dsql->ExecuteNoneQuery("DELETE FROM `#@__scores` WHERE id='$ID'"); - } - } - } -} - -$Scores = array(); -$dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC"); -$dsql->Execute(); -while ($rs = $dsql->GetArray()) { - array_push($Scores, $rs); -} -include DedeInclude('templets/member_scores.htm'); +ExecuteNoneQuery("INSERT INTO `#@__scores`(integral,icon,titles,isdefault) VALUES('$integral','$add_icon','$add_titles','$add_isdefault')"); + } + foreach ($_POST as $rk => $rv) { + if (preg_match("#-#", $rk)) { + $ID = preg_replace("#[^0-9]#", "", $rk); + $fildes = preg_replace("#[^a-z]#", "", $rk); + $k = $$rk; + if (empty($k)) { + $k = 0; + } + $sql = $fildes."='".$k."'"; + $dsql->ExecuteNoneQuery("UPDATE `#@__scores` SET ".$sql." WHERE id='{$ID}'"); + if (preg_match("#Ids-#", $rk)) { + if ($k) $dsql->ExecuteNoneQuery("DELETE FROM `#@__scores` WHERE id='$ID'"); + } + } + } +} + +$Scores = array(); +$dsql->SetQuery("SELECT * FROM `#@__scores` ORDER BY id ASC"); +$dsql->Execute(); +while ($rs = $dsql->GetArray()) { + array_push($Scores, $rs); +} +include DedeInclude('templets/member_scores.htm'); diff --git a/src/dede/member_toadmin.php b/src/admin/member_toadmin.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/member_toadmin.php rename to src/admin/member_toadmin.php index 686f359e..8be4132d --- a/src/dede/member_toadmin.php +++ b/src/admin/member_toadmin.php @@ -1,95 +1,94 @@ -GetOne("SELECT * FROM #@__member WHERE mid='$id'"); - $password = $row['pwd']; - $inputpwd = ",pwd"; - $pwd = substr($password, 5, 20); - $inputpwdv = ",'".$pwd."'"; - $pwdm = ",pwd='".$password."'"; - } - $typeids = (empty($typeids)) ? "" : $typeids; - if ($typeids == '') { - ShowMsg("请为该管理员指定管理栏目", "member_toadmin.php?id={$id}"); - exit(); - } - $typeid = join(',', $typeids); - if ($typeid == '0') $typeid = ''; - if ($id != 1) { - $query = "INSERT INTO `#@__admin`(id,usertype,userid$inputpwd,uname,typeid,tname,email) - VALUES('$id','$usertype','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; - } else { - $query = "INSERT INTO `#@__admin`(id,userid$inputpwd,uname,typeid,tname,email) - VALUES('$id','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; - } - $dsql->ExecuteNoneQuery($query); - $query = "UPDATE `#@__member` SET rank='100',uname='$uname',matt='10',email='$email'$pwdm WHERE mid='$id'"; - $dsql->ExecuteNoneQuery($query); - $row = $dsql->GetOne("SELECT * FROM #@__admintype WHERE rank='$usertype'"); - $floginid = $cuserLogin->getUserName(); - $fromid = $cuserLogin->getUserID(); - $subject = "恭喜您已经成功提升为管理员"; - $message = "亲爱的会员{$userid},您已经成功提升为{$row['typename']},具体操作权限请同网站超级管理员联系。"; - $sendtime = $writetime = time(); - $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) - VALUES ('$floginid','$fromid','$id','$userid','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; - $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功升级一个帐户", "member_main.php"); - exit(); -} -$id = preg_replace("#[^0-9]#", "", $id); - -//显示用户信息 -$randcode = mt_rand(10000, 99999); -$safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); -$typeOptions = ''; -$typeid = (empty($typeid)) ? '' : $typeid; -$typeids = explode(',', $typeid); -$dsql->SetQuery("SELECT id,typename FROM `#@__arctype` WHERE reid=0 AND (ispart=0 OR ispart=1)"); -$dsql->Execute('op'); -while ($nrow = $dsql->GetObject('op')) { - $typeOptions .= "\r\n"; - $dsql->SetQuery("SELECT id,typename FROM #@__arctype WHERE reid={$nrow->id} AND (ispart=0 OR ispart=1)"); - $dsql->Execute('s'); - while ($nrow = $dsql->GetObject('s')) { - $typeOptions .= "\r\n"; - } -} -$row = $dsql->GetOne("SELECT * FROM #@__member WHERE mid='$id'"); -include DedeInclude('templets/member_toadmin.htm'); +GetOne("SELECT * FROM #@__member WHERE mid='$id'"); + $password = $row['pwd']; + $inputpwd = ",pwd"; + $pwd = substr($password, 5, 20); + $inputpwdv = ",'".$pwd."'"; + $pwdm = ",pwd='".$password."'"; + } + $typeids = (empty($typeids)) ? "" : $typeids; + if ($typeids == '') { + ShowMsg("请为该管理员指定管理栏目", "member_toadmin.php?id={$id}"); + exit(); + } + $typeid = join(',', $typeids); + if ($typeid == '0') $typeid = ''; + if ($id != 1) { + $query = "INSERT INTO `#@__admin`(id,usertype,userid$inputpwd,uname,typeid,tname,email) + VALUES('$id','$usertype','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; + } else { + $query = "INSERT INTO `#@__admin`(id,userid$inputpwd,uname,typeid,tname,email) + VALUES('$id','$userid'$inputpwdv,'$uname','$typeid','$tname','$email')"; + } + $dsql->ExecuteNoneQuery($query); + $query = "UPDATE `#@__member` SET `rank`='100',uname='$uname',matt='10',email='$email'$pwdm WHERE mid='$id'"; + $dsql->ExecuteNoneQuery($query); + $row = $dsql->GetOne("SELECT * FROM `#@__admintype` WHERE `rank`='$usertype'"); + $floginid = $cuserLogin->getUserName(); + $fromid = $cuserLogin->getUserID(); + $subject = "恭喜您已经成功提升为管理员"; + $message = "亲爱的会员{$userid},您已经成功提升为{$row['typename']},具体操作权限请同网站超级管理员联系"; + $sendtime = $writetime = time(); + $inquery = "INSERT INTO `#@__member_pms` (`floginid`,`fromid`,`toid`,`tologinid`,`folder`,`subject`,`sendtime`,`writetime`,`hasview`,`isadmin`,`message`) + VALUES ('$floginid','$fromid','$id','$userid','inbox','$subject','$sendtime','$writetime','0','0','$message'); "; + $dsql->ExecuteNoneQuery($inquery); + ShowMsg("成功升级一个帐户", "member_main.php"); + exit(); +} +$id = preg_replace("#[^0-9]#", "", $id); + +//显示用户信息 +$randcode = mt_rand(10000, 99999); +$safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); +$typeOptions = ''; +$typeid = (empty($typeid)) ? '' : $typeid; +$typeids = explode(',', $typeid); +$dsql->SetQuery("SELECT id,typename FROM `#@__arctype` WHERE reid=0 AND (ispart=0 OR ispart=1)"); +$dsql->Execute('op'); +while ($nrow = $dsql->GetObject('op')) { + $typeOptions .= "\r\n"; + $dsql->SetQuery("SELECT id,typename FROM #@__arctype WHERE reid={$nrow->id} AND (ispart=0 OR ispart=1)"); + $dsql->Execute('s'); + while ($nrow = $dsql->GetObject('s')) { + $typeOptions .= "\r\n"; + } +} +$row = $dsql->GetOne("SELECT * FROM #@__member WHERE mid='$id'"); +include DedeInclude('templets/member_toadmin.htm'); diff --git a/src/dede/member_type.php b/src/admin/member_type.php old mode 100755 new mode 100644 similarity index 74% rename from src/dede/member_type.php rename to src/admin/member_type.php index ff0f6d98..c445820e --- a/src/dede/member_type.php +++ b/src/admin/member_type.php @@ -1,62 +1,61 @@ -ExecuteNoneQuery($query); - } - } - - //增加新记录 - if (isset($check_new) && $pname_new != '') { - $query = "INSERT INTO `#@__member_type`(`rank`,`pname`,`money`,`exptime`) VALUES('{$rank_new}','{$pname_new}','{$money_new}','{$exptime_new}');"; - $dsql->ExecuteNoneQuery($query); - } - header("Content-Type: text/html; charset={$cfg_soft_lang}"); - echo ""; -} -$arcranks = array(); -$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>10 "); -$dsql->Execute(); -while ($row = $dsql->GetArray()) { - $arcranks[$row['rank']] = $row['membername']; -} - -$times = array(); -$times[7] = '一周'; -$times[30] = '一个月'; -$times[90] = '三个月'; -$times[183] = '半年'; -$times[366] = '一年'; -$times[32767] = '终身'; - -require_once(DEDEADMIN."/templets/member_type.htm"); +ExecuteNoneQuery($query); + } + } + + //增加新记录 + if (isset($check_new) && $pname_new != '') { + $query = "INSERT INTO `#@__member_type`(`rank`,pname,money,exptime) VALUES('{$rank_new}','{$pname_new}','{$money_new}','{$exptime_new}');"; + $dsql->ExecuteNoneQuery($query); + } + header("Content-Type: text/html; charset={$cfg_soft_lang}"); + echo ""; +} +$arcranks = array(); +$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `rank`>10 "); +$dsql->Execute(); +while ($row = $dsql->GetArray()) { + $arcranks[$row['rank']] = $row['membername']; +} + +$times = array(); +$times[7] = '一周'; +$times[30] = '一个月'; +$times[90] = '三个月'; +$times[183] = '半年'; +$times[366] = '一年'; +$times[32767] = '终身'; + +require_once(DEDEADMIN."/templets/member_type.htm"); diff --git a/src/dede/member_view.php b/src/admin/member_view.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/member_view.php rename to src/admin/member_view.php index 8801a321..1917ea0c --- a/src/dede/member_view.php +++ b/src/admin/member_view.php @@ -1,35 +1,34 @@ -GetOne("select * from `#@__member` where mid='$id'"); - -$staArr = array( - -10 => '等待验证邮件', - -2 => '限制用户(禁言)', - -1 => '未通过审核', - 0 => '审核通过,提示填写完整信息', - 1 => '没填写详细资料', - 2 => '正常使用状态' -); - -//如果这个用户是管理员帐号,必须有足够权限的用户才能操作 -if ($row['matt'] == 10) CheckPurview('sys_User'); - -if ($row['uptime'] > 0 && $row['exptime'] > 0) { - $mhasDay = $row['exptime'] - ceil((time() - $row['uptime']) / 3600 / 24) + 1; -} else { - $mhasDay = 0; -} -include DedeInclude('templets/member_view.htm'); +GetOne("select * from #@__member where mid='$id'"); + +$staArr = array( + -10 => '等待验证邮件', + -2 => '限制用户(禁言)', + -1 => '未通过审核', + 0 => '审核通过,提示填写完整信息', + 1 => '没填写详细资料', + 2 => '正常使用状态' +); + +//如果这个用户是管理员帐号,必须有足够权限的用户才能操作 +if ($row['matt'] == 10) CheckPurview('sys_User'); + +if ($row['uptime'] > 0 && $row['exptime'] > 0) { + $mhasDay = $row['exptime'] - ceil((time() - $row['uptime']) / 3600 / 24) + 1; +} else { + $mhasDay = 0; +} +include DedeInclude('templets/member_view.htm'); diff --git a/src/admin/module_main.php b/src/admin/module_main.php new file mode 100644 index 00000000..be56357d --- /dev/null +++ b/src/admin/module_main.php @@ -0,0 +1,551 @@ +SetQuery("SELECT `varname`,`type`,`value`,`groupid` FROM `#@__sysconfig` ORDER BY aid ASC "); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + if(empty($row['value']) && $row['type'] == 'number') $row['value'] = 0; + 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['dev_name'] = $info['team']."未认证"; + $authAt = "未知"; + } + ShowMsg("

开发者名称:{$devInfo['dev_name']}

开发者ID:{$devInfo['dev_id']}

认证于:{$authAt}", "-1"); + 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 .= ""; + $prvdir .= "\r\n"; + } + $prvdir .= "
目录可写
$k$cw
"; + $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 = " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模块名称:{$infos['name']}
语言:{$infos['lang']} {$alertMsg}
文件大小:{$infos['filesize']}
开发者ID:{$infos['dev_id']} 未认证
发布时间:{$infos['time']}
使用协议:浏览
+
注意事项:安装时请确保文件列表中涉及的目录前可写入权限,此外“后台管理目录”、“后台管理目录/templets”目录也必须暂时设置可写入权限
+
目录权限检测:
../ 为根目录
./ 表示当前目录
$prvdir
模块包含的所有文件列表:
+ +
对于已存在文件处理方法: + + + +
"; + $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 = " + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模块名称:{$infos['name']}
语言:{$infos['lang']} {$alertMsg}
文件大小:{$infos['filesize']}
开发者ID:{$dev_id}
发布时间:{$infos['time']}
使用协议:浏览
模块包含的文件:
(文件路径相对于当前目录)
 
+ +
对于模块的文件处理方法: + + +
"; + $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']}
使用协议:浏览
模块包含的文件:
(文件路径相对于当前目录)
 
+ +
"; + $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/module_make.php b/src/admin/module_make.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/module_make.php rename to src/admin/module_make.php index af4e53b3..29a19ac1 --- a/src/dede/module_make.php +++ b/src/admin/module_make.php @@ -1,347 +1,348 @@ -OpenUrl($devURL); - $devContent = $dhd->GetHtml(); - $devInfo = (array)json_decode($devContent); - if (($devInfo['auth_at'] + 60 * 60 * 24 * 365) < time()) { - ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); - exit(); - } - - $filelist = str_replace("\r", "\n", trim($filelist)); - $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); - if ($filelist == '') { - ShowMsg("对不起,您没有指定模块的文件列表,因此不能创建项目", "-1"); - exit(); - } - if (empty($dev_id)) { - ShowMsg("开发者ID不能为空", "-1"); - exit(); - } - if (empty($priv)) { - ShowMsg("请填写开发者私钥信息", "-1"); - exit(); - } - if (strlen($modulname) > 150) { - ShowMsg("模块名称过长", "-1"); - exit(); - } - - // 校验私钥合法性 - $enstr = json_encode(array( - "module_name" => $modulname, - "dev_id" => $devInfo['dev_id'], - )); - // 私钥加密模块信息 - openssl_private_encrypt($enstr, $encotent, $priv); - - $moduleInfo = base64url_encode($encotent); - - openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); - - $minfo = (array)json_decode($decontent); - - if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { - ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); - exit(); - } - - //去除转义 - foreach ($_POST as $k => $v) $$k = stripslashes($v); - - if (!isset($autosetup)) $autosetup = 0; - if (!isset($autodel)) $autodel = 0; - $mdir = DEDEDATA.'/module'; - $hashcode = md5($modulname.$devInfo['dev_id']); - $moduleFilename = $mdir.'/'.$hashcode.'.xml'; - $menustring = base64_encode($menustring); - $indexurl = str_replace('=', '**', $indexurl); - $dm = new DedeModule($mdir); - - if ($dm->HasModule($hashcode)) { - $dm->Clear(); - ShowMsg("对不起,您指定同名模块已经存在,因此不能创建项目
如果您要更新这个模块,请先删除:module/{$hashcode}.xml", "-1"); - exit(); - } - - $readmef = $setupf = $uninstallf = ''; - - if (empty($readmetxt)) { - move_uploaded_file($readme, $mdir."/{$hashcode}-r.html") or die("您没填写说明或上传说明文件"); - $readmef = $dm->GetEncodeFile($mdir."/{$hashcode}-r.html", TRUE); - } else { - $readmetxt = "

".$readmetxt; - $readmetxt = preg_replace("#[\r\n]{1,}#", "
\r\n", $readmetxt); - $readmetxt .= "

"; - $readmef = base64_encode(trim($readmetxt)); - } - - if ($autosetup == 0) { - move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); - $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); - } - - if ($autodel == 0) { - move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); - $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", TRUE); - } - - if (trim($setupsql40) == '') $setupsql40 = ''; - else $setupsql40 = base64_encode(trim($setupsql40)); - - //if(trim($setupsql41)=='') $setupsql41 = ''; - //else $setupsql41 = base64_encode(trim($setupsql41)); - - if (trim($delsql) == '') $delsql = ''; - else $delsql = base64_encode(trim($delsql)); - $pub_key = base64url_encode($devInfo['pub_key']); - - $modulinfo = " - -name={$modulname} -dev_id={$devInfo['dev_id']} -pubkey={$pub_key} -info={$moduleInfo} -time={$mtime} -hash={$hashcode} -indexname={$indexname} -indexurl={$indexurl} -ismember={$ismember} -autosetup={$autosetup} -autodel={$autodel} -lang=utf-8 -moduletype={$moduletype} - - - -$menustring - - -{$readmef} - - -$setupsql40 - - -$delsql - - -{$setupf} - - -{$uninstallf} - - -$filelist - - -"; - - $filelists = explode("\n", $filelist); - foreach ($filelists as $v) { - $v = trim($v); - if (!empty($v)) $dm->MakeEncodeFileTest(dirname(__FILE__), $v); - } - //测试无误后编译安装包 - $fp = fopen($moduleFilename, 'w'); - fwrite($fp, $modulinfo); - fwrite($fp, "\r\n"); - foreach ($filelists as $v) { - $v = trim($v); - if (!empty($v)) $dm->MakeEncodeFile(dirname(__FILE__), $v, $fp); - } - fwrite($fp, "\r\n"); - fwrite($fp, "\r\n"); - fclose($fp); - ShowMsg("成功对一个新模块进行编译", "module_main.php"); - exit(); -} -/*------------- -//修改项目 -function editModule() ---------------*/ else if ($action == 'edit') { - $filelist = str_replace("\r", "\n", trim($filelist)); - $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); - if ($filelist == "") { - ShowMsg("对不起,您没有指定模块的文件列表,因此不能创建项目", "-1"); - exit(); - } - if (empty($dev_id)) { - ShowMsg("开发者ID不能为空", "-1"); - exit(); - } - if (empty($priv)) { - ShowMsg("请填写开发者私钥信息", "-1"); - exit(); - } - - // 校验私钥,确定开发者身份 - $devURL = DEDECDNURL."/developers/$dev_id.json"; - $dhd = new DedeHttpDown(); - $dhd->OpenUrl($devURL); - $devContent = $dhd->GetHtml(); - $devInfo = (array)json_decode($devContent); - if (($devInfo['auth_at'] + 60 * 60 * 24 * 365) < time()) { - ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); - exit(); - } - if (strlen($modulname) > 150) { - ShowMsg("模块名称过长", "-1"); - exit(); - } - - // 校验私钥合法性 - $enstr = json_encode(array( - "module_name" => $modulname, - "dev_id" => $devInfo['dev_id'], - )); - // 私钥加密模块信息 - openssl_private_encrypt($enstr, $encotent, $priv); - - $moduleInfo = base64url_encode($encotent); - - openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); - - $minfo = (array)json_decode($decontent); - - if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { - ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); - exit(); - } - - //已经去除转义 - foreach ($_POST as $k => $v) $$k = stripslashes($v); - if (!isset($autosetup)) $autosetup = 0; - if (!isset($autodel)) $autodel = 0; - $mdir = DEDEDATA.'/module'; - $hashcode = $hash; - $moduleFilename = $mdir.'/'.$hashcode.'.xml'; - $modulname = str_replace('=', '', $modulname); - $indexurl = str_replace('=', '**', $indexurl); - $menustring = base64_encode($menustring); - $dm = new DedeModule($mdir); - $readmef = base64_encode($readmetxt); - $setupf = $uninstallf = ''; - - //编译setup文件 - if (is_uploaded_file($setup)) { - move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); - $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); - } else { - if ($autosetup == 0) $setupf = base64_encode($dm->GetSystemFile($hashcode, 'setup')); - } - - //编译uninstall文件 - if (is_uploaded_file($uninstall)) { - move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); - $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", true); - } else { - if ($autodel == 0) $uninstallf = base64_encode($dm->GetSystemFile($hashcode, 'uninstall')); - } - - if (trim($setupsql40) == '') $setupsql40 = ''; - else $setupsql40 = base64_encode(htmlspecialchars_decode(trim($setupsql40))); - //if(trim($setupsql41)=='') $setupsql41 = ''; - //else $setupsql41 = base64_encode(trim($setupsql41)); - - if (trim($delsql) == '') $delsql = ''; - else $delsql = base64_encode(strip_tags(trim($delsql))); - - $modulinfo = " - -name={$modulname} -dev_id={$devInfo['dev_id']} -pubkey={$devInfo['pub_key']} -info={$moduleInfo} -time={$mtime} -hash={$hashcode} -indexname={$indexname} -indexurl={$indexurl} -ismember={$ismember} -autosetup={$autosetup} -autodel={$autodel} -lang=utf-8 -moduletype={$moduletype} - - - -$menustring - - -{$readmef} - - -$setupsql40 - - -$delsql - - -{$setupf} - - -{$uninstallf} - - -$filelist - - -"; - - if ($rebuild == 'yes') { - $filelists = explode("\n", $filelist); - foreach ($filelists as $v) { - $v = trim($v); - if (!empty($v)) $dm->MakeEncodeFileTest(dirname(__FILE__), $v); - } - //测试无误后编译安装包 - $fp = fopen($moduleFilename, 'w'); - fwrite($fp, $modulinfo."\r\n"); - fwrite($fp, "\r\n"); - foreach ($filelists as $v) { - $v = trim($v); - if (!empty($v)) $dm->MakeEncodeFile(dirname(__FILE__), $v, $fp); - } - fwrite($fp, "\r\n"); - fwrite($fp, "\r\n"); - fclose($fp); - } else { - $fxml = $dm->GetFileXml($hashcode); - $fp = fopen($moduleFilename, 'w'); - fwrite($fp, $modulinfo."\r\n"); - fwrite($fp, $fxml); - fclose($fp); - } - ShowMsg("成功对模块重新编译", "module_main.php"); - exit(); -} -//ClearAllLink(); +OpenUrl($devURL); + $devContent = $dhd->GetHtml(); + $devInfo = (array)json_decode($devContent); + if (($devInfo['auth_at'] + 60 * 60 * 24 * 365) < time()) { + ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); + exit(); + } + + $filelist = str_replace("\r", "\n", trim($filelist)); + $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); + if ($filelist == '') { + ShowMsg("对不起,您没有指定模块的文件列表,因此不能创建项目", "-1"); + exit(); + } + if (empty($dev_id)) { + ShowMsg("开发者ID不能为空", "-1"); + exit(); + } + if (empty($priv)) { + ShowMsg("请填写开发者私钥信息", "-1"); + exit(); + } + if (strlen($modulname) > 150) { + ShowMsg("模块名称过长", "-1"); + exit(); + } + + //校验私钥合法性 + $enstr = json_encode(array( + "module_name" => $modulname, + "dev_id" => $devInfo['dev_id'], + )); + //私钥加密模块信息 + openssl_private_encrypt($enstr, $encotent, $priv); + + $moduleInfo = base64url_encode($encotent); + + openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); + + $minfo = (array)json_decode($decontent); + + if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { + ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); + exit(); + } + + //去除转义 + foreach ($_POST as $k => $v) $$k = stripslashes($v); + + if (!isset($autosetup)) $autosetup = 0; + if (!isset($autodel)) $autodel = 0; + $mdir = DEDEDATA.'/module'; + $hashcode = md5($modulname.$devInfo['dev_id']); + $moduleFilename = $mdir.'/'.$hashcode.'.xml'; + $menustring = base64_encode($menustring); + $indexurl = str_replace('=', '**', $indexurl); + $dm = new DedeModule($mdir); + + if ($dm->HasModule($hashcode)) { + $dm->Clear(); + ShowMsg("对不起,您指定同名模块已经存在,因此不能创建项目
如果您要更新这个模块,请先删除:module/{$hashcode}.xml", "-1"); + exit(); + } + + $readmef = $setupf = $uninstallf = ''; + + if (empty($readmetxt)) { + move_uploaded_file($readme, $mdir."/{$hashcode}-r.html") or die("您没填写说明或上传说明文件"); + $readmef = $dm->GetEncodeFile($mdir."/{$hashcode}-r.html", TRUE); + } else { + $readmetxt = "

".$readmetxt; + $readmetxt = preg_replace("#[\r\n]{1,}#", "
\r\n", $readmetxt); + $readmetxt .= "

"; + $readmef = base64_encode(trim($readmetxt)); + } + + if ($autosetup == 0) { + move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); + $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); + } + + if ($autodel == 0) { + move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); + $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", TRUE); + } + + if (trim($setupsql40) == '') $setupsql40 = ''; + else $setupsql40 = base64_encode(trim($setupsql40)); + + //if(trim($setupsql41)=='') $setupsql41 = ''; + //else $setupsql41 = base64_encode(trim($setupsql41)); + + if (trim($delsql) == '') $delsql = ''; + else $delsql = base64_encode(trim($delsql)); + $pub_key = base64url_encode($devInfo['pub_key']); + + $modulinfo = " + +name={$modulname} +dev_id={$devInfo['dev_id']} +pubkey={$pub_key} +info={$moduleInfo} +time={$mtime} +hash={$hashcode} +indexname={$indexname} +indexurl={$indexurl} +ismember={$ismember} +autosetup={$autosetup} +autodel={$autodel} +lang=utf-8 +moduletype={$moduletype} + + + +$menustring + + +{$readmef} + + +$setupsql40 + + +$delsql + + +{$setupf} + + +{$uninstallf} + + +$filelist + + +"; + + $filelists = explode("\n", $filelist); + foreach ($filelists as $v) { + $v = trim($v); + if (!empty($v)) $dm->MakeEncodeFileTest(dirname(__FILE__), $v); + } + //测试无误后编译安装包 + $fp = fopen($moduleFilename, 'w'); + fwrite($fp, $modulinfo); + fwrite($fp, "\r\n"); + foreach ($filelists as $v) { + $v = trim($v); + if (!empty($v)) $dm->MakeEncodeFile(dirname(__FILE__), $v, $fp); + } + fwrite($fp, "\r\n"); + fwrite($fp, "\r\n"); + fclose($fp); + ShowMsg("成功对一个新模块进行编译", "module_main.php"); + exit(); +} +/*------------- +//修改项目 +function editModule() +--------------*/ +else if ($action == 'edit') { + $filelist = str_replace("\r", "\n", trim($filelist)); + $filelist = trim(preg_replace("#[\n]{1,}#", "\n", $filelist)); + if ($filelist == "") { + ShowMsg("对不起,您没有指定模块的文件列表,因此不能创建项目", "-1"); + exit(); + } + if (empty($dev_id)) { + ShowMsg("开发者ID不能为空", "-1"); + exit(); + } + if (empty($priv)) { + ShowMsg("请填写开发者私钥信息", "-1"); + exit(); + } + + //校验私钥,确定开发者身份 + $devURL = DEDECDNURL."/developers/$dev_id.json"; + $dhd = new DedeHttpDown(); + $dhd->OpenUrl($devURL); + $devContent = $dhd->GetHtml(); + $devInfo = (array)json_decode($devContent); + if (($devInfo['auth_at'] + 60 * 60 * 24 * 365) < time()) { + ShowMsg("您的开发者账号已经过期,请登录www.dedebiz.com重新申请!", "-1"); + exit(); + } + if (strlen($modulname) > 150) { + ShowMsg("模块名称过长", "-1"); + exit(); + } + + //校验私钥合法性 + $enstr = json_encode(array( + "module_name" => $modulname, + "dev_id" => $devInfo['dev_id'], + )); + //私钥加密模块信息 + openssl_private_encrypt($enstr, $encotent, $priv); + + $moduleInfo = base64url_encode($encotent); + + openssl_public_decrypt($encotent, $decontent, $devInfo['pub_key']); + + $minfo = (array)json_decode($decontent); + + if ($minfo['module_name'] != $modulname || $minfo['dev_id'] != $devInfo['dev_id']) { + ShowMsg("开发者私钥校验失败,请确保填写正确的开发者私钥", "-1"); + exit(); + } + + //已经去除转义 + foreach ($_POST as $k => $v) $$k = stripslashes($v); + if (!isset($autosetup)) $autosetup = 0; + if (!isset($autodel)) $autodel = 0; + $mdir = DEDEDATA.'/module'; + $hashcode = $hash; + $moduleFilename = $mdir.'/'.$hashcode.'.xml'; + $modulname = str_replace('=', '', $modulname); + $indexurl = str_replace('=', '**', $indexurl); + $menustring = base64_encode($menustring); + $dm = new DedeModule($mdir); + $readmef = base64_encode($readmetxt); + $setupf = $uninstallf = ''; + + //编译setup文件 + if (is_uploaded_file($setup)) { + move_uploaded_file($setup, $mdir."/{$hashcode}-s.php") or die("您没上传,或系统无法把setup文件移动到 module 目录"); + $setupf = $dm->GetEncodeFile($mdir."/{$hashcode}-s.php", TRUE); + } else { + if ($autosetup == 0) $setupf = base64_encode($dm->GetSystemFile($hashcode, 'setup')); + } + + //编译uninstall文件 + if (is_uploaded_file($uninstall)) { + move_uploaded_file($uninstall, $mdir."/{$hashcode}-u.php") or die("您没上传,或系统无法把uninstall文件移动到 module 目录"); + $uninstallf = $dm->GetEncodeFile($mdir."/{$hashcode}-u.php", true); + } else { + if ($autodel == 0) $uninstallf = base64_encode($dm->GetSystemFile($hashcode, 'uninstall')); + } + + if (trim($setupsql40) == '') $setupsql40 = ''; + else $setupsql40 = base64_encode(htmlspecialchars_decode(trim($setupsql40))); + //if(trim($setupsql41)=='') $setupsql41 = ''; + //else $setupsql41 = base64_encode(trim($setupsql41)); + + if (trim($delsql) == '') $delsql = ''; + else $delsql = base64_encode(strip_tags(trim($delsql))); + + $modulinfo = " + +name={$modulname} +dev_id={$devInfo['dev_id']} +pubkey={$devInfo['pub_key']} +info={$moduleInfo} +time={$mtime} +hash={$hashcode} +indexname={$indexname} +indexurl={$indexurl} +ismember={$ismember} +autosetup={$autosetup} +autodel={$autodel} +lang=utf-8 +moduletype={$moduletype} + + + +$menustring + + +{$readmef} + + +$setupsql40 + + +$delsql + + +{$setupf} + + +{$uninstallf} + + +$filelist + + +"; + + if ($rebuild == 'yes') { + $filelists = explode("\n", $filelist); + foreach ($filelists as $v) { + $v = trim($v); + if (!empty($v)) $dm->MakeEncodeFileTest(dirname(__FILE__), $v); + } + //测试无误后编译安装包 + $fp = fopen($moduleFilename, 'w'); + fwrite($fp, $modulinfo."\r\n"); + fwrite($fp, "\r\n"); + foreach ($filelists as $v) { + $v = trim($v); + if (!empty($v)) $dm->MakeEncodeFile(dirname(__FILE__), $v, $fp); + } + fwrite($fp, "\r\n"); + fwrite($fp, "\r\n"); + fclose($fp); + } else { + $fxml = $dm->GetFileXml($hashcode); + $fp = fopen($moduleFilename, 'w'); + fwrite($fp, $modulinfo."\r\n"); + fwrite($fp, $fxml); + fclose($fp); + } + ShowMsg("成功对模块重新编译", "module_main.php"); + exit(); +} +//ClearAllLink(); diff --git a/src/dede/module_upload.php b/src/admin/module_upload.php old mode 100755 new mode 100644 similarity index 64% rename from src/dede/module_upload.php rename to src/admin/module_upload.php index 07570870..5610c517 --- a/src/dede/module_upload.php +++ b/src/admin/module_upload.php @@ -1,115 +1,102 @@ -get_List($tmpfilename); - $dedefileindex = -1; - //为了节省资源,系统仅以.xml作为扩展名识别ZIP包里了dede模块格式文件 - if (is_array($files)) { - for ($i = 0; $i < count($files); $i++) { - if (preg_match("#\.xml#i", $files[$i]['filename'])) { - $dedefile = $files[$i]['filename']; - $dedefileindex = $i; - break; - } - } - } - if ($dedefileindex == -1) { - unlink($tmpfilename); - ShowMsg("对不起,您上传的压缩包中不存在dede模块文件

>>返回重新上传>>", "javascript:;"); - exit(); - } - $ziptmp = $mdir.'/ziptmp'; - $z->Extract($tmpfilename, $ziptmp, $dedefileindex); - unlink($tmpfilename); - $tmpfilename = $mdir."/ziptmp/".$dedefile; - } - - $dm = new DedeModule($mdir); - $infos = $dm->GetModuleInfo($tmpfilename, 'file'); - if (empty($infos['hash'])) { - unlink($tmpfilename); - $dm->Clear(); - ShowMsg("对不起,您上传的文件可能不是织梦模块的标准格式文件

>>返回重新上传>>", "javascript:;"); - exit(); - } - if (preg_match("#[^0-9a-zA-Z]#", $infos['hash'])) { - exit("hash check failed!"); - } - - $okfile = $mdir.'/'.$infos['hash'].'.xml'; - if ($dm->HasModule($infos['hash']) && empty($delhas)) { - unlink($tmpfilename); - $dm->Clear(); - ShowMsg("对不起,您上传的模块已经存在,
如果要覆盖请先删除原来版本或选择强制删除的选项

>>返回重新上传>>", "javascript:;"); - exit(); - } - @unlink($okfile); - copy($tmpfilename, $okfile); - @unlink($tmpfilename); - $dm->Clear(); - ShowMsg("成功上传一个新的模块", "module_main.php?action=view&hash={$infos['hash']}"); - exit(); - } -} else { - $win = new OxWindow(); - $win->Init("module_upload.php", "js/blank.js", "POST' enctype='multipart/form-data"); - $win->mainTitle = "模块管理"; - $wecome_info = "模块管理 >> 上传模块"; - $win->AddTitle('请选择要上传的文件:'); - $win->AddHidden("action", 'upload'); - $msg = " - - - - - - - - - - - - - -
文件格式: - -
已有模块: - -
请选择文件: -
- "; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow('ok', ''); - $win->Display(); - exit(); -} -//ClearAllLink(); +get_List($tmpfilename); + $dedefileindex = -1; + //为了节省资源,系统仅以.xml作为扩展名识别ZIP包里了dede模块格式文件 + if (is_array($files)) { + for ($i = 0; $i < count($files); $i++) { + if (preg_match("#\.xml#i", $files[$i]['filename'])) { + $dedefile = $files[$i]['filename']; + $dedefileindex = $i; + break; + } + } + } + if ($dedefileindex == -1) { + unlink($tmpfilename); + ShowMsg("对不起,您上传的压缩包中不存在dede模块文件
重新上传", "javascript:;"); + exit(); + } + $ziptmp = $mdir.'/ziptmp'; + $z->Extract($tmpfilename, $ziptmp, $dedefileindex); + unlink($tmpfilename); + $tmpfilename = $mdir."/ziptmp/".$dedefile; + } + $dm = new DedeModule($mdir); + $infos = $dm->GetModuleInfo($tmpfilename, 'file'); + if (empty($infos['hash'])) { + unlink($tmpfilename); + $dm->Clear(); + ShowMsg("对不起,您上传的文件可能不是织梦模块的标准格式文件
重新上传", "javascript:;"); + exit(); + } + if (preg_match("#[^0-9a-zA-Z]#", $infos['hash'])) { + exit("hash check failed!"); + } + $okfile = $mdir.'/'.$infos['hash'].'.xml'; + if ($dm->HasModule($infos['hash']) && empty($delhas)) { + unlink($tmpfilename); + $dm->Clear(); + ShowMsg("对不起,您上传的模块已经存在
如果要覆盖请先删除原来版本或选择强制删除的选项
重新上传", "javascript:;"); + exit(); + } + @unlink($okfile); + copy($tmpfilename, $okfile); + @unlink($tmpfilename); + $dm->Clear(); + ShowMsg("成功上传一个新的模块", "module_main.php?action=view&hash={$infos['hash']}"); + exit(); + } +} else { + $win = new OxWindow(); + $win->Init("module_upload.php", "js/blank.js", "POST' enctype='multipart/form-data"); + $win->mainTitle = "模块管理"; + $wecome_info = "模块管理 >> 上传模块"; + $win->AddTitle('请选择要上传的文件:'); + $win->AddHidden("action", 'upload'); + $msg = " + + + + + + + + + + + + +
文件格式: + +
已有模块:
请选择文件:
"; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow('ok', ''); + $win->Display(); + exit(); +}//ClearAllLink(); \ No newline at end of file diff --git a/src/dede/mychannel_add.php b/src/admin/mychannel_add.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/mychannel_add.php rename to src/admin/mychannel_add.php index a3e58ded..18609dbc --- a/src/dede/mychannel_add.php +++ b/src/admin/mychannel_add.php @@ -1,119 +1,118 @@ -'频道id'必须为数字", "-1"); - exit(); - } - if (preg_match("#[^a-z0-9]#i", $nid) || $nid == "") { - ShowMsg("'频道名字标识'必须为英文字母或与数字混合字符串", "-1"); - exit(); - } - if ($addtable == "") { - ShowMsg("附加表不能为空", "-1"); - exit(); - } - $trueTable2 = str_replace("#@__", $cfg_dbprefix, $addtable); - - if ($issystem == -1 && $id > 0) $id = $id * -1; - - //检查id是否重复 - $row = $dsql->GetOne("SELECT * FROM #@__channeltype WHERE id='$id' OR nid LIKE '$nid' OR addtable LIKE '$addtable'"); - if (is_array($row)) { - ShowMsg("可能‘频道id’、‘频道名称标识’、‘附加表名称’在数据库已存在,不能重复使用", "-1"); - exit(); - } - $mysql_version = $dsql->GetVersion(); - - //创建附加表 - if ($trueTable2 != '') { - $istb = $dsql->IsTable($trueTable2); - if (!$istb || $isdel == 1) { - //是否需要摘要字段 - $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$trueTable2}`;"); - if ($issystem != -1) { - $tabsql = "CREATE TABLE `$trueTable2`( - `aid` int(11) NOT NULL default '0', - `typeid` int(11) NOT NULL default '0', - `redirecturl` varchar(255) NOT NULL default '', - `templet` varchar(30) NOT NULL default '', - `userip` char(15) NOT NULL default '', - "; - } else { - $tabsql = "CREATE TABLE `$trueTable2`( - `aid` int(11) NOT NULL default '0', - `typeid` int(11) NOT NULL default '0', - `channel` SMALLINT NOT NULL DEFAULT '0', - `arcrank` SMALLINT NOT NULL DEFAULT '0', - `mid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', - `click` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', - `title` varchar(60) NOT NULL default '', - `senddate` int(11) NOT NULL default '0', - `flag` set('c','h','p','f','s','j','a','b') default NULL, - `litpic` varchar(60) NOT NULL default '', - `userip` char(15) NOT NULL default '', - `lastpost` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', - `scores` MEDIUMINT( 8 ) NOT NULL DEFAULT '0', - `goodpost` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', - `badpost` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', - "; - } - if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; "; - } else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; - } - $rs = $dsql->ExecuteNoneQuery($tabsql); - if (!$rs) { - ShowMsg("创建附加表失败!".$dsql->GetError(), "javascript:;"); - exit(); - } - } - } - - $listfields = $fieldset = ''; - if ($issystem == -1) { - $fieldset = " - - - - - - - - - - - -\r\n"; - $listfields = 'channel,arcrank,mid,click,title,senddate,flag,listpic,lastpost,scores,goodpost,badpost'; - } - - $inQuery = "INSERT INTO `#@__channeltype`(id,nid,typename,addtable,addcon,mancon,editcon,useraddcon,usermancon,usereditcon,fieldset,listfields,issystem,issend,arcsta,usertype,sendrank,needdes,needpic,titlename,onlyone,dfcid) - VALUES ('$id','$nid','$typename','$addtable','$addcon','$mancon','$editcon','$useraddcon','$usermancon','$usereditcon','$fieldset','$listfields','$issystem','$issend','$arcsta','$usertype','$sendrank','$needdes','$needpic','$titlename','$onlyone','$dfcid');"; - $dsql->ExecuteNoneQuery($inQuery); - ShowMsg("成功增加一个频道模型", "mychannel_edit.php?id=".$id); - exit(); -} -$row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC LIMIT 0,1 "); -$newid = $row['id'] + 1; -if ($newid < 10) $newid = $newid + 10; - -require_once(DEDEADMIN."/templets/mychannel_add.htm"); +'频道id'必须为数字", "-1"); + exit(); + } + if (preg_match("#[^a-z0-9]#i", $nid) || $nid == "") { + ShowMsg("'频道名字标识'必须为英文字母或与数字混合字符串", "-1"); + exit(); + } + if ($addtable == "") { + ShowMsg("附加表不能为空", "-1"); + exit(); + } + $trueTable2 = str_replace("#@__", $cfg_dbprefix, $addtable); + + if ($issystem == -1 && $id > 0) $id = $id * -1; + + //检查id是否重复 + $row = $dsql->GetOne("SELECT * FROM #@__channeltype WHERE id='$id' OR nid LIKE '$nid' OR addtable LIKE '$addtable'"); + if (is_array($row)) { + ShowMsg("可能‘频道id’、‘频道名称标识’、‘附加表名称’在数据库已存在,不能重复使用", "-1"); + exit(); + } + $mysql_version = $dsql->GetVersion(); + + //创建附加表 + if ($trueTable2 != '') { + $istb = $dsql->IsTable($trueTable2); + if (!$istb || $isdel == 1) { + //是否需要摘要字段 + $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$trueTable2}`;"); + if ($issystem != -1) { + $tabsql = "CREATE TABLE `$trueTable2`( + `aid` int(11) NOT NULL default '0', + `typeid` int(11) NOT NULL default '0', + `redirecturl` varchar(255) NOT NULL default '', + `templet` varchar(30) NOT NULL default '', + `userip` char(15) NOT NULL default '', + "; + } else { + $tabsql = "CREATE TABLE `$trueTable2`( + `aid` int(11) NOT NULL default '0', + `typeid` int(11) NOT NULL default '0', + `channel` SMALLINT NOT NULL DEFAULT '0', + `arcrank` SMALLINT NOT NULL DEFAULT '0', + `mid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', + `click` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', + `title` varchar(60) NOT NULL default '', + `senddate` int(11) NOT NULL default '0', + `flag` set('c','h','p','f','s','j','a','b') default NULL, + `litpic` varchar(60) NOT NULL default '', + `userip` char(15) NOT NULL default '', + `lastpost` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', + `scores` MEDIUMINT( 8 ) NOT NULL DEFAULT '0', + `goodpost` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', + `badpost` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', + "; + } + if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; "; + } else { + $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; + } + $rs = $dsql->ExecuteNoneQuery($tabsql); + if (!$rs) { + ShowMsg("创建附加表失败!".$dsql->GetError(), "javascript:;"); + exit(); + } + } + } + + $listfields = $fieldset = ''; + if ($issystem == -1) { + $fieldset = " + + + + + + + + + + + +\r\n"; + $listfields = 'channel,arcrank,mid,click,title,senddate,flag,listpic,lastpost,scores,goodpost,badpost'; + } + + $inQuery = "INSERT INTO `#@__channeltype`(id,nid,typename,addtable,addcon,mancon,editcon,useraddcon,usermancon,usereditcon,fieldset,listfields,issystem,issend,arcsta,usertype,sendrank,needdes,needpic,titlename,onlyone,dfcid) + VALUES ('$id','$nid','$typename','$addtable','$addcon','$mancon','$editcon','$useraddcon','$usermancon','$usereditcon','$fieldset','$listfields','$issystem','$issend','$arcsta','$usertype','$sendrank','$needdes','$needpic','$titlename','$onlyone','$dfcid');"; + $dsql->ExecuteNoneQuery($inQuery); + ShowMsg("成功增加一个频道模型", "mychannel_edit.php?id=".$id); + exit(); +} +$row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC LIMIT 0,1 "); +$newid = $row['id'] + 1; +if ($newid < 10) $newid = $newid + 10; + +require_once(DEDEADMIN."/templets/mychannel_add.htm"); diff --git a/src/dede/mychannel_edit.php b/src/admin/mychannel_edit.php old mode 100755 new mode 100644 similarity index 84% rename from src/dede/mychannel_edit.php rename to src/admin/mychannel_edit.php index eadd0f88..21cdbb5c --- a/src/dede/mychannel_edit.php +++ b/src/admin/mychannel_edit.php @@ -1,662 +1,628 @@ -ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=1 WHERE id='$id' "); - ShowMsg("操作成功", "mychannel_main.php"); - exit(); -} else if ($dopost == "hide") { - $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=0 WHERE id='$id'"); - ShowMsg("操作成功", "mychannel_main.php"); - exit(); -} -/*---------------- -function __CopyStart() ------------------*/ else if ($dopost == "copystart") { - if ($id == -1) { - ShowMsg("专题模型不支持复制", "-1"); - exit(); - } - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); - if ($row['id'] > -1) { - $nrow = $dsql->GetOne("SELECT MAX(id) AS id FROM `#@__channeltype` LIMIT 0,1 "); - $newid = $nrow['id'] + 1; - if ($newid < 10) { - $newid = $newid + 10; - } - $idname = $newid; - } else { - $nrow = $dsql->GetOne("SELECT MIN(id) AS id FROM `#@__channeltype` LIMIT 0,1 "); - $newid = $nrow['id'] - 1; - if ($newid < -10) { - $newid = $newid - 10; - } - $idname = 'w'.($newid * -1); - } - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); - $wintitle = "频道管理-模型复制"; - $wecome_info = " 频道管理 - 模型复制"; - $win = new OxWindow(); - $win->Init("mychannel_edit.php", "js/blank.js", "post"); - $win->AddTitle(" 被复制频道: [".$row['typename']."]"); - $win->AddHidden("cid", $id); - $win->AddHidden("id", $id); - $win->AddHidden("dopost", 'copysave'); - $msg = " - - - - - - - - - - - - - - - - - - - - - -
新频道id:
新频道名称:
新频道标识:
新附加表:
复制模板: - -   - -
- "; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("ok", ""); - $win->Display(); - exit(); -} -/*---------------- -function __Export() ------------------*/ else if ($dopost == "export") { - if ($id == -1) { - ShowMsg("专题模型不支持导出", "-1"); - exit(); - } - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' "); - $channelconfig = ''; - $row['maintable'] = preg_replace('#dede_#', '#@__', $row['maintable']); - $row['addtable'] = preg_replace('#dede_#', '#@__', $row['addtable']); - foreach ($row as $k => $v) { - if ($k == 'fieldset') $v = "\r\n$v\r\n"; - $channelconfig .= "$v\r\n"; - } - $wintitle = "导出内容模型规则"; - $wecome_info = "内容模型管理::导出内容模型规则"; - $win = new OxWindow(); - $win->Init(); - $win->AddTitle("以下为规则 [{$row['typename']}] 的模型规则,您可以共享给您的朋友:"); - $winform = $win->GetWindow("hand", ""); - $win->Display(); - exit(); -} -/*---------------- -function __ExportIn() ------------------*/ else if ($dopost == "exportin") { - $wintitle = "导入内容模型规则"; - $wecome_info = "内容模型管理::导入内容模型规则"; - $win = new OxWindow(); - $win->Init("mychannel_edit.php", "js/blank.js", "post"); - $win->AddHidden("dopost", "exportinok"); - $win->AddTitle("输入规则内容:(导入模型会和原有模型冲突,不过可以在导入后修改)"); - $win->AddMsgItem(""); - $winform = $win->GetWindow("ok"); - $win->Display(); - exit(); -} -/*---------------- -function __ExportInOk() ------------------*/ else if ($dopost == "exportinok") { - require_once(DEDEADMIN."/inc/inc_admin_channel.php"); - function GotoStaMsg($msg) - { - global $wintitle, $wecome_info, $winform; - $wintitle = "导入内容模型规则"; - $wecome_info = "内容模型管理::导入内容模型规则"; - $win = new OxWindow(); - $win->Init(); - $win->AddTitle("操作状态提示:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand"); - $win->Display(); - exit(); - } - - $msg = "无信息"; - $exconfig = stripslashes($exconfig); - - $dtp = new DedeTagParse(); - $dtp->SetNameSpace('channel', '<', '>'); - $dtp->LoadSource($exconfig); - - if (!is_array($dtp->CTags)) GotoStaMsg("模型规则不是合法的Dede模型规则"); - - $fields = array(); - foreach ($dtp->CTags as $ctag) { - $fname = $ctag->GetName('name'); - $fields[$fname] = trim($ctag->GetInnerText()); - } - - if (!isset($fields['nid']) || !isset($fields['fieldset'])) { - GotoStaMsg("模型规则不是合法的Dede模型规则"); - } - - //正常的导入过程 - $mysql_version = $dsql->GetVersion(true); - - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE nid='{$fields['nid']}' "); - if (is_array($row)) { - GotoStaMsg("系统中已经存在相同标识 {$fields['nid']} 的规则"); - } - - //创建表 - if ($fields['issystem'] != -1) { - $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}`( - `aid` int(11) NOT NULL default '0', - `typeid` int(11) NOT NULL default '0', - `redirecturl` varchar(255) NOT NULL default '', - `templet` varchar(30) NOT NULL default '', - `userip` char(15) NOT NULL default '',"; - } else { - $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}`( - `aid` int(11) NOT NULL default '0', - `typeid` int(11) NOT NULL default '0', - `channel` SMALLINT NOT NULL DEFAULT '0', - `arcrank` SMALLINT NOT NULL DEFAULT '0', - `mid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', - `click` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', - `title` varchar(60) NOT NULL default '', - `senddate` int(11) NOT NULL default '0', - `flag` set('c','h','p','f','s','j','a','b') default NULL,"; - } - if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; "; - } else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; - } - $rs = $dsql->ExecuteNoneQuery($tabsql); - if (!$rs) { - GotoStaMsg("创建表失败!".$dsql->GetError()); - exit(); - } - - if ($fields['issystem'] == 1) $fields['issystem'] = 0; - if ($fields['issystem'] == 0) { - $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC "); - $fields['newid'] = $row['id'] + 1; - } else { - $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id ASC "); - $fields['newid'] = $row['id'] - 1; - } - - $fieldset = $fields['fieldset']; - $fields['fieldset'] = addslashes($fields['fieldset']); - - $inquery = " INSERT INTO `#@__channeltype`(`id` , `nid` , `typename` , `addtable` , `addcon` , - `mancon` , `editcon` , `useraddcon` , `usermancon` , `usereditcon` , - `fieldset` , `listfields` , `issystem` , `isshow` , `issend` , - `arcsta`,`usertype` , `sendrank` ) - VALUES('{$fields['newid']}' , '{$fields['nid']}' , '{$fields['typename']}' , '{$fields['addtable']}' , '{$fields['addcon']}' , - '{$fields['mancon']}' , '{$fields['editcon']}' , '{$fields['useraddcon']}' , '{$fields['usermancon']}' , '{$fields['usereditcon']}' , - '{$fields['fieldset']}' , '{$fields['listfields']}' , '{$fields['issystem']}' , '{$fields['isshow']}' , '{$fields['issend']}' , - '{$fields['arcsta']}' , '{$fields['usertype']}' , '{$fields['sendrank']}' ); "; - - $rs = $dsql->ExecuteNoneQuery($inquery); - - if (!$rs) GotoStaMsg("导入模型时发生错误".$dsql->GetError()); - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource($fieldset); - $allfields = ''; - if (is_array($dtp->CTags)) { - foreach ($dtp->CTags as $ctag) { - //检测被修改的字段类型 - $dtype = $ctag->GetAtt('type'); - $fieldname = $ctag->GetName(); - $dfvalue = $ctag->GetAtt('default'); - $islist = $ctag->GetAtt('islist'); - $mxlen = $ctag->GetAtt('maxlength'); - $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - $ntabsql = $fieldinfos[0]; - $buideType = $fieldinfos[1]; - if ($islist != '') { - $allfields .= ($allfields == '' ? $fieldname : ','.$fieldname); - } - $dsql->ExecuteNoneQuery(" ALTER TABLE `{$fields['addtable']}` ADD $ntabsql "); - } - } - - if ($allfields != '') { - $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET listfields='$allfields' WHERE id='{$fields['newid']}' "); - } - GotoStaMsg("成功导入一个模型"); -} -/*---------------- -function __SaveCopy() ------------------*/ else if ($dopost == "copysave") { - $cid = intval($cid); - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$cid' ", MYSQL_ASSOC); - foreach ($row as $k => $v) { - ${strtolower($k)} = addslashes($v); - } - $inquery = " INSERT INTO `#@__channeltype`(`id` , `nid` , `typename` , `addtable` , `addcon` , - `mancon` , `editcon` , `useraddcon` , `usermancon` , `usereditcon` , `fieldset` , `listfields` , - `issystem` , `isshow` , `issend` , `arcsta`,`usertype` , `sendrank` ) - VALUES('$newid' , '$newnid' , '$newtypename' , '$newaddtable' , '$addcon' , - '$mancon' , '$editcon' , '$useraddcon' , '$usermancon' , '$usereditcon' , '$fieldset' , '$listfields' , - '$issystem' , '$isshow' , '$issend' , '$arcsta','$usertype' , '$sendrank' ); - "; - $mysql_version = $dsql->GetVersion(TRUE); - if (!$dsql->IsTable($newaddtable)) { - $dsql->Execute('me', "SHOW CREATE TABLE {$dsql->dbName}.{$addtable}"); - $row = $dsql->GetArray('me', MYSQL_BOTH); - $tableStruct = $row[1]; - $tb = str_replace('#@__', $cfg_dbprefix, $addtable); - $tableStruct = preg_replace("/CREATE TABLE `$addtable`/iU", "CREATE TABLE `$newaddtable`", $tableStruct); - $dsql->ExecuteNoneQuery($tableStruct); - } - if ($copytemplet == 1) { - $tmpletdir = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style; - copy("{$tmpletdir}/article_{$nid}.htm", "{$tmpletdir}/{$newnid}_article.htm"); - copy("{$tmpletdir}/list_{$nid}.htm", "{$tmpletdir}/{$newnid}_list.htm"); - copy("{$tmpletdir}/index_{$nid}.htm", "{$tmpletdir}/{$newnid}_index.htm"); - } - $rs = $dsql->ExecuteNoneQuery($inquery); - if ($rs) { - ShowMsg("成功复制模型,现转到详细参数页... ", "mychannel_edit.php?id={$newid}&dopost=edit"); - exit(); - } else { - $errv = $dsql->GetError(); - ShowMsg("系统出错,请把错误代码发送到官方论坛,以检查原因
错误代码:mychannel_edit.php?dopost=savecopy $errv", "javascript:;"); - exit(); - } -} -/*------------ -function __SaveEdit() -------------*/ else if ($dopost == "save") { - $fieldset = preg_replace("#[\r\n]{1,}#", "\r\n", $fieldset); - $usertype = empty($usertype) ? '' : $usertype; - - $query = "Update `#@__channeltype` set - typename = '$typename', - addtable = '$addtable', - addcon = '$addcon', - mancon = '$mancon', - editcon = '$editcon', - useraddcon = '$useraddcon', - usermancon = '$usermancon', - usereditcon = '$usereditcon', - fieldset = '$fieldset', - listfields = '$listfields', - issend = '$issend', - arcsta = '$arcsta', - usertype = '$usertype', - sendrank = '$sendrank', - needdes = '$needdes', - needpic = '$needpic', - titlename = '$titlename', - onlyone = '$onlyone', - dfcid = '$dfcid' - where id='$id' "; - if (trim($fieldset) != '') { - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource(stripslashes($fieldset)); - if (!is_array($dtp->CTags)) { - ShowMsg("文本配置参数无效,无法进行解析", "-1"); - exit(); - } - } - $trueTable = str_replace("#@__", $cfg_dbprefix, $addtable); - if (!$dsql->IsTable($trueTable)) { - ShowMsg("系统找不到您所指定的表 $trueTable ,请手工创建这个表", "-1"); - exit(); - } - $dsql->ExecuteNoneQuery($query); - ShowMsg("成功更改一个模型", "mychannel_main.php"); - exit(); -} -/*-------------------- -function __GetTemplate() ---------------------*/ else if ($dopost == "gettemplets") { - require_once(DEDEINC."/oxwindow.class.php"); - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); - $wintitle = " 频道管理-查看模板"; - $wecome_info = "频道管理::查看模板"; - $win = new OxWindow(); - $win->Init("", "js/blank.js", ""); - $win->AddTitle(" 频道:(".$row['typename'].")默认模板文件说明:"); - $defaulttemplate = $cfg_templets_dir.'/'.$cfg_df_style; - $msg = " - 文档模板:{$defaulttemplate}/article_{$row['nid']}.htm - [修改]
- 列表模板:{$defaulttemplate}/list_{$row['nid']}.htm - [修改] -
- 频道封面模板:{$defaulttemplate}/index_{$row['nid']}.htm - [修改] - "; - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("hand", ""); - $win->Display(); - exit(); -} -/*-------------------- -function __Delete() ---------------------*/ else if ($dopost == "delete") { - CheckPurview('c_Del'); - $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); - if ($row['issystem'] == 1) { - ShowMsg("系统模型不允许删除", "mychannel_main.php"); - exit(); - } - if (empty($job)) $job = ""; - - if ($job == "") //确认提示 - { - require_once(DEDEINC."/oxwindow.class.php"); - $wintitle = "频道管理-删除模型"; - $wecome_info = "频道管理::删除模型"; - $win = new OxWindow(); - $win->Init("mychannel_edit.php", "js/blank.js", "POST"); - $win->AddHidden("job", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("id", $id); - $win->AddTitle("您确实要删除 (".$row['typename'].") 这个频道?"); - $winform = $win->GetWindow("ok"); - $win->Display(); - exit(); - } else if ($job == "yes") //操作 - { - require_once(DEDEINC."/typeunit.class.admin.php"); - $myrow = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$id'", MYSQL_ASSOC); - if (!is_array($myrow)) { - ShowMsg('您所指定的频道信息不存在!', '-1'); - exit(); - } - - //检查频道的表是否独占数据表 - $addtable = str_replace($cfg_dbprefix, '', str_replace('#@__', $cfg_dbprefix, $myrow['addtable'])); - $row = $dsql->GetOne("SELECT COUNT(id) AS dd FROM `#@__channeltype` WHERE addtable like '{$cfg_dbprefix}{$addtable}' OR addtable LIKE CONCAT('#','@','__','$addtable') ; "); - $isExclusive2 = ($row['dd'] > 1 ? 0 : 1); - - //获取与频道关连的所有栏目id - $tids = ''; - $dsql->Execute('qm', "SELECT id FROM `#@__arctype` WHERE channeltype='$id'"); - while ($row = $dsql->GetArray('qm')) { - $tids .= ($tids == '' ? $row['id'] : ','.$row['id']); - } - - //删除相关信息 - if ($tids != '') { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE typeid IN($tids); "); - $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['maintable']}` WHERE typeid IN($tids); "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__spec` WHERE typeid IN ($tids); "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE typeid IN ($tids); "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id IN ($tids); "); - } - - //删除附加表或附加表内的信息 - if ($isExclusive2 == 1) { - $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$cfg_dbprefix}{$addtable}`;"); - } else { - if ($tids != '' && $myrow['addtable'] != '') { - $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['addtable']}` WHERE typeid IN ($tids); "); - } - } - - //删除频道配置信息 - $dsql->ExecuteNoneQuery("DELETE FROM `#@__channeltype` WHERE id='$id' "); - - //更新栏目缓存 - UpDateCatCache($dsql); - ShowMsg("成功删除一个模型", "mychannel_main.php"); - exit(); - } -} //del -/*---------------- -function __modifysearch() ------------------*/ else if ($dopost == 'modifysearch') { - if (!isset($step)) $step = 0; - if (empty($step)) { - $step = 1; - $mid = intval($mid); - $query = "SELECT mainfields, addonfields, template FROM `#@__advancedsearch` WHERE mid='$mid'"; - $searchinfo = $dsql->GetOne($query); - if (!is_array($searchinfo)) { - $searchinfo = array(); - $searchinfo['mainfields'] = $searchinfo['addonfields'] = $searchinfo['template'] = ''; - } - $searchinfo['mainfields'] = explode(',', $searchinfo['mainfields']); - $searchinfo['addonfields'] = explode(',', $searchinfo['addonfields']); - $addonfieldsarr = array(); - foreach ($searchinfo['addonfields'] as $k) { - $karr = explode(':', $k); - $addonfieldsarr[] = $karr[0]; - } - $template = $searchinfo['template'] == '' ? 'advancedsearch.htm' : $searchinfo['template']; - $c1 = in_array('iscommend', $searchinfo['mainfields']) ? 'checked' : ''; - $c2 = in_array('typeid', $searchinfo['mainfields']) ? 'checked' : ''; - $c3 = in_array('writer', $searchinfo['mainfields']) ? 'checked' : ''; - $c4 = in_array('source', $searchinfo['mainfields']) ? 'checked' : ''; - $c5 = in_array('senddate', $searchinfo['mainfields']) ? 'checked' : ''; - - $mainfields = ' '; - $mainfields .= ' '; - - $mainfields .= ' '; - $mainfields .= ' '; - $mainfields .= ' '; - /* - $mainfields .= ''; - $mainfields .= ''; - $mainfields .= ''; - $mainfields .= ''; - $mainfields .= ''; - */ - $query = "SELECT * FROM `#@__channeltype` WHERE id='$mid'"; - $channel = $dsql->GetOne($query); - - $searchtype = array('int', 'datetime', 'float', 'textdata', 'textchar', 'text', 'htmltext', 'multitext', 'select', 'radio', 'checkbox'); - $addonfields = ''; - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource($channel['fieldset']); - if ($channel['issystem'] < 0) { - $checked = in_array('typeid', $addonfieldsarr) ? 'checked' : ''; - $addonfields .= ' '; - $checked = in_array('senddate', $addonfieldsarr) ? 'checked' : ''; - $addonfields .= ' '; - } - if (is_array($dtp->CTags) && !empty($dtp->CTags)) { - foreach ($dtp->CTags as $ctag) { - $datatype = $ctag->GetAtt('type'); - $value = $ctag->GetName(); - if ($channel['issystem'] < 0) { - $_oo = array('channel', 'arcrank', 'title', 'senddate', 'mid', 'click', 'flag', 'litpic', 'userip', 'lastpost', 'scores', 'goodpost', 'badpost', 'endtime'); - if (in_array($value, $_oo)) continue; - } - - $label = $ctag->GetAtt('itemname'); - if (in_array($datatype, $searchtype)) { - $checked = in_array($value, $addonfieldsarr) ? 'checked' : ''; - $addonfields .= " "; - } - } - } - require_once(dirname(__FILE__)."/templets/mychannel_modifysearch.htm"); - } else if ($step == 1) { - $query = "SELECT * FROM `#@__channeltype` WHERE id='$mid'"; - $channel = $dsql->GetOne($query); - if (empty($addonfields)) { - $addonfields = ''; - } - $template = trim($template); - $forms = '
'; - $forms .= ""; - $forms .= ""; - $forms .= "关键词:
"; - $mainstring = ''; - if (!empty($mainfields) && is_array($mainfields)) { - $mainstring = implode(',', $mainfields); - foreach ($mainfields as $mainfield) { - if ($mainfield == 'typeid') { - require_once(dirname(__FILE__)."/../include/typelink.class.php"); - $tl = new TypeLink(0); - $typeOptions = $tl->GetOptionArray(0, 0, $mid); - $forms .= "
栏目:"; - $forms .= "
"; - } else if ($mainfield == 'iscommend') { - $forms .= "
"; - } else if ($mainfield == 'writer') { - $forms .= "作者:
"; - } else if ($mainfield == 'source') { - $forms .= "来源:
"; - } else if ($mainfield == 'senddate') { - $forms .= "开始时间:
"; - $forms .= "结束时间:
"; - } - } - } - - $addonstring = ''; - $intarr = array('int', 'float'); - $textarr = array('textdata', 'textchar', 'text', 'htmltext', 'multitext'); - - if ($channel['issystem'] < 0) { - foreach ($addonfields as $addonfield) { - if ($addonfield == 'typeid') { - require_once(dirname(__FILE__)."/../include/typelink.class.php"); - $tl = new TypeLink(0); - $typeOptions = $tl->GetOptionArray(0, 0, $mid); - $forms .= "
栏目:"; - $forms .= "
"; - $addonstring .= 'typeid:int,'; - } elseif ($addonfield == 'senddate') { - $forms .= "开始时间:
"; - $forms .= "结束时间:
"; - $addonstring .= 'senddate:datetime,'; - } - } - } - - if (is_array($addonfields) && !empty($addonfields)) { - $query = "SELECT * FROM #@__channeltype WHERE id='$mid'"; - $channel = $dsql->GetOne($query); - - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource($channel['fieldset']); - $fieldarr = $itemarr = $typearr = array(); - foreach ($dtp->CTags as $ctag) { - foreach ($addonfields as $addonfield) { - - if ($ctag->GetName() == $addonfield) { - if ($addonfield == 'typeid' || $addonfield == 'senddate') continue; - - $fieldarr[] = $addonfield; - $itemarr[] = $ctag->GetAtt('itemname'); - $typearr[] = $ctag->GetAtt('type'); - $valuearr[] = $ctag->GetAtt('default'); - } - } - } - - foreach ($fieldarr as $k => $field) { - $itemname = $itemarr[$k]; - $name = $field; - $type = $typearr[$k]; - $tmp = $name.':'.$type; - if (in_array($type, $intarr)) { - $forms .= "
$itemname :
"; - } else if (in_array($type, $textarr)) { - $forms .= "$itemname :
"; - } else if ($type == 'select') { - $values = explode(',', $valuearr[$k]); - if (is_array($values) && !empty($values)) { - $forms .= "
$itemname : "; - } - } else if ($type == 'radio') { - $values = explode(',', $valuearr[$k]); - if (is_array($values) && !empty($values)) { - $forms .= "
$itemname : "; - foreach ($values as $value) { - $forms .= ""; - } - } - } else if ($type == 'checkbox') { - $values = explode(',', $valuearr[$k]); - if (is_array($values) && !empty($values)) { - $forms .= "
$itemname : "; - foreach ($values as $value) { - $forms .= ""; - } - } - } elseif ($type == 'datetime') { - $forms .= "
开始时间:
"; - $forms .= "结束时间:
"; - } else { - $tmp = ''; - } - $addonstring .= $tmp.','; - } - } - $forms .= '
'; - $formssql = addslashes($forms); - $query = "REPLACE INTO #@__advancedsearch(mid, maintable, mainfields, addontable, addonfields, forms, template) VALUES('$mid','$maintable','$mainstring','$addontable','$addonstring','$formssql', '$template')"; - $dsql->ExecuteNoneQuery($query); - $formshtml = dede_htmlspecialchars($forms); - echo ''; - echo "下面为生成的html表单,请自行复制,根据自己需求修改样式后粘贴到对应的模板中

"; - echo '
预览:

'; - echo $forms; - } - exit; -} -//删除自定义搜索; -else if ($dopost == 'del') { - $mid = intval($mid); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__advancedsearch` WHERE mid = '$mid'; "); - ShowMsg("成功删除一个自定义搜索", "mychannel_main.php"); - exit(); -} -$row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' "); -require_once(DEDEADMIN."/templets/mychannel_edit.htm"); +ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=1 WHERE id='$id' "); + ShowMsg("操作成功", "mychannel_main.php"); + exit(); +} else if ($dopost == "hide") { + $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isshow=0 WHERE id='$id'"); + ShowMsg("操作成功", "mychannel_main.php"); + exit(); +} +/*---------------- +function __CopyStart() +-----------------*/ +else if ($dopost == "copystart") { + if ($id == -1) { + ShowMsg("专题模型不支持复制", "-1"); + exit(); + } + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); + if ($row['id'] > -1) { + $nrow = $dsql->GetOne("SELECT MAX(id) AS id FROM `#@__channeltype` LIMIT 0,1 "); + $newid = $nrow['id'] + 1; + if ($newid < 10) { + $newid = $newid + 10; + } + $idname = $newid; + } else { + $nrow = $dsql->GetOne("SELECT MIN(id) AS id FROM `#@__channeltype` LIMIT 0,1 "); + $newid = $nrow['id'] - 1; + if ($newid < -10) { + $newid = $newid - 10; + } + $idname = 'w'.($newid * -1); + } + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); + $wintitle = "频道管理-模型复制"; + $wecome_info = " 频道管理 - 模型复制"; + $win = new OxWindow(); + $win->Init("mychannel_edit.php", "js/blank.js", "post"); + $win->AddTitle(" 被复制频道:[".$row['typename']."]"); + $win->AddHidden("cid", $id); + $win->AddHidden("id", $id); + $win->AddHidden("dopost", 'copysave'); + $msg = " + + + + + + + + + + + + + + + + + + + + + +
新频道id:
新频道名称:
新频道标识:
新附加表:
复制模板: + +   + +
+ "; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow("ok", ""); + $win->Display(); + exit(); +} +/*---------------- +function __Export() +-----------------*/ +else if ($dopost == "export") { + if ($id == -1) { + ShowMsg("专题模型不支持导出", "-1"); + exit(); + } + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' "); + $channelconfig = ''; + $row['maintable'] = preg_replace('#dede_#', '#@__', $row['maintable']); + $row['addtable'] = preg_replace('#dede_#', '#@__', $row['addtable']); + foreach ($row as $k => $v) { + if ($k == 'fieldset') $v = "\r\n$v\r\n"; + $channelconfig .= "$v\r\n"; + } + $wintitle = "导出内容模型规则"; + $wecome_info = "内容模型管理::导出内容模型规则"; + $win = new OxWindow(); + $win->Init(); + $win->AddTitle("以下为规则 [{$row['typename']}] 的模型规则,您可以共享给您的朋友:"); + $winform = $win->GetWindow("hand", ""); + $win->Display(); + exit(); +} +/*---------------- +function __ExportIn() +-----------------*/ +else if ($dopost == "exportin") { + $wintitle = "导入内容模型规则"; + $wecome_info = "内容模型管理::导入内容模型规则"; + $win = new OxWindow(); + $win->Init("mychannel_edit.php", "js/blank.js", "post"); + $win->AddHidden("dopost", "exportinok"); + $win->AddTitle("输入规则内容:(导入模型会和原有模型冲突,不过可以在导入后修改)"); + $win->AddMsgItem(""); + $winform = $win->GetWindow("ok"); + $win->Display(); + exit(); +} +/*---------------- +function __ExportInOk() +-----------------*/ +else if ($dopost == "exportinok") { + require_once(DEDEADMIN."/inc/inc_admin_channel.php"); + function GotoStaMsg($msg) + { + global $wintitle, $wecome_info, $winform; + $wintitle = "导入内容模型规则"; + $wecome_info = "内容模型管理::导入内容模型规则"; + $win = new OxWindow(); + $win->Init(); + $win->AddTitle("操作状态提示:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand"); + $win->Display(); + exit(); + } + $msg = "无信息"; + $exconfig = stripslashes($exconfig); + $dtp = new DedeTagParse(); + $dtp->SetNameSpace('channel', '<', '>'); + $dtp->LoadSource($exconfig); + if (!is_array($dtp->CTags)) GotoStaMsg("模型规则不是合法的模型规则"); + $fields = array(); + foreach ($dtp->CTags as $ctag) { + $fname = $ctag->GetName('name'); + $fields[$fname] = trim($ctag->GetInnerText()); + } + if (!isset($fields['nid']) || !isset($fields['fieldset'])) { + GotoStaMsg("模型规则不是合法的模型规则"); + } + //正常的导入过程 + $mysql_version = $dsql->GetVersion(true); + + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE nid='{$fields['nid']}' "); + if (is_array($row)) { + GotoStaMsg("系统中已经存在相同标识 {$fields['nid']} 的规则"); + } + //创建表 + if ($fields['issystem'] != -1) { + $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}`( + `aid` int(11) NOT NULL default '0', + `typeid` int(11) NOT NULL default '0', + `redirecturl` varchar(255) NOT NULL default '', + `templet` varchar(30) NOT NULL default '', + `userip` char(15) NOT NULL default '',"; + } else { + $tabsql = "CREATE TABLE IF NOT EXISTS `{$fields['addtable']}`( + `aid` int(11) NOT NULL default '0', + `typeid` int(11) NOT NULL default '0', + `channel` SMALLINT NOT NULL DEFAULT '0', + `arcrank` SMALLINT NOT NULL DEFAULT '0', + `mid` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0', + `click` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0', + `title` varchar(60) NOT NULL default '', + `senddate` int(11) NOT NULL default '0', + `flag` set('c','h','p','f','s','j','a','b') default NULL,"; + } + if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) TYPE=MyISAM; "; + } else { + $tabsql .= " PRIMARY KEY (`aid`), KEY `typeid` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; + } + $rs = $dsql->ExecuteNoneQuery($tabsql); + if (!$rs) { + GotoStaMsg("创建表失败!".$dsql->GetError()); + exit(); + } + if ($fields['issystem'] == 1) $fields['issystem'] = 0; + if ($fields['issystem'] == 0) { + $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id DESC "); + $fields['newid'] = $row['id'] + 1; + } else { + $row = $dsql->GetOne("SELECT id FROM `#@__channeltype` ORDER BY id ASC "); + $fields['newid'] = $row['id'] - 1; + } + $fieldset = $fields['fieldset']; + $fields['fieldset'] = addslashes($fields['fieldset']); + $inquery = " INSERT INTO `#@__channeltype`(`id` , `nid` , `typename` , `addtable` , `addcon` , `mancon` , `editcon` , `useraddcon` , `usermancon` , `usereditcon` , `fieldset` , `listfields` , `issystem` , `isshow` , `issend` , `arcsta`,`usertype` , `sendrank` ) + VALUES('{$fields['newid']}' , '{$fields['nid']}' , '{$fields['typename']}' , '{$fields['addtable']}' , '{$fields['addcon']}' , + '{$fields['mancon']}' , '{$fields['editcon']}' , '{$fields['useraddcon']}' , '{$fields['usermancon']}' , '{$fields['usereditcon']}' , '{$fields['fieldset']}' , '{$fields['listfields']}' , '{$fields['issystem']}' , '{$fields['isshow']}' , '{$fields['issend']}' , '{$fields['arcsta']}' , '{$fields['usertype']}' , '{$fields['sendrank']}' ); "; + $rs = $dsql->ExecuteNoneQuery($inquery); + if (!$rs) GotoStaMsg("导入模型时发生错误".$dsql->GetError()); + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource($fieldset); + $allfields = ''; + if (is_array($dtp->CTags)) { + foreach ($dtp->CTags as $ctag) { + //检测被修改的字段类型 + $dtype = $ctag->GetAtt('type'); + $fieldname = $ctag->GetName(); + $dfvalue = $ctag->GetAtt('default'); + $islist = $ctag->GetAtt('islist'); + $mxlen = $ctag->GetAtt('maxlength'); + $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); + $ntabsql = $fieldinfos[0]; + $buideType = $fieldinfos[1]; + if ($islist != '') { + $allfields .= ($allfields == '' ? $fieldname : ','.$fieldname); + } + $dsql->ExecuteNoneQuery(" ALTER TABLE `{$fields['addtable']}` ADD $ntabsql "); + } + } + if ($allfields != '') { + $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET listfields='$allfields' WHERE id='{$fields['newid']}' "); + } + GotoStaMsg("成功导入一个模型"); +} +/*---------------- +function __SaveCopy() +-----------------*/ +else if ($dopost == "copysave") { + $cid = intval($cid); + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$cid' ", MYSQL_ASSOC); + foreach ($row as $k => $v) { + ${strtolower($k)} = addslashes($v); + } + $inquery = " INSERT INTO `#@__channeltype`(`id` , `nid` , `typename` , `addtable` , `addcon` , `mancon` , `editcon` , `useraddcon` , `usermancon` , `usereditcon` , `fieldset` , `listfields` , `issystem` , `isshow` , `issend` , `arcsta`,`usertype` , `sendrank` ) + VALUES('$newid' , '$newnid' , '$newtypename' , '$newaddtable' , '$addcon' , '$mancon' , '$editcon' , '$useraddcon' , '$usermancon' , '$usereditcon' , '$fieldset' , '$listfields' , '$issystem' , '$isshow' , '$issend' , '$arcsta','$usertype' , '$sendrank' );"; + $mysql_version = $dsql->GetVersion(TRUE); + if (!$dsql->IsTable($newaddtable)) { + $dsql->Execute('me', "SHOW CREATE TABLE {$dsql->dbName}.{$addtable}"); + $row = $dsql->GetArray('me', MYSQL_BOTH); + $tableStruct = $row[1]; + $tb = str_replace('#@__', $cfg_dbprefix, $addtable); + $tableStruct = preg_replace("/CREATE TABLE `$addtable`/iU", "CREATE TABLE `$newaddtable`", $tableStruct); + $dsql->ExecuteNoneQuery($tableStruct); + } + if ($copytemplet == 1) { + $tmpletdir = $cfg_basedir.$cfg_templets_dir.'/'.$cfg_df_style; + copy("{$tmpletdir}/article_{$nid}.htm", "{$tmpletdir}/{$newnid}_article.htm"); + copy("{$tmpletdir}/list_{$nid}.htm", "{$tmpletdir}/{$newnid}_list.htm"); + copy("{$tmpletdir}/index_{$nid}.htm", "{$tmpletdir}/{$newnid}_index.htm"); + } + $rs = $dsql->ExecuteNoneQuery($inquery); + if ($rs) { + ShowMsg("成功复制模型,现转到详细参数页 ", "mychannel_edit.php?id={$newid}&dopost=edit"); + exit(); + } else { + $errv = $dsql->GetError(); + ShowMsg("系统出错,请把错误代码发送到官方论坛,以检查原因
错误代码:mychannel_edit.php?dopost=savecopy $errv", "javascript:;"); + exit(); + } +} +/*------------ +function __SaveEdit() +------------*/ +else if ($dopost == "save") { + $fieldset = preg_replace("#[\r\n]{1,}#", "\r\n", $fieldset); + $usertype = empty($usertype) ? '' : $usertype; + $query = "Update `#@__channeltype` set + typename = '$typename', + addtable = '$addtable', + addcon = '$addcon', + mancon = '$mancon', + editcon = '$editcon', + useraddcon = '$useraddcon', + usermancon = '$usermancon', + usereditcon = '$usereditcon', + fieldset = '$fieldset', + listfields = '$listfields', + issend = '$issend', + arcsta = '$arcsta', + usertype = '$usertype', + sendrank = '$sendrank', + needdes = '$needdes', + needpic = '$needpic', + titlename = '$titlename', + onlyone = '$onlyone', + dfcid = '$dfcid' + where id='$id' "; + if (trim($fieldset) != '') { + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource(stripslashes($fieldset)); + if (!is_array($dtp->CTags)) { + ShowMsg("文本配置参数无效,无法进行解析", "-1"); + exit(); + } + } + $trueTable = str_replace("#@__", $cfg_dbprefix, $addtable); + if (!$dsql->IsTable($trueTable)) { + ShowMsg("系统找不到您所指定的表 $trueTable ,请手工创建这个表", "-1"); + exit(); + } + $dsql->ExecuteNoneQuery($query); + ShowMsg("成功修改一个模型", "mychannel_main.php"); + exit(); +} +/*-------------------- +function __GetTemplate() +--------------------*/ +else if ($dopost == "gettemplets") { + require_once(DEDEINC."/libraries/oxwindow.class.php"); + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); + $wintitle = " 频道管理-查看模板"; + $wecome_info = "频道管理::查看模板"; + $win = new OxWindow(); + $win->Init("", "js/blank.js", ""); + $win->AddTitle(" 频道:(".$row['typename'].")默认模板文件说明:"); + $defaulttemplate = $cfg_templets_dir.'/'.$cfg_df_style; + $msg = " + 文档模板:{$defaulttemplate}/article_{$row['nid']}.htm + [修改]
+ 列表模板:{$defaulttemplate}/list_{$row['nid']}.htm + [修改] +
+ 频道封面模板:{$defaulttemplate}/index_{$row['nid']}.htm + [修改] + "; + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow("hand", ""); + $win->Display(); + exit(); +} +/*-------------------- +function __Delete() +--------------------*/ +else if ($dopost == "delete") { + CheckPurview('c_Del'); + $row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id'"); + if ($row['issystem'] == 1) { + ShowMsg("系统模型不允许删除", "mychannel_main.php"); + exit(); + } + if (empty($job)) $job = ""; + if ($job == "") //确认提示 + { + require_once(DEDEINC."/libraries/oxwindow.class.php"); + $wintitle = "频道管理-删除模型"; + $wecome_info = "频道管理::删除模型"; + $win = new OxWindow(); + $win->Init("mychannel_edit.php", "js/blank.js", "POST"); + $win->AddHidden("job", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("id", $id); + $win->AddTitle("您确实要删除 (".$row['typename'].") 这个频道"); + $winform = $win->GetWindow("ok"); + $win->Display(); + exit(); + } else if ($job == "yes") //操作 + { + require_once(DEDEINC."/typelink/typeunit.class.admin.php"); + $myrow = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$id'", MYSQL_ASSOC); + if (!is_array($myrow)) { + ShowMsg('您所指定的频道信息不存在!', '-1'); + exit(); + } + //检查频道的表是否独占数据表 + $addtable = str_replace($cfg_dbprefix, '', str_replace('#@__', $cfg_dbprefix, $myrow['addtable'])); + $row = $dsql->GetOne("SELECT COUNT(id) AS dd FROM `#@__channeltype` WHERE addtable like '{$cfg_dbprefix}{$addtable}' OR addtable LIKE CONCAT('#','@','__','$addtable') ; "); + $isExclusive2 = ($row['dd'] > 1 ? 0 : 1); + //获取与频道关连的所有栏目id + $tids = ''; + $dsql->Execute('qm', "SELECT id FROM `#@__arctype` WHERE channeltype='$id'"); + while ($row = $dsql->GetArray('qm')) { + $tids .= ($tids == '' ? $row['id'] : ','.$row['id']); + } + //删除相关信息 + if ($tids != '') { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE typeid IN($tids); "); + $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['maintable']}` WHERE typeid IN($tids); "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__spec` WHERE typeid IN ($tids); "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__feedback` WHERE typeid IN ($tids); "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id IN ($tids); "); + } + //删除附加表或附加表内的信息 + if ($isExclusive2 == 1) { + $dsql->ExecuteNoneQuery("DROP TABLE IF EXISTS `{$cfg_dbprefix}{$addtable}`;"); + } else { + if ($tids != '' && $myrow['addtable'] != '') { + $dsql->ExecuteNoneQuery("DELETE FROM `{$myrow['addtable']}` WHERE typeid IN ($tids); "); + } + } + //删除频道配置信息 + $dsql->ExecuteNoneQuery("DELETE FROM `#@__channeltype` WHERE id='$id' "); + //更新栏目缓存 + UpDateCatCache($dsql); + ShowMsg("成功删除一个模型", "mychannel_main.php"); + exit(); + } +} //del +/*---------------- +function __modifysearch() +-----------------*/ +else if ($dopost == 'modifysearch') { + if (!isset($step)) $step = 0; + if (empty($step)) { + $step = 1; + $mid = intval($mid); + $query = "SELECT mainfields, addonfields, template FROM `#@__advancedsearch` WHERE mid='$mid'"; + $searchinfo = $dsql->GetOne($query); + if (!is_array($searchinfo)) { + $searchinfo = array(); + $searchinfo['mainfields'] = $searchinfo['addonfields'] = $searchinfo['template'] = ''; + } + $searchinfo['mainfields'] = explode(',', $searchinfo['mainfields']); + $searchinfo['addonfields'] = explode(',', $searchinfo['addonfields']); + $addonfieldsarr = array(); + foreach ($searchinfo['addonfields'] as $k) { + $karr = explode(':', $k); + $addonfieldsarr[] = $karr[0]; + } + $template = $searchinfo['template'] == '' ? 'advancedsearch.htm' : $searchinfo['template']; + $c1 = in_array('iscommend', $searchinfo['mainfields']) ? 'checked' : ''; + $c2 = in_array('typeid', $searchinfo['mainfields']) ? 'checked' : ''; + $c3 = in_array('writer', $searchinfo['mainfields']) ? 'checked' : ''; + $c4 = in_array('source', $searchinfo['mainfields']) ? 'checked' : ''; + $c5 = in_array('senddate', $searchinfo['mainfields']) ? 'checked' : ''; + $mainfields = ' '; + $mainfields .= ' '; + $mainfields .= ' '; + $mainfields .= ' '; + $mainfields .= ' '; + /* + $mainfields .= ''; + $mainfields .= ''; + $mainfields .= ''; + $mainfields .= ''; + $mainfields .= ''; + */ + $query = "SELECT * FROM `#@__channeltype` WHERE id='$mid'"; + $channel = $dsql->GetOne($query); + $searchtype = array('int', 'datetime', 'float', 'textdata', 'textchar', 'text', 'htmltext', 'multitext', 'select', 'radio', 'checkbox'); + $addonfields = ''; + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource($channel['fieldset']); + if ($channel['issystem'] < 0) { + $checked = in_array('typeid', $addonfieldsarr) ? 'checked' : ''; + $addonfields .= ' '; + $checked = in_array('senddate', $addonfieldsarr) ? 'checked' : ''; + $addonfields .= ' '; + } + if (is_array($dtp->CTags) && !empty($dtp->CTags)) { + foreach ($dtp->CTags as $ctag) { + $datatype = $ctag->GetAtt('type'); + $value = $ctag->GetName(); + if ($channel['issystem'] < 0) { + $_oo = array('channel', 'arcrank', 'title', 'senddate', 'mid', 'click', 'flag', 'litpic', 'userip', 'lastpost', 'scores', 'goodpost', 'badpost', 'endtime'); + if (in_array($value, $_oo)) continue; + } + $label = $ctag->GetAtt('itemname'); + if (in_array($datatype, $searchtype)) { + $checked = in_array($value, $addonfieldsarr) ? 'checked' : ''; + $addonfields .= " "; + } + } + } + require_once(dirname(__FILE__)."/templets/mychannel_modifysearch.htm"); + } else if ($step == 1) { + $query = "SELECT * FROM `#@__channeltype` WHERE id='$mid'"; + $channel = $dsql->GetOne($query); + if (empty($addonfields)) { + $addonfields = ''; + } + $template = trim($template); + $forms = '
'; + $forms .= ""; + $forms .= ""; + $forms .= "关键词:
"; + $mainstring = ''; + if (!empty($mainfields) && is_array($mainfields)) { + $mainstring = implode(',', $mainfields); + foreach ($mainfields as $mainfield) { + if ($mainfield == 'typeid') { + require_once(DEDEINC."/typelink/typelink.class.php"); + $tl = new TypeLink(0); + $typeOptions = $tl->GetOptionArray(0, 0, $mid); + $forms .= "
栏目:"; + $forms .= "
"; + } else if ($mainfield == 'iscommend') { + $forms .= "
"; + } else if ($mainfield == 'writer') { + $forms .= "作者:
"; + } else if ($mainfield == 'source') { + $forms .= "来源:
"; + } else if ($mainfield == 'senddate') { + $forms .= "开始时间:
"; + $forms .= "结束时间:
"; + } + } + } + $addonstring = ''; + $intarr = array('int', 'float'); + $textarr = array('textdata', 'textchar', 'text', 'htmltext', 'multitext'); + if ($channel['issystem'] < 0) { + foreach ((array)$addonfields as $addonfield) { + if ($addonfield == 'typeid') { + require_once(DEDEINC."/typelink/typelink.class.php"); + $tl = new TypeLink(0); + $typeOptions = $tl->GetOptionArray(0, 0, $mid); + $forms .= "
栏目:"; + $forms .= "
"; + $addonstring .= 'typeid:int,'; + } elseif ($addonfield == 'senddate') { + $forms .= "开始时间:
"; + $forms .= "结束时间:
"; + $addonstring .= 'senddate:datetime,'; + } + } + } + if (is_array($addonfields) && !empty($addonfields)) { + $query = "SELECT * FROM #@__channeltype WHERE id='$mid'"; + $channel = $dsql->GetOne($query); + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource($channel['fieldset']); + $fieldarr = $itemarr = $typearr = array(); + foreach ($dtp->CTags as $ctag) { + foreach ($addonfields as $addonfield) { + + if ($ctag->GetName() == $addonfield) { + if ($addonfield == 'typeid' || $addonfield == 'senddate') continue; + + $fieldarr[] = $addonfield; + $itemarr[] = $ctag->GetAtt('itemname'); + $typearr[] = $ctag->GetAtt('type'); + $valuearr[] = $ctag->GetAtt('default'); + } + } + } + foreach ($fieldarr as $k => $field) { + $itemname = $itemarr[$k]; + $name = $field; + $type = $typearr[$k]; + $tmp = $name.':'.$type; + if (in_array($type, $intarr)) { + $forms .= "
$itemname :
"; + } else if (in_array($type, $textarr)) { + $forms .= "$itemname :
"; + } else if ($type == 'select') { + $values = explode(',', $valuearr[$k]); + if (is_array($values) && !empty($values)) { + $forms .= "
$itemname : "; + } + } else if ($type == 'radio') { + $values = explode(',', $valuearr[$k]); + if (is_array($values) && !empty($values)) { + $forms .= "
$itemname : "; + foreach ($values as $value) { + $forms .= ""; + } + } + } else if ($type == 'checkbox') { + $values = explode(',', $valuearr[$k]); + if (is_array($values) && !empty($values)) { + $forms .= "
$itemname : "; + foreach ($values as $value) { + $forms .= ""; + } + } + } elseif ($type == 'datetime') { + $forms .= "
开始时间:
"; + $forms .= "结束时间:
"; + } else { + $tmp = ''; + } + $addonstring .= $tmp.','; + } + } + $forms .= '
'; + $formssql = addslashes($forms); + $query = "REPLACE INTO #@__advancedsearch(mid, maintable, mainfields, addontable, addonfields, forms, template) VALUES('$mid','$maintable','$mainstring','$addontable','$addonstring','$formssql', '$template')"; + $dsql->ExecuteNoneQuery($query); + $formshtml = dede_htmlspecialchars($forms); + echo ''; + echo "下面为生成的html表单,请自行复制,根据自己需求修改样式后粘贴到对应的模板中

"; + echo '
预览:

'; + echo $forms; + } + exit; +} +//删除自定义搜索; +else if ($dopost == 'del') { + $mid = intval($mid); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__advancedsearch` WHERE mid = '$mid'; "); + ShowMsg("成功删除一个自定义搜索", "mychannel_main.php"); + exit(); +} +$row = $dsql->GetOne("SELECT * FROM `#@__channeltype` WHERE id='$id' "); +require_once(DEDEADMIN."/templets/mychannel_edit.htm"); diff --git a/src/dede/mychannel_field_add.php b/src/admin/mychannel_field_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mychannel_field_add.php rename to src/admin/mychannel_field_add.php index a711d1ea..beecd55e --- a/src/dede/mychannel_field_add.php +++ b/src/admin/mychannel_field_add.php @@ -1,148 +1,147 @@ -GetVersion(); - -/*---------------------- -function Save() ----------------------*/ -if ($action == 'save') { - //修改字段配置信息 - $dfvalue = trim($vdefault); - $isnull = ($isnull == 1 ? "true" : "false"); - $mxlen = $maxlength; - - - if (preg_match("#^(select|radio|checkbox)$#i", $dtype)) { - if (!preg_match("#,#", $dfvalue)) { - ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); - exit(); - } - } - - if ($dtype == 'stepselect') { - $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fieldname' "); - if (!is_array($arr)) { - ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); - exit(); - } - } - - //模型信息 - $row = $dsql->GetOne("SELECT fieldset,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); - $fieldset = $row['fieldset']; - $dtp = new DedeTagParse(); - $dtp->SetNameSpace("field", "<", ">"); - $dtp->LoadSource($fieldset); - $trueTable = $row['addtable']; - - //检测被修改的字段类型 - $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - - $ntabsql = $fieldinfos[0]; - $buideType = $fieldinfos[1]; - $rs = $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` ADD $ntabsql "); - if (!$rs) { - $gerr = $dsql->GetError(); - ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); - exit(); - } - - //检测旧配置信息,并替换为新配置 - $ok = FALSE; - $fieldname = strtolower($fieldname); - if (is_array($dtp->CTags)) { - foreach ($dtp->CTags as $tagid => $ctag) { - if ($fieldname == strtolower($ctag->GetName())) { - $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); - $ok = true; - break; - } - } - $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); - } else { - $oksetting = $fieldset."\r\n".stripslashes($fieldstring); - } - - $addlist = GetAddFieldList($dtp, $oksetting); - $oksetting = addslashes($oksetting); - $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); - if (!$rs) { - $grr = $dsql->GetError(); - ShowMsg("保存节点配置出错".$grr, "javascript:;"); - exit(); - } - - ShowMsg("成功增加一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); - exit(); -} - -/*---------------------- -function ShowPage() ----------------------*/ -//检测模型相关信息,并初始化相关数据 -$row = $dsql->GetOne("SELECT '#@__archives' AS maintable,addtable FROM `#@__channeltype` WHERE id='$id'"); - -$trueTable = $row['addtable']; -$tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; - -if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) TYPE=MyISAM; "; -} else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; -} - -$dsql->ExecuteNoneQuery($tabsql); - -//检测附加表里含有的字段 -$fields = array(); - -if (empty($row['maintable'])) $row['maintable'] = '#@__archives'; - -$rs = $dsql->SetQuery("SHOW fields FROM `{$row['maintable']}`"); -$dsql->Execute('a'); -while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { - if ($cfg_dbtype == 'sqlite') { - $nrow['Field'] = $nrow['name']; - } - $fields[strtolower($nrow['Field'])] = 1; -} - -$dsql->Execute("a", "SHOW fields FROM `{$row['addtable']}`"); -while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { - if ($cfg_dbtype == 'sqlite') { - $nrow['Field'] = $nrow['name']; - } - if (!isset($fields[strtolower($nrow['Field'])])) { - $fields[strtolower($nrow['Field'])] = 1; - } -} - -$f = ''; -foreach ($fields as $k => $v) { - $f .= ($f == '' ? $k : ' '.$k); -} - -// 获取频道模型 -$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $channelArray[$row->id]['typename'] = $row->typename; - $channelArray[$row->id]['nid'] = $row->nid; -} - -require_once(DEDEADMIN."/templets/mychannel_field_add.htm"); +GetVersion(); + +/*---------------------- +function Save() +---------------------*/ +if ($action == 'save') { + //修改字段配置信息 + $dfvalue = trim($vdefault); + $isnull = ($isnull == 1 ? "true" : "false"); + $mxlen = $maxlength; + + + if (preg_match("#^(select|radio|checkbox)$#i", $dtype)) { + if (!preg_match("#,#", $dfvalue)) { + ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); + exit(); + } + } + + if ($dtype == 'stepselect') { + $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fieldname' "); + if (!is_array($arr)) { + ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); + exit(); + } + } + + //模型信息 + $row = $dsql->GetOne("SELECT fieldset,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); + $fieldset = stripslashes($row['fieldset']); + $dtp = new DedeTagParse(); + $dtp->SetNameSpace("field", "<", ">"); + $dtp->LoadSource($fieldset); + $trueTable = $row['addtable']; + + //检测被修改的字段类型 + $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); + + $ntabsql = $fieldinfos[0]; + $buideType = $fieldinfos[1]; + $rs = $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` ADD $ntabsql "); + if (!$rs) { + $gerr = $dsql->GetError(); + ShowMsg("增加字段失败,错误提示为:".$gerr, "javascript:;"); + exit(); + } + + //检测旧配置信息,并替换为新配置 + $ok = FALSE; + $fieldname = strtolower($fieldname); + if (is_array($dtp->CTags)) { + foreach ($dtp->CTags as $tagid => $ctag) { + if ($fieldname == strtolower($ctag->GetName())) { + $dtp->Assign($tagid, stripslashes($fieldstring), FALSE); + $ok = true; + break; + } + } + $oksetting = $ok ? $dtp->GetResultNP() : $fieldset."\n".stripslashes($fieldstring); + } else { + $oksetting = $fieldset."\r\n".stripslashes($fieldstring); + } + + $addlist = GetAddFieldList($dtp, $oksetting); + $oksetting = addslashes($oksetting); + $rs = $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); + if (!$rs) { + $grr = $dsql->GetError(); + ShowMsg("保存节点配置出错".$grr, "javascript:;"); + exit(); + } + + ShowMsg("成功增加一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); + exit(); +} + +/*---------------------- +function ShowPage() +---------------------*/ +//检测模型相关信息,并初始化相关数据 +$row = $dsql->GetOne("SELECT '#@__archives' AS maintable,addtable FROM `#@__channeltype` WHERE id='$id'"); + +$trueTable = $row['addtable']; +$tabsql = "CREATE TABLE IF NOT EXISTS `$trueTable`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; + +if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) TYPE=MyISAM; "; +} else { + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; +} + +$dsql->ExecuteNoneQuery($tabsql); + +//检测附加表里含有的字段 +$fields = array(); + +if (empty($row['maintable'])) $row['maintable'] = '#@__archives'; + +$rs = $dsql->SetQuery("SHOW fields FROM `{$row['maintable']}`"); +$dsql->Execute('a'); +while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { + if ($cfg_dbtype == 'sqlite') { + $nrow['Field'] = $nrow['name']; + } + $fields[strtolower($nrow['Field'])] = 1; +} + +$dsql->Execute("a", "SHOW fields FROM `{$row['addtable']}`"); +while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { + if ($cfg_dbtype == 'sqlite') { + $nrow['Field'] = $nrow['name']; + } + if (!isset($fields[strtolower($nrow['Field'])])) { + $fields[strtolower($nrow['Field'])] = 1; + } +} + +$f = ''; +foreach ($fields as $k => $v) { + $f .= ($f == '' ? $k : ' '.$k); +} + +//获取频道模型 +$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $channelArray[$row->id]['typename'] = $row->typename; + $channelArray[$row->id]['nid'] = $row->nid; +} + +require_once(DEDEADMIN."/templets/mychannel_field_add.htm"); diff --git a/src/dede/mychannel_field_edit.php b/src/admin/mychannel_field_edit.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/mychannel_field_edit.php rename to src/admin/mychannel_field_edit.php index 60921f29..7fa2dd12 --- a/src/dede/mychannel_field_edit.php +++ b/src/admin/mychannel_field_edit.php @@ -1,150 +1,150 @@ -GetVersion(); - -//获取模型信息 -$row = $dsql->GetOne("SELECT fieldset,'' as maintable,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); -$fieldset = $row['fieldset']; -$trueTable = $row['addtable']; - -$dtp = new DedeTagParse(); -$dtp->SetNameSpace("field", "<", ">"); -$dtp->LoadSource($fieldset); -foreach ($dtp->CTags as $ctag) { - if (strtolower($ctag->GetName()) == strtolower($fname)) break; -} - -//字段类型信息 -$ds = file(dirname(__FILE__)."/inc/fieldtype.txt"); -foreach ($ds as $d) { - $dds = explode(',', trim($d)); - $fieldtypes[$dds[0]] = $dds[1]; -} - -// 获取频道模型 -$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); -$dsql->Execute(); -while ($crow = $dsql->GetObject()) { - $channelArray[$crow->id]['typename'] = $crow->typename; - $channelArray[$crow->id]['nid'] = $crow->nid; -} - -//保存更改 -/*-------------------- -function _SAVE() -----------------------*/ -if ($action == 'save') { - if (!isset($fieldtypes[$dtype])) { - ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); - exit(); - } - - $dfvalue = $vdefault; - if (preg_match("#^(select|radio|checkbox)#", $dtype)) { - if (!preg_match("#,#", $dfvalue)) { - ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); - exit(); - } - } - - if ($dtype == 'stepselect') { - $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fname' "); - if (!is_array($arr)) { - ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); - exit(); - } - } - - //检测数据库是否存在附加表,不存在则新建一个 - $tabsql = "CREATE TABLE IF NOT EXISTS `{$row['addtable']}`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; - if ($mysql_version < 4.1) { - $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) TYPE=MyISAM; "; - } else { - $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; - } - $dsql->ExecuteNoneQuery($tabsql); - - //检测附加表里含有的字段 - $fields = array(); - $rs = $dsql->SetQuery("SHOW fields FROM `{$row['addtable']}`"); - $dsql->Execute('a'); - while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { - $fields[strtolower($nrow['Field'])] = $nrow['Type']; - } - - //修改字段配置信息 - $isnull = ($isnull == 1 ? "true" : "false"); - $mxlen = $maxlength; - $fieldname = strtolower($fname); - - //检测被修改的字段类型,并更新数据表 - $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); - $ntabsql = $fieldinfos[0]; - $buideType = $fieldinfos[1]; - $tabsql = ''; - - //检测旧数据类型,并替换为新配置 - foreach ($dtp->CTags as $tagid => $ctag) { - if ($fieldname == strtolower($ctag->GetName())) { - if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { - $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; - $dsql->ExecuteNoneQuery($tabsql); - } else if (!isset($fields[$fieldname])) { - $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; - $dsql->ExecuteNoneQuery($tabsql); - } else { - $tabsql = ''; - } - $dtp->Assign($tagid, stripslashes($fieldstring), false); - break; - } - } - $oksetting = $dtp->GetResultNP(); - - $addlist = GetAddFieldList($dtp, $oksetting); - $oksetting = addslashes($oksetting); - $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); - - ShowMsg("成功更改一个字段的配置", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); - exit(); -} -/*------------------ -删除字段 -function _DELETE() --------------------*/ else if ($action == "delete") { - if ($row['issystem'] == 1) { - ShowMsg("对不起,系统模型的字段不允许删除", "-1"); - exit(); - } - - //检测旧数据类型,并替换为新配置 - foreach ($dtp->CTags as $tagid => $ctag) { - if (strtolower($ctag->GetName()) == strtolower($fname)) { - $dtp->Assign($tagid, "#@Delete@#"); - } - } - - $oksetting = addslashes($dtp->GetResultNP()); - $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting' WHERE id='$id' "); - $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); - ShowMsg("成功删除一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); - exit(); -} - -require_once(DEDEADMIN."/templets/mychannel_field_edit.htm"); +GetVersion(); + +//获取模型信息 +$row = $dsql->GetOne("SELECT fieldset,'' as maintable,addtable,issystem FROM `#@__channeltype` WHERE id='$id'"); +$fieldset = stripslashes($row['fieldset']); +$trueTable = $row['addtable']; + +$dtp = new DedeTagParse(); +$dtp->SetNameSpace("field", "<", ">"); +$dtp->LoadSource($fieldset); +foreach ($dtp->CTags as $ctag) { + if (strtolower($ctag->GetName()) == strtolower($fname)) break; +} + +//字段类型信息 +$ds = file(dirname(__FILE__)."/inc/fieldtype.txt"); +foreach ($ds as $d) { + $dds = explode(',', trim($d)); + $fieldtypes[$dds[0]] = $dds[1]; +} + +//获取频道模型 +$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); +$dsql->Execute(); +while ($crow = $dsql->GetObject()) { + $channelArray[$crow->id]['typename'] = $crow->typename; + $channelArray[$crow->id]['nid'] = $crow->nid; +} + +//保存修改 +/*-------------------- +function _SAVE() +----------------------*/ +if ($action == 'save') { + if (!isset($fieldtypes[$dtype])) { + ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); + exit(); + } + + $dfvalue = $vdefault; + if (preg_match("#^(select|radio|checkbox)#", $dtype)) { + if (!preg_match("#,#", $dfvalue)) { + ShowMsg("您设定了字段为 {$dtype} 类型,必须在默认值中指定元素列表,如:'a,b,c' ", "-1"); + exit(); + } + } + + if ($dtype == 'stepselect') { + $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE egroup='$fname' "); + if (!is_array($arr)) { + ShowMsg("您设定了字段为联动类型,但系统中没找到与您定义的字段名相同的联动组名!", "-1"); + exit(); + } + } + + //检测数据库是否存在附加表,不存在则新建一个 + $tabsql = "CREATE TABLE IF NOT EXISTS `{$row['addtable']}`( `aid` int(11) NOT NULL default '0',\r\n `typeid` int(11) NOT NULL default '0',\r\n "; + if ($mysql_version < 4.1) { + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) TYPE=MyISAM; "; + } else { + $tabsql .= " PRIMARY KEY (`aid`), KEY `".$trueTable."_index` (`typeid`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language."; "; + } + $dsql->ExecuteNoneQuery($tabsql); + + //检测附加表里含有的字段 + $fields = array(); + $rs = $dsql->SetQuery("SHOW fields FROM `{$row['addtable']}`"); + $dsql->Execute('a'); + while ($nrow = $dsql->GetArray('a', MYSQL_ASSOC)) { + $fields[strtolower($nrow['Field'])] = $nrow['Type']; + } + + //修改字段配置信息 + $isnull = ($isnull == 1 ? "true" : "false"); + $mxlen = $maxlength; + $fieldname = strtolower($fname); + + //检测被修改的字段类型,并更新数据表 + $fieldinfos = GetFieldMake($dtype, $fieldname, $dfvalue, $mxlen); + $ntabsql = $fieldinfos[0]; + $buideType = $fieldinfos[1]; + $tabsql = ''; + + //检测旧数据类型,并替换为新配置 + foreach ($dtp->CTags as $tagid => $ctag) { + if ($fieldname == strtolower($ctag->GetName())) { + if (isset($fields[$fieldname]) && $fields[$fieldname] != $buideType) { + $tabsql = "ALTER TABLE `$trueTable` CHANGE `$fieldname` ".$ntabsql; + $dsql->ExecuteNoneQuery($tabsql); + } else if (!isset($fields[$fieldname])) { + $tabsql = "ALTER TABLE `$trueTable` ADD ".$ntabsql; + $dsql->ExecuteNoneQuery($tabsql); + } else { + $tabsql = ''; + } + $dtp->Assign($tagid, stripslashes($fieldstring), false); + break; + } + } + $oksetting = $dtp->GetResultNP(); + + $addlist = GetAddFieldList($dtp, $oksetting); + $oksetting = addslashes($oksetting); + $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting',listfields='$addlist' WHERE id='$id' "); + + ShowMsg("成功修改一个字段的配置", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); + exit(); +} +/*------------------ +删除字段 +function _DELETE() +-------------------*/ +else if ($action == "delete") { + if ($row['issystem'] == 1) { + ShowMsg("对不起,系统模型的字段不允许删除", "-1"); + exit(); + } + + //检测旧数据类型,并替换为新配置 + foreach ($dtp->CTags as $tagid => $ctag) { + if (strtolower($ctag->GetName()) == strtolower($fname)) { + $dtp->Assign($tagid, "#@Delete@#"); + } + } + + $oksetting = addslashes($dtp->GetResultNP()); + $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET fieldset='$oksetting' WHERE id='$id' "); + $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); + ShowMsg("成功删除一个字段", "mychannel_edit.php?id={$id}&dopost=edit&openfield=1"); + exit(); +} + +require_once(DEDEADMIN."/templets/mychannel_field_edit.htm"); diff --git a/src/dede/mychannel_main.php b/src/admin/mychannel_main.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mychannel_main.php rename to src/admin/mychannel_main.php index 015143ad..44e765ca --- a/src/dede/mychannel_main.php +++ b/src/admin/mychannel_main.php @@ -1,35 +1,34 @@ -SetTemplet(DEDEADMIN."/templets/mychannel_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); - -function GetSta($sta, $id) -{ - if ($sta == 1) { - return ($id != -1 ? "启用 > 禁用" : "固定项目"); - } else { - return "禁用 > 启用"; - } -} - -function IsSystem($s) -{ - return $s == 1 ? "系统" : "自动"; -} +SetTemplet(DEDEADMIN."/templets/mychannel_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); + +function GetSta($sta, $id) +{ + if ($sta == 1) { + return ($id != -1 ? "启用 > 禁用" : "固定项目"); + } else { + return "禁用 > 启用"; + } +} + +function IsSystem($s) +{ + return $s == 1 ? "系统" : "自动"; +} diff --git a/src/dede/mynews_add.php b/src/admin/mynews_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/mynews_add.php rename to src/admin/mynews_add.php index 4e168385..3785d336 --- a/src/dede/mynews_add.php +++ b/src/admin/mynews_add.php @@ -1,24 +1,23 @@ -ExecuteNoneQuery($query); - ShowMsg("成功发布一条站内新闻", "mynews_main.php"); - exit(); -} -include DedeInclude('templets/mynews_add.htm'); +ExecuteNoneQuery($query); + ShowMsg("成功发布一条站内新闻", "mynews_main.php"); + exit(); +} +include DedeInclude('templets/mynews_add.htm'); diff --git a/src/dede/mynews_edit.php b/src/admin/mynews_edit.php old mode 100755 new mode 100644 similarity index 92% rename from src/dede/mynews_edit.php rename to src/admin/mynews_edit.php index f3e3fb40..a7f8e31a --- a/src/dede/mynews_edit.php +++ b/src/admin/mynews_edit.php @@ -1,28 +1,27 @@ -ExecuteNoneQuery("DELETE FROM #@__mynews WHERE aid='$aid';"); - ShowMsg("成功删除一条站内新闻", "mynews_main.php"); - exit(); -} else if ($dopost == "editsave") { - $inquery = "UPDATE #@__mynews SET title='$title',typeid='$typeid',writer='$writer',senddate='".GetMKTime($sdate)."',body='$body' WHERE aid='$aid';"; - $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功更改一条站内新闻", "mynews_main.php"); - exit(); -} -$myNews = $dsql->GetOne("SELECT #@__mynews.*,#@__arctype.typename FROM #@__mynews LEFT JOIN #@__arctype ON #@__arctype.id=#@__mynews.typeid WHERE #@__mynews.aid='$aid';"); -include DedeInclude('templets/mynews_edit.htm'); +ExecuteNoneQuery("DELETE FROM #@__mynews WHERE aid='$aid';"); + ShowMsg("成功删除一条站内新闻", "mynews_main.php"); + exit(); +} else if ($dopost == "editsave") { + $inquery = "UPDATE #@__mynews SET title='$title',typeid='$typeid',writer='$writer',senddate='".GetMKTime($sdate)."',body='$body' WHERE aid='$aid';"; + $dsql->ExecuteNoneQuery($inquery); + ShowMsg("成功修改一条站内新闻", "mynews_main.php"); + exit(); +} +$myNews = $dsql->GetOne("SELECT #@__mynews.*,#@__arctype.typename FROM #@__mynews LEFT JOIN #@__arctype ON #@__arctype.id=#@__mynews.typeid WHERE #@__mynews.aid='$aid';"); +include DedeInclude('templets/mynews_edit.htm'); diff --git a/src/dede/mynews_main.php b/src/admin/mynews_main.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/mynews_main.php rename to src/admin/mynews_main.php index ff426edc..68035140 --- a/src/dede/mynews_main.php +++ b/src/admin/mynews_main.php @@ -1,26 +1,25 @@ -SetTemplet(DEDEADMIN."/templets/mynews_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); +SetTemplet(DEDEADMIN."/templets/mynews_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); diff --git a/src/dede/mytag_add.php b/src/admin/mytag_add.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/mytag_add.php rename to src/admin/mytag_add.php index 0fb39ae1..1668fe87 --- a/src/dede/mytag_add.php +++ b/src/admin/mytag_add.php @@ -1,5 +1,4 @@ ExecuteNoneQuery($query); - ShowMsg("成功更改一个自定义标记", $ENV_GOBACK_URL); + ShowMsg("成功修改一个自定义标记", $ENV_GOBACK_URL); exit(); } else if ($dopost == "getjs") { - require_once(DEDEINC."/oxwindow.class.php"); + require_once(DEDEINC."/libraries/oxwindow.class.php"); $jscode = ""; $showhtml = "\r\n\r\n$jscode\r\n\r\n"; $showhtml .= "预览:"; diff --git a/src/dede/mytag_main.php b/src/admin/mytag_main.php old mode 100755 new mode 100644 similarity index 99% rename from src/dede/mytag_main.php rename to src/admin/mytag_main.php index aad19cf4..78075366 --- a/src/dede/mytag_main.php +++ b/src/admin/mytag_main.php @@ -1,5 +1,4 @@ 0) $attlist .= " typeid='".$typeid."'"; -if (isset($arcid)) $attlist .= " idlist='".$arcid."'"; -if ($channel > 0) $attlist .= " channelid='".$channel."'"; -if ($att > 0) $attlist .= " att='".$att."'"; -if ($col > 1) $attlist .= " col='".$col."'"; -if ($subday > 0) $attlist .= " subday='".$subday."'"; - -if (!empty($types)) { - $attlist .= " type='"; - foreach ($types as $v) { - $attlist .= $v.'.'; - } - $attlist .= "'"; -} -$innertext = stripslashes($innertext); -if ($keyword != "") { - $attlist .= " keyword='$keyword'"; -} -$fulltag = "{dede:arclist$attlist} -$innertext -{/dede:arclist}\r\n"; -if ($dopost == 'savetag') { - $fulltag = addslashes($fulltag); - $tagname = "auto"; - $inQuery = "INSERT INTO `#@__mytag`(typeid,tagname,timeset,starttime,endtime,normbody,expbody) - VALUES('0','$tagname','0','0','0','$fulltag',''); - "; - $dsql->ExecuteNoneQuery($inQuery); - $id = $dsql->GetLastID(); - $dsql->ExecuteNoneQuery("UPDATE `#@__mytag` SET tagname='{$tagname}_{$id}' WHERE aid='$id'"); - $fulltag = "{dede:mytag name='{$tagname}_{$id}' ismake='yes'/}"; -} -include DedeInclude('templets/mytag_tag_guide_ok.htm'); + 0) $attlist .= " typeid='".$typeid."'"; +if (isset($arcid)) $attlist .= " idlist='".$arcid."'"; +if ($channel > 0) $attlist .= " channelid='".$channel."'"; +if ($att > 0) $attlist .= " att='".$att."'"; +if ($col > 1) $attlist .= " col='".$col."'"; +if ($subday > 0) $attlist .= " subday='".$subday."'"; + +if (!empty($types)) { + $attlist .= " type='"; + foreach ($types as $v) { + $attlist .= $v.'.'; + } + $attlist .= "'"; +} +$innertext = stripslashes($innertext); +if ($keyword != "") { + $attlist .= " keyword='$keyword'"; +} +$fulltag = "{dede:arclist$attlist} +$innertext +{/dede:arclist}\r\n"; +if ($dopost == 'savetag') { + $fulltag = addslashes($fulltag); + $tagname = "auto"; + $inQuery = "INSERT INTO `#@__mytag`(typeid,tagname,timeset,starttime,endtime,normbody,expbody) + VALUES('0','$tagname','0','0','0','$fulltag',''); + "; + $dsql->ExecuteNoneQuery($inQuery); + $id = $dsql->GetLastID(); + $dsql->ExecuteNoneQuery("UPDATE `#@__mytag` SET tagname='{$tagname}_{$id}' WHERE aid='$id'"); + $fulltag = "{dede:mytag name='{$tagname}_{$id}' ismake='yes'/}"; +} +include DedeInclude('templets/mytag_tag_guide_ok.htm'); diff --git a/src/dede/pic_view.php b/src/admin/pic_view.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/pic_view.php rename to src/admin/pic_view.php index 8940aaab..c6522e05 --- a/src/dede/pic_view.php +++ b/src/admin/pic_view.php @@ -1,137 +1,136 @@ -转到上级目录\n"); - } -} - -function ListPic($truePath, $nowPath) -{ - global $listSize; - $col = 0; - $rowdd = 0; - $rowdd++; - $imgfile = ""; - $truePath = preg_replace("#\/$#", "", preg_replace("#\\\\{1,}#", "/", trim($truePath))); - $nowPath = preg_replace("#\/$#", "", preg_replace("#\/{1,}#", "/", trim($nowPath))); - $dh = dir($truePath); - echo ("\n"); - while ($filename = $dh->read()) { - if (!preg_match("#\.$#", $filename)) { - $fullName = $truePath."/".$filename; - $fileUrl = $nowPath."/".$filename; - if (is_dir($fullName)) { - if ($col % $listSize == 0 && $col != 0) { - echo ("\n\n"); - for ($i = $rowdd - $listSize; $i < $rowdd; $i++) { - echo ("".$filelist[$i]."\n"); - } - echo ("\n\n"); - } - $line = " - - -
- - -
"; - $filelist[$rowdd] = $filename; - $col++; - $rowdd++; - echo $line; - } else if (IsImg($filename)) { - if ($col % $listSize == 0 && $col != 0) { - echo ("\n\n"); - for ($i = $rowdd - $listSize; $i < $rowdd; $i++) { - echo ("".$filelist[$i]."\n"); - } - echo ("\n\n"); - } - $line = " - - - - -
- ".GetImgFile($truePath, $nowPath, $filename)." -
"; - $filelist[$rowdd] = $filename; - $col++; - $rowdd++; - echo $line; - } - } - } - echo ("\n"); - if (!empty($filelist)) { - echo ("\n"); - $t = ($rowdd - 1) % $listSize; - if ($t == 0) { - $t = $listSize; - } - for ($i = $rowdd - $t; $i < $rowdd; $i++) { - echo ("".$filelist[$i]."\n"); - } - echo ("\n"); - } -} - -function GetImgFile($truePath, $nowPath, $fileName) -{ - $toW = 102; - $toH = 102; - $srcFile = $truePath."/".$fileName; - $info = ""; - $data = GetImageSize($srcFile, $info); - $srcW = $data[0]; - $srcH = $data[1]; - if ($toW >= $srcW && $toH >= $srcH) { - $ftoW = $srcW; - $ftoH = $srcH; - } else { - $toWH = $toW / $toH; - $srcWH = $srcW / $srcH; - if ($toWH <= $srcWH) { - $ftoW = $toW; - $ftoH = $ftoW * ($srcH / $srcW); - } else { - $ftoH = $toH; - $ftoW = $ftoH * ($srcW / $srcH); - } - } - return (""); -} - -function IsImg($fileName) -{ - if (preg_match("#\.(jpg|gif|png)$#", $fileName)) return 1; - else return 0; -} +转到上级目录\n"); + } +} + +function ListPic($truePath, $nowPath) +{ + global $listSize; + $col = 0; + $rowdd = 0; + $rowdd++; + $imgfile = ""; + $truePath = preg_replace("#\/$#", "", preg_replace("#\\\\{1,}#", "/", trim($truePath))); + $nowPath = preg_replace("#\/$#", "", preg_replace("#\/{1,}#", "/", trim($nowPath))); + $dh = dir($truePath); + echo ("\n"); + while ($filename = $dh->read()) { + if (!preg_match("#\.$#", $filename)) { + $fullName = $truePath."/".$filename; + $fileUrl = $nowPath."/".$filename; + if (is_dir($fullName)) { + if ($col % $listSize == 0 && $col != 0) { + echo ("\n\n"); + for ($i = $rowdd - $listSize; $i < $rowdd; $i++) { + echo ("".$filelist[$i]."\n"); + } + echo ("\n\n"); + } + $line = " + + +
+ + +
"; + $filelist[$rowdd] = $filename; + $col++; + $rowdd++; + echo $line; + } else if (IsImg($filename)) { + if ($col % $listSize == 0 && $col != 0) { + echo ("\n\n"); + for ($i = $rowdd - $listSize; $i < $rowdd; $i++) { + echo ("".$filelist[$i]."\n"); + } + echo ("\n\n"); + } + $line = " + + + + +
+ ".GetImgFile($truePath, $nowPath, $filename)." +
"; + $filelist[$rowdd] = $filename; + $col++; + $rowdd++; + echo $line; + } + } + } + echo ("\n"); + if (!empty($filelist)) { + echo ("\n"); + $t = ($rowdd - 1) % $listSize; + if ($t == 0) { + $t = $listSize; + } + for ($i = $rowdd - $t; $i < $rowdd; $i++) { + echo ("".$filelist[$i]."\n"); + } + echo ("\n"); + } +} + +function GetImgFile($truePath, $nowPath, $fileName) +{ + $toW = 102; + $toH = 102; + $srcFile = $truePath."/".$fileName; + $info = ""; + $data = GetImageSize($srcFile, $info); + $srcW = $data[0]; + $srcH = $data[1]; + if ($toW >= $srcW && $toH >= $srcH) { + $ftoW = $srcW; + $ftoH = $srcH; + } else { + $toWH = $toW / $toH; + $srcWH = $srcW / $srcH; + if ($toWH <= $srcWH) { + $ftoW = $toW; + $ftoH = $ftoW * ($srcH / $srcW); + } else { + $ftoH = $toH; + $ftoW = $ftoH * ($srcW / $srcH); + } + } + return (""); +} + +function IsImg($fileName) +{ + if (preg_match("#\.(jpg|gif|png)$#", $fileName)) return 1; + else return 0; +} diff --git a/src/dede/plus_edit.php b/src/admin/plus_edit.php old mode 100755 new mode 100644 similarity index 72% rename from src/dede/plus_edit.php rename to src/admin/plus_edit.php index 604716d3..406d7620 --- a/src/dede/plus_edit.php +++ b/src/admin/plus_edit.php @@ -1,54 +1,53 @@ -ExecuteNoneQuery("UPDATE `#@__plus` SET isshow=1 WHERE aid='$aid';"); - ShowMsg("成功启用一个插件,请刷新导航菜单!", "plus_main.php"); - exit(); -} else if ($dopost == "hide") { - $dsql->ExecuteNoneQuery("UPDATE `#@__plus` SET isshow=0 WHERE aid='$aid';"); - ShowMsg("成功禁用一个插件,请刷新导航菜单!", "plus_main.php"); - exit(); -} else if ($dopost == "delete") { - if (empty($job)) $job = ""; - if ($job == "") //确认提示 - { - require_once(DEDEINC."/oxwindow.class.php"); - $wintitle = "删除插件"; - $wecome_info = "插件管理::删除插件"; - $win = new OxWindow(); - $win->Init("plus_edit.php", "js/blank.js", "POST"); - $win->AddHidden("job", "yes"); - $win->AddHidden("dopost", $dopost); - $win->AddHidden("aid", $aid); - $win->AddTitle("您确实要删除'".$title."'这个插件?"); - $win->AddMsgItem("警告:在这里删除仅仅删除菜单项,要干净删除请在模块管理处删除

模块管理>>
"); - $winform = $win->GetWindow("ok"); - $win->Display(); - exit(); - } else if ($job == "yes") //操作 - { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__plus` WHERE aid='$aid';"); - ShowMsg("成功删除一个插件,请刷新导航菜单!", "plus_main.php"); - exit(); - } -} else if ($dopost == "saveedit") //保存更改 -{ - $inquery = "UPDATE `#@__plus` SET plusname='$plusname',menustring='$menustring',filelist='$filelist' WHERE aid='$aid';"; - $dsql->ExecuteNoneQuery($inquery); - ShowMsg("成功更改插件的配置!", "plus_main.php"); - exit(); -} -$row = $dsql->GetOne("SELECT * FROM `#@__plus` WHERE aid='$aid'"); -include DedeInclude('templets/plus_edit.htm'); +ExecuteNoneQuery("UPDATE `#@__plus` SET isshow=1 WHERE aid='$aid';"); + ShowMsg("成功启用一个插件,请刷新导航菜单", "plus_main.php"); + exit(); +} else if ($dopost == "hide") { + $dsql->ExecuteNoneQuery("UPDATE `#@__plus` SET isshow=0 WHERE aid='$aid';"); + ShowMsg("成功禁用一个插件,请刷新导航菜单", "plus_main.php"); + exit(); +} else if ($dopost == "delete") { + if (empty($job)) $job = ""; + if ($job == "") //确认提示 + { + require_once(DEDEINC."/libraries/oxwindow.class.php"); + $wintitle = "删除插件"; + $wecome_info = "插件管理::删除插件"; + $win = new OxWindow(); + $win->Init("plus_edit.php", "js/blank.js", "POST"); + $win->AddHidden("job", "yes"); + $win->AddHidden("dopost", $dopost); + $win->AddHidden("aid", $aid); + $win->AddTitle("您确实要删除'".$title."'这个插件"); + $win->AddMsgItem("警告:在这里删除仅仅删除菜单项,要干净删除请在模块管理处删除

模块管理>>"); + $winform = $win->GetWindow("ok"); + $win->Display(); + exit(); + } else if ($job == "yes") //操作 + { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__plus` WHERE aid='$aid';"); + ShowMsg("成功删除一个插件,请刷新导航菜单!", "plus_main.php"); + exit(); + } +} else if ($dopost == "saveedit") //保存修改 +{ + $inquery = "UPDATE `#@__plus` SET plusname='$plusname',menustring='$menustring',filelist='$filelist' WHERE aid='$aid';"; + $dsql->ExecuteNoneQuery($inquery); + ShowMsg("成功修改插件的配置", "plus_main.php"); + exit(); +} +$row = $dsql->GetOne("SELECT * FROM `#@__plus` WHERE aid='$aid'"); +include DedeInclude('templets/plus_edit.htm'); \ No newline at end of file diff --git a/src/dede/plus_main.php b/src/admin/plus_main.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/plus_main.php rename to src/admin/plus_main.php index 089c73ce..b1dbcde9 --- a/src/dede/plus_main.php +++ b/src/admin/plus_main.php @@ -1,30 +1,27 @@ -SetTemplet(DEDEADMIN."/templets/plus_main.htm"); -$dlist->SetSource($sql); -$dlist->display(); - -function GetSta($sta, $id, $title) -{ - if ($sta == 1) { - return "   修改   启用 > 禁用   删除"; - } else { - return "   修改   禁用 > 启用   册除"; - } -} +SetTemplet(DEDEADMIN."/templets/plus_main.htm"); +$dlist->SetSource($sql); +$dlist->display(); +function GetSta($sta, $id, $title) +{ + if ($sta == 1) { + return "   修改   启用 > 禁用   删除"; + } else { + return "   修改   禁用 > 启用   册除"; + } +} \ No newline at end of file diff --git a/src/dede/public_guide.php b/src/admin/public_guide.php old mode 100755 new mode 100644 similarity index 87% rename from src/dede/public_guide.php rename to src/admin/public_guide.php index 6c2e7d08..a30dd80c --- a/src/dede/public_guide.php +++ b/src/admin/public_guide.php @@ -1,79 +1,78 @@ -ExecuteNoneQuery("UPDATE `#@__channeltype` SET isdefault=0 WHERE id<>'$cid'"); - if ($cid != 0) { - $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isdefault=1 WHERE id='$cid'"); - } - $win = new OxWindow(); - $win->Init(); - $win->mainTitle = "内容发布向导"; - $wecome_info = "内容发布向导"; - $win->AddTitle("内容发布向导 >> 设置默认发布表单"); - if ($cid == 0) { - $msg = " - 成功取消默认发布表单 -
- 您目前想要进行的操作: 返回发布向导页 - "; - } else { - $msg = " - 成功保存默认发布表单,以后点击“内容发布”面板将直接跳转到您选择的内容发布页 -
- 您目前想要进行的操作: 转到默认发布表单   返回发布向导页 - "; - } - $win->AddMsgItem("
$msg
"); - $winform = $win->GetWindow("hand"); - $win->Display(); - exit(); -} - -//以下为正常浏览的内容 -/*-------------------- -function __PageShow(); -----------------------*/ -$row = $dsql->GetOne("SELECT id,addcon FROM `#@__channeltype` WHERE isdefault='1' "); - -//已经设置了默认发布表单 -if (is_array($row) && $action != 'edit') { - $addcon = $row['addcon']; - if ($addcon == '') { - $addcon = 'archives_add.php'; - } - $channelid = $row['id']; - $cid = 0; - require_once(DEDEADMIN.'/'.$addcon); - exit(); -} - -//没有设置默认发布表单 -else { - $dsql->SetQuery("SELECT id,typename,mancon,isdefault,addtable FROM `#@__channeltype` WHERE id<>-1 And isshow=1 "); - $dsql->Execute(); -} -include DedeInclude('templets/public_guide.htm'); - -//获取频道栏目数 -function GetCatalogs(&$dsql, $cid) -{ - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE channeltype='$cid' "); - return (!is_array($row) ? '0' : $row['dd']); -} +ExecuteNoneQuery("UPDATE `#@__channeltype` SET isdefault=0 WHERE id<>'$cid'"); + if ($cid != 0) { + $dsql->ExecuteNoneQuery("UPDATE `#@__channeltype` SET isdefault=1 WHERE id='$cid'"); + } + $win = new OxWindow(); + $win->Init(); + $win->mainTitle = "内容发布向导"; + $wecome_info = "内容发布向导"; + $win->AddTitle("内容发布向导 >> 设置默认发布表单"); + if ($cid == 0) { + $msg = " + 成功取消默认发布表单 +
+ 您目前想要进行的操作:返回发布向导页 + "; + } else { + $msg = " + 成功保存默认发布表单,以后点击“内容发布”面板将直接跳转到您选择的内容发布页 +
+ 您目前想要进行的操作:转到默认发布表单   返回发布向导页 + "; + } + $win->AddMsgItem("
$msg
"); + $winform = $win->GetWindow("hand"); + $win->Display(); + exit(); +} + +//以下为正常浏览的内容 +/*-------------------- +function __PageShow(); +----------------------*/ +$row = $dsql->GetOne("SELECT id,addcon FROM `#@__channeltype` WHERE isdefault='1' "); + +//已经设置了默认发布表单 +if (is_array($row) && $action != 'edit') { + $addcon = $row['addcon']; + if ($addcon == '') { + $addcon = 'archives_add.php'; + } + $channelid = $row['id']; + $cid = 0; + require_once(DEDEADMIN.'/'.$addcon); + exit(); +} + +//没有设置默认发布表单 +else { + $dsql->SetQuery("SELECT id,typename,mancon,isdefault,addtable FROM `#@__channeltype` WHERE id<>-1 And isshow=1 "); + $dsql->Execute(); +} +include DedeInclude('templets/public_guide.htm'); + +//获取频道栏目数 +function GetCatalogs(&$dsql, $cid) +{ + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE channeltype='$cid' "); + return (!is_array($row) ? '0' : $row['dd']); +} diff --git a/src/dede/recycling.php b/src/admin/recycling.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/recycling.php rename to src/admin/recycling.php index 539eeb5c..8119e8a5 --- a/src/dede/recycling.php +++ b/src/admin/recycling.php @@ -1,29 +1,28 @@ -SetTemplet(DEDEADMIN."/templets/recycling.htm"); -$dlist->SetSource($query); -$dlist->display(); +SetTemplet(DEDEADMIN."/templets/recycling.htm"); +$dlist->SetSource($query); +$dlist->display(); diff --git a/src/dede/search_keywords_main.php b/src/admin/search_keywords_main.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/search_keywords_main.php rename to src/admin/search_keywords_main.php index 3d3fd0b5..823c8ff2 --- a/src/dede/search_keywords_main.php +++ b/src/admin/search_keywords_main.php @@ -1,110 +1,106 @@ -ExecuteNoneQuery("UPDATE `#@__search_keywords` SET keyword='$keyword',spwords='$spwords',count='$count' WHERE aid='$aid';"); - AjaxHead(); - GetKeywordList($dsql, $pageno, $pagesize, $orderby); - exit(); -} -//删除字段 -else if ($dopost == 'del') { - $aid = preg_replace("#[^0-9]#", "", $aid); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__search_keywords` WHERE aid='$aid';"); - AjaxHead(); - GetKeywordList($dsql, $pageno, $pagesize, $orderby); - exit(); -} -//批量删除字段 -else if ($dopost == 'delall') { - foreach ($aids as $aid) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__search_keywords` WHERE aid='$aid';"); - } - ShowMsg("删除成功", $ENV_GOBACK_URL); - exit(); -} -//第一次进入这个页面 -if ($dopost == '') { - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__search_keywords` "); - $totalRow = $row['dd']; - include(DEDEADMIN."/templets/search_keywords_main.htm"); -} - -//获得特定的关键字列表 -function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid') -{ - global $cfg_phpurl; - $start = ($pageno - 1) * $pagesize; - $printhead = "
- - - - - - - - - - - - \r\n - "; - echo $printhead; - if ($orderby == 'result') $orderby = $orderby." ASC"; - else $orderby = $orderby." DESC"; - $dsql->SetQuery("SELECT * FROM `#@__search_keywords` ORDER BY $orderby LIMIT $start,$pagesize "); - $dsql->Execute(); - while ($row = $dsql->GetArray()) { - $line = " - - - - - - - - - - - "; - echo $line; - } - echo " - - \r\n"; - echo "
选择ID关键字分词结果频率结果最后搜索时间管理
{$row['aid']}{$row['result']}".MyDate("Y-m-d H:i:s", $row['lasttime'])." - 更新 | - 删除 -
- 反选 - 取消 - 删除 -
\r\n"; -} +ExecuteNoneQuery("UPDATE `#@__search_keywords` SET keyword='$keyword',spwords='$spwords',count='$count' WHERE aid='$aid';"); + AjaxHead(); + GetKeywordList($dsql, $pageno, $pagesize, $orderby); + exit(); +} +//删除字段 +else if ($dopost == 'del') { + $aid = preg_replace("#[^0-9]#", "", $aid); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__search_keywords` WHERE aid='$aid';"); + AjaxHead(); + GetKeywordList($dsql, $pageno, $pagesize, $orderby); + exit(); +} +//批量删除字段 +else if ($dopost == 'delall') { + foreach ($aids as $aid) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__search_keywords` WHERE aid='$aid';"); + } + ShowMsg("删除成功", $ENV_GOBACK_URL); + exit(); +} +//第一次进入这个页面 +if ($dopost == '') { + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__search_keywords` "); + $totalRow = $row['dd']; + include(DEDEADMIN."/templets/search_keywords_main.htm"); +} +//获得特定的关键词列表 +function GetKeywordList($dsql, $pageno, $pagesize, $orderby = 'aid') +{ + global $cfg_phpurl; + $start = ($pageno - 1) * $pagesize; + $printhead = "
+ + + + + + + + + + + + \r\n + "; + echo $printhead; + if ($orderby == 'result') $orderby = $orderby." ASC"; + else $orderby = $orderby." DESC"; + $dsql->SetQuery("SELECT * FROM `#@__search_keywords` ORDER BY $orderby LIMIT $start,$pagesize "); + $dsql->Execute(); + while ($row = $dsql->GetArray()) { + $line = " + + + + + + + + + + + "; + echo $line; + } + echo " + + \r\n"; + echo "
选择ID关键词分词结果频率结果最后搜索时间管理
{$row['aid']}{$row['result']}".MyDate("Y-m-d H:i:s", $row['lasttime'])." + 更新 | + 删除 +
+ 反选 + 取消 + 删除 +
\r\n"; +} \ No newline at end of file diff --git a/src/dede/shops_delivery.php b/src/admin/shops_delivery.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/shops_delivery.php rename to src/admin/shops_delivery.php index a52f3ae5..7d7ccd42 --- a/src/dede/shops_delivery.php +++ b/src/admin/shops_delivery.php @@ -1,79 +1,78 @@ - 100)) { - ShowMsg("请填写配送方式名称!", "-1"); - exit(); - } - $price = preg_replace("#[^.0-9]#", "", $price); - if ($price < 0.01) { - $price = '0.00'; - } - $des = cn_substrR($des, 255); - $InQuery = "INSERT INTO `#@__shops_delivery`(`dname`,`price`,`des`) VALUES ('$dname','$price','$des');"; - $result = $dsql->ExecuteNoneQuery($InQuery); - if ($result) { - ShowMsg("成功添加一个配送方式!", "shops_delivery.php"); - } else { - ShowMsg("添加配送方式时发生SQL错误!", "-1"); - } - exit(); -} else if ($do == 'del') { - $id = intval($id); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__shops_delivery` WHERE pid='$id'"); - ShowMsg("已删除当前配送方式!", "shops_delivery.php"); - exit(); -} else if ($do == 'edit') { - foreach ($pid as $id) { - $id = intval($id); - $row = $dsql->GetOne("SELECT pid,dname,price,des FROM `#@__shops_delivery` WHERE pid='$id' LIMIT 0,1"); - if (!is_array($row)) { - continue; - } - $dname = ${"m_dname".$id}; - $price = ${"m_price".$id}; - $des = ${"m_des".$id}; - if (empty($dname) || (strlen($dname) > 100)) { - $dname = addslashes($row['dname']); - } - $price = preg_replace("#[^.0-9]#", "", $price); - if (empty($price)) { - $price = $row['price']; - } - if (empty($des)) { - $des = addslashes($row['des']); - } else { - $des = cn_substrR($des, 255); - } - $dsql->ExecuteNoneQuery("UPDATE `#@__shops_delivery` SET dname='$dname',price='$price',des='$des' WHERE pid='$id'"); - } - ShowMsg("成功修改配送方式!", "shops_delivery.php"); - exit(); -} -$deliveryarr = array(); -$dsql->SetQuery("SELECT pid,dname,price,des FROM `#@__shops_delivery` ORDER BY orders ASC"); -$dsql->Execute(); -while ($row = $dsql->GetArray()) { - $deliveryarr[] = $row; -} -$dlist = new DataListCP(); -$dlist->pageSize = 25; //设定每页显示记录数(默认25条) - -//这两句的顺序不能更换 -$dlist->SetTemplate(DEDEADMIN."/templets/shops_delivery.htm"); //载入模板 -$dlist->SetSource("SELECT `pid`,`dname`,`price`,`des` FROM `#@__shops_delivery` ORDER BY `orders` ASC"); // 设定查询SQL + 100)) { + ShowMsg("请填写配送方式名称!", "-1"); + exit(); + } + $price = preg_replace("#[^.0-9]#", "", $price); + if ($price < 0.01) { + $price = '0.00'; + } + $des = cn_substrR($des, 255); + $InQuery = "INSERT INTO `#@__shops_delivery`(`dname`,`price`,`des`) VALUES ('$dname','$price','$des');"; + $result = $dsql->ExecuteNoneQuery($InQuery); + if ($result) { + ShowMsg("成功添加一个配送方式!", "shops_delivery.php"); + } else { + ShowMsg("添加配送方式时发生SQL错误!", "-1"); + } + exit(); +} else if ($do == 'del') { + $id = intval($id); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__shops_delivery` WHERE pid='$id'"); + ShowMsg("已删除当前配送方式!", "shops_delivery.php"); + exit(); +} else if ($do == 'edit') { + foreach ($pid as $id) { + $id = intval($id); + $row = $dsql->GetOne("SELECT pid,dname,price,des FROM `#@__shops_delivery` WHERE pid='$id' LIMIT 0,1"); + if (!is_array($row)) { + continue; + } + $dname = ${"m_dname".$id}; + $price = ${"m_price".$id}; + $des = ${"m_des".$id}; + if (empty($dname) || (strlen($dname) > 100)) { + $dname = addslashes($row['dname']); + } + $price = preg_replace("#[^.0-9]#", "", $price); + if (empty($price)) { + $price = $row['price']; + } + if (empty($des)) { + $des = addslashes($row['des']); + } else { + $des = cn_substrR($des, 255); + } + $dsql->ExecuteNoneQuery("UPDATE `#@__shops_delivery` SET dname='$dname',price='$price',des='$des' WHERE pid='$id'"); + } + ShowMsg("成功修改配送方式!", "shops_delivery.php"); + exit(); +} +$deliveryarr = array(); +$dsql->SetQuery("SELECT pid,dname,price,des FROM `#@__shops_delivery` ORDER BY orders ASC"); +$dsql->Execute(); +while ($row = $dsql->GetArray()) { + $deliveryarr[] = $row; +} +$dlist = new DataListCP(); +$dlist->pageSize = 25; //设定每页显示记录数(默认25条) + +//这两句的顺序不能更换 +$dlist->SetTemplate(DEDEADMIN."/templets/shops_delivery.htm"); //载入模板 +$dlist->SetSource("SELECT `pid`,`dname`,`price`,`des` FROM `#@__shops_delivery` ORDER BY `orders` ASC"); //设定查询SQL $dlist->Display(); //显示 \ No newline at end of file diff --git a/src/dede/shops_operations.php b/src/admin/shops_operations.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/shops_operations.php rename to src/admin/shops_operations.php index 0acc42d0..0ee06275 --- a/src/dede/shops_operations.php +++ b/src/admin/shops_operations.php @@ -1,124 +1,123 @@ -ExecuteNoneQuery($sql); - } else if ($dopost == 'push') { - $nids = explode('`', $nid); - $wh = ''; - foreach ($nids as $n) { - if ($wh == '') $wh = " WHERE oid='$n' "; - else $wh .= " OR oid='$n' "; - } - $sql = "UPDATE `#@__shops_orders` SET `state`='2' $wh "; - $dsql->ExecuteNoneQuery($sql); - } else if ($dopost == 'ok') { - $nids = explode('`', $nid); - $wh = ''; - foreach ($nids as $n) { - if ($wh == '') $wh = " WHERE oid='$n' "; - else $wh .= " OR oid='$n' "; - } - $sql = "UPDATE `#@__shops_orders` SET `state`='4' $wh "; - $dsql->ExecuteNoneQuery($sql); - } else if ($dopost == 'delete') { - $nids = explode('`', $nid); - foreach ($nids as $n) { - $query = "DELETE FROM `#@__shops_products` WHERE oid='$n'"; - $query2 = "DELETE FROM `#@__shops_orders` WHERE oid='$n'"; - $query3 = "DELETE FROM `#@__shops_userinfo` WHERE oid='$n'"; - $dsql->ExecuteNoneQuery($query); - $dsql->ExecuteNoneQuery($query2); - $dsql->ExecuteNoneQuery($query3); - } - ShowMsg("成功删除指定的订单记录", $ENV_GOBACK_URL); - exit(); - } else { - ShowMsg("不充许的操作范围", $ENV_GOBACK_URL); - exit(); - } - ShowMsg("成功更改指定的订单记录", $ENV_GOBACK_URL); - exit(); -} - -$addsql = ''; -if (empty($oid)) $oid = 0; -setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); -if (isset($buyid)) { - $buyid = preg_replace("#[^-0-9A-Z]#", "", $buyid); - $addsql = "WHERE s.oid='".$buyid."'"; -} -if (isset($sta)) { - $addsql = "WHERE s.`state`='$sta'"; -} -$sql = "SELECT s.`oid`,s.`cartcount`,s.`price`,s.`state`,s.`stime`,s.priceCount,s.dprice,s.paytype,u.`consignee`,u.`tel`,s.`userid` FROM `#@__shops_orders` AS s LEFT JOIN `#@__shops_userinfo` AS u ON s.oid=u.oid $addsql ORDER BY `stime` DESC"; - -$dlist = new DataListCP(); -$dlist->SetParameter("oid", $oid); -if (isset($sta)) $dlist->SetParameter("sta", $sta); -$tplfile = DEDEADMIN."/templets/shops_operations.htm"; - -//这两句的顺序不能更换 -$dlist->SetTemplate($tplfile); //载入模板 -$dlist->SetSource($sql); //设定查询SQLexit('dd'); -$dlist->Display(); - -function GetSta($sta) -{ - if ($sta == 0) { - return '未付款'; - } else if ($sta == 1) { - return '已付款'; - } else if ($sta == 2) { - return '已发货'; - } else if ($sta == 3) { - return '已确认'; - } else { - return '已完成'; - } -} - -function GetsType($pid) -{ - global $dsql; - $pid = intval($pid); - $row = $dsql->GetOne("SELECT name FROM `#@__payment` WHERE id='$pid'"); - if (is_array($row)) { - return $row['name']; - } else { - return '-'; - } -} - -function GetMemberID($mid) -{ - global $dsql; - if ($mid == 0) return '0'; - $row = $dsql->GetOne("SELECT userid FROM `#@__member` WHERE mid='$mid' "); - if (is_array($row)) { - return "".$row['userid'].""; - } else { - return '0'; - } -} +ExecuteNoneQuery($sql); + } else if ($dopost == 'push') { + $nids = explode('`', $nid); + $wh = ''; + foreach ($nids as $n) { + if ($wh == '') $wh = " WHERE oid='$n' "; + else $wh .= " OR oid='$n' "; + } + $sql = "UPDATE `#@__shops_orders` SET `state`='2' $wh "; + $dsql->ExecuteNoneQuery($sql); + } else if ($dopost == 'ok') { + $nids = explode('`', $nid); + $wh = ''; + foreach ($nids as $n) { + if ($wh == '') $wh = " WHERE oid='$n' "; + else $wh .= " OR oid='$n' "; + } + $sql = "UPDATE `#@__shops_orders` SET `state`='4' $wh "; + $dsql->ExecuteNoneQuery($sql); + } else if ($dopost == 'delete') { + $nids = explode('`', $nid); + foreach ($nids as $n) { + $query = "DELETE FROM `#@__shops_products` WHERE oid='$n'"; + $query2 = "DELETE FROM `#@__shops_orders` WHERE oid='$n'"; + $query3 = "DELETE FROM `#@__shops_userinfo` WHERE oid='$n'"; + $dsql->ExecuteNoneQuery($query); + $dsql->ExecuteNoneQuery($query2); + $dsql->ExecuteNoneQuery($query3); + } + ShowMsg("成功删除指定的订单记录", $ENV_GOBACK_URL); + exit(); + } else { + ShowMsg("不充许的操作范围", $ENV_GOBACK_URL); + exit(); + } + ShowMsg("成功修改指定的订单记录", $ENV_GOBACK_URL); + exit(); +} + +$addsql = ''; +if (empty($oid)) $oid = 0; +setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); +if (isset($buyid)) { + $buyid = preg_replace("#[^-0-9A-Z]#", "", $buyid); + $addsql = "WHERE s.oid='".$buyid."'"; +} +if (isset($sta)) { + $addsql = "WHERE s.`state`='$sta'"; +} +$sql = "SELECT s.`oid`,s.`cartcount`,s.`price`,s.`state`,s.`stime`,s.priceCount,s.dprice,s.paytype,u.`consignee`,u.`tel`,s.`userid` FROM `#@__shops_orders` AS s LEFT JOIN `#@__shops_userinfo` AS u ON s.oid=u.oid $addsql ORDER BY `stime` DESC"; + +$dlist = new DataListCP(); +$dlist->SetParameter("oid", $oid); +if (isset($sta)) $dlist->SetParameter("sta", $sta); +$tplfile = DEDEADMIN."/templets/shops_operations.htm"; + +//这两句的顺序不能更换 +$dlist->SetTemplate($tplfile); //载入模板 +$dlist->SetSource($sql); //设定查询SQLexit('dd'); +$dlist->Display(); + +function GetSta($sta) +{ + if ($sta == 0) { + return '未付款'; + } else if ($sta == 1) { + return '已付款'; + } else if ($sta == 2) { + return '已发货'; + } else if ($sta == 3) { + return '已确认'; + } else { + return '已完成'; + } +} + +function GetsType($pid) +{ + global $dsql; + $pid = intval($pid); + $row = $dsql->GetOne("SELECT name FROM `#@__payment` WHERE id='$pid'"); + if (is_array($row)) { + return $row['name']; + } else { + return '-'; + } +} + +function GetMemberID($mid) +{ + global $dsql; + if ($mid == 0) return '0'; + $row = $dsql->GetOne("SELECT userid FROM `#@__member` WHERE mid='$mid' "); + if (is_array($row)) { + return "".$row['userid'].""; + } else { + return '0'; + } +} diff --git a/src/dede/shops_operations_cart.php b/src/admin/shops_operations_cart.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/shops_operations_cart.php rename to src/admin/shops_operations_cart.php index 5910d9c8..4cdec6b4 --- a/src/dede/shops_operations_cart.php +++ b/src/admin/shops_operations_cart.php @@ -1,45 +1,44 @@ -无效操作!"); -$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); -if (empty($oid)) exit("无效订单号!"); - -$row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid'"); -$sql = "SELECT o.*,p.title,p.price as uprice,d.dname FROM `#@__shops_orders` as o left join `#@__shops_products` as p on o.oid=p.oid left join `#@__shops_delivery` as d on d.pid=o.pid WHERE o.oid='$oid'"; - -$dlist = new DataListCP(); -$dlist->pageSize = 20; -$dlist->SetParameter("oid", $oid); -$dlist->SetTemplate(DEDEADMIN."/templets/shops_operations_cart.htm"); -$dlist->SetSource($sql); -$dlist->Display(); -$dlist->Close(); - -function GetSta($sta, $oid) -{ - global $dsql; - $row = $dsql->GetOne("SELECT paytype FROM `#@__shops_orders` WHERE oid='$oid'"); - $payname = $dsql->GetOne("SELECT name,fee FROM `#@__payment` WHERE id='{$row['paytype']}'"); - if ($sta == 0) { - return $payname['name']." 手续费:".$payname['fee']."元"; - } else if ($sta == 1) { - return '已付款,等发货'; - } else if ($sta == 2) { - return '确认'; - } else { - return '已完成'; - } -} +无效操作!"); +$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); +if (empty($oid)) exit("无效订单号!"); + +$row = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid'"); +$sql = "SELECT o.*,p.title,p.price as uprice,d.dname FROM `#@__shops_orders` as o left join `#@__shops_products` as p on o.oid=p.oid left join `#@__shops_delivery` as d on d.pid=o.pid WHERE o.oid='$oid'"; + +$dlist = new DataListCP(); +$dlist->pageSize = 20; +$dlist->SetParameter("oid", $oid); +$dlist->SetTemplate(DEDEADMIN."/templets/shops_operations_cart.htm"); +$dlist->SetSource($sql); +$dlist->Display(); +$dlist->Close(); + +function GetSta($sta, $oid) +{ + global $dsql; + $row = $dsql->GetOne("SELECT paytype FROM `#@__shops_orders` WHERE oid='$oid'"); + $payname = $dsql->GetOne("SELECT name,fee FROM `#@__payment` WHERE id='{$row['paytype']}'"); + if ($sta == 0) { + return $payname['name']." 手续费:".$payname['fee']."元"; + } else if ($sta == 1) { + return '已付款,等发货'; + } else if ($sta == 2) { + return '确认'; + } else { + return '已完成'; + } +} diff --git a/src/dede/shops_operations_userinfo.php b/src/admin/shops_operations_userinfo.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/shops_operations_userinfo.php rename to src/admin/shops_operations_userinfo.php index 026edc62..3747191c --- a/src/dede/shops_operations_userinfo.php +++ b/src/admin/shops_operations_userinfo.php @@ -1,32 +1,29 @@ -无效操作!"); -$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); -if (empty($oid)) exit("无效订单号!"); - -$rows = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid' LIMIT 0,1"); -if (!is_array($rows)) { - $dsql->Close(); - exit("该订单下没相关用户信息!"); -} - -$row = $dsql->GetOne("SELECT pid,dprice FROM `#@__shops_orders` WHERE oid='$oid'"); -if (is_array($row)) { - $rs = $dsql->GetOne("SELECT dname FROM `#@__shops_delivery` WHERE pid='$row[pid]'"); - $rows['dname'] = $rs['dname']; - $rows['dprice'] = $row['dprice']; -} -$rows['des'] = stripslashes($rows['des']); -include DEDEADMIN."/templets/shops_operations_userinfo.htm"; -unset($rows); +无效操作!"); +$oid = preg_replace("#[^-0-9A-Z]#", "", $oid); +if (empty($oid)) exit("无效订单号!"); +$rows = $dsql->GetOne("SELECT * FROM `#@__shops_userinfo` WHERE oid='$oid' LIMIT 0,1"); +if (!is_array($rows)) { + $dsql->Close(); + exit("该订单下没相关用户信息!"); +} +$row = $dsql->GetOne("SELECT pid,dprice FROM `#@__shops_orders` WHERE oid='$oid'"); +if (is_array($row)) { + $rs = $dsql->GetOne("SELECT dname FROM `#@__shops_delivery` WHERE pid='$row[pid]'"); + $rows['dname'] = $rs['dname']; + $rows['dprice'] = $row['dprice']; +} +$rows['des'] = stripslashes($rows['des']); +include DEDEADMIN."/templets/shops_operations_userinfo.htm"; +unset($rows); \ No newline at end of file diff --git a/src/dede/soft_add.php b/src/admin/soft_add.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/soft_add.php rename to src/admin/soft_add.php index 517e0a9c..b5850bb6 --- a/src/dede/soft_add.php +++ b/src/admin/soft_add.php @@ -1,258 +1,258 @@ - 0 && $channelid == 0) { - $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); - $channelid = $row['channeltype']; - } else { - if ($channelid == 0) $channelid = 1; - } - $softconfig = $dsql->GetOne("SELECT * FROM `#@__softconfig` "); - //获得频道模型信息 - $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); - $channelid = $cInfos['id']; - //获取文章最大id以确定当前权重 - $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); - include DedeInclude("templets/soft_add.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - if (!isset($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_New')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); - } - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - if ($ishtml == 0) $ismake = -1; - else $ismake = 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - $title = preg_replace('#"#', '"', $title); - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $userip = GetIP(); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - // 处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); - exit(); - } - //处理body字段自动摘要、自动提取缩略图等 - $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } else if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match('#j#', $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match('#j#', $flag)) $ismake = -1; - //保存到主表 - $inQuery = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) - VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //软件链接列表 - $urls = ''; - //本地链接处理 - $softurl1 = stripslashes($softurl1); - $nsoftsize = ''; - if ($softurl1 != '') { - $urls .= "{dede:link islocal='1' text='{$servermsg1}'} $softurl1 {/dede:link}\r\n"; - $autosize = empty($autosize) ? FALSE : TRUE; - if ($autosize && empty($softsize)) { - $nsoftsize = @filesize($cfg_basedir.$softurl1); - if (empty($nsoftsize)) $nsoftsize = '未知'; - else { - $nsoftsize = trim(sprintf("%0.2f", $nsoftsize / 1024 / 1024)); - $nsoftsize = $nsoftsize." MB"; - } - } - } - //软件大小 - if (!empty($nsoftsize)) $softsize = $nsoftsize; - else if (empty($softsize)) $softsize = '未知'; - else $softsize = $softsize.' '.$unit; - //其它链接处理 - for ($i = 2; $i <= 30; $i++) { - if (!empty(${'softurl'.$i})) { - $forconfig = empty(${'forconfig'.$i}) ? FALSE : TRUE; - if ($forconfig) { - if (empty(${'need'.$i})) continue; - $serverUrl = stripslashes(${'softurlfirst'.$i}); - $serverUrl = preg_replace("#\/$#", "", $serverUrl); - $softurl = stripslashes(${'softurl'.$i}); - if (cn_substr($softurl, 1) != '/') $softurl = '/'.$softurl; - $softurl = $serverUrl.$softurl; - } else { - $softurl = stripslashes(${'softurl'.$i}); - } - $servermsg = str_replace("'", "", stripslashes(${'servermsg'.$i})); - if ($servermsg == '') $servermsg = '下载地址'.$i; - if ($softurl != 'http://') { - $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; - } - } - } - $urls = addslashes($urls); - //保存到附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if (empty($addtable)) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); - exit(); - } - $daccess = isset($daccess) && is_numeric($daccess) ? $daccess : 0; - $useip = GetIP(); - $inQuery = "INSERT INTO `$addtable`(aid,typeid,redirecturl,userip,filetype,language,softtype,accredit, - os,softrank,officialUrl,officialDemo,softsize,softlinks,introduce,daccess,needmoney{$inadd_f}) - VALUES ('$arcID','$typeid','$redirecturl','$useip','$filetype','$language','$softtype','$accredit', - '$os','$softrank','$officialUrl','$officialDemo','$softsize','$urls','$body','$daccess','$needmoney'{$inadd_v});"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //生成HTML - InsertTags($tags, $arcID); - $arcUrl = MakeArt($arcID, TRUE, TRUE, 0); - if ($arcUrl == '') { - $arcUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:继续发布软件  查看软件  更改软件  已发布软件管理  网站栏目管理"; - $msg = "
{$msg}
".GetUpdateTest(); - $wintitle = "成功发布一个软件"; - $wecome_info = "文章管理::发布软件"; - $win = new OxWindow(); - $win->AddTitle("成功发布软件:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", FALSE); - $win->Display(); + 0 && $channelid == 0) { + $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); + $channelid = $row['channeltype']; + } else { + if ($channelid == 0) $channelid = 1; + } + $softconfig = $dsql->GetOne("SELECT * FROM `#@__softconfig` "); + //获得频道模型信息 + $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); + $channelid = $cInfos['id']; + //获取文章最大id以确定当前权重 + $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); + include DedeInclude("templets/soft_add.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + if (!isset($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_New')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); + } + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + if ($ishtml == 0) $ismake = -1; + else $ismake = 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + $title = preg_replace('#"#', '"', $title); + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $userip = GetIP(); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); + exit(); + } + //处理body字段自动摘要、自动提取缩略图等 + $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } else if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match('#p#', $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match('#j#', $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match('#j#', $flag)) $ismake = -1; + //保存到主表 + $inQuery = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) + VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //软件链接列表 + $urls = ''; + //本地链接处理 + $softurl1 = stripslashes($softurl1); + $nsoftsize = ''; + if ($softurl1 != '') { + $urls .= "{dede:link islocal='1' text='{$servermsg1}'} $softurl1 {/dede:link}\r\n"; + $autosize = empty($autosize) ? FALSE : TRUE; + if ($autosize && empty($softsize)) { + $nsoftsize = @filesize($cfg_basedir.$softurl1); + if (empty($nsoftsize)) $nsoftsize = '未知'; + else { + $nsoftsize = trim(sprintf("%0.2f", $nsoftsize / 1024 / 1024)); + $nsoftsize = $nsoftsize." MB"; + } + } + } + //软件大小 + if (!empty($nsoftsize)) $softsize = $nsoftsize; + else if (empty($softsize)) $softsize = '未知'; + else $softsize = $softsize.' '.$unit; + //其它链接处理 + for ($i = 2; $i <= 30; $i++) { + if (!empty(${'softurl'.$i})) { + $forconfig = empty(${'forconfig'.$i}) ? FALSE : TRUE; + if ($forconfig) { + if (empty(${'need'.$i})) continue; + $serverUrl = stripslashes(${'softurlfirst'.$i}); + $serverUrl = preg_replace("#\/$#", "", $serverUrl); + $softurl = stripslashes(${'softurl'.$i}); + if (cn_substr($softurl, 1) != '/') $softurl = '/'.$softurl; + $softurl = $serverUrl.$softurl; + } else { + $softurl = stripslashes(${'softurl'.$i}); + } + $servermsg = str_replace("'", "", stripslashes(${'servermsg'.$i})); + if ($servermsg == '') $servermsg = '下载地址'.$i; + if ($softurl != 'http://') { + $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; + } + } + } + $urls = addslashes($urls); + //保存到附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if (empty($addtable)) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作", "javascript:;"); + exit(); + } + $daccess = isset($daccess) && is_numeric($daccess) ? $daccess : 0; + $useip = GetIP(); + $inQuery = "INSERT INTO `$addtable`(aid,typeid,redirecturl,userip,filetype,language,softtype,accredit, + os,softrank,officialUrl,officialDemo,softsize,softlinks,introduce,daccess,needmoney{$inadd_f}) + VALUES ('$arcID','$typeid','$redirecturl','$useip','$filetype','$language','$softtype','$accredit', + '$os','$softrank','$officialUrl','$officialDemo','$softsize','$urls','$body','$daccess','$needmoney'{$inadd_v});"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //生成HTML + InsertTags($tags, $arcID); + $arcUrl = MakeArt($arcID, TRUE, TRUE, 0); + if ($arcUrl == '') { + $arcUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:继续发布软件  查看软件  修改软件  已发布软件管理  网站栏目管理"; + $msg = "
{$msg}
".GetUpdateTest(); + $wintitle = "成功发布一个软件"; + $wecome_info = "文章管理::发布软件"; + $win = new OxWindow(); + $win->AddTitle("成功发布软件:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", FALSE); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/soft_config.php b/src/admin/soft_config.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/soft_config.php rename to src/admin/soft_config.php index 12b6c8a8..53a47080 --- a/src/dede/soft_config.php +++ b/src/admin/soft_config.php @@ -1,51 +1,50 @@ - 0 || $dfywboy > 0) $gotojump = 1; - $query = "UPDATE `#@__softconfig` SET - `downtype` = '$downtype' , - `gotojump` ='$gotojump' , - `ismoresite` = '$ismoresite', - `islocal` = '$islocal', - `sites` = '$sites', - `moresitedo` = '$moresitedo', - `dfrank` = '$dfrank', - `dfywboy` = '$dfywboy', - `argrange` = '$argrange', - downmsg = '$downmsg' "; - $dsql->ExecuteNoneQuery($query); - ShowMsg('成功保存参数', 'soft_config.php'); - exit(); -} -//读取参数 -$row = $dsql->GetOne("SELECT * FROM `#@__softconfig` "); -if (!is_array($row)) { - $dsql->ExecuteNoneQuery("INSERT INTO `#@__softconfig`(`downtype`,`ismoresite`,`islocal`,`gotojump`,`sites`,`downmsg`,`moresitedo`,`dfrank`,`dfywboy`, `argrange`) - VALUES ('1', '0','1', '0', '' ,'$downmsg','1', '0', '0', '0'); "); - $row['downtype'] = 1; - $row['ismoresite'] = 0; - $row['islocal'] = 1; - $row['gotojump'] = 0; - $row['sites'] = ''; - $row['moresitedo'] = '1'; - $row['dfrank'] = '0'; - $row['dfywboy'] = '0'; - $row['downmsg'] = ''; - $row['argrange'] = 0; -} -include DedeInclude('templets/soft_config.htm'); -exit(); + 0 || $dfywboy > 0) $gotojump = 1; + $query = "UPDATE `#@__softconfig` SET + `downtype` = '$downtype' , + `gotojump` ='$gotojump' , + `ismoresite` = '$ismoresite', + `islocal` = '$islocal', + `sites` = '$sites', + `moresitedo` = '$moresitedo', + `dfrank` = '$dfrank', + `dfywboy` = '$dfywboy', + `argrange` = '$argrange', + downmsg = '$downmsg' "; + $dsql->ExecuteNoneQuery($query); + ShowMsg('成功保存参数', 'soft_config.php'); + exit(); +} +//读取参数 +$row = $dsql->GetOne("SELECT * FROM `#@__softconfig` "); +if (!is_array($row)) { + $dsql->ExecuteNoneQuery("INSERT INTO `#@__softconfig`(`downtype`,`ismoresite`,`islocal`,`gotojump`,`sites`,`downmsg`,`moresitedo`,`dfrank`,`dfywboy`, `argrange`) + VALUES ('1', '0','1', '0', '' ,'$downmsg','1', '0', '0', '0'); "); + $row['downtype'] = 1; + $row['ismoresite'] = 0; + $row['islocal'] = 1; + $row['gotojump'] = 0; + $row['sites'] = ''; + $row['moresitedo'] = '1'; + $row['dfrank'] = '0'; + $row['dfywboy'] = '0'; + $row['downmsg'] = ''; + $row['argrange'] = 0; +} +include DedeInclude('templets/soft_config.htm'); +exit(); diff --git a/src/dede/soft_edit.php b/src/admin/soft_edit.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/soft_edit.php rename to src/admin/soft_edit.php index 2c6018e4..f2b92792 --- a/src/dede/soft_edit.php +++ b/src/admin/soft_edit.php @@ -1,288 +1,288 @@ -SetQuery($arcQuery); - $arcRow = $dsql->GetOne($arcQuery); - if (!is_array($arcRow)) { - ShowMsg("读取档案基本信息出错!", "-1"); - exit(); - } - $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; - $cInfos = $dsql->GetOne($query); - if (!is_array($cInfos)) { - ShowMsg("读取频道配置信息出错!", "javascript:;"); - exit(); - } - $addtable = $cInfos['addtable']; - $addQuery = "SELECT * FROM `$addtable` WHERE aid='$aid'"; - $addRow = $dsql->GetOne($addQuery); - $newRowStart = 1; - $nForm = ''; - $daccess = $addRow['daccess']; - $needmoney = $addRow['needmoney']; - if ($addRow['softlinks'] != '') { - $dtp = new DedeTagParse(); - $dtp->LoadSource($addRow['softlinks']); - if (is_array($dtp->CTags)) { - foreach ($dtp->CTags as $ctag) { - if ($ctag->GetName() == 'link') { - $islocal = $ctag->GetAtt('islocal'); - if ($islocal != 1) $needmsg = "删除"; - else $needmsg = ''; - $nForm .= "
软件地址{$newRowStart}: - 服务器名称: - - $needmsg -
\r\n"; - $newRowStart++; - } - } - } - $dtp->Clear(); - } - $channelid = $arcRow['channel']; - $tags = GetTags($aid); - $arcRow = XSSClean($arcRow); - $addRow = XSSClean($addRow); - include DedeInclude("templets/soft_edit.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($typeid2)) $typeid2 = 0; - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - if ($typeid == 0) { - ShowMsg("请指定文档的栏目", "-1"); - exit(); - } - if (empty($channelid)) { - ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); - exit(); - } - if (!CheckChannel($typeid, $channelid)) { - ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); - exit(); - } - if (!TestPurview('a_Edit')) { - if (TestPurview('a_AccEdit')) { - CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); - } else { - CheckArcAdmin($id, $cuserLogin->getUserID()); - } - } - //对保存的内容进行处理 - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - if ($ishtml == 0) { - $ismake = -1; - } else { - $ismake = 0; - } - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('litpic', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - if ($redirecturl != '' && !preg_match('#j#', $flag)) { - $flag = ($flag == '' ? 'j' : $flag.',j'); - } - //跳转网址的文档强制为动态 - if (preg_match('#j#', $flag)) $ismake = -1; - //更改主档案表 - $inQuery = "UPDATE `#@__archives` SET - typeid='$typeid', - typeid2='$typeid2', - sortrank='$sortrank', - flag='$flag', - click='$click', - ismake='$ismake', - arcrank='$arcrank', - money='$money', - title='$title', - color='$color', - source='$source', - writer='$writer', - litpic='$litpic', - pubdate='$pubdate', - notpost='$notpost', - description='$description', - keywords='$keywords', - shorttitle='$shorttitle', - filename='$filename', - dutyadmin='$adminid', - weight='$weight' - WHERE id='$id'; "; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("更新数据库archives表时出错,请检查", "-1"); - exit(); - } - //软件链接列表 - $urls = ''; - for ($i = 1; $i <= 30; $i++) { - if (!empty(${'softurl'.$i})) { - $islocal = empty(${'islocal'.$i}) ? '' : 1; - $isneed = empty(${'del'.$i}) ? true : false; - $servermsg = str_replace("'", '', stripslashes(${'servermsg'.$i})); - $softurl = stripslashes(${'softurl'.$i}); - if ($servermsg == '') { - $servermsg = '下载地址'.$i; - } - if ($softurl != 'http://') { - if ($islocal == 1) $urls .= "{dede:link islocal='$islocal' text='{$servermsg}'} $softurl {/dede:link}\r\n"; - else if ($isneed) $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; - else continue; - } - } - } - $urls = addslashes($urls); - //更新附加表 - $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); - $addtable = trim($cts['addtable']); - if ($addtable != '') { - $useip = GetIP(); - $inQuery = "UPDATE `$addtable` - SET typeid ='$typeid', - filetype ='$filetype', - language ='$language', - softtype ='$softtype', - accredit ='$accredit', - os ='$os', - softrank ='$softrank', - officialUrl ='$officialUrl', - officialDemo ='$officialDemo', - softsize ='$softsize', - softlinks ='$urls', - redirecturl='$redirecturl', - userip = '$useip', - daccess = '$daccess', - needmoney = '$needmoney', - introduce='$body' - {$inadd_f} - WHERE aid='$id';"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("更新数据库附加表 addonsoft 时出错,请检查原因", "-1"); - exit(); - } - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); - $arcUrl = MakeArt($id, TRUE, TRUE, $isremote); - if ($arcUrl == "") { - $arcUrl = $cfg_phpurl."/view.php?aid=$id"; - } - ClearMyAddon($id, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:发布新软件  继续修改  查看软件  已发布软件管理  网站栏目管理"; - $wintitle = "成功修改一个软件"; - $wecome_info = "文章管理::修改软件"; - $win = new OxWindow(); - $win->AddTitle("成功修改软件:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", FALSE); - $win->Display(); +SetQuery($arcQuery); + $arcRow = $dsql->GetOne($arcQuery); + if (!is_array($arcRow)) { + ShowMsg("读取档案基本信息出错!", "-1"); + exit(); + } + $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; + $cInfos = $dsql->GetOne($query); + if (!is_array($cInfos)) { + ShowMsg("读取频道配置信息出错!", "javascript:;"); + exit(); + } + $addtable = $cInfos['addtable']; + $addQuery = "SELECT * FROM `$addtable` WHERE aid='$aid'"; + $addRow = $dsql->GetOne($addQuery); + $newRowStart = 1; + $nForm = ''; + $daccess = $addRow['daccess']; + $needmoney = $addRow['needmoney']; + if ($addRow['softlinks'] != '') { + $dtp = new DedeTagParse(); + $dtp->LoadSource($addRow['softlinks']); + if (is_array($dtp->CTags)) { + foreach ($dtp->CTags as $ctag) { + if ($ctag->GetName() == 'link') { + $islocal = $ctag->GetAtt('islocal'); + if ($islocal != 1) $needmsg = "删除"; + else $needmsg = ''; + $nForm .= "
软件地址{$newRowStart}: + 服务器名称: + + $needmsg +
\r\n"; + $newRowStart++; + } + } + } + $dtp->Clear(); + } + $channelid = $arcRow['channel']; + $tags = GetTags($aid); + $arcRow = XSSClean($arcRow); + $addRow = XSSClean($addRow); + include DedeInclude("templets/soft_edit.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($typeid2)) $typeid2 = 0; + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + if ($typeid == 0) { + ShowMsg("请指定文档的栏目", "-1"); + exit(); + } + if (empty($channelid)) { + ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); + exit(); + } + if (!CheckChannel($typeid, $channelid)) { + ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); + exit(); + } + if (!TestPurview('a_Edit')) { + if (TestPurview('a_AccEdit')) { + CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); + } else { + CheckArcAdmin($id, $cuserLogin->getUserID()); + } + } + //对保存的内容进行处理 + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + if ($ishtml == 0) { + $ismake = -1; + } else { + $ismake = 0; + } + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('litpic', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $id); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match('#p#', $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + if ($redirecturl != '' && !preg_match('#j#', $flag)) { + $flag = ($flag == '' ? 'j' : $flag.',j'); + } + //跳转网址的文档强制为动态 + if (preg_match('#j#', $flag)) $ismake = -1; + //修改主档案表 + $inQuery = "UPDATE `#@__archives` SET + typeid='$typeid', + typeid2='$typeid2', + sortrank='$sortrank', + flag='$flag', + click='$click', + ismake='$ismake', + arcrank='$arcrank', + money='$money', + title='$title', + color='$color', + source='$source', + writer='$writer', + litpic='$litpic', + pubdate='$pubdate', + notpost='$notpost', + description='$description', + keywords='$keywords', + shorttitle='$shorttitle', + filename='$filename', + dutyadmin='$adminid', + weight='$weight' + WHERE id='$id'; "; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("更新数据库archives表时出错,请检查", "-1"); + exit(); + } + //软件链接列表 + $urls = ''; + for ($i = 1; $i <= 30; $i++) { + if (!empty(${'softurl'.$i})) { + $islocal = empty(${'islocal'.$i}) ? '' : 1; + $isneed = empty(${'del'.$i}) ? true : false; + $servermsg = str_replace("'", '', stripslashes(${'servermsg'.$i})); + $softurl = stripslashes(${'softurl'.$i}); + if ($servermsg == '') { + $servermsg = '下载地址'.$i; + } + if ($softurl != 'http://') { + if ($islocal == 1) $urls .= "{dede:link islocal='$islocal' text='{$servermsg}'} $softurl {/dede:link}\r\n"; + else if ($isneed) $urls .= "{dede:link text='$servermsg'} $softurl {/dede:link}\r\n"; + else continue; + } + } + } + $urls = addslashes($urls); + //更新附加表 + $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); + $addtable = trim($cts['addtable']); + if ($addtable != '') { + $useip = GetIP(); + $inQuery = "UPDATE `$addtable` + SET typeid ='$typeid', + filetype ='$filetype', + language ='$language', + softtype ='$softtype', + accredit ='$accredit', + os ='$os', + softrank ='$softrank', + officialUrl ='$officialUrl', + officialDemo ='$officialDemo', + softsize ='$softsize', + softlinks ='$urls', + redirecturl='$redirecturl', + userip = '$useip', + daccess = '$daccess', + needmoney = '$needmoney', + introduce='$body' + {$inadd_f} + WHERE aid='$id';"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("更新数据库附加表 addonsoft 时出错,请检查原因", "-1"); + exit(); + } + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); + $arcUrl = MakeArt($id, TRUE, TRUE, $isremote); + if ($arcUrl == "") { + $arcUrl = $cfg_phpurl."/view.php?aid=$id"; + } + ClearMyAddon($id, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:发布新软件  继续修改  查看软件  已发布软件管理  网站栏目管理"; + $wintitle = "成功修改一个软件"; + $wecome_info = "文章管理::修改软件"; + $win = new OxWindow(); + $win->AddTitle("成功修改软件:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", FALSE); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/spec_add.php b/src/admin/spec_add.php old mode 100755 new mode 100644 similarity index 97% rename from src/dede/spec_add.php rename to src/admin/spec_add.php index 9a02be66..8c9a46bd --- a/src/dede/spec_add.php +++ b/src/admin/spec_add.php @@ -1,211 +1,211 @@ -GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); - include DedeInclude("templets/spec_add.htm"); - exit(); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); - $channelid = -1; - $money = 0; - if (!isset($tags)) $tags = ''; - //处理自定义字段会用到这些变量 - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - //对保存的内容进行处理 - if (empty($writer)) $writer = $cuserLogin->getUserName(); - if (empty($source)) $source = '未知'; - $pubdate = GetMkTime($pubdate); - $senddate = time(); - $sortrank = AddDay($pubdate, $sortup); - if ($ishtml == 0) $ismake = -1; - else $ismake = 0; - $title = preg_replace('#"#', '"', $title); - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = cn_substrR($keywords, 60); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //生成文档ID - $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); - if (empty($arcID)) { - ShowMsg("无法获得主键,无法进行后续操作", "-1"); - exit(); - } - //保存到主表 - $inQuery = "INSERT INTO `#@__archives`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename) - VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename');"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - echo $inQuery; - $gerr = $dsql->GetError(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); - exit(); - } - //专题节点列表 - $arcids = array(); - $notelist = ''; - for ($i = 1; $i <= $cfg_specnote; $i++) { - if (!empty(${'notename'.$i})) { - $notename = str_replace("'", "", trim(${'notename'.$i})); - $arcid = trim(${'arcid'.$i}); - $col = trim(${'col'.$i}); - $imgwidth = trim(${'imgwidth'.$i}); - $imgheight = trim(${'imgheight'.$i}); - $titlelen = trim(${'titlelen'.$i}); - $infolen = trim(${'infolen'.$i}); - $listtmp = trim(${'listtmp'.$i}); - $noteid = trim(${'noteid'.$i}); - $isauto = trim(${'isauto'.$i}); - $keywords = str_replace("'", "", trim(${'keywords'.$i})); - $typeid = trim(${'typeid'.$i}); - if (!empty(${'rownum'.$i})) $rownum = trim(${'rownum'.$i}); - else $rownum = 0; - $arcid = preg_replace("#[^0-9,]#", "", $arcid); - $ids = explode(",", $arcid); - $okids = ""; - if (is_array($ids)) { - foreach ($ids as $mid) { - $mid = trim($mid); - if ($mid == "") continue; - if (!isset($arcids[$mid])) { - if ($okids == "") { - $okids .= $mid; - } else { - $okids .= ",".$mid; - } - $arcids[$mid] = 1; - } - } - } - $notelist .= "{dede:specnote imgheight=\\'$imgheight\\' imgwidth=\\'$imgwidth\\' - infolen=\\'$infolen\\' titlelen=\\'$titlelen\\' col=\\'$col\\' idlist=\\'$okids\\' - name=\\'$notename\\' noteid=\\'$noteid\\' isauto=\'$isauto\' rownum=\\'$rownum\\' - keywords=\\'$keywords\\' typeid=\\'$typeid\\'} - $listtmp - {/dede:specnote}\r\n"; - } - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ','.$vs[0]; - $inadd_v .= " ,'".${$vs[0]}."' "; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - $useip = GetIP(); - //加入附加表 - $inQuery = "INSERT INTO `#@__addonspec`(aid,typeid,userip,templet,note{$inadd_f}) VALUES ('$arcID','$typeid','$useip','$templet','$notelist'{$inadd_v});"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); - ShowMsg("把数据保存到数据库附加表 addonspec 时出错,请检查原因", "-1"); - exit(); - } - //生成HTML - InsertTags($tags, $arcID); - $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; - } - ClearMyAddon($arcID, $title); - //自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:创建新专题  查看专题  已发布专题管理"; - $wintitle = "成功创建专题"; - $wecome_info = "文章管理::发布专题"; - $win = new OxWindow(); - $win->AddTitle("成功创建专题:"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", FALSE); - $win->Display(); +GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); + include DedeInclude("templets/spec_add.htm"); + exit(); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); + $channelid = -1; + $money = 0; + if (!isset($tags)) $tags = ''; + //处理自定义字段会用到这些变量 + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + //对保存的内容进行处理 + if (empty($writer)) $writer = $cuserLogin->getUserName(); + if (empty($source)) $source = '未知'; + $pubdate = GetMkTime($pubdate); + $senddate = time(); + $sortrank = AddDay($pubdate, $sortup); + if ($ishtml == 0) $ismake = -1; + else $ismake = 0; + $title = preg_replace('#"#', '"', $title); + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = cn_substrR($keywords, 60); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //生成文档ID + $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); + if (empty($arcID)) { + ShowMsg("无法获得主键,无法进行后续操作", "-1"); + exit(); + } + //保存到主表 + $inQuery = "INSERT INTO `#@__archives`(id,typeid,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle,color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename) + VALUES ('$arcID','$typeid','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','0','$notpost','$description','$keywords','$filename');"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + echo $inQuery; + $gerr = $dsql->GetError(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); + exit(); + } + //专题节点列表 + $arcids = array(); + $notelist = ''; + for ($i = 1; $i <= $cfg_specnote; $i++) { + if (!empty(${'notename'.$i})) { + $notename = str_replace("'", "", trim(${'notename'.$i})); + $arcid = trim(${'arcid'.$i}); + $col = trim(${'col'.$i}); + $imgwidth = trim(${'imgwidth'.$i}); + $imgheight = trim(${'imgheight'.$i}); + $titlelen = trim(${'titlelen'.$i}); + $infolen = trim(${'infolen'.$i}); + $listtmp = trim(${'listtmp'.$i}); + $noteid = trim(${'noteid'.$i}); + $isauto = trim(${'isauto'.$i}); + $keywords = str_replace("'", "", trim(${'keywords'.$i})); + $typeid = trim(${'typeid'.$i}); + if (!empty(${'rownum'.$i})) $rownum = trim(${'rownum'.$i}); + else $rownum = 0; + $arcid = preg_replace("#[^0-9,]#", "", $arcid); + $ids = explode(",", $arcid); + $okids = ""; + if (is_array($ids)) { + foreach ($ids as $mid) { + $mid = trim($mid); + if ($mid == "") continue; + if (!isset($arcids[$mid])) { + if ($okids == "") { + $okids .= $mid; + } else { + $okids .= ",".$mid; + } + $arcids[$mid] = 1; + } + } + } + $notelist .= "{dede:specnote imgheight=\\'$imgheight\\' imgwidth=\\'$imgwidth\\' + infolen=\\'$infolen\\' titlelen=\\'$titlelen\\' col=\\'$col\\' idlist=\\'$okids\\' + name=\\'$notename\\' noteid=\\'$noteid\\' isauto=\'$isauto\' rownum=\\'$rownum\\' + keywords=\\'$keywords\\' typeid=\\'$typeid\\'} + $listtmp + {/dede:specnote}\r\n"; + } + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ','.$vs[0]; + $inadd_v .= " ,'".${$vs[0]}."' "; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match('#p#', $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + $useip = GetIP(); + //加入附加表 + $inQuery = "INSERT INTO `#@__addonspec`(aid,typeid,userip,templet,note{$inadd_f}) VALUES ('$arcID','$typeid','$useip','$templet','$notelist'{$inadd_v});"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); + ShowMsg("把数据保存到数据库附加表 addonspec 时出错,请检查原因", "-1"); + exit(); + } + //生成HTML + InsertTags($tags, $arcID); + $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; + } + ClearMyAddon($arcID, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:创建新专题  查看专题  已发布专题管理"; + $wintitle = "成功创建专题"; + $wecome_info = "文章管理::发布专题"; + $win = new OxWindow(); + $win->AddTitle("成功创建专题:"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", FALSE); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/spec_edit.php b/src/admin/spec_edit.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/spec_edit.php rename to src/admin/spec_edit.php index cd682b85..fb4e96cc --- a/src/dede/spec_edit.php +++ b/src/admin/spec_edit.php @@ -1,243 +1,243 @@ -GetOne($arcQuery); - if (!is_array($arcRow)) { - ShowMsg("读取档案基本信息出错!", "-1"); - exit(); - } - $query = "SELECT * FROM `#@__channeltype` WHERE id='-1'"; - $cInfos = $dsql->GetOne($query); - if (!is_array($cInfos)) { - ShowMsg("读取频道配置信息出错!", "javascript:;"); - exit(); - } - $addRow = $dsql->GetOne("SELECT * FROM `#@__addonspec` WHERE aid='$aid'"); - $tags = GetTags($aid); - include DedeInclude("templets/spec_edit.htm"); -} -/*-------------------------------- -function __save(){ } --------------------------------*/ -else if ($dopost == 'save') { - require_once(DEDEINC.'/image.func.php'); - require_once(DEDEINC.'/oxwindow.class.php'); - $flag = isset($flags) ? join(',', $flags) : ''; - $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; - if (!isset($tags)) $tags = ''; - $channelid = -1; - //处理自定义字段会用到这些变量 - if (!isset($autokey)) $autokey = 0; - if (!isset($remote)) $remote = 0; - if (!isset($dellink)) $dellink = 0; - if (!isset($autolitpic)) $autolitpic = 0; - //对保存的内容进行处理 - $pubdate = GetMkTime($pubdate); - $sortrank = AddDay($pubdate, $sortup); - if ($ishtml == 0) $ismake = -1; - else $ismake = 0; - $title = cn_substrR($title, $cfg_title_maxlen); - $shorttitle = cn_substrR($shorttitle, 36); - $color = cn_substrR($color, 7); - $writer = cn_substrR($writer, 20); - $source = cn_substrR($source, 30); - $description = cn_substrR($description, $cfg_auot_description); - $keywords = trim(cn_substrR($keywords, 60)); - $filename = trim(cn_substrR($filename, 40)); - $isremote = 0; - $serviterm = empty($serviterm) ? "" : $serviterm; - if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { - $arcrank = -1; - } - $adminid = $cuserLogin->getUserID(); - //处理上传的缩略图 - if (empty($ddisremote)) { - $ddisremote = 0; - } - $litpic = GetDDImage('none', $picname, $ddisremote); - //处理新的缩略图上传 - if ($litpic_b64 != "") { - $data = explode(',', $litpic_b64); - $ntime = time(); - $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); - CreateDir($savepath); - $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); - $fullUrl = $fullUrl.".png"; - file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); - //加水印 - WaterImg($cfg_basedir.$fullUrl, 'up'); - $litpic = $fullUrl; - } - //分析处理附加表数据 - $inadd_f = ''; - $inadd_v = ''; - if (!empty($dede_addonfields)) { - $addonfields = explode(';', $dede_addonfields); - $inadd_f = ''; - $inadd_v = ''; - if (is_array($addonfields)) { - foreach ($addonfields as $v) { - if ($v == '') { - continue; - } - $vs = explode(',', $v); - if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 - { - ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); - } else { - if (!isset(${$vs[0]})) { - ${$vs[0]} = ''; - } - ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); - } - $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; - } - } - } - //处理图片文档的自定义属性 - if ($litpic != '' && !preg_match('#p#', $flag)) { - $flag = ($flag == '' ? 'p' : $flag.',p'); - } - $inQuery = "UPDATE `#@__archives` SET - typeid='$typeid', - sortrank='$sortrank', - flag='$flag', - ismake='$ismake', - arcrank='$arcrank', - click='$click', - title='$title', - color='$color', - writer='$writer', - source='$source', - litpic='$litpic', - pubdate='$pubdate', - notpost='$notpost', - description='$description', - keywords='$keywords', - shorttitle='$shorttitle', - filename='$filename' - WHERE id='$id'; "; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("更新数据库archives表时出错,请检查", "-1"); - exit(); - } - //专题节点列表 - $arcids = array(); - $notelist = ''; - for ($i = 1; $i <= $cfg_specnote; $i++) { - if (!empty(${'notename'.$i})) { - $notename = str_replace("'", "", trim(${'notename'.$i})); - $arcid = trim(${'arcid'.$i}); - $col = trim(${'col'.$i}); - $imgwidth = trim(${'imgwidth'.$i}); - $imgheight = trim(${'imgheight'.$i}); - $titlelen = trim(${'titlelen'.$i}); - $infolen = trim(${'infolen'.$i}); - $listtmp = trim(${'listtmp'.$i}); - if (isset(${'noteid'.$i})) { - $noteid = trim(${'noteid'.$i}); - } else { - $noteid = $i; - } - if (isset(${'isauto'.$i})) { - $isauto = trim(${'isauto'.$i}); - } else { - $isauto = 0; - } - if (isset(${'keywords'.$i})) { - $keywords = str_replace("'", "", trim(${'keywords'.$i})); - } else { - $keywords = ""; - } - if (!empty(${'typeid'.$i})) { - $ttypeid = trim(${'typeid'.$i}); - } else { - $ttypeid = 0; - } - if (!empty(${'rownum'.$i})) { - $rownum = trim(${'rownum'.$i}); - } else { - $rownum = 0; - } - $arcid = preg_replace("#[^0-9,]#", "", $arcid); - $ids = explode(",", $arcid); - $okids = ""; - if (is_array($ids)) { - foreach ($ids as $mid) { - $mid = trim($mid); - if ($mid == "") continue; - if (!isset($arcids[$mid])) { - if ($okids == "") { - $okids .= $mid; - } else { - $okids .= ",".$mid; - } - $arcids[$mid] = 1; - } - } - } - $notelist .= "{dede:specnote imgheight=\\'$imgheight\\' imgwidth=\\'$imgwidth\\' - infolen=\\'$infolen\\' titlelen=\\'$titlelen\\' col=\\'$col\\' idlist=\\'$okids\\' - name=\\'$notename\\' noteid=\\'$noteid\\' isauto=\'$isauto\' rownum=\\'$rownum\\' - keywords=\\'$keywords\\' typeid=\\'$ttypeid\\'} - $listtmp - {/dede:specnote}\r\n"; - } - } - //更新附加表 - $inQuery = "UPDATE `#@__addonspec` SET typeid ='$typeid',note='$notelist'{$inadd_f},templet='$templet' WHERE aid='$id';"; - if (!$dsql->ExecuteNoneQuery($inQuery)) { - ShowMsg("更新数据库附加表 addonspec 时出错,请检查原因", "-1"); - exit(); - } - //生成HTML - UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); - $artUrl = MakeArt($id, TRUE, TRUE, $isremote); - if ($artUrl == '') { - $artUrl = $cfg_phpurl."/view.php?aid=$id"; - } - ClearMyAddon($id, $title); - // 自动更新关联内容 - if (is_array($automake)) { - foreach ($automake as $key => $value) { - if (isset(${$key}) && !empty(${$key})) { - $ids = explode(",", ${$key}); - foreach ($ids as $id) { - MakeArt($id, true, true, $isremote); - } - } - } - } - //返回成功信息 - $msg = "请选择您的后续操作:发布新专题  查看更改  查看专题  已发布专题管理 "; - $wintitle = "成功更改一个专题"; - $wecome_info = "专题管理::更改专题"; - $win = new OxWindow(); - $win->AddTitle("成功更改专题"); - $win->AddMsgItem($msg); - $winform = $win->GetWindow("hand", " ", FALSE); - $win->Display(); +GetOne($arcQuery); + if (!is_array($arcRow)) { + ShowMsg("读取档案基本信息出错!", "-1"); + exit(); + } + $query = "SELECT * FROM `#@__channeltype` WHERE id='-1'"; + $cInfos = $dsql->GetOne($query); + if (!is_array($cInfos)) { + ShowMsg("读取频道配置信息出错!", "javascript:;"); + exit(); + } + $addRow = $dsql->GetOne("SELECT * FROM `#@__addonspec` WHERE aid='$aid'"); + $tags = GetTags($aid); + include DedeInclude("templets/spec_edit.htm"); +} +/*-------------------------------- +function __save(){ } +-------------------------------*/ +else if ($dopost == 'save') { + require_once(DEDEINC.'/image.func.php'); + require_once(DEDEINC.'/libraries/oxwindow.class.php'); + $flag = isset($flags) ? join(',', $flags) : ''; + $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; + if (!isset($tags)) $tags = ''; + $channelid = -1; + //处理自定义字段会用到这些变量 + if (!isset($autokey)) $autokey = 0; + if (!isset($remote)) $remote = 0; + if (!isset($dellink)) $dellink = 0; + if (!isset($autolitpic)) $autolitpic = 0; + //对保存的内容进行处理 + $pubdate = GetMkTime($pubdate); + $sortrank = AddDay($pubdate, $sortup); + if ($ishtml == 0) $ismake = -1; + else $ismake = 0; + $title = cn_substrR($title, $cfg_title_maxlen); + $shorttitle = cn_substrR($shorttitle, 36); + $color = cn_substrR($color, 7); + $writer = cn_substrR($writer, 20); + $source = cn_substrR($source, 30); + $description = cn_substrR($description, $cfg_auot_description); + $keywords = trim(cn_substrR($keywords, 60)); + $filename = trim(cn_substrR($filename, 40)); + $isremote = 0; + $serviterm = empty($serviterm) ? "" : $serviterm; + if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { + $arcrank = -1; + } + $adminid = $cuserLogin->getUserID(); + //处理上传的缩略图 + if (empty($ddisremote)) { + $ddisremote = 0; + } + $litpic = GetDDImage('none', $picname, $ddisremote); + //处理新的缩略图上传 + if ($litpic_b64 != "") { + $data = explode(',', $litpic_b64); + $ntime = time(); + $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); + CreateDir($savepath); + $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); + $fullUrl = $fullUrl.".png"; + file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); + //加水印 + WaterImg($cfg_basedir.$fullUrl, 'up'); + $litpic = $fullUrl; + } + //分析处理附加表数据 + $inadd_f = ''; + $inadd_v = ''; + if (!empty($dede_addonfields)) { + $addonfields = explode(';', $dede_addonfields); + $inadd_f = ''; + $inadd_v = ''; + if (is_array($addonfields)) { + foreach ($addonfields as $v) { + if ($v == '') { + continue; + } + $vs = explode(',', $v); + if ($vs[1] == 'htmltext' || $vs[1] == 'textdata') //HTML文本特殊处理 + { + ${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); + } else { + if (!isset(${$vs[0]})) { + ${$vs[0]} = ''; + } + ${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); + } + $inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; + } + } + } + //处理图片文档的自定义属性 + if ($litpic != '' && !preg_match('#p#', $flag)) { + $flag = ($flag == '' ? 'p' : $flag.',p'); + } + $inQuery = "UPDATE `#@__archives` SET + typeid='$typeid', + sortrank='$sortrank', + flag='$flag', + ismake='$ismake', + arcrank='$arcrank', + click='$click', + title='$title', + color='$color', + writer='$writer', + source='$source', + litpic='$litpic', + pubdate='$pubdate', + notpost='$notpost', + description='$description', + keywords='$keywords', + shorttitle='$shorttitle', + filename='$filename' + WHERE id='$id'; "; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("更新数据库archives表时出错,请检查", "-1"); + exit(); + } + //专题节点列表 + $arcids = array(); + $notelist = ''; + for ($i = 1; $i <= $cfg_specnote; $i++) { + if (!empty(${'notename'.$i})) { + $notename = str_replace("'", "", trim(${'notename'.$i})); + $arcid = trim(${'arcid'.$i}); + $col = trim(${'col'.$i}); + $imgwidth = trim(${'imgwidth'.$i}); + $imgheight = trim(${'imgheight'.$i}); + $titlelen = trim(${'titlelen'.$i}); + $infolen = trim(${'infolen'.$i}); + $listtmp = trim(${'listtmp'.$i}); + if (isset(${'noteid'.$i})) { + $noteid = trim(${'noteid'.$i}); + } else { + $noteid = $i; + } + if (isset(${'isauto'.$i})) { + $isauto = trim(${'isauto'.$i}); + } else { + $isauto = 0; + } + if (isset(${'keywords'.$i})) { + $keywords = str_replace("'", "", trim(${'keywords'.$i})); + } else { + $keywords = ""; + } + if (!empty(${'typeid'.$i})) { + $ttypeid = trim(${'typeid'.$i}); + } else { + $ttypeid = 0; + } + if (!empty(${'rownum'.$i})) { + $rownum = trim(${'rownum'.$i}); + } else { + $rownum = 0; + } + $arcid = preg_replace("#[^0-9,]#", "", $arcid); + $ids = explode(",", $arcid); + $okids = ""; + if (is_array($ids)) { + foreach ($ids as $mid) { + $mid = trim($mid); + if ($mid == "") continue; + if (!isset($arcids[$mid])) { + if ($okids == "") { + $okids .= $mid; + } else { + $okids .= ",".$mid; + } + $arcids[$mid] = 1; + } + } + } + $notelist .= "{dede:specnote imgheight=\\'$imgheight\\' imgwidth=\\'$imgwidth\\' + infolen=\\'$infolen\\' titlelen=\\'$titlelen\\' col=\\'$col\\' idlist=\\'$okids\\' + name=\\'$notename\\' noteid=\\'$noteid\\' isauto=\'$isauto\' rownum=\\'$rownum\\' + keywords=\\'$keywords\\' typeid=\\'$ttypeid\\'} + $listtmp + {/dede:specnote}\r\n"; + } + } + //更新附加表 + $inQuery = "UPDATE `#@__addonspec` SET typeid ='$typeid',note='$notelist'{$inadd_f},templet='$templet' WHERE aid='$id';"; + if (!$dsql->ExecuteNoneQuery($inQuery)) { + ShowMsg("更新数据库附加表 addonspec 时出错,请检查原因", "-1"); + exit(); + } + //生成HTML + UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); + $artUrl = MakeArt($id, TRUE, TRUE, $isremote); + if ($artUrl == '') { + $artUrl = $cfg_phpurl."/view.php?aid=$id"; + } + ClearMyAddon($id, $title); + //自动更新关联内容 + if (is_array($automake)) { + foreach ($automake as $key => $value) { + if (isset(${$key}) && !empty(${$key})) { + $ids = explode(",", ${$key}); + foreach ($ids as $id) { + MakeArt($id, true, true, $isremote); + } + } + } + } + //返回成功信息 + $msg = "请选择您的后续操作:发布新专题  查看修改  查看专题  已发布专题管理 "; + $wintitle = "成功修改一个专题"; + $wecome_info = "专题管理::修改专题"; + $win = new OxWindow(); + $win->AddTitle("成功修改专题"); + $win->AddMsgItem($msg); + $winform = $win->GetWindow("hand", " ", FALSE); + $win->Display(); } \ No newline at end of file diff --git a/src/dede/stepselect_main.php b/src/admin/stepselect_main.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/stepselect_main.php rename to src/admin/stepselect_main.php index be525d21..d3b99784 --- a/src/dede/stepselect_main.php +++ b/src/admin/stepselect_main.php @@ -1,263 +1,269 @@ -Execute('me', 'SELECT * FROM `#@__stepselect` ORDER BY id DESC'); - while ($arr = $dsql->GetArray()) { - $etypes[] = $arr; - $egroups[$arr['egroup']] = $arr['itemname']; - } - - if ($egroup != '') { - $orderby = 'ORDER BY disorder ASC, evalue ASC'; - if (!empty($topvalue)) { - // 判断是否为1级联动 - if ($topvalue % 500 == 0) { - $egroupsql = " WHERE egroup LIKE '$egroup' AND evalue>=$topvalue AND evalue < ".($topvalue + 500); - } else { - $egroupsql = " WHERE (evalue LIKE '$topvalue.%%%' OR evalue=$topvalue) AND egroup LIKE '$egroup'"; - } - } else { - $egroupsql = " WHERE egroup LIKE '$egroup' "; - } - $sql = "SELECT * FROM `#@__sys_enum` $egroupsql $orderby"; - } else { - $egroupsql = ''; - $sql = "SELECT * FROM `#@__stepselect` ORDER BY id DESC"; - } - //echo $sql;exit; - $dlist = new DataListCP(); - $dlist->SetParameter('egroup', $egroup); - $dlist->SetParameter('topvalue', $topvalue); - $dlist->SetTemplet(DEDEADMIN."/templets/stepselect_main.htm"); - $dlist->SetSource($sql); - $dlist->display(); - exit(); -} else if ($action == 'edit' || $action == 'addnew' || $action == 'addenum' || $action == 'view') { - AjaxHead(); - include('./templets/stepselect_showajax.htm'); - exit(); -} -/*----------------- -删除类型或枚举值 -function __del() { } -------------------*/ else if ($action == 'del') { - $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE id='$id' "); - if (!is_array($arr)) { - ShowMsg("无法获取分类信息,不允许后续操作", "stepselect_main.php?".ExecTime()); - exit(); - } - if ($arr['issystem'] == 1) { - ShowMsg("系统内置的枚举分类不能删除", "stepselect_main.php?".ExecTime()); - exit(); - } - $dsql->ExecuteNoneQuery("DELETE FROM `#@__stepselect` WHERE id='$id'; "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}'; "); - ShowMsg("成功删除一个分类", "stepselect_main.php?".ExecTime()); - exit(); -} else if ($action == 'delenumAllSel') { - if (isset($ids) && is_array($ids)) { - $id = join(',', $ids); - - $groups = array(); - $dsql->Execute('me', "SELECT egroup FROM `#@__sys_enum` WHERE id IN($id) GROUP BY egroup"); - while ($row = $dsql->GetArray('me')) { - $groups[] = $row['egroup']; - } - - $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id IN($id); "); - - //更新缓存 - foreach ($groups as $egropu) { - WriteEnumsCache($egroup); - } - - ShowMsg("成功删除选中的枚举分类", $ENV_GOBACK_URL); - } else { - ShowMsg("您没选择任何分类", "-1"); - } - exit(); -} else if ($action == 'delenum') { - $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$id' "); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id='{$id}'; "); - WriteEnumsCache($row['egroup']); - ShowMsg("成功删除一个枚举", $ENV_GOBACK_URL); - exit(); -} -/*----------------- -保存类型修改 -function __edit_save() { } -------------------*/ else if ($action == 'edit_save') { - if (preg_match("#[^0-9a-z_-]#i", $egroup)) { - ShowMsg("组名称不能有全角字符或特殊符号", "-1"); - exit(); - } - $dsql->ExecuteNoneQuery("UPDATE `#@__stepselect` SET `itemname`='$itemname',`egroup`='$egroup' WHERE id='$id'; "); - ShowMsg("成功修改一个分类", "stepselect_main.php?".ExecTime()); - exit(); -} -/*----------------- -保存新类型 -function __addnew_save() { } -------------------*/ else if ($action == 'addnew_save') { - if (preg_match("#[^0-9a-z_-]#i", $egroup)) { - ShowMsg("组名称不能有全角字符或特殊符号", "-1"); - exit(); - } - $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE itemname LIKE '$itemname' OR egroup LIKE '$egroup' "); - if (is_array($arr)) { - ShowMsg("您指定的类别名称或组名称已经存在,不能使用", "stepselect_main.php"); - exit(); - } - $dsql->ExecuteNoneQuery("INSERT INTO `#@__stepselect`(`itemname`,`egroup`,`issign`,`issystem`) VALUES('$itemname','$egroup','0','0'); "); - WriteEnumsCache($egroup); - ShowMsg("成功添加一个分类", "stepselect_main.php?egroup=$egroup"); - exit(); -} -/*--------- -把旧版全国省市表替换当前地区数据 -function __exarea() { } -----------*/ else if ($action == 'exarea') { - $bigtypes = array(); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='nativeplace'; "); - $query = "SELECT * FROM `#@__area` WHERE reid =0 order by id asc"; - $dsql->Execute('me', $query); - $n = 1; - while ($row = $dsql->GetArray()) { - $bigtypes[$row['id']] = $evalue = $disorder = $n * 500; - $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); - $n++; - } - $stypes = array(); - foreach ($bigtypes as $k => $v) { - $query = "SELECT * FROM `#@__area` WHERE reid=$k order by id asc"; - $dsql->Execute('me', $query); - $n = 1; - while ($row = $dsql->GetArray()) { - $stypes[$row['id']] = $evalue = $disorder = $v + $n; - $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); - $n++; - } - } - WriteEnumsCache('nativeplace'); - ShowMsg("成功导入所有旧的地区数据", "stepselect_main.php?egroup=nativeplace"); - exit(); -} -/*-------------------- -function __addenum_save() { } -关于二级枚举的说明,为了节省查询速度,二级枚举是通过特殊算法生成的,原理为 -凡是能被 500 整除的都是一级枚举,(500 * n) + 1 < em < 500 * (n+1) 为下级枚举 -如:1000 的下级枚举对应的值为 1001,1002,1003...1499 -对于 issign=1 的,表示这个类别只有一级枚举,则不受上面的算法限制 ------------------------------------------------------------------------- -更新算法: -新增二级枚举下添加"-N"自己类别选择,例如: -1001二级枚举下面的3级类目,则为1001-1,1001-2... -这时候需要issign=2 ----------------------*/ else if ($action == 'addenum_save') { - if (empty($ename) || empty($egroup)) { - Showmsg("类别名称或组名称不能为空", "-1"); - exit(); - } - if ($issign == 1 || $topvalue == 0) { - $enames = explode(',', $ename); - foreach ($enames as $ename) { - $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND (evalue MOD 500)=0 ORDER BY disorder DESC "); - if (!is_array($arr)) $disorder = $evalue = ($issign == 1 ? 1 : 500); - else $disorder = $evalue = $arr['disorder'] + ($issign == 1 ? 1 : 500); - - $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); - } - WriteEnumsCache($egroup); - ShowMsg("成功添加枚举分类".$dsql->GetError(), $ENV_GOBACK_URL); - exit(); - } else if ($issign == 2 && $topvalue != 0) { - $minid = $topvalue; - $maxnum = 500; // 三级子类最多500个 - $enames = explode(',', $ename); - foreach ($enames as $ename) { - $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND evalue LIKE '$topvalue.%%%' ORDER BY evalue DESC "); - if (!is_array($arr)) { - $disorder = $minid; - $evalue = $minid.'.001'; - } else { - $disorder = $minid; - preg_match("#([0-9]{1,})\.([0-9]{1,})#", $arr['evalue'], $matchs); - $addvalue = $matchs[2] + 1; - $addvalue = sprintf("%03d", $addvalue); - $evalue = $matchs[1].'.'.$addvalue; - } - $sql = "INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "; - // echo $sql;exit; - $dsql->ExecuteNoneQuery($sql); - } - // echo $minid; - WriteEnumsCache($egroup); - ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); - exit(); - } else { - $minid = $topvalue; - $maxid = $topvalue + 500; - $enames = explode(',', $ename); - foreach ($enames as $ename) { - $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND evalue>$minid AND evalue<$maxid ORDER BY evalue DESC "); - if (!is_array($arr)) { - $disorder = $evalue = $minid + 1; - } else { - $disorder = $arr['disorder'] + 1; - $evalue = $arr['evalue'] + 1; - } - $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) - VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); - } - WriteEnumsCache($egroup); - ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); - exit(); - } -} -/*----------------- -修改枚举名称和排序 -function __upenum() { } -------------------*/ else if ($action == 'upenum') { - $ename = trim(preg_replace("# └─(─){1,}#", '', $ename)); - $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$aid' "); - WriteEnumsCache($row['egroup']); - $dsql->ExecuteNoneQuery("UPDATE `#@__sys_enum` SET `ename`='$ename',`disorder`='$disorder' WHERE id='$aid'; "); - ShowMsg("成功修改一个枚举", $ENV_GOBACK_URL); - exit(); -} -/*----------------- -更新枚举缓存 -function __upallcache() { } -------------------*/ else if ($action == 'upallcache') { - if (!isset($egroup)) $egroup = ''; - WriteEnumsCache($egroup); - ShowMsg("成更新枚举缓存", $ENV_GOBACK_URL); - exit(); -} +Execute('me', 'SELECT * FROM `#@__stepselect` ORDER BY id DESC'); + while ($arr = $dsql->GetArray()) { + $etypes[] = $arr; + $egroups[$arr['egroup']] = $arr['itemname']; + } + + if ($egroup != '') { + $orderby = 'ORDER BY disorder ASC, evalue ASC'; + if (!empty($topvalue)) { + //判断是否为1级联动 + if ($topvalue % 500 == 0) { + $egroupsql = " WHERE egroup LIKE '$egroup' AND evalue>=$topvalue AND evalue < ".($topvalue + 500); + } else { + $egroupsql = " WHERE (evalue LIKE '$topvalue.%%%' OR evalue=$topvalue) AND egroup LIKE '$egroup'"; + } + } else { + $egroupsql = " WHERE egroup LIKE '$egroup' "; + } + $sql = "SELECT * FROM `#@__sys_enum` $egroupsql $orderby"; + } else { + $egroupsql = ''; + $sql = "SELECT * FROM `#@__stepselect` ORDER BY id DESC"; + } + //echo $sql;exit; + $dlist = new DataListCP(); + $dlist->SetParameter('egroup', $egroup); + $dlist->SetParameter('topvalue', $topvalue); + $dlist->SetTemplet(DEDEADMIN."/templets/stepselect_main.htm"); + $dlist->SetSource($sql); + $dlist->display(); + exit(); +} else if ($action == 'edit' || $action == 'addnew' || $action == 'addenum' || $action == 'view') { + AjaxHead(); + include('./templets/stepselect_showajax.htm'); + exit(); +} +/*----------------- +删除类型或枚举值 +function __del() { } +------------------*/ +else if ($action == 'del') { + $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE id='$id' "); + if (!is_array($arr)) { + ShowMsg("无法获取分类信息,不允许后续操作", "stepselect_main.php?".ExecTime()); + exit(); + } + if ($arr['issystem'] == 1) { + ShowMsg("系统内置的枚举分类不能删除", "stepselect_main.php?".ExecTime()); + exit(); + } + $dsql->ExecuteNoneQuery("DELETE FROM `#@__stepselect` WHERE id='$id'; "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='{$arr['egroup']}'; "); + ShowMsg("成功删除一个分类", "stepselect_main.php?".ExecTime()); + exit(); +} else if ($action == 'delenumAllSel') { + if (isset($ids) && is_array($ids)) { + $id = join(',', $ids); + + $groups = array(); + $dsql->Execute('me', "SELECT egroup FROM `#@__sys_enum` WHERE id IN($id) GROUP BY egroup"); + while ($row = $dsql->GetArray('me')) { + $groups[] = $row['egroup']; + } + + $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id IN($id); "); + + //更新缓存 + foreach ($groups as $egropu) { + WriteEnumsCache($egroup); + } + + ShowMsg("成功删除选中的枚举分类", $ENV_GOBACK_URL); + } else { + ShowMsg("您没选择任何分类", "-1"); + } + exit(); +} else if ($action == 'delenum') { + $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$id' "); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE id='{$id}'; "); + WriteEnumsCache($row['egroup']); + ShowMsg("成功删除一个枚举", $ENV_GOBACK_URL); + exit(); +} +/*----------------- +保存类型修改 +function __edit_save() { } +------------------*/ +else if ($action == 'edit_save') { + if (preg_match("#[^0-9a-z_-]#i", $egroup)) { + ShowMsg("组名称不能有全角字符或特殊符号", "-1"); + exit(); + } + $dsql->ExecuteNoneQuery("UPDATE `#@__stepselect` SET `itemname`='$itemname',`egroup`='$egroup' WHERE id='$id'; "); + ShowMsg("成功修改一个分类", "stepselect_main.php?".ExecTime()); + exit(); +} +/*----------------- +保存新类型 +function __addnew_save() { } +------------------*/ +else if ($action == 'addnew_save') { + if (preg_match("#[^0-9a-z_-]#i", $egroup)) { + ShowMsg("组名称不能有全角字符或特殊符号", "-1"); + exit(); + } + $arr = $dsql->GetOne("SELECT * FROM `#@__stepselect` WHERE itemname LIKE '$itemname' OR egroup LIKE '$egroup' "); + if (is_array($arr)) { + ShowMsg("您指定的类别名称或组名称已经存在,不能使用", "stepselect_main.php"); + exit(); + } + $dsql->ExecuteNoneQuery("INSERT INTO `#@__stepselect`(`itemname`,`egroup`,`issign`,`issystem`) VALUES('$itemname','$egroup','0','0'); "); + WriteEnumsCache($egroup); + ShowMsg("成功添加一个分类", "stepselect_main.php?egroup=$egroup"); + exit(); +} +/*--------- +把旧版全国省市表替换当前地区数据 +function __exarea() { } +----------*/ +else if ($action == 'exarea') { + $bigtypes = array(); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_enum` WHERE egroup='nativeplace'; "); + $query = "SELECT * FROM `#@__area` WHERE reid =0 order by id asc"; + $dsql->Execute('me', $query); + $n = 1; + while ($row = $dsql->GetArray()) { + $bigtypes[$row['id']] = $evalue = $disorder = $n * 500; + $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) + VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); + $n++; + } + $stypes = array(); + foreach ($bigtypes as $k => $v) { + $query = "SELECT * FROM `#@__area` WHERE reid=$k order by id asc"; + $dsql->Execute('me', $query); + $n = 1; + while ($row = $dsql->GetArray()) { + $stypes[$row['id']] = $evalue = $disorder = $v + $n; + $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) + VALUES('{$row['name']}','$evalue','nativeplace','$disorder','0'); "); + $n++; + } + } + WriteEnumsCache('nativeplace'); + ShowMsg("成功导入所有旧的地区数据", "stepselect_main.php?egroup=nativeplace"); + exit(); +} +/*-------------------- +function __addenum_save() { } +关于二级枚举的说明,为了节省查询速度,二级枚举是通过特殊算法生成的,原理为 +凡是能被 500 整除的都是一级枚举,(500 * n) + 1 < em < 500 * (n+1) 为下级枚举 +如:1000 的下级枚举对应的值为 1001,1002,10031499 +对于 issign=1 的,表示这个类别只有一级枚举,则不受上面的算法限制 +------------------------------------------------------------------------ +更新算法: +新增二级枚举下添加"-N"自己类别选择,例如: +1001二级枚举下面的3级类目,则为1001-1,1001-2 +这时候需要issign=2 +---------------------*/ +else if ($action == 'addenum_save') { + if (empty($ename) || empty($egroup)) { + Showmsg("类别名称或组名称不能为空", "-1"); + exit(); + } + if ($issign == 1 || $topvalue == 0) { + $enames = explode(',', $ename); + foreach ($enames as $ename) { + $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND (evalue MOD 500)=0 ORDER BY disorder DESC "); + if (!is_array($arr)) $disorder = $evalue = ($issign == 1 ? 1 : 500); + else $disorder = $evalue = $arr['disorder'] + ($issign == 1 ? 1 : 500); + + $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) + VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); + } + WriteEnumsCache($egroup); + ShowMsg("成功添加枚举分类".$dsql->GetError(), $ENV_GOBACK_URL); + exit(); + } else if ($issign == 2 && $topvalue != 0) { + $minid = $topvalue; + $maxnum = 500; //三级子类最多500个 + $enames = explode(',', $ename); + foreach ($enames as $ename) { + $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND evalue LIKE '$topvalue.%%%' ORDER BY evalue DESC "); + if (!is_array($arr)) { + $disorder = $minid; + $evalue = $minid.'.001'; + } else { + $disorder = $minid; + preg_match("#([0-9]{1,})\.([0-9]{1,})#", $arr['evalue'], $matchs); + $addvalue = $matchs[2] + 1; + $addvalue = sprintf("%03d", $addvalue); + $evalue = $matchs[1].'.'.$addvalue; + } + $sql = "INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) + VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "; + //echo $sql;exit; + $dsql->ExecuteNoneQuery($sql); + } + //echo $minid; + WriteEnumsCache($egroup); + ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); + exit(); + } else { + $minid = $topvalue; + $maxid = $topvalue + 500; + $enames = explode(',', $ename); + foreach ($enames as $ename) { + $arr = $dsql->GetOne("SELECT * FROM `#@__sys_enum` WHERE egroup='$egroup' AND evalue>$minid AND evalue<$maxid ORDER BY evalue DESC "); + if (!is_array($arr)) { + $disorder = $evalue = $minid + 1; + } else { + $disorder = $arr['disorder'] + 1; + $evalue = $arr['evalue'] + 1; + } + $dsql->ExecuteNoneQuery("INSERT INTO `#@__sys_enum`(`ename`,`evalue`,`egroup`,`disorder`,`issign`) + VALUES('$ename','$evalue','$egroup','$disorder','$issign'); "); + } + WriteEnumsCache($egroup); + ShowMsg("成功添加枚举分类", $ENV_GOBACK_URL); + exit(); + } +} +/*----------------- +修改枚举名称和排序 +function __upenum() { } +------------------*/ +else if ($action == 'upenum') { + $ename = trim(preg_replace("# └─(─){1,}#", '', $ename)); + $row = $dsql->GetOne("SELECT egroup FROM `#@__sys_enum` WHERE id = '$aid' "); + WriteEnumsCache($row['egroup']); + $dsql->ExecuteNoneQuery("UPDATE `#@__sys_enum` SET `ename`='$ename',`disorder`='$disorder' WHERE id='$aid'; "); + ShowMsg("成功修改一个枚举", $ENV_GOBACK_URL); + exit(); +} +/*----------------- +更新枚举缓存 +function __upallcache() { } +------------------*/ +else if ($action == 'upallcache') { + if (!isset($egroup)) $egroup = ''; + WriteEnumsCache($egroup); + ShowMsg("成更新枚举缓存", $ENV_GOBACK_URL); + exit(); +} diff --git a/src/dede/swfupload.php b/src/admin/swfupload.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/swfupload.php rename to src/admin/swfupload.php index 36e88ad2..12552fb2 --- a/src/dede/swfupload.php +++ b/src/admin/swfupload.php @@ -1,198 +1,207 @@ -getUserID().'-'.dd2char(MyDate('ymdHis', time())); - if (file_exists($cfg_basedir.$filedir.'/'.$filename.$sname)) { - for ($i = 50; $i <= 5000; $i++) { - if (!file_exists($cfg_basedir.$filedir.'/'.$filename.'-'.$i.$sname)) { - $filename = $filename.'-'.$i; - break; - } - } - } - $fileurl = $filedir.'/'.$filename.$sname; - $rs = copy($FiledataNew, $cfg_basedir.$fileurl); - unlink($FiledataNew); - if (!$rs) { - echo "ERROR: Copy Uploadfile Error! "; - exit(0); - } - //WaterImg($cfg_basedir.$fileurl, 'up'); - $title = $filename.$sname; - - $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; - if (!empty($arcid)) { - $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) - VALUES ('$arcid','$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; - } - - $dsql->ExecuteNoneQuery($inquery); - $fid = $dsql->GetLastID(); - AddMyAddon($fid, $fileurl); - - //生成缩略图 - ob_start(); - ImageResizeNew($cfg_basedir.$fileurl, $cfg_ddimg_width, $cfg_ddimg_height, '', false); - $imagevariable = ob_get_contents(); - ob_end_clean(); - - //保存信息到 session - if (!isset($_SESSION['file_info'])) $_SESSION['file_info'] = array(); - if (!isset($_SESSION['bigfile_info'])) $_SESSION['bigfile_info'] = array(); - if (!isset($_SESSION['fileid'])) $_SESSION['fileid'] = 1; - else $_SESSION['fileid']++; - - $_SESSION['bigfile_info'][$_SESSION['fileid']] = $fileurl; - $_SESSION['file_info'][$_SESSION['fileid']] = $imagevariable; - echo "FILEID:".$_SESSION['fileid']; - exit(0); -} -/************************ -//生成缩图 -function GetThumbnail(){ } -*************************/ -else if ($dopost == 'thumbnail') { - if (empty($id)) { - header('HTTP/1.1 500 Internal Server Error'); - echo 'No ID'; - exit(0); - } - if (!is_array($_SESSION['file_info']) || !isset($_SESSION['file_info'][$id])) { - header('HTTP/1.1 404 Not found'); - exit(0); - } - header('Content-type: image/jpeg'); - header('Content-Length: '.strlen($_SESSION['file_info'][$id])); - echo $_SESSION['file_info'][$id]; - exit(0); -} -/************************ -//删除指定ID的图片 -*************************/ -else if ($dopost == 'del') { - if (!isset($_SESSION['bigfile_info'][$id])) { - echo ''; - exit(); - } - $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$_SESSION['bigfile_info'][$id]}'; "); - @unlink($cfg_basedir.$_SESSION['bigfile_info'][$id]); - $_SESSION['file_info'][$id] = ''; - $_SESSION['bigfile_info'][$id] = ''; - echo "已删除"; - exit(); -} -/************************ -//获取图片地址 -*************************/ -else if ($dopost == 'addtoedit') { - if (!isset($_SESSION['bigfile_info'][$id])) { - echo ''; - exit(); - } - echo $_SESSION['bigfile_info'][$id]; - exit(); -} -/************************ -//获取本地图片的缩略预览图 -function GetddImg(){ } -*************************/ -else if ($dopost == 'ddimg') { - //生成缩略图 - ob_start(); - if (!preg_match("/^(http[s]?:\/\/)?([^\/]+)/i", $img)) $img = $cfg_basedir.$img; - ImageResizeNew($img, $cfg_ddimg_width, $cfg_ddimg_height, '', false); - $imagevariable = ob_get_contents(); - ob_end_clean(); - header('Content-type: image/jpeg'); - header('Content-Length: '.strlen($imagevariable)); - echo $imagevariable; - exit(); -} -/************************ -//删除指定的图片(编辑图集时用) -*************************/ -else if ($dopost == 'delold') { - $imgfile = $cfg_basedir.$picfile; - if (!file_exists($imgfile) && !is_dir($imgfile) && preg_match("#^".$cfg_medias_dir."#", $imgfile)) { - @unlink($imgfile); - } - $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$picfile}'; "); - echo "已删除"; - exit(); -} +getUserID().'-'.dd2char(MyDate('ymdHis', time())); + if (file_exists($cfg_basedir.$filedir.'/'.$filename.$sname)) { + for ($i = 50; $i <= 5000; $i++) { + if (!file_exists($cfg_basedir.$filedir.'/'.$filename.'-'.$i.$sname)) { + $filename = $filename.'-'.$i; + break; + } + } + } + $fileurl = $filedir.'/'.$filename.$sname; + $rs = copy($FiledataNew, $cfg_basedir.$fileurl); + unlink($FiledataNew); + if (!$rs) { + echo "ERROR: Copy Uploadfile Error! "; + exit(0); + } + //WaterImg($cfg_basedir.$fileurl, 'up'); + $title = $filename.$sname; + + $inquery = "INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; + if (!empty($arcid)) { + $inquery = "INSERT INTO `#@__uploads`(arcid,title,url,mediatype,width,height,playtime,filesize,uptime,mid) + VALUES ('$arcid','$title','$fileurl','$ftype','0','0','0','".filesize($cfg_basedir.$fileurl)."','".time()."','".$cuserLogin->getUserID()."'); "; + } + + $dsql->ExecuteNoneQuery($inquery); + $fid = $dsql->GetLastID(); + AddMyAddon($fid, $fileurl); + + //生成缩略图 + ob_start(); + ImageResizeNew($cfg_basedir.$fileurl, $cfg_ddimg_width, $cfg_ddimg_height, '', false); + $imagevariable = ob_get_contents(); + ob_end_clean(); + + //保存信息到 session + if (!isset($_SESSION['file_info'])) $_SESSION['file_info'] = array(); + if (!isset($_SESSION['bigfile_info'])) $_SESSION['bigfile_info'] = array(); + if (!isset($_SESSION['fileid'])) $_SESSION['fileid'] = 1; + else $_SESSION['fileid']++; + + $_SESSION['bigfile_info'][$_SESSION['fileid']] = $fileurl; + $_SESSION['file_info'][$_SESSION['fileid']] = $imagevariable; + echo "FILEID:".$_SESSION['fileid']; + exit(0); +} +/************************ +//生成缩图 +function GetThumbnail(){ } +*************************/ +else if ($dopost == 'thumbnail') { + if (empty($id)) { + header('HTTP/1.1 500 Internal Server Error'); + echo 'No ID'; + exit(0); + } + if (!is_array($_SESSION['file_info']) || !isset($_SESSION['file_info'][$id])) { + header('HTTP/1.1 404 Not found'); + exit(0); + } + header('Content-type: image/jpeg'); + header('Content-Length: '.strlen($_SESSION['file_info'][$id])); + echo $_SESSION['file_info'][$id]; + exit(0); +} +/************************ +//删除指定ID的图片 +*************************/ +else if ($dopost == 'del') { + if (!isset($_SESSION['bigfile_info'][$id])) { + echo ''; + exit(); + } + $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$_SESSION['bigfile_info'][$id]}'; "); + @unlink($cfg_basedir.$_SESSION['bigfile_info'][$id]); + $_SESSION['file_info'][$id] = ''; + $_SESSION['bigfile_info'][$id] = ''; + echo "已删除"; + exit(); +} +/************************ +//获取图片地址 +*************************/ +else if ($dopost == 'addtoedit') { + if (!isset($_SESSION['bigfile_info'][$id])) { + echo ''; + exit(); + } + echo $_SESSION['bigfile_info'][$id]; + exit(); +} +/************************ +//获取本地图片的缩略预览图 +function GetddImg(){ } +*************************/ +else if ($dopost == 'ddimg') { + //生成缩略图 + ob_start(); + if (!preg_match("/^(http[s]?:\/\/)?([^\/]+)/i", $img)) $img = $cfg_basedir.$img; + ImageResizeNew($img, $cfg_ddimg_width, $cfg_ddimg_height, '', false); + $imagevariable = ob_get_contents(); + ob_end_clean(); + header('Content-type: image/jpeg'); + header('Content-Length: '.strlen($imagevariable)); + echo $imagevariable; + exit(); +} +/************************ +//删除指定的图片(编辑图集时用) +*************************/ +else if ($dopost == 'delold') { + $imgfile = $cfg_basedir.$picfile; + if (!file_exists($imgfile) && !is_dir($imgfile) && preg_match("#^".$cfg_medias_dir."#", $imgfile)) { + @unlink($imgfile); + } + $dsql->ExecuteNoneQuery("DELETE FROM `#@__uploads` WHERE url LIKE '{$picfile}'; "); + echo "已删除"; + exit(); +} diff --git a/src/dede/sys_admin_user.php b/src/admin/sys_admin_user.php old mode 100755 new mode 100644 similarity index 91% rename from src/dede/sys_admin_user.php rename to src/admin/sys_admin_user.php index 15bccf02..e8d9c8f1 --- a/src/dede/sys_admin_user.php +++ b/src/admin/sys_admin_user.php @@ -1,41 +1,40 @@ -SetQuery("SELECT `rank`,`typename` FROM `#@__admintype` "); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $adminRanks[$row->rank] = $row->typename; -} -$query = "SELECT `#@__admin`.*,`#@__arctype`.typename FROM `#@__admin` LEFT JOIN `#@__arctype` ON `#@__admin`.typeid = `#@__arctype`.id $rank "; -$dlist = new DataListCP(); -$dlist->SetTemplet(DEDEADMIN."/templets/sys_admin_user.htm"); -$dlist->SetSource($query); -$dlist->Display(); - -function GetUserType($trank) -{ - global $adminRanks; - if (isset($adminRanks[$trank])) return $adminRanks[$trank]; - else return "错误类型"; -} - -function GetChannel($c) -{ - if ($c == "" || $c == 0) return "所有频道"; - else return $c; -} +SetQuery("SELECT `rank`,typename FROM `#@__admintype` "); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $adminRanks[$row->rank] = $row->typename; +} +$query = "SELECT `#@__admin`.*,`#@__arctype`.typename FROM `#@__admin` LEFT JOIN `#@__arctype` ON `#@__admin`.typeid = `#@__arctype`.id $rank "; +$dlist = new DataListCP(); +$dlist->SetTemplet(DEDEADMIN."/templets/sys_admin_user.htm"); +$dlist->SetSource($query); +$dlist->Display(); + +function GetUserType($trank) +{ + global $adminRanks; + if (isset($adminRanks[$trank])) return $adminRanks[$trank]; + else return "错误类型"; +} + +function GetChannel($c) +{ + if ($c == "" || $c == 0) return "所有频道"; + else return $c; +} diff --git a/src/dede/sys_admin_user_add.php b/src/admin/sys_admin_user_add.php old mode 100755 new mode 100644 similarity index 95% rename from src/dede/sys_admin_user_add.php rename to src/admin/sys_admin_user_add.php index 78be1f49..e911d4db --- a/src/dede/sys_admin_user_add.php +++ b/src/admin/sys_admin_user_add.php @@ -1,5 +1,4 @@ 请使用[0-9a-zA-Z_@!.-]内的字符', '-1', 0, 3000); + ShowMsg('密码或或用户名不合法,
请使用[0-9a-zA-Z_@!.-]内的字符', '-1', 0, 3000); exit(); } $safecodeok = substr(md5($cfg_cookie_encode.$randcode), 0, 24); diff --git a/src/dede/sys_admin_user_edit.php b/src/admin/sys_admin_user_edit.php old mode 100755 new mode 100644 similarity index 94% rename from src/dede/sys_admin_user_edit.php rename to src/admin/sys_admin_user_edit.php index ab559eb8..b4077aa8 --- a/src/dede/sys_admin_user_edit.php +++ b/src/admin/sys_admin_user_edit.php @@ -1,5 +1,4 @@ ExecuteNoneQuery($query); $query = "UPDATE `#@__member` SET uname='$uname',email='$email'$pwdm WHERE mid='$id'"; $dsql->ExecuteNoneQuery($query); - ShowMsg("成功更改一个帐户", "sys_admin_user.php"); + ShowMsg("成功修改一个帐户", "sys_admin_user.php"); exit(); } else if ($dopost == 'delete') { if (empty($userok)) $userok = ""; if ($userok != "yes") { $randcode = mt_rand(10000, 99999); $safecode = substr(md5($cfg_cookie_encode.$randcode), 0, 24); - require_once(DEDEINC."/oxwindow.class.php"); + require_once(DEDEINC."/libraries/oxwindow.class.php"); $wintitle = "删除用户"; $wecome_info = "系统帐号管理::删除用户"; $win = new OxWindow(); @@ -64,8 +63,8 @@ if ($dopost == 'saveedit') { $win->AddHidden("safecode", $safecode); $win->AddHidden("id", $id); $win->AddTitle("系统警告"); - $win->AddMsgItem("您确信要删除用户:$userid 吗?", "50"); - $win->AddMsgItem("安全验证串: (复制本代码: $safecode )", "30"); + $win->AddMsgItem("您确信要删除用户:$userid 吗", "50"); + $win->AddMsgItem("安全验证串: (复制本代码:$safecode )", "30"); $winform = $win->GetWindow("ok"); $win->Display(); exit(); diff --git a/src/dede/sys_admin_user_tj.php b/src/admin/sys_admin_user_tj.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/sys_admin_user_tj.php rename to src/admin/sys_admin_user_tj.php index b62c95d1..e138195c --- a/src/dede/sys_admin_user_tj.php +++ b/src/admin/sys_admin_user_tj.php @@ -1,127 +1,126 @@ -GetOne("SELECT userid FROM `#@__admin` WHERE id='$uid'; "); - $userid = $row['userid']; - $y = intval(MyDate('Y', time())); - $m = intval(MyDate('m', time())); - $d = intval(MyDate('d', time())); - - //全部 - $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; - $dsql->Execute('me', $sql); - while ($frow = $dsql->GetArray('me')) { - $dd = empty($dd) ? "0" : $dd; - $cc = empty($cc) ? "0" : $cc; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE mid='$uid'; "); - $dd += $row['dd']; - $cc += $row['cc']; - } - $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE mid='$uid'; "); - $dd = $row['dd'] + $dd; - $cc = $row['cc'] + $cc; - - //季度 - $starttime = 0; - if (preg_match("#[123]#", $m) && $m < 10) $starttime = $y."-01-01 00:00:00"; - else if (preg_match("#[456]#", $m)) $starttime = $y."-04-01 00:00:00"; - else if (preg_match("#[789]#", $m)) $starttime = $y."-07-01 00:00:00"; - else $starttime = $y."-10-01 00:00:00"; - $istarttime = GetMkTime($starttime); - $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; - $dsql->Execute('me', $sql); - while ($frow = $dsql->GetArray('me')) { - $dds = empty($dds) ? "0" : $dds; - $ccs = empty($ccs) ? "0" : $ccs; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); - $dds += $row['dd']; - $ccs += $row['cc']; - } - $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); - $dds = $row['dd'] + $dds; - $ccs = $row['cc'] + $ccs; - - //当月 - $starttime = $y."-{$m}-01 00:00:00"; - $istarttime = GetMkTime($starttime); - $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; - $dsql->Execute('me', $sql); - while ($frow = $dsql->GetArray('me')) { - $ddm = empty($ddm) ? "0" : $ddm; - $ccm = empty($ccm) ? "0" : $ccm; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddm += $row['dd']; - $ccm += $row['cc']; - } - $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddm = $row['dd'] + $ddm; - $ccm = $row['cc'] + $ccm; - - //本周 - $starttime = $y."-{$m}-{$d} 00:00:00"; - $istarttime = GetMkTime($starttime) - (7 * 24 * 3600); - $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; - $dsql->Execute('me', $sql); - while ($frow = $dsql->GetArray('me')) { - $ddw = empty($ddw) ? "0" : $ddw; - $ccw = empty($ccw) ? "0" : $ccw; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddw += $row['dd']; - $ccw += $row['cc']; - } - $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddw = $row['dd'] + $ddw; - $ccw = $row['cc'] + $ccw; - - //当天 - $starttime = $y."-{$m}-{$d} 00:00:00"; - $istarttime = GetMkTime($starttime); - $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; - $dsql->Execute('me', $sql); - while ($frow = $dsql->GetArray('me')) { - $ddd = empty($ddd) ? "0" : $ddd; - $ccd = empty($ccd) ? "0" : $ccd; - $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddd += $row['dd']; - $ccd += $row['cc']; - } - $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); - $ddd = $row['dd'] + $ddd; - $ccd = $row['cc'] + $ccd; - - $msg = " - - - - - - - - - - - - - - - - -
管理员↓|统计信息→全部(文档|点击)季度当月近七天当天
{$userid}{$dd} | {$cc}{$dds} | {$ccs}{$ddm} | {$ccm}{$ddw} | {$ccw}{$ddd} | {$ccd}

\r\n"; - AjaxHead(); - echo $msg; - exit(); -} - -include DedeInclude('templets/sys_admin_user_tj.htm'); +GetOne("SELECT userid FROM `#@__admin` WHERE id='$uid'; "); + $userid = $row['userid']; + $y = intval(MyDate('Y', time())); + $m = intval(MyDate('m', time())); + $d = intval(MyDate('d', time())); + + //全部 + $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; + $dsql->Execute('me', $sql); + while ($frow = $dsql->GetArray('me')) { + $dd = empty($dd) ? "0" : $dd; + $cc = empty($cc) ? "0" : $cc; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE mid='$uid'; "); + $dd += $row['dd']; + $cc += $row['cc']; + } + $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE mid='$uid'; "); + $dd = $row['dd'] + $dd; + $cc = $row['cc'] + $cc; + + //季度 + $starttime = 0; + if (preg_match("#[123]#", $m) && $m < 10) $starttime = $y."-01-01 00:00:00"; + else if (preg_match("#[456]#", $m)) $starttime = $y."-04-01 00:00:00"; + else if (preg_match("#[789]#", $m)) $starttime = $y."-07-01 00:00:00"; + else $starttime = $y."-10-01 00:00:00"; + $istarttime = GetMkTime($starttime); + $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; + $dsql->Execute('me', $sql); + while ($frow = $dsql->GetArray('me')) { + $dds = empty($dds) ? "0" : $dds; + $ccs = empty($ccs) ? "0" : $ccs; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); + $dds += $row['dd']; + $ccs += $row['cc']; + } + $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); + $dds = $row['dd'] + $dds; + $ccs = $row['cc'] + $ccs; + + //当月 + $starttime = $y."-{$m}-01 00:00:00"; + $istarttime = GetMkTime($starttime); + $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; + $dsql->Execute('me', $sql); + while ($frow = $dsql->GetArray('me')) { + $ddm = empty($ddm) ? "0" : $ddm; + $ccm = empty($ccm) ? "0" : $ccm; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddm += $row['dd']; + $ccm += $row['cc']; + } + $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddm = $row['dd'] + $ddm; + $ccm = $row['cc'] + $ccm; + + //本周 + $starttime = $y."-{$m}-{$d} 00:00:00"; + $istarttime = GetMkTime($starttime) - (7 * 24 * 3600); + $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; + $dsql->Execute('me', $sql); + while ($frow = $dsql->GetArray('me')) { + $ddw = empty($ddw) ? "0" : $ddw; + $ccw = empty($ccw) ? "0" : $ccw; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddw += $row['dd']; + $ccw += $row['cc']; + } + $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddw = $row['dd'] + $ddw; + $ccw = $row['cc'] + $ccw; + + //当天 + $starttime = $y."-{$m}-{$d} 00:00:00"; + $istarttime = GetMkTime($starttime); + $sql = "SELECT addtable FROM `#@__channeltype` WHERE issystem='-1'"; + $dsql->Execute('me', $sql); + while ($frow = $dsql->GetArray('me')) { + $ddd = empty($ddd) ? "0" : $ddd; + $ccd = empty($ccd) ? "0" : $ccd; + $row = $dsql->GetOne("SELECT COUNT(aid) AS dd,SUM(click) AS cc FROM `{$frow['addtable']}` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddd += $row['dd']; + $ccd += $row['cc']; + } + $row = $dsql->GetOne("SELECT COUNT(id) AS dd,SUM(click) AS cc FROM `#@__archives` WHERE senddate>$istarttime AND mid='$uid'; "); + $ddd = $row['dd'] + $ddd; + $ccd = $row['cc'] + $ccd; + + $msg = " + + + + + + + + + + + + + + + + +
管理员::统计信息全部(文档|点击)季度当月近七天当天
{$userid}{$dd} | {$cc}{$dds} | {$ccs}{$ddm} | {$ccm}{$ddw} | {$ccw}{$ddd} | {$ccd}

\r\n"; + AjaxHead(); + echo $msg; + exit(); +} + +include DedeInclude('templets/sys_admin_user_tj.htm'); diff --git a/src/dede/sys_cache_up.php b/src/admin/sys_cache_up.php old mode 100755 new mode 100644 similarity index 76% rename from src/dede/sys_cache_up.php rename to src/admin/sys_cache_up.php index 471de1f5..28c9c962 --- a/src/dede/sys_cache_up.php +++ b/src/admin/sys_cache_up.php @@ -1,63 +1,58 @@ -'; - $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache`"); - echo "\n成功更新arclist调用缓存,准备清理过期会员访问历史...
"; - $oldtime = time() - (90 * 24 * 3600); - $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE sendtime<'$oldtime' "); - echo "成功清理过期短信,准备修正错误文档,这可能要占较长的时间..."; - if ($uparc == 1) { - echo ""; - } else { - echo ""; - } - exit(); - } - //修正错误文档 - else if ($step == 9) { - ShowMsg('修正错误文档操作已经取消,请在<系统->系统错误修复[S]>中操作...', 'sys_cache_up.php?dopost=ok&step=-1&uparc=1', 0, 5000); - exit(); - } -} -include DedeInclude('templets/sys_cache_up.htm'); +'; + $dsql->ExecuteNoneQuery("DELETE FROM `#@__arccache`"); + echo "\n成功更新arclist调用缓存,准备清理过期会员访问历史
"; + $oldtime = time() - (90 * 24 * 3600); + $dsql->ExecuteNoneQuery("DELETE FROM `#@__member_pms` WHERE sendtime<'$oldtime' "); + echo "成功清理过期短信,准备修正错误文档,这可能要占较长的时间"; + if ($uparc == 1) { + echo ""; + } else { + echo ""; + } + exit(); + } + //修正错误文档 + else if ($step == 9) { + ShowMsg('修正错误文档操作已经取消,后台系统中系统错误修复中操作', 'sys_cache_up.php?dopost=ok&step=-1&uparc=1', 0, 5000); + exit(); + } +} +include DedeInclude('templets/sys_cache_up.htm'); \ No newline at end of file diff --git a/src/dede/sys_data.php b/src/admin/sys_data.php old mode 100755 new mode 100644 similarity index 87% rename from src/dede/sys_data.php rename to src/admin/sys_data.php index f48761af..70937b7e --- a/src/dede/sys_data.php +++ b/src/admin/sys_data.php @@ -1,92 +1,91 @@ -关闭]\r\n"; - if (empty($tablename)) { - echo "没有指定表名"; - } else { - $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$tablename); - $dsql->Execute('me'); - $row2 = $dsql->GetArray('me', MYSQL_BOTH); - $ctinfo = $row2[1]; - echo trim($ctinfo); - } - echo ''; - exit(); -} else if ($dopost == "opimize") //优化表 -{ - echo "[关闭]\r\n"; - if (empty($tablename)) { - echo "没有指定表名"; - } else { - $rs = $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$tablename` "); - if ($rs) { - echo "执行优化表: $tablename OK"; - } else { - echo "执行优化表: $tablename 失败,原因是:".$dsql->GetError(); - } - } - echo ''; - exit(); -} else if ($dopost == "repair") //修复表 -{ - echo "[关闭]\r\n"; - if (empty($tablename)) { - echo "没有指定表名"; - } else { - $rs = $dsql->ExecuteNoneQuery("REPAIR TABLE `$tablename` "); - if ($rs) { - echo "修复表: $tablename OK"; - } else { - echo "修复表: $tablename 失败,原因是:".$dsql->GetError(); - } - } - echo ''; - exit(); -} - -//获取系统存在的表信息 -$otherTables = array(); -$dedeSysTables = array(); -$channelTables = array(); -$dsql->SetQuery("SELECT addtable FROM `#@__channeltype` "); -$dsql->Execute(); -while ($row = $dsql->GetObject()) { - $channelTables[] = $row->addtable; -} -$dsql->SetQuery("SHOW TABLES"); -$dsql->Execute('t'); -while ($row = $dsql->GetArray('t', MYSQL_BOTH)) { - if (preg_match("#^{$cfg_dbprefix}#", $row[0]) || in_array($row[0], $channelTables)) { - $dedeSysTables[] = $row[0]; - } else { - $otherTables[] = $row[0]; - } -} -$mysql_version = $dsql->GetVersion(); -include DedeInclude('templets/sys_data.htm'); - -function TjCount($tbname, &$dsql) -{ - $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM $tbname"); - return $row['dd']; -} +关闭]\r\n"; + if (empty($tablename)) { + echo "没有指定表名"; + } else { + $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$tablename); + $dsql->Execute('me'); + $row2 = $dsql->GetArray('me', MYSQL_BOTH); + $ctinfo = $row2[1]; + echo trim($ctinfo); + } + echo ''; + exit(); +} else if ($dopost == "opimize") //优化表 +{ + echo "[关闭]\r\n"; + if (empty($tablename)) { + echo "没有指定表名"; + } else { + $rs = $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$tablename` "); + if ($rs) { + echo "执行优化表:$tablename OK"; + } else { + echo "执行优化表:$tablename 失败,原因是:".$dsql->GetError(); + } + } + echo ''; + exit(); +} else if ($dopost == "repair") //修复表 +{ + echo "[关闭]\r\n"; + if (empty($tablename)) { + echo "没有指定表名"; + } else { + $rs = $dsql->ExecuteNoneQuery("REPAIR TABLE `$tablename` "); + if ($rs) { + echo "修复表:$tablename OK"; + } else { + echo "修复表:$tablename 失败,原因是:".$dsql->GetError(); + } + } + echo ''; + exit(); +} + +//获取系统存在的表信息 +$otherTables = array(); +$dedeSysTables = array(); +$channelTables = array(); +$dsql->SetQuery("SELECT addtable FROM `#@__channeltype` "); +$dsql->Execute(); +while ($row = $dsql->GetObject()) { + $channelTables[] = $row->addtable; +} +$dsql->SetQuery("SHOW TABLES"); +$dsql->Execute('t'); +while ($row = $dsql->GetArray('t', MYSQL_BOTH)) { + if (preg_match("#^{$cfg_dbprefix}#", $row[0]) || in_array($row[0], $channelTables)) { + $dedeSysTables[] = $row[0]; + } else { + $otherTables[] = $row[0]; + } +} +$mysql_version = $dsql->GetVersion(); +include DedeInclude('templets/sys_data.htm'); + +function TjCount($tbname, &$dsql) +{ + $row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM $tbname"); + return $row['dd']; +} diff --git a/src/dede/sys_data_done.php b/src/admin/sys_data_done.php old mode 100755 new mode 100644 similarity index 80% rename from src/dede/sys_data_done.php rename to src/admin/sys_data_done.php index af7cdc28..605b905e --- a/src/dede/sys_data_done.php +++ b/src/admin/sys_data_done.php @@ -1,291 +1,265 @@ -$gotojs"; - -/*-------------------- -备份数据 -function __bak_data(); ---------------------*/ -if ($dopost == 'bak') { - if (empty($tablearr)) { - ShowMsg('您没选中任何表', 'javascript:;'); - exit(); - } - if (!is_dir($bkdir)) { - MkdirAll($bkdir, $cfg_dir_purview); - CloseFtp(); - } - - //初始化使用到的变量 - $tables = explode(',', $tablearr); - if (!isset($isstruct)) { - $isstruct = 0; - } - if (!isset($startpos)) { - $startpos = 0; - } - if (!isset($iszip)) { - $iszip = 0; - } - if (empty($nowtable)) { - $nowtable = ''; - } - if (empty($fsize)) { - $fsize = 2048; - } - $fsizeb = $fsize * 1024; - - //第一页的操作 - if ($nowtable == '') { - $tmsg = ''; - $dh = dir($bkdir); - while ($filename = $dh->read()) { - if (!preg_match("#txt$#", $filename)) { - continue; - } - $filename = $bkdir."/$filename"; - if (!is_dir($filename)) { - unlink($filename); - } - } - $dh->close(); - $tmsg .= "清除备份目录旧数据完成...
"; - - if ($isstruct == 1) { - $bkfile = $bkdir."/tables_struct_".substr(md5(time().mt_rand(1000, 5000).$cfg_cookie_encode), 0, 16).".txt"; - $mysql_version = $dsql->GetVersion(); - $fp = fopen($bkfile, "w"); - foreach ($tables as $t) { - fwrite($fp, "DROP TABLE IF EXISTS `$t`;\r\n\r\n"); - $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$t); - $dsql->Execute('me'); - $row = $dsql->GetArray('me', MYSQL_BOTH); - - // 去除AUTO_INCREMENT - $row[1] = preg_replace("#AUTO_INCREMENT=([0-9]{1,})[ \r\n\t]{1,}#i", "", $row[1]); - - $eng1 = "#ENGINE=MyISAM[ \r\n\t]{1,}DEFAULT[ \r\n\t]{1,}CHARSET=".$cfg_db_language."#i"; - $tableStruct = preg_replace($eng1, "TYPE=MyISAM", $row[1]); - - fwrite($fp, ''.$tableStruct.";\r\n\r\n"); - } - fclose($fp); - $tmsg .= "备份数据表结构信息完成...
"; - } - $tmsg .= "正在进行数据备份的初始化工作,请稍后..."; - $doneForm = "
- - - - - - - \r\n
\r\n{$dojs}\r\n"; - PutInfo($tmsg, $doneForm); - exit(); - } - //执行分页备份 - else { - $j = 0; - $fs = array(); - $bakStr = ''; - - //分析表里的字段信息 - $dsql->GetTableFields($nowtable); - $intable = "INSERT INTO `$nowtable` VALUES("; - while ($r = $dsql->GetFieldObject()) { - - $fs[$j] = trim($r->name); - $j++; - } - $fsd = $j - 1; - - //读取表的内容 - $dsql->SetQuery("SELECT * FROM `$nowtable` "); - $dsql->Execute(); - $m = 0; - $bakfilename = "$bkdir/{$nowtable}_{$startpos}_".substr(md5(time().mt_rand(1000, 5000).$cfg_cookie_encode), 0, 16).".txt"; - while ($row2 = $dsql->GetArray()) { - if ($m < $startpos) { - $m++; - continue; - } - - //检测数据是否达到规定大小 - if (strlen($bakStr) > $fsizeb) { - $fp = fopen($bakfilename, "w"); - fwrite($fp, $bakStr); - fclose($fp); - $tmsg = "完成到{$m}条记录的备份,继续备份{$nowtable}..."; - $doneForm = "
- - - - - - - \r\n
\r\n{$dojs}\r\n"; - PutInfo($tmsg, $doneForm); - exit(); - } - - //正常情况 - $line = $intable; - - for ($j = 0; $j <= $fsd; $j++) { - if ($j < $fsd) { - $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."',"; - } else { - $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."');\r\n"; - } - } - $m++; - $bakStr .= $line; - } - - //如果数据比卷设置值小 - if ($bakStr != '') { - $fp = fopen($bakfilename, "w"); - fwrite($fp, $bakStr); - fclose($fp); - } - for ($i = 0; $i < count($tables); $i++) { - if ($tables[$i] == $nowtable) { - if (isset($tables[$i + 1])) { - $nowtable = $tables[$i + 1]; - $startpos = 0; - break; - } else { - PutInfo("完成所有数据备份", ""); - exit(); - } - } - } - $tmsg = "完成到{$m}条记录的备份,继续备份{$nowtable}..."; - $doneForm = "
- - - - - \r\n
\r\n{$dojs}\r\n"; - PutInfo($tmsg, $doneForm); - exit(); - } - //分页备份代码结束 -} -/*------------------------- -还原数据 -function __re_data(); --------------------------*/ -else if ($dopost == 'redat') { - if ($bakfiles == '') { - ShowMsg('没指定任何要还原的文件!', 'javascript:;'); - exit(); - } - $bakfilesTmp = $bakfiles; - $bakfiles = explode(',', $bakfiles); - if (empty($structfile)) { - $structfile = ""; - } - if (empty($delfile)) { - $delfile = 0; - } - if (empty($startgo)) { - $startgo = 0; - } - if ($startgo == 0 && $structfile != '') { - $tbdata = ''; - $fp = fopen("$bkdir/$structfile", 'r'); - while (!feof($fp)) { - $tbdata .= fgets($fp, 1024); - } - fclose($fp); - $querys = explode(';', $tbdata); - foreach ($querys as $q) { - $q = preg_replace("#TYPE=MyISAM#i","ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language, $q); - $rs = $dsql->ExecuteNoneQuery(trim($q).';'); - } - if ($delfile == 1) { - @unlink("$bkdir/$structfile"); - } - $tmsg = "完成数据表信息还原,准备还原数据..."; - $doneForm = "
- - - -
\r\n{$dojs}\r\n"; - PutInfo($tmsg, $doneForm); - exit(); - } else { - $nowfile = $bakfiles[0]; - $bakfilesTmp = preg_replace("#".$nowfile."[,]{0,1}#", "", $bakfilesTmp); - $oknum = 0; - if (filesize("$bkdir/$nowfile") > 0) { - $fp = fopen("$bkdir/$nowfile", 'r'); - while (!feof($fp)) { - $line = trim(fgets($fp, 512 * 1024)); - if ($line == "") continue; - $rs = $dsql->ExecuteNoneQuery($line); - if ($rs) $oknum++; - } - fclose($fp); - } - if ($delfile == 1) { - @unlink("$bkdir/$nowfile"); - } - if ($bakfilesTmp == "") { - ShowMsg('成功还原所有的文件的数据!', 'javascript:;'); - exit(); - } - $tmsg = "成功还原{$nowfile}的{$oknum}条记录

正在准备还原其它数据..."; - $doneForm = "
- - - -
\r\n{$dojs}\r\n"; - PutInfo($tmsg, $doneForm); - exit(); - } -} - -function PutInfo($msg1, $msg2) -{ - global $cfg_soft_lang; - $msginfo = "\n - - - - DedeBIZ 提示信息 - \n\n\n
{$msg2}"; - echo $msginfo."\n\n"; -} - -function RpLine($str) -{ - $str = str_replace("\r", "\\r", $str); - $str = str_replace("\n", "\\n", $str); - return $str; -} +$gotojs"; +/*-------------------- +备份数据 +function __bak_data(); +--------------------*/ +if ($dopost == 'bak') { + if (empty($tablearr)) { + ShowMsg('您没选中数据表', 'javascript:;'); + exit(); + } + if (!is_dir($bkdir)) { + MkdirAll($bkdir, $cfg_dir_purview); + CloseFtp(); + } + //初始化使用到的变量 + $tables = explode(',', $tablearr); + if (!isset($isstruct)) { + $isstruct = 0; + } + if (!isset($startpos)) { + $startpos = 0; + } + if (!isset($iszip)) { + $iszip = 0; + } + if (empty($nowtable)) { + $nowtable = ''; + } + if (empty($fsize)) { + $fsize = 2048; + } + $fsizeb = $fsize * 1024; + //第一页的操作 + if ($nowtable == '') { + $tmsg = ''; + $dh = dir($bkdir); + while ($filename = $dh->read()) { + if (!preg_match("#txt$#", $filename)) { + continue; + } + $filename = $bkdir."/$filename"; + if (!is_dir($filename)) { + unlink($filename); + } + } + $dh->close(); + $tmsg .= "清除备份目录旧数据完成"; + if ($isstruct == 1) { + $bkfile = $bkdir."/tables_struct_".substr(md5(time().mt_rand(1000, 5000).$cfg_cookie_encode), 0, 16).".txt"; + $mysql_version = $dsql->GetVersion(); + $fp = fopen($bkfile, "w"); + foreach ($tables as $t) { + fwrite($fp, "DROP TABLE IF EXISTS `$t`;\r\n\r\n"); + $dsql->SetQuery("SHOW CREATE TABLE ".$dsql->dbName.".".$t); + $dsql->Execute('me'); + $row = $dsql->GetArray('me', MYSQL_BOTH); + //去除AUTO_INCREMENT + $row[1] = preg_replace("#AUTO_INCREMENT=([0-9]{1,})[ \r\n\t]{1,}#i", "", $row[1]); + $eng1 = "#ENGINE=MyISAM[ \r\n\t]{1,}DEFAULT[ \r\n\t]{1,}CHARSET=".$cfg_db_language."#i"; + $tableStruct = preg_replace($eng1, "TYPE=MyISAM", $row[1]); + fwrite($fp, ''.$tableStruct.";\r\n\r\n"); + } + fclose($fp); + $tmsg .= "备份数据表结构信息完成"; + } + $tmsg .= "正在进行数据备份初始化工作,请稍后"; + $doneForm = "
+ + + + + + + \r\n
\r\n{$dojs}\r\n"; + PutInfo($tmsg, $doneForm); + exit(); + } + //执行分页备份 + else { + $j = 0; + $fs = array(); + $bakStr = ''; + //分析表里的字段信息 + $dsql->GetTableFields($nowtable); + $intable = "INSERT INTO `$nowtable` VALUES("; + while ($r = $dsql->GetFieldObject()) { + + $fs[$j] = trim($r->name); + $j++; + } + $fsd = $j - 1; + //读取表的内容 + $dsql->SetQuery("SELECT * FROM `$nowtable` "); + $dsql->Execute(); + $m = 0; + $bakfilename = "$bkdir/{$nowtable}_{$startpos}_".substr(md5(time().mt_rand(1000, 5000).$cfg_cookie_encode), 0, 16).".txt"; + while ($row2 = $dsql->GetArray()) { + if ($m < $startpos) { + $m++; + continue; + } + //检测数据是否达到规定大小 + if (strlen($bakStr) > $fsizeb) { + $fp = fopen($bakfilename, "w"); + fwrite($fp, $bakStr); + fclose($fp); + $tmsg = "完成到{$m}条数据备份,继续备份{$nowtable}"; + $doneForm = "
+ + + + + + + \r\n
\r\n{$dojs}\r\n"; + PutInfo($tmsg, $doneForm); + exit(); + } + //正常情况 + $line = $intable; + for ($j = 0; $j <= $fsd; $j++) { + if ($j < $fsd) { + $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."',"; + } else { + $line .= "'".RpLine(addslashes($row2[$fs[$j]]))."');\r\n"; + } + } + $m++; + $bakStr .= $line; + } + //如果数据比卷设置值小 + if ($bakStr != '') { + $fp = fopen($bakfilename, "w"); + fwrite($fp, $bakStr); + fclose($fp); + } + for ($i = 0; $i < count($tables); $i++) { + if ($tables[$i] == $nowtable) { + if (isset($tables[$i + 1])) { + $nowtable = $tables[$i + 1]; + $startpos = 0; + break; + } else { + PutInfo("完成所有数据备份", ""); + exit(); + } + } + } + $tmsg = "完成到{$m}条数据备份,继续备份{$nowtable}"; + $doneForm = "
+ + + + + \r\n
\r\n{$dojs}\r\n"; + PutInfo($tmsg, $doneForm); + exit(); + } + //分页备份代码结束 +} +/*------------------------- +还原数据 +function __re_data(); +-------------------------*/ +else if ($dopost == 'redat') { + if ($bakfiles == '') { + ShowMsg('没指定任何要还原数据', 'javascript:;'); + exit(); + } + $bakfilesTmp = $bakfiles; + $bakfiles = explode(',', $bakfiles); + if (empty($structfile)) { + $structfile = ""; + } + if (empty($delfile)) { + $delfile = 0; + } + if (empty($startgo)) { + $startgo = 0; + } + if ($startgo == 0 && $structfile != '') { + $tbdata = ''; + $fp = fopen("$bkdir/$structfile", 'r'); + while (!feof($fp)) { + $tbdata .= fgets($fp, 1024); + } + fclose($fp); + $querys = explode(';', $tbdata); + foreach ($querys as $q) { + $q = preg_replace("#TYPE=MyISAM#i","ENGINE=MyISAM DEFAULT CHARSET=".$cfg_db_language, $q); + $rs = $dsql->ExecuteNoneQuery(trim($q).';'); + } + if ($delfile == 1) { + @unlink("$bkdir/$structfile"); + } + $tmsg = "完成数据表还原,继续还原数据"; + $doneForm = "
+ + + +
\r\n{$dojs}\r\n"; + PutInfo($tmsg, $doneForm); + exit(); + } else { + $nowfile = $bakfiles[0]; + $bakfilesTmp = preg_replace("#".$nowfile."[,]{0,1}#", "", $bakfilesTmp); + $oknum = 0; + if (filesize("$bkdir/$nowfile") > 0) { + $fp = fopen("$bkdir/$nowfile", 'r'); + while (!feof($fp)) { + $line = trim(fgets($fp, 512 * 1024)); + if ($line == "") continue; + $rs = $dsql->ExecuteNoneQuery($line); + if ($rs) $oknum++; + } + fclose($fp); + } + if ($delfile == 1) { + @unlink("$bkdir/$nowfile"); + } + if ($bakfilesTmp == "") { + ShowMsg('成功还原所有的文件数据', 'javascript:;'); + exit(); + } + $tmsg = "成功还原{$nowfile}文件{$oknum}条数据,正在继续还原其它数据"; + $doneForm = "
+ + + +
\r\n{$dojs}\r\n"; + PutInfo($tmsg, $doneForm); + exit(); + } +} +function PutInfo($msg1, $msg2) +{ + global $cfg_soft_lang; + $msginfo = "提示信息
{$msg2}"; + echo $msginfo.""; +} +function RpLine($str) +{ + $str = str_replace("\r", "\\r", $str); + $str = str_replace("\n", "\\n", $str); + return $str; +} \ No newline at end of file diff --git a/src/dede/sys_data_replace.php b/src/admin/sys_data_replace.php old mode 100755 new mode 100644 similarity index 93% rename from src/dede/sys_data_replace.php rename to src/admin/sys_data_replace.php index ea5b3fe1..ba18c84f --- a/src/dede/sys_data_replace.php +++ b/src/admin/sys_data_replace.php @@ -1,88 +1,89 @@ -GetTableFields($exptable); - echo "
"; - echo "表(".$exptable.")含有的字段:
"; - while ($row = $dsql->GetFieldObject()) { - echo "name}')\">".$row->name."\r\n"; - } - echo "
"; - exit(); -} -/*------------------------------- -//保存用户设置,清空会员数据 -function __Apply() ---------------------------------*/ else if ($action == 'apply') { - $validate = empty($validate) ? '' : strtolower($validate); - $svali = GetCkVdValue(); - if ($validate == "" || $validate != $svali) { - ShowMsg("安全确认码不正确!", "javascript:;"); - exit(); - } - if ($exptable == '' || $rpfield == '') { - ShowMsg("请指定数据表和字段", "javascript:;"); - exit(); - } - if ($rpstring == '') { - ShowMsg("请指定被替换内容", "javascript:;"); - exit(); - } - if ($rptype == 'replace') { - $condition = empty($condition) ? '' : " WHERE $condition "; - $rs = $dsql->ExecuteNoneQuery("UPDATE $exptable SET $rpfield=REPLACE($rpfield,'$rpstring','$tostring') $condition "); - $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$exptable`"); - if ($rs) { - ShowMsg("成功完成数据替换", "javascript:;"); - exit(); - } else { - ShowMsg("数据替换失败", "javascript:;"); - exit(); - } - } else { - $condition = empty($condition) ? '' : " And $condition "; - $rpstring = stripslashes($rpstring); - $rpstring2 = str_replace("\\", "\\\\", $rpstring); - $rpstring2 = str_replace("'", "\\'", $rpstring2); - $dsql->SetQuery("SELECT $keyfield,$rpfield FROM $exptable WHERE $rpfield REGEXP '$rpstring2' $condition "); - $dsql->Execute(); - $tt = $dsql->GetTotalRow(); - if ($tt == 0) { - ShowMsg("根据您指定的正则,找不到任何东西", "javascript:;"); - exit(); - } - $oo = 0; - while ($row = $dsql->GetArray()) { - $kid = $row[$keyfield]; - $rpf = preg_replace("#".$rpstring."#i", $tostring, $row[$rpfield]); - $rs = $dsql->ExecuteNoneQuery("UPDATE $exptable SET $rpfield='$rpf' WHERE $keyfield='$kid' "); - if ($rs) { - $oo++; - } - } - $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$exptable`"); - ShowMsg("共找到 $tt 条记录,成功替换了 $oo 条", "javascript:;"); - exit(); - } -} +GetTableFields($exptable); + echo "
"; + echo "表(".$exptable.")含有的字段:
"; + while ($row = $dsql->GetFieldObject()) { + echo "name}')\">".$row->name."\r\n"; + } + echo "
"; + exit(); +} +/*------------------------------- +//保存用户设置,清空会员数据 +function __Apply() +--------------------------------*/ +else if ($action == 'apply') { + $validate = empty($validate) ? '' : strtolower($validate); + $svali = GetCkVdValue(); + if ($validate == "" || $validate != $svali) { + ShowMsg("安全确认码不正确!", "javascript:;"); + exit(); + } + if ($exptable == '' || $rpfield == '') { + ShowMsg("请指定数据表和字段", "javascript:;"); + exit(); + } + if ($rpstring == '') { + ShowMsg("请指定被替换内容", "javascript:;"); + exit(); + } + if ($rptype == 'replace') { + $condition = empty($condition) ? '' : " WHERE $condition "; + $rs = $dsql->ExecuteNoneQuery("UPDATE $exptable SET $rpfield=REPLACE($rpfield,'$rpstring','$tostring') $condition "); + $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$exptable`"); + if ($rs) { + ShowMsg("成功完成数据替换", "javascript:;"); + exit(); + } else { + ShowMsg("数据替换失败", "javascript:;"); + exit(); + } + } else { + $condition = empty($condition) ? '' : " And $condition "; + $rpstring = stripslashes($rpstring); + $rpstring2 = str_replace("\\", "\\\\", $rpstring); + $rpstring2 = str_replace("'", "\\'", $rpstring2); + $dsql->SetQuery("SELECT $keyfield,$rpfield FROM $exptable WHERE $rpfield REGEXP '$rpstring2' $condition "); + $dsql->Execute(); + $tt = $dsql->GetTotalRow(); + if ($tt == 0) { + ShowMsg("根据您指定的正则,找不到任何东西", "javascript:;"); + exit(); + } + $oo = 0; + while ($row = $dsql->GetArray()) { + $kid = $row[$keyfield]; + $rpf = preg_replace("#".$rpstring."#i", $tostring, $row[$rpfield]); + $rs = $dsql->ExecuteNoneQuery("UPDATE $exptable SET $rpfield='$rpf' WHERE $keyfield='$kid' "); + if ($rs) { + $oo++; + } + } + $dsql->ExecuteNoneQuery("OPTIMIZE TABLE `$exptable`"); + ShowMsg("共找到 $tt 条记录,成功替换了 $oo 条", "javascript:;"); + exit(); + } +} diff --git a/src/dede/sys_data_revert.php b/src/admin/sys_data_revert.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/sys_data_revert.php rename to src/admin/sys_data_revert.php index fafff775..5021e3b0 --- a/src/dede/sys_data_revert.php +++ b/src/admin/sys_data_revert.php @@ -1,27 +1,26 @@ -read()) !== false) { - if (!preg_match("#txt$#", $filename)) { - continue; - } - if (preg_match("#tables_struct#", $filename)) { - $structfile = $filename; - } else if (filesize("$bkdir/$filename") > 0) { - $filelists[] = $filename; - } -} -$dh->close(); -include DedeInclude('templets/sys_data_revert.htm'); +read()) !== false) { + if (!preg_match("#txt$#", $filename)) { + continue; + } + if (preg_match("#tables_struct#", $filename)) { + $structfile = $filename; + } else if (filesize("$bkdir/$filename") > 0) { + $filelists[] = $filename; + } +} +$dh->close(); +include DedeInclude('templets/sys_data_revert.htm'); diff --git a/src/dede/sys_group.php b/src/admin/sys_group.php old mode 100755 new mode 100644 similarity index 96% rename from src/dede/sys_group.php rename to src/admin/sys_group.php index cb1666b0..cc08d9f2 --- a/src/dede/sys_group.php +++ b/src/admin/sys_group.php @@ -1,15 +1,14 @@ -GetOne("SELECT * FROM #@__admintype WHERE rank='".$rankid."'"); - if (is_array($row)) { - ShowMsg('您所创建的组别的级别值已存在,不允许重复!', '-1'); - exit(); - } - if ($rankid > 10) { - ShowMsg('组级别值不能大于10, 否则一切权限设置均无效!', '-1'); - exit(); - } - $AllPurviews = ''; - if (is_array($purviews)) { - foreach ($purviews as $pur) { - $AllPurviews = $pur.' '; - } - $AllPurviews = trim($AllPurviews); - } - $dsql->ExecuteNoneQuery("INSERT INTO #@__admintype(rank,typename,system,purviews) VALUES ('$rankid','$groupname', 0, '$AllPurviews');"); - ShowMsg("成功创建一个新的用户组!", "sys_group.php"); - exit(); -} -include DedeInclude('templets/sys_group_add.htm'); +GetOne("SELECT * FROM `#@__admintype` WHERE `rank`='".$rankid."'"); + if (is_array($row)) { + ShowMsg('您所创建的组别的级别值已存在,不允许重复!', '-1'); + exit(); + } + if ($rankid > 10) { + ShowMsg('组级别值不能大于10, 否则一切权限设置均无效!', '-1'); + exit(); + } + $AllPurviews = ''; + if (is_array($purviews)) { + foreach ($purviews as $pur) { + $AllPurviews = $pur.' '; + } + $AllPurviews = trim($AllPurviews); + } + $dsql->ExecuteNoneQuery("INSERT INTO `#@__admintype`(`rank`,typename,`system`,purviews) VALUES ('$rankid','$groupname', 0, '$AllPurviews');"); + ShowMsg("成功创建一个新的用户组!", "sys_group.php"); + exit(); +} +include DedeInclude('templets/sys_group_add.htm'); diff --git a/src/dede/sys_group_edit.php b/src/admin/sys_group_edit.php old mode 100755 new mode 100644 similarity index 85% rename from src/dede/sys_group_edit.php rename to src/admin/sys_group_edit.php index 86cfb1f3..1fa8f760 --- a/src/dede/sys_group_edit.php +++ b/src/admin/sys_group_edit.php @@ -1,46 +1,43 @@ -ExecuteNoneQuery("UPDATE `#@__admintype` SET typename='$typename',purviews='$purview' WHERE CONCAT(`rank`)='$rank'"); - ShowMsg('成功更改用户组的权限!', 'sys_group.php'); - exit(); -} else if ($dopost == 'del') { - $dsql->ExecuteNoneQuery("DELETE FROM `#@__admintype` WHERE CONCAT(`rank`)='$rank' AND system='0';"); - ShowMsg("成功删除一个用户组!", "sys_group.php"); - exit(); -} -$groupRanks = array(); -$groupSet = $dsql->GetOne("SELECT * FROM `#@__admintype` WHERE CONCAT(`rank`)='{$rank}' "); -$groupRanks = explode(' ', $groupSet['purviews']); -include DedeInclude('templets/sys_group_edit.htm'); - -//检查是否已经有此权限 -function CRank($n) -{ - global $groupRanks; - return in_array($n, $groupRanks) ? ' checked' : ''; -} +ExecuteNoneQuery("UPDATE `#@__admintype` SET typename='$typename',purviews='$purview' WHERE CONCAT(`rank`)='$rank'"); + ShowMsg('成功修改用户组的权限!', 'sys_group.php'); + exit(); +} else if ($dopost == 'del') { + $dsql->ExecuteNoneQuery("DELETE FROM `#@__admintype` WHERE CONCAT(`rank`)='$rank' AND `system`='0';"); + ShowMsg("成功删除一个用户组!", "sys_group.php"); + exit(); +} +$groupRanks = array(); +$groupSet = $dsql->GetOne("SELECT * FROM `#@__admintype` WHERE CONCAT(`rank`)='{$rank}' "); +$groupRanks = explode(' ', $groupSet['purviews']); +include DedeInclude('templets/sys_group_edit.htm'); +//检查是否已经有此权限 +function CRank($n) +{ + global $groupRanks; + return in_array($n, $groupRanks) ? ' checked' : ''; +} \ No newline at end of file diff --git a/src/dede/sys_info.php b/src/admin/sys_info.php old mode 100755 new mode 100644 similarity index 90% rename from src/dede/sys_info.php rename to src/admin/sys_info.php index 8e54f029..73233f0c --- a/src/dede/sys_info.php +++ b/src/admin/sys_info.php @@ -1,5 +1,4 @@ Esc($v); + $k = $dsql->Esc($k); $dsql->ExecuteNoneQuery("UPDATE `#@__sysconfig` SET `value`='$v' WHERE varname='$k' "); } ReWriteConfig(); - ShowMsg("成功更改站点配置", "sys_info.php"); + ShowMsg("成功修改站点配置", "sys_info.php"); exit(); } //增加新变量 @@ -90,14 +93,14 @@ else if ($dopost == 'add') { exit(); } } -// 搜索配置 +//搜索配置 else if ($dopost == 'search') { $keywords = isset($keywords) ? strip_tags($keywords) : ''; $i = 1; $configstr = << - + 参数说明 参数值 变量名 @@ -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 = "\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 = "\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 = " - - - - -
- 完成所有修复操作,移除错误记录 {$errnum} 条 -
-
- 完成修正或无错误返回>> -
- "; - $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 = " + + + + +
+ 完成所有修复操作,移除错误记录 {$errnum} 条 +
+
+ 完成修正或无错误返回>> +
+ "; + $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 .= "
-
可疑文件:{$trfile}
- 更改记录 - 删除 - 查看源码 -

\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 .= "
+
可疑文件:{$trfile}
+ 修改记录 + 删除 + 查看源码 +

\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 @@ - - - - - 操作搜索 - - - - - - - - - - - - - - - - - - - -
当前位置 > 搜索结果
""的搜索结果
- - - - - - - - -
=> -
- - - - - - -
' - target="main">
-
-
- -
 
- - - - - + + + + + 操作搜索 + + + + + + + + + + + + + + + + + + +
当前位置 > 搜索结果
""的搜索结果
+ + + + + + + + +
=>
+ + + + + + +

+
+ +
+ + + + \ 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")); }); - }) -
- + - -
广告管理 >> 增加广告位置 广告管理 >> 增加广告位置
- - - + + - + - + - + - + - + - - + - + @@ -272,5 +262,4 @@ })(jQuery); - \ No newline at end of file diff --git a/src/dede/templets/ad_edit.htm b/src/admin/templets/ad_edit.htm old mode 100755 new mode 100644 similarity index 77% rename from src/dede/templets/ad_edit.htm rename to src/admin/templets/ad_edit.htm index d1e36689..6c418fc5 --- a/src/dede/templets/ad_edit.htm +++ b/src/admin/templets/ad_edit.htm @@ -2,10 +2,10 @@ - 更改广告 + 修改广告 - - + + @@ -19,7 +19,7 @@ "linkedCalendars": false, "timePicker": true, "timePicker24Hour": true, - // "timePickerSeconds": true, + //"timePickerSeconds": true, "showCustomRangeLabel": false, ranges: { '今日': [moment(), moment()], @@ -43,12 +43,10 @@ }) -
广告代码的调用方法:{dede:myad name='广告位标识'/} 广告代码的调用方法:{dede:myad name='广告位标识'/}
广告位标识:广告位标识: (使用英文或数字表示的简洁标识)
广告分类:广告分类:
广告投放范围:广告投放范围: GetOptionArray(0,0,0); @@ -123,21 +114,20 @@ (如果在所选栏目找不到指定标识的广告内容,系统会自动搜索父栏目)
广告位名称:广告位名称:
时间限制: + 时间限制: - +
投放时间:投放时间: 从 - +
- + - + - + - + - - + + - + - + + - - + @@ -130,5 +121,4 @@
 广告管理 >> 更改广告  广告管理 >> 修改广告
@@ -56,22 +54,20 @@ - +
广告位标识:广告位标识:
广告分类:广告分类:
广告投放范围:广告投放范围: GetOptionArray($row['typeid'],0,0); @@ -84,12 +80,11 @@ (如果在所选栏目找不到指定标识的广告内容,系统会自动搜索父栏目)
广告位名称:广告位名称:
时间限制:时间限制:
投放时间:投放时间: 从 - + 到 -
正常显示内容: +  
过期显示内容:  
- \ No newline at end of file diff --git a/src/dede/templets/ad_main.htm b/src/admin/templets/ad_main.htm old mode 100755 new mode 100644 similarity index 77% rename from src/dede/templets/ad_main.htm rename to src/admin/templets/ad_main.htm index 4d1e0bb1..0c85544c --- a/src/dede/templets/ad_main.htm +++ b/src/admin/templets/ad_main.htm @@ -1,86 +1,82 @@ -{dede:config.pagesize value='20' /} - - - - - 广告管理 - - - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - -
- 广告管理  增加一个新广告 - 广告分类管理
- - - - - - - -
- - - - - - - - -
请选择分类: 关键字: - -
-
-
编号分类广告名称投放范围是否限时结束时间管理
{dede:field.aid /}{dede:field.clsname function='TestType(@me,1)'/}{dede:field.adname /}{dede:field.typename function='TestType(@me)'/}{dede:field.timeset function='TimeSetValue(@me)'/}{dede:field.endtime function='GetDateMk(@me)'/} - 代码 - 更改 - 删除 -
- {dede:pagelist listsize=5/} -
-
- - +{dede:config.pagesize value='20' /} + + + + + 广告管理 + + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + +
+ 广告管理  增加一个新广告 + 广告分类管理
+ + + + + + + +
+ + + + + + + + +
请选择分类: 关键词: + +
+
+
编号分类广告名称投放范围是否限时结束时间管理
{dede:field.aid /}{dede:field.clsname function='TestType(@me,1)'/}{dede:field.adname /}{dede:field.typename function='TestType(@me)'/}{dede:field.timeset function='TimeSetValue(@me)'/}{dede:field.endtime function='GetDateMk(@me)'/} + 代码 + 修改 + 删除 +
+ {dede:pagelist listsize=5/} +
+ + + + \ No newline at end of file diff --git a/src/dede/templets/adtype_main.htm b/src/admin/templets/adtype_main.htm old mode 100755 new mode 100644 similarity index 66% rename from src/dede/templets/adtype_main.htm rename to src/admin/templets/adtype_main.htm index 4c425546..971cf884 --- a/src/dede/templets/adtype_main.htm +++ b/src/admin/templets/adtype_main.htm @@ -1,51 +1,51 @@ - - - - -广告分类管理 - - - - - - - - - - - - - - SetQuery("Select * From #@__myadtype"); - $dsql->Execute(); - $k=0; - while($row = $dsql->GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - - - - -
广告分类管理 [广告管理]
类型ID广告分类状态
id; ?> - 保留
新增一个广告类型:
- 新增
- + + + + +广告分类管理 + + + + + + + + + + + + + + SetQuery("Select * From #@__myadtype"); + $dsql->Execute(); + $k=0; + while($row = $dsql->GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + + + + +
广告分类管理 [广告管理]
类型ID广告分类状态
id; ?> + 保留
新增一个广告类型:
+ 新增
+ \ No newline at end of file diff --git a/src/dede/templets/album_add.htm b/src/admin/templets/album_add.htm old mode 100755 new mode 100644 similarity index 54% rename from src/dede/templets/album_add.htm rename to src/admin/templets/album_add.htm index 9a5c370f..aeb86e82 --- a/src/dede/templets/album_add.htm +++ b/src/admin/templets/album_add.htm @@ -1,563 +1,502 @@ - - - - - 增加图片集 - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - -
 图集列表 - >> 发布新图集栏目管理 
- - - - -
- - - - - -
 常规内容 高级参数 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 图集标题:  简略标题:
-
- - - - - -
 自定义属性:SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') - echo " "; - else - echo " "; - } - ?> -
-
- - - - - - - -
 Tag标签: - (','号分开,单个标签小于12字节) - 权重:(越小越靠前)
-
- - - - - - -
 缩 略 图: - - - - -
- - - - - - 选择图片 - - - -
- -
-
- -
-
- - - - - -
 图集主栏目: - - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -   - 选择副栏目"; - } - ?> -
-
 图集选项:
- - - - - -
 表现方式: - -    - -    - -
-
- - - - - -
 上传方式: - - - -
-
- - - - - -
 手工上传: - - - 选择本地图片(支持多选) - - -
-
- - - - -
-
-
-
-
- - - - - -
 图集内容:
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
  - - - - - -
- - - -
-
-
-
- - - + + + + + 增加图片集 + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + +
 图集列表 >> 发布图集栏目管理
+ + + + +
+ + + + + +
常规内容高级参数
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 图集标题:  简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') + echo " "; + else + echo " "; + } + ?> +
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + + +
+
+
+ + + + + +
 图集主栏目: + + getUserChannel(),$channelid); + 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 @@ - - - - -修改图片集 - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
 &dopost=listArchives">图集列表 >> 更改图集栏目管理 
- - - - -
- - - - -
 常规内容 图集图片 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
 图集标题: 简略标题:
- - - - -
 自定义属性:SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; - else $jumpclick = ''; - if(preg_match("#".$trow->att."#", $arcRow['flag'])) - echo " "; - else - echo " "; - } - ?>
- - - - -
 跳转网址:" />
- - - - - - -
 Tag标签: - (','号分开,单个标签小于12字节) 权重: - (越小越靠前)
- - - - - -
 缩 略 图:
"> - - - - 选择图片 - - - " - style="height: 80px">
- - - - - - -
 图片来源:">作者:">
- - - - -
 图集主栏目:getUserChannel(),$channelid); - echo "'; - ?> - 快捷选择 -
- - - - -
 图集副栏目: - ' style='width:200px;' /> - 选择副栏目
- - - - -
 图集内容:
 高级属性:
- - - - - - - - -
-  评论选项: - - -   - 浏览次数:' style='width:100px;' />
-
- - - - - - -
 文档排序:标题颜色:"> -
- - - - - - -
 阅读权限:发布选项: -
- - - - - - -
 发布时间:"; - ?> - 消费金币:" size="10">
- - - - -
 关键字:" />
- - - - -
 图集内容摘要:
- - - - - -
 自定义文件名:" /> - (不包括后缀名如.html等) 
- - - - - - - - - '> - - - '> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
  - - - - -
-
- - + + + + +修改图片集 + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
 图集列表 >> 修改图集栏目管理
+ + + + +
+ + + + + +
常规内容图集图片
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + +
 图集标题: 简略标题:
+ + + + +
 自定义属性: + SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; + else $jumpclick = ''; + if(preg_match("#".$trow->att."#", $arcRow['flag'])) + echo " "; + else + echo " "; + } + ?>
+ + + + + +
 跳转网址:">
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + 上传图片 + + +
+ + + + + + +
 图片来源:">作者:">
+
+ + + + +
 图集主栏目:getUserChannel(),$channelid); + echo "'; + ?> + 快捷选择 +
+
+ + + + +
 图集副栏目: + ' style='width:200px;' /> + 选择副栏目 +
+
+ + + + +
 图集内容:
+
 高级属性:
+ + + + + + + +
 评论选项: + +   + 浏览次数:' style='width:100px;' />
+
+ + + + + + +
 文档排序:标题颜色: + "> + +
+
+ + + + + + +
 阅读权限:发布选项: +
+
+ + + + + + + +
 发布时间:"; + ?> + 消费金币:" size="10">
+
+ + + + + +
 关键词:">
+
+ + + + + +
 内容摘要:
+
+ + + + + + +
 自定义文件名:">(不包括后缀名如.html等)
+
+ + + + + + + + + '> + + + '> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + \ 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 - { - ?> - - - - - - - - - - - - - -
- - - - - - - -
  - -  简略标题: - -
-
- - - - - -
 自定义属性: - SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') - echo ""; - else - echo " "; - } - ?> -
-
- - - - - - - -
 Tag标签: - (','号分开,单个标签小于12字节) - 权重:(越小越靠前)
-
- - - - - - -
 缩 略 图: - - - - -
- - - - - - 选择图片 - - - -
-
- - -
-
- - - - - -
 文档主栏目: - - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -   - 选择副栏目"; - } - ?> -
-
- - - - - -
 附加选项: - - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
  - - - - - -
- - - -
-
-
-
- - + + + + + 增加商品 + + + + + + + + + + + + + + + + + + + + + + +
 文档列表 >> 发布商品栏目管理
+ + + + +
+ + + + + + +
常规信息高级参数 
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + '> + + + 0) + { + echo "\r\n"; + echo "\r\n"; + } else { + ?> + + + + + + + + + + + + + +
+ + + + + + + +
  简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') + echo ""; + else + echo " "; + } + ?> +
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + +
+
+
+ + + + + +
 文档主栏目: + + getUserChannel(),$channelid); + 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 + { + ?> + + + + + + + + + + + + + + +
+ + + + + + + +
   简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; + else $jumpclick = ''; + if(preg_match("#".$trow->att."#", $arcRow['flag'])) + echo " "; + else + echo " "; + } + ?> +
+
+ + + + + +
 跳转网址:
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + 上传图片 + + + + +
+
+ + + + + +
 文档主栏目: + getUserChannel(),$channelid); + echo ""; + ?> + 快捷选择 +
+
+ + + + + +
 文档副栏目: + + ' style='width:200px;' /> + 选择副栏目 +
+
+ +
+ + + + + +
 附加选项: + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + \ 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 @@ + + + + +增加分类 + + + + + + + + + + + + + + + + + + + + + + +
 文档列表 >> 发布分类栏目管理
+ + + + +
+ + + + + + +
常规信息
+
+
+ + + + + + + + + + + + + + + + + + 0) + { + echo "\r\n"; + } else { + ?> + + + + + + + +
+ + + + + +
 
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` where att<>'j' And att<>'p' order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + echo " "; + } + ?> +
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + +
+
+
+ + + + + + + +
 浏览权限: + +
+
+ + + + + +
 文档主栏目: + + getUserChannel(),$channelid); + 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 @@ + + + + +修改分类 + + + + + + + + + + + + + + + + + + + + + + +
 文档列表 >> 修改分类  栏目管理
+ + + + +
+ + + + + +
常规信息
+
+
+ + + + + + + + + + + + + + + + '> + + + 0) + { + echo "\r\n"; + } else { + ?> + + + + + + + +
+ + + + + +
 
+
+ + + + + +
 自定义属性: + SetQuery("SELECT * FROM `#@__arcatt` WHERE att<>'j' AND att<>'p' ORDER BY sortid ASC"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if(preg_match("#".$trow->att."#", $addRow['flag'])) + echo " "; + else + echo " "; + } + ?> +
+ + + + + + + +
 浏览权限: +
+
+ + + + + + +
 缩略图: + + + 上传图片 + + +
+
+ + + + +
 文档主栏目: + getUserChannel(),$channelid); + 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 @@ - - - - -增加文章 - - - - - - - - - - - - - - - - - - - - - - - -
文章列表 >> 发布文章栏目管理
- - - - -
- - - - - -
常规信息单页采集
-
- - - - - - - - -
- - - - - - -
采集单个网页: - - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
文章标题:简略标题:
-
- - - - - -
自定义属性: - SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') - echo " "; - else - echo " "; - } - ?> -
-
- - - - - - - -
Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
-
- - - - - - -
缩略图: - - - - -
- - - - - - 选择图片 - - - -
-
-
- - - - - - - -
文章来源: - - - 作者: - - -
-
- - - - - -
文章主栏目: - - getUserChannel(),$channelid); - echo ""; - ?> - - 快捷选择 - 选择副栏目"; - } - ?> -
-
- - - - - - -
关键字: - - - -
-
-
- - - - - - -
内容摘要:
-
-
文章内容:
-
-
-
- - - - - -
附加选项: - - - [设置] - - -
-
- - - - - -
分页方式: - - - 大小: K(分页符为:#p#分页标题#e#) -
-
- -
- - - - - -
- - - - -
高级参数↑
-
- - - - - - - - - - - - - - - - -
- - - - - - - -
评论选项: - - - 浏览次数: - -
-
- - - - - - - -
文章排序: - 标题颜色: - - -
-
- - - - - - - -
阅读权限: 消费金币:
-
- - - - - - - -
发布时间: - "; - ?> - 发布选项: - - -
-
- - - - - - -
自定义文件名:(不包括后缀名如.html等) - - 随机选择模板: - - "; - } - ?> -
-
- - - - -
- - -
-
- - - + + + + +增加文章 + + + + + + + + + + + + + + + + + + + + + + + +
文章列表 >> 发布文章栏目管理
+ + + + +
+ + + + + +
常规信息单页采集
+
+ + + + + + + + +
+ + + + + + +
采集单个网页: + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 文章标题: 简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') + echo " "; + else + echo " "; + } + ?> +
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + +
+
+
+ + + + + + + +
 文章来源: + + +  作者: + + +
+
+ + + + + +
 文章主栏目: + + getUserChannel(),$channelid); + echo ""; + ?> + + 快捷选择 + 选择副栏目"; + } + ?> +
+
+ + + + + + +
 关键词: + + + +
+
+
+ + + + + + +
 内容摘要:
+
+
文章内容:
+
+
+
+ + + + + +
 附加选项: + + + 设置  + + +
+
+ + + + + +
 分页方式: + + + 大小: K(分页符为:#p#分页标题#e#) +
+
+ +
+ + + + + +
+ + + + +
高级参数
+
+ + + + + + + + + + + + + + + + +
+ + + + + + + +
 评论选项: + + + 浏览次数: + +
+
+ + + + + + + +
 文章排序: + 标题颜色: + + +
+
+ + + + + + + +
 阅读权限: 消费金币:
+
+ + + + + + + +
 发布时间: + "; + ?> +  发布选项: + + +
+
+ + + + + + +
 自定义文件名:(不包括后缀名如.html等) + + 随机选择模板: + + "; + } + ?> +
+
+ + + + +
+ + +
+
+ + + \ 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 @@ - - - - - - 单页采集规则管理 - - - - - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - {/dede:datalist} - - - - - - - -
-
单页采集规则管理:
- -
ID选择网址编码网站名称操作
- - - 编辑 - 删除 -
-   - 全选 - 取消 -  删除  -
- {dede:pagelist listsize=5/} -
- -
- 请稍候,正在载入... -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
网站名称:
原内容编码: - - -
用作文章来源: - -
网站网址:
 使用不带http及任何附加目录的网址
- 如:news.dedebiz.com
采集规则:仅针对文章内容,格式:前面HTML{@body}后面HMTL
 
  -
-
-
- - - + + + + + 单页采集规则管理 + + + + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + {/dede:datalist} + + + + + + + +
+
单页采集规则管理:
+ +
ID选择网址编码网站名称操作
+ + + 编辑 + 删除 +
+   + 全选 + 取消 +  删除  +
+ {dede:pagelist listsize=5/} +
+ +
+ 请稍候,正在载入 +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
网站名称:
原内容编码: + + +
用作文章来源: + +
网站网址:
 使用不带http及任何附加目录的网址
+ 如:news.dedebiz.com
采集规则:仅针对文章内容,格式:前面HTML{@body}后面HMTL
 
  +
+
+
+ + \ 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错误,请小心使用此功能)。
- - - - - - - - - - - - - - - - - - - - - -
频道ID: - - (可在“频道模型管理”处获得)摘要大小: - - (最大250字节)
数据表: - - 分析字段: -
最小值: - - (字节,内容大于该值才分析)每批处理: - - 条记录
开始ID: - - 结束ID: -  
操 作: - -  (自动分页大小: - - K,修改系统参数
-
- -
- - - - - -
结果: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 文档自动摘要自动分页 + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
文档自动摘要自动分页: 
+
用于自动更新您系统没有填写摘要的文档的摘要信息或更新没分页的文档的自动分页标识(文档使用了自动分页后会降低HTML生成速度,并且在没人工干扰的情况下可能导致分页内容的HTML错误,请小心使用此功能)
+ + + + + + + + + + + + + + + + + + + + + +
频道ID:(可在“频道模型管理”处获得)摘要大小:(最大250字节)
数据表:分析字段:
最小值:(字节,内容大于该值才分析)每批处理:条记录
开始ID: + + 结束ID: +  
操作: + +  (自动分页大小: K,修改系统参数
+
+ +
+ + + + + +
结果: + + [增大] [缩小] +
+
+
+ +
+
+ \ 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}
文章标题: 文章标题: 简略标题: - + @@ -143,19 +143,13 @@ 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}
- + - +
Tag标签: Tag标签: (','号分开,单个标签小于12字节) 权重:(越小越靠前)(越小越靠前)
- +
缩略图: 缩略图: - - - 选择图片 - - - + 上传图片 + + @@ -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} - +
文章排序: 文章排序: - + - + +
阅读权限: 阅读权限:
+ - + + +
更新时间: 更新时间: "; @@ -340,7 +334,7 @@ table{border-collapse:separate} - +
关键字: 关键词:
@@ -350,7 +344,7 @@ table{border-collapse:separate}
- +
文章摘要: 文章摘要:
@@ -360,7 +354,7 @@ table{border-collapse:separate}
- +
自定义文件名: 自定义文件名: (不包括后缀名如.html等)
- +
- -
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 @@ - - - - - 关键字管理 - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - - - -
关键词维护
- 搜索: - -   - -   - -
-
- - - - - - - - - - -
新增关键字:链接网址:频率:
-
选择关键字链接网址频率管理
- - - - {dede:field.keyword/} - - - - - - - - -   - -
-   - -   - -
- {dede:pagelist listsize=3/} -
-
- - + + + + + 关键词管理 + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + + + +
关键词维护
+ 搜索: + +   + +   + +
+
+ + + + + + + + + + +
新增关键词:链接网址:频率:
+
选择关键词链接网址频率管理
+ + + + {dede:field.keyword/} + + + + + + + + +   + +
+   + +   + +
+ {dede:pagelist listsize=3/} +
+
+ \ 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 @@ - - - - -重复文档检测 - - - - - - - - - - - - - - - - - - - - - GetArray()) - { - if($row['dd']==1 ) break; - ?> - - - - - - - - - - -
- ·重复文档列表: -
选择 重复数量 文档标题
- - - - - -
-   - -   - -   - -   - (共有 篇重复标题的文档) -
- + + + + +重复文档检测 + + + + + + + + + + + + + + + + + + + + GetArray()) + { + if($row['dd']==1 ) break; + ?> + + + + + + + + + + +
+ ·重复文档列表: +
选择 重复数量 文档标题
+ +
+   +   +   + (共有 篇重复标题的文档) +
+ \ 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默认的

-
 设置:
 文件名:  - -
- -
 状态:
- - -
- - + + + + + 点卡生成向导 + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
点卡生成向导: + + +
+
+ + + + + + + + + + + + + + + + + + + +
点卡类型: + + 生成数量: + +
点卡前缀: + + 密码长度: +
密码类型: + + 密码组数: +
+
+ +
+ + + + + +
结果: + + [增大] [缩小] +
+
+
+ +
+
+ \ 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 @@ - - - - - 点卡业务记录 - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - - -
点卡业务管理: - - - - - - - -
-
选择卡号点卡类型生成日期使用日期状态使用会员
{dede:field.cardid/}{dede:field.mtime function='GetDateMk(@me)'/}{dede:field.utime function='GetUseDate(@me)'/}{dede:field.isexp function='GetSta(@me)'/}{dede:field.uid function='GetMemberID(@me)'/}
  - - -     
- {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} -
- - + + + + + 点卡业务记录 + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + + +
点卡业务管理: + + + + + + + +
+
选择卡号点卡类型生成日期使用日期状态使用会员
{dede:field.cardid/}{dede:field.mtime function='GetDateMk(@me)'/}{dede:field.utime function='GetUseDate(@me)'/}{dede:field.isexp function='GetSta(@me)'/}{dede:field.uid function='GetMemberID(@me)'/}
  + + +     
+ {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} +
+ \ 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 @@ - - - - - 点卡产品分类 - - - - - - - - - - - - - - - - - - - SetQuery("Select * From #@__moneycard_type"); - $dsql->Execute(); - $k=0; - while($row = $dsql->GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - - - - - - - - -
 点卡产品分类:
产品名称点数(金币数)价格状态
- - - - - - (元) - - - 保留 -
- 新增一个点卡产品类型:
- - - - - - (元) - - - 新增
- -
- - + + + + + 点卡产品分类 + + + + + + + + + + + + + + + + + + SetQuery("Select * From #@__moneycard_type"); + $dsql->Execute(); + $k=0; + while($row = $dsql->GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + + + + + + + + +
 点卡产品分类:
产品名称点数(金币数)价格状态
+ + + + + + (元) + + + 保留 +
+ 新增一个点卡产品类型:
+ + + + + + (元) + + + 新增
+ +
+ \ 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 " "; + } + ?> + + + +
+ + + + +
+ + + + + + +
常规选项高级选项栏目内容
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '> + + + +
是否支持投稿: + + +
是否隐藏栏目: + + +
内容模型: + +
中文名称:
中文概况:
英文名称:
英文概况:
栏目大图: + + +
栏目小图: + + +
排列顺序:(由低 -> 高)
浏览权限: + (仅限制栏目里的文档浏览权限)
上级目录: + + +
文件保存目录: + + + + + +
+
目录相对位置: + + + + + + + + +
栏目列表选项: + + + + + + +
默认页的名称:
栏目属性: + +
+ +
+ + +
栏目交叉:帮助
仅适用[最终列表栏目]
+ + + + + + +
+ +
绑定小分类:
仅适用[分类信息模型]
+ 按 Ctrl 多选,不选系统将调用全部分类,在“联动类别管理”中管理 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 返回 +
+
+ + \ 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 @@ - - - - - 栏目管理--快速创建栏目 - - - - - - - - - - -
- - - - - - - - - -
- - - - -
 栏目管理 >> 批量增加栏目
-
- - - - - - - -
- - - - -
- - - - -
 常规选项 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
公用参数:
是否支持投稿: - -   -
目录保存位置: - - - - - - -
隶属栏目: - - (默认为顶级栏目) -
内容模型:   -
栏目列表选项: - - -
默认页的名称:
文章命名规则: - 帮助
列表命名规则: - 帮助
栏目填写:
- - - - - - - - - - - - - - - - - - - - - - - -
排序顶级栏目名称子栏目(用"目录名称1,目录名称2..."这样表示多个栏目) -
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
-     返回
-
-
- - + + + + + 栏目管理--快速创建栏目 + + + + + + + + + +
+ + + + + + + + + +
+ + + + +
 栏目管理 >> 批量增加栏目
+
+ + + + + + + +
+ + + + +
+ + + + +
 常规选项 
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
公用参数:
是否支持投稿: + +   +
目录保存位置: + + + + + + +
隶属栏目: + + (默认为顶级栏目) +
内容模型:  +
栏目列表选项: + + +
默认页的名称:
文章命名规则: + 帮助
列表命名规则: + 帮助
栏目填写:
+ + + + + + + + + + + + + + + + + + + + + + + +
排序顶级栏目名称子栏目(用"目录名称1,目录名称2"这样表示多个栏目) +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+     返回
+
+
+ \ 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 @@ + + + + +栏目管理 + + + + + + + + + + + + + + + + + +
+ + + + +
栏目管理 >> 修改栏目
+
+ + + + + + + + + +
+ + + + +
+ + + + + + +
常规选项高级选项栏目内容
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + '> + + + +
是否支持投稿: + + +
是否隐藏栏目: + + +
内容模型: + +
中文名称:
中文概况:
英文名称:
英文概况:
栏目大图: + + +
栏目小图: + + +
排列顺序: (由低 -> 高)
浏览权限: (仅限制栏目里的文档浏览权限) +
文件保存目录:(填写{cmspath}/a/b/c生成目录“域名/a/b/c”标签{cmspath}必填)
栏目列表选项: + + + +
默认页的名称:
栏目属性: +
+
+ +
栏目交叉:帮助
仅适用[最终列表栏目]
+ + + +
+ +
绑定小分类:
仅适用[分类信息模型]
+ 按 Ctrl 多选,不选系统将调用全部分类,在“联动类别管理”中管理 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 返回 +
+
+ + \ 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 @@ - - - - -类别管理 - - - - - - - - - -
- - - - - - - - - - - -
-
-
-
-
-
- - -
- - - -
- - 站点目录树
-ListAllType($userChannel,$opendir); -?> -
- + + + + +类别管理 + + + + + + + + + +
+ + + + + + + + + + + +
+
+
+
+
+
+ + +
+ + + +
+ + 站点目录树
+ListAllType($userChannel,$opendir); +?> +
+ \ 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 @@ - - - - - 自定义属性管理 - - - - - - - - - - - - - - - - - - - - - SetQuery(" Select * From `#@__arcatt` order by sortid asc "); - $dsql->Execute(); - $k=0; - while($row = $dsql->GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - -
文档自定义属性管理 -
-   自定义属性的意义和使用说明:
-   在以往的版本中,网站主页、频道封面的设计,都只能单调的用 arclist - 标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,例如,我希望在最顶部的地方显示我想要的文档,在以往的版本中是无法做到的,但使用自定义属性之后,只要给arclist 标记加上 - att='自定义属性的ID' 的属性,然后在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档。
-   注意事项:这个版本中att对应的字段是SET类型字段,因此为了数据安全起见不允许用户增加其它类型,但调用时允许使用组合条件,如:att='c,p'表示推荐图片新闻。
ID排序属性名称
- att; ?> - - - - -
 
- -
- - + + + + + 自定义属性管理 + + + + + + + + + + + + + + + + + + + + SetQuery(" Select * From `#@__arcatt` order by sortid asc "); + $dsql->Execute(); + $k=0; + while($row = $dsql->GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + +
文档自定义属性管理 +
+   自定义属性的意义和使用说明:
+   在以往的版本中,网站主页、频道封面的设计,都只能单调的用 arclist + 标记把某栏目最新或按特定排序方式的文档无选择的读出来,这样做法存在很大的不足,例如,我希望在最顶部的地方显示我想要的文档,在以往的版本中是无法做到的,但使用自定义属性之后,只要给arclist 标记加上 + att='自定义属性的ID' 的属性,然后在发布的时候对适合的文档选择专门的属性,那么使用arclist的地方就会按您的意愿显示指定的文档
+   注意事项:这个版本中att对应的字段是SET类型字段,因此为了数据安全起见不允许用户增加其它类型,但调用时允许使用组合条件,如:att='c,p'表示推荐图片新闻
ID排序属性名称
+ att; ?> + + + + +
 
+ +
+ \ 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 @@ - - - - - 文档批量管理 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
文档批量管理: 
-
选定栏目: - GetOptionArray(0,$admin_catalogs,0,1); - echo ""; - ?> -
起始ID:开始: - - 结束: -
档案发布时间: - - - - - - - - -
-
用户的登录id: - (网址uid=后面跟的id)
操作: - - - -
移动选项: - 新位置:"; - echo ""; - echo "
"; - echo "标题关键字:"; - ?> -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - - - - -
错误文档修正: 
-
- - - -
- -
- - + + + + + 文档批量管理 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
文档批量管理: 
+
选定栏目: + GetOptionArray(0,$admin_catalogs,0,1); + echo ""; + ?> +
起始ID:开始: + + 结束: +
档案发布时间: + + + + + + + + +
+
用户的登录id: + (网址uid=后面跟的id)
操作: + + + +
移动选项: + 新位置:"; + echo ""; + echo "
"; + echo "标题关键词:"; + ?> +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ + + + + +
错误文档修正: 
+
+ + + +
+ +
+ \ 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:field.title/} {dede:field.flag function='IsCommendArchives(@me)'/} +

+ 发布时间:{dede:field.senddate function='GetDateTimeMk(@me)'/} +
+

{dede:field.typeid function='GetTypename(@me)'/}

+ ID: {dede:field.id/} +
{dede:field.arcrank function='GetRankName(@me)'/}{dede:field.mid function=GetMemberName(@me)/}{dede:field.ismake function='IsHtmlArchives(@me)'/}{dede:field.click/}
+ {/dede:datalist} +
+ + + + + + + +
+ 全选 + 取消 + 查看 + 修改 + 更新 + 审核 + 推荐 + 移动 + 删除 + 增加属性 + 删除属性 +
{dede:pagelist listsize=5/}
+ + \ 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:datalist} - - - - - - - - - - - - - {/dede:datalist} - - - - - - -
{dede:global.positionname/}文档列表(使用鼠标右键弹出菜单)
ID选择文章标题更新时间类目点击HTML权限发布人操作
{dede:field.id/} - - {dede:field.title/} - - {dede:field.flag function='IsCommendArchives(@me)'/} - {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}{dede:field.ismake function="IsHtmlArchives(@me)"/}{dede:field.arcrank function="GetRankName(@me)"/}{dede:field.mid function=GetMemberName(@me)/} - - - -
- 全选 - 取消 - 更新 - 审核 - 推荐 - 移动 - 删除 - 自动关键字"; ?> - 增加属性 - 删除属性 -
{dede:pagelist listsize='6'/}
-
- + + + + +所有文档管理 + + + + + + + + + + + + + + + + + +
+ + {dede:if $adminid==$mid} + + {else} + + {/dede:if} + {dede:global.CheckUserSend/} + + + + +
+
+ + + + + +
+ + + + + + + + + +
+ + 关键词: + + + +
+
+
+
+ + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + + {/dede:datalist} + + + + + + +
{dede:global.positionname/}文档列表(使用鼠标右键弹出菜单)
ID选择文章标题更新时间类目点击HTML权限发布人操作
{dede:field.id/} + + {dede:field.title/} + + {dede:field.flag function='IsCommendArchives(@me)'/} + {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}{dede:field.ismake function="IsHtmlArchives(@me)"/}{dede:field.arcrank function="GetRankName(@me)"/}{dede:field.mid function=GetMemberName(@me)/} + + + +
+ 全选 + 取消 + 更新 + 审核 + 推荐 + 移动 + 删除 + 自动关键词"; ?> + 增加属性 + 删除属性 +
{dede:pagelist listsize='6'/}
+
+ \ 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 @@ + + + + +专题文档管理 + + + + + + + + + + + + + +
+ + + + +
+
+ + + + + +
+ + + + + + + +
+ + 关键词:
+
+
+ + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + {/dede:datalist} + + + + + + + +
文章列表(在文章标题处使用鼠标右键进行常用操作)
ID选择文章标题更新时间类目点击HTML权限属性
{dede:field.id/} + {dede:field.title/} + {dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}
+ 全选 + 取消 + 查看 + 修改 + 更新 + 审核 + 推荐 + 删除 +
{dede:pagelist listsize=5/}
+ + \ 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 @@ - - - - - - 选择文章 - - - - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - - {/dede:datalist} - - - - - - - -
- §文章列表 -
ID选择文章标题更新时间类目点击HTML权限属性
{dede:field.id/} - {dede:field.title/} - {dede:field.senddate function="GetDateMk(@me)" /}{dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}{dede:field.ismake function="IsHtmlArchives(@me)" /}{dede:field.arcrank function="GetRankName(@me)" /}{dede:field.flag function="IsCommendArchives(@me)" /}
-   - 全选 -   - 取消 -   - 把选定值加到列表 -
- {dede:pagelist listsize=5/} -
- - - - - - - -
- - - - - - - - -
请选择类目: - - - 关键字: - - - - -
-
- - + + + + + 选择文章 + + + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ §文章列表 +
ID选择文章标题更新时间类目点击HTML权限属性
{dede:field.id/} + {dede:field.title/} + {dede:field.senddate function="GetDateMk(@me)" /}{dede:field.typeid function='GetTypename(@me)'/}{dede:field.click/}{dede:field.ismake function="IsHtmlArchives(@me)" /}{dede:field.arcrank function="GetRankName(@me)" /}{dede:field.flag function="IsCommendArchives(@me)" /}
+   + 全选 +   + 取消 +   + 把选定值加到列表 +
+ {dede:pagelist listsize=5/} +
+ + + + + + + +
+ + + + + + + + +
请选择类目: + + + 关键词: + + + + +
+
+ \ 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:datalist} - - - - - - - - - - - - {/dede:datalist} - - - - - - - -
- {dede:global.positionname/}文档列表  (使用鼠标右键进行常用操作) -
ID选择文章标题更新时间类目权限点击发布人操作
{dede:field.id/} - - - {dede:field.title/}{dede:field.flag function='IsCommendArchives(@me)'/} - - {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typename/}{dede:field.arcrank function="GetRankName(@me)"/}{dede:field.click/}{dede:field.mid function=GetMemberName(@me)/} - - -
-   - 全选 - 取消 -  更新  -  审核  -  推荐  -  移动  -  删除  - - 把选定值加到列表 - -
- {dede:pagelist listsize=3/} -
- - - - - - - - - - -
- - - - - - - -
- - - - - - - - -
请选择类目: - - - 关键字: - - - - -
-
-
-
- - + + + + + 文档管理 + + + + + + + + + + + + + + + + +
+ + {dede:if $adminid==$mid } + + {else} + + {/dede:if} + + + + +
+ + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ {dede:global.positionname/}文档列表  (使用鼠标右键进行常用操作) +
ID选择文章标题更新时间类目权限点击发布人操作
{dede:field.id/} + + + {dede:field.title/}{dede:field.flag function='IsCommendArchives(@me)'/} + + {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typename/}{dede:field.arcrank function="GetRankName(@me)"/}{dede:field.click/}{dede:field.mid function=GetMemberName(@me)/} + + +
+   + 全选 + 取消 +  更新  +  审核  +  推荐  +  移动  +  删除  + + 把选定值加到列表 + +
+ {dede:pagelist listsize=3/} +
+ + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + +
请选择类目: + + + 关键词: + + + + +
+
+
+
+ \ 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 @@ - - - - - 新增频道 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-  自定义表单管理 > 新增自定义表单: -
- diyid:
- 数字,创建后不可更改,并具有唯一性。推荐使用默认值 -
- - * 帮助 -
- 自定义表单名称:
- 自定义表单的中文名称,在后台管理,前台发布等均使用此名字。 -
- - *帮助 -
数据表:
- 必须由英文、数字、下划线组成,用于保存自定义表单数据,不能和已有表名重复,创建后不可修改表名。
- - *帮助 -
字段配置:建立自定义表单后在“更改”自定义表单的地方添加字段即可。
列表模板:
内容模板:
发布模板:
前台列表和内容页公开?: - - - -
- - - - - - -
  - - - -
-
- - + + + + + 新增频道 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+  自定义表单管理 > 新增自定义表单: +
+ diyid:
+ 数字,创建后不可修改,并具有唯一性推荐使用默认值 +
+ + * 帮助 +
+ 自定义表单名称:
+ 自定义表单的中文名称,在后台管理,前台发布等均使用此名字 +
+ + *帮助 +
数据表:
+ 必须由英文、数字、下划线组成,用于保存自定义表单数据,不能和已有表名重复,创建后不可修改表名
+ + *帮助 +
字段配置:建立自定义表单后在“修改”自定义表单的地方添加字段即可
列表模板:
内容模板:
发布模板:
前台列表和内容页公开: + + + +
+ + + + + + +
  + + + +
+
+ \ 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 @@ - - - - - 修改自定义表单 - - - - - - - - - - - - -
-
-
自定义表单管理
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 自定义表单管理 > 修改自定义表单: - (修改表名不会创建新表,如果您不懂手工处理这些表,请不要更改) -
自定义表单 diyid:
- 数字,创建后不可更改,并具有唯一性。
- - * 帮助
自定义表单名称:
- 自定义表单的中文名称,在后台管理,前台发布等均使用此名字。
- - *帮助 -
数据表:
- 自定义表单数据表创建后不可修改表名
- - *帮助 -
模型字段配置:
- 信息索引类字段系统已经加入,
- 您只需要增加其它个性化字段即可。
- -
- - - - - - - - - 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 "自动表单"; - ?> - - 修改 - 删除 -
-
列表模板: - -
内容模板: - -
发布模板: - -
前台列表和内容页公开?: - - - -
- - - - - - -
  - - - -
-
- - + + + + + 修改自定义表单 + + + + + + + + + + + +
+
+
自定义表单管理
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 自定义表单管理 > 修改自定义表单: + (修改表名不会创建新表,如果您不懂手工处理这些表,请不要修改) +
自定义表单 diyid:
+ 数字,创建后不可修改,并具有唯一性
+ + 帮助 +
自定义表单名称:
+ 自定义表单的中文名称,在后台管理,前台发布等均使用此名字
+ + *帮助 +
数据表:
+ 自定义表单数据表创建后不可修改表名
+ + *帮助 +
模型字段配置:
+ 信息索引类字段系统已经加入,
+ 您只需要增加其它个性化字段即可
+ +
+ + + + + + + + + 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 "自动表单"; + ?> + + 修改 + 删除 +
+
列表模板: + +
内容模板: + +
发布模板: + +
前台列表和内容页公开: + + + +
+ + + + + + +
  + + + +
+
+ \ 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 @@ - - - - -编辑评论 - - - - - - - - - - - - - - - -
-  表单管理 >> 编辑评论:
-
- - - - - $fielddata) - { - $allowhtml = array('htmltext'); - if($row[$field]=='') continue; - if($fielddata[1]=='img') - { - $row[$field] = " 浏览原图删除原图\r\n"; - } - else if($fielddata[1]=='addon') - { - $row[$field] = " 浏览原附件删除原附件"; - } - else - { - if(!in_array($fielddata[1],$allowhtml)){ - $row[$field] = dede_htmlspecialchars($row[$field]); - $row[$field] = ""; - } - } - echo ''; - $formfields .= $formfields == ''? $field.','.$fielddata[1] : ';'.$field.','.$fielddata[1]; - } - echo ""; - ?> - - - - - -
'.$fielddata[0].':'.''.$row[$field].'
- - - - -
-
-
- + + + + +编辑评论 + + + + + + + + + + + + + + + +
+  表单管理 >> 编辑评论:
+
+ + + + $fielddata) + { + $allowhtml = array('htmltext'); + if($row[$field]=='') continue; + if($fielddata[1]=='img') + { + $row[$field] = " 浏览原图删除原图\r\n"; + } + else if($fielddata[1]=='addon') + { + $row[$field] = " 浏览原附件删除原附件"; + } else { + if(!in_array($fielddata[1],$allowhtml)){ + $row[$field] = dede_htmlspecialchars($row[$field]); + $row[$field] = ""; + } + } + echo ''; + $formfields .= $formfields == ''? $field.','.$fielddata[1] : ';'.$field.','.$fielddata[1]; + } + echo ""; + ?> + + + +
'.$fielddata[0].':'.''.$row[$field].'
+ + +
+
+
+ \ 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 @@ - - - - -增加字段 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
 自定义表单管理 >> 增加新字段: - -
所有填写的内容不允许包含双引号["],否则配置将无法写入。
表单提示文字:
- 发布内容时显示的提示文字
- - *
字段名称:
- - 只能用英文字母或数字,数据表的真实字段名,如果数据类型是联动类型,该项应该填写联动类型的[组名称]。 - -
- - * -
- 内容是否需要分页符:
- 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段! -
- - -   - -
- 数据类型: - -
-
-
-
-
-
-
-
-
-
-
-
-
- - -
- -
默认值:
- - 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”)。 - -
- -
最大长度:
- - 文本数据必须填写,大于255为text类型 - -
- -
自定义表单HTML: - ◆自定义表单HTML模板中用~name~表示提示文字,~form~表示表单元素。 -
- -
- - - - - - -
  - - - -
-
- + + + + +增加字段 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
 自定义表单管理 >> 增加新字段: + +
所有填写的内容不允许包含双引号["],否则配置将无法写入
表单提示文字:
+ 发布内容时显示的提示文字
+ + *
字段名称:
+ + 只能用英文字母或数字,数据表的真实字段名,如果数据类型是联动类型,该项应该填写联动类型的[组名称] + +
+ + * +
+ 内容是否需要分页符:
+ 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段! +
+ + +   + +
+ 数据类型: + +
+
+
+
+
+
+
+
+
+
+
+
+
+ + +
+ +
默认值:
+ + 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”) + +
+ +
最大长度:
+ + 文本数据必须填写,大于255为text类型 + +
+ +
自定义表单HTML: + 自定义表单HTML模板中用~name~表示提示文字,~form~表示表单元素 +
+ +
+ + + + + + +
  + + + +
+
+ \ 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 @@ - - - - -更改字段 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
自定义表单管理 >> 修改字段: - -
表单提示文字:
- 发布内容时显示的提示文字
- - *(发布内容时显示的项名字)
字段名称:
- 只能用英文字母或数字,数据表的真实字段名
-
数据类型: - - -
内容是否需要分页符:
- 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段!
- - -
默认值:
- 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”),如果为联动选框,这里填写联动选框项目名称。
最大长度:
- 文本数据必须填写,大于255为text类型
-
自定义表单HTML: - ◆自定义表单HTML用~name~表示提示文字,~form~表示表单元素

- - - - - - -
  - - - -
- + + + + +修改字段 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
自定义表单管理 >> 修改字段: + +
表单提示文字:
+ 发布内容时显示的提示文字
+ + *(发布内容时显示的项名字)
字段名称:
+ 只能用英文字母或数字,数据表的真实字段名
+
数据类型: + + +
内容是否需要分页符:
+ 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段!
+ + +
默认值:
+ 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”),如果为联动选框,这里填写联动选框项目名称
最大长度:
+ 文本数据必须填写,大于255为text类型
+
自定义表单HTML: + 自定义表单HTML用~name~表示提示文字,~form~表示表单元素

+ + + + + + +
  + + + +
+ \ 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 @@ - - - - -<?php echo $diy->name; ?> - - - - - - -
-
-
name; ?>列表
-
-
- - - - - - {dede:datalist} - '; - 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(!in_array($fielddata[1],$allowhtml)){ - $fields[$field] = dede_htmlspecialchars($fields[$field]); - } - } - echo ''; - } - } else { - echo ''; - } - ?> - {/dede:datalist} - - - - - - -
- - -
'.$fields['id'].' '.$fields['sta'].'
'.$fielddata[0].''.$fields[$field].'
暂无记录
{dede:pagelist listsize='6'/}
- -   -  审核 -  删除 - -
-
- - + + + + +<?php echo $diy->name; ?> + + + + + + +
+
+
name; ?>列表
+
+
+ + + + + + {dede:datalist} + '; + 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(!in_array($fielddata[1],$allowhtml)){ + $fields[$field] = dede_htmlspecialchars($fields[$field]); + } + } + echo ''; + } + } else { + echo ''; + } + ?> + {/dede:datalist} + + + + + + +
+ + +
'.$fields['id'].' '.$fields['sta'].'
'.$fielddata[0].''.$fields[$field].'
暂无记录
{dede:pagelist listsize='6'/}
+ +   + + + +
+
+ + \ 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'/} - - - - -自定义表单管理 - - - - - - -
-
-
自定义表单管理
-
- - - - -
- - - - - -
增加新的自定义表单
-
- - - - - - - - {dede:datalist} - - - - - - - {/dede:datalist} -
diyid名称表名管理
{dede:field.diyid/}{dede:field.name/}{dede:field.table/} -  更改 -  删除 -  导出 -  预览 -
- - - - -
{dede:pagelist listsize='6'/}
- +{dede:page pagesize='40'/} + + + +自定义表单管理 + + + + + + +
+
+
自定义表单管理
+
+ + + + +
+ + + + + +
增加新的自定义表单
+
+ + + + + + + + {dede:datalist} + + + + + + + {/dede:datalist} +
diyid名称表名管理
{dede:field.diyid/}{dede:field.name/}{dede:field.table/} +  修改 +  删除 +  导出 +  预览 +
+ + + + +
{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 @@ - - - - -<?php echo $diy->name;?> - - - - - - -
-
-
- 自定义表单管理 > name; ?> > 发布内容 -
-
-
- - - - - - - -
- -
- - - - -
- -  - -
-
- - + + + + +<?php echo $diy->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:datalist} - - - - - - - - - - - {/dede:datalist} - - - - - - -
- 文章错误管理 
选择编号挑错人文章名称出错类型挑错时间错误内容修改建议
{dede:field.id /}{dede:field.mid function='username(@me)'/}{dede:field.title /} - {dede:field.type function='typename(@me)'/}{dede:field.sendtime function='GetDateMk(@me)'/}{dede:field.errtxt /}{dede:field.oktxt /}
- 全选 - 取消 -  删除  -
- {dede:pagelist listsize=5/} -
-
- - +{dede:config.pagesize value='20'/} + + + + + 挑错管理 + + + + + + +
+ + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + + + + +
+ 文章错误管理 
选择编号挑错人文章名称出错类型挑错时间错误内容修改建议
{dede:field.id /}{dede:field.mid function='username(@me)'/}{dede:field.title /} + {dede:field.type function='typename(@me)'/}{dede:field.sendtime function='GetDateMk(@me)'/}{dede:field.errtxt /}{dede:field.oktxt /}
+ 全选 + 取消 +  删除  +
+ {dede:pagelist listsize=5/} +
+
+ \ 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 @@ - - - - - 编辑评论 - - - - - - - - - - - - - - -
评论管理 >> 编辑评论: -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
评论所属文章: - -
评论人: - -
评论发布时间: - -
IP地址: - -
评论内容:更改的评论内容HTML代码不会被屏蔽,可用HTML语法编辑。
  -
管理员回复:回复内容的HTML代码会被屏蔽。
  -
- -   - -
-
-
- - + + + + + 编辑评论 + + + + + + + + + + + + + +
评论管理 >> 编辑评论: +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
评论所属文章: + +
评论人: + +
评论发布时间: + +
IP地址: + +
评论内容:修改的评论内容HTML代码不会被屏蔽,可用HTML语法编辑
  +
管理员回复:回复内容的HTML代码会被屏蔽
  +
+ +   + +
+
+
+ \ 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 @@ - - - - - - 评论管理 - - - - - - - - - - - - - - - - - - - -
- -
-
- 关键字: - - - -
-
-
- - {dede:datalist} - - - - {/dede:datalist} - - - - - - -
- - - - - - - - - - - - -
-  选择 - - 用户:{dede:field.username/} - - 文档:{dede:field.arctitle - function="RemoveXSS(@me)"/} (浏览) - 0) { ?>({dede:field.replycount/}条回复) - - - IP地址:{dede:field.ip/} - - 时间:{dede:field.dtime function="GetDateTimeMK(@me)" /} - - 编辑 - 更新文档 -
- - - - -
- {dede:field.ischeck function="IsCheck(@me)" /} - {dede:field.msg function='cn_substr(Text2Html(@me), 150)'/} -
-
-
- {dede:pagelist listsize='5' /} -
- - - - - -
- - - - - - - -
-
-
- - - + + + + + 评论管理 + + + + + + + + + + + + + + + + + + +
+ +
+
+ 关键词: + + + +
+
+
+ + {dede:datalist} + + + + {/dede:datalist} + + + + + + +
+ + + + + + + + + + + + +
+  选择 + + 用户:{dede:field.username/} + + 文档:{dede:field.arctitle + function="RemoveXSS(@me)"/} (浏览) + 0) { ?>({dede:field.replycount/}条回复) + + + IP地址:{dede:field.ip/} + + 时间:{dede:field.dtime function="GetDateTimeMK(@me)" /} + + 编辑 + 更新文档 +
+ + + + +
+ {dede:field.ischeck function="IsCheck(@me)" /} + {dede:field.msg function='cn_substr(Text2Html(@me), 150)'/} +
+
+
+ {dede:pagelist listsize='5' /} +
+ + + + + +
+ + + + + + + +
+
+
+ + 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 @@ - - +
- +
-  ◇文件管理 - >> 修改/新建文件 - 文件管理 >> 修改/新建文件
- - - - - + + + +
- - +
- 修改/新建文件: + + 修改/新建文件:
工作目录 - + (空白表示根目录 ,不允许用 “..” 形式的路径)
文件名称 - + (不允许用 “..” 形式的路径)
- {dede:global name='contentView'/} - {dede:global name='contentView'/}
- +   - +   - +
@@ -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 - - - "; - $dirs[] = $line; - } - else if(is_dir("$inpath/$file")) - { - if(preg_match("#^_(.*)$#i",$file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录 - if(preg_match("#^\.(.*)$#i",$file)) continue; - $line = "\n - - - - - - "; - $dirs[] = $line; - } - else if(preg_match("#\.(gif|png)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(jpg)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(swf|fla|fly)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(zip|rar|tar.gz)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(exe)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(mp3|wma)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(wmv|api)#i",$file)) - { - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(rm|rmvb)#i",$file)) - { - $line = "\n - - - - - "; - $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 - - - - - "; - $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 - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(php)#i",$file)) - { - $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(js)#i",$file)) - { - $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); - $line = "\n - - - - - "; - $files[] = $line; - } - else if(preg_match("#\.(css)#i",$file)) - { - $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); - $line = "\n - - - - - "; - $files[] = $line; - } - else - { - $line = "\n - - - - - "; - $files[] = $line; - } -} -$dh->close(); -foreach ($dirs as $dir) -{ - echo $dir; -} -foreach ($files as $file) -{ - echo $file; -} -?> - - - -
文件名文件大小最后修改时间操作
- 上级目录 - - 当前目录:$activepath   - -
- $file   - 改名 - 删除 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 编辑 - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 编辑 - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 编辑 - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 编辑 - 改名 - 删除 - 移动 -
- $file$filesize KB$filetime - 编辑 - 改名 - 删除 - 移动 -
$file$filesize KB$filetime - 改名 - 删除 - 移动 -
- 根目录 - 新建文件 - 新建目录 - 文件上传 - 空间检查 -   
- - - + + + + + 文件管理器 + + + + + + + + + + + + + + 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 + + + "; + $dirs[] = $line; + } + else if(is_dir("$inpath/$file")) + { + if(preg_match("#^_(.*)$#i",$file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录 + if(preg_match("#^\.(.*)$#i",$file)) continue; + $line = "\n + + + + + + "; + $dirs[] = $line; + } + else if(preg_match("#\.(gif|png)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(jpg)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(swf|fla|fly)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(zip|rar|tar.gz)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(exe)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(mp3|wma)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(wmv|api)#i",$file)) + { + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(rm|rmvb)#i",$file)) + { + $line = "\n + + + + + "; + $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 + + + + + "; + $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 + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(php)#i",$file)) + { + $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(js)#i",$file)) + { + $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); + $line = "\n + + + + + "; + $files[] = $line; + } + else if(preg_match("#\.(css)#i",$file)) + { + $edurl = "file_manage_view.php?fmdo=edit&filename=".urlencode($file)."&activepath=".urlencode($activepath); + $line = "\n + + + + + "; + $files[] = $line; + } else { + $line = "\n + + + + + "; + $files[] = $line; + } +} +$dh->close(); +foreach ($dirs as $dir) +{ + echo $dir; +} +foreach ($files as $file) +{ + echo $file; +} +?> + + + +
文件名文件大小最后修改时间操作
+ 上级目录 + + 当前目录:$activepath   + +
+ $file   + 改名 + 删除 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 编辑 + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 编辑 + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 编辑 + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 编辑 + 改名 + 删除 + 移动 +
+ $file$filesize KB$filetime + 编辑 + 改名 + 删除 + 移动 +
$file$filesize KB$filetime + 改名 + 删除 + 移动 +
+ 根目录 + 新建文件 + 新建目录 + 文件上传 + 空间检查 +   
+ + \ 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 @@ - - - - -文件上传 - - - - - - - - -
- - - - - - - - - - - - - - - - - - - -
- -[返回目录{dede:global name='activepath'/}] -
  -
文件1:
-
-     - -  - -
- -
- + + + + +文件上传 + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + +
+ +[返回目录{dede:global name='activepath'/}] +
  +
文件1:
+
+     + +  + +
+
+
+ \ 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 @@ - - - - - 新增自由列表 - - - - - - - - - - - - - - - -
-
-
频道管理
-
-
- - - - - - - - - - - - -
- 自自由列表管理 - >> 增加一个列表: -
- - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成Google - Map、生成按自定义排序规则的文章列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成HTML或访问速度。
自由列表标题:
列表HTML存放目录: - {listdir}变量的值
目录默认页名称: -
命名规则:
列表模板: -
最大列出页数: - -
 以下选项用于模板里的 <meta name="keywords|description" - content=""> 描述
关键字:
列表描述:
-
列表样式:(这里是定义自由列表模板里的{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 "\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 "\r\n"; - } - echo ""; - ?> -  (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
附加属性: - \r\n"; - echo "\r\n"; - $dsql->SetQuery("Select * From #@__arcatt"); - $dsql->Execute(); - while($row = $dsql->GetObject()) - { - echo "\r\n"; - } - echo ""; - ?> - 文档发布时间: - - 天以内 (0 表示不限)
每页记录数: - -  显示列数: - - 标题长度: - - (1 字节 = 0.5个中文字)
高级筛选: - - -  关键字: - - (","逗号分开)
排列顺序: - -   - -
循环内的单行记录样式(InnerText):[底层变量field参考]
- -
  - -
-
 
-
- - - + + + + + 新增自由列表 + + + + + + + + + + + + + + +
+
+
频道管理
+
+
+ + + + + + + + + +
+ 自自由列表管理 + >> 增加一个列表: +
+ + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成Google Map、生成按自定义排序规则的文章列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成HTML或访问速度
自由列表标题:
列表HTML存放目录: + {listdir}变量的值
目录默认页名称: +
命名规则:
列表模板: +
最大列出页数: + +
 以下选项用于模板里的 <meta name="keywords|description" + content=""> 描述
关键词:
列表描述:
+
列表样式:(这里是定义自由列表模板里的{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 "\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 "\r\n"; + } + echo ""; + ?> +  (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
附加属性: + \r\n"; + echo "\r\n"; + $dsql->SetQuery("Select * From #@__arcatt"); + $dsql->Execute(); + while($row = $dsql->GetObject()) + { + echo "\r\n"; + } + echo ""; + ?> + 文档发布时间: + + 天以内 (0 表示不限)
每页记录数: + +  显示列数: + + 标题长度: + + (1 字节 = 0.5个中文字)
高级筛选: + + +  关键词: + + (","逗号分开)
排列顺序: + +   + +
循环内的单行记录样式(InnerText):[底层变量field参考]
+ +
  + +
+
 
+
+ + \ 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 @@ - - - - - 更改自由列表 - - - - - - - - - - - - - - - - -
-
-
频道管理
-
-
- - - - - - - - - - - - - - -
- - - - - -
- 自自由列表管理 - >> 更改自由列表: -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成Google - Map、生成按自定义排序规则的文章列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成HTML或访问速度。
自由列表标题:
列表HTML存放目录: - {listdir}变量的值
目录默认页名称: - -
命名规则:
列表模板: -
最大列出页数: - -
 以下选项用于模板里的 <meta name="keywords|description" - content=""> 描述
关键字:
列表描述:
-
- 列表样式:(这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性)
- 限定栏目: - GetAtt('typeid'); - echo ""; - ?>
限定频道: - GetAtt('channel'); - echo ""; - ?> -  (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
附加属性: - GetAtt('att'); - 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]; - } - ?> - -   - -
循环内的单行记录样式(InnerText):[底层变量field参考]
- -
  - -
-
 
-
- - - + + + + + 修改自由列表 + + + + + + + + + + + + + + + +
+
+
频道管理
+
+
+ + + + + + + + + + + + + + +
+ + + + + +
+ 自自由列表管理 + >> 修改自由列表: +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成Google + Map、生成按自定义排序规则的文章列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成HTML或访问速度
自由列表标题:
列表HTML存放目录: + {listdir}变量的值
目录默认页名称: + +
命名规则:
列表模板: +
最大列出页数: + +
 以下选项用于模板里的 <meta name="keywords|description" + content=""> 描述
关键词:
列表描述:
+
+ 列表样式:(这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性)
+ 限定栏目: + GetAtt('typeid'); + echo ""; + ?>
限定频道: + GetAtt('channel'); + echo ""; + ?> +  (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
附加属性: + GetAtt('att'); + 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]; + } + ?> + +   + +
循环内的单行记录样式(InnerText):[底层变量field参考]
+ +
  + +
+
 
+
+ + \ 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 @@ - - - - -友情链接管理 - - - - - - - - - - - - - - - - -
友情链接管理>>增加链接
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
网址: - -
网站名称: - -
排列位置: - - (由小到大排列) -
网站Logo: - - (88*31 gif或jpg) -
上传Logo: - -
网站简况:
站长Email: - -
网站类型: - -
链接位置: - - -
  - - -
-
-
- + + + + +友情链接管理 + + + + + + + + + + + + + + + + +
友情链接管理 >> 增加链接
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
网址: + +
网站名称: + +
排列位置: + + (由小到大排列) +
网站Logo: + + (88*31 gif或jpg) +
上传Logo: + +
网站简况:
站长Email: + +
网站类型: + +
链接位置: + + +
  + + +
+
+
+ \ 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 @@ - - - - - 友情链接更改 - - - - - - - - - - - - - -
- 友情链接管理 >> 链接更改
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
网址: - -
排列位置: - - (由小到大排列) -
网站名称:
网站Logo: - - (88*31 gif或jpg) -
上传Logo:
网站简况:
站长Email:
链接位置: - - - -
网站类型: - -
  -   - -
-
-
- - + + + + + 友情链接修改 + + + + + + + + + + + + +
+ 友情链接管理 >> 链接修改
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
网址: + +
排列位置: + + (由小到大排列) +
网站名称:
网站Logo: + + (88*31 gif或jpg) +
上传Logo:
网站简况:
站长Email:
链接位置: + + + +
网站类型: + +
  +   + +
+
+
+ \ 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:datalist} - - - - - - - - - - - {/dede:datalist} - - - - - - - -
-
- 友情链接管理 -
- -
-
- - - - - - - -
关键字: - - - -
-
-
选择网站名称网站Logo站长Email时间状态顺序管理
{dede:field.webname function='dede_htmlspecialchars(@me)'/}
地址:{dede:field.url/}
{dede:field.logo function="GetPic(@me)"/}{dede:field.email/}{dede:field.dtime function="MyDate('Y-m-d',@me)"/}{dede:field.ischeck function="GetSta(@me)"/}{dede:field.sortrank/} - 更改 - 删除 -
-   - 全选 - 取消 - 批量删除 - -
- {dede:pagelist listsize=6/} -
-
- - +{dede:config.pagesize value="20"/} + + + + + 友情链接管理 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+
+ 友情链接管理 +
+ +
+
+ + + + + + + +
关键词: + + + +
+
+
选择网站名称网站Logo站长Email时间状态顺序管理
{dede:field.webname function='dede_htmlspecialchars(@me)'/}
地址:{dede:field.url/}
{dede:field.logo function="GetPic(@me)"/}{dede:field.email/}{dede:field.dtime function="MyDate('Y-m-d',@me)"/}{dede:field.ischeck function="GetSta(@me)"/}{dede:field.sortrank/} + 修改 + 删除 +
+ 全选 + 取消 + 批量删除 +
+ {dede:pagelist listsize=6/} +
+
+ \ 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 @@ - - - - - 网站类型管理 - - - - - - - - - - - - - - - - - SetQuery("Select * From #@__flinktype"); - $dsql->Execute(); - $k=0; - while($row = $dsql->GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - - - - - - - -
- 友情链接管理  - 增加链接 - 网站类型管理 - 外部申请表单
类型ID网站名称状态
id; ?> - -
新增一个网站类型:
- -
-
- - + + + + + 网站类型管理 + + + + + + + + + + + + + + + + + SetQuery("Select * From #@__flinktype"); + $dsql->Execute(); + $k=0; + while($row = $dsql->GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + + + + + + + +
+ 友情链接管理  + 增加链接 + 网站类型管理 + 外部申请表单
类型ID网站名称状态
id; ?> + +
新增一个网站类型:
+ +
+
+ \ 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 - - - - - - - - - -
-
- - - - -
- -
-
-
-
- 预览 -
-

-   - -

-
-
- left - top - 宽 - 高 - 改变比例 -
- -
- + + + + +图片裁剪 Image Cropper + + + + + + + + + +
+
+ + + + +
+ +
+
+
+
+ 预览 +
+

+   + +

+
+
+ left + top + 宽 + 高 + 改变比例 +
+ +
+ \ 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 @@ - - - - - -<?php echo $cfg_webname; ?>后台管理 - - - - - - -
- -
-
- -
-
-
-
-
- -
- -
-
- -
-
-
- -
-
-
- - - 代码托管 - 帮助中心 -
-
-
-
-
-
- -
-
-
- -
-
-
-
    - SetNameSpace('menu','<','>'); - $dtp->LoadTemplet($myIcoFile); - if(is_array($dtp->CTags)) - { - foreach($dtp->CTags as $ctag) - { - $title = $ctag->GetAtt('title'); - $ico = $ctag->GetAtt('ico'); - $link = $ctag->GetAtt('link'); - echo "
  • {$title}
  • \r\n"; - } - } - ?> -
-
- - + + + + + +<?php echo $cfg_webname; ?>后台管理 + + + + + + +
+ +
+
+ +
+
+
+
+
+ +
V
+ +
+
+ +
+ +
+
+
+ + + 代码托管 + 帮助中心 +
+
+
+
+
+
+ +
+
+
+ +
+
+
+
    + SetNameSpace('menu','<','>'); + $dtp->LoadTemplet($myIcoFile); + if(is_array($dtp->CTags)) + { + foreach($dtp->CTags as $ctag) + { + $title = $ctag->GetAtt('title'); + $ico = $ctag->GetAtt('ico'); + $link = $ctag->GetAtt('link'); + echo "
  • {$title}
  • "; + } + } + ?> +
+
+ + \ 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 @@ + + + + +系统概况 + + + + + + + + + + + + + + +
+
欢迎使用国内流行的内容管理系统多端全媒体解决方案 --
+
+
+
+
+
更新消息
+
+
+ "; + echo "安全操作:备份还原病毒扫描错误修复
"; + echo ""; + ?> +
+
+
+
+
+
+
版本授权
+
正在载入
+
+
+
+
+
快捷操作新增管理
+
+ +
+
+
+
+
+
信息统计
+
+
正在载入
+
+
+
+
+
+
基本信息
+
+ + + + + + + + + + + + + + + + + + + + + +
操作系统: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 ""; + } + } else { + ?> + + +
{$row['title']}{$rowarcrank}{$pubdate}
暂无文档
+
+
+
+
+
+ + + + + \ 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 - - - - - - - - - - -
DedeBIZ logo -
-
-
缩小左框架
-
显示/隐藏左框架
-
增大左框架
-
- 主菜单 | - 内容发布 | - 系统主页 | - 网站主页 | - 会员中心 | - 注销 -
-
-
-
- 您好:getUserName(); ?> ,欢迎使用DedeBIZV6 -
-
- + + + + +DedeBIZ + + + + + + + + + + +
DedeBIZ logo +
+
+
缩小左框架
+
显示/隐藏左框架
+
增大左框架
+
+ 主菜单 | + 内容发布 | + 系统主页 | + 网站主页 | + 会员中心 | + 注销 +
+
+
+
+ 您好: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 @@ - - - - - 采集内容管理 - - - - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - -
管理系统日志: 
-
- - - - - - -
- 管理员: - - IP地址: - - 时间: - -   - -
-
选择管理员访问文件方式访问IP时间Query参数
- - - {dede:field.userid/} - - - - {dede:field.method/} - - {dede:field.cip/} - - {dede:field.dtime function="MyDate('y/m/d H:i:s',@me)" /} - - -
-   -   -   -
- {dede:pagelist listsize='5' /} -
- - + + + + + 采集内容管理 + + + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + +
管理系统日志: 
+
+ + + + + + +
+ 管理员: + + IP地址: + + 时间: + +   + +
+
选择管理员访问文件方式访问IP时间Query参数
+ + + {dede:field.userid/} + + + + {dede:field.method/} + + {dede:field.cip/} + + {dede:field.dtime function="MyDate('y/m/d H:i:s',@me)" /} + + +
+   +   +   +
+ {dede:pagelist listsize='5' /} +
+ \ 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 @@ - - - - - - - - - -<?php echo $cfg_webname; ?>后台登录 - - - -
-
-
-
- -
-
- -
-
-
-
-
- - -
- - - + + + + + + + + + +<?php echo $cfg_webname; ?>后台登录 + + + +
+
+
+
+ +
+
+ +
+
+
+
+
+ + +
+ \ 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 - - - - - "; - $files[] = $line; - } -} -$dh->close(); -foreach ($files as $file) -{ - echo $file; -} -?> - - - -
-
邮件列表管理
-
文件名文件大小创建时间操作
$file$filesize KB$filetime - [删除] -
 
- + + + + +邮件列表文件管理 + + + + + + + + + + + + + + +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 + + + + + "; + $files[] = $line; + } +} +$dh->close(); +foreach ($files as $file) +{ + echo $file; +} +?> + + + +
+
邮件列表管理
+
文件名文件大小创建时间操作
$file$filesize KB$filetime + [删除] +
 
+ \ 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 @@ - - - - -发送邮件 - - - - -
-
-
邮件订阅
-
- - - - - - - - - - -
发送邮件
-
- - - - - - - - - - - - - - -
条件:开始MID - -- 结束MID(获取全部可以不填写)
保存邮件列表的文件名: -.TXT (只能是英文,字母,下划线组成)
 
-
-
 
- + + + + +发送邮件 + + + + +
+
+
邮件订阅
+
+ + + + + + + + + + +
发送邮件
+
+ + + + + + + + + + + + + + +
条件:开始MID + -- 结束MID(获取全部可以不填写)
保存邮件列表的文件名: +.TXT (只能是英文,字母,下划线组成)
 
+
+
 
+ \ 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 @@ - - - - -发送邮件 - - - - - -
-
-
邮件订阅
-
- - - - - - - - - - -
发送邮件
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
发送到: - 单人 - 多人 - 邮件群发 -
E-Mail地址: - 填写用户的E-Mail地址
邮件标题: - 标题少于70个字符内
-
-
 
 
-
-
 
- + + + + +发送邮件 + + + + + +
+
+
邮件订阅
+
+ + + + + + + + + + +
发送邮件
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
发送到: + 单人 + 多人 + 邮件群发 +
E-Mail地址: 填写用户的E-Mail地址
邮件标题: 标题少于70个字符内
+
+
+
+
 
+ \ 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 @@ - - - - -发送邮件 - - - - -
-
-
邮件订阅
-
- - - - - - - - - - -
增加期刊
-
- - - - - - - - - - - - - - - - - - - - - - - - -
期刊号:
订阅分类: - -
邮件标题: - 标题少于70个字符内
- -  
 
-
-
 
- + + + + +发送邮件 + + + + +
+
+
邮件订阅
+
+ + + + + + + + + + +
增加期刊
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
期刊号:
订阅分类: + +
邮件标题: + 标题少于70个字符内
+ +  
 
+
+
 
+ \ 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 @@ - - - - -发送邮件 - - - - -
-
-
邮件订阅
-
- - - - - - - - - - -
编辑期刊
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
期刊号:
订阅分类: - -
邮件标题: - 标题少于70个字符内
-
-
 
 
-
-
 
- + + + + +发送邮件 + + + + +
+
+
邮件订阅
+
+ + + + + + + + + + +
编辑期刊
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
期刊号:
订阅分类: + +
邮件标题: + 标题少于70个字符内
+
+
 
 
+
+
 
+ \ 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 @@ - - - - -发送邮件 - - - -
-
-
邮件订阅
-
- - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - {/dede:datalist} - - - -
-
期刊管理
- -
ID期刊号期刊名称所属分类添加时间发送时间编辑人操作
{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} + + + + + + + + + + + {/dede:datalist} + + + +
+
期刊管理
+ +
ID期刊号期刊名称所属分类添加时间发送时间编辑人操作
{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/}编辑 | 删除
 
+ \ 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 @@ - - - - -发送邮件 - - - -
-
-
邮件订阅
-
- - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - - - {/dede:datalist} - - - -
-
群发期刊
- -
ID期刊号期刊名称所属分类订阅数添加时间发送时间状态发送次数操作
{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} + + + + + + + + + + + + + {/dede:datalist} + + + +
+
群发期刊
+ +
ID期刊号期刊名称所属分类订阅数添加时间发送时间状态发送次数操作
{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/}开始发送
 
+ \ 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 @@ - - - - -发送邮件 - - - -
-
-
邮件订阅
-
- - - - - - - - - - - {dede:datalist} - - - - - - - {/dede:datalist} - - - -
-
分类管理
- -
ID分类名称分类描述操作
{dede:field.id/}{dede:field.typename/}{dede:field.description/}编辑 | 删除
 
- + + + + +发送邮件 + + + +
+
+
邮件订阅
+
+ + + + + + + + + + + {dede:datalist} + + + + + + + {/dede:datalist} + + + +
+
分类管理
+ +
ID分类名称分类描述操作
{dede:field.id/}{dede:field.typename/}{dede:field.description/}编辑 | 删除
 
+ \ 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新文档HTML: - 更新栏目HTML -
-
选择栏目: - GetOptionArray($cid,$admin_catalogs,0); - echo ""; - ?> -
起始ID: - (空或0表示从头开始)
结束ID: - (空或0表示直到结束ID)
每页生成: - 个文件
- -   -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 更新文档 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新文档: + 更新栏目 +
+
选择栏目: + GetOptionArray($cid,$admin_catalogs,0); + echo ""; + ?> +
起始ID: + (空或0表示从头开始)
结束ID: + (空或0表示直到结束ID)
每页生成: + 个文件
+ +   +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ \ 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 - - - - - - -
-
-
HTML更新
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新自由列表HTML: -
-
  起始ID: -    - > - (空或0表示从头开始) -
  结束ID: -    - > - (空或0表示直到结束ID) -
  每批生成:    - - 个文件
- -  
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
- -
- - + + + + + 更新自由列表 + + + + + +
+
+
更新自由列表
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新自由列表: +
+
  起始ID: +    + > + (空或0表示从头开始) +
  结束ID: +    + > + (空或0表示直到结束ID) +
  每批生成:    + + 个文件
+ +  
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+ +
+ \ 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 @@ - - - - - 主页更新向导 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - appid = $cfg_bizcore_appid; - $client->key = $cfg_bizcore_key; - $data = $client->AdminPWDExists(); - $data = json_decode($data->data); - $rs = (array)($data->result); - - if($rs["admin_pwd_exists"] == "false") {?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
主页更新向导: 
-
选择主页模板: - - -
- 默认的情况下,生成的主页文件放在CMS的安装目录,如果您的CMS不是安装在网站根目录的,又想把主页创建到网站根目录,那么请用相对路径来表示“主页位置”。
- 例:您的CMS安装在 - http://www.abc.com/DedeBIZ/ 目录,您想生成的主页为 http://www.abc.com/index.html,那么主页位置就应该用: - “../index.html”。
主页位置: - -
相关选项: - - -
首页模式: - -
- 首页防篡改(主页位置更改请重新启动DedeBIZ商业组件) -
设置DedeBIZ操作密码: - - 设定后所有的DedeBIZ涉及安全操作输入当前操作密码 -
重复DedeBIZ操作密码: - -
DedeBIZ操作密码: - -
首页状态: - - -
- 尚未开启DedeBIZ商业组件 如何启动组件 -
   - - -   -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 更新首页 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + appid = $cfg_bizcore_appid; + $client->key = $cfg_bizcore_key; + $data = $client->AdminPWDExists(); + $data = json_decode($data->data); + $rs = (array)($data->result); + if($rs["admin_pwd_exists"] == "false") { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新首页向导: 
+
选择首页模板: + + +
默认的情况下,生成的首页文件放在CMS的安装目录,如果您的CMS不是安装在网站根目录的,又想把首页创建到网站根目录,那么请用相对路径来表示“首页位置” +
例:您的CMS安装在 http://www.abc.com/DedeBIZ/ 目录,您想生成的首页为 http://www.abc.com/index.html,那么首页位置就应该用:“../index.html”
首页位置:
相关选项: + + +
首页模式: + +
首页防篡改(首页位置修改请重新启动商业组件)
设置操作密码:设定后所有的DedeBIZ涉及安全操作输入当前操作密码
重复操作密码: + +
操作密码: + +
首页状态: + + +
尚未开启DedeBIZ商业组件 如何启动组件 +
+ + +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ \ 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
获取栏目JS文件:栏目管理 -
-
选择栏目: - GetOptionArray($cid,$admin_catalogs,0,1); - echo ""; - ?> -
JS文件: - - - -
模板文件: - -
更新选项: - - -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 更新脚本 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新脚本:栏目管理 +
+
选择栏目: + GetOptionArray($cid,$admin_catalogs,0,1); + echo ""; + ?> +
JS文件: + + + +
模板文件: + +
更新选项: + + +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ \ 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新栏目HTML: - 更新文档HTML - 栏目管理 -
-
选择栏目: - GetOptionArray($cid,$admin_catalogs,0,1); - echo ""; - ?> -
每次最大创建页数: - 个文件
是否更新子栏目: - - -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 更新栏目 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新栏目: + 更新文档 + 栏目管理 +
+
选择栏目: + GetOptionArray($cid,$admin_catalogs,0,1); + echo ""; + ?> +
每次最大创建页数: 个文件
是否更新子栏目: + + +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ \ 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文件 - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新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 HTML 更新标签 - Tag标签管理 + 标签管理
选择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 ""; - ?> + 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 ""; + ?>
每次最大创建页数: - 个文件 每次最大创建页数: 个文件
说明: + 说明: 仅更新文档数多于的关键词
更新所有Tag将会智能更新在[Tag标签管理]中重新获取更新的内容
Tag首页模板文件://tag.htm
Tag列表页模板文件://taglist.htm
- 生成静态文件后,访问动态文件则直接跳转到静态文件,如果需要动态访问,删除对应文件即可。 + 生成静态文件后,访问动态文件则直接跳转到静态文件,如果需要动态访问,删除对应文件即可
- - + +
+ - + + +
进行状态: 进行状态: - - - - - - - - - - - - - - - - - - - - $value) - { - $bgcolor = ($key % 2 == 0)? '#E6F3CD' : '#FFFFFF'; - ?> - - - - - - - - - - - - - - - - - - - - - -
- - - - -
远程服务器同步向导: [更新同步目录]
- 选择项目(站点根目录)项目说明选择服务器状态
[系统]' : '' ;?>
功能说明:本功能主要用于本地服务器文件同远程服务器进行同步,这里我们有几个是系统文件夹(Html生成、文件上传、专题)是必须要同远程服务器同步的,当然也有可选文件夹,用户可以在系统根目录\data\config.file.inc.php文件中进行修改(修改方法已在文件中说明)。
-      -
- - - - -
进行状态: - [增大] [缩小]
- -
- + + + + +远程服务器同步 + + + + + + + + + + + + + + + + + + + + + + $value) + { + $bgcolor = ($key % 2 == 0)? '#E6F3CD' : '#FFFFFF'; + ?> + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
远程服务器同步向导: [更新同步目录]
+
+  选择 + 项目(站点根目录)项目说明选择服务器状态
[系统]' : '' ;?>
功能说明:本功能主要用于本地服务器文件同远程服务器进行同步,这里我们有几个是系统文件夹(Html生成、文件上传、专题)是必须要同远程服务器同步的,当然也有可选文件夹,用户可以在系统根目录\data\config.file.inc.php文件中进行修改(修改方法已在文件中说明)
+      + +
+ + + + +
进行状态: + [增大] [缩小]
+ +
+
+ \ 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格式,视音频和附件为限定扩展名的类型(可在系统参数中修改)
- - + + - - - - + - - @@ -144,5 +135,4 @@
媒体类型: + -
说明标题: - + +
参数说明: + 图片不需要指定“宽”、“高”,其它附加参数仅方便多媒体文件管理,没其它含义
附加参数:宽: - - (像素) 高: - - (像素) 播放时间: - - (分钟) + 宽:(像素) + 高:(像素) + 播放时间:(分钟) +
上传文件:数量: - - -   + 数量: + +  
  -
-
-
-
-
+
+
+
+
+
+
- \ 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 @@ @@ -57,30 +53,25 @@ - + - - @@ -90,51 +81,39 @@ - 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]; + ?> - + @@ -156,5 +135,4 @@ if($myrow['mediatype']==1)
- - + +
更改媒体:修改媒体: 附件/媒体数据管理
@@ -47,7 +43,7 @@
媒体类型: - + -
说明标题: - + +
附加参数: - 宽: - - (像素) 高: - - (像素) 播放时间: - - (分钟) + + 宽:(像素) + 高:(像素) + 播放时间:(分钟)
原文件: - + ' target='_blank'>[查看]
预览: - ' target='_blank'>" target="_blank">
- 更改文件: - 修改文件:
- \ 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 @@ - - - - - 附件数据管理 - - - - - - - - -
- - 单击关闭预览 - -
- - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - -
附件数据管理 - 上传新文件 -
-
- - - - - - - - - - - -
 关键字: - - - - - - -
-
选择文件标题文件大小上传会员上传时间文件类型管理
- - - - {dede:field.title/} - - {dede:field.filesize function='GetFileSize(@me)'/}{dede:field.adminname function="UploadAdmin(@me,$fields['membername'])"/}{dede:field.uptime function="MyDate('Y-m-d H:i',@me)"/}{dede:field.mediatype function="MediaType(@me,$fields['url'])"/} - 更改 - 删除 -
-   -   -   -
- {dede:pagelist listsize=5/} -
-
- - + + + + + 附件数据管理 + + + + + + + +
+ + 单击关闭预览 + +
+ + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + +
附件数据管理 + 上传新文件 +
+
+ + + + + + + + + + + +
 关键词: + + + + + + +
+
选择文件标题文件大小上传会员上传时间文件类型管理
+ + + + {dede:field.title/} + + {dede:field.filesize function='GetFileSize(@me)'/}{dede:field.adminname function="UploadAdmin(@me,$fields['membername'])"/}{dede:field.uptime function="MyDate('Y-m-d H:i',@me)"/}{dede:field.mediatype function="MediaType(@me,$fields['url'])"/} + 修改 + 删除 +
+   +   +   +
+ {dede:pagelist listsize=5/} +
+
+ \ 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:datalist} - - - - - - - - - - - - {/dede:datalist} - - - - - - -
- - - - - -
注册会员列表 - 所有会员 | - 被禁言用户 | - 被推荐 | - 普通   -
-
选择mid登录名email/昵称性别会员等级会员属性最后登录操作
{dede:field.mid/} - (禁言)"; - if($fields['spacesta']==-1) echo "(未审核)"; - if(!empty($fields['face'])) { - echo "
浏览会员空间"; - } - ?> -
- {dede:field.email/} -
- 昵称:{dede:field.uname/} -
- {dede:field.sex /} - - {dede:field.rank function="GetMemberName(@me,'限制会员')"/} - - {dede:field.mtype /}用户 {dede:field.matt function="GetMAtt(@me)" /} -
- 金币:{dede:field.money /} 积分:{dede:field.scores /} -
- {dede:field.logintime function="MyDate('y-m-d H:i',@me)" /} -
- 【{dede:field.loginip /}】 -
- 修改 - 删除 - 文档 - 提升 -
-   - - - - (如果已经整合了论坛的用户请不要使用批量删除功能)
- {dede:pagelist listsize='6' /} -
-
- - +{dede:config.pagesize value="20"/} + + + + + 网站会员管理 + + + + + + + + + + + +
+
+ + + + + + + + + + +
关键词: 排序: + + + + + + +
+
+
+
+ + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + {/dede:datalist} + + + + + + +
+ + + + + +
注册会员列表 + 所有会员 | + 被禁言用户 | + 被推荐 | + 普通   +
+
选择mid登录名email/昵称性别会员等级会员属性最后登录操作
{dede:field.mid/} + (禁言)"; + if($fields['spacesta']==-1) echo "(未审核)"; + if(!empty($fields['face'])) { + echo "
浏览会员空间"; + } + ?> +
+ {dede:field.email/} +
+ 昵称:{dede:field.uname/} +
+ {dede:field.sex /} + + {dede:field.rank function="GetMemberName(@me,'限制会员')"/} + + {dede:field.mtype /}用户 {dede:field.matt function="GetMAtt(@me)" /} +
+ 金币:{dede:field.money /} 积分:{dede:field.scores /} +
+ {dede:field.logintime function="MyDate('y-m-d H:i',@me)" /} +
+ 【{dede:field.loginip /}】 +
+ 修改 + 删除 + 文档 + 提升 +
+   + + + + (如果已经整合了论坛的用户请不要使用批量删除功能)
+ {dede:pagelist listsize='6' /} +
+
+ \ 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 @@ - - - - - 业务管理 - - - - - - - - - - - -
-
- - - - - - -
输入订单号: - -
-
-
- - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - - -
会员消费管理: - - - - - - -
-
选择订单号产品名称产品类型生成日期金额状态会员
- ' class='np'> - - - - - - - - ({dede:field.mtime function="floorTime(time()-@me,@me)"/}) - - - - - - -
-   - - - - -
- {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} -
- - + + + + + 业务管理 + + + + + + + + + + +
+
+ + + + + + +
输入订单号: + +
+
+
+ + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + + +
会员消费管理: + + + + + + +
+
选择订单号产品名称产品类型生成日期金额状态会员
+ ' class='np'> + + + + + + + + ({dede:field.mtime function="floorTime(time()-@me,@me)"/}) + + + + + + +
+   + + + + +
+ {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} +
+ \ 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:datalist} - - - - - - - - - - {/dede:datalist} - - - -
- - - - - - -
短信列表 群发短信 单独短信
-
发送时间标题已读?{dede:global name='postuser'/}内容文件夹操作
{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:pagelist listsize=6/}
- - - +{dede:page pagesize="20"/} + + + + + 用户短信管理 + + + + + + +
+
+
短信管理
+
+ + + + +
+
+ + + + + + + + + +
 关键词: + +  用户: + + + +
+
+
+ + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + +
+ + + + + + +
短信列表 群发短信 单独短信
+
发送时间标题已读?{dede:global name='postuser'/}内容文件夹操作
{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: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 @@ - - - - -用户短信管理 - - - - -
-
-
短信管理
-
- - - - -
-
- - - - - - - - - -
 关键字: -  用户: -
-
-
- - - - - - - - - - -
- 短信列表 群发短信 单独短信 -
-
- - - - - - - - - - - - - - - -
标题: - 标题少于70个字符内
- 1000个字符以内
 
-
-
 
- + + + + +用户短信管理 + + + + +
+
+
短信管理
+
+ + + + +
+
+ + + + + + + + + +
 关键词: 用户: +
+
+
+ + + + + + + + + + +
+ 短信列表 群发短信 单独短信 +
+
+ + + + + + + + + + + + + + + +
标题: + 标题少于70个字符内
+ 1000个字符以内
 
+
+
 
+ \ 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 @@ - - - - -用户短信管理 - - - - -
-
-
短信管理
-
- - - - -
-
- - - - - - - - - -
 关键字: -  用户: -
-
-
- - - - - - - - - - -
- 短信列表 群发短信 单独短信 -
-
- - - - - - - - - - - - - - - - - - - -
发送到:" size="28" maxlength="20" style="width:250px;height:16px;margin-top:5px;margin-left:10px;"/> - 填写用户的登录id(网址uid=后面跟的id)
标题: - 标题少于70个字符内
- 1000个字符以内
 
-
-
 
- + + + + +用户短信管理 + + + + +
+
+
短信管理
+
+ + + + +
+
+ + + + + + + + + +
 关键词: +  用户: +
+
+
+ + + + + + + + + + +
+ 短信列表 群发短信 单独短信 +
+
+ + + + + + + + + + + + + + + + + + + +
发送到:" size="28" maxlength="20" style="width:250px;height:16px;margin-top:5px;margin-left:10px"> + 填写用户的登录id(网址uid=后面跟的id)
标题: + 标题少于70个字符内
+ 1000个字符以内
 
+
+
 
+ \ 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 @@ - - - - - 会员权限管理 - - - - - - -
- - - - - - - - - - - - - - - - - GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
会员管理 > 会员级别设置:
级别名称和级别值:(注册会员这个级别不能删除,否则会员系统将会无法正常使用某些功能)
级别名称会员等级值默认金币默认积分类型状态
- id<=5) { echo "系统"; } - else { echo "用户"; } - ?>id == 3) echo 'disabled="disabled"';?> class="np" value="1" checked='checked' /> - 正在使用
新增一个级别:(由于会员升级是以级别值由低向高升级的,因此增加组别时需注意此值的设置, - 如果您增加新的会员组的级别值低于10,将自动被视为普通的注册会员。)
级别名称 级别值(待审为0,注册会员为10) 默认金币 默认积分 操作设置  
- 增加等级  
 
-
- - + + + + + 会员权限管理 + + + + + +
+ + + + + + + + + + + + + + + + + GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
会员管理 > 会员级别设置:
级别名称和级别值:(注册会员这个级别不能删除,否则会员系统将会无法正常使用某些功能)
级别名称会员等级值默认金币默认积分类型状态
+ id<=5) { echo "系统"; } + else { echo "用户"; } + ?>id == 3) echo 'disabled="disabled"';?> class="np" value="1" checked='checked' /> + 正在使用
新增一个级别:(由于会员升级是以级别值由低向高升级的,因此增加组别时需注意此值的设置, + 如果您增加新的会员组的级别值低于10,将自动被视为普通的注册会员)
级别名称 级别值(待审为0,注册会员为10) 默认金币 默认积分 操作设置  
+ 增加等级  
 
+
+ \ 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{ - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
用户名:".$row['userid'].""; - if($row['face']!='') { - echo "
"; - } - ?>
用户笔名: -  (发布文章后显示责任编辑的名字) -
用户密码: -  (留空则不修改,只能用'0-9a-zA-Z.@_-!'以内范围的字符)
用户类型:
负责频道: - (按 Ctrl 可以进行多选)
真实姓名: -  
电子邮箱: -  
安全验证串: - -   - (复制本代码: )
  -    -
- -
- - + + + + + 提升为管理员 + + + + + + + + + + + + + + + + + +
会员管理 >> 提升为管理员
已经是管理员了,不要再提升了"; + } else { + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
用户名:".$row['userid'].""; + if($row['face']!='') { + echo "
"; + } + ?>
用户笔名: +  (发布文章后显示责任编辑的名字) +
用户密码: +  (留空则不修改,只能用'0-9a-zA-Z.@_-!'以内范围的字符)
用户类型:
负责频道: + (按 Ctrl 可以进行多选)
真实姓名: +  
电子邮箱: +  
安全验证串: + +   + (复制本代码: )
  +    +
+ +
+ \ 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 @@ - - - - - 会员类型管理 - - - - - - - - - - - - - - - - - - - - SetQuery("Select * From #@__member_type"); - $dsql->Execute(); - $k=0; - while($row = $dsql->GetObject()) - { - $k++; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
会员产品分类: - - -
-
产品名称会员级别产品价格会员期限(天)状态
- - - - - - (元) - - - - - 保留 -
 新增一个会员产品类型:
- - - - - - (元) - - - - - 新增 -
 
- -
- - + + + + + 会员类型管理 + + + + + + + + + + + + + + + + + + + SetQuery("Select * From #@__member_type"); + $dsql->Execute(); + $k=0; + while($row = $dsql->GetObject()) + { + $k++; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
会员产品分类: + + +
+
产品名称会员级别产品价格会员期限(天)状态
+ + + + + + (元) + + + + + 保留 +
 新增一个会员产品类型:
+ + + + + + (元) + + + + + 新增 +
 
+ +
+ \ 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 @@ - - - - -查看会员 - - - - - - - - - - - - - - - - - -
会员管理 >> 查看会员
- 当前用户是网站管理员关连的帐号,请小心操作"; - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0)? $mhasDay : '该会员已经到期';?> - - - - - - - - - - - - - - - - - - - - - - - - - - -
用户名: - ".$row['userid'].""; - if($row['face']!='') { - echo "
"; - } - ?> -
密 码: - - (不修改留空) -
注册时间: - -  IP: - -
最近登录时间: - -  IP: - -
用户类型: - -
电子邮箱: - -
昵 称: - -
性 别: -   - - -
金币 : - - 积分:
等级:SetQuery("Select `rank`,membername From `#@__arcrank` where `rank`>0"); - $dsql->Execute('n'); - $MemberTypes[0] = "限制会员"; - while($nrow = $dsql->GetObject('n')){ - $MemberTypes[$nrow->rank] = $nrow->membername; - } - $options = "\r\n"; - echo $options; - ?>
升级时间: - " id="uptime" name="uptime"> - (如果您要升级会员,必须设置此时间为当前时间)
会员天数: - (如果您要升级会员,会员天数必须大于0)
会员剩余天数:
推荐级别: - - - (0为普通,1为推荐,10为管理员[不能在前台登录] - {非管理员ID是严格使用10属性的,要新建管理在 系统帐号 的地方增加}) -
资料状况: - -
空间信息: - GetOne("Select * From `#@__member_tj` where mid='{$row['mid']}' "); - echo "文章:{$nrow['article']} 图集:{$nrow['album']} 文档:{$nrow['archives']} 收藏:{$nrow['stow']}"; - echo "
空间访问:{$nrow['homecount']} 页面访问:{$nrow['pagecount']} 留言:{$nrow['feedback']} 好友:{$nrow['friend']} "; - ?> -
特殊操作: - &jumpurl=../member/edit_fullinfo.php' target='_blank'>查看/修改详细资料 -  |  - ' target='_blank'>登录到此用户控制面板 -  |  - ' target='_blank'>浏览此用户的空间 -
  - -    - -
-
- + + + + +查看会员 + + + + + + + + + + + + + + + + + +
会员管理 >> 查看会员
+ 当前用户是网站管理员关连的帐号,请小心操作"; + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0)? $mhasDay : '该会员已经到期';?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
用户名: + ".$row['userid'].""; + if($row['face']!='') { + echo "
"; + } + ?> +
密 码: + + (不修改留空) +
注册时间: + +  IP: + +
最近登录时间: + +  IP: + +
用户类型: + +
电子邮箱: + +
昵 称: + +
性 别: +   + + +
金币 : + + 积分:
等级:SetQuery("Select `rank`,membername From `#@__arcrank` where `rank`>0"); + $dsql->Execute('n'); + $MemberTypes[0] = "限制会员"; + while($nrow = $dsql->GetObject('n')){ + $MemberTypes[$nrow->rank] = $nrow->membername; + } + $options = "\r\n"; + echo $options; + ?>
升级时间: + " id="uptime" name="uptime"> + (如果您要升级会员,必须设置此时间为当前时间)
会员天数: + (如果您要升级会员,会员天数必须大于0)
会员剩余天数:
推荐级别: + + + (0为普通,1为推荐,10为管理员[不能在前台登录] + {非管理员ID是严格使用10属性的,要新建管理在 系统帐号 的地方增加}) +
资料状况: + +
空间信息: + GetOne("Select * From `#@__member_tj` where mid='{$row['mid']}' "); + echo "文章:{$nrow['article']} 图集:{$nrow['album']} 文档:{$nrow['archives']} 收藏:{$nrow['stow']}"; + echo "
空间访问:{$nrow['homecount']} 页面访问:{$nrow['pagecount']} 留言:{$nrow['feedback']} 好友:{$nrow['friend']} "; + ?> +
特殊操作: + &jumpurl=../user/edit_fullinfo.php' target='_blank'>查看/修改详细资料 +  |  + ' target='_blank'>登录到此用户控制面板 +  |  + ' target='_blank'>浏览此用户的空间 +
  + +    + +
+
+ \ 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 @@ - - - - - - - - -模块打包 - - - - -
-
-
模块管理
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 模块管理 - > 模块修改: - -
模块名称: - -
开发者ID: - 如何获取开发者ID? -
语言编码: - -
封装类型: - - - - -
模块识别码: - - (不可改) -
发布时间: - -
是否涉及会员系统: - - -
'> - 导航使用名称: - -
-导航使用网址: - -(用相对于会员中心的网址,如:../ask) -
-
后台管理菜单: - -
- (普通插件或模板、补丁类不要填写,模块菜单格式请参考inc/inc_menu_module.php) -
使用说明文件: - - - - - - - -
- 使用协议或说明: -
如果需要带HTML格式,请编译后点击修改时使用HTML -
- -
-
安装程序: - -
-
' id='autosetupinput'> - -
-
' id='autosetupct'> - - - - - - - -
- 请使用MySQL4.0版本格式的SQL语句: -
- MySQL4.1/5.x版本请把创建表语句 ENGINE=MyISAM DEFAULT CHARSET=* ,改为 TYPE=MyISAM ,SQL语句允许换行,但必须用 ";换行" 表示一条SQL语句结束 -
- 如果SQL中包含有模块网址的,用 _ROOTURL_ 表示,如:_ROOTURL_/ask/index.php -
- -
-
- -
删除程序: - -
-
' id='autodelinput'> - -
-
' id='autodelct'> - - - - - - - -
- 卸载时执行的SQL语句: -
- (SQL允许换行,但必须用 ";换行" 表示一条SQL语句结束) -
- -
-
- -
模块文件选项: - - -
文件列表:

每行指定一个文件或目录,路径为相对于本目录,本目录的文件则直接用文件名即可,对于整个打包的目录,不需要指定子目录里的文件。
- 如:
- 如果已经指定了: ../book 则不需要再指定目录里的 ../book/index.php 等文件或目录,系统会自动索引整个目录,
- 对于不需要索引整个目录的,请不要指定这个目录,否则可能会把不必要的文件也放进模块中。
- -

-
开发者私钥: -

- 开发者认证后获取的私钥 -
- -

-
- - - - - -
  - -
- + + + + + + + + +模块打包 + + + + +
+
+
模块管理
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 模块管理 + > 模块修改: + +
模块名称: + +
开发者ID: + 如何获取开发者ID +
语言编码: + +
封装类型: + + + + +
模块识别码: + + (不可改) +
发布时间: + +
是否涉及会员系统: + + +
'> + 导航使用名称: + +
+导航使用网址: + +(用相对于会员中心的网址,如:../ask) +
+
后台管理菜单: + +
+ (普通插件或模板、补丁类不要填写,模块菜单格式请参考inc/inc_menu_module.php) +
使用说明文件: + + + + + + + +
+ 使用协议或说明: +
如果需要带HTML格式,请编译后点击修改时使用HTML +
+ +
+
安装程序: + +
+
' id='autosetupinput'> + +
+
' id='autosetupct'> + + + + + + + +
+ 请使用MySQL4.0版本格式的SQL语句: +
+ MySQL4.1/5.x版本请把创建表语句 ENGINE=MyISAM DEFAULT CHARSET=* ,改为 TYPE=MyISAM ,SQL语句允许换行,但必须用 ";换行" 表示一条SQL语句结束 +
+ 如果SQL中包含有模块网址的,用 _ROOTURL_ 表示,如:_ROOTURL_/ask/index.php +
+ +
+
+ +
删除程序: + +
+
' id='autodelinput'> + +
+
' id='autodelct'> + + + + + + + +
+ 卸载时执行的SQL语句: +
+ (SQL允许换行,但必须用 ";换行" 表示一条SQL语句结束) +
+ +
+
+ +
模块文件选项: + + +
文件列表:

每行指定一个文件或目录,路径为相对于本目录,本目录的文件则直接用文件名即可,对于整个打包的目录,不需要指定子目录里的文件
+ 如:
+ 如果已经指定了:../book 则不需要再指定目录里的 ../book/index.php 等文件或目录,系统会自动索引整个目录,
+ 对于不需要索引整个目录的,请不要指定这个目录,否则可能会把不必要的文件也放进模块中
+ +

+
开发者私钥: +

+ 开发者认证后获取的私钥 +
+ +

+
+ + + + + +
  + +
+ \ 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、DedeBIZV6的后台管理程序的开发注意事项。
-
1、Dede模块开发介绍
 
2、如何对我开发的模块进行打包?
 
3、开发模块安装程序和卸载程序的注意事项。
 
4、DedeBIZ的后台管理程序的开发注意事项。
 
 
- - + + + + + + + 模块打包 + + + + +
+
+
模块管理
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 模块管理 + > DedeBIZ模块开发指南:
+ + + + + + + + + + + + + + + + +
目录
1、Dede模块开发介绍
2、如何对我开发的模块进行打包
3、开发模块安装程序和卸载的注意事项
4、DedeBIZV6的后台管理程序的开发注意事项
+
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 @@ - - - - - - - - - 模块打包 - - - - - -
-
-
模块管理
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
模块管理 - > 模块打包:
模块名称: -
语言编码: - - (不同编码模块可以使用,但不能在此打包) - -
封装类型: - - - - -
开发者ID: - 如何获取开发者ID? -
发布时间: -
是否涉及会员系统: - - - - -
后台管理菜单: - -
- (普通插件或模板、补丁类不要填写,模块菜单格式请参考inc/inc_menu_module.php) -
使用说明文件: - -
-
- -
- -
安装程序: - -
-
- -
- - -
删除程序: - -
-
- -
- - -
文件列表: -

- 每行指定一个文件或目录,路径为相对于本目录,本目录的文件则直接用文件名即可,对于整个打包的目录,不需要指定子目录里的文件。
- 如:如果已经指定了: ../book 则不需要再指定目录里的 ../book/index.php 等文件或目录,系统会自动索引整个目录,
- 对于不需要索引整个目录的,请不要指定这个目录,否则可能会把不必要的文件也放进模块中。
- -

-
开发者私钥: -

- 开发者认证后获取的私钥 -
- -

-
- - - - - - - -
  - - - -
-
- - + + + + + + + + + 模块打包 + + + + +
+
+
模块管理
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
模块管理 + > 模块打包:
模块名称: +
语言编码: + + (不同编码模块可以使用,但不能在此打包) + +
封装类型: + + + + +
开发者ID: + 如何获取开发者ID +
发布时间: +
是否涉及会员系统: + + + + +
后台管理菜单: + +
+ (普通插件或模板、补丁类不要填写,模块菜单格式请参考inc/inc_menu_module.php) +
使用说明文件: + +
+
+ +
+ +
安装程序: + +
+
+ +
+ + +
删除程序: + +
+
+ +
+ + +
文件列表: +

+ 每行指定一个文件或目录,路径为相对于本目录,本目录的文件则直接用文件名即可,对于整个打包的目录,不需要指定子目录里的文件
+ 如:如果已经指定了:../book 则不需要再指定目录里的 ../book/index.php 等文件或目录,系统会自动索引整个目录,
+ 对于不需要索引整个目录的,请不要指定这个目录,否则可能会把不必要的文件也放进模块中
+ +

+
开发者私钥: +

+ 开发者认证后获取的私钥 +
+ +

+
+ + + + + + + +
  + + + +
+
+ \ 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 @@ - - - - - 新增频道 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 内容模型管理 - > 新增内容模型: -
- 频道ID
- 数字,创建后不可更改,并具有唯一性。 -
- * -
- 名字标识
- 与文档的模板相关连,建议由英文、数字或下划线组成,因为部份Unix系统无法识别中文文件,频道默认文档模板是 - “default/article_名字标识.htm”,列表模板、封面模板类推。 -
- * -
- 频道名称
- 频道的中文名称,在后台管理,前台发布等均使用此名字。 -
- * -
- 附加表
- 频道除主表以外其它自定义类型数据存放数据的表,如果您不使用主表关连的各种特性(推荐、会员权限等),也可以使用完全以附加表作为存储数据。 -
- - 必须由英文、数字、下划线组成 * - -
- 模型性质
- 如果为系统模型将禁止删除,此选项不可更改,对于独立模型,系统强制创建字段aid,typeid,senddate,title, mid, - channel,独立模型的文档内容必须点击栏目进入列表才能管理。
- - - -
- 是否支持会员投稿 - - - -
- 会员许可投稿级别 - - -
- 许可投稿会员组 - - SetQuery("Select * from `#@__member_model`"); - $dsql->Execute(); - while($row3 = $dsql->GetObject()) - { - echo "\r\n"; - } - ?> - -
- 会员稿件默认状态 - - - -
- 投稿标题使用名称 - -
- 投稿是否使用摘要
- 如果不使用主表(独立模型),缩略图设置同。
- - -
- 投稿是否使用缩图 - - - -
- 默认栏目ID
- 与投稿是唯一性结合可以用模型设计自定义表单 -
-
- 投稿具有唯一性
- 如果投稿是唯一的(会员只能在这个模型对应的栏目中发布单篇文档),其作用相当于自定义表单 -
- - -
- 档案发布程序 - - - * -
- 档案修改程序 - - - * -
- 档案管理程序 - - - * -
- 前台会员发布程序 - - -
- 前台会员修改程序 - - -
- 前台会员管理程序 - - -
- - - - - - -
  - - - -
-
- - + + + + + 新增频道 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 内容模型管理 + > 新增内容模型: +
+ 频道ID
+ 数字,创建后不可修改,并具有唯一性 +
+ * +
+ 名字标识
+ 与文档的模板相关连,建议由英文、数字或下划线组成,因为部份Unix系统无法识别中文文件,频道默认文档模板是 + “default/article_名字标识.htm”,列表模板、封面模板类推 +
+ * +
+ 频道名称
+ 频道的中文名称,在后台管理,前台发布等均使用此名字 +
+ * +
+ 附加表
+ 频道除主表以外其它自定义类型数据存放数据的表,如果您不使用主表关连的各种特性(推荐、会员权限等),也可以使用完全以附加表作为存储数据 +
+ + 必须由英文、数字、下划线组成 * + +
+ 模型性质
+ 如果为系统模型将禁止删除,此选项不可修改,对于独立模型,系统强制创建字段aid,typeid,senddate,title, mid, + channel,独立模型的文档内容必须点击栏目进入列表才能管理
+ + + +
+ 是否支持会员投稿 + + + +
+ 会员许可投稿级别 + + +
+ 许可投稿会员组 + + SetQuery("Select * from `#@__member_model`"); + $dsql->Execute(); + while($row3 = $dsql->GetObject()) + { + echo "\r\n"; + } + ?> + +
+ 会员稿件默认状态 + + + +
+ 投稿标题使用名称 + +
+ 投稿是否使用摘要
+ 如果不使用主表(独立模型),缩略图设置同
+ + +
+ 投稿是否使用缩图 + + + +
+ 默认栏目ID
+ 与投稿是唯一性结合可以用模型设计自定义表单 +
+
+ 投稿具有唯一性
+ 如果投稿是唯一的(会员只能在这个模型对应的栏目中发布单篇文档),其作用相当于自定义表单 +
+ + +
+ 档案发布程序 + + + * +
+ 档案修改程序 + + + * +
+ 档案管理程序 + + + * +
+ 前台会员发布程序 + + +
+ 前台会员修改程序 + + +
+ 前台会员管理程序 + + +
+ + + + + + +
  + + + +
+
+ \ 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、栏目ID、发布时间、文档标题。
- -
频道ID
- 数字,创建后不可更改,并具有唯一性。
-
名字标识
- 与文档的模板相关连,建议由英文、数字或下划线组成,因为部份Unix系统无法识别中文文件,频道默认文档模板是 - “default/article_名字标识.htm”,列表模板、封面模板类推。
-
频道名称
- 频道的中文名称,在后台管理,前台发布等均使用此名字。
附加表
- 频道除主表以外其它自定义类型数据存放数据的表,如果您不使用主表关连的各种特性(推荐、会员权限等),也可以使用完全以附加表作为存储数据。 -
- ( #@__ 是表示数据表前缀)
是否支持会员投稿 - -
会员许可投稿级别 -
许可投稿会员组 - SetQuery("Select * from `#@__member_model`"); - $dsql->Execute(); - while($row3 = $dsql->GetObject()) - { - echo " \r\n"; - } - ?> -
会员稿件默认状态 - - -
档案发布程序
档案修改程序
档案管理程序
前台会员发布程序
前台会员修改程序
前台会员管理程序
列表附加字段
- 用","分开,可以在列表模板{dede:list}{/dede:list}中用[field:name /]调用
-
投稿标题使用名称 -
- 投稿是否使用摘要 -
- 如果不使用主表(独立模型),缩略图设置同。 -
- -
投稿是否使用缩图 - -
默认栏目ID
- 与投稿是唯一性结合可以用模型设计自定义表单
-
投稿具有唯一性
- 如果投稿是唯一的(会员只能在这个模型对应的栏目中发布单篇文档),其作用相当于自定义表单
- -
- - - - - - - - - - - - - - - - - - -
- - - - - - -
 
-
-
- ShowItem2();"; -} -?> - - + + + + + 修改内容模型 + + + + + + +
+ + + '> + + + + +
+ 内容模型管理 + > 修改内容模型: +
+ + + + +
+ + + + + +
 基本设置 字段管理 
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 您目前所展开的是系统模型,系统模型一般对发布程序和管理程序已经固化,如果您胡乱修改系统模型将会导致使用这种内容类型的频道可能崩溃
模型性质
+ 如果为系统模型将禁止删除,此选项不可修改,对于独立模型,系统强制创建字段aid、栏目ID、发布时间、文档标题
+ +
频道ID
+ 数字,创建后不可修改,并具有唯一性
+
名字标识
+ 与文档的模板相关连,建议由英文、数字或下划线组成,因为部份Unix系统无法识别中文文件,频道默认文档模板是 + “default/article_名字标识.htm”,列表模板、封面模板类推
+
频道名称
+ 频道的中文名称,在后台管理,前台发布等均使用此名字
附加表
+ 频道除主表以外其它自定义类型数据存放数据的表,如果您不使用主表关连的各种特性(推荐、会员权限等),也可以使用完全以附加表作为存储数据 +
+ ( #@__ 是表示数据表前缀)
是否支持会员投稿 + +
会员许可投稿级别 +
许可投稿会员组 + SetQuery("Select * from `#@__member_model`"); + $dsql->Execute(); + while($row3 = $dsql->GetObject()) + { + echo " \r\n"; + } + ?> +
会员稿件默认状态 + + +
档案发布程序
档案修改程序
档案管理程序
前台会员发布程序
前台会员修改程序
前台会员管理程序
列表附加字段
+ 用","分开,可以在列表模板{dede:list}{/dede:list}中用[field:name /]调用
+
投稿标题使用名称 +
+ 投稿是否使用摘要 +
+ 如果不使用主表(独立模型),缩略图设置同 +
+ +
投稿是否使用缩图 + +
默认栏目ID
+ 与投稿是唯一性结合可以用模型设计自定义表单
+
投稿具有唯一性
+ 如果投稿是唯一的(会员只能在这个模型对应的栏目中发布单篇文档),其作用相当于自定义表单
+ +
+ + + + + + + + + + + + + + + + + + +
+ + + + + + +
 
+
+
+ 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 @@ - - - - -增加字段 - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- 频道管理 >> 增加新字段: - - - -
-
- -
表单提示文字:
- 发布内容时显示的提示文字
- - *
字段名称:
- - 只能用英文字母或数字,数据表的真实字段名,如果数据类型是联动类型,该项应该填写联动类型的[组名称]。 - -
- - * -
字段类型: - - -
- 前台参数: - -
- -
- 内容是否需要分页符:
- 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段! -
- - -   - -
- 数据类型: - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
默认值:
- - 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”)。 - -
- -
最大长度:
- - 文本数据必须填写,大于255为text类型 - -
- -
自定义表单HTML: - ◆自定义表单HTML模板中用~name~表示提示文字,~form~表示表单元素。 -
- -
- - - - - - -
  - - - -
-
-
- + + + + +增加字段 + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ 频道管理 >> 增加新字段: + + + +
+
+ +
表单提示文字:
+ 发布内容时显示的提示文字
+ + *
字段名称:
+ + 只能用英文字母或数字,数据表的真实字段名,如果数据类型是联动类型,该项应该填写联动类型的[组名称] + +
+ + * +
字段类型: + + +
+ 前台参数: + +
+ +
+ 内容是否需要分页符:
+ 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段! +
+ + +   + +
+ 数据类型: + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
默认值:
+ + 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”) + +
+ +
最大长度:
+ + 文本数据必须填写,大于255为text类型 + +
+ +
自定义表单HTML: + 自定义表单HTML模板中用~name~表示提示文字,~form~表示表单元素 +
+ +
+ + + + + + +
  + + + +
+
+
+ \ 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 @@ - - - - - 更改字段 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - > - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
- 频道管理 >> 查看/修改字段: - - - -
-
- 您当前操作的字段属于系统模型字段:修改系统模型有风险,请不要随便改动系统模型的字段相关的属性。
表单提示文字:
- 发布内容时显示的提示文字
- - *(发布内容时显示的项名字)
字段名称:
- 只能用英文字母或数字,数据表的真实字段名
-
字段类型: - -
前台参数: - -
-
数据类型: -
内容模型:
- - 选择关联内容对应的内容模型 - -
- - -
内容是否需要分页符:
- 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段!
- -   -
默认值:
- - 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”),如果为联动选框,这里填写联动选框项目名称。
最大长度:
- 文本数据必须填写,大于255为text类型
-
自定义表单HTML: - ◆自定义表单HTML用~name~表示提示文字,~form~表示表单元素

- - - - - - -
  - -
-
- - + + + + + 修改字段 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ 频道管理 >> 查看/修改字段: + + + +
+
+ 您当前操作的字段属于系统模型字段:修改系统模型有风险,请不要随便改动系统模型的字段相关的属性
表单提示文字:
+ 发布内容时显示的提示文字
+ + *(发布内容时显示的项名字)
字段名称:
+ 只能用英文字母或数字,数据表的真实字段名
+
字段类型: + +
前台参数: + +
+
数据类型: +
内容模型:
+ + 选择关联内容对应的内容模型 + +
+ + +
内容是否需要分页符:
+ 如果内容需要分页符,不论何种内容,都可以用#P#副标题#e#作为分页符号实现内容分页,但一个模型里仅允许一个这样的字段!
+ +   +
默认值:
+ + 如果定义数据类型为select、radio、checkbox时,此处填写被选择的项目(用“,”分开,如“男,女,人妖”),如果为联动选框,这里填写联动选框项目名称
最大长度:
+ 文本数据必须填写,大于255为text类型
+
自定义表单HTML: + 自定义表单HTML用~name~表示提示文字,~form~表示表单元素

+ + + + + + +
  + +
+
+ \ 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' /} - - - - - 内容模型管理 - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - - - -
- - - - - -
内容模型管理 - 增加新模型 - 导入模型 - 联动类别管理 -
-
id号频道名称识别id附加表状态模型管理
{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:pagelist listsize="5"/} -
- 图标说明: - 复制 复制 - 模板 模板 - 导出 导出 - 更改 修改 - 自定义搜索 自定义搜索 - 删除 删除 -
-
- - +{dede:config name='pagesize' value='30' /} + + + + + 内容模型管理 + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + + + +
+ + + + + +
内容模型管理 + 增加新模型 + 导入模型 + 联动类别管理 +
+
id号频道名称识别id附加表状态模型管理
{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: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 @@ - - - - - 修改频道 - - - - - - - - - -
-
-
自定义搜索管理
-
- - - - '> - '> - - - - - - - - - - - - - - = 0) { - ?> - - - - - - - - - - - - - - - - - - - - - - - -
- - 内容模型管理 > 自定义搜索管理: - (自定义搜索在方便搜索的同时在一定程度上降低了效率,请根据需求定义搜索) -
频道ID:
- -
频道名称:
- -
主表可供自定义搜索的字段
- 标题、关键字、摘要为默认选项,不用选择
- -
附件表可供自定义搜索的字段:
- 这里的字段是程序依据字段类型自动选择生成的。
- -
自定义搜索结果页模板
-
- -
- - - - - - -
  - - - -
-
- - - - - -
  进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 修改频道 + + + + + + + + +
+
+
自定义搜索管理
+
+ + + + '> + '> + + + + + + + + + + + + + + = 0) { + ?> + + + + + + + + + + + + + + + + + + + + + + + +
+ + 内容模型管理 > 自定义搜索管理: + (自定义搜索在方便搜索的同时在一定程度上降低了效率,请根据需求定义搜索) +
频道ID:
+ +
频道名称:
+ +
主表可供自定义搜索的字段
+ 标题、关键词、摘要为默认选项,不用选择
+ +
附件表可供自定义搜索的字段:
+ 这里的字段是程序依据字段类型自动选择生成的
+ +
自定义搜索结果页模板
+
+ +
+ + + + + + +
  + + + +
+
+ + + + + +
  进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ \ 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 @@ - - - - -站内新闻发布 - - - - - - - - - - - - - - -
- - - - - -
 站内新闻管理->增加消息 返回管理页 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  说明:站内新闻是为了方便站长发布站点公告而设置的一种小功能,由于要读取包括text字段的信息,应定期删除太旧的信息,否则可能会让模板解析速度变慢。如果没有选择显示频道,则在这个频道中使用这个标记时会被“所有位置...”的标记内容代替。
  站内新闻调用代码: {dede:mynews row='条数' titlelen='标题长度'}Innertext{/dede:mynews},Innertext支持的字段为:[field:title - /],[field:writer /],[field:senddate /](时间),[field:body /]。
标 题: -
显示频道: - -
发言人: - -
日期: -
信息内容: - -
  - -
 
-
- + + + + +站内新闻发布 + + + + + + + + + + + + + + +
+ + + + + +
 站内新闻管理->增加消息 返回管理页 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  说明:站内新闻是为了方便站长发布站点公告而设置的一种小功能,由于要读取包括text字段的信息,应定期删除太旧的信息,否则可能会让模板解析速度变慢如果没有选择显示频道,则在这个频道中使用这个标记时会被“所有位置”的标记内容代替
  站内新闻调用代码:{dede:mynews row='条数' titlelen='标题长度'}Innertext{/dede:mynews},Innertext支持的字段为:[field:title + /],[field:writer /],[field:senddate /](时间),[field:body /]
标 题: +
显示频道: + +
发言人: + +
日期: +
信息内容: + +
  + +
 
+
+ \ 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 @@ - - - - -站内新闻发布 - - - - - - - - - - - - - - - -
- - - - - -
 站内新闻管理->增加消息 返回管理页 -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  说明:站内新闻是为了方便站长发布站点公告而设置的一种小功能,由于要读取包括text字段的信息,应定期删除太旧的信息,否则可能会让模板解析速度变慢。如果没有选择显示频道,则在这个频道中使用这个标记时会被“所有位置...”的标记内容代替。
  站内新闻调用代码: {dede:mynews row='条数' titlelen='标题长度'}Innertext{/dede:mynews},Innertext支持的字段为:[field:title - /],[field:writer /],[field:senddate /](时间),[field:body /]。
标 题: -
显示频道: - -
发言人:
日期:
信息内容: - -
   
 
-
- + + + + +站内新闻发布 + + + + + + + + + + + + + + + +
+ + + + + +
 站内新闻管理->增加消息 返回管理页 +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
说明:站内新闻是为了方便站长发布站点公告而设置的一种小功能,由于要读取包括text字段的信息,应定期删除太旧的信息,否则可能会让模板解析速度变慢如果没有选择显示频道,则在这个频道中使用这个标记时会被“所有位置”的标记内容代替
站内新闻调用代码:{dede:mynews row='条数' titlelen='标题长度'}Innertext{/dede:mynews},Innertext支持的字段为:[field:title /],[field:writer /],[field:senddate /](时间),[field:body /]
标题: +
显示频道: + +
发言人:
日期:
信息内容: + +
   
 
+
+ \ 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"/} - - - - -站内新闻管理 - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - {/dede:datalist} - - - -
- - - - - -
 站内新闻管理 - [新增一则站内新闻] -
-
新闻ID新闻标题所属频道更新时间发布人操作
{dede:field.aid/}{dede:field.title /}{dede:field.typename /}{dede:field.senddate function="GetDateMk(@me)" /}{dede:field.writer /} - [修改] - [删除] -
- {dede:pagelist listsize=6/} -
- +{dede:config.pagesize value="20"/} + + + + +站内新闻管理 + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + {/dede:datalist} + + + +
+ + + + + +
 站内新闻管理 + [新增一则站内新闻] +
+
新闻ID新闻标题所属频道更新时间发布人操作
{dede:field.aid/}{dede:field.title /}{dede:field.typename /}{dede:field.senddate function="GetDateMk(@me)" /}{dede:field.writer /} + [修改] + [删除] +
+ {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 @@ }) - - + - +
+ 1、name 标记名称,该项是必须的属性,以下 2、3是可选属性;
+ 2、ismake 默认是 no 表示设定的纯HTML代码, yes 表示含板块标记的代码;
+ 3、typeid 表示所属栏目的ID,默认为 0 ,表示所有栏目通用的显示内容,在列表和文档模板中,typeid默认是这个列表或文档本身的栏目ID - + - - + + - + - + - + @@ -139,5 +137,4 @@
自定义标记管理>>增加新标记自定义标记管理 >> 增加新标记
@@ -66,17 +64,17 @@
- +
自定义标记的调用方法:
+
自定义标记的调用方法:
{dede:mytag name='标记名称' ismake='是否含板块代码(yes 或 no)' typeid='栏目ID'/} -
- 1、name 标记名称,该项是必须的属性,以下 2、3是可选属性;
- 2、ismake 默认是 no 表示设定的纯HTML代码, yes 表示含板块标记的代码;
- 3、typeid 表示所属栏目的ID,默认为 0 ,表示所有栏目通用的显示内容,在列表和文档模板中,typeid默认是这个列表或文档本身的栏目ID。
所属栏目:所属栏目:
标记名称:标记名称:
时间限制:时间限制: -
开始时间:开始时间: - +
结束时间:结束时间: - +
- \ 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 @@ -更改标记 - +修改标记 + - + - + - + - + - + - + @@ -65,7 +65,7 @@ - +
自定义标记管理>>更改标记自定义标记管理 >> 修改标记
@@ -16,9 +16,9 @@ - +
所属栏目:所属栏目:
标记名称:标记名称:
时间限制:时间限制: > 永不过期 > 在设内时间内有效
开始时间:开始时间:
结束时间:结束时间:
 
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} - + @@ -51,5 +49,4 @@
+ 自定义标记管理  增加一个标记  智能标记向导
编号 标记名称 所属栏目管理
{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调用
- \ 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 @@ - - - - - 智能标记向导 - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - -
自定义标记管理 >> 智能标记生成向导:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
列表样式:
- - - - - - - -
- - - -
-
调用栏目: - GetOptionArray(0,$admin_catalogs,0,1); - 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 "\r\n"; - } - echo ""; - ?> - 附加属性: - \r\n"; - echo "\r\n"; - $tl->dsql->SetQuery("Select * From #@__arcatt"); - $tl->dsql->Execute(); - while($row = $tl->dsql->GetObject()) - { - echo "\r\n"; - } - echo ""; - ?>
调用记录条数: - -  显示列数: - -  标题长度: - - (1 字节 = 0.5个中文字)
高级筛选: - - -  关键字: - - (","逗号分开)
排列顺序: - -   - -
文档发布时间: - - 天以内 (0 表示不限)
提取特定文档:    - -
单条记录样式(InnerText):
-
- - 支持字段: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)/]
-
- -   -
-
输出结果:
-
- -
-
-
- - - + + + + + 智能标记向导 + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
自定义标记管理 >> 智能标记生成向导:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
列表样式:
+ + + + + + + +
+ + + +
+
调用栏目: + GetOptionArray(0,$admin_catalogs,0,1); + 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 "\r\n"; + } + echo ""; + ?> + 附加属性: + \r\n"; + echo "\r\n"; + $tl->dsql->SetQuery("Select * From #@__arcatt"); + $tl->dsql->Execute(); + while($row = $tl->dsql->GetObject()) + { + echo "\r\n"; + } + echo ""; + ?>
调用记录条数: + +  显示列数: + +  标题长度: + + (1 字节 = 0.5个中文字)
高级筛选: + + +  关键词: + + (","逗号分开)
排列顺序: + +   + +
文档发布时间: + + 天以内 (0 表示不限)
提取特定文档:   + +
单条记录样式(InnerText):
+
+ + 支持字段: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"/} - - - - - 插件管理 - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - {/dede:datalist} - - - -
- - - - - -
插件管理 - [安装新插件] -
-
ID号插件名称插件作者管理
{dede:field.aid /}{dede:field.plusname /}{dede:field.writer /}{dede:field.isshow function="GetSta(@me,$fields['aid'],$fields['plusname'])"/}
- {dede:pagelist listsize=6/} -
-
- - +{dede:config.pagesize value="50"/} + + + + + 插件管理 + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + {/dede:datalist} + + + +
插件管理[安装新插件]
ID号插件名称插件作者管理
{dede:field.aid /}{dede:field.plusname /}{dede:field.writer /}{dede:field.isshow function="GetSta(@me,$fields['aid'],$fields['plusname'])"/}
+ {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、如果您设置了某频道为默认发布表单,以后将不再显示此向导,而是直接显示您所选的频道的发布表单,如果想要发布其它频道的内容,可以从左边的目录树中选择,如果以后您想要修改默认发布表单,请点击目录树上方的“发布向导”图标;
- - - - - - - - - - GetArray()){ - $i++; - $row['mancon'] = ($row['mancon']=='' ? 'content_list.php?channelid='.$row['id'] : $row['mancon'].'?channelid='.$row['id']); - $checkbox = ($row['isdefault']==0 ? '' : ' checked'); - if($checkbox!=''){ - echo "\r\n"; - } - $catnum = GetCatalogs($dsql,$row['id']); - ?> - - - - - - - - - -
选择频道ID频道内容模型附加表栏目数操作选项
/> - 管理栏目 - 0){ - ?> - 管理内容 - 发布内容 - - | - 管理内容 - | - 发布内容 - -
- - - - -
- -    - -
-
 
- - + + + + +内容发布向导 + + + + + + + + + + + + + + +
 内容发布向导:
+ + + + +
+ + + + +
内容发布说明:
+ 1、必须先建立与频道内容模型关连的栏目才能发布内容(栏目管理);
+ 2、如果您设置了某频道为默认发布表单,以后将不再显示此向导,而是直接显示您所选的频道的发布表单,如果想要发布其它频道的内容,可以从左边的目录树中选择,如果以后您想要修改默认发布表单,请点击目录树上方的“发布向导”图标;
+ + + + + + + + + + GetArray()){ + $i++; + $row['mancon'] = ($row['mancon']=='' ? 'content_list.php?channelid='.$row['id'] : $row['mancon'].'?channelid='.$row['id']); + $checkbox = ($row['isdefault']==0 ? '' : ' checked'); + if($checkbox!=''){ + echo "\r\n"; + } + $catnum = GetCatalogs($dsql,$row['id']); + ?> + + + + + + + + + +
选择频道ID频道内容模型附加表栏目数操作选项
/> + 管理栏目 + 0){ + ?> + 管理内容 + 发布内容 + + | + 管理内容 + | + 发布内容 + +
+ + + + +
+ +    + +
+ + \ 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 @@ - - - - - - 文档管理 - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - - - - - -
- 文档回收站   -
ID选择文章标题更新时间类目点击操作
{dede:field.id/} - {dede:field.title/} - {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typename/}{dede:field.click/}还原 | 删除
-   - 全选 - 取消 -  还原  -  删除 
- {dede:pagelist listsize=3/}
- - + + + + + 文档管理 + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ 文档回收站   +
ID选择文章标题更新时间类目点击操作
{dede:field.id/} + {dede:field.title/} + {dede:field.senddate function='GetDateMk(@me)'/}{dede:field.typename/}{dede:field.click/}还原 | 删除
+   + 全选 + 取消 +  还原  +  删除 
{dede:pagelist listsize=3/}
+ \ 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 @@ - - - - - 配送方式配置 - - - - - - - -
-
- - - - - - - - - - - - - - - - - - - - -
- 增加一个配送方式 -
-   名称: - -  *此处填写配送方式名称
-   手续费: - - - 元 -  *发货时所用的手续费,若要收取,请填写(精确到小数位两位) -
-   简要说明: - - -  最多100个文字内,简要说明一下。 -
- - - - - -
- - - -
-
-
-
- - - - - - - - - - - -
-  已有配送方式列表 -
- - - - - - - - -
- - - - 手续费: - - 元 -
-
-
- -
-
-
- - + + + + + 配送方式配置 + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + +
+ 增加一个配送方式 +
+   名称: + +  *此处填写配送方式名称
+   手续费: + + + 元 +  *发货时所用的手续费,若要收取,请填写(精确到小数位两位) +
+   简要说明: + + +  最多100个文字内,简要说明一下 +
+ + + + + +
+ + + +
+
+
+
+ + + + + + + + + + + +
+  已有配送方式列表 +
+ + + + + + + + +
+ + + + 手续费: + + 元 +
+
+
+ +
+
+
+ \ 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 @@ - - - - - 订单管理 - - - - - - - - - - - -
-
- - - - - - -
输入订单号: - -
-
-
- - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - - - - - {/dede:datalist} - - - - - - - -
- - - - - - -
订单列表: - - - - - - - -
-
选择订单号收货人数量生成日期订单价配送费总计支付方式状态用户
- ' class='np'> - - - - - - 详情 - - - ({dede:field.stime function="floorTime(time()-@me,@me)"/}) - - - - - - - - - - - - -
  - - - - - -
- {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} -
- - + + + + + 订单管理 + + + + + + + + + + +
+
+ + + + + + +
输入订单号: + +
+
+
+ + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+ + + + + + +
订单列表: + + + + + + + +
+
选择订单号收货人数量生成日期订单价配送费总计支付方式状态用户
+ ' class='np'> + + + + + + 详情 + + + ({dede:field.stime function="floorTime(time()-@me,@me)"/}) + + + + + + + + + + + + +
  + + + + + +
+ {dede:pagelist listitem="info,index,end,pre,next,pageno" listsize="5"/} +
+ \ 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 @@ + + + + +<?php echo $oid;?> + + + + + + + + +{dede:datalist} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{/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: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 @@ - - - - -<?php echo $rows['oid'];?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
订单号: 
配送: 方式: 费用:
收货人: 
地址: 
邮编: 
电话: 
E-Mail: 
留言: 
- - + + + + +<?php echo $rows['oid'];?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
订单号: 
配送: 方式: 费用:
收货人: 
地址: 
邮编: 
电话: 
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 @@ - - - - - 增加软件集 - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
 软件列表>>发布新软件 -   栏目管理 - 下载频道参数设定 
- - - - - - -
- - - - - -
 常规信息 高级参数
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 软件名称:  简略标题:
-
- - - - - -
 自定义属性:SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') - echo " "; - else - echo " "; - } - ?>
-
- - - - - - - -
 Tag标签: - - (','号分开,单个标签小于12字节)权重:(越小越靠前)
-
- - - - - - -
 缩 略 图: - - - - -
- - - - - - 选择图片 - - - -
-
- -
-
- - - - - - - - -
 软件来源: - 软件作者: 
-
- - - - - -
 软件主栏目: - - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -   - 选择副栏目"; - } - ?> -
-
- - - - - - - -
 文件类型: - 软件等级:
-
- - - - - - - - - -
 软件类型: - 界面语言: 授权方式: -
-
- - - - - -
 运行环境: - -
-
- - - - - - - -
 官方网址: - 演示地址: -
-
- - - - - -
 软件大小: - -
-
 下载限制:
- - - - - - - - - - -
 需会员权限: - 需消费金币: -
  (如果设定了下载限制,软件频道设置中“附件下载方式:”必须选择“链接到跳转页面”)
-
 本地软件选择:
- - - - - -
 本地地址: - - - 服务器名称: - -
-
 预设的镜像服务器:
- (服务器地址 + 软件地址 = 软件真实地址 [软件频道设置])
- - : - - + - - - -
- startNum = $startNum;\r\n"; - ?> -
 手动指定地址:
- - - - - -
其它地址: - - -   - - (最多为30个链接) -
- -
 软件详细介绍:
- - - - - -
 附加选项: - - - 设置 -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
  - - - - - -
-
-
-
- - - + + + + + 增加软件集 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
 软件列表 >> 发布软件栏目管理下载频道参数设定
+ + + + +
+ + + + + +
常规信息高级参数
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 软件名称: 简略标题:
+
+ + + + + +
 自定义属性:SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') + echo " "; + else + echo " "; + } + ?>
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + +
+
+
+ + + + + + + + +
 软件来源:软件作者:
+
+ + + + + +
 软件主栏目: + + getUserChannel(),$channelid); + echo ""; + ?> + + 快捷选择 + 选择副栏目"; + } + ?> +
+
+ + + + + + + +
 文件类型: + + 软件等级: +
+
+ + + + + + + + + +
 软件类型: + + 界面语言:授权方式: + +
+
+ + + + + +
 运行环境:
+
+ + + + + + + +
 官方网址:演示地址:
+
+ + + + + +
 软件大小: + + + +
+
 下载限制:
+ + + + + + + + + + +
 需会员权限: + + 需消费金币: 个
(如果设定了下载限制,软件频道设置 中“附件下载方式:”必须选择“链接到跳转页面”)
+
 本地软件选择:
+ + + + + +
 本地地址: + + + 服务器名称: + +
+
 预设的镜像服务器:
(服务器地址 + 软件地址 = 软件真实地址)
+ + : + + + + + + +
+ startNum = $startNum;\r\n"; + ?> +
 手动指定地址:
+ + + + + +
 其它地址: + + +   + (最多为30个链接) +
+ +
 软件详细介绍:
+ + + + + +
 附加选项: + + + 设置  + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + \ 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 @@ - - - - - 编辑软件 - - - - - - - - - - - - - - - - - - -
- - - - - - - - - -
 &dopost=listArchives">&dopost=listArchives">软件列表>>更改软件 -   栏目管理 
- - - - -
- - - - - -
 常规参数 高级参数 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 文章标题:  简略标题:
-
- - - - - -
 自定义属性: - SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; - else $jumpclick = ''; - if(preg_match("#".$trow->att."#",$arcRow['flag'])) - echo " "; - else - echo " "; - } - ?>
-
- - - - - -
 跳转网址: - " />
-
- - - - - - - -
 Tag标签: - (','号分开,单个标签小于12字节) 权重: - (越小越靠前)
-
- - - - - - -
-  缩 略 图: - - "> - - - - 选择图片 - - - - - " - style="height: 80px"> -
-
- - - - - - - - -
 软件来源: "> 软件作者:">  
-
- - - - - -
 文章主栏目: - getUserChannel(),$channelid); - echo ""; - ?> - 快捷选择 -
-
- - - - - -
 软件副栏目: - - ' style='width:200px;' /> - 选择副栏目
-
- - - - - - - -
 文件类型: - 软件等级:
-
- - - - - - - - - -
 软件类型: - 界面语言: 授权方式: -
-
- - - - - - - -
 运行环境: - -  软件大小: - " /> -
-
- - - - - - - -
 官方网址: - " - style='width:200px' /> - 程序演示: - " - style='width:200px' /> -
-
 下载限制:
- - - - - - - - - - -
 需会员权限: - - 需消费金币: - 个 -
  (如果设定了下载限制,软件频道设置中“附件下载方式:”必须选择“链接到跳转页面”)
-
 软件链接列表:
- - - - - -
 其它地址: - - -   - - (最多为30个链接) -
-
- - -
 软件详细介绍:
- - - - - -
 附加选项: - -
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
  - - - - - -
- - - -
-
-
-
- - - - + + + + + 修改软件 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
 &dopost=listArchives">软件列表 >> 修改软件  栏目管理
+ + + + +
+ + + + + +
常规参数高级参数
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 文章标题:  简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') $jumpclick = " onclick='ShowUrlTr()'"; + else $jumpclick = ''; + if(preg_match("#".$trow->att."#",$arcRow['flag'])) + echo " "; + else + echo " "; + } + ?> +
+
+ + + + + +
 跳转网址:
+
+ + + + + + + +
 Tag标签:(','号分开,单个标签小于12字节)权重:(越小越靠前)
+
+ + + + + + +
 缩略图: + + + 上传图片 + + + + +
+
+ + + + + + + + +
 软件来源: 软件作者:
+
+ + + + + +
 文章主栏目: + getUserChannel(),$channelid); + echo ""; + ?> + 快捷选择 +
+
+ + + + + +
 软件副栏目: + + ' style='width:200px;' /> + 选择副栏目
+
+ + + + + + + +
 文件类型: + 软件等级: +
+
+ + + + + + + + + +
 软件类型: + + 界面语言:授权方式: + +
+
+ + + + + + + +
 运行环境: 软件大小:">
+
+ + + + + + + +
 官方网址:程序演示:
+
 下载限制:
+ + + + + + + + + + +
 需会员权限: + + 需消费金币: 个
(如果设定了下载限制,软件频道设置 中“附件下载方式:”必须选择“链接到跳转页面”)
+
 软件链接列表:
+ + + + + +
 其它地址: + + +   + (最多为30个链接) +
+
+ + +
 软件详细介绍:
+ + + + + +
 附加选项: + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+ + + \ 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 @@ - - - - - 专题发布向导 - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - -
 专题列表 - >> 发布专题 更新HTML 
- - - - -
- - - - - -
 常规参数 专题文档 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 专题名称: 简略标题:
-
- - - - - -
 自定义属性:SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att!='j') - { - echo " "; - } - } - ?>
-
- - - - - - -
 缩 略 图: - - - - -
- - - - - 选择图片 - - - -
-
-
- - - - - - - -
 责任编辑:发布选项: - -
-
- - - - - - - - -
 内容排序:标题颜色:
-
- - - - - -
 主分类:getUserChannel(), 0); - echo ""; - ?> - 快捷选择 -
-
- - - - - - -
 关键字: /> - 自动获取,手动填写用","分开
-
-
- - - - - - -
 专题简介: 
-
- - - - - -
 发布时间:"; - ?> -
-
- - - - - - - - -
-  评论选项: - - - -   - 浏览次数:' - style='width:100px;' />
-
- - - - - -
 专题模板: -
-
- - - - - -
 自定义文件名: - (不包括后缀名如.html等)
-
- - - - - - - - - - - - -
- - - - - -
  - - - - - -
-
-
-
- - - + + + + + 发布专题 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
 专题列表 >> 发布专题 更新HTML
+ + + + +
+ + + + + +
常规参数专题文档
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 专题名称: 简略标题:
+
+ + + + + +
 自定义属性:SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att!='j') + { + echo " "; + } + } + ?>
+
+ + + + + + +
 缩略图: + + + + +
+ + + 上传图片 + + +
+
+
+ + + + + + + +
 责任编辑:发布选项: + + +
+
+ + + + + + + + +
 内容排序: + + 标题颜色:
+
+ + + + + +
 主分类: + getUserChannel(), 0); + echo ""; + ?> + 快捷选择 +
+
+ + + + + + +
 关键词: + + + />自动获取,手动填写用","分开
+
+ + + + + + +
 专题简介:
+
+ + + + + +
 发布时间:"; + ?> +
+
+ + + + + + + +
 评论选项: + +   + 浏览次数:
+
+ + + + + +
 专题模板: + + +
+
+ + + + + +
 自定义文件名: + (不包括后缀名如.html等)
+
+ + + + + + + + + + + + +
+ + +
+
+ + \ 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 @@ - - - - - 更改专题 - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - -
 专题列表 - >> 修改专题更新HTML 
- - - - -
- - - - - -
 常规参数 专题文档 
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
 专题名称: - -  简略标题: - -
-
- - - - - -
 自定义属性: - SetQuery("Select * From `#@__arcatt` order by sortid asc"); - $dsql->Execute(); - while($trow = $dsql->GetObject()) - { - if($trow->att=='j') continue; - if(preg_match("#".$trow->att."#", $arcRow['flag'])) - echo " "; - else - echo " "; - } - ?> -
-
- - - - - - -
-  缩 略 图: - - "> - - - - 选择图片 - - - - - " - style="height: 80px"> -
-
- - - - - -
 专题模板: - " /> - -
-
- - - - - - - -
 责任编辑: - " /> - 发布选项: - -
-
- - - - - - - - -
 内容排序: - 标题颜色: - " /> - - -
-
- - - - - - -
 主 分 类: - getUserChannel(),0); - echo ""; - ?> - 快捷选择 -  
-
- - - - - -
 关键字: " /> -
-
- - - - - -
 专题说明: -
-
- - - - - - - -
 评论选项: - -   - - 浏览次数: - ' style='width:100px;' /> -
-
- - - - - -
 发布时间: - "; - ?> -
-
- - - - - - -
 更新时间: - - "; - ?> -  
-
- - - - - - -
 自定义文件名: - " />(不包括后缀名如.html等) -  
-
- -
- - - - - - - - - - - - -
- - - - - -
  - - - - - -
-
-
- -
- - + + + + + 修改专题 + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
 专题列表 >> 修改专题更新HTML
+ + + + +
+ + + + + +
常规参数专题文档
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
 专题名称: 简略标题:
+
+ + + + + +
 自定义属性: + SetQuery("Select * From `#@__arcatt` order by sortid asc"); + $dsql->Execute(); + while($trow = $dsql->GetObject()) + { + if($trow->att=='j') continue; + if(preg_match("#".$trow->att."#", $arcRow['flag'])) + echo " "; + else + echo " "; + } + ?> +
+
+ + + + + + +
 缩略图: + + + 上传图片 + + +
+
+ + + + + +
 专题模板: + "> + +
+
+ + + + + + + +
 责任编辑:发布选项: + + +
+
+ + + + + + + + +
 内容排序: + + 标题颜色:">
+
+ + + + + + +
 主分类: + getUserChannel(),0); + echo ""; + ?> + 快捷选择 +
+
+ + + + + +
 关键词:
+
+ + + + + +
 专题说明:
+
+ + + + + + + +
 评论选项: + +   + + 浏览次数:' style='width:100px;' />
+
+ + + + + +
 发布时间: + "; + ?> +
+
+ + + + + + +
 更新时间: + "; + ?> +
+
+ + + + + + +
 自定义文件名:">(不包括后缀名如.html等)
+
+ +
+ + + + + + + + + + + + +
+ + +
+ +
+ \ 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"/} - - - - - - 联动枚举管理 - - - - - - - - - - - - -
-
-
- - - - - - - -
-
·联动枚举组管理
- -
- - - - - - - - - - -
请选择组别: - - - - - - - -
- 灰色字的为系统内置枚举,您是不能对它进行删除修改操作的,但可以添加或修改它的元素。
-
- 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 .= "\r\n"; - else $options .= "\r\n"; - } - } - - // 如果添加3级之类 - if($topvalue % 500 != 0) $arr['issign'] = 2; -?> - - - - - - - -
-
-  · - > - 子分类管理 -
-
- 把默认省市地区表导入 "; - } - ?> -
-
-
- - - -
-  隶属分类: - -
-
-  分类名称: -
-
- -
-
-   如果没选择隶属分类则表示增加的是顶级分类,用半角逗号","分开可以一次增加多个分类。 -
-
-
- - - - - - - - - - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - - {/dede:datalist} - - - - - - - -
-
-  ·枚举组列表 - > - > 子分类列表 -
-
-
选择编号枚举名类别组名枚举类型枚举值组内排序操作
{dede:field.id /} - 500 && $fields['evalue']%500 != 0) $fields['ename'] = " └─".$fields['ename']; - } else { - $fields['ename'] = " └───".$fields['ename']; - } - ?> - - {dede:field.egroup /} - 500 && $fields['evalue']%500 != 0) echo '二级选择'; - else echo '一级选择'; - } else { - echo "三级选择"; - } - ?>{dede:field.evalue /} - - 更新 - 删除 - ".$egroups[$fields['egroup']].""; - } - ?> -
-   - 全选/反选 -   - 删除所选 -
- {dede:pagelist listsize=6/} -
- - - - - - - - - - - - - - - {dede:datalist} - - - - - - - - - - {/dede:datalist} - - - -
-
-  ·枚举组列表 -
-
-
选择编号组类别名级数系统缓存组名操作
{dede:field.id /} {dede:field.itemname /} - - {dede:field.issystem function="@me==1 ? '是' : '否'" /} {dede:field.egroup /} - 更新缓存 - 查看子分类 -
- {dede:pagelist listsize=6/} -
- - - +{dede:config.pagesize value="30"/} + + + + + 联动枚举管理 + + + + + + + + + + + +
+
+
+ + + + + + + +
+
联动枚举组管理
+ +
+ + + + + + + + + + +
请选择组别: + + + + + + + +
+ 灰色字的为系统内置枚举,您是不能对它进行删除修改操作的,但可以添加或修改它的元素
+
+ 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 .= "\r\n"; + else $options .= "\r\n"; + } + } + + //如果添加3级之类 + if($topvalue % 500 != 0) $arr['issign'] = 2; +?> + + + + + + + +
+
+  · + > + 子分类管理 +
+
+ 把默认省市地区表导入 "; + } + ?> +
+
+
+ + + +
+  隶属分类: + +
+
+  分类名称: +
+
+ +
+
+  如果没选择隶属分类则表示增加的是顶级分类,用半角逗号","分开可以一次增加多个分类 +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + + + + + +
+
+  ·枚举组列表 + > + > 子分类列表 +
+
+
选择编号枚举名类别组名枚举类型枚举值组内排序操作
{dede:field.id /} + 500 && $fields['evalue']%500 != 0) $fields['ename'] = " └─".$fields['ename']; + } else { + $fields['ename'] = " └───".$fields['ename']; + } + ?> + + {dede:field.egroup /} + 500 && $fields['evalue']%500 != 0) echo '二级选择'; + else echo '一级选择'; + } else { + echo "三级选择"; + } + ?>{dede:field.evalue /} + + 更新 + 删除 + ".$egroups[$fields['egroup']].""; + } + ?> +
+   + 全选/反选 +   + 删除所选 +
+ {dede:pagelist listsize=6/} +
+ + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + {/dede:datalist} + + + +
+
+  ·枚举组列表 +
+
+
选择编号组类别名级数系统缓存组名操作
{dede:field.id /} {dede:field.itemname /} + + {dede:field.issystem function="@me==1 ? '是' : '否'" /} {dede:field.egroup /} + 更新缓存 + 查看子分类 +
+ {dede:pagelist listsize=6/} +
+ + \ 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 .= "\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 .= "\r\n"; - } - else - { - $options .= "\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 .= "\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 .= "\r\n"; + } + else + { + $options .= "\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:datalist} - - - - - - - - - - - {/dede:datalist} - - - -
- - - - - -
管理员帐号 - 编辑绩效统计 - 增加管理员 - 用户组管理 - -
-
-
登录ID笔名级别频道管理项
{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:pagelist listsize='7' /} -
- - +{dede:config.pagesize value="20"/} + + + + + 管理员帐号 + + + + + + + + + + + + + + + + + + + + {dede:datalist} + + + + + + + + + + + {/dede:datalist} + + + +
+ + + + + +
管理员帐号 + 编辑绩效统计 + 增加管理员 + 用户组管理 + +
+
+
登录ID笔名级别频道管理项
{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: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 @@
- - + + - - - - - - - - @@ -125,5 +123,4 @@
用户登录ID: +  (只能用'0-9'、'a-z'、'A-Z'、'.'、'@'、'_'、'-'、'!'以内范围的字符)
用户笔名: +  (发布文章后显示责任编辑的名字)
用户密码: +  (只能用'0-9'、'a-z'、'A-Z'、'.'、'@'、'_'、'-'、'!'以内范围的字符)
用户组: +
授权栏目: +
真实姓名: +  
电子邮箱: +  
安全验证串: - - + + +   - (复制本代码: ) + (复制本代码: )
- \ 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 @@
- - - + + + - + - - - - - + - + - @@ -101,5 +97,4 @@
用户登录ID:
用户笔名: -  (发布文章后显示责任编辑的名字) + +  (发布文章后显示责任编辑的名字)
用户密码: - + +  (留空则不修改,只能用'0-9a-zA-Z.@_-!'以内范围的字符)
用户类型: +
负责频道: +
真实姓名:    
电子邮箱:    
安全验证串: - - + + +   - (复制本代码: ) + (复制本代码: )
- \ 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 @@ - - - - - 更新系统缓存 - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -
更新系统缓存: 
-
- 本程序作默认会执行下面的操作: -
- 1、更新栏目缓存 - 2、更新枚举缓存 - 3、清理arclist调用缓存 - 4、清理过期会员访问历史 - 5、删除过期短信 -
- -
- (该项操作很占资源,如果没有出现页码不正确、无法解析文档等情况,不要执行本操作) -
- -
- - - - - -
进行状态: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 更新系统缓存 + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
更新系统缓存: 
+
+ 本程序作默认会执行下面的操作: +
+ 1、更新栏目缓存 + 2、更新枚举缓存 + 3、清理arclist调用缓存 + 4、清理过期会员访问历史 + 5、删除过期短信 +
+ +
+ (该项操作很占资源,如果没有出现页码不正确、无法解析文档等情况,不要执行本操作) +
+ +
+ + + + + +
进行状态: + + [增大] [缩小] +
+
+
+ +
+
+ \ 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 @@ - - - - - 数据库维护 - - - - - - - - - - - - - - - - - - - - - - - - - - - - \r\n"; - ?> - - - - - - - - - - \r\n"; - } - echo "\r\n"; - } - ?> - - - - - - - - - - - - - - \r\n"; - ?> - - - - - - - - - - \r\n"; - } - echo "\r\n"; - } - ?> - - - - - - - - - - - - - - - - -
- - - - - -
数据库管理 - 数据还原 - SQL命令行工具 -
-
DedeBIZV6默认系统表:
选择表名记录数操作选择表名记录数操作
- - - - - - - 优化 - 修复 - 结构 - - - - - - - - 优化 - 修复 - 结构 -
其它数据表:
选择表名记录数操作选择表名记录数操作
- - - - - - - 优化 - 修复 - 结构 - - - - - - - - 优化 - 修复 - 结构 -
-   - -   - -   - -
数据备份选项:
- - - - - - - -
当前数据库版本:
- 分卷大小: - - K , - - - - 完成后压缩成ZIP - - -
-
进行状态:
- -
- - + + + + + 数据库维护 + + + + + + + + + + + + + + + + + + + + + + + + + + + \r\n"; + ?> + + + + + + + + + + \r\n"; + } + echo "\r\n"; + } + ?> + + + + + + + + + + + + + + \r\n"; + ?> + + + + + + + + + + \r\n"; + } + echo "\r\n"; + } + ?> + + + + + + + + + + + + + + + + +
+ + + + + +
数据库管理 + 数据还原 + SQL命令行工具 +
+
DedeBIZV6默认系统表:
选择表名记录数操作选择表名记录数操作
+ + + + + + + 优化 + 修复 + 结构 + + + + + + + + 优化 + 修复 + 结构 +
其它数据表:
选择表名记录数操作选择表名记录数操作
+ + + + + + + 优化 + 修复 + 结构 + + + + + + + + 优化 + 修复 + 结构 +
+   + +   + +   + +
数据备份选项:
+ + + + + + + +
当前数据库版本:
+ 分卷大小: + + K , + + + + 完成后压缩成ZIP + + +
+
进行状态:
+ +
+ \ 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 @@ - - - - - 数据批量替换 - - - - - - - - - - - -
-
-
批量管理
-
- - - - - - - - - - - - - - - - - - - -
- 数据库内容替换: -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
 选择数据表与字段: - - - - - - - - - - -
- SetQuery("Show Tables"); - $dsql->Execute('t'); - if($dsql->GetError()!=''){ - echo "找不到您所指定的数据库 $dbname
"; - echo $qbutton; - } - echo "\r\n"; - $dsql->Close(); - ?>
要替换的字段: - -
-
 替换方式: - - 主键字段: - - (正则模式必须指定) -
 被替换内容:
 替换为:
 替换条件: - (空完全替换)
 安全确认码: - - - - - -
- - - -
-
-
- -
- - - - - -
结果: - - [增大] [缩小] -
-
-
- -
-
- - + + + + + 数据批量替换 + + + + + + + + + + +
+
+
批量管理
+
+ + + + + + + + + + + + + + + + + + + +
+ 数据库内容替换: +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
 选择数据表与字段: + + + + + + + + + + +
+ SetQuery("Show Tables"); + $dsql->Execute('t'); + if($dsql->GetError()!=''){ + echo "找不到您所指定的数据库 $dbname
"; + echo $qbutton; + } + echo "\r\n"; + $dsql->Close(); + ?>
要替换的字段: + +
+
 替换方式: + + 主键字段: + + (正则模式必须指定) +
 被替换内容:
 替换为:
 替换条件: + (空完全替换)
 安全确认码: + + + + + +
+ + + +
+
+
+ +
+ + + + + +
结果: + + [增大] [缩小] +
+
+
+ +
+
+ \ 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 @@ - - - - - 数据库维护--数据还原 - - - - - - - - - - - - - - - - - - \r\n"; - $mtd = " - \r\n"; - echo $mtd; - if(isset($filelists[$i+1])) - { - $i++; - $mtd = " - \r\n"; - echo $mtd; - }else{ - echo "\r\n"; - } - echo "\r\n"; - } - ?> - - - - - - - - - - - - - - - - - - - -
- - - - - -
数据还原 - 数据备份 - SQL命令行工具 -
-
- 发现的备份文件: - -
- - {$filelists[$i]} - - {$filelists[$i]}
-   - -   - -   - -
- 附加参数: -
- -
-   - -
进行状态:
- -
- - + + + + + 数据库维护--数据还原 + + + + + + + + + + + + + + + + + \r\n"; + $mtd = " + \r\n"; + echo $mtd; + if(isset($filelists[$i+1])) + { + $i++; + $mtd = " + \r\n"; + echo $mtd; + } else { + echo "\r\n"; + } + echo "\r\n"; + } + ?> + + + + + + + + + + + + + + + + + + + +
+ + + + + +
数据还原 + 数据备份 + SQL命令行工具 +
+
+ 发现的备份文件: + +
+ + {$filelists[$i]} + + {$filelists[$i]}
+   + +   + +   + +
+ 附加参数: +
+ +
+   + +
进行状态:
+ +
+ \ 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 @@ - - - - - 系统用户组管理 - - - - - - - - - - - - - - - - - - SetQuery("Select `rank`,`typename`,`system` From #@__admintype"); - $dsql->Execute(); - while($row = $dsql->GetObject()) - { - ?> - - - - - - - - - - -
- - - - - -
系统用户组管理 - 增加一个用户组 - 管理系统用户 - -
-
Rank组名称管理
- rank?> - - typename?> - - 权限设定 - 组用户 - system==0){ ?>[删除组] -
 
- - + + + + + 系统用户组管理 + + + + + + + + + + + + + + + + + SetQuery("Select `rank`,typename,`system` From #@__admintype"); + $dsql->Execute(); + while($row = $dsql->GetObject()) + { + ?> + + + + + + + + + + +
+ + + + + +
系统用户组管理 + 增加一个用户组 + 管理系统用户 + +
+
Rank组名称管理
+ 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 @@ - - - - - 组权限设置 - - - - - - - - - - - - - - - - -
系统用户组管理>>增加用户组:
- - - - - - - - - - >#", $line)) - { - if($start>0) echo " \r\n"; - $start++; - $lhead = " - - - - - - - - - - - - - - -
组名称: -
级别值: - (数字,系统已占用的级别值: - SetQuery("Select rank From #@__admintype"); - $dsql->Execute(); - while($row = $dsql->GetObject()) echo ''.$row->rank.'、'; - ?> - ,级别值必须小于10,超过或等于10所有权限设置将无效(超级管理员),如果10个组不能完全满足您的要求,允许使用小数)
{$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 " \r\n"; - $k++; - } - } - $start++; - ?> -
、插件权限
- SetQuery('Select plusname From #@__plus'); - $dsql->Execute(); - while($row=$dsql->GetObject()){ - echo " \r\n"; - $k++; - $l++; - if($l%6==0) echo "
"; - } - ?> -
  - -
-
- - + + + + + 组权限设置 + + + + + + + + + + + + + + + +
系统用户组管理 >> 增加用户组:
+ + + + + + + + + + >#", $line)) + { + if($start>0) echo " \r\n"; + $start++; + $lhead = " + + + + + + + + + + + + + + +
组名称: +
级别值: + (数字,系统已占用的级别值: + SetQuery("Select `rank` From `#@__admintype`"); + $dsql->Execute(); + while($row = $dsql->GetObject()) echo ''.$row->rank.'、'; + ?> + ,级别值必须小于10,超过或等于10所有权限设置将无效(超级管理员),如果10个组不能完全满足您的要求,允许使用小数)
{$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 " \r\n"; + $k++; + } + } + $start++; + ?> +
、插件权限
+ SetQuery('Select plusname From #@__plus'); + $dsql->Execute(); + while($row=$dsql->GetObject()){ + echo " \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 " \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 "\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"; - } -} -?> - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 支付接口配置参数 -
-  
-  接口类型: -
- $val) { ?> -
  • -> -
  • - -
    -
    -  商户号: - -  此处填写您的支付帐号、客户号或客户id等,此帐号在支付服务提供商处取得
    -  邮箱: -  使用支付宝接口时,需填写支付宝账号邮箱
    -  私钥: - -
    -  签约商家请填写“交易安全校验码(key)”;未签约商家不用填写此项.(该项只支持数字和英文字母)
    -  支持交易货币: - - 人民币 *现只支持人民币,根据支付接口与银行卡决定,默认为人民币.
    -  支付手续费: - - 以百分比计算,手续费将计算在产品价格内.如果3% 则填0.03
    -  支付接口申请地址: - 点击申请 -
    - -

    - 财付通是腾讯公司为促进中国电子商务的发展需要,满足互联网用户价值需求,针对网上交易安全而精心推出的一系列服务。 -

    -
    - - - - - - - - -
     如果该配置无效要手动更改,可打开/data/sys_pay.cache.php文件进行手工配置。 -
    - - - - -
     
    -
    -
    - + + + + +支付接口配置 + + + + + +
    +
    + + $val){ + if(!isset(${'payment_'.$value}[$k])) $payment_temp = ''; + else $payment_temp = ${'payment_'.$value}[$k]; + echo ''."\n"; + } +} +?> + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
     支付接口配置参数 +
    +  
    +  接口类型: +
    + $val) { ?> +
  • +> +
  • + +
    +
    +  商户号: + +  此处填写您的支付帐号、客户号或客户id等,此帐号在支付服务提供商处取得
    +  邮箱: +  使用支付宝接口时,需填写支付宝账号邮箱
    +  私钥: + +
    +  签约商家请填写“交易安全校验码(key)”;未签约商家不用填写此项.(该项只支持数字和英文字母)
    +  支持交易货币: + + 人民币 *现只支持人民币,根据支付接口与银行卡决定,默认为人民币.
    +  支付手续费: + + 以百分比计算,手续费将计算在产品价格内.如果3% 则填0.03
    +  支付接口申请地址: + 点击申请 +
    + +

    + 财付通是腾讯公司为促进中国电子商务的发展需要,满足互联网用户价值需求,针对网上交易安全而精心推出的一系列服务 +

    +
    + + + + + + + + +
     如果该配置无效要手动修改,可打开/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:datalist} - - - -
    - - - - - -
    支付接口列表 [查看更多接口] -
    -
    支付方式描述排序管理
    {dede:field.name /}{dede:field.description /}{dede:field.rank /} - - [安装] - - [更改] - [删除] - -
    {dede:pagelist listsize=5/}
    -
    - - - + + + + + 支付接口配置 + + + + + + +
    + + + + + + + + + + + {dede:datalist} + + + + + + + {/dede:datalist} + + + +
    + + + + + +
    支付接口列表 [查看更多接口] +
    +
    支付方式描述排序管理
    {dede:field.name /}{dede:field.description /}{dede:field.rank /} + + [安装] + + [修改] + [删除] + +
    {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 @@ - - - - - 木马自检程序 - - - - - - - - - - - - - - - -
    -
    -
    用户安全中心
    -
    - - - - - - - - - - - - - - - - - - - - -
    - 木马自检程序 -
    - 安全建议: -
    - 1、有条件的用户把中 data、templets、uploads、html、special、images、install目录设置为不允许执行脚本,其它目录禁止写入,系统将更安全;
    - 2、本检测程以开发模式为标准,如果您的网站目录包含其它系统,此检测程序可能会产生错误判断;
    - 3、检测程序会跳过对模板缓存目录的检测,为了安全起见,检测完成后建议清空模板缓存。 -
    -

    文件类型: - -  要检查的文件类型

    -

    代码特征: - -  特征代码

    -
    - -   - -
    检测结果:(结果仅供参考,请务必查看源码后才删除非法文件)
    -
    - - + + + + + 木马自检程序 + + + + + + + + + + + + +
    +
    +
    用户安全中心
    +
    + + + + + + + + + + + + + + + + + + + + +
    + 木马自检程序 +
    + 安全建议: +
    + 1、有条件的用户把中 data、templets、uploads、html、special、images、install目录设置为不允许执行脚本,其它目录禁止写入,系统将更安全;
    + 2、本检测程以开发模式为标准,如果您的网站目录包含其它系统,此检测程序可能会产生错误判断;
    + 3、检测程序会跳过对模板缓存目录的检测,为了安全起见,检测完成后建议清空模板缓存 +
    +

    文件类型: + +  要检查的文件类型

    +

    代码特征: + +  特征代码

    +
    + +   + +
    检测结果:结果仅供参考,请务必查看源码后才删除非法文件
    +
    + \ 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 @@ - + - +
    系统的表信息:系统的表信息: - + - \r\n"; - echo "\r\n"; - } - - //封面频道 - else if ($ispart == 1) { - echo " \r\n"; - echo "\r\n"; - } - - //独立页面 - else if ($ispart == 2) { - echo "\r\n"; - echo "\r\n"; - } - 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','
    {@body}
    '), ('4','www.techweb.com.cn','Techweb','1','gb2312','
    {@body}
    \t\n'), @@ -518,7 +518,6 @@ INSERT INTO `#@__flink` (`sortrank`, `url`, `webname`, `msg`, `email`, `logo`, ` INSERT INTO `#@__flink` (`sortrank`, `url`, `webname`, `msg`, `email`, `logo`, `dtime`, `typeid`, `ischeck`) VALUES (1, 'https://www.dedebiz.com/auth', '授权中心', '', '', '', 1227772703, 1, 2); INSERT INTO `#@__flink` (`sortrank`, `url`, `webname`, `msg`, `email`, `logo`, `dtime`, `typeid`, `ischeck`) VALUES (3, 'https://www.dedebiz.com/git', '代码托管', '', '', '', 1603767210, 1, 1); - INSERT INTO `#@__flinktype` VALUES('1','综合网站'), ('2','娱乐类'), ('3','教育类'), @@ -528,19 +527,19 @@ INSERT INTO `#@__flinktype` VALUES('1','综合网站'), ('7','论坛类'), ('8','其它类型'); -INSERT INTO `#@__freelist` VALUES('1','测试内容','{listdir}/index_{listid}_{page}.html','{cmspath}/freelist/','index.html','1','{style}/list_free.htm','1289712633','100','0','{dede:list pagesize="30" col="1" titlelen="60" orderby="pubdate" orderway="desc" typeid="1" channel="1" }
  • [field:imglink/] [field:textlink/] 日期:[field:pubdate function="getdatemk(@me)"/] 点击:[field:click/] 好评:[field:scores/] \t\n

    [field:description/]...

  • {/dede:list}','阿三大厦大大','阿三大厦大厦大撒'), +INSERT INTO `#@__freelist` VALUES('1','测试内容','{listdir}/index_{listid}_{page}.html','{cmspath}/freelist/','index.html','1','{style}/list_free.htm','1289712633','100','0','{dede:list pagesize="30" col="1" titlelen="60" orderby="pubdate" orderway="desc" typeid="1" channel="1" }
  • [field:imglink/] [field:textlink/] 日期:[field:pubdate function="getdatemk(@me)"/] 点击:[field:click/] 好评:[field:scores/] \t\n

    [field:description/]

  • {/dede:list}','阿三大厦大大','阿三大厦大厦大撒'), ('10','Google SiteMap 生成器','{listdir}googlemap_{page}.xml','{cmspath}','index.html','1','{style}/googlemap.htm','1226884666','100','0','{dede:list pagesize="500" col="1" titlelen="60" orderby="pubdate" orderway="desc" \t\n channel="1" keyword="" }\t\n [field:arcurl function="Gmapurl(@me)"/] \t\n [field:title function="HtmlReplace(@me)"/]\t\n \t\n [field:keywords/]\t\n [field:senddate function="strftime('%Y-%m-%d',@me)"/]\t\n \t\n{/dede:list}','',''); INSERT INTO `#@__member_type` VALUES('1','50','中级会员半年','100','7'); -INSERT INTO `#@__homepageset` VALUES('default/index.htm','../index.html','0'); +INSERT INTO `#@__homepageset` VALUES('{style}/index.htm','../index.html','0'); INSERT INTO `#@__moneycard_type` VALUES('1','100','30','100点卡'), ('2','200','55','200点卡'), ('3','300','75','300点卡'); -INSERT INTO `#@__member_model` VALUES('1','个人','#@__member_person','个人会员模型','1','1','\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\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\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'), -('2','企业','#@__member_company','公司企业会员模型','1','1','\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\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'); +INSERT INTO `#@__member_model` VALUES('1','个人','#@__member_person','个人会员模型','1','1','\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\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\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'), +('2','企业','#@__member_company','公司企业会员模型','1','1','\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\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'); INSERT INTO `#@__scores` VALUES('2','列兵','1','0','1'), ('3','班长','2','1000','1'), @@ -563,12 +562,10 @@ INSERT INTO `#@__shops_delivery` VALUES('1','送货上门','10.21','送货上门 INSERT INTO `#@__member_stowtype` VALUES('sys','系统收藏','archives_do.php'), ('book','小说收藏','/book/book.php?bid'); -INSERT INTO `#@__payment` VALUES('3','alipay','支付宝','2','支付宝网站(www.alipay.com) 是国内先进的网上支付平台。
    DedeCMS联合支付宝推出支付宝接口。
    立即在线申请','1','a:4:{s:14:"alipay_account";a:4:{s:5:"title";s:14:"支付宝用户账号";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:20:"yuan12345xin@163.com";}s:10:"alipay_key";a:4:{s:5:"title";s:14:"交易安全校验码";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:6:"dsfsdf";}s:14:"alipay_partner";a:4:{s:5:"title";s:12:"合作者身份ID";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:1:"1";}s:17:"alipay_pay_method";a:5:{s:5:"title";s:14:"支付宝账号类型";s:11:"description";s:52:"请选择您最后一次跟支付宝签订的协议里面说明的接口类型";s:4:"type";s:6:"select";s:5:"iterm";s:58:"0:使用标准双接口,1:使用担保交易接口,2:使用即时到帐交易接口";s:5:"value";s:1:"1";}}','1','0','1'), -('2','bank','银行汇款/转帐','0','银行名称\t\n收款人信息:全称 ××× ;帐号或地址 ××× ;开户行 ×××。\t\n注意事项:办理电汇时,请在电汇单“汇款用途”一栏处注明您的订单号。','4','a:0:{}','1','1','0'), -('1','cod','货到付款','0','开通城市:×××\t\n货到付款区域:×××','3','a:0:{}','1','1','0'), -('6','yeepay','YeePay易宝','12','YeePay易宝(北京通融通信息技术有限公司)是专业从事多元化电子支付业务一站式服务的领跑者。在立足于网上支付的同时,YeePay易宝不断创新,将互联网、手机、固定电话整合在一个平台上,继短信支付、手机充值之后,首家推出了YeePay易宝电话支付业务,真正实现了离线支付,为更多传统行业搭建了电子支付的高速公路。YeePay易宝融合世界先进的电子支付文化,聚合众多金融、电信、IT、互联网等领域内的巨擘,旨在通过创新的支付机制,推动中国电子商务新进程。YeePay易宝致力于成为世界一流的电子支付应用和服务提供商,专注于金融增值服务和移动增值服务两大领域,创新并推广多元化、低成本的、安全有效的支付服务。','2','a:2:{s:10:"yp_account";a:4:{s:5:"title";s:8:"商户编号";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:2:"aa";}s:6:"yp_key";a:4:{s:5:"title";s:8:"商户密钥";s:11:"description";s:0:"";s:4:"type";s:4:"text";s:5:"value";s:3:"dsa";}}','1','0','1'); +INSERT INTO `#@__payment` VALUES('2','bank','银行汇款/转帐','0','银行名称\t\n收款人信息:全称 ××× ;帐号或地址 ××× ;开户行 ×××\t\n注意事项:办理电汇时,请在电汇单“汇款用途”一栏处注明您的订单号','4','a:0:{}','1','1','0'), +('1','cod','货到付款','0','开通城市:×××\t\n货到付款区域:×××','3','a:0:{}','1','1','0'); -INSERT INTO `#@__softconfig` VALUES('0','1','1','1','http://www.aaa.com | 镜像地址一\t\nhttp://www.bbb.com | 镜像地址二\t\nhttp://www.ccc.com | 镜像地址三\t\n','

    ■ 推荐使用第三方专业下载工具下载本站软件,使用 WinRAR v3.10 以上版本解压本站软件。
    \t\n ■ 如果这个软件总是不能下载的请点击报告错误,谢谢合作!!
    \t\n ■ 下载本站资源,如果服务器暂不能下载请过一段时间重试
    \t\n ■ 如果遇到什么问题,请到本站论坛去咨寻,我们将在那里提供更多 、更好的资源
    \t\n ■ 本站提供的一些商业软件是供学习研究之用,如用于商业用途,请购买正版。

    ','0','0','0','0'); +INSERT INTO `#@__softconfig` VALUES('0','1','1','1','http://www.aaa.com | 下载地址一\t\nhttp://www.bbb.com | 下载地址二\t\nhttp://www.ccc.com | 下载地址三\t\n','

    如果这个软件总是不能下载的请点击报告错误,谢谢合作
    \t\n下载本站资源,如果服务器暂不能下载请过一段时间重试
    \t\n如果遇到什么问题,请联系我们,我们将在那里提供更多,更好的资源

    ','0','0','0','0'); INSERT INTO `#@__stepselect` VALUES('1','血型','blood','1','1'), ('2','体型','bodytype','1','1'), @@ -594,7 +591,7 @@ INSERT INTO `#@__sys_set` VALUES('1','nature','性格外向,性格内向,活泼 ('2','language','普通话,上海话,广东话,英语,日语,韩语,法语,意大利语,德语,西班牙语,俄语,阿拉伯语'); -INSERT INTO `#@__vote` VALUES('1','您是从哪儿得知本站的?','1266336000','1584547200','0','0','1','1','0','0','朋友介绍rn门户网站的搜索引擎rnGoogle或百度搜索rn别的网站上的链接rn其它途径rn'); +INSERT INTO `#@__vote` VALUES('1','您是从哪儿得知本站的','1266336000','1584547200','0','0','1','1','0','0','朋友介绍rn门户网站的搜索引擎rnGoogle或百度搜索rn别的网站上的链接rn其它途径rn'); INSERT INTO `#@__sys_enum` VALUES('139','cms制作','503','vocation','503','0'), ('39','租房','1','house','0','1'), @@ -1455,24 +1452,24 @@ INSERT INTO `#@__sys_enum` VALUES('139','cms制作','503','vocation','503','0'), ('19284','南明区','12501.1','nativeplace','12501','2'), ('19283','贵阳市','12501','nativeplace','12501','1'), ('19282','贵州省','12500','nativeplace','12500','0'), -('19281','雷波县','12021.17','nativeplace','12021','2'), -('19280','美姑县','12021.16','nativeplace','12021','2'), -('19279','甘洛县','12021.15','nativeplace','12021','2'), -('19278','越西县','12021.14','nativeplace','12021','2'), -('19277','冕宁县','12021.13','nativeplace','12021','2'), -('19276','喜德县','12021.12','nativeplace','12021','2'), -('19275','昭觉县','12021.11','nativeplace','12021','2'), -('19274','金阳县','12021.10','nativeplace','12021','2'), -('19273','布拖县','12021.9','nativeplace','12022','2'), -('19272','普格县','12021.8','nativeplace','12022','2'), -('19271','宁南县','12021.7','nativeplace','12022','2'), -('19270','会东县','12021.6','nativeplace','12022','2'), -('19269','会理县','12021.5','nativeplace','12022','2'), -('19268','德昌县','12021.4','nativeplace','12021','2'), -('19267','盐源县','12021.3','nativeplace','12021','2'), -('19266','木里藏族自治县','12021.2','nativeplace','12021','2'), -('19265','西昌市','12021.1','nativeplace','12021','2'), -('19264','凉山彝族自治州','12021','nativeplace','12021','1'), +('19281','雷波县','12022.17','nativeplace','12022','2'), +('19280','美姑县','12022.16','nativeplace','12022','2'), +('19279','甘洛县','12022.15','nativeplace','12022','2'), +('19278','越西县','12022.14','nativeplace','12022','2'), +('19277','冕宁县','12022.13','nativeplace','12022','2'), +('19276','喜德县','12022.12','nativeplace','12022','2'), +('19275','昭觉县','12022.11','nativeplace','12022','2'), +('19274','金阳县','12022.10','nativeplace','12022','2'), +('19273','布拖县','12022.9','nativeplace','12022','2'), +('19272','普格县','12022.8','nativeplace','12022','2'), +('19271','宁南县','12022.7','nativeplace','12022','2'), +('19270','会东县','12022.6','nativeplace','12022','2'), +('19269','会理县','12022.5','nativeplace','12022','2'), +('19268','德昌县','12022.4','nativeplace','12022','2'), +('19267','盐源县','12022.3','nativeplace','12022','2'), +('19266','木里藏族自治县','12022.2','nativeplace','12022','2'), +('19265','西昌市','12022.1','nativeplace','12022','2'), +('19264','凉山彝族自治州','12022','nativeplace','12022','1'), ('19263','得荣县','12020.18','nativeplace','12020','2'), ('19262','稻城县','12020.17','nativeplace','12020','2'), ('19261','乡城县','12020.16','nativeplace','12020','2'), @@ -1482,11 +1479,11 @@ INSERT INTO `#@__sys_enum` VALUES('139','cms制作','503','vocation','503','0'), ('19257','石渠县','12020.12','nativeplace','12020','2'), ('19256','白玉县','12020.11','nativeplace','12020','2'), ('19255','德格县','12020.10','nativeplace','12020','2'), -('19254','新龙县','12020.9','nativeplace','12021','2'), -('19253','甘孜县','12020.8','nativeplace','12021','2'), -('19252','炉霍县','12020.7','nativeplace','12021','2'), -('19251','道孚县','12020.6','nativeplace','12021','2'), -('19250','雅江县','12020.5','nativeplace','12021','2'), +('19254','新龙县','12020.9','nativeplace','12022','2'), +('19253','甘孜县','12020.8','nativeplace','12022','2'), +('19252','炉霍县','12020.7','nativeplace','12022','2'), +('19251','道孚县','12020.6','nativeplace','12022','2'), +('19250','雅江县','12020.5','nativeplace','12022','2'), ('19249','九龙县','12020.4','nativeplace','12020','2'), ('19248','丹巴县','12020.3','nativeplace','12020','2'), ('19247','泸定县','12020.2','nativeplace','12020','2'), @@ -3944,88 +3941,88 @@ INSERT INTO `#@__sys_enum` VALUES('139','cms制作','503','vocation','503','0'), ('16795','东城区','1001','nativeplace','1001','1'), ('16794','北京市','1000','nativeplace','1000','0'); -INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点根网址','1','string',''), -('2','cfg_cmspath','DedeCMS安装目录','2','string',''), -('3','cfg_cookie_encode','cookie加密码','2','string',''), -('4','cfg_indexurl','网页主页链接','1','string','/'), -('5','cfg_backup_dir','数据备份目录(在data目录内)','2','string','backupdata'), -('6','cfg_indexname','主页链接名','1','string','首页'), -('7','cfg_webname','网站名称','1','string','我的网站'), -('8','cfg_adminemail','网站发信EMAIL','2','string','support@dedebiz.com'), -('9','cfg_html_editor','Html编辑器(ckeditor,需要fck的用户可以去官网下载)','2','string','ckeditor'), -('10','cfg_arcdir','文档HTML默认保存路径','1','string','/a'), -('11','cfg_medias_dir','图片/上传文件默认路径','1','string','/uploads'), -('12','cfg_ddimg_width','缩略图默认宽度','3','number','240'), -('13','cfg_ddimg_height','缩略图默认高度','3','number','180'), +INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点网址(http://域名)','1','string',''), +('2','cfg_cmspath','安装目录','2','string',''), +('3','cfg_cookie_encode','Cookies加密码','2','string',''), +('4','cfg_indexurl','首页链接','1','string','/'), +('5','cfg_backup_dir','数据备份目录,在data文件夹里','2','string','backupdata'), +('6','cfg_indexname','首页链接名','1','string','首页'), +('7','cfg_webname','网站名称','1','string','某某公司'), +('8','cfg_adminemail','网站发信邮箱','2','string','support@dedebiz.com'), +('9','cfg_html_editor','富文本','2','string','ckeditor'), +('10','cfg_arcdir','默认文档生成文件路径','1','string','/a'), +('11','cfg_medias_dir','默认图片上传文件路径','1','string','/static'), +('12','cfg_ddimg_width','缩略图默认宽度','3','number','400'), +('13','cfg_ddimg_height','缩略图默认高度','3','number','300'), ('63','cfg_album_width','图集默认显示图片的大小','3','number','800'), ('15','cfg_imgtype','图片浏览器文件类型','3','string','jpg|gif|png'), ('16','cfg_softtype','允许上传的软件类型','3','bstring','zip|gz|rar|iso|doc|xsl|ppt|wps'), -('17','cfg_mediatype','允许的多媒体文件类型','3','bstring','swf|mpg|mp3|rm|rmvb|wmv|wma|wav|mid|mov'), -('18','cfg_specnote','专题的最大节点数','2','number','6'), -('19','cfg_list_symbol','栏目位置的间隔符号','2','string',' > '), -('20','cfg_notallowstr','禁用词语(系统将直接停止用户动作)
    用|分开,但不要在结尾加|','5','bstring','非典|艾滋病|阳痿'), -('21','cfg_feedbackcheck','评论及留言(是/否)需审核','5','bool','Y'), -('22','cfg_keyword_replace','关键字替换(是/否)使用本功能会影响HTML生成速度','2','bool','Y'), -('23','cfg_fck_xhtml','编辑器(是/否)使用XHTML','1','bool','N'), -('24','cfg_df_style','模板默认风格','1','string','default'), -('25','cfg_multi_site','(是/否)支持多站点,开启此项后附件、栏目连接、arclist内容启用绝对网址','2','bool','N'), +('17','cfg_mediatype','允许的多媒体文件类型','3','bstring','swf|rm|rmvb|mpg|mp3|mp4|wmv|wma|wav|mid|mov'), +('18','cfg_specnote','专题的最大节点数','2','number','10'), +('19','cfg_list_symbol','栏目位置的间隔符号','2','string',''), +('20','cfg_notallowstr','系统禁用词语,停止用户动作用“|”分开,但不要在结尾加“|”','5','bstring','神经病|废物'), +('21','cfg_feedbackcheck','是否需审核评论及留言','5','bool','Y'), +('22','cfg_keyword_replace','是否使用关键词替换功能,开启影响文档生成速度','2','bool','Y'), +('23','cfg_fck_xhtml','是否使用富文本XHTML','1','bool','N'), +('24','cfg_df_style','网站模板默认风格','1','string','templets'), +('25','cfg_multi_site','是否支持多站点,开启此项后附件栏目连接arclist内容启用绝对网址','2','bool','N'), ('58','cfg_rm_remote','远程图片本地化','7','bool','Y'), -('27','cfg_dede_log','(是/否)开启管理日志','2','bool','N'), -('28','cfg_powerby','网站版权信息','1','bstring','Copyright © 2021 DedeBIZ 版权所有'), -('722','cfg_jump_once','跳转网址是否直接跳转?(否则显示中转页)','7','bool','Y'), -('723','cfg_task_pwd','系统计划任务客户端许可密码
    (需要客户端,通常不会太重要)','7','string',''), -('29','cfg_arcsptitle','(是/否)开启分页标题,开启会影响HTML生成速度','6','bool','N'), -('30','cfg_arcautosp','(是/否)开启长文章自动分页','6','bool','N'), -('31','cfg_arcautosp_size','文章自动分页大小(单位: K)','6','number','5'), -('32','cfg_auot_description','自动摘要长度(0-250,0表示不启用)','7','number','240'), +('27','cfg_dede_log','是否开启管理日志','2','bool','N'), +('28','cfg_powerby','网站版权信息','1','bstring','Copyright © 2022 DedeBIZ 版权所有'), +('722','cfg_jump_once','跳转网址是否直接跳转否则显示中转页','7','bool','Y'), +('723','cfg_task_pwd','系统计划任务客户端许可密码,需要客户端,通常不会太重要','7','string',''), +('29','cfg_arcsptitle','是否开启分页标题,开启影响文档生成速度','6','bool','N'), +('30','cfg_arcautosp','是否开启长文章自动分页','6','bool','N'), +('31','cfg_arcautosp_size','文章自动分页大小','6','number','5'), +('32','cfg_auot_description','自动摘要长度(0-250,0表示不启用)','7','number','250'), ('33','cfg_ftp_host','FTP主机','2','string',''), -('34','cfg_ftp_port','FTP端口','2','number','21'), +('34','cfg_ftp_port','FTP端口','2','number',''), ('35','cfg_ftp_user','FTP用户名','2','string',''), ('36','cfg_ftp_pwd','FTP密码','2','string',''), ('37','cfg_ftp_root','网站根在FTP中的目录','2','string','/'), ('38','cfg_ftp_mkdir','是否强制用FTP创建目录','2','bool','N'), -('40','cfg_list_son','上级列表是否包含子类内容','6','bool','Y'), +('40','cfg_list_son','是否包含上级列表子类内容','6','bool','Y'), ('41','cfg_mb_open','是否开启会员功能','4','bool','N'), ('42','cfg_mb_album','是否开启会员图集功能','4','bool','Y'), ('43','cfg_mb_upload','是否允许会员上传非图片附件','4','bool','Y'), -('44','cfg_mb_upload_size','会员上传文件大小(K)','4','number','1024'), +('44','cfg_mb_upload_size','会员上传文件大小:KB','4','number','1024'), ('45','cfg_mb_sendall','是否开放会员对自定义模型投稿','4','bool','Y'), -('46','cfg_mb_rmdown','是否把会员指定的远程文档下载到本地','4','bool','Y'), +('46','cfg_mb_rmdown','是否会员指定远程文档下载到本地','4','bool','Y'), ('47','cfg_cli_time','服务器时区设置','2','number','8'), -('48','cfg_mb_addontype','会员附件许可的类型','4','bstring','swf|mpg|mp3|rm|rmvb|wmv|wma|wav|mid|mov|zip|rar|doc|xsl|ppt|wps'), -('49','cfg_mb_max','会员附件总大小限制(MB)','4','number','500'), -('20','cfg_replacestr','替换词语(词语会被替换成***)
    用|分开,但不要在结尾加|','5','bstring','她妈|它妈|他妈|您妈|去死|贱人'), +('48','cfg_mb_addontype','会员附件许可的类型','4','bstring','swf|rm|rmvb|mpg|mp3|mp4|wmv|wma|wav|mid|mov|zip|rar|doc|xsl|ppt|wps'), +('49','cfg_mb_max','会员附件总大小限制:MB','4','number','500'), +('20','cfg_replacestr','替换词语,词语会被替换成**用“|”分开,但不要在结尾加“|”','5','bstring','他妈的|傻逼'), ('719','cfg_makeindex','发布文章后马上更新网站主页','6','bool','N'), -('51','cfg_keyword_like','使用关键词关连文章','6','bool','N'), -('52','cfg_index_max','网站主页调用函数最大索引文档数
    不适用于经常单栏目采集过多内容的网站
    不启用本项此值设置为0即可','6','number','10000'), -('53','cfg_index_cache','arclist标签调用缓存
    (0 不启用,大于0值为多少秒)','6','number','86400'), +('51','cfg_keyword_like','使用关键词关连文章','6','bool','Y'), +('52','cfg_index_max','首页调用函数最大索引文档数,不适用于经常单栏目采集过多内容网站,不启用本项此值设置为0即可','6','number','10000'), +('53','cfg_index_cache','arclist标签调用缓存(0不启用,大于0值为多少秒)','6','number','86400'), ('54','cfg_tplcache','是否启用模板缓存','6','bool','Y'), ('55','cfg_tplcache_dir','模板缓存目录','6','string','/data/tplcache'), -('56','cfg_makesign_cache','发布/修改单个文档是否使用调用缓存','6','bool','N'), -('59','cfg_arc_dellink','删除非站内链接','7','bool','N'), +('56','cfg_makesign_cache','是否修改发布单个文档调用缓存','6','bool','N'), +('59','cfg_arc_dellink','删除非站内链接','7','bool','Y'), ('60','cfg_arc_autopic','提取第一张图片作为缩略图','7','bool','Y'), -('61','cfg_arc_autokeyword','自动提取关键字','7','bool','Y'), -('62','cfg_title_maxlen','文档标题最大长度
    改此参数后需要手工修改数据表','7','number','60'), -('64','cfg_check_title','发布文档时是否检测重复标题','7','bool','Y'), +('61','cfg_arc_autokeyword','自动提取关键词','7','bool','N'), +('62','cfg_title_maxlen','文档标题最大长度,变量后需要手工修改数据表','7','number','250'), +('64','cfg_check_title','是否检测发布文档时重复标题','7','bool','Y'), ('65','cfg_album_row','图集多行多列样式默认行数','3','number','3'), ('66','cfg_album_col','图集多行多列样式默认列数','3','number','4'), ('67','cfg_album_pagesize','图集多页多图每页显示最大数','3','number','12'), -('68','cfg_album_style','图集默认样式
    1为多页多图,2为多页单图,3为缩略图列表','3','number','2'), +('68','cfg_album_style','图集默认样式(1为多页多图、2为多页单图、3为缩略图列表)','3','number','2'), ('69','cfg_album_ddwidth','图集默认缩略图大小','3','number','200'), -('70','cfg_mb_notallow','不允许注册的会员id','4','bstring','www,bbs,ftp,mail,user,users,admin,administrator'), -('71','cfg_mb_idmin','用户id最小长度','4','number','3'), -('72','cfg_mb_pwdmin','用户密码最小长度','4','number','3'), -('73','cfg_md_idurl','是否严格限定会员登录id
    允许会员使用二级域名必须设置此项','4','bool','N'), -('74','cfg_mb_rank','注册会员默认级别
    [会员权限管理中]查看级别代表的数字','4','number','10'), -('76','cfg_feedback_time','两次评论至少间隔时间(秒钟)','5','number','30'), +('70','cfg_mb_notallow','不允许注册的会员ID','4','bstring','www,bbs,ftp,mail,user,users,admin,administrator'), +('71','cfg_mb_idmin','用户ID最小长度','4','number','6'), +('72','cfg_mb_pwdmin','用户密码最小长度','4','number','6'), +('73','cfg_md_idurl','是否严格限定会员登录ID,允许会员使用二级域名必须设置此项','4','bool','N'), +('74','cfg_mb_rank','注册会员默认级别,会员权限管理中查看级别代表的数字','4','number','10'), +('76','cfg_feedback_time','两次评论至少间隔时间:秒','5','number','30'), ('77','cfg_feedback_numip','每个IP一小时内最大评论数','5','number','30'), -('78','cfg_md_mailtest','是否限制Email只能注册一个帐号','4','bool','N'), -('79','cfg_mb_spacesta','会员使用权限开通状态
    (-10 邮件验证 -1 手工审核, 0 没限制)','4','number','-10'), +('78','cfg_md_mailtest','是否限制邮箱只能注册一个帐号','4','bool','Y'), +('79','cfg_mb_spacesta','会员使用权限开通状态(-10邮件验证、-1手工审核、0没限制)','4','number','-10'), ('728','cfg_mb_allowreg','是否允许新会员注册','4','bool','Y'), ('729','cfg_mb_adminlock','是否禁止访问管理员帐号的空间','4','bool','N'), -('81','cfg_vdcode_member','会员投稿是否使用验证码','5','bool','Y'), -('83','cfg_mb_cktitle','会员投稿是否检测重复标题','5','bool','Y'), -('84','cfg_mb_editday','投稿多长时间后不能再修改[天]','5','number','7'), +('81','cfg_vdcode_member','是否会员投稿验证码','5','bool','Y'), +('83','cfg_mb_cktitle','是否检测会员投稿重复标题','5','bool','Y'), +('84','cfg_mb_editday','投稿多少天后不能再修改','5','number','1'), ('729','cfg_sendarc_scores','投稿可获取积分','5','number','10'), ('88','cfg_caicai_sub','被踩扣除文章好评度','5','number','2'), ('89','cfg_caicai_add','被顶扣除文章好评度','5','number','2'), @@ -4034,65 +4031,65 @@ INSERT INTO `#@__sysconfig` VALUES('1','cfg_basehost','站点根网址','1','str ('730','cfg_sendfb_scores','参与评论可获积分','5','number','3'), ('92','cfg_search_max','最大搜索检查文档数','6','number','50000'), ('93','cfg_search_maxrc','最大返回搜索结果数','6','number','300'), -('94','cfg_search_time','搜索间隔时间(秒/IP限制)','6','number','3'), -('95','cfg_baidunews_limit','百度新闻xml更新新闻数量 最大100','8','string','100'), -('223','cfg_smtp_port','smtp服务器端口','2','string','25'), -('221','cfg_sendmail_bysmtp','是否启用smtp方式发送邮件','2','bool','Y'), -('222','cfg_smtp_server','smtp服务器','2','string','smtp.qq.com'), +('94','cfg_search_time','搜索间隔时间:秒','6','number','3'), +('95','cfg_baidunews_limit','百度新闻更新新闻数量,最大100','8','string','100'), +('223','cfg_smtp_port','SMTP服务器端口','2','string','25'), +('221','cfg_sendmail_bysmtp','是否启用SMTP方式发送邮件','2','bool','Y'), +('222','cfg_smtp_server','SMTP服务器','2','string','smtp.qq.com'), ('224','cfg_smtp_usermail','SMTP服务器的用户邮箱','2','string','tianya@dedebiz.com'), ('225','cfg_smtp_user','SMTP服务器的用户帐号','2','string','tianya'), ('226','cfg_smtp_password','SMTP服务器的用户密码','2','string','tianya'), -('96','cfg_updateperi','百度新闻xml更新时间 (单位:分钟)','8','string','15'), +('96','cfg_updateperi','百度新闻更新时间:分','8','string','15'), ('227','cfg_online_type','在线支付网关类型','2','string','nps'), ('706','cfg_upload_switch','删除文章文件同时删除相关附件文件','2','bool','Y'), ('708','cfg_rewrite','是否使用伪静态','2','bool','N'), -('707','cfg_allsearch_limit','网站全局搜索时间限制','2','string','1'), -('709','cfg_delete','文章回收站(是/否)开启','2','bool','Y'), -('710','cfg_keywords','站点默认关键字','1','string',''), +('707','cfg_allsearch_limit','网站全局搜索时间限制:秒','2','string','1'), +('709','cfg_delete','是否开启文章回收站','2','bool','Y'), +('710','cfg_keywords','站点默认关键词','1','string',''), ('711','cfg_description','站点描述','1','bstring',''), ('712','cfg_beian','网站备案号','1','string',''), ('713','cfg_need_typeid2','是否启用副栏目','6','bool','Y'), -('72','cfg_mb_pwdtype','前台密码验证类型:默认32 — 32位md5,可选:
    l16 — 前16位, r16 — 后16位, m16 — 中间16位','4','string','32'), -('716','cfg_cache_type','id 文档ID,content 标签最终内容
    (修改此变量后必须更新系统缓存)','6','string','id'), -('717','cfg_max_face','会员上传头像大小限制(单位:KB)','3','number','50'), -('718','cfg_typedir_df','栏目网址使用目录名(不显示默认页,即是 /a/abc/ 形式)','2','bool','Y'), +('72','cfg_mb_pwdtype','前台密码验证类型:默认32—32位md5,可选:l16—前16位、r16—后16位、m16—中间16位','4','string','32'), +('716','cfg_cache_type','id 文档ID,content标签最终内容,修改此变量后必须更新系统缓存','6','string','id'), +('717','cfg_max_face','会员上传头像大小限制KB','3','number','100'), +('718','cfg_typedir_df','栏目网址使用目录名(不显示默认页,则是/a/b/c形式)','2','bool','Y'), ('719','cfg_make_andcat','发表文章后马上更新相关栏目','6','bool','N'), -('720','cfg_make_prenext','发表文章后马上更新上下篇','6','bool','Y'), -('721','cfg_feedback_forbid','是否禁止所有评论(将包括禁止顶踩等)','5','bool','N'), -('724','cfg_addon_domainbind','附件目录是否绑定为指定的二级域名','7','bool','N'), +('720','cfg_make_prenext','发表文章后马上更新上下篇','6','bool','N'), +('721','cfg_feedback_forbid','是否禁止所有评论,包括禁止顶踩等','5','bool','N'), +('724','cfg_addon_domainbind','是否绑定附件目录为指定的二级域名','7','bool','N'), ('725','cfg_addon_domain','附件目录的二级域名','7','string',''), -('726','cfg_df_dutyadmin','默认责任编辑(dutyadmin)','7','string','admin'), +('726','cfg_df_dutyadmin','默认责任编辑名称','7','string','网站管理员'), ('727','cfg_mb_allowncarc','是否允许用户空间显示未审核文章','4','bool','Y'), -('730','cfg_mb_spaceallarc','会员空间中所有文档的频道ID(不限为0)','4','number','0'), +('730','cfg_mb_spaceallarc','会员空间中所有文档的频道ID(不限为0)','4','number','0'), ('731','cfg_face_adds','上传头像增加积分','5','number','10'), ('732','cfg_moreinfo_adds','填写详细资料增加积分','5','number','20'), ('733','cfg_money_scores','多少积分可以兑换一个金币','5','number','50'), -('734','cfg_mb_wnameone','是否允许用户笔名/昵称重复','4','bool','N'), -('735','cfg_arc_dirname','是否允许用目录作为文档文件名
    文档命名规则需改为:{typedir}/{aid}/index.html','7','bool','Y'), -('736','cfg_puccache_time','需缓存内容全局缓存时间(秒)','6','number','36000'), -('737','cfg_arc_click','文档默认点击数(-1表示随机50-200)','7','number','-1'), -('738','cfg_addon_savetype','附件保存形式(按data函数日期参数)','3','string','ymd'), -('739','cfg_qk_uploadlit','异步上传缩略图(空间太不稳定的用户关闭此项)','3','bool','Y'), +('734','cfg_mb_wnameone','是否允许用户昵称重复','4','bool','N'), +('735','cfg_arc_dirname','是否允许用目录作为文档文件名,文档命名规则:{typedir}/{aid}/index.html','7','bool','Y'), +('736','cfg_puccache_time','需缓存内容全局缓存时间:秒','6','number','36000'), +('737','cfg_arc_click','文档默认点击数(-1表示随机50-200)','7','number','-1'), +('738','cfg_addon_savetype','附件保存形式,按data函数日期参数(y年m月d日)','3','string','ymd'), +('739','cfg_qk_uploadlit','异步上传缩略图,空间太不稳定用户关闭此项','3','bool','Y'), ('740','cfg_login_adds','登录会员中心获积分','5','number','2'), ('741','cfg_userad_adds','会员推广获积分','5','number','10'), -('742','cfg_ddimg_full','缩略图是否使用强制大小(对背景填充)','3','bool','N'), -('743','cfg_ddimg_bgcolor','缩略图空白背景填充颜色(0-白,1-黑)','3','number','0'), -('744','cfg_replace_num','文档内容同一关键词替换次数(0为全部替换)','7','number','2'), -('745','cfg_uplitpic_cut','上传缩略图后是否马上弹出裁剪框','3','bool','Y'), -('746','cfg_album_mark','图集是否使用水印(小图也会受影响)','3','bool','N'), -('747','cfg_mb_feedcheck','会员动态是否需要审核','4','bool','N'), -('748','cfg_mb_msgischeck','会员状态是否需要审核','4','bool','N'), -('751','cfg_title_site','是否发布和编辑文档时远程发布(启用远程站点的前提下)','2','bool','N'), -('752','cfg_mysql_type','数据库类型(支持mysql和mysqli)','2','string','mysql'), -('14', 'cfg_domain_cookie', '跨域共享cookie的域名(例如: .dedebiz.com)', 2, 'string', ''), -('756','cfg_memcache_enable','是否启用memcache缓存,如果为否(N),默认使用文件缓存',6,'bool','N'), -('757','cfg_memcache_mc_defa','默认memcache缓存服务器地址',6,'string','memcache://127.0.0.1:11211/default127'), -('758','cfg_memcache_mc_oth','附加memcache缓存服务器地址',6,'string',''), -('759', 'cfg_cross_sectypeid', '支持交叉栏目显示副栏目内容', '7', 'bool', 'N'), +('742','cfg_ddimg_full','是否使用缩略图强制大小,对背景填充,','3','bool','N'), +('743','cfg_ddimg_bgcolor','缩略图空白背景填充颜色(0白,1黑)','3','number','0'), +('744','cfg_replace_num','文档内容关键词替换次数(0为全部替换)','7','number','1'), +('745','cfg_uplitpic_cut','是否上传缩略图后马上弹出裁剪框','3','bool','Y'), +('746','cfg_album_mark','是否使用图集水印,小图也会受影响','3','bool','N'), +('747','cfg_mb_feedcheck','是否需要会员动态审核','4','bool','N'), +('748','cfg_mb_msgischeck','是否需要会员状态审核','4','bool','N'), +('751','cfg_title_site','是否发布和编辑文档时远程发布,启用远程站点的前提下','2','bool','N'), +('752','cfg_mysql_type','数据库类型,支持MySQL和Mysqli','2','string','mysql'), +('14', 'cfg_domain_cookie', '跨域共享Cookie的域名,例如: www.dedebiz.com', 2, 'string', ''), +('756','cfg_memcache_enable','是否启用memcache缓存,如果为否,默认使用文件缓存',6,'bool','N'), +('757','cfg_memcache_mc_defa','默认MemCache缓存服务器地址',6,'string','memcache://127.0.0.1:123/default123'), +('758','cfg_memcache_mc_oth','附加MemCache缓存服务器地址',6,'string',''), +('759', 'cfg_cross_sectypeid', '支持交叉栏目显示副栏目内容', '7', 'bool', 'Y'), ('760', 'cfg_digg_update', '顶踩缓存异步更新间隔(0为不缓存)', '6', 'number', '0'), ('761', 'cfg_feedback_guest', '是否允许匿名评论', '5', 'bool', 'N'), -('762', 'cfg_feedback_msglen', '评论内容字数限定', 5, 'number', '200'), -('763', 'cfg_auth_code', '授权码(登录www.dedebiz.com进行商业授权)', 1, 'bstring', ''), +('762', 'cfg_feedback_msglen', '评论内容字数限定', 5, 'number', '250'), +('763', 'cfg_auth_code', '授权码:www.dedebiz.com商业版授权', 1, 'bstring', ''), ('764', 'cfg_bizcore_hostname', 'DedeBIZ Core地址', 1, 'string', '127.0.0.1'), ('765', 'cfg_bizcore_port', 'DedeBIZ Core端口', 1, 'number', '8181'), ('766', 'cfg_bizcore_appid', 'DedeBIZ Core应用ID', 1, 'string', ''), @@ -4105,7 +4102,6 @@ INSERT INTO `#@__sys_module` VALUES (1, '0cce60bc0238aa03804682c801584991', '百 (5, 'acb8b88eb4a6d4bfc375c18534f9439e', '投票模块', '', '', 0, ''), (6, '572606600345b1a4bb8c810bbae434cc', '挑错管理', '', '', 0, ''); - INSERT INTO `#@__plus` VALUES (27, '友情链接模块', '', '', 'DedeBIZ', 1, ''), (24, '文件管理器', '', '', 'DedeBIZ', 1, ''), (23, '百度新闻', '', '', 'DedeBIZ', 1, 'baidunews.php'), @@ -4113,6 +4109,6 @@ INSERT INTO `#@__plus` VALUES (27, '友情链接模块', '', '', 'DedeBIZ', 1, ''), (10, '挑错管理', '', '', 'DedeBIZ', 1, ''); -INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_disable_funs', '模板引擎禁用PHP函数', 7, 'bstring', 'phpinfo,eval,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source,file_put_contents'); -INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_disable_tags', '模板引擎禁用标签', 7, 'bstring', 'php'); -ALTER TABLE `#@__arctiny` ADD INDEX `idx_typeid_arcrank_sortrank` (`typeid`, `arcrank`, `sortrank`); +INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_disable_funs', '模板引擎禁用PHP函数', 7, 'bstring', ''); +INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_disable_tags', '模板引擎禁用标签', 7, 'bstring', ''); +ALTER TABLE `#@__arctiny` ADD INDEX `idx_typeid_arcrank_sortrank` (`typeid`, `arcrank`, `sortrank`); \ No newline at end of file diff --git a/src/install/sql-dftables.txt b/src/install/sql-dftables.txt index c88077b8..269a2ea2 100755 --- a/src/install/sql-dftables.txt +++ b/src/install/sql-dftables.txt @@ -254,6 +254,11 @@ CREATE TABLE `#@__arctype` ( `topid` smallint(5) unsigned NOT NULL default '0', `sortrank` smallint(5) unsigned NOT NULL default '50', `typename` char(30) NOT NULL default '', + `namegk` char(200) NOT NULL default '', + `enname` char(200) NOT NULL default '', + `ennamegk` char(200) NOT NULL default '', + `litpic` char(255) NOT NULL default '', + `litimg` char(255) NOT NULL default '', `typedir` char(60) NOT NULL default '', `isdefault` smallint(6) NOT NULL default '0', `defaultname` char(15) NOT NULL default 'index.html', @@ -1002,6 +1007,10 @@ DROP TABLE IF EXISTS `#@__tagindex`; CREATE TABLE `#@__tagindex` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `tag` CHAR(12) NOT NULL DEFAULT '', + `keywords` varchar(255) DEFAULT NULL, + `description` varchar(255) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + `tag_pinyin` varchar(255) DEFAULT NULL, `typeid` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0', `count` INT(10) UNSIGNED NOT NULL DEFAULT '0', `total` INT(10) UNSIGNED NOT NULL DEFAULT '0', diff --git a/src/install/style.css b/src/install/style.css deleted file mode 100755 index 426be8d5..00000000 --- a/src/install/style.css +++ /dev/null @@ -1,279 +0,0 @@ -@import "tablebox.css"; - * { - padding:0px; - margin:0px; - font-size:13px -} -body { - font-family:Verdana,Arial,Helvetica,sans-serif; - font-size:12px; - background:url(images/top-bg.png) left top repeat-x; - background-color:#FFF -} -ul { - list-style:none -} -a { - color:#06C -} -a:hover { - color:#669900; - text-decoration:none -} -input,button,select { - vertical-align:middle -} -select { - height:calc(1.5em + .75rem + 2px); - padding:.375rem .75rem; - font-weight:400; - color:#495057; - background-color:#fff; - background-clip:padding-box; - border:1px solid #ced4da; - border-radius:.25rem; - transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out -} -input[type="button"],input[type="submit"],input[type="reset"] { - border:none; - border-right:1px solid #ACACAC; - border-bottom:1px solid #ACACAC; - background-color:#F1F8B4; - padding:2px; - padding-right:5px; - padding-left:5px; - cursor:pointer -} -input[type="text"],input[type="password"] { - font-size:1rem; - font-weight:400; - color:#495057; - background-color:#fff; - background-clip:padding-box; - border:1px solid #ced4da; - border-radius:.25rem; - height:calc(1.5em + .75rem + 2px); - padding:.375rem .75rem; - transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out; - line-height:18px; - vertical-align:middle -} -.fc-690 { - color:#FF760A -} -.fs-14 { - font-size:14px -} -.top { - width:960px; - height:72px; - overflow:hidden; - margin:0px auto -} -.top .top-logo { - width:280px; - height:72px; - float:left; - padding-left:10px; - background:url(images/top-logo.png) 10px 0px no-repeat; - overflow:hidden -} -.top .top-logo h1 { - font-size:0px; - line-height:1000% -} -.top .top-link { - height:25px; - padding:12px 12px 0px 0px; - overflow:hidden -} -.top .top-link ul { - height:15px; - float:right; - overflow:hidden -} -.top .top-link ul li { - float:left; - padding-left:10px; - padding-right:10px; - border-left:1px solid #E8F5E3; - margin-left:-1px; - line-height:14px -} -.top .top-link ul li a { - text-decoration:none; - color:#555 -} -.top .top-version { - height:40px; - float:right; - padding:13px 13px 0px 0px -} -.top .top-version h2 { - color:#FF760A; - font-size:22px; - font-style:italic; - cursor:default -} -.main { - width:900px; - margin:14px auto 0px -} -.main .pleft { - width:168px; - float:left; - cursor:default; - padding-top:6px -} -.main .pright { - width:720px; - float:right -} -.pr-title { - width:720px; - height:22px; - margin:8px auto 0px; - background:url(images/boxtitle_bg.gif) 0px 20px repeat-x; - overflow:hidden -} -.pr-title h3 { - width:158px; - height:22px; - line-height:22px; - overflow:hidden; - display:block; - font-size:12px; - padding-top:1px; - text-indent:10px; - background:url(images/boxtitle_bg.gif) 0px -2px no-repeat; - letter-spacing:2px; - color:#FF760A; - font-weight:bold -} -.t1 { - width:162px -} -.t1 dt { - width:162px; - height:25px; - line-height:25px; - background:url(images/leftbox-tbg.png) no-repeat; - font-weight:bold; - color:#FF760A; - text-indent:10px; - letter-spacing:2px -} -.t1 dd { - width:160px; - background-color:#FFFAF7; - border:1px solid #FFCABF -} -.t1 dd ul { - width:158px; - border:1px solid #FFF; - overflow:hidden; - padding:10px 0px; - background:url(images/step-ico-bg.png) 20px 21px no-repeat -} -.t1 dd ul li { - height:40px; - line-height:36px; - text-indent:52px; - display:block; - color:#888; - font-size:14px -} -.t1 dd ul li.succeed { - color:#FF760A; - background:url(images/ico-step-succeed.png) 23px 14px no-repeat -} -.t1 dd ul li.now { - color:#FF9900; - font-weight:bold; - background:url(images/ico-step-now.png) 23px 14px no-repeat -} -.install-msg { - padding:10px 20px; - color:#777; - line-height:31px; - font-size:14px; - overflow:hidden; - clear:both -} -.pr-agreement { - padding:16px; - line-height:21px; - color:#666; - height:300px; - overflow-y:scroll -} -.pr-agreement strong { - display:block; - color:#333; - line-height:27px; - margin-top:6px -} -.pr-agreement p { - text-indent:30px -} -.btn-box { - margin-top:15px; - border-top:1px solid #DDD; - padding:10px 6px; - vertical-align:middle -} -.btn-next { - width:104px; - height:34px; - border:none; - background:url(images/but_next.gif) no-repeat; - cursor:pointer; - margin-left:10px; - overflow:hidden; - font-size:0px; - line-height:100px -} -.btn-back { - width:104px; - height:34px; - border:none; - background:url(images/but_back.gif) no-repeat; - cursor:pointer; - overflow:hidden; - font-size:0px; - line-height:100px -} -#readpact { - *margin-top:-4px; - margin-right:4px -} -.over-link { - padding:0px 40px; - line-height:41px; - overflow:hidden; - clear:both -} -.waitpage { - top:0; - left:0; - filter:Alpha(opacity=70); - -moz-opacity:0.7; - position:absolute; - z-index:10000; - background:url(images/loading1.gif) #ababab no-repeat center 200px; - width:100%; - height:2500px; - display:none -} -.divpre { - filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale) -} -.modulesel { - width:120px; - margin-right:8px; - float:left -} -.pr-agreement h2 { - font-size:14px; - font-weight:bolder -} \ No newline at end of file diff --git a/src/install/tablebox.css b/src/install/tablebox.css deleted file mode 100755 index 50390de8..00000000 --- a/src/install/tablebox.css +++ /dev/null @@ -1,138 +0,0 @@ -input { - vertical-align:middle; - margin-right:3px; - font-size:12px -} -textarea { - vertical-align:top; - font-size:12px; - line-height:156%; - border:1px solid #AAA; - padding:3px; - letter-spacing:1px; - word-break:break-all; - overflow-y:auto -} -.input-txt { - padding:4px 8px 4px 6px; - border:1px solid #AAA; - font-size:12px; - color:#000; - width:200px -} -.textipt_on { - border:1px solid #F90 -} -hr { - height:1px; - line-height:1px; - overflow:hidden; - border-width:1px 0px 0px 0px; - border-top:1px solid #FFCABF -} -hr:empty { - margin:8px 0px 7px 0px !important; - margin:0px -} -small { - font-size:12px -} -.moncolor td { - background:#FFCABF -} -.twbox { - width:706px; - border:1px solid #FFCABF; - font-size:12px; - overflow:hidden; - margin:8px auto -} -.twbox thead tr td { - background:url(body_title_bg.gif) -1px -1px repeat-x; - height:31px; - line-height:31px; - text-indent:10px -} -.twbox thead tr td strong { - letter-spacing:2px; - margin-right:14px; - color:#FFF; - font-size:14px -} -.twbox thead tr td span { - color:#CDA -} -.twbox thead tr td p { - height:31px; - display:inline; - float:right; - margin:-31px 10px 0 0; - overflow:hidden -} -.twbox thead tr td p * { - float:right -} -.twbox thead tr td a.thlink { - color:#FFF -} -.twbox thead tr td a.thlink:hover { - color:#FFFF00; - text-decoration:none -} -.twbox tbody { - overflow:hidden; - text-align:left -} -.twbox tbody tr th { - background:#FFFAF7; - color:#FF760A; - line-height:21px; - height:21px; - text-indent:30px; - font-weight:normal; - border-bottom:1px solid #FFCABF; - letter-spacing:2px -} -.twbox tbody tr td { - padding:7px; - border-bottom:1px solid #F2F2F2; - color:#333; - vertical-align:top -} -.twbox tbody tr td p { - line-height:21px -} -.twbox tbody tr td p strong img { - vertical-align:middle -} -.twbox tbody tr td img { - vertical-align:top; - margin:0px 10px 5px 0px -} -.twbox tbody tr td small { - color:#888 -} -.twbox tfoot tr td { - padding:10px; - line-height:25px; - text-align:center -} -.twbox tfoot tr td p { - line-height:21px; - margin-bottom:10px -} -input.but { - height:26px; - padding-left:6px; - padding-right:6px; - line-height:26px; - font-weight:bold; - letter-spacing:1px; - color:#FFF; - background-color:#FC3 -} -.onetd { - width:120px; - text-align:right; - line-height:25px -} \ No newline at end of file diff --git a/src/install/templates/step-1.html b/src/install/templates/step-1.html index 9fab8c4d..5db3a499 100755 --- a/src/install/templates/step-1.html +++ b/src/install/templates/step-1.html @@ -1,19 +1,20 @@ - - + + - - 安装程序 - DedeBIZ - DedeBIZ技术支持 + + 安装程序 - + + -
    -
    DedeBIZ安装程序
    -
    运行SQL命令行: + 运行SQL命令行:
    "; - echo ""; - echo "
    "; - echo "$step {$nss}".$typeName."[ID:".$id."](文档:".$this->GetTotalArc($id).") "; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " 
    "; - echo "$step {$nss}".$typeName."[ID:".$id."] "; - echo ""; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo " "; - echo " 
    "; - echo "
    "; - echo "$step {$nss}".$typeName."[ID:".$id."] "; - echo ""; - echo " "; - echo " "; - echo " "; - echo " "; - echo "