コード例 #1
0
ファイル: edit_employer.php プロジェクト: jorge683/job_board
        $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());
$savant->display('admin/jb_edit_employer.tmpl.php');