chengkun
2025-05-26 8f3df543230cd4403368b39b9bbe5726d11a0284
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
<?php
 
class zphnet_controller extends com_controller{
    
    function zphlist_action(){
        
        $where['uid']        =    $this -> member['uid'];
        $page                        =        $_POST['page'];
        if ($_POST['limit']){
            $limit                    =        $_POST['limit'];
            if($page){
                $pagenav            =        ($page-1)*$limit;
                $where['limit']        =        array($pagenav,$limit);
            }else{
                $where['limit']        =        $limit;
            }         
        }
        $where['orderby']    =    array('ctime,desc');
        $zpnetM                =    $this -> MODEL('zphnet');
        $rows                =    $zpnetM -> getZphnetComList($where,array('comid'=>$this->member['uid']));
        $jobM           =   $this->MODEL('job');
        $jobwhere       =   array(
            'uid'       =>  $this->member['uid'],
            'state'     =>  1,
            'status'    =>  0,
            'r_status'  =>  1
        );
        $List            =   $jobM->getList($jobwhere,array('field'=>'`name`,`id`'));
        foreach ($List['list'] as $key => $value) {
            $jobArr[$key]['id']         =    $value['id'];
            $jobArr[$key]['name']         =    $value['name'];
        }
        include_once(CONFIG_PATH.'db.data.php');
        $data['spviewOpen'] =   isset($arr_data['modelconfig']['spview']) && isset($this->config['sy_spview_web']) ? $this->config['sy_spview_web'] : 2;
        if ($this->platform == 'ios'){
            // IOS APP 不支持视频面试
            $data['spviewOpen'] = 2;
        }
        
        $data['total'] = $zpnetM->getZphnetComNum(array('uid'=>$this->member['uid']));
        
        if(is_array($rows) && !empty($rows)){
            $data['list']    =    $rows;
            $data['jobarr']    =    count($jobArr) ? $jobArr : array();
            $this->render_json(0,'ok',$data);
        }else{
            $error    =    2;
            $this->render_json($error);
        }
    }
    function editcomjob_action(){
        $zphnet = $this->MODEL('zphnet');
 
        if($_POST['id']){
            $result = $zphnet->editZphnetComjob(array('id'=>trim($_POST['id'])),array('jobid'=>$_POST['jobid'],'uid'=>$this -> member['uid'],'usertype'=>$this->member['usertype']));
            if($result['errcode']==9){
                $error =1;
                $msg = "修改成功!";
            }else{
                $error =0;
                $msg = "修改失败!";
            }
        }else{
            $error=0;
            $msg = '参数错误!';
        }
        $this->render_json($error,$msg);
    }
    function spviewLog_action(){
 
        $spviewM    =    $this -> MODEL('spview');
        
        $where['comid']                =    $this -> member['uid'];
        $where['zid']                =    $_POST['zid'];
        
        $data['total']              =   $spviewM->getSplogNum($where);
        
        $page                        =        $_POST['page'];
        if ($_POST['limit']){
            $limit                    =        $_POST['limit'];
            if($page){
                $pagenav            =        ($page-1)*$limit;
                $where['limit']        =        array($pagenav,$limit);
            }else{
                $where['limit']        =        $limit;
            }         
        }
          
        $where['orderby']    =    'ctime,desc';
        
        $rows         =     $spviewM->getSpLogList($where);
        
 
        $data    =    array();
        if(is_array($rows) && !empty($rows)){
            $data['list']    =    $rows;
            $error    =    0;
        }else{
            $error    =    2;
        }
        $this->render_json($error,'',$data);
        
    }
    function delzph_action()
    {
        $zpnetM  =  $this -> MODEL('zphnet');
        $id        =     intval($_POST['ids']);
        $return     =    $zpnetM -> delZphnetCom($id,$this->member['uid']);
        if($return['errcode']==9){
            $error    =    1;
        }else{
            $error    =    2;
        }
        $this->render_json($error,'ok');
    }
   
}