Beispiel #1
0
 function editApplication()
 {
     $doc =& JFactory::getDocument();
     $style = " .icon-48-applicant_details {background-image:url(components/com_jobboard/images/applicant_details.png); no-repeat; }";
     $doc->addStyleDeclaration($style);
     JToolBarHelper::title(JText::_('COM_JOBBOARD_JOB_APPL_DETAILS'), 'applicant_details.png');
     JToolBarHelper::back();
     JToolBarHelper::apply('applyappl');
     JToolBarHelper::save('saveappl');
     JToolBarHelper::cancel('close', JText::_('COM_JOBBOARD_TXT_CLOSE'));
     JobBoardToolbarHelper::setToolbarLinks('applicants');
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'jobboard_admappl.php';
     $view =& $this->getView('applicantedit', 'html');
     // $view->setLayout('admin');
     $cids = JRequest::getVar('cid', array(), 'array');
     $appl_id = isset($cids[0]) ? $cids[0] : JRequest::getInt('aid');
     $appl_ids = JobBoardAdmapplHelper::getApplIds($appl_id);
     $jid = $appl_ids['jid'];
     $appl_uid = $appl_ids['sid'];
     $qid = $appl_ids['qid'];
     $applicant_model =& $this->getModel('Uapplicant');
     $cfig_model =& $this->getModel('Config');
     if ($qid > 0) {
         $questionnaire = $applicant_model->getQuestionnaire($qid);
         $fields = json_decode($questionnaire['fields']);
         if (!is_object($fields)) {
             $qid = 0;
         } else {
             unset($questionnaire['fields']);
             $q_answers = $applicant_model->getApplicantQanswers($qid, $appl_id);
             jimport('joomla.utilities.date');
             $today = new JDate();
             $view->assignRef('questionnaire', $questionnaire);
             $view->assignRef('q_answers', $q_answers);
             $view->assignRef('fields', $fields->fields);
             $view->assignRef('today', $today);
         }
     }
     $user_model =& $this->getModel('User');
     $job_title = $applicant_model->getApplJobTitle($jid);
     $prof_id = $appl_ids['pid'];
     $applicant_name = $user_model->getJUsername($appl_uid);
     $cv_name = $applicant_model->getCvProfileName($prof_id, $appl_uid);
     $user_prof_data = $user_model->getSeekerProfile($appl_uid, true);
     $view->assign('cv_name', $cv_name);
     $view->assign('applicant_name', $applicant_name);
     $view->assign('qid', $qid);
     $view->assign('appl_uid', $appl_uid);
     $view->assign('pid', $prof_id);
     $appl_data = $applicant_model->getApplication($appl_id);
     $statuses = $applicant_model->getStatuses();
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'jobboard_admuser.php';
     $pp_status = JobBoardAdmuserHelper::checkProfilePicStatus($appl_uid, &$user_model, 2);
     $view->assign('context', 'application');
     $view->assignRef('user_prof_data', $user_prof_data);
     $view->assignRef('appl_data', $appl_data);
     $view->assignRef('statuses', $statuses);
     $view->assign('is_profile_pic', $pp_status['is_profile_pic']);
     $view->assign('imgthumb', $pp_status['urithumb']);
     $view->assign('imgthumb_115', $pp_status['urithumb2']);
     $view->assign('job_title', $job_title);
     $view->assign('aid', $appl_id);
     $view->assign('jid', $jid);
     $view->assignRef('config', $config);
     $view->display();
 }
Beispiel #2
0
 function display()
 {
     $user_model =& $this->getModel('User');
     $prof_id = JRequest::getInt('pid');
     $cv_uid = JRequest::getInt('sid');
     /*if($search_mode == 0) {
         $jid = JRequest::getInt('jid');
         $job_title = $this->_umodel->getApplJobTitle($jid);
       }*/
     $applicant_name = $user_model->getJUsername($cv_uid);
     // done
     $user_prof_data = $user_model->getSeekerProfile($cv_uid, true);
     // done
     $cv_data = $user_model->getCvProfile($prof_id, $cv_uid, true, true);
     // done
     $user_model->incrCVcounter($prof_id);
     // done
     // done $layout_style = $this->_umodel->getLayoutConfig();   // done
     require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'helpers' . DS . 'jobboard_admuser.php';
     $pp_status = JobBoardAdmuserHelper::checkProfilePicStatus($cv_uid, &$user_model, 2);
     // done
     //echo '<pre>'.print_r($cv_data, true).'</pre>';die;
     $view =& $this->getView('user', 'html');
     $view->assignRef('cv_data', $cv_data);
     $view->assignRef('user_prof_data', $user_prof_data);
     // $view->assign('context', 'cvprofile');
     $view->assign('is_profile_pic', $pp_status['is_profile_pic']);
     $view->assign('imgthumb', $pp_status['urithumb']);
     $view->assign('imgthumb_115', $pp_status['urithumb2']);
     $view->assign('s_mode', 1);
     // done  $view->assign('layout_style', $layout_style);
     $view->assign('applicant_name', $applicant_name);
     $view->display();
 }