From b801c63c8b554496f0c379280d80817091156b97 Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Sat, 26 Nov 2022 10:21:26 +0100 Subject: [PATCH 1/3] Deleting distance.php --- Sources/php_script/script/distance.php | 23 ------------------- .../script/insertAndMakeListUser.php | 19 +++++++++++++++ 2 files changed, 19 insertions(+), 23 deletions(-) delete mode 100644 Sources/php_script/script/distance.php diff --git a/Sources/php_script/script/distance.php b/Sources/php_script/script/distance.php deleted file mode 100644 index a038647..0000000 --- a/Sources/php_script/script/distance.php +++ /dev/null @@ -1,23 +0,0 @@ - Date: Sat, 26 Nov 2022 10:29:00 +0100 Subject: [PATCH 2/3] Updating insertAndMakeListUser.php --- .idea/libraries/Dart_Packages.xml | 340 +++++++++--------- .idea/libraries/Dart_SDK.xml | 38 +- .../script/insertAndMakeListUser.php | 6 +- 3 files changed, 193 insertions(+), 191 deletions(-) diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml index 04e2ec7..f8237c9 100644 --- a/.idea/libraries/Dart_Packages.xml +++ b/.idea/libraries/Dart_Packages.xml @@ -5,686 +5,686 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index 3dbed52..cb79f3d 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,25 +1,25 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Sources/php_script/script/insertAndMakeListUser.php b/Sources/php_script/script/insertAndMakeListUser.php index 9d98b0c..8e6cd00 100644 --- a/Sources/php_script/script/insertAndMakeListUser.php +++ b/Sources/php_script/script/insertAndMakeListUser.php @@ -77,11 +77,13 @@ function insertUserAndReturnList(): array|int } } - return (json_encode($listUser)); //Return an encode array in json, so flutter ca=n interpret it + return $listUser; //Return an encode array in json, so flutter ca=n interpret it } else { //If the method POST return nothing return 3; //Return a code error } -} \ No newline at end of file +} + +print(json_encode(insertUserAndReturnList())); From 1cb0d786783060b7453e2f474895de0d3c8cb8fe Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Sat, 26 Nov 2022 10:32:25 +0100 Subject: [PATCH 3/3] Updating insertAndMakeListUser.php --- Sources/php_script/script/insertAndMakeListUser.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Sources/php_script/script/insertAndMakeListUser.php b/Sources/php_script/script/insertAndMakeListUser.php index 8e6cd00..c4b6210 100644 --- a/Sources/php_script/script/insertAndMakeListUser.php +++ b/Sources/php_script/script/insertAndMakeListUser.php @@ -22,6 +22,7 @@ function metersBetweenTwoUser($lat1, $lng1, $lat2, $lng2): float function insertUserAndReturnList(): array|int { + include "config.php"; $res = connection(); if ($res == -1) {