コード例 #1
0
ファイル: personal_resume.php プロジェクト: winiceo/fenzhan
        $auto_apply_row = $db->getone("select * from " . table("resume_entrust") . " where id={$pid} and uid={$uid} and entrust_end>{$time} ");
        if (empty($auto_apply_row)) {
            $setarr_apply['id'] = $pid;
            $setarr_apply['uid'] = $uid;
            $setarr_apply['fullname'] = $resume_basic['fullname'];
            $setarr_apply['entrust'] = 1;
            $setarr_apply['entrust_start'] = time();
            $setarr_apply['entrust_end'] = $time + 3600 * 24 * 3;
            $setarr_apply['isshield'] = 0;
            $setarr_apply['resume_addtime'] = $resume_basic['addtime'];
            $db->inserttable(table("resume_entrust"), $setarr_apply);
            $db->query("update " . table("resume") . " set entrust=1 where id={$pid} and uid={$uid} ");
        }
    }
    $make = intval($_POST['make']);
    check_resume($uid, $pid);
    if ($make == 1) {
        header("Location: ?act=make1_succeed&pid=" . $pid);
    } else {
        header("Location: ?act=resume_list");
    }
} elseif ($act == 'edit_resume') {
    $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);
コード例 #2
0
ファイル: fun_personal.php プロジェクト: winiceo/job
function do_import_resume($info, $uid)
{
    global $db, $_CFG, $timestamp;
    if ($info && $uid) {
        require_once QISHI_ROOT_PATH . '/include/fun_import.php';
        if (empty($info['basicinfo'])) {
            return false;
        }
        $info['basicinfo']['fullname'] = unicode_decode($info['basicinfo']['fullname']);
        $setsqlarr = iconv_to_gbk($info['basicinfo']);
        $setsqlarr['uid'] = intval($uid);
        $setsqlarr['title'] = "未命名简历";
        $setsqlarr['display_name'] = 1;
        $setsqlarr['sex'] = $setsqlarr['sex_cn'] == '男' ? 1 : 2;
        $experience = match_experience($setsqlarr['experience_cn']);
        $setsqlarr['experience_cn'] = $experience[1];
        $setsqlarr['experience'] = $experience[0];
        $setsqlarr['email_notify'] = 1;
        $setsqlarr['marriage'] = $setsqlarr['marriage_cn'] == '已婚' ? 2 : 1;
        $intentionjobsarr = explode('、', $setsqlarr['intention_jobs']);
        $match_jobs_id_arr = array();
        $match_jobs_cn_arr = array();
        foreach ($intentionjobsarr as $key => $value) {
            $match_jobs_arr = match_jobs_category($value);
            if ($match_jobs_arr) {
                $match_jobs_id_arr[] = $match_jobs_arr['topclass'] . '.' . $match_jobs_arr['category'] . '.' . $match_jobs_arr['subclass'];
                $match_jobs_cn_arr[] = $match_jobs_arr['category_cn'];
            }
        }
        $setsqlarr['intention_jobs'] = !empty($match_jobs_cn_arr) ? implode(',', $match_jobs_cn_arr) : '';
        $intention_jobs_id = !empty($match_jobs_id_arr) ? implode(',', $match_jobs_id_arr) : '';
        $tradearr = explode('、', $setsqlarr['trade_cn']);
        $match_trade_id_arr = array();
        foreach ($tradearr as $key => $value) {
            $match_trade_arr = match_trade($value);
            if ($match_trade_arr) {
                $match_trade_id_arr[] = $match_jobs_arr['id'];
            }
        }
        $intentiontrade = !empty($match_trade_id_arr) ? implode(',', $match_trade_id_arr) : '';
        $districtarr = explode('、', $setsqlarr['district_cn']);
        $match_district_id_arr = array();
        foreach ($districtarr as $key => $value) {
            $match_district_arr = match_district($value);
            if ($match_district_arr) {
                $match_district_id_arr[] = $match_district_arr['district'] . '.' . $match_district_arr['sdistrict'];
            }
        }
        $intentiondistrict = !empty($match_district_id_arr) ? implode(',', $match_district_id_arr) : '';
        $match_current_arr = match_current($setsqlarr['current_cn']);
        if ($match_current_arr) {
            $setsqlarr['current'] = $match_current_arr['id'];
            $setsqlarr['current_cn'] = $match_current_arr['cn'];
        }
        $match_nature_arr = match_nature($setsqlarr['nature_cn']);
        if ($match_nature_arr) {
            $setsqlarr['nature'] = $match_nature_arr['id'];
            $setsqlarr['nature_cn'] = $match_nature_arr['cn'];
        }
        $match_wage_arr = match_wage($setsqlarr['wage_cn']);
        if ($match_wage_arr) {
            $setsqlarr['wage'] = $match_wage_arr['id'];
            $setsqlarr['wage_cn'] = $match_wage_arr['cn'];
        }
        $setsqlarr['refreshtime'] = $timestamp;
        $setsqlarr['audit'] = intval($_CFG['audit_resume']);
        $setsqlarr['resume_from_pc'] = 1;
        $setsqlarr['addtime'] = $timestamp;
        $pid = $db->inserttable(table('resume'), $setsqlarr, 1);
        if ($pid) {
            $searchtab['id'] = $pid;
            $searchtab['uid'] = $uid;
            $db->inserttable(table('resume_search_key'), $searchtab);
            $db->inserttable(table('resume_search_rtime'), $searchtab);
            add_resume_jobs($pid, $uid, $intention_jobs_id) ? "" : showmsg('保存失败!', 0);
            add_resume_district($pid, $uid, $intentiondistrict) ? "" : showmsg('保存失败!', 0);
            add_resume_trade($pid, $uid, $intentiontrade) ? "" : showmsg('保存失败!', 0);
            if (!get_userprofile($uid)) {
                $infoarr['realname'] = $setsqlarr['fullname'];
                $infoarr['sex'] = $setsqlarr['sex'];
                $infoarr['sex_cn'] = $setsqlarr['sex_cn'];
                $infoarr['birthday'] = $setsqlarr['birthdate'];
                $infoarr['residence'] = $setsqlarr['residence'];
                $infoarr['experience'] = $setsqlarr['experience'];
                $infoarr['experience_cn'] = $setsqlarr['experience_cn'];
                $infoarr['householdaddress'] = $setsqlarr['householdaddress'];
                $infoarr['marriage'] = $setsqlarr['marriage'];
                $infoarr['marriage_cn'] = $setsqlarr['marriage_cn'];
                $infoarr['phone'] = $setsqlarr['telephone'];
                $infoarr['email'] = $setsqlarr['email'];
                $infoarr['uid'] = intval($uid);
                $db->inserttable(table('members_info'), $infoarr);
            }
            //教育经历
            if (!empty($info['eduinfo'])) {
                foreach ($info['eduinfo'] as $key => $value) {
                    $eduarrsql = iconv_to_gbk($value);
                    $eduarrsql['pid'] = $pid;
                    $eduarrsql['uid'] = $uid;
                    $match_education_arr = match_education($eduarrsql['education_cn']);
                    if ($match_education_arr) {
                        $eduarrsql['education'] = $match_education_arr['id'];
                        $eduarrsql['education_cn'] = $match_education_arr['cn'];
                    }
                    $db->inserttable(table("resume_education"), $eduarrsql);
                }
            }
            //工作经历
            if (!empty($info['workinfo'])) {
                foreach ($info['workinfo'] as $key => $value) {
                    $workarrsql = iconv_to_gbk($value);
                    $workarrsql['pid'] = $pid;
                    $workarrsql['uid'] = $uid;
                    $db->inserttable(table("resume_work"), $workarrsql);
                }
            }
            //培训经历
            if (!empty($info['traininginfo'])) {
                foreach ($info['traininginfo'] as $key => $value) {
                    $trainingarrsql = iconv_to_gbk($value);
                    $trainingarrsql['pid'] = $pid;
                    $trainingarrsql['uid'] = $uid;
                    $db->inserttable(table("resume_training"), $trainingarrsql);
                }
            }
            //语言能力
            if (!empty($info['languageinfo'])) {
                foreach ($info['languageinfo'] as $key => $value) {
                    $languagearrsql = iconv_to_gbk($value);
                    $languagearrsql['pid'] = $pid;
                    $languagearrsql['uid'] = $uid;
                    $match_language_arr = match_language($languagearrsql['language_cn']);
                    if ($match_language_arr) {
                        $languagearrsql['language'] = $match_language_arr['id'];
                        $languagearrsql['language_cn'] = $match_language_arr['cn'];
                    }
                    $match_language_level_arr = match_language_level($languagearrsql['level_cn']);
                    if ($match_language_level_arr) {
                        $languagearrsql['level'] = $match_language_level_arr['id'];
                        $languagearrsql['level_cn'] = $match_language_level_arr['cn'];
                    }
                    $db->inserttable(table("resume_language"), $languagearrsql);
                }
            }
            //证书
            if (!empty($info['credentinfo'])) {
                foreach ($info['credentinfo'] as $key => $value) {
                    $credentarrsql = iconv_to_gbk($value);
                    $credentarrsql['pid'] = $pid;
                    $credentarrsql['uid'] = $uid;
                    $db->inserttable(table("resume_credent"), $credentarrsql);
                }
            }
            check_resume($uid, $pid);
            write_memberslog($uid, 2, 1101, $_SESSION['username'], "导入了简历");
            return true;
        } else {
            return false;
        }
    } else {
        return false;
    }
}
コード例 #3
0
 $user_info['education_cn'] = $setsqlarr['education_cn'];
 $user_info['experience'] = $setsqlarr['experience'];
 $user_info['experience_cn'] = $setsqlarr['experience_cn'];
 $user_info['phone'] = $setsqlarr['telephone'];
 $db->inserttable(table('members_info'), $user_info);
 // 创建 简历
 $setsqlarr['uid'] = $insert_id;
 $pid = $db->inserttable(table('resume'), $setsqlarr, 1);
 $searchtab['id'] = $pid;
 $searchtab['uid'] = $insert_id;
 $db->inserttable(table('resume_search_key'), $searchtab);
 $db->inserttable(table('resume_search_rtime'), $searchtab);
 add_resume_jobs($pid, $insert_id, $_POST['intention_jobs_id']);
 add_resume_district($pid, $_SESSION['uid'], $_POST['district']);
 add_resume_trade($pid, $_SESSION['uid'], $_POST['trade']);
 check_resume($_SESSION['uid'], $pid);
 // 直接投递简历
 $jobsarr = app_get_jobs($_POST['jobsid']);
 foreach ($jobsarr as $jobs) {
     $jobs = array_map("addslashes", $jobs);
     $addarr['resume_id'] = $pid;
     $addarr['resume_name'] = $setsqlarr['fullname'];
     $addarr['personal_uid'] = $insert_id;
     $addarr['jobs_id'] = $jobs['id'];
     $addarr['jobs_name'] = $jobs['jobs_name'];
     $addarr['company_id'] = $jobs['company_id'];
     $addarr['company_name'] = $jobs['companyname'];
     $addarr['company_uid'] = $jobs['uid'];
     $addarr['apply_addtime'] = time();
     $addarr['personal_look'] = 1;
     $addarr['is_apply'] = 1;
コード例 #4
0
ファイル: leven.php プロジェクト: winiceo/job
function createResume($obj)
{
    unset($obj["id"]);
    if (!$obj["title"]) {
        $obj["title"] = $obj["fullname"] . "的简历";
    }
    //dump($obj);
    $obj["sex"] = $obj["sex_cn"] == "男" ? 1 : 2;
    $nature = getId($obj["nature_cn"], "QS_jobs_nature");
    if ($nature) {
        $obj["nature"] = $nature["c_id"];
    } else {
        $obj["nature"] = 62;
        $obj["nature_cn"] = "全职";
    }
    $obj["trade_cn"] = "其他行业";
    $obj["trade"] = 45;
    $obj["height"] = 0;
    $obj["height"] = 0;
    $obj['marriage'] = 0;
    $obj['marriage_cn'] = "未婚";
    $experience_cn = get_reg($obj["experience_cn"]);
    if ($experience_cn) {
        $obj['experience_cn'] = $experience_cn;
        $obj['experience'] = getId($experience_cn, "QS_experience")["c_id"];
    } else {
        $obj['experience_cn'] = "无经验";
        $obj['experience'] = 74;
    }
    $wage_cn = get_reg($obj["wage_cn"]);
    if ($wage_cn) {
        $obj['wage_cn'] = $wage_cn;
        $obj['wage'] = getId($wage_cn, "QS_wage")["c_id"];
    } else {
        $obj['wage_cn'] = "面议";
        $obj['wage'] = 294;
    }
    $education_cn = get_reg($obj["education_cn"]);
    if ($education_cn) {
        $obj['education_cn'] = $education_cn;
        $obj['education'] = getId($education_cn, "QS_education")["c_id"];
    } else {
        $obj['education_cn'] = "初中";
        $obj['education'] = 65;
    }
    $major_cn = get_reg($obj["major_cn"]);
    if ($major_cn) {
        $obj['major_cn'] = $major_cn;
        $obj['major'] = getId($major_cn, "QS_major")["c_id"];
    } else {
        $obj['major_cn'] = "其他专业";
        $obj['major'] = 290;
    }
    $obj['tag_cn'] = "";
    $obj['tag'] = "";
    $obj['specialty'] = "";
    $obj['photo_img'] = "";
    $obj['addtime'] = time();
    $obj['refreshtime'] = time();
    $obj['level'] = 1;
    $obj["current_cn"] = "观望有好的机会再考虑";
    $obj["current"] = 243;
    $obj["word_resume"] = "";
    $obj["key"] = "";
    $obj["tpl"] = "";
    $obj["status"] = 0;
    //  dump($obj);
    //exit;
    $new = \ORM::for_table(table('resume'))->create($obj);
    $a = $new->save();
    $searchtab['id'] = $new->id;
    $searchtab['uid'] = $obj['uid'];
    $db = Leven::db();
    require_once ROOT . 'include/fun_personal.php';
    $db->inserttable(table('resume_search_key'), $searchtab);
    $db->inserttable(table('resume_search_rtime'), $searchtab);
    check_resume($obj["uid"], $new->id);
    //      dump($a);
}
コード例 #5
0
ファイル: wap_user.php プロジェクト: source-hunter/74cms
    $setsqlarr['agency'] = trim($_POST['agency']) ? trim($_POST['agency']) : exit('请填写培训机构名称!');
    $setsqlarr['course'] = trim($_POST['course']) ? trim($_POST['course']) : 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']);
    if ($id) {
        $db->updatetable(table("resume_training"), $setsqlarr, array("id" => $id, "uid" => intval($_SESSION['uid'])));
        exit("ok");
    } else {
        $insert_id = $db->inserttable(table("resume_training"), $setsqlarr, 1);
        if ($insert_id) {
            check_resume($_SESSION['uid'], intval($_REQUEST['pid']));
            exit("ok");
        } else {
            exit("err");
        }
    }
} elseif ($act == "resume_train_del") {
    $smarty->cache = false;
    $id = intval($_GET['train_id']);
    $uid = intval($_SESSION["uid"]);
    $sql = "delete from " . table("resume_training") . " where id={$id} and uid={$uid} ";
    if ($db->query($sql)) {
        exit("ok");
    } else {
        exit("err");
    }