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
<?php
 
class pl_controller extends company{
    //企业评论
    function index_action(){
        
        $CompanyM    =    $this -> MODEL('company');
        
        $where['cuid']        =    $this->uid;
        
        $where['status']    =    '1';
        
        $urlarr        =    array("c" => "pl","page" => "{{page}}");
        
        $pageurl    =    Url('member',$urlarr);
        
        $pageM        =    $this  -> MODEL('page');
        
        $pages        =    $pageM -> pageList('company_msg',$where,$pageurl,$_GET['page'],$this->config['sy_listnum']);
        
        if($pages['total'] > 0){
            
            $where['limit']        =    $pages['limit'];
            
            $rows    =    $CompanyM -> getCompanyMsgList($where);
        }
        $this -> yunset("rows",$rows);
        
        $this -> company_satic();
        
        $this -> public_action();
        
        $this -> com_tpl('pl');
    
    }
    
    function save_action(){
        
        $CompanyM    =    $this -> MODEL('company');
        
        if($_POST['submit']){
            
            $data['reply']                    =    $_POST['reply'];
            
            $data['reply_time']                =    time();
            
            $id        =    $CompanyM -> upReplyCompanymsgInfo(array('id' => $_POST['id'], 'cuid' => $this -> uid),$data);
            
            if($id){
                
                $this ->MODEL('log')-> addMemberLog($this -> uid, 2,"回复企业评论",18,1);//会员日志
                 
                $this->ACT_layer_msg("回复成功!",9,"index.php?c=".$_GET['c']);
             
            }else{
                 
                $this->ACT_layer_msg("添加失败!",8,"index.php?c=".$_GET['c']);
             
            }
        
        }
    
    }
    
}
?>