diff options
Diffstat (limited to 'Application/AddTransaction/index.php')
-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"] ]; } |