SearchLoadData.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. define('EmpireCMSAdmin','1');
  3. require("../../class/connect.php");
  4. require("../../class/db_sql.php");
  5. require("../../class/functions.php");
  6. $link=db_connect();
  7. $empire=new mysqlquery();
  8. $editor=1;
  9. //验证用户
  10. $lur=is_login();
  11. $logininid=$lur['userid'];
  12. $loginin=$lur['username'];
  13. $loginrnd=$lur['rnd'];
  14. $loginlevel=$lur['groupid'];
  15. $loginadminstyleid=$lur['adminstyleid'];
  16. //ehash
  17. $ecms_hashur=hReturnEcmsHashStrAll();
  18. //验证权限
  19. CheckLevel($logininid,$loginin,$classid,"searchall");
  20. $lid=$_GET['lid'];
  21. $count=count($lid);
  22. if(!$count)
  23. {
  24. echo"<script>alert('请至少选择一个数据源');window.close();</script>";
  25. exit();
  26. }
  27. $url="LoadSearchAll.php?".$ecms_hashur['href']."&enews=LoadSearchAll&lid=";
  28. echo"<link href='../adminstyle/".$loginadminstyleid."/adminstyle.css' rel='stylesheet' type='text/css'><center>导入全站搜索表的数据源总个数为:<font color=red>$count</font>个</center><br>";
  29. for($i=0;$i<$count;$i++)
  30. {
  31. $id=intval($lid[$i]);
  32. $lr=$empire->fetch1("select tbname from {$dbtbpre}enewssearchall_load where lid='$id'");
  33. if(empty($lr[tbname]))
  34. {
  35. continue;
  36. }
  37. $trueurl=$url.$id;
  38. echo"<table width='100%' border=0 align=center cellpadding=3 cellspacing=1 class=tableborder><tr class=header><td>导入数据表:".$lr[tbname]."</td></tr><tr><td bgcolor='#ffffff'><iframe frameborder=0 height=35 id='lid".$id."' scrolling=no src=\"".$trueurl."\" width=\"100%\"></iframe></td></tr></table>";
  39. }
  40. db_close();
  41. $empire=null;
  42. ?>