<?php $_SESSION['direct_to_emp'] = "account/change_password/"; include_once 'sessioninc.php'; $username = $session->get_username(); if (isset($_POST['bt_submit'])) { $error = array(); $old_pass = $_POST['txt_old_pass']; $new_pass = $_POST['txt_new_pass']; $new_pass_try = $_POST['txt_new_pass_retry']; $correct_user = Employer::authenticate($username, $old_pass); /* check old password**/ if (!$correct_user) { $error[] = format_lang('errormsg', 44); } /**new password*/ if (strlen($new_pass) != strlen($new_pass_try)) { $error[] = format_lang('errormsg', 45); } if (strlen($new_pass) < 6 || strlen($new_pass) > 20) { $error[] = format_lang('errormsg', 46); } if (sizeof($error) == 0) { //if everything ok $pass_change = Employer::change_password($username, $new_pass); if ($pass_change) { $session->message("<div class='success'>" . format_lang('success', 'pass_chg_success') . "</div>"); destroy_my_session(); redirect_to(BASE_URL . "employer/account/change_password/"); } else { $session->message("<div class='error'>" . format_lang('errormsg', 47) . "</div>");
/***********************************************************************/ // $Id$ $_user_location = 'public'; define(AT_INCLUDE_PATH, '../../../include/'); include AT_INCLUDE_PATH . 'vitals.inc.php'; include AT_JB_INCLUDE . 'classes/Job.class.php'; include AT_JB_INCLUDE . 'classes/Employer.class.php'; require AT_INCLUDE_PATH . 'lib/tinymce.inc.php'; $_custom_css = $_base_path . AT_JB_BASENAME . 'module.css'; // use a custom stylesheet $_custom_head .= ' <link rel="stylesheet" type="text/css" href="' . AT_BASE_HREF . 'jscripts/infusion/framework/fss/css/fss-layout.css" /> <link rel="stylesheet" type="text/css" href="' . AT_BASE_HREF . 'jscripts/infusion/framework/fss/css/fss-text.css" /> <script type="text/javascript" src="' . $_base_path . 'mods/job_board/include/js/edit.js"></script> '; if (!Employer::authenticate()) { $msg->addError('ACCESS_DENIED'); header('Location: ../index.php'); exit; } /* * Add the submenu on this page so that user can go back to the listing. * Reason why this is not included in module.php is because we don't want the * 'edit_post' submenu to show on job_board/index.php */ $_pages[AT_JB_BASENAME . 'index_admin.php']['children'] = array(AT_JB_BASENAME . 'admin/edit_post.php'); $jid = intval($_GET['jid']); $job = new Job(); $job_post = $job->getJob($jid); //visual editor if (!$_POST['setvisual'] && $_POST['settext'] || !$_GET['setvisual']) {
} /** login */ if (isset($_POST['bt_login'])) { $username = trim($_POST['useranme_txt']); $pass = trim($_POST['pass_txt']); $errors = array(); if ($username == "" || $pass == "") { $errors[] = format_lang('error', 'empty_user_pass'); } if (ENABLE_SPAM_LOGIN && ENABLE_SPAM_LOGIN == 'Y') { if (strtolower($_POST['spam_code']) != strtolower($_SESSION['spam_code']) || (!isset($_SESSION['spam_code']) || $_SESSION['spam_code'] == NULL)) { $errors[] = format_lang('error', 'spam_wrong_word'); } } if (sizeof($errors) == 0) { $user_found = Employer::authenticate($username, $pass); //print_r($user_found); //die; if ($user_found) { //check employee status if ($user_found->employer_status == 'pending') { $message = "<div class='error'>" . format_lang('error', 'approve_account') . "</div>"; } elseif ($user_found->employer_status == 'deleted') { $message = "<div class='error'>" . format_lang('error', 'status_deleted_account') . "</div>"; } elseif ($user_found->employer_status == 'suspended') { $message = "<div class='error'>" . format_lang('error', 'status_suspended_account') . "</div>"; } elseif ($user_found->employer_status == 'declined') { $message = "<div class='error'>" . format_lang('error', 'status_declined_account') . "</div>"; } else { //if( $user_found->is_active == 'Y' ) { $access = "Recuriter";