diff --git a/index.php b/index.php index f8db16f..744fec2 100644 --- a/index.php +++ b/index.php @@ -4,6 +4,8 @@ header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); +// Array of supported currencies +// TODO: Load dynamically from the API data $array = array("EUR", "USD", "GBP", @@ -57,14 +59,16 @@ $array = array("EUR", include('coingecko.php'); -// Holt die API Daten +// Fetches the API data from the JSON file +// TODO: This doesn't exist on first load, so it will display warnings $api_cg = json_decode(file_get_contents('coingecko.json')); -// Holt die Zeit der letzten Abfrage +// Fetches the time of the last API data update $time_cg = date("H:i:s", $api_cg->time); $time = $time_cg; -// Holt die einzelnen Werte für die Berechnung +// Fetches the individual currency values from the API data +// TODO: Make that dynamic $BTC = $api_cg->btc->lastValue; $EUR = $api_cg->eur->lastValue; $USD = $api_cg->usd->lastValue; @@ -116,7 +120,7 @@ $CZK = $api_cg->czk->lastValue; $DKK = $api_cg->dkk->lastValue; $MXN = $api_cg->mxn->lastValue; -// Lädt die Sprachdatei, nach der Sprache die im Browser eingestellt wurde +// Load the language file based on the browser language if(array_key_exists('HTTP_ACCEPT_LANGUAGE', $_SERVER)){ $lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2); }else{ @@ -254,6 +258,8 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " ");
@@ -457,6 +464,7 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " "); echo ''; } ?> + @@ -524,6 +532,7 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " "); + |