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.
 
 
 
 

31 lines
583 B

  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. $myprod=$_GET['prod'];
  15. $mycustomer=$_GET['customer'];
  16. $pdo=conn();
  17. $sql="call sp_make_order(".$userid.",'".$myprod."',".$mycustomer.")";
  18. writeLog("sp_make_order: ".$sql);
  19. if (is_object($pdo)){
  20. $result=$pdo->query($sql);
  21. $rowset=$result->fetchAll(PDO::FETCH_ASSOC);
  22. echo json_encode($rowset[0]);
  23. }