function wap_get_down_resume($offset, $perpage, $get_sql = '') { global $db; $limit = " LIMIT " . intval($offset) . ',' . intval($perpage); $selectstr = " d.*,r.subsite_id,r.uid as ruid,r.fullname,r.display_name,r.sex_cn,r.sex,r.education_cn,r.experience_cn,r.intention_jobs,r.district_cn,r.wage_cn,r.trade_cn,r.major_cn,r.nature_cn,r.birthdate,r.addtime,r.refreshtime "; $result = $db->query("SELECT " . $selectstr . " FROM " . table('company_down_resume') . " as d {$get_sql} ORDER BY d.down_addtime DESC " . $limit); while ($row = $db->fetch_array($result)) { $row['fullname_'] = $row['fullname']; $row['fullname'] = cut_str($row['fullname'], 4, 0, "..."); $row['resume_url'] = wap_url_rewrite("resume-show", array("id" => $row['resume_id']), 1, $row['subsite_id']); $row['intention_jobs_'] = $row['intention_jobs']; $row['intention_jobs'] = cut_str($row['intention_jobs'], 30, 0, "..."); $y = date("Y"); $row['age'] = $y - $row['birthdate']; /* 教育经历 培训经历 */ $row['resume_education_list'] = get_resume_education($row['ruid'], $row['resume_id']); $row['resume_work_list'] = get_resume_work($row['ruid'], $row['resume_id']); /* 获取简历标记 */ $row_state = get_resume_state($_SESSION['uid'], $row['resume_id']); $row['resume_state'] = $row_state['resume_state']; $row['resume_state_cn'] = $row_state['resume_state_cn']; $row_arr[] = $row; } return $row_arr; }
check_permissions($_SESSION['admin_purview'], "resume_show"); $id = !empty($_REQUEST['id']) ? intval($_REQUEST['id']) : adminmsg("你没有选择简历!", 1); $uid = intval($_REQUEST['uid']); $smarty->assign('pageheader', "查看简历"); $resume = get_resume_basic($uid, $id); if (empty($resume)) { $link[0]['text'] = "返回简历列表"; $link[0]['href'] = '?act=list'; adminmsg('简历不存在或已经被删除!', 1, $link); } $smarty->assign('random', mt_rand()); $smarty->assign('time', time()); $smarty->assign('url', $_SERVER["HTTP_REFERER"]); $smarty->assign('resume', $resume); $smarty->assign('resume_education', get_resume_education($uid, $id)); $smarty->assign('resume_work', get_resume_work($uid, $id)); $smarty->assign('resume_training', get_resume_training($uid, $id)); $smarty->assign('resumeaudit', get_resumeaudit_one($id)); $smarty->display('personal/admin_personal_resume_show.htm'); } elseif ($act == 'del_auditreason') { check_permissions($_SESSION['admin_purview'], "resume_audit"); $id = !empty($_REQUEST['a_id']) ? $_REQUEST['a_id'] : adminmsg("你没有选择日志!", 1); $n = reasonaudit_del($id); if ($n > 0) { adminmsg("删除成功!共删除 {$n} 行", 2); } else { adminmsg("删除失败!", 0); } } elseif ($act == 'management') { $id = intval($_GET['id']); $u = get_user($id);
function get_view_users($offset, $perpage, $get_sql = '') { global $db, $_CFG; $limit = " LIMIT {$offset},{$perpage}"; $result = $db->query("SELECT * FROM " . table('view_jobs') . " {$get_sql} ORDER BY `id` DESC {$limit}"); while ($row = $db->fetch_array($result)) { $personal_userinfo = $db->getone("select `username` from " . table('members') . " where `uid`=" . $row['uid']); $row['username'] = $personal_userinfo['username']; $jobsname = $db->getone("select `jobs_name`,`subsite_id` from " . table('jobs') . " where `id`=" . $row['jobsid']); if (empty($jobsname)) { $jobsname = $db->getone("select `jobs_name`,`subsite_id` from " . table('jobs_tmp') . " where `id`=" . $row['jobsid']); } $row['jobs_name'] = $jobsname['jobs_name']; $row['jobs_url'] = url_rewrite("QS_jobsshow", array('id' => $row['jobsid']), 1, $jobsname['subsite_id']); $resumes = $db->getall("select * from " . table('resume') . " where `uid`=" . $row['uid'] . $wheresql); if (empty($resumes)) { continue; } //将谁看过我的职位数据的id/addtime循环简历的时候要保存一份 $did = $row['id']; $addtime = date('Y-m-d', $row['addtime']); foreach ($resumes as $key1 => $value1) { $value1['resume_url'] = url_rewrite("QS_resumeshow", array('id' => $value1['id']), 1, $value1['subsite_id']); $value1["jobs_name"] = $row['jobs_name']; $value1["jobs_url"] = $row['jobs_url']; $value1["fullname"] = $value1['fullname']; if (intval($value1['birthdate']) == 0) { $value1['age'] = ''; } else { $value1["age"] = date('Y') - $value1['birthdate']; } //判断是否收藏过 if (check_favorites($value1['id'], $_SESSION['uid'])) { $value1['is_favorites'] = 1; } /* 教育经历 培训经历 */ $value1['resume_education_list'] = get_resume_education($value1['uid'], $value1['id']); $value1['resume_work_list'] = get_resume_work($value1['uid'], $value1['id']); $row = $value1; } $row["did"] = $did; $row["addtime"] = $addtime; $row_arr[] = $row; } return $row_arr; }
exit($contents); } elseif ($act == "sendtoemail") { global $_CFG; $uid = intval($_GET['uid']); $resume_id = intval($_GET['resume_id']); $email = trim($_GET['email']); $resume_basic = get_resume_basic($resume_id); if ($resume_basic['tag_cn']) { $resume_tag = explode(',', $resume_basic['tag_cn']); $tag_str = '<p>'; foreach ($resume_tag as $value) { $tag_str .= '<span style="color: #656565;display:inline-block;background-color: #f2f4f7; border: 1px solid #d6d6d7;text-align: center;height:30px;line-height: 30px;margin-right:10px;padding:0 10px">' . $value . '</span>'; } $tag_str .= '</p>'; } $resume_work = get_resume_work($uid, $resume_id); $show_contact = false; if ($_CFG['showapplycontact'] == '1' || $_CFG['showresumecontact'] == '0') { $show_contact = '<p>手机号码:' . $resume_basic["telephone"] . ' 电子邮箱:' . $resume_basic["email"] . '</p>'; } else { $show_contact = '<p>联系方式:<a href=' . url_rewrite('QS_resumeshow', array('id' => $resume_id)) . '>点击查看</a></p>'; } $htm = '<div style="width: 900px;margin: 0 auto;font-size: 14px;"> <div style="margin-bottom:10px"> <div style="float: left;"><a href="' . $_CFG['site_dir'] . '"><img src="' . $_CFG['site_domain'] . $_CFG['upfiles_dir'] . $_CFG['web_logo'] . '" alt="' . $_CFG['site_name'] . '" border="0" align="absmiddle" width=180 height=50 /></div> <div style="float: right;padding-top:10px;">' . $templates . '更新时间:' . date("Y-m-d", $resume_basic["refreshtime"]) . '</div> <div style="clear:both"></div> </div> <div style="padding-bottom: 10px;"> <span style="font-size: 18px;font-weight: 700;">' . $resume_basic["fullname"] . '</span><span>(' . $resume_basic["sex_cn"] . ',' . $resume_basic["age"] . ')</span> <p>学历:' . $resume_basic["education_cn"] . ' | 专业:' . $resume_basic["major_cn"] . ' | 工作经验:' . $resume_basic["experience_cn"] . '年 | 现居住地:' . $resume_basic["residence"] . '</p>
function get_outward_resumes_tpl($uid, $resume_id) { global $_CFG; $uid = intval($uid); $resume_id = intval($resume_id); $resume_basic = get_resume_basic($uid, $resume_id); if ($resume_basic['tag_cn']) { $resume_tag = explode(',', $resume_basic['tag_cn']); $tag_str = '<p>'; foreach ($resume_tag as $value) { $tag_str .= '<span style="color: #656565;display:inline-block;background-color: #f2f4f7; border: 1px solid #d6d6d7;text-align: center;height:30px;line-height: 30px;margin-right:10px;padding:0 10px">' . $value . '</span>'; } $tag_str .= '</p>'; } $resume_work = get_resume_work($uid, $resume_id); $show_contact = false; if ($_CFG['showapplycontact'] == '1' || $_CFG['showresumecontact'] == '0') { $show_contact = '<p>手机号码:' . $resume_basic["telephone"] . ' 电子邮箱:' . $resume_basic["email"] . '</p>'; } else { $show_contact = '<p>联系方式:<a href=' . url_rewrite('QS_resumeshow', array('id' => $resume_id)) . '>点击查看</a></p>'; } $htm = '<div style="width: 900px;margin: 0 auto;font-size: 14px;"> <div style="margin-bottom:10px"> <div style="float: left;"><a href="' . $_CFG['site_domain'] . $_CFG['site_dir'] . '"><img src="' . $_CFG['site_domain'] . $_CFG['upfiles_dir'] . $_CFG['web_logo'] . '" alt="' . $_CFG['site_name'] . '" border="0" align="absmiddle" width=180 height=50 /></div> <div style="float: right;padding-top:10px;">' . $templates . '更新时间:' . date("Y-m-d", $resume_basic["refreshtime"]) . '</div> <div style="clear:both"></div> </div> <div style="padding-bottom: 10px;"> <span style="font-size: 18px;font-weight: 700;">' . $resume_basic["fullname"] . '</span><span>(' . $resume_basic["sex_cn"] . ',' . $resume_basic["age"] . ')</span> <p>学历:' . $resume_basic["education_cn"] . ' | 专业:' . $resume_basic["major_cn"] . ' | 工作经验:' . $resume_basic["experience_cn"] . '年 | 现居住地:' . $resume_basic["residence"] . '</p> ' . $show_contact . $tag_str . ' </div> <div style="padding-bottom: 10px;"> <p style="font-size: 16px;font-weight: 700;">求职意向</p> <p>期望职位:' . $resume_basic["intention_jobs"] . '</p> <p>期望薪资:' . $resume_basic["wage_cn"] . '</p> <p>期望地区:' . $resume_basic["district_cn"] . '</p> </div> <div style="padding-bottom: 10px;"> <p style="font-size: 16px;font-weight: 700;">工作经验</p>'; if (!empty($resume_work)) { foreach ($resume_work as $value) { $htm .= '<div> <p style="font-size: 14px;font-weight: 700;">' . $value["companyname"] . '</p> <p>' . $value["startyear"] . '年' . $value["startmonth"] . '月-' . $value["endyear"] . '年' . $value["endmonth"] . '月 ' . $value["jobs"] . '</p> <div style="float: left;width: 100px;">工作内容:</div> <div style="float: right;width: 800px;">' . $value["achievements"] . '</div> <div style="clear:both"></div> </div>'; } } else { $htm .= '<div> 没有填写工作经历 </div>'; } $htm .= '</div>'; if ($resume_basic["specialty"]) { $htm .= '<div style="padding-bottom: 10px;"> <p style="font-size: 16px;font-weight: 700;">自我描述</p> <p>' . $resume_basic["specialty"] . '</p> </div>'; } $htm .= '<div style="text-align: center;margin-top:20px"> 该简历来自<a href="' . $_CFG["site_domain"] . $_CFG["site_dir"] . '">' . $_CFG["site_name"] . '</a> </div> </div>'; return $htm; }
function get_apply_jobs($offset, $perpage, $get_sql = '') { global $db; $limit = " LIMIT {$offset},{$perpage}"; $selectstr = " a.*,r.uid as ruid,r.fullname,r.display_name,r.sex_cn,r.sex,r.education_cn,r.experience_cn,r.intention_jobs,r.district_cn,r.wage_cn,r.trade_cn,r.nature_cn,r.birthdate,r.addtime,r.refreshtime"; $result = $db->query("SELECT {$selectstr} FROM " . table('personal_jobs_apply') . " as a {$get_sql} ORDER BY a.personal_look ASC , a.did DESC {$limit}"); while ($row = $db->fetch_array($result)) { if ($row['display_name'] == "2") { $row['fullname'] = "N" . str_pad($row['id'], 7, "0", STR_PAD_LEFT); } elseif ($row['display_name'] == "3") { if ($row['sex'] == 1) { $row['fullname'] = cut_str($row['fullname'], 1, 0, "先生"); } elseif ($row['sex'] == 2) { $row['fullname'] = cut_str($row['fullname'], 1, 0, "女士"); } } $row['jobs_name_'] = cut_str($row['jobs_name'], 7, 0, "..."); $row['specialty_'] = $row['specialty']; $row['specialty'] = cut_str($row['specialty'], 30, 0, "..."); $row['resume_url'] = url_rewrite('QS_resumeshow', array('id' => $row['resume_id'], 'apply' => 1)); $row['jobs_url'] = url_rewrite('QS_jobsshow', array('id' => $row['jobs_id'])); $y = date("Y"); $row['age'] = $y - $row['birthdate']; /* 教育经历 培训经历 */ $row['resume_education_list'] = get_resume_education($row['ruid'], $row['resume_id']); $row['resume_work_list'] = get_resume_work($row['ruid'], $row['resume_id']); /* 获取简历标记 */ $row_state = get_resume_state($_SESSION['uid'], $row['resume_id']); $row['resume_state'] = $row_state['resume_state']; $row['resume_state_cn'] = $row_state['resume_state_cn']; $row_arr[] = $row; } return $row_arr; }
function check_resume($uid, $pid) { global $db, $timestamp, $_CFG; $uid = intval($uid); $pid = intval($pid); $percent = 0; $resume_basic = get_resume_basic($uid, $pid); $resume_education = get_resume_education($uid, $pid); $resume_work = get_resume_work($uid, $pid); $resume_training = get_resume_training($uid, $pid); $resume_tag = $resume_basic['tag']; $resume_specialty = $resume_basic['specialty']; $resume_photo = $resume_basic['photo_img']; $resume_language = get_resume_language($uid, $pid); $resume_credent = get_resume_credent($uid, $pid); $resume_img = get_resume_img($uid, $pid); if (!empty($resume_basic)) { $percent = $percent + 35; } if (!empty($resume_education)) { $percent = $percent + 15; } if (!empty($resume_work)) { $percent = $percent + 15; } if (!empty($resume_training)) { $percent = $percent + 5; } if (!empty($resume_tag)) { $percent = $percent + 5; } if (!empty($resume_specialty)) { $percent = $percent + 5; } if (!empty($resume_photo)) { $percent = $percent + 5; } if (!empty($resume_language)) { $percent = $percent + 5; } //语言 if (!empty($resume_credent)) { $percent = $percent + 5; } //证书 if (!empty($resume_img)) { $percent = $percent + 5; } //附件 if ($resume_basic['photo_img'] && $resume_basic['photo_audit'] == "1" && $resume_basic['photo_display'] == "1") { $setsqlarr['photo'] = 1; } else { $setsqlarr['photo'] = 0; } $setsqlarr['complete_percent'] = $percent; require_once QISHI_ROOT_PATH . 'include/splitword.class.php'; $sp = new SPWord(); $setsqlarr['key'] = addslashes($resume_basic['intention_jobs']) . addslashes($resume_basic['recentjobs']) . addslashes($resume_basic['specialty']); $setsqlarr['key'] = addslashes($resume_basic['fullname']) . $sp->extracttag($setsqlarr['key']); $setsqlarr['key'] = str_replace(",", " ", addslashes($resume_basic['intention_jobs'])) . " {$setsqlarr['key']} " . addslashes($resume_basic['education_cn']); $setsqlarr['key'] = $sp->pad($setsqlarr['key']); if (!empty($resume_education)) { foreach ($resume_education as $li) { $setsqlarr['key'] = addslashes($li['school']) . " {$setsqlarr['key']} " . addslashes($li['speciality']); } } if (!empty($resume_work)) { foreach ($resume_work as $li) { $setsqlarr['key'] = addslashes($li['companyname']) . " {$setsqlarr['key']} " . addslashes($li['speciality']); } } if (!empty($resume_training)) { foreach ($resume_training as $li) { $setsqlarr['key'] = addslashes($li['agency']) . " {$setsqlarr['key']} " . addslashes($li['speciality']); } } $setsqlarr['refreshtime'] = $timestamp; if ($setsqlarr['complete_percent'] < 60) { $setsqlarr['level'] = 1; } elseif ($setsqlarr['complete_percent'] >= 60 && $setsqlarr['complete_percent'] < 80) { $setsqlarr['level'] = 2; } elseif ($setsqlarr['complete_percent'] >= 80) { $setsqlarr['level'] = 3; } $db->updatetable(table('resume'), $setsqlarr, "uid='{$uid}' AND id='{$pid}'"); // distribution_resume($pid,$uid); $j = get_resume_basic($uid, $pid); $j = array_map("addslashes", $j); $searchtab['sex'] = $j['sex']; $searchtab['nature'] = $j['nature']; $searchtab['marriage'] = $j['marriage']; $searchtab['experience'] = $j['experience']; $searchtab['district'] = $j['district']; $searchtab['sdistrict'] = $j['sdistrict']; $searchtab['wage'] = $j['wage']; $searchtab['education'] = $j['education']; $searchtab['current'] = $j['current']; $searchtab['major'] = $j['major']; $searchtab['photo'] = $j['photo']; $searchtab['refreshtime'] = $j['refreshtime']; $searchtab['talent'] = $j['talent']; $searchtab['audit'] = $j['audit']; $db->updatetable(table('resume_search_rtime'), $searchtab, "uid='{$uid}' AND id='{$pid}'"); $searchtab['key'] = $j['key']; $searchtab['likekey'] = $j['intention_jobs'] . ',' . $j['trade_cn'] . ',' . $j['specialty'] . ',' . $j['fullname']; $db->updatetable(table('resume_search_key'), $searchtab, "uid='{$uid}' AND id='{$pid}'"); unset($searchtab); }
} $smarty->display('wap/personal/wap-edit-work-experience.html'); } elseif ($act == "resume_work_save") { $_POST = array_map("utf8_to_gbk", $_POST); // print_r($_POST);die; $id = intval($_POST['id']); $setsqlarr['uid'] = intval($_SESSION['uid']); $setsqlarr['pid'] = intval($_POST['pid']); if ($setsqlarr['uid'] == 0 || $setsqlarr['pid'] == 0) { exit('简历不存在'); } $resume_basic = get_resume_basic(intval($_SESSION['uid']), intval($_POST['pid'])); if (empty($resume_basic)) { exit('请先填写简历基本信息'); } $resume_work = get_resume_work($_SESSION['uid'], intval($_POST['pid'])); if (count($resume_work) >= 6) { exit('工作经历不能超过6条'); } $setsqlarr['companyname'] = trim($_POST['companyname']) ? trim($_POST['companyname']) : exit('请填写公司名称!'); $setsqlarr['jobs'] = trim($_POST['jobs']) ? trim($_POST['jobs']) : exit("请填写职位名称!"); if (trim($_POST['startyear']) == "" || trim($_POST['startmonth']) == "" || trim($_POST['endyear']) == "" || trim($_POST['endmonth']) == "") { exit("请选择任职时间!"); } $setsqlarr['startyear'] = intval($_POST['startyear']); $setsqlarr['startmonth'] = intval($_POST['startmonth']); $setsqlarr['endyear'] = intval($_POST['endyear']); $setsqlarr['endmonth'] = intval($_POST['endmonth']); $setsqlarr['achievements'] = trim($_POST['achievements']) ? trim($_POST['achievements']) : exit("请填写工作职责!"); if ($id) { $db->updatetable(table("resume_work"), $setsqlarr, array("id" => $id, "uid" => intval($_SESSION['uid'])));