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.

hotel_through.php 2.3 KiB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. header("Access-Control-Allow-Origin:*");
  3. /*
  4. * T_xi 0.1
  5. * Copyright (c) 2016 yixi wei http://www.zhizhuchuxing.com/
  6. * Date: 2016.8.18
  7. * 代码如有疑问请联系qq1062140302
  8. */
  9. //date_default_timezone_set('PRC');
  10. require_once '../../Common/Function.php';
  11. require_once '../../Common/Mysql.php';
  12. require_once '../../dictionary.php';
  13. $pdo = conn();
  14. //$userid =$_COOKIE['user_id'];//getUserId();
  15. $user_id =$_COOKIE['user_id'];
  16. $org_id =empty($_COOKIE['top_org_id'])?1:$_COOKIE['top_org_id'];
  17. //获取酒店名
  18. //$sql_org_name = "select org_name from base_organization where org_id = ".$org_id;
  19. $sql_org_name = "select supplier_name as org_name from base_supplier where id = ".$org_id;
  20. $rs = $pdo->query($sql_org_name);
  21. $row = $rs -> fetchAll(PDO::FETCH_ASSOC);
  22. if(count($row) == 0)
  23. {
  24. setcookie("org_id",1,time()+60,"/");
  25. $hotel_name = '官方微信';
  26. }
  27. $hotel_name = $row[0]['org_name'];
  28. //获取酒店名的id
  29. if(isset($hotel_authority[$user_id])){
  30. if($user_id == 141)
  31. {
  32. $list_arr[0]['up_station'] = '3376';
  33. $list_arr[0]['up_station_name']='苏州希尔顿逸林酒店';
  34. $list_arr[1]['down_station'] = '3376';
  35. $list_arr[1]['down_station_name']='苏州希尔顿逸林酒店';
  36. }else{
  37. $list_arr[0]['up_station']=$hotel_authority[$user_id];
  38. $list_arr[0]['up_station_name']=$hotel_name;
  39. $list_arr[1]['down_station']=$hotel_authority[$user_id];
  40. $list_arr[1]['down_station_name']=$hotel_name;
  41. }
  42. $list_arr[0]['down_station']='100437';
  43. $list_arr[0]['down_station_name']='上海迪士尼';
  44. $list_arr[1]['up_station']='100437';
  45. $list_arr[1]['up_station_name']='上海迪士尼';
  46. if($user_id == 467)
  47. {
  48. $list_arr[0]['up_station'] = '3249';
  49. $list_arr[0]['up_station_name']='上海虹桥火车站';
  50. $list_arr[0]['down_station']='3389';
  51. $list_arr[0]['down_station_name']='上海吴淞口国际邮轮码头';
  52. $list_arr[1]['up_station']='3389';
  53. $list_arr[1]['up_station_name']='上海吴淞口国际邮轮码头';
  54. $list_arr[1]['down_station'] = '3249';
  55. $list_arr[1]['down_station_name']='上海虹桥火车站';
  56. }
  57. }else{
  58. $list_arr=array();
  59. }
  60. echo json_encode(array('code'=>0,'info'=>'success','list'=>$list_arr));die;