Пример #1
0
 /**
  * Helper function: Add job to history table in db
  *  
  * @param Job $job
  * @param JobResponse $response
  * @param String $start
  * @param String $finish
  */
 private function addJobToHistory(Job $job, JobResponse $response, $start, $finish)
 {
     $history = new JobHistory();
     $history->setJobInfo($this->jobInfoToString($job, $response, $start, $finish));
     $history->setStartTime($start);
     $history->setFinishTime($finish);
     $history->setHttpCode($response->http_code());
     $history->setMessage($response->message());
     $dao = new JobHistoryDao();
     $dao->create($history);
 }
Пример #2
0
         $error[] = get_lang('error', 'spam_wrong_word');
         //$errors[] = "The security code you entered does not match the image. Please try again.";
     }
 }
 if (sizeof($error) == 0) {
     //all ok
     $filename = basename($file['name']);
     ###################################################
     if (empty($_POST['txt_existed_cv']) && $_POST['txt_existed_cv'] == "") {
         $cv = array();
         $cv = $file;
         $filename = basename($file['name']);
     }
     /* if user login add apply details to database */
     if ($session->get_job_seeker()) {
         $history = new JobHistory();
         $cv_name = $cv['name'];
         $history->fk_employee_id = $user_id;
         $history->fk_job_id = $job_id;
         $history->cv_name = $cv_name;
         $history->cover_letter = $letter;
         $history->date_apply = strftime(" %Y-%m-%d %H:%M:%S ", time());
         if ($history->save()) {
             //$job->update_apply();
         } else {
             //$employee['email_address'] = $_POST['txt_email1'];
         }
     }
     ############################### APPLY_CANDIDATE #########################################
     $email_template = get_lang('email_template', 'apply_employee');
     $subject = str_replace("#SiteName#", SITE_NAME, $email_template['email_subject']);
            $apps[$i]['created_at'] = strftime(DATE_FORMAT, strtotime($job->created_at));
            $apps[$i]['job_url'] = "job/" . $job->var_name . "/";
        }
        $apps[$i]['date_apply'] = strftime(DATE_FORMAT, strtotime($app->date_apply));
        $apps[$i]['cover_letter'] = $app->cover_letter;
        $apps[$i]['cv_name'] = $app->cv_name;
        $apps[$i]['id'] = $app->id;
        $i++;
    }
    $smarty->assign('application', $apps);
} else {
    //$message = "<div class='error'>No application(s) found</div>";
}
if (isset($_GET['delete'])) {
    if (isset($_GET['delete']) && isset($_GET['job_id']) && $_GET['delete'] == true) {
        $jobhistory = new JobHistory();
        $jobhistory->fk_employee_id = $user_id;
        $jobhistory->fk_job_id = (int) $_GET['job_id'];
        $jobhistory->id = (int) $_GET['id'];
        if ($jobhistory->delete_job()) {
            $session->message("<div class='success'>" . format_lang('success', 'app_delete_success') . "</div>");
            redirect_to(BASE_URL . "applications/");
        } else {
            $message = "<div class='error'>" . format_lang('errormsg', 06) . "</div>";
        }
    }
}
$html_title = SITE_NAME . " - " . format_lang('page_title', 'my_app') . " " . strip_html($employee->full_name());
$smarty->assign('lang', $lang);
$smarty->assign('message', $message);
$smarty->assign('rendered_page', $smarty->fetch('application.tpl'));
Пример #4
0
    } else {
        /**
        		CV Status: No CV uploaded
        		Help Store your CV on Jobsite now, and applying for jobs will only take seconds.
        		You can also distribute your CV to hundreds of relevant recruiters at the touch of a button.
        		
        		Click here to:
        		**/
    }
}
//recommendedJob
//View All Recommended Jobs
if (strtolower($cvrecommand_status) == "public") {
    global $cvjob_title, $cvjob_title2, $cvjob_city, $cvjob_county, $cvjob_state, $cvjob_country;
    $smarty->assign('cvJob_city', $cvjob_city);
    $smarty->assign('cvJob_title', $cvjob_title);
    $recommendedJobs = Job::recommendedJob($user_id, $cvjob_title, $cvjob_title2, $cvjob_city, $cvjob_county, $cvjob_state, $cvjob_country);
    if ($recommendedJobs) {
        $smarty->assign('recommendedJobs', $recommendedJobs);
    }
} else {
    $cv_not_set_to_public = format_lang('error', '');
    $smarty->assign('cv_not_set_to_public', $cv_not_set_to_public);
}
//history
$my_apps = JobHistory::home_application_history($user_id);
if (!empty($my_apps)) {
    $smarty->assign('application', $my_apps);
}
$smarty->assign('message', $message);
$smarty->assign('rendered_page', $smarty->fetch('home_account.tpl'));