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

153 lines
6.0KB

  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 href="css/base.css" rel="stylesheet" type="text/css">
  8. <script language="javascript" src="../static/js/jquery.js"></script>
  9. <script language="javascript" src="../static/js/dedeajax2.js"></script>
  10. <script language="javascript" src="js/main.js"></script>
  11. <script language="JavaScript">
  12. var pageno = 1;
  13. var totalrow = <?php echo $totalRow?>;
  14. var pagesize = <?php echo $pagesize?>;
  15. var orderby = '<?php echo $orderby?>';
  16. var addget = "<?php echo $addget?>";
  17. //加载列表
  18. function ReloadPage(ordertype) {
  19. orderby = ordertype;
  20. var listArea = $Obj('rslist');
  21. var errMsg = "网络通信出错!<br>[<a href=\"javascript:ReloadPage('" + ordertype + "')\"><u>点击此重新加载列表</u></a>]";
  22. var myajax = new DedeAjax(listArea, true, true, "", errMsg, "正在加载...");
  23. myajax.SendGet("freelist_main.php?dopost=getlist&pageno=" + pageno + "&orderby=" + ordertype + addget);
  24. }
  25. //载入指定页的列表
  26. function LoadPage(npage) {
  27. pageno = npage;
  28. ReloadPage(orderby);
  29. ReloadPageNum(pageno);
  30. }
  31. //更改
  32. function EditNote(nid) {
  33. location.href = 'freelist_edit.php?aid=' + nid;
  34. }
  35. //更新HTML
  36. function CreateNote(nid) {
  37. location.href = 'makehtml_freelist.php?aid=' + nid;
  38. }
  39. //删除
  40. function DelNote(nid) {
  41. if (!window.confirm("你确认要删除这条记录么!")) { return false; }
  42. var listArea = $Obj('rslist');
  43. totalrow = totalrow - 1;
  44. var pagenum = Math.ceil(totalrow / pagesize);
  45. if (pagenum <= pageno) pageno = pagenum;
  46. var errMsg = "网络通信出错!<br>[<a href=\"javascript:LoadPage('" + pageno + "')\"><u>点击此重新加载列表</u></a>]";
  47. var myajax = new DedeAjax(listArea, true, true, "", errMsg, "正在处理...");
  48. myajax.SendGet("freelist_main.php?dopost=del&aid=" + nid + "&pageno=" + pageno);
  49. ReloadPageNum(pageno);
  50. }
  51. //重新加载分页列表
  52. function ReloadPageNum(startnum) {
  53. var ListArea = $Obj('pagelist');
  54. var pagenum = Math.ceil(totalrow / pagesize);
  55. var listsize = 3;
  56. var ahtml = "";
  57. var startloop = 1;
  58. var endnum = 0;
  59. ahtml += "共:" + totalrow + " 条记录/" + pagenum + "页";
  60. if (pageno > 1 && pageno != 1) ahtml += " <a href='#' onclick='LoadPage(1)'>首页</a> ";
  61. if (pageno > 1) ahtml += "<a href='#' onclick='LoadPage(" + (pageno - 1) + ")'>↑上页</a> ";
  62. if (startnum >= pagenum - listsize) {
  63. startloop = pagenum - (listsize * 2);
  64. if (startloop < 1) startloop = 1;
  65. for (i = startloop; i <= pagenum; i++) {
  66. if (i == pageno) ahtml += i + " ";
  67. else ahtml += "<a href='#' onclick='LoadPage(" + i + ")'>[" + i + "]</a> ";
  68. }
  69. }
  70. else if (pagenum < listsize) {
  71. for (i = 1; i <= pagenum; i++) {
  72. if (i == pageno) ahtml += i + " ";
  73. else ahtml += "<a href='#' onclick='LoadPage(" + i + ")'>[" + i + "]</a> ";
  74. }
  75. }
  76. else {
  77. startloop = startnum - listsize;
  78. if (startloop < 1) { startloop = 1; endnum = startloop + (listsize * 2); }
  79. else { endnum = startnum + listsize; }
  80. if (endnum >= pagenum) endnum = pagenum;
  81. for (i = startloop; i <= endnum; i++) {
  82. if (i == pageno) ahtml += i + " ";
  83. else ahtml += "<a href='#' onclick='LoadPage(" + i + ")'>[" + i + "]</a> ";
  84. }
  85. }
  86. if (pageno < pagenum) ahtml += "<a href='#' onclick='LoadPage(" + (pageno + 1) + ")'>下页↓</a> ";
  87. if (pageno != pagenum && pagenum > 1) ahtml += " <a href='#' onclick='LoadPage(" + pagenum + ")'>末页</a>";
  88. ListArea.innerHTML = ahtml;
  89. }
  90. </script>
  91. </head>
  92. <body background='images/allbg.gif' leftmargin='8' topmargin='8'>
  93. <div class="bodytitle">
  94. <div class="bodytitleleft"></div>
  95. <div class="bodytitletxt" style="padding-left:10px;">频道管理</div>
  96. </div>
  97. <table width="98%" border="0" cellpadding="1" cellspacing="1" align="center" class="tbtitle"
  98. style="border:1px solid #CFCFCF;border-bottom:none;">
  99. <tr>
  100. <td bgcolor="#CFCFCF" class="tbtitletxt" background="images/tbg.gif">
  101. <table width='100%' border="0" cellpadding='0' cellspacing='0'>
  102. <tr>
  103. <td width='36%' class="tbtitletxt" style="padding-left:10px;"><strong>自由列表管理</strong>&nbsp;[<a
  104. href="freelist_add.php"><u>增加列表</u></a>]</td>
  105. <td width="29%">&nbsp;</td>
  106. <td width="35%" align='right'>&nbsp;</td>
  107. </tr>
  108. </table>
  109. </td>
  110. </tr>
  111. </table>
  112. <span id='rslist'>
  113. <?php
  114. GetTagList($dsql,$pageno,$pagesize,$orderby);
  115. ?>
  116. </span>
  117. <table width="98%" border="0" cellpadding="5" cellspacing="1" align="center"
  118. style=" border:1px solid #CFCFCF;line-height:31px;margin:auto;">
  119. <tr>
  120. <td height="35" align="center" style="background:#F9FCEF;padding:7px 6px 3px 6px;">
  121. <table width="100%" border="0" cellpadding="0" cellspacing="0">
  122. <form action="freelist_main.php" name="form1" id="form1">
  123. <tr>
  124. <td width="200" align="center">
  125. <input type="text" name="keyword" id="keyword" class='alltxt' style="width:170px"
  126. value="<?php echo $keyword?>" />
  127. </td>
  128. <td width="80" align="left">
  129. <input type="submit" name="Submit2" value="搜索" class="coolbg np" />
  130. </td>
  131. <td align="left">
  132. <input type="button" name="bt1" value="增加列表" style="width:70px"
  133. onclick="location='freelist_add.php';" class="coolbg np" />
  134. &nbsp;
  135. <input type="button" name="bt2" value="更新所有列表HTML" style="width:180px"
  136. onclick="location='makehtml_freelist.php';" class="coolbg np" />
  137. </td>
  138. <td width="200">
  139. <span id='pagelist'>
  140. <script language='javascript'>ReloadPageNum(1);</script></span>
  141. </td>
  142. </tr>
  143. </form>
  144. </table>
  145. </td>
  146. </tr>
  147. </table>
  148. </body>
  149. </html>