国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

index_body.htm 10KB

2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
2 年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <title>系统主页</title>
  7. <base target="_self">
  8. <link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
  9. <link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
  10. <link rel="stylesheet" href="../static/web/css/admin.css">
  11. <script>const cfg_biz_dedebizUrl = '<?php echo $cfg_biz_dedebizUrl;?>'; const cfg_webname = '<?php echo $cfg_webname;?>';</script>
  12. <script src="../static/web/js/jquery.min.js"></script>
  13. <script src="../static/web/js/bootstrap.bundle.min.js"></script>
  14. <script src="../static/web/js/webajax.js"></script>
  15. <script src="../static/web/js/chart.min.js"></script>
  16. <script src="js/indexbody.js"></script>
  17. <script src="js/main.js"></script>
  18. <style>
  19. #btnUpdate,
  20. #latestVersion {
  21. display: none;
  22. }
  23. #btnUpdate {
  24. cursor: pointer;
  25. }
  26. #_fileList,#_verList {
  27. height: 200px;
  28. overflow-y: scroll;
  29. }
  30. #_msgInfo {
  31. display: none;
  32. }
  33. @media (min-width:480px) {
  34. .modal-dialog {
  35. max-width: 55%;
  36. }
  37. }
  38. </style>
  39. </head>
  40. <body>
  41. <div class="container-fluid">
  42. <div class="row">
  43. <div id="body-tips" class="col-md-12"></div>
  44. <div class="col-md-12 my-3">
  45. <div class="card">
  46. <div class="card-header">
  47. <a href="#statChart" title="查看流量统计图"><i class="fa fa-bar-chart"></i> 流量统计表</a>
  48. </div>
  49. <div class="card-body">
  50. <table class="table">
  51. <tbody>
  52. <tr class="title">
  53. <td width="20%" class="border-top-0"></td>
  54. <td width="20%" class="border-top-0">浏览次数(PV)</td>
  55. <td width="20%" class="border-top-0">独立访客(UV)</td>
  56. <td width="20%" class="border-top-0">独立地址(IP)</td>
  57. <td width="20%" class="border-top-0">访问次数(VV)</td>
  58. </tr>
  59. <tr class="bg-white">
  60. <td class="today">今日</td>
  61. <td class="today" id="today_pv">0</td>
  62. <td class="today" id="today_uv">0</td>
  63. <td class="today" id="today_ip">0</td>
  64. <td class="today" id="today_vv">0</td>
  65. </tr>
  66. <tr class="bg-white">
  67. <td>昨日</td>
  68. <td id="yestoday_pv">0</td>
  69. <td id="yestoday_uv">0</td>
  70. <td id="yestoday_ip">0</td>
  71. <td id="yestoday_vv">0</td>
  72. </tr>
  73. <tr class="bg-white">
  74. <td>历史累计</td>
  75. <td id="total_pv">0</td>
  76. <td id="total_uv">0</td>
  77. <td id="total_ip">0</td>
  78. <td id="total_vv">0</td>
  79. </tr>
  80. </tbody>
  81. </table>
  82. </div>
  83. </div>
  84. </div>
  85. <div class="col-md-6 my-3">
  86. <div class="card">
  87. <div class="card-header"><a href="javascript:copyFn()"><i class="fa fa-gear"></i> 系统信息</a>
  88. <span id="text">软件:
  89. <?php echo $cfg_version_detail;?>|操作系统:
  90. <?php echo PHP_OS;?>|Web服务器:
  91. <?php echo $_SERVER['SERVER_SOFTWARE'];?>|PHP:
  92. <?php echo @phpversion();?>|数据库:
  93. <?php echo $dsql->GetVersion();?>
  94. </span>
  95. </div>
  96. <div class="card-body">
  97. <table class="table table-borderless">
  98. <tr>
  99. <td>
  100. <div class="web-info">
  101. <p>操作系统</p>
  102. <span>
  103. <?php echo PHP_OS;?>
  104. </span>
  105. </div>
  106. </td>
  107. <td>
  108. <div class="web-info">
  109. <p>Web服务器</p>
  110. <span>
  111. <?php echo $_SERVER['SERVER_SOFTWARE'];?>
  112. </span>
  113. </div>
  114. </td>
  115. <td>
  116. <div class="web-info">
  117. <p>服务器IP</p>
  118. <span>
  119. <?php echo gethostbyname($_SERVER['SERVER_NAME']);?>
  120. </span>
  121. </div>
  122. </td>
  123. <td>
  124. <div class="web-info">
  125. <p>PHP版本</p>
  126. <span>
  127. <?php echo @phpversion();?>
  128. </span>
  129. </div>
  130. </td>
  131. <td>
  132. <div class="web-info">
  133. <p>数据库版本</p>
  134. <span>
  135. <?php echo $dsql->GetVersion();?>
  136. </span>
  137. </div>
  138. </td>
  139. </tr>
  140. </table>
  141. </div>
  142. </div>
  143. </div>
  144. <div class="col-md-6 my-3">
  145. <div class="card">
  146. <div class="card-header">
  147. <span><i class="fa fa-database"></i> 版本授权</span>
  148. <a class="float-right" id="btnUpdate">软件更新<span class="admin-updates"></span></a>
  149. <span id="latestVersion" class="float-right">已是最新软件版本</span>
  150. </div>
  151. <div class="card-body" id="system-info">正在加载</div>
  152. </div>
  153. </div>
  154. <div class="col-md-6 my-3">
  155. <div class="card">
  156. <div class="card-header">
  157. <a name="statChart"><i class="fa fa-line-chart"></i> 流量统计图</a>
  158. </div>
  159. <div class="card-body">
  160. <canvas id="statChart"></canvas>
  161. </div>
  162. </div>
  163. </div>
  164. <div class="col-md-6 my-3">
  165. <div class="card">
  166. <div class="card-header">
  167. <span><i class="fa fa-file-word-o"></i> 最新文档</span>
  168. </div>
  169. <div class="card-body" id="system-word">正在加载</div>
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. <div class="modal fade" id="mdlUpdate" tabindex="-1" aria-hidden="true">
  175. <div class="modal-dialog modal-xl">
  176. <div class="modal-content">
  177. <div class="modal-header">
  178. <h5 class="modal-title" id="exampleModalLabel">软件更新</h5>
  179. <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  180. <span aria-hidden="true">&times;</span>
  181. </button>
  182. </div>
  183. <div class="modal-body">
  184. <table id="stepArea1" class="table table-borderless w-100 stepArea">
  185. <tr>
  186. <td>
  187. <div class="text-center text-success">
  188. <div class="spinner-border" role="status">
  189. <span class="sr-only">Loading...</span>
  190. </div>
  191. </div>
  192. <p id="step1Msg">正在比对系统更改的文件……</p>
  193. </td>
  194. </tr>
  195. </table>
  196. <table id="stepArea2" class="table table-borderless w-100 stepArea">
  197. <tr>
  198. <td colspan="2">本更新提供了重要的安全性更新,建议所有用户升级,软件更新将覆盖以下文件,请做好备份。</td>
  199. </tr>
  200. <tr>
  201. <td colspan="2">
  202. <div id="_fileList">...</div>
  203. </td>
  204. </tr>
  205. </table>
  206. <table id="stepArea3" class="table table-borderless w-100 stepArea">
  207. <tr>
  208. <td>软件发下以下版本的更新文件。</td>
  209. </tr>
  210. <tr>
  211. <td colspan="2">
  212. <div id="_verList">...</div>
  213. </td>
  214. </tr>
  215. </table>
  216. <div id="_msgInfo">
  217. </div>
  218. </div>
  219. <div class="modal-footer">
  220. <div id="btnStep1" class="btnStep">
  221. </div>
  222. <div id="btnStep2" class="btnStep">
  223. <button id="btnCancel" type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
  224. <button id="btnBackup" type="button" class="btn btn-outline-success">备份</button>
  225. <button id="btnGoStep3" type="button" class="btn btn-success">下一步</button>
  226. </div>
  227. <div id="btnStep3" class="btnStep">
  228. <button id="btnCancel" type="button" class="btn btn-secondary" data-dismiss="modal">取消</button>
  229. <button id="btnGoStep3" type="button" class="btn btn-success">下载更新</button>
  230. </div>
  231. </div>
  232. </div>
  233. </div>
  234. </div>
  235. <script>
  236. function dedeAlter(msg, t = 'info', loading = false) {
  237. let loadingStr = loading ? '<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>' : '';
  238. return `<div class="alert alert-${t}">${loadingStr}
  239. ${msg}
  240. </div>`;
  241. }
  242. $(document).ready(function () {
  243. var currentStep = 1; //步骤
  244. //显示步骤区域
  245. function showStepArea(step) {
  246. $(".stepArea").hide();
  247. $(".btnStep").hide();
  248. $("#stepArea" + step).show();
  249. $("#btnStep" + step).show();
  250. }
  251. $.get("api.php?action=has_new_version", function (data) {
  252. let rs = JSON.parse(data);
  253. if (rs.code === 0) {
  254. if (rs.result.HasNew === true) {
  255. $("#btnUpdate").show();
  256. $("#latestVersion").hide();
  257. } else {
  258. $("#btnUpdate").hide();
  259. $("#latestVersion").show();
  260. }
  261. }
  262. })
  263. $("#btnCancel").click(function () {
  264. currentStep = 1;
  265. $("#_fileList").html(``);
  266. })
  267. $("#btnBackup").click(function () {
  268. let alertMsg = dedeAlter("系统正在备份差异文件", 'info', true);
  269. $("#_msgInfo").html(alertMsg);
  270. $("#_msgInfo").show();
  271. $.get("api.php?action=update_backup", function (data) {
  272. let rs = JSON.parse(data);
  273. if (rs.code === 0) {
  274. alertMsg = dedeAlter(`文件备份成功,备份文件夹:${rs.data.backupdir}`, 'success');
  275. $("#_msgInfo").html(alertMsg);
  276. }
  277. })
  278. })
  279. $("#btnUpdate").click(function () {
  280. $('#mdlUpdate').modal('show');
  281. showStepArea(currentStep);
  282. currentStep++;
  283. $.get("api.php?action=get_changed_files", function (data) {
  284. let rs = JSON.parse(data);
  285. if (rs.code === 0) {
  286. let fstr = '<ul class="list-group list-group-flush">';
  287. let i = 1;
  288. rs.data.files.forEach(file => {
  289. fstr += `<li class='list-group-item'>第${i}个文件:..\\${file['filename']}</li>`;
  290. i++;
  291. });
  292. fstr += '</ul>';
  293. $("#_fileList").html(fstr);
  294. showStepArea(currentStep);
  295. }
  296. })
  297. })
  298. $('#mdlUpdate').on('hidden.bs.modal', function (event) {
  299. currentStep = 1;
  300. $("#_msgInfo").html('');
  301. $("#_msgInfo").hide();
  302. })
  303. $("#btnGoStep3").click(function () {
  304. currentStep++
  305. showStepArea(currentStep);
  306. $.get("api.php?action=get_update_versions", function (data) {
  307. let rs = JSON.parse(data);
  308. if (rs.code === 0) {
  309. let fstr = '<ul class="list-group list-group-flush">';
  310. let i = 1;
  311. rs.result.Versions.forEach(ver => {
  312. fstr += `<li class='list-group-item'>版本号:${ver.ver},发布日期:${ver.r} <a href='https://www.zhelixie.com/DedeBIZ/DedeCMSV6/commits/tag/${ver.ver}' class='btn btn-outline-success float-right' target='_blank'>更新记录</a></li>`;
  313. i++;
  314. });
  315. fstr += '</ul>';
  316. $("#_verList").html(fstr);
  317. }
  318. })
  319. })
  320. })
  321. </script>
  322. </body>
  323. </html>