|
- <?php
- /*
- Author:ZSQ
- Compeny:Spiders Travel
- */
- require_once '../Common/Mysql.php';
-
- header("Access-Control-Allow-Origin:*");
- $USER_ID=isset($_GET['user_id'])?$_GET['user_id']:'';
- $hotelName=isset($_GET['hotelName'])?$_GET['hotelName']:'';
- $user_id=getUserId();
- if ($user_id ===false){
- echo json_encode(array("errcode"=>1,"errinfo"=>"用户未登录"));
- exit;
- }
-
-
- $pdo=conn();
- $sql="CALL HT_GET_HOTELINFO_BY_INPUT(1,'".$hotelName."')";
- $result=$pdo->query($sql);
- $rowset=$result->fetchAll(PDO::FETCH_ASSOC);
- //if(strlen(trim($USER_ID))<=0){
- // $data['code']='1';
- // $data['info']='未登录';
- //}else{
- $data['code']='0';
- $data['info']='';
- $data['hotelName']=$rowset;
- //}
- echo json_encode($data);
- exit();
|