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