public function actionShow() { $resumeid = EnvUtil::getRequest("resumeid"); if (empty($resumeid)) { $this->error(Ibos::lang("Parameters error", "error")); } $resumeDetail = ResumeDetail::model()->fetch("resumeid=" . $resumeid); $prevAndNextPK = Resume::model()->fetchPrevAndNextPKByPK($resumeid); $contactList = ResumeContact::model()->fetchAll("resumeid=:resumeid", array(":resumeid" => $resumeid)); $interviewList = ResumeInterview::model()->fetchAll("resumeid=:resumeid", array(":resumeid" => $resumeid)); $bgcheckList = ResumeBgchecks::model()->fetchAll("resumeid=:resumeid", array(":resumeid" => $resumeid)); $avatarid = $resumeDetail["avatarid"]; if (empty($avatarid)) { $resumeDetail["avatarUrl"] = ""; } else { $avatar = AttachUtil::getAttachData($avatarid); $resumeDetail["avatarUrl"] = FileUtil::fileName(FileUtil::getAttachUrl() . "/" . $avatar[$avatarid]["attachment"]); } if (!empty($resumeDetail["attachmentid"])) { $resumeDetail["attach"] = AttachUtil::getAttach($resumeDetail["attachmentid"]); } $data = array("sidebar" => $this->getSidebar(), "resumeDetail" => ICResumeDetail::processShowData($resumeDetail), "prevAndNextPK" => $prevAndNextPK, "contactList" => ICResumeContact::processListData($contactList), "interviewList" => ICRecruitInterview::processListData($interviewList), "bgcheckList" => ICRecruitBgchecks::processListData($bgcheckList), "resumeid" => $resumeid); $this->setPageTitle(Ibos::lang("Show resume")); $this->setPageState("breadCrumbs", array(array("name" => Ibos::lang("Recruitment management"), "url" => $this->createUrl("resume/index")), array("name" => Ibos::lang("Talent management"), "url" => $this->createUrl("resume/index")), array("name" => Ibos::lang("Show resume")))); $this->render("show", $data); }
private function update() { if (Yii::app()->request->isAjaxRequest) { $contactid = EnvUtil::getRequest("contactid"); $data = ICResumeContact::processAddOrEditData($_POST); $modifySuccess = ResumeContact::model()->modify($contactid, $data); if ($modifySuccess) { $contact = ResumeContact::model()->fetchByPk($contactid); $contact["inputtime"] = date("Y-m-d", $contact["inputtime"]); $contact["input"] = User::model()->fetchRealnameByUid($contact["input"]); $contact["fullname"] = ResumeDetail::model()->fetchRealnameByResumeid($contact["resumeid"]); $contact["detail"] = StringUtil::cutStr($contact["detail"], 12); $this->ajaxReturn($contact); } else { $this->ajaxReturn(array("isSuccess" => 0)); } } }