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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php
 
 
class spviewadd_controller extends company
{
 
    function index_action()
    {
        $statics = $this->public_action();
        
        if ($statics['spviewNum'] == 0) { // 会员过期
            
            if($this->spid){
                
                $this->ACT_msg('index.php', '当前账号会员已到期,请联系主账号进行升级!', 8);
            }else{
                
                $this->ACT_msg('index.php?c=right', '你的会员已到期!', 8);
            }
        }
        
        if ($statics['spviewNum'] == 2) { // 会员套餐已用完
            
            if ($this->config['integral_spview'] != '0') {
                if($this->spid){
                    
                    $this->ACT_msg('index.php', '您的套餐数据已用完,请联系主账号进行分配!', 8);
                }else{
                    
                    $this->ACT_msg('index.php?c=right', '你的套餐已用完!', 8);
                }
            } else {
                if($this->spid){
                    $this->MODEL('statis')->upInfo(array('spview_num' => '1'), array('uid' => $this->spid, 'usertype' => '2'));
                }else{
                    $this->MODEL('statis')->upInfo(array('spview_num' => '1'), array('uid' => $this->uid, 'usertype' => '2'));
                }
            }
        }
        
        $cacheArr   =   $this->MODEL('cache')->GetCache(array('user'));
 
        $jobM       =   $this->MODEL('job');
 
        $jobwhere   =   array(
            'uid'       =>  $this->uid,
            'state'     =>  1,
            'status'    =>  0,
            'r_status'  =>  1
        );
        
        $List    =   $jobM->getList($jobwhere,array('field'=>'`name`,`id`'));
 
        foreach ($List['list'] as $key => $value) {
           $jobArr[$value['id']] = $value['name'];
 
        }
        $this->yunset('job',$jobArr);
        $this->yunset($cacheArr);
        $this->com_tpl('spshow');
    }
 
    function edit_action()
    {
        $this->public_action();
 
        $spviewM       =   $this->MODEL('spview');
 
        $id     =   intval($_GET['id']);
        
        $row    =   $spviewM->getInfo(array('id' => $id,'uid'=>$this->uid));
        
        if (empty($row)) {
            
            $this->ACT_msg('index.php?c=spviewadd', '视频面试参数错误!');
        }
 
        $jobM       =   $this->MODEL('job');
 
        $jobwhere   =   array(
            'uid'       =>  $this->uid,
            'state'     =>  1,
            'status'    =>  0,
            'r_status'  =>  1
        );
        
        $List    =   $jobM->getList($jobwhere,array('field'=>'`name`,`id`'));
 
        foreach ($List['list'] as $key => $value) {
            $jobArr[$value['id']] = $value['name'];
        }
      
        $this->yunset('job',$jobArr);
 
        $CacheArr   =   $this->MODEL('cache') -> GetCache(array('user'));
        $this->yunset($CacheArr);
 
 
        $this->yunset('row', $row);
        
        $this->com_tpl('spshow');
 
    }
 
    function save_action(){
        if ($_POST['submitBtn']) {
            
            $post   = array(
                'id'            => intval($_POST['id']),
                'uid'           => $this->uid,
                'jobid'         => trim(pylode(',', $_POST['jid'])),
                'starttime'     => strtotime($_POST['sdate']),
                'exp'           => trim($_POST['exp']),
                'edu'           => trim($_POST['edu']),
                'sex'           => trim(pylode(',', $_POST['sex'])),
                'other'         => trim(pylode(',', $_POST['other'])),
                'remark'           => trim($_POST['remark']),
                'did'           => $this->userdid,
            );
            
            $spviewM   =   $this->MODEL('spview');
            
            $return =   $spviewM->addInfo($post);
            
            $this->ACT_layer_msg($return['msg'], $return['errcode'], $return['url']);
 
        }
    }
   
}
?>