|
- <?php
- //Author:fuhc
- //Date:20160922
- // 新增基础房型
- require_once "Api/ApiBase.php";
- require_once "Lib/Action/HTBaseRoom.class.php";
-
- class AddBaseRoom extends ApiBase{
-
- // 新增基础房型
- function addBaseRoom(){
- $room_type_sale=isset($_POST['room_type_sale'])?$_POST['room_type_sale']:(isset($_GET['room_type_sale'])?$_GET['room_type_sale']:""); // 可为空
- $hotel_id=isset($_POST['hotel_id'])?$_POST['hotel_id']:(isset($_GET['hotel_id'])?$_GET['hotel_id']:""); // 不为空
- if($hotel_id==""){
- $data['code']="3";
- $data['info']="缺少hotel_id参数";
- return $data;
- }
- $baseRoom=new HTBaseRoom;
- $data=$baseRoom->addBaseRoom('1',$room_type_sale,$hotel_id);
- return $data;
- }
- }
- $addBaseRoom=new AddBaseRoom;
- $data=$addBaseRoom->addBaseRoom();
- echo json_encode($data);
|