chengkun
2025-05-23 a6f7b382623096b6a00924f418447cf5204e825e
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
<?php
 
class comment_controller extends user{
    //面试评价
    function index_action(){
 
        if($_GET['id'] && $this -> config['com_msg_status'] == '1'){
            $this->public_action();
            $jobM        =    $this->MODEL('job');
            $companyM    =    $this->MODEL('company');
            //验证信息
            $msg         =    $jobM->getYqmsInfo(array('id'=>(int)$_GET['id'],'uid'=>$this->uid,'isdel'=>9));
            
            if(!empty($msg)){
                if($msg['is_browse']=='3'){
                    
                    //查询是否已经评论过
                    $msgInfo    =    $companyM->getCompanyMsgInfo(array('msgid'=>$msg['id']));
                    $this->yunset("msgInfo",$msgInfo);
                    
                    $this->yunset("msg",$msg);
                    
                    $this->yunset($this->MODEL('cache')->GetCache(array('com')));
                    $this->user_tpl('comment');
                }else{
                    $this->layer_msg('参与面试后方可评论!',8,0,$_SERVER['HTTP_REFERER']);
                }
            }else{
                $this->layer_msg('请选择正确的信息!',8,0,$_SERVER['HTTP_REFERER']);
                
            }
        }
    }
    //面试评价修改保存
    function save_action(){
        $companyM    =    $this->MODEL('company');
        
        $data        =    array(
            'id'            => (int)$_POST['id'],
            'uid'            => $this->uid,
            'did'            => $this->userdid,
            'desscore'         => (int)$_POST['desscore'],
            'hrscore'         => (int)$_POST['hrscore'],
            'comscore'         => (int)$_POST['comscore'],
            'content'          => strip_tags($_POST['content']),
            'othercontent'  => strip_tags($_POST['othercontent']),
            'tag'            => $_POST['tag'],
            'isnm'            => (int)$_POST['isnmval']
        );
        $return        =    $companyM->addCompanyMsg($data);
        
        $this->ACT_layer_msg($return['msg'],$return['errcode'],$_SERVER['HTTP_REFERER']);
    }
    
}
?>