You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AddBaseRoom.php 841 B

3 years ago
12345678910111213141516171819202122232425262728
  1. <?php
  2. //Author:fuhc
  3. //Date:20160922
  4. // 新增基础房型
  5. require_once "Api/ApiBase.php";
  6. require_once "Lib/Action/HTBaseRoom.class.php";
  7. class AddBaseRoom extends ApiBase{
  8. // 新增基础房型
  9. function addBaseRoom(){
  10. //$user_id =$this->getUserId();
  11. $room_type_sale=isset($_POST['room_type_sale'])?$_POST['room_type_sale']:(isset($_GET['room_type_sale'])?$_GET['room_type_sale']:""); // 可为空
  12. $hotel_id=isset($_POST['hotel_id'])?$_POST['hotel_id']:(isset($_GET['hotel_id'])?$_GET['hotel_id']:""); // 不为空
  13. if($hotel_id==""){
  14. $data['code']="16";
  15. $data['info']="错误的请求参数";
  16. return $data;
  17. }
  18. $baseRoom=new HTBaseRoom;
  19. $data=$baseRoom->addBaseRoom('1',$room_type_sale,$hotel_id);
  20. return $data;
  21. }
  22. }
  23. $addBaseRoom=new AddBaseRoom;
  24. $data=$addBaseRoom->addBaseRoom();
  25. echo json_encode($data);