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

234 line
11KB

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