国内流行的内容管理系统(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.

142 lines
5.9KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="<?php echo $cfg_soft_lang;?>">
  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/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="../static/web/font/css/font-awesome.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 width="98%" cellpadding="3" cellspacing="1" align="center" class="table maintable mt-3 mb-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="#f8f8f8" colspan="2">更新首页</td>
  29. </tr>
  30. <tr>
  31. <td width="260">选择首页模板:</td>
  32. <td>
  33. <input type="text" name="templet" id="templet" value="<?php echo $row['templet']?>" style="width:260px">
  34. <button type="button" name="set4" value="" class="btn btn-success btn-sm" onClick="SelectTemplets('form1.templet');">浏览</button>
  35. </td>
  36. </tr>
  37. <tr>
  38. <td colspan="2">
  39. 默认的情况下,生成的首页文件放在CMS的安装目录,如果您的CMS不是安装在网站根目录的,又想把首页创建到网站根目录,那么请用相对路径来表示“首页位置”<br>
  40. 例:您的CMS安装在 http://www.abc.com/DedeBIZ/ 目录,您想生成的首页为http://www.abc.com/index.html,那吗首页位置就应该用:“../index.html”
  41. </td>
  42. </tr>
  43. <tr>
  44. <td>首页位置:</td>
  45. <td><input type="text" name="position" id="position" value="<?php echo $row['position']?>" style="width:260px"></td>
  46. </tr>
  47. <tr>
  48. <td>相关选项:</td>
  49. <td>
  50. <label><input type="radio" name="saveset" value="0"> 不保存当前选项</label>
  51. <label><input type="radio" name="saveset" value="1" checked> 保存当前选项</label>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td>首页模式:</td>
  56. <td>
  57. <label><input type="radio" name="showmod" value="0" <?php echo ($row['showmod']==0)? "checked='checked'" : "";?>> 动态浏览</label>
  58. <label><input type="radio" name="showmod" value="1" <?php echo ($row['showmod']==1)? "checked='checked'" : "";?>> 生成静态(或者手动删除根目录下index.html文件)</label>
  59. </td>
  60. </tr>
  61. <?php
  62. if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) {
  63. $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port);
  64. $client->appid = $cfg_bizcore_appid;
  65. $client->key = $cfg_bizcore_key;
  66. $data = $client->AdminPWDExists();
  67. if($data->code == -1){
  68. ?>
  69. <tr>
  70. <td colspan="2">尚未开启DedeBIZ商业组件 <a class="btn btn-danger btn-sm" target="_blank" href="https://www.dedebiz.com/start?code=-1008">如何启动组件</a></td>
  71. </tr>
  72. <?php
  73. } else {
  74. $data = json_decode($data->data);
  75. $rs = (array)($data->result);
  76. if($rs["admin_pwd_exists"] == "false") {
  77. ?>
  78. <tr>
  79. <td>设置操作密码:</td>
  80. <td><input name="dedebiz_admin" type="password" id="dedebiz_admin" value="" style="width:260px">设定后所有的DedeBIZ涉及安全操作输入当前操作密码</td>
  81. </tr>
  82. <tr>
  83. <td>重复操作密码:</td>
  84. <td><input name="re_dedebiz_admin" type="password" id="re_dedebiz_admin" value="" style="width:260px"></td>
  85. </tr>
  86. <?php
  87. } else {
  88. ?>
  89. <tr>
  90. <td>操作密码:</td>
  91. <td><input name="dedebiz_admin" type="password" id="dedebiz_admin" value="" style="width:260px"></td>
  92. </tr>
  93. <tr>
  94. <td>首页状态:</td>
  95. <td>
  96. <label><input type="radio" name="lockindex" value="unlock" <?php echo ($rs['index_lock_state']==true)? "checked='checked'" : "";?>> 解锁</label>
  97. <label><input type="radio" name="lockindex" value="lock" <?php echo ($row['index_lock_state']==false)? "checked='checked'" : "";?>> 锁定</label>
  98. </td>
  99. </tr>
  100. <?php
  101. }
  102. }
  103. } else {
  104. ?>
  105. <tr>
  106. <td colspan="2">尚未开启DedeBIZ商业组件 <a class="btn btn-danger btn-sm" target="_blank" href="https://www.dedebiz.com/start?code=-1008">如何启动组件</a></td>
  107. </tr>
  108. <?php }?>
  109. <tr>
  110. <td bgcolor="#fbfce2" colspan="2" align="center">
  111. <button name="view" class="btn btn-success btn-sm" type="button" id="view" onClick="window.open('makehtml_homepage.php?dopost=view&templet='+form1.templet.value);">预览首页</button>
  112. <button type="button" onclick="htmlSubmit()" class="btn btn-success btn-sm" name="Submit">开始更新</button>
  113. </td>
  114. </tr>
  115. </form>
  116. <tr>
  117. <td colspan="2">
  118. <table width="100%" class="table table-borderless">
  119. <tr>
  120. <td width="30%">结果:</td>
  121. <td width="70%" align="right">
  122. <script>
  123. function ResizeDiv(obj, ty) {
  124. if (ty == "+") document.all[obj].style.pixelHeight += 50;
  125. else if (document.all[obj].style.pixelHeight > 80) document.all[obj].style.pixelHeight = document.all[obj].style.pixelHeight - 50;
  126. }
  127. </script>
  128. <a href="javascript:;" onClick="ResizeDiv('mdv','+');" class="btn btn-success btn-sm">增大</a>
  129. <a href="javascript:;" onClick="ResizeDiv('mdv','-');" class="btn btn-success btn-sm">缩小</a>
  130. </td>
  131. </tr>
  132. </table>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td colspan="2" id="mtd">
  137. <div id="mdv" class="biz-win-iframe"><iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe></div>
  138. </td>
  139. </tr>
  140. </table>
  141. </body>
  142. </html>