| @@ -25,9 +25,7 @@ if ($dopost == 'delete') { | |||||
| $showhtml .= "预览:<iframe name='testfrm' frameborder='0' src='ad_edit.php?aid={$aid}&dopost=testjs' id='testfrm' width='100%' height='200'></iframe>"; | $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' "); | $row = $dsql->GetOne("SELECT tagname from `#@__myad` WHERE aid='$aid' "); | ||||
| $showtag = '{'."dede:myad name='{$row['tagname']}'/".'}'; | $showtag = '{'."dede:myad name='{$row['tagname']}'/".'}'; | ||||
| $info = "说明:如果嵌入的是Dede广告标签,那将会解析成标签中的文档到页面,广告修改后需要重新生成<br> | |||||
| 如果不希望重新生成所有页面,则直接调用js代码即可 | |||||
| "; | |||||
| $info = "说明:如果嵌入的是Dede广告标签,那会解析成标签中的文档到页面,广告修改后需要重新生成<br>如果不希望重新生成所有页面,则直接调用js代码即可"; | |||||
| $wintitle = "广告管理-获取广告标签"; | $wintitle = "广告管理-获取广告标签"; | ||||
| $wecome_info = "<a href='ad_main.php'>广告管理</a>::获取js"; | $wecome_info = "<a href='ad_main.php'>广告管理</a>::获取js"; | ||||
| $win = new OxWindow(); | $win = new OxWindow(); | ||||
| @@ -404,7 +404,7 @@ else if ($dopost == "delArchives") { | |||||
| $win->AddHidden("dopost", $dopost); | $win->AddHidden("dopost", $dopost); | ||||
| $win->AddHidden("qstr", $qstr); | $win->AddHidden("qstr", $qstr); | ||||
| $win->AddHidden("aid", $aid); | $win->AddHidden("aid", $aid); | ||||
| $win->AddTitle("您确定删除,序号<span class='text-primary'>$qstr</span>文档"); | |||||
| $win->AddTitle("您确定删除,序号<span class='text-primary'>$qstr</span>文档吗"); | |||||
| $winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
| $win->Display(); | $win->Display(); | ||||
| } | } | ||||
| @@ -458,7 +458,7 @@ else if ($dopost == 'clear') { | |||||
| $win->AddHidden("qstr", $qstr); | $win->AddHidden("qstr", $qstr); | ||||
| $win->AddHidden("aid", $aid); | $win->AddHidden("aid", $aid); | ||||
| $win->AddHidden("recycle", $recycle); | $win->AddHidden("recycle", $recycle); | ||||
| $win->AddTitle("回收站将清空<span class='text-primary'>$num</span>篇文档<br>您确定删除,序号<span class='text-primary'>$qstr</span>文档"); | |||||
| $win->AddTitle("清空回收站<span class='text-primary'>$num</span>篇文档<br>您确定删除,序号<span class='text-primary'>$qstr</span>文档吗"); | |||||
| $winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
| $win->Display(); | $win->Display(); | ||||
| } | } | ||||
| @@ -499,7 +499,7 @@ else if ($dopost == 'del') { | |||||
| $win->AddHidden("qstr", $qstr); | $win->AddHidden("qstr", $qstr); | ||||
| $win->AddHidden("aid", $aid); | $win->AddHidden("aid", $aid); | ||||
| $win->AddHidden("recycle", $recycle); | $win->AddHidden("recycle", $recycle); | ||||
| $win->AddTitle("您确要删除,序号<span class='text-primary'>$qstr</span>文档"); | |||||
| $win->AddTitle("您确要删除,序号<span class='text-primary'>$qstr</span>文档吗"); | |||||
| $winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
| $win->Display(); | $win->Display(); | ||||
| } | } | ||||
| @@ -14,11 +14,6 @@ require_once(DEDEINC.'/userlogin.class.php'); | |||||
| header('Cache-Control:private'); | header('Cache-Control:private'); | ||||
| $dsql->safeCheck = FALSE; | $dsql->safeCheck = FALSE; | ||||
| $dsql->SetLongLink(); | $dsql->SetLongLink(); | ||||
| $cfg_admin_skin = 1;//后台管理风格 | |||||
| if (file_exists(DEDEDATA.'/admin/skin.txt')) { | |||||
| $skin = file_get_contents(DEDEDATA.'/admin/skin.txt'); | |||||
| $cfg_admin_skin = !in_array($skin, array(1, 2, 3, 4)) ? 1 : $skin; | |||||
| } | |||||
| //检查CSRF | //检查CSRF | ||||
| function CheckCSRF() | function CheckCSRF() | ||||
| { | { | ||||
| @@ -107,7 +102,7 @@ function UpDateCatCache() | |||||
| $fp1Header = "<{$phph}php\r\nglobal \$cfg_Cs;\r\n\$cfg_Cs=array();\r\n"; | $fp1Header = "<{$phph}php\r\nglobal \$cfg_Cs;\r\n\$cfg_Cs=array();\r\n"; | ||||
| fwrite($fp1, $fp1Header); | fwrite($fp1, $fp1Header); | ||||
| while ($row = $dsql->GetObject()) { | while ($row = $dsql->GetObject()) { | ||||
| //将typename缓存起来 | |||||
| //typename缓存起来 | |||||
| $row->typename = base64_encode($row->typename); | $row->typename = base64_encode($row->typename); | ||||
| fwrite($fp1, "\$cfg_Cs[{$row->id}]=array({$row->reid},{$row->channeltype},{$row->issend},'{$row->typename}');\r\n"); | fwrite($fp1, "\$cfg_Cs[{$row->id}]=array({$row->reid},{$row->channeltype},{$row->issend},'{$row->typename}');\r\n"); | ||||
| } | } | ||||
| @@ -42,7 +42,7 @@ else if ($dopost == "delete") { | |||||
| $win->AddHidden("job", "yes"); | $win->AddHidden("job", "yes"); | ||||
| $win->AddHidden("dopost", $dopost); | $win->AddHidden("dopost", $dopost); | ||||
| $win->AddHidden("diyid", $diyid); | $win->AddHidden("diyid", $diyid); | ||||
| $win->AddTitle("将删除所有与该自定义表单相关的文件和数据<br>您确定要删除<span class='text-primary'>\"".$row['name']."\"</span>自定义表单吗"); | |||||
| $win->AddTitle("删除所有自定义表单相关的文件和数据<br>您确定要删除<span class='text-primary'>\"".$row['name']."\"</span>自定义表单吗"); | |||||
| $winform = $win->GetWindow("ok"); | $winform = $win->GetWindow("ok"); | ||||
| $win->Display(); | $win->Display(); | ||||
| exit(); | exit(); | ||||
| @@ -41,7 +41,7 @@ $actionSearch[0] = array( | |||||
| ), | ), | ||||
| 4 => array( | 4 => array( | ||||
| 'title' => '文档回收站', | 'title' => '文档回收站', | ||||
| 'description' => '如果在"系统配置变量"的"核心设置"中开启了"文档回收站是否开启功能",后台删除的文档将会存放在此处', | |||||
| 'description' => '如果在"系统配置变量"的"核心设置"中开启了"文档回收站是否开启功能",后台删除的文档会存放在此处', | |||||
| 'purview' => 'a_List,a_AccList,a_MyList', | 'purview' => 'a_List,a_AccList,a_MyList', | ||||
| 'linkurl' => 'recycling.php' | 'linkurl' => 'recycling.php' | ||||
| ) | ) | ||||
| @@ -130,8 +130,8 @@ else if ($dopost == 'setskin') { | |||||
| )); | )); | ||||
| exit; | exit; | ||||
| } elseif ($dopost == 'safe_mode') { | } elseif ($dopost == 'safe_mode') { | ||||
| $safemsg = "系统运行模式为:安全模式,模板管理、标签管理、数据库管理、模块管理等功能已暂停,如果您需要这些功能,在/system/common.inc.php文件大约第10行代码找到DEDEBIZ_SAFE_MODE后面值TRUE修改为FALSE恢复使用"; | |||||
| $unsafemsg = "系统运行模式为:开发模式,模板管理、标签管理、数据库管理、模块管理等功能已恢复,如果您不需要这些功能,在/system/common.inc.php文件大约第10行代码找到DEDEBIZ_SAFE_MODE后面值FALSE修改为TRUE暂停使用"; | |||||
| $safemsg = "系统运行模式为安全模式,模板管理、标签管理、数据库管理、模块管理等功能已暂停,如果您需要这些功能,在/system/common.inc.php文件大约第10行代码找到DEDEBIZ_SAFE_MODE后面值TRUE修改为FALSE恢复使用"; | |||||
| $unsafemsg = "系统运行模式为开发模式,模板管理、标签管理、数据库管理、模块管理等功能已恢复,如果您不需要这些功能,在/system/common.inc.php文件大约第10行代码找到DEDEBIZ_SAFE_MODE后面值FALSE修改为TRUE暂停使用"; | |||||
| $modeStr = DEDEBIZ_SAFE_MODE? $safemsg : $unsafemsg; | $modeStr = DEDEBIZ_SAFE_MODE? $safemsg : $unsafemsg; | ||||
| ShowMsg($modeStr, "javascript:;"); | ShowMsg($modeStr, "javascript:;"); | ||||
| exit; | exit; | ||||
| @@ -413,7 +413,7 @@ function copyToClipboard(txt) { | |||||
| try { | try { | ||||
| netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); | netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); | ||||
| } catch (e) { | } catch (e) { | ||||
| alert("被浏览器拒绝,请在浏览器地址栏输入about:config并回车\n然后将signed.applets.codebase_principal_support设置为true"); | |||||
| alert("被浏览器拒绝,请在浏览器地址栏输入about:config并回车\n然后把signed.applets.codebase_principal_support设置为true"); | |||||
| } | } | ||||
| var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); | var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard); | ||||
| if (!clip) return; | if (!clip) return; | ||||
| @@ -93,7 +93,7 @@ else if ($action == 'view_developoer') { | |||||
| } | } | ||||
| $authAt = date("Y-m-d", $devInfo['auth_at']); | $authAt = date("Y-m-d", $devInfo['auth_at']); | ||||
| if (!isset($info['dev_id'])) { | if (!isset($info['dev_id'])) { | ||||
| $devInfo['dev_name'] = $info['team']."<span style='display:inline-block;margin-left:10px;padding:.25rem .5rem;line-height:1.5;font-size:12px;color:#fff;background:#dc3545;border-color:#dc3545;border-radius:.2rem'>未认证</span>"; | |||||
| $devInfo['dev_name'] = $info['team']."<span class='btn btn-danger btn-sm'>未认证</span>"; | |||||
| $authAt = "未知"; | $authAt = "未知"; | ||||
| } | } | ||||
| ShowMsg("<p>开发者名称:{$devInfo['dev_name']}</p><p>开发者id:{$devInfo['dev_id']}</p><span>认证于:{$authAt}</span>", "-1"); | ShowMsg("<p>开发者名称:{$devInfo['dev_name']}</p><p>开发者id:{$devInfo['dev_id']}</p><span>认证于:{$authAt}</span>", "-1"); | ||||
| @@ -109,7 +109,7 @@ else if ($action == 'setup') { | |||||
| ShowMsg("获取模块信息错误,模块文件可能被篡改", -1); | ShowMsg("获取模块信息错误,模块文件可能被篡改", -1); | ||||
| exit; | exit; | ||||
| } | } | ||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); | |||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性'); | |||||
| $filelists = (array)$dm->GetFileLists($hash); | $filelists = (array)$dm->GetFileLists($hash); | ||||
| $filelist = ''; | $filelist = ''; | ||||
| $prvdirs = array(); | $prvdirs = array(); | ||||
| @@ -164,57 +164,56 @@ else if ($action == 'setup') { | |||||
| $win->AddTitle("<a href='module_main.php'>模块管理</a> > 安装模块:{$infos['name']}"); | $win->AddTitle("<a href='module_main.php'>模块管理</a> > 安装模块:{$infos['name']}"); | ||||
| $win->AddHidden("hash", $hash); | $win->AddHidden("hash", $hash); | ||||
| $win->AddHidden("action", 'setupstart'); | $win->AddHidden("action", 'setupstart'); | ||||
| $msg = "<style>.dtb{border-bottom:1px dotted #eee}</style> | |||||
| <table width='98%' cellspacing='0' cellpadding='0' class='table'> | |||||
| <tr> | |||||
| <td width='260' class='dtb'>模块名称:</td> | |||||
| <td class='dtb'>{$infos['name']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>语言:</td> | |||||
| <td class='dtb'>{$infos['lang']} {$alertMsg}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>文件大小:</td> | |||||
| <td class='dtb'>{$infos['filesize']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>开发者id:</td> | |||||
| <td class='dtb'>{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-success btn-sm'>{$s}</a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>发布时间:</td> | |||||
| <td class='dtb'>{$infos['time']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>使用协议:</td> | |||||
| <td class='dtb'><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank' class='btn btn-success btn-sm'>浏览</a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb' colspan='2'> | |||||
| <div class='alert alert-danger mb-0'>注意事项:安装时请确保文件列表中涉及的目录前可写入权限,此外“后台管理目录”、“templets”目录也必须暂时设置可写入权限</div> | |||||
| </td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>目录权限检测:<br> ../ 为根目录 <br> ./ 表示当前目录</td> | |||||
| <td>$prvdir</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>模块包含的所有文件列表:</td> | |||||
| <td></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td height='160' colspan='2'><textarea name='filelists' id='filelists' class='admin-textarea-xl'>{$filelist}</textarea></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>对于已存在文件处理方法:</td> | |||||
| <td> | |||||
| <label><input type='radio' name='isreplace' value='1' checked='checked'> 覆盖</label> | |||||
| <label><input type='radio' name='isreplace' value='3'> 覆盖,保留副本</label> | |||||
| <label><input type='radio' name='isreplace' value='0'> 保留旧文件</label> | |||||
| </td> | |||||
| </tr> | |||||
| </table>"; | |||||
| $msg = "<table width='98%' cellspacing='0' cellpadding='0' class='table'> | |||||
| <tr> | |||||
| <td width='260' class='admin-td'>模块名称:</td> | |||||
| <td class='admin-td'>{$infos['name']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>语言:</td> | |||||
| <td class='admin-td'>{$infos['lang']} {$alertMsg}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>文件大小:</td> | |||||
| <td class='admin-td'>{$infos['filesize']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>开发者id:</td> | |||||
| <td class='admin-td'>{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-success btn-sm'>{$s}</a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>发布时间:</td> | |||||
| <td class='admin-td'>{$infos['time']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>使用协议:</td> | |||||
| <td class='admin-td'><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank' class='btn btn-success btn-sm'>浏览</a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td' colspan='2'> | |||||
| <div class='alert alert-danger mb-0'>注意事项:安装时请确保文件列表中涉及的目录前可写入权限,此外“后台管理目录”、“templets”目录也必须暂时设置可写入权限</div> | |||||
| </td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>目录权限检测:<br> ../ 为根目录 <br> ./ 表示当前目录</td> | |||||
| <td>$prvdir</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>模块包含的所有文件列表:</td> | |||||
| <td></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td colspan='2'><textarea name='filelists' id='filelists' class='admin-textarea-xl'>{$filelist}</textarea></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>对于已存在文件处理方法:</td> | |||||
| <td> | |||||
| <label><input type='radio' name='isreplace' value='1' checked='checked'> 覆盖</label> | |||||
| <label><input type='radio' name='isreplace' value='3'> 覆盖,保留副本</label> | |||||
| <label><input type='radio' name='isreplace' value='0'> 保留旧文件</label> | |||||
| </td> | |||||
| </tr> | |||||
| </table>"; | |||||
| $win->AddMsgItem("$msg"); | $win->AddMsgItem("$msg"); | ||||
| $winform = $win->GetWindow("ok", ""); | $winform = $win->GetWindow("ok", ""); | ||||
| $win->Display(); | $win->Display(); | ||||
| @@ -226,7 +225,7 @@ function SetupRun() | |||||
| --------------*/ | --------------*/ | ||||
| else if ($action == 'setupstart') { | else if ($action == 'setupstart') { | ||||
| if (!is_writeable($mdir)) { | if (!is_writeable($mdir)) { | ||||
| ShowMsg("目录 {$mdir} 不支持写入,这将导致程序安装没法正常创建", "-1"); | |||||
| ShowMsg("目录<span class='text-primary'>{$mdir}</span>不支持写入,这导致程序安装没法正常创建", "-1"); | |||||
| exit(); | exit(); | ||||
| } | } | ||||
| $dm = new DedeModule($mdir); | $dm = new DedeModule($mdir); | ||||
| @@ -288,7 +287,7 @@ function DelModule(); | |||||
| else if ($action == 'del') { | else if ($action == 'del') { | ||||
| $dm = new DedeModule($mdir); | $dm = new DedeModule($mdir); | ||||
| $infos = $dm->GetModuleInfo($hash); | $infos = $dm->GetModuleInfo($hash); | ||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); | |||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性'); | |||||
| $dev_id = empty($infos['dev_id'])? "<a href='{$cfg_biz_dedebizUrl}/developer' target='_blank' class='btn btn-danger btn-sm'>未认证</a>" : "{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-success btn-sm'>已认证</a>"; | $dev_id = empty($infos['dev_id'])? "<a href='{$cfg_biz_dedebizUrl}/developer' target='_blank' class='btn btn-danger btn-sm'>未认证</a>" : "{$infos['dev_id']} <a href='{$cfg_biz_dedebizUrl}/developer?dev_id={$infos['dev_id']}' target='_blank' class='btn btn-success btn-sm'>已认证</a>"; | ||||
| $win = new OxWindow(); | $win = new OxWindow(); | ||||
| $win->Init("module_main.php", "js/blank.js", "post"); | $win->Init("module_main.php", "js/blank.js", "post"); | ||||
| @@ -296,36 +295,35 @@ else if ($action == 'del') { | |||||
| $win->AddTitle("<a href='module_main.php'>模块管理</a> > 删除模块:{$infos['name']}"); | $win->AddTitle("<a href='module_main.php'>模块管理</a> > 删除模块:{$infos['name']}"); | ||||
| $win->AddHidden('hash', $hash); | $win->AddHidden('hash', $hash); | ||||
| $win->AddHidden('action', 'delok'); | $win->AddHidden('action', 'delok'); | ||||
| $msg = "<style>.dtb{border-bottom:1px dotted #eee}</style> | |||||
| <table width='98%' cellspacing='0' cellpadding='0' class='table'> | |||||
| $msg = "<table width='98%' cellspacing='0' cellpadding='0' class='table'> | |||||
| <tr> | <tr> | ||||
| <td width='260' class='dtb'>模块名称:</td> | |||||
| <td class='dtb'>{$infos['name']}</td> | |||||
| <td width='260' class='admin-td'>模块名称:</td> | |||||
| <td class='admin-td'>{$infos['name']}</td> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td class='dtb'>语言:</td> | |||||
| <td class='dtb'>{$infos['lang']} {$alertMsg}</td> | |||||
| <td class='admin-td'>语言:</td> | |||||
| <td class='admin-td'>{$infos['lang']} {$alertMsg}</td> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td class='dtb'>文件大小:</td> | |||||
| <td class='dtb'>{$infos['filesize']}</td> | |||||
| <td class='admin-td'>文件大小:</td> | |||||
| <td class='admin-td'>{$infos['filesize']}</td> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td class='dtb'>开发者id:</td> | |||||
| <td class='dtb'>{$dev_id}</td> | |||||
| <td class='admin-td'>开发者id:</td> | |||||
| <td class='admin-td'>{$dev_id}</td> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td class='dtb'>发布时间:</td> | |||||
| <td class='dtb'>{$infos['time']}</td> | |||||
| <td class='admin-td'>发布时间:</td> | |||||
| <td class='admin-td'>{$infos['time']}</td> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td class='dtb'>使用协议:</td> | |||||
| <td class='dtb'><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank' class='btn btn-success btn-sm'>浏览</a></td> | |||||
| <td class='admin-td'>使用协议:</td> | |||||
| <td class='admin-td'><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank' class='btn btn-success btn-sm'>浏览</a></td> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td colspan='2'>删除模块仅删除这个模块的安装包文件,如果您已经安装,请执行<a href='module_main.php?hash={$hash}&action=uninstall'>卸载程序</a>来删除</td> | |||||
| <td colspan='2'>删除模块仅删除这个模块的安装包文件,如果您已经安装,请执行<a href='module_main.php?hash={$hash}&action=uninstall'>卸载程序</a>来删除</td> | |||||
| </tr> | </tr> | ||||
| </table>"; | |||||
| </table>"; | |||||
| $win->AddMsgItem("$msg"); | $win->AddMsgItem("$msg"); | ||||
| $winform = $win->GetWindow("ok", ""); | $winform = $win->GetWindow("ok", ""); | ||||
| $win->Display(); | $win->Display(); | ||||
| @@ -334,7 +332,7 @@ else if ($action == 'del') { | |||||
| } else if ($action == 'delok') { | } else if ($action == 'delok') { | ||||
| $dm = new DedeModule($mdir); | $dm = new DedeModule($mdir); | ||||
| $modfile = $mdir."/".$dm->GetHashFile($hash); | $modfile = $mdir."/".$dm->GetHashFile($hash); | ||||
| unlink($modfile) or die("删除文件 {$modfile} 失败"); | |||||
| unlink($modfile) or die("删除文件<span class='text-primary'>{$modfile}</span>失败"); | |||||
| ShowMsg("成功删除一个模块文件", "module_main.php"); | ShowMsg("成功删除一个模块文件", "module_main.php"); | ||||
| exit(); | exit(); | ||||
| } | } | ||||
| @@ -345,7 +343,7 @@ else if ($action == 'uninstall') { | |||||
| $dm = new DedeModule($mdir); | $dm = new DedeModule($mdir); | ||||
| $infos = $dm->GetModuleInfo($hash); | $infos = $dm->GetModuleInfo($hash); | ||||
| if ($infos['url'] == '') $infos['url'] = ' '; | if ($infos['url'] == '') $infos['url'] = ' '; | ||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); | |||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性'); | |||||
| $filelists = (array)$dm->GetFileLists($hash); | $filelists = (array)$dm->GetFileLists($hash); | ||||
| $filelist = ''; | $filelist = ''; | ||||
| foreach ($filelists as $v) { | foreach ($filelists as $v) { | ||||
| @@ -361,49 +359,46 @@ else if ($action == 'uninstall') { | |||||
| $win->AddTitle("<a href='module_main.php'>模块管理</a> > 卸载模块:{$infos['name']}"); | $win->AddTitle("<a href='module_main.php'>模块管理</a> > 卸载模块:{$infos['name']}"); | ||||
| $win->AddHidden("hash", $hash); | $win->AddHidden("hash", $hash); | ||||
| $win->AddHidden("action", 'uninstallok'); | $win->AddHidden("action", 'uninstallok'); | ||||
| $msg = "<style>.dtb{border-bottom:1px dotted #eee}</style> | |||||
| <table width='98%' cellspacing='0' cellpadding='0' class='table'> | |||||
| <tr> | |||||
| <td width='260' class='dtb'>模块名称:</td> | |||||
| <td class='dtb'>{$infos['name']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>语言:</td> | |||||
| <td class='dtb'>{$infos['lang']} {$alertMsg}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>文件大小:</td> | |||||
| <td class='dtb'>{$infos['filesize']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>开发者id:</td> | |||||
| <td class='dtb'>{$dev_id}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>发布时间:</td> | |||||
| <td class='dtb'>{$infos['time']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>使用协议:</td> | |||||
| <td class='dtb'><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank' class='btn btn-success btn-sm'>浏览</a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>模块包含的文件(文件路径相对于当前目录)</td> | |||||
| <td></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td height='160' colspan='2'> | |||||
| <textarea name='filelists' id='filelists' class='admin-textarea-xl'>{$filelist}</textarea> | |||||
| </td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>对于模块的文件处理方法:</td> | |||||
| <td> | |||||
| <label><input type='radio' name='isreplace' value='0' checked='checked'> 手工删除文件,仅运行卸载程序</label> | |||||
| <label><input type='radio' name='isreplace' value='2'> 删除模块的所有文件</label> | |||||
| </td> | |||||
| </tr> | |||||
| </table>"; | |||||
| $msg = "<table width='98%' cellspacing='0' cellpadding='0' class='table'> | |||||
| <tr> | |||||
| <td width='260' class='admin-td'>模块名称:</td> | |||||
| <td class='admin-td'>{$infos['name']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>语言:</td> | |||||
| <td class='admin-td'>{$infos['lang']} {$alertMsg}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>文件大小:</td> | |||||
| <td class='admin-td'>{$infos['filesize']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>开发者id:</td> | |||||
| <td class='admin-td'>{$dev_id}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>发布时间:</td> | |||||
| <td class='admin-td'>{$infos['time']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>使用协议:</td> | |||||
| <td class='admin-td'><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank' class='btn btn-success btn-sm'>浏览</a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>模块包含的文件(文件路径相对于当前目录)</td> | |||||
| <td></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td colspan='2'><textarea name='filelists' id='filelists' class='admin-textarea-xl'>{$filelist}</textarea></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>对于模块的文件处理方法:</td> | |||||
| <td> | |||||
| <label><input type='radio' name='isreplace' value='0' checked='checked'> 手工删除文件,仅运行卸载程序</label> | |||||
| <label><input type='radio' name='isreplace' value='2'> 删除模块的所有文件</label> | |||||
| </td> | |||||
| </tr> | |||||
| </table>"; | |||||
| $win->AddMsgItem("$msg"); | $win->AddMsgItem("$msg"); | ||||
| $winform = $win->GetWindow("ok", ""); | $winform = $win->GetWindow("ok", ""); | ||||
| $win->Display(); | $win->Display(); | ||||
| @@ -472,7 +467,7 @@ else if ($action == 'view') { | |||||
| $dm = new DedeModule($mdir); | $dm = new DedeModule($mdir); | ||||
| $infos = $dm->GetModuleInfo($hash); | $infos = $dm->GetModuleInfo($hash); | ||||
| if ($infos['url'] == '') $infos['url'] = ' '; | if ($infos['url'] == '') $infos['url'] = ' '; | ||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>(这个模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性)'); | |||||
| $alertMsg = ($infos['lang'] == $cfg_soft_lang ? '' : '<br>该模块的语言编码与您系统的编码不一致,请向开发者确认它的兼容性'); | |||||
| $filelists = (array)$dm->GetFileLists($hash); | $filelists = (array)$dm->GetFileLists($hash); | ||||
| $filelist = ''; | $filelist = ''; | ||||
| $setupinfo = ''; | $setupinfo = ''; | ||||
| @@ -502,42 +497,39 @@ else if ($action == 'view') { | |||||
| $win->Init("", "js/blank.js", ""); | $win->Init("", "js/blank.js", ""); | ||||
| $wecome_info = "模块管理"; | $wecome_info = "模块管理"; | ||||
| $win->AddTitle("<a href='module_main.php'>模块管理</a> > 模块详情:{$infos['name']}"); | $win->AddTitle("<a href='module_main.php'>模块管理</a> > 模块详情:{$infos['name']}"); | ||||
| $msg = "<style>.dtb{border-bottom:1px dotted #eee}</style> | |||||
| <table width='98%' cellspacing='0' cellpadding='0'> | |||||
| <tr> | |||||
| <td width='260' class='dtb'>模块名称:</td> | |||||
| <td class='dtb'>{$infos['name']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>语言:</td> | |||||
| <td class='dtb'>{$infos['lang']} {$alertMsg}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>文件大小:</td> | |||||
| <td class='dtb'>{$infos['filesize']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>开发者id:</td> | |||||
| <td class='dtb'>{$dev_id}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>发布时间:</td> | |||||
| <td class='dtb'>{$infos['time']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='dtb'>使用协议:</td> | |||||
| <td class='dtb'><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank' class='btn btn-success btn-sm'>浏览</a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>模块包含的文件(文件路径相对于当前目录)</td> | |||||
| <td></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td height='160' colspan='2'> | |||||
| <textarea name='filelists' id='filelists' class='admin-textarea-xl'>{$filelist}</textarea> | |||||
| </td> | |||||
| </tr> | |||||
| </table>"; | |||||
| $msg = "<table width='98%' cellspacing='0' cellpadding='0'> | |||||
| <tr> | |||||
| <td width='260' class='admin-td'>模块名称:</td> | |||||
| <td class='admin-td'>{$infos['name']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>语言:</td> | |||||
| <td class='admin-td'>{$infos['lang']} {$alertMsg}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>文件大小:</td> | |||||
| <td class='admin-td'>{$infos['filesize']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>开发者id:</td> | |||||
| <td class='admin-td'>{$dev_id}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>发布时间:</td> | |||||
| <td class='admin-td'>{$infos['time']}</td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td class='admin-td'>使用协议:</td> | |||||
| <td class='admin-td'><a href='module_main.php?action=showreadme&hash={$hash}' target='_blank' class='btn btn-success btn-sm'>浏览</a></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td>模块包含的文件(文件路径相对于当前目录)</td> | |||||
| <td></td> | |||||
| </tr> | |||||
| <tr> | |||||
| <td colspan='2'><textarea name='filelists' id='filelists' class='admin-textarea-xl'>{$filelist}</textarea></td> | |||||
| </tr> | |||||
| </table>"; | |||||
| $win->AddMsgItem("$msg"); | $win->AddMsgItem("$msg"); | ||||
| $winform = $win->GetWindow('hand', ''); | $winform = $win->GetWindow('hand', ''); | ||||
| $win->Display(); | $win->Display(); | ||||
| @@ -68,7 +68,7 @@ class Array2form | |||||
| foreach ($items as $v) { | foreach ($items as $v) { | ||||
| $v = trim($v); | $v = trim($v); | ||||
| if ($v == '') continue; | if ($v == '') continue; | ||||
| //统一将中文冒号转为英文 | |||||
| //统一中文冒号转为英文 | |||||
| $v = str_replace(":", ":", $v); | $v = str_replace(":", ":", $v); | ||||
| if (preg_match("/[\:]/", $v)) { | if (preg_match("/[\:]/", $v)) { | ||||
| list($value, $name) = preg_split('#:#', $v); | list($value, $name) = preg_split('#:#', $v); | ||||
| @@ -35,7 +35,7 @@ | |||||
| if (!f.type.match('image.*')) { | if (!f.type.match('image.*')) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| //将图片渲染到浏览器 | |||||
| //图片渲染到浏览器 | |||||
| var reader = new FileReader(); | var reader = new FileReader(); | ||||
| reader.onload = (function (theFile) { | reader.onload = (function (theFile) { | ||||
| return function (e) { | return function (e) { | ||||
| @@ -35,7 +35,7 @@ | |||||
| if (!f.type.match('image.*')) { | if (!f.type.match('image.*')) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| //将图片渲染到浏览器 | |||||
| //图片渲染到浏览器 | |||||
| var reader = new FileReader(); | var reader = new FileReader(); | ||||
| reader.onload = (function (theFile) { | reader.onload = (function (theFile) { | ||||
| return function (e) { | return function (e) { | ||||
| @@ -340,7 +340,7 @@ | |||||
| } | } | ||||
| } | } | ||||
| ?> | ?> | ||||
| </select>(按Ctrl多选,不选系统将调用全部分类,在<a href="stepselect_main.php">“联动类别管理”</a>中管理) | |||||
| </select>(按Ctrl多选,不选系统调用全部分类,在<a href="stepselect_main.php">“联动类别管理”</a>中管理) | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| @@ -292,7 +292,7 @@ | |||||
| } | } | ||||
| } | } | ||||
| ?> | ?> | ||||
| </select>(按Ctrl多选,不选系统将调用全部分类,在<a href='stepselect_main.php'>“联动类别管理”</a>中管理) | |||||
| </select>(按Ctrl多选,不选系统调用全部分类,在<a href='stepselect_main.php'>“联动类别管理”</a>中管理) | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| </table> | </table> | ||||
| @@ -78,7 +78,7 @@ | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td colspan="2"> | <td colspan="2"> | ||||
| <div class="alert alert-danger mb-0">所有填写的文档不允许包含双引号["],否则配置将无法写入</div> | |||||
| <div class="alert alert-danger mb-0">所有填写的文档不允许包含双引号["],否则配置无法写入</div> | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| @@ -148,7 +148,7 @@ | |||||
| <span id="step1Msg">对比版本更改的文件</span> | <span id="step1Msg">对比版本更改的文件</span> | ||||
| </div> | </div> | ||||
| <div id="stepArea2" class="stepArea"> | <div id="stepArea2" class="stepArea"> | ||||
| <p>本更新提供了重要的安全性更新,建议所有用户升级,软件更新将覆盖以下文件,请做好备份。</p> | |||||
| <p>本更新提供了重要的安全性更新,建议所有用户升级,软件更新覆盖以下文件,请做好备份。</p> | |||||
| <div id="_fileList">正在加载</div> | <div id="_fileList">正在加载</div> | ||||
| </div> | </div> | ||||
| <div id="stepArea3" class="stepArea"> | <div id="stepArea3" class="stepArea"> | ||||
| @@ -17,7 +17,7 @@ | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td colspan="6"> | <td colspan="6"> | ||||
| <div class="alert alert-info mb-0">级别名称和级别值:注册会员这个级别不能删除,否则会员系统将会无法正常使用某些功能</div> | |||||
| <div class="alert alert-info mb-0">级别名称和级别值:注册会员这个级别不能删除,否则会员系统会无法正常使用某些功能</div> | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| <tr align="center"> | <tr align="center"> | ||||
| @@ -62,7 +62,7 @@ | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td>模型性质:<span id="help5">如果为系统模型将禁止删除,此选项不可修改,对于独立模型,系统强制创建字段aid,typeid,senddate,title,mid,channel,独立模型的文档必须点击栏目进入列表才能管理</span></td> | |||||
| <td>模型性质:<span id="help5">如果为系统模型禁止删除,此选项不可修改,对于独立模型,系统强制创建字段aid,typeid,senddate,title,mid,channel,独立模型的文档必须点击栏目进入列表才能管理</span></td> | |||||
| <td> | <td> | ||||
| <label><input type="radio" name="issystem" id="is1" value="0" onClick="PublicDefault()" checked="1"> 自动模型</label> | <label><input type="radio" name="issystem" id="is1" value="0" onClick="PublicDefault()" checked="1"> 自动模型</label> | ||||
| <label><input type="radio" name="issystem" id="is2" value="1" onClick="PublicDefault()"> 系统模型</label> | <label><input type="radio" name="issystem" id="is2" value="1" onClick="PublicDefault()"> 系统模型</label> | ||||
| @@ -47,7 +47,7 @@ | |||||
| <?php if ($row['issystem'] == 1) {?> | <?php if ($row['issystem'] == 1) {?> | ||||
| <tr> | <tr> | ||||
| <td colspan="2" class="border-top-0"> | <td colspan="2" class="border-top-0"> | ||||
| <div class="alert alert-danger mb-0">您目前所展开的是系统模型,系统模型一般对发布程序和管理程序已经固化,如果您胡乱修改系统模型将会导致使用这种文档类型的栏目可能崩溃</div> | |||||
| <div class="alert alert-danger mb-0">您目前所展开的是系统模型,系统模型一般对发布程序和管理程序已经固化,如果您胡乱修改系统模型会导致使用这种文档类型的栏目可能崩溃</div> | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| <?php }?> | <?php }?> | ||||
| @@ -99,7 +99,7 @@ | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td colspan="2"> | <td colspan="2"> | ||||
| <div class="alert alert-danger mb-0">所有填写的文档不允许包含双引号["],否则配置将无法写入</div> | |||||
| <div class="alert alert-danger mb-0">所有填写的文档不允许包含双引号["],否则配置无法写入</div> | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| @@ -120,7 +120,7 @@ | |||||
| <tr> | <tr> | ||||
| <td>前台参数:</td> | <td>前台参数:</td> | ||||
| <td> | <td> | ||||
| <label><input type="checkbox" name="islist" id="islist" value="1"> 使字段可以在列表的底层模板中获得(自定义字段默认仅能在文档模板显示,启用此选项将使列表查询变慢,如无必要请不要选择)</label><br> | |||||
| <label><input type="checkbox" name="islist" id="islist" value="1"> 使字段可以在列表的底层模板中获得(自定义字段默认仅能在文档模板显示,启用此选项使列表查询变慢,如无必要请不要选择)</label><br> | |||||
| <label><input type="checkbox" name="notsend" id="notsend" value="1"> 前台投稿及采集规则禁用本字段</label> | <label><input type="checkbox" name="notsend" id="notsend" value="1"> 前台投稿及采集规则禁用本字段</label> | ||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| @@ -103,7 +103,7 @@ | |||||
| <tr> | <tr> | ||||
| <td>前台参数:</td> | <td>前台参数:</td> | ||||
| <td> | <td> | ||||
| <label><input type="checkbox" name="islist" id="islist" value="1" <?php echo ($ctag->GetAtt('islist')==1 ? " checked":"");?>> 使字段可以在列表的底层模板中获得(自定义字段默认仅能在文档模板显示,启用此选项将使列表查询变慢,如无必要请不要选择)</label><br> | |||||
| <label><input type="checkbox" name="islist" id="islist" value="1" <?php echo ($ctag->GetAtt('islist')==1 ? " checked":"");?>> 使字段可以在列表的底层模板中获得(自定义字段默认仅能在文档模板显示,启用此选项使列表查询变慢,如无必要请不要选择)</label><br> | |||||
| <label><input type="checkbox" name="notsend" id="notsend" value="1" <?php echo ($ctag->GetAtt('notsend')==1 ? " checked":"");?>> 前台投稿及采集规则禁用本字段</label> | <label><input type="checkbox" name="notsend" id="notsend" value="1" <?php echo ($ctag->GetAtt('notsend')==1 ? " checked":"");?>> 前台投稿及采集规则禁用本字段</label> | ||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| @@ -21,7 +21,7 @@ | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td>级别值:</td> | <td>级别值:</td> | ||||
| <td><input type="text" name="rankid" id="rankid" class="admin-input-sm">(数字,系统已占用的级别值:<?php $dsql->SetQuery("Select `rank` From `#@__admintype`");$dsql->Execute();while($row = $dsql->GetObject()) echo '<span class="text-primary">'.$row->rank.'</span>';?>,级别值必须小于10,超过或等于10所有权限设置将无效,如果10个组不能完全满足您的要求,允许使用小数) | |||||
| <td><input type="text" name="rankid" id="rankid" class="admin-input-sm">(数字,系统已占用的级别值:<?php $dsql->SetQuery("Select `rank` From `#@__admintype`");$dsql->Execute();while($row = $dsql->GetObject()) echo '<span class="text-primary">'.$row->rank.'</span>';?>,级别值必须小于10,超过或等于10所有权限设置无效,如果10个组不能完全满足您的要求,允许使用小数) | |||||
| </td> | </td> | ||||
| </tr> | </tr> | ||||
| <?php | <?php | ||||
| @@ -60,7 +60,7 @@ | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td>检测结果:结果仅供参考,请务必查看源码后才删除非法文件<br> | <td>检测结果:结果仅供参考,请务必查看源码后才删除非法文件<br> | ||||
| 安全建议:1、有条件的用户把data、system、theme修改为不可对外访问,static、a目录设置为不允许执行脚本,其它目录禁止写入,系统将更安全;2、本检测程以开发模式为标准,如果您的网站目录包含其它系统,此检测程序可能会产生错误判断;3、检测程序会跳过对模板缓存目录的检测,为了安全起见,检测完成后建议清空模板缓存</td> | |||||
| 安全建议:1、有条件的用户把data、system、theme修改为不可对外访问,static、a目录设置为不允许执行脚本,其它目录禁止写入,系统更安全;2、本检测程以开发模式为标准,如果您的网站目录包含其它系统,此检测程序可能会产生错误判断;3、检测程序会跳过对模板缓存目录的检测,为了安全起见,检测完成后建议清空模板缓存</td> | |||||
| </tr> | </tr> | ||||
| <tr> | <tr> | ||||
| <td align="center" bgcolor="#e9ecef"> | <td align="center" bgcolor="#e9ecef"> | ||||
| @@ -172,7 +172,7 @@ if (empty($sql)) { | |||||
| $query = $sql; | $query = $sql; | ||||
| } | } | ||||
| $sql = urlencode($sql); | $sql = urlencode($sql); | ||||
| //生成sql的唯一序列化字符串,并将sql语句记录到session中去 | |||||
| //生成sql的唯一序列化字符串,并sql语句记录到session中去 | |||||
| $sqlhash = md5($sql); | $sqlhash = md5($sql); | ||||
| $_SESSION[$sqlhash] = $sql; | $_SESSION[$sqlhash] = $sql; | ||||
| $dlist = new DataListCP(); | $dlist = new DataListCP(); | ||||
| @@ -28,7 +28,7 @@ foreach(Array('_GET','_POST','_COOKIE') as $_request) | |||||
| require_once(DEDEINC.'/common.func.php'); | require_once(DEDEINC.'/common.func.php'); | ||||
| if (file_exists(INSLOCKFILE)) | if (file_exists(INSLOCKFILE)) | ||||
| { | { | ||||
| die(DedeAlert("程序已运行安装,如果您确定要重新安装,请先删除 /install/install_lock.txt",ALERT_DANGER)); | |||||
| die(DedeAlert("完成软件安装,如果您要重新安装,安装目录找到install文件夹,然后删除install_lock.txt文件",ALERT_DANGER)); | |||||
| } | } | ||||
| if (empty($step)) | if (empty($step)) | ||||
| { | { | ||||
| @@ -43,32 +43,31 @@ if ($step==1) | |||||
| { | { | ||||
| $arrMsg = array(); | $arrMsg = array(); | ||||
| if (version_compare(PHP_VERSION, '5.3.0', '<')) { | if (version_compare(PHP_VERSION, '5.3.0', '<')) { | ||||
| $arrMsg[] = "PHP请升级到5.3及以上版本,低版本PHP环境将无法正常使用本系统"; | |||||
| $arrMsg[] = "PHP请升级到5.3及以上版本,低版本PHP环境无法正常使用本系统"; | |||||
| } | } | ||||
| if (!extension_loaded("openssl")) { | if (!extension_loaded("openssl")) { | ||||
| $arrMsg[] = "OpenSSL未开启,将无法完成<a href='https://www.dedebiz.com' target='_blank'>DedeBIZ商业支持</a>"; | |||||
| $arrMsg[] = "OpenSSL未开启,无法完成<a href='https://www.dedebiz.com' target='_blank'>DedeBIZ商业支持</a>"; | |||||
| } | } | ||||
| if (!extension_loaded("sockets")) { | if (!extension_loaded("sockets")) { | ||||
| $arrMsg[] = "Sockets未开启,将无法安装<a href='https://www.dedebiz.com/download#dedebiz' target='_blank'>DedeBIZ商业组件</a>"; | |||||
| $arrMsg[] = "Sockets未开启,无法安装<a href='https://www.dedebiz.com/download#dedebiz' target='_blank'>DedeBIZ商业组件</a>"; | |||||
| } | } | ||||
| if (!extension_loaded("fileinfo")) { | if (!extension_loaded("fileinfo")) { | ||||
| $arrMsg[] = "Fileinfo未开启,将无法正常进行文件上传"; | |||||
| $arrMsg[] = "Fileinfo未开启,无法正常进行文件上传"; | |||||
| } | } | ||||
| if (!function_exists('mysqli_connect')) { | if (!function_exists('mysqli_connect')) { | ||||
| $arrMsg[] = "MySQL不支持,将无法使用本系统"; | |||||
| $arrMsg[] = "MySQL不支持,无法使用本系统"; | |||||
| } | } | ||||
| if (!extension_loaded("sqlite3")) { | if (!extension_loaded("sqlite3")) { | ||||
| $arrMsg[] = "SQLite3未开启,将无法正常使用SQLite数据库"; | |||||
| $arrMsg[] = "SQLite3未开启,无法正常使用SQLite数据库"; | |||||
| } | } | ||||
| if (!extension_loaded("gd")) { | if (!extension_loaded("gd")) { | ||||
| $arrMsg[] = "GD未开启,将无法使用验证码、二维码、图片水印等功能"; | |||||
| $arrMsg[] = "GD未开启,无法使用验证码、二维码、图片水印等功能"; | |||||
| } | } | ||||
| if (!empty($_SERVER['REQUEST_URI'])) | if (!empty($_SERVER['REQUEST_URI'])) | ||||
| $scriptName = $_SERVER['REQUEST_URI']; | $scriptName = $_SERVER['REQUEST_URI']; | ||||
| else | else | ||||
| $scriptName = $_SERVER['PHP_SELF']; | $scriptName = $_SERVER['PHP_SELF']; | ||||
| $basepath = preg_replace("#\/install(.*)$#i", '', $scriptName); | $basepath = preg_replace("#\/install(.*)$#i", '', $scriptName); | ||||
| if (!empty($_SERVER['HTTP_HOST'])) | if (!empty($_SERVER['HTTP_HOST'])) | ||||
| $baseurl = $proto.$_SERVER['HTTP_HOST']; | $baseurl = $proto.$_SERVER['HTTP_HOST']; | ||||
| else | else | ||||
| @@ -95,7 +94,6 @@ else if ($step==2) | |||||
| if (!in_array($dbtype,array("mysql", "sqlite"))) { | if (!in_array($dbtype,array("mysql", "sqlite"))) { | ||||
| die(DedeAlert("当前数据库类型不支持", ALERT_DANGER)); | die(DedeAlert("当前数据库类型不支持", ALERT_DANGER)); | ||||
| } | } | ||||
| if (!empty($_SERVER['HTTP_HOST'])) | if (!empty($_SERVER['HTTP_HOST'])) | ||||
| $dfbaseurl = $proto.$_SERVER['HTTP_HOST']; | $dfbaseurl = $proto.$_SERVER['HTTP_HOST']; | ||||
| else | else | ||||
| @@ -266,16 +264,16 @@ else if ($step==2) | |||||
| } | } | ||||
| //增加管理员帐号 | //增加管理员帐号 | ||||
| $adminquery = "INSERT INTO `{$dbprefix}admin` (`id`,`usertype`,`userid`,`$pfd`,`uname`,`tname`,`email`,`typeid`,`logintime`,`loginip`) VALUES (1,10,'$adminuser','".$apwd."','admin','','',0,'".time()."','127.0.0.1');"; | $adminquery = "INSERT INTO `{$dbprefix}admin` (`id`,`usertype`,`userid`,`$pfd`,`uname`,`tname`,`email`,`typeid`,`logintime`,`loginip`) VALUES (1,10,'$adminuser','".$apwd."','admin','','',0,'".time()."','127.0.0.1');"; | ||||
| $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
| $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
| //关连前台会员帐号 | //关连前台会员帐号 | ||||
| $adminquery = "INSERT INTO `{$dbprefix}member` (`mid`,`mtype`,`userid`,`{$pfd}`,`uname`,`sex`,`rank`,`money`,`email`,`scores`,`matt`,`face`,`safequestion`,`safeanswer`,`jointime`,`joinip`,`logintime`,`loginip`) VALUES ('1','个人','$adminuser','".$upwd."','$adminuser','男','100','0','','10000','10','','0','','".time()."','','0',''); "; | $adminquery = "INSERT INTO `{$dbprefix}member` (`mid`,`mtype`,`userid`,`{$pfd}`,`uname`,`sex`,`rank`,`money`,`email`,`scores`,`matt`,`face`,`safequestion`,`safeanswer`,`jointime`,`joinip`,`logintime`,`loginip`) VALUES ('1','个人','$adminuser','".$upwd."','$adminuser','男','100','0','','10000','10','','0','','".time()."','','0',''); "; | ||||
| $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
| $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
| $adminquery = "INSERT INTO `{$dbprefix}member_person` (`mid`,`onlynet`,`sex`,`uname`,`qq`,`msn`,`tel`,`mobile`,`place`,`oldplace`,`birthday`,`star`,`income`,`education`,`height`,`bodytype`,`blood`,`vocation`,`smoke`,`marital`,`house`,`drink`,`datingtype`,`language`,`nature`,`lovemsg`,`address`,`uptime`) VALUES ('1','1','男','{$adminuser}','','','','','0','0','1980-01-01','1','0','0','160','0','0','0','0','0','0','0','0','','','','','0'); "; | $adminquery = "INSERT INTO `{$dbprefix}member_person` (`mid`,`onlynet`,`sex`,`uname`,`qq`,`msn`,`tel`,`mobile`,`place`,`oldplace`,`birthday`,`star`,`income`,`education`,`height`,`bodytype`,`blood`,`vocation`,`smoke`,`marital`,`house`,`drink`,`datingtype`,`language`,`nature`,`lovemsg`,`address`,`uptime`) VALUES ('1','1','男','{$adminuser}','','','','','0','0','1980-01-01','1','0','0','160','0','0','0','0','0','0','0','0','','','','','0'); "; | ||||
| $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
| $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
| $adminquery = "INSERT INTO `{$dbprefix}member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`) VALUES ('1','0','0','0','0','0','0','0','0'); "; | $adminquery = "INSERT INTO `{$dbprefix}member_tj` (`mid`,`article`,`album`,`archives`,`homecount`,`pagecount`,`feedback`,`friend`,`stow`) VALUES ('1','0','0','0','0','0','0','0','0'); "; | ||||
| $dbtype == 'sqlite'? $db->exec($adminquery): mysql_query($adminquery,$conn); | |||||
| $dbtype == 'sqlite'? $db->exec($adminquery): mysql_query($adminquery,$conn); | |||||
| $adminquery = "INSERT INTO `{$dbprefix}member_space` (`mid`,`pagesize`,`matt`,`spacename`,`spacelogo`,`spacestyle`,`sign`,`spacenews`) VALUES ('1','10','0','{$adminuser}的空间','','person','',''); "; | $adminquery = "INSERT INTO `{$dbprefix}member_space` (`mid`,`pagesize`,`matt`,`spacename`,`spacelogo`,`spacestyle`,`sign`,`spacenews`) VALUES ('1','10','0','{$adminuser}的空间','','person','',''); "; | ||||
| $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
| $dbtype == 'sqlite'? $db->exec($adminquery) : mysql_query($adminquery,$conn); | |||||
| //锁定程序安装 | //锁定程序安装 | ||||
| $fp = fopen(INSLOCKFILE,'w'); | $fp = fopen(INSLOCKFILE,'w'); | ||||
| fwrite($fp,'ok'); | fwrite($fp,'ok'); | ||||
| @@ -299,7 +297,7 @@ else if ($step==10) | |||||
| if (empty($dbname)){ | if (empty($dbname)){ | ||||
| $info = "信息正确"; | $info = "信息正确"; | ||||
| } else { | } else { | ||||
| $info = mysql_select_db($dbname,$conn)? "数据库已经存在,系统将覆盖数据库": "数据库不存在,系统将自动创建"; | |||||
| $info = mysql_select_db($dbname,$conn)? "数据库已经存在,系统覆盖数据库": "数据库不存在,系统自动创建"; | |||||
| } | } | ||||
| $result = array( | $result = array( | ||||
| "code" => 200, | "code" => 200, | ||||
| @@ -5,70 +5,68 @@ ALTER TABLE `#@__tagindex` ADD COLUMN `title` VARCHAR(255) NULL DEFAULT NULL AFT | |||||
| ALTER TABLE `#@__tagindex` ADD COLUMN `tag_pinyin` VARCHAR(255) NULL DEFAULT NULL AFTER `title`; | ALTER TABLE `#@__tagindex` ADD COLUMN `tag_pinyin` VARCHAR(255) NULL DEFAULT NULL AFTER `title`; | ||||
| -- 6.0.3 | -- 6.0.3 | ||||
| ALTER TABLE `#@__tagindex` | |||||
| ADD COLUMN `uptime` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `addtime`, | |||||
| ADD COLUMN `mktime` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `uptime`; | |||||
| ALTER TABLE `#@__feedback` | |||||
| ADD COLUMN `fid` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `aid`; | |||||
| ALTER TABLE `#@__feedback` | |||||
| ADD COLUMN `replycount` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `dtime`; | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ( 'cfg_feedback_msglen', '评论内容字数限定', 5, 'number', '200'); | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ( 'cfg_auth_code', '商业版授权码', 1, 'string', ''); | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ( 'cfg_bizcore_hostname', 'DedeBIZ Core地址', 1, 'string', '127.0.0.1'); | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ( 'cfg_bizcore_port', 'DedeBIZ Core端口', 1, 'number', '8181'); | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ( 'cfg_bizcore_appid', 'DedeBIZ Core应用ID', 1, 'string', ''); | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ( 'cfg_bizcore_key', 'DedeBIZ Core通信密钥', 1, 'string', ''); | |||||
| ALTER TABLE `#@__tagindex` | |||||
| ADD COLUMN `uptime` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `addtime`, | |||||
| ADD COLUMN `mktime` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `uptime`; | |||||
| ALTER TABLE `#@__feedback` ADD COLUMN `fid` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `aid`; | |||||
| ALTER TABLE `#@__feedback` ADD COLUMN `replycount` INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER `dtime`; | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_feedback_msglen', '评论内容字数限定', 5, 'number', '200'); | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_auth_code', '商业版授权码', 1, 'string', ''); | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_bizcore_hostname', 'DedeBIZ Core地址', 1, 'string', '127.0.0.1'); | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_bizcore_port', 'DedeBIZ Core端口', 1, 'number', '8181'); | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_bizcore_appid', 'DedeBIZ Core应用ID', 1, 'string', ''); | |||||
| INSERT INTO `#@__sysconfig` (`varname`, `info`, `groupid`, `type`, `value`) VALUES ('cfg_bizcore_key', 'DedeBIZ Core通信密钥', 1, 'string', ''); | |||||
| CREATE TABLE `#@__feedback_goodbad` ( | CREATE TABLE `#@__feedback_goodbad` ( | ||||
| `fgid` INT(11) NOT NULL AUTO_INCREMENT, | |||||
| `mid` INT(11) NOT NULL DEFAULT '0', | |||||
| `fid` INT(11) NOT NULL DEFAULT '0', | |||||
| `fgtype` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '0:good 1:bad', | |||||
| PRIMARY KEY (`fgid`) | |||||
| `fgid` INT(11) NOT NULL AUTO_INCREMENT, | |||||
| `mid` INT(11) NOT NULL DEFAULT '0', | |||||
| `fid` INT(11) NOT NULL DEFAULT '0', | |||||
| `fgtype` TINYINT(4) NOT NULL DEFAULT '0' COMMENT '0:good 1:bad', | |||||
| PRIMARY KEY (`fgid`) | |||||
| ) ENGINE=MyISAM; | ) ENGINE=MyISAM; | ||||
| CREATE TABLE `#@__search_limits` ( | CREATE TABLE `#@__search_limits` ( | ||||
| `ip` VARCHAR(200) NOT NULL, | |||||
| `searchtime` INT(11) NULL DEFAULT NULL, | |||||
| PRIMARY KEY (`ip`) | |||||
| `ip` VARCHAR(200) NOT NULL, | |||||
| `searchtime` INT(11) NULL DEFAULT NULL, | |||||
| PRIMARY KEY (`ip`) | |||||
| ) ENGINE=MyISAM; | ) ENGINE=MyISAM; | ||||
| -- 6.1.0 | -- 6.1.0 | ||||
| ALTER TABLE `#@__arctype` | ALTER TABLE `#@__arctype` | ||||
| ADD COLUMN `namegk` varchar(255) NULL AFTER `typename`, | |||||
| ADD COLUMN `enname` varchar(255) NULL AFTER `namegk`, | |||||
| ADD COLUMN `ennamegk` varchar(255) NULL AFTER `enname`, | |||||
| ADD COLUMN `litpic` varchar(255) NULL AFTER `ennamegk`, | |||||
| ADD COLUMN `litimg` varchar(255) NULL AFTER `litpic`; | |||||
| ADD COLUMN `namegk` varchar(255) NULL AFTER `typename`, | |||||
| ADD COLUMN `enname` varchar(255) NULL AFTER `namegk`, | |||||
| ADD COLUMN `ennamegk` varchar(255) NULL AFTER `enname`, | |||||
| ADD COLUMN `litpic` varchar(255) NULL AFTER `ennamegk`, | |||||
| ADD COLUMN `litimg` varchar(255) NULL AFTER `litpic`; | |||||
| -- 6.1.7 | -- 6.1.7 | ||||
| CREATE TABLE `#@__statistics` ( | CREATE TABLE `#@__statistics` ( | ||||
| `id` int NOT NULL AUTO_INCREMENT, | |||||
| `sdate` int DEFAULT NULL COMMENT '记录日期', | |||||
| `pv` int DEFAULT NULL COMMENT 'PV', | |||||
| `uv` int DEFAULT NULL COMMENT 'UV', | |||||
| `ip` int DEFAULT NULL COMMENT 'IP', | |||||
| `vv` int DEFAULT NULL COMMENT 'vv', | |||||
| PRIMARY KEY (`id`) | |||||
| `id` int NOT NULL AUTO_INCREMENT, | |||||
| `sdate` int DEFAULT NULL COMMENT '记录日期', | |||||
| `pv` int DEFAULT NULL COMMENT 'PV', | |||||
| `uv` int DEFAULT NULL COMMENT 'UV', | |||||
| `ip` int DEFAULT NULL COMMENT 'IP', | |||||
| `vv` int DEFAULT NULL COMMENT 'vv', | |||||
| PRIMARY KEY (`id`) | |||||
| ) ENGINE=MyISAM; | ) ENGINE=MyISAM; | ||||
| CREATE TABLE `#@__statistics_detail` ( | CREATE TABLE `#@__statistics_detail` ( | ||||
| `id` int NOT NULL AUTO_INCREMENT, | |||||
| `t` int DEFAULT NULL COMMENT 'unixtime', | |||||
| `created_date` int DEFAULT NULL COMMENT '日期,20220326', | |||||
| `created_hour` int DEFAULT NULL COMMENT '时间,12', | |||||
| `dduuid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'uuid', | |||||
| `ssid` varchar(32) DEFAULT NULL COMMENT 'session_id', | |||||
| `ip` varchar(46) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'ip地址', | |||||
| `browser` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '浏览器', | |||||
| `device` varchar(50) DEFAULT NULL COMMENT '设备', | |||||
| `device_type` varchar(10) DEFAULT NULL COMMENT '设备类型', | |||||
| `os` varchar(20) DEFAULT NULL COMMENT '操作系统', | |||||
| `url_type` tinyint DEFAULT NULL COMMENT '访问地址类型:0:未知 1:列表 2:文档 3:搜索 4:TAG', | |||||
| `typeid` int DEFAULT NULL COMMENT '栏目id', | |||||
| `aid` int DEFAULT NULL COMMENT '文档ID', | |||||
| `value` varchar(50) DEFAULT NULL COMMENT '值', | |||||
| PRIMARY KEY (`id`), | |||||
| KEY `idx_created_date_dduuid` (`created_date`,`dduuid`), | |||||
| KEY `idx_created_date_ip` (`created_date`,`ip`), | |||||
| KEY `idx_created_date_ssid` (`created_date`,`ssid`) | |||||
| `id` int NOT NULL AUTO_INCREMENT, | |||||
| `t` int DEFAULT NULL COMMENT 'unixtime', | |||||
| `created_date` int DEFAULT NULL COMMENT '日期,20220326', | |||||
| `created_hour` int DEFAULT NULL COMMENT '时间,12', | |||||
| `dduuid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'uuid', | |||||
| `ssid` varchar(32) DEFAULT NULL COMMENT 'session_id', | |||||
| `ip` varchar(46) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'ip地址', | |||||
| `browser` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '浏览器', | |||||
| `device` varchar(50) DEFAULT NULL COMMENT '设备', | |||||
| `device_type` varchar(10) DEFAULT NULL COMMENT '设备类型', | |||||
| `os` varchar(20) DEFAULT NULL COMMENT '操作系统', | |||||
| `url_type` tinyint DEFAULT NULL COMMENT '访问地址类型:0:未知 1:列表 2:文档 3:搜索 4:TAG', | |||||
| `typeid` int DEFAULT NULL COMMENT '栏目id', | |||||
| `aid` int DEFAULT NULL COMMENT '文档ID', | |||||
| `value` varchar(50) DEFAULT NULL COMMENT '值', | |||||
| PRIMARY KEY (`id`), | |||||
| KEY `idx_created_date_dduuid` (`created_date`,`dduuid`), | |||||
| KEY `idx_created_date_ip` (`created_date`,`ip`), | |||||
| KEY `idx_created_date_ssid` (`created_date`,`ssid`) | |||||
| ) ENGINE=MyISAM; | ) ENGINE=MyISAM; | ||||
| ALTER TABLE `#@__addonarticle` MODIFY COLUMN `userip` char(46) NOT NULL DEFAULT '' AFTER `templet`; | ALTER TABLE `#@__addonarticle` MODIFY COLUMN `userip` char(46) NOT NULL DEFAULT '' AFTER `templet`; | ||||
| ALTER TABLE `#@__addonimages` MODIFY COLUMN `userip` char(46) NOT NULL DEFAULT '' AFTER `templet`; | ALTER TABLE `#@__addonimages` MODIFY COLUMN `userip` char(46) NOT NULL DEFAULT '' AFTER `templet`; | ||||
| @@ -106,4 +104,4 @@ DELETE FROM `#@__sysconfig` WHERE `#@__sysconfig`.`varname` = 'cfg_vdcode_member | |||||
| ALTER TABLE `#@__arctype` CHANGE COLUMN `iscross` `cross` tinyint(1) NOT NULL DEFAULT 0 AFTER `ishidden`; | ALTER TABLE `#@__arctype` CHANGE COLUMN `iscross` `cross` tinyint(1) NOT NULL DEFAULT 0 AFTER `ishidden`; | ||||
| ALTER TABLE `#@__admin` ADD COLUMN `loginerr` tinyint NULL DEFAULT 0 AFTER `loginip`; | ALTER TABLE `#@__admin` ADD COLUMN `loginerr` tinyint NULL DEFAULT 0 AFTER `loginip`; | ||||
| ALTER TABLE `#@__member` ADD COLUMN `loginerr` tinyint NULL DEFAULT 0 AFTER `checkmail`; | ALTER TABLE `#@__member` ADD COLUMN `loginerr` tinyint NULL DEFAULT 0 AFTER `checkmail`; | ||||
| ALTER TABLE `#@__member` ADD COLUMN `send_max` int NULL DEFAULT 0 AFTER `loginerr`; | |||||
| ALTER TABLE `#@__member` ADD COLUMN `send_max` int NULL DEFAULT 0 AFTER `loginerr`; | |||||
| @@ -6,9 +6,9 @@ | |||||
| * @license https://www.dedebiz.com/license | * @license https://www.dedebiz.com/license | ||||
| * @link https://www.dedebiz.com | * @link https://www.dedebiz.com | ||||
| */ | */ | ||||
| //如果启用安全模式,后台将禁用例如:模板管理、标签管理、数据库管理等存在较高安全风险的功能,关闭安全模式`TRUE`改为`FALSE` | |||||
| define('DEDEBIZ_SAFE_MODE', FALSE); | |||||
| //生产环境使用`production`,如果采用`dev`模式,会有一些php的报错信息提示,便于开发调试 | |||||
| //系统默认运行模式为安全模式,模板管理、标签管理、数据库管理、模块管理等功能已暂停,如果您需要这些功能,DEDEBIZ_SAFE_MODE后面值`TRUE`改为`FALSE`恢复使用 | |||||
| define('DEDEBIZ_SAFE_MODE', TRUE); | |||||
| //生产环境使用`production`,如果采用`dev`模式,会有一些php的报错信息提示,用于开发调试 | |||||
| if (!defined('DEDE_ENVIRONMENT')) { | if (!defined('DEDE_ENVIRONMENT')) { | ||||
| define('DEDE_ENVIRONMENT', 'production'); | define('DEDE_ENVIRONMENT', 'production'); | ||||
| } | } | ||||
| @@ -436,7 +436,7 @@ class DedeSqli | |||||
| //获取上一步INSERT操作产生的id | //获取上一步INSERT操作产生的id | ||||
| function GetLastID() | function GetLastID() | ||||
| { | { | ||||
| //如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值将不正确 | |||||
| //如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值不正确 | |||||
| //可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代 | //可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代 | ||||
| //$rs = mysqli_query($this->linkID, "Select LAST_INSERT_ID() as lid"); | //$rs = mysqli_query($this->linkID, "Select LAST_INSERT_ID() as lid"); | ||||
| //$row = mysqli_fetch_array($rs); | //$row = mysqli_fetch_array($rs); | ||||
| @@ -417,7 +417,7 @@ class DedeSqlite | |||||
| //获取上一步INSERT操作产生的id | //获取上一步INSERT操作产生的id | ||||
| function GetLastID() | function GetLastID() | ||||
| { | { | ||||
| //如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值将不正确 | |||||
| //如果 AUTO_INCREMENT 的列的类型是 BIGINT,则 mysqli_insert_id() 返回的值不正确 | |||||
| //可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代 | //可以在 SQL 查询中用 MySQL 内部的 SQL 函数 LAST_INSERT_ID() 来替代 | ||||
| //$rs = mysqli_query($this->linkID, "Select LAST_INSERT_ID() as lid"); | //$rs = mysqli_query($this->linkID, "Select LAST_INSERT_ID() as lid"); | ||||
| //$row = mysqli_fetch_array($rs); | //$row = mysqli_fetch_array($rs); | ||||
| @@ -683,7 +683,7 @@ class DedeTagParse | |||||
| //遍历模板字符串,请取标记及其属性信息 | //遍历模板字符串,请取标记及其属性信息 | ||||
| for ($i = 0; $i < $sourceLen; $i++) { | for ($i = 0; $i < $sourceLen; $i++) { | ||||
| $tTagName = ''; | $tTagName = ''; | ||||
| //如果不进行此判断,将无法识别相连的两个标记 | |||||
| //如果不进行此判断,无法识别相连的两个标记 | |||||
| if ($i - 1 >= 0) { | if ($i - 1 >= 0) { | ||||
| $ss = $i - 1; | $ss = $i - 1; | ||||
| } else { | } else { | ||||
| @@ -492,7 +492,7 @@ class DedeTemplate | |||||
| $tswLen = strlen($tagStartWord); | $tswLen = strlen($tagStartWord); | ||||
| for ($i = 0; $i < $sourceLen; $i++) { | for ($i = 0; $i < $sourceLen; $i++) { | ||||
| $ttagName = ''; | $ttagName = ''; | ||||
| //如果不进行此判断,将无法识别相连的两个标记 | |||||
| //如果不进行此判断,无法识别相连的两个标记 | |||||
| if ($i - 1 >= 0) { | if ($i - 1 >= 0) { | ||||
| $ss = $i - 1; | $ss = $i - 1; | ||||
| } else { | } else { | ||||
| @@ -141,7 +141,7 @@ function GetEnumsJs($egroup) | |||||
| $jsCode = ""; | $jsCode = ""; | ||||
| $jsCode .= "em_{$egroup}s=new Array();\r\n"; | $jsCode .= "em_{$egroup}s=new Array();\r\n"; | ||||
| foreach (${'em_'.$egroup.'s'} as $k => $v) { | foreach (${'em_'.$egroup.'s'} as $k => $v) { | ||||
| //JS中将3级类目存放到第二个key中去 | |||||
| //js中3级类目存放到第二个key中去 | |||||
| if (preg_match("#([0-9]{1,})\.([0-9]{1,})#", $k, $matchs)) { | if (preg_match("#([0-9]{1,})\.([0-9]{1,})#", $k, $matchs)) { | ||||
| $valKey = $matchs[1] + $matchs[2] / 1000; | $valKey = $matchs[1] + $matchs[2] / 1000; | ||||
| $jsCode .= "em_{$egroup}s[{$valKey}]='$v';\r\n"; | $jsCode .= "em_{$egroup}s[{$valKey}]='$v';\r\n"; | ||||
| @@ -48,7 +48,7 @@ if (!function_exists('Dump')) { | |||||
| /** | /** | ||||
| * 获取执行时间 | * 获取执行时间 | ||||
| * 例如$t1 = ExecTime();在一段文档处理之后$t2 = ExecTime(); | * 例如$t1 = ExecTime();在一段文档处理之后$t2 = ExecTime(); | ||||
| * 我们可以将2个时间的差值输出:echo $t2-$t1; | |||||
| * 我们可以2个时间的差值输出:echo $t2-$t1; | |||||
| * | * | ||||
| * @return int | * @return int | ||||
| */ | */ | ||||
| @@ -195,7 +195,7 @@ if (!function_exists('GetPinyin')) { | |||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * 将实体网页代码转换成标准网页代码(兼容php4) | |||||
| * 实体网页代码转换成标准网页代码(兼容php4) | |||||
| * | * | ||||
| * @access public | * @access public | ||||
| * @param string $str 字符串信息 | * @param string $str 字符串信息 | ||||
| @@ -134,7 +134,7 @@ if (!function_exists('GetDateMk')) { | |||||
| } | } | ||||
| } | } | ||||
| /** | /** | ||||
| * 将时间转换为距离现在的精确时间 | |||||
| * 时间转换为距离现在的精确时间 | |||||
| * | * | ||||
| * @param int $seconds 秒数 | * @param int $seconds 秒数 | ||||
| * @return string | * @return string | ||||
| @@ -266,7 +266,7 @@ if (!function_exists('json_encode')) { | |||||
| * | * | ||||
| * @access public | * @access public | ||||
| * @param string $json json数据 | * @param string $json json数据 | ||||
| * @param string $assoc 当该参数为 TRUE 时,将返回 array 而非 object | |||||
| * @param string $assoc 当该参数为TRUE时,返回array而非object | |||||
| * @return string | * @return string | ||||
| */ | */ | ||||
| if (!function_exists('json_decode')) { | if (!function_exists('json_decode')) { | ||||
| @@ -151,7 +151,7 @@ function lib_arclistDone (&$refObj, &$ctag, $typeid=0, $row=10, $col=1, $titlele | |||||
| $wmid = isset($refObj->Fields['mid']) ? $refObj->Fields['mid'] : 0; | $wmid = isset($refObj->Fields['mid']) ? $refObj->Fields['mid'] : 0; | ||||
| $orwheres[] = " arc.mid = '$wmid' "; | $orwheres[] = " arc.mid = '$wmid' "; | ||||
| } | } | ||||
| //时间限制(用于调用最近热门文档、热门评论之类),这里的时间只能计算到天,否则缓存功能将无效 | |||||
| //时间限制(用于调用最近热门文档、热门评论之类)这里的时间只能计算到天,否则缓存功能无效 | |||||
| if ($subday > 0) { | if ($subday > 0) { | ||||
| $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); | $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); | ||||
| $limitday = $ntime - ($subday * 24 * 3600); | $limitday = $ntime - ($subday * 24 * 3600); | ||||
| @@ -62,9 +62,9 @@ function lib_arclistsg(&$ctag, &$refObj) | |||||
| if ($orderby == 'near' && $cfg_keyword_like == 'N') { | if ($orderby == 'near' && $cfg_keyword_like == 'N') { | ||||
| $keyword = ''; | $keyword = ''; | ||||
| } | } | ||||
| //时间限制(用于调用最近热门文档、热门评论之类) | |||||
| //时间限制(用于调用最近热门文档、热门评论之类) | |||||
| if ($subday > 0) { | if ($subday > 0) { | ||||
| //这里的时间只能计算到天,否则缓存功能将无效 | |||||
| //这里的时间只能计算到天,否则缓存功能无效 | |||||
| $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); | $ntime = gmmktime(0, 0, 0, gmdate('m'), gmdate('d'), gmdate('Y')); | ||||
| $limitday = $ntime - ($subday * 24 * 3600); | $limitday = $ntime - ($subday * 24 * 3600); | ||||
| $orwheres[] = " arc.senddate > $limitday "; | $orwheres[] = " arc.senddate > $limitday "; | ||||
| @@ -12,9 +12,7 @@ if (!defined('DEDEINC')) exit('dedebiz'); | |||||
| function lib_cattree(&$ctag, &$refObj) | function lib_cattree(&$ctag, &$refObj) | ||||
| { | { | ||||
| global $dsql; | global $dsql; | ||||
| //属性处理 | |||||
| //属性showall在空或不存在时,强制用产品模型id;如果是yes刚显示整个语言区栏目树;为其它数字则是这个数字的模型的id | |||||
| //typeid指定顶级树id,指定后,前一个属性将无效 | |||||
| //属性处理showall在空或不存在时,强制用产品模型id;如果是yes刚显示整个语言区栏目树,为其它数字则是这个数字的模型的id;typeid指定顶级树id,指定后,前一个属性无效 | |||||
| $attlist = "showall|,catid|0"; | $attlist = "showall|,catid|0"; | ||||
| FillAttsDefault($ctag->CAttribute->Items, $attlist); | FillAttsDefault($ctag->CAttribute->Items, $attlist); | ||||
| extract($ctag->CAttribute->Items, EXTR_SKIP); | extract($ctag->CAttribute->Items, EXTR_SKIP); | ||||
| @@ -72,11 +70,11 @@ function cattreeListSon($id, &$revalue) | |||||
| $thisv = ''; | $thisv = ''; | ||||
| while ($row = $dsql->GetArray($id)) { | while ($row = $dsql->GetArray($id)) { | ||||
| $row['typelink'] = GetOneTypeUrlA($row); | $row['typelink'] = GetOneTypeUrlA($row); | ||||
| $thisv .= " <dl class='cattree'>\n"; | |||||
| $thisv .= " <dt><a href='{$row['typelink']}'>{$row['typename']}</a></dt>\n"; | |||||
| $thisv .= "<dl class='cattree'>\n"; | |||||
| $thisv .= "<dt><a href='{$row['typelink']}'>{$row['typename']}</a></dt>\n"; | |||||
| cattreeListSon($row['id'], $thisv); | cattreeListSon($row['id'], $thisv); | ||||
| $thisv .= " </dl>\n"; | |||||
| $thisv .= "</dl>\n"; | |||||
| } | } | ||||
| if ($thisv != '') $revalue .= " <dd>\n$thisv </dd>\n"; | |||||
| if ($thisv != '') $revalue .= "<dd>\n$thisv</dd>\n"; | |||||
| } | } | ||||
| ?> | ?> | ||||
| @@ -57,7 +57,7 @@ class TypeLink | |||||
| } | } | ||||
| } | } | ||||
| //对于使用默认构造函数的情况 | //对于使用默认构造函数的情况 | ||||
| //GetPositionLink()将不可用 | |||||
| //GetPositionLink()不可用 | |||||
| function TypeLink($typeid) | function TypeLink($typeid) | ||||
| { | { | ||||
| $this->__construct($typeid); | $this->__construct($typeid); | ||||