Server IP : 213.176.29.180  /  Your IP : 18.116.89.2
Web Server : Apache
System : Linux 213.176.29.180.hostiran.name 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
User : webtaragh ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home/webtaragh/public_html/whmcs/admin/../../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/webtaragh/public_html/whmcs/admin/../../domainpricing.php.tar
home/webtaragh/public_html/whmcs/feeds/domainpricing.php000064400000003446147362632740017532 0ustar00<?php

use WHMCS\Billing\Currency;

require("../init.php");
require("../includes/domainfunctions.php");

/*
*** USAGE SAMPLES ***

<style type="text/css">
table.domainpricing {
    width: 600px;
    background-color: #ccc;
}
table.domainpricing th {
    padding: 3px;
    background-color: #efefef;
    font-weight: bold;
}
table.domainpricing td {
    padding: 3px;
    background-color: #fff;
    text-align: center;
}
</style>
<script language="javascript" src="feeds/domainpricing.php?currency=1"></script>

*/

$code = '<table cellspacing="1" cellpadding="0" class="domainpricing"><tr><th>' . \Lang::trans('domaintld') . '</th><th>' . \Lang::trans('domainminyears') . '</th><th>' . \Lang::trans('domainsregister') . '</th><th>' . \Lang::trans('domainstransfer') . '</th><th>' . \Lang::trans('domainsrenew') . '</th></tr>';

if (!isset($currency) || !is_numeric($currency)) {
    $currency = array();
} else {
    $currency = getCurrency(null, $currency);
}

if (!$currency || !is_array($currency) || !isset($currency['id'])) {
    $currency = Currency::factoryForClientArea();
}

$freeamt = formatCurrency(0);
$tldslist = getTLDList();
foreach ($tldslist AS $tld) {
    $tldpricing = getTLDPriceList($tld, true);
    $firstoption = current($tldpricing);
    $year = key($tldpricing);
    $transfer = ($firstoption["transfer"] == $freeamt) ? $_LANG['orderfree'] : $firstoption["transfer"];
    $code .= sprintf(
        '<tr><td>%s</td><td>%d</td><td>%s</td><td>%s</td><td>%s</td></tr>',
        htmlspecialchars($tld, ENT_QUOTES, 'UTF-8'),
        $year,
        htmlspecialchars($firstoption["register"], ENT_QUOTES, 'UTF-8'),
        htmlspecialchars($transfer, ENT_QUOTES, 'UTF-8'),
        htmlspecialchars($firstoption["renew"], ENT_QUOTES, 'UTF-8')
    );
}

$code .= '</table>';

echo "document.write('".$code."');";