国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

117 lines
4.9KB

  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. <script src="../static/web/js/jquery.min.js"></script>
  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 src="js/main.js"></script>
  12. <script>
  13. function SelectTemplets(fname) {
  14. var pos = GetWinPos(800, 600);
  15. window.open("./dialog/select_templets.php?f=" + fname, "poptempWin","scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top);
  16. }
  17. function htmlSubmit() {
  18. form1.submit();
  19. $("#dedebiz_admin").val("");
  20. }
  21. </script>
  22. </head>
  23. <body>
  24. <table cellpadding="3" cellspacing="1" align="center" class="table maintable my-3">
  25. <form name="form1" action="makehtml_homepage.php" target="stafrm" method="post">
  26. <input type="hidden" name="dopost" value="make">
  27. <tr>
  28. <td bgcolor="#f5f5f5" colspan="2">更新首页</td>
  29. </tr>
  30. <tr>
  31. <td colspan="2">
  32. <div class="alert alert-info mb-0">首页默认更新文件存放在根目录,如果不是根目录安装网站又想首页更新到网站根目录,使用相对路径来表示首页位置,例:安装在“http://www.abc.com/DedeBIZ/目录”,更新首页为:“http://www.abc.com/index.html”,填写:“../index.html”</div>
  33. </td>
  34. </tr>
  35. <tr>
  36. <td width="260">选择首页模板:</td>
  37. <td>
  38. <input type="text" name="templet" id="templet" value="<?php echo $row['templet']?>" class="admin-input-sm">
  39. <button type="button" name="set4" value="" class="btn btn-success btn-sm" onclick="SelectTemplets('form1.templet');">浏览</button>
  40. </td>
  41. </tr>
  42. <tr>
  43. <td>首页位置:</td>
  44. <td><input type="text" name="position" id="position" value="<?php echo $row['position']?>" class="admin-input-sm"></td>
  45. </tr>
  46. <tr>
  47. <td>相关选项:</td>
  48. <td>
  49. <label><input type="radio" name="saveset" value="0"> 不保存当前选项</label>
  50. <label><input type="radio" name="saveset" value="1" checked> 保存当前选项</label>
  51. </td>
  52. </tr>
  53. <tr>
  54. <td>首页模式:</td>
  55. <td>
  56. <label><input type="radio" name="showmod" value="0" <?php echo ($row['showmod']==0)? "checked='checked'" : "";?>> 动态浏览</label>
  57. <label><input type="radio" name="showmod" value="1" <?php echo ($row['showmod']==1)? "checked='checked'" : "";?>> 生成静态(或者手动删除根目录下index.html文件)</label>
  58. </td>
  59. </tr>
  60. <?php
  61. if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) {
  62. $client = new DedeBizClient();
  63. $data = $client->AdminPWDExists();
  64. if ($data->code == -1) {
  65. ?>
  66. <tr>
  67. <td colspan="2">启动商业组件失败,<a href="https://www.dedebiz.com/start?code=-1008" target="_blank" class="btn btn-warning btn-sm ml-2">如何启动组件</a></td>
  68. </tr>
  69. <?php
  70. } else {
  71. $data = json_decode($data->data);
  72. $rs = (array)($data->result);
  73. if ($rs["admin_pwd_exists"] == "false") {
  74. ?>
  75. <tr>
  76. <td>设置密码:</td>
  77. <td><input name="dedebiz_admin" type="password" id="dedebiz_admin" value="" class="admin-input-sm">设定后所有的DedeBIZ涉及安全操作输入当前操作密码</td>
  78. </tr>
  79. <tr>
  80. <td>重复密码:</td>
  81. <td><input name="re_dedebiz_admin" type="password" id="re_dedebiz_admin" value="" class="admin-input-sm"></td>
  82. </tr>
  83. <?php } else {?>
  84. <tr>
  85. <td>操作密码:</td>
  86. <td><input name="dedebiz_admin" type="password" id="dedebiz_admin" value="" class="admin-input-sm"></td>
  87. </tr>
  88. <tr>
  89. <td>首页状态:</td>
  90. <td>
  91. <label><input type="radio" name="lockindex" value="unlock" <?php echo ($rs['index_lock_state']==true)? "checked='checked'" : "";?>> 解锁</label>
  92. <label><input type="radio" name="lockindex" value="lock" <?php echo ($row['index_lock_state']==false)? "checked='checked'" : "";?>> 锁定</label>
  93. </td>
  94. </tr>
  95. <?php }}} else {?>
  96. <tr>
  97. <td colspan="2">启动商业组件失败<a href="https://www.dedebiz.com/start?code=-1008" target="_blank" class="btn btn-warning btn-sm ml-2">启动组件</a></td>
  98. </tr>
  99. <?php }?>
  100. <tr>
  101. <td bgcolor="#e9ecef" colspan="2" align="center">
  102. <button type="submit" name="submit" class="btn btn-success btn-sm">开始更新</button>
  103. <button type="button" name="view" class="btn btn-outline-success btn-sm" onclick="window.open('makehtml_homepage.php?dopost=view&templet='+form1.templet.value);">预览首页</button>
  104. </td>
  105. </tr>
  106. </form>
  107. <tr>
  108. <td colspan="2">结果:</td>
  109. </tr>
  110. <tr>
  111. <td colspan="2" id="mtd">
  112. <div id="mdv" class="admin-win-iframe"><iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe></div>
  113. </td>
  114. </tr>
  115. </table>
  116. </body>
  117. </html>