Server IP : 213.176.29.180  /  Your IP : 3.16.47.126
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/www/wp-content/../.tmb/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/webtaragh/www/wp-content/../.tmb/../feeds.tar
domainchecker.php000064400000001452147357112110010055 0ustar00<?php

use WHMCS\Billing\Currency;

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

/*
*** USAGE SAMPLE ***

<script language="javascript" src="feeds/domainchecker.php"></script>

*/

$systemurl = App::getSystemUrl();

$currency = Currency::factoryForClientArea();
$tlds = getTLDList();

$code = '<form action="%sdomainchecker.php" method="post"><input type="hidden" name="direct" value="true">' . \Lang::trans('orderForm.www') . ' <input type="text" name="domain" size="30"> <select name="ext">';
$code = sprintf($code, htmlspecialchars($systemurl, ENT_QUOTES, 'UTF-8'));
foreach ($tlds AS $tld) {
    $code .= '<option>'. htmlspecialchars($tld, ENT_QUOTES, 'UTF-8') . '</option>';
}
$code .= '</select> <input type="submit" value="Go"></form>';

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

?>
cartnumitems.php000064400000000675147357112110010002 0ustar00<?php

use WHMCS\OrderForm;

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

/*
*** USAGE SAMPLES ***

<script language="javascript" src="feeds/cartnumitems.php"></script>

*/
$cartitems = (new OrderForm())->getNumItemsInCart();

$items = ($cartitems == 1) ? 'item' : 'items';

widgetoutput('' . \Lang::trans('feeds.itemsInBasket', [':count' => $cartitems]) . '');

function widgetoutput($value) {
    echo "document.write('".addslashes($value)."');";
    exit;
}

?>
productsinfo.php000064400000007212147357112110010000 0ustar00<?php

use WHMCS\Application;
use WHMCS\Billing\Currency;
use WHMCS\Config\Setting;
use WHMCS\Exception\ProgramExit;
use WHMCS\Product\Product;
use WHMCS\Session;
use WHMCS\User\Client;
use WHMCS\Database\Capsule;

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

/*
*** USAGE SAMPLES ***

<script language="javascript" src="feeds/productsinfo.php?pid=1&get=name"></script>

<script language="javascript" src="feeds/productsinfo.php?pid=1&get=description"></script>

<script language="javascript" src="feeds/productsinfo.php?pid=1&get=price&billingcycle=monthly&currency=1"></script>

<script language="javascript" src="feeds/productsinfo.php?pid=1&get=orderurl&carttpl=web20cart"></script>

*/

$whmcs = App::self();
$pid = (int) $whmcs->get_req_var('pid');
$get = $whmcs->get_req_var('get');
$language = $whmcs->get_req_var('language') ?: null;
$data = array();
$name = $description = '';

// Verify user input for pid exists, is greater than 0, and as is a valid id
if ($pid > 0) {
    $data = Capsule::table('tblproducts')
        ->where('id', '=', $pid)
        ->first();
    $pid = null;
    if (is_object($data)) {
        $pid = (int) $data->id;
        // If there is a user logged in, we will use the client language
        $userId = (int) Session::get('userid');
        if (!empty($userId)) {
            $language = Client::find($userId, array('language'))->language ?: null;
        }
        unset($userId);
        $name = Product::getProductName($pid, $data->name, $language);
        $description = Product::getProductDescription($pid, $data->description, $language);
    }
}

if (empty($pid)) {
    widgetOutput('Product ID Not Found');
}

if ($get=="name") {
    widgetOutput($name);
} elseif ($get=="description") {
    $description = str_replace(array("\r", "\n", "\r\n"), "", nl2br($description));
    widgetOutput($description);
} elseif ($get=="configoption") {
    $configOptionNum = $whmcs->get_req_var('configoptionnum');
    if (!$configOptionNum) {
        widgetOutput('The variable configoptionnum is required when get is configoption.');
    }
    widgetoutput($data['configoption' . (int) $configOptionNum]);
} elseif ($get=="orderurl") {
    $cartTemplate = $whmcs->get_req_var('carttpl');
    if ($cartTemplate == "ajax") {
        $cartTemplate = "ajaxcart";
    }
    $systemUrl = App::getSystemUrl();
    if (!$cartTemplate) {
        $cartTemplate = Setting::getValue('OrderFormTemplate ');
    }
    widgetOutput("{$systemUrl}cart.php?a=add&pid={$pid}&carttpl={$cartTemplate}");
} elseif ($get=="price") {
    // Verify user input for currency exists, is numeric, and as is a valid id
    $billingCycle = $whmcs->get_req_var('billingcycle');
    $currencyID = $whmcs->get_req_var('currency');
    if (!is_numeric($currencyID)) {
        $currency = array();
    } else {
        $currency = getCurrency(null, $currencyID);
    }

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

    $data = Capsule::table('tblpricing')
        ->where('type', '=', 'product')
        ->where('currency', '=', $currencyID)
        ->where('relid', '=', $pid)
        ->first();
    $price = $data->$billingCycle;
    $price = formatCurrency($price);
    widgetOutput($price);
} else {
    widgetOutput('Invalid get option. Valid options are "name", "description", "configoption", "orderurl" or "price"');
}

/**
 * The function to output the widget data to the browser in a javascript format.
 *
 * @throws WHMCS\Exception\ProgramExit
 * @param string $value the data to output
 */
function widgetOutput($value) {
    echo "document.write('".addslashes($value)."');";
    throw new ProgramExit();
}
index.php000064400000000047147357112110006367 0ustar00<?php
header("Location: ../index.php");carttotal.php000064400000001220147357112110007247 0ustar00<?php

require("../init.php");
require("../includes/clientfunctions.php");
require("../includes/orderfunctions.php");
require("../includes/invoicefunctions.php");
require("../includes/configoptionsfunctions.php");
require("../includes/cartfunctions.php");
require("../includes/domainfunctions.php");

/*
*** USAGE SAMPLES ***

<script language="javascript" src="feeds/carttotal.php"></script>

*/

$carttotals = calcCartTotals(Auth::client(), false, true);

$total = ($carttotals['total']) ? $carttotals['total'] : formatCurrency(0);

widgetoutput($total);

function widgetoutput($value) {
    echo "document.write('".addslashes($value)."');";
    exit;
}
domainpricing.php000064400000003446147357112110010111 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."');";

productpricing.php000064400000010763147357112110010322 0ustar00<?php

use WHMCS\Application;
use WHMCS\Billing\Currency;
use WHMCS\Database\Capsule;

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

/*
*** USAGE SAMPLES ***

<script language="javascript" src="feeds/productpricing.php?pid=1&currency=1"></script>

<script language="javascript" src="feeds/productpricing.php?pid=5&currency=2"></script>

*/
    $whmcs = Application::getInstance();
    $pid = $whmcs->get_req_var('pid');
    $currencyid = $whmcs->get_req_var('currencyid');
    $paytype = '';

    // Verify user input for pid exists, is numeric, and as is a valid id
    $data = null;
    if (!empty($pid) && ctype_digit($pid)) {
        $data = Capsule::table('tblproducts')
            ->where('id', '=', $pid)
            ->first();
    }
    if (!is_object($data)) {
        widgetoutput('Product ID Not Found');
    }
    $pid = $data->id;
    $paytype = $data->paytype;
    unset($data);

    $currencyid = $whmcs->get_req_var('currency');
    // Support for older currencyid variable
    if (!$currencyid) {
        $currencyid = $whmcs->get_req_var('currencyid');
    }
    if (!is_numeric($currencyid)) {
        $currency = array();
    } else {
        $currency = getCurrency(null, $currencyid);
    }

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

    $data = Capsule::table('tblpricing')
        ->where('type', '=', 'product')
        ->where('currency', '=', $currencyid)
        ->where('relid', '=', $pid)
        ->first();

    $msetupfee = $data->msetupfee;
    $qsetupfee = $data->qsetupfee;
    $ssetupfee = $data->ssetupfee;
    $asetupfee = $data->asetupfee;
    $bsetupfee = $data->bsetupfee;
    $tsetupfee = $data->tsetupfee;
    $monthly = $data->monthly;
    $quarterly = $data->quarterly;
    $semiannually = $data->semiannually;
    $annually = $data->annually;
    $biennially = $data->biennially;
    $triennially = $data->triennially;

    $systemurl = App::getSystemUrl();

    $output = '<form method="post" action="' . $systemurl . 'cart.php?a=add&pid=' . $pid . '">';

    if ($paytype=="free") {

        $output .= $_LANG['orderfree'];

    } elseif ($paytype=="onetime") {

        $output .= formatCurrency($monthly);
        if ($msetupfee!="0.00") $output .= " + ".formatCurrency($msetupfee)." ".$_LANG['ordersetupfee'];

    } elseif ($paytype=="recurring") {

        $output .= '<select name="billingcycle">';

        if ($triennially>=0) {
            $output .= '<option value="triennially">'.$_LANG['orderpaymentterm36month'].' - '.formatCurrency($triennially/36).'/mo';
            if($tsetupfee!="0.00") $output .= " + ".formatCurrency($tsetupfee)." ".$_LANG['ordersetupfee'];
            $output .= '</option>';
        }

        if ($biennially>=0) {
            $output .= '<option value="biennially">'.$_LANG['orderpaymentterm24month'].' - '.formatCurrency($biennially/24).'/mo';
            if($bsetupfee!="0.00") $output .= " + ".formatCurrency($bsetupfee)." ".$_LANG['ordersetupfee'];
            $output .= '</option>';
        }

        if ($annually>=0) {
            $output .= '<option value="annually">'.$_LANG['orderpaymentterm12month'].' - '.formatCurrency($annually/12).'/mo';
            if($asetupfee!="0.00") $output .= " + ".formatCurrency($asetupfee)." ".$_LANG['ordersetupfee'];
            $output .= '</option>';
        }

        if ($semiannually>=0) {
            $output .= '<option value="semiannually">'.$_LANG['orderpaymentterm6month'].' - '.formatCurrency($semiannually/6).'/mo';
            if($ssetupfee!="0.00") $output .= " + ".formatCurrency($ssetupfee)." ".$_LANG['ordersetupfee'];
            $output .= '</option>';
        }

        if ($quarterly>=0) {
            $output .= '<option value="quarterly">'.$_LANG['orderpaymentterm3month'].' - '.formatCurrency($quarterly/3).'/mo';
            if($qsetupfee!="0.00") $output .= " + ".formatCurrency($qsetupfee)." ".$_LANG['ordersetupfee'];
            $output .= '</option>';
        }

        if ($monthly>=0) {
            $output .= '<option value="monthly">'.$_LANG['orderpaymenttermmonthly'].' - '.formatCurrency($monthly).'/mo';
            if($msetupfee!="0.00") $output .= " + ".formatCurrency($msetupfee)." ".$_LANG['ordersetupfee'];
            $output .= '</option>';
        }

        $output .= '</select>';

    }

    $output .= ' <input type="submit" value="'.$_LANG['domainordernow'].'" /></form>';

    widgetoutput($output);

function widgetoutput($value) {
    echo "document.write('".addslashes($value)."');";
    exit;
}
domainprice.php000064400000003351147357112110007553 0ustar00<?php

use WHMCS\Application;
use WHMCS\Billing\Currency;
use WHMCS\Database\Capsule;

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

/*
*** USAGE SAMPLES ***

<script language="javascript" src="feeds/domainprice.php?tld=.com&type=register&regperiod=1"></script>

<script language="javascript" src="feeds/domainprice.php?tld=.com&type=register&regperiod=1&currency=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;
}

$did = Capsule::table('tbldomainpricing')
    ->where('extension', '=', $tld)
    ->value('id');

if (!empty($currency)) {
    $currency = getCurrency(null, $currency);
} else {
    $currency = Currency::factoryForClientArea();
}

$validDomainActionRequests = array('register','transfer','renew');

if (!in_array($type, $validDomainActionRequests)) {
    $type = 'register';
}

$data = Capsule::table('tblpricing')
    ->where('type', '=', 'domain' . $type)
    ->where('currency', '=', $currency['id'])
    ->where('relid', '=', $did)
    ->where('tsetupfee', '=', '0.00')
    ->first();

$pricingColumns = array(
    'msetupfee',
    'qsetupfee',
    'ssetupfee',
    'asetupfee',
    'bsetupfee',
    'monthly',
    'quarterly',
    'semiannually',
    'annually',
    'biennially',
);

$regperiod = $regperiod - 1;
$price = null;
if (
    isset($pricingColumns[$regperiod])
    && is_object($data)
    && property_exists($data, $pricingColumns[$regperiod])
) {
    $price = $data->{$pricingColumns[$regperiod]};
}

if ($format) {
    $price = formatCurrency($price);
}

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