Hi I would like to have the domain price table for every year but I don't get to do it. I tried to modify the feeds php file but this is just how far I went. I don't see how to change the years and I would like to have it only for 1 tld at once.
http://docs.whmcs.com/Data_Feeds
<?php
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>TLD</th><th>For 1 year</th></tr>';
if (!is_numeric($currency)) {
$currency = array();
} else {
$currency = getCurrency('', $currency);
}
if (!$currency || !is_array($currency) || !isset($currency['id'])) {
$currency = getCurrency();
}
$whmcs = WHMCS_Application::getInstance();
$type = $whmcs->get_req_var('type');
$freeamt = formatCurrency(0);
$tldslist = getTLDList();
foreach ($tldslist AS $tld) {
$tldpricing = getTLDPriceList($tld, true);
$firstoption = current($tldpricing);
$year = key($tldpricing);
$code .= sprintf(
'<tr><td>%s</td><td>%s</td></tr>',
htmlspecialchars($tld, ENT_QUOTES, 'UTF-8'),
htmlspecialchars($firstoption["register"], ENT_QUOTES, 'UTF-8')
);
}
$code .= '</table>';
echo "document.write('".$code."');";
?>