Esempio n. 1
0
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;
}
Esempio n. 2
0
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;
}
Esempio n. 3
0
} elseif ($act == 'resume_show') {
    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']);
Esempio n. 4
0
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);
}
Esempio n. 5
0
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;
}
Esempio n. 6
0
    }
    $smarty->display('wap/personal/wap-edit-edu-experience.html');
} elseif ($act == "resume_education_save") {
    // print_r($_POST);die;
    $_POST = array_map("utf8_to_gbk", $_POST);
    $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_education = get_resume_education($_SESSION['uid'], intval($_POST['pid']));
    if (count($resume_education) >= 6) {
        exit('教育经历不能超过6条');
    }
    $setsqlarr['school'] = trim($_POST['school']) ? trim($_POST['school']) : exit('请填写学校名称!');
    $setsqlarr['speciality'] = trim($_POST['speciality']) ? trim($_POST['speciality']) : WapShowMsg("请填写专业名称!");
    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['education'] = trim($_POST['education'])?trim($_POST['education']):WapShowMsg("请选择获得学历",0);
    // $setsqlarr['education_cn'] = trim($_POST['education_cn'])?trim($_POST['education_cn']):WapShowMsg("请选择获得学历",0);
    if ($id) {