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.
 
 
 
 

53 lines
1.1 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. $allrunid=$_GET['allrunid'];
  15. $runstatus=$_GET['status'];
  16. $yii_url = 'http://'.CS1_DOMAIN.'/api/dynamic-bus/run-status-update';
  17. $send_data = [
  18. 'all_run_id'=>$allrunid,
  19. 'run_status'=>$runstatus
  20. ];
  21. $res = httpRequest($yii_url,$send_data);
  22. $r = json_decode($res,true);
  23. if( $r['errcode'] == 0){
  24. $pdo=conn();
  25. $sql1 = "CALL SP_REFRESH_RUN_BUS_STATUS()";
  26. $result = $pdo->query($sql1);
  27. }
  28. echo $res;
  29. exit;
  30. //$sql="call sp_update_run_status(".$userid.",'".$allrunid."',".$runstatus.")";
  31. //$sql1 = "CALL SP_REFRESH_RUN_BUS_STATUS()";
  32. //$result = $pdo->query($sql1);
  33. //writeLog("sp_update_run_status: ".$sql);
  34. //if (is_object($pdo)){
  35. // $result=$pdo->query($sql);
  36. // $rowset=$result->fetchAll(PDO::FETCH_ASSOC);
  37. // $result->closeCursor();
  38. // $sql1 = "CALL SP_REFRESH_RUN_BUS_STATUS()";
  39. // $result = $pdo->query($sql1);
  40. // echo json_encode($rowset[0]);
  41. //}