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.
 
 
 
 

38 lines
953 B

  1. <?php
  2. /*
  3. Author:ZSQ
  4. Compeny:Spiders Travel
  5. */
  6. require_once '../Common/Mysql.php';
  7. //if (ALLOW_ORIGIN)
  8. header("Access-Control-Allow-Origin:*");
  9. //$USER_ID=isset($_GET['user_id'])?$_GET['user_id']:'';
  10. $hotel_id=isset($_GET['hotel_id'])?$_GET['hotel_id']:'';
  11. $prod_id=isset($_GET['prod_id'])?$_GET['prod_id']:'';
  12. $user_id=getUserId();
  13. if ($user_id ===false){
  14. echo json_encode(array("errcode"=>1,"errinfo"=>"用户未登录"));
  15. exit;
  16. }
  17. $pdo=conn();
  18. $sql="CALL HT_GET_HOTELDETAIL_CALENDER_PRODUCT('".$hotel_id."',".$prod_id.")";
  19. $result=$pdo->query($sql);
  20. //$rowset=$result->fetchAll(PDO::FETCH_ASSOC);
  21. $data=array();
  22. do{
  23. $rowset=$result->fetchAll(PDO::FETCH_ASSOC);
  24. if($rowset){
  25. $data[]=$rowset;
  26. }
  27. }while ($result->nextRowset());
  28. $json['code']='0';
  29. $json['info']='';
  30. $json['hotelName']=$data[1][0]['hotl_name'];
  31. $json['select_prod_name']=$data[2][0]['select_prod_name'];
  32. $json['detailInfo']=$data[0];
  33. //}
  34. echo json_encode($json);
  35. exit();