sitemaster.inc.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: sitemaster.inc.php 29265 2012-03-31 06:03:26Z yexinhao $
  7. */
  8. if (!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. if ($_G['adminid'] <= 0) {
  12. exit('Access Denied');
  13. }
  14. if ($_POST['formhash'] != formhash()) {
  15. exit('Access Denied');
  16. }
  17. $securityService = Cloud::loadClass('Service_Security');
  18. $securityClient = Cloud::loadClass('Service_Client_Security');
  19. $typeArray = array('1' => 'post', '2' => 'member');
  20. $operateType = 'member';
  21. $operateData = $securityService->getOperateData($operateType);
  22. if (count($operateData) == 0) {
  23. $operateType = 'post';
  24. $operateData = $securityService->getOperateData($operateType);
  25. }
  26. if (count($operateData) == 0 || !is_array($operateData)) {
  27. exit;
  28. }
  29. $operateThreadData = array();
  30. $operatePostData = array();
  31. if ($operateType == 'post') {
  32. foreach ($operateData as $tempData) {
  33. if ($tempData['operateType'] == 'thread') {
  34. $operateThreadData[] = $tempData;
  35. } else {
  36. $operatePostData[] = $tempData;
  37. }
  38. }
  39. if (count($operateThreadData)) {
  40. $res = $securityClient->securityReportOperation('thread', $operateThreadData);
  41. } elseif(count($operatePostData)) {
  42. $res = $securityClient->securityReportOperation('post', $operatePostData);
  43. }
  44. } elseif(count($operateData)) {
  45. $res = $securityClient->securityReportOperation($operateType, $operateData);
  46. }
  47. $securityService->markasreported($operateType, $operateData);