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

301 lines
16KB

  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. if (document.all) {
  32. var posLeft = window.event.clientY - 200;
  33. var posTop = window.event.clientX - 300;
  34. } else {
  35. var posLeft = 100;
  36. var posTop = 100;
  37. }
  38. window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir)?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop);
  39. }
  40. function CheckSubmit() {
  41. if (document.form1.title.value == "") {
  42. ShowMsg("自由列表标题标题不能为空");
  43. document.form1.title.focus();
  44. return false;
  45. }
  46. return true;
  47. }
  48. </script>
  49. <link rel="stylesheet" href="css/codemirror.css">
  50. <script type="text/javascript" src="js/codemirror.js"></script>
  51. <script type="text/javascript" src="js/mode/xml/xml.js"></script>
  52. <script type="text/javascript" src="js/mode/javascript/javascript.js"></script>
  53. <script type="text/javascript" src="js/mode/css/css.js"></script>
  54. <script type="text/javascript" src="js/mode/htmlmixed/htmlmixed.js"></script>
  55. </head>
  56. <body background='../static/web/img/allbg.gif' leftmargin='8' topmargin='8'>
  57. <div class="bodytitle mt-3">
  58. <div class="bodytitleleft"></div>
  59. <div class="bodytitletxt">频道管理</div>
  60. </div>
  61. <center>
  62. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="table maintable table-bordered">
  63. <form action="freelist_edit.php" method="post" name="form1" onSubmit="return CheckSubmit();">
  64. <input type="hidden" name="dopost" value="save">
  65. <input type="hidden" name="aid" value="<?php echo $row['aid']?>">
  66. <tr>
  67. <td height="26" bgcolor="#EDF9D5" background="../static/web/img/tbg.gif">
  68. <table width="98%" border="0" cellpadding="0" cellspacing="0" class="table-borderless">
  69. <tr>
  70. <td width="35%" height="18" align="left" style="padding-left:10px">
  71. <a href="freelist_main.php">自由列表管理</a> &gt; 修改自由列表:
  72. </td>
  73. <td width="65%" align="right"></td>
  74. </tr>
  75. </table>
  76. </td>
  77. </tr>
  78. <tr>
  79. <td height="265" valign="top" bgcolor="#FFFFFF">
  80. <table width="99%" border="0" align="right" cellpadding="0" cellspacing="1" class="table-borderless">
  81. <tr>
  82. <td height="56">
  83. <table width="100%" border="0" cellspacing="1" cellpadding="0">
  84. <tr>
  85. <td height="26" colspan="2" align="left"><img src="../static/web/img/help.gif">自由列表标记的说明:自由列表标记(freelist)的功能基本等同于arclist标记,区别是freelist标记支持分页,这让生成Google
  86. Map、生成按自定义排序规则的文章列表(如按标题拼音部首排序等)等轻松的实现统一化管理,并且自由列是独立编译的,不与其它模板混在一起,这样不会影响系统生成HTML或访问速度</td>
  87. </tr>
  88. <tr>
  89. <td width="16%" height="26" align="left">自由列表标题:</td>
  90. <td width="84%" align="left"><input name="title" type="text" id="title" style="width:35%" value="<?php echo $row['title']?>"></td>
  91. </tr>
  92. <tr>
  93. <td height="26" align="left">列表HTML存放目录:</td>
  94. <td align="left"><input name="listdir" type="text" id="listdir" style="width:35%" value="<?php echo $row['listdir']?>">
  95. {listdir}变量的值</td>
  96. </tr>
  97. <tr>
  98. <td height="26" align="left">目录默认页名称:</td>
  99. <td align="left"><input name="defaultpage" type="text" id="defaultpage" style="width:35%" value="<?php echo $row['defaultpage']?>">
  100. <label><input name="nodefault" type="checkbox" id="nodefault" value="1"
  101. <?php if($row['nodefault']==1) echo " checked"; ?>>
  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" style="width:35%" value="<?php echo $row['namerule']?>"></td>
  108. </tr>
  109. <tr>
  110. <td height="36" align="left">列表模板:</td>
  111. <td align="left"><input name="templet" type="text" id="templet" style="width:300px" value="<?php echo $row['templet']?>">
  112. <button type="button" name="set4" style="width:60px" onClick="SelectTemplets('form1.templet');" class="btn btn-success btn-sm">浏览</button></td>
  113. </tr>
  114. <tr>
  115. <td height="30" align="left">最大列出页数:</td>
  116. <td align="left">
  117. <input name="maxpage" type="text" id="maxpage" style="width:100px" value="<?php echo $row['maxpage']; ?>">
  118. </td>
  119. </tr>
  120. <tr>
  121. <td height="26" align="left">&nbsp;</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:60%" value="<?php echo $row['keywords']; ?>"></td>
  127. </tr>
  128. <tr>
  129. <td height="26" align="left">列表描述:</td>
  130. <td align="left"><textarea name="description" id="description" style="width:60%;height:50px"><?php echo $row['description']?></textarea></td>
  131. </tr>
  132. </table>
  133. </td>
  134. </tr>
  135. <tr>
  136. <td height="26" align="left" style="background:#FBFCE2;"><img src="../static/web/img/file_tt.gif">列表样式:(这里是定义自由列表模板里的{dede:freelist/}标记的样式和属性)</td>
  137. </tr>
  138. <tr>
  139. <td height="26" align="left">
  140. 限定栏目:
  141. <?php
  142. $typeid = $ctag->GetAtt('typeid');
  143. echo "<select name='typeid' style='width:100'>\r\n";
  144. echo "<option value='0'>不限栏目</option>\r\n";
  145. $dsql->SetQuery("Select id,typename, channeltype From #@__arctype");
  146. $dsql->Execute();
  147. while($lrow = $dsql->GetObject()){
  148. $disable = '';
  149. if($lrow->channeltype < -1)
  150. {
  151. $disable = 'disabled';
  152. }
  153. if($lrow->id==$typeid) echo "<option value='{$lrow->id}' selected $disable>{$lrow->typename}</option>\r\n";
  154. else echo "<option value='{$lrow->id}' $disable>{$lrow->typename}</option>\r\n";
  155. }
  156. echo "</select>";
  157. ?></td>
  158. </tr>
  159. <tr>
  160. <td height="26" align="left"> 限定频道:
  161. <?php
  162. $channel = $ctag->GetAtt('channel');
  163. echo "<select name='channel' style='width:100'><option value='0'>不限</option>\r\n";
  164. $dsql->SetQuery("Select id,typename From #@__channeltype where id>0");
  165. $dsql->Execute();
  166. while($nrow = $dsql->GetObject())
  167. {
  168. if($nrow->id==$channel) echo "<option value='{$nrow->id}' selected>{$nrow->typename}</option>\r\n";
  169. else echo "<option value='{$nrow->id}'>{$nrow->typename}</option>\r\n";
  170. }
  171. echo "</select>";
  172. ?>
  173.  (如果限定了频道内容模型,则允许使用附加表指定的列表字段作为底层变量)</td>
  174. </tr>
  175. <tr>
  176. <td height="26" align="left">附加属性:
  177. <?php
  178. $att = $ctag->GetAtt('att');
  179. echo "<select name='att' style='width:100'>\r\n";
  180. echo "<option value='0'>不限</option>\r\n";
  181. $dsql->SetQuery("Select * From #@__arcatt");
  182. $dsql->Execute();
  183. while($nrow = $dsql->GetObject())
  184. {
  185. if($att==$nrow->att)
  186. {
  187. echo "<option value='{$nrow->att}' selected>{$nrow->attname}</option>\r\n";
  188. }
  189. else
  190. {
  191. echo "<option value='{$nrow->att}'>{$nrow->attname}</option>\r\n";
  192. }
  193. }
  194. echo "</select>";
  195. ?>
  196. 文档发布时间:
  197. <input name="subday" type="text" id="subday" size="6" value="<?php echo $ctag->GetAtt('subday')?>">
  198. 天以内 (0 表示不限) </td>
  199. </tr>
  200. <tr>
  201. <td height="26" align="left">每页记录数:
  202. <input name="pagesize" type="text" id="pagesize" value="<?php echo $ctag->GetAtt('pagesize')?>"
  203. size="4">
  204.  显示列数:
  205. <input name="col" type="text" id="col" value="<?php $col = $ctag->GetAtt('col'); $v = ( empty($col) ? '1' : $col ); echo $v; ?>"
  206. size="4">
  207. 标题长度:
  208. <input name="titlelen" type="text" id="titlelen" value="<?php echo $ctag->GetAtt('titlelen')?>"
  209. size="4">
  210. (1 字节 = 0.5个中文字)</td>
  211. </tr>
  212. <tr>
  213. <td height="26" align="left">
  214. <?php
  215. $setype = $ctag->GetAtt('type');
  216. if($setype=='') $setype = 'X';
  217. ?>
  218. 高级筛选:
  219. <label><input name="types[]" type="checkbox" id="type1" value="image"
  220. <?php if(preg_match("#image#i",$setype)) echo ' checked';?>>
  221. 带缩略图</label>
  222. <label><input name="types[]" type="checkbox" id="type2" value="commend"
  223. <?php if(preg_match("#commend#i", $setype)) echo ' checked';?>>
  224. 推荐</label>
  225. <label><input name="types[]" type="checkbox" id="type3" value="spec" class="inputbut"
  226. <?php if(preg_match("#spec#i", $setype)) echo ' checked';?>>
  227. 专题</label> 关键词:
  228. <input name="keywordarc" type="text" id="keywordarc" value="<?php echo $ctag->GetAtt('keyword')?>">
  229. (&quot;,&quot;逗号分开)
  230. </td>
  231. </tr>
  232. <tr>
  233. <td height="26" align="left">排列顺序:
  234. <?php
  235. $orderby = $ctag->GetAtt('orderby');
  236. $sorta = "sortrank,置顶权限值;pubdate,发布时间;senddate,录入时间;click,点击量;id,文档ID,lastpost,最后评论时间;postnum,评论总数;rand,随机获取";
  237. $sortas = explode(';',$sorta);
  238. foreach($sortas as $v)
  239. {
  240. $vs = explode(',',$v);
  241. $vs[0] = trim($vs[0]);
  242. $sortarrs[$vs[0]] = $vs[1];
  243. }
  244. ?>
  245. <select name="orderby" id="orderby" style="width:120">
  246. <?php
  247. echo "<option value=\"$orderby\" selected>{$sortarrs[$orderby]}</option>\r\n";
  248. ?>
  249. <option value="sortrank">置顶权限值</option>
  250. <option value="pubdate">发布时间</option>
  251. <option value="senddate">录入时间</option>
  252. <option value="click">点击量</option>
  253. <option value="id">文档ID</option>
  254. <option value="lastpost">最后评论时间</option>
  255. <option value="postnum">评论总数</option>
  256. </select>
  257.  
  258. <label><input name="order" type="radio" value="desc"
  259. <?php if($ctag->GetAtt('orderway')=='desc') echo " checked";?>>
  260. 由高到低</label>
  261. <label><input type="radio" name="order" value="asc"
  262. <?php if($ctag->GetAtt('orderway')=='asc') echo " checked";?>>
  263. 由低到高</label></td>
  264. </tr>
  265. <tr>
  266. <td height="26" align="left">循环内的单行记录样式(InnerText):[<img src="../static/web/img/help.gif"><a
  267. href='javascript:ShowHide("innervar");'>底层变量field参考</a>]</td>
  268. </tr>
  269. <tr>
  270. <td height="80" align="left">
  271. <textarea name="innertext" cols="80" rows="6" id="myinnertext" style="width:80%;height:120px"><?php echo $ctag->GetInnerText()?></textarea>
  272. </td>
  273. </tr>
  274. <tr>
  275. <td height="80" align="left" id='innervar' style="display:none">
  276. <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>
  277. </td>
  278. </tr>
  279. <tr>
  280. <td height="50" align="left"> &nbsp;
  281. <button name="Submit2" type="submit" id="Submit2" class="btn btn-success">保存一个列表</button>
  282. </td>
  283. </tr>
  284. </table>
  285. </td>
  286. </tr>
  287. </form>
  288. <tr>
  289. <td valign="top" bgcolor="#f6f6f6">&nbsp;</td>
  290. </tr>
  291. </table>
  292. </center>
  293. <script type="text/javascript">
  294. var editor = CodeMirror.fromTextArea(document.getElementById('myinnertext'), {
  295. lineNumbers: true,
  296. lineWrapping: true,
  297. mode: 'text/html'
  298. });
  299. </script>
  300. </body>
  301. </html>