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

328 lines
17KB

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