|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- header("Access-Control-Allow-Origin:*");
- /*
- * T_xi 0.1
- * Copyright (c) 2016 yixi wei http://www.zhizhuchuxing.com/
- * Date: 2016.8.18
- * 代码如有疑问请联系qq1062140302
- */
- //date_default_timezone_set('PRC');
- require_once '../../Common/Function.php';
- require_once '../../Common/Mysql.php';
- require_once '../../dictionary.php';
- $pdo = conn();
-
- //$userid =$_COOKIE['user_id'];//getUserId();
- $user_id =$_COOKIE['user_id'];
- $org_id =empty($_COOKIE['top_org_id'])?1:$_COOKIE['top_org_id'];
- //获取酒店名
- //$sql_org_name = "select org_name from base_organization where org_id = ".$org_id;
- $sql_org_name = "select supplier_name as org_name from base_supplier where id = ".$org_id;
- $rs = $pdo->query($sql_org_name);
- $row = $rs -> fetchAll(PDO::FETCH_ASSOC);
- if(count($row) == 0)
- {
- setcookie("org_id",1,time()+60,"/");
- $hotel_name = '官方微信';
- }
- $hotel_name = $row[0]['org_name'];
-
- //获取酒店名的id
-
- if(isset($hotel_authority[$user_id])){
- if($user_id == 141)
- {
- $list_arr[0]['up_station'] = '3376';
- $list_arr[0]['up_station_name']='苏州希尔顿逸林酒店';
- $list_arr[1]['down_station'] = '3376';
- $list_arr[1]['down_station_name']='苏州希尔顿逸林酒店';
- }else{
- $list_arr[0]['up_station']=$hotel_authority[$user_id];
- $list_arr[0]['up_station_name']=$hotel_name;
- $list_arr[1]['down_station']=$hotel_authority[$user_id];
- $list_arr[1]['down_station_name']=$hotel_name;
- }
- $list_arr[0]['down_station']='100437';
- $list_arr[0]['down_station_name']='上海迪士尼';
- $list_arr[1]['up_station']='100437';
- $list_arr[1]['up_station_name']='上海迪士尼';
-
- if($user_id == 467)
- {
- $list_arr[0]['up_station'] = '3249';
- $list_arr[0]['up_station_name']='上海虹桥火车站';
- $list_arr[0]['down_station']='3389';
- $list_arr[0]['down_station_name']='上海吴淞口国际邮轮码头';
- $list_arr[1]['up_station']='3389';
- $list_arr[1]['up_station_name']='上海吴淞口国际邮轮码头';
- $list_arr[1]['down_station'] = '3249';
- $list_arr[1]['down_station_name']='上海虹桥火车站';
- }
- }else{
- $list_arr=array();
- }
-
-
-
-
- echo json_encode(array('code'=>0,'info'=>'success','list'=>$list_arr));die;
-
|