コード例 #1
0
ファイル: sponsor_edit.php プロジェクト: rtoews/meocracy
$region_id = 65517;
$region_type = REGION_CITY;
$office_ids = Office::get_ids_by_region($region_id, $region_type);
$id = get_param('id');
$sponsor = new Sponsor($id);
if (!empty($_POST)) {
    $sponsor->region_id($region_id);
    $sponsor->region_type($region_type);
    $sponsor->department_id(get_param('department_id'));
    $sponsor->sponsor_type(get_param('sponsor_type'));
    $sponsor->title(get_param('title'));
    $sponsor->name_first(get_param('name_first'));
    $sponsor->name_last(get_param('name_last'));
    $sponsor->name_middle(get_param('name_middle'));
    $sponsor->office(get_param('office'));
    $sponsor->phone(get_param('phone'));
    $sponsor->email(get_param('email'));
    $sponsor->bio(get_param('bio'));
    $sponsor->image(get_param('image'));
    if ($id) {
        $sponsor->update();
    } else {
        $id = $sponsor->insert();
    }
    redirect('sponsor');
}
$html = new HTML('admin');
$html->set_title("Edit this person's directory information");
$html->generate_header();
?>
    <style type="text/css">