public function index() { $account = session('account'); //登陆的用户相关信息 if (!$account) { redirect('/Account/logout'); exit; } if (!self::checkType()) { exit; } $info = $this->EnterpriseModel->getInfoById($account['enterprise_id']); $contact_info = $this->EnterpriseModel->getContactInfo(); if ($contact_info) { $this->assign('contact', $contact_info); } if ($info['email_verify'] != 1) { $this->assign('verify', 'not'); } $where['post.enterprise_id'] = $account['enterprise_id']; $where['post.status'] = 1; #岗位列表 --begin-- $postTotal = $this->PostModel->getPostTotal($where); //列表总数量 $page = isset($_GET['p']) ? intval(htmlspecialchars(strip_tags($_GET['p']))) : ''; //获取url的分页参数 $page = max(1, $page); $page = min($page, ceil($postTotal / $this->page_number)); // 获取合法的分页数 $post = $this->PostModel->getPostList($where, $page, $this->page_number); $map = array('enterprise_id' => enInt($account['enterprise_id'])); $Page = new PageAdmin($postTotal, $this->page_number, $map); //分页类实例化 $this->assign('postList', $post); $this->assign('page', $Page->show()); $this->assign('app_url', C('APP_URL')); $this->assign('list', $this->infoList()); if (empty($info['full_name'])) { $this->assign('welfareList', parent::getWelfareList()); $this->assign('no_post', 1); $this->display('add'); } else { $info['edit_auth'] = 1; $info['account_type'] = session('account.account_type'); $info['pkid'] = enInt($info['pkid']); $this->assign('info', $info); if (isMobile()) { $this->display('/MobileEnterprise/info'); exit; } $this->display(); } }
public function ajaxRecomStu() { $id = I('post.data'); $post = enInt(I('post.post')); $html = $this->getRecomStudent(intval($id), intval($post)); $html ? exit(json_encode(array('msg' => $html))) : ''; }
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); }
function enterpriseUrl($id = '') { return C('FRONT_URL') . '/Enterprise/info/id/' . enInt($id); }
protected function deliveryList($id, $page) { if (!isset($_GET['id']) || !$id || $id == 1) { $where = array(); $id = 1; $timeText = timeText(1); $order = 'resume_post.create_time desc'; } if (isset($_GET['id']) && $id == 2) { $where['resume_post.status'] = 1; //未查看 $timeText = timeText(1); $order = 'resume_post.create_time desc'; } if (isset($_GET['id']) && $id == 3) { $where['resume_post.status'] = 2; //已查看 $timeText = timeText(2); $order = 'resume_post.read_time desc'; } if (isset($_GET['id']) && $id == 4) { $where['resume_post.status'] = 3; //通知面试 $timeText = timeText(3); $order = 'resume_post.deal_time desc'; } if (isset($_GET['id']) && $id == 5) { $where['resume_post.status'] = 4; //拒绝面试 $timeText = timeText(3); $order = 'resume_post.deal_time desc'; } if (isset($_GET['id']) && $id == 6) { $where['resume_post.status'] = 5; //待定中 $timeText = timeText(3); $order = 'resume_post.deal_time desc'; } actionLogAdd(29, array('account_type' => 2, 'student_id' => session('account.student_id'))); $this->checkRedNote(); $pagebtn['type'] = $id; $count = $this->ResumePostModel->getPostDeliveryTotal($where); $page_sum = ceil($count / $this->page_number); $page = isset($_GET['page']) ? intval($page) : 1; $page = min($page, $page_sum); $page = max(0, $page); $delivery = $this->ResumePostModel->getPostDelivery($where, $page, $this->page_number, $order); if (!empty($delivery) && is_array($delivery)) { foreach ($delivery as $k => $v) { $delivery[$k]['send_type'] = getPostTypeText($v['send_type']); $delivery[$k]['status'] = getResumeStatusText($v['status']); if ($id == 2 || $id == 1 || !$id) { $time = $v['create_time']; } if ($id == 3) { $time = $v['read_time']; } if ($id == 4 || $id == 5 || $id == 6) { $time = $v['deal_time']; } if ($v['status'] == 3 || $v['status'] == 4) { $delivery[$k]['hr_remark'] = !empty($v['hr_remark']) ? $v['hr_remark'] : $this->default_text[$v['status']]; } $delivery[$k]['create_time'] = time2Unit($time); $delivery[$k]['city'] = regionIdToname($v['city_id'], $this->RegionsModel); $delivery[$k]['id'] = enInt($v['post_id']); $delivery[$k]['enterprise_id'] = enInt($v['enterprise_id']); } // if($id==3){ // $time = $v['read_time']; // } // if($id==4||$id==5 || $id==6){ // $time = $v['deal_time']; // } // $delivery[$k]['create_time'] = time2Unit($time); // $delivery[$k]['city'] = regionIdToname($v['city_id'],$this->RegionsModel); // $delivery[$k]['id'] = enInt($v['post_id']); // $delivery[$k]['enterprise_id'] = enInt($v['enterprise_id']); } $pagebtn['btn'] = self::page($id, $page, $page_sum); return array('data' => $delivery, 'page' => $pagebtn, 'text' => $timeText); }
public function resumeDefaultChange() { $resume_type = I('post.resume_type'); if (!is_numeric($resume_type)) { $resume_type = enInt($resume_type); } $result = $this->ResumeModel->resumeDefaultChange($resume_type); if ($result !== false) { exit(json_encode(array('status' => 'success'))); } else { exit(json_encode(array('status' => 'fail'))); } }