Ejemplo n.º 1
0
    if ($_POST['jb_employer_password_error'] != '') {
        $errors = explode(',', $_POST['jb_employer_password_error']);
        if (sizeof($errors) > 0) {
            foreach ($errors as $err) {
                $msg->addError($err);
            }
        }
        header('Location: edit_employer.php?eid=' . intval($_GET['eid']));
        exit;
    }
    //update password
    if ($pass != '' && strlen($pass) == 40) {
        $employer->updatePassword($pass);
    }
    //set approval state
    $employer->setApprovalState($approval_state);
    if ($employer->updateProfile($name, $company, $email, $website, $description)) {
        $msg->addFeedback('JB_PROFILE_UPDATED');
    } else {
        $msg->addError('DB_NOT_UPDATED');
    }
    header('Location: employers.php');
    exit;
}
include AT_INCLUDE_PATH . 'header.inc.php';
$savant->assign('name', $employer->getName());
$savant->assign('company', $employer->getCompany());
$savant->assign('email', $employer->getEmail());
$savant->assign('website', $employer->getWebsite());
$savant->assign('description', $employer->getDescription());
$savant->assign('approval_state', $employer->getApprovalState());