| Server IP : 23.111.136.34 / Your IP : 216.73.216.136 Web Server : Apache System : Linux servidor.eurohost.com.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : meusitei ( 1072) PHP Version : 5.6.40 Disable Function : show_source, system, shell_exec, passthru, proc_open MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/meusitei/public_html/central/feeds/ |
Upload File : |
<?php
use WHMCS\Application;
require("../init.php");
/*
*** USAGE SAMPLES ***
<script language="javascript" src="feeds/domainprice.php?tld=.com&type=register®period=1"></script>
<script language="javascript" src="feeds/domainprice.php?tld=.com&type=register®period=1¤cy=1&format=1"></script>
*/
$whmcs = Application::getInstance();
$tld = $whmcs->get_req_var('tld');
$type = $whmcs->get_req_var('type');
$regperiod = $whmcs->get_req_var('regperiod');
$format = ($whmcs->get_req_var('format')) ? true : false;
if (!is_numeric($regperiod) || $regperiod < 1) {
$regperiod = 1;
}
$result = select_query("tbldomainpricing","id",array("extension"=>$tld));
$data = mysql_fetch_array($result);
$did = $data['id'];
$currency = ($currency) ? getCurrency('',$currency) : getCurrency();
$validDomainActionRequests = array('register','transfer','renew');
if (!in_array($type, $validDomainActionRequests)) {
$type = 'register';
}
$result = select_query("tblpricing","msetupfee,qsetupfee,ssetupfee,asetupfee,bsetupfee,tsetupfee,monthly,quarterly,semiannually,annually,biennially,triennially",array("type"=>"domain".$type,"currency"=>$currency['id'],"relid"=>$did));
$data = mysql_fetch_array($result);
if ($regperiod < 6) {
$regperiod = $regperiod - 1;
}
$price = $data[$regperiod];
if ($format) {
$price = formatCurrency($price);
}
echo "document.write('".$price."');";