public function matchopportunitiesAction() { $client = PR_Session::getSession(PR_Session::SESSION_USER); $CandidateProfileID = $client['CandidateProfileID']; $PR_Api = new PR_Api_Core_CareerClass(); $skillList = $PR_Api->getListSkill(); $result = $PR_Api->getListOpportunity(); $industryListUnique = array(); $industryList = array(); // $experiencedUnique = array(); $experienced_List = array(); $countryUnique = array(); //$country_List = array(); $cityUnique = array(); $city_List = array(); $country_code = array(); $core = new PR_Api_Core_CandidateClass(); $oppList = array(); if ($result != "") { foreach ($result as $kk => $oppListInfo) { if ($oppListInfo['status'] == 1) { $industryListUnique[] = trim(strtolower($oppListInfo['industry'])); if ($oppListInfo['country'] != "" || !empty($oppListInfo['country'])) { $countryUnique[] = $oppListInfo['country']; } if ($oppListInfo['city'] != "" || !empty($oppListInfo['city'])) { $cityUnique[] = trim(strtolower($oppListInfo['city'])); } /* $hadApplied = $core->opportunityCandidateHadApplied($oppListInfo['OpportunityID'],$CandidateProfileID); if($hadApplied){ $oppListInfo['hadApplied'] =true ; $oppList[] = $oppListInfo; } else { $oppListInfo['hadApplied'] =false ; $oppList[] = $oppListInfo; } */ } // $experiencedUnique[] = $oppListInfo['experienced']; } $industryListUnique = array_unique($industryListUnique); $cityUnique = array_unique($cityUnique); foreach ($industryListUnique as $industryInfo) { $industryList[] = ucwords($industryInfo); } foreach ($cityUnique as $cityInfo) { $city_List[] = ucwords($cityInfo); } $country_code = array_unique($countryUnique); } $experienced_List = $PR_Api->getListExperiencedTime(); $country_List = $core->getCountryList($country_code); $candID = $client['CandidateProfileID']; $rslCanID = $core->get_candidate_list($candID); /*echo "<pre>"; print_r($rslCanID[0]); echo "<pre>"; die(); */ $this->view->candidateInfo = $rslCanID[0]; $this->view->skillList = $skillList; //$this->view->oppList = $oppList; $this->view->industryList = $industryList; $this->view->experienced_List = $experienced_List; $this->view->country_List = $country_List; $this->view->city_List = $city_List; $this->view->CandidateProfileID = $client['CandidateProfileID']; // $this->render('profile'); }
public function careermatchpremiumAction() { $request = $this->getRequest(); $sestionClient = PR_Session::getSession(PR_Session::SESSION_USER); $CompanyID = $sestionClient['CompanyID']; $request = $this->getRequest(); $skilIDSear = $request->getParam("skilIDSear", ""); $keyword = $request->getParam("keyword", ""); if (empty($skilIDSear)) { $skilIDSear = array(); } if (empty($keyword)) { $keyword = ""; } $list_PR_Api = new PR_Api_Core_CareerClass(); $skillList = $list_PR_Api->getListSkill(); $list_PR_Api = new PR_Api_Core_CareerClass(); $candidateList = array(); $candidateList = $list_PR_Api->getCandidateProfileIDsForCareerMatch($keyword, $skilIDSear); $result = $list_PR_Api->getCandidateProfiles_byProfileIDs($candidateList); $candidateInfo = array(); if ($result) { $PR_Api_CandidateClass = new PR_Api_Core_CandidateClass(); foreach ($result as $k => $info) { $skID = $PR_Api_CandidateClass->getList_CandidateSkillsOnly($info['UserID']); $sk = array(); if ($skID) { foreach ($skID as $key => $skInfo) { $sk[] = $skInfo['SkillName']; } } else { $sk[] = ""; } $info['skillName'] = $sk; $candidateInfo[] = $info; } } $stringKeyword = $list_PR_Api->getListKeyWordToString(); $keyword = $stringKeyword; $listKeyword = explode(",", $keyword); /*echo "<pre>"; print_r($listKeyword); echo "</pre>"; die(); */ $this->view->skillList = $skillList; $this->view->result = $candidateInfo; $this->view->stringKeyword = $stringKeyword; $this->view->listKeyword = $listKeyword; }