chengkun
2025-04-18 1bb985f32f2efe0f9dd69f3cf29a1c809b1cf96d
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
<?php
/*
* $Author :PHPYUN开发团队
*
* 官网: http://www.phpyun.com
*
* 版权所有 2009-2021 宿迁鑫潮信息技术有限公司,并保留所有权利。
*
* 软件声明:未经授权前提下,不得用于商业运营、二次开发以及任何形式的再次发布。
 */
class usercert_controller extends adminCommon{
    //设置高级搜索功能
    function set_search(){
        
        $search[]  =  array("param"=>"status","name"=>'审核状态',"value"=>array("1"=>"已审核","2"=>"未审核","3"=>"未通过"));
        
        $lo_time   =  array('1'=>'今天','3'=>'最近三天','7'=>'最近七天','15'=>'最近半月','30'=>'最近一个月');
        
        $search[]  =  array("param"=>"time","name"=>'发布时间',"value"=>$lo_time);
        
        $this->yunset("search_list",$search);
    }
    /**
     * 会员-个人-个人认证审核:列表
     */
    function index_action(){
        
        $this -> set_search();
        
        $where['idcard_pic']             =  array('<>','');
        
        if($_GET['status']){
            
            $status                      =   intval($_GET['status']);
            
            if ($status == 1){
                
                $where['idcard_status']  =  1;
                
            }elseif ($status == 2){
                
                $where['idcard_status']  =  0;
                
            }elseif ($status == 3){
                
                $where['idcard_status']  =  2;
            }
            $urlarr['status']            =  $status;
        }
        if ($_GET['keyword']){
            
            $keyword                     =  trim($_GET['keyword']);
            
            $where['name']                =  array('like', $keyword);
            
            $urlarr['keyword']           =  $keyword;
        }
        if($_GET['time']){
            
            $cert_time                   =  intval($_GET['time']);
            
            if($cert_time == 1){
                
                $where['cert_time']      =     array('>=',strtotime('today'));
                
            }else{
                
                $where['cert_time']      =     array('>',strtotime('-'.$cert_time.' day'));
            }
            
            $urlarr['time']          =     $cert_time;
        }
        $urlarr            =   $_GET;
        $urlarr['page']    =    '{{page}}';
        
        $pageurl        =    Url($_GET['m'],$urlarr,'admin');
        
        //提取分页
        $pageM            =    $this  -> MODEL('page');
        $pages            =    $pageM -> pageList('resume',$where,$pageurl,$_GET['page']);
        
        //分页数大于0的情况下 执行列表查询
        if($pages['total'] > 0){
            //limit order 只有在列表查询时才需要
            if($_GET['order']){
                
                $where['orderby']        =    $_GET['t'].','.$_GET['order'];
                $urlarr['order']        =    $_GET['order'];
                $urlarr['t']            =    $_GET['t'];
            }else{
                $where['orderby']        =    array('idcard_status,ASC','cert_time,DESC');
            }
            $where['limit']                =    $pages['limit'];
            
            $resumeM  =  $this->MODEL('resume');
            
            $List     =  $resumeM -> getResumeList($where,array('utype'=>'admin'));
            
            
            $this -> yunset('rows',$List);
        }
        
        $this->yuntpl(array('admin/admin_user_cert'));
    }
    /**
     * 会员-个人-个人认证审核: 审核
     */
    function status_action(){
        
        $resumeM  =  $this -> MODEL('resume');
        
        $post  =  array(
            'idcard_status'  =>  intval($_POST['status']),
            'statusbody'     =>  trim($_POST['statusbody'])
        );
        
        $return  =  $resumeM -> statusCert($_POST['uid'],array('post'=>$post));
        
        if($_POST['type']==1){
            echo json_encode($return);die;
        }else{
            $this -> ACT_layer_msg($return['msg'],$return['errcode'],$_SERVER['HTTP_REFERER'],2,$return['layertype']);
        }
    }
    /**
     * 会员-个人-个人认证审核: 查询审核原因
     */
    function sbody_action(){
        $resumeM  =  $this -> MODEL('resume');
        
        $resume   =  $resumeM -> getResumeInfo(array('uid'=>intval($_POST['uid'])),array('field'=>'statusbody'));
        
        echo trim($resume['statusbody']);die;
    }
    /**
     * 会员-个人-个人认证审核: 删除个人认证
     */
    function del_action(){
        
        if ($_GET['del']){
            
            $this -> check_token();
            
            $uid   =  intval($_GET['del']);
            
        }elseif ($_POST['del']){
            
            $uid   =  $_POST['del'];
        }
        
        $resumeM  =  $this -> MODEL('resume');
        
        $return   =  $resumeM -> delResumeCert($uid);
        
        $this -> layer_msg($return['msg'],$return['errcode'],$return['layertype'],$_SERVER['HTTP_REFERER']);
    }
    /**
     * 会员-个人-个人认证审核: 数据统计查询
     */
    function idCardNum_action(){
        
        $MsgNum   =  $this -> MODEL('msgNum');
        
        echo $MsgNum -> idCardNum();
    }
}
 
?>