File: /home/awaldron/public_html/archive/5a_orig/steelers04.php
<?php
session_start();
error_reporting(0);
if(phpversion() >= "4.2.0") {
$postvars = $HTTP_POST_VARS;
$getvars = $HTTP_GET_VARS;
extract($HTTP_POST_VARS);
extract($HTTP_GET_VARS);
}
require("_header.php");
echo "<P><center><img src=\"images/steelers04.gif\"></center>\n";
if ($stage == 1) {
echo "<form action=\"steelers04.php\" method=\"post\" onSubmit=\"MM_validateForm('Purchaser','','R','Email','','RisEmail'";
if ($qty == 1) {
// do nothing
} else {
for ($h=1; $h < $qty; $h++) {
echo ",'Guest_" . $h . "','','R'";
}
}
echo ");return document.MM_returnValue\">\n";
echo "<input type=\"hidden\" name=\"stage\" value=\"2\">\n";
echo "<input type=\"hidden\" name=\"qty\" value=\"" . $qty . "\">\n";
echo "<b>Please enter the names of all the guests attending, starting with the purchaser of the tickets. All fields are required.</b>\n";
echo "<center>\n";
echo "<P><table border=0><tr><td class=\"text\" align=\"right\"><b>Purchaser : </b></td><td><input type=\"text\" name=\"Purchaser\" size=35 maxlength=100></td></tr>";
echo "<tr><td class=\"text\" align=\"right\"><b>Email : </b></td><td><input type=\"text\" name=\"Email\" size=35 maxlength=75></td></tr></table>\n\n";
echo "<P><table border=0>\n";
for ($i=1; $i < $qty; $i++) {
echo "<tr><td class=\"text\">Additional Guest " . $i . " : </td>";
echo "<td class=\"text\"><input type=\"text\" name=\"Guest_" . $i . "\" size=35 maxlength=100></td></tr>\n";
}
echo "</table>\n\n";
echo "<P><input type=\"checkbox\" name=\"of_age\" value=\"1\"> <b>I certify that all guests listed are at least 21 years of age.</b>\n";
echo "<P><input type=\"submit\" value=\"Submit\">\n";
echo "</center></form>\n";
} else if ($stage == 2) {
if ($of_age != 1) {
echo "<form action=\"steelers04.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"stage\" value=\"2\">\n";
echo "<input type=\"hidden\" name=\"qty\" value=\"" . $qty . "\">\n";
if ($Purchaser) { echo "<input type=\"hidden\" name=\"Purchaser\" value=\"" . $Purchaser . "\"><P>Purchaser: " . $Purchaser . "\n"; }
if ($Email) { echo "<input type=\"hidden\" name=\"Email\" value=\"" . $Email . "\"><br>Email: " . $Email . "\n"; }
if ($Guest_1) { echo "<input type=\"hidden\" name=\"Guest_1\" value=\"" . $Guest_1 . "\"><P>Guest 1: " . $Guest_1 . "\n"; }
if ($Guest_2) { echo "<input type=\"hidden\" name=\"Guest_2\" value=\"" . $Guest_2 . "\"><br>Guest 2: " . $Guest_2 . "\n"; }
if ($Guest_3) { echo "<input type=\"hidden\" name=\"Guest_3\" value=\"" . $Guest_3 . "\"><br>Guest 3: " . $Guest_3 . "\n"; }
if ($Guest_4) { echo "<input type=\"hidden\" name=\"Guest_4\" value=\"" . $Guest_4 . "\"><br>Guest 4: " . $Guest_4 . "\n"; }
if ($Guest_5) { echo "<input type=\"hidden\" name=\"Guest_5\" value=\"" . $Guest_5 . "\"><br>Guest 5: " . $Guest_5 . "\n"; }
if ($Guest_6) { echo "<input type=\"hidden\" name=\"Guest_6\" value=\"" . $Guest_6 . "\"><br>Guest 6: " . $Guest_6 . "\n"; }
if ($Guest_7) { echo "<input type=\"hidden\" name=\"Guest_7\" value=\"" . $Guest_7 . "\"><br>Guest 7: " . $Guest_7 . "\n"; }
if ($Guest_8) { echo "<input type=\"hidden\" name=\"Guest_8\" value=\"" . $Guest_8 . "\"><br>Guest 8: " . $Guest_8 . "\n"; }
if ($Guest_9) { echo "<input type=\"hidden\" name=\"Guest_9\" value=\"" . $Guest_9 . "\"><br>Guest 9: " . $Guest_9 . "\n"; }
echo "<P><font color=\"ff0000\">** Please check below if all guests are at least 21 years of age. **</font>\n";
echo "<br><input type=\"checkbox\" name=\"of_age\" value=\"1\"> <b>I certify that all guests listed are at least 21 years of age.</b>\n";
echo "<P><input type=\"submit\" value=\"Submit\">\n";
echo "</form>\n";
} else {
$guests = "";
if ($Guest_1) { $guests .= $Guest_1; }
if ($Guest_2) { $guests .= ", ".$Guest_2; }
if ($Guest_3) { $guests .= ", ".$Guest_3; }
if ($Guest_4) { $guests .= ", ".$Guest_4; }
if ($Guest_5) { $guests .= ", ".$Guest_5; }
if ($Guest_6) { $guests .= ", ".$Guest_6; }
if ($Guest_7) { $guests .= ", ".$Guest_7; }
if ($Guest_8) { $guests .= ", ".$Guest_8; }
if ($Guest_9) { $guests .= ", ".$Guest_9; }
// Connect to DB
$db = mysql_connect("localhost", "i5thacec", "miff0609");
if (!$db) { echo "Error: Could not connect to DB.<br>" . mysql_error(); exit; }
mysql_select_db("i5thacec_fifthace");
$sql = "INSERT INTO tbl_attendees (att_purchaser, att_email, att_qty, att_guests) VALUES ('".$Purchaser."','".$Email."',".$qty.",'".$guests."')";
$result = mysql_query($sql);
echo "<center>\n<br><br><br><b>All transactions are handled securely via PayPal</b>\n";
echo "<br><img src=\"http://www.paypal.com/images/paypal_logo.gif\">\n";
echo "<P>If you do not have a PayPal account, you will be prompted to create one before purchasing.\n";
echo "<P><b>Select a payment option below and click the button to make your payment:</b>\n";
echo "<table border=0 cellspacing=20 class=\"text\" width=80%><tr><td>\n";
echo "<P><table width=250 border=0 cellspacing=0 cellpadding=0 align=\"right\" hspace=5>\n";
echo "<tr><td width=4 height=4><img src=\"images/box_top_left.gif\" width=4 height=4></td>\n";
echo " <td width=* height=4><img src=\"images/box_top.gif\" width=100% height=4></td>\n";
echo " <td width=4 height=4><img src=\"images/box_top_right.gif\" width=4 height=4></td>\n";
echo "</tr>\n";
echo "<tr><td width=4 background=\"images/box_right.gif\"><img src=\"images/clear.gif\" width=1 height=1></td>\n";
echo " <td align=\"center\" valign=\"middle\" class=\"text\">\n";
echo "<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\n";
echo "<br><br><b>To pay for your tickets in full:</b> <P>Click the \"Buy Now\" button below. The total of your bill using this option will be <b>$".($qty*200).".00</b>.\n";
echo "<P><input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\n";
echo "<input type=\"hidden\" name=\"business\" value=\"dkoch@5thAce.com\">\n";
echo "<input type=\"hidden\" name=\"item_name\" value=\"2004 Steelers Road Trip (Full Payment)\">\n";
echo "<input type=\"hidden\" name=\"item_number\" value=\"5AESteelers2004FP\">\n";
echo "<input type=\"hidden\" name=\"amount\" value=\"200.00\">\n";
echo "<input type=\"hidden\" name=\"no_shipping\" value=\"1\">\n";
echo "<input type=\"hidden\" name=\"return\" value=\"http://www.5thace.com/steelers04.php?stage=3\">\n";
echo "<input type=\"hidden\" name=\"rm\" value=\"2\">\n";
echo "<input type=\"hidden\" name=\"cancel_return\" value=\"http://www.5thace.com/steelers04.php\">\n";
echo "<input type=\"hidden\" name=\"quantity\" value=\"" . $qty . "\">\n";
echo "<input type=\"hidden\" name=\"no_note\" value=\"1\">\n";
echo "<input type=\"hidden\" name=\"custom\" value=\"" . $guests . "\">\n";
echo "<input type=\"hidden\" name=\"currency_code\" value=\"USD\">\n";
echo "<input type=\"hidden\" name=\"lc\" value=\"US\">\n";
echo "<input type=\"image\" src=\"https://www.paypal.com/images/x-click-but23.gif\" border=\"0\" name=\"submit\" alt=\"Make payments with PayPal - it's fast, free and secure!\">\n";
echo "</form>\n";
echo " </td>\n";
echo " <td width=4 background=\"images/box_left.gif\"><img src=\"images/clear.gif\" width=1 height=1></td>\n";
echo "</tr>\n";
echo "<tr><td width=4 height=4><img src=\"images/box_bot_left.gif\" width=4 height=4></td>\n";
echo " <td width=* height=4><img src=\"images/box_bottom.gif\" width=100% height=4></td>\n";
echo " <td width=4 height=4><img src=\"images/box_bot_right.gif\" width=4 height=4></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</td><td>\n";
echo "<P><table width=250 border=0 cellspacing=0 cellpadding=0 align=\"right\" hspace=5>\n";
echo "<tr><td width=4 height=4><img src=\"images/box_top_left.gif\" width=4 height=4></td>\n";
echo " <td width=* height=4><img src=\"images/box_top.gif\" width=100% height=4></td>\n";
echo " <td width=4 height=4><img src=\"images/box_top_right.gif\" width=4 height=4></td>\n";
echo "</tr>\n";
echo "<tr><td width=4 background=\"images/box_right.gif\"><img src=\"images/clear.gif\" width=1 height=1></td>\n";
echo " <td align=\"center\" valign=\"middle\" class=\"text\">\n";
echo "<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">\n";
echo "<br><br><b>To make a down payment:</b> <P>Click the \"Buy Now\" button below. The total of your bill using this option will be <b>$".($qty*75).".00</b>.\n";
echo "<P><input type=\"hidden\" name=\"cmd\" value=\"_xclick\">\n";
echo "<input type=\"hidden\" name=\"business\" value=\"dkoch@5thAce.com\">\n";
echo "<input type=\"hidden\" name=\"item_name\" value=\"2004 Steelers Road Trip (Down Payment)\">\n";
echo "<input type=\"hidden\" name=\"item_number\" value=\"5AESteelers2004DP\">\n";
echo "<input type=\"hidden\" name=\"amount\" value=\"75.00\">\n";
echo "<input type=\"hidden\" name=\"no_shipping\" value=\"1\">\n";
echo "<input type=\"hidden\" name=\"return\" value=\"http://www.5thace.com/steelers04.php?stage=3\">\n";
echo "<input type=\"hidden\" name=\"rm\" value=\"2\">\n";
echo "<input type=\"hidden\" name=\"cancel_return\" value=\"http://www.5thace.com/steelers04.php\">\n";
echo "<input type=\"hidden\" name=\"quantity\" value=\"" . $qty . "\">\n";
echo "<input type=\"hidden\" name=\"no_note\" value=\"1\">\n";
echo "<input type=\"hidden\" name=\"custom\" value=\"" . $guests . "\">\n";
echo "<input type=\"hidden\" name=\"currency_code\" value=\"USD\">\n";
echo "<input type=\"hidden\" name=\"lc\" value=\"US\">\n";
echo "<input type=\"image\" src=\"https://www.paypal.com/images/x-click-but23.gif\" border=\"0\" name=\"submit\" alt=\"Make payments with PayPal - it's fast, free and secure!\">\n";
echo "</form>\n";
echo " </td>\n";
echo " <td width=4 background=\"images/box_left.gif\"><img src=\"images/clear.gif\" width=1 height=1></td>\n";
echo "</tr>\n";
echo "<tr><td width=4 height=4><img src=\"images/box_bot_left.gif\" width=4 height=4></td>\n";
echo " <td width=* height=4><img src=\"images/box_bottom.gif\" width=100% height=4></td>\n";
echo " <td width=4 height=4><img src=\"images/box_bot_right.gif\" width=4 height=4></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</td></tr></table>\n";
}
} else if ($stage == 3) {
// Connect to DB
$db = mysql_connect("localhost", "i5thacec", "miff0609");
if (!$db) { echo "Error: Could not connect to DB.<br>" . mysql_error(); exit; }
mysql_select_db("i5thacec_fifthace");
$sql = "UPDATE tbl_attendees SET att_paid=1, att_amount=".$mc_gross;
$result = mysql_query($sql);
// Post Thank You
echo "<P><center><b>Thank You " . $first_name . "!</b></center>\n";
echo "<P>Your payment has been processed and you" . ($quantity > 1 ? " and your ".($quantity-1)." guests " : " ") . "have been successfully added to our guest list! We can't wait to see you on the bus!\n";
} else {
// Enter Text For Page.
// Connect to DB
$db = mysql_connect("localhost", "i5thacec", "miff0609");
if (!$db) { echo "Error: Could not connect to DB.<br>" . mysql_error(); exit; }
mysql_select_db("i5thacec_fifthace");
$sql = "SELECT sum(att_qty) AS tix FROM tbl_attendees WHERE 1";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
$tix = 45 - $row["tix"];
if ($tix < 10) { $maxtix = $tix; }
else { $maxtix = 10; }
echo "<P><table width=250 border=0 cellspacing=0 cellpadding=0 align=\"right\" style=\"margin:0px 0px 15px 15px\">\n";
echo "<tr><td width=4 height=4><img src=\"images/box_top_left.gif\" width=4 height=4></td>\n";
echo " <td width=* height=4><img src=\"images/box_top.gif\" width=100% height=4></td>\n";
echo " <td width=4 height=4><img src=\"images/box_top_right.gif\" width=4 height=4></td>\n";
echo "</tr>\n";
echo "<tr><td width=4 background=\"images/box_right.gif\"><img src=\"images/clear.gif\" width=1 height=1></td>\n";
echo " <td align=\"center\" valign=\"middle\" class=\"text\">\n";
if ($tix >= 1) {
echo "<form action=\"steelers04.php\" method=\"post\">\n";
echo "<input type=\"hidden\" name=\"stage\" value=\"1\">\n";
echo "<br><b><font color=CC0000 size=3>Buy Tickets Online!</font></b>\n";
echo "<P><b>How many tickets would you like to purchase?</b>\n";
echo "<P><b>Qty:</b> <SELECT name=\"qty\">\n";
for ($i=1; $i<=$maxtix; $i++) {
echo "<option value=".$i.">".$i."</option>\n";
}
echo "</SELECT> <input type=\"submit\" value=\"Submit\">\n";
echo "<P>(Only ".$tix." tickets remain)\n";
echo "</form>\n";
} else {
echo "<br><b><font color=CC0000 size=3>Buy Tickets Online!</font></b><P><b>We're sorry.</b><br>All tickets have been purchased, if you'd like to be placed on the waiting list in the case that someone cancels their reservation, please contact <a href=\"mailto:dkoch@5thace.com\" class=\"text\"><span class=\"underline\"><FONT onmouseover=\"this.style.color='#FF0000'\" onmouseout=\"this.style.color='#000000'\">Dan Koch</font></span></a>.<P>We apologize for the inconvenience.<br><br>\n";
}
echo " </td>\n";
echo " <td width=4 background=\"images/box_left.gif\"><img src=\"images/clear.gif\" width=1 height=1></td>\n";
echo "</tr>\n";
echo "<tr><td width=4 height=4><img src=\"images/box_bot_left.gif\" width=4 height=4></td>\n";
echo " <td width=* height=4><img src=\"images/box_bottom.gif\" width=100% height=4></td>\n";
echo " <td width=4 height=4><img src=\"images/box_bot_right.gif\" width=4 height=4></td>\n";
echo "</tr>\n";
echo "</table>\n";
echo "<P><b>Yes, we're doing it again!</b> For years we have been not only saying, but proving, that there \"ain't no party like a 5th Ace party\". Here's another chance to get proof for yourself - The Party Bus to Cincinnati for our Pittsburgh Steelers vs. Cincinnati Bengals!\n";
echo "<P>Both the Steelers and Bengals have improved squads this year, so the game should prove to be a good one. Win or lose, though, one thing is for certain - Fifth Ace Entertainment's Party Bus will party like rock stars the entire trip!\n";
echo "<P>Last year, 100 crazy 5AE representatives took the \"Queen City\" by storm for one September day. But this year, by popular demand, we're staying over! Reserve your spot today, because of higher ticket demand, only 45 spots are available! You have to act fast!!\n";
echo "<P><b>What Do I Get?</b><ul><li>Round trip luxury coach (with \"refreshments\") to and from Cincinnati<li>Game ticket for Sunday's matchup - Steelers vs. Bengals<li>One night Hotel stay (double occupancy) at a major Hotel chain *<li>Saturday Night Shuttle to/from Hotel to Cincy's Bar and Club District or Kentucky's Casino district<li>Sunday morning breakfast and tailgate party<li>Commemorative 5AE/Steelers Long Sleeve T-shirt<li>Overall time of your life</ul>\n";
echo "<P><b>What is the damage?</b><P>The total per ticket is $200.00. When purchasing your tickets online, you will have the option to pay for each ticket in full, or make a $75.00 down payment on each ticket. If making a down payment, the remainder of the balance is due no later than September 30, 2004.\n";
echo "<P><b>Good deal. How do I reserve my spot?</b><P>As of ".date("F nS").", only ".$tix." spots are available, so you have to hurry! And this year, to avoid confusion, reservations will be taken via the INTERNET ONLY!! Here's how you do it:\n";
echo "<ul><li>Choose how many tickets you are purchasing in the box above to get started.<li>Enter in your name, email address, and the names of each person you are purchasing tickets for.<li>Select whether you would like to pay the balance in full, or make a down payment.<li>Follow the directions for paying with your credit/debit card.<li>Wait for a confirmation email stating that you have secured one of the spots or an email stating your position on the waiting list!</ul>\n";
echo "<P>It's on like that!! How much easier can it be!! I can't stress enough how crucial it is to act on this IMMEDIATELY!!! With 100 people from last year's trip all wanting a spot, plus countless others who have heard about it from people who went last year, tickets may go faster than Jay-Z's Madison Square Garden show!! \n";
echo "<P>Good Luck to all those vying to be one of the lucky 45!!\n";
}
require("_footer.php");
?>