国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

freelist_add.htm 15KB

2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
2年前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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. <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="../static/web/js/jquery.min.js"></script>
  11. <script src="../static/web/js/bootstrap.bundle.min.js"></script>
  12. <script src="js/main.js"></script>
  13. <link rel="stylesheet" href="css/codemirror.css">
  14. <script src="js/codemirror.js"></script>
  15. <script src="js/mode/xml/xml.js"></script>
  16. <script src="js/mode/javascript/javascript.js"></script>
  17. <script src="js/mode/css/css.js"></script>
  18. <script src="js/mode/htmlmixed/htmlmixed.js"></script>
  19. </head>
  20. <body>
  21. <center>
  22. <div style="display:none" id="list1">
  23. <li class="media border-bottom-dashed mt-2 py-2">
  24. <div class="media-body row">
  25. <div class="col-12 title">
  26. <a href="[field:arcurl/]">
  27. <h4 class="mt-0 mb-3">[field:title/]</h4>
  28. </a>
  29. </div>
  30. </div>
  31. </li>
  32. </div>
  33. <div style="display:none" id="list2">
  34. <li class="media border-bottom-dashed mt-2 py-2">
  35. <div class="media-body row">
  36. <div class="col-12 title">
  37. [[field:typelink/]]
  38. <a href="[field:arcurl/]">
  39. <h4 class="mt-0 mb-3">[field:title/]</h4>
  40. </a>
  41. </div>
  42. </div>
  43. </li>
  44. </div>
  45. <div style="display:none" id="list3">
  46. <table width='98%' cellspacing='2' cellpadding='0'>
  47. <tr>
  48. <td align='center'>[field:imglink/]</td>
  49. </tr>
  50. <tr>
  51. <td align='center'>[field:textlink/]</td>
  52. </tr>
  53. </table>
  54. </div>
  55. <div style="display:none" id="list4">
  56. <li class="media border-bottom-dashed mt-2 py-2">
  57. <div class="media-body row">
  58. <div class="col-12 title">
  59. <a href="[field:arcurl/]">
  60. <h4 class="mt-0 mb-3">[field:title/]</h4>
  61. </a>
  62. </div>
  63. <div class="col-12 description py-2">
  64. <a href="[field:arcurl/]">[field:description/]</a>
  65. </div>
  66. <div class="col-12 addinfo">日期:[field:pubdate function="MyDate('Y-m-d', @me)"/] 点击:[field:click/] 好评:[field:scores/]</div>
  67. </div>
  68. </li>
  69. </div>
  70. <table width="98%" cellpadding="1" cellspacing="1" align="center" class="table-borderless mt-3" style="border:1px solid #dee2e6;border-bottom:none">
  71. <tr>
  72. <td align="left" background="../static/web/img/tbg.gif" class="py-3" style="padding-left:10px"><a href="freelist_main.php">自由列表管理</a> &gt; 增加一个列表</td>
  73. <td align="right" background="../static/web/img/tbg.gif"></td>
  74. </tr>
  75. </table>
  76. <table width="98%" cellpadding="1" cellspacing="1" align="center" class="table maintable">
  77. <form action="freelist_add.php" method="post" name="form1" onSubmit="return CheckSubmit();">
  78. <input type="hidden" name="dopost" value="save">
  79. <tr>
  80. <td style="padding:0">
  81. <table width="100%" align="center" cellpadding="0" cellspacing="1" class="table-borderless">
  82. <tr>
  83. <td style="padding:0">
  84. <table width="100%" cellspacing="1" cellpadding="0">
  85. <tr>
  86. <td height="26" colspan="2" align="left"><i class="fa fa-question-circle" title="帮助"></i> 自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成Google Map、生成按自定义排序规则的文章列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成HTML或访问速度</td>
  87. </tr>
  88. <tr>
  89. <td width="260" height="26" align="left">自由列表标题:</td>
  90. <td align="left"><input name="title" type="text" id="title" style="width:260px"></td>
  91. </tr>
  92. <tr>
  93. <td height="26" align="left">列表HTML存放目录:</td>
  94. <td align="left"><input name="listdir" type="text" id="listdir" value="{cmspath}/a/freelist/" style="width:260px">
  95. {listdir}变量的值</td>
  96. </tr>
  97. <tr>
  98. <td height="26" align="left">目录默认页名称:</td>
  99. <td align="left">
  100. <input name="defaultpage" type="text" id="defaultpage" value="index.html" style="width:260px">
  101. <label><input name="nodefault" type="checkbox" id="nodefault" value="1">
  102. 不使用目录默认主页</label>
  103. </td>
  104. </tr>
  105. <tr>
  106. <td height="26" align="left">命名规则:</td>
  107. <td align="left"><input name="namerule" type="text" id="namerule" value="{listdir}/index_{listid}_{page}.html" style="width:260px"></td>
  108. </tr>
  109. <tr>
  110. <td height="26" align="left">列表模板:</td>
  111. <td align="left">
  112. <input name="templet" type="text" id="templet" value="{style}/list_free.htm" style="width:260px">
  113. <button type="button" name="set4" onClick="SelectTemplets('form1.templet');" class="btn btn-success btn-sm">浏览</button>
  114. </td>
  115. </tr>
  116. <tr>
  117. <td height="26" align="left">最大列出页数:</td>
  118. <td align="left"><input name="maxpage" type="text" id="maxpage" value="100" style="width:60px"></td>
  119. </tr>
  120. <tr>
  121. <td height="26" align="left"></td>
  122. <td align="left">以下选项用于模板里的 &lt;meta name=&quot;keywords|description&quot; content=&quot;&quot;&gt; 描述</td>
  123. </tr>
  124. <tr>
  125. <td height="26" align="left">关键词:</td>
  126. <td align="left"><input name="keywords" type="text" id="keywords" style="width:260px"></td>
  127. </tr>
  128. <tr>
  129. <td height="26" align="left">列表描述:</td>
  130. <td align="left"><textarea name="description" id="description" style="width:360px;height:50px"></textarea></td>
  131. </tr>
  132. </table>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td height="26" align="left" style="background:#F8FCF1;"><img src="../static/web/img/file_tt.gif">列表样式:(这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性)</td>
  137. </tr>
  138. <tr>
  139. <td align="left">
  140. <table width="99%" cellspacing="0" cellpadding="0">
  141. <tr>
  142. <td width="25%" height="126">
  143. <label><img src="../static/web/img/g_t2.jpg" width="130" height="100">
  144. <input name="liststyle" type="radio" onClick="ChangeListStyle()" value="1"></label>
  145. </td>
  146. <td width="25%">
  147. <label><img src="../static/web/img/g_t1.jpg">
  148. <input type="radio" onClick="ChangeListStyle()" name="liststyle" value="2"></label>
  149. </td>
  150. <td width="25%">
  151. <label><img src="../static/web/img/g_t3.jpg">
  152. <input type="radio" onClick="ChangeListStyle()" name="liststyle" value="3"></label>
  153. </td>
  154. <td>
  155. <label><img src="../static/web/img/g_t4.jpg"> <input name="liststyle" type="radio" onClick="ChangeListStyle()" value="4" checked></label>
  156. </td>
  157. </tr>
  158. </table>
  159. </td>
  160. </tr>
  161. <tr>
  162. <td height="26" align="left">限定栏目:
  163. <?php
  164. echo "<select name='typeid' style='width:160px'>";
  165. echo "<option value='0'>不限栏目</option>";
  166. $dsql->SetQuery("Select ID,typename, channeltype From #@__arctype");
  167. $dsql->Execute();
  168. while($lrow = $dsql->GetObject()){
  169. $disable = '';
  170. if($lrow->channeltype < -1)
  171. {
  172. $disable = 'disabled';
  173. }
  174. echo "<option value='{$lrow->ID}' $disable>{$lrow->typename}</option>";
  175. }
  176. echo "</select>";
  177. ?> </td>
  178. </tr>
  179. <tr>
  180. <td height="26" align="left">限定频道:
  181. <?php
  182. echo "<select name='channel' style='width:160px'>";
  183. echo "<option value='0' selected>不限</option>";
  184. $dsql->SetQuery("Select ID,typename From #@__channeltype where ID>0");
  185. $dsql->Execute();
  186. while($row = $dsql->GetObject())
  187. {
  188. echo "<option value='{$row->ID}'>{$row->typename}</option>";
  189. }
  190. echo "</select>";
  191. ?>
  192.  (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)</td>
  193. </tr>
  194. <tr>
  195. <td height="26" align="left">附加属性:
  196. <?php
  197. echo "<select name='att' style='width:160px'>";
  198. echo "<option value='0' selected>不限</option>";
  199. $dsql->SetQuery("Select * From #@__arcatt");
  200. $dsql->Execute();
  201. while($row = $dsql->GetObject())
  202. {
  203. echo "<option value='{$row->att}'>{$row->attname}</option>";
  204. }
  205. echo "</select>";
  206. ?>
  207. 文档发布时间:<input name="subday" type="text" id="subday2" value="0" style="width:60px"> 天以内(0表示不限)
  208. </td>
  209. </tr>
  210. <tr>
  211. <td height="26" align="left">每页记录数:
  212. <input name="pagesize" type="text" id="pagesize" value="30" style="width:60px">
  213. 显示列数:
  214. <input name="col" type="text" id="col3" value="1" style="width:60px">
  215. 标题长度:
  216. <input name="titlelen" type="text" id="titlelen" value="60" style="width:60px"(1字节 = 0.5个中文字)
  217. </td>
  218. </tr>
  219. <tr>
  220. <td height="26" align="left"> 高级筛选:
  221. <label><input name="types[]" type="checkbox" id="type1" value="image">
  222. 带缩略图</label>
  223. <label><input name="types[]" type="checkbox" id="type2" value="commend">
  224. 推荐</label>
  225. <label><input name="types[]" type="checkbox" id="type3" value="spec">
  226. 专题</label> 关键词:
  227. <input name="keywordarc" type="text" id="keywordarc">(&quot;,&quot;逗号分开)
  228. </td>
  229. </tr>
  230. <tr>
  231. <td height="26" align="left">排列顺序:
  232. <select name="orderby" id="orderby" style="width:160px">
  233. <option value="sortrank">置顶权限值</option>
  234. <option value="pubdate" selected>发布时间</option>
  235. <option value="senddate">录入时间</option>
  236. <option value="click">点击量</option>
  237. <option value="id">文档ID</option>
  238. <option value="lastpost">最后评论时间</option>
  239. <option value="postnum">评论总数</option>
  240. </select>
  241. <label><input name="order" type="radio" value="desc" checked>
  242. 由高到低</label>
  243. <label><input type="radio" name="order" value="asc">
  244. 由低到高</label>
  245. </td>
  246. </tr>
  247. <tr>
  248. <td height="26" align="left">循环内的单行记录样式(InnerText):[<a href='javascript:ShowHide("innervar");'><i class="fa fa-question-circle" title="帮助"></i> 底层变量field参考</a>]</td>
  249. </tr>
  250. <tr>
  251. <td height="99" align="left"><textarea name="innertext" cols="80" rows="6" id="myinnertext" style="width:80%;height:120px"></textarea>
  252. <script>document.form1.innertext.value = document.getElementById("list4").innerHTML.toLowerCase();</script>
  253. </td>
  254. </tr>
  255. <tr>
  256. <td height="80" align="left" id="innervar" style="display:none">
  257. <span><i class="fa fa-question-circle" title="帮助"></i> 支持字段(底层变量[field:varname/]):id,title,color,typeid,ismake,description,pubdate,senddate,arcrank,click,litpic,typedir,typename,arcurl,typeurl,<br>stime(pubdate 的&quot;0000-00-00&quot;格式),textlink,typelink,imglink,image普通字段直接用[field:字段名/]表示<br>·Pubdate发布时间的调用参数 [field:pubdate function=MyDate('Y-m-d H:i:s',@me)/]</span>
  258. </td>
  259. </tr>
  260. <tr>
  261. <td align="center" class="py-3">
  262. <button name="Submit2" type="submit" id="Submit2" class="btn btn-success btn-sm">保存</button>
  263. </td>
  264. </tr>
  265. </table>
  266. </td>
  267. </tr>
  268. </form>
  269. </table>
  270. </center>
  271. <script>
  272. var editor = CodeMirror.fromTextArea(document.getElementById('myinnertext'), {
  273. lineNumbers: true,
  274. lineWrapping: true,
  275. mode: 'text/html'
  276. });
  277. function ChangeListStyle() {
  278. var itxt = document.getElementById("myinnertext");
  279. var myems = document.getElementsByName("liststyle");
  280. if (myems[0].checked) editor.setValue(document.getElementById("list1").innerHTML);
  281. else if (myems[1].checked) editor.setValue(document.getElementById("list2").innerHTML);
  282. else if (myems[2].checked) editor.setValue(document.getElementById("list3").innerHTML);
  283. else if (myems[3].checked) editor.setValue(document.getElementById("list4").innerHTML);
  284. editor.setValue(editor.getValue().replace("<BR>", "<br>"));
  285. editor.setValue(editor.getValue().toLowerCase());
  286. }
  287. function ShowHide(objname) {
  288. var obj = document.getElementById(objname);
  289. if (obj.style.display == "block" || obj.style.display == "")
  290. obj.style.display = "none";
  291. else
  292. obj.style.display = "block";
  293. }
  294. function SelectTemplets(fname) {
  295. var pos = GetWinPos(800,600);
  296. 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);
  297. }
  298. function CheckSubmit() {
  299. if (document.form1.title.value == "") {
  300. ShowMsg("自由列表标题标题不能为空");
  301. document.form1.title.focus();
  302. return false;
  303. }
  304. return true;
  305. }
  306. </script>
  307. </body>
  308. </html>