Пример #1
0
    }
    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;
}
Пример #2
0
}
// Verify that the pid is not less than 1 to in order to continue.
if ($pid < 1) {
    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 = $whmcs->isSSLAvailable() ? $whmcs->getSystemSSLURL() : $whmcs->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)) {
Пример #3
0
<?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>
*/
$currency = getCurrency();
$carttotals = calcCartTotals('', true);
$total = $carttotals['total'] ? $carttotals['total'] : formatCurrency(0);
widgetoutput($total);
function widgetoutput($value)
{
    echo "document.write('" . addslashes($value) . "');";
    exit;
}
Пример #4
0
if ($get == "name") {
    widgetoutput($name);
}
if ($get == "description") {
    $description = str_replace(array("\r", "\n", "\r\n"), "", nl2br($description));
    widgetoutput($description);
}
if ($get == "configoption") {
    widgetoutput($data['configoption'] . $configoptionnum);
}
if ($get == "orderurl") {
    $systemurl = $CONFIG['SystemSSLURL'] ? $CONFIG['SystemSSLURL'] . '/' : $CONFIG['SystemURL'] . '/';
    if ($carttpl == "ajax") {
        widgetoutput($systemurl . "order/?pid={$pid}");
    } else {
        widgetoutput($systemurl . "cart.php?a=add&pid={$pid}&{$carttpl}=cart");
    }
}
if ($get == "price") {
    $currency = $currency ? getCurrency('', $currency) : getCurrency();
    $result = select_query("tblpricing", "", array("type" => "product", "currency" => $currency['id'], "relid" => $pid));
    $data = mysql_fetch_array($result);
    $price = $data[$billingcycle];
    $price = formatCurrency($price);
    widgetoutput($price);
}
function widgetoutput($value)
{
    echo "document.write('" . addslashes($value) . "');";
    exit;
}
Пример #5
0
<?php

require "../init.php";
/*
*** USAGE SAMPLES ***
<script language="javascript" src="feeds/cartnumitems.php"></script>
*/
$products = isset($_SESSION["cart"]["products"]) && is_array($_SESSION["cart"]["products"]) ? $_SESSION["cart"]["products"] : array();
$addons = isset($_SESSION["cart"]["addons"]) && is_array($_SESSION["cart"]["addons"]) ? $_SESSION["cart"]["addons"] : array();
$domains = isset($_SESSION["cart"]["domains"]) && is_array($_SESSION["cart"]["domains"]) ? $_SESSION["cart"]["domains"] : array();
$renewals = isset($_SESSION["cart"]["renewals"]) && is_array($_SESSION["cart"]["renewals"]) ? $_SESSION["cart"]["renewals"] : array();
$cartitems = count($products) + count($addons) + count($domains) + count($renewals);
$items = $cartitems == 1 ? 'item' : 'items';
widgetoutput('You have <b>' . $cartitems . '</b> ' . $items . ' in your basket');
function widgetoutput($value)
{
    echo "document.write('" . addslashes($value) . "');";
    exit;
}