ecmsinfo.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  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("../class/delpath.php");
  8. require("../class/copypath.php");
  9. require("../class/t_functions.php");
  10. require("../data/dbcache/class.php");
  11. require("../data/dbcache/MemberLevel.php");
  12. $link=db_connect();
  13. $empire=new mysqlquery();
  14. $enews=$_POST['enews'];
  15. if(empty($enews))
  16. {
  17. $enews=$_GET['enews'];
  18. }
  19. //验证用户
  20. $lur=is_login();
  21. $logininid=$lur['userid'];
  22. $loginin=$lur['username'];
  23. $loginrnd=$lur['rnd'];
  24. $loginlevel=$lur['groupid'];
  25. $loginadminstyleid=$lur['adminstyleid'];
  26. //spurl
  27. if($enews=='AddNews'||$enews=='EditNews'||$enews=='EditInfoSimple'||$enews=='AddInfoToReHtml'||$enews=='DoInfoAndSendNotice'||$enews=='CheckNews_all'||$enews=='NoCheckNews_all')
  28. {
  29. hSetSpFromUrl();
  30. }
  31. hCheckEcmsRHash();
  32. @set_time_limit(0);
  33. $incftp=0;
  34. if($public_r['phpmode'])
  35. {
  36. include("../class/ftp.php");
  37. $incftp=1;
  38. }
  39. //防采集
  40. if($public_r['opennotcj'])
  41. {
  42. @include("../data/dbcache/notcj.php");
  43. }
  44. //会员
  45. require("../member/class/user.php");
  46. require("../class/hinfofun.php");
  47. if($enews=="AddNews")//增加信息
  48. {
  49. $navtheid=(int)$_POST['filepass'];
  50. AddNews($_POST,$logininid,$loginin);
  51. }
  52. elseif($enews=="EditNews")//修改信息
  53. {
  54. $navtheid=(int)$_POST['id'];
  55. EditNews($_POST,$logininid,$loginin);
  56. }
  57. elseif($enews=="EditInfoSimple")//修改信息(快速)
  58. {
  59. $navtheid=(int)$_POST['id'];
  60. EditInfoSimple($_POST,$logininid,$loginin);
  61. }
  62. elseif($enews=="DelNews")//删除信息
  63. {
  64. $id=$_GET['id'];
  65. $classid=$_GET['classid'];
  66. $bclassid=$_GET['bclassid'];
  67. DelNews($id,$classid,$logininid,$loginin);
  68. }
  69. elseif($enews=="DelNews_all")//批量删除信息
  70. {
  71. $id=$_POST['id'];
  72. $classid=$_POST['classid'];
  73. $bclassid=$_POST['bclassid'];
  74. $ecms=$_POST['ecmscheck']?2:0;
  75. DelNews_all($id,$classid,$logininid,$loginin,$ecms);
  76. }
  77. elseif($enews=="EditMoreInfoTime")//批量修改信息时间
  78. {
  79. EditMoreInfoTime($_POST,$logininid,$loginin);
  80. }
  81. elseif($enews=="DelInfoDoc_all")//删除归档
  82. {
  83. $id=$_POST['id'];
  84. $classid=$_POST['classid'];
  85. $bclassid=$_POST['bclassid'];
  86. DelNews_all($id,$classid,$logininid,$loginin,1);
  87. }
  88. elseif($enews=='AddInfoToReHtml')//刷新页面
  89. {
  90. AddInfoToReHtml($_GET['classid'],$_GET['dore']);
  91. }
  92. elseif($enews=="TopNews_all")//信息置顶
  93. {
  94. $bclassid=$_POST['bclassid'];
  95. $classid=$_POST['classid'];
  96. $id=$_POST['id'];
  97. $istop=$_POST['istop'];
  98. TopNews_all($classid,$id,$istop,$logininid,$loginin);
  99. }
  100. elseif($enews=="CheckNews_all")//审核信息
  101. {
  102. $bclassid=$_POST['bclassid'];
  103. $classid=$_POST['classid'];
  104. $id=$_POST['id'];
  105. CheckNews_all($classid,$id,$logininid,$loginin);
  106. }
  107. elseif($enews=="NoCheckNews_all")//取消审核信息
  108. {
  109. $bclassid=$_POST['bclassid'];
  110. $classid=$_POST['classid'];
  111. $id=$_POST['id'];
  112. NoCheckNews_all($classid,$id,$logininid,$loginin);
  113. }
  114. elseif($enews=="MoveNews_all")//移动信息
  115. {
  116. $bclassid=$_POST['bclassid'];
  117. $classid=$_POST['classid'];
  118. $id=$_POST['id'];
  119. $to_classid=$_POST['to_classid'];
  120. MoveNews_all($classid,$id,$to_classid,$logininid,$loginin);
  121. }
  122. elseif($enews=="CopyNews_all")//复制信息
  123. {
  124. $bclassid=$_POST['bclassid'];
  125. $classid=$_POST['classid'];
  126. $id=$_POST['id'];
  127. $to_classid=$_POST['to_classid'];
  128. CopyNews_all($classid,$id,$to_classid,$logininid,$loginin);
  129. }
  130. elseif($enews=="MoveClassNews")//批量移动信息
  131. {
  132. $add=$_POST['add'];
  133. MoveClassNews($add,$logininid,$loginin);
  134. }
  135. elseif($enews=="GoodInfo_all")//批量推荐/头条信息
  136. {
  137. $classid=$_POST['classid'];
  138. $id=$_POST['id'];
  139. $doing=$_POST['doing'];
  140. $isgood=empty($doing)?$_POST['isgood']:$_POST['firsttitle'];
  141. GoodInfo_all($classid,$id,$isgood,$doing,$logininid,$loginin);
  142. }
  143. elseif($enews=="SetAllCheckInfo")//本栏目信息全部审核
  144. {
  145. $classid=$_GET['classid'];
  146. $bclassid=$_GET['bclassid'];
  147. SetAllCheckInfo($bclassid,$classid,$logininid,$loginin);
  148. }
  149. elseif($enews=="DoWfInfo")//签发信息
  150. {
  151. DoWfInfo($_POST,$logininid,$loginin);
  152. }
  153. elseif($enews=="DelInfoData")//删除信息页面
  154. {
  155. $start=$_GET['start'];
  156. $classid=$_GET['classid'];
  157. $from=$_GET['from'];
  158. $retype=$_GET['retype'];
  159. $startday=$_GET['startday'];
  160. $endday=$_GET['endday'];
  161. $startid=$_GET['startid'];
  162. $endid=$_GET['endid'];
  163. $tbname=$_GET['tbname'];
  164. DelInfoData($start,$classid,$from,$retype,$startday,$endday,$startid,$endid,$tbname,$_GET,$logininid,$loginin);
  165. }
  166. elseif($enews=="InfoToDoc")//归档信息
  167. {
  168. if($_GET['ecmsdoc']==1)//栏目
  169. {
  170. InfoToDoc_class($_GET,$logininid,$loginin);
  171. }
  172. elseif($_GET['ecmsdoc']==2)//条件
  173. {
  174. InfoToDoc($_GET,$logininid,$loginin);
  175. }
  176. else//信息
  177. {
  178. InfoToDoc_info($_POST,$logininid,$loginin);
  179. }
  180. }
  181. elseif($enews=="DoInfoAndSendNotice")//处理信息并通知
  182. {
  183. $doing=(int)$_POST['doing'];
  184. $adddatar=$_POST;
  185. if($doing==1)//删除
  186. {
  187. $enews='DelNews';
  188. DelNews($adddatar['id'],$adddatar['classid'],$logininid,$loginin);
  189. }
  190. elseif($doing==2)//审核通过
  191. {
  192. $enews='CheckNews_all';
  193. $doid[0]=$adddatar['id'];
  194. CheckNews_all($adddatar['classid'],$doid,$logininid,$loginin);
  195. }
  196. elseif($doing==3)//取消审核
  197. {
  198. $enews='NoCheckNews_all';
  199. $doid[0]=$adddatar['id'];
  200. NoCheckNews_all($adddatar['classid'],$doid,$logininid,$loginin);
  201. }
  202. elseif($doing==4)//转移
  203. {
  204. $enews='MoveNews_all';
  205. $doid[0]=$adddatar['id'];
  206. MoveNews_all($adddatar['classid'],$doid,$adddatar['to_classid'],$logininid,$loginin);
  207. }
  208. }
  209. else
  210. {
  211. printerror("ErrorUrl","history.go(-1)");
  212. }
  213. db_close();
  214. $empire=null;
  215. ?>