Review Your Article Selections
$TotalCost = 0;
$article = $_GET['article'];
$selected = $_GET['selected']; // This variable will be "1" if articles were selected
$item_count = 0;
// Check to see if no articles were selected
if ((0 == sizeof($article)) && (1 == $selected)) {
print "Sorry. You did not select any articles. Please use your BACK button on your browser to return to the selections.
";
}
else {
print "
\n
Cost | \n
Title |
\n";
$ArticleLine = -1; // Line number in ArticleTable
if ((($ArticleTable_csv = fopen("/home/techman/reports/ArticleTable.csv","r")) !== FALSE) && ($selected == "1")) {
while (list($key,$val) = @each($article)) {
if ($val != $ArticleLine) { // We need to read the csv file until we have found the correct article
while ($val > $ArticleLine) {
$ArticleTable_Item = fgetcsv($ArticleTable_csv);
// [0] is filename
// [1] is title
// [2] is number of pages
// [3] is cost in dollars
// [4] is format, e.g. ".pdf"
// [5] is description
$user_array[++$ArticleLine] = "0"; // Assume this article wasn't selected by saving a "0" in array
}
}
$item_count += 1;
$user_array[$ArticleLine] = "1"; // This article was selected, so change to a "1" in array
print "\n";
if ($ArticleTable_Item[3] == 0) {
print " FREE   | ";
}
else {
print " \$$ArticleTable_Item[3] | ";
$TotalCost += $ArticleTable_Item[3];
}
print " $ArticleTable_Item[1] ($ArticleTable_Item[2] pages) | \n";
print "
\n";
}
}
while ($ArticleTable_Item = fgetcsv($ArticleTable_csv)) { // need to fill out the rest of the $user_array with "0"
if ($selected == "1") {
$user_array[++$ArticleLine] = "0";
}
else {
print "\n";
print " INCLUDED | ";
print " $ArticleTable_Item[1] ($ArticleTable_Item[2] pages) | \n";
print "
\n";
$user_array[++$ArticleLine] = "1";
$TotalCost = 47;
if ($selected == "2") $TotalCost = 0;
}
}
$cost = "TOTAL COST";
if ($TotalCost > 47) {
$Saved = $TotalCost - 47;
$TotalCost = 47;
$cost = "SPECIAL DISCOUNT (You Saved \$$Saved)!";
}
print " \$$TotalCost | $cost |
\n";
print "
\n";
$user2 = implode("|", $user_array); // Convert the array to a string of 0's and 1's, separated by "|"
if ($TotalCost == 0) { // All articles selected were free
print "\n";
}
else { // At least one article selected cost some money 9M25XGZN6SVNJ
switch ($TotalCost) {
case 10:
$HostedButton = "XP8P84954ZFLA"; // "DFPJT8V7DJ23U";
break;
case 20:
$HostedButton = "4N9JE3BVCZ87E"; // "YMNR7JWBC4QWS";
break;
case 30:
$HostedButton = "UUP8WMWEQ7YQ6";
break;
case 40:
$HostedButton = "9GQQ4RKMMSRWL";
break;
case 47:
$HostedButton = "BTFBNUP72DYCC";
break;
}
// https://www.paypalobjects.com/webstatic/en_US/btn/btn_buynow_cc_171x47.png https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif
print "Yes! I want the above articles sent to me!
Click the PayPal Buy Now Button to complete your purchase at our secure website.
The transaction will go through our partner 'Turn Words 2 Money'.
\n";
print "
\n";
}
}
?>
Mr. Tax Lien™
www.MrTaxLien.com
4709
Harwich Street
Boulder, CO 80301
Customer Service: (720) 318-5445
For comments or questions on this web page enter here:
include('/home/techman/crons/access.php');
?>