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

271 lines
15KB

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