”) or ($firstname <> ”) or ($lastname <> ”) or ($firm <> ”)) {
$error = ”;
if ($username == ”)
{ $error .= ‘You must enter an email address/username
‘; }
elseif ((strpos($username,’@’) == 0) or (strpos($username,’.’) == 0) or
(strpos($username,’ ‘) > 0))
{ $error .= ‘Email address (username) is not valid.
‘; };
if ($firstname == ”)
{ $error .= ‘You must enter a First Name.
‘; };
if ($lastname == ”)
{ $error .= ‘You must enter a Last Name.
‘; };
if ($address1 == ”)
{ $error .= ‘You must enter an Address.
‘; };
if ($city == ”)
{ $error .= ‘You must enter a City.
‘; };
if ($state == ”)
{ $error .= ‘You must select a State/Province.
‘; };
if ($zip == ”)
{ $error .= ‘You must enter a Zip Code.
‘; };
if ($password1 == ”)
{ $error .= ‘You must enter a Password.
‘; }
elseif (($password1 <> $password2))
{ $error .= ‘Passwords do not match.
‘; };
if ($ccnumber == ”)
{ $error .= ‘You must enter a Credit Card Number.
‘; };
if ($terms <> ‘agree’)
{ $error .= ‘You must agree to the Terms of Use Agreement in order to complete your order.
‘; };
if ($error == ”) {
// Process credit card transaction
// Add record
$aquery = “INSERT INTO `subscriptions` (`username`,`firstname`,`mi`,`lastname`,`firm`,`profession`,`address1`,`address2`,`city`,`state`,`zip`,`country`,`telephone`,`password`,`paymentmethod`,`ccname`,`ccnumber`,`ccmonth`,`ccyear`,`amount`,`subend`,`active`,`libraryid`) VALUES (”
. ‘”‘ . addslashes($username) . ‘”,”‘ . addslashes($firstname) . ‘”,”‘ . addslashes($mi) . ‘”,”‘ . addslashes($lastname) . ‘”,”‘ . addslashes($firm) . “\”,\”{$profession}\”,\”” . addslashes($address1) . ‘”,”‘ . addslashes($address2)
. ‘”,”‘ . addslashes($city) . ‘”,”‘ . addslashes($state) . ‘”,”‘ . addslashes($zip) . ‘”,”‘ . addslashes($country) . ‘”,”‘ . addslashes($telephone) . ‘”,”‘ . addslashes($password1) . “\”,\”{$cctype}\”,\”” . addslashes($ccname) . ‘”,”‘ . addslashes($ccnumber) . “\”,{$ccmonth},{$ccyear},{$amount},\””
. date(“Y-m-d”,strtotime(‘+1 year’)) . “\”,0,{$libraryid})”;
$aresult = mquery($aquery) or die(“Error adding subscription information!”);
$subscriberid = mysql_insert_id();
$status = process_credit($subscriberid);
if ($status) {
// Show receipt page
$transaction = true;
sendsubscriptionemail($subscriberid);
}
else {
$error = ‘Credit card transaction did not complete successfully.
‘;
};
};
};
if (!$transaction) {
?>
=$lrow['libraryname']?>
Purchase Online Subscription Access
if ($error <> ”) {
print “
Your transaction could not be completed due to the following errors:
{$error}
“;
print “Please check your information and submit your transaction again, or call us toll-free at 800-965-3002.
“;
};
?>
The new online =$lrow['libraryname']?> consists of =$gc?> individual Medifocus Literature Guides (PDF format), each of which is devoted to =$lrow['descriptionsingle']?>.
As a subscriber, you will have immediate and unlimited access to all =$gc?> Medifocus Literature Guides included in the =$lrow['libraryname']?> for 12-months for the low annual subscription fee of only $=$amount?>. That’s less than $20.00 per Guide for 12 months of unlimited access. So take advantage of this limited-time introductory offer and sign-up for your subscription today by completing the form below.
If you would like to Subscribe by Phone, please call us toll-free at 800-965-3002.
} else { $srow = mfetch(mquery("SELECT * FROM `subscriptions` WHERE `subscriberid` = {$subscriberid}")); ?>
=$lrow['libraryname']?>
Your Subscription Confirmation
Thank you for becoming a subscriber to the online =$lrow['libraryname']?>. Please print and save this page, which serves as your order confirmation.
Subscription Order Number: | =$subscriberid?> |
Billing Information | |
Email Address: (Username) |
=$srow['username']?> |
Name: | =$srow['firstname']?> =$srow['mi']?> =$srow['lastname']?> |
Law Firm/Company: | =$srow['firm']?> |
Address: | =$srow['address1']?> =$srow['address2']?> =$srow['city']?>, =$srow['state']?> =$srow['zip']?> =$srow['country']?> |
Telephone: | =$srow['telephone']?> |
Payment Method | |
Credit Card Type: | switch ($srow['paymentmethod']) { case 'V': print "Visa"; break; case 'M': print "Mastercard"; break; case 'D': print "Discover"; break; case 'A': print "American Express"; break; }; ?> |
Name on Credit Card: | =$srow['ccname']?> |
Credit Card Number: | =$srow['ccnumber']?> |
Expiration Date: | =$srow['ccmonth']?>/=$srow['ccyear']?> |
Total Price: | $=number_format($srow['amount'],2)?> |
}; ?>