first commit

This commit is contained in:
Hamza-Ayed
2026-06-09 08:40:31 +03:00
commit d8901e1a87
3161 changed files with 536187 additions and 0 deletions

View File

@@ -0,0 +1,88 @@
[2025-06-20 17:42:27] --- New Request Received ---
[2025-06-20 17:42:27] Incoming POST data: {"driver_id":"109270481246447459618","status":"Apply","passengerLocation":"32.1117875,36.0669891","passengerDestination":"32.0798703,36.0749472","Duration":"528","totalCost":"6.99","Distance":"5.64","name":"hamza","phone":"+201010101010","email":"hamzaayedflutter@gmail.com","WalletChecked":"true","tokenPassenger":"e4QWqe7K607luM7qUMOPCL:APA91bFjX4XBM4I5COJl9fyxCTKJ1ZQpT3vzY7iEbOTuT4uo0-OSCAt5zgVhlhw4aC33s-VhyucDnP1tQGFd9svaazQ8A_SKgolPk3owzug8dCsiXoPeJ0k","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C32.1117875%2C36.0669891&markers=color:red%7Clabel:D%7C32.0798703%2C36.0749472&path=color:0x007bff%7Cweight:5%7C32.1117875%2C36.0669891%7C32.0798703%2C36.0749472&key=AIzaSyCyfwRXTwSTLOFQSQgN5p7QZgGJVZnEKq0","DurationToPassenger":"1","rideId":"1292","passengerId":"113172279072358305645","durationOfRideValue":"528","paymentAmount":"33.78","paymentMethod":"visa","isHaveSteps":"startEnd","step0":"32.09571771505668,36.06855209916831","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"6.99","carType":"Speed","kazan":"8","startNameLocation":"4368+PPP\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","endNameLocation":"33HG+R6R\u060c \u0627\u0644\u0632\u0631\u0642\u0627\u0621\u060c \u0627\u0644\u0623\u0631\u062f\u0646","timeOfOrder":"2025-06-20T17:42:26.285449","totalPassenger":"33.78"}
[2025-06-20 17:42:27] Critical error: Missing required fields (rideId, driverId, or locations).
[2025-06-20 17:45:59] --- New Request Received ---
[2025-06-20 17:45:59] Incoming POST data: {"driver_id":"109270481246447459618","status":"Apply","passengerLocation":"32.1117875,36.0669891","passengerDestination":"32.0798703,36.0749472","Duration":"528","totalCost":"6.99","Distance":"5.64","name":"hamza","phone":"+201010101010","email":"hamzaayedflutter@gmail.com","WalletChecked":"true","tokenPassenger":"e4QWqe7K607luM7qUMOPCL:APA91bFjX4XBM4I5COJl9fyxCTKJ1ZQpT3vzY7iEbOTuT4uo0-OSCAt5zgVhlhw4aC33s-VhyucDnP1tQGFd9svaazQ8A_SKgolPk3owzug8dCsiXoPeJ0k","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C32.1117875%2C36.0669891&markers=color:red%7Clabel:D%7C32.0798703%2C36.0749472&path=color:0x007bff%7Cweight:5%7C32.1117875%2C36.0669891%7C32.0798703%2C36.0749472&key=AIzaSyCyfwRXTwSTLOFQSQgN5p7QZgGJVZnEKq0","DurationToPassenger":"3","rideId":"1293","passengerId":"113172279072358305645","durationOfRideValue":"528","paymentAmount":"33.78","paymentMethod":"visa","isHaveSteps":"startEnd","step0":"32.09571771505668,36.06855209916831","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"6.99","carType":"Speed","kazan":"8","startNameLocation":"4368+PPP\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","endNameLocation":"33HG+R6R\u060c \u0627\u0644\u0632\u0631\u0642\u0627\u0621\u060c \u0627\u0644\u0623\u0631\u062f\u0646","timeOfOrder":"2025-06-20T17:45:58.817633","totalPassenger":"33.78"}
[2025-06-20 17:45:59] Critical error: Missing required fields (rideId, driverId, or locations).
[2025-06-20 17:47:00] --- New Request Received ---
[2025-06-20 17:47:00] Incoming POST data: {"driver_id":"109270481246447459618","status":"Apply","passengerLocation":"32.1117875,36.0669891","passengerDestination":"32.1364001,36.0707479","Duration":"434","totalCost":"5.42","Distance":"4.38","name":"hamza","phone":"+201010101010","email":"hamzaayedflutter@gmail.com","WalletChecked":"true","tokenPassenger":"e4QWqe7K607luM7qUMOPCL:APA91bFjX4XBM4I5COJl9fyxCTKJ1ZQpT3vzY7iEbOTuT4uo0-OSCAt5zgVhlhw4aC33s-VhyucDnP1tQGFd9svaazQ8A_SKgolPk3owzug8dCsiXoPeJ0k","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C32.1117875%2C36.0669891&markers=color:red%7Clabel:D%7C32.1364001%2C36.0707479&path=color:0x007bff%7Cweight:5%7C32.1117875%2C36.0669891%7C32.1364001%2C36.0707479&key=AIzaSyCyfwRXTwSTLOFQSQgN5p7QZgGJVZnEKq0","DurationToPassenger":"2","rideId":"1294","passengerId":"113172279072358305645","durationOfRideValue":"434","paymentAmount":"27.82","paymentMethod":"visa","isHaveSteps":"startEnd","step0":"32.12404505187645,36.06566168367863","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"5.42","carType":"Speed","kazan":"8","startNameLocation":"4368+PPP\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","endNameLocation":"43PC+C4G\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","timeOfOrder":"2025-06-20T17:46:59.188875","totalPassenger":"27.82"}
[2025-06-20 17:47:00] Parsed Locations: passenger_lat=32.1117875, passenger_lng=36.0669891 | destination_lat=32.1364001, destination_lng=36.0707479
[2025-06-20 17:47:00] SQL statement prepared successfully. Attempting to execute...
[2025-06-20 17:47:00] SUCCESS: Database insert was successful for rideId: 1294
[2025-06-20 17:49:18] --- New Request Received ---
[2025-06-20 17:49:18] Incoming POST data: {"driver_id":"109270481246447459618","status":"Apply","passengerLocation":"32.1117875,36.0669891","passengerDestination":"32.0798703,36.0749472","Duration":"528","totalCost":"6.99","Distance":"5.64","name":"hamza","phone":"+201010101010","email":"hamzaayedflutter@gmail.com","WalletChecked":"true","tokenPassenger":"e4QWqe7K607luM7qUMOPCL:APA91bFjX4XBM4I5COJl9fyxCTKJ1ZQpT3vzY7iEbOTuT4uo0-OSCAt5zgVhlhw4aC33s-VhyucDnP1tQGFd9svaazQ8A_SKgolPk3owzug8dCsiXoPeJ0k","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C32.1117875%2C36.0669891&markers=color:red%7Clabel:D%7C32.0798703%2C36.0749472&path=color:0x007bff%7Cweight:5%7C32.1117875%2C36.0669891%7C32.0798703%2C36.0749472&key=AIzaSyCyfwRXTwSTLOFQSQgN5p7QZgGJVZnEKq0","DurationToPassenger":"1","rideId":"1295","passengerId":"113172279072358305645","durationOfRideValue":"528","paymentAmount":"33.78","paymentMethod":"visa","isHaveSteps":"startEnd","step0":"32.09571771505668,36.06855209916831","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"6.99","carType":"Speed","kazan":"8","startNameLocation":"4368+PPP\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","endNameLocation":"33HG+R6R\u060c \u0627\u0644\u0632\u0631\u0642\u0627\u0621\u060c \u0627\u0644\u0623\u0631\u062f\u0646","timeOfOrder":"2025-06-20T17:49:16.916262","totalPassenger":"33.78"}
[2025-06-20 17:49:18] Parsed Locations: passenger_lat=32.1117875, passenger_lng=36.0669891 | destination_lat=32.0798703, destination_lng=36.0749472
[2025-06-20 17:49:18] SQL statement prepared successfully. Attempting to execute...
[2025-06-20 17:49:18] EXCEPTION: An unexpected error occurred: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\x84\x0DO\x0E@@...' for column 'passenger_location' at row 1
[2025-06-20 17:52:06] --- New Request Received ---
[2025-06-20 17:52:06] Incoming POST data: {"driver_id":"109270481246447459618","status":"Apply","passengerLocation":"32.1117875,36.0669891","passengerDestination":"32.1364001,36.0707479","Duration":"434","totalCost":"5.42","Distance":"4.38","name":"hamza","phone":"+201010101010","email":"hamzaayedflutter@gmail.com","WalletChecked":"true","tokenPassenger":"e4QWqe7K607luM7qUMOPCL:APA91bFjX4XBM4I5COJl9fyxCTKJ1ZQpT3vzY7iEbOTuT4uo0-OSCAt5zgVhlhw4aC33s-VhyucDnP1tQGFd9svaazQ8A_SKgolPk3owzug8dCsiXoPeJ0k","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C32.1117875%2C36.0669891&markers=color:red%7Clabel:D%7C32.1364001%2C36.0707479&path=color:0x007bff%7Cweight:5%7C32.1117875%2C36.0669891%7C32.1364001%2C36.0707479&key=AIzaSyCyfwRXTwSTLOFQSQgN5p7QZgGJVZnEKq0","DurationToPassenger":"5","rideId":"1296","passengerId":"113172279072358305645","durationOfRideValue":"434","paymentAmount":"27.82","paymentMethod":"visa","isHaveSteps":"startEnd","step0":"32.12404505187645,36.06566168367863","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"5.42","carType":"Speed","kazan":"8","startNameLocation":"4368+PPP\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","endNameLocation":"43PC+C4G\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","timeOfOrder":"2025-06-20T17:52:05.601313","totalPassenger":"27.82"}
[2025-06-20 17:52:06] SQL statement prepared successfully. Attempting to execute...
[2025-06-20 17:52:06] EXCEPTION: An unexpected error occurred: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'passenger_location' at row 1
[2025-06-20 17:53:56] --- New Request Received ---
[2025-06-20 17:53:56] Incoming POST data: {"driver_id":"109270481246447459618","status":"Apply","passengerLocation":"32.1117875,36.0669891","passengerDestination":"32.0798703,36.0749472","Duration":"528","totalCost":"6.99","Distance":"5.64","name":"hamza","phone":"+201010101010","email":"hamzaayedflutter@gmail.com","WalletChecked":"true","tokenPassenger":"e4QWqe7K607luM7qUMOPCL:APA91bFjX4XBM4I5COJl9fyxCTKJ1ZQpT3vzY7iEbOTuT4uo0-OSCAt5zgVhlhw4aC33s-VhyucDnP1tQGFd9svaazQ8A_SKgolPk3owzug8dCsiXoPeJ0k","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C32.1117875%2C36.0669891&markers=color:red%7Clabel:D%7C32.0798703%2C36.0749472&path=color:0x007bff%7Cweight:5%7C32.1117875%2C36.0669891%7C32.0798703%2C36.0749472&key=AIzaSyCyfwRXTwSTLOFQSQgN5p7QZgGJVZnEKq0","DurationToPassenger":"3","rideId":"1297","passengerId":"113172279072358305645","durationOfRideValue":"528","paymentAmount":"33.78","paymentMethod":"visa","isHaveSteps":"startEnd","step0":"32.09571771505668,36.06855209916831","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"6.99","carType":"Speed","kazan":"8","startNameLocation":"4368+PPP\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","endNameLocation":"33HG+R6R\u060c \u0627\u0644\u0632\u0631\u0642\u0627\u0621\u060c \u0627\u0644\u0623\u0631\u062f\u0646","timeOfOrder":"2025-06-20T17:53:56.195146","totalPassenger":"33.78"}
[2025-06-20 17:53:56] SQL statement prepared successfully. Attempting to execute...
[2025-06-20 17:53:56] SUCCESS: Database insert was successful for rideId: 1297
[2025-06-21 23:49:45] --- New Request Received ---
[2025-06-21 23:49:45] Incoming POST data: {"driver_id":"109270481246447459618","status":"Apply","passengerLocation":"32.1117875,36.0669891","passengerDestination":"32.0798703,36.0749472","Duration":"528","totalCost":"6.99","Distance":"5.64","name":"hamza","phone":"+201010101010","email":"hamzaayedflutter@gmail.com","WalletChecked":"true","tokenPassenger":"e4QWqe7K607luM7qUMOPCL:APA91bFjX4XBM4I5COJl9fyxCTKJ1ZQpT3vzY7iEbOTuT4uo0-OSCAt5zgVhlhw4aC33s-VhyucDnP1tQGFd9svaazQ8A_SKgolPk3owzug8dCsiXoPeJ0k","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C32.1117875%2C36.0669891&markers=color:red%7Clabel:D%7C32.0798703%2C36.0749472&path=color:0x007bff%7Cweight:5%7C32.1117875%2C36.0669891%7C32.0798703%2C36.0749472&key=AIzaSyCyfwRXTwSTLOFQSQgN5p7QZgGJVZnEKq0","DurationToPassenger":"1","rideId":"1298","passengerId":"113172279072358305645","durationOfRideValue":"528","paymentAmount":"29.81","paymentMethod":"visa","isHaveSteps":"startEnd","step0":"32.09571771505668,36.06855209916831","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"6.99","carType":"Speed","kazan":"8","startNameLocation":"4368+PPP\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","endNameLocation":"33HG+R6R\u060c \u0627\u0644\u0632\u0631\u0642\u0627\u0621\u060c \u0627\u0644\u0623\u0631\u062f\u0646","timeOfOrder":"2025-06-21T23:49:42.340702","totalPassenger":"29.81"}
[2025-06-21 23:49:45] SQL statement prepared successfully. Attempting to execute...
[2025-06-21 23:49:45] SUCCESS: Database insert was successful for rideId: 1298
[2025-07-08 18:34:43] --- New Request Received ---
[2025-07-08 18:34:43] Incoming POST data: {"driver_id":"109270481246447459618","status":"Apply","passengerLocation":"33.4934292,36.3335578","passengerDestination":"33.5165162,36.3174916","Duration":"842","totalCost":"6.32","Distance":"5.11","name":"hamza","phone":"+201010101010","email":"hamzaayedflutter@gmail.com","WalletChecked":"true","tokenPassenger":"e4QWqe7K607luM7qUMOPCL:APA91bFjX4XBM4I5COJl9fyxCTKJ1ZQpT3vzY7iEbOTuT4uo0-OSCAt5zgVhlhw4aC33s-VhyucDnP1tQGFd9svaazQ8A_SKgolPk3owzug8dCsiXoPeJ0k","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C33.4934292%2C36.3335578&markers=color:red%7Clabel:D%7C33.5165162%2C36.3174916&path=color:0x007bff%7Cweight:5%7C33.4934292%2C36.3335578%7C33.5165162%2C36.3174916&key=AIzaSyCyfwRXTwSTLOFQSQgN5p7QZgGJVZnEKq0","DurationToPassenger":"11","rideId":"1315","passengerId":"113172279072358305645","durationOfRideValue":"842","paymentAmount":"34.78","paymentMethod":"visa","isHaveSteps":"startEnd","step0":"33.505157730332385,36.32586847990751","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"6.32","carType":"Speed","kazan":"8","startNameLocation":"F8VM+C95\u060c \u062f\u0645\u0634\u0642\u060c \u0633\u0648\u0631\u064a\u0627","endNameLocation":"G888+MV4\u060c \u062f\u0645\u0634\u0642\u060c \u0633\u0648\u0631\u064a\u0627","timeOfOrder":"2025-07-08T18:34:14.861836","totalPassenger":"34.78"}
[2025-07-08 18:34:43] SQL statement prepared successfully. Attempting to execute...
[2025-07-08 18:34:43] SUCCESS: Database insert was successful for rideId: 1315
[2025-07-27 16:51:54] --- New Request Received ---
[2025-07-27 16:51:54] Incoming POST data: {"driver_id":"34feffd3fa72d6bee56b","status":"Apply","passengerLocation":"32.1117875,36.0669891","passengerDestination":"32.1324686,36.0710479","Duration":"346","totalCost":"2767.81","Distance":"2.64","name":"hamza","phone":"963992952235","email":"963992952235@intaleqapp.com","WalletChecked":"false","tokenPassenger":"eskhRGH3gkzOmUQou8xJjg:APA91bGkbGdXRTuB3QTZ5BjHGiYLZNugjVlW7o89ck9KPDmJrT7v1DBSjdamRSLc4oqT56xNpZ_LgkFKhRWkprlLUvZx5HLCOTXMk0WBiQ0UibiSWqw10oI","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C32.1117875%2C36.0669891&markers=color:red%7Clabel:D%7C32.1324686%2C36.0710479&path=color:0x007bff%7Cweight:5%7C32.1117875%2C36.0669891%7C32.1324686%2C36.0710479&key=QOsqYdTCyHNapgBsg2Kn-nTKbhaWhEAGOjUeU78","DurationToPassenger":"1","rideId":"2","passengerId":"0b24f04061d6853df4b9","durationOfRideValue":"346","paymentAmount":"10532.56","paymentMethod":"cash","isHaveSteps":"startEnd","step0":"32.122128403255125,36.07006452977657","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"2767.81","carType":"Speed","kazan":"15","startNameLocation":"4368+PPP\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","endNameLocation":"43MC+374\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","timeOfOrder":"2025-07-27T16:51:53.436851","totalPassenger":"10532.56"}
[2025-07-27 16:51:54] SQL statement prepared successfully. Attempting to execute...
[2025-07-27 16:51:54] SUCCESS: Database insert was successful for rideId: 2
[2025-08-05 12:13:28] --- New Request Received ---
[2025-08-05 12:13:28] Incoming POST data: {"driver_id":"34feffd3fa72d6bee56b","status":"Apply","passengerLocation":"32.1117131,36.067405","passengerDestination":"32.1278332,36.0702951","Duration":"253","totalCost":"2126.67","Distance":"2.03","name":"hamza","phone":"963992952235","email":"963992952235@intaleqapp.com","WalletChecked":"false","tokenPassenger":"dwDRLsWhZEIqum1oxaaTWY:APA91bHhImBb0-kyeRE8zP8jL-ps_K4Xt09g1YNRWbVx007FO4N9U4b9lPAoNOU029qM5-GU65doySW7dfsdQ_mDogqGtQnGtJz1uVOb_3_v-tuoL9irixo","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C32.1117131%2C36.067405&markers=color:red%7Clabel:D%7C32.1278332%2C36.0702951&path=color:0x007bff%7Cweight:5%7C32.1117131%2C36.067405%7C32.1278332%2C36.0702951&key=AIzaSyCFsWBqvkXzk1Gb-bCGxwqTwJQKIeHjH64","DurationToPassenger":"3","rideId":"23","passengerId":"0b24f04061d6853df4b9","durationOfRideValue":"253","paymentAmount":"5938.31","paymentMethod":"cash","isHaveSteps":"startEnd","step0":"32.119773283888684,36.06956731528044","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"2126.67","carType":"Speed","kazan":"15","startNameLocation":"4368+PPP\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","endNameLocation":"43H9+3V8\u060c \u0627\u0644\u0633\u062e\u0646\u0629\u060c \u0627\u0644\u0623\u0631\u062f\u0646","timeOfOrder":"2025-08-05T12:13:27.287381","totalPassenger":"5938.31"}
[2025-08-05 12:13:28] SQL statement prepared successfully. Attempting to execute...
[2025-08-05 12:13:28] SUCCESS: Database insert was successful for rideId: 23
[2025-11-03 16:54:25] --- New Request Received ---
[2025-11-03 16:54:25] Incoming POST data: {"driver_id":"90393d64b8cd7488c4df","status":"Apply","passengerLocation":"33.4323,36.24325","passengerDestination":"33.4277,36.23907","Duration":"111","totalCost":"0.00","Distance":"0.72","name":"\u062d\u0645\u0632\u0647","phone":"963992952235","email":"963992952235@intaleqapp.com","WalletChecked":"false","tokenPassenger":"eznj5vRWRnqwKNtKJBaYNg:APA91bHhJ2DJ1KQa3KRx6wQtX8BkFHq6I_-dXGxT16p6pnV5AwI0bWOeiTJOI35VfTBaK4YSCKmAB4SsRnpARK0MTJ96xtpPmwAKfkvsZFga8OoGMeb3PmA","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C33.4323%2C36.24325&markers=color:red%7Clabel:D%7C33.4277%2C36.23907&path=color:0x007bff%7Cweight:5%7C33.4323%2C36.24325%7C33.4277%2C36.23907&key=AIzaSyAPFR_XbRN0XZ5Iz3AYDjNYHGJG2s2QWwM","DurationToPassenger":"0","rideId":"5","passengerId":"f1e06c5908dcae1f5bf2","durationOfRideValue":"111","paymentAmount":"17280.00","paymentMethod":"cash","isHaveSteps":"startEnd","step0":"33.430078683118474,36.241159960627556","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"0.00","carType":"Speed","kazan":"8","startNameLocation":"home","endNameLocation":"destination","timeOfOrder":"2025-11-03T16:54:23.416130","totalPassenger":"17280.00"}
[2025-11-03 16:54:25] SQL statement prepared successfully. Attempting to execute...
[2025-11-03 16:54:25] SUCCESS: Database insert was successful for rideId: 5
[2025-11-18 18:07:16] --- New Request Received ---
[2025-11-18 18:07:16] Incoming POST data: {"driver_id":"ca60f0f65d7d6de23e5c","status":"Apply","passengerLocation":"36.16167,37.15408","passengerDestination":"36.2431,37.1496","Duration":"1254","totalCost":"0.00","Distance":"11.53","name":"George","phone":"447441447609","email":"sahrsa6@gmail.com","WalletChecked":"false","tokenPassenger":"eoHpQeewTbKL3ZU5ioLgP5:APA91bG0FhuTixe_kuDw49onLPdOjxdyRvmbT_TG5Va81lI7RqOpoHqaho6NThvybVJZaelkobwTDCZeC9WKLW-RytE1mUl3MfRiYiTPkHGZ2bCe9Raehtc","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C36.16167%2C37.15408&markers=color:red%7Clabel:D%7C36.2431%2C37.1496&path=color:0x007bff%7Cweight:5%7C36.16167%2C37.15408%7C36.2431%2C37.1496&key=AIzaSyAPFR_XbRN0XZ5Iz3AYDjNYHGJG2s2QWwM","DurationToPassenger":"0","rideId":"124","passengerId":"21c382cde919795e93bb","durationOfRideValue":"1254","paymentAmount":"56469.00","paymentMethod":"cash","isHaveSteps":"startEnd","step0":"36.174937765937635,37.15724665671587","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"0.00","carType":"Speed","kazan":"8","startNameLocation":"home","endNameLocation":"destination","timeOfOrder":"2025-11-18T18:07:15.160122","totalPassenger":"56469.00"}
[2025-11-18 18:07:16] SQL statement prepared successfully. Attempting to execute...
[2025-11-18 18:07:16] SUCCESS: Database insert was successful for rideId: 124
[2025-11-20 10:07:35] --- New Request Received ---
[2025-11-20 10:07:35] Incoming POST data: {"driver_id":"34feffd3fa72d6bee56b","status":"Apply","passengerLocation":"33.4323,36.24325","passengerDestination":"33.43575,36.2483","Duration":"203","totalCost":"0.00","Distance":"0.96","name":"\u062d\u0645\u0632\u0647","phone":"963992952235","email":"963992952235@intaleqapp.com","WalletChecked":"false","tokenPassenger":"clZNZD6JTNeytuyvhqAjAs:APA91bEfEgnGduR3yy2ND3V57d1-qT_OS_A-gGimALeYNwSla-IVMBfYgfDYucNN5Whf0wJODjkOYuT03JLr5AJ4eqRXKxUbkbBis-GYFDdly_3o5nDEiWo","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C33.4323%2C36.24325&markers=color:red%7Clabel:D%7C33.43575%2C36.2483&path=color:0x007bff%7Cweight:5%7C33.4323%2C36.24325%7C33.43575%2C36.2483&key=AIzaSyAPFR_XbRN0XZ5Iz3AYDjNYHGJG2s2QWwM","DurationToPassenger":"0","rideId":"143","passengerId":"849a9faf3e68c1aeb708","durationOfRideValue":"203","paymentAmount":"17280.00","paymentMethod":"cash","isHaveSteps":"startEnd","step0":"33.43403283445615,36.24521479010582","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"0.00","carType":"Speed","kazan":"8","startNameLocation":"home","endNameLocation":"destination","timeOfOrder":"2025-11-20T10:07:33.481734","totalPassenger":"17280.00"}
[2025-11-20 10:07:35] SQL statement prepared successfully. Attempting to execute...
[2025-11-20 10:07:35] SUCCESS: Database insert was successful for rideId: 143
[2025-11-25 20:16:54] --- New Request Received ---
[2025-11-25 20:16:54] Incoming POST data: {"driver_id":"7939eb03eb3b912ffb49","status":"Apply","passengerLocation":"35.12533,36.76929","passengerDestination":"35.13223,36.7536","Duration":"292","totalCost":"0.00","Distance":"2.81","name":"\u0639\u0628\u062f\u0627\u0644\u0644\u0647","phone":"963098198141","email":"bdallhlwany@gmail.com","WalletChecked":"false","tokenPassenger":"e-z9_8IRZEEsjwL3qFQAzN:APA91bHZEIWbF418RCnLeo3yVsGHkD7xDqoIHZzbw7tiXoImzSDi5KlOQbhIrEFxrtxNJ1uvStUk9jobI3k1p1LBr-Er7O2fhWG-P-HSHsChgGWoEjEZ15o","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C35.12533%2C36.76929&markers=color:red%7Clabel:D%7C35.13223%2C36.7536&path=color:0x007bff%7Cweight:5%7C35.12533%2C36.76929%7C35.13223%2C36.7536&key=AIzaSyAPFR_XbRN0XZ5Iz3AYDjNYHGJG2s2QWwM","DurationToPassenger":"0","rideId":"229","passengerId":"64070ab2e6cfa4be0c58","durationOfRideValue":"292","paymentAmount":"17280.00","paymentMethod":"cash","isHaveSteps":"startEnd","step0":"35.1270850911746,36.76192492246628","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"0.00","carType":"Speed","kazan":"8","startNameLocation":"\u062f\u0648\u0627\u0631 \u0627\u0644\u0627\u0633\u0643\u0627\u0646","endNameLocation":"\u062d\u0645\u0627\u0629","timeOfOrder":"2025-11-25T20:16:53.203785","totalPassenger":"17280.00"}
[2025-11-25 20:16:54] SQL statement prepared successfully. Attempting to execute...
[2025-11-25 20:16:54] SUCCESS: Database insert was successful for rideId: 229
[2025-11-29 13:25:59] --- New Request Received ---
[2025-11-29 13:25:59] Incoming POST data: {"driver_id":"f48c50ef7bb6f55e710c","status":"Apply","passengerLocation":"33.43231,36.24297","passengerDestination":"33.43562,36.16933","Duration":"1419","totalCost":"0.00","Distance":"12.68","name":"\u062d\u0645\u0632\u0647","phone":"963992952235","email":"963992952235@intaleqapp.com","WalletChecked":"false","tokenPassenger":"eduBTsgC501SmEff3v4MGi:APA91bGf2PpOdgC3dEK7h3E4Kccu30tw7rbZeAJe7Co5JmHrrkwsz0pijAXFcjrbNkWQLI867bTogGGjL847OBNQ8FHSQJN9Gs1RY-GwaXh9ubffApwEdd0","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C33.43231%2C36.24297&markers=color:red%7Clabel:D%7C33.43562%2C36.16933&path=color:0x007bff%7Cweight:5%7C33.43231%2C36.24297%7C33.43562%2C36.16933&key=AIzaSyAPFR_XbRN0XZ5Iz3AYDjNYHGJG2s2QWwM","DurationToPassenger":"0","rideId":"290","passengerId":"849a9faf3e68c1aeb708","durationOfRideValue":"1419","paymentAmount":"60710.00","paymentMethod":"cash","isHaveSteps":"startEnd","step0":"33.449831692690715,36.20406500995159","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"0.00","carType":"Speed","kazan":"8","startNameLocation":"\u0623\u0634\u0631\u0641\u064a\u0629","endNameLocation":"\u062c\u062f\u064a\u062f\u0629 \u0639\u0631\u0637\u0648\u0632","timeOfOrder":"2025-11-29T13:25:58.938290","totalPassenger":"60710.00"}
[2025-11-29 13:25:59] SQL statement prepared successfully. Attempting to execute...
[2025-11-29 13:25:59] SUCCESS: Database insert was successful for rideId: 290
[2025-12-01 10:28:09] --- New Request Received ---
[2025-12-01 10:28:09] Incoming POST data: {"driver_id":"b21737ec0edb0d02eb86","status":"Apply","passengerLocation":"33.4323,36.24329","passengerDestination":"33.41301,36.23664","Duration":"575","totalCost":"0.00","Distance":"3.64","name":"\u062d\u0645\u0632\u0647","phone":"963992952235","email":"963992952235@intaleqapp.com","WalletChecked":"false","tokenPassenger":"eduBTsgC501SmEff3v4MGi:APA91bGf2PpOdgC3dEK7h3E4Kccu30tw7rbZeAJe7Co5JmHrrkwsz0pijAXFcjrbNkWQLI867bTogGGjL847OBNQ8FHSQJN9Gs1RY-GwaXh9ubffApwEdd0","direction":"https:\/\/maps.googleapis.com\/maps\/api\/staticmap?size=600x150&maptype=roadmap&markers=color:green%7Clabel:S%7C33.4323%2C36.24329&markers=color:red%7Clabel:D%7C33.41301%2C36.23664&path=color:0x007bff%7Cweight:5%7C33.4323%2C36.24329%7C33.41301%2C36.23664&key=AIzaSyAPFR_XbRN0XZ5Iz3AYDjNYHGJG2s2QWwM","DurationToPassenger":"0","rideId":"314","passengerId":"849a9faf3e68c1aeb708","durationOfRideValue":"575","paymentAmount":"19754.00","paymentMethod":"cash","isHaveSteps":"startEnd","step0":"33.42334065389521,36.23577006161213","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"0.00","carType":"Speed","kazan":"8","startNameLocation":"\u0623\u0634\u0631\u0641\u064a\u0629","endNameLocation":"\u0627\u0644\u0634\u064a\u062e \u0625\u0628\u0631\u0627\u0647\u064a\u0645","timeOfOrder":"2025-12-01T10:28:11.316238","totalPassenger":"19754.00"}
[2025-12-01 10:28:09] SQL statement prepared successfully. Attempting to execute...
[2025-12-01 10:28:09] SUCCESS: Database insert was successful for rideId: 314
[2026-01-08 01:45:12] --- New Request Received ---
[2026-01-08 01:45:12] Incoming POST data: {"driver_id":"34feffd3fa72d6bee56b","status":"Apply","passengerLocation":"31.990668","passengerDestination":"35.877682","Duration":"35.930359","totalCost":"3.50","Distance":"8.5 km","name":"Hamza Passenger","phone":"0791234567","email":"client@email.com","WalletChecked":"false","tokenPassenger":"PASSENGER_FCM_TOKEN_XYZ","direction":"","DurationToPassenger":"5 min","rideId":"9999","passengerId":"55","durationOfRideValue":"20 min","paymentAmount":"3.50","paymentMethod":"cash","isHaveSteps":"false","step0":"","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"3.50","carType":"speed","kazan":"2.75","startNameLocation":"\u0627\u0644\u062c\u0627\u0645\u0639\u0629 \u0627\u0644\u0623\u0631\u062f\u0646\u064a\u0629 - \u0627\u0644\u0628\u0648\u0627\u0628\u0629 \u0627\u0644\u0631\u0626\u064a\u0633\u064a\u0629","endNameLocation":"\u0627\u0644\u0639\u0628\u062f\u0644\u064a \u0645\u0648\u0644 - \u0627\u0644\u0628\u0648\u0644\u064a\u0641\u0627\u0631\u062f","timeOfOrder":"2026-01-08T01:45:11.370578","totalPassenger":"3.50"}
[2026-01-08 01:45:12] SQL statement prepared successfully. Attempting to execute...
[2026-01-08 01:45:12] EXCEPTION: An unexpected error occurred: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'direction_url' cannot be null
[2026-01-08 21:23:04] --- New Request Received ---
[2026-01-08 21:23:04] Incoming POST data: {"driver_id":"34feffd3fa72d6bee56b","status":"Apply","passengerLocation":"32.073743222739","passengerDestination":"36.096920477709","Duration":"35.930359","totalCost":"3.50","Distance":"8.9 km","name":"Hamza Passenger","phone":"0791234567","email":"client@email.com","WalletChecked":"false","tokenPassenger":"PASSENGER_FCM_TOKEN_XYZ","direction":"","DurationToPassenger":"5 min","rideId":"9999","passengerId":"55","durationOfRideValue":"18 min","paymentAmount":"53.50","paymentMethod":"cash","isHaveSteps":"false","step0":"","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"3.50","carType":"speed","kazan":"2.75","startNameLocation":"\u0627\u0644\u062c\u0627\u0645\u0639\u0629 \u0627\u0644\u0623\u0631\u062f\u0646\u064a\u0629 - \u0627\u0644\u0628\u0648\u0627\u0628\u0629 \u0627\u0644\u0631\u0626\u064a\u0633\u064a\u0629","endNameLocation":"\u0627\u0644\u0639\u0628\u062f\u0644\u064a \u0645\u0648\u0644 - \u0627\u0644\u0628\u0648\u0644\u064a\u0641\u0627\u0631\u062f","timeOfOrder":"2026-01-08T21:23:03.507502","totalPassenger":"53.50"}
[2026-01-08 21:23:04] SQL statement prepared successfully. Attempting to execute...
[2026-01-08 21:23:04] EXCEPTION: An unexpected error occurred: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'direction_url' cannot be null
[2026-01-22 14:29:49] --- New Request Received ---
[2026-01-22 14:29:49] Incoming POST data: {"driver_id":"34feffd3fa72d6bee56b","status":"Apply","passengerLocation":"startLocation","passengerDestination":"endLocation","Duration":"durationToPassenger","totalCost":"totalCost","Distance":"distance","name":"passengerName","phone":"passengerPhone","email":"email","WalletChecked":"WalletChecked","tokenPassenger":"passengerToken","direction":"","DurationToPassenger":"DurationToPassenger","rideId":"rideId","passengerId":"passengerId","durationOfRideValue":"durationOfRideValue","paymentAmount":"paymentAmount","paymentMethod":"cash","isHaveSteps":"isHaveSteps","step0":"step0","step1":"step1","step2":"step2","step3":"step3","step4":"step4","passengerWalletBurc":"totalCost","carType":"carType","kazan":"kazan","startNameLocation":"startNameLocation","endNameLocation":"endNameLocation","timeOfOrder":"2026-01-22T14:29:46.887096","totalPassenger":"paymentAmount"}
[2026-01-22 14:29:49] SQL statement prepared successfully. Attempting to execute...
[2026-01-22 14:29:49] EXCEPTION: An unexpected error occurred: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'direction_url' cannot be null
[2026-01-22 14:31:31] --- New Request Received ---
[2026-01-22 14:31:31] Incoming POST data: {"driver_id":"34feffd3fa72d6bee56b","status":"Apply","passengerLocation":"startLocation","passengerDestination":"endLocation","Duration":"durationToPassenger","totalCost":"totalCost","Distance":"distance","name":"passengerName","phone":"passengerPhone","email":"email","WalletChecked":"WalletChecked","tokenPassenger":"passengerToken","direction":"","DurationToPassenger":"DurationToPassenger","rideId":"rideId","passengerId":"passengerId","durationOfRideValue":"durationOfRideValue","paymentAmount":"paymentAmount","paymentMethod":"cash","isHaveSteps":"isHaveSteps","step0":"step0","step1":"step1","step2":"step2","step3":"step3","step4":"step4","passengerWalletBurc":"totalCost","carType":"carType","kazan":"kazan","startNameLocation":"startNameLocation","endNameLocation":"endNameLocation","timeOfOrder":"2026-01-22T14:31:29.409730","totalPassenger":"paymentAmount"}
[2026-01-22 14:31:31] SQL statement prepared successfully. Attempting to execute...
[2026-01-22 14:31:31] EXCEPTION: An unexpected error occurred: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'direction_url' cannot be null
[2026-01-22 14:39:59] --- New Request Received ---
[2026-01-22 14:39:59] Incoming POST data: {"driver_id":"34feffd3fa72d6bee56b","status":"Apply","passengerLocation":"startLocation","passengerDestination":"endLocation","Duration":"durationToPassenger","totalCost":"totalCost","Distance":"distance","name":"passengerName","phone":"passengerPhone","email":"email","WalletChecked":"WalletChecked","tokenPassenger":"passengerToken","direction":"","DurationToPassenger":"DurationToPassenger","rideId":"rideId","passengerId":"passengerId","durationOfRideValue":"durationOfRideValue","paymentAmount":"paymentAmount","paymentMethod":"cash","isHaveSteps":"isHaveSteps","step0":"step0","step1":"step1","step2":"step2","step3":"step3","step4":"step4","passengerWalletBurc":"totalCost","carType":"carType","kazan":"kazan","startNameLocation":"startNameLocation","endNameLocation":"endNameLocation","timeOfOrder":"2026-01-22T14:39:56.986847","totalPassenger":"paymentAmount"}
[2026-01-22 14:39:59] SQL statement prepared successfully. Attempting to execute...
[2026-01-22 14:39:59] EXCEPTION: An unexpected error occurred: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'direction_url' cannot be null
[2026-02-20 16:39:52] --- New Request Received ---
[2026-02-20 16:39:52] Incoming POST data: {"driver_id":"eefed62b0aeb9e304efd","status":"Apply","passengerLocation":"32.11172","passengerDestination":"36.06738","Duration":"36.06738","totalCost":"173.00","Distance":"0.0","name":"\u062d\u0645\u0632\u0647 \u0639\u0627\u064a\u062f","phone":"963992952235","email":"963992952235@intaleqapp.com","WalletChecked":"false","tokenPassenger":"e9X4q6nL3EuRu2OIsWJ-A2:APA91bE223jfIOjWbSrjF41HZjeZVWc-jm2NAg2sXTmoyHUkoC10uycmxl0Ne4WcE8aojjTm7fWTPm5aEFi1xJKN1Wy0vgupUmSD2LcKBcE1Cym_GTvikME","direction":"","DurationToPassenger":"","rideId":"782","passengerId":"849a9faf3e68c1aeb708","durationOfRideValue":"","paymentAmount":"173.00","paymentMethod":"cash","isHaveSteps":"false","step0":"32.11180279564045,36.067136228084564","step1":"","step2":"","step3":"","step4":"","passengerWalletBurc":"173.00","carType":"Fixed Price","kazan":"0.00","startNameLocation":"\u0648\u0627\u062f\u064a \u0623\u0643\u064a\u062f\u0631","endNameLocation":"\u0648\u0627\u062f\u064a \u0623\u0643\u064a\u062f\u0631","timeOfOrder":"2026-02-20T16:40:10.040464","totalPassenger":"173.00"}
[2026-02-20 16:39:52] SQL statement prepared successfully. Attempting to execute...
[2026-02-20 16:39:52] EXCEPTION: An unexpected error occurred: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'direction_url' cannot be null

122
backend/ride/overLay/add.php Executable file
View File

@@ -0,0 +1,122 @@
<?php
require_once __DIR__ . '/../../connect.php';
// --- دالة تسجيل الأخطاء (تبقى كما هي) ---
function log_message($message) {
$log_file = __DIR__ . '/_log.txt';
$formatted_message = "[" . date("Y-m-d H:i:s") . "] " . $message . "\n";
file_put_contents($log_file, $formatted_message, FILE_APPEND);
}
log_message("--- New Request Received ---");
log_message("Incoming POST data: " . json_encode($_POST));
// --- قائمة المتغيرات (تبقى كما هي) ---
define('TABLE_NAME', 'write_argument_after_applied_from_background');
$params = [
'rideId', 'driver_id', 'passengerId', 'passengerLocation', 'passengerDestination',
'Duration', 'DurationToPassenger', 'durationOfRideValue', 'Distance', 'totalCost',
'paymentAmount', 'paymentMethod', 'WalletChecked', 'isHaveSteps', 'step0', 'step1',
'step2', 'step3', 'step4', 'passengerWalletBurc', 'tokenPassenger', 'name',
'phone', 'email', 'startNameLocation', 'endNameLocation', 'carType', 'kazan',
'direction', 'timeOfOrder', 'totalPassenger',
];
$data = [];
foreach ($params as $key) {
$data[$key] = isset($_POST[$key]) ? filterRequest($key) : null;
}
// التحقق من البيانات (يبقى كما هو)
if (empty($data['rideId']) || empty($data['driver_id']) || empty($data['passengerLocation']) || empty($data['passengerDestination'])) {
$error_msg = "Critical error: Missing required fields (rideId, driver_id, or locations). Check incoming keys.";
log_message($error_msg);
jsonError($error_msg);
exit();
}
// --- تم حذف تقسيم الإحداثيات ---
// لم نعد بحاجة لـ list($plat, $plng) = explode(...)
// --- التعديل الرئيسي هنا في جملة SQL ---
$sql = "
INSERT INTO " . TABLE_NAME . " (
ride_id, driver_id, passenger_id,
passenger_location, passenger_destination, -- These are now simple string fields
duration, duration_to_passenger, duration_of_ride,
distance, total_cost, payment_amount, payment_method,
wallet_checked, has_steps, step0, step1, step2, step3, step4,
passenger_wallet_burc, token_passenger,
name, phone, email,
start_name_location, end_name_location,
car_type, kazan, direction_url, time_of_order, total_passenger
) VALUES (
:rideId, :driver_id, :passengerId,
:passengerLocation, :passengerDestination, -- We removed the POINT() function
:Duration, :DurationToPassenger, :durationOfRideValue,
:Distance, :totalCost, :paymentAmount, :paymentMethod,
:WalletChecked, :isHaveSteps, :step0, :step1, :step2, :step3, :step4,
:passengerWalletBurc, :tokenPassenger,
:name, :phone, :email,
:startNameLocation, :endNameLocation,
:carType, :kazan, :direction, :timeOfOrder, :totalPassenger
)";
try {
$stmt = $con->prepare($sql);
// --- التعديل الرئيسي هنا في bindValue ---
$stmt->bindValue(':rideId', $data['rideId']);
$stmt->bindValue(':driver_id', $data['driver_id']);
$stmt->bindValue(':passengerId', $data['passengerId']);
// Bind the locations as simple strings
$stmt->bindValue(':passengerLocation', $data['passengerLocation']);
$stmt->bindValue(':passengerDestination', $data['passengerDestination']);
// باقي الـ bindValue تبقى كما هي
$stmt->bindValue(':Duration', intval($data['Duration']), PDO::PARAM_INT);
$stmt->bindValue(':DurationToPassenger', intval($data['DurationToPassenger']), PDO::PARAM_INT);
$stmt->bindValue(':durationOfRideValue', intval($data['durationOfRideValue']), PDO::PARAM_INT);
$stmt->bindValue(':Distance', (float)$data['Distance']);
$stmt->bindValue(':totalCost', (float)$data['totalCost']);
$stmt->bindValue(':paymentAmount', (float)$data['paymentAmount']);
$stmt->bindValue(':paymentMethod', $data['paymentMethod']);
$stmt->bindValue(':WalletChecked', $data['WalletChecked'] === 'true' ? 1 : 0, PDO::PARAM_INT);
$stmt->bindValue(':isHaveSteps', !empty($data['isHaveSteps']) ? 1 : 0, PDO::PARAM_INT);
$stmt->bindValue(':step0', $data['step0']);
$stmt->bindValue(':step1', $data['step1']);
$stmt->bindValue(':step2', $data['step2']);
$stmt->bindValue(':step3', $data['step3']);
$stmt->bindValue(':step4', $data['step4']);
$stmt->bindValue(':passengerWalletBurc', (float)$data['passengerWalletBurc']);
$stmt->bindValue(':tokenPassenger', $data['tokenPassenger']);
$stmt->bindValue(':name', $data['name']);
$stmt->bindValue(':phone', $data['phone']);
$stmt->bindValue(':email', $data['email']);
$stmt->bindValue(':startNameLocation', $data['startNameLocation']);
$stmt->bindValue(':endNameLocation', $data['endNameLocation']);
$stmt->bindValue(':carType', $data['carType']);
$stmt->bindValue(':kazan', (float)$data['kazan']);
$stmt->bindValue(':direction', $data['direction']);
$stmt->bindValue(':timeOfOrder', $data['timeOfOrder']);
$stmt->bindValue(':totalPassenger', intval($data['totalPassenger']), PDO::PARAM_INT);
log_message("SQL statement prepared successfully. Attempting to execute...");
if ($stmt->execute()) {
log_message("SUCCESS: Database insert was successful for rideId: " . $data['rideId']);
jsonSuccess(null, "نجحت الإضافة");
} else {
$errorInfo = $stmt->errorInfo();
$error_msg = "FAILURE: Database insert failed. PDO Error: " . implode(" | ", $errorInfo);
log_message($error_msg);
jsonError("failure");
}
} catch (Exception $e) {
$error_msg = "EXCEPTION: An unexpected error occurred: " . $e->getMessage();
log_message($error_msg);
jsonError("failure");
}
?>

View File

@@ -0,0 +1,32 @@
<?php
require_once __DIR__ . '/../../connect.php';
$driver_id = filterRequest('driver_id');
if (empty($driver_id)) {
jsonError('Missing driver ID');
exit;
}
// SQL to DELETE the latest record for this driver
// Still respects the 2-minute constraint
$sql = "DELETE FROM write_argument_after_applied_from_background
WHERE driver_id = :driver_id
AND TIMESTAMPDIFF(MINUTE, time_of_order, NOW()) <= 20
ORDER BY time_of_order DESC
LIMIT 1";
$stmt = $con->prepare($sql);
$stmt->bindParam(':driver_id', $driver_id);
$stmt->execute();
// Check if any rows were actually deleted
$count = $stmt->rowCount();
if ($count > 0) {
jsonSuccess(null, "Record deleted successfully");
} else {
// Failure occurs if no record exists OR if the record is older than 2 minutes
jsonError('No data found to delete (or time limit exceeded)');
}
?>

40
backend/ride/overLay/get.php Executable file
View File

@@ -0,0 +1,40 @@
<?php
require_once __DIR__ . '/../../connect.php';
$driver_id = filterRequest("driver_id");
// 1) تأكد من وجود driver_id
if (empty($driver_id)) {
jsonError("Missing driver ID.");
exit;
}
// 2) استعلام لأحدث رحلة بحالة apply
$sql = "
SELECT
r.*,
t.token
FROM `ride` AS r
LEFT JOIN `tokens` AS t
ON t.passengerID = r.passenger_id
WHERE
r.driver_id = :driver_id
AND r.status = 'Apply'
AND r.created_at >= NOW() - INTERVAL 2 MINUTE
ORDER BY
r.created_at DESC
LIMIT 1;
";
$stmt = $con->prepare($sql);
$stmt->bindParam(':driver_id', $driver_id, PDO::PARAM_INT);
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
// 3) إرجاع النتيجة أو رسالة خطأ
if ($row) {
jsonSuccess($row);
} else {
jsonError("Ride not found.");
}

View File

@@ -0,0 +1,38 @@
<?php
require_once __DIR__ . '/../../connect.php';
$driver_id = filterRequest('driver_id');
if (empty($driver_id)) {
jsonError('Missing driver ID');
exit;
}
// Fetch latest record for this driver:
$sql = "SELECT * FROM write_argument_after_applied_from_background
WHERE driver_id = :driver_id
AND TIMESTAMPDIFF(MINUTE, time_of_order, NOW()) <= 2
ORDER BY time_of_order DESC
LIMIT 1";
$stmt = $con->prepare($sql);
$stmt->bindParam(':driver_id', $driver_id);
$stmt->execute();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
if ($row) {
// convert WKT POINT back to "lat,lng"
foreach (['passenger_location', 'passenger_destination'] as $f) {
if (!empty($row["{$f}_wkt"])) {
// WKT format: POINT(lng lat)
preg_match('/POINT\(([^ ]+) ([^ ]+)\)/', $row["{$f}_wkt"], $m);
$row[$f] = "{$m[2]},{$m[1]}";
}
unset($row["{$f}_wkt"]);
}
jsonSuccess($row);
} else {
jsonError('No data found');
}