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

158 lines
7.1KB

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