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

221 lines
10KB

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
  6. <title>添加自由列表</title>
  7. <link rel="stylesheet" href="../static/web/font/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="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="js/codemirror.js"></script>
  14. <script src="js/mode/xml/xml.js"></script>
  15. <script src="js/mode/javascript/javascript.js"></script>
  16. <script src="js/mode/css/css.js"></script>
  17. <script src="js/mode/htmlmixed/htmlmixed.js"></script>
  18. <script src="js/main.js"></script>
  19. </head>
  20. <body>
  21. <div id="list1" style="display:none"><p><a href="[field:arcurl/]">[field:title/]</a></p></div>
  22. <div id="list2" style="display:none"><p>[field:typelink/] - <a href="[field:arcurl/]">[field:title/]</a></p></div>
  23. <div id="list3" style="display:none"><p>[field:imglink/]</p><p>[field:textlink/]</p></div>
  24. <div id="list4" style="display:none"><p><a href="[field:arcurl/]">[field:title/]</a></p><p><a href="[field:arcurl/]">[field:description/]</a></p><p><span>日期:[field:pubdate function="MyDate('Y-m-d', @me)"/]</span><span>浏览:[field:click/]</span><span>好评:[field:scores/]</span></p></div>
  25. <form name="form1" action="freelist_add.php" method="post" onSubmit="return CheckSubmit();">
  26. <input type="hidden" name="dopost" value="save">
  27. <table align="center" class="table maintable my-3">
  28. <tr>
  29. <td bgcolor="#f5f5f5" colspan="2"><a href="freelist_main.php">自由列表管理</a> - 添加自由列表</td>
  30. </tr>
  31. <tr>
  32. <td colspan="2">
  33. <div class="alert alert-info mb-0">自由列表标记说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成按自定义排序规则的文档列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成网页或浏览速度</div>
  34. </td>
  35. </tr>
  36. <tr>
  37. <td colspan="2">
  38. <table class="w-100 table-borderless">
  39. <tr>
  40. <td width="25%">
  41. <label><img src="../static/web/img/g_t2.jpg"><input type="radio" name="liststyle" onclick="ChangeListStyle()" value="1"></label>
  42. </td>
  43. <td width="25%">
  44. <label><img src="../static/web/img/g_t1.jpg"><input type="radio" name="liststyle" onclick="ChangeListStyle()" value="2"></label>
  45. </td>
  46. <td width="25%">
  47. <label><img src="../static/web/img/g_t3.jpg"><input type="radio" name="liststyle" onclick="ChangeListStyle()" value="3"></label>
  48. </td>
  49. <td>
  50. <label><img src="../static/web/img/g_t4.jpg"><input type="radio" name="liststyle" onclick="ChangeListStyle()" value="4" checked="checked"></label>
  51. </td>
  52. </tr>
  53. </table>
  54. </td>
  55. </tr>
  56. <tr>
  57. <td width="260">自由列表标题:</td>
  58. <td><input type="text" name="title" id="title" class="admin-input-lg"></td>
  59. </tr>
  60. <tr>
  61. <td>列表网页存放目录:</td>
  62. <td><input type="text" name="listdir" id="listdir" value="{cmspath}/a/freelist/" class="admin-input-lg"> {listdir}变量的值</td>
  63. </tr>
  64. <tr>
  65. <td>目录默认页名称:</td>
  66. <td>
  67. <input type="text" name="defaultpage" id="defaultpage" value="index.html" class="admin-input-lg">
  68. <label class="l-height-28"><input type="checkbox" name="nodefault" id="nodefault" value="1"> 不使用目录默认首页</label>
  69. </td>
  70. </tr>
  71. <tr>
  72. <td>命名规则:</td>
  73. <td><input type="text" name="namerule" id="namerule" value="{listdir}/index_{listid}_{page}.html" class="admin-input-lg"></td>
  74. </tr>
  75. <tr>
  76. <td>列表模板:</td>
  77. <td>
  78. <input type="text" name="templet" id="templet" value="{style}/list_free.htm" class="admin-input-lg">
  79. <button type="button" name="set4" onclick="SelectTemplets('form1.templet');" class="btn btn-success btn-sm">选择</button>
  80. </td>
  81. </tr>
  82. <tr>
  83. <td>最大列出页数:</td>
  84. <td><input type="text" name="maxpage" id="maxpage" value="100" class="admin-input-sm"></td>
  85. </tr>
  86. <tr>
  87. <td>关键词:</td>
  88. <td><input type="text" name="keywords" id="keywords" class="admin-input-lg"></td>
  89. </tr>
  90. <tr>
  91. <td>列表描述:</td>
  92. <td><textarea name="description" id="description" class="admin-textarea-sm"></textarea></td>
  93. </tr>
  94. <tr>
  95. <td colspan="2">
  96. <span>调用栏目:</span>
  97. <?php
  98. echo "<select name='typeid' class='admin-input-sm'>";
  99. echo "<option value='0'>不限栏目</option>";
  100. $dsql->SetQuery("Select ID,typename, channeltype From `#@__arctype`");
  101. $dsql->Execute();
  102. while($lrow = $dsql->GetObject()){
  103. $disable = '';
  104. if ($lrow->channeltype < -1) {
  105. $disable = 'disabled';
  106. }
  107. echo "<option value='{$lrow->ID}' $disable>{$lrow->typename}</option>";
  108. }
  109. echo "</select>";
  110. ?>
  111. <span>限定模型:</span>
  112. <?php
  113. echo "<select name='channel' class='admin-input-sm'>";
  114. echo "<option value='0' selected>不限模型</option>";
  115. $dsql->SetQuery("Select ID,typename From `#@__channeltype` where ID>0");
  116. $dsql->Execute();
  117. while($row = $dsql->GetObject())
  118. {
  119. echo "<option value='{$row->ID}'>{$row->typename}</option>";
  120. }
  121. echo "</select>";
  122. ?>
  123. <span>附加属性:</span>
  124. <?php
  125. echo "<select name='att' class='admin-input-sm'>";
  126. echo "<option value='0' selected>不限</option>";
  127. $dsql->SetQuery("SELECT * FROM `#@__arcatt`");
  128. $dsql->Execute();
  129. while($row = $dsql->GetObject())
  130. {
  131. echo "<option value='{$row->att}'>{$row->attname}</option>";
  132. }
  133. echo "</select>";
  134. ?>
  135. <label>文档发布时间:<input type="text" name="subday" id="subday2" value="0" class="admin-input-sm"> 天以内(0表示不限)</label>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td colspan="2">
  140. <label>每页记录数:<input type="text" name="pagesize" id="pagesize" value="30" class="admin-input-sm"></label>
  141. <label>显示列数: <input type="text" name="col" id="col3" value="1" class="admin-input-sm"></label>
  142. <label>标题长度:<input type="text" name="titlelen" id="titlelen" value="60" class="admin-input-sm">(1字节 = 0.5个中文字)</label>
  143. </td>
  144. </tr>
  145. <tr>
  146. <td colspan="2">
  147. <label class="l-height-28">高级筛选:<input type="checkbox" name="types[]" id="type1" value="image"> 带缩略图</label>
  148. <label class="l-height-28"><input type="checkbox" name="types[]" id="type2" value="commend"> 推荐</label>
  149. <label class="l-height-28"><input type="checkbox" name="types[]" id="type3" value="spec"> 专题</label>
  150. <label>关键词:<input type="text" name="keywordarc" id="keywordarc">(英文逗号分开)</label>
  151. </td>
  152. </tr>
  153. <tr>
  154. <td colspan="2">
  155. <span>排列顺序:</span>
  156. <select name="orderby" id="orderby" class="admin-input-sm">
  157. <option value="sortrank">置顶权限值</option>
  158. <option value="pubdate" selected>发布时间</option>
  159. <option value="senddate">录入时间</option>
  160. <option value="click">点击量</option>
  161. <option value="id">文档id</option>
  162. <option value="lastpost">最后评论时间</option>
  163. <option value="postnum">评论总数</option>
  164. </select>
  165. <label class="l-height-28"><input type="radio" name="order" value="desc" checked="checked"> 由高到低</label>
  166. <label class="l-height-28"><input type="radio" name="order" value="asc"> 由低到高</label>
  167. </td>
  168. </tr>
  169. <tr>
  170. <td colspan="2">循环内的单行记录样式支持字段(底层变量[field:varname/]):id,title,color,typeid,ismake,description,pubdate,senddate,arcrank,click,litpic,typedir,typename,arcurl,typeurl,stime(pubdate的&quot;0000-00-00&quot;格式),textlink,typelink,imglink,image普通字段直接用[field:字段名/]表示Pubdate发布时间的调用参数[field:pubdate function=MyDate('Y-m-d H:i:s',@me)/]</td>
  171. </tr>
  172. <tr>
  173. <td colspan="2" class="p-0">
  174. <textarea name="innertext" id="myinnertext" class="admin-textarea-xl"></textarea>
  175. <script>
  176. document.form1.innertext.value = document.getElementById("list4").innerHTML.toLowerCase();
  177. </script>
  178. </td>
  179. </tr>
  180. <tr>
  181. <td colspan="2" bgcolor="#f5f5f5" align="center"><button name="Submit2" type="submit" id="Submit2" class="btn btn-success btn-sm">保存</button></td>
  182. </tr>
  183. </table>
  184. </form>
  185. <script>
  186. function CheckSubmit() {
  187. if (document.form1.title.value == '') {
  188. ShowMsg("请输入自由列表标题");
  189. document.form1.title.focus();
  190. return false;
  191. }
  192. }
  193. function ChangeListStyle() {
  194. var itxt = document.getElementById("myinnertext");
  195. var myems = document.getElementsByName("liststyle");
  196. if (myems[0].checked) editor.setValue(document.getElementById("list1").innerHTML);
  197. else if (myems[1].checked) editor.setValue(document.getElementById("list2").innerHTML);
  198. else if (myems[2].checked) editor.setValue(document.getElementById("list3").innerHTML);
  199. else if (myems[3].checked) editor.setValue(document.getElementById("list4").innerHTML);
  200. editor.setValue(editor.getValue().replace("<br>", "<br>"));
  201. editor.setValue(editor.getValue().toLowerCase());
  202. }
  203. function ShowHide(objname) {
  204. var obj = document.getElementById(objname);
  205. if (obj.style.display == "block" || obj.style.display == "")
  206. obj.style.display = "none";
  207. else
  208. obj.style.display = "block";
  209. }
  210. function SelectTemplets(fname) {
  211. var pos = GetWinPos(800,600);
  212. 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);
  213. }
  214. var editor = CodeMirror.fromTextArea(document.getElementById('myinnertext'), {
  215. lineNumbers: true,
  216. lineWrapping: true,
  217. mode: 'text/html'
  218. });
  219. </script>
  220. </body>
  221. </html>