'; echo '

Click "Add to Cart" to select the type of ticket you wish to purchase.  '; echo 'When the shopping cart is displayed, you can change the quantity by typing the number of tickets desired and then pressing the "Update Cart"  button.  '; echo 'If you purchase tickets within 24 hours of the concert, you must print the confirmation.  

'; echo '
'; echo ''; output_ticket_table(); echo '

'; function output_ticket_table() { /* This processing reads the product (ticket) information from the NSCS database */ /* For each item, */ /* It displays that information and provides PayPay "Add to Cart" and "View Cart" */ include '../include/db.inc'; include '../include/error.inc'; include '../include/clean.inc'; include '../include/salesvars.inc'; $connection = $con1; if(!mysql_select_db($databaseName,$connection)) showerror(); echo "Type of TicketItem IDUnit PriceSelect this ticketView Shopping Cart"; if ($_REQUEST['secret'] == "len") { // Show all products for any user that reaches this page with the secret parameter specified // Any user going to http://www.northshorechoral.org/showalltickets // will be redirected to the version of this page in northshorechoral.com/sales/ticketord3.php with the secret parameter set. $query = "SELECT proddescr, prodprice, proddisplcode FROM product ORDER BY proddisplcode"; } else { // Show only products currently on sale $query = "SELECT proddescr, prodprice, proddisplcode FROM product WHERE grp_id = 1 ORDER BY proddisplcode"; } if (!($result = @ mysql_query($query, $connection))) showerror(); while ($row = @ mysql_fetch_array($result)) { /* Store SQL results is easy-to-spell variable names */ $item_desc = $row["proddescr"] ; $item_no = $row["proddisplcode"]; $item_price = $row["prodprice"]; /* Output Type of Ticket in left side of display table */ $buffer = "\r\n\r\n"; $buffer .= $item_desc; $buffer .= ""; echo $buffer; /* Type of Ticket */ /* Ouput Item Number */ $buffer = ""; $buffer .= $item_no; $buffer .=""; echo $buffer; /* Item Number */ /* Output Item Price */ echo "$item_price"; /* Unit Price */ /* Output the Add to Cart Button */ $buffer = ""; $buffer .= output_paypal_add_to_cart($paypal, $item_desc, $item_no, $item_price); $buffer .= ""; echo $buffer; /* Add to Cart */ /* Ouput the View Cart Button */ $buffer = ""; $buffer .= output_paypal_view_cart($paypal, $item_desc, $item_no, $item_price); $buffer .= ""; echo $buffer; /* View Cart */ /* End of table row */ echo ""; } } function output_paypal_add_to_cart($paypal,$item_desc, $item_no, $item_price) { /* Generate the Add to Cart form for this item */ extract($paypal,EXTR_PREFIX_ALL,"paypal"); $buffer = "
"; $buffer .= ""; $buffer .= ""; $buffer .= ''; $buffer .= ''; $buffer .= ""; $buffer .= ""; $buffer .= ""; $buffer .= ""; $buffer .= ''; $buffer .= ''; $buffer .= ''; $buffer .= ''; $buffer .= ''; // $buffer .= ''; // $buffer .= ''; $buffer .= "
"; return $buffer; } function output_paypal_view_cart($paypal,$item_desc, $item_no, $item_price) { /* Generate the View Cart form for this item */ extract($paypal,EXTR_PREFIX_ALL,"paypal"); $buffer = "
"; $buffer .= ''; $buffer .= ""; $buffer .= ""; $buffer .= ''; $buffer .= '
'; return $buffer; } ?>