function JobSearch() { $nowpage = I('i'); //当前页码 $title = I('position'); //职位 1 $industry = I("industry"); //行业 2 $place = I('area'); //所在地区 $treatment = I('treatment'); //工资待遇 $puttime = I('puttime'); //发布时间 if ($title) { //关键词模糊查询 $keywordGroup = M("keyword_group")->where("keyword_group like '%" . $title . "%'")->getField("keyword_group"); if ($keywordGroup) { $arKeywordGroup = explode(" ", $keywordGroup); $titleTmp = ""; foreach ($arKeywordGroup as $keyword) { if ($keyword) { $titleTmp .= " or title like '%" . $keyword . "%' "; } } } if (strlen($titleTmp) > 0) { $where .= " AND (title like '%" . $title . "%' " . $titleTmp . ") "; } else { $where .= " AND (title like '%" . $title . "%') "; } } $count = M("job")->where("employ>(select count(*) from stj_record where stj_record.j_id = stj_job.id and audstart=6) and checkinfo='true' and endtime>unix_timestamp(now()) and is_deleted=0 and is_show=1" . $where)->count(); $page = new \Think\NewPage($count, 10); $arJobList = M("job")->where("employ>(select count(*) from stj_record where stj_record.j_id = stj_job.id and audstart=6) and checkinfo='true' and endtime>unix_timestamp(now()) and is_deleted=0 and is_show=1" . $where)->order("orderid ASC,checktime DESC, starttime DESC")->limit($page->firstRow, $page->listRows)->select(); $show = $page->show(); foreach ($arJobList as $key => &$val) { //计算招聘费用,20%留作系统费用 if ($val['Tariff'] > 10) { $val['Tariff'] = floor($val['Tariff'] * 0.8 / 100) * 100; } else { $val['Tariff'] = floor($val['treatment'] * $val['Tariff'] * 12 * 0.8 / 100) * 100; } //发布时间 $val['starttime'] = $val['checktime'] != 0 ? date('Y-m-d H:i', $val['checktime']) : date('Y-m-d H:i', $val['starttime']); //职位名称 if (!$val['title']) { $val['title'] = M("casclist")->where("id='{$val['Jobcate']}'")->getField("cascname"); } else { $val['title'] = $val['title']; } //工资待遇 $val['treatment'] = M("cascadedata")->where("datagroup='treatment' and datavalue='{$val['treatment']}'")->getField("dataname"); //学历要求 $val['education'] = M("cascadedata")->where("datagroup='education' and datavalue='{$val['education']}'")->getField("dataname"); //公司信息 $company = M("company")->where("id=" . $val['cpid'])->find(); //公司名称 $val['cpname'] = $company["cpname"]; //公司缩略图 $val['thumlogo'] = $company['thumlogo'] ? $company['thumlogo'] : "/Public/img/defoultLogo.png"; //工作经验要求 $val['experience'] = M("cascadedata")->where("datagroup='experience' and datavalue='{$val['experience']}'")->getField("dataname"); $val['stage'] = M("cascadedata")->where("datagroup='stage' and datavalue=" . $company['stage'])->getField("dataname"); $val['strycate'] = getCscData($val['strycate']); $val['nature'] = getDataName("nature", $company['nature']); $val['scale'] = getDataName("scale", $company['scale']); $val['record_num'] = M("record")->where("j_id=" . $val['id'])->count(); //工作地点 $val['jobplace'] = M("casclist")->where("id='{$val['jobplace']}'")->getField("cascname"); } //工作地点下拉框 $workarea = M('casclist')->where("parentid = 19")->order("orderid ASC")->select(); //工资待遇 $money = M('cascadedata')->where("datagroup='treatment' AND level=0 ")->select(); //发布时间 $positime = M('cascadedata')->where("datagroup='puttime' AND level=0")->select(); //行业类别 $arIndustry = M('casclist')->where("parentid =2")->order("orderid ASC")->select(); //职位类别 $arPosition = M('casclist')->where("parentid =1")->order("orderid ASC")->select(); //判断是否可以收藏职位搜索器 $isSearchCollect = $_SESSION['username'] ? true : false; $act = trim($_GET['act']); if ($act == "collect") { //收藏职位 $username = $_SESSION['username']; $count = M("job_collection")->where("username='******' and status =1")->count(); $page = new \Think\NewPage($count, 10); $arCollectList = M("job_collection")->where("username='******' and status =1")->order("id desc")->limit($page->firstRow, $page->listRows)->select(); $show = $page->show(); $i = (($_GET['p'] ? $_GET['p'] : 1) - 1) * 15 + 1; foreach ($arCollectList as &$arCollectInfo) { $arCollectInfo['cpname'] = M("company")->where("id='{$arCollectInfo['cpid']}'")->getField("cpname"); $arCollectInfo['count'] = M("record")->where("j_id=" . $arCollectInfo['j_id'] . "")->count(); $arCollectInfo['endtime'] = date("Y-m-d", $arCollectInfo['endtime']); $arCollectInfo['sort_id'] = $i++; } $this->arCollectList = $arCollectList; $this->assign("page", $show); } else { $act = ""; } $this->money = $money; $this->workarea = $workarea; $this->positime = $positime; $this->page = $show; $this->assign("act", $act); $this->assign("arJobList", $arJobList); $this->assign("isSearchCollect", $isSearchCollect); $this->assign("arIndustry", $arIndustry); $this->assign("arPosition", $arPosition); $this->assign("title", $title); $this->assign("first_class", 3); $this->assign("second_class", 8); $this->display("new_jobsearch"); }
public function ResumeList() { $id = intval($_GET['id']); $checkUserPavi = $this->checkUserPaviliong(); $checkUserPavi['telephone'] = $checkUserPavi['mobile'] ? $checkUserPavi['mobile'] : $checkUserPavi['telephone']; if ($checkUserPavi === false) { $this->error("用户身份验证失败,请重新登陆后再试!"); exit; } if ($id) { $jobInfoTmp = M("job")->where("id='{$id}'")->find(); //职位名称 if (!$jobInfoTmp['title']) { $jobInfoTmp['title'] = M("casclist")->where("id='{$jobInfoTmp['Jobcate']}'")->getField("cascname"); } $this->assign("jobInfoTmp", $jobInfoTmp); } $arJobList = M("job")->where("cpid=" . $checkUserPavi['id'] . " and is_deleted=0 and checkinfo='true' and endtime>" . time())->order("id desc")->select(); $checked = $checkUserPavi['checkinfo']; if ($checked == "true") { $arJobIDTmp = array(); if ($arJobList) { $size = self::$_size; if ($id) { $where = " and j_id='{$id}'"; } else { foreach ($arJobList as &$jobInfo) { if (!$jobInfo['title']) { $jobInfo['title'] = M("casclist")->where("id='{$jobInfo['Jobcate']}'")->getField("cascname"); } array_push($arJobIDTmp, $jobInfo['id']); } $sJobIDTmp = implode(",", $arJobIDTmp); $where = " and j_id in (" . $sJobIDTmp . ")"; } $count = M("record")->where("status=2 " . $where)->count(); $page = new \Think\NewPage($count, $size); $arRecordList = M("record")->where("status=2 " . $where)->order("j_id desc,id desc")->limit($page->firstRow, $page->listRows)->select(); if ($arRecordList) { $i = (($_GET['p'] ? $_GET['p'] : 1) - 1) * $size + 1; foreach ($arRecordList as $key => &$record) { $record['sort_id'] = $i++; $Resume = M("resume")->where("id=" . $record['bt_id'])->find(); $record['bt_username'] = $Resume['username']; $job = M("job")->where("id='{$record['j_id']}'")->find(); //职位名称 if (!$job['title']) { $record['title'] = M("casclist")->where("id='{$job['Jobcate']}'")->getField("cascname"); } else { $record['title'] = $job['title']; } $record['t_username'] = M("member")->where("id='{$Resume['t_id']}'")->getField("username"); $record['state'] = getDataName('zzstart', $Resume['state']); $record['mobile'] = $Resume['mobile']; $record['sink'] = $record['sink'] == 1 ? "未打款" : "已打款"; $Resume['posttime'] = $record['posttime'] != 0 ? date("Y-m-d", $record['posttime']) : ""; $record['audstart_status'] = $record[audstart]; $record['audstart'] = M("cascadedata")->where("datavalue='{$record['audstart']}' and datagroup='audstart'")->getField("dataname"); $record['audstartdate'] = $record['audstartdate'] ? $record['audstartdate'] : "电话沟通"; } } $show = $page->show(); } else { $arRecordList = false; } } $arAudreasonList = M("cascadedata")->where("datagroup='audstart'")->order("orderid asc")->select(); $this->assign("company", $checkUserPavi); $this->assign("arAudreasonList", $arAudreasonList); $this->assign("checked", $checked); $this->assign("arRecordList", $arRecordList); $this->assign("page", $show); $this->assign("arJobList", $arJobList); $this->assign("first_class", 4); $this->display("new_resume_list"); }
public $final_content_type; public $final_expiration_timestamp = ""; } $response = new response(); //var_dump($response->toJson()); register_shutdown_function(function () use(&$response) { echo $response->toJson(); }); if (!hasData()) { $response->errors[] = 'upload_data NOT found in POST data! this variable is required.'; return false; } $dataContentType = getDataContentType(); $response->final_content_type = $dataContentType; $strictFilename = getStrictFilenameOption(); $dataName = getDataName($dataContentType); $expire = getExpire(); $response->final_expiration_timestamp = $expire; $hidden = getHidden(); $uploadDate = time(); $failOffset = 0; if (!validateDataName($dataName, $failOffset)) { if ($strictFilename) { $response->errors[] = 'dataName is invalid, and strict_filename is enabled. can not continue. offending dataName character start at byte offset ' . $failOffset; return false; } $dataName = sanitizeDataName($dataName); $response->warnings[] = 'dataName is invalid. offending dataName character start at byte offset ' . $failOffset . '. dataName has been transliterated/sanitized from UTF8 to ASCII with iconv, and truncated to 255 bytes. the new dataName is: ' . $dataName; } $response->final_filename = $dataName; $clientIP = getClientIP();