5
Invoice
<? if(isset($sld)) { ?>
<?= $sld . "." . $tld ?> Domain Name <?= sprintf("$%01.2f",$domain) ?>
<?= $plandesc ?> Plan <?= sprintf("$%01.2f",$plan) ?>
<? if($diskspace != 0) { ?>
Additional Diskspace <?= sprintf("$%01.2f",$diskspace) ?>
<? } ?>
<? if($bandwidth != 0) { ?>
Additional Bandwidth <?= sprintf("$%01.2f",$bandwidth) ?>
<? } ?>
<? if($gst != 0) { ?>
GST <?= sprintf("$%01.2f",$gst) ?>
<? } ?>
<? if($pst != 0) { ?>
PST <?= sprintf("$%01.2f",$pst) ?>
<? } ?>
<? $total = sprintf("%01.2f",($subtotal + $gst + $pst));?>
Payable every <?= $frequency ?>
<? } ?>
6
Checkout
<? if(sizeof($error_messages) != 0) { ?>
<? for($index = 0; $index < sizeof($error_messages); $index++) { ?>
<?= $error_messages[$index] ?>
<? } ?>
<? } ?>
<?
$item_number = "item_number=" .
$plandesc . "-" . $sld . "." . $tld . "-" . $d. "-" . $p;
if($dk != "")
$item_number .= "-" . $dk . "Megs(diskspace)";
if($b != "")
$item_number .= "-" . $p . "Gigs(bandwidth)";
$item_number .= "-" . $f;
$item_name = "item_name=" . urlencode($sld . "." . $tld . " WebHostingCanada.org account.");
$business_email = "sales@bambookit.com";
?>
<? if($checkout == "PayPalSubscription") { ?>
<?
$days = "365";
$yahoof = "Y";
if($f == "m") {$days = "30"; $yahoof = "M";}
$paypal = "https://www.paypal.com/subscriptions/business=" . $business_email .
"&" . $item_number .
"&" . $item_name .
"&no_note=1¤cy_code=CAD&a3=" .
$total . "&p3=1&t3=" . $yahoof . "&src=1&sra=1";
} //PayPal Subscription. ?>
<? if($checkout == "PayPalPurchase") { ?>
<?
$days = "365";
$yahoof = "Y";
if($f == "m") {$days = "30"; $yahoof = "M";}
$paypal = "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" . $business_email .
"&" . $item_number .
"&" . $item_name .
"&amount=" . $total .
"&no_shipping=0&no_note=1¤cy_code=CAD&charset=UTF%2d8";
} //PayPal Subscription. ?>
<? if($checkout == "PayPalSubscription" || $checkout == "PayPalPurchase")
{
$headers = "From: " . $notification_email . "\n" .
"To: " . $notification_email;
//I do this because we can't allways count on paypal to
//send us an email when someone signs up through them.
mail("", $sld . "." . $tld . " WebHostingCanada.org account.", $paypal, $headers);
?>
<? } //PayPal. ?>
<? if($checkout == "CreditCard" && sizeof($error_messages) == 0)
{
$creditcard = $item_number . "\n\n" .
$ccnumber . " " . $cccvv . " " . $ccexpmonth . "-" . $ccexpyear . "\n\n" .
$ccname . "\n" .
$ccaddress . "\n" .
$cccity . "\n" .
$ccprovince . "\n" .
$cccountry . "\n" .
$ccpc;
$headers = "From: " . $notification_email . "\n" .
"To: " . $notification_email . "\n" .
"CC: " . $notification_email_cc;
mail("", $item_name, $creditcard, $headers);
?>
Your order has been placed. Thank you for choosing to host your site with us.
<? } ?>
<? if($checkout == "CreditCard" && sizeof($error_messages) != 0) { ?>
Credit Card Number
CVV Number
Name on the Credit Card
Address
City
State / Province
Country
Postal Code
Phone Number
Email Address
Credit Card Expiration Date
<? $month_names = array
(
"jan",
"feb",
"mar",
"apr",
"may",
"jun",
"jul",
"aug",
"sep",
"oct",
"nov",
"dec"
);
for($index = 1; $index <= 9; $index++) { ?>
0<?= $index ?>(<?= $month_names[$index - 1] ?>)
<? } ?>
<? for($index = 10; $index <= 12; $index++) { ?>
<?= $index ?>(<?= $month_names[$index - 1] ?>)
<? } ?>
<?
$date = getDate();
$year = $date["year"];
?>
<? for($index = 0; $index <= 10; $index++) { ?>
<?= ($index + $year) ?>
<? } ?>
<? } //CreditCard ?>