CLP added & Hotfixes

This commit is contained in:
Luke 2023-06-19 09:43:47 +02:00 committed by GitHub
parent 1429263af5
commit 4ed85ce53d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 507 additions and 487 deletions

116
index.php
View file

@ -71,108 +71,114 @@ $acceptLang = ['de','es','it','zh'];
$lang = in_array($lang, $acceptLang) ? $lang : 'en';
require_once "lang/{$lang}.php";
$xmr_in = strtoupper(htmlspecialchars($_GET["in"]));
if(isset($_GET["in"])) {
$xmr_in = strtoupper(htmlspecialchars($_GET["in"]));
if($xmr_in == 'USD'){
if($xmr_in == 'USD'){
$xmr_in_fiat = number_format($USD, 2);
}elseif($xmr_in == 'GBP'){
}elseif($xmr_in == 'GBP'){
$xmr_in_fiat = number_format($GBP, 2);
}elseif($xmr_in == 'CHF'){
}elseif($xmr_in == 'CHF'){
$xmr_in_fiat = number_format($CHF, 2);
}elseif($xmr_in == 'RUB'){
}elseif($xmr_in == 'RUB'){
$xmr_in_fiat = number_format($RUB, 2);
}elseif($xmr_in == 'CNY'){
}elseif($xmr_in == 'CNY'){
$xmr_in_fiat = number_format($CNY, 2);
}elseif($xmr_in == 'JPY'){
}elseif($xmr_in == 'JPY'){
$xmr_in_fiat = number_format($JPY, 2);
}elseif($xmr_in == 'AUD'){
}elseif($xmr_in == 'AUD'){
$xmr_in_fiat = number_format($AUD, 2);
}elseif($xmr_in == 'BMD'){
}elseif($xmr_in == 'BMD'){
$xmr_in_fiat = number_format($BMD, 2);
}elseif($xmr_in == 'CAD'){
}elseif($xmr_in == 'CAD'){
$xmr_in_fiat = number_format($CAD, 2);
}elseif($xmr_in == 'HKD'){
}elseif($xmr_in == 'HKD'){
$xmr_in_fiat = number_format($HKD, 2);
}elseif($xmr_in == 'NZD'){
}elseif($xmr_in == 'NZD'){
$xmr_in_fiat = number_format($NZD, 2);
}elseif($xmr_in == 'SGD'){
}elseif($xmr_in == 'SGD'){
$xmr_in_fiat = number_format($SGD, 2);
}elseif($xmr_in == 'TWD'){
}elseif($xmr_in == 'TWD'){
$xmr_in_fiat = number_format($TWD, 2);
}elseif($xmr_in == 'CZK'){
}elseif($xmr_in == 'CZK'){
$xmr_in_fiat = number_format($CZK, 2);
}elseif($xmr_in == 'DKK'){
}elseif($xmr_in == 'CLP'){
$xmr_in_fiat = number_format($CLP, 2);
}elseif($xmr_in == 'DKK'){
$xmr_in_fiat = number_format($DKK, 2);
}elseif($xmr_in == 'NOK'){
}elseif($xmr_in == 'NOK'){
$xmr_in_fiat = number_format($NOK, 2);
}elseif($xmr_in == 'PLN'){
}elseif($xmr_in == 'PLN'){
$xmr_in_fiat = number_format($PLN, 2);
}elseif($xmr_in == 'SEK'){
}elseif($xmr_in == 'SEK'){
$xmr_in_fiat = number_format($SEK, 2);
}elseif($xmr_in == 'TRY'){
}elseif($xmr_in == 'TRY'){
$xmr_in_fiat = number_format($TRY, 2);
}elseif($xmr_in == 'UAH'){
}elseif($xmr_in == 'UAH'){
$xmr_in_fiat = number_format($UAH, 2);
}elseif($xmr_in == 'ARS'){
}elseif($xmr_in == 'ARS'){
$xmr_in_fiat = number_format($ARS, 2);
}elseif($xmr_in == 'PHP'){
}elseif($xmr_in == 'PHP'){
$xmr_in_fiat = number_format($PHP, 2);
}elseif($xmr_in == 'AED'){
}elseif($xmr_in == 'AED'){
$xmr_in_fiat = number_format($AED, 2);
}elseif($xmr_in == 'BRL'){
}elseif($xmr_in == 'BRL'){
$xmr_in_fiat = number_format($BRL, 2);
}elseif($xmr_in == 'KRW'){
}elseif($xmr_in == 'KRW'){
$xmr_in_fiat = number_format($KRW, 2);
}elseif($xmr_in == 'MYR'){
}elseif($xmr_in == 'MYR'){
$xmr_in_fiat = number_format($MYR, 2);
}elseif($xmr_in == 'SAR'){
}elseif($xmr_in == 'SAR'){
$xmr_in_fiat = number_format($SAR, 2);
}elseif($xmr_in == 'VEF'){
}elseif($xmr_in == 'VEF'){
$xmr_in_fiat = number_format($VEF, 2);
}elseif($xmr_in == 'VND'){
}elseif($xmr_in == 'VND'){
$xmr_in_fiat = number_format($VND, 2);
}elseif($xmr_in == 'ZAR'){
}elseif($xmr_in == 'ZAR'){
$xmr_in_fiat = number_format($ZAR, 2);
}elseif($xmr_in == 'BDT'){
}elseif($xmr_in == 'BDT'){
$xmr_in_fiat = number_format($BDT, 2);
}elseif($xmr_in == 'HUF'){
}elseif($xmr_in == 'HUF'){
$xmr_in_fiat = number_format($HUF, 2);
}elseif($xmr_in == 'ILS'){
}elseif($xmr_in == 'ILS'){
$xmr_in_fiat = number_format($ILS, 2);
}elseif($xmr_in == 'MMK'){
}elseif($xmr_in == 'MMK'){
$xmr_in_fiat = number_format($MMK, 2);
}elseif($xmr_in == 'NGN'){
}elseif($xmr_in == 'NGN'){
$xmr_in_fiat = number_format($NGN, 2);
}elseif($xmr_in == 'THB'){
}elseif($xmr_in == 'THB'){
$xmr_in_fiat = number_format($THB, 2);
}elseif($xmr_in == 'BHD'){
}elseif($xmr_in == 'BHD'){
$xmr_in_fiat = number_format($BHD, 2);
}elseif($xmr_in == 'KWD'){
}elseif($xmr_in == 'KWD'){
$xmr_in_fiat = number_format($KWD, 2);
}elseif($xmr_in == 'PKR'){
}elseif($xmr_in == 'PKR'){
$xmr_in_fiat = number_format($PKR, 2);
}elseif($xmr_in == 'LKR'){
}elseif($xmr_in == 'LKR'){
$xmr_in_fiat = number_format($LKR, 2);
}elseif($xmr_in == 'INR'){
}elseif($xmr_in == 'INR'){
$xmr_in_fiat = number_format($INR, 2);
}elseif($xmr_in == 'IDR'){
}elseif($xmr_in == 'IDR'){
$xmr_in_fiat = number_format($IDR, 2);
}elseif($xmr_in == 'BTC'){
}elseif($xmr_in == 'BTC'){
$xmr_in_fiat = number_format($BTC, 8);
}elseif($xmr_in == 'LTC'){
}elseif($xmr_in == 'LTC'){
$xmr_in_fiat = number_format($LTC, 8);
}elseif($xmr_in == 'ETH'){
}elseif($xmr_in == 'ETH'){
$xmr_in_fiat = number_format($ETH, 8);
}elseif($xmr_in == 'XAG'){
}elseif($xmr_in == 'XAG'){
$xmr_in_fiat = number_format($XAG, 6);
}elseif($xmr_in == 'XAU'){
}elseif($xmr_in == 'XAU'){
$xmr_in_fiat = number_format($XAU, 6);
}else{
$xmr_in_fiat = number_format($EUR, 2);
}
}else{
$xmr_in_fiat = number_format($EUR, 2);
}
$xmr_in_fiat = strtr($xmr_in_fiat, ",", " ");
?>
<!DOCTYPE html>
<html lang="<?php echo $lang_meta; ?>">
@ -278,6 +284,7 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " ");
| <button type="button" class="btn btn-light" title="<a class='text-decoration-none fiat-tooltip' href='/?in=TRY'><b><?php echo $l_try; ?></b></a>" data-toggle="tooltip" data-bs-html="true" data-placement="top">TRY</button>
| <button type="button" class="btn btn-light" title="<a class='text-decoration-none fiat-tooltip' href='/?in=UAH'><b><?php echo $l_uah; ?></b></a>" data-toggle="tooltip" data-bs-html="true" data-placement="top">UAH</button>
| <button type="button" class="btn btn-light" title="<a class='text-decoration-none fiat-tooltip' href='/?in=ARS'><b><?php echo $l_ars; ?></b></a>" data-toggle="tooltip" data-bs-html="true" data-placement="top">ARS</button>
| <button type="button" class="btn btn-light" title="<a class='text-decoration-none fiat-tooltip' href='/?in=CLP'><b><?php echo $l_clp; ?></b></a>" data-toggle="tooltip" data-bs-html="true" data-placement="top">CLP</button>
| <button type="button" class="btn btn-light" title="<a class='text-decoration-none fiat-tooltip' href='/?in=PHP'><b><?php echo $l_php; ?></b></a>" data-toggle="tooltip" data-bs-html="true" data-placement="top">PHP</button><br/>
<button type="button" class="btn btn-light" title="<a class='text-decoration-none fiat-tooltip' href='/?in=AED'><b><?php echo $l_aed; ?></b></a>" data-toggle="tooltip" data-bs-html="true" data-placement="top">AED</button>
| <button type="button" class="btn btn-light" title="<a class='text-decoration-none fiat-tooltip' href='/?in=BRL'><b><?php echo $l_brl; ?></b></a>" data-toggle="tooltip" data-bs-html="true" data-placement="top">BRL</button>
@ -320,7 +327,7 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " ");
<input class="form-control" id="fiatInput" type="text" spellcheck="false" autocorrect="off" inputmode="numeric" value="<?php echo $xmr_in_fiat; ?>" onchange="fiatConvert(this.value)" onkeyup="this.value = this.value.replace(/[^\.^,\d]/g, ''); this.value = this.value.replace(/\,/, '.'); if(this.value.split('.').length > 2){this.value = this.value.slice(0, -1);} fiatConvert(this.value)">
<select class="input-group-text cursor-pointer" id="selectBox" onchange="xmrConvert(this.value)">
<?php
if($xmr_in != ""){
if(isset($xmr_in)){
echo '<option value="'.$xmr_in.'">'.$xmr_in.'</option>';
}
?>
@ -346,6 +353,7 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " ");
<option value="TRY">TRY</option>
<option value="UAH">UAH</option>
<option value="ARS">ARS</option>
<option value="CLP">CLP</option>
<option value="PHP">PHP</option>
<option value="AED">AED</option>
<option value="BRL">BRL</option>
@ -538,6 +546,9 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " ");
} else if (selectBox == "CZK") {
var value = fiatAmount / <?php echo $CZK; ?>;
xmrValue.value = value.toFixed(12);
} else if (selectBox == "CLP") {
var value = fiatAmount / <?php echo $CLP; ?>;
xmrValue.value = value.toFixed(12);
} else if (selectBox == "DKK") {
var value = fiatAmount / <?php echo $DKK; ?>;
xmrValue.value = value.toFixed(12);
@ -690,9 +701,12 @@ $xmr_in_fiat = strtr($xmr_in_fiat, ",", " ");
} else if (selectBox == "BMD") {
var value = xmrAmount * <?php echo $BMD; ?>;
fiatValue.value = value.toFixed(2);
}else if (selectBox == "CZK") {
} else if (selectBox == "CZK") {
var value = xmrAmount * <?php echo $CZK; ?>;
fiatValue.value = value.toFixed(2);
} else if (selectBox == "CLP") {
var value = xmrAmount * <?php echo $CLP; ?>;
fiatValue.value = value.toFixed(2);
} else if (selectBox == "DKK") {
var value = xmrAmount * <?php echo $DKK; ?>;
fiatValue.value = value.toFixed(2);

View file

@ -60,6 +60,7 @@ $l_bhd = "Bahrain-Dinar";
$l_bmd = "Bermuda-Dollar";
$l_czk = "Tschechische Krone";
$l_dkk = "Dänische Krone";
$l_clp = "Chilenischer Peso";
// Weitere Monero Links
$getmonero = '<a class="text-white" href="https://www.getmonero.org/de/" hreflang="de" target="_blank" rel="external">Offizielle Webseite</a> | <a class="text-white" href="https://ccs.getmonero.org/" hreflang="en" target="_blank" rel="external">Community Crowdfunding System (CCS)</a> | <a class="text-white" href="https://moneroecosystem.org/" hreflang="en" target="_blank" rel="external">Monero Ecosystem</a> | <a class="text-white" href="https://www.monero.observer/resources/" hreflang="en" target="_blank" rel="external">Monero Observer</a> | <a class="text-white" href="https://www.monerotalk.live/" hreflang="en" target="_blank" rel="external">Monero Talk</a> | <a class="text-white" href="https://t.me/moneroger" hreflang="en" target="_blank" rel="external">Telegram - Monero Germany</a>';

View file

@ -44,7 +44,7 @@ $l_sar = "Saudi Riyal";
$l_sek = "Shwedish Krona";
$l_pkr = "Pakistani Rupee";
$l_nzd = "New Zealand Dollar";
$l_php = "Philippine peso";
$l_php = "Philippine Peso";
$l_nok = "Norwegian Krone";
$l_lkr = "Sri Lankan Rupee";
$l_mmk = "Myanmar Kyat";
@ -60,6 +60,7 @@ $l_bhd = "Bahraini Dinar";
$l_bmd = "Bermudan Dollar";
$l_czk = "Czech Koruna";
$l_dkk = "Danish Krone";
$l_clp = "Chilean Peso";
// Weitere Monero Links
$getmonero = '<a class="text-white" href="https://www.getmonero.org/" hreflang="en" target="_blank" rel="external">Official website</a> | <a class="text-white" href="https://ccs.getmonero.org/" hreflang="en" target="_blank" rel="external">Community Crowdfunding System (CCS)</a> | <a class="text-white" href="https://moneroecosystem.org/" hreflang="en" target="_blank" rel="external">Monero Ecosystem</a> | <a class="text-white" href="https://www.monero.observer/resources/" hreflang="en" target="_blank" rel="external">Monero Observer</a> | <a class="text-white" href="https://www.monerotalk.live/" hreflang="en" target="_blank" rel="external">Monero Talk</a> | <a class="text-white" href="https://t.me/monero" hreflang="en" target="_blank" rel="external">Telegram - Monero XMR</a>';

View file

@ -60,6 +60,7 @@ $l_bhd = "Dinar de Bahréin";
$l_bmd = "Dólar de Bermudas";
$l_czk = "Corona checa";
$l_dkk = "Corona danesa";
$l_clp = "Peso chileno";
// Weitere Monero Links
$getmonero = '<a class="text-white" href="https://www.getmonero.org/es/" hreflang="es" target="_blank" rel="external">Página oficial</a> | <a class="text-white" href="https://ccs.getmonero.org/" hreflang="en" target="_blank" rel="external">Community Crowdfunding System (CCS)</a> | <a class="text-white" href="https://moneroecosystem.org/" hreflang="en" target="_blank" rel="external">Monero Ecosystem</a> | <a class="text-white" href="https://www.monero.observer/resources/" hreflang="en" target="_blank" rel="external">Monero Observer</a> | <a class="text-white" href="https://anchor.fm/elmonero" hreflang="en" target="_blank" rel="external">El Monero Podcast</a> | <a class="text-white" href="https://t.me/MoneroEsp" hreflang="en" target="_blank" rel="external">Telegram - Monero en español</a>';

View file

@ -60,6 +60,7 @@ $l_bhd = "Dinar Bahraini";
$l_bmd = "Dollaro delle Bermuda";
$l_czk = "Corona Ceca";
$l_dkk = "Corona Danese";
$l_clp = "Peso cileno";
// Link di Monero
$getmonero = '<a class="text-white" href="https://www.getmonero.org/it/" hreflang="it" target="_blank" rel="external">Sito ufficiale</a> | <a class="text-white" href="https://ccs.getmonero.org/" hreflang="en" target="_blank" rel="external">Community Crowdfunding System (CCS)</a> | <a class="text-white" href="https://moneroecosystem.org/" hreflang="en" target="_blank" rel="external">Ecosistema Monero</a> | <a class="text-white" href="https://www.monero.observer/resources/" hreflang="en" target="_blank" rel="external">Monero Observer</a> | <a class="text-white" href="https://www.monerotalk.live/" hreflang="en" target="_blank" rel="external">Monero Talk</a> | <a class="text-white" href="https://t.me/moneroitalia" hreflang="en" target="_blank" rel="external">Telegram - Monero Italia</a>';

View file

@ -60,6 +60,7 @@ $l_bhd = "巴林第纳尔";
$l_bmd = "百慕大元";
$l_czk = "捷克克朗";
$l_dkk = "丹麦克朗";
$l_clp = "智利比索";
// Weitere Monero Links
$getmonero = '<a class="text-white" href="https://www.getmonero.org/zh-cn/" hreflang="zh-cn" target="_blank" rel="external">官方网站</a> | <a class="text-white" href="https://ccs.getmonero.org/" hreflang="en" target="_blank" rel="external">社区众筹系统 (CCS)</a> | <a class="text-white" href="https://moneroecosystem.org/" hreflang="en" target="_blank" rel="external">门罗币生态圈</a> | <a class="text-white" href="https://www.monero.observer/resources/" hreflang="en" target="_blank" rel="external">门罗浏览器</a> | <a class="text-white" href="https://www.monerotalk.live/" hreflang="en" target="_blank" rel="external">Monero Talk播客</a>';

View file

@ -60,6 +60,7 @@ $l_bhd = "巴林第纳尔";
$l_bmd = "百慕大元";
$l_czk = "捷克克朗";
$l_dkk = "丹麦克朗";
$l_clp = "智利比索";
// Weitere Monero Links
$getmonero = '<a class="text-white" href="https://www.getmonero.org/zh-cn/" hreflang="zh-cn" target="_blank" rel="external">官方网站</a> | <a class="text-white" href="https://ccs.getmonero.org/" hreflang="en" target="_blank" rel="external">社区众筹系统 (CCS)</a> | <a class="text-white" href="https://moneroecosystem.org/" hreflang="en" target="_blank" rel="external">门罗币生态圈</a> | <a class="text-white" href="https://www.monero.observer/resources/" hreflang="en" target="_blank" rel="external">门罗浏览器</a> | <a class="text-white" href="https://www.monerotalk.live/" hreflang="en" target="_blank" rel="external">Monero Talk播客</a>';