noRefresh.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569
  1. <?
  2. set_time_limit(0);
  3. require("../config/conn.php");
  4. require("../config/function.php");
  5. AdminSes_audit();
  6. $admin=$_GET[admin];
  7. $bhid=$_GET[idbh];
  8. $tab=$_GET[tab];
  9. switch($admin){
  10. case "1": //删除帮助中心分类
  11. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  12. $nb=preg_split("/,/",$bhid);
  13. for($i=0;$i<count($nb);$i++){
  14. $a=preg_split("/xcf/",$nb[$i]); //$a[0]大类ID $a[1]小类ID
  15. if(intval($a[0])!=0){ //表示删除大类
  16. if(!is_numeric($a[0])){echo "ERR074";exit;}
  17. while0("*","yjcode_helptype where id=".$a[0]);$row=mysql_fetch_array($res);
  18. deletetable("yjcode_helptype where name1='".$row[name1]."'");
  19. }elseif(intval($a[0])==0){ //表示删除小类
  20. if(!is_numeric($a[1])){echo "ERR074";exit;}
  21. deletetable("yjcode_helptype where id=".$a[1]);
  22. }
  23. }
  24. break;
  25. case "2": //删除帮助内容
  26. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0603,")){echo "Err9";exit;}
  27. $nb=preg_split("/,/",$bhid);
  28. for($i=0;$i<count($nb);$i++){
  29. deletetable("yjcode_help where bh='".$nb[$i]."'");
  30. }
  31. break;
  32. case "3": //删除商品分组二三级分类
  33. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  34. $nb=preg_split("/,/",$bhid);
  35. for($i=0;$i<count($nb);$i++){
  36. $a=preg_split("/xcf/",$nb[$i]); //$a[0]大类ID $a[1]小类ID
  37. if(intval($a[0])!=0){ //表示删除大类
  38. if(!is_numeric($a[0])){echo "ERR074";exit;}
  39. while0("*","yjcode_type where id=".$a[0]);$row=mysql_fetch_array($res);
  40. deletetable("yjcode_type where type1='".$row[type1]."' and type2='".$row[type2]."'");
  41. }elseif(intval($a[0])==0){ //表示删除小类
  42. if(!is_numeric($a[1])){echo "ERR074";exit;}
  43. while0("*","yjcode_type where id=".$a[1]);$row=mysql_fetch_array($res);
  44. deletetable("yjcode_type where type1='".$row[type1]."' and type2='".$row[type2]."' and type3='".$row[type3]."'");
  45. }
  46. }
  47. break;
  48. case "3a": //删除商品分组四五级分类
  49. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  50. $nb=preg_split("/,/",$bhid);
  51. for($i=0;$i<count($nb);$i++){
  52. $a=preg_split("/xcf/",$nb[$i]); //$a[0]大类ID $a[1]小类ID
  53. if(intval($a[0])!=0){ //表示删除大类
  54. if(!is_numeric($a[0])){echo "ERR074";exit;}
  55. while0("*","yjcode_type where id=".$a[0]);$row=mysql_fetch_array($res);
  56. deletetable("yjcode_type where type1='".$row[type1]."' and type2='".$row[type2]."' and type3='".$row[type3]."' and type4='".$row[type4]."'");
  57. }elseif(intval($a[0])==0){ //表示删除小类
  58. if(!is_numeric($a[1])){echo "ERR074";exit;}
  59. deletetable("yjcode_type where id=".$a[1]);
  60. }
  61. }
  62. break;
  63. case "3b": //删除二三级区域
  64. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  65. $nb=preg_split("/,/",$bhid);
  66. for($i=0;$i<count($nb);$i++){
  67. $a=preg_split("/xcf/",$nb[$i]); //$a[0]大类ID $a[1]小类ID
  68. if(intval($a[0])!=0){ //表示删除大类
  69. if(!is_numeric($a[0])){echo "ERR074";exit;}
  70. while0("*","yjcode_city where id=".intval($a[0]));$row=mysql_fetch_array($res);
  71. deletetable("yjcode_city where level=3 and parentid='".$row[bh]."'");
  72. deletetable("yjcode_city where level=2 and id=".intval($a[0]));
  73. }elseif(intval($a[0])==0){ //表示删除小类
  74. if(!is_numeric($a[1])){echo "ERR074";exit;}
  75. deletetable("yjcode_city where id=".intval($a[1]));
  76. }
  77. }
  78. break;
  79. case "4": //删除商品大类
  80. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  81. $nb=preg_split("/,/",$bhid);
  82. for($i=0;$i<count($nb);$i++){
  83. deletetable("yjcode_typesx where typeid=".$nb[$i]);
  84. while0("*","yjcode_type where id=".$nb[$i]);$row=mysql_fetch_array($res);
  85. deletetable("yjcode_type where type1='".$row[type1]."'");
  86. }
  87. break;
  88. case "4a": //删除一级区域
  89. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  90. $nb=preg_split("/,/",$bhid);
  91. for($i=0;$i<count($nb);$i++){
  92. while0("*","yjcode_city where level=1 and id=".intval($nb[$i]));$row=mysql_fetch_array($res);
  93. if(panduan("*","yjcode_city where parentid='".$row[bh]."'")==1){echo "ERR1";exit;}
  94. deletetable("yjcode_city where level=1 and id=".intval($nb[$i]));
  95. }
  96. break;
  97. case "5": //删除资讯分类
  98. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  99. $nb=preg_split("/,/",$bhid);
  100. for($i=0;$i<count($nb);$i++){
  101. $a=preg_split("/xcf/",$nb[$i]); //$a[0]大类ID $a[1]小类ID
  102. if(intval($a[0])!=0){ //表示删除大类
  103. if(!is_numeric($a[0])){echo "ERR074";exit;}
  104. if(panduan("type1id,zt","yjcode_news where type1id=".$a[0]." and zt<>99")==1){echo "ERR";exit;}
  105. while0("*","yjcode_newstype where id=".$a[0]);$row=mysql_fetch_array($res);
  106. deletetable("yjcode_newstype where name1='".$row[name1]."'");
  107. }elseif(intval($a[0])==0){ //表示删除小类
  108. if(!is_numeric($a[1])){echo "ERR074";exit;}
  109. if(panduan("type2id,zt","yjcode_news where type2id=".$a[1]." and zt<>99")==1){echo "ERR";exit;}
  110. deletetable("yjcode_newstype where id=".$a[1]);
  111. }
  112. }
  113. break;
  114. case "6": //资讯审核状态
  115. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0201,")){echo "Err9";exit;}
  116. $nb=preg_split("/,/",$bhid);
  117. for($i=0;$i<count($nb);$i++){
  118. while0("bh,zt","yjcode_news where bh='".$nb[$i]."'");while($row=mysql_fetch_array($res)){
  119. if(1==$row[zt]){$nn=0;}else{$nn=1;}
  120. updatetable("yjcode_news","zt=".$nn." where bh='".$nb[$i]."'");
  121. }
  122. }
  123. break;
  124. case "7": //删除资讯
  125. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0203,")){echo "Err9";exit;}
  126. $nb=preg_split("/,/",$bhid);
  127. for($i=0;$i<count($nb);$i++){
  128. while0("bh,sj","yjcode_news where bh='".$nb[$i]."'");while($row=mysql_fetch_array($res)){
  129. delDirAndFile("../upload/news/".dateYMDN($row[sj])."/".$row[bh]."/");
  130. deletetable("yjcode_news where bh='".$row[bh]."'");
  131. deletetable("yjcode_tp where type1='资讯' and bh='".$row[bh]."'");
  132. }
  133. }
  134. break;
  135. case "8": //删除广告
  136. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0603,")){echo "Err9";exit;}
  137. $nb=preg_split("/,/",$bhid);
  138. for($i=0;$i<count($nb);$i++){
  139. while0("*","yjcode_ad where bh='".$nb[$i]."' and (type1='图片' or type1='动画')");if($row=mysql_fetch_array($res)){
  140. delFile("../ad/".$nb[$i].".".$row[jpggif]);
  141. delFile("../ad/".$nb[$i]."-99.".$row[jpggif]);
  142. }
  143. deletetable("yjcode_ad where bh='".$nb[$i]."'");
  144. }
  145. break;
  146. case "9": //删除会员
  147. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0703,")){echo "Err9";exit;}
  148. $nb=preg_split("/,/",$bhid);
  149. for($i=0;$i<count($nb);$i++){
  150. while3("id,uid","yjcode_user where id=".$nb[$i]);while($row3=mysql_fetch_array($res3)){
  151. deluid($row3[uid]);
  152. }
  153. }
  154. break;
  155. case "10": //删除提现,要非等待受理状态的
  156. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0703,")){echo "Err9";exit;}
  157. $nb=preg_split("/,/",$bhid);
  158. for($i=0;$i<count($nb);$i++){
  159. deletetable("yjcode_tixian where zt<>4 and id=".$nb[$i]);
  160. }
  161. break;
  162. case "11": //删除管理员
  163. if(!strstr($adminqx,",0,")){echo "Err9";exit;}
  164. $nb=preg_split("/,/",$bhid);
  165. for($i=0;$i<count($nb);$i++){
  166. $qx=",0,";
  167. deletetable("yjcode_admin where qx<>'".$qx."' and id=".$nb[$i]);
  168. }
  169. break;
  170. case "12": //商品审核状态
  171. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0101,")){echo "Err9";exit;}
  172. $nb=preg_split("/,/",$bhid);
  173. for($i=0;$i<count($nb);$i++){
  174. while0("bh,zt","yjcode_pro where bh='".$nb[$i]."'");while($row=mysql_fetch_array($res)){
  175. if(1==$row[zt]){$nn=0;}else{$nn=1;}
  176. updatetable("yjcode_pro","zt=".$nn." where bh='".$nb[$i]."'");
  177. }
  178. }
  179. break;
  180. case "13": //商品上下架状态
  181. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0101,")){echo "Err9";exit;}
  182. $nb=preg_split("/,/",$bhid);
  183. for($i=0;$i<count($nb);$i++){
  184. while0("bh,ifxj","yjcode_pro where bh='".$nb[$i]."'");while($row=mysql_fetch_array($res)){
  185. if(1==$row[ifxj]){$nn=0;}else{$nn=1;}
  186. updatetable("yjcode_pro","ifxj=".$nn." where bh='".$nb[$i]."'");
  187. }
  188. }
  189. break;
  190. case "14": //删除商品
  191. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0103,")){echo "Err9";exit;}
  192. $nb=preg_split("/,/",$bhid);
  193. for($i=0;$i<count($nb);$i++){
  194. while1("bh,userid","yjcode_pro where bh='".$nb[$i]."'");
  195. if($row1=mysql_fetch_array($res1)){delproduct($row1[bh],$row1[userid]);}
  196. }
  197. break;
  198. case "17": //删除订单
  199. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0403,")){echo "Err9";exit;}
  200. $nb=preg_split("/,/",$bhid);
  201. for($i=0;$i<count($nb);$i++){
  202. deletetable("yjcode_propj where orderbh='".$nb[$i]."'");
  203. deletetable("yjcode_tk where orderbh='".$nb[$i]."'");
  204. deletetable("yjcode_db where orderbh='".$nb[$i]."'");
  205. deletetable("yjcode_order where orderbh='".$nb[$i]."'");
  206. deletetable("yjcode_orderlog where orderbh='".$nb[$i]."'");
  207. }
  208. break;
  209. case "18": //删除附加选项
  210. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  211. $nb=preg_split("/,/",$bhid);
  212. for($i=0;$i<count($nb);$i++){
  213. $a=preg_split("/xcf/",$nb[$i]); //$a[0]大类ID $a[1]小类ID
  214. if(intval($a[0])!=0){ //表示删除大类
  215. if(!is_numeric($a[0])){echo "ERR074";exit;}
  216. while0("*","yjcode_typesx where id=".$a[0]);$row=mysql_fetch_array($res);
  217. deletetable("yjcode_typesx where name1='".$row[name1]."'");
  218. }elseif(intval($a[0])==0){ //表示删除小类
  219. if(!is_numeric($a[1])){echo "ERR074";exit;}
  220. deletetable("yjcode_typesx where id=".$a[1]);
  221. }
  222. }
  223. break;
  224. case "19": //删除公告
  225. $nb=preg_split("/,/",$bhid);
  226. for($i=0;$i<count($nb);$i++){
  227. deletetable("yjcode_gg where bh='".$nb[$i]."'");
  228. }
  229. break;
  230. case "20": //删除任务分组类别
  231. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  232. $nb=preg_split("/,/",$bhid);
  233. for($i=0;$i<count($nb);$i++){
  234. $a=preg_split("/xcf/",$nb[$i]); //$a[0]大类ID $a[1]小类ID
  235. if(intval($a[0])!=0){ //表示删除大类
  236. if(!is_numeric($a[0])){echo "ERR074";exit;}
  237. while0("*","yjcode_tasktype where id=".$a[0]);$row=mysql_fetch_array($res);
  238. deletetable("yjcode_tasktype where name1='".$row[name1]."'");
  239. }elseif(intval($a[0])==0){ //表示删除小类
  240. if(!is_numeric($a[1])){echo "ERR074";exit;}
  241. deletetable("yjcode_tasktype where id=".$a[1]);
  242. }
  243. }
  244. break;
  245. case "21": //删除单人任务
  246. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0603,")){echo "Err9";exit;}
  247. $nb=preg_split("/,/",$bhid);
  248. for($i=0;$i<count($nb);$i++){
  249. while0("*","yjcode_task where bh='".$nb[$i]."' and taskty=0");if($row=mysql_fetch_array($res)){
  250. if(0==$row[zt] || 1==$row[zt]){
  251. if($row[money4]>0){
  252. PointIntoM($row[userid],"删除任务,退回订金",$row[money4]);
  253. PointUpdateM($row[userid],$row[money4]);
  254. }
  255. }
  256. if(3==$row[zt] || 4==$row[zt] || 8==$row[zt]){
  257. PointIntoM($row[userid],"删除任务,退回费用",$row[money3]);
  258. PointUpdateM($row[userid],$row[money3]);
  259. }
  260. if(!empty($row[jsbao]) && (0==$row[zt] || 3==$row[zt] || 4==$row[zt] || 8==$row[zt])){
  261. while1("*","yjcode_taskhf where bh='".$row[bh]."'");if($row1=mysql_fetch_array($res1)){
  262. PointIntoB($row1[useridhf],"删除任务,退还保证金",$row[jsbao],2);
  263. PointUpdateB($row1[useridhf],$row[jsbao]);
  264. }
  265. }
  266. deletetable("yjcode_task where id=".$row[id]);
  267. deletetable("yjcode_taskhf where bh='".$row[bh]."'");
  268. deletetable("yjcode_tasklog where bh='".$row[bh]."'");
  269. }
  270. }
  271. break;
  272. case "21a": //删除多人任务
  273. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0603,")){echo "Err9";exit;}
  274. $nb=preg_split("/,/",$bhid);
  275. for($i=0;$i<count($nb);$i++){
  276. while0("*","yjcode_task where bh='".$nb[$i]."' and taskty=1");if($row=mysql_fetch_array($res)){
  277. if(101==$row[zt] || 104==$row[zt]){
  278. if($row[money3]>0){
  279. PointIntoM($row[userid],"管理员删除任务,退回费用",$row[money3]);
  280. PointUpdateM($row[userid],$row[money3]);
  281. }
  282. }
  283. if(!empty($row[jsbao])){
  284. while1("*","yjcode_taskhf where bh='".$row[bh]."' and taskty=1 and (zt=0 or zt=1 or zt=3 or zt=4)");while($row1=mysql_fetch_array($res1)){
  285. PointIntoB($row1[useridhf],"删除任务,退还保证金",$row[jsbao],2);
  286. PointUpdateB($row1[useridhf],$row[jsbao]);
  287. }
  288. }
  289. deletetable("yjcode_task where id=".$row[id]);
  290. deletetable("yjcode_taskhf where bh='".$row[bh]."'");
  291. deletetable("yjcode_tasklog where bh='".$row[bh]."'");
  292. }
  293. }
  294. break;
  295. case "23": //删除任务回复
  296. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0603,")){echo "Err9";exit;}
  297. $nb=preg_split("/,/",$bhid);
  298. for($i=0;$i<count($nb);$i++){
  299. if(!is_numeric($nb[$i])){echo "ERR074";exit;}
  300. while1("*","yjcode_taskhf where id=".$nb[$i]);if($row1=mysql_fetch_array($res1)){
  301. deletetable("yjcode_taskhf where id=".$row1[id]);
  302. deletetable("yjcode_tasklog where bh=".$row1[bh]." and useridhf=".$row1[useridhf]);
  303. }
  304. }
  305. break;
  306. case "25": //删除卡密
  307. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0103,")){echo "Err9";exit;}
  308. $nb=preg_split("/,/",$bhid);
  309. $pbh="";
  310. if(!empty($nb[0])){while0("id,probh","yjcode_kc where id=".$nb[0]);if($row=mysql_fetch_array($res)){$pbh=$row[probh];}}
  311. for($i=0;$i<count($nb);$i++){
  312. if(!is_numeric($nb[$i])){echo "ERR074";exit;}
  313. deletetable("yjcode_kc where id=".$nb[$i]);
  314. }
  315. kamikc($pbh);
  316. break;
  317. case "25t": //删除套餐卡密
  318. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0103,")){echo "Err9";exit;}
  319. $nb=preg_split("/,/",$bhid);
  320. $pbh="";
  321. if(!empty($nb[0])){while0("id,probh,tcid","yjcode_taocan_kc where id=".$nb[0]);if($row=mysql_fetch_array($res)){$pbh=$row[probh];$tcid=$row[tcid];}}
  322. for($i=0;$i<count($nb);$i++){
  323. if(!is_numeric($nb[$i])){echo "ERR074";exit;}
  324. deletetable("yjcode_taocan_kc where id=".$nb[$i]);
  325. }
  326. kamikc_tc($pbh,$tcid);
  327. break;
  328. case "26": //删除资金记录
  329. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0703,")){echo "Err9";exit;}
  330. $nb=preg_split("/,/",$bhid);
  331. for($i=0;$i<count($nb);$i++){
  332. if(!is_numeric($nb[$i])){echo "ERR074";exit;}
  333. deletetable("yjcode_moneyrecord where id=".$nb[$i]);
  334. }
  335. break;
  336. case "26a": //删除充值订单管理
  337. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0703,")){echo "Err9";exit;}
  338. $nb=preg_split("/,/",$bhid);
  339. for($i=0;$i<count($nb);$i++){
  340. if(!is_numeric($nb[$i])){echo "ERR074";exit;}
  341. deletetable("yjcode_dingdang where id=".$nb[$i]);
  342. }
  343. break;
  344. case "27": //删除商品评价
  345. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0103,")){echo "Err9";exit;}
  346. $nb=preg_split("/,/",$bhid);
  347. for($i=0;$i<count($nb);$i++){
  348. if(!is_numeric($nb[$i])){echo "ERR074";exit;}
  349. deletetable("yjcode_propj where id=".$nb[$i]);
  350. }
  351. break;
  352. case "28": //删除工单
  353. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0603,")){echo "Err9";exit;}
  354. $nb=preg_split("/,/",$bhid);
  355. for($i=0;$i<count($nb);$i++){
  356. deletetable("yjcode_gd where bh='".$nb[$i]."'");
  357. deletetable("yjcode_gdhf where gdbh='".$nb[$i]."'");
  358. }
  359. break;
  360. case "30": //删除商品图片
  361. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0103,")){echo "Err9";exit;}
  362. $nb=preg_split("/,/",$bhid);
  363. for($i=0;$i<count($nb);$i++){
  364. if(!is_numeric($nb[$i])){echo "ERR074";exit;}
  365. while1("*","yjcode_tp where id=".$nb[$i]);if($row1=mysql_fetch_array($res1)){
  366. if(!empty($row1[tp])){
  367. delFile("../".str_replace(".","-1.",$row1[tp]));
  368. delFile("../".str_replace(".","-2.",$row1[tp]));
  369. delFile("../".$row1[tp]);
  370. }
  371. deletetable("yjcode_tp where id=".$nb[$i]);
  372. }
  373. }
  374. break;
  375. case "31": //删除资讯评价
  376. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0203,")){echo "Err9";exit;}
  377. $nb=preg_split("/,/",$bhid);
  378. for($i=0;$i<count($nb);$i++){
  379. if(!is_numeric($nb[$i])){echo "ERR074";exit;}
  380. deletetable("yjcode_newspj where id=".$nb[$i]);
  381. }
  382. break;
  383. case "32": //删除自助广告体系
  384. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  385. $nb=preg_split("/,/",$bhid);
  386. for($i=0;$i<count($nb);$i++){
  387. deletetable("yjcode_adlx where bh='".$nb[$i]."'");
  388. }
  389. break;
  390. case "33": //删除套餐
  391. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0103,")){echo "Err9";exit;}
  392. $nb=preg_split("/,/",$bhid);
  393. for($i=0;$i<count($nb);$i++){
  394. $a=preg_split("/xcf/",$nb[$i]); //$a[0]大类ID $a[1]小类ID
  395. if(intval($a[0])!=0){ //表示删除大类
  396. if(!is_numeric($a[0])){echo "ERR074";exit;}
  397. while0("*","yjcode_taocan where id=".$a[0]);$row=mysql_fetch_array($res);
  398. if(panduan("*","yjcode_taocan where admin=2 and probh='".$row[probh]."' and zt<>99 and tit='".$row[tit]."'")==1){echo "+Err1";exit;}
  399. deletetable("yjcode_taocan where id=".$row[id]);
  400. deletetable("yjcode_taocan_kc where tcid=".$row[id]." and probh='".$row[probh]."'");
  401. }elseif(intval($a[0])==0){ //表示删除小类
  402. if(!is_numeric($a[1])){echo "ERR074";exit;}
  403. deletetable("yjcode_taocan where id=".$a[1]);
  404. deletetable("yjcode_taocan_kc where tcid=".$a[1]);
  405. }
  406. }
  407. break;
  408. case "33a": //删除服务套餐
  409. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0103,")){echo "Err9";exit;}
  410. $nb=preg_split("/,/",$bhid);
  411. for($i=0;$i<count($nb);$i++){
  412. $a=preg_split("/xcf/",$nb[$i]); //$a[0]大类ID $a[1]小类ID
  413. if(intval($a[0])!=0){ //表示删除大类
  414. if(!is_numeric($a[0])){echo "ERR074";exit;}
  415. while0("*","yjcode_servertaocan where id=".$a[0]);$row=mysql_fetch_array($res);
  416. if(panduan("*","yjcode_servertaocan where admin=2 and serverbh='".$row[serverbh]."' and zt<>99 and tit1='".$row[tit1]."'")==1){echo "+Err1";exit;}
  417. deletetable("yjcode_servertaocan where id=".$row[id]);
  418. }elseif(intval($a[0])==0){ //表示删除小类
  419. if(!is_numeric($a[1])){echo "ERR074";exit;}
  420. deletetable("yjcode_servertaocan where id=".$a[1]);
  421. }
  422. }
  423. break;
  424. case "34": //删除快递公司名称
  425. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  426. $nb=preg_split("/,/",$bhid);
  427. for($i=0;$i<count($nb);$i++){
  428. deletetable("yjcode_kuaidi where id=".$nb[$i]);
  429. }
  430. break;
  431. case "35": //删除人工对账记录
  432. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0703,")){echo "Err9";exit;}
  433. $nb=preg_split("/,/",$bhid);
  434. for($i=0;$i<count($nb);$i++){
  435. deletetable("yjcode_payreng where id=".$nb[$i]);
  436. }
  437. break;
  438. case "36": //删除会员等级
  439. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  440. $nb=preg_split("/,/",$bhid);
  441. for($i=0;$i<count($nb);$i++){
  442. while1("*","yjcode_userdj where bh='".$nb[$i]."'");$row1=mysql_fetch_array($res1);
  443. deletetable("yjcode_userdj where id=".$row1[id]);
  444. deletetable("yjcode_prouserdj where djname='".$row1[name1]."'");
  445. updatetable("yjcode_user","userdj='' where userdj='".$row1[name1]."'");
  446. }
  447. break;
  448. case "37": //删除登录日志
  449. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  450. $nb=preg_split("/,/",$bhid);
  451. for($i=0;$i<count($nb);$i++){
  452. deletetable("yjcode_loginlog where id=".$nb[$i]);
  453. }
  454. break;
  455. case "38": //删除充值卡密
  456. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0103,")){echo "Err9";exit;}
  457. $nb=preg_split("/,/",$bhid);
  458. for($i=0;$i<count($nb);$i++){
  459. deletetable("yjcode_paykami where id=".$nb[$i]);
  460. }
  461. break;
  462. case "39": //删除保证金记录
  463. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0703,")){echo "Err9";exit;}
  464. $nb=preg_split("/,/",$bhid);
  465. for($i=0;$i<count($nb);$i++){
  466. deletetable("yjcode_baomoneyrecord where id=".$nb[$i]." and zt<>1");
  467. }
  468. break;
  469. case "40": //变更商品视频审核状态
  470. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0101,")){echo "Err9";exit;}
  471. $nb=preg_split("/,/",$bhid);
  472. for($i=0;$i<count($nb);$i++){
  473. while0("bh,zt","yjcode_provideo where bh='".$nb[$i]."'");while($row=mysql_fetch_array($res)){
  474. if(1==$row[zt]){$nn=0;}else{$nn=1;}
  475. updatetable("yjcode_provideo","zt=".$nn." where bh='".$row[bh]."'");
  476. }
  477. }
  478. break;
  479. case "41": //删除商品视频
  480. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0103,")){echo "Err9";exit;}
  481. $nb=preg_split("/,/",$bhid);
  482. for($i=0;$i<count($nb);$i++){
  483. while1("*","yjcode_provideo where bh='".$nb[$i]."'");if($row1=mysql_fetch_array($res1)){
  484. if($row1[admin]==2){delFile($row1["url"]);}
  485. delFile("../upload/".$row1[userid]."/".$row1[probh]."/".$row1[bh].".jpg");
  486. deletetable("yjcode_provideo where id=".$row1[id]);
  487. }
  488. }
  489. break;
  490. case "42": //删除举报类型
  491. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  492. $nb=preg_split("/,/",$bhid);
  493. for($i=0;$i<count($nb);$i++){
  494. deletetable("yjcode_jubaotype where id=".intval($nb[$i]));
  495. }
  496. break;
  497. case "43": //删除举报内容
  498. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0603,")){echo "Err9";exit;}
  499. $nb=preg_split("/,/",$bhid);
  500. for($i=0;$i<count($nb);$i++){
  501. deletetable("yjcode_jubao where bh='".$nb[$i]."'");
  502. }
  503. break;
  504. case "44": //删除黑名单
  505. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0703,")){echo "Err9";exit;}
  506. $nb=preg_split("/,/",$bhid);
  507. for($i=0;$i<count($nb);$i++){
  508. deletetable("yjcode_guolv where id=".intval($nb[$i]));
  509. }
  510. break;
  511. case "45": //删除服务市场分组类别
  512. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0303,")){echo "Err9";exit;}
  513. $nb=preg_split("/,/",$bhid);
  514. for($i=0;$i<count($nb);$i++){
  515. $a=preg_split("/xcf/",$nb[$i]); //$a[0]大类ID $a[1]小类ID
  516. if(intval($a[0])!=0){ //表示删除大类
  517. if(!is_numeric($a[0])){echo "ERR074";exit;}
  518. while0("*","yjcode_servertype where id=".$a[0]);$row=mysql_fetch_array($res);
  519. deletetable("yjcode_servertype where name1='".$row[name1]."'");
  520. }elseif(intval($a[0])==0){ //表示删除小类
  521. if(!is_numeric($a[1])){echo "ERR074";exit;}
  522. deletetable("yjcode_servertype where id=".$a[1]);
  523. }
  524. }
  525. break;
  526. case "46": //服务审核状态
  527. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0101,")){echo "Err9";exit;}
  528. $nb=preg_split("/,/",$bhid);
  529. for($i=0;$i<count($nb);$i++){
  530. while0("bh,zt","yjcode_server where bh='".$nb[$i]."'");while($row=mysql_fetch_array($res)){
  531. if(1==$row[zt]){$nn=0;}else{$nn=1;}
  532. updatetable("yjcode_server","zt=".$nn." where bh='".$nb[$i]."'");
  533. }
  534. }
  535. break;
  536. case "47": //服务上下架状态
  537. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0101,")){echo "Err9";exit;}
  538. $nb=preg_split("/,/",$bhid);
  539. for($i=0;$i<count($nb);$i++){
  540. while0("bh,ifxj","yjcode_server where bh='".$nb[$i]."'");while($row=mysql_fetch_array($res)){
  541. if(1==$row[ifxj]){$nn=0;}else{$nn=1;}
  542. updatetable("yjcode_server","ifxj=".$nn." where bh='".$nb[$i]."'");
  543. }
  544. }
  545. break;
  546. case "48": //删除服务
  547. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0103,")){echo "Err9";exit;}
  548. $nb=preg_split("/,/",$bhid);
  549. for($i=0;$i<count($nb);$i++){
  550. while1("bh,userid","yjcode_server where bh='".$nb[$i]."'");if($row1=mysql_fetch_array($res1)){
  551. deletetable("yjcode_server where bh='".$nb[$i]."'");
  552. deletetable("yjcode_serverorderlog where orderbh='".$nb[$i]."'");
  553. delDirAndFile("../upload/".$row1[userid]."/".$row1[bh]."/");
  554. }
  555. }
  556. break;
  557. case "49": //删除服务订单
  558. if(!strstr($adminqx,",0,") && !strstr($adminqx,",0403,")){echo "Err9";exit;}
  559. $nb=preg_split("/,/",$bhid);
  560. for($i=0;$i<count($nb);$i++){
  561. deletetable("yjcode_serverpj where orderbh='".$nb[$i]."'");
  562. deletetable("yjcode_serverorder where orderbh='".$nb[$i]."'");
  563. deletetable("yjcode_serverorderlog where orderbh='".$nb[$i]."'");
  564. }
  565. break;
  566. }
  567. echo "True";
  568. ?>