@@ -37,3 +37,4 @@ src/data/js/ | |||||
src/data/vote/*.js | src/data/vote/*.js | ||||
src/data/module/*.xml | src/data/module/*.xml | ||||
src/data/*.db | src/data/*.db | ||||
src/uploads/soft/*/ |
@@ -1,10 +1,10 @@ | |||||
# DedeCMSV6 | |||||
# DedeBIZ | |||||
国内流行的内容管理系统(CMS)多端全媒体解决方案,DedeCMSV6系统基于PHP7.X开发,具有很强的可扩展性,并且完全开放源代码。DedeBIZ商业支持采用现流行的Go语言设计开发,让DedeCMS系统拥有简单易用、灵活扩展特性之外更安全、高效。模板设计制作简单一直是系统的一大特点,全新的版本延续了之前标签引擎,同时采用响应式模板引擎Bootstrap作为系统模板渲染引擎,让搭建跨终端(移动、PC)全媒体站点更简单。 | |||||
国内流行的内容管理系统(CMS)多端全媒体解决方案,DedeBIZ系统基于PHP7.X开发,具有很强的可扩展性,并且完全开放源代码。DedeBIZ商业支持采用现流行的Go语言设计开发,让DedeCMS系统拥有简单易用、灵活扩展特性之外更安全、高效。模板设计制作简单一直是系统的一大特点,全新的版本延续了之前标签引擎,同时采用响应式模板引擎Bootstrap作为系统模板渲染引擎,让搭建跨终端(移动、PC)全媒体站点更简单。 | |||||
## 版本说明 | ## 版本说明 | ||||
DedeCMSV6.x是一个LTS版本,支持将到2022年10月截止,目前DedeCMSV6已经发布,可以[点击下载](https://www.dedebiz.com/download)获取。 | |||||
DedeBIZ.x是一个LTS版本,支持将到2022年10月截止,目前DedeBIZ已经发布,可以[点击下载](https://www.dedebiz.com/download)获取。 | |||||
## 参与开源 | ## 参与开源 | ||||
@@ -14,7 +14,7 @@ DedeCMSV6.x是一个LTS版本,支持将到2022年10月截止,目前DedeCMSV6 | |||||
我们将会收集、整理新的功能需求制定新的Roadmap。 | 我们将会收集、整理新的功能需求制定新的Roadmap。 | ||||
[开发者](https://www.dedebiz.com/developer)可以到[工单管理](https://www.zhelixie.com/DedeBiz/DedeCMSV6/issues)中进行交流反馈。 | |||||
[开发者](https://www.dedebiz.com/developer)可以到[工单管理](https://www.zhelixie.com/DedeBiz/DedeBIZ/issues)中进行交流反馈。 | |||||
普通用户可以通过微信公众号或者邮件的方式进行反馈,详见本页底部资源。 | 普通用户可以通过微信公众号或者邮件的方式进行反馈,详见本页底部资源。 | ||||
@@ -95,8 +95,8 @@ NAME: | |||||
USAGE: | USAGE: | ||||
php ./dedebiz command [arguments...] | php ./dedebiz command [arguments...] | ||||
COMMANDS: | COMMANDS: | ||||
serv,s Run cli web server for DedeCMSV6 | |||||
make,m Make DedeCMSV6 HTML | |||||
serv,s Run cli web server for DedeBIZ | |||||
make,m Make DedeBIZ HTML | |||||
update,u Update to latest system | update,u Update to latest system | ||||
help,h Shows a list of commands or help | help,h Shows a list of commands or help | ||||
quick,q Quick start a development environment | quick,q Quick start a development environment | ||||
@@ -112,13 +112,13 @@ WEBSITE: | |||||
## 版权信息 | ## 版权信息 | ||||
详细参考:[DedeCMSV6站点授权协议](https://www.dedebiz.com/license) | |||||
详细参考:[DedeBIZ站点授权协议](https://www.dedebiz.com/license) | |||||
我们对DedeCMSV6系统授权的态度是“鼓励但不强制”,购买授权是对知识产权的尊重,是对我们技术服务的认可。 | |||||
我们对DedeBIZ系统授权的态度是“鼓励但不强制”,购买授权是对知识产权的尊重,是对我们技术服务的认可。 | |||||
## 相关资源 | ## 相关资源 | ||||
- [DedeCMSV6](https://www.dedebiz.com) | |||||
- [DedeBIZ](https://www.dedebiz.com) | |||||
- [帮助中心](https://www.dedebiz.com/help) | - [帮助中心](https://www.dedebiz.com/help) | ||||
@@ -14,7 +14,7 @@ $workDir = dirname(__FILE__) . "/src"; | |||||
chdir($workDir); | chdir($workDir); | ||||
if (substr(php_sapi_name(), 0, 3) === 'cgi') { | if (substr(php_sapi_name(), 0, 3) === 'cgi') { | ||||
die("DedeCMSV6:needs php-cli to run\n\n"); | |||||
die("DedeBIZ:needs php-cli to run\n\n"); | |||||
} | } | ||||
$helpStr = " | $helpStr = " | ||||
@@ -23,8 +23,8 @@ NAME: | |||||
USAGE: | USAGE: | ||||
php ./dedebiz command [arguments...] | php ./dedebiz command [arguments...] | ||||
COMMANDS: | COMMANDS: | ||||
serv,s Run cli web server for DedeCMSV6 | |||||
make,m Make DedeCMSV6 HTML | |||||
serv,s Run cli web server for DedeBIZ | |||||
make,m Make DedeBIZ HTML | |||||
update,u Update to latest system | update,u Update to latest system | ||||
help,h Shows a list of commands or help | help,h Shows a list of commands or help | ||||
quick,q Quick start a development environment | quick,q Quick start a development environment | ||||
@@ -75,9 +75,9 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { | |||||
// PHP5.4以下不支持内建服务器 | // PHP5.4以下不支持内建服务器 | ||||
// 用于开发调试 | // 用于开发调试 | ||||
if (phpversion() < "5.4") { | if (phpversion() < "5.4") { | ||||
die("DedeCMSV6:command web server not support\n\n"); | |||||
die("DedeBIZ:command web server not support\n\n"); | |||||
} | } | ||||
echo "Start Dev Server For DedeCMSV6\n\r"; | |||||
echo "Start Dev Server For DedeBIZ\n\r"; | |||||
echo "Open http://localhost:8088\n\r"; | echo "Open http://localhost:8088\n\r"; | ||||
passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); | passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); | ||||
} else if (count($argv) > 1 && ($argv[1] == "make" || $argv[1] == "m")) { | } else if (count($argv) > 1 && ($argv[1] == "make" || $argv[1] == "m")) { | ||||
@@ -296,23 +296,23 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { | |||||
} else if (count($argv) > 1 && ($argv[1] == "quick" || $argv[1] == "q")){ | } else if (count($argv) > 1 && ($argv[1] == "quick" || $argv[1] == "q")){ | ||||
define("DEDEINC", $workDir."/include"); | define("DEDEINC", $workDir."/include"); | ||||
require_once(DEDEINC . "/cli.class.php"); | require_once(DEDEINC . "/cli.class.php"); | ||||
// 快速开始一个用于开发的DedeCMSV6环境,基于SQLite无其他依赖 | |||||
if (file_exists($workDir."/data/dedecmsv6.db")) { | |||||
// 快速开始一个用于开发的DedeBIZ环境,基于SQLite无其他依赖 | |||||
if (file_exists($workDir."/data/DedeBIZ.db")) { | |||||
DedeCli::write("development environment has inited"); | DedeCli::write("development environment has inited"); | ||||
echo "Start Dev Server For DedeCMSV6\n\r"; | |||||
echo "Start Dev Server For DedeBIZ\n\r"; | |||||
echo "Open http://localhost:8088\n\r"; | echo "Open http://localhost:8088\n\r"; | ||||
passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); | passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); | ||||
exit; | exit; | ||||
} | } | ||||
// 初始化安装一个开发环境 | // 初始化安装一个开发环境 | ||||
$db = new SQLite3($workDir.'/data/dedecmsv6.db'); | |||||
$db = new SQLite3($workDir.'/data/DedeBIZ.db'); | |||||
$fp = fopen($workDir."/install/common.inc.php","r"); | $fp = fopen($workDir."/install/common.inc.php","r"); | ||||
$configStr1 = fread($fp,filesize($workDir."/install/common.inc.php")); | $configStr1 = fread($fp,filesize($workDir."/install/common.inc.php")); | ||||
fclose($fp); | fclose($fp); | ||||
@chmod($workDir."/data",0777); | @chmod($workDir."/data",0777); | ||||
$dbtype = "sqlite"; | $dbtype = "sqlite"; | ||||
$dbhost = ""; | $dbhost = ""; | ||||
$dbname = "dedecmsv6"; | |||||
$dbname = "DedeBIZ"; | |||||
$dbuser = ""; | $dbuser = ""; | ||||
$dbpwd = ""; | $dbpwd = ""; | ||||
$dbprefix = "dede_"; | $dbprefix = "dede_"; | ||||
@@ -334,7 +334,7 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { | |||||
$baseurl = "http://127.0.0.1:8088"; | $baseurl = "http://127.0.0.1:8088"; | ||||
$indexUrl = "/"; | $indexUrl = "/"; | ||||
$cmspath = ""; | $cmspath = ""; | ||||
$webname = "DedeCMSV6本地测试开发站点"; | |||||
$webname = "DedeBIZ本地测试开发站点"; | |||||
$adminmail = "admin@dedebiz.com"; | $adminmail = "admin@dedebiz.com"; | ||||
$fp = fopen($workDir."/install/config.cache.inc.php","r"); | $fp = fopen($workDir."/install/config.cache.inc.php","r"); | ||||
@@ -459,9 +459,9 @@ if (count($argv) > 1 && ($argv[1] == "serv" || $argv[1] == "s")) { | |||||
Values('1','10','0','{$adminuser}的空间','','person','',''); "; | Values('1','10','0','{$adminuser}的空间','','person','',''); "; | ||||
$db->exec($adminquery); | $db->exec($adminquery); | ||||
if (phpversion() < "5.4") { | if (phpversion() < "5.4") { | ||||
die("DedeCMSV6:command web server not support\n\n"); | |||||
die("DedeBIZ:command web server not support\n\n"); | |||||
} | } | ||||
echo "Start Dev Server For DedeCMSV6\n\r"; | |||||
echo "Start Dev Server For DedeBIZ\n\r"; | |||||
echo "Open http://localhost:8088\n\r"; | echo "Open http://localhost:8088\n\r"; | ||||
passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); | passthru(PHP_BINARY . ' -S localhost:8088 -t' . escapeshellarg('./')); | ||||
exit; | exit; | ||||
@@ -1,6 +1,12 @@ | |||||
# 更新记录 | # 更新记录 | ||||
通过访问 https://www.dedebiz.com/git 获取完整更新记录 | 通过访问 https://www.dedebiz.com/git 获取完整更新记录 | ||||
## v6.0.4 | |||||
- 兼容PHP8+; | |||||
- 修正已知存在的安全问题; | |||||
- 优化系统管理后台界面; | |||||
- 修正sqlite3下的错误; | |||||
## v6.0.0 | ## v6.0.0 | ||||
- 调整DedeCMS目录结构,将原有include中外部访问的内容迁移出去; | - 调整DedeCMS目录结构,将原有include中外部访问的内容迁移出去; | ||||
- 修正已知存在的安全问题; | - 修正已知存在的安全问题; | ||||
@@ -1 +0,0 @@ | |||||
dedecms |
@@ -3,7 +3,7 @@ | |||||
/** | /** | ||||
* @version $Id: config_update.php 1 11:36 2011-2-21 tianya $ | * @version $Id: config_update.php 1 11:36 2011-2-21 tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -6,13 +6,13 @@ $safequestions[0] = '没安全提示问题'; | |||||
//下面的设置可以手工修改 | //下面的设置可以手工修改 | ||||
//start**************************** | //start**************************** | ||||
$safequestions[1] = '你最喜欢的格言什么?'; | |||||
$safequestions[2] = '你家乡的名称是什么?'; | |||||
$safequestions[3] = '你读的小学叫什么?'; | |||||
$safequestions[4] = '你的父亲叫什么名字?'; | |||||
$safequestions[5] = '你的母亲叫什么名字?'; | |||||
$safequestions[6] = '你最喜欢的偶像是谁?'; | |||||
$safequestions[7] = '你最喜欢的歌曲是什么?'; | |||||
$safequestions[1] = '您最喜欢的格言什么?'; | |||||
$safequestions[2] = '您家乡的名称是什么?'; | |||||
$safequestions[3] = '您读的小学叫什么?'; | |||||
$safequestions[4] = '您的父亲叫什么名字?'; | |||||
$safequestions[5] = '您的母亲叫什么名字?'; | |||||
$safequestions[6] = '您最喜欢的偶像是谁?'; | |||||
$safequestions[7] = '您最喜欢的歌曲是什么?'; | |||||
//end**************************** | //end**************************** | ||||
@@ -1 +1 @@ | |||||
document.write("<table width='100%' border='0' cellspacing='1' cellpadding='1' id='voteitem'> <form name='voteform' method='post' action='\/plus\/vote.php' target='_blank'> <input type='hidden' name='dopost' value='send' \/> <input type='hidden' name='aid' value='1' \/> <input type='hidden' name='ismore' value='0' \/> <tr align='center'><td height='30' id='votetitle' style='border-bottom:1px dashed #999999;color:#3F7652' ><strong>你是从哪儿得知本站的?<\/strong><\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='1' \/>朋友介绍<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='2' \/>门户网站的搜索引擎<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='3' \/>Google或百度搜索<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='4' \/>别的网站上的链接<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='5' \/>其它途径<\/td><\/tr> <tr><td height='30'> <input type='submit' class='btn-1' name='vbt1' value='投票' \/> <input type='button' class='btn-1' name='vbt2' value='查看结果' onClick=window.open('\/plus\/vote.php?dopost=view&aid=1'); \/><\/td><\/tr> <\/form> <\/table> "); | |||||
document.write("<table width='100%' border='0' cellspacing='1' cellpadding='1' id='voteitem'> <form name='voteform' method='post' action='\/plus\/vote.php' target='_blank'> <input type='hidden' name='dopost' value='send' \/> <input type='hidden' name='aid' value='1' \/> <input type='hidden' name='ismore' value='0' \/> <tr align='center'><td height='30' id='votetitle' style='border-bottom:1px dashed #999999;color:#3F7652' ><strong>您是从哪儿得知本站的?<\/strong><\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='1' \/>朋友介绍<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='2' \/>门户网站的搜索引擎<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='3' \/>Google或百度搜索<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='4' \/>别的网站上的链接<\/td><\/tr> <tr><td height=30 bgcolor=#FFFFFF style='color:#666666'><input type='radio' name='voteitem' value='5' \/>其它途径<\/td><\/tr> <tr><td height='30'> <input type='submit' class='btn-1' name='vbt1' value='投票' \/> <input type='button' class='btn-1' name='vbt2' value='查看结果' onClick=window.open('\/plus\/vote.php?dopost=view&aid=1'); \/><\/td><\/tr> <\/form> <\/table> "); |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: action_search.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: action_search.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -3,7 +3,7 @@ | |||||
/** | /** | ||||
* @version $Id: actionsearch_class.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: actionsearch_class.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: ad_add.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: ad_add.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -21,7 +21,7 @@ if ($dopost == "save") { | |||||
$tagname = trim($tagname); | $tagname = trim($tagname); | ||||
$row = $dsql->GetOne("SELECT typeid FROM #@__myad WHERE typeid='$typeid' AND tagname LIKE '$tagname'"); | $row = $dsql->GetOne("SELECT typeid FROM #@__myad WHERE typeid='$typeid' AND tagname LIKE '$tagname'"); | ||||
if (is_array($row)) { | if (is_array($row)) { | ||||
ShowMsg("在相同栏目下已经存在同名的标记!", "-1"); | |||||
ShowMsg("在相同栏目下已经存在同名的标记", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$starttime = GetMkTime($starttime); | $starttime = GetMkTime($starttime); | ||||
@@ -62,7 +62,7 @@ if ($dopost == "save") { | |||||
VALUES('$clsid','$typeid','$tagname','$adname','$timeset','$starttime','$endtime','$normbody','$expbody'); | VALUES('$clsid','$typeid','$tagname','$adname','$timeset','$starttime','$endtime','$normbody','$expbody'); | ||||
"; | "; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
ShowMsg("成功增加一个广告!", "ad_main.php"); | |||||
ShowMsg("成功增加一个广告", "ad_main.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$dsql->Execute('dd', 'SELECT * FROM `#@__myadtype` ORDER BY id DESC'); | $dsql->Execute('dd', 'SELECT * FROM `#@__myadtype` ORDER BY id DESC'); | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: ad_edit.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: ad_edit.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -18,7 +18,7 @@ $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "ad_main.php" : $_COOKIE[' | |||||
if ($dopost == 'delete') { | if ($dopost == 'delete') { | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__myad` WHERE aid='$aid' "); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__myad` WHERE aid='$aid' "); | ||||
ShowMsg("成功删除一则广告代码!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功删除一则广告代码", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} else if ($dopost == "gettag") { | } else if ($dopost == "gettag") { | ||||
require_once(DEDEINC.'/oxwindow.class.php'); | require_once(DEDEINC.'/oxwindow.class.php'); | ||||
@@ -32,7 +32,7 @@ if ($dopost == 'delete') { | |||||
如果不希望重新生成所有页面,则直接调用JS代码即可。 | 如果不希望重新生成所有页面,则直接调用JS代码即可。 | ||||
"; | "; | ||||
$wintitle = "广告管理-获取广告标签"; | $wintitle = "广告管理-获取广告标签"; | ||||
$wecome_info = "<a href='ad_main.php'><u>广告管理</u></a>::获取JS"; | |||||
$wecome_info = "<a href='ad_main.php'>广告管理</a>::获取JS"; | |||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
$win->Init(); | $win->Init(); | ||||
$winform = $win->GetWindow("hand", $info); | $winform = $win->GetWindow("hand", $info); | ||||
@@ -63,7 +63,7 @@ if ($dopost == 'delete') { | |||||
WHERE aid='$aid' | WHERE aid='$aid' | ||||
"; | "; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
ShowMsg("成功更改一则广告代码!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功更改一则广告代码", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: ad_main.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: ad_main.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: friendlink_type.php 1 8:48 2010年7月13日Z tianya $ | * @version $Id: friendlink_type.php 1 8:48 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -36,7 +36,7 @@ if ($dopost == "save") { | |||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
} | } | ||||
header("Content-Type: text/html; charset={$cfg_soft_lang}"); | header("Content-Type: text/html; charset={$cfg_soft_lang}"); | ||||
ShowMsg("成功更新广告分类列表!", 'adtype_main.php'); | |||||
ShowMsg("成功更新广告分类列表", 'adtype_main.php'); | |||||
exit; | exit; | ||||
} | } | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 图集发布 | * 图集发布 | ||||
* | * | ||||
* @version $Id: album_add.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: album_add.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -13,9 +12,7 @@ require_once(dirname(__FILE__) . "/config.php"); | |||||
CheckPurview('a_New,a_AccNew'); | CheckPurview('a_New,a_AccNew'); | ||||
require_once(DEDEINC."/customfields.func.php"); | require_once(DEDEINC."/customfields.func.php"); | ||||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | if ($dopost != 'save') { | ||||
require_once(DEDEINC."/dedetag.class.php"); | require_once(DEDEINC."/dedetag.class.php"); | ||||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | ||||
@@ -30,11 +27,9 @@ if ($dopost != 'save') { | |||||
} else { | } else { | ||||
if ($channelid == 0) $channelid = 2; | if ($channelid == 0) $channelid = 2; | ||||
} | } | ||||
//获得频道模型信息 | //获得频道模型信息 | ||||
$cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
$channelid = $cInfos['id']; | $channelid = $cInfos['id']; | ||||
//获取文章最大id以确定当前权重 | //获取文章最大id以确定当前权重 | ||||
$maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); | $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); | ||||
include DedeInclude("templets/album_add.htm"); | include DedeInclude("templets/album_add.htm"); | ||||
@@ -42,14 +37,13 @@ if ($dopost != 'save') { | |||||
} | } | ||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == 'save') { | |||||
-------------------------------*/ | |||||
else if ($dopost == 'save') { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
require_once(DEDEINC.'/oxwindow.class.php'); | require_once(DEDEINC.'/oxwindow.class.php'); | ||||
$flag = isset($flags) ? join(',', $flags) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | ||||
if (!isset($typeid2)) $typeid2 = 0; | if (!isset($typeid2)) $typeid2 = 0; | ||||
if (!isset($autokey)) $autokey = 0; | if (!isset($autokey)) $autokey = 0; | ||||
if (!isset($remote)) $remote = 0; | if (!isset($remote)) $remote = 0; | ||||
@@ -61,23 +55,21 @@ function __save(){ } | |||||
if (!isset($albums)) $albums = ""; | if (!isset($albums)) $albums = ""; | ||||
if (!isset($delzip)) $delzip = 0; | if (!isset($delzip)) $delzip = 0; | ||||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | ||||
if ($typeid == 0) { | if ($typeid == 0) { | ||||
ShowMsg("请指定文档的栏目!", "-1"); | |||||
ShowMsg("请指定文档的栏目", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($channelid)) { | if (empty($channelid)) { | ||||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!CheckChannel($typeid, $channelid)) { | if (!CheckChannel($typeid, $channelid)) { | ||||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!TestPurview('a_New')) { | if (!TestPurview('a_New')) { | ||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!"); | |||||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); | |||||
} | } | ||||
//对保存的内容进行处理 | //对保存的内容进行处理 | ||||
if (empty($writer)) $writer = $cuserLogin->getUserName(); | if (empty($writer)) $writer = $cuserLogin->getUserName(); | ||||
if (empty($source)) $source = '未知'; | if (empty($source)) $source = '未知'; | ||||
@@ -101,11 +93,9 @@ function __save(){ } | |||||
$arcrank = -1; | $arcrank = -1; | ||||
} | } | ||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
//处理上传的缩略图 | //处理上传的缩略图 | ||||
if (empty($ddisremote)) $ddisremote = 0; | if (empty($ddisremote)) $ddisremote = 0; | ||||
$litpic = GetDDImage('none', $picname, $ddisremote); | $litpic = GetDDImage('none', $picname, $ddisremote); | ||||
// 处理新的缩略图上传 | // 处理新的缩略图上传 | ||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
@@ -114,24 +104,19 @@ function __save(){ } | |||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
$fullUrl = $fullUrl.".png"; | $fullUrl = $fullUrl.".png"; | ||||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | ||||
//加水印 | //加水印 | ||||
WaterImg($cfg_basedir.$fullUrl, 'up'); | WaterImg($cfg_basedir.$fullUrl, 'up'); | ||||
$litpic = $fullUrl; | $litpic = $fullUrl; | ||||
} | } | ||||
//生成文档ID | //生成文档ID | ||||
$arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | ||||
if (empty($arcID)) { | if (empty($arcID)) { | ||||
ShowMsg("无法获得主键,因此无法进行后续操作!", "-1"); | |||||
ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; | $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; | ||||
$hasone = FALSE; | $hasone = FALSE; | ||||
//处理并保存从网上复制的图片 | //处理并保存从网上复制的图片 | ||||
/*--------------------- | /*--------------------- | ||||
function _getformhtml() | function _getformhtml() | ||||
@@ -172,7 +157,6 @@ function __save(){ } | |||||
$imgfile = $cfg_basedir.$iurl; | $imgfile = $cfg_basedir.$iurl; | ||||
copy($imgold, $imgfile); | copy($imgold, $imgfile); | ||||
unlink($imgold); | unlink($imgold); | ||||
if (is_file($imgfile)) { | if (is_file($imgfile)) { | ||||
$litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | $litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | ||||
//指定了提取第一张为缩略图的情况强制使用第一张缩略图 | //指定了提取第一张为缩略图的情况强制使用第一张缩略图 | ||||
@@ -184,18 +168,14 @@ function __save(){ } | |||||
$info = ''; | $info = ''; | ||||
$imginfos = GetImageSize($imgfile, $info); | $imginfos = GetImageSize($imgfile, $info); | ||||
$imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | ||||
//把图片信息保存到媒体文档管理档案中 | //把图片信息保存到媒体文档管理档案中 | ||||
$inquery = " | $inquery = " | ||||
INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | 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'); | |||||
"; | |||||
VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; | |||||
$dsql->ExecuteNoneQuery($inquery); | $dsql->ExecuteNoneQuery($inquery); | ||||
$fid = $dsql->GetLastID(); | $fid = $dsql->GetLastID(); | ||||
AddMyAddon($fid, $iurl); | AddMyAddon($fid, $iurl); | ||||
WaterImg($imgfile, 'up'); | WaterImg($imgfile, 'up'); | ||||
if (!$hasone && $ddisfirst == 1 && $litpic == '') { | if (!$hasone && $ddisfirst == 1 && $litpic == '') { | ||||
if (empty($litpicname)) { | if (empty($litpicname)) { | ||||
$litpicname = $iurl; | $litpicname = $iurl; | ||||
@@ -210,10 +190,8 @@ function __save(){ } | |||||
$fm->RmDirFiles($tmpzipdir); | $fm->RmDirFiles($tmpzipdir); | ||||
} | } | ||||
} | } | ||||
if ($albums !== "") { | if ($albums !== "") { | ||||
$albumsArr = json_decode(stripslashes($albums), true); | $albumsArr = json_decode(stripslashes($albums), true); | ||||
for ($i = 0; $i <= count($albumsArr) - 1; $i++) { | for ($i = 0; $i <= count($albumsArr) - 1; $i++) { | ||||
$album = $albumsArr[$i]; | $album = $albumsArr[$i]; | ||||
$data = explode(',', $album['img']); | $data = explode(',', $album['img']); | ||||
@@ -222,7 +200,6 @@ function __save(){ } | |||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
$fullUrl = $fullUrl.".png"; | $fullUrl = $fullUrl.".png"; | ||||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | ||||
$info = ''; | $info = ''; | ||||
$imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); | $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); | ||||
@@ -234,12 +211,9 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
$imgurls = addslashes($imgurls); | $imgurls = addslashes($imgurls); | ||||
//处理body字段自动摘要、自动提取缩略图等 | //处理body字段自动摘要、自动提取缩略图等 | ||||
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | ||||
//分析处理附加表数据 | //分析处理附加表数据 | ||||
$inadd_f = ''; | $inadd_f = ''; | ||||
$inadd_v = ''; | $inadd_v = ''; | ||||
@@ -269,7 +243,6 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//处理图片文档的自定义属性 | //处理图片文档的自定义属性 | ||||
if ($litpic != '' && !preg_match("#p#", $flag)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | $flag = ($flag == '' ? 'p' : $flag.',p'); | ||||
@@ -277,7 +250,6 @@ function __save(){ } | |||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | if ($redirecturl != '' && !preg_match("#j#", $flag)) { | ||||
$flag = ($flag == '' ? 'j' : $flag.',j'); | $flag = ($flag == '' ? 'j' : $flag.',j'); | ||||
} | } | ||||
//跳转网址的文档强制为动态 | //跳转网址的文档强制为动态 | ||||
if (preg_match("#j#", $flag)) $ismake = -1; | if (preg_match("#j#", $flag)) $ismake = -1; | ||||
//加入主档案表 | //加入主档案表 | ||||
@@ -288,17 +260,16 @@ function __save(){ } | |||||
if (!$dsql->ExecuteNoneQuery($query)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); | $dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); | ||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//加入附加表 | //加入附加表 | ||||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
$addtable = trim($cts['addtable']); | $addtable = trim($cts['addtable']); | ||||
if (empty($addtable)) { | if (empty($addtable)) { | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | ||||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作!。", "javascript:;"); | |||||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$useip = GetIP(); | $useip = GetIP(); | ||||
@@ -308,10 +279,9 @@ function __save(){ } | |||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | ||||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//生成HTML | //生成HTML | ||||
InsertTags($tags, $arcID); | InsertTags($tags, $arcID); | ||||
$artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | ||||
@@ -319,7 +289,6 @@ function __save(){ } | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | ||||
} | } | ||||
ClearMyAddon($arcID, $title); | ClearMyAddon($arcID, $title); | ||||
//自动更新关联内容 | //自动更新关联内容 | ||||
if (is_array($automake)) { | if (is_array($automake)) { | ||||
foreach ($automake as $key => $value) { | foreach ($automake as $key => $value) { | ||||
@@ -331,23 +300,11 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//返回成功信息 | //返回成功信息 | ||||
$msg = " | |||||
请选择你的后续操作: | |||||
<a href='album_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布图片</a> | |||||
| |||||
<a href='archives_do.php?aid=" . $arcID . "&dopost=editArchives' class='btn btn-success btn-sm'>更改图集</a> | |||||
| |||||
<a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> | |||||
| |||||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布图片管理</a> | |||||
| |||||
$backurl | |||||
"; | |||||
$msg = "请选择您的后续操作:<a href='album_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布图片</a> <a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>更改图集</a> <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布图片管理</a> $backurl"; | |||||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | $msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | ||||
$wintitle = "成功发布一个图集!"; | |||||
$wintitle = "成功发布一个图集"; | |||||
$wecome_info = "文章管理::发布图集"; | $wecome_info = "文章管理::发布图集"; | ||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
$win->AddTitle("成功发布一个图集:"); | $win->AddTitle("成功发布一个图集:"); | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 图集编辑 | * 图集编辑 | ||||
* | * | ||||
* @version $Id: album_edit.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: album_edit.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -13,15 +12,12 @@ require_once(dirname(__FILE__) . "/config.php"); | |||||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | ||||
require_once(DEDEINC."/customfields.func.php"); | require_once(DEDEINC."/customfields.func.php"); | ||||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | if ($dopost != 'save') { | ||||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | ||||
require_once(DEDEINC."/dedetag.class.php"); | require_once(DEDEINC."/dedetag.class.php"); | ||||
ClearMyAddon(); | ClearMyAddon(); | ||||
$aid = intval($aid); | $aid = intval($aid); | ||||
//读取归档信息 | //读取归档信息 | ||||
$arcQuery = "SELECT ch.typename as channelname,ar.membername as rankname,arc.* | $arcQuery = "SELECT ch.typename as channelname,ar.membername as rankname,arc.* | ||||
FROM `#@__archives` arc | FROM `#@__archives` arc | ||||
@@ -58,10 +54,10 @@ if ($dopost != 'save') { | |||||
} | } | ||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == 'save') { | |||||
-------------------------------*/ | |||||
else if ($dopost == 'save') { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
require_once(DEDEINC.'/oxwindow.class.php'); | require_once(DEDEINC.'/oxwindow.class.php'); | ||||
$flag = isset($flags) ? join(',', $flags) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
if (empty($typeid2)) $typeid2 = 0; | if (empty($typeid2)) $typeid2 = 0; | ||||
@@ -74,27 +70,25 @@ function __save(){ } | |||||
if (!isset($formzip)) $formzip = 0; | if (!isset($formzip)) $formzip = 0; | ||||
if (!isset($ddisfirst)) $ddisfirst = 0; | if (!isset($ddisfirst)) $ddisfirst = 0; | ||||
if (!isset($delzip)) $delzip = 0; | if (!isset($delzip)) $delzip = 0; | ||||
if ($typeid == 0) { | if ($typeid == 0) { | ||||
ShowMsg("请指定文档的栏目!", "-1"); | |||||
ShowMsg("请指定文档的栏目", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($channelid)) { | if (empty($channelid)) { | ||||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!CheckChannel($typeid, $channelid)) { | if (!CheckChannel($typeid, $channelid)) { | ||||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!TestPurview('a_Edit')) { | if (!TestPurview('a_Edit')) { | ||||
if (TestPurview('a_AccEdit')) { | if (TestPurview('a_AccEdit')) { | ||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||||
} else { | } else { | ||||
CheckArcAdmin($id, $cuserLogin->getUserID()); | CheckArcAdmin($id, $cuserLogin->getUserID()); | ||||
} | } | ||||
} | } | ||||
//对保存的内容进行处理 | //对保存的内容进行处理 | ||||
$pubdate = GetMkTime($pubdate); | $pubdate = GetMkTime($pubdate); | ||||
$sortrank = AddDay($pubdate, $sortup); | $sortrank = AddDay($pubdate, $sortup); | ||||
@@ -113,7 +107,6 @@ function __save(){ } | |||||
$arcrank = -1; | $arcrank = -1; | ||||
} | } | ||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
//处理上传的缩略图 | //处理上传的缩略图 | ||||
if (empty($ddisremote)) { | if (empty($ddisremote)) { | ||||
$ddisremote = 0; | $ddisremote = 0; | ||||
@@ -127,17 +120,13 @@ function __save(){ } | |||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
$fullUrl = $fullUrl.".png"; | $fullUrl = $fullUrl.".png"; | ||||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | ||||
//加水印 | //加水印 | ||||
WaterImg($cfg_basedir.$fullUrl, 'up'); | WaterImg($cfg_basedir.$fullUrl, 'up'); | ||||
$litpic = $fullUrl; | $litpic = $fullUrl; | ||||
} | } | ||||
//分析body里的内容 | //分析body里的内容 | ||||
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | ||||
//处理图片文档的自定义属性 | //处理图片文档的自定义属性 | ||||
if ($litpic != '' && !preg_match("#p#", $flag)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | $flag = ($flag == '' ? 'p' : $flag.',p'); | ||||
@@ -145,10 +134,8 @@ function __save(){ } | |||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | if ($redirecturl != '' && !preg_match("#j#", $flag)) { | ||||
$flag = ($flag == '' ? 'j' : $flag.',j'); | $flag = ($flag == '' ? 'j' : $flag.',j'); | ||||
} | } | ||||
//跳转网址的文档强制为动态 | //跳转网址的文档强制为动态 | ||||
if (preg_match("#j#", $flag)) $ismake = -1; | if (preg_match("#j#", $flag)) $ismake = -1; | ||||
//更新数据库的SQL语句 | //更新数据库的SQL语句 | ||||
$query = " | $query = " | ||||
UPDATE `#@__archives` SET | UPDATE `#@__archives` SET | ||||
@@ -173,15 +160,12 @@ function __save(){ } | |||||
filename='$filename', | filename='$filename', | ||||
dutyadmin='$adminid' | dutyadmin='$adminid' | ||||
WHERE id='$id'; "; | WHERE id='$id'; "; | ||||
if (!$dsql->ExecuteNoneQuery($query)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
ShowMsg("更新数据库archives表时出错,请检查!" . $dsql->GetError(), "javascript:;"); | |||||
ShowMsg("更新数据库archives表时出错,请检查".$dsql->GetError(), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; | $imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; | ||||
$hasone = false; | $hasone = false; | ||||
//---------------------------------------- | //---------------------------------------- | ||||
//检查旧的图片是否有更新,并保存 | //检查旧的图片是否有更新,并保存 | ||||
//----------------------------------------- | //----------------------------------------- | ||||
@@ -228,7 +212,6 @@ function __save(){ } | |||||
$imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | $imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | ||||
} | } | ||||
} | } | ||||
//---------------------------- | //---------------------------- | ||||
//从HTML中获取新图片 | //从HTML中获取新图片 | ||||
//---------------------------- | //---------------------------- | ||||
@@ -251,7 +234,6 @@ function __save(){ } | |||||
$tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); | $tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()), 16); | ||||
$ntime = time(); | $ntime = time(); | ||||
if (file_exists($zipfile)) { | if (file_exists($zipfile)) { | ||||
@mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); | @mkdir($tmpzipdir, $GLOBALS['cfg_dir_purview']); | ||||
@chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); | @chmod($tmpzipdir, $GLOBALS['cfg_dir_purview']); | ||||
$z = new zip(); | $z = new zip(); | ||||
@@ -274,12 +256,10 @@ function __save(){ } | |||||
$info = ''; | $info = ''; | ||||
$imginfos = GetImageSize($imgfile, $info); | $imginfos = GetImageSize($imgfile, $info); | ||||
$imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | $imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | ||||
//把图片信息保存到媒体文档管理档案中 | //把图片信息保存到媒体文档管理档案中 | ||||
$inquery = " | $inquery = " | ||||
INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | 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'); | |||||
"; | |||||
VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid');"; | |||||
$dsql->ExecuteNoneQuery($inquery); | $dsql->ExecuteNoneQuery($inquery); | ||||
if ( | if ( | ||||
!$hasone && $ddisfirst == 1 | !$hasone && $ddisfirst == 1 | ||||
@@ -298,12 +278,9 @@ function __save(){ } | |||||
$fm->RmDirFiles($tmpzipdir); | $fm->RmDirFiles($tmpzipdir); | ||||
} | } | ||||
} | } | ||||
if ($albums !== "") { | if ($albums !== "") { | ||||
$albumsArr = json_decode(stripslashes($albums), true); | $albumsArr = json_decode(stripslashes($albums), true); | ||||
// var_dump($albumsArr);exit; | // var_dump($albumsArr);exit; | ||||
for ($i = 0; $i <= count($albumsArr) - 1; $i++) { | for ($i = 0; $i <= count($albumsArr) - 1; $i++) { | ||||
$album = $albumsArr[$i]; | $album = $albumsArr[$i]; | ||||
$data = explode(',', $album['img']); | $data = explode(',', $album['img']); | ||||
@@ -312,7 +289,6 @@ function __save(){ } | |||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
$fullUrl = $fullUrl.".png"; | $fullUrl = $fullUrl.".png"; | ||||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | ||||
$info = ''; | $info = ''; | ||||
$imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); | $imginfos = GetImageSize($cfg_basedir.$fullUrl, $info); | ||||
@@ -321,9 +297,7 @@ function __save(){ } | |||||
$imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; | $imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; | ||||
} | } | ||||
} | } | ||||
$imgurls = addslashes($imgurls); | $imgurls = addslashes($imgurls); | ||||
//分析处理附加表数据 | //分析处理附加表数据 | ||||
$inadd_f = ''; | $inadd_f = ''; | ||||
$inadd_v = ''; | $inadd_v = ''; | ||||
@@ -350,7 +324,6 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//更新附加表 | //更新附加表 | ||||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
$addtable = trim($cts['addtable']); | $addtable = trim($cts['addtable']); | ||||
@@ -371,11 +344,10 @@ function __save(){ } | |||||
userip = '$useip' | userip = '$useip' | ||||
WHERE aid='$id'; "; | WHERE aid='$id'; "; | ||||
if (!$dsql->ExecuteNoneQuery($query)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!" . $dsql->GetError(), "javascript:;"); | |||||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因".$dsql->GetError(), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
//生成HTML | //生成HTML | ||||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | ||||
$arcUrl = MakeArt($id, true, true, $isremote); | $arcUrl = MakeArt($id, true, true, $isremote); | ||||
@@ -383,7 +355,6 @@ function __save(){ } | |||||
$arcUrl = $cfg_phpurl."/view.php?aid=$id"; | $arcUrl = $cfg_phpurl."/view.php?aid=$id"; | ||||
} | } | ||||
ClearMyAddon($id, $title); | ClearMyAddon($id, $title); | ||||
//自动更新关联内容 | //自动更新关联内容 | ||||
if (is_array($automake)) { | if (is_array($automake)) { | ||||
foreach ($automake as $key => $value) { | foreach ($automake as $key => $value) { | ||||
@@ -395,22 +366,9 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//返回成功信息 | //返回成功信息 | ||||
$msg = | |||||
" 请选择你的后续操作: | |||||
<a href='album_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布图片</a> | |||||
| |||||
<a href='archives_do.php?aid=" . $id . "&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||||
| |||||
<a href='$arcUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> | |||||
| |||||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理已发布图片</a> | |||||
| |||||
$backurl | |||||
"; | |||||
$wintitle = "成功更改图集!"; | |||||
$msg = "请选择您的后续操作:<a href='album_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布图片</a> <a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> <a href='$arcUrl' target='_blank' class='btn btn-success btn-sm'>预览文档</a> <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理已发布图片</a> $backurl"; | |||||
$wintitle = "成功更改图集"; | |||||
$wecome_info = "文章管理::更改图集"; | $wecome_info = "文章管理::更改图集"; | ||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
$win->AddTitle("成功更改一个图集:"); | $win->AddTitle("成功更改一个图集:"); | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: album_testhtml.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: album_testhtml.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 文档发布 | * 文档发布 | ||||
* | * | ||||
* @version $Id: archives_add.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: archives_add.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -13,27 +12,23 @@ require_once(dirname(__FILE__) . '/config.php'); | |||||
CheckPurview('a_New,a_AccNew'); | CheckPurview('a_New,a_AccNew'); | ||||
require_once(DEDEINC.'/customfields.func.php'); | require_once(DEDEINC.'/customfields.func.php'); | ||||
require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | if ($dopost != 'save') { | ||||
require_once(DEDEINC.'/dedetag.class.php'); | require_once(DEDEINC.'/dedetag.class.php'); | ||||
require_once(DEDEADMIN.'/inc/inc_catalog_options.php'); | require_once(DEDEADMIN.'/inc/inc_catalog_options.php'); | ||||
ClearMyAddon(); | ClearMyAddon(); | ||||
$channelid = empty($channelid) ? 0 : intval($channelid); | $channelid = empty($channelid) ? 0 : intval($channelid); | ||||
$cid = empty($cid) ? 0 : intval($cid); | $cid = empty($cid) ? 0 : intval($cid); | ||||
//获得频道模型ID | //获得频道模型ID | ||||
if ($cid > 0 && $channelid == 0) { | if ($cid > 0 && $channelid == 0) { | ||||
$row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | ||||
$channelid = $row['channeltype']; | $channelid = $row['channeltype']; | ||||
} else { | } else { | ||||
if ($channelid == 0) { | if ($channelid == 0) { | ||||
ShowMsg('无法识别模型信息,因此无法操作!', '-1'); | |||||
ShowMsg('无法识别模型信息,因此无法操作', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
//获得频道模型信息 | //获得频道模型信息 | ||||
$cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
$channelid = $cInfos['id']; | $channelid = $cInfos['id']; | ||||
@@ -44,38 +39,35 @@ if ($dopost != 'save') { | |||||
} | } | ||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == 'save') { | |||||
-------------------------------*/ | |||||
else if ($dopost == 'save') { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
require_once(DEDEINC.'/oxwindow.class.php'); | require_once(DEDEINC.'/oxwindow.class.php'); | ||||
$flag = isset($flags) ? join(',', $flags) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | ||||
if (empty($litpic_b64)) $litpic_b64 = ''; | if (empty($litpic_b64)) $litpic_b64 = ''; | ||||
if (empty($typeid2)) $typeid2 = 0; | if (empty($typeid2)) $typeid2 = 0; | ||||
if (!isset($autokey)) $autokey = 0; | if (!isset($autokey)) $autokey = 0; | ||||
if (!isset($remote)) $remote = 0; | if (!isset($remote)) $remote = 0; | ||||
if (!isset($dellink)) $dellink = 0; | if (!isset($dellink)) $dellink = 0; | ||||
if (!isset($autolitpic)) $autolitpic = 0; | if (!isset($autolitpic)) $autolitpic = 0; | ||||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | ||||
if ($typeid == 0) { | if ($typeid == 0) { | ||||
ShowMsg('请指定文档的栏目!', '-1'); | |||||
ShowMsg('请指定文档的栏目', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($channelid)) { | if (empty($channelid)) { | ||||
ShowMsg('文档为非指定的类型,请检查你发布内容的表单是否合法!', '-1'); | |||||
ShowMsg('文档为非指定的类型,请检查您发布内容的表单是否合法', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!CheckChannel($typeid, $channelid)) { | if (!CheckChannel($typeid, $channelid)) { | ||||
ShowMsg('你所选择的栏目与当前模型不相符,请选择白色的选项!', '-1'); | |||||
ShowMsg('您所选择的栏目与当前模型不相符,请选择白色的选项', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!TestPurview('a_New')) { | if (!TestPurview('a_New')) { | ||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!"); | |||||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); | |||||
} | } | ||||
//对保存的内容进行处理 | //对保存的内容进行处理 | ||||
if (empty($writer)) $writer = $cuserLogin->getUserName(); | if (empty($writer)) $writer = $cuserLogin->getUserName(); | ||||
if (empty($source)) $source = '未知'; | if (empty($source)) $source = '未知'; | ||||
@@ -100,7 +92,6 @@ function __save(){ } | |||||
$arcrank = -1; | $arcrank = -1; | ||||
} | } | ||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
//处理上传的缩略图 | //处理上传的缩略图 | ||||
if (empty($ddisremote)) { | if (empty($ddisremote)) { | ||||
$ddisremote = 0; | $ddisremote = 0; | ||||
@@ -114,22 +105,17 @@ function __save(){ } | |||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
$fullUrl = $fullUrl.".png"; | $fullUrl = $fullUrl.".png"; | ||||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | ||||
//加水印 | //加水印 | ||||
WaterImg($cfg_basedir.$fullUrl, 'up'); | WaterImg($cfg_basedir.$fullUrl, 'up'); | ||||
$litpic = $fullUrl; | $litpic = $fullUrl; | ||||
} | } | ||||
//生成文档ID | //生成文档ID | ||||
$arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | ||||
if (empty($arcID)) { | if (empty($arcID)) { | ||||
ShowMsg("无法获得主键,因此无法进行后续操作!", "-1"); | |||||
ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//分析处理附加表数据 | //分析处理附加表数据 | ||||
$inadd_f = $inadd_v = ''; | $inadd_f = $inadd_v = ''; | ||||
if (!empty($dede_addonfields)) { | if (!empty($dede_addonfields)) { | ||||
@@ -149,7 +135,6 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//处理图片文档的自定义属性 | //处理图片文档的自定义属性 | ||||
if ($litpic != '' && !preg_match("#p#", $flag)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | $flag = ($flag == '' ? 'p' : $flag.',p'); | ||||
@@ -157,22 +142,18 @@ function __save(){ } | |||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | if ($redirecturl != '' && !preg_match("#j#", $flag)) { | ||||
$flag = ($flag == '' ? 'j' : $flag.',j'); | $flag = ($flag == '' ? 'j' : $flag.',j'); | ||||
} | } | ||||
//跳转网址的文档强制为动态 | //跳转网址的文档强制为动态 | ||||
if (preg_match("#j#", $flag)) $ismake = -1; | 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) | |||||
$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', | 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');"; | '$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$voteid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; | ||||
if (!$dsql->ExecuteNoneQuery($query)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | ||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//保存到附加表 | //保存到附加表 | ||||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
$addtable = trim($cts['addtable']); | $addtable = trim($cts['addtable']); | ||||
@@ -183,11 +164,10 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | ||||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
//生成HTML | //生成HTML | ||||
InsertTags($tags, $arcID); | InsertTags($tags, $arcID); | ||||
$artUrl = MakeArt($arcID, true, true, $isremote); | $artUrl = MakeArt($arcID, true, true, $isremote); | ||||
@@ -195,7 +175,6 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | ||||
} | } | ||||
ClearMyAddon($arcID, $title); | ClearMyAddon($arcID, $title); | ||||
//自动更新关联内容 | //自动更新关联内容 | ||||
if (is_array($automake)) { | if (is_array($automake)) { | ||||
foreach ($automake as $key => $value) { | foreach ($automake as $key => $value) { | ||||
@@ -207,22 +186,10 @@ color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywo | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//返回成功信息 | //返回成功信息 | ||||
$msg = " 请选择你的后续操作: | |||||
<a href='archives_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布文档</a> | |||||
| |||||
<a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | |||||
| |||||
<a href='archives_do.php?aid=" . $arcID . "&dopost=editArchives' class='btn btn-success btn-sm'>更改文档</a> | |||||
| |||||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> | |||||
| |||||
$backurl | |||||
"; | |||||
$msg = "请选择您的后续操作:<a href='archives_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布文档</a> <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> <a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>更改文档</a> <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> $backurl"; | |||||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | $msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | ||||
$wintitle = '成功发布文档!'; | |||||
$wintitle = '成功发布文档'; | |||||
$wecome_info = '文档管理::发布文档'; | $wecome_info = '文档管理::发布文档'; | ||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
$win->AddTitle('成功发布文档:'); | $win->AddTitle('成功发布文档:'); | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 文档处理 | * 文档处理 | ||||
* | * | ||||
* @version $Id: archives_do.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: archives_do.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -15,13 +14,11 @@ require_once(DEDEADMIN . '/inc/inc_archives_functions.php'); | |||||
require_once(DEDEINC.'/typelink.class.php'); | require_once(DEDEINC.'/typelink.class.php'); | ||||
require_once(DEDEINC.'/arc.archives.class.php'); | require_once(DEDEINC.'/arc.archives.class.php'); | ||||
$ENV_GOBACK_URL = (empty($_COOKIE['ENV_GOBACK_URL']) ? 'content_list.php' : $_COOKIE['ENV_GOBACK_URL']); | $ENV_GOBACK_URL = (empty($_COOKIE['ENV_GOBACK_URL']) ? 'content_list.php' : $_COOKIE['ENV_GOBACK_URL']); | ||||
if (empty($dopost)) { | if (empty($dopost)) { | ||||
ShowMsg('对不起,你没指定运行参数!', '-1'); | |||||
ShowMsg('对不起,您没指定运行参数', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$aid = isset($aid) ? preg_replace("#[^0-9]#", '', $aid) : ''; | $aid = isset($aid) ? preg_replace("#[^0-9]#", '', $aid) : ''; | ||||
/*-------------------------- | /*-------------------------- | ||||
//编辑文档 | //编辑文档 | ||||
function editArchives(){ } | function editArchives(){ } | ||||
@@ -41,9 +38,9 @@ if ($dopost == 'editArchives') { | |||||
/*-------------------------- | /*-------------------------- | ||||
//浏览文档 | //浏览文档 | ||||
function viewArchives(){ } | function viewArchives(){ } | ||||
---------------------------*/ else if ($dopost == "viewArchives") { | |||||
---------------------------*/ | |||||
else if ($dopost == "viewArchives") { | |||||
$aid = preg_replace("#[^0-9]#", '', $aid); | $aid = preg_replace("#[^0-9]#", '', $aid); | ||||
//获取主表信息 | //获取主表信息 | ||||
$query = "SELECT arc.*,ch.maintable,ch.addtable,ch.issystem,ch.editcon, | $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 | tp.typedir,tp.typename,tp.corank,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.sitepath,tp.siteurl | ||||
@@ -61,7 +58,7 @@ function viewArchives(){ } | |||||
PutCookie('DedeUserID', $arcRow['mid'], 1800); | PutCookie('DedeUserID', $arcRow['mid'], 1800); | ||||
PutCookie('DedeLoginTime', time(), 1800); | PutCookie('DedeLoginTime', time(), 1800); | ||||
if ($arcRow['ismake'] == -1 || $arcRow['corank'] != 0 || $arcRow['arcrank'] != 0 || ($arcRow['typeid'] == 0 && $arcRow['channel'] != -1) || $arcRow['money'] > 0) { | if ($arcRow['ismake'] == -1 || $arcRow['corank'] != 0 || $arcRow['arcrank'] != 0 || ($arcRow['typeid'] == 0 && $arcRow['channel'] != -1) || $arcRow['money'] > 0) { | ||||
echo "<script language='javascript'>location.href='{$cfg_phpurl}/view.php?aid={$aid}';</script>"; | |||||
echo "<script>location.href='{$cfg_phpurl}/view.php?aid={$aid}';</script>"; | |||||
exit(); | exit(); | ||||
} | } | ||||
} else { | } else { | ||||
@@ -113,42 +110,43 @@ function viewArchives(){ } | |||||
if (!file_exists($truefile)) { | if (!file_exists($truefile)) { | ||||
MakeArt($aid, TRUE); | MakeArt($aid, TRUE); | ||||
} | } | ||||
echo "<script language='javascript'>location.href='$arcurl" . "?" . time() . "';</script>"; | |||||
echo "<script>location.href='$arcurl"."?".time()."';</script>"; | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//异步上传缩略图 | //异步上传缩略图 | ||||
function uploadLitpic(){ } | function uploadLitpic(){ } | ||||
---------------------------*/ else if ($dopost == "uploadLitpic") { | |||||
---------------------------*/ | |||||
else if ($dopost == "uploadLitpic") { | |||||
$upfile = AdminUpload('litpic', 'imagelit', 0, false); | $upfile = AdminUpload('litpic', 'imagelit', 0, false); | ||||
if ($upfile == '-1') { | if ($upfile == '-1') { | ||||
$msg = "<script language='javascript'> | |||||
$msg = "<script> | |||||
parent.document.getElementById('uploadwait').style.display = 'none'; | parent.document.getElementById('uploadwait').style.display = 'none'; | ||||
alert('你没指定要上传的文件或文件大小超过限制!'); | |||||
alert('您没指定要上传的文件或文件大小超过限制'); | |||||
</script>"; | </script>"; | ||||
} else if ($upfile == '-2') { | } else if ($upfile == '-2') { | ||||
$msg = "<script language='javascript'> | |||||
$msg = "<script> | |||||
parent.document.getElementById('uploadwait').style.display = 'none'; | parent.document.getElementById('uploadwait').style.display = 'none'; | ||||
alert('上传文件失败,请检查原因!'); | |||||
alert('上传文件失败,请检查原因'); | |||||
</script>"; | </script>"; | ||||
} else if ($upfile == '0') { | } else if ($upfile == '0') { | ||||
$msg = "<script language='javascript'> | |||||
$msg = "<script> | |||||
parent.document.getElementById('uploadwait').style.display = 'none'; | parent.document.getElementById('uploadwait').style.display = 'none'; | ||||
alert('文件类型不正确!'); | |||||
alert('文件类型不正确'); | |||||
</script>"; | </script>"; | ||||
} else { | } else { | ||||
if (!empty($cfg_uplitpic_cut) && $cfg_uplitpic_cut == 'N') { | if (!empty($cfg_uplitpic_cut) && $cfg_uplitpic_cut == 'N') { | ||||
$msg = "<script language='javascript'> | |||||
$msg = "<script> | |||||
parent.document.getElementById('uploadwait').style.display = 'none'; | parent.document.getElementById('uploadwait').style.display = 'none'; | ||||
parent.document.getElementById('picname').value = '{$upfile}'; | parent.document.getElementById('picname').value = '{$upfile}'; | ||||
if(parent.document.getElementById('divpicview')) | if(parent.document.getElementById('divpicview')) | ||||
{ | { | ||||
parent.document.getElementById('divpicview').style.width = '150px'; | parent.document.getElementById('divpicview').style.width = '150px'; | ||||
parent.document.getElementById('divpicview').innerHTML = \"<img src='{$upfile}?n' width='150' />\"; | |||||
parent.document.getElementById('divpicview').innerHTML = \"<img src='{$upfile}?n' width='150'>\"; | |||||
} | } | ||||
</script>"; | </script>"; | ||||
} else { | } else { | ||||
$msg = "<script language='javascript'> | |||||
$msg = "<script> | |||||
parent.document.getElementById('uploadwait').style.display = 'none'; | parent.document.getElementById('uploadwait').style.display = 'none'; | ||||
window.open('imagecut.php?f=picname&isupload=yes&file={$upfile}', 'popUpImagesWin', 'scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=150, top=50'); | window.open('imagecut.php?f=picname&isupload=yes&file={$upfile}', 'popUpImagesWin', 'scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=150, top=50'); | ||||
</script>"; | </script>"; | ||||
@@ -160,13 +158,14 @@ function uploadLitpic(){ } | |||||
/*-------------------------- | /*-------------------------- | ||||
//推荐文档 | //推荐文档 | ||||
function commendArchives(){ } | function commendArchives(){ } | ||||
---------------------------*/ else if ($dopost == "commendArchives") { | |||||
---------------------------*/ | |||||
else if ($dopost == "commendArchives") { | |||||
CheckPurview('a_Commend,sys_ArcBatch'); | CheckPurview('a_Commend,sys_ArcBatch'); | ||||
if (!empty($aid) && empty($qstr)) { | if (!empty($aid) && empty($qstr)) { | ||||
$qstr = $aid; | $qstr = $aid; | ||||
} | } | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | ||||
@@ -190,19 +189,18 @@ function commendArchives(){ } | |||||
$dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); | $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功把所选的文档设为推荐!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功把所选的文档设为推荐", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//生成HTML | //生成HTML | ||||
function makeArchives(); | function makeArchives(); | ||||
---------------------------*/ else if ($dopost == "makeArchives") { | |||||
---------------------------*/ | |||||
else if ($dopost == "makeArchives") { | |||||
CheckPurview('sys_MakeHtml,sys_ArcBatch'); | CheckPurview('sys_MakeHtml,sys_ArcBatch'); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg('参数无效!', $ENV_GOBACK_URL); | |||||
ShowMsg('参数无效', $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | ||||
@@ -212,18 +210,19 @@ function makeArchives(); | |||||
$i++; | $i++; | ||||
$pageurl = MakeArt($aid, false); | $pageurl = MakeArt($aid, false); | ||||
} | } | ||||
ShowMsg("成功更新指定 $i 个文件...", $ENV_GOBACK_URL); | |||||
ShowMsg("成功更新指定 $i 个文件", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//审核文档 | //审核文档 | ||||
function checkArchives() { } | function checkArchives() { } | ||||
---------------------------*/ else if ($dopost == "checkArchives") { | |||||
---------------------------*/ | |||||
else if ($dopost == "checkArchives") { | |||||
CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); | CheckPurview('a_Check,a_AccCheck,sys_ArcBatch'); | ||||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | ||||
@@ -245,13 +244,14 @@ function checkArchives() { } | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); | $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); | ||||
$pageurl = MakeArt($aid, false); | $pageurl = MakeArt($aid, false); | ||||
} | } | ||||
ShowMsg("成功审核指定的文档!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功审核指定的文档", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//删除文档 | //删除文档 | ||||
function delArchives(){ } | function delArchives(){ } | ||||
---------------------------*/ else if ($dopost == "delArchives") { | |||||
---------------------------*/ | |||||
else if ($dopost == "delArchives") { | |||||
CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | ||||
require_once(DEDEINC."/oxwindow.class.php"); | require_once(DEDEINC."/oxwindow.class.php"); | ||||
if (empty($fmdo)) $fmdo = ''; | if (empty($fmdo)) $fmdo = ''; | ||||
@@ -261,12 +261,11 @@ function delArchives(){ } | |||||
$qstr = $aid; | $qstr = $aid; | ||||
} | } | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$qstrs = explode("`", $qstr); | $qstrs = explode("`", $qstr); | ||||
$okaids = array(); | $okaids = array(); | ||||
foreach ($qstrs as $aid) { | foreach ($qstrs as $aid) { | ||||
if (!isset($okaids[$aid])) { | if (!isset($okaids[$aid])) { | ||||
DelArc($aid); | DelArc($aid); | ||||
@@ -274,7 +273,7 @@ function delArchives(){ } | |||||
$okaids[$aid] = 1; | $okaids[$aid] = 1; | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功删除指定的文档!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功删除指定的文档", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} else { | } else { | ||||
$wintitle = "文档管理-删除文档"; | $wintitle = "文档管理-删除文档"; | ||||
@@ -285,59 +284,53 @@ function delArchives(){ } | |||||
$win->AddHidden("dopost", $dopost); | $win->AddHidden("dopost", $dopost); | ||||
$win->AddHidden("qstr", $qstr); | $win->AddHidden("qstr", $qstr); | ||||
$win->AddHidden("aid", $aid); | $win->AddHidden("aid", $aid); | ||||
$win->AddTitle("你确实要删除“ $qstr 和 $aid ”这些文档?"); | |||||
$win->AddTitle("您确实要删除 $qstr 和 $aid 这些文档?"); | |||||
$winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
$win->Display(); | $win->Display(); | ||||
} | } | ||||
} | } | ||||
/*----------------------------- | /*----------------------------- | ||||
function moveArchives(){ } | function moveArchives(){ } | ||||
------------------------------*/ else if ($dopost == 'moveArchives') { | |||||
------------------------------*/ | |||||
else if ($dopost == 'moveArchives') { | |||||
CheckPurview('sys_ArcBatch'); | CheckPurview('sys_ArcBatch'); | ||||
if (empty($totype)) { | if (empty($totype)) { | ||||
require_once(DEDEINC.'/typelink.class.php'); | require_once(DEDEINC.'/typelink.class.php'); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
AjaxHead(); | AjaxHead(); | ||||
$channelid = empty($channelid) ? 0 : $channelid; | $channelid = empty($channelid) ? 0 : $channelid; | ||||
$tl = new TypeLink($aid); | $tl = new TypeLink($aid); | ||||
$typeOptions = $tl->GetOptionArray(0, $admin_catalogs, $channelid); | $typeOptions = $tl->GetOptionArray(0, $admin_catalogs, $channelid); | ||||
$typeOptions = "<select name='totype' style='width:90%'> | |||||
<option value='0'>请选择移动到的位置...</option>\r\n | |||||
$typeOptions = "<select name='totype' style='width:320px'> | |||||
<option value='0'>请选择移动到的位置</option> | |||||
$typeOptions | $typeOptions | ||||
</select>"; | </select>"; | ||||
//输出AJAX可移动窗体 | //输出AJAX可移动窗体 | ||||
$divname = 'moveArchives'; | $divname = 'moveArchives'; | ||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">\r\n"; | |||||
echo " <div class='titLeft'>移动文档</div>\r\n"; | |||||
echo " <div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' alt='关闭' title='关闭' /></div>\r\n"; | |||||
echo "</div>\r\n"; | |||||
echo "<form name='quickeditform' action='archives_do.php' method='post'>\r\n"; | |||||
echo "<input type='hidden' name='dopost' value='{$dopost}' />\r\n"; | |||||
echo "<input type='hidden' name='qstr' value='{$qstr}' />\r\n"; | |||||
echo "<table width='100%' style='margin-top:6px;z-index:9000;'>\r\n"; | |||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">"; | |||||
echo "<div class='titLeft'>移动文档</div>"; | |||||
echo "<div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' title='关闭'></div>"; | |||||
echo "</div>"; | |||||
echo "<form name='quickeditform' action='archives_do.php' method='post'>"; | |||||
echo "<input type='hidden' name='dopost' value='{$dopost}'>"; | |||||
echo "<input type='hidden' name='qstr' value='{$qstr}'>"; | |||||
echo "<table width='100%' style='display:inline-block;z-index:9000'>"; | |||||
?> | ?> | ||||
<tr height='28'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 目标栏目:</td> | <td width="80" class='bline'> 目标栏目:</td> | ||||
<td class='bline'> | |||||
<?php echo $typeOptions; ?> | |||||
</td> | |||||
<td class='bline'><?php echo $typeOptions; ?></td> | |||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 文档ID:</td> | <td width="80" class='bline'> 文档ID:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:310px;overflow:hidden;' /> | |||||
<br /> | |||||
移动到的目标栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档。 | |||||
<input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:320px;overflow:hidden'> | |||||
<br>移动到的目标栏目必须和选定的文档频道类型一致,否则程序会自动勿略不符合的文档。 | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<td colspan='2' align='center' style='padding-top:12px'> | |||||
<input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" class="np" border="0" style="cursor:pointer" /> | |||||
| |||||
<img src="images/button_back.gif" width="60" height="22" border="0" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' style="cursor:pointer" /> | |||||
</td> | |||||
<tr height='36'> | |||||
<td colspan='2' align='center' style='padding-top:10px'> | |||||
<button type='submit' class='btn btn-success'>保存</button> | |||||
<button type='button' onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class='btn btn-success'>关闭</button> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -349,11 +342,11 @@ function moveArchives(){ } | |||||
$typeInfos = $dsql->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' "); | $typeInfos = $dsql->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"; | $idtype = "id"; | ||||
if (!is_array($typeInfos)) { | if (!is_array($typeInfos)) { | ||||
ShowMsg('参数错误!', '-1'); | |||||
ShowMsg('参数错误', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if ($typeInfos['ispart'] != 0) { | if ($typeInfos['ispart'] != 0) { | ||||
ShowMsg('文档保存的栏目必须为最终列表栏目!', '-1'); | |||||
ShowMsg('文档保存的栏目必须为最终列表栏目', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($typeInfos['addtable'])) { | if (empty($typeInfos['addtable'])) { | ||||
@@ -384,21 +377,22 @@ function moveArchives(){ } | |||||
$arc = new Archives($aid); | $arc = new Archives($aid); | ||||
$arc->MakeHtml(); | $arc->MakeHtml(); | ||||
} | } | ||||
ShowMsg("成功移动 $j 个文档!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功移动 $j 个文档", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
/*----------------------------- | /*----------------------------- | ||||
//还原文档 | //还原文档 | ||||
function RbReturnArchives(){ } | function RbReturnArchives(){ } | ||||
------------------------------*/ else if ($dopost == 'return') { | |||||
------------------------------*/ | |||||
else if ($dopost == 'return') { | |||||
CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | ||||
require_once(DEDEINC."/oxwindow.class.php"); | require_once(DEDEINC."/oxwindow.class.php"); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", "recycling.php"); | |||||
ShowMsg("参数无效", "recycling.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$qstrs = explode("`", $qstr); | $qstrs = explode("`", $qstr); | ||||
@@ -406,13 +400,14 @@ function RbReturnArchives(){ } | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank='-1',ismake='0' WHERE id='$aid'"); | $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET arcrank='-1',ismake='0' WHERE id='$aid'"); | ||||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid'; "); | $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET `arcrank` = '-1' WHERE id = '$aid'; "); | ||||
} | } | ||||
ShowMsg("成功还原指定的文档!", "recycling.php"); | |||||
ShowMsg("成功还原指定的文档", "recycling.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*----------------------------- | /*----------------------------- | ||||
//清空文档 | //清空文档 | ||||
function RbClearArchives(){ } | function RbClearArchives(){ } | ||||
------------------------------*/ else if ($dopost == 'clear') { | |||||
------------------------------*/ | |||||
else if ($dopost == 'clear') { | |||||
CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | ||||
require_once(DEDEINC."/oxwindow.class.php"); | require_once(DEDEINC."/oxwindow.class.php"); | ||||
if (empty($fmdo)) $fmdo = ''; | if (empty($fmdo)) $fmdo = ''; | ||||
@@ -421,7 +416,7 @@ function RbClearArchives(){ } | |||||
if ($fmdo == 'yes') { | if ($fmdo == 'yes') { | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", "recycling.php"); | |||||
ShowMsg("参数无效", "recycling.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$qstrs = explode(",", $qstr); | $qstrs = explode(",", $qstr); | ||||
@@ -434,7 +429,7 @@ function RbClearArchives(){ } | |||||
$okaids[$qstr] = 1; | $okaids[$qstr] = 1; | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功删除指定的文档!", "recycling.php"); | |||||
ShowMsg("成功删除指定的文档", "recycling.php"); | |||||
exit(); | exit(); | ||||
} else { | } else { | ||||
$dsql->SetQuery("SELECT id FROM `#@__archives` WHERE `arcrank` = '-2'"); | $dsql->SetQuery("SELECT id FROM `#@__archives` WHERE `arcrank` = '-2'"); | ||||
@@ -446,7 +441,7 @@ function RbClearArchives(){ } | |||||
} | } | ||||
$num = $dsql->GetTotalRow(); | $num = $dsql->GetTotalRow(); | ||||
if (empty($num)) { | if (empty($num)) { | ||||
ShowMsg("对不起,未发现相关文档!", "recycling.php"); | |||||
ShowMsg("对不起,未发现相关文档", "recycling.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$wintitle = "文档管理-清空所有文档"; | $wintitle = "文档管理-清空所有文档"; | ||||
@@ -458,7 +453,7 @@ function RbClearArchives(){ } | |||||
$win->AddHidden("qstr", $qstr); | $win->AddHidden("qstr", $qstr); | ||||
$win->AddHidden("aid", $aid); | $win->AddHidden("aid", $aid); | ||||
$win->AddHidden("recycle", $recycle); | $win->AddHidden("recycle", $recycle); | ||||
$win->AddTitle("本次操作将清空回收站<font color='#FF0000'>所有共 $num 篇文档</font><br>你确实要永久删除“ $qstr ”这些文档?"); | |||||
$win->AddTitle("本次操作将清空回收站所有共 $num 篇文档<br>您确实要永久删除 $qstr 这些文档?"); | |||||
$winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
$win->Display(); | $win->Display(); | ||||
} | } | ||||
@@ -466,21 +461,20 @@ function RbClearArchives(){ } | |||||
/*----------------------------- | /*----------------------------- | ||||
//清除文档 | //清除文档 | ||||
function RbDelArchives(){ } | function RbDelArchives(){ } | ||||
------------------------------*/ else if ($dopost == 'del') { | |||||
------------------------------*/ | |||||
else if ($dopost == 'del') { | |||||
CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | CheckPurview('a_Del,a_AccDel,a_MyDel,sys_ArcBatch'); | ||||
require_once(DEDEINC."/oxwindow.class.php"); | require_once(DEDEINC."/oxwindow.class.php"); | ||||
if (empty($fmdo)) $fmdo = ''; | if (empty($fmdo)) $fmdo = ''; | ||||
$recycle = empty($recycle) ? "" : $recycle; | $recycle = empty($recycle) ? "" : $recycle; | ||||
if ($fmdo == 'yes') { | if ($fmdo == 'yes') { | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", "recycling.php"); | |||||
ShowMsg("参数无效", "recycling.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$qstrs = explode("`", $qstr); | $qstrs = explode("`", $qstr); | ||||
$okaids = array(); | $okaids = array(); | ||||
foreach ($qstrs as $aid) { | foreach ($qstrs as $aid) { | ||||
if (!isset($okaids[$aid])) { | if (!isset($okaids[$aid])) { | ||||
DelArc($aid, "OK", "", $recycle); | DelArc($aid, "OK", "", $recycle); | ||||
@@ -488,7 +482,7 @@ function RbDelArchives(){ } | |||||
$okaids[$aid] = 1; | $okaids[$aid] = 1; | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功删除指定的文档!", "recycling.php"); | |||||
ShowMsg("成功删除指定的文档", "recycling.php"); | |||||
exit(); | exit(); | ||||
} else { | } else { | ||||
$wintitle = "文档管理-删除文档"; | $wintitle = "文档管理-删除文档"; | ||||
@@ -500,7 +494,7 @@ function RbDelArchives(){ } | |||||
$win->AddHidden("qstr", $qstr); | $win->AddHidden("qstr", $qstr); | ||||
$win->AddHidden("aid", $aid); | $win->AddHidden("aid", $aid); | ||||
$win->AddHidden("recycle", $recycle); | $win->AddHidden("recycle", $recycle); | ||||
$win->AddTitle("你确实要永久删除“ $qstr 和 $aid ”这些文档?"); | |||||
$win->AddTitle("您确实要永久删除 $qstr 和 $aid 这些文档?"); | |||||
$winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
$win->Display(); | $win->Display(); | ||||
} | } | ||||
@@ -508,7 +502,8 @@ function RbDelArchives(){ } | |||||
/*----------------------------- | /*----------------------------- | ||||
//快速编辑 | //快速编辑 | ||||
function quickEdit(){ } | function quickEdit(){ } | ||||
------------------------------*/ else if ($dopost == 'quickEdit') { | |||||
------------------------------*/ | |||||
else if ($dopost == 'quickEdit') { | |||||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | ||||
AjaxHead(); | AjaxHead(); | ||||
$query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* | $query = "SELECT ch.typename as channelname,ch.addtable,ar.membername as rankname,arc.* | ||||
@@ -517,87 +512,78 @@ function quickEdit(){ } | |||||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; | LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; | ||||
$arcRow = $dsql->GetOne($query); | $arcRow = $dsql->GetOne($query); | ||||
$divname = 'quickEdit'; | $divname = 'quickEdit'; | ||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">\r\n"; | |||||
echo " <div class='titLeft'>快速属性编辑</div>\r\n"; | |||||
echo " <div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' alt='关闭' title='关闭' /></div>\r\n"; | |||||
echo "</div>\r\n"; | |||||
echo "<form name='quickeditform' action='archives_do.php?dopost=quickEditSave&aid={$aid}' method='post'>\r\n"; | |||||
echo "<input type='hidden' name='addtable' value='{$arcRow['addtable']}' />\r\n"; | |||||
echo "<input type='hidden' name='oldtypeid' value='{$arcRow['typeid']}' />\r\n"; | |||||
echo "<table width='100%' style='margin-top:6px;z-index:9000;'>\r\n"; | |||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">"; | |||||
echo "<div class='titLeft'>快速属性编辑</div>"; | |||||
echo "<div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' title='关闭'></div>"; | |||||
echo "</div>"; | |||||
echo "<form name='quickeditform' action='archives_do.php?dopost=quickEditSave&aid={$aid}' method='post'>"; | |||||
echo "<input type='hidden' name='addtable' value='{$arcRow['addtable']}'>"; | |||||
echo "<input type='hidden' name='oldtypeid' value='{$arcRow['typeid']}'>"; | |||||
echo "<table width='100%' style='display:inline-block;z-index:9000'>"; | |||||
?> | ?> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 所属栏目:</td> | <td width="80" class='bline'> 所属栏目:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<?php | <?php | ||||
$typeOptions = GetOptionList($arcRow['typeid'], $cuserLogin->getUserChannel(), $arcRow['channel']); | $typeOptions = GetOptionList($arcRow['typeid'], $cuserLogin->getUserChannel(), $arcRow['channel']); | ||||
echo "<select name='typeid' style='width:70%'>\r\n"; | |||||
if ($arcRow["typeid"] == "0") echo "<option value='0' selected>请选择栏目...</option>\r\n"; | |||||
echo "<select name='typeid' style='width:320px'>"; | |||||
if ($arcRow["typeid"] == "0") echo "<option value='0' selected>请选择栏目</option>"; | |||||
echo $typeOptions; | echo $typeOptions; | ||||
echo "</select>"; | echo "</select>"; | ||||
?> | ?> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='28'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 属性:</td> | <td width="80" class='bline'> 属性:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<input type='hidden' name='oldflag' value='<?php echo $arcRow['flag']; ?>' /> | |||||
<input type='hidden' name='oldflag' value='<?php echo $arcRow['flag']; ?>'> | |||||
<?php | <?php | ||||
$dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); | |||||
$dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY `sortid` ASC"); | |||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($trow = $dsql->GetObject()) { | while ($trow = $dsql->GetObject()) { | ||||
if ($trow->att == 'j' || $trow->att == 'p') continue; | if ($trow->att == 'j' || $trow->att == 'p') continue; | ||||
if (preg_match("#".$trow->att."#", $arcRow['flag'])) | if (preg_match("#".$trow->att."#", $arcRow['flag'])) | ||||
echo "<label><input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' checked='checked' /> {$trow->attname}.{$trow->att}</label> "; | |||||
echo "<label><input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' checked='checked'> {$trow->attname}{$trow->att}[{$trow->att}]</label> "; | |||||
else | else | ||||
echo "<label><input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}' /> {$trow->attname}.{$trow->att}</label> "; | |||||
echo "<label><input class='np' type='checkbox' name='flags[]' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label> "; | |||||
} | } | ||||
?> | ?> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 标题:</td> | <td width="80" class='bline'> 标题:</td> | ||||
<td class='bline'> | |||||
<input name="title" type="text" id="title" value="<?php echo $arcRow['title']; ?>" style="width:90%" /> | |||||
</td> | |||||
<td class='bline'><input name="title" type="text" id="title" value="<?php echo $arcRow['title']; ?>" style="width:320px"></td> | |||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 简略标题:</td> | <td width="80" class='bline'> 简略标题:</td> | ||||
<td class='bline'> | |||||
<input name="shorttitle" type="text" id="shorttitle" value="<?php echo $arcRow['shorttitle']; ?>" style="width:60%" /> | |||||
</td> | |||||
<td class='bline'><input name="shorttitle" type="text" id="shorttitle" value="<?php echo $arcRow['shorttitle']; ?>" style="width:320px"></td> | |||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 阅读权限:</td> | <td width="80" class='bline'> 阅读权限:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<select name="arcrank" id="arcrank" style="width:120px"> | |||||
<select name="arcrank" id="arcrank" style="width:100px"> | |||||
<option value='<?php echo $arcRow["arcrank"] ?>'> | <option value='<?php echo $arcRow["arcrank"] ?>'> | ||||
<?php echo $arcRow["rankname"] ?> </option> | <?php echo $arcRow["rankname"] ?> </option> | ||||
<?php | <?php | ||||
$urank = $cuserLogin->getUserRank(); | $urank = $cuserLogin->getUserRank(); | ||||
$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE adminrank<='$urank'"); | |||||
$dsql->SetQuery("SELECT * FROM `#@__arcrank` WHERE `adminrank`<='$urank'"); | |||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($row = $dsql->GetObject()) { | while ($row = $dsql->GetObject()) { | ||||
echo " <option value='" . $row->rank . "'>" . $row->membername . "</option>\r\n"; | |||||
echo "<option value='".$row->rank."'>".$row->membername."</option>"; | |||||
} | } | ||||
?> | ?> | ||||
</select> | </select> | ||||
需要金币:<input name="money" type="text" id="money" value="<?php echo $arcRow["money"]; ?>" style="width:80px" /> | |||||
需要金币:<input name="money" type="text" id="money" value="<?php echo $arcRow["money"]; ?>" style="width:100px"> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 关键字:</td> | <td width="80" class='bline'> 关键字:</td> | ||||
<td class='bline'> | |||||
<input name="keywords" type="text" id="keywords" value="<?php echo $arcRow['keywords']; ?>" style="width:70%" /> | |||||
</td> | |||||
<td class='bline'><input name="keywords" type="text" id="keywords" value="<?php echo $arcRow['keywords']; ?>" style="width:320px"></td> | |||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<td colspan='2' align='center' style='padding-top:12px' class='py-3'> | |||||
<button type="submit" class="btn btn-success">保存</button> | |||||
| |||||
<button type="button" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class="btn btn-success">关闭</button> | |||||
</td> | |||||
<tr height='36'> | |||||
<td colspan='2' align='center' class='py-3' style='padding-top:10px'> | |||||
<button type='submit' class='btn btn-success'>保存</button> | |||||
<button type='button' onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class='btn btn-success'>关闭</button> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -608,12 +594,13 @@ function quickEdit(){ } | |||||
/*----------------------------- | /*----------------------------- | ||||
//保存快速编辑的内容 | //保存快速编辑的内容 | ||||
function quickEditSave(){ } | function quickEditSave(){ } | ||||
------------------------------*/ else if ($dopost == 'quickEditSave') { | |||||
------------------------------*/ | |||||
else if ($dopost == 'quickEditSave') { | |||||
require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | ||||
//权限检测 | //权限检测 | ||||
if (!TestPurview('a_Edit')) { | if (!TestPurview('a_Edit')) { | ||||
if (TestPurview('a_AccEdit')) { | if (TestPurview('a_AccEdit')) { | ||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||||
} else { | } else { | ||||
CheckArcAdmin($aid, $cuserLogin->getUserID()); | CheckArcAdmin($aid, $cuserLogin->getUserID()); | ||||
} | } | ||||
@@ -622,22 +609,13 @@ function quickEditSave(){ } | |||||
$shorttitle = cn_substrR($shorttitle, 36); | $shorttitle = cn_substrR($shorttitle, 36); | ||||
$keywords = trim(cn_substrR($keywords, 60)); | $keywords = trim(cn_substrR($keywords, 60)); | ||||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | ||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
//属性处理 | //属性处理 | ||||
$flag = isset($flags) ? join(',', $flags) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
if (!empty($flag)) { | if (!empty($flag)) { | ||||
if (preg_match("#p#", $oldflag)) $flag .= ',p'; | if (preg_match("#p#", $oldflag)) $flag .= ',p'; | ||||
if (preg_match("#j#", $oldflag)) $flag .= ',j'; | if (preg_match("#j#", $oldflag)) $flag .= ',j'; | ||||
} | } | ||||
/* | |||||
else | |||||
{ | |||||
$flag = $oldflag; | |||||
} | |||||
*/ | |||||
$query = "UPDATE `#@__archives` SET | $query = "UPDATE `#@__archives` SET | ||||
typeid = '$typeid', | typeid = '$typeid', | ||||
flag = '$flag', | flag = '$flag', | ||||
@@ -661,28 +639,25 @@ function quickEditSave(){ } | |||||
} | } | ||||
//更新HTML | //更新HTML | ||||
$artUrl = MakeArt($aid, TRUE, TRUE); | $artUrl = MakeArt($aid, TRUE, TRUE); | ||||
$backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '-1'; | $backurl = !empty($_COOKIE['ENV_GOBACK_URL']) ? $_COOKIE['ENV_GOBACK_URL'] : '-1'; | ||||
ShowMsg('成功更新一篇文档的基本信息!', $backurl); | |||||
ShowMsg('成功更新一篇文档的基本信息', $backurl); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
分析并自动获取文档关键词 | 分析并自动获取文档关键词 | ||||
function makekw(){ } | function makekw(){ } | ||||
--------------------------*/ else if ($dopost == "makekw") { | |||||
--------------------------*/ | |||||
else if ($dopost == "makekw") { | |||||
CheckPurview('a_Commend,sys_ArcBatch'); | CheckPurview('a_Commend,sys_ArcBatch'); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | $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 "; | $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->SetQuery($query); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { | ||||
$client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); | ||||
$client->appid = $cfg_bizcore_appid; | $client->appid = $cfg_bizcore_appid; | ||||
@@ -700,7 +675,7 @@ function makekw(){ } | |||||
$description = str_replace(' ', ' ', trim($description)); | $description = str_replace(' ', ' ', trim($description)); | ||||
$description = str_replace('[', ' ', $description); | $description = str_replace('[', ' ', $description); | ||||
$description = str_replace(']', ' ', $description); | $description = str_replace(']', ' ', $description); | ||||
$description = preg_replace("#[ \r\n\t]{1,}#is", ' ', $description); | |||||
$description = preg_replace("#[ \t]{1,}#is", ' ', $description); | |||||
$description = str_replace('关键字', '', $description); | $description = str_replace('关键字', '', $description); | ||||
$description = str_replace('关键词', '', $description); | $description = str_replace('关键词', '', $description); | ||||
$description = addslashes($description); | $description = addslashes($description); | ||||
@@ -713,7 +688,6 @@ function makekw(){ } | |||||
while ($row = $dsql->GetArray()) { | while ($row = $dsql->GetArray()) { | ||||
//跳过已经有关键字的内容 | //跳过已经有关键字的内容 | ||||
if (trim($row['keywords']) != '') continue; | if (trim($row['keywords']) != '') continue; | ||||
$aid = $row['id']; | $aid = $row['id']; | ||||
$keywords = ''; | $keywords = ''; | ||||
$title = $row['title']; | $title = $row['title']; | ||||
@@ -725,7 +699,6 @@ function makekw(){ } | |||||
$sp->SetSource(Html2Text($body), $cfg_soft_lang, $cfg_soft_lang); | $sp->SetSource(Html2Text($body), $cfg_soft_lang, $cfg_soft_lang); | ||||
$sp->StartAnalysis(); | $sp->StartAnalysis(); | ||||
$allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); | $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); | ||||
if (is_array($allindexs) && is_array($titleindexs)) { | if (is_array($allindexs) && is_array($titleindexs)) { | ||||
foreach ($titleindexs as $k => $v) { | foreach ($titleindexs as $k => $v) { | ||||
if (strlen($keywords.$k) >= 60) { | if (strlen($keywords.$k) >= 60) { | ||||
@@ -744,11 +717,10 @@ function makekw(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
$description = str_replace(' ', ' ', trim($description)); | $description = str_replace(' ', ' ', trim($description)); | ||||
$description = str_replace('[', ' ', $description); | $description = str_replace('[', ' ', $description); | ||||
$description = str_replace(']', ' ', $description); | $description = str_replace(']', ' ', $description); | ||||
$description = preg_replace("#[ \r\n\t]{1,}#is", ' ', $description); | |||||
$description = preg_replace("#[ \t]{1,}#is", ' ', $description); | |||||
$description = str_replace('关键字', '', $description); | $description = str_replace('关键字', '', $description); | ||||
$description = str_replace('关键词', '', $description); | $description = str_replace('关键词', '', $description); | ||||
$description = addslashes($description); | $description = addslashes($description); | ||||
@@ -756,24 +728,22 @@ function makekw(){ } | |||||
} | } | ||||
$sp = null; | $sp = null; | ||||
} | } | ||||
ShowMsg("成功分析指定文档的关键词!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功分析指定文档的关键词", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//批量增加属性 | //批量增加属性 | ||||
function attsAdd(){ } | function attsAdd(){ } | ||||
---------------------------*/ else if ($dopost == 'attsAdd') { | |||||
---------------------------*/ | |||||
else if ($dopost == 'attsAdd') { | |||||
CheckPurview('a_Commend,sys_ArcBatch'); | CheckPurview('a_Commend,sys_ArcBatch'); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($flagname)) { | if (empty($flagname)) { | ||||
ShowMsg("必须指定要添加的属性!", $ENV_GOBACK_URL); | |||||
ShowMsg("必须指定要添加的属性", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | ||||
@@ -797,21 +767,22 @@ function attsAdd(){ } | |||||
$dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); | $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE aid='{$aid}' "); | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功对选中文档增加指定的属性!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功对选中文档增加指定的属性", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//批量删除属性 | //批量删除属性 | ||||
function attsDel(){ } | function attsDel(){ } | ||||
---------------------------*/ else if ($dopost == 'attsDel') { | |||||
---------------------------*/ | |||||
else if ($dopost == 'attsDel') { | |||||
CheckPurview('a_Commend,sys_ArcBatch'); | CheckPurview('a_Commend,sys_ArcBatch'); | ||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
if ($qstr == '') { | if ($qstr == '') { | ||||
ShowMsg("参数无效!", $ENV_GOBACK_URL); | |||||
ShowMsg("参数无效", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($flagname)) { | if (empty($flagname)) { | ||||
ShowMsg("必须指定要删除的属性!", $ENV_GOBACK_URL); | |||||
ShowMsg("必须指定要删除的属性", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr)); | ||||
@@ -845,54 +816,50 @@ function attsDel(){ } | |||||
$flag = trim(join(',', $okflags)); | $flag = trim(join(',', $okflags)); | ||||
$dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE {$idname}='{$aid}' "); | $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET `flag`='$flag' WHERE {$idname}='{$aid}' "); | ||||
} | } | ||||
ShowMsg("成功对选中文档删除指定的属性!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功对选中文档删除指定的属性", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------- | /*-------------------------- | ||||
//获得批量属性处理的AJAX窗体 | //获得批量属性处理的AJAX窗体 | ||||
function attsDlg(){ } | function attsDlg(){ } | ||||
---------------------------*/ else if ($dopost == 'attsDlg') { | |||||
---------------------------*/ | |||||
else if ($dopost == 'attsDlg') { | |||||
if (!empty($aid) && empty($qstr)) $qstr = $aid; | if (!empty($aid) && empty($qstr)) $qstr = $aid; | ||||
$dojobname = ($dojob == 'attsDel' ? '批量删除属性' : '批量增加属性'); | $dojobname = ($dojob == 'attsDel' ? '批量删除属性' : '批量增加属性'); | ||||
AjaxHead(); | AjaxHead(); | ||||
//输出AJAX可移动窗体 | //输出AJAX可移动窗体 | ||||
$divname = 'attsDlg'; | $divname = 'attsDlg'; | ||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">\r\n"; | |||||
echo " <div class='titLeft'>{$dojobname}</div>\r\n"; | |||||
echo " <div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' alt='关闭' title='关闭' /></div>\r\n"; | |||||
echo "</div>\r\n"; | |||||
echo "<form name='quickeditform' action='archives_do.php' method='post'>\r\n"; | |||||
echo "<input type='hidden' name='dopost' value='{$dojob}' />\r\n"; | |||||
echo "<input type='hidden' name='qstr' value='{$qstr}' />\r\n"; | |||||
echo "<table width='100%' style='margin-top:6px;z-index:9000;'>\r\n"; | |||||
echo "<div class='title' onmousemove=\"DropMoveHand('{$divname}', 225);\" onmousedown=\"DropStartHand();\" onmouseup=\"DropStopHand();\">"; | |||||
echo "<div class='titLeft'>{$dojobname}</div>"; | |||||
echo "<div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' title='关闭'></div>"; | |||||
echo "</div>"; | |||||
echo "<form name='quickeditform' action='archives_do.php' method='post'>"; | |||||
echo "<input type='hidden' name='dopost' value='{$dojob}'>"; | |||||
echo "<input type='hidden' name='qstr' value='{$qstr}'>"; | |||||
echo "<table width='100%' style='display:inline-block;z-index:9000'>"; | |||||
?> | ?> | ||||
<tr height='28'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 属性:</td> | <td width="80" class='bline'> 属性:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<input type='hidden' name='oldflag' value='<?php echo $arcRow['flag']; ?>' /> | |||||
<input type='hidden' name='oldflag' value='<?php echo $arcRow['flag']; ?>'> | |||||
<?php | <?php | ||||
$dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY sortid ASC"); | |||||
$dsql->SetQuery("SELECT * FROM `#@__arcatt` ORDER BY `sortid` ASC"); | |||||
$dsql->Execute(); | $dsql->Execute(); | ||||
while ($trow = $dsql->GetObject()) { | while ($trow = $dsql->GetObject()) { | ||||
if ($trow->att == 'j' || $trow->att == 'p') continue; | if ($trow->att == 'j' || $trow->att == 'p') continue; | ||||
echo "<label><input class='np' type='radio' name='flagname' id='flags{$trow->att}' value='{$trow->att}' /> {$trow->attname}.{$trow->att}</label>"; | |||||
echo "<label><input class='np' type='radio' name='flagname' id='flags{$trow->att}' value='{$trow->att}'> {$trow->attname}[{$trow->att}]</label> "; | |||||
} | } | ||||
?> | ?> | ||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<tr height='26'> | |||||
<td width="80" class='bline'> 文档ID:</td> | <td width="80" class='bline'> 文档ID:</td> | ||||
<td class='bline'> | |||||
<input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:310px;overflow:hidden;' /> | |||||
</td> | |||||
<td class='bline'><input type='text' name='tmpids' value="<?php echo $qstr; ?>" style='width:320px;overflow:hidden'></td> | |||||
</tr> | </tr> | ||||
<tr height='32'> | |||||
<td colspan='2' align='center' style='padding-top:12px'> | |||||
<input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" class="np" border="0" style="cursor:pointer" /> | |||||
| |||||
<img src="images/button_back.gif" width="60" height="22" border="0" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' style="cursor:pointer" /> | |||||
</td> | |||||
<tr height='36'> | |||||
<td colspan='2' align='center' style='padding-top:10px'> | |||||
<button type='submit' class='btn btn-success'>保存</button> | |||||
<button type='button' onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class='btn btn-success'>关闭</button> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -902,25 +869,23 @@ function attsDlg(){ } | |||||
} | } | ||||
/*------------------------ | /*------------------------ | ||||
function getCatMap() { } | function getCatMap() { } | ||||
-------------------------*/ else if ($dopost == 'getCatMap') { | |||||
-------------------------*/ | |||||
else if ($dopost == 'getCatMap') { | |||||
require_once(DEDEINC.'/typeunit.class.selector.php'); | require_once(DEDEINC.'/typeunit.class.selector.php'); | ||||
AjaxHead(); | AjaxHead(); | ||||
//输出AJAX可移动窗体 | //输出AJAX可移动窗体 | ||||
$divname = 'getCatMap'; | $divname = 'getCatMap'; | ||||
echo "<div class='title' style='cursor:default;'>\r\n"; | |||||
echo " <div class='titLeft'>栏目快速选择器</div>\r\n"; | |||||
echo " <div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' alt='关闭' title='关闭' /></div>\r\n"; | |||||
echo "</div>\r\n"; | |||||
echo "<div class='title' style='cursor:default'>"; | |||||
echo "<div class='titLeft'>栏目快速选择器</div>"; | |||||
echo "<div class='titRight'><img src='images/ico-close.gif' style='cursor:pointer;' onclick='HideObj(\"{$divname}\");ChangeFullDiv(\"hide\");' title='关闭'></div>"; | |||||
echo "</div>"; | |||||
$tus = new TypeUnitSelector(); | $tus = new TypeUnitSelector(); | ||||
?> | ?> | ||||
<form name='quicksel' action='javascript:;' method='get'> | <form name='quicksel' action='javascript:;' method='get'> | ||||
<div class='quicksel'> | |||||
<?php $tus->ListAllType($channelid); ?> | |||||
</div> | |||||
<div class='quicksel'><?php $tus->ListAllType($channelid); ?></div> | |||||
<div align='center' class='quickselfoot'> | <div align='center' class='quickselfoot'> | ||||
<img src="images/button_ok.gif" onclick="getSelCat('<?php echo $targetid; ?>');" width="60" height="22" class="np" border="0" style="cursor:pointer" /> | |||||
| |||||
<img src="images/button_back.gif" onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' width="60" height="22" border="0" style="cursor:pointer" /> | |||||
<button onclick='getSelCat("<?php echo $targetid; ?>");' class='btn btn-success'>保存</button> | |||||
<button type='button' onclick='HideObj("<?php echo $divname; ?>");ChangeFullDiv("hide");' class='btn btn-success'>关闭</button> | |||||
</div> | </div> | ||||
</form> | </form> | ||||
<?php | <?php | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 文档编辑 | * 文档编辑 | ||||
* | * | ||||
* @version $Id: archives_edit.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: archives_edit.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -13,28 +12,22 @@ require_once(dirname(__FILE__) . "/config.php"); | |||||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | ||||
require_once(DEDEINC."/customfields.func.php"); | require_once(DEDEINC."/customfields.func.php"); | ||||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | if ($dopost != 'save') { | ||||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | ||||
require_once(DEDEINC."/dedetag.class.php"); | require_once(DEDEINC."/dedetag.class.php"); | ||||
ClearMyAddon(); | ClearMyAddon(); | ||||
$aid = intval($aid); | $aid = intval($aid); | ||||
//读取归档信息 | //读取归档信息 | ||||
$arcQuery = "SELECT ch.typename as channelname,ar.membername as rankname,arc.* | $arcQuery = "SELECT ch.typename as channelname,ar.membername as rankname,arc.* | ||||
FROM `#@__archives` arc | FROM `#@__archives` arc | ||||
LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel | LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel | ||||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' | |||||
"; | |||||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid'"; | |||||
$arcRow = $dsql->GetOne($arcQuery); | $arcRow = $dsql->GetOne($arcQuery); | ||||
if (!is_array($arcRow)) { | if (!is_array($arcRow)) { | ||||
ShowMsg("读取档案基本信息出错!", "-1"); | ShowMsg("读取档案基本信息出错!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
$query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | ||||
$cInfos = $dsql->GetOne($query); | $cInfos = $dsql->GetOne($query); | ||||
if (!is_array($cInfos)) { | if (!is_array($cInfos)) { | ||||
@@ -50,40 +43,38 @@ if ($dopost != 'save') { | |||||
} | } | ||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == 'save') { | |||||
-------------------------------*/ | |||||
else if ($dopost == 'save') { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
require_once(DEDEINC.'/oxwindow.class.php'); | require_once(DEDEINC.'/oxwindow.class.php'); | ||||
$flag = isset($flags) ? join(',', $flags) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
if (empty($litpic_b64)) $litpic_b64 = ''; | if (empty($litpic_b64)) $litpic_b64 = ''; | ||||
if (empty($typeid2)) $typeid2 = 0; | if (empty($typeid2)) $typeid2 = 0; | ||||
if (!isset($autokey)) $autokey = 0; | if (!isset($autokey)) $autokey = 0; | ||||
if (!isset($remote)) $remote = 0; | if (!isset($remote)) $remote = 0; | ||||
if (!isset($dellink)) $dellink = 0; | if (!isset($dellink)) $dellink = 0; | ||||
if (!isset($autolitpic)) $autolitpic = 0; | if (!isset($autolitpic)) $autolitpic = 0; | ||||
if (!isset($writer)) $writer = ''; | if (!isset($writer)) $writer = ''; | ||||
if ($typeid == 0) { | if ($typeid == 0) { | ||||
ShowMsg("请指定文档的栏目!", "-1"); | |||||
ShowMsg("请指定文档的栏目", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($channelid)) { | if (empty($channelid)) { | ||||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!CheckChannel($typeid, $channelid)) { | if (!CheckChannel($typeid, $channelid)) { | ||||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!TestPurview('a_Edit')) { | if (!TestPurview('a_Edit')) { | ||||
if (TestPurview('a_AccEdit')) { | if (TestPurview('a_AccEdit')) { | ||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||||
} else { | } else { | ||||
CheckArcAdmin($id, $cuserLogin->getUserID()); | CheckArcAdmin($id, $cuserLogin->getUserID()); | ||||
} | } | ||||
} | } | ||||
//对保存的内容进行处理 | //对保存的内容进行处理 | ||||
$pubdate = GetMkTime($pubdate); | $pubdate = GetMkTime($pubdate); | ||||
$sortrank = AddDay($pubdate, $sortup); | $sortrank = AddDay($pubdate, $sortup); | ||||
@@ -99,14 +90,10 @@ function __save(){ } | |||||
$isremote = 0; | $isremote = 0; | ||||
$serviterm = empty($serviterm) ? "" : $serviterm; | $serviterm = empty($serviterm) ? "" : $serviterm; | ||||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | ||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
//处理上传的缩略图 | //处理上传的缩略图 | ||||
if (empty($ddisremote)) $ddisremote = 0; | if (empty($ddisremote)) $ddisremote = 0; | ||||
$litpic = GetDDImage('none', $picname, $ddisremote); | $litpic = GetDDImage('none', $picname, $ddisremote); | ||||
//处理新的缩略图上传 | //处理新的缩略图上传 | ||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
@@ -115,14 +102,11 @@ function __save(){ } | |||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
$fullUrl = $fullUrl.".png"; | $fullUrl = $fullUrl.".png"; | ||||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | ||||
//加水印 | //加水印 | ||||
WaterImg($cfg_basedir.$fullUrl, 'up'); | WaterImg($cfg_basedir.$fullUrl, 'up'); | ||||
$litpic = $fullUrl; | $litpic = $fullUrl; | ||||
} | } | ||||
//分析处理附加表数据 | //分析处理附加表数据 | ||||
$inadd_f = ''; | $inadd_f = ''; | ||||
$inadd_v = ''; | $inadd_v = ''; | ||||
@@ -149,7 +133,6 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//处理图片文档的自定义属性 | //处理图片文档的自定义属性 | ||||
if ($litpic != '' && !preg_match("#p#", $flag)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | $flag = ($flag == '' ? 'p' : $flag.',p'); | ||||
@@ -157,7 +140,6 @@ function __save(){ } | |||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | if ($redirecturl != '' && !preg_match("#j#", $flag)) { | ||||
$flag = ($flag == '' ? 'j' : $flag.',j'); | $flag = ($flag == '' ? 'j' : $flag.',j'); | ||||
} | } | ||||
//跳转网址的文档强制为动态 | //跳转网址的文档强制为动态 | ||||
if (preg_match("#j#", $flag)) $ismake = -1; | if (preg_match("#j#", $flag)) $ismake = -1; | ||||
//更新数据库的SQL语句 | //更新数据库的SQL语句 | ||||
@@ -185,21 +167,19 @@ function __save(){ } | |||||
weight='$weight' | weight='$weight' | ||||
WHERE id='$id'; "; | WHERE id='$id'; "; | ||||
if (!$dsql->ExecuteNoneQuery($inQuery)) { | if (!$dsql->ExecuteNoneQuery($inQuery)) { | ||||
ShowMsg("更新数据库archives表时出错,请检查!", "-1"); | |||||
ShowMsg("更新数据库archives表时出错,请检查", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$cts = $dsql->GetOne("SELECT addtable From `#@__channeltype` WHERE id='$channelid' "); | $cts = $dsql->GetOne("SELECT addtable From `#@__channeltype` WHERE id='$channelid' "); | ||||
$addtable = trim($cts['addtable']); | $addtable = trim($cts['addtable']); | ||||
if ($addtable != '') { | if ($addtable != '') { | ||||
$useip = GetIP(); | $useip = GetIP(); | ||||
$iquery = "UPDATE `$addtable` SET typeid='$typeid'{$inadd_f},redirecturl='$redirecturl',userip='$useip' WHERE aid='$id' "; | $iquery = "UPDATE `$addtable` SET typeid='$typeid'{$inadd_f},redirecturl='$redirecturl',userip='$useip' WHERE aid='$id' "; | ||||
if (!$dsql->ExecuteNoneQuery($iquery)) { | if (!$dsql->ExecuteNoneQuery($iquery)) { | ||||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!", "javascript:;"); | |||||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
//生成HTML | //生成HTML | ||||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | ||||
$artUrl = MakeArt($id, TRUE, TRUE, $isremote); | $artUrl = MakeArt($id, TRUE, TRUE, $isremote); | ||||
@@ -207,7 +187,6 @@ function __save(){ } | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$id"; | $artUrl = $cfg_phpurl."/view.php?aid=$id"; | ||||
} | } | ||||
ClearMyAddon($id, $title); | ClearMyAddon($id, $title); | ||||
//自动更新关联内容 | //自动更新关联内容 | ||||
if (is_array($automake)) { | if (is_array($automake)) { | ||||
foreach ($automake as $key => $value) { | foreach ($automake as $key => $value) { | ||||
@@ -219,22 +198,9 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//返回成功信息 | //返回成功信息 | ||||
$msg = " | |||||
请选择你的后续操作: | |||||
<a href='archives_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布新文档</a> | |||||
| |||||
<a href='archives_do.php?aid=" . $id . "&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||||
| |||||
<a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | |||||
| |||||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理文档</a> | |||||
| |||||
$backurl | |||||
"; | |||||
$wintitle = "成功更改文档!"; | |||||
$msg = "请选择您的后续操作:<a href='archives_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布新文档</a> <a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理文档</a> $backurl"; | |||||
$wintitle = "成功更改文档"; | |||||
$wecome_info = "文档管理::更改文档"; | $wecome_info = "文档管理::更改文档"; | ||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
$win->AddTitle("成功更改文档:"); | $win->AddTitle("成功更改文档:"); | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 单表模型文档发布 | * 单表模型文档发布 | ||||
* | * | ||||
* @version $Id: archives_sg_add.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: archives_sg_add.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -13,27 +12,23 @@ require_once(dirname(__FILE__) . "/config.php"); | |||||
CheckPurview('a_New,a_AccNew'); | CheckPurview('a_New,a_AccNew'); | ||||
require_once(DEDEINC."/customfields.func.php"); | require_once(DEDEINC."/customfields.func.php"); | ||||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | if ($dopost != 'save') { | ||||
require_once(DEDEINC."/dedetag.class.php"); | require_once(DEDEINC."/dedetag.class.php"); | ||||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | ||||
ClearMyAddon(); | ClearMyAddon(); | ||||
$channelid = empty($channelid) ? 0 : intval($channelid); | $channelid = empty($channelid) ? 0 : intval($channelid); | ||||
$cid = empty($cid) ? 0 : intval($cid); | $cid = empty($cid) ? 0 : intval($cid); | ||||
//获得频道模型ID | //获得频道模型ID | ||||
if ($cid > 0 && $channelid == 0) { | if ($cid > 0 && $channelid == 0) { | ||||
$row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | $row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | ||||
$channelid = $row['channeltype']; | $channelid = $row['channeltype']; | ||||
} else { | } else { | ||||
if ($channelid == 0) { | if ($channelid == 0) { | ||||
ShowMsg("无法识别模型信息,因此无法操作!", "-1"); | |||||
ShowMsg("无法识别模型信息,因此无法操作", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
//获得频道模型信息 | //获得频道模型信息 | ||||
$cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | $cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
$channelid = $cInfos['id']; | $channelid = $cInfos['id']; | ||||
@@ -42,24 +37,24 @@ if ($dopost != 'save') { | |||||
} | } | ||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == 'save') { | |||||
-------------------------------*/ | |||||
else if ($dopost == 'save') { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
require_once(DEDEINC.'/oxwindow.class.php'); | require_once(DEDEINC.'/oxwindow.class.php'); | ||||
if ($typeid == 0) { | if ($typeid == 0) { | ||||
ShowMsg("请指定文档的栏目!", "-1"); | |||||
ShowMsg("请指定文档的栏目", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($channelid)) { | if (empty($channelid)) { | ||||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!CheckChannel($typeid, $channelid)) { | if (!CheckChannel($typeid, $channelid)) { | ||||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!TestPurview('a_New')) { | if (!TestPurview('a_New')) { | ||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!"); | |||||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); | |||||
} | } | ||||
//对保存的内容进行处理 | //对保存的内容进行处理 | ||||
if (empty($writer)) $writer = $cuserLogin->getUserName(); | if (empty($writer)) $writer = $cuserLogin->getUserName(); | ||||
@@ -72,12 +67,9 @@ function __save(){ } | |||||
$isremote = 0; | $isremote = 0; | ||||
$serviterm = empty($serviterm) ? "" : $serviterm; | $serviterm = empty($serviterm) ? "" : $serviterm; | ||||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | ||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
$userip = GetIP(); | $userip = GetIP(); | ||||
if (empty($ddisremote)) $ddisremote = 0; | if (empty($ddisremote)) $ddisremote = 0; | ||||
$litpic = GetDDImage('none', $picname, $ddisremote); | $litpic = GetDDImage('none', $picname, $ddisremote); | ||||
//处理新的缩略图上传 | //处理新的缩略图上传 | ||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
@@ -87,21 +79,17 @@ function __save(){ } | |||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
$fullUrl = $fullUrl.".png"; | $fullUrl = $fullUrl.".png"; | ||||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | ||||
// 加水印 | // 加水印 | ||||
WaterImg($cfg_basedir.$fullUrl, 'up'); | WaterImg($cfg_basedir.$fullUrl, 'up'); | ||||
$litpic = $fullUrl; | $litpic = $fullUrl; | ||||
} | } | ||||
//生成文档ID | //生成文档ID | ||||
$arcID = GetIndexKey($arcrank, $typeid, $senddate, $channelid, $senddate, $adminid); | $arcID = GetIndexKey($arcrank, $typeid, $senddate, $channelid, $senddate, $adminid); | ||||
if (empty($arcID)) { | if (empty($arcID)) { | ||||
ShowMsg("无法获得主键,因此无法进行后续操作!", "-1"); | |||||
ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//分析处理附加表数据 | //分析处理附加表数据 | ||||
$inadd_f = ''; | $inadd_f = ''; | ||||
$inadd_v = ''; | $inadd_v = ''; | ||||
@@ -129,12 +117,10 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//处理图片文档的自定义属性 | //处理图片文档的自定义属性 | ||||
if ($litpic != '' && !preg_match("#p#", $flag)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | $flag = ($flag == '' ? 'p' : $flag.',p'); | ||||
} | } | ||||
//保存到附加表 | //保存到附加表 | ||||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
$addtable = trim($cts['addtable']); | $addtable = trim($cts['addtable']); | ||||
@@ -144,11 +130,10 @@ function __save(){ } | |||||
if (!$dsql->ExecuteNoneQuery($query)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | ||||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
//生成HTML | //生成HTML | ||||
$artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | $artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | ||||
if ($artUrl == '') { | if ($artUrl == '') { | ||||
@@ -156,20 +141,8 @@ function __save(){ } | |||||
} | } | ||||
ClearMyAddon($arcID, $title); | ClearMyAddon($arcID, $title); | ||||
//返回成功信息 | //返回成功信息 | ||||
$msg = " | |||||
请选择你的后续操作: | |||||
<a href='archives_sg_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布文档</a> | |||||
| |||||
<a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | |||||
| |||||
<a href='archives_do.php?aid=" . $arcID . "&dopost=editArchives' class='btn btn-success btn-sm'>更改文档</a> | |||||
| |||||
<a href='content_sg_list.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> | |||||
| |||||
<a href='catalog_main.php' class='btn btn-success btn-sm'>网站栏目管理</a> | |||||
"; | |||||
$wintitle = "成功发布文档!"; | |||||
$msg = "请选择您的后续操作:<a href='archives_sg_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布文档</a> <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> <a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>更改文档</a> <a href='content_sg_list.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>已发布文档管理</a> <a href='catalog_main.php' class='btn btn-success btn-sm'>网站栏目管理</a>"; | |||||
$wintitle = "成功发布文档"; | |||||
$wecome_info = "文档管理::发布文档"; | $wecome_info = "文档管理::发布文档"; | ||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
$win->AddTitle("成功发布文档:"); | $win->AddTitle("成功发布文档:"); | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 单表模型文档编辑 | * 单表模型文档编辑 | ||||
* | * | ||||
* @version $Id: archives_sg_edit.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: archives_sg_edit.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -13,25 +12,20 @@ require_once(dirname(__FILE__) . "/config.php"); | |||||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | ||||
require_once(DEDEINC."/customfields.func.php"); | require_once(DEDEINC."/customfields.func.php"); | ||||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | if ($dopost != 'save') { | ||||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | ||||
require_once(DEDEINC."/dedetag.class.php"); | require_once(DEDEINC."/dedetag.class.php"); | ||||
ClearMyAddon(); | ClearMyAddon(); | ||||
$aid = intval($aid); | $aid = intval($aid); | ||||
//读取归档信息 | //读取归档信息 | ||||
$arcQuery = "SELECT ch.*,arc.* FROM `#@__arctiny` arc | $arcQuery = "SELECT ch.*,arc.* FROM `#@__arctiny` arc | ||||
LEFT JOIN `#@__channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' "; | LEFT JOIN `#@__channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' "; | ||||
$cInfos = $dsql->GetOne($arcQuery); | $cInfos = $dsql->GetOne($arcQuery); | ||||
if (!is_array($cInfos)) { | if (!is_array($cInfos)) { | ||||
ShowMsg("读频道模型信息出错!", "-1"); | |||||
ShowMsg("读频道模型信息出错", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$addtable = $cInfos['addtable']; | $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'"); | $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']; | $channelid = $cInfos['channel']; | ||||
@@ -41,24 +35,25 @@ if ($dopost != 'save') { | |||||
} | } | ||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == 'save') { | |||||
-------------------------------*/ | |||||
else if ($dopost == 'save') { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
require_once(DEDEINC.'/oxwindow.class.php'); | require_once(DEDEINC.'/oxwindow.class.php'); | ||||
if ($typeid == 0) { | if ($typeid == 0) { | ||||
ShowMsg("请指定文档的栏目!", "-1"); | |||||
ShowMsg("请指定文档的栏目", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($channelid)) { | if (empty($channelid)) { | ||||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!CheckChannel($typeid, $channelid)) { | if (!CheckChannel($typeid, $channelid)) { | ||||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!TestPurview('a_Edit')) { | if (!TestPurview('a_Edit')) { | ||||
if (TestPurview('a_AccEdit')) { | if (TestPurview('a_AccEdit')) { | ||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||||
} else { | } else { | ||||
CheckArcAdmin($id, $cuserLogin->getUserID()); | CheckArcAdmin($id, $cuserLogin->getUserID()); | ||||
} | } | ||||
@@ -71,9 +66,7 @@ function __save(){ } | |||||
$serviterm = empty($serviterm) ? "" : $serviterm; | $serviterm = empty($serviterm) ? "" : $serviterm; | ||||
if (empty($litpic_b64)) $litpic_b64 = ''; | if (empty($litpic_b64)) $litpic_b64 = ''; | ||||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | ||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
//处理上传的缩略图 | //处理上传的缩略图 | ||||
if (empty($ddisremote)) $ddisremote = 0; | if (empty($ddisremote)) $ddisremote = 0; | ||||
$litpic = GetDDImage('none', $picname, $ddisremote); | $litpic = GetDDImage('none', $picname, $ddisremote); | ||||
@@ -85,9 +78,7 @@ function __save(){ } | |||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
$fullUrl = $fullUrl.".png"; | $fullUrl = $fullUrl.".png"; | ||||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | ||||
// 加水印 | // 加水印 | ||||
WaterImg($cfg_basedir.$fullUrl, 'up'); | WaterImg($cfg_basedir.$fullUrl, 'up'); | ||||
$litpic = $fullUrl; | $litpic = $fullUrl; | ||||
@@ -118,43 +109,27 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//处理图片文档的自定义属性 | //处理图片文档的自定义属性 | ||||
if ($litpic != '' && !preg_match("#p#", $flag)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | $flag = ($flag == '' ? 'p' : $flag.',p'); | ||||
} | } | ||||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
$addtable = trim($cts['addtable']); | $addtable = trim($cts['addtable']); | ||||
if ($addtable != '') { | if ($addtable != '') { | ||||
$iquery = "UPDATE `$addtable` SET typeid='$typeid',arcrank='$arcrank',title='$title',flag='$flag',litpic='$litpic'{$inadd_f} WHERE aid='$id' "; | $iquery = "UPDATE `$addtable` SET typeid='$typeid',arcrank='$arcrank',title='$title',flag='$flag',litpic='$litpic'{$inadd_f} WHERE aid='$id' "; | ||||
if (!$dsql->ExecuteNoneQuery($iquery)) { | if (!$dsql->ExecuteNoneQuery($iquery)) { | ||||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!", "javascript:;"); | |||||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
//生成HTML | //生成HTML | ||||
UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); | UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); | ||||
$artUrl = MakeArt($id, TRUE, TRUE, $isremote); | $artUrl = MakeArt($id, TRUE, TRUE, $isremote); | ||||
if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$id"; | if ($artUrl == '') $artUrl = $cfg_phpurl."/view.php?aid=$id"; | ||||
ClearMyAddon($id, $title); | ClearMyAddon($id, $title); | ||||
//返回成功信息 | //返回成功信息 | ||||
$msg = " | |||||
请选择你的后续操作: | |||||
<a href='archives_sg_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布新文档</a> | |||||
| |||||
<a href='archives_do.php?aid=" . $id . "&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||||
| |||||
<a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> | |||||
| |||||
<a href='catalog_do.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>管理文档</a> | |||||
| |||||
<a href='catalog_main.php' class='btn btn-success btn-sm'>网站栏目管理</a> | |||||
"; | |||||
$wintitle = "成功更改文档!"; | |||||
$msg = "请选择您的后续操作:<a href='archives_sg_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布新文档</a> <a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文档</a> <a href='catalog_do.php?cid=$typeid&channelid={$channelid}&dopost=listArchives' class='btn btn-success btn-sm'>管理文档</a> <a href='catalog_main.php' class='btn btn-success btn-sm'>网站栏目管理</a>"; | |||||
$wintitle = "成功更改文档"; | |||||
$wecome_info = "文档管理::更改文档"; | $wecome_info = "文档管理::更改文档"; | ||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
$win->AddTitle("成功更改文档:"); | $win->AddTitle("成功更改文档:"); | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 文档发布 | * 文档发布 | ||||
* | * | ||||
* @version $Id: article_add.php 2020年9月14日 tianya $ | * @version $Id: article_add.php 2020年9月14日 tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -17,7 +16,6 @@ if (file_exists(DEDEDATA . '/template.rand.php')) { | |||||
require_once(DEDEDATA.'/template.rand.php'); | require_once(DEDEDATA.'/template.rand.php'); | ||||
} | } | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if ($dopost != 'save') { | if ($dopost != 'save') { | ||||
require_once(DEDEINC."/dedetag.class.php"); | require_once(DEDEINC."/dedetag.class.php"); | ||||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | ||||
@@ -25,18 +23,14 @@ if ($dopost != 'save') { | |||||
$channelid = empty($channelid) ? 0 : intval($channelid); | $channelid = empty($channelid) ? 0 : intval($channelid); | ||||
$cid = empty($cid) ? 0 : intval($cid); | $cid = empty($cid) ? 0 : intval($cid); | ||||
if (empty($litpic_b64)) $litpic_b64 = ''; | if (empty($litpic_b64)) $litpic_b64 = ''; | ||||
if (empty($geturl)) $geturl = ''; | if (empty($geturl)) $geturl = ''; | ||||
$keywords = $writer = $source = $body = $description = $title = ''; | $keywords = $writer = $source = $body = $description = $title = ''; | ||||
//采集单个网页 | //采集单个网页 | ||||
if (preg_match("#^http:\/\/#", $geturl)) { | if (preg_match("#^http:\/\/#", $geturl)) { | ||||
require_once(DEDEADMIN."/inc/inc_coonepage.php"); | require_once(DEDEADMIN."/inc/inc_coonepage.php"); | ||||
$redatas = CoOnePage($geturl); | $redatas = CoOnePage($geturl); | ||||
extract($redatas); | extract($redatas); | ||||
} | } | ||||
//获得频道模型ID | //获得频道模型ID | ||||
if ($cid > 0 && $channelid == 0) { | if ($cid > 0 && $channelid == 0) { | ||||
$row = $dsql->GetOne("Select channeltype From `#@__arctype` where id='$cid'; "); | $row = $dsql->GetOne("Select channeltype From `#@__arctype` where id='$cid'; "); | ||||
@@ -46,48 +40,43 @@ if ($dopost != 'save') { | |||||
$channelid = 1; | $channelid = 1; | ||||
} | } | ||||
} | } | ||||
//获得频道模型信息 | //获得频道模型信息 | ||||
$cInfos = $dsql->GetOne(" Select * From `#@__channeltype` where id='$channelid' "); | $cInfos = $dsql->GetOne(" Select * From `#@__channeltype` where id='$channelid' "); | ||||
//获取文章最大id以确定当前权重 | //获取文章最大id以确定当前权重 | ||||
$maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM `#@__archives`"); | $maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM `#@__archives`"); | ||||
include DedeInclude("templets/article_add.htm"); | include DedeInclude("templets/article_add.htm"); | ||||
exit(); | exit(); | ||||
} | } | ||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == 'save') { | |||||
-------------------------------*/ | |||||
else if ($dopost == 'save') { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
require_once(DEDEINC.'/oxwindow.class.php'); | require_once(DEDEINC.'/oxwindow.class.php'); | ||||
$flag = isset($flags) ? join(',', $flags) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
if (empty($typeid2)) $typeid2 = ''; | if (empty($typeid2)) $typeid2 = ''; | ||||
if (!isset($autokey)) $autokey = 0; | if (!isset($autokey)) $autokey = 0; | ||||
if (!isset($remote)) $remote = 0; | if (!isset($remote)) $remote = 0; | ||||
if (!isset($dellink)) $dellink = 0; | if (!isset($dellink)) $dellink = 0; | ||||
if (!isset($autolitpic)) $autolitpic = 0; | if (!isset($autolitpic)) $autolitpic = 0; | ||||
if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | if (empty($click)) $click = ($cfg_arc_click == '-1' ? mt_rand(50, 200) : $cfg_arc_click); | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
ShowMsg("请指定文档的栏目!", "-1"); | |||||
ShowMsg("请指定文档的栏目", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($channelid)) { | if (empty($channelid)) { | ||||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!CheckChannel($typeid, $channelid)) { | if (!CheckChannel($typeid, $channelid)) { | ||||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!TestPurview('a_New')) { | if (!TestPurview('a_New')) { | ||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!"); | |||||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的权限"); | |||||
} | } | ||||
//对保存的内容进行处理 | //对保存的内容进行处理 | ||||
if (empty($writer)) $writer = $cuserLogin->getUserName(); | if (empty($writer)) $writer = $cuserLogin->getUserName(); | ||||
if (empty($source)) $source = '未知'; | if (empty($source)) $source = '未知'; | ||||
@@ -107,17 +96,14 @@ function __save(){ } | |||||
$userip = GetIP(); | $userip = GetIP(); | ||||
$isremote = 0; | $isremote = 0; | ||||
$serviterm = empty($serviterm) ? "" : $serviterm; | $serviterm = empty($serviterm) ? "" : $serviterm; | ||||
if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { | if (!TestPurview('a_Check,a_AccCheck,a_MyCheck')) { | ||||
$arcrank = -1; | $arcrank = -1; | ||||
} | } | ||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
//处理上传的缩略图 | //处理上传的缩略图 | ||||
if (empty($ddisremote)) { | if (empty($ddisremote)) { | ||||
$ddisremote = 0; | $ddisremote = 0; | ||||
} | } | ||||
$litpic = GetDDImage('none', $picname, $ddisremote); | $litpic = GetDDImage('none', $picname, $ddisremote); | ||||
//处理新的缩略图上传 | //处理新的缩略图上传 | ||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
@@ -127,34 +113,27 @@ function __save(){ } | |||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
$fullUrl = $fullUrl.".png"; | $fullUrl = $fullUrl.".png"; | ||||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | ||||
//加水印 | //加水印 | ||||
WaterImg($cfg_basedir.$fullUrl, 'up'); | WaterImg($cfg_basedir.$fullUrl, 'up'); | ||||
$litpic = $fullUrl; | $litpic = $fullUrl; | ||||
} | } | ||||
//生成文档ID | //生成文档ID | ||||
$arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | $arcID = GetIndexKey($arcrank, $typeid, $sortrank, $channelid, $senddate, $adminid); | ||||
if (empty($arcID)) { | if (empty($arcID)) { | ||||
ShowMsg("无法获得主键,因此无法进行后续操作!", "-1"); | |||||
ShowMsg("无法获得主键,因此无法进行后续操作", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (trim($title) == '') { | if (trim($title) == '') { | ||||
ShowMsg('标题不能为空', '-1'); | ShowMsg('标题不能为空', '-1'); | ||||
exit(); | exit(); | ||||
} | } | ||||
//处理body字段自动摘要、自动提取缩略图等 | //处理body字段自动摘要、自动提取缩略图等 | ||||
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | ||||
//自动分页 | //自动分页 | ||||
if ($sptype == 'auto') { | if ($sptype == 'auto') { | ||||
$body = SpLongBody($body, $spsize * 1024, "#p#分页标题#e#"); | $body = SpLongBody($body, $spsize * 1024, "#p#分页标题#e#"); | ||||
} | } | ||||
//分析处理附加表数据 | //分析处理附加表数据 | ||||
$inadd_f = $inadd_v = ''; | $inadd_f = $inadd_v = ''; | ||||
if (!empty($dede_addonfields)) { | if (!empty($dede_addonfields)) { | ||||
@@ -174,7 +153,6 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//处理图片文档的自定义属性 | //处理图片文档的自定义属性 | ||||
if ($litpic != '' && !preg_match("#p#", $flag)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | $flag = ($flag == '' ? 'p' : $flag.',p'); | ||||
@@ -182,31 +160,24 @@ function __save(){ } | |||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | if ($redirecturl != '' && !preg_match("#j#", $flag)) { | ||||
$flag = ($flag == '' ? 'j' : $flag.',j'); | $flag = ($flag == '' ? 'j' : $flag.',j'); | ||||
} | } | ||||
//跳转网址的文档强制为动态 | //跳转网址的文档强制为动态 | ||||
if (preg_match("#j#", $flag)) $ismake = -1; | 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');"; | |||||
$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)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | ||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//保存到附加表 | //保存到附加表 | ||||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
$addtable = trim($cts['addtable']); | $addtable = trim($cts['addtable']); | ||||
if (empty($addtable)) { | if (empty($addtable)) { | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | ||||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作!。", "javascript:;"); | |||||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作。", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$useip = GetIP(); | $useip = GetIP(); | ||||
@@ -216,7 +187,7 @@ function __save(){ } | |||||
$gerr = $dsql->GetError(); | $gerr = $dsql->GetError(); | ||||
$dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); | $dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); | ||||
$dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'"); | $dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'"); | ||||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。" . str_replace('"', '', $gerr), "javascript:;"); | |||||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeBIZ官方".str_replace('"', '', $gerr), "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//生成HTML | //生成HTML | ||||
@@ -240,7 +211,6 @@ function __save(){ } | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | $artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | ||||
} | } | ||||
ClearMyAddon($arcID, $title); | ClearMyAddon($arcID, $title); | ||||
//自动更新关联内容 | //自动更新关联内容 | ||||
if (is_array($automake)) { | if (is_array($automake)) { | ||||
foreach ($automake as $key => $value) { | foreach ($automake as $key => $value) { | ||||
@@ -252,21 +222,10 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//返回成功信息 | //返回成功信息 | ||||
$msg = " 请选择你的后续操作: | |||||
<a href='article_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布文章</a> | |||||
| |||||
<a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文章</a> | |||||
| |||||
<a href='archives_do.php?aid=" . $arcID . "&dopost=editArchives' class='btn btn-success btn-sm'>更改文章</a> | |||||
| |||||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文章管理</a> | |||||
| |||||
$backurl | |||||
"; | |||||
$msg = "请选择您的后续操作:<a href='article_add.php?cid=$typeid' class='btn btn-success btn-sm'>继续发布文章</a> <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文章</a> <a href='archives_do.php?aid=".$arcID."&dopost=editArchives' class='btn btn-success btn-sm'>更改文章</a> <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>已发布文章管理</a> $backurl"; | |||||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | $msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | ||||
$wintitle = "成功发布文章!"; | |||||
$wintitle = "成功发布文章"; | |||||
$wecome_info = "文章管理::发布文章"; | $wecome_info = "文章管理::发布文章"; | ||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
$win->AddTitle("成功发布文章:"); | $win->AddTitle("成功发布文章:"); | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_allowurl_edit.php 1 11:36 2010年10月8日Z tianya $ | * @version $Id: article_allowurl_edit.php 1 11:36 2010年10月8日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_coonepage_rule.php 1 14:12 2010年7月12日Z tianya $ | * @version $Id: article_coonepage_rule.php 1 14:12 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -20,7 +20,7 @@ function _AddNote(){ } | |||||
if ($action == 'add') { | if ($action == 'add') { | ||||
$row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '$url' "); | $row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '$url' "); | ||||
if (is_array($row)) { | if (is_array($row)) { | ||||
echo "系统已经存在这个网址的条目!"; | |||||
echo "系统已经存在这个网址的条目"; | |||||
} else { | } else { | ||||
$query = " INSERT INTO `#@__co_onepage`(`url`,`title`,`issource`,`lang`,`rule`) Values('$url','$title','$issource','$lang','$rule'); "; | $query = " INSERT INTO `#@__co_onepage`(`url`,`title`,`issource`,`lang`,`rule`) Values('$url','$title','$issource','$lang','$rule'); "; | ||||
$dsql->ExecuteNonequery($query); | $dsql->ExecuteNonequery($query); | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_description_main.php 1 14:12 2010年7月12日Z tianya $ | * @version $Id: article_description_main.php 1 14:12 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 文档编辑 | * 文档编辑 | ||||
* | * | ||||
* @version $Id: article_edit.php 1 14:12 2010年7月12日Z tianya $ | * @version $Id: article_edit.php 1 14:12 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -17,14 +16,11 @@ if (file_exists(DEDEDATA . '/template.rand.php')) { | |||||
require_once(DEDEDATA.'/template.rand.php'); | require_once(DEDEDATA.'/template.rand.php'); | ||||
} | } | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
$aid = isset($aid) && is_numeric($aid) ? $aid : 0; | $aid = isset($aid) && is_numeric($aid) ? $aid : 0; | ||||
if ($dopost != 'save') { | if ($dopost != 'save') { | ||||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | ||||
require_once(DEDEINC."/dedetag.class.php"); | require_once(DEDEINC."/dedetag.class.php"); | ||||
ClearMyAddon(); | ClearMyAddon(); | ||||
//读取归档信息 | //读取归档信息 | ||||
$query = "SELECT ch.typename AS channelname,ar.membername AS rankname,arc.* | $query = "SELECT ch.typename AS channelname,ar.membername AS rankname,arc.* | ||||
FROM `#@__archives` arc | FROM `#@__archives` arc | ||||
@@ -32,19 +28,19 @@ if ($dopost != 'save') { | |||||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; | LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; | ||||
$arcRow = $dsql->GetOne($query); | $arcRow = $dsql->GetOne($query); | ||||
if (!is_array($arcRow)) { | if (!is_array($arcRow)) { | ||||
ShowMsg("读取档案基本信息出错!", "-1"); | |||||
ShowMsg("读取档案基本信息出错", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | $query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | ||||
$cInfos = $dsql->GetOne($query); | $cInfos = $dsql->GetOne($query); | ||||
if (!is_array($cInfos)) { | if (!is_array($cInfos)) { | ||||
ShowMsg("读取频道配置信息出错!", "javascript:;"); | |||||
ShowMsg("读取频道配置信息出错", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$addtable = $cInfos['addtable']; | $addtable = $cInfos['addtable']; | ||||
$addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); | $addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); | ||||
if (!is_array($addRow)) { | if (!is_array($addRow)) { | ||||
ShowMsg("读取附加信息出错!", "javascript:;"); | |||||
ShowMsg("读取附加信息出错", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$channelid = $arcRow['channel']; | $channelid = $arcRow['channel']; | ||||
@@ -54,40 +50,37 @@ if ($dopost != 'save') { | |||||
} | } | ||||
/*-------------------------------- | /*-------------------------------- | ||||
function __save(){ } | function __save(){ } | ||||
-------------------------------*/ else if ($dopost == 'save') { | |||||
-------------------------------*/ | |||||
else if ($dopost == 'save') { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
require_once(DEDEINC.'/oxwindow.class.php'); | require_once(DEDEINC.'/oxwindow.class.php'); | ||||
$flag = isset($flags) ? join(',', $flags) : ''; | $flag = isset($flags) ? join(',', $flags) : ''; | ||||
$notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | $notpost = isset($notpost) && $notpost == 1 ? 1 : 0; | ||||
if (empty($typeid2)) $typeid2 = 0; | if (empty($typeid2)) $typeid2 = 0; | ||||
if (!isset($autokey)) $autokey = 0; | if (!isset($autokey)) $autokey = 0; | ||||
if (!isset($remote)) $remote = 0; | if (!isset($remote)) $remote = 0; | ||||
if (!isset($dellink)) $dellink = 0; | if (!isset($dellink)) $dellink = 0; | ||||
if (!isset($autolitpic)) $autolitpic = 0; | if (!isset($autolitpic)) $autolitpic = 0; | ||||
if (empty($litpic_b64)) $litpic_b64 = ''; | if (empty($litpic_b64)) $litpic_b64 = ''; | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
ShowMsg("请指定文档的栏目!", "-1"); | |||||
ShowMsg("请指定文档的栏目", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($channelid)) { | if (empty($channelid)) { | ||||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||||
ShowMsg("文档为非指定的类型,请检查您发布内容的表单是否合法", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!CheckChannel($typeid, $channelid)) { | if (!CheckChannel($typeid, $channelid)) { | ||||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||||
ShowMsg("您所选择的栏目与当前模型不相符,请选择白色的选项", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!TestPurview('a_Edit')) { | if (!TestPurview('a_Edit')) { | ||||
if (TestPurview('a_AccEdit')) { | if (TestPurview('a_AccEdit')) { | ||||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||||
CheckCatalog($typeid, "对不起,您没有操作栏目 {$typeid} 的文档权限"); | |||||
} else { | } else { | ||||
CheckArcAdmin($id, $cuserLogin->getUserID()); | CheckArcAdmin($id, $cuserLogin->getUserID()); | ||||
} | } | ||||
} | } | ||||
//对保存的内容进行处理 | //对保存的内容进行处理 | ||||
$pubdate = GetMkTime($pubdate); | $pubdate = GetMkTime($pubdate); | ||||
$sortrank = AddDay($pubdate, $sortup); | $sortrank = AddDay($pubdate, $sortup); | ||||
@@ -107,16 +100,13 @@ function __save(){ } | |||||
$arcrank = -1; | $arcrank = -1; | ||||
} | } | ||||
$adminid = $cuserLogin->getUserID(); | $adminid = $cuserLogin->getUserID(); | ||||
//处理上传的缩略图 | //处理上传的缩略图 | ||||
if (empty($ddisremote)) { | if (empty($ddisremote)) { | ||||
$ddisremote = 0; | $ddisremote = 0; | ||||
} | } | ||||
$litpic = GetDDImage('none', $picname, $ddisremote); | $litpic = GetDDImage('none', $picname, $ddisremote); | ||||
//分析body里的内容 | //分析body里的内容 | ||||
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | $body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | ||||
//分析处理附加表数据 | //分析处理附加表数据 | ||||
$inadd_f = ''; | $inadd_f = ''; | ||||
$inadd_v = ''; | $inadd_v = ''; | ||||
@@ -143,7 +133,6 @@ function __save(){ } | |||||
} | } | ||||
} | } | ||||
} | } | ||||
//处理新的缩略图上传 | //处理新的缩略图上传 | ||||
if ($litpic_b64 != "") { | if ($litpic_b64 != "") { | ||||
$data = explode(',', $litpic_b64); | $data = explode(',', $litpic_b64); | ||||
@@ -152,14 +141,11 @@ function __save(){ } | |||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
$fullUrl = $fullUrl.".png"; | $fullUrl = $fullUrl.".png"; | ||||
file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | file_put_contents($cfg_basedir.$fullUrl, base64_decode($data[1])); | ||||
//加水印 | //加水印 | ||||
WaterImg($cfg_basedir.$fullUrl, 'up'); | WaterImg($cfg_basedir.$fullUrl, 'up'); | ||||
$litpic = $fullUrl; | $litpic = $fullUrl; | ||||
} | } | ||||
//处理图片文档的自定义属性 | //处理图片文档的自定义属性 | ||||
if ($litpic != '' && !preg_match("#p#", $flag)) { | if ($litpic != '' && !preg_match("#p#", $flag)) { | ||||
$flag = ($flag == '' ? 'p' : $flag.',p'); | $flag = ($flag == '' ? 'p' : $flag.',p'); | ||||
@@ -167,39 +153,36 @@ function __save(){ } | |||||
if ($redirecturl != '' && !preg_match("#j#", $flag)) { | if ($redirecturl != '' && !preg_match("#j#", $flag)) { | ||||
$flag = ($flag == '' ? 'j' : $flag.',j'); | $flag = ($flag == '' ? 'j' : $flag.',j'); | ||||
} | } | ||||
//跳转网址的文档强制为动态 | //跳转网址的文档强制为动态 | ||||
if (preg_match("#j#", $flag)) $ismake = -1; | if (preg_match("#j#", $flag)) $ismake = -1; | ||||
//更新数据库的SQL语句 | //更新数据库的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'; "; | |||||
$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)) { | if (!$dsql->ExecuteNoneQuery($query)) { | ||||
ShowMsg('更新数据库archives表时出错,请检查', -1); | ShowMsg('更新数据库archives表时出错,请检查', -1); | ||||
exit(); | exit(); | ||||
} | } | ||||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | $cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
$addtable = trim($cts['addtable']); | $addtable = trim($cts['addtable']); | ||||
if ($addtable != '') { | if ($addtable != '') { | ||||
@@ -207,11 +190,10 @@ function __save(){ } | |||||
$templet = empty($templet) ? '' : $templet; | $templet = empty($templet) ? '' : $templet; | ||||
$iquery = "UPDATE `$addtable` SET typeid='$typeid',body='$body'{$inadd_f},redirecturl='$redirecturl',templet='$templet',userip='$useip' WHERE aid='$id'"; | $iquery = "UPDATE `$addtable` SET typeid='$typeid',body='$body'{$inadd_f},redirecturl='$redirecturl',templet='$templet',userip='$useip' WHERE aid='$id'"; | ||||
if (!$dsql->ExecuteNoneQuery($iquery)) { | if (!$dsql->ExecuteNoneQuery($iquery)) { | ||||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!", "javascript:;"); | |||||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
//生成HTML | //生成HTML | ||||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | ||||
$artUrl = MakeArt($id, true, true, $isremote); | $artUrl = MakeArt($id, true, true, $isremote); | ||||
@@ -219,7 +201,6 @@ function __save(){ } | |||||
$artUrl = $cfg_phpurl."/view.php?aid=$id"; | $artUrl = $cfg_phpurl."/view.php?aid=$id"; | ||||
} | } | ||||
ClearMyAddon($id, $title); | ClearMyAddon($id, $title); | ||||
//自动更新关联内容 | //自动更新关联内容 | ||||
if (is_array($automake)) { | if (is_array($automake)) { | ||||
foreach ($automake as $key => $value) { | foreach ($automake as $key => $value) { | ||||
@@ -233,20 +214,8 @@ function __save(){ } | |||||
} | } | ||||
//返回成功信息 | //返回成功信息 | ||||
$msg = " | |||||
请选择你的后续操作: | |||||
<a href='article_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布新文章</a> | |||||
| |||||
<a href='archives_do.php?aid=" . $id . "&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> | |||||
| |||||
<a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文章</a> | |||||
| |||||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理文章</a> | |||||
| |||||
$backurl | |||||
"; | |||||
$wintitle = "成功更改文章!"; | |||||
$msg = "请选择您的后续操作:<a href='article_add.php?cid=$typeid' class='btn btn-success btn-sm'>发布新文章</a> <a href='archives_do.php?aid=".$id."&dopost=editArchives' class='btn btn-success btn-sm'>查看更改</a> <a href='$artUrl' target='_blank' class='btn btn-success btn-sm'>查看文章</a> <a href='catalog_do.php?cid=$typeid&dopost=listArchives' class='btn btn-success btn-sm'>管理文章</a> $backurl"; | |||||
$wintitle = "成功更改文章"; | |||||
$wecome_info = "文章管理::更改文章"; | $wecome_info = "文章管理::更改文章"; | ||||
$win = new OxWindow(); | $win = new OxWindow(); | ||||
$win->AddTitle("成功更改文章:"); | $win->AddTitle("成功更改文章:"); | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_keywords_main.php 1 14:12 2010年7月12日Z tianya $ | * @version $Id: article_keywords_main.php 1 14:12 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -20,7 +20,7 @@ if (empty($dopost)) $dopost = ''; | |||||
if ($dopost == 'saveall') { | if ($dopost == 'saveall') { | ||||
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "article_keywords_main.php" : $_COOKIE['ENV_GOBACK_URL']; | $ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "article_keywords_main.php" : $_COOKIE['ENV_GOBACK_URL']; | ||||
if (!isset($aids)) { | if (!isset($aids)) { | ||||
ShowMsg("你没有选择要更改的内容!", $ENV_GOBACK_URL); | |||||
ShowMsg("您没有选择要更改的内容!", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
foreach ($aids as $aid) { | foreach ($aids as $aid) { | ||||
@@ -66,7 +66,7 @@ else if ($dopost == 'add') { | |||||
ShowMsg("关键字已存在库中!", "-1"); | ShowMsg("关键字已存在库中!", "-1"); | ||||
exit(); | exit(); | ||||
} | } | ||||
$inquery = "INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES ('$keyword','$rank','1','$rpurl');"; | |||||
$inquery = "INSERT INTO `#@__keywords`(`keyword`,`rank`,`sta`,`rpurl`) VALUES ('$keyword','$rank','1','$rpurl');"; | |||||
$dsql->ExecuteNoneQuery($inquery); | $dsql->ExecuteNoneQuery($inquery); | ||||
ShowMsg("成功增加一个关键字!", $ENV_GOBACK_URL); | ShowMsg("成功增加一个关键字!", $ENV_GOBACK_URL); | ||||
exit(); | exit(); | ||||
@@ -78,7 +78,7 @@ if (empty($keyword)) { | |||||
$addquery = " WHERE keyword LIKE '%$keyword%' "; | $addquery = " WHERE keyword LIKE '%$keyword%' "; | ||||
} | } | ||||
$sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY rank DESC"; | |||||
$sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY `rank` DESC"; | |||||
$dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
$dlist->pageSize = 20; | $dlist->pageSize = 20; | ||||
$dlist->SetParameter("keyword", $keyword); | $dlist->SetParameter("keyword", $keyword); | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_keywords_make.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: article_keywords_make.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -68,7 +68,7 @@ if ($dopost == 'analyse') { | |||||
if (strlen($k) > 20) { | if (strlen($k) > 20) { | ||||
continue; | continue; | ||||
} | } | ||||
$dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES('" . addslashes($k) . "','$v','1','')"); | |||||
$dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,`rank`,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); | |||||
$dsql->Execute(); | $dsql->Execute(); | ||||
} | } | ||||
echo "完成关键字的导入!<br/>\r\n"; | echo "完成关键字的导入!<br/>\r\n"; | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_keywords_select.php$ | * @version $Id: article_keywords_select.php$ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -17,7 +17,7 @@ $f = RemoveXSS($f); | |||||
if (empty($keywords)) $keywords = ""; | if (empty($keywords)) $keywords = ""; | ||||
$sql = "SELECT * FROM #@__keywords ORDER BY rank DESC"; | |||||
$sql = "SELECT * FROM `#@__keywords` ORDER BY `rank` DESC"; | |||||
$dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); | $dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); | ||||
$dlist->pageSize = 300; | $dlist->pageSize = 300; | ||||
@@ -33,6 +33,6 @@ function GetSta($sta) | |||||
function GetMan($sta) | function GetMan($sta) | ||||
{ | { | ||||
if ($sta == 1) return "<u>禁用</u>"; | |||||
else return "<u>启用</u>"; | |||||
if ($sta == 1) return "禁用"; | |||||
else return "启用"; | |||||
} | } |
@@ -3,7 +3,7 @@ | |||||
/** | /** | ||||
* @version $Id: article_select_sw.php 1 8:26 2010年7月12日Z tianya $ | * @version $Id: article_select_sw.php 1 8:26 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: archives_add.php 1 14:30 2010年7月12日Z tianya $ | * @version $Id: archives_add.php 1 14:30 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_string_mix.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: article_string_mix.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -42,7 +42,7 @@ $win = new OxWindow(); | |||||
$win->Init('article_string_mix.php', 'js/blank.js', 'POST'); | $win->Init('article_string_mix.php', 'js/blank.js', 'POST'); | ||||
$win->AddHidden('dopost', 'save'); | $win->AddHidden('dopost', 'save'); | ||||
$win->AddHidden('token', $_SESSION['token']); | $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("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>$allsource</textarea>"); | $win->AddMsgItem("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>$allsource</textarea>"); | ||||
$winform = $win->GetWindow('ok'); | $winform = $win->GetWindow('ok'); | ||||
$win->Display(); | $win->Display(); |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_template_rand.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: article_template_rand.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -33,19 +33,19 @@ else if ($dopost == 'makeold') { | |||||
set_time_limit(3600); | set_time_limit(3600); | ||||
if (!file_exists($m_file)) { | if (!file_exists($m_file)) { | ||||
AjaxHead(); | AjaxHead(); | ||||
echo "配置文件不存在!"; | |||||
echo "配置文件不存在"; | |||||
exit(); | exit(); | ||||
} | } | ||||
require_once($m_file); | require_once($m_file); | ||||
if ($cfg_tamplate_rand == 0) { | if ($cfg_tamplate_rand == 0) { | ||||
AjaxHead(); | AjaxHead(); | ||||
echo "系统没开启允许随机模板的选项!"; | |||||
echo "系统没开启允许随机模板的选项"; | |||||
exit(); | exit(); | ||||
} | } | ||||
$totalTmp = count($cfg_tamplate_arr) - 1; | $totalTmp = count($cfg_tamplate_arr) - 1; | ||||
if ($totalTmp < 1) { | if ($totalTmp < 1) { | ||||
AjaxHead(); | AjaxHead(); | ||||
echo "随机模板的数量必须为2个或以上!"; | |||||
echo "随机模板的数量必须为2个或以上"; | |||||
exit(); | exit(); | ||||
} | } | ||||
for ($i = 0; $i < 10; $i++) { | for ($i = 0; $i < 10; $i++) { | ||||
@@ -53,7 +53,7 @@ else if ($dopost == 'makeold') { | |||||
$dsql->ExecuteNoneQuery(" Update `#@__addonarticle` set templet='$temp' where RIGHT(aid, 1)='$i' "); | $dsql->ExecuteNoneQuery(" Update `#@__addonarticle` set templet='$temp' where RIGHT(aid, 1)='$i' "); | ||||
} | } | ||||
AjaxHead(); | AjaxHead(); | ||||
echo "全部随机操作成功!"; | |||||
echo "全部随机操作成功"; | |||||
exit(); | exit(); | ||||
} | } | ||||
//清除全部的指定模板 | //清除全部的指定模板 | ||||
@@ -62,7 +62,7 @@ else if ($dopost == 'clearold') { | |||||
$dsql->ExecuteNoneQuery(" Update `#@__addonarticle` set templet='' "); | $dsql->ExecuteNoneQuery(" Update `#@__addonarticle` set templet='' "); | ||||
$dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `#@__addonarticle` "); | $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `#@__addonarticle` "); | ||||
AjaxHead(); | AjaxHead(); | ||||
echo "全部清除操作成功!"; | |||||
echo "全部清除操作成功"; | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -96,8 +96,8 @@ function DoRand(jobname) | |||||
</div> | </div> | ||||
<table width='98%' align='center'> | <table width='98%' align='center'> | ||||
<tr> | <tr> | ||||
<td height='28'> | |||||
如果你想对旧的文章应用随机模板设置,请点击此对旧文章进行处理(必须设置好模板项)! | |||||
<td height='26'> | |||||
如果您想对旧的文章应用随机模板设置,请点击此对旧文章进行处理(必须设置好模板项) | |||||
<a href='#' onclick='DoRand(\"makeold\")' class='btn btn-success btn-sm'>设置全部</a> | <a href='#' onclick='DoRand(\"makeold\")' class='btn btn-success btn-sm'>设置全部</a> | ||||
<a href='#' onclick='DoRand(\"clearold\")' class='btn btn-success btn-sm'>取消全部</a> | <a href='#' onclick='DoRand(\"clearold\")' class='btn btn-success btn-sm'>取消全部</a> | ||||
<span id='tmpct' style='color:red;font-weight:bold'>$okmsg</span> | <span id='tmpct' style='color:red;font-weight:bold'>$okmsg</span> | ||||
@@ -115,7 +115,7 @@ $win = new OxWindow(); | |||||
$win->Init('article_template_rand.php', 'js/blank.js', 'POST'); | $win->Init('article_template_rand.php', 'js/blank.js', 'POST'); | ||||
$win->AddHidden('dopost', 'save'); | $win->AddHidden('dopost', 'save'); | ||||
$win->AddHidden('token', $_SESSION['token']); | $win->AddHidden('token', $_SESSION['token']); | ||||
$win->AddTitle("本设置仅适用于系统默认的文章模型,设置后发布文章时会自动按指定的模板随机获取一个,如果不想使用此功能,把它设置为空即可!"); | |||||
$win->AddTitle("本设置仅适用于系统默认的文章模型,设置后发布文章时会自动按指定的模板随机获取一个,如果不想使用此功能,把它设置为空即可"); | |||||
$win->AddMsgItem($msg); | $win->AddMsgItem($msg); | ||||
$winform = $win->GetWindow('ok'); | $winform = $win->GetWindow('ok'); | ||||
$win->Display(); | $win->Display(); |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_test_same.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: article_test_same.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -18,7 +18,7 @@ if ($dopost == 'analyse') { | |||||
if (is_array($arr)) { | if (is_array($arr)) { | ||||
$maintable = $arr['maintable']; | $maintable = $arr['maintable']; | ||||
} else { | } else { | ||||
showmsg('频道id不正确,无法处理!', 'javascript:;'); | |||||
showmsg('频道id不正确,无法处理', 'javascript:;'); | |||||
exit(); | 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->SetQuery("SELECT COUNT(title) AS dd,title FROM `$maintable` WHERE channel='$channelid' GROUP BY title ORDER BY dd DESC LIMIT 0, $pagesize"); | ||||
@@ -35,7 +35,7 @@ else if ($dopost == 'delsel') { | |||||
if (empty($titles)) { | if (empty($titles)) { | ||||
header("Content-Type: text/html; charset={$cfg_ver_lang}"); | header("Content-Type: text/html; charset={$cfg_ver_lang}"); | ||||
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$cfg_ver_lang}\">\r\n"; | echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$cfg_ver_lang}\">\r\n"; | ||||
echo "没有指定删除的文档!"; | |||||
echo "没有指定删除的文档"; | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -72,7 +72,7 @@ else if ($dopost == 'delsel') { | |||||
} | } | ||||
} | } | ||||
$dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); | $dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); | ||||
ShowMsg("一共删除了[{$totalarc}]篇重复的文档!", "javascript:;"); | |||||
ShowMsg("一共删除了[{$totalarc}]篇重复的文档", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_test_same.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: article_test_same.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -15,5 +15,5 @@ if (empty($t) || $cfg_check_title == 'N') exit; | |||||
$row = $dsql->GetOne("SELECT id FROM `#@__archives` WHERE title LIKE '$t' "); | $row = $dsql->GetOne("SELECT id FROM `#@__archives` WHERE title LIKE '$t' "); | ||||
if (is_array($row)) { | if (is_array($row)) { | ||||
echo "提示:系统已经存在标题为 '<a href='../plus/view.php?aid={$row['id']}' style='color:red' target='_blank'><u>$t</u></a>' 的文档。[<a href='#' onclick='javascript:HideObj(\"mytitle\")'>关闭</a>]"; | |||||
echo "提示:系统已经存在标题为 '<a href='../plus/view.php?aid={$row['id']}' style='color:red' target='_blank'>$t</a>' 的文档。[<a href='#' onclick='javascript:HideObj(\"mytitle\")'>关闭</a>]"; | |||||
} | } |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: article_writer_edit.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: article_writer_edit.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: baidunews.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: baidunews.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: cards_make.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: cards_make.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -55,5 +55,5 @@ elseif ($dopost == 'make') { | |||||
$dsql->ExecuteNoneQuery($inquery); | $dsql->ExecuteNoneQuery($inquery); | ||||
echo "成功生成点卡:{$cardid}<br/>"; | echo "成功生成点卡:{$cardid}<br/>"; | ||||
} | } | ||||
echo "成功生成 {$mnum} 个点卡!"; | |||||
echo "成功生成 {$mnum} 个点卡"; | |||||
} | } |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: cards_manage.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: cards_manage.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -21,7 +21,7 @@ if ($dopost == "delete") { | |||||
} | } | ||||
if ($dquery != "") $dquery = " WHERE ".$dquery; | if ($dquery != "") $dquery = " WHERE ".$dquery; | ||||
$dsql->ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); | $dsql->ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); | ||||
ShowMsg("成功删除指定的记录!", "cards_manage.php"); | |||||
ShowMsg("成功删除指定的记录", "cards_manage.php"); | |||||
exit(); | exit(); | ||||
} else { | } else { | ||||
$addsql = ''; | $addsql = ''; | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: cards_type.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: cards_type.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -44,6 +44,6 @@ if ($dopost == "save") { | |||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
} | } | ||||
header("Content-Type: text/html; charset={$cfg_soft_lang}"); | header("Content-Type: text/html; charset={$cfg_soft_lang}"); | ||||
echo "<script> alert('成功更新点卡产品分类表!'); </script>"; | |||||
echo "<script> alert('成功更新点卡产品分类表'); </script>"; | |||||
} | } | ||||
require_once(DEDEADMIN."/templets/cards_type.htm"); | require_once(DEDEADMIN."/templets/cards_type.htm"); |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: catalog_add.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: catalog_add.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -27,7 +27,7 @@ if ($id == 0 && $reid == 0) { | |||||
} else { | } else { | ||||
$checkID = empty($id) ? $reid : $id; | $checkID = empty($id) ? $reid : $id; | ||||
CheckPurview('t_AccNew'); | CheckPurview('t_AccNew'); | ||||
CheckCatalog($checkID, '你无权在本栏目下创建子类!'); | |||||
CheckCatalog($checkID, '您无权在本栏目下创建子类'); | |||||
} | } | ||||
if (empty($myrow)) $myrow = array(); | if (empty($myrow)) $myrow = array(); | ||||
@@ -136,7 +136,7 @@ function action_savequick(){ } | |||||
} | } | ||||
} | } | ||||
UpDateCatCache(); | UpDateCatCache(); | ||||
ShowMsg('成功增加指定栏目!', 'catalog_main.php'); | |||||
ShowMsg('成功增加指定栏目', 'catalog_main.php'); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*--------------------- | /*--------------------- | ||||
@@ -173,11 +173,11 @@ function action_save(){ } | |||||
if ($siteurl != '') { | if ($siteurl != '') { | ||||
$siteurl = preg_replace("#\/$#", "", $siteurl); | $siteurl = preg_replace("#\/$#", "", $siteurl); | ||||
if (!preg_match("#http:\/\/#i", $siteurl)) { | if (!preg_match("#http:\/\/#i", $siteurl)) { | ||||
ShowMsg("你绑定的二级域名无效,请用(http://host)的形式!", "-1"); | |||||
ShowMsg("您绑定的二级域名无效,请用(http://host)的形式", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (preg_match("#".$cfg_basehost."#i", $siteurl)) { | if (preg_match("#".$cfg_basehost."#i", $siteurl)) { | ||||
ShowMsg("你绑定的二级域名与当前站点是同一个域,不需要绑定!", "-1"); | |||||
ShowMsg("您绑定的二级域名与当前站点是同一个域,不需要绑定", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
@@ -188,7 +188,7 @@ function action_save(){ } | |||||
$true_typedir = str_replace("{cmspath}", $cfg_cmspath, $typedir); | $true_typedir = str_replace("{cmspath}", $cfg_cmspath, $typedir); | ||||
$true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); | $true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); | ||||
if (!CreateDir($true_typedir)) { | if (!CreateDir($true_typedir)) { | ||||
ShowMsg("创建目录 {$true_typedir} 失败,请检查你的路径是否存在问题!", "-1"); | |||||
ShowMsg("创建目录 {$true_typedir} 失败,请检查您的路径是否存在问题", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
@@ -201,14 +201,14 @@ function action_save(){ } | |||||
'$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes')"; | '$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes')"; | ||||
if (!$dsql->ExecuteNoneQuery($in_query)) { | if (!$dsql->ExecuteNoneQuery($in_query)) { | ||||
ShowMsg("保存目录数据时失败,请检查你的输入资料是否存在问题!", "-1"); | |||||
ShowMsg("保存目录数据时失败,请检查您的输入资料是否存在问题", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
UpDateCatCache(); | UpDateCatCache(); | ||||
if ($reid > 0) { | if ($reid > 0) { | ||||
PutCookie('lastCid', GetTopid($reid), 3600 * 24, '/'); | PutCookie('lastCid', GetTopid($reid), 3600 * 24, '/'); | ||||
} | } | ||||
ShowMsg("成功创建一个分类!", "catalog_main.php"); | |||||
ShowMsg("成功创建一个分类", "catalog_main.php"); | |||||
exit(); | exit(); | ||||
} //End dopost==save | } //End dopost==save | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: catalog_del.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: catalog_del.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -18,13 +18,13 @@ require_once(DEDEINC . '/oxwindow.class.php'); | |||||
$id = trim(preg_replace("#[^0-9]#", '', $id)); | $id = trim(preg_replace("#[^0-9]#", '', $id)); | ||||
//检查栏目操作许可 | //检查栏目操作许可 | ||||
CheckCatalog($id, "你无权删除本栏目!"); | |||||
CheckCatalog($id, "您无权删除本栏目"); | |||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
if ($dopost == 'ok') { | if ($dopost == 'ok') { | ||||
$ut = new TypeUnit(); | $ut = new TypeUnit(); | ||||
$ut->DelType($id, $delfile); | $ut->DelType($id, $delfile); | ||||
UpDateCatCache(); | UpDateCatCache(); | ||||
ShowMsg("成功删除一个栏目!", "catalog_main.php"); | |||||
ShowMsg("成功删除一个栏目", "catalog_main.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=".$id); | $dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=".$id); | ||||
@@ -35,7 +35,7 @@ $win = new OxWindow(); | |||||
$win->Init('catalog_del.php', 'js/blank.js', 'POST'); | $win->Init('catalog_del.php', 'js/blank.js', 'POST'); | ||||
$win->AddHidden('id', $id); | $win->AddHidden('id', $id); | ||||
$win->AddHidden('dopost', 'ok'); | $win->AddHidden('dopost', 'ok'); | ||||
$win->AddTitle("你要确实要删除栏目: [{$row['typename']}] 吗?"); | |||||
$win->AddTitle("您要确实要删除栏目: [{$row['typename']}] 吗?"); | |||||
$win->AddItem('栏目的文件保存目录:', $row['typedir']); | $win->AddItem('栏目的文件保存目录:', $row['typedir']); | ||||
$win->AddItem('是否删除文件:', "<label><input type='radio' name='delfile' class='np' value='no' checked='1' /> 否</label> <label> <input type='radio' name='delfile' class='np' value='yes' /> 是</label>"); | $win->AddItem('是否删除文件:', "<label><input type='radio' name='delfile' class='np' value='no' checked='1' /> 否</label> <label> <input type='radio' name='delfile' class='np' value='yes' /> 是</label>"); | ||||
$winform = $win->GetWindow('ok'); | $winform = $win->GetWindow('ok'); | ||||
@@ -5,13 +5,13 @@ | |||||
* | * | ||||
* @version $Id: catalog_do.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: catalog_do.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__).'/config.php'); | require_once(dirname(__FILE__).'/config.php'); | ||||
if (empty($dopost)) { | if (empty($dopost)) { | ||||
ShowMsg("对不起,请指定栏目参数!", "catalog_main.php"); | |||||
ShowMsg("对不起,请指定栏目参数", "catalog_main.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$cid = empty($cid) ? 0 : intval($cid); | $cid = empty($cid) ? 0 : intval($cid); | ||||
@@ -37,7 +37,7 @@ if ($dopost == "addArchives") { | |||||
} | } | ||||
$gurl = $row["addcon"]; | $gurl = $row["addcon"]; | ||||
if ($gurl == "") { | if ($gurl == "") { | ||||
ShowMsg("对不起,你指的栏目可能有误!", "catalog_main.php"); | |||||
ShowMsg("对不起,您指的栏目可能有误", "catalog_main.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -64,7 +64,7 @@ function listArchives(); | |||||
$typename = $row["typename"]; | $typename = $row["typename"]; | ||||
$channelname = $row["channelname"]; | $channelname = $row["channelname"]; | ||||
if ($gurl == "") { | if ($gurl == "") { | ||||
ShowMsg("对不起,你指的栏目可能有误!", "catalog_main.php"); | |||||
ShowMsg("对不起,您指的栏目可能有误", "catalog_main.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} else if ($channelid > 0) { | } else if ($channelid > 0) { | ||||
@@ -104,7 +104,7 @@ function upRank() | |||||
CheckPurview('t_Edit,t_AccEdit'); | CheckPurview('t_Edit,t_AccEdit'); | ||||
//检查栏目操作许可 | //检查栏目操作许可 | ||||
CheckCatalog($cid, "你无权更改本栏目!"); | |||||
CheckCatalog($cid, "您无权更改本栏目"); | |||||
$row = $dsql->GetOne("SELECT reid,sortrank FROM #@__arctype WHERE id='$cid'"); | $row = $dsql->GetOne("SELECT reid,sortrank FROM #@__arctype WHERE id='$cid'"); | ||||
$reid = $row['reid']; | $reid = $row['reid']; | ||||
$sortrank = $row['sortrank']; | $sortrank = $row['sortrank']; | ||||
@@ -211,7 +211,7 @@ function unitCatalog() { } | |||||
$reid = $tl->TypeInfos['reid']; | $reid = $tl->TypeInfos['reid']; | ||||
$channelid = $tl->TypeInfos['channeltype']; | $channelid = $tl->TypeInfos['channeltype']; | ||||
if (!empty($row['dd'])) { | if (!empty($row['dd'])) { | ||||
ShowMsg("栏目: $typename($typeid) 有子栏目,不能进行合并操作!", '-1'); | |||||
ShowMsg("栏目: $typename($typeid) 有子栏目,不能进行合并操作", '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$typeOptions = $tl->GetOptionArray(0, 0, $channelid); | $typeOptions = $tl->GetOptionArray(0, 0, $channelid); | ||||
@@ -224,19 +224,19 @@ function unitCatalog() { } | |||||
$win->AddHidden('channelid', $channelid); | $win->AddHidden('channelid', $channelid); | ||||
$win->AddHidden('nextjob', 'unitok'); | $win->AddHidden('nextjob', 'unitok'); | ||||
$win->AddTitle("合并目录时不会删除原来的栏目目录,合并后需手动更新目标栏目的文档HTML和列表HTML。"); | $win->AddTitle("合并目录时不会删除原来的栏目目录,合并后需手动更新目标栏目的文档HTML和列表HTML。"); | ||||
$win->AddItem('你选择的栏目是:', "<font color='red'>$typename($typeid)</font>"); | |||||
$win->AddItem('你希望合并到那个栏目?', "<select name='unittype'>\r\n{$typeOptions}\r\n</select>"); | |||||
$win->AddItem('您选择的栏目是:', "<font color='red'>$typename($typeid)</font>"); | |||||
$win->AddItem('您希望合并到那个栏目?', "<select name='unittype'>\r\n{$typeOptions}\r\n</select>"); | |||||
$win->AddItem('注意事项:', '栏目不能有下级子栏目,只允许子级到更高级或同级或不同父级的情况。'); | $win->AddItem('注意事项:', '栏目不能有下级子栏目,只允许子级到更高级或同级或不同父级的情况。'); | ||||
$winform = $win->GetWindow('ok'); | $winform = $win->GetWindow('ok'); | ||||
$win->Display(); | $win->Display(); | ||||
exit(); | exit(); | ||||
} else { | } else { | ||||
if ($typeid == $unittype) { | if ($typeid == $unittype) { | ||||
ShowMsg("同一栏目无法合并,请后退重试!", '-1'); | |||||
ShowMsg("同一栏目无法合并,请后退重试", '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (IsParent($unittype, $typeid)) { | if (IsParent($unittype, $typeid)) { | ||||
ShowMsg('不能从父类合并到子类!', 'catalog_main.php'); | |||||
ShowMsg('不能从父类合并到子类', 'catalog_main.php'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$row = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | $row = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | ||||
@@ -249,7 +249,7 @@ function unitCatalog() { } | |||||
$dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$unittype' WHERE typeid='$typeid' "); | $dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$unittype' WHERE typeid='$typeid' "); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id='$typeid' "); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id='$typeid' "); | ||||
UpDateCatCache(); | UpDateCatCache(); | ||||
ShowMsg('成功合并指定栏目!', 'catalog_main.php'); | |||||
ShowMsg('成功合并指定栏目', 'catalog_main.php'); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
@@ -276,24 +276,24 @@ function moveCatalog() { } | |||||
$win->AddHidden('channelid', $channelid); | $win->AddHidden('channelid', $channelid); | ||||
$win->AddHidden('nextjob', 'unitok'); | $win->AddHidden('nextjob', 'unitok'); | ||||
$win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。"); | $win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。"); | ||||
$win->AddItem('你选择的栏目是:', "$typename($typeid)"); | |||||
$win->AddItem('你希望移动到那个栏目?', "<select name='movetype'>\r\n<option value='0'>移动为顶级栏目</option>\r\n$typeOptions\r\n</select>"); | |||||
$win->AddItem('您选择的栏目是:', "$typename($typeid)"); | |||||
$win->AddItem('您希望移动到那个栏目?', "<select name='movetype'>\r\n<option value='0'>移动为顶级栏目</option>\r\n$typeOptions\r\n</select>"); | |||||
$win->AddItem('注意事项:', '不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。'); | $win->AddItem('注意事项:', '不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。'); | ||||
$winform = $win->GetWindow('ok'); | $winform = $win->GetWindow('ok'); | ||||
$win->Display(); | $win->Display(); | ||||
exit(); | exit(); | ||||
} else { | } else { | ||||
if ($typeid == $movetype) { | if ($typeid == $movetype) { | ||||
ShowMsg('移对对象和目标位置相同!', 'catalog_main.php'); | |||||
ShowMsg('移对对象和目标位置相同', 'catalog_main.php'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (IsParent($movetype, $typeid)) { | if (IsParent($movetype, $typeid)) { | ||||
ShowMsg('不能从父类移动到子类!', 'catalog_main.php'); | |||||
ShowMsg('不能从父类移动到子类', 'catalog_main.php'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$dsql->ExecuteNoneQuery(" UPDATE `#@__arctype` SET reid='$movetype' WHERE id='$typeid' "); | $dsql->ExecuteNoneQuery(" UPDATE `#@__arctype` SET reid='$movetype' WHERE id='$typeid' "); | ||||
UpDateCatCache(); | UpDateCatCache(); | ||||
ShowMsg('成功移动目录!', 'catalog_main.php'); | |||||
ShowMsg('成功移动目录', 'catalog_main.php'); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } |
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 栏目编辑 | * 栏目编辑 | ||||
* | * | ||||
* @version $Id: catalog_edit.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: catalog_edit.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -13,13 +12,10 @@ require_once(dirname(__FILE__) . "/config.php"); | |||||
require_once(DEDEINC."/typelink.class.php"); | require_once(DEDEINC."/typelink.class.php"); | ||||
if (empty($dopost)) $dopost = ''; | if (empty($dopost)) $dopost = ''; | ||||
$id = isset($id) ? intval($id) : 0; | $id = isset($id) ? intval($id) : 0; | ||||
//检查权限许可 | //检查权限许可 | ||||
CheckPurview('t_Edit,t_AccEdit'); | CheckPurview('t_Edit,t_AccEdit'); | ||||
//检查栏目操作许可 | //检查栏目操作许可 | ||||
CheckCatalog($id, '你无权更改本栏目!'); | |||||
CheckCatalog($id, '您无权更改本栏目'); | |||||
/*----------------------- | /*----------------------- | ||||
function action_save() | function action_save() | ||||
----------------------*/ | ----------------------*/ | ||||
@@ -33,7 +29,6 @@ if ($dopost == "save") { | |||||
$uptopsql = " ,siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' "; | $uptopsql = " ,siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' "; | ||||
} | } | ||||
if ($ispart != 0) $cross = 0; | if ($ispart != 0) $cross = 0; | ||||
$upquery = "UPDATE `#@__arctype` SET | $upquery = "UPDATE `#@__arctype` SET | ||||
issend='$issend', | issend='$issend', | ||||
sortrank='$sortrank', | sortrank='$sortrank', | ||||
@@ -61,24 +56,20 @@ if ($dopost == "save") { | |||||
`smalltypes`='$smalltypes' | `smalltypes`='$smalltypes' | ||||
$uptopsql | $uptopsql | ||||
WHERE id='$id' "; | WHERE id='$id' "; | ||||
if (!$dsql->ExecuteNoneQuery($upquery)) { | if (!$dsql->ExecuteNoneQuery($upquery)) { | ||||
ShowMsg("保存当前栏目更改时失败,请检查你的输入资料是否存在问题!", "-1"); | |||||
ShowMsg("保存当前栏目更改时失败,请检查您的输入资料是否存在问题", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//如果选择子栏目可投稿,更新顶级栏目为可投稿 | //如果选择子栏目可投稿,更新顶级栏目为可投稿 | ||||
if ($topid > 0 && $issend == 1) { | if ($topid > 0 && $issend == 1) { | ||||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | ||||
} | } | ||||
$slinks = " id IN (".GetSonIds($id).")"; | $slinks = " id IN (".GetSonIds($id).")"; | ||||
//修改顶级栏目时强制修改下级的多站点支持属性 | //修改顶级栏目时强制修改下级的多站点支持属性 | ||||
if ($topid == 0 && preg_match("#,#", $slinks)) { | if ($topid == 0 && preg_match("#,#", $slinks)) { | ||||
$upquery = "UPDATE `#@__arctype` SET moresite='$moresite', siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' WHERE 1=1 AND $slinks"; | $upquery = "UPDATE `#@__arctype` SET moresite='$moresite', siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' WHERE 1=1 AND $slinks"; | ||||
$dsql->ExecuteNoneQuery($upquery); | $dsql->ExecuteNoneQuery($upquery); | ||||
} | } | ||||
//更改子栏目属性 | //更改子栏目属性 | ||||
if (!empty($upnext)) { | if (!empty($upnext)) { | ||||
$upquery = "UPDATE `#@__arctype` SET | $upquery = "UPDATE `#@__arctype` SET | ||||
@@ -93,18 +84,17 @@ if ($dopost == "save") { | |||||
ishidden='$ishidden' | ishidden='$ishidden' | ||||
WHERE 1=1 AND $slinks"; | WHERE 1=1 AND $slinks"; | ||||
if (!$dsql->ExecuteNoneQuery($upquery)) { | if (!$dsql->ExecuteNoneQuery($upquery)) { | ||||
ShowMsg("更改当前栏目成功,但更改下级栏目属性时失败!", "-1"); | |||||
ShowMsg("更改当前栏目成功,但更改下级栏目属性时失败", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
UpDateCatCache(); | UpDateCatCache(); | ||||
ShowMsg("成功更改一个分类!", "catalog_main.php"); | |||||
ShowMsg("成功更改一个分类", "catalog_main.php"); | |||||
exit(); | exit(); | ||||
} //End Save Action | } //End Save Action | ||||
else if ($dopost == "savetime") { | else if ($dopost == "savetime") { | ||||
$uptopsql = ''; | $uptopsql = ''; | ||||
$slinks = " id IN (".GetSonIds($id).")"; | $slinks = " id IN (".GetSonIds($id).")"; | ||||
//顶级栏目二级域名根目录处理 | //顶级栏目二级域名根目录处理 | ||||
if ($topid == 0 && $moresite == 1) { | if ($topid == 0 && $moresite == 1) { | ||||
$sitepath = $typedir; | $sitepath = $typedir; | ||||
@@ -118,7 +108,6 @@ else if ($dopost == "savetime") { | |||||
if ($topid > 0 && $issend == 1) { | if ($topid > 0 && $issend == 1) { | ||||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | $dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | ||||
} | } | ||||
$upquery = "UPDATE `#@__arctype` SET | $upquery = "UPDATE `#@__arctype` SET | ||||
issend='$issend', | issend='$issend', | ||||
sortrank='$sortrank', | sortrank='$sortrank', | ||||
@@ -129,16 +118,14 @@ else if ($dopost == "savetime") { | |||||
ispart='$ispart', | ispart='$ispart', | ||||
corank='$corank' $uptopsql | corank='$corank' $uptopsql | ||||
WHERE id='$id' "; | WHERE id='$id' "; | ||||
if (!$dsql->ExecuteNoneQuery($upquery)) { | if (!$dsql->ExecuteNoneQuery($upquery)) { | ||||
ShowMsg("保存当前栏目更改时失败,请检查你的输入资料是否存在问题!", "-1"); | |||||
ShowMsg("保存当前栏目更改时失败,请检查您的输入资料是否存在问题", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
UpDateCatCache(); | UpDateCatCache(); | ||||
ShowMsg("成功更改一个分类!", "catalog_main.php"); | |||||
ShowMsg("成功更改一个分类", "catalog_main.php"); | |||||
exit(); | 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"); | $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(); | $myrow = $dsql->GetOne(); | ||||
@@ -152,7 +139,6 @@ if ($topid > 0) { | |||||
} | } | ||||
} | } | ||||
$myrow['content'] = empty($myrow['content']) ? " " : $myrow['content']; | $myrow['content'] = empty($myrow['content']) ? " " : $myrow['content']; | ||||
//读取频道模型信息 | //读取频道模型信息 | ||||
$channelid = $myrow['channeltype']; | $channelid = $myrow['channeltype']; | ||||
$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); | $dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); | ||||
@@ -168,52 +154,46 @@ PutCookie('lastCid', GetTopid($id), 3600 * 24, "/"); | |||||
if ($dopost == 'time') { | if ($dopost == 'time') { | ||||
?> | ?> | ||||
<form name="form1" action="catalog_edit.php" method="post" onSubmit="return checkSubmit();"> | <form name="form1" action="catalog_edit.php" method="post" onSubmit="return checkSubmit();"> | ||||
<input type="hidden" name="dopost" value="savetime" /> | |||||
<input type="hidden" name="id" value="<?php echo $id; ?>" /> | |||||
<input type="hidden" name="topid" value="<?php echo $myrow['topid']; ?>" /> | |||||
<input type="hidden" name="moresite" value="<?php echo $myrow['moresite']; ?>" /> | |||||
<input type="hidden" name="dopost" value="savetime"> | |||||
<input type="hidden" name="id" value="<?php echo $id; ?>"> | |||||
<input type="hidden" name="topid" value="<?php echo $myrow['topid']; ?>"> | |||||
<input type="hidden" name="moresite" value="<?php echo $myrow['moresite']; ?>"> | |||||
<table width="100%" border="0" cellpadding="0" cellspacing="0"> | <table width="100%" border="0" cellpadding="0" cellspacing="0"> | ||||
<tr> | <tr> | ||||
<td class='bline' height="26" align="center" colspan="2"> | <td class='bline' height="26" align="center" colspan="2"> | ||||
<a href='catalog_edit.php?id=<?php echo $id; ?>'><u>当前是快捷编辑模式,如果您要修改更详细的参数,请使用高级模式>></u></a> | |||||
<a href='catalog_edit.php?id=<?php echo $id; ?>'>当前是快捷编辑模式,您要修改更详细的参数,请使用高级模式</a> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td width="150" class='bline' height="26" align="center">是否支持投稿:</td> | <td width="150" class='bline' height="26" align="center">是否支持投稿:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<label><input type='radio' name='issend' value='0' class='np' <?php if ($myrow['issend'] == "0") echo " checked='1' "; ?> /> | |||||
不支持</label> | |||||
<label><input type='radio' name='issend' value='1' class='np' <?php if ($myrow['issend'] == "1") echo " checked='1' "; ?> /> | |||||
支持</label></td> | |||||
<label><input type='radio' name='issend' value='0' class='np' <?php if ($myrow['issend'] == "0") echo " checked='1' "; ?>> 不支持</label> | |||||
<label><input type='radio' name='issend' value='1' class='np' <?php if ($myrow['issend'] == "1") echo " checked='1' "; ?>> 支持</label> | |||||
</td> | |||||
</tr> | </tr> | ||||
<!-- 在快速修改更改内容模型后,因为模板没改变,会导致错误,因此去除些选择框。 --> | |||||
<tr> | <tr> | ||||
<td class='bline' height="26" align="center"> | |||||
<font color='red'>内容模型:</font> | |||||
</td> | |||||
<td class='bline' height="26" align="center">内容模型:</td> | |||||
<td class='bline'> | <td class='bline'> | ||||
<?php | <?php | ||||
foreach ($channelArray as $k => $arr) { | foreach ($channelArray as $k => $arr) { | ||||
if ($k == $channelid) echo "{$arr['typename']} | {$arr['nid']}"; | if ($k == $channelid) echo "{$arr['typename']} | {$arr['nid']}"; | ||||
} | } | ||||
?> | ?> | ||||
<a href='catalog_edit.php?id=<?php echo $id; ?>'><u>[修改]</u></a> | |||||
<a href='catalog_edit.php?id=<?php echo $id; ?>' class='btn btn-success btn-sm'>修改</a> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td class='bline' height="26" align="center"> | |||||
<font color='red'>栏目名称:</font> | |||||
</td> | |||||
<td class='bline'><input name="typename" type="text" id="typename" size="30" value="<?php echo $myrow['typename'] ?>" class="iptxt" /></td> | |||||
<td class='bline' height="26" align="center">栏目名称:</td> | |||||
<td class='bline'><input name="typename" type="text" id="typename" value="<?php echo $myrow['typename'] ?>" style="width:260px" class="iptxt"></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td class='bline' height="26" align="center"> 排列顺序: </td> | <td class='bline' height="26" align="center"> 排列顺序: </td> | ||||
<td class='bline'> <input name="sortrank" size="6" type="text" value="<?php echo $myrow['sortrank'] ?>" class="iptxt" /> | |||||
(由低 -> 高) </td> | |||||
<td class='bline'> <input name="sortrank" type="text" value="<?php echo $myrow['sortrank'] ?>" style="width:100" class="iptxt">(由低 -> 高)</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td class='bline' height="26" align="center">浏览权限:</td> | <td class='bline' height="26" align="center">浏览权限:</td> | ||||
<td class='bline'> <select name="corank" id="corank" style="width:100"> | |||||
<td class='bline'> | |||||
<select name="corank" id="corank" style="width:100"> | |||||
<?php | <?php | ||||
$dsql->SetQuery("SELECT * FROM #@__arcrank WHERE rank >= 0"); | $dsql->SetQuery("SELECT * FROM #@__arcrank WHERE rank >= 0"); | ||||
$dsql->Execute(); | $dsql->Execute(); | ||||
@@ -224,43 +204,36 @@ if ($dopost == 'time') { | |||||
echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n"; | echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n"; | ||||
} | } | ||||
?> | ?> | ||||
</select> | |||||
(仅限制栏目里的文档浏览权限) </td> | |||||
</select>(仅限制栏目里的文档浏览权限) | |||||
</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td class='bline' height="26" align="center">文件保存目录:</td> | <td class='bline' height="26" align="center">文件保存目录:</td> | ||||
<td class='bline'><input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir'] ?>" style="width:300px" class="iptxt" /></td> | |||||
<td class='bline'><input name="typedir" type="text" id="typedir" value="<?php echo $myrow['typedir'] ?>" style="width:260px"class="iptxt"></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td height="26" align="center" class='bline'>栏目列表选项:</td> | <td height="26" align="center" class='bline'>栏目列表选项:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<label><input type='radio' name='isdefault' value='1' class='np' <?php if ($myrow['isdefault'] == 1) echo " checked='1' "; ?> /> | |||||
链接到默认页</label> | |||||
<label><input type='radio' name='isdefault' value='0' class='np' <?php if ($myrow['isdefault'] == 0) echo " checked='1' "; ?> /> | |||||
链接到列表第一页</label> | |||||
<label><input type='radio' name='isdefault' value='-1' class='np' <?php if ($myrow['isdefault'] == -1) echo " checked='1' "; ?> /> | |||||
使用动态页</label> </td> | |||||
<label><input type='radio' name='isdefault' value='1' class='np' <?php if ($myrow['isdefault'] == 1) echo " checked='1' "; ?>> 链接到默认页</label> | |||||
<label><input type='radio' name='isdefault' value='0' class='np' <?php if ($myrow['isdefault'] == 0) echo " checked='1' "; ?>> 链接到列表第一页</label> | |||||
<label><input type='radio' name='isdefault' value='-1' class='np' <?php if ($myrow['isdefault'] == -1) echo " checked='1' "; ?>> 使用动态页</label></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td class='bline' height="26" align="center">默认页的名称:</td> | <td class='bline' height="26" align="center">默认页的名称:</td> | ||||
<td class='bline'><input name="defaultname" type="text" value="<?php echo $myrow['defaultname'] ?>" class="iptxt" /></td> | |||||
<td class='bline'><input name="defaultname" type="text" value="<?php echo $myrow['defaultname'] ?>" style="width:260px" class="iptxt"></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td height="26" class='bline' align="center">栏目属性:</td> | <td height="26" class='bline' align="center">栏目属性:</td> | ||||
<td class='bline'> | <td class='bline'> | ||||
<label><input name="ispart" type="radio" id="radio" value="0" class='np' <?php if ($myrow['ispart'] == 0) echo " checked='1' "; ?> /> | |||||
最终列表栏目(允许在本栏目发布文档,并生成文档列表)</label><br> | |||||
<label><input name="ispart" type="radio" id="radio2" value="1" class='np' <?php if ($myrow['ispart'] == 1) echo " checked='1' "; ?> /> | |||||
频道封面(栏目本身不允许发布文档)</label><br> | |||||
<label><input name="ispart" type="radio" id="radio3" value="2" class='np' <?php if ($myrow['ispart'] == 2) echo " checked='1' "; ?> /> | |||||
外部连接(在"文件保存目录"处填写网址) </label> </td> | |||||
<label><input name="ispart" type="radio" id="radio" value="0" class='np' <?php if ($myrow['ispart'] == 0) echo " checked='1' "; ?>> 最终列表栏目(允许在本栏目发布文档,并生成文档列表)</label><br> | |||||
<label><input name="ispart" type="radio" id="radio2" value="1" class='np' <?php if ($myrow['ispart'] == 1) echo " checked='1' "; ?>> 频道封面(栏目本身不允许发布文档)</label><br> | |||||
<label><input name="ispart" type="radio" id="radio3" value="2" class='np' <?php if ($myrow['ispart'] == 2) echo " checked='1' "; ?>> 外部连接(在"文件保存目录"处填写网址)</label> | |||||
</td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td align="center" colspan="2" height="54" bgcolor='#FAFEE0'> | |||||
<input name="imageField" type="image" src="images/button_ok.gif" width="60" height="22" border="0" class="np" /> | |||||
| |||||
<a title='关闭' onclick='CloseMsg()'><img src="images/button_back.gif" width="60" height="22" border="0"></a> | |||||
<td align="center" colspan="2" height="50" bgcolor='#FAFEE0'> | |||||
<button onclick='getSelCat("<?php echo $targetid; ?>");' class='btn btn-success'>保存</button> | |||||
<button type='button' onclick='CloseMsg()' class='btn btn-success'>关闭</button> | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
</table> | </table> | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: catalog_main.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: catalog_main.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: catalog_menu.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: catalog_menu.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 管理目录配置文件 | * 管理目录配置文件 | ||||
* | * | ||||
* @version $Id: config.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: config.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -16,28 +15,16 @@ header('Cache-Control:private'); | |||||
$dsql->safeCheck = FALSE; | $dsql->safeCheck = FALSE; | ||||
$dsql->SetLongLink(); | $dsql->SetLongLink(); | ||||
$cfg_admin_skin = 1;//后台管理风格 | $cfg_admin_skin = 1;//后台管理风格 | ||||
if (file_exists(DEDEDATA . '/admin/skin.txt')) { | if (file_exists(DEDEDATA . '/admin/skin.txt')) { | ||||
$skin = file_get_contents(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; | $cfg_admin_skin = !in_array($skin, array(1, 2, 3, 4)) ? 1 : $skin; | ||||
} | } | ||||
//检查CSRF | //检查CSRF | ||||
function CheckCSRF() | function CheckCSRF() | ||||
{ | { | ||||
$cc_csrf_token_check = GetCookie("dede_csrf_token"); | $cc_csrf_token_check = GetCookie("dede_csrf_token"); | ||||
if ( | |||||
!(isset($_POST['_csrf_token'], $cc_csrf_token_check) | |||||
&& is_string($_POST['_csrf_token']) && is_string($cc_csrf_token_check) | |||||
&& hash_equals($_POST['_csrf_token'], $cc_csrf_token_check)) | |||||
) { | |||||
ShowMsg('CSRF校验失败,请刷新页面重新提交', '-1'); | |||||
exit(); | |||||
} | |||||
DropCookie("dede_csrf_token"); | DropCookie("dede_csrf_token"); | ||||
} | } | ||||
//生成CSRF校验token,在比较重要的表单中应该要加上这个token校验 | //生成CSRF校验token,在比较重要的表单中应该要加上这个token校验 | ||||
$cc_csrf_token = GetCookie("dede_csrf_token"); | $cc_csrf_token = GetCookie("dede_csrf_token"); | ||||
if (!isset($GLOBALS['csrf_token']) || $GLOBALS['csrf_token'] === null) { | if (!isset($GLOBALS['csrf_token']) || $GLOBALS['csrf_token'] === null) { | ||||
@@ -50,22 +37,17 @@ if (!isset($GLOBALS['csrf_token']) || $GLOBALS['csrf_token'] === null) { | |||||
$GLOBALS['csrf_token'] = md5(uniqid(mt_rand(), TRUE)); | $GLOBALS['csrf_token'] = md5(uniqid(mt_rand(), TRUE)); | ||||
} | } | ||||
} | } | ||||
if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') { | if (strtoupper($_SERVER['REQUEST_METHOD']) !== 'POST') { | ||||
PutCookie('dede_csrf_token', $GLOBALS['csrf_token'], 7200, '/'); | PutCookie('dede_csrf_token', $GLOBALS['csrf_token'], 7200, '/'); | ||||
} | } | ||||
//获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项 | |||||
//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行更改这个选项 | |||||
$dedeNowurl = $s_scriptName = ''; | $dedeNowurl = $s_scriptName = ''; | ||||
$isUrlOpen = @ini_get('allow_url_fopen'); | $isUrlOpen = @ini_get('allow_url_fopen'); | ||||
$dedeNowurl = GetCurUrl(); | $dedeNowurl = GetCurUrl(); | ||||
$dedeNowurls = explode('?', $dedeNowurl); | $dedeNowurls = explode('?', $dedeNowurl); | ||||
$s_scriptName = $dedeNowurls[0]; | $s_scriptName = $dedeNowurls[0]; | ||||
//检验用户登录状态 | //检验用户登录状态 | ||||
$cuserLogin = new userLogin(); | $cuserLogin = new userLogin(); | ||||
if ($cuserLogin->getUserID() == -1) { | if ($cuserLogin->getUserID() == -1) { | ||||
if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { | if (preg_match("#PHP (.*) Development Server#", $_SERVER['SERVER_SOFTWARE'])) { | ||||
$dirname = dirname($_SERVER['SCRIPT_NAME']); | $dirname = dirname($_SERVER['SCRIPT_NAME']); | ||||
@@ -75,7 +57,6 @@ if ($cuserLogin->getUserID() == -1) { | |||||
} | } | ||||
exit(); | exit(); | ||||
} | } | ||||
function XSSClean($val) | function XSSClean($val) | ||||
{ | { | ||||
if (is_array($val)) { | if (is_array($val)) { | ||||
@@ -87,7 +68,6 @@ function XSSClean($val) | |||||
} | } | ||||
return RemoveXss($val); | return RemoveXss($val); | ||||
} | } | ||||
if ($cfg_dede_log == 'Y') { | if ($cfg_dede_log == 'Y') { | ||||
$s_nologfile = '_main|_list'; | $s_nologfile = '_main|_list'; | ||||
$s_needlogfile = 'sys_|file_'; | $s_needlogfile = 'sys_|file_'; | ||||
@@ -102,16 +82,13 @@ if ($cfg_dede_log == 'Y') { | |||||
$dsql->ExecuteNoneQuery($inquery); | $dsql->ExecuteNoneQuery($inquery); | ||||
} | } | ||||
} | } | ||||
//管理缓存、管理员频道缓存 | |||||
//管理缓存管理员频道缓存 | |||||
$cache1 = DEDEDATA . '/cache/inc_catalog_base.inc'; | $cache1 = DEDEDATA . '/cache/inc_catalog_base.inc'; | ||||
if (!file_exists($cache1)) UpDateCatCache(); | 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); | 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) { | if (strlen($cfg_cookie_encode) <= 10) { | ||||
$chars = 'abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789'; | $chars = 'abcdefghigklmnopqrstuvwxwyABCDEFGHIGKLMNOPQRSTUVWXWY0123456789'; | ||||
$hash = ''; | $hash = ''; | ||||
@@ -123,7 +100,7 @@ if (strlen($cfg_cookie_encode) <= 10) { | |||||
$dsql->ExecuteNoneQuery("UPDATE `#@__sysconfig` SET `value`='{$hash}' WHERE varname='cfg_cookie_encode' "); | $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)) { | if (!is_writeable($configfile)) { | ||||
echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数!"; | |||||
echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数"; | |||||
exit(); | exit(); | ||||
} | } | ||||
$fp = fopen($configfile, 'w'); | $fp = fopen($configfile, 'w'); | ||||
@@ -142,7 +119,6 @@ if (strlen($cfg_cookie_encode) <= 10) { | |||||
fwrite($fp, "?" . ">"); | fwrite($fp, "?" . ">"); | ||||
fclose($fp); | fclose($fp); | ||||
} | } | ||||
/** | /** | ||||
* 更新栏目缓存 | * 更新栏目缓存 | ||||
* | * | ||||
@@ -171,7 +147,6 @@ function UpDateCatCache() | |||||
@unlink($cache2); | @unlink($cache2); | ||||
@unlink($cache3); | @unlink($cache3); | ||||
} | } | ||||
//清空选项缓存 | //清空选项缓存 | ||||
function ClearOptCache() | function ClearOptCache() | ||||
{ | { | ||||
@@ -186,7 +161,6 @@ function ClearOptCache() | |||||
} | } | ||||
return FALSE; | return FALSE; | ||||
} | } | ||||
/** | /** | ||||
* 引入模板文件 | * 引入模板文件 | ||||
* | * | ||||
@@ -199,7 +173,6 @@ function DedeInclude($filename, $isabs = FALSE) | |||||
{ | { | ||||
return $isabs ? $filename : DEDEADMIN . '/' . $filename; | return $isabs ? $filename : DEDEADMIN . '/' . $filename; | ||||
} | } | ||||
/** | /** | ||||
* 根据用户mid获取用户名称 | * 根据用户mid获取用户名称 | ||||
* | * | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: content_att.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: content_att.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -24,7 +24,7 @@ if ($dopost == "save") { | |||||
$query = "UPDATE `#@__arcatt` SET `attname`='$attname',`sortid`='$sortid' WHERE att='$att' "; | $query = "UPDATE `#@__arcatt` SET `attname`='$attname',`sortid`='$sortid' WHERE att='$att' "; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
} | } | ||||
echo "<script> alert('成功更新自定文档义属性表!'); </script>"; | |||||
echo "<script> alert('成功更新自定文档义属性表'); </script>"; | |||||
} | } | ||||
include DedeInclude('templets/content_att.htm'); | include DedeInclude('templets/content_att.htm'); |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: content_batch_up.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: content_batch_up.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: content_batch_up.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: content_batch_up.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -60,7 +60,7 @@ if (!empty($heightdone)) $action = $heightdone; | |||||
//指量审核 | //指量审核 | ||||
if ($action == 'check') { | if ($action == 'check') { | ||||
if (empty($startid) || empty($endid) || $endid < $startid) { | if (empty($startid) || empty($endid) || $endid < $startid) { | ||||
ShowMsg('该操作必须指定起始ID!', 'javascript:;'); | |||||
ShowMsg('该操作必须指定起始ID', 'javascript:;'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; | $jumpurl = "makehtml_archives_action.php?endid=$endid&startid=$startid"; | ||||
@@ -80,7 +80,7 @@ if ($action == 'check') { | |||||
//批量删除 | //批量删除 | ||||
else if ($action == 'del') { | else if ($action == 'del') { | ||||
if (empty($startid) || empty($endid) || $endid < $startid) { | if (empty($startid) || empty($endid) || $endid < $startid) { | ||||
ShowMsg('该操作必须指定起始ID!', 'javascript:;'); | |||||
ShowMsg('该操作必须指定起始ID', 'javascript:;'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$dsql->SetQuery("SELECT id FROM `#@__archives` $gwhere"); | $dsql->SetQuery("SELECT id FROM `#@__archives` $gwhere"); | ||||
@@ -89,7 +89,7 @@ else if ($action == 'del') { | |||||
while ($row = $dsql->GetObject('x')) { | while ($row = $dsql->GetObject('x')) { | ||||
if (DelArc($row->id)) $tdd++; | if (DelArc($row->id)) $tdd++; | ||||
} | } | ||||
ShowMsg("成功删除 $tdd 条记录!", "javascript:;"); | |||||
ShowMsg("成功删除 $tdd 条记录", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//删除空标题文档 | //删除空标题文档 | ||||
@@ -100,7 +100,7 @@ else if ($action == 'delnulltitle') { | |||||
while ($row = $dsql->GetObject('x')) { | while ($row = $dsql->GetObject('x')) { | ||||
if (DelArc($row->id)) $tdd++; | if (DelArc($row->id)) $tdd++; | ||||
} | } | ||||
ShowMsg("成功删除 $tdd 条记录!", "javascript:;"); | |||||
ShowMsg("成功删除 $tdd 条记录", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//删除空内容文章 | //删除空内容文章 | ||||
@@ -111,33 +111,33 @@ else if ($action == 'delnullbody') { | |||||
while ($row = $dsql->GetObject('x')) { | while ($row = $dsql->GetObject('x')) { | ||||
if (DelArc($row->aid)) $tdd++; | if (DelArc($row->aid)) $tdd++; | ||||
} | } | ||||
ShowMsg("成功删除 $tdd 条记录!", "javascript:;"); | |||||
ShowMsg("成功删除 $tdd 条记录", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//修正缩略图错误 | //修正缩略图错误 | ||||
else if ($action == 'modddpic') { | else if ($action == 'modddpic') { | ||||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET litpic='' WHERE trim(litpic)='litpic' "); | $dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET litpic='' WHERE trim(litpic)='litpic' "); | ||||
ShowMsg("成功修正缩略图错误!", "javascript:;"); | |||||
ShowMsg("成功修正缩略图错误", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//批量移动 | //批量移动 | ||||
else if ($action == 'move') { | else if ($action == 'move') { | ||||
if (empty($typeid)) { | if (empty($typeid)) { | ||||
ShowMsg('该操作必须指定栏目!', 'javascript:;'); | |||||
ShowMsg('该操作必须指定栏目', 'javascript:;'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$typeold = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$typeid'; "); | $typeold = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$typeid'; "); | ||||
$typenew = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$newtypeid'; "); | $typenew = $dsql->GetOne("SELECT * FROM #@__arctype WHERE id='$newtypeid'; "); | ||||
if (!is_array($typenew)) { | if (!is_array($typenew)) { | ||||
ShowMsg("无法检测移动到的新栏目的信息,不能完成操作!", "javascript:;"); | |||||
ShowMsg("无法检测移动到的新栏目的信息,不能完成操作", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if ($typenew['ispart'] != 0) { | if ($typenew['ispart'] != 0) { | ||||
ShowMsg("你不能把数据移动到非最终列表的栏目!", "javascript:;"); | |||||
ShowMsg("您不能把数据移动到非最终列表的栏目", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if ($typenew['channeltype'] != $typeold['channeltype']) { | if ($typenew['channeltype'] != $typeold['channeltype']) { | ||||
ShowMsg("不能把数据移动到内容类型不同的栏目!", "javascript:;"); | |||||
ShowMsg("不能把数据移动到内容类型不同的栏目", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$gwhere .= " And channel='".$typenew['channeltype']."' And title like '%$keyword%'"; | $gwhere .= " And channel='".$typenew['channeltype']."' And title like '%$keyword%'"; | ||||
@@ -175,12 +175,12 @@ else if ($action == 'delnulltitle') { | |||||
while ($row = $dsql->GetObject('x')) { | while ($row = $dsql->GetObject('x')) { | ||||
if (DelArc($row->id)) $tdd++; | if (DelArc($row->id)) $tdd++; | ||||
} | } | ||||
ShowMsg("成功删除 $tdd 条记录!", "javascript:;"); | |||||
ShowMsg("成功删除 $tdd 条记录", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
//修正缩略图错误 | //修正缩略图错误 | ||||
else if ($action == 'modddpic') { | else if ($action == 'modddpic') { | ||||
$dsql->ExecuteNoneQuery("UPDATE #@__archives SET litpic='' WHERE trim(litpic)='litpic' "); | $dsql->ExecuteNoneQuery("UPDATE #@__archives SET litpic='' WHERE trim(litpic)='litpic' "); | ||||
ShowMsg("成功修正缩略图错误!", "javascript:;"); | |||||
ShowMsg("成功修正缩略图错误", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: content_i_list.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: content_i_list.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -7,7 +7,7 @@ | |||||
* | * | ||||
* @version $Id: content_list.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: content_list.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -39,7 +39,7 @@ if (TestPurview('a_List')) {; | |||||
$admin_catalog = join(',', $admin_catalogs); | $admin_catalog = join(',', $admin_catalogs); | ||||
$userCatalogSql = " arc.typeid IN($admin_catalog) "; | $userCatalogSql = " arc.typeid IN($admin_catalog) "; | ||||
} else { | } else { | ||||
CheckCatalog($cid, '你无权浏览非指定栏目的内容!'); | |||||
CheckCatalog($cid, '您无权浏览非指定栏目的内容'); | |||||
} | } | ||||
if (TestPurview('a_MyList')) $mid = $cuserLogin->getUserID(); | if (TestPurview('a_MyList')) $mid = $cuserLogin->getUserID(); | ||||
} | } | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: content_s_list.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: content_s_list.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: content_select_list.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: content_select_list.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: content_sg_list.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: content_sg_list.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -17,7 +17,7 @@ if (!isset($keyword)) $keyword = ''; | |||||
if (!isset($arcrank)) $arcrank = ''; | if (!isset($arcrank)) $arcrank = ''; | ||||
if (empty($cid) && empty($channelid)) { | if (empty($cid) && empty($channelid)) { | ||||
ShowMsg("该页面必须指定栏目ID或内容模型ID才能浏览!", "javascript:;"); | |||||
ShowMsg("该页面必须指定栏目ID或内容模型ID才能浏览", "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -30,7 +30,7 @@ if (TestPurview('a_List')) { | |||||
if ($cid == 0) { | if ($cid == 0) { | ||||
$ucid = $cid = $cuserLogin->getUserChannel(); | $ucid = $cid = $cuserLogin->getUserChannel(); | ||||
} else { | } else { | ||||
CheckCatalog($cid, "你无权浏览非指定栏目的内容!"); | |||||
CheckCatalog($cid, "您无权浏览非指定栏目的内容"); | |||||
} | } | ||||
} | } | ||||
@@ -43,7 +43,7 @@ setcookie("ENV_GOBACK_URL", $dedeNowurl, time() + 3600, "/"); | |||||
$tl = new TypeLink($cid); | $tl = new TypeLink($cid); | ||||
$listtable = @trim($tl->TypeInfos['addtable']); | $listtable = @trim($tl->TypeInfos['addtable']); | ||||
if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $channelid) { | if (!empty($channelid) && !empty($ucid) && $tl->TypeInfos['channeltype'] != $channelid) { | ||||
ShowMsg('你没权限访问此页!', 'javascript:;'); | |||||
ShowMsg('您没权限访问此页', 'javascript:;'); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: content_tj.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: content_tj.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -35,12 +35,12 @@ function GetArchives($dsql, $ordertype) | |||||
} else { | } else { | ||||
$ordersql = " ORDER BY click DESC "; | $ordersql = " ORDER BY click DESC "; | ||||
} | } | ||||
$query = "SELECT id,title,click,scores FROM #@__archives $swhere $ordersql LIMIT 0,20 "; | |||||
$query = "SELECT id,title,click,scores FROM `#@__archives` $swhere $ordersql LIMIT 0,20 "; | |||||
$dsql->SetQuery($query); | $dsql->SetQuery($query); | ||||
$dsql->Execute('ga'); | $dsql->Execute('ga'); | ||||
while ($row = $dsql->GetObject('ga')) { | while ($row = $dsql->GetObject('ga')) { | ||||
if (preg_match("#feedback#i", $ordertype)) { | if (preg_match("#feedback#i", $ordertype)) { | ||||
$moreinfo = "[<a target='_blank' href='" . $GLOBALS['cfg_phpurl'] . "/feedback.php?aid={$row->id}'><u>评论:{$row->scores}</u></a>]"; | |||||
$moreinfo = "[<a target='_blank' href='".$GLOBALS['cfg_phpurl']."/feedback.php?aid={$row->id}'>评论:{$row->scores}</a>]"; | |||||
} else { | } else { | ||||
$moreinfo = "[点击:{$row->click}]"; | $moreinfo = "[点击:{$row->click}]"; | ||||
} | } | ||||
@@ -1,162 +1 @@ | |||||
div.flash | |||||
{ | |||||
width:375px; | |||||
-moz-border-radius-topleft:5px; | |||||
-webkit-border-top-left-radius:5px; | |||||
-moz-border-radius-topright:5px; | |||||
-webkit-border-top-right-radius:5px; | |||||
-moz-border-radius-bottomleft:5px; | |||||
-webkit-border-bottom-left-radius:5px; | |||||
-moz-border-radius-bottomright:5px; | |||||
-webkit-border-bottom-right-radius:5px; | |||||
border-color:#D9E4FF; | |||||
margin:10px 5px; | |||||
} | |||||
#btnSubmit | |||||
{ | |||||
margin:0 0 0 155px; | |||||
} | |||||
.progressWrapper | |||||
{ | |||||
width:357px; | |||||
overflow:hidden; | |||||
} | |||||
.progressContainer | |||||
{ | |||||
border:solid 1px #E8E8E8; | |||||
background-color:#F7F7F7; | |||||
overflow:hidden; | |||||
margin:5px; | |||||
padding:4px; | |||||
} | |||||
.message | |||||
{ | |||||
border:solid 1px #FD9; | |||||
background-color:#FFC; | |||||
overflow:hidden; | |||||
margin:1em 0; | |||||
padding:10px 20px; | |||||
} | |||||
.red | |||||
{ | |||||
border:solid 1px #B50000; | |||||
background-color:#FFEBEB; | |||||
} | |||||
.green | |||||
{ | |||||
border:solid 1px #DDF0DD; | |||||
background-color:#EBFFEB; | |||||
} | |||||
.blue | |||||
{ | |||||
border:solid 1px #CEE2F2; | |||||
background-color:#F0F5FF; | |||||
} | |||||
.progressName | |||||
{ | |||||
font-size:8pt; | |||||
font-weight:700; | |||||
color:#555; | |||||
width:323px; | |||||
height:14px; | |||||
text-align:left; | |||||
white-space:nowrap; | |||||
overflow:hidden; | |||||
} | |||||
.progressBarInProgress,.progressBarComplete,.progressBarError | |||||
{ | |||||
font-size:0; | |||||
width:0; | |||||
height:2px; | |||||
background-color:blue; | |||||
margin-top:2px; | |||||
} | |||||
.progressBarComplete | |||||
{ | |||||
width:100%; | |||||
background-color:green; | |||||
visibility:hidden; | |||||
} | |||||
.progressBarError | |||||
{ | |||||
width:100%; | |||||
background-color:red; | |||||
visibility:hidden; | |||||
} | |||||
.progressBarStatus | |||||
{ | |||||
margin-top:2px; | |||||
width:337px; | |||||
font-size:7pt; | |||||
font-family:Arial; | |||||
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:244px; | |||||
height:150px; | |||||
margin-right:10px; | |||||
margin-bottom:10px; | |||||
border:1px dashed #AAD381; | |||||
background:#FAFFEE; | |||||
text-align:center; | |||||
padding:3px; | |||||
} | |||||
.albEdit | |||||
{ | |||||
height:180px; | |||||
} | |||||
.picinfo | |||||
{ | |||||
height:30px; | |||||
line-height:30px; | |||||
margin:10px 0; | |||||
} | |||||
.thumbnails img,.thumbnailsEdit img | |||||
{ | |||||
margin:5px; | |||||
} | |||||
.albCt img { | |||||
height: 100px!important; | |||||
} | |||||
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} |
@@ -1,205 +1 @@ | |||||
td { | |||||
padding: 3px 0px 0 3px; | |||||
} | |||||
.title { | |||||
color: #666600; | |||||
font-weight: bold; | |||||
} | |||||
.title span { | |||||
padding-left: 3px; | |||||
} | |||||
#addTab { | |||||
position: absolute; | |||||
left: 455px; | |||||
top: 150px; | |||||
width: 360px; | |||||
height: 200px; | |||||
z-index: 2; | |||||
background-color: #FFFFFF; | |||||
border: 1px solid #889D8F; | |||||
padding: 0px; | |||||
display: none; | |||||
overflow: hidden; | |||||
} | |||||
#editTab { | |||||
position: absolute; | |||||
left: 455px; | |||||
top: 120px; | |||||
width: 360px; | |||||
height: 350px; | |||||
z-index: 1; | |||||
background-color: #FFFFFF; | |||||
border: 1px solid #889D8F; | |||||
padding: 0px; | |||||
display: none; | |||||
} | |||||
.txt { | |||||
float: left; | |||||
} | |||||
.updatedvt { | |||||
line-height: 23px; | |||||
padding-left: 3px; | |||||
width: 98%; | |||||
border-bottom: 1px dashed #dcdcdc; | |||||
} | |||||
.upinfotitle { | |||||
border-bottom: 1px solid #cccccc; | |||||
color: red; | |||||
font-weight: bold; | |||||
line-height: 26px; | |||||
} | |||||
.verline { | |||||
border-bottom: 1px dashed #cccccc; | |||||
line-height: 26px; | |||||
} | |||||
.itemTable { | |||||
margin-top: 8px; | |||||
background: #CBD8AC; | |||||
} | |||||
#loaddiv { | |||||
top: 0; | |||||
left: 0; | |||||
background: #cccccc; | |||||
filter: Alpha(opacity=70); | |||||
-moz-opacity: 0.7; | |||||
position: absolute; | |||||
z-index: 10000; | |||||
width: 100%; | |||||
height: 100%; | |||||
} | |||||
#mainmsg { | |||||
padding-right: 8px; | |||||
} | |||||
.rightside { | |||||
width: 49%; | |||||
float: left; | |||||
margin-right: 1%; | |||||
height: 670px; | |||||
scrollbar-face-color: #ffffff; | |||||
scrollbar-highlight-color: #919192; | |||||
scrollbar-shadow-color: #919192; | |||||
scrollbar-3dlight-color: #ffffff; | |||||
scrollbar-arrow-color: #919192; | |||||
scrollbar-track-color: #ffffff; | |||||
scrollbar-darkshadow-color: #ffffff; | |||||
} | |||||
.column { | |||||
width: 49%; | |||||
float: left; | |||||
margin-right: 0.5%; | |||||
} | |||||
.placeholder { | |||||
width: 98%; | |||||
margin-left: 1%; | |||||
background: #f0f0f0; | |||||
border: 1px dashed #ddd; | |||||
} | |||||
.dbox { | |||||
border: 1px solid #DEEAB6; | |||||
width: 98%; | |||||
margin-left: 1%; | |||||
margin-top: 8px; | |||||
} | |||||
.dbox dt { | |||||
height: 28px; | |||||
line-height: 28px; | |||||
font-weight: bold; | |||||
color: #4D6C2F; | |||||
cursor: move; | |||||
} | |||||
.dbox dt .l { | |||||
float: left; | |||||
padding-left: 8px; | |||||
} | |||||
.dbox dt .r { | |||||
float: right; | |||||
padding-right: 8px; | |||||
} | |||||
.dbox dt.lside { | |||||
border-bottom: 1px solid #CFD7C4; | |||||
background-color: rgb(239, 248, 229); | |||||
} | |||||
.dbox dt.rside { | |||||
border-bottom: 1px solid #DEEAB6; | |||||
background: url(../images/wbg.gif) repeat-x; | |||||
} | |||||
.dbox dd { | |||||
padding: 0px; | |||||
} | |||||
.dbox dd.intable { | |||||
padding-top: 3px; | |||||
} | |||||
#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: 12px; | |||||
padding-left: 30px; | |||||
overflow: hidden; | |||||
} | |||||
.dboxtable td.nline { | |||||
border-bottom: 1px dashed #CFD7C4; | |||||
height: 26px; | |||||
} | |||||
.dboxtable1 ul li { | |||||
float: left; | |||||
border-bottom: 1px dashed #CFD7C4; | |||||
height: 26px; | |||||
line-height: 26px; | |||||
display: inline; | |||||
width: 48%; | |||||
text-align: center; | |||||
} | |||||
.biz p { | |||||
padding: 0 15px; | |||||
line-height: 23px; | |||||
} | |||||
.biz img { | |||||
float: right; | |||||
margin: 40px 15px 0 15px; | |||||
} | |||||
.footer { | |||||
line-height: 36px; | |||||
margin-top: 8px; | |||||
font-family: Verdana, Geneva, sans-serif; | |||||
} | |||||
.title{color:#666600;font-weight:bold}.title span{padding-left:3px}#addTab{position:absolute;left:455px;top:150px;width:360px;height:200px;z-index:2;background-color:#FFFFFF;border:1px solid #889D8F;padding:0px;display:none;overflow:hidden}#editTab{position:absolute;left:455px;top:120px;width:360px;height:350px;z-index:1;background-color:#FFFFFF;border:1px solid #889D8F;padding:0px;display:none}.txt{float:left}.updatedvt{width:98%;border-bottom:1px dashed #dcdcdc}.upinfotitle{border-bottom:1px solid #cccccc;color:red;font-weight:bold}.verline{border-bottom:1px dashed #cccccc}.itemTable{background:#CBD8AC}#loaddiv{top:0;left:0;background:#cccccc;filter:Alpha(opacity=70);-moz-opacity:0.7;position:absolute;z-index:10000;width:100%;height:100%}#mainmsg{padding-right:8px}.rightside{width:49%;float:left;margin-right:1%;height:670px}.column{width:49%;float:left;margin-right:0.5%}.placeholder{width:98%;margin-left:1%;background:#f0f0f0;border:1px dashed #ddd}.dbox{border:1px solid #DEEAB6;width:98%;margin-left:1%;margin-top:8px}.dbox dt{height:28px;line-height:28px;font-weight:bold;color:#4D6C2F;cursor:move}.dbox dt .l{float:left;padding-left:8px}.dbox dt .r{float:right;padding-right:8px}.dbox dt.lside{border-bottom:1px solid #CFD7C4;background-color:rgb(239,248,229)}.dbox dt.rside{border-bottom:1px solid #DEEAB6;background:url(../images/wbg.gif)repeat-x}.dbox dd{padding:0px}.dbox dd.intable{padding-top:0}#updatetest{padding:6px;padding-left:110px;background:url(../images/ico_spider.gif)no-repeat scroll 10px 15px transparent}#quickmenu{width:100%;height:46px;overflow:hidden}#quickmenu .icoitem{float:left;height:24px;line-height:24px;margin-top:10px;padding-left:30px;overflow:hidden}.dboxtable td.nline{border-bottom:1px dashed #CFD7C4;height:26px}.dboxtable1 ul li{float:left;border-bottom:1px dashed #CFD7C4;height:26px;line-height:26px;display:inline;width:48%;text-align:center}.biz p{padding:0 15px}.biz img{float:right;margin:40px 15px 0 15px} |
@@ -5,14 +5,14 @@ | |||||
* | * | ||||
* @version $Id: config.php 1 9:43 2010年7月8日Z tianya $ | * @version $Id: config.php 1 9:43 2010年7月8日Z tianya $ | ||||
* @package DedeBIZ.Dialog | * @package DedeBIZ.Dialog | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__)."/../../include/common.inc.php"); | require_once(dirname(__FILE__)."/../../include/common.inc.php"); | ||||
require_once(DEDEINC."/userlogin.class.php"); | require_once(DEDEINC."/userlogin.class.php"); | ||||
//获得当前脚本名称,如果你的系统被禁用了$_SERVER变量,请自行更改这个选项 | |||||
//获得当前脚本名称,如果您的系统被禁用了$_SERVER变量,请自行更改这个选项 | |||||
$dedeNowurl = ''; | $dedeNowurl = ''; | ||||
$s_scriptName = ''; | $s_scriptName = ''; | ||||
$isUrlOpen = @ini_get('allow_url_fopen'); | $isUrlOpen = @ini_get('allow_url_fopen'); | ||||
@@ -4,7 +4,7 @@ | |||||
* | * | ||||
* @version $Id: select_images.php 1 9:43 2010年7月8日Z tianya $ | * @version $Id: select_images.php 1 9:43 2010年7月8日Z tianya $ | ||||
* @package DedeBIZ.Dialog | * @package DedeBIZ.Dialog | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -55,10 +55,10 @@ if (!empty($noeditor)) { | |||||
<link rel="stylesheet" href="../css/base.css"> | <link rel="stylesheet" href="../css/base.css"> | ||||
<style> | <style> | ||||
html{background:#f2f2f2} | html{background:#f2f2f2} | ||||
body{margin:0;line-height:22px;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif} | |||||
body{margin:0;line-height:1.5;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif} | |||||
a{text-decoration:none!important} | a{text-decoration:none!important} | ||||
table{background:#fff} | table{background:#fff} | ||||
.bg{margin:10px;border-radius:2px;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} | |||||
.bg{margin:10px;border-radius:.2rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} | |||||
.linerow{border-bottom:1px solid #eee!important} | .linerow{border-bottom:1px solid #eee!important} | ||||
.napisdiv{left:40;top:10;width:150px;height:100px;position:absolute;z-index:3;display:none} | .napisdiv{left:40;top:10;width:150px;height:100px;position:absolute;z-index:3;display:none} | ||||
</style> | </style> | ||||
@@ -73,7 +73,7 @@ table{background:#fff} | |||||
</head> | </head> | ||||
<body class="bg"> | <body class="bg"> | ||||
<div id="floater" class="napisdiv"> | <div id="floater" class="napisdiv"> | ||||
<a href="javascript:nullLink();" onClick="document.getElementById('floater').style.display='none';"><img src='img/picviewnone.gif' id='picview' border='0' alt='关闭预览'></a> | |||||
<a href="javascript:nullLink();" onClick="document.getElementById('floater').style.display='none';"><img src="img/picviewnone.gif" id='picview' alt="关闭预览"></a> | |||||
</div> | </div> | ||||
<script src="../js/float.js"></script> | <script src="../js/float.js"></script> | ||||
<script> | <script> | ||||
@@ -221,7 +221,7 @@ table{background:#fff} | |||||
<input type="hidden" name="job" value="upload"> | <input type="hidden" name="job" value="upload"> | ||||
<tr> | <tr> | ||||
<td> | <td> | ||||
上传:<input type="file" name="imgfile" style="width:160px"> | |||||
上传:<input type="file" name="imgfile" style="width:160px;border:none"> | |||||
<label><input type="checkbox" name="needwatermark" value="1" class="np" <?php if ($photo_markup == '1') echo "checked"; ?> /> 水印 </label> | <label><input type="checkbox" name="needwatermark" value="1" class="np" <?php if ($photo_markup == '1') echo "checked"; ?> /> 水印 </label> | ||||
<label><input type="checkbox" name="resize" value="1" class="np"> 缩小 </label> | <label><input type="checkbox" name="resize" value="1" class="np"> 缩小 </label> | ||||
宽:<input type="text" name="iwidth" value="<?php echo $cfg_ddimg_width ?>" style="width:46px"> | 宽:<input type="text" name="iwidth" value="<?php echo $cfg_ddimg_width ?>" style="width:46px"> | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: select_images_post.php 1 9:43 2010年7月8日Z tianya $ | * @version $Id: select_images_post.php 1 9:43 2010年7月8日Z tianya $ | ||||
* @package DedeBIZ.Dialog | * @package DedeBIZ.Dialog | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -27,21 +27,21 @@ if (empty($imgfile)) { | |||||
$imgfile = ''; | $imgfile = ''; | ||||
} | } | ||||
if (!is_uploaded_file($imgfile)) { | if (!is_uploaded_file($imgfile)) { | ||||
ShowMsg("你没有选择上传的文件!" . $imgfile, "-1"); | |||||
ShowMsg("您没有选择上传的文件!".$imgfile, "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$CKEditorFuncNum = (isset($CKEditorFuncNum)) ? $CKEditorFuncNum : 1; | $CKEditorFuncNum = (isset($CKEditorFuncNum)) ? $CKEditorFuncNum : 1; | ||||
$imgfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $imgfile_name)); | $imgfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $imgfile_name)); | ||||
if (!preg_match("#\.(".$cfg_imgtype.")#i", $imgfile_name)) { | if (!preg_match("#\.(".$cfg_imgtype.")#i", $imgfile_name)) { | ||||
ShowMsg("你所上传的图片类型不在许可列表,请更改系统对扩展名限定的配置!", "-1"); | |||||
ShowMsg("您所上传的图片类型不在许可列表,请更改系统对扩展名限定的配置", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$nowtme = time(); | $nowtme = time(); | ||||
$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); | $sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png", "image/xpng", "image/wbmp"); | ||||
$imgfile_type = strtolower(trim($imgfile_type)); | $imgfile_type = strtolower(trim($imgfile_type)); | ||||
if (!in_array($imgfile_type, $sparr)) { | if (!in_array($imgfile_type, $sparr)) { | ||||
ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG、WBMP格式的其中一种!", "-1"); | |||||
ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG、WBMP格式的其中一种", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$mdir = MyDate($cfg_addon_savetype, $nowtme); | $mdir = MyDate($cfg_addon_savetype, $nowtme); | ||||
@@ -55,7 +55,7 @@ $fs = explode('.', $imgfile_name); | |||||
$filename = $filename.'.'.$fs[count($fs) - 1]; | $filename = $filename.'.'.$fs[count($fs) - 1]; | ||||
$filename_name = $filename_name.'.'.$fs[count($fs) - 1]; | $filename_name = $filename_name.'.'.$fs[count($fs) - 1]; | ||||
$fullfilename = $cfg_basedir.$activepath."/".$filename; | $fullfilename = $cfg_basedir.$activepath."/".$filename; | ||||
move_uploaded_file($imgfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); | |||||
move_uploaded_file($imgfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); | |||||
@unlink($imgfile); | @unlink($imgfile); | ||||
if (empty($resize)) { | if (empty($resize)) { | ||||
@@ -93,8 +93,8 @@ if ($GLOBALS['cfg_html_editor'] == 'ckeditor' && $CKUpload) { | |||||
if (!empty($noeditor)) { | 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()); | |||||
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 { | } else { | ||||
ShowMsg("成功上传一幅图片!", "select_images.php?imgstick=$imgstick&comeback=" . urlencode($filename_name) . "&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=" . urlencode($activepath) . "/$mdir&d=" . time()); | |||||
ShowMsg("成功上传一幅图片", "select_images.php?imgstick=$imgstick&comeback=".urlencode($filename_name)."&v=$v&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."/$mdir&d=".time()); | |||||
} | } | ||||
exit(); | exit(); |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: select_media.php 1 9:43 2010年7月8日Z tianya $ | * @version $Id: select_media.php 1 9:43 2010年7月8日Z tianya $ | ||||
* @package DedeBIZ.Dialog | * @package DedeBIZ.Dialog | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: select_media_post.php 1 9:43 2010年7月8日Z tianya $ | * @version $Id: select_media_post.php 1 9:43 2010年7月8日Z tianya $ | ||||
* @package DedeBIZ.Dialog | * @package DedeBIZ.Dialog | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -4,7 +4,7 @@ | |||||
* | * | ||||
* @version $Id: select_soft.php 1 9:43 2010年7月8日Z tianya $ | * @version $Id: select_soft.php 1 9:43 2010年7月8日Z tianya $ | ||||
* @package DedeBIZ.Dialog | * @package DedeBIZ.Dialog | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -48,10 +48,10 @@ if (!empty($noeditor)) { | |||||
<link rel="stylesheet" href="../css/base.css"> | <link rel="stylesheet" href="../css/base.css"> | ||||
<style> | <style> | ||||
html{background:#f2f2f2} | html{background:#f2f2f2} | ||||
body{margin:0;line-height:22px;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif} | |||||
body{margin:0;line-height:1.5;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif} | |||||
a{text-decoration:none!important} | a{text-decoration:none!important} | ||||
table{background:#fff} | table{background:#fff} | ||||
.bg{margin:10px;border-radius:2px;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} | |||||
.bg{margin:10px;border-radius:.2rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} | |||||
.linerow{border-bottom:1px solid #eee!important} | .linerow{border-bottom:1px solid #eee!important} | ||||
</style> | </style> | ||||
</head> | </head> | ||||
@@ -82,7 +82,7 @@ table{background:#fff} | |||||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | <input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | ||||
<input type="hidden" name="f" value="<?php echo $f ?>"> | <input type="hidden" name="f" value="<?php echo $f ?>"> | ||||
<input type="hidden" name="job" value="upload"> | <input type="hidden" name="job" value="upload"> | ||||
上传:<input type="file" name="uploadfile" size="24"> | |||||
上传:<input type="file" name="uploadfile" size="24" style="border:none"> | |||||
| | ||||
改名:<input type="text" name="newname" style="width:160px"> | 改名:<input type="text" name="newname" style="width:160px"> | ||||
| | ||||
@@ -122,15 +122,15 @@ table{background:#fff} | |||||
else if ($file == "..") { | else if ($file == "..") { | ||||
if ($activepath == "") continue; | if ($activepath == "") continue; | ||||
$tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | $tmp = preg_replace("#[\/][^\/]*$#i", "", $activepath); | ||||
$line = "\n<tr height='28'> | |||||
$line = "\n<tr height='26'> | |||||
<td class='linerow'><a href='select_soft.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='img/dir2.gif'>上级目录</a></td> | <td class='linerow'><a href='select_soft.php?f=$f&activepath=".urlencode($tmp).$addparm."'><img src='img/dir2.gif'>上级目录</a></td> | ||||
<td colspan='2' class='linerow'>当前目录:$activepath</td> | <td colspan='2' class='linerow'>当前目录:$activepath</td> | ||||
</tr>\r\n"; | </tr>\r\n"; | ||||
echo $line; | echo $line; | ||||
} else if (is_dir("$inpath/$file")) { | } else if (is_dir("$inpath/$file")) { | ||||
if (preg_match("#^_(.*)$#i", $file)) continue; #屏蔽FrontPage扩展目录和linux隐蔽目录 | |||||
if (preg_match("#^_(.*)$#i", $file)) continue; | |||||
if (preg_match("#^\.(.*)$#i", $file)) continue; | if (preg_match("#^\.(.*)$#i", $file)) continue; | ||||
$line = "\n<tr height='28'> | |||||
$line = "\n<tr height='26'> | |||||
<td class='linerow'><a href=select_soft.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='img/dir.gif'>$file</a></td> | <td class='linerow'><a href=select_soft.php?f=$f&activepath=".urlencode("$activepath/$file").$addparm."><img src='img/dir.gif'>$file</a></td> | ||||
<td class='linerow'></td> | <td class='linerow'></td> | ||||
<td class='linerow'></td> | <td class='linerow'></td> | ||||
@@ -142,7 +142,7 @@ table{background:#fff} | |||||
$reurl = "$activeurl/$file"; | $reurl = "$activeurl/$file"; | ||||
$reurl = preg_replace("#^\.\.#", "", $reurl); | $reurl = preg_replace("#^\.\.#", "", $reurl); | ||||
$reurl = $reurl; | $reurl = $reurl; | ||||
$line = "\n<tr height='28'> | |||||
$line = "\n<tr height='26'> | |||||
<td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/zip.gif'>$file</a></td> | <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/zip.gif'>$file</a></td> | ||||
<td class='linerow'>$filesize KB</td> | <td class='linerow'>$filesize KB</td> | ||||
<td class='linerow'>$filetime</td> | <td class='linerow'>$filetime</td> | ||||
@@ -154,7 +154,7 @@ table{background:#fff} | |||||
$reurl = "$activeurl/$file"; | $reurl = "$activeurl/$file"; | ||||
$reurl = preg_replace("#^\.\.#", "", $reurl); | $reurl = preg_replace("#^\.\.#", "", $reurl); | ||||
$reurl = $reurl; | $reurl = $reurl; | ||||
$line = "\n<tr height='28'> | |||||
$line = "\n<tr height='26'> | |||||
<td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/exe.gif'>$file</a></td> | <td class='linerow'><a href=\"javascript:ReturnValue('$reurl');\" $lstyle><img src='img/exe.gif'>$file</a></td> | ||||
<td class='linerow'>$filesize KB</td> | <td class='linerow'>$filesize KB</td> | ||||
<td class='linerow'>$filetime</td> | <td class='linerow'>$filetime</td> | ||||
@@ -168,7 +168,7 @@ table{background:#fff} | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td colspan="3" height="30">请点击要选择的文件,红色字样的为刚上传的文件</td> | |||||
<td colspan="3" height="30">点击选择的文件,红色字样的为刚上传的文件</td> | |||||
</tr> | </tr> | ||||
</table> | </table> | ||||
</body> | </body> |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: select_soft_post.php 1 9:43 2010年7月8日Z tianya $ | * @version $Id: select_soft_post.php 1 9:43 2010年7月8日Z tianya $ | ||||
* @package DedeBIZ.Dialog | * @package DedeBIZ.Dialog | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -22,7 +22,7 @@ $uploadfile = isset($imgfile) && empty($uploadfile) ? $imgfile : $uploadfile; | |||||
$uploadfile_name = isset($imgfile_name) && empty($uploadfile_name) ? $imgfile_name : $uploadfile_name; | $uploadfile_name = isset($imgfile_name) && empty($uploadfile_name) ? $imgfile_name : $uploadfile_name; | ||||
if (!is_uploaded_file($uploadfile)) { | if (!is_uploaded_file($uploadfile)) { | ||||
ShowMsg("你没有选择上传的文件或选择的文件大小超出限制!", "-1"); | |||||
ShowMsg("您没有选择上传的文件或选择的文件大小超出限制!", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -32,7 +32,7 @@ $cfg_softtype = $cfg_softtype; | |||||
$cfg_softtype = str_replace('||', '|', $cfg_softtype); | $cfg_softtype = str_replace('||', '|', $cfg_softtype); | ||||
$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); | $uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); | ||||
if (!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name)) { | if (!preg_match("#\.(".$cfg_softtype.")#i", $uploadfile_name)) { | ||||
ShowMsg("你所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置!", ""); | |||||
ShowMsg("您所上传的{$uploadmbtype}不在许可列表,请更改系统对扩展名限定的配置", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -52,7 +52,7 @@ if (!empty($newname)) { | |||||
if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); | if (!preg_match("#\.#", $filename)) $fs = explode('.', $uploadfile_name); | ||||
else $fs = explode('.', $filename); | else $fs = explode('.', $filename); | ||||
if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { | if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { | ||||
ShowMsg("你指定的文件名被系统禁止!", 'javascript:;'); | |||||
ShowMsg("您指定的文件名被系统禁止", 'javascript:;'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs) - 1]; | if (!preg_match("#\.#", $filename)) $filename = $filename.'.'.$fs[count($fs) - 1]; | ||||
@@ -60,7 +60,7 @@ if (!empty($newname)) { | |||||
$filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', $nowtme)); | $filename = $cuserLogin->getUserID().'-'.dd2char(MyDate('ymdHis', $nowtme)); | ||||
$fs = explode('.', $uploadfile_name); | $fs = explode('.', $uploadfile_name); | ||||
if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { | if (preg_match("#".$cfg_not_allowall."#", $fs[count($fs) - 1])) { | ||||
ShowMsg("你上传了某些可能存在不安全因素的文件,系统拒绝操作!", 'javascript:;'); | |||||
ShowMsg("您上传了某些可能存在不安全因素的文件,系统拒绝操作", 'javascript:;'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$filename = $filename.'.'.$fs[count($fs) - 1]; | $filename = $filename.'.'.$fs[count($fs) - 1]; | ||||
@@ -68,7 +68,7 @@ if (!empty($newname)) { | |||||
$fullfilename = $cfg_basedir.$activepath.'/'.$filename; | $fullfilename = $cfg_basedir.$activepath.'/'.$filename; | ||||
$fullfileurl = $activepath.'/'.$filename; | $fullfileurl = $activepath.'/'.$filename; | ||||
move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); | |||||
move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); | |||||
@unlink($uploadfile); | @unlink($uploadfile); | ||||
if ($uploadfile_type == 'application/x-shockwave-flash') { | if ($uploadfile_type == 'application/x-shockwave-flash') { | ||||
@@ -99,6 +99,6 @@ if ($ck == 1) { | |||||
); | ); | ||||
echo json_encode($arr); | echo json_encode($arr); | ||||
} else { | } else { | ||||
ShowMsg("成功上传文件!", $bkurl . "?comeback=" . urlencode($filename) . "&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=" . urlencode($activepath) . "&d=" . time()); | |||||
ShowMsg("成功上传文件", $bkurl."?comeback=".urlencode($filename)."&f=$f&CKEditorFuncNum=$CKEditorFuncNum&activepath=".urlencode($activepath)."&d=".time()); | |||||
exit(); | exit(); | ||||
} | } |
@@ -4,7 +4,7 @@ | |||||
* | * | ||||
* @version $Id: select_templets.php 1 9:43 2010年7月8日Z tianya $ | * @version $Id: select_templets.php 1 9:43 2010年7月8日Z tianya $ | ||||
* @package DedeBIZ.Dialog | * @package DedeBIZ.Dialog | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -40,10 +40,10 @@ if (empty($comeback)) { | |||||
<link rel="stylesheet" href="../css/base.css"> | <link rel="stylesheet" href="../css/base.css"> | ||||
<style> | <style> | ||||
html{background:#f2f2f2} | html{background:#f2f2f2} | ||||
body{margin:0;line-height:22px;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif} | |||||
body{margin:0;line-height:1.5;font:12px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif} | |||||
a{text-decoration:none!important} | a{text-decoration:none!important} | ||||
table{background:#fff} | table{background:#fff} | ||||
.bg{margin:10px;border-radius:2px;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} | |||||
.bg{margin:10px;border-radius:.2rem;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)} | |||||
.linerow{border-bottom:1px solid #eee!important} | .linerow{border-bottom:1px solid #eee!important} | ||||
</style> | </style> | ||||
</head> | </head> | ||||
@@ -183,11 +183,11 @@ table{background:#fff} | |||||
<table width="100%"> | <table width="100%"> | ||||
<form action="select_templets_post.php" method="POST" enctype="multipart/form-data" name="myform"> | <form action="select_templets_post.php" method="POST" enctype="multipart/form-data" name="myform"> | ||||
<input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | <input type="hidden" name="activepath" value="<?php echo $activepath ?>"> | ||||
<input type="hidden" name="f" value='<?php echo $f ?>'> | |||||
<input type="hidden" name="f" value="<?php echo $f ?>"> | |||||
<input type="hidden" name="job" value="upload"> | <input type="hidden" name="job" value="upload"> | ||||
<tr> | <tr> | ||||
<td> | <td> | ||||
上传:<input type="file" name="uploadfile" style="width:260px"> | |||||
上传:<input type="file" name="uploadfile" style="width:260px;border:none"> | |||||
改名:<input type="text" name="filename" style="width:160px"> | 改名:<input type="text" name="filename" style="width:160px"> | ||||
<button type="submit" name="sb1" class="btn btn-success btn-sm">确定</button> | <button type="submit" name="sb1" class="btn btn-success btn-sm">确定</button> | ||||
</td> | </td> | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: select_templets_post.php 1 9:43 2010年7月8日Z tianya $ | * @version $Id: select_templets_post.php 1 9:43 2010年7月8日Z tianya $ | ||||
* @package DedeBIZ.Dialog | * @package DedeBIZ.Dialog | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -16,15 +16,15 @@ if (empty($uploadfile)) { | |||||
$uploadfile = ""; | $uploadfile = ""; | ||||
} | } | ||||
if (!is_uploaded_file($uploadfile)) { | if (!is_uploaded_file($uploadfile)) { | ||||
ShowMsg("你没有选择上传的文件!", "-1"); | |||||
ShowMsg("您没有选择上传的文件!", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!preg_match("#^text#", $uploadfile_type)) { | if (!preg_match("#^text#", $uploadfile_type)) { | ||||
ShowMsg("你上传的不是文本类型附件!", "-1"); | |||||
ShowMsg("您上传的不是文本类型附件!", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!preg_match("#\.(".$cfg_txttype.")#i", $uploadfile_name)) { | if (!preg_match("#\.(".$cfg_txttype.")#i", $uploadfile_name)) { | ||||
ShowMsg("你所上传的模板文件类型不能被识别,只允许htm、html、tpl、txt扩展名!", "-1"); | |||||
ShowMsg("您所上传的模板文件类型不能被识别,只允许htm、html、tpl、txt扩展名", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if ($filename != '') { | if ($filename != '') { | ||||
@@ -33,12 +33,12 @@ if ($filename != '') { | |||||
$uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); | $uploadfile_name = trim(preg_replace("#[ \r\n\t\*\%\\\/\?><\|\":]{1,}#", '', $uploadfile_name)); | ||||
$filename = $uploadfile_name; | $filename = $uploadfile_name; | ||||
if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) { | if ($filename == '' || !preg_match("#\.(".$cfg_txttype.")#i", $filename)) { | ||||
ShowMsg("你所上传的文件存在问题,请检查文件类型是否适合!", "-1"); | |||||
ShowMsg("您所上传的文件存在问题,请检查文件类型是否适合", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
$fullfilename = $cfg_basedir.$activepath."/".$filename; | $fullfilename = $cfg_basedir.$activepath."/".$filename; | ||||
move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败!"); | |||||
move_uploaded_file($uploadfile, $fullfilename) or die("上传文件到 $fullfilename 失败"); | |||||
@unlink($uploadfile); | @unlink($uploadfile); | ||||
ShowMsg("成功上传文件!", "select_templets.php?comeback=" . urlencode($filename) . "&f=$f&activepath=" . urlencode($activepath) . "&d=" . time()); | |||||
ShowMsg("成功上传文件", "select_templets.php?comeback=".urlencode($filename)."&f=$f&activepath=".urlencode($activepath)."&d=".time()); | |||||
exit(); | exit(); |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: diy_add.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: diy_add.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -21,18 +21,18 @@ if (empty($action)) { | |||||
include(DEDEADMIN."/templets/diy_add.htm"); | include(DEDEADMIN."/templets/diy_add.htm"); | ||||
} else { | } else { | ||||
if (preg_match("#[^0-9-]#", $diyid) || empty($diyid)) { | if (preg_match("#[^0-9-]#", $diyid) || empty($diyid)) { | ||||
ShowMsg("<font color=red>'自定义表单diyid'</font>必须为数字!", "-1"); | |||||
ShowMsg("<font color=red>'自定义表单diyid'</font>必须为数字", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if ($table == "") { | if ($table == "") { | ||||
ShowMsg("表名不能为空!", "-1"); | |||||
ShowMsg("表名不能为空", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$public = isset($public) && is_numeric($public) ? $public : 0; | $public = isset($public) && is_numeric($public) ? $public : 0; | ||||
$name = dede_htmlspecialchars($name); | $name = dede_htmlspecialchars($name); | ||||
$row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='$diyid' OR `table` LIKE '$table' OR name LIKE '$name' "); | $row = $dsql->GetOne("SELECT * FROM #@__diyforms WHERE diyid='$diyid' OR `table` LIKE '$table' OR name LIKE '$name' "); | ||||
if (is_array($row)) { | if (is_array($row)) { | ||||
ShowMsg("可能自定义表单的‘diyid’、‘名称’在数据库中已存在,不能重复使用!", "-1"); | |||||
ShowMsg("可能自定义表单的‘diyid’、‘名称’在数据库中已存在,不能重复使用", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$query = "SHOW TABLES FROM {$dsql->dbName} "; | $query = "SHOW TABLES FROM {$dsql->dbName} "; | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: diy_add.php 1 14:31 2010年7月12日Z tianya $ | * @version $Id: diy_add.php 1 14:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -25,7 +25,7 @@ if ($dopost == "save") { | |||||
$name = dede_htmlspecialchars($name); | $name = dede_htmlspecialchars($name); | ||||
$query = "UPDATE `#@__diyforms` SET name = '$name', listtemplate='$listtemplate', viewtemplate='$viewtemplate', posttemplate='$posttemplate', public='$public' WHERE diyid='$diyid' "; | $query = "UPDATE `#@__diyforms` SET name = '$name', listtemplate='$listtemplate', viewtemplate='$viewtemplate', posttemplate='$posttemplate', public='$public' WHERE diyid='$diyid' "; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
ShowMsg("成功更改一个自定义表单!", "diy_main.php"); | |||||
ShowMsg("成功更改一个自定义表单", "diy_main.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*---------------- | /*---------------- | ||||
@@ -45,7 +45,7 @@ function __Delete() | |||||
$win->AddHidden("job", "yes"); | $win->AddHidden("job", "yes"); | ||||
$win->AddHidden("dopost", $dopost); | $win->AddHidden("dopost", $dopost); | ||||
$win->AddHidden("diyid", $diyid); | $win->AddHidden("diyid", $diyid); | ||||
$win->AddTitle("!将删除所有与该自定义表单相关的文件和数据<br />你确实要删除 \"" . $row['name'] . "\" 这个自定义表单?"); | |||||
$win->AddTitle("将删除所有与该自定义表单相关的文件和数据<br />您确实要删除 \"".$row['name']."\" 这个自定义表单?"); | |||||
$winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
$win->Display(); | $win->Display(); | ||||
exit(); | exit(); | ||||
@@ -55,7 +55,7 @@ function __Delete() | |||||
else if ($job == "yes") { | else if ($job == "yes") { | ||||
$row = $dsql->GetOne("SELECT `table` FROM `#@__diyforms` WHERE diyid='$diyid'", MYSQL_ASSOC); | $row = $dsql->GetOne("SELECT `table` FROM `#@__diyforms` WHERE diyid='$diyid'", MYSQL_ASSOC); | ||||
if (!is_array($row)) { | if (!is_array($row)) { | ||||
ShowMsg("你所指定的自定义表单信息不存在!", "-1"); | |||||
ShowMsg("您所指定的自定义表单信息不存在!", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -64,7 +64,7 @@ function __Delete() | |||||
//删除频道配置信息 | //删除频道配置信息 | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__diyforms` WHERE diyid='$diyid'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__diyforms` WHERE diyid='$diyid'"); | ||||
ShowMsg("成功删除一个自定义表单!", "diy_main.php"); | |||||
ShowMsg("成功删除一个自定义表单", "diy_main.php"); | |||||
exit(); | exit(); | ||||
} | } | ||||
} | } | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: diy_field_add.php 1 18:31 2010年7月12日Z tianya $ | * @version $Id: diy_field_add.php 1 18:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -71,10 +71,10 @@ if ($action == 'save') { | |||||
$rs = $dsql->ExecuteNoneQuery("Update #@__diyforms set `info`='$oksetting' where diyid='$diyid' "); | $rs = $dsql->ExecuteNoneQuery("Update #@__diyforms set `info`='$oksetting' where diyid='$diyid' "); | ||||
if (!$rs) { | if (!$rs) { | ||||
$grr = $dsql->GetError(); | $grr = $dsql->GetError(); | ||||
ShowMsg("保存节点配置出错!" . $grr, "javascript:;"); | |||||
ShowMsg("保存节点配置出错".$grr, "javascript:;"); | |||||
exit(); | exit(); | ||||
} | } | ||||
ShowMsg("成功增加一个字段!", "diy_edit.php?diyid=$diyid"); | |||||
ShowMsg("成功增加一个字段", "diy_edit.php?diyid=$diyid"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: diy_field_edit.php 1 18:31 2010年7月12日Z tianya $ | * @version $Id: diy_field_edit.php 1 18:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -45,7 +45,7 @@ function _SAVE() | |||||
if ($action == 'save') { | if ($action == 'save') { | ||||
if (!isset($fieldtypes[$dtype])) { | if (!isset($fieldtypes[$dtype])) { | ||||
ShowMsg("你修改的是系统专用类型的数据,禁止操作!", "-1"); | |||||
ShowMsg("您修改的是系统专用类型的数据,禁止操作", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -101,7 +101,7 @@ if ($action == 'save') { | |||||
$oksetting = $dtp->GetResultNP(); | $oksetting = $dtp->GetResultNP(); | ||||
$oksetting = addslashes($oksetting); | $oksetting = addslashes($oksetting); | ||||
$dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); | $dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); | ||||
ShowMsg("成功更改一个字段的配置!", "diy_edit.php?diyid={$diyid}"); | |||||
ShowMsg("成功更改一个字段的配置", "diy_edit.php?diyid={$diyid}"); | |||||
exit(); | exit(); | ||||
} | } | ||||
/*------------------ | /*------------------ | ||||
@@ -117,7 +117,7 @@ function _DELETE() | |||||
$oksetting = addslashes($dtp->GetResultNP()); | $oksetting = addslashes($dtp->GetResultNP()); | ||||
$dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); | $dsql->ExecuteNoneQuery("UPDATE #@__diyforms SET info='$oksetting' WHERE diyid='$diyid' "); | ||||
$dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); | $dsql->ExecuteNoneQuery("ALTER TABLE `$trueTable` DROP `$fname` "); | ||||
ShowMsg("成功删除一个字段!", "diy_edit.php?diyid=$diyid"); | |||||
ShowMsg("成功删除一个字段", "diy_edit.php?diyid=$diyid"); | |||||
exit(); | exit(); | ||||
} | } | ||||
require_once(DEDEADMIN."/templets/diy_field_edit.htm"); | require_once(DEDEADMIN."/templets/diy_field_edit.htm"); |
@@ -1,18 +1,17 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 自定义表单列表 | * 自定义表单列表 | ||||
* | * | ||||
* @version $Id: diy_list.php 1 18:31 2010年7月12日Z tianya $ | * @version $Id: diy_list.php 1 18:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
require_once(dirname(__FILE__)."/config.php"); | require_once(dirname(__FILE__)."/config.php"); | ||||
CheckPurview('c_New'); | CheckPurview('c_New'); | ||||
$diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; | $diyid = isset($diyid) && is_numeric($diyid) ? $diyid : 0; | ||||
$action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete')) ? $action : ''; | |||||
$action = isset($action) && in_array($action, array('post', 'list', 'edit', 'check', 'delete','excel')) ? $action : ''; | |||||
if (empty($diyid)) { | if (empty($diyid)) { | ||||
showMsg("非法操作!", 'javascript:;'); | showMsg("非法操作!", 'javascript:;'); | ||||
exit(); | exit(); | ||||
@@ -81,13 +80,13 @@ if ($action == 'post') { | |||||
if (empty($do)) { | if (empty($do)) { | ||||
$id = isset($id) && is_numeric($id) ? $id : 0; | $id = isset($id) && is_numeric($id) ? $id : 0; | ||||
if (empty($id)) { | if (empty($id)) { | ||||
showMsg('非法操作!未指定id', 'javascript:;'); | |||||
showMsg('非法操作未指定id', 'javascript:;'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$query = "SELECT * FROM {$diy->table} WHERE id=$id"; | $query = "SELECT * FROM {$diy->table} WHERE id=$id"; | ||||
$row = $dsql->GetOne($query); | $row = $dsql->GetOne($query); | ||||
if (!is_array($row)) { | if (!is_array($row)) { | ||||
showmsg("你访问的记录不存在或未经审核", '-1'); | |||||
showmsg("您访问的记录不存在或未经审核", '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$postform = $diy->getForm('edit', $row, 'admin'); | $postform = $diy->getForm('edit', $row, 'admin'); | ||||
@@ -171,6 +170,35 @@ if ($action == 'post') { | |||||
showmsg('文件不存在', '-1'); | 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 "<table><tr>"; | |||||
foreach($fieldlist as $field=>$fielddata) | |||||
{ | |||||
echo "<th>{$fielddata[0]}</th>"; | |||||
} | |||||
echo "<th>状态</th>"; | |||||
echo "</tr>"; | |||||
$sql = "SELECT * FROM {$diy->table} ORDER BY id DESC"; | |||||
$dsql->SetQuery($sql); | |||||
$dsql->Execute('t'); | |||||
while($arr = $dsql->GetArray('t')) | |||||
{ | |||||
echo "<tr>"; | |||||
foreach($fieldlist as $key => $field) | |||||
{ | |||||
echo "<td>".$arr[$key]."</td>"; | |||||
} | |||||
$status = $arr['ifcheck'] == 1 ? '已审核' : '未审核'; | |||||
echo "<td>".$status."</td>"; | |||||
echo "</tr>"; | |||||
} | |||||
echo "</table>"; | |||||
} else { | } else { | ||||
showmsg('未定义操作', "-1"); | showmsg('未定义操作', "-1"); | ||||
} | } |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: diy_main.php 1 18:31 2010年7月12日Z tianya $ | * @version $Id: diy_main.php 1 18:31 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: erraddsave.php 1 19:09 2010年7月12日Z tianya $ | * @version $Id: erraddsave.php 1 19:09 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -63,7 +63,7 @@ function typename($me) | |||||
if ($dopost == "delete") { | if ($dopost == "delete") { | ||||
if ($id == '') { | if ($id == '') { | ||||
ShowMsg("参数无效!", "-1"); | |||||
ShowMsg("参数无效", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
@@ -74,7 +74,7 @@ if ($dopost == "delete") { | |||||
$query = "DELETE FROM `#@__erradd` WHERE `id` = '$var'"; | $query = "DELETE FROM `#@__erradd` WHERE `id` = '$var'"; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
} | } | ||||
ShowMsg("成功删除指定的文档!", "erraddsave.php"); | |||||
ShowMsg("成功删除指定的文档", "erraddsave.php"); | |||||
exit(); | exit(); | ||||
} else { | } else { | ||||
require_once(DEDEINC."/oxwindow.class.php"); | require_once(DEDEINC."/oxwindow.class.php"); | ||||
@@ -85,7 +85,7 @@ if ($dopost == "delete") { | |||||
$win->AddHidden("fmdo", "yes"); | $win->AddHidden("fmdo", "yes"); | ||||
$win->AddHidden("dopost", $dopost); | $win->AddHidden("dopost", $dopost); | ||||
$win->AddHidden("id", $id); | $win->AddHidden("id", $id); | ||||
$win->AddTitle("你确实要删除“ $id ”这些错误提示?"); | |||||
$win->AddTitle("您确实要删除“ $id ”这些错误提示?"); | |||||
$winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
$win->Display(); | $win->Display(); | ||||
exit(); | exit(); | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: exit.php 1 19:09 2010年7月12日Z tianya $ | * @version $Id: exit.php 1 19:09 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: feedback_edit.php 1 19:09 2010年7月12日Z tianya $ | * @version $Id: feedback_edit.php 1 19:09 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -28,7 +28,7 @@ if ($dopost == 'edit') { | |||||
} | } | ||||
$query = "UPDATE `#@__feedback` SET username='$username',msg='$msg',ischeck=1 WHERE id=$id"; | $query = "UPDATE `#@__feedback` SET username='$username',msg='$msg',ischeck=1 WHERE id=$id"; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
ShowMsg("成功回复一则留言!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功回复一则留言", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} elseif ($dopost === 'makehtml') { | } elseif ($dopost === 'makehtml') { | ||||
require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: feedback_main.php 1 19:09 2010年7月12日Z tianya $ | * @version $Id: feedback_main.php 1 19:09 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -36,7 +36,7 @@ function jsTrimjajx($str, $len) | |||||
if (!empty($job)) { | if (!empty($job)) { | ||||
$ids = preg_replace("#[^0-9,]#", '', $fid); | $ids = preg_replace("#[^0-9,]#", '', $fid); | ||||
if (empty($ids)) { | if (empty($ids)) { | ||||
ShowMsg("你没选中任何选项!", $_COOKIE['ENV_GOBACK_URL'], 0, 500); | |||||
ShowMsg("您没选中任何选项", $_COOKIE['ENV_GOBACK_URL'], 0, 500); | |||||
exit; | exit; | ||||
} | } | ||||
} else { | } else { | ||||
@@ -4,7 +4,7 @@ | |||||
* | * | ||||
* @version $Id: file_class.php 1 19:09 2010年7月12日Z tianya $ | * @version $Id: file_class.php 1 19:09 2010年7月12日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -33,7 +33,7 @@ class FileManagement | |||||
if (($newname != $oldname) && is_writable($oldname)) { | if (($newname != $oldname) && is_writable($oldname)) { | ||||
rename($oldname, $newname); | rename($oldname, $newname); | ||||
} | } | ||||
ShowMsg("成功更改一个文件名!", "file_manage_main.php?activepath=" . $this->activeDir); | |||||
ShowMsg("成功更改一个文件名", "file_manage_main.php?activepath=".$this->activeDir); | |||||
return 0; | return 0; | ||||
} | } | ||||
@@ -45,10 +45,10 @@ class FileManagement | |||||
if (is_writable($this->baseDir.$this->activeDir)) { | if (is_writable($this->baseDir.$this->activeDir)) { | ||||
MkdirAll($dirname, $GLOBALS['cfg_dir_purview']); | MkdirAll($dirname, $GLOBALS['cfg_dir_purview']); | ||||
CloseFtp(); | CloseFtp(); | ||||
ShowMsg("成功创建一个新目录!", "file_manage_main.php?activepath=" . $this->activeDir . "/" . $newdir); | |||||
ShowMsg("成功创建一个新目录", "file_manage_main.php?activepath=".$this->activeDir."/".$newdir); | |||||
return 1; | return 1; | ||||
} else { | } else { | ||||
ShowMsg("创建新目录失败,因为这个位置不允许写入!", "file_manage_main.php?activepath=" . $this->activeDir); | |||||
ShowMsg("创建新目录失败,因为这个位置不允许写入", "file_manage_main.php?activepath=".$this->activeDir); | |||||
return 0; | return 0; | ||||
} | } | ||||
} | } | ||||
@@ -80,14 +80,14 @@ class FileManagement | |||||
copy($oldfile, $truepath."/$mfile"); | copy($oldfile, $truepath."/$mfile"); | ||||
} | } | ||||
unlink($oldfile); | unlink($oldfile); | ||||
ShowMsg("成功移动文件!", "file_manage_main.php?activepath=$mpath", 0, 1000); | |||||
ShowMsg("成功移动文件", "file_manage_main.php?activepath=$mpath", 0, 1000); | |||||
return 1; | return 1; | ||||
} else { | } else { | ||||
ShowMsg("移动文件 $oldfile -> $truepath/$mfile 失败,可能是某个位置权限不足!", "file_manage_main.php?activepath=$mpath", 0, 1000); | |||||
ShowMsg("移动文件 $oldfile -> $truepath/$mfile 失败,可能是某个位置权限不足", "file_manage_main.php?activepath=$mpath", 0, 1000); | |||||
return 0; | return 0; | ||||
} | } | ||||
} else { | } else { | ||||
ShowMsg("对不起,你移动的路径不合法!", "-1", 0, 5000); | |||||
ShowMsg("对不起,您移动的路径不合法", "-1", 0, 5000); | |||||
return 0; | return 0; | ||||
} | } | ||||
} | } | ||||
@@ -157,11 +157,11 @@ class FileManagement | |||||
$this->RmDirFiles($filename); | $this->RmDirFiles($filename); | ||||
} else { | } else { | ||||
// 完善用户体验,by:sumic | // 完善用户体验,by:sumic | ||||
ShowMsg("系统禁止删除" . $t . "!", "file_manage_main.php?activepath=" . $this->activeDir); | |||||
ShowMsg("系统禁止删除".$t."", "file_manage_main.php?activepath=".$this->activeDir); | |||||
exit; | exit; | ||||
} | } | ||||
} | } | ||||
ShowMsg("成功删除一个" . $t . "!", "file_manage_main.php?activepath=" . $this->activeDir); | |||||
ShowMsg("成功删除一个".$t."", "file_manage_main.php?activepath=".$this->activeDir); | |||||
return 0; | return 0; | ||||
} | } | ||||
} | } | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: file_manage_control.php 1 8:48 2010年7月13日Z tianya $ | * @version $Id: file_manage_control.php 1 8:48 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -68,9 +68,9 @@ function __saveEdit(); | |||||
fputs($fp, $str); | fputs($fp, $str); | ||||
fclose($fp); | fclose($fp); | ||||
if (empty($backurl)) { | if (empty($backurl)) { | ||||
ShowMsg("成功保存一个文件!", "file_manage_main.php?activepath=$activepath"); | |||||
ShowMsg("成功保存一个文件", "file_manage_main.php?activepath=$activepath"); | |||||
} else { | } else { | ||||
ShowMsg("成功保存文件!", $backurl); | |||||
ShowMsg("成功保存文件", $backurl); | |||||
} | } | ||||
exit(); | exit(); | ||||
} | } | ||||
@@ -90,7 +90,7 @@ else if($fmdo=="editview") | |||||
{ | { | ||||
$backurl = "file_manage_main.php?activepath=$activepath"; | $backurl = "file_manage_main.php?activepath=$activepath"; | ||||
} | } | ||||
ShowMsg("成功保存文件!",$backurl); | |||||
ShowMsg("成功保存文件",$backurl); | |||||
exit(); | exit(); | ||||
} | } | ||||
*/ | */ | ||||
@@ -126,7 +126,7 @@ else if ($fmdo == "space") { | |||||
} else { | } else { | ||||
$ecpath = $activepath; | $ecpath = $activepath; | ||||
} | } | ||||
$titleinfo = "目录 <a href='file_manage_main.php?activepath=$activepath'><b><u>$ecpath</u></b></a> 空间使用状况:<br/>"; | |||||
$titleinfo = "目录 <a href='file_manage_main.php?activepath=$activepath'><b>$ecpath</b></a> 空间使用状况:<br/>"; | |||||
$wintitle = "文件管理"; | $wintitle = "文件管理"; | ||||
$wecome_info = "文件管理::空间大小检查 [<a href='file_manage_main.php?activepath=$activepath'>文件浏览器</a>]</a>"; | $wecome_info = "文件管理::空间大小检查 [<a href='file_manage_main.php?activepath=$activepath'>文件浏览器</a>]</a>"; | ||||
$activepath = $cfg_basedir.$activepath; | $activepath = $cfg_basedir.$activepath; | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: file_manage_main.php 1 8:48 2010年7月13日Z tianya $ | * @version $Id: file_manage_main.php 1 8:48 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: file_manage_view.php 1 8:48 2010年7月13日Z tianya $ | * @version $Id: file_manage_view.php 1 8:48 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -81,9 +81,9 @@ else if ($fmdo == "del") { | |||||
$win->AddHidden("activepath", $activepath); | $win->AddHidden("activepath", $activepath); | ||||
$win->AddHidden("filename", $filename); | $win->AddHidden("filename", $filename); | ||||
if (@is_dir($cfg_basedir.$activepath."/$filename")) { | if (@is_dir($cfg_basedir.$activepath."/$filename")) { | ||||
$wmsg = "你确信要删除目录:$filename 吗?"; | |||||
$wmsg = "您确信要删除目录:$filename 吗?"; | |||||
} else { | } else { | ||||
$wmsg = "你确信要删除文件:$filename 吗?"; | |||||
$wmsg = "您确信要删除文件:$filename 吗?"; | |||||
} | } | ||||
$win->AddTitle("删除文件确认"); | $win->AddTitle("删除文件确认"); | ||||
$win->AddMsgItem($wmsg, "50"); | $win->AddMsgItem($wmsg, "50"); | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: freelist_add.php 1 8:48 2010年7月13日Z tianya $ | * @version $Id: freelist_add.php 1 8:48 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: freelist_edit.php 1 8:48 2010年7月13日Z tianya $ | * @version $Id: freelist_edit.php 1 8:48 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -4,7 +4,7 @@ | |||||
* | * | ||||
* @version $Id: freelist_main.php 1 8:48 2010年7月13日Z tianya $ | * @version $Id: freelist_main.php 1 8:48 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -68,10 +68,10 @@ function GetTagList($dsql,$pageno,$pagesize,$orderby='aid') | |||||
$start = ($pageno-1) * $pagesize; | $start = ($pageno-1) * $pagesize; | ||||
$printhead ="<table width='98%' border='0' cellpadding='1' cellspacing='1' align='center' class='table maintable table-bordered' style='background:#cfcfcf;margin-bottom:5px;'> | $printhead ="<table width='98%' border='0' cellpadding='1' cellspacing='1' align='center' class='table maintable table-bordered' style='background:#cfcfcf;margin-bottom:5px;'> | ||||
<tr align='center' bgcolor='#FBFCE2'> | <tr align='center' bgcolor='#FBFCE2'> | ||||
<td width='5%' class='tbsname'><a href='#' onclick=\"ReloadPage('aid')\"><u>ID</u></a></td> | |||||
<td width='5%' class='tbsname'><a href='#' onclick=\"ReloadPage('aid')\">ID</a></td> | |||||
<td width='20%' class='tbsname'>列表名称</td> | <td width='20%' class='tbsname'>列表名称</td> | ||||
<td width='20%' class='tbsname'>模板文件</td> | <td width='20%' class='tbsname'>模板文件</td> | ||||
<td width='5%' class='tbsname'><a href='#' onclick=\"ReloadPage('click')\"><u>点击</u></a></td> | |||||
<td width='5%' class='tbsname'><a href='#' onclick=\"ReloadPage('click')\">点击</a></td> | |||||
<td width='15%' class='tbsname'>创建时间</td> | <td width='15%' class='tbsname'>创建时间</td> | ||||
<td class='tbsname'>管理</td> | <td class='tbsname'>管理</td> | ||||
</tr>\r\n"; | </tr>\r\n"; | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: friendlink_add.php 1 10:59 2010年7月13日Z tianya $ | * @version $Id: friendlink_add.php 1 10:59 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: friendlink_edit.php 1 10:59 2010年7月13日Z tianya $ | * @version $Id: friendlink_edit.php 1 10:59 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -24,7 +24,7 @@ if (isset($allid)) { | |||||
if ($dopost == "delete") { | if ($dopost == "delete") { | ||||
$id = preg_replace("#[^0-9]#", "", $id); | $id = preg_replace("#[^0-9]#", "", $id); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$id'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$id'"); | ||||
ShowMsg("成功删除一个链接!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功删除一个链接", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} else if ($dopost == "delall") { | } else if ($dopost == "delall") { | ||||
$aids = explode(',', $aids); | $aids = explode(',', $aids); | ||||
@@ -33,10 +33,10 @@ if ($dopost == "delete") { | |||||
$aid = preg_replace("#[^0-9]#", "", $aid); | $aid = preg_replace("#[^0-9]#", "", $aid); | ||||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$aid'"); | $dsql->ExecuteNoneQuery("DELETE FROM `#@__flink` WHERE id='$aid'"); | ||||
} | } | ||||
ShowMsg("成功删除指定链接!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功删除指定链接", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} else { | } else { | ||||
ShowMsg("你没选定任何链接!", $ENV_GOBACK_URL); | |||||
ShowMsg("您没选定任何链接", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
} else if ($dopost == "saveedit") { | } else if ($dopost == "saveedit") { | ||||
@@ -61,7 +61,7 @@ if ($dopost == "delete") { | |||||
$query = "UPDATE `#@__flink` SET sortrank='$sortrank',url='$url',webname='$webname',logo='$logo',msg='$msg', | $query = "UPDATE `#@__flink` SET sortrank='$sortrank',url='$url',webname='$webname',logo='$logo',msg='$msg', | ||||
email='$email',typeid='$typeid',ischeck='$ischeck' WHERE id='$id' "; | email='$email',typeid='$typeid',ischeck='$ischeck' WHERE id='$id' "; | ||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
ShowMsg("成功更改一个链接!", $ENV_GOBACK_URL); | |||||
ShowMsg("成功更改一个链接", $ENV_GOBACK_URL); | |||||
exit(); | exit(); | ||||
} | } | ||||
$myLink = $dsql->GetOne("SELECT #@__flink.*,#@__flinktype.typename FROM #@__flink LEFT JOIN #@__flinktype ON #@__flink.typeid=#@__flinktype.id WHERE #@__flink.id=$id"); | $myLink = $dsql->GetOne("SELECT #@__flink.*,#@__flinktype.typename FROM #@__flink LEFT JOIN #@__flinktype ON #@__flink.typeid=#@__flinktype.id WHERE #@__flink.id=$id"); | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: friendlink_main.php 1 8:48 2010年7月13日Z tianya $ | * @version $Id: friendlink_main.php 1 8:48 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: friendlink_type.php 1 8:48 2010年7月13日Z tianya $ | * @version $Id: friendlink_type.php 1 8:48 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -36,7 +36,7 @@ if ($dopost == "save") { | |||||
$dsql->ExecuteNoneQuery($query); | $dsql->ExecuteNoneQuery($query); | ||||
} | } | ||||
header("Content-Type: text/html; charset={$cfg_soft_lang}"); | header("Content-Type: text/html; charset={$cfg_soft_lang}"); | ||||
echo "<script> alert('成功更新友情链接网站分类表!'); </script>"; | |||||
echo "<script> alert('成功更新友情链接网站分类表'); </script>"; | |||||
} | } | ||||
include DedeInclude('templets/friendlink_type.htm'); | include DedeInclude('templets/friendlink_type.htm'); |
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: imagecut.php 1 11:06 2010年7月13日Z tianya $ | * @version $Id: imagecut.php 1 11:06 2010年7月13日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -13,7 +13,7 @@ require_once(dirname(__FILE__) . '/config.php'); | |||||
$action = isset($action) ? trim($action) : ''; | $action = isset($action) ? trim($action) : ''; | ||||
if (empty($action)) { | if (empty($action)) { | ||||
if (!@is_file($cfg_basedir.$file)) { | if (!@is_file($cfg_basedir.$file)) { | ||||
ShowMsg("对不起,必须选择站内的图片才能进行裁剪!<br />点击'<a href='./dialog/select_images.php?f=form1.picname&imgstick=small'>站内选择</a>', 上传或选择一个图片,然后才能进行裁剪!", "./dialog/select_images.php?f=form1.picname&imgstick=small", 0, 10000); | |||||
ShowMsg("对不起,必须选择站内的图片才能进行裁剪<br />点击'<a href='./dialog/select_images.php?f=form1.picname&imgstick=small'>站内选择</a>', 上传或选择一个图片,然后才能进行裁剪", "./dialog/select_images.php?f=form1.picname&imgstick=small", 0, 10000); | |||||
exit(); | exit(); | ||||
} | } | ||||
include DEDEADMIN.'/templets/imagecut.htm'; | include DEDEADMIN.'/templets/imagecut.htm'; | ||||
@@ -22,15 +22,15 @@ if (empty($action)) { | |||||
require_once(DEDEINC.'/image.func.php'); | require_once(DEDEINC.'/image.func.php'); | ||||
if (!@is_file($cfg_basedir.$file)) { | if (!@is_file($cfg_basedir.$file)) { | ||||
ShowMsg('对不起,请重新选择裁剪图片!', '-1'); | |||||
ShowMsg('对不起,请重新选择裁剪图片', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($width)) { | if (empty($width)) { | ||||
ShowMsg('对不起,请选择裁剪图片的尺寸!', '-1'); | |||||
ShowMsg('对不起,请选择裁剪图片的尺寸', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (empty($height)) { | if (empty($height)) { | ||||
ShowMsg('对不起,请选择裁剪图片的尺寸!', '-1'); | |||||
ShowMsg('对不起,请选择裁剪图片的尺寸', '-1'); | |||||
exit(); | exit(); | ||||
} | } | ||||
$imginfo = getimagesize($cfg_basedir.$file); | $imginfo = getimagesize($cfg_basedir.$file); | ||||
@@ -54,7 +54,7 @@ if (empty($action)) { | |||||
$source = imagecreatefrompng($srcFile); | $source = imagecreatefrompng($srcFile); | ||||
break; | break; | ||||
default: | default: | ||||
ShowMsg('对不起,裁剪图片类型不支持请选择其他类型图片!', '-1'); | |||||
ShowMsg('对不起,裁剪图片类型不支持请选择其他类型图片', '-1'); | |||||
break; | break; | ||||
} | } | ||||
@@ -87,7 +87,7 @@ if (empty($action)) { | |||||
imagepng($thumba, $ddpicokurl); | imagepng($thumba, $ddpicokurl); | ||||
break; | break; | ||||
default: | default: | ||||
ShowMsg("对不起,裁剪图片类型不支持请选择其他类型图片!", "-1"); | |||||
ShowMsg("对不起,裁剪图片类型不支持请选择其他类型图片", "-1"); | |||||
break; | break; | ||||
} | } | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: inc_action_info.php 2 14:55 2010-11-11 tianya $ | * @version $Id: inc_action_info.php 2 14:55 2010-11-11 tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -259,7 +259,7 @@ $actionSearch[6] = array( | |||||
), | ), | ||||
7 => array( | 7 => array( | ||||
'title' => '汇款账号设置', | 'title' => '汇款账号设置', | ||||
'description' => '银行付款的账号设置,用户可以查看到你的银行付款账号方便支付', | |||||
'description' => '银行付款的账号设置,用户可以查看到您的银行付款账号方便支付', | |||||
'purview' => 'sys_Data', | 'purview' => 'sys_Data', | ||||
'linkurl' => 'shops_bank.php' | 'linkurl' => 'shops_bank.php' | ||||
), | ), | ||||
@@ -425,7 +425,7 @@ $actionSearch[10] = array( | |||||
), | ), | ||||
9 => array( | 9 => array( | ||||
'title' => '随机模板设置', | 'title' => '随机模板设置', | ||||
'description' => '本设置仅适用于系统默认的文章模型,设置后发布文章时会自动按指定的模板随机获取一个,如果不想使用此功能,把它设置为空即可!', | |||||
'description' => '本设置仅适用于系统默认的文章模型,设置后发布文章时会自动按指定的模板随机获取一个,如果不想使用此功能,把它设置为空即可', | |||||
'purview' => 'sys_StringMix', | 'purview' => 'sys_StringMix', | ||||
'linkurl' => 'article_template_rand.php' | 'linkurl' => 'article_template_rand.php' | ||||
), | ), | ||||
@@ -443,7 +443,7 @@ $actionSearch[10] = array( | |||||
), | ), | ||||
14 => array( | 14 => array( | ||||
'title' => '病毒扫描[S]', | 'title' => '病毒扫描[S]', | ||||
'description' => '以DedeCMSV6开发模式为标准对现有的文件进行扫描并进行判断', | |||||
'description' => '以DedeBIZ开发模式为标准对现有的文件进行扫描并进行判断', | |||||
'purview' => 'sys_verifies', | 'purview' => 'sys_verifies', | ||||
'linkurl' => 'sys_safetest.php' | 'linkurl' => 'sys_safetest.php' | ||||
), | ), | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: inc_archives_all.php 1 9:56 2010年7月21日Z tianya $ | * @version $Id: inc_archives_all.php 1 9:56 2010年7月21日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -1,11 +1,10 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 文档操作相关函数 | * 文档操作相关函数 | ||||
* | * | ||||
* @version $Id: inc_archives_functions.php 1 9:56 2010年7月21日Z tianya $ | * @version $Id: inc_archives_functions.php 1 9:56 2010年7月21日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -18,7 +17,6 @@ $backurl = preg_match("#content_#", $backurl) ? "<a href='$backurl' class='btn b | |||||
if (!isset($_NOT_ARCHIVES)) { | if (!isset($_NOT_ARCHIVES)) { | ||||
require_once(DEDEINC.'/customfields.func.php'); | require_once(DEDEINC.'/customfields.func.php'); | ||||
} | } | ||||
/** | /** | ||||
* 获得HTML里的外部资源,针对图集 | * 获得HTML里的外部资源,针对图集 | ||||
* | * | ||||
@@ -58,10 +56,8 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) | |||||
} | } | ||||
$itype = substr($value, -4, 4); | $itype = substr($value, -4, 4); | ||||
if (!preg_match("#\.(gif|jpg|png)#", $itype)) $itype = ".jpg"; | if (!preg_match("#\.(gif|jpg|png)#", $itype)) $itype = ".jpg"; | ||||
$rndFileName = $imgPath.'/'.$milliSecond.'-'.$key.$itype; | $rndFileName = $imgPath.'/'.$milliSecond.'-'.$key.$itype; | ||||
$iurl = $imgUrl.'/'.$milliSecond.'-'.$key.$itype; | $iurl = $imgUrl.'/'.$milliSecond.'-'.$key.$itype; | ||||
//下载并保存文件 | //下载并保存文件 | ||||
$rs = DownImageKeep($value, $rfurl, $rndFileName, '', 0, 30); | $rs = DownImageKeep($value, $rfurl, $rndFileName, '', 0, 30); | ||||
if ($rs) { | if ($rs) { | ||||
@@ -92,7 +88,6 @@ function GetCurContentAlbum($body, $rfurl, &$firstdd) | |||||
} | } | ||||
return $rsimg; | return $rsimg; | ||||
} | } | ||||
/** | /** | ||||
* 获得文章body里的外部资源 | * 获得文章body里的外部资源 | ||||
* | * | ||||
@@ -108,7 +103,6 @@ function GetCurContent($body) | |||||
$basehost = "http://".$_SERVER["HTTP_HOST"]; | $basehost = "http://".$_SERVER["HTTP_HOST"]; | ||||
$img_array = array(); | $img_array = array(); | ||||
preg_match_all("/src=[\"|'|\s]([^\"|^\'|^\s]*?)/isU", $body, $img_array); | preg_match_all("/src=[\"|'|\s]([^\"|^\'|^\s]*?)/isU", $body, $img_array); | ||||
$img_array = array_unique($img_array[1]); | $img_array = array_unique($img_array[1]); | ||||
$imgUrl = $cfg_uploaddir.'/'.MyDate("ymd", time()); | $imgUrl = $cfg_uploaddir.'/'.MyDate("ymd", time()); | ||||
$imgPath = $cfg_basedir.$imgUrl; | $imgPath = $cfg_basedir.$imgUrl; | ||||
@@ -144,7 +138,6 @@ function GetCurContent($body) | |||||
$value = trim($value); | $value = trim($value); | ||||
$rndFileName = $imgPath.'/'.$milliSecondN.'-'.$key.$itype; | $rndFileName = $imgPath.'/'.$milliSecondN.'-'.$key.$itype; | ||||
$fileurl = $imgUrl.'/'.$milliSecondN.'-'.$key.$itype; | $fileurl = $imgUrl.'/'.$milliSecondN.'-'.$key.$itype; | ||||
$rs = $htd->SaveToBin($rndFileName); | $rs = $htd->SaveToBin($rndFileName); | ||||
if ($rs) { | if ($rs) { | ||||
$info = ''; | $info = ''; | ||||
@@ -166,7 +159,6 @@ function GetCurContent($body) | |||||
$htd->Close(); | $htd->Close(); | ||||
return $body; | return $body; | ||||
} | } | ||||
/** | /** | ||||
* 获取一个远程图片 | * 获取一个远程图片 | ||||
* | * | ||||
@@ -215,7 +207,6 @@ function GetRemoteImage($url, $uid = 0) | |||||
$htd->Close(); | $htd->Close(); | ||||
return ($ok ? $revalues : ''); | return ($ok ? $revalues : ''); | ||||
} | } | ||||
/** | /** | ||||
* 获取远程flash | * 获取远程flash | ||||
* | * | ||||
@@ -250,7 +241,6 @@ function GetRemoteFlash($url, $uid = 0) | |||||
$htd->Close(); | $htd->Close(); | ||||
return $revalues; | return $revalues; | ||||
} | } | ||||
/** | /** | ||||
* 检测频道ID | * 检测频道ID | ||||
* | * | ||||
@@ -263,12 +253,10 @@ function CheckChannel($typeid, $channelid) | |||||
{ | { | ||||
global $dsql; | global $dsql; | ||||
if ($typeid == 0) return TRUE; | if ($typeid == 0) return TRUE; | ||||
$row = $dsql->GetOne("SELECT ispart,channeltype FROM `#@__arctype` WHERE id='$typeid' "); | $row = $dsql->GetOne("SELECT ispart,channeltype FROM `#@__arctype` WHERE id='$typeid' "); | ||||
if ($row['ispart'] != 0 || $row['channeltype'] != $channelid) return FALSE; | if ($row['ispart'] != 0 || $row['channeltype'] != $channelid) return FALSE; | ||||
else return TRUE; | else return TRUE; | ||||
} | } | ||||
/** | /** | ||||
* 检测档案权限 | * 检测档案权限 | ||||
* | * | ||||
@@ -284,7 +272,6 @@ function CheckArcAdmin($aid, $adminid) | |||||
if ($row['mid'] != $adminid) return FALSE; | if ($row['mid'] != $adminid) return FALSE; | ||||
else return TRUE; | else return TRUE; | ||||
} | } | ||||
/** | /** | ||||
* 文档自动分页 | * 文档自动分页 | ||||
* | * | ||||
@@ -336,7 +323,6 @@ function SpLongBody($mybody, $spsize, $sptag) | |||||
} | } | ||||
return addslashes($mybody); | return addslashes($mybody); | ||||
} | } | ||||
/** | /** | ||||
* 创建指定ID的文档 | * 创建指定ID的文档 | ||||
* | * | ||||
@@ -355,7 +341,6 @@ function MakeArt($aid, $mkindex = FALSE, $ismakesign = FALSE, $isremote = 0) | |||||
$reurl = $arc->MakeHtml($isremote); | $reurl = $arc->MakeHtml($isremote); | ||||
return $reurl; | return $reurl; | ||||
} | } | ||||
/** | /** | ||||
* 取第一个图片为缩略图 | * 取第一个图片为缩略图 | ||||
* | * | ||||
@@ -375,7 +360,6 @@ function GetDDImgFromBody(&$body) | |||||
} | } | ||||
return $litpic; | return $litpic; | ||||
} | } | ||||
/** | /** | ||||
* 获得缩略图 | * 获得缩略图 | ||||
* | * | ||||
@@ -389,19 +373,17 @@ function GetDDImage($litpic, $picname, $isremote) | |||||
{ | { | ||||
global $cuserLogin, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir, $ddcfg_image_dir, $cfg_addon_savetype; | global $cuserLogin, $cfg_ddimg_width, $cfg_ddimg_height, $cfg_basedir, $ddcfg_image_dir, $cfg_addon_savetype; | ||||
$ntime = time(); | $ntime = time(); | ||||
if (($litpic != 'none' || $litpic != 'ddfirst') && | |||||
!empty($_FILES[$litpic]['tmp_name']) && is_uploaded_file($_FILES[$litpic]['tmp_name']) | |||||
if (($litpic != 'none' || $litpic != 'ddfirst') && !empty($_FILES[$litpic]['tmp_name']) && is_uploaded_file($_FILES[$litpic]['tmp_name']) | |||||
) { | ) { | ||||
//如果用户自行上传缩略图 | //如果用户自行上传缩略图 | ||||
$istype = 0; | $istype = 0; | ||||
$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png"); | $sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png"); | ||||
$_FILES[$litpic]['type'] = strtolower(trim($_FILES[$litpic]['type'])); | $_FILES[$litpic]['type'] = strtolower(trim($_FILES[$litpic]['type'])); | ||||
if (!in_array($_FILES[$litpic]['type'], $sparr)) { | if (!in_array($_FILES[$litpic]['type'], $sparr)) { | ||||
ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); | |||||
ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
$savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | $savepath = $ddcfg_image_dir.'/'.MyDate($cfg_addon_savetype, $ntime); | ||||
CreateDir($savepath); | CreateDir($savepath); | ||||
$fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | $fullUrl = $savepath.'/'.dd2char(MyDate('mdHis', $ntime).$cuserLogin->getUserID().mt_rand(1000, 9999)); | ||||
if (strtolower($_FILES[$litpic]['type']) == "image/gif") { | if (strtolower($_FILES[$litpic]['type']) == "image/gif") { | ||||
@@ -411,21 +393,16 @@ function GetDDImage($litpic, $picname, $isremote) | |||||
} else { | } else { | ||||
$fullUrl = $fullUrl.".jpg"; | $fullUrl = $fullUrl.".jpg"; | ||||
} | } | ||||
@move_uploaded_file($_FILES[$litpic]['tmp_name'], $cfg_basedir.$fullUrl); | @move_uploaded_file($_FILES[$litpic]['tmp_name'], $cfg_basedir.$fullUrl); | ||||
$litpic = $fullUrl; | $litpic = $fullUrl; | ||||
if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir.$fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); | if ($GLOBALS['cfg_ddimg_full'] == 'Y') @ImageResizeNew($cfg_basedir.$fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); | ||||
else @ImageResize($cfg_basedir.$fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); | else @ImageResize($cfg_basedir.$fullUrl, $cfg_ddimg_width, $cfg_ddimg_height); | ||||
$img = $cfg_basedir.$litpic; | $img = $cfg_basedir.$litpic; | ||||
} else { | } else { | ||||
$picname = trim($picname); | $picname = trim($picname); | ||||
if ($isremote == 1 && preg_match("#^http:\/\/#i", $picname)) { | if ($isremote == 1 && preg_match("#^http:\/\/#i", $picname)) { | ||||
$litpic = $picname; | $litpic = $picname; | ||||
$ddinfos = GetRemoteImage($litpic, $cuserLogin->getUserID()); | $ddinfos = GetRemoteImage($litpic, $cuserLogin->getUserID()); | ||||
if (!is_array($ddinfos)) { | if (!is_array($ddinfos)) { | ||||
$litpic = ''; | $litpic = ''; | ||||
} else { | } else { | ||||
@@ -451,7 +428,6 @@ function GetDDImage($litpic, $picname, $isremote) | |||||
if ($litpic == 'litpic' || $litpic == 'ddfirst') $litpic = ''; | if ($litpic == 'litpic' || $litpic == 'ddfirst') $litpic = ''; | ||||
return $litpic; | return $litpic; | ||||
} | } | ||||
/** | /** | ||||
* 获得一个附加表单 | * 获得一个附加表单 | ||||
* | * | ||||
@@ -463,7 +439,6 @@ function GetFormItemA($ctag) | |||||
{ | { | ||||
return GetFormItem($ctag, 'admin'); | return GetFormItem($ctag, 'admin'); | ||||
} | } | ||||
/** | /** | ||||
* 处理不同类型的数据 | * 处理不同类型的数据 | ||||
* | * | ||||
@@ -479,7 +454,6 @@ function GetFieldValueA($dvalue, $dtype, $aid = 0, $job = 'add', $addvar = '') | |||||
{ | { | ||||
return GetFieldValue($dvalue, $dtype, $aid, $job, $addvar, 'admin'); | return GetFieldValue($dvalue, $dtype, $aid, $job, $addvar, 'admin'); | ||||
} | } | ||||
/** | /** | ||||
* 获得带值的表单(编辑时用) | * 获得带值的表单(编辑时用) | ||||
* | * | ||||
@@ -492,7 +466,6 @@ function GetFormItemValueA($ctag, $fvalue) | |||||
{ | { | ||||
return GetFormItemValue($ctag, $fvalue, 'admin'); | return GetFormItemValue($ctag, $fvalue, 'admin'); | ||||
} | } | ||||
/** | /** | ||||
* 载入自定义表单(用于发布) | * 载入自定义表单(用于发布) | ||||
* | * | ||||
@@ -510,8 +483,7 @@ function PrintAutoFieldsAdd($fieldset, $loadtype = 'all') | |||||
if (is_array($dtp->CTags)) { | if (is_array($dtp->CTags)) { | ||||
foreach ($dtp->CTags as $tid => $ctag) { | foreach ($dtp->CTags as $tid => $ctag) { | ||||
if ( | if ( | ||||
$loadtype != 'autofield' | |||||
|| ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) | |||||
$loadtype != 'autofield' || ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) | |||||
) { | ) { | ||||
$dede_addonfields .= ($dede_addonfields == "" ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type')); | $dede_addonfields .= ($dede_addonfields == "" ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type')); | ||||
echo GetFormItemA($ctag); | echo GetFormItemA($ctag); | ||||
@@ -520,7 +492,6 @@ function PrintAutoFieldsAdd($fieldset, $loadtype = 'all') | |||||
} | } | ||||
echo "<input type='hidden' name='dede_addonfields' value=\"".$dede_addonfields."\">\r\n"; | echo "<input type='hidden' name='dede_addonfields' value=\"".$dede_addonfields."\">\r\n"; | ||||
} | } | ||||
/** | /** | ||||
* 载入自定义表单(用于编辑) | * 载入自定义表单(用于编辑) | ||||
* | * | ||||
@@ -539,8 +510,7 @@ function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all') | |||||
if (is_array($dtp->CTags)) { | if (is_array($dtp->CTags)) { | ||||
foreach ($dtp->CTags as $tid => $ctag) { | foreach ($dtp->CTags as $tid => $ctag) { | ||||
if ( | if ( | ||||
$loadtype != 'autofield' | |||||
|| ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) | |||||
$loadtype != 'autofield' || ($loadtype == 'autofield' && $ctag->GetAtt('autofield') == 1) | |||||
) { | ) { | ||||
$dede_addonfields .= ($dede_addonfields == '' ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type')); | $dede_addonfields .= ($dede_addonfields == '' ? $ctag->GetName().",".$ctag->GetAtt('type') : ";".$ctag->GetName().",".$ctag->GetAtt('type')); | ||||
echo GetFormItemValueA($ctag, $fieldValues[$ctag->GetName()]); | echo GetFormItemValueA($ctag, $fieldValues[$ctag->GetName()]); | ||||
@@ -549,8 +519,6 @@ function PrintAutoFieldsEdit(&$fieldset, &$fieldValues, $loadtype = 'all') | |||||
} | } | ||||
echo "<input type='hidden' name='dede_addonfields' value=\"".$dede_addonfields."\">\r\n"; | echo "<input type='hidden' name='dede_addonfields' value=\"".$dede_addonfields."\">\r\n"; | ||||
} | } | ||||
/** | /** | ||||
* 处理HTML文本 | * 处理HTML文本 | ||||
* 删除非站外链接、自动摘要、自动获取缩略图 | * 删除非站外链接、自动摘要、自动获取缩略图 | ||||
@@ -569,12 +537,10 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' | |||||
global $cfg_bizcore_appid, $cfg_bizcore_key, $cfg_bizcore_hostname, $cfg_bizcore_port; | global $cfg_bizcore_appid, $cfg_bizcore_key, $cfg_bizcore_hostname, $cfg_bizcore_port; | ||||
$autolitpic = (empty($autolitpic) ? '' : $autolitpic); | $autolitpic = (empty($autolitpic) ? '' : $autolitpic); | ||||
$body = stripslashes($body); | $body = stripslashes($body); | ||||
//远程图片本地化 | //远程图片本地化 | ||||
if ($remote == 1) { | if ($remote == 1) { | ||||
$body = GetCurContent($body); | $body = GetCurContent($body); | ||||
} | } | ||||
//删除非站内链接 | //删除非站内链接 | ||||
if ($dellink == 1) { | if ($dellink == 1) { | ||||
$allow_urls = array($_SERVER['HTTP_HOST']); | $allow_urls = array($_SERVER['HTTP_HOST']); | ||||
@@ -584,21 +550,18 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' | |||||
} | } | ||||
$body = Replace_Links($body, $allow_urls); | $body = Replace_Links($body, $allow_urls); | ||||
} | } | ||||
//自动摘要 | //自动摘要 | ||||
if ($description == '' && $cfg_auot_description > 0) { | if ($description == '' && $cfg_auot_description > 0) { | ||||
$description = cn_substr(html2text($body), $cfg_auot_description); | $description = cn_substr(html2text($body), $cfg_auot_description); | ||||
$description = trim(preg_replace('/#p#|#e#/', '', $description)); | $description = trim(preg_replace('/#p#|#e#/', '', $description)); | ||||
$description = addslashes($description); | $description = addslashes($description); | ||||
} | } | ||||
//自动获取缩略图 | //自动获取缩略图 | ||||
if ($autolitpic == 1 && $litpic == '') { | if ($autolitpic == 1 && $litpic == '') { | ||||
$litpic = GetDDImgFromBody($body); | $litpic = GetDDImgFromBody($body); | ||||
} | } | ||||
//自动获取关键字 | //自动获取关键字 | ||||
if ($autokey == 1 && $keywords == '') { | |||||
if ($autokey == 2 && $keywords == '') { | |||||
$subject = $title; | $subject = $title; | ||||
$message = $body; | $message = $body; | ||||
// 采用DedeBIZ Core分词组件分词 | // 采用DedeBIZ Core分词组件分词 | ||||
@@ -620,7 +583,6 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' | |||||
$sp->SetSource(Html2Text($message), $cfg_soft_lang, $cfg_soft_lang); | $sp->SetSource(Html2Text($message), $cfg_soft_lang, $cfg_soft_lang); | ||||
$sp->StartAnalysis(); | $sp->StartAnalysis(); | ||||
$allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); | $allindexs = preg_replace("/#p#|#e#/", '', $sp->GetFinallyIndex()); | ||||
if (is_array($allindexs) && is_array($titleindexs)) { | if (is_array($allindexs) && is_array($titleindexs)) { | ||||
foreach ($titleindexs as $k => $v) { | foreach ($titleindexs as $k => $v) { | ||||
if (strlen($keywords.$k) >= 60) { | if (strlen($keywords.$k) >= 60) { | ||||
@@ -646,7 +608,6 @@ function AnalyseHtmlBody($body, &$description, &$litpic, &$keywords, $dtype = '' | |||||
$body = addslashes($body); | $body = addslashes($body); | ||||
return $body; | return $body; | ||||
} | } | ||||
/** | /** | ||||
* 删除非站内链接 | * 删除非站内链接 | ||||
* | * | ||||
@@ -681,7 +642,6 @@ function Replace_Links(&$body, $allow_urls = array()) | |||||
$arr = $rparr = $tgarr = ''; | $arr = $rparr = $tgarr = ''; | ||||
return $body; | return $body; | ||||
} | } | ||||
/** | /** | ||||
* 图集里大图的小图 | * 图集里大图的小图 | ||||
* | * | ||||
@@ -696,10 +656,8 @@ function GetImageMapDD($filename, $maxwidth) | |||||
$ddn = substr($filename, -3); | $ddn = substr($filename, -3); | ||||
$ddpicok = preg_replace("#\.".$ddn."$#", "-lp.".$ddn, $filename); | $ddpicok = preg_replace("#\.".$ddn."$#", "-lp.".$ddn, $filename); | ||||
$toFile = $GLOBALS['cfg_basedir'].$ddpicok; | $toFile = $GLOBALS['cfg_basedir'].$ddpicok; | ||||
if ($cfg_ddimg_full == 'Y') ImageResizeNew($GLOBALS['cfg_basedir'].$filename, $maxwidth, $cfg_ddimg_height, $toFile); | if ($cfg_ddimg_full == 'Y') ImageResizeNew($GLOBALS['cfg_basedir'].$filename, $maxwidth, $cfg_ddimg_height, $toFile); | ||||
else ImageResize($GLOBALS['cfg_basedir'].$filename, $maxwidth, $cfg_ddimg_height, $toFile); | else ImageResize($GLOBALS['cfg_basedir'].$filename, $maxwidth, $cfg_ddimg_height, $toFile); | ||||
//保存图片附件信息 | //保存图片附件信息 | ||||
$fsize = filesize($toFile); | $fsize = filesize($toFile); | ||||
$ddpicoks = explode('/', $ddpicok); | $ddpicoks = explode('/', $ddpicok); | ||||
@@ -709,11 +667,8 @@ function GetImageMapDD($filename, $maxwidth) | |||||
$dsql->ExecuteNoneQuery($inquery); | $dsql->ExecuteNoneQuery($inquery); | ||||
$fid = $dsql->GetLastID(); | $fid = $dsql->GetLastID(); | ||||
AddMyAddon($fid, $ddpicok); | AddMyAddon($fid, $ddpicok); | ||||
return $ddpicok; | return $ddpicok; | ||||
} | } | ||||
/** | /** | ||||
* 上传一个未经处理的图片 | * 上传一个未经处理的图片 | ||||
* | * | ||||
@@ -734,14 +689,13 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||||
$filename = ''; | $filename = ''; | ||||
$isrm_up = FALSE; | $isrm_up = FALSE; | ||||
$handurl = trim($handurl); | $handurl = trim($handurl); | ||||
//如果用户自行上传了图片 | //如果用户自行上传了图片 | ||||
if (!empty($_FILES[$upname]['tmp_name']) && is_uploaded_file($_FILES[$upname]['tmp_name'])) { | if (!empty($_FILES[$upname]['tmp_name']) && is_uploaded_file($_FILES[$upname]['tmp_name'])) { | ||||
$istype = 0; | $istype = 0; | ||||
$sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png"); | $sparr = array("image/pjpeg", "image/jpeg", "image/gif", "image/png"); | ||||
$_FILES[$upname]['type'] = strtolower(trim($_FILES[$upname]['type'])); | $_FILES[$upname]['type'] = strtolower(trim($_FILES[$upname]['type'])); | ||||
if (!in_array($_FILES[$upname]['type'], $sparr)) { | if (!in_array($_FILES[$upname]['type'], $sparr)) { | ||||
ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种!", "-1"); | |||||
ShowMsg("上传的图片格式错误,请使用JPEG、GIF、PNG格式的其中一种", "-1"); | |||||
exit(); | exit(); | ||||
} | } | ||||
if (!empty($handurl) && !preg_match("#^http:\/\/#i", $handurl) && file_exists($cfg_basedir.$handurl)) { | if (!empty($handurl) && !preg_match("#^http:\/\/#i", $handurl) && file_exists($cfg_basedir.$handurl)) { | ||||
@@ -762,22 +716,18 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||||
} else { | } else { | ||||
$fullUrl = $fullUrl.".jpg"; | $fullUrl = $fullUrl.".jpg"; | ||||
} | } | ||||
//保存 | //保存 | ||||
@move_uploaded_file($_FILES[$upname]['tmp_name'], $cfg_basedir.$fullUrl); | @move_uploaded_file($_FILES[$upname]['tmp_name'], $cfg_basedir.$fullUrl); | ||||
$filename = $fullUrl; | $filename = $fullUrl; | ||||
//水印 | //水印 | ||||
@WaterImg($cfg_basedir.$fullUrl, 'up'); | @WaterImg($cfg_basedir.$fullUrl, 'up'); | ||||
$isrm_up = TRUE; | $isrm_up = TRUE; | ||||
} | } | ||||
//远程或选择本地图片 | //远程或选择本地图片 | ||||
else { | else { | ||||
if ($handurl == '') { | if ($handurl == '') { | ||||
return ''; | return ''; | ||||
} | } | ||||
//远程图片并要求本地化 | //远程图片并要求本地化 | ||||
if ($isremote == 1 && preg_match("#^http[s]?:\/\/#i", $handurl)) { | if ($isremote == 1 && preg_match("#^http[s]?:\/\/#i", $handurl)) { | ||||
$ddinfos = GetRemoteImage($handurl, $cuserLogin->getUserID()); | $ddinfos = GetRemoteImage($handurl, $cuserLogin->getUserID()); | ||||
@@ -787,7 +737,6 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||||
$filename = $ddinfos[0]; | $filename = $ddinfos[0]; | ||||
} | } | ||||
$isrm_up = TRUE; | $isrm_up = TRUE; | ||||
//本地图片或远程不要求本地化 | //本地图片或远程不要求本地化 | ||||
} else { | } else { | ||||
$filename = $handurl; | $filename = $handurl; | ||||
@@ -797,17 +746,14 @@ function UploadOneImage($upname, $handurl = '', $isremote = 1, $ntitle = '') | |||||
if (is_file($imgfile) && $isrm_up && $filename != '') { | if (is_file($imgfile) && $isrm_up && $filename != '') { | ||||
$info = ""; | $info = ""; | ||||
$imginfos = GetImageSize($imgfile, $info); | $imginfos = GetImageSize($imgfile, $info); | ||||
//把新上传的图片信息保存到媒体文档管理档案中 | //把新上传的图片信息保存到媒体文档管理档案中 | ||||
$inquery = " | $inquery = " | ||||
INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | INSERT INTO `#@__uploads`(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | ||||
VALUES ('$title','$filename','1','" . $imginfos[0] . "','" . $imginfos[1] . "','0','" . filesize($imgfile) . "','" . time() . "','" . $cuserLogin->getUserID() . "'); | |||||
"; | |||||
VALUES ('$title','$filename','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".time()."','".$cuserLogin->getUserID()."');"; | |||||
$dsql->ExecuteNoneQuery($inquery); | $dsql->ExecuteNoneQuery($inquery); | ||||
} | } | ||||
return $filename; | return $filename; | ||||
} | } | ||||
/** | /** | ||||
* 获取更新测试信息 | * 获取更新测试信息 | ||||
* | * | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: inc_batchup.php 1 10:32 2010年7月21日Z tianya $ | * @version $Id: inc_batchup.php 1 10:32 2010年7月21日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: inc_catalog_options.php 1 10:32 2010年7月21日Z tianya $ | * @version $Id: inc_catalog_options.php 1 10:32 2010年7月21日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -5,7 +5,7 @@ | |||||
* | * | ||||
* @version $Id: inc_coonepage.php 1 10:32 2010年7月21日Z tianya $ | * @version $Id: inc_coonepage.php 1 10:32 2010年7月21日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
@@ -1,18 +1,16 @@ | |||||
<?php | <?php | ||||
/** | /** | ||||
* 列表对应函数 | * 列表对应函数 | ||||
* | * | ||||
* @version $Id: inc_list_functions.php 1 10:32 2010年7月21日Z tianya $ | * @version $Id: inc_list_functions.php 1 10:32 2010年7月21日Z tianya $ | ||||
* @package DedeBIZ.Administrator | * @package DedeBIZ.Administrator | ||||
* @copyright Copyright (c) 2021, DedeBIZ.COM | |||||
* @copyright Copyright (c) 2022, DedeBIZ.COM | |||||
* @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
* @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
*/ | */ | ||||
if (!isset($registerGlobals)) { | if (!isset($registerGlobals)) { | ||||
require_once(dirname(__FILE__)."/../../include/common.inc.php"); | require_once(dirname(__FILE__)."/../../include/common.inc.php"); | ||||
} | } | ||||
// 获取栏目名称 | // 获取栏目名称 | ||||
function GetTypename($tid) | function GetTypename($tid) | ||||
{ | { | ||||
@@ -32,14 +30,12 @@ function GetTypename($tid) | |||||
} | } | ||||
return ''; | return ''; | ||||
} | } | ||||
//获得是否推荐的表述 | //获得是否推荐的表述 | ||||
$arcatts = array(); | $arcatts = array(); | ||||
$dsql->Execute('n', 'SELECT * FROM `#@__arcatt` '); | $dsql->Execute('n', 'SELECT * FROM `#@__arcatt` '); | ||||
while ($arr = $dsql->GetArray('n')) { | while ($arr = $dsql->GetArray('n')) { | ||||
$arcatts[$arr['att']] = $arr['attname']; | $arcatts[$arr['att']] = $arr['attname']; | ||||
} | } | ||||
function IsCommendArchives($iscommend) | function IsCommendArchives($iscommend) | ||||
{ | { | ||||
global $arcatts; | global $arcatts; | ||||
@@ -50,19 +46,13 @@ function IsCommendArchives($iscommend) | |||||
} | } | ||||
$sn = trim($sn); | $sn = trim($sn); | ||||
if ($sn == '') return ''; | if ($sn == '') return ''; | ||||
else return "[<font color='red'>$sn</font>]"; | |||||
else return "<span style='color:#dc3545'>[$sn]</span>"; | |||||
} | } | ||||
//获得推荐的标题 | //获得推荐的标题 | ||||
function GetCommendTitle($title, $iscommend) | function GetCommendTitle($title, $iscommend) | ||||
{ | { | ||||
/*if(preg_match('#c#i',$iscommend)) | |||||
{ | |||||
$title = "$title<font color='red'>(推荐)</font>"; | |||||
}*/ | |||||
return $title; | return $title; | ||||
} | } | ||||
//更换颜色 | //更换颜色 | ||||
$GLOBALS['RndTrunID'] = 1; | $GLOBALS['RndTrunID'] = 1; | ||||
function GetColor($color1, $color2) | function GetColor($color1, $color2) | ||||
@@ -74,7 +64,6 @@ function GetColor($color1, $color2) | |||||
return $color2; | return $color2; | ||||
} | } | ||||
} | } | ||||
//检查图片是否存在 | //检查图片是否存在 | ||||
function CheckPic($picname) | function CheckPic($picname) | ||||
{ | { | ||||
@@ -84,7 +73,6 @@ function CheckPic($picname) | |||||
return "images/dfpic.gif"; | return "images/dfpic.gif"; | ||||
} | } | ||||
} | } | ||||
//判断内容是否生成HTML | //判断内容是否生成HTML | ||||
function IsHtmlArchives($ismake) | function IsHtmlArchives($ismake) | ||||
{ | { | ||||
@@ -93,10 +81,9 @@ function IsHtmlArchives($ismake) | |||||
} else if ($ismake == -1) { | } else if ($ismake == -1) { | ||||
return "仅动态"; | return "仅动态"; | ||||
} else { | } else { | ||||
return "<font color='red'>未生成</font>"; | |||||
return "<span style='color:#dc3545'>未生成</span>"; | |||||
} | } | ||||
} | } | ||||
//获得内容的限定级别名称 | //获得内容的限定级别名称 | ||||
function GetRankName($arcrank) | function GetRankName($arcrank) | ||||
{ | { | ||||
@@ -114,12 +101,11 @@ function GetRankName($arcrank) | |||||
return "不限"; | return "不限"; | ||||
} | } | ||||
} | } | ||||
//判断内容是否为图片文章 | //判断内容是否为图片文章 | ||||
function IsPicArchives($picname) | function IsPicArchives($picname) | ||||
{ | { | ||||
if ($picname != '') { | if ($picname != '') { | ||||
return '<font color=\'red\'>(图)</font>'; | |||||
return "<span style='color:#dc3545'>[图]</span>"; | |||||
} else { | } else { | ||||
return ''; | return ''; | ||||
} | } |