Ejemplo n.º 1
0
 $uid = intval($_SESSION['uid']);
 $pid = intval($_REQUEST['pid']);
 if ($_GET['make'] == 1) {
     $title = "创建简历";
 } else {
     $title = "修改简历";
 }
 $smarty->assign('h_title', $title);
 $_SESSION['send_mobile_key'] = mt_rand(100000, 999999);
 $smarty->assign('send_key', $_SESSION['send_mobile_key']);
 $resume_basic = get_resume_basic($uid, $pid);
 $smarty->assign('resume_basic', $resume_basic);
 $smarty->assign('resume_education', get_resume_education($uid, $pid));
 $smarty->assign('resume_work', get_resume_work($uid, $pid));
 $smarty->assign('resume_training', get_resume_training($uid, $pid));
 $smarty->assign('resume_language', get_resume_language($uid, $pid));
 $smarty->assign('resume_credent', get_resume_credent($uid, $pid));
 $smarty->assign('resume_img', get_resume_img($uid, $pid));
 $smarty->assign('subsite', get_all_subsite());
 $subsite_cn = explode('/', $resume_basic['district_cn']);
 $smarty->assign('subsite_cn', $subsite_cn[0]);
 $smarty->assign('district_cn', $subsite_cn[1]);
 //地区二级
 $smarty->assign('district', get_subsite_district($resume_basic['district']));
 $resume_jobs = get_resume_jobs($pid);
 if ($resume_jobs) {
     foreach ($resume_jobs as $rjob) {
         $jobsid[] = $rjob['topclass'] . "." . $rjob['category'] . "." . $rjob['subclass'];
     }
     $resume_jobs_id = implode(",", $jobsid);
 }
Ejemplo n.º 2
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);
}