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

253 lines
14KB

  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. <script>
  14. function ChangeListStyle() {
  15. var itxt = document.getElementById("myinnertext");
  16. var myems = document.getElementsByName("liststyle");
  17. if (myems[0].checked) itxt.value = document.getElementById("list1").innerHTML;
  18. else if (myems[1].checked) itxt.value = document.getElementById("list2").innerHTML;
  19. else if (myems[2].checked) itxt.value = document.getElementById("list3").innerHTML;
  20. else if (myems[3].checked) itxt.value = document.getElementById("list4").innerHTML;
  21. itxt.value = itxt.value.replace("<br>", "<br>");
  22. itxt.value = itxt.value.toLowerCase();
  23. }
  24. function ShowHide(objname) {
  25. var obj = document.getElementById(objname);
  26. if (obj.style.display == "block" || obj.style.display == "")
  27. obj.style.display = "none";
  28. else
  29. obj.style.display = "block";
  30. }
  31. function SelectTemplets(fname) {
  32. var pos = GetWinPos(800,600);
  33. 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);
  34. }
  35. function CheckSubmit() {
  36. if (document.form1.title.value == "") {
  37. ShowMsg("自由列表标题标题不能为空");
  38. document.form1.title.focus();
  39. return false;
  40. }
  41. return true;
  42. }
  43. </script>
  44. <link rel="stylesheet" href="css/codemirror.css">
  45. <script src="js/codemirror.js"></script>
  46. <script src="js/mode/xml/xml.js"></script>
  47. <script src="js/mode/javascript/javascript.js"></script>
  48. <script src="js/mode/css/css.js"></script>
  49. <script src="js/mode/htmlmixed/htmlmixed.js"></script>
  50. </head>
  51. <body>
  52. <center>
  53. <table width="98%" cellpadding="1" cellspacing="1" align="center" class="table maintable mt-3 mb-3">
  54. <form action="freelist_edit.php" method="post" name="form1" onSubmit="return CheckSubmit();">
  55. <input type="hidden" name="dopost" value="save">
  56. <input type="hidden" name="aid" value="<?php echo $row['aid']?>">
  57. <tr>
  58. <td bgcolor="#f8f8f8"><a href="freelist_main.php" class="ml-2">自由列表管理</a> &gt; 增加一个列表</td>
  59. </tr>
  60. <tr>
  61. <td class="p-0">
  62. <table width="100%" align="right" cellpadding="0" cellspacing="1" class="table-borderless">
  63. <tr>
  64. <td class="p-0">
  65. <table width="100%" cellspacing="1" cellpadding="0">
  66. <tr>
  67. <td colspan="2"><i class="fa fa-question-circle" title="帮助"></i> 自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成按自定义排序规则的文档列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成网页或访问速度</td>
  68. </tr>
  69. <tr>
  70. <td width="260">自由列表标题:</td>
  71. <td><input type="text" name="title" id="title" value="<?php echo $row['title']?>" style="width:260px"></td>
  72. </tr>
  73. <tr>
  74. <td>列表HTML存放目录:</td>
  75. <td><input type="text" name="listdir" id="listdir" value="<?php echo $row['listdir']?>" style="width:260px"> {listdir}变量的值</td>
  76. </tr>
  77. <tr>
  78. <td>目录默认页名称:</td>
  79. <td>
  80. <input type="text" name="defaultpage" id="defaultpage" value="<?php echo $row['defaultpage']?>" style="width:260px">
  81. <label><input type="checkbox" name="nodefault" id="nodefault" value="1" <?php if ($row['nodefault']==1) echo "checked";?>> 不使用目录默认主页</label>
  82. </td>
  83. </tr>
  84. <tr>
  85. <td>命名规则:</td>
  86. <td><input type="text" name="namerule" id="namerule" value="<?php echo $row['namerule']?>" style="width:260px"></td>
  87. </tr>
  88. <tr>
  89. <td>列表模板:</td>
  90. <td>
  91. <input type="text" name="templet" id="templet" value="<?php echo $row['templet']?>" style="width:260px">
  92. <button type="button" name="set4" onClick="SelectTemplets('form1.templet');" class="btn btn-success btn-sm">浏览</button>
  93. </td>
  94. </tr>
  95. <tr>
  96. <td>最大列出页数:</td>
  97. <td><input type="text" name="maxpage" id="maxpage" value="<?php echo $row['maxpage'];?>" style="width:60px"></td>
  98. </tr>
  99. <tr>
  100. <td></td>
  101. <td>以下选项用于模板里的 &lt;meta name=&quot;keywords|description&quot; content=&quot;&quot;&gt; 描述</td>
  102. </tr>
  103. <tr>
  104. <td>关键词:</td>
  105. <td><input type="text" name="keywords" id="keywords" value="<?php echo $row['keywords'];?>" style="width:260px"></td>
  106. </tr>
  107. <tr>
  108. <td>列表描述:</td>
  109. <td><textarea name="description" id="description" class="biz-textarea-sm"><?php echo $row['description']?></textarea></td>
  110. </tr>
  111. </table>
  112. </td>
  113. </tr>
  114. <tr>
  115. <td style="background:#fbfce2">列表样式:这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性</td>
  116. </tr>
  117. <tr>
  118. <td>限定栏目:
  119. <?php
  120. $typeid = $ctag->GetAtt('typeid');
  121. echo "<select name='typeid' style='width:160px'>";
  122. echo "<option value='0'>不限栏目</option>";
  123. $dsql->SetQuery("Select id,typename, channeltype From #@__arctype");
  124. $dsql->Execute();
  125. while($lrow = $dsql->GetObject()){
  126. $disable = '';
  127. if ($lrow->channeltype < -1)
  128. {
  129. $disable = 'disabled';
  130. }
  131. if ($lrow->id==$typeid) echo "<option value='{$lrow->id}' selected $disable>{$lrow->typename}</option>";
  132. else echo "<option value='{$lrow->id}' $disable>{$lrow->typename}</option>";
  133. }
  134. echo "</select>";
  135. ?>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td>限定频道:
  140. <?php
  141. $channel = $ctag->GetAtt('channel');
  142. echo "<select name='channel' style='width:160px'><option value='0'>不限</option>";
  143. $dsql->SetQuery("Select id,typename From #@__channeltype where id>0");
  144. $dsql->Execute();
  145. while($nrow = $dsql->GetObject())
  146. {
  147. if ($nrow->id==$channel) echo "<option value='{$nrow->id}' selected>{$nrow->typename}</option>";
  148. else echo "<option value='{$nrow->id}'>{$nrow->typename}</option>";
  149. }
  150. echo "</select>";
  151. ?>(如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)
  152. </td>
  153. </tr>
  154. <tr>
  155. <td>附加属性:
  156. <?php
  157. $att = $ctag->GetAtt('att');
  158. echo "<select name='att' style='width:160px'>";
  159. echo "<option value='0'>不限</option>";
  160. $dsql->SetQuery("Select * From #@__arcatt");
  161. $dsql->Execute();
  162. while($nrow = $dsql->GetObject())
  163. {
  164. if ($att==$nrow->att)
  165. {
  166. echo "<option value='{$nrow->att}' selected>{$nrow->attname}</option>";
  167. } else {
  168. echo "<option value='{$nrow->att}'>{$nrow->attname}</option>";
  169. }
  170. }
  171. echo "</select>";
  172. ?>
  173. 文档发布时间:<input type="text" name="subday" id="subday" size="6" value="<?php echo $ctag->GetAtt('subday')?>"> 天以内(0表示不限)
  174. </td>
  175. </tr>
  176. <tr>
  177. <td>
  178. 每页记录数:<input type="text" name="pagesize" id="pagesize" value="<?php echo $ctag->GetAtt('pagesize')?>" size="4">
  179. 显示列数:<input type="text" name="col" id="col" value="<?php $col = $ctag->GetAtt('col'); $v = ( empty($col) ? '1' : $col ); echo $v;?>" size="4">
  180. 标题长度:<input type="text" name="titlelen" id="titlelen" value="<?php echo $ctag->GetAtt('titlelen')?>" size="4">(1字节 = 0.5个中文字)
  181. </td>
  182. </tr>
  183. <tr>
  184. <td>
  185. <?php
  186. $setype = $ctag->GetAtt('type');
  187. if ($setype=='') $setype = 'X';
  188. ?>
  189. 高级筛选:
  190. <label><input type="checkbox" name="types[]" id="type1" value="image" <?php if (preg_match("#image#i",$setype)) echo ' checked';?>> 带缩略图</label>
  191. <label><input type="checkbox" name="types[]" id="type2" value="commend" <?php if (preg_match("#commend#i", $setype)) echo ' checked';?>> 推荐</label>
  192. <label><input type="checkbox" name="types[]" id="type3" value="spec" class="inputbut" <?php if (preg_match("#spec#i", $setype)) echo ' checked';?>> 专题</label>
  193. 关键词:<input type="text" name="keywordarc" id="keywordarc" value="<?php echo $ctag->GetAtt('keyword')?>">(&quot;,&quot;逗号分开)
  194. </td>
  195. </tr>
  196. <tr>
  197. <td>排列顺序:
  198. <?php
  199. $orderby = $ctag->GetAtt('orderby');
  200. $sorta = "sortrank,置顶权限值;pubdate,发布时间;senddate,录入时间;click,点击量;id,文档id,lastpost,最后评论时间;postnum,评论总数;rand,随机获取";
  201. $sortas = explode(';',$sorta);
  202. foreach($sortas as $v)
  203. {
  204. $vs = explode(',',$v);
  205. $vs[0] = trim($vs[0]);
  206. $sortarrs[$vs[0]] = $vs[1];
  207. }
  208. ?>
  209. <select name="orderby" id="orderby" style="width:160px">
  210. <?php
  211. echo "<option value=\"$orderby\" selected>{$sortarrs[$orderby]}</option>";
  212. ?>
  213. <option value="sortrank">置顶权限值</option>
  214. <option value="pubdate">发布时间</option>
  215. <option value="senddate">录入时间</option>
  216. <option value="click">点击量</option>
  217. <option value="id">文档id</option>
  218. <option value="lastpost">最后评论时间</option>
  219. <option value="postnum">评论总数</option>
  220. </select>
  221. <label><input type="radio" name="order" value="desc" <?php if ($ctag->GetAtt('orderway')=='desc') echo "checked";?>> 由高到低</label>
  222. <label><input type="radio" name="order" value="asc" <?php if ($ctag->GetAtt('orderway')=='asc') echo "checked";?>> 由低到高</label>
  223. </td>
  224. </tr>
  225. <tr>
  226. <td>循环内的单行记录样式(InnerText):<a href='javascript:ShowHide("innervar");'><i class="fa fa-question-circle" title="帮助"></i> 底层变量field参考</a></td>
  227. </tr>
  228. <tr>
  229. <td id="innervar" style="display:none">
  230. <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--%d H:i:s',@me)/]</span>
  231. </td>
  232. </tr>
  233. <tr>
  234. <td><textarea name="innertext" id="myinnertext" class="biz-textarea"><?php echo $ctag->GetInnerText()?></textarea></td>
  235. </tr>
  236. <tr>
  237. <td align="center" class="py-2"><button name="Submit2" type="submit" id="Submit2" class="btn btn-success btn-sm">保存</button></td>
  238. </tr>
  239. </table>
  240. </td>
  241. </tr>
  242. </form>
  243. </table>
  244. </center>
  245. <script>
  246. var editor = CodeMirror.fromTextArea(document.getElementById('myinnertext'), {
  247. lineNumbers: true,
  248. lineWrapping: true,
  249. mode: 'text/html'
  250. });
  251. </script>
  252. </body>
  253. </html>