From c3f8545ff87e5ee1d92a5d76fdb676e439d8f2e0 Mon Sep 17 00:00:00 2001 From: xushubieli Date: Wed, 12 Jan 2022 15:25:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC=E6=8E=88?= =?UTF-8?q?=E6=9D=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dede/index_body.php | 80 +++++++++++++------------------- src/dede/templets/index_body.htm | 20 ++++---- 2 files changed, 42 insertions(+), 58 deletions(-) diff --git a/src/dede/index_body.php b/src/dede/index_body.php index f1131ebd..b5e06b05 100755 --- a/src/dede/index_body.php +++ b/src/dede/index_body.php @@ -1,5 +1,4 @@ getUserID().'.txt'; if (!file_exists($myIcoFile)) $myIcoFile = $defaultIcoFile; - //默认主页 if (empty($dopost)) { require(DEDEINC.'/inc/inc_fun_funAdmin.php'); @@ -35,47 +33,44 @@ if (empty($dopost)) { /*----------------------- 增加新项 function _AddNew() { } --------------------------*/ else if ($dopost == 'addnew') { +-------------------------*/ +else if ($dopost == 'addnew') { if (empty($link) || empty($title)) { - ShowMsg("链接网址或标题不能为空!", "-1"); + ShowMsg("链接网址或标题不能为空", "-1"); exit(); } - $fp = fopen($myIcoFile, 'r'); $oldct = trim(fread($fp, filesize($myIcoFile))); fclose($fp); - $link = preg_replace("#['\"]#", '`', $link); $title = preg_replace("#['\"]#", '`', $title); $ico = preg_replace("#['\"]#", '`', $ico); - $oldct .= "\r\n"; - + $oldct .= "\r\n"; $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; $fp = fopen($myIcoFileTrue, 'w'); fwrite($fp, $oldct); fclose($fp); - - ShowMsg("成功增加一个项目!", "index_body.php?".time()); + ShowMsg("成功增加一个项目", "index_body.php?".time()); exit(); } /*--------------------------- 保存修改的项 function _EditSave() { } -----------------------------*/ else if ($dopost == 'editsave') { +----------------------------*/ +else if ($dopost == 'editsave') { $quickmenu = stripslashes($quickmenu); - $myIcoFileTrue = DEDEDATA.'/admin/quickmenu-'.$cuserLogin->getUserID().'.txt'; $fp = fopen($myIcoFileTrue, 'w'); fwrite($fp, $quickmenu); fclose($fp); - - ShowMsg("成功修改快捷操作项目!", "index_body.php?".time()); + ShowMsg("成功修改快捷操作项目", "index_body.php?".time()); exit(); } /*--------------------------- 保存修改的项 function _EditSave() { } -----------------------------*/ else if ($dopost == 'movesave') { +----------------------------*/ +else if ($dopost == 'movesave') { $movedata = str_replace('\\', "", $sortorder); $movedata = json_decode($movedata, TRUE); $movedata = serialize($movedata); @@ -87,19 +82,20 @@ function _EditSave() { } /*----------------------------- 显示修改表单 function _EditShow() { } ------------------------------*/ else if ($dopost == 'editshow') { +-----------------------------*/ +else if ($dopost == 'editshow') { $fp = fopen($myIcoFile, 'r'); $oldct = trim(fread($fp, filesize($myIcoFile))); fclose($fp); ?>
- + @@ -107,43 +103,37 @@ function _EditShow() { } - + - + -
修改快捷操作项
- +
 
- 按原格式修改/增加XML项。 - 按原格式修改/增加XML项。
- -
- -   - + +   +
GetOne($query); $query = " SELECT COUNT(*) AS dd FROM `#@__feedback` "; $row2 = $dsql->GetOne($query); - $chArrNames = array(); $query = "SELECT id, typename FROM `#@__channeltype` "; $dsql->Execute('c', $query); while ($row = $dsql->GetArray('c')) { $chArrNames[$row['id']] = $row['typename']; } - $query = "SELECT COUNT(channel) AS dd, channel FROM `#@__arctiny` GROUP BY channel "; $allArc = 0; $chArr = array(); @@ -179,11 +169,11 @@ function _getRightSide() { } -2 ORDER BY arc.id DESC LIMIT 0, 6 "; + LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel + WHERE arc.arcrank<>-2 ORDER BY arc.id DESC LIMIT 0, 6 "; $arcArr = array(); $dsql->Execute('m', $query); while ($row = $dsql->GetArray('m')) { @@ -200,46 +190,41 @@ function _getRightSide() { } $linkstr = "·{$row['title']}"; if ($row['arcrank'] == -1) $linkstr .= "(未审核)"; ?> - - - - - + + + -1001, - "msg" => "PHP不支持OpenSSL,无法完成Dede商业授权", + "msg" => "PHP不支持OpenSSL,无法完成商业版授权", "result" => null, )); exit; } - if (empty($cfg_auth_code)) { echo json_encode(array( "code" => -1002, - "msg" => "当前站点尚未购买Dede商业授权", + "msg" => "当前站点尚未购买商业版授权", "result" => null, )); exit; } - openssl_public_decrypt(base64_decode($cfg_auth_code), $decotent, DEDEPUB); - $core_info = new stdClass; if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) { $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port); @@ -248,7 +233,6 @@ function _getRightSide() { } $core_info = $client->SystemInfo(); $client->Close(); } - if (!empty($decotent)) { $res = json_decode($decotent); if (isset($res->sid)) { diff --git a/src/dede/templets/index_body.htm b/src/dede/templets/index_body.htm index 916d1c78..dd40d64d 100755 --- a/src/dede/templets/index_body.htm +++ b/src/dede/templets/index_body.htm @@ -59,7 +59,7 @@ $(function () {
-
商业授权
+
版本授权
正在载入中...
@@ -307,7 +307,7 @@ $(function () { infoStr += ` 站点名称: - ${rsp.result.title} + ${rsp.result.title} `; } @@ -315,7 +315,7 @@ $(function () { infoStr += ` 站点类型: - ${rsp.result.stype} + ${rsp.result.stype} `; } @@ -331,16 +331,16 @@ $(function () { //下面是DedeBIZ Core组件信息 infoStr += ` - 商业组件: - 如何启动组件 + 版本组件: + 如何启动组件 `; } else { dedebizInfo = JSON.parse(rsp.result.core.data); infoStr += ` - 商业组件: - 查看组件信息 + 版本组件: + 查看组件信息 `; } @@ -348,9 +348,9 @@ $(function () { $("#_systeminfo").html(infoStr); } else { $("#_systeminfo").html(` -
尚未启动商业站点服务,原因:${rsp.msg}
-
商业服务可以提升性能、增强安全、支持开源。
- +
尚未启动商业版服务,原因:${rsp.msg}
+
目前是社区版开源免费,但商业版可以优化性能,数据分离,在线支付,小程序,APP等等。
+ `); } });