| @@ 39-47 (lines=9) @@ | ||
| 36 | //var_dump($hotelcity_handler->city_name()); |
|
| 37 | ||
| 38 | switch ($action) { |
|
| 39 | case "add": |
|
| 40 | include MARTIN_ROOT_PATH . 'include/form.hotel.city.php'; |
|
| 41 | martin_collapsableBar('createtable', 'createtableicon', _AM_MARTIN_ADD_HOTEL_CITY, _AM_MARTIN_ADD_HOTEL_CITY); |
|
| 42 | //Create_button(array('addcity'=>array('url'=>'mconfirmartin.hotel.city.php?action=add','value'=>_AM_MARTIN_CITY_NAME))); |
|
| 43 | $form = new form_hotel_city($HotelCityObj); |
|
| 44 | ||
| 45 | $form->display(); |
|
| 46 | martin_close_collapsable('createtable', 'createtableicon'); |
|
| 47 | break; |
|
| 48 | ||
| 49 | case "save": |
|
| 50 | $city_alias = isset($_POST['city_alias']) ? addslashes($_POST['city_alias']) : ''; |
|
| @@ 51-59 (lines=9) @@ | ||
| 48 | // martin_adminMenu(2, "订房后台 > 酒店管理"); |
|
| 49 | ||
| 50 | switch ($action) { |
|
| 51 | case "add": |
|
| 52 | include MARTIN_ROOT_PATH . 'include/form.hotel.php'; |
|
| 53 | martin_collapsableBar('createtable', 'createtableicon', _AM_MARTIN_ADD_HOTEL, _AM_MARTIN_ADD_HOTEL); |
|
| 54 | //Create_button(array('addcity'=>array('url'=>'mconfirmartin.hotel.city.php?action=add','value'=>_AM_MARTIN_CITY_NAME))); |
|
| 55 | $form = new form_hotel($HotelObj, $HotelCityObj); |
|
| 56 | ||
| 57 | $form->display(); |
|
| 58 | martin_close_collapsable('createtable', 'createtableicon'); |
|
| 59 | break; |
|
| 60 | case "save": |
|
| 61 | $alias_url = str_replace(' ', '-', addslashes($_POST['hotel_alias'])); |
|
| 62 | $alias_url = ($hotel_handler->CheckAliasExist($alias_url, $id)) ? $alias_url . '-' . mt_rand(10000, 100000) : $alias_url; |
|
| @@ 45-52 (lines=8) @@ | ||
| 42 | $form->display(); |
|
| 43 | martin_close_collapsable('createtable', 'createtableicon'); |
|
| 44 | break; |
|
| 45 | case "typeadd": |
|
| 46 | include MARTIN_ROOT_PATH . 'include/form.hotel.service.type.php'; |
|
| 47 | martin_collapsableBar('createtable', 'createtableicon', _AM_MARTIN_ADD_SERVICE_TYPE, _AM_MARTIN_ADD_SERVICE_TYPE); |
|
| 48 | CreateButton(); |
|
| 49 | $form = new form_hotel_service_type($HotelServiceTypeObj); |
|
| 50 | $form->display(); |
|
| 51 | martin_close_collapsable('createtable', 'createtableicon'); |
|
| 52 | break; |
|
| 53 | case "addhotel": |
|
| 54 | include MARTIN_ROOT_PATH . 'include/form.hotel.service.relation.php'; |
|
| 55 | martin_collapsableBar('createtable', 'createtableicon', _AM_MARTIN_ADD_HOTEL_SERVICE, _AM_MARTIN_ADD_HOTEL_SERVICE); |
|