|
- <?php
- /*
- Author:XM
- Compeny:Spiders Travel
- */
- require_once '../Common/Mysql.php';
- if (ALLOW_ORIGIN)
- header("Access-Control-Allow-Origin:*");
- $userid=getUserId();
- if ($userid ===false){
- echo json_encode(array("code"=>1,"info"=>"用户未登录"));
- exit;
- }
- $myrunid=$_GET['runid'];
- $pdo=conn();
- $sql1="select line_name as circuitry_name,
- '0' as start_station_res_id,
- start_res as start_station_res_name,
- '0' as end_station_res_id,
- end_res as end_station_res_name,
- prod_code as prod_id,
- prod_name,
- cus_price as prod_price,
- remain_count as seat_type,
- '普通座' as seat_type_name
- from outside_run where prod_code = '" . $myrunid . "' and cancel_flag = 0";
- $sql2="SELECT ORG_ID AS org_id ,ORG_NAME as soure FROM base_organization where cancel_flag=0;";
-
- writeLog("sp_get_run_sale_ticket: ".$sql1);
- writeLog("sp_get_run_sale_ticket: ".$sql2);
- if (is_object($pdo)){
- $result1=$pdo->query($sql1);
- $json1=$result1->fetchAll(PDO::FETCH_ASSOC);
- $result1->closeCursor();
- $json['ticket_list']=$json1;
-
- $result2=$pdo->query($sql2);
- $json2=$result2->fetchAll(PDO::FETCH_ASSOC);
- $result2->closeCursor();
- $json['sale_org']=$json2;
-
- echo json_encode($json);
-
- }
-
-
-
-
-
-
|