国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

153 lignes
6.5KB

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