国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

232 строки
10KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
  6. <title>修改自由列表</title>
  7. <link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
  8. <link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="/static/web/css/admin.css">
  10. <link rel="stylesheet" href="/static/web/css/codemirror.css">
  11. <script src="/static/web/js/jquery.min.js"></script>
  12. <script src="/static/web/js/bootstrap.min.js"></script>
  13. <script src="/static/web/js/codemirror.js"></script>
  14. <script src="/static/web/js/mode/xml/xml.js"></script>
  15. <script src="/static/web/js/mode/javascript/javascript.js"></script>
  16. <script src="/static/web/js/mode/css/css.js"></script>
  17. <script src="/static/web/js/mode/htmlmixed/htmlmixed.js"></script>
  18. <script src="/static/web/js/admin.main.js"></script>
  19. </head>
  20. <body>
  21. <ol class="breadcrumb">
  22. <li class="breadcrumb-item"><a href="index_body.php">后台面板</a></li>
  23. <li class="breadcrumb-item"><a href="freelist_main.php">自由列表管理</a></li>
  24. <li class="breadcrumb-item active">修改自由列表</li>
  25. </ol>
  26. <div class="card shadow-sm">
  27. <div class="card-header">修改自由列表</div>
  28. <div class="card-body">
  29. <form name="form1" action="freelist_edit.php" method="post">
  30. <input type="hidden" name="dopost" value="save">
  31. <input type="hidden" name="aid" value="<?php echo $row['aid']?>">
  32. <div class="table-responsive">
  33. <table class="table table-borderless">
  34. <tbody>
  35. <tr>
  36. <td width="160">自由列表标题</td>
  37. <td width="550"><input type="text" name="title" id="title" value="<?php echo $row['title']?>" class="admin-input-lg"></td>
  38. <td width="160">列表生成目录</td>
  39. <td><input type="text" name="listdir" id="listdir" value="<?php echo $row['listdir']?>" class="admin-input-lg"></td>
  40. </tr>
  41. <tr>
  42. <td>默认页名称</td>
  43. <td>
  44. <input type="text" name="defaultpage" id="defaultpage" value="<?php echo $row['defaultpage']?>" class="admin-input-lg">
  45. <label><input type="checkbox" name="nodefault" id="nodefault" value="1" <?php if ($row['nodefault']==1) echo 'checked';?>> 不使用默认首页</label>
  46. </td>
  47. <td>命名规则</td>
  48. <td><input type="text" name="namerule" id="namerule" value="<?php echo $row['namerule']?>" class="admin-input-lg">({listdir}列表存放目录)</td>
  49. </tr>
  50. <tr>
  51. <td>列表模板</td>
  52. <td>
  53. <input type="text" name="templet" id="templet" value="<?php echo $row['templet']?>" class="admin-input-lg">
  54. <button type="button" name="set4" onclick="SelectTemplets('form1.templet');" class="btn btn-success btn-sm">选择</button>
  55. </td>
  56. <td>最大列出页数</td>
  57. <td><input type="text" name="maxpage" id="maxpage" value="<?php echo $row['maxpage'];?>" class="admin-input-sm"></td>
  58. </tr>
  59. <tr>
  60. <td>列表关键词</td>
  61. <td><input type="text" name="keywords" id="keywords" value="<?php echo $row['keywords'];?>" class="admin-input-lg"></td>
  62. <td>列表描述</td>
  63. <td><textarea name="description" id="description" class="admin-textarea-sm"><?php echo $row['description']?></textarea></td>
  64. </tr>
  65. <tr>
  66. <td>调用栏目</td>
  67. <td>
  68. <?php
  69. $typeid = $ctag->GetAtt('typeid');
  70. echo "<select name='typeid' class='admin-input-sm'>";
  71. echo "<option value='0'>不限栏目</option>";
  72. $dsql->SetQuery("SELECT id,typename, channeltype FROM `#@__arctype`");
  73. $dsql->Execute();
  74. while($lrow = $dsql->GetObject()){
  75. $disable = '';
  76. if ($lrow->channeltype < -1)
  77. {
  78. $disable = 'disabled';
  79. }
  80. if ($lrow->id==$typeid) echo "<option value='{$lrow->id}' selected $disable>{$lrow->typename}</option>";
  81. else echo "<option value='{$lrow->id}' $disable>{$lrow->typename}</option>";
  82. }
  83. echo "</select>";
  84. ?>
  85. </td>
  86. <td>限定模型</td>
  87. <td>
  88. <?php
  89. $channel = $ctag->GetAtt('channel');
  90. echo "<select name='channel' class='admin-input-sm'><option value='0'>不限模型</option>";
  91. $dsql->SetQuery("SELECT id,typename FROM `#@__channeltype` WHERE id > 0");
  92. $dsql->Execute();
  93. while($nrow = $dsql->GetObject())
  94. {
  95. if ($nrow->id==$channel) echo "<option value='{$nrow->id}' selected>{$nrow->typename}</option>";
  96. else echo "<option value='{$nrow->id}'>{$nrow->typename}</option>";
  97. }
  98. echo "</select>";
  99. ?>
  100. </td>
  101. </tr>
  102. <tr>
  103. <td>附加属性</td>
  104. <td>
  105. <?php
  106. $att = $ctag->GetAtt('att');
  107. echo "<select name='att' class='admin-input-sm'>";
  108. echo "<option value='0'>不限</option>";
  109. $dsql->SetQuery("SELECT * FROM `#@__arcatt`");
  110. $dsql->Execute();
  111. while($nrow = $dsql->GetObject())
  112. {
  113. if ($att==$nrow->att)
  114. {
  115. echo "<option value='{$nrow->att}' selected>{$nrow->attname}</option>";
  116. } else {
  117. echo "<option value='{$nrow->att}'>{$nrow->attname}</option>";
  118. }
  119. }
  120. echo "</select>";
  121. ?>
  122. </td>
  123. <td>发布天数</td>
  124. <td><input type="text" name="subday" id="subday" class="admin-input-sm" value="<?php echo $ctag->GetAtt('subday')?>">(0表示不限)</td>
  125. </tr>
  126. <tr>
  127. <td>每页记录数</td>
  128. <td><input type="text" name="pagesize" id="pagesize" value="<?php echo $ctag->GetAtt('pagesize')?>" class="admin-input-sm"></td>
  129. <td>显示列数</td>
  130. <td><input type="text" name="col" id="col" value="<?php $col = $ctag->GetAtt('col'); $v = ( empty($col) ? '1' : $col ); echo $v;?>" class="admin-input-sm"></td>
  131. </tr>
  132. <tr>
  133. <td>标题长度</td>
  134. <td><input type="text" name="titlelen" id="titlelen" value="<?php echo $ctag->GetAtt('titlelen')?>" class="admin-input-sm">(1字节=0.5个中文字)</td>
  135. <td>
  136. <?php
  137. $setype = $ctag->GetAtt('type');
  138. if ($setype=='') $setype = 'X';
  139. ?>
  140. 高级筛选
  141. </td>
  142. <td>
  143. <label><input type="checkbox" name="types[]" id="type1" value="image" <?php if (preg_match("#image#i",$setype)) echo 'checked';?>> 带缩略图</label>
  144. <label><input type="checkbox" name="types[]" id="type2" value="commend" <?php if (preg_match("#commend#i", $setype)) echo 'checked';?>> 推荐</label>
  145. <label><input type="checkbox" name="types[]" id="type3" value="spec" <?php if (preg_match("#spec#i", $setype)) echo 'checked';?>> 专题</label>
  146. </td>
  147. </tr>
  148. <tr>
  149. <td>关键词</td>
  150. <td><input type="text" name="keywordarc" id="keywordarc" value="<?php echo $ctag->GetAtt('keyword')?>">(英文逗号隔开)</td>
  151. <td>排列顺序</td>
  152. <td>
  153. <?php
  154. $orderby = $ctag->GetAtt('orderby');
  155. $sorta = "sortrank,置顶权限值;pubdate,发布时间;senddate,录入时间;click,点击量;id,文档id,lastpost,最后评论时间;postnum,评论总数;rand,随机获取";
  156. $sortas = explode(';',$sorta);
  157. foreach($sortas as $v)
  158. {
  159. $vs = explode(',',$v);
  160. $vs[0] = trim($vs[0]);
  161. $sortarrs[$vs[0]] = $vs[1];
  162. }
  163. ?>
  164. <select name="orderby" id="orderby" class="admin-input-sm">
  165. <?php echo "<option value=\"$orderby\" selected>{$sortarrs[$orderby]}</option>";?>
  166. <option value="sortrank">置顶权限值</option>
  167. <option value="pubdate">发布时间</option>
  168. <option value="senddate">录入时间</option>
  169. <option value="click">点击量</option>
  170. <option value="id">文档id</option>
  171. <option value="lastpost">最后评论时间</option>
  172. <option value="postnum">评论总数</option>
  173. </select>
  174. <label><input type="radio" name="order" value="desc" <?php if ($ctag->GetAtt('orderway')=='desc') echo 'checked';?>> 由高到低</label>
  175. <label><input type="radio" name="order" value="asc" <?php if ($ctag->GetAtt('orderway')=='asc') echo 'checked';?>> 由低到高</label>
  176. </td>
  177. </tr>
  178. <tr>
  179. <td colspan="4"><textarea name="innertext" id="myinnertext" class="admin-textarea-xl"><?php echo $ctag->GetInnerText()?></textarea></td>
  180. </tr>
  181. <tr>
  182. <td colspan="4" align="center">
  183. <button type="submit" class="btn btn-success btn-sm">保存</button>
  184. <button type="reset" class="btn btn-outline-success btn-sm">重置</button>
  185. </td>
  186. </tr>
  187. </tbody>
  188. </table>
  189. </div>
  190. </form>
  191. </div>
  192. </div>
  193. <script>
  194. function CheckSubmit() {
  195. if (document.form1.title.value == "") {
  196. ShowMsg("请输入自由列表标题");
  197. document.form1.title.focus();
  198. return false;
  199. }
  200. }
  201. function ChangeListStyle() {
  202. var itxt = document.getElementById("myinnertext");
  203. var myems = document.getElementsByName("liststyle");
  204. if (myems[0].checked) itxt.value = document.getElementById("list1").innerHTML;
  205. else if (myems[1].checked) itxt.value = document.getElementById("list2").innerHTML;
  206. else if (myems[2].checked) itxt.value = document.getElementById("list3").innerHTML;
  207. else if (myems[3].checked) itxt.value = document.getElementById("list4").innerHTML;
  208. itxt.value = itxt.value.replace("<br>", "<br>");
  209. itxt.value = itxt.value.toLowerCase();
  210. }
  211. function ShowHide(objname) {
  212. var obj = document.getElementById(objname);
  213. if (obj.style.display == "block" || obj.style.display == "")
  214. obj.style.display = "none";
  215. else
  216. obj.style.display = "block";
  217. }
  218. function SelectTemplets(fname) {
  219. var pos = GetWinPos(800,600);
  220. window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir)?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=800,height=600,left=" + pos.left + ", top=" + pos.top);
  221. }
  222. var editor = CodeMirror.fromTextArea(document.getElementById("myinnertext"), {
  223. lineNumbers: true,
  224. lineWrapping: true,
  225. mode: 'text/html',
  226. });
  227. </script>
  228. </body>
  229. </html>