chengkun
2025-05-22 1a8aea45ebb1582c9f65d9e8dcd520002f83ae12
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<?php
 
 
class admin_msg_controller extends adminCommon
{
 
    /**
     * 高级搜索参数选项
     */
    function set_search(){
 
 
         $search[]   =   array('param' => 'status','name'=>'审核状态', 'value' =>  array('0'=>'未审核','1'=>'已审核','2'=>'未通过'));
 
        $search[]   =   array('param'=>'job','name'=>'职位类型','value'=>array('1'=>'普通','2'=>'高级','3'=>'猎头'));
        
        $lo_time    =   array('1'=>'今天','3'=>'最近三天','7'=>'最近七天','15'=>'最近半月','30'=>'最近一个月');
        
        $search[]   =   array('param'=>'zx','name'=>'咨询时间','value'=>$lo_time);
        
        $f_time     =   array('1'=>'今天','3'=>'最近三天','7'=>'最近七天','15'=>'最近半月','30'=>'最近一个月');
        
        $search[]   =   array('param'=>'hf','name'=>'回复时间','value'=>$f_time);
        
        $this -> yunset('search_list',$search);
    }
 
    /**
     * 会员-个人-求职咨询: 列表
     */
    function index_action()
    {
        
        $this -> set_search();
        
        if($_GET['keyword']){
            
            $keytype  =   intval($_GET['type']);
            
            $keyword  =   trim($_GET['keyword']);
            
            if ($keytype == 1){
                
                $where['username']    =  array('like',$keyword);
                
            }elseif ($keytype == 2){
                
                $where['job_name']    =  array('like',$keyword);
                
            }elseif ($keytype == 3){
                
                $where['com_name']    =  array('like',$keyword);
                
            }elseif ($keytype == 4){
                
                $where['content']     =  array('like',$keyword);
                
            }elseif ($keytype == 5){
                
                $where['reply']       =  array('like',$keyword);
            }
            $urlarr['keytype']          =  $keytype;
            
            $urlarr['keyword']          =  $keyword;
        }
        if($_GET['zx']){
            
            $zx                       =  intval($_GET['zx']);
            
            if($zx == 1){
                
                $where['datetime']      =  array('>=',strtotime('today'));
                
            }else{
                
                $where['datetime']      =  array('>=',strtotime('-'.$zx.' day'));
            }
            
            $urlarr['zx']             =  $zx;
        }
        if($_GET['hf']){
            
            $hf  =  intval($_GET['hf']);
            
            if($hf == 1){
                
                $where['reply_time']  =  array('>=',strtotime('today'));
                
            }else{
                
                $where['reply_time']  =  array('>=',strtotime('-'.$hf.' day'));
            }
            
            $urlarr['hf']             =  $hf;
        }
        if($_GET['job']){
            
            $where['type']            =  intval($_GET['job']);
            
            $urlarr['job']            =  $_GET['job'];
        }
 
        if(isset($_GET['status'])){
            $where['status']           =   intval($_GET['status']);
            $urlarr['status']       =   $_GET['status'];
        }
        $urlarr            =   $_GET;
        $urlarr['page']    =    '{{page}}';
        
        $pageurl        =    Url($_GET['m'],$urlarr,'admin');
        
        //提取分页
        $pageM            =    $this  -> MODEL('page');
        $pages            =    $pageM -> pageList('msg',$where,$pageurl,$_GET['page']);
        
        if($pages['total'] > 0){
            if($_GET['order']){
                
                $where['orderby']        =    'id,'.$_GET['order'];
                
                $urlarr['order']        =    $_GET['order'];
            }else{
                $where['orderby']        =    'id,desc';
            }
            $where['limit']                =    $pages['limit'];
            
            $msgM  =  $this->MODEL('msg');
            
            $List  =  $msgM -> getList($where);
            
            $this -> yunset('mes_list',$List['list']);
        }
        $this->yuntpl(array('admin/admin_msg'));
    }
 
    /**
     * 会员-个人-求职咨询: 删除求职咨询
     */
    function del_action()
    {
 
        if ($_GET['id']){
            
            $this -> check_token();
            
            $id   =  intval($_GET['id']);
            
        }elseif ($_POST['del']){
            
            $id   =  $_POST['del'];
        }
        $msgM     =  $this->MODEL('msg');
        
        $return   =  $msgM -> delInfo($id);
        
        $this -> layer_msg($return['msg'],$return['errcode'],$return['layertype'],$_SERVER['HTTP_REFERER']);
    }
 
    /**
     * 会员-个人-求职咨询: 求职咨询预览
     */
    function msgshow_action()
    {
        if($_POST['id']){
            
            $id      =  intval($_POST['id']);
            
            $msgM    =  $this->MODEL('msg');
            
            $return  =  $msgM -> getInfo(array('id'=>$id));
            
            echo json_encode($return);die;
        }
    }
    
    /**
     * 返回审核原因
     */
    function lockinfo_action(){
 
        $msgM  =   $this -> MODEL('msg');
 
        $info  =   $msgM ->    getInfo(array('id' => intval($_POST['id'])), array('field'=>'`statusbody`'));
 
        echo $info['statusbody'];die;
    }
     /**
     * 修改
    */
    function msgedit_action(){
        $msgM  =   $this -> MODEL('msg');
        $data = array(
            'content' => trim($_POST['beizhu']),
            'reply' =>  trim($_POST['reply']),
            'reply_time' => time()
        );
        $return = $msgM -> eidtMsg($_POST['id'], $data);
        $this->ACT_layer_msg($return['msg'], $return['errcode'],$_SERVER['HTTP_REFERER'], 2, 1);
    }
    /**
     * 审核操作
     */
    function status_action()
    {
        $msgM       =   $this->MODEL('msg');
 
        $statusData = array(
 
            'status'         =>  intval($_POST['status']),
            'statusbody'    =>  trim($_POST['statusbody'])
        );
 
        $return = $msgM -> statusMsg($_POST['pid'], $statusData);
 
        $this->ACT_layer_msg($return['msg'], $return['errcode'],$_SERVER['HTTP_REFERER'], 2, 1);
    }
}
?>