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.
 
 
 
 

51 lines
1.2 KiB

  1. <?php
  2. /*
  3. Author:XM
  4. Compeny:Spiders Travel
  5. */
  6. require_once '../Common/Mysql.php';
  7. if (ALLOW_ORIGIN)
  8. header("Access-Control-Allow-Origin:*");
  9. $userid=getUserId();
  10. if ($userid ===false){
  11. echo json_encode(array("code"=>1,"info"=>"用户未登录"));
  12. exit;
  13. }
  14. $myrunid=$_GET['runid'];
  15. $pdo=conn();
  16. $sql1="select line_name as circuitry_name,
  17. '0' as start_station_res_id,
  18. start_res as start_station_res_name,
  19. '0' as end_station_res_id,
  20. end_res as end_station_res_name,
  21. prod_code as prod_id,
  22. prod_name,
  23. cus_price as prod_price,
  24. remain_count as seat_type,
  25. '普通座' as seat_type_name
  26. from outside_run where prod_code = '" . $myrunid . "' and cancel_flag = 0";
  27. $sql2="SELECT ORG_ID AS org_id ,ORG_NAME as soure FROM base_organization where cancel_flag=0;";
  28. writeLog("sp_get_run_sale_ticket: ".$sql1);
  29. writeLog("sp_get_run_sale_ticket: ".$sql2);
  30. if (is_object($pdo)){
  31. $result1=$pdo->query($sql1);
  32. $json1=$result1->fetchAll(PDO::FETCH_ASSOC);
  33. $result1->closeCursor();
  34. $json['ticket_list']=$json1;
  35. $result2=$pdo->query($sql2);
  36. $json2=$result2->fetchAll(PDO::FETCH_ASSOC);
  37. $result2->closeCursor();
  38. $json['sale_org']=$json2;
  39. echo json_encode($json);
  40. }