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