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
110
111
112
113
114
115
116
<?php
 
 
class report_controller extends company
{
 
    function index_action()
    {
        if ($_POST['eid']) {
            $reportM    =   $this->MODEL('report');
 
            $row        =   $reportM -> getReportOne(array(
                'p_uid'     =>  $this->uid,
                'eid'       =>  $_POST['eid'],
                'orderby'   =>  'inputtime,desc'
            ));
 
            if (is_array($row) && ! $row['result']) {
                echo 2;
                die();
            }
            
            $eid        =   intval($_POST['eid']);
 
            $reason     =   $_POST['reason'];
 
            $crm        =   $this->MODEL('admin')->getAdminUser(array('uid' => $eid));
 
            $rData      =   array(
                
                'did'       =>  $this->config['did'],
                'p_uid'     =>  $this->uid,
                'eid'       =>  intval($_POST['eid']),
                'usertype'  =>  $this->usertype,
                'inputtime' =>  time(),
                'username'  =>  $this->username,
                'r_name'    =>  $crm['name'],
                'r_reason'  =>  $reason,
                'type'      =>  2      //  顾问
            );
 
            $new_id     =   $reportM -> addCrmReport($rData);
 
            if ($new_id) {
                
                $this ->MODEL('log') ->addMemberLog($this->uid, $this->usertype, '投诉招聘顾问', 23, 1);
                echo '1';
            } else {
                
                echo '0';
            }
        }
    }
 
    function show_action()
    {
        $reportM        =   $this->MODEL('report');
 
        $urlarr         =   array();
        
        $urlarr['c']    =   'report';
        $urlarr['act']  =   'show';
        $urlarr['page'] =   '{{page}}';
        
        $where          =   array();
        $where['p_uid'] =   $this->uid;
        $where['type']  =   2;
 
        $pageurl        =   Url('member', $urlarr);
        $pageM          =   $this -> MODEL('page');
        $pages          =   $pageM->pageList('report', $where, $pageurl, $_GET['page'], $this->config['sy_listnum']);
 
        if ($pages['total'] > 0) {
            
            if ($_GET['order']) {
            
                $where['orderby']   =   $_GET['t'].','.$_GET['order'];
                $urlarr['order']    =   $_GET['order'];
                $urlarr['t']        =   $_GET['t'];
            } else {
 
                $where['orderby']   =   'inputtime';
            }
            
            $where['limit']         =   $pages['limit'];
 
            $List                   =   $reportM -> getReportList($where);
 
            $this->yunset('rows', $List['list']);
        }
 
        $this->public_action();
 
        $this->com_tpl('report');
    }
 
    function del_action()
    {
        $reportM    =   $this->MODEL('report');
 
        if ($_GET['id']) {
 
            $del    =   $_GET['id'];
 
            if ($del) {
                
                $return     =   $reportM->delReport(array('id' => $del,'uid'=>$this->uid));
                $this->layer_msg($return['msg'], $return['errcode'], 0, $_SERVER['HTTP_REFERER']);
            } else {
 
                $this->layer_msg('请选择您要删除的信息!', 8, 0, $_SERVER['HTTP_REFERER']);
            }
        }
    }
}
?>