chengkun
2025-05-23 a6f7b382623096b6a00924f418447cf5204e825e
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
132
<?php
 
 
class expectq_controller extends user
{
 
    function index_action()
    {
 
        $resume =   $this->public_action();
 
        if (!$resume['name'] || !$resume['edu']) {
 
            $this->ACT_msg('index.php?c=info', "请先完善个人资料!");
        }
 
        $cacheList  =   $this->MODEL('cache')->GetCache(array('city', 'hy', 'user', 'job'));
        $this->yunset($cacheList);
 
        if (empty($cacheList['city_type'])) {
 
            $this->yunset('cionly', 1);
        }
        if (empty($cacheList['job_type'])) {
 
            $this->yunset('jionly', 1);
        }
        $resumeM    =   $this->MODEL('resume');
        $num        =   $resumeM->getExpectNum(array('uid' => $this->uid));
        if ($num >= $this->config['user_number'] && $this->config['user_number'] != '' && $_GET['e'] == '') {
 
            $this->ACT_msg("index.php?c=resume", "你的简历数已经超过系统设置的简历数了");
        }
 
        $row        =   $resumeM->getExpect(array('id' => intval($_GET['e']), 'uid' => $this->uid));
 
        $jobClassId =    @explode(',', $row['job_classid']);
 
        if (is_array($jobClassId)) {
 
            $jobClassName           =   array();
            foreach ($jobClassId as $v) {
                if ($cacheList['job_name'][$v]) {
 
                    $jobClassName[] =   $cacheList['job_name'][$v];
                }
            }
            $row['job_classname']   =   @implode(',', $jobClassName);
        }
 
        $cityClassId    =   @explode(',', $row['city_classid']);
 
        if (is_array($cityClassId)) {
            $cityClassName          =   array();
            foreach ($cityClassId as $v) {
                if ($cacheList['city_name'][$v]) {
 
                    $cityClassName[]=   $cacheList['city_name'][$v];
                }
            }
            $row['city_classname']  =   @implode(',', $cityClassName);
        }
 
        $doc        =   $resumeM->getResumeDoc(array('eid' => intval($_GET['e']), 'uid' => $this->uid));
        $row['doc'] =   $doc['doc'];
 
        $this->yunset("row", $row);
        $this->yunset("js_def", 2);
        $this->user_tpl('expectq');
    }
 
    function save_action()
    {
 
        $resumeM    =   $this->MODEL('resume');
        if ($_POST['submit']) {
 
            $_POST  =   $this->post_trim($_POST);
            $rinfo  =   $resumeM->getResumeInfo(array('uid' => $this->uid), array('field' => 'r_status'));
 
            $eid    =   (int)$_POST['eid'];
            $doc    =   str_replace("&amp;", "&", $_POST['doc']);
 
            if ($eid) {
 
                $r_status = $this->config['user_revise_state'];
            } else {
                $r_status = $this->config['resume_status'];
            }
            $expectDate = array(
                'height_status' => 0,
                'state' => $rinfo['r_status'] == 1 ? $r_status : 0,
                'r_status' => $rinfo['r_status'],
                'integrity' => 100,
                'name' => $_POST['name'],
                'hy' => $_POST['hy'],
                'job_classid' => $_POST['job_classid'],
                'minsalary' => $_POST['minsalary'],
                'maxsalary' => $_POST['maxsalary'],
                'city_classid' => $_POST['city_classid'],
                'type' => $_POST['type'],
                'report' => $_POST['report'],
                'jobstatus' => $_POST['jobstatus'],
                'uid' => $this->uid,
                'did' => $this->userdid
            );
 
            $data = array(
                'eid' => $eid,
                'uid' => $this->uid,
                'usertype' => $this->usertype,
                'expect' => $expectDate,
                'doctype' => 1,
                'doc' => $doc,
                'utype' => 'user'
            );
 
            $return = $resumeM->addDocInfo($data);
 
            if ($return['errcode'] == 1) {
 
                $this->ACT_layer_msg($return['msg'], 8, "index.php?c=resume");
            } else {
 
                $this->ACT_layer_msg($return['msg'], $return['errcode'], "index.php?c=resume");
            }
        }
    }
 
}
 
?>