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

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