ecmscj.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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. $enews=$_POST['enews'];
  11. if(empty($enews))
  12. {
  13. $enews=$_GET['enews'];
  14. }
  15. //验证用户
  16. $lur=is_login();
  17. $logininid=$lur['userid'];
  18. $loginin=$lur['username'];
  19. $loginrnd=$lur['rnd'];
  20. $loginlevel=$lur['groupid'];
  21. $loginadminstyleid=$lur['adminstyleid'];
  22. //spurl
  23. if($enews=='EditCjNews')
  24. {
  25. hSetSpFromUrl();
  26. }
  27. hCheckEcmsRHash();
  28. @set_time_limit(0);
  29. require("../class/cjfun.php");
  30. if($enews=="CjUrl")//开始采集
  31. {
  32. $classid=$_GET[classid];
  33. $start=$_GET['start'];
  34. $checkrnd=$_GET['checkrnd'];
  35. CJUrl($classid,$start,$checkrnd,$logininid,$loginin);
  36. }
  37. elseif($enews=="ViewCjList")//采集列表
  38. {
  39. $classid=$_GET[classid];
  40. ViewCjList($classid,$logininid,$loginin);
  41. }
  42. elseif($enews=="ViewCjUrl")//输出预览内容地址
  43. {
  44. $classid=$_GET[classid];
  45. $listpage=$_GET[listpage];
  46. ViewCjUrl($classid,$listpage,$logininid,$loginin);
  47. }
  48. elseif($enews=="GetNewsInfo")//开始采集页面
  49. {
  50. $classid=$_GET[classid];
  51. $checkrnd=$_GET[checkrnd];
  52. $start=$_GET[start];
  53. GetNewsInfo($classid,$checkrnd,$start,$logininid,$loginin);
  54. }
  55. elseif($enews=="ViewGetNewsInfo")//输入预览内容文件
  56. {
  57. $classid=$_GET[classid];
  58. $newspage=$_GET['newspage'];
  59. ViewGetNewsInfo($classid,$newspage,$logininid,$loginin);
  60. }
  61. elseif($enews=="CjNewsIn_all")//采集全部入库
  62. {
  63. $classid=$_GET['classid'];
  64. $checked=$_GET['checked'];
  65. $start=$_GET['start'];
  66. $uptime=$_GET['uptime'];
  67. CjNewsIn_all($classid,$checked,$uptime,$start,$logininid,$loginin);
  68. }
  69. elseif($enews=="CjNewsIn")//采集入库
  70. {
  71. $classid=$_POST[classid];
  72. $id=$_POST[id];
  73. $checked=$_POST[checked];
  74. $uptime=$_POST['uptime'];
  75. CjNewsIn($classid,$id,$checked,$uptime,$logininid,$loginin);
  76. }
  77. elseif($enews=="EditCjNews")//修改采集信息
  78. {
  79. $newstext=$_POST[newstext];
  80. EditCjNews($_POST,$newstext,$logininid,$loginin);
  81. }
  82. elseif($enews=="DelCjNews")//删除采集信息
  83. {
  84. $classid=$_GET[classid];
  85. $id=$_GET[id];
  86. DelCjNews($classid,$id,$logininid,$loginin);
  87. }
  88. elseif($enews=="DelCjNews_all")//批量删除采集信息
  89. {
  90. $classid=$_POST[classid];
  91. $id=$_POST[id];
  92. DelCjNews_all($classid,$id,$logininid,$loginin);
  93. }
  94. elseif($enews=="LoadOutCj")//导出采集规则
  95. {
  96. LoadOutCj($_GET['classid'],$logininid,$loginin);
  97. }
  98. elseif($enews=="LoadInCj")//导入采集规则
  99. {
  100. $file=$_FILES['file']['tmp_name'];
  101. $file_name=$_FILES['file']['name'];
  102. $file_type=$_FILES['file']['type'];
  103. $file_size=$_FILES['file']['size'];
  104. LoadInCj($_POST,$file,$file_name,$file_type,$file_size,$logininid,$loginin);
  105. }
  106. else
  107. {
  108. printerror("ErrorUrl","history.go(-1)");
  109. }
  110. db_close();
  111. $empire=null;
  112. ?>