chengkun
2025-04-30 6ab292fb7415be124651e312ec4f21c594568f17
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
<?php
 
class msg_controller extends company{    
    
    function index_action(){
        
        $MsgM    =    $this -> MODEL('msg');
        
        $where['job_uid']        =    $this -> uid;
        
        $where['status']        =    1;
 
        $where['del_status']    =    array('<>','1');
        
        $urlarr        =    array("c" => "msg","page" => "{{page}}");
        
        $pageurl    =    Url('member',$urlarr);
        
        $pageM        =    $this -> MODEL('page');
        
        $pages        =    $pageM -> pageList('msg',$where,$pageurl,$_GET['page'],$this->config['sy_listnum']);
        
        if($pages['total'] > 0){
            
            
            $where['orderby']    =    'datetime';
            
            
            $where['limit']        =    $pages['limit'];
            
            
            $rows    =    $MsgM -> getList($where);
            
        }
        
        $this -> yunset("rows",$rows['list']);
        
        $this -> public_action();
        
        $this -> company_satic();
        
        $this -> com_tpl('msg');
    
    }
    
    function del_action(){
        
        $MsgM    =    $this -> MODEL('msg');
        
        if($_GET['id']){
            
            $where['id']        =    (int)$_GET['id'];
            
            $where['job_uid']    =    $this -> uid;
            
            $nid    =    $MsgM -> upInfo($where);
            
            if($nid){
                 
                $this ->MODEL('log')-> addMemberLog($this -> uid, 2,"删除求职咨询",18,3);//会员日志
                
                $this -> layer_msg('删除成功!',9,0,"index.php?c=msg");
             
            }else{
                 
                $this -> layer_msg('删除失败!',8,0,"index.php?c=msg");
             
            }
        }
    }
    
    function save_action(){
        
        $MsgM    =    $this -> MODEL('msg');
        
        if($_POST['submit']){
            
            $data['reply']                    =    $_POST['reply'];
            
            $data['reply_time']                =    time();
            
            $data['user_remind_status']        ='0';
            
            $id        =    $MsgM -> upReplyInfo(array('id' => $_POST['id'], 'job_uid' => $this -> uid),$data);
            
            if($id){
                
                $this ->MODEL('log')-> addMemberLog($this -> uid, 2,"回复求职咨询",18,1);//会员日志
                 
                $this->ACT_layer_msg("回复成功!",9,"index.php?c=msg");
             
            }else{
                 
                $this->ACT_layer_msg("添加失败!",8,"index.php?c=msg");
             
            }
        }
    }
    
    function getContent_action(){
        
        $MsgM  =  $this -> MODEL('msg');
        
        $msg   =  $MsgM->getInfo(array('id'=>$_POST['id'],'job_uid'=>$this -> uid),array('field'=>'`content`'));
        
        echo json_encode($msg);
    }
}
?>