public function jobseeker() { $application = JFactory::getApplication(); $userid = self::get_user(); if (isset($userid)) { $profile = new Jobseeker($userid); $profdata = $profile->currentuser(); $result_con = $profile->getconnection(); $this->profiledata = $profdata->fetch_object(); while ($row_users = $result_con[1]->fetch_object()) { $row_name = $result_con[0]->fetch_object(); $avatarUrl = (object) $profile->getavatar($row_users->id); $connection = $row_users; $arrimg = (array) $avatarUrl; $arrcon = (array) $connection; $name = $row_name->name; $con = (object) array_merge($arrimg, $arrcon); $arrname['common'] = $name; $arrmergecon = (array) $con; $this->mergecon[] = (object) array_merge($arrname, $arrmergecon); // $this->connection[] = $row_users; } } else { $loginRedirect = JRoute::_('index.php?option=com_user&view=login'); $msg = 'Please login your account to access page.'; $this->setRedirect($loginRedirect, $msg); } // echo "<pre>"; // print_r($this->profiledata);exit; }
public function jobseeker() { $userid = self::get_user(); $profile = new Jobseeker($userid); $profdata = $profile->currentuser(); $result_con = $profile->getconnection(); $this->profiledata = $profdata->fetch_object(); while ($row_users = $result_con[1]->fetch_object()) { $row_name = $result_con[0]->fetch_object(); $avatarUrl = (object) $profile->getavatar($row_users->id); $connection = $row_users; $arrimg = (array) $avatarUrl; $arrcon = (array) $connection; $name = $row_name->name; $con = (object) array_merge($arrimg, $arrcon); $arrname['common'] = $name; $arrmergecon = (array) $con; $this->mergecon[] = (object) array_merge($arrname, $arrmergecon); // $this->connection[] = $row_users; } // echo "<pre>"; // print_r($this->profiledata);exit; }
*/ //error_reporting(E_ALL); //ini_set('display_errors', 1); defined("_JEXEC") or die("Restricted access"); ?> <h2><?php echo JText::_('COM_TESTER'); ?> </h2> <pre> <?php var_dump($_GET); //echo $_POST['name']; include_once "myviewer.php"; include_once JPATH_BASE . "/standalones/jaycer/jobseeker.php"; $jobseeker = new Jobseeker($_POST); //echo $jobseeker->user_id; //$user = JFactory::getUser(); if (isset($_POST['name'])) { $jobseeker->create($_POST); JFactory::getApplication()->redirect("http://jobsglobal.dev/index.php/component/tester/"); return false; } elseif (isset($_POST['search'])) { $filter = "`idjobseeker`={$_POST['keyword']}"; $search = new Viewer($filter); $search->view_profile($filter); } elseif (isset($_POST['find'])) { $filter = "`{$_POST['field']}`='{$_POST['keyword']}'"; $viewer = new Viewer($filter); $viewer->view_profile($filter); }
<?php include_once "../../../../../../libraries/aces/models/jobseeker.php"; // echo json_encode($filter); $_POST['userid'] = $_POST['userid']; $_POST['firstname'] = $_POST['firstname']; $_POST['lastname'] = $_POST['lastname']; $js = new Jobseeker($user->id); $data = $js->update($_POST); echo json_encode($data); // print_r($data); // foreach($data as $edudata){ // echo json_encode($edudata); // }
function regjobseeker($_post) { $user = JFactory::getUser(); $profile = new Jobseeker($user->id); return $profile->create($_post); }
* @author * @copyright * @license */ defined("_JEXEC") or die("Restricted access"); JHtml::_('behavior.keepalive'); JHtml::_('behavior.tooltip'); JHtml::_('behavior.calendar'); JHtml::_('formbehavior.chosen', 'select'); $user = JFactory::getUser(); /* add custom js controller */ $document = JFactory::getDocument(); $document->addScript("/media/custom_js/jobseeker/profile_edit.js"); /* Jobseeker Class */ jimport("recruitment.jobseeker.jobseeker"); $jobseeker = new Jobseeker($user->id); $juser_result = $jobseeker->current_user(); $data = $juser_result->fetch_object(); /* IndustryList Class */ jimport("recruitment.jobseeker.industrylist"); $industrylist = new IndustryList(); $industrylist_result = $industrylist->all(); $industrylist_options = industry_options($industrylist_result, $data->industry); /* CoutnryList Class */ jimport("recruitment.jobseeker.countrylist"); $countrylist = new CountryList(); $countrylist_result = $countrylist->all(); $countrylist_options = country_options($countrylist_result, $data->country); function country_options($result, $current) { $html = "";
public function updateEmail() { try { $application = JFactory::getApplication(); $document = JFactory::getDocument(); $document->setMimeEncoding('application/json'); $errors = array(); $input = $application->input; $userId = $this->getUser()->id; $email = $input->get('email', '', 'username'); if (!isset($userId)) { array_push($errors, array("userId" => "User id is required.")); } if (count($errors) > 0) { echo new JResponseJson($errors, "Validation failed.", false); } else { $updatedEmail = array("email" => $email); $js = new Jobseeker($userId); $data = $js->update($updatedEmail); if (!isset($data)) { throw new Exception("Error updating email.", 1); } else { echo new JResponseJson($data, "Successfully updated user information."); } } } catch (Exception $e) { echo new JResponseJson($e, $e->getMessage(), false); } }