diff --git a/src/admin/index_body.php b/src/admin/index_body.php index bf313aaf..b7329e70 100644 --- a/src/admin/index_body.php +++ b/src/admin/index_body.php @@ -32,14 +32,14 @@ if (empty($dopost)) { exit; } elseif ($dopost == 'get_articles') { ?> - +
0) { $admin_catalog = join(',', $admin_catalogs); $userCatalogSql = "AND arc.typeid IN($admin_catalog) "; } - $query = "SELECT arc.id, arc.arcrank, arc.title, arc.typeid, arc.mid, arc.pubdate, arc.channel, ch.editcon, tp.typename FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank<>-2 {$userCatalogSql} AND arc.mid={$cuserLogin->getUserID()} ORDER BY arc.id DESC LIMIT 0,13"; + $query = "SELECT arc.id, arc.arcrank, arc.title, arc.typeid, arc.mid, arc.pubdate, arc.channel, ch.editcon, tp.typename FROM `#@__archives` arc LEFT JOIN `#@__channeltype` ch ON ch.id = arc.channel LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id WHERE arc.arcrank<>-2 {$userCatalogSql} AND arc.mid={$cuserLogin->getUserID()} ORDER BY arc.id DESC LIMIT 0,20"; $arcArr = array(); $dsql->Execute('m', $query); while($row = $dsql->GetArray('m')) diff --git a/src/admin/js/body.js b/src/admin/js/body.js index c06a7c06..6294041b 100644 --- a/src/admin/js/body.js +++ b/src/admin/js/body.js @@ -23,18 +23,32 @@ function ViewDedeBIZ() { ShowMsg("启动商业组件失败"); return; } - ShowMsg(`
+ ShowMsg(`
- - - - - - - - - - + + + +
版本号:V${dedebizInfo.result.server_version}服务器系统:${dedebizInfo.result.server_goos}(${dedebizInfo.result.server_goarch})
运行时间:${dedebizInfo.result.server_run_time}内存占用:${dedebizInfo.result.server_memory_usage}% +
+

版本号

+ ${dedebizInfo.result.server_version} +
+
+
+

服务器系统

+ ${dedebizInfo.result.server_goos} +
+
+
+

运行时间

+ ${dedebizInfo.result.server_run_time} +
+
+
+

内存占用

+ ${dedebizInfo.result.server_memory_usage}% +
+
`); } @@ -50,18 +64,35 @@ function LoadServer() { let infoStr = ``; if (typeof rsp.result.domain !== "undefined") { infoStr += ` - - - - - - - - - - + + + + `; } @@ -70,10 +101,12 @@ function LoadServer() { } else { $("#system-info").html(`
授权域名:${rsp.result.domain}授权版本:${rsp.result.auth_version}.x.x(时间:${rsp.result.auth_at})
站点名称:${rsp.result.title}(${rsp.result.stype})站点证书: - 授权证书 - 组件状态 + +
+

授权域名

+ ${rsp.result.domain} +
+
+
+

授权版本

+ ${rsp.result.auth_version}.x.x +
+
+
+

站点名称

+ ${rsp.result.title} +
+
+
+

站点证书

+ 查看证书 +
+
+
+

商业组件

+ 组件状态 +
- - - - +
${rsp.msg}
您已购买了商业版授权,登录DedeBIZ官网会员中心可查看相关授权信息。若授权结果与实际授权存在差异,购买到其它非商业授权,及时与我们取得联系。 +
+

${rsp.msg}

+ 您已购买了商业版授权,登录DedeBIZ官网会员中心可查看相关授权信息。 +
+
`); } diff --git a/src/admin/js/update.js b/src/admin/js/update.js new file mode 100644 index 00000000..25a98274 --- /dev/null +++ b/src/admin/js/update.js @@ -0,0 +1,132 @@ +var currentStep = 1; +var hasNewVer = false; +//步骤 +function dedeAlter(msg, t = 'info', loading = false) { + let loadingStr = loading ? '' : ''; + return `
${loadingStr} + ${msg} +
`; +} +//显示步骤区域 +function showStepArea(step) { + $(".stepArea").hide(); + $(".btnStep").hide(); + $("#stepArea" + step).show(); + $("#btnStep" + step).show(); +} +function update() { + $.get("api.php?action=update", function (rs) { + if (rs.code === 0) { + $("#_updateMsg").html(rs.msg); + if (rs.data.finish === false) { + setTimeout(() => { + update(); + }, 500); + } else { + currentStep++ + $("#_msgInfo").html(''); + $("#_msgInfo").hide(); + showStepArea(currentStep); + } + } + }) +} +function hasNewVersion() { + $.get("api.php?action=has_new_version", function (rs) { + try { + if (rs.code === 0) { + if (rs.result.HasNew === true) { + hasNewVer = true; + $(".updates-dot").show(); + } else { + hasNewVer = false; + $(".updates-dot").hide(); + } + } else { + $(".updates-dot").hide(); + showStepArea(0); + } + } catch (error) { + console.log("获取软件信息失败") + } + }) +} +$(document).ready(function () { + hasNewVersion(); + $("#btnCancel").click(function () { + currentStep = 1; + $("#_fileList").html(``); + }) + $("#btnBackup").click(function () { + let alertMsg = dedeAlter("正在备份差异文件", 'info', true); + $("#_msgInfo").html(alertMsg); + $("#_msgInfo").show(); + $.get("api.php?action=update_backup", function (rs) { + if (rs.code === 0) { + alertMsg = dedeAlter(`成功备份差异文件,目录:${rs.data.backupdir}`, 'success'); + $("#_msgInfo").html(alertMsg); + } + }) + }) + $("#systemUpdate").click(function () { + if (hasNewVer === false) { + currentStep = 5; + showStepArea(currentStep); + $('#mdlUpdate').modal('show'); + return; + } + $('#mdlUpdate').modal('show'); + showStepArea(currentStep); + currentStep++; + $.get("api.php?action=get_changed_files", function (rs) { + if (rs.code === 0) { + let fstr = ''; + $("#_fileList").html(fstr); + showStepArea(currentStep); + } else { + showStepArea(0); + } + }) + }) + $('#mdlUpdate').on('hidden.bs.modal', function (event) { + currentStep = 1; + $("#_msgInfo").html(''); + $("#_msgInfo").hide(); + }) + $("#btnGoStep3").click(function () { + currentStep++ + $("#_msgInfo").html(''); + $("#_msgInfo").hide(); + showStepArea(currentStep); + $.get("api.php?action=get_update_versions", function (rs) { + if (rs.code === 0) { + let fstr = ''; + $("#_verList").html(fstr); + } else { + showStepArea(0); + } + }) + }) + $("#btnGoStep4").click(function () { + currentStep++ + $("#_msgInfo").html(''); + $("#_msgInfo").hide(); + showStepArea(currentStep); + update(); + }) + $("#btnOK").click(function () { + hasNewVersion(); + }) +}) \ No newline at end of file diff --git a/src/admin/templets/index_body.htm b/src/admin/templets/index_body.htm index f08849fa..f055ac4f 100644 --- a/src/admin/templets/index_body.htm +++ b/src/admin/templets/index_body.htm @@ -13,6 +13,7 @@ + @@ -35,11 +36,11 @@ 访问次数(VV) - 今日记录 - 0 - 0 - 0 - 0 + 今日记录 + 0 + 0 + 0 + 0 昨日记录 @@ -68,37 +69,37 @@
- - - - - -
+

操作系统

+

WEB服务器

+

IP地址

+

PHP版本

+

数据库版本

GetVersion();?>
+

上传限制

@@ -192,139 +193,5 @@
- \ No newline at end of file diff --git a/src/static/web/css/admin.css b/src/static/web/css/admin.css index 73d935c7..c507ec10 100644 --- a/src/static/web/css/admin.css +++ b/src/static/web/css/admin.css @@ -317,6 +317,15 @@ body.hidemenu .body-right { .card-body { padding:.65rem } +.card-height { + height:490px; + overflow:auto +} +.web-info { + padding:10px; + background:#f5f5f5; + white-space:nowrap +} #fz-0 { font-size:0 } @@ -531,11 +540,6 @@ body.hidemenu .body-right { .admin-input-xs { width:60px } -.web-info { - padding:10px; - background:#f5f5f5; - text-align:center -} .thumbnail-md { max-width:200px; max-height:120px