Exemplo n.º 1
0
    $smarty->assign('experience', $experience_t);
}
$categories = Category::find_all();
if (is_array($categories) and !empty($categories)) {
    $category_t = array();
    foreach ($categories as $category) {
        $category_t[$category->id] = $category->cat_name;
    }
    $smarty->assign('category', $category_t);
}
///when button is press run this
if (isset($_POST['bt_add'])) {
    $_SESSION['add_job']['job_ref'] = $job->job_ref = $_POST['txt_ref_code'];
    $job->var_name = $job->mod_write_check($_POST['txt_job_title'], $old_var_name);
    $_SESSION['add_job']['job_title'] = $job->job_title = strip_html(stripHTMLTags($_POST['txt_job_title']));
    $_SESSION['add_job']['job_desc'] = $job->job_description = allowedTags($_POST['txt_job_desc']);
    $_SESSION['add_job']['job_postion'] = $job->job_postion = $_POST['txt_position'];
    $_SESSION['add_job']['salary'] = $job->job_salary = $_POST['txt_salary'];
    $_SESSION['add_job']['freq'] = $job->salaryfreq = $_POST['txt_salaryfreq'];
    $_SESSION['add_job']['cname'] = $job->contact_name = $_POST['txt_contact_name'];
    $_SESSION['add_job']['tn'] = $job->contact_telephone = $_POST['txt_telephone'];
    $_SESSION['add_job']['sl'] = $job->site_link = $_POST['txt_site_link'];
    $_SESSION['add_job']['email'] = $job->poster_email = $_POST['txt_email'];
    $_SESSION['add_job']['jsd'] = $job->start_date = $_POST['txt_start_date'];
    if (is_array($_POST['txt_job_type']) && !empty($_POST['txt_job_type'])) {
        $type_selected = array();
        foreach ($_POST['txt_job_type'] as $key => $value) {
            $type_selected[] = $value;
        }
    }
    $job->job_type = sizeof($_POST['txt_job_type']);
Exemplo n.º 2
0
if ($session->get_recuriter()) {
    redirect_to(BASE_URL . "employer/account/");
    die;
}
if (EMPLOYER_REG == "N" || EMPLOYER_REG == "0" || EMPLOYER_REG == false) {
    $session->message("<div class='error'>" . format_lang('error', 'regNotAllowed') . "</div>");
    redirect_to(BASE_URL . "employer/login/");
    die;
}
if (isset($_POST['bt_register'])) {
    $employer = new Employer();
    $_SESSION['add_emp']['com_name'] = $employer->company_name = $company_name = $_POST['txt_company_name'];
    $employer->var_name = $employer->mod_write_check($_POST['txt_company_name'], null);
    $_SESSION['add_emp']['contactName'] = $employer->contact_name = $contact_name = $_POST['txt_contact_name'];
    $_SESSION['add_emp']['url'] = $employer->site_link = $site = $_POST['txt_site'];
    $_SESSION['add_emp']['comDesc'] = $employer->company_desc = $company_desc = allowedTags($_POST['txt_company_desc']);
    $_SESSION['add_emp']['email'] = $employer->email_address = $email = stripHTMLTags($_POST['txt_email']);
    $_SESSION['add_emp']['username'] = $employer->username = $username = stripHTMLTags($_POST['txt_username']);
    $_SESSION['add_emp']['pass'] = $employer->passwd = $pass = $_POST['txt_pass'];
    $_SESSION['add_emp']['confirmPass'] = $employer->confirm_password = $confirm_pass = $_POST['txt_confirm_pass'];
    $_SESSION['add_emp']['address'] = $employer->address = $address = $_POST['txt_address'];
    $_SESSION['add_emp']['address2'] = $employer->address2 = $address2 = $_POST['txt_address2'];
    $employer->city = $_SESSION['loc']['citycode'] = $_POST['txtcity'];
    $employer->county = $_SESSION['loc']['countycode'] = $_POST['txtcounty'];
    $employer->state_province = $_SESSION['loc']['stateprovince'] = $_POST['txtstateprovince'];
    $employer->country = $_SESSION['loc']['country'] = $_POST['txt_country'];
    $employer->actkey = $key = md5(time());
    $_SESSION['add_emp']['pCode'] = $employer->post_code = $pcode = $_POST['txt_pcode'];
    $_SESSION['add_emp']['tel'] = $employer->phone_number = $tele = $_POST['txt_tele'];
    if (ENABLE_SPAM_REGISTER && ENABLE_SPAM_REGISTER == 'Y') {
        if (strtolower($_POST['spam_code']) != strtolower($_SESSION['spam_code']) || (!isset($_SESSION['spam_code']) || $_SESSION['spam_code'] == NULL)) {
Exemplo n.º 3
0
     }
     redirect_to(BASE_URL . 'employer/account/');
     die;
     break;
 default:
     if (isset($_POST['bt_update'])) {
         $employer = new Employer();
         $remove_logo = Employer::find_by_id((int) $user_id);
         //$remove_logo->company_logo = $employer->company_logo;
         //$remove_logo->username = $employer->username;
         $employer->id = (int) $user_id;
         $employer->company_name = $company_name = $_POST['txt_company_name'];
         $employer->var_name = $employer->mod_write_check($_POST['txt_company_name'], $user->company_name);
         $employer->contact_name = $contact_name = $_POST['txt_contact_name'];
         $employer->site_link = $site = $_POST['txt_site'];
         $employer->company_desc = $company_desc = allowedTags($_POST['txt_company_desc']);
         $employer->email_address = $email = $_POST['txt_email'];
         $employer->username = $username = $user->username;
         $employer->address = $address = $_POST['txt_address'];
         $employer->address2 = $address2 = $_POST['txt_address2'];
         $_SESSION['loc']['citycode'] = $employer->city = $_POST['txtcity'];
         $_SESSION['loc']['countycode'] = $employer->county = $_POST['txtcounty'];
         $_SESSION['loc']['stateprovince'] = $employer->state_province = $_POST['txtstateprovince'];
         $_SESSION['loc']['country'] = $employer->country = $_POST['txt_country'];
         $employer->post_code = $pcode = $_POST['txt_pcode'];
         $employer->phone_number = $tele = $_POST['txt_tele'];
         if ($_FILES['txt_logo']['error'] == 0) {
             $employer->attach_file($_FILES['txt_logo']);
             $remove_logo->destroy_logo();
         }
         if ($employer->save()) {
Exemplo n.º 4
0
<?php

require_once "../initialise_files.php";
include_once "sessioninc.php";
//unset($_SESSION['loc']);
$smarty->assign('max_cv', size_as_text(MAX_CV_SIZE));
//$smarty->assign( 'files_allowed', $country_t );
//when button is press
if (isset($_POST['bt_register'])) {
    $_SESSION['Employer_Text'] = array();
    $employer = new Employer();
    $employer->company_name = $_SESSION['Employer_Text']['company_name'] = ucfirst($_POST['txt_company_name']);
    $employer->var_name = $employer->mod_write_check($_POST['txt_company_name']);
    $employer->contact_name = $_SESSION['Employer_Text']['conatc_name'] = ucfirst($_POST['txt_contact_name']);
    $employer->site_link = $_SESSION['Employer_Text']['site'] = $_POST['txt_site'];
    $employer->company_desc = $_SESSION['Employer_Text']['desc'] = allowedTags($_POST['txt_company_desc']);
    $employer->email_address = $_SESSION['Employer_Text']['email'] = $_POST['txt_email'];
    $employer->username = $_SESSION['Employer_Text']['username'] = $_POST['txt_username'];
    $employer->passwd = $_SESSION['Employer_Text']['pass'] = $reg_pass = $_POST['txt_pass'];
    $employer->confirm_password = $_SESSION['Employer_Text']['confirm_pass'] = $_POST['txt_confirm_pass'];
    $employer->address = $_SESSION['Employer_Text']['address'] = $_POST['txt_address'];
    $employer->address2 = $_SESSION['Employer_Text']['address2'] = $_POST['txt_address2'];
    $employer->city = $_SESSION['loc']['citycode'] = $_POST['txtcity'];
    $employer->county = $_SESSION['loc']['countycode'] = $_POST['txtcounty'];
    $employer->state_province = $_SESSION['loc']['stateprovince'] = $_POST['txtstateprovince'];
    $employer->country = $_SESSION['loc']['country'] = $_POST['txt_country'];
    $employer->post_code = $_SESSION['Employer_Text']['pcode'] = $_POST['txt_pcode'];
    $employer->phone_number = $_SESSION['Employer_Text']['tel_no'] = $_POST['txt_tele'];
    $employer->terms = true;
    if ($_FILES['txt_logo']['error'] == 0) {
        $employer->attach_file($_FILES['txt_logo']);