public function forwardResume() { $id = I('post.id'); if (!is_numeric($id)) { $id = enInt($id); } $email = I('post.email'); $verify_code = rand(100000, 999999); $data = array('resume_post_id' => $id, 'forward_email' => $email, 'verify_code' => $verify_code, 'create_time' => dateTime(), 'forward_type' => 1); $result = $this->ResumePostModel->resumeForwardInfo($id); $forward_id = $this->ResumeForwardModel->add($data); $result['verify_code'] = $data['verify_code']; $result['forward_id'] = $forward_id; $result['education_text'] = getDegreeTextSTU($result['education']); $result['graduate_text'] = getGradeText($result['graduate_year']); $result['url'] = '/ResumeForward/index/id/' . enInt($forward_id); $result['contact_mobile'] = !empty($result['contact_mobile']) ? $result['contact_mobile'] : $result['mobile']; $this->EnterpriseTraceController->resumeForward($result, $email); }
protected function centerPreview($pkid = '', $invite_post_id = FALSE) { $student_id = D('Resume')->studentIdByKey($pkid); if ($student_id) { if (isMobile()) { redirect('/MobileStudent/resumeView/id/' . $student_id); exit; } $account_id = $this->StudentModel->getAccountId($student_id); $recommand = self::getRecomStudent($student_id, $invite_post_id); self::getBaseInfo($account_id); $education = $this->EducationModel->studentEduList($student_id); foreach ($education as $k => $v) { $education[$k]['degree'] = getDegreeTextSTU($v['degree'] == 0 ? 5 : intval($v['degree'])); $education[$k]['start_time'] = date2ToFormate($v['start_time']); $education[$k]['finish_time'] = date2ToFormate($v['finish_time']); } $practice = $this->PracticeModel->getPractice($student_id); foreach ($practice as $k => $v) { $practice[$k]['content'] = textareaFormat($v['content']); // $practice[$k]['start_time'] = date2ToFormate($v['start_time']); $practice[$k]['finish_time'] = date2ToFormate($v['finish_time']); } $prize = $this->PrizeExperienceModel->getPrize($student_id); foreach ($prize as $k => $v) { $prize[$k]['period'] = date2ToFormate($v['period']); } $activity = $this->ActivityExperienceModel->getActivity($student_id); foreach ($activity as $k => $v) { $activity[$k]['period'] = date2ToFormate($v['period']); $activity[$k]['period_end'] = date2ToFormate($v['period_end']); } $cert = $this->StudentCertificateModel->getcert($student_id); $type = D('Certificate'); foreach ($cert as $k => $v) { $cert[$k]['certificate'] = $type->getCertificateName($v['certificate_id']); $cert[$k]['status'] = getCertStatusText($v['status']); $cert[$k]['finish_time'] = date2ToFormate($v['finish_time']); } $school = $this->JobExperienceModel->jobExperienceList($student_id); $job = D('SchoolJob'); foreach ($school as $k => $v) { $school[$k]['description'] = textareaFormat($v['description']); // $school[$k]['start_time'] = date2ToFormate($v['start_time']); $school[$k]['finish_time'] = date2ToFormate($v['finish_time']); } #新增关注度 --begin-- $enterprise_id = session('account.enterprise_id'); if (!empty($enterprise_id)) { $resumeViewModel = D('ResumeView'); $resumeViewModel->viewAdd(array('enterprise_id' => $enterprise_id, 'resume_id' => $pkid, 'student_id' => $student_id)); } #新增关注度 --end-- $this->assign('introduceHtml', textareaFormat($this->StudentModel->getIntroduce($student_id))); $this->assign('exist', self::resumeModule2($student_id)); $this->assign('expectHtml', self::expectListTpl($student_id)); $this->assign('education', $education); $this->assign('practice', $practice); $this->assign('prize', $prize); $this->assign('activity', $activity); $this->assign('cert', $cert); $this->assign('school', $school); $this->assign('headpic', $this->StudentModel->studentAvatar($student_id)); $this->assign('recommand', $recommand); $this->assign('pre', 'FALSE'); return $this->fetch('resume_center'); } }
public function resumeHtml($resume_id, $ty, $status = '', $invite = false) { /* * 查询相关数据 */ if (is_numeric($resume_id)) { $student_id = $this->ResumeModel->studentIdByKey($resume_id); if ($student_id) { $account_id = $this->StudentModel->getAccountId($student_id); $baseInfo = self::getBaseInfo($account_id); if (empty($baseInfo['mobile_type'])) { $baseInfo['mobile_type'] = 1; } $expect = self::expectListTpl($student_id); $education = $this->EducationModel->studentEduList($student_id); foreach ($education as $k => $v) { $education[$k]['degree'] = getDegreeTextSTU($v['degree'] == 0 ? 5 : intval($v['degree'])); $education[$k]['start_time'] = date2ToFormate($v['start_time']); $education[$k]['finish_time'] = date2ToFormate($v['finish_time']); } $practice = $this->PracticeModel->getPractice($student_id); foreach ($practice as $k => $v) { $practice[$k]['content'] = textareaFormat($v['content']); $practice[$k]['start_time'] = date2ToFormate($v['start_time']); $practice[$k]['finish_time'] = date2ToFormate($v['finish_time']); } $prize = $this->PrizeExperienceModel->getPrize($student_id); foreach ($prize as $k => $v) { $prize[$k]['period'] = date2ToFormate($v['period']); } $activity = $this->ActivityExperienceModel->getActivity($student_id); foreach ($activity as $k => $v) { $activity[$k]['period'] = date2ToFormate($v['period']); } $cert = $this->StudentCertificateModel->getcert($student_id); $type = D('Certificate'); foreach ($cert as $k => $v) { $cert[$k]['certificate'] = $type->getCertificateName($v['certificate_id']); $cert[$k]['status'] = getCertStatusText($v['status']); $cert[$k]['finish_time'] = date2ToFormate($v['finish_time']); } $school = $this->JobExperienceModel->jobExperienceList($student_id); $job = D('SchoolJob'); foreach ($school as $k => $v) { $school[$k]['job'] = $job->getSchoolJobTitle($v['job_id']); $school[$k]['description'] = textareaFormat($v['description']); $school[$k]['start_time'] = date2ToFormate($v['start_time']); $school[$k]['finish_time'] = date2ToFormate($v['finish_time']); } //判断图片是否存在 $headpic = $this->StudentModel->studentAvatar($student_id); $headpic = !empty($headpic) ? $headpic : C('APP_URL') . '/Public/static/images/new_nophoto_student.png'; list($width, $height) = getimagesize($headpic); if ($width > 114) { $width = $height = 114; } if ($ty == 1) { $headpic = str_replace(C('APP_URL'), '', $headpic); } $this->assign('width', $width); $this->assign('height', $height); $this->assign('exist', self::resumeModule2($student_id)); $this->assign('baseInfo', $baseInfo); $this->assign('education', $education); $this->assign('practice', $practice); $this->assign('prize', $prize); $this->assign('activity', $activity); $this->assign('cert', $cert); $this->assign('school', $school); $this->assign('base', $expect); $this->assign('headpic', $headpic); $this->assign('introduce', $this->StudentModel->getIntroduce($student_id)); $this->assign('pre', 'false'); $this->assign('appUrl', C('APP_URL')); if ($invite) { $this->assign('invite', TRUE); } if (!empty($status)) { if ($status == 1) { $this->display('/MobileStudent/resume'); exit; } } if ($ty == 1) { $html = $this->fetch('resume_down'); } else { $html = $this->fetch('resume_down_word'); } $name = $baseInfo['name']; } return array('html' => $html, 'name' => $name); } }