From 127431a7de975ce1b462d9c82e9bd25dc33ef099 Mon Sep 17 00:00:00 2001 From: janmaroto Date: Wed, 2 Mar 2022 19:08:20 +0100 Subject: [PATCH] Afegits fitxers de backend --- backend/config.php | 15 ++++++++ backend/delete.php | 15 ++++++++ backend/insert.php | 24 +++++++++++++ backend/insert_new.php | 24 +++++++++++++ backend/insert_old.php | 58 +++++++++++++++++++++++++++++++ backend/read.php | 14 ++++++++ backend/read_new.php | 37 ++++++++++++++++++++ backend/read_old.php | 14 ++++++++ backend/test.php | 10 ++++++ src/app/pages/main/main.page.html | 8 ++--- 10 files changed, 215 insertions(+), 4 deletions(-) create mode 100644 backend/config.php create mode 100644 backend/delete.php create mode 100644 backend/insert.php create mode 100644 backend/insert_new.php create mode 100644 backend/insert_old.php create mode 100644 backend/read.php create mode 100644 backend/read_new.php create mode 100644 backend/read_old.php create mode 100644 backend/test.php diff --git a/backend/config.php b/backend/config.php new file mode 100644 index 0000000..5a46203 --- /dev/null +++ b/backend/config.php @@ -0,0 +1,15 @@ + diff --git a/backend/delete.php b/backend/delete.php new file mode 100644 index 0000000..e0c62f0 --- /dev/null +++ b/backend/delete.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/backend/insert.php b/backend/insert.php new file mode 100644 index 0000000..d8bcbab --- /dev/null +++ b/backend/insert.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/backend/insert_new.php b/backend/insert_new.php new file mode 100644 index 0000000..d8bcbab --- /dev/null +++ b/backend/insert_new.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/backend/insert_old.php b/backend/insert_old.php new file mode 100644 index 0000000..98d20a6 --- /dev/null +++ b/backend/insert_old.php @@ -0,0 +1,58 @@ + \ No newline at end of file diff --git a/backend/read.php b/backend/read.php new file mode 100644 index 0000000..19af131 --- /dev/null +++ b/backend/read.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/backend/read_new.php b/backend/read_new.php new file mode 100644 index 0000000..eb2a2be --- /dev/null +++ b/backend/read_new.php @@ -0,0 +1,37 @@ +flag = $country->flags->png; + $obj->name = $country->name->common; + $obj->capital = $country->capital[0]; + $obj->continent = $country->continents[0]; + $obj->area = $country->area; + $obj->population = $country->population; + $obj->drivingSide = $country->car->side; + array_push($output, $obj); + } + + echo json_encode($output); + // echo json_encode($limit); + +?> \ No newline at end of file diff --git a/backend/read_old.php b/backend/read_old.php new file mode 100644 index 0000000..19af131 --- /dev/null +++ b/backend/read_old.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/backend/test.php b/backend/test.php new file mode 100644 index 0000000..d8ee197 --- /dev/null +++ b/backend/test.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/src/app/pages/main/main.page.html b/src/app/pages/main/main.page.html index 80afa87..8ed4c12 100755 --- a/src/app/pages/main/main.page.html +++ b/src/app/pages/main/main.page.html @@ -13,25 +13,25 @@

Country Stats

- +

Save Stats from any Country

- +

They'll probably never be useful

- +

But that's not why you learn them, right?

- +