public function resumeHandle()
 {
     if (IS_POST && !empty($_POST['data']) && !empty($_POST['status'])) {
         $data = I('post.data');
         $data = trim($data, ',');
         $status = I('post.status');
         $status = intval($status);
         if (!in_array($status, array(3, 4, 5)) || empty($data)) {
             returnjson(array('code' => 505, 'status' => FALSE, 'msg' => 'param error'));
         }
         $where['pkid'] = array('in', $data);
         $where['enterprise_id'] = session('account.enterprise_id');
         $update['status'] = $status;
         $update['modify_time'] = dateTime();
         $update['deal_time'] = $update['modify_time'];
         $bool = $this->ResumePostModel->where($where)->data($update)->save();
         if ($bool) {
             if ($update['status'] == 3 or $update['status'] == 4) {
                 $studentTrace = new StudentTraceController();
                 $resume_data = explode(',', trim($data, ','));
             }
             if ($update['status'] == 3 and !empty($resume_data)) {
                 foreach ($resume_data as $v) {
                     $studentTrace->allowInterview($v, TRUE);
                 }
             }
             if ($update['status'] == 4 and !empty($resume_data)) {
                 foreach ($resume_data as $v) {
                     $studentTrace->refuseInterview($v, TRUE);
                 }
             }
             returnjson(array('code' => 506, 'status' => TRUE, 'msg' => ''));
         } else {
             returnjson(array('code' => 504, 'status' => FALSE, 'msg' => 'update fail'));
         }
     }
 }
 public function resumeInvite()
 {
     $pkid = enInt($_GET['id']);
     $post_id = enInt($_GET['pid']);
     $invite_bool = D('InterviewInvitation')->checkPostResume($post_id, $pkid);
     if (is_numeric($pkid) && is_numeric($post_id)) {
         // 2016-01-07 该简历学生是否投递过企业,否则屏蔽联系信息
         $int = M('resume as re')->join('inner join resume_post as rp on re.student_id=rp.student_id')->field('rp.pkid')->where(array('re.pkid' => $pkid, 'rp.enterprise_id' => session('account.enterprise_id')))->count();
         if ($int > 0) {
             $this->assign('inviteViewNone', TRUE);
         }
         $this->assign('inviteView', TRUE);
         $this->assign('info', array('r_id' => $_GET['id'], 'p_id' => $_GET['pid'], 'invite' => $invite_bool));
         // 2015-12-29
         $resume_type = M('resume')->field('resume_type')->find($pkid);
         $this->assign('titleHtml', resumePostType($resume_type['resume_type']));
         $this->assign('centerHtml', $this->centerPreview($pkid, $post_id));
         $this->display('resume_look_view_invite');
     } else {
         returnjson(array('msg' => 'student.resume.error'));
     }
 }
 public function verifyPhone()
 {
     $phone = isset($_POST['mobile']) ? I('post.mobile') : '';
     $rst = $this->chkphone($phone);
     if (!$rst['status']) {
         returnjson($rst);
     }
     $mobile = isset($_SESSION['verify_phone']['mobile']) ? session('verify_phone.mobile') : '';
     if ($mobile != $phone) {
         returnjson(array('msg' => '请填写正确的手机号', 'status' => FALSE, 'code' => 102));
     }
     $phonecode = isset($_SESSION['verify_phone']['code']) ? session('verify_phone.code') : '';
     $expiretime = isset($_SESSION['verify_phone']['expiretime']) ? session('verify_phone.expiretime') : '';
     $postcode = isset($_POST['code']) ? I('post.code') : '';
     if (!$phonecode || !$expiretime) {
         returnjson(array('msg' => '请重新获取验证码', 'status' => FALSE, 'code' => 103));
     }
     if (!$postcode) {
         returnjson(array('msg' => '验证码为空', 'status' => FALSE, 'code' => 104));
     }
     if ($phonecode != $postcode) {
         returnjson(array('msg' => '请输入正确的验证码', 'status' => FALSE, 'code' => 105));
     }
     if ($phonecode == $postcode) {
         if (NOW_TIME > $expiretime) {
             returnjson(array('msg' => '验证码已过期', 'status' => FALSE, 'code' => 106));
         } else {
             $StudentModel = D('Student');
             $StudentModel->upMobileStatus($phone);
             //更新手机验证状态
             $StudentModel->updateContactMobile();
             //更新
             session('verify_phone', NULL);
             returnjson(array('msg' => '', 'status' => TRUE));
         }
     }
 }