Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 private function update()
 {
     if (Yii::app()->request->isAjaxRequest) {
         $checkid = EnvUtil::getRequest("checkid");
         $data = ICRecruitBgchecks::processAddOrEditData($_POST);
         $modifySuccess = ResumeBgchecks::model()->modify($checkid, $data);
         if ($modifySuccess) {
             $bgcheck = ResumeBgchecks::model()->fetchByPk($checkid);
             $bgcheck["entrytime"] = $bgcheck["entrytime"] == 0 ? "-" : date("Y-m-d", $bgcheck["entrytime"]);
             $bgcheck["quittime"] = $bgcheck["entrytime"] == 0 ? "-" : date("Y-m-d", $bgcheck["quittime"]);
             $bgcheck["fullname"] = ResumeDetail::model()->fetchRealnameByResumeid($bgcheck["resumeid"]);
             $this->ajaxReturn($bgcheck);
         } else {
             $this->ajaxReturn(array("isSuccess" => 0));
         }
     }
 }