ListPageInfoClass.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../class/connect.php");
  4. require("../class/db_sql.php");
  5. require("../class/functions.php");
  6. require LoadLang("pub/fun.php");
  7. require("../data/dbcache/class.php");
  8. $link=db_connect();
  9. $empire=new mysqlquery();
  10. //验证用户
  11. $lur=is_login();
  12. $logininid=$lur['userid'];
  13. $loginin=$lur['username'];
  14. $loginrnd=$lur['rnd'];
  15. $loginlevel=$lur['groupid'];
  16. $loginadminstyleid=$lur['adminstyleid'];
  17. //ehash
  18. $ecms_hashur=hReturnEcmsHashStrAll();
  19. //验证权限
  20. CheckLevel($logininid,$loginin,$classid,"cj");
  21. $page=(int)$_GET['page'];
  22. $page=RepPIntvar($page);
  23. $start=0;
  24. $line=25;//每页显示条数
  25. $page_line=12;//每页显示链接数
  26. $offset=$page*$line;//总偏移量
  27. $add="";
  28. $search="";
  29. $search.=$ecms_hashur['ehref'];
  30. //搜索
  31. if($_GET['sear'])
  32. {
  33. $search.="&sear=1";
  34. //关键字
  35. $keyboard=RepPostVar2($_GET['keyboard']);
  36. if($keyboard)
  37. {
  38. $show=RepPostStr($_GET['show'],1);
  39. if($show==1)
  40. {
  41. $add=" where (classname like '%$keyboard%')";
  42. }
  43. elseif($show==2)
  44. {
  45. $add=" where (bz like '%$keyboard%')";
  46. }
  47. elseif($show==3)
  48. {
  49. $add=" where (infourl like '%$keyboard%')";
  50. }
  51. else
  52. {
  53. $add=" where (classname like '%$keyboard%' or bz like '%$keyboard%' or infourl like '%$keyboard%')";
  54. }
  55. $search.="&keyboard=$keyboard&show=$show";
  56. }
  57. }
  58. $totalquery="select count(*) as total from {$dbtbpre}enewsinfoclass".$add;
  59. $query="select * from {$dbtbpre}enewsinfoclass".$add;
  60. $num=$empire->gettotal($totalquery);//取得总条数
  61. $query=$query." order by classid desc limit $offset,$line";
  62. $sql=$empire->query($query);
  63. $returnpage=page2($num,$line,$page_line,$start,$page,$search);
  64. ?>
  65. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  66. <html>
  67. <head>
  68. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  69. <link href="adminstyle/<?=$loginadminstyleid?>/adminstyle.css" rel="stylesheet" type="text/css">
  70. <title>管理节点</title>
  71. <script>
  72. function CheckAll(form)
  73. {
  74. for (var i=0;i<form.elements.length;i++)
  75. {
  76. var e = form.elements[i];
  77. if (e.name != 'chkall')
  78. e.checked = form.chkall.checked;
  79. }
  80. }
  81. </script>
  82. </head>
  83. <body>
  84. <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
  85. <tr>
  86. <td width="50%">位置:采集 &gt; <a href="ListPageInfoClass.php<?=$ecms_hashur['whehref']?>">管理节点</a></td>
  87. <td><div align="right"> </div></td>
  88. </tr>
  89. </table>
  90. <table width="100%" border="0" cellspacing="1" cellpadding="3">
  91. <form name="searchinfoclass" method="GET" action="ListPageInfoClass.php">
  92. <?=$ecms_hashur['eform']?>
  93. <tr>
  94. <td width="50%" class="emenubutton"><input type="button" name="Submit52" value="增加节点" onclick="self.location.href='AddInfoC.php?from=1<?=$ecms_hashur['ehref']?>';">
  95. &nbsp;&nbsp;
  96. <input type="button" name="Submit52" value="导入采集规则" onclick="self.location.href='cj/LoadInCj.php?from=1<?=$ecms_hashur['ehref']?>';">
  97. &nbsp;&nbsp;
  98. <input type="button" name="Submit6" value="数据更新中心" onclick="window.open('ReHtml/ChangeData.php<?=$ecms_hashur['whehref']?>#ReIfInfoHtml');">
  99. </td>
  100. <td width="50%" height="32">
  101. <div align="right">搜索:
  102. <input name="keyboard" type="text" id="keyboard" value="<?=$keyboard?>">
  103. <select name="show" id="show">
  104. <option value="0"<?=$show==0?' selected':''?>>不限</option>
  105. <option value="1"<?=$show==1?' selected':''?>>节点名称</option>
  106. <option value="2"<?=$show==2?' selected':''?>>备注</option>
  107. <option value="3"<?=$show==3?' selected':''?>>采集页面地址</option>
  108. </select>
  109. <input type="submit" name="Submit8" value="搜索">
  110. <input name="sear" type="hidden" id="sear" value="1">
  111. </div></td>
  112. </tr>
  113. </form>
  114. </table>
  115. <form name=form1 method=get action="DoCj.php" onsubmit="return confirm('确认要采集?');" target=_blank>
  116. <table width="100%" border="0" cellpadding="3" cellspacing="1" class="tableborder">
  117. <?=$ecms_hashur['form']?>
  118. <input type=hidden name=enews value=DoCj>
  119. <input type=hidden name=from value=1>
  120. <tr class="header">
  121. <td width="3%"><div align="center"></div></td>
  122. <td width="8%" height="25"> <div align="center">采集</div></td>
  123. <td width="27%" height="25"> <div align="center">节点(点击访问采集页)</div></td>
  124. <td width="6%" height="25"> <div align="center">预览</div></td>
  125. <td width="16%" height="25"> <div align="center">绑定栏目</div></td>
  126. <td width="9%" height="25"> <div align="center">审核采集</div></td>
  127. <td width="24%" height="25"> <div align="center">操作</div></td>
  128. </tr>
  129. <?php
  130. while($r=$empire->fetch($sql))
  131. {
  132. //采集页面
  133. $pager=explode("\r\n",$r[infourl]);
  134. $infourl=$pager[0];
  135. if($r[newsclassid])
  136. {
  137. $lastcjtime=!$r['lasttime']?'从未采集':date("Y-m-d H:i:s",$r['lasttime']);
  138. $cj="<a href='DoCj.php?enews=CjUrl&classid[]=".$r[classid]."&from=1".$ecms_hashur['href']."' title='最后采集时间:".$lastcjtime."' target=_blank><u>".$fun_r['StartCj']."</u></a>";
  139. $emptydb="&nbsp;[<a href='ListInfoClass.php?enews=EmptyCj&classid=$r[classid]&from=1".$ecms_hashur['href']."' onclick=\"return confirm('".$fun_r['CheckEmptyCjRecord']."');\">".$fun_r['EmptyCjRecord']."</a>]";
  140. $loadoutcj="&nbsp;[<a href=ecmscj.php?enews=LoadOutCj&classid=$r[classid]&from=1".$ecms_hashur['href']." onclick=\"return confirm('确认要导出?');\">导出</a>]";
  141. $checkbox="<input type=checkbox name=classid[] value='$r[classid]' onClick=\"if(this.checked){c".$r[classid].".style.backgroundColor='#DBEAF5';}else{c".$r[classid].".style.backgroundColor='#ffffff';}\">";
  142. }
  143. else
  144. {
  145. $cj=$fun_r['StartCj'];
  146. $emptydb="";
  147. $checkbox="";
  148. }
  149. //栏目链接
  150. $getcurlr['classid']=$r[newsclassid];
  151. $classurl=sys_ReturnBqClassname($getcurlr,9);
  152. ?>
  153. <tr bgcolor="#FFFFFF" id="c<?=$r[classid]?>" onmouseout="this.style.backgroundColor='#ffffff'" onmouseover="this.style.backgroundColor='#C3EFFF'">
  154. <td> <div align="center">
  155. <?=$checkbox?>
  156. </div></td>
  157. <td height="25"> <div align="center">
  158. <?=$cj?>
  159. </div></td>
  160. <td height="25"> <div align="center"><a href='<?=$infourl?>' target=_blank>
  161. <?=$r[classname]?>
  162. </a></div></td>
  163. <td height="25"> <div align="center"><a href='ecmscj.php?enews=ViewCjList&classid=<?=$r[classid]?>&from=1<?=$ecms_hashur['href']?>' target=_blank>
  164. <?=$fun_r['view']?>
  165. </a></div></td>
  166. <td height="25"> <div align="center"><a href='<?=$classurl?>' target=_blank>
  167. <?=$class_r[$r[newsclassid]][classname]?>
  168. </a></div></td>
  169. <td height="25"> <div align="center"><a href='CheckCj.php?classid=<?=$r[classid]?>&from=1<?=$ecms_hashur['ehref']?>'>
  170. <?=$fun_r['CheckCj']?>
  171. </a></div></td>
  172. <td height="25"> <div align="center">
  173. <?="[<a href=AddInfoClass.php?enews=AddInfoClass&docopy=1&classid=".$r[classid]."&newsclassid=".$r[newsclassid]."&from=1".$ecms_hashur['ehref'].">".$fun_r['Copy']."</a>]&nbsp;[<a href=AddInfoClass.php?enews=EditInfoClass&classid=".$r[classid]."&from=1".$ecms_hashur['ehref'].">".$fun_r['edit']."</a>]&nbsp;[<a href=ListInfoClass.php?enews=DelInfoClass&classid=".$r[classid]."&from=1".$ecms_hashur['href']." onclick=\"return confirm('".$fun_r['CheckDelCj']."');\">".$fun_r['del']."</a>]".$emptydb.$loadoutcj;?>
  174. </div></td>
  175. </tr>
  176. <?php
  177. }
  178. ?>
  179. <tr bgcolor="#FFFFFF">
  180. <td> <div align="center">
  181. <input type=checkbox name=chkall value=on onClick="CheckAll(this.form)">
  182. </div></td>
  183. <td height="25" colspan="6"> <input type="submit" name="Submit" value="批量采集节点"></td>
  184. </tr>
  185. <tr bgcolor="#FFFFFF">
  186. <td>&nbsp;</td>
  187. <td height="25" colspan="6">
  188. <?=$returnpage?>
  189. </td>
  190. </tr>
  191. <tr bgcolor="#FFFFFF">
  192. <td>&nbsp;</td>
  193. <td height="25" colspan="6"><font color="#666666">备注:弹出采集窗口,请按住&quot;Shift&quot;+点击”开始采集&quot;</font></td>
  194. </tr>
  195. </table>
  196. </form>
  197. </body>
  198. </html>
  199. <?
  200. db_close();
  201. $empire=null;
  202. ?>