chengkun
2025-05-26 8f3df543230cd4403368b39b9bbe5726d11a0284
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?php
 
class admin_concheck_log_controller extends adminCommon{  
 
    function set_search(){
        
        include(CONFIG_PATH."db.data.php");
 
        $search_list[]    =    array("param"=>"result","name"=>'检测结果',"value"=>array("1"=>"合规","2"=>"不合规"));
 
        $search_list[]    =    array("param"=>"status","name"=>'处理状态',"value"=>array("0"=>"待处理","1"=>"已处理","2"=>'无需处理'));
        
        $ports            =    array();
        foreach ($arr_data['source'] as $key => $value) {
            if(in_array($key,array(1,2,3,13,19,22))){
                $ports[$key] = $value;
            }
        }
        
        
        $search_list[]    =    array("param"=>"source","name"=>'内容来源',"value" => $ports);
        
        $this->yunset(array('search_list' => $search_list, 'ports' => $ports));
        
    }
 
    function index_action(){
 
        $this->set_search();
 
        $concheckM = $this->MODEL('concheck');
        $where = array();
        $noUsername = true;
        if($_GET['keyword']){
            
            $keyword    =    trim($_GET['keyword']);
            
            $type        =    intval($_GET['type']);
            
            if ($type=='1'){
                
                $userInfoM  =  $this->MODEL('userinfo');
                $member  =  $userInfoM->getList(array('username'=>array('like',$keyword)),array('field'=>'`uid`'));
                if (!empty($member)){
                    
                    $muids  =  array();
                    foreach ($member as $v){
                        
                        $muids[] = $v['uid'];
                    }
                    
                    $where['uid']  =  array('in',pylode(',', $muids));
                    
                }else{
                    $noUsername = false;
                }
            }elseif($type=='2'){
                
                $where['content']    =    array('like',$keyword);
            }
            $urlarr['type']            =    "".$type."";
            
            $urlarr['keyword']        =    "".$keyword."";
        }
        if(($_GET['date'])){
            
            $times=@explode('~',$_GET['date']);
            
            $where['ctime']    =    array('>=',strtotime($times[0]." 00:00:00")*1000);
            
            $where['ctime']    =    array('<',strtotime($times[1]." 23:59:59")*1000);
            
            $urlarr['date']        =    $_GET['date'];
        }
        if(isset($_GET['status'])){
 
            $where['status']    =    $_GET['status'];
            $urlarr['status']    =    $_GET['status'];
        }
        if($_GET['result']){
            if($_GET['result']=='1'){
                $where['result']    =    1;
            }else{
                $where['result']    =    array('<>',1);
            }
            
            $urlarr['result']    =    $_GET['result'];
        }
        if($_GET['source']){
 
            $where['source']    =    $_GET['source'];
            $urlarr['source']    =    $_GET['source'];
        }
        if($_GET['history']){
            $coninfo = $concheckM->getInfo(array('id'=>$_GET['history']));
 
            $where['ctype']    =    $coninfo['ctype'];
            $where['cid']    =    $coninfo['cid'];
        }
        $urlarr            =   $_GET;
        $urlarr['page']    =    "{{page}}";
        
        $pageurl        =    Url($_GET['m'],$urlarr,'admin');
        
        $pageM            =    $this  -> MODEL('page');
        
        $pages            =    $pageM -> pageList('concheck_log',$where,$pageurl,$_GET['page']);
        
        //分页数大于0的情况下 执行列表查询
        if($pages['total'] > 0){
            
            if($_GET['order'])
            {
                $where['orderby']    =    $_GET['t'].','.$_GET['order'];
                
                $urlarr['order']    =    $_GET['order'];
                
                $urlarr['t']        =    $_GET['t'];
            }else{
                
                $where['orderby']    =    'id';
            }
            
            $where['limit']    =    $pages['limit'];
            
            $logList        =    $concheckM -> getLogList($where);
            
            
        }
        
        $this->yunset('rows',$logList);
        
        
        $this->yuntpl(array('admin/admin_concheck_log'));
    }
    function del_action(){
        
        $concheckM    =    $this -> Model('concheck');
        
        $id        =    is_array($_POST['del']) ? $_POST['del'] : $_GET['id'];
        
        $return    =    $concheckM -> delConCheck($id);
        
        $this->layer_msg($return['msg'],$return['errcode'],$return['layertype'],$_SERVER['HTTP_REFERER']);
        
    }
    function lockinfo_action(){
 
        $concheckM  =   $this -> MODEL('concheck');
 
        $info  =   $concheckM ->    getInfo(array('id' => intval($_POST['id'])), array('field'=>'`statusbody`'));
 
        echo $info['statusbody'];die;
 
    }
    function status_action()
    {
        $concheckM  =   $this -> MODEL('concheck');
 
        $statusData = array(
 
            'status'        =>  intval($_POST['status']),
            'statusbody'    =>  trim($_POST['statusbody'])
        );
 
        $return = $concheckM -> statusConCheck($_POST['pid'], $statusData);
 
        $this->ACT_layer_msg($return['msg'], $return['errcode'], "index.php?m=admin_concheck_log", 2, 1);
    }
}
 
?>