diff options
author | Minteck <contact@minteck.org> | 2022-07-11 18:54:47 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-07-11 18:54:47 +0200 |
commit | f70cf5893bb775625e79ed959721ede03e34a108 (patch) | |
tree | b43b6c392d580304fb47777d240f529e92ea17b0 /Application/AddTransaction | |
parent | 2629b95c437cce1d331d8f4ab3a0d1ff394930a7 (diff) | |
download | bits-server-f70cf5893bb775625e79ed959721ede03e34a108.tar.gz bits-server-f70cf5893bb775625e79ed959721ede03e34a108.tar.bz2 bits-server-f70cf5893bb775625e79ed959721ede03e34a108.zip |
Diffstat (limited to 'Application/AddTransaction')
-rw-r--r-- | Application/AddTransaction/index.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Application/AddTransaction/index.php b/Application/AddTransaction/index.php index ef2f339..2a56696 100644 --- a/Application/AddTransaction/index.php +++ b/Application/AddTransaction/index.php @@ -45,6 +45,7 @@ if (!isset($_GET['Currency']) || !isset($_GET['Amount']) || !is_numeric($_GET['A $transaction = []; $exchangeRate = (float)file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/Private/ExchangeRate.txt"); +$identities = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/Private/Data/Identities.json"), true); $eurToGbp = $exchangeRate; $gbpToEur = 1 / $eurToGbp; @@ -59,7 +60,9 @@ if ($_GET['Currency'] === "€") { 'original' => 'eur' ], 'date' => date("c"), - 'description' => base64url_decode($_GET['Description']) + 'description' => base64url_decode($_GET['Description']), + 'name' => $identities[$_PROFILE["id"]]["name"], + 'picture' => $identities[$_PROFILE["id"]]["picture"] ]; } else { $transaction = [ @@ -71,7 +74,9 @@ if ($_GET['Currency'] === "€") { 'original' => 'gbp' ], 'date' => date("c"), - 'description' => base64url_decode($_GET['Description']) + 'description' => base64url_decode($_GET['Description']), + 'name' => $identities[$_PROFILE["id"]]["name"], + 'picture' => $identities[$_PROFILE["id"]]["picture"] ]; } |