@@ -0,0 +1 @@ | |||
.DS_Store |
@@ -1,2 +1,66 @@ | |||
# DedeCMSv5 | |||
DedeCMS v5 | |||
国内专业的PHP网站内容管理系统-织梦内容管理系统 | |||
## 平台需求 | |||
1.Windows 平台 | |||
IIS/Apache/Nginx + PHP4/PHP5.2+/PHP5.3+ + MySQL4/5 | |||
如果在windows环境中使用,建议用DedeCMS提供的DedeAMPZ套件以达到最佳使用性能。 | |||
2.Linux/Unix 平台 | |||
Apache + PHP4/PHP5 + MySQL3/4/5 (PHP必须在非安全模式下运行) | |||
建议使用平台:Linux + Apache2.2 + PHP5.2/PHP5.3 + MySQL5.0 | |||
3.PHP必须环境或启用的系统函数 | |||
allow_url_fopen | |||
GD扩展库 | |||
MySQL扩展库 | |||
系统函数 —— phpinfo、dir | |||
4.基本目录结构 | |||
``` | |||
/ | |||
..../install 安装程序目录,安装完后可删除[安装时必须有可写入权限] | |||
..../dede 默认后台管理目录(可任意改名) | |||
..../include 类库文件目录 | |||
..../plus 附助程序目录 | |||
..../member 会员目录 | |||
..../images 系统默认模板图片存放目录 | |||
..../uploads 默认上传目录[必须可写入] | |||
..../a 默认HTML文件存放目录[必须可写入] | |||
..../templets 系统默认内核模板目录 | |||
..../data 系统缓存或其它可写入数据存放目录[必须可写入] | |||
..../special 专题目录[生成一次专题后可以删除special/index.php,必须可写入] | |||
``` | |||
5.PHP环境容易碰到的不兼容性问题 | |||
* data目录没写入权限,导致系统session无法使用,这将导致无法登录管理后台(直接表现为验证码不能正常显示); | |||
* php的上传的临时文件夹没设置好或没写入权限,这会导致文件上传的功能无法使用; | |||
* 出现莫名的错误,如安装时显示空白,这样能是由于系统没装载mysql扩展导致的,对于初级用户,可以下载dede的php套件包,以方便简单的使用。 | |||
## 程序安装使用 | |||
1.下载程序解压到本地目录; | |||
2.上传程序目录中的/uploads到网站根目录 | |||
3.运行http://www.yourname.com/install/index.php(yourname表示你的域名),按照安装提速说明进行程序安装 | |||
## 版权信息 | |||
详细参考:DedeCMS [最终用户授权协议](./docs/license.txt) | |||
## 相关资源 | |||
DedeCMS官方主站 www.dedecms.com | |||
织梦维基 docs.dedecms.com | |||
客服中心 service.dedecms.com | |||
技术支持论坛 bbs.dedecms.com | |||
上海卓卓网络科技 www.desdev.cn |
@@ -0,0 +1,131 @@ | |||
--------------------------------------- | |||
| DedeCMS V5.7SP1增强或修正功能列表 | | |||
--------------------------------------- | |||
[√]修正由于数据库类导致后台备份无法正常备份数据内容的错误; | |||
[√]修复更改data目录导致验证码无法正常显示的错误; | |||
[√]编辑器相关功能更新: | |||
1.编辑器升级到CKEditor最新版本3.6.2; | |||
2.软件发布描述内容编辑器增加图片附件选取按钮; | |||
3.编辑器中增加附件发布; | |||
4.编辑器取消自动分段,更改输入换行、排段落模式,修正某些浏览器中增加空段落的BUG; | |||
5.编辑器中增加附件发布; | |||
6.内容发布器增加多图上传插件,使文档编辑多图发布更轻松; | |||
[√]安全检测排除系统几个新增的文件; | |||
[√]修复会员模型图片字段无法保存的bug; | |||
[√]修复重复文章标题在一些浏览器中位置显示错误的问题; | |||
[√]文档评论功能优化: | |||
1.评论改用UBB编辑器模式,增加设定字体样式、大小、表情等; | |||
2.评论引用将采用AJAX的方式,增强用户体验; | |||
3.加强评论过滤内容显示,强制转义html标签内容; | |||
4.完善评论盖楼功能,增强用户体验,采用AJAX优化交互效果; | |||
[√]修复会员空间默认风格留言缺少标题字段的错误; | |||
[√]修正系统环境检测变量大小写导致Linux平台下可能无法正常使用的错误; | |||
[√]优化分词,增大head使字符串重复几率减小,读取词时减少数据量; | |||
[√]修正广告模块无法正常投放js广告的错误; | |||
[√]增加交叉栏目支持显示副栏目信息; | |||
[√]修正友情链接编辑上传图片无效的BUG; | |||
[√]优化缓存小助手,增加文件缓存周期为0时表示不超限; | |||
[√]互动digg增加缓存,通过缓存间隔更新次数来提升系统负载,设置数值后不建议再设回为0,可能会出现点击数回档情况; | |||
[√]arclist标签支持顶、踩排序; | |||
[√]修正全局检索时间间隔无效的BUG; | |||
[√]问答模块功能更新: | |||
1.问答模块,优化会员中心问答查看列表方式; | |||
2.问答模块增加游客访问的设置; | |||
3.修正问答模块Lurd类由于大小写无法正常初始化的问题; | |||
[√]修正匿名回复功能无法正常使用的错误; | |||
[√]增强文件检测功能,对js进行扫描,建议所有全局应用js更改为不可写权限; | |||
[√]修正采集无法获取某些页面描述、关键词的错误; | |||
[√]圈子模块功能更新: | |||
1.圈子中发帖更换为UBB编辑器,完善互动体验; | |||
2.修正圈子的一个过滤不严谨导致的XSS漏洞; | |||
[√]增加是否允许匿名评论的设置; | |||
[√]文章发布器增加多图发布功能,让网站编辑更为轻松方便; | |||
[√]默认安装关闭sphinx、memcache服务; | |||
[√]修复一键更新全站首页生成模式判断无效的BUG; | |||
[√]完善单页文档编辑预览模式,更改为动态预览; | |||
[√]数据库类错误日志增加时间记录便于系统调试; | |||
[√]修正系统request类关于上传文件判断无效的BUG; | |||
[√]修正系统request类校验文件后缀名无效的BUG; | |||
[√]修复页数判断错误导致无法正常采集第二页的错误; | |||
[√]未审核文档也能够浏览的问题,更改为仅会员及后台浏览时能够查看; | |||
[√]修改LURD类获取当前地址方法,防止导致某些操作分页错误; | |||
[√]修复会员模型及内容模型定制图片、附件字段可能会无法正常使用的错误; | |||
[√]优化分词,增大head使字符串重复几率减小,读取词时减少数据量; | |||
[√]搜索时间间隔功能无效BUG的修复; | |||
[√]会员投稿仅会员自己和管理员才能够查看; | |||
[√]安全检测功能,增加上对全局控制的JS文件的只读属性建议; | |||
[√]修正采集内容分页无法获取完整内容的BUG; | |||
[√]后台增加换肤功能,管理界面支持自己设定界面样式; | |||
[√]获取在线模块列表进行缓存,更改为半小时请求一次; | |||
[√]修正模块安装、卸载在火狐下无法同步左侧菜单的错误; | |||
[√]修正会员动态第二页管理错误的BUG; | |||
更多更新请查阅:http://bbs.dedecms.com/406899.html | |||
------------------------------------- | |||
| DedeCMS V5.7增强或修正功能列表 | | |||
------------------------------------- | |||
说明: 为已经升级或修正的功能 表示需多处同时处理的复杂功能或待验证功能 | |||
[更新] | |||
[√]针对PHP5.3进行兼容性调整,让其完美支持PHP5.3/5.2/4; | |||
[√]支持三级联动,更新地区联动,使其变为省-市-县三级联动; | |||
[√]将函数包分离成小助手(helper)的形式,便于函数自定义扩展; | |||
[√]数据自动化操作类,让数据管理及二次开发变得尤为简单; | |||
[√]调整程序安装包,使得安装过程更简洁快速; | |||
[√]升级系统分词组件,分词采用序列化字符串,不用占大内存也可以轻松分词; | |||
[√]增加首页浏览模式,分为静态浏览模式和动态两种; | |||
[√]加强{dede:sql}标签,能够调用其他数据库服务器信息,这样便于CMS调用pw/dz这些互动程序; | |||
[√]加强后台病毒扫描功能,用户可以自定义扫描病毒文件类型及特征; | |||
[√]优化后台内容管理性能,使得数量较多的栏目/内容管理轻松方便; | |||
[√]系统采集增加分页列表自定义规则功能,可以自己定义内容分页规则; | |||
[√]会员中心内容提交增加hash校验,以防表单被篡改或伪造; | |||
[√]系统JS框架逐渐采用jQuery取代,并且对后台操作做一些优化; | |||
[√]增加对MySQLi的支持; | |||
[√]升级用户安全中心木马木马自检程序; | |||
[√]增加LURD数据库自动操作类,二次开发更加方便快捷; | |||
[√]增加对sphinx全文检索的支持; | |||
[√]架构升级,逐步将功能调整为流行的MVC架构模式,模块进一步分离,让二次开发更简单; | |||
[√]编辑器调整,支持最新CKEditor,同时兼容老版本的FCKeditor; | |||
[√]淘宝客平台改版; | |||
·重构淘宝客平台,启用缓存,解决api限制的问题; | |||
·增加短地址服务,让淘宝客用户通过短地址轻松推广淘宝客产品;(尚为增值) | |||
[√]问答模块/客服中心(service.dedecms.com)升级; | |||
1.重构问答模块,采用模块MVC架构进行重构; | |||
2.问答模块支持伪静态设置; | |||
3.重新设计问答模块前台界面,新界面同系统整体界面一致; | |||
4.客服中心采用新版问答模块改版; | |||
5.问答模块增加对二级域名的支持; | |||
[√]升级用户评论部分功能,支持评论回复及盖楼; | |||
[√]友情链接支持flinktype调用类型,并且支持嵌套,具体可参看默认模板首页 | |||
[√]发布内容支持绑定投票,并且选择在对应内容中显示; | |||
[√]增加{dede:json/}数据标签,能够兼容远程调用json数据推送到CMS系统; | |||
[√]更新模板标签手册及数据库词典; | |||
[√]增加默认广告位,站长可以轻松设定自己站点的广告位来赚钱; | |||
[√]浏览器兼容调整,兼容IE6/7/8,Firefox(火狐),Chrome主流浏览器; | |||
[√]首页支持动态浏览(仅适合内容较少需要实时更新的情况); | |||
[√]系统后台登陆界面样式更改,系统后台整体样式进行调整,新版更为简洁清爽; | |||
[√]调整安装程序演示数据包; | |||
[修复] | |||
[√]修复全局缓存_Cs引起的错误; | |||
[√]增加对回收站删除判断,修改回收站的误删除错误; | |||
[√]修正日历控件在IE+下面显示问题; | |||
[√]修正内容模型编辑中缺少作者编辑框的bug; | |||
[√]修复会员邮箱验证的一个逻辑错误; | |||
[√]修补火狐下点击更新选项中单选框时运行状态位置错误的bug | |||
[√]修正用户点卡充值有关支付接口的问题; | |||
[√]添加hash值修复UCenter安装报错; | |||
[√]修复会员登陆不能更新登录时间和IP的BUG; | |||
[√]修正数据库类关于IsTabel方法的一个错误; | |||
[√]修复图片裁剪的一个错误; | |||
更多更新请查阅:http://bbs.dedecms.com/331304.html |
@@ -0,0 +1,31 @@ | |||
---------------------------------- | |||
| DedeCMS 最终用户授权协议 | | |||
---------------------------------- | |||
感谢您选择织梦内容管理系统(以下简称DedeCMS),DedeCMS是目前国内最强大、最稳定的中小型门户网站建设解决方案之一,基于 PHP + MySQL 的技术开发,全部源码开放。 | |||
DedeCMS 的官方网址是: www.dedecms.com 交流论坛:bbs.dedecms.com | |||
为了使您正确并合法的使用本软件,请您在使用前务必阅读清楚下面的协议条款: | |||
一、本授权协议适用且仅适用于 DedeCMS 5.x.x 版本,DedeCMS官方对本授权协议拥有最终解释权。 | |||
二、协议许可的权利 | |||
1.您可以在完全遵守本最终用户授权协议的基础上,将本软件应用于非商业用途,而不必支付软件版权授权费用。 | |||
2.您可以在协议规定的约束和限制范围内修改 DedeCMS 源代码或界面风格以适应您的网站要求。 | |||
3.您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。 | |||
4.获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。 | |||
三、协议规定的约束和限制 | |||
1.未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登陆www.desdev.cn了解最新说明。 | |||
2.未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。 | |||
3.不管您的网站是否整体使用 DedeCMS ,还是部份栏目使用 DedeCMS,在您使用了 DedeCMS 的网站主页上必须保留模板footer.htm中相关版权信息链接。 | |||
4.未经官方许可,禁止在 DedeCMS 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。 | |||
5.如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。 | |||
四、有限担保和免责声明 | |||
1.本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。 | |||
2.用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。 | |||
3.电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装DedeCMS,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。 | |||
4.如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。 | |||
版权所有 ©2004-2011,DedeCMS.com 保留所有权利。 协议发布时间:2008年1月18日 版本最新更新:2011年3月4日 By DedeCMS.com |
@@ -0,0 +1,50 @@ | |||
---------------------------------------- | |||
| DedeCMS 产品使用说明 | | |||
---------------------------------------- | |||
一、平台需求 | |||
1.Windows 平台: | |||
IIS/Apache/Nginx + PHP4/PHP5.2+/PHP5.3+ + MySQL4/5 | |||
如果在windows环境中使用,建议用DedeCMS提供的DedeAMPZ套件以达到最佳使用性能。 | |||
2.Linux/Unix 平台 | |||
Apache + PHP4/PHP5 + MySQL3/4/5 (PHP必须在非安全模式下运行) | |||
建议使用平台:Linux + Apache2.2 + PHP5.2/PHP5.3 + MySQL5.0 | |||
3.PHP必须环境或启用的系统函数: | |||
allow_url_fopen | |||
GD扩展库 | |||
MySQL扩展库 | |||
系统函数 —— phpinfo、dir | |||
4.基本目录结构 | |||
/ | |||
..../install 安装程序目录,安装完后可删除[安装时必须有可写入权限] | |||
..../dede 默认后台管理目录(可任意改名) | |||
..../include 类库文件目录 | |||
..../plus 附助程序目录 | |||
..../member 会员目录 | |||
..../images 系统默认模板图片存放目录 | |||
..../uploads 默认上传目录[必须可写入] | |||
..../a 默认HTML文件存放目录[必须可写入] | |||
..../templets 系统默认内核模板目录 | |||
..../data 系统缓存或其它可写入数据存放目录[必须可写入] | |||
..../special 专题目录[生成一次专题后可以删除special/index.php,必须可写入] | |||
5.PHP环境容易碰到的不兼容性问题 | |||
(1)data目录没写入权限,导致系统session无法使用,这将导致无法登录管理后台(直接表现为验证码不能正常显示); | |||
(2)php的上传的临时文件夹没设置好或没写入权限,这会导致文件上传的功能无法使用; | |||
(3)出现莫名的错误,如安装时显示空白,这样能是由于系统没装载mysql扩展导致的,对于初级用户,可以下载dede的php套件包,以方便简单的使用。 | |||
二、程序安装使用 | |||
1.下载程序解压到本地目录; | |||
2.上传程序目录中的/uploads到网站根目录 | |||
3.运行http://www.yourname.com/install/index.php(yourname表示你的域名),按照安装提速说明进行程序安装 | |||
三、相关资源 | |||
DedeCMS官方主站 www.dedecms.com | |||
织梦维基 docs.dedecms.com | |||
客服中心 service.dedecms.com | |||
技术支持论坛 bbs.dedecms.com | |||
上海卓卓网络科技 www.desdev.cn |
@@ -0,0 +1,3 @@ | |||
www.dedecms.com | |||
www.desdev.cn | |||
bbs.dedecms.com |
@@ -0,0 +1,15 @@ | |||
<?php | |||
/** | |||
* 更新服务器,如果有变动,请到 http://bbs.dedecms.com 查询 | |||
* | |||
* @version $Id: config_update.php 1 11:36 2011-2-21 tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
//更新服务器,如果有变动,请到 http://bbs.dedecms.com 查询 | |||
define('UPDATEHOST', 'http://updatenew.dedecms.com/base-v57/'); | |||
define('LINKHOST', 'http://flink.dedecms.com/server_url.php'); |
@@ -0,0 +1 @@ | |||
暂无相关信息 |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1,5 @@ | |||
<menu:item ico="images/addnews.gif" link="content_list.php" title="文档列表" /> | |||
<menu:item ico="images/menuarrow.gif" link="feedback_main.php" title="评论管理" /> | |||
<menu:item ico="images/manage1.gif" link="public_guide.php" title="内容发布" /> | |||
<menu:item ico="images/file_dir.gif" link="catalog_main.php" title="栏目管理" /> | |||
<menu:item ico="images/manage1.gif" link="sys_info.php" title="修改参数" /> |
@@ -0,0 +1,3 @@ | |||
<menu:item ico="images/addnews.gif" link="content_list.php" title="文档列表" /> | |||
<menu:item ico="images/menuarrow.gif" link="feedback_main.php" title="评论管理" /> | |||
<menu:item ico="images/manage1.gif" link="public_guide.php" title="内容发布" /> |
@@ -0,0 +1,4 @@ | |||
Admin5 | |||
ChinaZ | |||
织梦技术论坛 | |||
落伍者论坛 |
@@ -0,0 +1 @@ | |||
20180109 |
@@ -0,0 +1 @@ | |||
20110216 |
@@ -0,0 +1 @@ | |||
秩名,网络,消息 |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1,79 @@ | |||
<?php | |||
/*--------------------------------------------------------------------------------------------- | |||
文件远程发布目录更新配置(config.file.inc.php) | |||
说明:本文件主要用于系统后台[生成]-[自动任务]-[远程服务器同步] | |||
中的文件夹自定义更新配置所用,使用时候如果有特定目录需要进行同 | |||
步,则需要在这个文件中进行配置,配置方式如下: | |||
$remotefile[] = array( | |||
'filedir' => '/yourdir', //同步文件夹目录 | |||
'description' => '这里是文件夹说明', | |||
'dfserv' => '0', //默认服务器选项,可以在系统后台[系统设置]-[服务器分布/远程 ]中配置 | |||
'state' => '0', //同步状态,0:未同步 1:已同步 | |||
); | |||
-----------------------------------------------------------------------------------------------*/ | |||
global $remotefile; | |||
$remotefile = array(); | |||
//以下是必备同步配置项 | |||
//@start_config 不要改动下面<>结构 | |||
#<s_config> | |||
$remotefile[0] = array( | |||
'filedir'=>'/a', | |||
'description'=>'文档HTML默认保存路', | |||
'dfserv'=>0, | |||
'state'=>1, | |||
'issystem'=>1 | |||
); | |||
$remotefile[1] = array( | |||
'filedir'=>'/longhoo', | |||
'description'=>'文档HTML默认保存路', | |||
'dfserv'=>0, | |||
'state'=>1, | |||
'issystem'=>1 | |||
); | |||
$remotefile[2] = array( | |||
'filedir'=>'/uploads', | |||
'description'=>'图片/上传文件默认路径', | |||
'dfserv'=>0, | |||
'state'=>1, | |||
'issystem'=>1 | |||
); | |||
$remotefile[3] = array( | |||
'filedir'=>'/special', | |||
'description'=>'专题目录', | |||
'dfserv'=>0, | |||
'state'=>1, | |||
'issystem'=>1 | |||
); | |||
$remotefile[4] = array( | |||
'filedir'=>'/data/js', | |||
'description'=>'生成js目录', | |||
'dfserv'=>0, | |||
'state'=>1, | |||
'issystem'=>1 | |||
); | |||
$remotefile[5] = array( | |||
'filedir'=>'/images', | |||
'description'=>'图片素材存放文件', | |||
'dfserv'=>0, | |||
'state'=>1, | |||
'issystem'=>0 | |||
); | |||
$remotefile[6] = array( | |||
'filedir'=>'/templets/images', | |||
'description'=>'模板文件图片存放目录', | |||
'dfserv'=>0, | |||
'state'=>1, | |||
'issystem'=>0 | |||
); | |||
$remotefile[7] = array( | |||
'filedir'=>'/templets/style', | |||
'description'=>'模板文件CSS样式存放目录', | |||
'dfserv'=>0, | |||
'state'=>1, | |||
'issystem'=>0 | |||
); | |||
#<e_config> | |||
?> |
@@ -0,0 +1,13 @@ | |||
<?php | |||
//---------------------------- | |||
//以下为手工指定的混淆串 | |||
//---------------------------- | |||
#start# | |||
#,织梦好,好织梦 | |||
#,本文来自织梦 | |||
#,织梦内容管理系统 | |||
#,dedecms.com | |||
#,copyright dedecms | |||
#,内容来自dedecms | |||
#end# | |||
?> |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1,19 @@ | |||
<?php | |||
//小助手配置项 | |||
$cfg_helper_autoload = array | |||
( | |||
'charset', /* 编码小助手 */ | |||
'channelunit',/* 模型单元小助手 */ | |||
'string', /* 字符串小助手 */ | |||
'time', /* 日期小助手 */ | |||
'file', /* 文件小助手 */ | |||
'util', /* 单元小助手 */ | |||
'validate', /* 数据验证小助手 */ | |||
'filter', /* 过滤器小助手 */ | |||
'cookie', /* cookies小助手 */ | |||
'debug', /* 调试小助手 */ | |||
'archive', /* 文档小助手 */ | |||
'upload', /* 上传小助手 */ | |||
'extend', /* 扩展小助手 */ | |||
); | |||
?> |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1,14 @@ | |||
<?php | |||
$photo_markup = '1'; | |||
$photo_markdown = '1'; | |||
$photo_marktype = '1'; | |||
$photo_wwidth = '120'; | |||
$photo_wheight = '120'; | |||
$photo_waterpos = '9'; | |||
$photo_watertext = 'www.dedecms.com'; | |||
$photo_fontsize = '20'; | |||
$photo_fontcolor = '0,0,0'; | |||
$photo_marktrans = '100'; | |||
$photo_diaphaneity = '100'; | |||
$photo_markimg = 'mark.png'; | |||
?> |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1,23 @@ | |||
<div style='padding-left:20px;line-height:150%'> | |||
<p>版权所有 ©2003-2008,DedeCms.com 保留所有权利。 </p> | |||
<p>感谢您选择织梦内容管理系统(以下简称DedeCms),DedeCms是目前国内最强大、最稳定的中小型门户网站建设解决方案之一,居于 PHP + MySQL 的技术开发,全部源码开放。DedeCms 的官方网址是: www.dedecms.com 交流论坛: bbs.dedecms.com</p> | |||
<p>为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:</p> | |||
<p><strong>一、本授权协议适用且仅适用于 DedeCms 5.x.x 版本,DedeCms官方对本授权协议的最终解释权。 </strong></p> | |||
<p><strong>二、协议许可的权利 </strong><br /> | |||
1、您可以在完全遵守本最终用户授权协议的基础上,将本软件应用于非商业用途,而不必支付软件版权授权费用。 <br /> | |||
2、您可以在协议规定的约束和限制范围内修改 DedeCms 源代码或界面风格以适应您的网站要求。 <br /> | |||
3、您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。 <br /> | |||
4、获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。 </p> | |||
<p><strong>三、协议规定的约束和限制 </strong><br /> | |||
1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登陆 bbs.dedecms.com 了解最新说明。 <br /> | |||
2、未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。 <br /> | |||
3、不管你的网站是否整体使用 DedeCms ,还是部份栏目使用 DedeCms,在你使用了 DedeCms 的网站主页上必须加上 DedeCms 官方网址(www.dedecms.com)的链接。 <br /> | |||
4、未经官方许可,禁止在 DedeCms 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。 <br /> | |||
5、如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。 </p> | |||
<p><strong>四、有限担保和免责声明 </strong><br /> | |||
1、本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。 <br /> | |||
2、用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。 <br /> | |||
3、电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装 DedeCms,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。 <br /> | |||
4、如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。</p> | |||
<p>协议发布时间: 2008年8月20日 By DedeCms.com</p> | |||
<p> </p> |
@@ -0,0 +1,23 @@ | |||
<div style='padding-left:20px;line-height:150%'> | |||
<p>版权所有 ©2003-2008,DedeCms.com 保留所有权利。 </p> | |||
<p>感谢您选择织梦内容管理系统(以下简称DedeCms),DedeCms是目前国内最强大、最稳定的中小型门户网站建设解决方案之一,居于 PHP + MySQL 的技术开发,全部源码开放。DedeCms 的官方网址是: www.dedecms.com 交流论坛: bbs.dedecms.com</p> | |||
<p>为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:</p> | |||
<p><strong>一、本授权协议适用且仅适用于 DedeCms 5.x.x 版本,DedeCms官方对本授权协议的最终解释权。 </strong></p> | |||
<p><strong>二、协议许可的权利 </strong><br /> | |||
1、您可以在完全遵守本最终用户授权协议的基础上,将本软件应用于非商业用途,而不必支付软件版权授权费用。 <br /> | |||
2、您可以在协议规定的约束和限制范围内修改 DedeCms 源代码或界面风格以适应您的网站要求。 <br /> | |||
3、您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。 <br /> | |||
4、获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。 </p> | |||
<p><strong>三、协议规定的约束和限制 </strong><br /> | |||
1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登陆 bbs.dedecms.com 了解最新说明。 <br /> | |||
2、未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。 <br /> | |||
3、不管你的网站是否整体使用 DedeCms ,还是部份栏目使用 DedeCms,在你使用了 DedeCms 的网站主页上必须加上 DedeCms 官方网址(www.dedecms.com)的链接。 <br /> | |||
4、未经官方许可,禁止在 DedeCms 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。 <br /> | |||
5、如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。 </p> | |||
<p><strong>四、有限担保和免责声明 </strong><br /> | |||
1、本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。 <br /> | |||
2、用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。 <br /> | |||
3、电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装 DedeCms,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。 <br /> | |||
4、如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。</p> | |||
<p>协议发布时间: 2008年8月20日 By DedeCms.com</p> | |||
<p> </p> |
@@ -0,0 +1,23 @@ | |||
<p style='line-height:150%'><div style='padding-left:20px;line-height:150%'><br /> | |||
<p>版权所有 (c)2003-2011,DedeCms.com 保留所有权利。 </p><br /> | |||
<p>感谢您选择织梦内容管理系统(以下简称DedeCms),DedeCms是目前国内最强大、最稳定的中小型门户网站建设解决方案之一,居于 PHP + MySQL 的技术开发,全部源码开放。DedeCms 的官方网址是: www.dedecms.com 交流论坛: bbs.dedecms.com</p><br /> | |||
<p>为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:</p><br /> | |||
<p><strong>一、本授权协议适用且仅适用于 DedeCms 5.x.x 版本,DedeCms官方对本授权协议的最终解释权。 </strong></p><br /> | |||
<p><strong>二、协议许可的权利 </strong><br /><br /> | |||
1、您可以在完全遵守本最终用户授权协议的基础上,将本软件应用于非商业用途,而不必支付软件版权授权费用。 <br /><br /> | |||
2、您可以在协议规定的约束和限制范围内修改 DedeCms 源代码或界面风格以适应您的网站要求。 <br /><br /> | |||
3、您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。 <br /><br /> | |||
4、获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。 </p><br /> | |||
<p><strong>二、协议规定的约束和限制 </strong><br /><br /> | |||
1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登陆 bbs.dedecms.com 了解最新说明。 <br /><br /> | |||
2、未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。 <br /><br /> | |||
3、不管你的网站是否整体使用 DedeCms ,还是部份栏目使用 DedeCms,在你使用了 DedeCms 的网站主页上必须加上 DedeCms 官方网址(www.dedecms.com)的链接。 <br /><br /> | |||
4、未经官方许可,禁止在 DedeCms 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。 <br /><br /> | |||
5、如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。 </p><br /> | |||
<p><strong>三、有限担保和免责声明 </strong><br /><br /> | |||
1、本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。 <br /><br /> | |||
2、用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。 <br /><br /> | |||
3、电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装 DedeCms,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。 <br /><br /> | |||
4、如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。</p><br /> | |||
<p>协议发布时间: 2007年12月1日 By DedeCms.com</p><br /> | |||
<p></p></p> |
@@ -0,0 +1,23 @@ | |||
<div style='padding-left:20px;line-height:150%'> | |||
<p>版权所有 ©2003-2008,DedeCms.com 保留所有权利。 </p> | |||
<p>感谢您选择织梦内容管理系统(以下简称DedeCms),DedeCms是目前国内最强大、最稳定的中小型门户网站建设解决方案之一,居于 PHP + MySQL 的技术开发,全部源码开放。DedeCms 的官方网址是: www.dedecms.com 交流论坛: bbs.dedecms.com</p> | |||
<p>为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:</p> | |||
<p><strong>一、本授权协议适用且仅适用于 DedeCms 5.x.x 版本,DedeCms官方对本授权协议的最终解释权。 </strong></p> | |||
<p><strong>二、协议许可的权利 </strong><br /> | |||
1、您可以在完全遵守本最终用户授权协议的基础上,将本软件应用于非商业用途,而不必支付软件版权授权费用。 <br /> | |||
2、您可以在协议规定的约束和限制范围内修改 DedeCms 源代码或界面风格以适应您的网站要求。 <br /> | |||
3、您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。 <br /> | |||
4、获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。 </p> | |||
<p><strong>三、协议规定的约束和限制 </strong><br /> | |||
1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登陆 bbs.dedecms.com 了解最新说明。 <br /> | |||
2、未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。 <br /> | |||
3、不管你的网站是否整体使用 DedeCms ,还是部份栏目使用 DedeCms,在你使用了 DedeCms 的网站主页上必须加上 DedeCms 官方网址(www.dedecms.com)的链接。 <br /> | |||
4、未经官方许可,禁止在 DedeCms 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。 <br /> | |||
5、如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。 </p> | |||
<p><strong>四、有限担保和免责声明 </strong><br /> | |||
1、本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。 <br /> | |||
2、用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。 <br /> | |||
3、电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装 DedeCms,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。 <br /> | |||
4、如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。</p> | |||
<p>协议发布时间: 2008年8月20日 By DedeCms.com</p> | |||
<p> </p> |
@@ -0,0 +1,23 @@ | |||
<div style='padding-left:20px;line-height:150%'> | |||
<p>版权所有 ©2003-2008,DedeCms.com 保留所有权利。 </p> | |||
<p>感谢您选择织梦内容管理系统(以下简称DedeCms),DedeCms是目前国内最强大、最稳定的中小型门户网站建设解决方案之一,居于 PHP + MySQL 的技术开发,全部源码开放。DedeCms 的官方网址是: www.dedecms.com 交流论坛: bbs.dedecms.com</p> | |||
<p>为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:</p> | |||
<p><strong>一、本授权协议适用且仅适用于 DedeCms 5.x.x 版本,DedeCms官方对本授权协议的最终解释权。 </strong></p> | |||
<p><strong>二、协议许可的权利 </strong><br /> | |||
1、您可以在完全遵守本最终用户授权协议的基础上,将本软件应用于非商业用途,而不必支付软件版权授权费用。 <br /> | |||
2、您可以在协议规定的约束和限制范围内修改 DedeCms 源代码或界面风格以适应您的网站要求。 <br /> | |||
3、您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。 <br /> | |||
4、获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。 </p> | |||
<p><strong>三、协议规定的约束和限制 </strong><br /> | |||
1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登陆 bbs.dedecms.com 了解最新说明。 <br /> | |||
2、未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。 <br /> | |||
3、不管你的网站是否整体使用 DedeCms ,还是部份栏目使用 DedeCms,在你使用了 DedeCms 的网站主页上必须加上 DedeCms 官方网址(www.dedecms.com)的链接。 <br /> | |||
4、未经官方许可,禁止在 DedeCms 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。 <br /> | |||
5、如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。 </p> | |||
<p><strong>四、有限担保和免责声明 </strong><br /> | |||
1、本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。 <br /> | |||
2、用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。 <br /> | |||
3、电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装 DedeCms,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。 <br /> | |||
4、如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。</p> | |||
<p>协议发布时间: 2008年8月20日 By DedeCms.com</p> | |||
<p> </p> |
@@ -0,0 +1,23 @@ | |||
<p style='line-height:150%'><div style='padding-left:20px;line-height:150%'><br /> | |||
<p>版权所有 ©2003-2011,DedeCms.com 保留所有权利。 </p><br /> | |||
<p>感谢您选择织梦内容管理系统(以下简称DedeCms),DedeCms是目前国内最强大、最稳定的中小型门户网站建设解决方案之一,居于 PHP + MySQL 的技术开发,全部源码开放。DedeCms 的官方网址是: www.dedecms.com 交流论坛: bbs.dedecms.com</p><br /> | |||
<p>为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:</p><br /> | |||
<p><strong>一、本授权协议适用且仅适用于 DedeCms 5.x.x 版本,DedeCms官方对本授权协议的最终解释权。 </strong></p><br /> | |||
<p><strong>二、协议许可的权利 </strong><br /><br /> | |||
1、您可以在完全遵守本最终用户授权协议的基础上,将本软件应用于非商业用途,而不必支付软件版权授权费用。 <br /><br /> | |||
2、您可以在协议规定的约束和限制范围内修改 DedeCms 源代码或界面风格以适应您的网站要求。 <br /><br /> | |||
3、您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。 <br /><br /> | |||
4、获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。 </p><br /> | |||
<p><strong>三、协议规定的约束和限制 </strong><br /><br /> | |||
1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登陆 bbs.dedecms.com 了解最新说明。 <br /><br /> | |||
2、未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。 <br /><br /> | |||
3、不管你的网站是否整体使用 DedeCms ,还是部份栏目使用 DedeCms,在你使用了 DedeCms 的网站主页上必须加上 DedeCms 官方网址(www.dedecms.com)的链接。 <br /><br /> | |||
4、未经官方许可,禁止在 DedeCms 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。 <br /><br /> | |||
5、如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。 </p><br /> | |||
<p><strong>四、有限担保和免责声明 </strong><br /><br /> | |||
1、本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。 <br /><br /> | |||
2、用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。 <br /><br /> | |||
3、电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装 DedeCms,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。 <br /><br /> | |||
4、如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。</p><br /> | |||
<p>协议发布时间: 2008年8月20日 By DedeCms.com</p><br /> | |||
<p> </p></p> |
@@ -0,0 +1,23 @@ | |||
<div style='padding-left:20px;line-height:150%'> | |||
<p>版权所有 ©2003-2008,DedeCms.com 保留所有权利。 </p> | |||
<p>感谢您选择织梦内容管理系统(以下简称DedeCms),DedeCms是目前国内最强大、最稳定的中小型门户网站建设解决方案之一,居于 PHP + MySQL 的技术开发,全部源码开放。DedeCms 的官方网址是: www.dedecms.com 交流论坛: bbs.dedecms.com</p> | |||
<p>为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:</p> | |||
<p><strong>一、本授权协议适用且仅适用于 DedeCms 5.x.x 版本,DedeCms官方对本授权协议的最终解释权。 </strong></p> | |||
<p><strong>二、协议许可的权利 </strong><br /> | |||
1、您可以在完全遵守本最终用户授权协议的基础上,将本软件应用于非商业用途,而不必支付软件版权授权费用。 <br /> | |||
2、您可以在协议规定的约束和限制范围内修改 DedeCms 源代码或界面风格以适应您的网站要求。 <br /> | |||
3、您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。 <br /> | |||
4、获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。 </p> | |||
<p><strong>三、协议规定的约束和限制 </strong><br /> | |||
1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登陆 bbs.dedecms.com 了解最新说明。 <br /> | |||
2、未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。 <br /> | |||
3、不管你的网站是否整体使用 DedeCms ,还是部份栏目使用 DedeCms,在你使用了 DedeCms 的网站主页上必须加上 DedeCms 官方网址(www.dedecms.com)的链接。 <br /> | |||
4、未经官方许可,禁止在 DedeCms 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。 <br /> | |||
5、如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。 </p> | |||
<p><strong>四、有限担保和免责声明 </strong><br /> | |||
1、本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。 <br /> | |||
2、用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。 <br /> | |||
3、电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装 DedeCms,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。 <br /> | |||
4、如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。</p> | |||
<p>协议发布时间: 2008年8月20日 By DedeCms.com</p> | |||
<p> </p> |
@@ -0,0 +1,23 @@ | |||
<div style='padding-left:20px;line-height:150%'> | |||
<p>版权所有 ©2003-2008,DedeCms.com 保留所有权利。 </p> | |||
<p>感谢您选择织梦内容管理系统(以下简称DedeCms),DedeCms是目前国内最强大、最稳定的中小型门户网站建设解决方案之一,居于 PHP + MySQL 的技术开发,全部源码开放。DedeCms 的官方网址是: www.dedecms.com 交流论坛: bbs.dedecms.com</p> | |||
<p>为了使你正确并合法的使用本软件,请你在使用前务必阅读清楚下面的协议条款:</p> | |||
<p><strong>一、本授权协议适用且仅适用于 DedeCms 5.x.x 版本,DedeCms官方对本授权协议的最终解释权。 </strong></p> | |||
<p><strong>二、协议许可的权利 </strong><br /> | |||
1、您可以在完全遵守本最终用户授权协议的基础上,将本软件应用于非商业用途,而不必支付软件版权授权费用。 <br /> | |||
2、您可以在协议规定的约束和限制范围内修改 DedeCms 源代码或界面风格以适应您的网站要求。 <br /> | |||
3、您拥有使用本软件构建的网站全部内容所有权,并独立承担与这些内容的相关法律义务。 <br /> | |||
4、获得商业授权之后,您可以将本软件应用于商业用途,同时依据所购买的授权类型中确定的技术支持内容,自购买时刻起,在技术支持期限内拥有通过指定的方式获得指定范围内的技术支持服务。商业授权用户享有反映和提出意见的权力,相关意见将被作为首要考虑,但没有一定被采纳的承诺或保证。 </p> | |||
<p><strong>三、协议规定的约束和限制 </strong><br /> | |||
1、未获商业授权之前,不得将本软件用于商业用途(包括但不限于企业网站、经营性网站、以营利为目的或实现盈利的网站)。购买商业授权请登陆 bbs.dedecms.com 了解最新说明。 <br /> | |||
2、未经官方许可,不得对本软件或与之关联的商业授权进行出租、出售、抵押或发放子许可证。 <br /> | |||
3、不管你的网站是否整体使用 DedeCms ,还是部份栏目使用 DedeCms,在你使用了 DedeCms 的网站主页上必须加上 DedeCms 官方网址(www.dedecms.com)的链接。 <br /> | |||
4、未经官方许可,禁止在 DedeCms 的整体或任何部分基础上以发展任何派生版本、修改版本或第三方版本用于重新分发。 <br /> | |||
5、如果您未能遵守本协议的条款,您的授权将被终止,所被许可的权利将被收回,并承担相应法律责任。 </p> | |||
<p><strong>四、有限担保和免责声明 </strong><br /> | |||
1、本软件及所附带的文件是作为不提供任何明确的或隐含的赔偿或担保的形式提供的。 <br /> | |||
2、用户出于自愿而使用本软件,您必须了解使用本软件的风险,在尚未购买产品技术服务之前,我们不承诺对免费用户提供任何形式的技术支持、使用担保,也不承担任何因使用本软件而产生问题的相关责任。 <br /> | |||
3、电子文本形式的授权协议如同双方书面签署的协议一样,具有完全的和等同的法律效力。您一旦开始确认本协议并安装 DedeCms,即被视为完全理解并接受本协议的各项条款,在享有上述条款授予的权力的同时,受到相关的约束和限制。协议许可范围以外的行为,将直接违反本授权协议并构成侵权,我们有权随时终止授权,责令停止损害,并保留追究相关责任的权力。 <br /> | |||
4、如果本软件带有其它软件的整合API示范例子包,这些文件版权不属于本软件官方,并且这些文件是没经过授权发布的,请参考相关软件的使用许可合法的使用。</p> | |||
<p>协议发布时间: 2008年8月20日 By DedeCms.com</p> | |||
<p> </p> |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1,14 @@ | |||
<?php | |||
$safe_gdopen = '1,2,3,4,5,6,7'; | |||
$safe_codetype = '3'; | |||
$safe_gdtype = '1'; | |||
$safe_gdstyle = '3'; | |||
$safe_wwidth = '68'; | |||
$safe_wheight = '24'; | |||
$safe_codelen = '4'; | |||
$safe_faq_reg = '0'; | |||
$safe_faq_send = '0'; | |||
$safe_faq_msg = '1'; | |||
$safe_faqs = 'a:4:{i:1;a:2:{s:8:"question";s:37:"您最喜欢的网建程序是什么?";s:6:"answer";s:7:"DedeCMS";}i:2;a:2:{s:8:"question";s:6:"1+11=?";s:6:"answer";s:2:"12";}i:3;a:2:{s:8:"question";s:59:"中国哪项体育运动最让人听着伤心,看着揪心?";s:6:"answer";s:6:"足球";}i:4;a:2:{s:8:"question";s:29:"<img src="/images/dede.gif"/>";s:6:"answer";s:24:"织梦内容管理系统";}}'; | |||
?> |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1,35 @@ | |||
<?php | |||
//安全提示问题,这两句不要修改 | |||
$safequestions = array(); | |||
$safequestions[0] = '没安全提示问题'; | |||
//下面的设置可以手工修改 | |||
//start**************************** | |||
$safequestions[1] = '你最喜欢的格言什么?'; | |||
$safequestions[2] = '你家乡的名称是什么?'; | |||
$safequestions[3] = '你读的小学叫什么?'; | |||
$safequestions[4] = '你的父亲叫什么名字?'; | |||
$safequestions[5] = '你的母亲叫什么名字?'; | |||
$safequestions[6] = '你最喜欢的偶像是谁?'; | |||
$safequestions[7] = '你最喜欢的歌曲是什么?'; | |||
//end**************************** | |||
//以下不要修改 | |||
function GetSafequestion($selid=0,$formname='safequestion') | |||
{ | |||
global $safequestions; | |||
$safequestions_form = "<select name='$formname' id='$formname'>"; | |||
foreach($safequestions as $k=>$v) | |||
{ | |||
if($k==$selid) $safequestions_form .= "<option value='$k' selected>$v</option>\r\n"; | |||
else $safequestions_form .= "<option value='$k'>$v</option>\r\n"; | |||
} | |||
$safequestions_form .= "</select>\r\n"; | |||
return $safequestions_form; | |||
} | |||
?> |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1,22 @@ | |||
<?php | |||
// 表情配置,表情图片放在/images/smiley中即可 | |||
$GLOBALS['cfg_smileys'] = array( | |||
// 表情符 图片名称 宽度 高度 表情说明 | |||
'{s:1}' => array('1.gif', '24', '24', '高兴'), | |||
'{s:2}' => array('2.gif', '24', '24', '撇嘴'), | |||
'{s:3}' => array('3.gif', '24', '24', '抓狂'), | |||
'{s:4}' => array('4.gif', '24', '24', '汗'), | |||
'{s:5}' => array('5.gif', '24', '24', '惊恐'), | |||
'{s:6}' => array('6.gif', '24', '24', '奋斗'), | |||
'{s:7}' => array('7.gif', '24', '24', '疑问'), | |||
'{s:8}' => array('8.gif', '24', '24', '晕'), | |||
'{s:9}' => array('9.gif', '24', '24', '偷笑'), | |||
'{s:10}' => array('10.gif', '24', '24', '可爱'), | |||
'{s:11}' => array('11.gif', '24', '24', '疑惑'), | |||
'{s:12}' => array('12.gif', '24', '24', '酷'), | |||
'{s:13}' => array('13.gif', '24', '24', '暴汗'), | |||
'{s:14}' => array('14.gif', '24', '24', '呕吐'), | |||
'{s:15}' => array('15.gif', '24', '24', '大笑'), | |||
'{s:16}' => array('16.gif', '24', '24', '色'), | |||
); | |||
?> |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1,20 @@ | |||
<?php | |||
global $sqltag; | |||
// phpwind8数据库连接配置 | |||
// ------------------------------------------------------------------------ | |||
$sqltag['phpwind8']['dbhost'] = 'localhost'; | |||
$sqltag['phpwind8']['dbname'] = 'phpwind8'; | |||
$sqltag['phpwind8']['dbuser'] = 'root'; | |||
$sqltag['phpwind8']['dbpwd'] = '123456'; | |||
$sqltag['phpwind8']['dbprefix'] = 'pw_'; | |||
$sqltag['phpwind8']['dblanguage'] = 'gbk'; | |||
// phpb2b数据库连接配置 | |||
// ------------------------------------------------------------------------ | |||
$sqltag['phpb2b']['dbhost'] = 'localhost'; | |||
$sqltag['phpb2b']['dbname'] = 'phpb2b'; | |||
$sqltag['phpb2b']['dbuser'] = 'root'; | |||
$sqltag['phpb2b']['dbpwd'] = '123456'; | |||
$sqltag['phpb2b']['dbprefix'] = 'pb_'; | |||
$sqltag['phpb2b']['dblanguage'] = 'utf8'; | |||
?> |
@@ -0,0 +1,11 @@ | |||
<?php | |||
//这个值为 0 表示关闭此设置, 为 1 表示开启 | |||
$cfg_tamplate_rand = 0; | |||
//模板数组,如果需要增加,按这个格式增加或修改即可(必须确保这些模板是存在的),并且数量必须为2个或以上。 | |||
$cfg_tamplate_arr[] = 'article_article.htm'; | |||
$cfg_tamplate_arr[] = 'article_article1.htm'; | |||
$cfg_tamplate_arr[] = 'article_article2.htm'; | |||
?> |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +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> "); |
@@ -0,0 +1 @@ | |||
dir |
@@ -0,0 +1,20 @@ | |||
<?php | |||
/** | |||
* 检索操作 | |||
* | |||
* @version $Id: action_search.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
require_once(dirname(__FILE__)."/actionsearch_class.php"); | |||
//增加权限检查 | |||
if(empty($dopost)) $dopost = ""; | |||
$keyword=empty($keyword)? "" : $keyword; | |||
$actsearch = new ActionSearch($keyword); | |||
$asresult = $actsearch->Search(); | |||
include DedeInclude('templets/action_search.htm'); |
@@ -0,0 +1,94 @@ | |||
<?php | |||
/** | |||
* @version $Id: actionsearch_class.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
class ActionSearch | |||
{ | |||
var $keyword; | |||
var $asarray = array(); | |||
var $result = array(); | |||
//初始化系统 | |||
function ActionSearch($keyword){ | |||
$this->asarray = $this->GetSearchstr(); | |||
$this->keyword = $keyword; | |||
} | |||
function GetSearchstr() | |||
{ | |||
require_once(dirname(__FILE__)."/inc/inc_action_info.php"); | |||
return is_array($actionSearch)? $actionSearch : array(); | |||
} | |||
function search(){ | |||
$this->searchkeyword(); | |||
return $this->result; | |||
} | |||
/** | |||
* 遍历功能配置项进行关键词匹配 | |||
* | |||
* @return void | |||
*/ | |||
function searchkeyword(){ | |||
$i = 0; //数组序列索引 | |||
foreach ($this->asarray as $key=>$value) | |||
{ | |||
//对二级项目进行匹配 | |||
if(is_array($this->asarray[$key]['soniterm'])) | |||
{ | |||
foreach ($this->asarray[$key]['soniterm'] as $k=> $val) | |||
{ | |||
//进行权限判断 | |||
if(TestPurview($val['purview'])) | |||
{ | |||
//如果有操作权限 | |||
if($this->_strpos($val['title'], $this->keyword) !== false || $this->_strpos($val['description'], $this->keyword)!== false) | |||
{ | |||
//一级项目匹配 | |||
$this->result[$i]['toptitle'] = $this->redColorKeyword($this->asarray[$key]['toptitle']); | |||
$this->result[$i]['title'] = $this->redColorKeyword($this->asarray[$key]['title']); | |||
$this->result[$i]['description'] = $this->redColorKeyword($this->asarray[$key]['description']); | |||
//二级项目匹配 | |||
$this->result[$i]['soniterm'][] = $this->redColorKeyword($val); | |||
} | |||
} | |||
} | |||
} | |||
$i++; | |||
} | |||
} | |||
/** | |||
* 加亮关键词 | |||
* | |||
* @access public | |||
* @param string $text 关键词 | |||
* @return string | |||
*/ | |||
function redColorKeyword($text){ | |||
if(is_array($text)) | |||
{ | |||
foreach ($text as $key => $value) { | |||
if($key == 'title' || $key == 'description') | |||
{ | |||
//仅对title,description进行数组替换 | |||
$text[$key] = str_replace($this->keyword,'<font color="red">'.$this->keyword.'</font>',$text[$key]); | |||
} | |||
} | |||
} else { | |||
$text = str_replace($this->keyword,'<font color="red">'.$this->keyword.'</font>',$text); | |||
} | |||
return $text; | |||
} | |||
function _strpos($string,$find) | |||
{ | |||
if (function_exists('stripos')) return stripos($string,$find); | |||
return strpos($string,$find); | |||
} | |||
} |
@@ -0,0 +1,98 @@ | |||
<?php | |||
/** | |||
* 广告添加 | |||
* | |||
* @version $Id: ad_add.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require(dirname(__FILE__)."/config.php"); | |||
CheckPurview('plus_广告管理'); | |||
require_once DEDEINC."/typelink.class.php"; | |||
if(empty($dopost)) $dopost = ""; | |||
if($dopost=="save") | |||
{ | |||
csrf_check(); | |||
//timeset tagname typeid normbody expbody | |||
$tagname = trim($tagname); | |||
$row = $dsql->GetOne("SELECT typeid FROM #@__myad WHERE typeid='$typeid' AND tagname LIKE '$tagname'"); | |||
if(is_array($row)) | |||
{ | |||
ShowMsg("在相同栏目下已经存在同名的标记!","-1"); | |||
exit(); | |||
} | |||
$starttime = GetMkTime($starttime); | |||
$endtime = GetMkTime($endtime); | |||
$link = addslashes($normbody['link']); | |||
if($normbody['style']=='code') | |||
{ | |||
$normbody = addslashes($normbody['htmlcode']); | |||
} | |||
else if($normbody['style']=='txt') | |||
{ | |||
$normbody = "<a href=\"{$link}\" font-size=\"{$normbody['size']}\" color=\"{$normbody['color']}\">{$normbody['title']}</a>"; | |||
} | |||
else if($normbody['style']=='img') | |||
{ | |||
if(empty($normbody['width'])) | |||
{ | |||
$width = ""; | |||
} | |||
else | |||
{ | |||
$width = " width=\"{$normbody['width']}\""; | |||
} | |||
if (empty($normbody['height'])) | |||
{ | |||
$height = ""; | |||
} | |||
else | |||
{ | |||
$height = "height=\"{$normbody['height']}\""; | |||
} | |||
$normbody = "<a href=\"{$link}\"><img src=\"{$normbody['url']}\"$width $height border=\"0\" /></a>"; | |||
} | |||
else | |||
{ | |||
if(empty($normbody['width'])) | |||
{ | |||
$width = ""; | |||
} | |||
else | |||
{ | |||
$width = " width=\"{$normbody['width']}\""; | |||
} | |||
if (empty($normbody['height'])) | |||
{ | |||
$height = ""; | |||
} | |||
else | |||
{ | |||
$height = "height=\"{$normbody['height']}\""; | |||
} | |||
$normbody = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.Macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\"$width $height><param name=\"movie\" value=\"{$link}\"/><param name=\"quality\" value=\"high\"/></object>"; | |||
} | |||
$query = " | |||
INSERT INTO #@__myad(clsid,typeid,tagname,adname,timeset,starttime,endtime,normbody,expbody) | |||
VALUES('$clsid','$typeid','$tagname','$adname','$timeset','$starttime','$endtime','$normbody','$expbody'); | |||
"; | |||
$dsql->ExecuteNoneQuery($query); | |||
ShowMsg("成功增加一个广告!","ad_main.php"); | |||
exit(); | |||
} | |||
$dsql->Execute('dd','SELECT * FROM `#@__myadtype` ORDER BY id DESC'); | |||
$option = ''; | |||
while($arr = $dsql->GetArray('dd')) | |||
{ | |||
$option .= "<option value='{$arr['id']}'>{$arr['typename']}</option>\n\r"; | |||
} | |||
$startDay = time(); | |||
$endDay = AddDay($startDay,30); | |||
$startDay = GetDateTimeMk($startDay); | |||
$endDay = GetDateTimeMk($endDay); | |||
include DedeInclude('templets/ad_add.htm'); |
@@ -0,0 +1,88 @@ | |||
<?php | |||
/** | |||
* 广告编辑 | |||
* | |||
* @version $Id: ad_edit.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require(dirname(__FILE__)."/config.php"); | |||
CheckPurview('plus_广告管理'); | |||
require_once(DEDEINC.'/typelink.class.php'); | |||
if(empty($dopost)) $dopost = ''; | |||
$aid = preg_replace("#[^0-9]#", '', $aid); | |||
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "ad_main.php" : $_COOKIE['ENV_GOBACK_URL']; | |||
if($dopost=='delete') | |||
{ | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__myad` WHERE aid='$aid' "); | |||
ShowMsg("成功删除一则广告代码!",$ENV_GOBACK_URL); | |||
exit(); | |||
} | |||
else if($dopost=="gettag") | |||
{ | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$jscode = "<script src='{$cfg_phpurl}/ad_js.php?aid=$aid' language='javascript'></script>"; | |||
$showhtml = "<xmp style='color:#333333;background-color:#ffffff'>\r\n\r\n$jscode\r\n\r\n</xmp>"; | |||
$showhtml .= "预览:<iframe name='testfrm' frameborder='0' src='ad_edit.php?aid={$aid}&dopost=testjs' id='testfrm' width='100%' height='200'></iframe>"; | |||
$row = $dsql->GetOne("SELECT tagname from `#@__myad` WHERE aid='$aid' "); | |||
$showtag = '{'."dede:myad name='{$row['tagname']}'/".'}'; | |||
$info = "<b>说明:</b>如果嵌入的是织梦CMS广告标签,那么将会解析成标签中的内容到页面,广告更改后需要重新生成。<br /> | |||
如果不希望重新生成所有页面,则直接调用JS代码即可。 | |||
"; | |||
$wintitle = "广告管理-获取广告标签"; | |||
$wecome_info = "<a href='ad_main.php'><u>广告管理</u></a>::获取JS"; | |||
$win = new OxWindow(); | |||
$win->Init(); | |||
$winform = $win->GetWindow("hand",$info); | |||
$win->AddTitle("织梦CMS标签调用代码:"); | |||
$winform = $win->GetWindow("hand",$showtag); | |||
$win->myWinItem = ''; | |||
$win->AddTitle("以下为选定广告的JS调用代码:"); | |||
$winform = $win->GetWindow("hand",$showhtml); | |||
$win->Display(); | |||
exit(); | |||
} | |||
else if($dopost=='testjs') | |||
{ | |||
echo "<script src='{$cfg_phpurl}/ad_js.php?aid=$aid&nocache=1' language='javascript'></script>"; | |||
exit(); | |||
} | |||
else if($dopost=='saveedit') | |||
{ | |||
csrf_check(); | |||
$starttime = GetMkTime($starttime); | |||
$endtime = GetMkTime($endtime); | |||
$query = "UPDATE `#@__myad` | |||
SET | |||
clsid='$clsid', | |||
typeid='$typeid', | |||
adname='$adname', | |||
timeset='$timeset', | |||
starttime='$starttime', | |||
endtime='$endtime', | |||
normbody='$normbody', | |||
expbody='$expbody' | |||
WHERE aid='$aid' | |||
"; | |||
$dsql->ExecuteNoneQuery($query); | |||
ShowMsg("成功更改一则广告代码!",$ENV_GOBACK_URL); | |||
exit(); | |||
} | |||
$row = $dsql->GetOne("SELECT * FROM `#@__myad` WHERE aid='$aid'"); | |||
$dsql->Execute('dd','SELECT * FROM `#@__myadtype` ORDER BY id DESC'); | |||
$option = ''; | |||
while($arr = $dsql->GetArray('dd')) | |||
{ | |||
if ($arr['id'] == $row['clsid']) | |||
{ | |||
$option .= "<option value='{$arr['id']}' selected='selected'>{$arr['typename']}</option>\n\r"; | |||
} else { | |||
$option .= "<option value='{$arr['id']}'>{$arr['typename']}</option>\n\r"; | |||
} | |||
} | |||
include DedeInclude('templets/ad_edit.htm'); |
@@ -0,0 +1,67 @@ | |||
<?php | |||
/** | |||
* 广告管理 | |||
* | |||
* @version $Id: ad_main.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__).'/config.php'); | |||
require_once(DEDEINC.'/datalistcp.class.php'); | |||
require_once(DEDEINC.'/common.func.php'); | |||
setcookie('ENV_GOBACK_URL',$dedeNowurl,time()+3600,'/'); | |||
$clsid = isset($clsid)? intval($clsid) : 0; | |||
$keyword = isset($keyword)? addslashes($keyword) : ''; | |||
$dsql->Execute('dd','SELECT * FROM `#@__myadtype` ORDER BY id DESC'); | |||
$option = ''; | |||
while($arr = $dsql->GetArray('dd')) | |||
{ | |||
if ($arr['id'] == $clsid) | |||
{ | |||
$option .= "<option value='{$arr['id']}' selected='selected'>{$arr['typename']}</option>\n\r"; | |||
} else { | |||
$option .= "<option value='{$arr['id']}'>{$arr['typename']}</option>\n\r"; | |||
} | |||
} | |||
$where_sql = ' 1=1'; | |||
if($clsid!=0) $where_sql .= " AND clsid = $clsid"; | |||
if($keyword!='') $where_sql .= " AND (ad.adname like '%$keyword%') "; | |||
$sql = "SELECT ad.aid,ad.clsid,ad.tagname,tp.typename as typename,ad.adname,ad.timeset,ad.endtime,ap.typename as clsname | |||
FROM `#@__myad` ad | |||
LEFT JOIN `#@__arctype` tp on tp.id=ad.typeid | |||
LEFT JOIN `#@__myadtype` ap on ap.id=ad.clsid | |||
WHERE $where_sql | |||
ORDER BY ad.aid desc"; | |||
$dlist = new DataListCP(); | |||
$dlist->SetTemplet(DEDEADMIN."/templets/ad_main.htm"); | |||
$dlist->SetSource($sql); | |||
$dlist->display(); | |||
function TestType($tname, $type="") | |||
{ | |||
if($tname=="") | |||
{ | |||
return ($type == 1)? "默认分类" : "所有栏目"; | |||
} | |||
else | |||
{ | |||
return $tname; | |||
} | |||
} | |||
function TimeSetValue($ts) | |||
{ | |||
if($ts==0) | |||
{ | |||
return "不限时间"; | |||
} | |||
else | |||
{ | |||
return "限时标记"; | |||
} | |||
} |
@@ -0,0 +1,49 @@ | |||
<?php | |||
/** | |||
* 友情链接类型 | |||
* | |||
* @version $Id: friendlink_type.php 1 8:48 2010年7月13日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
if(empty($dopost)) $dopost = ''; | |||
//保存更改 | |||
if($dopost=="save") | |||
{ | |||
$startID = 1; | |||
$endID = $idend; | |||
for(;$startID<=$endID;$startID++) | |||
{ | |||
$query = ''; | |||
$tid = ${'ID_'.$startID}; | |||
$pname = ${'pname_'.$startID}; | |||
if(isset(${'check_'.$startID})) | |||
{ | |||
if($pname!='') | |||
{ | |||
$query = "UPDATE `#@__myadtypee` SET typename='$pname' WHERE id='$tid' "; | |||
$dsql->ExecuteNoneQuery($query); | |||
} | |||
} | |||
else | |||
{ | |||
$query = "DELETE FROM `#@__myadtype` WHERE id='$tid' "; | |||
$dsql->ExecuteNoneQuery($query); | |||
} | |||
} | |||
//增加新记录 | |||
if(isset($check_new) && $pname_new!='') | |||
{ | |||
$query = "INSERT INTO `#@__myadtype`(typename) VALUES('{$pname_new}');"; | |||
$dsql->ExecuteNoneQuery($query); | |||
} | |||
header("Content-Type: text/html; charset={$cfg_soft_lang}"); | |||
ShowMsg("成功更新广告分类列表!", 'adtype_main.php'); | |||
exit; | |||
} | |||
include DedeInclude('templets/adtype_main.htm'); |
@@ -0,0 +1,384 @@ | |||
<?php | |||
/** | |||
* 图集发布 | |||
* | |||
* @version $Id: album_add.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_New,a_AccNew'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if(empty($dopost)) $dopost = ''; | |||
if($dopost != 'save') | |||
{ | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
ClearMyAddon(); | |||
$channelid = empty($channelid) ? 0 : intval($channelid); | |||
$cid = empty($cid) ? 0 : intval($cid); | |||
//获得频道模型ID | |||
if($cid>0 && $channelid==0) | |||
{ | |||
$row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
$channelid = $row['channeltype']; | |||
} | |||
else | |||
{ | |||
if($channelid==0) $channelid = 2; | |||
} | |||
//获得频道模型信息 | |||
$cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$channelid = $cInfos['id']; | |||
//获取文章最大id以确定当前权重 | |||
$maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); | |||
include DedeInclude("templets/album_add.htm"); | |||
exit(); | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ | |||
else if($dopost=='save') | |||
{ | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',',$flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1: 0; | |||
if(empty($click)) $click = ($cfg_arc_click=='-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if(!isset($typeid2)) $typeid2 = 0; | |||
if(!isset($autokey)) $autokey = 0; | |||
if(!isset($remote)) $remote = 0; | |||
if(!isset($dellink)) $dellink = 0; | |||
if(!isset($autolitpic)) $autolitpic = 0; | |||
if(!isset($formhtml)) $formhtml = 0; | |||
if(!isset($formzip)) $formzip = 0; | |||
if(!isset($ddisfirst)) $ddisfirst = 0; | |||
if(!isset($delzip)) $delzip = 0; | |||
if(empty($click)) $click = ($cfg_arc_click=='-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if($typeid==0) | |||
{ | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
exit(); | |||
} | |||
if(empty($channelid)) | |||
{ | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!","-1"); | |||
exit(); | |||
} | |||
if(!CheckChannel($typeid,$channelid) ) | |||
{ | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!","-1"); | |||
exit(); | |||
} | |||
if(!TestPurview('a_New')) | |||
{ | |||
CheckCatalog($typeid,"对不起,你没有操作栏目 {$typeid} 的权限!"); | |||
} | |||
//对保存的内容进行处理 | |||
if(empty($writer))$writer=$cuserLogin->getUserName(); | |||
if(empty($source))$source='未知'; | |||
$pubdate = GetMkTime($pubdate); | |||
$senddate = time(); | |||
$sortrank = AddDay($pubdate,$sortup); | |||
$ismake = $ishtml==0 ? -1 : 0; | |||
$title = preg_replace("#\"#", '"', $title); | |||
$title = cn_substrR($title,$cfg_title_maxlen); | |||
$shorttitle = cn_substrR($shorttitle,36); | |||
$color = cn_substrR($color,7); | |||
$writer = cn_substrR($writer,20); | |||
$source = cn_substrR($source,30); | |||
$description = cn_substrR($description,$cfg_auot_description); | |||
$keywords = cn_substrR($keywords,60); | |||
$filename = trim(cn_substrR($filename,40)); | |||
$userip = GetIP(); | |||
$isremote = (empty($isremote)? 0 : $isremote); | |||
$serviterm=empty($serviterm)? "" : $serviterm; | |||
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')) | |||
{ | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if(empty($ddisremote)) | |||
{ | |||
$ddisremote = 0; | |||
} | |||
$litpic = GetDDImage('none',$picname,$ddisremote); | |||
//使用第一张图作为缩略图 | |||
if($ddisfirst==1 && $litpic=='') | |||
{ | |||
if(isset($imgurl1)) | |||
{ | |||
$litpic = GetDDImage('ddfirst', $imgurl1, $isrm); | |||
} | |||
} | |||
//生成文档ID | |||
$arcID = GetIndexKey($arcrank,$typeid,$sortrank,$channelid,$senddate,$adminid); | |||
if(empty($arcID)) | |||
{ | |||
ShowMsg("无法获得主键,因此无法进行后续操作!","-1"); | |||
exit(); | |||
} | |||
$imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; | |||
$hasone = FALSE; | |||
//处理并保存从网上复制的图片 | |||
/*--------------------- | |||
function _getformhtml() | |||
------------------*/ | |||
if($formhtml==1) | |||
{ | |||
$imagebody = stripslashes($imagebody); | |||
$imgurls .= GetCurContentAlbum($imagebody,$copysource,$litpicname); | |||
if($ddisfirst==1 && $litpic=='' && !empty($litpicname)) | |||
{ | |||
$litpic = $litpicname; | |||
$hasone = TRUE; | |||
} | |||
} | |||
/*--------------------- | |||
function _getformzip() | |||
处理从ZIP中解压的图片 | |||
---------------------*/ | |||
if($formzip==1) | |||
{ | |||
include_once(DEDEINC."/zip.class.php"); | |||
include_once(DEDEADMIN."/file_class.php"); | |||
$zipfile = $cfg_basedir.str_replace($cfg_mainsite,'',$zipfile); | |||
$tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()),16); | |||
$ntime = time(); | |||
if(file_exists($zipfile)) | |||
{ | |||
@mkdir($tmpzipdir,$GLOBALS['cfg_dir_purview']); | |||
@chmod($tmpzipdir,$GLOBALS['cfg_dir_purview']); | |||
$z = new zip(); | |||
$z->ExtractAll($zipfile,$tmpzipdir); | |||
$fm = new FileManagement(); | |||
$imgs = array(); | |||
$fm->GetMatchFiles($tmpzipdir,"jpg|png|gif",$imgs); | |||
$i = 0; | |||
foreach($imgs as $imgold) | |||
{ | |||
$i++; | |||
$savepath = $cfg_image_dir."/".MyDate("Y-m",$ntime); | |||
CreateDir($savepath); | |||
$iurl = $savepath."/".MyDate("d",$ntime).dd2char(MyDate("His",$ntime).'-'.$adminid."-{$i}".mt_rand(1000,9999)); | |||
$iurl = $iurl.substr($imgold,-4,4); | |||
$imgfile = $cfg_basedir.$iurl; | |||
copy($imgold,$imgfile); | |||
unlink($imgold); | |||
if(is_file($imgfile)) | |||
{ | |||
$litpicname = $pagestyle > 2 ? GetImageMapDD($iurl,$cfg_ddimg_width) : $iurl; | |||
//指定了提取第一张为缩略图的情况强制使用第一张缩略图 | |||
if($i=='1') | |||
{ | |||
if(!$hasone && $ddisfirst==1 && $litpic=='' && empty($litpicname)) | |||
{ | |||
$litpicname = GetImageMapDD($iurl,$cfg_ddimg_width); | |||
} | |||
} | |||
$info = ''; | |||
$imginfos = GetImageSize($imgfile,$info); | |||
$imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
//把图片信息保存到媒体文档管理档案中 | |||
$inquery = " | |||
INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | |||
VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid'); | |||
"; | |||
$dsql->ExecuteNoneQuery($inquery); | |||
$fid = $dsql->GetLastID(); | |||
AddMyAddon($fid, $iurl); | |||
WaterImg($imgfile, 'up'); | |||
if(!$hasone && $ddisfirst==1 && $litpic=='') | |||
{ | |||
if(empty($litpicname)) | |||
{ | |||
$litpicname = $iurl; | |||
$litpicname = GetImageMapDD($iurl, $cfg_ddimg_width); | |||
} | |||
$litpic = $litpicname; | |||
$hasone = TRUE; | |||
} | |||
} | |||
} | |||
if($delzip==1) unlink($zipfile); | |||
$fm->RmDirFiles($tmpzipdir); | |||
} | |||
} | |||
/*--------------------- | |||
function _getformupload() | |||
通过swfupload正常上传的图片 | |||
---------------------*/ | |||
if(is_array($_SESSION['bigfile_info'])) | |||
{ | |||
foreach($_SESSION['bigfile_info'] as $k=>$v) | |||
{ | |||
$truefile = $cfg_basedir.$v; | |||
if(strlen($v)<2 || !file_exists($truefile)) continue; | |||
$info = ''; | |||
$imginfos = GetImageSize($truefile, $info); | |||
$litpicname = $pagestyle > 2 ? GetImageMapDD($v, $cfg_ddimg_width) : ''; | |||
if(!$hasone && $ddisfirst==1 && $litpic=='') | |||
{ | |||
$litpic = empty($litpicname) ? GetImageMapDD($v, $cfg_ddimg_width) : $litpicname; | |||
$hasone = TRUE; | |||
} | |||
$imginfo = !empty(${'picinfook'.$k}) ? ${'picinfook'.$k} : ''; | |||
$imgurls .= "{dede:img ddimg='$v' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; | |||
} | |||
} | |||
$imgurls = addslashes($imgurls); | |||
//处理body字段自动摘要、自动提取缩略图等 | |||
$body = AnalyseHtmlBody($body,$description,$litpic,$keywords,'htmltext'); | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(!empty($dede_addonfields)) | |||
{ | |||
$addonfields = explode(';',$dede_addonfields); | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(is_array($addonfields)) | |||
{ | |||
foreach($addonfields as $v) | |||
{ | |||
if($v=='') | |||
{ | |||
continue; | |||
} | |||
$vs = explode(',',$v); | |||
if(!isset(${$vs[0]})) | |||
{ | |||
${$vs[0]} = ''; | |||
} | |||
else if($vs[1]=='htmltext'||$vs[1]=='textdata') //HTML文本特殊处理 | |||
{ | |||
${$vs[0]} = AnalyseHtmlBody(${$vs[0]},$description,$litpic,$keywords,$vs[1]); | |||
} | |||
else | |||
{ | |||
if(!isset(${$vs[0]})) | |||
{ | |||
${$vs[0]} = ''; | |||
} | |||
${$vs[0]} = GetFieldValueA(${$vs[0]},$vs[1],$arcID); | |||
} | |||
$inadd_f .= ','.$vs[0]; | |||
$inadd_v .= " ,'".${$vs[0]}."' "; | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if($litpic!='' && !preg_match("#p#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'p' : $flag.',p'); | |||
} | |||
if($redirecturl!='' && !preg_match("#j#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if(preg_match("#j#", $flag)) $ismake = -1; | |||
//加入主档案表 | |||
$query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, | |||
color,writer,source,litpic,pubdate,senddate,mid,notpost,description,keywords,filename,dutyadmin,weight) | |||
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', | |||
'$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$notpost','$description','$keywords','$filename','$adminid','$weight'); "; | |||
if(!$dsql->ExecuteNoneQuery($query)) | |||
{ | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery(" DELETE FROM `#@__arctiny` WHERE id='$arcID' "); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCms官方。".str_replace('"','',$gerr),"javascript:;"); | |||
exit(); | |||
} | |||
//加入附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if(empty($addtable)) | |||
{ | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作!。","javascript:;"); | |||
exit(); | |||
} | |||
$useip = GetIP(); | |||
$query = "INSERT INTO `$addtable`(aid,typeid,redirecturl,userip,pagestyle,maxwidth,imgurls,row,col,isrm,ddmaxwidth,pagepicnum,body{$inadd_f}) | |||
Values('$arcID','$typeid','$redirecturl','$useip','$pagestyle','$maxwidth','$imgurls','$row','$col','$isrm','$ddmaxwidth','$pagepicnum','$body'{$inadd_v}); "; | |||
if(!$dsql->ExecuteNoneQuery($query)) | |||
{ | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCMS官方。".str_replace('"','',$gerr),"javascript:;"); | |||
exit(); | |||
} | |||
//生成HTML | |||
InsertTags($tags,$arcID); | |||
if($cfg_remote_site=='Y' && $isremote=="1") | |||
{ | |||
if($serviterm!=""){ | |||
list($servurl,$servuser,$servpwd) = explode(',',$serviterm); | |||
$config=array( 'hostname' => $servurl, 'username' => $servuser, 'password' => $servpwd,'debug' => 'TRUE'); | |||
}else{ | |||
$config=array(); | |||
} | |||
if(!$ftp->connect($config)) exit('Error:None FTP Connection!'); | |||
} | |||
$artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | |||
if($artUrl=='') | |||
{ | |||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
} | |||
ClearMyAddon($arcID, $title); | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<a href='album_add.php?cid=$typeid'><u>继续发布图片</u></a> | |||
| |||
<a href='archives_do.php?aid=".$arcID."&dopost=editArchives'><u>更改图集</u></a> | |||
| |||
<a href='$artUrl' target='_blank'><u>预览文档</u></a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives'><u>已发布图片管理</u></a> | |||
| |||
$backurl | |||
"; | |||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||
$wintitle = "成功发布一个图集!"; | |||
$wecome_info = "文章管理::发布图集"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功发布一个图集:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand"," ",FALSE); | |||
$win->Display(); | |||
} |
@@ -0,0 +1,433 @@ | |||
<?php | |||
/** | |||
* 图集编辑 | |||
* | |||
* @version $Id: album_edit.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if(empty($dopost)) $dopost = ''; | |||
if($dopost!='save') | |||
{ | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
ClearMyAddon(); | |||
$aid = intval($aid); | |||
//读取归档信息 | |||
$arcQuery = "SELECT ch.typename as channelname,ar.membername as rankname,arc.* | |||
FROM `#@__archives` arc | |||
LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel | |||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; | |||
$arcRow = $dsql->GetOne($arcQuery); | |||
if(!is_array($arcRow)) | |||
{ | |||
ShowMsg("读取档案基本信息出错!","-1"); | |||
exit(); | |||
} | |||
$query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||
$cInfos = $dsql->GetOne($query); | |||
if(!is_array($cInfos)) | |||
{ | |||
ShowMsg("读取频道配置信息出错!","javascript:;"); | |||
exit(); | |||
} | |||
$addtable = $cInfos['addtable']; | |||
$addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); | |||
$channelid = $arcRow['channel']; | |||
$imgurls = $addRow["imgurls"]; | |||
$maxwidth = $addRow["maxwidth"]; | |||
$pagestyle = $addRow["pagestyle"]; | |||
$irow = $addRow["row"]; | |||
$icol = $addRow["col"]; | |||
$isrm = $addRow["isrm"]; | |||
$body = $addRow["body"]; | |||
$ddmaxwidth = $addRow["ddmaxwidth"]; | |||
$pagepicnum = $addRow["pagepicnum"]; | |||
$tags = GetTags($aid); | |||
$arcRow=XSSClean($arcRow);$addRow=XSSClean($addRow); | |||
include DedeInclude("templets/album_edit.htm"); | |||
exit(); | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ | |||
else if($dopost=='save') | |||
{ | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',', $flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1: 0; | |||
if(empty($typeid2)) $typeid2 = 0; | |||
if(!isset($autokey)) $autokey = 0; | |||
if(!isset($remote)) $remote = 0; | |||
if(!isset($dellink)) $dellink = 0; | |||
if(!isset($autolitpic)) $autolitpic = 0; | |||
if(!isset($formhtml)) $formhtml = 0; | |||
if(!isset($formzip)) $formzip = 0; | |||
if(!isset($ddisfirst)) $ddisfirst = 0; | |||
if(!isset($delzip)) $delzip = 0; | |||
if($typeid==0) | |||
{ | |||
ShowMsg("请指定文档的栏目!","-1"); | |||
exit(); | |||
} | |||
if(empty($channelid)) | |||
{ | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!","-1"); | |||
exit(); | |||
} | |||
if(!CheckChannel($typeid,$channelid)) | |||
{ | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!","-1"); | |||
exit(); | |||
} | |||
if(!TestPurview('a_Edit')) | |||
{ | |||
if(TestPurview('a_AccEdit')) | |||
{ | |||
CheckCatalog($typeid,"对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||
} | |||
else | |||
{ | |||
CheckArcAdmin($id,$cuserLogin->getUserID()); | |||
} | |||
} | |||
//对保存的内容进行处理 | |||
$pubdate = GetMkTime($pubdate); | |||
$sortrank = AddDay($pubdate,$sortup); | |||
$ismake = $ishtml==0 ? -1 : 0; | |||
$title = cn_substrR($title,$cfg_title_maxlen); | |||
$shorttitle = cn_substrR($shorttitle,36); | |||
$color = cn_substrR($color,7); | |||
$writer = cn_substrR($writer,20); | |||
$source = cn_substrR($source,30); | |||
$description = cn_substrR($description,250); | |||
$keywords = trim(cn_substrR($keywords,60)); | |||
$filename = trim(cn_substrR($filename,40)); | |||
$isremote = (empty($isremote)? 0 : $isremote); | |||
$serviterm=empty($serviterm)? "" : $serviterm; | |||
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')) | |||
{ | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if(empty($ddisremote)) | |||
{ | |||
$ddisremote = 0; | |||
} | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
//分析body里的内容 | |||
$body = AnalyseHtmlBody($body, $description, $litpic, $keywords, 'htmltext'); | |||
//处理图片文档的自定义属性 | |||
if($litpic!='' && !preg_match("#p#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'p' : $flag.',p'); | |||
} | |||
if($redirecturl!='' && !preg_match("#j#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if(preg_match("#j#", $flag)) $ismake = -1; | |||
//更新数据库的SQL语句 | |||
$query = " | |||
UPDATE `#@__archives` SET | |||
typeid='$typeid', | |||
typeid2='$typeid2', | |||
sortrank='$sortrank', | |||
flag='$flag', | |||
click='$click', | |||
ismake='$ismake', | |||
arcrank='$arcrank', | |||
money='$money', | |||
title='$title', | |||
color='$color', | |||
source='$source', | |||
writer='$writer', | |||
litpic='$litpic', | |||
pubdate='$pubdate', | |||
notpost='$notpost', | |||
description='$description', | |||
keywords='$keywords', | |||
shorttitle='$shorttitle', | |||
filename='$filename', | |||
dutyadmin='$adminid' | |||
WHERE id='$id'; "; | |||
if(!$dsql->ExecuteNoneQuery($query)) | |||
{ | |||
ShowMsg("更新数据库archives表时出错,请检查!".$dsql->GetError(),"javascript:;"); | |||
exit(); | |||
} | |||
$imgurls = "{dede:pagestyle maxwidth='$maxwidth' pagepicnum='$pagepicnum' ddmaxwidth='$ddmaxwidth' row='$row' col='$col' value='$pagestyle'/}\r\n"; | |||
$hasone = false; | |||
//---------------------------------------- | |||
//检查旧的图片是否有更新,并保存 | |||
//----------------------------------------- | |||
for($i=1; $i<=120; $i++) | |||
{ | |||
if( !isset(${'imgurl'.$i}) ) continue; | |||
$info = ''; | |||
$iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); | |||
$iurl = stripslashes(${'imgurl'.$i}); | |||
$ddurl = stripslashes(${'imgddurl'.$i}); | |||
if(preg_match("#swfupload#i", $ddurl)) $ddurl = ''; | |||
$imgfile = $cfg_basedir.$iurl; | |||
$litimgfile = $cfg_basedir.$ddurl; | |||
//有上传文件的情况 | |||
if( isset(${'imgfile'.$i}) && is_uploaded_file(${'imgfile'.$i}) ) | |||
{ | |||
$tmpFile = ${'imgfile'.$i}; | |||
//检测上传的图片, 如果类型不对,保留原来图片 | |||
$imginfos = @GetImageSize($tmpFile, $info); | |||
if(!is_array($imginfos)) | |||
{ | |||
$imginfos = @GetImageSize($imgfile, $info); | |||
$imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
continue; | |||
} | |||
move_uploaded_file($tmpFile, $imgfile); | |||
$imginfos = @GetImageSize($imgfile, $info); | |||
if($ddurl==$iurl) | |||
{ | |||
$litpicname = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | |||
$litimgfile = $cfg_basedir.$litpicname; | |||
} | |||
else | |||
{ | |||
if($cfg_ddimg_full=='Y') ImageResizeNew($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); | |||
else ImageResize($imgfile, $cfg_ddimg_width, $cfg_ddimg_height, $litimgfile); | |||
$litpicname = $ddurl; | |||
} | |||
$imgurls .= "{dede:img ddimg='$litpicname' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
} | |||
//没上传图片(只修改msg信息) | |||
else | |||
{ | |||
$iinfo = str_replace("'", "`", stripslashes(${'imgmsg'.$i})); | |||
$iurl = stripslashes(${'imgurl'.$i}); | |||
$ddurl = stripslashes(${'imgddurl'.$i}); | |||
if(preg_match("#swfupload#i", $ddurl)) | |||
{ | |||
$ddurl = $pagestyle > 2 ? GetImageMapDD($iurl, $cfg_ddimg_width) : $iurl; | |||
} | |||
$imginfos = @GetImageSize($imgfile, $info); | |||
$imgurls .= "{dede:img ddimg='$ddurl' text='$iinfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
} | |||
} | |||
//---------------------------- | |||
//从HTML中获取新图片 | |||
//---------------------------- | |||
if($formhtml==1 && !empty($imagebody)) | |||
{ | |||
$imagebody = stripslashes($imagebody); | |||
$imgurls .= GetCurContentAlbum($imagebody,$copysource,$litpicname); | |||
if($ddisfirst==1 && $litpic=="" && !empty($litpicname)) | |||
{ | |||
$litpic = $litpicname; | |||
$hasone = true; | |||
} | |||
} | |||
/*--------------------- | |||
function _getformzip() | |||
从ZIP文件中获取新图片 | |||
---------------------*/ | |||
if($formzip==1) | |||
{ | |||
include_once(DEDEINC."/zip.class.php"); | |||
include_once(DEDEADMIN."/file_class.php"); | |||
$zipfile = $cfg_basedir.str_replace($cfg_mainsite,'',$zipfile); | |||
$tmpzipdir = DEDEDATA.'/ziptmp/'.cn_substr(md5(ExecTime()),16); | |||
$ntime = time(); | |||
if(file_exists($zipfile)) | |||
{ | |||
@mkdir($tmpzipdir,$GLOBALS['cfg_dir_purview']); | |||
@chmod($tmpzipdir,$GLOBALS['cfg_dir_purview']); | |||
$z = new zip(); | |||
$z->ExtractAll($zipfile,$tmpzipdir); | |||
$fm = new FileManagement(); | |||
$imgs = array(); | |||
$fm->GetMatchFiles($tmpzipdir,"jpg|png|gif",$imgs); | |||
$i = 0; | |||
foreach($imgs as $imgold) | |||
{ | |||
$i++; | |||
$savepath = $cfg_image_dir."/".MyDate("Y-m",$ntime); | |||
CreateDir($savepath); | |||
$iurl = $savepath."/".MyDate("d",$ntime).dd2char(MyDate("His",$ntime).'-'.$adminid."-{$i}".mt_rand(1000,9999)); | |||
$iurl = $iurl.substr($imgold,-4,4); | |||
$imgfile = $cfg_basedir.$iurl; | |||
copy($imgold,$imgfile); | |||
unlink($imgold); | |||
if(is_file($imgfile)) | |||
{ | |||
$litpicname = $pagestyle > 2 ? GetImageMapDD($iurl,$cfg_ddimg_width) : $iurl; | |||
$info = ''; | |||
$imginfos = GetImageSize($imgfile,$info); | |||
$imgurls .= "{dede:img ddimg='$litpicname' text='' width='".$imginfos[0]."' height='".$imginfos[1]."'} $iurl {/dede:img}\r\n"; | |||
//把图片信息保存到媒体文档管理档案中 | |||
$inquery = " | |||
INSERT INTO #@__uploads(title,url,mediatype,width,height,playtime,filesize,uptime,mid) | |||
VALUES ('{$title}','{$iurl}','1','".$imginfos[0]."','".$imginfos[1]."','0','".filesize($imgfile)."','".$ntime."','$adminid'); | |||
"; | |||
$dsql->ExecuteNoneQuery($inquery); | |||
if(!$hasone && $ddisfirst==1 | |||
&& $litpic=="" && !empty($litpicname)) | |||
{ | |||
if( file_exists($cfg_basedir.$litpicname) ) | |||
{ | |||
$litpic = $litpicname; | |||
$hasone = true; | |||
} | |||
} | |||
} | |||
} | |||
if($delzip==1) | |||
{ | |||
unlink($zipfile); | |||
} | |||
$fm->RmDirFiles($tmpzipdir); | |||
} | |||
} | |||
/*--------------------- | |||
function _swfupload() | |||
通过swfupload上传的新图片 | |||
---------------------*/ | |||
if(is_array($_SESSION['bigfile_info'])) | |||
{ | |||
foreach($_SESSION['bigfile_info'] as $k=>$v) | |||
{ | |||
$truefile = $cfg_basedir.$v; | |||
if(strlen($v)<2 || !file_exists($truefile)) continue; | |||
$info = ''; | |||
$imginfos = GetImageSize($truefile, $info); | |||
$litpicname = $pagestyle > 2 ? GetImageMapDD($v, $cfg_ddimg_width) : $v; | |||
$imginfo = !empty(${'picinfook'.$k}) ? ${'picinfook'.$k} : ''; | |||
$imgurls .= "{dede:img ddimg='$litpicname' text='$imginfo' width='".$imginfos[0]."' height='".$imginfos[1]."'} $v {/dede:img}\r\n"; | |||
} | |||
} | |||
$imgurls = addslashes($imgurls); | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(!empty($dede_addonfields)) | |||
{ | |||
$addonfields = explode(';', $dede_addonfields); | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(is_array($addonfields)) | |||
{ | |||
foreach($addonfields as $v) | |||
{ | |||
if($v=='') | |||
{ | |||
continue; | |||
} | |||
$vs = explode(',',$v); | |||
if($vs[1]=='htmltext'||$vs[1]=='textdata') //HTML文本特殊处理 | |||
{ | |||
${$vs[0]} = AnalyseHtmlBody(${$vs[0]},$description,$litpic,$keywords,$vs[1]); | |||
}else{ | |||
if(!isset(${$vs[0]})) | |||
{ | |||
${$vs[0]} = ''; | |||
} | |||
${$vs[0]} = GetFieldValueA(${$vs[0]},$vs[1],$id); | |||
} | |||
$inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; | |||
} | |||
} | |||
} | |||
//更新附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if($addtable!='') | |||
{ | |||
$useip = GetIP(); | |||
$query = "Update `$addtable` | |||
set typeid='$typeid', | |||
pagestyle='$pagestyle', | |||
body='$body', | |||
maxwidth = '$maxwidth', | |||
ddmaxwidth = '$ddmaxwidth', | |||
pagepicnum = '$pagepicnum', | |||
imgurls='$imgurls', | |||
row='$row', | |||
col='$col', | |||
isrm='$isrm'{$inadd_f}, | |||
redirecturl='$redirecturl', | |||
userip = '$useip' | |||
WHERE aid='$id'; "; | |||
if(!$dsql->ExecuteNoneQuery($query)) | |||
{ | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!".$dsql->GetError(),"javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
UpIndexKey($id,$arcrank,$typeid,$sortrank,$tags); | |||
if($cfg_remote_site=='Y' && $isremote=="1") | |||
{ | |||
if($serviterm!=""){ | |||
list($servurl,$servuser,$servpwd) = explode(',',$serviterm); | |||
$config=array( 'hostname' => $servurl, 'username' => $servuser, 'password' => $servpwd,'debug' => 'TRUE'); | |||
}else{ | |||
$config=array(); | |||
} | |||
if(!$ftp->connect($config)) exit('Error:None FTP Connection!'); | |||
} | |||
$arcUrl = MakeArt($id,true,true,$isremote); | |||
if($arcUrl=='') | |||
{ | |||
$arcUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
} | |||
ClearMyAddon($id, $title); | |||
//返回成功信息 | |||
$msg = | |||
" 请选择你的后续操作: | |||
<a href='album_add.php?cid=$typeid'><u>继续发布图片</u></a> | |||
| |||
<a href='archives_do.php?aid=".$id."&dopost=editArchives'><u>查看更改</u></a> | |||
| |||
<a href='$arcUrl' target='_blank'><u>预览文档</u></a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives'><u>管理已发布图片</u></a> | |||
| |||
$backurl | |||
"; | |||
$wintitle = "成功更改图集!"; | |||
$wecome_info = "文章管理::更改图集"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功更改一个图集:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand"," ",false); | |||
$win->Display(); | |||
} |
@@ -0,0 +1,21 @@ | |||
<?php | |||
/** | |||
* 图集测试 | |||
* | |||
* @version $Id: album_testhtml.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
AjaxHead(); | |||
$myhtml = UnicodeUrl2Gbk(stripslashes($myhtml)); | |||
echo "<div class='coolbg61'>[<a href='#' onclick='javascript:HideObj(\"_myhtml\")'>关闭</a>]</div>\r\n"; | |||
preg_match_all("/(src|SRC)=[\"|'| ]{0,}(http:\/\/(.*)\.(gif|jpg|jpeg|png))/isU", $myhtml, $img_array); | |||
$img_array = array_unique($img_array[2]); | |||
echo "<div class='coolbg62'><xmp>"; | |||
echo "捕获的图片:\r\n"; | |||
print_r($img_array); | |||
echo "</xmp></div>\r\n"; |
@@ -0,0 +1,375 @@ | |||
<?php | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('api_ucenter'); | |||
if(!function_exists('file_put_contents')){ function file_put_contents($filename, $s) | |||
{ | |||
$fp = @fopen($filename, 'w'); | |||
@fwrite($fp, $s); | |||
@fclose($fp); | |||
return TRUE; | |||
}} | |||
require_once(DEDEINC.'/dedetemplate.class.php'); | |||
if(file_exists(DEDEROOT.'/uc_client/client.php')) | |||
{ | |||
if(!defined('UC_API')) define('UC_API', ''); | |||
include_once DEDEROOT.'/uc_client/client.php'; | |||
} | |||
else | |||
{ | |||
ShowMsg('请安装UCenter模块!',-1); | |||
exit(); | |||
} | |||
$dopost = api_gpc('dopost','R'); | |||
$uc = new api_ucenter($dopost); | |||
class api_ucenter | |||
{ | |||
var $action; | |||
var $dtp; | |||
var $config; | |||
//php5构造函数PHP>=5.0 | |||
function __construct($ac = '') | |||
{ | |||
$action = 'uc_'.(empty($ac)||(!in_array($ac,array('install','edit'))) ? 'show' : trim($ac)); | |||
$this->dtp = new DedeTemplate(); | |||
$this->config = DEDEINC.'/common.inc.php'; | |||
$this->$action(); | |||
} | |||
//构造类成员PHP<5.0 | |||
function api_ucenter($ac = '') | |||
{ | |||
$this->__construct($ac); | |||
} | |||
function uc_install() | |||
{ | |||
$uc_setings = api_gpc('uc_setings','P'); | |||
if(!isset($uc_setings['authkey']) || empty($uc_setings['authkey'])) | |||
{ | |||
ShowMsg('请填写uc创始人密码!',-1); | |||
exit(); | |||
} | |||
$uc_setings['ucapi'] = preg_replace("/\/$/", '', trim($uc_setings['ucapi'])); | |||
if(empty($uc_setings['ucapi']) || !preg_match("/^(http:\/\/)/i", $uc_setings['ucapi'])) | |||
{ | |||
ShowMsg('请填正确的服务端地址以http://开头!',-1); | |||
exit(); | |||
} | |||
else | |||
{ | |||
if(!$uc_setings['ucip']) | |||
{ | |||
$temp = @parse_url($uc_setings['ucapi']); | |||
$uc_setings['ucapi'] = gethostbyname($temp['host']); | |||
if(ip2long($uc_setings['ucapi']) == -1 || ip2long($uc_setings['ucapi']) === FALSE) | |||
{ | |||
$uc_setings['ucip'] = '127.0.0.1'; | |||
} | |||
} | |||
} | |||
$ucinfo = api_fopen($uc_setings['ucapi'].'/index.php?m=app&a=ucinfo', 500, '', '', 1, $uc_setings['ucip']); | |||
list($status, $ucversion, $ucrelease, $uccharset, $ucdbcharset, $apptypes) = explode('|', $ucinfo); | |||
if($status != 'UC_STATUS_OK') | |||
{ | |||
ShowMsg('uc服务端地址无效,请仔细检查您安装的uc服务端地址!',-1); | |||
exit(); | |||
} | |||
else | |||
{ | |||
$ucdbcharset = strtolower($ucdbcharset ? str_replace('-', '', $ucdbcharset) : $ucdbcharset); | |||
if(UC_CLIENT_VERSION > $ucversion) | |||
{ | |||
ShowMsg('uc服务端版本不一致,您当前的uc客服端版本为:'.UC_CLIENT_VERSION.',而服务端版本为:'.$ucversion.'!',-1); | |||
exit(); | |||
} | |||
elseif($ucdbcharset != 'gbk') | |||
{ | |||
ShowMsg('uc服务端编码与DedeCMS编码不一致!要求您的uc服务端编码为:gbk编码.',-1); | |||
exit(); | |||
} | |||
//标签应用模板 | |||
$app_tagtemplates = 'apptagtemplates[template]='.urlencode('<a href="{url}" target="_blank">{title}</a>').'&'. | |||
'apptagtemplates[fields][title]='.urlencode('标题').'&'. | |||
'apptagtemplates[fields][writer]='.urlencode('作者').'&'. | |||
'apptagtemplates[fields][pubdate]='.urlencode('时间').'&'. | |||
'apptagtemplates[fields][url]='.urlencode('地址'); | |||
$postdata = 'm=app&a=add&ucfounder=&ucfounderpw='.urlencode($uc_setings['authkey']).'&apptype=OTHER&appname='.urlencode($GLOBALS['cfg_webname']).'&appurl='.urlencode($GLOBALS['cfg_basehost']).'&appip=&appcharset=gbk&appdbcharset=gbk&'.$app_tagtemplates.'&release='.UC_CLIENT_RELEASE; | |||
$ucconfig = api_fopen($uc_setings['ucapi'].'/index.php', 500, $postdata, '', 1, $uc_setings['ucip']); | |||
if(strstr($ucconfig,'<?xml')) | |||
{ | |||
$temp = explode('<?xml', $ucconfig); | |||
$ucconfig = $temp[0]; unset($temp); | |||
} | |||
if(empty($ucconfig)) | |||
{ | |||
ShowMsg('请填写有效的配置信息!',-1); | |||
exit(); | |||
} | |||
elseif($ucconfig == '-1') | |||
{ | |||
ShowMsg('创始人密码错误!',-1); | |||
exit(); | |||
} | |||
else | |||
{ | |||
list($appauthkey, $appid) = explode('|', $ucconfig); | |||
if(empty($appauthkey) || empty($appid)) | |||
{ | |||
ShowMsg('数据获取失败!',-1); | |||
exit(); | |||
} | |||
elseif($succeed = api_write_config($ucconfig."|".$uc_setings['ucapi']."|".$uc_setings['ucip'], $this->config)) | |||
{ | |||
ShowMsg('安装成功!',-1); | |||
exit(); | |||
} | |||
else | |||
{ | |||
ShowMsg('写入配置数据失败!'.$this->config.' 请设置可写权限!',-1); | |||
exit(); | |||
} | |||
} | |||
} | |||
} | |||
function uc_edit() | |||
{ | |||
$uc_setings = api_gpc('uc_setings','P'); | |||
$uc_dbpass = $uc_setings['dbpass'] == '********' ? UC_DBPW : $uc_setings['dbpass']; | |||
$fp = fopen($this->config, 'r'); | |||
$content = fread($fp, filesize($this->config)); | |||
$content = trim($content); | |||
$content = substr($content, -2) == '?>' ? substr($content, 0, -2) : $content; | |||
$content = strstr($content, '_|cfg_|GLOBALS') ? str_replace('_|cfg_|GLOBALS','cfg_|GLOBALS',$content) : $content; | |||
fclose($fp); | |||
$connect = ''; | |||
if($uc_setings['connect']) | |||
{ | |||
$uc_dblink = @mysql_connect($uc_setings['dbhost'], $uc_setings['dbuser'], $uc_dbpass, 1); | |||
if(!$uc_dblink) | |||
{ | |||
ShowMsg('数据库连接失败!',-1); | |||
exit(); | |||
}else{ | |||
mysql_close($uc_dblink); | |||
} | |||
$connect = 'mysql'; | |||
$content = api_insert_config($content, "/define\('UC_DBHOST',\s*'.*?'\);/i", "define('UC_DBHOST', '".$uc_setings['dbhost']."');"); | |||
$content = api_insert_config($content, "/define\('UC_DBUSER',\s*'.*?'\);/i", "define('UC_DBUSER', '".$uc_setings['dbuser']."');"); | |||
$content = api_insert_config($content, "/define\('UC_DBPW',\s*'.*?'\);/i", "define('UC_DBPW', '".$uc_dbpass."');"); | |||
$content = api_insert_config($content, "/define\('UC_DBNAME',\s*'.*?'\);/i", "define('UC_DBNAME', '".$uc_setings['dbname']."');"); | |||
$content = api_insert_config($content, "/define\('UC_DBTABLEPRE',\s*'.*?'\);/i", "define('UC_DBTABLEPRE', '`".$uc_setings['dbname'].'`.'.$uc_setings['dbtablepre']."');"); | |||
} | |||
$content = api_insert_config($content, "/define\('UC_CONNECT',\s*'.*?'\);/i", "define('UC_CONNECT', '$connect');"); | |||
$content = api_insert_config($content, "/define\('UC_KEY',\s*'.*?'\);/i", "define('UC_KEY', '".$uc_setings['authkey']."');"); | |||
$content = api_insert_config($content, "/define\('UC_API',\s*'.*?'\);/i", "define('UC_API', '".$uc_setings['ucapi']."');"); | |||
$content = api_insert_config($content, "/define\('UC_IP',\s*'.*?'\);/i", "define('UC_IP', '".$uc_setings['ucip']."');"); | |||
$content = api_insert_config($content, "/define\('UC_APPID',\s*'?.*?'?\);/i", "define('UC_APPID', '".UC_APPID."');"); | |||
$content .= '?>'; | |||
if($fp = @fopen($this->config, 'w')) | |||
{ | |||
@fwrite($fp, trim($content)); | |||
@fclose($fp); | |||
ShowMsg('配置已经更改!',-1); | |||
exit(); | |||
}else{ | |||
ShowMsg('写入配置数据失败!'.$this->config.' 请设置可写权限!',-1); | |||
exit(); | |||
} | |||
} | |||
function uc_show() | |||
{ | |||
$this->dtp->Assign('uc_config_file',$this->config); | |||
if(!defined('UC_APPID')) | |||
{ | |||
$this->dtp->LoadTemplate(DEDEADMIN.'/templets/api_ucenter_install.htm'); | |||
} | |||
else | |||
{ | |||
$uc_api_open = false; | |||
$ucapparray = uc_app_ls(); | |||
foreach($ucapparray as $apparray) | |||
{ | |||
if($apparray['appid'] == UC_APPID) | |||
{ | |||
$uc_api_open = true; | |||
break; | |||
} | |||
} | |||
if(!$uc_api_open) | |||
{ | |||
ShowMsg("DedeCMS没找到正确的uc配置!",-1); | |||
exit(); | |||
} | |||
list($dbname,$dbtablepre) = explode('.',str_replace('`','',UC_DBTABLEPRE)); | |||
$uc_setings = array('appid' => UC_APPID, 'ucapi' => UC_API, 'connect' => UC_CONNECT, 'dbhost' => UC_DBHOST, 'dbuser' => UC_DBUSER,'dbpass' => UC_DBPW, 'dbname' => $dbname, 'dbtablepre' => $dbtablepre,'ucip' => UC_IP,'authkey' => UC_KEY); | |||
$this->dtp->Assign('uc_setings',$uc_setings); | |||
$this->dtp->LoadTemplate(DEDEADMIN.'/templets/api_ucenter_edit.htm'); | |||
} | |||
$this->dtp->Display(); | |||
exit(); | |||
} | |||
} | |||
/* | |||
class uc_function{...} | |||
*/ | |||
function api_fopen($url, $limit = 0, $post = '', $cookie = '', $bysocket = FALSE, $ip = '', $timeout = 15, $block = TRUE) | |||
{ | |||
$return = ''; | |||
$matches = parse_url($url); | |||
$host = $matches['host']; | |||
$path = $matches['path'] ? $matches['path'].($matches['query'] ? '?'.$matches['query'] : '') : '/'; | |||
$port = !empty($matches['port']) ? $matches['port'] : 80; | |||
if($post) | |||
{ | |||
$out = "POST $path HTTP/1.0\r\n"; | |||
$out .= "Accept: */*\r\n"; | |||
//$out .= "Referer: $boardurl\r\n"; | |||
$out .= "Accept-Language: zh-cn\r\n"; | |||
$out .= "Content-Type: application/x-www-form-urlencoded\r\n"; | |||
$out .= "User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n"; | |||
$out .= "Host: $host\r\n"; | |||
$out .= 'Content-Length: '.strlen($post)."\r\n"; | |||
$out .= "Connection: Close\r\n"; | |||
$out .= "Cache-Control: no-cache\r\n"; | |||
$out .= "Cookie: $cookie\r\n\r\n"; | |||
$out .= $post; | |||
}else{ | |||
$out = "GET $path HTTP/1.0\r\n"; | |||
$out .= "Accept: */*\r\n"; | |||
//$out .= "Referer: $boardurl\r\n"; | |||
$out .= "Accept-Language: zh-cn\r\n"; | |||
$out .= "User-Agent: $_SERVER[HTTP_USER_AGENT]\r\n"; | |||
$out .= "Host: $host\r\n"; | |||
$out .= "Connection: Close\r\n"; | |||
$out .= "Cookie: $cookie\r\n\r\n"; | |||
} | |||
$fp = @fsockopen(($host ? $host : $ip), $port, $errno, $errstr, $timeout); | |||
if(!$fp) | |||
{ | |||
return ''; | |||
}else{ | |||
stream_set_blocking($fp, $block); | |||
stream_set_timeout($fp, $timeout); | |||
@fwrite($fp, $out); | |||
$status = stream_get_meta_data($fp); | |||
if(!$status['timed_out']) | |||
{ | |||
while (!feof($fp)) | |||
{ | |||
if(($header = @fgets($fp)) && ($header == "\r\n" || $header == "\n")) | |||
{ | |||
break; | |||
} | |||
} | |||
$stop = false; | |||
while(!feof($fp) && !$stop) | |||
{ | |||
$data = fread($fp, ($limit == 0 || $limit > 8192 ? 8192 : $limit)); | |||
$return .= $data; | |||
if($limit) | |||
{ | |||
$limit -= strlen($data); | |||
$stop = $limit <= 0; | |||
} | |||
} | |||
} | |||
@fclose($fp); | |||
return $return; | |||
} | |||
} | |||
function api_write_config($config, $file) | |||
{ | |||
$success = false; | |||
list($appauthkey, $appid, $ucdbhost, $ucdbname, $ucdbuser, $ucdbpw, $ucdbcharset, $uctablepre, $uccharset, $ucapi, $ucip) = explode('|', $config); | |||
if($content = file_get_contents($file)) | |||
{ | |||
$content = trim($content); | |||
$content = substr($content, -2) == '?>' ? substr($content, 0, -2) : $content; | |||
$content = strstr($content, '_|cfg_|GLOBALS') ? str_replace('_|cfg_|GLOBALS','cfg_|GLOBALS',$content) : $content; | |||
$link = mysql_connect($ucdbhost, $ucdbuser, $ucdbpw, 1); | |||
$uc_connnect = $link && mysql_select_db($ucdbname, $link) ? 'mysql' : ''; | |||
$content = api_insert_config($content, "/define\('UC_CONNECT',\s*'.*?'\);/i", "define('UC_CONNECT', '$uc_connnect');"); | |||
$content = api_insert_config($content, "/define\('UC_DBHOST',\s*'.*?'\);/i", "define('UC_DBHOST', '$ucdbhost');"); | |||
$content = api_insert_config($content, "/define\('UC_DBUSER',\s*'.*?'\);/i", "define('UC_DBUSER', '$ucdbuser');"); | |||
$content = api_insert_config($content, "/define\('UC_DBPW',\s*'.*?'\);/i", "define('UC_DBPW', '$ucdbpw');"); | |||
$content = api_insert_config($content, "/define\('UC_DBNAME',\s*'.*?'\);/i", "define('UC_DBNAME', '$ucdbname');"); | |||
$content = api_insert_config($content, "/define\('UC_DBCHARSET',\s*'.*?'\);/i", "define('UC_DBCHARSET', '$ucdbcharset');"); | |||
$content = api_insert_config($content, "/define\('UC_DBTABLEPRE',\s*'.*?'\);/i", "define('UC_DBTABLEPRE', '`$ucdbname`.$uctablepre');"); | |||
$content = api_insert_config($content, "/define\('UC_DBCONNECT',\s*'.*?'\);/i", "define('UC_DBCONNECT', '0');"); | |||
$content = api_insert_config($content, "/define\('UC_KEY',\s*'.*?'\);/i", "define('UC_KEY', '$appauthkey');"); | |||
$content = api_insert_config($content, "/define\('UC_API',\s*'.*?'\);/i", "define('UC_API', '$ucapi');"); | |||
$content = api_insert_config($content, "/define\('UC_CHARSET',\s*'.*?'\);/i", "define('UC_CHARSET', '$uccharset');"); | |||
$content = api_insert_config($content, "/define\('UC_IP',\s*'.*?'\);/i", "define('UC_IP', '$ucip');"); | |||
$content = api_insert_config($content, "/define\('UC_APPID',\s*'?.*?'?\);/i", "define('UC_APPID', '$appid');"); | |||
$content = api_insert_config($content, "/define\('UC_PPP',\s*'?.*?'?\);/i", "define('UC_PPP', '20');"); | |||
$content .= "\r\n".'?>'; | |||
if(@file_put_contents($file, $content)) | |||
{ | |||
$success = true; | |||
} | |||
} | |||
return $success; | |||
} | |||
function api_insert_config($s, $find, $replace) | |||
{ | |||
if(preg_match($find, $s)) | |||
{ | |||
$s = preg_replace($find, $replace, $s); | |||
}else{ | |||
// 插入到最后一行 | |||
$s .= "\r\n".$replace; | |||
} | |||
return $s; | |||
} | |||
function api_gpc($k, $var='R') | |||
{ | |||
switch($var) | |||
{ | |||
case 'G': $var = &$_GET; break; | |||
case 'P': $var = &$_POST; break; | |||
case 'C': $var = &$_COOKIE; break; | |||
case 'R': $var = &$_REQUEST; break; | |||
} | |||
return isset($var[$k]) ? $var[$k] : NULL; | |||
} | |||
if(!function_exists('file_put_contents')){ function file_put_contents($filename, $s) | |||
{ | |||
$fp = @fopen($filename, 'w'); | |||
@fwrite($fp, $s); | |||
@fclose($fp); | |||
return TRUE; | |||
}} | |||
?> |
@@ -0,0 +1,240 @@ | |||
<?php | |||
/** | |||
* 文档发布 | |||
* | |||
* @version $Id: archives_add.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__).'/config.php'); | |||
CheckPurview('a_New,a_AccNew'); | |||
require_once(DEDEINC.'/customfields.func.php'); | |||
require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
if(empty($dopost)) $dopost = ''; | |||
if($dopost != 'save') | |||
{ | |||
require_once(DEDEINC.'/dedetag.class.php'); | |||
require_once(DEDEADMIN.'/inc/inc_catalog_options.php'); | |||
ClearMyAddon(); | |||
$channelid = empty($channelid) ? 0 : intval($channelid); | |||
$cid = empty($cid) ? 0 : intval($cid); | |||
//获得频道模型ID | |||
if($cid > 0 && $channelid == 0) | |||
{ | |||
$row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
$channelid = $row['channeltype']; | |||
} | |||
else | |||
{ | |||
if($channelid==0) | |||
{ | |||
ShowMsg('无法识别模型信息,因此无法操作!', '-1'); | |||
exit(); | |||
} | |||
} | |||
//获得频道模型信息 | |||
$cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$channelid = $cInfos['id']; | |||
//获取文章最大id以确定当前权重 | |||
$maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); | |||
include DedeInclude('templets/archives_add.htm'); | |||
exit(); | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ | |||
else if($dopost=='save') | |||
{ | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',',$flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1: 0; | |||
if(empty($click)) $click = ($cfg_arc_click=='-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if(empty($typeid2)) $typeid2 = 0; | |||
if(!isset($autokey)) $autokey = 0; | |||
if(!isset($remote)) $remote = 0; | |||
if(!isset($dellink)) $dellink = 0; | |||
if(!isset($autolitpic)) $autolitpic = 0; | |||
if(empty($click)) $click = ($cfg_arc_click=='-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if($typeid==0) | |||
{ | |||
ShowMsg('请指定文档的栏目!', '-1'); | |||
exit(); | |||
} | |||
if(empty($channelid)) | |||
{ | |||
ShowMsg('文档为非指定的类型,请检查你发布内容的表单是否合法!', '-1'); | |||
exit(); | |||
} | |||
if(!CheckChannel($typeid,$channelid) ) | |||
{ | |||
ShowMsg('你所选择的栏目与当前模型不相符,请选择白色的选项!', '-1'); | |||
exit(); | |||
} | |||
if(!TestPurview('a_New')) | |||
{ | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的权限!"); | |||
} | |||
//对保存的内容进行处理 | |||
if(empty($writer)) $writer = $cuserLogin->getUserName(); | |||
if(empty($source)) $source = '未知'; | |||
$pubdate = GetMkTime($pubdate); | |||
$senddate = time(); | |||
$sortrank = AddDay($pubdate,$sortup); | |||
$ismake = $ishtml == 0 ? -1 : 0; | |||
$title = preg_replace("#\"#", '"', $title); | |||
$title = cn_substrR($title,$cfg_title_maxlen); | |||
$shorttitle = cn_substrR($shorttitle,36); | |||
$color = cn_substrR($color,7); | |||
$writer = cn_substrR($writer,20); | |||
$source = cn_substrR($source,30); | |||
$description = cn_substrR($description,$cfg_auot_description); | |||
$keywords = cn_substrR($keywords,60); | |||
$filename = trim(cn_substrR($filename,40)); | |||
$userip = GetIP(); | |||
$isremote = (empty($isremote)? 0 : $isremote); | |||
$voteid = (empty($voteid)? 0 : $voteid); | |||
$serviterm=empty($serviterm)? "" : $serviterm; | |||
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')) | |||
{ | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if(empty($ddisremote)) | |||
{ | |||
$ddisremote = 0; | |||
} | |||
$litpic = GetDDImage('none',$picname,$ddisremote); | |||
//生成文档ID | |||
$arcID = GetIndexKey($arcrank,$typeid,$sortrank,$channelid,$senddate,$adminid); | |||
if(empty($arcID)) | |||
{ | |||
ShowMsg("无法获得主键,因此无法进行后续操作!","-1"); | |||
exit(); | |||
} | |||
//分析处理附加表数据 | |||
$inadd_f = $inadd_v = ''; | |||
if(!empty($dede_addonfields)) | |||
{ | |||
$addonfields = explode(';', $dede_addonfields); | |||
if(is_array($addonfields)) | |||
{ | |||
foreach($addonfields as $v) | |||
{ | |||
if($v=='') continue; | |||
$vs = explode(',', $v); | |||
if($vs[1]=='htmltext' || $vs[1]=='textdata') | |||
{ | |||
${$vs[0]} = AnalyseHtmlBody(${$vs[0]}, $description, $litpic, $keywords, $vs[1]); | |||
} | |||
else | |||
{ | |||
if(!isset(${$vs[0]})) ${$vs[0]} = ''; | |||
${$vs[0]} = GetFieldValueA(${$vs[0]}, $vs[1], $arcID); | |||
} | |||
$inadd_f .= ','.$vs[0]; | |||
$inadd_v .= " ,'".${$vs[0]}."' "; | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if($litpic!='' && !preg_match("#p#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'p' : $flag.',p'); | |||
} | |||
if($redirecturl!='' && !preg_match("#j#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if(preg_match("#j#", $flag)) $ismake = -1; | |||
//保存到主表 | |||
$query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, | |||
color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) | |||
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money','$title','$shorttitle', | |||
'$color','$writer','$source','$litpic','$pubdate','$senddate','$adminid','$voteid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; | |||
if(!$dsql->ExecuteNoneQuery($query)) | |||
{ | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCms官方。".str_replace('"','',$gerr),"javascript:;"); | |||
exit(); | |||
} | |||
//保存到附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if(!empty($addtable)) | |||
{ | |||
$useip = GetIP(); | |||
$query = "INSERT INTO `{$addtable}`(aid,typeid,redirecturl,userip{$inadd_f}) Values('$arcID','$typeid','$redirecturl','$useip'{$inadd_v})"; | |||
if(!$dsql->ExecuteNoneQuery($query)) | |||
{ | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCms官方。".str_replace('"','',$gerr),"javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
InsertTags($tags, $arcID); | |||
if($cfg_remote_site=='Y' && $isremote=="1") | |||
{ | |||
if($serviterm!="") | |||
{ | |||
list($servurl,$servuser,$servpwd) = explode(',',$serviterm); | |||
$config=array( 'hostname' => $servurl, 'username' => $servuser, | |||
'password' => $servpwd,'debug' => 'TRUE'); | |||
} else { | |||
$config=array(); | |||
} | |||
if(!$ftp->connect($config)) exit('Error:None FTP Connection!'); | |||
} | |||
$artUrl = MakeArt($arcID, true, true,$isremote); | |||
if($artUrl=='') | |||
{ | |||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
} | |||
ClearMyAddon($arcID, $title); | |||
//返回成功信息 | |||
$msg = " 请选择你的后续操作: | |||
<a href='archives_add.php?cid=$typeid'><u>继续发布文档</u></a> | |||
| |||
<a href='$artUrl' target='_blank'><u>查看文档</u></a> | |||
| |||
<a href='archives_do.php?aid=".$arcID."&dopost=editArchives'><u>更改文档</u></a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives'><u>已发布文档管理</u></a> | |||
| |||
$backurl | |||
"; | |||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||
$wintitle = '成功发布文档!'; | |||
$wecome_info = '文档管理::发布文档'; | |||
$win = new OxWindow(); | |||
$win->AddTitle('成功发布文档:'); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow('hand', ' ', false); | |||
$win->Display(); | |||
} |
@@ -0,0 +1,248 @@ | |||
<?php | |||
/** | |||
* 文档编辑 | |||
* | |||
* @version $Id: archives_edit.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if(empty($dopost)) $dopost = ''; | |||
if($dopost!='save') | |||
{ | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
ClearMyAddon(); | |||
$aid = intval($aid); | |||
//读取归档信息 | |||
$arcQuery = "SELECT ch.typename as channelname,ar.membername as rankname,arc.* | |||
FROM `#@__archives` arc | |||
LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel | |||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' | |||
"; | |||
$arcRow = $dsql->GetOne($arcQuery); | |||
if(!is_array($arcRow)) | |||
{ | |||
ShowMsg("读取档案基本信息出错!","-1"); | |||
exit(); | |||
} | |||
$query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||
$cInfos = $dsql->GetOne($query); | |||
if(!is_array($cInfos)) | |||
{ | |||
ShowMsg("读取频道配置信息出错!","javascript:;"); | |||
exit(); | |||
} | |||
$addtable = $cInfos['addtable']; | |||
$addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); | |||
$channelid = $arcRow['channel']; | |||
$tags = GetTags($aid); | |||
include DedeInclude("templets/archives_edit.htm"); | |||
exit(); | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ | |||
else if($dopost=='save') | |||
{ | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',',$flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1: 0; | |||
if(empty($typeid2)) $typeid2 = 0; | |||
if(!isset($autokey)) $autokey = 0; | |||
if(!isset($remote)) $remote = 0; | |||
if(!isset($dellink)) $dellink = 0; | |||
if(!isset($autolitpic)) $autolitpic = 0; | |||
if(!isset($writer)) $writer = ''; | |||
if($typeid==0) | |||
{ | |||
ShowMsg("请指定文档的栏目!","-1"); | |||
exit(); | |||
} | |||
if(empty($channelid)) | |||
{ | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!","-1"); | |||
exit(); | |||
} | |||
if(!CheckChannel($typeid,$channelid)) | |||
{ | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!","-1"); | |||
exit(); | |||
} | |||
if(!TestPurview('a_Edit')) | |||
{ | |||
if(TestPurview('a_AccEdit')) | |||
{ | |||
CheckCatalog($typeid,"对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||
} | |||
else | |||
{ | |||
CheckArcAdmin($id,$cuserLogin->getUserID()); | |||
} | |||
} | |||
//对保存的内容进行处理 | |||
$pubdate = GetMkTime($pubdate); | |||
$sortrank = AddDay($pubdate, $sortup); | |||
$ismake = $ishtml==0 ? -1 : 0; | |||
$title = cn_substrR($title, $cfg_title_maxlen); | |||
$shorttitle = cn_substrR($shorttitle, 36); | |||
$color = cn_substrR($color, 7); | |||
$writer = cn_substrR($writer, 20); | |||
$source = cn_substrR($source, 30); | |||
$description = cn_substrR($description, $cfg_auot_description); | |||
$keywords = trim(cn_substrR($keywords, 60)); | |||
$filename = trim(cn_substrR($filename, 40)); | |||
$isremote = (empty($isremote)? 0 : $isremote); | |||
$serviterm=empty($serviterm)? "" : $serviterm; | |||
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if(empty($ddisremote)) $ddisremote = 0; | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(!empty($dede_addonfields)) | |||
{ | |||
$addonfields = explode(';',$dede_addonfields); | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(is_array($addonfields)) | |||
{ | |||
foreach($addonfields as $v) | |||
{ | |||
if($v=='') | |||
{ | |||
continue; | |||
} | |||
$vs = explode(',',$v); | |||
if($vs[1]=='htmltext'||$vs[1]=='textdata') //HTML文本特殊处理 | |||
{ | |||
${$vs[0]} = AnalyseHtmlBody(${$vs[0]},$description,$litpic,$keywords,$vs[1]); | |||
}else | |||
{ | |||
if(!isset(${$vs[0]})) | |||
{ | |||
${$vs[0]} = ''; | |||
} | |||
${$vs[0]} = GetFieldValueA(${$vs[0]},$vs[1],$id); | |||
} | |||
$inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if($litpic!='' && !preg_match("#p#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'p' : $flag.',p'); | |||
} | |||
if($redirecturl!='' && !preg_match("#j#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if(preg_match("#j#", $flag)) $ismake = -1; | |||
//更新数据库的SQL语句 | |||
$inQuery = "UPDATE `#@__archives` SET | |||
typeid='$typeid', | |||
typeid2='$typeid2', | |||
sortrank='$sortrank', | |||
flag='$flag', | |||
notpost='$notpost', | |||
click='$click', | |||
ismake='$ismake', | |||
arcrank='$arcrank', | |||
money='$money', | |||
title='$title', | |||
color='$color', | |||
writer='$writer', | |||
source='$source', | |||
litpic='$litpic', | |||
pubdate='$pubdate', | |||
description='$description', | |||
keywords='$keywords', | |||
shorttitle='$shorttitle', | |||
filename='$filename', | |||
dutyadmin='$adminid', | |||
weight='$weight' | |||
WHERE id='$id'; "; | |||
if(!$dsql->ExecuteNoneQuery($inQuery)) | |||
{ | |||
ShowMsg("更新数据库archives表时出错,请检查!","-1"); | |||
exit(); | |||
} | |||
$cts = $dsql->GetOne("SELECT addtable From `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if($addtable!='') | |||
{ | |||
$useip = GetIP(); | |||
$iquery = "UPDATE `$addtable` SET typeid='$typeid'{$inadd_f},redirecturl='$redirecturl',userip='$useip' WHERE aid='$id' "; | |||
if(!$dsql->ExecuteNoneQuery($iquery)) | |||
{ | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!","javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | |||
if($cfg_remote_site=='Y' && $isremote=="1") | |||
{ | |||
if($serviterm!="") | |||
{ | |||
list($servurl, $servuser, $servpwd) = explode(',', $serviterm); | |||
$config=array( 'hostname' => $servurl, 'username' => $servuser, 'password' => $servpwd,'debug' => 'TRUE'); | |||
} else { | |||
$config=array(); | |||
} | |||
if(!$ftp->connect($config)) exit('Error:None FTP Connection!'); | |||
} | |||
$artUrl = MakeArt($id, TRUE, TRUE, $isremote); | |||
if($artUrl=='') | |||
{ | |||
$artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
} | |||
ClearMyAddon($id, $title); | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<a href='archives_add.php?cid=$typeid'><u>发布新文档</u></a> | |||
| |||
<a href='archives_do.php?aid=".$id."&dopost=editArchives'><u>查看更改</u></a> | |||
| |||
<a href='$artUrl' target='_blank'><u>查看文档</u></a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives'><u>管理文档</u></a> | |||
| |||
$backurl | |||
"; | |||
$wintitle = "成功更改文档!"; | |||
$wecome_info = "文档管理::更改文档"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功更改文档:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand"," ",false); | |||
$win->Display(); | |||
} |
@@ -0,0 +1,197 @@ | |||
<?php | |||
/** | |||
* 单表模型文档发布 | |||
* | |||
* @version $Id: archives_sg_add.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_New,a_AccNew'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if(empty($dopost)) $dopost = ''; | |||
if($dopost!='save') | |||
{ | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
ClearMyAddon(); | |||
$channelid = empty($channelid) ? 0 : intval($channelid); | |||
$cid = empty($cid) ? 0 : intval($cid); | |||
//获得频道模型ID | |||
if($cid > 0 && $channelid == 0) | |||
{ | |||
$row = $dsql->GetOne("SELECT channeltype FROM `#@__arctype` WHERE id='$cid'; "); | |||
$channelid = $row['channeltype']; | |||
} | |||
else | |||
{ | |||
if($channelid==0) | |||
{ | |||
ShowMsg("无法识别模型信息,因此无法操作!","-1"); | |||
exit(); | |||
} | |||
} | |||
//获得频道模型信息 | |||
$cInfos = $dsql->GetOne(" SELECT * FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$channelid = $cInfos['id']; | |||
include DedeInclude("templets/archives_sg_add.htm"); | |||
exit(); | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ | |||
else if($dopost=='save') | |||
{ | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
if($typeid==0) | |||
{ | |||
ShowMsg("请指定文档的栏目!","-1"); | |||
exit(); | |||
} | |||
if(empty($channelid)) | |||
{ | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!","-1"); | |||
exit(); | |||
} | |||
if(!CheckChannel($typeid,$channelid) ) | |||
{ | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!","-1"); | |||
exit(); | |||
} | |||
if(!TestPurview('a_New')) | |||
{ | |||
CheckCatalog($typeid,"对不起,你没有操作栏目 {$typeid} 的权限!"); | |||
} | |||
//对保存的内容进行处理 | |||
if(empty($writer))$writer=$cuserLogin->getUserName(); | |||
if(empty($source))$source='未知'; | |||
if(empty($flags)) $flag = ''; | |||
else $flag = join(',', $flags); | |||
$senddate = time(); | |||
$title = cn_substrR($title,$cfg_title_maxlen); | |||
$isremote = (empty($isremote)? 0 : $isremote); | |||
$serviterm=empty($serviterm)? "" : $serviterm; | |||
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | |||
$adminid = $cuserLogin->getUserID(); | |||
$userip = GetIP(); | |||
if(empty($ddisremote)) $ddisremote = 0; | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
//生成文档ID | |||
$arcID = GetIndexKey($arcrank, $typeid, $senddate, $channelid, $senddate, $adminid); | |||
if(empty($arcID)) | |||
{ | |||
ShowMsg("无法获得主键,因此无法进行后续操作!","-1"); | |||
exit(); | |||
} | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(!empty($dede_addonfields)) | |||
{ | |||
$addonfields = explode(';',$dede_addonfields); | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(is_array($addonfields)) | |||
{ | |||
foreach($addonfields as $v) | |||
{ | |||
if($v=='') | |||
{ | |||
continue; | |||
} | |||
$vs = explode(',',$v); | |||
if($vs[1]=='htmltext'||$vs[1]=='textdata') //HTML文本特殊处理 | |||
{ | |||
${$vs[0]} = AnalyseHtmlBody(${$vs[0]},$description,$litpic,$keywords,$vs[1]); | |||
} | |||
else | |||
{ | |||
if(!isset(${$vs[0]})) | |||
{ | |||
${$vs[0]} = ''; | |||
} | |||
${$vs[0]} = GetFieldValueA(${$vs[0]},$vs[1],$arcID); | |||
} | |||
$inadd_f .= ','.$vs[0]; | |||
$inadd_v .= " ,'".${$vs[0]}."' "; | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if($litpic!='' && !preg_match("#p#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'p' : $flag.',p'); | |||
} | |||
//保存到附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if(!empty($addtable)) | |||
{ | |||
$query = "INSERT INTO `{$addtable}`(aid,typeid,channel,arcrank,mid,click,title,senddate,flag,litpic,userip{$inadd_f}) | |||
VALUES('$arcID','$typeid','$channelid','$arcrank','$adminid','0','$title','$senddate','$flag','$litpic','$userip'{$inadd_v})"; | |||
if(!$dsql->ExecuteNoneQuery($query)) | |||
{ | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCms官方。".str_replace('"','',$gerr),"javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
if($cfg_remote_site=='Y' && $isremote=="1") | |||
{ | |||
if($serviterm!="") | |||
{ | |||
list($servurl, $servuser, $servpwd) = explode(',', $serviterm); | |||
$config=array( 'hostname' => $servurl, 'username' => $servuser, 'password' => $servpwd,'debug' => 'TRUE'); | |||
} else { | |||
$config=array(); | |||
} | |||
if(!$ftp->connect($config)) exit('Error:None FTP Connection!'); | |||
} | |||
$artUrl = MakeArt($arcID, TRUE, TRUE, $isremote); | |||
if($artUrl=='') | |||
{ | |||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
} | |||
ClearMyAddon($arcID, $title); | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<a href='archives_sg_add.php?cid=$typeid'><u>继续发布文档</u></a> | |||
| |||
<a href='$artUrl' target='_blank'><u>查看文档</u></a> | |||
| |||
<a href='archives_do.php?aid=".$arcID."&dopost=editArchives'><u>更改文档</u></a> | |||
| |||
<a href='content_sg_list.php?cid=$typeid&channelid={$channelid}&dopost=listArchives'><u>已发布文档管理</u></a> | |||
| |||
<a href='catalog_main.php'><u>网站栏目管理</u></a> | |||
"; | |||
$wintitle = "成功发布文档!"; | |||
$wecome_info = "文档管理::发布文档"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功发布文档:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand"," ",false); | |||
$win->Display(); | |||
} |
@@ -0,0 +1,181 @@ | |||
<?php | |||
/** | |||
* 单表模型文档编辑 | |||
* | |||
* @version $Id: archives_sg_edit.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if(empty($dopost)) $dopost = ''; | |||
if($dopost!='save') | |||
{ | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
ClearMyAddon(); | |||
$aid = intval($aid); | |||
//读取归档信息 | |||
$arcQuery = "SELECT ch.*,arc.* FROM `#@__arctiny` arc | |||
LEFT JOIN `#@__channeltype` ch on ch.id=arc.channel WHERE arc.id='$aid' "; | |||
$cInfos = $dsql->GetOne($arcQuery); | |||
if(!is_array($cInfos)) | |||
{ | |||
ShowMsg("读频道模型信息出错!","-1"); | |||
exit(); | |||
} | |||
$addtable = $cInfos['addtable']; | |||
$addRow = $dsql->GetOne("SELECT arc.*,ar.membername as rankname FROM `$addtable` arc LEFT JOIN `#@__arcrank` ar on ar.rank=arc.arcrank WHERE arc.aid='$aid'"); | |||
$channelid = $cInfos['channel']; | |||
$tags = GetTags($aid); | |||
include DedeInclude('templets/archives_sg_edit.htm'); | |||
exit(); | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ | |||
else if($dopost=='save') | |||
{ | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
if($typeid==0) | |||
{ | |||
ShowMsg("请指定文档的栏目!","-1"); | |||
exit(); | |||
} | |||
if(empty($channelid)) | |||
{ | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!","-1"); | |||
exit(); | |||
} | |||
if(!CheckChannel($typeid,$channelid)) | |||
{ | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!","-1"); | |||
exit(); | |||
} | |||
if(!TestPurview('a_Edit')) | |||
{ | |||
if(TestPurview('a_AccEdit')) | |||
{ | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||
} | |||
else | |||
{ | |||
CheckArcAdmin($id,$cuserLogin->getUserID()); | |||
} | |||
} | |||
//对保存的内容进行处理 | |||
if(empty($flags)) $flag = ''; | |||
else $flag = join(',', $flags); | |||
$title = cn_substrR($title, $cfg_title_maxlen); | |||
$isremote = (empty($isremote)? 0 : $isremote); | |||
$serviterm=empty($serviterm)? "" : $serviterm; | |||
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')) $arcrank = -1; | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if(empty($ddisremote)) $ddisremote = 0; | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(!empty($dede_addonfields)) | |||
{ | |||
$addonfields = explode(';', $dede_addonfields); | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(is_array($addonfields)) | |||
{ | |||
foreach($addonfields as $v) | |||
{ | |||
if($v=='') | |||
{ | |||
continue; | |||
} | |||
$vs = explode(',',$v); | |||
if($vs[1]=='htmltext'||$vs[1]=='textdata') //HTML文本特殊处理 | |||
{ | |||
${$vs[0]} = AnalyseHtmlBody(${$vs[0]},$description,$litpic,$keywords,$vs[1]); | |||
}else | |||
{ | |||
if(!isset(${$vs[0]})) | |||
{ | |||
${$vs[0]} = ''; | |||
} | |||
${$vs[0]} = GetFieldValueA(${$vs[0]},$vs[1],$id); | |||
} | |||
$inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if($litpic!='' && !preg_match("#p#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'p' : $flag.',p'); | |||
} | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if($addtable!='') | |||
{ | |||
$iquery = "UPDATE `$addtable` SET typeid='$typeid',arcrank='$arcrank',title='$title',flag='$flag',litpic='$litpic'{$inadd_f} WHERE aid='$id' "; | |||
if(!$dsql->ExecuteNoneQuery($iquery)) | |||
{ | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!","javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
UpIndexKey($id, $arcrank, $typeid, $sortrank, ''); | |||
if($cfg_remote_site=='Y' && $isremote=="1") | |||
{ | |||
if($serviterm!="") | |||
{ | |||
list($servurl, $servuser, $servpwd) = explode(',', $serviterm); | |||
$config = array( 'hostname' => $servurl, 'username' => $servuser, | |||
'password' => $servpwd,'debug' => 'TRUE'); | |||
} else { | |||
$config = array(); | |||
} | |||
if(!$ftp->connect($config)) exit('Error:None FTP Connection!'); | |||
} | |||
$artUrl = MakeArt($id, TRUE, TRUE, $isremote); | |||
if($artUrl=='') $artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
ClearMyAddon($id, $title); | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<a href='archives_sg_add.php?cid=$typeid'><u>发布新文档</u></a> | |||
| |||
<a href='archives_do.php?aid=".$id."&dopost=editArchives'><u>查看更改</u></a> | |||
| |||
<a href='$artUrl' target='_blank'><u>查看文档</u></a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&channelid={$channelid}&dopost=listArchives'><u>管理文档</u></a> | |||
| |||
<a href='catalog_main.php'><u>网站栏目管理</u></a> | |||
"; | |||
$wintitle = "成功更改文档!"; | |||
$wecome_info = "文档管理::更改文档"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功更改文档:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand"," ",false); | |||
$win->Display(); | |||
} |
@@ -0,0 +1,285 @@ | |||
<?php | |||
require_once(dirname(__FILE__).'/config.php'); | |||
CheckPurview('a_New,a_AccNew'); | |||
require_once(DEDEINC.'/customfields.func.php'); | |||
require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); | |||
if(file_exists(DEDEDATA.'/template.rand.php')) | |||
{ | |||
require_once(DEDEDATA.'/template.rand.php'); | |||
} | |||
if(empty($dopost)) $dopost = ''; | |||
if($dopost!='save') | |||
{ | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
ClearMyAddon(); | |||
$channelid = empty($channelid) ? 0 : intval($channelid); | |||
$cid = empty($cid) ? 0 : intval($cid); | |||
if(empty($geturl)) $geturl = ''; | |||
$keywords = $writer = $source = $body = $description = $title = ''; | |||
//采集单个网页 | |||
if(preg_match("#^http:\/\/#", $geturl)) | |||
{ | |||
require_once(DEDEADMIN."/inc/inc_coonepage.php"); | |||
$redatas = CoOnePage($geturl); | |||
extract($redatas); | |||
} | |||
//获得频道模型ID | |||
if($cid>0 && $channelid==0) | |||
{ | |||
$row = $dsql->GetOne("Select channeltype From `#@__arctype` where id='$cid'; "); | |||
$channelid = $row['channeltype']; | |||
} | |||
else | |||
{ | |||
if($channelid==0) | |||
{ | |||
$channelid = 1; | |||
} | |||
} | |||
//获得频道模型信息 | |||
$cInfos = $dsql->GetOne(" Select * From `#@__channeltype` where id='$channelid' "); | |||
//获取文章最大id以确定当前权重 | |||
$maxWright = $dsql->GetOne("SELECT COUNT(*) AS cc FROM #@__archives"); | |||
include DedeInclude("templets/article_add.htm"); | |||
exit(); | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ | |||
else if($dopost=='save') | |||
{ | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',',$flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1: 0; | |||
if(empty($typeid2)) $typeid2 = ''; | |||
if(!isset($autokey)) $autokey = 0; | |||
if(!isset($remote)) $remote = 0; | |||
if(!isset($dellink)) $dellink = 0; | |||
if(!isset($autolitpic)) $autolitpic = 0; | |||
if(empty($click)) $click = ($cfg_arc_click=='-1' ? mt_rand(50, 200) : $cfg_arc_click); | |||
if(empty($typeid)) | |||
{ | |||
ShowMsg("请指定文档的栏目!","-1"); | |||
exit(); | |||
} | |||
if(empty($channelid)) | |||
{ | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!","-1"); | |||
exit(); | |||
} | |||
if(!CheckChannel($typeid,$channelid)) | |||
{ | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!","-1"); | |||
exit(); | |||
} | |||
if(!TestPurview('a_New')) | |||
{ | |||
CheckCatalog($typeid,"对不起,你没有操作栏目 {$typeid} 的权限!"); | |||
} | |||
//对保存的内容进行处理 | |||
if(empty($writer))$writer=$cuserLogin->getUserName(); | |||
if(empty($source))$source='未知'; | |||
$pubdate = GetMkTime($pubdate); | |||
$senddate = time(); | |||
$sortrank = AddDay($pubdate,$sortup); | |||
$ismake = $ishtml==0 ? -1 : 0; | |||
$title = preg_replace("#\"#", '"', $title); | |||
$title = dede_htmlspecialchars(cn_substrR($title,$cfg_title_maxlen)); | |||
$shorttitle = cn_substrR($shorttitle,36); | |||
$color = cn_substrR($color,7); | |||
$writer = cn_substrR($writer,20); | |||
$source = cn_substrR($source,30); | |||
$description = cn_substrR($description,$cfg_auot_description); | |||
$keywords = cn_substrR($keywords,60); | |||
$filename = trim(cn_substrR($filename,40)); | |||
$userip = GetIP(); | |||
$isremote = (empty($isremote)? 0 : $isremote); | |||
$serviterm=empty($serviterm)? "" : $serviterm; | |||
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')) | |||
{ | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if(empty($ddisremote)) | |||
{ | |||
$ddisremote = 0; | |||
} | |||
$litpic = GetDDImage('none', $picname, $ddisremote); | |||
//生成文档ID | |||
$arcID = GetIndexKey($arcrank,$typeid,$sortrank,$channelid,$senddate,$adminid); | |||
if(empty($arcID)) | |||
{ | |||
ShowMsg("无法获得主键,因此无法进行后续操作!","-1"); | |||
exit(); | |||
} | |||
if(trim($title) == '') | |||
{ | |||
ShowMsg('标题不能为空', '-1'); | |||
exit(); | |||
} | |||
//处理body字段自动摘要、自动提取缩略图等 | |||
$body = AnalyseHtmlBody($body,$description,$litpic,$keywords,'htmltext'); | |||
//自动分页 | |||
if($sptype=='auto') | |||
{ | |||
$body = SpLongBody($body,$spsize*1024,"#p#分页标题#e#"); | |||
} | |||
//分析处理附加表数据 | |||
$inadd_f = $inadd_v = ''; | |||
if(!empty($dede_addonfields)) | |||
{ | |||
$addonfields = explode(';',$dede_addonfields); | |||
if(is_array($addonfields)) | |||
{ | |||
foreach($addonfields as $v) | |||
{ | |||
if($v=='') continue; | |||
$vs = explode(',',$v); | |||
if($vs[1]=='htmltext'||$vs[1]=='textdata') | |||
{ | |||
${$vs[0]} = AnalyseHtmlBody(${$vs[0]},$description,$litpic,$keywords,$vs[1]); | |||
} | |||
else | |||
{ | |||
if(!isset(${$vs[0]})) ${$vs[0]} = ''; | |||
${$vs[0]} = GetFieldValueA(${$vs[0]},$vs[1],$arcID); | |||
} | |||
$inadd_f .= ','.$vs[0]; | |||
$inadd_v .= " ,'".${$vs[0]}."' "; | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if($litpic!='' && !preg_match("#p#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'p' : $flag.',p'); | |||
} | |||
if($redirecturl!='' && !preg_match("#j#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if(preg_match("#j#", $flag)) $ismake = -1; | |||
//保存到主表 | |||
$query = "INSERT INTO `#@__archives`(id,typeid,typeid2,sortrank,flag,ismake,channel,arcrank,click,money,title,shorttitle, | |||
color,writer,source,litpic,pubdate,senddate,mid,voteid,notpost,description,keywords,filename,dutyadmin,weight) | |||
VALUES ('$arcID','$typeid','$typeid2','$sortrank','$flag','$ismake','$channelid','$arcrank','$click','$money', | |||
'$title','$shorttitle','$color','$writer','$source','$litpic','$pubdate','$senddate', | |||
'$adminid','$voteid','$notpost','$description','$keywords','$filename','$adminid','$weight');"; | |||
if(!$dsql->ExecuteNoneQuery($query)) | |||
{ | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("把数据保存到数据库主表 `#@__archives` 时出错,请把相关信息提交给DedeCms官方。".str_replace('"','',$gerr),"javascript:;"); | |||
exit(); | |||
} | |||
//保存到附加表 | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if(empty($addtable)) | |||
{ | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__archives` WHERE id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctiny` WHERE id='$arcID'"); | |||
ShowMsg("没找到当前模型[{$channelid}]的主表信息,无法完成操作!。","javascript:;"); | |||
exit(); | |||
} | |||
$useip = GetIP(); | |||
$templet = empty($templet) ? '' : $templet; | |||
$query = "INSERT INTO `{$addtable}`(aid,typeid,redirecturl,templet,userip,body{$inadd_f}) Values('$arcID','$typeid','$redirecturl','$templet','$useip','$body'{$inadd_v})"; | |||
if(!$dsql->ExecuteNoneQuery($query)) | |||
{ | |||
$gerr = $dsql->GetError(); | |||
$dsql->ExecuteNoneQuery("Delete From `#@__archives` where id='$arcID'"); | |||
$dsql->ExecuteNoneQuery("Delete From `#@__arctiny` where id='$arcID'"); | |||
ShowMsg("把数据保存到数据库附加表 `{$addtable}` 时出错,请把相关信息提交给DedeCms官方。".str_replace('"','',$gerr),"javascript:;"); | |||
exit(); | |||
} | |||
//生成HTML | |||
InsertTags($tags,$arcID); | |||
if($cfg_remote_site=='Y' && $isremote=="1") | |||
{ | |||
if($serviterm!=""){ | |||
list($servurl,$servuser,$servpwd) = explode(',',$serviterm); | |||
$config=array( 'hostname' => $servurl, 'username' => $servuser, 'password' => $servpwd,'debug' => 'TRUE'); | |||
}else{ | |||
$config=array(); | |||
} | |||
if(!$ftp->connect($config)) exit('Error:None FTP Connection!'); | |||
} | |||
$picTitle = false; | |||
if(count($_SESSION['bigfile_info']) > 0) | |||
{ | |||
foreach ($_SESSION['bigfile_info'] as $k => $v) | |||
{ | |||
if(!empty($v)) | |||
{ | |||
$pictitle = ${'picinfook'.$k}; | |||
$titleSet = ''; | |||
if(!empty($pictitle)) | |||
{ | |||
$picTitle = TRUE; | |||
$titleSet = ",title='{$pictitle}'"; | |||
} | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__uploads` SET arcid='{$arcID}'{$titleSet} WHERE url LIKE '{$v}'; "); | |||
} | |||
} | |||
} | |||
$artUrl = MakeArt($arcID,true,true,$isremote); | |||
if($artUrl=='') | |||
{ | |||
$artUrl = $cfg_phpurl."/view.php?aid=$arcID"; | |||
} | |||
ClearMyAddon($arcID, $title); | |||
//返回成功信息 | |||
$msg = " 请选择你的后续操作: | |||
<a href='article_add.php?cid=$typeid'><u>继续发布文章</u></a> | |||
| |||
<a href='$artUrl' target='_blank'><u>查看文章</u></a> | |||
| |||
<a href='archives_do.php?aid=".$arcID."&dopost=editArchives'><u>更改文章</u></a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives'><u>已发布文章管理</u></a> | |||
| |||
$backurl | |||
"; | |||
$msg = "<div style=\"line-height:36px;height:36px\">{$msg}</div>".GetUpdateTest(); | |||
$wintitle = "成功发布文章!"; | |||
$wecome_info = "文章管理::发布文章"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功发布文章:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand"," ",false); | |||
$win->Display(); | |||
} | |||
?> |
@@ -0,0 +1,44 @@ | |||
<?php | |||
/** | |||
* 允许的站内链接 | |||
* | |||
* @version $Id: article_allowurl_edit.php 1 11:36 2010年10月8日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
require_once(DEDEINC."/oxwindow.class.php"); | |||
CheckPurview('sys_Source'); | |||
if(empty($dopost)) $dopost = ''; | |||
if(empty($allurls)) $allsource = ''; | |||
else $allurls = stripslashes($allurls); | |||
$m_file = DEDEDATA."/admin/allowurl.txt"; | |||
//保存 | |||
if($dopost=='save') | |||
{ | |||
$fp = fopen($m_file,'w'); | |||
flock($fp,3); | |||
fwrite($fp,$allurls); | |||
fclose($fp); | |||
echo "<script>alert('Save OK!');</script>"; | |||
} | |||
//读出 | |||
if(empty($allurls) && filesize($m_file)>0) | |||
{ | |||
$fp = fopen($m_file,'r'); | |||
$allurls = fread($fp,filesize($m_file)); | |||
fclose($fp); | |||
} | |||
$wintitle = ""; | |||
$wecome_info = "允许的超链接"; | |||
$win = new OxWindow(); | |||
$win->Init('article_allowurl_edit.php','js/blank.js','POST'); | |||
$win->AddHidden('dopost','save'); | |||
$win->AddTitle("每行保存一个超链接:"); | |||
$win->AddMsgItem("<textarea name='allurls' id='allurls' style='width:100%;height:300px'>$allurls</textarea>"); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); |
@@ -0,0 +1,130 @@ | |||
<?php | |||
/** | |||
* 文档规则采集 | |||
* | |||
* @version $Id: article_coonepage_rule.php 1 14:12 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
require_once(DEDEINC."/datalistcp.class.php"); | |||
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/"); | |||
if(empty($action)) $action = ''; | |||
/*------ | |||
function _AddNote(){ } | |||
-------*/ | |||
if($action == 'add') | |||
{ | |||
$row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE url LIKE '$url' "); | |||
if(is_array($row)) | |||
{ | |||
echo "系统已经存在这个网址的条目!"; | |||
} else { | |||
$query = " INSERT INTO `#@__co_onepage`(`url`,`title`,`issource`,`lang`,`rule`) Values('$url','$title','$issource','$lang','$rule'); "; | |||
$dsql->ExecuteNonequery($query); | |||
echo $dsql->GetError(); | |||
} | |||
} | |||
/*------ | |||
function _DelNote(){ } | |||
-------*/ | |||
else if($action == 'del') | |||
{ | |||
if(!preg_match("#,#", $ids)) | |||
{ | |||
$query = "DELETE FROM `#@__co_onepage` WHERE id='$ids' "; | |||
} | |||
else | |||
{ | |||
$query = "DELETE FROM `#@__co_onepage` WHERE id IN($ids) "; | |||
} | |||
$dsql->ExecuteNonequery($query); | |||
} | |||
/*------ | |||
function _EditNote(){ } | |||
-------*/ | |||
else if($action == 'editsave') | |||
{ | |||
$query = "UPDATE `#@__co_onepage` SET `url`='$url',`title`='$title',`issource`='$issource',`lang`='$lang',`rule`='$rule' WHERE id='$id' "; | |||
$dsql->ExecuteNonequery($query); | |||
echo $dsql->GetError(); | |||
} | |||
/*------ | |||
function _EditNoteLoad(){ } | |||
-------*/ | |||
else if($action == 'editload') | |||
{ | |||
$row = $dsql->GetOne("SELECT * FROM `#@__co_onepage` WHERE id='$id' "); | |||
AjaxHead(); | |||
?> | |||
<form name='addform' action='article_coonepage_rule.php' method='post'> | |||
<input type='hidden' name='id' value='<?php echo $id; ?>' /> | |||
<input type='hidden' name='action' value='editsave' /> | |||
<table width="430" border="0" cellspacing="0" cellpadding="0"> | |||
<tr> | |||
<td width="102" height="30">网站名称:</td> | |||
<td width="302"><input name="title" type="text" id="title" style="width:200px" value="<?php echo $row['title']; ?>" /></td> | |||
<td width="26" align="center"><a href="javascript:CloseEditNode()"><img src="images/close.gif" width="12" height="12" border="0" /></a></td> | |||
</tr> | |||
<tr> | |||
<td height="30">原内容编码:</td> | |||
<td colspan="2"> | |||
<input type="radio" name="lang" value="gb2312" <?php echo ($row['lang']=='gb2312' ? ' checked="checked" ' : ''); ?> /> | |||
GB2312/GBK | |||
<input type="radio" name="lang" value="utf-8" <?php echo ($row['lang']=='utf-8' ? ' checked="checked" ' : ''); ?> /> | |||
UTF-8 | |||
</td> | |||
</tr> | |||
<tr> | |||
<td height="30">用作文章来源:</td> | |||
<td colspan="2"> | |||
<input type="radio" name="issource" value="0" <?php echo ($row['issource']==0 ? ' checked="checked" ' : ''); ?> /> | |||
否 | |||
<input name="issource" type="radio" value="1" <?php echo ($row['issource']==1 ? ' checked="checked" ' : ''); ?> /> | |||
是 | |||
</td> | |||
</tr> | |||
<tr> | |||
<td height="30">网站网址:</td> | |||
<td colspan="2"> | |||
<input name="url" type="text" id="url" value="<?php echo $row['url']; ?>" style="width:200px" /> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td height="30"> </td> | |||
<td colspan="2"> | |||
使用不带http及任何附加目录的网址<br /> | |||
如:news.dedecms.com | |||
</td> | |||
</tr> | |||
<tr> | |||
<td height="30">采集规则:</td> | |||
<td colspan="2">仅针对文章内容,格式:前面HTML{@body}后面HMTL</td> | |||
</tr> | |||
<tr> | |||
<td height="90"> </td> | |||
<td colspan="2"><textarea name="rule" style="width:300px;height:80px"><?php echo $row['rule']; ?></textarea></td> | |||
</tr> | |||
<tr> | |||
<td height="32"> </td> | |||
<td colspan="2"><input class="nbt" type="submit" name="Submit" value="保存规则" /> | |||
<input type="reset" class="nbt" name="Submit2" value="重置" /></td> | |||
</tr> | |||
</table> | |||
</form> | |||
<?php | |||
exit(); | |||
} //loadedit | |||
/*--------------- | |||
function _ShowLoad(){ } | |||
-------------*/ | |||
$sql = ""; | |||
$sql = "SELECT id,url,title,lang,issource FROM `#@__co_onepage` ORDER BY id DESC"; | |||
$dlist = new DataListCP(); | |||
$dlist->SetTemplate(DEDEADMIN."/templets/article_coonepage_rule.htm"); | |||
$dlist->SetSource($sql); | |||
$dlist->Display(); |
@@ -0,0 +1,202 @@ | |||
<?php | |||
/** | |||
* 文档描述管理 | |||
* | |||
* @version $Id: article_description_main.php 1 14:12 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
@ob_start(); | |||
@set_time_limit(3600); | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('sys_Keyword'); | |||
if(empty($dojob)) $dojob = ''; | |||
if($dojob=='') | |||
{ | |||
include DedeInclude("templets/article_description_main.htm"); | |||
exit(); | |||
} | |||
else | |||
{ | |||
if(empty($startdd)) $startdd = 0; | |||
if(empty($pagesize)) $pagesize = 100; | |||
if(empty($totalnum)) $totalnum = 0; | |||
if(empty($sid)) $sid = 0; | |||
if(empty($eid)) $eid = 0; | |||
if(empty($dojob)) $dojob = 'des'; | |||
$table = preg_replace("#[^0-9a-zA-Z_\#@]#", "", $table); | |||
$field = preg_replace("#[^0-9a-zA-Z_\[\]]#", "", $field); | |||
$channel = intval($channel); | |||
if($dsize>250) $dsize = 250; | |||
$tjnum = 0; | |||
//获取自动摘要 | |||
if($dojob=='des') | |||
{ | |||
if(empty($totalnum)) | |||
{ | |||
$addquery = ""; | |||
if($sid!=0) | |||
{ | |||
$addquery .= " AND id>='$sid' "; | |||
} | |||
if($eid!=0) | |||
{ | |||
$addquery .= " AND id<='$eid' "; | |||
} | |||
$tjQuery = "SELECT COUNT(*) AS dd FROM #@__archives WHERE channel='{$channel}' $addquery"; | |||
$row = $dsql->GetOne($tjQuery); | |||
$totalnum = $row['dd']; | |||
} | |||
if($totalnum > 0) | |||
{ | |||
$addquery = ""; | |||
if($sid!=0) | |||
{ | |||
$addquery .= " AND #@__archives.id>='$sid' "; | |||
} | |||
if($eid!=0) | |||
{ | |||
$addquery .= " AND #@__archives.id<='$eid' "; | |||
} | |||
$fquery = "SELECT #@__archives.id,#@__archives.title,#@__archives.description,{$table}.{$field} | |||
FROM #@__archives LEFT JOIN {$table} ON {$table}.aid=#@__archives.id | |||
WHERE #@__archives.channel='{$channel}' $addquery LIMIT $startdd,$pagesize ; "; | |||
$dsql->SetQuery($fquery); | |||
$dsql->Execute(); | |||
while($row=$dsql->GetArray()) | |||
{ | |||
$body = $row[$field]; | |||
$description = $row['description']; | |||
if(strlen($description)>10 || $description=='-') | |||
{ | |||
continue; | |||
} | |||
$bodytext = preg_replace("/#p#|#e#|副标题|分页标题/isU","",Html2Text($body)); | |||
if(strlen($bodytext) < $msize) | |||
{ | |||
continue; | |||
} | |||
$des = trim(addslashes(cn_substr($bodytext,$dsize))); | |||
if(strlen($des)<3) | |||
{ | |||
$des = "-"; | |||
} | |||
$dsql->ExecuteNoneQuery("UPDATE #@__archives SET description='{$des}' WHERE id='{$row['id']}';"); | |||
} | |||
//返回进度信息 | |||
$startdd = $startdd + $pagesize; | |||
if($totalnum > $startdd) | |||
{ | |||
$tjlen = ceil( ($startdd/$totalnum) * 100 ); | |||
} else { | |||
$tjlen=100; | |||
ShowMsg('完成所有任务', 'javascript:;'); | |||
exit(); | |||
} | |||
$dvlen = $tjlen * 2; | |||
$tjsta = "<div style='width:200;height:15;border:1px solid #898989;text-align:left'><div style='width:$dvlen;height:15;background-color:#829D83'></div></div>"; | |||
$tjsta .= "<br/>完成处理文档总数的:$tjlen %,继续执行任务..."; | |||
$nurl = "article_description_main.php?totalnum=$totalnum&startdd={$startdd}&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; | |||
ShowMsg($tjsta,$nurl,0,500); | |||
exit(); | |||
} | |||
else | |||
{ | |||
ShowMsg('完成所有任务', 'javascript:;'); | |||
exit(); | |||
} | |||
}//获取自动摘要代码结束 | |||
//更新自动分页 | |||
if($dojob=='page') | |||
{ | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
$addquery = ""; | |||
if($sid!=0) | |||
{ | |||
$addquery .= " and aid>='$sid' "; | |||
} | |||
if($eid!=0) | |||
{ | |||
$addquery .= " and aid<='$eid' "; | |||
} | |||
//统计记录总数 | |||
if($totalnum==0) | |||
{ | |||
$sql = "SELECT COUNT(*) AS dd FROM $table WHERE 1 $addquery"; | |||
$row = $dsql->GetOne($sql); | |||
$totalnum = $row['dd']; | |||
} | |||
//获取记录,并分析 | |||
if($totalnum > $startdd+$pagesize) | |||
{ | |||
$limitSql = " LIMIT $startdd,$pagesize"; | |||
} | |||
else if(($totalnum-$startdd)>0) | |||
{ | |||
$limitSql = " LIMIT $startdd,".($totalnum - $startdd); | |||
} | |||
else | |||
{ | |||
$limitSql = ""; | |||
} | |||
$tjnum = $startdd; | |||
if($limitSql!="") | |||
{ | |||
$fquery = "SELECT aid,$field FROM $table WHERE 1 $addquery $limitSql ;"; | |||
$dsql->SetQuery($fquery); | |||
$dsql->Execute(); | |||
while($row=$dsql->GetArray()) | |||
{ | |||
$tjnum++; | |||
$body = $row[$field]; | |||
$aid = $row['aid']; | |||
if(strlen($body) < $msize) | |||
{ | |||
continue; | |||
} | |||
if(!preg_match("/#p#/iU",$body)) | |||
{ | |||
$body = SpLongBody($body,$cfg_arcautosp_size*1024,"#p#分页标题#e#"); | |||
$body = addslashes($body); | |||
$dsql->ExecuteNoneQuery("UPDATE $table SET $field='$body' WHERE aid='$aid' ; "); | |||
} | |||
} | |||
}//end if limit | |||
//返回进度提示 | |||
if($totalnum>0) | |||
{ | |||
$tjlen = ceil( ($tjnum/$totalnum) * 100 ); | |||
} | |||
else | |||
{ | |||
$tjlen=100; | |||
} | |||
$dvlen = $tjlen * 2; | |||
$tjsta = "<div style='width:200;height:15;border:1px solid #898989;text-align:left'><div style='width:$dvlen;height:15;background-color:#829D83'></div></div>"; | |||
$tjsta .= "<br/>完成处理文档总数的:$tjlen %,继续执行任务..."; | |||
if($tjnum < $totalnum) | |||
{ | |||
$nurl = "article_description_main.php?totalnum=$totalnum&startdd=".($startdd+$pagesize)."&pagesize=$pagesize&table={$table}&field={$field}&dsize={$dsize}&msize={$msize}&channel={$channel}&dojob={$dojob}"; | |||
ShowMsg($tjsta,$nurl,0,500); | |||
exit(); | |||
} | |||
else | |||
{ | |||
ShowMsg('完成所有任务', 'javascript:;'); | |||
exit(); | |||
} | |||
}//更新自动分页处理代码结束 | |||
} |
@@ -0,0 +1,266 @@ | |||
<?php | |||
/** | |||
* 文档编辑 | |||
* | |||
* @version $Id: article_edit.php 1 14:12 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('a_Edit,a_AccEdit,a_MyEdit'); | |||
require_once(DEDEINC."/customfields.func.php"); | |||
require_once(DEDEADMIN."/inc/inc_archives_functions.php"); | |||
if(file_exists(DEDEDATA.'/template.rand.php')) | |||
{ | |||
require_once(DEDEDATA.'/template.rand.php'); | |||
} | |||
if(empty($dopost)) $dopost = ''; | |||
$aid = isset($aid) && is_numeric($aid) ? $aid : 0; | |||
if($dopost!='save') | |||
{ | |||
require_once(DEDEADMIN."/inc/inc_catalog_options.php"); | |||
require_once(DEDEINC."/dedetag.class.php"); | |||
ClearMyAddon(); | |||
//读取归档信息 | |||
$query = "SELECT ch.typename AS channelname,ar.membername AS rankname,arc.* | |||
FROM `#@__archives` arc | |||
LEFT JOIN `#@__channeltype` ch ON ch.id=arc.channel | |||
LEFT JOIN `#@__arcrank` ar ON ar.rank=arc.arcrank WHERE arc.id='$aid' "; | |||
$arcRow = $dsql->GetOne($query); | |||
if(!is_array($arcRow)) | |||
{ | |||
ShowMsg("读取档案基本信息出错!","-1"); | |||
exit(); | |||
} | |||
$query = "SELECT * FROM `#@__channeltype` WHERE id='".$arcRow['channel']."'"; | |||
$cInfos = $dsql->GetOne($query); | |||
if(!is_array($cInfos)) | |||
{ | |||
ShowMsg("读取频道配置信息出错!","javascript:;"); | |||
exit(); | |||
} | |||
$addtable = $cInfos['addtable']; | |||
$addRow = $dsql->GetOne("SELECT * FROM `$addtable` WHERE aid='$aid'"); | |||
if(!is_array($addRow)) | |||
{ | |||
ShowMsg("读取附加信息出错!","javascript:;"); | |||
exit(); | |||
} | |||
$channelid = $arcRow['channel']; | |||
$tags = GetTags($aid); | |||
include DedeInclude("templets/article_edit.htm"); | |||
exit(); | |||
} | |||
/*-------------------------------- | |||
function __save(){ } | |||
-------------------------------*/ | |||
else if($dopost=='save') | |||
{ | |||
require_once(DEDEINC.'/image.func.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$flag = isset($flags) ? join(',',$flags) : ''; | |||
$notpost = isset($notpost) && $notpost == 1 ? 1: 0; | |||
if(empty($typeid2)) $typeid2 = 0; | |||
if(!isset($autokey)) $autokey = 0; | |||
if(!isset($remote)) $remote = 0; | |||
if(!isset($dellink)) $dellink = 0; | |||
if(!isset($autolitpic)) $autolitpic = 0; | |||
if(empty($typeid)) | |||
{ | |||
ShowMsg("请指定文档的栏目!", "-1"); | |||
exit(); | |||
} | |||
if(empty($channelid)) | |||
{ | |||
ShowMsg("文档为非指定的类型,请检查你发布内容的表单是否合法!", "-1"); | |||
exit(); | |||
} | |||
if(!CheckChannel($typeid, $channelid)) | |||
{ | |||
ShowMsg("你所选择的栏目与当前模型不相符,请选择白色的选项!", "-1"); | |||
exit(); | |||
} | |||
if(!TestPurview('a_Edit')) | |||
{ | |||
if(TestPurview('a_AccEdit')) | |||
{ | |||
CheckCatalog($typeid, "对不起,你没有操作栏目 {$typeid} 的文档权限!"); | |||
} | |||
else | |||
{ | |||
CheckArcAdmin($id, $cuserLogin->getUserID()); | |||
} | |||
} | |||
//对保存的内容进行处理 | |||
$pubdate = GetMkTime($pubdate); | |||
$sortrank = AddDay($pubdate,$sortup); | |||
$ismake = $ishtml==0 ? -1 : 0; | |||
$autokey = 1; | |||
$title = dede_htmlspecialchars(cn_substrR($title,$cfg_title_maxlen)); | |||
$shorttitle = cn_substrR($shorttitle,36); | |||
$color = cn_substrR($color,7); | |||
$writer = cn_substrR($writer,20); | |||
$source = cn_substrR($source,30); | |||
$description = cn_substrR($description,250); | |||
$keywords = trim(cn_substrR($keywords,60)); | |||
$filename = trim(cn_substrR($filename,40)); | |||
$isremote = (empty($isremote)? 0 : $isremote); | |||
$serviterm=empty($serviterm)? "" : $serviterm; | |||
if(!TestPurview('a_Check,a_AccCheck,a_MyCheck')) | |||
{ | |||
$arcrank = -1; | |||
} | |||
$adminid = $cuserLogin->getUserID(); | |||
//处理上传的缩略图 | |||
if(empty($ddisremote)) | |||
{ | |||
$ddisremote = 0; | |||
} | |||
$litpic = GetDDImage('none',$picname,$ddisremote); | |||
//分析body里的内容 | |||
$body = AnalyseHtmlBody($body,$description,$litpic,$keywords,'htmltext'); | |||
//分析处理附加表数据 | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(!empty($dede_addonfields)) | |||
{ | |||
$addonfields = explode(';',$dede_addonfields); | |||
$inadd_f = ''; | |||
$inadd_v = ''; | |||
if(is_array($addonfields)) | |||
{ | |||
foreach($addonfields as $v) | |||
{ | |||
if($v=='') | |||
{ | |||
continue; | |||
} | |||
$vs = explode(',',$v); | |||
if($vs[1]=='htmltext'||$vs[1]=='textdata') //HTML文本特殊处理 | |||
{ | |||
${$vs[0]} = AnalyseHtmlBody(${$vs[0]},$description,$litpic,$keywords,$vs[1]); | |||
}else | |||
{ | |||
if(!isset(${$vs[0]})) | |||
{ | |||
${$vs[0]} = ''; | |||
} | |||
${$vs[0]} = GetFieldValueA(${$vs[0]},$vs[1],$id); | |||
} | |||
$inadd_f .= ",`{$vs[0]}` = '".${$vs[0]}."'"; | |||
} | |||
} | |||
} | |||
//处理图片文档的自定义属性 | |||
if($litpic!='' && !preg_match("#p#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'p' : $flag.',p'); | |||
} | |||
if($redirecturl!='' && !preg_match("#j#", $flag)) | |||
{ | |||
$flag = ($flag=='' ? 'j' : $flag.',j'); | |||
} | |||
//跳转网址的文档强制为动态 | |||
if(preg_match("#j#", $flag)) $ismake = -1; | |||
//更新数据库的SQL语句 | |||
$query = "UPDATE #@__archives SET | |||
typeid='$typeid', | |||
typeid2='$typeid2', | |||
sortrank='$sortrank', | |||
flag='$flag', | |||
click='$click', | |||
ismake='$ismake', | |||
arcrank='$arcrank', | |||
money='$money', | |||
title='$title', | |||
color='$color', | |||
writer='$writer', | |||
source='$source', | |||
litpic='$litpic', | |||
pubdate='$pubdate', | |||
voteid='$voteid', | |||
notpost='$notpost', | |||
description='$description', | |||
keywords='$keywords', | |||
shorttitle='$shorttitle', | |||
filename='$filename', | |||
dutyadmin='$adminid', | |||
weight='$weight' | |||
WHERE id='$id'; "; | |||
if(!$dsql->ExecuteNoneQuery($query)) | |||
{ | |||
ShowMsg('更新数据库archives表时出错,请检查',-1); | |||
exit(); | |||
} | |||
$cts = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = trim($cts['addtable']); | |||
if($addtable!='') | |||
{ | |||
$useip = GetIP(); | |||
$templet = empty($templet) ? '' : $templet; | |||
$iquery = "UPDATE `$addtable` SET typeid='$typeid',body='$body'{$inadd_f},redirecturl='$redirecturl',templet='$templet',userip='$useip' WHERE aid='$id'"; | |||
if(!$dsql->ExecuteNoneQuery($iquery)) | |||
{ | |||
ShowMsg("更新附加表 `$addtable` 时出错,请检查原因!","javascript:;"); | |||
exit(); | |||
} | |||
} | |||
//生成HTML | |||
UpIndexKey($id, $arcrank, $typeid, $sortrank, $tags); | |||
if($cfg_remote_site=='Y' && $isremote=="1") | |||
{ | |||
if($serviterm!=""){ | |||
list($servurl, $servuser, $servpwd) = explode(',', $serviterm); | |||
$config=array( 'hostname' => $servurl, 'username' => $servuser, | |||
'password' => $servpwd,'debug' => 'TRUE'); | |||
} else { | |||
$config=array(); | |||
} | |||
if(!$ftp->connect($config)) exit('Error:None FTP Connection!'); | |||
} | |||
$artUrl = MakeArt($id,true,true,$isremote); | |||
if($artUrl=='') | |||
{ | |||
$artUrl = $cfg_phpurl."/view.php?aid=$id"; | |||
} | |||
ClearMyAddon($id, $title); | |||
//返回成功信息 | |||
$msg = " | |||
请选择你的后续操作: | |||
<a href='article_add.php?cid=$typeid'><u>发布新文章</u></a> | |||
| |||
<a href='archives_do.php?aid=".$id."&dopost=editArchives'><u>查看更改</u></a> | |||
| |||
<a href='$artUrl' target='_blank'><u>查看文章</u></a> | |||
| |||
<a href='catalog_do.php?cid=$typeid&dopost=listArchives'><u>管理文章</u></a> | |||
| |||
$backurl | |||
"; | |||
$wintitle = "成功更改文章!"; | |||
$wecome_info = "文章管理::更改文章"; | |||
$win = new OxWindow(); | |||
$win->AddTitle("成功更改文章:"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow("hand"," ",false); | |||
$win->Display(); | |||
} |
@@ -0,0 +1,104 @@ | |||
<?php | |||
/** | |||
* 文档关键词管理 | |||
* | |||
* @version $Id: article_keywords_main.php 1 14:12 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('sys_Keyword'); | |||
require_once(DEDEINC."/datalistcp.class.php"); | |||
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/"); | |||
if(empty($dopost)) $dopost = ''; | |||
//保存批量更改 | |||
if($dopost=='saveall') | |||
{ | |||
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "article_keywords_main.php" : $_COOKIE['ENV_GOBACK_URL']; | |||
if(!isset($aids)) | |||
{ | |||
ShowMsg("你没有选择要更改的内容!",$ENV_GOBACK_URL); | |||
exit(); | |||
} | |||
foreach($aids as $aid) | |||
{ | |||
$rpurl = ${'rpurl_'.$aid}; | |||
$rpurlold = ${'rpurlold_'.$aid}; | |||
$keyword = ${'keyword_'.$aid}; | |||
//删除项目 | |||
if(!empty(${'isdel_'.$aid})) | |||
{ | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__keywords` WHERE aid='$aid'"); | |||
continue; | |||
} | |||
//禁用项目 | |||
$staold = ${'staold_'.$aid}; | |||
$sta = empty(${'isnouse_'.$aid}) ? 1 : 0; | |||
if($staold!=$sta) | |||
{ | |||
$query1 = "UPDATE `#@__keywords` SET sta='$sta',rpurl='$rpurl' WHERE aid='$aid' "; | |||
$dsql->ExecuteNoneQuery($query1); | |||
continue; | |||
} | |||
//更新链接网址 | |||
if($rpurl!=$rpurlold) | |||
{ | |||
$query1 = "UPDATE `#@__keywords` SET rpurl='$rpurl' WHERE aid='$aid' "; | |||
$dsql->ExecuteNoneQuery($query1); | |||
} | |||
} | |||
ShowMsg("完成指定的更改!",$ENV_GOBACK_URL); | |||
exit(); | |||
} | |||
//增加关键字 | |||
else if($dopost=='add') | |||
{ | |||
$ENV_GOBACK_URL = empty($_COOKIE['ENV_GOBACK_URL']) ? "-1" : $_COOKIE['ENV_GOBACK_URL']; | |||
$keyword = trim($keyword); | |||
$rank = preg_replace("#[^0-9]#", '', $rank); | |||
if($keyword=='') | |||
{ | |||
ShowMsg("关键字不能为空!",-1); | |||
exit(); | |||
} | |||
$row = $dsql->GetOne("SELECT * FROM `#@__keywords` WHERE keyword LIKE '$keyword'"); | |||
if(is_array($row)) | |||
{ | |||
ShowMsg("关键字已存在库中!","-1"); | |||
exit(); | |||
} | |||
$inquery = "INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES ('$keyword','$rank','1','$rpurl');"; | |||
$dsql->ExecuteNoneQuery($inquery); | |||
ShowMsg("成功增加一个关键字!",$ENV_GOBACK_URL); | |||
exit(); | |||
} | |||
if(empty($keyword)) | |||
{ | |||
$keyword = ''; | |||
$addquery = ''; | |||
} | |||
else | |||
{ | |||
$addquery = " WHERE keyword LIKE '%$keyword%' "; | |||
} | |||
$sql = "SELECT * FROM `#@__keywords` $addquery ORDER BY rank DESC"; | |||
$dlist = new DataListCP(); | |||
$dlist->pageSize = 20; | |||
$dlist->SetParameter("keyword",$keyword); | |||
$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_main.htm"); | |||
$dlist->SetSource($sql); | |||
$dlist->Display(); | |||
function GetSta($sta) | |||
{ | |||
if($sta==1) return ''; | |||
else return ' checked="1" '; | |||
} |
@@ -0,0 +1,223 @@ | |||
<?php | |||
/** | |||
* 文档关键词生成 | |||
* | |||
* @version $Id: article_keywords_make.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
@ob_start(); | |||
@set_time_limit(3600); | |||
require_once(dirname(__FILE__).'/config.php'); | |||
CheckPurview('sys_Keyword'); | |||
if(empty($dopost)) $dopost = ''; | |||
//分析已存在的关键字(适用于默认的文章模型) | |||
if($dopost=='analyse') | |||
{ | |||
echo "正在读取关键字数据库...<br/>\r\n"; | |||
flush(); | |||
$ws = $wserr = $wsnew = ""; | |||
$dsql->SetQuery("SELECT * FROM `#@__keywords`"); | |||
$dsql->Execute(); | |||
while($row = $dsql->GetObject()) | |||
{ | |||
if($row->sta==1) $ws[$row->keyword] = 1; | |||
else $wserr[$row->keyword] = 1; | |||
} | |||
echo "完成关键字数据库的载入!<br/>\r\n"; | |||
flush(); | |||
echo "读取档案数据库,并对禁用的关键字和生字进行处理...<br/>\r\n"; | |||
flush(); | |||
$dsql->SetQuery("SELECT id,keywords FROM `#@__archives`"); | |||
$dsql->Execute(); | |||
while($row = $dsql->GetObject()) | |||
{ | |||
$keywords = explode(',',trim($row->keywords)); | |||
$nerr = false; | |||
$mykey = ''; | |||
if(is_array($keywords)) | |||
{ | |||
foreach($keywords as $v) | |||
{ | |||
$v = trim($v); | |||
if($v=='') | |||
{ | |||
continue; | |||
} | |||
if(isset($ws[$v])) | |||
{ | |||
$mykey .= $v." "; | |||
} | |||
else if(isset($wsnew[$v])) | |||
{ | |||
$mykey .= $v.' '; | |||
$wsnew[$v]++; | |||
} | |||
else if(isset($wserr[$v])) | |||
{ | |||
$nerr = true; | |||
} | |||
else | |||
{ | |||
$mykey .= $v." "; | |||
$wsnew[$v] = 1; | |||
} | |||
} | |||
} | |||
} | |||
echo "完成档案数据库的处理!<br/>\r\n"; | |||
flush(); | |||
if(is_array($wsnew)) | |||
{ | |||
echo "对关键字进行排序...<br/>\r\n"; | |||
flush(); | |||
arsort($wsnew); | |||
echo "把关键字保存到数据库...<br/>\r\n"; | |||
flush(); | |||
foreach($wsnew as $k=>$v) | |||
{ | |||
if(strlen($k)>20) | |||
{ | |||
continue; | |||
} | |||
$dsql->SetQuery("INSERT INTO `#@__keywords`(keyword,rank,sta,rpurl) VALUES('".addslashes($k)."','$v','1','')"); | |||
$dsql->Execute(); | |||
} | |||
echo "完成关键字的导入!<br/>\r\n"; | |||
flush(); | |||
sleep(1); | |||
} | |||
else | |||
{ | |||
echo "没发现任何新的关键字!<br/>\r\n"; | |||
flush(); | |||
sleep(1); | |||
} | |||
ShowMsg('完成所有操作,现在转到关键字列表页!','article_keywords_main.php'); | |||
exit(); | |||
} | |||
//自动获取关键字(适用于默认的文章模型) | |||
else if($dopost=='fetch') | |||
{ | |||
require_once(DEDEINC."/splitword.class.php"); | |||
if(empty($startdd)) | |||
{ | |||
$startdd = 0; | |||
} | |||
if(empty($pagesize)) | |||
{ | |||
$pagesize = 20; | |||
} | |||
if(empty($totalnum)) | |||
{ | |||
$totalnum = 0; | |||
} | |||
//统计记录总数 | |||
if($totalnum==0) | |||
{ | |||
$row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__archives` WHERE channel='1' "); | |||
$totalnum = $row['dd']; | |||
} | |||
//获取记录,并分析关键字 | |||
if($totalnum > $startdd+$pagesize) | |||
{ | |||
$limitSql = " LIMIT $startdd,$pagesize"; | |||
} | |||
else if(($totalnum-$startdd)>0) | |||
{ | |||
$limitSql = " LIMIT $startdd,".($totalnum - $startdd); | |||
} | |||
else | |||
{ | |||
$limitSql = ''; | |||
} | |||
$tjnum = $startdd; | |||
if($limitSql!='') | |||
{ | |||
$fquery = "SELECT arc.id,arc.title,arc.keywords,addon.body FROM `#@__archives` arc | |||
LEFT JOIN `#@__addonarticle` addon ON addon.aid=arc.id WHERE arc.channel='1' $limitSql "; | |||
$dsql->SetQuery($fquery); | |||
$dsql->Execute(); | |||
$sp = new SplitWord($cfg_soft_lang , $cfg_soft_lang ); | |||
while($row=$dsql->GetObject()) | |||
{ | |||
if($row->keywords!='') | |||
{ | |||
continue; | |||
} | |||
$tjnum++; | |||
$id = $row->id; | |||
$keywords = ""; | |||
$sp->SetSource($row->title, $cfg_soft_lang , $cfg_soft_lang ); | |||
$sp->SetResultType(2); | |||
$sp->StartAnalysis(TRUE); | |||
$titleindexs = $sp->GetFinallyIndex(); | |||
$sp->SetSource(Html2Text($row->body), $cfg_soft_lang , $cfg_soft_lang ); | |||
$sp->SetResultType(2); | |||
$sp->StartAnalysis(TRUE); | |||
$allindexs = $sp->GetFinallyIndex(); | |||
if(is_array($allindexs) && is_array($titleindexs)) | |||
{ | |||
foreach($titleindexs as $k => $v) | |||
{ | |||
if(strlen($keywords)>=30) | |||
{ | |||
break; | |||
} | |||
else | |||
{ | |||
if(strlen($k) <= 2) continue; | |||
$keywords .= $k.","; | |||
} | |||
} | |||
foreach($allindexs as $k => $v) | |||
{ | |||
if(strlen($keywords)>=30) | |||
{ | |||
break; | |||
} | |||
else if(!in_array($k,$titleindexs)) | |||
{ | |||
if(strlen($k) <= 2) continue; | |||
$keywords .= $k.","; | |||
} | |||
} | |||
} | |||
$keywords = addslashes($keywords); | |||
if($keywords=='') | |||
{ | |||
$keywords = ','; | |||
} | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET keywords='$keywords' WHERE id='$id'"); | |||
} | |||
unset($sp); | |||
}//end if limit | |||
//返回提示信息 | |||
if($totalnum>0) $tjlen = ceil( ($tjnum/$totalnum) * 100 ); | |||
else $tjlen=100; | |||
$dvlen = $tjlen * 2; | |||
$tjsta = "<div style='width:200;height:15;border:1px solid #898989;text-align:left'><div style='width:$dvlen;height:15;background-color:#829D83'></div></div>"; | |||
$tjsta .= "<br/>完成处理文档总数的:$tjlen %,位置:{$startdd},继续执行任务..."; | |||
if($tjnum < $totalnum) | |||
{ | |||
$nurl = "article_keywords_make.php?dopost=fetch&totalnum=$totalnum&startdd=".($startdd+$pagesize)."&pagesize=$pagesize"; | |||
ShowMsg($tjsta,$nurl,0,500); | |||
} | |||
else | |||
{ | |||
ShowMsg("完成所有任务!","javascript:;"); | |||
} | |||
exit(); | |||
} | |||
include DedeInclude('templets/article_keywords_make.htm'); |
@@ -0,0 +1,35 @@ | |||
<?php | |||
/** | |||
* 文档关键词选择 | |||
* | |||
* @version $Id: article_keywords_select.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
require_once(DEDEINC."/datalistcp.class.php"); | |||
setcookie("ENV_GOBACK_URL",$dedeNowurl,time()+3600,"/"); | |||
if(empty($keywords)) $keywords = ""; | |||
$sql = "SELECT * FROM #@__keywords ORDER BY rank DESC"; | |||
$dlist = new DataListCP(); | |||
$dlist->SetTemplate(DEDEADMIN."/templets/article_keywords_select.htm"); | |||
$dlist->pageSize = 300; | |||
$dlist->SetParameter("f",$f); | |||
$dlist->SetSource($sql); | |||
$dlist->Display(); | |||
function GetSta($sta) | |||
{ | |||
if($sta==1) return "正常"; | |||
else return "<font color='red'>禁用</font>"; | |||
} | |||
function GetMan($sta) | |||
{ | |||
if($sta==1) return "<u>禁用</u>"; | |||
else return "<u>启用</u>"; | |||
} |
@@ -0,0 +1,53 @@ | |||
<?php | |||
/** | |||
* @version $Id: article_select_sw.php 1 8:26 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require(dirname(__FILE__)."/config.php"); | |||
header("Pragma:no-cache"); | |||
header("Cache-Control:no-cache"); | |||
header("Expires:0"); | |||
//来源列表 | |||
if($t=='source') | |||
{ | |||
$m_file = DEDEDATA."/admin/source.txt"; | |||
$allsources = file($m_file); | |||
echo "<div class='coolbg4'>[<a href=\"javascript:OpenMyWin('article_source_edit.php');ClearDivCt('mysource');\">设置</a>] "; | |||
echo "[<a href='#' onclick='javascript:HideObj(\"mysource\");ChangeFullDiv(\"hide\");'>关闭</a>]</div>\r\n<div class='wsselect'>\r\n"; | |||
foreach($allsources as $v) | |||
{ | |||
$v = trim($v); | |||
if($v!="") | |||
{ | |||
echo "<a href='#' onclick='javascript:PutSource(\"$v\")'>$v</a> | \r\n"; | |||
} | |||
} | |||
echo "</div><div class='coolbg5'> </div>"; | |||
} | |||
else | |||
{ | |||
//作者列表 | |||
$m_file = DEDEDATA."/admin/writer.txt"; | |||
echo "<div class='coolbg4'>[<a href=\"javascript:OpenMyWin('article_writer_edit.php');ClearDivCt('mywriter');\">设置</a>] "; | |||
echo "[<a href='#' onclick='javascript:HideObj(\"mywriter\");ChangeFullDiv(\"hide\");'>关闭</a>]</div>\r\n<div class='wsselect'>\r\n"; | |||
if(filesize($m_file)>0) | |||
{ | |||
$fp = fopen($m_file,'r'); | |||
$str = fread($fp,filesize($m_file)); | |||
fclose($fp); | |||
$strs = explode(',',$str); | |||
foreach($strs as $str) | |||
{ | |||
$str = trim($str); | |||
if($str!="") | |||
{ | |||
echo "<a href='#' onclick='javascript:PutWriter(\"$str\")'>$str</a> | "; | |||
} | |||
} | |||
} | |||
echo "</div><div class='coolbg5'> </div>\r\n"; | |||
} |
@@ -0,0 +1,44 @@ | |||
<?php | |||
/** | |||
* 文章来源编辑 | |||
* | |||
* @version $Id: archives_add.php 1 14:30 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
require_once(DEDEINC."/oxwindow.class.php"); | |||
CheckPurview('sys_Source'); | |||
if(empty($dopost)) $dopost = ''; | |||
if(empty($allsource)) $allsource = ''; | |||
else $allsource = stripslashes($allsource); | |||
$m_file = DEDEDATA."/admin/source.txt"; | |||
//保存 | |||
if($dopost=='save') | |||
{ | |||
$fp = fopen($m_file,'w'); | |||
flock($fp,3); | |||
fwrite($fp,$allsource); | |||
fclose($fp); | |||
echo "<script>alert('Save OK!');</script>"; | |||
} | |||
//读出 | |||
if(empty($allsource) && filesize($m_file)>0) | |||
{ | |||
$fp = fopen($m_file,'r'); | |||
$allsource = fread($fp,filesize($m_file)); | |||
fclose($fp); | |||
} | |||
$wintitle = "文章来源管理"; | |||
$wecome_info = "文章来源管理"; | |||
$win = new OxWindow(); | |||
$win->Init('article_source_edit.php','js/blank.js','POST'); | |||
$win->AddHidden('dopost','save'); | |||
$win->AddTitle("每行保存一个来源:"); | |||
$win->AddMsgItem("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>$allsource</textarea>"); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); |
@@ -0,0 +1,49 @@ | |||
<?php | |||
/** | |||
* 防采集混淆字符串管理 | |||
* | |||
* @version $Id: article_string_mix.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__).'/config.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
CheckPurview('sys_StringMix'); | |||
if(empty($dopost)) $dopost = ''; | |||
if(empty($allsource)) $allsource = ''; | |||
else $allsource = stripslashes($allsource); | |||
$m_file = DEDEDATA."/downmix.data.php"; | |||
//保存 | |||
if($dopost=="save") | |||
{ | |||
csrf_check(); | |||
$fp = fopen($m_file,'w'); | |||
flock($fp,3); | |||
fwrite($fp,$allsource); | |||
fclose($fp); | |||
echo "<script>alert('Save OK!');</script>"; | |||
} | |||
//读出 | |||
if(empty($allsource) && filesize($m_file)>0) | |||
{ | |||
$fp = fopen($m_file,'r'); | |||
$allsource = fread($fp,filesize($m_file)); | |||
fclose($fp); | |||
} | |||
make_hash(); | |||
$wintitle = "防采集混淆字符串管理"; | |||
$wecome_info = "防采集混淆字符串管理"; | |||
$win = new OxWindow(); | |||
$win->Init('article_string_mix.php','js/blank.js','POST'); | |||
$win->AddHidden('dopost','save'); | |||
$win->AddHidden('token',$_SESSION['token']); | |||
$win->AddTitle("如果你要启用字符串混淆来防采集,请在文档模板需要的字段加上 function='RndString(@me)' 属性,如:{dede:field name='body' function='RndString(@me)'/}。"); | |||
$win->AddMsgItem("<textarea name='allsource' id='allsource' style='width:100%;height:300px'>$allsource</textarea>"); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); |
@@ -0,0 +1,128 @@ | |||
<?php | |||
/** | |||
* 文档随机模板 | |||
* | |||
* @version $Id: article_template_rand.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__).'/config.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
CheckPurview('sys_StringMix'); | |||
if(empty($dopost)) $dopost = ''; | |||
$templates = empty($templates) ? '' : stripslashes($templates); | |||
$m_file = DEDEDATA.'/template.rand.php'; | |||
//----------------------action | |||
$okmsg = ''; | |||
//保存配置 | |||
if($dopost=='save') | |||
{ | |||
csrf_check(); | |||
$fp = fopen($m_file,'w'); | |||
flock($fp,3); | |||
fwrite($fp,$templates); | |||
fclose($fp); | |||
$okmsg = '成功保存配置信息 AT:('.MyDate('H:i:s', time()).')'; | |||
} | |||
//对旧文档进行随机模板处理 | |||
else if($dopost=='makeold') | |||
{ | |||
csrf_check(); | |||
set_time_limit(3600); | |||
if(!file_exists($m_file)) | |||
{ | |||
AjaxHead(); | |||
echo "配置文件不存在!"; | |||
exit(); | |||
} | |||
require_once($m_file); | |||
if($cfg_tamplate_rand==0) | |||
{ | |||
AjaxHead(); | |||
echo "系统没开启允许随机模板的选项!"; | |||
exit(); | |||
} | |||
$totalTmp = count($cfg_tamplate_arr) - 1; | |||
if( $totalTmp < 1 ) | |||
{ | |||
AjaxHead(); | |||
echo "随机模板的数量必须为2个或以上!"; | |||
exit(); | |||
} | |||
for($i=0; $i < 10; $i++) | |||
{ | |||
$temp = $cfg_tamplate_arr[mt_rand(0, $totalTmp)]; | |||
$dsql->ExecuteNoneQuery(" Update `#@__addonarticle` set templet='$temp' where RIGHT(aid, 1)='$i' "); | |||
} | |||
AjaxHead(); | |||
echo "全部随机操作成功!"; | |||
exit(); | |||
} | |||
//清除全部的指定模板 | |||
else if($dopost=='clearold') | |||
{ | |||
csrf_check(); | |||
$dsql->ExecuteNoneQuery(" Update `#@__addonarticle` set templet='' "); | |||
$dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `#@__addonarticle` "); | |||
AjaxHead(); | |||
echo "全部清除操作成功!"; | |||
exit(); | |||
} | |||
//-------------------------read | |||
//读出 | |||
if(empty($templates) && filesize($m_file)>0) | |||
{ | |||
$fp = fopen($m_file,'r'); | |||
$templates = fread($fp,filesize($m_file)); | |||
fclose($fp); | |||
} | |||
$wintitle = "随机模板防采集设置"; | |||
$wecome_info = "随机模板防采集设置"; | |||
make_hash(); | |||
$msg = " | |||
<link href='images/base.css' rel='stylesheet' type='text/css' /> | |||
<script language='javascript' src='js/main.js'></script> | |||
<script language='javascript' src='../include/dedeajax2.js'></script> | |||
<script language='javascript'> | |||
function DoRand(jobname) | |||
{ | |||
ChangeFullDiv('show'); | |||
\$DE('loading').style.display = 'block'; | |||
var myajax = new DedeAjax(\$DE('tmpct')); | |||
myajax.SendGet2('article_template_rand.php?dopost='+jobname+'&token={$_SESSION['token']}'); | |||
\$DE('loading').style.display = 'none'; | |||
ChangeFullDiv('hide'); | |||
} | |||
</script> | |||
<div id='loading' style='z-index:3000;top:160;left:300;position:absolute;display:none;'> | |||
<img src='images/loadinglit.gif' /> 请稍后,正在操作中... | |||
</div> | |||
<table width='98%' align='center'> | |||
<tr> | |||
<td height='28'> | |||
如果你想对旧的文章应用随机模板设置,请点击此对旧文章进行处理(必须设置好模板项)! | |||
<a href='#' onclick='DoRand(\"makeold\")'>[<u>设置全部</u>]</a> | |||
<a href='#' onclick='DoRand(\"clearold\")'>[<u>取消全部</u>]</a> | |||
<span id='tmpct' style='color:red;font-weight:bold'>$okmsg</span> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td bgcolor='#F9FCEF'><b>请按说明修改设置:</b></td> | |||
</tr> | |||
<tr> | |||
<td><textarea name='templates' id='templates' style='width:100%;height:250px'>$templates</textarea></td> | |||
</tr> | |||
</table>"; | |||
$win = new OxWindow(); | |||
$win->Init('article_template_rand.php','js/blank.js','POST'); | |||
$win->AddHidden('dopost','save'); | |||
$win->AddHidden('token',$_SESSION['token']); | |||
$win->AddTitle("本设置仅适用于系统默认的文章模型,设置后发布文章时会自动按指定的模板随机获取一个,如果不想使用此功能,把它设置为空即可!"); | |||
$win->AddMsgItem($msg); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); |
@@ -0,0 +1,89 @@ | |||
<?php | |||
/** | |||
* 检测重复文档 | |||
* | |||
* @version $Id: article_test_same.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
@set_time_limit(0); | |||
CheckPurview('sys_ArcBatch'); | |||
if(empty($dopost)) $dopost = ''; | |||
if($dopost=='analyse') | |||
{ | |||
$arr = $dsql->getone("SELECT maintable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
if(is_array($arr)) { | |||
$maintable = $arr['maintable']; | |||
} else { | |||
showmsg('频道id不正确,无法处理!','javascript:;'); | |||
exit(); | |||
} | |||
$dsql->SetQuery("SELECT COUNT(title) AS dd,title FROM `$maintable` WHERE channel='$channelid' GROUP BY title ORDER BY dd DESC LIMIT 0, $pagesize"); | |||
$dsql->Execute(); | |||
$allarc = 0; | |||
include DedeInclude('templets/article_result_same.htm'); | |||
exit(); | |||
} | |||
//删除选中的内容(只保留一条) | |||
else if($dopost=='delsel') | |||
{ | |||
require_once(dirname(__FILE__)."/../include/typelink.class.php"); | |||
require_once(dirname(__FILE__)."/inc/inc_batchup.php"); | |||
if(empty($titles)) | |||
{ | |||
header("Content-Type: text/html; charset={$cfg_ver_lang}"); | |||
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset={$cfg_ver_lang}\">\r\n"; | |||
echo "没有指定删除的文档!"; | |||
exit(); | |||
} | |||
$titless = split('`',$titles); | |||
if($channelid < -1) { | |||
$orderby = ($deltype=='delnew' ? " ORDER BY aid DESC " : " ORDER BY aid ASC "); | |||
} else { | |||
$orderby = ($deltype=='delnew' ? " ORDER BY id DESC " : " ORDER BY id ASC "); | |||
} | |||
$totalarc = 0; | |||
foreach($titless as $title) | |||
{ | |||
$title = trim($title); | |||
$title = addslashes( $title=='' ? '' : urldecode($title) ); | |||
if($channelid < -1) { | |||
$q1 = "SELECT aid as id,title FROM `$maintable` WHERE channel='$channelid' AND title='$title' $orderby "; | |||
} | |||
else { | |||
$q1 = "SELECT id,title FROM `$maintable` WHERE channel='$channelid' AND title='$title' $orderby "; | |||
} | |||
$dsql->SetQuery($q1); | |||
$dsql->Execute(); | |||
$rownum = $dsql->GetTotalRow(); | |||
if($rownum < 2) continue; | |||
$i = 1; | |||
while($row = $dsql->GetObject()) | |||
{ | |||
$i++; | |||
$naid = $row->id; | |||
$ntitle = $row->title; | |||
if($i > $rownum) continue; | |||
$totalarc++; | |||
DelArc($naid, 'OFF'); | |||
} | |||
} | |||
$dsql->ExecuteNoneQuery(" OPTIMIZE TABLE `$maintable`; "); | |||
ShowMsg("一共删除了[{$totalarc}]篇重复的文档!","javascript:;"); | |||
exit(); | |||
} | |||
//向导页 | |||
$channelinfos = array(); | |||
$dsql->setquery("SELECT id,typename,maintable,addtable FROM `#@__channeltype` "); | |||
$dsql->execute(); | |||
while($row = $dsql->getarray()) $channelinfos[] = $row; | |||
include DedeInclude('templets/article_test_same.htm'); |
@@ -0,0 +1,19 @@ | |||
<?php | |||
/** | |||
* 检测重复文档 | |||
* | |||
* @version $Id: article_test_same.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
AjaxHead(); | |||
if(empty($t) || $cfg_check_title=='N') exit; | |||
$row = $dsql->GetOne("SELECT id FROM `#@__archives` WHERE title LIKE '$t' "); | |||
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>]"; | |||
} |
@@ -0,0 +1,46 @@ | |||
<?php | |||
/** | |||
* 文章作者管理 | |||
* | |||
* @version $Id: article_writer_edit.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__).'/config.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
CheckPurview('sys_Writer'); | |||
if(empty($dopost)) $dopost = ''; | |||
if(empty($allwriter)) $allwriter = ''; | |||
else $allwriter = stripslashes($allwriter); | |||
$m_file = DEDEDATA."/admin/writer.txt"; | |||
//保存 | |||
if($dopost=="save") | |||
{ | |||
$fp = fopen($m_file,'w'); | |||
flock($fp,3); | |||
fwrite($fp,$allwriter); | |||
fclose($fp); | |||
echo "<script>alert('Save OK!');</script>"; | |||
} | |||
//读出 | |||
if(empty($allwriter) && filesize($m_file)>0) | |||
{ | |||
$fp = fopen($m_file,'r'); | |||
$allwriter = fread($fp,filesize($m_file)); | |||
fclose($fp); | |||
} | |||
$wintitle = "文章作者管理"; | |||
$wecome_info = "文章作者管理"; | |||
$win = new OxWindow(); | |||
$win->Init('article_writer_edit.php','js/blank.js','POST'); | |||
$win->AddHidden('dopost','save'); | |||
$win->AddTitle("把作者姓名用半角逗号“,”分开:"); | |||
$win->AddMsgItem("<textarea name='allwriter' id='allwriter' style='width:100%;height:300px'>$allwriter</textarea>"); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); |
@@ -0,0 +1,84 @@ | |||
<?php | |||
/** | |||
* 百度新闻 | |||
* | |||
* @version $Id: baidunews.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
if(empty($do)) | |||
{ | |||
include DEDEADMIN.'/templets/baidunews.htm'; | |||
} else { | |||
$baidunews = "<?xml version=\"1.0\" encoding=\"".$cfg_soft_lang."\" ?>\n"; | |||
$baidunews .= "<document>\n"; | |||
$baidunews .= "<webSite>$cfg_webname </webSite>\n"; | |||
$baidunews .= "<webMaster>$cfg_adminemail </webMaster>\n"; | |||
$baidunews .= "<updatePeri>$cfg_updateperi </updatePeri>\n"; | |||
$limit = $cfg_baidunews_limit; | |||
if($limit > 100 || $limit < 1) | |||
{ | |||
$limit = 100; | |||
} | |||
$query = "SELECT maintable.*, addtable.body, arctype.typename | |||
FROM #@__archives maintable | |||
LEFT JOIN #@__addonarticle addtable ON addtable.aid=maintable.id | |||
LEFT JOIN #@__arctype arctype ON arctype.ID=maintable.typeid | |||
WHERE maintable.channel=1 and maintable.arcrank!=-1 ORDER BY maintable.pubdate DESC LIMIT $limit | |||
"; | |||
$dsql->SetQuery($query); | |||
$dsql->Execute(); | |||
while($row = $dsql->GetArray()) | |||
{ | |||
$title = dede_htmlspecialchars($row['title']); | |||
$row1 = GetOneArchive($row['id']); | |||
if(strpos($row1['arcurl'],'http://') === false) | |||
{ | |||
$link = ($cfg_basehost=='' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$row1['arcurl']; | |||
}else | |||
{ | |||
$link = $row1['arcurl']; | |||
} | |||
$link = dede_htmlspecialchars($link); | |||
$description = dede_htmlspecialchars(strip_tags($row['description'])); | |||
$text = dede_htmlspecialchars(strip_tags($row['body'])); | |||
$image = $row['litpic'] =='' ? '' :$row['litpic']; | |||
if($image != '' && strpos($image, 'http://') === false) | |||
{ | |||
$image = ($cfg_basehost=='' ? 'http://'.$_SERVER["HTTP_HOST"].$cfg_cmspath : $cfg_basehost).$image; | |||
} | |||
//$headlineimg = ''; | |||
$keywords = dede_htmlspecialchars($row['keywords']); | |||
$category = dede_htmlspecialchars($row['typename']); | |||
$author = dede_htmlspecialchars($row['writer']); | |||
$source = dede_htmlspecialchars($row['source']); | |||
$pubdate = dede_htmlspecialchars(gmdate('Y-m-d H:i',$row['pubdate'] + $cfg_cli_time * 3600)); | |||
$baidunews .= "<item>\n"; | |||
$baidunews .= "<title>$title </title>\n"; | |||
$baidunews .= "<link>$link </link>\n"; | |||
$baidunews .= "<description>$description </description>\n"; | |||
$baidunews .= "<text>$text </text>\n"; | |||
$baidunews .= "<image>$image </image>\n"; | |||
//$baidunews .= "<headlineimages/>\n"; | |||
$baidunews .= "<keywords>$keywords </keywords>\n"; | |||
$baidunews .= "<category>$category </category>\n"; | |||
$baidunews .= "<author>$author </author>\n"; | |||
$baidunews .= "<source>$source </source>\n"; | |||
$baidunews .= "<pubDate>$pubdate </pubDate>\n"; | |||
$baidunews .= "</item>\n"; | |||
} | |||
$baidunews .= "</document>\n"; | |||
$fp = fopen(dirname(__FILE__).'/'.$filename,'w'); | |||
fwrite($fp,$baidunews); | |||
fclose($fp); | |||
showmsg("<a href='{$filename}' target=\"_blank\">{$filename} make success</a>",'javascript:;'); | |||
} |
@@ -0,0 +1,68 @@ | |||
<?php | |||
/** | |||
* 生成点卡 | |||
* | |||
* @version $Id: cards_make.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
CheckPurview('member_Card'); | |||
if(empty($dopost)) $dopost = ''; | |||
if($dopost == '') include(DEDEADMIN."/templets/cards_make.htm"); | |||
//生成点卡 | |||
elseif($dopost == 'make') | |||
{ | |||
$row = $dsql->GetOne("SELECT * FROM #@__moneycard_record ORDER BY aid DESC"); | |||
!is_array($row) ? $startid=100000 : $startid=$row['aid']+100000; | |||
$row = $dsql->GetOne("SELECT * FROM #@__moneycard_type WHERE tid='$cardtype'"); | |||
$money = $row['money']; | |||
$num = $row['num']; | |||
$mtime = time(); | |||
$utime = 0; | |||
$ctid = $cardtype; | |||
$startid++; | |||
$endid = $startid + $mnum; | |||
header("Content-Type: text/html; charset={$cfg_soft_lang}"); | |||
for(;$startid<$endid;$startid++) | |||
{ | |||
$cardid = $snprefix.$startid.'-'; | |||
for($p=0;$p<$pwdgr;$p++) | |||
{ | |||
for($i=0; $i < $pwdlen; $i++) | |||
{ | |||
if($ctype==1) | |||
{ | |||
$c = mt_rand(49,57); $c = chr($c); | |||
} | |||
else | |||
{ | |||
$c = mt_rand(65,90); | |||
if($c==79) | |||
{ | |||
$c = 'M'; | |||
} | |||
else | |||
{ | |||
$c = chr($c); | |||
} | |||
} | |||
$cardid .= $c; | |||
} | |||
if($p<$pwdgr-1) | |||
{ | |||
$cardid .= '-'; | |||
} | |||
} | |||
$inquery = "INSERT INTO #@__moneycard_record(ctid,cardid,uid,isexp,mtime,utime,money,num) | |||
VALUES('$ctid','$cardid','0','0','$mtime','$utime','$money','$num'); "; | |||
$dsql->ExecuteNoneQuery($inquery); | |||
echo "成功生成点卡:{$cardid}<br/>"; | |||
} | |||
echo "成功生成 {$mnum} 个点卡!"; | |||
} |
@@ -0,0 +1,67 @@ | |||
<?php | |||
/** | |||
* 点卡管理 | |||
* | |||
* @version $Id: cards_manage.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
require_once(DEDEINC.'/datalistcp.class.php'); | |||
$dopost=empty($dopost)? "" : $dopost; | |||
if($dopost=="delete"){ | |||
$ids = explode('`',$aids); | |||
$dquery = ""; | |||
foreach($ids as $id){ | |||
if($dquery=="") $dquery .= "aid='$id' "; | |||
else $dquery .= " OR aid='$id' "; | |||
} | |||
if($dquery!="") $dquery = " WHERE ".$dquery; | |||
$dsql->ExecuteNoneQuery("DELETE FROM #@__moneycard_record $dquery"); | |||
ShowMsg("成功删除指定的记录!","cards_manage.php"); | |||
exit(); | |||
}else{ | |||
$addsql = ''; | |||
if(isset($isexp)) $addsql = " WHERE isexp='$isexp' "; | |||
$sql = "SELECT * FROM #@__moneycard_record $addsql ORDER BY aid DESC"; | |||
$dlist = new DataListCP(); | |||
$dlist->pageSize = 25; //设定每页显示记录数(默认25条) | |||
if(isset($isexp)) $dlist->SetParameter("isexp",$isexp); | |||
$dlist->dsql->SetQuery("SELECT * FROM #@__moneycard_type "); | |||
$dlist->dsql->Execute('ts'); | |||
while($rw = $dlist->dsql->GetArray('ts')) | |||
{ | |||
$TypeNames[$rw['tid']] = $rw['pname']; | |||
} | |||
$tplfile = DEDEADMIN."/templets/cards_manmage.htm"; | |||
//这两句的顺序不能更换 | |||
$dlist->SetTemplate($tplfile); //载入模板 | |||
$dlist->SetSource($sql); //设定查询SQL | |||
$dlist->Display(); //显示 | |||
} | |||
function GetMemberID($mid) | |||
{ | |||
global $dsql; | |||
if($mid==0) return '0'; | |||
$row = $dsql->GetOne("SELECT userid FROM #@__member WHERE mid='$mid' "); | |||
if(is_array($row)) return "<a href='member_view.php?mid={$mid}'>".$row['userid']."</a>"; | |||
else return '0'; | |||
} | |||
function GetUseDate($time=0) | |||
{ | |||
if(!empty($time)) return GetDateMk($time); | |||
else return '未使用'; | |||
} | |||
function GetSta($sta) | |||
{ | |||
if($sta==1) return '已售出'; | |||
else if($sta==-1) return '已使用'; | |||
else return '未使用'; | |||
} |
@@ -0,0 +1,55 @@ | |||
<?php | |||
/** | |||
* 点卡类型 | |||
* | |||
* @version $Id: cards_type.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__).'/config.php'); | |||
CheckPurview('member_Type'); | |||
if(empty($dopost)) $dopost = ""; | |||
//保存更改 | |||
if($dopost=="save") | |||
{ | |||
$startID = 1; | |||
$endID = $idend; | |||
for(;$startID<=$endID;$startID++) | |||
{ | |||
$query = ''; | |||
$tid = ${'ID_'.$startID}; | |||
$pname = ${'pname_'.$startID}; | |||
$money = ${'money_'.$startID}; | |||
$num = ${'num_'.$startID}; | |||
if(isset(${'check_'.$startID})) | |||
{ | |||
if($pname!='') | |||
{ | |||
$query = "UPDATE #@__moneycard_type SET pname='$pname',money='$money',num='$num' WHERE tid='$tid'"; | |||
$dsql->ExecuteNoneQuery($query); | |||
$query = "UPDATE #@__moneycard_record SET money='$money',num='$num' WHERE ctid='$tid' ; "; | |||
$dsql->ExecuteNoneQuery($query); | |||
} | |||
} | |||
else | |||
{ | |||
$query = "DELETE FROM #@__moneycard_type WHERE tid='$tid' "; | |||
$dsql->ExecuteNoneQuery($query); | |||
$query = "DELETE FROM #@__moneycard_record WHERE ctid='$tid' AND isexp<>-1 ; "; | |||
$dsql->ExecuteNoneQuery($query); | |||
} | |||
} | |||
//增加新记录 | |||
if(isset($check_new) && $pname_new!='') | |||
{ | |||
$query = "INSERT INTO #@__moneycard_type(num,pname,money) VALUES('{$num_new}','{$pname_new}','{$money_new}');"; | |||
$dsql->ExecuteNoneQuery($query); | |||
} | |||
header("Content-Type: text/html; charset={$cfg_soft_lang}"); | |||
echo "<script> alert('成功更新点卡产品分类表!'); </script>"; | |||
} | |||
require_once(DEDEADMIN."/templets/cards_type.htm"); |
@@ -0,0 +1,273 @@ | |||
<?php | |||
/** | |||
* 栏目添加 | |||
* | |||
* @version $Id: catalog_add.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
require_once(DEDEINC."/typelink.class.php"); | |||
if(empty($listtype)) $listtype=''; | |||
if(empty($dopost)) $dopost = ''; | |||
if(empty($upinyin)) $upinyin = 0; | |||
if(empty($channelid)) $channelid = 1; | |||
if(isset($channeltype)) $channelid = $channeltype; | |||
$id = empty($id) ? 0 :intval($id); | |||
$reid = empty($reid) ? 0 :intval($reid); | |||
$nid = 'article'; | |||
if($id==0 && $reid==0) | |||
{ | |||
CheckPurview('t_New'); | |||
} | |||
else | |||
{ | |||
$checkID = empty($id) ? $reid : $id; | |||
CheckPurview('t_AccNew'); | |||
CheckCatalog($checkID, '你无权在本栏目下创建子类!'); | |||
} | |||
if(empty($myrow)) $myrow = array(); | |||
$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); | |||
$dsql->Execute(); | |||
while($row=$dsql->GetObject()) | |||
{ | |||
$channelArray[$row->id]['typename'] = $row->typename; | |||
$channelArray[$row->id]['nid'] = $row->nid; | |||
if($row->id==$channelid) | |||
{ | |||
$nid = $row->nid; | |||
} | |||
} | |||
if($dopost=='quick') | |||
{ | |||
$tl = new TypeLink(0); | |||
$typeOptions = $tl->GetOptionArray(0,0,$channelid); | |||
include DedeInclude('templets/catalog_add_quick.htm'); | |||
exit(); | |||
} | |||
/*--------------------- | |||
function action_savequick(){ } | |||
---------------------*/ | |||
else if($dopost=='savequick') | |||
{ | |||
if(!isset($savetype)) $savetype = ''; | |||
$isdefault = isset($isdefault)? $isdefault : 0; | |||
$tempindex = "{style}/index_{$nid}.htm"; | |||
$templist = "{style}/list_{$nid}.htm"; | |||
$temparticle = "{style}/article_{$nid}.htm"; | |||
$queryTemplate = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,typedir,isdefault,defaultname,issend,channeltype, | |||
tempindex,templist,temparticle,modname,namerule,namerule2,ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) | |||
VALUES('~reid~','~topid~','~rank~','~typename~','~typedir~','$isdefault','$defaultname','$issend','$channeltype', | |||
'$tempindex','$templist','$temparticle','default','$namerule','$namerule2','0','0','','','~typename~','0','','','0','0','0','','')"; | |||
if (empty($savetype)) | |||
{ | |||
foreach($_POST as $k=>$v) | |||
{ | |||
if(preg_match("#^posttype#", $k)) | |||
{ | |||
$k = str_replace('posttype', '', $k); | |||
} | |||
else | |||
{ | |||
continue; | |||
} | |||
$rank = ${'rank'.$k}; | |||
$toptypename = trim(${'toptype'.$k}); | |||
$sontype = trim(${'sontype'.$k}); | |||
$toptypedir = GetPinyin(stripslashes($toptypename)); | |||
$toptypedir = $referpath=='parent' ? $nextdir.'/'.$toptypedir : '/'.$toptypedir; | |||
if(empty($toptypename)) | |||
{ | |||
continue; | |||
} | |||
$sql = str_replace('~reid~','0',$queryTemplate); | |||
$sql = str_replace('~topid~','0',$sql); | |||
$sql = str_replace('~rank~',$rank,$sql); | |||
$sql = str_replace('~typename~',$toptypename,$sql); | |||
$sql = str_replace('~typedir~',$toptypedir,$sql); | |||
$dsql->ExecuteNoneQuery($sql); | |||
$tid = $dsql->GetLastID(); | |||
if($tid>0 && $sontype!='') | |||
{ | |||
$sontypes = explode(',',$sontype); | |||
foreach($sontypes as $k=>$v) | |||
{ | |||
$v = trim($v); | |||
if($v=='') | |||
{ | |||
continue; | |||
} | |||
$typedir = $toptypedir.'/'.GetPinyin(stripslashes($v)); | |||
$sql = str_replace('~reid~',$tid,$queryTemplate); | |||
$sql = str_replace('~topid~',$tid,$sql); | |||
$sql = str_replace('~rank~',$k,$sql); | |||
$sql = str_replace('~typename~',$v,$sql); | |||
$sql = str_replace('~typedir~',$typedir,$sql); | |||
$dsql->ExecuteNoneQuery($sql); | |||
} | |||
} | |||
} | |||
} else { | |||
$row = $dsql->GetOne("SELECT `typedir` FROM `#@__arctype` WHERE `id`={$reid}"); | |||
foreach($_POST as $k=>$v) | |||
{ | |||
if(preg_match("#^posttype#", $k)) | |||
{ | |||
$k = str_replace('posttype', '', $k); | |||
} | |||
else | |||
{ | |||
continue; | |||
} | |||
$rank = ${'rank'.$k}; | |||
$toptypename = trim(${'reltype'.$k}); | |||
$toptypedir = GetPinyin(stripslashes($toptypename)); | |||
switch ($referpath) { | |||
case 'parent': | |||
$toptypedir = $nextdir.'/'.$toptypedir; | |||
break; | |||
case 'typepath': | |||
$toptypedir = isset($row['typedir'])? $row['typedir'].'/'.$toptypedir : '/'.$toptypedir; | |||
break; | |||
default: | |||
$toptypedir = '/'.$toptypedir; | |||
break; | |||
} | |||
if(empty($toptypename)) | |||
{ | |||
continue; | |||
} | |||
$sql = str_replace('~reid~', $reid, $queryTemplate); | |||
$sql = str_replace('~topid~', $reid, $sql); | |||
$sql = str_replace('~rank~', $rank, $sql); | |||
$sql = str_replace('~typename~', $toptypename, $sql); | |||
$sql = str_replace('~typedir~', $toptypedir, $sql); | |||
$dsql->ExecuteNoneQuery($sql); | |||
} | |||
} | |||
UpDateCatCache(); | |||
ShowMsg('成功增加指定栏目!','catalog_main.php'); | |||
exit(); | |||
} | |||
/*--------------------- | |||
function action_save(){ } | |||
---------------------*/ | |||
else if($dopost=='save') | |||
{ | |||
$smalltypes = ''; | |||
if(empty($smalltype)) $smalltype = ''; | |||
if(is_array($smalltype)) $smalltypes = join(',',$smalltype); | |||
if(!isset($sitepath)) $sitepath = ''; | |||
if($topid==0 && $reid>0) $topid = $reid; | |||
if($ispart!=0) $cross = 0; | |||
$description = Html2Text($description,1); | |||
$keywords = Html2Text($keywords,1); | |||
if($ispart != 2 ) | |||
{ | |||
//栏目的参照目录 | |||
if($referpath=='cmspath') $nextdir = '{cmspath}'; | |||
if($referpath=='basepath') $nextdir = ''; | |||
//用拼音命名 | |||
if($upinyin==1 || $typedir=='') | |||
{ | |||
$typedir = GetPinyin(stripslashes($typename)); | |||
} | |||
$typedir = $nextdir.'/'.$typedir; | |||
$typedir = preg_replace("#\/{1,}#", "/", $typedir); | |||
} | |||
//开启多站点时的设置(仅针对顶级栏目) | |||
if($reid==0 && $moresite==1) | |||
{ | |||
$sitepath = $typedir; | |||
//检测二级网址 | |||
if($siteurl!='') | |||
{ | |||
$siteurl = preg_replace("#\/$#", "", $siteurl); | |||
if(!preg_match("#http:\/\/#i", $siteurl)) | |||
{ | |||
ShowMsg("你绑定的二级域名无效,请用(http://host)的形式!","-1"); | |||
exit(); | |||
} | |||
if(preg_match("#".$cfg_basehost."#i", $siteurl)) | |||
{ | |||
ShowMsg("你绑定的二级域名与当前站点是同一个域,不需要绑定!","-1"); | |||
exit(); | |||
} | |||
} | |||
} | |||
//创建目录 | |||
if($ispart != 2) | |||
{ | |||
$true_typedir = str_replace("{cmspath}", $cfg_cmspath, $typedir); | |||
$true_typedir = preg_replace("#\/{1,}#", "/", $true_typedir); | |||
if(!CreateDir($true_typedir)) | |||
{ | |||
ShowMsg("创建目录 {$true_typedir} 失败,请检查你的路径是否存在问题!","-1"); | |||
exit(); | |||
} | |||
} | |||
$in_query = "INSERT INTO `#@__arctype`(reid,topid,sortrank,typename,typedir,isdefault,defaultname,issend,channeltype, | |||
tempindex,templist,temparticle,modname,namerule,namerule2, | |||
ispart,corank,description,keywords,seotitle,moresite,siteurl,sitepath,ishidden,`cross`,`crossid`,`content`,`smalltypes`) | |||
VALUES('$reid','$topid','$sortrank','$typename','$typedir','$isdefault','$defaultname','$issend','$channeltype', | |||
'$tempindex','$templist','$temparticle','default','$namerule','$namerule2', | |||
'$ispart','$corank','$description','$keywords','$seotitle','$moresite','$siteurl','$sitepath','$ishidden','$cross','$crossid','$content','$smalltypes')"; | |||
if(!$dsql->ExecuteNoneQuery($in_query)) | |||
{ | |||
ShowMsg("保存目录数据时失败,请检查你的输入资料是否存在问题!","-1"); | |||
exit(); | |||
} | |||
UpDateCatCache(); | |||
if($reid>0) | |||
{ | |||
PutCookie('lastCid',GetTopid($reid),3600*24,'/'); | |||
} | |||
ShowMsg("成功创建一个分类!","catalog_main.php"); | |||
exit(); | |||
}//End dopost==save | |||
//获取从父目录继承的默认参数 | |||
if($dopost=='') | |||
{ | |||
$channelid = 1; | |||
$issend = 1; | |||
$corank = 0; | |||
$reid = 0; | |||
$topid = 0; | |||
$typedir = ''; | |||
$moresite = 0; | |||
if($id>0) | |||
{ | |||
$myrow = $dsql->GetOne(" SELECT tp.*,ch.typename AS ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id "); | |||
$channelid = $myrow['channeltype']; | |||
$issennd = $myrow['issend']; | |||
$corank = $myrow['corank']; | |||
$topid = $myrow['topid']; | |||
$typedir = $myrow['typedir']; | |||
} | |||
//父栏目是否为二级站点 | |||
$moresite = empty($myrow['moresite']) ? 0 : $myrow['moresite']; | |||
} | |||
include DedeInclude('templets/catalog_add.htm'); |
@@ -0,0 +1,42 @@ | |||
<?php | |||
/** | |||
* 删除栏目 | |||
* | |||
* @version $Id: catalog_del.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__).'/config.php'); | |||
//检查权限许可 | |||
CheckPurview('t_Del,t_AccDel'); | |||
require_once(DEDEINC.'/typeunit.class.admin.php'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
$id = trim(preg_replace("#[^0-9]#", '', $id)); | |||
//检查栏目操作许可 | |||
CheckCatalog($id,"你无权删除本栏目!"); | |||
if(empty($dopost)) $dopost=''; | |||
if($dopost=='ok') | |||
{ | |||
$ut = new TypeUnit(); | |||
$ut->DelType($id,$delfile); | |||
UpDateCatCache(); | |||
ShowMsg("成功删除一个栏目!","catalog_main.php"); | |||
exit(); | |||
} | |||
$dsql->SetQuery("SELECT typename,typedir FROM #@__arctype WHERE id=".$id); | |||
$row = $dsql->GetOne(); | |||
$wintitle = "删除栏目确认"; | |||
$wecome_info = "<a href='catalog_main.php'>栏目管理</a> >> 删除栏目确认"; | |||
$win = new OxWindow(); | |||
$win->Init('catalog_del.php','js/blank.js','POST'); | |||
$win->AddHidden('id',$id); | |||
$win->AddHidden('dopost','ok'); | |||
$win->AddTitle("你要确实要删除栏目: [{$row['typename']}] 吗?"); | |||
$win->AddItem('栏目的文件保存目录:',$row['typedir']); | |||
$win->AddItem('是否删除文件:',"<input type='radio' name='delfile' class='np' value='no' checked='1' />否 <input type='radio' name='delfile' class='np' value='yes' />是"); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); |
@@ -0,0 +1,362 @@ | |||
<?php | |||
/** | |||
* 栏目操作 | |||
* | |||
* @version $Id: catalog_do.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__).'/config.php'); | |||
if(empty($dopost)) | |||
{ | |||
ShowMsg("对不起,请指定栏目参数!","catalog_main.php"); | |||
exit(); | |||
} | |||
$cid = empty($cid) ? 0 : intval($cid); | |||
$unittype = empty($unittype) ? 0 : intval($unittype); | |||
$channelid = empty($channelid) ? 0 : intval($channelid); | |||
/*-------------------------- | |||
//增加文档 | |||
function addArchives(); | |||
---------------------------*/ | |||
if($dopost=="addArchives") | |||
{ | |||
//默认文章调用发布表单 | |||
if(empty($cid) && empty($channelid)) | |||
{ | |||
header("location:article_add.php"); | |||
exit(); | |||
} | |||
if(!empty($channelid)) | |||
{ | |||
//根据模型调用发布表单 | |||
$row = $dsql->GetOne("SELECT addcon FROM #@__channeltype WHERE id='$channelid'"); | |||
} | |||
else | |||
{ | |||
//根据栏目调用发布表单 | |||
$row = $dsql->GetOne("SELECT ch.addcon FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id='$cid' "); | |||
} | |||
$gurl = $row["addcon"]; | |||
if($gurl=="") | |||
{ | |||
ShowMsg("对不起,你指的栏目可能有误!","catalog_main.php"); | |||
exit(); | |||
} | |||
//跳转并传递参数 | |||
header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); | |||
exit(); | |||
} | |||
/*-------------------------- | |||
//管理文档 | |||
function listArchives(); | |||
---------------------------*/ | |||
else if($dopost=="listArchives") | |||
{ | |||
if(!empty($gurl)) | |||
{ | |||
if(empty($arcrank)) | |||
{ | |||
$arcrank = ''; | |||
} | |||
$gurl = str_replace('..','',$gurl); | |||
header("location:{$gurl}?arcrank={$arcrank}&cid={$cid}"); | |||
exit(); | |||
} | |||
if($cid>0) | |||
{ | |||
$row = $dsql->GetOne("SELECT #@__arctype.typename,#@__channeltype.typename AS channelname,#@__channeltype.id,#@__channeltype.mancon FROM #@__arctype LEFT JOIN #@__channeltype on #@__channeltype.id=#@__arctype.channeltype WHERE #@__arctype.id='$cid'"); | |||
$gurl = $row["mancon"]; | |||
$channelid = $row["id"]; | |||
$typename = $row["typename"]; | |||
$channelname = $row["channelname"]; | |||
if($gurl=="") | |||
{ | |||
ShowMsg("对不起,你指的栏目可能有误!","catalog_main.php"); | |||
exit(); | |||
} | |||
} | |||
else if($channelid>0) | |||
{ | |||
$row = $dsql->GetOne("SELECT typename,id,mancon FROM #@__channeltype WHERE id='$channelid'"); | |||
$gurl = $row["mancon"]; | |||
$channelid = $row["id"]; | |||
$typename = ""; | |||
$channelname = $row["typename"]; | |||
} | |||
if(empty($gurl)) $gurl = 'content_list.php'; | |||
header("location:{$gurl}?channelid={$channelid}&cid={$cid}"); | |||
exit(); | |||
} | |||
/*-------------------------- | |||
//浏览通用模板目录 | |||
function viewTempletDir(); | |||
---------------------------*/ | |||
else if($dopost=="viewTemplet") | |||
{ | |||
header("location:tpl.php?path=/".$cfg_df_style); | |||
exit(); | |||
} | |||
/*-------------------------- | |||
//留言簿管理 | |||
function GoGuestBook(); | |||
---------------------------*/ | |||
else if($dopost=="guestbook") | |||
{ | |||
ShowMsg("正在跳转到留言本>>", "{$cfg_phpurl}/guestbook.php?gotopagerank=admin"); | |||
exit(); | |||
} | |||
/*------------------------ | |||
浏览单个页面的栏目 | |||
function ViewSgPage() | |||
------------------------*/ | |||
else if($dopost=="viewSgPage") | |||
{ | |||
require_once(DEDEINC."/arc.listview.class.php"); | |||
$lv = new ListView($cid); | |||
$pageurl = $lv->MakeHtml(); | |||
ShowMsg("更新缓冲,请稍后...",$pageurl); | |||
exit(); | |||
} | |||
/*------------------------ | |||
更改栏目排列顺序 | |||
function upRank() | |||
------------------------*/ | |||
else if($dopost=="upRank") | |||
{ | |||
//检查权限许可 | |||
CheckPurview('t_Edit,t_AccEdit'); | |||
//检查栏目操作许可 | |||
CheckCatalog($cid,"你无权更改本栏目!"); | |||
$row = $dsql->GetOne("SELECT reid,sortrank FROM #@__arctype WHERE id='$cid'"); | |||
$reid = $row['reid']; | |||
$sortrank = $row['sortrank']; | |||
$row = $dsql->GetOne("SELECT sortrank FROM #@__arctype WHERE sortrank<=$sortrank AND reid=$reid ORDER BY sortrank DESC "); | |||
if(is_array($row)) | |||
{ | |||
$sortrank = $row['sortrank']-1; | |||
$dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='$sortrank' WHERE id='$cid'"); | |||
} | |||
UpDateCatCache(); | |||
ShowMsg("操作成功,返回目录...","catalog_main.php"); | |||
exit(); | |||
} | |||
else if($dopost=="upRankAll") | |||
{ | |||
//检查权限许可 | |||
CheckPurview('t_Edit'); | |||
$row = $dsql->GetOne("SELECT id FROM #@__arctype ORDER BY id DESC"); | |||
if(is_array($row)) | |||
{ | |||
$maxID = $row['id']; | |||
for($i=1;$i<=$maxID;$i++) | |||
{ | |||
if(isset(${'sortrank'.$i})) | |||
{ | |||
$dsql->ExecuteNoneQuery("UPDATE #@__arctype SET sortrank='".(${'sortrank'.$i})."' WHERE id='{$i}';"); | |||
} | |||
} | |||
} | |||
UpDateCatCache(); | |||
ShowMsg("操作成功,正在返回...","catalog_main.php"); | |||
exit(); | |||
} | |||
/*-------------------------- | |||
//更新栏目缓存 | |||
function UpCatlogCache(); | |||
---------------------------*/ | |||
else if($dopost=="upcatcache") | |||
{ | |||
UpDateCatCache(); | |||
$sql = " TRUNCATE TABLE `#@__arctiny`"; | |||
$dsql->ExecuteNoneQuery($sql); | |||
//导入普通模型微数据 | |||
$sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) | |||
SELECT id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid FROM `#@__archives` "; | |||
$dsql->ExecuteNoneQuery($sql); | |||
//导入单表模型微数据 | |||
$dsql->SetQuery("SELECT id,addtable FROM `#@__channeltype` WHERE id < -1 "); | |||
$dsql->Execute(); | |||
$doarray = array(); | |||
while($row = $dsql->GetArray()) | |||
{ | |||
$tb = str_replace('#@__', $cfg_dbprefix, $row['addtable']); | |||
if(empty($tb) || isset($doarray[$tb]) ) | |||
{ | |||
continue; | |||
} | |||
else | |||
{ | |||
$sql = "INSERT INTO `#@__arctiny`(id, typeid, typeid2, arcrank, channel, senddate, sortrank, mid) | |||
SELECT aid, typeid, 0, arcrank, channel, senddate, 0, mid FROM `$tb` "; | |||
$rs = $dsql->executenonequery($sql); | |||
$doarray[$tb] = 1; | |||
} | |||
} | |||
ShowMsg("操作成功,正在返回...","catalog_main.php"); | |||
exit(); | |||
} | |||
/*--------------------- | |||
获取JS文件 | |||
function GetJs | |||
----------------------*/ | |||
else if($dopost=="GetJs") | |||
{ | |||
header("location:makehtml_js.php"); | |||
exit(); | |||
} | |||
/*----------- | |||
获得子类的内容 | |||
function GetSunListsMenu(); | |||
-----------*/ | |||
else if($dopost=="GetSunListsMenu") | |||
{ | |||
$userChannel = $cuserLogin->getUserChannel(); | |||
require_once(DEDEINC."/typeunit.class.menu.php"); | |||
AjaxHead(); | |||
PutCookie('lastCidMenu',$cid,3600*24,"/"); | |||
$tu = new TypeUnit($userChannel); | |||
$tu->LogicListAllSunType($cid," "); | |||
} | |||
/*----------- | |||
获得子类的内容 | |||
function GetSunLists(); | |||
-----------*/ | |||
else if($dopost=="GetSunLists") | |||
{ | |||
require_once(DEDEINC."/typeunit.class.admin.php"); | |||
AjaxHead(); | |||
PutCookie('lastCid', $cid, 3600*24, "/"); | |||
$tu = new TypeUnit(); | |||
$tu->dsql = $dsql; | |||
echo " <table width='100%' border='0' cellspacing='0' cellpadding='0'>\r\n"; | |||
$tu->LogicListAllSunType($cid, " "); | |||
echo " </table>\r\n"; | |||
$tu->Close(); | |||
} | |||
/*---------------- | |||
合并栏目 | |||
function unitCatalog() { } | |||
-----------------*/ | |||
else if($dopost == 'unitCatalog') | |||
{ | |||
CheckPurview('t_Move'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
require_once(DEDEINC.'/typelink.class.php'); | |||
require_once(DEDEINC.'/channelunit.func.php'); | |||
if(empty($nextjob)) | |||
{ | |||
$typeid = isset($typeid) ? intval($typeid) : 0; | |||
$row = $dsql->GetOne("SELECT COUNT(*) AS dd FROM `#@__arctype` WHERE reid='$typeid' "); | |||
$tl = new TypeLink($typeid); | |||
$typename = $tl->TypeInfos['typename']; | |||
$reid = $tl->TypeInfos['reid']; | |||
$channelid = $tl->TypeInfos['channeltype']; | |||
if(!empty($row['dd'])) | |||
{ | |||
ShowMsg("栏目: $typename($typeid) 有子栏目,不能进行合并操作!", '-1'); | |||
exit(); | |||
} | |||
$typeOptions = $tl->GetOptionArray(0, 0, $channelid); | |||
$wintitle = '合并栏目'; | |||
$wecome_info = "<a href='catalog_main.php'>栏目管理</a> >> 合并栏目"; | |||
$win = new OxWindow(); | |||
$win->Init('catalog_do.php', 'js/blank.js', 'POST'); | |||
$win->AddHidden('dopost', 'unitCatalog'); | |||
$win->AddHidden('typeid', $typeid); | |||
$win->AddHidden('channelid', $channelid); | |||
$win->AddHidden('nextjob', 'unitok'); | |||
$win->AddTitle("合并目录时不会删除原来的栏目目录,合并后需手动更新目标栏目的文档HTML和列表HTML。"); | |||
$win->AddItem('你选择的栏目是:', "<font color='red'>$typename($typeid)</font>"); | |||
$win->AddItem('你希望合并到那个栏目?', "<select name='unittype'>\r\n{$typeOptions}\r\n</select>"); | |||
$win->AddItem('注意事项:', '栏目不能有下级子栏目,只允许子级到更高级或同级或不同父级的情况。'); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); | |||
exit(); | |||
} | |||
else | |||
{ | |||
if($typeid==$unittype) | |||
{ | |||
ShowMsg("同一栏目无法合并,请后退重试!", '-1'); | |||
exit(); | |||
} | |||
if(IsParent($unittype, $typeid)) | |||
{ | |||
ShowMsg('不能从父类合并到子类!', 'catalog_main.php'); | |||
exit(); | |||
} | |||
$row = $dsql->GetOne("SELECT addtable FROM `#@__channeltype` WHERE id='$channelid' "); | |||
$addtable = (empty($row['addtable']) ? '#@__addonarticle' : $row['addtable'] ); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET typeid='$unittype' WHERE typeid='$typeid' "); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__feedback` SET typeid='$unittype' WHERE typeid='$typeid' "); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid='$unittype' WHERE typeid='$typeid' "); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__archives` SET typeid2='$unittype' WHERE typeid2='$typeid' "); | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__addonspec` SET typeid='$unittype' WHERE typeid='$typeid' "); | |||
$dsql->ExecuteNoneQuery("UPDATE `$addtable` SET typeid='$unittype' WHERE typeid='$typeid' "); | |||
$dsql->ExecuteNoneQuery("DELETE FROM `#@__arctype` WHERE id='$typeid' "); | |||
UpDateCatCache(); | |||
ShowMsg('成功合并指定栏目!', 'catalog_main.php'); | |||
exit(); | |||
} | |||
} | |||
/*---------------- | |||
移动栏目 | |||
function moveCatalog() { } | |||
-----------------*/ | |||
else if($dopost == 'moveCatalog') | |||
{ | |||
CheckPurview('t_Move'); | |||
require_once(DEDEINC.'/oxwindow.class.php'); | |||
require_once(DEDEINC.'/typelink.class.php'); | |||
require_once(DEDEINC.'/channelunit.func.php'); | |||
if(empty($nextjob)) | |||
{ | |||
$tl = new TypeLink($typeid); | |||
$typename = $tl->TypeInfos['typename']; | |||
$reid = $tl->TypeInfos['reid']; | |||
$channelid = $tl->TypeInfos['channeltype']; | |||
$typeOptions = $tl->GetOptionArray(0,0,$channelid); | |||
$wintitle = "移动栏目"; | |||
$wecome_info = "<a href='catalog_main.php'>栏目管理</a> >> 移动栏目"; | |||
$win = new OxWindow(); | |||
$win->Init('catalog_do.php', 'js/blank.js', 'POST'); | |||
$win->AddHidden('dopost', 'moveCatalog'); | |||
$win->AddHidden('typeid', $typeid); | |||
$win->AddHidden('channelid', $channelid); | |||
$win->AddHidden('nextjob', 'unitok'); | |||
$win->AddTitle("移动目录时不会删除原来已创建的列表,移动后需重新对栏目创建HTML。"); | |||
$win->AddItem('你选择的栏目是:',"$typename($typeid)"); | |||
$win->AddItem('你希望移动到那个栏目?',"<select name='movetype'>\r\n<option value='0'>移动为顶级栏目</option>\r\n$typeOptions\r\n</select>"); | |||
$win->AddItem('注意事项:','不允许从父级移动到子级目录,只允许子级到更高级或同级或不同父级的情况。'); | |||
$winform = $win->GetWindow('ok'); | |||
$win->Display(); | |||
exit(); | |||
} | |||
else | |||
{ | |||
if($typeid==$movetype) | |||
{ | |||
ShowMsg('移对对象和目标位置相同!', 'catalog_main.php'); | |||
exit(); | |||
} | |||
if(IsParent($movetype, $typeid)) | |||
{ | |||
ShowMsg('不能从父类移动到子类!', 'catalog_main.php'); | |||
exit(); | |||
} | |||
$dsql->ExecuteNoneQuery(" UPDATE `#@__arctype` SET reid='$movetype' WHERE id='$typeid' "); | |||
UpDateCatCache(); | |||
ShowMsg('成功移动目录!', 'catalog_main.php'); | |||
exit(); | |||
} | |||
} |
@@ -0,0 +1,287 @@ | |||
<?php | |||
/** | |||
* 栏目编辑 | |||
* | |||
* @version $Id: catalog_edit.php 1 14:31 2010年7月12日Z tianya $ | |||
* @package DedeCMS.Administrator | |||
* @copyright Copyright (c) 2007 - 2010, DesDev, Inc. | |||
* @license http://help.dedecms.com/usersguide/license.html | |||
* @link http://www.dedecms.com | |||
*/ | |||
require_once(dirname(__FILE__)."/config.php"); | |||
require_once(DEDEINC."/typelink.class.php"); | |||
if(empty($dopost)) $dopost = ''; | |||
$id = isset($id) ? intval($id) : 0; | |||
//检查权限许可 | |||
CheckPurview('t_Edit,t_AccEdit'); | |||
//检查栏目操作许可 | |||
CheckCatalog($id, '你无权更改本栏目!'); | |||
/*----------------------- | |||
function action_save() | |||
----------------------*/ | |||
if($dopost=="save") | |||
{ | |||
$description = Html2Text($description,1); | |||
$keywords = Html2Text($keywords,1); | |||
$uptopsql = $smalltypes = ''; | |||
if(isset($smalltype) && is_array($smalltype)) $smalltypes = join(',',$smalltype); | |||
if($topid==0) | |||
{ | |||
$sitepath = $typedir; | |||
$uptopsql = " ,siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' "; | |||
} | |||
if($ispart!=0) $cross = 0; | |||
$upquery = "UPDATE `#@__arctype` SET | |||
issend='$issend', | |||
sortrank='$sortrank', | |||
typename='$typename', | |||
typedir='$typedir', | |||
isdefault='$isdefault', | |||
defaultname='$defaultname', | |||
issend='$issend', | |||
ishidden='$ishidden', | |||
channeltype='$channeltype', | |||
tempindex='$tempindex', | |||
templist='$templist', | |||
temparticle='$temparticle', | |||
namerule='$namerule', | |||
namerule2='$namerule2', | |||
ispart='$ispart', | |||
corank='$corank', | |||
description='$description', | |||
keywords='$keywords', | |||
seotitle='$seotitle', | |||
moresite='$moresite', | |||
`cross`='$cross', | |||
`content`='$content', | |||
`crossid`='$crossid', | |||
`smalltypes`='$smalltypes' | |||
$uptopsql | |||
WHERE id='$id' "; | |||
if(!$dsql->ExecuteNoneQuery($upquery)) | |||
{ | |||
ShowMsg("保存当前栏目更改时失败,请检查你的输入资料是否存在问题!","-1"); | |||
exit(); | |||
} | |||
//如果选择子栏目可投稿,更新顶级栏目为可投稿 | |||
if($topid>0 && $issend==1) | |||
{ | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | |||
} | |||
$slinks = " id IN (".GetSonIds($id).")"; | |||
//修改顶级栏目时强制修改下级的多站点支持属性 | |||
if($topid==0 && preg_match("#,#", $slinks)) | |||
{ | |||
$upquery = "UPDATE `#@__arctype` SET moresite='$moresite', siteurl='$siteurl',sitepath='$sitepath',ishidden='$ishidden' WHERE 1=1 AND $slinks"; | |||
$dsql->ExecuteNoneQuery($upquery); | |||
} | |||
//更改子栏目属性 | |||
if(!empty($upnext)) | |||
{ | |||
$upquery = "UPDATE `#@__arctype` SET | |||
issend='$issend', | |||
defaultname='$defaultname', | |||
channeltype='$channeltype', | |||
tempindex='$tempindex', | |||
templist='$templist', | |||
temparticle='$temparticle', | |||
namerule='$namerule', | |||
namerule2='$namerule2', | |||
ishidden='$ishidden' | |||
WHERE 1=1 AND $slinks"; | |||
if(!$dsql->ExecuteNoneQuery($upquery)) | |||
{ | |||
ShowMsg("更改当前栏目成功,但更改下级栏目属性时失败!","-1"); | |||
exit(); | |||
} | |||
} | |||
UpDateCatCache(); | |||
ShowMsg("成功更改一个分类!","catalog_main.php"); | |||
exit(); | |||
}//End Save Action | |||
else if ($dopost=="savetime") | |||
{ | |||
$uptopsql = ''; | |||
$slinks = " id IN (".GetSonIds($id).")"; | |||
//顶级栏目二级域名根目录处理 | |||
if($topid==0 && $moresite==1) | |||
{ | |||
$sitepath = $typedir; | |||
$uptopsql = " ,sitepath='$sitepath' "; | |||
if(preg_match("#,#", $slinks)) | |||
{ | |||
$upquery = "UPDATE `#@__arctype` SET sitepath='$sitepath' WHERE $slinks"; | |||
$dsql->ExecuteNoneQuery($upquery); | |||
} | |||
} | |||
//如果选择子栏目可投稿,更新顶级栏目为可投稿 | |||
if($topid > 0 && $issend==1) | |||
{ | |||
$dsql->ExecuteNoneQuery("UPDATE `#@__arctype` SET issend='$issend' WHERE id='$topid'; "); | |||
} | |||
$upquery = "UPDATE `#@__arctype` SET | |||
issend='$issend', | |||
sortrank='$sortrank', | |||
typedir='$typedir', | |||
typename='$typename', | |||
isdefault='$isdefault', | |||
defaultname='$defaultname', | |||
ispart='$ispart', | |||
corank='$corank' $uptopsql | |||
WHERE id='$id' "; | |||
if(!$dsql->ExecuteNoneQuery($upquery)) | |||
{ | |||
ShowMsg("保存当前栏目更改时失败,请检查你的输入资料是否存在问题!","-1"); | |||
exit(); | |||
} | |||
UpDateCatCache(); | |||
ShowMsg("成功更改一个分类!","catalog_main.php"); | |||
exit(); | |||
} | |||
//读取栏目信息 | |||
$dsql->SetQuery("SELECT tp.*,ch.typename as ctypename FROM `#@__arctype` tp LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype WHERE tp.id=$id"); | |||
$myrow = $dsql->GetOne(); | |||
$topid = $myrow['topid']; | |||
if($topid>0) | |||
{ | |||
$toprow = $dsql->GetOne("SELECT moresite,siteurl,sitepath FROM `#@__arctype` WHERE id=$topid"); | |||
foreach($toprow as $k=>$v) | |||
{ | |||
if(!preg_match("#[0-9]#", $k)) | |||
{ | |||
$myrow[$k] = $v; | |||
} | |||
} | |||
} | |||
$myrow['content']=empty($myrow['content'])? " " : $myrow['content']; | |||
//读取频道模型信息 | |||
$channelid = $myrow['channeltype']; | |||
$dsql->SetQuery("SELECT id,typename,nid FROM `#@__channeltype` WHERE id<>-1 AND isshow=1 ORDER BY id"); | |||
$dsql->Execute(); | |||
while($row = $dsql->GetObject()) | |||
{ | |||
$channelArray[$row->id]['typename'] = $row->typename; | |||
$channelArray[$row->id]['nid'] = $row->nid; | |||
if($row->id==$channelid) | |||
{ | |||
$nid = $row->nid; | |||
} | |||
} | |||
PutCookie('lastCid',GetTopid($id),3600*24,"/"); | |||
if($dopost == 'time') | |||
{ | |||
?> | |||
<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']; ?>" /> | |||
<table width="100%" border="0" cellpadding="0" cellspacing="0"> | |||
<tr> | |||
<td class='bline' height="26" align="center" colspan="2"> | |||
<a href='catalog_edit.php?id=<?php echo $id; ?>'><u>当前是快捷编辑模式,如果您要修改更详细的参数,请使用高级模式>></u></a> | |||
</td> | |||
</tr> | |||
<tr> | |||
<td width="150" class='bline' height="26" align="center">是否支持投稿:</td> | |||
<td class='bline'> <input type='radio' name='issend' value='0' class='np' <?php if($myrow['issend']=="0") echo " checked='1' ";?> /> | |||
不支持 <input type='radio' name='issend' value='1' class='np' <?php if($myrow['issend']=="1") echo " checked='1' ";?> /> | |||
支持 </td> | |||
</tr> | |||
<!-- 在快速修改更改内容模型后,因为模板没改变,会导致错误,因此去除些选择框。 --> | |||
<tr> | |||
<td class='bline' height="26" align="center"><font color='red'>内容模型:</font> </td> | |||
<td class='bline'> | |||
<?php | |||
foreach($channelArray as $k=>$arr) | |||
{ | |||
if($k==$channelid) echo "{$arr['typename']} | {$arr['nid']}"; | |||
} | |||
?> | |||
<a href='catalog_edit.php?id=<?php echo $id; ?>'><u>[修改]</u></a> | |||
</td> | |||
</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> | |||
</tr> | |||
<tr> | |||
<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> | |||
</tr> | |||
<tr> | |||
<td class='bline' height="26" align="center">浏览权限:</td> | |||
<td class='bline'> <select name="corank" id="corank" style="width:100"> | |||
<?php | |||
$dsql->SetQuery("SELECT * FROM #@__arcrank WHERE rank >= 0"); | |||
$dsql->Execute(); | |||
while($row = $dsql->GetObject()) | |||
{ | |||
if($myrow['corank']==$row->rank) | |||
echo "<option value='".$row->rank."' selected>".$row->membername."</option>\r\n"; | |||
else | |||
echo "<option value='".$row->rank."'>".$row->membername."</option>\r\n"; | |||
} | |||
?> | |||
</select> | |||
(仅限制栏目里的文档浏览权限) </td> | |||
</tr> | |||
<tr> | |||
<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> | |||
</tr> | |||
<tr> | |||
<td height="26" align="center" class='bline'>栏目列表选项:</td> | |||
<td class='bline'> <input type='radio' name='isdefault' value='1' class='np'<?php if($myrow['isdefault']==1) echo " checked='1' ";?>/> | |||
链接到默认页 | |||
<input type='radio' name='isdefault' value='0' class='np'<?php if($myrow['isdefault']==0) echo " checked='1' ";?>/> | |||
链接到列表第一页 | |||
<input type='radio' name='isdefault' value='-1' class='np'<?php if($myrow['isdefault']==-1) echo " checked='1' ";?>/> | |||
使用动态页 </td> | |||
</tr> | |||
<tr> | |||
<td class='bline' height="26" align="center">默认页的名称: </td> | |||
<td class='bline'><input name="defaultname" type="text" value="<?php echo $myrow['defaultname']?>" class="iptxt" /></td> | |||
</tr> | |||
<tr> | |||
<td height="26" class='bline' align="center">栏目属性:</td> | |||
<td class='bline'> | |||
<input name="ispart" type="radio" id="radio" value="0" class='np'<?php if($myrow['ispart']==0) echo " checked='1' ";?>/> | |||
最终列表栏目(允许在本栏目发布文档,并生成文档列表)<br> | |||
<input name="ispart" type="radio" id="radio2" value="1" class='np'<?php if($myrow['ispart']==1) echo " checked='1' ";?>/> | |||
频道封面(栏目本身不允许发布文档)<br> | |||
<input name="ispart" type="radio" id="radio3" value="2" class='np'<?php if($myrow['ispart']==2) echo " checked='1' ";?>/> | |||
外部连接(在"文件保存目录"处填写网址) </td> | |||
</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> | |||
</tr> | |||
</table> | |||
</form> | |||
<?php | |||
exit(); | |||
} | |||
else | |||
{ | |||
include DedeInclude('templets/catalog_edit.htm'); | |||
} | |||
?> |