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
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
<?php
 
 
class partapply_controller extends company
{
 
    function index_action()
    {   
        
        $partM              =   $this->MODEL('part');
        
        $comid              =   $this->uid;
 
        $where['comid']     =   $comid;
 
        if ($_GET['jobid']) {
 
            $jobid          =   intval($_GET['jobid']);
 
            $where['jobid'] =   $jobid;
 
            $urlarr['jobid']=   $jobid;
        }
        
        
 
        if ($_GET['status']) {
 
            $status             =   intval($_GET['status']);
 
            $where['status']    =   $status;
 
            $urlarr['status']   =   $status;
        }
        
        $urlarr['c']        =   $_GET['c'];
 
        $urlarr['page']     =   '{{page}}';
 
        $pageurl            =   Url('member', $urlarr);
 
        $pageM              =   $this -> MODEL('page');
 
        $pages              =   $pageM -> pageList('part_apply', $where, $pageurl, $_GET['page']);
 
        if ($pages['total'] > 0) {
            
            $where['orderby']   =   array('ctime,desc');
            
            $where['limit']     =   $pages['limit'];
            
            $rows               =   $partM -> getPartSqList($where); 
        }
        
        $partJob                =   $partM -> getList(array('uid' => $comid), array('field' => '`id`,`name`'));
        
        $this -> yunset('JobList', $partJob);
         
        if($_GET['jobid'] && $_GET['status']==''){
          $jobid          =   intval($_GET['jobid']);
          
          $partwhere['id'] =   $jobid;
          $partwhere['uid'] =   $this -> uid;
          
          $partInfo       =   $partM->getInfo($partwhere,array('field'=>'`name`'));
          $partJob        =   $partInfo['info'];
          $this -> yunset('jobname', $partJob['name']);
        } 
         
 
            
        
        
        $this -> yunset('total', $pages['total']);
        
        $this -> yunset('rows', $rows);
        
        // 未查看 已查看 已联系
        $this -> yunset(array( 'StateList' => array( array( 'id' => 1, 'name' => '未查看' ), array( 'id' => 2, 'name' => '已查看' ), array( 'id' => 3, 'name' => '已联系' ) ) ));
        
        $this -> public_action();
        
        $this -> company_satic();
 
 
        $this -> com_tpl('partapply');
    }
 
    function status_action()
    { // 设置状态
        $partM = $this->MODEL('part');
 
        $id = intval($_POST['id']);
 
        $status = intval($_POST['status']);
 
        $where['id'] = $id;
 
        $where['comid'] = $this->uid;
 
        $data = array(
 
            'status' => $status
        );
 
        $partM->upPartSq($where, $data);
    }
 
    function del_action()
    {
        $partM = $this->MODEL('part');
 
        $logM = $this->Model('log');
 
        $delID = is_array($_POST['delid']) ? $_POST['delid'] : $_GET['del'];
 
        $logM->addMemberLog($this->uid, $this->usertype, "删除兼职报名", 6, 3);
 
        $delRes = $partM->delPartApply($delID, array(
            'uid' => $this->uid,
            'usertype' => $this->usertype
        ));
 
        $this->layer_msg($delRes['msg'], $delRes['errcode'], $delRes['layertype'], $_SERVER['HTTP_REFERER']);
    }
}
?>