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); }