您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

65 行
2.4 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. writeLog(json_encode($_GET));
  10. $startarea = isset($_GET['startarea']) ? $_GET['startarea'] : '';
  11. $endarea = isset($_GET['endarea']) ? $_GET['endarea'] : '';
  12. $starttime = isset($_GET['starttime']) ? $_GET['starttime'] : '';
  13. $line = isset($_GET['line']) ? $_GET['line'] : '';
  14. //$carNo=isset($_GET['carNo'])?(empty($_GET['carNo'])?0:$_GET['carNo']):0;
  15. $seatNo = isset($_GET['seatNo']) ? $_GET['seatNo'] : '';
  16. $name = isset($_GET['name']) ? $_GET['name'] : '';
  17. $currpage = isset($_GET['currpage']) ? (empty($_GET['currpage']) ? 1 : $_GET['currpage']) : 1;
  18. $pagesize = isset($_GET['pagesize']) ? (empty($_GET['pagesize']) ? 10 : $_GET['pagesize']) : 10;
  19. /* if ($startarea=='' && $endarea=='' && $starttime =='' && $line==''){
  20. echo json_encode(array("code"=>-1,"info"=>"前四项不能全部为空"));
  21. exit;
  22. } */
  23. $pdo = conn();
  24. //$sql="CALL XM_ORDER_GET_CAR_LIST(1,'".$startarea."','".$endarea."','".$line."','".$starttime."',".$carNo.",'".$seatNo."','".$name."',".$currpage.",".$pagesize.")";
  25. //writeLog('search_ticket---sql=='.$sql);
  26. //$sql = "Select *"
  27. // . "from (OPERA_PRODUCT_PRICE as b inner join opera_product as a "
  28. // . "on a.id=b.prod_id) where b.PROD_TYPE_ID=255";
  29. $sql = "Select prod_price,run_id,c.run_date,c.run_time "
  30. . "from (OPERA_PRODUCT_PRICE b inner join opera_product as a on a.id=b.prod_id) inner join run_main c on c.prod_id=b.prod_id "
  31. . "where b.PROD_TYPE_ID=255";
  32. $result = $pdo->query($sql);
  33. $data = array();
  34. do {
  35. $rowset = $result->fetchAll(PDO::FETCH_ASSOC);
  36. if ($rowset) {
  37. $data[] = $rowset;
  38. }
  39. } while ($result->nextRowset());
  40. echo '<pre>';
  41. var_dump($data);
  42. /**
  43. * $count=count($data);
  44. $final_data=array();
  45. if($count==1 && isset($data[0][0]['code']) && $data[0][0]['code']!=0){
  46. echo json_encode($data[0][0]);
  47. }else if($count==2){
  48. $json=array("code"=>0,"info"=>"");
  49. $json['totalTickets']= (isset($data[1][0]['num'])) ? $data[1][0]['num'] : 0;
  50. $json['totalPages']= (isset($data[1][0]['pagecount'])) ? $data[1][0]['pagecount'] : 0;
  51. $json['searchInfo']=$data[0];
  52. //echo json_encode($json);
  53. echo '<pre>';
  54. var_dump($json);
  55. }else{
  56. echo json_encode(array("code"=>0,"info"=>"","searchInfo"=>array()));
  57. }
  58. */
  59. exit();