diff --git a/src/dede/ad_edit.php b/src/dede/ad_edit.php index 0dc4a265..a3fa39ce 100755 --- a/src/dede/ad_edit.php +++ b/src/dede/ad_edit.php @@ -32,7 +32,7 @@ if ($dopost == 'delete') { 如果不希望重新生成所有页面,则直接调用JS代码即可。 "; $wintitle = "广告管理-获取广告标签"; - $wecome_info = "广告管理::获取JS"; + $wecome_info = "广告管理::获取JS"; $win = new OxWindow(); $win->Init(); $winform = $win->GetWindow("hand", $info); diff --git a/src/dede/article_keywords_select.php b/src/dede/article_keywords_select.php index 0588d768..fb7dd78b 100755 --- a/src/dede/article_keywords_select.php +++ b/src/dede/article_keywords_select.php @@ -33,6 +33,6 @@ function GetSta($sta) function GetMan($sta) { - if ($sta == 1) return "禁用"; - else return "启用"; + if ($sta == 1) return "禁用"; + else return "启用"; } diff --git a/src/dede/article_test_title.php b/src/dede/article_test_title.php index bc1e20ce..e51591b7 100755 --- a/src/dede/article_test_title.php +++ b/src/dede/article_test_title.php @@ -15,5 +15,5 @@ if (empty($t) || $cfg_check_title == 'N') exit; $row = $dsql->GetOne("SELECT id FROM `#@__archives` WHERE title LIKE '$t' "); if (is_array($row)) { - echo "提示:系统已经存在标题为 '$t' 的文档。[关闭]"; + echo "提示:系统已经存在标题为 '$t' 的文档。[关闭]"; } diff --git a/src/dede/content_tj.php b/src/dede/content_tj.php index fc051079..45b5051f 100755 --- a/src/dede/content_tj.php +++ b/src/dede/content_tj.php @@ -40,7 +40,7 @@ function GetArchives($dsql, $ordertype) $dsql->Execute('ga'); while ($row = $dsql->GetObject('ga')) { if (preg_match("#feedback#i", $ordertype)) { - $moreinfo = "[id}'>评论:{$row->scores}]"; + $moreinfo = "[id}'>评论:{$row->scores}]"; } else { $moreinfo = "[点击:{$row->click}]"; } diff --git a/src/dede/file_manage_control.php b/src/dede/file_manage_control.php index 342ff05b..bf9bb638 100755 --- a/src/dede/file_manage_control.php +++ b/src/dede/file_manage_control.php @@ -126,7 +126,7 @@ else if ($fmdo == "space") { } else { $ecpath = $activepath; } - $titleinfo = "目录 $ecpath 空间使用状况:
"; + $titleinfo = "目录 $ecpath 空间使用状况:
"; $wintitle = "文件管理"; $wecome_info = "文件管理::空间大小检查 [文件浏览器]"; $activepath = $cfg_basedir.$activepath; diff --git a/src/dede/freelist_main.php b/src/dede/freelist_main.php index 933ddf42..405b60ee 100755 --- a/src/dede/freelist_main.php +++ b/src/dede/freelist_main.php @@ -68,10 +68,10 @@ function GetTagList($dsql,$pageno,$pagesize,$orderby='aid') $start = ($pageno-1) * $pagesize; $printhead =" - + - + \r\n"; diff --git a/src/dede/js/list.js b/src/dede/js/list.js index 80568552..5ef26814 100755 --- a/src/dede/js/list.js +++ b/src/dede/js/list.js @@ -85,7 +85,7 @@ function ShowMenu(evt,obj,aid,atitle) new ContextItem("推荐文档",function(){ adArc(aid); }), new ContextItem("删除文档",function(){ delArc(aid); }), new ContextSeperator(), - new ContextItem("复制(C)",function(){ copyToClipboard(atitle); }), + new ContextItem("复制(C)",function(){ copyToClipboard(atitle); }), new ContextItem("重载页面",function(){ location.reload(); }), new ContextSeperator(), new ContextItem("全部选择",function(){ selAll(); }), diff --git a/src/dede/module_main.php b/src/dede/module_main.php index 82587dd3..6c9bc8e7 100755 --- a/src/dede/module_main.php +++ b/src/dede/module_main.php @@ -1,5 +1,4 @@ "); fclose($fp); } - /*-------------- function ShowAll(); --------------*/ @@ -61,7 +57,6 @@ if ($action == '') { $types = array('soft' => '模块', 'templets' => '模板', 'plus' => '小插件', 'patch' => '补丁'); $dm = new DedeModule($mdir); if (empty($moduletype)) $moduletype = ''; - $modules_remote = $dm->GetModuleUrlList($moduletype, $mdurl); $modules = array(); $modules = $dm->GetModuleList($moduletype); @@ -75,16 +70,15 @@ if ($action == '') { } /*-------------- function ViewDevelopoer(); ---------------*/ else if ($action == 'view_developoer') { - // 检验开发者信息 +--------------*/ +else if ($action == 'view_developoer') { + //检验开发者信息 $dm = new DedeModule($mdir); $info = $dm->GetModuleInfo($hash); - if ($info == null) { ShowMsg("获取模块信息错误,模块文件可能被篡改", -1); exit; } - $dev_id = $info['dev_id']; $devURL = DEDECDNURL."/developers/$dev_id.json"; $dhd = new DedeHttpDown(); @@ -98,25 +92,23 @@ function ViewDevelopoer(); $authAt = date("Y-m-d", $devInfo['auth_at']); if (!isset($info['dev_id'])) { - $devInfo['realname'] = $devInfo['dev_name'] = $info['team']." 未认证"; + $devInfo['realname'] = $devInfo['dev_name'] = $info['team']." 未认证"; $authAt = "0000-00-00"; } - - ShowMsg("

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

开发者全称:{$devInfo['realname']}

开发者ID:{$devInfo['dev_id']} 查看详情

$offUrl

认证于:{$authAt}

", "javascript:;"); + ShowMsg("

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

开发者全称:{$devInfo['realname']}

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

$offUrl

认证于:{$authAt}

", "javascript:;"); exit; } /*-------------- function Setup(); ---------------*/ else if ($action == 'setup') { +--------------*/ +else if ($action == 'setup') { $dm = new DedeModule($mdir); $infos = $dm->GetModuleInfo($hash); if ($infos == null) { ShowMsg("获取模块信息错误,模块文件可能被篡改", -1); exit; } - - $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); - + $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); $filelists = $dm->GetFileLists($hash); $filelist = ''; $prvdirs = array(); @@ -147,85 +139,74 @@ function Setup(); $prvdirs[$prvdir][1] = TestWriteAble($prvdir); } } - $prvdir = "
IDID 列表名称 模板文件点击点击 创建时间 管理
\r\n"; + $prvdir = "
\r\n"; $prvdir .= "\r\n"; foreach ($prvdirs as $k => $v) { if ($v) $cw = '√'; else $cw = '×'; - $prvdir .= ""; - $prvdir .= "\r\n"; + $prvdir .= ""; + $prvdir .= "\r\n"; } $prvdir .= "
目录可写
$k$cw
$k$cw
"; - $win = new OxWindow(); $win->Init("module_main.php", "js/blank.js", "post"); $wecome_info = "模块管理"; $win->AddTitle(" 模块管理 >> 安装模块: {$infos['name']}"); $win->AddHidden("hash", $hash); $win->AddHidden("action", 'setupstart'); - - $msg = " + $msg = " - + - + - + - - + + - + - - + + - + - - + -
模块名称:模块名称: {$infos['name']}
语言:语言: {$infos['lang']} {$alertMsg}
文件大小:文件大小: {$infos['filesize']}
开发者ID:{$infos['dev_id']} 查看详情开发者ID:{$infos['dev_id']} 未认证
发布时间:发布时间: {$infos['time']}
使用协议:点击浏览...使用协议:浏览
-
- 注意事项: - 安装时请确保文件列表中涉及的目录前可写入权限,此外“后台管理目录”、“后台管理目录/templets”目录也必须暂时设置可写入权限。 -
+
注意事项:安装时请确保文件列表中涉及的目录前可写入权限,此外“后台管理目录”、“后台管理目录/templets”目录也必须暂时设置可写入权限。
目录权限检测:
../ 为根目录
./ 表示当前目录
- $prvdir - $prvdir
模块包含的所有文件列表:
+
对于已存在文件处理方法:对于已存在文件处理方法: - - - + + +
- "; +"; $win->AddMsgItem("
$msg
"); $winform = $win->GetWindow("ok", ""); $win->Display(); @@ -234,36 +215,31 @@ function Setup(); } /*--------------- function SetupRun() ---------------*/ else if ($action == 'setupstart') { +--------------*/ +else if ($action == 'setupstart') { if (!is_writeable($mdir)) { - ShowMsg("目录 {$mdir} 不支持写入,这将导致安装程序没法正常创建!", "-1"); + ShowMsg("目录 {$mdir} 不支持写入,这将导致安装程序没法正常创建", "-1"); exit(); } $dm = new DedeModule($mdir); - $minfos = $dm->GetModuleInfo($hash); extract($minfos, EXTR_SKIP); - $menustring = addslashes($dm->GetSystemFile($hash, 'menustring')); $indexurl = str_replace('**', '=', $indexurl); - $query = "INSERT INTO `#@__sys_module`(`hashcode` , `modname` , `indexname` , `indexurl` , `ismember` , `menustring` ) - VALUES ('$hash' , '$name' , '$indexname' , '$indexurl' , '$ismember' , '$menustring' ) "; - + VALUES ('$hash' , '$name' , '$indexname' , '$indexurl' , '$ismember' , '$menustring' ) "; $rs = $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' "); $rs = $dsql->ExecuteNoneQuery($query); if (!$rs) { - ShowMsg('保存数据库信息失败,无法完成安装!'.$dsql->GetError(), 'javascript:;'); + ShowMsg('保存数据库信息失败,无法完成安装'.$dsql->GetError(), 'javascript:;'); exit(); } - $dm->WriteFiles($hash, $isreplace); $filename = ''; if (!isset($autosetup) || $autosetup == 0) $filename = $dm->WriteSystemFile($hash, 'setup'); if (!isset($autodel) || $autodel == 0) $dm->WriteSystemFile($hash, 'uninstall'); $dm->WriteSystemFile($hash, 'readme'); $dm->Clear(); - //用模块的安装程序安装 if (!isset($autosetup) || $autosetup == 0) { include(DEDEDATA.'/module/'.$filename); @@ -274,35 +250,26 @@ function SetupRun() $mysql_version = $dsql->GetVersion(TRUE); //默认使用MySQL 4.1 以下版本的SQL语句,对大于4.1版本采用替换处理 TYPE=MyISAM ==> ENGINE=MyISAM DEFAULT CHARSET=#~lang~# $setupsql = $dm->GetSystemFile($hash, 'setupsql40'); - $setupsql = preg_replace("#ENGINE=MyISAM#i", 'TYPE=MyISAM', $setupsql); $sql41tmp = 'ENGINE=MyISAM DEFAULT CHARSET='.$cfg_db_language; - if ($mysql_version >= 4.1) { $setupsql = preg_replace("#TYPE=MyISAM#i", $sql41tmp, $setupsql); } - //_ROOTURL_ if ($cfg_cmspath == '/') $cfg_cmspath = ''; - $rooturl = $cfg_basehost.$cfg_cmspath; - $setupsql = preg_replace("#_ROOTURL_#i", $rooturl, $setupsql); $setupsql = preg_replace("#[\r\n]{1,}#", "\n", $setupsql); - $sqls = @split(";[ \t]{0,}\n", $setupsql); foreach ($sqls as $sql) { if (trim($sql) != '') $dsql->ExecuteNoneQuery($sql); } - ReWriteConfigAuto(); - $rflwft = ""; echo $rflwft; - UpDateCatCache(); ShowMsg('模块安装完成...', 'module_main.php'); exit(); @@ -310,51 +277,48 @@ function SetupRun() } /*-------------- function DelModule(); ---------------*/ else if ($action == 'del') { +--------------*/ +else if ($action == 'del') { $dm = new DedeModule($mdir); $infos = $dm->GetModuleInfo($hash); - - $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); - $dev_id = empty($infos['dev_id'])? "未认证 前去认证" : "{$infos['dev_id']} 查看详情"; + $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); + $dev_id = empty($infos['dev_id'])? "未认证" : "{$infos['dev_id']} 未认证"; $win = new OxWindow(); $win->Init("module_main.php", "js/blank.js", "post"); $wecome_info = "模块管理"; $win->AddTitle("模块管理 >> 删除模块: {$infos['name']}"); $win->AddHidden('hash', $hash); $win->AddHidden('action', 'delok'); - $msg = " + $msg = " - + - + - + - + - + - - + + - + -
模块名称:模块名称: {$infos['name']}
语言:语言: {$infos['lang']} {$alertMsg}
文件大小:文件大小: {$infos['filesize']}
开发者ID:开发者ID: {$dev_id}
发布时间:发布时间: {$infos['time']}
使用协议:点击浏览...使用协议:浏览
- 删除模块仅删除这个模块的安装包文件,如果您已经安装,请执行卸载程序来删除! - 删除模块仅删除这个模块的安装包文件,如果您已经安装,请执行卸载程序来删除
- "; +"; $win->AddMsgItem("
$msg
"); $winform = $win->GetWindow("ok", ""); $win->Display(); @@ -363,19 +327,18 @@ function DelModule(); } else if ($action == 'delok') { $dm = new DedeModule($mdir); $modfile = $mdir."/".$dm->GetHashFile($hash); - unlink($modfile) or die("删除文件 {$modfile} 失败!"); - ShowMsg("成功删除一个模块文件!", "module_main.php"); + unlink($modfile) or die("删除文件 {$modfile} 失败"); + ShowMsg("成功删除一个模块文件", "module_main.php"); exit(); } /*-------------- function UnInstall(); ---------------*/ else if ($action == 'uninstall') { +--------------*/ +else if ($action == 'uninstall') { $dm = new DedeModule($mdir); $infos = $dm->GetModuleInfo($hash); - if ($infos['url'] == '') $infos['url'] = ' '; - $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); - + $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '
(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); $filelists = $dm->GetFileLists($hash); $filelist = ''; foreach ($filelists as $v) { @@ -384,58 +347,55 @@ function UnInstall(); else $v['type'] = '文件'; $filelist .= "{$v['type']}|{$v['name']}\r\n"; } - $dev_id = empty($infos['dev_id'])? "未认证 前去认证" : "{$infos['dev_id']} 查看详情"; + $dev_id = empty($infos['dev_id'])? "未认证" : "{$infos['dev_id']} 未认证"; $win = new OxWindow(); $win->Init("module_main.php", "js/blank.js", "post"); $wecome_info = "模块管理"; $win->AddTitle("模块管理 >> 卸载模块: {$infos['name']}"); $win->AddHidden("hash", $hash); $win->AddHidden("action", 'uninstallok'); - $msg = " + $msg = " - + - + - + - + - + - - + + - + - - + -
模块名称:模块名称: {$infos['name']}
语言:语言: {$infos['lang']} {$alertMsg}
文件大小:文件大小: {$infos['filesize']}
开发者ID:开发者ID: {$dev_id}
发布时间:发布时间: {$infos['time']}
使用协议:点击浏览...使用协议:浏览
模块包含的文件:
(文件路径相对于当前目录)
 模块包含的文件:
(文件路径相对于当前目录)
 
+
对于模块的文件处理方法:对于模块的文件处理方法: - - + +
- "; +"; $win->AddMsgItem("
$msg
"); $winform = $win->GetWindow("ok", ""); $win->Display(); @@ -444,13 +404,12 @@ function UnInstall(); } /*-------------- function UnInstallRun(); ---------------*/ else if ($action == 'uninstallok') { +--------------*/ +else if ($action == 'uninstallok') { $dsql->ExecuteNoneQuery("DELETE FROM `#@__sys_module` WHERE hashcode LIKE '$hash' "); $dm = new DedeModule($mdir); - $minfos = $dm->GetModuleInfo($hash); extract($minfos, EXTR_SKIP); - if (!isset($moduletype) || $moduletype != 'patch') { $dm->DeleteFiles($hash, $isreplace); } @@ -470,9 +429,7 @@ function UnInstallRun(); if (trim($sql) != '') $dsql->ExecuteNoneQuery($sql); } } - ReWriteConfigAuto(); - $rflwft = "