Exemple #1
0
}
$clientsdetails = getClientsDetails($_SESSION['uid'], "billing");
$cardtype = $clientsdetails['cctype'];
$cardnum = $clientsdetails['cclastfour'];
if (!$errormessage || $fromorderform) {
    $firstname = $clientsdetails['firstname'];
    $lastname = $clientsdetails['lastname'];
    $email = $clientsdetails['email'];
    $address1 = $clientsdetails['address1'];
    $address2 = $clientsdetails['address2'];
    $city = $clientsdetails['city'];
    $state = $clientsdetails['state'];
    $postcode = $clientsdetails['postcode'];
    $country = $clientsdetails['country'];
    $phonenumber = $clientsdetails['phonenumber'];
}
include "includes/countries.php";
$result = select_query("tblaccounts", "SUM(amountin)-SUM(amountout)", array("invoiceid" => $invoiceid));
$data = mysql_fetch_array($result);
$amountpaid = $data[0];
$balance = $total - $amountpaid;
$smartyvalues = array("firstname" => $firstname, "lastname" => $lastname, "address1" => $address1, "address2" => $address2, "city" => $city, "state" => $state, "postcode" => $postcode, "country" => $country, "countriesdropdown" => getCountriesDropDown($country), "phonenumber" => $phonenumber, "acceptedcctypes" => explode(",", $CONFIG['AcceptedCardTypes']), "ccinfo" => $ccinfo, "cardtype" => $cardtype, "cardnum" => $cardnum, "cctype" => $cctype, "ccnumber" => $ccnumber, "ccexpirymonth" => $ccexpirymonth, "ccexpiryyear" => $ccexpiryyear, "ccstartmonth" => $ccstartmonth, "ccstartyear" => $ccstartyear, "ccissuenum" => $ccissuenum, "cccvv" => $cccvv, "errormessage" => $errormessage, "invoiceid" => $invoiceid, "total" => formatCurrency($total), "balance" => formatCurrency($balance), "showccissuestart" => $CONFIG['ShowCCIssueStart'], "shownostore" => $CONFIG['CCAllowCustomerDelete']);
$smartyvalues['months'] = $gateways->getCCDateMonths();
$smartyvalues['startyears'] = $gateways->getCCStartDateYears();
$smartyvalues['expiryyears'] = $smartyvalues['years'] = $gateways->getCCExpiryDateYears();
if (function_exists($params['paymentmethod'] . "_remoteinput")) {
    $buttoncode = call_user_func($params['paymentmethod'] . "_remoteinput", $params);
    $buttoncode = str_replace("<form", "<form target=\"3dauth\"", $buttoncode);
    $smartyvalues['remotecode'] = $buttoncode;
}
outputClientArea($templatefile);