*
 **/
require "../../../init.php";
$whmcs->load_function("gateway");
$whmcs->load_function("invoice");
$whmcs->load_function("clientarea");
$GATEWAY = getGatewayVariables("worldpayfuturepay");
if (!$GATEWAY['type']) {
    exit("Module Not Activated");
}
$invoiceid = mysql_real_escape_string($_POST['cartId']);
$futurepayid = mysql_real_escape_string($_POST['futurePayId']);
$transid = mysql_real_escape_string($_POST['transId']);
$invoiceid = checkCbInvoiceID($invoiceid, "WorldPay FuturePay");
initialiseClientArea($_LANG['ordercheckout'], "", $_LANG['ordercheckout']);
echo processSingleTemplate("/templates/" . $whmcs->get_sys_tpl_name() . "/header.tpl", $smarty->_tpl_vars);
echo "<WPDISPLAY ITEM=\"banner\">";
$result = select_query("tblinvoices", "", array("id" => $invoiceid));
$data = mysql_fetch_array($result);
$userid = $data['userid'];
if ($_POST['transStatus'] == "Y") {
    logTransaction("WorldPay FuturePay", $_POST, "Successful");
    update_query("tblclients", array("gatewayid" => $futurepayid), array("id" => $userid));
    addInvoicePayment($invoiceid, $transid, "", "", "worldpayfuturepay");
    echo "<p align=\"center\"><a href=\"" . $CONFIG['SystemURL'] . "/viewinvoice.php?id=" . $invoiceid . "&paymentsuccess=true\">Click here to return to " . $CONFIG['CompanyName'] . "</a></p>";
} else {
    logTransaction("WorldPay FuturePay", $_POST, "Unsuccessful");
    echo "<p align=\"center\"><a href=\"" . $CONFIG['SystemURL'] . "/viewinvoice.php?id=" . $invoiceid . "&paymentfailed=true\">Click here to return to " . $CONFIG['CompanyName'] . "</a></p>";
}
echo processSingleTemplate("/templates/" . $whmcs->get_sys_tpl_name() . "/footer.tpl", $smarty->_tpl_vars);
Exemple #2
0
$smartyvalues['twittertweet'] = $CONFIG['AnnouncementsTweet'];
$smartyvalues['facebookrecommend'] = $CONFIG['AnnouncementsFBRecommend'];
$smartyvalues['facebookcomments'] = $CONFIG['AnnouncementsFBComments'];
$smartyvalues['googleplus1'] = $CONFIG['GooglePlus1'];
if ($action == "twitterfeed") {
    $twitterposts = curlCall("http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=" . $twitterusername, "");
    $twitterposts = XMLtoArray($twitterposts);
    $tweets = array();
    foreach ($twitterposts['STATUSES'] as $values) {
        $twitterdate = strtotime($values['CREATED_AT']);
        $tweets[] = array("date" => fromMySQLDate(date("Y-m-d H:i", $twitterdate), true), "tweet" => ticketAutoHyperlinks($values['TEXT']));
    }
    $smartyvalues['tweets'] = $tweets;
    $numtweets = $_POST['numtweets'] ? $_POST['numtweets'] : "3";
    $smartyvalues['numtweets'] = $numtweets;
    echo processSingleTemplate("/templates/" . $whmcs->get_sys_tpl_name() . "/twitterfeed.tpl");
    exit;
}
$smartyvalues['seofriendlyurls'] = $CONFIG['SEOFriendlyUrls'];
$usingsupportmodule = false;
if ($CONFIG['SupportModule']) {
    if (!isValidforPath($CONFIG['SupportModule'])) {
        exit("Invalid Support Module");
    }
    $supportmodulepath = "modules/support/" . $CONFIG['SupportModule'] . "/announcements.php";
    if (file_exists($supportmodulepath)) {
        $usingsupportmodule = true;
        $templatefile = "";
        require $supportmodulepath;
        outputClientArea($templatefile);
        exit;
global $CONFIG;
foreach ($_POST['contacts'] as $key => $value) {
    $split = explode(':', $value);
    if ($split['0'] == 'email') {
        ##  Try and find the user based upon the email address given by Sirportly
        $client = select_query('tblclients', 'id', array('email' => $split['1']));
        if (mysql_num_rows($client)) {
            break;
        }
    }
}
if (mysql_num_rows($client)) {
    $client = mysql_fetch_array($client, MYSQL_ASSOC);
} else {
    die('No such user');
}
## Access the internal API, we stupidly require an administrators id so let's fetch the first one we find ...
$administrator = mysql_fetch_array(full_query("SELECT `id` FROM `tbladmins` LIMIT 0, 1"), MYSQL_ASSOC);
## Client Details
$results = localAPI('getclientsdetails', array('clientid' => $client['id'], 'stats' => true), $administrator['id']);
foreach ($results as $key => $value) {
    $vars[$key] = $value;
}
## Client Products
$client_products = localAPI('getclientsproducts', array('clientid' => $client['id']), $administrator['id']);
foreach ($client_products['products'] as $key => $value) {
    $vars['products'] = $value;
}
initialiseClientArea();
echo processSingleTemplate('/modules/addons/sirportly/templates/frame.tpl', $vars);
Exemple #4
0
 }
 $addonsarray = is_array($addons) ? array_keys($addons) : "";
 $errormessage .= bundlesValidateProductConfig($i, $billingcycle, $configoptionsarray, $addonsarray);
 $_SESSION['cart']['products'][$i]['billingcycle'] = $billingcycle;
 $_SESSION['cart']['products'][$i]['server'] = $serverarray;
 $_SESSION['cart']['products'][$i]['configoptions'] = $configoptionsarray;
 $_SESSION['cart']['products'][$i]['customfields'] = $customfield;
 $_SESSION['cart']['products'][$i]['addons'] = $addonsarray;
 if ($calctotal) {
     $i = $whmcs->get_req_var("i");
     $productinfo = $orderfrm->setPid($_SESSION['cart']['products'][$i]['pid']);
     $ordersummarytemp = "/templates/orderforms/" . $orderfrm->getTemplate() . "/ordersummary.tpl";
     if (file_exists(ROOTDIR . $ordersummarytemp)) {
         $carttotals = calcCartTotals(false, true);
         $templatevars = array("producttotals" => $carttotals['products'][$i], "carttotals" => $carttotals);
         echo processSingleTemplate($ordersummarytemp, $templatevars);
     }
     exit;
 }
 if (!$ajax && !$nocyclerefresh && $previousbillingcycle != $billingcycle) {
     redir("a=confproduct&i=" . $i);
     exit;
 }
 $validate = new WHMCS_Validate();
 $validate->validateCustomFields("product", $pid, true);
 run_validate_hook($validate, "ShoppingCartValidateProductUpdate", $_REQUEST);
 if ($validate->hasErrors()) {
     $errormessage .= $validate->getHTMLErrorOutput();
 }
 if ($errormessage) {
     if ($ajax) {