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.
 
 
 
 

31 lines
710 B

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