--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"\r
+"http://www.w3.org/TR/html4/strict.dtd">\r
+<html>\r
+ <head>\r
+ <title>ticketing - Sample Site HTML wrapper for upload to Gaslight Media Systems</title>\r
+ </head>\r
+ <body> \r
+ <!-- \r
+ \r
+ GLM Content Area\r
+ \r
+ Should provide adequate open and clear area for ticketing system content.\r
+ The {GLM} tag below will be replaced with ticketing system content by our systems.\r
+ \r
+ -->\r
+ {GLM}\r
+ \r
+ </body>\r
+</html>\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media Content Area for Ticketing System - Preliminary Mock-Up\r
+ \r
+ Ticket Shopping Cart Page\r
+\r
+ This entire file is a sample of contents that will replace the {GLM} tag\r
+ in the HTML file provided by the customer that mimics their desired page\r
+ appearance.\r
+\r
+ This page provides...\r
+ \r
+ * Summary of cart contents - Each entry includes\r
+ * Event selected\r
+ * Sections selected for this event\r
+ * Tickets selected for this Section \r
+ * Options to checkout or select more tickets \r
+ \r
+ Note: We may make this page interactive so that users can change quantities\r
+ and all totals update as they do. The page will load availability status for\r
+ the selected tickets and make that available to the scripts so we can check\r
+ if the user is selecting more than are available. When this page is submitted\r
+ the actual availability will be checked again and the user returned if there's\r
+ been an inventory change that affects their selection with the specific tickets\r
+ highlighted. \r
+ \r
+ -->\r
+\r
+<!-- Script Links - These will be replaced with updated links for deployment -->\r
+<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>\r
+<link rel="stylesheet" href="css/main.css">\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+ <div id="GLMticketCart">\r
+\r
+ <form action="">\r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <div id="GLMnavSelectEvent=" class="glmNavItem">Select another event</div> <!-- returns user to main site -->\r
+ <div id="GLMnavSelectTickets=" class="glmNavItem">More tickets for this event</div>\r
+ <div id="GLMnavCheckout=" class="glmNavItem">Purchase selected tickets</div>\r
+ </div>\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">Selected Events and Tickets</div>\r
+ \r
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">(page intro goes here)</div>\r
+ \r
+ <!-- glmCartBlock - A Venue -->\r
+ <div class="glmCartBlock">\r
+ \r
+ <div class="glmCartBlockTitle">Venue #1 Name</div>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+ <div class="glmCartVenueInfo">\r
+ <div class="glmCartVenueDescr">(venue description text goes here)</div>\r
+ <img class="glmCartVenueImage" src="http://is0.gaslightmedia.com/demo/is2/is00-1228940281-46847.jpeg"> \r
+ </div>\r
+ \r
+ <!-- glmCartEvents - Container for all events selected for this venue -->\r
+ <div class="glmCartEvents">\r
+ \r
+ <!-- glmCartEvent - Multiple Instances - An event at the venue for which tickets are in the cart -->\r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventName">Event #1 Name</div>\r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventDescr">(venue description text goes here)</div>\r
+ </div>\r
+ \r
+ <!-- glmCartTickets - Container for all tickets for this event --> \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Quant</div>\r
+ <div class="glmCartText">Section</div>\r
+ <div class="glmCartText">Ticket</div>\r
+ <div class="glmCartText">Price Each</div>\r
+ <div class="glmCartText">Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber"><input type="number" class="glmCartQuant" value="5"></div>\r
+ <div class="glmCartText">Section 1</div>\r
+ <div class="glmCartText">Type 1</div>\r
+ <div class="glmCartPrice">$25.00/each</div>\r
+ <div class="glmCartPrice">$125.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber"><input type="number" class="glmCartQuant" value="2"></div>\r
+ <div class="glmCartText">Section 2</div>\r
+ <div class="glmCartText">Type 2</div>\r
+ <div class="glmCartPrice">$25.00</div>\r
+ <div class="glmCartPrice">$50.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartNumberBold">7</div>\r
+ <div class="glmCartPriceBold">$175.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartEvent -->\r
+ \r
+ <!-- glmCartEvent - Multiple Instances - An event at the venue for which tickets are in the cart -->\r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventName">Event #2 Name</div>\r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventDescr">(venue description text goes here)</div>\r
+ </div>\r
+ \r
+ <!-- glmCartTickets - Container for all tickets for this event --> \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Quant</div>\r
+ <div class="glmCartText">Section</div>\r
+ <div class="glmCartText">Ticket</div>\r
+ <div class="glmCartText">Price Each</div>\r
+ <div class="glmCartText">Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber"><input type="number" class="glmCartQuant" value="5"></div>\r
+ <div class="glmCartText">Section 1</div>\r
+ <div class="glmCartText">Type 1</div>\r
+ <div class="glmCartPrice">$25.00/each</div>\r
+ <div class="glmCartPrice">$125.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber"><input type="number" class="glmCartQuant" value="2"></div>\r
+ <div class="glmCartText">Section 2</div>\r
+ <div class="glmCartText">Type 2</div>\r
+ <div class="glmCartPrice">$25.00</div>\r
+ <div class="glmCartPrice">$50.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartNumberBold">7</div>\r
+ <div class="glmCartPriceBold">$175.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartEvent -->\r
+ \r
+ </div> <!-- glmCartEvents -->\r
+ \r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+ <div class="glmCartVenueTotal">\r
+ \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Tickets</div>\r
+ <div class="glmCartText">Venue Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartTextBold">19</div>\r
+ <div class="glmCartPriceBold">$250.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartVenueTotal -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ <!-- glmCartBlock - A Venue -->\r
+ <div class="glmCartBlock">\r
+ \r
+ <div class="glmCartBlockTitle">Venue #2 Name</div>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+ <div class="glmCartVenueInfo">\r
+ <div class="glmCartVenueDescr">(venue description text goes here)</div>\r
+ <img class="glmCartVenueImage" src="http://is0.gaslightmedia.com/demo/is2/is00-1228940281-46847.jpeg"> \r
+ </div>\r
+ \r
+ <!-- glmCartEvents - Container for all events selected for this venue -->\r
+ <div class="glmCartEvents">\r
+ \r
+ <!-- glmCartEvent - Multiple Instances - An event at the venue for which tickets are in the cart -->\r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventName">Event #1 Name</div>\r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventDescr">(venue description text goes here)</div>\r
+ </div>\r
+ \r
+ <!-- glmCartTickets - Container for all tickets for this event --> \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Quant</div>\r
+ <div class="glmCartText">Section</div>\r
+ <div class="glmCartText">Ticket</div>\r
+ <div class="glmCartText">Price Each</div>\r
+ <div class="glmCartText">Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber"><input type="number" class="glmCartQuant" value="5"></div>\r
+ <div class="glmCartText">Section 1</div>\r
+ <div class="glmCartText">Type 1</div>\r
+ <div class="glmCartPrice">$25.00/each</div>\r
+ <div class="glmCartPrice">$125.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber"><input type="number" class="glmCartQuant" value="2"></div>\r
+ <div class="glmCartText">Section 2</div>\r
+ <div class="glmCartText">Type 2</div>\r
+ <div class="glmCartPrice">$25.00</div>\r
+ <div class="glmCartPrice">$50.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartNumberBold">7</div>\r
+ <div class="glmCartPriceBold">$175.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartEvent -->\r
+ \r
+ <!-- glmCartEvent - Multiple Instances - An event at the venue for which tickets are in the cart -->\r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventName">Event #2 Name</div>\r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventDescr">(venue description text goes here)</div>\r
+ </div>\r
+ \r
+ <!-- glmCartTickets - Container for all tickets for this event --> \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Quant</div>\r
+ <div class="glmCartText">Section</div>\r
+ <div class="glmCartText">Ticket</div>\r
+ <div class="glmCartText">Price Each</div>\r
+ <div class="glmCartText">Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber"><input type="number" class="glmCartQuant" value="5"></div>\r
+ <div class="glmCartText">Section 1</div>\r
+ <div class="glmCartText">Type 1</div>\r
+ <div class="glmCartPrice">$25.00/each</div>\r
+ <div class="glmCartPrice">$125.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber"><input type="number" class="glmCartQuant" value="2"></div>\r
+ <div class="glmCartText">Section 2</div>\r
+ <div class="glmCartText">Type 2</div>\r
+ <div class="glmCartPrice">$25.00</div>\r
+ <div class="glmCartPrice">$50.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartNumberBold">7</div>\r
+ <div class="glmCartPriceBold">$175.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartEvent -->\r
+ \r
+ </div> <!-- glmCartEvents -->\r
+ \r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+ <div class="glmCartVenueTotal">\r
+ \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Tickets</div>\r
+ <div class="glmCartText">Venue Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartTextBold">19</div>\r
+ <div class="glmCartPriceBold">$250.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartVenueTotal -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ <!-- glmCartBlock - Selection Summary -->\r
+ <div class="glmCartBlock summary">\r
+ \r
+ <div class="glmCartBlockTitle">Cart Summary</div>\r
+ \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Venues</div>\r
+ <div class="glmCartText">Tickets</div>\r
+ <div class="glmCartText">Grand Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartNumberBold">2</div>\r
+ <div class="glmCartTextBold">19</div>\r
+ <div class="glmCartPriceBold">$250.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ <!-- glmCartBlock - Proceed to Checkout -->\r
+ <div class="glmCartBlock">\r
+ <div id="GLMpolicy">\r
+ (purchase and return policies go here)\r
+ </div>\r
+ <div id="GLMcheckoutBtn" class="glmActionButton">Proceed to Checkout</div>\r
+ </div>\r
+\r
+ </form>\r
+\r
+ </div>\r
+</div><!-- GLMcontent -->\r
+\r
+<!-- jQuery scripts for controlling page actions -->\r
+<script>\r
+\r
+ $(document).ready(function(){\r
+ \r
+ // Checkout action\r
+ $('#GLMcheckout').click(function() {\r
+ alert('Cart checkout action');\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media Content Area for Ticketing System - Preliminary Mock-Up\r
+ \r
+ Ticket Checkout Page\r
+\r
+ This entire file is a sample of contents that will replace the {GLM} tag\r
+ in the HTML file provided by the customer that mimics their desired page\r
+ appearance.\r
+\r
+ This page provides...\r
+ \r
+ * Summary of cart contents\r
+ * Request for purchaser contact information\r
+ * Request for payment information for each venue (venues are charged separately) \r
+ * Policies\r
+ * Grand totals\r
+ * Final purchase action \r
+ \r
+ Note: Inventory selected by this user will be held for a certain amount of time\r
+ before being returned to availability. On submit this page will check if that\r
+ time has been exceeded. If so, and there's not availability for all selected \r
+ tickets, the user will be returned to the cart page to deal with that. \r
+ \r
+ -->\r
+\r
+<!-- Script Links - These will be replaced with updated links for deployment -->\r
+<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>\r
+<link rel="stylesheet" href="css/main.css">\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+ <div id="GLMcheckout">\r
+\r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <div id="GLMnavSelectEvent=" class="glmNavItem">Select another event</div> <!-- returns user to main site -->\r
+ <div id="GLMnavSelectTickets=" class="glmNavItem">More tickets for this event</div>\r
+ <div id="GLMnavCart=" class="glmNavItem">Return to selcted tickets</div>\r
+ </div>\r
+\r
+ <!-- glmCartBlock - Contact information - Container for all general customer information -->\r
+ <div class="glmCartBlock">\r
+ <div class="glmCartBlockTitle">Contact Information</div>\r
+ \r
+ <!-- glmCartForm - A container for a block of form input with prompts-->\r
+ <div class="glmCartForm">\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">First Name</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="fname"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Last Name</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="lname"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Address</div><div class="glmCartFormInput"><input type="text" name="addr1"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput"><input type="text" name="addr2"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">City</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="city"></div></div>\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormPrompt">State</div>\r
+ <div class="glmCartFormInput">\r
+ <select name="state">\r
+ <option value="MI">Michigan</option>\r
+ <option value="OH">Ohio</option>\r
+ </select>\r
+ </div>\r
+ </div>\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormPrompt">Country</div>\r
+ <div class="glmCartFormInput">\r
+ <select name="state">\r
+ <option value="US">United State</option>\r
+ <option value="CA">Canada</option>\r
+ </select>\r
+ </div>\r
+ </div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">ZIP/Postal code</div><div class="glmCartFormInput"><input type="text" name="zip"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Phone</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="phone"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">E-Mail</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="email"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Verify E-Mail</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="email2"></div></div>\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormPrompt">OK to Sent E-Mail?</div>\r
+ <div class="glmCartFormInput">\r
+ <input id="email_input" type="checkbox" name="email_ok">\r
+ <label for="email_input">Please send information on activities and offers.</label>\r
+ </div>\r
+ </div>\r
+ </div> <!-- glmCartForm -->\r
+ \r
+ </div> <!-- glmCartBlock - Contact information -->\r
+\r
+ <!-- glmCartBlock - A Venue -->\r
+ <div class="glmCartBlock">\r
+\r
+ <div class="glmCartBlockTitle">Venue #1 Name</div>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+ <div class="glmCartVenueInfo">\r
+ <div class="glmCartVenueDescr">(venue description text goes here)</div>\r
+ <img class="glmCartVenueImage" src="http://is0.gaslightmedia.com/demo/is2/is00-1228940281-46847.jpeg"> \r
+ </div>\r
+ \r
+ <!-- glmCartEvents - Container for all events selected for this venue -->\r
+ <div class="glmCartEvents">\r
+\r
+ <!-- glmCartEvent - Multiple Instances - An event at the venue for which tickets are in the cart -->\r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventName">Event #1 Name</div>\r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventDescr">(venue description text goes here)</div>\r
+ </div>\r
+\r
+ <!-- glmCartTickets - Container for all tickets for this event --> \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Quant</div>\r
+ <div class="glmCartText">Section</div>\r
+ <div class="glmCartText">Ticket</div>\r
+ <div class="glmCartText">Price Each</div>\r
+ <div class="glmCartText">Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber">5</div>\r
+ <div class="glmCartText">Section 1</div>\r
+ <div class="glmCartText">Type 1</div>\r
+ <div class="glmCartPrice">$25.00/each</div>\r
+ <div class="glmCartPrice">$125.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber">2</div>\r
+ <div class="glmCartText">Section 2</div>\r
+ <div class="glmCartText">Type 2</div>\r
+ <div class="glmCartPrice">$25.00</div>\r
+ <div class="glmCartPrice">$50.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartNumberBold">7</div>\r
+ <div class="glmCartPriceBold">$175.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartEvent -->\r
+ \r
+ <!-- glmCartEvent - Multiple Instances - An event at the venue for which tickets are in the cart -->\r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventName">Event #2 Name</div>\r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventDescr">(venue description text goes here)</div>\r
+ </div>\r
+\r
+ <!-- glmCartTickets - Container for all tickets for this event --> \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Quant</div>\r
+ <div class="glmCartText">Section</div>\r
+ <div class="glmCartText">Ticket</div>\r
+ <div class="glmCartText">Price Each</div>\r
+ <div class="glmCartText">Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber">5</div>\r
+ <div class="glmCartText">Section 1</div>\r
+ <div class="glmCartText">Type 1</div>\r
+ <div class="glmCartPrice">$25.00/each</div>\r
+ <div class="glmCartPrice">$125.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber">2</div>\r
+ <div class="glmCartText">Section 2</div>\r
+ <div class="glmCartText">Type 2</div>\r
+ <div class="glmCartPrice">$25.00</div>\r
+ <div class="glmCartPrice">$50.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartNumberBold">7</div>\r
+ <div class="glmCartPriceBold">$175.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartEvent -->\r
+ \r
+ </div> <!-- glmCartEvents -->\r
+ \r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+ <div class="glmCartVenueTotal">\r
+ \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Tickets</div>\r
+ <div class="glmCartText">Venue Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartTextBold">19</div>\r
+ <div class="glmCartPriceBold">$250.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartVenueTotal -->\r
+\r
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->\r
+ <div class="glmCartPayment">\r
+\r
+ <div class="glmCartPaymentTitle">Payment for Venue #1 Name</div>\r
+ \r
+ <!-- glmCartForm - A container for a block of form input with prompts-->\r
+ <div class="glmCartForm">\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormPrompt">Card Type</div>\r
+ <div class="glmCartFormInput">\r
+ <select name="ccard">\r
+ <option value="1">American Express</option>\r
+ <option value="2">Discover</option>\r
+ <option value="3">Visa</option>\r
+ </select>\r
+ </div>\r
+ </div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="ccname"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card #</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="ccnumb"></div></div>\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormPrompt">Expiration</div>\r
+ <div class="glmCartFormInput">\r
+ Month <select name="ccexp_month">\r
+ <option value="1">1 - January</option>\r
+ <option value="1">2 - February</option>\r
+ <option value="1">3 - March</option>\r
+ </select> \r
+ Year <select name="ccexp_year">\r
+ <option value="2013">2013</option>\r
+ <option value="2014">2014</option>\r
+ <option value="2015">2015</option>\r
+ </select>\r
+ </div> \r
+ </div>\r
+ \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Security #</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="cccode"></div></div>\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormComment">\r
+ The Security # is the three or four digit number on the signature side of your credit card.\r
+ American Express cards may have this number on the front of the card.\r
+ </div>\r
+ </div> \r
+ </div> <!-- glmCartForm - Venue Payment -->\r
+ \r
+ </div> <!-- glmCartPayment -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ <!-- glmCartBlock - Contact information - Container for all general customer information -->\r
+ <div class="glmCartBlock">\r
+ <div class="glmCartBlockTitle">Contact Information</div>\r
+ \r
+ <!-- glmCartForm - A container for a block of form input with prompts-->\r
+ <div class="glmCartForm">\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">First Name</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="fname"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Last Name</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="lname"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Address</div><div class="glmCartFormInput"><input type="text" name="addr1"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput"><input type="text" name="addr2"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">City</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="city"></div></div>\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormPrompt">State</div>\r
+ <div class="glmCartFormInput">\r
+ <select name="state">\r
+ <option value="MI">Michigan</option>\r
+ <option value="OH">Ohio</option>\r
+ </select>\r
+ </div>\r
+ </div>\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormPrompt">Country</div>\r
+ <div class="glmCartFormInput">\r
+ <select name="state">\r
+ <option value="US">United State</option>\r
+ <option value="CA">Canada</option>\r
+ </select>\r
+ </div>\r
+ </div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">ZIP/Postal code</div><div class="glmCartFormInput"><input type="text" name="zip"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Phone</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="phone"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">E-Mail</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="email"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Verify E-Mail</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="email2"></div></div>\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormPrompt">OK to Sent E-Mail?</div>\r
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok"> Please send information on activities and offers.</div>\r
+ </div>\r
+ </div> <!-- glmCartForm -->\r
+ \r
+ </div> <!-- glmCartBlock - Contact information -->\r
+\r
+ <!-- glmCartBlock - A Venue -->\r
+ <div class="glmCartBlock">\r
+\r
+ <div class="glmCartBlockTitle">Venue #2 Name</div>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+ <div class="glmCartVenueInfo">\r
+ <div class="glmCartVenueDescr">(venue description text goes here)</div>\r
+ <img class="glmCartVenueImage" src="http://is0.gaslightmedia.com/demo/is2/is00-1228940281-46847.jpeg"> \r
+ </div>\r
+ \r
+ <!-- glmCartEvents - Container for all events selected for this venue -->\r
+ <div class="glmCartEvents">\r
+\r
+ <!-- glmCartEvent - Multiple Instances - An event at the venue for which tickets are in the cart -->\r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventName">Event #1 Name</div>\r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventDescr">(venue description text goes here)</div>\r
+ </div>\r
+\r
+ <!-- glmCartTickets - Container for all tickets for this event --> \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Quant</div>\r
+ <div class="glmCartText">Section</div>\r
+ <div class="glmCartText">Ticket</div>\r
+ <div class="glmCartText">Price Each</div>\r
+ <div class="glmCartText">Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber">5</div>\r
+ <div class="glmCartText">Section 1</div>\r
+ <div class="glmCartText">Type 1</div>\r
+ <div class="glmCartPrice">$25.00/each</div>\r
+ <div class="glmCartPrice">$125.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber">2</div>\r
+ <div class="glmCartText">Section 2</div>\r
+ <div class="glmCartText">Type 2</div>\r
+ <div class="glmCartPrice">$25.00</div>\r
+ <div class="glmCartPrice">$50.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartNumberBold">7</div>\r
+ <div class="glmCartPriceBold">$175.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartEvent -->\r
+ \r
+ <!-- glmCartEvent - Multiple Instances - An event at the venue for which tickets are in the cart -->\r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventName">Event #2 Name</div>\r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventDescr">(venue description text goes here)</div>\r
+ </div>\r
+\r
+ <!-- glmCartTickets - Container for all tickets for this event --> \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Quant</div>\r
+ <div class="glmCartText">Section</div>\r
+ <div class="glmCartText">Ticket</div>\r
+ <div class="glmCartText">Price Each</div>\r
+ <div class="glmCartText">Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber">5</div>\r
+ <div class="glmCartText">Section 1</div>\r
+ <div class="glmCartText">Type 1</div>\r
+ <div class="glmCartPrice">$25.00/each</div>\r
+ <div class="glmCartPrice">$125.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTicket">\r
+ <div class="glmCartNumber">2</div>\r
+ <div class="glmCartText">Section 2</div>\r
+ <div class="glmCartText">Type 2</div>\r
+ <div class="glmCartPrice">$25.00</div>\r
+ <div class="glmCartPrice">$50.00</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartNumberBold">7</div>\r
+ <div class="glmCartPriceBold">$175.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartEvent -->\r
+ \r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+ <div class="glmCartVenueTotal">\r
+ \r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Tickets</div>\r
+ <div class="glmCartText">Venue Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartTextBold">19</div>\r
+ <div class="glmCartPriceBold">$250.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+ \r
+ </div> <!-- glmCartVenueTotal -->\r
+ \r
+ </div>\r
+\r
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->\r
+ <div class="glmCartPayment">\r
+\r
+ <div class="glmCartPaymentTitle">Payment for Venue #2 Name</div>\r
+ \r
+ <!-- glmCartForm - A container for a block of form input with prompts-->\r
+ <div class="glmCartForm">\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormPrompt">Card Type</div>\r
+ <div class="glmCartFormInput">\r
+ <select name="ccard">\r
+ <option value="1">American Express</option>\r
+ <option value="2">Discover</option>\r
+ <option value="3">Visa</option>\r
+ </select>\r
+ </div>\r
+ </div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="ccname"></div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card #</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="ccnumb"></div></div>\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormPrompt">Expiration</div>\r
+ <div class="glmCartFormInput">\r
+ Month <select name="ccexp_month">\r
+ <option value="1">1 - January</option>\r
+ <option value="1">2 - February</option>\r
+ <option value="1">3 - March</option>\r
+ </select> \r
+ Year <select name="ccexp_year">\r
+ <option value="2013">2013</option>\r
+ <option value="2014">2014</option>\r
+ <option value="2015">2015</option>\r
+ </select>\r
+ </div> \r
+ </div>\r
+ \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Security #</div><div class="glmCartFormInput glmCartRequired"><input type="text" name="cccode"></div></div>\r
+ <div class="glmCartFormLine">\r
+ <div class="glmCartFormComment">\r
+ The Security # is the three or four digit number on the signature side of your credit card.\r
+ American Express cards may have this number on the front of the card.\r
+ </div>\r
+ </div> \r
+ </div> <!-- glmCartForm - Venue Payment -->\r
+ \r
+ </div> <!-- glmCartPayment -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ <!-- glmCartBlock - A Venue -->\r
+ <div class="glmCartBlock summary">\r
+\r
+ <div class="glmCartBlockTitle">Purchase Summary</div>\r
+\r
+ <div class="glmCartTable">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Venues</div>\r
+ <div class="glmCartText">Tickets</div>\r
+ <div class="glmCartText">Grand Total</div>\r
+ </div> <!-- / glmTicketType -->\r
+ <div class="glmCartTotal">\r
+ <div class="glmCartNumberBold">2</div>\r
+ <div class="glmCartTextBold">19</div>\r
+ <div class="glmCartPriceBold">$250.00</div>\r
+ </div>\r
+ </div> <!-- glmCartTable -->\r
+\r
+ </div> <!-- glmCartBlock -->\r
+\r
+ <!-- glmCartBlock - A Venue -->\r
+ <div class="glmCartBlock">\r
+ <div class="glmCartBlockTitle">Complete Purchase</div>\r
+ <div id="GLMpolicy">\r
+ (purchase and return policies go here)\r
+ </div>\r
+ <div id="GLMpurchase" class="glmActionButton">Purchase Selected Tickets</div>\r
+ </div>\r
+\r
+ </div>\r
+</div><!-- GLMcontent -->\r
+\r
+<!-- jQuery scripts for controlling page actions -->\r
+<script>\r
+\r
+ $(document).ready(function(){\r
+ \r
+ // Checkout action\r
+ $('#GLMpurchase').click(function() {\r
+ alert('Purchase action');\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media Content Area for Ticketing System - Preliminary Mock-Up\r
+ \r
+ Ticket Selection Page\r
+\r
+ This entire file is a sample of contents that will replace the {GLM} tag\r
+ in the HTML file provided by the customer that mimics their desired page\r
+ appearance.\r
+\r
+ This page provides...\r
+ \r
+ * Information about the Event\r
+ * Information about the Venue \r
+ * Selection of "Sections"\r
+ * Information about the various Ticket Types for the selected section\r
+ * Selection of desired Ticket Types and Quantities\r
+ * Add selection to cart \r
+ \r
+ Note that all IDs are "GLM..." and all Classes are "glm...".\r
+ \r
+ I have included comment fields describing each significant item on this page. \r
+ These comments will be removed before the site goes live. \r
+ \r
+ Images are samples we have on our Image Server. We can set the image size\r
+ pretty much as desired. \r
+ \r
+ Let me know if you're like the containers, IDs, or Classes organized differently. I\r
+ won't be actually implementing the front-end output templates for a bit yet, so\r
+ there's nothing here set in stone at this point. \r
+ \r
+ NOTE: Each of the "Section" areas start out hidden until the user clicks on \r
+ the "Select" object to "slide" that area open for display of tickets for that\r
+ section. If you don't want to use this and want to have them all open all the\r
+ time, you can comment out or delete the Slider action area in the jQuery code\r
+ at the bottom of the file. Please let me know if you decide you don't want\r
+ this and I'll remove it from my copy.\r
+\r
+ We can of course use other jQuery or related effects for displaying information.\r
+ This might include "fly-out" detail information. I'm not sure that will be necessary\r
+ for this page, but let me know if you're interested.\r
+\r
+ Please feel free to make changes to the HTML below for testing and let me know\r
+ if you would like those changes to be included on our end.\r
+\r
+ -->\r
+\r
+<!-- Script Links - These will be replaced with updated links for deployment -->\r
+<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>\r
+<script src="http://app.gaslightmedia.com/libjs/jqueryui/1.8.13/js/jquery-1.5.1.min.js"></script>\r
+<script src="http://app.gaslightmedia.com/libjs/jqueryui/1.8.13/js/jquery-ui-1.8.13.custom.min.js"></script>\r
+<link rel="stylesheet" href="https://app.gaslightmedia.com/libjs/jqueryui/1.8.13/css/smoothness/jquery-ui-1.8.13.custom.css">\r
+<link rel="stylesheet" href="css/main.css">\r
+\r
+\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+ <div id="GLMticketSelect">\r
+\r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <div id="GLMnavSelectEvent=" class="glmNavItem">Select another event</div> <!-- returns user to main site -->\r
+ <div id="GLMnavCart=" class="glmNavItem">Review selected tickets</div>\r
+ </div>\r
+\r
+ <!-- GLMevent - Container for all information regarding the event selected -->\r
+ <div id="GLMevent">\r
+ \r
+ <div id="GLMeventInfo">\r
+ <div id="GLMeventName">Event Name</div>\r
+ <div id="GLMeventDescr">\r
+ (event description text goes here - this might include some formatting from the ckeditor input)\r
+ </div>\r
+ </div>\r
+ \r
+ <div id="GLMeventDates">\r
+ <div class="glmPrompt">Select desired date:</div> \r
+ <div class="glmInputShort"><input type="text" id="GLMeventDate" name="ticket_date" value="06/27/2013"></div>\r
+ </div>\r
+ \r
+ </div> <!-- / GLMevent -->\r
+ \r
+ <!-- GLMvenue - Container for all information regarding the venue for the selected event -->\r
+ <div id="GLMvenue">\r
+ \r
+ <div id="GLMvenueInfo">\r
+ <div id="GLMvenueName">Venue Name</div>\r
+ <div id="GLMvenueDescr">(venue description text goes here)</div>\r
+\r
+ <img id="GLMvenueImage" src="http://is0.gaslightmedia.com/demo/is1/is00-1228940281-46847.jpeg">\r
+ \r
+ <!-- GLMvenueLocation - Container for venue location information -->\r
+ <div id="GLMvenueLocation">\r
+ (This area will contain address and optionally a Google map, parking information, etc.)\r
+ <img id="GLMvenueParking" src="http://is0.gaslightmedia.com/demo/is1/is04-1367779201-95830.gif">\r
+ </div>\r
+ \r
+ <div id="GLMvenueDetail">\r
+ (other detail might go here - things like credit cards accepted)\r
+ </div>\r
+ \r
+ </div> <!-- GLMvenueInfo -->\r
+ \r
+ <img id="GLMvenueSectionMap" src="http://is0.gaslightmedia.com/demo/tbs1/is49-1367778042-51074.jpeg">\r
+ \r
+ </div> <!-- / GLMvenue -->\r
+ \r
+ <!-- GLMsections - Container for all Section of Section and Tickets -->\r
+ <div id="GLMsections">\r
+ \r
+ <!-- glmSection - Multiple Instances - Container for information on this specific section and all related ticket info and selection-->\r
+ \r
+ <!-- Section #1 -->\r
+ <div class="glmSection">\r
+\r
+ <div class="glmSectionName">Section #1 Name</div>\r
+ <div class="glmSectionInfo">\r
+ (section information goes here)\r
+ </div>\r
+ \r
+ <!-- glmSectionSelector - This item is clicked by the user to select this section - action driven by jQuery -->\r
+ <div class="glmSectionSelector" sectionId="1">Select</div>\r
+ \r
+ <!-- glmSectionTickets - Container for all tickets for this section - id is for jQuery actions, not for styling -->\r
+ <div id="GLMsection_1" class="glmSectionTickets">\r
+ \r
+ <!-- glmTicketType - Multiple instances - Containers for all ticket types in this specific section - hidden till section is selected -->\r
+ \r
+ <!-- Ticket Type #1 -->\r
+ <div class="glmTicketType">\r
+ \r
+ <!-- GLMticketInfo - Container for the information about a specific ticket type -->\r
+ <div class="glmTicketName">Ticket Type #1 Name</div>\r
+ <div class="glmTicketDescr">\r
+ (ticket description and other info goes here) \r
+ </div> <!-- / glmTicketDescr -->\r
+ <!-- glmTicketSelect - Container for user selection of this ticket -->\r
+ <div class="glmTicketSelect">\r
+ <div class="glmTicketAvailable">50 seats available</div>\r
+ <div class="glmTicketPrice">$25.00/each</div>\r
+ <div class="glmTicketQuant"><input type="number" name="ticket_quant" class="glmQuantInput"></div>\r
+ </div> <!-- / GLMticketSelect -->\r
+ \r
+ </div> <!-- / glmTicketType -->\r
+ \r
+ <!-- Ticket Type #2 -->\r
+ <div class="glmTicketType">\r
+ \r
+ <!-- GLMticketInfo - Container for the information about a specific ticket type -->\r
+ <div class="glmTicketName">Ticket Type #2 Name</div>\r
+ <div class="glmTicketDescr">\r
+ (ticket description and other info goes here) \r
+ </div> <!-- / glmTicketDescr -->\r
+ <!-- glmTicketSelect - Container for user selection of this ticket -->\r
+ <div class="glmTicketSelect">\r
+ <div class="glmTicketAvailable">50 seats available</div>\r
+ <div class="glmTicketPrice">$25.00/each</div>\r
+ <div class="glmTicketQuant"><input type="number" name="ticket_quant" class="glmQuantInput"></div>\r
+ </div> <!-- / GLMticketSelect -->\r
+ \r
+ </div> <!-- / glmTicketType -->\r
+ \r
+ <!-- Ticket Type #3 -->\r
+ <div class="glmTicketType">\r
+ \r
+ <!-- GLMticketInfo - Container for the information about a specific ticket type -->\r
+ <div class="glmTicketName">Ticket Type #3 Name</div>\r
+ <div class="glmTicketDescr">\r
+ (ticket description and other info goes here) \r
+ </div> <!-- / glmTicketDescr -->\r
+ <!-- glmTicketSelect - Container for user selection of this ticket -->\r
+ <div class="glmTicketSelect">\r
+ <div class="glmTicketAvailable">50 seats available</div>\r
+ <div class="glmTicketPrice">$25.00/each</div>\r
+ <div class="glmTicketQuant"><input type="number" name="ticket_quant" class="glmQuantInput"></div>\r
+ </div> <!-- / GLMticketSelect -->\r
+ \r
+ </div> <!-- / glmTicketType -->\r
+\r
+ </div> <!-- / GLMsection_1 -->\r
+ \r
+ </div> <!-- / glmSection -->\r
+\r
+ <!-- Section #2 -->\r
+ <div class="glmSection">\r
+\r
+ <div class="glmSectionName">Section #2 Name</div>\r
+ <div class="glmSectionInfo">\r
+ (section information goes here)\r
+ </div>\r
+ \r
+ <!-- glmSectionSelector - This item is clicked by the user to select this section - action driven by jQuery -->\r
+ <div class="glmSectionSelector" sectionId="2">Select</div>\r
+ \r
+ <!-- glmSectionTickets - Container for all tickets for this section - id is for jQuery actions, not for styling -->\r
+ <div id="GLMsection_2" class="glmSectionTickets">\r
+ \r
+ <!-- glmTicketType - Multiple instances - Containers for all ticket types in this specific section - hidden till section is selected -->\r
+ \r
+ <!-- Ticket Type #1 -->\r
+ <div class="glmTicketType">\r
+ \r
+ <!-- GLMticketInfo - Container for the information about a specific ticket type -->\r
+ <div class="glmTicketName">Ticket Type #1 Name</div>\r
+ <div class="glmTicketDescr">\r
+ (ticket description and other info goes here) \r
+ </div> <!-- / glmTicketDescr -->\r
+ <!-- glmTicketSelect - Container for user selection of this ticket -->\r
+ <div class="glmTicketSelect">\r
+ <div class="glmTicketAvailable">50 seats available</div>\r
+ <div class="glmTicketPrice">$25.00/each</div>\r
+ <div class="glmTicketQuant"><input type="number" name="ticket_quant" class="glmQuantInput"></div>\r
+ </div> <!-- / GLMticketSelect -->\r
+ \r
+ </div> <!-- / glmTicketType -->\r
+ \r
+ <!-- Ticket Type #2 -->\r
+ <div class="glmTicketType">\r
+ \r
+ <!-- GLMticketInfo - Container for the information about a specific ticket type -->\r
+ <div class="glmTicketName">Ticket Type #2 Name</div>\r
+ <div class="glmTicketDescr">\r
+ (ticket description and other info goes here) \r
+ </div> <!-- / glmTicketDescr -->\r
+ <!-- glmTicketSelect - Container for user selection of this ticket -->\r
+ <div class="glmTicketSelect">\r
+ <div class="glmTicketAvailable">50 seats available</div>\r
+ <div class="glmTicketPrice">$25.00/each</div>\r
+ <div class="glmTicketQuant"><input type="number" name="ticket_quant" class="glmQuantInput"></div>\r
+ </div> <!-- / GLMticketSelect -->\r
+ \r
+ </div> <!-- / glmTicketType -->\r
+ \r
+ <!-- Ticket Type #3 -->\r
+ <div class="glmTicketType">\r
+ \r
+ <!-- GLMticketInfo - Container for the information about a specific ticket type -->\r
+ <div class="glmTicketName">Ticket Type #3 Name</div>\r
+ <div class="glmTicketDescr">\r
+ (ticket description and other info goes here) \r
+ </div> <!-- / glmTicketDescr -->\r
+ <!-- glmTicketSelect - Container for user selection of this ticket -->\r
+ <div class="glmTicketSelect">\r
+ <div class="glmTicketAvailable">50 seats available</div>\r
+ <div class="glmTicketPrice">$25.00/each</div>\r
+ <div class="glmTicketQuant"><input type="number" name="ticket_quant" class="glmQuantInput"></div>\r
+ </div> <!-- / GLMticketSelect -->\r
+ \r
+ </div> <!-- / glmTicketType -->\r
+\r
+ </div> <!-- / GLMsection_2 -->\r
+ \r
+ </div> <!-- / glmSection -->\r
+ \r
+ <!-- GLMticketsSummary - Container for summary of tickets selected on this page -->\r
+ <div id="GLMticketsSummary">(total number of tickets and total costs go here)</div> <!-- / GLMticketSummary -->\r
+\r
+ <!-- GLMticketsAdd -->\r
+ \r
+ </div> <!-- / GLMsections -->\r
+ \r
+ <div id="GLMpolicy">(purchase and return policies go here)</div>\r
+ \r
+ <div id="GLMaddToCart">Add to Cart</div>\r
+\r
+\r
+ </div>\r
+</div><!-- GLMcontent -->\r
+\r
+<!-- jQuery scripts for controlling page actions -->\r
+<script>\r
+\r
+ $(document).ready(function(){ \r
+\r
+ // Slider action for Section selection\r
+ $('.glmSectionSelector').click(function() {\r
+ \r
+ $('.glmSectionTickets').slideUp('slow'); // Remove if you want multiple sections open at a time\r
+ \r
+ var sectionId = $(this).attr('sectionId');\r
+ \r
+ if ($('#GLMsection_' + sectionId).is(':visible')) {\r
+ $('#GLMsection_' + sectionId).slideUp('slow');\r
+ } else {\r
+ $('#GLMsection_' + sectionId).slideDown('slow');\r
+ }\r
+\r
+ });\r
+ $('.glmSectionTickets').hide();\r
+ \r
+ // Add to cart action\r
+ $('#GLMaddToCart').click(function() {\r
+ alert('Add to Cart Action');\r
+ });\r
+\r
+ // DatePicker action\r
+ var availDates = [\r
+ "0000","06/20/2013","06/21/2013","06/22/2013","06/23/2013","06/27/2013","06/28/2013","06/29/2013","06/30/2013",\r
+ "07/02/2013","07/03/2013","07/04/2013","07/05/2013","07/06/2013"\r
+ ];\r
+ function avail(date) {\r
+ m = (date.getMonth()+1);\r
+ if (m < 10) {\r
+ m = '0' + m;\r
+ }\r
+ d = date.getDate();\r
+ if (d < 10) {\r
+ d = '0' + d;\r
+ }\r
+ y = date.getFullYear();\r
+ mdy = m + '/' + d + '/' + y;\r
+ if ($.inArray(mdy, availDates)!=-1) {\r
+ return [true,"","Available"];\r
+ } else {\r
+ return [false,"","Not Available"];\r
+ }\r
+ }\r
+ $("#GLMeventDate").datepicker({ beforeShowDay: avail });\r
+ $("#GLMeventDate").datepicker('option', 'minDate', '06/01/2013');\r
+ $("#GLMeventDate").datepicker('option', 'maxDate', '07/31/2013');\r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+@import
+ url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:200,400,600,900,400italic)
+ ; /* normalize.css v1.1.1 | MIT License | git.io/normalize */
+article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary
+ {
+ display: block
+}
+
+audio,canvas,video {
+ display: inline-block;
+ *display: inline;
+ *zoom: 1
+}
+
+audio:not ([controls] ){
+ display: none;
+ height: 0
+}
+
+[hidden] {
+ display: none
+}
+
+html {
+ background: #fff;
+ color: #000;
+ font-size: 100%;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%
+}
+
+html,button,input,select,textarea {
+ font-family: sans-serif
+}
+
+body {
+ margin: 0
+}
+
+a:focus {
+ outline: thin dotted
+}
+
+a:active,a:hover {
+ outline: 0
+}
+
+h1 {
+ font-size: 2em;
+ margin: 0.67em 0
+}
+
+h2 {
+ font-size: 1.5em;
+ margin: 0.83em 0
+}
+
+h3 {
+ font-size: 1.17em;
+ margin: 1em 0
+}
+
+h4 {
+ font-size: 1em;
+ margin: 1.33em 0
+}
+
+h5 {
+ font-size: 0.83em;
+ margin: 1.67em 0
+}
+
+h6 {
+ font-size: 0.67em;
+ margin: 2.33em 0
+}
+
+abbr[title] {
+ border-bottom: 1px dotted
+}
+
+b,strong {
+ font-weight: bold
+}
+
+blockquote {
+ margin: 1em 40px
+}
+
+dfn {
+ font-style: italic
+}
+
+hr {
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ height: 0
+}
+
+mark {
+ background: #ff0;
+ color: #000
+}
+
+p,pre {
+ margin: 1em 0
+}
+
+code,kbd,pre,samp {
+ font-family: monospace, serif;
+ _font-family: "courier new", monospace;
+ font-size: 1em
+}
+
+pre {
+ white-space: pre;
+ white-space: pre-wrap;
+ word-wrap: break-word
+}
+
+q {
+ quotes: none
+}
+
+q:before,q:after {
+ content: '';
+ content: none
+}
+
+small {
+ font-size: 80%
+}
+
+sub,sup {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline
+}
+
+sup {
+ top: -0.5em
+}
+
+sub {
+ bottom: -0.25em
+}
+
+dl,menu,ol,ul {
+ margin: 1em 0
+}
+
+dd {
+ margin: 0 0 0 40px
+}
+
+menu,ol,ul {
+ padding: 0 0 0 40px
+}
+
+nav ul,nav ol {
+ list-style: none;
+ list-style-image: none
+}
+
+img {
+ border: 0;
+ -ms-interpolation-mode: bicubic
+}
+
+svg:not (:root ){
+ overflow: hidden
+}
+
+figure {
+ margin: 0
+}
+
+form {
+ margin: 0
+}
+
+fieldset {
+ border: 1px solid silver;
+ margin: 0 2px;
+ padding: 0.35em 0.625em 0.75em
+}
+
+legend {
+ border: 0;
+ padding: 0;
+ white-space: normal;
+ *margin-left: -7px
+}
+
+button,input,select,textarea {
+ font-size: 100%;
+ margin: 0;
+ vertical-align: baseline;
+ *vertical-align: middle
+}
+
+button,input {
+ line-height: normal
+}
+
+button,select {
+ text-transform: none
+}
+
+button,html input[type="button"],input[type="reset"],input[type="submit"]
+ {
+ -webkit-appearance: button;
+ cursor: pointer;
+ *overflow: visible
+}
+
+button[disabled],html input[disabled] {
+ cursor: default
+}
+
+input[type="checkbox"],input[type="radio"] {
+ box-sizing: border-box;
+ padding: 0;
+ *height: 13px;
+ *width: 13px
+}
+
+input[type="search"] {
+ -webkit-appearance: textfield;
+ -moz-box-sizing: content-box;
+ -webkit-box-sizing: content-box;
+ box-sizing: content-box
+}
+
+input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration
+ {
+ -webkit-appearance: none
+}
+
+button::-moz-focus-inner,input::-moz-focus-inner {
+ border: 0;
+ padding: 0
+}
+
+textarea {
+ overflow: auto;
+ vertical-align: top
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0
+}
+
+html {
+ -webkit-font-smoothing: antialiased
+}
+
+body {
+ font-family: "Source Sans Pro", sans-serif;
+ color: #3d3d3d;
+ font-style: normal;
+ line-height: 120%
+}
+
+#GLMpageTitle {
+ font-size: 1.2em;
+ font-weight: 600;
+ line-height: 125%
+}
+
+#GLMpageIntro {
+ font-size: 0.8em;
+ margin: 0 0 0.6em 0
+}
+
+.glmSection .glmsectionName {
+ margin: 0
+}
+
+#GLMeventName,#GLMvenueName,.glmCartBlockTitle,.glmCartEventName,.glmCartPaymentTitle
+ {
+ font-size: 1.6em;
+ font-weight: 600;
+ line-height: 125%
+}
+
+.glmsectionName {
+ font-size: 1.45em;
+ font-weight: 600;
+ margin: 30px 0 0 0
+}
+
+#GLMeventDescr,#GLMvenueDescr,.glmCartVenueDescr,.glmCartEventDescr {
+ font-size: 0.8em;
+ margin: 0 0 0.75em 0
+}
+
+.glmCartVenueDescr,.glmCartEventDescr {
+ margin: 0 0 15px 0
+}
+
+.glmCartHeader:after,.glmCartTicket:after,.glmCartTotal:after {
+ content: "";
+ display: table;
+ clear: both
+}
+
+.glmCartHeader>* {
+ float: left;
+ width: 20%;
+ font-weight: 600
+}
+
+.glmCartHeader>*:last-child {
+ text-align: right
+}
+
+.glmCartTicket>* {
+ width: 20%;
+ float: left
+}
+
+.glmCartTicket>*:last-child {
+ text-align: right
+}
+
+.glmCartTotal>* {
+ width: 50%;
+ float: left
+}
+
+.glmCartTotal>*:last-child {
+ text-align: right
+}
+
+.summary .glmCartTotal>*,.summary .glmCartHeader>* {
+ width: 33.3333%
+}
+
+.glmCartFormInput label {
+ display: inline-block
+}
+
+.glmCartEvent .glmCartTotal {
+ background: #f5f5f5;
+ margin-top: 7px;
+ padding: 7px 0;
+ border-top: 1px solid #e3e3e3
+}
+
+.glmCartVenueTotal .glmCartHeader>*,.glmCartVenueTotal .glmCartTotal>* {
+ width: 50%;
+ font-size: 1.25em;
+ text-align: center
+}
+
+.glmCartVenueTotal .glmCartTotal>* {
+ float: left
+}
+
+.glmCartTotal {
+ margin: 8px 0 0 0;
+ font-weight: 200;
+ font-size: 1.75em
+}
+
+.glmCartBlock>.glmCartBlockTitle {
+ margin: 0
+}
+
+@media screen and (max-width: 480px) {
+ .glmCartTable {
+ font-size: 80%
+ }
+}
+
+* {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box
+}
+
+img {
+ max-width: 100%;
+ height: auto;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px
+}
+
+#GLMcontent {
+ padding: 0;
+ max-width: 500px;
+ margin: 0 auto
+}
+
+#GLMcontent>* {
+ padding: 0 15px
+}
+
+#GLMcontent>*.glmCartBlock {
+ padding: 0 15px 15px 15px
+}
+
+#GLMevent,#GLMvenue {
+ max-width: 500px;
+ margin: 0 auto 1em auto
+}
+
+#GLMnavigation,#GLMaddToCart {
+ margin: 0 0 15px 0;
+ padding: 0;
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ text-align: center;
+ font-weight: 600;
+ font-shadow: 0 1px #fff;
+ font-size: 0.85em;
+ background: #fcfcfc;
+ -webkit-background-clip: padding;
+ -moz-background-clip: padding;
+ background-clip: padding-box
+}
+
+#GLMnavigation:after,#GLMaddToCart:after {
+ content: "";
+ display: table;
+ clear: both
+}
+
+.glmNavItem {
+ float: left;
+ padding: 10px;
+ margin: 0;
+ width: 50%;
+ border-left: 1px solid #e3e3e3
+}
+
+.glmNavItem:first-of-type {
+ border-left: none
+}
+
+#GLMcheckout .glmNavItem,#GLMticketCart .glmNavItem {
+ width: 33.3333%
+}
+
+.glmCartTable input[type="number"] {
+ width: 80%
+}
+
+#GLMeventDates,#GLMvenueLocation,#GLMvenueDetail,#GLMvenueSectionMap {
+ margin: 0 0 15px 0
+}
+
+.glmPrompt {
+ font-weight: 600;
+ font-size: 1.1em
+}
+
+.glmCartFormLine {
+ margin: 0 0 10px 0
+}
+
+.glmCartFormLine input {
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ -ms-border-radius: 3px;
+ -o-border-radius: 3px;
+ border-radius: 3px
+}
+
+.glmCartFormPrompt {
+ font-weight: 600;
+ font-size: 1.1em
+}
+
+.glmTicketType,.glmCartForm,.glmCartEvent,.glmCartBlock,#GLMvenue,.glmSection,#GLMevent,#GLMvenueLocation
+ {
+ margin: 0 0 15px 0;
+ padding: 15px;
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ -webkit-box-shadow: 0 2px #f2f2f2;
+ -moz-box-shadow: 0 2px #f2f2f2;
+ box-shadow: 0 2px #f2f2f2
+}
+
+.glmTicketType img,.glmCartForm img,.glmCartEvent img,.glmCartBlock img,#GLMvenue img,.glmSection img,#GLMevent img,#GLMvenueLocation img
+ {
+ width: 100%;
+ margin: 0 0 15px 0
+}
+
+.glmTicketDescr {
+ font-size: 0.85em
+}
+
+.glmTicketAvailable {
+ margin: 5px 0;
+ font-weight: 600
+}
+
+.glmSectionTickets {
+ margin: 15px 0
+}
+
+.glmTicketName {
+ font-size: 1.35em;
+ font-weight: 600
+}
+
+.glmSectionSelector {
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ cursor: pointer;
+ background-color: #f8f8f8;
+ padding: 8px 15px;
+ margin: 5px 0;
+ font-size: 1.15em;
+ font-weight: 600;
+ display: inline-block;
+ font-shadow: 0 1px #fff
+}
+
+.glmSectionSelector:active {
+ -webkit-box-shadow: inset 0 0 8px #dbdbdb;
+ -moz-box-shadow: inset 0 0 8px #dbdbdb;
+ box-shadow: inset 0 0 8px #dbdbdb
+}
+
+#GLMticketsSummary {
+ font-weight: 600;
+ font-size: 1.35em;
+ margin-top: 30px
+}
+
+#GLMpolicy {
+ font-size: 0.85em;
+ font-style: italic
+}
+
+.glmTicketPrice {
+ font-weight: 600;
+ margin: 15px 0 5px 0;
+ font-size: 1.25em
+}
+
+.glmCartForm {
+ margin: 10px 0 0
+}
+
+.glmCartPayment {
+ margin: 45px 0 0 0
+}
+
+input {
+ width: 100%;
+ padding: 5px 7px;
+ outline: none;
+ font-weight: 600;
+ font-size: 1em;
+ font-family: "Source Sans Pro", sans-serif;
+ color: #3d3d3d;
+ background: #fafafa;
+ border: 1px solid #d4d4d4;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ -ms-border-radius: 3px;
+ -o-border-radius: 3px;
+ border-radius: 3px
+}
+
+#GLMaddToCart,#GLMpurchase,#GLMcheckoutBtn {
+ padding: 15px;
+ margin: 15px 0 0 0;
+ color: white;
+ font-size: 1.5em;
+ text-shadow: 0 1px #4cae3c;
+ text-align: center;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ border: 1px solid #4cae3c;
+ -webkit-background-clip: padding;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+ background-color: #6ace3a;
+ -webkit-box-shadow: 0 1px 4px rgba(16, 16, 17, 0.08), inset 0 1px 0
+ rgba(255, 255, 255, 0.45);
+ -moz-box-shadow: 0 1px 4px rgba(16, 16, 17, 0.08), inset 0 1px 0
+ rgba(255, 255, 255, 0.45);
+ box-shadow: 0 1px 4px rgba(16, 16, 17, 0.08), inset 0 1px 0
+ rgba(255, 255, 255, 0.45);
+ cursor: pointer
+}
+
+#GLMaddToCart:active,#GLMpurchase:active,#GLMcheckoutBtn:active {
+ border: 1px solid #39942a;
+ background-color: #4eb61b;
+ -webkit-box-shadow: 0 1px 4px rgba(16, 16, 17, 0.08), inset 0 0 15px
+ rgba(0, 0, 0, 0.3);
+ -moz-box-shadow: 0 1px 4px rgba(16, 16, 17, 0.08), inset 0 0 15px
+ rgba(0, 0, 0, 0.3);
+ box-shadow: 0 1px 4px rgba(16, 16, 17, 0.08), inset 0 0 15px
+ rgba(0, 0, 0, 0.3)
+}
+
+body {
+ -webkit-animation-fill-mode: both;
+ -moz-animation-fill-mode: both;
+ -ms-animation-fill-mode: both;
+ -o-animation-fill-mode: both;
+ animation-fill-mode: both;
+ -webkit-animation-duration: 1s;
+ -moz-animation-duration: 1s;
+ -ms-animation-duration: 1s;
+ -o-animation-duration: 1s;
+ animation-duration: 1s
+}
+
+@
+-webkit-keyframes fadeIn { 0%{
+ opacity: 0
+}
+
+100%{
+opacity
+:
+1
+}
+}
+@
+-moz-keyframes fadeIn { 0%{
+ opacity: 0
+}
+
+100%{
+opacity
+:
+1
+}
+}
+@
+-o-keyframes fadeIn { 0%{
+ opacity: 0
+}
+
+100%{
+opacity
+:
+1
+}
+}
+@
+keyframes fadeIn { 0%{
+ opacity: 0
+}
+
+100%{
+opacity
+:
+1
+}
+}
+body {
+ -webkit-animation-name: fadeIn;
+ -moz-animation-name: fadeIn;
+ -o-animation-name: fadeIn;
+ animation-name: fadeIn
+}
+
+@media screen and (max-width: 480px) {
+ #GLMcontent {
+ height: 300px;
+ overflow: auto
+ }
+}
\ No newline at end of file
--- /dev/null
+Sites using this common application\r
+-----------------------------------\r
+\r
+Last updated: 06/12/18\r
+\r
+Site Version Server Database DB Server web/custom directory\r
+--------------------------------------- ------- ------- ----------------------- ----------- --------------------------\r
+tickets.gaslightmedia.com V3 WS6 gaslight_tickets DS4\r
+tickets.michiganmaritimemuseum.org V3 WS6 mmm_tickets DS4 \r
+www.mackinacferry.com V3 WS6 mackinacferry DS4\r
+www.saultstemarie.com V3 WS6 saultstemarie DS4\r
+www.soolocks.com V3 WS6 soolocks DS4\r
+\r
--- /dev/null
+<?php\r
+/*\r
+ * EasyPasswordGenerator.class.php - v1.0.0.20060621\r
+ *\r
+ * Copyright (c) 2006 Shane Kretzmann <Shane@uberdragon.net>\r
+ * Released under the terms of the GNU General Public License\r
+ * Based in part on Script released by: Jochen Kupperschmidt\r
+ *\r
+ * This is a highly modified version of this password generator for this application only.\r
+ * For original code please refer to original author.\r
+ */\r
+\r
+\r
+class EasyPassword\r
+{\r
+\r
+ // Get a random dictionary word from a text file\r
+ function dictionaryWord() {\r
+ $path = 'EasyPassword.words';\r
+ $fileload = @file($path);\r
+ $i = count($fileload)-1;\r
+ $random = rtrim($fileload[rand(0,$i)]);\r
+ return $random;\r
+ }\r
+\r
+ // This is the function to produce the password\r
+ function generateEasyPassword()\r
+ {\r
+ $word1 = $this->dictionaryWord();\r
+ $numb = rand(1, 9); // Generate specified amount of numbers\r
+ $word2 = $this->dictionaryWord();\r
+\r
+ $keys = array ($word1,$numb,$word2); // Place password components in an array\r
+ $rand_keys = array_rand($keys,3); // Randomize the 3 password components\r
+ return $keys[$rand_keys[0]].$keys[$rand_keys[1]].$keys[$rand_keys[2]]; // Return the resulting password\r
+ }\r
+\r
+\r
+}\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+able\r
+ABLE\r
+about\r
+account\r
+acid\r
+across\r
+act\r
+addition\r
+after\r
+again\r
+against\r
+agreement\r
+air\r
+all\r
+almost\r
+among\r
+amount\r
+amusement\r
+and\r
+angle\r
+angry\r
+animal\r
+answer\r
+ant\r
+any\r
+apparatus\r
+apple\r
+approval\r
+arch\r
+argument\r
+arm\r
+army\r
+art\r
+as\r
+at\r
+attack\r
+attempt\r
+attention\r
+authority\r
+automatic\r
+awake\r
+baby\r
+back\r
+bad\r
+bag\r
+balance\r
+ball\r
+band\r
+base\r
+basin\r
+basket\r
+bath\r
+be\r
+beautiful\r
+because\r
+bed\r
+bee\r
+before\r
+behaviour\r
+belief\r
+bell\r
+bent\r
+berry\r
+between\r
+bird\r
+birth\r
+bit\r
+black\r
+blade\r
+blood\r
+blow\r
+blue\r
+board\r
+boat\r
+body\r
+boiling\r
+book\r
+boot\r
+bottle\r
+box\r
+boy\r
+brain\r
+brake\r
+branch\r
+brass\r
+bread\r
+breath\r
+brick\r
+bridge\r
+bright\r
+broken\r
+brother\r
+brown\r
+brush\r
+bucket\r
+building\r
+bulb\r
+burn\r
+burst\r
+business\r
+butter\r
+button\r
+by\r
+cake\r
+camera\r
+canvas\r
+card\r
+care\r
+carriage\r
+cart\r
+cat\r
+cause\r
+certain\r
+chain\r
+chalk\r
+chance\r
+change\r
+cheap\r
+cheese\r
+chemical\r
+chest\r
+chief\r
+chin\r
+church\r
+circle\r
+clean\r
+clear\r
+clock\r
+cloth\r
+cloud\r
+coal\r
+coat\r
+cold\r
+collar\r
+colour\r
+comb\r
+come\r
+comfort\r
+committee\r
+common\r
+company\r
+comparison\r
+complete\r
+complex\r
+condition\r
+connection\r
+conscious\r
+control\r
+cook\r
+copper\r
+copy\r
+cord\r
+cork\r
+cotton\r
+cough\r
+country\r
+cover\r
+cow\r
+crack\r
+credit\r
+crime\r
+cruel\r
+crush\r
+cry\r
+cup\r
+cup\r
+current\r
+curtain\r
+curve\r
+cushion\r
+damage\r
+danger\r
+dark\r
+daughter\r
+day\r
+dead\r
+dear\r
+death\r
+debt\r
+decision\r
+deep\r
+degree\r
+delicate\r
+dependent\r
+design\r
+desire\r
+destruction\r
+detail\r
+development\r
+different\r
+digestion\r
+direction\r
+dirty\r
+discovery\r
+discussion\r
+disease\r
+disgust\r
+distance\r
+division\r
+do\r
+dog\r
+door\r
+doubt\r
+down\r
+drain\r
+drawer\r
+dress\r
+drink\r
+driving\r
+drop\r
+dry\r
+dust\r
+ear\r
+early\r
+earth\r
+east\r
+edge\r
+education\r
+effect\r
+egg\r
+elastic\r
+electric\r
+end\r
+engine\r
+enough\r
+equal\r
+error\r
+even\r
+event\r
+ever\r
+every\r
+example\r
+exchange\r
+existence\r
+expansion\r
+experience\r
+expert\r
+eye\r
+face\r
+fact\r
+fall\r
+false\r
+family\r
+far\r
+farm\r
+fat\r
+father\r
+fear\r
+feather\r
+feeble\r
+feeling\r
+female\r
+fertile\r
+fiction\r
+field\r
+fight\r
+finger\r
+fire\r
+first\r
+fish\r
+fixed\r
+flag\r
+flame\r
+flat\r
+flight\r
+floor\r
+flower\r
+fly\r
+fold\r
+food\r
+foolish\r
+foot\r
+for\r
+force\r
+fork\r
+form\r
+forward\r
+fowl\r
+frame\r
+free\r
+frequent\r
+friend\r
+from\r
+front\r
+fruit\r
+full\r
+future\r
+garden\r
+general\r
+get\r
+girl\r
+give\r
+glass\r
+glove\r
+go\r
+goat\r
+gold\r
+good\r
+government\r
+grain\r
+grass\r
+great\r
+green\r
+grey\r
+grip\r
+group\r
+growth\r
+guide\r
+gun\r
+hair\r
+hammer\r
+hand\r
+hanging\r
+happy\r
+harbour\r
+hard\r
+harmony\r
+hat\r
+hate\r
+have\r
+he\r
+healthy\r
+hear\r
+hearing\r
+heart\r
+heat\r
+help\r
+high\r
+history\r
+hole\r
+hollow\r
+hook\r
+hope\r
+horn\r
+horse\r
+hospital\r
+hour\r
+house\r
+how\r
+humour\r
+ice\r
+idea\r
+if\r
+ill\r
+important\r
+impulse\r
+in\r
+increase\r
+industry\r
+ink\r
+insect\r
+instrument\r
+insurance\r
+interest\r
+invention\r
+iron\r
+island\r
+jelly\r
+jewel\r
+join\r
+journey\r
+judge\r
+jump\r
+keep\r
+kettle\r
+key\r
+kick\r
+kind\r
+kiss\r
+knee\r
+knife\r
+knot\r
+knowledge\r
+land\r
+language\r
+last\r
+late\r
+laugh\r
+law\r
+lead\r
+leaf\r
+learning\r
+left\r
+leg\r
+let\r
+letter\r
+level\r
+library\r
+lift\r
+light\r
+like\r
+limit\r
+line\r
+linen\r
+lip\r
+liquid\r
+list\r
+little\r
+living\r
+lock\r
+long\r
+look\r
+loose\r
+loss\r
+loud\r
+love\r
+low\r
+machine\r
+make\r
+male\r
+man\r
+manager\r
+map\r
+mark\r
+market\r
+married\r
+mass\r
+match\r
+material\r
+may\r
+meal\r
+measure\r
+meat\r
+medical\r
+meeting\r
+memory\r
+metal\r
+middle\r
+military\r
+milk\r
+mind\r
+mine\r
+minute\r
+mist\r
+mixed\r
+money\r
+monkey\r
+month\r
+moon\r
+morning\r
+mother\r
+motion\r
+mountain\r
+mouth\r
+move\r
+much\r
+muscle\r
+music\r
+nail\r
+name\r
+narrow\r
+nation\r
+natural\r
+near\r
+necessary\r
+neck\r
+need\r
+needle\r
+nerve\r
+net\r
+new\r
+news\r
+night\r
+no\r
+noise\r
+normal\r
+north\r
+nose\r
+not\r
+note\r
+now\r
+number\r
+nut\r
+of\r
+off\r
+offer\r
+office\r
+oil\r
+old\r
+on\r
+only\r
+open\r
+operation\r
+opinion\r
+opposite\r
+or\r
+orange\r
+order\r
+ornament\r
+other\r
+out\r
+oven\r
+over\r
+owner\r
+page\r
+pain\r
+paint\r
+paper\r
+parallel\r
+parcel\r
+part\r
+past\r
+paste\r
+payment\r
+peace\r
+pen\r
+pencil\r
+person\r
+physical\r
+picture\r
+pig\r
+pin\r
+pipe\r
+place\r
+plane\r
+plant\r
+plate\r
+play\r
+please\r
+pleasure\r
+plough\r
+pocket\r
+point\r
+poison\r
+polish\r
+political\r
+poor\r
+porter\r
+position\r
+possible\r
+pot\r
+potato\r
+powder\r
+power\r
+present\r
+price\r
+print\r
+prison\r
+private\r
+probable\r
+process\r
+produce\r
+profit\r
+property\r
+prose\r
+protest\r
+public\r
+pull\r
+pump\r
+purpose\r
+push\r
+put\r
+quality\r
+question\r
+quick\r
+quiet\r
+quite\r
+rail\r
+rain\r
+range\r
+rat\r
+rate\r
+ray\r
+reaction\r
+reading\r
+ready\r
+reason\r
+receipt\r
+record\r
+red\r
+regret\r
+regular\r
+relation\r
+request\r
+respect\r
+rest\r
+reward\r
+rhythm\r
+rice\r
+right\r
+ring\r
+river\r
+road\r
+rod\r
+roll\r
+roof\r
+room\r
+root\r
+rough\r
+round\r
+rub\r
+rule\r
+run\r
+safe\r
+sail\r
+salt\r
+same\r
+sand\r
+say\r
+scale\r
+school\r
+science\r
+scissors\r
+screw\r
+sea\r
+seat\r
+second\r
+secret\r
+see\r
+seed\r
+seem\r
+self\r
+send\r
+sense\r
+separate\r
+serious\r
+servant\r
+sex\r
+shade\r
+shake\r
+shame\r
+sharp\r
+sheep\r
+shelf\r
+ship\r
+shirt\r
+shock\r
+shoe\r
+short\r
+shut\r
+side\r
+sign\r
+silk\r
+silver\r
+simple\r
+sister\r
+size\r
+skin\r
+skirt\r
+sky\r
+sleep\r
+slip\r
+slope\r
+slow\r
+small\r
+smash\r
+smell\r
+smile\r
+smoke\r
+smooth\r
+snake\r
+sneeze\r
+snow\r
+so\r
+soap\r
+society\r
+sock\r
+soft\r
+solid\r
+some\r
+\r
+son\r
+song\r
+sort\r
+sound\r
+soup\r
+south\r
+space\r
+spade\r
+special\r
+sponge\r
+spoon\r
+spring\r
+square\r
+stage\r
+stamp\r
+star\r
+start\r
+statement\r
+station\r
+steam\r
+steel\r
+stem\r
+step\r
+stick\r
+sticky\r
+stiff\r
+still\r
+stitch\r
+stocking\r
+stomach\r
+stone\r
+stop\r
+store\r
+story\r
+straight\r
+strange\r
+street\r
+stretch\r
+strong\r
+structure\r
+such\r
+sudden\r
+sugar\r
+summer\r
+sun\r
+support\r
+surprise\r
+sweet\r
+swim\r
+system\r
+table\r
+tail\r
+take\r
+talk\r
+tall\r
+taste\r
+tax\r
+teaching\r
+tendency\r
+test\r
+than\r
+that\r
+the\r
+then\r
+theory\r
+there\r
+thick\r
+thin\r
+thing\r
+this\r
+thought\r
+thread\r
+throat\r
+through\r
+through\r
+thumb\r
+thunder\r
+ticket\r
+tight\r
+till\r
+time\r
+tin\r
+tired\r
+to\r
+toe\r
+together\r
+tomorrow\r
+tongue\r
+tooth\r
+top\r
+touch\r
+town\r
+trade\r
+train\r
+transport\r
+tray\r
+tree\r
+trick\r
+trouble\r
+trousers\r
+true\r
+turn\r
+twist\r
+umbrella\r
+under\r
+unit\r
+up\r
+use\r
+value\r
+verse\r
+very\r
+vessel\r
+view\r
+violent\r
+voice\r
+waiting\r
+walk\r
+wall\r
+war\r
+warm\r
+wash\r
+waste\r
+watch\r
+water\r
+wave\r
+wax\r
+way\r
+weather\r
+week\r
+weight\r
+well\r
+west\r
+wet\r
+wheel\r
+when\r
+where\r
+while\r
+whip\r
+whistle\r
+white\r
+who\r
+why\r
+wide\r
+will\r
+wind\r
+window\r
+wine\r
+wing\r
+winter\r
+wire\r
+wise\r
+with\r
+woman\r
+wood\r
+wool\r
+word\r
+work\r
+worm\r
+wound\r
+writing\r
+wrong\r
+year\r
+yellow\r
+yes\r
+yesterday\r
+you\r
+young\r
--- /dev/null
+<?php
+/**
+ * Event Management
+ * Housing and Reservations System - Geographic Calculations Support
+ *
+ * PHP version 5
+ *
+ * @category Support_Services
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: GeoCalculations.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://housing.gaslightmedia.com/admin/
+ */
+
+/**
+ * Geographic Calculations Support
+ *
+ * PHP version 5
+ *
+ * @category Support_Services
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: GeoCalculations.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://housing.gaslightmedia.com/admin/
+ */
+class EventManagementGeoCalculations
+{
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ protected $dbh;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct($dbh)
+ {
+ $this->dbh = $dbh;
+ }
+
+
+ /*
+ * Get distance from event for an array of member locations - $sort = true to sort by distance
+ *
+ * This method caches the results in the event_prop_dist table and will refer first to that table.
+ * If there's no entry in that table, the method will get the distance information from Google
+ * and add it to the cache.
+ *
+ */
+ function getMemberEventDistance(
+ $eventID, $members,
+ $member_lat_field = 'lat', $member_lon_field = 'lon',
+ $distance_field = 'distance',
+ $duration_field = 'duration',
+ $member_id_field = 'id',
+ $sort = false
+ )
+ {
+
+ // Check for valid Event ID and members table
+ if (($eventID-0) == 0 || !is_array($members) || count($members) == 0) {
+ return false;
+ }
+
+ // Get Event location
+ $sql = "SELECT name, event_code, lat, lon
+ FROM eventmgt.event
+ WHERE id = $eventID;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $event_data = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // Did we get event data
+ if (!event_data) {
+ return false;
+ }
+
+ // Get numeric lat and lon and check if they exist (assume no 0 valuse)
+ $event_lat = ($event_data['lat'] - 0);
+ $event_lon = ($event_data['lon'] - 0);
+ if ($event_lat == 0 || $event_lon == 0) {
+ return false;
+ }
+
+ $distances = array();
+ $over_query_limit = false;
+
+ while (list($k, $m) = each($members)) {
+
+ $members[$k][$distance_field] = false;
+ $members[$k][$duration_field] = false;
+ $members[$k]['member_id_sort_field'] = $m[$member_id_field];
+
+ // Initialize distance response array entry for this member
+ $distances[$m[$member_id_field]] = array(
+ 'id' => $m[$member_id_field],
+ 'distance' => false
+ );
+
+ // If we have lat/lon for this member
+ $have_latlon = false;
+ if ($event_lat != 0 && $event_lon != 0 && $m[$member_lat_field] != 0 && $m[$member_lon_field] != 0) {
+
+ $have_latlon = 'YES';
+ $have_distance = 'NO';
+ $distance = false;
+ $duration = false;
+
+ // Check for entry in distance cache table
+ $sql = "
+ SELECT *
+ FROM eventmgt.event_prop_dist
+ WHERE event = $eventID
+ AND event_lat = $event_lat
+ AND event_lon = $event_lon
+ AND member = ".$m[$member_id_field]."
+ AND memb_lat = ".$m[$member_lat_field]."
+ AND memb_lon = ".$m[$member_lon_field]."
+ ";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $dist_data = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($dist_data != false && count($dist_data) > 0) {
+ $distance = $dist_data['distance'];
+ $duration = $dist_data['duration'];
+ $have_distance = 'YES';
+ }
+
+ // If we don't have distance from the cache and we're not over limit
+ if ($have_distance == 'NO' && !$over_query_limit) {
+
+ // Request distance from event from Google
+ $map_request = 'http://maps.googleapis.com/maps/api/directions/xml?'
+ .'origin='.$m[$member_lat_field].','.$m[$member_lon_field]
+ .'&destination='.$event_lat
+ .','.$event_lon
+ .'&sensor=false&mode=driving';
+
+ $ch = curl_init();
+ $curlOptions = array(
+ CURLOPT_URL => $map_request,
+ CURLOPT_HEADER => 0,
+ CURLOPT_RETURNTRANSFER => 1,
+ CURLOPT_FAILONERROR => 1
+ );
+ curl_setopt_array($ch, $curlOptions);
+ $response = curl_exec($ch);
+ curl_close($ch);
+
+ if (strstr($response, 'OVER_QUERY_LIMIT')) {
+ $over_query_limit = true;
+ } else {
+
+ // if we got a distance and time, then use that
+ if ($response) {
+
+ $xml = new SimpleXMLElement($response);
+ if ($xml) {
+ $summary = addslashes((string) $xml->route[0]->summary);
+ $distance = (string) $xml->route[0]->leg[0]->distance->text;
+ $duration = (string) $xml->route[0]->leg[0]->duration->text;
+ $start_addr = addslashes((string) $xml->route[0]->leg[0]->start_address);
+ $end_addr = addslashes((string) $xml->route[0]->leg[0]->end_address);
+ $have_distance = 'YES';
+
+ // Delete any previous entry for this member/event
+ $sql = "
+ DELETE FROM eventmgt.event_prop_dist
+ WHERE event = $eventID
+ AND member = ".$m[$member_id_field]."
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+
+ // Add this result to the event_prop_dist table
+ $sql = "
+ INSERT INTO eventmgt.event_prop_dist
+ (
+ event, event_lat, event_lon,
+ member, memb_lat, memb_lon,
+ summary, start_addr, end_addr,
+ distance, duration
+ )
+ VALUES
+ (
+ $eventID, $event_lat, $event_lon,
+ ".$m[$member_id_field].", ".$m[$member_lat_field].", ".$m[$member_lon_field].",
+ '$summary', '$start_addr', '$end_addr',
+ '$distance', '$duration'
+ );
+ ";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+
+ } // If the response contained XML
+ } // If we got a response from Google
+ } // If we're not over limit
+
+ } // If we don't have chached distance
+ } // If we have lat/lon
+
+ $members[$k][$distance_field] = $distance;
+ $members[$k]['geo_distance_value'] = (0.0 + $distance);
+ $members[$k][$duration_field] = $duration;
+ $members[$k]['geo_duration_value'] = (0.0 + $duration);
+
+ } // For each member
+
+ if ($sort) {
+
+
+ uasort($members, 'distCmp');
+
+ }
+
+ return $members;
+ }
+}
+
+
+// Comparison function to sort by distance - Needs to be declared outside of the class (Yuck!)
+function distCmp($a, $b) {
+
+ $adist = $a['geo_distance_value'];
+ $bdist = $b['geo_distance_value'];
+
+ if ($adist == $bdist) {
+
+ // distance is the same, so sub-sort by member_id to keep things consistent
+ $amemb = $a['member_id_sort_field'];
+ $bmemb = $b['member_id_sort_field'];
+
+ if ($amemb == $bmemb) {
+ return 0;
+ }
+
+ return ($amemb < $bmemb) ? -1 : 1;
+ }
+ return ($adist < $bdist) ? -1 : 1;
+}
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Event Report data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: Reports/dataEventReport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+/****
+ *
+ * NOTE: This is a data class for form input validation only.
+ * There is no database table assoicated with this class!
+ *
+ ****/
+
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataStates class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataStates.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+class EventManagementDataEventReport extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = '';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Event selection
+ 'conv' => array(
+ 'field' => 'conv',
+ 'as' => 'event_name',
+ 'type' => 'pointer',
+ 'p_table' => 'event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Event Name',
+ 'tip' => '
+ <p>Select the event for which you would like to produce a report.</p>
+ <p>You may produce an Event Summary report for only one event at a time.</p>
+ '
+ )
+ ),
+
+ // contacts Selection
+ 'contacts_section' => array(
+ 'field' => 'contacts_section',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Contacts Section',
+ 'tip' => '
+ <p>Selects display of Contacts information in the report.</p>
+ '
+ )
+ ),
+
+ // Housing Selection
+ 'housing_section' => array(
+ 'field' => 'housing_section',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Housing Section',
+ 'tip' => '
+ <p>Selects display of Housing information (properties, inventory, reservations) in the report.</p>
+ '
+ )
+ ),
+
+ // Housing Summary Only
+ 'housing_summary_only' => array(
+ 'field' => 'housing_summary_only',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Housing Summary Only',
+ 'tip' => '
+ <p>Selects display of Housing summary information only in the report.
+ When this option is selected, only the summary is displayed without all of the property and inventory detail.</p>
+ '
+ )
+ ),
+
+ // Housing Available Only
+ 'housing_available_only' => array(
+ 'field' => 'housing_available_only',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => true,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Housing Available Only',
+ 'tip' => '
+ <p>Removes the quantity of assigned and sold inventory and only displays the number currently available.</p>
+ '
+ )
+ ),
+
+ // Reservations Selection
+ 'reservations_section' => array(
+ 'field' => 'reservations_section',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Reservations Section',
+ 'tip' => '
+ <p>Selects display of Reservations information in the report.</p>
+ '
+ )
+ ),
+
+ // Reservations Summary Only
+ 'reservations_summary_only' => array(
+ 'field' => 'reservations_summary_only',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Reservations Summary',
+ 'tip' => '
+ <p>Selects display of Reservations summary information only in the report.
+ When this option is selected, only the summary is displayed without all of the reservation detail.</p>
+ '
+ )
+ ),
+
+ // Output Type
+ 'output_type' => array(
+ 'field' => 'output_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => array(
+ 'html' => 'Display on screen',
+ 'print' => 'Printable Report',
+ 'csv' => 'Export as speadsheet (.csv)'
+ ),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Output Type',
+ 'tip' => '
+ <p>This controls the way the report is output</p>
+ <p>Available options include</p>
+ <ul>
+ <li>Display on Screen - Display the report in your browser below the report request form.</li>
+ <li>Printable Report - Display the report in a separate browser window for output to a printer.</li>
+ <li>Export as Spreadsheet - Sends the report to your computer as a ".CSV" type file for import into a spreadsheet program.</li>
+ </ul>
+ <p>If the Printable Report does not show, check to make sure you have permitted browser pop-ups for this Web site.</p>
+ '
+ )
+ )
+
+
+ );
+ }
+
+ /**
+ * Create Report Controls Data
+ *
+ * @return array
+ */
+ function newControls()
+ {
+
+ $r = $this->newEntry();
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $event = isset($_SESSION[GLM_EVENT_SESSION]['Event']);
+ $r['fieldData']['event_name']['pick_list'][$event]['default'] = true;
+ }
+
+ return $r;
+
+ }
+
+
+ /**
+ * Try to process controls input
+ *
+ * @return array
+ */
+ function processControls()
+ {
+
+ $r = $this->processInputData();
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $event = isset($_SESSION[GLM_EVENT_SESSION]['Event']);
+ $r['fieldData']['event_name']['pick_list'][$event]['default'] = true;
+ }
+
+ return $r;
+
+ }
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Reservation Report data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: Reports/dataReservationReport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.visitgreatlakesbay.org/
+ */
+
+/****
+ *
+ * NOTE: This is a data class for form input validation only.
+ * There is no database table assoicated with this class!
+ *
+ ****/
+
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataReservationReport class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataReservationReport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.visitgreatlakesbay.org
+ */
+class EventManagementDataReservationReport extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = '';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Event selection
+ 'event' => array(
+ 'field' => 'event',
+ 'as' => 'event_name',
+ 'type' => 'pointer',
+ 'p_table' => 'event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Event Name',
+ 'tip' => '
+ <p>Select the event for which you would like to produce a report.</p>
+ <p>You may produce an Reservations report for only one event at a time.</p>
+ '
+ )
+ ),
+
+ // State selection
+ 'state' => array(
+ 'field' => 'state',
+ 'as' => 'state_rep',
+ 'type' => 'pointer',
+ 'p_table' => 'state_rep',
+ 'p_field' => 'code',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'State',
+ 'tip' => '
+ <p>Optionally select a State for which you would like to produce the report.</p>
+ <p>If no State is selected, the report will include all states.</p>
+ '
+ )
+ ),
+
+ // Team selection
+ 'team' => array(
+ 'field' => 'team',
+ 'as' => 'team_code',
+ 'type' => 'pointer',
+ 'p_table' => 'team',
+ 'p_field' => 'team_code',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Team',
+ 'tip' => '
+ <p>Optionally select a Team for which you would like to produce the report.</p>
+ <p>If no Team is selected, the report will include all teams.</p>
+ '
+ )
+ ),
+
+ // Property filter selection
+ 'property' => array(
+ 'field' => 'property',
+ 'as' => 'prop_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Property',
+ 'tip' => '
+ <p>Optionally select a Property for which you would like to produce the report.</p>
+ <p>If no Property is selected, the report will include all properties matching reservations.</p>
+ '
+ )
+ ),
+
+ // Status
+ 'status' => array(
+ 'field' => 'status',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => array(
+ 'all' => 'All',
+ 'pending' => 'Pending',
+ 'confirmed' => 'Confirmed',
+ 'declined' => 'Declined'
+ ),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Status',
+ 'tip' => '
+ <p>This selects which reservations should be display by status</p>
+ <p>Available options include</p>
+ <ul>
+ <li>All - Display all reservations.</li>
+ <li>Pending - Display all pending reservations. This is reservations that have neither been confirmed or declined.</li>
+ <li>Confirmed - Display only reservations that have been confirmed.</li>
+ <li>Declined - Display only reservations that have been declined.</li>
+ </ul>
+ '
+ )
+ ),
+
+
+ // Output Type
+ 'output_type' => array(
+ 'field' => 'output_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => array(
+ 'html' => 'Display on screen',
+ 'print' => 'Printable Report',
+ 'csv' => 'Export as speadsheet (.csv)'
+ ),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Output Type',
+ 'tip' => '
+ <p>This controls the way the report is output</p>
+ <p>Available options include</p>
+ <ul>
+ <li>Display on Screen - Display the report in your browser below the report request form.</li>
+ <li>Printable Report - Display the report in a separate browser window for output to a printer.</li>
+ <li>Export as Spreadsheet - Sends the report to your computer as a ".CSV" type file for import into a spreadsheet program.</li>
+ </ul>
+ <p>If the Printable Report does not show, check to make sure you have permitted browser pop-ups for this Web site.</p>
+ '
+ )
+ )
+
+
+
+ );
+ }
+
+ /**
+ * Create Report Controls Data
+ *
+ * @return array
+ */
+ function newControls()
+ {
+
+ $r = $this->newEntry();
+
+ // Get event, state, team matrix and merge that with result
+ $eventStateTeamData = $this->getEventStateTeamMatrix();
+ $r['eventStateTeam'] = $eventStateTeamData;
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $event = isset($_SESSION[GLM_EVENT_SESSION]['Event']);
+ $r['fieldData']['event_name']['pick_list'][$event]['default'] = true;
+ $r['eventStateTeam'][$event]['default'] = true;
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * getStateTeamMatrix
+ *
+ */
+ function getEventStateTeamMatrix()
+ {
+
+ // Get property/accommodation matrix
+ $sql = "
+ SELECT C.id AS event_id,
+ C.name AS event_name,
+ C.event_code AS event_code,
+ S.id AS state_id,
+ S.code AS state_code,
+ S.event AS event,
+ T.id AS team_id,
+ T.team_code AS team_code,
+ T.name AS team_name
+ FROM eventmgt.event C
+ LEFT OUTER JOIN state_rep S ON (S.event = C.id)
+ LEFT OUTER JOIN team T ON (T.state = S.id)
+ ORDER BY C.name, S.code, T.team_code
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventStateTeamData = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ if (count($eventStateTeamData) == 0) {
+ $reason[] = "No State Reps listed in the system.";
+ }
+ // *** LOOK FOR DEFAULTS ***
+ // Build array of Members with their accommodations
+ $eventStateTeam = array();
+ foreach ($eventStateTeamData as $d) {
+
+ // If event hasn't been added yet, do that.
+ if (!isset($eventStateTeam[$d['event_id']])) {
+ $eventStateTeam[$d['event_id']] = array(
+ 'eventID' => $d['event_id'],
+ 'eventName' => $d['event_name'],
+ 'eventCode' => $d['event_code'],
+ 'default' => false,
+ 'state' => array()
+ );
+ }
+
+ // If state hasn't been added yet, do that.
+ if ($d['state_id']) {
+ if (!isset($eventStateTeam[$d['event_id']]['state'][$d['state_id']])) {
+ $eventStateTeam[$d['event_id']]['state'][$d['state_id']] = array(
+ 'stateID' => $d['state_id'],
+ 'stateCode' => $d['state_code'],
+ 'team' => array()
+ );
+ }
+ }
+
+ // Add team
+ if ($d['team_id']) {
+ $eventStateTeam[$d['event_id']]['state'][$d['state_id']]['team'][$d['team_id']] = array(
+ 'teamID' => $d['team_id'],
+ 'teamName' => $d['team_name']
+ );
+ }
+ }
+
+ return $eventStateTeam;
+ }
+
+
+
+ /**
+ * Try to process controls input
+ *
+ * @return array
+ */
+ function processControls()
+ {
+
+ $r = $this->processInputData();
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $event = isset($_SESSION[GLM_EVENT_SESSION]['Event']);
+ $r['fieldData']['event_name']['pick_list'][$event]['default'] = true;
+ }
+
+ return $r;
+
+ }
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Reservation Report data class - Room Block Report
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: Reports/dataRoomBlockReport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+/****
+ *
+ * NOTE: This is a data class for form input validation only.
+ * There is no database table assoicated with this class!
+ *
+ ****/
+
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataStates class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataRoomBlockReport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataRoomBlockReport extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = '';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Event selection
+ 'event' => array(
+ 'field' => 'event',
+ 'as' => 'event_name',
+ 'type' => 'pointer',
+ 'p_table' => 'event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Event Name',
+ 'tip' => '
+ <p>Select the event for which you would like to produce a report.</p>
+ <p>You may produce a Room Block report for only one event at a time.</p>
+ '
+ )
+ ),
+
+ // State filter selection
+ 'state' => array(
+ 'field' => 'state',
+ 'as' => 'state_rep',
+ 'type' => 'pointer',
+ 'p_table' => 'state_rep',
+ 'p_field' => 'code',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'State',
+ 'tip' => '
+ <p>Optionally select a State for which you would like to produce the report.</p>
+ <p>If no State is selected, the report will include all states.</p>
+ '
+ )
+ ),
+
+ // Team filter selection
+ 'team' => array(
+ 'field' => 'team',
+ 'as' => 'team_code',
+ 'type' => 'pointer',
+ 'p_table' => 'team',
+ 'p_field' => 'team_code',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Team',
+ 'tip' => '
+ <p>Optionally select a Team for which you would like to produce the report.</p>
+ <p>If no Team is selected, the report will include all teams.</p>
+ '
+ )
+ ),
+
+ // Property filter selection
+ 'property' => array(
+ 'field' => 'property',
+ 'as' => 'prop_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Property',
+ 'tip' => '
+ <p>Optionally select a Property for which you would like to produce the report.</p>
+ <p>If no Property is selected, the report will include all properties with accommodations in the matching room blocks.</p>
+ '
+ )
+ ),
+
+ // Property section selection
+ 'property_section' => array(
+ 'field' => 'property_section',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Properties Section',
+ 'tip' => '
+ <p>Selects display of Room Blocks listed by Property.</p>
+ '
+ )
+ ),
+
+ // Assigned Selection
+ 'assigned_section' => array(
+ 'field' => 'assigned_section',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Assigned Section',
+ 'tip' => '
+ <p>Selects display of Room Blocks assigned to State Reps and Teams.</p>
+ '
+ )
+ ),
+
+ // Option: Show assigned quantities in addition to currently available quantities
+ 'option_assigned' => array(
+ 'field' => 'option_assigned',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Assigned Quantities',
+ 'tip' => '
+ <p>When selected assigned quantities are included in addition to currently available quantities.</p>
+ '
+ )
+ ),
+
+ // Output Type
+ 'output_type' => array(
+ 'field' => 'output_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => array(
+ 'html' => 'Display on screen',
+ 'print' => 'Printable Report',
+ 'csv' => 'Export as speadsheet (.csv)'
+ ),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Output Type',
+ 'tip' => '
+ <p>This controls the way the report is output</p>
+ <p>Available options include</p>
+ <ul>
+ <li>Display on Screen - Display the report in your browser below the report request form.</li>
+ <li>Printable Report - Display the report in a separate browser window for output to a printer.</li>
+ <li>Export as Spreadsheet - Sends the report to your computer as a ".CSV" type file for import into a spreadsheet program.</li>
+ </ul>
+ <p>If the Printable Report does not show, check to make sure you have permitted browser pop-ups for this Web site.</p>
+ '
+ )
+ )
+
+ );
+ }
+
+ /**
+ * Create Report Controls Data
+ *
+ * @return array
+ */
+ function newControls()
+ {
+
+ $r = $this->newEntry();
+
+ // Get event, state, team matrix and merge that with result
+ $eventStateTeamData = $this->getEventStateTeamMatrix();
+ $r['eventStateTeam'] = $eventStateTeamData;
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $event = isset($_SESSION[GLM_EVENT_SESSION]['Event']);
+ $r['eventStateTeam'][$event]['default'] = true;
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * getStateTeamMatrix
+ *
+ */
+ function getEventStateTeamMatrix()
+ {
+
+ // Get property/accommodation matrix
+ $sql = "
+ SELECT C.id AS event_id,
+ C.name AS event_name,
+ C.event_code AS event_code,
+ S.id AS state_id,
+ S.code AS state_code,
+ S.event AS event,
+ T.id AS team_id,
+ T.team_code AS team_code,
+ T.name AS team_name
+ FROM eventmgt.event C
+ LEFT OUTER JOIN state_rep S ON (S.event = C.id)
+ LEFT OUTER JOIN team T ON (T.state = S.id)
+ ORDER BY C.name, S.code, T.team_code
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventStateTeamData = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ if (count($eventStateTeamData) == 0) {
+ $reason[] = "No State Reps listed in the system.";
+ }
+// *** LOOK FOR DEFAULTS ***
+ // Build array of Members with their accommodations
+ $eventStateTeam = array();
+ foreach ($eventStateTeamData as $d) {
+
+ // If event hasn't been added yet, do that.
+ if (!isset($eventStateTeam[$d['event_id']])) {
+ $eventStateTeam[$d['event_id']] = array(
+ 'eventID' => $d['event_id'],
+ 'eventName' => $d['event_name'],
+ 'eventCode' => $d['event_code'],
+ 'default' => false,
+ 'property' => array(),
+ 'state' => array()
+ );
+ }
+
+ // If state hasn't been added yet, do that.
+ if ($d['state_id']) {
+ if (!isset($eventStateTeam[$d['event_id']]['state'][$d['state_id']])) {
+ $eventStateTeam[$d['event_id']]['state'][$d['state_id']] = array(
+ 'stateID' => $d['state_id'],
+ 'stateCode' => $d['state_code'],
+ 'team' => array()
+ );
+ }
+ }
+
+ // Add team
+ if ($d['team_id']) {
+ $eventStateTeam[$d['event_id']]['state'][$d['state_id']]['team'][$d['team_id']] = array(
+ 'teamID' => $d['team_id'],
+ 'teamName' => $d['team_name']
+ );
+ }
+ }
+
+ // Also layer in properties to event array
+ $sql = "
+ SELECT DISTINCT ON (B.event, B.member)
+ B.event AS event_id, B.member AS prop_id, M.name AS prop_name
+ FROM eventmgt.room_block B, eventmgt.member M
+ WHERE M.id = B.member
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $propData = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ foreach ($propData as $p) {
+ $eventStateTeam[$p['event_id']]['property'][$p['prop_id']] = array(
+ 'propID' => $p['prop_id'],
+ 'propName' => $p['prop_name']
+ );
+ }
+
+
+ return $eventStateTeam;
+ }
+
+ /**
+ * Try to process controls input
+ *
+ * @return array
+ */
+ function processControls()
+ {
+
+ $r = $this->processInputData();
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $event = isset($_SESSION[GLM_EVENT_SESSION]['Event']);
+ $r['fieldData']['event_name']['pick_list'][$event]['default'] = true;
+ }
+
+ return $r;
+
+ }
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Room Request Report data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: Reports/dataRoomRequestReport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+/****
+ *
+ * NOTE: This is a data class for form input validation only.
+ * There is no database table assoicated with this class!
+ *
+ ****/
+
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementRoomRequestReport class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataRoomRequestReport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataRoomRequestReport extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = '';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Event selection
+ 'event' => array(
+ 'field' => 'event',
+ 'as' => 'event_name',
+ 'type' => 'pointer',
+ 'p_table' => 'event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Event Name',
+ 'tip' => '
+ <p>Select the event for which you would like to produce a report.</p>
+ <p>You may produce an Reservations report for only one event at a time.</p>
+ '
+ )
+ ),
+
+ // State selection
+ 'state' => array(
+ 'field' => 'state',
+ 'as' => 'state_rep',
+ 'type' => 'pointer',
+ 'p_table' => 'state_rep',
+ 'p_field' => 'code',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'State',
+ 'tip' => '
+ <p>Optionally select a State for which you would like to produce the report.</p>
+ <p>If no State is selected, the report will include all states.</p>
+ '
+ )
+ ),
+
+ // Team selection
+ 'team' => array(
+ 'field' => 'team',
+ 'as' => 'team_code',
+ 'type' => 'pointer',
+ 'p_table' => 'team',
+ 'p_field' => 'team_code',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Team',
+ 'tip' => '
+ <p>Optionally select a Team for which you would like to produce the report.</p>
+ <p>If no Team is selected, the report will include all teams.</p>
+ '
+ )
+ ),
+
+ // Property filter selection
+ 'property' => array(
+ 'field' => 'property',
+ 'as' => 'prop_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Property',
+ 'tip' => '
+ <p>Optionally select a Property for which you would like to produce the report.</p>
+ <p>If no Property is selected, the report will include all properties with accommodations in the matching room requests.</p>
+ '
+ )
+ ),
+
+ // Show pending
+ 'pending_select' => array(
+ 'field' => 'pending_select',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Show pending',
+ 'tip' => '
+ <p>Selects display of pending reservtions.</p>
+ '
+ )
+ ),
+
+ // Show confirmed
+ 'confirmed_select' => array(
+ 'field' => 'confirmed_select',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Show Confirmed',
+ 'tip' => '
+ <p>Selects display of confirmed reservtions.</p>
+ '
+ )
+ ),
+
+ // Show declined
+ 'declined_select' => array(
+ 'field' => 'declined_select',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Show Declined',
+ 'tip' => '
+ <p>Selects display of declined reservtions.</p>
+ '
+ )
+ ),
+
+ // Show Availabile
+ 'available_select' => array(
+ 'field' => 'available_select',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Show Available',
+ 'tip' => '
+ <p>Selects display of assigned and available inventory for each room block.</p>
+ '
+ )
+ ),
+
+ // Output Type
+ 'output_type' => array(
+ 'field' => 'output_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => array(
+ 'html' => 'Display on screen',
+ 'print' => 'Printable Report',
+ 'csv' => 'Export as speadsheet (.csv)'
+ ),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'quicktip' => array(
+ 'title' => 'Output Type',
+ 'tip' => '
+ <p>This controls the way the report is output</p>
+ <p>Available options include</p>
+ <ul>
+ <li>Display on Screen - Display the report in your browser below the report request form.</li>
+ <li>Printable Report - Display the report in a separate browser window for output to a printer.</li>
+ <li>Export as Spreadsheet - Sends the report to your computer as a ".CSV" type file for import into a spreadsheet program.</li>
+ </ul>
+ <p>If the Printable Report does not show, check to make sure you have permitted browser pop-ups for this Web site.</p>
+ '
+ )
+ )
+
+
+
+ );
+ }
+
+ /**
+ * Create Report Controls Data
+ *
+ * @return array
+ */
+ function newControls()
+ {
+
+ $r = $this->newEntry();
+
+ // Get event, state, team matrix and merge that with result
+ $eventStateTeamData = $this->getEventStateTeamMatrix();
+ $r['eventStateTeam'] = $eventStateTeamData;
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $event = isset($_SESSION[GLM_EVENT_SESSION]['Event']);
+ $r['eventStateTeam'][$event]['default'] = true;
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * getStateTeamMatrix
+ *
+ */
+ function getEventStateTeamMatrix()
+ {
+
+ // Get property/accommodation matrix
+ $sql = "
+ SELECT C.id AS event_id,
+ C.name AS event_name,
+ C.event_code AS event_code,
+ S.id AS state_id,
+ S.code AS state_code,
+ S.event AS event,
+ T.id AS team_id,
+ T.team_code AS team_code,
+ T.name AS team_name
+ FROM eventmgt.event C
+ LEFT OUTER JOIN state_rep S ON (S.event = C.id)
+ LEFT OUTER JOIN team T ON (T.state = S.id)
+ ORDER BY C.name, S.code, T.team_code
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventStateTeamData = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ if (count($eventStateTeamData) == 0) {
+ $reason[] = "No State Reps listed in the system.";
+ }
+ // *** LOOK FOR DEFAULTS ***
+ // Build array of Members with their accommodations
+ $eventStateTeam = array();
+ foreach ($eventStateTeamData as $d) {
+
+ // If event hasn't been added yet, do that.
+ if (!isset($eventStateTeam[$d['event_id']])) {
+ $eventStateTeam[$d['event_id']] = array(
+ 'eventID' => $d['event_id'],
+ 'eventName' => $d['event_name'],
+ 'eventCode' => $d['event_code'],
+ 'default' => false,
+ 'state' => array()
+ );
+ }
+
+ // If state hasn't been added yet, do that.
+ if ($d['state_id']) {
+ if (!isset($eventStateTeam[$d['event_id']]['state'][$d['state_id']])) {
+ $eventStateTeam[$d['event_id']]['state'][$d['state_id']] = array(
+ 'stateID' => $d['state_id'],
+ 'stateCode' => $d['state_code'],
+ 'team' => array()
+ );
+ }
+ }
+
+ // Add team
+ if ($d['team_id']) {
+ $eventStateTeam[$d['event_id']]['state'][$d['state_id']]['team'][$d['team_id']] = array(
+ 'teamID' => $d['team_id'],
+ 'teamName' => $d['team_name']
+ );
+ }
+ }
+
+ return $eventStateTeam;
+ }
+
+
+ /**
+ * Try to process controls input
+ *
+ * @return array
+ */
+ function processControls()
+ {
+
+ $r = $this->processInputData();
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $event = isset($_SESSION[GLM_EVENT_SESSION]['Event']);
+ $r['fieldData']['event_name']['pick_list'][$event]['default'] = true;
+ }
+
+ return $r;
+
+ }
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Accommodations data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataAccoms.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataAccoms class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataAccoms,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementDataAccoms extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.accommodation';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Member name
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => 'property',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'member_name',
+ 'p_id' => 'member_id',
+ 'p_where' => 'member_id in
+ (
+ SELECT DISTINCT member_id
+ FROM members.member_category
+ WHERE category_id IN
+ (SELECT category_id FROM members.category WHERE accommodations)
+ )',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'use' => 'ni'
+ ),
+
+ // Member name
+ 'member_2' => array(
+ 'field' => 'member',
+ 'as' => 'property',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'member_name',
+ 'p_id' => 'member_id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'view_only' => true,
+ 'use' => 'gleudc'
+ ),
+
+ // Accommodation Name (internal use)
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Accommodation Title (for display to users)
+ 'title' => array(
+ 'field' => 'title',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Category - Needs to be moved to a separate admin table
+ 'category' => array(
+ 'field' => 'category',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->room_category->toArray(),
+ 'list_keytype' => 'int',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Image
+ 'image' => array(
+ 'field' => 'image',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gnieud'
+ ),
+
+ // Quantity - Number of these accommodations at property
+ 'quant' => array(
+ 'field' => 'quant',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgnieud'
+ ),
+
+ // Standard # of occupants
+ 'occupants' => array(
+ 'field' => 'occupants',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gnieud'
+ ),
+
+ // Max # of occupants
+ 'maxoccupants' => array(
+ 'field' => 'maxoccupants',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gnieud'
+ ),
+
+ // Display Order (sort)
+ 'sort' => array(
+ 'field' => 'sort',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ )
+
+
+ );
+ }
+
+ /**
+ * Get Accommadations list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getAccomsList($member = false)
+ {
+
+ // Get any specified member listing option - default to event
+ $option = 'event';
+ if (($membersListOption = filter_input(INPUT_GET, 'AccomsListOption', FILTER_SANITIZE_STRING))) {
+ $option = $membersListOption;
+ }
+
+ // Get event Member from session - if available
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+ if ($member) {
+ $memberID = $member;
+ $option = 'member';
+ }
+
+ // Select type of list
+ $where = '';
+ switch ($option) {
+ case 'all':
+ $where = 'TRUE';
+ break;
+ case 'member':
+ if ($memberID) {
+ $where = "T.member = $memberID";
+ } else {
+ $where .= "false";
+ }
+ break;
+ default:
+ echo "Option not set";
+ break;
+ }
+
+ // Get list of all available Events
+ $accomsList = $this->getList($where, 'sort, name');
+
+
+ if (count($accomsList) == 0) {
+ return false;
+ }
+
+
+ return $accomsList;
+ }
+
+
+ /**
+ * Get Accommodation Detail
+ *
+ * @return array
+ */
+ function getAccomDetail()
+ {
+
+ // Is there a new accom ID selected?
+ if (($accomID = filter_input(INPUT_GET, 'AccomID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Accom'] = $accomID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Accom'])) {
+
+ // Otherwise, get the event ID from the session
+ $accomID = $_SESSION[GLM_EVENT_SESSION]['Accom'];
+
+ } else {
+
+ // Otherwise, we don't have an event id
+ return false;
+
+ }
+
+ $accomDetail = $this->getEntry($accomID);
+
+ return $accomDetail;
+
+ }
+
+
+ /**
+ * Edit Accommodation
+ *
+ * @return array
+ */
+ function editAccom()
+ {
+
+ // Is there a new accommodaton code selected?
+ if (($accomID = filter_input(INPUT_GET, 'AccomID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Accom'] = $accomID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Accom'])) {
+
+ // Otherwise, get the accommodation ID from the session
+ $accomID = $_SESSION[GLM_EVENT_SESSION]['Accom'];
+
+ } else {
+
+ // Otherwise, we don't have a accommodation id
+ return false;
+
+ }
+
+ $accomDetail = $this->editEntry($accomID);
+
+ // echo "<pre>".print_r($accomDetail,1)."</pre>";
+ return $accomDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+/*
+ $fd = $r['fieldData'];
+
+ // Is Start date is later than End date
+ if (strtotime($fd['start_date']) > strtotime($fd['end_date'])) {
+ $r['fieldFail']['start_date'] = 'Start date is later than end date.';
+ $r['status'] = false;
+ }
+
+ // Is cutoff date is later than end date
+ if (strtotime($fd['cutoff_date']) > strtotime($fd['end_date'])) {
+ $r['fieldFail']['cutoff_date'] = 'Cutoff date is later than end date.';
+ $r['status'] = false;
+ }
+*/
+ return $r;
+ }
+
+ /**
+ * Update Accommodation
+ *
+ * @return array
+ */
+ function updateAccom()
+ {
+
+ // Is there a new event code selected?
+ if (($accomID = filter_input(INPUT_GET, 'AccomID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Accom'] = $accomID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Accom'])) {
+
+ // Otherwise, get the accommodation ID from the session
+ $accomID = $_SESSION[GLM_EVENT_SESSION]['Accom'];
+
+ } else {
+
+ // Otherwise, we don't have a accommodation id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($accomID);
+
+ return $r;
+
+ }
+
+ /**
+ * Add Accommodation
+ *
+ * @return array
+ */
+ function newAccom()
+ {
+
+ $r = $this->newEntry();
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Member']) && $_SESSION[GLM_EVENT_SESSION]['Member'] != false) {
+ $accomID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ $r['fieldData']['property']['pick_list'][$accomID]['default'] = true;
+ $r['fieldData']['property']['name'] = $r['fieldData']['property']['pick_list'][$accomID]['name'];
+ $r['fieldData']['property']['value'] = $accomID;
+ }
+
+ // If succesful then set current accommodation to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Accom'] = $r['insertedID'];
+ }
+
+ // echo "<pre>".print_r($r,1)."</pre>";
+ return $r;
+
+ }
+
+ /**
+ * Insert Accommodation
+ *
+ * @return array
+ */
+ function insertAccom()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current accommodation to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Accom'] = $r['insertedID'];
+ }
+
+ // echo "<pre>".print_r($r,1)."</pre>";
+ return $r;
+
+ }
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Ticket Add-On Sold data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataAddonSold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataAddonSold class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataAddonSold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link
+ */
+class EventManagementDataAddonSold extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.add_on_sold';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Ticket Order
+ 'ticket_order' => array(
+ 'field' => 'ticket_order',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'niegdl'
+ ),
+
+ // Ticket Sold
+ 'ticket_sold' => array(
+ 'field' => 'ticket_sold',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'niegdl'
+ ),
+
+ // Add-on Name
+ 'add_on_name' => array(
+ 'field' => 'add_on_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Add-on type
+ 'add_on_type' => array(
+ 'field' => 'add_on_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->ticket_add_on_type->toArray(),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Add-on type name
+ 'add_on_type_name' => array(
+ 'field' => 'add_on_type_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Unit name
+ 'unit_name' => array(
+ 'field' => 'unit_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Unit cost number
+ 'unit_price_numb' => array(
+ 'field' => 'unit_price',
+ 'as' => 'unit_price_numb',
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0.00,
+ 'use' => 'a'
+ ),
+
+ // Unit price (money)
+ 'unit_price' => array(
+ 'field' => 'unit_price',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0.00,
+ 'use' => 'lgd'
+ ),
+
+ // Quantity selected
+ 'quant' => array(
+ 'field' => 'quant',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Total Price Paid - Number
+ 'price_paid_numb' => array(
+ 'field' => 'price_paid',
+ 'as' => 'price_paid_numb',
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0.00,
+ 'use' => 'a'
+ ),
+
+ // Price paid (money)
+ 'price_paid' => array(
+ 'field' => 'price_paid',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0.00,
+ 'use' => 'lgd'
+ )
+
+ );
+
+ }
+
+ /**
+ * Get Ticket Sold Add-Ons list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getAddonsSoldList($ticketSoldID = false, $where = false)
+ {
+
+ // If a where clause has not been supplied, use the $TicketSoldID - Otherwise $where
+ if (!$where) {
+
+ $where = 'true';
+
+ // Check if there's a ticket sold ID, then filter by that
+ $ticketSoldID = ($ticketSoldID - 0); // Make sure it's number
+ if ($ticketSoldID > 0) {
+ $where .= " AND T.ticket_sold = $ticketSoldID";
+ }
+
+ }
+
+ $addonsSoldList = $this->getList($where, 'id');
+
+ return $addonsSoldList;
+ }
+
+ /**
+ * Get Add-On Sold Detail
+ *
+ * @return array
+ */
+ function getAddonSoldDetail($addonSoldID = false)
+ {
+
+ if ($addonSoldID == false) {
+
+ // Otherwise, we don't have an add-on id
+ return false;
+
+ }
+
+ // If the add-on sold ID is valid, get the detail
+ $addonSoldID = filter_input(INPUT_GET, 'AddonSoldID', FILTER_SANITIZE_NUMBER_INT);
+ if ($addonSoldID) {
+ $addonSoldDetail = $this->getEntry($addonSoldID);
+
+ // Otherwise fail
+ } else {
+ return false;
+ }
+
+ return $addonSoldDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Ticket Add-On data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataAddons.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataAddons class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataAddons.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link
+ */
+class EventManagementDataAddons extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.ticket_add_on';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Ticket
+ 'ticket' => array(
+ 'field' => 'ticket',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Ticket'],
+ 'use' => 'niegdl'
+ ),
+
+ // Add-on Name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Add-on type
+ 'add_on_type' => array(
+ 'field' => 'add_on_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->ticket_add_on_type->toArray(),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Maximum quant (0 is unlimited)
+ 'max_quant' => array(
+ 'field' => 'max_quant',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Unit name
+ 'unit_name' => array(
+ 'field' => 'unit_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Unit cost
+ 'unit_cost_numb' => array(
+ 'field' => 'unit_cost',
+ 'as' => 'unit_cost_numb',
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0.00,
+ 'use' => 'a'
+ ),
+
+ // Unit cost (money)
+ 'unit_cost' => array(
+ 'field' => 'unit_cost',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0.00,
+ 'use' => 'lgd'
+ )
+
+ );
+
+ }
+
+ /**
+ * Get Add-Ons list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getAddonsList($ticketID = false, $where = false)
+ {
+
+ // If a where clause has not been supplied
+ if (!$where) {
+
+ $where = 'true';
+
+ // Check if there's a ticket ID and filter by that ticket if there is
+ $ticketID = ($ticketID - 0); // Make sure it's number
+ if ($ticketID > 0) {
+ $where .= " AND T.ticket = $ticketID";
+ } elseif ($_SESSION[GLM_EVENT_MGT_ADMIN]['Ticket'] > 0) {
+ $where .= " AND T.ticket = ".$_SESSION[GLM_EVENT_MGT_ADMIN]['Ticket'];
+ }
+
+ }
+
+ // Get list of Add-Ons
+ $addonsList = $this->getList($where, 'name');
+
+ return $addonsList;
+ }
+
+ /**
+ * Get Add-On Detail
+ *
+ * @return array
+ */
+ function getAddonDetail($addonID = false)
+ {
+
+ // If a Add-On ID has been supplied
+ if ($addonID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Addon'] = $addonID;
+
+ } elseif (($addonID = filter_input(INPUT_GET, 'AddonID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // Otherwise if there a new add-on ID supplied via the request
+ $_SESSION[GLM_EVENT_SESSION]['Addon'] = $addonID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Addon'])) {
+
+ // Otherwise, get the add-on ID from the session
+ $addonID = $_SESSION[GLM_EVENT_SESSION]['Addon'];
+
+ } else {
+
+ // Otherwise, we don't have an add-on id
+ return false;
+
+ }
+
+ $addonDetail = $this->getEntry($addonID);
+
+ return $addonDetail;
+
+ }
+
+
+ /**
+ * Edit Add-On
+ *
+ * @return array
+ */
+ function editAddon()
+ {
+
+ if (($addonID = filter_input(INPUT_GET, 'AddonID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Addon'] = $addonID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Addon'])) {
+
+ // Otherwise, get the add-on ID from the session
+ $addonID = $_SESSION[GLM_EVENT_SESSION]['Addon'];
+
+ } else {
+
+ // Otherwise, we don't have a add-on id
+ return false;
+
+ }
+
+ $addonDetail = $this->editEntry($addonID);
+
+ return $addonDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+ /**
+ * Update Add-On
+ *
+ * @return array
+ */
+ function updateAddon()
+ {
+
+ if (($addonID = filter_input(INPUT_GET, 'AddonID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Addon'] = $addonID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Addon'])) {
+
+ // Otherwise, get the add-on ID from the session
+ $addonID = $_SESSION[GLM_EVENT_SESSION]['Addon'];
+
+ } else {
+
+ // Otherwise, we don't have a state rep id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($addonID);
+
+ return $r;
+
+ }
+
+
+ /**
+ * Add New Add-On
+ *
+ * @return array
+ */
+ function newAddon()
+ {
+
+ $r = $this->newEntry();
+
+ return $r;
+
+ }
+
+ /**
+ * Insert add-on
+ *
+ * @return array
+ */
+ function insertAddon()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current add-on to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Addon'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+
+ /**\r
+ * Delete add-on\r
+ *\r
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete\r
+ *\r
+ * @return array\r
+ */\r
+ function addonDelete($confirm = false)\r
+ {\r
+\r
+ // Is there a new add-on code selected?\r
+ if (($addonID = filter_input(INPUT_GET, 'AddonID', FILTER_SANITIZE_NUMBER_INT))) {\r
+\r
+ // If so then add it to the session\r
+ $_SESSION[GLM_EVENT_SESSION]['Addon'] = $addonID;\r
+\r
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Addon'])) {\r
+\r
+ // Otherwise, get the add-on ID from the session\r
+ $addonID = $_SESSION[GLM_EVENT_SESSION]['Addon'];\r
+\r
+ } else {\r
+\r
+ // Otherwise, we don't have an add-on id\r
+ return false;\r
+\r
+ }\r
+\r
+ $addonDetail = $this->deleteEntry($addonID, $confirm);\r
+\r
+ return $addonDetail;\r
+\r
+ }\r
+
+ /**\r
+ * Get Add-Ons Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getAddonsStats($where = 'true')\r
+ {\r
+\r
+ $addonsStats = $this->getStats($where);\r
+\r
+ return $addonsStats;\r
+ }\r
+\r
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Amenities data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataAmenities.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataAmenities class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataAmenities.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataAmenities extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.amenities';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Affiliation (insert) - what type of entities is this Amenity for
+ 'affiliation_type' => array(
+ 'field' => 'affiliation_type',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'i'
+ ),
+
+ // Affiliation (view)
+ 'affiliation_type_2' => array(
+ 'field' => 'affiliation_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->reference_type_numb->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gled'
+ ),
+
+ // Amenity affiliation (non-standard pointer)
+ // Points to various tables depending on the "Affiliation type" value
+ 'owner' => array(
+ 'field' => 'owner',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'i'
+ ),
+
+ // Amenity affiliation (non-standard pointer)
+ // Points to various tables depending on the "Affiliation To" value
+ 'owner_2' => array(
+ 'field' => 'owner',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gled'
+ ),
+
+ // Amenity Name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Quantity / Size
+ 'quant' => array(
+ 'field' => 'quant',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Amenity Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Get an array of Amenities for a particular affiliated entity
+ *
+ * $listOption Optional Type of affiliation - see config.ini 'reference_type'
+ * If not supplied will check for AmenitiesListOption GET value
+ * $whereRequest If supplied, use as WHERE clause instead
+ *
+ * @return object containing array as sub-objects
+ */
+ function getAmenities($listOption = false, $whereRequest = false)
+ {
+
+ $where = '';
+
+ // If there's a specific whereRequest, use that only
+ if ($whereRequest) {
+ $where = $whereRequest;
+ } else {
+
+ // Get Event ID from session - if available
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ // Get Member ID from session - if available
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ // Get any specified listing option
+ if ($listOption != '') {
+ $option = $listOption;
+
+ // Otheriwse check for list options provided in request
+ } elseif (($AmenitiesListOption = filter_input(INPUT_GET, 'AmenitiesListOption', FILTER_SANITIZE_STRING))) {
+ $option = $AmenitiesListOption;
+ }
+
+ // Include selection of proper affiliation type
+ switch ($option) {
+ case 'member':
+ if ($memberID) {
+ $where .= "T.affiliation_type = ".$this->config->reference_type->property
+ ."AND owner = $memberID\n";
+ } else {
+ $where .= "false";
+ }
+ break;
+ }
+ }
+
+ // Get the Amenities - return false if none found
+ $amenitiesList = $this->getList($where, 'name');
+ if (!is_array($amenitiesList) || count($amenitiesList) == 0) {
+ return false;
+ }
+
+ // Get affiliation type for each Amenity
+ reset($amenitiesList);
+ while( list($key, $val) = each( $amenitiesList ) ) {
+
+ $aData = $this->getAffiliate(
+ $val['affiliation_type']['value'],
+ $val['owner']
+ );
+
+ if ($aData) {
+ $amenitiesList[$key]['affiliation_type_name'] = $aData['applied_to_name'];
+ $amenitiesList[$key]['owner_name'] = $aData['owner_name'];
+ }
+
+ } // Get Amenities affiliation
+
+ return $amenitiesList;
+ }
+
+ /**
+ * Get Amenity Detail
+ *
+ * @return array
+ */
+ function getAmenityDetail()
+ {
+
+ // Is there a new Amenity ID supplied?
+ if (!($amenityID = filter_input(INPUT_GET, 'AmenityID', FILTER_SANITIZE_NUMBER_INT))) {
+ // We don't have an amenity id
+ return false;
+
+ }
+
+ $amenityDetail = $this->getEntry($amenityID);
+
+ // Get owner data
+ $aData = $this->getAffiliate(
+ $amenityDetail['affiliation_type']['value'],
+ $amenityDetail['owner']
+ );
+
+
+ if ($aData) {
+ $amenityDetail = array_merge($amenityDetail, $aData);
+ }
+
+ return $amenityDetail;
+
+ }
+
+ /**
+ * Edit Amenity
+ *
+ * @return array
+ */
+ function editAmenity()
+ {
+
+ // Is there a new amenity ID supplied?
+ if (!($amenityID = filter_input(INPUT_GET, 'AmenityID', FILTER_SANITIZE_NUMBER_INT))) {
+ // We don't have an amenity id
+ return false;
+
+ }
+
+ $amenityDetail = $this->editEntry($amenityID);
+
+ // Get owner data
+ $aData = $this->getAffiliate(
+ $amenityDetail['affiliation_type']['value'],
+ $amenityDetail['owner']
+ );
+
+ if ($aData) {
+ $amenityDetail = array_merge($amenityDetail, $aData);
+ }
+
+ return $amenityDetail;
+
+ }
+
+ /**
+ * Update Amenity
+ *
+ * @return array
+ */
+ function updateAmenity()
+ {
+
+ // Is there a new amenity ID supplied?
+ if (!($amenityID = filter_input(INPUT_GET, 'AmenityID', FILTER_SANITIZE_NUMBER_INT))) {
+ if (!($amenityID = filter_input(INPUT_POST, 'AmenityID', FILTER_SANITIZE_NUMBER_INT))) {
+ echo "::::::";
+ // We don't have an Amenity id
+ return false;
+ }
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($amenityID);
+
+ // Get owner data
+ $aData = $this->getAffiliate(
+ $amenityDetail['affiliation_type']['value'],
+ $amenityDetail['owner']
+ );
+
+ if ($aData) {
+ $amenityDetail = array_merge($amenityDetail, $aData);
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * New Amenity Affiliation
+ *
+ * @return array
+ */
+ function newAmenityAffiliation($r)
+ {
+
+ // Check for specified Amenity type
+ // We need to check for name rather than number because that's what the js is sending us
+ if (!isset($_REQUEST['amenity_type_code']) || $_REQUEST['amenity_type_code'] == '') {
+ return false;
+ }
+
+ // Get type and affiliation
+ $amenityType = trim($_REQUEST['amenity_type_code']);
+ $affiliateID = false;
+
+ switch ($amenityType) {
+ case 'property':
+ $amenityTypeNumber = $this->config->reference_type->property;
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ $affiliateID = ($_SESSION[GLM_EVENT_SESSION]['Member'] - 0);
+ $amenityTypeName = 'Property';
+ $aTable = 'eventmgt.member';
+ $aField = 'name';
+ $aFieldShort = $aField;
+ }
+ break;
+ }
+
+ // If no match on Amenity type, then fail
+ if ($affiliateID == false) {
+ return false;
+ }
+
+ // Get affiliate data
+ $sql = "SELECT $aField AS name,
+ $aFieldShort AS short_name
+ FROM $aTable
+ WHERE id = $affiliateID
+ ;";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $aData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // if no valid affiliate data - fail
+ if (!$aData) {
+ return false;
+ }
+
+ $r['fieldData']['amenity_type_name'] = $amenityTypeName;
+ $r['fieldData']['amenity_type_code'] = $amenityType;
+ $r['fieldData']['amenity_type'] = $amenityTypeNumber;
+ $r['fieldData']['affiliation_name'] = $aData['name'];
+ $r['fieldData']['affiliation'] = $affiliateID;
+ $r['fieldData']['affiliation_short'] = $aData['short_name'];
+
+ return $r;
+
+ }
+
+ function newAmenity()
+ {
+
+ $r = $this->newEntry();
+
+ $r = $this->newAmenityAffiliation($r);
+
+ // echo "<pre>".print_r($r,1)."</pre>";
+ return $r;
+
+ }
+
+
+ /**
+ * Insert Amenity
+ *
+ * @return array
+ */
+ function insertAmenity()
+ {
+
+ $r = $this->insertEntry();
+ $r = $this->newAmenityAffiliation($r);
+
+ // echo "<pre>".print_r($r,1)."</pre>";
+ return $r;
+
+ }
+
+ /**
+ * Get Affiliate table and name
+ *
+ */
+ function getAffiliate($type, $affiliation)
+ {
+
+ // Deterimine Affliate table
+ $aTable = '';
+ $aField = '';
+ switch ($type) {
+ case $this->config->reference_type->property:
+ $aType = 'Property';
+ $aTable = 'eventmgt.member';
+ $aField = 'name';
+ $aFieldShort = $aField;
+ break;
+ }
+
+ $r = false;
+
+ // If we have a good affiliate relationship
+ if ($aField != '') {
+
+ $sql = "SELECT $aField AS name,
+ $aFieldShort AS short_name
+ FROM $aTable
+ WHERE id = $affiliation
+ ;";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $aData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if ($aData) {
+ $r = array(
+ 'amenity_type_name' => $aType,
+ 'affiliation_name' => $aData['name'],
+ 'affiliation_short' => $aData['short_name']
+ );
+ }
+ }
+
+ return $r;
+
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Attendance data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataAttendance.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataAttendance class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataAttendance,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+class EventManagementDataAttendance extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.attendance';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Member ID for adding an entry
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'use' => 'nid'
+ ),
+
+ // Member ID
+ 'member_id' => array(
+ 'field' => 'member',
+ 'as' => 'member_id',
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gle'
+ ),
+
+ // Attendance record name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Attendance notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Date
+ 'attendance_date' => array(
+ 'field' => 'attendance_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'a'
+ ),
+
+ // Actual attendance entrance state time
+ 'entrance_start_time' => array(
+ 'field' => 'entrance_start_time',
+ 'as' => false,
+ 'type' => 'time',
+ 't_detailed_minutes' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => date('H:i'),
+ 'use' => 'a'
+ ),
+
+ // Actual attendance entrance end time
+ 'entrance_end_time' => array(
+ 'field' => 'entrance_end_time',
+ 'as' => false,
+ 'type' => 'time',
+ 't_detailed_minutes' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Actual performance start time
+ 'perf_start_time' => array(
+ 'field' => 'perf_start_time',
+ 'as' => false,
+ 'type' => 'time',
+ 't_detailed_minutes' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Actual performance end time
+ 'perf_end_time' => array(
+ 'field' => 'perf_end_time',
+ 'as' => false,
+ 'type' => 'time',
+ 't_detailed_minutes' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+
+ return $r;
+ }
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Bookings data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataBookings.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataBookings class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataBookings.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataBookings extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.team_property';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Team
+ 'team' => array(
+ 'field' => 'team',
+ 'as' => 'team',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.team',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Property
+ 'property' => array(
+ 'field' => 'property',
+ 'as' => 'property',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Event
+ 'conv' => array(
+ 'field' => 'conv',
+ 'as' => 'event',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Start Date
+ 'start' => array(
+ 'field' => 'start',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Stop Date
+ 'stop' => array(
+ 'field' => 'stop',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Get Bookings list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getBookingsList()
+ {
+
+ // Get event ID from session - if available
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ // Get member ID from session - if available
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ // Get team ID from session - if available
+ $teamID = $_SESSION[GLM_EVENT_SESSION]['Team'];
+
+ // Get any specified bookings listing option - default to event
+ $option = 'event';
+ if (($bookingsListOption = filter_input(INPUT_GET, 'BookingsListOption', FILTER_SANITIZE_STRING))) {
+ $option = $bookingsListOption;
+ }
+
+ // Select type of list
+ $where = '';
+ switch ($option) {
+ case 'all':
+ $where = 'TRUE';
+ break;
+ case 'event':
+ if (!$eventID) {
+ return false;
+ }
+ $where = "T.conv = $eventID";
+ break;
+ case 'member':
+ if (!$memberID) {
+ return false;
+ }
+ $where = "T.property = $memberID";
+ break;
+ case 'team':
+ if (!$teamID) {
+ return false;
+ }
+ $where = "T.team = $teamID";
+ break;
+ default:
+ echo "Option not set";
+ break;
+ }
+
+ // Get list of Bookings
+ $bookingsList = $this->getList($where);
+
+ return $bookingsList;
+ }
+
+ /**
+ * Get Booking Detail
+ *
+ * @return array
+ */
+ function getBookingDetail()
+ {
+
+ // Is there a new team code selected?
+ if (($bookingID = filter_input(INPUT_GET, 'BookingID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Booking'] = $teamID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Booking'])) {
+
+ // Otherwise, get the booking ID from the session
+ $bookingID = $_SESSION[GLM_EVENT_SESSION]['Booking'];
+
+ } else {
+
+ // Otherwise, we don't have a booking id
+ return false;
+
+ }
+
+ $bookingDetail = $this->getEntry($bookingID);
+
+ return $bookingDetail;
+
+ }
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Contactss data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataContacts.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataContacts class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataContacts.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataContacts extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.res_contact';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Delete restrictions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $delRestrictions = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ // Define fields for this data table
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Contact Type
+ 'contact_type' => array(
+ 'field' => 'contact_type',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'i'
+ ),
+
+ // Contact Type
+ 'contact_type_2' => array(
+ 'field' => 'contact_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->reference_type_numb->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gled'
+ ),
+
+ // Contact affiliation (non-standard pointer)
+ // Points to various tables depending on the Contact Type
+ 'affiliation' => array(
+ 'field' => 'affiliation',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'i'
+ ),
+
+ // Contact affiliation (non-standard pointer)
+ // Points to various tables depending on the Contact Type
+ 'affiliation_2' => array(
+ 'field' => 'affiliation',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gled'
+ ),
+
+ // Contact First Name
+ 'fname' => array(
+ 'field' => 'fname',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact Last Name
+ 'lname' => array(
+ 'field' => 'lname',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Organization
+ 'org' => array(
+ 'field' => 'org',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact Address Line 1
+ 'addr1' => array(
+ 'field' => 'addr1',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact Address Line 2
+ 'addr2' => array(
+ 'field' => 'addr2',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact City
+ 'city' => array(
+ 'field' => 'city',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact State
+ 'state' => array(
+ 'field' => 'state',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->states->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 'MI',
+ 'use' => 'a'
+ ),
+
+ // Contact Country
+ 'country' => array(
+ 'field' => 'country',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->countries->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact ZIP
+ 'zip' => array(
+ 'field' => 'zip',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Office Phone
+ 'office_phone' => array(
+ 'field' => 'office_phone',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact Mobile Phone
+ 'mobile_phone' => array(
+ 'field' => 'mobile_phone',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Alternate Phone
+ 'alt_phone' => array(
+ 'field' => 'alt_phone',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // FAX
+ 'fax' => array(
+ 'field' => 'fax',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // E-Mail
+ 'email' => array(
+ 'field' => 'email',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Optional Login ID
+ 'login_id' => array(
+ 'field' => 'login_id',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Alternate E-Mail
+ 'alt_email' => array(
+ 'field' => 'alt_email',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact Image
+ 'image' => array(
+ 'field' => 'image',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact create_date
+ 'create_date' => array(
+ 'field' => 'create_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'a'
+ ),
+
+ // Active flag
+ 'active' => array(
+ 'field' => 'active',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => true,
+ 'use' => 'a'
+ ),
+
+ // Password - encrypted\r
+ 'password' => array(\r
+ 'field' => 'password',\r
+ 'as' => false,\r
+ 'type' => 'password',
+ 'pw_type' => 'strong',\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,
+ 'minLength' => 8,
+ 'maxLength' => 16,
+ 'no_update_when_blank' => true,\r
+ 'use' => 'a'\r
+ ),
+
+ // User Rights
+ 'user_rights' => array(
+ 'field' => 'user_rights',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->permissions->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0, // Note that this is a bitmap value
+ 'use' => 'a'
+ )\r
+
+ );
+
+ // Specify any delete restrictions
+ $this->delRestrictions = false;
+
+ }
+
+ /**
+ * Get an array of contacts for a particular affiliated entity
+ *
+ * $listOption Optional Type of affiliation - see config.ini 'reference_type'
+ * If not supplied will check for ContactsListOption GET value
+ * $whereRequest If supplied, use as WHERE clause instead
+ *
+ * @return object containing array as sub-objects
+ */
+ function getContacts($listOption = false, $whereRequest = false)
+ {
+
+ $where = '';
+
+ // If there's a specific whereRequest, use that only
+ if ($whereRequest) {
+ $where = $whereRequest;
+ } else {
+
+ // Get Event ID from session - if available
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ // Get Member ID from session - if available
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ // Get State ID from session - if available
+ $stateID = $_SESSION[GLM_EVENT_SESSION]['State'];
+
+ // Get team ID from session - if available
+ $teamID = $_SESSION[GLM_EVENT_SESSION]['Team'];
+
+ // Get any specified event listing option - default to active
+ if ($listOption != '') {
+ $option = $listOption;
+
+ // Otheriwse check for list options provided in request
+ } elseif (($contactsListOption = filter_input(INPUT_GET, 'ContactsListOption', FILTER_SANITIZE_STRING))) {
+ $option = $contactsListOption;
+ }
+
+ // Include selection of proper contact type
+ switch ($option) {
+ case 'event':
+ if ($eventID) {
+ $where .= "T.contact_type = ".$this->config->reference_type->event
+ ."AND affiliation = $eventID";
+ } else {
+ $where .= "false";
+ }
+ break;
+ case 'member':
+ if ($memberID) {
+ $where .= "T.contact_type = ".$this->config->reference_type->member
+ ."AND affiliation = $memberID\n";
+ } else {
+ $where .= "false";
+ }
+ break;
+ case 'state':
+ if ($stateID) {
+ $where .= "T.contact_type = ".$this->config->reference_type->state
+ ."AND affiliation = $stateID\n";
+ } else {
+ $where .= "false";
+ }
+ break;
+ case 'team':
+ if ($teamID) {
+ $where .= "T.contact_type = ".$this->config->reference_type->team
+ ."AND affiliation = $teamID\n";
+ } else {
+ $where .= "false";
+ }
+ break;
+ }
+
+ }
+
+ // Get the contacts - return false if none found
+ $contactsList = $this->getList($where, 'org, lname, fname');
+ if (!is_array($contactsList) || count($contactsList) == 0) {
+ return false;
+ }
+
+ // Get contact affiliation for each contact
+ reset($contactsList);
+ while( list($key, $val) = each( $contactsList ) ) {
+
+ $aData = $this->getAffiliate(
+ $val['contact_type']['value'],
+ $val['affiliation']
+ );
+
+ if ($aData) {
+ $contactsList[$key]['contact_type_name'] = $aData['contact_type_name'];
+ $contactsList[$key]['affiliation'] = $aData['affiliation_name'];
+ $contactsList[$key]['affiliation_short'] = $aData['affiliation_short'];
+ }
+
+ } // Get contact affiliation
+
+ $r = array(
+ 'contact_list' => $contactsList,
+ 'type' => $t
+ );
+
+ return $r;
+ }
+
+ /**
+ * Get Contact Detail
+ *
+ * @return array
+ */
+ function getContactDetail($contactID = false)
+ {
+
+ // If a contact ID is supplied
+ if ($contactID) {
+ // nothing to do here
+
+ // Is there a new event code selected?
+ } elseif (($contactID = filter_input(INPUT_GET, 'ContactID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Contact'] = $contactID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Contact'])) {
+
+ // Otherwise, get the contact ID from the session
+ $contactID = $_SESSION[GLM_EVENT_SESSION]['Contact'];
+
+ } else {
+
+ // Otherwise, we don't have an contact id
+ return false;
+
+ }
+
+ $contactDetail = $this->getEntry($contactID);
+
+ // Get affiliate data
+ $aData = $this->getAffiliate(
+ $contactDetail['contact_type']['value'],
+ $contactDetail['affiliation']
+ );
+ if ($aData) {
+ $contactDetail = array_merge($contactDetail, $aData);
+ }
+
+ return $contactDetail;
+
+ }
+
+
+ /**
+ * Edit Contact
+ *
+ * @return array
+ */
+ function editContact()
+ {
+
+ // Check for contact ID in session
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Contact'])) {
+ $contactID = $_SESSION[GLM_EVENT_SESSION]['Contact'];
+ } else {
+ return false;
+ }
+
+ $contactDetail = $this->editEntry($contactID);
+
+ // Get affiliate data
+ $aData = $this->getAffiliate(
+ $contactDetail['contact_type']['value'],
+ $contactDetail['affiliation']
+ );
+ if ($aData) {
+ $contactDetail = array_merge($contactDetail, $aData);
+ }
+
+ return $contactDetail;
+
+ }
+
+ /**
+ * Update Contact
+ *
+ * @return array
+ */
+ function updateContact()
+ {
+
+ // Check for contact ID in session
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Contact'])) {
+ $contactID = $_SESSION[GLM_EVENT_SESSION]['Contact'];
+ } else {
+ return false;
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($contactID);
+
+ // Get affiliate data
+ $aData = $this->getAffiliate(
+ $r['fieldData']['contact_type']['value'],
+ $r['fieldData']['affiliation']
+ );
+
+ if ($aData) {
+ $r['fieldData'] = array_merge($r['fieldData'], $aData);
+ }
+
+
+ return $r;
+
+ }
+
+ /**
+ * New Contact
+ *
+ * @return array
+ */
+ function newContactAffiliation($r)
+ {
+
+ // Check for specified contact type
+ // We need to check for name rather than number because that's what the js is sending us
+ if (!isset($_REQUEST['contact_type_code']) || $_REQUEST['contact_type_code'] == '') {
+
+ $this->addDebug("dataContacts.inc", 'newContactAffiliation()', 'No contact_type_code supplied.');
+
+ return false;
+ }
+
+ // Get type and affiliation
+ $contactType = trim($_REQUEST['contact_type_code']);
+ $affiliateID = false;
+
+ switch ($contactType) {
+ case 'event':
+ $contactTypeNumber = $this->config->reference_type->event;
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ $affiliateID = ($_SESSION[GLM_EVENT_SESSION]['Event'] - 0);
+ $contactTypeName = $this->config->reference_type_numb->$contactTypeNumber;
+ $aTable = 'event';
+ $aField = 'name';
+ $aFieldShort = 'event_code';
+ }
+ break;
+ case 'member':
+ $contactTypeNumber = $this->config->reference_type->member;
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ $affiliateID = ($_SESSION[GLM_EVENT_SESSION]['Member'] - 0);
+ $contactTypeName = $this->config->reference_type_numb->$contactTypeNumber;
+ $aTable = 'eventmgt.member';
+ $aField = 'name';
+ $aFieldShort = $aField;
+ }
+ break;
+ case 'state':
+ $contactTypeNumber = $this->config->reference_type->state;
+ if (isset($_SESSION[GLM_EVENT_SESSION]['State'])) {
+ $affiliateID = ($_SESSION[GLM_EVENT_SESSION]['State'] - 0);
+ $contactTypeName = $this->config->reference_type_numb->$contactTypeNumber;
+ $aTable = 'state_rep';
+ $aField = 'code';
+ $aFieldShort = $aField;
+ }
+ break;
+ case 'team':
+ $contactTypeNumber = $this->config->reference_type->team;
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Team'])) {
+ $affiliateID = ($_SESSION[GLM_EVENT_SESSION]['Team'] - 0);
+ $contactTypeName = $this->config->reference_type_numb->$contactTypeNumber;
+ $aTable = 'team';
+ $aField = 'name';
+ $aFieldShort = 'team_code';
+ }
+ break;
+ }
+
+ // If no match on contact type, then fail
+ if ($affiliateID == false) {
+ return false;
+ }
+
+ // Get affiliate data
+ $sql = "SELECT $aField AS name,
+ $aFieldShort AS short_name
+ FROM $aTable
+ WHERE id = $affiliateID
+ ;";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $aData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // if no valid affiliate data - fail
+ if (!$aData) {
+ return false;
+ }
+
+ $r['fieldData']['contact_type_name'] = $contactTypeName;
+ $r['fieldData']['contact_type_code'] = $contactType;
+ $r['fieldData']['contact_type'] = $contactTypeNumber;
+ $r['fieldData']['affiliation_name'] = $aData['name'];
+ $r['fieldData']['affiliation'] = $affiliateID;
+ $r['fieldData']['affiliation_short'] = $aData['short_name'];
+
+ return $r;
+
+ }
+ function newContact()
+ {
+
+ $r = $this->newEntry();
+ $r = $this->newContactAffiliation($r);
+
+ return $r;
+
+ }
+
+
+ /**
+ * Insert Contact
+ *
+ * @return array
+ */
+ function insertContact()
+ {
+
+ $r = $this->insertEntry();
+ $r = $this->newContactAffiliation($r);
+
+ // If succesful then set current contact to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Contact'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * Get Affiliate table and name
+ *
+ */
+ function getAffiliate($type, $affiliation)
+ {
+
+ // Deterimine Affliate table
+ $aTable = '';
+ $aField = '';
+ switch ($type) {
+ case $this->config->reference_type->event:
+ $aType = 'Event';
+ $aTable = 'event';
+ $aField = 'name';
+ $aFieldShort = 'event_code';
+ break;
+ case $this->config->reference_type->member:
+ $aType = 'Member';
+ $aTable = 'eventmgt.member';
+ $aField = 'name';
+ $aFieldShort = $aField;
+ break;
+ case $this->config->reference_type->state:
+ $aType = 'State Rep';
+ $aTable = 'state_rep';
+ $aField = 'code';
+ $aFieldShort = $aField;
+ break;
+ case $this->config->reference_type->team:
+ $aType = 'Team';
+ $aTable = 'team';
+ $aField = 'name';
+ $aFieldShort = 'team_code';
+ break;
+ }
+
+ $r = false;
+
+ // If we have a good affiliate relationship
+ if ($aField != '') {
+
+ $sql = "SELECT $aField AS name,
+ $aFieldShort AS short_name
+ FROM $aTable
+ WHERE id = $affiliation
+ ;";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $aData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if ($aData) {
+ $r = array(
+ 'contact_type_name' => $aType,
+ 'affiliation_name' => $aData['name'],
+ 'affiliation_short' => $aData['short_name']
+ );
+ }
+ }
+
+ return $r;
+
+ }
+
+
+ /**
+ * Delete Contact
+ *
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete
+ *
+ * @return array
+ */
+ function contactDelete($confirm = false)
+ {
+
+ // Is there a new contact code selected?
+ if (($contactID = filter_input(INPUT_GET, 'ContactID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Contact'] = $contactID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Contact'])) {
+
+ // Otherwise, get the contact ID from the session
+ $contactID = $_SESSION[GLM_EVENT_SESSION]['Contact'];
+
+ } else {
+
+ // Otherwise, we don't have an contact id
+ return false;
+
+ }
+
+ $contactDetail = $this->deleteEntry($contactID, $confirm);
+
+ // Get affiliate data
+ $aData = $this->getAffiliate(
+ $contactDetail['contact_type']['value'],
+ $contactDetail['affiliation']
+ );
+ if ($aData) {
+ $contactDetail = array_merge($contactDetail, $aData);
+ }
+
+ return $contactDetail;
+
+ }
+
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Divisions data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataDivisions.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataDivisions class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataDivisions.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataDivisions extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.division';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Event selection
+ 'conv' => array(
+ 'field' => 'conv',
+ 'as' => 'event_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'nid'
+ ),
+
+ // Event Name display
+ 'conv_view' => array(
+ 'field' => 'conv',
+ 'as' => 'event_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Division Name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Get Divisions list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getDivisionsList()
+ {
+
+ // Get event ID from session - if available
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ // Get any specified division listing option - default to event
+ $option = 'event';
+ if (($divisionsListOption = filter_input(INPUT_GET, 'DivisionsListOption', FILTER_SANITIZE_STRING))) {
+ $option = $divisionsListOption;
+ }
+
+ // Select type of list
+ $where = '';
+ switch ($option) {
+ case 'all':
+ $where = 'TRUE';
+ break;
+ case 'event':
+ if (!$eventID) {
+ return false;
+ }
+ $where = "T.conv = $eventID";
+ break;
+ default:
+ echo "Option not set";
+ break;
+ }
+
+ // Get list of Divisions
+ $divisionsList = $this->getList($where, 'name');
+
+ return $divisionsList;
+ }
+
+ /**
+ * Get State Division
+ *
+ * @return array
+ */
+ function getDivisionDetail()
+ {
+
+ // Is there a new Division code selected?
+ if (($divisionID = filter_input(INPUT_GET, 'DivisionID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Division'] = $divisionID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Division'])) {
+
+ // Otherwise, get the division ID from the session
+ $divisionID = $_SESSION[GLM_EVENT_SESSION]['Division'];
+
+ } else {
+
+ // Otherwise, we don't have a division id
+ return false;
+
+ }
+
+ $divisionDetail = $this->getEntry($divisionID);
+
+ return $divisionDetail;
+
+ }
+
+
+ /**
+ * Edit Division
+ *
+ * @return array
+ */
+ function editDivision()
+ {
+
+ if (($divisionID = filter_input(INPUT_GET, 'DivisionID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Division'] = $stateID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Division'])) {
+
+ // Otherwise, get the division ID from the session
+ $divisionID = $_SESSION[GLM_EVENT_SESSION]['Division'];
+
+ } else {
+
+ // Otherwise, we don't have a state rep id
+ return false;
+
+ }
+
+ $divisionDetail = $this->editEntry($divisionID);
+
+ return $divisionDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+ /**
+ * Update Division
+ *
+ * @return array
+ */
+ function updateDivision()
+ {
+
+ if (($divisionID = filter_input(INPUT_GET, 'DivisionID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Division'] = $stateID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Division'])) {
+
+ // Otherwise, get the dvision ID from the session
+ $divisionID = $_SESSION[GLM_EVENT_SESSION]['Division'];
+
+ } else {
+
+ // Otherwise, we don't have a divisio id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($divisionID);
+
+ return $r;
+
+ }
+
+
+ /**
+ * Add New Division
+ *
+ * @return array
+ */
+ function newDivision()
+ {
+
+ $r = $this->newEntry();
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $eventID = isset($_SESSION[GLM_EVENT_SESSION]['Event']);
+ $r['fieldData']['event_name']['pick_list'][$eventID]['default'] = true;
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * Insert Division
+ *
+ * @return array
+ */
+ function insertDivision()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current division to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Division'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Venu Entrance data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataEntrances.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataEntrances class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataEntrances.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataEntrances extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.entrance';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Member ID for adding entrances
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'use' => 'nid'
+ ),
+
+ // Member Name display
+ 'member_view' => array(
+ 'field' => 'member',
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Entrance Name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Image
+ 'image' => array(
+ 'field' => 'image',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Address Line 1
+ 'addr1' => array(
+ 'field' => 'addr1',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Address Line 2
+ 'addr2' => array(
+ 'field' => 'addr2',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // City
+ 'city' => array(
+ 'field' => 'city',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // State
+ 'state' => array(
+ 'field' => 'state',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->states->toArray(),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 'MI',
+ 'use' => 'a'
+ ),
+
+ // Country
+ 'country' => array(
+ 'field' => 'country',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->countries->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // ZIP
+ 'zip' => array(
+ 'field' => 'zip',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Latitude
+ 'lat' => array(
+ 'field' => 'lat',
+ 'as' => false,
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 45,
+ 'use' => 'a'
+ ),
+
+ // Longitude
+ 'lon' => array(
+ 'field' => 'lon',
+ 'as' => false,
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => -84,
+ 'use' => 'a'
+ ),
+
+ // Member phone - From main member db
+ 'phone' => array(
+ 'field' => 'phone', // ID in member table is same as in eventmgt.member
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Colors for tickets and display
+ 'color' => array(
+ 'field' => 'color',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->color->toArray(),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Sort order
+ 'sort' => array(
+ 'field' => 'sort',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 999,
+ 'use' => 'a'
+ ),
+
+ // Notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+
+ );
+ }
+
+ /**
+ * Get Entrancess list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getEntrancesList($memberID = false, $where = false)
+ {
+
+ // If a where clause has not been supplied
+ if (!$where) {
+
+ $where = 'true';
+
+ // Check if there's a member ID and filter by that member if there is
+ $memberID = ($memberID - 0); // Make sure it's number
+ if ($memberID > 0) {
+ $where .= " AND T.member = $memberID";
+ } elseif ($_SESSION[GLM_EVENT_MGT_ADMIN]['Member'] > 0) {
+ $where .= " AND T.member = ".$_SESSION[GLM_EVENT_MGT_ADMIN]['Member'];
+ }
+
+ }
+
+ // Get list of Entrances
+ $entrancesList = $this->getList($where, 'sort, name');
+
+ return $entrancesList;
+ }
+
+ /**
+ * Get Entrance Detail
+ *
+ * @return array
+ */
+ function getEntranceDetail($entranceID = false)
+ {
+
+ // If a entrance ID has been supplied
+ if ($entranceID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Entrance'] = $entranceID;
+
+ } elseif (($entranceID = filter_input(INPUT_GET, 'EntranceID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // Otherwise if there a new entrance ID supplied via the request
+ $_SESSION[GLM_EVENT_SESSION]['Entrance'] = $entranceID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Entrance'])) {
+
+ // Otherwise, get the event ID from the session
+ $entranceID = $_SESSION[GLM_EVENT_SESSION]['Entrance'];
+
+ } else {
+
+ // Otherwise, we don't have an event id
+ return false;
+
+ }
+
+ $entranceDetail = $this->getEntry($entranceID);
+
+ return $entranceDetail;
+
+ }
+
+
+ /**
+ * Edit Entrance
+ *
+ * @return array
+ */
+ function editEntrance()
+ {
+
+ if (($entranceID = filter_input(INPUT_GET, 'EntranceID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Entrance'] = $entranceID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Entrance'])) {
+
+ // Otherwise, get the entrance ID from the session
+ $entranceID = $_SESSION[GLM_EVENT_SESSION]['Entrance'];
+
+ } else {
+
+ // Otherwise, we don't have a entrance id
+ return false;
+
+ }
+
+ $entranceDetail = $this->editEntry($entranceID);
+
+ return $entranceDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+ /**
+ * Update Entrance
+ *
+ * @return array
+ */
+ function updateEntrance()
+ {
+
+ if (($entranceID = filter_input(INPUT_GET, 'EntranceID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Entrance'] = $entranceID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Entrance'])) {
+
+ // Otherwise, get the entrance ID from the session
+ $entranceID = $_SESSION[GLM_EVENT_SESSION]['Entrance'];
+
+ } else {
+
+ // Otherwise, we don't have a state rep id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($entranceID);
+
+ return $r;
+
+ }
+
+
+ /**
+ * Add New Entrance
+ *
+ * @return array
+ */
+ function newEntrance()
+ {
+
+ $r = $this->newEntry();
+
+ return $r;
+
+ }
+
+ /**
+ * Insert entrance
+ *
+ * @return array
+ */
+ function insertEntrance()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current entrance to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Entrance'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+
+ /**\r
+ * Delete entrance\r
+ *\r
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete\r
+ *\r
+ * @return array\r
+ */\r
+ function entranceDelete($confirm = false)\r
+ {\r
+\r
+ // Is there a new entrance code selected?\r
+ if (($entranceID = filter_input(INPUT_GET, 'EntranceID', FILTER_SANITIZE_NUMBER_INT))) {\r
+\r
+ // If so then add it to the session\r
+ $_SESSION[GLM_EVENT_SESSION]['Entrance'] = $entranceID;\r
+\r
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Entrance'])) {\r
+\r
+ // Otherwise, get the entrance ID from the session\r
+ $entranceID = $_SESSION[GLM_EVENT_SESSION]['Entrance'];\r
+\r
+ } else {\r
+\r
+ // Otherwise, we don't have an entrance id\r
+ return false;\r
+\r
+ }\r
+\r
+ $entranceDetail = $this->deleteEntry($entranceID, $confirm);\r
+\r
+ return $entranceDetail;\r
+\r
+ }\r
+
+ /**\r
+ * Get Entrances Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getEntrancesStats($where = 'true')\r
+ {\r
+\r
+ $entrancesStats = $this->getStats($where);\r
+\r
+ return $entrancesStats;\r
+ }\r
+\r
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Events data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataEvents.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataEvents class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataEvents,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+
+
+ */
+class EventManagementDataEvents extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.event';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field - see documentation
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged',
+ 'quicktip' => ''
+
+ ),
+
+ // Name of event
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // General description of event
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description of dates for this event
+ 'event_dates' => array(
+ 'field' => 'event_dates',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Active flag
+ 'active' => array(
+ 'field' => 'active',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // event/Event Code
+ 'event_code' => array(
+ 'field' => 'event_code',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lgnie'
+ ),
+
+ // Image
+ 'image' => array(
+ 'field' => 'image',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Team Event
+ 'team_event' => array(
+ 'field' => 'team_event',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+/* Not using now
+ // Minimim number of nights stay
+ 'days' => array(
+ 'field' => 'days',
+ 'as' => false,
+ 'type' => 'integer',
+ 'minValue' => 1,
+ 'maxValue' => false,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 1,
+ 'use' => 'a'
+ ),
+
+ // Minimum number of adults
+ 'min_adults' => array(
+ 'field' => 'min_adults',
+ 'as' => false,
+ 'type' => 'integer',
+ 'minValue' => 1,
+ 'maxValue' => false,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 1,
+ 'use' => 'a'
+ ),
+*/
+
+ // Front end reservations by Event Code rather than displaying for selection\r
+ 'reserve_by_code' => array(\r
+ 'field' => 'reserve_by_code',\r
+ 'as' => false,\r
+ 'type' => 'checkbox',\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+
+ // May book multiple rooms
+ 'multiple_rooms' => array(
+ 'field' => 'multiple_rooms',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+/*
+ // Maximum number of rooms that may be booked a once
+ 'max_rooms' => array(
+ 'field' => 'max_rooms',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+*/
+ // Start Date
+ 'start_date' => array(
+ 'field' => 'start_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('1/1/'.date('Y').' +4 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'a'
+ ),
+
+ // End Date
+ 'end_date' => array(
+ 'field' => 'end_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('1/1/'.date('Y').' +4 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'a'
+ ),
+
+ // Last date event may be booked
+ 'cutoff_date' => array(
+ 'field' => 'cutoff_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('1/1/'.date('Y').' +4 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'a'
+ ),
+
+ // Use Required Stay
+ 'req_stay' => array(
+ 'field' => 'req_stay',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Must arrive by date
+ 'req_stay_arrive' => array(
+ 'field' => 'req_stay_arrive',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('1/1/'.date('Y').' +4 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'a'
+ ),
+
+ // Must depart no earlier than date - This is the date after the last required night's stay.
+ 'req_stay_depart' => array(
+ 'field' => 'req_stay_depart',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('1/1/'.date('Y').' +4 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'a'
+ ),
+
+ // Required Stay Notices
+ 'req_stay_notice' => array(
+ 'field' => 'req_stay_notice',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Date after which team inventory becomes available to anyone
+ 'open_res_date' => array(
+ 'field' => 'open_res_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('1/1/'.date('Y').' +4 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'a'
+ ),
+
+ // Confirmation hours (property must confirm by ...)
+ 'conf_hours' => array(
+ 'field' => 'conf_hours',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 48,
+ 'use' => 'a'
+ ),
+
+ // Inventory hold time in minutes
+ 'inven_hold_time' => array(
+ 'field' => 'inven_hold_time',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 30,
+ 'use' => 'a'
+ ),
+
+ // Sort
+ 'sort' => array(
+ 'field' => 'sort',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 999,
+ 'use' => 'a'
+ ),
+
+ // Address Line 1
+ 'addr1' => array(
+ 'field' => 'addr1',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Address Line 2
+ 'addr2' => array(
+ 'field' => 'addr2',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // City
+ 'city' => array(
+ 'field' => 'city',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // State
+ 'state' => array(
+ 'field' => 'state',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->states->toArray(),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 'MI',
+ 'use' => 'a'
+ ),
+
+ // ZIP/Postal Code
+ 'zip' => array(
+ 'field' => 'zip',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Country
+ 'country' => array(
+ 'field' => 'country',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->countries->toArray(),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Latitude
+ 'lat' => array(
+ 'field' => 'lat',
+ 'as' => false,
+ 'type' => 'latitude',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgnieudc'
+ ),
+
+ // Longitude
+ 'lon' => array(
+ 'field' => 'lon',
+ 'as' => false,
+ 'type' => 'longitude',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgnieudc'
+ ),
+
+ // Central_payment
+ 'central_payment' => array(\r
+ 'field' => 'central_payment',\r
+ 'as' => false,\r
+ 'type' => 'checkbox',\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+
+ // Central Payment E-Mail
+ 'central_payment_email' => array(\r
+ 'field' => 'central_payment_email',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+
+ // Host Property
+ 'host_property' => array(\r
+ 'field' => 'host_property',\r
+ 'as' => false,\r
+ 'type' => 'pointer',\r
+ 'p_table' => 'members.member',\r
+ 'p_field' => 'member_name',\r
+ 'p_id' => 'member_id',\r
+ 'p_where' => 'member_id in\r
+ (\r
+ SELECT DISTINCT member_id\r
+ FROM members.member_category\r
+ WHERE category_id IN\r
+ (SELECT category_id FROM members.category WHERE accommodations)\r
+ )',\r
+ 'p_blank' => true,
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'nieu'\r
+ ),\r
+
+ // Host Property\r
+ 'host_property_2' => array(\r
+ 'field' => 'host_property',\r
+ 'as' => false,\r
+ 'type' => 'pointer',\r
+ 'p_table' => 'members.member',\r
+ 'p_field' => 'member_name',\r
+ 'p_id' => 'member_id',\r
+ 'p_static' => true,\r
+ 'required' => true,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'view_only' => true,\r
+ 'use' => 'gldc'\r
+ ),\r
+\r
+ // Reservation Policy
+ 'res_policy' => array(
+ 'field' => 'res_policy',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Cancelation Policy
+ 'can_policy' => array(
+ 'field' => 'can_policy',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Payment Policy
+ 'pmt_policy' => array(
+ 'field' => 'pmt_policy',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Message to display at bottom of cart
+ 'cart_text' => array(
+ 'field' => 'cart_text',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Reservation Message to Guest
+ 'res_msg' => array(
+ 'field' => 'res_msg',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Confirmation Message to Guest
+ 'conf_msg' => array(
+ 'field' => 'conf_msg',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+
+ }
+
+
+ /**
+ * Get Events list
+ *
+ * @param string type of events list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getEventsList($whereRequest = false)
+ {
+ $where = '';
+
+ // If there's a specific whereRequest, use that only
+ if ($whereRequest) {
+
+ $where = $whereRequest;
+
+ } else {
+
+ // Get member ID from session - if available
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ // Get team ID from session - if available
+ $teamID = $_SESSION[GLM_EVENT_SESSION]['Team'];
+
+ // Get any specified event listing option - default to active
+ $option = 'active';
+ if (($eventsListOption = filter_input(INPUT_GET, 'EventsListOption', FILTER_SANITIZE_STRING))) {
+ $option = $eventsListOption;
+ }
+
+ // Clear Session Event Selection
+// $_SESSION[GLM_EVENT_SESSION]['Event'] = false;
+
+ // Select type of list
+ switch ($option) {
+ case 'all':
+ $where = 'true';
+ break;
+ case 'active':
+ $where = "active";
+ break;
+ case 'inactive':
+ $where = "NOT active AND end_date > 'now'";
+ break;
+ case 'expired':
+ $where = "active AND end_date < 'now'";
+ break;
+ case 'archived':
+ $where = "NOT active AND end_date < 'now'";
+ break;
+ case 'member':
+ if (!$memberID) {
+ return false;
+ }
+ $where = "T.id IN (
+ SELECT DISTINCT event
+ FROM eventmgt.inventory
+ WHERE member = $memberID
+ )";
+/* Not using event_prop anymore
+ SELECT DISTINCT event
+ FROM eventmgt.event_prop
+ WHERE property = $memberID
+ */
+ break;
+ case 'team':
+ if (!$teamID) {
+ return false;
+ }
+ $where = "T.id IN (
+ SELECT DISTINCT event
+ FROM eventmgt.team_property
+ WHERE team = $teamID
+ )";
+ break;
+ default:
+ echo "Option not set";
+ break;
+ }
+
+ }
+
+ // Get list of all available Events
+ $eventsList = $this->getList($where, 'start_date');
+ if (count($eventsList) == 0) {
+ return false;
+ }
+
+ return $eventsList;
+ }
+
+
+
+ /**
+ * Get Event Detail
+ *
+ * @return array
+ */
+ function getEventDetail()
+ {
+
+ // Is there a new event code selected?
+ if (($eventID = filter_input(INPUT_GET, 'EventID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Event'] = $eventID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+
+ // Otherwise, get the event ID from the session
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ } else {
+
+ // Otherwise, we don't have an event id
+ return false;
+
+ }
+
+ $eventDetail = $this->getEntry($eventID);
+
+ return $eventDetail;
+
+ }
+
+ /**
+ * Edit Event
+ *
+ * @return array
+ */
+ function editEvent()
+ {
+
+ // Is there a new event code selected?
+ if (($eventID = filter_input(INPUT_GET, 'EventID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Event'] = $eventID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+
+ // Otherwise, get the event ID from the session
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ } else {
+
+ // Otherwise, we don't have an event id
+ return false;
+
+ }
+
+ $eventDetail = $this->editEntry($eventID);
+ //echo "<pre>".print_r($eventDetail,1)."</pre>";\r
+
+ return $eventDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+
+ $fd = $r['fieldData'];
+
+ // Is Start date is later than End date
+ if ($fd['start_date']['timestamp'] > $fd['end_date']['timestamp']) {
+ $r['fieldFail']['start_date'] = 'Start date is later than end date.';
+ $r['status'] = false;
+ }
+
+ // Is cutoff date is later than end date
+ if ($fd['cutoff_date']['timestamp'] > $fd['end_date']['timestamp']) {
+ $r['fieldFail']['cutoff_date'] = 'Cutoff date is later than end date.';
+ $r['status'] = false;
+ }
+
+ return $r;
+ }
+
+ /**
+ * Update Event
+ *
+ * @return array
+ */
+ function updateEvent()
+ {
+ // If required dates is not selected, then drop the required start and end dates.
+ if (!isset($_REQUEST['req_stay']) || $_REQUEST['req_stay'] == '') {
+ unset($this->fields['req_stay_arrive']);
+ unset($this->fields['req_stay_depart']);
+ }
+
+ // Is there a new event code selected?
+ if (($eventID = filter_input(INPUT_GET, 'EventID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Event'] = $eventID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+
+ // Otherwise, get the event ID from the session
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ } else {
+
+ // Otherwise, we don't have an event id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($eventID);
+
+ return $r;
+
+ }
+
+ /**
+ * Insert Event
+ *
+ * @return array
+ */
+ function insertEvent()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current event to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Event'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Fees data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataFees.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataFees class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataFees.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataFees extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.fees';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Applied to (insert) - what type of entities is this fee for
+ 'affiliation_type' => array(
+ 'field' => 'affiliation_type',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'i'
+ ),
+
+ // Applied to (view)
+ 'affiliation_type_2' => array(
+ 'field' => 'affiliation_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->reference_type_numb->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gled'
+ ),
+
+ // Fee affiliation (non-standard pointer)
+ // Points to various tables depending on the "Applied To" value
+ 'owner' => array(
+ 'field' => 'owner',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'i'
+ ),
+
+ // Fee affiliation (non-standard pointer)
+ // Points to various tables depending on the "Applied To" value
+ 'owner_2' => array(
+ 'field' => 'owner',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gled'
+ ),
+
+ // Fee method
+ 'fee_method' => array(
+ 'field' => 'fee_method',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->fee_method_numb->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Event Specific - for only one particular event
+ 'room_specific' => array(
+ 'field' => 'room_specific',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Fee Name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Fee Amount
+ 'fee_amount' => array(
+ 'field' => 'fee_amount',
+ 'as' => false,
+ 'type' => 'float',
+ 'output_format' => '.2',
+ 'required' => true,
+ 'minValue' => 0.01,
+ 'unique' => false,
+ 'default' => 0.0,
+ 'use' => 'a'
+ ),
+
+ // Taxable
+ 'taxable' => array(
+ 'field' => 'taxable',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Itemize
+ 'itemize' => array(
+ 'field' => 'itemize',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Optional Service - guests may select
+ 'optional_service' => array(
+ 'field' => 'optional_service',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Request Service Quantity - If off then assume single unit quantity
+ 'service_quant' => array(
+ 'field' => 'service_quant',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Maximum Service Quantity - if service_quant on
+ 'service_max_quant' => array(
+ 'field' => 'service_max_quant',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 2,
+ 'use' => 'a'
+ ),
+
+ // Event Specific - for only one particular event
+ 'event_specific' => array(
+ 'field' => 'event_specific',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Event - if event_specific then this is the event
+ 'event' => array(
+ 'field' => 'event',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_sort' => 'start_date, name',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description - used on front-end for description of service
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Get an array of fees for a particular affiliated entity
+ *
+ * $listOption Optional Type of affiliation - see config.ini 'reference_type'
+ * If not supplied will check for FeesListOption GET value
+ * $whereRequest If supplied, use as WHERE clause instead
+ *
+ * @return object containing array as sub-objects
+ */
+ function getFees($listOption = false, $whereRequest = false)
+ {
+
+ $where = '';
+
+ // If there's a specific whereRequest, use that only
+ if ($whereRequest) {
+ $where = $whereRequest;
+ } else {
+
+ // Get Event ID from session - if available
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ // Get Member ID from session - if available
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ // Get any specified event listing option - default to active\
+ if ($listOption != '') {
+ $option = $listOption;
+
+ // Otheriwse check for list options provided in request
+ } elseif (($feesListOption = filter_input(INPUT_GET, 'FeesListOption', FILTER_SANITIZE_STRING))) {
+ $option = $feesListOption;
+ }
+
+ // Include selection of proper affiliation type
+ switch ($option) {
+ case 'event':
+ if ($eventID) {
+ $where .= "T.affiliation_type = ".$this->config->reference_type->event
+ ."AND owner = $eventID";
+ } else {
+ $where .= "false";
+ }
+ break;
+ case 'member':
+ if ($memberID) {
+ $where .= "T.affiliation_type = ".$this->config->reference_type->property
+ ."AND owner = $memberID\n";
+ } else {
+ $where .= "false";
+ }
+ break;
+ }
+ }
+
+ // Get the fees - return false if none found
+ $feesList = $this->getList($where, 'name');
+ if (!is_array($feesList) || count($feesList) == 0) {
+ return false;
+ }
+
+ // Get affiliation type for each fee
+ reset($feesList);
+ while( list($key, $val) = each( $feesList ) ) {
+
+ $aData = $this->getAffiliate(
+ $val['affiliation_type']['value'],
+ $val['owner']
+ );
+
+ if ($aData) {
+ $feesList[$key]['affiliation_type_name'] = $aData['applied_to_name'];
+ $feesList[$key]['owner_name'] = $aData['owner_name'];
+ }
+
+ // Specify if fee is in % rather than $
+ $feesList[$key]['feePercent'] = false;
+ if ($feesList[$key]['fee_method']['value'] >= 10) {
+ $feesList[$key]['feePercent'] = true;
+ }
+
+ } // Get Fee affiliation
+
+ return $feesList;
+ }
+
+ /**
+ * Get Fee Detail
+ *
+ * @return array
+ */
+ function getFeeDetail()
+ {
+
+ // Is there a new fee ID supplied?
+ if (!($feeID = filter_input(INPUT_GET, 'FeeID', FILTER_SANITIZE_NUMBER_INT))) {
+ // We don't have an fee id
+ return false;
+ }
+
+ $feeDetail = $this->getEntry($feeID);
+
+ // Get owner data
+ $aData = $this->getAffiliate(
+ $feeDetail['affiliation_type']['value'],
+ $feeDetail['owner']
+ );
+
+ if ($aData) {
+ $feeDetail = array_merge($feeDetail, $aData);
+ }
+
+ // Specify if fee is in % rather than $
+ $feeDetail['feePercent'] = false;
+ if ($feeDetail['fee_method']['value'] >= 10) {
+ $feeDetail['feePercent'] = true;
+ }
+
+ return $feeDetail;
+
+ }
+
+ /**
+ * Edit Fee
+ *
+ * @return array
+ */
+ function editFee()
+ {
+
+ // Is there a new fee ID supplied?
+ if (!($feeID = filter_input(INPUT_GET, 'FeeID', FILTER_SANITIZE_NUMBER_INT))) {
+ // We don't have an fee id
+ return false;
+
+ }
+
+ $feeDetail = $this->editEntry($feeID);
+
+ // Get owner data
+ $aData = $this->getAffiliate(
+ $feeDetail['affiliation_type']['value'],
+ $feeDetail['owner']
+ );
+
+ if ($aData) {
+ $feeDetail = array_merge($feeDetail, $aData);
+ }
+
+ return $feeDetail;
+
+ }
+
+ /**
+ * Update Fee
+ *
+ * @return array
+ */
+ function updateFee()
+ {
+
+ // Is there a new fee ID supplied?
+ if (!($feeID = filter_input(INPUT_GET, 'FeeID', FILTER_SANITIZE_NUMBER_INT))) {
+ if (!($feeID = filter_input(INPUT_POST, 'FeeID', FILTER_SANITIZE_NUMBER_INT))) {
+ echo "::::::";
+ // We don't have an fee id
+ return false;
+ }
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($feeID);
+
+ // Get owner data
+ $aData = $this->getAffiliate(
+ $r['fieldData']['affiliation_type']['value'],
+ $r['fieldData']['owner']
+ );
+
+ if ($aData) {
+ $r['fieldData'] = array_merge($r['fieldData'], $aData);
+ }
+
+ // Specify if fee is in % rather than $
+ $r['fieldData']['feePercent'] = false;
+
+ if ($r['fieldData']['fee_method']['value'] >= 10) {
+ $r['fieldData']['feePercent'] = true;
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * New Fee
+ *
+ * @return array
+ */
+ function newFeeAffiliation($r)
+ {
+
+ // Check for specified Fee type
+ // We need to check for name rather than number because that's what the js is sending us
+ if (!isset($_REQUEST['fee_type_code']) || $_REQUEST['fee_type_code'] == '') {
+ return false;
+ }
+
+ // Get type and affiliation
+ $feeType = trim($_REQUEST['fee_type_code']);
+ $affiliateID = false;
+
+ switch ($feeType) {
+ case 'event':
+ $feeTypeNumber = $this->config->reference_type->event;
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ $affiliateID = ($_SESSION[GLM_EVENT_SESSION]['Event'] - 0);
+ $feeTypeName = 'Event';
+ $aTable = 'event';
+ $aField = 'name';
+ $aFieldShort = 'event_code';
+ }
+ break;
+ case 'property':
+ $feeTypeNumber = $this->config->reference_type->property;
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ $affiliateID = ($_SESSION[GLM_EVENT_SESSION]['Member'] - 0);
+ $feeTypeName = 'Property';
+ $aTable = 'eventmgt.member';
+ $aField = 'name';
+ $aFieldShort = $aField;
+ }
+ break;
+ }
+
+ // If no match on Fee type, then fail
+ if ($affiliateID == false) {
+ return false;
+ }
+
+ // Get affiliate data
+ $sql = "SELECT $aField AS name,
+ $aFieldShort AS short_name
+ FROM $aTable
+ WHERE id = $affiliateID
+ ;";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $aData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // if no valid affiliate data - fail
+ if (!$aData) {
+ return false;
+ }
+
+ $r['fieldData']['fee_type_name'] = $feeTypeName;
+ $r['fieldData']['fee_type_code'] = $feeType;
+ $r['fieldData']['fee_type'] = $feeTypeNumber;
+ $r['fieldData']['affiliation_name'] = $aData['name'];
+ $r['fieldData']['affiliation'] = $affiliateID;
+ $r['fieldData']['affiliation_short'] = $aData['short_name'];
+
+ return $r;
+
+ }
+
+ function newFee()
+ {
+
+ $r = $this->newEntry();
+
+ $r = $this->newFeeAffiliation($r);
+
+ // echo "<pre>".print_r($r,1)."</pre>";
+ return $r;
+
+ }
+
+
+ /**
+ * Insert Fee
+ *
+ * @return array
+ */
+ function insertFee()
+ {
+
+ $r = $this->insertEntry();
+ $r = $this->newFeeAffiliation($r);
+
+ // echo "<pre>".print_r($r,1)."</pre>";
+ return $r;
+
+ }
+
+ /**
+ * Get Affiliate table and name
+ *
+ */
+ function getAffiliate($type, $affiliation)
+ {
+
+ // Deterimine Affliate table
+ $aTable = '';
+ $aField = '';
+ switch ($type) {
+ case $this->config->reference_type->event:
+ $aType = 'Event';
+ $aTable = 'event';
+ $aField = 'name';
+ $aFieldShort = 'event_code';
+ break;
+ case $this->config->reference_type->property:
+ $aType = 'Property';
+ $aTable = 'eventmgt.member';
+ $aField = 'name';
+ $aFieldShort = $aField;
+ break;
+ }
+
+ $r = false;
+
+ // If we have a good affiliate relationship
+ if ($aField != '') {
+
+ $sql = "SELECT $aField AS name,
+ $aFieldShort AS short_name
+ FROM $aTable
+ WHERE id = $affiliation
+ ;";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $aData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if ($aData) {
+ $r = array(
+ 'fee_type_name' => $aType,
+ 'affiliation_name' => $aData['name'],
+ 'affiliation_short' => $aData['short_name']
+ );
+ }
+ }
+
+ return $r;
+
+ }
+
+ /**\r
+ * Delete Fee\r
+ *\r
+ * @return array\r
+ */\r
+ function feeDelete($confirm = false)\r
+ {\r
+ // Is there a new fee code selected?\r
+ if (($feeID = filter_input(INPUT_GET, 'FeeID', FILTER_SANITIZE_NUMBER_INT))) {\r
+\r
+ // If so then add it to the session\r
+ $_SESSION[GLM_EVENT_SESSION]['Fee'] = $feeID;\r
+\r
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Fee'])) {\r
+\r
+ // Otherwise, get the fee ID from the session\r
+ $feeID = $_SESSION[GLM_EVENT_SESSION]['Fee'];\r
+\r
+ } else {\r
+\r
+ // Otherwise, we don't have a fee id\r
+ return false;\r
+\r
+ }\r
+\r
+ $feeDetail = $this->deleteEntry($feeID, $confirm);\r
+ return $feeDetail;\r
+\r
+ }\r
+\r
+
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Inventory data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataInventory.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementAdminInventory class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataInventory.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementDataInventory extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.inventory';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'a'
+ ),
+
+ // Event selection
+ 'event' => array(
+ 'field' => 'event',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'lgud'
+ ),
+
+ // Event ID
+ 'event_id' => array(
+ 'field' => 'event',
+ 'as' => 'event_id',
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgud'
+ ),
+
+ // Property selection
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'lgud'
+ ),
+
+ // Member Street Address - From main member db
+ 'member_street' => array(
+ 'field' => 'member', // ID in member table is same as in eventmgt.member
+ 'as' => 'street',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'street',
+ 'p_id' => 'member_id',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member City - From main member db
+ 'member_city' => array(
+ 'field' => 'member', // ID in member table is same as in eventmgt.member
+ 'as' => 'city',
+ 'type' => 'pointer',
+ 'p_table' => 'members.city',
+ 'p_field' => 'city_name',
+ 'p_id' => 'city_id',
+ 'p_where' => 'M.member_id = T.member AND city.city_id = M.city_id',
+ 'p_from' => 'members.member M',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // member ID
+ 'memb_id' => array(
+ 'field' => 'member',
+ 'as' => 'member_id',
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgdu'
+ ),
+
+ // Accommodation ID
+ 'accommodation_id' => array(
+ 'field' => 'accommodation',
+ 'as' => 'accommodation_id',
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'au'
+ ),
+
+ // Accommodation
+ 'accommodation' => array(
+ 'field' => 'accommodation',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.accommodation',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'ni'
+ ),
+
+ // Accommodation name
+ 'accommodation_name' => array(
+ 'field' => 'accommodation',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.accommodation',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'lged'
+ ),
+
+ // Start Date
+ 'start_date' => array(
+ 'field' => 'start_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'ni'
+ ),
+
+ // End Date
+ 'end_date' => array(
+ 'field' => 'end_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'niu'
+ ),
+
+ // Date
+ 'date' => array(
+ 'field' => 'date',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => date('m/d/Y'),
+ 'use' => 'lgeud'
+ ),
+
+ // Assigned to Event
+ 'assigned' => array(
+ 'field' => 'assigned',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'minValue' => 1,
+ 'use' => 'a'
+ ),
+
+ // Available to reserve
+ 'available' => array(
+ 'field' => 'available',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'lgeud'
+ ),
+
+ // On Hold
+ 'on_hold' => array(
+ 'field' => 'id',
+ 'as' => 'on_hold',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.inven_hold',
+ 'p_field' => 'quant',
+ 'p_id' => 'inventory',
+ 'p_where' => "expire_time > '".date('r')."' AND inventory = T.id",
+ 'p_sum' => true,
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'lg'
+ ),
+
+/* not using now
+ // Minimum Nights Requred
+ 'min_nights' => array(
+ 'field' => 'min_nights',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 1,
+ 'minValue' => 1,
+ 'use' => 'a'
+ ),
+*/
+ // Event Room Rate - For standard number of occupants
+ 'rate' => array(
+ 'field' => 'rate',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0.0,
+ 'minValue' => 1,
+ 'use' => 'a'
+ )
+/* not using now
+ // Additional Person Rate
+ 'add_person' => array(
+ 'field' => 'add_person',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0.0,
+ 'minValue' => 0,
+ 'use' => 'a'
+ )
+*/
+
+/* not using policies at this level for now
+ // Request Policy
+ 'res_policy' => array(
+ 'field' => 'res_policy',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Cancel Policy
+ 'can_policy' => array(
+ 'field' => 'can_policy',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+*/
+ );
+ }
+
+ /**
+ * Get Inventory list
+ *
+ * @param string type of events list
+ *
+ * @return object containing array
+ * timestamp of first date of inventory
+ * array of inventory items
+ */
+ function getInvenList($setType = false, $setId = false)
+ {
+
+ // Get any specified member listing option - default to event
+ if ($setType) {
+
+ $option = $setType;
+
+ } else {
+
+ $option = 'accom';
+ if (($invenListOption = filter_input(INPUT_GET, 'InvenListOption', FILTER_SANITIZE_STRING))) {
+ $option = $invenListOption;
+ }
+
+ }
+
+ // Check for setId passed in URL
+ $setIdRequest = ($_REQUEST['setId'] - 0);
+ if ($setIdRequest > 0) {
+ $setId = $setIdRequest;
+ }
+
+ // Select type of list
+ $where = '';
+ switch ($option) {
+ case 'all':
+ $where = 'TRUE';
+ $type = 'Summary';
+ break;
+ case 'event':
+ // Get event ID from session - if available
+ $eventID = ( $setId ? $setId : $_SESSION[GLM_EVENT_SESSION]['Event'] );
+ if (!$eventID) {
+ return false;
+ }
+ $where = "T.event = $eventID";
+ $type = 'Summary';
+ break;
+ case 'member':
+ $memberID = ( $setId ? $setId : $_SESSION[GLM_EVENT_SESSION]['Member'] );
+ if (!$memberID) {
+ return false;
+ }
+ $where = "T.member = $memberID";
+ $type = 'Calendar';
+ break;
+ case 'accom':
+ // Get event ID from session - if available
+ $accomID = ( $setId ? $setId : $_SESSION[GLM_EVENT_SESSION]['Accom'] );
+ if (!$accomID) {
+ return false;
+ }
+ $where = "T.accommodation = $accomID";
+ $type = 'Calendar';
+ break;
+ case 'team':
+ $teamID = ( $setId ? $setId : $_SESSION[GLM_EVENT_SESSION]['Team'] );
+ if (!$teamID) {
+ return false;
+ }
+ $where = "
+ T.member in (
+ SELECT property
+ FROM eventmgt.team_property
+ WHERE team = $teamID
+ )";
+ $type = 'Calendar';
+ break;
+ default:
+ echo "Option not set";
+ break;
+ }
+
+ // Only look for inventory from now forward.
+ $where .= " AND T.date > 'now'";
+
+ // Get list of all available Events
+ $inventoryList = $this->getList($where);
+
+ // Clean up and fix specific fields and find first date of inventory
+ if ($inventoryList != false) {
+
+ $firstDate = strtotime('+5 years'); // Start with something far out in time
+ reset($inventoryList);
+ while( list($key, $val) = each( $inventoryList ) ) {
+
+ $thisDate = strtotime($val['date']['date']);
+
+ // Is this date earlier than any others?
+ if ($thisDate < $firstDate) {
+ $firstDate = $thisDate;
+ }
+
+ // Convert dates to format required for fullcalendar
+ $inventoryList[$key]['cal_date'] = date('Y-m-d', $thisDate);
+
+ // Make member_name copy safe for inclusion in JAVAscript code
+ $inventoryList[$key]['member_name_h'] = addslashes($val['property']);
+
+ }
+ }
+
+ // Create a summary for certain list options
+ $sum = array();
+ $dates = array();
+ $have_summary = false;
+ $total_properties = 0;
+ $total_assigned = array();
+ $total_available = array();
+ $total_sold = array();
+ if ($type == 'Summary' && is_array($inventoryList) && count($inventoryList) > 0) {
+
+ // Start by building list of all inventory dates
+ // *** should be able to do this from the event dates data ***
+ foreach ($inventoryList as $inv) {
+ // Add to dates list
+ $t = strtotime($inv['date']['date']);
+ $dates[$t] = date('m/d/Y', $t);
+ $total_assigned[$t] = 0;
+ $total_available[$t] = 0;
+ $total_sold[$t] = 0;
+ }
+ ksort($dates);
+
+ // Now go through it again and build all the data
+ foreach ($inventoryList as $inv) {
+ // If event has not been set yet
+ $event_id = $inv['event_id'];
+ if (!isset($sum[$event_id])) {
+ $sum[$event_id] = array(
+ 'id' => $event_id,
+ 'name' => $inv['event'],
+ 'memb' => array()
+ );
+ }
+
+ // If member has not been set yet
+ $memb_id = $inv['member_id'];
+ if (!isset($sum[$event_id]['memb'][$memb_id])) {
+
+ // Get Member credit card types
+ $sql = "
+ SELECT CT.ccard_type_name AS ccardName
+ FROM members.ccard_type CT, members.member_ccard_type MCT
+ WHERE MCT.member_id = $memb_id
+ AND CT.ccard_type_id = MCT.ccard_type_id
+ ORDER BY CT.ccard_type_name
+ ";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $cc_types = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ if (count($cc_types) == 0) {
+ $cc_types = false;
+ }
+
+ $sum[$event_id]['memb'][$memb_id] = array(
+ 'id' => $memb_id,
+ 'name' => $inv['member'],
+ 'street' => $inv['street'],
+ 'city' => $inv['city'],
+ 'accom' => array(),
+ 'cc_types' => $cc_types
+ );
+
+ $total_properties++;
+ }
+
+ // If accommodation has not been set yet
+ $accom_id = $inv['accommodation_id'];
+ if (!isset($sum[$event_id]['memb'][$memb_id]['accom'][$accom_id])) {
+ $sum[$event_id]['memb'][$memb_id]['accom'][$accom_id] = array(
+ 'id' => $memb_id,
+ 'name' => $inv['accommodation'],
+ 'date' => array()
+ );
+
+ // Also build all the dates as empty entries
+ reset($dates);
+ while( list($k, $v) = each($dates) ) {
+ $sum[$event_id]['memb'][$memb_id]['accom'][$accom_id]['date'][$k] = false;
+ }
+
+ }
+
+ // Add this inventory item
+ $inven_id = $inv['id'];
+ $t = strtotime($inv['date']['date']);
+ $sum[$event_id]['memb'][$memb_id]['accom'][$accom_id]['date'][$t] = array(
+ 'id' => $inven_id,
+ 'date' => $inv['date']['date'],
+ 'assigned' => $inv['assigned'],
+ 'avail' => $inv['available'],
+ 'sold' => $inv['assigned'] - $inv['available'],
+ 'rate' => $inv['rate']
+ );
+ ksort($sum[$event_id]['memb'][$memb_id]['accom'][$accom_id]['date']);
+
+ $total_assigned[$t] += $inv['assigned'];
+ $total_available[$t] += $inv['available'];
+ $total_sold[$t] += ($inv['assigned'] - $inv['available']);
+
+ }
+
+ $sum[$event_id]['total_properties'] = $total_properties;
+ $sum[$event_id]['total_assigned'] = $total_assigned;
+ $sum[$event_id]['total_available'] = $total_available;
+ $sum[$event_id]['total_sold'] = $total_sold;
+
+ // Calculate overall uptake rate per day
+ $ta = 0;
+ $ts = 0;
+ $daily_uptake = array();
+ while (list($k, $v) = each($total_assigned)) {
+ $ta += $v;
+ $ts += $total_sold[$k];
+
+ // Calculate uptake rate for this day
+ $sum[$event_id]['daily_uptake'][$k] = sprintf('%.2f', (($total_sold[$k] / $v) * 100) )."%";
+ }
+ $sum[$event_id]['overall_uptake'] = sprintf('%.2f', (($ts / $ta) * 100) )."%";
+
+ $have_summary = true;
+
+ }
+
+ $r = array(
+ 'inventory' => $inventoryList,
+ 'firstDate' => $firstDate,
+ 'type' => $type,
+ 'dates' => $dates,
+ 'sum' => $sum,
+ 'have_sum' => $have_summary
+ );
+
+ return $r;
+
+ }
+
+
+ /**
+ * Get Inventory Detail
+ *
+ * @return array
+ */
+ function getInvenDetail($invID = false)
+ {
+
+ // If an inventory ID is supplied
+ if ($invID) {
+ $inventoryID = $invID;
+
+ // Otherwise is there a new inventory item selected selected?
+ } elseif (($inventoryID = filter_input(INPUT_GET, 'InvenID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Inven'] = $inventoryID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Inven'])) {
+
+ // Otherwise, get the inventory ID from the session
+ $inventoryID = $_SESSION[GLM_EVENT_SESSION]['Inven'];
+
+ } else {
+
+ // Otherwise, we don't have an inventory id
+ return false;
+
+ }
+
+ $inventoryDetail = $this->getEntry($inventoryID);
+
+ return $inventoryDetail;
+
+ }
+
+
+ /**
+ * Edit Inventory
+ *
+ * @return array
+ */
+ function editInven()
+ {
+
+ if (($invenID = filter_input(INPUT_GET, 'InvenID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Inven'] = $invenID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Inven'])) {
+
+ // Otherwise, get the inventory ID from the session
+ $invenID = $_SESSION[GLM_EVENT_SESSION]['Inven'];
+
+ } else {
+
+ // Otherwise, we don't have an inventory id
+ return false;
+
+ }
+
+ $invenDetail = $this->editEntry($invenID);
+
+ return $invenDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+/*
+ $fd = $r['fieldData'];
+
+ // Is Start date is later than End date
+ if (strtotime($fd['start_date']) > strtotime($fd['end_date'])) {
+ $r['fieldFail']['start_date'] = 'Start date is later than end date.';
+ $r['status'] = false;
+ }
+
+ // Is cutoff date is later than end date
+ if (strtotime($fd['cutoff_date']) > strtotime($fd['end_date'])) {
+ $r['fieldFail']['cutoff_date'] = 'Cutoff date is later than end date.';
+ $r['status'] = false;
+ }
+*/
+ return $r;
+ }
+
+ /**
+ * Update Inventory
+ *
+ * @return array
+ */
+ function updateInven()
+ {
+
+ if (($invenID = filter_input(INPUT_GET, 'InvenID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Inven'] = $invenID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Inven'])) {
+
+ // Otherwise, get the inventory ID from the session
+ $invenID = $_SESSION[GLM_EVENT_SESSION]['Inven'];
+
+ } else {
+
+ // Otherwise, we don't have a inventory id
+ return false;
+
+ }
+
+ // Assume no delete and no delete failure
+ $delete = false;
+ $deleteFail = false;
+ $reason = array();
+
+ // Check if we have valid data
+ $r = $this->updateEntry($invenID, 'id', false);
+ if ($r['status']) {
+
+ // check if this is a Delete request
+ if (isset($_REQUEST['submitType']) && $_REQUEST['submitType'] == 'Delete Selected Inventory') {
+
+ // Check if there are room block associated with this inventory
+ $sql = "
+ SELECT COUNT(id)
+ FROM eventmgt.room_block_seg
+ WHERE event = ".$r['fieldData']['event_id']."
+ AND accommodation = ".$r['fieldData']['accommodation_id'].";
+ ";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $blockData = $stmt->fetch(PDO::FETCH_ASSOC);
+ if ($blockData['count'] > 0) {
+ // Can't delete because room blocks associated with this inventory exist
+ $r['status'] = false;
+ $reason[] = 'The selected inventory is in use in a room block.';
+ $reason[] = 'Delete the room block first if you want to delete this inventory.';
+ $delete = false;
+ $deleteFail = true;
+ } else {
+ // No room blocks so inventory may be deleted.
+ $delete = true;
+ }
+ }
+
+ // Check if this is only the original date
+ if ($r['fieldStore']['date'] == $r['fieldStore']['end_date'] &&
+ $r['fieldData']['date']['date'] == $_REQUEST['original_date']) {
+
+ $fields = $this->fields;
+ unset($fields['end_date']);
+ $this->fields = $fields;
+
+ // It's only the original date, so do again but store it this time or delete it
+ if ($delete) {
+
+ // Delete requested
+ $sql = "DELETE FROM eventmgt.inventory
+ WHERE id = ".$r['fieldData']['id'].";";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+
+ $r['fieldData']['date']['date'] .= " *** DELETED *** ";
+
+ } else {
+
+ $r = $this->updateEntry($invenID);
+
+ }
+
+ } else { // This is either not the original date or it's a date range
+
+ // Check for sane dates
+ if ($r['fieldData']['date']['timestamp'] > $r['fieldData']['end_date']['timestamp']) {
+
+ $r['status'] = false;
+ $r['fieldFail']['end_date'] = "Must be equal to or later than From Date.";
+
+ } else {
+
+ $accom_id = ($_REQUEST['accom_id'] - 0);
+ $event_id = ($_REQUEST['event_id'] - 0);
+ $memb_id = ($_REQUEST['member_id'] - 0);
+
+ // Delete any inventory for this accommodation and event
+ $sql = "DELETE FROM eventmgt.inventory
+ WHERE event = ".$event_id."
+ AND accommodation = ".$accom_id."
+ AND date >= '".$r['fieldData']['date']['date']."'
+ AND date <= '".$r['fieldData']['end_date']['date']."';";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+
+ // Check if this is a request to delete the inventory
+ if (isset($_REQUEST['submitType']) && $_REQUEST['submitType'] == 'Delete Selected Inventory') {
+ $r['fieldData']['date']['date'] .= " through ".$r['fieldData']['end_date']['date'].' *** DELETED ***';
+ } else {
+
+ // Insert updated inventory for date range (note incriment is a bit more to accommodate leap seconds)
+ $sql = "INSERT INTO eventmgt.inventory
+ (date, member, accommodation, event, assigned, available, rate)
+ VALUES
+ ('{date}', $memb_id, $accom_id, $event_id, ".$r['fieldStore']['assigned'].",
+ ".$r['fieldStore']['available'].", ".$r['fieldStore']['rate']."
+ );
+ ";
+
+ // For each date, create new inventory.
+ for ($d = $r['fieldData']['date']['timestamp'] ;
+ $d <= $r['fieldData']['end_date']['timestamp'] ;
+ $d = strtotime(date('m/d/Y', $d+86500))) {
+
+ $date = date('m/d/Y', $d);
+ $s = str_replace('{date}', $date, $sql);
+ $stmt = $this->dbh->prepare($s);
+ $stmt->execute();
+
+ }
+
+ // Change date on detail display to show range
+ $r['fieldData']['date']['date'] .= " through ".$r['fieldData']['end_date']['date'];
+ }
+ }
+ }
+
+ }
+
+ // Check if there was a delete failure
+ if ($deleteFail) {
+ $r['status'] = false;
+ if (is_array($r['reason'])) {
+ $reason = array_merge($r['reason'], $reason);
+ }
+ $r['reason'] = $reason;
+ }
+
+ return $r;
+
+ }
+
+
+ /**
+ * Add Inventory
+ *
+ * @return array
+ */
+ function addInven()
+ {
+ $reason = array();
+
+ // Make sure an Event has been selected.
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+ } else {
+ $reason[] = "No event has been selected. Please select an Event and Property before adding inventory.";
+ }
+
+ // Get selected event and property data
+ $eventData = $this->getEventMemberData($eventID);
+
+ // Set dates to default to event dates
+ $this->fields['start_date']['default'] = strtotime($eventData['event_start_date']);
+ $this->fields['end_date']['default'] = strtotime($eventData['event_end_date']);
+ $this->fields['min_nights']['default'] = $eventData['event_days'];
+
+ // Get new entry fields
+ $r = $this->newEntry();
+
+ // Check for available properties/accommodations
+ if (count($r['fieldData']['accommodation']['pick_list']) == 0) {
+ $r['status'] = false;
+ $r['reason'][] = 'No property accommodations in system to select from. Please add accommodations to a property.';
+ }
+
+ // Add in static Event and Property data
+ $r['fieldData'] = array_merge($r['fieldData'], $eventData);
+
+ // Add in member/accommodation data
+ $membAccom = $this->getMembAccomMatrix();
+ $r['membAccom'] = $membAccom;
+
+ // echo "<pre>".print_r($r,1)."</pre>";
+ return $r;
+
+ }
+
+ /**
+ * Insert Inventory
+ *
+ * @return array
+ */
+ function insertInven()
+ {
+
+ // Get selected event and property data using ID's passed from form
+ $eventID = ($_REQUEST['event'] - 0);
+ $memberID = ($_REQUEST['member'] - 0);
+ $eventData = $this->getEventMemberData($eventID);
+
+ // Process input, but don't store any result
+ $r = $this->insertEntry(false);
+
+ // Add in static Event and Property data
+ $r['fieldData'] = array_merge($r['fieldData'], $eventData);
+
+ // Check for sane dates
+ if ($r['fieldData']['start_date']['timestamp'] > $r['fieldData']['end_date']['timestamp']) {
+ $r['status'] = false;
+ $r['fieldFail']['start_date'] = 'First date may not be later than last date when creating inventory.';
+ }
+
+ if ($memberID > 0 && $r['status'] ) {
+
+ // Check for existing inventory conflicting with this new inventory
+ $sql = "SELECT count(id)
+ FROM eventmgt.inventory
+ WHERE event = $eventID
+ AND member = $memberID
+ AND accommodation = ".$r['fieldStore']['accommodation']."
+ AND date BETWEEN ".$r['fieldStore']['start_date']." AND ".$r['fieldStore']['end_date']."
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ if ($eventData['count'] > 0) {
+ $r['status'] = false;
+ $r['fieldFail']['start_date'] = 'Inventory already exists for at least one of the dates requested.';
+ }
+ }
+
+ if ($memberID == 0) {
+ $r['fieldFail']['member'] = 'Member is required.';
+ }
+
+ // If it's OK to create the inventory
+ if ($r['status']) {
+
+ // Add each night as separate inventory item
+ $s = $r['fieldData']['start_date']['timestamp'];
+ $e = $r['fieldData']['end_date']['timestamp'];
+ $sql = array();
+ for ($date=$s ; $date<=$e ; $date=strtotime(date('m/d/Y',$date)." +1 day")) {
+ $sql[] = "INSERT INTO eventmgt.inventory
+ (event, member, accommodation, date, assigned, available, rate)
+ VALUES
+ (
+ $eventID, $memberID, ".$r['fieldStore']['accommodation'].",
+ '".date('m/d/Y',$date)."', ".$r['fieldStore']['assigned'].",
+ ".$r['fieldStore']['assigned'].", ".$r['fieldStore']['rate']."
+ );
+ \n";
+ }
+/* Not using event_prop table anymore
+ // Check for existing event/property table entry
+ $sql2 = "SELECT count(id)
+ FROM eventmgt.event_prop
+ WHERE event = $eventID
+ AND property = $memberID
+ ;";
+ $stmt = $this->dbh->prepare($sql2);
+ $stmt->execute();
+ $eventpropData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // If there's not an entry, add one
+ if ($eventpropData['count'] == 0) {
+ $sql[] = "INSERT INTO eventmgt.event_prop
+ (event, property)
+ VALUES
+ ($eventID, $memberID)
+ ;";
+
+ }
+*/
+ // Try to add this inventory
+ try {
+ $this->dbh->beginTransaction();
+ foreach ($sql as $s) {
+ $this->dbh->exec($s);
+ }
+ $this->dbh->commit();
+ } catch (Exception $e) {
+ $this->dbh->rollBack();
+ $r['status'] = false;
+ $r['reason'][] = 'Unable to store new inventory for unknown reason. ';
+ // var_dump($e);
+ }
+
+ // Add to event-property table
+ }
+
+ // Add in member/accommodation data
+ $membAccom = $this->getMembAccomMatrix();
+ if ($memberID > 0) {
+ $r['membSelected'] = $membAccom[$memberID];
+ $membAccom[$memberID]['selected'] = true;
+ }
+ $r['membAccom'] = $membAccom;
+
+ // Check for selected accommodation
+ $a = ($r['fieldData']['accommodation']['in'] - 0);
+ if ($a > 0) {
+ $r['membSelected']['accoms'][$a]['selected'] = true;
+ }
+
+
+ // If succesful then set current inventory to the one just inserted.
+ if ($r['status']) {
+
+ $sql = "select currval('inventory_id_seq');";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $last = $stmt->fetch(PDO::FETCH_ASSOC);
+ $r['insertedID'] = $last['currval'] ;
+
+ }
+
+ return $r;
+
+ }
+
+
+
+ /**
+ * getMembAccomMatrix
+ *
+ * @param integer $memberID
+ */
+ function getMembAccomMatrix()
+ {
+
+ // Get property/accommodation matrix
+ if (count($reason) == 0) {
+ $sql = "SELECT M.id AS memb_id,
+ M.name AS memb_name,
+ A.id AS accom_id,
+ A.name AS accom_name
+ FROM eventmgt.member M, eventmgt.accommodation A
+ WHERE A.member = M.id
+ ORDER BY M.name, A.sort
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $membAccomData = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ if (count($membAccomData) == 0) {
+ $reason[] = "No properties with accommodations are currently listed in the system.";
+ }
+ }
+
+ // Build array of Members with their accommodations
+ $membAccom = array();
+ foreach ($membAccomData as $d) {
+
+ // If member hasn't been added to array yet
+ if (!isset($membAccom[$d['memb_id']])) {
+ $membAccom[$d['memb_id']] = array(
+ 'membID' => $d['memb_id'],
+ 'membName' => $d['memb_name'],
+ 'accoms' => array()
+ );
+ }
+
+ // Add this accommodation
+ $membAccom[$d['memb_id']]['accoms'][$d['accom_id']] = array(
+ 'accomID' => $d['accom_id'],
+ 'accomName' => $d['accom_name']
+ );
+ }
+
+ return $membAccom;
+ }
+
+ /**
+ * Get Event and Member information for specified event and member ID
+ *
+ * @param integer $eventID
+ * @param integer $memberID
+ */
+ function getEventMemberData($eventID)
+ {
+ // Get event Data
+ $sql = "SELECT name, event_code, start_date, end_date, days
+ FROM eventmgt.event
+ WHERE id = $eventID;
+ ";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // Add event information to returned array
+ $r['event'] = $eventData['name'];
+ $r['event_code'] = $eventData['event_code'];
+ $r['event_id'] = $eventID;
+ $r['event_days'] = $eventData['days'];
+ $r['event_start_date'] = $eventData['start_date'];
+ $r['event_end_date'] = $eventData['end_date'];
+
+/*
+ // Get property Data
+ $sql = "SELECT name
+ FROM eventmgt.member
+ WHERE id = $memberID;
+ ";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $memberData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // Add event information to returned array
+ $r['member'] = $memberData['name'];
+ $r['member_id'] = $memberID;
+*/
+ return $r;
+
+ }
+
+
+
+}
+
+
+
+
+?>
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Member Scans For data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataMemberScansFor.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataMemberScansFor class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataMemberScansFor,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementDataMemberScansFor extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.member_scans_for';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Pointer to a member who does the scanning
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Name of member who does the scanning
+ 'member_name' => array(
+ 'field' => 'member',
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Pointer to a member who the scanning is for
+ 'scans_for' => array(
+ 'field' => 'scans_for',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Name of member who does the scanning
+ 'scans_for_name' => array(
+ 'field' => 'scans_for',
+ 'as' => 'scans_for_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ )
+
+ );
+ }
+
+ /**
+ * Get List
+ *
+ *
+ * @return object containing array as sub-objects
+ */
+ public function getMemberScansForList($memberID = false)
+ {
+
+ // if member ID is not supplied, try to find it
+ if ($memberID == false) {
+
+ // Check submit input
+ $memberID = filter_input(INPUT_GET, 'MemberID', FILTER_SANITIZE_NUMBER_INT);
+
+ // If we still don't have it
+ if ($memberID == false || $memberID < 1) {
+
+ // Try the session
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Member'])) {
+
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ }
+
+ }
+
+ }
+
+ // If we still don't have a valid member ID
+ if ($memberID == false || ($memberID - 0) <= 0) {
+ return false;
+ }
+
+ $where = "T.member = $memberID";
+
+ // Get the list of members a member scans for
+ $memberScansFor = $this->getList($where);
+ if (count($memberScansFor) == 0) {
+ return false;
+ }
+
+ return $memberScansFor;
+
+ }
+
+ /**
+ * Update member scans for list
+ *
+ * Expects request input "selectedMember[id]" array.
+ */
+
+ public function updateMemberScansForList($memberID = false)
+ {
+
+ if ($memberID == false) {
+ return false;
+ }
+
+ // Query to delete current Member Scans For list
+ $sql = "
+ BEGIN;
+ DELETE FROM eventmgt.member_scans_for
+ WHERE member = $memberID;
+ ";
+
+ // Now add in any members who this member will be scanning for
+ $newMembers = $_REQUEST['selectedMember'];
+ if ($newMembers) {
+ foreach ($newMembers as $m) {
+ $sql .= "
+ INSERT INTO eventmgt.member_scans_for
+ ( member, scans_for )
+ VALUES ( $memberID, $m )
+ ;";
+ }
+ }
+ $sql .= "COMMIT;";
+ $this->dbh->exec($sql);
+
+ return $this->getMemberScansForList($memberID);
+
+ }
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Members data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataMembers.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataMembers class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataMembers.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+class EventManagementDataMembers extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.member';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'a'
+ ),
+
+ // Member Type
+ 'member_type' => array(
+ 'field' => 'member_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->member_type->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 1,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // E-Mail
+ 'email' => array(
+ 'field' => 'email',
+ 'as' => false,
+ 'type' => 'email',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Processing E-Mail
+ 'proc_email' => array(
+ 'field' => 'proc_email',
+ 'as' => false,
+ 'type' => 'email',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Processing E-Mail #2
+ 'proc_email2' => array(
+ 'field' => 'proc_email2',
+ 'as' => false,
+ 'type' => 'email',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Notify member of each checkout
+ 'checkout_notify' => array(
+ 'field' => 'checkout_notify',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => true,
+ 'use' => 'a'
+ ),
+
+ // Check In Time
+ 'check_in' => array(
+ 'field' => 'check_in',
+ 'as' => false,
+ 'type' => 'time',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Check Out Time
+ 'check_out' => array(
+ 'field' => 'check_out',
+ 'as' => false,
+ 'type' => 'time',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Defalut Ticket Policy
+ 'def_ticket_pol' => array(
+ 'field' => 'def_ticket_pol',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+
+ /*
+ * Fields used whether or not we're using an integrated member database
+ */
+
+/* not using policies at this level for now
+ // Defalut Reservation Policy
+ 'def_res_pol' => array(
+ 'field' => 'def_res_pol',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+
+ // Defalut Cancel Policy
+ 'def_can_pol' => array(
+ 'field' => 'def_can_pol',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+*/
+ // Member amenity #1
+ 'amen_1' => array(
+ 'field' => 'amen_1',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member amenity #2
+ 'amen_2' => array(
+ 'field' => 'amen_2',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member amenity #3
+ 'amen_3' => array(
+ 'field' => 'amen_3',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member amenity #4
+ 'amen_4' => array(
+ 'field' => 'amen_4',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member amenity #5
+ 'amen_5' => array(
+ 'field' => 'amen_5',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member amenity #6
+ 'amen_6' => array(
+ 'field' => 'amen_6',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member amenity #7
+ 'amen_7' => array(
+ 'field' => 'amen_7',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member amenity #8
+ 'amen_8' => array(
+ 'field' => 'amen_8',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member amenity #9
+ 'amen_9' => array(
+ 'field' => 'amen_9',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member amenity #10
+ 'amen_10' => array(
+ 'field' => 'amen_10',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Intro Text for front-end
+ 'intro_text' => array(
+ 'field' => 'intro_text',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_UNSAFE_RAW,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Checkout E-Mail
+ 'checkout_email' => array(
+ 'field' => 'checkout_email',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+
+
+ /*
+ * Fields used if we're using an integrated member database
+ */
+ if ($this->config->option->member_db_integrated) {
+
+ $integratedDb = array(
+
+ // Member name - From main member db - Used only if db is Integrated
+ 'member_name' => array(
+ 'field' => 'id', // ID in member table is same as in eventmgt.member
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'member_name',
+ 'p_id' => 'member_id',
+ // Only permit members set at providing accommodations
+ 'p_where' => 'member_id in
+ (
+ SELECT DISTINCT member_id
+ FROM members.member_category
+ WHERE category_id IN
+ (SELECT category_id FROM members.category WHERE accommodations)
+ )',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'nid'
+ ),
+
+ // Member name - From main member db - Used only if db is Integrated
+ 'member_name_view' => array(
+ 'field' => 'id', // ID in member table is same as in eventmgt.member
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'member_name',
+ 'p_id' => 'member_id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member login - From main member db - Used only if db is Integrated
+ 'member_login_view' => array(
+ 'field' => 'id', // ID in member table is same as in eventmgt.member
+ 'as' => 'member_login',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'member_login',
+ 'p_id' => 'member_id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member password - From main member db - Used only if db is Integrated
+ 'member_passwd_view' => array(
+ 'field' => 'id', // ID in member table is same as in eventmgt.member
+ 'as' => 'member_passwd',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'member_passwd',
+ 'p_id' => 'member_id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member Street Address - From main member db
+ 'member_street' => array(
+ 'field' => 'id', // ID in member table is same as in eventmgt.member
+ 'as' => 'street',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'street',
+ 'p_id' => 'member_id',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member City - From main member db
+ 'member_city' => array(
+ 'field' => 'id', // ID in member table is same as in eventmgt.member
+ 'as' => 'city',
+ 'type' => 'pointer',
+ 'p_table' => 'members.city',
+ 'p_field' => 'city_name',
+ 'p_id' => 'city_id',
+ 'p_where' => 'M.member_id = T.id AND city.city_id = M.city_id',
+ 'p_from' => 'members.member M',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member phone - From main member db
+ 'member_phone' => array(
+ 'field' => 'id', // ID in member table is same as in eventmgt.member
+ 'as' => 'phone',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'phone',
+ 'p_id' => 'member_id',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member Lat - From main member db
+ 'member_lat' => array(
+ 'field' => 'id', // ID in member table is same as in eventmgt.member
+ 'as' => 'lat',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'lat',
+ 'p_id' => 'member_id',
+ 'required' => false,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member Lon - From main member db
+ 'member_lon' => array(
+ 'field' => 'id', // ID in member table is same as in eventmgt.member
+ 'as' => 'lon',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member',
+ 'p_field' => 'lon',
+ 'p_id' => 'member_id',
+ 'required' => false,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member number of rooms at property
+ 'prop_rooms' => array(
+ 'field' => 'id', // ID in member table is same as in eventmgt.member
+ 'as' => 'prop_rooms',
+ 'type' => 'pointer',
+ 'p_table' => 'members.member_accommodations',
+ 'p_field' => 'num_rooms',
+ 'p_id' => 'member_id',
+ 'required' => false,
+ 'unique' => true,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ )
+
+ );
+
+ $this->fields = array_merge($this->fields, $integratedDb);
+
+ }
+
+
+ /*
+ * Fields used if we're not using an integrated database
+ */
+ if (!$this->config->option->member_db_integrated) {
+
+ $nonIntegratedDb = array(
+
+ // Member Name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Address Line 1
+ 'addr1' => array(
+ 'field' => 'addr1',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Address Line 2
+ 'addr2' => array(
+ 'field' => 'addr2',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // City
+ 'city' => array(
+ 'field' => 'city',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // State
+ 'state' => array(
+ 'field' => 'state',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->states->toArray(),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 'MI',
+ 'use' => 'a'
+ ),
+
+ // Country
+ 'country' => array(
+ 'field' => 'country',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->countries->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // ZIP
+ 'zip' => array(
+ 'field' => 'zip',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Latitude
+ 'lat' => array(
+ 'field' => 'lat',
+ 'as' => false,
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 45,
+ 'use' => 'a'
+ ),
+
+ // Longitude
+ 'lon' => array(
+ 'field' => 'lon',
+ 'as' => false,
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => -84,
+ 'use' => 'a'
+ ),
+
+ // Member phone - From main member db
+ 'phone' => array(
+ 'field' => 'phone', // ID in member table is same as in eventmgt.member
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Credit Cards Accepted - multi-pick
+ 'cards_accepted' => array(
+ 'field' => 'cards_accepted',
+ 'as' => false,
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config->ccard->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0, // Note that this is a bitmap of card indexes
+ 'use' => 'a'
+ ),
+
+ // Payment Gateway
+ 'payment_gateway' => array(
+ 'field' => 'payment_gateway',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->ccard_processor->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => '99',
+ 'use' => 'a'
+ ),
+
+ // Payment Gateway Parameter 1 (Authorize.net: login, Merchant Solutions: acctid)
+ 'gateway_par1' => array(
+ 'field' => 'gateway_par1',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Payment Gateway Parameter 2 (Authorize.net: key, Merchant Solutions: merchantpin)
+ 'gateway_par2' => array(
+ 'field' => 'gateway_par2',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Payment Gateway Parameter 3 (Authorize.net: test, Merchant Solutions: n/a)
+ // test: LOCAL_TEST, LOCAL_FAIL, TRUE, FALSE (Must be FALSE for production)
+ 'gateway_par3' => array(
+ 'field' => 'gateway_par3',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->cc_mode->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Payment Gateway Parameter 4 (Authorize.net: Send Conf Flag, Merchant Solutions: n/a)
+ 'gateway_par4' => array(
+ 'field' => 'gateway_par4',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Payment Gateway Parameter 5 (Authorize.net: Merchant Email, Merchant Solutions: n/a)
+ 'gateway_par5' => array(
+ 'field' => 'gateway_par5',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // PayPal enabled flag
+ 'paypal' => array(
+ 'field' => 'paypal',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // PayPal Client ID
+ 'paypal_client_id' => array(
+ 'field' => 'paypal_client_id',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // PayPal Secret
+ 'paypal_secret' => array(
+ 'field' => 'paypal_secret',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // PayPal payment mode
+ // test:
+ 'paypal_mode' => array(
+ 'field' => 'paypal_mode',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->paypal_mode->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member Image
+ 'image' => array(
+ 'field' => 'image',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Parking Map
+ 'parking_map' => array(
+ 'field' => 'parking_map',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Ticket Sector Map
+ 'ticket_sec_map' => array(
+ 'field' => 'ticket_sec_map',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Ticket Policy
+ 'ticket_policy' => array(
+ 'field' => 'ticket_policy',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Ticket Special Request Accepted
+ 'ticket_spec_req' => array(
+ 'field' => 'ticket_spec_req',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Sort order
+ 'sort' => array(
+ 'field' => 'sort',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 999,
+ 'use' => 'a'
+ ),
+
+ // Member account active
+ 'active' => array(
+ 'field' => 'active',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+ );
+
+ $this->fields = array_merge($this->fields, $nonIntegratedDb);
+
+ }
+
+ }
+
+ /**
+ * Get Members list
+ *
+ * @param string type of events list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getMembersList($option = 'event', $where = 'TRUE', $sort = 'name')
+ {
+
+ // Check if a member ID was submitted
+ $locationID = filter_input(INPUT_GET, 'locationID', FILTER_SANITIZE_NUMBER_INT);
+ if ($locationID) {
+ $option = 'member';
+ }
+
+ if ($option == 'all') {
+ $_SESSION[GLM_EVENT_SESSION]['Event'] = false;
+ }
+
+ // Get event ID from session - if available
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ // Get any specified member listing option - default to event
+ if (($membersListOption = filter_input(INPUT_GET, 'MembersListOption', FILTER_SANITIZE_STRING))) {
+ $option = $membersListOption;
+ }
+
+ // Select type of list
+ $sortByDist = false;
+ switch ($option) {
+
+ case 'all':
+ break;
+
+ case 'active':
+ $where .= ' AND active';
+ break;
+
+ case 'accom':
+ $where .= " AND id in
+ (
+ SELECT DISTINCT member
+ FROM eventmgt.accommodation
+ )
+ ";
+ break;
+
+ case 'member':
+ $where .= " AND active AND id = ".($locationID - 0);
+ break;
+
+ case 'event':
+ if (!$eventID) {
+ return false;
+ }
+ $where .= "AND id IN
+ (
+ SELECT DISTINCT member
+ FROM eventmgt.inventory
+ WHERE conv = $eventID
+ )
+ ";
+ /* Not using event_prop anymore
+ SELECT DISTINCT property
+ FROM eventmgt.event_prop
+ WHERE event = $eventID
+ */
+ $sortByDist = true;
+ break;
+
+ case 'type1':
+ $where .= " AND member_type = 1 AND active";
+ break;
+
+ case 'type2':
+ $where .= " AND member_type = 2 AND active";
+ break;
+
+ case 'type3':
+ $where .= " AND member_type = 3 AND active";
+ break;
+
+ default:
+ echo "Option not set";
+ break;
+ }
+
+ // Get Members List
+ $membersList = $this->getList($where, $sort);
+
+ // Add distances to the member data and sort by distance
+ if ($sortByDist) {
+ if (!class_exists('EventManagementGeoCalculations')) {
+ require COMMON_APP_BASE.APP_VERSION.'/classes/GeoCalculations.php';
+ }
+ $Geo = new EventManagementGeoCalculations($this->dbh);
+ $membersList = $Geo->getMemberEventDistance( $eventID, $membersList, 'lat', 'lon', 'distance', 'duration', 'id', true);
+ }
+
+ // echo "<pre>".print_r($membersList,1)."</pre>";
+ return $membersList;
+ }
+
+
+ /**
+ * Get Member Detail
+ *
+ * @return array
+ */
+ function getMemberDetail($memberID = false)
+ {
+ $this->optionIncludeSelectListData = false;
+
+ // If a member ID has been supplied
+ if ($memberID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = $memberID;
+
+ } elseif (($memberID = filter_input(INPUT_GET, 'MemberID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // Otherwise if there a new member ID supplied via the request
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = $memberID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Member'])) {
+
+ // Otherwise, get the event ID from the session
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ } else {
+
+ // Otherwise, we don't have an event id
+ return false;
+
+ }
+
+ $memberDetail = $this->getEntry($memberID);
+
+ // echo "<pre>".print_r($memberDetail,1)."</pre>";
+ return $memberDetail;
+
+ }
+
+
+ /**
+ * Edit Member
+ *
+ * @return array
+ */
+ function editMember()
+ {
+ // Is there a new member code selected?
+ if (($memberID = filter_input(INPUT_GET, 'MemberID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = $memberID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Member'])) {
+
+ // Otherwise, get the member ID from the session
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ } else {
+
+ // Otherwise, we don't have a member id
+ return false;
+
+ }
+
+ $memberDetail = $this->editEntry($memberID);
+
+ return $memberDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+/*
+ $fd = $r['fieldData'];
+
+ // Is Start date is later than End date
+ if (strtotime($fd['start_date']) > strtotime($fd['end_date'])) {
+ $r['fieldFail']['start_date'] = 'Start date is later than end date.';
+ $r['status'] = false;
+ }
+
+ // Is cutoff date is later than end date
+ if (strtotime($fd['cutoff_date']) > strtotime($fd['end_date'])) {
+ $r['fieldFail']['cutoff_date'] = 'Cutoff date is later than end date.';
+ $r['status'] = false;
+ }
+*/
+ return $r;
+ }
+
+ /**
+ * Update Member
+ *
+ * @return array
+ */
+ function updateMember()
+ {
+
+ // Is there a new event code selected?
+ if (($memberID = filter_input(INPUT_GET, 'MemberID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = $memberID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Member'])) {
+
+ // Otherwise, get the member ID from the session
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ } else {
+
+ // Otherwise, we don't have a member id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($memberID);
+
+ // echo "<pre>".print_r($r,1)."</pre>";
+ return $r;
+
+ }
+
+ /**
+ * Insert Member
+ *
+ * @return array
+ */
+ function insertMember()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current member to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+
+ /**
+ * Delete Member
+ *
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete
+ *
+ * @return array
+ */
+ function memberDelete($confirm = false)
+ {
+
+ // Is there a new member code selected?
+ if (($memberID = filter_input(INPUT_GET, 'MemberID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = $memberID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Member'])) {
+
+ // Otherwise, get the member ID from the session
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ } else {
+
+ // Otherwise, we don't have a member id
+ return false;
+
+ }
+
+ /*
+ * Delete all supporting information
+ *
+ * Contacts
+ * Performance
+ * Sections
+ * Events
+ * Tickets
+ * Ticket inventory
+ * Orders
+ * Sold
+ *
+ *
+ * inven_hold gets cleaned out and does not need to be deleted
+ */
+/*
+ DELETE FROM eventmgt.ticket_order
+ WHERE member = $memberID;
+ DELETE FROM eventmgt.ticket_sold
+ WHERE member = $memberID;
+*/
+ $sql = "
+ DELETE FROM eventmgt.res_contact
+ WHERE contact_type = ".$this->config->reference_type->member."
+ AND affiliation = $memberID;
+ DELETE FROM eventmgt.section
+ WHERE member = $memberID;
+ DELETE FROM eventmgt.ticket_inventory
+ WHERE ticket in (
+ SELECT id
+ FROM eventmgt.ticket
+ WHERE member = $memberID
+ );
+ DELETE FROM eventmgt.ticket
+ WHERE member = $memberID;
+ DELETE FROM eventmgt.performance
+ WHERE member = $memberID;
+ ";
+ $this->dbh->exec($sql);
+
+ // Delete member and return their old data
+ $memberDetail = $this->deleteEntry($memberID, $confirm);
+
+ return $memberDetail;
+
+ }
+
+
+
+}
+
+
+
+
+?>
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Misc stored parameters data class\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Data\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: dataMisc.php,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ * @link <>\r
+ */\r
+\r
+require_once DATA_ABSTRACT;\r
+\r
+/**\r
+ * EventManagementDataMisc class\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Data\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: dataMisc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ * @link <>\r
+ */\r
+class EventManagementDataMisc extends DataAbstract\r
+{\r
+ /**\r
+ * Tables\r
+ *\r
+ * @var $ini\r
+ * @access public\r
+ */\r
+ public $table = 'eventmgt.misc';\r
+\r
+ /**\r
+ * Field definitions\r
+ *\r
+ * 'type' is type of field as defined by the application\r
+ * text Regular text field\r
+ * pointer Pointer to an entry in another table\r
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions\r
+ * See PHP filter_id()\r
+ *\r
+ * 'use' is when to use the field\r
+ * l = List\r
+ * g = Get\r
+ * n = New\r
+ * i = Insert\r
+ * e = Edit\r
+ * u = Update\r
+ * d = Delete\r
+ * a = All\r
+ *\r
+ * @var $ini\r
+ * @access public\r
+ */\r
+ public $fields = false;\r
+\r
+ /**\r
+ * Constructor\r
+ *\r
+ * @param object $d database connection\r
+ *\r
+ * @return void\r
+ * @access public\r
+ */\r
+ function __construct($dbh, $config)\r
+ {\r
+\r
+ parent::__construct($dbh, $config);\r
+\r
+ $this->fields = array(\r
+\r
+ // ID - in this table there's only one entry and the ID is always 1\r
+ 'id' => array(\r
+ 'field' => 'id',\r
+ 'as' => false,\r
+ 'type' => 'integer',\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Text for intro page\r
+ 'intro_text' => array(\r
+ 'field' => 'intro_text',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'filter' => FILTER_UNSAFE_RAW,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Text for section selection page\r
+ 'section_text' => array(\r
+ 'field' => 'section_text',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'filter' => FILTER_UNSAFE_RAW,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Text for ticket selection page\r
+ 'ticket_text' => array(\r
+ 'field' => 'ticket_text',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'filter' => FILTER_UNSAFE_RAW,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Text for ticket date, time, section, quantity, selection page\r
+ 'ticket_opt_text' => array(\r
+ 'field' => 'ticket_opt_text',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'filter' => FILTER_UNSAFE_RAW,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Text for cart page\r
+ 'cart_text' => array(\r
+ 'field' => 'cart_text',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'filter' => FILTER_UNSAFE_RAW,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Text for checkout page\r
+ 'checkout_text' => array(\r
+ 'field' => 'checkout_text',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'filter' => FILTER_UNSAFE_RAW,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Text for checkout success page\r
+ 'success_text' => array(\r
+ 'field' => 'success_text',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'filter' => FILTER_UNSAFE_RAW,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Google tracking script for checkout page\r
+ 'tracking' => array(\r
+ 'field' => 'tracking',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'filter' => FILTER_UNSAFE_RAW,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // No payment reasons for admin checkout\r
+ 'no_payment_reasons' => array(\r
+ 'field' => 'no_payment_reasons',\r
+ 'as' => false,\r
+ 'type' => text,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Optional Checkout Field Name #1\r
+ 'opt_field_1_name' => array(\r
+ 'field' => 'opt_field_1_name',\r
+ 'as' => false,\r
+ 'type' => text,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Optional Checkout Field Name #2\r
+ 'opt_field_2_name' => array(\r
+ 'field' => 'opt_field_2_name',\r
+ 'as' => false,\r
+ 'type' => text,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Optional Checkout Field Name #3\r
+ 'opt_field_3_name' => array(\r
+ 'field' => 'opt_field_3_name',\r
+ 'as' => false,\r
+ 'type' => text,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // SSL Certificate Seal Head Script\r
+ 'ssl_seal_head_script' => array(\r
+ 'field' => 'ssl_seal_head_script',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'filter' => FILTER_UNSAFE_RAW,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // SSL Certificate Seal Body Script\r
+ 'ssl_seal_body_script' => array(\r
+ 'field' => 'ssl_seal_body_script',\r
+ 'as' => false,\r
+ 'type' => 'text',\r
+ 'filter' => FILTER_UNSAFE_RAW,\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Central Payment Location\r
+ 'central_payment' => array(\r
+ 'field' => 'central_payment',\r
+ 'as' => false,\r
+ 'type' => 'pointer',\r
+ 'p_table' => 'eventmgt.member',\r
+ 'p_field' => 'name',\r
+ 'p_id' => 'id',\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => 0,\r
+ 'use' => 'a'\r
+ ),\r
+\r
+ // Central Payment Location ID\r
+ 'central_payment_id' => array(\r
+ 'field' => 'central_payment',\r
+ 'as' => 'central_payment_id',\r
+ 'type' => 'integer',\r
+ 'required' => false,\r
+ 'unique' => false,\r
+ 'default' => 0,\r
+ 'use' => 'g'\r
+ )\r
+\r
+ );\r
+ }\r
+\r
+}\r
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Ticket orders data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataOrders.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataTickets class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataOrders,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementDataOrders extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.ticket_order';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // user_trace_info
+ 'user_trace_info' => array(
+ 'field' => 'user_trace_info',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // First Name
+ 'fname' => array(
+ 'field' => 'fname',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Last Name
+ 'lname' => array(
+ 'field' => 'lname',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Address Line 1
+ 'addr1' => array(
+ 'field' => 'addr1',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Address Line 2
+ 'addr2' => array(
+ 'field' => 'addr2',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // First Name
+ 'city' => array(
+ 'field' => 'city',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact State
+ 'state' => array(
+ 'field' => 'state',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->states->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 'MI',
+ 'use' => 'a'
+ ),
+
+ // Contact Country
+ 'country' => array(
+ 'field' => 'country',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->countries->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Contact ZIP
+ 'zip' => array(
+ 'field' => 'zip',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Phone
+ 'phone' => array(
+ 'field' => 'phone',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // E-Mail
+ 'email' => array(
+ 'field' => 'email',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // E-Mail OK
+ 'email_ok' => array(
+ 'field' => 'email_ok',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Purchase Date
+ 'purchase_date' => array(
+ 'field' => 'purchase_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'lged'
+ ),
+
+ // Member ID
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gle'
+ ),
+
+ // Member Name display
+ 'member_view' => array(
+ 'field' => 'member',
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // CC Type
+ 'cctype' => array(
+ 'field' => 'cctype',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lge'
+ ),
+
+ // CC Number
+ 'ccnumber' => array(
+ 'field' => 'ccnumber',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lge'
+ ),
+
+ // CC Expiration$_SESSION[GLM_EVENT_SESSION]['Ticket']
+ 'expire' => array(
+ 'field' => 'expire',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lge'
+ ),
+
+ // Name on Card
+ 'ccname' => array(
+ 'field' => 'ccname',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lge'
+ ),
+
+ // CC Confirmation #
+ 'ccconf' => array(
+ 'field' => 'ccconf',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lge'
+ ),
+
+ // Charge Number
+ 'charge_numb' => array(
+ 'field' => 'charge_total',
+ 'as' => 'charge_numb',
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gle'
+ ),
+
+ // Charge Total Money
+ 'charge_total' => array(
+ 'field' => 'charge_total',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lge'
+ ),
+
+ // Special Needs
+ 'special_needs' => array(
+ 'field' => 'special_needs',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Optional Checkout Field Name #1
+ 'opt_field_1_name' => array(
+ 'field' => 'opt_field_1_name',
+ 'as' => false,
+ 'type' => text,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gle'
+ ),
+
+ // Optional Checkout Field #1
+ 'opt_field_1' => array(
+ 'field' => 'opt_field_1',
+ 'as' => false,
+ 'type' => text,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gle'
+ ),
+
+ // Optional Checkout Field Name #2
+ 'opt_field_1_name' => array(
+ 'field' => 'opt_field_1_name',
+ 'as' => false,
+ 'type' => text,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gle'
+ ),
+
+ // Optional Checkout Field #2
+ 'opt_field_2' => array(
+ 'field' => 'opt_field_2',
+ 'as' => false,
+ 'type' => text,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gle'
+ ),
+
+ // Optional Checkout Field Name #3
+ 'opt_field_1_name' => array(
+ 'field' => 'opt_field_1_name',
+ 'as' => false,
+ 'type' => text,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gle'
+ ),
+
+ // Optional Checkout Field #3
+ 'opt_field_3' => array(
+ 'field' => 'opt_field_3',
+ 'as' => false,
+ 'type' => text,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gle'
+ ),
+
+ // Notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+
+ /**
+ * Get Orders list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getOrdersList($memberID = false, $performanceID = false, $sectionID = false, $listType = false)
+ {
+
+ // Get member ID
+ if ($memberID == false) {
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+ }
+
+ // Get performance ID
+ if ($performanceID == false) {
+ $performanceID = $_SESSION[GLM_EVENT_SESSION]['Performance'];
+ }
+
+ // Get section ID
+ if ($sectionID == false) {
+ $sectionID = $_SESSION[GLM_EVENT_SESSION]['Section'];
+ }
+
+ // Get URI search type
+ if (!$listType && isset($_REQUEST['listType'])) {
+ $listType = $_REQUEST['listType'];
+ }
+
+ // Build query Where clause
+ $where = 'true';
+
+ switch ($listType) {
+
+ case 'norm':
+ default:
+ if ($memberID) {
+ $where .= " AND T.member = $memberID";
+ }
+ if ($performanceID) {
+ $where .= " AND T.performance = $performanceID";
+ }
+ if ($sectionID) {
+ $where .= " AND T.section = $sectionID";
+ }
+ break;
+
+ case 'all':
+ break;
+
+ }
+
+ // Get list of Orders
+ $ordersList = $this->getList($where, 'purchase_date');
+
+ return $ordersList;
+ }
+
+ /**
+ * Get Order Detail
+ *
+ * @return array
+ */
+ function getOrderDetail($orderID = false, $memberID = false)
+ {
+
+ // If a order has been specified
+ if ($orderID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Order'] = $orderID;
+
+ // Otherwise if there's a order ID in the request
+ } elseif (($orderID = filter_input(INPUT_GET, 'OrderID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Order'] = $orderID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Order'])) {
+
+ $orderID = $_SESSION[GLM_EVENT_SESSION]['Order'];
+
+ } else {
+
+ // Otherwise, we don't have an order id
+ return false;
+
+ }
+
+ $where = '';
+ if ($memberID) {
+ $where = "AND T.member = $memberID";
+ }
+
+ $orderDetail = $this->getEntry($orderID, 'id', $where);
+
+ // If we have a member ID then make sure the sold ticket is for that member
+ if ($memberID && $orderDetail['member'] != $memberID) {
+ return false;
+ }
+
+ return $orderDetail;
+
+ }
+
+
+ /**
+ * Edit Order
+ *
+ * @return array
+ */
+ function editOrder()
+ {
+
+ if (($orderID = filter_input(INPUT_GET, 'OrderID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Order'] = $orderID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Order'])) {
+
+ // Otherwise, get the order ID from the session
+ $orderID = $_SESSION[GLM_EVENT_SESSION]['Order'];
+
+ } else {
+
+ // Otherwise, we don't have an order id
+ return false;
+
+ }
+
+ $orderDetail = $this->editEntry($orderID);
+
+ return $orderDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+ /**
+ * Update Order
+ *
+ * @return array
+ */
+ function updateOrder()
+ {
+
+ if (($orderID = filter_input(INPUT_GET, 'OrderID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Order'] = $orderID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Order'])) {
+
+ // Otherwise, get the order ID from the session
+ $orderID = $_SESSION[GLM_EVENT_SESSION]['Order'];
+
+ } else {
+
+ // Otherwise, we don't have an order id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($orderID);
+
+ return $r;
+
+ }
+
+ /**
+ * Delete Order
+ *
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete
+ * @param $orderID int If supplied, use for order ID, otherwise check for orderID REQUEST param.
+ *
+ * @return int Deleted order ID or false if fail
+ */
+ function orderDelete($confirm = false, $orderID = false)
+ {
+
+ $orderID = $orderID - 0;
+
+ // If an order wasn't supplied in the function call or it's not a positive integer
+ if ($orderID <= 0) {
+
+ $orderID = filter_input(INPUT_GET, 'OrderID', FILTER_SANITIZE_NUMBER_INT);
+ $orderID = $orderID - 0;
+
+ // Is there isn't a new order ID provided on the URL
+ if ($orderID <= 0) {
+ echo "<h3>No valid order ID supplied.</h3>";
+ return false;
+ }
+
+ }
+
+ // Get order to validate order ID
+ $orderDetail = $this->getEntry($orderID);
+ if (!$orderDetail) {
+ echo "<h3>Order ID $orderID not found.</h3>";
+ return false;
+ }
+
+ $sql = "BEGIN;\n";
+
+ // Build query to delete add_on_sold data
+ $sql .= "DELETE FROM eventmgt.add_on_sold WHERE ticket_order = $orderID;\n";
+
+ // Build query to delete promo_sold data
+ $sql .= "DELETE FROM eventmgt.promo_sold WHERE ticket_order = $orderID;\n";
+
+ // Get list of tickets sold in this order
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataSold.php';
+ $Sold = new EventManagementDataSold($this->dbh, $this->config);
+ $sold = $Sold->getSoldList($orderID);
+ if (!$sold) {
+ echo "<h3>No tickets found for order ID $orderID.</h3>";
+ return false;
+ }
+
+ // Build query to update inventory for each ticket sold and to delete the ticket sold
+ foreach ($sold as $s) {
+
+ // If this is not a package sold item, adjust inventory - Only the tickets in a package get processed
+ if (!$s['ticket_package']) {
+
+ // Note that we don't check to see if the ticket is marked as having unlimited quantity. If it's unlimited, decrementing the inventory has no effect.
+
+ // If this is a date specific ticket, specify the inventory for that date
+ $dateWhere = '';
+ if ($s['date_specific']['value']) {
+ $dateWhere = " AND ticket_date = '".$s['ticket_date']['date']."'";
+ }
+
+ // If this is a time specific ticket, specify the inventory for that time
+ $timeWhere = '';
+ if ($s['time_specific']['value']) {
+ $timeWhere = " AND ticket_time = '".$s['ticket_time']['time']."'";
+ }
+
+ // Build the query for this ticket sold to adjust the inventory levels
+ $sql .= "UPDATE eventmgt.ticket_inventory SET available = available + 1, sold = sold - 1 WHERE ticket = ".$s['ticket']."$dateWhere$timeWhere;\n";
+
+ }
+
+ }
+
+ // Build the query to delete the ticket_sold records
+ $sql .= "DELETE FROM eventmgt.ticket_sold WHERE ticket_order = $orderID;\n";
+
+ // Build the query to delete the ticket_claim_tracking records
+ $sql .= "DELETE FROM eventmgt.ticket_claim_tracking WHERE ticket_order = $orderID;\n";
+
+ // Lastly, build the query to delete the ticket_order record
+ $sql .= "DELETE FROM eventmgt.ticket_order WHERE id = $orderID;\n";
+
+ $sql .= "COMMIT\n";
+
+// echo "<pre>$sql</pre>";
+
+ $res = $this->dbh->exec($sql);
+
+ return $res;
+ }
+
+
+}
+
+
+
+
+?>
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Performance data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataPerformances.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataPerformances class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataPerformances.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataPerformances extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.performance';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Member ID for adding performances
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'use' => 'nid'
+ ),
+
+ // Member ID for adding performances
+ 'member_id' => array(
+ 'field' => 'member',
+ 'as' => member_id,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gle'
+ ),
+
+ // Performance Name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Active
+ 'active' => array(
+ 'field' => 'active',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Admin Only Flag
+ 'admin_only' => array(
+ 'field' => 'admin_only',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Short Description
+ 'short_descr' => array(
+ 'field' => 'short_descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Start Date
+ 'start_date' => array(
+ 'field' => 'start_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('12/31/'.date('Y').' +3 years'), // This year plus 3
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // End Date
+ 'end_date' => array(
+ 'field' => 'end_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('12/31/'.date('Y').' +3 years'), // This year plus 3
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Purchase lead-time in hours
+ 'purch_leadtime' => array(
+ 'field' => 'purch_leadtime',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 24,
+ 'use' => 'a'
+ ),
+
+ // Image
+ 'image' => array(
+ 'field' => 'image',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Policy
+ 'policy' => array(
+ 'field' => 'policy',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Voucher Text
+ 'voucher_text' => array(
+ 'field' => 'voucher_text',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Confirmation E-Mail Text
+ 'conf_text' => array(
+ 'field' => 'conf_text',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Promote in Cart
+ 'promote_in_cart' => array(
+ 'field' => 'promote_in_cart',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Sort order
+ 'sort' => array(
+ 'field' => 'sort',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 999,
+ 'use' => 'a'
+ ),
+
+ // Notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ /* Also get some member information in case we need it */
+
+
+ // Member Name display
+ 'member_view' => array(
+ 'field' => 'member',
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member Address line 1
+ 'member_addr1' => array(
+ 'field' => 'member',
+ 'as' => 'member_addr1',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'addr1',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member Address line 2
+ 'member_addr2' => array(
+ 'field' => 'member',
+ 'as' => 'member_addr2',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'addr2',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member City
+ 'member_city' => array(
+ 'field' => 'member',
+ 'as' => 'member_city',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'city',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member State
+ 'member_state' => array(
+ 'field' => 'member',
+ 'as' => 'member_state',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'state',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member ZIP
+ 'member_zip' => array(
+ 'field' => 'member',
+ 'as' => 'member_zip',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'zip',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member Country
+ 'member_country' => array(
+ 'field' => 'member',
+ 'as' => 'member_country',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'country',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member LAT
+ 'member_lat' => array(
+ 'field' => 'member',
+ 'as' => 'member_lat',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'lat',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member LON
+ 'member_lon' => array(
+ 'field' => 'member',
+ 'as' => 'member_lon',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'lon',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member phone
+ 'member_phone' => array(
+ 'field' => 'member',
+ 'as' => 'member_phone',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'phone',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member payment gateways
+ 'member_payment_gateway' => array(
+ 'field' => 'member',
+ 'as' => 'member_payment_gateway',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'payment_gateway',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member credit cards accepted
+ 'member_cards_accepted' => array(
+ 'field' => 'member',
+ 'as' => 'member_cards_accepted',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'cards_accepted',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member credit cards accepted
+ 'member_cards_accepted' => array(
+ 'field' => 'member',
+ 'as' => 'member_cards_accepted',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'cards_accepted',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member payment gateway parameter 1
+ 'member_gateway_par1' => array(
+ 'field' => 'member',
+ 'as' => 'member_gateway_par1',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'gateway_par1',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member payment gateway parameter 2
+ 'member_gateway_par2' => array(
+ 'field' => 'member',
+ 'as' => 'member_gateway_par2',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'gateway_par2',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+
+
+ );
+ }
+
+ /**
+ * Get Performances list
+ *
+ * @param $listType String A particular list type ('all', 'member', 'cart_promotions', ...)
+ * @return object containing array as sub-objects
+ */
+ function getPerformancesList($listType = false, $memberID = false, $includeAdminOnly = false)
+ {
+
+ $where = '';
+ $and = '';
+
+ // Determine if there's a list type request (otherwise default to call parameter $listType)
+ if (!$listType && isset($_REQUEST['listType'])) {
+ $listType = $_REQUEST['listType'];
+ $and = ' AND ';
+ }
+
+ // Check if adminUser
+ if (!$includeAdminOnly) {
+ $where .= $and.' NOT T.admin_only';
+ $and = ' AND ';
+ }
+
+ switch ($listType) {
+
+ case 'member':
+ if ($memberID == false) {
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+ }
+ $where .= $and."member = $memberID";
+ break;
+
+ case 'member_and_active':
+ if ($memberID == false) {
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+ }
+ $where .= $and."member = $memberID AND T.active";
+ break;
+
+ case 'cart_promotions':
+ $where .= $and."T.promote_in_cart AND T.active AND (SELECT active FROM eventmgt.member WHERE active = true AND member.id = T.member)";
+ break;
+
+ case 'all':
+ default:
+ break;
+
+ }
+
+ $performancesList = $this->getList($where, 'sort, name');
+
+ return $performancesList;
+ }
+
+ /**
+ * Get Performance Detail
+ *
+ * @return array
+ */
+ function getPerformanceDetail($performanceID = false)
+ {
+
+ $where = '';
+
+ // If a performance has been specified
+ if ($performanceID != false) {
+
+ // Don't do anything here
+
+ // Is there a new Performance code selected?
+ } elseif (($performanceID = filter_input(INPUT_GET, 'PerformanceID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Performance'] = $performanceID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Performance'])) {
+
+ // Otherwise, get the performance ID from the session
+ $performanceID = $_SESSION[GLM_EVENT_SESSION]['Performance'];
+
+ } else {
+
+ // Otherwise, we don't have a performance specified
+ return false;
+
+ }
+
+
+ $performanceDetail = $this->getEntry($performanceID, 'id', $where);
+
+ return $performanceDetail;
+
+ }
+
+
+ /**
+ * Edit Performance
+ *
+ * @return array
+ */
+ function editPerformance()
+ {
+
+ if (($performanceID = filter_input(INPUT_GET, 'PerformanceID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Performance'] = $performanceID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Performance'])) {
+
+ // Otherwise, get the state rep ID from the session
+ $performanceID = $_SESSION[GLM_EVENT_SESSION]['Performance'];
+
+ } else {
+
+ // Otherwise, we don't have a state rep id
+ return false;
+
+ }
+
+ $performanceDetail = $this->editEntry($performanceID);
+
+ return $performanceDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+ /**
+ * Update Performance
+ *
+ * @return array
+ */
+ function updatePerformance()
+ {
+
+ if (($performanceID = filter_input(INPUT_GET, 'PerformanceID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Performance'] = $performanceID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Performance'])) {
+
+ // Otherwise, get the state rep ID from the session
+ $performanceID = $_SESSION[GLM_EVENT_SESSION]['Performance'];
+
+ } else {
+
+ // Otherwise, we don't have a state rep id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($performanceID);
+
+ // If the update was successful and we ahve start and end dates, Set inventory outside of the dates set for this performance to inactive
+ $start = $r['fieldData']['start_date']['date'];
+ $end = $r['fieldData']['end_date']['date'];
+ if ($r['status'] && $r['fieldData']['start_date']['date'] != '' && $r['fieldData']['end_date']['date'] != '') {
+ $sql = "
+ UPDATE eventmgt.ticket_inventory
+ SET active = false
+ WHERE id in (
+ SELECT I.id
+ FROM eventmgt.ticket T, eventmgt.ticket_inventory I
+ WHERE T.performance = $performanceID
+ AND T.id = I.ticket
+ AND ( I.ticket_date < '$start' OR I.ticket_date > '$end')
+ )
+ ;";
+ $this->dbh->exec($sql);
+
+ }
+
+ return $r;
+
+ }
+
+
+ /**
+ * Add New Performance
+ *
+ * @return array
+ */
+ function newPerformance()
+ {
+
+ $r = $this->newEntry();
+
+ return $r;
+
+ }
+
+ /**
+ * Insert Performance
+ *
+ * @return array
+ */
+ function insertPerformance()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current performance to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Performance'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+
+ /**
+ * Delete Performance
+ *
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete
+ *
+ * @return array
+ */
+ function performanceDelete($confirm = false)
+ {
+
+ // Is there a new performance code selected?
+ if (($performanceID = filter_input(INPUT_GET, 'PerformanceID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Performance'] = $performanceID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Performance'])) {
+
+ // Otherwise, get the performance ID from the session
+ $performanceID = $_SESSION[GLM_EVENT_SESSION]['Performance'];
+
+ } else {
+
+ // Otherwise, we don't have an performance id
+ return false;
+
+ }
+
+ $performanceDetail = $this->deleteEntry($performanceID, $confirm);
+
+ return $performanceDetail;
+
+ }
+
+ /**
+ * Get Performance Inventory Summary
+ *
+ * @return array
+ */
+ function getPerformanceInventorySummary($performanceID = false, $year = false)
+ {
+
+ // If a performance has been specified
+ if ($performanceID != false) {
+
+ // Don't do anything here
+
+ // Is there a new Performance code selected?
+ } elseif (($performanceID = filter_input(INPUT_GET, 'PerformanceID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // Don't do anything here
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Performance'])) {
+
+ // Otherwise, get the performance ID from the session
+ $performanceID = $_SESSION[GLM_EVENT_SESSION]['Performance'];
+
+ } else {
+
+ // Otherwise, we don't have a state rep id
+ return false;
+
+ }
+
+ $yearWhere = '';
+ if ($year) {
+ $yearWhere = "AND I.ticket_date BETWEEN '01/01/$year' AND '12/31/$year'";
+ }
+ // Get detail on the performance
+ $performanceDetail = $this->getPerformanceDetail($performanceID);
+
+ // Get inventory summary data for the performance
+ $sql = "
+ SELECT I.active, I.ticket_date AS date, I.ticket_time AS time, I.id AS invenID, I.quant, I.available, I.sold,
+ S.id AS sectionID, S.name AS sectionName, COALESCE(sum(H.quant),0) AS quantHeld,
+ T.name AS ticketname, T.price, t.unlimited_quant
+ FROM eventmgt.ticket T, eventmgt.ticket_inventory I LEFT OUTER JOIN eventmgt.inven_hold H ON (H.inventory = I.id),
+ eventmgt.section S
+ WHERE T.performance = $performanceID
+ AND I.ticket = T.id
+ AND S.id = T.section
+ $yearWhere
+ GROUP BY I.active, I.ticket_date, I.ticket_time, I.id, I.quant, I.available, I.sold, S.id, S.name, T.name, T.price, T.unlimited_quant
+ ORDER BY date, time, sectionID, ticketname
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $invData = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // Build inventory summary array organized by date, time, section, ticket
+ $sum = array();
+ $date = false;
+ $time = false;
+ $section = false;
+ foreach ($invData as $i) {
+
+ $dow = date('D', strtotime($i['date']));
+
+ $t = explode(':', $i['time']);
+ $ampm = 'AM';
+ $hour = ($t[0] - 0);
+ if ($hour > 11) {
+ $ampm = 'PM';
+ } else {
+ }
+ if ($hour > 12) {
+ $hour -= 12;
+ }
+ $timeString = sprintf('%2d:%02d %s', $hour, $min, $ampm);
+
+ // Insert ticket with inventory
+ $s = array(
+ 'id' => $i['invenid'],
+ 'active' => $i['active'],
+ 'date' => $dow." ".$i['date'],
+ 'time' => $timeString,
+ 'section' => $i['sectionname'],
+ 'name' => $i['ticketname'],
+ 'unlimited_quant' => $i['unlimited_quant'],
+ 'quant' => $i['quant'],
+ 'avail' => $i['available'],
+ 'sold' => $i['sold'],
+ 'held' => $i['quantheld'],
+ 'netAvail' => $i['available'] - $i['held'],
+ 'price' => $this->money($i['price'])
+ );
+
+ // Clear redundant values
+ if ($i['date'] == $date) {
+ $s['date'] = '';
+ } else {
+ $date = $i['date'];
+ $time = false;
+ $section = false;
+ }
+
+ if ($i['time'] == $time) {
+ $s['time'] = '';
+ } else {
+ $time = $i['time'];
+ $section = false;
+ }
+
+ if ($i['sectionname'] == $section) {
+ $s['section'] = '';
+ } else {
+ $section = $i['sectionname'];
+ }
+
+
+ $sum[] = $s;
+ }
+
+ return $sum;
+
+ }
+
+ /**
+ * Format a number as money
+ *
+ * @param $value Value to format
+ * @param $option Options that control output
+ * NOPREFIX stops the "$" prefix
+ *
+ * @return none
+ * @access public
+ */
+ private function money($value, $option = "")
+ {
+
+ if ($option == "NOPREFIX")
+ $prefix = "";
+ else
+ $prefix = "$";
+
+ // Do value sanity check
+
+ if (!is_numeric($value))
+ return ($prefix."0.00");
+
+ return ($prefix.number_format($value, 2, ".", ","));
+ }
+
+
+}
+
+
+
+
+?>
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Ticket Promo Sold data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataPromoSold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataPromoSold class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataPromoSold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link
+ */
+class EventManagementDataPromoSold extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.promo_sold';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Ticket Order
+ 'ticket_order' => array(
+ 'field' => 'ticket_order',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'niegdl'
+ ),
+
+ // Ticket Sold
+ 'ticket_sold' => array(
+ 'field' => 'ticket_sold',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'niegdl'
+ ),
+
+ // Promo
+ 'promo' => array(
+ 'field' => 'promo',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'niegdl'
+ ),
+
+ // Promo Name
+ 'promo_name' => array(
+ 'field' => 'promo_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Promo type
+ 'promo_type' => array(
+ 'field' => 'promo_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->promo_ticket_type->toArray(),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Promo type name
+ 'promo_type_name' => array(
+ 'field' => 'promo_type_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Amount
+ 'amount' => array(
+ 'field' => 'amount',
+ 'as' => false,
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0.00,
+ 'use' => 'a'
+ ),
+
+ // Amount (money)
+ 'amount_money' => array(
+ 'field' => 'amount',
+ 'as' => 'amount_money',
+ 'type' => 'money',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0.00,
+ 'use' => 'lgd'
+ ),
+
+ // Session ID
+ 'session_id' => array(
+ 'field' => 'session_id',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+
+ }
+
+ /**
+ * Get Ticket Sold promos list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getPromosSoldList($ticketSoldID = false, $where = false)
+ {
+
+ // If a where clause has not been supplied, use the $TicketSoldID - Otherwise $where
+ if (!$where) {
+
+ $where = 'true';
+
+ // Check if there's a ticket sold ID, then filter by that
+ $ticketSoldID = ($ticketSoldID - 0); // Make sure it's number
+ if ($ticketSoldID > 0) {
+ $where .= " AND T.ticket_sold = $ticketSoldID";
+ }
+
+ }
+
+ $promosSoldList = $this->getList($where, 'id');
+
+ return $promosSoldList;
+ }
+
+ /**
+ * Get Promo Sold Detail
+ *
+ * @return array
+ */
+ function getPromoSoldDetail($promoSoldID = false)
+ {
+
+ if ($promoSoldID == false) {
+
+ // Otherwise, we don't have an promo sold id
+ return false;
+
+ }
+
+ // If the promo sold ID is valid, get the detail
+ $promoSoldID = filter_input(INPUT_GET, 'PromoSoldID', FILTER_SANITIZE_NUMBER_INT);
+ if ($promoSoldID) {
+ $promoSoldDetail = $this->getEntry($promoSoldID);
+
+ // Otherwise fail
+ } else {
+ return false;
+ }
+
+ return $promoSoldDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Promo Code Ticket data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataPromoTickets.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataPromoTickets class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataPromoTickets,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementDataPromoTickets extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.promo_ticket';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Promo Code
+ 'promo' => array(
+ 'field' => 'promo',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Promomotion Name
+ 'promo_name' => array(
+ 'field' => 'promo',
+ 'as' => 'promo_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.promo_code',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Promomotion Description
+ 'promo_descr' => array(
+ 'field' => 'promo',
+ 'as' => 'promo_descr',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.promo_code',
+ 'p_field' => 'descr',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Promomotion Start Date
+ 'promo_start_date' => array(
+ 'field' => 'promo',
+ 'as' => 'promo_start_date',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.promo_code',
+ 'p_field' => 'start_date',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Promomotion end Date
+ 'promo_end_date' => array(
+ 'field' => 'promo',
+ 'as' => 'promo_end_date',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.promo_code',
+ 'p_field' => 'end_date',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Ticket ID
+ 'ticket' => array(
+ 'field' => 'ticket',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Ticket Name
+ 'ticket_name' => array(
+ 'field' => 'ticket',
+ 'as' => 'ticket_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'title',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Promo type
+ 'promo_type' => array(
+ 'field' => 'promo_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->promo_ticket_type->toArray(),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Amount
+ 'amount' => array(
+ 'field' => 'amount',
+ 'as' => false,
+ 'type' => 'float',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+
+ return $r;
+ }
+
+ /**
+ * Get Promo Ticket list
+ *
+ * If $promoID is supplied also returns sales counts for this promo for each ticket.
+ * Front-end shop selection of
+ *
+ * @return object containing array as sub-objects
+ */
+ function getPromoTicketsList($promoID = false, $promoCode = false, $where = 'true')
+ {
+
+ // If promoID is supplied, get only tickets listed for that promo
+ if ($promoID) {
+ $where .= " AND T.promo = $promoID";
+ }
+
+ // If promoCode is supplied, get only tickets listed for that promo
+ if ($promoCode) {
+ $where .= " AND T.promo = (SELECT id FROM eventmgt.promo_code WHERE name = '$promoCode')";
+ }
+
+ // Get list of Promo Tickets
+ $promoTicketsList = $this->getList($where);
+
+ // If a Promo ID was supplied, also get the promo code use counts per ticket
+ If ($promoID && is_array($promoTicketsList)) {
+
+ // If promoID is supplied, get only tickets listed for that promo
+ if ($promoID) {
+ $where = " AND P.promo = $promoID";
+ }
+
+ // Also get total Promo counts for each ticket
+ reset($promoTicketsList);
+ while (list($key, $val) = each($promoTicketsList)) {
+
+ // Get number sold and value sold for this ticket type and promo code
+ $sql = "
+ SELECT count(P.id) as numb_sold, sum(P.amount) as value_sold
+ FROM eventmgt.promo_sold P, eventmgt.ticket_sold T
+ WHERE T.id = P.ticket_sold
+ AND T.ticket = ".$val['ticket']."
+ $where;
+ ";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $sales = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // Add it to the results
+ $promoTicketsList[$key]['numberSold'] = $sales['numb_sold'];
+ $promoTicketsList[$key]['valueSold'] = $sales['value_sold'];
+ $promoTicketsList[$key]['dollarsSold'] = $this->money($sales['value_sold']);
+
+ }
+
+ }
+
+ return $promoTicketsList;
+ }
+
+ /**
+ * Get Promo Ticket Detail
+ *
+ * @return array
+ */
+ function getPromoTicketDetail($promoTicketID = false)
+ {
+
+ // If a promo ticket has been specified
+ if ($promoTicketID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['PromoTicket'] = $promoTicketID;\r
+
+ // Otherwise if there's a promo ticket ID in the request
+ } elseif (($promoTicketID = filter_input(INPUT_GET, 'PromoTicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // There's a Promo Ticket submitted, so save that
+ $_SESSION[GLM_EVENT_SESSION]['PromoTicket'] = $promoTicketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['PromoTicket'])) {
+
+ // Otherwise, get the promo code ID from the session
+ $promoTicketID = $_SESSION[GLM_EVENT_SESSION]['PromoTicket'];
+
+ } else {
+
+ // Otherwise, we don't have a promo ticket id
+ return false;
+
+ }
+
+ $promoTicketDetail = $this->getEntry($promoTicketID);
+
+ return $promoTicketDetail;
+
+ }
+
+ /**
+ * Edit Promo Ticket
+ *
+ * @return array
+ */
+ function editPromoTicket()
+ {
+
+ if (($promoTicketID = filter_input(INPUT_GET, 'PromoTicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['PromoTicket'] = $promoTicketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['PromoTicket'])) {
+
+ // Otherwise, get the promo ticket ID from the session
+ $promoTicketID = $_SESSION[GLM_EVENT_SESSION]['PromoTicket'];
+
+ } else {
+
+ // Otherwise, we don't have a promo ticket id
+ return false;
+
+ }
+
+ $promoTicketDetail = $this->editEntry($promoTicketID);
+
+ return $promoTicketDetail;
+
+ }
+
+ /**
+ * Update Promo Ticket
+ *
+ * @return array
+ */
+ function updatePromoTicket()
+ {
+
+ if (($promoTicketID = filter_input(INPUT_GET, 'PromoTicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['PromoTicket'] = $promoTicketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['PromoTicket'])) {
+
+ // Otherwise, get the promo ticket ID from the session
+ $promoID = $_SESSION[GLM_EVENT_SESSION]['PromoTicket'];
+
+ } else {
+
+ // Otherwise, we don't have a promo ticket id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($promoTicketID);
+
+ return $r;
+
+ }
+
+ /**
+ * Add New Promo Ticket
+ *
+ * @return array
+ */
+ function newPromoTicket()
+ {
+
+ $r = $this->newEntry();
+
+ return $r;
+
+ }
+
+ /**
+ * Insert Promo Ticket
+ *
+ * @return array
+ */
+ function insertPromoTicket()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current promo ticket to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['PromoTicket'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * Delete Promo Ticket
+ *
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete
+ *
+ * @return array
+ */
+ function promoTicketDelete($confirm = false)
+ {
+
+ // Is there a new promo ticket code selected?
+ if (($promoTicketID = filter_input(INPUT_GET, 'PromoTicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['PromoTicket'] = $promoTicketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['PromoTicket'])) {
+
+ // Otherwise, get the promo code ID from the session
+ $promoTicketID = $_SESSION[GLM_EVENT_SESSION]['PromoTicket'];
+
+ } else {
+
+ // Otherwise, we don't have an promo ticket id
+ return false;
+
+ }
+
+ $promoTicketDetail = $this->deleteEntry($promoTicketID, $confirm);
+
+ return $promoTicketDetail;
+
+ }
+
+
+ /**
+ * Format a number as money
+ *
+ * @param $value Value to format
+ * @param $option Options that control output
+ * NOPREFIX stops the "$" prefix
+ *
+ * @return none
+ * @access public
+ */
+ private function money($value, $option = "")
+ {
+
+ if ($option == "NOPREFIX")
+ $prefix = "";
+ else
+ $prefix = "$";
+
+ // Do value sanity check
+
+ if (!is_numeric($value))
+ return ($prefix."0.00");
+
+ return ($prefix.number_format($value, 2, ".", ","));
+ }
+
+
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Promo data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataPromos.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataPromos class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataPromos,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementDataPromos extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.promo_code';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Promo Code Name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Promo Code Long Name
+ 'long_name' => array(
+ 'field' => 'long_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Start Date
+ 'start_date' => array(
+ 'field' => 'start_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('12/31/'.date('Y').' +3 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // End Date
+ 'end_date' => array(
+ 'field' => 'end_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('12/31/'.date('Y').' +3 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+
+ // Check that Sticky is not used with date-specific inventory
+ if ($r['fieldData']['date_specific']['value'] && $r['fieldData']['cart_sticky']['value']) {
+ $r['status'] = false;
+ $r['fieldFail']['cart_sticky'] = 'Sticky may not be used when "Specified Dates" is checked.';
+ $r['fieldFail']['date_specific'] = 'Specified dates may not be used when "Sticky" is checked.';
+ }
+
+ return $r;
+ }
+
+ /**
+ * Get Promo Code list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getPromosList()
+ {
+
+ // Build query Where clause
+ $where = 'true';
+
+ // Get list of Promo Codes
+ $promosList = $this->getList($where, 'start_date, name');
+
+ return $promosList;
+ }
+
+ /**
+ * Get Promo Code Detail
+ *
+ * @return array
+ */
+ function getPromoDetail($promoID = false)
+ {
+
+ // If a promo code has been specified
+ if ($promoID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Promo'] = $promoID;\r
+
+ // Otherwise if there's a promo code ID in the request
+ } elseif (($promoID = filter_input(INPUT_GET, 'PromoID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // There's a Promo Code submitted, so save that
+ $_SESSION[GLM_EVENT_SESSION]['Promo'] = $promoID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Promo'])) {
+
+ // Otherwise, get the promo code ID from the session
+ $promoID = $_SESSION[GLM_EVENT_SESSION]['Promo'];
+
+ } else {
+
+ // Otherwise, we don't have a promo code id
+ return false;
+
+ }
+
+ $promoDetail = $this->getEntry($promoID);
+
+ return $promoDetail;
+
+ }
+
+ /**
+ * Edit Promo Code
+ *
+ * @return array
+ */
+ function editPromo()
+ {
+
+ if (($promoID = filter_input(INPUT_GET, 'PromoID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Promo'] = $promoID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Promo'])) {
+
+ // Otherwise, get the promo code ID from the session
+ $promoID = $_SESSION[GLM_EVENT_SESSION]['Promo'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id
+ return false;
+
+ }
+
+ $promoDetail = $this->editEntry($promoID);
+
+ return $promoDetail;
+
+ }
+
+ /**
+ * Update Promo Code
+ *
+ * @return array
+ */
+ function updatePromo()
+ {
+
+ if (($promoID = filter_input(INPUT_GET, 'PromoID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Promo'] = $promoID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Promo'])) {
+
+ // Otherwise, get the promo code ID from the session
+ $promoID = $_SESSION[GLM_EVENT_SESSION]['Promo'];
+
+ } else {
+
+ // Otherwise, we don't have a promo code id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($promoID);
+
+ return $r;
+
+ }
+
+ /**
+ * Add New Promo Code
+ *
+ * @return array
+ */
+ function newPromo()
+ {
+
+ $r = $this->newEntry();
+
+ return $r;
+
+ }
+
+ /**
+ * Insert Promo Code
+ *
+ * @return array
+ */
+ function insertPromo()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current promo code to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Promo'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * Delete Promo Code
+ *
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete
+ *
+ * @return array
+ */
+ function promoDelete($confirm = false)
+ {
+
+echo "dataPromos.php - promoDelete() - need to also delete from promo_ticket table";
+
+ // Is there a new promo code code selected?
+ if (($promoID = filter_input(INPUT_GET, 'PromoID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Promo'] = $promoID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Promo'])) {
+
+ // Otherwise, get the promo code ID from the session
+ $promoID = $_SESSION[GLM_EVENT_SESSION]['Promo'];
+
+ } else {
+
+ // Otherwise, we don't have an promo code id
+ return false;
+
+ }
+
+ $promoDetail = $this->deleteEntry($promoID, $confirm);
+
+ return $promoDetail;
+
+ }
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Reservations data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataReservations.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataReservations class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataReservations.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataReservations extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.reservation';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // User Trace Info
+ 'user_trace_info' => array(
+ 'field' => 'user_trace_info',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // First Name
+ 'fname' => array(
+ 'field' => 'fname',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Last Name
+ 'lname' => array(
+ 'field' => 'lname',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Team name (stored as "org") - need to clean up field name
+ 'org' => array(
+ 'field' => 'org',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Event
+ 'event' => array(
+ 'field' => 'event',
+ 'as' => 'event_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Event name
+ 'event' => array(
+ 'field' => 'event',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'event_code',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Team
+ 'team' => array(
+ 'field' => 'team',
+ 'as' => 'team_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.team',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // State Rep
+ 'state_rep' => array(
+ 'field' => 'state_rep',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // State Rep Code
+ 'state_rep_code' => array(
+ 'field' => 'state_rep',
+ 'as' => 'state_rep_code',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.state_rep',
+ 'p_field' => 'code',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member (property)
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Member (property) ID
+ 'member_id' => array(
+ 'field' => 'member',
+ 'as' => 'member_id',
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Address Line 1
+ 'addr1' => array(
+ 'field' => 'addr1',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Address Line 2
+ 'addr2' => array(
+ 'field' => 'addr2',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // City
+ 'city' => array(
+ 'field' => 'city',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // State
+ 'state' => array(
+ 'field' => 'state',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Country
+ 'country' => array(
+ 'field' => 'country',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lnieudc'
+ ),
+
+ // Country Full - Get Detail only\r
+ 'countryFull' => array(\r
+ 'field' => 'country',\r
+ 'as' => false,\r
+ 'type' => 'list',
+ 'list' => $this->config->countries->toArray(),
+ 'list_keytype' => 'text',\r
+ 'required' => true,\r
+ 'unique' => false,\r
+ 'default' => false,\r
+ 'use' => 'g'\r
+ ),\r
+
+ // ZIP
+ 'zip' => array(
+ 'field' => 'zip',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Phone
+ 'phone' => array(
+ 'field' => 'phone',
+ 'as' => false,
+ 'type' => 'phone',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+
+ // Contact E-Mail
+ 'email' => array(
+ 'field' => 'email',
+ 'as' => false,
+ 'type' => 'email',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // OK to sent email
+ 'email_ok' => array(
+ 'field' => 'email_ok',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Date reservation was entered.
+ 'date_entered' => array(
+ 'field' => 'date_entered',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Arrive Date
+ 'arrive_date' => array(
+ 'field' => 'arrive_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Nights
+ 'nights' => array(
+ 'field' => 'nights',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Number of Rooms
+ 'rooms' => array(
+ 'field' => 'rooms',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Occupants (adults)
+ 'adults' => array(
+ 'field' => 'adults',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Payment method
+ 'payby' => array(
+ 'field' => 'payby',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->pay_types->toArray(),
+ 'list_keytype' => 'int',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Credit Card Type
+ 'cctype' => array(
+ 'field' => 'cctype',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Credit Card Number
+ 'ccnumber' => array(
+ 'field' => 'ccnumber',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Credit Card Expiration
+ 'expire' => array(
+ 'field' => 'expire',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Name on Credit Card
+ 'ccname' => array(
+ 'field' => 'ccname',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Credit Card CCV
+ 'cccode' => array(
+ 'field' => 'cccode',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Total Room Rate for stay (formatted)
+ 'hotel_price' => array(
+ 'field' => 'hotel_price',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Total Room Rate for stay (number)
+ 'hotel_price_numb' => array(
+ 'field' => 'hotel_price',
+ 'as' => 'hotel_price_numb',
+ 'type' => 'float',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'l'
+ ),
+
+ // Total Taxes (formatted)
+ 'taxes' => array(
+ 'field' => 'taxes',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Total Taxes (number)
+ 'taxes_numb' => array(
+ 'field' => 'taxes',
+ 'as' => 'taxes_numb',
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'l'
+ ),
+
+ // Grand Total (formatted)
+ 'grand_total' => array(
+ 'field' => 'grand_total',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Grand Total (number)
+ 'grand_total_numb' => array(
+ 'field' => 'grand_total',
+ 'as' => 'grand_total_numb',
+ 'type' => 'float',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'l'
+ ),
+
+ // Confirmed
+ 'confirmed' => array(
+ 'field' => 'confirmed',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Declined
+ 'declined' => array(
+ 'field' => 'declined',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // date_confirmed
+ 'date_confirmed' => array(
+ 'field' => 'date_confirmed',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Confirmed By
+ 'conf_by' => array(
+ 'field' => 'conf_by',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Confirmation Message
+ 'conf_message' => array(
+ 'field' => 'conf_message',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Reservation Detail (serialized array)
+ 'res_detail' => array(
+ 'field' => 'res_detail',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'no_stripslashes' => true,
+ 'use' => 'a'
+ ),
+
+ // HTML Summary of Reservation
+ 'summary' => array(
+ 'field' => 'summary',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Get Reservations list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getReservationsList()
+ {
+
+ // Get event ID from session - if available
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ // Get member ID from session - if available
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ // Get accommodation ID from session - if available
+ $accomID = $_SESSION[GLM_EVENT_SESSION]['Accom'];
+
+ // Get team ID from session - if available
+ $teamID = $_SESSION[GLM_EVENT_SESSION]['Team'];
+
+ // Get any specified reservation listing option - default to event
+ $option = 'event';
+ if (($resListOption = filter_input(INPUT_GET, 'ReservationsListOption', FILTER_SANITIZE_STRING))) {
+ $option = $resListOption;
+ }
+ $status = 'all';
+ if (($resListStatus = filter_input(INPUT_GET, 'ReservationsListStatus', FILTER_SANITIZE_STRING))) {
+ $status = $resListStatus;
+ }
+
+ // Select type of list
+ $where = '';
+ switch ($option) {
+ case 'all':
+ $where = 'TRUE';
+ break;
+ case 'event':
+ if (!$eventID) {
+ return false;
+ }
+ $where = "T.event = $eventID";
+ break;
+ case 'member':
+ if (!$memberID) {
+ return false;
+ }
+ $where = "T.member = $memberID";
+ break;
+ case 'accom':
+ if (!$accomID) {
+ return false;
+ }
+ $where = "T.accommodation = $accomID";
+ break;
+ case 'team':
+ if (!$teamID) {
+ return false;
+ }
+ $where = "T.team_id = $memberID";
+ break;
+ default:
+ echo "Option not set";
+ break;
+ }
+
+ // Select by status
+ switch ($status) {
+ case 'pending':
+ $where .= ($where!=''?' AND ':'')." NOT T.confirmed AND NOT T.declined";
+ break;
+ case 'confirmed':
+ $where .= ($where!=''?' AND ':'')." T.confirmed AND NOT T.declined";
+ break;
+ case 'declined':
+ $where .= ($where!=''?' AND ':'')." T.declined";
+ break;
+ case 'all':
+ default:
+ break;
+ }
+
+ // Get list of Reservations
+ $resList = $this->getList($where);
+ return $resList;
+ }
+
+ /**
+ * Get Reservation Detail
+ *
+ * @return array
+ */
+ function getReservationDetail()
+ {
+
+ // Is there a new reservation code selected?
+ if (($resID = filter_input(INPUT_GET, 'ReservationID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Reservation'] = $resID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Reservation'])) {
+
+ // Otherwise, get the team ID from the session
+ $resID = $_SESSION[GLM_EVENT_SESSION]['Reservation'];
+
+ } else {
+
+ // Otherwise, we don't have a team id
+ return false;
+
+ }
+
+ $resDetail = $this->getEntry($resID);
+
+ // NEED TO PUT THIS CAPABILITY INTO ABSTRACT AS AN OPTION
+ $resDetail['summary'] = html_entity_decode($resDetail['summary']);
+
+ // echo "<pre>".print_r($resDetail,1)."</pre>";
+ return $resDetail;
+
+ }
+
+
+ /**
+ * Edit Reservation
+ *
+ * @return array
+ */
+ function editReservation()
+ {
+
+ if (($resID = filter_input(INPUT_GET, 'ReservationID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Reservation'] = $resID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Reservation'])) {
+
+ // Otherwise, get the team ID from the session
+ $teamID = $_SESSION[GLM_EVENT_SESSION]['Reservation'];
+
+ } else {
+
+ // Otherwise, we don't have a team id
+ return false;
+
+ }
+
+ $resDetail = $this->editEntry($resID);
+
+ return $resDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+
+ // Nothing here for now
+
+ return $r;
+ }
+
+ /**
+ * Update Reservation
+ *
+ * @return array
+ */
+ function updateReservation()
+ {
+
+ if (($resID = filter_input(INPUT_GET, 'ReservationID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Reservation'] = $resID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Reservation'])) {
+
+ // Otherwise, get the reservation ID from the session
+ $resID = $_SESSION[GLM_EVENT_SESSION]['Reservation'];
+
+ } else {
+
+ // Otherwise, we don't have a reservation id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($resID);
+
+ return $r;
+
+ }
+
+ /**
+ * Insert Reservation
+ *
+ * @return array
+ */
+ function insertReservation()
+ {
+
+ echo "INSERT NOT SUPPORTED FOR RESERVATIONS IN EVENT MANAGEMENT ADMIN AREA!";
+ exit;
+
+ }
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Accommodation Rooms data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataRooms.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataRooms class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataRooms.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataRooms extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.room_detail';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Member
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'i'
+ ),
+
+ // Accommodation
+ 'accommodation' => array(
+ 'field' => 'accommodation',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'i'
+ ),
+
+ // Occupants
+ 'occupants' => array(
+ 'field' => 'occupants',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Room Type - Needs to be moved to a separate admin table
+ 'room_type' => array(
+ 'field' => 'room_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->room_types->toArray(),
+ 'list_keytype' => 'int',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Bath Type - Needs to be moved to a separate admin table
+ 'bath_type' => array(
+ 'field' => 'bath_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->bath_types->toArray(),
+ 'list_keytype' => 'int',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Pull-out Beds
+ 'pullout_beds' => array(
+ 'field' => 'pullout_beds',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Single Beds
+ 'single_beds' => array(
+ 'field' => 'single_beds',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Double Beds
+ 'double_beds' => array(
+ 'field' => 'double_beds',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Queen Beds
+ 'queen_beds' => array(
+ 'field' => 'queen_beds',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // King Beds
+ 'king_beds' => array(
+ 'field' => 'king_beds',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // TV
+ 'tv' => array(
+ 'field' => 'tv',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Fridge
+ 'fridge' => array(
+ 'field' => 'fridge',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Safe
+ 'safe' => array(
+ 'field' => 'safe',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Image
+ 'image' => array(
+ 'field' => 'image',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Display Order (sort)
+ 'sort' => array(
+ 'field' => 'sort',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Get Rooms list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getRoomsList()
+ {
+
+ // Get accommodation ID from session - if available
+ $accomID = $_SESSION[GLM_EVENT_SESSION]['Accom'];
+
+ if (!$accomID) {
+ return false;
+ }
+
+ // Select type of list
+ $where = "T.accommodation = $accomID";
+
+ // Get list of States
+ $roomsList = $this->getList($where, 'sort');
+
+ // Build Beds summary
+ if ($roomsList && count($roomsList) > 0) {
+ reset($roomsList);
+ while( list($key, $val) = each( $roomsList ) ) {
+ $beds_summary = '';
+ $sep = '';
+ if ($val['pullout_beds'] > 0) {
+ $beds_summary .= $val['pullout_beds']." Pullout";
+ $sep = ', ';
+ }
+ if ($val['single_beds'] > 0) {
+ $beds_summary .= $sep.$val['single_beds']." Single";
+ $sep = ', ';
+ }
+ if ($val['double_beds'] > 0) {
+ $beds_summary .= $sep.$val['double_beds']." Double";
+ $sep = ', ';
+ }
+ if ($val['queen_beds'] > 0) {
+ $beds_summary .= $val['queen_beds']." Queen";
+ $sep = ', ';
+ }
+ if ($val['king_beds'] > 0) {
+ $beds_summary .= $val['king_beds']." King";
+ $sep = ', ';
+ }
+ $roomsList[$key]['beds_summary'] = $beds_summary;
+ }
+ }
+
+ return $roomsList;
+ }
+
+ /**
+ * Get Room Detail
+ *
+ * @return array
+ */
+ function getRoomDetail()
+ {
+
+ // Is there a new State Rep code selected?
+ if (!($roomID = filter_input(INPUT_GET, 'RoomID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ return false;
+
+ }
+
+ $roomDetail = $this->getEntry($roomID);
+
+ return $roomDetail;
+
+ }
+
+
+ /**
+ * Edit Room
+ *
+ * @return array
+ */
+ function editRoom()
+ {
+ if (!($roomID = filter_input(INPUT_GET, 'RoomID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // Otherwise, we don't have a state rep id
+ return false;
+
+ }
+
+ $roomDetail = $this->editEntry($roomID);
+
+ $roomDetail['RoomID'] = $roomID;
+
+ // echo "<pre>".print_r($roomDetail,1)."</pre>";
+ return $roomDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+ /**
+ * Update Room
+ *
+ * @return array
+ */
+ function updateRoom()
+ {
+
+ if (!($roomID = filter_input(INPUT_POST, 'RoomID', FILTER_SANITIZE_NUMBER_INT))) {
+ return false;
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($roomID);
+
+ $r['fieldData']['RoomID'] = $roomID;
+
+ return $r;
+
+ }
+
+
+ /**
+ * Add New Room
+ *
+ * @return array
+ */
+ function newRoom()
+ {
+ // Get member and accommodation ID from session - if available
+ $membID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+ $accomID = $_SESSION[GLM_EVENT_SESSION]['Accom'];
+
+ if (!$accomID) {
+ return false;
+ }
+
+ $r = $this->newEntry();
+
+ $r['fieldData']['member'] = $membID;
+ $r['fieldData']['accommodation'] = $accomID;
+
+ return $r;
+
+ }
+
+ /**
+ * Insert Room
+ *
+ * @return array
+ */
+ function insertRoom()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current state rep to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['State'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Ticket Section data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataSections.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataSections class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataSections.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataSections extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.section';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Member ID for adding sections
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'use' => 'nid'
+ ),
+
+ // Member Name display
+ 'member_view' => array(
+ 'field' => 'member',
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Section Name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Image
+ 'image' => array(
+ 'field' => 'image',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Entrance
+ 'entrance' => array(
+ 'field' => 'entrance',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.entrance',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_where' => 'member = '.$_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'nideu'
+ ),
+
+ // Entrance_view
+ 'entrance_view' => array(
+ 'field' => 'entrance',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.entrance',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gl'
+ ),
+
+ // Entrance_id
+ 'entrance_id' => array(
+ 'field' => 'entrance',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gl'
+ ),
+
+ // Sort order
+ 'sort' => array(
+ 'field' => 'sort',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 999,
+ 'use' => 'a'
+ ),
+
+ // Notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+
+ );
+ }
+
+ /**
+ * Get Sections list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getSectionsList($memberID = false, $where = false)
+ {
+
+ // If a where clause has not been supplied
+ if (!$where) {
+
+ $where = 'true';
+
+ // Check if there's a member ID and filter by that member if there is
+ $memberID = ($memberID - 0); // Make sure it's number
+ if ($memberID > 0) {
+ $where .= " AND T.member = $memberID";
+ } elseif ($_SESSION[GLM_EVENT_MGT_ADMIN]['Member'] > 0) {
+ $where .= " AND T.member = ".$_SESSION[GLM_EVENT_MGT_ADMIN]['Member'];
+ }
+
+ }
+
+ // Get list of Sections
+ $sectionsList = $this->getList($where, 'sort, name');
+
+ return $sectionsList;
+ }
+
+ /**
+ * Get Section Detail
+ *
+ * @return array
+ */
+ function getSectionDetail($sectionID = false)
+ {
+
+ // If a section ID has been supplied
+ if ($sectionID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Section'] = $sectionID;
+
+ } elseif (($sectionID = filter_input(INPUT_GET, 'SectionID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // Otherwise if there a new section ID supplied via the request
+ $_SESSION[GLM_EVENT_SESSION]['Section'] = $sectionID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Section'])) {
+
+ // Otherwise, get the event ID from the session
+ $sectionID = $_SESSION[GLM_EVENT_SESSION]['Section'];
+
+ } else {
+
+ // Otherwise, we don't have an event id
+ return false;
+
+ }
+
+ $sectionDetail = $this->getEntry($sectionID);
+
+ return $sectionDetail;
+
+ }
+
+
+ /**
+ * Edit Section
+ *
+ * @return array
+ */
+ function editSection()
+ {
+
+ if (($sectionID = filter_input(INPUT_GET, 'SectionID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Section'] = $sectionID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Section'])) {
+
+ // Otherwise, get the section ID from the session
+ $sectionID = $_SESSION[GLM_EVENT_SESSION]['Section'];
+
+ } else {
+
+ // Otherwise, we don't have a section id
+ return false;
+
+ }
+
+ $sectionDetail = $this->editEntry($sectionID);
+
+ return $sectionDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+ /**
+ * Update Section
+ *
+ * @return array
+ */
+ function updateSection()
+ {
+
+ if (($sectionID = filter_input(INPUT_GET, 'SectionID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Section'] = $sectionID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Section'])) {
+
+ // Otherwise, get the section ID from the session
+ $sectionID = $_SESSION[GLM_EVENT_SESSION]['Section'];
+
+ } else {
+
+ // Otherwise, we don't have a section id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($sectionID);
+
+ return $r;
+
+ }
+
+
+ /**
+ * Add New Section
+ *
+ * @return array
+ */
+ function newSection()
+ {
+
+ $r = $this->newEntry();
+
+ return $r;
+
+ }
+
+ /**
+ * Insert Section
+ *
+ * @return array
+ */
+ function insertSection()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current section to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Section'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+
+ /**\r
+ * Delete Section\r
+ *\r
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete\r
+ *\r
+ * @return array\r
+ */\r
+ function sectionDelete($confirm = false)\r
+ {\r
+\r
+ // Is there a new section code selected?\r
+ if (($sectionID = filter_input(INPUT_GET, 'SectionID', FILTER_SANITIZE_NUMBER_INT))) {\r
+\r
+ // If so then add it to the session\r
+ $_SESSION[GLM_EVENT_SESSION]['Section'] = $sectionID;\r
+\r
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Section'])) {\r
+\r
+ // Otherwise, get the section ID from the session\r
+ $sectionID = $_SESSION[GLM_EVENT_SESSION]['Section'];\r
+\r
+ } else {\r
+\r
+ // Otherwise, we don't have an section id\r
+ return false;\r
+\r
+ }\r
+\r
+ $sectionDetail = $this->deleteEntry($sectionID, $confirm);\r
+\r
+ return $sectionDetail;\r
+\r
+ }\r
+
+ /**\r
+ * Get Sections Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getSectionsStats($where = 'true')\r
+ {\r
+\r
+ $sectionsStats = $this->getStats($where);\r
+\r
+ return $sectionsStats;\r
+ }\r
+\r
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Ticket sold data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataSold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataSold class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataSold,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementDataSold extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.ticket_sold';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Ticket Sold (Voucher) ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Order ID
+ 'ticket_order' => array(
+ 'field' => 'ticket_order',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Member ID
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Member Name
+ 'member_name' => array(
+ 'field' => 'member_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Ticket Voucher Left End Text
+ 'real_member_name' => array(
+ 'field' => 'member',
+ 'as' => 'real_member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Assigned (consignment to another venue)
+ 'assigned' => array(
+ 'field' => 'assigned',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Assigned From ID
+ 'assigned_from' => array(
+ 'field' => 'assigned_from',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Assigned from name
+ 'assigned_from_name' => array(
+ 'field' => 'assigned_from_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Performance ID
+ 'performance' => array(
+ 'field' => 'performance',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Performance Name
+ 'performance_name' => array(
+ 'field' => 'performance_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Entrance ID
+ 'entrance' => array(
+ 'field' => 'entrance',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Entrance Name
+ 'entrance_name' => array(
+ 'field' => 'entrance_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Entrance Color
+ 'entrance_color' => array(
+ 'field' => 'entrance_color',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Section ID
+ 'section' => array(
+ 'field' => 'section',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Section Name
+ 'section_name' => array(
+ 'field' => 'section_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Ticket ID
+ 'ticket' => array(
+ 'field' => 'ticket',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Ticket Name
+ 'ticket_name' => array(
+ 'field' => 'ticket_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Is Package
+ 'is_package' => array(
+ 'field' => 'is_package',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Ticket Package - points to ticket that is a package that includes this ticket - 0 if not part of a package
+ 'ticket_package' => array(
+ 'field' => 'ticket_package',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Package Sold ID
+ 'package_sold_id' => array(
+ 'field' => 'package_sold_id',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Package Name
+ 'package_name' => array(
+ 'field' => 'package_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Ticket Voucher Text
+ 'ticket_voucher_text' => array(
+ 'field' => 'ticket',
+ 'as' => 'ticket_voucher_text',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'voucher_text',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Ticket Voucher Type
+ 'ticket_voucher_type' => array(
+ 'field' => 'ticket',
+ 'as' => 'ticket_voucher_type',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'voucher_type',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Ticket Voucher Left End Text
+ 'ticket_voucher_leftend_text' => array(
+ 'field' => 'ticket',
+ 'as' => 'ticket_voucher_leftend_text',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'voucher_leftend_text',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Date Specific flag
+ 'date_specific' => array(
+ 'field' => 'date_specific',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Ticket Date
+ 'ticket_date' => array(
+ 'field' => 'ticket_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Time Specific flag
+ 'time_specific' => array(
+ 'field' => 'time_specific',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Ticket Time
+ 'ticket_time' => array(
+ 'field' => 'ticket_time',
+ 'as' => false,
+ 'type' => 'time',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Start Date for non-date-specific tickets
+ 'start_date' => array(
+ 'field' => 'start_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // End Date for non-date-specific tickets
+ 'end_date' => array(
+ 'field' => 'end_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Date customer will likely use this ticket
+ 'likely_date' => array(
+ 'field' => 'likely_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Price Paid
+ 'price_paid' => array(
+ 'field' => 'price_paid',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Policies at time of order
+ 'policies' => array(
+ 'field' => 'policies',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Unlimited Use flag
+ 'unlimited_use' => array(
+ 'field' => 'unlimited_use',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Number of uses
+ 'numb_uses' => array(
+ 'field' => 'numb_uses',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Number of times claimed
+ 'numb_claimed' => array(
+ 'field' => 'numb_claimed',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgd'
+ ),
+
+ // Time Claimed
+ 'time_claimed' => array(
+ 'field' => 'time_claimed',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y h:i:s A',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lged'
+ )
+
+ );
+ }
+
+
+ /**
+ * Get Orders list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getSoldList($orderID = false, $memberID = false)
+ {
+
+ // If a order has been specified
+ if ($orderID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Order'] = $orderID;
+
+ // Otherwise if there's a order ID in the request
+ } elseif (($orderID = filter_input(INPUT_GET, 'OrderID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Order'] = $orderID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Order'])) {
+
+ $orderID = $_SESSION[GLM_EVENT_SESSION]['Order'];
+
+ } else {
+
+ // Otherwise, we don't have an order id
+ return false;
+
+ }
+
+ $where = '';
+ if ($memberID) {
+ $where = "AND T.member = $memberID";
+ }
+
+ // Get list of Tickets Sold
+ $soldList = $this->getList("T.ticket_order = $orderID $where", 'T.ticket_order, T.package_sold_id, T.id');
+
+ // Load addonsSold class
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/addonsSold.php';
+ $addonsSold = new EventManagementAdminAddonsSold($this->dbh, $this->config);
+
+ // For each ticket, check for any add-ons that have been sold with it
+ if ($soldList != false) {
+ reset($soldList);
+ while (list($key, $val) = each($soldList)) {
+ // Get any add-ons included with this ticket
+ $addonsSoldList = $addonsSold->getAddonsSoldList($val['id']);
+ if ($addonsSoldList) {
+ $soldList[$key]['addons_sold'] = $addonsSoldList;
+ }
+ }
+ }
+
+ return $soldList;
+ }
+
+ /**
+ * Get Ticket Sold Detail
+ *
+ * @return array
+ */
+ function getSoldDetail($soldID = false, $memberID = false)
+ {
+ // Test Check character
+ $testCheck = false;
+
+ // If a order has been specified
+ if ($soldID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Sold'] = $soldID;
+
+ // Otherwise if there's a sold ID in the request
+ } elseif (($soldID = filter_input(INPUT_GET, 'SoldID', FILTER_SANITIZE_STRING))) {
+
+ // Do a check character test if input from form.
+ $testCheck = true;
+
+ $_SESSION[GLM_EVENT_SESSION]['Sold'] = $soldID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Sold'])) {
+
+ $soldID = $_SESSION[GLM_EVENT_SESSION]['Sold'];
+
+ } else {
+
+ // Otherwise, we don't have an ticket sold id
+ return false;
+
+ }
+
+ $checkBypass = filter_input(INPUT_GET, 'checkBypass', FILTER_SANITIZE_STRING);
+ if ( $checkBypass == 'true') {
+ $testCheck = false;
+ }
+
+
+ $where = '';
+ if ($memberID) {
+ $where = "AND T.member = $memberID";
+ }
+
+ // If input came from form, then test the check char
+ $voucherNumb = $soldID;
+ if ($testCheck) {
+ // Separate check character from voucher number
+ $voucherNumb = substr($soldID, 0, -2);
+ $checkChar = substr($soldID, -2);
+
+ // Check if check character
+ $c = $this->getCheckCode($voucherNumb);
+ if ($c != strtoupper($checkChar)) {
+
+ return false;
+ }
+ }
+
+ // If number has
+ $soldDetail = $this->getEntry($voucherNumb, 'id', $where);
+
+ // If we have a member ID then make sure the sold ticket is for that member
+ if ($memberID && $soldDetail['member'] != $memberID) {
+ return false;
+ }
+
+ return $soldDetail;
+
+ }
+
+
+ /**
+ * Edit Sold
+ *
+ * @return array
+ */
+ function editSold()
+ {
+echo "editSold() not competed";
+/*
+ if (($ticketID = filter_input(INPUT_GET, 'TicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Ticket'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id
+ return false;
+
+ }
+
+ $ticketDetail = $this->editEntry($ticketID);
+
+ return $ticketDetail;
+*/
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+ /**
+ * Update Ticket Sold
+ *
+ * @return array
+ */
+ function updateSold()
+ {
+
+echo "updateSold() not competed";
+/*
+ if (($ticketID = filter_input(INPUT_GET, 'TicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Ticket'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($ticketID);
+
+ return $r;
+*/
+ }
+
+ /**
+ * Delete Ticket Sold
+ *
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete
+ *
+ * @return array
+ */
+ function soldDelete($confirm = false)
+ {
+echo "soldDelete() not competed";
+/*
+
+ // Is there a new ticket code selected?
+ if (($ticketID = filter_input(INPUT_GET, 'TicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Ticket'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'];
+
+ } else {
+
+ // Otherwise, we don't have an ticket id
+ return false;
+
+ }
+
+ $ticketDetail = $this->deleteEntry($ticketID, $confirm);
+
+ return $ticketDetail;
+*/
+ }
+
+
+ /*
+ * Function to add check character to end of voucher number
+ *
+ * Uses config->voucher_check_secret and voucher # to create MD5 string
+ * then takes last hex character off of that string and shifts it up to
+ * always be a character (adds 16 to numbers and 10 to the upper-case
+ * version of the character).
+ * i.e. 0 = A, 9 = J, A = K, F =
+ *
+ */
+ public function getCheckCode($voucherNumb)
+ {
+
+ // Create MD5 string using voucher number and secret
+ $md5 = md5($voucherNumb.$this->config->voucher_check_secret);
+
+ // Get last character code of the last character in the MD5
+ $cc = strtoupper(substr($md5, -2));
+ $cc[0] = $this->shiftCheckCodeCharacter($cc[0]);
+ $cc[1] = $this->shiftCheckCodeCharacter($cc[1]);
+
+ // Return check code
+ return $cc;
+
+ }
+
+ private function shiftCheckCodeCharacter($c) {
+
+ $x = ord($c);
+
+ // If it's a digit, add 16
+ if ($x < 65) {
+ $x += 17;
+ // otherwise, add 10
+ } else {
+ $x += 10;
+ }
+
+ // Also skip the letter O
+ if (x >= ord('O')) {
+ $x += 1;
+ }
+
+ return chr($x);
+ }
+
+}
+
+
+
+
+?>
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * State Reps data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataStates.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataStates class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataStates.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataStates extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.state_rep';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Event selection
+ 'conv' => array(
+ 'field' => 'conv',
+ 'as' => 'event_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'nid'
+ ),
+
+ // Event Name display
+ 'conv_view' => array(
+ 'field' => 'conv',
+ 'as' => 'event_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // State Rep Code
+ 'code' => array(
+ 'field' => 'code',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Password
+ 'password' => array(
+ 'field' => 'password',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Get States list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getStatesList()
+ {
+
+ // Get event ID from session - if available
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ // Get any specified state rep listing option - default to event
+ $option = 'event';
+ if (($statesListOption = filter_input(INPUT_GET, 'StatesListOption', FILTER_SANITIZE_STRING))) {
+ $option = $statesListOption;
+ }
+
+ // Select type of list
+ $where = '';
+ switch ($option) {
+ case 'all':
+ $where = 'TRUE';
+ break;
+ case 'event':
+ if (!$eventID) {
+ return false;
+ }
+ $where = "T.conv = $eventID";
+ break;
+ default:
+ echo "Option not set";
+ break;
+ }
+
+ // Get list of States
+ $statesList = $this->getList($where, 'code');
+
+ return $statesList;
+ }
+
+ /**
+ * Get State Rep Detail
+ *
+ * @return array
+ */
+ function getStateDetail()
+ {
+
+ // Is there a new State Rep code selected?
+ if (($stateID = filter_input(INPUT_GET, 'StateID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['State'] = $stateID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['State'])) {
+
+ // Otherwise, get the state rep ID from the session
+ $stateID = $_SESSION[GLM_EVENT_SESSION]['State'];
+
+ } else {
+
+ // Otherwise, we don't have a state rep id
+ return false;
+
+ }
+
+ $stateDetail = $this->getEntry($stateID);
+
+ return $stateDetail;
+
+ }
+
+
+ /**
+ * Edit State Rep
+ *
+ * @return array
+ */
+ function editState()
+ {
+
+ if (($stateID = filter_input(INPUT_GET, 'StateID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['State'] = $stateID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['State'])) {
+
+ // Otherwise, get the state rep ID from the session
+ $stateID = $_SESSION[GLM_EVENT_SESSION]['State'];
+
+ } else {
+
+ // Otherwise, we don't have a state rep id
+ return false;
+
+ }
+
+ $stateDetail = $this->editEntry($stateID);
+
+ return $stateDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+ /**
+ * Update State Rep
+ *
+ * @return array
+ */
+ function updateState()
+ {
+
+ if (($stateID = filter_input(INPUT_GET, 'StateID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['State'] = $stateID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['State'])) {
+
+ // Otherwise, get the state rep ID from the session
+ $stateID = $_SESSION[GLM_EVENT_SESSION]['State'];
+
+ } else {
+
+ // Otherwise, we don't have a state rep id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($stateID);
+
+ return $r;
+
+ }
+
+
+ /**
+ * Add New State Rep
+ *
+ * @return array
+ */
+ function newState()
+ {
+
+ $r = $this->newEntry();
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $event = isset($_SESSION[GLM_EVENT_SESSION]['Event']);
+ $r['fieldData']['event_name']['pick_list'][$event]['default'] = true;
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * Insert State Rep
+ *
+ * @return array
+ */
+ function insertState()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current state rep to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['State'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Teams data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataTeams.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataTeams class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataTeams.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+class EventManagementDataTeams extends DataAbstract
+{
+ /**
+ * Field definitions
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.team';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Event selection
+ 'event' => array(
+ 'field' => 'event',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'nid'
+ ),
+
+ // Event Name display
+ 'event_view' => array(
+ 'field' => 'event',
+ 'as' => 'event_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.event',
+ 'p_field' => 'event_code',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // State (rep) selection
+ 'state' => array(
+ 'field' => 'state',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.state_rep',
+ 'p_field' => 'code',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'ni'
+ ),
+
+ // State (rep) Name display
+ 'state_view' => array(
+ 'field' => 'state',
+ 'as' => 'state_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.state_rep',
+ 'p_field' => 'code',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Division selection
+ 'division' => array(
+ 'field' => 'division',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.division',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'nid'
+ ),
+
+ // Division Name display
+ 'division_view' => array(
+ 'field' => 'division',
+ 'as' => 'division_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.division',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Team name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Team Code
+ 'team_code' => array(
+ 'field' => 'team_code',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Participants
+ 'participants' => array(
+ 'field' => 'participants',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Notes
+ 'notes' => array(
+ 'field' => 'notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Get Teams list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getTeamsList()
+ {
+
+ // Get event ID from session - if available
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ // Get member ID from session - if available
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+
+ // Clear Session Team Selection
+// $_SESSION[GLM_EVENT_SESSION]['Team'] = false;
+
+ // Get any specified team listing option - default to event
+ $option = 'event';
+ if (($teamsListOption = filter_input(INPUT_GET, 'TeamsListOption', FILTER_SANITIZE_STRING))) {
+ $option = $teamsListOption;
+ }
+
+ // Select type of list
+ $where = '';
+ switch ($option) {
+ case 'all':
+ $where = 'TRUE';
+ break;
+ case 'member':
+ if (!$memberID) {
+ return false;
+ }
+ $where = "
+ T.id in (
+ SELECT team
+ FROM team_property
+ WHERE property = $memberID
+ )
+ ";
+ break;
+ case 'event':
+ if (!$eventID) {
+ return false;
+ }
+ $where = "T.event = $eventID";
+ break;
+ default:
+ echo "Option not set";
+ break;
+ }
+
+ // Get list of Teams
+ $teamsList = $this->getList($where, 'event_name,state_name,division_name,name');
+
+ return $teamsList;
+ }
+
+ /**
+ * Get Team Detail
+ *
+ * @return array
+ */
+ function getTeamDetail()
+ {
+
+ // Is there a new team code selected?
+ if (($teamID = filter_input(INPUT_GET, 'TeamID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Team'] = $teamID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Team'])) {
+
+ // Otherwise, get the team ID from the session
+ $teamID = $_SESSION[GLM_EVENT_SESSION]['Team'];
+
+ } else {
+
+ // Otherwise, we don't have a team id
+ return false;
+
+ }
+
+ $teamDetail = $this->getEntry($teamID);
+ $teamRoster = $this->getTeamRoster($teamID, $teamDetail['participants']);
+
+ $r = array(
+ 'teamDetail' => $teamDetail,
+ 'teamRoster' => $teamRoster
+ );
+
+ return $r;
+
+ }
+
+ /**
+ * Get Team Roster
+ *
+ * @return array
+ */
+ function getTeamRoster($teamID, $participants)
+ {
+ // Try to get team roster
+ $sql = "SELECT *
+ FROM team_roster
+ WHERE team = $teamID
+ ORDER BY
+ CASE lname WHEN '' THEN 'ZZZZZZZ' ELSE lname END,
+ CASE fname WHEN '' THEN 'ZZZZZZZ' ELSE fname END;";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $teamRoster = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // Did we get less entries than team members listed?
+ if (count($teamRoster) < $participants) {
+ // Add number of additional participant slots to roster
+ $sql2 = array();
+ for ($i=count($teamRoster) ; $i<$participants ; $i++ ) {
+ $sql2[] = "INSERT INTO eventmgt.team_roster (team) values ($teamID);";
+ }
+
+ try {
+ $this->dbh->beginTransaction();
+ foreach ($sql2 as $s) {
+ $this->dbh->exec($s);
+ }
+ $this->dbh->commit();
+ } catch (Exception $e) {
+ $this->dbh->rollBack();
+ }
+
+ // Get the team roster again
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $teamRoster = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ }
+
+ // Convert to array that has the roster ids as the index
+ $tr = array();
+ foreach($teamRoster as $r) {
+ $tr[$r['id']] = $r;
+ }
+
+ return $tr;
+ }
+
+
+ /**
+ * Edit Team
+ *
+ * @return array
+ */
+ function editTeam()
+ {
+
+ if (($teamID = filter_input(INPUT_GET, 'TeamID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Team'] = $teamID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Team'])) {
+
+ // Otherwise, get the team ID from the session
+ $teamID = $_SESSION[GLM_EVENT_SESSION]['Team'];
+
+ } else {
+
+ // Otherwise, we don't have a team id
+ return false;
+
+ }
+
+ $teamDetail = $this->editEntry($teamID);
+
+ // echo "<pre>".print_r($teamDetail,1)."</pre>";
+ return $teamDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+/*
+ $fd = $r['fieldData'];
+
+ // Is Start date is later than End date
+ if (strtotime($fd['start_date']) > strtotime($fd['end_date'])) {
+ $r['fieldFail']['start_date'] = 'Start date is later than end date.';
+ $r['status'] = false;
+ }
+
+ // Is cutoff date is later than end date
+ if (strtotime($fd['cutoff_date']) > strtotime($fd['end_date'])) {
+ $r['fieldFail']['cutoff_date'] = 'Cutoff date is later than end date.';
+ $r['status'] = false;
+ }
+*/
+ return $r;
+ }
+
+ /**
+ * Update Team
+ *
+ * @return array
+ */
+ function updateTeam()
+ {
+
+ if (($teamID = filter_input(INPUT_GET, 'TeamID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Team'] = $teamID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Team'])) {
+
+ // Otherwise, get the team ID from the session
+ $teamID = $_SESSION[GLM_EVENT_SESSION]['Team'];
+
+ } else {
+
+ // Otherwise, we don't have a team id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($teamID);
+
+ return $r;
+
+ }
+
+
+ /**
+ * Add New Team
+ *
+ * @return array
+ */
+ function newTeam()
+ {
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+ } else {
+ // Don't have a selected Event, so can't add a team.
+ return false;
+ }
+
+ // Set the p_where values for State Rep and Division picklists to only display ones associated
+ // with the selected event.
+ $this->fields['state']['p_where'] = "event = $eventID";
+ $this->fields['division']['p_where'] = "event = $eventID";
+
+ $r = $this->newEntry();
+
+ // Add selected event id and name for display in new team form
+ $r['fieldData']['event']['value'] = $eventID;
+ $r['fieldData']['event']['name'] = $r['fieldData']['event']['pick_list'][$eventID]['name'];
+
+ // Set selected event - Note that the template should actally not be using the event pick_list
+ // for new team entry unless we get the page to reload with the correct State Rep and Division lists.
+ $r['fieldData']['event']['pick_list'][$eventID]['default'] = true;
+
+ // If there's a currently selected State, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['State']) && $_SESSION[GLM_EVENT_SESSION]['State'] != false) {
+ $stateID = isset($_SESSION[GLM_EVENT_SESSION]['State']);
+ $r['fieldData']['state']['pick_list'][$stateID]['default'] = true;
+ }
+
+ // If there's a currently selected Division, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Division']) && $_SESSION[GLM_EVENT_SESSION]['Division'] != false) {
+ $divisionID = isset($_SESSION[GLM_EVENT_SESSION]['Division']);
+ $r['fieldData']['division']['pick_list'][$divisionID]['default'] = true;
+ }
+
+ // echo "<pre>".print_r($r,1)."</pre>";
+ return $r;
+
+ }
+
+ /**
+ * Insert Team
+ *
+ * @return array
+ */
+ function insertTeam()
+ {
+
+ // If there's a currently selected Event, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event']) && $_SESSION[GLM_EVENT_SESSION]['Event'] != false) {
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+ } else {
+ // Don't have a selected Event, so can't add a team.
+ return false;
+ }
+
+ // Set the p_where values for State Rep and Division picklists to only display ones associated
+ // with the selected event.
+ $this->fields['state']['p_where'] = "event = $eventID";
+ $this->fields['division']['p_where'] = "event = $eventID";
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current team to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Team'] = $r['insertedID'];
+ }
+
+ // Add selected event name and value for display in new team form
+ $r['fieldData']['event']['name'] = $r['fieldData']['event']['pick_list'][$eventID]['name'];
+ $r['fieldData']['event']['value'] = $eventID;
+
+ // Set selected event - Note that the template should actally not be using the event pick_list
+ // for new team entry unless we get the page to reload with the correct State Rep and Division lists.
+ $r['fieldData']['event']['pick_list'][$eventID]['default'] = true;
+
+ // If there's a currently selected State, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['State']) && $_SESSION[GLM_EVENT_SESSION]['State'] != false) {
+ $stateID = $_SESSION[GLM_EVENT_SESSION]['State'];
+ $r['fieldData']['state']['pick_list'][$stateID]['default'] = true;
+ }
+
+ // If there's a currently selected Division, set that as default
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Division']) && $_SESSION[GLM_EVENT_SESSION]['Division'] != false) {
+ $divisionID = $_SESSION[GLM_EVENT_SESSION]['Division'];
+ $r['fieldData']['division']['pick_list'][$divisionID]['default'] = true;
+ }
+
+ // echo "<pre>".print_r($r,1)."</pre>";
+ return $r;
+
+ }
+
+ /**
+ * Edit Team Roster
+ *
+ * @return array
+ */
+ function editTeamRoster()
+ {
+
+ if (($teamID = filter_input(INPUT_GET, 'TeamID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Team'] = $teamID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Team'])) {
+
+ // Otherwise, get the team ID from the session
+ $teamID = $_SESSION[GLM_EVENT_SESSION]['Team'];
+
+ } else {
+
+ // Otherwise, we don't have a team id
+ return false;
+
+ }
+
+ // Get team detail for reference
+ $teamDetail = $this->getEntry($teamID);
+
+ $teamRoster = $this->getTeamRoster($teamID, $teamDetail['participants']);
+
+ $r = array(
+ 'teamDetail' => $teamDetail,
+ 'teamRoster' => $teamRoster
+ );
+
+ return $r;
+
+ }
+
+ /**
+ * Update Team Roster
+ *
+ * @return array
+ */
+ function updateTeamRoster()
+ {
+
+ if (($teamID = filter_input(INPUT_GET, 'TeamID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Team'] = $teamID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Team'])) {
+
+ // Otherwise, get the team ID from the session
+ $teamID = $_SESSION[GLM_EVENT_SESSION]['Team'];
+
+ } else {
+
+ // Otherwise, we don't have a team id
+ return false;
+
+ }
+
+ // Get team detail for reference
+ $teamDetail = $this->getEntry($teamID);
+
+ $teamRoster = $this->getTeamRoster($teamID, $teamDetail['participants']);
+
+ $fieldFail = array();
+ $status = true;
+
+ // Filter and sanitize all input arrays
+ $lname_in = filter_input(INPUT_POST, "lname", FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES|FILTER_REQUIRE_ARRAY);
+ $fname_in = filter_input(INPUT_POST, "fname", FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES|FILTER_REQUIRE_ARRAY);
+ $pos_in = filter_input(INPUT_POST, "pos", FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES|FILTER_REQUIRE_ARRAY);
+ $notes_in = filter_input(INPUT_POST, "notes", FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES|FILTER_REQUIRE_ARRAY);
+
+ // For each participant
+ while (list($key, $val) = each($lname_in)) {
+
+ // Last Name
+ if ($lname_in[$key] || $lname_in[$key] == '') {
+ $teamRoster[$key]['lname'] = $lname_in[$key];
+ $fieldFail[$key]['lname'] = false;
+ } else {
+ $fieldFail[$key]['lname'] = 'Provided input was not a valid string.';
+ $status = false;
+ }
+
+ // First Name
+ if ($fname_in[$key] || $fname_in[$key] == '') {
+ $teamRoster[$key]['fname'] = $fname_in[$key];
+ $fieldFail[$key]['fname'] = false;
+ } else {
+ $fieldFail[$key]['fname'] = 'Provided input was not a valid string.';
+ $status = false;
+ }
+
+ // Position
+ if ($pos_in[$key] || $pos_in[$key] == '') {
+ $teamRoster[$key]['pos'] = $pos_in[$key];
+ $fieldFail[$key]['pos'] = false;
+ } else {
+ $fieldFail[$key]['pos'] = 'Provided input was not a valid string.';
+ $status = false;
+ }
+
+ // Notes
+ if ($notes_in[$key] || $notes_in[$key] == '') {
+ $teamRoster[$key]['notes'] = $notes_in[$key];
+ $fieldFail[$key]['notes'] = false;
+ } else {
+ $fieldFail[$key]['notes'] = 'Provided input was not a valid string.';
+ $status = false;
+ }
+ }
+
+ // If submission is safe, then update the roster table
+ if ($status) {
+ $sql = array();
+ foreach ($teamRoster as $r) {
+ $sql[] = "UPDATE team_roster
+ SET lname = '".addslashes($r['lname'])."',
+ fname = '".addslashes($r['fname'])."',
+ pos = '".addslashes($r['pos'])."',
+ notes = '".addslashes($r['notes'])."'
+ WHERE id = ".$r['id'].";";
+ }
+
+ try {
+ $this->dbh->beginTransaction();
+ foreach ($sql as $s) {
+ $this->dbh->exec($s);
+ }
+ $this->dbh->commit();
+ } catch (Exception $e) {
+ $this->dbh->rollBack();
+ }
+
+ // Get team roster again so it's propety ordered
+ $teamRoster = $this->getTeamRoster($teamID, $teamDetail['participants']);
+
+ }
+
+ $r = array(
+ 'status' => $status,
+ 'teamDetail' => $teamDetail,
+ 'teamRoster' => $teamRoster,
+ 'fieldFail' => $fieldFail
+ );
+
+ return $r;
+
+ }
+
+
+
+}
+
+
+
+
+?>
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Ticket Claim Tracking data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataTicketClaimTtracking.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataTicketClaimTracking class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataTicketClaimTracking,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+class EventManagementDataTicketClaimTracking extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.ticket_claim_tracking';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Ticket Order
+ 'ticket_order' => array(
+ 'field' => 'ticket_order',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Ticket Sold
+ 'ticket_sold' => array(
+ 'field' => 'ticket_sold',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Time of scan (timestamp)
+ 'time_of_action' => array(
+ 'field' => 'time_of_action',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Action Type
+ 'action_type' => array(
+ 'field' => 'action_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->member_type->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 1,
+ 'use' => 'a'
+ ),
+
+ // Quantity
+ 'quant' => array(
+ 'field' => 'quant',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Scan User
+ 'scan_user' => array(
+ 'field' => 'scan_user',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Scan Name
+ 'scan_name' => array(
+ 'field' => 'scan_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Attendance Entry
+ 'attendance' => array(
+ 'field' => 'attendance',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Attendee Name
+ 'attendee_name' => array(
+ 'field' => 'attendee_name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Attendee Notes
+ 'attendee_notes' => array(
+ 'field' => 'attendee_notes',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+
+ return $r;
+ }
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Tickets Inventory data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataTicketInventory.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataTickets class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataTickets,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementDataTicketInventory extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.ticket_inventory';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Ticket ID
+ 'ticket' => array(
+ 'field' => 'ticket',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Ticket'],
+ 'use' => 'nid'
+ ),
+
+ // Member ID
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'use' => 'lged'
+ ),
+
+ // Member Name
+ 'member_view' => array(
+ 'field' => 'member',
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Ticket Name Display
+ 'ticket_view' => array(
+ 'field' => 'ticket',
+ 'as' => 'ticket_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Ticket ID
+ 'ticket_id' => array(
+ 'field' => 'ticket',
+ 'as' => 'ticket_id',
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gl'
+ ),
+
+ // Date
+ 'ticket_date' => array(
+ 'field' => 'ticket_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('12/31/'.date('Y').' +3 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'lgnid'
+ ),
+
+ // Ticket time
+ 'ticket_time' => array(
+ 'field' => 'ticket_time',
+ 'as' => false,
+ 'type' => 'time',
+// 'format' => 'm/d/Y',
+// 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+// 'maxValue' => strtotime('12/31/'.date('Y').' +3 years'), // This year plus 3
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lgnid'
+ ),
+
+ // Ticket Unlimited Quantity
+ 'unlimited_quant' => array(
+ 'field' => 'ticket',
+ 'as' => 'unlimited_quant',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'unlimited_quant',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Ticket is Cart Sticky
+ 'cart_sticky' => array(
+ 'field' => 'ticket',
+ 'as' => 'cart_sticky',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'cart_sticky',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Quantity Allotted
+ 'quant' => array(
+ 'field' => 'quant',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Available
+ 'available' => array(
+ 'field' => 'available',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Available
+ 'sold' => array(
+ 'field' => 'sold',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // On Hold
+ 'on_hold' => array(
+ 'field' => 'id',
+ 'as' => 'on_hold',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.inven_hold',
+ 'p_field' => 'quant',
+ 'p_id' => 'inventory',
+ 'p_where' => "
+ hold_type = ".$this->config->hold_types->ticket." AND
+ expire_time > '".date('r')."' AND
+ inventory = T.id",
+ 'p_sum' => true,
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'lg'
+ ),
+
+ // Active
+ 'active' => array(
+ 'field' => 'active',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Ticket sort order
+ 'ticket_sort' => array(
+ 'field' => 'ticket',
+ 'as' => 'ticket_sort',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'sort',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Section ID - retrieval only
+ 'section' => array(
+ 'field' => 'ticket',
+ 'as' => 'section',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'section',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'g'
+ )
+
+
+ );
+ }
+
+
+ /**
+ * Get Ticket Inventory
+ *
+ * @return object containing array as sub-objects
+ */
+ function getTicketInventoryList($ticketID = false, $where = false, $dateKey = false)
+ {
+
+ // If ticket ID is -1, then don't use ticket ID in search.
+ if ($ticketID == -1) {
+
+ $ticketID = false;
+
+ // If a ticket ID is specified
+ } elseif ($ticketID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;
+
+ } elseif (($ticketID = filter_input(INPUT_GET, 'TicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If there's a new ticket code submitted then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Ticket'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id - This should not be a problem
+
+ }
+
+ // If we have a ticket id, use that for inventory selection
+ $ticketWhere = 'true ';
+ if ($ticketID) {
+ $ticketWhere = "T.ticket = $ticketID ";
+ }
+
+ // Check for Where clause supplied
+ if ($where) {
+ $where = "AND $where ";
+ }
+
+ // Get list of Inventory
+ $invData = $this->getList($ticketWhere.$where, 'ticket_date');
+
+ // Convert to array with timestamp or ID as index
+ $inventoryData = array();
+ if ($invData != false) {
+ foreach ($invData as $i) {
+
+ // If the inventory item has a date and we're getting inventory for a specific ticketID
+ if (trim($i['ticket_date']['date']) != '' && $ticketID) {
+
+ // Use ticket timestamp for index
+ $inventoryData[$i['ticket_date']['timestamp']] = $i;
+
+ // Otherwise just use inventory ID (it's a non-date specific ticket)
+ } else {
+ $inventoryData[$i['id']] = $i;
+ }
+ }
+ }
+
+ return $inventoryData;
+ }
+
+ /**
+ * Get Ticket Inventory Calendar Data
+ *
+ * @return object containing array as sub-objects
+ */
+ function getTicketInventoryCalendarData()
+ {
+
+ // Is there a new Ticket code selected?
+ if (($ticketID = filter_input(INPUT_GET, 'TicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Ticket'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id
+ return false;
+
+ }
+
+ // Get peformance ID from ticket
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';
+ $Tickets = new EventManagementAdminTickets($this->dbh, $this->config);
+ $ticketDetail = $Tickets->getTicketDetail();
+ $_SESSION[GLM_EVENT_SESSION]['Performance'] = $ticketDetail['performance_id'];
+
+ // Get performance data to get start and end date for the performance
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';
+ $Performances = new EventManagementAdminPerformances($this->dbh, $this->config);
+ $performanceDetail = $Performances->getPerformanceDetail();
+
+ $invData = $this->getTicketInventoryList(false, "ticket_date is not null");
+
+ // If this ticket is date specific by inventory
+ // If not, there's only one inventory item, so we don't build a calendar
+ if ($ticketDetail['date_specific']['value']) {
+
+ $start = $ticketDetail['start_date']['timestamp'];
+ $end = $ticketDetail['end_date']['timestamp'];
+
+ /*
+ * Build output organized as calendar months
+ */
+
+ // Create calendars for the months covered by the performance
+ $calData = array();
+ $startMonth = strtotime(date('m/1/Y', $start));
+ $endMonth = strtotime(date('m/1/Y', $end));
+
+ // For each month of the performance
+ $newInventoryAdded = false;
+ for ($month = $startMonth; $month <= $endMonth; $month = strtotime(date('m/d/Y',$month).' +1 Month')) {
+
+ $offset = date('w', $month); // Number of days start of month is offset from Sunday
+ $monthDays = date('t', $month); // Number of days in the month
+
+ $calData[$month] = array(
+ 'month' => date('F', $month),
+ 'year' => date('Y', $month)
+ );
+
+ // For each week of the month
+ for ($week = 1; $week <= 6; $week++) {
+
+ $weekUsed = false;
+
+ // For each day of the week
+ for ($day = 1; $day <= 7; $day++) {
+
+ $cellNumb = ($week-1) * 7 + $day; // Calendar cell number - 6 week rows = 42 cells
+
+ // If this is a real date cell, then add the date info and any inventory data
+ $dateData = array('isDate' => false);
+ if ($cellNumb > $offset && ($cellNumb-$offset) <= $monthDays) {
+
+ $date = $cellNumb - $offset; // Day of the month
+ $dateTime = strtotime(date('m/d/Y', $month)." + ".($date-1)." Days"); // Timestamp for this date
+
+ $dow = date('w', $dateTime);
+
+ // Create base cell data
+ $dateData = array(
+ 'isDate' => true,
+ 'time' => $dateTime,
+ 'dom' => date('j', $dateTime),
+ 'date' => date('m/d/Y',$dateTime),
+ 'selectable' => ($dateTime >= $start && $dateTime <= $end && $ticketDetail['days_of_week']['bitmap'][$dow]['default']),
+ 'selected' => false
+ );
+
+
+ if ($ticketDetail['days_of_week']['bitmap'][$dow]['default']) {
+
+
+ $weekUsed = true;
+
+ // Check if there's no inventory for this date and there should be
+ if (($dateTime >= $start && $dateTime <= $end) && !isset($invData[$dateTime])) {
+
+ // Create a new inventory item
+ $quant = $ticketDetail['quant'];
+ $time = trim($ticketDetail['ticket_time']['time']);
+ $dateText = date('m/d/Y', $dateTime);
+
+ $sql = "
+ INSERT INTO eventmgt.ticket_inventory
+ (ticket, quant, available, ticket_date, ticket_time, sold, active)
+ VALUES
+ ($ticketID, $quant, $quant, '$dateText', '$time', 0, true)
+ ;";
+ $this->dbh->exec($sql);
+ $newInventoryAdded = true;
+
+ }
+
+ }
+
+ // If there's data for this date, add that to the cell data
+ if (isset($invData[$dateTime])) {
+
+ $dateData = array_merge($dateData, $invData[$dateTime]);
+ unset($dateData['ticket_date']); // Don't need this here
+ unset($dateData['ticket_name']); // Don't need this here
+
+ }
+
+ }
+ $calData[$month]['weeks'][$week]['weekUsed'] = $weekUsed;
+ $calData[$month]['weeks'][$week]['days'][$cellNumb] = $dateData;
+
+ }
+ }
+ }
+
+ // If new inventory was added, go back and reload all the data again
+ if ($newInventoryAdded) {
+ $calData = $this->getTicketInventoryCalendarData();
+ }
+
+ } else {
+
+ // If not date specific, we'll just pass on the current inventory data item
+ $calData = $invData;
+ }
+
+ return $calData;
+ }
+
+
+ /**
+ * Get Ticket Inventory Detail
+ *
+ * @return array
+ */
+ function getTicketInventoryDetail($ticketInventoryID = false, $extended = false)
+ {
+
+ // If an ID was supplied
+ if ($ticketInventoryID > 0) {
+
+ $_SESSION[GLM_EVENT_SESSION]['TicketInventory'] = $ticketInventoryID;
+
+ // Otherwise is there a new Ticket code submitted?
+ } elseif (($ticketInventoryID = filter_input(INPUT_GET, 'TicketInventoryID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['TicketInventory'] = $ticketInventoryID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['TicketInventory'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketInventoryID = $_SESSION[GLM_EVENT_SESSION]['TicketInventory'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id
+ return false;
+
+ }
+
+ $detail = $this->getEntry($ticketInventoryID);
+
+ // If $extended, then get detail on Section and Entrance
+ if ($extended) {
+
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataSections.php';
+ $Sections = new EventManagementDataSections($this->dbh, $this->config);
+ $Sections->optionIncludeSelectListData = false;
+ $sectionDetail = $Sections->getSectionDetail($detail['section']);
+
+ }
+
+ return $detail;
+
+ }
+
+
+ /**
+ * Edit Ticket Inventory
+ *
+ * @return array
+ */
+ function editTicketInventory()
+ {
+
+ if (($ticketInventoryID = filter_input(INPUT_GET, 'TicketInventoryID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['TicketInventory'] = $ticketInventoryID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['TicketInventory'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketInventoryID = $_SESSION[GLM_EVENT_SESSION]['TicketInventory'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id
+ return false;
+
+ }
+
+ $ticketDetail = $this->editEntry($ticketInventoryID);
+
+ return $ticketInventoryDetail;
+
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * This function must be here because it's called from a function
+ * in dataAbstract. Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+ return $r;
+ }
+
+ /**
+ * Update Ticket
+ *
+ * @return array
+ */
+ function updateTicketInventory()
+ {
+
+ // Removing "active" field to keep inventory update from messing with active flag
+ $saveActive = $this->fields['active'];
+ unset($this->fields['active']);
+
+ if (($ticketInventoryID = filter_input(INPUT_GET, 'TicketInventoryID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['TicketInventory'] = $ticketInventoryID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['TicketInventory'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketInventoryID = $_SESSION[GLM_EVENT_SESSION]['TicketInventory'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id
+ return false;
+
+ }
+
+ // Check if there's existing inventory data
+
+
+ // Try to update this data
+ $r = $this->updateEntry($ticketInventoryID);
+
+ // Restore "active" field
+ $this->fields['active'] = $saveActive;
+
+ return $r;
+
+ }
+
+
+
+
+}
+
+
+
+
+?>
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Ticket Package data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataTicketPackage.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataTicketPackage class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataTickets,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementDataTicketPackages extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.ticket_package';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Pointer to ticket that is acting as a package container
+ 'ticket_package' => array(
+ 'field' => 'package',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Pointer to ticket that is contained in the package
+ 'ticket' => array(
+ 'field' => 'ticket',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Quantity
+ 'quant' => array(
+ 'field' => 'quant',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Separate Voucher Flag
+ 'separate_voucher' => array(
+ 'field' => 'separate_voucher',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'use' => 'a'
+ ),
+
+ // Package Name
+ 'package_name' => array(
+ 'field' => 'package',
+ 'as' => 'package_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'title',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Member Name
+ 'member_name' => array(
+ 'field' => 'member',
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Performance Name
+ 'performance_name' => array(
+ 'field' => 'performance',
+ 'as' => 'performance_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.performance',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Ticket Title
+ 'ticket_title' => array(
+ 'field' => 'ticket',
+ 'as' => 'title',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'title',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Ticket Active
+ 'active' => array(
+ 'field' => 'ticket',
+ 'as' => 'active',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.ticket',
+ 'p_field' => 'active',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Display Order (sort)
+ 'sort' => array(
+ 'field' => 'sort',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 999,
+ 'use' => 'a'
+ )
+
+
+ );
+ }
+
+ /**
+ * Get Package Tickets list
+ *
+ *
+ * @return object containing array as sub-objects
+ */
+ public function getPackageList($where)
+ {
+
+ // Get the package contents
+ $packageData = $this->getList($where);
+ if (count($packageData) == 0) {
+ return false;
+ }
+
+ // Build output array with package ticket as key
+ $outData = array();
+ if ($packageData && count($packageData) > 0) {
+ foreach ($packageData as $p) {
+ $outData[$p['ticket']] = $p;
+ }
+ }
+ return $outData;
+
+ }
+
+ /**
+ * Update package tickets list
+ *
+ * Expects request input "selected_ticket_quant[id]" array.
+ */
+ public function updatePackageTicketsList($packageID = false)
+ {
+ // Check for good package ID
+ $pID = $packageID - 0;
+ if ($pID <= 0) {
+ return false;
+ }
+
+ // Try to retrieve package to make sure it exists and is a package
+ $sql = "
+ SELECT id
+ FROM eventmgt.ticket
+ WHERE id = $pID
+ AND ticket_type = 20
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $packageData = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ if (count($packageData) != 1) {
+ return false;
+ }
+
+ // Query to delete all for selected package
+ $sql = "
+ BEGIN;
+ DELETE FROM eventmgt.ticket_package
+ WHERE package = $packageID;
+ ";
+
+ // Now add in any tickets in request
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTickets.php';
+ $Tickets = new EventManagementDataTickets($this->dbh, $this->config);
+ $newTickets = $_REQUEST['selected_ticket_quant'];
+
+ if ($newTickets) {
+
+ foreach ($newTickets as $k=>$v) {
+
+ // Get ticket data
+ $ticketData = $Tickets->getEntry($k);
+ if (is_array($ticketData)) {
+
+ // Check for separate vouchers
+ $separateVoucher = 'false';
+ if (isset($_REQUEST['selected_ticket_separatevoucher'][$k])) {
+ $separateVoucher = 'true';
+ }
+
+ $sql .= "
+ INSERT INTO eventmgt.ticket_package
+ (package, ticket, member, performance, quant, sort, separate_voucher)
+ VALUES ($packageID, $k, ".$ticketData['member'].", ".$ticketData['performance_id'].", $v, 99, $separateVoucher)
+ ;";
+ }
+
+ }
+ }
+ $sql .= "COMMIT;";
+ $this->dbh->exec($sql);
+
+ return $this->getPackageList("package = $packageID");
+
+ }
+
+ /**
+ * Clear package tickets list
+ */
+ public function clearPackageTicketsList($packageID = false)
+ {
+
+ // Check for good package ID
+ $pID = $packageID - 0;
+ if ($pID <= 0) {
+ return false;
+ }
+
+ $sql = "
+ DELETE FROM eventmgt.ticket_package
+ WHERE package = $packageID;
+ ";
+ $this->dbh->exec($sql);
+
+ return;
+
+ }
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Tickets data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataTickets.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataTickets class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataTickets,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementDataTickets extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.ticket';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Admin Only Flag
+ 'admin_only' => array(
+ 'field' => 'admin_only',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Ticket Type
+ 'ticket_type' => array(
+ 'field' => 'ticket_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->ticket_type->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 10,
+ 'use' => 'a'
+ ),
+
+ // Member ID for adding tickets
+ 'member' => array(
+ 'field' => 'member',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'use' => 'a'
+ ),
+
+ // Member Name display
+ 'member_view' => array(
+ 'field' => 'member',
+ 'as' => 'member_name',
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.member',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_static' => true,
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'view_only' => true,
+ 'use' => 'gleu'
+ ),
+
+ // Ticket Name (internal use)
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Active
+ 'active' => array(
+ 'field' => 'active',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Ticket Title (for display to users)
+ 'title' => array(
+ 'field' => 'title',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Performance
+ 'performance' => array(
+ 'field' => 'performance',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.performance',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_where' => 'member = '.$_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'required' => true,
+ 'unique' => false,
+ 'default' => $_SESSION[GLM_EVENT_SESSION]['Performance'],
+ 'use' => 'nideu'
+ ),
+
+ // Performance_view
+ 'performance_view' => array(
+ 'field' => 'performance',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.performance',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gl'
+ ),
+
+ // Performance ID
+ 'performance_id' => array(
+ 'field' => 'performance',
+ 'as' => 'performance_id',
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gl'
+ ),
+
+ // Section
+ 'section' => array(
+ 'field' => 'section',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.section',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'p_where' => 'member = '.$_SESSION[GLM_EVENT_SESSION]['Member'],
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'nideu'
+ ),
+
+ // Section View
+ 'section_view' => array(
+ 'field' => 'section',
+ 'as' => false,
+ 'type' => 'pointer',
+ 'p_table' => 'eventmgt.section',
+ 'p_field' => 'name',
+ 'p_id' => 'id',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gl'
+ ),
+
+ // Section ID
+ 'section_id' => array(
+ 'field' => 'section',
+ 'as' => 'section_id',
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gl'
+ ),
+
+ // Available for Sale Start Date
+ 'for_sale_start_date' => array(
+ 'field' => 'for_sale_start_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y').' -1 year'), // Earliest is now less 1 year
+ 'maxValue' => strtotime('12/31/'.date('Y').' +3 years'), // This year plus 3
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Available for Sale End Date
+ 'for_sale_end_date' => array(
+ 'field' => 'for_sale_end_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y').' -1 year'), // Earliest is now less 1 year
+ 'maxValue' => strtotime('12/31/'.date('Y').' +3 years'), // This year plus 3
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Date Specific - use single or multiple inventory
+ 'date_specific' => array(
+ 'field' => 'date_specific',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Days of the week to create default inventory - multi-pick
+ 'days_of_week' => array(
+ 'field' => 'days_of_week',
+ 'as' => false,
+ 'type' => 'bitmap',
+ 'bitmap' => $this->config->days->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 0, // Note that this is a bitmap of card indexes
+ 'use' => 'a'
+ ),
+
+ // Start Date
+ 'start_date' => array(
+ 'field' => 'start_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('12/31/'.date('Y').' +3 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // End Date
+ 'end_date' => array(
+ 'field' => 'end_date',
+ 'as' => false,
+ 'type' => 'date',
+ 'format' => 'm/d/Y',
+ 'minValue' => strtotime('1/1/'.date('Y')), // Earliest is now
+ 'maxValue' => strtotime('12/31/'.date('Y').' +3 years'), // This year plus 3
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Time Specific
+ 'time_specific' => array(
+ 'field' => 'time_specific',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Ticket Time
+ 'ticket_time' => array(
+ 'field' => 'ticket_time',
+ 'as' => false,
+ 'type' => 'time',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => '12:00 PM',
+ 'use' => 'a'
+ ),
+
+ // Ticket Timestamp
+ 'ticket_timestamp' => array(
+ 'field' => 'ticket_time',
+ 'as' => 'ticket_timestamp',
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'gl'
+ ),
+
+ // Unlimited Use
+ 'unlimited_use' => array(
+ 'field' => 'unlimited_use',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Number of uses
+ 'uses' => array(
+ 'field' => 'uses',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 1,
+ 'use' => 'a'
+ ),
+
+ // Unlimited Quantity
+ 'unlimited_quant' => array(
+ 'field' => 'unlimited_quant',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => true,
+ 'use' => 'a'
+ ),
+
+ // Quantity - Number of these tickets in the section
+ 'quant' => array(
+ 'field' => 'quant',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 1,
+ 'use' => 'lgnieud'
+ ),
+
+ // Price
+ 'price' => array(
+ 'field' => 'price',
+ 'as' => false,
+ 'type' => 'money',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Consignment Type
+ 'consignment_type' => array(
+ 'field' => 'consignment_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->ticket_consignment_type->toArray(),
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 1,
+ 'use' => 'a'
+ ),
+
+ // Cart Sticky (Always displayed on cart - even with no quant)
+ 'cart_sticky' => array(
+ 'field' => 'cart_sticky',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a',
+ 'callback' => function ($r) {
+ $r['status'] = false;
+ return $r;
+ }
+ ),
+
+ // Show ticket on Start Page
+ 'show_on_start' => array(
+ 'field' => 'show_on_start',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Add-on Selection Required
+ 'addon_required' => array(
+ 'field' => 'addon_required',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Price
+ 'price_numb' => array(
+ 'field' => 'price',
+ 'as' => 'price_numb',
+ 'type' => 'float',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'lg'
+ ),
+
+ // Description
+ 'descr' => array(
+ 'field' => 'descr',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => FILTER_SANITIZE_MAGIC_QUOTES,
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Image
+ 'image' => array(
+ 'field' => 'image',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Voucher Text
+ 'voucher_text' => array(
+ 'field' => 'voucher_text',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Voucher LeftEnd Text - overrides other text for that area if set
+ 'voucher_leftend_text' => array(
+ 'field' => 'voucher_leftend_text',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Voucher Type
+ 'voucher_type' => array(
+ 'field' => 'voucher_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->ticket_voucher_type->toArray(),
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 1,
+ 'use' => 'a'
+ ),
+
+ // Display Order (sort)
+ 'sort' => array(
+ 'field' => 'sort',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => 999,
+ 'use' => 'a'
+ )
+
+
+ );
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+
+ // Check that Sticky is not used with date-specific inventory
+ if ($r['fieldData']['date_specific']['value'] && $r['fieldData']['cart_sticky']['value']) {
+ $r['status'] = false;
+ $r['fieldFail']['cart_sticky'] = 'Sticky may not be used when "Specified Dates" is checked.';
+ $r['fieldFail']['date_specific'] = 'Specified dates may not be used when "Sticky" is checked.';
+ }
+
+ return $r;
+ }
+
+ /**
+ * Get Tickets list
+ *
+ * @param integer $memberID Specifies tickets for a Member ID
+ * @param integer $performanceID Specifies tickets for a Performance ID
+ * @param integer $sectionID Specifies tickets for a Section ID
+ * @param string $listType Type of list to generate
+ * "norm" Standard list output with detail
+ * 'all' List all and ignore member, performance, section ID
+ * 'packageSelect' List package selection with only ID, Name, Member, Performance, Section, active
+ * Optional specify $notTicketID to not include the current ticket by ID
+ * Sorts by Member, Performance, Section, then Ticket
+ *
+ * @return object containing array as sub-objects
+ */
+ function getTicketsList($memberID = false, $performanceID = false, $sectionID = false, $listType = false, $activeOnly = false, $where = false, $includeAdminOnly = false, $notTicketID = false, $packages = true)
+ {
+ // Get member ID - But don't use it if performance or section IDs are supplied.
+ if ($memberID == false && !$performanceID && !$sectionID) {
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+ }
+
+ // Get performance ID
+ if ($performanceID == false) {\r
+ $performanceID = $_SESSION[GLM_EVENT_SESSION]['Performance'];\r
+ }\r
+
+ // Get section ID
+ if ($sectionID == false) {\r
+ $sectionID = $_SESSION[GLM_EVENT_SESSION]['Section'];\r
+ }
+
+ // Get URI search type\r
+ if (!$listType && isset($_REQUEST['listType'])) {\r
+ $listType = $_REQUEST['listType'];\r
+ }
+\r
+ // Build query Where clause
+ if ($where == false) {
+ $where = 'true';
+ }
+
+ // Check for active only request
+ if ($activeOnly) {
+ $where .= ' AND T.active';
+ }
+
+ // Check if adminUser
+ if (!$includeAdminOnly) {
+ $where .= ' AND NOT T.admin_only';
+ }
+
+ // Check if packages aren't enabled
+ if (!$packages) {
+ $where .= ' AND T.ticket_type != 20';
+ }
+
+ $fieldsSave = false;
+
+ switch ($listType) {
+
+ case 'packageSelect':
+
+ // Save current field list
+ $fieldsSave = $this->fields;
+ $this->fields = array(
+ 'id' => $this->fields['id'],
+ 'name' => $this->fields['name'],
+ 'title' => $this->fields['title'],
+ 'member_name' => $this->fields['member_view'],
+ 'performance_view' => $this->fields['performance_view'],
+ 'section_view' => $this->fields['section_view'],
+ 'active' => $this->fields['active']
+ );
+
+ $where = '
+ T.ticket_type != 20
+ AND T.addon_required = false
+ '.($notTicketID ? ' AND T.id != '.$notTicketID : '').'
+ ';
+ if ($memberID) {
+ $where .= " AND ( T.member = $memberID OR T.consignment_type > 1)";
+ } else {
+ $where .= 'AND T.consignment_type > 1';
+ }
+
+ $sort = '';
+
+ break;
+
+ case 'norm':
+ default:
+ if ($memberID) {
+ $where .= " AND T.member = $memberID";
+ }
+ if ($performanceID) {
+ $where .= " AND T.performance = $performanceID";
+ }
+ if ($sectionID) {
+ $where .= " AND T.section = $sectionID";
+ }
+ $sort = 'sort, name';
+ break;
+
+ case 'all':
+ $sort = 'sort, name';
+ break;
+
+ }
+
+ // Get list of Tickets
+ $ticketsList = $this->getList($where, 'sort, name');
+
+ if ($fieldsSave != false) {
+ $this->fields = $fieldsSave;
+ }
+
+ // If type packageSelect
+ if ($listType == 'packageSelect') {
+
+ // Sort by member, performance, section, ticket names.
+ function packageSelectSort($a, $b) {
+ if ($a['member_name'] == $b['member_name'] && $a['performance'] == $b['performance'] && $a['section'] == $b['section'] && $a['title'] == $b['title'] ) {
+ return 0;
+ }
+ if ($a['member_name'] < $b['member_name']) { return -1; }
+ if ($a['member_name'] > $b['member_name']) { return 1; }
+ if ($a['performance'] < $b['performance']) { return -1; }
+ if ($a['performance'] > $b['performance']) { return 1; }
+ if ($a['section'] < $b['section']) {return -1;}
+ if ($a['section'] > $b['section']) {return 1;}
+ if ($a['title'] < $b['title']) {return -1;}
+ return 1;
+ }
+ uasort($ticketsList, 'packageSelectSort');
+
+ // Save names, Remove subsequent member, performance, section until change
+ $memberName = '';
+ $performanceName = '';
+ $sectionName = '';
+ while (list($k, $v) = each($ticketsList)) {
+
+ // Also provide active as Yes/No
+ $ticketsList[$k]['active_name'] = ($v['active'] ? 'Yes' : 'No');
+
+ // Save names for adding to selected list
+ $ticketsList[$k]['member_save'] = $v['member_name'];
+ $ticketsList[$k]['performance_save'] = $v['performance'];
+ $ticketsList[$k]['section_save'] = $v['section'];
+
+ // Remove duplicate names for ordered picklist
+ if ($v['member_name'] != $memberName) {
+ $memberName = $v['member_name'];
+ $performanceName = '';
+ $sectionName = '';
+ } else {
+ $ticketsList[$k]['member_name'] = '';
+ }
+ if ($v['performance'] != $performanceName) {
+ $performanceName = $v['performance'];
+ $sectionName = '';
+ } else {
+ $ticketsList[$k]['performance'] = '';
+ }
+ if ($v['section'] != $sectionName) {
+ $sectionName = $v['section'];
+ } else {
+ $ticketsList[$k]['performance'] = '';
+ }
+
+ }
+
+ }
+
+ return $ticketsList;
+ }
+
+ /**
+ * Get Ticket Detail
+ *
+ * @return array
+ */
+ function getTicketDetail($ticketID = false)
+ {
+
+ // If a ticket has been specified
+ if ($ticketID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;\r
+
+ // Otherwise if there's a ticket ID in the request
+ } elseif (($ticketID = filter_input(INPUT_GET, 'TicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // There's a
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Ticket'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id
+ return false;
+
+ }
+
+ $ticketDetail = $this->getEntry($ticketID);
+
+ return $ticketDetail;
+
+ }
+
+ /**
+ * Edit Ticket
+ *
+ * @return array
+ */
+ function editTicket()
+ {
+
+ if (($ticketID = filter_input(INPUT_GET, 'TicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Ticket'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id
+ return false;
+
+ }
+
+ $ticketDetail = $this->editEntry($ticketID);
+
+ return $ticketDetail;
+
+ }
+
+ /**
+ * Update Ticket
+ *
+ * @return array
+ */
+ function updateTicket()
+ {
+
+ if (($ticketID = filter_input(INPUT_GET, 'TicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Ticket'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'];
+
+ } else {
+
+ // Otherwise, we don't have a ticket id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($ticketID);
+
+ return $r;
+
+ }
+
+ /**
+ * Add New Ticket
+ *
+ * @return array
+ */
+ function newTicket()
+ {
+
+ $r = $this->newEntry();
+
+ return $r;
+
+ }
+
+ /**
+ * Insert Ticket
+ *
+ * @return array
+ */
+ function insertTicket()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current ticket to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * Delete Ticket
+ *
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete
+ *
+ * @return array
+ */
+ function ticketDelete($confirm = false)
+ {
+
+ // Is there a new ticket code selected?
+ if (($ticketID = filter_input(INPUT_GET, 'TicketID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = $ticketID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Ticket'])) {
+
+ // Otherwise, get the ticket ID from the session
+ $ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'];
+
+ } else {
+
+ // Otherwise, we don't have an ticket id
+ return false;
+
+ }
+
+ $ticketDetail = $this->deleteEntry($ticketID, $confirm);
+
+ return $ticketDetail;
+
+ }
+
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Voucher Coupons data class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataVoucherCoupons.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+require_once DATA_ABSTRACT;
+
+/**
+ * EventManagementDataVoucherCoupons class
+ *
+ * PHP version 5
+ *
+ * @category Data
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: dataVoucherCoupons,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+class EventManagementDataVoucherCoupons extends DataAbstract
+{
+ /**
+ * Tables
+ *
+ * @var $ini
+ * @access public
+ */
+ public $table = 'eventmgt.voucher_coupons';
+
+ /**
+ * Field definitions
+ *
+ * 'type' is type of field as defined by the application
+ * text Regular text field
+ * pointer Pointer to an entry in another table
+ * 'filters' is the filter name for a particular filter ID in PHP filter functions
+ * See PHP filter_id()
+ *
+ * 'use' is when to use the field
+ * l = List
+ * g = Get
+ * n = New
+ * i = Insert
+ * e = Edit
+ * u = Update
+ * d = Delete
+ * a = All
+ *
+ * @var $ini
+ * @access public
+ */
+ public $fields = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ parent::__construct($dbh, $config);
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'lged'
+ ),
+
+ // Voucher Coupon Name
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Active
+ 'active' => array(
+ 'field' => 'active',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => true,
+ 'use' => 'a'
+ ),
+
+ // Coupon Type
+ 'coupon_type' => array(
+ 'field' => 'coupon_type',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->coupon_type->toArray(),
+ 'list_keytype' => 'int',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Coupon Position
+ 'coupon_position' => array(
+ 'field' => 'coupon_position',
+ 'as' => false,
+ 'type' => 'list',
+ 'list' => $this->config->coupon_position->toArray(),
+ 'list_keytype' => 'int',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Display From Date
+ 'display_from' => array(
+ 'field' => 'display_from',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => time(),
+ 'use' => 'a'
+ ),
+
+ // Display To Date
+ 'display_to' => array(
+ 'field' => 'display_to',
+ 'as' => false,
+ 'type' => 'date',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => strtotime('12/31/'.date('Y').' +4 years'),
+ 'use' => 'a'
+ ),
+
+ // Stretch to Fit
+ 'stretch_to_fit' => array(
+ 'field' => 'stretch_to_fit',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Image Padding
+ 'padding' => array(
+ 'field' => 'padding',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ ),
+
+ // Show Border
+ 'show_border' => array(
+ 'field' => 'show_border',
+ 'as' => false,
+ 'type' => 'checkbox',
+ 'required' => false,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Coupon Image
+ 'coupon_image' => array(
+ 'field' => 'coupon_image',
+ 'as' => false,
+ 'type' => 'image',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Maximum Display Count (-1 = unlimited)
+ 'max_display_count' => array(
+ 'field' => 'max_display_count',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => -1,
+ 'use' => 'a'
+ ),
+
+ // Display Count
+ 'display_count' => array(
+ 'field' => 'display_count',
+ 'as' => false,
+ 'type' => 'integer',
+ 'required' => true,
+ 'unique' => false,
+ 'default' => 0,
+ 'use' => 'a'
+ )
+
+ );
+ }
+
+ /**
+ * Check for other field related issues
+ *
+ * Simply return $r if there's nothing to check.
+ *
+ * @return array
+ */
+ function checkOther($r)
+ {
+ parent::checkOther($r);
+
+ return $r;
+ }
+
+
+ /**
+ * Get Voucher Coupon list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getVoucherCouponList($where = '')
+ {
+
+ // Build query Where clause
+ if ($where == '') {
+ $where = 'true';
+ }
+
+ // Get list of Voucher Coupons
+ $voucherCouponsList = $this->getList($where, 'name');
+
+ return $voucherCouponsList;
+ }
+
+ /**
+ * Get Voucher Coupon Detail
+ *
+ * @return array
+ */
+ function getVoucherCouponDetail($voucherCouponID = false)
+ {
+
+ // If a voucher coupon has been specified
+ if ($voucherCouponID != false) {
+
+ $_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'] = $voucherCouponID;
+
+ // Otherwise if there's a voucher coupon ID in the request
+ } elseif (($voucherCouponID = filter_input(INPUT_GET, 'VoucherCouponID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // There's a Voucher Coupon submitted, so save that
+ $_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'] = $voucherCouponID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'])) {
+
+ // Otherwise, get the voucher coupon ID from the session
+ $voucherCouponID = $_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'];
+
+ } else {
+
+ // Otherwise, we don't have a voucher coupon id
+ return false;
+
+ }
+
+ $voucherCouponDetail = $this->getEntry($voucherCouponID);
+
+ return $voucherCouponDetail;
+
+ }
+
+ /**
+ * Edit Voucher Coupon
+ *
+ * @return array
+ */
+ function editVoucherCoupon()
+ {
+
+ if (($voucherCouponID = filter_input(INPUT_GET, 'VoucherCouponID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'] = $voucherCouponID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'])) {
+
+ // Otherwise, get the voucher coupon ID from the session
+ $voucherCouponID = $_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'];
+
+ } else {
+
+ // Otherwise, we don't have a voucher coupon id
+ return false;
+
+ }
+
+ $voucherCouponDetail = $this->editEntry($voucherCouponID);
+
+ return $voucherCouponDetail;
+
+ }
+
+ /**
+ * Update Voucher Coupon
+ *
+ * @return array
+ */
+ function updateVoucherCoupon()
+ {
+
+ if (($voucherCouponID = filter_input(INPUT_GET, 'VoucherCouponID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'] = $voucherCouponID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'])) {
+
+ // Otherwise, get the voucher coupon ID from the session
+ $voucherCouponID = $_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'];
+
+ } else {
+
+ // Otherwise, we don't have a voucher coupon id
+ return false;
+
+ }
+
+ // Try to update this data
+ $r = $this->updateEntry($voucherCouponID);
+
+ return $r;
+
+ }
+
+ /**
+ * Add New Voucher Coupon
+ *
+ * @return array
+ */
+ function newVoucherCoupon()
+ {
+
+ $r = $this->newEntry();
+
+ return $r;
+
+ }
+
+ /**
+ * Insert Voucher Coupon
+ *
+ * @return array
+ */
+ function insertVoucherCoupon()
+ {
+
+ $r = $this->insertEntry();
+
+ // If succesful then set current voucher coupone to the one just inserted.
+ if ($r['status']) {
+ $_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'] = $r['insertedID'];
+ }
+
+ return $r;
+
+ }
+
+ /**
+ * Delete Voucher Coupon
+ *
+ * @param $confirm bool False to ask if user wants to delete and true to actually delete
+ *
+ * @return array
+ */
+ function voucherCouponDelete($confirm = false)
+ {
+
+ // Is there a new voucher coupon code selected?
+ if (($voucherCouponID = filter_input(INPUT_GET, 'VoucherCouponID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'] = $voucherCouponID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'])) {
+
+ // Otherwise, get the voucher coupon ID from the session
+ $voucherCouponID = $_SESSION[GLM_EVENT_SESSION]['VoucherCoupon'];
+
+ } else {
+
+ // Otherwise, we don't have an voucher coupon id
+ return false;
+
+ }
+
+ $voucherCouponDetail = $this->deleteEntry($voucherCouponID, $confirm);
+
+ return $voucherCouponDetail;
+
+ }
+
+ /**
+ * Get Voucher Coupon List for Display
+ *
+ * @param $date string Date to use for selection (usually today unless testing)
+ *
+ * @return array
+ */
+ function getCouponsForDisplay($date = false)
+ {
+
+ $where = '';
+
+ // If no date (time) has been supplied
+ if (!$date) {
+ $date = date('m/d/Y', time());
+ }
+ $where = "T.active AND '$date' >= T.display_from AND '$date' <= T.display_to";
+
+ $coupons = $this->getVoucherCouponList($where);
+
+ if (!is_array($coupons) || count($coupons) == 0) {
+ return false;
+ }
+
+ // Convert to array organized by location
+ $cr = array();
+ foreach ($coupons as $c) {
+ $cr[$c['coupon_position']['value']][] = $c;
+ }
+
+ // Shuffle order of coupons in each location (randomize)
+ foreach ($cr as $k => $v) {
+ shuffle($cr[$k]);
+ }
+
+ return $cr;
+
+ }
+
+}
+
+
+
+
+?>
\ No newline at end of file
--- /dev/null
+; Configuration File for Event Management System - V3\r
+;\r
+; This file contains common configuration for all sites using this Event Management \r
+; System on this server. Each site also has local configuration for this application\r
+; in a config/applications/EventManagement.ini file in the site.\r
+; \r
+; Custom configurations for development and developer configuration at bottom of file. \r
+\r
+[common]\r
+\r
+applicationName = "Event Management"\r
+applicationVersion = "EventManagement/V3"\r
+dataAbstractLocation = "Database/V0"\r
+pdfAbstractLocation = "PDF/V0"\r
+paymentProcessorsLocation = "PaymentProcessors/V0"\r
+imageServerAbstractLocation = "ImageServer/V0"\r
+internalReportingAddress = "cscott@gaslightmedia.com"\r
+\r
+orderVerificationSecret = "GLMOrder2secreT"\r
+\r
+;\r
+; ********** NEED TO VERIFY EVERYTHING BELOW **************\r
+;\r
+\r
+; Base URL/paths for front-end of this application\r
+url.members = CURRENT_BASE_URL "members-only-area/?page_id=122"\r
+path.front_end = BASE_PATH ""\r
+path.admin = BASE_PATH "admin/Event_Housing/"\r
+path.common = "/var/www/server/CommonApps/"\r
+\r
+; Admin Interface Selection\r
+default_admin_interface = "tickets"\r
+admin_interface.selectable = false;\r
+admin_interface.tickets = "tickets"\r
+admin_interface_type.tickets = "flexy" ;Options are "flexy" and "smarty" (smarty not working yet)\r
+\r
+; Front End Interface Selection\r
+; default_front_interface (set in customer configuration)\r
+front_interface.selectable = false;\r
+\r
+; Front End Interfaces\r
+; "tickets"\r
+front_interface.tickets = "tickets"\r
+front_interface_type.tickets = "flexy" ;Options are "flexy" and "smarty" (smarty not working yet)\r
+; "TicketsFoundation"\r
+front_interface.TicketsFoundation = "TicketsFoundation"\r
+front_interface_type.TicketsFoundation = "flexy" ;Options are "flexy" and "smarty" (smarty not working yet)\r
+; "FoundationStandAlone" - Used for foundation with tickets when Foundation is not loaded for the site\r
+front_interface.FoundationStandAlone = "TicketsFoundation" \r
+front_interface_type.FoundationStandAlone = "flexy" ;Options are "flexy" and "smarty" (smarty not working yet)\r
+; "SaultSteMarie" \r
+front_interface.SaultSteMarie = "SaultSteMarie" \r
+front_interface_type.SaultSteMarie = "flexy" ;Options are "flexy" and "smarty" (smarty not working yet)\r
+; "Gaslight" \r
+front_interface.Gaslight = "Gaslight" \r
+front_interface_type.Gaslight = "flexy" ;Options are "flexy" and "smarty" (smarty not working yet)\r
+; "MMM" \r
+front_interface.MMM = "MMM" \r
+front_interface_type.MMM = "flexy" ;Options are "flexy" and "smarty" (smarty not working yet)\r
+; "PointerBoat" \r
+front_interface.PointerBoat = "PointerBoat" \r
+front_interface_type.PointerBoat = "flexy" ;Options are "flexy" and "smarty" (smarty not working yet)\r
+\r
+; Set Database Date Style - uncomment desired style\r
+;misc.datestyle = "SET DATESTYLE TO 'ISO';" ;ISO example: 1997-12-17 07:37:16-08';\n"\r
+misc.datestyle = "SET DATESTYLE TO 'SQL';" ;SQL example: 12/17/1997 07:37:16.00 PST';\n"\r
+;misc.datestyle = "SET DATESTYLE TO 'Postgres';" ;Postgres example: Wed Dec 17 07:37:16 1997 PST';\n"\r
+;misc.datestyle = "SET DATESTYLE TO 'European';" ;European example: 17/12/1997 15:37:16.00 MET';\n"\r
+;misc.datestyle = "SET DATESTYLE TO 'US';" ;US example: 12/17/1997 07:37:16.00 PST';\n"\r
+;misc.datestyle = "SET DATESTYLE TO 'German';" ;German example: 17.12.1997 07:37:16.00 PST';\n"\r
+\r
+; Standard arrays\r
+\r
+; Member Types\r
+member_type.1 = "Standard"\r
+member_type.2 = "Standard + Sells other's items"\r
+member_type.3 = "Vendor of items only sold through others"\r
+member_type.10 = "Other - neither vendor nor sales"\r
+\r
+; Ticket consignment types\r
+ticket_consignment_type.1 = "Not sold by other locations"\r
+ticket_consignment_type.2 = "Available for sale by other locations"\r
+ticket_consignment_type.3 = "Sold only by other locations"\r
+\r
+; Ticket voucher types - Note types < 80 are tickets, > 80 are things sold\r
+ticket_voucher_type.1 = "Standard Voucher/Ticket with Barcode"\r
+ticket_voucher_type.11 = "Voucher/Ticket for Pickup - no Barcode"\r
+ticket_voucher_type.12 = "Voucher/Ticket to be mailed Mailed - no Barcode" \r
+ticket_voucher_type.81 = "Object Sold (i.e. books) to be claimed - with Barcode"\r
+ticket_voucher_type.82 = "Object Sold (i.e. books) to be mailed - no Barcode"\r
+\r
+; Ticket Types\r
+ticket_type.10 = 'Standard'\r
+ticket_type.20 = 'Package'\r
+\r
+; Ticket Add-On Types\r
+ticket_add_on_type.1 = 'Checkbox'\r
+ticket_add_on_type.2 = 'Quantity'\r
+\r
+; Promo Ticket Types\r
+promo_ticket_type.1 = '$ Amount'\r
+promo_ticket_type.2 = 'Percentage'\r
+\r
+; Permissions\r
+permissions.10 = "Full Venue Access"\r
+permissions.20 = "Ticket Orders and Claims"\r
+permissions.30 = "Ticket Claims Only"\r
+permissions.99 = "No Access"\r
+\r
+; Permissions References\r
+permissions_numb.full = 10\r
+permissions_numb.orders_and_claims = 20\r
+permissions_numb.claims = 30\r
+permissions_numb.none = 99\r
+\r
+; Pending cart hold types\r
+hold_types.reservation = 1\r
+hold_types.ticket = 2\r
+\r
+; Claim Tracking Types by Name\r
+claim_tracking_types_numb.claim = 1\r
+claim_tracking_types_numb.clear = 2\r
+\r
+; Claim Tracking Types\r
+claim_tracking_types.1 = "Claimed"\r
+claim_tracking_types.2 = "Claim Cleared"\r
+\r
+; Processing Methods\r
+proc_method.1 = merchant ;Merchant processes cards\r
+proc_method.2 = processed ;Processed by a card processor\r
+\r
+; Card Processors by number\r
+ccard_processor.0 = "(none - select processor)"\r
+ccard_processor.3 = "No Payment Processing at Checkout"\r
+ccard_processor.99 = "Card Processing Test"\r
+ccard_processor.1 = "Authorize.net"\r
+ccard_processor.2 = "Merchant Solutions"\r
+\r
+; Card Processors by name\r
+ccard_processor_numb.none = 0\r
+ccard_processor_numb.authorize_net = 1\r
+ccard_processor_numb.merchant_solutions = 2\r
+ccard_processor_numb.no_payment = 3\r
+ccard_processor_numb.test = 99\r
+\r
+; Card processing mode options\r
+cc_mode.1 = "Local Transaction Approval Test"\r
+cc_mode.2 = "Local Transaction Decline Test"\r
+cc_mode.3 = "On-Line Transaction Test"\r
+cc_mode.0 = "Production Mode"\r
+\r
+; PayPal processing mode options\r
+paypal_mode.3 = "On-Line Transaction Test"\r
+paypal_mode.0 = "Production Mode"\r
+\r
+; Processing Status\r
+proc_status.new = 0\r
+proc_status.descr.0 = "New Registration Record"\r
+proc_status.unpaid = 1\r
+proc_status.descr.1 = "Not Paid"\r
+proc_status.cc_pend = 2\r
+proc_status.descr.2 = "Credit Card Pending"\r
+proc_status.cc_paid = 3\r
+proc_status.descr.3 = "Paid by Credit Card"\r
+proc_status.cc_decl = 4\r
+proc_status.descr.4 = "Credit Card Declined"\r
+proc_status.check_pend = 5\r
+proc_status.descr.5 = "Check Pending"\r
+proc_status.check_paid = 6\r
+proc_status.descr.6 = "Paid by Check"\r
+proc_status.comp = 7\r
+proc_status.descr.7 = "Complimentary"\r
+proc_status.failed = 98\r
+proc_status.descr.98 = "Submission Failed"\r
+proc_status.canceled = 99\r
+proc_status.descr.99 = "Canceled"\r
+\r
+; Payment Types\r
+pay_types.1 = "Credit Card"\r
+pay_types.2 = "Check"\r
+pay_types.3 = "Direct"\r
+pay_types.4 = "PayPal"\r
+\r
+; Credit Cards - numbers are an exponent of 2 that represent the bit position\r
+ccard.0 = "Visa"\r
+ccard.1 = "MasterCard"\r
+ccard.2 = "American Express"\r
+ccard.3 = "Discover"\r
+ccard.4 = "Diners Club"\r
+\r
+; Credit Card validation strings (regular expression)\r
+ccverify.0 = "^4.{15}$|^4.{12}$"\r
+ccverify.1 = "^5[1-5].{14}$"\r
+ccverify.2 = "^3[47].{13}$"\r
+ccverify.3 = "^6011.{12}$"\r
+ccverify.4 = "^30[0-5].{11}$|^3[68].{12}$"\r
+\r
+; Confirmation Methods\r
+conf_methods.1 = "US Mail"\r
+conf_methods.2 = "E-Mail"\r
+\r
+; Reference Types\r
+reference_type.misc = 0\r
+reference_type.event = 1\r
+reference_type.member = 2\r
+reference_type.state = 3\r
+reference_type.team = 4\r
+\r
+; Voucher Check Character Secret\r
+voucher_check_secret = "emVoucherCheck1"\r
+\r
+; Reference Type Numbers\r
+reference_type_numb.0 = "Misc"\r
+reference_type_numb.1 = "Event"\r
+reference_type_numb.2 = "Member/Venue"\r
+reference_type_numb.3 = "State Rep"\r
+reference_type_numb.4 = "Team"\r
+\r
+; Fee Method\r
+fee_method.fixed_stay = 1\r
+fee_method.fixed_accom = 2\r
+fee_method.fixed_accomnight = 3\r
+fee_method.percent_stay = 10\r
+\r
+; Fee Method Numbers\r
+fee_method_numb.1 = "Per Reservation"\r
+fee_method_numb.2 = "Per Room"\r
+fee_method_numb.3 = "Per Night"\r
+fee_method_numb.10 = "Percent of Room Rate"\r
+\r
+; Member/Venue Amenities\r
+; Static amenitities set system-wide\r
+; Only 10 fields in member records for these at this time\r
+; Needs to be replaced with managed amenities list\r
+memb_amen.1 = "Air-Conditioning"\r
+memb_amen.2 = "Barrier Free"\r
+memb_amen.3 = "Coffee Pot"\r
+memb_amen.4 = "Hair Dryer"\r
+memb_amen.5 = "Interior Corridor"\r
+memb_amen.6 = "Microwave"\r
+memb_amen.7 = "Refrigerator"\r
+;memb_amen.8 = "Shopping nearby"\r
+;memb_amen.9 = "Indoor pool"\r
+;memb_amen.10 = "Outdoor pool"\r
+;memb_amen.? = "Sauna"\r
+;memb_amen.? = "Whirlpool"\r
+;memb_amen.? = "Valet/Charge Parking"\r
+;memb_amen.? = "Self-operated coin laundry"\r
+;memb_amen.? = "Free parking"\r
+;memb_amen.? = "Fitness area"\r
+;memb_amen.? = "Room service"\r
+;memb_amen.? = "Conference/Meeting facilities"\r
+;memb_amen.? = "Restaurant nearby"\r
+;memb_amen.? = "Restaurant on site"\r
+;memb_amen.? = "Barrier free guest rooms available"\r
+;memb_amen.? = "Pets"\r
+;memb_amen.? = "Golf nearby"\r
+\r
+; Accommodatation Amenitities\r
+; NOT USED AT THIS TIME\r
+;accom_amen.1 = "Cable TV"\r
+;accom_amen.2 = "Movies in Room"\r
+;accom_amen.3 = "Barrier Free Access"\r
+;accom_amen.4 = "Smoke Free Room"\r
+;accom_amen.5 = "Jacuzzi in Room"\r
+;accom_amen.6 = "Iron and Ironing Board"\r
+;accom_amen.7 = "Coffee Pot in Room"\r
+;accom_amen.8 = "Refrigerator in Room"\r
+;accom_amen.9 = "Microwave in Room"\r
+;accom_amen.10 = "Safe"\r
+;accom_amen.11 = "Hair Dryer"\r
+\r
+; Accommodation Room Categories\r
+room_category.0 = "n/a"\r
+room_category.1 = "Bed"\r
+room_category.2 = "Room"\r
+room_category.3 = "Suite"\r
+\r
+; Accommodation Room Types\r
+room_types.0 = "n/a"\r
+room_types.1 = "Main"\r
+room_types.2 = "Bedroom"\r
+room_types.3 = "Kitchen"\r
+room_types.4 = "Living Room"\r
+\r
+; Accommodation Bath Types\r
+bath_types.0 = "None"\r
+bath_types.1 = "Full"\r
+bath_types.2 = "Half"\r
+bath_types.3 = "Sink"\r
+\r
+; Voucher Coupon Types\r
+coupon_type.0 = "Image"\r
+; coupon_type.1 = "PDF"\r
+; coupon_type.2 = "Text"\r
+\r
+; Days of the week - numbers are an exponent of 2 that represent the bit position\r
+days.0 = "Sunday"\r
+days.1 = "Monday"\r
+days.2 = "Tuesday"\r
+days.3 = "Wednesday"\r
+days.4 = "Thursday"\r
+days.5 = "Friday"\r
+days.6 = "Saturday"\r
+\r
+; States\r
+states.AL = "Alabama"\r
+states.AK = "Alaska"\r
+states.AB = "Alberta"\r
+states.AZ = "Arizona"\r
+states.AR = "Arkansas"\r
+states.BC = "British Columbia"\r
+states.CA = "California"\r
+states.CO = "Colorado"\r
+states.CT = "Connecticut"\r
+states.DE = "Delaware"\r
+states.DC = "District of Columbia"\r
+states.FL = "Florida"\r
+states.GA = "Georgia"\r
+states.GU = "Guam"\r
+states.HI = "Hawaii"\r
+states.ID = "Idaho"\r
+states.IL = "Illinois"\r
+states.IN = "Indiana"\r
+states.IA = "Iowa"\r
+states.KS = "Kansas"\r
+states.KY = "Kentucky"\r
+states.LA = "Louisiana"\r
+states.ME = "Maine"\r
+states.MB = "Manitoba"\r
+states.MD = "Maryland"\r
+states.MA = "Massachusetts"\r
+states.MI = "Michigan"\r
+states.MN = "Minnesota"\r
+states.MS = "Mississppi"\r
+states.MO = "Missouri"\r
+states.MT = "Montana"\r
+states.NE = "Nebraska"\r
+states.NV = "Nevada"\r
+states.NB = "New Brunswick"\r
+states.NF = "Newfoundland"\r
+states.NH = "New Hampshire"\r
+states.NJ = "New Jersey"\r
+states.NM = "New Mexico"\r
+states.NY = "New York"\r
+states.NC = "North Carolina"\r
+states.ND = "North Dakota"\r
+states.NT = "Northwest Territories"\r
+states.NS = "Nova Scotia"\r
+states.OH = "Ohio"\r
+states.OK = "Oklahoma"\r
+states.ON = "Ontario"\r
+states.OR = "Oregon"\r
+states.PA = "Pennsylvania"\r
+states.PE = "Prince Edward Island"\r
+states.PR = "Puerto Rico"\r
+states.QC = "Quebec"\r
+states.RI = "Rhode Island"\r
+states.SK = "Saskatchewan"\r
+states.SC = "South Carolina"\r
+states.SD = "South Dakota"\r
+states.TN = "Tennessee"\r
+states.TX = "Texas"\r
+states.UT = "Utah"\r
+states.VT = "Vermont"\r
+states.VI = "Virgin Islands"\r
+states.VA = "Virginia"\r
+states.WA = "Washington"\r
+states.WV = "West Virginia"\r
+states.WI = "Wisconsin"\r
+states.WY = "Wyoming"\r
+states.YT = "Yukon"\r
+\r
+; Countries\r
+countries.US = "United States"\r
+countries.CA = "Canada"\r
+countries.AF = "Afghanistan"\r
+countries.AX = "Land Islands"\r
+countries.AL = "Albania"\r
+countries.DZ = "Algeria"\r
+countries.AS = "American Samoa"\r
+countries.AD = "Andorra"\r
+countries.AO = "Angola"\r
+countries.AI = "Anguilla"\r
+countries.AQ = "Antarctica"\r
+countries.AG = "Antigua and Barbuda"\r
+countries.AR = "Argentina"\r
+countries.AM = "Armenia"\r
+countries.AW = "Aruba"\r
+countries.AU = "Australia"\r
+countries.AT = "Austria"\r
+countries.AZ = "Azerbaijan"\r
+countries.BS = "Bahamas"\r
+countries.BH = "Bahrain"\r
+countries.BD = "Bangladesh"\r
+countries.BB = "Barbados"\r
+countries.BY = "Belarus"\r
+countries.BE = "Belgium"\r
+countries.BZ = "Belize"\r
+countries.BJ = "Benin"\r
+countries.BM = "Bermuda"\r
+countries.BT = "Bhutan"\r
+countries.BO = "Bolivia"\r
+countries.BA = "Bosnia and Herzegovina"\r
+countries.BW = "Botswana"\r
+countries.BV = "Bouvet Island"\r
+countries.BR = "Brazil"\r
+countries.IO = "British Indian Ocean Territory"\r
+countries.BN = "Brunei Darussalam"\r
+countries.BG = "Bulgaria"\r
+countries.BF = "Burkina Faso"\r
+countries.BI = "Burundi"\r
+countries.KH = "Cambodia"\r
+countries.CM = "Cameroon"\r
+countries.CV = "Cape Verde"\r
+countries.KY = "Cayman Islands"\r
+countries.CF = "Central African Republic"\r
+countries.TD = "Chad"\r
+countries.CL = "Chile"\r
+countries.CN = "China"\r
+countries.CX = "Christmas Island"\r
+countries.CC = "Cocos (Keeling) Islands"\r
+countries.CO = "Colombia"\r
+countries.KM = "Comoros"\r
+countries.CG = "Congo"\r
+countries.CD = "Congo, the Democratic Rep. of"\r
+countries.CK = "Cook Islands"\r
+countries.CR = "Costa Rica"\r
+countries.CI = "Cote D'Ivoire"\r
+countries.HR = "Croatia"\r
+countries.CU = "Cuba"\r
+countries.CY = "Cyprus"\r
+countries.CZ = "Czech Republic"\r
+countries.DK = "Denmark"\r
+countries.DJ = "Djibouti"\r
+countries.DM = "Dominica"\r
+countries.DO = "Dominican Republic"\r
+countries.EC = "Ecuador"\r
+countries.EG = "Egypt"\r
+countries.SV = "El Salvador"\r
+countries.GQ = "Equatorial Guinea"\r
+countries.ER = "Eritrea"\r
+countries.EE = "Estonia"\r
+countries.ET = "Ethiopia"\r
+countries.FK = "Falkland Islands (Malvinas)"\r
+countries.FO = "Faroe Islands"\r
+countries.FJ = "Fiji"\r
+countries.FI = "Finland"\r
+countries.FR = "France"\r
+countries.GF = "French Guiana"\r
+countries.PF = "French Polynesia"\r
+countries.TF = "French Southern Territories"\r
+countries.GA = "Gabon"\r
+countries.GM = "Gambia"\r
+countries.GE = "Georgia"\r
+countries.DE = "Germany"\r
+countries.GH = "Ghana"\r
+countries.GI = "Gibraltar"\r
+countries.GR = "Greece"\r
+countries.GL = "Greenland"\r
+countries.GD = "Grenada"\r
+countries.GP = "Guadeloupe"\r
+countries.GU = "Guam"\r
+countries.GT = "Guatemala"\r
+countries.GN = "Guinea"\r
+countries.GW = "Guinea-Bissau"\r
+countries.GY = "Guyana"\r
+countries.HT = "Haiti"\r
+countries.HM = "Heard Island, McDonald Islands"\r
+countries.VA = "Holy see (Vatican City State)"\r
+countries.HN = "Honduras"\r
+countries.HK = "Hong Kong"\r
+countries.HU = "Hungary"\r
+countries.IS = "Iceland"\r
+countries.IN = "India"\r
+countries.ID = "Indonesia"\r
+countries.IR = "Iran, Islamic Republic of"\r
+countries.IQ = "Iraq"\r
+countries.IE = "Ireland"\r
+countries.IL = "Israel"\r
+countries.IT = "Italy"\r
+countries.JM = "Jamaica"\r
+countries.JP = "Japan"\r
+countries.JO = "Jordan"\r
+countries.KZ = "Kazakhstan"\r
+countries.KE = "Kenya"\r
+countries.KI = "Kiribati"\r
+countries.KP = "Korea, Democratic People's Rep. of"\r
+countries.KR = "Korea, Republic of"\r
+countries.KW = "Kuwait"\r
+countries.KG = "Kyrgyzstan"\r
+countries.LA = "Lao People's Democratic Republic"\r
+countries.LV = "Latvia"\r
+countries.LB = "Lebanon"\r
+countries.LS = "Lesotho"\r
+countries.LR = "Liberia"\r
+countries.LY = "Libyan Arab Jamahiriya"\r
+countries.LI = "Liechtenstein"\r
+countries.LT = "Lithuania"\r
+countries.LU = "Luxembourg"\r
+countries.MO = "Macao"\r
+countries.MK = "Macedonia, the Former Yugoslav Rep."\r
+countries.MG = "Madagascar"\r
+countries.MW = "Malawi"\r
+countries.MY = "Malaysia"\r
+countries.MV = "Maldives"\r
+countries.ML = "Mali"\r
+countries.MT = "Malta"\r
+countries.MH = "Marshall Islands"\r
+countries.MQ = "Martinique"\r
+countries.MR = "Mauritania"\r
+countries.MU = "Mauritius"\r
+countries.YT = "Mayotte"\r
+countries.MX = "Mexico"\r
+countries.FM = "Micronesia, Federated States of"\r
+countries.MD = "Moldova, Republic of"\r
+countries.MC = "Monaco"\r
+countries.MN = "Mongolia"\r
+countries.MS = "Montserrat"\r
+countries.MA = "Morocco"\r
+countries.MZ = "Mozambique"\r
+countries.MM = "Myanmar"\r
+countries.NA = "Namibia"\r
+countries.NR = "Nauru"\r
+countries.NP = "Nepal"\r
+countries.NL = "Netherlands"\r
+countries.AN = "Netherlands Antilles"\r
+countries.NC = "New Caledonia"\r
+countries.NZ = "New Zealand"\r
+countries.NI = "Nicaragua"\r
+countries.NE = "Niger"\r
+countries.NG = "Nigeria"\r
+countries.NU = "Niue"\r
+countries.NF = "Norfolk Island"\r
+countries.MP = "Northern Mariana Islands"\r
+countries.NO = "Norway"\r
+countries.OM = "Oman"\r
+countries.PK = "Pakistan"\r
+countries.PW = "Palau"\r
+countries.PS = "Palestinian Territory, Occupied"\r
+countries.PA = "Panama"\r
+countries.PG = "Papua New Guinea"\r
+countries.PY = "Paraguay"\r
+countries.PE = "Peru"\r
+countries.PH = "Philippines"\r
+countries.PN = "Pitcairn"\r
+countries.PL = "Poland"\r
+countries.PT = "Portugal"\r
+countries.PR = "Puerto Rico"\r
+countries.QA = "Qatar"\r
+countries.RE = "Reunion"\r
+countries.RO = "Romania"\r
+countries.RU = "Russian Federation"\r
+countries.RW = "Rwanda"\r
+countries.SH = "Saint Helena"\r
+countries.KN = "Saint Kitts and Nevis"\r
+countries.LC = "Saint Lucia"\r
+countries.PM = "Saint Pierre and Miquelon"\r
+countries.VC = "Saint Vincent and the Grenadines"\r
+countries.WS = "Samoa"\r
+countries.SM = "San Marino"\r
+countries.ST = "Sao Tome and Principe"\r
+countries.SA = "Saudi Arabia"\r
+countries.SN = "Senegal"\r
+countries.CS = "Serbia and Montenegro"\r
+countries.SC = "Seychelles"\r
+countries.SL = "Sierra Leone"\r
+countries.SG = "Singapore"\r
+countries.SK = "Slovakia"\r
+countries.SI = "Slovenia"\r
+countries.SB = "Solomon Islands"\r
+countries.SO = "Somalia"\r
+countries.ZA = "South Africa"\r
+countries.GS = "South Georgia, South Sandwich Islands"\r
+countries.ES = "Spain"\r
+countries.LK = "Sri Lanka"\r
+countries.SD = "Sudan"\r
+countries.SR = "Suriname"\r
+countries.SJ = "Svalbard and Jan Mayen"\r
+countries.SZ = "Swaziland"\r
+countries.SE = "Sweden"\r
+countries.CH = "Switzerland"\r
+countries.SY = "Syrian Arab Republic"\r
+countries.TW = "Taiwan, Province of China"\r
+countries.TJ = "Tajikistan"\r
+countries.TZ = "Tanzania, United Republic of"\r
+countries.TH = "Thailand"\r
+countries.TL = "Timor-Leste"\r
+countries.TG = "Togo"\r
+countries.TK = "Tokelau"\r
+countries.TO = "Tonga"\r
+countries.TT = "Trinidad and Tobago"\r
+countries.TN = "Tunisia"\r
+countries.TR = "Turkey"\r
+countries.TM = "Turkmenistan"\r
+countries.TC = "Turks and Caicos Islands"\r
+countries.TV = "Tuvalu"\r
+countries.UG = "Uganda"\r
+countries.UA = "Ukraine"\r
+countries.AE = "United Arab Emirates"\r
+countries.GB = "United Kingdom"\r
+countries.UM = "United States minor outlying islands"\r
+countries.UY = "Uruguay"\r
+countries.UZ = "Uzbekistan"\r
+countries.VU = "Vanuatu"\r
+countries.VE = "Venezuela"\r
+countries.VN = "Viet Nam"\r
+countries.VG = "Virgin Islands, British"\r
+countries.VI = "Virgin Islands, U.S."\r
+countries.WF = "Wallis and Futuna"\r
+countries.EH = "Western Sahara"\r
+countries.YE = "Yemen"\r
+countries.ZM = "Zambia"\r
+countries.ZW = "Zimbabwe"\r
+\r
+; Standard color names and codes\r
+color.800000 = 'maroon' \r
+color.8B0000 = 'darkred' \r
+color.FF0000 = 'red' \r
+color.FFB6C1 = 'lightpink' \r
+color.DC143C = 'crimson' \r
+color.DB7093 = 'palevioletred' \r
+color.FF69B4 = 'hotpink' \r
+color.FF1493 = 'deeppink' \r
+color.C71585 = 'mediumvioletred' \r
+color.800080 = 'purple' \r
+color.8B008B = 'darkmagenta' \r
+color.DA70D6 = 'orchid' \r
+color.D8BFD8 = 'thistle' \r
+color.DDA0DD = 'plum' \r
+color.EE82EE = 'violet' \r
+color.FF00FF = 'fuchsia' \r
+color.FF00FF = 'magenta' \r
+color.BA55D3 = 'mediumorchid' \r
+color.9400D3 = 'darkviolet' \r
+color.9932CC = 'darkorchid' \r
+color.8A2BE2 = 'blueviolet' \r
+color.4B0082 = 'indigo' \r
+color.9370DB = 'mediumpurple' \r
+color.6A5ACD = 'slateblue' \r
+color.7B68EE = 'mediumslateblue' \r
+color.00008B = 'darkblue' \r
+color.05367D = 'mackinawblue' \r
+color.0000CD = 'mediumblue' \r
+color.0000FF = 'blue' \r
+color.000080 = 'navy' \r
+color.191970 = 'midnightblue' \r
+color.483D8B = 'darkslateblue' \r
+color.4169E1 = 'royalblue' \r
+color.6495ED = 'cornflowerblue' \r
+color.B0C4DE = 'lightsteelblue' \r
+color.F0F8FF = 'aliceblue' \r
+color.F8F8FF = 'ghostwhite' \r
+color.E6E6FA = 'lavender' \r
+color.1E90FF = 'dodgerblue' \r
+color.4682B4 = 'steelblue' \r
+color.00BFFF = 'deepskyblue' \r
+color.708090 = 'slategray' \r
+color.778899 = 'lightslategray' \r
+color.87CEFA = 'lightskyblue' \r
+color.87CEEB = 'skyblue' \r
+color.ADD8E6 = 'lightblue' \r
+color.008080 = 'teal' \r
+color.008B8B = 'darkcyan' \r
+color.00CED1 = 'darkturquoise' \r
+color.00FFFF = 'aqua' \r
+color.48D1CC = 'mediumturquoise' \r
+color.5F9EA0 = 'cadetblue' \r
+color.AFEEEE = 'paleturquoise' \r
+color.E0FFFF = 'lightcyan' \r
+color.F0FFFF = 'azure' \r
+color.20B2AA = 'lightseagreen' \r
+color.40E0D0 = 'turquoise' \r
+color.B0E0E6 = 'powderblue' \r
+color.2F4F4F = 'darkslategray' \r
+color.7FFFD4 = 'aquamarine' \r
+color.00FA9A = 'mediumspringgreen' \r
+color.66CDAA = 'mediumaquamarine' \r
+color.00FF7F = 'springgreen' \r
+color.3CB371 = 'mediumseagreen' \r
+color.2E8B57 = 'seagreen' \r
+color.32CD32 = 'limegreen' \r
+color.006400 = 'darkgreen' \r
+color.008000 = 'green' \r
+color.00FF00 = 'lime' \r
+color.228B22 = 'forestgreen' \r
+color.8FBC8F = 'darkseagreen' \r
+color.90EE90 = 'lightgreen' \r
+color.98FB98 = 'palegreen' \r
+color.F5FFFA = 'mintcream' \r
+color.F0FFF0 = 'honeydew' \r
+color.7FFF00 = 'chartreuse' \r
+color.7CFC00 = 'lawngreen' \r
+color.6B8E23 = 'olivedrab' \r
+color.556B2F = 'darkolivegreen' \r
+color.9ACD32 = 'yellowgreen' \r
+color.ADFF2F = 'greenyellow' \r
+color.F5F5DC = 'beige' \r
+color.FAF0E6 = 'linen' \r
+color.FAFAD2 = 'lightgoldenrodyellow'\r
+color.808000 = 'olive' \r
+color.FFFF00 = 'yellow' \r
+color.FFFFE0 = 'lightyellow' \r
+color.FFFFF0 = 'ivory' \r
+color.BDB76B = 'darkkhaki' \r
+color.F0E68C = 'khaki' \r
+color.EEE8AA = 'palegoldenrod' \r
+color.F5DEB3 = 'wheat' \r
+color.FFD700 = 'gold' \r
+color.FFFACD = 'lemonchiffon' \r
+color.FFEFD5 = 'papayawhip' \r
+color.B8860B = 'darkgoldenrod' \r
+color.DAA520 = 'goldenrod' \r
+color.FAEBD7 = 'antiquewhite' \r
+color.FFF8DC = 'cornsilk' \r
+color.FDF5E6 = 'oldlace' \r
+color.FFE4B5 = 'moccasin' \r
+color.FFDEAD = 'navajowhite' \r
+color.FFA500 = 'orange' \r
+color.FFE4C4 = 'bisque' \r
+color.D2B48C = 'tan' \r
+color.FF8C00 = 'darkorange' \r
+color.DEB887 = 'burlywood' \r
+color.8B4513 = 'saddlebrown' \r
+color.F4A460 = 'sandybrown' \r
+color.FFEBCD = 'blanchedalmond' \r
+color.FFF0F5 = 'lavenderblush' \r
+color.FFF5EE = 'seashell' \r
+color.FFFAF0 = 'floralwhite' \r
+color.FFFAFA = 'snow' \r
+color.CD853F = 'peru' \r
+color.FFDAB9 = 'peachpuff' \r
+color.D2691E = 'chocolate' \r
+color.A0522D = 'sienna' \r
+color.FFA07A = 'lightsalmon' \r
+color.FF7F50 = 'coral' \r
+color.E9967A = 'darksalmon' \r
+color.FFE4E1 = 'mistyrose' \r
+color.FF4500 = 'orangered' \r
+color.FA8072 = 'salmon' \r
+color.FF6347 = 'tomato' \r
+color.BC8F8F = 'rosybrown' \r
+color.FFC0CB = 'pink' \r
+color.CD5C5C = 'indianred' \r
+color.F08080 = 'lightcoral' \r
+color.A52A2A = 'brown' \r
+color.B22222 = 'firebrick' \r
+color.000000 = 'black' \r
+color.696969 = 'dimgray' \r
+color.808080 = 'gray' \r
+color.A9A9A9 = 'darkgray' \r
+color.C0C0C0 = 'silver' \r
+color.D3D3D3 = 'lightgrey' \r
+color.DCDCDC = 'gainsboro' \r
+color.F5F5F5 = 'whitesmoke' \r
+color.FFFFFF = 'white' \r
+\r
+[production : common]\r
+; Debugging and Testing parameters\r
+option.development = false ;Tells templates that this is a production server\r
+option.admin_debug = false ;If true causes system to dump diagnostic data to a separate window\r
+option.admin_debug_size = 800 ;Width in pixels of front debug window\r
+option.front_debug = false ;If true causes system to dump diagnostic data to a separate window\r
+option.front_debug_size = 800 ;Width in pixels of front debug window\r
+option.preview = true ;Use "preview=1" in links to support preview feature\r
+option.checkout_pre_fill = false ;Use for testing, prefills checkout data for convenience\r
+debug.level = 0 ;Debug level - 0=off\r
+debug.view_parameters = false ;Display all View tags and information\r
+debug.housing_query = false ;Display main housing query\r
+debug.pricing = false ;Detailed information on pricing and cost calculations\r
+debug.checkout = false ;Display checkout processing steps and data\r
+debug.mail = false ;Display mail rather than send it\r
+debug.glmpdf = false ;Display calibration grids in PDFs\r
+\r
+[development : common]\r
+; Debugging and Testing parameters\r
+option.development = true ;Tells templates that this is a development server\r
+option.admin_debug = false ;If true causes system to dump diagnostic data to a separate window\r
+option.admin_debug_size = 800 ;Width in pixels of front debug window\r
+option.front_debug = false ;If true causes system to dump diagnostic data to a separate window\r
+option.front_debug_size = 800 ;Width in pixels of front debug window\r
+option.preview = true ;Use "preview=1" in links to support preview feature\r
+option.checkout_pre_fill = false ;Use for testing, prefills checkout data for convenience\r
+debug.level = 0 ;Debug level - 0=off\r
+debug.view_parameters = false ;Display all View tags and information\r
+debug.housing_query = false ;Display main housing query\r
+debug.pricing = false ;Detailed information on pricing and cost calculations\r
+debug.checkout = false ;Display checkout processing steps and data\r
+debug.mail = false ;Display mail rather than send it\r
+debug.glmpdf = false ;Display calibration grids in PDFs\r
+ \r
+[chuck : common]\r
+; Debugging and Testing parameters\r
+option.development = true ;Tells templates that this is a development server\r
+option.admin_debug = true ;If true causes system to dump diagnostic data to a separate window\r
+option.admin_debug_size = 800 ;Width in pixels of front debug window\r
+option.front_debug = true ;If true causes system to dump diagnostic data to a separate window\r
+option.front_debug_size = 800 ;Width in pixels of front debug window\r
+option.preview = false ;Use "preview=1" in links to support preview feature\r
+option.checkout_pre_fill = true ;Use for testing, prefills checkout data for convenience\r
+debug.level = 1 ;Debug level - 0=off, 1=Show Function Calls\r
+debug.view_parameters = true ;Display all View tags and information\r
+debug.housing_query = true ;Display main housing query\r
+debug.pricing = true ;Detailed information on pricing and cost calculations\r
+debug.checkout = true ;Display checkout processing steps and data\r
+debug.mail = true ;Display mail rather than send it\r
+debug.glmpdf = true ;Display calibration grids in PDFs\r
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin Index
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: EventManagement.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+/*
+ * Need to explain all this
+ */
+class EventManagementPage
+{
+
+ public $level;
+
+ function setUserLevel($level)
+ {
+ $this->level = $level;
+ }
+
+ function checkPermission($userPermissionLevel)
+ {
+ if ($userPermissionLevel >= $this->level) {
+ return true;
+ }
+ return false;
+ }
+
+}
+
+
+/**
+ * EventManagementAdminIndexController class
+ *
+ * Event Management System - Admin main index
+ *
+ * PHP version 5
+ *
+ * @category Reservations_Front_End
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: EventManagement.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+class EventManagementAdminIndexController
+{
+
+ /**
+ * Debug Information
+ * @var $adminDebug
+ * @access public
+ */
+ private $adminDebug = '';
+ private $adminDebugMenu = '';
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ private $applicationConfig;
+ private $serverConfig;
+ private $siteConfig;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $isa;
+ public $imageServer;
+ /**
+ * Reason for any problems that come up
+ * @var unknown
+ * @access public
+ */
+ public $reason = array();
+ /**
+ * Current Action
+ * Default is set to SelectConv
+ * @var $Action
+ * @access public
+ */
+ public $Action = 'SelectConv';
+ /**
+ * Template to use for output
+ * @var unknown
+ * @access public
+ */
+ public $flexyOptions;
+ public $template;
+ public $page;
+ /**
+ * User Level
+ * @var unknown
+ * @access public
+ */
+ public $userLevel = false;
+ /**
+ * User Interface
+ * @var unknown
+ * @access public
+ */
+ public $interface = false;
+ public $userInterface = false;
+ public $userInterfaces = false;
+ public $userInterfacesSelectable = false;
+
+ public $customFeatures = false;
+ public $userMemberID = false;
+ public $memberName = false;
+ public $userMemberVenueName = false;
+ public $MemberUser = false;
+ public $MemberUserValid = false;
+ public $AdminUser = false;
+ public $tabList = false;
+ public $blockTab = false;
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct($applicationConfig, $serverConfig, $siteConfig)
+ {
+
+ // Save config data and build a common config object
+ $this->applicationConfig = $applicationConfig;
+ $this->serverConfig = $serverConfig;
+ $this->siteConfig = $siteConfig;
+ $this->buildIntegratedConfig();
+
+ // Setup some required defines for this application
+ $this->setupDefines();
+
+ // Create database connection
+ $this->dbh = Toolkit_Database::getInstance();
+
+ // Set debug file name that includes remote address to keep users separate
+ if ($this->config->option->admin_debug) {
+ define('DEBUG_DATA_FILENAME', '/tmp/EventManagement.'.$_SERVER['REMOTE_ADDR'].'.debug.html');
+ }
+
+ // If there's no custom front-end, then disable custom features (i.e. Misc menu in admin)
+ $this->customFeatures = false;
+ if ($this->config->custom_prefix != '') {
+ $this->customFeatures = true;
+ }
+
+ // Start Session
+ $this->startSession();
+
+ // Get requested action
+ $this->getRequestedAction();
+
+ // Check for a member user
+ $this->checkMemberUser();
+
+ // Check if there's a request to reset all selected items
+ $this->checkResetSelected();
+
+ // User interface selection
+ $this->userInterfaceSelection();
+
+ // Track selected tabs so they aren't repeated in the user interface
+ $this->trackTabs();
+
+ // Setup page and template configurations and add some standard page data
+ $this->setupTemplate();
+
+ // Setup URLs and Locations for templates
+ $this->setupURLs();
+
+ // Add start of request debug data
+ $this->startOfRequestDebug();
+
+ // Perform requested action and add this to debug
+ $this->performAction();
+
+ // Display Output
+ $this->displayOutput();
+
+ // Output debug information if that's enabled
+ $this->displayDebug();
+
+ }
+
+ /**
+ * Assemble all required config data into $this->config
+ *
+ * @return void
+ */
+ private function buildIntegratedConfig()
+ {
+
+ // Set common apps base location
+ define('COMMON_APP_BASE', '/var/www/server/CommonApps/');
+
+ // Get customer's config for this application and Merge in customer's main application.ini
+ $this->config = new Zend_Config_Ini(
+ BASE_PATH.'config/applications/EventManagement.ini',
+ strtolower($_ENV['GLM_HOST_ID']),
+ array('allowModifications' => true)
+ );
+ $this->config->merge($this->applicationConfig->event_management);
+ $this->config->owner = $this->siteConfig->owner;
+ $this->config->file_server = $this->serverConfig->file_server;
+
+ // Set location for this application
+ define('EVENT_MANAGEMENT_APP_BASE', COMMON_APP_BASE.$this->config->version.'/');
+
+ // Get common config data for this application and merge in site specific config
+ $EMConfig = new Zend_Config_Ini(
+ EVENT_MANAGEMENT_APP_BASE.'configs/common.ini',
+ strtolower($_ENV['GLM_HOST_ID']),
+ array('allowModifications' => true)
+ );
+ $this->config->merge($EMConfig);
+
+ }
+
+ /**
+ * Set system defines
+ *
+ * @return void
+ */
+ private function setupDefines()
+ {
+
+ // Set datestyle string for DB results
+ define('DATE_STYLE_STRING', $this->config->misc->datestyle );
+
+ // Set common apps base location
+ define('DATA_ABSTRACT', COMMON_APP_BASE.'CommonAbstracts/'.$this->config->dataAbstractLocation.'/DataAbstract.php');
+ define('PDF_ABSTRACT', COMMON_APP_BASE.'CommonAbstracts/'.$this->config->pdfAbstractLocation.'/GlmPdf.php');
+ define('IMAGE_SERVER_ABSTRACT', COMMON_APP_BASE.'CommonAbstracts/'.$this->config->imageServerAbstractLocation.'/Server.php');
+
+ // Also set a defined parameter for access to the File/Image Server
+ define('IMAGE_SERVER_PREFIX', $this->config->file_server->secure.$this->config->file_server->owner_id.'/');
+
+ }
+
+ /**
+ * Start Session
+ *
+ * @return object containing array as sub-objects
+ */
+ function startSession($force = false)
+ {
+ // If we haven't started sessions yet
+ if (!isset($_SESSION)) {
+ session_start();
+ }
+
+ // Use "session_reset=true" in link to force a reset
+ if ($_REQUEST['session_reset'] == 'true') {
+ $force = true;
+ }
+
+ // Set a different session name if the user is coming from the front end as an ADMIN_LOGIN_USER
+ if (defined('MEMBER_USER') && MEMBER_USER) {
+ define('GLM_EVENT_SESSION', 'GLM_EVENT_MGT_LOGIN_USER');
+ } else {
+ define('GLM_EVENT_SESSION', 'GLM_EVENT_MGT_ADMIN');
+
+ // Define MEMBER_USER as false so we don't have to keep checking if it's defined
+ define('MEMBER_USER', false);
+ }
+
+ // If the session timeout has past then reset session
+ if ($_SESSION[GLM_EVENT_SESSION]['timeOut'] < time()) {
+ $force = true;
+
+ // Only notify the user if the session has timed out in the last hour
+ if (time() - $_SESSION[GLM_EVENT_SESSION]['timeOut'] < 60*60 ) {
+ $this->reason[] = 'Your user session has timed out due to inactivity.';
+ }
+ }
+
+ // If requested or not yet set, create a clean session array
+ if ($force || !isset($_SESSION[GLM_EVENT_SESSION])) {
+
+ // But save certain things
+ $this->interface = $_SESSION[GLM_EVENT_SESSION]['Interface'];
+ if ($_SESSION[GLM_EVENT_SESSION]['MemberUser']) {
+ $userMember = $_SESSION[GLM_EVENT_SESSION]['Member'];
+ $userID = $_SESSION[GLM_EVENT_SESSION]['MemberUser'];
+ $userLevel = $_SESSION[GLM_EVENT_SESSION]['MemberUserLevel'];
+ } else {
+ $userID = false;
+ $userLevel = $this->config->permissions_numb->none;
+ }
+
+ // If full reset then set user interface back to default
+ if ($force) {
+ $this->interface = $this->config->default_admin_interface;
+ }
+
+ // create GLM_HOUSING session with all parameters false
+ $_SESSION[GLM_EVENT_SESSION] = array(
+ 'timeOut' => false,
+ 'Event' => false,
+ 'Member' => $userMember,
+ 'Accom' => false,
+ 'Inven' => false,
+ 'Team' => false,
+ 'Booking' => false,
+ 'Reservation' => false,
+ 'State' => false,
+ 'Division' => false,
+ 'Contact' => false,
+ 'Entrance' => false,
+ 'Section' => false,
+ 'Performance' => false,
+ 'Promo' => false,
+ 'Ticket' => false,
+ 'TicketInventory' => false,
+ 'Interface' => $this->interface,
+ 'TabsSelected' => false,
+ 'Order' => false,
+ 'MemberUser' => $userID,
+ 'MemberUserLevel' => $userLevel,
+ 'VoucherCoupon' => false
+ );
+
+ }
+
+ // Reset session timeout to current time plus timeout length in minutes
+ $_SESSION[GLM_EVENT_SESSION]['timeOut'] = strtotime('now +'.$this->config->admin_session_timeout.' minutes');
+
+ $this->addDebug('startSession()', 'Session timeout at: '.date('r', $_SESSION[GLM_EVENT_SESSION]['timeOut']).' ('.$_SESSION[GLM_EVENT_SESSION]['timeOut'].')');
+
+ }
+
+ /**
+ * Get requested action
+ *
+ * @return void
+ */
+ private function getRequestedAction()
+ {
+
+ // Try both GET and POST
+ if (!($this->Action = filter_input(INPUT_GET, 'Action', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH)) &&
+ !($this->Action = filter_input(INPUT_POST, 'Action', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH))
+ ) {
+ // No Action provided, so doing default
+ $this->Action = 'Index_index';
+ }
+
+ }
+
+ /**
+ * Check for member user
+ *
+ * @return void
+ */
+ private function checkMemberUser()
+ {
+
+ // Start with assumption that we don't have a valid member user
+ $this->MemberUserValid = false;
+
+ // Override for debug window
+ if ($this->Action == "Debug_start" || $this->Action == "Debug_update") {
+ $this->MemberUser = false;
+ $this->AdminUser = true;
+ }
+
+ // Check if this is a member logout. If so, send user back to front-end.
+ if ($_REQUEST['EMlogout'] == 'true') {
+ $_SESSION[GLM_EVENT_SESSION]['MemberUser'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['MemberUserLevel'] = 0;
+
+ echo '<script type="text/javascript">
+ window.location.href = "'.CURRENT_BASE_URL.'event-management-'.$this->config->members_only_page.'/";
+ </script>
+ ';
+ }
+
+ // If this is a member user, and we're not processing a debug request
+ if (MEMBER_USER && $this->Action != "Debug_start" && $this->Action != "Debug_update") {
+
+ // Check if we aren't getting a login request and we already have a member user login
+ if ($this->Action != "User_login" && $_SESSION[GLM_EVENT_SESSION]['MemberUser']) {
+
+ // Check the current user level
+ $sql = "
+ SELECT C.id, C.user_rights, C.active, C.affiliation, C.fname, C.lname, M.name
+ FROM eventmgt.res_contact C, eventmgt.member M
+ WHERE C.id = ".$_SESSION[GLM_EVENT_SESSION]['MemberUser']."
+ AND M.id = C.affiliation
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $contact = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // If the contact has been deleted, is marked inactive, or had their rights changed
+ if ($contact == false || !$contact['active'] || $contact['user_rights'] != $_SESSION[GLM_EVENT_SESSION]['MemberUserLevel']) {
+
+ // Send the user back to login
+ $_SESSION[GLM_EVENT_SESSION]['MemberUser'] = false;
+ $reason =
+ "Your session is being reset. This can happen for one of the following reasons. "
+ ."Your permissions have changed, "
+ ."your user account has been marked inactive, "
+ ."your user account has been deleted, "
+ ."or there has been an unexpected system error.";
+ echo '
+ <script type="text/javascript">
+ alert("'.$reason.'");
+ window.location.href = "'.CURRENT_BASE_URL.'";
+ </script>
+ ';
+ exit;
+
+ }
+
+ // Otherwise we must not have a current login
+ } else {
+
+ // Assume we're not going to get logged in and we're going to send them back
+ $this->Action = 'User_login';
+
+ $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL);
+ $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);
+
+ // Check if we have email and password supplied
+ if ($email != '' && $password != '') {
+
+ $loginFail = false;
+
+ // Crypt password
+ $pwCrypt = crypt($password);
+
+ // Check contact table for user with the supplied E-Mail address
+ $sql = "
+ SELECT C.id, C.password, C.user_rights, C.active, C.contact_type, C.affiliation, C.fname, C.lname, M.name
+ FROM eventmgt.res_contact C, eventmgt.member M
+ WHERE (C.email = '$email' OR C.login_id = '$email')
+ AND M.id = C.affiliation
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $contact = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // If we found a contact with this E-Mail address that's active
+ if ($contact != false && $contact['active'] && $contact['contact_type'] == 2) {
+
+ // Does the crypt match?
+ if (crypt($password, $contact['password']) == $contact['password']) {
+
+ // Yep, so send user to the admin home
+ $this->Action = 'Index_index';
+
+ // And save the user login info
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = $contact['affiliation'];
+ $_SESSION[GLM_EVENT_SESSION]['MemberUser'] = $contact['id'];
+ $_SESSION[GLM_EVENT_SESSION]['MemberUserLevel'] = $contact['user_rights'];
+
+ } else {
+ $loginFail = true;
+ }
+
+ } else {
+ $loginFail = true;
+ }
+
+ if ($loginFail) {
+ $this->reason[] = 'You did not supply a valid E-Mail address or Log in ID and password.';
+ }
+
+ }
+
+ } // Don't have member user login
+
+ } else {
+ if ($this->Action != "Debug_start" && $this->Action != "Debug_update") {
+ // The user is not a MemberUser, so must be an admin user - Give full permissions
+ $_SESSION[GLM_EVENT_SESSION]['MemberUser'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['MemberUserLevel'] = 0;
+ }
+ }
+
+ // This stuffs the current user level into the EventManagementPage class parameter
+ if ($_SESSION[GLM_EVENT_SESSION]['MemberUserLevel'] > 0) {
+ $this->userMemberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+ $this->memberName = $contact['fname']." ".$contact['lname'];
+ $this->userMemberVenueName = $contact['name'];
+ } else {
+ $this->userMemberID = false;
+ $this->memberName = '';
+ $this->userMemberVenueName = '';
+ }
+
+ }
+
+
+ /**
+ * Check if selected items reset has been requested
+ *
+ * @return void
+ */
+ private function checkResetSelected()
+ {
+
+ // If requested, reset all selected items in the session - This is done with all main tabs
+ if ($_REQUEST['resetSelected'] == 'true') {
+
+ $_SESSION[GLM_EVENT_SESSION]['Event'] = false;
+ if (!$_SESSION[GLM_EVENT_SESSION]['MemberUser']) {
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = false;
+ }
+ $_SESSION[GLM_EVENT_SESSION]['Accom'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['Team'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['Booking'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['Reservation'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['State'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['Division'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['Contact'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['Section'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['Performance'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['Ticket'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['TicketInventory'] = false;
+ $_SESSION[GLM_EVENT_SESSION]['Order'] = false;
+
+ }
+
+ }
+
+ /**
+ * User Interface selection (template dir)
+ *
+ * @return void
+ */
+ private function userInterfaceSelection()
+ {
+
+ // Is there a request for a specific interface
+ if (isset($_REQUEST['interface']) &&
+ in_array($_REQUEST['interface'], $this->config->admin_interface->toArray())
+ ) {
+ $this->interface = $_REQUEST['interface'];
+ // Oherwise, do we have an interface selection in the user session?
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Interface']) && $_SESSION[GLM_EVENT_SESSION]['Interface'] != '') {
+ $this->interface = $_SESSION[GLM_EVENT_SESSION]['Interface'];
+ // If neither, then use default user interface.
+ } else {
+ $this->interface = $this->config->default_admin_interface;
+ }
+
+ // Update session and page to show selected user interface
+ $_SESSION[GLM_EVENT_SESSION]['Interface'] = $this->interface;
+ $this->userInterface = $this->interface;
+
+ // Provide list of user interfaces to page
+ $interfaces = $this->config->admin_interface->toArray();
+ $userInterfaces = array();
+ foreach ($interfaces as $i) {
+ $userInterfaces[] = array(
+ 'directory' => $i,
+ 'name' => $i,
+ 'selected' => ($i == $this->interface)
+ );
+ }
+
+ // If there's more than 1 user interface then tell the template to display user interface selection
+ $this->userInterfacesSelectable = ($this->config->admin_interface->selectable && count($interfaces) > 1);
+ $this->userInterfaces = $this->bindArrayToObject($userInterfaces);
+
+ }
+
+ /**
+ * Track tabs that are selected
+ *
+ * This is to keep from displaying another tab in a
+ * lower layer that's already been displayed.
+ *
+ * @return void
+ */
+ private function trackTabs()
+ {
+
+ // If tab list is provided
+ if (isset($_REQUEST['tabList'])) {
+ $this->tabList = $_REQUEST['tabList'];
+ } else {
+ $this->tabList = '';
+ }
+ if ($this->tabList != '') {
+ $this->tabList .= ',';
+ }
+ $this->tabList .= $this->Action;
+
+ $blockTab = array();
+ $nt = explode(',', $this->tabList);
+ foreach ($nt as $t) {
+ $blockTab[$t] = true;
+ }
+ $this->blockTab = $this->bindArrayToObject($blockTab);
+
+ }
+
+ /**
+ * Set template configuration
+ *
+ * @return void
+ */
+ private function setupTemplate()
+ {
+ // Test if there is a local templates directory for the Web site
+ if (is_dir(BASE_PATH.'admin/EventManagement/templates')) {
+ $templatesDir = BASE_PATH.'admin/EventManagement/templates/admin/';
+ } else {
+ // Otherwise use the templates in this app
+ $templatesDir = EVENT_MANAGEMENT_APP_BASE.'views/admin/';
+ }
+
+ // Setup Template and Page
+ $this->flexyOptions = array(
+ 'templateDir' => $templatesDir,
+ 'compileDir' => BASE_PATH.'/templates/compiled',
+ 'forceCompile' => false,
+ 'flexyIgnore' => true,
+ 'allowPHP' => true,
+ 'debug' => false
+ );
+ $this->template = new HTML_Template_Flexy($this->flexyOptions);
+ $this->page = new EventManagementPage();
+
+ // Add some standard page data
+ $this->page->startScript = '<script type="text/javascript">'."\n";
+ $this->page->baseURL = CURRENT_BASE_URL;
+ $this->page->lt = '<'; // needed to avoid breaking javascript
+ $this->page->adminDebug = $this->config->option->admin_debug;
+ $this->page->timestamp = time();
+
+ // Add configuration items that need to be available to templates
+ $this->page->owner = $this->bindArrayToObject($this->config->owner->toArray());
+ $this->page->option = $this->bindArrayToObject($this->config->option->toArray());
+ $this->page->image_style = $this->bindArrayToObject($this->config->image_style->toArray());
+ $this->page->term = $this->bindArrayToObject($this->config->term->toArray());
+ $this->page->fileServer = $this->bindArrayToObject($this->config->file_server->toArray());
+
+ // Add user interface(s) settings
+ $this->page->userInterface = $this->userInterface;
+ $this->page->userInterfacesSelectable = $this->userInterfacesSelectable;
+ $this->page->userInterfaces = $userInterfaces;
+
+ $this->page->customFeatures = $this->customFeatures;
+
+ // User information
+ $this->page->MemberUser = $this->MemberUser;
+ $this->page->MemberUserValid = $this->MemberUserValid;
+ $this->page->AdminUser = $this->AdminUser;
+ $this->page->setUserLevel($_SESSION[GLM_EVENT_SESSION]['MemberUserLevel']);
+ $this->page->memberUserLevel = $this->config->permissions->{$_SESSION[GLM_EVENT_SESSION]['MemberUserLevel']};
+ $this->page->userMemberID = $this->userMemberID;
+ $this->page->memberName = $this->memberName;
+ $this->page->userMemberVenueName = $this->userMemberVenueName;
+
+ // Front end link and check
+ $parts = explode(':', CURRENT_BASE_URL);
+ $this->page->frontEndOrderLink = 'https:'.$parts[1].$this->config->application_url;
+ $this->page->adminUserFrontLinkCheck = md5($this->config->orderVerificationSecret.$_SERVER['REMOTE_ADDR'].date('m/d/Y'));
+
+ // Tab tracking
+ $this->page->tabList = $this->tabList;
+ $this->page->blockTab = $this->blockTab;
+
+ }
+
+
+ /**
+ * Setup URLs and Locations
+ *
+ * @return void
+ */
+ private function setupURLs()
+ {
+
+ // Determine if we are coming from the member user URL
+ $this->page->MemberUser = MEMBER_USER;
+ $this->page->AdminUser = !MEMBER_USER;
+
+ // Admin URL depends on whether it's normal or Event Managers separate access
+ if ($this->page->MemberUser) {
+ // Login from front-end member user - *** NEED TO CLEAN THIS NONSENSE UP ***
+ $this->page->adminURL = CURRENT_BASE_URL.'event-management-'.$this->config->members_only_page.'/?x=y';
+ $this->page->baseAdminURL = $this->page->adminURL;
+ $this->page->appAdminURL = $this->page->adminURL;
+ } else {
+ $this->page->adminURL = CURRENT_BASE_URL.'admin/EventManagement/EventManagement.php?x=y';
+ $this->page->baseAdminURL = $this->page->adminURL;
+ $this->page->appAdminURL = $this->page->adminURL;
+ }
+
+ $this->page->baseReservationsURL = CURRENT_BASE_URL.'index.php?catid='.$this->config->pageid->reservations;
+ $this->page->commonPublicURL = COMMON_APP_BASE.'Public';
+ $this->page->baseMemberURL = $this->config->url->members;
+ $this->page->imageServer = 'http://'.$this->config->image_server.'/'.$this->config->image_user;
+ $this->page->teamSupport = $this->config->option->teams;
+ $this->page->eventManagementAppBasePath = EVENT_MANAGEMENT_APP_BASE;
+
+ // Front-End URLs - If "home_page" is 0 then it's assumed the site uses a custom index file for the front-end
+ if ($this->config->home_page == 0) {
+ $this->page->frontEndSCRIPT = CURRENT_BASE_URL.'index.php';
+ } else {
+ $this->page->frontEndSCRIPT = CURRENT_BASE_URL.'eventManagement-'.$this->config->home_page.'/';
+ }
+
+ }
+
+ /**
+ * Add start of request debug information
+ *
+ * @return void
+ */
+ private function startOfRequestDebug()
+ {
+
+ // If debug enabled, add action to debug data
+ if ($this->config->option->admin_debug && substr($_REQUEST['Action'],0,6) != 'Debug_') {
+ $this->adminDebug .= '<p>
+ <div style="font-size: 2em; color: red; opacity: 0.4;">START OF REQUEST: '.$this->Action.'</div>
+ <p><b>URI: </b>'.$_SERVER['REQUEST_URI'].'</p>
+ ';
+ $this->addDebug('Array', '$_SESSION', print_r($_SESSION,1));
+ $this->addDebug('AdminController', '$blockTab', print_r($blockTab,1));
+ $this->addDebug("Standard Template Data", '', print_r(array(
+ 'baseURL' => $this->page->baseURL,
+ 'baseReservationsURL' => $this->page->baseReservationsURL,
+ 'baseAdminURL' => $this->page->baseAdminURL,
+ 'appAdminURL' => $this->page->appAdminURL,
+ 'commonPublicURL' => $this->page->commonPublicURL,
+ 'baseMemberURL' => $this->page->baseMemberURL,
+ 'imageServer' => $this->page->imageServer,
+ 'teamSupport' =>$this->page->teamSupport,
+ 'MemberUser' => $this->page->MemberUser
+ ),1));
+
+ $this->addDebug('Array', '$_REQUEST', print_r($_REQUEST,1));
+ }
+
+ }
+
+ /**
+ * Perform requested action
+ *
+ * @return void
+ */
+ private function performAction()
+ {
+
+ // Parse action into {general} and {specific}, should be separated by "_"
+ $action_array = explode('_', $this->Action);
+
+ // If the action parsed correctly, build include file name
+ $actionInclude = false;
+ if (count($action_array) == 2) {
+ $actionInclude = EVENT_MANAGEMENT_APP_BASE.'models/admin/actions/'.$action_array[0].'/'.$action_array[1].'.inc';
+ }
+
+ // If the action include file doesn't exist then we have a problem
+ if (!actionInclude || !file_exists($actionInclude)) {
+ echo '
+ ERROR: Invalid action requested.<P>
+ Requested Action: '.$this->Action.'<br>
+ Location: '.$actionInclude.'
+ ';
+ exit;
+ }
+
+ // If debug enabled, add action to be performed to debug data
+ if ($this->config->option->admin_debug && substr($this->Action,0,6) != 'Debug_') {
+ $this->adminDebug .= '
+ <b>Action:</b> '.$this->Action.'<br>
+ <b>Action Include:</b> '.$actionInclude.'<br>
+ ';
+ }
+
+ // Perform the requested action
+ require $actionInclude;
+
+ // If debug enabled, add action result to debug data
+ if ($this->config->option->admin_debug && substr($this->Action,0,6) != 'Debug_') {
+
+ $this->adminDebug .= '
+ <b>Session Data After Processing: '.$_SESSION[GLM_EVENT_SESSION].'</b><br>
+ <pre style="border: 1px solid blue;">'.print_r($_SESSION[GLM_EVENT_SESSION],1).'</pre>
+ <b>Configuration Data:</b> $this->config<br>
+ <pre style="border: 1px solid blue;">'.print_r($this->config->toArray(),1).'</pre>
+ ';
+ }
+
+ }
+
+ /**
+ * Display Output
+ *
+ * @return void
+ */
+ private function displayOutput()
+ {
+
+ // If a template file was provided (isn't if no reponse is needed)
+ if ($this->templateFile != false) {
+
+ // Make any problem reasons available
+ if (count($this->reason) == 0) {
+ $this->page->reason = false;
+ } else {
+ $this->page->reason = $this->bindArrayToObject($this->reason);
+ }
+
+ $this->addDebug('Final Template Data', '', print_r($this->page,1));
+
+ // Output page
+ $this->template->compile($this->interface.'/'.$this->templateFile);
+
+ // Merge compiled template with the $glmPage object.
+ $this->template->outputObject($this->page);
+
+ } elseif ($this->config->option->admin_debug && substr($this->Action,0,6) != 'Debug_') {
+ $this->adminDebug = '
+ <b>***** NO TEMPLATE SUPPLIED FOR OUTPUT FOR THIS REQUEST *****</b><br>
+ '.$this->adminDebug;
+ }
+
+ }
+
+ /**
+ * Convert an array to an object
+ *
+ * This is used to convert db_auto_get_data() output to something that
+ * can be used by HTML_Template_Flexy.
+ *
+ * @param array $array of values to convert
+ *
+ * @return object containing array as sub-objects
+ */
+ function bindArrayToObject($a)
+ {
+ $return = new stdClass();
+
+ if (is_array($a)){
+ foreach ($a as $k => $v) {
+ if (is_array($v) && count($v) > 0) {
+ $return->$k = $this->bindArrayToObject($v);
+ } else {
+ $return->$k = $v;
+ }
+ }
+ return $return;
+ }
+ }
+
+
+ /**
+ * Add information to the debug output
+ *
+ * @param text $title Title of the debug item to add
+ * @param text $value Simple value to display on line with title
+ * @param text $data Optional data to be displayed "pre-formatted" in a box below
+ */
+ function addDebug($title, $value = false, $data = false, $noPreformat = false)
+ {
+
+ static $menuIndex = 1;
+
+ // If debug enabled, add action to action to debug data
+ if ($this->config->option->admin_debug) {
+
+ // Add this debug information
+ $this->adminDebug .= '
+ <br id="debug'.$menuIndex.'"><hr style="color: green;"><br><b>'.$title.':</b> '.$value.'<span style="float: right;"><a href="#debugTitle">Return to Index</a></span><br>
+ ';
+ if ($data != false) {
+ if ($noPreformat) {
+ $this->adminDebug .=
+ '<div style="border: 1px solid blue; background-color: #ececec; padding: .5em;">'.htmlentities(print_r($data,1)).'</div>
+ ';
+ } else {
+ $this->adminDebug .=
+ '<pre style="border: 1px solid blue; background-color: #ececec; padding: .5em; font-size: .75em; line-height: 1em;">'.htmlentities(print_r($data,1)).'</pre>
+ ';
+ }
+ }
+
+ // Also add to debug menu
+ $this->adminDebugMenu .= '<li><a style="text-decoration:none;" href="#debug'.$menuIndex.'"><b>'.$title.':</b> '.$value.'</a></li>';
+
+ // Incriment menu index
+ $menuIndex++;
+
+ }
+
+ }
+
+ /*
+ * Display debug information if enabled
+ *
+ */
+ public function displayDebug()
+ {
+
+ // Output debug information if that's enabled
+ if ($this->adminDebug != '' && substr($this->Action,0,6) != 'Debug_') {
+
+
+ // Add some last information
+ $this->adminDebug .= '
+ <b id="sessionData"><br><hr style="color: green;"><br>Session Data After Processing: '.$_SESSION[GLM_EVENT_SESSION].'</b><span style="float: right;"><a href="#debugTitle">Return to Index</a></span><br>
+ <pre style="border: 1px solid blue; background-color: #ececec; padding: .5em;">'.print_r($_SESSION[GLM_EVENT_SESSION],1).'</pre>
+ <b id="configData"><br><hr style="color: green;"><br>Application Configuration:</b> $this->config<span style="float: right;"><a href="#debugTitle">Return to Index</a></span><br>
+ <pre style="border: 1px solid blue; background-color: #ececec; padding: .5em;">'.print_r($this->config->toArray(),1).'</pre>
+ ';
+
+ // Build debug index
+ $debugIndex = '
+ <h3>Debug Index</h3>
+ <ul>
+ '.$this->adminDebugMenu.'
+ <li><a style="text-decoration:none;" href="#sessionData"><b>Session Data After Processing:</b></a></li>
+ <li><a style="text-decoration:none;" href="#configData"><b>Application Configuration:</b></a></li>
+ </ul>
+ ';
+
+ // Store any debugHTML data we have
+ $fp = fopen(DEBUG_DATA_FILENAME, 'a+');
+ fwrite($fp, $debugIndex.$this->adminDebug);
+ fclose($fp);
+ $this->adminDebug = '';
+
+ // Kick debug window to reload
+ if ($this->Action != 'Index_index' && $this->Action != 'User_login') {
+ echo '<!-- '.$this->Action.'-->
+ <script type="text/javascript">
+ emDebugWindowReloadRequest();
+ </script>
+ ';
+ }
+
+ }
+
+ }
+
+ /**
+ * Get all general search lists - Events, Members, etc
+ *
+ * @return object containing array as sub-objects
+ */
+ function getSearchLists()
+ {
+ // Get full list of events
+ $sql = "SELECT id, name, event_code, active, end_date < 'now' AS expired, team_event
+ FROM eventmgt.event
+ ORDER BY name;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventsList = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // Get full list of members
+ $sql = "SELECT id, name FROM eventmgt.member ORDER BY name;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $membersList = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ while( list($key, $val) = each( $membersList ) ) {
+ $membersList[$key]['name'] = addslashes($val['name']);
+ }
+
+ // Get full list of Teams
+ $sql = "SELECT id, name FROM eventmgt.team ORDER BY name;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $teamsList = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ while( list($key, $val) = each( $teamsList ) ) {
+ $teamsList[$key]['name'] = addslashes($val['name']);
+ }
+
+ $searchLists = array(
+ 'events' => $eventsList,
+ 'teamList' => $teamsList,
+ 'members' => $membersList
+ );
+
+ if ($this->config->option->admin_debug) {
+ $this->adminDebug .= "<h3>EventManagement.php: getSearchLists()</h3><pre>".print_r($searchLists,1)."</pre></p>";
+ }
+
+ return $searchLists;
+ }
+
+ /**
+ * Format a number as money
+ *
+ * @param $value Value to format
+ * @param $option Options that control output
+ * NOPREFIX stops the "$" prefix
+ *
+ * @return none
+ * @access public
+ */
+ private function money($value, $option = "")
+ {
+
+ if ($option == "NOPREFIX")
+ $prefix = "";
+ else
+ $prefix = "$";
+
+ // Do value sanity check
+
+ if (!is_numeric($value))
+ return ($prefix."0.00");
+
+ return ($prefix.number_format($value, 2, ".", ","));
+ }
+
+
+}
+
+// Start Event Management Admin - Pass the site's global application config data
+$eh = new EventManagementAdminIndexController($GLOBALS['applicationConfig'], $GLOBALS['serverConfig'], $GLOBALS['siteConfig']);
+
+// If this is an admin user initial entry or if this is an admin user login
+if (!(defined('SHOW_IN_SITE') && SHOW_IN_SITE)) {
+ exit;
+}
+
+
+
+?>
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Front-End Controller - Ticketing Only Version\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Front End\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: FrontController.php,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+/*\r
+\r
+Custom Index file\r
+ {GLM} is replaced with a template include file that calls the selected template.\r
+\r
+If custom index\r
+\r
+ base_url is /index.phtml - directly calls front-end controller\r
+\r
+ Controller determines action and calls proper include file for that action\r
+ returns selected template file and data\r
+\r
+ Controller\r
+ sets page->template parameter\r
+ calls custom index template\r
+ Template uses page-template parameter to include the target template.\r
+\r
+else\r
+ base_url is specified static page\r
+end\r
+\r
+*/\r
+\r
+/**\r
+ * EventManagementFrontIndexController class\r
+ *\r
+ * Event Management System - Front end main index\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Reservations_Front_End\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: FrontController.php,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+class EventManagementIndexController\r
+{\r
+\r
+ /**\r
+ * Front End Support\r
+ * @var $frontDebug\r
+ * @access public\r
+ */\r
+ public $support = false;\r
+ /**\r
+ * Debug Information\r
+ * @var $frontDebug\r
+ * @access public\r
+ */\r
+ public $frontDebug = '';\r
+ private $frontDebugMenu = '';\r
+ /**\r
+ * Configuration information object\r
+ * @var $ini\r
+ * @access public\r
+ */\r
+ public $config;\r
+ /**\r
+ * Database Object\r
+ * @var $dbh\r
+ * @access public\r
+ */\r
+ public $dbh;\r
+ /**\r
+ * File/Image server adapter\r
+ * @var $isa\r
+ * @var $imageServer\r
+ * @access public\r
+ */\r
+ public $isa;\r
+ public $imageServer;\r
+ /**\r
+ * Reason for any problems that come up\r
+ * @var unknown\r
+ * @access public\r
+ */\r
+ public $reason = array();\r
+ /**\r
+ * Have Cart\r
+ * @var $haveCart\r
+ * @access public\r
+ */\r
+ public $haveCart = false;\r
+ /**\r
+ * Current Action\r
+ * Default is set to SelectConv\r
+ * @var $Action\r
+ * @access public\r
+ */\r
+ public $Action = '';\r
+ /**\r
+ * Template to use for output\r
+ * @var unknown\r
+ * @access public\r
+ */\r
+ public $flexyOptions;\r
+ public $template;\r
+ private $page;\r
+ private $smarty;\r
+ /**\r
+ * User Interface\r
+ * @var unknown\r
+ * @access public\r
+ */\r
+ private $userInterface = false;\r
+ private $interfaceType = false;\r
+ private $userInterfaces = false;\r
+ private $userInterfacesSelectable = false;\r
+ public $memberUser = false;\r
+\r
+ private $resetSession = false;\r
+ /**\r
+ * Constructor\r
+ *\r
+ * @param object $d database connection\r
+ *\r
+ * @return void\r
+ * @access public\r
+ */\r
+ public function __construct($applicationConfig, $serverConfig, $siteConfig)\r
+ {\r
+\r
+ // Save config data and build a common config object\r
+ $this->applicationConfig = $applicationConfig;\r
+ $this->serverConfig = $serverConfig;\r
+ $this->siteConfig = $siteConfig;\r
+ $this->buildIntegratedConfig();\r
+\r
+ // Setup some required defines for this application\r
+ $this->setupDefines();\r
+\r
+ // Create database connection\r
+ $this->dbh = Toolkit_Database::getInstance();\r
+\r
+ // Set debug file name\r
+ if ($this->config->option->front_debug) {\r
+ define('DEBUG_DATA_FILENAME', '/tmp/EventManagement.'.$_SERVER['REMOTE_ADDR'].'.debug.html');\r
+ }\r
+\r
+ // Provide front-end support class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+ $this->support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+\r
+ // start this user session\r
+ $this->startSession();\r
+\r
+ // User interface selection\r
+ $this->userInterfaceSelection();\r
+\r
+ // Setup page and template configurations and add some standard page data\r
+ $this->setupTemplate();\r
+\r
+ // Perform requested action and add this to debug\r
+ $this->performAction();\r
+\r
+ // Display Output\r
+ $this->displayOutput();\r
+\r
+ // Check if we need to clear the session\r
+ if ($this->resetSession) {\r
+ $this->startSession(true);\r
+ }\r
+\r
+ // Output debug information if that's enabled\r
+ $this->displayDebug();\r
+\r
+ // If this is a debug output page then stop here.\r
+ if (substr($this->Action,0,6) == 'Debug_') {\r
+ exit;\r
+ }\r
+\r
+ } // _constructor\r
+\r
+ /**\r
+ * Assemble all required config data into $this->config\r
+ *\r
+ * @return void\r
+ */\r
+ private function buildIntegratedConfig()\r
+ {\r
+\r
+ // Set common apps base location\r
+ define('COMMON_APP_BASE', '/var/www/server/CommonApps/');\r
+\r
+ // Get customer's config for this application and Merge in customer's main application.ini\r
+ $this->config = new Zend_Config_Ini(\r
+ BASE_PATH.'config/applications/EventManagement.ini',\r
+ strtolower($_ENV['GLM_HOST_ID']),\r
+ array('allowModifications' => true)\r
+ );\r
+ $this->config->merge($this->applicationConfig->event_management);\r
+ $this->config->owner = $this->siteConfig->owner;\r
+ $this->config->file_server = $this->serverConfig->file_server;\r
+\r
+ // Set location for this application\r
+ define('EVENT_MANAGEMENT_APP_BASE', COMMON_APP_BASE.$this->config->version.'/');\r
+\r
+ // Get common configuration for this application\r
+ $EMconfig = new Zend_Config_Ini(\r
+ EVENT_MANAGEMENT_APP_BASE.'configs/common.ini',\r
+ strtolower($_ENV['GLM_HOST_ID']),\r
+ array('allowModifications' => true)\r
+ );\r
+ $this->config->merge($EMconfig);\r
+\r
+ }\r
+\r
+ /**\r
+ * Set system defines\r
+ *\r
+ * @return void\r
+ */\r
+ private function setupDefines()\r
+ {\r
+ // Set datestyle string for DB results\r
+ define('DATE_STYLE_STRING', $this->config->misc->datestyle );\r
+\r
+ // Set common apps base location\r
+ define('DATA_ABSTRACT', COMMON_APP_BASE.'CommonAbstracts/'.$this->config->dataAbstractLocation.'/DataAbstract.php');\r
+ define('PDF_ABSTRACT', COMMON_APP_BASE.'CommonAbstracts/'.$this->config->pdfAbstractLocation.'/GlmPdf.php');\r
+ define('IMAGE_SERVER_ABSTRACT', COMMON_APP_BASE.'CommonAbstracts/'.$this->config->imageServerAbstractLocation.'/Server.php');\r
+\r
+ define('GLM_EVENT_SESSION', 'GLM_EVENT_MGT_FRONT');\r
+\r
+ // Also set a defined parameter for access to the File/Image Server\r
+ define('IMAGE_SERVER_PREFIX', $this->config->file_server->secure.$this->config->file_server->owner_id.'/');\r
+\r
+ // Set base script - If there's an application URL defined, use that, otherwise use page ID\r
+ $baseApplicationScript = ($this->config->application_url != '' ?\r
+ CURRENT_BASE_URL.$this->config->application_url.'/?x=1' :\r
+ CURRENT_BASE_URL.'index.php?catid='.$this->config->application_page\r
+ );\r
+ define('BASE_APPLICATION_SCRIPT', $baseApplicationScript);\r
+\r
+ // Set base URL\r
+ $baseApplicationUrl = ($this->config->application_page == 0 ?\r
+ $baseScript :\r
+ CURRENT_BASE_URL.'common/EventManagement/'\r
+ );\r
+ define('BASE_APPLICATION_URL', $baseApplicationUrl);\r
+\r
+ }\r
+\r
+ /**\r
+ * Destroy Event Management Front-end Session\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function destroySession()\r
+ {\r
+ unset($_SESSION[GLM_EVENT_SESSION]);\r
+ return;\r
+ }\r
+\r
+ /**\r
+ * Start Session\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function startSession($force = false)\r
+ {\r
+\r
+ // If we haven't started sessions yet\r
+ if (!isset($_SESSION)) {\r
+ session_start();\r
+ }\r
+\r
+ // Use "session_reset=true" in link to force a reset\r
+ if ($_REQUEST['session_reset'] == 'true') {\r
+ $force = true;\r
+ }\r
+\r
+ // If the session timeout has past then reset session\r
+ if ($_SESSION[GLM_EVENT_SESSION]['timeOut'] < time()) {\r
+\r
+ $force = true;\r
+\r
+ // Only notify the user if the session has timed out in the last hour\r
+ if (time() - $_SESSION[GLM_EVENT_SESSION]['timeOut'] < 60*60 ) {\r
+ $this->reason[] = 'Your user session has timed out due to inactivity and your cart has been cleared.';\r
+ }\r
+\r
+ // If not adding items to cart or starting with sectionSelect, reset Action\r
+ if ($_REQUEST['Action'] != 'Shop_sectionSelect' && $_REQUEST['cart'] != 'add') {\r
+ $this->Action = 'Shop_start';\r
+ }\r
+\r
+ }\r
+\r
+ // If requested or not yet set, create a clean GLM_HOUSING session array\r
+ if ($force || !isset($_SESSION[GLM_EVENT_SESSION])) {\r
+\r
+ // But save interface\r
+ $this->userInterface = $_SESSION[GLM_EVENT_SESSION]['Interface'];\r
+\r
+ // If full reset then clear this also\r
+ if ($force) {\r
+ $this->userInterface = false;\r
+ }\r
+\r
+ // create GLM_HOUSING session with all parameters false\r
+ $_SESSION[GLM_EVENT_SESSION] = array(\r
+ 'SessionID' => md5(($_SERVER["REMOTE_ADDR"].'-'.time())),\r
+ 'PseudoRand' => false,\r
+ 'permitInactive' => $this->permitInactive,\r
+ 'timeOut' => false,\r
+ 'Event' => false,\r
+ 'Member' => false,\r
+ 'Accom' => false,\r
+ 'Inven' => false,\r
+ 'Team' => false,\r
+ 'Booking' => false,\r
+ 'Reservation' => false,\r
+ 'State' => false,\r
+ 'Division' => false,\r
+ 'Contact' => false,\r
+ 'Entrance' => false,\r
+ 'Section' => false,\r
+ 'Performance' => false,\r
+ 'Ticket' => false,\r
+ 'TicketInventory' => false,\r
+ 'Interface' => $this->userInterface,\r
+ 'Search' => false,\r
+ 'Cart' => false,\r
+ 'CartIndex' => 0,\r
+ 'OptServCart' => false,\r
+ 'TicketCart' => false,\r
+ 'ContactInput' => false,\r
+ 'TicketPayments' => false,\r
+ 'AdminUser' => false\r
+ );\r
+\r
+ // Initialze Cart\r
+ $this->clearCart();\r
+\r
+ $this->addDebug("startSession()", 'Session Reset', false);\r
+\r
+ }\r
+\r
+ // Reset session timeout to current time plus timeout length in minutes\r
+ $_SESSION[GLM_EVENT_SESSION]['timeOut'] = strtotime('now +'.$this->config->session_timeout.' minutes');\r
+\r
+ // Now let's check for an admin login user who might have more privileges than a normal front-end user\r
+ if (isset($_REQUEST['adminUserCheck']) && $_REQUEST['adminUserCheck'] != '') {\r
+\r
+/* Temporarily bypassed due to issues with office computer Check Failures.\r
+ // Check admin user ID and check string\r
+ $check = md5($this->config->orderVerificationSecret.$_SERVER['REMOTE_ADDR'].date('m/d/Y'));\r
+ if ($_REQUEST['adminUserCheck'] != $check) {\r
+ echo "Check failure:";\r
+ exit;\r
+ }\r
+*/\r
+\r
+ $_SESSION[GLM_EVENT_SESSION]['AdminUser'] = true;\r
+ }\r
+\r
+ $this->addDebug('startSession()', 'Session timeout at: '.date('r', $_SESSION[GLM_EVENT_SESSION]['timeOut']).' ('.$_SESSION[GLM_EVENT_SESSION]['timeOut'].')');\r
+\r
+\r
+ }\r
+\r
+ /**\r
+ * User Interface selection (template dir)\r
+ *\r
+ * @return void\r
+ */\r
+ private function userInterfaceSelection()\r
+ {\r
+\r
+ // Is there a request for a specific interface\r
+ if (isset($_REQUEST['interface']) &&\r
+ in_array($_REQUEST['interface'], $this->config->front_interface->toArray())\r
+ ) {\r
+ $this->userInterface = $_REQUEST['interface'];\r
+ // Oherwise, do we have an interface selection in the user session?\r
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Interface']) && $_SESSION[GLM_EVENT_SESSION]['Interface'] != '') {\r
+ $this->userInterface = $_SESSION[GLM_EVENT_SESSION]['Interface'];\r
+ // If neither, then use default user interface.\r
+ } else {\r
+ $this->userInterface = $this->config->default_front_interface;\r
+ }\r
+\r
+ // Update session with current user interface\r
+ $_SESSION[GLM_EVENT_SESSION]['Interface'] = $this->userInterface;\r
+\r
+ // Get interface type (flexy or smarty)\r
+ $this->interfaceType = $this->config->front_interface_type->{$this->userInterface};\r
+\r
+ // Provide list of user interfaces to page\r
+ $interfaces = $this->config->front_interface->toArray();\r
+ $userInterfaces = array();\r
+ foreach ($interfaces as $i) {\r
+ $userInterfaces[] = array(\r
+ 'directory' => $i,\r
+ 'name' => $i,\r
+ 'selected' => ($i == $interface)\r
+ );\r
+ }\r
+\r
+ // If there's more than 1 user interface then tell the template to display user interface selection\r
+ $this->userInterfacesSelectable = ($this->config->front_interface->selectable && count($interfaces) > 1);\r
+ $this->userInterfaces = $this->bindArrayToObject($userInterfaces);\r
+\r
+ $this->addDebug("userInterfaceSelection()", $this->userInterface.' (template engine: '.$this->interfaceType.')', false);\r
+\r
+ }\r
+\r
+ /**\r
+ * Set template configuration\r
+ *\r
+ * @return void\r
+ */\r
+ private function setupTemplate()\r
+ {\r
+\r
+ // Test if there is a local templates directory for the Web site\r
+ if (is_dir(BASE_PATH.'admin/EventManagement/templates')) {\r
+ $templatesDir = BASE_PATH.'admin/EventManagement/templates/front/';\r
+ } else {\r
+ // Otherwise use the templates in this app\r
+ $templatesDir = EVENT_MANAGEMENT_APP_BASE.'views/front/';\r
+ }\r
+\r
+ switch ($this->interfaceType) {\r
+\r
+ case 'smarty':\r
+\r
+ // Load Smarty class and create instance\r
+ require(COMMON_APP_BASE.'Smarty/3.1/Smarty.class.php');\r
+ $this->smarty = new Smarty();\r
+\r
+ // Setup required Smarty paths\r
+ $this->smarty->setTemplateDir($templatesDir);\r
+ $this->smarty->setCompileDir(BASE_PATH.'/smarty/templates_c');\r
+ $this->smarty->setCacheDir(BASE_PATH.'/smarty/cache');\r
+ $this->smarty->setConfigDir(BASE_PATH.'/smarty/configs');\r
+\r
+ break;\r
+\r
+ case 'flexy':\r
+ // Setup Template and Page\r
+ $this->flexyOptions = array(\r
+ 'templateDir' => $templatesDir,\r
+ 'compileDir' => BASE_PATH.'/templates/compiled',\r
+ 'forceCompile' => false,\r
+ 'flexyIgnore' => true,\r
+ 'allowPHP' => true,\r
+ 'debug' => false\r
+ );\r
+ $this->template = new HTML_Template_Flexy($this->flexyOptions);\r
+ $this->page = new stdClass();\r
+\r
+ break;\r
+ }\r
+\r
+ // Get misc system configuration data for use below\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/misc.php';\r
+ $Misc = new EventManagementAdminMisc($this->dbh, $this->config);\r
+ $miscConfigDetail = $Misc->getEntry(1);\r
+\r
+ // Get some standard page data\r
+ $this->templateAssign(\r
+ array(\r
+\r
+ 'owner' => $this->bindArrayToObject($this->config->owner->toArray()),\r
+\r
+ 'startScript' => '<script type="text/javascript">'."\n",\r
+ 'baseURL' => CURRENT_BASE_URL,\r
+ 'frontDebug' => $this->config->option->front_debug,\r
+ 'timestamp' => time(),\r
+\r
+ // Text for the top of various pages\r
+ 'introText' => $miscConfigDetail['intro_text'],\r
+ 'sectionText' => $miscConfigDetail['section_text'],\r
+ 'ticketText' => $miscConfigDetail['ticket_text'],\r
+ 'ticketOptText' => $miscConfigDetail['ticket_opt_text'],\r
+ 'cartText' => $miscConfigDetail['cart_text'],\r
+ 'checkoutText' => $miscConfigDetail['checkout_text'],\r
+ 'successText' => $miscConfigDetail['success_text'],\r
+ 'trackingScript' => $miscConfigDetail['tracking'],\r
+\r
+ // Optional checkout fields\r
+ 'opt_field_1_name' => $miscConfigDetail['opt_field_1_name'],\r
+ 'opt_field_2_name' => $miscConfigDetail['opt_field_2_name'],\r
+ 'opt_field_3_name' => $miscConfigDetail['opt_field_3_name'],\r
+\r
+ // SSL Seal scripts\r
+ 'ssl_seal_head_script' => $miscConfigDetail['ssl_seal_head_script'],\r
+ 'ssl_seal_body_script' => $miscConfigDetail['ssl_seal_body_script'],\r
+\r
+ // Need to get rid of these\r
+ 'lt' => '<', // needed to avoid breaking javascript\r
+ 'lte' => '<=',\r
+ 'AmpAmp' => '&&',\r
+\r
+ // If we have an "application_page" URL segment, use that, otherwise use catid number.\r
+ 'baseSCRIPT' => BASE_APPLICATION_SCRIPT,\r
+ 'baseAppURL' => BASE_APPLICATION_URL,\r
+\r
+ 'imageServer' => 'http://'.$this->config->image_server.'/'.$this->config->image_user,\r
+ 'image_style' => $this->bindArrayToObject($this->config->image_style->toArray()),\r
+ 'commonPublicURL' => COMMON_APP_BASE.'Public',\r
+ 'baseMemberURL' => $this->config->url->members,\r
+ 'eventManagementAppBasePath' => EVENT_MANAGEMENT_APP_BASE,\r
+\r
+ // Set configuration items that need to be available to templates\r
+ 'option' => $this->bindArrayToObject($this->config->option->toArray()),\r
+ 'term' => $this->bindArrayToObject($this->config->term->toArray()),\r
+ 'text' => $this->bindArrayToObject($this->config->text->toArray()),\r
+ 'fileServer' => $this->bindArrayToObject($this->config->file_server->toArray()),\r
+\r
+ // Add user interface(s) settings\r
+ 'userInterface' => $this->userInterface,\r
+ 'userInterfacesSelectable' => $this->userInterfacesSelectable,\r
+ 'userInterfaces' => $userInterfaces,\r
+\r
+ 'jQueryLoaded' => $this->config->jQueryLoaded,\r
+ 'jQueryUiLoaded' => $this->config->jQueryUiLoaded,\r
+ 'siteHasFoundation' => $this->config->site_has_foundation,\r
+\r
+ // If there's a custom front-end, then enable custom features\r
+ 'customFeatures' => ($this->config->custom_prefix != '' ?\r
+ true :\r
+ false\r
+ ),\r
+ 'startURL' => ($this->config->custom_prefix != '' ?\r
+ $miscConfigDetail['return_url'] :\r
+ CURRENT_BASE_URL.'eventManagement-'.$this->config->application_page.'/'\r
+ ),\r
+ 'adminUser' => $_SESSION[GLM_EVENT_SESSION]['AdminUser']\r
+\r
+ )\r
+\r
+ ); // templateAssign()\r
+\r
+ }\r
+\r
+ /**\r
+ * Perform requested action\r
+ *\r
+ * @return void\r
+ */\r
+ private function performAction()\r
+ {\r
+\r
+ $actionInclude = false;\r
+\r
+ // Check for print vouchers and force action\r
+ if (isset($_REQUEST['Action']) && $_REQUEST['Action'] == 'Shop_printVoucher') {\r
+ $this->Action = 'Shop_printVoucher';\r
+ }\r
+\r
+ // Get requested action - Try both GET and POST\r
+ if ($this->Action == '' &&\r
+ !($this->Action = filter_input(INPUT_GET, 'Action', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH)) &&\r
+ !($this->Action = filter_input(INPUT_POST, 'Action', FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH))\r
+ ) {\r
+ // No Action provided, so doing default\r
+ $this->Action = 'Shop_start';\r
+ }\r
+\r
+ // If debug enabled, and this is not the debug display page, add Session Data, Template Data, and REQUEST to debug\r
+ if ($this->config->option->front_debug && substr($_REQUEST['Action'],0,6) != 'Debug_') {\r
+\r
+ $this->frontDebug .= '<p>\r
+ <div>Request: <span style="font-size: 1.2em; color: red; opacity: 0.4;">'.$this->Action.'</span></div>\r
+ <p><b>URI: </b>'.$_SERVER['REQUEST_URI'].'</p>\r
+ ';\r
+\r
+ $this->page->commonPublicURL = COMMON_APP_BASE.'Public';\r
+ $this->page->baseMemberURL = $this->config->url->members;\r
+ $this->page->imageServer = 'http://'.$this->config->image_server.'/'.$this->config->image_user;\r
+\r
+ $this->addDebug('Session Data', '$_SESSION', print_r($_SESSION,1));\r
+ $this->addDebug('Request Parameters', '$_REQUEST', print_r($_REQUEST,1));\r
+ }\r
+\r
+ // Parse action into {general} and {specific}, should be separated by "_"\r
+ $action_array = explode('_', $this->Action);\r
+\r
+ // If the action parsed correctly, build include file name\r
+ if (count($action_array) == 2) {\r
+ $actionInclude = EVENT_MANAGEMENT_APP_BASE.'models/front/actions/'.$action_array[0].'/'.$action_array[1].'.inc';\r
+ }\r
+\r
+ // If the action include file doesn't exist then we have a problem\r
+ if (!actionInclude || !file_exists($actionInclude)) {\r
+ echo '\r
+ ERROR: Invalid action requested.<P>\r
+ Requested Action: '.$this->Action.'\r
+ ';\r
+ exit;\r
+ }\r
+\r
+ // If debug enabled, add action to debug data\r
+ if ($this->config->option->front_debug && substr($this->Action,0,6) != 'Debug_') {\r
+ $this->frontDebug .= '\r
+ <b>Action:</b> '.$this->Action.'<br>\r
+ <b>Action Include:</b> '.$actionInclude.'<br>\r
+ ';\r
+ }\r
+\r
+ require $actionInclude;\r
+\r
+ // If debug enabled, produce debug output of all template parameters\r
+ if ($this->config->option->front_debug && substr($this->Action,0,6) != 'Debug_') {\r
+\r
+ switch ($this->interfaceType) {\r
+ case 'smarty':\r
+ $vars = $this->smarty->getTemplateVars();\r
+ $varsType = 'Smarty Template';\r
+ break;\r
+ case 'flexy':\r
+ $vars = $this->page;\r
+ $varsType = 'Flexy Template';\r
+ break;\r
+ }\r
+\r
+ $this->addDebug("Final Template Data", '', $varsType.':<p>'.htmlentities(print_r($vars,1)));\r
+\r
+ }\r
+\r
+ }\r
+\r
+ /**\r
+ * Display Output\r
+ *\r
+ * @return void\r
+ */\r
+ private function displayOutput()\r
+ {\r
+\r
+ // If a template file was provided (isn't if no reponse is needed)\r
+ if ($this->templateFile != false) {\r
+\r
+ // Make any problem reasons available\r
+ if (count($this->reason) == 0) {\r
+ $this->page->reason = false;\r
+ } else {\r
+ // Make sure there's no duplicate error messages\r
+ $this->page->reason = $this->bindArrayToObject(array_unique($this->reason));\r
+ $this->addDebug("Controller", 'Array: $this->reason', print_r($this->reason,1));\r
+ }\r
+\r
+ // If there's custom css, then point to that\r
+ $this->page->customCssFile = false;\r
+ if ($this->config->custom_css && file_exists(BASE_PATH.'css/EventManagement.css')) {\r
+ $this->page->customCssFile = CURRENT_BASE_URL.'css/EventManagement.css';\r
+ }\r
+\r
+ // Output page\r
+ switch ($this->interfaceType) {\r
+ case 'smarty':\r
+ $this->smarty->display($this->userInterface.'/'.$this->templateFile);\r
+ break;\r
+ case 'flexy':\r
+ $this->template->compile($this->userInterface.'/'.$this->templateFile);\r
+ $this->template->outputObject($this->page);\r
+ break;\r
+ }\r
+\r
+ } elseif ($this->config->option->front_debug && substr($this->Action,0,6) != 'Debug_') {\r
+ $this->frontDebug = '\r
+ <b>***** NO TEMPLATE SUPPLIED FOR OUTPUT FOR THIS REQUEST *****</b><br>\r
+ '.$this->frontDebug;\r
+ }\r
+\r
+ $this->addDebug("displayOutput()", 'Template Selected - '.$this->templateFile, false);\r
+ }\r
+\r
+ /**\r
+ * Clear cart in session\r
+ *\r
+ * @return none\r
+ * @access public\r
+ */\r
+ function clearCart()\r
+ {\r
+ $_SESSION[GLM_EVENT_SESSION]['Cart'] = array();\r
+ $_SESSION[GLM_EVENT_SESSION]['OptServCart'] = array();\r
+\r
+ $this->haveCart = false;\r
+ }\r
+\r
+ /**\r
+ * Convert an array to an object\r
+ *\r
+ * This is used to convert associative array data to something that\r
+ * can be used by HTML_Template_Flexy.\r
+ *\r
+ * @param array $array of values to convert\r
+ *\r
+ * @return object containing sub-objects\r
+ */\r
+ function bindArrayToObject($a)\r
+ {\r
+ return json_decode(json_encode($a));\r
+\r
+ /* The above should work, but leaving this just in case.\r
+\r
+ $return = new stdClass();\r
+\r
+ if (is_array($a)){\r
+ foreach ($a as $k => $v) {\r
+ if (is_array($v) && count($v) > 0) {\r
+ $return->$k = $this->bindArrayToObject($v);\r
+ } else {\r
+ $return->$k = $v;\r
+ }\r
+ }\r
+ return $return;\r
+ }\r
+\r
+ */\r
+ }\r
+\r
+\r
+ /*\r
+ * Add information to the debug output\r
+ *\r
+ * @param text $title Title of the debug item to add\r
+ * @param text $value Simple value to display on line with title\r
+ * @param text $data Optional data to be displayed "pre-formatted" in a box below\r
+ */\r
+ public function addDebug($title, $value = false, $data = false, $noPreformat = false)\r
+ {\r
+\r
+ static $menuIndex = 1;\r
+\r
+ // If debug enabled, add action to action to debug data\r
+ if ($this->config->option->front_debug) {\r
+\r
+ // Add this debug information\r
+ $this->frontDebug .= '\r
+ <br id="debug'.$menuIndex.'"><hr style="color: green;"><br><b>'.$title.':</b> '\r
+ .$value.'<span style="float: right;"><a href="#debugTitle">Return to Index</a></span><br>\r
+ ';\r
+ if ($data != false) {\r
+ if ($noPreformat) {\r
+ $this->frontDebug .=\r
+ '<div style="border: 1px solid blue; background-color: #ececec; padding: .5em;">'.print_r($data,1).'</div>\r
+ ';\r
+ } else {\r
+ $this->frontDebug .=\r
+ '<pre style="border: 1px solid blue; background-color: #ececec; padding: .5em; font-size: .75em; line-height: 1em;">'.print_r($data,1).'</pre>\r
+ ';\r
+ }\r
+ }\r
+\r
+ // Also add to debug menu\r
+ $this->frontDebugMenu .= '<li><a style="text-decoration:none;" href="#debug'.$menuIndex.'"><b>'.$title.':</b> '.$value.'</a></li>';\r
+\r
+ // Incriment menu index\r
+ $menuIndex++;\r
+\r
+ }\r
+ }\r
+\r
+ /*\r
+ * Display debug information if enabled\r
+ *\r
+ */\r
+ public function displayDebug()\r
+ {\r
+\r
+ if ($this->frontDebug != '' && substr($this->Action,0,6) != 'Debug_') {\r
+\r
+ // Add some last information\r
+ $this->frontDebug .= '\r
+ <b id="sessionData"><br><hr style="color: green;"><br>Session Data After Processing: '.$_SESSION[GLM_EVENT_SESSION].'</b><span style="float: right;"><a href="#debugTitle">Return to Index</a></span><br>\r
+ <pre style="border: 1px solid blue; background-color: #ececec; padding: .5em;">'.print_r($_SESSION[GLM_EVENT_SESSION],1).'</pre>\r
+ <b id="configData"><br><hr style="color: green;"><br>Application Configuration:</b> $this->config<span style="float: right;"><a href="#debugTitle">Return to Index</a></span><br>\r
+ <pre style="border: 1px solid blue; background-color: #ececec; padding: .5em;">'.print_r($this->config->toArray(),1).'</pre>\r
+ ';\r
+\r
+ // Build debug index\r
+ $debugIndex = '\r
+ <h3>Debug Index</h3>\r
+ <ul>\r
+ '.$this->frontDebugMenu.'\r
+ <li><a style="text-decoration:none;" href="#sessionData"><b>Session Data After Processing:</b></a></li>\r
+ <li><a style="text-decoration:none;" href="#configData"><b>Application Configuration:</b></a></li>\r
+ </ul>\r
+ ';\r
+\r
+ // Store any debugHTML data we have\r
+ $fp = fopen(DEBUG_DATA_FILENAME, 'a+');\r
+ fwrite($fp, $debugIndex.$this->frontDebug);\r
+ fclose($fp);\r
+ $this->frontDebug = '';\r
+\r
+ // Kick debug window to reload\r
+ echo '\r
+ <script type="text/javascript">\r
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width='.$this->config->option->front_debug_size.', height=700, left=100, top=25";\r
+ debugWindowFront = window.open("'.BASE_APPLICATION_SCRIPT.'&Action=Debug_update","emDebugWindowFront",disp_setting);\r
+ </script>\r
+ ';\r
+\r
+ }\r
+\r
+ }\r
+\r
+ /*\r
+ * Assign parameters to the template\r
+ *\r
+ * @param array Array of arrays with parameter name, value pairs\r
+ * or\r
+ * @param text parameter name\r
+ * @param {whatever} parameter value\r
+ *\r
+ * @return void\r
+ */\r
+ private function templateAssign($params, $value = false)\r
+ {\r
+\r
+ // If this is a single assignment\r
+ if ($value != false) {\r
+\r
+ switch ($this->interfaceType) {\r
+ case 'smarty':\r
+ $this->smarty->assign($param, $value);\r
+ break;\r
+ case 'flexy':\r
+ $this->page->{$params} = $value;\r
+ break;\r
+ }\r
+\r
+ // Otherwise it's an array of parameter/value pairs\r
+ } else {\r
+\r
+ while (list($key, $value) = each($params)) {\r
+\r
+ switch ($this->interfaceType) {\r
+ case 'smarty':\r
+ $this->smarty->assign($key, $value);\r
+ break;\r
+ case 'flexy':\r
+ $this->page->{$key} = $value;\r
+ break;\r
+ }\r
+\r
+ }\r
+\r
+ }\r
+\r
+ }\r
+\r
+ /**\r
+ * If debug for mail turned on, display E-Mail messages rather than send them\r
+ *\r
+ * @access public\r
+ */\r
+ public function debug_mail( $to, $subject, $message, $headers = '', $parameters = '' )\r
+ {\r
+ if( $this->config->debug->mail )\r
+ {\r
+ $mailDebug = '<p>\r
+ <table border="0">\r
+ <tr><th align="center">MAIL DEBUG</th></tr>\r
+ <tr><td align="left"> <b>Recipient(s):</b> '.$to.'</td></tr>\r
+ <tr><td align="left"> <b>Subject:</b> '.$subject.'</td></tr>\r
+ <tr><td align="left"> <b>Headers:</b><br><pre>'.$headers.'</pre></td></tr>\r
+ <tr><td align="left"> <b>Parameters:</b><br><pre>'.$parameters.'</pre></td></tr>\r
+ <tr><td align="left"> <b>Message Content:</b><br>'.$message.'</td></tr>\r
+ </table>\r
+ <p>\r
+ ';\r
+\r
+ // If front-debug is enabled, display in debug window\r
+ if ($this->config->option->front_debug) {\r
+ $this->addDebug('Email Message', $subject, $mailDebug, true);\r
+ } else {\r
+ // Otherwise display in-line.\r
+ echo $mailDebug;\r
+ }\r
+\r
+ return( true );\r
+ } else {\r
+ return( mail( $to, $subject, $message, $headers, $parameters ) );\r
+ }\r
+ }\r
+\r
+\r
+\r
+\r
+} // EventManagementIndexController\r
+\r
+// Start Event Management Front-End - Pass the site's global application config data\r
+//$eh = new EventManagementIndexController($applicationConfig, $serverConfig);\r
+//exit;\r
+\r
+?>\r
--- /dev/null
+\r
+Updates to database required for current updates\r
--- /dev/null
+CREATE SCHEMA eventmgt;
+
+ALTER SCHEMA eventmgt OWNER TO postgres;
+GRANT ALL ON SCHEMA eventmgt TO nobody;
+
+CREATE TABLE eventmgt.misc
+(
+ id integer,
+ intro_text text,
+ section_text text,
+ ticket_text text,
+ ticket_opt_text text,
+ cart_text text,
+ checkout_text text,
+ success_text text,
+ tracking text,
+ no_payment_reasons text,
+ opt_field_1_name text,
+ opt_field_2_name text,
+ opt_field_3_name text,
+ central_payment smallint
+);
+
+ALTER TABLE eventmgt.misc OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.misc FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.misc FROM postgres;
+GRANT ALL ON TABLE eventmgt.misc TO postgres;
+GRANT ALL ON TABLE eventmgt.misc TO nobody;
+
+INSERT INTO eventmgt.misc
+ (id, intro_text, section_text, ticket_text, ticket_opt_text, cart_text, checkout_text, success_text, central_payment)
+ VALUES
+ (1, 'Intro text', 'Section selection text', 'Ticket selection text', 'Ticket option selection text', 'Cart text', 'Checkout text', 'Checkout success text', 0);
+
+
+CREATE TABLE eventmgt.fees
+(
+id SERIAL,
+affiliation_type smallint,
+owner smallint,
+fee_method smallint,
+room_specific bool,
+name text,
+fee_amount float,
+taxable bool,
+itemize bool,
+event_specific bool,
+event smallint,
+optional_service bool,
+service_quant bool,
+service_max_quant smallint,
+descr text
+);
+
+ALTER TABLE eventmgt.fees OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.fees FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.fees FROM postgres;
+GRANT ALL ON TABLE eventmgt.fees TO postgres;
+GRANT ALL ON TABLE eventmgt.fees TO nobody;
+GRANT ALL ON TABLE eventmgt.fees_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.fees_id_seq TO nobody;
+
+CREATE INDEX fees_id_index ON eventmgt.fees ( id );
+CREATE INDEX fees_owner_index ON eventmgt.fees ( owner );
+
+CREATE TABLE eventmgt.division
+ (
+ id SERIAL,
+ event integer,
+ name text,
+ descr text,
+ notes text
+ );
+
+ALTER TABLE eventmgt.division OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.division FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.division FROM postgres;
+GRANT ALL ON TABLE eventmgt.division TO postgres;
+GRANT ALL ON TABLE eventmgt.division TO nobody;
+GRANT ALL ON TABLE eventmgt.division_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.division_id_seq TO nobody;
+
+CREATE INDEX division_id_index ON eventmgt.division ( id );
+CREATE INDEX division_event_index ON eventmgt.division ( event );
+
+CREATE TABLE eventmgt.state_rep
+ (
+ id SERIAL,
+ event integer,
+ code text,
+ password text,
+ descr text,
+ notes text
+ );
+
+ALTER TABLE eventmgt.state_rep OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.state_rep FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.state_rep FROM postgres;
+GRANT ALL ON TABLE eventmgt.state_rep TO postgres;
+GRANT ALL ON TABLE eventmgt.state_rep TO nobody;
+GRANT ALL ON TABLE eventmgt.state_rep_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.state_rep_id_seq TO nobody;
+
+CREATE INDEX state_rep_id_index ON eventmgt.state_rep ( id );
+CREATE INDEX state_rep_event_index ON eventmgt.state_rep ( event );
+
+
+CREATE TABLE eventmgt.room_block
+ (
+ id SERIAL,
+ event integer,
+ state_rep integer,
+ team integer,
+ member integer,
+ block_name integer
+ );
+
+ALTER TABLE eventmgt.room_block OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.room_block FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.room_block FROM postgres;
+GRANT ALL ON TABLE eventmgt.room_block TO postgres;
+GRANT ALL ON TABLE eventmgt.room_block TO nobody;
+GRANT ALL ON TABLE eventmgt.room_block_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.room_block_id_seq TO nobody;
+
+CREATE INDEX room_block_id_index ON eventmgt.room_block ( id );
+CREATE INDEX room_block_event_index ON eventmgt.room_block ( event );
+CREATE INDEX room_block_state_rep_index ON eventmgt.room_block ( state_rep );
+CREATE INDEX room_block_team_index ON eventmgt.room_block ( team );
+CREATE INDEX room_block_member_index ON eventmgt.room_block ( member );
+
+
+CREATE TABLE eventmgt.room_block_seg
+ (
+ id SERIAL,
+ block integer,
+ event integer,
+ accommodation integer,
+ allocated smallint,
+ available smallint
+ );
+
+ALTER TABLE eventmgt.room_block_seg OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.room_block_seg FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.room_block_seg FROM postgres;
+GRANT ALL ON TABLE eventmgt.room_block_seg TO postgres;
+GRANT ALL ON TABLE eventmgt.room_block_seg TO nobody;
+GRANT ALL ON TABLE eventmgt.room_block_seg_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.room_block_seg_id_seq TO nobody;
+
+CREATE INDEX room_block_seg_id_index ON eventmgt.room_block_seg ( id );
+CREATE INDEX room_block_seg_block_index ON eventmgt.room_block_seg ( block );
+CREATE INDEX room_block_seg_event_index ON eventmgt.room_block_seg ( event );
+CREATE INDEX room_block_seg_accommodation_index ON eventmgt.room_block_seg ( accommodation );
+
+
+CREATE TABLE eventmgt.team
+ (
+ id SERIAL,
+ event integer,
+ division integer,
+ state integer,
+ name text,
+ team_code text,
+ participants smallint,
+ room_block integer,
+ notes text
+ );
+
+ALTER TABLE eventmgt.team OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.team FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.team FROM postgres;
+GRANT ALL ON TABLE eventmgt.team TO postgres;
+GRANT ALL ON TABLE eventmgt.team TO nobody;
+GRANT ALL ON TABLE eventmgt.team_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.team_id_seq TO nobody;
+
+CREATE INDEX team_id_index ON eventmgt.team ( id );
+CREATE INDEX team_code_index ON eventmgt.team ( team_code );
+CREATE INDEX team_event_index ON eventmgt.team ( event );
+
+
+CREATE TABLE eventmgt.team_roster
+ (
+ id SERIAL,
+ team integer,
+ lname text,
+ fname text,
+ pos text,
+ notes text
+ );
+
+ALTER TABLE eventmgt.team_roster OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.team_roster FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.team_roster FROM postgres;
+GRANT ALL ON TABLE eventmgt.team_roster TO postgres;
+GRANT ALL ON TABLE eventmgt.team_roster TO nobody;
+GRANT ALL ON TABLE eventmgt.team_roster_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.team_roster_id_seq TO nobody;
+
+CREATE INDEX team_roster_id_index ON eventmgt.team_roster ( id );
+CREATE INDEX team_roster_team_index ON eventmgt.team_roster ( team );
+
+
+
+CREATE TABLE eventmgt.team_property
+ (
+ id SERIAL,
+ team integer,
+ property integer,
+ event integer,
+ start date,
+ stop date
+ );
+
+ALTER TABLE eventmgt.team_property OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.team_property FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.team_property FROM postgres;
+GRANT ALL ON TABLE eventmgt.team_property TO postgres;
+GRANT ALL ON TABLE eventmgt.team_property TO nobody;
+GRANT ALL ON TABLE eventmgt.team_property_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.team_property_id_seq TO nobody;
+
+CREATE INDEX team_property_id_index ON eventmgt.team_property ( id );
+CREATE INDEX team_property_team_id_index ON eventmgt.team_property ( team );
+CREATE INDEX team_property_property_id_index ON eventmgt.team_property ( property );
+CREATE INDEX team_property_event_id_index ON eventmgt.team_property ( event );
+
+
+CREATE TABLE eventmgt.accommodation
+ (
+ id SERIAL,
+ member integer,
+ name text,
+ title text,
+ category smallint,
+ descr text,
+ image text,
+ quant integer,
+ occupants smallint,
+ maxoccupants smallint,
+ sort smallint
+ );
+
+ALTER TABLE eventmgt.accommodation OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.accommodation FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.accommodation FROM postgres;
+GRANT ALL ON TABLE eventmgt.accommodation TO postgres;
+GRANT ALL ON TABLE eventmgt.accommodation TO nobody;
+GRANT ALL ON TABLE eventmgt.accommodation_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.accommodation_id_seq TO nobody;
+
+CREATE INDEX accommodation_id_index ON eventmgt.accommodation (id);
+CREATE INDEX accommodation_member_index ON eventmgt.accommodation (member);
+
+CREATE TABLE eventmgt.entrance
+ (
+ id SERIAL,
+ member integer,
+ name text,
+ addr1 text,
+ addr2 text,
+ city text,
+ state text,
+ country text,
+ zip text,
+ phone text,
+ lat float,
+ lon float,
+ descr text,
+ image text,
+ color text,
+ notes text,
+ sort smallint
+ );
+
+ALTER TABLE eventmgt.entrance OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.entrance FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.entrance FROM postgres;
+GRANT ALL ON TABLE eventmgt.entrance TO postgres;
+GRANT ALL ON TABLE eventmgt.entrance TO nobody;
+GRANT ALL ON TABLE eventmgt.entrance_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.entrance_id_seq TO nobody;
+
+CREATE INDEX entrance_id_index ON eventmgt.entrance (id);
+CREATE INDEX entrance_member_index ON eventmgt.entrance (member);
+CREATE INDEX entrance_sort_index ON eventmgt.entrance (sort);
+
+CREATE TABLE eventmgt.section
+ (
+ id SERIAL,
+ member integer,
+ name text,
+ descr text,
+ image text,
+ entrance integer,
+ notes text,
+ sort smallint
+ );
+
+ALTER TABLE eventmgt.section OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.section FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.section FROM postgres;
+GRANT ALL ON TABLE eventmgt.section TO postgres;
+GRANT ALL ON TABLE eventmgt.section TO nobody;
+GRANT ALL ON TABLE eventmgt.section_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.section_id_seq TO nobody;
+
+CREATE INDEX section_id_index ON eventmgt.section (id);
+CREATE INDEX section_member_index ON eventmgt.section (member);
+CREATE INDEX section_sort_index ON eventmgt.section (sort);
+
+CREATE TABLE eventmgt.performance
+ (
+ id SERIAL,
+ member smallint,
+ name text,
+ active boolean,
+ admin_only boolean,
+ descr text,
+ short_descr text,
+ start_date date,
+ end_date date,
+ purch_leadtime smallint,
+ image text,
+ policy text,
+ voucher_text text,
+ conf_text text,
+ notes text,
+ promote_in_cart boolean,
+ sort smallint
+ );
+
+ALTER TABLE eventmgt.performance OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.performance FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.performance FROM postgres;
+GRANT ALL ON TABLE eventmgt.performance TO postgres;
+GRANT ALL ON TABLE eventmgt.performance TO nobody;
+GRANT ALL ON TABLE eventmgt.performance_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.performance_id_seq TO nobody;
+
+CREATE INDEX performance_id_index ON eventmgt.performance (id);
+CREATE INDEX performance_member_index ON eventmgt.performance (member);
+CREATE INDEX performance_sort_index ON eventmgt.performance (sort);
+
+CREATE TABLE eventmgt.ticket
+ (
+ id SERIAL,
+ active boolean,
+ admin_only boolean,
+ ticket_type integer,
+ member integer,
+ name text,
+ title text,
+ section smallint,
+ date_specific boolean,
+ days_of_week integer,
+ start_date date,
+ end_date date,
+ time_specific boolean,
+ ticket_time time,
+ unlimited_use boolean,
+ uses smallint,
+ performance smallint,
+ unlimited_quant boolean,
+ quant integer,
+ consignment_type smallint,
+ cart_sticky boolean,
+ show_on_start boolean,
+ price float,
+ descr text,
+ image text,
+ voucher_text text,
+ voucher_type integer,
+ sort smallint
+ );
+
+ALTER TABLE eventmgt.ticket OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.ticket FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.ticket FROM postgres;
+GRANT ALL ON TABLE eventmgt.ticket TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket TO nobody;
+GRANT ALL ON TABLE eventmgt.ticket_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_id_seq TO nobody;
+
+CREATE INDEX ticket_id_index ON eventmgt.ticket (id);
+CREATE INDEX ticket_member_index ON eventmgt.ticket (member);
+CREATE INDEX ticket_section_index ON eventmgt.ticket (section);
+
+CREATE TABLE eventmgt.ticket_package
+ (
+ id SERIAL,
+ package integer,
+ ticket integer,
+ member integer,
+ performance integer,
+ quant integer,
+ sort smallint
+ );
+
+ALTER TABLE eventmgt.ticket_package OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.ticket_package FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.ticket_package FROM postgres;
+GRANT ALL ON TABLE eventmgt.ticket_package TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_package TO nobody;
+GRANT ALL ON TABLE eventmgt.ticket_package_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_package_id_seq TO nobody;
+
+CREATE INDEX ticket_package_id_index ON eventmgt.ticket_package (id);
+CREATE INDEX ticket_package_package_index ON eventmgt.ticket_package (package);
+CREATE INDEX ticket_package_ticket_index ON eventmgt.ticket_package (ticket);
+
+CREATE TABLE eventmgt.member_scans_for
+ (
+ id SERIAL,
+ member integer,
+ scans_for integer
+ );
+
+ALTER TABLE eventmgt.member_scans_for OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.member_scans_for FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.member_scans_for FROM postgres;
+GRANT ALL ON TABLE eventmgt.member_scans_for TO postgres;
+GRANT ALL ON TABLE eventmgt.member_scans_for TO nobody;
+GRANT ALL ON TABLE eventmgt.member_scans_for_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.member_scans_for_id_seq TO nobody;
+
+CREATE INDEX member_scans_for_id_index ON eventmgt.member_scans_for (id);
+CREATE INDEX member_scans_for_member_index ON eventmgt.member_scans_for (member);
+CREATE INDEX member_scans_for_scans_for_index ON eventmgt.member_scans_for (scans_for);
+
+
+CREATE TABLE eventmgt.ticket_inventory
+ (
+ id SERIAL,
+ ticket integer,
+ member integer,
+ quant integer,
+ available integer,
+ sold integer,
+ ticket_date date,
+ ticket_time time,
+ active boolean
+ );
+
+ALTER TABLE eventmgt.ticket_inventory OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.ticket_inventory FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.ticket_inventory FROM postgres;
+GRANT ALL ON TABLE eventmgt.ticket_inventory TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_inventory TO nobody;
+GRANT ALL ON TABLE eventmgt.ticket_inventory_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_inventory_id_seq TO nobody;
+
+CREATE INDEX ticket_inventory_id_index ON eventmgt.ticket_inventory (id);
+CREATE INDEX ticket_inventory_ticket_index ON eventmgt.ticket_inventory (ticket);
+CREATE INDEX ticket_inventory_member_index ON eventmgt.ticket_inventory (member);
+CREATE INDEX ticket_inventory_date_index ON eventmgt.ticket_inventory (ticket_date);
+
+CREATE TABLE eventmgt.ticket_add_on
+ (
+ id SERIAL,
+ ticket integer,
+ name text,
+ descr text,
+ add_on_type integer,
+ max_quant integer,
+ unit_name text,
+ unit_cost float
+ );
+
+ALTER TABLE eventmgt.ticket_add_on OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.ticket_add_on FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.ticket_add_on FROM postgres;
+GRANT ALL ON TABLE eventmgt.ticket_add_on TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_add_on TO nobody;
+GRANT ALL ON TABLE eventmgt.ticket_add_on_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_add_on_id_seq TO nobody;
+
+CREATE INDEX ticket_add_on_id_index ON eventmgt.ticket_add_on (id);
+CREATE INDEX ticket_add_on_ticket_index ON eventmgt.ticket_add_on (ticket);
+
+CREATE TABLE eventmgt.promo_code
+ (
+ id SERIAL,
+ name text,
+ long_name text,
+ descr text,
+ start_date date,
+ end_date date,
+ notes text
+ );
+
+ALTER TABLE eventmgt.promo_code OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.promo_code FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.promo_code FROM postgres;
+GRANT ALL ON TABLE eventmgt.promo_code TO postgres;
+GRANT ALL ON TABLE eventmgt.promo_code TO nobody;
+GRANT ALL ON TABLE eventmgt.promo_code_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.promo_code_id_seq TO nobody;
+
+CREATE INDEX promo_code_id_index ON eventmgt.promo_code (id);
+CREATE INDEX promo_code_start_date_index ON eventmgt.promo_code (start_date);
+CREATE INDEX promo_code_end_date_index ON eventmgt.promo_code (end_date);
+
+CREATE TABLE eventmgt.promo_ticket
+ (
+ id SERIAL,
+ promo integer,
+ ticket integer,
+ promo_type integer,
+ amount float,
+ notes text
+ );
+
+ALTER TABLE eventmgt.promo_ticket OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.promo_ticket FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.promo_ticket FROM postgres;
+GRANT ALL ON TABLE eventmgt.promo_ticket TO postgres;
+GRANT ALL ON TABLE eventmgt.promo_ticket TO nobody;
+GRANT ALL ON TABLE eventmgt.promo_ticket_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.promo_ticket_id_seq TO nobody;
+
+CREATE INDEX promo_ticket_id_index ON eventmgt.promo_ticket (id);
+CREATE INDEX promo_ticket_ticket_index ON eventmgt.promo_ticket (ticket);
+
+CREATE TABLE eventmgt.room_detail
+ (
+ id SERIAL,
+ member integer,
+ accommodation integer,
+ occupants smallint,
+ room_type smallint,
+ bath_type smallint,
+ pullout_beds smallint,
+ single_beds smallint,
+ double_beds smallint,
+ queen_beds smallint,
+ king_beds smallint,
+ tv bool,
+ fridge bool,
+ safe bool,
+ descr text,
+ image text,
+ sort smallint
+ );
+
+ALTER TABLE eventmgt.room_detail OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.room_detail FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.room_detail FROM postgres;
+GRANT ALL ON TABLE eventmgt.room_detail TO postgres;
+GRANT ALL ON TABLE eventmgt.room_detail TO nobody;
+GRANT ALL ON TABLE eventmgt.room_detail_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.room_detail_id_seq TO nobody;
+
+CREATE INDEX room_detail_id_index ON eventmgt.room_detail (id);
+CREATE INDEX room_detail_member_index ON eventmgt.room_detail (member);
+CREATE INDEX room_detail_accom_index ON eventmgt.room_detail (accommodation);
+
+
+CREATE TABLE eventmgt.res_contact
+ (
+ id SERIAL,
+ contact_type int,
+ affiliation int,
+ fname text,
+ lname text,
+ org text,
+ addr1 text,
+ addr2 text,
+ city text,
+ state text,
+ country text,
+ zip text,
+ org_url text,
+ office_phone text,
+ mobile_phone text,
+ alt_phone text,
+ fax text,
+ email text,
+ login_id text,
+ alt_email text,
+ image text,
+ notes text,
+ create_date date,
+ active bool,
+ password text,
+ user_rights int
+ );
+
+ALTER TABLE eventmgt.res_contact OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.res_contact FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.res_contact FROM postgres;
+GRANT ALL ON TABLE eventmgt.res_contact TO postgres;
+GRANT ALL ON TABLE eventmgt.res_contact TO nobody;
+GRANT ALL ON TABLE eventmgt.res_contact_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.res_contact_id_seq TO nobody;
+
+CREATE INDEX res_contact_id_index ON eventmgt.res_contact (id);
+CREATE INDEX res_contact_affiliation_index ON eventmgt.res_contact (affiliation);
+CREATE INDEX res_contact_city_index ON eventmgt.res_contact (city);
+CREATE INDEX res_contact_email_index ON eventmgt.res_contact (email);
+CREATE INDEX res_contact_fname_index ON eventmgt.res_contact (fname);
+CREATE INDEX res_contact_lname_index ON eventmgt.res_contact (lname);
+CREATE INDEX res_contact_zip_index ON eventmgt.res_contact (zip);
+CREATE INDEX res_contact_login_id_index ON eventmgt.res_contact (login_id);
+
+
+CREATE TABLE eventmgt.event
+ (
+ id SERIAL,
+ name text,
+ event_code text,
+ addr1 text,
+ addr2 text,
+ city text,
+ state text,
+ zip text,
+ country text,
+ descr text,
+ event_dates text,
+ active bool,
+ image text,
+ team_event bool,
+ days smallint,
+ start_date date,
+ end_date date,
+ cutoff_date date,
+ req_stay bool,
+ req_stay_arrive date,
+ req_stay_depart date,
+ req_stay_notice text,
+ open_res_date date,
+ conf_hours integer,
+ inven_hold_time integer,
+ sort smallint,
+ lat float,
+ lon float,
+ multiple_rooms bool,
+ max_rooms smallint,
+ cart_text text,
+ res_policy text,
+ can_policy text,
+ pmt_policy text,
+ res_msg text,
+ conf_msg text,
+ reserve_by_code bool,
+ central_payment bool,
+ central_payment_email text,
+ host_property smallint,
+ parking_image text,
+ parking_descr text
+ );
+
+ALTER TABLE eventmgt.event OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.event FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.event FROM postgres;
+GRANT ALL ON TABLE eventmgt.event TO postgres;
+GRANT ALL ON TABLE eventmgt.event TO nobody;
+GRANT ALL ON TABLE eventmgt.event_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.event_id_seq TO nobody;
+
+CREATE INDEX event_id_index ON eventmgt.event ( id );
+CREATE INDEX event_sort_index ON eventmgt.event ( sort );
+
+
+CREATE TABLE eventmgt.event_prop_dist
+ (
+ id SERIAL,
+ event integer,
+ event_lat float,
+ event_lon float,
+ member integer,
+ memb_lat float,
+ memb_lon float,
+ summary text,
+ start_addr text,
+ end_addr text,
+ distance text,
+ duration text
+ );
+
+ALTER TABLE eventmgt.event_prop_dist OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.event_prop_dist FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.event_prop_dist FROM postgres;
+GRANT ALL ON TABLE eventmgt.event_prop_dist TO postgres;
+GRANT ALL ON TABLE eventmgt.event_prop_dist TO nobody;
+GRANT ALL ON TABLE eventmgt.event_prop_dist_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.event_prop_dist_id_seq TO nobody;
+
+CREATE INDEX event_prop_event_index ON eventmgt.event_prop_dist (event);
+CREATE INDEX event_prop_member_index ON eventmgt.event_prop_dist (member);
+
+
+CREATE TABLE eventmgt.inventory
+ (
+ id SERIAL,
+ date date,
+ member integer,
+ accommodation integer,
+ event integer,
+ assigned smallint,
+ available smallint,
+ rate float,
+ add_person float,
+ room_block text,
+ res_policy text,
+ can_policy text,
+ min_nights integer,
+ descr text
+ );
+
+ALTER TABLE eventmgt.inventory OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.inventory FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.inventory FROM postgres;
+GRANT ALL ON TABLE eventmgt.inventory TO postgres;
+GRANT ALL ON TABLE eventmgt.inventory TO nobody;
+GRANT ALL ON TABLE eventmgt.inventory_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.inventory_id_seq TO nobody;
+
+CREATE INDEX inventory_id_index ON eventmgt.inventory ( id );
+CREATE INDEX inventory_date_index ON eventmgt.inventory ( date );
+CREATE INDEX inventory_member_index ON eventmgt.inventory ( member );
+CREATE INDEX inventory_accom_index ON eventmgt.inventory ( accommodation );
+
+
+CREATE TABLE eventmgt.inven_hold
+ (
+ id SERIAL,
+ hold_type integer,
+ inventory integer,
+ quant integer,
+ expire_time timestamp,
+ session_id text
+ );
+
+ALTER TABLE eventmgt.inven_hold OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.inven_hold FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.inven_hold FROM postgres;
+GRANT ALL ON TABLE eventmgt.inven_hold TO postgres;
+GRANT ALL ON TABLE eventmgt.inven_hold TO nobody;
+GRANT ALL ON TABLE eventmgt.inven_hold_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.inven_hold_id_seq TO nobody;
+
+CREATE INDEX inven_hold_inventory_index ON eventmgt.inven_hold (inventory);
+CREATE INDEX inven_hold_session_id_index ON eventmgt.inven_hold (session_id);
+
+
+CREATE TABLE eventmgt.member
+ (
+ id SERIAL,
+ member_type smallint,
+ name text,
+ descr text,
+ addr1 text,
+ addr2 text,
+ city text,
+ state text,
+ zip text,
+ country text,
+ lat float,
+ lon float,
+ active boolean,
+ cards_accepted smallint,
+ payment_gateway smallint,
+ gateway_par1 text,
+ gateway_par2 text,
+ gateway_par3 text,
+ gateway_par4 boolean,
+ gateway_par5 text,
+ paypal boolean,
+ paypal_client_id text,
+ paypal_secret text,
+ paypal_mode smallint,
+ image text,
+ parking_map text,
+ ticket_sec_map text,
+ ticket_spec_req boolean,
+ ticket_policy text,
+ intro_text text,
+ checkout_email text,
+ phone text,
+ email text,
+ proc_email text,
+ proc_email2 text,
+ checkout_notify boolean,
+ check_in time,
+ check_out time,
+ def_res_pol text,
+ def_can_pol text,
+ notes text,
+ amen_1 boolean,
+ amen_2 boolean,
+ amen_3 boolean,
+ amen_4 boolean,
+ amen_5 boolean,
+ amen_6 boolean,
+ amen_7 boolean,
+ amen_8 boolean,
+ amen_9 boolean,
+ amen_10 boolean,
+ def_ticket_pol text,
+ sort integer,
+ checkout_opt_1 text,
+ checkout_opt_2 text,
+ checkout_opt_3 text
+ );
+
+ALTER TABLE eventmgt.member OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.member FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.member FROM postgres;
+GRANT ALL ON TABLE eventmgt.member TO postgres;
+GRANT ALL ON TABLE eventmgt.member TO nobody;
+GRANT ALL ON TABLE eventmgt.member_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.member_id_seq TO nobody;
+
+CREATE INDEX member_id_index ON eventmgt.member ( id );
+
+CREATE TABLE eventmgt.amenities
+ (
+ id SERIAL,
+ affiliation_type smallint,
+ owner smallint,
+ name text,
+ quant int,
+ descr text
+ );
+
+ALTER TABLE eventmgt.amenities OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.amenities FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.amenities FROM postgres;
+GRANT ALL ON TABLE eventmgt.amenities TO postgres;
+GRANT ALL ON TABLE eventmgt.amenities TO nobody;
+GRANT ALL ON TABLE eventmgt.amenities_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.amenities_id_seq TO nobody;
+
+CREATE INDEX amenities_id_index ON eventmgt.amenities ( id );
+CREATE INDEX amenities_owner_index ON eventmgt.amenities ( owner );
+
+
+CREATE TABLE eventmgt.event_prop
+ (
+ id SERIAL,
+ event integer,
+ property integer
+ );
+
+ALTER TABLE eventmgt.event_prop OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.event_prop FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.event_prop FROM postgres;
+GRANT ALL ON TABLE eventmgt.event_prop TO postgres;
+GRANT ALL ON TABLE eventmgt.event_prop TO nobody;
+GRANT ALL ON TABLE eventmgt.event_prop_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.event_prop_id_seq TO nobody;
+
+CREATE INDEX event_prop_event_id_index ON eventmgt.event_prop ( event );
+CREATE INDEX event_prop_property_id_index ON eventmgt.event_prop ( property );
+
+CREATE TABLE eventmgt.reservation
+ (
+ id SERIAL,
+ user_trace_info text,
+ fname text,
+ lname text,
+ org text,
+ team_id smallint,
+ state_rep smallint,
+ addr1 text,
+ addr2 text,
+ city text,
+ state text,
+ zip text,
+ country text,
+ phone text,
+ email text,
+ email_ok bool,
+ date_entered date,
+ arrive_date date,
+ nights smallint,
+ rooms smallint,
+ adults smallint,
+ team smallint,
+ member integer,
+ accommodation int,
+ room_block integer,
+ arrival text,
+ event smallint,
+ event_name text,
+ event_start date,
+ event_end date,
+ payby smallint,
+ cctype text,
+ ccnumber text,
+ expire text,
+ ccname text,
+ cccode text,
+ hotel_price float,
+ taxes float,
+ grand_total float,
+ confirmation smallint,
+ confirmed bool,
+ declined bool,
+ conf_numb text,
+ date_confirmed date,
+ conf_by text,
+ conf_message text,
+ special_needs text,
+ notes text,
+ res_detail text,
+ summary text
+ );
+
+ALTER TABLE eventmgt.reservation OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.reservation FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.reservation FROM postgres;
+GRANT ALL ON TABLE eventmgt.reservation TO postgres;
+GRANT ALL ON TABLE eventmgt.reservation TO nobody;
+GRANT ALL ON TABLE eventmgt.reservation_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.reservation_id_seq TO nobody;
+
+CREATE INDEX reservation_id_index ON eventmgt.reservation ( id );
+CREATE INDEX reservation_lname_index ON eventmgt.reservation ( lname );
+CREATE INDEX reservation_fname_index ON eventmgt.reservation ( fname );
+CREATE INDEX reservation_email_index ON eventmgt.reservation ( email );
+CREATE INDEX reservation_arrive_index ON eventmgt.reservation ( arrive_date );
+
+
+CREATE TABLE eventmgt.ticket_order
+ (
+ id SERIAL,
+ user_trace_info text,
+ active boolean,
+ fname text,
+ lname text,
+ addr1 text,
+ addr2 text,
+ city text,
+ state text,
+ zip text,
+ country text,
+ phone text,
+ email text,
+ email_ok bool,
+ opt_field_1_name text,
+ opt_field_1 text,
+ opt_field_2_name text,
+ opt_field_2 text,
+ opt_field_3_name text,
+ opt_field_3 text,
+ purchase_date date,
+ member integer,
+ cctype text,
+ ccnumber text,
+ expire text,
+ ccname text,
+ ccconf text,
+ charge_total float,
+ special_needs text,
+ notes text,
+ session_id text
+ );
+
+ALTER TABLE eventmgt.ticket_order OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.ticket_order FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.ticket_order FROM postgres;
+GRANT ALL ON TABLE eventmgt.ticket_order TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_order TO nobody;
+GRANT ALL ON TABLE eventmgt.ticket_order_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_order_id_seq TO nobody;
+
+CREATE INDEX ticket_order_id_index ON eventmgt.ticket_order ( id );
+CREATE INDEX ticket_order_lname_index ON eventmgt.ticket_order ( lname );
+CREATE INDEX ticket_order_fname_index ON eventmgt.ticket_order ( fname );
+CREATE INDEX ticket_order_email_index ON eventmgt.ticket_order ( email );
+CREATE INDEX ticket_order_purchase_date_index ON eventmgt.ticket_order ( purchase_date );
+CREATE INDEX ticket_order_member_index ON eventmgt.ticket_order ( member );
+CREATE INDEX ticket_order_session_id_index ON eventmgt.ticket_order ( session_id );
+
+
+CREATE TABLE eventmgt.ticket_sold
+ (
+ id SERIAL,
+ ticket_order integer,
+ member integer,
+ member_name text,
+ assigned boolean,
+ assigned_from integer,
+ assigned_from_name text,
+ performance smallint,
+ performance_name text,
+ entrance smallint,
+ entrance_name text,
+ entrance_color text,
+ section smallint,
+ section_name text,
+ ticket integer,
+ ticket_name text,
+ is_package boolean,
+ package_sold_id text,
+ ticket_package integer,
+ package_name text,
+ date_specific boolean,
+ ticket_date date,
+ time_specific boolean,
+ ticket_time time,
+ start_date date,
+ end_date date,
+ likely_date date,
+ price_paid float,
+ policies text,
+ unlimited_use boolean,
+ numb_uses smallint,
+ numb_claimed smallint,
+ time_claimed timestamp,
+ voucher_type smallint,
+ voucher_text text,
+ session_id text
+ );
+
+ALTER TABLE eventmgt.ticket_sold OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.ticket_sold FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.ticket_sold FROM postgres;
+GRANT ALL ON TABLE eventmgt.ticket_sold TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_sold TO nobody;
+GRANT ALL ON TABLE eventmgt.ticket_sold_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_sold_id_seq TO nobody;
+
+CREATE INDEX ticket_sold_id_index ON eventmgt.ticket_sold ( id );
+CREATE INDEX ticket_sold_ticket_order_index ON eventmgt.ticket_sold ( ticket_order );
+CREATE INDEX ticket_sold_member_index ON eventmgt.ticket_sold ( member );
+CREATE INDEX ticket_sold_assigned_from_index ON eventmgt.ticket_sold ( assigned_from );
+CREATE INDEX ticket_sold_performance_index ON eventmgt.ticket_sold ( performance );
+CREATE INDEX ticket_sold_ticket_index ON eventmgt.ticket_sold ( ticket );
+CREATE INDEX ticket_sold_ticket_date_index ON eventmgt.ticket_sold ( ticket_date );
+CREATE INDEX ticket_sold_likely_date_index ON eventmgt.ticket_sold ( likely_date );
+CREATE INDEX ticket_sold_time_claimed_index ON eventmgt.ticket_sold ( time_claimed );
+CREATE INDEX ticket_sold_session_id_index ON eventmgt.ticket_sold ( session_id );
+CREATE INDEX ticket_sold_package_sold_id_index ON eventmgt.ticket_sold ( package_sold_id );
+CREATE INDEX ticket_sold_ticket_package_index ON eventmgt.ticket_sold ( ticket_package );
+
+CREATE TABLE eventmgt.add_on_sold
+ (
+ id SERIAL,
+ ticket_order integer,
+ ticket_sold integer,
+ add_on_name text,
+ add_on_type integer,
+ add_on_type_name text,
+ unit_name text,
+ unit_price float,
+ quant integer,
+ price_paid float,
+ session_id text
+ );
+
+ALTER TABLE eventmgt.add_on_sold OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.add_on_sold FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.add_on_sold FROM postgres;
+GRANT ALL ON TABLE eventmgt.add_on_sold TO postgres;
+GRANT ALL ON TABLE eventmgt.add_on_sold TO nobody;
+GRANT ALL ON TABLE eventmgt.add_on_sold_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.add_on_sold_id_seq TO nobody;
+
+CREATE INDEX add_on_sold_id_index ON eventmgt.add_on_sold ( id );
+CREATE INDEX add_on_sold_ticket_order_index ON eventmgt.add_on_sold ( ticket_order );
+CREATE INDEX add_on_sold_ticket_sold_index ON eventmgt.add_on_sold ( ticket_sold );
+CREATE INDEX add_on_sold_session_id_index ON eventmgt.add_on_sold ( session_id );
+
+CREATE TABLE eventmgt.promo_sold
+ (
+ id SERIAL,
+ ticket_order integer,
+ ticket_sold integer,
+ promo integer,
+ promo_name text,
+ promo_type integer,
+ promo_type_name text,
+ amount float,
+ session_id text
+ );
+
+ALTER TABLE eventmgt.promo_sold OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.promo_sold FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.promo_sold FROM postgres;
+GRANT ALL ON TABLE eventmgt.promo_sold TO postgres;
+GRANT ALL ON TABLE eventmgt.promo_sold TO nobody;
+GRANT ALL ON TABLE eventmgt.promo_sold_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.promo_sold_id_seq TO nobody;
+
+CREATE INDEX promo_sold_id_index ON eventmgt.promo_sold ( id );
+CREATE INDEX promo_sold_ticket_order_index ON eventmgt.promo_sold ( ticket_order );
+CREATE INDEX promo_sold_ticket_sold_index ON eventmgt.promo_sold ( ticket_sold );
+CREATE INDEX promo_sold_promo_index ON eventmgt.promo_sold ( promo );
+CREATE INDEX promo_sold_session_id_index ON eventmgt.promo_sold ( session_id );
+
+
+CREATE TABLE eventmgt.ticket_claim_tracking
+ (
+ id SERIAL,
+ ticket_order integer,
+ ticket_sold integer,
+ time_of_action timestamp,
+ action_type smallint,
+ quant smallint,
+ scan_user integer,
+ scan_name text,
+ attendance smallint,
+ attendee_name text,
+ attendee_notes text
+ );
+
+ALTER TABLE eventmgt.ticket_claim_tracking OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.ticket_claim_tracking FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.ticket_claim_tracking FROM postgres;
+GRANT ALL ON TABLE eventmgt.ticket_claim_tracking TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_claim_tracking TO nobody;
+GRANT ALL ON TABLE eventmgt.ticket_claim_tracking_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.ticket_claim_tracking_id_seq TO nobody;
+
+CREATE INDEX ticket_claim_tracking_id_index ON eventmgt.ticket_claim_tracking ( id );
+CREATE INDEX ticket_claim_tracking_order_index ON eventmgt.ticket_claim_tracking ( ticket_order );
+CREATE INDEX ticket_claim_tracking_sold_index ON eventmgt.ticket_claim_tracking ( ticket_sold );
+CREATE INDEX ticket_claim_tracking_scan_user_index ON eventmgt.ticket_claim_tracking ( scan_user );
+
+
+CREATE TABLE eventmgt.attendance
+ (
+ id SERIAL,
+ member smallint,
+ name text,
+ notes text,
+ attendance_date timestamp,
+ entrance_start_time timestamp,
+ entrance_end_time timestamp,
+ perf_start_time timestamp,
+ perf_end_time timestamp
+ );
+
+ALTER TABLE eventmgt.attendance OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.attendance FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.attendance FROM postgres;
+GRANT ALL ON TABLE eventmgt.attendance TO postgres;
+GRANT ALL ON TABLE eventmgt.attendance TO nobody;
+GRANT ALL ON TABLE eventmgt.attendance_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.attendance_id_seq TO nobody;
+
+CREATE INDEX attendance_id_index ON eventmgt.attendance ( id );
+CREATE INDEX attendance_lmember_index ON eventmgt.attendance ( member );
+CREATE INDEX attendance_performance_index ON eventmgt.attendance ( performance );
+CREATE INDEX attendance_attendance_date_index ON eventmgt.attendance ( attendance_date );
+CREATE INDEX attendance_entrance_start_time_index ON eventmgt.attendance ( entrance_start_time );
+CREATE INDEX attendance_perf_start_time_index ON eventmgt.attendance ( perf_start_time );
+
+
+CREATE TABLE eventmgt.voucher_coupons
+ (
+ id SERIAL,
+ name text,
+ active boolean,
+ display_from timestamp,
+ display_to timestamp,
+ coupon_type smallint,
+ coupon_image text,
+ coupon_position smallint,
+ stretch_to_fit boolean,
+ padding integer,
+ show_border boolean,
+ max_display_count smallint,
+ display_count integer,
+ notes text
+ );
+
+ALTER TABLE eventmgt.voucher_coupons OWNER TO postgres;
+REVOKE ALL ON TABLE eventmgt.voucher_coupons FROM PUBLIC;
+REVOKE ALL ON TABLE eventmgt.voucher_coupons FROM postgres;
+GRANT ALL ON TABLE eventmgt.voucher_coupons TO postgres;
+GRANT ALL ON TABLE eventmgt.voucher_coupons TO nobody;
+GRANT ALL ON TABLE eventmgt.voucher_coupons_id_seq TO postgres;
+GRANT ALL ON TABLE eventmgt.voucher_coupons_id_seq TO nobody;
+
+CREATE INDEX voucher_coupons_id_index ON eventmgt.voucher_coupons ( id );
+CREATE INDEX voucher_coupons_from_index ON eventmgt.voucher_coupons ( display_from );
+CREATE INDEX voucher_coupons_to_index ON eventmgt.voucher_coupons ( display_to );
+
--- /dev/null
+Current Deployment Notes\r
+========================\r
+\r
+\r
+NEW CHANGES\r
+\r
+ DATABASE CHANGES\r
+ ----------------\r
+ \r
+ CREATE TABLE eventmgt.voucher_coupons\r
+ (\r
+ id SERIAL,\r
+ name text,\r
+ active boolean,\r
+ display_from timestamp, \r
+ display_to timestamp,\r
+ coupon_type smallint,\r
+ coupon_image text,\r
+ coupon_position smallint,\r
+ stretch_to_fit boolean,\r
+ padding integer,\r
+ show_border boolean,\r
+ max_display_count smallint,\r
+ display_count integer,\r
+ notes text\r
+ );\r
+ \r
+ ALTER TABLE eventmgt.voucher_coupons OWNER TO postgres;\r
+ REVOKE ALL ON TABLE eventmgt.voucher_coupons FROM PUBLIC;\r
+ REVOKE ALL ON TABLE eventmgt.voucher_coupons FROM postgres;\r
+ GRANT ALL ON TABLE eventmgt.voucher_coupons TO postgres;\r
+ GRANT ALL ON TABLE eventmgt.voucher_coupons TO nobody;\r
+ GRANT ALL ON TABLE eventmgt.voucher_coupons_id_seq TO postgres;\r
+ GRANT ALL ON TABLE eventmgt.voucher_coupons_id_seq TO nobody;\r
+ \r
+ CREATE INDEX voucher_coupons_id_index ON eventmgt.voucher_coupons ( id );\r
+ CREATE INDEX voucher_coupons_from_index ON eventmgt.voucher_coupons ( display_from );\r
+ CREATE INDEX voucher_coupons_to_index ON eventmgt.voucher_coupons ( display_to );\r
+ \r
+ \r
+ \r
+ ALTER TABLE eventmgt.ticket_sold ADD COLUMN package_name text;\r
+ update eventmgt.ticket_sold set package_name = '';\r
+ ALTER TABLE eventmgt.ticket_sold ADD COLUMN is_package boolean;\r
+ update eventmgt.ticket_sold SET is_package = false;\r
+\r
+ ALTER TABLE eventmgt.ticket_sold ADD COLUMN package_sold_id text;\r
+ \r
+ CREATE INDEX ticket_sold_package_sold_id_index ON eventmgt.ticket_sold ( package_sold_id );\r
+ CREATE INDEX ticket_sold_ticket_package_index ON eventmgt.ticket_sold ( ticket_package ); \r
+\r
+ CREATE TABLE eventmgt.attendance\r
+ (\r
+ id SERIAL,\r
+ member smallint,\r
+ name text,\r
+ notes text,\r
+ attendance_date timestamp, \r
+ entrance_start_time timestamp,\r
+ entrance_end_time timestamp,\r
+ perf_start_time timestamp,\r
+ perf_end_time timestamp\r
+ );\r
+ \r
+ ALTER TABLE eventmgt.attendance OWNER TO postgres;\r
+ REVOKE ALL ON TABLE eventmgt.attendance FROM PUBLIC;\r
+ REVOKE ALL ON TABLE eventmgt.attendance FROM postgres;\r
+ GRANT ALL ON TABLE eventmgt.attendance TO postgres;\r
+ GRANT ALL ON TABLE eventmgt.attendance TO nobody;\r
+ GRANT ALL ON TABLE eventmgt.attendance_id_seq TO postgres;\r
+ GRANT ALL ON TABLE eventmgt.attendance_id_seq TO nobody;\r
+ \r
+ CREATE INDEX attendance_id_index ON eventmgt.attendance ( id );\r
+ CREATE INDEX attendance_lmember_index ON eventmgt.attendance ( member );\r
+ CREATE INDEX attendance_attendance_date_index ON eventmgt.attendance ( attendance_date );\r
+ CREATE INDEX attendance_entrance_start_time_index ON eventmgt.attendance ( entrance_start_time );\r
+ CREATE INDEX attendance_perf_start_time_index ON eventmgt.attendance ( perf_start_time );\r
+\r
+ ALTER TABLE eventmgt.ticket_claim_tracking ADD COLUMN attendance smallint;\r
+ ALTER TABLE eventmgt.ticket_claim_tracking ADD COLUMN attendee_name text;\r
+ ALTER TABLE eventmgt.ticket_claim_tracking ADD COLUMN attendee_notes text;\r
+ CREATE INDEX ticket_claim_tracking_attendance_index ON eventmgt.ticket_claim_tracking ( attendance );\r
+ UPDATE eventmgt.ticket_claim_tracking SET attendance = 0, attendee_name = '', attendee_notes = '';\r
+ \r
+ CREATE TABLE eventmgt.member_scans_for\r
+ (\r
+ id SERIAL,\r
+ member integer,\r
+ scans_for integer \r
+ );\r
+\r
+ ALTER TABLE eventmgt.member_scans_for OWNER TO postgres;\r
+ REVOKE ALL ON TABLE eventmgt.member_scans_for FROM PUBLIC;\r
+ REVOKE ALL ON TABLE eventmgt.member_scans_for FROM postgres;\r
+ GRANT ALL ON TABLE eventmgt.member_scans_for TO postgres;\r
+ GRANT ALL ON TABLE eventmgt.member_scans_for TO nobody;\r
+ GRANT ALL ON TABLE eventmgt.member_scans_for_id_seq TO postgres;\r
+ GRANT ALL ON TABLE eventmgt.member_scans_for_id_seq TO nobody;\r
+ \r
+ CREATE INDEX member_scans_for_id_index ON eventmgt.member_scans_for (id);\r
+ CREATE INDEX member_scans_for_member_index ON eventmgt.member_scans_for (member);\r
+ CREATE INDEX member_scans_for_scans_for_index ON eventmgt.member_scans_for (scans_for);\r
+ \r
+ \r
+ \r
+ \r
+ CONFIG CHANGES\r
+ --------------\r
+ \r
+ ; Terms used to refer to an attendance\r
+ term.attendance.norm = "attendance"\r
+ term.attendance.cap = "Attendance"\r
+ term.attendance.plur = "attendance"\r
+ term.attendance.plur_cap = "Attendance"\r
+ \r
+ ; Terms used to refer to an attendee\r
+ term.attendee.norm = "attendee"\r
+ term.attendee.cap = "Attendee"\r
+ term.attendee.plur = "attendees"\r
+ term.attendee.plur_cap = "Attendees"\r
+ \r
+ ; Terms used to refer to an attendance log\r
+ term.attendance_log.norm = "attendance log"\r
+ term.attendance_log.cap = "Attendance Log"\r
+ term.attendance_log.plur = "attendance logs"\r
+ term.attendance_log.plur_cap = "Attendance Logs"\r
+\r
+ ; Terms used to refer to entering (attendance)\r
+ term.attendance_entering.norm = "entering"\r
+ term.attendance_entering.cap = "Entering"\r
+ term.attendance_entering.plur = "entering"\r
+ term.attendance_entering.plur_cap = "Entering"\r
+\r
+ ; Terms used to refer to Coupons (advertisements) for vouchers\r
+ term.coupon.norm = "voucher coupon"\r
+ term.coupon.cap = "Voucher Coupon"\r
+ term.coupon.plur = "voucher coupons"\r
+ term.coupon.plur_cap = "Voucher Coupons"\r
+\r
+\r
+\r
+------------END OF NEW CHANGES NOTES------------------------------------\r
+\r
+Mackinaw Lakeshore Development (Mackinaw City)\r
+Username: hydrojet955\r
+Password: Mc33BoAt\r
+Current API Login ID: 6AkBG3xJ7HB\r
+Current Transaction Key: 6tJ5BxaB4X4f37JE\r
+\r
+Star Line Mackinac Island Passenger Service Inc. (St Ignace)\r
+Username: hydrojet956\r
+Password: Mc34BoAt\r
+Current API Login ID: 3Wazxf7G5u97\r
+Current Transaction Key: 3TW7f7Z28p5m4x9Y\r
+\r
+\r
+Database Update Notes\r
+---------------------\r
+\r
+\r
+\r
+Temporary Notes from Notepad\r
+----------------------------\r
+\r
+Jodie Things and other thing I've noticed\r
+\r
+* Include contact permission options to enable access to all locations data \r
+\r
+* Fix problems with Likely date not being validated\r
+ DONE\r
+\r
+* Check on correct "From:" E-Mail address for confirmation messages.\r
+\r
+* Agree to policies on checkout page not staying as what was selected when checkout fails.\r
+\r
+* Session ID or something not going to Authorize.net for use as an order ID.\r
+\r
+* Inventory may not be being created when a ticket is created.\r
+\r
+Longer term Jodie Things\r
+\r
+* One credit card checkout form\r
+\r
+* Need to consider limits on report results.\r
+\r
+To do\r
+\r
+* Can't use Add-ons for children in sunset cruises\r
+\r
+* Promo Codes not working on checkout - Check again\r
+ DONE\r
+\r
+* Make sure promo codes respect time ranges\r
+ DONE\r
+\r
+* Add "Code Recognized" indication to cart\r
+\r
+* Check if we should be storing ID of Add-on in add_on_sold table.\r
+\r
+* Make Checkout Results look like current checkout page for tables.\r
+ DONE\r
+\r
+* make likely date = ticket date if fixed date\r
+\r
+* may be issue with selection on "Ticket Select" page (cruises) when there's unlimited quantity and the underlying quant field is 0 or null.\r
+\r
+* Flag to permit voucher scanning by contact from any location\r
+\r
+* Ticket claim tracking\r
+\r
+* Check if login user can check/claim tickets at all locations - May need to make this a configuration option per customer.\r
+ Use option to suppress location name at top of page.\r
+\r
+\r
+\r
+Done\r
+\r
+* checkout now storing add-ons correctly\r
+\r
+* Vouchers now showing add-ons correctly\r
+\r
+* Sticky items showing up when category is active = false\r
+\r
+\r
+\r
+\r
+\r
+Current modifications to complete for Star Line\r
+-----------------------------------------------\r
+\r
+QUESTIONS\r
+\r
+ Are the dates on promo codes the date of purchase or the date of use? \r
+ ANSWER: Date of sale.\r
+\r
+Vouchers:\r
+\r
+ * Specified color per dock for voucher and for display when scanning vouchers. \r
+ Not always displaying correctly - Check\r
+ DONE - If not an assignment, the Section must specify an entrance and entrance must have color.\r
+\r
+ * 90 deg Rotated text not displaying in the correct position and moves as text changes.\r
+ DONE - Needed to use "left" for $align in glmpdfPlaceText() then "position=center" in the optlist.\r
+ \r
+ * Summary of items purchased and totals on voucher cover page\r
+ DONE \r
+\r
+ * Policies per location for display on cover sheet of voucher.\r
+ DONE\r
+ \r
+ * Simple (limited) text per category (performance) for display on bottom of voucher.\r
+ DONE\r
+ \r
+ * Provide for blocking of printing Voucher Barcode if card will be printed and mailed. Note on voucher.\r
+ DONE - NEED TO TEST WITH PURCHASE\r
+ \r
+ * Properly show add-ons\r
+ DONE\r
+\r
+Voucher related functionality:\r
+\r
+ * Ability to show just barcode for a specific voucher for possible scanning from a phone.\r
+ NOT DOING AT THIS TIME\r
+\r
+ * Ability of customers to enter a voucher number (and check code) to view order and re-print vouchers and display barcode for phone scanning.\r
+ NOT DOING AT THIS TIME\r
+ \r
+ * Check on auto-scaling image on Voucher\r
+\r
+ * Check fonts on Dev53 used by Vouchers\r
+\r
+Front-End General:\r
+\r
+ * Removed number of "uses" from display on Front-end. Relying on descriptions to say how the tickets will be used.\r
+ DONE\r
+ \r
+ * Fixed improper reference to ticket.ticket_name when should have been ticket.ticket_title for use on front-end.\r
+ DONE\r
+ \r
+ * Test in Chrome and other browsers\r
+ \r
+ * Test in mobile widths\r
+ \r
+ * Check sort order of all output\r
+ DONE - for everything we're showing for Star Line\r
+ \r
+ * Make sure that all available data can be displayed. (descriptions, images, etc). Set configurable options (in config/applications/EventManagement.ini) to turn those on/off.\r
+ DONE\r
+ \r
+ * Sale of "group" tickets, like 2 Adults and 2 Children, should be on one voucher (which they are now). Need to confirm with Star Line. \r
+ DONE - Must be this way as they are group tickets.\r
+ \r
+ * Look for "Check if we're receiving an array of new additions" in front/classes/support.php and check on this.\r
+ \r
+ * Make sure add-ons work on ticketSelect page.\r
+ \r
+ * Check that all new information is passed all the way through to orders\r
+\r
+Cart Page:\r
+\r
+ * Check on ordering of categories. They don't seem to follow the sort order field in the database.\r
+ DONE\r
+ \r
+ * Have "nights" selection for valet parking display right away when user selects quantity for valet parking.\r
+ DONE - Decided to show it all the time for now.\r
+ \r
+ * Have resubmit updates try to return to the same page scroll position.\r
+ DONE\r
+ \r
+ * Check on not showing Dock selection or likely departure date unless they're needed. This is interfering with ordering things that don't need them.\r
+ DONE\r
+ \r
+ * Consider adding a notice overlay when the first thing is selected that needs dock and date selection to instruct user that they need to enter that information.\r
+ \r
+ * Remove the "reprint a previous order" thing from the top of the page.\r
+ DONE\r
+ \r
+ * Added short descriptions to Categories. In cart use short description instead of normal when less than 600 wide.\r
+ DONE \r
+ \r
+Checkout page:\r
+\r
+ * Make checkout page items lists look like Cart page\r
+ DONE - But might need to check what's store\r
+ \r
+ * Make checkout prompt fields configurable in customer config file.\r
+ DONE\r
+ \r
+ * Add a few optional/configurable text fields for checkout\r
+ DONE\r
+ \r
+ * Fixed Special Requests field showing when not requested\r
+ DONE\r
+ \r
+ * Fixed improper reference to ticket.ticket_name when should have been ticket.ticket_title for use on front-end.\r
+ DONE\r
+ \r
+ * Fixed missing info for ticket orders.\r
+ DONE\r
+ \r
+ * Check storage of promotions with purchase\r
+ \r
+ * Check storage of Add-Ons with purchase\r
+ DONE\r
+ \r
+Admin:\r
+\r
+ * Admin Login and improved colored claim scan results indications\r
+ DONE\r
+\r
+ * Test in Chrome and other browsers\r
+\r
+ * See if can do better with consignment type text - less confusing\r
+ DONE - Might want to move text for these things to customer config\r
+\r
+ * Add time override to inventory - Default to that set in the ticket\r
+ Added to inventory edit\r
+ Need to use that time throughout the rest of admin and front-end\r
+ SUSPENDED FOR NOW\r
+\r
+ * Fix issues with small and large list switching and alignment of columns when selecting large/small or resizing window.\r
+ DONE\r
+ \r
+ * Redisplay lists when something is added deleted or edited.\r
+ Need to add feature to know where the list is so it can be updated.\r
+ Working on this....\r
+ \r
+ * Low-level front-end admin access.\r
+ DONE\r
+\r
+ * Background color on scan of voucher to show Pass/No Pass status. \r
+ DONE\r
+ \r
+ * Inventory calendars not showing all dates at times\r
+ \r
+ * Add link from a performance to permit purchasing from admin even if performance or ticket is not active. \r
+ Added flag to ticket to permit active boolean, but need to Respect in front-end. \r
+ \r
+ * Add any needed reporting for promotions\r
+ \r
+ * Add any needed reporting for Add-Ons\r
+\r
+ * Consider copying default ticket time into inventory so that a specific inventory item can have the time of the event adjusted. \r
+ Only do this if there's time available for the change.\r
+ \r
+ * Consider adding a "Category" parameter to performances to permit categorizing performances. (This would mean changing how we use these terms for Star Line.)\r
+\r
+Not-categorized:\r
+\r
+* May need to consider non-date-related items such as purchased physical items (books, etc) - Don't show likely departure date in cart for these.\r
+\r
+* Consider adding year/season to all ticket data and establishing a "seasonal" option that lets admin select a year/season to work with.\r
+\r
+* Check Member Ticket Policy - Does not seem to be in detail or edit.\r
+\r
+* Agree to policies on checkout needs to be in red - required.\r
+\r
+* Need to complete tracking of multiple claims for tickets that can be claimed more than once.\r
+ Database seems to be setup, but need to add tracking and display in ticket sold display \r
+\r
+* Need to add code to handle editing of tickets sold.\r
+\r
+* Check on adding entrance to ticket. May not always be able to use "Entrance" from section\r
+ i.e. Sunset Cruises.\r
+ DONE - may need some work later to make this more universal\r
+\r
+* Check on doing a pop-up message when checkout completed instructing users to print tickets or retain order and voucher numbers.\r
+\r
+* Voucher cover page \r
+ Web address\r
+ Phone Numbers\r
+ Maps??? Or do the appropriate map with each voucher.\r
+\r
+* Set a date range for creating inventory in ticket edit\r
+ This should be used as the date range when building inventory\r
+ It should be the dates checked when checking if inventory needs to be added or turned off\r
+ It should default to the date range specified in the event\r
+ DONE - But not defaulting to performance dates\r
+ \r
+* Need to handle Valet Parking\r
+ Valet parking is charged per night. \r
+ Consider this a ticket "Add-On" item \r
+ Select 1 or multiple for an add-on item (yes/no or quantity)\r
+ Optional Price per add-on\r
+ Include field to say what this is (i.e "Per Night", or "Each")\r
+ Should show on line below primary line for ticket.\r
+ \r
+ Ticket Add-On\r
+ \r
+ * create table ticket_add_on\r
+ name\r
+ description\r
+ type (single (option), selected quantity, \r
+ other - perhaps packaging of other tickets)\r
+ see "ticket_add_on_type" in config\r
+ max quantity if quantity related\r
+ unit name\r
+ unit amount \r
+ \r
+ * Add admin management of add-ons for a specific ticket\r
+ \r
+ * Add handling of add-ons when selecting tickets and in cart and checkout\r
+ \r
+ * Add handling of add-ons in reporting. \r
+\r
+ Added to admin but not done on front-end\r
+ \r
+* Promo Code\r
+ Entry of Promo Code text\r
+ Each promo code has list of tickets it applies to\r
+ Each promo code provides either percentage or $ amount\r
+ \r
+ promo_code\r
+ id SERIAL,\r
+ name text,\r
+ descr text,\r
+ start_date date,\r
+ end_date date,\r
+ notes text\r
+ \r
+ promo_ticket\r
+\r
+ id SERIAL,\r
+ ticket text,\r
+ promo_type integer,\r
+ amount float,\r
+ notes text\r
+ \r
+ \r
+* Check on entrance display in Section selection page. \r
+ \r
+Completed\r
+\r
+* Toggle list size button for lists in admin.\r
+ DONE\r
+ \r
+* Need to add time specific, # of uses, and number of claims to ticket sold data\r
+ DONE\r
+ \r
+* For vouchers "Round Trip Ticket", "Retain this ticket for your return trip.\r
+ Now configurable text per ticket or event\r
+ DONE\r
+\r
+* Forget session button when running on Development server\r
+ Added to bottom of all pages if running on a development server\r
+ DONE\r
+\r
+* Add better "Please Wait" thingy. \r
+ Added pop-up/overlay for pages needing this.\r
+ DONE\r
+\r
+* Departure date for non-date-specific tickets\r
+ Added likely departure date to cart and likely date to checkout\r
+ Need to add to ticket order information also\r
+ DONE\r
+\r
+* Remove "Each" from cart and checkout tables\r
+ DONE\r
+\r
+* Add second doc (location) handling for St. Ignace\r
+ Added "Entrance" feature to ticketing system and termed this as "Docks" for Star Line\r
+ Still need to get this printing on summaries and vouchers\r
+ DONE\r
+\r
+* Checkout contact information "Please send information ..." should default to checked.\r
+ DONE\r
+\r
+* "Print Vouchers" to "Print Boarding Passes" ???\r
+ Changed terms used for "Voucher" to "Boarding Pass" \r
+ DONE\r
+\r
+* Enable browser menus on the voucher window so people can print.\r
+ Enabled menus and added window.print() to script\r
+ DONE\r
+\r
+-------\r
+\r
+\r
+\r
+* Create new optional Purchase process for Star Line\r
+ See "Streamlined Ticketing for Star Line.odg" \r
+ \r
+ Venues need "type"\r
+ type 1 Standard Location/venue\r
+ Can sell items\r
+ type 2 Standard Location/venue + Sell through other venues\r
+ Can sell items\r
+ Can offer items for sale by other locations\r
+ Must flag items to be sold this way\r
+ Other vendors must be approved by this vendor to sell their stuff\r
+ Items must be flagged as sellable by others\r
+ (may want to have specific ticket negotiations)\r
+ type 3 Non-sales vendor, tickets only sold by type 1 or 2 locations/venues on this system\r
+ Does not sell items\r
+ Items of Type 3 are available for sale by type 2\r
+ \r
+ Ticket need flag that permits them to be sold by other vendors\r
+ \r
+ Need flag for ticket that causes it to always be shown on cart - even with 0 quantity.\r
+ \r
+ Ticket sold needs pointer to vendor who sold the ticket/item (in addition to the point to the member who's tickets they are)\r
+\r
+* Try to sort cart by ticket sort order\r
+\r
+* Set global terms\r
+ location: Departing From\r
+ (Consider adding categories of events)\r
+ Event: Category ???\r
+ Section: Section\r
+ Ticket: Item\r
+ Inventory: Inventory\r
+\r
+* Get info on Motorola hand scanners for Jerry - May need 8 to 10 - Most WiFi but some Cell.\r
+ http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Bar+Code+Scanning#\r
+ \r
+ Possible options - Prices approx\r
+ \r
+ Simple for use with computer\r
+ $108 (Amazon) http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Bar+Code+Scanning/General+Purpose+Scanners/LI2208\r
+ $380 (Amazon) http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Bar+Code+Scanning/General+Purpose+Scanners/LI4278\r
+ \r
+ Wireless\r
+ http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Mobile+Computers/Handheld+Computers/MT2000+Series+Handheld+Mobile+Terminals_US-EN\r
+ http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Mobile+Computers/Handheld+Computers/MC55A0\r
+ http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Bar+Code+Scanning/Rugged+Scanners/MT2000+Series+Handheld+Mobile+Terminals_US-EN\r
+ \r
+ Ruggedized Mobile Computer\r
+ http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Mobile+Computers/Handheld+Computers/MC3100_US-EN\r
+ \r
+ Cell Capable\r
+ http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Mobile+Computers/Handheld+Computers/TC55#specs_tab\r
+ http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Mobile+Computers/Handheld+Computers/MC67\r
+ \r
+\r
+* Create Venue - Event - Section - Ticket - Inventory summary with flags for issues in Admin area\r
+ Expandable sections might be good\r
+\r
+* Update reports to work correctly with all new changes\r
+\r
+* Add Month and Day of Week enable/dissable for inventory edit page\r
+ * Consider being able to highlight date cells and do bulk edit with them.\r
+ \r
+* Update Help file and enable context sensitive admin help \r
+\r
+\r
+\r
+Issues to check on\r
+------------------\r
+\r
+* Make sure default inventory is created when tickets are created.\r
+\r
+* Make sure that tickets are not presented on the front-end unless there's inventory\r
+\r
+* Make sure that non-date-specific inventory is handled correctly\r
+ * Inventory edit updates quantities properly\r
+ * Front-end and reports use correct numbers\r
+ \r
+* Make sure we're using the right name/title for tickets and other things (internal vs user terms)\r
+\r
+* Check on content of stored purchase summary\r
+\r
+* Check that credit card type and name on cart are stored in order detail\r
+\r
+* Make sure that multiple claims per ticket is working correctly and showing on back-end correctly\r
+\r
+\r
+\r
+\r
+\r
+\r
+OLD INFO - MAY NOT BE RELEVANT ANYMORE\r
+ \r
+* Change any fees of type 11 or 12 that are in use to type 10\r
+* Check to make sure Toolkit/EventManagement/config.ini has updated fee definitions\r
+\r
+; Fee Method\r
+fee_method.fixed_stay = 1\r
+fee_method.fixed_accom = 2\r
+fee_method.fixed_accomnight = 3\r
+fee_method.percent_stay = 10\r
+\r
+; Fee Method Numbers - admin\r
+fee_method_numb.1 = "Per Reservation - Fixed Fee"\r
+fee_method_numb.2 = "Per Room - Fixed Fee"\r
+fee_method_numb.3 = "Per Night - Fixed Fee"\r
+fee_method_numb.10 = "% of Room Rate"\r
+\r
+; Fee Method Numbers - Front End\r
+fee_method_numb_fe.1 = "Per Reservation"\r
+fee_method_numb_fe.2 = "Per Room"\r
+fee_method_numb_fe.3 = "Per Night"\r
+fee_method_numb_fe.10 = "Per Room"\r
+\r
+\r
+alter table convention add column central_payment boolean;\r
+alter table convention add column central_payment_email text;\r
+alter table convention add column host_property smallint;\r
+update convention set central_payment = 'f', central_payment_email = '', host_property = 0;\r
--- /dev/null
+\r
+-- Find event ID\r
+SELECT id, name, conv_code, start_date, end_date FROM convention;\r
+\r
+\r
+-- Replace {CONV ID} with desired event id\r
+DELETE FROM team_roster WHERE team IN (SELECT id FROM team WHERE conv = {CONV ID});\r
+DELETE FROM team_property WHERE conv = {CONV ID};\r
+DELETE FROM team_property WHERE conv = {CONV ID};\r
+DELETE FROM state_rep WHERE conv = {CONV ID};\r
+DELETE FROM division WHERE conv = {CONV ID};\r
+DELETE FROM room_block WHERE conv = {CONV ID};\r
+DELETE FROM room_block_seg WHERE conv = {CONV ID};\r
+DELETE FROM inven_hold WHERE inventory IN (SELECT id FROM inventory WHERE conv = {CONV ID});\r
+DELETE FROM inventory WHERE conv = {CONV ID};\r
+DELETE FROM reservation WHERE conv = {CONV ID};\r
+DELETE FROM fees WHERE affiliation_type = 1 AND owner = {CONV ID};\r
+DELETE FROM conv_prop_dist WHERE convention = {CONV ID};\r
+DELETE FROM event_prop WHERE event = {CONV ID};\r
+DELETE FROM convention WHERE id = {CONV ID};\r
+\r
--- /dev/null
+Current Work
+------------
+
+Notes regarding modifications to Ticketing to support ferry services
+
+Things to update
+----------
+SQL and database changes required for current updates
+
+alter table eventmgt.ticket add column unlimited_quant boolean;
+update eventmgt.ticket set unlimited_quant = false;
+alter table eventmgt.misc drop column return_url;
+alter table eventmgt.misc add column intro_text text;
+alter table eventmgt.misc add column ticket_text text;
+alter table eventmgt.misc add column ticket_opt_text text;
+alter table eventmgt.misc add column cart_text text;
+alter table eventmgt.misc add column checkout_text text;
+alter table eventmgt.misc add column success_text text;
+update eventmgt.misc set
+ intro_text = 'Intro text',
+ ticket_text = 'Ticket selection text',
+ ticket_opt_text = 'Ticket option selection text',
+ cart_text = 'Cart text',
+ checkout_text = 'Checkout text',
+ success_text = 'Checkout success text';
+
+Above needed for current devdb copy
+
+alter table eventmgt.ticket add column section_specific boolean;
+alter table eventmgt.ticket add column time_specific boolean;
+alter table eventmgt.ticket add column date_specific boolean;
+alter table eventmgt.ticket add column unlimited_use boolean;
+alter table eventmgt.ticket add column start_date date;
+alter table eventmgt.ticket add column end_date date;
+alter table eventmgt.ticket add column uses smallint;
+update eventmgt.ticket set
+ section_specific = true,
+ time_specific = true,
+ date_specific = true,
+ unlimited_use = false,
+ start_date = null,
+ end_date = null,
+ uses = 1;
+
+
+
+How to add a new main tab item to admin
+---------------------------------------
+
+* Edit view index.html and add a new tab where desired.
+* Set "emTabId" for that tab to the desired model and action (i.e. Attendees_list}
+* Create a matching directory under both...
+ models/admin/actions/{model}
+ views/admin/tickets/{model}
+* Add action include files in models/admin/actions/{model}. Typically these are...
+ add.inc, confirmDelete.inc, delete,inc, detail.inc, edit.inc, insert.inc, list.inc, selected.inc, update.inc
+* Add view files in views/admin/tickets/{model}. Typically these are...
+ added.html, deleted,html, detail.html, edit.html, list.html
+
+
+
+
+Update CommonAbstracts-PDF-V0
+-------------
+
+High priority for Starline
+
+* Check on creating tickets for an event needing to select the venu
+* Check on permitting selection of both date specific and non date specific tickets for the same event
+* Options to set defaults for checkboxes when creating tickets
+
+* Options for tickets
+ * No Section
+ * No time
+ * Non-date specific
+ * Active for specified range of dates for non-date specific tickets
+ * Multiple scans/uses for a single ticket - Specified number
+ * Unlimited scans/uses for ticket
+ * Unlimited inventory
+* Track Scan time, location, user when claiming tickets
+
+* Convert to Smarty Templates
+* Create admin/log-in user ticket sales interface
+* If a single venue, default to that venue when creating tickets and other things
+* Recommend other tickets/sales on ticket selection
+* Packaging
+ * Purchase multiple tickets as one item
+* Pre-sales to other sales agents
+ * Create agents to sell (use contacts with specified permissions)
+ * Track sales agent / means of sale for each ticket sold
+ Add "sold_by" field to ticket_sold table
+* Add filters to lists
+ * Active/inactive
+ * Venue
+ * Section
+ * Date range for ticket orders
+
+
+* Check on support for portable bar-code readers with audible/light/display confirmation.
+ BarcodesInc, Chicago 1-800-351-9962
+ * Hand held, weather proof, bar-code, WiFi, optional link to cell phone/service, display/audio for confirmation/info
+
+
+
+
+
+Things to check on
+
+* Checkout permitted with no cart contents if re-displaying checkout
+* on checkout fail (field not filled in) says "This venue does not have a payment method configured. Please call this venue to purchase tickets."
+* Need ability to display prototype of all E-Mail messages sent. Optionally all forms.
+
+
+
+
+* Need to split and verify application.ini file into common app and user configuration files.
+
+* Moving schema from reservations to eventmgt
+* Moving table convention to table event
+* Moving fields that point to event (convention) to event
+* Move ..._APP_BASE to THIS_APP_BASE as appropriate
+
+
+
+
+
+FROM V2 - Much still needs to be implemented
+
+Notes from 2/1/2013
+
+Do something to deal with someone double selecting the same available inventory into their cart.
+Cart should check for actual maximums available or we can implement the selected inventory hold.
+
+Check all property fees to see if any type 1 or type 10 are set as "Fee is selectable per room":
+
+For event fees, per room % of room rate seems to be superfluous.
+
+May need to check for per Reservation optional fee that's not per room on accommodations selection page.
+
+----
+
+
+
+DB updates
+ alter table convention add column central_payment boolean;
+ alter table convention add column central_payment_email text;
+ alter table convention add column host_property smallint;
+ update convention set central_payment = 'f', central_payment_email = '', host_property = 0;
+
+
+In procees
+ Central Payment
+ Admin work
+ * central_payment Flag
+ * central_payment_email Who gets bills
+ Request credit card Flag
+ Show prices to guests Flag
+ ??? Billing/payment reconciliation to members ???
+ Front-end
+ Request credit card if set
+ Send reservation to Prop
+ Send billing to central billing
+ Members Area
+ Look through to find things that might need to be fixed up
+ ??? payment reconciliation to members ???
+ Host Property
+ Admin
+ * Work completed
+ Front End
+ Need to display host propert at top of lists
+ Highlight background?
+
+
+
+
+
+General Development Notes
+
+alter table
+
+Fees Matrix
+
+ Available with
+ Applied at level Event Property
+ Per Reservation - Fixed Fee
+
+ Optional Off Property Yes Yes
+ Optional On Property Yes Yes
+ Selectable per room Accommodation No No
+
+ Per Room - Fixed Fee
+
+ Optional Off Property Yes Yes
+ Optional On Property Yes Yes
+ Selectable per room Accommodation No Yes
+
+ Per Night - Fixed Fee
+
+ Optional Off Property Yes Yes
+ Optional On Property Yes Yes
+ Selectable per room Accommodation No Yes
+
+ % of Room Rate
+
+ Optional Off Property Yes Yes
+ Optional On Property Yes Yes
+ Selectable per room Accommodation No Yes
+
+
+Misc Notes
+----------
+
+Pending database updates for live servers
+-----------------------------------------
+
+For geo mapping address
+/*
+include this link
+http://maps.googleapis.com/maps/api/js?sensor=true
+
+// For the Event Map
+// Create a jquery dialog with #map-dialog
+$('#map-dialog').dialog({
+height: 480,
+width: 520,
+modal: true,
+autoOpen: false
+});
+$("#map-it").click(function(e){
+e.preventDefault();
+$("#map-dialog").dialog('open');
+GLM_GeoMap.initialize();
+});
+
+<div id="map-dialog" style="display:none;padding:0;margin:0;">
+<div id="map_canvas" style="width:510px;height:440px;padding:0;margin:0;"></div>
+</div>
+*/
+
+Site Status
+-----------
+
+ Server Site Version Notes
+ dev52 Development V1, V2
+ dev53 Development (pending)
+ ws0 app.gaslightmedia.com V1, V2
+ ws3 app.gaslightmedia.com V1, V2
+ www.discoverkalamazoo.com V2
+
+
+Task List
+---------
+
+GENERAL
+
+** Check for International Address Support
+ DONE
+
+** Add fields for E-Mail addresses to event (general contact, internal contact, from address)
+ Can we use Discover Kalamazoo in the from line and GeneralInfo@DiscoverKalamazoo.com as the email address? - Jodie
+
+** Ability to select an event that is charged to a central entity rather than to each attendee
+
+** Check owner name salutation line in confirmation e-mails.
+
+** Event ID as access to event registrations
+ DONE
+
+** Host property selection in event
+
+** Display of date/rates when rates are inconsistent for a stay
+
+* Purge any previous customer info or links from system (greatlakesbay)
+
+* Need to change calendar.phtml pop-up to all JAVAscript using a layer at some point.
+
+* Add "conv" field to inven_hold table to make it easier to identify by event.
+
+ADMIN AREA
+
+** Add Team filter and output sorting options to Reservations report
+
+* Add check for inventory that doesn't match the evnet dates when the dates for an event are changed.
+ Add check for this whenever the event is selected and prominantly warn the user.
+ Make sure that inventory associated with an event is displayed even if it's outside the date range for the event.
+ Add warning to inventory that is outside the date range for an event when listing/viewing that inventory.
+
+* Need to have system check to make sure inventory is in a rational date frame for the event. If the event date
+ changes, it needs to still be able to display what inventory is in there (which it seems to have a problem with)
+ and needs to warn the admin user that the inventory needs to be change. Consider adding code such that if the
+ event start date changes that all inventory slides the same number of days.
+
+* Add Division to reservation reports
+
+* Add Division to Events->Reservations list and detail
+
+* Check fees/taxes detail output to make sure $ & % are displayed correctly for selected type.
+
+* Add date for earliest possible reservation used to block reservations prior to a certain date.
+
+* Reservations report
+ Add table ordered by State Rep, Team
+ ***DONE*** Add filter for State Rep
+
+* Add map drag-drop capability for Lat/Lon input and refining positions.
+ Ask Steve for his code.
+
+* Check on styles properly loading for printed reports
+
+* Set table headers to not scroll in admin areas
+
+* Add property search field for Inventory list summary screen
+
+* Add delete functions to dataAbstract.php and appropriate admin areas
+ ***DONE*** Contacts
+ Events
+ Event Fees & Taxes
+ State Reps
+ Divisions
+ Teams
+ ***DONE*** Inventory ( this is done in inventory edit - now checking for room blocks first )
+ Properties
+ Property Fees & Taxes
+ Property Accommodations
+
+* Reports - Complete basic reports
+ ***DONE*** Room block Reports
+ Room Requests
+ Reservations
+ Finance
+
+* Help - complete help texts and Quickhelp popups
+
+* When inventory is added, see if it's easy to have the inventory summary at the top scroll to the selected property
+
+* Build default teams using "Division" names when a division or State rep is added
+
+* Add ability to include sort links at top of tables
+
+* Add demographics info to reports
+
+* Auto-generate default "access codes" (currently "Team code") to produce rational password style string
+ {word}{nnn}{word} kind of password
+
+* Auto-generate team records when state-division is added
+
+* Check for and fix "&" in Room Block Report
+
+RESERVATIONS FRONT-END
+
+* System does not handle the situation where all of the inventory for an event is well outside the date range of the event.
+ (See similar issue for admin area above). If this happens it should not break but rather show no properties available.
+
+* Accommodations image problem
+
+* Add support for Fee/Tax guest optional items and optional quantities.
+
+* Check for earliest possible reservation date and display that instead of link to event on event selection page if it's not time to reserve yet.
+
+* Room Blocks Front-end lists, include fees/taxes in property detail pages just below room-blocks list.
+
+* Move fees/taxes on property detail page, to just below accommodation selection
+ Move "Add Selected Accommodation" button to bottom of list.
+
+* Mage sure "Must arrive by" and "Must not depart before" dates are displayed correctly and that default arrive/depart search dates are correct.
+
+* Add "Must arrive by" and "Must not depart before" dates to Event Selection screen
+
+* Keep pending reservations selections (on hold) from being reserved by others
+
+* Need to deal with checkout problem where there might be more than one room block that matches the same accommodation and team.
+ Currently not able to distribute consumption of rooms between multiple room blocks where the conv, state, team, and accomodation all match.
+
+* Make sure reservations respect
+ req_stay_arrive
+ req_stay_depart dates
+ ***DONE*** open_res_date
+ cutoff_date
+
+* Setup default and custom E-Mail message templates (by event) for sending to visitor on making the reservation. (file in this directory)
+
+* Check "OK to send" setting. Make sure it's respected on checkout
+
+* Check cart to make sure that there is availability for all cart entries
+ Currently only checking each separately
+ Consider combining same accommodation to make one entry
+
+* Add check-in and check-out times to conf E-Mail to visitors
+
+* On property profile (unit selection) page add the following:
+ Room Amenitites
+ Distance from Event
+ Consider moving number of rooms, credit card data to right had side as in main site
+ Make sure all appropriate data displayed in main site member profile pages is displayed
+ Consider moving description to below room list to minimize scrolling
+ Consider making profile page and property selection page similar
+
+* Check to make sure any session timeout is handled properly.
+
+* Reservations submitted E-Mail messages need to be customizable by event.
+
+* E-Mail sent when submitting reservation should include driving directions
+
+* Fix arrive_date stored with reservation request
+
+* Add storage of fees summary into reservations request then fix reservations reports to use that data
+
+MEMBERS FRONT-END
+
+* Fix problem with editing reservation dates and such.
+ Note that line with "calc_unit_totals()" call has been commented out.
+
+* Complete processing of accommodation quantity and date changes when updating a reservation.
+ Check again for availability
+ Rebuild summary
+ Note changes in Notes field.
+
+* Fix "fudged" min and max reservations available dates for modifying reservations
+ Should be based on actual availability for each accommodation
+
+* Create "print" option for printing out reservation detail for a selected reservation.
+
+* Change to appearance similar to back-end tables
+
+* Add copy of policies to reservation confirmation E-Mail
+
+* When declining reservations do not send E-Mail to visitor, only send E-Mail to event contacts (King Comm.)
+
+* Check reservations daily(hourly?) and send warning notices of unconfirmed reservations (see conf_hours) to members and summary to event contacts.
+
+* Confirmation E-Mail messages need to be customizable by event.
+ Need to be able to say whether credit card will be charged upon reservation or at checkin.
+
+* Change conf message to HTML and use view file
+
+* Driving directions link on Confirmation E-Mail
+
+* Ability to edit reservations dates
+ When storing, update all inventory and room block availability numbers
+ Recalculate all charges, fess, and totals
+ Update reservation record with new data
+ Add to notes for this reservations record how it was modified
+
+STATE-REP ROOM BLOCK SUMMARY
+
+
+
+OTHER NOTES ON USE
+
+Info on sending test message to properties for a specific event
+---------------------------------------------------------------
+* Enter front-end reservations as a team or regular visitor.
+* Select accommodations for a single property
+* Proceed to checkout
+* Under "Billing Information" in the "First Name" field enter "Event Test Property Message"
+* Fill out rest of information and submit
+ You may use the 0011001100110011 pseudo creadit card number
+* System will produce a single test message to the "cscott@gaslightmedia.com" address for testing this mode
+* To have the test message sent to all properties associated with the selected event enter "Production Mode" in the "Last Name" field.
+* Messages will contain
+ - "John Doe" information for the billed party
+ - Will be addressed to each property
+ - Will NOT contain any of the credit card information submitted
+ - Will contain the exact selected reservations summary and totals selected in the cart
+ - Will NOT clear the cart or create an actual reservation
+
+
+PHASE 2 WORK
+
+* Property defines cut-off date for reservations if not defined in Event
+
+
+
+
+How to delete an entire event
+-----------------------------
+
+Delete data in this order
+
+Table Link to Link field
+----------------------- --------------- -------------------------------------------
+ SELECT id, name, conv_code, start_date, end_date FROM convention;
+team_roster team team = {team for specified event}
+ DELETE FROM team_roster WHERE team IN (SELECT id FROM team WHERE conv = {CONV ID});
+team_property convention conv = {convention}
+ DELETE FROM team_property WHERE conv = {CONV ID};
+team convention conv = {convention}
+ DELETE FROM team_property WHERE conv = {CONV ID};
+state_rep convention conv = {convention}
+ DELETE FROM state_rep WHERE conv = {CONV ID};
+division convention conv = {convention}
+ DELETE FROM division WHERE conv = {CONV ID};
+room_block convention conv = {convention}
+ DELETE FROM room_block WHERE conv = {CONV ID};
+room_block_seg convention conv = {convention}
+ DELETE FROM room_block_seg WHERE conv = {CONV ID};
+inven_hold inventory inventory = {inv for specified event}
+ DELETE FROM inven_hold WHERE inventory IN (SELECT id FROM inventory WHERE conv = {CONV ID});
+inventory convention conv = {convention}
+ DELETE FROM inventory WHERE conv = {CONV ID};
+res_contact ???
+reservation convention conv = {convention}
+ DELETE FROM reservation WHERE conv = {CONV ID};
+fees convention affiliation_type = 1, owner = {convention}
+ DELETE FROM fees WHERE affiliation_type = 1 AND owner = {CONV ID};
+conv_prop_dist convention convention = {convention}
+ DELETE FROM conv_prop_dist WHERE convention = {CONV ID};
+event_prop convention event = {convention}
+ DELETE FROM event_prop WHERE event = {CONV ID};
+convention
+ DELETE FROM convention WHERE id = {CONV ID};
+
+
--- /dev/null
+Field Definitions Specification
+
+Fields are specified using an array of field specification arrays.
+
+Sample:
+
+ $this->fields = array(
+
+ // Record ID
+ 'id' => array(
+ 'field' => 'id',
+ 'as' => false,
+ 'type' => 'integer',
+ 'filter' => 'int',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'a'
+ ),
+
+ // Name of event
+ 'name' => array(
+ 'field' => 'name',
+ 'as' => false,
+ 'type' => 'text',
+ 'filter' => 'string',
+ 'required' => true,
+ 'unique' => true,
+ 'default' => false,
+ 'use' => 'a'
+ )
+
+ );
+
+
+The index for fields must be unique, but three may be multiple entries for a
+single field ('field') in the database table.
+
+
+Field Specifications:
+
+(array index) The array index is only used to permit multiple entries for the
+ same database field. This permits including the field several
+ times so it can be processed differently based on the operation
+ being performed or can be displayed multiple time but each in a
+ different way.
+
+'field' Name of field in database table
+
+'as' Name to use for this field for all operations other than for talking
+ with the database. Doing this keeps any possible multiple instances
+ of use of a single database field separate. (see array index above)
+
+ If this is not specified, then the actual database field name is
+ used for these purposes.
+
+
+'type' Type of field - Possible field types are...
+
+ 'integer',
+ 'float',
+ 'money',
+ 'percent',
+ 'pointer',
+ 'list',
+ 'bitmap', like list but permits multi-pick
+ 'text',
+ 'checkbox',
+ 'email',
+ 'date',
+ 'time',
+ 'phone',
+ 'image',
+ 'latitude', Data is an array of (dir,deg,min,sec);
+ 'longitude' " " "
+ "dir" is - for West and South
+
+'filter' Optional filter - See PHP filter_input() "filter" parameter.
+ Currently only for type "text"
+ FILTER_SANITIZE_FULL_SPECIAL_CHARS does not seem to be defined at this time.
+
+'filter_options' Optional filter options - See PHP filter_input() "options" parameter.
+ Currently only for type "text"
+
+'required' If set and true, field data must be supplied
+
+'unique' If set and true, must be a unique value
+
+'default' If set and true use this value as the default for input fields.
+ Dates/times are expected to be timestamps
+ There is no default image capability
+
+'use' Character(s) that indicate which operations to use this field with.
+
+ l = Listing records
+ g = Get - Displaying a record
+ n = Setup input for a new record
+ i = Insert new record
+ e = Edit an existing record
+ u = Update an edited record
+ d = Ask for verification of deletion of a record
+ c = Confirm delete and delete record.
+ a = All above operations
+
+'minValue' Minimum acceptable value (numeric)
+ Dates are specified as timestamp
+
+'maxValue' Maximum acceptable value (numeric)
+ Dates are specified as timestamp
+
+'p_table' Table to get related data from for pointer types
+
+'p_field' Field to get related data from for field types
+
+'p_id' name of ID field in related data table
+
+'p_where' Additional WHERE clause for getting possible values from related table.
+
+'p_from' Additional FROM tables for getting possible values from related table.
+ See example in dataMembers.php
+
+'p_blank' If set or true provide a "blank" option for pointer input
+
+'p_sort' Optional ORDER BY sort clause (i.e. "name, age DESC") - May not be functional yet.
+
+'p_orderby' Optional "ORDER BY" clause for results from table pointed to by pointer
+
+'p_autoadd' Option to permit the addition of a new entry using a text input field
+
+'p_sum' If true causes a numeric sum of all returned values from the target table/column
+
+'p_static' A static pointer that does not do a lookup for a list of values, only a single value reference
+
+'output_type' Optional type to use for output. Useful with pointers.
+
+'latlon_type' Optional specification for lat/lon output (DMS, DM, or D)
+
+'view_only' View only field, do not check for input or store, only provide data from record.
+
+'list' Required with field type 'list' - includes simple array where...
+ array key is value for option
+ array value is name for option
+
+'bitmap' Required with field type 'bitmap' - includes array of (position, name) for each option
+ array key is a value indicating the bit position (i.e. 1, 2, 3, 4) starting with 1 rather than 0 (it will be converted)
+ array value is the name for the option
+
+'list_keytype' Type of key field (default is 'text')
+ 'text' A Text key - expects a text field in the database
+ 'int' An Integer key - expects a numeric field in the database
+
+'output_format' Optional output format specification as would be used in printf()
+ Use only the actual format and not the type identifier (i.e. "02.2" rather than "%f02.2")
+
+'no_stripslashes' Don't strip slashes when recalling this field from the database.
+
+'quicktip' Text description of this field and its use.
+
+
+Data specification for various types
+------------------------------------
+
+Type 'list'
+
+ Return data
+
+ array(
+ 'list' => array(
+ array('name' => {name}, 'value' => {value}, 'default' => {true if default or selected},
+ ....
+ ),
+ 'value' => {value of selected option},
+ 'name' => {name of selected option}
+ )
+
+Type 'bitmap'
+
+ Return data
+
+ array(
+ 'bitmap' => array(
+ array('name' => {name}, 'value' => {value}, 'default' => {true if default or selected},
+ ....
+ ),
+ 'value' => {value of selected option},
+ 'names' => array( {simple list of names of selected options} )
+ )
+
+Type 'date'
+
+ Input data fields
+
+ When using single input text field, input field is name of field
+
+ When using separate M, D, Y picklist or input fields
+
+ '{field}_month'
+ '{field}_day'
+ '{field}_year'
+
+ Return data
+
+ array(
+ 'date' => {text date},
+ 'timestamp' => {timestamp},
+ 'date_list' => array(
+ 'month' => {picklist array},
+ 'day' => {picklist array},
+ 'year' => {picklist array}
+ ),
+ )
+
+Type 'time'
+
+ Input data fields
+
+ When using single input text field, input field is name of field
+
+ When using separate H, M picklist or input fields
+
+ '{field}_hour'
+ '{field}_min'
+ '{field}_ampm'
+
+
+ Return data
+
+ array(
+ 'time' => {text time},
+ 'time_list' => array(
+ 'hour' => {picklist array},
+ 'min' => {picklist array},
+ 'ampm' => {picklist array}
+ ),
+ )
+
+
+Types 'latitude' & 'longitude'
+
+ Return data
+
+ array(
+ 'dir' => {direction: -1 = S or W, +1 = N or E},
+ 'dir_list' => array(
+ array('name' => 'N', 'value' => 1, 'default' => {true if default or selected}),
+ array('name' => 'S', 'value' => -1, 'default' => {true if default or selected})
+ ),
+ 'deg' => {degrees},
+ 'min' => {minutes},
+ 'sec' => {seconds}
+ )
+
+
+Type 'image'
+
+ Input fields
+
+ '{field}_delete' Name of checkbox field to delete image
+ '{field}_new' Name of file input field to save new image
+
+
+Type 'picklist'
+
+ Parameters for {picklist array}
+
+ 'name' Name to use for this option
+ 'value' Value to return when this option is selected
+ 'default' True if this option is currently selected
+
+
+
--- /dev/null
+Install Instructions\r
+\r
+* This version of Event Management is a New Common App so it's in /var/www/server/CommonApps/EventManagement_V?\r
+\r
+* Add the following files/directories if they don't already exist\r
+\r
+ /common Directory containing symbolic links to a "web" directory in a common application\r
+ If creating directory, set svn:ignore for all files below that directory.\r
+\r
+ /admin/EventManagement Directory containing a file to kick off EventManagement admin functions \r
+ /config/applications Directory containing ini files for specific applications\r
+\r
+* Add the following symbolic links in the Web site /common directory\r
+\r
+ ln -s /var/www/server/CommonApps/EventManagement_V{version}/web EventManagement\r
+ ln -s /var/www/server/CommonApps/Public Public\r
+ touch Only_symbolic_links_in_this_directory-do_not_add_to_repository\r
+ \r
+* Copy the contents of the docs/admin/EventManagement directory to /admin/EventManagement \r
+ \r
+* Copy the contents of docs/config/applications directory to /config/applications\r
+\r
+* Check if the contents of docs/Barcode already exist in "/usr/share/fonts/truetype/barcode".\r
+ If not, copy docs/Barcode to /usr/share/fonts/truetype/barcode \r
+\r
+* Edit site's /config/application.ini. \r
+\r
+ Make sure the following is near the top of the file\r
+ \r
+ ; CommonApps configuration\r
+ commonApps.base_path = "/var/www/server/CommonApps/"\r
+ \r
+ Remove any any old configuration for EventManagement and add the following\r
+\r
+ ; Turn the events management application On or Off\r
+ event_management.application = On\r
+ event_management.version = "EventManagement_V3"\r
+ \r
+* Make sure site loads jquery\r
+ \r
+* Create a Toolbox page for the EventManagement front-end and note catid\r
+\r
+* Create a Toolbox page for the EventManagement Member's login and note catid\r
+\r
+* Add eventmgt schema to database - data/EventManagement.sql \r
+\r
+* Edit /admin/nav.phtml and add the following\r
+\r
+ if (defined('EVENT_MANAGEMENT') && EVENT_MANAGEMENT) {\r
+ $nav['Event Management'] = BASE_URL.'admin/EventManagement/EventManagement.php';\r
+ }\r
+\r
+* Edit /config/applications/EventManagement.ini and set at least\r
+ \r
+ "home_page", "members_only_page" with ID's for pages created above\r
+ \r
+* Make sure there's not reference to a "reservations" schema in /Toolkit/Database.php \r
+ \r
+* Create file in /static directory for the front-end catid with the following...\r
+\r
+ <?php\r
+ \r
+ // Check if secure page\r
+ if (empty($_SERVER['HTTPS'])) {\r
+ $url = 'https://'.$GLOBALS['base_url']."/event-management-".$GLOBALS['catid'].'/';\r
+ header("Refresh:0; url=$url");\r
+ exit;\r
+ }\r
+ \r
+ require_once $GLOBALS['applicationConfig']->commonApps->base_path.$GLOBALS['applicationConfig']->event_management->version.'/controllers/FrontController.php';\r
+ $html = new EventManagementIndexController($GLOBALS['applicationConfig'], $GLOBALS['serverConfig'], $GLOBALS['siteConfig']);\r
+ ?>\r
+\r
+* Create file in /static directory for the admin login catid with the following...\r
+\r
+ <?php\r
+ define ('MEMBER_USER', true);\r
+ define ('SHOW_IN_SITE', false);\r
+ \r
+ // Check if secure page\r
+ if (empty($_SERVER['HTTPS'])) {\r
+ $url = 'https://'.$GLOBALS['base_url']."/event-management-".$GLOBALS['catid'].'/';\r
+ header("Refresh:0; url=$url");\r
+ exit;\r
+ }\r
+ \r
+ require_once '/var/www/server/CommonApps/'.$GLOBALS['applicationConfig']->event_management->version.'/controllers/AdminController.php';\r
+ ?>\r
+\r
+* Check to make sure site has owner information in the config/site.ini file.\r
+ \r
+ ; Web Site Owner Information - for use by certain applications\r
+ owner.name = "Gaslight Media"\r
+ owner.short_name = "GLM"\r
+ owner.address1 = "120 E. Lake St."\r
+ owner.address2 = False\r
+ owner.city = "Petoskey"\r
+ owner.state = "MI"\r
+ owner.zip = "49770"\r
+ owner.country = "US"\r
+ owner.phone = "231-487-0692"\r
+ owner.toll_free = False\r
+\r
+\r
+HEREHERHRHERHERHE\r
+\r
+ \r
+\r
+// **************** below is OLD ***********************\r
+ \r
+* Add the contents of the documentation/config/application.ini file to /config/application.ini \r
+\r
+* Add a page for the Event Reservations front-end and note the catid\r
+\r
+* Add a page for the members only area Event Housing and note the catid\r
+ \r
+* Update the following files to include the necessary references to Event Management\r
+ For old sites without ini files and schemas use replacements in Old sites below.\r
+\r
+ /setup.phtml \r
+ \r
+ /**\r
+ * Site has Event Management\r
+ */\r
+ define('EVENT_MANAGEMENT', $applicationConfig->event_management->application);\r
+ define('EVENT_MANAGEMENT_HOME_PAGE', $applicationConfig->event_management->home_page);\r
+ define('EVENT_MANAGEMENT_MEMBERS_PAGE', $applicationConfig->event_management->members_only_page);\r
+ \r
+ \r
+; Turn the events management application On or Off\r
+event_management.application = On\r
+event_management.common_apps = "/var/www/server/CommonApps/"\r
+event_management.base_path = "/var/www/server/CommonApps/EventManagement_V3/"\r
+; The page id in the toolbox that is the entry page for Event management - Generally set for each server\r
+event_management.home_page = 130\r
+event_management.members_only_page = 131\r
+ \r
+\r
+ ; Turn the events management application On or Off\r
+ event_management.application = On\r
+ ; The page id in the toolbox that is the entry page for Event management - Generally set for each server\r
+ event_management.home_page = 239\r
+ event_management.members_only_page = 240\r
+ \r
+ ************ NOT NEEDED ANY MORE ************\r
+ /Toolkit/Database.php in _setSearchPath() function - *** Only if site already has schemas!!! ***\r
+ \r
+ if (defined('EVENT_MANAGEMENT') && EVENT_MANAGEMENT) {\r
+ // define event management search path\r
+ $stmt->bindValue(':schema', 'reservations', PDO::PARAM_STR);\r
+ $stmt->execute();\r
+ }\r
+ *********************************************\r
+ \r
+ /admin/nav.phtml\r
+ \r
+ if (defined('EVENT_MANAGEMENT') && EVENT_MANAGEMENT) {\r
+ $nav['Event Management'] = 'admin/EventManagement/EventManagement.php';\r
+ }\r
+\r
+ /static/{front-end-page}\r
+ \r
+ <?php\r
+ $html = new Toolkit_EventManagement_EventManagement(Toolkit_Database::getInstance());\r
+ ?>\r
+ \r
+ /static/{member-admin-page}\r
+ \r
+ <?php\r
+ // Specify catid so legacy code can pick it up\r
+ $this_pgm = CURRENT_BASE_URL."members-only-area/eventManagement-252/";\r
+ include BASE_PATH."Toolkit/EventManagement/MembersEventManagement.php";\r
+ ?>\r
+ \r
+* Fix member login problem with some sites.\r
+\r
+ /memberdb/index.php -- Move logout before auth start\r
+ \r
+ $memberAuth =& new Toolkit_Members_Auth($root, 'DB', array(), '', false);\r
+ $memberAuth->setIdle();\r
+ if (isset($_GET['logout']) || isset($_POST['doLogin'])) {\r
+ $memberAuth->logout();\r
+ }\r
+ $memberAuth->start();\r
+ \r
+ /memberdb/classes/class_user.inc -- Add user name to logout button.\r
+ \r
+ $out .= '<li><a href="'.$this->page.'?logout=">User: '.$_SESSION['_authsession']['username'].'<br>Log Out</a></li>';\r
+ \r
+\r
+* Old sites that don't have ini files and schemas\r
+\r
+ /setup.phtml\r
+ \r
+ /**\r
+ * Site has Event Management\r
+ */\r
+ define('EVENT_MANAGEMENT', true);\r
+ define('EVENT_MANAGEMENT_HOME_PAGE', 0);\r
+ define('EVENT_MANAGEMENT_MEMBERS_PAGE', 0);\r
+ define('EVENT_MANAGEMENT_LEGACY_SITE', true);\r
+ \r
+\r
+ /static/{front-end-page}\r
+ \r
+ <?php\r
+ \r
+ // Following required because this site does not use schemas\r
+ $dbh = Toolkit_Database::getInstance();\r
+ $sql = "set search_path = reservations,public;";\r
+ $stmt = $dbh->prepare($sql);\r
+ $stmt->execute();\r
+ \r
+ $html = new Toolkit_EventManagement_EventManagement($dbh);\r
+\r
+ ?>\r
+\r
+* Edit /Toolkit/EventManagement/config.ini to set the customer's information \r
+\r
+* Add page catid for all pages that should be secure to "$securePagesArray = array(12,33);" in setup.phtml\r
+\r
+* Optionally to have a seprate style for this site copy Legacy/styles.css to virtual server directory /Toolkit/EventManagement/styles.css\r
+\r
+\r
+\r
+
\ No newline at end of file
--- /dev/null
+Event Management
+
+NEED TO UPDATE FOR VERSION 3
+
+
+Notes:
+
+* If there is an /admin/EventManagement/templates directory, the application will look for
+ templates there. Otherwise it will use the standard set in {app}/Common/EventManagement_V2/admin/templates
+
+
+General Program Flow and Class Organization
+-------------------------------------------
+
+Directories & Components
+
+Toolkit/EventManangement
+
+ Contains all setup, configuration, and libraries for application
+
+Toolkit/EventManagement/data
+
+ Contains all Libraries for access to data
+
+ dataAbstract.php
+
+ Abstract class for all access to data
+
+ Methods for processing input and output for all standard field types
+ Method to build queries from field specification tables
+ Methods for all standard data operations
+
+ getStats() Get record counts of various types
+ getList() Get list of records for a particular table
+ getEntry() Get record detail for an entry in a table
+ newEntry() Prepare data to ask for detail for a new table entry
+ insertEntry() Add new detail entry to table
+ editEntry() Prepare data for edit of entry
+ updateEntry() Update data for an entry
+ deleteEntry() Prepare data for confirmation to delete and entry
+ deleteConfirmEntry() Delete an entry if confirmed
+
+ data{app}.php - i.e. dataEvents.php, dataMembers.php, ...
+
+ Data support class for a specific application - such as handing event data or member data
+
+ Field definitions and specifications for a particular table or related group of tables
+ Methods for handling data from these tables for various types of operations.
+ i.e. Stats, List, ...
+ Whenever possible, these methods should try to use methods in the abstract class
+ to support these operations.
+ Methods for handling operations unique to this specific application.
+
+
+admin/EventManagement
+
+ Contains code specific to the admin section for this applicaiton.
+ Whenever possible this code should use the classes in the "Toolkit/EventManagement/Data"
+ directory to support the admin actions.
+
+admin/EventManagement/EventManagement.php
+
+ Main code section for the admin section
+
+admin/Eventmanagement/classes
+
+ Contains all class libraries for performing data retrieval and storage.
+ Whenever possible should use the "data" classes in "Toolkit/EventManagement/data" for
+ data storage and retrieval by calling the "data{app}.php" base classes.
+
+
+
+
+Admin
+
+ /admin/nav.phtml
+ /admin/EventManagement/EventManagement.php
+ /setup.phtml
+ /Toolkit/EventManagement/config.ini
+ /admin/EventManagement/classes/{} - where {} = events.php, ...
+ /Toolkit/EventManagement/data/data{} - where {} is same as above
+ /Toolkit/EventManagment/data/dataAbstract.php
+
--- /dev/null
+Sites_Using.txt\r
+---------------\r
+\r
+File depreciated\r
+\r
+See: CommonApps/EventManagement/V3/Notes/Sites_Using.txt
\ No newline at end of file
--- /dev/null
+Testing Notes\r
+\r
+Checkout Test options\r
+\r
+This parameter is required for any test option below\r
+ Last name: GLM TEST ONLY\r
+\r
+Do not store the reservation result\r
+ First name: GLM DO NOT STORE\r
+ \r
+Do not clear the cart cookie \r
+ Address (line 1): GLM DO NOT CLEAR \r
--- /dev/null
+<?php
+/**
+ * Event Management
+ * Housing and Reservations System Front End Code - Main Class
+ *
+ * PHP version 5
+ *
+ * @category Reservations_Front_End
+ * @package Event_Housing
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: EventManagement.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://housing.gaslightmedia.com/admin/
+ */
+
+echo "NEED TO FIGURE THIS OUT ..."; exit;
+require_once GLM_APP_BASE.'Common/EventManagement_V2/Legacy/EventManagement.php';
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management
+ * Housing and Reservations System Front End Code - Main Class
+ *
+ * PHP version 5
+ *
+ * @category Reservations_Front_End
+ * @package Event_Housing
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: EventManagement.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://housing.gaslightmedia.com/admin/
+ */
+
+
+// Check for an old site that doesn't have a proper autoloader or $dbh defined.
+if (defined('EVENT_MANAGEMENT_LEGACY_SITE')) {
+
+ /* DEPRECIATED ALERT */\r
+ echo '\r
+ <H1><span style="color: red">Depreciated</span>: EVENT_MANAGEMENT_LEGACY_SITE</h1>\r
+ <p>See: CommonApps/EventManagement_V?/admin/EventManagement.php</p>\r
+ ';\r
+ $backtrace = debug_backtrace();\r
+ echo 'Processes back-trace: (in return order)<br>\r
+ <table border="1" cellpadding="2" cellspacing="0">\r
+ <tr style="background: orange;"><td>File</td><td>Line</td><td>Function</td><td>Class</td></tr>\r
+ ';\r
+ foreach($backtrace as $b) {\r
+ echo '\r
+ <tr><td>'.$b['file'].'</td><td>'.$b['line'].'</td><td>'.$b['function'].'</td><td>'.$b['class'].'</td></tr>\r
+ ';\r
+ }\r
+ echo '</table>';\r
+ exit;\r
+ /* END DEPRECIATED ALERT */\r
+
+ $dbh = Toolkit_Database::getInstance();
+ $sql = "set search_path = reservations,public;";
+ $stmt = $dbh->prepare($sql);
+ $stmt->execute();
+
+ set_include_path(get_include_path().':'.GLM_APP_BASE.'glmPEAR');
+ set_include_path(get_include_path().':'.GLM_APP_BASE.'glmZend/1.10.2/library');
+ set_include_path(get_include_path().':'.GLM_APP_BASE.'glmZend/1.10.2/library/Zend/Config');
+ set_include_path(get_include_path().':'.GLM_APP_BASE.'Common/EventManagement_V2/Legacy/classes');
+ include_once('Ini.php');
+
+ require_once GLM_APP_BASE.'Common/EventManagement_V2/Legacy/classes/GeoCalculations.php';
+ require_once(GLM_APP_BASE.'Common/EventManagement_V2/Legacy/EventManagement.php');
+}
+
+echo "NEED TO FIGURE THIS OUT..."; exit;
+require_once GLM_APP_BASE.'Common/EventManagement_V2/Legacy/Members/index.phtml';
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin Index Controller
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement_V3
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: EventManagement.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once '../../setup.phtml';
+require_once $applicationConfig->commonApps->base_path.$applicationConfig->event_management->version.'/controllers/AdminController.php';
+
+?>
\ No newline at end of file
--- /dev/null
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+Font: Free 3 of 9 Barcode (free3of9.ttf)
+Created By: Matthew Welch
+E-Mail: daffy-duck@worldnet.att.net
+Web Address: http://home.att.net/~daffy-duck
+ (PGP public key available here)
+
+Free 3 of 9, like all of my fonts, is free. You can use it for most
+personal or business uses you'd like, and I ask for no money. I
+would, however, like to hear from you. If you use my fonts for
+something please send me a postcard or e-mail letting me know how
+you used it. Send me a copy if you can or let me know where I can
+find your work.
+
+You may use this font for graphical or printed work, but you may not
+sell it or include it in a collection of fonts (on CD or otherwise)
+being sold. You can redistribute this font as long as you charge
+nothing to receive it. If you redistribute it include this text file
+with it as is (without modifications).
+
+If you use this font for commercial purposes please credit me in
+at least some little way.
+
+About the font:
+
+Can you believe there are people who would charge you for a barcode
+font like this? It took very little time to make this so I thought
+I'd donate it to the world. It is suitable for scanning even at
+fairly small point sizes (with a laser printer). I have tested
+printed copies of this font with a couple different scanners and it
+worked perfectly.
+
+This is 3 of 9 (sometimes called "code 39"), a widely used barcode
+standard that includes capital letters, numbers, and several symbols.
+This is not the barcode for UPC's (universal price codes) found on
+products at the store. However, most kinds of barcode scanners will
+recognize 3 of 9 just fine.
+
+To create a valid 3 of 9 barcode you have to begin and end it with
+a special character. Scanners look for this character to know
+where to start and stop reading the barcode. It is represented in
+this font with the '*' character. So, to create a barcode for the
+text "ABC123" you have to type out "*ABC123*". Note that barcode
+readers will not include the *'s in the text they return. They will
+just give you the "ABC123".
+
+Two versions of 3 of 9 are included. The font called "Free 3 of 9" is
+the basic 3 of 9 standard. It includes letters and these symbols: $ %
++ - . and /. The font called "Free 3 of 9 Extended" covers the
+extended 3 of 9 standard. It includes all the ASCII characters.
+
+Special note to MS Word users: There is a default setting in Word
+that changes text surrounded by *'s into bold text. This setting must
+be disabled for these fonts to work, otherwise the * characters that
+are necessary for the barcode to scan properly will be lost and the
+thickness of the bars will be altered. I have a copy of Word '97. The
+setting might be found in a different place in other versions but
+this is how I disabled it. From the Tools menu open the AutoCorrect
+dialog box. On the AutoFormat tab uncheck the box for "*Bold* and
+_underline_"
+
+
+-----BEGIN PGP SIGNATURE-----
+Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
+
+iQA/AwUBOmY8/uEM8BJ4ZA+2EQLSDgCgqHT1WtBW34v7JAQr4+1zCzUaeGgAn2uu
+stjL0d7RVR5C5p2zpks371e9
+=jqNv
+-----END PGP SIGNATURE-----
--- /dev/null
+;
+; Travel Information System
+;
+[common]
+
+applicationName = "Event Housing"
+
+;
+; *** General Configuration for Event Housing System ***
+;
+
+; Base URL/paths for front-end of this application
+url.front_end = CURRENT_BASE_URL "/Toolkit/Event_Housing-" EVENT_HOUSING_HOME_PAGE "/"
+url.admin = CURRENT_BASE_URL "/admin/Event_Housing/"
+path.front_end = BASE_PATH "/Toolkit/Event_Housing/"
+path.admin = BASE_PATH "/admin/Event_Housing"
+
+; Interface Selection
+default_admin_interface = "panels"
+admin_interface.panels = "panels"
+
+
+; Basic Customer Information
+customer.name = "Great Lakes Bay"
+customer.long_name = "Great Lakes Bay Regional Convention & Visitiors Bureau"
+customer.phone = "989-752-7164"
+customer.fax = ""
+customer.toll_free = "800-444-9979"
+customer.address = "515 N. Washington Ave., Third Floor"
+customer.city = "Saginaw"
+customer.state = "MI"
+customer.zip = "48607"
+customer.email = "cscott@gaslightmedia.com"
+customer.internal_email = "cscott@gaslightmedia.com"
+customer.from_email = "cscott@gaslightmedia.com"
+customer.letter_closing = "Sincerely,"
+
+
+customer.assistance_info = "
+If you need assistance within the administration area or have questions, please contact:<BR>
+Gaslight Media Web Site Support Services at 231-487-0692 or
+E-Mail us at info@gaslightmedia.com
+"
+
+; General Travel Information System Options
+option.member_db = "Integrated" ;Use Standard Member DB: Integrated = Use standard Member DB, Separate = Use Separate Member DB
+option.conventions = true
+option.reservations = false ;Enable Reservations for members (not event housing)
+option.tickets = false ;Enable Ticket Sales
+option.packages = false ;Enable Packages
+option.housing = true ;Enable Event housing
+option.registrations = false ;Enable Convention Registrations
+option.tours = false ;Enable Tour Package Data
+option.reservations = false ;Enable regular reservations
+option.secret = "GLMTravelSecret" ;Secret Key used to create un-predictable values
+option.admin_help = true ;Enable online help for member admin area
+option.email_style = "text" ;Email to customer style = 'text', 'html', 'both', 'pdf', ...
+option.promotions = false
+option.member_edit = false
+option.member_assistance = "For assistance call Great Lakes Bay Regional Convention & Visitiors Bureau at 989-752-7164."
+
+; Misc options
+misc.letter_closing = "Sincerely,"
+
+; Set Database Date Style - uncomment desired style
+;misc.datestyle = "SET DATESTYLE TO 'ISO';" ;ISO example: 1997-12-17 07:37:16-08';\n"
+misc.datestyle = "SET DATESTYLE TO 'SQL';" ;SQL example: 12/17/1997 07:37:16.00 PST';\n"
+;misc.datestyle = "SET DATESTYLE TO 'Postgres';" ;Postgres example: Wed Dec 17 07:37:16 1997 PST';\n"
+;misc.datestyle = "SET DATESTYLE TO 'European';" ;European example: 17/12/1997 15:37:16.00 MET';\n"
+;misc.datestyle = "SET DATESTYLE TO 'US';" ;US example: 12/17/1997 07:37:16.00 PST';\n"
+;misc.datestyle = "SET DATESTYLE TO 'German';" ;German example: 17.12.1997 07:37:16.00 PST';\n"
+
+;
+; Event Housing specific parameters
+;
+housing.system_title = "Gaslight Media - Event Housing"
+housing.select_method = "List" ;Method of selecting Conventions, "Pick" - Picklist, "List" - Detailed list
+housing.sort_order = "Distance" ;Member list sort order ("Alpha", "Distance", "PseudoRandom", etc)
+housing.hold_timeout = 10 ;Hold time in minutes for accommodations in process of being booked
+housing.require_member_ccards = true ;Members must offer credit cards to make properties available for booking
+housing.proc_method = "authorize" ;Cards processed by authorize.net (see proc_method below)
+housing.inventory = true ;Enable Convention Housing Inventory
+housing.golf = false ;Enable Convention Golf
+
+; Terms used to refer to events/conventions
+housing.terms.event.norm = "event"
+housing.terms.event.cap = "Event"
+housing.terms.event.plur = "events"
+housing.terms.event.plur_cap = "Events"
+
+; Terms used to refer to a housing Property/Hotel
+housing.terms.prop.norm = "property"
+housing.terms.prop.cap = "Property"
+housing.terms.prop.plur = "properties"
+housing.terms.prop.plur_cap = "Properties"
+
+; Terms used to refer to a housing unit
+housing.terms.unit.norm = "accommodation"
+housing.terms.unit.cap = "Accommodation"
+housing.terms.unit.plur = "accommodations"
+housing.terms.unit.plur_cap = "Accommodations"
+
+;
+; General Reservations specific parameters
+;
+reservations.promotions = false ;Enable reservations promotions
+reservations.hotel = true ;Hotel/Motel reservations
+reservations.campground = false ;Campground reservations
+reservations.bedandbreakfast = false ;Bed/Breakfast reservations
+reservations.condo = false ;Condo/Home reservations
+reservations.marina = false ;Marina reservations
+reservations.max_days = 15 ;Maximum number of reservation days
+reservations.max_rooms = 30 ;Maximum number of rooms reserveable at once
+
+; Calendar parameters
+calendar.months_before = 2
+calendar.months_after = 24
+calendar.links_before = 1
+calendar.links_after = 1
+
+
+;
+; Other misc site related setttings
+;
+
+; Image information
+image_server = "is0.gaslightmedia.com"
+image_user = "greatlakesbayregion"
+image_style.1 = "memberPhotos"
+image_style.2 = "tbs1"
+image_style.3 = "pgs2"
+
+;
+; *** End of General Configuration for Event Housing System ***
+;
+
+; Standard arrays
+
+; Processing Methods
+proc_method.1 = merchant ;Merchant processes cards
+proc_method.2 = authorize ;Processed by Authorize.net
+
+; Processing Status
+proc_status.new = 0
+proc_status.descr.0 = "New Registration Record"
+proc_status.unpaid = 1
+proc_status.descr.1 = "Not Paid"
+proc_status.cc_pend = 2
+proc_status.descr.2 = "Credit Card Pending"
+proc_status.cc_paid = 3
+proc_status.descr.3 = "Paid by Credit Card"
+proc_status.cc_decl = 4
+proc_status.descr.4 = "Credit Card Declined"
+proc_status.check_pend = 5
+proc_status.descr.5 = "Check Pending"
+proc_status.check_paid = 6
+proc_status.descr.6 = "Paid by Check"
+proc_status.comp = 7
+proc_status.descr.7 = "Complimentary"
+proc_status.failed = 98
+proc_status.descr.98 = "Submission Failed"
+proc_status.canceled = 99
+proc_status.descr.99 = "Canceled"
+
+; Payment Types
+pay_types.1 = "Credit Card"
+pay_types.2 = "Check"
+pay_types.3 = "Direct"
+
+; Confirmation Methods
+conf_methods.1 = "US Mail"
+conf_methods.2 = "E-Mail"
+
+; Reference Types
+reference_type.misc = 0
+reference_type.event = 1
+reference_type.property = 2
+reference_type.state = 3
+reference_type.team = 4
+
+; Reference Type Numbers
+reference_type_numb.0 = "Misc"
+reference_type_numb.1 = "Event"
+reference_type_numb.2 = "Property"
+reference_type_numb.3 = "State Rep"
+reference_type_numb.4 = "Team"
+
+; Fee Method
+fee_method.fixed_stay = 1
+fee_method.fixed_accom = 2
+fee_method.fixed_accomnight = 3
+fee_method.percent_stay = 10
+
+; Fee Method Numbers
+fee_method_numb.1 = "Amount per Reservation"
+fee_method_numb.2 = "Amount per Accommodation"
+fee_method_numb.3 = "Amount per Accommodation/Night"
+fee_method_numb.10 = "Percent of Room Rate"
+
+; Member/Property Amenities
+; Static amenitities set system-wide
+; Only 10 fields in member records for these at this time
+; Needs to be replaced with managed amenities list
+memb_amen.1 = "Air-Conditioning"
+memb_amen.2 = "Barrier Free"
+memb_amen.3 = "Coffee Pot"
+memb_amen.4 = "Hair Dryer"
+memb_amen.5 = "Interior Corridor"
+memb_amen.6 = "Microwave"
+memb_amen.7 = "Refrigerator"
+;memb_amen.8 = "Shopping nearby"
+;memb_amen.9 = "Indoor pool"
+;memb_amen.10 = "Outdoor pool"
+;memb_amen.? = "Sauna"
+;memb_amen.? = "Whirlpool"
+;memb_amen.? = "Valet/Charge Parking"
+;memb_amen.? = "Self-operated coin laundry"
+;memb_amen.? = "Free parking"
+;memb_amen.? = "Fitness area"
+;memb_amen.? = "Room service"
+;memb_amen.? = "Conference/Meeting facilities"
+;memb_amen.? = "Restaurant nearby"
+;memb_amen.? = "Restaurant on site"
+;memb_amen.? = "Barrier free guest rooms available"
+;memb_amen.? = "Pets"
+;memb_amen.? = "Golf nearby"
+
+; Accommodatation Amenitities
+; NOT USED AT THIS TIME
+;accom_amen.1 = "Cable TV"
+;accom_amen.2 = "Movies in Room"
+;accom_amen.3 = "Barrier Free Access"
+;accom_amen.4 = "Smoke Free Room"
+;accom_amen.5 = "Jacuzzi in Room"
+;accom_amen.6 = "Iron and Ironing Board"
+;accom_amen.7 = "Coffee Pot in Room"
+;accom_amen.8 = "Refrigerator in Room"
+;accom_amen.9 = "Microwave in Room"
+;accom_amen.10 = "Safe"
+;accom_amen.11 = "Hair Dryer"
+
+; Accommodation Room Categories
+room_category.0 = "n/a"
+room_category.1 = "Bed"
+room_category.2 = "Room"
+room_category.3 = "Suite"
+
+; Accommodation Room Types
+room_types.0 = "n/a"
+room_types.1 = "Main"
+room_types.2 = "Bedroom"
+room_types.3 = "Kitchen"
+room_types.4 = "Living Room"
+
+; Accommodation Bath Types
+bath_types.0 = "None"
+bath_types.1 = "Full"
+bath_types.2 = "Half"
+bath_types.3 = "Sink"
+
+; States
+states.AL = "Alabama"
+states.AK = "Alaska"
+states.AB = "Alberta"
+states.AZ = "Arizona"
+states.AR = "Arkansas"
+states.BC = "British Columbia"
+states.CA = "California"
+states.CO = "Colorado"
+states.CT = "Connecticut"
+states.DE = "Delaware"
+states.DC = "District of Columbia"
+states.FL = "Florida"
+states.GA = "Georgia"
+states.GU = "Guam"
+states.HI = "Hawaii"
+states.ID = "Idaho"
+states.IL = "Illinois"
+states.IN = "Indiana"
+states.IA = "Iowa"
+states.KS = "Kansas"
+states.KY = "Kentucky"
+states.LA = "Louisiana"
+states.ME = "Maine"
+states.MB = "Manitoba"
+states.MD = "Maryland"
+states.MA = "Massachusetts"
+states.MI = "Michigan"
+states.MN = "Minnesota"
+states.MS = "Mississppi"
+states.MO = "Missouri"
+states.MT = "Montana"
+states.NE = "Nebraska"
+states.NV = "Nevada"
+states.NB = "New Brunswick"
+states.NF = "Newfoundland"
+states.NH = "New Hampshire"
+states.NJ = "New Jersey"
+states.NM = "New Mexico"
+states.NY = "New York"
+states.NC = "North Carolina"
+states.ND = "North Dakota"
+states.NT = "Northwest Territories"
+states.NS = "Nova Scotia"
+states.OH = "Ohio"
+states.OK = "Oklahoma"
+states.ON = "Ontario"
+states.OR = "Oregon"
+states.PA = "Pennsylvania"
+states.PE = "Prince Edward Island"
+states.PR = "Puerto Rico"
+states.QC = "Quebec"
+states.RI = "Rhode Island"
+states.SK = "Saskatchewan"
+states.SC = "South Carolina"
+states.SD = "South Dakota"
+states.TN = "Tennessee"
+states.TX = "Texas"
+states.UT = "Utah"
+states.VT = "Vermont"
+states.VI = "Virgin Islands"
+states.VA = "Virginia"
+states.WA = "Washington"
+states.WV = "West Virginia"
+states.WI = "Wisconsin"
+states.WY = "Wyoming"
+states.YT = "Yukon"
+
+; Countries
+countries.US = "United States"
+countries.CA = "Canada"
+countries.AF = "Afghanistan"
+countries.AX = "Land Islands"
+countries.AL = "Albania"
+countries.DZ = "Algeria"
+countries.AS = "American Samoa"
+countries.AD = "Andorra"
+countries.AO = "Angola"
+countries.AI = "Anguilla"
+countries.AQ = "Antarctica"
+countries.AG = "Antigua and Barbuda"
+countries.AR = "Argentina"
+countries.AM = "Armenia"
+countries.AW = "Aruba"
+countries.AU = "Australia"
+countries.AT = "Austria"
+countries.AZ = "Azerbaijan"
+countries.BS = "Bahamas"
+countries.BH = "Bahrain"
+countries.BD = "Bangladesh"
+countries.BB = "Barbados"
+countries.BY = "Belarus"
+countries.BE = "Belgium"
+countries.BZ = "Belize"
+countries.BJ = "Benin"
+countries.BM = "Bermuda"
+countries.BT = "Bhutan"
+countries.BO = "Bolivia"
+countries.BA = "Bosnia and Herzegovina"
+countries.BW = "Botswana"
+countries.BV = "Bouvet Island"
+countries.BR = "Brazil"
+countries.IO = "British Indian Ocean Territory"
+countries.BN = "Brunei Darussalam"
+countries.BG = "Bulgaria"
+countries.BF = "Burkina Faso"
+countries.BI = "Burundi"
+countries.KH = "Cambodia"
+countries.CM = "Cameroon"
+countries.CV = "Cape Verde"
+countries.KY = "Cayman Islands"
+countries.CF = "Central African Republic"
+countries.TD = "Chad"
+countries.CL = "Chile"
+countries.CN = "China"
+countries.CX = "Christmas Island"
+countries.CC = "Cocos (Keeling) Islands"
+countries.CO = "Colombia"
+countries.KM = "Comoros"
+countries.CG = "Congo"
+countries.CD = "Congo, the Democratic Rep. of"
+countries.CK = "Cook Islands"
+countries.CR = "Costa Rica"
+countries.CI = "Cote D'Ivoire"
+countries.HR = "Croatia"
+countries.CU = "Cuba"
+countries.CY = "Cyprus"
+countries.CZ = "Czech Republic"
+countries.DK = "Denmark"
+countries.DJ = "Djibouti"
+countries.DM = "Dominica"
+countries.DO = "Dominican Republic"
+countries.EC = "Ecuador"
+countries.EG = "Egypt"
+countries.SV = "El Salvador"
+countries.GQ = "Equatorial Guinea"
+countries.ER = "Eritrea"
+countries.EE = "Estonia"
+countries.ET = "Ethiopia"
+countries.FK = "Falkland Islands (Malvinas)"
+countries.FO = "Faroe Islands"
+countries.FJ = "Fiji"
+countries.FI = "Finland"
+countries.FR = "France"
+countries.GF = "French Guiana"
+countries.PF = "French Polynesia"
+countries.TF = "French Southern Territories"
+countries.GA = "Gabon"
+countries.GM = "Gambia"
+countries.GE = "Georgia"
+countries.DE = "Germany"
+countries.GH = "Ghana"
+countries.GI = "Gibraltar"
+countries.GR = "Greece"
+countries.GL = "Greenland"
+countries.GD = "Grenada"
+countries.GP = "Guadeloupe"
+countries.GU = "Guam"
+countries.GT = "Guatemala"
+countries.GN = "Guinea"
+countries.GW = "Guinea-Bissau"
+countries.GY = "Guyana"
+countries.HT = "Haiti"
+countries.HM = "Heard Island, McDonald Islands"
+countries.VA = "Holy see (Vatican City State)"
+countries.HN = "Honduras"
+countries.HK = "Hong Kong"
+countries.HU = "Hungary"
+countries.IS = "Iceland"
+countries.IN = "India"
+countries.ID = "Indonesia"
+countries.IR = "Iran, Islamic Republic of"
+countries.IQ = "Iraq"
+countries.IE = "Ireland"
+countries.IL = "Israel"
+countries.IT = "Italy"
+countries.JM = "Jamaica"
+countries.JP = "Japan"
+countries.JO = "Jordan"
+countries.KZ = "Kazakhstan"
+countries.KE = "Kenya"
+countries.KI = "Kiribati"
+countries.KP = "Korea, Democratic People's Rep. of"
+countries.KR = "Korea, Republic of"
+countries.KW = "Kuwait"
+countries.KG = "Kyrgyzstan"
+countries.LA = "Lao People's Democratic Republic"
+countries.LV = "Latvia"
+countries.LB = "Lebanon"
+countries.LS = "Lesotho"
+countries.LR = "Liberia"
+countries.LY = "Libyan Arab Jamahiriya"
+countries.LI = "Liechtenstein"
+countries.LT = "Lithuania"
+countries.LU = "Luxembourg"
+countries.MO = "Macao"
+countries.MK = "Macedonia, the Former Yugoslav Rep."
+countries.MG = "Madagascar"
+countries.MW = "Malawi"
+countries.MY = "Malaysia"
+countries.MV = "Maldives"
+countries.ML = "Mali"
+countries.MT = "Malta"
+countries.MH = "Marshall Islands"
+countries.MQ = "Martinique"
+countries.MR = "Mauritania"
+countries.MU = "Mauritius"
+countries.YT = "Mayotte"
+countries.MX = "Mexico"
+countries.FM = "Micronesia, Federated States of"
+countries.MD = "Moldova, Republic of"
+countries.MC = "Monaco"
+countries.MN = "Mongolia"
+countries.MS = "Montserrat"
+countries.MA = "Morocco"
+countries.MZ = "Mozambique"
+countries.MM = "Myanmar"
+countries.NA = "Namibia"
+countries.NR = "Nauru"
+countries.NP = "Nepal"
+countries.NL = "Netherlands"
+countries.AN = "Netherlands Antilles"
+countries.NC = "New Caledonia"
+countries.NZ = "New Zealand"
+countries.NI = "Nicaragua"
+countries.NE = "Niger"
+countries.NG = "Nigeria"
+countries.NU = "Niue"
+countries.NF = "Norfolk Island"
+countries.MP = "Northern Mariana Islands"
+countries.NO = "Norway"
+countries.OM = "Oman"
+countries.PK = "Pakistan"
+countries.PW = "Palau"
+countries.PS = "Palestinian Territory, Occupied"
+countries.PA = "Panama"
+countries.PG = "Papua New Guinea"
+countries.PY = "Paraguay"
+countries.PE = "Peru"
+countries.PH = "Philippines"
+countries.PN = "Pitcairn"
+countries.PL = "Poland"
+countries.PT = "Portugal"
+countries.PR = "Puerto Rico"
+countries.QA = "Qatar"
+countries.RE = "Reunion"
+countries.RO = "Romania"
+countries.RU = "Russian Federation"
+countries.RW = "Rwanda"
+countries.SH = "Saint Helena"
+countries.KN = "Saint Kitts and Nevis"
+countries.LC = "Saint Lucia"
+countries.PM = "Saint Pierre and Miquelon"
+countries.VC = "Saint Vincent and the Grenadines"
+countries.WS = "Samoa"
+countries.SM = "San Marino"
+countries.ST = "Sao Tome and Principe"
+countries.SA = "Saudi Arabia"
+countries.SN = "Senegal"
+countries.CS = "Serbia and Montenegro"
+countries.SC = "Seychelles"
+countries.SL = "Sierra Leone"
+countries.SG = "Singapore"
+countries.SK = "Slovakia"
+countries.SI = "Slovenia"
+countries.SB = "Solomon Islands"
+countries.SO = "Somalia"
+countries.ZA = "South Africa"
+countries.GS = "South Georgia, South Sandwich Islands"
+countries.ES = "Spain"
+countries.LK = "Sri Lanka"
+countries.SD = "Sudan"
+countries.SR = "Suriname"
+countries.SJ = "Svalbard and Jan Mayen"
+countries.SZ = "Swaziland"
+countries.SE = "Sweden"
+countries.CH = "Switzerland"
+countries.SY = "Syrian Arab Republic"
+countries.TW = "Taiwan, Province of China"
+countries.TJ = "Tajikistan"
+countries.TZ = "Tanzania, United Republic of"
+countries.TH = "Thailand"
+countries.TL = "Timor-Leste"
+countries.TG = "Togo"
+countries.TK = "Tokelau"
+countries.TO = "Tonga"
+countries.TT = "Trinidad and Tobago"
+countries.TN = "Tunisia"
+countries.TR = "Turkey"
+countries.TM = "Turkmenistan"
+countries.TC = "Turks and Caicos Islands"
+countries.TV = "Tuvalu"
+countries.UG = "Uganda"
+countries.UA = "Ukraine"
+countries.AE = "United Arab Emirates"
+countries.GB = "United Kingdom"
+countries.UM = "United States minor outlying islands"
+countries.UY = "Uruguay"
+countries.UZ = "Uzbekistan"
+countries.VU = "Vanuatu"
+countries.VE = "Venezuela"
+countries.VN = "Viet Nam"
+countries.VG = "Virgin Islands, British"
+countries.VI = "Virgin Islands, U.S."
+countries.WF = "Wallis and Futuna"
+countries.EH = "Western Sahara"
+countries.YE = "Yemen"
+countries.ZM = "Zambia"
+countries.ZW = "Zimbabwe"
+
+;HTML Area
+htmlarea.enabled = true
+htmlarea.setup_delay = 1000
+htmlarea.start_delay = 500
+htmlarea.plugs = "
+ editor.registerPlugin(CharacterMap);
+ editor.registerPlugin(ContextMenu);
+ editor.registerPlugin(ListType);
+ editor.registerPlugin(TableOperations);
+"
+htmlarea.toolbar = "
+ config.toolbar =
+ [
+ [
+ "fontname",
+ "fontsize",
+ "formatblock",
+ "space",
+ "bold",
+ "italic",
+ "underline",
+ "strikethrough",
+ "separator",
+ "subscript",
+ "superscript",
+ "separator",
+ "copy",
+ "cut",
+ "paste",
+ "space",
+ "undo",
+ "redo"
+ ],
+ [
+ "justifyleft",
+ "justifycenter",
+ "justifyright",
+ "justifyfull",
+ "separator",
+ "lefttoright",
+ "righttoleft",
+ "separator",
+ "ListType",
+ "insertorderedlist",
+ "insertunorderedlist",
+ "separator",
+ "outdent",
+ "indent",
+ "separator",
+ "forecolor",
+ "hilitecolor",
+ "separator",
+ "inserthorizontalrule",
+ "createlink",
+ "inserttable",
+ "htmlmode",
+ "separator",
+ "popupeditor"
+ ]
+ ];
+"
+
+[production : common]
+; Debugging and Testing parameters
+option.preview = false ;Use "preview=1" in links to support preview feature
+debug.level = 0 ;Debug level - 0=off
+debug.view_parameters = false ;Display all View tags and information
+debug.housing_query = false ;Display main housing query
+debug.pricing = false ;Detailed information on pricing and cost calculations
+debug.checkout = false ;Display checkout processing steps and data
+debug.mail = false ;Display mail rather than send it
+url.app = "app.gaslightmedia.com/"
+
+[development : common]
+; Debugging and Testing parameters
+option.preview = true ;Use "preview=1" in links to support preview feature
+debug.level = 0 ;Debug level - 0=off
+debug.view_parameters = false ;Display all View tags and information
+debug.housing_query = false ;Display main housing query
+debug.pricing = false ;Detailed information on pricing and cost calculations
+debug.checkout = false ;Display checkout processing steps and data
+debug.mail = faLse ;Display mail rather than send it
+url.app = "dev52.gaslightmedia.com/app.gaslightmedia.com/"
+
+[chuck : common]
+; Debugging and Testing parameters
+option.preview = true ;Use "preview=1" in links to support preview feature
+debug.level = 0 ;Debug level - 0=off, 1=Show Function Calls
+debug.view_parameters = true ;Display all View tags and information
+debug.housing_query = false ;Display main housing query
+debug.pricing = false ;Detailed information on pricing and cost calculations
+debug.checkout = true ;Display checkout processing steps and data
+debug.mail = false ;Display mail rather than send it
+url.app = "192.168.44.3/app.gaslightmedia.com/"
--- /dev/null
+; EventManagement Application ini file
+
+[production]
+
+; Event Management V3
+
+; The page id in the toolbox that is the entry page for Event management - Generally set for each server
+application_page = 121 ;Page ID for this application
+application_url = "order-tickets-online-6" ;Optional URL segment for application
+
+members_only_page = 122 ;Page ID for members only area
+members_only_url = "members-only-area" ;Optional URL segment for members only area
+
+option.member_db_integrated = false ;Use Standard Member DB: true = Use standard Member DB, false = Use Separate Member DB
+option.events = false
+option.accommodations = false ;Enable Reservations for members (not event housing)
+option.tickets = true ;Enable Ticket Sales
+ option.tickets_select_max = 50 ; Maximum ticket quantity that can be selected at a time
+option.packages = false ;Enable Packages
+option.teams = false ;Enable Team housing features
+option.registrations = false ;Enable Convention Registrations
+option.select_images = false ;Display venue, event, and other images on the selection pages - other than maps and such
+option.cart_images = false ;Display venue, event, and other images on the cart page
+option.cart_images = false ;Display venue, event, and other images on the cart page
+option.checkout_images = false ;Display venue, event, and other images on the checkout page
+option.cart_promotions = true ;Permit promoting other performances on cart page
+option.users_access_all_members = true ;Member contact users can have access to all members data
+option.ask_for_likely_date = false ;Ask user for a likely date they would use for non-date-specific tickets (in cart)
+option.confirmation_voucher = 'link' ;How to handle voucher with confirmation E-Mail: Off, 'link', 'attached'
+
+jQueryLoaded = true ;Say whether jQuery is already loaded by the site
+jQueryUiLoaded = true ;Say whether jQueryUI is already loaded by the site
+
+ticket_hold_time = 60 ;Time in minutes to hold tickets in a cart
+session_timeout = 60 ;Time in minutes before session times out
+admin_session_timeout = 1560 ;Time in minutes before admin session times out
+
+; Front-End Appearance Settings
+default_front_interface = "tickets"
+custom_css = false ;Should look for /css/EventManangement.css in customer site
+voucher_design = "Generic" ;Design file to use for vouchers - See /models/vouchers directory
+site_has_foundation = true ;Site already loads foundation - blocks loading in ticketing front-end header
+
+; Admin Appearance Settings
+default_admin_interface = "tickets"
+
+; Ticket Selection Process Options
+option.ticket_selection.start_at_cart = true ;Start with shopping cart - Used with cart-sticky items.
+option.ticket_selection.show_tickets_on_start_page = true ;Should we show the tickets on the selection start page or just venues/performances
+option.ticket_selection.force_section = false ;Always show section selection even if there's only one
+option.ticket_selection.include_options_in_ticket_list = true ;Include ticket options in ticket selection list (date, quant, etc)
+option.ticket_selection.select_entrance_on_consignment = true ;If selling a ticket on consignment and the user has to select a venu to purchase the
+ ; ticket from, if entrances are listed for a venu, use entrances for selection rather than
+ ; just venue.
+option.ticket_selection.show_cart_sticky_items = true ;Enable/disable cart sticky items
+
+; Image Styles
+image_style.default = "tbs1"
+image_style.large = "ticketsLarge"
+image_style.medium = "ticketsMedium"
+image_style.small = "ticketsSmall"
+image_style.thumb = "ticketsThumb"
+
+; Terms used to refer to events/conventions
+term.event.norm = "event"
+term.event.cap = "Event"
+term.event.plur = "events"
+term.event.plur_cap = "Events"
+
+; Terms used to refer to a housing Member/Property/Hotel
+term.prop.norm = "location"
+term.prop.cap = "Location"
+term.prop.plur = "locations"
+term.prop.plur_cap = "Locations"
+
+; Terms used to refer to contacts
+term.contact.norm = "contact"
+term.contact.cap = "Contact"
+term.contact.plur = "contacts"
+term.contact.plur_cap = "Contacts"
+
+; Terms used to refer to scan/claim locations
+term.claim_location.norm = "claim location"
+term.claim_location.cap = "Claim Location"
+term.claim_location.plur = "claim locations"
+term.claim_location.plur_cap = "Claim Locations"
+
+; Terms used to refer to a housing unit
+term.unit.norm = "room"
+term.unit.cap = "Room"
+term.unit.plur = "rooms"
+term.unit.plur_cap = "Rooms"
+
+; Terms used to refer to an entrance
+term.entrance.norm = "dock"
+term.entrance.cap = "Dock"
+term.entrance.plur = "docks"
+term.entrance.plur_cap = "Docks"
+
+; Terms used to refer to a section
+term.section.norm = "section"
+term.section.cap = "Section"
+term.section.plur = "sections"
+term.section.plur_cap = "Sections"
+
+; Terms used to refer to a performance
+term.performance.norm = "category"
+term.performance.cap = "Category"
+term.performance.plur = "categories"
+term.performance.plur_cap = "Categories"
+
+; Terms used to refer to a ticket
+term.ticket.norm = "item"
+term.ticket.cap = "Item"
+term.ticket.plur = "items"
+term.ticket.plur_cap = "Items"
+
+; Terms used to refer to an order
+term.order.norm = "order"
+term.order.cap = "Order"
+term.order.plur = "orders"
+term.order.plur_cap = "Orders"
+
+; Terms used to refer to a voucher
+term.voucher.norm = "boarding pass"
+term.voucher.cap = "Boarding Pass"
+term.voucher.plur = "boarding passes"
+term.voucher.plur_cap = "Boarding Passes"
+
+; Terms used to refer to a promotion
+term.promo.norm = "promo code"
+term.promo.cap = "Promo Code"
+term.promo.plur = "promo codes"
+term.promo.plur_cap = "Promo Codes"
+
+; Terms used to refer to an attendance
+term.attendance.norm = "attendance"
+term.attendance.cap = "Attendance"
+term.attendance.plur = "attendance"
+term.attendance.plur_cap = "Attendance"
+
+; Terms used to refer to an attendee
+term.attendee.norm = "attendee"
+term.attendee.cap = "Attendee"
+term.attendee.plur = "attendees"
+term.attendee.plur_cap = "Attendees"
+
+; Terms used to refer to an attendace log
+term.attendance_log.norm = "attendance log"
+term.attendance_log.cap = "Attendance Log"
+term.attendance_log.plur = "attendance logs"
+term.attendance_log.plur_cap = "Attendance Logs"
+
+; Terms used to refer to entering (attendance)
+term.attendance_entering.norm = "entering"
+term.attendance_entering.cap = "Entering"
+term.attendance_entering.plur = "entering"
+term.attendance_entering.plur_cap = "Entering"
+
+; Terms used to refer to the start of a performance (event)
+term.performance_start.norm = "start of performance"
+term.performance_start.cap = "Start of Performance"
+term.performance_start.plur = "start of performances"
+term.performance_start.plur_cap = "Start of Performances"
+
+; Terms used to refer to the end of a performance (event)
+term.performance_end.norm = "end of performance"
+term.performance_end.cap = "End of Performance"
+term.performance_end.plur = "end of performances"
+term.performance_end.plur_cap = "End of Performances"
+
+; Terms used to refer to Coupons (advertisements) for vouchers
+term.coupon.norm = "voucher coupon"
+term.coupon.cap = "Voucher Coupon"
+term.coupon.plur = "voucher coupons"
+term.coupon.plur_cap = "Voucher Coupons"
+
+; Terms used for front-end shop navigation buttons
+;term.nav.show_selected = "Show Cart"
+term.nav.show_selected = "Cart"
+term.nav.select = "Select"
+;term.nav.select_more = "Select More"
+term.nav.select_more = "Shop"
+;term.nav.select_more_of_these = "Select More of These"
+term.nav.select_more_of_these = "More"
+term.nav.add_to_cart = "Add to Cart"
+term.nav.checkout = "Proceed to Checkout"
+term.nav.purchase = "Click to Purchase Selected Items"
+term.nav.print_vouchers = "Print Vouchers"
+term.nav.delete_from_cart = "Delete these items from your cart"
+
+; Prompts used for shop checkout fields
+text.cart.checkout.first_name = "First Name"
+text.cart.checkout.last_name = "Last Name"
+text.cart.checkout.address = "Address"
+text.cart.checkout.city = "City"
+text.cart.checkout.state = "State/Province"
+text.cart.checkout.country = "Country"
+text.cart.checkout.zip = "ZIP/Postal Code"
+text.cart.checkout.phone = "Phone"
+text.cart.checkout.email = "E-Mail Address"
+text.cart.checkout.email_again = "Enter E-Mail Address Again"
+text.cart.checkout.ok_to_send = "OK to Send E-Mail?"
+text.cart.checkout.special_req = "" ; If blank, don't use
+text.cart.checkout.activities_offers = "Please send information on activities and offers."
+
+; Other text used in the front end
+text.cart.select_assignment_location = "Please select the dock you are going to depart from."
+text.cart.select_likely_date = "Please select your likely departure date." ;For non-date-specific tickets
+
+; development server configuration data inherits from production and
+; overrides values as necessary
+[development : production]
+
+; chuck's server configuration data inherits from development
+; and overrides values as necessary
+[chuck : development]
+
+
+; john's server configuration data inherits from development
+; and overrides values as necessary
+[john : development]
+
+; steve's server configuration data inherits from development
+; and overrides values as necessary
+[steve : development]
+
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <style type="text/css">
+ h2 {
+ aligh: center;
+ }
+ .helpIndex{
+ border-bottom: solid black;
+ }
+ .mainSection {
+ border-bottom: solid black;
+ }
+ .subSection {
+ border-top: solid green;
+ }
+ </style>
+ </head>
+ <body>
+ <a name="helpHome"></a>
+ <div id="helpTitle">
+ <h2>Gaslight Media<br>Event Management System</h2>
+ </div>
+ <div class="helpIndex">
+ <ol>
+ <li>
+ <a href="#description">General Information</a>
+ <ul>
+ <li><a href="#descriptionSystemStructure">System Structure</a></li>
+ <li><a href="#descriptionNonTeamEvents">Non-Team Events</a></li>
+ <li><a href="#descriptionTeamEvents">Team Events</a></li>
+ </ul>
+ </li>
+ <li>
+ <a href="#proceedures">Common Proceedures
+ <ul>
+ <li><a href="#proceeduresSystemSetup">System Setup</a></li>
+ <li><a href="#proceeduresNonTeamEvent">Build an Non-Team Event</a></li>
+ <li><a href="#proceeduresTeamEvent">Build a Team Evnet</a></li>
+ </ul>
+ </li>
+ </ol>
+ </div>
+ <div class="mainSection" id="helpMain">
+
+ <a name="description"></a>
+ <h3>General Description</h3>
+ <p>
+ General description of system goes here.
+ </p>
+
+ <a name="descriptionSystemStructure"></a>
+ <div class="subSection"
+ <h3>System Structure</h3>
+ <p>
+ Discussion about system structure.
+ </p>
+ </div>
+
+ <a name="descriptionNonTeamEvents"></a>
+ <div class="subSection"
+ <h3>Non-Team Events</h3>
+ <p>
+ Discussion about Non-Team Events.
+ </p>
+ </div>
+
+ <a name="descriptionTeamEvents"></a>
+ <div class="subSection"
+ <h3>Team Events</h3>
+ <p>
+ Discussion about Team Events.
+ </p>
+ </div>
+
+ </div>
+ <div class="mainSection" id="helpMain">
+
+ <a name="proceedures"></a>
+ <h3>Common Proceedures</h3>
+ <p>
+ General description of common proceedures goes here.
+ </p>
+
+ <a name="proceeduresSystemSetup"></a>
+ <div class="subSection"
+ <h3>System Setup</h3>
+ <p>
+ Discussion about setting up system information.
+ </p>
+ </div>
+
+ </div>
+
+ </body>
+</html>
\ No newline at end of file
--- /dev/null
+<div class="emBlock">\r
+ <div id="ReportHead">\r
+ <div class="emBlockName">This is the report area....</div>\r
+ <p>\r
+ some stuff goes here\r
+ </p>\r
+ </div>\r
+</div>\r
+\r
+{startScript:h}\r
+ \r
+ // jQuery Section\r
+ $(document).ready(function(){\r
+\r
+ });\r
+\r
+</script>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Accommodation_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/rooms.php';\r
+$Rooms = new EventManagementAdminRooms($this->dbh, $this->config);\r
+\r
+\r
+$r = $Accoms->newAccom();\r
+\r
+$this->page->accomDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewAccom = true;\r
+\r
+$this->templateFile = 'Accommodation/EditAccommodation.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Accommodation_addRoom\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/rooms.php';\r
+$Rooms = new EventManagementAdminRooms($this->dbh, $this->config);\r
+\r
+\r
+$r = $Rooms->newRoom();\r
+\r
+$this->page->roomDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewRoom = true;\r
+\r
+$this->templateFile = 'Accommodation/EditRoom.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Accommodation_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/rooms.php';\r
+$Rooms = new EventManagementAdminRooms($this->dbh, $this->config);\r
+\r
+\r
+// Get Accommodation detail\r
+$accomDetail = $Accoms->getAccomDetail();\r
+$this->page->accomDetail = $this->bindArrayToObject($accomDetail);\r
+\r
+// Get Rooms list\r
+$roomsList = $Rooms->getRoomsList();\r
+$this->page->roomsList = $this->bindArrayToObject($roomsList);\r
+\r
+$this->templateFile = 'Accommodation/AccommodationDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Accommodation_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/rooms.php';\r
+$Rooms = new EventManagementAdminRooms($this->dbh, $this->config);\r
+\r
+\r
+$accomDetail = $Accoms->editAccom();\r
+$this->page->accomDetail = $this->bindArrayToObject($accomDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($accomDetail);\r
+\r
+$this->page->editingAccom = true;\r
+\r
+$this->templateFile = 'Accommodation/EditAccommodation.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Accommodation_editRoom\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/rooms.php';\r
+$Rooms = new EventManagementAdminRooms($this->dbh, $this->config);\r
+\r
+\r
+$roomDetail = $Rooms->editRoom();\r
+$this->page->roomDetail = $this->bindArrayToObject($roomDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($roomDetail);\r
+\r
+$this->templateFile = 'Accommodation/EditRoom.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Accommodation_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/rooms.php';\r
+$Rooms = new EventManagementAdminRooms($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Accoms->insertAccom();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->accomDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewAccom = true;\r
+ $this->templateFile = 'Accommodation/EditAccommodation.html';\r
+} else {\r
+ $this->templateFile = 'Accommodation/AccommodationDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Accommodation_insertRoom\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/rooms.php';\r
+$Rooms = new EventManagementAdminRooms($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Rooms->insertRoom();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->roomDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewRoom = true;\r
+ $this->templateFile = 'Accommodation/EditRoom.html';\r
+} else {\r
+\r
+ // Get Accommodation detail\r
+ $accomDetail = $Accoms->getAccomDetail();\r
+ $this->page->accomDetail = $this->bindArrayToObject($accomDetail);\r
+\r
+ // Get Rooms list\r
+ $roomsList = $Rooms->getRoomsList();\r
+ $this->page->roomsList = $this->bindArrayToObject($roomsList);\r
+\r
+ $this->templateFile = 'Accommodation/AccommodationDetail.html';\r
+\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Accommodation_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/rooms.php';\r
+$Rooms = new EventManagementAdminRooms($this->dbh, $this->config);\r
+\r
+\r
+// Get members stats\r
+$accomsStats = $Accoms->getAccomsStats();\r
+$this->page->accomsStats = $this->bindArrayToObject($accomsStats);\r
+\r
+// Get accommodations list\r
+$accoms = $Accoms->getAccomsList();\r
+$this->page->accomsList = $this->bindArrayToObject($accoms);\r
+\r
+$this->templateFile = 'Accommodation/AccommodationsList.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Accommodation_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/rooms.php';\r
+$Rooms = new EventManagementAdminRooms($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Accoms->updateAccom();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->accomDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$accomDetail = $Accoms->getAccomDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($accomDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingAccom = true;\r
+ $this->templateFile = 'Accommodation/EditAccommodation.html';\r
+} else {\r
+ $this->templateFile = 'Accommodation/AccommodationDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Accommodation_updateRoom\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/rooms.php';\r
+$Rooms = new EventManagementAdminRooms($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Rooms->updateRoom();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->roomDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$accomDetail = $Rooms->getRoomDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($roomDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->templateFile = 'Accommodation/EditRoom.html';\r
+} else {\r
+\r
+ // Get Accommodation detail\r
+ $accomDetail = $Accoms->getAccomDetail();\r
+ $this->page->accomDetail = $this->bindArrayToObject($accomDetail);\r
+\r
+ // Get Rooms list\r
+ $roomsList = $Rooms->getRoomsList();\r
+ $this->page->roomsList = $this->bindArrayToObject($roomsList);\r
+\r
+ $this->templateFile = 'Accommodation/AccommodationDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Addon_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: add.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/addons.php';\r
+$Addons = new EventManagementAdminAddons($this->dbh, $this->config);\r
+\r
+$r = $Addons->newAddon();\r
+\r
+$this->page->addonDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+$this->page->addingNewAddon = true;\r
+\r
+$this->templateFile = 'Addon/edit.html';\r
+\r
+$this->addDebug("Addon/add.inc", 'Array: $r', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Addon_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: confirmDelete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/addons.php';\r
+$Addons = new EventManagementAdminAddons($this->dbh, $this->config);\r
+\r
+$addonDetail = $Addons->addonDelete(true);\r
+$this->page->addonDetail = $this->bindArrayToObject($addonDetail);\r
+\r
+$this->templateFile = 'Addon/detail.html';\r
+\r
+$this->addDebug("Addon/confirmDelete.inc", 'Section Confirm Delete', print_r($addonDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Addon_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: delete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/addons.php';\r
+$Addons = new EventManagementAdminAddons($this->dbh, $this->config);\r
+\r
+$addonDetail = $Addons->addonDelete(false);\r
+$this->page->addonDetail = $this->bindArrayToObject($addonDetail);\r
+\r
+$this->templateFile = 'Addon/delete.html';\r
+\r
+$this->addDebug("Addon/delete.inc", 'Array: $addonDetail', print_r($addonDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Addon_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: detail.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/addons.php';\r
+$Addons = new EventManagementAdminAddons($this->dbh, $this->config);\r
+\r
+// Get Add-on detail\r
+$addonDetail = $Addons->getAddonDetail();\r
+$this->page->addonDetail = $this->bindArrayToObject($addonDetail);\r
+\r
+$this->templateFile = 'Addon/detail.html';\r
+\r
+$this->addDebug("Addon/detail.inc", 'Array: $addonDetail', print_r($addonDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Addon_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: edit.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/addons.php';\r
+$Addons = new EventManagementAdminAddons($this->dbh, $this->config);\r
+\r
+$addonDetail = $Addons->editAddon();\r
+$this->page->addonDetail = $this->bindArrayToObject($addonDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($addonDetail);\r
+\r
+$this->page->editingAddon = true;\r
+\r
+$this->templateFile = 'Addon/edit.html';\r
+\r
+$this->addDebug("Addon/edit.inc", 'Array: $addonDetail', print_r($addonDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Addon_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: insert.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/addons.php';\r
+$Addons = new EventManagementAdminAddons($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Addons->insertAddon();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->addonDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewAddon = true;\r
+ $this->templateFile = 'Addon/edit.html';\r
+} else {\r
+\r
+ $addonID = $r['fieldData']['id'];\r
+\r
+ $this->templateFile = 'Addon/selected.html';\r
+}\r
+\r
+$this->addDebug("Addon/insert.inc", 'Array: $r', print_r($r,1));\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Addon_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: list.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/addons.php';\r
+$Addons = new EventManagementAdminAddons($this->dbh, $this->config);\r
+\r
+// Get Add-On stats\r
+$addonStats = $Addons->getAddonsStats();\r
+$this->page->addonsStats = $this->bindArrayToObject($addonsStats);\r
+\r
+// Get Add-Ons list\r
+$addons = $Addons->getAddonsList($id, false, false, $type);\r
+$this->page->addons = $this->bindArrayToObject($addons);\r
+\r
+$this->templateFile = 'Addon/list.html';\r
+\r
+$this->addDebug("Addon/list.inc", 'Array: $addons', print_r($addons,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Addon_selected\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: selected.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/addons.php';\r
+$Addons = new EventManagementAdminAddons($this->dbh, $this->config);\r
+\r
+$addonDetail = $Addons->getAddonDetail();\r
+$this->page->addonDetail = $this->bindArrayToObject($addonDetail);\r
+\r
+$this->templateFile = 'Addon/selected.html';\r
+\r
+$this->addDebug("Addon/selected.inc", 'Addon Detail', print_r($addonDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Addon_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: update.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/addons.php';\r
+$Addons = new EventManagementAdminAddons($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Addons->updateAddon();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->addonDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$addonDetail = $Addons->getAddonDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($addonDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingAddon = true;\r
+ $this->templateFile = 'Addon/edit.html';\r
+} else {\r
+ $this->templateFile = 'Addon/detail.html';\r
+}\r
+\r
+$this->addDebug("Addon/update.inc", 'Array: $r', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Attendance_Add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: attendance.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Get a list of members to select from\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+$members = $Members->getMembersList('all');\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/attendance.php';\r
+$Attendance = new EventManagementAdminAttendance($this->dbh, $this->config);\r
+\r
+$r = $Attendance->newEntry();\r
+\r
+$this->page->memberDetail = $this->bindArrayToObject($member);\r
+$this->page->attendanceDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+$this->page->addingNewAttendance = true;\r
+\r
+$this->templateFile = 'Attendance/edit.html';\r
+\r
+$this->addDebug("Attendance/add.inc", 'Array: $r', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Attendance_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: confirmDelete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/attendance.php';\r
+$Attendance = new EventManagementAdminAttendance($this->dbh, $this->config);\r
+\r
+$attendanceDetail = $Attendance->attendanceDelete(true);\r
+$this->page->attendanceDetail = $this->bindArrayToObject($attendanceDetail);\r
+\r
+$this->templateFile = 'Attendance/detail.html';\r
+\r
+$this->addDebug("Attendance/confirmDelete.inc", 'Section Confirm Delete', print_r($attendanceDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Attendance_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: delete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/attendance.php';\r
+$Attendance = new EventManagementAdminAttendance($this->dbh, $this->config);\r
+\r
+$attendanceDetail = $Attendances->attendanceDelete(false);\r
+$this->page->attendanceDetail = $this->bindArrayToObject($attendanceDetail);\r
+\r
+$this->templateFile = 'Attendance/delete.html';\r
+\r
+$this->addDebug("Attendance/delete.inc", 'Array: $attendanceDetail', print_r($attendanceDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Attendance_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: detail.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/attendances.php';\r
+$Attendance = new EventManagementAdminAttendance($this->dbh, $this->config);\r
+\r
+// Get Attendance detail\r
+$attendanceDetail = $Attendance->getAttendanceDetail();\r
+$this->page->attendanceDetail = $this->bindArrayToObject($attendanceDetail);\r
+\r
+$this->templateFile = 'Attendance/detail.html';\r
+\r
+$this->addDebug("Attendance/detail.inc", 'Array: $attendanceDetail', print_r($attendanceDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Attendance_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: edit.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/attendance.php';\r
+$Attendance = new EventManagementAdminAttendance($this->dbh, $this->config);\r
+\r
+$attendanceDetail = $Attendance->editAttendance();\r
+$this->page->attendanceDetail = $this->bindArrayToObject($attendanceDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->attendanceDetail = $this->bindArrayToObject($attendanceDetail);\r
+\r
+$this->page->editingAttendance = true;\r
+\r
+$this->templateFile = 'Attendance/edit.html';\r
+\r
+$this->addDebug("Attendance/edit.inc", 'Array: $attendanceDetail', print_r($attendanceDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Attendance_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: insert.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+var_dump($_REQUEST);\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/attendance.php';\r
+$Attendance = new EventManagementAdminAttendance($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Attendance->insertEntry();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->attendanceDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewAttendance = true;\r
+ $this->templateFile = 'Attendance/edit.html';\r
+} else {\r
+\r
+ $attendanceID = $r['fieldData']['id'];\r
+\r
+ $this->templateFile = 'Attendance/selected.html';\r
+}\r
+\r
+$this->addDebug("Attendance/insert.inc", 'Array: $r', print_r($r,1));\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Attendance_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: list.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/attendance.php';\r
+$Attendance = new EventManagementAdminAttendance($this->dbh, $this->config);\r
+\r
+// Get Attendance stats\r
+$attendanceStats = $Attendance->getAttendanceStats();\r
+$this->page->attendanceStats = $this->bindArrayToObject($attendanceStats);\r
+\r
+// Get Attendance list\r
+$attendanceList = $Attendance->getList();\r
+$this->page->attendance = $this->bindArrayToObject($attendanceList);\r
+\r
+$this->templateFile = 'Attendance/list.html';\r
+\r
+$this->addDebug("Attendance/list.inc", 'Array: $attendanceList', print_r($attendanceList, 1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Attendance_selected\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: selected.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/attendance.php';\r
+$Attendance = new EventManagementAdminAttendance($this->dbh, $this->config);\r
+\r
+$attendanceDetail = $Attendance->getAttendanceDetail();\r
+$this->page->attendanceDetail = $this->bindArrayToObject($attendanceDetail);\r
+\r
+$this->templateFile = 'Attendance/selected.html';\r
+\r
+$this->addDebug("Attendance/selected.inc", 'Attendance Detail', print_r($attendanceDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Attendance_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: update.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/attendance.php';\r
+$Attendance = new EventManagementAdminAttendance($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Attendance->updateAttendance();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->attendanceDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$attendanceDetail = $Attendance->getAttendanceDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($AttendanceDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingAttendance = true;\r
+ $this->templateFile = 'Attendance/edit.html';\r
+ $this->addDebug("Attendance/update.inc", 'Array: $r', print_r($r,1));\r
+} else {\r
+ // $this->templateFile = 'Attendance/detail.html';\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/actions/Attendance/detail.inc';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Block_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/blocks.php';\r
+$Blocks = new EventManagementAdminBlocks($this->dbh, $this->config);\r
+\r
+\r
+// Get Room Blocks Detail for a selected Event and member (must have an event selected)\r
+$detail = $Blocks->getBlocksDetail();\r
+$this->page->blocksDetail = $this->bindArrayToObject($detail);\r
+$this->page->AND = '&&'; // a hack to get this into some javascript\r
+\r
+$this->templateFile = 'Block/BlocksDetail.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Block_show\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/blocks.php';\r
+$Blocks = new EventManagementAdminBlocks($this->dbh, $this->config);\r
+\r
+\r
+$roomBlocks = $Blocks->getRoomBlocks();\r
+\r
+if ($roomBlocks['blocks'] != false) {\r
+ $this->page->blocksList = $this->bindArrayToObject($roomBlocks['blocks']);\r
+}\r
+$this->page->statesList = $this->bindArrayToObject($roomBlocks['states']);\r
+\r
+// echo "<pre>".print_r($roomBlocks,1)."</pre>";\r
+$this->templateFile = 'Block/BlocksList.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Block_summary\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/blocks.php';\r
+$Blocks = new EventManagementAdminBlocks($this->dbh, $this->config);\r
+\r
+\r
+// Get Room Blocks Summary for a selected Event (must have an event selected)\r
+$summary = $Blocks->getBlocksSummary();\r
+$this->page->blocksSummary = $this->bindArrayToObject($summary);\r
+\r
+$this->templateFile = 'Block/BlocksSummary.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Block_updateBlocks\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/blocks.php';\r
+$Blocks = new EventManagementAdminBlocks($this->dbh, $this->config);\r
+\r
+\r
+$roomBlocks = $Blocks->saveRoomBlocks();\r
+\r
+$this->templateFile = 'Block/UpdateBlocksAssignment.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Block_updateDetail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/blocks.php';\r
+$Blocks = new EventManagementAdminBlocks($this->dbh, $this->config);\r
+\r
+\r
+$r = $Blocks->updateBlocksDetail();\r
+$this->page->blocksStatus = $r;\r
+\r
+$this->templateFile = 'Block/UpdateBlocksDetail.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Booking_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/bookings.php';\r
+$Bookings = new EventManagementAdminBookings($this->dbh, $this->config);\r
+\r
+\r
+if ($_SESSION[GLM_EVENT_SESSION]['Event'] != false) {\r
+ require '../classes/events.php';\r
+ $Events = new EventManagementAdminEvents($this->dbh, $this->config);\r
+ $eventDetail = $Events->getEntry($_SESSION[GLM_EVENT_SESSION]['Event']);\r
+ $this->page->eventName = $eventDetail['name'];\r
+ $this->page->eventID = $eventDetail['id'];\r
+ $this->page->haveEvent = true;\r
+} else {\r
+ $this->page->haveEvent = false;\r
+}\r
+\r
+if ($_SESSION[GLM_EVENT_SESSION]['Team'] != false) {\r
+ require '../classes/teams.php';\r
+ $Teams = new EventManagementAdminTeams($this->dbh, $this->config);\r
+ $teamDetail = $Teams->getEntry($_SESSION[GLM_EVENT_SESSION]['Team']);\r
+ $this->page->teamName = $teamDetail['name'];\r
+ $this->page->teamID = $teamDetail['id'];\r
+ $this->page->haveTeam = true;\r
+} else {\r
+ $this->page->haveTeam = false;\r
+}\r
+\r
+// If we have what we need - Get the list of members with inventory for the event\r
+if ($this->page->haveEvent && $this->page->haveTeam) {\r
+\r
+ // Get properties that have inventory for this event\r
+ $sql = "\r
+ SELECT id, name\r
+ FROM eventmgt.member\r
+ WHERE id IN\r
+ (\r
+ SELECT DISTINCT member\r
+ FROM eventmgt.inventory\r
+ WHERE event_code = '".$eventDetail['event_code']."'\r
+ )\r
+ ORDER BY name;\r
+ ";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $memberList = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+\r
+ $this->page->memberList = $this->bindArrayToObject($memberList);\r
+\r
+}\r
+\r
+// Get list of bookings for an event\r
+\r
+// Check for Booking Delete\r
+if (isset($_REQUEST['del'])) {\r
+ $del = ($_REQUEST['del'] - 0);\r
+ if ($del > 0) {\r
+ $sql = "DELETE\r
+ FROM eventmgt.team_property\r
+ WHERE id = $del\r
+ ;";\r
+\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ }\r
+}\r
+\r
+// Get bookings stats\r
+$bookingsStats = $Bookings->getBookingsStats();\r
+$this->page->bookingsStats = $this->bindArrayToObject($bookingsStats);\r
+\r
+// Get bookings list\r
+$bookings = $Bookings->getBookingsList();\r
+$this->page->bookingsList = $this->bindArrayToObject($bookings);\r
+\r
+$this->templateFile = 'Booking/BookingsList.html';\r
+\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Booking_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/bookings.php';\r
+$Bookings = new EventManagementAdminBookings($this->dbh, $this->config);\r
+\r
+\r
+$bookingDetail = $Bookings->getBookingDetail();\r
+$this->page->bookingDetail = $this->bindArrayToObject($bookingDetail);\r
+\r
+$this->templateFile = 'Booking/BookingDetail.html';\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Booking_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/bookings.php';\r
+$Bookings = new EventManagementAdminBookings($this->dbh, $this->config);\r
+\r
+\r
+if ($_SESSION[GLM_EVENT_SESSION]['Event'] != false) {\r
+ require '../classes/events.php';\r
+ $Events = new EventManagementAdminEvents($this->dbh, $this->config);\r
+ $eventDetail = $Events->getEntry($_SESSION[GLM_EVENT_SESSION]['Event']);\r
+ $this->page->eventName = $eventDetail['name'];\r
+ $this->page->eventID = $eventDetail['id'];\r
+ $this->page->haveEvent = true;\r
+} else {\r
+ $this->page->haveEvent = false;\r
+}\r
+\r
+if ($_SESSION[GLM_EVENT_SESSION]['Team'] != false) {\r
+ require '../classes/teams.php';\r
+ $Teams = new EventManagementAdminTeams($this->dbh, $this->config);\r
+ $teamDetail = $Teams->getEntry($_SESSION[GLM_EVENT_SESSION]['Team']);\r
+ $this->page->teamName = $teamDetail['name'];\r
+ $this->page->teamID = $teamDetail['id'];\r
+ $this->page->haveTeam = true;\r
+} else {\r
+ $this->page->haveTeam = false;\r
+}\r
+\r
+// If we have what we need - Get the list of members with inventory for the event\r
+if ($this->page->haveEvent && $this->page->haveTeam) {\r
+\r
+ // Get properties that have inventory for this event\r
+ $sql = "\r
+ SELECT id, name\r
+ FROM eventmgt.member\r
+ WHERE id IN\r
+ (\r
+ SELECT DISTINCT member\r
+ FROM eventmgt.inventory\r
+ WHERE event_code = '".$eventDetail['event_code']."'\r
+ )\r
+ ORDER BY name;\r
+ ";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $memberList = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+\r
+ $this->page->memberList = $this->bindArrayToObject($memberList);\r
+\r
+}\r
+\r
+// Insert a booking\r
+\r
+$insertSuccess = true;\r
+\r
+// Check for good Event, Team, and property data, must be id numbers\r
+$eventID = ($_REQUEST['eventID'] - 0);\r
+$teamID = ($_REQUEST['teamID'] - 0);\r
+$propID = ($_REQUEST['propID'] - 0);\r
+\r
+if ($eventID == 0 || $teamID == 0 || $propID == 0) {\r
+ $insertSuccess = false;\r
+}\r
+// Check for good dates - Must between now and start of event\r
+$startDate = strtotime($_REQUEST['startDate']);\r
+$endDate = strtotime($_REQUEST['endDate']);\r
+\r
+if ($startDate < strtotime(date('m/d/Y'))) {\r
+ $this->page->startFail = true;\r
+ $insertSuccess = false;\r
+}\r
+\r
+if ($endDate > strtotime($eventDetail['start_date'])) {\r
+ $this->page->endFail = true;\r
+ $insertSuccess = false;\r
+}\r
+\r
+if ($startDate > $endDate) {\r
+ $this->page->datesFail = true;\r
+ $insertSuccess = false;\r
+}\r
+\r
+// If we're Ok to this point, then try to add this booking to the database\r
+if ($insertSuccess) {\r
+ $startDate = date('m/d/Y', $startDate);\r
+ $endDate = date('m/d/Y', $endDate);\r
+\r
+ $sql = "\r
+ INSERT INTO eventmgt.team_property\r
+ (team, property, event, start, stop)\r
+ VALUES\r
+ (\r
+ $teamID, $propID, $eventID, '$startDate', '$endDate'\r
+ );\r
+ ";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ // NEED TO TEST FOR SUCCESS HERE\r
+}\r
+\r
+\r
+// If it failed, then try again\r
+if ($insertSuccess == false) {\r
+ $this->page->addingNewBooking = true;\r
+ $this->templateFile = 'Booking/EditBooking.html';\r
+} else {\r
+\r
+ // Check for Booking Delete\r
+ if (isset($_REQUEST['del'])) {\r
+ $del = ($_REQUEST['del'] - 0);\r
+ if ($del > 0) {\r
+ $sql = "DELETE\r
+ FROM eventmgt.team_property\r
+ WHERE id = $del\r
+ ;";\r
+\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ }\r
+ }\r
+\r
+ // Get bookings stats\r
+ $bookingsStats = $Bookings->getBookingsStats();\r
+ $this->page->bookingsStats = $this->bindArrayToObject($bookingsStats);\r
+\r
+ // Get bookings list\r
+ $bookings = $Bookings->getBookingsList();\r
+ $this->page->bookingsList = $this->bindArrayToObject($bookings);\r
+\r
+ $this->templateFile = 'Booking/BookingsList.html';\r
+\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Booking_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/bookings.php';\r
+$Bookings = new EventManagementAdminBookings($this->dbh, $this->config);\r
+\r
+\r
+// Check for Booking Delete\r
+if (isset($_REQUEST['del'])) {\r
+ $del = ($_REQUEST['del'] - 0);\r
+ if ($del > 0) {\r
+ $sql = "DELETE\r
+ FROM eventmgt.team_property\r
+ WHERE id = $del\r
+ ;";\r
+\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ }\r
+}\r
+\r
+// Get bookings stats\r
+$bookingsStats = $Bookings->getBookingsStats();\r
+$this->page->bookingsStats = $this->bindArrayToObject($bookingsStats);\r
+\r
+// Get bookings list\r
+$bookings = $Bookings->getBookingsList();\r
+$this->page->bookingsList = $this->bindArrayToObject($bookings);\r
+\r
+$this->templateFile = 'Booking/BookingsList.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Contact_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+// Get base data and fields\r
+$r = $Contacts->newContact();\r
+\r
+$this->page->contactDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewContact = true;\r
+\r
+$this->templateFile = 'Contact/edit.html';\r
+\r
+$this->addDebug("Contact/add.inc", 'Contact Add', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Contact_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+$contactDetail = $Contacts->contactDelete(true);\r
+$this->page->contactDetail = $this->bindArrayToObject($contactDetail);\r
+\r
+$this->templateFile = 'Contact/detail.html';\r
+\r
+$this->addDebug("Contact/confirmDelete.inc", 'Contact Confirm Delete', print_r($contactDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Contact_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+$contactDetail = $Contacts->contactDelete(false);\r
+$this->page->contactDetail = $this->bindArrayToObject($contactDetail);\r
+\r
+$this->templateFile = 'Contact/delete.html';\r
+\r
+$this->addDebug("Contact/delete.inc", 'Contact Delete', print_r($contactDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Contact_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+$contactDetail = $Contacts->getContactDetail();\r
+$this->page->contactDetail = $this->bindArrayToObject($contactDetail);\r
+\r
+$this->templateFile = 'Contact/detail.html';\r
+\r
+$this->addDebug("Contact/detail.inc", 'Contact Detail', print_r($contactDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Contact_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+$contactDetail = $Contacts->editContact();\r
+$this->page->contactDetail = $this->bindArrayToObject($contactDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($contactDetail);\r
+\r
+$this->page->editingContact = true;\r
+$this->templateFile = 'Contact/edit.html';\r
+\r
+$this->addDebug("Contact/edit.inc", 'Contact Edit', print_r($contactDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Contact_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Contacts->insertContact();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->contactDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewContact = true;\r
+ $this->templateFile = 'Contact/edit.html';\r
+} else {\r
+ $this->templateFile = 'Contact/detail.html';\r
+}\r
+\r
+$this->addDebug("Contact/insert.inc", 'Contact Insert', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Contact_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+// Get contacts stats\r
+$contactsStats = $Contacts->getContactsStats();\r
+$this->page->contactsStats = $this->bindArrayToObject($contactsStats);\r
+\r
+$contactList = $Contacts->getContacts();\r
+$this->page->contactList = $this->bindArrayToObject($contactList);\r
+\r
+$this->templateFile = 'Contact/list.html';\r
+\r
+$this->addDebug("Contact/list.inc", 'Contact List', print_r($contactList,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Contact_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Contacts->updateContact();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->contactDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingContact = true;\r
+ $this->templateFile = 'Contact/edit.html';\r
+} else {\r
+ // If valid\r
+ $this->templateFile = 'Contact/detail.html';\r
+}\r
+\r
+$this->addDebug("Contact/add.inc", 'Contact Add', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Debug_start\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->page->debugStartupTime = date('m/d/Y H:i:s');\r
+$this->templateFile = 'Debug/index.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Debug_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->page->debugUpdateTime = date('m/d/Y H:i:s');\r
+\r
+// If there's nothing to send, then don't\r
+if (!file_exists(DEBUG_DATA_FILENAME)) {\r
+ exit;\r
+}\r
+\r
+// Otherwise, send the current debug data\r
+$this->page->debugData = file_get_contents(DEBUG_DATA_FILENAME);\r
+unlink(DEBUG_DATA_FILENAME);\r
+\r
+$this->templateFile = 'Debug/index.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Division_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/divisions.php';\r
+$Divisions = new EventManagementAdminDivisions($this->dbh, $this->config);\r
+\r
+\r
+$r = $Divisions->newDivision();\r
+\r
+$this->page->divisionDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewDivision = true;\r
+\r
+$this->templateFile = 'Division/EditDivision.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Division_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/divisions.php';\r
+$Divisions = new EventManagementAdminDivisions($this->dbh, $this->config);\r
+\r
+\r
+$divisionDetail = $Divisions->getDivisionDetail();\r
+$this->page->divisionDetail = $this->bindArrayToObject($divisionDetail);\r
+\r
+$this->templateFile = 'Division/DivisionDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Division_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/divisions.php';\r
+$Divisions = new EventManagementAdminDivisions($this->dbh, $this->config);\r
+\r
+\r
+$divisionDetail = $Divisions->editDivision();\r
+$this->page->divisionDetail = $this->bindArrayToObject($divisionDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($divisionDetail);\r
+\r
+$this->page->editingDivision = true;\r
+\r
+$this->templateFile = 'Division/EditDivision.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Division_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/divisions.php';\r
+$Divisions = new EventManagementAdminDivisions($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Divisions->insertDivision();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->divisionDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewDivision = true;\r
+ $this->templateFile = 'Division/EditDivision.html';\r
+} else {\r
+ $this->templateFile = 'Division/DivisionDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Division_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/divisions.php';\r
+$Divisions = new EventManagementAdminDivisions($this->dbh, $this->config);\r
+\r
+\r
+// Get divisions stats\r
+$divisionsStats = $Divisions->getDivisionsStats();\r
+$this->page->divisionsStats = $this->bindArrayToObject($divisionsStats);\r
+\r
+// Get divisions list\r
+$divisions = $Divisions->getDivisionsList();\r
+$this->page->divisionsList = $this->bindArrayToObject($divisions);\r
+\r
+$this->templateFile = 'Division/DivisionsList.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Division_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/divisions.php';\r
+$Divisions = new EventManagementAdminDivisions($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Divisions->updateDivision();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->divisionDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$divisionDetail = $Divisions->getDivisionDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($divisionDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingDivision = true;\r
+ $this->templateFile = 'Division/EditDivision.html';\r
+} else {\r
+ $this->templateFile = 'Division/DivisionDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Entrance_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: add.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+$Entrances = new EventManagementAdminEntrances($this->dbh, $this->config);\r
+\r
+// Get base data and fields\r
+$r = $Entrances->newEntrance();\r
+\r
+$this->page->entranceDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewEntrance = true;\r
+\r
+$this->templateFile = 'Entrance/edit.html';\r
+\r
+$this->addDebug("Entrance/add.inc", 'Entrance Add', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Entrance_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+$Entrances = new EventManagementAdminEntrances($this->dbh, $this->config);\r
+\r
+$entranceDetail = $Entrances->entranceDelete(true);\r
+$this->page->entranceDetail = $this->bindArrayToObject($entranceDetail);\r
+\r
+$this->templateFile = 'Entrance/detail.html';\r
+\r
+$this->addDebug("Entrance/confirmDelete.inc", 'Entrance Confirm Delete', print_r($entranceDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Entrance_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: entrance.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+$Entrances = new EventManagementAdminEntrances($this->dbh, $this->config);\r
+\r
+\r
+$entranceDetail = $Entrances->entranceDelete(false);\r
+$this->page->entranceDetail = $this->bindArrayToObject($entranceDetail);\r
+\r
+$this->templateFile = 'Entrance/delete.html';\r
+\r
+$this->addDebug("Entrance/delete.inc", 'Entrance Delete', print_r($entranceDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Entrance_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+$Entrances = new EventManagementAdminEntrances($this->dbh, $this->config);\r
+\r
+$entranceDetail = $Entrances->getEntranceDetail();\r
+$this->page->entranceDetail = $this->bindArrayToObject($entranceDetail);\r
+\r
+$this->templateFile = 'Entrance/detail.html';\r
+\r
+$this->addDebug("Entrance/detail.inc", 'Entrance Detail', print_r($entranceDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Entrance_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+$Entrances = new EventManagementAdminEntrances($this->dbh, $this->config);\r
+\r
+$entranceDetail = $Entrances->editEntrance();\r
+$this->page->entranceDetail = $this->bindArrayToObject($entranceDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($entranceDetail);\r
+\r
+$this->page->editingEntrance = true;\r
+$this->templateFile = 'Entrance/edit.html';\r
+\r
+$this->addDebug("Entrance/edit.inc", 'Entrance Edit', print_r($entranceDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Entrance_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+$Entrances = new EventManagementAdminEntrances($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Entrances->insertEntrance();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->entranceDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewEntrance = true;\r
+ $this->templateFile = 'Entrance/edit.html';\r
+} else {\r
+ $this->templateFile = 'Entrance/detail.html';\r
+}\r
+\r
+$this->addDebug("Entrance/insert.inc", 'Entrance Insert', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Entrance_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+$Entrances = new EventManagementAdminEntrances($this->dbh, $this->config);\r
+\r
+$entranceList = $Entrances->getEntrancesList();\r
+\r
+$this->page->entranceList = $this->bindArrayToObject($entranceList);\r
+\r
+$this->templateFile = 'Entrance/list.html';\r
+\r
+$this->addDebug("Entrance/list.inc", 'Entrance List', 'Array: $entranceList<p>'.print_r($entranceList,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Entrance_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+$Entrances = new EventManagementAdminEntrances($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Entrances->updateEntrance();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->entranceDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingEntrance = true;\r
+ $this->templateFile = 'Entrance/edit.html';\r
+} else {\r
+ // If valid\r
+ $this->templateFile = 'Entrance/detail.html';\r
+}\r
+\r
+$this->addDebug("Entrance/add.inc", 'Entrance Add', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Event_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/events.php';\r
+$Events = new EventManagementAdminEvents($this->dbh, $this->config);\r
+\r
+\r
+// Check Event Code\r
+$r = $Events->newEntry();\r
+\r
+$this->page->eventDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewEvent = true;\r
+\r
+$this->templateFile = 'Event/EditEvent.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Event_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/events.php';\r
+$Events = new EventManagementAdminEvents($this->dbh, $this->config);\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+// Get detail for an event\r
+$eventDetail = $Events->getEventDetail();\r
+$this->page->eventDetail = $this->bindArrayToObject($eventDetail);\r
+\r
+// Get contacts for this event\r
+$eventContacts = $Contacts->getContacts('event');\r
+$this->page->contactsList = $this->bindArrayToObject($eventContacts['contact_list']);\r
+\r
+$this->templateFile = 'Event/EventDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Event_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/events.php';\r
+$Events = new EventManagementAdminEvents($this->dbh, $this->config);\r
+\r
+\r
+// Check Event Code\r
+$eventDetail = $Events->editEvent();\r
+$this->page->eventDetail = $this->bindArrayToObject($eventDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($eventDetail);\r
+\r
+$this->page->editingEvent = true;\r
+\r
+$this->templateFile = 'Event/EditEvent.html';\r
+\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Event_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/events.php';\r
+$Events = new EventManagementAdminEvents($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Events->insertEvent();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->eventDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewEvent = true;\r
+ $this->templateFile = 'Event/EditEvent.html';\r
+} else {\r
+ $this->templateFile = 'Event/EventDetail.html';\r
+}\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Event_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/events.php';\r
+$Events = new EventManagementAdminEvents($this->dbh, $this->config);\r
+\r
+\r
+// Get events stats\r
+$eventsStats = $Events->getEventsStats();\r
+$this->page->eventsStats = $this->bindArrayToObject($eventsStats);\r
+\r
+// Get list of events\r
+$eventsList = $Events->getEventsList();\r
+$this->page->eventsList = $this->bindArrayToObject($eventsList);\r
+\r
+$this->templateFile = 'Event/EventsList.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Event_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/events.php';\r
+$Events = new EventManagementAdminEvents($this->dbh, $this->config);\r
+\r
+\r
+// Get events stats\r
+$eventsStats = $Events->getEventsStats();\r
+$this->page->eventsStats = $this->bindArrayToObject($eventsStats);\r
+\r
+$this->templateFile = 'Event/stats.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Event_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/events.php';\r
+$Events = new EventManagementAdminEvents($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Events->updateEvent();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->eventDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$eventDetail = $Events->getEventDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($eventDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingEvent = true;\r
+ $this->templateFile = 'Event/EditEvent.html';\r
+} else {\r
+ $this->templateFile = 'Event/EventDetail.html';\r
+}\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: EventFee_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: eventFee.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/eventFees.php';\r
+$EventFees = new EventManagementAdminEventFees($this->dbh, $this->config);\r
+\r
+\r
+$r = $EventFees->newFee();\r
+\r
+$this->page->feeDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewFee = true;\r
+\r
+$this->templateFile = 'EventFee/EditEventFee.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: EventFee_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: eventFee.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/eventFees.php';\r
+$EventFees = new EventManagementAdminEventFees($this->dbh, $this->config);\r
+\r
+\r
+$feeDetail = $EventFees->feeDelete(true);\r
+$this->page->feeDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+$this->templateFile = 'EventFee/EventFeeDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: EventFee_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: eventFee.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/eventFees.php';\r
+$EventFees = new EventManagementAdminEventFees($this->dbh, $this->config);\r
+\r
+\r
+$feeDetail = $EventFees->feeDelete(false);\r
+$this->page->feeDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+$this->templateFile = 'EventFee/EventFeeDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: EventFee_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: eventFee.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/eventFees.php';\r
+$EventFees = new EventManagementAdminEventFees($this->dbh, $this->config);\r
+\r
+\r
+$feeDetail = $EventFees->getFeeDetail();\r
+$this->page->feeDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+$this->templateFile = 'EventFee/EventFeeDetail.html';\r
+\r
+$this->addDebug("EventFee/detail.inc", 'Fee Detail', print_r($feeDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: EventFee_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: eventFee.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/eventFees.php';\r
+$EventFees = new EventManagementAdminEventFees($this->dbh, $this->config);\r
+\r
+\r
+// Check Event Fee Code\r
+$feeDetail = $EventFees->editFee();\r
+$this->page->feeDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+$this->page->editingFee = true;\r
+\r
+$this->templateFile = 'EventFee/EditEventFee.html';\r
+\r
+$this->addDebug("EventFee/edit.inc", 'Fee Detail', print_r($feeDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: EventFee_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: eventFee.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/eventFees.php';\r
+$EventFees = new EventManagementAdminEventFees($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $EventFees->insertFee();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->feeDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewFee = true;\r
+ $this->templateFile = 'EventFee/EditEventFee.html';\r
+} else {\r
+ $this->templateFile = 'EventFee/EventFeeDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: EventFee_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: eventFee.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/eventFees.php';\r
+$EventFees = new EventManagementAdminEventFees($this->dbh, $this->config);\r
+\r
+\r
+// Get event fees stats\r
+$feesStats = $EventFees->getEventFeesStats();\r
+$this->page->feesStats = $this->bindArrayToObject($feesStats);\r
+\r
+// Get Event Fees list\r
+$feesList = $EventFees->getFees('event');\r
+$this->page->feesList = $this->bindArrayToObject($feesList);\r
+\r
+$this->templateFile = 'EventFee/EventFeesList.html';\r
+\r
+$this->addDebug("EventFee/list.inc", 'Event Fees List', print_r($feesStats,1).'<p> </p>'.print_r(feesList,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: EventFee_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: eventFee.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/eventFees.php';\r
+$EventFees = new EventManagementAdminEventFees($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $EventFees->updateFee();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->feeDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$feeDetail = $EventFees->getFeeDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingFee = true;\r
+ $this->templateFile = 'EventFee/EditEventFee.html';\r
+} else {\r
+ $this->templateFile = 'EventFee/EventFeeDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Help_index\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: index.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->templateFile = "Help/index.html";\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: default\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Reset Session\r
+$this->startSession(true);\r
+\r
+// If user level is 20 or above, then start with ticket claims loaded.\r
+$this->page->startWithClaims = 0;\r
+if ($this->page->level >= 20) {\r
+ $this->page->startWithClaims = 1;\r
+}\r
+\r
+$this->templateFile = "index.html";\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Misc_welcome\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->templateFile = "Welcome/index.html";\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+\r
+// Check Member Code\r
+$r = $Members->newEntry();\r
+\r
+$this->page->memberDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewMember = true;\r
+\r
+$this->templateFile = 'Member/edit.html';\r
+\r
+$this->addDebug("Member/add.inc", 'Member Add', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+\r
+$memberDetail = $Members->memberDelete(true);\r
+$this->page->memberDetail = $this->bindArrayToObject($memberDetail);\r
+\r
+$this->page->memberDeleted = true;\r
+\r
+$this->templateFile = 'Member/detail.html';\r
+\r
+$this->addDebug("Member/delete.inc", 'Member Delete', print_r($memberDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+\r
+// Check Member Code\r
+$memberDetail = $Members->getMemberDetail();\r
+\r
+$this->page->memberDetail = $this->bindArrayToObject($memberDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($memberDetail);\r
+\r
+$this->page->editingMember = true;\r
+\r
+$this->templateFile = 'Member/delete.html';\r
+\r
+$this->addDebug("Member/delete.inc", 'Member Delete', print_r($memberDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+\r
+$memberDetail = $Members->getMemberDetail();\r
+$memberID = $memberDetail['id'];\r
+\r
+// Also get list of members this member scans for\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMemberScansFor.php';\r
+$MemberScansFor = new EventManagementDataMemberScansFor($this->dbh, $this->config);\r
+$memberScansFor = $MemberScansFor->getMemberScansForList($memberID);\r
+if (is_array($memberScansFor) && count($memberScansFor) > 0) {\r
+ $this->page->haveMemberScansFor = true;\r
+ $this->page->memberScansFor = $this->bindArrayToObject($memberScansFor);\r
+} else {\r
+ $this->page->haveMemberScansFor = false;\r
+}\r
+\r
+if ($memberDetail != false) {\r
+ // Also need to add static amenity names\r
+ $amen_array = $this->config->memb_amen->toArray();\r
+ while( list($key, $val) = each( $amen_array ) ) {\r
+ $memberDetail['amen_'.$key]['displayName'] = $val;\r
+ }\r
+\r
+ $this->page->memberDetail = $this->bindArrayToObject($memberDetail);\r
+} else {\r
+ $this->page->memberNotFound = true;\r
+}\r
+\r
+$this->templateFile = 'Member/detail.html';\r
+\r
+$this->addDebug("Member/detail.inc", 'Members Detail', print_r($memberDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+/*\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+$Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberFees.php';\r
+$memberFees = new EventManagementAdminMemberFees($this->dbh, $this->config);\r
+*/\r
+\r
+// Check Member Code\r
+$memberDetail = $Members->editMember();\r
+$memberID = $memberDetail['id'];\r
+\r
+// Also need to add static amenity names\r
+$amen_array = $this->config->memb_amen->toArray();\r
+while( list($key, $val) = each( $amen_array ) ) {\r
+ $memberDetail['amen_'.$key]['displayName'] = $val;\r
+}\r
+$this->page->memberDetail = $this->bindArrayToObject($memberDetail);\r
+\r
+// Also get list of members this member scans for\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMemberScansFor.php';\r
+$MemberScansFor = new EventManagementDataMemberScansFor($this->dbh, $this->config);\r
+$memberScansFor = $MemberScansFor->getMemberScansForList($memberID);\r
+$this->page->memberScansFor = $this->bindArrayToObject($memberScansFor);\r
+\r
+// And get full list of members (except this member) to use for Member Scans For select list\r
+$sql = "SELECT id, name FROM eventmgt.member WHERE active AND id != $memberID;";\r
+$stmt = $this->dbh->prepare($sql);\r
+$stmt->execute();\r
+$memberList = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+$this->page->memberList = $this->bindArrayToObject($memberList);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+//$this->page->storedDetail = $this->bindArrayToObject($memberDetail);\r
+\r
+$this->page->editingMember = true;\r
+\r
+$this->templateFile = 'Member/edit.html';\r
+\r
+$this->addDebug("Member/edit.inc", 'Array: $memberDetail', print_r($memberDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_index\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->templateFile = 'Member/index.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Members->insertMember();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->memberDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+$_SESSION[GLM_EVENT_SESSION]['Member'] = $r['fieldData']['id'];\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewMember = true;\r
+ $this->templateFile = 'Member/edit.html';\r
+} else {\r
+ $this->templateFile = 'Member/selected.html';\r
+}\r
+\r
+$this->addDebug("Member/insert.inc", 'Members Insert', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+\r
+\r
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+\r
+// Get members list\r
+$members = $Members->getMembersList('all');\r
+\r
+$this->page->membersList = $this->bindArrayToObject($members);\r
+\r
+// Check if we also need to display a member detail (list redisplay on member update).\r
+$this->page->displayMember = false;\r
+if (isset($_REQUEST['memberID']) && ($_REQUEST['memberID']-0) > 0) {\r
+ $this->page->displayMember = ($_REQUEST['memberID']-0);\r
+}\r
+\r
+$this->templateFile = 'Member/list.html';\r
+\r
+$this->addDebug("Member/list.inc", 'Member List', print_r($members,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_selected\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+$memberDetail = $Members->getMemberDetail();\r
+\r
+// Also need to add static amenity names\r
+$amen_array = $this->config->memb_amen->toArray();\r
+while( list($key, $val) = each( $amen_array ) ) {\r
+ $memberDetail['amen_'.$key]['displayName'] = $val;\r
+}\r
+$this->page->memberDetail = $this->bindArrayToObject($memberDetail);\r
+\r
+$_SESSION[GLM_EVENT_SESSION]['Member'] = $memberDetail['id'];\r
+\r
+// Get other stats and clear all flags\r
+$memberStats = array(\r
+ 'contact' => $Contacts->getMemberContactsStats(),\r
+ 'flags' => false,\r
+ 'flag' => false\r
+);\r
+\r
+// Check contact status\r
+if ($memberStats['contact'] == 0) {\r
+ $memberStats['flags']['noContacts'] = true;\r
+ $memberStats['flag'] = true;\r
+}\r
+\r
+// Check accommodation status\r
+if ($this->config->option->accommodations) {\r
+\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/accommodations.php';\r
+ $Accoms = new EventManagementAdminAccoms($this->dbh, $this->config);\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/inventory.php';\r
+ $Inventory = new EventManagementAdminInventory($this->dbh, $this->config);\r
+\r
+ $memberStats['accom'] = $Accoms->getMemberAccomsStats();\r
+ $memberStats['inven'] = $Inventory->getMemberInvenStats();\r
+ if ($memberStats['accom'] == 0) {\r
+ $memberStats['flags']['noAccoms'] = true;\r
+ $memberStats['flag'] = true;\r
+ }\r
+ if ($memberStats['inven'] == 0) {\r
+ $memberStats['flags']['noInven'] = true;\r
+ $memberStats['flag'] = true;\r
+ }\r
+};\r
+\r
+// Check ticket status\r
+if ($this->config->option->tickets) {\r
+\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sections.php';\r
+ $Sections = new EventManagementAdminSections($this->dbh, $this->config);\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+ $Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+ $memberStats['section'] = $Sections->getMemberSectionsStats();\r
+ $memberStats['performance'] = $Performances->getMemberPerformancesStats();\r
+ $memberStats['ticket'] = $Tickets->getMemberTicketsStats();\r
+\r
+ if ($memberStats['section'] == 0) {\r
+ $memberStats['flags']['noSections'] = true;\r
+ $memberStats['flag'] = true;\r
+ }\r
+ if ($memberStats['performance'] == 0) {\r
+ $memberStats['flags']['noPerformances'] = true;\r
+ $memberStats['flag'] = true;\r
+ }\r
+ if ($memberStats['ticket'] == 0) {\r
+ $memberStats['flags']['noTickets'] = true;\r
+ $memberStats['flag'] = true;\r
+ }\r
+\r
+}\r
+\r
+$this->page->memberStats = $this->bindArrayToObject($memberStats);\r
+\r
+$this->templateFile = 'Member/selected.html';\r
+\r
+$this->addDebug("Member/selected.inc", 'Member Detail', print_r($memberDetail,1));\r
+$this->addDebug("Member/selected.inc", 'Member Stats', print_r($memberStats,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_stats\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+\r
+// Check for new mebers whenever we get here - only called if integrated database\r
+if ($this->config->option->member_db_integrated) {\r
+ $Members->checkNewMembers();\r
+}\r
+\r
+// Get members stats\r
+$membersStats = $Members->getMembersStats();\r
+\r
+$this->page->membersStats = $this->bindArrayToObject($membersStats);\r
+\r
+$this->templateFile = 'Member/stats.html';\r
+\r
+$this->addDebug("Member/stats.inc", 'Array: $memberStats', print_r($membersStats,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Members->updateMember();\r
+\r
+// Also need to add static amenity names\r
+$amen_array = $this->config->memb_amen->toArray();\r
+while( list($key, $val) = each( $amen_array ) ) {\r
+ $r['fieldData']['amen_'.$key]['displayName'] = $val;\r
+}\r
+\r
+// Also update list of members this member scans for\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMemberScansFor.php';\r
+$MemberScansFor = new EventManagementDataMemberScansFor($this->dbh, $this->config);\r
+$memberScansFor = $MemberScansFor->updateMemberScansForList($r['fieldData']['id']);\r
+$this->page->memberScansFor = $this->bindArrayToObject($memberScansFor);\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->memberDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$memberDetail = $Members->getMemberDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($memberDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingMember = true;\r
+ $this->templateFile = 'Member/edit.html';\r
+} else {\r
+ // $this->templateFile = 'Member/detail.html';\r
+ $this->templateFile = 'Member/redisplayList.html';\r
+}\r
+\r
+$this->addDebug("Member/update.inc", 'Member Update', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberAmenity_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberAmenities.php';\r
+$MemberAmenities = new EventManagementAdminMemberAmenities($this->dbh, $this->config);\r
+\r
+\r
+$r = $MemberAmenities->newAmenity();\r
+\r
+$this->page->amenityDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewAmenity = true;\r
+\r
+$this->templateFile = 'Amenity/EditMemberAmenity.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberAmenity_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberAmenities.php';\r
+$MemberAmenities = new EventManagementAdminMemberAmenities($this->dbh, $this->config);\r
+\r
+\r
+$amenityDetail = $MemberAmenities->getAmenityDetail();\r
+\r
+$this->page->amenityDetail = $this->bindArrayToObject($amenityDetail);\r
+\r
+$this->templateFile = 'Amenity/MemberAmenityDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberAmenity_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberAmenities.php';\r
+$MemberAmenities = new EventManagementAdminMemberAmenities($this->dbh, $this->config);\r
+\r
+\r
+// Check Member Amenity Code\r
+$amenityDetail = $MemberAmenities->editAmenity();\r
+$this->page->amenityDetail = $this->bindArrayToObject($amenityDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($memberAmenityDetail);\r
+\r
+$this->page->editingAmenity = true;\r
+\r
+$this->templateFile = 'Amenity/EditMemberAmenity.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberAmenity_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberAmenities.php';\r
+$MemberAmenities = new EventManagementAdminMemberAmenities($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $MemberAmenities->insertAmenity();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->amenityDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewAmenity = true;\r
+ $this->templateFile = 'Amenity/EditMemberAmenity.html';\r
+} else {\r
+ $this->templateFile = 'Amenity/MemberAmenityDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberAmenity_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberAmenities.php';\r
+$MemberAmenities = new EventManagementAdminMemberAmenities($this->dbh, $this->config);\r
+\r
+\r
+// Get member amenities stats\r
+$amenitiesStats = $MemberAmenities->getMemberAmenitiesStats();\r
+$this->page->amenitiesStats = $this->bindArrayToObject($amenitiesStats);\r
+\r
+// Get Member Amenities list\r
+$amenitiesList = $MemberAmenities->getAmenities('member');\r
+$this->page->amenitiesList = $this->bindArrayToObject($amenitiesList);\r
+\r
+$this->templateFile = 'Amenity/MemberAmenitiesList.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberAmenity_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberAmenities.php';\r
+$MemberAmenities = new EventManagementAdminMemberAmenities($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $MemberAmenities->updateAmenity();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->amenityDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$amenityDetail = $MemberAmenities->getAmenityDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($amenityDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingAmenity = true;\r
+ $this->templateFile = 'Amenity/EditMemberAmenity.html';\r
+} else {\r
+ $this->templateFile = 'Amenity/MemberAmenityDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberFee_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberFees.php';\r
+$MemberFees = new EventManagementAdminMemberFees($this->dbh, $this->config);\r
+\r
+\r
+$r = $MemberFees->newFee();\r
+\r
+// check for selected event to use for default for specific event\r
+$e = $_SESSION[GLM_EVENT_SESSION]['Event'];\r
+if ($e && isset($r['fieldData']['event']['pick_list'][$e])) {\r
+ $r['fieldData']['event']['pick_list'][$e]['default'] = true;\r
+}\r
+\r
+$this->page->feeDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewFee = true;\r
+\r
+$this->templateFile = 'MemberFee/EditMemberFee.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberFee_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberFees.php';\r
+$MemberFees = new EventManagementAdminMemberFees($this->dbh, $this->config);\r
+\r
+\r
+$feeDetail = $MemberFees->feeDelete(true);\r
+$this->page->feeDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+$this->templateFile = 'MemberFee/MemberFeeDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberFee_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberFees.php';\r
+$MemberFees = new EventManagementAdminMemberFees($this->dbh, $this->config);\r
+\r
+\r
+$feeDetail = $MemberFees->feeDelete(false);\r
+$this->page->feeDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+$this->templateFile = 'MemberFee/MemberFeeDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberFee_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberFees.php';\r
+$MemberFees = new EventManagementAdminMemberFees($this->dbh, $this->config);\r
+\r
+\r
+$feeDetail = $MemberFees->getFeeDetail();\r
+\r
+$this->page->feeDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+$this->templateFile = 'MemberFee/MemberFeeDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberFee_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberFees.php';\r
+$MemberFees = new EventManagementAdminMemberFees($this->dbh, $this->config);\r
+\r
+\r
+// Check Member Fee Code\r
+$feeDetail = $MemberFees->editFee();\r
+\r
+// check for selected event to use for default for specific event\r
+$e = $_SESSION[GLM_EVENT_SESSION]['Event'];\r
+if ($e && isset($feeDetail['fieldData']['event']['pick_list'][$e])) {\r
+ $feeDetail['fieldData']['event']['pick_list'][$e]['default'] = true;\r
+}\r
+\r
+$this->page->feeDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($memberFeeDetail);\r
+\r
+$this->page->editingFee = true;\r
+\r
+$this->templateFile = 'MemberFee/EditMemberFee.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberFee_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberFees.php';\r
+$MemberFees = new EventManagementAdminMemberFees($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $MemberFees->insertFee();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->feeDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewFee = true;\r
+ $this->templateFile = 'MemberFee/EditMemberFee.html';\r
+} else {\r
+ $this->templateFile = 'MemberFee/MemberFeeDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberFee_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberFees.php';\r
+$MemberFees = new EventManagementAdminMemberFees($this->dbh, $this->config);\r
+\r
+\r
+// Get member fees stats\r
+$feesStats = $MemberFees->getMemberFeesStats();\r
+$this->page->feesStats = $this->bindArrayToObject($feesStats);\r
+\r
+// Get Member Fees list\r
+$feesList = $MemberFees->getFees('member');\r
+$this->page->feesList = $this->bindArrayToObject($feesList);\r
+\r
+$this->templateFile = 'MemberFee/MemberFeesList.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: MemberFee_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/memberFees.php';\r
+$MemberFees = new EventManagementAdminMemberFees($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $MemberFees->updateFee();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->feeDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$feeDetail = $MemberFees->getFeeDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($feeDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingFee = true;\r
+ $this->templateFile = 'MemberFee/EditMemberFee.html';\r
+} else {\r
+ $this->templateFile = 'MemberFee/MemberFeeDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Model Action: Misc_index
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: index.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+$this->templateFile = 'Misc/blank.html';\r
+\r
+
+?>
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/misc.php';\r
+$Misc = new EventManagementAdminMisc($this->dbh, $this->config);\r
+\r
+$miscConfigDetail = $Misc->getEntry(1);\r
+\r
+$miscConfigDetail['no_payment_reasons'] = nl2br($miscConfigDetail['no_payment_reasons']); \r
+\r
+$this->page->miscConfigDetail = $this->bindArrayToObject($miscConfigDetail);\r
+\r
+$this->templateFile = 'Misc/configDetail.html';\r
+\r
+$this->addDebug("Misc/configDetail.inc", 'Misc Config Detail', print_r($miscConfigDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Misc_configEdit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: configEdit.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/misc.php';\r
+$Misc = new EventManagementAdminMisc($this->dbh, $this->config);\r
+\r
+$miscConfigDetail = $Misc->editEntry(1);\r
+\r
+$this->page->miscConfigDetail = $this->bindArrayToObject($miscConfigDetail);\r
+$this->templateFile = 'Misc/configEdit.html';\r
+\r
+$this->addDebug("Misc/configEdit.inc", 'Array: $miscConfigDetail', print_r($miscConfigDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Misc_configUpdate\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: configUpdate.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/misc.php';\r
+$Misc = new EventManagementAdminMisc($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Misc->updateEntry(1);\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->templateFile = 'Misc/configEdit.html';\r
+} else {\r
+ \r
+ $r['fieldData']['no_payment_reasons'] = nl2br($r['fieldData']['no_payment_reasons']); \r
+ $this->templateFile = 'Misc/configDetail.html';\r
+}\r
+\r
+$this->page->miscConfigDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+$this->addDebug("Misc/configUpdate.inc", 'Misc Config Detail', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Model Action: Misc_index
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: index.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+$this->templateFile = 'Misc/index.html';\r
+\r
+
+?>
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Misc_upload\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: upload.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$filepath = EVENT_MANAGEMENT_APP_BASE.'web/custom/'.$this->config->custom_prefix.'/';\r
+\r
+// Get last file upload times\r
+$indexTime = filemtime($filepath.'index.html');\r
+$stylesTime = filemtime($filepath.'styles.css');\r
+$this->page->indexTime = date('m/d/Y h:i:s A', $indexTime);\r
+$this->page->stylesTime = date('m/d/Y h:i:s A', $stylesTime);\r
+\r
+$this->templateFile = 'Misc/upload.html';\r
+\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Misc_uploadIndex\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: uploadIndex.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->page->doingIndex = true;\r
+$filepath = EVENT_MANAGEMENT_APP_BASE.'web/custom/'.$this->config->custom_prefix.'/';\r
+\r
+if (isset($_REQUEST['RevertIndex'])) {\r
+\r
+ // Try to copy the previous file back in as the active file.\r
+ if (!copy($filepath.'SavedOriginals/index.html', $filepath.'index.html')) {\r
+ $this->reason[] = 'Sorry, we were unable restore the previous file.';\r
+\r
+ // Otherwise it's a successful upload\r
+ } else {\r
+\r
+ $this->page->indexFileRestored = true;\r
+\r
+ }\r
+\r
+\r
+} else {\r
+\r
+ // Check that it's a text/html file\r
+ if (!isset($_FILES['index'])) {\r
+ $this->reason[] = 'You did not supply a file.';\r
+\r
+ // Check if it's the right type\r
+ } elseif ($_FILES['index']['type'] != 'text/html') {\r
+ $this->reason[] = 'The file you supplied is not of type "text/html".';\r
+\r
+ // Read the file into a parameter\r
+ } elseif (!($f = file_get_contents($_FILES['index']['tmp_name']))) {\r
+ $this->reason[] = 'Unable to read the file provided.';\r
+\r
+ // Make sure there's no flexy or PHP elements in the file\r
+ } elseif (preg_match('~<!php~i', $f) || preg_match('~flexy~i', $f)) {\r
+ $this->reason[] = 'The file you provided has PHP or Flexy Template components that are not permitted.';\r
+\r
+ // Replace the {GLM} tag with a flexy include that will insert content\r
+ } elseif (($f = str_replace('{GLM}', '<flexy:include src="{actionTemplate}" />', $f)) == '') {\r
+ $this->reason[] = 'Unable to parse the supplied file to prepare it for use.';\r
+\r
+ // Save the file to the destination folder\r
+ } elseif (!file_put_contents($filepath.'index.html.NEW', $f)) {\r
+ $this->reason[] = 'Unable to store prepared file.';\r
+\r
+ // Try to save off a copy of the current file\r
+ } elseif (!copy($filepath.'index.html', $filepath.'SavedOriginals/index.html')) {\r
+ $this->reason[] = 'Sorry, we were unable to save the current file as a backup so are not going to put the new one in.';\r
+\r
+ // Try to unlink old file then rename NEW file to index.html\r
+ } elseif (\r
+ !unlink($filepath.'index.html') ||\r
+ !rename($filepath.'index.html.NEW', $filepath.'index.html')\r
+ ) {\r
+ $this->reason[] = 'There was a problem moving the supplied file into live use. Please check the site and call immediately if there is a problem.';\r
+\r
+ // Otherwise it's a successful upload\r
+ } else {\r
+\r
+ $this->page->indexFileUploaded = true;\r
+\r
+ }\r
+\r
+}\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/actions/Misc/upload.inc';\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Misc_uploadStylesheet\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: uploadStylesheet.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->page->doingStylesheet = true;\r
+$filepath = EVENT_MANAGEMENT_APP_BASE.'web/custom/'.$this->config->custom_prefix.'/';\r
+\r
+if (isset($_REQUEST['RevertStylesheet'])) {\r
+\r
+ // Try to copy the previous file back in as the active file.\r
+ if (!copy($filepath.'SavedOriginals/styles.css', $filepath.'styles.css')) {\r
+ $this->reason[] = 'Sorry, we were unable restore the previous file.';\r
+\r
+ // Otherwise it's a successful upload\r
+ } else {\r
+\r
+ $this->page->stylesheetFileRestored = true;\r
+\r
+ }\r
+\r
+\r
+} else {\r
+\r
+ // Check that it's a text/html file\r
+ if (!isset($_FILES['stylesheet'])) {\r
+ $this->reason[] = 'You did not supply a file.';\r
+\r
+ // Check if it's the right type\r
+ } elseif ($_FILES['stylesheet']['type'] != 'text/css') {\r
+ $this->reason[] = 'The file you supplied is not of type "text/html".';\r
+\r
+ // check that the size is reasonable\r
+ } elseif ($_FILES['stylesheet']['size'] < 10) {\r
+ $this->reason[] = 'There doesn\'t seem to be much in this file.';\r
+\r
+ // Make sure the file gets copied to the destination folder\r
+ } elseif (!copy($_FILES['stylesheet']['tmp_name'], $filepath.'styles.css.NEW')) {\r
+ $this->reason[] = 'Sorry, we were unable to copy the file you supplied to the destination folder.';\r
+\r
+ // Try to save off a copy of the current file\r
+ } elseif (!copy($filepath.'styles.css', $filepath.'SavedOriginals/styles.css')) {\r
+ $this->reason[] = 'Sorry, we were unable to save the current file as a backup so are not going to put the new one in.';\r
+\r
+ // Try to unlink old file then rename NEW file to styles.css\r
+ } elseif (!unlink($filepath.'styles.css') || !rename($filepath.'styles.css.NEW', $filepath.'styles.css')) {\r
+ $this->reason[] = 'There was a problem moving the supplied file into live use. Please check the site and call immediately if there is a problem.';\r
+\r
+ // Otherwise it's a successful upload\r
+ } else {\r
+\r
+ $this->page->stylesheetFileUploaded = true;\r
+\r
+ }\r
+\r
+}\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/actions/Misc/upload.inc';\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: detail.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Call the delete order method in the AdminOrders class to delete the order\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/orders.php';\r
+$Orders = new EventManagementAdminOrders($this->dbh, $this->config);\r
+$deleted = $Orders->orderDelete(true, 'abc');\r
+\r
+// echo "Result = <pre>".print_r($deleted,1)."</pre>";\r
+\r
+if ($deleted === false) {\r
+ echo "<h3>Order <b>NOT</b> Deleted.</h3>";\r
+ exit;\r
+}\r
+\r
+echo "<h3>Order <b>DELETED</b>.</h3>";\r
+\r
+exit;\r
+\r
+\r
+\r
+// If this is a member user then make sure they only list their own member performances\r
+$type = false;\r
+$id = false;\r
+if ($_SESSION[GLM_EVENT_SESSION]['MemberUser'] && !$this->config->option->users_access_all_members) {\r
+ $type = 'member';\r
+ $id = $this->page->userMemberID;\r
+}\r
+\r
+// Get Order detail\r
+$orderDetail = $Orders->getOrderDetail(false, $id);\r
+$this->page->orderDetail = $this->bindArrayToObject($orderDetail);\r
+\r
+$this->templateFile = 'Order/detail.html';\r
+\r
+$this->addDebug("Order/detail.inc", 'Array: $orderDetail', print_r($orderDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: detail.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/orders.php';\r
+$Orders = new EventManagementAdminOrders($this->dbh, $this->config);\r
+\r
+// If this is a member user then make sure they only list their own member performances\r
+$type = false;\r
+$id = false;\r
+if ($_SESSION[GLM_EVENT_SESSION]['MemberUser'] && !$this->config->option->users_access_all_members) {\r
+ $type = 'member';\r
+ $id = $this->page->userMemberID;\r
+}\r
+\r
+// Get Order detail\r
+$orderDetail = $Orders->getOrderDetail(false, $id);\r
+\r
+// Check for delete request\r
+if ($_REQUEST['Option'] == 'delete') {\r
+ $orderDetail['delete'] = true;\r
+}\r
+\r
+$orderDetail['notes'] = nl2br($orderDetail['notes']);\r
+\r
+$this->page->orderDetail = $this->bindArrayToObject($orderDetail);\r
+\r
+$this->templateFile = 'Order/detail.html';\r
+\r
+$this->addDebug("Order/detail.inc", 'Array: $orderDetail', print_r($orderDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: edit.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/orders.php';\r
+$Orders = new EventManagementAdminOrders($this->dbh, $this->config);\r
+\r
+$orderDetail = $Orders->editOrder();\r
+$this->page->orderDetail = $this->bindArrayToObject($orderDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($orderDetail);\r
+\r
+$this->page->editingOrder = true;\r
+\r
+$this->templateFile = 'Order/edit.html';\r
+\r
+$this->addDebug("Order/edit.inc", 'Array: $orderDetail', print_r($orderDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: list.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/orders.php';\r
+$Orders = new EventManagementAdminOrders($this->dbh, $this->config);\r
+\r
+// If this is a member user then make sure they only list their own member performances\r
+$type = false;\r
+$id = false;\r
+if ($_SESSION[GLM_EVENT_SESSION]['MemberUser']) {\r
+ $type = 'member';\r
+ $id = $this->page->userMemberID;\r
+}\r
+\r
+$orderList = $Orders->getOrdersList($id, false, false, $type);\r
+\r
+$this->page->orderList = $this->bindArrayToObject($orderList);\r
+\r
+$this->templateFile = 'Order/list.html';\r
+\r
+$this->addDebug("Order/list.inc", 'Order List', 'Array: $orderList<p>'.print_r($orderList,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Get Order Detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/orders.php';\r
+$Orders = new EventManagementAdminOrders($this->dbh, $this->config);\r
+$orderDetail = $Orders->getOrderDetail();\r
+\r
+// Get Ticket Sold (voucher) detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sold.php';\r
+$Sold = new EventManagementAdminSold($this->dbh, $this->config);\r
+$type = false;\r
+$id = false;\r
+/*\r
+if ($_SESSION[GLM_EVENT_SESSION]['MemberUser']) {\r
+ $type = 'member';\r
+ $id = $this->page->userMemberID;\r
+}\r
+*/\r
+$soldList = $Sold->getSoldList($orderDetail['id'], false);\r
+\r
+// Get Venue Detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+$memberDetail = $Members->getMemberDetail($orderDetail['member']);\r
+\r
+// Load voucher design code as per the "voucher_design" config parameter in the site's config/applications/EventManagement.ini file\r
+if (is_file(EVENT_MANAGEMENT_APP_BASE.'models/vouchers/'.$this->config->voucher_design.'/voucher.php')) {\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/vouchers/'.$this->config->voucher_design.'/voucher.php';\r
+ $pdf = new PdfVoucher($orderDetail, $soldList, $memberDetail, $this->dbh, $this->config);\r
+} else {\r
+ echo "SYSTEM ERROR: Site is not configured with a valid voucher design file.";\r
+ exit;\r
+}\r
+\r
+// There's nothing to do from here. Output should go direct to browser.\r
+exit;\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Get Order Detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/orders.php';\r
+$Orders = new EventManagementAdminOrders($this->dbh, $this->config);\r
+$orderDetail = $Orders->getOrderDetail();\r
+\r
+// Get Ticket Sold (voucher) detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sold.php';\r
+$Sold = new EventManagementAdminSold($this->dbh, $this->config);\r
+$type = false;\r
+$id = false;\r
+if ($_SESSION[GLM_EVENT_SESSION]['MemberUser']) {\r
+ $type = 'member';\r
+ $id = $this->page->userMemberID;\r
+}\r
+$soldList = $Sold->getSoldList(false, $id);\r
+\r
+// Get Venue Detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+$memberDetail = $Members->getMemberDetail($orderDetail['member']);\r
+\r
+// Load voucher design code as per the "voucher_design" config parameter in the site's config/applications/EventManagement.ini file\r
+if (is_file(EVENT_MANAGEMENT_APP_BASE.'models/vouchers/'.$this->config->voucher_design.'/voucherMobile.php')) {\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/vouchers/'.$this->config->voucher_design.'/voucherMobile.php';\r
+ $pdf = new PdfVoucher($orderDetail, $soldList, $memberDetail, $this->dbh, $this->config);\r
+} else {\r
+ echo "SYSTEM ERROR: Site is not configured with a valid voucher design file.";\r
+ exit;\r
+}\r
+\r
+// There's nothing to do from here. Output should go direct to browser.\r
+exit;\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_selected\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: selected.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/orders.php';\r
+$Orders = new EventManagementAdminOrders($this->dbh, $this->config);\r
+\r
+$orderDetail = $Orders->getOrderDetail();\r
+$this->page->orderDetail = $this->bindArrayToObject($orderDetail);\r
+\r
+$this->templateFile = 'Order/selected.html';\r
+\r
+$this->addDebug("Order/selected.inc", 'Order Detail', print_r($orderDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: update.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/orders.php';\r
+$Orders = new EventManagementAdminOrders($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Orders->updateOrder();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingOrder = true;\r
+ $this->templateFile = 'Order/edit.html';\r
+} else {\r
+ $this->templateFile = 'Order/detail.html';\r
+ $r['fieldData']['notes'] = nl2br($r['fieldData']['notes']);\r
+}\r
+\r
+\r
+$this->page->orderDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$orderDetail = $Orders->getOrderDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($orderDetail);\r
+\r
+$this->addDebug("Order/update.inc", 'Array: $r', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Performance_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: add.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+$Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+\r
+// Get base data and fields\r
+$r = $Performances->newPerformance();\r
+\r
+$this->page->performanceDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewPerformance = true;\r
+\r
+$this->templateFile = 'Performance/edit.html';\r
+\r
+$this->addDebug("Performance/add.inc", 'Performance Add', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Performance_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: confirmDelete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+$Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+\r
+$performanceDetail = $Performances->performanceDelete(true);\r
+$this->page->performanceDetail = $this->bindArrayToObject($performanceDetail);\r
+\r
+$this->templateFile = 'Performance/detail.html';\r
+\r
+$this->addDebug("Performance/confirmDelete.inc", 'Performance Confirm Delete', print_r($performanceDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Performance_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: performance.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+$Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+\r
+\r
+$performanceDetail = $Performances->performanceDelete(false);\r
+$this->page->performanceDetail = $this->bindArrayToObject($performanceDetail);\r
+\r
+$this->templateFile = 'Performance/delete.html';\r
+\r
+$this->addDebug("Performance/delete.inc", 'Performance Delete', print_r($performanceDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Performance_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+$Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+\r
+$performanceDetail = $Performances->getPerformanceDetail();\r
+$this->page->performanceDetail = $this->bindArrayToObject($performanceDetail);\r
+\r
+$this->templateFile = 'Performance/detail.html';\r
+\r
+$this->addDebug("Performance/detail.inc", 'Performance Detail', print_r($performanceDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Performance_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+$Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+\r
+$performanceDetail = $Performances->editPerformance();\r
+$this->page->performanceDetail = $this->bindArrayToObject($performanceDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($performanceDetail);\r
+\r
+$this->page->editingPerformance = true;\r
+$this->templateFile = 'Performance/edit.html';\r
+\r
+$this->addDebug("Performance/edit.inc", 'Performance Edit', print_r($performanceDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Performance_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+$Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Performances->insertPerformance();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->performanceDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+$_SESSION[GLM_EVENT_SESSION]['Performance'] = $r['fieldData']['id'];\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewPerformance = true;\r
+ $this->templateFile = 'Performance/edit.html';\r
+} else {\r
+ $this->templateFile = 'Performance/selected.html';\r
+}\r
+\r
+$this->addDebug("Performance/insert.inc", 'Performance Insert', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Performance_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+$Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+\r
+// If this is a member user then make sure they only list their own member performances\r
+$type = false;\r
+$id = false;\r
+\r
+if ($_SESSION[GLM_EVENT_SESSION]['MemberUser']) {\r
+ $type = 'member';\r
+ $id = $this->page->userMemberID;\r
+} elseif ($_SESSION[GLM_EVENT_SESSION]['Member'] != false) {\r
+ $type = 'member';\r
+ $id = $_SESSION[GLM_EVENT_SESSION]['Member'];\r
+}\r
+\r
+$performanceList = $Performances->getPerformancesList($type, $id, true);\r
+\r
+$this->page->performanceList = $this->bindArrayToObject($performanceList);\r
+\r
+// Check if we also need to display a performance detail (list redisplay on performance update).\r
+$this->page->displayPerformance = false;\r
+if (isset($_REQUEST['performanceID']) && ($_REQUEST['performanceID']-0) > 0) {\r
+ $this->page->displayPerformance = ($_REQUEST['performanceID']-0);\r
+}\r
+\r
+$this->templateFile = 'Performance/list.html';\r
+\r
+$this->addDebug("Performance/list.inc", 'Performance List', 'Array: $performanceList<p>'.print_r($performanceList,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Member_selected\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+$Members = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+\r
+$performanceDetail = $Members->getPerformanceDetail();\r
+\r
+$this->page->performanceDetail = $this->bindArrayToObject($performanceDetail);\r
+\r
+$this->templateFile = 'Performance/selected.html';\r
+\r
+$this->addDebug("Performance/selected.inc", 'Performance Detail', print_r($performanceDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Performance_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+$Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+\r
+if ($_REQUEST['performanceID']) {\r
+ $id = $this->page->performanceID;\r
+}\r
+\r
+// Check for submitted year\r
+$inventoryYear = '';\r
+if ($_REQUEST['inventoryYear'] && strlen($_REQUEST['inventoryYear']) == 4) {\r
+ $inventoryYear = $_REQUEST['inventoryYear'];\r
+} else {\r
+ $inventoryYear = date('Y');\r
+}\r
+$this->page->inventoryYear = $inventoryYear;\r
+\r
+$years = array();\r
+$thisYear = $inventoryYear;\r
+for ($i = $thisYear-5; $i < $thisYear+5; $i++) {\r
+\r
+ $years[$i] = array('year' => $i, 'selected' => ($i == $inventoryYear) );\r
+}\r
+$this->page->years = $this->bindArrayToObject($years);\r
+\r
+$performanceSummary = $Performances->getPerformanceInventorySummary($id, $inventoryYear);\r
+foreach ($performanceSummary as $k=>$v) {\r
+ $performanceSummary[$k]['netAvail'] = $v['avail'] - $v['held'];\r
+}\r
+\r
+$this->page->performanceSummary = $this->bindArrayToObject($performanceSummary);\r
+\r
+$this->templateFile = 'Performance/summary.html';\r
+\r
+$this->addDebug("Performance/summary.inc", 'Performance Summary', 'Array: $performanceSummary<p>'.print_r($performanceSummary,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Performance_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+$Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Performances->updatePerformance();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->performanceDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingPerformance = true;\r
+ $this->templateFile = 'Performance/edit.html';\r
+} else {\r
+// $this->templateFile = 'Performance/detail.html';\r
+ $this->templateFile = 'Performance/redisplayList.html';\r
+}\r
+\r
+$this->addDebug("Performance/add.inc", 'Performance Add', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Promo_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: add.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promos.php';\r
+$Promos = new EventManagementAdminPromos($this->dbh, $this->config);\r
+\r
+$r = $Promos->newPromo();\r
+\r
+$this->page->promoDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+$this->page->addingNewPromo = true;\r
+\r
+$this->templateFile = 'Promo/edit.html';\r
+\r
+$this->addDebug("Promo/add.inc", 'Array: $r', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Promo_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: confirmDelete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promos.php';\r
+$Promos = new EventManagementAdminPromos($this->dbh, $this->config);\r
+\r
+$promoDetail = $Promos->promoDelete(true);\r
+$this->page->promoDetail = $this->bindArrayToObject($promoDetail);\r
+\r
+$this->templateFile = 'Promo/detail.html';\r
+\r
+$this->addDebug("Promo/confirmDelete.inc", 'Section Confirm Delete', print_r($promoDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Promo_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: delete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promos.php';\r
+$Promos = new EventManagementAdminPromos($this->dbh, $this->config);\r
+\r
+$promoDetail = $Promos->promoDelete(false);\r
+$this->page->promoDetail = $this->bindArrayToObject($promoDetail);\r
+\r
+$this->templateFile = 'Promo/delete.html';\r
+\r
+$this->addDebug("Promo/delete.inc", 'Array: $promoDetail', print_r($promoDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Promo_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: detail.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promos.php';\r
+$Promos = new EventManagementAdminPromos($this->dbh, $this->config);\r
+\r
+// Get Promotions detail\r
+$promoDetail = $Promos->getPromoDetail();\r
+$this->page->promoDetail = $this->bindArrayToObject($promoDetail);\r
+\r
+// Get list of tickets that can be used for adding a promotion ticket\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+$where = "T.start_date < '".$promoDetail['end_date']['date']."' AND T.end_date > '".$promoDetail['start_date']['date'];\r
+$tList = $Tickets->getTicketsList(false, false, false, false, false);\r
+// Trim contents of ticketsList to just what's needed\r
+$ticketsList = array();\r
+if (is_array($tList) && count($tList) > 0) {\r
+ foreach ($tList as $t) {\r
+ $ticketsList[$t['id']] = array(\r
+ 'id' => $t['id'],\r
+ 'name' => $t['name'],\r
+ 'performance' => $t['performance']\r
+ );\r
+ }\r
+ $this->page->ticketsList = $this->bindArrayToObject($ticketsList);\r
+}\r
+\r
+// echo "<pre>".print_r($ticketsList,1)."</pre>";\r
+\r
+// Get list of Promotion Ticket Types\r
+$pTTypes = $this->config->promo_ticket_type->toArray();\r
+$promoTicketTypes = array();\r
+while (list($k, $v) = each($pTTypes)) {\r
+ $promoTicketTypes[$k] = array(\r
+ 'id' => $k,\r
+ 'name' => $v\r
+ );\r
+}\r
+$this->page->promoTicketTypes = $this->bindArrayToObject($promoTicketTypes);\r
+\r
+// Get Promotion Tickets for the currently selected promotion\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promoTickets.php';\r
+$PromoTickets = new EventManagementAdminPromoTickets($this->dbh, $this->config);\r
+$promoTicketsList = $PromoTickets->processPromoTicketsList($promoDetail['id']);\r
+$this->page->promoTicketsList = $this->bindArrayToObject($promoTicketsList);\r
+\r
+// Total sales\r
+$numbTotal = 0;\r
+$valTotal = 0;\r
+if ($promoTicketsList) {\r
+ foreach($promoTicketsList as $ptl) {\r
+ $numbTotal += $ptl['numberSold'];\r
+ $valTotal += $ptl['valueSold'];\r
+ }\r
+}\r
+$dollarsTotal = $this->money($valTotal);\r
+$this->page->numberTotal = $numbTotal;\r
+$this->page->valueTotal = $valTotal;\r
+$this->page->dollarsTotal = $dollarsTotal;\r
+\r
+$this->templateFile = 'Promo/detail.html';\r
+\r
+$this->addDebug("Promo/detail.inc", 'Array: $promoDetail', print_r($promoDetail,1));\r
+$this->addDebug("Promo/detail.inc", 'Array: $promoTicketsList', print_r($promoTicketsList,1));\r
+$this->addDebug("Promo/detail.inc", 'Array: $promoTicketTypes', print_r($promoTicketTypes,1));\r
+$this->addDebug("Promo/detail.inc", 'Array: $ticketsList', print_r($ticketsList,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Promo_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: edit.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promos.php';\r
+$Promos = new EventManagementAdminPromos($this->dbh, $this->config);\r
+\r
+$promoDetail = $Promos->editPromo();\r
+$this->page->promoDetail = $this->bindArrayToObject($promoDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->promoDetail = $this->bindArrayToObject($promoDetail);\r
+\r
+$this->page->editingPromo = true;\r
+\r
+$this->templateFile = 'Promo/edit.html';\r
+\r
+$this->addDebug("Promo/edit.inc", 'Array: $promoDetail', print_r($promoDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Promo_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: insert.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promos.php';\r
+$Promos = new EventManagementAdminPromos($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Promos->insertPromo();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->promoDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewPromo = true;\r
+ $this->templateFile = 'Promo/edit.html';\r
+} else {\r
+\r
+ $promoID = $r['fieldData']['id'];\r
+\r
+ $this->templateFile = 'Promo/selected.html';\r
+}\r
+\r
+$this->addDebug("Promo/insert.inc", 'Array: $r', print_r($r,1));\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Promo_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: list.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promos.php';\r
+$Promos = new EventManagementAdminPromos($this->dbh, $this->config);\r
+\r
+// Get Promotions stats\r
+$promoStats = $Promos->getPromosStats();\r
+$this->page->promosStats = $this->bindArrayToObject($promosStats);\r
+\r
+// Get Promotions list\r
+$promosList = $Promos->getPromosList();\r
+$this->page->promos = $this->bindArrayToObject($promosList);\r
+\r
+$this->templateFile = 'Promo/list.html';\r
+\r
+$this->addDebug("Promo/list.inc", 'Array: $promosList', print_r($promosList, 1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Promo_selected\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: selected.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promos.php';\r
+$Promos = new EventManagementAdminPromos($this->dbh, $this->config);\r
+\r
+$promoDetail = $Promos->getPromoDetail();\r
+$this->page->promoDetail = $this->bindArrayToObject($promoDetail);\r
+\r
+$this->templateFile = 'Promo/selected.html';\r
+\r
+$this->addDebug("Promo/selected.inc", 'Promo Detail', print_r($promoDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Promo_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: update.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promos.php';\r
+$Promos = new EventManagementAdminPromos($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Promos->updatePromo();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->promoDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$promoDetail = $Promos->getPromoDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($promoDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingPromo = true;\r
+ $this->templateFile = 'Promo/edit.html';\r
+ $this->addDebug("Promo/update.inc", 'Array: $r', print_r($r,1));\r
+} else {\r
+ // $this->templateFile = 'Promo/detail.html';\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/actions/Promo/detail.inc';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Report_ticket\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @release SVN: $Id: ticket.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->optionIncludeSelectListData = false;\r
+\r
+// If this is an initial entry, display report selection form\r
+if (!isset($_REQUEST['customReport'])) {\r
+\r
+ // Get a list of members\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+ $Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+ $members = $Members->getMembersList('all');\r
+\r
+ $mList = array();\r
+\r
+ if (is_array($members) && count($members) > 0) {\r
+\r
+ // Get a list of performances\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+ $performanceList = $Performances->getPerformancesList($type, $id);\r
+\r
+ // Create simple list of members and their performances\r
+ reset($members);\r
+ while (list($k, $v) = each($members)) {\r
+ $mList[$v['id']] = array(\r
+ 'id' => $v['id'],\r
+ 'name' => $v['name'],\r
+ 'performance' => array()\r
+ );\r
+ }\r
+\r
+ reset($performanceList);\r
+ while (list($k, $v) = each($performanceList)) {\r
+ $mList[$v['member_id']]['performance'][$v['id']] = array(\r
+ 'id' => $v['id'],\r
+ 'name' => $v['name']\r
+ );\r
+ }\r
+\r
+ }\r
+\r
+ $this->page->mList = $this->bindArrayToObject($mList);\r
+\r
+ // Setup min and max dates for date selection\r
+ $thisDate = date('m/d/Y');\r
+ $minDate = date('m/d/Y', strtotime(date('m/d/Y').' -5 years'));\r
+ $maxDate = date('m/d/Y', strtotime(date('m/d/Y').' +5 years'));\r
+ $this->page->thisDate = $thisDate;\r
+ $this->page->minDate = $minDate;\r
+ $this->page->maxDate = $maxDate;\r
+\r
+ $this->templateFile = 'Report/customReportSelection.html';\r
+\r
+ $this->addDebug("Report/customReportSelection.inc", 'Custom Reports', 'Array: $mList<p>'.print_r($mList,1));\r
+\r
+// Otherwise we have a report request\r
+} else {\r
+\r
+ // Build selection\r
+ $where = '';\r
+ $reportNote = 'Report Selection: ';\r
+ $reportSpacer = '';\r
+\r
+ // Check report type - default to summary\r
+ $detailSelect = '';\r
+ switch ($_REQUEST['reportType']) {\r
+ case 'claimsSummary':\r
+ $reportType = 'claimsSummary';\r
+ $detailSelect = 'R.id AS order_id, R.fname, R.lname, R.addr1, R.addr2, R.city, R.state, R.zip, R.country, R.phone,';\r
+ $templateFile = 'Report/customClaimed.html';\r
+ $templateFileCSV = '/Report/customClaimedCSV.html';\r
+ break;\r
+ case 'claimsDetail':\r
+ $reportType = 'claimsDetail';\r
+ $detailSelect = 'R.id AS order_id, R.fname, R.lname, R.addr1, R.addr2, R.city, R.state, R.zip, R.country, R.phone,';\r
+ $templateFile = 'Report/customClaimed.html';\r
+ $templateFileCSV = '/Report/customClaimedCSV.html';\r
+ break;\r
+ case 'manifest':\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/actions/Report/customManifest.inc';\r
+ return;\r
+ break;\r
+ }\r
+\r
+ // Check for selected Venue\r
+ if ($_REQUEST['memberID'] > 0) {\r
+ $where .= ' AND S.member = '.$_REQUEST['memberID'];\r
+ $reportNote .= $reportSpacer.'Selected venue';\r
+ $reportSpacer = ', ';\r
+ }\r
+\r
+ // Check for selected Performance\r
+ if ($_REQUEST['performanceID'] > 0) {\r
+ $where .= ' AND S.performance = '.$_REQUEST['performanceID'];\r
+ $reportNote .= $reportSpacer.'Selected performance';\r
+ $reportSpacer = ', ';\r
+ }\r
+\r
+ // Check for inactive venues\r
+ if ($_REQUEST['inactive'] != 'on') {\r
+ $where .= ' AND M.active = true';\r
+ $reportNote .= $reportSpacer.'Active venues only';\r
+ $reportSpacer = ', ';\r
+ } else {\r
+ $reportNote .= $reportSpacer.'Including inactive venues';\r
+ $reportSpacer = ', ';\r
+ }\r
+\r
+ // Check Date Range\r
+ $dateFrom = $_REQUEST['start_date'];\r
+ $dateTo = $_REQUEST['end_date'];\r
+ $dateRange = "between $dateFrom and $dateTo";\r
+\r
+ if ($dateTo == '') {\r
+ $dateTo = $dateFrom;\r
+ $dateRange = "on $dateFrom";\r
+ }\r
+\r
+ $dateFrom .= " 00:00:00.0";\r
+ $dateTo .= " 12:59:59.9999";\r
+\r
+ switch($_REQUEST['dateType']) {\r
+ case 'sold':\r
+ if ($dateFrom != '' && $dateTo != '') {\r
+ $where .= "\nAND R.purchase_date BETWEEN '$dateFrom' AND '$dateTo'";\r
+ $reportNote .= $reportSpacer."Sold $dateRange";\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'ticket':\r
+ if ($dateFrom != '' && $dateTo != '') {\r
+ $where .= "\nAND S.ticket_date BETWEEN '$dateFrom' AND '$dateTo'";\r
+ $reportNote .= $reportSpacer."Ticket dates $dateRange";\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'claimed':\r
+ if ($dateFrom != '' && $dateTo != '') {\r
+ $where .= "\r
+ AND (\r
+ SELECT count(id)\r
+ FROM eventmgt.ticket_claim_tracking\r
+ WHERE ticket_sold = S.id\r
+ AND time_of_action BETWEEN '$dateFrom' AND '$dateTo'\r
+ ) > 0\r
+ ";\r
+ $reportNote .= $reportSpacer."Claim dates $dateRange";\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'all':\r
+ default:\r
+ break;\r
+ }\r
+\r
+ // Check for claimed only\r
+ if ($_REQUEST['claimed'] == 'on') {\r
+ $where .= "\r
+ AND (\r
+ SELECT count(id)\r
+ FROM eventmgt.ticket_claim_tracking\r
+ WHERE ticket_sold = S.id\r
+ ) > 0\r
+ ";\r
+ $reportNote .= $reportSpacer.'Claimed tickets only';\r
+ $reportSpacer = ', ';\r
+ }\r
+\r
+ // Check for claim detail - Leave enabled for these reports\r
+// $inclClaimDetail = false;\r
+// if ($_REQUEST['claimedDetail'] == 'on') {\r
+ $inclClaimDetail = true;\r
+// }\r
+\r
+ // Check for whether we should report only on package tickets\r
+ $packageWhere = " AND (S.ticket_package IS NULL OR S.ticket_package < 1)";\r
+ $priceSelect = " S.price_paid";\r
+ if ($reportOption == "packageTickets") {\r
+ $packageWhere = " AND S.ticket_package > 0";\r
+ $priceSelect = " (SELECT price FROM eventmgt.ticket WHERE id = S.ticket) AS price_paid";\r
+ $reportNote .= $reportSpacer.'Package Tickets Only';\r
+ }\r
+\r
+ // Gather Data\r
+ $sql = "\r
+ SELECT C.scan_name,\r
+ C.time_of_action,\r
+ S.id AS voucher_id,\r
+ S.ticket_order,\r
+ S.member_name,\r
+ S.performance_name,\r
+ S.section_name,\r
+ T.name AS ticket_name,\r
+ S.date_specific,\r
+ S.ticket_date,\r
+ S.ticket_time,\r
+ R.fname,\r
+ R.lname,\r
+ R.city,\r
+ R.state,\r
+ R.phone,\r
+ R.email\r
+ FROM eventmgt.ticket_claim_tracking C,\r
+ eventmgt.ticket_sold S,\r
+ eventmgt.ticket T,\r
+ eventmgt.member M,\r
+ eventmgt.ticket_order R\r
+ WHERE S.id = C.ticket_sold\r
+ AND T.id = S.ticket\r
+ AND M.id = S.member\r
+ AND R.id = S.ticket_order\r
+ $packageWhere\r
+ $where\r
+ ORDER BY scan_name, member_name, performance_name, section_name, ticket_name\r
+ ;";\r
+// echo "<pre>$sql</pre>";\r
+\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $scanned = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+\r
+// echo "<pre>".print_r($scanned,1)."</pre>";\r
+\r
+ if (count($scanned)-0 <= 0) {\r
+ echo "No Data Returned";\r
+ exit;\r
+ }\r
+\r
+ $a = array();\r
+ $totalScans = 0;\r
+ $totalVouchers = 0;\r
+\r
+ foreach ($scanned as $s) {\r
+\r
+ $scannedBy = $s['scan_name'];\r
+ $member = $s['member_name'];\r
+ $performance = $s['performance_name'];\r
+ $section = $s['section_name'];\r
+ $ticket = $s['ticket_name'];\r
+ $dateSpecific = $s['date_specific'] == 't';\r
+ $dateTime = ($dateSpecific ? $s['ticket_date'].' '.$s['ticket_time'] : 'All Dates');\r
+ $voucher = $s['voucher_id'];\r
+\r
+ // If scanned by contact hasn't been created\r
+ if (!isset($a[$scannedBy])) {\r
+ $a[$s['scan_name']] = array(\r
+ 'voucherCount' => 0,\r
+ 'scans' => 0,\r
+ 'members' => array()\r
+ );\r
+ }\r
+\r
+ // Add count to scanned by\r
+ $a[$scannedBy]['scans']++;\r
+ $totalScans++;\r
+\r
+ // If member hasn't been created\r
+ if (!isset($a[$scannedBy]['members'][$member])) {\r
+ $a[$scannedBy]['members'][$member] = array(\r
+ 'voucherCount' => 0,\r
+ 'scans' => 0,\r
+ 'performances' => array()\r
+ );\r
+ }\r
+\r
+ // Add count to members\r
+ $a[$scannedBy]['members'][$member]['scans']++;\r
+\r
+ // If Performance has not been created\r
+ if (!isset($a[$scannedBy]['members'][$member]['performances'][$performance])) {\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance] = array(\r
+ 'voucherCount' => 0,\r
+ 'scans' => 0,\r
+ 'sections' => array()\r
+ );\r
+ }\r
+\r
+ // Add count to performances\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['scans']++;\r
+\r
+ // If Section has not been created\r
+ if (!isset($a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section])) {\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section] = array(\r
+ 'voucherCount' => 0,\r
+ 'scans' => 0,\r
+ 'tickets' => array()\r
+ );\r
+ }\r
+\r
+ // Add count to sections\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['scans']++;\r
+\r
+ // If Ticket has not been created\r
+ if (!isset($a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket])) {\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket] = array(\r
+ 'voucherCount' => 0,\r
+ 'scans' => 0,\r
+ 'dateSpecific' => $dateSpecific,\r
+ 'dateTimes' => array()\r
+ );\r
+ }\r
+\r
+ // Add count to tickets\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket]['scans']++;\r
+\r
+ // If DateTime has not been created\r
+ if (!isset($a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket]['dateTimes'][$dateTime])) {\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket]['dateTimes'][$dateTime] = array(\r
+ 'voucherCount' => 0,\r
+ 'scans' => 0,\r
+ 'vouchers' => array()\r
+ );\r
+ }\r
+\r
+ // Add count to DateTimes\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket]['dateTimes'][$dateTime]['scans']++;\r
+\r
+ // If Voucher has not been created\r
+ if (!isset($a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket]['dateTimes'][$dateTime]['vouchers'][$voucher])) {\r
+\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket]['dateTimes'][$dateTime]['vouchers'][$voucher] = array(\r
+ 'scans' => 0,\r
+ 'voucherData' => array(\r
+ 'fname' => $s['fname'],\r
+ 'lname' => $s['lname'],\r
+ 'city' => $s['city'],\r
+ 'state' => $s['state'],\r
+ 'phone' => $s['phone'],\r
+ 'email' => $s['email']
+ )\r
+ );\r
+\r
+ // Add voucher counts to everything above\r
+ $totalVouchers++;\r
+ $a[$scannedBy]['voucherCount']++;\r
+ $a[$scannedBy]['members'][$member]['voucherCount']++;\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['voucherCount']++;\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['voucherCount']++;\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket]['voucherCount']++;\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket]['dateTimes'][$dateTime]['voucherCount']++;\r
+\r
+ }\r
+\r
+ // Add count to Vouchers\r
+ $a[$scannedBy]['members'][$member]['performances'][$performance]['sections'][$section]['tickets'][$ticket]['dateTimes'][$dateTime]['vouchers'][$voucher]['scans']++;\r
+\r
+ }\r
+\r
+// echo "<pre>".print_r($a,1)."</pre>Total Scans = $totalScans<br>Total Vouchers = $totalVouchers";\r
+\r
+ $lines = array();\r
+\r
+ $lineBlank = array(\r
+ 'scannedBy' => '',\r
+ 'member' => '',\r
+ 'performance' => '',\r
+ 'section' => '',\r
+ 'ticket' => '',\r
+ 'dateTime' => '',\r
+ 'voucher' => '',\r
+ 'scans' => '',\r
+ 'fname' => '',\r
+ 'lname' => '',\r
+ 'city' => '',\r
+ 'state' => '',\r
+ 'phone' => '',\r
+ 'email' => ''\r
+ );\r
+\r
+ $detail = ($reportType == 'claimsDetail');\r
+\r
+ reset($a);\r
+ foreach ($a as $k=>$scannedBy) {\r
+\r
+ $line = $lineBlank;\r
+ $line['scannedBy'] = $k;\r
+ $scannedByTitle = $k;\r
+\r
+ if ($detail) { $lines[] = $line; }\r
+\r
+ foreach ($scannedBy['members'] as $k=>$member) {\r
+\r
+ $line = $lineBlank;\r
+ $line['member'] = $k;\r
+ $memberTitle = $k;\r
+\r
+ if ($detail) { $lines[] = $line; }\r
+\r
+ foreach ($member['performances'] as $k=>$performance) {\r
+\r
+ $line = $lineBlank;\r
+ $line['performance'] = $k;\r
+ $performanceTitle = $k;\r
+\r
+ if ($detail) { $lines[] = $line; }\r
+\r
+ foreach ($performance['sections'] as $k=>$section) {\r
+\r
+ $line = $lineBlank;\r
+ $line['section'] = $k;\r
+ $sectionTitle = $k;\r
+\r
+ if ($detail) { $lines[] = $line; }\r
+\r
+ foreach ($section['tickets'] as $k=>$ticket) {\r
+\r
+ $line = $lineBlank;\r
+ $line['ticket'] = $k;\r
+ $ticketTitle = $k;\r
+\r
+ if ($detail) { $lines[] = $line; }\r
+\r
+ foreach ($ticket['dateTimes'] as $k=>$dateTime) {\r
+\r
+ $line = $lineBlank;\r
+ $line['dateTime'] = $k;\r
+ $dateTimeTile = $k;\r
+\r
+ if ($detail && $ticket['dateSpecific']) {\r
+ $lines[] = $line;\r
+ }\r
+\r
+ foreach ($dateTime['vouchers'] as $k=>$voucher) {\r
+\r
+ // Only output these lines if this is a detail report\r
+ if ($detail) {\r
+\r
+ $line = $lineBlank;\r
+\r
+ $v = $voucher['voucherData'];\r
+\r
+ $line['dateTime'] = '';\r
+ $line['voucher'] = $k;\r
+ $line['scans'] = $v['scans'];\r
+ $line['fname'] = $v['fname'];\r
+ $line['lname'] = $v['lname'];\r
+ $line['city'] = $v['city'];\r
+ $line['state'] = $v['state'];\r
+ $line['phone'] = $v['phone'];\r
+ $line['email'] = $v['email'];\r
+\r
+ $line['scans'] = $voucher['scans'];\r
+\r
+ $lines[] = $line;\r
+\r
+ }\r
+ }\r
+\r
+ if ($ticket['dateSpecific']) {\r
+ $line = $lineBlank;\r
+ if (!$detail) {\r
+ $line['scannedBy'] = $scannedByTitle;\r
+ $line['member'] = $memberTitle;\r
+ $line['performance'] = $performanceTitle;\r
+ $line['section'] = $sectionTitle;\r
+ $line['ticket'] = $ticketTitle;\r
+ }\r
+ $line['voucher'] = $dateTime['voucherCount'];\r
+ $line['scans'] = $dateTime['scans'];\r
+ $line['dateTime'] = $dateTimeTile.' Totals';\r
+ $lines[] = $line;\r
+ }\r
+\r
+ }\r
+\r
+ $line = $lineBlank;\r
+ if (!$detail) {\r
+ $line['scannedBy'] = $scannedByTitle;\r
+ $line['member'] = $memberTitle;\r
+ $line['performance'] = $performanceTitle;\r
+ $line['section'] = $sectionTitle;\r
+ }\r
+ $line['voucher'] = $ticket['voucherCount'];\r
+ $line['scans'] = $ticket['scans'];\r
+ $line['ticket'] = $ticketTitle.' Totals';\r
+ $lines[] = $line;\r
+\r
+ }\r
+\r
+ $line = $lineBlank;\r
+ if (!$detail) {\r
+ $line['scannedBy'] = $scannedByTitle;\r
+ $line['member'] = $memberTitle;\r
+ $line['performance'] = $performanceTitle;\r
+ }\r
+ $line['voucher'] = $section['voucherCount'];\r
+ $line['scans'] = $section['scans'];\r
+ $line['section'] = $sectionTitle.' Totals';\r
+ $lines[] = $line;\r
+\r
+ }\r
+\r
+ $line = $lineBlank;\r
+ if (!$detail) {\r
+ $line['scannedBy'] = $scannedByTitle;\r
+ $line['member'] = $memberTitle;\r
+ }\r
+ $line['voucher'] = $performance['voucherCount'];\r
+ $line['scans'] = $performance['scans'];\r
+ $line['performance'] = $performanceTitle.' Totals';\r
+ $lines[] = $line;\r
+\r
+ }\r
+\r
+ $line = $lineBlank;\r
+ if (!$detail) {\r
+ $line['scannedBy'] = $scannedByTitle;\r
+ }\r
+ $line['voucher'] = $member['voucherCount'];\r
+ $line['scans'] = $member['scans'];\r
+ $line['member'] = $memberTitle.' Totals';\r
+ $lines[] = $line;\r
+\r
+ }\r
+\r
+ $line = $lineBlank;\r
+ $line['voucher'] = $scannedBy['voucherCount'];\r
+ $line['scans'] = $scannedBy['scans'];\r
+ $line['scannedBy'] = $scannedByTitle.' Totals';\r
+ $lines[] = $line;\r
+\r
+ }\r
+\r
+// echo "<pre>".print_r($lines,1)."</pre>";\r
+// echo "Total Vouchers = $totalVouchers";\r
+\r
+ $this->page->reportData = $this->bindArrayToObject($lines);\r
+ $this->page->reportNote = $reportNote;\r
+ $this->page->reportDate = date('m/d/Y');\r
+ $this->page->reportTime = date('h:m:s A');\r
+ $this->page->dateFrom = $dateFrom;\r
+ $this->page->dateTo = $dateTo;\r
+ $this->page->totalVouchers = $totalVouchers;\r
+ $this->page->totalScans = $totalScans;\r
+\r
+ $this->templateFile = $templateFile;\r
+\r
+ // Check for output type\r
+ $this->page->printOutput = false;\r
+ switch ($_REQUEST['outputType']) {\r
+ case 'html':\r
+ break;\r
+ case 'print':\r
+ $this->page->printOutput = true;\r
+ break;\r
+ case 'csv':\r
+ $this->template->compile($this->interface.$templateFileCSV);\r
+ $csvOut = $this->template->bufferedOutputObject($this->page);\r
+ $len = strlen( $csvOut );\r
+ header( "Content-type: application/octet-stream" );\r
+ header( "Content-Length: $len" );\r
+ header( "Content-Disposition: attachment; filename=report.csv" );\r
+ echo $csvOut;\r
+ exit;\r
+ break;\r
+ }\r
+\r
+ $this->addDebug("Report/sales.inc", 'Sales Report', 'Array: $a<p>'.print_r($a,1));\r
+\r
+}\r
+\r
+\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Report_customManifest\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @release SVN: $Id: ticket.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Check for selected Venue\r
+if ($_REQUEST['memberID'] > 0) {\r
+ $where .= ' AND S.member = '.$_REQUEST['memberID'];\r
+ $reportNote .= $reportSpacer.'Selected venue';\r
+ $reportSpacer = ', ';\r
+}\r
+\r
+// Check for selected Performance\r
+if ($_REQUEST['performanceID'] > 0) {\r
+ $where .= ' AND S.performance = '.$_REQUEST['performanceID'];\r
+ $reportNote .= $reportSpacer.'Selected performance';\r
+ $reportSpacer = ', ';\r
+}\r
+\r
+// Check Date Range\r
+$dateFrom = $_REQUEST['start_date'];\r
+$dateTo = $_REQUEST['end_date'];\r
+$dateRange = "between $dateFrom and $dateTo";\r
+\r
+if ($dateTo == '') {\r
+ $dateTo = $dateFrom;\r
+ $dateRange = "on $dateFrom";\r
+}\r
+\r
+$dateFrom .= " 00:00:00";\r
+$dateTo .= " 23:59:59";\r
+\r
+$where .= "\nAND S.ticket_date BETWEEN '$dateFrom' AND '$dateTo'";\r
+$reportNote .= $reportSpacer."Ticket dates $dateRange";\r
+$reportSpacer = ', ';\r
+\r
+/*\r
+ // Check for claimed only\r
+ if ($_REQUEST['claimed'] == 'on') {\r
+ $where .= "\r
+ AND (\r
+ SELECT count(id)\r
+ FROM eventmgt.ticket_claim_tracking\r
+ WHERE ticket_sold = S.id\r
+ ) > 0\r
+ ";\r
+ $reportNote .= $reportSpacer.'Claimed tickets only';\r
+ $reportSpacer = ', ';\r
+ }\r
+*/\r
+\r
+$packageWhere = " AND (S.ticket_package IS NULL OR S.ticket_package < 1)";\r
+\r
+// Gather Data\r
+$sql = "\r
+ SELECT S.performance_name,\r
+ T.name AS ticket_name,\r
+ S.ticket_date,\r
+ S.ticket_time,\r
+ S.ticket_order,\r
+ S.id AS voucher,\r
+ R.lname,\r
+ R.fname,\r
+ R.phone,\r
+ R.notes\r
+ FROM eventmgt.ticket_sold S,\r
+ eventmgt.ticket T,\r
+ eventmgt.ticket_order R\r
+ WHERE T.id = S.ticket\r
+ AND R.id = S.ticket_order\r
+ $where\r
+ ORDER BY performance_name, ticket_name, ticket_date, ticket_time, ticket_order, voucher, lname, fname\r
+;";\r
+\r
+// echo "<pre>$sql</pre>";\r
+\r
+$stmt = $this->dbh->prepare($sql);\r
+$stmt->execute();\r
+$manifest = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+\r
+// echo "<pre>".print_r($manifest,1)."</pre>";\r
+\r
+if (count($manifest)-0 <= 0) {\r
+ echo "No Data Returned";\r
+ exit;\r
+}\r
+\r
+// Remove redundant field data\r
+$perf_name = '';\r
+$ticket = '';\r
+$ticket_date = '';\r
+$ticket_time = '';\r
+$order = '';\r
+foreach ($manifest as $k=>$v) {\r
+ if ($v['performance_name'] != $perf_name) {\r
+ $perf_name = $v['performance_name'];\r
+ $ticket = $v['ticket_name'];\r
+ $ticket_date = $v['ticket_date'];\r
+ $ticket_time = $v['ticket_time'];\r
+ $order = $v['ticket_order'];\r
+ } else {\r
+ $manifest[$k]['performance_name'] = '';\r
+\r
+ if ($v['ticket_name'] != $ticket) {\r
+ $ticket = $v['ticket_name'];\r
+ $ticket_date = $v['ticket_date'];\r
+ $ticket_time = $v['ticket_time'];\r
+ $order = $v['ticket_order'];\r
+ } else {\r
+ $manifest[$k]['ticket_name'] = '';\r
+ \r
+ if ($v['ticket_date'] != $ticket_date) {\r
+ $ticket_date = $v['ticket_date'];\r
+ $ticket_time = $v['ticket_time'];\r
+ $order = $v['ticket_order'];\r
+ } else {\r
+ $manifest[$k]['ticket_date'] = '';\r
+ \r
+ if ($v['ticket_time'] != $ticket_time) {\r
+ $ticket_time = $v['ticket_time'];\r
+ $order = $v['ticket_order'];\r
+ } else {\r
+ $manifest[$k]['ticket_time'] = '';\r
+ \r
+ if ($v['ticket_order'] != $order) {\r
+ $order = $v['ticket_order'];\r
+ } else {\r
+ $manifest[$k]['ticket_order'] = '';\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ if ($_REQUEST['outputType'] != 'csv') {\r
+ $manifest[$k]['notes'] = nl2br(html_entity_decode($v['notes']));\r
+ }\r
+}\r
+\r
+$this->page->reportData = $this->bindArrayToObject($manifest);\r
+$this->page->reportNote = $reportNote;\r
+$this->page->reportDate = date('m/d/Y');\r
+$this->page->reportTime = date('h:m:s A');\r
+$this->page->dateFrom = $dateFrom;\r
+$this->page->dateTo = $dateTo;\r
+\r
+ $this->page->printOutput = false;\r
+ switch ($_REQUEST['outputType']) {\r
+ case 'html':\r
+ break;\r
+ case 'print':\r
+ $this->page->printOutput = true;\r
+ break;\r
+ case 'csv':\r
+ $this->template->compile($this->interface.'/Report/customManifestCSV.html');\r
+ $csvOut = $this->template->bufferedOutputObject($this->page);\r
+ $len = strlen( $csvOut );\r
+ header( "Content-type: application/octet-stream" );\r
+ header( "Content-Length: $len" );\r
+ header( "Content-Disposition: attachment; filename=report.csv" );\r
+ echo $csvOut;\r
+ exit;\r
+ break;\r
+ }\r
+\r
+\r
+$this->templateFile = 'Report/customManifest.html';\r
+\r
+\r
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Model Action: Report_report
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: report.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+$this->templateFile = 'Report/index.html';\r
+\r
+
+?>
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Report_member\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: member.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->optionIncludeSelectListData = false;\r
+\r
+// If this is an initial entry, display report selection form\r
+if (!isset($_REQUEST['memberReport'])) {\r
+\r
+ // Get a list of members\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+ $Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+ $members = $Members->getMembersList('all');\r
+ $this->page->membersList = $this->bindArrayToObject($members);\r
+\r
+ // Setup min and max dates for date selection\r
+ $minDate = date('m/d/Y', strtotime(date('m/d/Y').' -5 years'));\r
+ $maxDate = date('m/d/Y', strtotime(date('m/d/Y').' +5 years'));\r
+ $this->page->minDate = $minDate;\r
+ $this->page->maxDate = $maxDate;\r
+\r
+ $this->templateFile = 'Report/memberReportSelection.html';\r
+\r
+// Otherwise we have a report request\r
+} else {\r
+\r
+ $reportNote = 'Report Selection: ';\r
+ $reportSpacer = '';\r
+\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+ $Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+\r
+ // Check if inactive selected\r
+ if ($_REQUEST['inactive'] == 'on') {\r
+ $where = 'true';\r
+ $reportNote .= $reportSpacer."Active and Inactive";\r
+ $reportSpacer = ", ";\r
+ } else {\r
+ $where = 'active';\r
+ $reportNote .= $reportSpacer."Active only";\r
+ $reportSpacer = ", ";\r
+ }\r
+\r
+ // Check for selected member/venue\r
+ if ($_REQUEST['memberID'] > 0 ) {\r
+ $where .= ' AND id = '.$_REQUEST['memberID'];\r
+ $reportNote .= $reportSpacer.'Specific Venues';\r
+ $reportSpacer = ", ";\r
+ }\r
+\r
+ // Create date range for ticket sales stats if specified\r
+ $dateWhere = '';\r
+ switch ($_REQUEST['dateRange']) {\r
+ case 'thisMonth':\r
+ $start = date('m/1/Y', time());\r
+ $end = date('m/d/Y', strtotime(date('m/1/Y', time()).' +1 month -1 day'));\r
+ $dateWhere = "AND I.ticket_date BETWEEN '$start' AND '$end'";\r
+ $reportNote .= $reportSpacer."This month only";\r
+ $reportSpacer = ", ";\r
+ break;\r
+ case 'lastMonth':\r
+ $start = date('m/1/Y', strtotime(date('m/1/Y', time()).' -1 month'));\r
+ $end = date('m/d/Y', strtotime(date('m/1/Y', time()).' -1 day'));\r
+ $dateWhere = "AND I.ticket_date BETWEEN '$start' AND '$end'";\r
+ $reportNote .= $reportSpacer."Last month only";\r
+ $reportSpacer = ", ";\r
+ break;\r
+ case 'thisYear':\r
+ $start = date('1/1/Y', time());\r
+ $end = date('m/d/Y', strtotime(date('1/1/Y', time()).' +1 year -1 day'));\r
+ $dateWhere = "AND I.ticket_date BETWEEN '$start' AND '$end'";\r
+ $reportNote .= $reportSpacer."This year only";\r
+ $reportSpacer = ", ";\r
+ break;\r
+ case 'lastYear':\r
+ $start = date('1/1/Y', strtotime(date('1/1/Y', time()).' -1 year'));\r
+ $end = date('m/d/Y', strtotime(date('1/1/Y', time()).' -1 day'));\r
+ $dateWhere = "AND I.ticket_date BETWEEN '$start' AND '$end'";\r
+ $reportNote .= $reportSpacer."Last year only";\r
+ $reportSpacer = ", ";\r
+ break;\r
+ case 'specified':\r
+ if ($_REQUEST['start_date'] != '' && $_REQUEST['end_date'] != '') {\r
+ $dateWhere = " AND I.ticket_date BETWEEN '".$_REQUEST['start_date']."' AND '".$_REQUEST['end_date']."'";\r
+ $reportNote .= $reportSpacer.'Between '.$_REQUEST['start_date'].' and '.$_REQUEST['end_date'];\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'all':\r
+ default:\r
+ }\r
+\r
+ $membersList = $Members->getList($where, 'name');\r
+\r
+ $totals = array(\r
+ 'sections' => 0,\r
+ 'events' => 0,\r
+ 'tickets' => 0,\r
+ 'inventory' => 0,\r
+ 'sold' => 0,\r
+ 'price' => 0\r
+ );\r
+ if (is_array($membersList) && count($membersList) > 0) {\r
+\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sections.php';\r
+ $Sections = new EventManagementAdminSections($this->dbh, $this->config);\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+ $Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/ticketInventory.php';\r
+ $Inventory = new EventManagementAdminTicketInventory($this->dbh, $this->config);\r
+\r
+ // Get summary of member stats\r
+ reset($membersList);\r
+ while (list($k, $v) = each($membersList)) {\r
+ $membersList[$k]['sectionStats'] = $Sections->getMemberSectionsStats($v['id']);\r
+ $totals['sections'] += $membersList[$k]['sectionStats'];\r
+ $membersList[$k]['performanceStats'] = $Performances->getMemberPerformancesStats($v['id']);\r
+ $totals['events'] += $membersList[$k]['performanceStats'];\r
+ $membersList[$k]['ticketStats'] = $Tickets->getMemberTicketsStats($v['id']);\r
+ $totals['tickets'] += $membersList[$k]['ticketStats'];\r
+ $membersList[$k]['ticketSalesStats'] = $Inventory->getMemberTicketInventorySalesStats($v['id'], $dateWhere);\r
+ $totals['inventory'] += $membersList[$k]['ticketSalesStats']['totalquant'];\r
+ $totals['sold'] += $membersList[$k]['ticketSalesStats']['totalsold'];\r
+ $totals['price'] += $membersList[$k]['ticketSalesStats']['totalprice'];\r
+ $membersList[$k]['ticketSalesStats']['totalMoney'] = $this->money($membersList[$k]['ticketSalesStats']['totalprice']);\r
+ }\r
+ $totals['price'] = $this->money($totals['price']);\r
+\r
+ }\r
+\r
+ $this->page->membersList = $this->bindArrayToObject($membersList);\r
+ $this->page->totals = $this->bindArrayToObject($totals);\r
+ $this->page->reportNote = $reportNote;\r
+ $this->page->reportDate = date('m/d/Y');\r
+ $this->page->reportTime = date('h:m:s A');\r
+\r
+ // Check for output type\r
+ $this->page->printOutput = false;\r
+ $this->templateFile = 'Report/member.html';\r
+ switch ($_REQUEST['outputType']) {\r
+ case 'html':\r
+ break;\r
+ case 'print':\r
+ $this->page->printOutput = true;\r
+ break;\r
+ case 'csv':\r
+ $this->template->compile($this->interface.'/Report/memberCSV.html');\r
+ $csvOut = $this->template->bufferedOutputObject($this->page);\r
+ $len = strlen( $csvOut );\r
+ header( "Content-type: application/octet-stream" );\r
+ header( "Content-Length: $len" );\r
+ header( "Content-Disposition: attachment; filename=report.csv" );\r
+ echo $csvOut;\r
+ exit;\r
+ break;\r
+ }\r
+\r
+ $this->addDebug("Report/member.inc", 'Member List', print_r($membersList,1));\r
+\r
+}\r
+\r
+\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Report_orders\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: orders.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->optionIncludeSelectListData = false;\r
+$this->page->users_access_all_members = $this->config->option->users_access_all_members;\r
+$this->page->location_all_option = true;\r
+\r
+// If this is an initial entry, display report selection form\r
+if (!isset($_REQUEST['ordersReport'])) {\r
+\r
+ // Check if this is a log-in user to determine what access they have - Need at least "Ticket Orders & Claims"\r
+ $where = 'true';\r
+ if ($_SESSION[GLM_EVENT_SESSION]['MemberUser'] && $_SESSION[GLM_EVENT_SESSION]['MemberUserLevel'] <= $this->config->permissions_numb->orders_and_claims) {\r
+\r
+ // Setup where clause starting with the user member\r
+ $m = $_SESSION[GLM_EVENT_SESSION]['Member'];\r
+ $where = "id IN ($m";\r
+\r
+ // Get list of any members this user can scan for\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMemberScansFor.php';\r
+ $MemberScansFor = new EventManagementDataMemberScansFor($this->dbh, $this->config);\r
+ $scansFor = $MemberScansFor->getMemberScansForList($m);\r
+\r
+ if ($scansFor && count($scansFor) > 0) {\r
+ foreach($scansFor as $s) {\r
+ $where .= ','.$s['scans_for'];\r
+ }\r
+ }\r
+\r
+ $where .= ')';\r
+\r
+ $this->page->location_all_option = false;\r
+\r
+ }\r
+\r
+ // Get a list of members\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+ $Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+ $members = $Members->getMembersList('all', $where);\r
+\r
+ $mList = array();\r
+ if (is_array($members) && count($members) > 0) {\r
+\r
+ // Get a list of performances\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+ // If access is permitted to all members by users in this site\r
+ if ($this->config->option->users_access_all_members) {\r
+ $performanceList = $Performances->getPerformancesList($type, false);\r
+ } else {\r
+ $performanceList = $Performances->getPerformancesList($type, $id);\r
+ }\r
+\r
+ // Create simple list of members and their performances\r
+ reset($members);\r
+ while (list($k, $v) = each($members)) {\r
+ $mList[$v['id']] = array(\r
+ 'id' => $v['id'],\r
+ 'name' => $v['name'],\r
+ 'performance' => array()\r
+ );\r
+ }\r
+\r
+ }\r
+\r
+ $this->page->mList = $this->bindArrayToObject($mList);\r
+\r
+ // Setup min and max dates for date selection\r
+ $minDate = date('m/d/Y', strtotime(date('m/d/Y').' -5 years'));\r
+ $maxDate = date('m/d/Y', strtotime(date('m/d/Y').' +5 years'));\r
+ $this->page->minDate = $minDate;\r
+ $this->page->maxDate = $maxDate;\r
+\r
+ $this->templateFile = 'Report/ordersReportSelection.html';\r
+\r
+ $this->addDebug("Report/ordersReportSelection.inc", 'Member & Property List', 'Array: $mList<p>'.print_r($mList,1));\r
+\r
+// Otherwise we have a report request\r
+} else {\r
+\r
+ $where = 'true';\r
+ $reportNote = 'Report Selection: ';\r
+ $reportSpacer = '';\r
+\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/orders.php';\r
+ $Orders = new EventManagementAdminOrders($this->dbh, $this->config);\r
+\r
+ // Check for selected Venue\r
+ if ($_REQUEST['memberID'] > 0) {\r
+ $where .= ' AND member = '.$_REQUEST['memberID'];\r
+ $reportNote .= $reportSpacer.'Selected venue';\r
+ $reportSpacer = ', ';\r
+ }\r
+\r
+ // Check for inactive venues\r
+ if ($_REQUEST['inactive'] != 'on') {\r
+ $where .= ' AND member in (SELECT id FROM eventmgt.member WHERE active)';\r
+ $reportNote .= $reportSpacer.'Active venues only';\r
+ $reportSpacer = ', ';\r
+ } else {\r
+ $reportNote .= $reportSpacer.'Including inactive venues';\r
+ $reportSpacer = ', ';\r
+ }\r
+\r
+ // Check Purchase Date Range\r
+ switch($_REQUEST['dateType']) {\r
+ case 'sold':\r
+ if ($_REQUEST['start_date'] != '' && $_REQUEST['end_date'] != '') {\r
+ $where .= " AND purchase_date BETWEEN '".$_REQUEST['start_date']."' AND '".$_REQUEST['end_date']."'";\r
+ $reportNote .= $reportSpacer.'Sold between '.$_REQUEST['start_date'].' and '.$_REQUEST['end_date'];\r
+ $reportSpacer = ', ';\r
+ } elseif ($_REQUEST['start_date'] != '' && $_REQUEST['end_date'] == '') {\r
+ $where .= " AND purchase_date = '".$_REQUEST['start_date']."'";\r
+ $reportNote .= $reportSpacer.'Sold on '.$_REQUEST['start_date'];\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'all':\r
+ default:\r
+ break;\r
+ }\r
+\r
+ // Check Ticket or Likely Date Range\r
+ switch($_REQUEST['ticketDateType']) {\r
+\r
+// select count(id) from ticket_sold where (date_specific and ticket_date > '1/1/2014') OR (not date_specific and likely_date > '1/1/2015');\r
+ case 'ticketDate':\r
+ if ($_REQUEST['outputType'] == 'csv') {\r
+ $sDate = filter_input(INPUT_GET, 'ticket_start_date', FILTER_SANITIZE_STRING);\r
+ $eDate = filter_input(INPUT_GET, 'ticket_end_date', FILTER_SANITIZE_STRING);\r
+ } else {\r
+ $sDate = filter_input(INPUT_POST, 'ticket_start_date', FILTER_SANITIZE_STRING);\r
+ $eDate = filter_input(INPUT_POST, 'ticket_end_date', FILTER_SANITIZE_STRING);\r
+ }\r
+\r
+ if (trim($eDate) == '') {\r
+ $eDate = $sDate;\r
+ }\r
+ if ($sDate != '') {\r
+ $where .= " AND (\r
+ SELECT count(id) FROM eventmgt.ticket_sold WHERE ticket_order = T.id\r
+ AND (\r
+ (date_specific AND ticket_date BETWEEN '$sDate' AND '$eDate')\r
+ OR (NOT date_specific AND likely_date BETWEEN '$sDate' AND '$eDate')\r
+ )\r
+ ) > 0";\r
+ $reportNote .= $reportSpacer.'Ticket Date or Likely Date between '.$sDate.' and '.$eDate;\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'all':\r
+ default:\r
+ break;\r
+ }\r
+\r
+ // Check if only doing E-Mail OK on\r
+ if ($_REQUEST['emailOK'] == 'on') {\r
+ $where .= ' AND email_ok';\r
+ }\r
+\r
+ // Check for other fields\r
+ $orderID = $_REQUEST['orderID'] - 0;\r
+ if ($orderID) {\r
+ $where .= " AND id = $orderID";\r
+ }\r
+ $lname = filter_input(INPUT_POST, 'lname', FILTER_SANITIZE_STRING);\r
+ if ($lname != '') {\r
+ $where .= " AND lname ILIKE '$lname%'";\r
+ }\r
+ $fname = filter_input(INPUT_POST, 'fname', FILTER_SANITIZE_STRING);\r
+ if ($fname != '') {\r
+ $where .= " AND fname ILIKE '$fname%'";\r
+ }\r
+ $city = filter_input(INPUT_POST, 'city', FILTER_SANITIZE_STRING);\r
+ if ($city != '') {\r
+ $where .= " AND city ILIKE '$city%'";\r
+ }\r
+ $state = filter_input(INPUT_POST, 'state', FILTER_SANITIZE_STRING);\r
+ if ($state != '') {\r
+ $where .= " AND state = '$state'";\r
+ }\r
+ $zip = filter_input(INPUT_POST, 'zip', FILTER_SANITIZE_STRING);\r
+ if ($zip != '') {\r
+ $where .= " AND zip = '$zip'";\r
+ }\r
+ $phone = filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING);\r
+ if ($phone != '') {\r
+ $where .= " AND phone ILIKE '$phone%'";\r
+ }\r
+\r
+ // Order By\r
+ $orderBy = '';\r
+ switch($_REQUEST['sortType']) {\r
+ case 'id':\r
+ $orderBy = 'id';\r
+ break;\r
+ case 'date':\r
+ $orderBy = 'purchase_date, lname, fname';\r
+ break;\r
+ case 'name':\r
+ $orderBy = 'lname, fname';\r
+ break;\r
+ case 'location':\r
+ $orderBy = 'country, state, city, lname, fname';\r
+ break;\r
+ case 'venue_date':\r
+ $orderBy = 'member_name, purchase_date, lname, fname';\r
+ break;\r
+ case 'venue_name':\r
+ $orderBy = 'member_name, lname, fname';\r
+ break;\r
+ }\r
+\r
+ // Get list of selected orders\r
+ $ordersList = $Orders->getList($where, $orderBy);\r
+\r
+ // Build totals\r
+ if ($ordersList != false && count($ordersList) > 0) {\r
+ reset($ordersList);\r
+ $orders = 0;\r
+ $total = 0;\r
+ foreach ($ordersList as &$ord) {\r
+ $orders++;\r
+ $total += $ord['charge_numb'];\r
+ }\r
+ }\r
+\r
+//var_dump($ordersList);exit;\r
+\r
+ $this->page->ordersList = $this->bindArrayToObject($ordersList);\r
+ $this->page->reportNote = $reportNote;\r
+ $this->page->reportDate = date('m/d/Y');\r
+ $this->page->reportTime = date('h:m:s A');\r
+\r
+ $this->page->numbOrders = $orders;\r
+ $this->page->totalCharges = $total;\r
+ $this->page->averageOrder = $this->money(($orders > 0 ? $total/$orders : 0));\r
+ $this->page->totalChargesMoney = $this->money($total);\r
+\r
+ // Check for output type\r
+ $this->page->printOutput = false;\r
+ switch ($_REQUEST['outputType']) {\r
+ case 'html':\r
+ break;\r
+ case 'print':\r
+ $this->page->printOutput = true;\r
+ break;\r
+ case 'csv':\r
+ $this->template->compile($this->interface.'/Report/ordersCSV.html');\r
+ $csvOut = $this->template->bufferedOutputObject($this->page);\r
+ $len = strlen( $csvOut );\r
+ header( "Content-type: application/octet-stream" );\r
+ header( "Content-Length: $len" );\r
+ header( "Content-Disposition: attachment; filename=report.csv" );\r
+ echo $csvOut;\r
+ exit;\r
+ break;\r
+ }\r
+\r
+ $this->templateFile = 'Report/orders.html';\r
+\r
+ $this->addDebug("Report/orders.inc", 'Orders List', print_r($ordersList,1));\r
+\r
+\r
+}\r
+\r
+\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Report_ticket\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @release SVN: $Id: ticket.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->optionIncludeSelectListData = false;\r
+$errorMsg = '';\r
+\r
+// If this is an initial entry, display report selection form\r
+if (!isset($_REQUEST['promoReport'])) {\r
+\r
+ // Get a list of Promo Codes\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/promos.php';\r
+ $Promos = new EventManagementAdminPromos($this->dbh, $this->config);\r
+ $promos = $Promos->getPromosList('all');\r
+ $this->page->promos = $this->bindArrayToObject($promos);\r
+\r
+ $this->templateFile = 'Report/promoReportSelection.html';\r
+\r
+ $this->addDebug("Report/promoReportSelection.inc", 'Promo Code Lists', 'Array: $mList<p>'.print_r($promos,1));\r
+\r
+// Otherwise we have a report request\r
+} else {\r
+\r
+ // Build selection\r
+ $where = '';\r
+ $reportNote = '';\r
+ $reportSpacer = '';\r
+ $from = '';\r
+\r
+ // Check for selected Promo\r
+ if ($_REQUEST['promoID'] > 0) {\r
+ $where .= ' AND S.promo = '.$_REQUEST['promoID'];\r
+ $reportNote .= $reportSpacer.'Specified Promotion';\r
+ $reportSpacer = ', ';\r
+ $selectionProblem = false;\r
+ }\r
+\r
+ // Check Date Range\r
+ $dateFrom = $_REQUEST['start_date'];\r
+ $dateTo = $_REQUEST['end_date'];\r
+ $dateRange = "between $dateFrom and $dateTo";\r
+ if ($dateTo == '') {\r
+ $dateTo = $dateFrom;\r
+ $dateRange = "on $dateFrom";\r
+ }\r
+ switch($_REQUEST['dateType']) {\r
+ case 'sold':\r
+ if ($dateFrom != '' && $dateTo != '') {\r
+ $where .= "\nAND K.purchase_date BETWEEN '$dateFrom' AND '$dateTo'";\r
+ $reportNote .= $reportSpacer."Sold $dateRange";\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'ticket':\r
+ if ($dateFrom != '' && $dateTo != '') {\r
+ $where .= "\nAND S.ticket_date BETWEEN '$dateFrom' AND '$dateTo'";\r
+ $reportNote .= $reportSpacer."Ticket dates $dateRange";\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'claimed':\r
+ if ($dateFrom != '' && $dateTo != '') {\r
+ $where .= "\r
+ AND (\r
+ SELECT count(id)\r
+ FROM eventmgt.ticket_claim_tracking\r
+ WHERE ticket_sold = S.id\r
+ AND time_of_action BETWEEN '$dateFrom' AND '$dateTo'\r
+ ) > 0\r
+ ";\r
+ $reportNote .= $reportSpacer."Ticket dates $dateRange";\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'all':\r
+ default:\r
+ break;\r
+ }\r
+\r
+ // Check for valid report type\r
+ $reportType = $_REQUEST['reportType'];\r
+ if ($reportType == 'detail' && $_REQUEST['promoID'] == 0) {\r
+ $errorMsg .= "Detail reports are only available when selecting a specific promo code.<br>";\r
+ } else {\r
+\r
+ // Check report type - default to summary\r
+ $detailSelect = '';\r
+ switch ($_REQUEST['reportType']) {\r
+\r
+ case 'detail':\r
+\r
+ // Get Data\r
+ $sql = "SELECT S.promo, COUNT(S.amount), SUM(S.amount), T.performance_name, T.ticket_name,\r
+ S.promo_name, S.amount, C.long_name, K.fname, K.lname, K.city, K.purchase_date\r
+ FROM eventmgt.promo_sold S, eventmgt.promo_code C, eventmgt.ticket_sold T, eventmgt.ticket_order K\r
+ WHERE T.id = S.ticket_sold\r
+ AND K.id = S.ticket_order\r
+ AND C.id = S.promo\r
+ $where\r
+ GROUP BY C.long_name, S.promo, S.amount, S.promo_name, T.performance_name, T.ticket_name, S.amount,\r
+ K.fname, K.lname, K.city, K.purchase_date\r
+ ORDER BY C.long_name, T.performance_name, T.ticket_name\r
+ ;";\r
+\r
+ $this->templateFile = 'Report/promoSummary.html';\r
+ break;\r
+\r
+ default:\r
+ case 'summary':\r
+\r
+ // Get Data\r
+ $sql = "SELECT S.promo, COUNT(S.amount), SUM(S.amount), T.performance_name, T.ticket_name,\r
+ S.promo_name, S.amount, C.long_name\r
+ FROM eventmgt.promo_sold S, eventmgt.promo_code C, eventmgt.ticket_sold T\r
+ WHERE T.id = S.ticket_sold\r
+ AND C.id = S.promo\r
+ $where\r
+ GROUP BY C.long_name, S.promo, S.amount, S.promo_name, T.performance_name, T.ticket_name, S.amount\r
+ ORDER BY C.long_name, T.performance_name, T.ticket_name\r
+ ;";\r
+\r
+ $this->templateFile = 'Report/promoSummary.html';\r
+ break;\r
+ }\r
+\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $promos = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+\r
+ $totalEntries = 0;\r
+ $totalCount = 0;\r
+ $totalDiscount = 0;\r
+ $currentPromo = false;\r
+ $currentPerformance = false;\r
+ $currentItem = false;\r
+\r
+ // Build totals and process fields\r
+ if ( is_array($promos) ) {\r
+\r
+ while (list ($key, $val) = each ($promos)) {\r
+\r
+ // Change all discount values to positive\r
+ $promos[$key]['amountMoney'] = number_format($val['amount']*-1,2);\r
+ $promos[$key]['sumMoney'] = number_format($val['sum']*-1,2);\r
+\r
+ // Add this promo to the grand totals\r
+ $totalEntries++;\r
+ $totalCount += $promos[$key]['count'];\r
+ $totalDiscount += abs($promos[$key]['sum']);\r
+\r
+ // If this is the same promo, don't display promo names again\r
+ if ($currentPromo == $val['promo_name']) {\r
+ $promos[$key]['promo_name'] = '';\r
+ $promos[$key]['long_name'] = '';\r
+ } else {\r
+ $currentPromo = $val['promo_name'];\r
+ $currentPerformance = false;\r
+ $currentItem = false;\r
+ }\r
+\r
+ // If this is the same Performance\r
+ if ($currentPerformance == $val['performance_name']) {\r
+ $promos[$key]['performance_name'] = '';\r
+ } else {\r
+ $currentPerformance = $val['performance_name'];\r
+ $currentItem = false;\r
+ }\r
+\r
+ // If this is the same Item\r
+ if ($currentItem == $val['ticket_name']) {\r
+ $promos[$key]['ticket_name'] = '';\r
+ } else {\r
+ $currentItem = $val['ticket_name'];\r
+ }\r
+\r
+ }\r
+\r
+ // Provide totals and detail to template\r
+ $this->page->totalEntries = $totalEntries;\r
+ $this->page->totalCount = $totalCount;\r
+ $this->page->totalDiscount = number_format($totalDiscount,2);\r
+ $this->page->havePromoList = true;\r
+ $this->page->promoList = $this->bindArrayToObject($promos);\r
+\r
+ }\r
+\r
+\r
+ } // valid request\r
+\r
+// echo "<pre>".print_r($promos,1)."</pre>";\r
+\r
+/*\r
+ // Get data\r
+ $sql = "\r
+ SELECT S.id, S.member, S.member_name, S.performance, S.performance_name, S.section, S.section_name,\r
+ S.ticket_order, S.ticket, S.ticket_date, S.ticket_time, S.price_paid, S.time_claimed,\r
+ T.unlimited_quant, T.quant, T.name AS ticket_name,\r
+ M.active,\r
+ R.purchase_date,\r
+ $detailSelect\r
+ (\r
+ SELECT sum(quant)\r
+ FROM eventmgt.ticket_claim_tracking\r
+ WHERE ticket_sold = S.id\r
+ ) as claimed\r
+ FROM eventmgt.ticket_sold S, eventmgt.ticket T, eventmgt.member M, eventmgt.ticket_order R\r
+ WHERE T.id = S.ticket\r
+ AND M.id = S.member\r
+ AND R.id = S.ticket_order\r
+ $where\r
+ ORDER BY member_name, performance_name, section_name, ticket_name\r
+ ;";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $sales = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+*/\r
+\r
+/*\r
+ $this->page->salesList = $this->bindArrayToObject($out);\r
+ $this->page->totalQuant = $totalQuant;\r
+ $this->page->totalSold = $totalSold;\r
+ if ($totalQuant > 0) {\r
+ $this->page->percentSold = number_format(($totalSold/$totalQuant)*100,2);\r
+ } else {\r
+ $this->page->percentSold = '0';\r
+ }\r
+ $this->page->totalClaimed = $totalClaimed;\r
+ if ($totalSold > 0) {\r
+ $this->page->percentClaimed = number_format(($totalClaimed/$totalSold)*100,2);\r
+ } else {\r
+ $this->page->percentClaimed = '0';\r
+ }\r
+ $this->page->totalPromos = $totalPromos;\r
+ $this->page->totalPromosMoney = $this->money($totalPromos);\r
+ $this->page->totalPrice = $totalPrice;\r
+ $this->page->totalMoney = $this->money($totalPrice);\r
+*/\r
+\r
+ if ($reportNote != '') {\r
+ $reportNote = 'Report Selection: '.$reportNote;\r
+ } else {\r
+ $reportNote = false;\r
+ }\r
+ $this->page->reportNote = $reportNote;\r
+ $this->page->reportDate = date('m/d/Y');\r
+ $this->page->reportTime = date('h:m:s A');\r
+\r
+ // Get Output type\r
+ $outputType = $_REQUEST['outputType'];\r
+\r
+ $this->page->errorMsg = $errorMsg;\r
+ if ($errorMsg != '') {\r
+ $outputType = 'error';\r
+ }\r
+\r
+ // Check for output type\r
+ $this->page->printOutput = false;\r
+ switch ($outputType) {\r
+ case 'error';\r
+ $this->templateFile = 'Report/error.html';\r
+ case 'html':\r
+ break;\r
+ case 'print':\r
+ $this->page->printOutput = true;\r
+ break;\r
+ case 'csv':\r
+ $this->template->compile($this->interface.$templateFileCSV);\r
+ $csvOut = $this->template->bufferedOutputObject($this->page);\r
+ $len = strlen( $csvOut );\r
+ header( "Content-type: application/octet-stream" );\r
+ header( "Content-Length: $len" );\r
+ header( "Content-Disposition: attachment; filename=report.csv" );\r
+ echo $csvOut;\r
+ exit;\r
+ break;\r
+ }\r
+\r
+ $this->addDebug("Report/sales.inc", 'Sales Report', 'Array: $a<p>'.print_r($a,1));\r
+\r
+}\r
+\r
+\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Report_ticket\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @release SVN: $Id: ticket.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->optionIncludeSelectListData = false;\r
+\r
+// If this is an initial entry, display report selection form\r
+if (!isset($_REQUEST['salesReport'])) {\r
+\r
+ // Get a list of members\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+ $Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+ $members = $Members->getMembersList('all');\r
+\r
+ $mList = array();\r
+\r
+ if (is_array($members) && count($members) > 0) {\r
+\r
+ // Get a list of performances\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($this->dbh, $this->config);\r
+ $performanceList = $Performances->getPerformancesList($type, $id, true);\r
+\r
+ // Create simple list of members and their performances\r
+ reset($members);\r
+ while (list($k, $v) = each($members)) {\r
+ $mList[$v['id']] = array(\r
+ 'id' => $v['id'],\r
+ 'name' => $v['name'],\r
+ 'performance' => array()\r
+ );\r
+ }\r
+\r
+ reset($performanceList);\r
+ while (list($k, $v) = each($performanceList)) {\r
+ $mList[$v['member_id']]['performance'][$v['id']] = array(\r
+ 'id' => $v['id'],\r
+ 'name' => $v['name'],\r
+ 'active' => $v['active']['value']\r
+ );\r
+ }\r
+\r
+ }\r
+\r
+ $this->page->mList = $this->bindArrayToObject($mList);\r
+\r
+ // Setup min and max dates for date selection\r
+ $minDate = date('m/d/Y', strtotime(date('m/d/Y').' -5 years'));\r
+ $maxDate = date('m/d/Y', strtotime(date('m/d/Y').' +5 years'));\r
+ $this->page->minDate = $minDate;\r
+ $this->page->maxDate = $maxDate;\r
+\r
+ $this->templateFile = 'Report/salesReportSelection.html';\r
+\r
+ $this->addDebug("Report/salesReportSelection.inc", 'Member & Property List', 'Array: $mList<p>'.print_r($mList,1));\r
+\r
+// Otherwise we have a report request\r
+} else {\r
+\r
+ // Build selection\r
+ $where = '';\r
+ $reportNote = 'Report Selection: ';\r
+ $reportSpacer = '';\r
+\r
+ // Check report type - default to summary\r
+ $detailSelect = '';\r
+ switch ($_REQUEST['reportType']) {\r
+ case 'detail':\r
+ $reportType = 'detail';\r
+ $detailSelect = 'R.id AS order_id, R.fname, R.lname, R.addr1, R.addr2, R.city, R.state, R.zip, R.country, R.email, R.phone,';\r
+ $templateFile = 'Report/salesDetail.html';\r
+ $templateFileCSV = '/Report/salesDetailCSV.html';\r
+ break;\r
+ case 'packageTicket':\r
+ $reportType = 'summary';\r
+ $reportOption = 'packageTickets';\r
+ $templateFile = 'Report/salesPackageTickets.html';\r
+ $templateFileCSV = '/Report/salesPackageTicketsCSV.html';\r
+ break;\r
+ default:\r
+ case 'summary':\r
+ $reportType = 'summary';\r
+ $templateFile = 'Report/sales.html';\r
+ $templateFileCSV = '/Report/salesCSV.html';\r
+ break;\r
+ }\r
+\r
+ // Check for selected Venue\r
+ if ($_REQUEST['memberID'] > 0) {\r
+ $where .= ' AND S.member = '.$_REQUEST['memberID'];\r
+ $reportNote .= $reportSpacer.'Selected venue';\r
+ $reportSpacer = ', ';\r
+ }\r
+\r
+ // Check for selected Performance\r
+ if (isset($_REQUEST['performanceID']) && count($_REQUEST['performanceID']) > 0) {\r
+ \r
+ $pIds = '';\r
+ $sep = '';\r
+ foreach($_REQUEST['performanceID'] as $p) {\r
+ $pIds .= $sep.$p;\r
+ $sep = ', ';\r
+ }\r
+ $where .= ' AND S.performance in ('.$pIds.')';\r
+ $reportNote .= $reportSpacer.'Selected performance';\r
+ $reportSpacer = ', ';\r
+ }\r
+\r
+ // Check for inactive venues\r
+ if ($_REQUEST['inactive'] != 'on') {\r
+ $where .= ' AND M.active = true';\r
+ $reportNote .= $reportSpacer.'Active venues only';\r
+ $reportSpacer = ', ';\r
+ } else {\r
+ $reportNote .= $reportSpacer.'Including inactive venues';\r
+ $reportSpacer = ', ';\r
+ }\r
+\r
+ // Check Date Range\r
+ $dateFrom = $_REQUEST['start_date'];\r
+ $dateTo = $_REQUEST['end_date'];\r
+ $dateRange = "between $dateFrom and $dateTo";\r
+ if ($dateTo == '') {\r
+ $dateTo = $dateFrom;\r
+ $dateRange = "on $dateFrom";\r
+ }\r
+ switch($_REQUEST['dateType']) {\r
+ case 'sold':\r
+ if ($dateFrom != '' && $dateTo != '') {\r
+ $where .= "\nAND R.purchase_date BETWEEN '$dateFrom' AND '$dateTo'";\r
+ $reportNote .= $reportSpacer."Sold $dateRange";\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'ticket':\r
+ if ($dateFrom != '' && $dateTo != '') {\r
+ $where .= "\nAND S.ticket_date BETWEEN '$dateFrom' AND '$dateTo'";\r
+ $reportNote .= $reportSpacer."Ticket dates $dateRange";\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'claimed':\r
+ if ($dateFrom != '' && $dateTo != '') {\r
+ $where .= "\r
+ AND (\r
+ SELECT count(id)\r
+ FROM eventmgt.ticket_claim_tracking\r
+ WHERE ticket_sold = S.id\r
+ AND time_of_action BETWEEN '$dateFrom' AND '$dateTo'\r
+ ) > 0\r
+ ";\r
+ $reportNote .= $reportSpacer."Ticket dates $dateRange";\r
+ $reportSpacer = ', ';\r
+ }\r
+ break;\r
+ case 'all':\r
+ default:\r
+ break;\r
+ }\r
+\r
+ // Check for claimed only\r
+ if ($_REQUEST['claimed'] == 'on') {\r
+ $where .= "\r
+ AND (\r
+ SELECT count(id)\r
+ FROM eventmgt.ticket_claim_tracking\r
+ WHERE ticket_sold = S.id\r
+ ) > 0\r
+ ";\r
+ $reportNote .= $reportSpacer.'Claimed tickets only';\r
+ $reportSpacer = ', ';\r
+ }\r
+\r
+ // Check for claim detail\r
+ $inclClaimDetail = false;\r
+ if ($_REQUEST['claimedDetail'] == 'on') {\r
+ $inclClaimDetail = true;\r
+ }\r
+\r
+ // Check for whether we should report only on package tickets\r
+ $packageWhere = " AND (S.ticket_package IS NULL OR S.ticket_package < 1)";\r
+ $priceSelect = " S.price_paid";\r
+ if ($reportOption == "packageTickets") {\r
+ $packageWhere = " AND S.ticket_package > 0";\r
+ $priceSelect = " (SELECT price FROM eventmgt.ticket WHERE id = S.ticket) AS price_paid";\r
+ $reportNote .= $reportSpacer.'Package Tickets Only';\r
+ }\r
+\r
+\r
+ // Fix Promo_Sold amount data ******************* REMOVE ONCE STORING OF PROMO_SOLD AMOUNT IS FIXED *****************************\r
+/*\r
+ $sql = "\r
+ UPDATE eventmgt.promo_sold\r
+ SET amount = eventmgt.promo_ticket.amount * -1\r
+ FROM eventmgt.promo_ticket, eventmgt.ticket_sold\r
+ WHERE eventmgt.ticket_sold.id = eventmgt.promo_sold.ticket_sold\r
+ AND eventmgt.promo_ticket.ticket = eventmgt.ticket_sold.ticket\r
+ AND eventmgt.promo_ticket.promo = eventmgt.promo_sold.promo\r
+ ;";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+*/\r
+\r
+ // Get data - Note that tickets sold as part of a package have a ticket_package ID but don't have $s sold values. These are excluded from the results.\r
+ $sql = "\r
+ SELECT S.id, S.member, S.member_name, S.performance, S.performance_name, S.section, S.section_name,\r
+ S.ticket_order, S.ticket, S.ticket_date, S.ticket_time, $priceSelect, S.time_claimed,\r
+ T.unlimited_quant, T.quant, T.name AS ticket_name, I.quant AS inv_quant,\r
+ M.active,\r
+ R.purchase_date,\r
+ $detailSelect\r
+ (\r
+ SELECT sum(quant)\r
+ FROM eventmgt.ticket_claim_tracking\r
+ WHERE ticket_sold = S.id\r
+ ) as claimed\r
+ FROM eventmgt.ticket_sold S, eventmgt.ticket T, eventmgt.member M, eventmgt.ticket_order R, eventmgt.ticket_inventory I\r
+ WHERE T.id = S.ticket\r
+ AND M.id = S.member\r
+ AND R.id = S.ticket_order\r
+ $packageWhere\r
+ $where\r
+ AND T.id = I.ticket\r
+ AND (\r
+ NOT S.date_specific\r
+ OR\r
+ (S.ticket_date = I.ticket_date AND S.ticket_time = I.ticket_time)\r
+ )\r
+ ORDER BY member_name, performance_name, section_name, ticket_name\r
+ ;";\r
+//echo "<pre>".print_r($sql,1)."</pre>";\r
+\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $sales = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+\r
+ // Compile output array and totals\r
+ $totalQuant = 0;\r
+ $totalSold = 0;\r
+ $totalClaimed = 0;\r
+ $totalPromos = 0;\r
+ $totalPrice = 0;\r
+ $a = array();\r
+\r
+ // Array used for quantity control\r
+ $ticDate = array();\r
+\r
+ // Values to check if we're still on the same entity\r
+ $membLast = false;\r
+ $perfLast = false;\r
+ $sectLast = false;\r
+ $tickLast = false;\r
+ $dateLast = false;\r
+\r
+ // Scan results and build interim report array\r
+ reset($sales);\r
+\r
+ foreach ($sales as &$s) {\r
+\r
+ // Need to determine if we're doing blank rather than number for unlimited quant\r
+ $q = '';\r
+ if (!$s['unlimited_quant']) {\r
+ $q = 0;\r
+ }\r
+\r
+ // If member hasn't been created\r
+ if (!isset($a[$s['member']])) {\r
+ $a[$s['member']] = array(\r
+ 'id' => $s['member'],\r
+ 'name' => $s['member_name'],\r
+ 'quant' => $q,\r
+ 'sold' => 0,\r
+ 'claimed' => 0,\r
+ 'price' => 0,\r
+ 'money' => 0,\r
+ 'performance' => array()\r
+ );\r
+ }\r
+ $memb = &$a[$s['member']];\r
+\r
+ // If performance hasn't been created\r
+ if (!isset($memb['performance'][$s['performance']])) {\r
+ $memb['performance'][$s['performance']] = array(\r
+ 'id' => $s['performance'],\r
+ 'name' => $s['performance_name'],\r
+ 'quant' => $q,\r
+ 'sold' => 0,\r
+ 'claimed' => 0,\r
+ 'price' => 0,\r
+ 'money' => 0,\r
+ 'section' => array()\r
+ );\r
+ }\r
+ $perf = &$memb['performance'][$s['performance']];\r
+\r
+ // If section hasn't been created\r
+ if (!isset($perf['section'][$s['section']])) {\r
+ $perf['section'][$s['section']] = array(\r
+ 'id' => $s['section'],\r
+ 'name' => $s['section_name'],\r
+ 'quant' => $q,\r
+ 'sold' => 0,\r
+ 'claimed' => 0,\r
+ 'price' => 0,\r
+ 'money' => 0,\r
+ 'ticket' => array()\r
+ );\r
+ }\r
+ $sect = &$perf['section'][$s['section']];\r
+\r
+ // If ticket hasn't been created\r
+ if (!isset($sect['ticket'][$s['ticket']])) {\r
+ $sect['ticket'][$s['ticket']] = array(\r
+ 'id' => $s['ticket'],\r
+ 'name' => $s['ticket_name'],\r
+ 'quant' => $q,\r
+ 'sold' => 0,\r
+ 'claimed' => 0,\r
+ 'price' => 0,\r
+ 'money' => 0,\r
+ 'add_on' => array(),\r
+ 'date' => array()\r
+ );\r
+ }\r
+ $tick = &$sect['ticket'][$s['ticket']];\r
+\r
+ // If date hasn't been created\r
+ if (!isset($tick['date'][$s['ticket_date']])) {\r
+ $tick['date'][$s['ticket_date']] = array(\r
+ 'date' => $s['ticket_date'],\r
+ 'quant' => $q,\r
+ 'sold' => 0,\r
+ 'claimed' => 0,\r
+ 'price' => 0,\r
+ 'money' => 0,\r
+ 'time' => array()\r
+ );\r
+ }\r
+ $date = &$tick['date'][$s['ticket_date']];\r
+\r
+ // If time hasn't been created\r
+ if (!isset($date['time'][$s['ticket_time']])) {\r
+\r
+ if ($s['ticket_time'] == '12:00:00') {\r
+ $timeString = '';\r
+ } else {\r
+ $t = explode(':', $s['ticket_time']);\r
+ $ampm = 'AM';\r
+ $hour = ($t[0] - 0);\r
+ if ($hour > 11) {\r
+ $ampm = 'PM';\r
+ } else {\r
+ }\r
+ if ($hour > 12) {\r
+ $hour -= 12;\r
+ }\r
+ $timeString = sprintf('%2d:%02d %s', $hour, $min, $ampm);\r
+ }\r
+\r
+ $date['time'][$s['ticket_time']] = array(\r
+ 'time' => $timeString,\r
+ 'quant' => $q,\r
+ 'sold' => 0,\r
+ 'claimed' => 0,\r
+ 'promo' => 0,\r
+ 'promo_money' => 0,\r
+ 'price' => 0,\r
+ 'money' => 0,\r
+ 'detail' => array()\r
+ );\r
+\r
+ }\r
+ $time = &$date['time'][$s['ticket_time']];\r
+\r
+ // Check for Add-ons for this tickets\r
+ $sql = "\r
+ SELECT add_on_name, add_on_type, add_on_type_name, unit_price, quant, price_paid\r
+ FROM eventmgt.add_on_sold\r
+ WHERE ticket_sold = ".$s['id']."\r
+ ORDER BY add_on_name\r
+ ;";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $addOns = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+ if (count($addOns) > 0) {\r
+ foreach ($addOns as $addOn) {\r
+\r
+ // *** NEED TO MOVE THIS TO USING Add-On ID rather than name when that's added to the record.\r
+ if (!isset($tick['add_on'][$addOn['add_on_name']])) {\r
+ $tick['add_on'][$addOn['add_on_name']] = array(\r
+ 'name' => $addOn['add_on_name'],\r
+ 'type' => $addOn['add_on_type'],\r
+ 'quant' => $addOn['quant'],\r
+ 'price' => $addOn['price_paid'],\r
+ 'money' => $this->money($addOn['price_paid'])\r
+ );\r
+ } else {\r
+ $tick['add_on'][$addOn['add_on_name']]['quant'] += $addOn['quant'];\r
+ $tick['add_on'][$addOn['add_on_name']]['price'] += $addOn['price_paid'];\r
+ $tick['add_on'][$addOn['add_on_name']]['money'] = $this->money($tick['add_on'][$addOn['add_on_name']]['price']);\r
+ }\r
+\r
+ // Add to total price\r
+ $totalPrice += $addOn['price_paid'];\r
+\r
+ }\r
+ }\r
+\r
+ // Check for any promotion\r
+ $sql = "\r
+ SELECT amount\r
+ FROM eventmgt.promo_sold\r
+ WHERE ticket_sold = ".$s['id']."\r
+ ;";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $promos = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+ $promoAmount = 0;\r
+ if (count($promos) > 0) {\r
+ foreach ($promos as $promo) {\r
+ $promoAmount += $promo['amount'];\r
+ }\r
+ }\r
+\r
+ // Determine if unlimited quantity available and don't display quant if so.\r
+ if (!$s['unlimited_quant']) {\r
+\r
+ // Only add to quantity if this date for this ticket hasn't been added yet\r
+ $ticDateTime = $s['ticket'].'-'.$s['ticket_date'].'-'.$s['ticket_time'];\r
+ if (!isset( $ticDate[$ticDateTime])) {\r
+\r
+ // Mark that we've already added quants for this date and time\r
+ $ticDate[$ticDateTime] = true;\r
+\r
+ // Check config for whether we should use quantity from the item or inventory for the reports\r
+ if ($this->config->option->reports->quant_from_inventory) {\r
+ $q = $s['inv_quant'];\r
+ } else {\r
+ $q = $s['quant'];\r
+ }\r
+\r
+ // Add quantities for this date and time only for this occurrance\r
+ $memb['quant'] += $q;\r
+ $perf['quant'] += $q;\r
+ $sect['quant'] += $q;\r
+ $tick['quant'] += $q;\r
+ $date['quant'] += $q;\r
+ $time['quant'] += $q;\r
+ $totalQuant += $q;\r
+\r
+ }\r
+\r
+ }\r
+\r
+ // Add this ticket sold\r
+ $memb['sold']++;\r
+ $perf['sold']++;\r
+ $perf['price'] += $s['price_paid'];\r
+ $sect['sold']++;\r
+ $sect['price'] += $s['price_paid'];\r
+ $tick['sold']++;\r
+ $tick['price'] += $s['price_paid'];\r
+ $date['sold']++;\r
+ $date['price'] += $s['price_paid'];\r
+ $time['sold']++;\r
+ $time['price'] += $s['price_paid'] + $promoAmount;\r
+ $time['promo'] += $promoAmount;\r
+ $totalSold++;\r
+ $totalPromos += $promoAmount;\r
+ $totalPrice += $s['price_paid'] + $promoAmount;\r
+\r
+ if ($s['claimed'] != '') {\r
+ $memb['memb_claimed'] += $s['claimed'];\r
+ $perf['perf_claimed'] += $s['claimed'];\r
+ $sect['sect_claimed'] += $s['claimed'];\r
+ $tick['tick_claimed'] += $s['claimed'];\r
+ $date['date_claimed'] += $s['claimed'];\r
+ $time['time_claimed'] += $s['claimed'];\r
+ $totalClaimed++;\r
+ }\r
+\r
+ // Check if we're doing a detail report\r
+ if ($reportType == 'detail') {\r
+\r
+ // If Claimed Detail is requested\r
+ $claimDetail = '';\r
+ if ($inclClaimDetail) {\r
+\r
+ // Look for claims for this voucher\r
+ $sql = "\r
+ SELECT time_of_action, scan_name\r
+ FROM eventmgt.ticket_claim_tracking\r
+ WHERE ticket_sold = ".$s['id']."\r
+ ;";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $scans = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+\r
+ // If there's any, list them\r
+ if (count($scans) > 0) {\r
+\r
+ $sep = '';\r
+\r
+ // Only do a max of 3\r
+ $maxScCount = 3;\r
+ $scCount = 0;\r
+ foreach ($scans as $sc) {\r
+ $claimDetail .= $sep.$sc['scan_name'];\r
+ $sep = ':';\r
+ if (++$scCount >= $maxScCount) {\r
+ $claimDetail .= "$sep ...";\r
+ break;\r
+ }\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ $time['detail'][] = array(\r
+ 'order_id' => $s['order_id'],\r
+ 'voucher_id' => $s['id'],\r
+ 'voucher_claims' => $claimDetail,\r
+ 'fname' => $s['fname'],\r
+ 'lname' => $s['lname'],\r
+ 'addr1' => $s['addr1'],\r
+ 'addr2' => $s['addr2'],\r
+ 'city' => $s['city'],\r
+ 'state' => $s['state'],\r
+ 'zip' => $s['zip'],\r
+ 'country' => $s['country'],\r
+ 'email' => $s['email'],\r
+ 'phone' => $s['phone']\r
+ );\r
+\r
+ }\r
+\r
+ }\r
+\r
+ // Convert report array to individual lines\r
+ $out = array();\r
+ reset($a);\r
+ foreach ($a as &$m) {\r
+ $line = array(\r
+ 'memb_id' => $m['id'],\r
+ 'memb_name' => $m['name'],\r
+ 'memb_quant' => $m['quant'],\r
+ 'memb_sold' => $m['sold'],\r
+ 'memb_claimed' => $m['memb_claimed'],\r
+ 'memb_price' => $m['price'],\r
+ 'memb_money' => $this->money($m['price'])\r
+ );\r
+ foreach ($m['performance'] as &$p ) {\r
+ $line = array_merge($line, array(\r
+ 'perf_id' => $p['id'],\r
+ 'perf_name' => $p['name'],\r
+ 'perf_quant' => $p['quant'],\r
+ 'perf_sold' => $p['sold'],\r
+ 'perf_claimed' => $p['perf_claimed'],\r
+ 'perf_price' => $p['price'],\r
+ 'perf_money' => $this->money($p['price'])\r
+ ));\r
+ foreach ($p['section'] as &$s) {\r
+ $line = array_merge($line, array(\r
+ 'sect_id' => $s['id'],\r
+ 'sect_name' => $s['name'],\r
+ 'sect_quant' => $s['quant'],\r
+ 'sect_sold' => $s['sold'],\r
+ 'sect_claimed' => $s['sect_claimed'],\r
+ 'sect_price' => $s['price'],\r
+ 'sect_money' => $this->money($s['price'])\r
+ ));\r
+ foreach ($s['ticket'] as &$t) {\r
+ $line = array_merge($line, array(\r
+ 'tick_id' => $t['id'],\r
+ 'tick_name' => $t['name'],\r
+ 'tick_quant' => $t['quant'],\r
+ 'tick_sold' => $t['sold'],\r
+ 'tick_claimed' => $t['tick_claimed'],\r
+ 'tick_price' => $t['price'],\r
+ 'tick_money' => $this->money($t['price'])\r
+ ));\r
+\r
+ // Sort dates\r
+ usort($t['date'], function($a, $b) {\r
+ return strcmp(strtotime($a['date']), strtotime($b['date']));\r
+ });\r
+\r
+ foreach ($t['date'] as &$d) {\r
+ $line = array_merge($line, array(\r
+ 'date_date' => $d['date'],\r
+ 'date_quant' => $d['quant'],\r
+ 'date_sold' => $d['sold'],\r
+ 'date_claimed' => $d['date_claimed'],\r
+ 'date_price' => $d['price'],\r
+ 'date_money' => $this->money($d['price'])\r
+ ));\r
+\r
+ // Sort times\r
+ usort($d['time'], function($a, $b) {\r
+ return strcmp($a['time'], $b['time']);\r
+ });\r
+\r
+ foreach ($d['time'] as &$i) {\r
+ $line = array_merge($line, array(\r
+ 'time_time' => $i['time'],\r
+ 'time_quant' => $i['quant'],\r
+ 'time_sold' => $i['sold'],\r
+ 'time_claimed' => $i['time_claimed'],\r
+ 'time_price' => $i['price'],\r
+ 'time_money' => ($i['price']!=0 ? $this->money($i['price']) : ''),\r
+ 'time_promo' => $i['promo'],\r
+ 'time_promo_money' => ($i['promo']!=0 ? $this->money($i['promo']) : '')\r
+ ));\r
+\r
+ $out[] = $line;\r
+\r
+\r
+ // Initialize line data\r
+ $line = array(\r
+ 'memb_id' => '',\r
+ 'memb_name' => '',\r
+ 'memb_quant' => '',\r
+ 'memb_sold' => '',\r
+ 'memb_claimed' => '',\r
+ 'memb_price' => '',\r
+ 'memb_money' => '',\r
+ 'perf_id' => '',\r
+ 'perf_name' => '',\r
+ 'perf_quant' => '',\r
+ 'perf_sold' => '',\r
+ 'perf_claimed' => '',\r
+ 'perf_price' => '',\r
+ 'perf_money' => '',\r
+ 'sect_id' => '',\r
+ 'sect_name' => '',\r
+ 'sect_quant' => '',\r
+ 'sect_sold' => '',\r
+ 'sect_claimed' => '',\r
+ 'sect_price' => '',\r
+ 'sect_money' => '',\r
+ 'tick_id' => '',\r
+ 'tick_name' => '',\r
+ 'tick_quant' => '',\r
+ 'tick_sold' => '',\r
+ 'tick_claimed' => '',\r
+ 'tick_price' => '',\r
+ 'tick_money' => '',\r
+ 'addon_name' => '',\r
+ 'addon_quant' => '',\r
+ 'addon_sold' => '',\r
+ 'addon_claimed' => '',\r
+ 'addon_price' => '',\r
+ 'addon_money' => '',\r
+ 'date_id' => '',\r
+ 'date_name' => '',\r
+ 'date_quant' => '',\r
+ 'date_sold' => '',\r
+ 'date_claimed' => '',\r
+ 'date_price' => '',\r
+ 'date_money' => '',\r
+ 'order_id' => '',\r
+ 'order_fname' => '',\r
+ 'order_lname' => '',\r
+ 'order_addr1' => '',\r
+ 'order_addr2' => '',\r
+ 'order_city' => '',\r
+ 'order_state' => '',\r
+ 'order_zip' => '',\r
+ 'order_country' => '',\r
+ 'order_email' => '',\r
+ 'order_phone' => ''\r
+ );\r
+\r
+\r
+ // If Detail report then output individual ticket customer data\r
+ if ($reportType == 'detail') {\r
+\r
+ $orderID = '';\r
+ foreach ($i['detail'] as $detail) {\r
+\r
+ // Don't replicate order ID if it's the same for multiple lines\r
+/* for now replicate the order IDs\r
+ if ($orderID == $detail['order_id']) {\r
+ $detail['order_id'] = '';\r
+ } else {\r
+*/\r
+ $orderID = $detail['order_id'];\r
+// }\r
+\r
+ $out[] = array_merge($line, array(\r
+ 'order_id' => $detail['order_id'],\r
+ 'order_voucher_id' => $detail['voucher_id'],\r
+ 'order_claims' => $detail['voucher_claims'],\r
+ 'order_fname' => $detail['fname'],\r
+ 'order_lname' => $detail['lname'],\r
+ 'order_addr1' => $detail['addr1'],\r
+ 'order_addr2' => $detail['addr2'],\r
+ 'order_city' => $detail['city'],\r
+ 'order_state' => $detail['state'],\r
+ 'order_zip' => $detail['zip'],\r
+ 'order_country' => $detail['country'],\r
+ 'order_email' => $detail['email'],\r
+ 'order_phone' => $detail['phone']\r
+ ));\r
+\r
+ }\r
+\r
+ }\r
+\r
+ }\r
+ }\r
+\r
+ foreach ($t['add_on'] as $addOn) {\r
+ $line = array(\r
+ 'addon_id' => 0, // Not using yet\r
+ 'addon_name' => $addOn['name'],\r
+ 'addon_sold' => $addOn['quant'],\r
+ 'time_claimed' => '',\r
+ 'time_price' => $addOn['price'],\r
+ 'time_money' => $addOn['money']\r
+ );\r
+ $out[] = $line;\r
+ }\r
+\r
+\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ $this->page->salesList = $this->bindArrayToObject($out);\r
+ $this->page->totalQuant = $totalQuant;\r
+ $this->page->totalSold = $totalSold;\r
+ if ($totalQuant > 0) {\r
+ $this->page->percentSold = number_format(($totalSold/$totalQuant)*100,2);\r
+ } else {\r
+ $this->page->percentSold = '0';\r
+ }\r
+ $this->page->totalClaimed = $totalClaimed;\r
+ if ($totalSold > 0) {\r
+ $this->page->percentClaimed = number_format(($totalClaimed/$totalSold)*100,2);\r
+ } else {\r
+ $this->page->percentClaimed = '0';\r
+ }\r
+ $this->page->totalPromos = $totalPromos;\r
+ $this->page->totalPromosMoney = $this->money($totalPromos);\r
+ $this->page->totalPrice = $totalPrice;\r
+ $this->page->totalMoney = $this->money($totalPrice);\r
+ $this->page->reportNote = $reportNote;\r
+ $this->page->reportDate = date('m/d/Y');\r
+ $this->page->reportTime = date('h:m:s A');\r
+ $this->page->inclClaimDetail = $inclClaimDetail;\r
+\r
+ $this->templateFile = $templateFile;\r
+\r
+ // Check for output type\r
+ $this->page->printOutput = false;\r
+ switch ($_REQUEST['outputType']) {\r
+ case 'html':\r
+ break;\r
+ case 'print':\r
+ $this->page->printOutput = true;\r
+ break;\r
+ case 'csv':\r
+ $this->template->compile($this->interface.$templateFileCSV);\r
+ $csvOut = $this->template->bufferedOutputObject($this->page);\r
+ $len = strlen( $csvOut );\r
+ header( "Content-type: application/octet-stream" );\r
+ header( "Content-Length: $len" );\r
+ header( "Content-Disposition: attachment; filename=report.csv" );\r
+ echo $csvOut;\r
+ exit;\r
+ break;\r
+ }\r
+\r
+ $this->addDebug("Report/sales.inc", 'Sales Report', 'Array: $a<p>'.print_r($a,1));\r
+\r
+}\r
+\r
+\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Reservation_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/reservations.php';\r
+$Reservations = new EventManagementAdminReservations($this->dbh, $this->config);\r
+\r
+\r
+$resDetail = $Reservations->getReservationDetail();\r
+\r
+$this->page->resDetail = $this->bindArrayToObject($resDetail);\r
+$this->templateFile = 'Reservation/ReservationDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Reservation_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/reservations.php';\r
+$Reservations = new EventManagementAdminReservations($this->dbh, $this->config);\r
+\r
+// Nothing here yet\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Reservation_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/reservations.php';\r
+$Reservations = new EventManagementAdminReservations($this->dbh, $this->config);\r
+\r
+\r
+// Get reservations stats\r
+$resStats = $Reservations->getReservationsStats();\r
+$this->page->resStats = $this->bindArrayToObject($resStats);\r
+\r
+// Use a more limited list of fields for this, not enough memory for large list.\r
+$fields = array(\r
+ $Reservations->fields['id'],\r
+ $Reservations->fields['fname'],\r
+ $Reservations->fields['lname'],\r
+ $Reservations->fields['org'],\r
+ $Reservations->fields['conv'],\r
+ $Reservations->fields['event'],\r
+ $Reservations->fields['team'],\r
+ $Reservations->fields['state_rep'],\r
+ $Reservations->fields['state_rep_code'],\r
+ $Reservations->fields['member'],\r
+ $Reservations->fields['member_id'],\r
+ $Reservations->fields['city'],\r
+ $Reservations->fields['state'],\r
+ $Reservations->fields['country'],\r
+ $Reservations->fields['date_entered'],\r
+ $Reservations->fields['rooms'],\r
+ $Reservations->fields['grand_total'],\r
+ $Reservations->fields['confirmed'],\r
+ $Reservations->fields['declined']\r
+);\r
+$Reservations->fields = $fields;\r
+\r
+// Get reserations list\r
+$res = $Reservations->getReservationsList();\r
+$this->page->resList = $this->bindArrayToObject($res);\r
+\r
+$this->templateFile = 'Reservation/ReservationsList.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Reservation_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/reservations.php';\r
+$Reservations = new EventManagementAdminReservations($this->dbh, $this->config);\r
+\r
+// Nothing here yet\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Section_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: add.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sections.php';\r
+$Sections = new EventManagementAdminSections($this->dbh, $this->config);\r
+\r
+// Get base data and fields\r
+$r = $Sections->newSection();\r
+\r
+$this->page->sectionDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewSection = true;\r
+\r
+$this->templateFile = 'Section/edit.html';\r
+\r
+$this->addDebug("Section/add.inc", 'Section Add', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Section_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sections.php';\r
+$Sections = new EventManagementAdminSections($this->dbh, $this->config);\r
+\r
+$sectionDetail = $Sections->sectionDelete(true);\r
+$this->page->sectionDetail = $this->bindArrayToObject($sectionDetail);\r
+\r
+$this->templateFile = 'Section/detail.html';\r
+\r
+$this->addDebug("Section/confirmDelete.inc", 'Section Confirm Delete', print_r($sectionDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Section_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: section.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sections.php';\r
+$Sections = new EventManagementAdminSections($this->dbh, $this->config);\r
+\r
+\r
+$sectionDetail = $Sections->sectionDelete(false);\r
+$this->page->sectionDetail = $this->bindArrayToObject($sectionDetail);\r
+\r
+$this->templateFile = 'Section/delete.html';\r
+\r
+$this->addDebug("Section/delete.inc", 'Section Delete', print_r($sectionDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Section_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sections.php';\r
+$Sections = new EventManagementAdminSections($this->dbh, $this->config);\r
+\r
+$sectionDetail = $Sections->getSectionDetail();\r
+$this->page->sectionDetail = $this->bindArrayToObject($sectionDetail);\r
+\r
+$this->templateFile = 'Section/detail.html';\r
+\r
+$this->addDebug("Section/detail.inc", 'Section Detail', print_r($sectionDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Section_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sections.php';\r
+$Sections = new EventManagementAdminSections($this->dbh, $this->config);\r
+\r
+$sectionDetail = $Sections->editSection();\r
+$this->page->sectionDetail = $this->bindArrayToObject($sectionDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($sectionDetail);\r
+\r
+$this->page->editingSection = true;\r
+$this->templateFile = 'Section/edit.html';\r
+\r
+$this->addDebug("Section/edit.inc", 'Section Edit', print_r($sectionDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Section_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sections.php';\r
+$Sections = new EventManagementAdminSections($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Sections->insertSection();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->sectionDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewSection = true;\r
+ $this->templateFile = 'Section/edit.html';\r
+} else {\r
+ $this->templateFile = 'Section/detail.html';\r
+}\r
+\r
+$this->addDebug("Section/insert.inc", 'Section Insert', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Section_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sections.php';\r
+$Sections = new EventManagementAdminSections($this->dbh, $this->config);\r
+\r
+$sectionList = $Sections->getSectionsList();\r
+\r
+$this->page->sectionList = $this->bindArrayToObject($sectionList);\r
+\r
+$this->templateFile = 'Section/list.html';\r
+\r
+$this->addDebug("Section/list.inc", 'Section List', 'Array: $sectionList<p>'.print_r($sectionList,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Section_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sections.php';\r
+$Sections = new EventManagementAdminSections($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Sections->updateSection();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->sectionDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingSection = true;\r
+ $this->templateFile = 'Section/edit.html';\r
+} else {\r
+ // If valid\r
+ $this->templateFile = 'Section/detail.html';\r
+}\r
+\r
+$this->addDebug("Section/add.inc", 'Section Add', print_r($r,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Sold_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: detail.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Check if we got an orderID here\r
+$this->page->orderID = 0;\r
+if (isset($_REQUEST['orderID'])) {\r
+ $orderID = ($_REQUEST['orderID'] -0);\r
+ $this->page->orderID = $orderID;\r
+}\r
+\r
+$this->templateFile = 'Sold/claim.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_claimVoucher\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: claimVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Get ticket inventory ID and desired status\r
+$voucherID = ($_REQUEST['VoucherID'] - 0);\r
+\r
+// Do sanity check on ID\r
+if ($voucherID > 0) {\r
+\r
+ // Get current claims information, if there is one\r
+ $sql = "SELECT time_claimed FROM eventmgt.ticket_sold WHERE id = $voucherID;";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $voucher = $stmt->fetch(PDO::FETCH_ASSOC);\r
+\r
+ if (!$voucher) {\r
+\r
+ // Voucher Not Found\r
+\r
+ } else {\r
+\r
+ // Has not been claimed, so mark it and return time only\r
+ $sql = "UPDATE eventmgt.ticket_sold SET numb_claimed = numb_uses WHERE id = $voucherID OR package_sold_id = (SELECT package_sold_id FROM eventmgt.ticket_sold where id = $voucherID);";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+\r
+ }\r
+\r
+}\r
+\r
+include EVENT_MANAGEMENT_APP_BASE.'models/admin/actions/Sold/detail.inc';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Sold_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: detail.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->page->markedAsClaimed = false;\r
+$this->page->alreadyClaimedAlert = false;\r
+$packageClaimOK = true;\r
+$problem = array();\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sold.php';\r
+$Sold = new EventManagementAdminSold($this->dbh, $this->config);\r
+\r
+// If this is a member user then make sure they only list their own member performances\r
+$userType = false;\r
+$userID = false;\r
+$scanName = 'Admin';\r
+$userMemberID = false;\r
+if ($_SESSION[GLM_EVENT_SESSION]['MemberUser']) {\r
+ $userType = 'member';\r
+ $userID = $_SESSION[GLM_EVENT_SESSION]['MemberUser'];\r
+ $userMemberID = $_SESSION[GLM_EVENT_SESSION]['Member']; // This is the ID of the member!!!\r
+}\r
+\r
+// If we have a logged in user, then check if the user's member also scans for other members\r
+$scansFor = false;\r
+if ($userMemberID != false) {\r
+\r
+ // Get the user information\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataContacts.php';\r
+ $Contact = new EventManagementDataContacts($this->dbh, $this->config);\r
+ $userInfo = $Contact->getContactDetail($userID);\r
+\r
+ $scanName = '';\r
+ if ($userInfo['org'] != '') {\r
+ $scanName = $userInfo['org'].': ';\r
+ }\r
+ $scanName .= $userInfo['lname'].', '.$userInfo['fname'];\r
+\r
+ // Also get list of members this member scans for\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMemberScansFor.php';\r
+ $MemberScansFor = new EventManagementDataMemberScansFor($this->dbh, $this->config);\r
+ $msf = $MemberScansFor->getMemberScansForList($userMemberID);\r
+\r
+ // If member scans for others, build a simple array of those member IDs\r
+ if (is_array($msf) && count($msf) > 0) {\r
+ $scansFor = array();\r
+ foreach ($msf as $m) {\r
+ $scansFor[] = $m['scans_for'];\r
+ }\r
+ }\r
+}\r
+\r
+// Get sold ticket detail\r
+$soldDetail = $Sold->getSoldDetail();\r
+\r
+// If we don't have ticket detail\r
+if (!$soldDetail) {\r
+\r
+ $packageTickets = false;\r
+ $soldDetail = false;\r
+ $problem[] = 'Not found!';\r
+\r
+// We have ticket detail\r
+} else {\r
+\r
+ // Check if a package voucher has been scanned\r
+ $this->page->isPackage = false;\r
+ if ($soldDetail['is_package']['value']) {\r
+\r
+ $this->page->isPackage = true;\r
+\r
+ // Check if this is an admin (not logged in) user - Not permitted to scan packages\r
+ if (!$userID && $_REQUEST['doClaim'] == 'true') {\r
+\r
+ $packageTickets = false;\r
+ $soldDetail = false;\r
+ $problem[] = 'Admin users may not scan a package ticket voucher.<br>\r
+ Package ticket vouchers may only be scanned by a valid logged-in user (contact).<br>\r
+ Use "Order #:" entry to retrieve voucher status.';\r
+\r
+ // The user is a valid logged in user\r
+ } else {\r
+\r
+ if ($userID) {\r
+ // Build member WHERE clause\r
+ $memberWhere = " AND member = $userMemberID";\r
+ if ($scansFor != false) {\r
+\r
+ // User member scans for other members (locations), so add them into the WHERE clause.\r
+ $memberWhere = "AND (member = $userMemberID";\r
+\r
+ foreach($scansFor as $sf) {\r
+ $memberWhere .= " OR member = $sf";\r
+ }\r
+\r
+ $memberWhere .= ')';\r
+ }\r
+ }\r
+\r
+ // Get list of tickets in the package for this location - Hopefully only 1\r
+ $sql = "\r
+ SELECT *\r
+ FROM eventmgt.ticket_sold\r
+ WHERE package_sold_id = '".$soldDetail['package_sold_id']."'\r
+ AND id != ".$soldDetail['id']."\r
+ $memberWhere\r
+ ;";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $packageTickets = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+\r
+ // If we have package tickets for this location\r
+ if (is_array($packageTickets) && count($packageTickets) > 0) {\r
+\r
+ // If we're trying to claim this ticket use\r
+ if ($_REQUEST['doClaim'] == 'true') {\r
+\r
+ // Check if there's more than one ticket - should not be the case\r
+ if (count($packageTickets) > 1) {\r
+\r
+ $problem[] = 'More than one package item for this location was found for the scanned voucher.<br>\r
+ There may only be one item per location contained in a package. Please check the\r
+ package configuration.';\r
+\r
+ // Only one ticket for this location in the package - OK to claim\r
+ } else {\r
+\r
+ // For each ticket in the package at this location\r
+ foreach ($packageTickets as $pt) {\r
+\r
+ // Check if it's not unlimited and already been claimed the max times\r
+ if (!$pt['unlimited_use'] && ($pt['numb_uses'] - $pt['numb_claimed']) <= 0 ) {\r
+ $packageClaimOK = false;\r
+ $this->page->alreadyClaimedAlert = true;\r
+ }\r
+\r
+ }\r
+\r
+ // If we can claim these tickets\r
+ if ($packageClaimOK) {\r
+\r
+ reset($packageTickets);\r
+ while (list($key, $val) = each($packageTickets)) {\r
+\r
+ // Update ticket_sold to indicate one claim of voucher\r
+ $sql = "\r
+ UPDATE eventmgt.ticket_sold\r
+ SET numb_claimed = ( numb_claimed + 1 )\r
+ WHERE id = ".$val['id'].";\r
+ ";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+\r
+ // Also update our local copy\r
+ $packageTickets[$key]['numb_claimed'] += 1;\r
+\r
+ // Store claim tracking\r
+ $sql = "\r
+ INSERT INTO eventmgt.ticket_claim_tracking\r
+ ( ticket_order, ticket_sold, time_of_action, action_type, quant, scan_user, scan_name )\r
+ VALUES\r
+ (\r
+ ".$val['ticket_order'].",\r
+ ".$val['id'].",\r
+ 'now',\r
+ ".$this->config->claim_tracking_types_numb->claim.",\r
+ 1,\r
+ $userID,\r
+ '".addslashes($scanName)."'\r
+ );\r
+ ";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+\r
+ }\r
+\r
+ $this->page->markedAsClaimed = true;\r
+\r
+ } // OK to claim ticket\r
+\r
+ } // Only one ticket for this location in the package - OK to claim\r
+\r
+ } // Claiming package ticket at this time\r
+\r
+ } // Have package tickets for this location\r
+\r
+ } // Have a valid logged in user\r
+\r
+ // Otherwise not scanning a package\r
+ } else {\r
+\r
+ /*\r
+ * Check if user can scan this ticket, must be one of ...\r
+ * 1) No user logged in - admins can scan for any non-package\r
+ * 2) User logged in belongs to the ticket member\r
+ * 3) User logged in belongs to the member that scans for the ticket member\r
+ */\r
+ if ( $userMemberID == false ||\r
+ $soldDetail['member'] == $userMemberID ||\r
+ (is_array($scansFor) && (in_array($soldDetail['member'], $scansFor) || in_array($soldDetail['assigned_from'], $scansFor))) ) {\r
+\r
+ // If we're not trying to claim this ticket use\r
+ if ($_REQUEST['doClaim'] != 'true') {\r
+\r
+ // Do nothing here. We're just going to display the voucher data\r
+\r
+ // Check if the ticket is not unlimited and has already been claimed the max times\r
+ } elseif (!$soldDetail['unlimited_use']['value'] && ($soldDetail['numb_uses'] - $soldDetail['numb_claimed']) <= 0 ) {\r
+\r
+ // Ticket has already been claimed.\r
+ $this->page->alreadyClaimedAlert = true;\r
+\r
+ // Otherwise add a claim for this voucher\r
+ } else {\r
+\r
+ // Update ticket_sold to indicate one claim of voucher\r
+ $sql = "\r
+\r
+ UPDATE eventmgt.ticket_sold\r
+ SET numb_claimed = ( numb_claimed + 1 )\r
+ WHERE id = ".$soldDetail['id'].";\r
+ ";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+\r
+ // Store claim tracking\r
+ $sql = "\r
+ INSERT INTO eventmgt.ticket_claim_tracking\r
+ ( ticket_order, ticket_sold, time_of_action, action_type, quant, scan_user, scan_name )\r
+ VALUES\r
+ (\r
+ ".$soldDetail['ticket_order'].",\r
+ ".$soldDetail['id'].",\r
+ 'now',\r
+ ".$this->config->claim_tracking_types_numb->claim.",\r
+ 1,\r
+ ".($userID?$userID:'null').",\r
+ '".addslashes($scanName)."'\r
+ );\r
+ ";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+\r
+ // Reload voucher data\r
+ $soldDetail = $Sold->getSoldDetail(false, $id);\r
+\r
+ $this->page->markedAsClaimed = true;\r
+\r
+ }\r
+\r
+\r
+ // User is not permitted to scan the ticket\r
+ } else {\r
+ $packageTickets = false;\r
+ $soldDetail = false;\r
+ $problem[] = 'The scanned ticket may not be used at the current location.';\r
+ }\r
+\r
+\r
+ }\r
+\r
+} // have ticket detail\r
+\r
+// And one last thing. To add some data to package tickets\r
+if (is_array($packageTickets) && count($packageTickets) > 0) {\r
+\r
+ reset($packageTickets);\r
+\r
+ // For each ticket in the package at this location\r
+ while (list($key, $val) = each($packageTickets)) {\r
+\r
+ $packageTickets[$key]['fullyClaimedAlert'] = false;\r
+ $remaining = ($val['numb_uses'] - $val['numb_claimed']);\r
+ $packageTickets[$key]['remaining'] = $remaining;\r
+\r
+ if (!$val['unlimited_use'] && $remaining <= 0 ) {\r
+ $packageTickets[$key]['fullyClaimedAlert'] = true;\r
+ }\r
+\r
+ }\r
+\r
+ $this->page->packageDetail = $this->bindArrayToObject($packageTickets);\r
+\r
+}\r
+\r
+// Check for main sold detail number of claimes expired\r
+$remaining = ($soldDetail['numb_uses'] - $soldDetail['numb_claimed']);\r
+if (is_array($soldDetail) && $soldDetail['unlimited_use']['value'] == '' && $remaining <= 0 ) {\r
+ $soldDetail['fullyClaimedAlert'] = true;\r
+}\r
+\r
+$this->page->soldDetail = $this->bindArrayToObject($soldDetail);\r
+$this->templateFile = 'Sold/detail.html';\r
+\r
+if (count($problem) > 0) {\r
+ $this->page->problem = $this->bindArrayToObject($problem);\r
+ $this->page->haveProblem = true;\r
+} else {\r
+ $this->page->problem = false;\r
+ $this->page->haveProblem = false;\r
+}\r
+\r
+$this->addDebug("Sold/detail.inc", 'Array: $soldDetail', print_r($soldDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Fix Packages Ticket Sold data\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: fixPackages.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+\r
+/*\r
+ * This method is build to add the missing package detail for\r
+ * package tickets sold that did not have the ticket_sold records\r
+ * added for each of the package destinations. This is not\r
+ * for normal use.\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';\r
+$TicketPackages = new EventManagementDataTicketPackages($this->dbh, $this->config);\r
+\r
+// Get all sold packages that do not have ticket_sold entries for the individual destinations\r
+$sql = "\r
+ SELECT ticket_sold.*\r
+ FROM eventmgt.ticket_sold, eventmgt.ticket\r
+ WHERE ticket.id = ticket_sold.ticket\r
+ AND ticket.ticket_type = 20\r
+ AND package_sold_id IS null\r
+ ORDER BY ticket_sold.id\r
+ LIMIT 100\r
+;";\r
+$stmt = $this->dbh->prepare($sql);\r
+$stmt->execute();\r
+$soldList = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+\r
+echo "<p>Loaded ".count($soldList)." package sales that need to be fixed.</p>";\r
+\r
+// For each package ticket sold that needs to be fixed\r
+foreach ($soldList as $s) {\r
+\r
+ $pSale = $s['id'];\r
+ $p = $s['ticket'];\r
+\r
+ // get the package contents\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';\r
+ $TicketPackages = new EventManagementDataTicketPackages($this->dbh, $this->config);\r
+ $packageData = $TicketPackages->getPackageList("package = ".$s['ticket']);\r
+\r
+ echo "Processing package sale # $pSale - Session ID = ".$s['session_id']."<br>";\r
+\r
+ // for each item in the package\r
+ reset ($packageData);\r
+ foreach ($packageData as $t) {\r
+\r
+ // Get information on this package ticket\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTickets.php';\r
+ $Tickets = new EventManagementDataTickets($this->dbh, $this->config);\r
+ $pt = $Tickets->getTicketDetail($t['ticket']);\r
+\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataSections.php';\r
+ $Sections = new EventManagementDataSections($this->dbh, $this->config);\r
+ $ps = $Sections->getSectionDetail($pt['section_id']);\r
+\r
+ // Get Entrance information for this ticket's section\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataEntrances.php';\r
+ $Entrances = new EventManagementDataEntrances($this->dbh, $this->config);\r
+ $pe = $Entrances->getEntranceDetail($ps['entrance']);\r
+\r
+ $sql = "\r
+ INSERT INTO eventmgt.ticket_sold\r
+ (\r
+ ticket_order,\r
+ member,\r
+ member_name,\r
+ assigned,\r
+ assigned_from,\r
+ assigned_from_name,\r
+ performance,\r
+ performance_name,\r
+ entrance,\r
+ entrance_name,\r
+ entrance_color,\r
+ section,\r
+ section_name,\r
+ ticket,\r
+ ticket_name,\r
+ is_package,\r
+ package_sold_id,\r
+ ticket_package,\r
+ package_name,\r
+ date_specific,\r
+ ticket_date,\r
+ time_specific,\r
+ ticket_time,\r
+ start_date,\r
+ end_date,\r
+ likely_date,\r
+ price_paid,\r
+ voucher_type,\r
+ voucher_text,\r
+ policies,\r
+ unlimited_use,\r
+ numb_uses,\r
+ numb_claimed,\r
+ time_claimed,\r
+ session_id\r
+ )\r
+ VALUES\r
+ (\r
+ ".$s['ticket_order'].",\r
+ ".$pt['member'].",\r
+ '".$pt['member_name']."',\r
+ false,\r
+ NULL,\r
+ '',\r
+ ".$pt['performance_id'].",\r
+ '".$pt['performance']."',\r
+ ".(!empty($pt['section_id']) ? $pt['section_id'] : 'NULL').",\r
+ '".$pe['name']."',\r
+ '".$pe['color']['name']."',\r
+ ".$ps['id'].",\r
+ '".$ps['name']."',\r
+ ".$pt['id'].",\r
+ '".$pt['title']."',\r
+ false,\r
+ '".$s['session_id']."-$pSale',\r
+ ".$s['ticket'].",\r
+ '".$packageData['title']."',\r
+ false,\r
+ NULL,\r
+ false,\r
+ '".$pt['ticket_timestamp']."',\r
+ ".(!empty($pt['start_date']['date']) ? "'".$pt['start_date']['date']."'" : 'NULL').",\r
+ ".(!empty($pt['end_date']['date']) ? "'".$pt['end_date']['date']."'" : 'NULL').",\r
+ NULL,\r
+ 0,\r
+ ".$pt['voucher_type']['value'].",\r
+ '".$pt['voucher_text']."',\r
+ '',\r
+ ".($pt['unlimited_use']['value'] ? 'true' : 'false').",\r
+ ".$pt['uses'].",\r
+ 0,\r
+ null,\r
+ '".$s['session_id']."'\r
+ );\r
+ ";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+\r
+ }\r
+\r
+ // Now update the package ticket entry\r
+ $sql = "\r
+ UPDATE eventmgt.ticket_sold\r
+ SET package_sold_id = '".$s['session_id']."-$pSale',\r
+ is_package = true\r
+ WHERE id = $pSale\r
+ ;";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+\r
+}\r
+exit;\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Sold_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: list.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sold.php';\r
+$Sold = new EventManagementAdminSold($this->dbh, $this->config);\r
+\r
+// If this is a member user then make sure they only list their own member performances\r
+$type = false;\r
+$id = false;\r
+if ($_SESSION[GLM_EVENT_SESSION]['MemberUser'] && !$this->config->option->users_access_all_members) {\r
+ $type = 'member';\r
+ $id = $this->page->userMemberID;\r
+}\r
+\r
+$soldList = $Sold->getSoldList(false, $id);\r
+\r
+$this->page->soldList = $this->bindArrayToObject($soldList);\r
+\r
+$this->templateFile = 'Sold/list.html';\r
+\r
+$this->addDebug("Sold/list.inc", 'Sold List', 'Array: $soldList<p>'.print_r($soldList,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_resetVoucher - Mark as unclaimed\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: resetVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Get ticket inventory ID and desired status\r
+$voucherID = ($_REQUEST['VoucherID'] - 0);\r
+\r
+// Do sanity check on ID\r
+if ($voucherID > 0) {\r
+\r
+ // Get current claim time, if there is one\r
+ $sql = "SELECT time_claimed FROM eventmgt.ticket_sold WHERE id = $voucherID;";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $voucher = $stmt->fetch(PDO::FETCH_ASSOC);\r
+\r
+ if (!$voucher) {\r
+\r
+ // Voucher Not Found\r
+\r
+ } else {\r
+\r
+ // Has not been claimed, so clear it\r
+ $sql = "UPDATE eventmgt.ticket_sold SET numb_claimed = 0 WHERE id = $voucherID OR package_sold_id = (SELECT package_sold_id FROM eventmgt.ticket_sold where id = $voucherID);";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+\r
+ }\r
+\r
+}\r
+\r
+include EVENT_MANAGEMENT_APP_BASE.'models/admin/actions/Sold/detail.inc';\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Sold_selected\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: selected.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sold.php';\r
+$Sold = new EventManagementAdminSold($this->dbh, $this->config);\r
+\r
+$soldDetail = $Sold->getSoldDetail();\r
+$this->page->soldDetail = $this->bindArrayToObject($soldDetail);\r
+\r
+$this->templateFile = 'Sold/selected.html';\r
+\r
+$this->addDebug("Sold/selected.inc", 'Sold Ticket Detail', print_r($soldDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: State_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/states.php';\r
+$States = new EventManagementAdminStates($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+// Generate a random access code for the new team\r
+require '../classes/EasyPassword.php';\r
+$ep = new EasyPassword();\r
+$passwd = $ep->generateEasyPassword();\r
+\r
+$r = $States->newState();\r
+$r['fieldData']['password'] = $code;\r
+\r
+$this->page->stateDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewState = true;\r
+\r
+$this->templateFile = 'State/EditState.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: State_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/states.php';\r
+$States = new EventManagementAdminStates($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+$stateDetail = $States->getStateDetail();\r
+$this->page->stateDetail = $this->bindArrayToObject($stateDetail);\r
+\r
+// Get contacts for this event\r
+$eventContacts = $Contacts->getContacts('state');\r
+$this->page->contactsList = $this->bindArrayToObject($eventContacts['contact_list']);\r
+\r
+// Get room blocks and teams for this state rep\r
+require '../classes/blocks.php';\r
+$Blocks = new EventManagementAdminBlocks($this->dbh, $this->config);\r
+$roomBlocks = $Blocks->getRoomBlocks(false, true, true, $stateDetail['id']);\r
+$this->page->roomBlocks = $this->bindArrayToObject($roomBlocks);\r
+\r
+$this->templateFile = 'State/StateDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: State_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/states.php';\r
+$States = new EventManagementAdminStates($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+// Check State Code\r
+$stateDetail = $States->editState();\r
+\r
+// If no password has been set, then suggest one\r
+if (trim($stateDetail['password']) == '') {\r
+\r
+ // Generate a random access code for the new team\r
+ require '../classes/EasyPassword.php';\r
+ $ep = new EasyPassword();\r
+ $passwd = $ep->generateEasyPassword();\r
+ $stateDetail['password'] = $passwd;\r
+\r
+}\r
+\r
+$this->page->stateDetail = $this->bindArrayToObject($stateDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($stateDetail);\r
+\r
+$this->page->editingState = true;\r
+\r
+$this->templateFile = 'State/EditState.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: State_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/states.php';\r
+$States = new EventManagementAdminStates($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $States->insertState();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->stateDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewState = true;\r
+ $this->templateFile = 'State/EditState.html';\r
+} else {\r
+ $this->templateFile = 'State/StateDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: State_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/states.php';\r
+$States = new EventManagementAdminStates($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+// Get state reps stats\r
+$statesStats = $States->getStatesStats();\r
+$this->page->statesStats = $this->bindArrayToObject($statesStats);\r
+\r
+// Get state reps list\r
+$states = $States->getStatesList();\r
+$this->page->statesList = $this->bindArrayToObject($states);\r
+\r
+$this->templateFile = 'State/StatesList.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: State_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/states.php';\r
+$States = new EventManagementAdminStates($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $States->updateState();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->stateDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$stateDetail = $States->getStateDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($stateDetail);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingState = true;\r
+ $this->templateFile = 'State/EditState.html';\r
+} else {\r
+ $this->templateFile = 'State/StateDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Team_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/teams.php';\r
+$Teams = new EventManagementAdminTeams($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+// Generate a random access code for the new team\r
+require GLM_APP_BASE.'Common/'.$this->config->applicationVersion.'/classes/EasyPassword.php';\r
+$ep = new EasyPassword();\r
+$code = $ep->generateEasyPassword();\r
+\r
+$r = $Teams->newTeam();\r
+$r['fieldData']['team_code'] = $code;\r
+\r
+$this->page->teamDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->addingNewTeam = true;\r
+\r
+$this->templateFile = 'Team/EditTeam.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Team_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/teams.php';\r
+$Teams = new EventManagementAdminTeams($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+$r = $Teams->getTeamDetail();\r
+$this->page->teamDetail = $this->bindArrayToObject($r['teamDetail']);\r
+$this->page->teamRoster = $this->bindArrayToObject($r['teamRoster']);\r
+\r
+// Get contacts for this event\r
+$eventContacts = $Contacts->getContacts('team');\r
+$this->page->contactsList = $this->bindArrayToObject($eventContacts['contact_list']);\r
+\r
+$this->templateFile = 'Team/TeamDetail.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Team_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/teams.php';\r
+$Teams = new EventManagementAdminTeams($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+$teamDetail = $Teams->editTeam();\r
+$this->page->teamDetail = $this->bindArrayToObject($teamDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($teamDetail);\r
+\r
+$this->page->editingTeam = true;\r
+\r
+$this->templateFile = 'Team/EditTeam.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Team_editRoster\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/teams.php';\r
+$Teams = new EventManagementAdminTeams($this->dbh, $this->config);\r
+\r
+\r
+$r = $Teams->editTeamRoster();\r
+\r
+$this->page->teamDetail = $this->bindArrayToObject($r['teamDetail']);\r
+$this->page->teamRoster = $this->bindArrayToObject($r['teamRoster']);\r
+\r
+$this->templateFile = 'Team/EditTeamRoster.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Team_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/teams.php';\r
+$Teams = new EventManagementAdminTeams($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Teams->insertTeam();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->teamDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewTeam = true;\r
+ $this->templateFile = 'Team/EditTeam.html';\r
+} else {\r
+ $this->templateFile = 'Team/TeamDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Team_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/teams.php';\r
+$Teams = new EventManagementAdminTeams($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+// Check for teams that don't have access codes and assign one to them\r
+require GLM_APP_BASE.'CommonApps/'.$this->config->applicationVersion.'/classes/EasyPassword.php';\r
+$ep = new EasyPassword();\r
+\r
+$sql = "\r
+ SELECT id\r
+ FROM eventmgt.team\r
+ WHERE team_code IS NULL\r
+ OR team_code = '';\r
+ ";\r
+$stmt = $this->dbh->prepare($sql);\r
+$stmt->execute();\r
+$teams = $stmt->fetchAll(PDO::FETCH_ASSOC);\r
+$sql = '';\r
+if (count($teams) > 0) {\r
+ foreach ($teams as $t) {\r
+ $code = $ep->generateEasyPassword();\r
+ $sql = "UPDATE team SET team_code = '$code' WHERE id = ".$t['id'].";\n";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ }\r
+}\r
+\r
+// Get teams stats\r
+$teamsStats = $Teams->getTeamsStats();\r
+$this->page->teamsStats = $this->bindArrayToObject($teamsStats);\r
+\r
+// Get teams list\r
+$teams = $Teams->getTeamsList();\r
+$this->page->teamsList = $this->bindArrayToObject($teams);\r
+\r
+$this->templateFile = 'Team/TeamsList.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Team_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/teams.php';\r
+$Teams = new EventManagementAdminTeams($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/contacts.php';\r
+$Contacts = new EventManagementAdminContacts($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Teams->updateTeam();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->teamDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$r = $Teams->getTeamDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($r['teamDetail']);\r
+$this->page->teamRoster = $this->bindArrayToObject($r['teamRoster']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingTeam = true;\r
+ $this->templateFile = 'Team/EditTeam.html';\r
+} else {\r
+ $this->templateFile = 'Team/TeamDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Team_updateRoster\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/teams.php';\r
+$Teams = new EventManagementAdminTeams($this->dbh, $this->config);\r
+\r
+\r
+$r = $Teams->updateTeamRoster();\r
+\r
+$this->page->teamDetail = $this->bindArrayToObject($r['teamDetail']);\r
+$this->page->teamRoster = $this->bindArrayToObject($r['teamRoster']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$r['status']) {\r
+ $this->templateFile = 'Team/EditTeamRoster.html';\r
+} else {\r
+ $this->templateFile = 'Team/TeamDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: add.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Check if we need to ask for a member/venue first\r
+//if (!$_SESSION[GLM_EVENT_SESSION]['Member']) {\r
+$memberID = ($_REQUEST['memberID'] - 0);\r
+if ($memberID == 0) {\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+ $Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+ $members = $Members->getMembersList('all');\r
+\r
+ // Check if there's only one member and if so don't bother asking\r
+ if (count($members) == 1) {\r
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = $members[0]['id'];\r
+ } else {\r
+\r
+ $this->page->membersList = $this->bindArrayToObject($members);\r
+ $this->templateFile = 'Ticket/addGetMember.html';\r
+ return;\r
+ }\r
+\r
+} else {\r
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = $memberID;\r
+\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+ $Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+ $member = $Members->getEntry($memberID);\r
+\r
+}\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+$r = $Tickets->newTicket();\r
+\r
+$this->page->memberDetail = $this->bindArrayToObject($member);\r
+$this->page->ticketDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+$this->page->addingNewTicket = true;\r
+\r
+$this->templateFile = 'Ticket/edit.html';\r
+\r
+$this->addDebug("Ticket/add.inc", 'Array: $r', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: confirmDelete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+$ticketDetail = $Tickets->ticketDelete(true);\r
+$this->page->ticketDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+$this->templateFile = 'Ticket/detail.html';\r
+\r
+$this->addDebug("Ticket/confirmDelete.inc", 'Section Confirm Delete', print_r($ticketDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: delete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+\r
+$ticketDetail = $Tickets->ticketDelete(false);\r
+$this->page->ticketDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+$this->templateFile = 'Ticket/delete.html';\r
+\r
+$this->addDebug("Ticket/delete.inc", 'Array: $ticketDetail', print_r($ticketDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: detail.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+// Get Ticket detail\r
+$ticketDetail = $Tickets->getTicketDetail();\r
+$this->page->ticketDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+// If it's a package, get the package contents\r
+$this->page->isPackage = false;\r
+if ($this->config->option->packages && $ticketDetail['ticket_type']['value'] == 20) {\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';\r
+ $TicketPackages = new EventManagementDataTicketPackages($this->dbh, $this->config);\r
+ $packageData = $TicketPackages->getPackageList("package = ".$ticketDetail['id']);\r
+ $this->page->isPackage = true;\r
+}\r
+$this->page->ticketPackage = $this->bindArrayToObject($packageData);\r
+\r
+$_SESSION[GLM_EVENT_SESSION]['Member'] = $ticketDetail['member'];\r
+\r
+// Also get Ticket inventory Stats - and check if none exist for this ticket\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/ticketInventory.php';\r
+$ticketInventory = new EventManagementAdminTicketInventory($this->dbh, $this->config);\r
+$ticketInventoryStats = $ticketInventory->getTicketTicketInventoryStats();\r
+$this->page->noTicketInventory = true;\r
+if ($ticketInventoryStats > 0) {\r
+ $this->page->noTicketInventory = false;\r
+}\r
+\r
+$this->templateFile = 'Ticket/detail.html';\r
+\r
+$this->addDebug("Ticket/detail.inc", 'Array: $ticketDetail', print_r($ticketDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: edit.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+$ticketDetail = $Tickets->editTicket();\r
+$this->page->ticketDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+// We need a full list of other tickets to use for selecting tickets in a package\r
+$ticketsList = $Tickets->getTicketsList($ticketDetail['member'], false, false, 'packageSelect', false, false, false, $ticketDetail['id']);\r
+$this->page->ticketsList = $this->bindArrayToObject($ticketsList);\r
+\r
+// var_dump($ticketsList);\r
+\r
+// Also get a list of any tickets that are included in the package\r
+$this->page->isPackage = false;\r
+if ($ticketDetail['ticket_type']['value'] == 20) {\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';\r
+ $TicketPackages = new EventManagementDataTicketPackages($this->dbh, $this->config);\r
+ $packageData = $TicketPackages->getPackageList("T.package = ".$ticketDetail['id']);\r
+ $this->page->ticketPackage = $this->bindArrayToObject($packageData);\r
+ $this->page->isPackage = true;\r
+}\r
+\r
+$this->page->editingTicket = true;\r
+\r
+$this->templateFile = 'Ticket/edit.html';\r
+\r
+$this->addDebug("Ticket/edit.inc", 'Array: $ticketDetail', print_r($ticketDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: insert.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Tickets->insertTicket();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->ticketDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewTicket = true;\r
+ $this->templateFile = 'Ticket/edit.html';\r
+} else {\r
+\r
+ $ticketID = $r['fieldData']['id'];\r
+ // Also get Ticket inventory Stats - and check if none exist for this ticket\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/ticketInventory.php';\r
+ $TicketInventory = new EventManagementAdminTicketInventory($this->dbh, $this->config);\r
+ $ticketInventoryStats = $TicketInventory->getTicketTicketInventoryStats($ticketID);\r
+\r
+ $this->page->noTicketInventory = true;\r
+ if ($ticketInventoryStats > 0) {\r
+ $this->page->noTicketInventory = false;\r
+ } else {\r
+\r
+ // Try to create default ticket inventory\r
+ $TicketInventory->generateDefaultTicketInventory();\r
+\r
+ // Get inventory stats again\r
+ $ticketInventoryStats = $TicketInventory->getTicketTicketInventoryStats($ticketDetail['id']);\r
+\r
+ if ($ticketInventoryStats > 0) {\r
+ $this->page->noTicketInventory = false;\r
+ }\r
+ }\r
+\r
+ $this->templateFile = 'Ticket/selected.html';\r
+}\r
+\r
+$this->addDebug("Ticket/insert.inc", 'Array: $r', print_r($r,1));\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_inventory\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: inventory.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/ticketInventory.php';\r
+$TicketInventory = new EventManagementAdminTicketInventory($this->dbh, $this->config);\r
+\r
+// Check if a CreateInventory request has been received\r
+if (!$_REQUEST['CreateInventory'] == 'true') {\r
+\r
+ $res = $TicketInventory->generateDefaultTicketInventory();\r
+\r
+ // If there's a failure, then report that\r
+ if (!$res) {\r
+ $this->page->ticketCreateInventoryFail = true;\r
+ }\r
+\r
+}\r
+\r
+// Get Ticket detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+$ticketDetail = $Tickets->getTicketDetail();\r
+$this->page->ticketDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+$this->addDebug("Ticket/inventory.inc", 'Array: $ticketDetail', print_r($ticketDetail,1));\r
+\r
+// If ticket is date specific\r
+if ($ticketDetail['date_specific']['value']) {\r
+\r
+ // Get Ticket Inventory as calendar data\r
+ $ticketCalendar = $TicketInventory->getTicketInventoryCalendarData();\r
+ $this->page->ticketCalendar = $this->bindArrayToObject($ticketCalendar);\r
+ $this->addDebug("Ticket/inventory.inc", 'Array: $ticketCalendar', print_r($ticketCalendar,1));\r
+\r
+ $this->templateFile = 'Ticket/inventory.html';\r
+\r
+} else {\r
+\r
+ // Ticket is not date specific, so not using a calendar\r
+ $inventoryData = $TicketInventory->getTicketInventoryList(false, "ticket_date is null");\r
+ $this->page->inventoryData = $this->bindArrayToObject($inventoryData);\r
+ $this->addDebug("Ticket/inventory.inc", 'Array: $inventoryData', print_r($inventoryData,1));\r
+ $this->templateFile = 'Ticket/inventoryNoCalendar.html';\r
+\r
+}\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_inventoryUpdate\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: inventoryUpdate.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/ticketInventory.php';\r
+$TicketInventory = new EventManagementAdminTicketInventory($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $TicketInventory->updateTicketInventory();\r
+\r
+// If inventory is not date specific, simply redisplay form\r
+if (isset($_REQUEST['dateSpecific'])) {\r
+\r
+ // Redisplay form\r
+ $this->page->inventoryUpdated = true;\r
+ include(EVENT_MANAGEMENT_APP_BASE.'models/admin/actions/Ticket/inventory.inc');\r
+\r
+} else {\r
+\r
+ $this->templateFile = false; // No response expected\r
+\r
+ $this->addDebug("Ticket/inventoryUpdate.inc", 'Array: $r', print_r($r,1));\r
+\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: list.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+// Get Tickets stats\r
+$ticketsStats = $Tickets->getTicketsStats();\r
+$this->page->ticketsStats = $this->bindArrayToObject($ticketsStats);\r
+\r
+// If this is a member user then make sure they only list their own member tickets\r
+$type = false;\r
+$id = false;\r
+if ($_SESSION[GLM_EVENT_SESSION]['MemberUser']) {\r
+ $type = 'member';\r
+ $id = $this->page->userMemberID;\r
+ // Also specify current memberID for other uses\r
+ $this->page->memberID = $id;\r
+\r
+// Otherwise if we already have a member selected they pass that for other uses\r
+} elseif ($_SESSION[GLM_EVENT_SESSION]['Member'] != false) {\r
+ $this->page->memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];\r
+} else {\r
+ $this->page->memberID = false;\r
+}\r
+\r
+// Get tickets list\r
+$tickets = $Tickets->getTicketsList($id, false, false, $type, false, false, true);\r
+$this->page->tickets = $this->bindArrayToObject($tickets);\r
+\r
+$this->templateFile = 'Ticket/list.html';\r
+\r
+$this->addDebug("Ticket/list.inc", 'Array: $tickets', print_r($tickets,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_printSampleVoucher\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printSampleVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Get supplied ticket ID to use for test\r
+$testTicket = $_REQUEST['testTicket'] - 0;\r
+\r
+// Check for Coupon Test only\r
+$couponTest = false;\r
+if (isset($_REQUEST['testCoupons']) && $_REQUEST['testCoupons'] == 'true') {\r
+ $couponTest = true;\r
+}\r
+\r
+// Get Ticket Detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTickets.php';\r
+$Tickets = new EventManagementDataTickets($this->dbh, $this->config);\r
+$Tickets->optionIncludeSelectListData = false;\r
+$ticketDetail = $Tickets->getTicketDetail($testTicket);\r
+\r
+// Get Section Detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataSections.php';\r
+$Sections = new EventManagementDataSections($this->dbh, $this->config);\r
+$Sections->optionIncludeSelectListData = false;\r
+$sectionDetail = $Sections->getSectionDetail($ticketDetail['section_id']);\r
+\r
+// Get Member Detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMembers.php';\r
+$Members = new EventManagementDataMembers($this->dbh, $this->config);\r
+$Members->optionIncludeSelectListData = false;\r
+$memberDetail = $Members->getMemberDetail($ticketDetail['member']);\r
+\r
+// Get Performance Detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPerformances.php';\r
+$Performances = new EventManagementDataPerformances($this->dbh, $this->config);\r
+$Performances->optionIncludeSelectListData = false;\r
+$performanceDetail = $Performances->getPerformanceDetail($ticketDetail['performance_id']);\r
+\r
+// Sample Order Detail\r
+$orderDetail = array(\r
+ 'id' => 12345678,\r
+ 'user_trace_info' => $_SERVER["REMOTE_ADDR"]." - ".date("m/d/Y H:i:s"),\r
+ 'fname' => 'John',\r
+ 'lname' => 'Smith',\r
+ 'addr1' => '120 E. Lake St.',\r
+ 'addr2' => 'Apt 123',\r
+ 'city' => 'Petoskey',\r
+ 'state' => 'MI',\r
+ 'country' => 'US',\r
+ 'zip' => '49770',\r
+ 'phone' => '231-487-0692',\r
+ 'email' => 'info@gaslightmedia.com',\r
+ 'email_ok' => true,\r
+ 'purchase_date' => date('m/d/Y'),\r
+ 'member' => $memberDetail['id'],\r
+ 'member_name' => $memberDetail['name'],\r
+ 'cctype' => 'VISA',\r
+ 'ccnumber' => '0011001100110011',\r
+ 'expire' => '01/19',\r
+ 'ccname' => 'JOHN SMITH',\r
+ 'ccconf' => '12312',\r
+ 'charge_numb' => 123.45,\r
+ 'charge_total' => '$123.45',\r
+ 'special_needs' => 'No special needs',\r
+ 'notes' => ''\r
+);\r
+\r
+// Sample Tickets Sold List\r
+$soldList = array(\r
+ 0 => array(\r
+ 'id' => 12345678,\r
+ 'ticket_order' => 11223344,\r
+ 'member' => $memberDetail['id'],\r
+ 'member_name' => $memberDetail['name'],\r
+ 'performance' => $performanceDetail['id'],\r
+ 'performance_name' => $performanceDetail['name'],\r
+ 'entrance' => 123,\r
+ 'entrance_name' => 'Test Entrance',\r
+ 'entrance_color' => '#FFB6C1',\r
+ 'section' => $sectionDetail['name'],\r
+ 'ticket' => $testTicket,\r
+ 'ticket_name' => $ticketDetail['title'],\r
+ 'date_specific' => $ticketDetail['date_specific'],\r
+ 'ticket_date' => array(\r
+ 'date' => ($ticketDetail['date_specific'] ? date('m/d/Y') : 'Use any date')\r
+ ),\r
+ 'ticket_time' => array(\r
+ 'time' => ($ticketDetail['time_specific'] ? '12:00 PM' : 'Use any time')\r
+ ),\r
+ 'start_date' => array('date' => $ticketDetail['start_date']),\r
+ 'end_date' => array('date' => $ticketDetail['end_date']['date']),\r
+ 'likely_date' => array('date' => '06/13/14'),\r
+ 'price_paid' => $this->money($ticketDetail['price']),\r
+ 'time_claimed' => false\r
+ ),\r
+ 1 => array(\r
+ 'id' => 12345679,\r
+ 'ticket_order' => 11223345,\r
+ 'member' => $memberDetail['id'],\r
+ 'member_name' => $memberDetail['name'],\r
+ 'performance' => $performanceDetail['id'],\r
+ 'performance_name' => $performanceDetail['name'],\r
+ 'entrance' => 123,\r
+ 'entrance_name' => 'Test Entrance',\r
+ 'entrance_color' => '#FFB6C1',\r
+ 'section' => $sectionDetail['name'],\r
+ 'ticket' => $testTicket,\r
+ 'ticket_name' => $ticketDetail['title'],\r
+ 'date_specific' => $ticketDetail['date_specific'],\r
+ 'ticket_date' => array(\r
+ 'date' => ($ticketDetail['date_specific'] ? date('m/d/Y') : 'Use any date')\r
+ ),\r
+ 'ticket_time' => array(\r
+ 'time' => ($ticketDetail['time_specific'] ? '12:00 PM' : 'Use any time')\r
+ ),\r
+ 'start_date' => array('date' => $ticketDetail['start_date']),\r
+ 'end_date' => array('date' => $ticketDetail['end_date']['date']),\r
+ 'likely_date' => array('date' => '06/13/14'),\r
+ 'price_paid' => $this->money($ticketDetail['price']),\r
+ 'time_claimed' => date('m/d/Y h:i:s A')\r
+ ),\r
+);\r
+\r
+// Load voucher design code as per the "voucher_design" config parameter in the site's config/applications/EventManagement.ini file\r
+if (is_file(EVENT_MANAGEMENT_APP_BASE.'models/vouchers/'.$this->config->voucher_design.'/voucher.php')) {\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/vouchers/'.$this->config->voucher_design.'/voucher.php';\r
+ $pdf = new PdfVoucher($orderDetail, $soldList, $memberDetail, $this->dbh, $this->config, $couponTest);\r
+} else {\r
+ echo "SYSTEM ERROR: Site is not configured with a valid voucher design file.";\r
+ exit;\r
+}\r
+\r
+// There's nothing to do from here. Output should go direct to browser.\r
+exit;\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_selected\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: selected.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+$ticketDetail = $Tickets->getTicketDetail();\r
+$this->page->ticketPackage = ($ticketDetail['ticket_type']['value']==20);\r
+$this->page->ticketDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+$_SESSION[GLM_EVENT_SESSION]['Performance'] = $ticketDetail['performance_id'];\r
+\r
+// Also get Ticket inventory Stats - and check if none exist for this ticket\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/ticketInventory.php';\r
+$TicketInventory = new EventManagementAdminTicketInventory($this->dbh, $this->config);\r
+$ticketInventoryStats = $TicketInventory->getTicketTicketInventoryStats($ticketDetail['id']);\r
+\r
+// Check if we have inventory or need to create it\r
+$this->page->noTicketInventory = true;\r
+if ($ticketInventoryStats > 0) {\r
+ $this->page->noTicketInventory = false;\r
+} else {\r
+\r
+ // Try to create default ticket inventory\r
+ $TicketInventory->generateDefaultTicketInventory();\r
+\r
+ // Get inventory stats again\r
+ $ticketInventoryStats = $TicketInventory->getTicketTicketInventoryStats($ticketDetail['id']);\r
+\r
+ if ($ticketInventoryStats > 0) {\r
+ $this->page->noTicketInventory = false;\r
+ }\r
+}\r
+\r
+$this->templateFile = 'Ticket/selected.html';\r
+\r
+$this->addDebug("Ticket/selected.inc", 'Ticket Detail', print_r($ticketDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_setActive\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: setActive.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Get ticket inventory ID and desired status\r
+$ticketInventoryID = ($_REQUEST['TicketInventoryID'] - 0); \r
+$ticketInventoryStatus = ($_REQUEST['TicketInventoryStatus'] - 0); // 0 if false, 1 if true\r
+if ($ticketInventoryID > 0 && $ticketInventoryStatus > -1 && $ticketInventoryStatus < 2) {\r
+ $active = ($ticketInventoryStatus == 1 ? 'true' : 'false');\r
+ $sql = "UPDATE eventmgt.ticket_inventory SET active = $active WHERE id = $ticketInventoryID;";\r
+ $this->dbh->exec($sql);\r
+}\r
+\r
+$this->templateFile = false; // No response expected\r
+\r
+$this->addDebug("Ticket/setActive.inc", "ID: $ticketInventoryID, Set active to: $active<br>");\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: update.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $Tickets->updateTicket();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->ticketDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// Get currently stored data for fields that are display only\r
+$ticketDetail = $Tickets->getTicketDetail();\r
+$this->page->storedDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+// Check for changes in selected package tickets\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';\r
+$TicketPackages = new EventManagementDataTicketPackages($this->dbh, $this->config);\r
+$this->page->isPackage = false;\r
+if ($ticketDetail['ticket_type']['value'] == 20) {\r
+ $packageData = $TicketPackages->updatePackageTicketsList($ticketDetail['id']);\r
+ $this->page->isPackage = true;\r
+ $this->page->ticketPackage = $this->bindArrayToObject($packageData);\r
+// Otherwise make sure there's no package tickets\r
+} else {\r
+ $TicketPackages->clearPackageTicketsList($ticketDetail['id']);\r
+}\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingTicket = true;\r
+ $this->templateFile = 'Ticket/edit.html';\r
+} else {\r
+ $this->templateFile = 'Ticket/detail.html';\r
+}\r
+\r
+$this->addDebug("Ticket/update.inc", 'Array: $r', print_r($r,1));\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: User_login\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: login.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->templateFile = 'User/loginForm.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: VoucherCoupon_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: add.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/voucherCoupons.php';\r
+$VoucherCoupons = new EventManagementAdminVoucherCoupons($this->dbh, $this->config);\r
+\r
+$r = $VoucherCoupons->newVoucherCoupon();\r
+\r
+$this->page->voucherCouponDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+$this->page->addingNewVoucherCoupon = true;\r
+\r
+$this->templateFile = 'VoucherCoupon/edit.html';\r
+\r
+$this->addDebug("VoucherCoupon/add.inc", 'Array: $r', print_r($r,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: VoucherCoupon_confirmDelete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: confirmDelete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/voucherCoupons.php';\r
+$VoucherCoupons = new EventManagementAdminVoucherCoupons($this->dbh, $this->config);\r
+\r
+$voucherCouponDetail = $VoucherCoupons->voucherCouponDelete(true);\r
+$this->page->voucherCouponDetail = $this->bindArrayToObject($voucherCouponDetail);\r
+\r
+$this->templateFile = 'VoucherCoupon/detail.html';\r
+\r
+$this->addDebug("VoucherCoupon/confirmDelete.inc", 'Section Confirm Delete', print_r($voucherCouponDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: VoucherCoupon_delete\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: delete.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/voucherCoupons.php';\r
+$VoucherCoupons = new EventManagementAdminVoucherCoupons($this->dbh, $this->config);\r
+\r
+$voucherCouponDetail = $VoucherCoupons->voucherCouponDelete(false);\r
+$this->page->voucherCouponDetail = $this->bindArrayToObject($voucherCouponDetail);\r
+\r
+$this->templateFile = 'VoucherCoupon/delete.html';\r
+\r
+$this->addDebug("VoucherCoupon/delete.inc", 'Array: $$voucherCouponDetail', print_r($voucherCouponDetail,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: VoucherCoupon_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: detail.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/voucherCoupons.php';\r
+$VoucherCoupons = new EventManagementAdminVoucherCoupons($this->dbh, $this->config);\r
+\r
+// Get Voucher Coupon detail\r
+$voucherCouponDetail = $VoucherCoupons->getVoucherCouponDetail();\r
+$this->page->voucherCouponDetail = $this->bindArrayToObject($voucherCouponDetail);\r
+\r
+$this->templateFile = 'VoucherCoupon/detail.html';\r
+\r
+$this->addDebug("VoucherCoupon/detail.inc", 'Array: $voucherCouponDetail', print_r($voucherCouponDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: VoucherCoupon_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: edit.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/voucherCoupons.php';\r
+$VoucherCoupons = new EventManagementAdminVoucherCoupons($this->dbh, $this->config);\r
+\r
+$voucherCouponDetail = $VoucherCoupons->editVoucherCoupon();\r
+$this->page->voucherCouponDetail = $this->bindArrayToObject($voucherCouponDetail);\r
+\r
+$this->page->editingVoucherCoupon = true;\r
+\r
+$this->templateFile = 'VoucherCoupon/edit.html';\r
+\r
+$this->addDebug("VoucherDetail/edit.inc", 'Array: $voucherCouponDetail', print_r($voucherCouponDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: VoucherCoupon_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: insert.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/voucherCoupons.php';\r
+$VoucherCoupons = new EventManagementAdminVoucherCoupons($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $VoucherCoupons->insertVoucherCoupon();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->voucherCouponDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewVoucherCoupon = true;\r
+ $this->templateFile = 'VoucherCoupon/edit.html';\r
+} else {\r
+\r
+ $voucherCouponID = $r['fieldData']['id'];\r
+\r
+ $this->templateFile = 'VoucherCoupon/selected.html';\r
+}\r
+\r
+$this->addDebug("VoucherCoupon/insert.inc", 'Array: $r', print_r($r,1));\r
+\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: VoucherCoupon_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: list.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/voucherCoupons.php';\r
+$VoucherCoupons = new EventManagementAdminVoucherCoupons($this->dbh, $this->config);\r
+\r
+// Get Voucher Coupon stats\r
+$voucherCouponStats = $VoucherCoupons->getVoucherCouponsStats();\r
+$this->page->voucherCouponStats = $this->bindArrayToObject($voucherCouponStats);\r
+\r
+// Get Voucher Coupons list\r
+$voucherCouponsList = $VoucherCoupons->getVoucherCouponList();\r
+$this->page->voucherCoupons = $this->bindArrayToObject($voucherCouponsList);\r
+\r
+$this->templateFile = 'VoucherCoupon/list.html';\r
+\r
+$this->addDebug("VoucherCoupon/list.inc", 'Array: $voucherCouponsList', print_r($voucherCouponsList, 1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: VoucherCoupon_selected\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: selected.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/voucherCoupons.php';\r
+$VoucherCoupons = new EventManagementAdminVoucherCoupons($this->dbh, $this->config);\r
+\r
+$voucherCouponDetail = $VoucherCoupons->getVoucherCouponDetail();\r
+$this->page->voucherCouponDetail = $this->bindArrayToObject($voucherCouponDetail);\r
+\r
+$this->templateFile = 'VoucherCoupon/selected.html';\r
+\r
+$this->addDebug("VoucherCoupon/selected.inc", 'Voucher Coupon Detail', print_r($voucherCouponDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: VoucherCoupon_test\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: test.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/voucherCoupons.php';\r
+$VoucherCoupons = new EventManagementAdminVoucherCoupons($this->dbh, $this->config);\r
+\r
+$voucherCouponDetail = $VoucherCoupons->newVoucherCoupon();\r
+$this->page->voucherCouponDetail = $this->bindArrayToObject($voucherCouponDetail);\r
+\r
+$this->templateFile = 'VoucherCoupon/test.html';\r
+\r
+$this->addDebug("VoucherDetail/test.inc", 'Array: $voucherCouponDetail', print_r($voucherCouponDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: VoucherCoupon_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: update.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/voucherCoupons.php';\r
+$VoucherCoupons = new EventManagementAdminVoucherCoupons($this->dbh, $this->config);\r
+\r
+// Process new record\r
+$r = $VoucherCoupons->updateVoucherCoupon();\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->voucherCouponDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->editingVoucherCoupon = true;\r
+ $this->templateFile = 'VoucherCoupon/edit.html';\r
+ $this->addDebug("VoucherCoupon/update.inc", 'Array: $r', print_r($r,1));\r
+} else {\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/actions/VoucherCoupon/detail.inc';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Inventory_add\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/inventory.php';\r
+$Inventory = new EventManagementAdminInventory($this->dbh, $this->config);\r
+\r
+\r
+// Check for member ID supplied and force to a number\r
+$this->page->defMember = false;\r
+if (isset($_REQUEST['member'])) {\r
+ $this->page->defMember = ($_REQUEST['member'] - 0);\r
+}\r
+\r
+$r = $Inventory->addInven();\r
+\r
+if (isset($r['reason'])) {\r
+ $this->reason = array_merge($this->reason, $r['reason']);\r
+}\r
+\r
+$this->page->invenDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->membAccom = $this->bindArrayToObject($r['membAccom']);\r
+\r
+$this->page->addingNewInven = true;\r
+\r
+$this->templateFile = 'Inventory/EditInventory.html';\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Inventory_detail\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/inventory.php';\r
+$Inventory = new EventManagementAdminInventory($this->dbh, $this->config);\r
+\r
+\r
+// Get inventory itme detail\r
+$invenDetail = $Inventory->getInvenDetail();\r
+$this->page->invenDetail = $this->bindArrayToObject($invenDetail);\r
+\r
+$this->templateFile = 'Inventory/InventoryDetail.html';\r
+\r
+$this->addDebug("Inventory/detail.inc", 'Inventory Detail', print_r($invenDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Inventory_edit\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/inventory.php';\r
+$Inventory = new EventManagementAdminInventory($this->dbh, $this->config);\r
+\r
+\r
+$invenDetail = $Inventory->editInven();\r
+$this->page->invenDetail = $this->bindArrayToObject($invenDetail);\r
+\r
+// We need this to mimic stored detail for edit templates that show this on entry to edit\r
+$this->page->storedDetail = $this->bindArrayToObject($invenDetail);\r
+\r
+$this->page->editingInven = true;\r
+\r
+$this->templateFile = 'Inventory/EditInventory.html';\r
+\r
+$this->addDebug("Inventory/edit.inc", 'Edit Inventory', print_r($invenDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Inventory_insert\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/inventory.php';\r
+$Inventory = new EventManagementAdminInventory($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Inventory->insertInven();\r
+\r
+if (isset($r['reason'])) {\r
+ $this->reason = array_merge($this->reason, $r['reason']);\r
+}\r
+\r
+// Get success status, false = fail\r
+$status = $r['status'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->invenDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+$this->page->membSelected = $this->bindArrayToObject($r['membSelected']);\r
+$this->page->membAccom = $this->bindArrayToObject($r['membAccom']);\r
+// $this->page->lt = '<'; // needed to avoid breaking javascript\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->page->addingNewInven = true;\r
+ $this->templateFile = 'Inventory/EditInventory.html';\r
+} else {\r
+ // Inventory added, so display data on the last inventory item stored.\r
+ $invenDetail = $Inventory->getInvenDetail($r['insertedID']);\r
+ $this->page->invenDetail = $this->bindArrayToObject($invenDetail);\r
+ $this->templateFile = 'Inventory/InventoryDetail.html';\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Inventory_list\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/inventory.php';\r
+$Inventory = new EventManagementAdminInventory($this->dbh, $this->config);\r
+\r
+\r
+// Get inventory stats\r
+$invenStats = $Inventory->getInvenStats();\r
+$this->page->invenStats = $this->bindArrayToObject($invenStats);\r
+\r
+// Get inventory list\r
+$i = $Inventory->getInvenList();\r
+$inventory = $i['inventory'];\r
+\r
+// If there's member results, then sort them\r
+if (is_array($i['sum'])) {\r
+ // Sort members under each event listed\r
+ function sortByMember($a, $b)\r
+ {\r
+ if ($a['name'] > $b['name']) {\r
+ return 1;\r
+ } elseif ($b['name'] > $a['name']) {\r
+ return -1;\r
+ }\r
+ return 0;\r
+ }\r
+ while (list($k, $v) = each($i['sum'])) {\r
+ uasort($v['memb'], 'sortByMember');\r
+ $i['sum'][$k] = $v;\r
+ }\r
+}\r
+\r
+$this->page->inventoryList = $this->bindArrayToObject($inventory);\r
+$this->page->dates = $this->bindArrayToObject($i['dates']);\r
+if ($i['have_sum']) {\r
+ $this->page->summary = $this->bindArrayToObject($i['sum']);\r
+}\r
+\r
+$this->page->have_summary = $i['have_sum'];\r
+\r
+$d = getdate($i['firstDate']);\r
+\r
+$this->page->firstInventoryDay = $d['mday'];\r
+$this->page->firstInventoryMonth = $d['mon'] - 1;\r
+$this->page->firstInventoryYear = $d['year'];\r
+\r
+if ($i['type'] == 'Summary') {\r
+ $this->templateFile = 'Inventory/InventoryListSummary.html';\r
+} else {\r
+ $this->page->memberName = $i['inventory'][0]['member'];\r
+ $this->templateFile = 'Inventory/InventoryListCalendar.html';\r
+}\r
+\r
+$this->addDebug("Inventory/list.inc", 'Inventory List', print_r($i,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Ticket_selected\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: selected.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';\r
+$Tickets = new EventManagementAdminTickets($this->dbh, $this->config);\r
+\r
+$ticketDetail = $Tickets->getTicketDetail();\r
+$this->page->ticketDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+$_SESSION[GLM_EVENT_SESSION]['Performance'] = $ticketDetail['performance_id'];\r
+\r
+// Also get Ticket inventory Stats - and check if none exist for this ticket\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/ticketInventory.php';\r
+$TicketInventory = new EventManagementAdminTicketInventory($this->dbh, $this->config);\r
+$ticketInventoryStats = $TicketInventory->getTicketTicketInventoryStats($ticketDetail['id']);\r
+\r
+// Check if we have inventory or need to create it\r
+$this->page->noTicketInventory = true;\r
+if ($ticketInventoryStats > 0) {\r
+ $this->page->noTicketInventory = false;\r
+} else {\r
+\r
+ // Try to create default ticket inventory\r
+ $TicketInventory->generateDefaultTicketInventory();\r
+\r
+ // Get inventory stats again\r
+ $ticketInventoryStats = $TicketInventory->getTicketTicketInventoryStats($ticketDetail['id']);\r
+\r
+ if ($ticketInventoryStats > 0) {\r
+ $this->page->noTicketInventory = false;\r
+ }\r
+}\r
+\r
+$this->templateFile = 'Ticket/selected.html';\r
+\r
+$this->addDebug("Ticket/selected.inc", 'Ticket Detail', print_r($ticketDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Inventory_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/inventory.php';\r
+$Inventory = new EventManagementAdminInventory($this->dbh, $this->config);\r
+\r
+\r
+// Process new record\r
+$r = $Inventory->updateInven();\r
+\r
+// Get success status and reasons and save to add after getInvenDetail() below\r
+$status = $r['status'];\r
+$reason = $r['reason'];\r
+$this->page->formFail = !$status;\r
+\r
+$this->page->invenDetail = $this->bindArrayToObject($r['fieldData']);\r
+$this->page->fieldRequired = $this->bindArrayToObject($r['fieldRequired']);\r
+$this->page->fieldFail = $this->bindArrayToObject($r['fieldFail']);\r
+\r
+\r
+// If invalid submission\r
+if (!$status) {\r
+ $this->reason = $r['reason'];\r
+ $this->page->storedDetail = $this->bindArrayToObject($r);\r
+ $this->page->editingInven = true;\r
+ $this->templateFile = 'Inventory/EditInventory.html';\r
+\r
+} else {\r
+\r
+ // Get currently stored data for fields that are display only\r
+ $invenDetail = $Inventory->getInvenDetail();\r
+ $this->page->storedDetail = $this->bindArrayToObject($invenDetail);\r
+ $this->templateFile = 'Inventory/InventoryDetail.html';\r
+\r
+}\r
+\r
+$this->addDebug("Inventory/update.inc", 'Update Inventory', print_r($feeDetail,1));\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin accommodations class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/accommodations.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataAccoms.php';
+
+/**
+ * EventManagementAdminAccoms class
+ *
+ * Event Management and Reservations System - Admin Code - Accommodations section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Accommodations
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/accommodations.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link http://www.gaslightmedia.com/admin/EventManagement
+ */
+class EventManagementAdminAccoms extends EventManagementDataAccoms
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+ /**
+ * Get Accommodations Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getMemberAccomsStats()
+ {
+ // Get member ID from session - if available get stats for member\r
+ if (($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {\r
+ return $this->getStats("member = $memberID");\r
+ }
+ return 0;
+ }
+ function getAccomsStats()
+ {
+ $accomsStats = array(
+ 'all' => $this->getStats(),
+ 'member' => $this->getMemberAccomsStats()
+ );
+
+ return $accomsStats;
+ }
+
+
+}
+
+?>
+
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin add-ons class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/addons.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataAddons.php';
+
+/**
+ * EventManagementAdminAddons class
+ *
+ * Event Management and Reservations System - Admin Code - Add-Ons section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Add-Ons
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/addons.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminAddons extends EventManagementDataAddons
+{
+ /**
+ * Configuration information object
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $data
+ * @access public
+ */
+ public $data;
+
+ /**\r
+ * Get Add-Ons Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getTicketAddonsStats($ticketID = false)\r
+ {\r
+ // Get ticket ID from session - if available get stats for ticket Add-ons\r
+ if ($ticketID || ($ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'])) {\r
+ return $this->getStats("ticket = $ticketID");\r
+ }\r
+ return 0;\r
+ }\r
+ function getAddonStats()\r
+ {\r
+ $addonStats = array(\r
+ 'all' => $this->getStats(),\r
+ 'ticket' => $this->getTicketAddonStats()\r
+ );\r
+\r
+ return $addonStats;\r
+ }\r
+\r
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin addonsSold class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/addonsSold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataAddonSold.php';
+
+/**
+ * EventManagementAdminAddonsSold class
+ *
+ * Event Management and Reservations System - Admin Code - Sold Ticket add-ons
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Tickets
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/addonsSold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+class EventManagementAdminAddonsSold extends EventManagementDataAddonSold
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin attendance class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/addons.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataAttendance.php';
+
+/**
+ * EventManagementAdminAttendance class
+ *
+ * Event Management and Reservations System - Admin Code - Attendance section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Attendance
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/attendance.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminAttendance extends EventManagementDataAttendance
+{
+ /**
+ * Configuration information object
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $data
+ * @access public
+ */
+ public $data;
+
+ /**\r
+ * Get Attendance Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getAttendanceStats($performanceID = false)\r
+ {\r
+ // Get performance ID from session\r
+ if ($performanceID || ($performanceID = $_SESSION[GLM_EVENT_SESSION]['Performance'])) {\r
+ return $this->getStats("performance = $performanceID");\r
+ }\r
+ return 0;\r
+ }\r
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin Blocks Class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/blocks.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+/**
+ * EventManagementAdminBookings class
+ *
+ * Event Management and Reservations System - Admin Code - Bookings section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/bookings.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ *
+ * NOTE: This class does not currently have a DataBlocks class to extend
+ * because we don't seem to want the lower-level data definitions for this class.
+ */
+class EventManagementAdminBlocks
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ function __construct($dbh, $config)
+ {
+
+ $this->dbh = $dbh;
+ $this->config = $config;
+
+ }
+
+ /**
+ * Get Blocks Summary
+ *
+ * @return object containing array as sub-objects
+ */
+ function getBlocksSummary($event = false, $sort = true)
+ {
+
+ // Check for valid Event
+ if ($event) {
+ $eventID = $event;
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ // Get the event ID from the session
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+ } else {
+ // Otherwise, we don't have a member id
+ return false;
+ }
+
+ // Need to make sure this is a team event - Don't do blocks for a non-team event!
+ $sql = "SELECT team_event FROM eventmgt.event WHERE id = $eventID";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $event = $stmt->fetch(PDO::FETCH_ASSOC);
+ if (!$event['team_event']) {
+ return false;
+ }
+
+ // Get list of Members (properties) along with blocks and inventory stats
+ $sql = "
+ SELECT R.id AS memb_id,
+ R.name AS memb_name,
+ M.street AS addr,
+ M.lat,
+ M.lon,
+ C.city_name AS city,
+ A.id AS accom_id,
+ A.name AS accom_name,
+ I.assigned AS rooms,
+ ( SELECT COUNT(B.id) FROM eventmgt.room_block B WHERE B.member = R.id AND B.conv = $eventID ) AS room_blocks,
+ COALESCE (S.block, 0) AS block_numb,
+ COALESCE (S.allocated, 0) AS allocated,
+ ( SELECT COUNT(B.block_name) FROM eventmgt.room_block B WHERE B.member = R.id AND b.conv = $eventID ) AS block_count
+ FROM eventmgt.member R,
+ member.member M,
+ inventory I,
+ city C,
+ accommodation A
+ LEFT OUTER JOIN room_block_seg S ON (S.accommodation = A.id AND S.conv = $eventID)
+ WHERE I.member = R.id
+ AND A.member = R.id
+ AND I.accommodation = A.id
+ AND I.conv = $eventID
+ AND M.member_id = R.id
+ AND C.city_id = M.city_id
+ GROUP BY R.id, A.id, I.assigned, R.name, M.street, M.lat, M.lon, C.city_name, A.name, S.block, S.allocated
+ ORDER BY R.name, A.id
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $memb_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // If there's no results then fail
+ if (!$memb_data) {
+ return false;
+ }
+
+ // Add distances to the member data and sort by distance
+ if(class_exists('EventManagementGeoCalculations') != true) {
+ require '../../classes/GeoCalculations.php';
+ }
+ $Geo = new EventManagementGeoCalculations($this->dbh);
+ $memb_data = $Geo->getMemberEventDistance( $eventID, $memb_data, 'lat', 'lon', 'distance', 'duration', 'memb_id', $sort);
+
+ // Compile summary from list
+ $r = array();
+ foreach ($memb_data as $m) {
+
+ // If member entry has not been created
+ if (!isset($r[$m['memb_id']])) {
+
+ $r[$m['memb_id']] = array(
+ 'id' => $m['memb_id'],
+ 'name' => addslashes($m['memb_name']),
+ 'distance' => $m['distance'],
+ 'street' => $m['addr'],
+ 'city' => $m['city'],
+ 'blocks' => $m['room_blocks'],
+ 'rooms' => 0,
+ 'allocated' => 0,
+ 'unallocated' => 0,
+ 'all_allocated' => false,
+ 'alert' => false,
+ 'accom' => array()
+ );
+ }
+
+ // If accommodation entry has not been created
+ if (!isset($r[$m['memb_id']]['accom'][$m['accom_id']])) {
+
+ // Add this accomodation
+ $r[$m['memb_id']]['accom'][$m['accom_id']] = array(
+ 'id' => $m['accom_id'],
+ 'name' => $m['accom_name'],
+ 'rooms' => $m['rooms'],
+ 'allocated' => 0,
+ 'all_allocated' => false,
+ 'alert' => false
+ );
+
+ $r[$m['memb_id']]['rooms'] += $m['rooms'];
+ $r[$m['memb_id']]['unallocated'] += $m['rooms'];
+
+ }
+ // tally assingments and allocation for this member
+ $r[$m['memb_id']]['allocated'] += $m['allocated'];
+ $r[$m['memb_id']]['unallocated'] -= $m['allocated'];
+ if ($r[$m['memb_id']]['unallocated'] <= 0) {
+ $r[$m['memb_id']]['all_allocated'] = true;
+ }
+
+ // Check for mixed inventory levels across dates for this accommodation
+ if ($r[$m['memb_id']]['accom'][$m['accom_id']]['rooms'] != $m['rooms']) {
+ // Oops! We have multiple results for the same accommodation with different assigned inventory levels.
+ // This means we don't have the same amount of inventory assigned for all of the dates
+ // User must check inventory for this accommodation for this event
+ $r[$m['memb_id']]['accom'][$m['accom_id']]['alert'] = true;
+ $r[$m['memb_id']]['alert'] = true;
+ }
+
+ // Insert allocated data for this block
+ $r[$m['memb_id']]['accom'][$m['accom_id']]['allocated'] += $m['allocated'];
+ if ($r[$m['memb_id']]['accom'][$m['accom_id']]['rooms'] - $r[$m['memb_id']]['accom'][$m['accom_id']]['allocated'] <= 0) {
+ $r[$m['memb_id']]['accom'][$m['accom_id']]['all_allocated'] = true;
+ }
+
+ }
+
+ // echo "getBlocksSummary()<br><pre>".print_r($r,1)."</pre>";
+ return $r;
+
+
+ }
+
+ /**
+ * Get Blocks Detail and Management Screen
+ *
+ * @return object containing array as sub-objects
+ */
+ function getBlocksDetail()
+ {
+ // Check for valid Event
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ // Get the event ID from the session
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+ } else {
+ // Otherwise, we don't have a member id
+ return false;
+ }
+
+ // Need to make sure this is a team event - Don't do blocks for a non-team event!
+ $sql = "SELECT team_event FROM eventmgt.event WHERE id = $eventID";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $event = $stmt->fetch(PDO::FETCH_ASSOC);
+ if (!$event['team_event']) {
+ return false;
+ }
+
+ // Get the specified Member
+ if (!($membID = filter_input(INPUT_GET, 'MemberID', FILTER_SANITIZE_NUMBER_INT))) {
+ return false;
+ }
+ $sql = "SELECT name FROM eventmgt.member WHERE id = $membID";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $memberData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // Get inventory data for this member for this event
+ $sql = "
+ SELECT DISTINCT(I.assigned) AS rooms,
+ A.id AS accom_id,
+ A.name AS accom_name,
+ a.sort
+ FROM eventmgt.inventory I, eventmgt.accommodation A
+ WHERE I.member = $membID
+ AND I.conv = $eventID
+ AND A.id = I.accommodation
+ ORDER BY A.sort
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $accom_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // Build accommodation type array and short version array to use for building block data
+ $accoms = array();
+ $a_array = array();
+ $a_count = 1;
+ foreach ($accom_data as $a) {
+
+ // Check for duplicate accommodation type - indicates inconsistent quantities
+ if (isset($a_array[$a['accom_id']])) {
+ $accoms[$a['accom_id']]['alert'] = true;
+ }
+
+ $accoms[$a['accom_id']] = array(
+ 'accom_numb' => $a_count,
+ 'id' => $a['accom_id'],
+ 'name' => $a['accom_name'],
+ 'rooms' => $a['rooms'],
+ 'alert' => false
+ );
+
+ $a_array[$a['accom_id']] = array(
+ 'accom_numb' => $a_count,
+ 'id' => false,
+ 'allocated' => 0,
+ 'accom_id' => $a['accom_id'],
+ );
+
+ $a_count++;
+
+ }
+
+ // Get all related block data
+ $sql = "
+ SELECT R.id AS block_id,
+ R.block_name AS block_name,
+ R.state_rep AS state_rep,
+ coalesce((SELECT code FROM eventmgt.state_rep P WHERE P.id = R.state_rep), '') AS state_code,
+ R.team AS team,
+ S.id AS seg_id,
+ S.accommodation AS accom_id,
+ S.allocated AS allocated
+ FROM eventmgt.room_block R, eventmgt.room_block_seg S
+ WHERE R.member = $membID
+ AND R.conv = $eventID
+ AND S.block = R.id
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $block_segs = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // Build list of blocks with assignments
+ $blocks = array();
+ $blockCounter = 1;
+ foreach ($block_segs as $s) {
+
+ // If the block hasn't been created yet
+ if (!isset($blocks[$s['block_id']])) {
+ $blocks[$s['block_id']] = array(
+ 'block_numb' => $blockCounter++,
+ 'id' => $s['block_id'],
+ 'name' => $s['block_name'],
+ 'segments' => $a_array,
+ 'assigned' => $s['state_code']
+ );
+ }
+
+ // Add this segment to the block
+ $blocks[$s['block_id']]['segments'][$s['accom_id']] = array(
+ 'accom_numb' => $accoms[$s['accom_id']]['accom_numb'],
+ 'id' => $s['seg_id'],
+ 'allocated' => $s['allocated'],
+ 'accom_id' => $s['accom_id']
+ );
+
+ }
+
+ $r = array(
+ 'memberID' => $membID,
+ 'memberName' => $memberData['name'],
+ 'accomData' => $accoms,
+ 'blockData' => $blocks,
+ 'lineLength' => (count($accoms)+1),
+ 'numbAccoms' => count($accoms),
+ 'nextBlock' => $blockCounter,
+ 'nextBlock2' => ($blockCounter +1)
+ );
+
+ $this->addDebug("classes/blocks.inc", 'getBlocksDetail()', print_r($r,1));
+
+ return $r;
+
+ }
+
+ /**
+ * Update Blocks Detail and Management Screen
+ *
+ * @return object containing array as sub-objects
+ */
+ function updateBlocksDetail()
+ {
+ // Assume everything works fine
+ $status = true;
+
+ // Check for valid Event
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ // Get the event ID from the session
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+ } else {
+ // Otherwise, we don't have a member id
+ return false;
+ }
+
+ // Need to make sure this is a team event - Don't do blocks for a non-team event!
+ $sql = "SELECT team_event FROM eventmgt.event WHERE id = $eventID";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $event = $stmt->fetch(PDO::FETCH_ASSOC);
+ if (!$event['team_event']) {
+ return false;
+ }
+
+ // Get the specified Member
+ if (!($membID = filter_input(INPUT_POST, 'MemberID', FILTER_SANITIZE_NUMBER_INT))) {
+ return false;
+ }
+
+ // Get accomodation/inventory data for this member for this event
+ $sql = "
+ SELECT DISTINCT(I.assigned) AS rooms,
+ A.id AS accom_id,
+ A.name AS accom_name,
+ a.sort
+ FROM eventmgt.inventory I, eventmgt.accommodation A
+ WHERE I.member = $membID
+ AND I.conv = $eventID
+ AND A.id = I.accommodation
+ ORDER BY A.sort
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $accom_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // Build accommodation type array
+ $accoms = array();
+ $a_array = array();
+ $a_count = 1;
+ foreach ($accom_data as $a) {
+
+ // Check for duplicate accommodation type - indicates inconsistent quantities
+ if (isset($a_array[$a['accom_id']])) {
+ $accoms[$a['accom_id']]['alert'] = true;
+ }
+
+ $accoms[$a_count] = array(
+ 'accom_numb' => $a_count,
+ 'id' => $a['accom_id'],
+ 'name' => $a['accom_name'],
+ 'rooms' => $a['rooms'],
+ 'alert' => false
+ );
+
+ $a_count++;
+
+ }
+
+ // Get existing room block data for this event/member
+ $sql = "
+ SELECT *
+ FROM eventmgt.room_block
+ WHERE conv = $eventID
+ AND member = $membID
+ ORDER BY id
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $block_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // For each block submitted
+ $blocks = array();
+ $block = 1;
+ while (isset($_REQUEST['seg_'.$block.'_1'])) {
+
+ // Create an entry for this block
+ $blocks[$block] = array(
+ 'numb' => $block,
+ 'block_id' => false,
+ 'sql' => false,
+ 'segs' => array()
+ );
+
+ // For each accommodation
+ for ($accom=1 ; $accom<$a_count ; $accom++) {
+
+ // Create an entry for this accom
+ $blocks[$block]['segs'][$accom] = array(
+ 'numb' => $accom,
+ 'seg_id' => false,
+ 'sql' => false,
+ 'new_block' => false,
+ 'quant' => 0
+ );
+
+ // Check if there was an existing entry
+ if ( isset($_REQUEST['current_'.$block.'_'.$accom]) &&
+ ($current = filter_input(INPUT_POST, 'current_'.$block.'_'.$accom, FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES))) {
+ $x = explode(',', $current);
+ $blocks[$block]['block_id'] = $x[0];
+ $blocks[$block]['segs'][$accom]['seg_id'] = $x[1];
+ }
+
+ // Get inventory quantity for this segment
+ if (($quant = filter_input(INPUT_POST, 'seg_'.$block.'_'.$accom, FILTER_SANITIZE_NUMBER_INT))) {
+ $blocks[$block]['segs'][$accom]['quant'] = $quant;
+ }
+
+ }
+
+ $block++;
+ }
+
+ // Get some data on the existing blocks
+ $sql = "SELECT MAX(state_rep) AS max_rep,
+ MAX(team) AS max_team,
+ MAX(block_name) AS max_name
+ FROM eventmgt.room_block
+ WHERE conv = $eventID
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $block_stats = $stmt->fetch(PDO::FETCH_ASSOC);
+ $next_block_name = $block_stats['max_name'] + 1;
+
+ // We should now have all the block and segment data so start building queries to update - for each block
+ $sql = array();
+ foreach ($blocks as $b) {
+
+ $block_total = 0; // Total number of rooms for this block
+
+ // For each block segment
+ foreach ($b['segs'] as $s) {
+
+ // Add the number of rooms in this segment to the block total
+ $block_total += $s['quant'];
+
+ // If the segment is already in the database - update it
+ if ($s['seg_id']) {
+
+ // If the segment now 0 then delete it
+ if ($s['quant'] == false || $s['quant'] == 0) {
+ $blocks[$b['numb']]['segs'][$s['numb']]['sql'] = "DELETE FROM eventmgt.room_block_seg WHERE id = ".$s['seg_id'].";";
+
+ // Otherwise we're going to update it
+ } else {
+ $blocks[$b['numb']]['segs'][$s['numb']]['sql'] = "UPDATE room_block_seg SET allocated = ".$s['quant'].", available = ".$s['quant']." WHERE id = ".$s['seg_id'].";";
+ }
+
+ // Othewise it's a new segment and it's not 0 add it
+ } elseif ($s['quant'] != false && $s['quant'] > 0) {
+
+ // If we already have a block ID, use the block number
+ if ($blocks[$b['numb']]['block_id'] != false) {
+ $bval = $blocks[$b['numb']]['block_id'];
+
+ // Otherwise we'll be adding the block so use the last sequence value for the block ID
+ } else {
+ $bval = "currval('room_block_id_seq')";
+ }
+
+ // Create the block segement insert query
+ $blocks[$b['numb']]['segs'][$s['numb']]['sql'] = "
+ INSERT INTO eventmgt.room_block_seg
+ (block, conv, accommodation, allocated, available)
+ VALUES
+ ($bval, $eventID, ".$accoms[$s['numb']]['id'].", ".$s['quant'].", ".$s['quant'].")
+ ;";
+ }
+
+ }
+
+ // If block is empty
+ if ($block_total == 0) {
+
+ // If the block existed, then delete it
+ if ($b['block_id'] != false) {
+ $blocks[$b['numb']]['sql'] = "DELETE FROM eventmgt.room_block WHERE id = ".$b['block_id'].";";
+ }
+
+ // Otherwise if this is a new block
+ } elseif ($b['block_id'] == false) {
+ $blocks[$b['numb']]['sql'] = "
+ INSERT INTO eventmgt.room_block
+ (conv, member, state_rep, team, block_name)
+ VALUES
+ ($eventID, $membID, 0, 0, ".$next_block_name++.")
+ ;";
+ $blocks[$b['numb']]['new_block'] = true;
+
+ } // Note that we don't have to update the block record if it's going to stay
+
+ }
+
+ // Now try to run the queries
+ reset($blocks);
+ try {
+ $this->dbh->beginTransaction();
+
+ // For each block
+ foreach ($blocks as $b) {
+
+ // if there's a query
+ if ($b['sql'] != false) {
+ $this->dbh->exec($b['sql']);
+ }
+
+ // for each segment
+ foreach ($b['segs'] as $s) {
+
+ // if there's a query
+ if ($s['sql'] != false) {
+ $this->dbh->exec($s['sql']);
+ }
+ }
+ }
+
+ $this->dbh->commit();
+
+ } catch (Exception $e) {
+ $this->dbh->rollBack();
+ $status = false;
+ }
+
+ // If there are no blocks assigned to state reps or teams yet it's OK to renumber
+ // Otherwise we're just going to add numbers
+ $renumber = false;
+ if ($block_stats['max_rep'] + $block_stats['max_team'] == 0) {
+ $renumber = true;
+ }
+
+ // Get all blocks in the proper member order then in the order of their creation
+ $sql = "SELECT B.id, B.block_name,
+ M.member_id AS memb_id, M.member_name, M.lat, M.lon
+ FROM eventmgt.room_block B, members.member M
+ WHERE B.conv = $eventID
+ AND M.member_id = B.member
+ ORDER BY M.member_id, B.id
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $blocks = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // If we have some room blocks
+ if (count($blocks) > 0) {
+
+ // Add distances to the member data and sort by distance
+ require '../../classes/GeoCalculations.php';
+ $Geo = new EventManagementGeoCalculations($this->dbh);
+ $blocks = $Geo->getMemberEventDistance( $eventID, $blocks, 'lat', 'lon', 'distance', 'duration', 'memb_id', true);
+
+ // Renumber all blocks according to the current order - if we're allowed to renumber at this time
+ $block = 1;
+ if ($renumber) {
+
+ try {
+ $this->dbh->beginTransaction();
+ foreach ($blocks as $b) {
+ $this->dbh->exec("UPDATE room_block SET block_name = ".$block++." WHERE id = ".$b['id'].";");
+ }
+ $this->dbh->commit();
+ } catch (Exception $e) {
+ $this->dbh->rollBack();
+ }
+
+ }
+
+ }
+
+ // echo "updateBlocksDetail()<br><pre>".print_r($blocks,1)."</pre>";
+ return $status;
+
+ }
+
+ /**
+ * Get Room Blocks
+ *
+ * If summary is true, then also put all the data under the properties
+ * so all blocks show under the property as well.
+ *
+ * @return object containing array as sub-objects
+ */
+ function getRoomBlocks($event = false, $sort = true, $summary = false, $state = false, $team = false, $property = false)
+ {
+
+ // Make sure we have an event selected (shouldn't happen that we don't)
+ if ($event) {
+ $eventID = $event;
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ // Get the event ID from the session
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+ } else {
+ // Otherwise, we don't have a member id
+ return false;
+ }
+
+ // Get all State Reps for this event
+ $where = '';
+ if ($state) {
+ $where = "AND id = $state";
+ };
+ if ($property) {
+ $where .= " AND id IN (
+ SELECT DISTINCT state_rep FROM eventmgt.room_block
+ WHERE member = $property
+ )";
+ }
+
+ $sql = "SELECT id, code
+ FROM eventmgt.state_rep
+ WHERE conv = $eventID
+ $where
+ ORDER BY code;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $states_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ $statesList = array();
+ foreach ($states_data as $s) {
+ $statesList[$s['id']] = array(
+ 'id' => $s['id'],
+ 'code' => $s['code']
+ );
+ }
+
+ // Get all Teams for this event and add under state reps array
+ $where = '';
+ if ($state) {
+ $where .= " AND T.state = $state";
+ };
+ if ($team) {
+ $where .= " AND T.id = $team";
+ };
+ if ($property) {
+ $where .= " AND T.room_block IN (
+ SELECT DISTINCT id FROM eventmgt.room_block
+ WHERE member = $property
+ )";
+ }
+
+ $sql = "SELECT T.id, T.name, T.team_code, T.state, D.name AS division
+ FROM eventmgt.team T, eventmgt.division D
+ WHERE T.conv = $eventID
+ AND D.id = T.division
+ $where
+ ORDER BY T.name;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $teams_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
+ foreach ($teams_data as $t) {
+ $statesList[$t['state']]['teams'][$t['id']] = array(
+ 'id' => $t['id'],
+ 'name' => $t['name'],
+ 'team_code' => $t['team_code']
+ );
+ }
+
+ // Get all existing Room Blocks for this event
+ $where = '';
+ if ($state) {
+ $where .= " AND B.state_rep = $state";
+ };
+ if ($team) {
+ $where .= " AND B.team = $team";
+ };
+ if ($property) {
+ $where .= " AND R.id = $property";
+ }
+
+
+ $sql = "SELECT B.id as block_id,
+ B.block_name,
+ B.state_rep,
+ B.team,
+ B.member AS memb_id,
+ R.name AS memb_name,
+ M.street AS street,
+ M.lat,
+ M.lon,
+ C.city_name AS city,
+ A.name AS accom_name,
+ S.allocated AS quant,
+ S.available AS available
+ FROM eventmgt.room_block B, eventmgt.member R, members.member M, members.city C, eventmgt.room_block_seg S, eventmgt.accommodation A
+ WHERE B.conv = $eventID
+ AND R.id = B.member
+ AND S.block = B.id
+ AND A.id = S.accommodation
+ AND C.city_id = M.city_id
+ AND M.member_id = R.id
+ $where
+ ORDER BY M.member_id, B.block_name, A.name;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $blocks_data = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ // Add distances to the member data and sort by distance
+ if(class_exists('EventManagementGeoCalculations') != true) {
+ require '../../classes/GeoCalculations.php';
+ }
+ $Geo = new EventManagementGeoCalculations($this->dbh);
+ $blocks_data = $Geo->getMemberEventDistance( $eventID, $blocks_data, 'lat', 'lon', 'distance', 'duration', 'memb_id', $sort);
+
+ if (!is_array($blocks_data) || count($blocks_data) == 0) {
+ return false;
+ }
+ reset($blocks_data);
+
+ // Build room blocks list
+ $blocksList = array();
+ foreach ($blocks_data as $b) {
+
+ // If the Property (member) hasn't been added to the array yet
+ if (!isset($blocksList[$b['memb_id']])) {
+ $blocksList[$b['memb_id']] = array(
+ 'memb_id' => $b['memb_id'],
+ 'memb_name' => $b['memb_name'],
+ 'distance' => $b['distance'],
+ 'street' => $b['street'],
+ 'city' => $b['city']
+ );
+ }
+
+ // Get assignement summary if assigned
+ $assigned = false;
+ $assigned_to_state = '';
+ $assigned_to_team = '';
+ if ($b['state_rep'] > 0) {
+ $assigned_to_state = $statesList[$b['state_rep']]['code'];
+ }
+ if ($b['team'] > 0 ) {
+ $assigned_to_team = $statesList[$b['state_rep']]['teams'][$b['team']]['name'];
+ $team_code = $statesList[$b['state_rep']]['teams'][$b['team']]['team_code'];
+ }
+
+ // Build block info array
+ $block = array (
+ 'block_id' => $b['block_id'],
+ 'block_name' => $b['block_name'],
+ 'memb_name' => $b['memb_name'],
+ 'memb_id' => $b['memb_id'],
+ 'accom_info' =>
+ '<span class="tooltiptitle">'.$b['memb_name']."</span><br>"
+ .$b['quant'].": ".$b['accom_name']."<br>",
+ 'accoms' => array($b['accom_name'] => array(
+ 'accom_name' => $b['accom_name'], 'quant' => $b['quant'], 'available' => $b['available']
+ )),
+ 'accom_quant' => $b['quant'],
+ 'assigned' => $assigned,
+ 'assigned_to_state' => $assigned_to_state,
+ 'assigned_to_team' => $assigned_to_team,
+ 'team_code' => $team_code
+ );
+
+ // If block as been assigned to a team
+ if ($b['team'] > 0) {
+
+ if (!isset($statesList[$b['state_rep']]['teams'][$b['team']]['blocks'][$b['block_id']])) {
+ $statesList[$b['state_rep']]['teams'][$b['team']]['blocks'][$b['block_id']] = $block;
+ } else {
+ $statesList[$b['state_rep']]['teams'][$b['team']]['blocks'][$b['block_id']]['accom_info'] .= $b['quant'].": ".$b['accom_name']."<br>";
+ $statesList[$b['state_rep']]['teams'][$b['team']]['blocks'][$b['block_id']]['accoms'][$b['accom_name']] = array(
+ 'accom_name' => $b['accom_name'], 'quant' => $b['quant'], 'available' => $b['available']
+ );
+ // Update sort of accoms array to keep it alphabetical
+ ksort($statesList[$b['state_rep']]['teams'][$b['team']]['blocks'][$b['block_id']]['accoms']);
+ }
+
+ // Otherwise it must just be assigned to a state rep so far
+ } elseif ($b['state_rep'] > 0) {
+
+ if (!isset($statesList[$b['state_rep']]['blocks'][$b['block_id']])) {
+ $statesList[$b['state_rep']]['blocks'][$b['block_id']] = $block;
+ } else {
+ $statesList[$b['state_rep']]['blocks'][$b['block_id']]['accom_info'] .= $b['quant'].": ".$b['accom_name']."<br>";
+ $statesList[$b['state_rep']]['blocks'][$b['block_id']]['accoms'][$b['accom_name']] = array(
+ 'accom_name' => $b['accom_name'], 'quant' => $b['quant'], 'available' => $b['available']
+ );
+
+ ksort($statesList[$b['state_rep']]['blocks'][$b['block_id']]['accoms']);
+ }
+
+ }
+
+ // If the block is not assigned to either a state or team, or if we're running in summary mode, include under property.
+ if (($b['team'] == 0 && $b['state_rep'] == 0) || $summary) {
+
+ if (!isset($blocksList[$b[memb_id]]['blocks'][$b['block_id']])) {
+ $blocksList[$b[memb_id]]['blocks'][$b['block_id']] = $block;
+ } else {
+ $blocksList[$b[memb_id]]['blocks'][$b['block_id']]['accom_info'] .= $b['quant'].": ".$b['accom_name']."<br>";
+ $blocksList[$b[memb_id]]['blocks'][$b['block_id']]['accoms'][$b['accom_name']] = array(
+ 'accom_name' => $b['accom_name'], 'quant' => $b['quant'], 'available' => $b['available']
+ );
+ // Update sort of accoms array to keep it alphabetical
+ ksort($blocksList[$b[memb_id]]['blocks'][$b['block_id']]['accoms']);
+ }
+
+ }
+
+ }
+
+ // Check if there's no blocksList yet
+ if (count($blocksList) == 0) {
+ $blocksList = false;
+ }
+
+ // Function to Sort all blocks by block_name (number)
+ function blockCmp($a, $b) {
+
+ $aval = $a['block_name'];
+ $bval = $b['block_name'];
+
+ if ($val == $bval) {
+ return 0;
+ }
+ return ($aval < $bval) ? -1 : 1;
+ }
+
+ // Sort unasigned blocks
+ reset ($blocksList);
+ while (list($k, $v) = each($blocksList)) {
+ if (is_array($v['blocks'])) {
+ uasort($blocksList[$k]['blocks'], 'blockCmp');
+ }
+ }
+
+ // Sort blocks assigned to states or teams
+ reset ($statesList);
+ while (list($k, $v) = each($statesList)) {
+
+ // Check for and sort any blocks not assigned to teams
+ if (is_array($v['blocks'])) {
+ uasort($statesList[$k]['blocks'], 'blockCmp');
+ }
+
+ // Check for any teams
+ if (is_array($v['teams'])) {
+ while (list($tk, $tv) = each($v['teams'])) {
+ if (is_array($tv['blocks'])) {
+ uasort($statesList[$k]['teams'][$tk]['blocks'], 'blockCmp');
+ }
+ }
+ }
+ }
+
+ // Sort accommodation types
+
+ $r = array(
+ 'blocks' => $blocksList,
+ 'states' => $statesList
+ );
+
+ // echo "<pre>".htmlentities(print_r($r,1))."</pre>";
+ return $r;
+ }
+
+ /**
+ * Save Room Blocks
+ *
+ * @return object containing array as sub-objects
+ */
+ function saveRoomBlocks()
+ {
+
+ // Make sure we have an event selected (shouldn't happen that we don't)
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ // Get the event ID from the session
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+ } else {
+ // Otherwise, we don't have a member id
+ return false;
+ }
+
+ // Get room block drop list
+ $dropList = $_REQUEST['blocks'];
+
+ // Separate into separate move requests
+ $drops = explode(',', $dropList);
+
+ $sql = array();
+
+ // For each block moved
+ foreach ($drops as $d) {
+
+ // separate the block id from the destination
+ $x = explode('|', $d);
+ $block = $x[0];
+
+ // separate the destination id from the type
+ $y = explode('_', $x[1]);
+
+ // Set any state and team assignments for this block
+ $state = 'null';
+ $team = 'null';
+ switch ($y[0]) {
+
+ case 'state':
+
+ $state = ($y[1] - 0);
+
+ if ($y[2] == 'team') {
+ $team = ($y[3] - 0);
+ }
+
+ break;
+
+ case 'member':
+ // If moved back to member, then there's no assignment
+ break;
+
+ }
+
+ if ($state == 0) {
+ $state = 'null';
+ }
+ if ($team == 0) {
+ $team = 'null';
+
+ }
+
+ $sql[] = "
+ UPDATE room_block
+ SET state_rep = $state,
+ team = $team
+ WHERE conv = $eventID
+ AND block_name = $block;
+ ";
+ }
+
+ if (count($sql) > 0) {
+ try {
+ $this->dbh->beginTransaction();
+ foreach ($sql as $s) {
+ $this->dbh->exec($s);
+ }
+ $this->dbh->commit();
+ } catch (Exception $e) {
+ $this->dbh->rollBack();
+ }
+
+ }
+
+ }
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin booking class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/bookings.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataBookings.php';
+
+/**
+ * EventManagementAdminBookings class
+ *
+ * Event Management and Reservations System - Admin Code - Bookings section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/bookings.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminBookings extends EventManagementDataBookings
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get Members Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getBookingsStats()
+ {
+ $bookingsStats = array(
+ 'all' => $this->getStats(),
+ 'event' => 0,
+ 'member' => 0,
+ 'team' => 0
+ );
+
+ // Get event ID from session - if available get stats for bookings listed with this event
+ if (($eventID = $_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ $bookingsStats['event'] = $this->getStats("
+ conv = $eventID
+ ");
+ }
+
+ // Get member ID from session - if available get stats for bookings for this member
+ if (($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ $bookingsStats['member'] = $this->getStats("
+ property = $memberID
+ ");
+ }
+
+ // Get team ID from session - if available get stats for bookings listed with this team
+ if (($teamID = $_SESSION[GLM_EVENT_SESSION]['Team'])) {
+ $bookingsStats['team'] = $this->getStats("
+ team = $teamID
+ ");
+ }
+
+ return $bookingsStats;
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin contacts class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/contacts.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataContacts.php';
+
+/**
+ * EventManagementAdminContacts class
+ *
+ * Event Management and Reservations System - Admin Code - Contacts section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Contacts
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/contacts.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminContacts extends EventManagementDataContacts
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+
+ /**
+ * Get Contacts Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getEventContactsStats()
+ {
+ // Check for selected Event\r
+ if (($eventID = $_SESSION[GLM_EVENT_SESSION]['Event'])) {\r
+ return $this->getStats("\r
+ contact_type = ".$this->config->reference_type->event."\r
+ AND affiliation = $eventID\r
+ ");\r
+ }
+ return 0;\r
+ }
+ function getMemberContactsStats()
+ {
+ // Check for selected Member\r
+ if (($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {\r
+ return $this->getStats("\r
+ contact_type = ".$this->config->reference_type->member."\r
+ AND affiliation = $memberID\r
+ ");\r
+ }
+ return 0;
+ }
+ function getStateContactsStats()
+ {
+ // Check for selected State Rep\r
+ if (($stateID = $_SESSION[GLM_EVENT_SESSION]['State'])) {\r
+ return $this->getStats("\r
+ contact_type = ".$this->config->reference_type->state."\r
+ AND affiliation = $stateID\r
+ ");\r
+ }
+ return 0;
+ }
+ function getTeamContactsStats()
+ {
+\r
+ // Check for selected Team\r
+ if (($teamID = $_SESSION[GLM_EVENT_SESSION]['Team'])) {\r
+ return $this->getStats("\r
+ contact_type = ".$this->config->reference_type->team."\r
+ AND affiliation = $teamID\r
+ ");\r
+ }
+ return 0;\r
+ }
+ function getContactsStats()
+ {
+
+ $contactsStats = array(
+ 'all' => $this->getStats(),
+ 'event' => $this->getEventContactsStats(),
+ 'member' => $this->getMemberContactsStats(),
+ 'state' => $this->getStateContactsStats(),
+ 'team' => $this->getTeamContactsStats()
+ );
+
+ return $contactsStats;
+ }
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin events class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/events.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+/**
+ * EventManagementAdminEvents class
+ *
+ * Event Management and Reservations System - Admin Code - Events section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Events
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/events.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminEvents
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+ /**
+ * Constructor
+ *
+ * @param object $d database connection
+ *
+ * @return void
+ * @access public
+ */
+ public function __construct($dbh, $config)
+ {
+ $this->dbh = $dbh;
+ $this->config = $config;
+ }
+
+
+ /**
+ * Get Events Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getEventsStats()
+ {
+
+ // Get list of all available Events
+ $sql = "SELECT ( SELECT count(id) FROM eventmgt.event WHERE active ) AS active,
+ ( SELECT count(id) FROM eventmgt.event WHERE NOT active ) AS inactive
+ ;";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventsStats = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ return $eventsStats;
+ }
+
+ /**
+ * Get Events list
+ *
+ * @param string type of events list
+ *
+ * @return object containing array as sub-objects
+ */
+ function getEventsList()
+ {
+
+ // Get any specified event listing option - default to active
+ $option = 'active';
+ if (($eventsListOption = filter_input(INPUT_GET, 'EventsListOption', FILTER_SANITIZE_STRING))) {
+ $option = $eventsListOption;
+ }
+
+ // Clear Session Event Selection
+ $_SESSION[GLM_EVENT_SESSION]['Event'] = false;
+
+ // Select type of list
+ $where = '';
+ switch ($option) {
+ case 'all':
+ $where = 'true';
+ break;
+ case 'active':
+ $where = "active AND end_date > 'now'";
+ break;
+ case 'inactive':
+ $where = "NOT active AND end_date > 'now'";
+ break;
+ case 'expired':
+ $where = "active AND end_date < 'now'";
+ break;
+ case 'archived':
+ $where = "NOT active AND end_date < 'now'";
+ break;
+ default:
+ echo "Option not set";
+ break;
+ }
+
+ // Get list of all available Events
+ $sql = "SELECT id, name, event_code, start_date, end_date, cutoff_date
+ FROM eventmgt.event
+ WHERE $where
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventsList = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ if (count($eventsList) == 0)
+ return false;
+ return $eventsList;
+ }
+
+ /**
+ * Get Event Detail
+ *
+ * Returns an array of event detail data for an event.
+ *
+ * @param array $array of values to convert
+ *
+ * @return object containing array as sub-objects
+ */
+ function getEventDetail()
+ {
+ // Is there a new event code selected?
+ if (($eventID = filter_input(INPUT_GET, 'EventID', FILTER_SANITIZE_NUMBER_INT))) {
+
+ // If so then add it to the session
+ $_SESSION[GLM_EVENT_SESSION]['Event'] = $eventID;
+
+ } elseif (isset($_SESSION[GLM_EVENT_SESSION]['Event'])) {
+
+ // Otherwise, get the event ID from the session
+ $eventID = $_SESSION[GLM_EVENT_SESSION]['Event'];
+
+ } else {
+
+ // Otherwise, we don't have an event id
+ return false;
+
+ }
+
+ $sql = "SELECT *
+ FROM eventmgt.event
+ WHERE id = '$eventID';";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventDetail = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ return $eventDetail;
+ }
+
+
+
+}
+
+?>
+
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin divisions class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/divisions.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataDivisions.php';
+
+/**
+ * EventManagementAdminDivisions class
+ *
+ * Event Management and Reservations System - Admin Code - Divisions section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/divisions.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminDivisions extends EventManagementDataDivisions
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get State Divisions
+ *
+ * @return object containing array as sub-objects
+ */
+ function getDivisionsStats()
+ {
+ $divisionsStats = array(
+ 'all' => $this->getStats(),
+ 'event' => 0,
+ 'state' => 0
+ );
+
+ // Get event ID from session - if available get stats for teams listed with this event
+ if (($eventID = $_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ $divisionsStats['event'] = $this->getStats("
+ conv = $eventID
+ ");
+ }
+
+ return $divisionsStats;
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin entrances class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/entrances.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataEntrances.php';
+
+/**
+ * EventManagementAdminContacts class
+ *
+ * Event Management and Reservations System - Admin Code - Entrances section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Entrances
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/entrances.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminEntrances extends EventManagementDataEntrances
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+ /**\r
+ * Get Entrances Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getMemberEntrancesStats($memberID = false)\r
+ {\r
+ // Get member ID from session - if available get stats for member\r
+ if ($memberID || ($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {\r
+ return $this->getStats("member = $memberID");\r
+ }\r
+ return 0;\r
+ }\r
+ function getEntrancesStats()\r
+ {\r
+ $entrancesStats = array(\r
+ 'all' => $this->getStats(),\r
+ 'member' => $this->getMemberEntrancesStats()\r
+ );\r
+\r
+ return $entrancesStats;\r
+ }\r
+\r
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin event fees class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/eventFees.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataFees.php';
+
+/**
+ * EventManagementAdminStates class
+ *
+ * Event Management and Reservations System - Admin Code - Event Fees Section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/eventFees.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminEventFees extends EventManagementDataFees
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get Event Fees Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getEventFeesStats()
+ {
+ $eventFeesStats = array(
+ 'all' => $this->getStats(),
+ 'event' => 0
+ );
+
+ // Get event ID from session - if available get stats for teams listed with this event
+ if (($eventID = $_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ $eventFeesStats['event'] = $this->getStats("
+ owner = $eventID
+ ");
+ }
+
+ return $eventFeesStats;
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin report class - Event Report
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/eventReport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/Reports/dataEventReport.php';
+
+/**
+ * EventManagementAdminEvents class
+ *
+ * Event Management and Reservations System - Admin Code - Event Report section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Events
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/events.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminEventReport extends EventManagementDataEventReport
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+ function __construct($dbh, $config)
+ {
+ parent::__construct($dbh, $config);
+ }
+
+ /**
+ * Get Report Request Form
+ *
+ * @return object containing array as sub-objects
+ */
+ function getForm()
+ {
+
+ $reportData = array(
+ 'status' => true,
+ 'reason' => array(),
+ 'form' => array()
+ );
+
+ $reportData['form'] = $this->newControls();
+
+ return $reportData;
+ }
+
+ /**
+ * Process Report
+ *
+ * @return object containing array as sub-objects
+ */
+ function getReport()
+ {
+
+ $reportData = array(
+ 'status' => true,
+ 'output' => false,
+ 'reason' => array(),
+ 'report' => array()
+ );
+
+ /*
+ * Try to process report form request
+ */
+ $request = $this->processInputData();
+ if (!$request['status']) {
+ $reportData['status'] = false;
+
+ if ($request['fieldFail']['event_name']) {
+ $reportData['reason'][] = 'An event was not selected';
+ }
+
+ if ($request['fieldFail']['output_type']) {
+ $reportData['reason'][] = 'An output type was not selected';
+ }
+
+ }
+
+ // Get selections
+ $r = $request['fieldData'];
+ $event = $r['event_name']['in'];
+ $statistics = $r['statistics_section']['value'];
+ $contacts = $r['contacts_section']['value'];
+ $housing = $r['housing_section']['value'];
+ $housing_available_only = $r['housing_available_only']['value'];
+ $housing_summary_only = $r['housing_summary_only']['value'];
+ $reservations = $r['reservations_section']['value'];
+ $reservations_summary_only = $r['reservations_summary_only']['value'];
+ $reportData['output'] = $r['output_type']['value'];
+
+ // If the request is valid - Produce the report
+ if ($reportData['status']) {
+
+ /*
+ * Get report data
+ */
+
+ // Get Event data
+ $sql = "SELECT * FROM eventmgt.event WHERE id = $event;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['event'] = $eventData;
+
+ // Get Statistics
+ $reportData['report']['doingStatistics'] = $statistics;
+ if ($statistics) {
+ // Not built yet
+ }
+
+ // Get Contacts
+ $reportData['report']['doingContacts'] = $contacts;
+ if ($contacts) {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataContacts.php';
+ $Contacts = new EventManagementDataContacts($this->dbh, $this->config);
+ $where = "T.contact_type = ".$this->config->reference_type->event." AND affiliation = $event";
+ $contactsList = $Contacts->getList($where);
+ $reportData['report']['contacts'] = $contactsList;
+ }
+
+ // Get Housing and Inventory
+
+ $reportData['report']['doingHousing'] = $housing;
+ $reportData['report']['showAllInventoryDataDetail'] = !$housing_available_only;
+ $reportData['report']['showHousingDetail'] = !$housing_summary_only;
+ if ($housing) {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataInventory.php';
+ $Inventory = new EventManagementDataInventory($this->dbh, $this->config);
+ $inventoryList = $Inventory->getInvenList('event', $event);
+
+ // Sort inventory by summary
+ function sortByMember($a, $b)
+ {
+ if ($a['name'] > $b['name']) {
+ return 1;
+ } elseif ($b['name'] > $a['name']) {
+ return -1;
+ }
+ return 0;
+ }
+ while (list($k, $v) = each($inventoryList['sum'])) {
+ uasort($v['memb'], 'sortByMember');
+ $inventoryList['sum'][$k] = $v;
+ }
+
+ $reportData['report']['housing'] = $inventoryList;
+ }
+
+ // Get Reservations - Use existing report class for reservations
+ $reportData['report']['doingReservations'] = $reservations;
+ $reportData['report']['showReservationsDetail'] = !$reservations_summary_only;
+ if ($reservations) {
+ require 'reservationReport.php';
+ $Reservations = new EventManagementAdminReservationReport($this->dbh, $this->config);
+ $reservationsList = $Reservations->getReport($event);
+ $reportData['report']['reservations'] = $reservationsList['report'];
+ }
+
+ }
+
+ return $reportData;
+ }
+
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin events class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/events.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataEvents.php';
+
+/**
+ * EventManagementAdminEvents class
+ *
+ * Event Management and Reservations System - Admin Code - Events section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Events
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/events.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminEvents extends EventManagementDataEvents
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get Events Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getEventsStats()
+ {
+ $eventsStats = array(
+ 'all' => $this->getStats(),
+ 'active' => $this->getStats('active'),
+ 'inactive' => $this->getStats('NOT active'),
+ 'expired' => $this->getStats("active AND end_date < 'now'"),
+ 'archived' => $this->getStats("NOT active AND end_date < 'now'"),
+ 'member' => 0,
+ 'team' => 0
+ );
+
+ // Get member ID from session - if available get stats for events for this member
+ if (($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ $eventsStats['member'] = $this->getStats("
+ id IN (
+ SELECT DISTINCT event
+ FROM eventmgt.inventory
+ WHERE member = $memberID
+ )
+ ");
+/* Trying to not use event_prop table for this
+ $eventsStats['member'] = $this->getStats("
+ id IN (
+ SELECT DISTINCT event
+ FROM eventmgt.event_prop
+ WHERE property = $memberID
+ )
+ ");
+*/
+ }
+
+ // Get team ID from session - if available get stats for bookings listed with this team
+ if (($teamID = $_SESSION[GLM_EVENT_SESSION]['Team'])) {
+ $bookingsStats['team'] = $this->getStats("
+ id IN (
+ SELECT DISTINCT event
+ FROM eventmgt.team_property
+ WHERE team = $teamID
+ )
+ ");
+ }
+
+ return $eventsStats;
+ }
+
+ /**
+ * Get Member Events
+ *
+ * @return object containing array as sub-objects
+ */
+ function getMemberEvents()
+ {
+ // Get member ID
+ if (isset($_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ // Get the event ID from the session
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+ } else {
+ // Otherwise, we don't have a member id
+ return false;
+ }
+
+ // Only look for events for the specified property
+ $where = "T.id IN (
+ SELECT DISTINCT event
+ FROM eventmgt.inventory
+ WHERE member = $memberID
+ )";
+/* Trying to not use event_prop table for this
+ $where = "T.id IN (
+ SELECT event
+ FROM eventmgt.event_prop
+ WHERE property = $memberID
+ )";
+*/
+ $memberEvents = $this->getEventsList($where);
+
+ if (count($memberEvents) == 0) {
+ return false;
+ }
+
+ return $memberEvents;
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin inventory class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/invetory.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataInventory.php';
+
+/**
+ * EventManagementAdminInventory class
+ *
+ * Event Management and Reservations System - Admin Code - Inventory section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/inventory.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminInventory extends EventManagementDataInventory
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get Inventory Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getEventInvenStats()
+ {
+ // Get event ID from session - if available get stats for event\r
+ if (($eventID = $_SESSION[GLM_EVENT_SESSION]['Event'])) {\r
+ return $this->getStats("conv = $eventID");\r
+ }
+ return 0;\r
+ }
+ function getMemberInvenStats()
+ {
+ // Get member ID from session - if available get stats for member\r
+ if (($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {\r
+ return $this->getStats("member = $memberID");\r
+ }
+ return 0;
+ }
+ function getAccomInvenStats()
+ {
+ // Get accommodation ID from session - if available get stats for accommodation
+ if (($accomID = $_SESSION[GLM_EVENT_SESSION]['Accom'])) {
+ return $this->getStats("accommodation = $accomID");
+ }
+ return 0;
+ }
+ function getTeamInvenStats()
+ {
+ // Get team ID from session - if available get stats for team\r
+ if (($teamID = $_SESSION[GLM_EVENT_SESSION]['Team'])) {\r
+ return $this->getStats("\r
+ id in\r
+ (\r
+ SELECT I.id\r
+ FROM eventmgt.inventory I, eventmgt.team_property TP\r
+ WHERE TP.team = $teamID\r
+ AND I.member = TP.property\r
+ AND I.date between TP.start AND TP.stop\r
+ )\r
+ ");\r
+ }\r
+ return 0;
+ }
+ function getInvenStats()
+ {
+ $invenStats = array(
+ 'all' => $this->getStats(),
+ 'event' => $this->getEventInvenStats(),
+ 'member' => $this->getMemberInvenStats(),
+ 'accom' => $this->getAccomInvenStats(),
+ 'team' => $this->getTeamInvenStats()
+ );
+ return $invenStats;
+ }
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin member amenities class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/memberAmenities.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataAmenities.php';
+
+/**
+ * EventManagementAdminStates class
+ *
+ * Event Management and Reservations System - Admin Code - Member Amenities Section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/memberAmenities.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminMemberAmenities extends EventManagementDataAmenities
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get Member Amenities Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getMemberAmenitiesStats()
+ {
+ $memberAmenitiesStats = array(
+ 'all' => $this->getStats(),
+ 'member' => 0
+ );
+
+ // Get member ID from session - if available get stats
+ if (($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ $memberAmenitiesStats['member'] = $this->getStats("
+ owner = $memberID
+ ");
+ }
+
+ return $memberAmenitiesStats;
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin member fees class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/memberFees.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataFees.php';
+
+/**
+ * EventManagementAdminStates class
+ *
+ * Event Management and Reservations System - Admin Code - Member Fees Section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/memberFees.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminMemberFees extends EventManagementDataFees
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get Member Fees Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getMemberFeesStats()
+ {
+ $memberFeesStats = array(
+ 'all' => $this->getStats(),
+ 'member' => 0
+ );
+
+ // Get member ID from session - if available get stats
+ if (($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ $memberFeesStats['member'] = $this->getStats("
+ owner = $memberID
+ ");
+ }
+
+ return $memberFeesStats;
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin members class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/members.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMembers.php';
+
+/**
+ * EventManagementAdminMembers class
+ *
+ * Event Management and Reservations System - Admin Code - Members section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/members.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminMembers extends EventManagementDataMembers
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get Members Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getMembersStats()
+ {
+ // Basic member stats
+ $membersStats = array(
+ 'all' => $this->getStats() // Count of all members
+ );
+
+ // Get event ID from session - if available get stats for members listed with this event\r
+ if (($eventID = $_SESSION[GLM_EVENT_SESSION]['Event'])) {\r
+ $membersStats['event'] = $this->getStats("\r
+ id in\r
+ (\r
+ SELECT DISTINCT(member)\r
+ FROM eventmgt.inventory\r
+ WHERE conv = $eventID\r
+ )\r
+ ");\r
+ } else {
+ // Otherwise if no event number is 0
+ $membersStats['event'] = 0;
+ }
+
+ // If doing accommodations - get accommodation stats
+ if ($this->config->option->accommodations) {
+ $membersStats['accom'] = $this->getStats("
+ id in
+ (
+ SELECT DISTINCT member
+ FROM eventmgt.accommodation
+ )
+ ");
+ }
+
+ // If doing tickets - get ticket stats
+ if ($this->config->option->tickets) {
+ $membersStats['ticket'] = $this->getStats("
+ id in
+ (
+ SELECT DISTINCT member
+ FROM eventmgt.ticket
+ )
+ ");
+ };
+
+ // determine if there's any status flags we should set
+ $membersStats['flags'] = false;
+ $membersStats['flag'] = false;
+ if ($membersStats['all'] == 0) {
+ $membersStats['flags']['noMembers'] = true;
+ $membersStats['flag'] = true;
+ }
+ if ($this->config->option->accommodations && $membersStats['accom'] == 0) {\r
+ $membersStats['flags']['noMemberAccoms'] = true;\r
+ $membersStats['flag'] = true;
+ }\r
+ if ($this->config->option->tickets && $membersStats['ticket'] == 0) {
+ $membersStats['flags']['noMemberTickets'] = true;
+ $membersStats['flag'] = true;
+ }
+ if ($this->config->option->events && $membersStats['event'] == 0) {\r
+ $membersStats['flags']['noMemberEvents'] = true;\r
+ $membersStats['flag'] = true;
+ }\r
+
+ return $membersStats;
+ }
+
+ function checkNewMembers()
+ {
+ // This function should not be called if it's not an integrated database
+ if ($this->config->option->member_db_integrated == false) {
+ return false;
+ }
+
+ // Check that referenced members also have an entry in the res_member table
+ $sql = "SELECT member_id, member_name
+ FROM members.member
+ WHERE member_id IN
+ (
+ SELECT member_id
+ FROM members.member_category
+ WHERE category_id IN
+ (
+ SELECT category_id
+ FROM members.category
+ WHERE accommodations
+ )
+ )
+ AND member_id NOT IN
+ (
+ SELECT id
+ FROM eventmgt.member
+ );
+ ";
+
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $members = $stmt->fetchAll(PDO::FETCH_ASSOC);
+
+ $r['reason'] = array();
+ $sql = array();
+ if ($members && count($members) > 0 ) {
+ foreach ($members as $memb ) {
+ // Add an entry in the res_member table
+ $sql[] = "
+ INSERT INTO eventmgt.member
+ (id, name)
+ VALUES
+ (".$memb['member_id'].", '".addslashes($memb['member_name'])."');
+ ";
+ }
+
+ try {
+ $this->dbh->beginTransaction();
+ foreach ($sql as $s) {
+ $this->dbh->exec($s);
+ }
+ $this->dbh->commit();
+ } catch (Exception $e) {
+ $this->dbh->rollBack();
+ $r['status'] = false;
+ $r['reason'][] = 'Unable to store new properties for unknown reason. ';
+ }
+
+ }
+
+ return $r;
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin misc class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/misc.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMisc.php';
+
+/**
+ * EventManagementAdminSold class
+ *
+ * Event Management and Reservations System - Admin Code - Misc
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Tickets
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/misc.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+class EventManagementAdminMisc extends EventManagementDataMisc
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin orders class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/orders.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataOrders.php';
+
+/**
+ * EventManagementAdminOrders class
+ *
+ * Event Management and Reservations System - Admin Code - Contacts ticket
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Tickets
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/orders.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+class EventManagementAdminOrders extends EventManagementDataOrders
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin performances class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/performances.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPerformances.php';
+
+/**
+ * EventManagementAdminContacts class
+ *
+ * Event Management and Reservations System - Admin Code - Performances Section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Performances
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/performances.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminPerformances extends EventManagementDataPerformances
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+ /**\r
+ * Get Performances Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getMemberPerformancesStats($memberID = false)\r
+ {\r
+ // Get member ID from session - if available get stats for member\r
+ if ($memberID || ($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {\r
+ return $this->getStats("member = $memberID AND active");\r
+ }\r
+ return 0;\r
+ }\r
+ function getPerformancesStats()\r
+ {\r
+ $performancesStats = array(\r
+ 'all' => $this->getStats(),\r
+ 'member' => $this->getMemberPerformancesStats()\r
+ );\r
+ \r
+ return $performancesStats;\r
+ }\r
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin promo tickets class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/promoTickets.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPromoTickets.php';
+
+/**
+ * EventManagementAdminPromoTickets class
+ *
+ * Event Management and Reservations System - Admin Code - Promotion Tickets section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Add-Ons
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/promoTickets.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminPromoTickets extends EventManagementDataPromoTickets
+{
+ /**
+ * Configuration information object
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $data
+ * @access public
+ */
+ public $data;
+
+ /**\r
+ * Get Promos Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getPromoTicketsStats()\r
+ {\r
+ return $this->getStats();\r
+ }\r
+
+ /**
+ * Process Promomotion Tickets and return list
+ *
+ * @return object containing array as sub-objects
+ */
+ function processPromoTicketsList($promoID)
+ {
+
+ // Check for promotion tickets update
+ if (isset($_REQUEST['Option']) && $_REQUEST['Option'] = 'update_promoTickets') {
+
+ // Process all promotion ticket requests
+ $sql = '';
+ if (isset($_REQUEST['type']) && count($_REQUEST['type']) > 0) {
+ while (list($k, $v) = each($_REQUEST['type'])) {
+
+ // If this is a new addition
+ if ($k == 0 && ($_REQUEST['ticket'][$k]-0) > 0 && ($_REQUEST['amount'][$k]-0) > 0) {
+ $sql .= "INSERT INTO eventmgt.promo_ticket
+ (promo, ticket, promo_type, amount, notes)
+ VALUES
+ (
+ $promoID,
+ ".($_REQUEST['ticket'][$k]-0).",
+ ".($_REQUEST['type'][$k]-0).",
+ ".($_REQUEST['amount'][$k]-0.0).",
+ '".addslashes($_REQUEST['notes'][$k])."'
+ );
+ ";
+
+ // If it's a delete request
+ } elseif (isset($_REQUEST['delete'][$k])) {
+ $sql .= "DELETE FROM eventmgt.promo_ticket WHERE id = $k;
+ ";
+
+ // Otherwise update it
+ } else {
+ $sql .= "UPDATE eventmgt.promo_ticket SET
+ amount = ".($_REQUEST['amount'][$k]-0.0).",
+ notes = '".addslashes($_REQUEST['notes'][$k])."'
+ WHERE id = $k;
+ ";
+ }
+
+ }
+ if ($sql != '') {
+ $this->dbh->exec($sql);
+ }
+
+ }
+
+ }
+
+ // Get updated list of promotion tickets
+ $promoTicketsList = $this->getPromoTicketsList($promoID);
+
+ return $promoTicketsList;
+ }
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin promos class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/promos.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPromos.php';
+
+/**
+ * EventManagementAdminPromos class
+ *
+ * Event Management and Reservations System - Admin Code - Promotionss section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Add-Ons
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/promos.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminPromos extends EventManagementDataPromos
+{
+ /**
+ * Configuration information object
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $data
+ * @access public
+ */
+ public $data;
+
+ /**\r
+ * Get Promos Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getPromosStats()\r
+ {\r
+ return $this->getStats();\r
+
+ return 0;\r
+ }\r
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin promosSold class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/promosSold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPromoSold.php';
+
+/**
+ * EventManagementAdminPromosSold class
+ *
+ * Event Management and Reservations System - Admin Code - Sold Ticket promos
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Tickets
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/promosSold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+class EventManagementAdminPromosSold extends EventManagementDataPromoSold
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin report class - Reservation Report
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/reservationReporteport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/Reports/dataReservationReport.php';
+
+/**
+ * EventManagementAdminEvents class
+ *
+ * Event Management and Reservations System - Admin Code - Reservation Report section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Events
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/events.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminReservationReport extends EventManagementDataReservationReport
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+ function __construct($dbh, $config)
+ {
+ parent::__construct($dbh, $config);
+ }
+
+ /**
+ * Get Report Request Form
+ *
+ * @return object containing array as sub-objects
+ */
+ function getForm()
+ {
+
+ $reportData = array(
+ 'status' => true,
+ 'reason' => array(),
+ 'form' => array()
+ );
+
+ $reportData['form'] = $this->newControls();
+
+ $this->addDebug("classes/reservationReport.inc", 'getForm()', print_r($reportData,1));
+
+ return $reportData;
+ }
+
+ /**
+ * Process Report
+ *
+ * @return object containing array as sub-objects
+ */
+ function getReport($setEvent = false, $setState = false)
+ {
+
+ $reportData = array(
+ 'status' => true,
+ 'output' => false,
+ 'reason' => array(),
+ 'report' => array()
+ );
+
+ // If no specific event and state rep is requested, then process input for selections
+ if ($setState == false) {
+
+ /*
+ * Try to process report form request
+ */
+ $request = $this->processInputData();
+ if (!$request['status']) {
+ $reportData['status'] = false;
+
+ if ($request['fieldFail']['event_name']) {
+ $reportData['reason'][] = 'An event was not selected';
+ }
+
+ if ($request['fieldFail']['output_type']) {
+ $reportData['reason'][] = 'An output type was not selected';
+ }
+
+ }
+ $r = $request['fieldData'];
+
+
+ /*
+ * Get report data
+ */
+ // Check for specified event
+ if ($setEvent) {
+ $event = $setEvent;
+ } else {
+ $event = $request['fieldData']['event_name']['in'];
+ }
+
+ $state = ($r['state_rep']['in'] != '0' ? $r['state_rep']['in'] : false);
+ $team = ($r['team_code']['in'] != '0' ? $r['team_code']['in'] : false);
+ $property = ($r['prop_name']['in'] != '0' ? $r['prop_name']['in'] : false);
+ $status = $r['status']['value'];
+ $where = '';
+
+ // Make Reservation Report Request Data available to template
+ $reportData['report']['event'] = false;
+ if ($event > 0) {
+
+ // Get Event data
+ $sql = "SELECT * FROM eventmgt.event WHERE id = $event;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['event'] = $eventData;
+
+ $where = "conv = $event";
+
+ }
+
+ // Check for State Rep filter
+ if ($state > 0) {
+ $where .= ($where!=''?' AND ':'')." T.state_rep = $state";
+ }
+
+ // If a team has been selected, filter by that.
+ if ($team) {
+ $where .= ($where!=''?' AND ':'')." T.team_id = $team";
+ }
+
+ // If a property has been selected, filter by that.
+ if ($property) {
+ $where .= ($where!=''?' AND ':'')." T.member = $property";
+ }
+
+ // Select by status
+ switch ($status) {
+ case 'pending':
+ $where .= ($where!=''?' AND ':'')." NOT T.confirmed AND NOT T.declined";
+ break;
+ case 'confirmed':
+ $where .= ($where!=''?' AND ':'')." T.confirmed AND NOT T.declined";
+ break;
+ case 'declined':
+ $where .= ($where!=''?' AND ':'')." T.declined";
+ break;
+ case 'all':
+ default:
+ break;
+ }
+
+ } else {
+
+ // There's been a specific request
+ $event = $setEvent;
+ $state = $setState;
+ $team = false;
+ $where = " T.state_rep = $state";
+
+ }
+
+
+ // If a State Rep is selected filter by that
+ if ($state) {
+
+ // Build query where clause to filter for any requested state
+ $where .= ($where!=''?' AND ':'')." T.team_id IN (SELECT team.id FROM eventmgt.team WHERE state = $state)";
+
+ // Also get state information
+ $sql = "SELECT * FROM eventmgt.state_rep WHERE id = $state;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $stateData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['state'] = $stateData;
+
+ }
+
+ // If a team has been selected, filter by that.
+ if ($team) {
+
+ $where .= ($where!=''?' AND ':'')." T.team_id = $team";
+
+ // Also get team information
+ $sql = "SELECT * FROM eventmgt.team WHERE id = $team;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $teamData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['team'] = $teamData;
+ }
+
+ // If a property has been selected, filter by that.
+ if ($property) {
+
+ $where .= ($where!=''?' AND ':'')." T.member = $property";
+
+ // Also get team information
+ $sql = "SELECT * FROM eventmgt.member WHERE id = $property;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $propertyData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['property'] = $propertyData;
+ }
+
+ // Get Event Reservations
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataReservations.php';
+ $Reservations = new EventManagementDataReservations($this->dbh, $this->config);
+ $reservationsList = $Reservations->getList($where);
+
+ // Build totals
+ $numb_res = 0;
+ $total_hotel = 0;
+ $total_taxes = 0;
+ $total_fees = 0;
+ $grand_total = 0;
+ if (is_array($reservationsList) && count($reservationsList) > 0) {
+ reset($reservationsList);
+ while (list($k, $v) = each($reservationsList)) {
+ $reservationsList[$k]['detail'] = unserialize($v['res_detail']);
+ $taxes = 0;
+ $fees = 0;
+ // Make sure we decoded the res_detail (there's been some problems with that)
+ if($reservationsList[$k]['detail']) {
+
+ $x = $reservationsList[$k]['detail']['propFees'];
+ foreach ($x as $f) {
+ $fees += $f['fee_calculated'];
+ }
+
+/* This doesn't seem to work. Need to revisit this when done with Kalamazoo Fee structure
+ $x = $reservationsList[$k]['detail']['propAccom'];
+ foreach ($x as $accom) {
+ // In case we get the values with leading "$"
+ if($accom['accom_fees_taxable'][0] == '$') {
+ $accom['accom_fees_taxable'] = substr($accom['accom_fees_non_taxable'],1);
+ }
+ if($accom['accom_fees_non_taxable'][0] == '$') {
+ $accom['accom_fees_non_taxable'] = substr($accom['accom_fees_non_taxable'],1);
+ }
+ // Now add the taxes and fees
+ $taxes += ($accom['accom_fees_taxable']-0);
+ $fees += ($accom['accom_fees_non_taxable']-0);
+
+ }
+*/
+
+ $numb_res++;
+ $total_taxes += $taxes;
+ $total_fees += $fees;
+ $reservationsList[$k]['taxes'] = $this->money($taxes);
+ $reservationsList[$k]['fees'] = $this->money($fees);
+ $reservationsList[$k]['taxes_and_fees'] = $this->money($taxes + $fees);
+ $total_hotel += $v['hotel_price_numb'];
+ $grand_total += $v['grand_total_numb'];
+ } else {
+ // We get here if the res_detail field doesn't unserialize or if there's nothing in the field.
+ // Had a problem with this originally due to corruption of the serialized data by using stripslashes(). Don't do that!
+ echo "System Error: Unable to decode reservation detail for reservation # ".$v['id']." - Please contact Gaslight Media.<br>";
+ }
+ }
+ }
+
+ $reportData['report']['reservations'] = $reservationsList;
+ $reportData['output'] = $r['output_type']['value'];
+
+ $reportData['report']['totals'] = array(
+ 'numb_reservations' => $numb_res,
+ 'hotel' => $this->money($total_hotel),
+ 'taxes' => $this->money($total_taxes),
+ 'fees' => $this->money($total_fees),
+ 'taxes_and_fees' => $this->money($total_taxes + $total_fees),
+ 'grand_total' => $this->money($grand_total)
+ );
+
+ $this->addDebug("classes/reservationReport.inc", 'getReport', print_r($reportData,1));
+
+ return $reportData;
+ }
+
+
+ /**
+ * Format a number as money
+ *
+ * @param $value Value to format
+ * @param $option Options that control output
+ * NOPREFIX stops the "$" prefix
+ *
+ * @return none
+ * @access public
+ */
+ public function money($value, $option = "")
+ {
+
+ if ($option == "NOPREFIX")
+ $prefix = "";
+ else
+ $prefix = "$";
+
+ // Do value sanity check
+
+ if (!is_numeric($value))
+ return ($prefix."0.00");
+
+ return ($prefix.number_format($value, 2, ".", ","));
+ }
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin reservations class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/reservations.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataReservations.php';
+
+/**
+ * EventManagementAdminReservations class
+ *
+ * Event Management and Reservations System - Admin Code - Reservations section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/reservations.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminReservations extends EventManagementDataReservations
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get Reservations Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getReservationsStats()
+ {
+ $resStats = array(
+ 'all' => $this->getStats(),
+ 'event' => 0,
+ 'member' => 0,
+ 'accom' => 0,
+ 'team' => 0
+ );
+
+ // Get stats for selected event
+ if (($eventID = $_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ $resStats['event'] = $this->getStats("conv = $eventID");
+ }
+
+ // Get stats for selected member
+ if (($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ $resStats['member'] = $this->getStats("member = $memberID");
+ }
+
+ // Get stats for selected accommodation
+ if (($accomID = $_SESSION[GLM_EVENT_SESSION]['Accom'])) {
+ $resStats['accom'] = $this->getStats("accommodation = $accomID");
+ }
+
+ // Get stats for selected team
+ if (($teamID = $_SESSION[GLM_EVENT_SESSION]['Team'])) {
+ $resStats['event'] = $this->getStats("team = $teamID");
+ }
+
+ // var_dump($resStats);
+ return $resStats;
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin report class - Room Block Report
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/roomBlockReporteport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/Reports/dataRoomBlockReport.php';
+
+/**
+ * EventManagementAdminEvents class
+ *
+ * Event Management and Reservations System - Admin Code - Reservation Report section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Events
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/events.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminRoomBlockReport extends EventManagementDataRoomBlockReport
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+ function __construct($dbh, $config)
+ {
+ parent::__construct($dbh, $config);
+ }
+
+ /**
+ * Get Report Request Form
+ *
+ * @return object containing array as sub-objects
+ */
+ function getForm()
+ {
+
+ $reportData = array(
+ 'status' => true,
+ 'reason' => array(),
+ 'form' => array()
+ );
+
+ $reportData['form'] = $this->newControls();
+
+ $this->addDebug("classes/roomBlockReport.inc", 'getForm()', print_r($reportData,1));
+
+ return $reportData;
+ }
+
+ /**
+ * Process Report
+ *
+ * @return object containing array as sub-objects
+ */
+ function getReport($setEvent = false, $setState = false)
+ {
+
+ $reportData = array(
+ 'status' => true,
+ 'reason' => array(),
+ 'report' => array()
+ );
+
+ // If no specific event and state rep is requested, then process input for selections
+ if ($setState == false) {
+
+ /*
+ * Try to process report form request
+ */
+ $request = $this->processInputData();
+ if (!$request['status']) {
+ $reportData['status'] = false;
+
+ if ($request['fieldFail']['event_name']) {
+ $reportData['reason'][] = 'An event was not selected';
+ }
+
+ if ($request['fieldFail']['output_type']) {
+ $reportData['reason'][] = 'An output type was not selected';
+ }
+
+ }
+
+ /*
+ * Get report data
+ */
+ $r = $request['fieldData'];
+ $event = $r['event_name']['in'];
+ $state = ($r['state_rep']['in'] != '0' ? $r['state_rep']['in'] : false);
+ $team = ($r['team_code']['in'] != '0' ? $r['team_code']['in'] : false);
+ $property = ($r['prop_name']['in'] != '0' ? $r['prop_name']['in'] : false);
+ $reportData['report']['doingProperties'] = $r['property_section']['value'];
+ $reportData['report']['doingAssigned'] = $r['assigned_section']['value'];
+ $reportData['report']['doingOptionAssigned'] = $r['option_assigned']['value'];
+ $reportData['output'] = $r['output_type']['value'];
+
+ } else {
+
+ // There's been a specific request
+ $event = $setEvent;
+ $state = $setState;
+
+ $team = false;
+ $property = false;
+ $reportData['report']['doingProperties'] = true;
+ $reportData['report']['doingAssigned'] = true;
+ $reportData['report']['doingOptionAssigned'] = false;
+ $reportData['output'] = 'html';
+
+ }
+
+ // If the request is valid - Produce the report
+ if ($reportData['status']) {
+
+ // Get Event data
+ $sql = "SELECT * FROM eventmgt.event WHERE id = $event;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['event'] = $eventData;
+
+ // Get State data
+ $reportData['report']['state'] = false;
+ if ($state) {
+ $sql = "SELECT * FROM eventmgt.state_rep WHERE id = $state;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $stateData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['state'] = $stateData;
+ }
+
+ // Get Team data
+ $reportData['report']['team'] = false;
+ if ($team) {
+ $sql = "SELECT * FROM eventmgt.team WHERE id = $team;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $teamData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['team'] = $teamData;
+ }
+
+ // Get Property data
+ $reportData['report']['property'] = false;
+ if ($property) {
+ $sql = "SELECT * FROM eventmgt.member WHERE id = $property;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $propertyData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['property'] = $propertyData;
+ }
+
+ // Get Event Room Blocks
+
+ require 'blocks.php';
+ $Blocks = new EventManagementAdminBlocks($this->dbh, $this->config);
+ // Get room block list sorted and in summary mode (see function for explanation)
+ $blocksList = $Blocks->getRoomBlocks($event, true, true, $state, $team, $property);
+ $reportData['report']['roomBlocks'] = $blocksList;
+
+ // Check for results
+ if (!is_array($blocksList) || count($blocksList) == 0) {
+ $reportData['status'] = false;
+ $reportData['reason'][] = 'No data was returned for this report.';
+ }
+
+ }
+
+ $this->addDebug("classes/roomBlockReport.inc", 'getReport()', print_r($reportData,1));
+
+ return $reportData;
+ }
+
+
+ /**
+ * Format a number as money
+ *
+ * @param $value Value to format
+ * @param $option Options that control output
+ * NOPREFIX stops the "$" prefix
+ *
+ * @return none
+ * @access public
+ */
+ public function money($value, $option = "")
+ {
+
+ if ($option == "NOPREFIX")
+ $prefix = "";
+ else
+ $prefix = "$";
+
+ // Do value sanity check
+
+ if (!is_numeric($value))
+ return ($prefix."0.00");
+
+ return ($prefix.number_format($value, 2, ".", ","));
+ }
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin report class - Room Request Report
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/roomRequestReporteport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/Reports/dataRoomRequestReport.php';
+
+/**
+ * EventManagementAdminEvents class
+ *
+ * Event Management and Reservations System - Admin Code - Room Request Report section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Events
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/events.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminRoomRequestReport extends EventManagementDataRoomRequestReport
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+ function __construct($dbh, $config)
+ {
+ parent::__construct($dbh, $config);
+ }
+
+ /**
+ * Get Report Request Form
+ *
+ * @return object containing array as sub-objects
+ */
+ function getForm()
+ {
+
+ $reportData = array(
+ 'status' => true,
+ 'reason' => array(),
+ 'form' => array()
+ );
+
+ $reportData['form'] = $this->newControls();
+
+ $this->addDebug("classes/roomRequestReport.inc", 'getForm()', print_r($reportData,1));
+
+ return $reportData;
+ }
+
+ /**
+ * Process Report
+ *
+ * @return object containing array as sub-objects
+ */
+ function getReport($setEvent = false)
+ {
+
+ $reportData = array(
+ 'status' => true,
+ 'output' => false,
+ 'reason' => array(),
+ 'report' => array()
+ );
+
+ /*
+ * Try to process report form request
+ */
+ $request = $this->processInputData();
+ if (!$request['status']) {
+ $reportData['status'] = false;
+
+ if ($request['fieldFail']['event_name']) {
+ $reportData['reason'][] = 'An event was not selected';
+ }
+
+ if ($request['fieldFail']['output_type']) {
+ $reportData['reason'][] = 'An output type was not selected';
+ }
+
+ }
+ $r = $request['fieldData'];
+
+ // Check for specified event
+ if ($setEvent) {
+ $event = $setEvent;
+ } else {
+ $event = $request['fieldData']['event_name']['in'];
+ }
+
+ /*
+ * Get report data
+ */
+ $state = ($r['state_rep']['in'] != '0' ? $r['state_rep']['in'] : false);
+ $team = ($r['team_code']['in'] != '0' ? $r['team_code']['in'] : false);
+ $property = ($r['prop_name']['in'] != '0' ? $r['prop_name']['in'] : false);
+ $reportData['report']['doingAvailable'] = false;
+ $reportData['report']['doingPending'] = $r['pending_select']['value'];
+ $reportData['report']['doingConfirmed'] = $r['confirmed_select']['value'];
+ $reportData['report']['doingDeclined'] = $r['declined_select']['value'];
+ $where = '';
+
+ // If an event is selected, get that data
+ $reportData['report']['event'] = false;
+ if ($event > 0) {
+
+ // Get Event data
+ $sql = "SELECT * FROM eventmgt.event WHERE id = $event;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $eventData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['event'] = $eventData;
+
+ $where = "conv = $event";
+
+ } else {
+ // No event selected, so show for all events that haven't ended yet
+ $where = ($where!=''?' AND ':'')."T.conv_end > 'now'";
+ }
+
+ // If a State Rep is selected filter by that
+ if ($state) {
+
+ // Build query where clause to filter for any requested state
+ $where .= ($where!=''?' AND ':'')." T.team_id IN (SELECT team.id FROM eventmgt.team WHERE state = $state)";
+
+ // Also get state information
+ $sql = "SELECT * FROM eventmgt.state_rep WHERE id = $state;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $stateData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['state'] = $stateData;
+
+ }
+
+ // If a team has been selected, filter by that.
+ if ($team) {
+
+ $where .= ($where!=''?' AND ':'')." T.team_id = $team";
+
+ // Also get team information
+ $sql = "SELECT * FROM eventmgt.team WHERE id = $team;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $teamData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['team'] = $teamData;
+
+ // Also check if availability requested.
+ $reportData['report']['doingAvailable'] = $r['available_select']['value'];
+ // If doingAvailable, override Pending, Confirmed, Declined
+ if ($reportData['report']['doingAvailable']) {
+ $reportData['report']['doingPending'] = true;
+ $reportData['report']['doingConfirmed'] = true;
+ $reportData['report']['doingDeclined'] = false;
+ }
+
+ }
+
+ // If a property has been selected, filter by that.
+ if ($property) {
+
+ $where .= ($where!=''?' AND ':'')." T.member = $property";
+
+ // Also get team information
+ $sql = "SELECT * FROM eventmgt.member WHERE id = $property;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $propertyData = $stmt->fetch(PDO::FETCH_ASSOC);
+ $reportData['report']['property'] = $propertyData;
+ }
+
+ // Get Event Reservations
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataReservations.php';
+ $Reservations = new EventManagementDataReservations($this->dbh, $this->config);
+ $reservationsList = $Reservations->getList($where);
+
+ // Build totals
+ $numb_res = 0;
+ $total_hotel = 0;
+ $total_taxes = 0;
+ $total_fees = 0;
+ $grand_total = 0;
+ $grand_total_rooms = 0;
+
+ // Reorganize reservations data as room report and collect totals
+ if (is_array($reservationsList) && count($reservationsList) > 0) {
+
+ reset($reservationsList);
+ $roomRequests = array();
+ while (list($k, $v) = each($reservationsList)) {
+
+ // Check if request matches filters
+ $show = false;
+ if ($reportData['report']['doingPending'] && !$v['confirmed']['value'] && !$v['declined']['value']) {
+ $show = true;
+ }
+ if ($reportData['report']['doingConfirmed'] && $v['confirmed']['value']) {
+ $show = true;
+ }
+ if ($reportData['report']['doingDeclined'] && $v['declined']['value']) {
+ $show = true;
+ }
+
+ if ($show) {
+
+ // Extract detail in case we need it
+ $v['detail'] = unserialize($v['res_detail']);
+
+ // Put fees into results - NEED TO FIX AND GET FROM DATABASE
+ $fees = 25;
+ $reportData['report']['reservations'][$k]['fees'] = '$25.00';
+
+ // Add to totals
+ $numb_res++;
+ $total_hotel += $v['hotel_price_numb'];
+ $total_taxes += $v['taxes_numb'];
+ $total_fees += $fees;
+ $grand_total += $v['grand_total_numb'];
+
+ // If property hasn't been created yet, do it now
+ // $propId = $v['detail']['propId'];
+ $propId = $v['member_id'];
+ if (!isset($roomRequests[$propId])) {
+ $roomRequests[$propId] = array(
+ 'propName' => $v['detail']['propName'],
+ 'propCity' => $v['detail']['propCity'],
+ 'propState' => $v['detail']['propState'],
+ 'propPhone' => $v['detail']['propPhone'],
+ 'propRoomsTotal' => 0,
+ 'accoms' => array()
+ );
+ }
+
+ // For each accommodation with this reservation
+ if ($v['detail']['propAccom']) {
+ foreach ($v['detail']['propAccom'] as $accom) {
+
+ // If accommodation hasn't been created yet, do it now
+ if (!isset($roomRequests[$propId]['accoms'][$accom['accomId']])) {
+ $roomRequests[$propId]['accoms'][$accom['accomId']] = array(
+ 'accomTitle' => $accom['accomTitle'],
+ 'accomRoomsTotal' => 0,
+ 'roomRequests' => array()
+ );
+
+ // Get assigned and available for this accommodation/team (from room_block_seg).
+ $sql = "SELECT B.block_name, S.id, S.allocated, S.available
+ FROM eventmgt.room_block B, eventmgt.room_block_seg S, eventmgt.team T
+ WHERE B.state_rep = ".$v['state_rep']."
+ AND T.name = '".$v['org']."'
+ AND B.team = T.id
+ AND S.block = B.id
+ AND S.accommodation = ".$accom['accomId'].";";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $blockData = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ $roomRequests[$propId]['accoms'][$accom['accomId']]['blockName'] = $blockData['block_name'];
+ $roomRequests[$propId]['accoms'][$accom['accomId']]['blockAssigned'] = $blockData['allocated'];
+ $roomRequests[$propId]['accoms'][$accom['accomId']]['blockAvailable'] = $blockData['available'];
+ $roomRequests[$propId]['accoms'][$accom['accomId']]['blockAvailableActual'] = $blockData['allocated'];;
+ }
+
+ // Add this accommodation request
+ $grand_total_rooms += $accom['accomQuant'];
+ $roomRequests[$propId]['propRoomsTotal'] += $accom['accomQuant'];
+ $roomRequests[$propId]['accoms'][$accom['accomId']]['accomRoomsTotal'] += $accom['accomQuant'];
+ $roomRequests[$propId]['accoms'][$accom['accomId']]['blockAvailableActual'] -= $accom['accomQuant'];
+ $roomRequests[$propId]['accoms'][$accom['accomId']]['roomRequests'][] = array(
+ 'org' => trim($v['org']),
+ 'fname' => $v['fname'],
+ 'lname' => $v['lname'],
+ 'city' => $v['city'],
+ 'state' => $v['state'],
+ 'phone' => $v['phone'],
+ 'dateRequested' => $v['date_entered']['date'],
+ 'confirmed' => $v['confirmed']['value'],
+ 'dateConfirmed' => $v['date_confirmed']['date'],
+ 'confirmedBy' => $v['conf_by'],
+ 'declined' => $v['declined']['value'],
+ 'accomQuant' => $accom['accomQuant'],
+ 'arriveDate' => $accom['accomArrive'],
+ 'departDate' => $accom['accomDepart'],
+ 'nights' => $accom['accom_nights']
+ );
+
+ } // each accom
+ } else {
+// echo "Problem retrieving reservation detail for: ".$v['lname'].", ".$v['fname'].", res # $propId<br>";
+ }
+ } // if show
+
+ } // each reservation
+
+//echo "<pre>".print_r($roomRequests,1)."</pre>";
+
+ }
+//echo "<pre>".print_r($reservationsList,1)."</pre>";
+
+ $reportData['report']['roomRequests'] = $roomRequests;
+ $reportData['output'] = $r['output_type']['value'];
+
+ $reportData['report']['totals'] = array(
+ 'numb_reservations' => $numb_res,
+ 'hotel' => $this->money($total_hotel),
+ 'taxes' => $this->money($total_taxes),
+ 'fees' => $this->money($total_fees),
+ 'grand_total' => $this->money($grand_total),
+ 'grand_total_rooms' => $grand_total_rooms
+ );
+
+ $this->addDebug("classes/roomRequestReport.inc", 'getReport()', print_r($reportData,1));
+
+ return $reportData;
+ }
+
+
+ /**
+ * Format a number as money
+ *
+ * @param $value Value to format
+ * @param $option Options that control output
+ * NOPREFIX stops the "$" prefix
+ *
+ * @return none
+ * @access public
+ */
+ public function money($value, $option = "")
+ {
+
+ if ($option == "NOPREFIX")
+ $prefix = "";
+ else
+ $prefix = "$";
+
+ // Do value sanity check
+
+ if (!is_numeric($value))
+ return ($prefix."0.00");
+
+ return ($prefix.number_format($value, 2, ".", ","));
+ }
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin rooms class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/rooms.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataRooms.php';
+
+/**
+ * EventManagementAdminRooms class
+ *
+ * Event Management and Reservations System - Admin Code - Accommodations section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Accommodations
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/rooms.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminRooms extends EventManagementDataRooms
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+ /**
+ * Get Rooms Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getRoomsStats()
+ {
+ return false;
+ }
+
+
+}
+
+?>
+
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin sections class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/sections.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataSections.php';
+
+/**
+ * EventManagementAdminContacts class
+ *
+ * Event Management and Reservations System - Admin Code - Contacts section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Sections
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/sections.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminSections extends EventManagementDataSections
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+ /**\r
+ * Get Sectionss Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getMemberSectionsStats($memberID = false)\r
+ {\r
+ // Get member ID from session - if available get stats for member\r
+ if ($memberID || ($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {\r
+ return $this->getStats("member = $memberID");\r
+ }\r
+ return 0;\r
+ }\r
+ function getSectionsStats()\r
+ {\r
+ $sectionsStats = array(\r
+ 'all' => $this->getStats(),\r
+ 'member' => $this->getMemberSectionsStats()\r
+ );\r
+\r
+ return $sectionsStats;\r
+ }\r
+\r
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin sold class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/sold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataSold.php';
+
+/**
+ * EventManagementAdminSold class
+ *
+ * Event Management and Reservations System - Admin Code - Sold Tickets
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Tickets
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/sold.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+class EventManagementAdminSold extends EventManagementDataSold
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin state rep class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/states.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataStates.php';
+
+/**
+ * EventManagementAdminStates class
+ *
+ * Event Management and Reservations System - Admin Code - States section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/states.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminStates extends EventManagementDataStates
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get State Reps Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getStatesStats()
+ {
+ $statesStats = array(
+ 'all' => $this->getStats(),
+ 'event' => 0
+ );
+
+ // Get event ID from session - if available get stats for teams listed with this event
+ if (($eventID = $_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ $statesStats['event'] = $this->getStats("
+ conv = $eventID
+ ");
+ }
+
+ return $statesStats;
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin team class
+ *
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/teams.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTeams.php';
+
+/**
+ * EventManagementAdminTeams class
+ *
+ * Event Management and Reservations System - Admin Code - Teams section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Members
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/teams.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminTeams extends EventManagementDataTeams
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+ public $data;
+
+ /**
+ * File/Image server adapter
+ * @var $isa
+ * @var $imageServer
+ * @access public
+ */
+
+
+ /**
+ * Get Members Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getTeamsStats()
+ {
+ $teamsStats = array(
+ 'all' => $this->getStats(),
+ 'member' => 0,
+ 'event' => 0
+ );
+
+ // Get member ID from session - if available get stats for teams with booking for this member
+ if (($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ $teamsStats['member'] = $this->getStats("
+ id in (
+ SELECT team
+ FROM eventmgt.team_property
+ WHERE property = $memberID
+ )
+ ");
+ }
+
+ // Get event ID from session - if available get stats for teams listed with this event
+ if (($eventID = $_SESSION[GLM_EVENT_SESSION]['Event'])) {
+ $teamsStats['event'] = $this->getStats("
+ conv = $eventID
+ ");
+ }
+
+ return $teamsStats;
+ }
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin ticket inventory class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/ticketInventory.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketInventory.php';
+
+/**
+ * EventManagementAdminContacts class
+ *
+ * Event Management and Reservations System - Admin Code - Contacts ticket
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Tickets
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/tickets.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+class EventManagementAdminTicketInventory extends EventManagementDataTicketInventory
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+
+ /**
+ * Get Tickets Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getTicketTicketInventoryStats($ticketID = false)
+ {
+ if ($ticketID == false) {
+ $ticketID = $_SESSION[GLM_EVENT_SESSION]['Ticket'];
+ }
+ if (($ticketID)) {
+ return $this->getStats("ticket = $ticketID");
+ }
+ return 0;
+ }
+ function getPerformanceTicketInventoryStats($performanceID = false)
+ {
+ if ($performanceID == false) {
+ $performanceID = $_SESSION[GLM_EVENT_SESSION]['Performance'];
+ }
+ if (($performanceID)) {
+ return $this->getStats("ticket in (SELECT id FROM eventmgt.ticket WHERE performance = $performanceID)");
+ }
+ return 0;
+ }
+ function getMemberTicketInventoryStats($memberID = false)
+ {
+
+ if ($memberID == false) {
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];
+ }
+ // Get member ID from session - if available get stats for member
+ if (($memberID)) {
+ return $this->getStats("member = $memberID");
+ }
+ return 0;
+ }
+ function getMemberTicketInventorySalesStats($memberID = false, $where = '')\r
+ {
+ if ($memberID == false) {\r
+ $memberID = $_SESSION[GLM_EVENT_SESSION]['Member'];\r
+ }\r
+ // Get member ID from session - if available get stats for member\r
+ if (($memberID)) {\r
+ $sql = "
+ SELECT
+ (
+ SELECT COALESCE(SUM(I.quant),0)
+ FROM eventmgt.ticket_inventory I
+ WHERE I.ticket IN ( SELECT id FROM eventmgt.ticket WHERE member = $memberID )
+ $where
+ ) AS totalQuant,
+ (
+ SELECT COALESCE(SUM(I.sold),0)
+ FROM eventmgt.ticket_inventory I
+ WHERE I.ticket IN ( SELECT id FROM eventmgt.ticket WHERE member = $memberID )
+ $where
+ ) AS totalSold,
+ (
+ SELECT COALESCE(SUM(I.sold * T.price),0)
+ FROM eventmgt.ticket_inventory I, eventmgt.ticket T
+ WHERE I.ticket IN ( SELECT id FROM eventmgt.ticket WHERE member = $memberID )
+ $where
+ AND T.id = I.ticket
+ ) AS totalPrice
+ ;";
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $s = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ return $s;\r
+ }\r
+ return 0;\r
+ }
+ function getTicketInventoryStats()
+ {
+ $ticketInventoryStats = array(
+ 'all' => $this->getStats(),
+ 'member' => $this->getMemberTicketInventoryStats(),
+ 'performance' => $this->getPerformanceTicketInventoryStats(),
+ 'ticket' => $this->getTicketTicketInventoryStats(),
+ );
+
+ return $ticketsInventoryStats;
+ }
+
+ /**\r
+ * Generate Default Ticket Inventory\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function generateDefaultTicketInventory($ticketID = false)
+ {
+
+ // If no ticket ID supplied, check session
+ if (!$ticketID) {
+ $ticketID = ($_SESSION[GLM_EVENT_SESSION]['Ticket'] - 0);
+ }
+
+ // If we have a ticket ID
+ if ($ticketID) {\r
+
+ // Get ticket information
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/tickets.php';
+ $Tickets = new EventManagementAdminTickets($this->dbh, $this->config);
+ $ticketDetail = $Tickets->getTicketDetail();
+ if (!$ticketDetail) {
+ return false;
+ }
+
+ // Get Performance Information
+ $_SESSION[GLM_EVENT_SESSION]['Performance'] = $ticketDetail['performance_id'];
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';
+ $Performances = new EventManagementAdminPerformances($this->dbh, $this->config);
+ $performanceDetail = $Performances->getPerformanceDetail();
+ if (!$performanceDetail) {
+ return false;
+ }
+
+ // Check for existing ticket inventory - Don't generate default inventory if there's some already there
+ $inventoryStats = $this->getTicketTicketInventoryStats();
+ if ($inventoryStats > 0) {
+ return false;
+ }
+
+ // Collect needed data
+ $ticket = $ticketDetail['id'];
+ $member = $ticketDetail['member'];
+ $quant = $ticketDetail['quant'];
+ $time = 'null';
+ if ($ticketDetail['time_specific']['value']) {
+ $time = "'".trim($ticketDetail['ticket_time']['time'])."'";
+ }
+ $start = $ticketDetail['start_date']['timestamp'];
+ $end = $ticketDetail['end_date']['timestamp'];\r
+
+ // If not date specific, create a single inventory item with a null date
+ if (!$ticketDetail['date_specific']['value']) {
+
+ $sql = "INSERT INTO eventmgt.ticket_inventory
+ (ticket, member, quant, available, ticket_date, ticket_time, sold, active)
+ values
+ ($ticket, $member, $quant, $quant, null, $time, 0, true);\n";
+
+ } else {
+
+ // For each day of the performance
+ $sql = '';
+ for ($date = $start; $date <= $end; $date = strtotime(date('m/d/Y', $date).' +1 day')) {
+ $dateText = date('m/d/Y', $date);
+
+ // Check day of week settings and create inventory accordingly
+ $dow = date('w', $date);
+ if ($ticketDetail['days_of_week']['bitmap'][$dow]['default']) {
+ $sql .= "INSERT INTO eventmgt.ticket_inventory
+ (ticket, member, quant, available, ticket_date, ticket_time, sold, active)
+ values
+ ($ticket, $member, $quant, $quant, '$dateText', $time, 0, true);\n";
+ }
+
+ }
+ }
+
+ if ($sql != '') {
+ $this->dbh->exec($sql);\r
+ }
+
+ return true;
+ }
+
+ return false;
+
+ }
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin tickets class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/tickets.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTickets.php';
+
+/**
+ * EventManagementAdminContacts class
+ *
+ * Event Management and Reservations System - Admin Code - Contacts ticket
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Tickets
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/tickets.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+class EventManagementAdminTickets extends EventManagementDataTickets
+{
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $dbh
+ * @access public
+ */
+ public $data;
+
+
+ /**
+ * Get Tickets Stats
+ *
+ * @return object containing array as sub-objects
+ */
+ function getMemberTicketsStats($memberID = false)
+ {
+ // Get member ID from session - if available get stats for member
+ if ($memberID || ($memberID = $_SESSION[GLM_EVENT_SESSION]['Member'])) {
+ return $this->getStats("member = $memberID");
+ }
+ return 0;
+ }
+ function getTicketsStats()
+ {
+ $ticketsStats = array(
+ 'all' => $this->getStats(),
+ 'member' => $this->getMemberTicketsStats()
+ );
+
+ return $ticketsStats;
+ }
+
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Admin voucherCoupons class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/voucherCoupons.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataVoucherCoupons.php';
+
+/**
+ * EventManagementAdminVoucherCoupons class
+ *
+ * Event Management and Reservations System - Admin Code - Voucher Coupons section
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Voucher Coupons
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/voucherCoupons.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+class EventManagementAdminVoucherCoupons extends EventManagementDataVoucherCoupons
+{
+ /**
+ * Configuration information object
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ public $dbh;
+ /**
+ * Data Definitions Object
+ * @var $data
+ * @access public
+ */
+ public $data;
+
+ /**\r
+ * Get Voucher Coupons Stats\r
+ *\r
+ * @return object containing array as sub-objects\r
+ */\r
+ function getVoucherCouponsStats()\r
+ {\r
+ return $this->getStats();\r
+
+ return 0;\r
+ }\r
+
+}
+
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Debug_start\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->page->debugStartupTime = date('m/d/Y H:i:s');\r
+$this->templateFile = 'Debug/index.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Debug_update\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+$this->page->debugUpdateTime = date('m/d/Y H:i:s');\r
+\r
+// If there's nothing to send, then don't\r
+if (!file_exists(DEBUG_DATA_FILENAME)) {\r
+ exit;\r
+}\r
+\r
+// Otherwise, send the current debug data\r
+$this->page->debugData = file_get_contents(DEBUG_DATA_FILENAME);\r
+unlink(DEBUG_DATA_FILENAME);\r
+\r
+$this->templateFile = 'Debug/index.html';\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: default\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: event.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Reset Session\r
+$this->startSession(true);\r
+\r
+$this->templateFile = "index.html";\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+\r
+define('PAYPAL_DEBUG', false); // Will not be able to redirect to PayPal if true\r
+\r
+// Load the PayPal class file\r
+require_once COMMON_APP_BASE.'CommonAbstracts/PaymentProcessors/V0/PayPal/PayPal.php';\r
+\r
+// Get cart data\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+$cart = $Support->checkCart();\r
+$this->addDebug("Shop/checkoutSubmit.inc", 'Array: $cart', print_r($cart['cartData'],1));\r
+\r
+// Get selected cart data\r
+$memberID = ($_REQUEST['memberID']-0);\r
+$cartEntry = $cart['cartData'][$memberID];\r
+\r
+// If we can't find the correct cart entry\r
+if (!is_array($cartEntry)) {\r
+\r
+ $this->templateFile = "Shop/PayPalFail.html";\r
+\r
+ // We have the correct cart entry\r
+} else {\r
+\r
+ // Prepare for purchase authorization request with PayPal REST API\r
+ $account = array(\r
+ 'clientID' => $cartEntry['paypal_client_id'],\r
+ 'secret' => $cartEntry['paypal_secret'],\r
+ 'test' => $cartEntry['paypal_mode']['value'],\r
+ 'returnURL' => $this->page->baseURL."?Action=Shop_PayPalApproved&memberID=$memberID",\r
+ 'cancelURL' => $this->page->baseURL."?Action=Shop_PayPalCanceled&memberID=$memberID",\r
+ );\r
+ $payment = array(\r
+ 'name' => $cartEntry['name'],\r
+ 'charge' => $cartEntry['totalPrice_numb'],\r
+ 'invoice' => '',\r
+ 'description' => $config->term->event->cap.' Tickets',\r
+ 'items' => array(\r
+ )\r
+ );\r
+ $contact = array();\r
+\r
+ // Build items array from cart data\r
+ $items = array();\r
+ // For each date of tickets\r
+ foreach ($cartEntry['dates'] as $d) {\r
+\r
+ // For each Performance\r
+ foreach ($d['performances'] as $p) {\r
+\r
+ // For each Section\r
+ foreach ($p['sections'] as $s) {\r
+\r
+ // For each ticket\r
+ foreach ($s['tickets'] as $t) {\r
+\r
+ // Add this cart selection\r
+ $payment['items'][] = array(\r
+ 'quantity' => $t['selected'],\r
+ 'name' => $p['name'].", ".$d['date'].", ".$s['name'].", ".$t['name'],\r
+ 'price' => $t['price_numb'],\r
+ 'sku' => $t['invID']\r
+ );\r
+\r
+ }\r
+\r
+ }\r
+\r
+ }\r
+\r
+ }\r
+\r
+\r
+ // Create the PayPal object (note no previous access object)\r
+ $PayPal = new PayPalPaymentGateway($account, false, false);\r
+\r
+ // Was there an error?\r
+ if (!$PayPal->status) {\r
+ echo "Received an error: ".$PayPal->error;\r
+ exit;\r
+ }\r
+\r
+ // Try to enter Payment\r
+ $PayPal->processPayment($payment, $contact);\r
+\r
+ // Was there an error?\r
+ if (!$PayPal->status) {\r
+ echo "Received an error: ".$PayPal->error;\r
+ exit;\r
+ }\r
+\r
+ // Store access information\r
+ $_SESSION[GLM_EVENT_MGT_FRONT]['PayPal'][$memberID] = array(\r
+ 'account' => $account,\r
+ 'access' => $PayPal->access,\r
+ 'trans' => $PayPal->trans,\r
+ 'cart' => $cartEntry\r
+ );\r
+\r
+ // Show user link to PayPal for them to approve payment\r
+ // Note that uses a target to create a new window/tab\r
+ // Use browser redirect 302 to send user to PayPal.\r
+ // This is proper way to do so according to the API documentation.\r
+ header('Location: '.$PayPal->trans->urls->approval_url->href);\r
+ exit;\r
+\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+define('PAYPAL_DEBUG', false); // Will not be able to redirect to PayPal if true\r
+\r
+// Load the PayPal class file\r
+require_once COMMON_APP_BASE.'CommonAbstracts/PaymentProcessors/V0/PayPal/PayPal.php';\r
+\r
+// Get cart data\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+$cart = $Support->checkCart();\r
+$this->addDebug("Shop/checkoutSubmit.inc", 'Array: $cart', print_r($cart['cartData'],1));\r
+\r
+// Get selected cart data\r
+$memberID = ($_REQUEST['memberID']-0);\r
+$cartEntry = $cart['cartData'][$memberID];\r
+\r
+// If we can't find the correct cart entry\r
+if (!is_array($cartEntry)) {\r
+\r
+ $this->templateFile = "Shop/PayPalFail.html";\r
+\r
+// We have the correct cart entry\r
+} else {\r
+\r
+ // Prepare to execute payment with PayPal REST API\r
+ $account = array(\r
+ 'clientID' => $cartEntry['gateway_par1'],\r
+ 'secret' => $cartEntry['gateway_par2'],\r
+ 'test' => $cartEntry['gateway_par3']['value'],\r
+ 'returnURL' => $this->page->baseURL."?Action=Shop_PayPalApproved&memberID=$memberID",\r
+ 'cancelURL' => $this->page->baseURL."?Action=Shop_PayPalCanceled&memberID=$memberID",\r
+ );\r
+\r
+ // Save Payer ID\r
+ $_SESSION[GLM_EVENT_MGT_FRONT]['PayPal'][$memberID]['payerID'] = $_REQUEST['PayerID']; // NEED TO FILTER THIS FOR PRODUCTION\r
+\r
+ // Create PayPal object with existing access object from the session\r
+ $PayPal = new PayPalPaymentGateway(\r
+ $_SESSION[GLM_EVENT_MGT_FRONT]['PayPal'][$memberID]['account'],\r
+ $_SESSION[GLM_EVENT_MGT_FRONT]['PayPal'][$memberID]['access'],\r
+ $_SESSION[GLM_EVENT_MGT_FRONT]['PayPal'][$memberID]['trans']\r
+ );\r
+\r
+ // Execute the PayPal payment\r
+ $payerID = $_REQUEST['PayerID'];\r
+ $r = $PayPal->executePayment($payerID);\r
+\r
+ // Check if payment executed correctly\r
+ if ($r['status']) {\r
+\r
+ $payment = array(\r
+ 'id' => $memberID,\r
+ 'status' => true,\r
+ 'type' => 'pp',\r
+ 'statusText' => $r['statusText'],\r
+ 'authCode' => '',\r
+ 'description' => $r['description'],\r
+ 'newApproval' => false,\r
+ 'spec_req' => '',\r
+ 'approved' => true,\r
+ 'cctype' => array('name' => 'PayPal'),\r
+ 'ccname' => array('value' => $r['payerName']),\r
+ 'ccexp' => array('value' => ''),\r
+ 'ccnumb' => '',\r
+ 'orderID' => ''\r
+ );\r
+var_dump($payment);\r
+\r
+ // Store order\r
+ $cart = $_SESSION[GLM_EVENT_MGT_FRONT]['PayPal'][$memberID]['cart'];\r
+ $contact = $_SESSION[GLM_EVENT_MGT_FRONT]['ContactInput'];\r
+\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/checkoutSupport.php';\r
+ $CheckoutSupport = new EventManagementFrontCheckoutSupport($this->dbh, $this->config, $Support);\r
+var_dump($contact);\r
+ $orderID = $CheckoutSupport->storePurchase($cart, $contact, $payment);\r
+echo "Order ID = $orderID<P>";\r
+\r
+ // Need to send E-Mail to customer\r
+\r
+\r
+\r
+ $this->templateFile = "Shop/PayPalApproved.html";\r
+\r
+\r
+ // Otherwise the payment didn't execute correctly\r
+ } else {\r
+\r
+ $this->templateFile = "Shop/PayPalFail.html";\r
+\r
+ }\r
+\r
+}\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Shop_cart\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: cart.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// If this is a home page ticket selection, save default member\r
+if (isset($_REQUEST['locationSelect'])) {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['Member'] = ($_REQUEST['locationSelect']-0);\r
+}\r
+\r
+// Load the front-end support class\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+\r
+// If cart sticky is enables\r
+if ($this->config->option->ticket_selection->show_cart_sticky_items) {\r
+\r
+ // Get list of cart sticky items - Items that always display in the cart even if there's no quant selected\r
+ $cartSticky = $Support->getCartStickyInventory();\r
+\r
+ // Default all current cart entries to sticky = false (will be updated if they're sticky)\r
+ while (list($k, $v) = each($cartSticky)) {\r
+ $cartSticky[$k]['sticky'] = false;\r
+ }\r
+\r
+}\r
+\r
+// Check if there's any promo codes\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPromos.php';\r
+$Promos = new EventManagementDataPromos($this->dbh, $this->config);\r
+$promoList = $Promos->getList();\r
+$this->page->havePromoCodes = false;\r
+if (is_array($promoList) && count($promoList) > 0) {\r
+ $this->page->havePromoCodes = true;\r
+}\r
+\r
+// Check for Promo Code Selection\r
+if (isset($_REQUEST['cart']) && $_REQUEST['cart'] == 'promo_code') {\r
+ $promo_code = filter_input(INPUT_GET, 'promo_code', FILTER_SANITIZE_STRING);\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['PromoCode'] = $promo_code;\r
+\r
+} elseif (isset($_SESSION['GLM_EVENT_MGT_FRONT']['PromoCode'])) {\r
+ $promo_code = $_SESSION['GLM_EVENT_MGT_FRONT']['PromoCode'];\r
+}\r
+\r
+// Check if we're getting a selection of assignment to a member/location\r
+if ($_REQUEST['cart'] == 'update_assignment') {\r
+\r
+ // If we don't have an assignment session array, start one\r
+ if (!isset($_SESSION['GLM_EVENT_MGT_FRONT']['Assignment'])) {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['Assignment'] = array();\r
+ }\r
+\r
+ // Add/update this assignment\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['Assignment'][($_REQUEST['member_assigned']-0)] = ($_REQUEST['assigned_to']-0);\r
+\r
+ // Also check if we need to handle entrance assignment\r
+ unset($_SESSION['GLM_EVENT_MGT_FRONT']['AssignmentEntrance'][($_REQUEST['member_assigned']-0)]);\r
+ if ($this->config->option->ticket_selection->select_entrance_on_consignment &&\r
+ isset($_REQUEST['entrance_assigned']) && ($_REQUEST['entrance_assigned']-0) > 0 ) {\r
+ // Add/update entrance assignment\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['AssignmentEntrance'][($_REQUEST['member_assigned']-0)] = ($_REQUEST['entrance_assigned']-0);\r
+ }\r
+\r
+}\r
+\r
+// Check if we're getting selection of a likely departure date\r
+if ($_REQUEST['cart'] == 'update_likelyDate') {\r
+\r
+ // If we don't have a likely date array, start one\r
+ if (!isset($_SESSION['GLM_EVENT_MGT_FRONT']['LikelyDate'])) {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['LikelyDate'] = array();\r
+ }\r
+\r
+ // Validate likely date and store if it's sane\r
+ $likelyDate = date('m/d/Y', strtotime($_REQUEST['likely_date']));\r
+ if ($likelyDate != '12/31/1969') {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['LikelyDate'][($_REQUEST['member']-0)] = $likelyDate;\r
+ } else {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['LikelyDate'][($_REQUEST['member']-0)] = '';\r
+ }\r
+\r
+}\r
+\r
+// If cart sticky items is enabled and we have any cart sticky items\r
+$haveCartStickyItems = false;\r
+if ($this->config->option->ticket_selection->show_cart_sticky_items && $cartSticky) {\r
+\r
+ $haveCartStickyItems = true;\r
+\r
+ $this->addDebug("Shop/cart.inc", 'Array: $cartSticky', print_r($cartSticky,1));\r
+\r
+ // Make sure cart sticky inventory is in cart\r
+ foreach ($cartSticky as $c) {\r
+\r
+ // Check if there's no cart entry for this cart sticky item\r
+ if (!isset($_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart'][$c['id']])) {\r
+\r
+ // Add to cart\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart'][$c['id']] = array(\r
+ 'invenID' => $c['id'],\r
+ 'member' => $c['member'],\r
+ 'assigned' => false,\r
+ 'quant' => 0\r
+ );\r
+ }\r
+\r
+ // Mark entry as Sticky\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart'][$c['id']]['sticky'] = true;\r
+\r
+ }\r
+\r
+}\r
+\r
+// Check if there's been anything added to the cart and get cart contents\r
+$cart = $Support->checkCart();\r
+\r
+// If we're already locked into checkout, go there\r
+if ($cart['forceCheckoutPhase']) {\r
+ $this->reason[] = 'You have partially paid for your purchases. We have returned you to checkout to complete your purchase.';\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
+ return;\r
+}\r
+\r
+// If there's no cart contents, make sure there's no cart array.\r
+if (!$cart['cartHasContents']) {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart'] = false;\r
+}\r
+\r
+// If we're doing cart promotions, get any performances with promote_on_cart set\r
+if ($this->config->option->cart_promotions) {\r
+ $cartPromotions = $Support->getCartPromotions();\r
+ if ($cartPromotions) {\r
+ $this->page->cartPromotions = $this->bindArrayToObject($cartPromotions);\r
+ }\r
+}\r
+\r
+//var_dump($this->page->cartPromotions);\r
+\r
+// Check if we received a vertical scroll position\r
+$vertScroll = 0;\r
+if ($_REQUEST['vertScroll']) {\r
+ $vertScroll = ($_REQUEST['vertScroll']-0);\r
+}\r
+$this->page->vertScroll = $vertScroll;\r
+\r
+// Otherwise we're OK to continue showing the cart\r
+$this->page->promoCode = $promo_code;\r
+$this->page->blockCheckout = $cart['blockCheckout'];\r
+$this->page->blockCheckoutNonAssignment = $cart['blockCheckoutNonAssignment'];\r
+$this->page->haveCartStickyItems = $haveCartStickyItems;\r
+$this->page->cartHasContents = $cart['cartHasContents'];\r
+$this->page->cartHasOneVenueOnly = $cart['cartHasOneVenueOnly'];\r
+$this->page->cart = $this->bindArrayToObject($cart['cartDataReorganized']); // Use reorganized cart\r
+$this->page->totals = $this->bindArrayToObject($cart['totals']);\r
+$this->reason = array_merge($this->reason, $cart['reason']);\r
+\r
+if ($cart['blockCheckoutNonAssignment']) {\r
+ $this->templateFile = "Shop/cart.html";\r
+} else {\r
+ $this->templateFile = "Shop/additionalInfo.html";\r
+}\r
+\r
+$this->addDebug("Shop/cart.inc", 'Array: $totals', print_r($cart['totals'],1));\r
+$this->addDebug("Shop/cart.inc", 'Array: $cart', print_r($rCart,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Shop_cart\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: cart.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// If this is a home page ticket selection, save default member\r
+if (isset($_REQUEST['locationSelect'])) {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['Member'] = ($_REQUEST['locationSelect']-0);\r
+}\r
+\r
+// Load the front-end support class\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+\r
+// If cart sticky is enables\r
+if ($this->config->option->ticket_selection->show_cart_sticky_items) {\r
+\r
+ // Get list of cart sticky items - Items that always display in the cart even if there's no quant selected\r
+ $cartSticky = $Support->getCartStickyInventory();\r
+\r
+ // Default all current cart entries to sticky = false (will be updated if they're sticky)\r
+ while (list($k, $v) = each($cartSticky)) {\r
+ $cartSticky[$k]['sticky'] = false;\r
+ }\r
+\r
+}\r
+\r
+// Check if there's any promo codes\r
+require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPromos.php';\r
+$Promos = new EventManagementDataPromos($this->dbh, $this->config);\r
+$promoList = $Promos->getList();\r
+$this->page->havePromoCodes = false;\r
+if (is_array($promoList) && count($promoList) > 0) {\r
+ $this->page->havePromoCodes = true;\r
+}\r
+\r
+// Check for Promo Code Selection\r
+if (isset($_REQUEST['cart']) && $_REQUEST['cart'] == 'promo_code') {\r
+ $promo_code = filter_input(INPUT_GET, 'promo_code', FILTER_SANITIZE_STRING);\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['PromoCode'] = $promo_code;\r
+} elseif (isset($_SESSION['GLM_EVENT_MGT_FRONT']['PromoCode'])) {\r
+ $promo_code = $_SESSION['GLM_EVENT_MGT_FRONT']['PromoCode'];\r
+}\r
+\r
+// Check if we're getting a selection of assignment to a member/location\r
+if ($_REQUEST['cart'] == 'update_assignment') {\r
+\r
+ // If we don't have an assignment session array, start one\r
+ if (!isset($_SESSION['GLM_EVENT_MGT_FRONT']['Assignment'])) {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['Assignment'] = array();\r
+ }\r
+\r
+ // Add/update this assignment\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['Assignment'][($_REQUEST['member_assigned']-0)] = ($_REQUEST['assigned_to']-0);\r
+\r
+ // Also check if we need to handle entrance assignment\r
+ unset($_SESSION['GLM_EVENT_MGT_FRONT']['AssignmentEntrance'][($_REQUEST['member_assigned']-0)]);\r
+ if ($this->config->option->ticket_selection->select_entrance_on_consignment &&\r
+ isset($_REQUEST['entrance_assigned']) && ($_REQUEST['entrance_assigned']-0) > 0 ) {\r
+ // Add/update entrance assignment\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['AssignmentEntrance'][($_REQUEST['member_assigned']-0)] = ($_REQUEST['entrance_assigned']-0);\r
+ }\r
+\r
+}\r
+\r
+// Check if we're getting selection of a likely departure date\r
+if ($_REQUEST['cart'] == 'update_likelyDate') {\r
+\r
+ // If we don't have a likely date array, start one\r
+ if (!isset($_SESSION['GLM_EVENT_MGT_FRONT']['LikelyDate'])) {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['LikelyDate'] = array();\r
+ }\r
+\r
+ // Validate likely date and store if it's sane\r
+ $likelyDate = date('m/d/Y', strtotime($_REQUEST['likely_date']));\r
+ if ($likelyDate != '12/31/1969') {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['LikelyDate'][($_REQUEST['member']-0)] = $likelyDate;\r
+ } else {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['LikelyDate'][($_REQUEST['member']-0)] = '';\r
+ }\r
+\r
+}\r
+\r
+// If cart sticky items is enabled and we have any cart sticky items\r
+$haveCartStickyItems = false;\r
+if ($this->config->option->ticket_selection->show_cart_sticky_items && $cartSticky) {\r
+\r
+ $haveCartStickyItems = true;\r
+\r
+ $this->addDebug("Shop/cart.inc", 'Array: $cartSticky', print_r($cartSticky,1));\r
+\r
+ // Make sure cart sticky inventory is in cart\r
+ foreach ($cartSticky as $c) {\r
+\r
+ // Check if there's no cart entry for this cart sticky item\r
+ if (!isset($_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart'][$c['id']])) {\r
+\r
+ // Add to cart\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart'][$c['id']] = array(\r
+ 'invenID' => $c['id'],\r
+ 'member' => $c['member'],\r
+ 'assigned' => false,\r
+ 'quant' => 0\r
+ );\r
+ }\r
+\r
+ // Mark entry as Sticky\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart'][$c['id']]['sticky'] = true;\r
+\r
+ }\r
+\r
+}\r
+\r
+// Check if there's been anything added to the cart and get cart contents\r
+$cart = $Support->checkCart();\r
+;\r
+// If we're already locked into checkout, go there\r
+if ($cart['forceCheckoutPhase']) {\r
+ $this->reason[] = 'You have partially paid for your purchases. We have returned you to checkout to complete your purchase.';\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
+ return;\r
+}\r
+\r
+// If there's no cart contents, make sure there's no cart array.\r
+if (!$cart['cartHasContents'] || count($cart['cartDataReorganized']) == 0) {\r
+ $_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart'] = false;\r
+\r
+ $cart['cartHasContents'] = false;\r
+// Otherwise check that we're not mixing no-payment location with other locations\r
+$this->page->blockCheckoutMixedPayment = false;\r
+} else {\r
+\r
+ $paid = false;\r
+ $nonpaid = false;\r
+\r
+ // For each venu in the cart\r
+ foreach ($cart['cartDataReorganized'] as $c) {\r
+\r
+ // Check for mix of credit card and manual payment\r
+ if ($c['payment_gateway']['value'] == 3) {\r
+ $nonpaid = true;\r
+ } else {\r
+ $paid = true;\r
+ }\r
+\r
+ }\r
+\r
+ // If there's a mix, warn the user and don't permit checkout.\r
+ if ($paid && $nonpaid) {\r
+ $this->reason[] = 'Mixing of credit card purchases and manual payment is not supported at this time.';\r
+ $this->page->blockCheckoutMixedPayment = true;\r
+ }\r
+\r
+}\r
+\r
+\r
+// If we're doing cart promotions, get any performances with promote_on_cart set\r
+if ($this->config->option->cart_promotions) {\r
+ $cartPromotions = $Support->getCartPromotions();\r
+ if ($cartPromotions) {\r
+ $this->page->cartPromotions = $this->bindArrayToObject($cartPromotions);\r
+ }\r
+}\r
+\r
+// echo "<pre>".print_r($cart,1)."</pre>";\r
+// var_dump($this->page->cartPromotions);\r
+\r
+// Check if we received a vertical scroll position\r
+$vertScroll = 0;\r
+if ($_REQUEST['vertScroll']) {\r
+ $vertScroll = ($_REQUEST['vertScroll']-0);\r
+}\r
+$this->page->vertScroll = $vertScroll;\r
+\r
+// Otherwise we're OK to continue showing the cart\r
+$this->page->promoCode = $promo_code;\r
+$this->page->blockCheckout = $cart['blockCheckout'];\r
+$this->page->blockCheckoutNonAssignment = $cart['blockCheckoutNonAssignment'];\r
+$this->page->doingAdditionalInfo = $cart['doingAdditionalInfo'];\r
+$this->page->haveCartStickyItems = $haveCartStickyItems;\r
+$this->page->cartHasContents = $cart['cartHasContents'];\r
+$this->page->cartHasOneVenueOnly = $cart['cartHasOneVenueOnly'];\r
+$this->page->cart = $this->bindArrayToObject($cart['cartDataReorganized']); // Use reorganized cart\r
+$this->page->totals = $this->bindArrayToObject($cart['totals']);\r
+$this->reason = array_merge($this->reason, $cart['reason']);\r
+$this->page->reason = $this->bindArrayToObject($this->reason);\r
+\r
+$this->templateFile = "Shop/cart.html";\r
+\r
+$this->addDebug("Shop/cart.inc", 'Array: $totals', print_r($cart['totals'],1));\r
+$this->addDebug("Shop/cart.inc", 'Array: $cart', print_r($rCart,1));\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Shop_checkout\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Front\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: checkout.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Select the front-end support class\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/checkoutSupport.php';\r
+$CheckoutSupport = new EventManagementFrontCheckoutSupport($this->dbh, $this->config, $Support);\r
+\r
+// Clear any 0 quantity items from cart - This purges any 0 quant sticky items before trying to checkout\r
+if (is_array($_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart']) && count($_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart']) > 0) {\r
+ foreach ($_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart'] as $c) {\r
+ if ($c['quant'] == 0) {\r
+ unset($_SESSION['GLM_EVENT_MGT_FRONT']['TicketCart'][$c['invenID']]);\r
+ }\r
+ }\r
+}\r
+\r
+// Check if we're coming back from checkoutSubmit.inc and already have cart data\r
+if (isset($checkoutCart)) {\r
+ $cart = $checkoutCart;\r
+} else {\r
+ // Check if there's been anything added to the cart and get cart contents (say we're doing checkout)\r
+ $cart = $Support->checkCart(true);\r
+}\r
+\r
+if (!$cart['cartHasContents']) {\r
+ $this->reason[] = 'Your cart is currently empty.';\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/cart.inc';\r
+ return;\r
+}\r
+$this->page->cartHasContents = true;\r
+\r
+// Check if there been partial payment and we're in a forced checkout phase - no cart changes or additions\r
+$this->page->forceCheckoutPhase = $cart['forceCheckoutPhase'];\r
+\r
+// Get a clear input value array and place payment data under each venue in $cart\r
+if (!isset($checkoutReturnFlag) || $checkoutReturnFlag == false ) {\r
+ $formData = $CheckoutSupport->checkoutInit($cart['cartData']);\r
+}\r
+\r
+// Is there central payment?\r
+if ($formData['centralPayment']) {\r
+\r
+ // Just a shortcut to the member data\r
+ $cpMemb = $formData['centralPayment']['membData'];\r
+\r
+ $cp = array(\r
+ 'havePayPal' => false,\r
+ 'haveCreditCards' => false,\r
+ 'havePaymentMethod' => false,\r
+ 'haveMultiplePaymentMethods' => false,\r
+ 'paymentForm' => $formData['payment']\r
+ );\r
+\r
+ // Check credit card payment setup for venu\r
+ if (\r
+ $cpMemb['payment_gateway']['value'] > 0 // Have processor selected\r
+ && count($cpMemb['cards_accepted']['names']) > 0 // Have credit cards selected\r
+ ) {\r
+\r
+ // Check for any needed gateway authentication information\r
+ $haveAuth = false;\r
+ switch($cpMemb['payment_gateway']['value']) {\r
+ case $this->config->ccard_processor_numb->authorize_net:\r
+ if ($cpMemb['gateway_par1'] != '' && $cpMemb['gateway_par2'] != '') {\r
+ $haveAuth = true;\r
+ }\r
+ break;\r
+ case $this->config->ccard_processor_numb->merchant_solutions:\r
+ if ($cpMemb['gateway_par1'] != '' && $cpMemb['gateway_par2'] != '') {\r
+ $haveAuth = true;\r
+ }\r
+ break;\r
+ case $this->config->ccard_processor_numb->test:\r
+ $haveAuth = true;\r
+ break;\r
+ }\r
+\r
+ if ($haveAuth) {\r
+\r
+ // Have good credit card gateway, have cards, have authentication\r
+ $cp['haveCreditCards'] = true;\r
+ $cp['havePaymentMethod'] = true;\r
+ }\r
+ }\r
+\r
+ // Check if we have PayPal authentication data\r
+ if (\r
+ $cpMemb['paypal']['value'] &&\r
+ $cpMemb['paypal_client_id'] != '' &&\r
+ $cpMemb['paypal_secret'] != ''\r
+ ){\r
+ $cp['havePayPal'] = true;\r
+ $cp['havePaymentMethod'] = true;\r
+\r
+ }\r
+\r
+ // Check if we have multiple payment methods for this member\r
+ if ($cp['haveCreditCards'] && $cp['havePayPal']) {\r
+ $cp['haveMultiplePaymentMethods'] = true;\r
+ }\r
+\r
+ $formData['centralPayment'] = array_merge($formData['centralPayment'], $cp);\r
+\r
+} else {\r
+\r
+ // Not doing Central Payment\r
+\r
+ if (is_array($formData['payment'])) {\r
+\r
+ foreach ($formData['payment'] as $p) {\r
+\r
+ // set shortcut to cart member/venue\r
+ $cm = &$cart['cartDataReorganized'][$p['id']];\r
+\r
+ // Add payment information\r
+ $cm['paymentForm'] = $p;\r
+\r
+ // Also check for valid payment methods\r
+ $cm['havePayPal'] = false;\r
+ $cm['haveCreditCards'] = false;\r
+ $cm['havePaymentMethod'] = false;\r
+ $cm['haveMultiplePaymentMethods'] = false;\r
+ if (\r
+ $cm['payment_gateway']['value'] > 0 // Have processor selected\r
+ && count($cm['cards_accepted']['names']) > 0 // Have credit cards selected\r
+ ) {\r
+ // Check for any needed gateway authentication information\r
+ $haveAuth = false;\r
+ switch($cm['payment_gateway']['value']) {\r
+ case $this->config->ccard_processor_numb->authorize_net:\r
+ if ($cm['gateway_par1'] != '' && $cm['gateway_par2'] != '') {\r
+ $haveAuth = true;\r
+ }\r
+ break;\r
+ case $this->config->ccard_processor_numb->merchant_solutions:\r
+ if ($cm['gateway_par1'] != '' && $cm['gateway_par2'] != '') {\r
+ $haveAuth = true;\r
+ }\r
+ break;\r
+ case $this->config->ccard_processor_numb->test:\r
+ $haveAuth = true;\r
+ break;\r
+ }\r
+\r
+ if ($haveAuth) {\r
+ // Have good credit card gateway, have cards, have authentication\r
+ $cm['haveCreditCards'] = true;\r
+ $cm['havePaymentMethod'] = true;\r
+ }\r
+ }\r
+\r
+ // Check if we have PayPal authentication data\r
+ if (\r
+ $cm['paypal']['value'] &&\r
+ $cm['paypal_client_id'] != '' &&\r
+ $cm['paypal_secret'] != ''\r
+ ) {\r
+ $cm['havePayPal'] = true;\r
+ $cm['havePaymentMethod'] = true;\r
+\r
+ }\r
+\r
+ // Check if we have multiple payment methods for this member\r
+ if ($cm['haveCreditCards'] && $cm['havePayPal']) {\r
+ $cm['haveMultiplePaymentMethods'] = true;\r
+ }\r
+\r
+ }\r
+ }\r
+}\r
+\r
+// If this an admin user\r
+$noPaymentReasons = false;\r
+if ($this->page->adminUser) {\r
+ \r
+ // Get the misc settings\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/misc.php';\r
+ $Misc = new EventManagementAdminMisc($this->dbh, $this->config);\r
+ $miscDetail = $Misc->getEntry(1);\r
+ \r
+ // If we have reasons for no payment\r
+ if (trim($miscDetail['no_payment_reasons']) != '') {\r
+\r
+ // Break it into an array and add to page data\r
+ $noPaymentReasons = explode(PHP_EOL, $miscDetail['no_payment_reasons']);\r
+ $this->page->noPaymentReasons = $noPaymentReasons;\r
+ \r
+ }\r
+\r
+}\r
+\r
+\r
+unset($formData['payment']);\r
+\r
+// Otherwise we're OK to continue showing the cart\r
+$this->page->promoCode = $_SESSION['GLM_EVENT_MGT_FRONT']['PromoCode'];\r
+$this->page->cartHasContents = $cart['cartHasContents'];\r
+$this->page->cart = $this->bindArrayToObject($cart['cartDataReorganized']);\r
+$this->page->cartHasOneVenueOnly = $cart['cartHasOneVenueOnly'];\r
+$this->page->cartRequiresPayment = $cart['cartRequiresPayment'];\r
+$this->page->totals = $this->bindArrayToObject($cart['totals']);\r
+$this->page->formData = $this->bindArrayToObject($formData); // Blank form data for cleared fields\r
+$this->reason = array_merge($this->reason, $cart['reason']);\r
+\r
+$this->templateFile = "Shop/checkout.html";\r
+\r
+$this->addDebug("Shop/checkout.inc", 'Array: $totals', print_r($cart['totals'],1));\r
+$this->addDebug("Shop/checkout.inc", 'Array: $cart', print_r($cart['cartData'],1));\r
+$this->addDebug("Shop/checkout.inc", 'Array: $formData', print_r($formData,1));\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Shop_checkout\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: checkout.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Select the front-end support class\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+\r
+/*\r
+ * Start by checking the cart and getting cart contents\r
+ */\r
+$cart = $Support->checkCart(true);\r
+\r
+// Assume we don't have to return to checkout\r
+$checkoutReturnFlag = false;\r
+\r
+// Need this before we put together the E-Mail summaries\r
+$this->page->promoCode = $_SESSION['GLM_EVENT_MGT_FRONT']['PromoCode'];\r
+\r
+// Check if there hasn't been a complete checkout yet.\r
+if (!$cart['checkoutComplete']) {\r
+\r
+ // Check for empty cart\r
+ if (!$cart['cartHasContents']) {\r
+ $this->reason[] = 'Your cart is currently empty.';\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/cart.inc';\r
+ return;\r
+ }\r
+\r
+ // If there's a problem with the cart, send the user back to the cart page\r
+ if ($cart['status'] == false) {\r
+ $this->reason = array_merge($this->reason, $cart['reason']);\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
+ return;\r
+ }\r
+\r
+ /*\r
+ * Check the submitted input for required and valid fields\r
+ */\r
+\r
+ // Load checkout support class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/checkoutSupport.php';\r
+ $CheckoutSupport = new EventManagementFrontCheckoutSupport($this->dbh, $this->config, $Support);\r
+\r
+ // Check submitted input to see if we have everything we need from the user\r
+ // Supply that data to the page and place payment data under each venue\r
+ $formData = $CheckoutSupport->checkoutInput($cart['cartDataReorganized']);\r
+\r
+ if ($formData != false) {\r
+\r
+\r
+ // If we didn't receive all needed input, display checkout form again\r
+ if (!$formData['status']) {\r
+ $checkoutReturnFlag = true;\r
+ $this->reason = array_merge($this->reason, $formData['reason']);\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
+ return;\r
+ }\r
+\r
+ // If we have Central Payment\r
+ if ($formData['centralPayment']) {\r
+\r
+ $membID = $formData['centralPayment']['membData']['id'];\r
+\r
+ // Check if reorganized cart data doesn't have central billing member.\r
+ if (!isset($cart['cartDataReorganized'][$membID])) {\r
+\r
+ // Didn't have it, so add the venue data now\r
+ $cart['cartDataReorganized'][$membID] = $formData['centralPayment']['membData'];\r
+\r
+ // Also flag that it's member data without any performances selected\r
+ $cart['cartDataReorganized'][$membID]['centralPaymentOnly'] = true;\r
+ } else {\r
+ $cart['cartDataReorganized'][$membID]['centralPaymentOnly'] = false;\r
+ }\r
+\r
+ // Mark the central billing member cart entry\r
+ $cart['cartDataReorganized'][$membID]['isCentralPaymentMember'] = true;\r
+\r
+ }\r
+\r
+ // Provide all cart and payment data back to the page for display\r
+ $this->page->formData = $this->bindArrayToObject($formData);\r
+\r
+ /*\r
+ * Try to process all payments - Supply our cart information and all user submitted information\r
+ */\r
+ $paymentResult = $CheckoutSupport->checkoutProcessPayments($cart['cartDataReorganized'], $formData);\r
+\r
+ // Inject payment results into cartData array and session data\r
+// foreach($paymentResult['payments'] as $r) {\r
+ while (list($key, $r) = each($paymentResult['payments'])) {\r
+\r
+ // Make sure there's a card ID in the payments entry.\r
+ $r['id'] = $key;\r
+\r
+ // If there's a payment error - Save that\r
+ if ($r['description'] != '') {\r
+ $this->reason[] = $r['description'];\r
+ }\r
+\r
+ // Create MD5 Check for access to order - Keeps people from tampering with ID # in URL line.\r
+ $r['orderVerification'] = md5($r['orderID'].$this->config->orderVerificationSecret);\r
+\r
+ // Place payment result under reorganized cart data for output\r
+ $cart['cartDataReorganized'][$r['id']]['paymentResult'] = $r;\r
+\r
+ // If this is a newly completed payment - Send all appropriate notices for this order\r
+ if ($r['newApproval']) {\r
+\r
+ // Get customer confirmation E-Mail\r
+ $sql = "\r
+ SELECT name, email, proc_email, proc_email2, checkout_email, checkout_notify\r
+ FROM eventmgt.member\r
+ WHERE id = ".$r['id']."\r
+ ;";\r
+ $stmt = $this->dbh->prepare($sql);\r
+ $stmt->execute();\r
+ $membData = $stmt->fetch(PDO::FETCH_ASSOC);\r
+\r
+ // Get any confirmation E-Mail content from Performances (only one per performance type)\r
+ $confTextArray = array();\r
+\r
+ if (count($cart['cartDataReorganized'][$r['id']]['performances']) > 0) {\r
+ foreach($cart['cartDataReorganized'][$r['id']]['performances'] as $p) {\r
+ // If there's confirmation text for this performance, add it with index of the performance ID\r
+ if (trim($p['conf_text']) != '') {\r
+ $confTextArray[$p['id']] = trim($p['conf_text']);\r
+ }\r
+\r
+ }\r
+ }\r
+\r
+ // If there's any confirmation text from performances, compile it all into one string.\r
+ $confText = '';\r
+ if (count($confTextArray) > 0) {\r
+ foreach($confTextArray as $ct) {\r
+ $confText .= "<p>$ct</p>\n";\r
+ }\r
+ }\r
+\r
+ $checkoutEmail = $membData['checkout_email'];\r
+\r
+ // If we have confirmation E-Mail header text then include that\r
+ // Otherwise it will be blank and we'll just send summary\r
+ if ($checkoutEmail != '') {\r
+\r
+ // Merge order data into E-Mail\r
+ $tags = array(\r
+ '{first-name}',\r
+ '{last-name}',\r
+ '{address-line-1}',\r
+ '{address-line-2}',\r
+ '{city}',\r
+ '{state}',\r
+ '{zip}',\r
+ '{country}',\r
+ '{'.$this->config->term->performance->norm.'-text}'\r
+ );\r
+ $vals = array(\r
+ $formData['contact']['fname']['value'],\r
+ $formData['contact']['lname']['value'],\r
+ $formData['contact']['addr1']['value'],\r
+ $formData['contact']['addr2']['value'],\r
+ $formData['contact']['city']['value'],\r
+ $formData['contact']['state']['value'],\r
+ $formData['contact']['zip']['value'],\r
+ $formData['contact']['country']['value'],\r
+ $confText\r
+ );\r
+\r
+ $checkoutEmail = str_replace($tags, $vals, $checkoutEmail);\r
+\r
+ }\r
+\r
+ // Create Purchase Summary\r
+ $templateFile = "Shop/paymentSummary.html";\r
+\r
+ $this->page->cartForSummaryCentral = $this->bindArrayToObject($cart['cartDataReorganized']);\r
+ $this->page->cartEntry = $this->bindArrayToObject($cart['cartDataReorganized'][$r['id']]);\r
+\r
+ $this->template->compile($this->userInterface.'/'.$templateFile);\r
+ $html_summary = $this->template->bufferedOutputObject($this->page);\r
+ unset($this->page->cartEntry);\r
+\r
+ // Try to send E-Mail to customer\r
+ $email_content = "--ContentBoundry\n"\r
+ ."Content-Type: text/plain; charset=\"US-ASCII\"\n"\r
+ ."\n"\r
+ ."This message may only be read using an HTML enabled E-Mail client."\r
+ ."\n"\r
+ ."--ContentBoundry\n"\r
+ ."Content-Type: text/html; charset=\"US-ASCII\"\n"\r
+ ."\n"\r
+ .$checkoutEmail\r
+ ."\n"\r
+ .$html_summary\r
+ ."\n"\r
+ ."--ContentBoundry--\n"\r
+ ."\n";\r
+\r
+ $emailAddress = $formData['contact']['email']['value'];\r
+ if (!empty($emailAddress)) {\r
+ $this->debug_mail(\r
+ $emailAddress,\r
+ htmlspecialchars_decode($membData['name'],ENT_QUOTES).' Purchase Confirmation',\r
+ $email_content,\r
+ "From: ".htmlspecialchars_decode($membData['name'],ENT_QUOTES)." <".$membData['email'].">"\r
+ ."\nMime-Version: 1.0\nContent-Type: multipart/alternative; boundary=ContentBoundry\n"\r
+ );\r
+// This one goes to Chuck for testing.\r
+/*\r
+ $this->debug_mail(\r
+ 'cscott@gaslightmedia.com',\r
+ htmlspecialchars_decode($membData['name'],ENT_QUOTES).' Purchase Confirmation',\r
+ $email_content,\r
+ "From: ".htmlspecialchars_decode($membData['name'],ENT_QUOTES)." <".$membData['email'].">"\r
+ ."\nMime-Version: 1.0\nContent-Type: multipart/alternative; boundary=ContentBoundry\n"\r
+ );\r
+*/\r
+ }\r
+\r
+ // If notifying member/venue\r
+ if ($membData['checkout_notify']) {\r
+\r
+ // Build processing E-Mail addresses\r
+ $procEmail = $membData['proc_email'];\r
+ if ($membData['proc_email2'] != '') {\r
+ if ($procEmail != '') {\r
+ $procEmail .= ',';\r
+ }\r
+ $procEmail .= $membData['proc_email2'];\r
+ }\r
+\r
+ // If we have a processing E-Mail address\r
+ if ($procEmail != '') {\r
+\r
+ // Send E-Mail to member/venue\r
+ $email_content = "--ContentBoundry\n"\r
+ ."Content-Type: text/plain; charset=\"US-ASCII\"\n"\r
+ ."\n"\r
+ ."This message may only be read using an HTML enabled E-Mail client."\r
+ ."\n"\r
+ ."--ContentBoundry\n"\r
+ ."Content-Type: text/html; charset=\"US-ASCII\"\n"\r
+ ."\n"\r
+ ."The following purchase has been made for your Venue."\r
+ ."\n"\r
+ .$html_summary\r
+ ."\n"\r
+ ."--ContentBoundry--\n"\r
+ ."\n";\r
+ $this->debug_mail(\r
+ $procEmail,\r
+ htmlspecialchars_decode($membData['name'],ENT_QUOTES).' Purchase Notification',\r
+ $email_content,\r
+ "From: ".htmlspecialchars_decode($membData['name'],ENT_QUOTES)." <".$membData['email'].">"\r
+ ."\nMime-Version: 1.0\nContent-Type: multipart/alternative; boundary=ContentBoundry\n"\r
+ );\r
+\r
+ } // Have processing E-Mail address\r
+\r
+ } // Doing notification to member/venue\r
+\r
+ // Clear new approval flag so we don't send notices again - If not checkout testing enabled\r
+ if (!$this->config->option->checkout_testing) {\r
+ $cart['cartDataReorganized'][$r['id']]['paymentResult']['newApproval'] = false;\r
+ } else {\r
+ // When doing checkout testing, add full SQL transaction to debug for each payment result\r
+ $this->addDebug("SQL Transaction for ".$cart['cartDataReorganized'][$r['id']]['name'], 'SQL Transaction', print_r($r['sqlTransaction'],1));\r
+ }\r
+ }\r
+\r
+ } // Each payment result\r
+\r
+ }\r
+\r
+ // Store the current payments data back into the session - If not checkout testing enabled\r
+ if (!$this->config->option->checkout_testing) {\r
+ $_SESSION[GLM_EVENT_SESSION]['TicketPayments'] = $paymentResult['payments'];\r
+ }\r
+\r
+ // If there was a problem processing any of the venue payments - return user to checkout page\r
+ if (!$paymentResult['status']) {\r
+\r
+ $checkoutReturnFlag = true;\r
+ $this->reason[] = 'There was a problem processing your request. ';\r
+ $checkoutCart = $cart; // Save because it's going to get overwritten by checkout.inc\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
+ return;\r
+\r
+ }\r
+\r
+\r
+} // If checkout not already complete\r
+$this->page->cartHasContents = $cart['cartHasContents'];\r
+$this->page->cart = $this->bindArrayToObject($cart['cartDataReorganized']);\r
+$this->page->totals = $this->bindArrayToObject($cart['totals']);\r
+$this->page->cartHasOneVenueOnly = $cart['cartHasOneVenueOnly'];\r
+$this->templateFile = "Shop/checkoutSuccess.html";\r
+\r
+$this->addDebug("Shop/checkoutSubmit.inc", 'Array: $totals', print_r($cart['totals'],1));\r
+$this->addDebug("Shop/checkoutSubmit.inc", 'Array: $cart', print_r($cart['cartDataReorganized'],1));\r
+$this->addDebug("Shop/checkoutSubmit.inc", 'Array: $formData', print_r($formData,1));\r
+\r
+// Destroy session to clear cart - If not doing checkout testing\r
+if (!$this->config->option->checkout_testing) {\r
+ $_SESSION[GLM_EVENT_SESSION]['TicketCart'] = false;\r
+ $_SESSION[GLM_EVENT_SESSION]['ContactInput'] = false;\r
+ $_SESSION[GLM_EVENT_SESSION]['TicketPayments'] = false;\r
+}\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+// Get Order ID\r
+$orderID = $_REQUEST['OrderID'] - 0;\r
+if ($orderID == 0) {\r
+ exit;\r
+}\r
+\r
+// Check Order Verification Code - Prevents people just sticking order numbers into urls to get vouchers\r
+$orderVerify = md5($orderID.$this->config->orderVerificationSecret);\r
+if ($orderVerify != $_REQUEST['orderVerify']) {\r
+ // Bad verification code\r
+ echo "Voucher Fault Code: 21";\r
+ exit;\r
+}\r
+\r
+// Get Order Detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/orders.php';\r
+$Orders = new EventManagementAdminOrders($this->dbh, $this->config);\r
+$orderDetail = $Orders->getOrderDetail($orderID);\r
+\r
+// Get Ticket Sold (voucher) detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/sold.php';\r
+$Sold = new EventManagementAdminSold($this->dbh, $this->config);\r
+$soldList = $Sold->getSoldList($orderID);\r
+\r
+// Get Venue Detail\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/members.php';\r
+$Members = new EventManagementAdminMembers($this->dbh, $this->config);\r
+$memberDetail = $Members->getMemberDetail($orderDetail['member']);\r
+\r
+// Load voucher design code as per the "voucher_design" config parameter in the site's config/applications/EventManagement.ini file\r
+if (is_file(EVENT_MANAGEMENT_APP_BASE.'models/vouchers/'.$this->config->voucher_design.'/voucher.php')) {\r
+ if (isset($_REQUEST['Mobile'])) {\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/vouchers/'.$this->config->voucher_design.'/voucherMobile.php';\r
+ } else {\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/vouchers/'.$this->config->voucher_design.'/voucher.php';\r
+ }\r
+ $pdf = new PdfVoucher($orderDetail, $soldList, $memberDetail, $this->dbh, $this->config);\r
+} else {\r
+ echo "SYSTEM ERROR: Site is not configured with a valid voucher design file.";\r
+ exit;\r
+}\r
+\r
+// There's nothing to do from here. Output should go direct to browser.\r
+exit;\r
+\r
+?>\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Shop_sectionSelect\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Front-End\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: sectionSelect.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+\r
+// Check If we're already locked into checkout, if so then go there\r
+$cart = $Support->checkCart();\r
+if ($cart['forceCheckoutPhase']) {\r
+ $this->reason[] = 'You have partially paid for your purchases. We have returned you to checkout to complete your purchase.';\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
+ return;\r
+}\r
+\r
+// If perfID hasn't been past to us, get selected Performance ID from input\r
+if (!isset($perfID)) {\r
+ $perfID = ($_REQUEST['PerformanceID'] - 0);\r
+}\r
+\r
+// Do we have a valid performance ID?\r
+if ($perfID == 0) {\r
+ $this->reason[] = 'No '.$this->config->term->event->norm.' has been selected.';\r
+} else {\r
+\r
+ // Get detail on selected performance\r
+ $performanceDetail = $this->support->getPerformanceData($perfID);\r
+ $this->page->performanceDetail = $this->bindArrayToObject($performanceDetail);\r
+\r
+ $this->addDebug("Shop/sectionSelect.inc", 'Array: $performanceDetail', print_r($performanceDetail,1));\r
+\r
+ // If we can't find the performance\r
+ if (!$performanceDetail) {\r
+ $this->reason[] = 'We were unable to find the selected '.$this->config->term->event->norm.'.';\r
+ } else {\r
+\r
+ // Query to find section IDs for sections that have active ticket inventory for the selected performance\r
+ $sql = "T.id in (\r
+ SELECT distinct(K.section)\r
+ FROM eventmgt.ticket K, eventmgt.ticket_inventory I\r
+ WHERE performance = $perfID\r
+ AND I.ticket = K.id\r
+ )";\r
+\r
+ // Get Section List for this performance for sections with available tickets\r
+ $sectionList = $this->support->getSectionList($false, $sql);\r
+ $this->page->sectionList = $this->bindArrayToObject($sectionList);\r
+\r
+ $this->addDebug("Shop/sectionSelect.inc", 'Array: $sectionList', print_r($sectionList, 1));\r
+\r
+ // If no sections found for this performance\r
+ if (!$sectionList) {\r
+ $this->reason[] = 'We were unable to find any '.$this->config->term->section->plur.' for this '.$this->config->term->event->norm.'.';\r
+ } else {\r
+\r
+ // if there's only one section, then select it for the user and move on to ticket selection - unless we're forcing section display\r
+ if (!$this->config->option->ticket_selection->force_section && count($sectionList) == 1) {\r
+\r
+ $this->addDebug("Shop/ticketSelect.inc", '*** Change to new method/view ***');\r
+\r
+ $passSectionID = $sectionList[0]['id'];\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/ticketSelect.inc';\r
+ return;\r
+ }\r
+\r
+ }\r
+ }\r
+}\r
+\r
+$this->templateFile = "Shop/sectionSelect.html";\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Shop_start\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Front-End\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: start.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+\r
+// Check If we're already locked into checkout, if so then go there\r
+$cart = $Support->checkCart();\r
+if ($cart['forceCheckoutPhase']) {\r
+ $this->reason[] = 'You have partially paid for your purchases. We have returned you to checkout to complete your purchase.';\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
+ return;\r
+}\r
+\r
+// Check if "Start at Cart" option is enabled. Generally used when there's cart-sticky items.\r
+if ($this->config->option->ticket_selection->start_at_cart) {\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/cart.inc';\r
+ return;\r
+}\r
+\r
+$this->templateFile = "Shop/start.html";\r
+\r
+// Get Members list - all active\r
+$membersList = $Support->getMembersList('active');\r
+\r
+// if there's no members listed\r
+if (count($membersList) == 0) {\r
+ $this->reason[] = 'There are no available '.$this->config->term->prop->plur.'.';\r
+ return;\r
+}\r
+\r
+// Get available performances data for each member and add them to the member data\r
+$havePerformance = false;\r
+$inventory = array();\r
+\r
+if (is_array($membersList) && count($membersList) > 0) {\r
+\r
+ reset($membersList);\r
+\r
+ while (list($k, $v) = each($membersList)) {\r
+\r
+ // Get list of performances for this member\r
+ $performancesList = $Support->getPerformancesList($v[id], 'member_and_active');\r
+\r
+ // If we have performances for this member\r
+ if ($performancesList) {\r
+\r
+ $havePerformances = true;\r
+\r
+ // For each performance, get the ticket data and add it to the array\r
+ reset($performancesList);\r
+ while (list($k2, $v2) = each($performancesList)) {\r
+\r
+ // Get all performance data for this performance\r
+ $perfData = $this->support->getAllPerformanceData($v2['id']);\r
+\r
+ // if we got any data, add it to the performance\r
+ if ($perfData) {\r
+\r
+ // Are we supposed to also provide actual ticket selection on this page?\r
+ if ($this->config->option->ticket_selection->show_tickets_on_start_page) {\r
+\r
+ // Add performance section/ticket data to the performance list\r
+ $performancesList[$k2]['oneSectionOnly'] = $perfData['oneSectionOnly'];\r
+ $performancesList[$k2]['sections'] = $perfData['sections'];\r
+\r
+ // Add inventory to the inventory array\r
+ $inventory += $perfData['inventory'];\r
+\r
+ } // Option to show tickets on start page\r
+\r
+ // If there's no performance data, then drop performance from list\r
+ } else {\r
+ unset($performancesList[$k2]);\r
+ } // have Performance data\r
+\r
+ } // for each performance\r
+\r
+ // Add all performance data, including tickets, to the member performances\r
+ $membersList[$k]['performances'] = $performancesList;\r
+\r
+ // Otherwise there's no active performances or tickets\r
+ } else {\r
+\r
+ // Since there's nothing to display, drop this member.\r
+ unset($membersList[$k]);\r
+ }\r
+\r
+ if ($k && !isset($membersList[$k]['performances'])) {\r
+ unset($membersList[$k]);\r
+ }\r
+\r
+ }\r
+}\r
+\r
+// Pass flag to show tickets on start page from config\r
+$this->page->showTickets = $this->config->option->ticket_selection->show_tickets_on_start_page;\r
+\r
+// Pass members list with performances and optional ticket data to template\r
+$this->page->membersList = $this->bindArrayToObject($membersList);\r
+\r
+// Also supply all ticket inventory as a JSON for the front-end scripts\r
+$this->page->ticketsJSON = json_encode($inventory, (int) JSON_PRETTY_PRINT);\r
+\r
+$this->addDebug("Shop/start.inc", 'Array: $membersList - with Performances', print_r($membersList, 1));\r
+$this->addDebug("Shop/start.inc", 'Array: $inventory', print_r($inventory, 1));\r
+\r
+// If we didn't get any performances to select from\r
+if (!$havePerformances) {\r
+echo "....";\r
+ $this->reason[] = 'There are no available '.$this->config->term->event->plur.'.';\r
+}\r
+\r
+\r
+?>\r
+\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Shop_ticketOpt\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Front-End\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: ticketOpt.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+\r
+// Check If we're already locked into checkout, if so then go there\r
+$cart = $Support->checkCart();\r
+if ($cart['forceCheckoutPhase']) {\r
+ $this->reason[] = 'You have partially paid for your purchases. We have returned you to checkout to complete your purchase.';\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
+ return;\r
+}\r
+\r
+// If perfID hasn't been passed to us, get selected Performance ID from input\r
+if (!isset($perfID)) {\r
+ $perfID = ($_REQUEST['PerformanceID'] - 0);\r
+}\r
+\r
+// Get selected Performance ID\r
+$perfID = ($_REQUEST['PerformanceID'] - 0);\r
+if ($perfID == 0) {\r
+ $this->reason[] = 'No '.$this->config->term->event->norm.' has been selected.';\r
+} else {\r
+\r
+ // Get selected performance data\r
+ $performanceDetail = $this->support->getPerformanceData($perfID);\r
+ $this->page->performanceDetail = $this->bindArrayToObject($performanceDetail);\r
+\r
+ $this->addDebug("Shop/ticketOpt.inc", 'Array: $performanceDetail', print_r($performanceDetail,1));\r
+\r
+ // If we can't find the performance\r
+ if (!$performanceDetail) {\r
+ $this->reason[] = 'We were unable to find the selected '.$this->config->term->event->norm.'.';\r
+ } else {\r
+\r
+ // If sectionID hasn't been past to us, get selected Section ID from input\r
+ if (!isset($sectionID)) {\r
+ $sectionID = ($_REQUEST['SectionID'] - 0);\r
+ }\r
+\r
+ if ($sectionID == 0) {\r
+ $this->reason[] = 'No '.$this->config->term->section->norm.' has been selected.';\r
+ } else {\r
+\r
+ // Get selected section data\r
+ $sectionDetail = $this->support->getSpecifiedSectionDetail($sectionID);\r
+ $this->page->sectionDetail = $this->bindArrayToObject($sectionDetail);\r
+\r
+ $this->addDebug("Shop/ticketOpt.inc", 'Array: $sectionDetail', print_r($sectionDetail,1));\r
+\r
+ // If section not found\r
+ if (!$sectionDetail) {\r
+ $this->reason[] = 'We were unable to find the selected '.$this->config->term->section->plur.'.';\r
+ } else {\r
+\r
+ // If ticketID hasn't been past to us, get selected ticket ID from input\r
+ if (!isset($ticketID)) {\r
+ $ticketID = ($_REQUEST['TicketID'] - 0);\r
+ }\r
+\r
+ if ($ticketID == 0) {\r
+ $this->reason[] = 'No '.$this->config->term->ticket->norm.' has been selected.';\r
+ } else {\r
+\r
+ // Get Ticket detail\r
+ $ticketDetail = $this->support->getSpecifiedTicketDetail($ticketID);\r
+ $this->page->ticketDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+ $this->addDebug("Shop/ticketOpt.inc", 'Array: $ticketDetail', print_r($ticketDetail,1));\r
+\r
+ // If ticket not found\r
+ if (!$ticketDetail) {\r
+ $this->reason[] = 'We were unable to find the selected '.$this->config->term->ticket->plur.'.';\r
+ } else {\r
+\r
+ // Get inventory for this ticket\r
+ $inventoryList = $this->support->getInventoryList($ticketID, 'T.active', true);\r
+\r
+ // If no inventory found for this ticket\r
+ if (!$inventoryList) {\r
+ $this->reason[] = 'We were unable to find inventory for the selected '.$this->config->term->ticket->norm.'.';\r
+ } else {\r
+\r
+ // Determine if any of the dates are too late to buy on-line.\r
+ // If no timestamp then it's not a date-specific ticket, so no purchase leadtime issue.\r
+ while (list($k, $v) = each($inventoryList)) {\r
+ if ($v['ticket_date']['timestamp']) {\r
+ $inventoryList[$k]['tooLate'] = (time() > strtotime($k) - ($performanceDetail['purch_leadtime']*3600) );\r
+ } else {\r
+ $inventoryList[$k]['tooLate'] = false;\r
+ }\r
+ }\r
+\r
+ // We're now ready to pass the inventory list to the page\r
+ $this->page->inventoryList = $this->bindArrayToObject($inventoryList);\r
+\r
+ $this->addDebug("Shop/ticketOpt.inc", 'Array: $inventoryList', print_r($inventoryList,1));\r
+\r
+ // Also supply this list as a JSON for the scripts\r
+ $this->page->inventoryJSON = json_encode($inventoryList, (int) JSON_PRETTY_PRINT);\r
+ $this->addDebug("Shop/ticketOpt.inc", 'JSON: $inventoryJSON', print_r($this->page->inventoryJSON,1));\r
+\r
+ } // Have inventory list\r
+\r
+ } // Have ticket detail\r
+\r
+ } // Have ticket ID\r
+\r
+ } // Have section detail\r
+\r
+ } // Have section ID\r
+\r
+ } // Have performance detail\r
+\r
+} // Have performance ID\r
+\r
+$this->templateFile = "Shop/ticketOpt.html";\r
+\r
+\r
+/*\r
+\r
+\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+\r
+// Check If we're already locked into checkout, if so then go there\r
+$cart = $Support->checkCart();\r
+if ($cart['forceCheckoutPhase']) {\r
+ $this->reason[] = 'You have partially paid for your purchases. We have returned you to checkout to complete your purchase.';\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
+ return;\r
+}\r
+\r
+\r
+// Get selected ticket information\r
+$perfID = ($_REQUEST['TicketID'] - 0);\r
+if ($perfID == 0) {\r
+ $this->reason[] = 'No '.$this->config->term->ticket->norm.' has been selected.';\r
+} else {\r
+\r
+ // Get Tickets and Inventory Information\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTickets.php';\r
+ $Tickets = new EventManagementDataTickets($this->dbh, $this->config);\r
+ $Tickets->optionIncludeSelectListData = false;\r
+ $ticketDetail = $Tickets->getTicketDetail($TicketID);\r
+ $this->page->ticketDetail = $this->bindArrayToObject($ticketDetail);\r
+\r
+ // If we can't find the ticket\r
+ if (!$ticketDetail) {\r
+ $this->reason[] = 'We were unable to find the selected '.$this->config->term->ticket->norm.' information.';\r
+ } else {\r
+\r
+ // Get performance information\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPerformances.php';\r
+ $Performances = new EventManagementDataPerformances($this->dbh, $this->config);\r
+ $Performances->optionIncludeSelectListData = false;\r
+ $performanceDetail = $Performances->getPerformanceDetail($ticketDetail['performance_id']);\r
+ $this->page->performanceDetail = $this->bindArrayToObject($performanceDetail);\r
+\r
+ // If we can't find the performance information\r
+ if (!$performanceDetail) {\r
+ $this->reason[] = 'We were unable to find the selected '.$this->config->term->event->norm.' information.';\r
+ } else {\r
+\r
+\r
+\r
+ }\r
+ }\r
+}\r
+\r
+\r
+// Check that Venue has a valid payment method setup\r
+$this->page->havePayPal = false;\r
+$this->page->haveCreditCards = false;\r
+$this->page->havePaymentMethod = false;\r
+if (\r
+ $detail['member']['payment_gateway']['value'] > 0 // Have processor selected\r
+ && count($detail['member']['cards_accepted']['names']) > 0 // Have credit cards selected\r
+) {\r
+\r
+ // Check for any needed gateway authentication information\r
+ $haveAuth = false;\r
+ switch($detail['member']['payment_gateway']['value']) {\r
+ case $this->config->ccard_processor_numb->authorize_net:\r
+ if ($detail['member']['gateway_par1'] != '' && $detail['member']['gateway_par2'] != '') {\r
+ $haveAuth = true;\r
+ }\r
+ break;\r
+ case $this->config->ccard_processor_numb->merchant_solutions:\r
+ if ($detail['member']['gateway_par1'] != '' && $detail['member']['gateway_par2'] != '') {\r
+ $haveAuth = true;\r
+ }\r
+ break;\r
+ case $this->config->ccard_processor_numb->test:\r
+ $haveAuth = true;\r
+ break;\r
+ if ($haveAuth) {\r
+ // Have good credit card gateway, have cards, have authentication\r
+ $this->page->haveCreditCards = true;\r
+ $this->page->havePaymentMethod = true;\r
+ }\r
+}\r
+if (\r
+ $detail['member']['paypal']['value'] &&\r
+ $detail['member']['paypal_client_id'] != '' &&\r
+ $detail['member']['paypal_secret'] != ''\r
+){\r
+\r
+ $this->page->havePayPal = true;\r
+ $this->page->havePaymentMethod = true;\r
+\r
+}\r
+\r
+// If there's no possible payment method\r
+if (!$this->page->havePaymentMethod) {\r
+ $detail['reason'][] = 'This '.$this->config->term->prop->norm.' has not configured any payment method.\r
+ Please call to purchase '.$this->config->term->ticket->plur.'.';\r
+ $this->page->dissableAddToCart = true;\r
+}\r
+\r
+// Check if member is set to active\r
+if (!$detail['member']['active']['value']) {\r
+ $detail['reason'][] = 'This venue is not currently available to sell tickets on-line.';\r
+ $this->page->dissableAddToCart = true;\r
+}\r
+\r
+// Check for sections, tickets, and inventory\r
+$mesg = '';\r
+if (!$detail['haveSections']) {\r
+ $mesg .= ' sections?';\r
+}\r
+if (!$detail['haveTickets']) {\r
+ $mesg .= ' tickets?';\r
+}\r
+if (!$detail['haveInventory']) {\r
+ $mesg .= ' inventory?';\r
+}\r
+if ($mesg != '') {\r
+ $detail['reason'][] = 'No '.$this->config->term->ticket->plur.' are available for this '.$this->config->term->event->norm.". ($mesg )";\r
+}\r
+\r
+$this->reason = array_merge($this->reason, $detail['reason']);\r
+unset($detail['reason']);\r
+\r
+$this->page->detail = $this->bindArrayToObject($detail);\r
+\r
+$this->templateFile = "Shop/ticketOpt.html";\r
+\r
+// $this->addDebug("Shop/ticketOpt.inc", 'Array: $detail', print_r($detail,1));\r
+\r
+?>\r
+*/\r
--- /dev/null
+<?php\r
+/**\r
+ * Event Management System\r
+ * Model Action: Shop_ticketSelect\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Front-End\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: ticketSelect.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once EVENT_MANAGEMENT_APP_BASE.'models/front/classes/support.php';\r
+$Support = new EventManagementFrontSupport($this->dbh, $this->config);\r
+\r
+// Check If we're already locked into checkout, if so then go there\r
+$cart = $Support->checkCart();\r
+if ($cart['forceCheckoutPhase']) {\r
+ $this->reason[] = 'You have partially paid for your purchases. We have returned you to checkout to complete your purchase.';\r
+ include EVENT_MANAGEMENT_APP_BASE.'models/front/actions/Shop/checkout.inc';\r
+ return;\r
+}\r
+\r
+// Get performance ID that might have been passed to us - otherwise set to 0\r
+$perfID = 0;\r
+if (isset($_REQUEST['PerformanceID'])) {\r
+ $perfID = ($_REQUEST['PerformanceID'] - 0);\r
+ if ($perfID > 0) {\r
+ $_SESSION[GLM_EVENT_SESSION]['Performance'] = $perfID;\r
+ }\r
+}\r
+\r
+// Get section ID that might have been passed to us - otherwise set to 0\r
+$sectID = 0;\r
+if (isset($passSectionID)) { // Passed by calling method (i.e. sectionSelect.inc)\r
+ $sectID = $passSectionID;\r
+} elseif (isset($_REQUEST['SectionID'])) {\r
+ $sectID = ($_REQUEST['SectionID'] - 0);\r
+}\r
+if ($sectID > 0) {\r
+ $_SESSION[GLM_EVENT_SESSION]['Section'] = $sectID;\r
+}\r
+\r
+// If we don't have a performance ID then fail this step\r
+if ($perfID == 0) {\r
+ $this->reason[] = 'No '.$this->config->term->event->norm.' has been selected.';\r
+} else {\r
+\r
+ // Get all performance data including all tickets prepped for use in a JSON for the front-end\r
+ $perfData = $this->support->getAllPerformanceData($perfID, $sectID);\r
+\r
+ // Save currently selected performance and member (venue)\r
+ $_SESSION[GLM_EVENT_SESSION]['Performance'] = $perfID['id'];\r
+ $_SESSION[GLM_EVENT_SESSION]['Member'] = $perfID['member_id'];\r
+\r
+ // Pass performance detail and section and ticket information to the template\r
+ $this->page->oneSectionOnly = $perfData['oneSectionOnly'];\r
+ $this->page->performanceDetail = $this->bindArrayToObject($perfData['performanceDetail']);\r
+ $this->page->sections = $this->bindArrayToObject($perfData['sections']);\r
+\r
+ // Also supply all ticket inventory as a JSON for the front-end scripts\r
+ $this->page->ticketsJSON = json_encode($perfData['inventory'], (int) JSON_PRETTY_PRINT);\r
+\r
+ $this->addDebug("Shop/ticketSelect.inc", 'Performance Detail', print_r($perfData['performanceDetail'],1));\r
+ $this->addDebug("Shop/ticketSelect.inc", 'Section and Ticket Data', print_r($perfData['sections'],1));\r
+ $this->addDebug("Shop/ticketSelect.inc", 'Ticket Inventory Data', print_r($perfData['inventory'],1));\r
+ $this->addDebug("Shop/ticketSelect.inc", 'JSON: $ticketsJSON', print_r($this->page->ticketsJSON,1));\r
+\r
+} // Have performance ID\r
+\r
+$this->templateFile = "Shop/ticketSelect.html";\r
+\r
+\r
+?>\r
+\r
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Front-End checkout support class
+ *
+ * @category Front-End
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/checkoutSupport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+/**
+ * EventManagementFrontCheckoutSupport class
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Tickets
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/checkoutSupport.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+class EventManagementFrontCheckoutSupport
+{
+
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ protected $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ protected $dbh;
+ /**
+ * Support class object
+ * @var $Support
+ * @access public
+ */
+ protected $Support;
+ /**
+ * Checkout Data Array
+ * @var $cd
+ * @access public
+ */
+ protected $cd;
+ /**
+ * Flag to indicate if there's an input problem
+ * @var $inputFail
+ * @access public
+ */
+ protected $inputFail = false;
+ /**
+ * SQL Transaction for passing back to calling methods when doing debug
+ * @var $sqlTransaction
+ * @access public
+ */
+ protected $sqlTransaction = false;
+
+ function __construct($dbh, $config, $Support)
+ {
+
+ $this->dbh = $dbh;
+ $this->config = $config;
+ $this->Support = $Support;
+
+ }
+
+ /*
+ * Initialize/reset checkout data array
+ */
+ public function checkoutInit($cart)
+ {
+
+ // Determine if we're running as an admin user for setting "required" for certain fields.
+ $admin_user_require = !$_SESSION[GLM_EVENT_SESSION]['AdminUser'];
+
+ // If there's not already checkout contact info in the session, start clean
+ if ($_SESSION[GLM_EVENT_SESSION]['ContactInput'] == false) {
+
+ if ($this->config->option->checkout_pre_fill) {
+
+ $this->cd = array(
+ 'contact' => array(
+ 'fname' => array('value' => 'John', 'required' => true, 'problem' => false),
+ 'lname' => array('value' => 'Smith', 'required' => true, 'problem' => false),
+ 'addr1' => array('value' => '120 E. Lake St.', 'required' => $admin_user_require, 'problem' => false),
+ 'addr2' => array('value' => 'Apt 2', 'required' => false, 'problem' => false),
+ 'city' => array('value' => 'Petoskey', 'required' => $admin_user_require, 'problem' => false),
+ 'state' => $this->createStatesArray('state', 'MI', $admin_user_require, false),
+ 'country' => $this->createCountriesArray('country', 'US', $admin_user_require, false),
+ 'phone' => array('value' => '231-487-0692', 'required' => true, 'problem' => false),
+ 'zip' => array('value' => '49770', 'required' => $admin_user_require, 'problem' => false),
+ 'email' => array('value' => 'info@gaslightmedia.com', 'required' => true, 'problem' => false),
+ 'email2' => array('value' => 'info@gaslightmedia.com', 'required' => true, 'problem' => false),
+ 'email_ok' => 'on',
+ 'opt_field_1' => array('value' => '', 'required' => false, 'problem' => false),
+ 'opt_field_2' => array('value' => '', 'required' => false, 'problem' => false),
+ 'opt_field_3' => array('value' => '', 'required' => false, 'problem' => false)
+ ),
+ 'payment' => array(),
+ 'status' => false,
+ 'centralPayment' => false
+ );
+ } else {
+
+ $this->cd = array(
+ 'contact' => array(
+ 'fname' => array('value' => '', 'required' => true, 'problem' => false),
+ 'lname' => array('value' => '', 'required' => true, 'problem' => false),
+ 'addr1' => array('value' => '', 'required' => $admin_user_require, 'problem' => false),
+ 'addr2' => array('value' => '', 'required' => false, 'problem' => false),
+ 'city' => array('value' => '', 'required' => $admin_user_require, 'problem' => false),
+ 'state' => $this->createStatesArray('state', false, $admin_user_require, false),
+ 'country' => $this->createCountriesArray('country', false, $admin_user_require, false),
+ 'phone' => array('value' => '', 'required' => true, 'problem' => false),
+ 'zip' => array('value' => '', 'required' => $admin_user_require, 'problem' => false),
+ 'email' => array('value' => '', 'required' => $admin_user_require, 'problem' => false),
+ 'email2' => array('value' => '', 'required' => $admin_user_require, 'problem' => false),
+ 'email_ok' => 'on',
+ 'opt_field_1' => array('value' => '', 'required' => false, 'problem' => false),
+ 'opt_field_2' => array('value' => '', 'required' => false, 'problem' => false),
+ 'opt_field_3' => array('value' => '', 'required' => false, 'problem' => false)
+ ),
+ 'payment' => array(),
+ 'status' => false,
+ 'centralPayment' => false
+ );
+ }
+
+ // Otherwise use the info stored in the session
+ } else {
+
+ $ci = &$_SESSION[GLM_EVENT_SESSION]['ContactInput'];
+
+ $this->cd = array(
+ 'contact' => array(
+ 'fname' => array('value' => $ci['fname'], 'required' => true, 'problem' => false),
+ 'lname' => array('value' => $ci['lname'], 'required' => true, 'problem' => false),
+ 'addr1' => array('value' => $ci['addr1'], 'required' => $admin_user_require, 'problem' => false),
+ 'addr2' => array('value' => $ci['addr2'], 'required' => false, 'problem' => false),
+ 'city' => array('value' => $ci['city'], 'required' => $admin_user_require, 'problem' => false),
+ 'state' => $this->createStatesArray('state', $ci['state'], $admin_user_require, false),
+ 'country' => $this->createCountriesArray('country', $ci['country'], $admin_user_require, false),
+ 'phone' => array('value' => $ci['phone'], 'required' => true, 'problem' => false),
+ 'zip' => array('value' => $ci['zip'], 'required' => $admin_user_require, 'problem' => false),
+ 'email' => array('value' => $ci['email'], 'required' => $admin_user_require, 'problem' => false),
+ 'email2' => array('value' => $ci['email2'], 'required' => $admin_user_require, 'problem' => false),
+ 'email_ok' => ($ci['email_ok'] ? 'on' : ''),
+ 'opt_field_1' => array('value' => $ci['opt_field_1'], 'required' => false, 'problem' => false),
+ 'opt_field_2' => array('value' => $ci['opt_field_2'], 'required' => false, 'problem' => false),
+ 'opt_field_3' => array('value' => $ci['opt_field_3'], 'required' => false, 'problem' => false)
+
+ ),
+ 'payment' => array(),
+ 'status' => false,
+ 'centralPayment' => false
+ );
+
+ }
+
+ // Check if there's central payment in use
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/misc.php';
+ $Misc = new EventManagementAdminMisc($this->dbh, $this->config);
+ $miscDetail = $Misc->getEntry(1);
+ if ($miscDetail['central_payment_id']) {
+
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMembers.php';
+ $Members = new EventManagementDataMembers($this->dbh, $this->config);
+ $Members->optionIncludeSelectListData = false;
+ $membData = $Members->getMemberDetail($miscDetail['central_payment_id']);
+
+ $this->cd['centralPayment'] = array(
+ 'id' => $miscDetail['central_payment_id'],
+ 'membData' => $membData
+ );
+
+ // Build card type array
+ $cctype = $this->buildCCTypeArray($membData, true, $membData, false, true);
+
+ if ($this->config->option->checkout_pre_fill) {
+
+ // Build expiration date array
+ $ccexp = $this->buildCCExpArray($required = true, $membData, 2, 2017, true);
+
+ $this->cd['payment'][$membData['id']] = array(
+ 'id' => $membData['id'],
+ 'spec_req' => array('value' => 'none', 'required' => false, 'problem' => false),
+ 'cctype' => $cctype,
+ 'ccname' => array('value' => 'JOHN SMITH', 'required' => true, 'problem' => false),
+ 'ccnumb' => array('value' => '0011001100110011', 'required' => true, 'problem' => false),
+ 'ccexp' => $ccexp,
+ 'cccode' => array('value' => '123', 'required' => true, 'problem' => false),
+ );
+
+ } else {
+
+ // Build expiration date array
+ $ccexp = $this->buildCCExpArray($required = true, $membData, false, false, true);
+
+ $this->cd['payment'][$membData['id']] = array(
+ 'id' => $membData['id'],
+ 'spec_req' => array('value' => '', 'required' => false, 'problem' => false),
+ 'cctype' => $cctype,
+ 'ccname' => array('value' => '', 'required' => true, 'problem' => false),
+ 'ccnumb' => array('value' => '', 'required' => true, 'problem' => false),
+ 'ccexp' => $ccexp,
+ 'cccode' => array('value' => '', 'required' => true, 'problem' => false),
+ );
+
+ }
+
+ } else {
+
+ // Build payment array for each venue
+ foreach($cart as $c) {
+
+ // Build card type array
+ $cctype = $this->buildCCTypeArray($c, true, $c['id'], false, true);
+
+ if ($this->config->option->checkout_pre_fill) {
+
+ // Build expiration date array
+ $ccexp = $this->buildCCExpArray($required = true, $c['id'], 2, 2017, true);
+
+ $this->cd['payment'][$c['id']] = array(
+ 'id' => $c['id'],
+ 'spec_req' => array('value' => 'none', 'required' => false, 'problem' => false),
+ 'cctype' => $cctype,
+ 'ccname' => array('value' => 'JOHN SMITH', 'required' => true, 'problem' => false),
+ 'ccnumb' => array('value' => '0011001100110011', 'required' => true, 'problem' => false),
+ 'ccexp' => $ccexp,
+ 'cccode' => array('value' => '123', 'required' => true, 'problem' => false),
+ );
+
+ } else {
+
+ // Build expiration date array
+ $ccexp = $this->buildCCExpArray($required = true, $c['id'], false, false, true);
+
+ $this->cd['payment'][$c['id']] = array(
+ 'id' => $c['id'],
+ 'spec_req' => array('value' => '', 'required' => false, 'problem' => false),
+ 'cctype' => $cctype,
+ 'ccname' => array('value' => '', 'required' => true, 'problem' => false),
+ 'ccnumb' => array('value' => '', 'required' => true, 'problem' => false),
+ 'ccexp' => $ccexp,
+ 'cccode' => array('value' => '', 'required' => true, 'problem' => false),
+ );
+
+ }
+ }
+ }
+
+ return $this->cd;
+ }
+
+ /*
+ * Get sanitized input data and store results in $this->cd
+ *
+ * @param $a Array element to store results - this function creates the entries
+ * @param $f Name of the parameter
+ * @param $filter Filter(s) to use
+ * @param $req Flag indicating if it's a required parameter
+ * @param $opt Optional filter option to use
+ * @param $id Optional sub-array id - also used as prefix to parameter
+ *
+ */
+ private function fieldInput($a, $f, $filter, $req, $opt = false, $id = false)
+ {
+ // Setup results
+ $r = array(
+ 'value' => false,
+ 'required' => $req,
+ 'problem' => ''
+ );
+
+ // Check for ID prefix
+ $fname = $f;
+ if ($id != false) {
+ $fname = $id."_".$f;
+ }
+
+ $in = trim(filter_input(INPUT_POST, $fname, $filter, $opt));
+
+ // If there's been a filter violation
+ if ($in === false) {
+
+ // Take what's safe
+ $r['value'] = filter_input(INPUT_POST, $f, FILTER_SANITIZE_STRING);
+
+ // Mark as bad input
+ $r['problem'] = 'Input is not valid.';
+ $this->inputFail = true;
+
+ // If nothing has been supplied
+ } elseif ($in === null || $in == '') {
+
+ // There's nothing
+ $r['value'] = '';
+
+ // If it's required, then say so
+ if ($req) {
+ $r['value'] = '';
+ $r['problem'] = 'Required input not provided.';
+ $this->inputFail = true;
+ }
+
+ // Otherwise, the input is valid
+ } else {
+
+ $r['value'] = $in;
+ $r['problem'] = false;
+
+ }
+
+ // Store results into destination array
+ if ($id) {
+ $this->cd[$a][$id][$f] = $r;
+ } else {
+ $this->cd[$a][$f] = $r;
+ }
+
+ }
+
+ /*
+ * Collect and validate checkout information
+ *
+ * @param $cart Array containing cart information
+ *
+ * @return object containing array as sub-objects
+ */
+ public function checkoutInput($cart)
+ {
+
+ // Determine if we're running as an admin user for setting "required" for certain fields.
+ $admin_user_require = !$_SESSION[GLM_EVENT_SESSION]['AdminUser'];
+
+ /*
+ * Initialize Destination Cart Data Array
+ * Set status to false (indicates fail - set to true later if all is Ok)
+ * This is where we're going to build the returned data
+ */
+ $this->cd = array(
+ 'contact' => false, // Where contact information goes
+ 'payment' => false, // Where payment information goes
+ 'status' => false, // A status flag
+ 'centralPayment' => false, // Assume no central payment
+ 'reason' => array() // Reasons we had problems
+ );
+
+ // Set input fail to false - calls below will change this if there's a problem
+ $this->inputFail = false;
+
+ /*
+ * Check all of the contact information required for checkout
+ * The checks below supply the various data to the $this->cd['contact'] array.
+ */
+ $this->fieldInput('contact', 'fname', FILTER_SANITIZE_STRING, true);
+ $this->fieldInput('contact', 'lname', FILTER_SANITIZE_STRING, true);
+ $this->fieldInput('contact', 'addr1', FILTER_SANITIZE_STRING, $admin_user_require);
+ $this->fieldInput('contact', 'addr2', FILTER_SANITIZE_STRING, false);
+ $this->fieldInput('contact', 'city', FILTER_SANITIZE_STRING, $admin_user_require);
+ $this->cd['contact']['state'] = $this->createStatesArray('state', false, $admin_user_require);
+ $this->cd['contact']['country'] = $this->createCountriesArray('country', false, $admin_user_require);
+ $this->fieldInput('contact', 'zip', FILTER_SANITIZE_STRING, $admin_user_require);
+ $this->fieldInput('contact', 'phone', FILTER_SANITIZE_STRING, true);
+ $this->fieldInput('contact', 'email', FILTER_VALIDATE_EMAIL, $admin_user_require);
+ $this->fieldInput('contact', 'email2', FILTER_VALIDATE_EMAIL, $admin_user_require);
+ $this->fieldInput('contact', 'opt_field_1', FILTER_SANITIZE_STRING, false);
+ $this->fieldInput('contact', 'opt_field_2', FILTER_SANITIZE_STRING, false);
+ $this->fieldInput('contact', 'opt_field_3', FILTER_SANITIZE_STRING, false);
+
+ // Also check the contact E-mail address and that they entered it twice properly
+ if ($this->cd['contact']['email']['value'] != $this->cd['contact']['email2']['value']) {
+ $this->cd['contact']['email2']['problem'] = 'Email addresses don\'t match.';
+ $this->inputFail = true;
+ }
+
+ // Say whether the user wanted to be contacted with other offers
+ $this->cd['contact']['email_ok'] = ($_REQUEST['email_ok'] == 'on');
+
+ /*
+ * Store the data values (only) collected so far into the session
+ * in case we come back to checkout for some reason.
+ * Only store the values, not all the other status data added to the
+ * $this->cd['contact'] array.
+ */
+ $ci = &$this->cd['contact'];
+ $_SESSION[GLM_EVENT_SESSION]['ContactInput'] = array(
+ 'fname' => $ci['fname']['value'],
+ 'lname' => $ci['lname']['value'],
+ 'addr1' => $ci['addr1']['value'],
+ 'addr2' => $ci['addr2']['value'],
+ 'city' => $ci['city']['value'],
+ 'state' => $ci['state']['value'],
+ 'country' => $ci['country']['value'],
+ 'zip' => $ci['zip']['value'],
+ 'phone' => $ci['phone']['value'],
+ 'email' => $ci['email']['value'],
+ 'email2' => $ci['email2']['value'],
+ 'email_ok' => $ci['email_ok'],
+ 'opt_field_1' => $ci['opt_field_1']['value'],
+ 'opt_field_2' => $ci['opt_field_2']['value'],
+ 'opt_field_3' => $ci['opt_field_3']['value']
+ );
+
+ // Check if there's central payment in use (if central payment member id is not 0)
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/misc.php';
+ $Misc = new EventManagementAdminMisc($this->dbh, $this->config);
+ $miscDetail = $Misc->getEntry(1);
+ $cpId = $miscDetail['central_payment_id'];
+
+ /*
+ * Build payment array for each venue - Main index in cart data is Venue
+ * Note that $c['id'] is used as an index into the payment array
+ * The Payment array is empty when we first get here - before any payments have been processed.
+ * If one payment was processed in a previous checkout attempt but another wasn't, the
+ * completed payment should be in here.
+ */
+ $centralPaymentAdded = false;
+ if (!is_array($cart)) {
+ return false;
+ }
+ foreach ($cart as $c) {
+
+ // Note: $c contains full info for a single venue with all selected cart data for it
+
+ // If this payment doesn't exist yet or has not yet been approved
+ if ( !isset($_SESSION[GLM_EVENT_SESSION]['TicketPayments'][$c['id']]) ||
+ !$_SESSION[GLM_EVENT_SESSION]['TicketPayments'][$c['id']]['approved']) {
+
+ // Create a payment entry under the current venue in our destination data with the current venue id
+ $this->cd['payment'][$c['id']] = array(
+ 'id' => $c['id'],
+ 'type' => false
+ );
+
+ /*
+ * Set the payment type the user selected for this venue
+ * We currently only have PayPal and Credit card. Will have to restructure this if we
+ * ever accept any other types of payments (comp codes, pay at event, ...)
+ */
+
+ if ( isset($_REQUEST[$c['id'].'_payTypeSelect']) && $_REQUEST[$c['id'].'_payTypeSelect'] == 'no' ) {
+
+ // Check for any special request for this venue and save it along with Payment information
+ $this->fieldInput('payment', 'spec_req', FILTER_SANITIZE_STRING, false, false, $c['id']);
+
+ $this->cd['payment'][$c['id']]['type'] = 'no';
+
+
+ } elseif ($_REQUEST[$c['id'].'_payTypeSelect'] == 'pp') {
+
+ // PayPal payment selected
+
+ // Check for any special request for this venue and save it along with Payment information
+ $this->fieldInput('payment', 'spec_req', FILTER_SANITIZE_STRING, false, false, $c['id']);
+
+ $this->cd['payment'][$c['id']]['type'] = 'pp';
+
+ } else {
+
+ if (isset($_REQUEST['AdminNoPayment']) && $_REQUEST['AdminNoPayment'] = 'TRUE') {
+
+ } else {
+
+ // If central credit card payment
+ if ($cpId) {
+
+ if (!$centralPaymentAdded) {
+
+ // Get the central payment venu and setup payment entry
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMembers.php';
+ $Members = new EventManagementDataMembers($this->dbh, $this->config);
+ $Members->optionIncludeSelectListData = false;
+ $cpMembData = $Members->getMemberDetail($miscDetail['central_payment_id']);
+
+ $this->cd['centralPayment'] = array(
+ 'id' => $miscDetail['central_payment_id'],
+ 'membData' => $cpMembData
+ );
+
+ // Check for any special request for this venue and save it along with Payment information
+ $this->fieldInput('payment', 'spec_req', FILTER_SANITIZE_STRING, false, false, $cpId);
+
+ /*
+ * Set the payment type the user selected for this venue
+ * We currently only have PayPal and Credit card. Will have to restructure this if we
+ * ever accept any other types of payments (comp codes, pay at event, ...)
+ */
+
+ if ($_REQUEST[$cpId.'_payTypeSelect'] == 'pp') {
+
+ // PayPal payment selected
+ $this->cd['payment'][$cpId]['type'] = 'pp';
+
+ } else {
+
+ // Credit Card payment selected
+ $this->cd['payment'][$cpId]['type'] = 'cc';
+
+ // Collect and verify submitted credit card information
+ $this->cd['payment'][$cpId]['cctype'] = $this->buildCCTypeArray($cpMembData, true, $cpId);
+ $this->fieldInput('payment', 'ccname', FILTER_SANITIZE_STRING, true, false, $cpId);
+ $this->ccnumbInput('payment', 'ccnumb', $this->cd['payment'][$cpId]['cctype']['value'], true, $cpId);
+ $this->cd['payment'][$cpId]['ccexp'] = $this->buildCCExpArray($required = true, $cpId);
+ $this->fieldInput('payment', 'cccode', FILTER_SANITIZE_NUMBER_INT, true, false, $cpId);
+
+ }
+
+ }
+
+ $centralPaymentAdded = true;
+
+ } else {
+
+ // Credit Card payment selected
+ $this->cd['payment'][$c['id']]['type'] = 'cc';
+
+ // Collect and verify submitted credit card information
+ $this->cd['payment'][$c['id']]['cctype'] = $this->buildCCTypeArray($c, true, $c['id']);
+ $this->fieldInput('payment', 'ccname', FILTER_SANITIZE_STRING, true, false, $c['id']);
+ $this->ccnumbInput('payment', 'ccnumb', $this->cd['payment'][$c['id']]['cctype']['value'], true, $c['id']);
+ $this->cd['payment'][$c['id']]['ccexp'] = $this->buildCCExpArray($required = true, $c['id']);
+ $this->fieldInput('payment', 'cccode', FILTER_SANITIZE_NUMBER_INT, true, false, $c['id']);
+ }
+ }
+ }
+ }
+
+ }
+
+ // If everything is OK, set status to true
+ if (!$this->inputFail) {
+ $this->cd['status'] = true;
+ } else {
+ // Otherwise let the user know there was a problem
+ $this->cd['reason'][] = 'Please see fields highlighted in red below.';
+ }
+
+ return $this->cd;
+ }
+
+ /*
+ * Try to process all payments
+ *
+ * Return data from processPayment() calls
+ *
+ * $res = array
+ * status Numeric return status code
+ * 1 Approved
+ * 2 Bad data supplied
+ * 3 Communications failure
+ * 4 Bad response
+ * 5 Transaction not valid
+ * 6 Merchant account problem
+ * 7 Card declined
+ * statusText Short name of status
+ * authCode Authorization code - blank if card not accepted
+ * description Longer description of result
+ *
+ *
+ * @param $cart Array containing cart information
+ * @param $contact Array containing contact information
+ *
+ * @return object containing array as sub-objects
+ *
+ * id ID of cart entry (member ID)
+ * status True if payment successful
+ * type Type of transaction ('cc' = Credit Card, 'pp' = PayPal)
+ * statusText Description of status
+ * authCode Any Authorization code returned
+ * description Description of action and result
+ * newApproval This payment has just been made, not on a previous page submission
+ * spec_req ?
+ * approved True if Approved
+ * cctype Card type name
+ * ccname Card holder name
+ * ccexp Expiration date
+ * ccnumb Card number (may be mudged)
+ * orderID ID of this order
+ *
+ */
+ public function checkoutProcessPayments($cart, $formData)
+ {
+
+ // Array that will take list of all payments
+ $payments = array();
+
+ // If this is an admin user and no payment has been selected
+ if (isset($_REQUEST['AdminNoPayment']) && $_REQUEST['AdminNoPayment'] = 'TRUE') {
+ while (list($key, $val) = each($formData['payment'])) {
+ $formData['payment'][$key]['type'] = 'no';
+ }
+ }
+
+ // If Central Payment
+ $grandTotal = 0;
+ $allPerf = array();
+ if ($formData['centralPayment']) {
+ foreach ($cart as $c) {
+
+ // If this isn't a no payment location
+ if ($c['payment_gateway']['value'] != 3) {
+
+ // Build complete payment total
+ $grandTotal += $c['totalPrice_numb'];
+
+ // Build array of all performances - This will be used to build a single order with all venues
+ if (count($c['performances']) > 0) {
+ foreach ($c['performances'] as $perf) {
+ $allPerf[$perf['id']] = $perf;
+ }
+ }
+ }
+
+ }
+ }
+
+ // Assume the payment can't be processed
+ $status = false;
+
+ // Get any previous payment data from the session
+ // Would be there if payment has already been tried and there was a failure
+ $ticketPayments = $_SESSION[GLM_EVENT_SESSION]['TicketPayments'];
+
+ // For each venue
+ reset($cart);
+ foreach ($cart as $c) {
+
+ // Short form for venue/cart entry ID
+ $id = $c['id'];
+
+ // If Central Payment then set grand total
+ if ($formData['centralPayment']) {
+ $c['totalPrice_numb'] = $grandTotal;
+ }
+
+ // If not Central Payment or this is not the central payment member (i.e. not consignment)
+ if (!$formData['centralPayment'] || $formData['centralPayment']['id'] == $c['id'] || $formData['payment'][$id]['type'] == 'no') {
+
+ // Check if payment has been completed for this venue
+ if (isset($ticketPayments[$id]) && $ticketPayments[$id]['status'] == 1) {
+
+ // If so, then we'll just use that
+ $payments[$id] = $ticketPayments[$id];
+
+ // Otheriwse, try to process this payment
+ } else {
+
+ // If this is a credit card purchase - (note PayPal is processed separately)
+ switch ($formData['payment'][$id]['type']) {
+
+ // No payment required
+ case 'no':
+
+ $res = array(
+ 'type' => 'no',
+ 'status' => 1,
+ 'statusText' => 'No Payment',
+ 'authCode' => '000000',
+ 'description' => 'No Payment Required',
+ 'spec_req' => $c['paymentForm']['spec_req']['value'],
+ 'approved' => true,
+ 'cctype' => '',
+ 'ccname' => '',
+ 'ccexp' => '',
+ 'ccnumb' => '',
+ 'newApproval' => true
+ );
+
+ $status = true;
+
+ break;
+
+ // Credit Card Payment
+ case 'cc':
+
+ // Build a more concise array with what we need
+ $payment = array(
+ 'gateway' => $c['payment_gateway']['value'], // Payment gateway to use
+ 'name' => $c['name'], // Name of venue
+ 'charge' => $c['totalPrice_numb'], // Total charges this venue
+ 'cctype' => $formData['payment'][$id]['cctype']['name'], // Card Type
+ 'ccname' => $formData['payment'][$id]['ccname']['value'], // Name on Card
+ 'ccnumb' => $formData['payment'][$id]['ccnumb']['value'], // Card Number
+ 'ccexp' => $formData['payment'][$id]['ccexp']['value'], // Expriation Date
+ 'cccode' => $formData['payment'][$id]['cccode']['value'], // CCV - security code
+ 'invoice' => $_SESSION[GLM_EVENT_SESSION]['SessionID'] // Invoice # is session ID (or some part thereof)
+ );
+
+ // Load selected payment processor and initialize
+ switch ($payment['gateway']) {
+
+ case $this->config->ccard_processor_numb->no_payment:
+
+ $account = array();
+
+ // load and initialize - No account data required
+ require_once COMMON_APP_BASE.'CommonAbstracts/'.$this->config->paymentProcessorsLocation.'/None/no_payment.php';
+ $Processor = new NoPaymentGateway();
+
+ break;
+
+ case $this->config->ccard_processor_numb->authorize_net:
+
+ // Get account data
+ $account = array(
+ 'login' => $c['gateway_par1'],
+ 'key' => $c['gateway_par2'],
+ 'test' => $c['gateway_par3']['value'],
+ 'conf' => $c['gateway_par4']['value'],
+ 'email' => $c['gateway_par5']
+ );
+
+ // load and initialize
+ require_once COMMON_APP_BASE.'CommonAbstracts/'.$this->config->paymentProcessorsLocation.'/Authorize.Net/AuthorizeNet.php';
+ $Processor = new AuthorizeNetPaymentGateway($account);
+
+ break;
+
+ case $this->config->ccard_processor_numb->merchant_solutions:
+
+ // Get account data
+ $account = array(
+ 'acctid' => $c['gateway_par1'],
+ 'merchantpin' => $c['gateway_par2'],
+ 'test' => $c['gateway_par3']['value'],
+ 'conf' => $c['gateway_par4']['value'],
+ 'email' => $c['gateway_par5']
+ );
+
+ // load and initialize
+ require_once COMMON_APP_BASE.'CommonAbstracts/'.$this->config->paymentProcessorsLocation.'/MerchantSolutions/MerchantSolutions.php';
+ $Processor = new MerchantSolutionsPaymentGateway($account);
+
+ break;
+
+ case $this->config->ccard_processor_numb->test:
+
+ $account = array();
+
+ // load and initialize - No account data required
+ require_once COMMON_APP_BASE.'CommonAbstracts/'.$this->config->paymentProcessorsLocation.'/Test/Test.php';
+ $Processor = new TestPaymentGateway();
+
+ break;
+
+ }
+
+ // Send payment request to payment processor - Use contact information in session
+ $res = $Processor->processPayment($payment, $_SESSION[GLM_EVENT_SESSION]['ContactInput']);
+
+ // Assume we don't have a new approval
+ $res['newApproval'] = false;
+
+ // If payment was successful - update the result with a mudged card number
+ if ($res['status'] == 1) {
+
+ $status = true;
+
+ $res['spec_req'] = $c['paymentForm']['spec_req']['value'];
+ $res['approved'] = true;
+ $res['cctype'] = $payment['cctype'];
+ $res['ccname'] = $payment['ccname'];
+ $res['ccexp'] = $payment['ccexp'];
+ $res['ccnumb'] = '**** **** **** '.substr($payment['ccnumb'], -4);
+ $res['newApproval'] = true;
+
+ }
+
+ // Add transaction type to result
+ $res['type'] = 'cc';
+
+ break;
+
+ } // case payment type
+
+ // If the transaction was successful
+ if ($status) {
+
+ // If Central Payment, put all performances into this order
+ if ($formData['centralPayment']) {
+ $c['performances'] = $allPerf;
+ }
+
+ // Store the purchase
+ $orderID = $this->storePurchase($c, $res);
+
+ if ($orderID == false) {
+
+ // Oops, some kind of failure to store purchase. Send Chuck a message
+ $message = "Event Management System V3\n\n"
+ ."Failure to store customer purchase - checkoutProcessPayments()\n\n"
+ ."Contact:\n\n".print_r($contact,1)."\n\n"
+ ."Cart:\n\n".print_r($c,1)."\n\n"
+ ."Result:\n\n".print_r($res,1)."\n\n"
+ ."Payment:\n\n".print_r($payment,1)."\n\n"
+ ."Gateway Account:\n\n".print_r($account,1)."\n\n";
+ mail(
+ 'cscott@gaslightmedia.com',
+ 'Event Management V3 Error: Failure to store purchase',
+ $message, $headers = '', $parameters = '' );
+
+ }
+
+ $res['orderID'] = $orderID;
+
+ // Add venue id to payment result
+ $res['id'] = $c['id'];
+
+ // Pass entire SQL Transaction back. If checkout debug isn't enabled this will simply be false;
+ $res['sqlTransaction'] = $this->sqlTransaction;
+
+ }
+
+ // Add payment information to the payments array
+ $payments[$c['id']] = $res;
+
+ } // if payment not already processed
+
+ } // if not central payment or member ID is the same as the central payment id
+
+ } // For each venue
+
+ return array(
+ 'payments' => $payments,
+ 'status' => $status
+ );
+
+ }
+
+ /*
+ * Attempt to store purchase
+ *
+ * @param $c Array of a single venue from the cart - Payment must have been successful
+ * @return object containing array as sub-objects
+ */
+ public function storePurchase($c, $res)
+ {
+
+ // Start transaction array
+ $transaction = array();
+
+ // Get contact information from the session
+ $contact = $_SESSION[GLM_EVENT_SESSION]['ContactInput'];
+
+ // Create unique session ID (extended with Date state to ensure it's unique)
+ $sid = $_SESSION[GLM_EVENT_SESSION]['SessionID'].'-'.time();
+
+ // Get optional checkout field prompts to store with order
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/misc.php';
+ $Misc = new EventManagementAdminMisc($this->dbh, $this->config);
+ $miscConfigDetail = $Misc->getEntry(1);
+
+ $user_trace =
+ $_SERVER["REMOTE_ADDR"]." - "
+ .date("m/d/Y H:i:s");
+
+ $pmt = $c['paymentForm'];
+ $specialNeeds = $res['spec_req']; // **** NEED TO GET THIS INTO CART
+
+ // Check for any no payment info reasons
+ $notes = '';
+ if (isset($_REQUEST['no_payment_reason']) && trim($_REQUEST['no_payment_reason']) != '') {
+ $notes = htmlspecialchars("Admin no payment info reason:\n".$_REQUEST['no_payment_reason'], ENT_QUOTES);
+ }
+
+ $transaction[] = "
+ INSERT INTO eventmgt.ticket_order
+ (
+ user_trace_info,
+ fname,
+ lname,
+ addr1,
+ addr2,
+ city,
+ state,
+ zip,
+ country,
+ phone,
+ email,
+ email_ok,
+ opt_field_1_name,
+ opt_field_1,
+ opt_field_2_name,
+ opt_field_2,
+ opt_field_3_name,
+ opt_field_3,
+ purchase_date,
+ member,
+ cctype,
+ ccnumber,
+ expire,
+ ccname,
+ ccconf,
+ charge_total,
+ special_needs,
+ notes,
+ session_id
+ )
+ VALUES
+ (
+ '$user_trace',
+ '".$contact['fname']."',
+ '".$contact['lname']."',
+ '".$contact['addr1']."',
+ '".$contact['addr2']."',
+ '".$contact['city']."',
+ '".$contact['state']."',
+ '".$contact['zip']."',
+ '".$contact['country']."',
+ '".$contact['phone']."',
+ '".$contact['email']."',
+ ".($contact['email_ok'] ? 'true' : 'false').",
+ '".addslashes($miscConfigDetail['opt_field_1_name'])."',
+ '".$contact['opt_field_1']['value']."',
+ '".addslashes($miscConfigDetail['opt_field_2_name'])."',
+ '".$contact['opt_field_2']['value']."',
+ '".addslashes($miscConfigDetail['opt_field_3_name'])."',
+ '".$contact['opt_field_3']['value']."',
+ 'today',
+ ".$c['id'].",
+ '".$res['cctype']."',
+ '".$res['ccnumb']."',
+ '".$res['ccexp']."',
+ '".$res['ccname']."',
+ '".$res['authCode']."',
+ ".$c['totalPrice_numb'].",
+ '".$specialNeeds."',
+ '".$notes."',
+ '".$sid."'
+ );
+ ";
+
+ // For each ticket date
+ $ticketSequence = 0;
+ foreach ($c['performances'] as $p) {
+
+ // Do a last validation on likely date
+ $likelyDate = date('m/d/Y', strtotime($c['likelyDate']));
+ if ($likelyDate == '12/31/1969') {
+ $likelyDate = '';
+ }
+
+ // For each performance
+ foreach ($p['dates'] as $d) {
+
+ // For each Section
+ foreach ($d['sections'] as $s) {
+
+ // For each ticket type
+ foreach ($s['tickets'] as $t) {
+
+ // If this ticket is type "package", get package contents for use below.
+ $isPackageTicket = false;
+ if ($this->config->option->tickets && $t['ticket_type']['value'] == 20) {
+
+ // get the package contents
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';
+ $TicketPackages = new EventManagementDataTicketPackages($this->dbh, $this->config);
+ $packageData = $TicketPackages->getPackageList("package = ".$t['id']);
+ $isPackageTicket = true;
+
+ }
+
+ // For each individual ticket
+ for ($i=1 ; $i<=$t['selected'] ; $i++) {
+
+ // If option "ticket_sold_member_actual" is true, force member for ticket_sold to the memeber listed in the "ticket" table.
+ // This overrides some of the "assignment" alterations when selling by consignment and forces reports to always point to the actual ticket member.
+ $ticketSoldMember = $c['id'];
+ if ($this->config->option->ticket_order->ticket_sold_member_actual) {
+ $ticketSoldMember = $t['member'];
+ }
+ // Check for empty date - Non date specific ticket
+ $tDate = "'".$d['date']."'";
+ if ($d['date'] == '') {
+ $tDate = 'null';
+ }
+
+ // Build text with any policies
+ $policies = '';
+ if (!empty($c['def_ticket_policy'])) {
+ $policies = $this->config->term->prop->cap." ".$this->config->term->ticket->norm
+ ." policy:\n".$c['def_ticket_policy']."\n\n";
+ }
+ if (!empty($p['policy'])) {
+ $policies .= $this->config->term->performance->cap
+ ." policy:\n".$p['policy']."\n\n";
+ }
+ if (!empty($policies)) {
+ $policies = addslashes($policies);
+ }
+
+ // Create a unique package sold ID to link the package ticket with the package contents sold ({ticketID}-{sessionID}-{timestamp})
+ $packageSoldID = $sid.'-'.++$ticketSequence;
+
+ // If this is not a package, create a i record - note that ticket_order number will be updated later
+ $transaction[] = "
+ INSERT INTO eventmgt.ticket_sold
+ (
+ ticket_order,
+ member,
+ member_name,
+ assigned,
+ assigned_from,
+ assigned_from_name,
+ performance,
+ performance_name,
+ entrance,
+ entrance_name,
+ entrance_color,
+ section,
+ section_name,
+ ticket,
+ ticket_name,
+ is_package,
+ package_sold_id,
+ ticket_package,
+ package_name,
+ date_specific,
+ ticket_date,
+ time_specific,
+ ticket_time,
+ start_date,
+ end_date,
+ likely_date,
+ price_paid,
+ voucher_type,
+ voucher_text,
+ policies,
+ unlimited_use,
+ numb_uses,
+ numb_claimed,
+ time_claimed,
+ session_id
+ )
+ VALUES
+ (
+ (SELECT currval('eventmgt.ticket_order_id_seq')),
+ ".$ticketSoldMember.",
+ '".$c['name']."',
+ ".($c['assigned'] ? 'true' : 'false').",
+ ".($c['assigned'] ? $c['assigned_from'] : 'NULL').",
+ '".($c['assigned'] ? $c['assigned_from_name'] : '')."',
+ ".$p['id'].",
+ '".$p['name']."',
+ ".(!empty($s['entrance']) ? $s['entrance'] : 'NULL').",
+ '".$s['entranceDetail']['name']."',
+ '".$s['entranceDetail']['color']['name']."',
+ ".$s['id'].",
+ '".$s['name']."',
+ ".$t['id'].",
+ '".$t['title']."',
+ ".($isPackageTicket ? 'true' : 'false').",
+ '$packageSoldID',
+ NULL,
+ '',
+ ".($t['date_specific']['value'] ? 'true' : 'false').",
+ $tDate,
+ ".($t['time_specific']['value'] ? 'true' : 'false').",
+ '".$t['ticket_timestamp']."',
+ ".(!empty($t['start_date']['date']) ? "'".$t['start_date']['date']."'" : 'NULL').",
+ ".(!empty($t['end_date']['date']) ? "'".$t['end_date']['date']."'" : 'NULL').",
+ ".(!empty($likelyDate) ? "'".$likelyDate."'" : 'NULL').",
+ ".$t['price_numb'].",
+ ".$t['voucher_type']['value'].",
+ '".$t['voucher_text']."',
+ '$policies',
+ ".($t['unlimited_use']['value'] ? 'true' : 'false').",
+ ".$t['uses'].",
+ 0,
+ null,
+ '".$sid."'
+ );
+ ";
+
+ // If this is a package, get package contents and save that as separate tickets sold.
+ if ($isPackageTicket) {
+
+ reset ($packageData);
+ foreach ($packageData as $p) {
+
+ // Get information on this package ticket
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTickets.php';
+ $Tickets = new EventManagementDataTickets($this->dbh, $this->config);
+ $pt = $Tickets->getTicketDetail($p['ticket']);
+
+ // If option "ticket_sold_member_actual" is true, force member for ticket_sold to the memeber listed in the "ticket" table.
+ // This overrides some of the "assignment" alterations when selling by consignment and forces reports to always point to the actual ticket member.
+ $ticketSoldMember = $pt['member'];
+ if ($this->config->option->ticket_order->ticket_sold_member_actual) {
+ $ticketSoldMember = $t['member'];
+ }
+
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataSections.php';
+ $Sections = new EventManagementDataSections($this->dbh, $this->config);
+ $ps = $Sections->getSectionDetail($pt['section_id']);
+
+ // Get Entrance information for this ticket's section
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataEntrances.php';
+ $Entrances = new EventManagementDataEntrances($this->dbh, $this->config);
+ $pe = $Entrances->getEntranceDetail($ps['entrance']);
+
+
+ $transaction[] = "
+ INSERT INTO eventmgt.ticket_sold
+ (
+ ticket_order,
+ member,
+ member_name,
+ assigned,
+ assigned_from,
+ assigned_from_name,
+ performance,
+ performance_name,
+ entrance,
+ entrance_name,
+ entrance_color,
+ section,
+ section_name,
+ ticket,
+ ticket_name,
+ is_package,
+ package_sold_id,
+ ticket_package,
+ package_name,
+ date_specific,
+ ticket_date,
+ time_specific,
+ ticket_time,
+ start_date,
+ end_date,
+ likely_date,
+ price_paid,
+ voucher_type,
+ voucher_text,
+ policies,
+ unlimited_use,
+ numb_uses,
+ numb_claimed,
+ time_claimed,
+ session_id
+ )
+ VALUES
+ (
+ (SELECT currval('eventmgt.ticket_order_id_seq')),
+ ".$ticketSoldMember.",
+ '".$pt['member_name']."',
+ false,
+ NULL,
+ '',
+ ".$pt['performance_id'].",
+ '".$pt['performance']."',
+ ".(!empty($pt['section_id']) ? $pt['section_id'] : 'NULL').",
+ '".$pe['name']."',
+ '".$pe['color']['name']."',
+ ".$ps['id'].",
+ '".$ps['name']."',
+ ".$pt['id'].",
+ '".$pt['title']."',
+ false,
+ '$packageSoldID',
+ ".$t['id'].",
+ '".$t['title']."',
+ false,
+ NULL,
+ false,
+ '".$pt['ticket_timestamp']."',
+ ".(!empty($pt['start_date']['date']) ? "'".$pt['start_date']['date']."'" : 'NULL').",
+ ".(!empty($pt['end_date']['date']) ? "'".$pt['end_date']['date']."'" : 'NULL').",
+ NULL,
+ 0,
+ ".$pt['voucher_type']['value'].",
+ '".$pt['voucher_text']."',
+ '',
+ ".($pt['unlimited_use']['value'] ? 'true' : 'false').",
+ ".$pt['uses'].",
+ 0,
+ null,
+ '".$sid."'
+ );
+ ";
+
+
+ }
+
+ }
+
+ // Check for any add-ons included
+ if (isset($t['addons']) && count($t['addons']) > 0) {
+
+ // For each add-on for this ticket
+ foreach ($t['addons'] as $a) {
+
+ // If there's a quantity selected
+ if ($a['selected'] > 0) {
+
+ $transaction[] = "
+ INSERT INTO eventmgt.add_on_sold
+ (
+ ticket_order,
+ ticket_sold,
+ add_on_name,
+ add_on_type,
+ add_on_type_name,
+ unit_name,
+ unit_price,
+ quant,
+ price_paid,
+ session_id
+ )
+ VALUES
+ (
+ (SELECT currval('eventmgt.ticket_order_id_seq')),
+ (SELECT currval('eventmgt.ticket_sold_id_seq')),
+ '".$a['name']."',
+ ".$a['add_on_type']['value'].",
+ '".$a['add_on_type']['nameEsc']."',
+ '".$a['unit_name']."',
+ ".$a['unit_cost_numb'].",
+ ".$a['selected'].",
+ ".($a['unit_cost_numb'] * $a['selected']).",
+ '".$sid."'
+ );
+ ";
+
+ } // quant selected
+ } // each add-on
+ } // have add-ons
+
+ // Check for any promos included
+ if (isset($t['promo']) && $t['promo']['credit_numb'] < 0) {
+
+ $transaction[] = "
+ INSERT INTO eventmgt.promo_sold
+ (
+ ticket_order,
+ ticket_sold,
+ promo,
+ promo_name,
+ promo_type,
+ promo_type_name,
+ amount,
+ session_id
+ )
+ VALUES
+ (
+ (SELECT currval('eventmgt.ticket_order_id_seq')),
+ (SELECT currval('eventmgt.ticket_sold_id_seq')),
+ ".$t['promo']['promo'].",
+ '".$t['promo']['promo_name']."',
+ ".$t['promo']['promo_type'].",
+ '".$t['promo']['promo_type_name']."',
+ ".$t['promo']['credit_each'].",
+ '".$sid."'
+ );
+ ";
+
+ } // promo
+
+ } // each individual ticket
+
+ // Update inventory
+ $availDecr = '';
+ if (!$t['unlimited_quant']) {
+ $availDecr = "available = available - ".$t['selected'].",";
+ }
+ $transaction[] = "
+ UPDATE eventmgt.ticket_inventory
+ SET $availDecr
+ sold = sold + ".$t['selected']."
+ WHERE id = ".$t['invID']."
+ ";
+
+ } // Each ticket type (inventory ID)
+
+ } // Each section
+
+ } // Each performance
+
+ } // Each ticket date
+
+ // Add SQL to clear holds
+ $transaction[] = "DELETE FROM eventmgt.inven_hold WHERE session_id = '".$sid."';";
+
+ // Attempt to process as a transaction - If checkout testing is not enabled.
+ if (!$this->config->option->checkout_testing) {
+ try {
+ $this->dbh->beginTransaction();
+ foreach ($transaction as $sql) {
+ $this->dbh->exec($sql);
+ }
+ $this->dbh->commit();
+ } catch (Exception $e) {
+ $this->dbh->rollBack();
+ $error_msg = $e->getMessage();
+
+ $trouble_email .= "Error storing request: $error_msg\n\n".print_r($checkout_sql, 1)."\n\n";
+
+ $this->debug_mail(
+ 'cscott@gaslightmedia.com',
+ 'Event Management V3 - Check-Out SQL Failure',
+ "Event Management V3 - Check-Out SQL Failure\n\n"
+ ."Error Msg: ".$error_msg."\n\n"
+ .print_r($sql,1)."\n\n"
+ ."Entire Transaction:\n\n".print_r($transaction,1),
+ ''
+ );
+
+ // Say we couldn't store the order
+ return false;
+ }
+
+ // Get order numbers and assign to proper cart entries
+ $sql = "
+ SELECT id
+ FROM eventmgt.ticket_order
+ WHERE session_id = '".$sid."'
+ AND member = ".$c['id']."
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $order = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // Say we were able to store the order just fine
+ return $order['id'];
+
+ } else {
+ // When checkout testing send the entire transaction to the debug page rather than execute it.
+ $this->sqlTransaction = $transaction;
+ }
+
+ }
+
+ /**
+ * Credit Card Number Input and Validation
+ *
+ * @param string $a Array element to store results - this function creates the entries
+ * @param string $f Name of the parameter
+ * @param string $cctype Selected card type
+ * @param string $ccnumb Card Number
+ * @param bool $req Required field flag
+ *
+ * @return array Array containing status and possible message
+ */
+ private function ccnumbInput($a, $f, $cctype, $req, $id)
+ {
+ // Check for ID prefix
+ $fname = $f;
+ if ($id != false) {
+ $fname = $id."_".$f;
+ }
+
+ // Get the card number
+ $in = preg_replace("/[^0-9.]/", "", trim(filter_input(INPUT_POST, $fname, FILTER_SANITIZE_NUMBER_INT)));
+
+ // Always pass GLM test card number - last digit controls auth response - see classes/paymentProcessors/Test.php
+ if (substr($in,0,15) == '001100110011001') {
+
+ $match = true;
+
+ // Otherwise we're going to check the card number against the specified card type
+ } else {
+
+ // Get the matching pattern for the supplied card type
+ $pattern = $this->config->ccverify->{$cctype};
+
+ // If we have a pattern then we have a valid card type, so try a match, otherwise it's just false
+ $match = false;
+ if ($pattern != '') {
+ $match = preg_match('/'.$pattern.'/', $in);
+ }
+
+ }
+
+ // Check the result
+ if (!$match) {
+ $problem = 'Card number does not appear to be correct for the selected card type.';
+ $this->inputFail = true;
+ }
+
+ // Setup results
+ $r = array(
+ 'value' => $in,
+ 'required' => $req,
+ 'problem' => $problem
+ );
+
+ // Store results into destination array
+ if ($id) {
+ $this->cd[$a][$id][$f] = $r;
+ } else {
+ $this->cd[$a][$f] = $r;
+ }
+
+ }
+
+ /**
+ * Create credit card type selection array
+ *
+ * array(
+ * 'value' = {selected card name if selected},
+ * 'required' = {field is required flag},
+ * 'problem' = {Problem description or empty string},
+ * 'cccards' = array(
+ * {month#} => array(
+ * 'month' => {month#},
+ * 'name' => {name of month},
+ * 'selected' = {bool}
+ * )
+ * )
+ * )
+ *
+ * @param $c Array of credit cards for venue with accepted flags
+ * @param $required Field is required flag
+ * @param $venue ID number of venue
+ * @param $cctype Supplied value of cctype or false if not supplied
+ * @param $init If set don't expect a value
+ *
+ * @return object containing array as sub-objects
+ */
+ private function buildCCTypeArray($c, $required = false, $venue = false, $cctypeVal = false, $init = false)
+ {
+
+ // Build credit cards accepted array
+ $cctype = array(
+ 'value' => '',
+ 'name' => '',
+ 'required' => $required,
+ 'problem' => '',
+ 'ccards' => array()
+ );
+
+ // If card is not specified in the function call, check for input value
+ if ($cctypeVal == false && isset($_REQUEST[$venue.'_cctype'])) {
+ $cctypeVal = (string) $_REQUEST[$venue.'_cctype'];
+ }
+
+ // Scan card types for accepted by venue
+ foreach ($c['cards_accepted']['bitmap'] as $ca) {
+
+ // If the card is selected for this venue
+ if ($ca['default']) {
+
+ // Check if this is the selected card
+ $selected = false;
+
+ // Make sure cctypeVal is not '' since 0 may be a valid card index
+ if ($cctypeVal != '' && $ca['value'] == $cctypeVal) {
+ $cctype['value'] = $ca['value'];
+ $cctype['name'] = $ca['name'];
+ $selected = true;
+ }
+
+ // Add it to the array
+ $cctype['ccards'][$ca['value']] = array(
+ 'name' => $ca['name'],
+ 'value' => $ca['value'],
+ 'selected' => $selected
+ );
+ }
+ }
+
+ // Check if required value was not supplied
+ if (!$init && $required && $cctype['value'] === '') {
+ $cctype['problem'] = 'Required value not supplied';
+ $this->inputFail = true;
+ }
+
+ return $cctype;
+
+ }
+
+ /**
+ * Create arrays for credit card expiration picks
+ *
+ * array(
+ * 'value' = {text value of expiration if set - i.e. 05/2013},
+ * 'required' = {field is required flag},
+ * 'problem' = {Problem description or empty string},
+ * 'ccmonths' = array(
+ * {month#} => array(
+ * 'month' => {month#},
+ * 'name' => {name of month},
+ * 'selected' = {bool}
+ * )
+ * ),
+ * 'ccyears' = array(
+ * {year} => array(
+ * 'year' => {year - 4 digits},
+ * 'selected' => {bool}
+ * )
+ * )
+ *
+ * @return object containing array as sub-objects
+ */
+ private function buildCCExpArray($required = false, $venue = false, $ccmonth = false, $ccyear = false, $init = false)
+ {
+
+ $monthNames = array(
+ 1 => 'January',
+ 2 => 'February',
+ 3 => 'March',
+ 4 => 'April',
+ 5 => 'May',
+ 6 => 'June',
+ 7 => 'July',
+ 8 => 'August',
+ 9 => 'September',
+ 10 => 'October',
+ 11 => 'November',
+ 12 => 'December'
+ );
+
+ $ccexp = array(
+ 'value' => '',
+ 'required' => $required,
+ 'problem' => '',
+ 'ccmonths' => array(),
+ 'ccyears' => array()
+ );
+
+ // If no month or specified in the function call, check for input values
+ if ($ccmonth == false && isset($_REQUEST[$venue.'_ccmonth'])) {
+ $ccmonth = ($_REQUEST[$venue.'_ccmonth'] - 0);
+ }
+ if ($ccyear == false && isset($_REQUEST[$venue.'_ccyear'])) {
+ $ccyear = ($_REQUEST[$venue.'_ccyear'] - 0);
+ }
+
+ // Build months list
+ $monthSelected = false;
+ for ($m=1 ; $m<=12 ; $m++) {
+ $selected = ($m == $ccmonth);
+ $ccexp['ccmonths'][$m] = array(
+ 'month' => $m,
+ 'name' => $monthNames[$m],
+ 'selected' => $selected
+ );
+ if ($selected) {
+ $monthSelected = true;
+ }
+ }
+
+ // If the supplied month didn't match anything, make sure it's set to false
+ if (!$monthSelected) {
+ $ccmonth = false;
+ }
+
+ // Build years list
+ $yearSelected = false;
+ for ($y=date('Y') ; $y<=date('Y',strtotime('now +10 years')) ; $y++) {
+ $selected = ($y == $ccyear);
+ $ccexp['ccyears'][$y] = array(
+ 'year' => $y,
+ 'selected' => $selected
+ );
+ if ($selected) {
+ $yearSelected = true;
+ }
+ }
+
+ // If this is an initialization of the field, then no validity checks
+ if ($init) {
+ return $ccexp;
+ }
+
+ // If the supplied year didn't match anything, make sure it's set to false
+ if (!$yearSelected) {
+ $ccyear = false;
+ }
+
+ // If there's a month and year, set the expriation value
+ if ($ccmonth != false && $ccyear != false) {
+ $ccexp['value'] = "$ccmonth/$ccyear";
+ }
+
+ // Check if required value was not supplied
+ if (!$init && $required && $ccexp['value'] == '') {
+ $ccexp['problem'] = 'Required value not supplied';
+ $this->inputFail = true;
+ return $ccexp;
+ }
+
+ // Check if supplied value is not in the past
+ $endOfExpMonth = strtotime("$ccmonth/1/$ccyear +1 month -1 day");
+ if (time() > $endOfExpMonth) {
+ $ccexp['problem'] = 'Expiration date has passed.';
+ $this->inputFail = true;
+ return $ccexp;
+ }
+
+ return $ccexp;
+ }
+
+ /**
+ * Build States array for use in pick-lists
+ *
+ * @param array $states Array of states
+ * @param string $selected State code of selected state
+ * @param boolean $required Is a required parameter
+ * @param boolean $checkProblem Set to false to prevent triggering problem output on initial setup
+ *
+ * @return array Array of states with 'stateID', 'stateName', 'stateSelected'
+ * @access public
+ */
+ private function createStatesArray($name, $selected = '', $required = false, $checkProblem = true)
+ {
+
+ $states = $this->config->states->toArray();
+
+ $value = false;
+ $problem = '';
+
+ // If nothing has been provided, check for URI input
+ if ($selected == '' || $selected == false) {
+ if (isset($_REQUEST[$name]) && $_REQUEST[$name] != '') {
+ $selected = $_REQUEST[$name];
+ }
+ }
+
+ $r = array();
+ while (list($key, $val) = each($states)) {
+ $r[$key] = array(
+ 'stateID' => $key,
+ 'stateName' => $val,
+ 'stateSelected' => ''
+ );
+
+ if ($key == $selected) {
+ $r[$key]['stateSelected'] = 'selected';
+ $value = $key;
+ $name = $val;
+ }
+ }
+
+ // Check for required
+ if ($required && $value == false && $checkProblem) {
+ $problem = 'Required but not selected.';
+ $this->inputFail = true;
+ }
+
+ $r = array(
+ 'value' => $value,
+ 'name' => $name,
+ 'required' => $required,
+ 'problem' => $problem,
+ 'states' => $r
+ );
+
+ return $r;
+ }
+
+ /**
+ * Build Countries array for use in pick-lists
+ *
+ * @param array $countries Array of countries
+ * @param string $selected Country code of selected country
+ * @param boolean $required Required parameter
+ * @param boolean $checkProblem Set to false to keep from triggering problem on initial setup
+ *
+ * @return array Array of countries with 'countryID', 'countryName', 'countrySelected'
+ * @access public
+ */
+ private function createCountriesArray($name, $selected = '', $required = false, $checkProblem = true)
+ {
+
+ $countries = $this->config->countries->toArray();
+
+ $value = false;
+ $problem = '';
+
+ // If nothing has been provided, check for URI input
+ if ($selected == '' || $selected == false) {
+ if (isset($_REQUEST[$name]) && $_REQUEST[$name] != '') {
+ $selected = $_REQUEST[$name];
+ }
+ }
+
+ $r = array();
+ while (list($key, $val) = each($countries)) {
+ $r[$key] = array(
+ 'countryID' => $key,
+ 'countryName' => $val,
+ 'countrySelected' => ''
+ );
+
+ if ($key == $selected) {
+ $r[$key]['countrySelected'] = 'selected';
+ $value = $key;
+ $name = $val;
+ }
+ }
+
+ // Check for required
+ if ($required && $value == false && $checkProblem) {
+ $problem = 'Required but not selected.';
+ $this->inputFail = true;
+ }
+
+ return array(
+ 'value' => $value,
+ 'name' => $name,
+ 'required' => $required,
+ 'problem' => $problem,
+ 'countries' => $r
+ );
+ }
+
+ /**
+ * If debug for mail turned on, display E-Mail messages rather than send them
+ *
+ * @access public
+ */
+ public function debug_mail( $to, $subject, $message, $headers = '', $parameters = '' )
+ {
+ if( $this->config->debug->mail )
+ {
+ echo '<p>
+ <table border="1">
+ <tr><th align="center">MAIL DEBUG</th></tr>
+ <tr><td align="left"> Recipient(s): '.$to.'</td></tr>
+ <tr><td align="left"> Subject: '.$subject.'</td></tr>
+ <tr><td align="left"> Headers:<br><pre>'.$headers.'</pre></td></tr>
+ <tr><td align="left"> Parameters:<br><pre>'.$parameters.'</pre></td></tr>
+ <tr><td align="left"> <pre>'.$message.'</pre></td></tr>
+ </table>
+ <p>
+ ';
+ return( true );
+ } else {
+ return( mail( $to, $subject, $message, $headers, $parameters ) );
+ }
+ }
+
+
+
+}
+
+?>
--- /dev/null
+<?php
+/**
+ * Event Management System
+ * Front-End support class
+ *
+ * menu.inc
+ * PHP version 5
+ *
+ * @category Admin
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/support.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+/**
+ * EventManagementFrontSupport class
+ *
+ * Event Management and Reservations System - Admin Code - Contacts ticket
+ *
+ * PHP version 5
+ *
+ * @category Event Management Admin Tickets
+ * @package EventManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release SVN: $Id: classes/support.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @link <>
+ */
+
+class EventManagementFrontSupport
+{
+
+ /**
+ * Configuration information object
+ * @var $ini
+ * @access public
+ */
+ protected $config;
+ /**
+ * Database Object
+ * @var $dbh
+ * @access public
+ */
+ protected $dbh;
+
+ function __construct($dbh, $config)
+ {
+
+ $this->dbh = $dbh;
+ $this->config = $config;
+
+ }
+
+ /**
+ * Get list of active members
+ *
+ * @return object containing array as sub-objects
+ */
+ public function getMembersList($option = 'all')
+ {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMembers.php';
+ $Members = new EventManagementDataMembers($this->dbh, $this->config);
+ $Members->optionIncludeSelectListData = false;
+ $membersList = $Members->getMembersList($option, 'TRUE', 'sort, name');
+ return $membersList;
+ }
+
+ /**
+ * Get list of entrances for a specific member
+ *
+ * @return object containing array as sub-objects
+ */
+ public function getEntrancesList($memberID)
+ {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataEntrances.php';
+ $Entrances = new EventManagementDataEntrances($this->dbh, $this->config);
+ $Entrances->optionIncludeSelectListData = false;
+ $entrancesList = $Entrances->getEntrancesList($memberID);
+ return $entrancesList;
+ }
+
+ /**
+ * Get information on a specific entrance
+ *
+ * @return object containing array as sub-objects
+ */
+ public function getEntranceData($entranceID)
+ {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataEntrances.php';
+ $Entrances = new EventManagementDataEntrances($this->dbh, $this->config);
+ $Entrances->optionIncludeSelectListData = false;
+ $entranceDetail = $Entrances->getEntranceDetail($entranceID);
+ return $entranceDetail;
+ }
+
+ /**
+ * Get information on a specific venue/member
+ *
+ * @return object containing array as sub-objects
+ */
+ public function getMemberData($memberID = false)
+ {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataMembers.php';
+ $Members = new EventManagementDataMembers($this->dbh, $this->config);
+ $Members->optionIncludeSelectListData = false;
+ $memberDetail = $Members->getMemberDetail($memberID);
+ return $memberDetail;
+ }
+
+ /**
+ * Get all information / tickets for a performance
+ * Organize for ticket selection on front end.
+ *
+ * This function returns detail about the performance,
+ * a list of sections, with a list of tickets under each,
+ * and a list of ticket inventory by ticket ID. The latter
+ * is sent to the front-end scripts as a JSON for interactive
+ * date and quantity selection.
+ *
+ * If the optional section ID is not provided, then all sections
+ * for the performance that have tickets will be included.
+ *
+ * @param $perfID integer A required performance ID
+ * @param $sectionID integer An optional sectionID
+ *
+ * @return object containing array of ...
+ * array(
+ * 'performanceDetail',
+ * 'sections',
+ * 'inventory'
+ * );
+ */
+ public function getAllPerformanceData($perfID = 0, $sectionID = 0)
+ {
+
+ $sections = array();
+ $inventory = array();
+ $oneSectionOnly = false;
+ $havePerformanceTickets = false;
+
+ // Check supplied Performance ID
+ if ($perfID == 0) {
+ $this->reason[] = 'No '.$this->config->term->event->norm.' has been selected.';
+ return false;
+ } else {
+
+ // Get selected performance data
+ $performanceDetail = $this->getPerformanceData($perfID);
+
+ // If we can't find the performance
+ if (!$performanceDetail) {
+ $this->reason[] = 'We were unable to find the selected '.$this->config->term->event->norm.'.';
+ } else {
+
+ // If a specific section is provided, then only do that section
+ $where = false;
+ if ($sectionID > 0) {
+ $where = "T.id = $sectionID";
+ }
+
+ // Get sections list for this member
+ $sectionsList = $this->getSectionList($performanceDetail['member_id'], $where);
+
+ // If there's only one, then note that for the template
+ if ($sectionsList && count($sectionsList) == 1) {
+ $oneSectionOnly = true;
+ }
+
+ // for each of the sections, get the performance data and tickets
+ foreach ($sectionsList as $section) {
+
+ $sectID = $section['id'];
+
+ // Get selected section data. We'll add this later if there's tickets found
+ $sectionDetail = $this->getSpecifiedSectionDetail($sectID);
+
+ // Get Ticket List for this performance and in the current section
+ $ticketList = $this->getSectionTicketList($perfID, $sectID);
+
+ // If no tickets found for this performance and section
+ if (!$ticketList) {
+ $this->reason[] = 'We were unable to find any '.$this->config->term->ticket->plur.' for this '.$this->config->term->event->norm.'.';
+ } else {
+
+ $havePerformanceTickets = true;
+
+ // Add this section to our sections list
+ $sections[$sectID] = array();
+ $sections[$sectID]['sectionDetail'] = $sectionDetail;
+
+ // Add ticket data to this section
+ $sections[$sectID]['ticketsData'] = array();
+ reset($ticketList);
+ foreach ($ticketList as $t) {
+ $sections[$sectID]['ticketsData'][$t['id']] = $t;
+ }
+
+ // Assemble data for each ticket (date, quant, etc)
+ $ticketsData = array();
+ reset($ticketList);
+ while (list($k, $v) = each($ticketList)) {
+
+ // Get inventory for this ticket
+ $inventoryList = $this->getInventoryList($v['id'], 'T.active', true);
+
+ $haveFutureInventory = false;
+
+ // For each inventory item
+ $invData = array();
+
+ // If no inventory found for this ticket
+ if (!$inventoryList) {
+
+ $this->reason[] = 'We were unable to find inventory for the selected '.$this->config->term->ticket->norm.'.';
+ } else {
+
+ foreach ($inventoryList as $inv) {
+
+ // Check for bogus inventory
+ if (($v['date_specific']['value'] == 1 && $inv['ticket_date']['date'] != '') ||
+ ($v['date_specific']['value'] != 1 && $inv['ticket_date']['date'] == '')) {
+
+ $invDate = $inv['ticket_date']['date'];
+
+ // Check if date in the future
+ if ($inv['ticket_date']['timestamp'] > strtotime('yesterday')) {
+ $haveFutureInventory = true;
+ }
+
+ // Trim unwanted data
+ unset($inv['ticket_name']);
+ unset($inv['ticket_id']);
+
+ // Determine if any of the dates are too late to buy on-line.
+ // If no timestamp then it's not a date-specific ticket, so no purchase leadtime issue.
+ if ($inv['ticket_date']['timestamp']) {
+ $timeStr = $inv['ticket_date']['date'].' '.$inv['ticket_time']['time'];
+ $ticketTime = strtotime($timeStr);
+ $leadTime = $performanceDetail['purch_leadtime']*3600;
+
+ // Admin users can override this
+ if ($_SESSION[GLM_EVENT_SESSION]['AdminUser']) {
+ $leadTime = 0;
+ }
+
+ $inv['tooLate'] = time() > ($ticketTime - $leadTime);
+
+
+ } else {
+ $inv['tooLate'] = false;
+ }
+
+ // Check for unlimited quantities
+ if ($inv['unlimited_quant']) {
+ $inv['available'] = $this->config->option->tickets_select_max;
+ }
+
+ $invData[$invDate] = $inv;
+
+ }
+ }
+ }
+
+ // Add ticket ID, date specific flag, and inventory list to our inventory array
+ $inventory[$v['id']] = array(
+ 'id' => $v['id'],
+ 'haveFutureInventory' => $haveFutureInventory,
+ 'dateSpecific' => $v['date_specific']['value'],
+ 'startDate' => $v['start_date']['date'],
+ 'endDate' => $v['end_date']['date'],
+ 'inventory' => $invData
+ );
+
+ // Check for ticket add-ons
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataAddons.php';
+ $Addons = new EventManagementDataAddons($this->dbh, $this->config);
+ $ticketAddonsList = $Addons->getAddonsList($v['id']);
+ if ($ticketAddonsList) {
+ foreach($ticketAddonsList as $ta) {
+ $ta['selected'] = 0;
+ $sections[$sectID]['ticketsData'][$v['id']]['addons'][$ta['id']] = $ta;
+ }
+ }
+
+ // Check for package data
+ if ($this->config->option->packages && $v['ticket_type']['value'] == 20) {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';
+ $TicketPackages = new EventManagementDataTicketPackages($this->dbh, $this->config);
+ $packageData = $TicketPackages->getPackageList("package = ".$v['id']);
+ $sections[$sectID]['ticketsData'][$v['id']]['packageData'] = $packageData;
+ }
+
+ // Determine if tickets may or may not be purchased at this time
+ $mayBuyNow = true;
+ $tooEarlyToBuy = false;
+ if ($v['for_sale_start_date']['date'] != null && $v['for_sale_start_date']['date'] != '') {
+ if (time() < $v['for_sale_start_date']['timestamp']) {
+ $tooEarlyToBuy = true;
+ $mayBuyNow = false;
+ }
+ }
+ $tooLateToBuy = false;
+ if ($v['for_sale_end_date']['date'] != null && $v['for_sale_end_date']['date'] != '') {
+ if (time() > strtotime($v['for_sale_end_date']['date'].' +1 day')) {
+ $tooLateToBuy = true;
+ $mayBuyNow = false;
+ }
+ }
+ $sections[$sectID]['ticketsData'][$v['id']]['mayBuyNow'] = $mayBuyNow;
+ $sections[$sectID]['ticketsData'][$v['id']]['tooEarlyToBuy'] = $tooEarlyToBuy;
+ $sections[$sectID]['ticketsData'][$v['id']]['tooLateToBuy'] = $tooLateToBuy;
+
+ $sections[$sectID]['ticketsData'][$v['id']]['start_end_dates_same'] = ($v['start_date'] == $v['end_date']);
+
+ } // each ticket
+
+ } // Have tickets
+
+ } // For each section for this member
+
+ } // Have performance data
+
+ } // Have performance ID
+
+ if (!$havePerformanceTickets) {
+ return false;
+ }
+
+ // Assemble return data array
+ $perfData = array(
+ 'oneSectionOnly' => $oneSectionOnly, // Flag that indicates if we have more than one section listed
+ 'performanceDetail' => $performanceDetail, // Detail about requested Performance
+ 'sections' => $sections, // Array of sections with section detail and ticket data
+ 'inventory' => $inventory // Array of ticket inventory
+
+ );
+
+ return $perfData;
+
+ }
+
+
+ /**
+ * Get information on a specific performance based on performance selected in URI or session
+ *
+ * @return object containing array as sub-objects
+ */
+ public function getPerformancesList($memberID, $listType = 'member')
+ {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPerformances.php';
+ $Performances = new EventManagementDataPerformances($this->dbh, $this->config);
+ $Performances->optionIncludeSelectListData = false;
+ $performancesList = $Performances->getPerformancesList($listType, $memberID, $_SESSION[GLM_EVENT_SESSION]['AdminUser']);
+ return $performancesList;
+ }
+
+ /**
+ * Get information on a specific performance based on performance selected in URI or session
+ *
+ * @return object containing array as sub-objects
+ */
+ public function getPerformanceData($perfID = false)
+ {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPerformances.php';
+ $Performances = new EventManagementDataPerformances($this->dbh, $this->config);
+ $Performances->optionIncludeSelectListData = false;
+ $performanceDetail = $Performances->getPerformanceDetail($perfID);
+ return $performanceDetail;
+ }
+
+ /**
+ * Get information on sections for a member
+ *
+ * @var $id ID of member
+ * @return object containing array as sub-objects
+ */
+ public function getSectionList($memberID = false, $where = false)
+ {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataSections.php';
+ $Sections = new EventManagementDataSections($this->dbh, $this->config);
+ $Sections->optionIncludeSelectListData = false;
+ $sectionsList = $Sections->getSectionsList($memberID, $where);
+ return $sectionsList;
+ }
+
+ /**
+ * Get information on a specific section
+ *
+ * @var $id ID of section
+ * @return object containing array as sub-objects
+ */
+ public function getSpecifiedSectionDetail($sectionID = false)
+ {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataSections.php';
+ $Sections = new EventManagementDataSections($this->dbh, $this->config);
+ $Sections->optionIncludeSelectListData = false;
+ $sectionsDetail = $Sections->getSectionDetail($sectionID);
+ return $sectionsDetail;
+ }
+
+ /**
+ * Get section ticket list
+ *
+ * @var $id ID of section
+ * @return object containing array as sub-objects
+ */
+ public function getSectionTicketList($performance, $section)
+ {
+ // Get Tickets and Inventory Information
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTickets.php';
+ $Tickets = new EventManagementDataTickets($this->dbh, $this->config);
+ $Tickets->optionIncludeSelectListData = false;
+ $ticketsList = $Tickets->getTicketsList(false, $performance, $section, false, true, false, $_SESSION[GLM_EVENT_SESSION]['AdminUser'], false, $this->config->option->packages);
+
+ return $ticketsList;
+ }
+
+ /**
+ * Get specific ticket detail
+ *
+ * @var $id ID of ticket
+ * @return object containing array as sub-objects
+ */
+ public function getSpecifiedTicketDetail($ticketID = false)
+ {
+ // Get Tickets and Inventory Information
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTickets.php';
+ $Tickets = new EventManagementDataTickets($this->dbh, $this->config);
+ $Tickets->optionIncludeSelectListData = false;
+ $ticketDetail = $Tickets->getTicketDetail($ticketID);
+
+ // Check for ticket add-ons
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataAddons.php';
+ $Addons = new EventManagementDataAddons($this->dbh, $this->config);
+ $Addons->optionIncludeSelectListData = false;
+ $ticketAddonsList = $Addons->getAddonsList($ticketID);
+ if ($ticketAddonsList) {
+ foreach($ticketAddonsList as $ta) {
+ $ta['selected'] = 0;
+ $ticketDetail['addons'][$ta['id']] = $ta;
+ }
+ }
+
+ return $ticketDetail;
+ }
+
+ /**
+ * Get inventory for a ticket
+ *
+ * @var $id ID of inventory item
+ * @return object containing array as sub-objects
+ */
+ public function getInventoryList($ticketID = false, $where = 'T.active', $dateKey = false)
+ {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketInventory.php';
+ $TicketInventory = new EventManagementDataTicketInventory($this->dbh, $this->config);
+ $TicketInventory->optionIncludeSelectListData = false;
+ $inventoryList = $TicketInventory->getTicketInventoryList($ticketID, $where, $dateKey);
+ return $inventoryList;
+ }
+
+ /**
+ * Get specific ticket inventory item information
+ * Optionally get extended data for section and entrance
+ *
+ * @var $id ID of inventory item
+ * @return object containing array as sub-objects
+ */
+ public function getInventoryDetail($invenID = false, $extended = false)
+ {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketInventory.php';
+ $TicketInventory = new EventManagementDataTicketInventory($this->dbh, $this->config);
+ $TicketInventory->optionIncludeSelectListData = false;
+ $inventoryDetail = $TicketInventory->getTicketInventoryDetail($invenID, $extended);
+ return $inventoryDetail;
+ }
+
+ /**
+ * Get list of tickets for a particular promo code
+ *
+ * @var $ticketID ID of ticket
+ * @return object containing array as sub-objects
+ */
+ public function getPromoTicketsList($promoCode)
+ {
+ // Get Tickets and Inventory Information
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPromoTickets.php';
+ $promoTickets = new EventManagementDataPromoTickets($this->dbh, $this->config);
+ $promoTickets->optionIncludeSelectListData = false;
+
+ $promoTicketsList = $promoTickets->getPromoTicketsList(false, $promoCode);
+
+ // Use ticket IDs as the index
+ $pt = array();
+ if ($promoTicketsList && count($promoTicketsList) > 0) {
+ foreach($promoTicketsList as $p) {
+ $pt[$p['ticket']] = $p;
+ }
+ }
+
+ return $pt;
+ }
+
+ /**
+ * Format a number as money
+ *
+ * @param $value Value to format
+ * @param $option Options that control output
+ * NOPREFIX stops the "$" prefix
+ *
+ * @return none
+ * @access public
+ */
+ private function money($value, $option = "")
+ {
+
+ if ($option == "NOPREFIX")
+ $prefix = "";
+ else
+ $prefix = "$";
+
+ // Do value sanity check
+
+ if (!is_numeric($value))
+ return ($prefix."0.00");
+
+ return ($prefix.number_format($value, 2, ".", ","));
+ }
+
+ /*
+ * Get current number held and number available
+ * Also return if unlimited quantity ticket
+ *
+ * @var $id ID of ticket_inventory item
+ * @return object containing array as sub-objects
+ */
+ private function getInvenStatus($id)
+ {
+
+ // Check if inventory ID is sane
+ if (($id-0) == 0) {
+ return false;
+ }
+
+ // Get available and held quantities.
+ $sql = "
+ SELECT I.available as available,
+ T.unlimited_quant as unlimited_quant,
+ (
+ SELECT SUM(quant)
+ FROM eventmgt.inven_hold
+ WHERE hold_type = ".$this->config->hold_types->ticket."
+ AND inventory = $id
+ AND expire_time > 'now'
+ ) AS held
+ FROM eventmgt.ticket_inventory I,
+ eventmgt.ticket T
+ WHERE I.id = $id
+ AND T.id = I.ticket
+ ;";
+ $stmt = $this->dbh->prepare($sql);
+ $stmt->execute();
+ $s = $stmt->fetch(PDO::FETCH_ASSOC);
+
+ // Calculated net available
+ $s['avail_not_held'] = $s['available'] - ($s['held'] - 0);
+
+ // Check if unlimited quant and if so set to maximum selectable
+ if ($s['unlimited_quant']) {
+ $s['available'] = $this->config->option->tickets_select_max;
+ $s['avail_not_held'] = $this->config->option->tickets_select_max;
+ }
+
+ // Include inventory item ID for reference
+ $s['invID'] = $id;
+
+ return $s;
+ }
+
+ /**
+ * Check for new cart submission and get all cart data
+ *
+ * @param cart Array containing status, reasons, and cart contents
+ * @return object containing array as sub-objects
+ */
+ private function checkCartAdd($d)
+ {
+
+ // If there's nothing being added
+ if (!isset($_REQUEST['cart']) || $_REQUEST['cart'] != 'add') {
+ return $d;
+ }
+
+ // Check if we received a single item
+ if (isset($_REQUEST['ticket_inv'])) {
+ $invItem = ($_REQUEST['ticket_inv']-0);
+ $addon = ($_REQUEST['addon']-0);
+ $quant = ($_REQUEST['quant']-0);
+
+ if (($quant-0) > 0) {
+
+ $d = $this->addItemToCart($d, invItem, $addon, quant);
+
+ }
+ }
+
+ // Check if we're receiving an array of new additions
+ if (isset($_REQUEST['ticket_inv_array'])) {
+
+ // Key is ticket ID, value is inventory ID
+ $tickInvArray = $_REQUEST['ticket_inv_array'];
+ if (is_array($tickInvArray) && count($tickInvArray) > 0) {
+ while (list($k, $v) = each($tickInvArray)) {
+ $invItem = $v;
+ $quant = $_REQUEST['quant'][$k];
+ if (($quant-0) > 0) {
+ $d = $this->addItemToCart($d, $v, 0, $quant);
+ }
+ }
+ }
+
+ // Check for any add-ons
+ $GLMaddonTicketInvID = $_REQUEST['GLMaddonTicketInvID'];
+ if (is_array($GLMaddonTicketInvID) && count($GLMaddonTicketInvID) > 0) {
+ while (list($k2, $v2) = each($GLMaddonTicketInvID)) {
+ $addon = $_REQUEST['GLMaddonID'][$k2];
+ $quant = $_REQUEST['GLMaddonQuant'][$k2];
+ if (($quant-0) > 0) {
+ $d = $this->addItemToCart($d, $v2, $addon, $quant);
+ }
+ }
+ }
+ }
+
+ // Update cart in session
+ $_SESSION[GLM_EVENT_SESSION]['TicketCart'] = $d['cart'];
+
+ return $d;
+
+ }
+
+ /**
+ * Add a ticket to the cart
+ *
+ * @param cart Array containing status, reasons, and cart contents
+ * other parameters to be determined
+ * @return object containing array as sub-objects
+ */
+ private function addItemToCart($d, $invItem, $addon, $quant)
+ {
+
+ // Check if request is sane
+ if ($invItem > 0 && $quant > 0) {
+
+ // If this is an add-on request
+ if ($addon > 0) {
+
+ // Check if this addon is the same as another entry and merge
+ if (isset($d['cart'][$invItem]['addons'][$addon])) {
+ // Add the new quantity
+ $d['cart'][$invItem]['addons'][$addon]['quant'] += 1;
+ } else {
+ $d['cart'][$invItem]['addons'][$addon] = array(
+ 'id' => $addon,
+ 'quant' => $quant
+ );
+ }
+
+ return $d;
+
+ }
+
+ // Get current quantity and number held (also clears old entries)
+ $ticketQuant = $this->getInvenStatus($invItem);
+
+ // If there's not enough available
+ if (!$ticketQuant['unlimited_quant'] && $quant > $ticketQuant['avail_not_held']) {
+ $d['reason'][] = 'The quantity requested was greater than number currently available.';
+ return $d;
+ }
+
+ } else {
+ $d['reason'][] = 'The request to add to the cart was not complete or an unknown error occurred.';
+ return $d;
+ }
+
+ // Check if the new tickets are the same as another entry and merge
+ if (isset($d['cart'][$invItem])) {
+
+ // Add the new quantity
+ $d['cart'][$invItem]['quant'] += $quant;
+
+ } else {
+
+ // Get inventory item data
+ $invenDetail = $this->getInventoryDetail($invItem);
+
+ // Not same as an existing entry, so add it
+ $d['cart'][$invItem] = array(
+ 'invenID' => $invItem,
+ 'member' => $invenDetail['member'],
+ 'assigned' => false,
+ 'quant' => $quant
+ );
+
+ }
+
+ return $d;
+
+ }
+
+ /**
+ * Check for cart update
+ *
+ * @param cart Array containing status, reasons, and cart contents
+ * @return object containing array as sub-objects
+ */
+ private function checkCartUpdate($d)
+ {
+
+ // If the cart's not being updated
+ if (!isset($_REQUEST['cart']) || $_REQUEST['cart'] != 'update') {
+ return $d;
+ }
+
+ // Get updated ticket data
+ $invItem = ($_REQUEST['ticket_inv']-0);
+ $addon = ($_REQUEST['addon']-0);
+ $quant = ($_REQUEST['quant']-0);
+
+ // Check if request isn't sane
+ if ($invItem == 0) {
+ $d['reason'][] = 'The request to change a cart quantity was not complete or an unknown error occurred.';
+ return $d;
+ }
+
+ // If this is an add-on update
+ if ($addon > 0) {
+
+ $d['cart'][$invItem]['addons'][$addon] = array(
+ 'id' => $addon,
+ 'quant' => $quant
+ );
+
+ // Otherwise it's a regular ticket update
+ } else {
+
+ // Get current quantity and number held
+ $ticketQuant = $this->getInvenStatus($invItem);
+
+ // If there's not enough available (for this session, which is why we add the selected quant back in)
+ if (!$ticketQuant['unlimited_quant'] && $quant > $ticketQuant['avail_not_held'] + $d['cart'][$invItem]['quant']) {
+ $d['reason'][] = 'The quantity requested was greater than number currently available.';
+ return $d;
+ }
+
+ // If quantity is 0 then delete the entry unless it's a sticky item, otherwise update it
+ if ($quant == 0 && !$_SESSION[GLM_EVENT_SESSION]['TicketCart'][$invItem]['sticky']) {
+ unset($d['cart'][$invItem]);
+ } else {
+ $d['cart'][$invItem]['quant'] = $quant;
+ }
+
+ // If there's still a cart entry and it's 0 now
+ if (isset($d['cart'][$invItem]) && $d['cart'][$invItem]['quant'] == 0) {
+
+ // Set any addons to 0
+ if (isset($d['cart'][$invItem]['addons']) && count($d['cart'][$invItem]['addons']) > 0) {
+ foreach ($d['cart'][$invItem]['addons'] as $a) {
+ $d['cart'][$invItem]['addons'][$a['id']]['quant'] = 0;
+ }
+ }
+
+ }
+
+ }
+
+ // Update cart in session
+ $_SESSION[GLM_EVENT_SESSION]['TicketCart'] = $d['cart'];
+
+ return $d;
+
+ }
+
+ /**
+ * Update holds for the provided cart
+ *
+ * @param cart Array containing status, reasons, and cart contents
+ * @return null
+ */
+ private function updateHolds($cart)
+ {
+
+ // Start by deleting all holds for this session
+ $sql = "
+ BEGIN;
+ DELETE FROM eventmgt.inven_hold
+ WHERE session_id = '".$_SESSION[GLM_EVENT_SESSION]['SessionID']."'
+ ;";
+
+ $expTime = date('r', strtotime('now +'.$this->config->ticket_hold_time.' minutes'));
+
+ // For each cart entry
+ if ($cart != false) {
+
+ foreach ($cart as $c) {
+
+ // Check if this is a valid cart entry
+ if (isset($c['invenID']) && count($c['invenID']) > 0) {
+
+ // Recreate hold with updated expire time
+ $sql .= "
+ INSERT INTO eventmgt.inven_hold
+ (
+ hold_type, inventory, quant, expire_time, session_id
+ )
+ VALUES
+ (
+ ".$this->config->hold_types->ticket.",
+ ".$c['invenID'].",
+ ".$c['quant'].",
+ '$expTime',
+ '".$_SESSION[GLM_EVENT_SESSION]['SessionID']."'
+ )
+ ;";
+
+ }
+ }
+
+ }
+
+ $sql .= 'COMMIT;';
+ $this->dbh->exec($sql);
+
+ }
+
+ /**
+ * Check cart for new submissions or updates and return current cart data
+ *
+ * Structure of cart array in SESSION
+ *
+ * array(
+ * 'cartID' => array(
+ * 'invenID' => {ID of the eventmgt.ticket_inventory item},
+ * 'quant' => {number requested}
+ * )
+ * )
+ *
+ * @return object containing array as sub-objects
+ */
+ public function checkCart($checkout = false)
+ {
+ // Housecleaning: Remove all old hold entries
+ // If they timed out they don't matter anyway, but this cleans up the table
+ $this->dbh->exec("DELETE FROM eventmgt.inven_hold WHERE expire_time < 'now';");
+
+ $r = array(
+ 'status' => false,
+ 'reason' => array(),
+ 'cartHasContents' => false,
+ 'cartRequiresPayment' => true,
+ 'cart' => $_SESSION[GLM_EVENT_SESSION]['TicketCart'],
+ 'cartData' => false,
+ 'cartDataReorganized' => false,
+ 'blockCheckout' => false,
+ 'blockCheckoutNonAssignment' => false,
+ 'doingAdditionalInfo' => false,
+ 'forceCheckoutPhase' => false,
+ 'checkoutComplete' => false
+ );
+
+ /*
+ * Check if any credit cards have been charged for any venues.
+ * If none are charged then we're not checked out but we aren't forcing checkout phase
+ * If some were charged and others weren't, then we're forcing checkout phase
+ * If all were charged, then checkout is complete
+ */
+ if ($_SESSION[GLM_EVENT_SESSION]['TicketPayments'] != false) {
+
+ // Check each payment entry to see if any have been charged and any are not
+ $charged = false;
+ $notCharged = false;
+ foreach ($_SESSION[GLM_EVENT_SESSION]['TicketPayments'] as $pmt) {
+ if ($pmt['approved']) {
+ $charged = true;
+ } else {
+ $notCharged = true;
+ }
+ }
+
+ // if all were charged and none not charged
+ if ($charged && !$notCharged) {
+ $r['checkoutComplete'] = true; // Checkout complete
+ }
+
+ // If some were charged and some weren't
+ if ($charged && $notCharged) {
+ $r['forceCheckoutPhase'] = true; // Partial checkout so Set forceCheckoutPhase
+ }
+
+ }
+
+ // Only check for cart additions or updates if forceCheckoutPhase is not set
+ if (!$r['forceCheckoutPhase']) {
+
+ // Check if anything is being added to the cart
+ $r = $this->checkCartAdd($r);
+
+ // Check if there's a cart update
+ $r = $this->checkCartUpdate($r);
+
+ }
+
+ // Update Holds for this cart
+ $this->updateHolds($r['cart']);
+
+ // We're here so must be successful
+ $r['status'] = true;
+
+ /*
+ * We're now going to build an array of cart contents for output with the following structure
+ *
+ * [member & assignment], [date], [perfomance], [section], [ticket], [quant & inventory]
+ */
+ $cartData = array();
+
+ // Check if there's anything in the cart
+ $cartItemRemoved = false; // To track whether we had to delete an item from the cart for missing data
+ if ($r['cart'] != false) {
+
+ $totalVenues = 0;
+ $totalTickets = 0;
+ $totalNoPayment = 0;
+ $grandTotalPrice = 0;
+ $totalPrice = 0;
+
+ // Check to see if there's an active promo code and return ticket info for that code
+ $promoTicketsList = false;
+ if (isset($_SESSION[GLM_EVENT_SESSION]['PromoCode']) && $_SESSION[GLM_EVENT_SESSION]['PromoCode'] != '') {
+ $promoTicketsList = $this->getPromoTicketsList($_SESSION[GLM_EVENT_SESSION]['PromoCode']);
+ }
+
+ // Get all data associated with this cart entry
+ foreach ($r['cart'] as $c) {
+
+ // Get inventory record detail and status
+ $invID = $c['invenID'];
+ $invDetail = $this->getInventoryDetail($invID);
+ $invStatus = $this->getInvenStatus($invID);
+
+ // Get Ticket info
+ $ticketDetail = $this->getSpecifiedTicketDetail($invDetail['ticket_id']);
+
+ $memb = $ticketDetail['member'];
+
+ // Check for assignment
+ $assignedFrom = false;
+ $assigned = false;
+ $assignedEntrance = false;
+ if ($checkout && isset($_SESSION[GLM_EVENT_SESSION]['Assignment'][$memb])) {
+
+ // Keep track of original ticket member
+ $assignedFrom = $memb;
+
+ // Set assignment information for this cart entry
+ $assigned = $_SESSION[GLM_EVENT_SESSION]['Assignment'][$memb];
+
+ // And save back into session cart
+ $_SESSION[GLM_EVENT_SESSION]['TicketCart'][$invID]['assigned'] = $assigned;
+
+ // Now set our current member to the assignment
+ $memb = $assigned;
+
+ // Also get the assigned from member name
+ $mDet = $this->getMemberData($assignedFrom);
+ $assignedFromName = $mDet['name'];
+ unset($mDet);
+
+ // Also now check if there's been an entrance assignment
+ if (isset($_SESSION[GLM_EVENT_MGT_FRONT]['AssignmentEntrance'][$assignedFrom])) {
+ $assignedEntrance = $_SESSION[GLM_EVENT_SESSION]['AssignmentEntrance'][$assignedFrom];
+ }
+
+ }
+
+ // Get member info
+ $memberDetail = $this->getMemberData($memb);
+
+ // Get Section info
+ $sectionDetail = $this->getSpecifiedSectionDetail($ticketDetail['section_id']);
+
+ // Get performance info
+ $performanceDetail = $this->getPerformanceData($ticketDetail['performance_id']);
+
+ // Make sure we have all needed information - Perhaps something has been deleted
+ if ($ticketDetail && $memberDetail && $memberDetail['active']['value'] && $sectionDetail && performanceDetail) {
+
+ // If Venue/Member hasn't been added yet
+ $membID = $memberDetail['id'];
+ if (!isset($cartData[$membID])) {
+
+ $cartData[$membID] = $memberDetail;
+ $cartData[$membID]['assigned'] = ($assignedFrom != false);
+ $cartData[$membID]['assigned_from'] = $assignedFrom;
+ $cartData[$membID]['assigned_from_name'] = $assignedFromName;
+ $cartData[$membID]['needLikelyDate'] = false;
+ $cartData[$membID]['likelyDate'] = false;
+ $cartData[$membID]['dates'] = array();
+ $cartData[$membID]['totalTickets'] = 0;
+ $cartData[$membID]['totalPrice'] = 0;
+ $cartData[$membID]['totalPrice_numb'] = 0;
+ $cartData[$membID]['no_payment'] = false;
+
+ $totalVenues++;
+
+ // Also check for a completed payment for this member
+ if (isset($_SESSION[GLM_EVENT_SESSION]['TicketPayments'][$membID]) && $_SESSION[GLM_EVENT_SESSION]['TicketPayments'][$membID]['approved']) {
+
+ // Add this payment information to the cart
+ $cartData[$membID]['paymentResult'] = $_SESSION[GLM_EVENT_SESSION]['TicketPayments'][$membID];
+ }
+
+ }
+
+ // Set alias for dates array
+ $dates = &$cartData[$membID]['dates'];
+
+ // If Date hasn't been added yet - also check for no date (non date-specific)
+ $date = $invDetail['ticket_date']['date'];
+ if ($date == '') {
+ $date = 0;
+ }
+ if (!isset($dates[$date])) {
+ $dates[$date] = array(
+ 'date' => $date,
+ 'fullDate' => date('l F j, Y', strtotime($date)),
+ 'performances' => array(),
+ 'dateSpecific' => (trim($date) != '' && strtotime($date) > 0)
+ );
+ }
+ $performances = &$dates[$date]['performances'];
+
+ // If Performance hasn't been added yet
+ $perfID = $performanceDetail['id'];
+ if (!isset($performances[$perfID])) {
+ $performances[$perfID] = $performanceDetail;
+ $performances[$perfID]['sections'] = array();
+ }
+ $sections = &$performances[$perfID]['sections'];
+
+ // If Section hasn't been added yet
+ $sectID = $sectionDetail['id'];
+ if (!isset($sections[$sectID])) {
+ $sections[$sectID] = $sectionDetail;
+ $sections[$sectID]['tickets'] = array();
+
+ // Check if there's been an Entrance Assignment and use that for the entrance data for the section
+ if ($assignedEntrance) {
+ $sections[$sectID]['entrance'] = $assignedEntrance;
+ }
+
+ // If we have an entrance with this section, get the detail
+ if ($sections[$sectID]['entrance']) {
+ $sections[$sectID]['entranceDetail'] = $this->getEntranceData($sections[$sectID]['entrance']);
+ }
+
+ }
+ $tickets = &$sections[$sectID]['tickets'];
+
+ // If this ticket hasn't been added yet (shouldn't be)
+ $ticID = $ticketDetail['id'];
+ if (!isset($tickets[$ticID])) {
+
+ // Add ticket detail to tickets and set other standard parameters
+ $tickets[$ticID] = array_merge($ticketDetail, $invStatus);
+ $tickets[$ticID]['selected'] = $c['quant'];
+ $tickets[$ticID]['show_price'] = true; // False if only price is with add-ons
+ $tickets[$ticID]['show_accumulated_total'] = false; // Use when add-ons are included
+ $tickets[$ticID]['show_addons'] = false; // Use when add-ons are included
+ $tickets[$ticID]['problem'] = false;
+
+ // Calculate base ticket price
+ $ext = $c['quant'] * $ticketDetail['price_numb'];
+
+ // Do we have any addons for this ticket?
+ if (count($ticketDetail['addons']) > 0) {
+
+ // For each add-on associated with this ticket
+ $addons_ext = 0;
+ foreach ($ticketDetail['addons'] as $a) {
+
+ // If this addon is in the cart
+ if (isset($c['addons']) && isset($c['addons'][$a['id']])) {
+
+ // Check if no cost is with the ticket, only in the add-on
+ if ($ext == 0) {
+ $tickets[$ticID]['show_price'] = false;
+ }
+
+ // Set the quantity and tally price
+ $addon_quant = $c['addons'][$a['id']]['quant'];
+ $tickets[$ticID]['addons'][$a['id']]['selected'] = $addon_quant;
+ $addon_ext = $addon_quant * $a['unit_cost_numb'] * $c['quant'];
+ $tickets[$ticID]['addons'][$a['id']]['ext'] = $addon_ext;
+ $tickets[$ticID]['addons'][$a['id']]['money'] = $this->money($addon_ext);
+
+ // add to total addons for this ticket
+ $addons_ext += $addon_ext;
+
+ }
+ }
+
+ // determine what to show for this ticket
+ $tickets[$ticID]['show_accumulated_total'] = true;
+ if ($tickets[$ticID]['price_numb'] == 0) {
+ $tickets[$ticID]['show_price'] = false;
+ }
+
+ // If we have a ticket quantity, then show the addons
+ if ($c['quant'] > 0) {
+ $tickets[$ticID]['show_addons'] = true;
+ }
+
+ // Add the add-ons price to this ticket extended total
+ $ext += $addons_ext;
+
+ // Check if add-ons are required for this ticket type
+ $tickets[$ticID]['required_addon_not_supplied'] = false;
+ if ($c['quant'] > 0 && $ticketDetail['addon_required']['value'] && $addons_ext == 0) {
+ $tickets[$ticID]['required_addon_not_supplied'] = true;
+ $r['reason'][] = $ticketDetail['performance'].' requires selection of at least one associated add-on item!';
+ $r['blockCheckout'] = true;
+ $r['blockCheckoutNonAssignment'] = true;
+ $tickets[$ticID]['problem'] = true;
+ $tickets[$ticID]['problemText'] = $ticketDetail['performance'].' requires selection of at least one of the following!';
+ }
+
+ }
+
+ // If there's any ticket price > 0 and we have a promo with this ticket and it's within the date range
+ $promoCredit = 0;
+ $today = strtotime('today');
+ $tomorrow = strtotime('tomorrow');
+ if ($ext > 0 && isset($promoTicketsList[$ticID]) &&
+ strtotime($promoTicketsList[$ticID]['promo_start_date']) <= $today &&
+ strtotime($promoTicketsList[$ticID]['promo_end_date']) >= $today
+ ) {
+
+ // Promo and dates are valid, so credit accordingly
+ switch($promoTicketsList[$ticID]['promo_type']['value']) {
+
+ // $ amount
+ case 1:
+ $credit_each = $promoTicketsList[$ticID]['amount'];
+ $credit = -1 * $credit_each * $c['quant'];
+ break;
+
+ // Percentage
+ case 2:
+ $credit_each = $ext * ($promoTicketsList[$ticID]['amount']/100);
+ $credit = -1 * $credit_each * $c['quant'];
+ break;
+ }
+
+ // Add to ticket data
+ $tickets[$ticID]['promo'] = array(
+ 'promo' => $promoTicketsList[$ticID]['promo'],
+ 'promo_name' => $promoTicketsList[$ticID]['promo_name'],
+ 'promo_type' => $promoTicketsList[$ticID]['promo_type']['value'],
+ 'promo_type_name' => $promoTicketsList[$ticID]['promo_type']['nameEsc'],
+ 'credit_each' => $credit_each,
+ 'credit_numb' => $credit,
+ 'credit' => $this->money($credit)
+ );
+
+ // Update extended price for this ticket
+ $promoCredit += $credit;
+
+ }
+
+ $tickets[$ticID]['extended'] = $this->money($ext);
+ $tickets[$ticID]['extended_numb'] = $ext;
+
+ // Add to venue totals
+ $cartData[$membID]['totalTickets'] += $c['quant'];
+ $cartData[$membID]['totalPrice_numb'] += $ext + $promoCredit;
+ $cartData[$membID]['totalPrice'] = $this->money($cartData[$membID]['totalPrice_numb']);
+
+ // Add to master totals
+ $totalTickets += $c['quant'];
+ $grandTotalPrice += $ext + $promoCredit;
+ if ($memberDetail['payment_gateway']['value'] != $this->config->ccard_processor_numb->no_payment) {
+ $totalPrice += $ext + $promoCredit;
+
+ } else {
+ $totalNoPayment += $ext + $promoCredit;
+ $cartData[$membID]['no_payment'] = true;
+ }
+
+ // Calculate max number this session may select - Number not held + quantity this person has selected
+ $tickets[$ticID]['thisSessionSelectable'] = $invStatus['avail_not_held'] + $c['quant'];
+
+ } else {
+ $r['reason'][] = 'There has been a cart error: duplicate cart entries!';
+ return $r;
+ }
+
+ // Check if ticket is non-date-specific, and a voucher type < 80 (a ticket kind of thing), and it's sold, then it needs a likely date
+ if (!$ticketDetail['date_specific']['value'] && $ticketDetail['voucher_type']['value'] < 80 && $c['quant'] > 0) {
+
+ $cartData[$membID]['needLikelyDate'] = true;
+
+ // Also check if a likely date has been submitted
+ $dateMemb = $cartData[$membID]['assigned_from'];
+ if (($dateMemb-0) == 0) {
+ $dateMemb = $membID;
+ }
+ if (isset($_SESSION[GLM_EVENT_SESSION]['LikelyDate'][$dateMemb])) {
+ $cartData[$membID]['likelyDate'] = $_SESSION[GLM_EVENT_SESSION]['LikelyDate'][$dateMemb];
+ }
+ }
+
+ // Check for package data
+ if ($this->config->option->packages && $ticketDetail['ticket_type']['value'] == 20) {
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';
+ $TicketPackages = new EventManagementDataTicketPackages($this->dbh, $this->config);
+ $packageData = $TicketPackages->getPackageList("package = ".$ticID);
+ $tickets[$ticID]['packageData'] = $packageData;
+ }
+
+
+
+ // We apparently don't have all needed data for this cart entry
+ // Something has been turned off or deleted
+ } else {
+
+ // Remove this item from the cart
+ unset($_SESSION[GLM_EVENT_SESSION]['TicketCart'][$invID]);
+ $cartItemRemoved = true;
+
+ }
+
+ } // each cart entry
+
+ // Reorganize cart so dates are under events rather than the other way around
+ // [Member & Assignments], [Performance], [Date], [Section], [Ticket]
+ $rCart = array();
+
+ // For each venue
+ $venueCount = 0;
+ foreach($cartData as $c) {
+
+ // Assign venue information but not dates array
+ $rCart[$c['id']] = $c;
+ unset($rCart[$c['id']]['dates']);
+
+ // For each date
+ foreach($c['dates'] as $d) {
+
+ // For each performance
+ foreach($d['performances'] as $p) {
+
+ // If performance not added yet, do that now
+ if (!isset($rCart[$c['id']]['performances'][$p['id']])) {
+
+ // Assign performance information but not sections
+ $rCart[$c['id']]['performances'][$p['id']] = $p;
+ unset($rCart[$c['id']]['performances'][$p['id']]['sections']);
+
+ }
+
+ // If Date not added yet, do that now
+ if (!isset($rCart[$c['id']]['performances'][$p['id']]['dates'][$d['date']])) {
+
+ // Assign date information but not performance array
+ $rCart[$c['id']]['performances'][$p['id']]['dates'][$d['date']] = $d;
+ unset($rCart[$c['id']]['performances'][$p['id']]['dates'][$d['date']]['performances']);
+
+ }
+
+ // For each section
+ foreach($p['sections'] as $s) {
+
+ // If section not added, do that now
+ if (!isset($rCart[$c['id']]['performances'][$p['id']]['dates'][$d['date']]['sections'][$s['id']])) {
+
+ // Assign section information but not tickets
+ $rCart[$c['id']]['performances'][$p['id']]['dates'][$d['date']]['sections'][$s['id']] = $s;
+ unset($rCart[$c['id']]['performances'][$p['id']]['dates'][$d['date']]['sections'][$s['id']]['tickets']);
+
+ }
+
+ // For each ticket
+ foreach($s['tickets'] as $t) {
+
+ // Assign the ticket
+ $rCart[$c['id']]['performances'][$p['id']]['dates'][$d['date']]['sections'][$s['id']]['tickets'][$t['id']] = $t;
+
+ }
+
+ } // For each Section
+
+ // Determine if this performance has multiple sections
+ if (count($p['sections']) == 1) {
+ $rCart[$c['id']]['performances'][$p['id']]['oneSectionOnly'] = true;
+ } else {
+ $rCart[$c['id']]['performances'][$p['id']]['oneSectionOnly'] = false;
+ }
+
+ } // For each Performance
+ }// For each Date
+ } // For each Venue
+
+ // Determine if there's multiple venues in the cart
+ if (count($cartData) == 1) {
+ $r['cartHasOneVenueOnly'] = true;
+ } else {
+ $r['cartHasOneVenueOnly'] = false;
+ }
+
+ /*
+ * Sort everything the way it should be
+ */
+
+ // Sort Members
+ uasort ($rCart, function ($a, $b) {
+ if ($a['sort'] == $b['sort']) {
+ return 0;
+ }
+ return ($a['sort'] < $b['sort']) ? -1 : 1;
+ });
+ // For each Member
+ while (list($k1, $v1) = each($rCart)) {
+
+ // Flag all cart entries as not central payment member, will update that in the checkout process.
+ $rCart[$k1]['isCentralPaymentMember'] = false;
+
+ // Sort Performances
+ uasort ($rCart[$k1]['performances'], function ($a, $b) {
+ if ($a['sort'] == $b['sort']) {
+ return 0;
+ }
+ return ($a['sort'] < $b['sort']) ? -1 : 1;
+ });
+
+ // For each Performance
+ while (list($k2, $v2) = each($rCart[$k1]['performances'])) {
+ // Sort Dates
+ // Dates - Not doing this yet
+
+ //For each Date
+ while (list($k3, $v3) = each($rCart[$k1]['performances'][$k2]['dates'])) {
+
+ // Sort Sections
+ uasort ($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'], function ($a, $b) {
+ if ($a['sort'] == $b['sort']) {
+ return 0;
+ }
+ return ($a['sort'] < $b['sort']) ? -1 : 1;
+ });
+
+ // For each Section
+ while (list($k4, $v4) = each($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'])) {
+
+ // Sort Tickets
+ uasort ($rCart[$k1]['performances'][$k2]['dates'][$k3]['sections'][$k4]['tickets'], function ($a, $b) {
+ if ($a['sort'] == $b['sort']) {
+ return 0;
+ }
+ return ($a['sort'] < $b['sort']) ? -1 : 1;
+ });
+
+ } // Sections
+ } // Dates
+ } // Performances
+ } // Members
+
+ } // have cart entries
+
+// echo "<pre>".print_r($rCart,1)."</pre>";
+
+ // If we're not doing checkout, then also check to see if we need assignment selection info
+ if (!$checkout && is_array($rCart) && count($rCart) > 0) {
+
+ // Check for ticket assignment for sale by another member
+ foreach ($rCart as $c) {
+
+ $rCart[$c['id']]['needAssignment'] = false;
+ $rCart[$c['id']]['haveAssignment'] = false;
+
+ // Check if a type 3
+ if ($c['member_type']['value'] == 3) {
+ $r['doingAdditionalInfo'] = true;
+ }
+
+ // Check if type 3 and not assigned
+ if ($c['member_type']['value'] == 3 && (!isset($c['assignedTo']) || $c['assignedTo'] < 1)) {
+
+ // Assume we're going to fail to assign this - unless we don't have anything selected
+ if ($rCart[$c['id']]['totalPrice_numb'] > 0) {
+ $rCart[$c['id']]['needAssignment'] = true;
+ }
+
+ // Get list of members who this can be assigned to
+ $assignmentMembers = $this->getMembersList('type2');
+
+ if ($assignmentMembers) {
+
+ // Check session to see if there's been an assignment
+ $assignedTo = false;
+ $assignedToEntrance = false;
+ if (isset($_SESSION['GLM_EVENT_MGT_FRONT']['Assignment'][$c['id']])) {
+ $assignedTo = $_SESSION['GLM_EVENT_MGT_FRONT']['Assignment'][$c['id']];
+ }
+ if ($this->config->option->ticket_selection->select_entrance_on_consignment &&
+ isset($_SESSION['GLM_EVENT_MGT_FRONT']['AssignmentEntrance'][$c['id']])) {
+ $assignedToEntrance = $_SESSION['GLM_EVENT_MGT_FRONT']['AssignmentEntrance'][$c['id']];
+ }
+
+ // If an assignment hasn't been made, block checkout
+ if (!$assignedTo && $c['totalTickets'] > 0) {
+ $r['blockCheckout'] = true;
+ }
+
+ // If a likely date is needed and not supplied, block checkout
+ if ($this->config->option->ask_for_likely_date && $c['needLikelyDate'] && empty($c['likelyDate'])) {
+ $r['blockCheckout'] = true;
+ }
+
+ // If a likely date is required, even one is supplied
+ if ($this->config->option->ask_for_likely_date && $c['needLikelyDate']) {
+ $r['doingAdditionalInfo'] = true;
+ }
+
+ // Provide list of assignment members for this entry
+ $a = array();
+ foreach ($assignmentMembers as $m) {
+
+ // Add this member to the list
+ $a[$m['id']] = array(
+ 'id' => $m['id'],
+ 'name' => $m['name'],
+ 'city' => $m['city'],
+ 'selected' => false,
+ 'entrances' => false
+ );
+
+ // Check if we should also look at entrances
+ if ($this->config->option->ticket_selection->select_entrance_on_consignment) {
+
+ // Get a list of entrances for this assignment member
+ $entrancesList = $this->getEntrancesList($m['id']);
+ if ($entrancesList) {
+ foreach($entrancesList as $e) {
+
+ $a[$m['id']]['entrances'][$e['id']] = $e;
+ $a[$m['id']]['entrances'][$e['id']]['selected'] = false;
+
+ // Determine if this entrance has been selected
+ if ($m['id'] == $assignedTo && $e['id'] == $assignedToEntrance) {
+ $a[$m['id']]['entrances'][$e['id']]['selected'] = true;
+ }
+
+ }
+
+ }
+
+ }
+
+ // If this is the assigned member
+ if ($m['id'] == $assignedTo) {
+
+ // Mark this member as assigned
+ $a[$m['id']]['selected'] = true;
+ $rCart[$c['id']]['haveAssignment'] = true;
+
+ }
+ }
+
+ // Add list to cart entry
+ $rCart[$c['id']]['assignmentMembers'] = $a;
+
+ } else {
+
+ // We've had an assignment problem, so fail this process
+ $r['reason'][] = '<b>There has been a system problem:</b> There are no members to which we can assign unassigned cart items.';
+ $r['status'] = false;
+
+ }
+ }
+
+ // Check if we need either assignment or likely date
+ $rCart[$c['id']]['needAssignemntOrDate'] = false;
+ if ($rCart[$c['id']]['needAssignment'] || ($this->conf->ask_for_likely_date && $rCart[$c['id']]['needLikelyDate'])) {
+ $rCart[$c['id']]['needAssignemntOrDate'] = true;
+ }
+
+ } // For each cart entry
+ }
+
+ // If cart items have been removed - note that
+ if ($cartItemRemoved) {
+ $r['reason'][] = 'A '.$this->config->term->ticket->norm.' or '.$this->config->term->ticket->plur
+ .' have been removed from your cart because they have become unavailable for some reason.<br>
+ We appolgize for the incovenience.';
+ }
+
+ // If the cart has a total price, then there must be cart contents
+// if ($totalPrice + $totalNoPayment > 0) {
+ if (count($r['cartData']) > 0) {
+ $r['cartHasContents'] = true;
+ }
+
+ if ($totalPrice == 0) {
+ $r['cartRequiresPayment'] = false;
+ }
+
+ // Return cart output data and indicate success
+ $r['cartData'] = $cartData;
+ $r['cartItemRemoved'] = $cartItemRemoved;
+ $r['cartDataReorganized'] = $rCart;
+ $r['totals'] = array(
+ 'venues' => $totalVenues,
+ 'tickets' => $totalTickets,
+ 'price_numb' => $totalPrice,
+ 'price' => $this->money($totalPrice),
+ 'grand_total_numb' => $grandTotalPrice,
+ 'grand_total_price' => $this->money($grandTotalPrice)
+ );
+
+ return $r;
+
+ }
+
+ /**
+ * Get Cart Sticky Inventory
+ *
+ * Cart-Sticky tickets are tickets that always show in the cart whether there's
+ * a selected quantity or 0 quantity. This permits a short 2-step process
+ * for the shop that includes only Cart and Checkout. It can also be used
+ * to ask users to select something you want them to buy.
+ *
+ * This method will look for active cart-sticky tickets and will return
+ * a list of inventory items and data useable to insert into a session cart.
+ *
+ * Cart-Sticky tickets may not be date-specific at this time. They must have
+ * only one inventory entry.
+ *
+ * @return object containing array as sub-objects
+ */
+ public function getCartStickyInventory()
+ {
+
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketInventory.php';
+ $TicketInventory = new EventManagementDataTicketInventory($this->dbh, $this->config);
+
+ // Look only for members that are of type 3, are active, and where the performance is active
+ $where = "
+ (SELECT cart_sticky FROM eventmgt.ticket WHERE id = T.ticket)
+ AND (SELECT active FROM eventmgt.performance WHERE id = (SELECT performance FROM eventmgt.ticket WHERE id = T.ticket))
+ ";
+//T.member IN (SELECT id FROM eventmgt.member WHERE member_type = 3 AND active)
+// AND
+
+ // Get sticky inventory for all matching members (-1)
+ $inv = $TicketInventory->getTicketInventoryList(-1, $where);
+
+ // Order by ticket order field
+ uasort ($inv , function ($a, $b) {
+ if ($a['ticket_sort'] == $b['ticket_sort']) {
+ return 0;
+ }
+ return ($a['ticket_sort'] < $b['ticket_sort']) ? -1 : 1;
+ }
+ );
+
+ return $inv;
+ }
+
+ /**
+ * Get performances set for promotion on cart page
+ *
+ * Returns an array of performances that are set to be promoted on the cart page.
+ *
+ * @return object containing array as sub-objects
+ */
+ public function getCartPromotions()
+ {
+
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataPerformances.php';
+ $Performances = new EventManagementDataPerformances($this->dbh, $this->config);
+ $Performances->optionIncludeSelectListData = false;
+ $performancesList = $Performances->getPerformancesList('cart_promotions');
+ return $performancesList;
+
+ }
+
+}
+
+?>
--- /dev/null
+<?php // Absolutely nothing before this line\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ * Design: "Generic"\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once PDF_ABSTRACT;\r
+$Pdf = new GlmPdf();\r
+\r
+/**\r
+ * PdfVoucher class\r
+ *\r
+ * @category PdfVoucher\r
+ * @package PDFLib\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @link <>\r
+*/\r
+class PdfVoucher extends GlmPdf\r
+{\r
+\r
+ public $borderWidth = 1;\r
+ public $borderColor = 'black';\r
+ public $pdfCouponInterval = 5;\r
+ public $pdfMinCoupons = 3;\r
+ public $config;\r
+ public $companyContact = false;\r
+ public $venueContact = false;\r
+\r
+ function __construct($order, $vouchers, $member, $dbh, $config)\r
+ {\r
+\r
+ $this->config = $config;\r
+\r
+ // if debug.glmpdf is set in the configs/common.ini file in the CommonApp directory, do grids on PDFs\r
+ define ('GLMPDF_DEBUG', $this->config->debug->glmpdf);\r
+\r
+ // The following produces a color test sheet. There is no return from that call.\r
+ // $this->glmpdfShowValidColors();\r
+\r
+ // Start with cover page.\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 0, 'y' => 0, 'xs' => 613, 'ys' => 792 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+\r
+ // Start page\r
+ $this->glmpdfStart( $this->config->owner->name, "Gaslight Media", "Ticket System Receipt/Vouchers" );\r
+\r
+ if( !$this->glmpdfAddFont( 'barcode', 'barcode/FREE3OF9.TTF' ) )\r
+ {\r
+ echo 'ERROR: Unable to add barcode font.<P>\r
+ Did you place the barcode font provided in docs/BarcodeFonts into\r
+ a system fonts directory ("/usr/share/fonts/truetype/Barcode")?\r
+ Also check the GLMPDF_PDF_FONT_DIR setting in GlmPdf.php.';\r
+ exit;\r
+ }\r
+\r
+ // If coupon test is selected, print them all now.\r
+// if( isset($_REQUEST['test_coupons']) )\r
+// {\r
+// for( $i=1 ; $i<=count($coupons) ; $i++ )\r
+// $this->printCoupon( $i );\r
+//\r
+// glmpdf_send_to_browser( '', 'voucher.pdf' );\r
+// exit;\r
+// }\r
+\r
+ // Get images to tmp files\r
+ require_once IMAGE_SERVER_ABSTRACT;\r
+ $imServer = new ImageServerAbstract();\r
+\r
+ if (trim($member['image']) != '') {\r
+ $venueImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['image']);\r
+ if ($venueImageFile) {\r
+ $venueImage = $this->glmpdfOpenImage($venueImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($venueImage == false) {\r
+ $venueImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $venueImageFile = false;\r
+ }\r
+\r
+ if (trim($member['parking_map']) != '') {\r
+ $parkingImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['parking_map']);\r
+ if ($parkingImageFile) {\r
+ $parkingImage = $this->glmpdfOpenImage($parkingImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($parkingImage == false) {\r
+ $parkingImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $parkingImageFile = false;\r
+ }\r
+\r
+ if (trim($member['ticket_sec_map']) != '') {\r
+ $sectionImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['ticket_sec_map']);\r
+ if ($sectionImageFile) {\r
+ $sectionImage = $this->glmpdfOpenImage($sectionImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($sectionImage == false) {\r
+ $sectionImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $sectionImageFile = false;\r
+ }\r
+\r
+ // Load entrance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+ $Entrances = new EventManagementAdminEntrances($dbh, $config);\r
+\r
+ // Load performance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($dbh, $config);\r
+\r
+ // Setup additional information\r
+ // Company contact info\r
+ if ($config->option->voucher->show_company_contact) {\r
+ $companyContact = '';\r
+ $sep = '';\r
+ if ($config->option->voucher->show_company_name) {\r
+ $companyContact .= $config->owner->name;\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_company_addr && $config->owner->addr1) {\r
+ $companyContact .= $sep.$config->owner->addr1;\r
+ $sep = ' - ';\r
+ if ($config->owner->addr2) {\r
+ $companyContact .= ', '.$config->owner->addr2;\r
+ }\r
+ }\r
+ if ($config->option->voucher->show_company_citystate) {\r
+ $companyContact .= $sep.$config->owner->city.', '.$config->owner->state;\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_company_phone) {\r
+ if ($config->owner->toll_free) {\r
+ $companyContact .= $sep.$config->owner->toll_free;\r
+ } else {\r
+ $companyContact .= $sep.$config->owner->phone;\r
+ }\r
+ }\r
+ }\r
+ // Venue/Location contact info\r
+ $venueContact = false;\r
+ if ($config->option->voucher->show_venue_contact) {\r
+ $venueContact = '';\r
+ $sep = '';\r
+ if ($config->option->voucher->show_venue_name) {\r
+ $venueContact .= $member['name'];\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_venue_addr && $member['addr1']) {\r
+ $venueContact .= $sep.$member['addr1'];\r
+ $sep = ' - ';\r
+ if ($member['addr2']) {\r
+ $venueContact .= ', '.$member['addr2'];\r
+ }\r
+ }\r
+ if ($config->option->voucher->show_venue_citystate) {\r
+ $venueContact .= $sep.$member['city'].', '.$member['state']['name'];\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_venue_phone) {\r
+ $venueContact .= $sep.$member['phone'];\r
+ }\r
+ }\r
+\r
+ // START VOUCHER PRINTOUT\r
+\r
+ $this->glmpdfNextForm();\r
+\r
+ /* Cover Page */\r
+\r
+ // Header\r
+ if ($venueImageFile) {\r
+ $coverImage = $this->glmpdfOpenImage($venueImageFile);\r
+ $this->glmpdfPlaceImage($coverImage, 30, 690, .5, false, 'center', 280, 140);\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 ); // Header Text\r
+ $this->glmpdfPlaceText( $config->owner->name, 340, 750, "center", 'black', -400 );\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( $config->owner->short_name." - ".$member['name'], 340, $this->glmpdfCurrentY-10, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['addr1'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['city'].", ".$member['state']['name']." ".$member['zip'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+\r
+ // Sold To Information\r
+ $valCol = 60;\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->order->cap." ID: ".trim($order['id']), $valCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( trim($order['fname'].' '.$order['lname']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['addr1']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ if( trim($order['addr2']) != '' )\r
+ $this->glmpdfPlaceText( trim($order['addr2']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['city']).', '.$order['state']['value'].' '.trim($order['zip']).' '.$order['country']['value'], $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+\r
+ // Purchace/Charge information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $promptCol = 330;\r
+ $valCol = 420;\r
+ $this->glmpdfPlaceText( "Date of Purchase:", $promptCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['purchase_date']['date'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Type:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['cctype'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Name on Card:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccname'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Number:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccnumber'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Confirmation:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccconf'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Total Charged:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['charge_total'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+\r
+ // Purchase Summary\r
+ $ticNumbCol = 20;\r
+ $perfNameCol = 80;\r
+ $ticNameCol = 200;\r
+ $secNameCol = 370;\r
+ $dateCol = 440;\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, 550, "center", 'black', 0, '');\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( $this->config->term->performance->cap, $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( $this->config->term->ticket->cap, $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( $this->config->term->section->cap, $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ $this->glmpdfPlaceText( 'Date / Time', $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY-3, "center", 'black', 0, '');\r
+\r
+ foreach( $vouchers as $t ) {\r
+\r
+ $voucherCode = $this->addCheckCode($t['id']);\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $voucherCode, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'].' '.$t['ticket_time']['time'], $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ }\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ foreach($t['addons_sold'] as $a) {\r
+\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($addonText,ENT_QUOTES,"utf-8"), $ticNameCol+10, $this->glmpdfCurrentY, "left", 'black', -240, '');\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ // Special Needs\r
+ $this->glmpdfSetFont( "Helvetica", 9.0 );\r
+ if (trim($order['special_needs']) != '') {\r
+ $this->glmpdfPlaceText( "Special Needs:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $order['special_needs'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // General Member Policies\r
+ if (trim($member['def_ticket_pol']) != '') {\r
+ $this->glmpdfPlaceText( "Policies:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $member['def_ticket_pol'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // Now setup ticket forms\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 25, 'y' => 495, 'xs' => 560, 'ys' => 275 )\r
+// 2 => array( 'x' => 25, 'y' => 210, 'xs' => 560, 'ys' => 275 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+ // Also reset form count\r
+ $this->glmpdfNextPage();\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+/*********CPS\r
+ // Display Parking Map\r
+ if ($parkingImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $parkingImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Parking Map', 140, 130, "center", 'black' );\r
+ }\r
+\r
+ // Display Section Map\r
+ if ($sectionImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $sectionImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Section Map', 140, 130, "center", 'black' );\r
+ }\r
+*/\r
+\r
+ // Load mask for darkening the bottom portion of the tickets\r
+// $ticketMask = $this->glmpdfOpenImage(EVENT_MANAGEMENT_APP_BASE.'web/custom/greatlakesbaymag/assets/ticket-gradient.png');\r
+\r
+ // Clear performance image loaded flag\r
+ $performanceLoaded = false;\r
+\r
+ // Process Vouchers - For each type of ticket purchased\r
+ $numb_tickets = 0;\r
+ foreach( $vouchers as $t )\r
+ {\r
+\r
+ if ($numb_tickets++ > 0) {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 275, 560, 275, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 195, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 195, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place owner name at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ if ($haveTopImage) {\r
+\r
+// $this->glmpdfPlaceText( $config->owner->name, 315, 227, "center", 'black', -300, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8"), 315, 227, "center", 'black', -300, '');\r
+ } else {\r
+// $this->glmpdfPlaceText( $config->owner->name, 280, 227, "center", 'black', -350, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8"), 280, 227, "center", 'black', -350, '');\r
+ }\r
+\r
+ // Place mask\r
+ //$this->glmpdfPlaceImage($ticketMask, 0, 52, .25, false, 'center', 280, 140);\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 275, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 275, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -275, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+// $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['entrance_name'],ENT_QUOTES,"utf-8")), 40, 138, 'left', 'black', -250, 'position=center rotate=90');\r
+// $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 60, 138, 'left', 'black', -250, 'position=center rotate=90');\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 26.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), 280, 170, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 140, "center", 'black', -370, '' );\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+// $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), 280, 130, "center", 'black', -370, '' );\r
+ $this->glmpdfSetFont( "Helvetica", 18.0 );\r
+ if ($t['date_specific']['value']) {\r
+ $thisTime = '';\r
+ if ($t['time_specific']['value']) {\r
+ $thisTime = ' - '.$t['ticket_time']['time'];\r
+ }\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'].$thisTime, 280, 110, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 110, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+\r
+ // Display NON-REFUNDABLE MESSAGE\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ if ($venueContact) {\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($this->config->term->prop->cap.' contact information',ENT_QUOTES,"utf-8"), 280, $this->glmpdfCurrentY-5, "center", 'black', -300, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($venueContact,ENT_QUOTES,"utf-8"), 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+ }\r
+\r
+ // Display address and contact information\r
+ if ($companyContact) {\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($companyContact,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+ }\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 14.0 );\r
+// $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+\r
+ case 11: // Voucher/Ticket for Pickup - no Barcode\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( "Pickup at ".$this->config->term->prop->norm, 510, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ case 12; // Voucher/Ticket to be mailed Mailed - no Barcode\r
+ case 82; // Object Sold (i.e. books) to be mailed - no Barcode\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( "You will receive this by mail", 510, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ case 1: // Standard Voucher/Ticket with Barcode\r
+ case 81; // Object Sold (i.e. books) to be claimed - with Barcode\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 54 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 140, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 140, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Check if we need to display a coupon\r
+// if( ++$numb_tickets % $this->pdfCouponInterval == 0 )\r
+// $this->printCoupon();\r
+\r
+ } // Each voucher\r
+\r
+ // Make sure we print the minimum number of coupons\r
+// $numb_coupons = 0;\r
+// while( $numb_coupons < $this->pdfMinCoupons ) {\r
+// $this->printCoupon();\r
+// $numb_coupons++;\r
+// }\r
+\r
+ // Close PDF setup and send to user's browser\r
+ $this->glmpdfSendToBrowser( '', 'voucher.pdf' );\r
+\r
+ if ($venueImageFile) {\r
+ unlink($venueImageFile);\r
+ }\r
+ if ($parkingImageFile) {\r
+ unlink($parkingImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+\r
+ }\r
+\r
+\r
+ // function to print a coupon\r
+ function printCoupon()\r
+ {\r
+ // Print a Coupon\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 142, 281, 142, $this->borderColor );\r
+\r
+ // Place Coupon Image\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Coupon Title', 85, 130, "center", 'black' );\r
+ $this->glmpdfPlaceText( 'Expires on: 1/1/2020', 85, 75 );\r
+ $this->glmpdfSetFont( "Times-Bold", 30.0 );\r
+ $this->glmpdfPlaceText( "COUPON", 85, 95, "center", 'lightgrey' );\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceTextBox( 'This is a coupon description. It describes this coupon.', 5, 55, 274, 40, "left", 'black' );\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( "Mackinaw Area Visitors Bureau - Mackinaw City, MI - 800-666-0160", 140.5, 2, "center", 'darkblue' );\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to add check character to end of voucher number\r
+ *\r
+ * Uses config->voucher_check_secret and voucher # to create MD5 string\r
+ * then takes last hex character off of that string and shifts it up to\r
+ * always be a character (adds 16 to numbers and 10 to the upper-case\r
+ * version of the character).\r
+ * i.e. 0 = A, 9 = J, A = K, F =\r
+ *\r
+ */\r
+ public function addCheckCode($voucherNumb)\r
+ {\r
+\r
+ // Create MD5 string using voucher number and secret\r
+ $md5 = md5($voucherNumb.$this->config->voucher_check_secret);\r
+\r
+ // Get last character code of the last character in the MD5\r
+ $cc = strtoupper(substr($md5, -2));\r
+ $cc[0] = $this->shiftCheckCodeCharacter($cc[0]);\r
+ $cc[1] = $this->shiftCheckCodeCharacter($cc[1]);\r
+\r
+ // Return voucher number with the new character on the end\r
+ $voucherNumb .= $cc;\r
+ return $voucherNumb;\r
+\r
+ }\r
+\r
+ private function shiftCheckCodeCharacter($c) {\r
+\r
+ $x = ord($c);\r
+\r
+ // If it's a digit, add 16\r
+ if ($x < 65) {\r
+ $x += 17;\r
+ // otherwise, add 10\r
+ } else {\r
+ $x += 10;\r
+ }\r
+\r
+ // Also skip the letter O\r
+ if (x >= ord('O')) {\r
+ $x += 1;\r
+ }\r
+\r
+ return chr($x);\r
+ }\r
+\r
+} // class\r
+\r
+// Absolutely nothing after next line\r
+?>
\ No newline at end of file
--- /dev/null
+<?php // Absolutely nothing before this line\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ * Design: "Generic"\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once PDF_ABSTRACT;\r
+$Pdf = new GlmPdf();\r
+\r
+/**\r
+ * PdfVoucher class\r
+ *\r
+ * @category PdfVoucher\r
+ * @package PDFLib\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @link <>\r
+*/\r
+class PdfVoucher extends GlmPdf\r
+{\r
+\r
+ public $borderWidth = 1;\r
+ public $borderColor = 'black';\r
+ public $pdfCouponInterval = 5;\r
+ public $pdfMinCoupons = 3;\r
+ public $config;\r
+ public $companyContact = false;\r
+ public $venueContact = false;\r
+\r
+ function __construct($order, $vouchers, $member, $dbh, $config)\r
+ {\r
+\r
+ $this->config = $config;\r
+\r
+ // if debug.glmpdf is set in the configs/common.ini file in the CommonApp directory, do grids on PDFs\r
+ define ('GLMPDF_DEBUG', $this->config->debug->glmpdf);\r
+\r
+ // The following produces a color test sheet. There is no return from that call.\r
+ // $this->glmpdfShowValidColors();\r
+\r
+ // Start with cover page.\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 0, 'y' => 0, 'xs' => 613, 'ys' => 792 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+\r
+ // Start page\r
+ $this->glmpdfStart( $this->config->owner->name, "Gaslight Media", "Ticket System Receipt/Vouchers" );\r
+\r
+ if( !$this->glmpdfAddFont( 'barcode', 'barcode/FREE3OF9.TTF' ) )\r
+ {\r
+ echo 'ERROR: Unable to add barcode font.<P>\r
+ Did you place the barcode font provided in docs/BarcodeFonts into\r
+ a system fonts directory ("/usr/share/fonts/truetype/Barcode")?\r
+ Also check the GLMPDF_PDF_FONT_DIR setting in GlmPdf.php.';\r
+ exit;\r
+ }\r
+\r
+ // If coupon test is selected, print them all now.\r
+// if( isset($_REQUEST['test_coupons']) )\r
+// {\r
+// for( $i=1 ; $i<=count($coupons) ; $i++ )\r
+// $this->printCoupon( $i );\r
+//\r
+// glmpdf_send_to_browser( '', 'voucher.pdf' );\r
+// exit;\r
+// }\r
+\r
+ // Get images to tmp files\r
+ require_once IMAGE_SERVER_ABSTRACT;\r
+ $imServer = new ImageServerAbstract();\r
+\r
+ if (trim($member['image']) != '') {\r
+ $venueImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['image']);\r
+ if ($venueImageFile) {\r
+ $venueImage = $this->glmpdfOpenImage($venueImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($venueImage == false) {\r
+ $venueImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $venueImageFile = false;\r
+ }\r
+\r
+ if (trim($member['parking_map']) != '') {\r
+ $parkingImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['parking_map']);\r
+ if ($parkingImageFile) {\r
+ $parkingImage = $this->glmpdfOpenImage($parkingImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($parkingImage == false) {\r
+ $parkingImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $parkingImageFile = false;\r
+ }\r
+\r
+ if (trim($member['ticket_sec_map']) != '') {\r
+ $sectionImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['ticket_sec_map']);\r
+ if ($sectionImageFile) {\r
+ $sectionImage = $this->glmpdfOpenImage($sectionImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($sectionImage == false) {\r
+ $sectionImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $sectionImageFile = false;\r
+ }\r
+\r
+ // Load entrance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+ $Entrances = new EventManagementAdminEntrances($dbh, $config);\r
+\r
+ // Load performance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($dbh, $config);\r
+\r
+ // Setup additional information\r
+ // Company contact info\r
+ if ($config->option->voucher->show_company_contact) {\r
+ $companyContact = '';\r
+ $sep = '';\r
+ if ($config->option->voucher->show_company_name) {\r
+ $companyContact .= $config->owner->name;\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_company_addr && $config->owner->addr1) {\r
+ $companyContact .= $sep.$config->owner->addr1;\r
+ $sep = ' - ';\r
+ if ($config->owner->addr2) {\r
+ $companyContact .= ', '.$config->owner->addr2;\r
+ }\r
+ }\r
+ if ($config->option->voucher->show_company_citystate) {\r
+ $companyContact .= $sep.$config->owner->city.', '.$config->owner->state;\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_company_phone) {\r
+ if ($config->owner->toll_free) {\r
+ $companyContact .= $sep.$config->owner->toll_free;\r
+ } else {\r
+ $companyContact .= $sep.$config->owner->phone;\r
+ }\r
+ }\r
+ }\r
+ // Venue/Location contact info\r
+ $venueContact = false;\r
+ if ($config->option->voucher->show_venue_contact) {\r
+ $venueContact = '';\r
+ $sep = '';\r
+ if ($config->option->voucher->show_venue_name) {\r
+ $venueContact .= $member['name'];\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_venue_addr && $member['addr1']) {\r
+ $venueContact .= $sep.$member['addr1'];\r
+ $sep = ' - ';\r
+ if ($member['addr2']) {\r
+ $venueContact .= ', '.$member['addr2'];\r
+ }\r
+ }\r
+ if ($config->option->voucher->show_venue_citystate) {\r
+ $venueContact .= $sep.$member['city'].', '.$member['state']['name'];\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_venue_phone) {\r
+ $venueContact .= $sep.$member['phone'];\r
+ }\r
+ }\r
+\r
+ // START VOUCHER PRINTOUT\r
+\r
+ $this->glmpdfNextForm();\r
+\r
+ /* Cover Page */\r
+\r
+ // Header\r
+ if ($venueImageFile) {\r
+ $coverImage = $this->glmpdfOpenImage($venueImageFile);\r
+ $this->glmpdfPlaceImage($coverImage, 30, 690, .5, false, 'center', 280, 140);\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 ); // Header Text\r
+ $this->glmpdfPlaceText( $config->owner->name, 340, 750, "center", 'black', -400 );\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( $config->owner->short_name." - ".$member['name'], 340, $this->glmpdfCurrentY-10, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['addr1'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['city'].", ".$member['state']['name']." ".$member['zip'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+\r
+ // Sold To Information\r
+ $valCol = 60;\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->order->cap." ID: ".trim($order['id']), $valCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( trim($order['fname'].' '.$order['lname']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['addr1']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ if( trim($order['addr2']) != '' )\r
+ $this->glmpdfPlaceText( trim($order['addr2']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['city']).', '.$order['state']['value'].' '.trim($order['zip']).' '.$order['country']['value'], $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+\r
+ // Purchace/Charge information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $promptCol = 330;\r
+ $valCol = 420;\r
+ $this->glmpdfPlaceText( "Date of Purchase:", $promptCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['purchase_date']['date'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Type:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['cctype'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Name on Card:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccname'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Number:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccnumber'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Confirmation:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccconf'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Total Charged:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['charge_total'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+\r
+ // Purchase Summary\r
+ $ticNumbCol = 20;\r
+ $perfNameCol = 80;\r
+ $ticNameCol = 200;\r
+ $secNameCol = 370;\r
+ $dateCol = 440;\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, 550, "center", 'black', 0, '');\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( $this->config->term->performance->cap, $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( $this->config->term->ticket->cap, $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( $this->config->term->section->cap, $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ $this->glmpdfPlaceText( 'Date / Time', $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY-3, "center", 'black', 0, '');\r
+\r
+ foreach( $vouchers as $t ) {\r
+\r
+ $voucherCode = $this->addCheckCode($t['id']);\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $voucherCode, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ }\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ foreach($t['addons_sold'] as $a) {\r
+\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($addonText,ENT_QUOTES,"utf-8"), $ticNameCol+10, $this->glmpdfCurrentY, "left", 'black', -240, '');\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ // Special Needs\r
+ $this->glmpdfSetFont( "Helvetica", 9.0 );\r
+ if (trim($order['special_needs']) != '') {\r
+ $this->glmpdfPlaceText( "Special Needs:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $order['special_needs'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // General Member Policies\r
+ if (trim($member['def_ticket_pol']) != '') {\r
+ $this->glmpdfPlaceText( "Policies:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $member['def_ticket_pol'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // Now setup ticket forms\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 25, 'y' => 495, 'xs' => 560, 'ys' => 275 )\r
+// 2 => array( 'x' => 25, 'y' => 210, 'xs' => 560, 'ys' => 275 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+ // Also reset form count\r
+ $this->glmpdfNextPage();\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+/*********CPS\r
+ // Display Parking Map\r
+ if ($parkingImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $parkingImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Parking Map', 140, 130, "center", 'black' );\r
+ }\r
+\r
+ // Display Section Map\r
+ if ($sectionImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $sectionImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Section Map', 140, 130, "center", 'black' );\r
+ }\r
+*/\r
+\r
+ // Load mask for darkening the bottom portion of the tickets\r
+// $ticketMask = $this->glmpdfOpenImage(EVENT_MANAGEMENT_APP_BASE.'web/custom/greatlakesbaymag/assets/ticket-gradient.png');\r
+\r
+ // Clear performance image loaded flag\r
+ $performanceLoaded = false;\r
+\r
+ // Process Vouchers - For each type of ticket purchased\r
+ $numb_tickets = 0;\r
+ foreach( $vouchers as $t )\r
+ {\r
+\r
+ if ($numb_tickets++ > 0) {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 275, 560, 275, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 195, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 195, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place owner name at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ if ($haveTopImage) {\r
+ $this->glmpdfPlaceText( $config->owner->name, 315, 227, "center", 'black', -300, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( $config->owner->name, 280, 227, "center", 'black', -350, '');\r
+ }\r
+\r
+ // Place mask\r
+ //$this->glmpdfPlaceImage($ticketMask, 0, 52, .25, false, 'center', 280, 140);\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 275, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 275, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -275, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['entrance_name'],ENT_QUOTES,"utf-8")), 30, 138, 'left', 'black', -250, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 60, 138, 'left', 'black', -250, 'position=center rotate=90');\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 26.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), 280, 170, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 140, "center", 'black', -370, '' );\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+// $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), 280, 130, "center", 'black', -370, '' );\r
+ $this->glmpdfSetFont( "Helvetica", 18.0 );\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], 280, 110, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 110, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+\r
+ // Display NON-REFUNDABLE MESSAGE\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ if ($venueContact) {\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($this->config->term->prop->cap.' contact information',ENT_QUOTES,"utf-8"), 280, $this->glmpdfCurrentY-5, "center", 'black', -300, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($venueContact,ENT_QUOTES,"utf-8"), 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+ }\r
+\r
+ // Display address and contact information\r
+ if ($companyContact) {\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($companyContact,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+ }\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 14.0 );\r
+// $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+\r
+ case 11: // Voucher/Ticket for Pickup - no Barcode\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( "Pickup at ".$this->config->term->prop->norm, 510, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ case 12; // Voucher/Ticket to be mailed Mailed - no Barcode\r
+ case 82; // Object Sold (i.e. books) to be mailed - no Barcode\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( "You will receive this by mail", 510, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ case 1: // Standard Voucher/Ticket with Barcode\r
+ case 81; // Object Sold (i.e. books) to be claimed - with Barcode\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 54 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 140, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 140, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Check if we need to display a coupon\r
+// if( ++$numb_tickets % $this->pdfCouponInterval == 0 )\r
+// $this->printCoupon();\r
+\r
+ } // Each voucher\r
+\r
+ // Make sure we print the minimum number of coupons\r
+// $numb_coupons = 0;\r
+// while( $numb_coupons < $this->pdfMinCoupons ) {\r
+// $this->printCoupon();\r
+// $numb_coupons++;\r
+// }\r
+\r
+ // Close PDF setup and send to user's browser\r
+ $this->glmpdfSendToBrowser( '', 'voucher.pdf' );\r
+\r
+ if ($venueImageFile) {\r
+ unlink($venueImageFile);\r
+ }\r
+ if ($parkingImageFile) {\r
+ unlink($parkingImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+\r
+ }\r
+\r
+\r
+ // function to print a coupon\r
+ function printCoupon()\r
+ {\r
+ // Print a Coupon\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 142, 281, 142, $this->borderColor );\r
+\r
+ // Place Coupon Image\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Coupon Title', 85, 130, "center", 'black' );\r
+ $this->glmpdfPlaceText( 'Expires on: 1/1/2020', 85, 75 );\r
+ $this->glmpdfSetFont( "Times-Bold", 30.0 );\r
+ $this->glmpdfPlaceText( "COUPON", 85, 95, "center", 'lightgrey' );\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceTextBox( 'This is a coupon description. It describes this coupon.', 5, 55, 274, 40, "left", 'black' );\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( "Mackinaw Area Visitors Bureau - Mackinaw City, MI - 800-666-0160", 140.5, 2, "center", 'darkblue' );\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to add check character to end of voucher number\r
+ *\r
+ * Uses config->voucher_check_secret and voucher # to create MD5 string\r
+ * then takes last hex character off of that string and shifts it up to\r
+ * always be a character (adds 16 to numbers and 10 to the upper-case\r
+ * version of the character).\r
+ * i.e. 0 = A, 9 = J, A = K, F =\r
+ *\r
+ */\r
+ public function addCheckCode($voucherNumb)\r
+ {\r
+\r
+ // Create MD5 string using voucher number and secret\r
+ $md5 = md5($voucherNumb.$this->config->voucher_check_secret);\r
+\r
+ // Get last character code of the last character in the MD5\r
+ $cc = strtoupper(substr($md5, -2));\r
+ $cc[0] = $this->shiftCheckCodeCharacter($cc[0]);\r
+ $cc[1] = $this->shiftCheckCodeCharacter($cc[1]);\r
+\r
+ // Return voucher number with the new character on the end\r
+ $voucherNumb .= $cc;\r
+ return $voucherNumb;\r
+\r
+ }\r
+\r
+ private function shiftCheckCodeCharacter($c) {\r
+\r
+ $x = ord($c);\r
+\r
+ // If it's a digit, add 16\r
+ if ($x < 65) {\r
+ $x += 17;\r
+ // otherwise, add 10\r
+ } else {\r
+ $x += 10;\r
+ }\r
+\r
+ // Also skip the letter O\r
+ if (x >= ord('O')) {\r
+ $x += 1;\r
+ }\r
+\r
+ return chr($x);\r
+ }\r
+\r
+} // class\r
+\r
+// Absolutely nothing after next line\r
+?>
\ No newline at end of file
--- /dev/null
+<?php // Absolutely nothing before this line\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ * Design: "StarLine"\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once PDF_ABSTRACT;\r
+$Pdf = new GlmPdf();\r
+\r
+/**\r
+ * PdfVoucher class\r
+ *\r
+ * @category PdfVoucher\r
+ * @package PDFLib\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @link <>\r
+*/\r
+class PdfVoucher extends GlmPdf\r
+{\r
+\r
+ public $borderWidth = 1;\r
+ public $borderColor = 'black';\r
+ public $pdfCouponInterval = 5;\r
+ public $pdfMinCoupons = 3;\r
+ public $config;\r
+ private $is;\r
+ private $dbh;\r
+\r
+ function __construct($order, $vouchers, $member, $dbh, $config, $couponTest = false)\r
+ {\r
+\r
+ $this->dbh = $dbh;\r
+ $this->config = $config;\r
+\r
+ // Load image server support\r
+ require_once IMAGE_SERVER_ABSTRACT;\r
+ $this->is = new ImageServerAbstract();\r
+\r
+ // if debug.glmpdf is set in the configs/common.ini file in the CommonApp directory, do grids on PDFs\r
+ define ('GLMPDF_DEBUG', $this->config->debug->glmpdf);\r
+\r
+ // The following produces a color test sheet. There is no return from that call.\r
+ // $this->glmpdfShowValidColors(); exit;\r
+\r
+ // Start with cover page.\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 0, 'y' => 0, 'xs' => 613, 'ys' => 792 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+\r
+ // Start page\r
+ $this->glmpdfStart( $this->config->owner->name, "Gaslight Media", "Ticket System Receipt/Vouchers" );\r
+\r
+ if( !$this->glmpdfAddFont( 'barcode', 'barcode/FREE3OF9.TTF' ) )\r
+ {\r
+ echo 'ERROR: Unable to add barcode font.<P>\r
+ Did you place the barcode font provided in docs/BarcodeFonts into\r
+ a system fonts directory ("/usr/share/fonts/truetype/Barcode")?\r
+ Also check the GLMPDF_PDF_FONT_DIR setting in GlmPdf.php.';\r
+ exit;\r
+ }\r
+\r
+ // Get images to tmp files\r
+ if (trim($member['image']) != '') {\r
+ $venueImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['image']);\r
+ if ($venueImageFile) {\r
+ $venueImage = $this->glmpdfOpenImage($venueImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($venueImage == false) {\r
+ $venueImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $venueImageFile = false;\r
+ }\r
+\r
+ if (trim($member['parking_map']) != '') {\r
+ $parkingImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['parking_map']);\r
+ if ($parkingImageFile) {\r
+ $parkingImage = $this->glmpdfOpenImage($parkingImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($parkingImage == false) {\r
+ $parkingImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $parkingImageFile = false;\r
+ }\r
+\r
+ if (trim($member['ticket_sec_map']) != '') {\r
+ $sectionImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['ticket_sec_map']);\r
+ if ($sectionImageFile) {\r
+ $sectionImage = $this->glmpdfOpenImage($sectionImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($sectionImage == false) {\r
+ $sectionImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $sectionImageFile = false;\r
+ }\r
+\r
+ // Load entrance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+ $Entrances = new EventManagementAdminEntrances($dbh, $config);\r
+\r
+ // Load performance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($dbh, $config);\r
+\r
+ // Load Voucher Coupons class and get coupons list for display\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataVoucherCoupons.php';\r
+ $VoucherCoupons = new EventManagementDataVoucherCoupons($dbh, $config);\r
+\r
+ // Load ticket packages data class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';\r
+ $TicketPackages = new EventManagementDataTicketPackages($dbh, $config);\r
+\r
+\r
+ // If no date has been supplied - make it today\r
+ if (isset($_REQUEST['date']) && $_REQUEST['date'] != '') {\r
+ $date = $_REQUEST['date'];\r
+ } else {\r
+ $date = date('m/d/Y', time());\r
+ }\r
+\r
+ $vc = $VoucherCoupons->getCouponsForDisplay($date);\r
+\r
+ // Setup footers\r
+/*\r
+ $footer = 'For assistance call '.$this->config->owner->phone;\r
+ if ($this->config->owner->toll_free != '') {\r
+ $footer .= ' or '.$this->config->owner->toll_free;\r
+ }\r
+*/\r
+\r
+ if (!$couponTest) {\r
+\r
+ $this->glmpdfNextForm();\r
+\r
+\r
+ /* Cover Page */\r
+\r
+ // Header\r
+ if ($venueImageFile) {\r
+ $coverImage = $this->glmpdfOpenImage($venueImageFile);\r
+ $this->glmpdfPlaceImage($coverImage, 30, 690, .5, false, 'center', 280, 140);\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 ); // Header Text\r
+ $this->glmpdfPlaceText( $config->owner->name, 340, 750, "center", 'black', -400 );\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( $config->owner->short_name." - ".$member['name'], 340, $this->glmpdfCurrentY-10, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['addr1'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['city'].", ".$member['state']['name']." ".$member['zip'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+\r
+ // Sold To Information\r
+ $valCol = 60;\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->order->cap." ID: ".trim($order['id']), $valCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( trim($order['fname'].' '.$order['lname']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['addr1']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ if( trim($order['addr2']) != '' )\r
+ $this->glmpdfPlaceText( trim($order['addr2']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['city']).', '.$order['state']['value'].' '.trim($order['zip']).' '.$order['country']['value'], $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+\r
+ // Purchace/Charge information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $promptCol = 330;\r
+ $valCol = 420;\r
+ $this->glmpdfPlaceText( "Date of Purchase:", $promptCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['purchase_date']['date'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Type:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['cctype'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Name on Card:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccname'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Number:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccnumber'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Confirmation:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccconf'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Total Charged:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['charge_total'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+\r
+ // Purchase Summary\r
+ $ticNumbCol = 20;\r
+ $perfNameCol = 80;\r
+ $ticNameCol = 300;\r
+ $secNameCol = 450;\r
+ $dateCol = 500;\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, 550, "center", 'black', 0, '');\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( $this->config->term->performance->cap, $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( $this->config->term->ticket->cap, $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+// $this->glmpdfPlaceText( $this->config->term->section->cap, $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ $this->glmpdfPlaceText( 'Date / Time', $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY-3, "center", 'black', 0, '');\r
+\r
+ foreach( $vouchers as $t ) {\r
+\r
+ $voucherCode = $this->addCheckCode($t['id']);\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ if (!$t['ticket_package']) {\r
+ $this->glmpdfPlaceText( $voucherCode, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ }\r
+ $memberPerformance = $t['real_member_name'].': '.$t['performance_name'];\r
+ $this->glmpdfPlaceText( html_entity_decode($memberPerformance,ENT_QUOTES,"utf-8"), $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ if (!$t['is_package']['value']) {\r
+// $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ if ($t['date_specific']['value']) {\r
+//echo "<pre>".print_r($t,1)."</pre>";exit;\r
+ $datetime = $t['ticket_date']['date'];\r
+ if ($t['time_specific']['value']) {\r
+ $datetime .= ' '.$t['ticket_time']['time'];\r
+ }\r
+// $this->glmpdfPlaceText( $t['ticket_date']['date'].".", $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( $datetime, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ }\r
+ }\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ foreach($t['addons_sold'] as $a) {\r
+\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($addonText,ENT_QUOTES,"utf-8"), $ticNameCol+10, $this->glmpdfCurrentY, "left", 'black', -240, '');\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ // Special Needs\r
+ $this->glmpdfSetFont( "Helvetica", 9.0 );\r
+ if (trim($order['special_needs']) != '') {\r
+ $this->glmpdfPlaceText( "Special Needs:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $order['special_needs'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // General Member Policies\r
+ if (trim($member['def_ticket_pol']) != '') {\r
+ $this->glmpdfPlaceText( "Policies:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $member['def_ticket_pol'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ }\r
+\r
+ // Standard voucher & coupon form - 1 Voucher, 8 coupons\r
+ $voucher1_coupon8 = array(\r
+ 'forms' => 10,\r
+ 'layout' => array(\r
+ 1 => array( 'x' => 25, 'y' => 515, 'xs' => 560, 'ys' => 232 ),\r
+ 2 => array( 'x' => 25, 'y' => 325, 'xs' => 375, 'ys' => 150 ),\r
+ 3 => array( 'x' => 415, 'y' => 325, 'xs' => 170, 'ys' => 150 ),\r
+ 4 => array( 'x' => 25, 'y' => 160, 'xs' => 170, 'ys' => 150 ),\r
+ 5 => array( 'x' => 210, 'y' => 160, 'xs' => 375, 'ys' => 150 ),\r
+ 6 => array( 'x' => 25, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 7 => array( 'x' => 166, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 8 => array( 'x' => 307, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 9 => array( 'x' => 448, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 10 => array( 'x' => 25, 'y' => 25, 'xs' => 419, 'ys' => 120 ),\r
+ )\r
+ );\r
+\r
+ // Package vouchers - 3 vouchers, no coupons\r
+ $voucher3_coupon0 = array(\r
+ 'forms' => 3,\r
+ 'layout' => array(\r
+ 1 => array( 'x' => 25, 'y' => 561, 'xs' => 560, 'ys' => 176 ),\r
+ 2 => array( 'x' => 25, 'y' => 308, 'xs' => 560, 'ys' => 176 ),\r
+ 3 => array( 'x' => 25, 'y' => 55, 'xs' => 560, 'ys' => 176 )\r
+ )\r
+ );\r
+\r
+ // Now setup ticket forms\r
+ $this->glmpdfSetForms(\r
+ $voucher1_coupon8['forms'],\r
+ $voucher1_coupon8['layout'],\r
+ 'US Letter'\r
+ );\r
+\r
+/*********CPS\r
+ // Display Parking Map\r
+ if ($parkingImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $parkingImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Parking Map', 140, 130, "center", 'black' );\r
+ }\r
+\r
+ // Display Section Map\r
+ if ($sectionImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $sectionImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Section Map', 140, 130, "center", 'black' );\r
+ }\r
+*/\r
+\r
+ // Clear performance image loaded flag\r
+ $performanceLoaded = false;\r
+\r
+// $this->glmpdfNextPage();\r
+ $firstVoucherPageSet = false;\r
+\r
+ // Process Vouchers - For each type of ticket purchased\r
+ $numb_tickets = 0;\r
+ $counterSQL = '';\r
+ $packageVouchersPrintedSeparately = '';\r
+ $allPackageVouchersSeparate = true;\r
+ $packageVoucher = false;\r
+ $packageTicketName = '';\r
+ $doDashes = false;\r
+ $skipNextFormAdvance = false;\r
+\r
+ foreach( $vouchers as $t )\r
+ {\r
+\r
+ // Flag to determine if this voucher will be displayed (vouchers not displayed if it's a package ticket)\r
+ $displaying_this_voucher = false;\r
+\r
+ if (!$couponTest) {\r
+\r
+ // Check if the current voucher is a new package that has vouchers that print\r
+ if ($t['is_package']['value']) {\r
+\r
+ $packageVoucher = true;\r
+\r
+ // Check if any vouchers for this package print separately\r
+ $ticketPackage = $TicketPackages->getList('package = '.$t['ticket']);\r
+ if (is_array($ticketPackage) && count($ticketPackage) > 0) {\r
+\r
+ // For each ticket in the package\r
+ foreach ($ticketPackage as $tp) {\r
+\r
+ // Check if it requires a separate voucher\r
+ if ($tp['separate_voucher']['value']) {\r
+\r
+ // Set this flag to the package sold ID (same for all vouchers for a package) so we can tell if we hit the end of the package\r
+ $packageVouchersPrintedSeparately = $t['package_sold_id'];\r
+ $packagePerformanceName = $t['performance_name'];\r
+ $packageTicketName = $t['ticket_name'];\r
+ } else {\r
+ $allPackageVouchersSeparate = false;\r
+ }\r
+ }\r
+ }\r
+\r
+ // If we found one, then switch layouts.\r
+ if ($packageVouchersPrintedSeparately != '') {\r
+ $this->glmpdfSetForms(\r
+ $voucher3_coupon0['forms'],\r
+ $voucher3_coupon0['layout'],\r
+ 'US Letter'\r
+ );\r
+ $voucherPageStarted = false;\r
+ $skipNextFormAdvance = false;\r
+ $doDashes = true;\r
+ if ($numb_tickets) {\r
+ $skipNextFormAdvance = true;\r
+ }\r
+ }\r
+\r
+ // If we have a package with separate vouchers\r
+ } else {\r
+ $packageVoucher = false;\r
+ }\r
+\r
+ if ($packageVouchersPrintedSeparately != '') {\r
+\r
+ // Check if we're now past the package that had vouchers printed separately\r
+ if ($t['package_sold_id'] != $packageVouchersPrintedSeparately) {\r
+\r
+ $this->glmpdfSetForms(\r
+ $voucher1_coupon8['forms'],\r
+ $voucher1_coupon8['layout'],\r
+ 'US Letter'\r
+ );\r
+ $voucherPageStarted = false;\r
+ $packageVouchersPrintedSeparately = '';\r
+ $skipNextFormAdvance = true;\r
+ }\r
+\r
+ }\r
+\r
+ // Check if this voucher is a print separate voucher for a package\r
+ $printVoucher = false;\r
+ if ($t['ticket_package']) {\r
+\r
+ // Get ticket_package data\r
+ $ticketPackage = $TicketPackages->getList('package = '.$t['ticket_package'].' AND ticket = '.$t['ticket']);\r
+\r
+ // If Separate Voucher, override and display voucher.\r
+ if ($ticketPackage[0]['separate_voucher']['value']) {\r
+ $printVoucher = true;\r
+ }\r
+\r
+ } else {\r
+ $printVoucher = true;\r
+ }\r
+\r
+ // Check if this is a package voucher and we are printing all package tickets separately\r
+ if ($packageVoucher && $allPackageVouchersSeparate) {\r
+ $printVoucher = false;\r
+ }\r
+\r
+ // If this isn't a package ticket (we're not printing separate vouchers at this time)\r
+ if ($printVoucher) {\r
+\r
+\r
+ if ($packageVouchersPrintedSeparately) {\r
+\r
+ // If the first voucher page hasn't been set\r
+ if (!$voucherPageStarted) {\r
+ $this->glmpdfNextPage();\r
+ $voucherPageStarted = true;\r
+\r
+ if ($doDashes) {\r
+ // Print perforations\r
+ $this->glmpdfPlaceLine(1, 0, -38, 560, -38, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $this->glmpdfPlaceLine(1, 0, -291, 560, -291, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $doDashes = false;\r
+ }\r
+\r
+ }\r
+\r
+ $displaying_this_voucher = true;\r
+\r
+ if ($numb_tickets++ > 0) {\r
+\r
+ if ($skipNextFormAdvance) {\r
+ $skipNextFormAdvance = false;\r
+ } else {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 176, 560, 176, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 100, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 100, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place owner name at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ if ($haveTopImage) {\r
+ $this->glmpdfPlaceText( $config->owner->name, 315, 131, "center", 'black', -300, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( $config->owner->name, 280, 131, "center", 'black', -350, '');\r
+ }\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 176, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 176, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // If part of a package, print the package name it's part of.\r
+ if ($packageTicketName && !$t['is_package']['value']) {\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Part of:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( $packagePerformanceName, 30, 88, 'left', 'black', -165, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( $packageTicketName, 60, 88, 'left', 'black', -165, 'position=center rotate=90');\r
+\r
+ } else {\r
+\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -232, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['entrance_name'],ENT_QUOTES,"utf-8")), 30, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 60, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+\r
+ }\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), 280, 91, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 77, "center", 'black', -370, '' );\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], 280, 65, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 65, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Put package line for voucher here\r
+\r
+ // Check for Ticket add-ons\r
+/* No addons for packages\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+*/\r
+ // Non-Refundable and other Fixed text for body of Voucher\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $contactInfo = $this->config->owner->name.' - '\r
+ .$this->config->owner->address1.' - '\r
+ .($this->config->owner->address2 != '' ? ', '.$this->config->owner->address2 : '')\r
+ .$this->config->owner->city.', '\r
+ .$this->config->owner->state.' '\r
+ .$this->config->owner->zip.' - '\r
+ .$this->config->owner->phone\r
+ .($this->config->owner->toll_free != '' ? ' - '.$this->config->owner->toll_free : '');\r
+ $this->glmpdfPlaceText( html_entity_decode($contactInfo,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ // $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+ case 11:\r
+ $this->glmpdfSetFont( "Courier-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( "Pickup ".$this->config->term->voucher->norm." at ".$this->config->term->prop->norm, 510, 88, 'left', 'red', -170, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 88, 'left', 'black', -170, 'position=center rotate=90');\r
+ break;\r
+ case 12;\r
+ $this->glmpdfSetFont( "Courier-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( "You will receive ".$this->config->term->voucher->cap." by mail", 510, 88, 'left', 'red', -170, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 88, 'left', 'black', -170, 'position=center rotate=90');\r
+ break;\r
+ case 1:\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 40 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 88, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 88, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 88, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+\r
+\r
+ // Print a normal voucher\r
+ } else {\r
+\r
+ // If the first voucher page hasn't been set\r
+ if (!$voucherPageStarted) {\r
+ $this->glmpdfNextPage();\r
+ $voucherPageStarted = true;\r
+\r
+ if ($doDashes) {\r
+ // Print perforations\r
+ $this->glmpdfPlaceLine(1, 0, -11, 560, -11, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $this->glmpdfPlaceLine(1, 0, -265, 560, -265, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $doDashes = false;\r
+ }\r
+\r
+ }\r
+\r
+ $displaying_this_voucher = true;\r
+\r
+ if ($numb_tickets++ > 0) {\r
+\r
+ if ($skipNextFormAdvance) {\r
+ $skipNextFormAdvance = false;\r
+ } else {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 232, 560, 232, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 154, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 154, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place owner name at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ if ($haveTopImage) {\r
+ $this->glmpdfPlaceText( $config->owner->name, 315, 185, "center", 'black', -300, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( $config->owner->name, 280, 185, "center", 'black', -350, '');\r
+ }\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 232, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 232, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // If part of a package, print the package name it's part of.\r
+ if ($packageTicketName && !$t['is_package']['value']) {\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Part of:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( $packagePerformanceName, 30, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( $packageTicketName, 60, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+\r
+ } else {\r
+\r
+ // Voucher left end text overrides departing from text\r
+ if ($t['ticket_voucher_leftend_text'] != '') {\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -232, '', 'lightlilac', 'miter');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['ticket_voucher_leftend_text'],ENT_QUOTES,"utf-8")), 40, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ } else {\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -232, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+// $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['entrance_name'],ENT_QUOTES,"utf-8")), 30, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 45, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ }\r
+ }\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['real_member_name'],ENT_QUOTES,"utf-8"), 280, 135, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 114, "center", 'black', -370, '' );\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ if ($t['date_specific']['value']) {\r
+\r
+ $datetime = $t['ticket_date']['date'];\r
+ if ($t['time_specific']['value']) {\r
+ $datetime .= ' '.$t['ticket_time']['time'];\r
+ }\r
+// $this->glmpdfPlaceText( $t['ticket_date']['date'], 280, 96, "center", 'black', -370, '' );\r
+ $this->glmpdfPlaceText( $datetime, 280, 96, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 96, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Put package line for voucher here\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+\r
+ // Non-Refundable and other Fixed text for body of Voucher\r
+ $this->glmpdfSetFont( "Helvetica", 12.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ $this->glmpdfSetFont( "Helvetica", 12.0 );\r
+ $contactInfo = $this->config->owner->name.' - '\r
+ .$this->config->owner->address1.' - '\r
+ .($this->config->owner->address2 != '' ? ', '.$this->config->owner->address2 : '')\r
+ .$this->config->owner->city.', '\r
+ .$this->config->owner->state.' '\r
+ .$this->config->owner->zip.' - '\r
+ .$this->config->owner->phone\r
+ .($this->config->owner->toll_free != '' ? ' - '.$this->config->owner->toll_free : '');\r
+ $this->glmpdfPlaceText( html_entity_decode($contactInfo,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 14.0 );\r
+ // $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+ case 11:\r
+ $this->glmpdfSetFont( "Courier-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( "Pickup ".$this->config->term->voucher->norm." at ".$this->config->term->prop->norm, 510, 116, 'left', 'red', -224, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ case 12;\r
+ $this->glmpdfSetFont( "Courier-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( "You will receive ".$this->config->term->voucher->cap." by mail", 510, 116, 'left', 'red', -224, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ case 1:\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 48 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 116, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 116, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+\r
+ } // End of normal voucher\r
+\r
+ } // Printing Voucher\r
+\r
+ }\r
+\r
+ if ($displaying_this_voucher) {\r
+\r
+ if (!$packageVouchersPrintedSeparately) {\r
+\r
+ $this->glmpdfNextForm();\r
+\r
+ // Get table of Ads/Coupons\r
+ if (isset($vc[1])) {\r
+\r
+ // Get the key for the current ad/coupon for position 1\r
+ $k = key($vc[1]);\r
+\r
+ // If the max count is -1 (unlimited) or more than the current display count\r
+ if ($vc[1][$k]['max_display_count'] < 0 || $vc[1][$k]['max_display_count'] > $vc[1][$k]['display_count']) {\r
+\r
+ // Display the ad/coupon and save SQL to update the display count\r
+ $counterSQL .= $this->displayCoupon(current($vc[1]), 375, 150);\r
+\r
+ // Incriment the local display count\r
+ $vc[1][$k]['display_count']++;\r
+ }\r
+\r
+ // Advance to the next ad/coupon for this position. If all used, start over.\r
+ if (next($vc[1]) === false) {\r
+ reset($vc[1]);\r
+ }\r
+ }\r
+\r
+ // Advance to the next form\r
+ $this->glmpdfNextForm();\r
+\r
+ // Do the same for the remaining ad/coupon forms\r
+\r
+ if (isset($vc[2])) {\r
+ $k = key($vc[2]);\r
+ if ($vc[2][$k]['max_display_count'] < 0 || $vc[2][$k]['max_display_count'] > $vc[2][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[2]), 170, 150);\r
+ $vc[2][$k]['display_count']++;\r
+ }\r
+ if (next($vc[2]) === false) {\r
+ reset($vc[2]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[3])) {\r
+ $k = key($vc[3]);\r
+ if ($vc[3][$k]['max_display_count'] < 0 || $vc[3][$k]['max_display_count'] > $vc[3][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[3]), 170, 150);\r
+ $vc[3][$k]['display_count']++;\r
+ }\r
+ if (next($vc[3]) === false) {\r
+ reset($vc[3]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[4])) {\r
+ $k = key($vc[4]);\r
+ if ($vc[4][$k]['max_display_count'] < 0 || $vc[4][$k]['max_display_count'] > $vc[4][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[4]), 375, 150);\r
+ $vc[4][$k]['display_count']++;\r
+ }\r
+ if (next($vc[4]) === false) {\r
+ reset($vc[4]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[5])) {\r
+ $k = key($vc[5]);\r
+ if ($vc[5][$k]['max_display_count'] < 0 || $vc[5][$k]['max_display_count'] > $vc[5][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[5]), 137, 120);\r
+ $vc[5][$k]['display_count']++;\r
+ }\r
+ if (next($vc[5]) === false) {\r
+ reset($vc[5]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[6])) {\r
+ $k = key($vc[6]);\r
+ if ($vc[6][$k]['max_display_count'] < 0 || $vc[6][$k]['max_display_count'] > $vc[6][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[6]), 137, 120);\r
+ $vc[6][$k]['display_count']++;\r
+ }\r
+ if (next($vc[6]) === false) {\r
+ reset($vc[6]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[7])) {\r
+ $k = key($vc[7]);\r
+ if ($vc[7][$k]['max_display_count'] < 0 || $vc[7][$k]['max_display_count'] > $vc[7][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[7]), 137, 120);\r
+ $vc[7][$k]['display_count']++;\r
+ }\r
+ if (next($vc[7]) === false) {\r
+ reset($vc[7]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[8])) {\r
+ $k = key($vc[8]);\r
+ if ($vc[8][$k]['max_display_count'] < 0 || $vc[8][$k]['max_display_count'] > $vc[8][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[8]), 137, 120);\r
+ $vc[8][$k]['display_count']++;\r
+ }\r
+ if (next($vc[8]) === false) {\r
+ reset($vc[8]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[9])) {\r
+ $k = key($vc[9]);\r
+ if ($vc[9][$k]['max_display_count'] < 0 || $vc[9][$k]['max_display_count'] > $vc[9][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[9]), 419, 120);\r
+ $vc[9][$k]['display_count']++;\r
+ }\r
+ if (next($vc[9]) === false) {\r
+ reset($vc[9]);\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ } // Each voucher\r
+\r
+ if ($vc != false) {\r
+ $this->dbh->exec("BEGIN;\n".$counterSQL."COMMIT;\n");\r
+ }\r
+\r
+ // Close PDF setup and send to user's browser\r
+ $this->glmpdfSendToBrowser( '', 'Star_Line_Ticket_Vouchers.pdf' );\r
+\r
+ if ($venueImageFile) {\r
+ unlink($venueImageFile);\r
+ }\r
+ if ($parkingImageFile) {\r
+ unlink($parkingImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+\r
+ }\r
+\r
+ private function displayCoupon($coupon, $xs, $ys)\r
+ {\r
+\r
+ // Attempt to get the coupon image\r
+ $im = $this->getCouponImage( $this->is, $coupon['coupon_image']);\r
+\r
+ // Check for stretch\r
+ $fit = 'auto';\r
+ if ($coupon['stretch_to_fit']['value']) {\r
+ $fit = 'entire';\r
+ }\r
+\r
+ // Check for padding - enforce a minimum size\r
+ $pad = $coupon['padding'];\r
+\r
+ $x = $xs - ($pad * 2);\r
+ if ($x < 10) {\r
+ $x == 10;\r
+ }\r
+ $y = $ys - ($pad * 2);\r
+ if ($y < 10) {\r
+ $y = 10;\r
+ }\r
+\r
+ // If the image exists\r
+ if ($im) {\r
+\r
+ // Place the image\r
+ $this->glmpdfPlaceImage($im, $pad, $pad, 1, $fit, 'center', $x, $y);\r
+\r
+\r
+ // If a border is requested display that\r
+ if ($coupon['show_border']['value']) {\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, $ys, $xs, $ys, $this->borderColor );\r
+ }\r
+\r
+ }\r
+\r
+ // SQL to Update Counters\r
+ $sql = "UPDATE eventmgt.voucher_coupons SET display_count = display_count + 1 WHERE id = ".$coupon['id'].";\n";\r
+\r
+ return $sql;\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to load an image for use in Voucher Ads or Coupons\r
+ *\r
+ * This function maintains a static array of loaded images. It\r
+ * first checks to see if the image has already been loaded and\r
+ * returns the existing object if it is. Otherwise it will\r
+ * attempt to load the image, store the open image object in the\r
+ * static array for future use, and return it.\r
+ *\r
+ * @param $is object Image Server Object\r
+ * @param $imageName string Name of the image to load\r
+ *\r
+ * @return object Loaded and opened image object or false if not loaded\r
+ *\r
+ */\r
+ private function getCouponImage( $is, $imageName )\r
+ {\r
+ static $images = array();\r
+\r
+ // Check if image has already been loaded\r
+ if (isset($images[$imageName])) {\r
+ return $images[$imageName];\r
+ }\r
+\r
+ // Try to load the image\r
+ $imageFile = $is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$imageName);\r
+ if ($imageFile) {\r
+\r
+ // Open the image and save it in case it's needeed again\r
+ $images[$imageName] = $this->glmpdfOpenImage($imageFile);\r
+\r
+ return $images[$imageName];\r
+\r
+ }\r
+\r
+ return false;\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to add check character to end of voucher number\r
+ *\r
+ * Uses config->voucher_check_secret and voucher # to create MD5 string\r
+ * then takes last hex character off of that string and shifts it up to\r
+ * always be a character (adds 16 to numbers and 10 to the upper-case\r
+ * version of the character).\r
+ * i.e. 0 = A, 9 = J, A = K, F =\r
+ *\r
+ */\r
+ public function addCheckCode($voucherNumb)\r
+ {\r
+\r
+ // Create MD5 string using voucher number and secret\r
+ $md5 = md5($voucherNumb.$this->config->voucher_check_secret);\r
+\r
+ // Get last character code of the last character in the MD5\r
+ $cc = strtoupper(substr($md5, -2));\r
+ $cc[0] = $this->shiftCheckCodeCharacter($cc[0]);\r
+ $cc[1] = $this->shiftCheckCodeCharacter($cc[1]);\r
+\r
+ // Return voucher number with the new character on the end\r
+ $voucherNumb .= $cc;\r
+ return $voucherNumb;\r
+\r
+ }\r
+\r
+ private function shiftCheckCodeCharacter($c) {\r
+\r
+ $x = ord($c);\r
+\r
+ // If it's a digit, add 16\r
+ if ($x < 65) {\r
+ $x += 17;\r
+ // otherwise, add 10\r
+ } else {\r
+ $x += 10;\r
+ }\r
+\r
+ // Also skip the letter O\r
+ if (x >= ord('O')) {\r
+ $x += 1;\r
+ }\r
+\r
+ return chr($x);\r
+ }\r
+\r
+} // class\r
+\r
+// Absolutely nothing after next line\r
+?>\r
--- /dev/null
+<?php // Absolutely nothing before this line\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ * Design: "MMM" (Michigan Maritime Museum)\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once PDF_ABSTRACT;\r
+$Pdf = new GlmPdf();\r
+\r
+/**\r
+ * PdfVoucher class\r
+ *\r
+ * @category PdfVoucher\r
+ * @package PDFLib\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @link <>\r
+*/\r
+class PdfVoucher extends GlmPdf\r
+{\r
+\r
+ public $borderWidth = 1;\r
+ public $borderColor = 'black';\r
+ public $pdfCouponInterval = 5;\r
+ public $pdfMinCoupons = 3;\r
+ public $config;\r
+ public $companyContact = false;\r
+ public $venueContact = false;\r
+\r
+ function __construct($order, $vouchers, $member, $dbh, $config)\r
+ {\r
+\r
+ $this->config = $config;\r
+\r
+ // if debug.glmpdf is set in the configs/common.ini file in the CommonApp directory, do grids on PDFs\r
+ define ('GLMPDF_DEBUG', $this->config->debug->glmpdf);\r
+\r
+ // The following produces a color test sheet. There is no return from that call.\r
+ // $this->glmpdfShowValidColors();\r
+\r
+ // Start with cover page.\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 0, 'y' => 0, 'xs' => 613, 'ys' => 792 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+\r
+ // Start page\r
+ $this->glmpdfStart( $this->config->owner->name, "Michigan Maritime Museum", "Ticket System Receipt/Vouchers" );\r
+\r
+ if( !$this->glmpdfAddFont( 'barcode', 'barcode/FREE3OF9.TTF' ) )\r
+ {\r
+ echo 'ERROR: Unable to add barcode font.<P>\r
+ Did you place the barcode font provided in docs/BarcodeFonts into\r
+ a system fonts directory ("/usr/share/fonts/truetype/Barcode")?\r
+ Also check the GLMPDF_PDF_FONT_DIR setting in GlmPdf.php.';\r
+ exit;\r
+ }\r
+\r
+ // If coupon test is selected, print them all now.\r
+ if( isset($_REQUEST['test_coupons']) )\r
+ {\r
+ for( $i=1 ; $i<=count($coupons) ; $i++ )\r
+ $this->printCoupon( $i );\r
+\r
+ glmpdf_send_to_browser( '', 'voucher.pdf' );\r
+ exit;\r
+ }\r
+\r
+ // Get images to tmp files\r
+ require_once IMAGE_SERVER_ABSTRACT;\r
+ $imServer = new ImageServerAbstract();\r
+\r
+ if (trim($member['image']) != '') {\r
+ $venueImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['image']);\r
+ if ($venueImageFile) {\r
+ $venueImage = $this->glmpdfOpenImage($venueImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($venueImage == false) {\r
+ $venueImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $venueImageFile = false;\r
+ }\r
+\r
+ if (trim($member['parking_map']) != '') {\r
+ $parkingImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['parking_map']);\r
+ if ($parkingImageFile) {\r
+ $parkingImage = $this->glmpdfOpenImage($parkingImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($parkingImage == false) {\r
+ $parkingImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $parkingImageFile = false;\r
+ }\r
+\r
+ if (trim($member['ticket_sec_map']) != '') {\r
+ $sectionImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['ticket_sec_map']);\r
+ if ($sectionImageFile) {\r
+ $sectionImage = $this->glmpdfOpenImage($sectionImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($sectionImage == false) {\r
+ $sectionImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $sectionImageFile = false;\r
+ }\r
+\r
+ // Load entrance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+ $Entrances = new EventManagementAdminEntrances($dbh, $config);\r
+\r
+ // Load performance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($dbh, $config);\r
+\r
+ // Setup additional information\r
+ // Company contact info\r
+ if ($config->option->voucher->show_company_contact) {\r
+ $companyContact = '';\r
+ $sep = '';\r
+ if ($config->option->voucher->show_company_name) {\r
+ $companyContact .= $config->owner->name;\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_company_addr && $config->owner->addr1) {\r
+ $companyContact .= $sep.$config->owner->addr1;\r
+ $sep = ' - ';\r
+ if ($config->owner->addr2) {\r
+ $companyContact .= ', '.$config->owner->addr2;\r
+ }\r
+ }\r
+ if ($config->option->voucher->show_company_citystate) {\r
+ $companyContact .= $sep.$config->owner->city.', '.$config->owner->state;\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_company_phone) {\r
+ if ($config->owner->toll_free) {\r
+ $companyContact .= $sep.$config->owner->toll_free;\r
+ } else {\r
+ $companyContact .= $sep.$config->owner->phone;\r
+ }\r
+ }\r
+ }\r
+ // Venue/Location contact info\r
+ $venueContact = false;\r
+ if ($config->option->voucher->show_venue_contact) {\r
+ $venueContact = '';\r
+ $sep = '';\r
+ if ($config->option->voucher->show_venue_name) {\r
+ $venueContact .= $member['name'];\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_venue_addr && $member['addr1']) {\r
+ $venueContact .= $sep.$member['addr1'];\r
+ $sep = ' - ';\r
+ if ($member['addr2']) {\r
+ $venueContact .= ', '.$member['addr2'];\r
+ }\r
+ }\r
+ if ($config->option->voucher->show_venue_citystate) {\r
+ $venueContact .= $sep.$member['city'].', '.$member['state']['name'];\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_venue_phone) {\r
+ $venueContact .= $sep.$member['phone'];\r
+ }\r
+ }\r
+\r
+ // START VOUCHER PRINTOUT\r
+\r
+ $this->glmpdfNextForm();\r
+\r
+ /* Cover Page */\r
+\r
+ // Header\r
+ if ($venueImageFile) {\r
+ $coverImage = $this->glmpdfOpenImage($venueImageFile);\r
+ $this->glmpdfPlaceImage($coverImage, 30, 690, .5, false, 'center', 280, 140);\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 ); // Header Text\r
+ $this->glmpdfPlaceText( $config->owner->name, 340, 750, "center", 'black', -400 );\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( $config->owner->short_name." - ".$member['name'], 340, $this->glmpdfCurrentY-10, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['addr1'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['city'].", ".$member['state']['name']." ".$member['zip'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+\r
+ // Sold To Information\r
+ $valCol = 60;\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->order->cap." ID: ".trim($order['id']), $valCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( trim($order['fname'].' '.$order['lname']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['addr1']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ if( trim($order['addr2']) != '' )\r
+ $this->glmpdfPlaceText( trim($order['addr2']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['city']).', '.$order['state']['value'].' '.trim($order['zip']).' '.$order['country']['value'], $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+\r
+ // Purchace/Charge information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $promptCol = 330;\r
+ $valCol = 420;\r
+ $this->glmpdfPlaceText( "Date of Purchase:", $promptCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['purchase_date']['date'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Type:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['cctype'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Name on Card:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccname'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Number:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccnumber'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Confirmation:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccconf'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Total Charged:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['charge_total'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+\r
+ // Purchase Summary\r
+ $ticNumbCol = 20;\r
+ $perfNameCol = 80;\r
+ $ticNameCol = 200;\r
+ $secNameCol = 370;\r
+ $dateCol = 440;\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, 550, "center", 'black', 0, '');\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( $this->config->term->performance->cap, $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( $this->config->term->ticket->cap, $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( $this->config->term->section->cap, $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ $this->glmpdfPlaceText( 'Date / Time', $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY-3, "center", 'black', 0, '');\r
+\r
+ foreach( $vouchers as $t ) {\r
+\r
+ $voucherCode = $this->addCheckCode($t['id']);\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $voucherCode, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'].' '.$t['ticket_time']['time'], $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ }\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ foreach($t['addons_sold'] as $a) {\r
+\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($addonText,ENT_QUOTES,"utf-8"), $ticNameCol+10, $this->glmpdfCurrentY, "left", 'black', -240, '');\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ // Special Needs\r
+ $this->glmpdfSetFont( "Helvetica", 9.0 );\r
+ if (trim($order['special_needs']) != '') {\r
+ $this->glmpdfPlaceText( "Special Needs:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $order['special_needs'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // General Member Policies\r
+ if (trim($member['def_ticket_pol']) != '') {\r
+ $this->glmpdfPlaceText( "Policies:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $member['def_ticket_pol'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // Now setup ticket forms\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 25, 'y' => 495, 'xs' => 560, 'ys' => 275 )\r
+// 2 => array( 'x' => 25, 'y' => 210, 'xs' => 560, 'ys' => 275 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+ // Also reset form count\r
+ $this->glmpdfNextPage();\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+/*********CPS\r
+ // Display Parking Map\r
+ if ($parkingImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $parkingImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Parking Map', 140, 130, "center", 'black' );\r
+ }\r
+\r
+ // Display Section Map\r
+ if ($sectionImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $sectionImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Section Map', 140, 130, "center", 'black' );\r
+ }\r
+*/\r
+\r
+ // Load mask for darkening the bottom portion of the tickets\r
+// $ticketMask = $this->glmpdfOpenImage(EVENT_MANAGEMENT_APP_BASE.'web/custom/greatlakesbaymag/assets/ticket-gradient.png');\r
+\r
+ // Clear performance image loaded flag\r
+ $performanceLoaded = false;\r
+\r
+ // Process Vouchers - For each type of ticket purchased\r
+ $numb_tickets = 0;\r
+ foreach( $vouchers as $t )\r
+ {\r
+\r
+ if ($numb_tickets++ > 0) {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 275, 560, 275, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 195, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 195, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place owner name at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ if ($haveTopImage) {\r
+\r
+// $this->glmpdfPlaceText( $config->owner->name, 315, 227, "center", 'black', -300, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8"), 315, 227, "center", 'black', -300, '');\r
+ } else {\r
+// $this->glmpdfPlaceText( $config->owner->name, 280, 227, "center", 'black', -350, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8"), 280, 227, "center", 'black', -350, '');\r
+ }\r
+\r
+ // Place mask\r
+ //$this->glmpdfPlaceImage($ticketMask, 0, 52, .25, false, 'center', 280, 140);\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 275, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 275, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -275, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+// $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['entrance_name'],ENT_QUOTES,"utf-8")), 40, 138, 'left', 'black', -250, 'position=center rotate=90');\r
+// $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 60, 138, 'left', 'black', -250, 'position=center rotate=90');\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 26.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), 280, 170, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 140, "center", 'black', -370, '' );\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+// $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), 280, 130, "center", 'black', -370, '' );\r
+ $this->glmpdfSetFont( "Helvetica", 18.0 );\r
+ if ($t['date_specific']['value']) {\r
+ $thisTime = '';\r
+ if ($t['time_specific']['value']) {\r
+ $thisTime = ' - '.$t['ticket_time']['time'];\r
+ }\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'].$thisTime, 280, 110, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 110, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+\r
+ // Display NON-REFUNDABLE MESSAGE\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ if ($venueContact) {\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($this->config->term->prop->cap.' contact information',ENT_QUOTES,"utf-8"), 280, $this->glmpdfCurrentY-5, "center", 'black', -300, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($venueContact,ENT_QUOTES,"utf-8"), 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+ }\r
+\r
+ // Display address and contact information\r
+ if ($companyContact) {\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($companyContact,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+ }\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 14.0 );\r
+// $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+\r
+ case 11: // Voucher/Ticket for Pickup - no Barcode\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( "Pickup at ".$this->config->term->prop->norm, 510, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ case 12; // Voucher/Ticket to be mailed Mailed - no Barcode\r
+ case 82; // Object Sold (i.e. books) to be mailed - no Barcode\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( "You will receive this by mail", 510, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ case 1: // Standard Voucher/Ticket with Barcode\r
+ case 81; // Object Sold (i.e. books) to be claimed - with Barcode\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 54 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 140, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 140, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Check if we need to display a coupon\r
+ if( ++$numb_tickets % $this->pdfCouponInterval == 0 )\r
+ $this->printCoupon();\r
+\r
+ } // Each voucher\r
+\r
+ // Make sure we print the minimum number of coupons\r
+ $numb_coupons = 0;\r
+ while( $numb_coupons < $this->pdfMinCoupons ) {\r
+ $this->printCoupon();\r
+ $numb_coupons++;\r
+ }\r
+\r
+ // Close PDF setup and send to user's browser\r
+ $this->glmpdfSendToBrowser( '', 'voucher.pdf' );\r
+\r
+ if ($venueImageFile) {\r
+ unlink($venueImageFile);\r
+ }\r
+ if ($parkingImageFile) {\r
+ unlink($parkingImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+\r
+ }\r
+\r
+\r
+ // function to print a coupon\r
+ function printCoupon()\r
+ {\r
+ // Print a Coupon\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 142, 281, 142, $this->borderColor );\r
+\r
+ // Place Coupon Image\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Coupon Title', 85, 130, "center", 'black' );\r
+ $this->glmpdfPlaceText( 'Expires on: 1/1/2020', 85, 75 );\r
+ $this->glmpdfSetFont( "Times-Bold", 30.0 );\r
+ $this->glmpdfPlaceText( "COUPON", 85, 95, "center", 'lightgrey' );\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceTextBox( 'This is a coupon description. It describes this coupon.', 5, 55, 274, 40, "left", 'black' );\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( "Michigan Maritime Museum - South Haven, MI - 269-637-8078", 144.5, 2, "center", 'darkblue' );\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to add check character to end of voucher number\r
+ *\r
+ * Uses config->voucher_check_secret and voucher # to create MD5 string\r
+ * then takes last hex character off of that string and shifts it up to\r
+ * always be a character (adds 16 to numbers and 10 to the upper-case\r
+ * version of the character).\r
+ * i.e. 0 = A, 9 = J, A = K, F =\r
+ *\r
+ */\r
+ public function addCheckCode($voucherNumb)\r
+ {\r
+\r
+ // Create MD5 string using voucher number and secret\r
+ $md5 = md5($voucherNumb.$this->config->voucher_check_secret);\r
+\r
+ // Get last character code of the last character in the MD5\r
+ $cc = strtoupper(substr($md5, -2));\r
+ $cc[0] = $this->shiftCheckCodeCharacter($cc[0]);\r
+ $cc[1] = $this->shiftCheckCodeCharacter($cc[1]);\r
+\r
+ // Return voucher number with the new character on the end\r
+ $voucherNumb .= $cc;\r
+ return $voucherNumb;\r
+\r
+ }\r
+\r
+ private function shiftCheckCodeCharacter($c) {\r
+\r
+ $x = ord($c);\r
+\r
+ // If it's a digit, add 16\r
+ if ($x < 65) {\r
+ $x += 17;\r
+ // otherwise, add 10\r
+ } else {\r
+ $x += 10;\r
+ }\r
+\r
+ // Also skip the letter O\r
+ if (x >= ord('O')) {\r
+ $x += 1;\r
+ }\r
+\r
+ return chr($x);\r
+ }\r
+\r
+} // class\r
+\r
+// Absolutely nothing after next line\r
+?>\r
--- /dev/null
+<?php // Absolutely nothing before this line\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ * Design: "StarLine"\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once PDF_ABSTRACT;\r
+$Pdf = new GlmPdf();\r
+\r
+/**\r
+ * PdfVoucher class\r
+ *\r
+ * @category PdfVoucher\r
+ * @package PDFLib\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @link <>\r
+*/\r
+class PdfVoucher extends GlmPdf\r
+{\r
+\r
+ public $borderWidth = 1;\r
+ public $borderColor = 'black';\r
+ public $pdfCouponInterval = 5;\r
+ public $pdfMinCoupons = 3;\r
+ public $config;\r
+ private $is;\r
+ private $dbh;\r
+\r
+ function __construct($order, $vouchers, $member, $dbh, $config, $couponTest = false)\r
+ {\r
+\r
+ $this->dbh = $dbh;\r
+ $this->config = $config;\r
+\r
+ // Load image server support\r
+ require_once IMAGE_SERVER_ABSTRACT;\r
+ $this->is = new ImageServerAbstract();\r
+\r
+ // if debug.glmpdf is set in the configs/common.ini file in the CommonApp directory, do grids on PDFs\r
+ define ('GLMPDF_DEBUG', $this->config->debug->glmpdf);\r
+\r
+ // The following produces a color test sheet. There is no return from that call.\r
+ // $this->glmpdfShowValidColors(); exit;\r
+\r
+ // Start with cover page.\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 0, 'y' => 0, 'xs' => 613, 'ys' => 792 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+\r
+ // Start page\r
+ $this->glmpdfStart( $this->config->owner->name, "Gaslight Media", "Ticket System Receipt/Vouchers" );\r
+\r
+ if( !$this->glmpdfAddFont( 'barcode', 'barcode/FREE3OF9.TTF' ) )\r
+ {\r
+ echo 'ERROR: Unable to add barcode font.<P>\r
+ Did you place the barcode font provided in docs/BarcodeFonts into\r
+ a system fonts directory ("/usr/share/fonts/truetype/Barcode")?\r
+ Also check the GLMPDF_PDF_FONT_DIR setting in GlmPdf.php.';\r
+ exit;\r
+ }\r
+\r
+ // Get images to tmp files\r
+ if (trim($member['image']) != '') {\r
+ $venueImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['image']);\r
+ if ($venueImageFile) {\r
+ $venueImage = $this->glmpdfOpenImage($venueImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($venueImage == false) {\r
+ $venueImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $venueImageFile = false;\r
+ }\r
+\r
+ if (trim($member['parking_map']) != '') {\r
+ $parkingImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['parking_map']);\r
+ if ($parkingImageFile) {\r
+ $parkingImage = $this->glmpdfOpenImage($parkingImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($parkingImage == false) {\r
+ $parkingImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $parkingImageFile = false;\r
+ }\r
+\r
+ if (trim($member['ticket_sec_map']) != '') {\r
+ $sectionImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['ticket_sec_map']);\r
+ if ($sectionImageFile) {\r
+ $sectionImage = $this->glmpdfOpenImage($sectionImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($sectionImage == false) {\r
+ $sectionImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $sectionImageFile = false;\r
+ }\r
+\r
+ // Load entrance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+ $Entrances = new EventManagementAdminEntrances($dbh, $config);\r
+\r
+ // Load performance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($dbh, $config);\r
+\r
+ // Load Voucher Coupons class and get coupons list for display\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataVoucherCoupons.php';\r
+ $VoucherCoupons = new EventManagementDataVoucherCoupons($dbh, $config);\r
+\r
+ // Load ticket packages data class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';\r
+ $TicketPackages = new EventManagementDataTicketPackages($dbh, $config);\r
+\r
+\r
+ // If no date has been supplied - make it today\r
+ if (isset($_REQUEST['date']) && $_REQUEST['date'] != '') {\r
+ $date = $_REQUEST['date'];\r
+ } else {\r
+ $date = date('m/d/Y', time());\r
+ }\r
+\r
+ $vc = $VoucherCoupons->getCouponsForDisplay($date);\r
+\r
+ // Setup footers\r
+/*\r
+ $footer = 'For assistance call '.$this->config->owner->phone;\r
+ if ($this->config->owner->toll_free != '') {\r
+ $footer .= ' or '.$this->config->owner->toll_free;\r
+ }\r
+*/\r
+\r
+ if (!$couponTest) {\r
+\r
+ $this->glmpdfNextForm();\r
+\r
+\r
+ /* Cover Page */\r
+\r
+ // Header\r
+ if ($venueImageFile) {\r
+ $coverImage = $this->glmpdfOpenImage($venueImageFile);\r
+ $this->glmpdfPlaceImage($coverImage, 30, 690, .5, false, 'center', 280, 140);\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 ); // Header Text\r
+ $this->glmpdfPlaceText( $config->owner->name, 340, 750, "center", 'black', -400 );\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( $config->owner->short_name." - ".$member['name'], 340, $this->glmpdfCurrentY-10, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['addr1'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['city'].", ".$member['state']['name']." ".$member['zip'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+\r
+ // Sold To Information\r
+ $valCol = 60;\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->order->cap." ID: ".trim($order['id']), $valCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( trim($order['fname'].' '.$order['lname']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['addr1']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ if( trim($order['addr2']) != '' )\r
+ $this->glmpdfPlaceText( trim($order['addr2']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['city']).', '.$order['state']['value'].' '.trim($order['zip']).' '.$order['country']['value'], $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+\r
+ // Purchace/Charge information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $promptCol = 330;\r
+ $valCol = 420;\r
+ $this->glmpdfPlaceText( "Date of Purchase:", $promptCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['purchase_date']['date'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Type:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['cctype'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Name on Card:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccname'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Number:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccnumber'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Confirmation:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccconf'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Total Charged:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['charge_total'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+\r
+ // Purchase Summary\r
+ $ticNumbCol = 20;\r
+ $perfNameCol = 80;\r
+ $ticNameCol = 200;\r
+ $secNameCol = 370;\r
+ $dateCol = 440;\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, 550, "center", 'black', 0, '');\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( $this->config->term->performance->cap, $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( $this->config->term->ticket->cap, $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( $this->config->term->section->cap, $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ $this->glmpdfPlaceText( 'Date / Time', $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY-3, "center", 'black', 0, '');\r
+\r
+ foreach( $vouchers as $t ) {\r
+\r
+ $voucherCode = $this->addCheckCode($t['id']);\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ if (!$t['ticket_package']) {\r
+ $this->glmpdfPlaceText( $voucherCode, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ if (!$t['is_package']['value']) {\r
+ $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ }\r
+ }\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ foreach($t['addons_sold'] as $a) {\r
+\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($addonText,ENT_QUOTES,"utf-8"), $ticNameCol+10, $this->glmpdfCurrentY, "left", 'black', -240, '');\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ // Special Needs\r
+ $this->glmpdfSetFont( "Helvetica", 9.0 );\r
+ if (trim($order['special_needs']) != '') {\r
+ $this->glmpdfPlaceText( "Special Needs:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $order['special_needs'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // General Member Policies\r
+ if (trim($member['def_ticket_pol']) != '') {\r
+ $this->glmpdfPlaceText( "Policies:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $member['def_ticket_pol'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ }\r
+\r
+ // Standard voucher & coupon form - 1 Voucher, 8 coupons\r
+ $voucher1_coupon8 = array(\r
+ 'forms' => 10,\r
+ 'layout' => array(\r
+ 1 => array( 'x' => 25, 'y' => 515, 'xs' => 560, 'ys' => 232 ),\r
+ 2 => array( 'x' => 25, 'y' => 325, 'xs' => 375, 'ys' => 150 ),\r
+ 3 => array( 'x' => 415, 'y' => 325, 'xs' => 170, 'ys' => 150 ),\r
+ 4 => array( 'x' => 25, 'y' => 160, 'xs' => 170, 'ys' => 150 ),\r
+ 5 => array( 'x' => 210, 'y' => 160, 'xs' => 375, 'ys' => 150 ),\r
+ 6 => array( 'x' => 25, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 7 => array( 'x' => 166, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 8 => array( 'x' => 307, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 9 => array( 'x' => 448, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 10 => array( 'x' => 25, 'y' => 25, 'xs' => 419, 'ys' => 120 ),\r
+ )\r
+ );\r
+\r
+ // Package vouchers - 3 vouchers, no coupons\r
+ $voucher3_coupon0 = array(\r
+ 'forms' => 3,\r
+ 'layout' => array(\r
+ 1 => array( 'x' => 25, 'y' => 561, 'xs' => 560, 'ys' => 176 ),\r
+ 2 => array( 'x' => 25, 'y' => 308, 'xs' => 560, 'ys' => 176 ),\r
+ 3 => array( 'x' => 25, 'y' => 55, 'xs' => 560, 'ys' => 176 )\r
+ )\r
+ );\r
+\r
+ // Now setup ticket forms\r
+ $this->glmpdfSetForms(\r
+ $voucher1_coupon8['forms'],\r
+ $voucher1_coupon8['layout'],\r
+ 'US Letter'\r
+ );\r
+\r
+/*********CPS\r
+ // Display Parking Map\r
+ if ($parkingImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $parkingImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Parking Map', 140, 130, "center", 'black' );\r
+ }\r
+\r
+ // Display Section Map\r
+ if ($sectionImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $sectionImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Section Map', 140, 130, "center", 'black' );\r
+ }\r
+*/\r
+\r
+ // Clear performance image loaded flag\r
+ $performanceLoaded = false;\r
+\r
+// $this->glmpdfNextPage();\r
+ $firstVoucherPageSet = false;\r
+\r
+ // Process Vouchers - For each type of ticket purchased\r
+ $numb_tickets = 0;\r
+ $counterSQL = '';\r
+ $packageVouchersPrintedSeparately = '';\r
+ $allPackageVouchersSeparate = true;\r
+ $packageVoucher = false;\r
+ $packageTicketName = '';\r
+ $doDashes = false;\r
+ $skipNextFormAdvance = false;\r
+\r
+ foreach( $vouchers as $t )\r
+ {\r
+\r
+ // Flag to determine if this voucher will be displayed (vouchers not displayed if it's a package ticket)\r
+ $displaying_this_voucher = false;\r
+\r
+ if (!$couponTest) {\r
+\r
+ // Check if the current voucher is a new package that has vouchers that print\r
+ if ($t['is_package']['value']) {\r
+\r
+ $packageVoucher = true;\r
+\r
+ // Check if any vouchers for this package print separately\r
+ $ticketPackage = $TicketPackages->getList('package = '.$t['ticket']);\r
+ if (is_array($ticketPackage) && count($ticketPackage) > 0) {\r
+\r
+ // For each ticket in the package\r
+ foreach ($ticketPackage as $tp) {\r
+\r
+ // Check if it requires a separate voucher\r
+ if ($tp['separate_voucher']['value']) {\r
+\r
+ // Set this flag to the package sold ID (same for all vouchers for a package) so we can tell if we hit the end of the package\r
+ $packageVouchersPrintedSeparately = $t['package_sold_id'];\r
+ $packagePerformanceName = $t['performance_name'];\r
+ $packageTicketName = $t['ticket_name'];\r
+ } else {\r
+ $allPackageVouchersSeparate = false;\r
+ }\r
+ }\r
+ }\r
+\r
+ // If we found one, then switch layouts.\r
+ if ($packageVouchersPrintedSeparately != '') {\r
+ $this->glmpdfSetForms(\r
+ $voucher3_coupon0['forms'],\r
+ $voucher3_coupon0['layout'],\r
+ 'US Letter'\r
+ );\r
+ $voucherPageStarted = false;\r
+ $skipNextFormAdvance = false;\r
+ $doDashes = true;\r
+ if ($numb_tickets) {\r
+ $skipNextFormAdvance = true;\r
+ }\r
+ }\r
+\r
+ // If we have a package with separate vouchers\r
+ } else {\r
+ $packageVoucher = false;\r
+ }\r
+\r
+ if ($packageVouchersPrintedSeparately != '') {\r
+\r
+ // Check if we're now past the package that had vouchers printed separately\r
+ if ($t['package_sold_id'] != $packageVouchersPrintedSeparately) {\r
+\r
+ $this->glmpdfSetForms(\r
+ $voucher1_coupon8['forms'],\r
+ $voucher1_coupon8['layout'],\r
+ 'US Letter'\r
+ );\r
+ $voucherPageStarted = false;\r
+ $packageVouchersPrintedSeparately = '';\r
+ $skipNextFormAdvance = true;\r
+ }\r
+\r
+ }\r
+\r
+ // Check if this voucher is a print separate voucher for a package\r
+ $printVoucher = false;\r
+ if ($t['ticket_package']) {\r
+\r
+ // Get ticket_package data\r
+ $ticketPackage = $TicketPackages->getList('package = '.$t['ticket_package'].' AND ticket = '.$t['ticket']);\r
+\r
+ // If Separate Voucher, override and display voucher.\r
+ if ($ticketPackage[0]['separate_voucher']['value']) {\r
+ $printVoucher = true;\r
+ }\r
+\r
+ } else {\r
+ $printVoucher = true;\r
+ }\r
+\r
+ // Check if this is a package voucher and we are printing all package tickets separately\r
+ if ($packageVoucher && $allPackageVouchersSeparate) {\r
+ $printVoucher = false;\r
+ }\r
+\r
+ // If this isn't a package ticket (we're not printing separate vouchers at this time)\r
+ if ($printVoucher) {\r
+\r
+\r
+ if ($packageVouchersPrintedSeparately) {\r
+\r
+ // If the first voucher page hasn't been set\r
+ if (!$voucherPageStarted) {\r
+ $this->glmpdfNextPage();\r
+ $voucherPageStarted = true;\r
+\r
+ if ($doDashes) {\r
+ // Print perforations\r
+ $this->glmpdfPlaceLine(1, 0, -38, 560, -38, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $this->glmpdfPlaceLine(1, 0, -291, 560, -291, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $doDashes = false;\r
+ }\r
+\r
+ }\r
+\r
+ $displaying_this_voucher = true;\r
+\r
+ if ($numb_tickets++ > 0) {\r
+\r
+ if ($skipNextFormAdvance) {\r
+ $skipNextFormAdvance = false;\r
+ } else {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 176, 560, 176, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 100, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 100, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place owner name at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ if ($haveTopImage) {\r
+ $this->glmpdfPlaceText( $config->owner->name, 315, 131, "center", 'black', -300, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( $config->owner->name, 280, 131, "center", 'black', -350, '');\r
+ }\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 176, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 176, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // If part of a package, print the package name it's part of.\r
+ if ($packageTicketName && !$t['is_package']['value']) {\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Part of:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( $packagePerformanceName, 30, 88, 'left', 'black', -165, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( $packageTicketName, 60, 88, 'left', 'black', -165, 'position=center rotate=90');\r
+\r
+ } else {\r
+\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -232, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['entrance_name'],ENT_QUOTES,"utf-8")), 30, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 60, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+\r
+ }\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), 280, 91, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 77, "center", 'black', -370, '' );\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], 280, 65, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 65, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Put package line for voucher here\r
+\r
+ // Check for Ticket add-ons\r
+/* No addons for packages\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+*/\r
+ // Non-Refundable and other Fixed text for body of Voucher\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $contactInfo = $this->config->owner->name.' - '\r
+ .$this->config->owner->address1.' - '\r
+ .($this->config->owner->address2 != '' ? ', '.$this->config->owner->address2 : '')\r
+ .$this->config->owner->city.', '\r
+ .$this->config->owner->state.' '\r
+ .$this->config->owner->zip.' - '\r
+ .$this->config->owner->phone\r
+ .($this->config->owner->toll_free != '' ? ' - '.$this->config->owner->toll_free : '');\r
+ $this->glmpdfPlaceText( html_entity_decode($contactInfo,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ // $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+ case 11:\r
+ $this->glmpdfSetFont( "Courier-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( "Pickup ".$this->config->term->voucher->norm." at ".$this->config->term->prop->norm, 510, 88, 'left', 'red', -170, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 88, 'left', 'black', -170, 'position=center rotate=90');\r
+ break;\r
+ case 12;\r
+ $this->glmpdfSetFont( "Courier-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( "You will receive ".$this->config->term->voucher->cap." by mail", 510, 88, 'left', 'red', -170, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 88, 'left', 'black', -170, 'position=center rotate=90');\r
+ break;\r
+ case 1:\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 40 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 88, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 88, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 88, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+\r
+\r
+ // Print a normal voucher\r
+ } else {\r
+\r
+ // If the first voucher page hasn't been set\r
+ if (!$voucherPageStarted) {\r
+ $this->glmpdfNextPage();\r
+ $voucherPageStarted = true;\r
+\r
+ if ($doDashes) {\r
+ // Print perforations\r
+ $this->glmpdfPlaceLine(1, 0, -11, 560, -11, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $this->glmpdfPlaceLine(1, 0, -265, 560, -265, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $doDashes = false;\r
+ }\r
+\r
+ }\r
+\r
+ $displaying_this_voucher = true;\r
+\r
+ if ($numb_tickets++ > 0) {\r
+\r
+ if ($skipNextFormAdvance) {\r
+ $skipNextFormAdvance = false;\r
+ } else {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 232, 560, 232, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 154, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 154, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place owner name at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ if ($haveTopImage) {\r
+ $this->glmpdfPlaceText( $config->owner->name, 315, 185, "center", 'black', -300, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( $config->owner->name, 280, 185, "center", 'black', -350, '');\r
+ }\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 232, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 232, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // If part of a package, print the package name it's part of.\r
+ if ($packageTicketName && !$t['is_package']['value']) {\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Part of:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( $packagePerformanceName, 30, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( $packageTicketName, 60, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+\r
+ } else {\r
+\r
+ // Voucher left end text overrides departing from text\r
+ if ($t['ticket_voucher_leftend_text'] != '') {\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -232, '', 'lightlilac', 'miter');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['ticket_voucher_leftend_text'],ENT_QUOTES,"utf-8")), 40, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ } else {\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -232, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['entrance_name'],ENT_QUOTES,"utf-8")), 30, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 60, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ }\r
+ }\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), 280, 135, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 114, "center", 'black', -370, '' );\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], 280, 96, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 96, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Put package line for voucher here\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+\r
+ // Non-Refundable and other Fixed text for body of Voucher\r
+ $this->glmpdfSetFont( "Helvetica", 12.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ $this->glmpdfSetFont( "Helvetica", 12.0 );\r
+ $contactInfo = $this->config->owner->name.' - '\r
+ .$this->config->owner->address1.' - '\r
+ .($this->config->owner->address2 != '' ? ', '.$this->config->owner->address2 : '')\r
+ .$this->config->owner->city.', '\r
+ .$this->config->owner->state.' '\r
+ .$this->config->owner->zip.' - '\r
+ .$this->config->owner->phone\r
+ .($this->config->owner->toll_free != '' ? ' - '.$this->config->owner->toll_free : '');\r
+ $this->glmpdfPlaceText( html_entity_decode($contactInfo,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 14.0 );\r
+ // $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+ case 11:\r
+ $this->glmpdfSetFont( "Courier-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( "Pickup ".$this->config->term->voucher->norm." at ".$this->config->term->prop->norm, 510, 116, 'left', 'red', -224, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ case 12;\r
+ $this->glmpdfSetFont( "Courier-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( "You will receive ".$this->config->term->voucher->cap." by mail", 510, 116, 'left', 'red', -224, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ case 1:\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 48 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 116, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 116, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+\r
+ } // End of normal voucher\r
+\r
+ } // Printing Voucher\r
+\r
+ }\r
+\r
+ if ($displaying_this_voucher) {\r
+\r
+ if (!$packageVouchersPrintedSeparately) {\r
+\r
+ $this->glmpdfNextForm();\r
+\r
+ // Get table of Ads/Coupons\r
+ if (isset($vc[1])) {\r
+\r
+ // Get the key for the current ad/coupon for position 1\r
+ $k = key($vc[1]);\r
+\r
+ // If the max count is -1 (unlimited) or more than the current display count\r
+ if ($vc[1][$k]['max_display_count'] < 0 || $vc[1][$k]['max_display_count'] > $vc[1][$k]['display_count']) {\r
+\r
+ // Display the ad/coupon and save SQL to update the display count\r
+ $counterSQL .= $this->displayCoupon(current($vc[1]), 375, 150);\r
+\r
+ // Incriment the local display count\r
+ $vc[1][$k]['display_count']++;\r
+ }\r
+\r
+ // Advance to the next ad/coupon for this position. If all used, start over.\r
+ if (next($vc[1]) === false) {\r
+ reset($vc[1]);\r
+ }\r
+ }\r
+\r
+ // Advance to the next form\r
+ $this->glmpdfNextForm();\r
+\r
+ // Do the same for the remaining ad/coupon forms\r
+\r
+ if (isset($vc[2])) {\r
+ $k = key($vc[2]);\r
+ if ($vc[2][$k]['max_display_count'] < 0 || $vc[2][$k]['max_display_count'] > $vc[2][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[2]), 170, 150);\r
+ $vc[2][$k]['display_count']++;\r
+ }\r
+ if (next($vc[2]) === false) {\r
+ reset($vc[2]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[3])) {\r
+ $k = key($vc[3]);\r
+ if ($vc[3][$k]['max_display_count'] < 0 || $vc[3][$k]['max_display_count'] > $vc[3][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[3]), 170, 150);\r
+ $vc[3][$k]['display_count']++;\r
+ }\r
+ if (next($vc[3]) === false) {\r
+ reset($vc[3]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[4])) {\r
+ $k = key($vc[4]);\r
+ if ($vc[4][$k]['max_display_count'] < 0 || $vc[4][$k]['max_display_count'] > $vc[4][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[4]), 375, 150);\r
+ $vc[4][$k]['display_count']++;\r
+ }\r
+ if (next($vc[4]) === false) {\r
+ reset($vc[4]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[5])) {\r
+ $k = key($vc[5]);\r
+ if ($vc[5][$k]['max_display_count'] < 0 || $vc[5][$k]['max_display_count'] > $vc[5][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[5]), 137, 120);\r
+ $vc[5][$k]['display_count']++;\r
+ }\r
+ if (next($vc[5]) === false) {\r
+ reset($vc[5]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[6])) {\r
+ $k = key($vc[6]);\r
+ if ($vc[6][$k]['max_display_count'] < 0 || $vc[6][$k]['max_display_count'] > $vc[6][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[6]), 137, 120);\r
+ $vc[6][$k]['display_count']++;\r
+ }\r
+ if (next($vc[6]) === false) {\r
+ reset($vc[6]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[7])) {\r
+ $k = key($vc[7]);\r
+ if ($vc[7][$k]['max_display_count'] < 0 || $vc[7][$k]['max_display_count'] > $vc[7][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[7]), 137, 120);\r
+ $vc[7][$k]['display_count']++;\r
+ }\r
+ if (next($vc[7]) === false) {\r
+ reset($vc[7]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[8])) {\r
+ $k = key($vc[8]);\r
+ if ($vc[8][$k]['max_display_count'] < 0 || $vc[8][$k]['max_display_count'] > $vc[8][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[8]), 137, 120);\r
+ $vc[8][$k]['display_count']++;\r
+ }\r
+ if (next($vc[8]) === false) {\r
+ reset($vc[8]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[9])) {\r
+ $k = key($vc[9]);\r
+ if ($vc[9][$k]['max_display_count'] < 0 || $vc[9][$k]['max_display_count'] > $vc[9][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[9]), 419, 120);\r
+ $vc[9][$k]['display_count']++;\r
+ }\r
+ if (next($vc[9]) === false) {\r
+ reset($vc[9]);\r
+ }\r
+ }\r
+ }\r
+ }\r
+\r
+ } // Each voucher\r
+\r
+ if ($vc != false) {\r
+ $this->dbh->exec("BEGIN;\n".$counterSQL."COMMIT;\n");\r
+ }\r
+\r
+ // Close PDF setup and send to user's browser\r
+ $this->glmpdfSendToBrowser( '', 'Star_Line_Ticket_Vouchers.pdf' );\r
+\r
+ if ($venueImageFile) {\r
+ unlink($venueImageFile);\r
+ }\r
+ if ($parkingImageFile) {\r
+ unlink($parkingImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+\r
+ }\r
+\r
+ private function displayCoupon($coupon, $xs, $ys)\r
+ {\r
+\r
+ // Attempt to get the coupon image\r
+ $im = $this->getCouponImage( $this->is, $coupon['coupon_image']);\r
+\r
+ // Check for stretch\r
+ $fit = 'auto';\r
+ if ($coupon['stretch_to_fit']['value']) {\r
+ $fit = 'entire';\r
+ }\r
+\r
+ // Check for padding - enforce a minimum size\r
+ $pad = $coupon['padding'];\r
+\r
+ $x = $xs - ($pad * 2);\r
+ if ($x < 10) {\r
+ $x == 10;\r
+ }\r
+ $y = $ys - ($pad * 2);\r
+ if ($y < 10) {\r
+ $y = 10;\r
+ }\r
+\r
+ // If the image exists\r
+ if ($im) {\r
+\r
+ // Place the image\r
+ $this->glmpdfPlaceImage($im, $pad, $pad, 1, $fit, 'center', $x, $y);\r
+\r
+\r
+ // If a border is requested display that\r
+ if ($coupon['show_border']['value']) {\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, $ys, $xs, $ys, $this->borderColor );\r
+ }\r
+\r
+ }\r
+\r
+ // SQL to Update Counters\r
+ $sql = "UPDATE eventmgt.voucher_coupons SET display_count = display_count + 1 WHERE id = ".$coupon['id'].";\n";\r
+\r
+ return $sql;\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to load an image for use in Voucher Ads or Coupons\r
+ *\r
+ * This function maintains a static array of loaded images. It\r
+ * first checks to see if the image has already been loaded and\r
+ * returns the existing object if it is. Otherwise it will\r
+ * attempt to load the image, store the open image object in the\r
+ * static array for future use, and return it.\r
+ *\r
+ * @param $is object Image Server Object\r
+ * @param $imageName string Name of the image to load\r
+ *\r
+ * @return object Loaded and opened image object or false if not loaded\r
+ *\r
+ */\r
+ private function getCouponImage( $is, $imageName )\r
+ {\r
+ static $images = array();\r
+\r
+ // Check if image has already been loaded\r
+ if (isset($images[$imageName])) {\r
+ return $images[$imageName];\r
+ }\r
+\r
+ // Try to load the image\r
+ $imageFile = $is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$imageName);\r
+ if ($imageFile) {\r
+\r
+ // Open the image and save it in case it's needeed again\r
+ $images[$imageName] = $this->glmpdfOpenImage($imageFile);\r
+\r
+ return $images[$imageName];\r
+\r
+ }\r
+\r
+ return false;\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to add check character to end of voucher number\r
+ *\r
+ * Uses config->voucher_check_secret and voucher # to create MD5 string\r
+ * then takes last hex character off of that string and shifts it up to\r
+ * always be a character (adds 16 to numbers and 10 to the upper-case\r
+ * version of the character).\r
+ * i.e. 0 = A, 9 = J, A = K, F =\r
+ *\r
+ */\r
+ public function addCheckCode($voucherNumb)\r
+ {\r
+\r
+ // Create MD5 string using voucher number and secret\r
+ $md5 = md5($voucherNumb.$this->config->voucher_check_secret);\r
+\r
+ // Get last character code of the last character in the MD5\r
+ $cc = strtoupper(substr($md5, -2));\r
+ $cc[0] = $this->shiftCheckCodeCharacter($cc[0]);\r
+ $cc[1] = $this->shiftCheckCodeCharacter($cc[1]);\r
+\r
+ // Return voucher number with the new character on the end\r
+ $voucherNumb .= $cc;\r
+ return $voucherNumb;\r
+\r
+ }\r
+\r
+ private function shiftCheckCodeCharacter($c) {\r
+\r
+ $x = ord($c);\r
+\r
+ // If it's a digit, add 16\r
+ if ($x < 65) {\r
+ $x += 17;\r
+ // otherwise, add 10\r
+ } else {\r
+ $x += 10;\r
+ }\r
+\r
+ // Also skip the letter O\r
+ if (x >= ord('O')) {\r
+ $x += 1;\r
+ }\r
+\r
+ return chr($x);\r
+ }\r
+\r
+} // class\r
+\r
+// Absolutely nothing after next line\r
+?>
\ No newline at end of file
--- /dev/null
+<?php // Absolutely nothing before this line\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ * Design: "StarLine"\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once PDF_ABSTRACT;\r
+$Pdf = new GlmPdf();\r
+\r
+/**\r
+ * PdfVoucher class\r
+ *\r
+ * @category PdfVoucher\r
+ * @package PDFLib\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @link <>\r
+*/\r
+class PdfVoucher extends GlmPdf\r
+{\r
+\r
+ public $borderWidth = 1;\r
+ public $borderColor = 'black';\r
+ public $pdfCouponInterval = 5;\r
+ public $pdfMinCoupons = 3;\r
+ public $config;\r
+ private $is;\r
+ private $dbh;\r
+\r
+ function __construct($order, $vouchers, $member, $dbh, $config, $couponTest = false)\r
+ {\r
+\r
+ $this->dbh = $dbh;\r
+ $this->config = $config;\r
+\r
+ // Load image server support\r
+ require_once IMAGE_SERVER_ABSTRACT;\r
+ $this->is = new ImageServerAbstract();\r
+\r
+ // if debug.glmpdf is set in the configs/common.ini file in the CommonApp directory, do grids on PDFs\r
+ define ('GLMPDF_DEBUG', $this->config->debug->glmpdf);\r
+\r
+ // Start with cover page.\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 0, 'y' => 0, 'xs' => 613, 'ys' => 792 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+\r
+ // Set PDF options - In this case, we don't allow printing for mobile vouchers\r
+ $optlist = "masterpassword=GLMPdfPerm permissions=noprint";\r
+\r
+ // Start page\r
+ $this->glmpdfStart( $this->config->owner->name, "Gaslight Media", "Ticket System Receipt/Vouchers", $optlist );\r
+ $this->glmpdfNextPage();\r
+\r
+ if( !$this->glmpdfAddFont( 'barcode', 'barcode/FREE3OF9.TTF' ) )\r
+ {\r
+ echo 'ERROR: Unable to add barcode font.<P>\r
+ Did you place the barcode font provided in docs/BarcodeFonts into\r
+ a system fonts directory ("/usr/share/fonts/truetype/Barcode")?\r
+ Also check the GLMPDF_PDF_FONT_DIR setting in GlmPdf.php.';\r
+ exit;\r
+ }\r
+\r
+ // Get images to tmp files\r
+ if (trim($member['image']) != '') {\r
+ $venueImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['image']);\r
+ if ($venueImageFile) {\r
+ $venueImage = $this->glmpdfOpenImage($venueImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($venueImage == false) {\r
+ $venueImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $venueImageFile = false;\r
+ }\r
+\r
+\r
+ // Load entrance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+ $Entrances = new EventManagementAdminEntrances($dbh, $config);\r
+\r
+ // Load performance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($dbh, $config);\r
+\r
+ // Load ticket packages data class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';\r
+ $TicketPackages = new EventManagementDataTicketPackages($dbh, $config);\r
+\r
+ // If no date has been supplied - make it today\r
+ if (isset($_REQUEST['date']) && $_REQUEST['date'] != '') {\r
+ $date = $_REQUEST['date'];\r
+ } else {\r
+ $date = date('m/d/Y', time());\r
+ }\r
+\r
+ $firstVoucherPageSet = false;\r
+\r
+ // Process Vouchers - For each type of ticket purchased\r
+ $numb_tickets = 0;\r
+ $counterSQL = '';\r
+ $packageVouchersPrintedSeparately = '';\r
+ $allPackageVouchersSeparate = true;\r
+ $packageVoucher = false;\r
+ $packageTicketName = '';\r
+ $doDashes = false;\r
+ $skipNextFormAdvance = false;\r
+\r
+ /* Cover Page */\r
+\r
+ // Header\r
+ if ($venueImageFile) {\r
+ $coverImage = $this->glmpdfOpenImage($venueImageFile);\r
+ $this->glmpdfPlaceImage($coverImage, 30, 690, .5, false, 'center', 280, 140);\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 ); // Header Text\r
+ $this->glmpdfPlaceText( $config->owner->name, 340, 750, "center", 'black', -400 );\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( $config->owner->short_name." - ".$member['name'], 340, $this->glmpdfCurrentY-10, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['addr1'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['city'].", ".$member['state']['name']." ".$member['zip'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+\r
+ // Sold To Information\r
+ $valCol = 60;\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->order->cap." ID: ".trim($order['id']), $valCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( trim($order['fname'].' '.$order['lname']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['addr1']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ if( trim($order['addr2']) != '' )\r
+ $this->glmpdfPlaceText( trim($order['addr2']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['city']).', '.$order['state']['value'].' '.trim($order['zip']).' '.$order['country']['value'], $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+\r
+ // Purchace/Charge information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $promptCol = 330;\r
+ $valCol = 420;\r
+ $this->glmpdfPlaceText( "Date of Purchase:", $promptCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['purchase_date']['date'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Type:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['cctype'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Name on Card:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccname'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Number:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccnumber'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Confirmation:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccconf'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Total Charged:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['charge_total'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+\r
+ // Purchase Summary\r
+ $ticNumbCol = 20;\r
+ $perfNameCol = 80;\r
+ $ticNameCol = 200;\r
+ $secNameCol = 370;\r
+ $dateCol = 440;\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, 550, "center", 'black', 0, '');\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( $this->config->term->performance->cap, $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( $this->config->term->ticket->cap, $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( $this->config->term->section->cap, $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ $this->glmpdfPlaceText( 'Date / Time', $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY-3, "center", 'black', 0, '');\r
+\r
+ foreach( $vouchers as $t ) {\r
+\r
+ $voucherCode = $this->addCheckCode($t['id']);\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ if (!$t['ticket_package']) {\r
+ $this->glmpdfPlaceText( $voucherCode, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ if (!$t['is_package']['value']) {\r
+ $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ }\r
+ }\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ foreach($t['addons_sold'] as $a) {\r
+\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($addonText,ENT_QUOTES,"utf-8"), $ticNameCol+10, $this->glmpdfCurrentY, "left", 'black', -240, '');\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ // Special Needs\r
+ $this->glmpdfSetFont( "Helvetica", 9.0 );\r
+ if (trim($order['special_needs']) != '') {\r
+ $this->glmpdfPlaceText( "Special Needs:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $order['special_needs'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // General Member Policies\r
+ if (trim($member['def_ticket_pol']) != '') {\r
+ $this->glmpdfPlaceText( "Policies:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $member['def_ticket_pol'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // General Member Policies\r
+ $noPrintNotice =\r
+ "NOTE: These MOBILE FRIENDLY vouchers are NOT FOR PRINTING, they are designed specifically for scanning directly from your mobile device. "\r
+ ."Scanners at the dock may not be able to read the barcode below from a printed page. "\r
+ ."If you need to print your vouchers, please select and print our standard PRINTABLE vouchers.";\r
+ $this->glmpdfPlaceTextBox( $noPrintNotice, 50, $this->glmpdfCurrentY-30, 500, 50, "left", 'black' );\r
+\r
+\r
+ // Start with cover page.\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 10, 'y' => 10, 'xs' => 593, 'ys' => 150),\r
+ ),\r
+ 612,\r
+ 170\r
+ );\r
+\r
+ $this->glmpdfNextPage();\r
+\r
+\r
+\r
+\r
+ $voucherCount = count($vouchers);\r
+ foreach( $vouchers as $t )\r
+ {\r
+\r
+ $voucherCount--;\r
+\r
+ // Flag to determine if this voucher will be displayed (vouchers not displayed if it's a package ticket)\r
+ $displaying_this_voucher = false;\r
+\r
+ if (!$couponTest) {\r
+\r
+ // Check if the current voucher is a new package that has vouchers that print\r
+ if ($t['is_package']['value']) {\r
+\r
+ $packageVoucher = true;\r
+\r
+ // Check if any vouchers for this package print separately\r
+ $ticketPackage = $TicketPackages->getList('package = '.$t['ticket']);\r
+ if (is_array($ticketPackage) && count($ticketPackage) > 0) {\r
+\r
+ // For each ticket in the package\r
+ foreach ($ticketPackage as $tp) {\r
+\r
+ // Check if it requires a separate voucher\r
+ if ($tp['separate_voucher']['value']) {\r
+\r
+ // Set this flag to the package sold ID (same for all vouchers for a package) so we can tell if we hit the end of the package\r
+ $packageVouchersPrintedSeparately = $t['package_sold_id'];\r
+ $packagePerformanceName = $t['performance_name'];\r
+ $packageTicketName = $t['ticket_name'];\r
+ } else {\r
+ $allPackageVouchersSeparate = false;\r
+ }\r
+ }\r
+ }\r
+\r
+ // If we found one, then switch layouts.\r
+ if ($packageVouchersPrintedSeparately != '') {\r
+ $this->glmpdfSetForms(\r
+ $voucher3_coupon0['forms'],\r
+ $voucher3_coupon0['layout'],\r
+ 'US Letter'\r
+ );\r
+ $voucherPageStarted = false;\r
+ $skipNextFormAdvance = false;\r
+ $doDashes = true;\r
+ if ($numb_tickets) {\r
+ $skipNextFormAdvance = true;\r
+ }\r
+ }\r
+\r
+ // If we have a package with separate vouchers\r
+ } else {\r
+ $packageVoucher = false;\r
+ }\r
+\r
+ if ($packageVouchersPrintedSeparately != '') {\r
+\r
+ // Check if we're now past the package that had vouchers printed separately\r
+ if ($t['package_sold_id'] != $packageVouchersPrintedSeparately) {\r
+\r
+ $this->glmpdfSetForms(\r
+ $voucher1_coupon8['forms'],\r
+ $voucher1_coupon8['layout'],\r
+ 'US Letter'\r
+ );\r
+ $voucherPageStarted = false;\r
+ $packageVouchersPrintedSeparately = '';\r
+\r
+ }\r
+\r
+ }\r
+\r
+ // Check if this voucher is a print separate voucher for a package\r
+ $printVoucher = false;\r
+ if ($t['ticket_package']) {\r
+\r
+ // Get ticket_package data\r
+ $ticketPackage = $TicketPackages->getList('package = '.$t['ticket_package'].' AND ticket = '.$t['ticket']);\r
+\r
+ // If Separate Voucher, override and display voucher.\r
+ if ($ticketPackage[0]['separate_voucher']['value']) {\r
+ $printVoucher = true;\r
+ }\r
+\r
+ } else {\r
+ $printVoucher = true;\r
+ }\r
+\r
+ // Check if this is a package voucher and we are printing all package tickets separately\r
+ if ($packageVoucher && $allPackageVouchersSeparate) {\r
+ $printVoucher = false;\r
+ }\r
+\r
+ // If this isn't a package ticket (we're not printing separate vouchers at this time)\r
+ $voucherPrinted = false;\r
+ if ($printVoucher) {\r
+\r
+ if ($packageVouchersPrintedSeparately) {\r
+\r
+ // If the first voucher page hasn't been set\r
+ if (!$voucherPageStarted) {\r
+// $this->glmpdfNextPage();\r
+ $voucherPageStarted = true;\r
+ }\r
+\r
+ $displaying_this_voucher = true;\r
+\r
+ if ($numb_tickets++ > 0) {\r
+\r
+ if ($skipNextFormAdvance) {\r
+ $skipNextFormAdvance = false;\r
+ } else {\r
+// $this->glmpdfNextForm();\r
+ }\r
+ }\r
+\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10 );\r
+// $this->glmpdfPlaceText( $config->owner->name, 300, 140, "center", 'black', -350, '');\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 48.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // If part of a package, print the package name it's part of.\r
+ $packageText = '';\r
+ if ($packageTicketName && !$t['is_package']['value']) {\r
+ $packageText = $packageTicketName.' - ';\r
+ }\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica", 11.0 );\r
+ $this->glmpdfPlaceText(\r
+ html_entity_decode($packageText,ENT_QUOTES,"utf-8")\r
+ .html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8")\r
+ .' - '.html_entity_decode($t['ticket_name'], ENT_QUOTES,"utf-8"),\r
+ 300, 135, "center", 'black', -570, '' );\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.5 );\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], 300, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 300, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // Display address and contact information\r
+ $this->glmpdfSetFont( "Helvetica", 8.5 );\r
+ $contactInfo = $this->config->owner->name.' - '\r
+ .$this->config->owner->address1.' - '\r
+ .($this->config->owner->address2 != '' ? ', '.$this->config->owner->address2 : '')\r
+ .$this->config->owner->city.', '\r
+ .$this->config->owner->state.' '\r
+ .$this->config->owner->zip.' - '\r
+ .$this->config->owner->phone\r
+ .($this->config->owner->toll_free != '' ? ' - '.$this->config->owner->toll_free : '');\r
+ $this->glmpdfPlaceText( html_entity_decode($contactInfo,ENT_QUOTES,"utf-8"), 300, 2, "center", 'black', -380, '');\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+ case 11:\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( "Pickup ".$this->config->term->voucher->norm." at ".$this->config->term->prop->norm, 300, 116, 'center', 'red', -224);\r
+ $this->glmpdfSetFont( "Helvetica", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 300, 116, 'center', 'black', -224);\r
+ break;\r
+ case 12;\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( "You will receive ".$this->config->term->voucher->cap." by mail", 510, 116, 'left', 'red', -224);\r
+ $this->glmpdfSetFont( "Helvetica", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224);\r
+ break;\r
+ case 1:\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 110 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 300, 30, 'center', 'black', 0);\r
+ break;\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( "Order #".$order['id'].' '.$this->config->term->voucher->cap.' '.$barcode, 300, 20, 'center', 'black', 0);\r
+\r
+ $voucherPrinted = true;\r
+\r
+ // Print a normal voucher\r
+ } else {\r
+\r
+ // If the first voucher page hasn't been set\r
+ if (!$voucherPageStarted) {\r
+// $this->glmpdfNextPage();\r
+ $voucherPageStarted = true;\r
+ }\r
+\r
+ $displaying_this_voucher = true;\r
+\r
+ if ($numb_tickets++ > 0) {\r
+\r
+ if ($skipNextFormAdvance) {\r
+ $skipNextFormAdvance = false;\r
+ } else {\r
+// $this->glmpdfNextForm();\r
+ }\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10 );\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 48.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // If part of a package, print the package name it's part of.\r
+ if ($packageTicketName && !$t['is_package']['value']) {\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Part of:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( $packagePerformanceName, 30, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( $packageTicketName, 60, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+\r
+ }\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica", 11.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8").' - '.html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"),\r
+ 300, 135, "center", 'black', -570, '' );\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.5 );\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], 300, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 300, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // Display address and contact information\r
+ $this->glmpdfSetFont( "Helvetica", 8.5 );\r
+ $contactInfo = $this->config->owner->name.' - '\r
+ .$this->config->owner->address1.' - '\r
+ .($this->config->owner->address2 != '' ? ', '.$this->config->owner->address2 : '')\r
+ .$this->config->owner->city.', '\r
+ .$this->config->owner->state.' '\r
+ .$this->config->owner->zip.' - '\r
+ .$this->config->owner->phone\r
+ .($this->config->owner->toll_free != '' ? ' - '.$this->config->owner->toll_free : '');\r
+ $this->glmpdfPlaceText( html_entity_decode($contactInfo,ENT_QUOTES,"utf-8"), 300, 2, "center", 'black', -380, '');\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+ case 11:\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( "Pickup ".$this->config->term->voucher->norm." at ".$this->config->term->prop->norm, 300, 116, 'center', 'red', -224);\r
+ $this->glmpdfSetFont( "Helvetica", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 300, 116, 'center', 'black', -224);\r
+ break;\r
+ case 12;\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( "You will receive ".$this->config->term->voucher->cap." by mail", 510, 116, 'left', 'red', -224);\r
+ $this->glmpdfSetFont( "Helvetica", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224);\r
+ break;\r
+ case 1:\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 110 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 300, 30, 'center', 'black', 0);\r
+ break;\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( "Order #".$order['id'].' '.$this->config->term->voucher->cap.' '.$barcode, 300, 20, 'center', 'black', 0);\r
+\r
+ $voucherPrinted = true;\r
+\r
+\r
+ } // End of normal voucher\r
+\r
+ if ($voucherPrinted && $voucherCount) {\r
+ $this->glmpdfNextForm();\r
+ }\r
+\r
+ } // Printing Voucher\r
+\r
+ }\r
+/*\r
+ if ($displaying_this_voucher) {\r
+ if (!$packageVouchersPrintedSeparately) {\r
+ }\r
+ }\r
+*/\r
+ } // Each voucher\r
+\r
+ if ($vc != false) {\r
+ $this->dbh->exec("BEGIN;\n".$counterSQL."COMMIT;\n");\r
+ }\r
+\r
+ // Close PDF setup and send to user's browser\r
+ $this->glmpdfSendToBrowser( '', 'Star_Line_Ticket_Vouchers_Mobile.pdf' );\r
+\r
+ if ($venueImageFile) {\r
+ unlink($venueImageFile);\r
+ }\r
+ if ($parkingImageFile) {\r
+ unlink($parkingImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+\r
+ }\r
+\r
+ private function displayCoupon($coupon, $xs, $ys)\r
+ {\r
+\r
+ // Attempt to get the coupon image\r
+ $im = $this->getCouponImage( $this->is, $coupon['coupon_image']);\r
+\r
+ // Check for stretch\r
+ $fit = 'auto';\r
+ if ($coupon['stretch_to_fit']['value']) {\r
+ $fit = 'entire';\r
+ }\r
+\r
+ // Check for padding - enforce a minimum size\r
+ $pad = $coupon['padding'];\r
+\r
+ $x = $xs - ($pad * 2);\r
+ if ($x < 10) {\r
+ $x == 10;\r
+ }\r
+ $y = $ys - ($pad * 2);\r
+ if ($y < 10) {\r
+ $y = 10;\r
+ }\r
+\r
+ // If the image exists\r
+ if ($im) {\r
+\r
+ // Place the image\r
+ $this->glmpdfPlaceImage($im, $pad, $pad, 1, $fit, 'center', $x, $y);\r
+\r
+\r
+ // If a border is requested display that\r
+ if ($coupon['show_border']['value']) {\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, $ys, $xs, $ys, $this->borderColor );\r
+ }\r
+\r
+ }\r
+\r
+ // SQL to Update Counters\r
+ $sql = "UPDATE eventmgt.voucher_coupons SET display_count = display_count + 1 WHERE id = ".$coupon['id'].";\n";\r
+\r
+ return $sql;\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to load an image for use in Voucher Ads or Coupons\r
+ *\r
+ * This function maintains a static array of loaded images. It\r
+ * first checks to see if the image has already been loaded and\r
+ * returns the existing object if it is. Otherwise it will\r
+ * attempt to load the image, store the open image object in the\r
+ * static array for future use, and return it.\r
+ *\r
+ * @param $is object Image Server Object\r
+ * @param $imageName string Name of the image to load\r
+ *\r
+ * @return object Loaded and opened image object or false if not loaded\r
+ *\r
+ */\r
+ private function getCouponImage( $is, $imageName )\r
+ {\r
+ static $images = array();\r
+\r
+ // Check if image has already been loaded\r
+ if (isset($images[$imageName])) {\r
+ return $images[$imageName];\r
+ }\r
+\r
+ // Try to load the image\r
+ $imageFile = $is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$imageName);\r
+ if ($imageFile) {\r
+\r
+ // Open the image and save it in case it's needeed again\r
+ $images[$imageName] = $this->glmpdfOpenImage($imageFile);\r
+\r
+ return $images[$imageName];\r
+\r
+ }\r
+\r
+ return false;\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to add check character to end of voucher number\r
+ *\r
+ * Uses config->voucher_check_secret and voucher # to create MD5 string\r
+ * then takes last hex character off of that string and shifts it up to\r
+ * always be a character (adds 16 to numbers and 10 to the upper-case\r
+ * version of the character).\r
+ * i.e. 0 = A, 9 = J, A = K, F =\r
+ *\r
+ */\r
+ public function addCheckCode($voucherNumb)\r
+ {\r
+\r
+ // Create MD5 string using voucher number and secret\r
+ $md5 = md5($voucherNumb.$this->config->voucher_check_secret);\r
+\r
+ // Get last character code of the last character in the MD5\r
+ $cc = strtoupper(substr($md5, -2));\r
+ $cc[0] = $this->shiftCheckCodeCharacter($cc[0]);\r
+ $cc[1] = $this->shiftCheckCodeCharacter($cc[1]);\r
+\r
+ // Return voucher number with the new character on the end\r
+ $voucherNumb .= $cc;\r
+ return $voucherNumb;\r
+\r
+ }\r
+\r
+ private function shiftCheckCodeCharacter($c) {\r
+\r
+ $x = ord($c);\r
+\r
+ // If it's a digit, add 16\r
+ if ($x < 65) {\r
+ $x += 17;\r
+ // otherwise, add 10\r
+ } else {\r
+ $x += 10;\r
+ }\r
+\r
+ // Also skip the letter O\r
+ if (x >= ord('O')) {\r
+ $x += 1;\r
+ }\r
+\r
+ return chr($x);\r
+ }\r
+\r
+} // class\r
+\r
+// Absolutely nothing after next line\r
+?>
\ No newline at end of file
--- /dev/null
+<?php // Absolutely nothing before this line\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ * Design: "PointerBoat"\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once PDF_ABSTRACT;\r
+$Pdf = new GlmPdf();\r
+\r
+/**\r
+ * PdfVoucher class\r
+ *\r
+ * @category PdfVoucher\r
+ * @package PDFLib\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @link <>\r
+*/\r
+class PdfVoucher extends GlmPdf\r
+{\r
+\r
+ public $borderWidth = 1;\r
+ public $borderColor = 'black';\r
+ public $pdfCouponInterval = 5;\r
+ public $pdfMinCoupons = 3;\r
+ public $config;\r
+ private $is;\r
+ private $dbh;\r
+\r
+ function __construct($order, $vouchers, $member, $dbh, $config, $couponTest = false)\r
+ {\r
+\r
+ $this->dbh = $dbh;\r
+ $this->config = $config;\r
+\r
+ // Load image server support\r
+ require_once IMAGE_SERVER_ABSTRACT;\r
+ $this->is = new ImageServerAbstract();\r
+\r
+ // if debug.glmpdf is set in the configs/common.ini file in the CommonApp directory, do grids on PDFs\r
+ define ('GLMPDF_DEBUG', $this->config->debug->glmpdf);\r
+\r
+ // The following produces a color test sheet. There is no return from that call.\r
+ // $this->glmpdfShowValidColors(); exit;\r
+\r
+ // Start with cover page.\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 0, 'y' => 0, 'xs' => 613, 'ys' => 792 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+\r
+ // Start page\r
+ $this->glmpdfStart( $this->config->owner->name, "Gaslight Media", "Ticket System Receipt/Vouchers" );\r
+\r
+ if( !$this->glmpdfAddFont( 'barcode', 'barcode/FREE3OF9.TTF' ) )\r
+ {\r
+ echo 'ERROR: Unable to add barcode font.<P>\r
+ Did you place the barcode font provided in docs/BarcodeFonts into\r
+ a system fonts directory ("/usr/share/fonts/truetype/Barcode")?\r
+ Also check the GLMPDF_PDF_FONT_DIR setting in GlmPdf.php.';\r
+ exit;\r
+ }\r
+\r
+ // Get images to tmp files\r
+ if (trim($member['image']) != '') {\r
+ $venueImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['image']);\r
+ if ($venueImageFile) {\r
+ $venueImage = $this->glmpdfOpenImage($venueImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($venueImage == false) {\r
+ $venueImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $venueImageFile = false;\r
+ }\r
+\r
+ if (trim($member['parking_map']) != '') {\r
+ $parkingImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['parking_map']);\r
+ if ($parkingImageFile) {\r
+ $parkingImage = $this->glmpdfOpenImage($parkingImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($parkingImage == false) {\r
+ $parkingImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $parkingImageFile = false;\r
+ }\r
+\r
+ if (trim($member['ticket_sec_map']) != '') {\r
+ $sectionImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['ticket_sec_map']);\r
+ if ($sectionImageFile) {\r
+ $sectionImage = $this->glmpdfOpenImage($sectionImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($sectionImage == false) {\r
+ $sectionImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $sectionImageFile = false;\r
+ }\r
+\r
+ // Load entrance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+ $Entrances = new EventManagementAdminEntrances($dbh, $config);\r
+\r
+ // Load performance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($dbh, $config);\r
+\r
+ // Load Voucher Coupons class and get coupons list for display\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataVoucherCoupons.php';\r
+ $VoucherCoupons = new EventManagementDataVoucherCoupons($dbh, $config);\r
+\r
+ // Load ticket packages data class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'classes/data/dataTicketPackages.php';\r
+ $TicketPackages = new EventManagementDataTicketPackages($dbh, $config);\r
+\r
+\r
+ // If no date has been supplied - make it today\r
+ if (isset($_REQUEST['date']) && $_REQUEST['date'] != '') {\r
+ $date = $_REQUEST['date'];\r
+ } else {\r
+ $date = date('m/d/Y', time());\r
+ }\r
+\r
+ $vc = $VoucherCoupons->getCouponsForDisplay($date);\r
+\r
+ // Setup footers\r
+/*\r
+ $footer = 'For assistance call '.$this->config->owner->phone;\r
+ if ($this->config->owner->toll_free != '') {\r
+ $footer .= ' or '.$this->config->owner->toll_free;\r
+ }\r
+*/\r
+\r
+ if (!$couponTest) {\r
+\r
+ $this->glmpdfNextForm();\r
+\r
+ /* Cover Page */\r
+\r
+ // Header\r
+ if ($venueImageFile) {\r
+ $coverImage = $this->glmpdfOpenImage($venueImageFile);\r
+ $this->glmpdfPlaceImage($coverImage, 30, 690, .5, false, 'center', 280, 140);\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 ); // Header Text\r
+ $this->glmpdfPlaceText( $config->owner->name, 340, 750, "center", 'black', -400 );\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+// $this->glmpdfPlaceText( $config->owner->short_name." - ".$member['name'], 340, $this->glmpdfCurrentY-10, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( htmlspecialchars_decode($member['name'], ENT_QUOTES), 340, $this->glmpdfCurrentY-10, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['addr1'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['city'].", ".$member['state']['name']." ".$member['zip'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+\r
+ // Sold To Information\r
+ $valCol = 60;\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->order->cap." ID: ".trim($order['id']), $valCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( trim($order['fname'].' '.$order['lname']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['addr1']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ if( trim($order['addr2']) != '' )\r
+ $this->glmpdfPlaceText( trim($order['addr2']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['city']).', '.$order['state']['value'].' '.trim($order['zip']).' '.$order['country']['value'], $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+\r
+ // Purchace/Charge information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $promptCol = 330;\r
+ $valCol = 420;\r
+ $this->glmpdfPlaceText( "Date of Purchase:", $promptCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['purchase_date']['date'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Type:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['cctype'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Name on Card:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccname'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Number:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccnumber'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Confirmation:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccconf'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Total Charged:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['charge_total'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+\r
+ // Purchase Summary\r
+ $ticNumbCol = 20;\r
+ $perfNameCol = 80;\r
+ $ticNameCol = 300;\r
+ $secNameCol = 450;\r
+ $dateCol = 500;\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, 550, "center", 'black', 0, '');\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( $this->config->term->performance->cap, $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( $this->config->term->ticket->cap, $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+// $this->glmpdfPlaceText( $this->config->term->section->cap, $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ $this->glmpdfPlaceText( 'Date / Time', $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY-3, "center", 'black', 0, '');\r
+\r
+ foreach( $vouchers as $t ) {\r
+\r
+ $voucherCode = $this->addCheckCode($t['id']);\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ if (!$t['ticket_package']) {\r
+ $this->glmpdfPlaceText( $voucherCode, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ }\r
+ $memberPerformance = $t['real_member_name'].': '.$t['performance_name'];\r
+ $this->glmpdfPlaceText( html_entity_decode($memberPerformance,ENT_QUOTES,"utf-8"), $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ if (!$t['is_package']['value']) {\r
+// $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ if ($t['date_specific']['value']) {\r
+ $datetime = $t['ticket_date']['date'];\r
+ if ($t['time_specific']['value']) {\r
+ $datetime .= ' '.$t['ticket_time']['time'];\r
+ }\r
+// $this->glmpdfPlaceText( $t['ticket_date']['date'].'.', $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( $datetime, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ }\r
+ }\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ foreach($t['addons_sold'] as $a) {\r
+\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($addonText,ENT_QUOTES,"utf-8"), $ticNameCol+10, $this->glmpdfCurrentY, "left", 'black', -240, '');\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ // Special Needs\r
+ $this->glmpdfSetFont( "Helvetica", 9.0 );\r
+ if (trim($order['special_needs']) != '') {\r
+ $this->glmpdfPlaceText( "Special Needs:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $order['special_needs'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // General Member Policies\r
+ if (trim($member['def_ticket_pol']) != '') {\r
+ $this->glmpdfPlaceText( "Policies:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $member['def_ticket_pol'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ }\r
+\r
+ // Standard voucher & coupon form - 1 Voucher, 8 coupons\r
+ $voucher1_coupon8 = array(\r
+ 'forms' => 10,\r
+ 'layout' => array(\r
+ 1 => array( 'x' => 25, 'y' => 515, 'xs' => 560, 'ys' => 232 ),\r
+ 2 => array( 'x' => 25, 'y' => 325, 'xs' => 375, 'ys' => 150 ),\r
+ 3 => array( 'x' => 415, 'y' => 325, 'xs' => 170, 'ys' => 150 ),\r
+ 4 => array( 'x' => 25, 'y' => 160, 'xs' => 170, 'ys' => 150 ),\r
+ 5 => array( 'x' => 210, 'y' => 160, 'xs' => 375, 'ys' => 150 ),\r
+ 6 => array( 'x' => 25, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 7 => array( 'x' => 166, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 8 => array( 'x' => 307, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 9 => array( 'x' => 448, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 10 => array( 'x' => 25, 'y' => 25, 'xs' => 419, 'ys' => 120 ),\r
+ )\r
+ );\r
+\r
+ // No voucher & coupon form - 9 Coupons\r
+ $voucher0_coupon9 = array(\r
+ 'forms' => 9,\r
+ 'layout' => array(\r
+ // 1 => array( 'x' => 25, 'y' => 515, 'xs' => 560, 'ys' => 232 ),\r
+ 1 => array( 'x' => 25, 'y' => 325, 'xs' => 375, 'ys' => 150 ),\r
+ 2 => array( 'x' => 415, 'y' => 325, 'xs' => 170, 'ys' => 150 ),\r
+ 3 => array( 'x' => 25, 'y' => 160, 'xs' => 170, 'ys' => 150 ),\r
+ 4 => array( 'x' => 210, 'y' => 160, 'xs' => 375, 'ys' => 150 ),\r
+ 5 => array( 'x' => 25, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 6 => array( 'x' => 166, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 7 => array( 'x' => 307, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 8 => array( 'x' => 448, 'y' => 25, 'xs' => 137, 'ys' => 120 ),\r
+ 9 => array( 'x' => 25, 'y' => 25, 'xs' => 419, 'ys' => 120 ),\r
+ )\r
+ );\r
+\r
+ // Package vouchers - 3 vouchers, no coupons\r
+ $voucher3_coupon0 = array(\r
+ 'forms' => 3,\r
+ 'layout' => array(\r
+ 1 => array( 'x' => 25, 'y' => 531, 'xs' => 560, 'ys' => 176 ),\r
+ 2 => array( 'x' => 25, 'y' => 284, 'xs' => 560, 'ys' => 176 ),\r
+ 3 => array( 'x' => 25, 'y' => 35, 'xs' => 560, 'ys' => 176 )\r
+ )\r
+ );\r
+\r
+ // Now setup ticket forms\r
+ $this->glmpdfSetForms(\r
+ $voucher3_coupon0['forms'],\r
+ $voucher3_coupon0['layout'],\r
+ 'US Letter'\r
+ );\r
+\r
+/*********CPS\r
+ // Display Parking Map\r
+ if ($parkingImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $parkingImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Parking Map', 140, 130, "center", 'black' );\r
+ }\r
+\r
+ // Display Section Map\r
+ if ($sectionImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $sectionImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Section Map', 140, 130, "center", 'black' );\r
+ }\r
+*/\r
+\r
+ // Clear performance image loaded flag\r
+ $performanceLoaded = false;\r
+\r
+// $this->glmpdfNextPage();\r
+ $firstVoucherPageSet = false;\r
+\r
+ // Process Vouchers - For each type of ticket purchased\r
+ $numb_tickets = 0;\r
+ $counterSQL = '';\r
+ $packageVouchersPrintedSeparately = '';\r
+ $allPackageVouchersSeparate = true;\r
+ $packageVoucher = false;\r
+ $packageTicketName = '';\r
+ $doDashes = false;\r
+ $skipNextFormAdvance = false;\r
+\r
+ foreach( $vouchers as $t )\r
+ {\r
+\r
+ // Fix member output\r
+ $t['member_name'] = htmlspecialchars_decode($t['member_name'], ENT_QUOTES);\r
+\r
+\r
+ // Flag to determine if this voucher will be displayed (vouchers not displayed if it's a package ticket)\r
+ $displaying_this_voucher = false;\r
+\r
+ if (!$couponTest) {\r
+\r
+ // Check if the current voucher is a new package that has vouchers that print\r
+ if ($t['is_package']['value']) {\r
+\r
+ $packageVoucher = true;\r
+\r
+ // Check if any vouchers for this package print separately\r
+ $ticketPackage = $TicketPackages->getList('package = '.$t['ticket']);\r
+ if (is_array($ticketPackage) && count($ticketPackage) > 0) {\r
+\r
+ // For each ticket in the package\r
+ foreach ($ticketPackage as $tp) {\r
+\r
+ // Check if it requires a separate voucher\r
+ if ($tp['separate_voucher']['value']) {\r
+\r
+ // Set this flag to the package sold ID (same for all vouchers for a package) so we can tell if we hit the end of the package\r
+ $packageVouchersPrintedSeparately = $t['package_sold_id'];\r
+ $packagePerformanceName = $t['performance_name'];\r
+ $packageTicketName = $t['ticket_name'];\r
+ } else {\r
+ $allPackageVouchersSeparate = false;\r
+ }\r
+ }\r
+ }\r
+\r
+ // If we found one, then switch layouts.\r
+ if ($packageVouchersPrintedSeparately != '') {\r
+ $this->glmpdfSetForms(\r
+ $voucher3_coupon0['forms'],\r
+ $voucher3_coupon0['layout'],\r
+ 'US Letter'\r
+ );\r
+ $voucherPageStarted = false;\r
+ $skipNextFormAdvance = false;\r
+ $doDashes = true;\r
+ if ($numb_tickets) {\r
+ $skipNextFormAdvance = true;\r
+ }\r
+ }\r
+\r
+ // If we have a package with separate vouchers\r
+ } else {\r
+ $packageVoucher = false;\r
+ }\r
+/*\r
+ if ($packageVouchersPrintedSeparately != '') {\r
+\r
+ // Check if we're now past the package that had vouchers printed separately\r
+ if ($t['package_sold_id'] != $packageVouchersPrintedSeparately) {\r
+\r
+ $this->glmpdfSetForms(\r
+ $voucher1_coupon8['forms'],\r
+ $voucher1_coupon8['layout'],\r
+ 'US Letter'\r
+ );\r
+ $voucherPageStarted = false;\r
+ $packageVouchersPrintedSeparately = '';\r
+ $skipNextFormAdvance = true;\r
+ }\r
+\r
+ }\r
+*/\r
+\r
+ // Check if this voucher is a print separate voucher for a package\r
+ $printVoucher = false;\r
+ if ($t['ticket_package']) {\r
+\r
+ // Get ticket_package data\r
+ $ticketPackage = $TicketPackages->getList('package = '.$t['ticket_package'].' AND ticket = '.$t['ticket']);\r
+\r
+ // If Separate Voucher, override and display voucher.\r
+ if ($ticketPackage[0]['separate_voucher']['value']) {\r
+ $printVoucher = true;\r
+ }\r
+\r
+ } else {\r
+ $printVoucher = true;\r
+ }\r
+\r
+ // Check if this is a package voucher and we are printing all package tickets separately\r
+ if ($packageVoucher && $allPackageVouchersSeparate) {\r
+ $printVoucher = false;\r
+ }\r
+\r
+ // If this isn't a package ticket (we're not printing separate vouchers at this time)\r
+ if ($printVoucher) {\r
+\r
+ if ($packageVouchersPrintedSeparately) {\r
+\r
+ // If the first voucher page hasn't been set\r
+ if (!$voucherPageStarted) {\r
+ $this->glmpdfNextPage();\r
+ $voucherPageStarted = true;\r
+\r
+ if ($doDashes) {\r
+ // Print perforations\r
+ $this->glmpdfPlaceLine(1, 0, -38, 560, -38, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $this->glmpdfPlaceLine(1, 0, -291, 560, -291, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $doDashes = false;\r
+ }\r
+\r
+ }\r
+\r
+ $displaying_this_voucher = true;\r
+\r
+ if ($numb_tickets++ > 0) {\r
+\r
+ if ($skipNextFormAdvance) {\r
+ $skipNextFormAdvance = false;\r
+ } else {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 176, 560, 176, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 100, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 100, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place owner name at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ if ($haveTopImage) {\r
+ $this->glmpdfPlaceText( $config->owner->name, 315, 131, "center", 'black', -300, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( $config->owner->name, 280, 131, "center", 'black', -350, '');\r
+ }\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 176, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 176, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // If part of a package, print the package name it's part of.\r
+ if ($packageTicketName && !$t['is_package']['value']) {\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Part of:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( $packagePerformanceName, 30, 88, 'left', 'black', -165, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( $packageTicketName, 60, 88, 'left', 'black', -165, 'position=center rotate=90');\r
+\r
+ } else {\r
+\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -232, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['entrance_name'],ENT_QUOTES,"utf-8")), 30, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 60, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+\r
+ }\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), 280, 91, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 77, "center", 'black', -370, '' );\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], 280, 65, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 65, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Put package line for voucher here\r
+\r
+ // Check for Ticket add-ons\r
+/* No addons for packages\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+*/\r
+ // Non-Refundable and other Fixed text for body of Voucher\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $contactInfo = $this->config->owner->name.' - '\r
+ .$this->config->owner->address1.' - '\r
+ .($this->config->owner->address2 != '' ? ', '.$this->config->owner->address2 : '')\r
+ .$this->config->owner->city.', '\r
+ .$this->config->owner->state.' '\r
+ .$this->config->owner->zip.' - '\r
+ .$this->config->owner->phone\r
+ .($this->config->owner->toll_free != '' ? ' - '.$this->config->owner->toll_free : '');\r
+ $this->glmpdfPlaceText( html_entity_decode($contactInfo,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ // $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+ case 11:\r
+ $this->glmpdfSetFont( "Courier-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( "Pickup ".$this->config->term->voucher->norm." at ".$this->config->term->prop->norm, 510, 88, 'left', 'red', -170, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 88, 'left', 'black', -170, 'position=center rotate=90');\r
+ break;\r
+ case 12;\r
+ $this->glmpdfSetFont( "Courier-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( "You will receive ".$this->config->term->voucher->cap." by mail", 510, 88, 'left', 'red', -170, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 88, 'left', 'black', -170, 'position=center rotate=90');\r
+ break;\r
+ case 1:\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 40 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 88, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 88, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 88, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+\r
+\r
+ // Print a normal voucher\r
+ } else {\r
+\r
+ // If the first voucher page hasn't been set\r
+ if (!$voucherPageStarted) {\r
+ $this->glmpdfNextPage();\r
+ $voucherPageStarted = true;\r
+\r
+ if ($doDashes) {\r
+ // Print perforations\r
+ $this->glmpdfPlaceLine(1, 0, -11, 560, -11, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $this->glmpdfPlaceLine(1, 0, -265, 560, -265, $color = "dimgray", $dash = true, $d_a = 1, $d_b = 5);\r
+ $doDashes = false;\r
+ }\r
+\r
+ }\r
+\r
+ $displaying_this_voucher = true;\r
+\r
+ if ($numb_tickets++ > 0) {\r
+\r
+ if ($skipNextFormAdvance) {\r
+ $skipNextFormAdvance = false;\r
+ } else {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 232, 560, 232, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $this->is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 154, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 154, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place members at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ if ($haveTopImage) {\r
+ $this->glmpdfPlaceText( $t['member_name'], 315, 185, "center", 'black', -300, '');\r
+ } else {\r
+ $this->glmpdfPlaceText( $t['member_name'], 280, 185, "center", 'black', -350, '');\r
+ }\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 232, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 232, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // If part of a package, print the package name it's part of.\r
+ if ($packageTicketName && !$t['is_package']['value']) {\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Part of:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( $packagePerformanceName, 30, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ $this->glmpdfPlaceText( $packageTicketName, 60, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+\r
+ } else {\r
+\r
+ // Voucher left end text overrides departing from text\r
+ if ($t['ticket_voucher_leftend_text'] != '') {\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -232, '', 'lightlilac', 'miter');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['ticket_voucher_leftend_text'],ENT_QUOTES,"utf-8")), 40, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ } else {\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -232, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 16.0 );\r
+\r
+ $this->glmpdfPlaceText( strtoupper(htmlspecialchars_decode($t['entrance_name'],ENT_QUOTES)), 30, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+// $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 45, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ }\r
+ }\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+// $this->glmpdfPlaceText( html_entity_decode($t['real_member_name'],ENT_QUOTES,"utf-8"), 280, 135, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 135, "center", 'black', -370, '' );\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ if ($t['date_specific']['value']) {\r
+\r
+ $datetime = $t['ticket_date']['date'];\r
+ if ($t['time_specific']['value']) {\r
+ $datetime .= ' '.$t['ticket_time']['time'];\r
+ }\r
+// $this->glmpdfPlaceText( $t['ticket_date']['date'], 280, 96, "center", 'black', -370, '' );\r
+ $this->glmpdfPlaceText( $datetime, 280, 114, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 96, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Put package line for voucher here\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+\r
+ // Non-Refundable and other Fixed text for body of Voucher\r
+ $this->glmpdfSetFont( "Helvetica", 12.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ $this->glmpdfSetFont( "Helvetica", 12.0 );\r
+ $contactInfo = $this->config->owner->name.' - '\r
+ .$this->config->owner->address1.' - '\r
+ .($this->config->owner->address2 != '' ? ', '.$this->config->owner->address2 : '')\r
+ .$this->config->owner->city.', '\r
+ .$this->config->owner->state.' '\r
+ .$this->config->owner->zip.' - '\r
+ .$this->config->owner->phone\r
+ .($this->config->owner->toll_free != '' ? ' - '.$this->config->owner->toll_free : '');\r
+ $this->glmpdfPlaceText( html_entity_decode($contactInfo,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 14.0 );\r
+ // $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+ case 11:\r
+ $this->glmpdfSetFont( "Courier-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( "Pickup ".$this->config->term->voucher->norm." at ".$this->config->term->prop->norm, 510, 116, 'left', 'red', -224, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ case 12;\r
+ $this->glmpdfSetFont( "Courier-Bold", 12.0 );\r
+ $this->glmpdfPlaceText( "You will receive ".$this->config->term->voucher->cap." by mail", 510, 116, 'left', 'red', -224, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ case 1:\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 48 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 116, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 116, 'left', 'black', -224, 'position=center rotate=90');\r
+ break;\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 116, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+\r
+ } // End of normal voucher\r
+\r
+ } // Printing Voucher\r
+\r
+ }\r
+ } // Each voucher\r
+\r
+\r
+// if ($displaying_this_voucher) {\r
+\r
+ $haveActiveCoupons = false;\r
+ if (isset($vc) && is_array($vc) && count($vc) > 0) {\r
+ foreach($vc as $c) {\r
+ $k = key($c);\r
+ if ($c[$k]['max_display_count'] < 0 || ($c[$k]['max_display_count'] > $c[$k]['display_count'])) {\r
+ $haveActiveCoupons = true;\r
+ }\r
+ }\r
+ }\r
+ if ($haveActiveCoupons) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfSetForms(\r
+ $voucher0_coupon9['forms'],\r
+ $voucher0_coupon9['layout'],\r
+ 'US Letter'\r
+ );\r
+\r
+ // Get table of Ads/Coupons\r
+ if (isset($vc[1])) {\r
+\r
+ // Get the key for the current ad/coupon for position 1\r
+ $k = key($vc[1]);\r
+\r
+ // If the max count is -1 (unlimited) or more than the current display count\r
+ if ($vc[1][$k]['max_display_count'] < 0 || $vc[1][$k]['max_display_count'] > $vc[1][$k]['display_count']) {\r
+\r
+ // Display the ad/coupon and save SQL to update the display count\r
+ $counterSQL .= $this->displayCoupon(current($vc[1]), 375, 150);\r
+\r
+ // Incriment the local display count\r
+ $vc[1][$k]['display_count']++;\r
+ }\r
+\r
+ // Advance to the next ad/coupon for this position. If all used, start over.\r
+ if (next($vc[1]) === false) {\r
+ reset($vc[1]);\r
+ }\r
+ }\r
+\r
+ // Advance to the next form\r
+ $this->glmpdfNextForm();\r
+\r
+ // Do the same for the remaining ad/coupon forms\r
+\r
+ if (isset($vc[2])) {\r
+ $k = key($vc[2]);\r
+ if ($vc[2][$k]['max_display_count'] < 0 || $vc[2][$k]['max_display_count'] > $vc[2][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[2]), 170, 150);\r
+ $vc[2][$k]['display_count']++;\r
+ }\r
+ if (next($vc[2]) === false) {\r
+ reset($vc[2]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[3])) {\r
+ $k = key($vc[3]);\r
+ if ($vc[3][$k]['max_display_count'] < 0 || $vc[3][$k]['max_display_count'] > $vc[3][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[3]), 170, 150);\r
+ $vc[3][$k]['display_count']++;\r
+ }\r
+ if (next($vc[3]) === false) {\r
+ reset($vc[3]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[4])) {\r
+ $k = key($vc[4]);\r
+ if ($vc[4][$k]['max_display_count'] < 0 || $vc[4][$k]['max_display_count'] > $vc[4][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[4]), 375, 150);\r
+ $vc[4][$k]['display_count']++;\r
+ }\r
+ if (next($vc[4]) === false) {\r
+ reset($vc[4]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[5])) {\r
+ $k = key($vc[5]);\r
+ if ($vc[5][$k]['max_display_count'] < 0 || $vc[5][$k]['max_display_count'] > $vc[5][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[5]), 137, 120);\r
+ $vc[5][$k]['display_count']++;\r
+ }\r
+ if (next($vc[5]) === false) {\r
+ reset($vc[5]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[6])) {\r
+ $k = key($vc[6]);\r
+ if ($vc[6][$k]['max_display_count'] < 0 || $vc[6][$k]['max_display_count'] > $vc[6][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[6]), 137, 120);\r
+ $vc[6][$k]['display_count']++;\r
+ }\r
+ if (next($vc[6]) === false) {\r
+ reset($vc[6]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[7])) {\r
+ $k = key($vc[7]);\r
+ if ($vc[7][$k]['max_display_count'] < 0 || $vc[7][$k]['max_display_count'] > $vc[7][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[7]), 137, 120);\r
+ $vc[7][$k]['display_count']++;\r
+ }\r
+ if (next($vc[7]) === false) {\r
+ reset($vc[7]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[8])) {\r
+ $k = key($vc[8]);\r
+ if ($vc[8][$k]['max_display_count'] < 0 || $vc[8][$k]['max_display_count'] > $vc[8][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[8]), 137, 120);\r
+ $vc[8][$k]['display_count']++;\r
+ }\r
+ if (next($vc[8]) === false) {\r
+ reset($vc[8]);\r
+ }\r
+ }\r
+ $this->glmpdfNextForm();\r
+\r
+ if (isset($vc[9])) {\r
+ $k = key($vc[9]);\r
+ if ($vc[9][$k]['max_display_count'] < 0 || $vc[9][$k]['max_display_count'] > $vc[9][$k]['display_count']) {\r
+ $counterSQL .= $this->displayCoupon(current($vc[9]), 419, 120);\r
+ $vc[9][$k]['display_count']++;\r
+ }\r
+ if (next($vc[9]) === false) {\r
+ reset($vc[9]);\r
+ }\r
+ }\r
+\r
+ }\r
+// }\r
+\r
+// } // Each voucher\r
+\r
+ if ($vc != false) {\r
+ $this->dbh->exec("BEGIN;\n".$counterSQL."COMMIT;\n");\r
+ }\r
+\r
+ // Close PDF setup and send to user's browser\r
+ $this->glmpdfSendToBrowser( '', 'Star_Line_Ticket_Vouchers.pdf' );\r
+\r
+ if ($venueImageFile) {\r
+ unlink($venueImageFile);\r
+ }\r
+ if ($parkingImageFile) {\r
+ unlink($parkingImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+\r
+ }\r
+\r
+ private function displayCoupon($coupon, $xs, $ys)\r
+ {\r
+\r
+ // Attempt to get the coupon image\r
+ $im = $this->getCouponImage( $this->is, $coupon['coupon_image']);\r
+\r
+ // Check for stretch\r
+ $fit = 'auto';\r
+ if ($coupon['stretch_to_fit']['value']) {\r
+ $fit = 'entire';\r
+ }\r
+\r
+ // Check for padding - enforce a minimum size\r
+ $pad = $coupon['padding'];\r
+\r
+ $x = $xs - ($pad * 2);\r
+ if ($x < 10) {\r
+ $x == 10;\r
+ }\r
+ $y = $ys - ($pad * 2);\r
+ if ($y < 10) {\r
+ $y = 10;\r
+ }\r
+\r
+ // If the image exists\r
+ if ($im) {\r
+\r
+ // Place the image\r
+ $this->glmpdfPlaceImage($im, $pad, $pad, 1, $fit, 'center', $x, $y);\r
+\r
+\r
+ // If a border is requested display that\r
+ if ($coupon['show_border']['value']) {\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, $ys, $xs, $ys, $this->borderColor );\r
+ }\r
+\r
+ }\r
+\r
+ // SQL to Update Counters\r
+ $sql = "UPDATE eventmgt.voucher_coupons SET display_count = display_count + 1 WHERE id = ".$coupon['id'].";\n";\r
+\r
+ return $sql;\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to load an image for use in Voucher Ads or Coupons\r
+ *\r
+ * This function maintains a static array of loaded images. It\r
+ * first checks to see if the image has already been loaded and\r
+ * returns the existing object if it is. Otherwise it will\r
+ * attempt to load the image, store the open image object in the\r
+ * static array for future use, and return it.\r
+ *\r
+ * @param $is object Image Server Object\r
+ * @param $imageName string Name of the image to load\r
+ *\r
+ * @return object Loaded and opened image object or false if not loaded\r
+ *\r
+ */\r
+ private function getCouponImage( $is, $imageName )\r
+ {\r
+ static $images = array();\r
+\r
+ // Check if image has already been loaded\r
+ if (isset($images[$imageName])) {\r
+ return $images[$imageName];\r
+ }\r
+\r
+ // Try to load the image\r
+ $imageFile = $is->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$imageName);\r
+ if ($imageFile) {\r
+\r
+ // Open the image and save it in case it's needeed again\r
+ $images[$imageName] = $this->glmpdfOpenImage($imageFile);\r
+\r
+ return $images[$imageName];\r
+\r
+ }\r
+\r
+ return false;\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to add check character to end of voucher number\r
+ *\r
+ * Uses config->voucher_check_secret and voucher # to create MD5 string\r
+ * then takes last hex character off of that string and shifts it up to\r
+ * always be a character (adds 16 to numbers and 10 to the upper-case\r
+ * version of the character).\r
+ * i.e. 0 = A, 9 = J, A = K, F =\r
+ *\r
+ */\r
+ public function addCheckCode($voucherNumb)\r
+ {\r
+\r
+ // Create MD5 string using voucher number and secret\r
+ $md5 = md5($voucherNumb.$this->config->voucher_check_secret);\r
+\r
+ // Get last character code of the last character in the MD5\r
+ $cc = strtoupper(substr($md5, -2));\r
+ $cc[0] = $this->shiftCheckCodeCharacter($cc[0]);\r
+ $cc[1] = $this->shiftCheckCodeCharacter($cc[1]);\r
+\r
+ // Return voucher number with the new character on the end\r
+ $voucherNumb .= $cc;\r
+ return $voucherNumb;\r
+\r
+ }\r
+\r
+ private function shiftCheckCodeCharacter($c) {\r
+\r
+ $x = ord($c);\r
+\r
+ // If it's a digit, add 16\r
+ if ($x < 65) {\r
+ $x += 17;\r
+ // otherwise, add 10\r
+ } else {\r
+ $x += 10;\r
+ }\r
+\r
+ // Also skip the letter O\r
+ if (x >= ord('O')) {\r
+ $x += 1;\r
+ }\r
+\r
+ return chr($x);\r
+ }\r
+\r
+} // class\r
+\r
+// Absolutely nothing after next line\r
+?>\r
--- /dev/null
+<?php // Absolutely nothing before this line\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ * Design: "MMM" (Michigan Maritime Museum)\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once PDF_ABSTRACT;\r
+$Pdf = new GlmPdf();\r
+\r
+/**\r
+ * PdfVoucher class\r
+ *\r
+ * @category PdfVoucher\r
+ * @package PDFLib\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @link <>\r
+*/\r
+class PdfVoucher extends GlmPdf\r
+{\r
+\r
+ public $borderWidth = 1;\r
+ public $borderColor = 'black';\r
+ public $pdfCouponInterval = 5;\r
+ public $pdfMinCoupons = 3;\r
+ public $config;\r
+ public $companyContact = false;\r
+ public $venueContact = false;\r
+\r
+ function __construct($order, $vouchers, $member, $dbh, $config)\r
+ {\r
+\r
+ $this->config = $config;\r
+\r
+ // if debug.glmpdf is set in the configs/common.ini file in the CommonApp directory, do grids on PDFs\r
+ define ('GLMPDF_DEBUG', $this->config->debug->glmpdf);\r
+\r
+ // The following produces a color test sheet. There is no return from that call.\r
+ // $this->glmpdfShowValidColors();\r
+\r
+ // Start with cover page.\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 0, 'y' => 0, 'xs' => 613, 'ys' => 792 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+\r
+ // Start page\r
+ $this->glmpdfStart( $this->config->owner->name, "Michigan Maritime Museum", "Ticket System Receipt/Vouchers" );\r
+\r
+ if( !$this->glmpdfAddFont( 'barcode', 'barcode/FREE3OF9.TTF' ) )\r
+ {\r
+ echo 'ERROR: Unable to add barcode font.<P>\r
+ Did you place the barcode font provided in docs/BarcodeFonts into\r
+ a system fonts directory ("/usr/share/fonts/truetype/Barcode")?\r
+ Also check the GLMPDF_PDF_FONT_DIR setting in GlmPdf.php.';\r
+ exit;\r
+ }\r
+\r
+ // If coupon test is selected, print them all now.\r
+ if( isset($_REQUEST['test_coupons']) )\r
+ {\r
+ for( $i=1 ; $i<=count($coupons) ; $i++ )\r
+ $this->printCoupon( $i );\r
+\r
+ glmpdf_send_to_browser( '', 'voucher.pdf' );\r
+ exit;\r
+ }\r
+\r
+ // Get images to tmp files\r
+ require_once IMAGE_SERVER_ABSTRACT;\r
+ $imServer = new ImageServerAbstract();\r
+\r
+ if (trim($member['image']) != '') {\r
+ $venueImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['image']);\r
+ if ($venueImageFile) {\r
+ $venueImage = $this->glmpdfOpenImage($venueImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($venueImage == false) {\r
+ $venueImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $venueImageFile = false;\r
+ }\r
+\r
+ if (trim($member['parking_map']) != '') {\r
+ $parkingImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['parking_map']);\r
+ if ($parkingImageFile) {\r
+ $parkingImage = $this->glmpdfOpenImage($parkingImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($parkingImage == false) {\r
+ $parkingImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $parkingImageFile = false;\r
+ }\r
+\r
+ if (trim($member['ticket_sec_map']) != '') {\r
+ $sectionImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['ticket_sec_map']);\r
+ if ($sectionImageFile) {\r
+ $sectionImage = $this->glmpdfOpenImage($sectionImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($sectionImage == false) {\r
+ $sectionImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $sectionImageFile = false;\r
+ }\r
+\r
+ // Load entrance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+ $Entrances = new EventManagementAdminEntrances($dbh, $config);\r
+\r
+ // Load performance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($dbh, $config);\r
+\r
+ // Setup additional information\r
+ // Company contact info\r
+ if ($config->option->voucher->show_company_contact) {\r
+ $companyContact = '';\r
+ $sep = '';\r
+ if ($config->option->voucher->show_company_name) {\r
+ $companyContact .= $config->owner->name;\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_company_addr && $config->owner->addr1) {\r
+ $companyContact .= $sep.$config->owner->addr1;\r
+ $sep = ' - ';\r
+ if ($config->owner->addr2) {\r
+ $companyContact .= ', '.$config->owner->addr2;\r
+ }\r
+ }\r
+ if ($config->option->voucher->show_company_citystate) {\r
+ $companyContact .= $sep.$config->owner->city.', '.$config->owner->state;\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_company_phone) {\r
+ if ($config->owner->toll_free) {\r
+ $companyContact .= $sep.$config->owner->toll_free;\r
+ } else {\r
+ $companyContact .= $sep.$config->owner->phone;\r
+ }\r
+ }\r
+ }\r
+ // Venue/Location contact info\r
+ $venueContact = false;\r
+ if ($config->option->voucher->show_venue_contact) {\r
+ $venueContact = '';\r
+ $sep = '';\r
+ if ($config->option->voucher->show_venue_name) {\r
+ $venueContact .= $member['name'];\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_venue_addr && $member['addr1']) {\r
+ $venueContact .= $sep.$member['addr1'];\r
+ $sep = ' - ';\r
+ if ($member['addr2']) {\r
+ $venueContact .= ', '.$member['addr2'];\r
+ }\r
+ }\r
+ if ($config->option->voucher->show_venue_citystate) {\r
+ $venueContact .= $sep.$member['city'].', '.$member['state']['name'];\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_venue_phone) {\r
+ $venueContact .= $sep.$member['phone'];\r
+ }\r
+ }\r
+\r
+ // START VOUCHER PRINTOUT\r
+\r
+ $this->glmpdfNextForm();\r
+\r
+ /* Cover Page */\r
+\r
+ // Header\r
+ if ($venueImageFile) {\r
+ $coverImage = $this->glmpdfOpenImage($venueImageFile);\r
+ $this->glmpdfPlaceImage($coverImage, 30, 690, .5, false, 'center', 280, 140);\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 ); // Header Text\r
+ $this->glmpdfPlaceText( $config->owner->name, 340, 750, "center", 'black', -400 );\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( $config->owner->short_name." - ".$member['name'], 340, $this->glmpdfCurrentY-10, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['addr1'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['city'].", ".$member['state']['name']." ".$member['zip'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+\r
+ // Sold To Information\r
+ $valCol = 60;\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->order->cap." ID: ".trim($order['id']), $valCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( trim($order['fname'].' '.$order['lname']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['addr1']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ if( trim($order['addr2']) != '' )\r
+ $this->glmpdfPlaceText( trim($order['addr2']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['city']).', '.$order['state']['value'].' '.trim($order['zip']).' '.$order['country']['value'], $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+\r
+ // Purchace/Charge information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $promptCol = 330;\r
+ $valCol = 420;\r
+ $this->glmpdfPlaceText( "Date of Purchase:", $promptCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['purchase_date']['date'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Type:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['cctype'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Name on Card:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccname'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Number:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccnumber'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Confirmation:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccconf'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Total Charged:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['charge_total'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+\r
+ // Purchase Summary\r
+ $ticNumbCol = 20;\r
+ $perfNameCol = 80;\r
+ $ticNameCol = 200;\r
+ $secNameCol = 370;\r
+ $dateCol = 440;\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, 550, "center", 'black', 0, '');\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( $this->config->term->performance->cap, $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( $this->config->term->ticket->cap, $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( $this->config->term->section->cap, $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ $this->glmpdfPlaceText( 'Date / Time', $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY-3, "center", 'black', 0, '');\r
+\r
+ foreach( $vouchers as $t ) {\r
+\r
+ $voucherCode = $this->addCheckCode($t['id']);\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $voucherCode, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'].' '.$t['ticket_time']['time'], $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ }\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ foreach($t['addons_sold'] as $a) {\r
+\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($addonText,ENT_QUOTES,"utf-8"), $ticNameCol+10, $this->glmpdfCurrentY, "left", 'black', -240, '');\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ // Special Needs\r
+ $this->glmpdfSetFont( "Helvetica", 9.0 );\r
+ if (trim($order['special_needs']) != '') {\r
+ $this->glmpdfPlaceText( "Special Needs:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $order['special_needs'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // General Member Policies\r
+ if (trim($member['def_ticket_pol']) != '') {\r
+ $this->glmpdfPlaceText( "Policies:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $member['def_ticket_pol'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // Now setup ticket forms\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 25, 'y' => 495, 'xs' => 560, 'ys' => 275 )\r
+// 2 => array( 'x' => 25, 'y' => 210, 'xs' => 560, 'ys' => 275 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+ // Also reset form count\r
+ $this->glmpdfNextPage();\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+/*********CPS\r
+ // Display Parking Map\r
+ if ($parkingImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $parkingImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Parking Map', 140, 130, "center", 'black' );\r
+ }\r
+\r
+ // Display Section Map\r
+ if ($sectionImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $sectionImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Section Map', 140, 130, "center", 'black' );\r
+ }\r
+*/\r
+\r
+ // Load mask for darkening the bottom portion of the tickets\r
+// $ticketMask = $this->glmpdfOpenImage(EVENT_MANAGEMENT_APP_BASE.'web/custom/greatlakesbaymag/assets/ticket-gradient.png');\r
+\r
+ // Clear performance image loaded flag\r
+ $performanceLoaded = false;\r
+\r
+ // Process Vouchers - For each type of ticket purchased\r
+ $numb_tickets = 0;\r
+ foreach( $vouchers as $t )\r
+ {\r
+\r
+ if ($numb_tickets++ > 0) {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 275, 560, 275, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 195, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 195, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place owner name at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ if ($haveTopImage) {\r
+\r
+// $this->glmpdfPlaceText( $config->owner->name, 315, 227, "center", 'black', -300, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8"), 315, 227, "center", 'black', -300, '');\r
+ } else {\r
+// $this->glmpdfPlaceText( $config->owner->name, 280, 227, "center", 'black', -350, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8"), 280, 227, "center", 'black', -350, '');\r
+ }\r
+\r
+ // Place mask\r
+ //$this->glmpdfPlaceImage($ticketMask, 0, 52, .25, false, 'center', 280, 140);\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 275, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 275, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -275, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+// $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['entrance_name'],ENT_QUOTES,"utf-8")), 40, 138, 'left', 'black', -250, 'position=center rotate=90');\r
+// $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 60, 138, 'left', 'black', -250, 'position=center rotate=90');\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 26.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), 280, 170, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 140, "center", 'black', -370, '' );\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+// $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), 280, 130, "center", 'black', -370, '' );\r
+ $this->glmpdfSetFont( "Helvetica", 18.0 );\r
+ if ($t['date_specific']['value']) {\r
+ $thisTime = '';\r
+ if ($t['time_specific']['value']) {\r
+ $thisTime = ' - '.$t['ticket_time']['time'];\r
+ }\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'].$thisTime, 280, 110, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 110, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+\r
+ // Display NON-REFUNDABLE MESSAGE\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ if ($venueContact) {\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($this->config->term->prop->cap.' contact information',ENT_QUOTES,"utf-8"), 280, $this->glmpdfCurrentY-5, "center", 'black', -300, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($venueContact,ENT_QUOTES,"utf-8"), 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+ }\r
+\r
+ // Display address and contact information\r
+ if ($companyContact) {\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($companyContact,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+ }\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 14.0 );\r
+// $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+\r
+ case 11: // Voucher/Ticket for Pickup - no Barcode\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( "Pickup at ".$this->config->term->prop->norm, 510, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ case 12; // Voucher/Ticket to be mailed Mailed - no Barcode\r
+ case 82; // Object Sold (i.e. books) to be mailed - no Barcode\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( "You will receive this by mail", 510, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ case 1: // Standard Voucher/Ticket with Barcode\r
+ case 81; // Object Sold (i.e. books) to be claimed - with Barcode\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 54 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 140, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 140, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Check if we need to display a coupon\r
+ if( ++$numb_tickets % $this->pdfCouponInterval == 0 )\r
+ $this->printCoupon();\r
+\r
+ } // Each voucher\r
+\r
+ // Make sure we print the minimum number of coupons\r
+ $numb_coupons = 0;\r
+ while( $numb_coupons < $this->pdfMinCoupons ) {\r
+ $this->printCoupon();\r
+ $numb_coupons++;\r
+ }\r
+\r
+ // Close PDF setup and send to user's browser\r
+ $this->glmpdfSendToBrowser( '', 'voucher.pdf' );\r
+\r
+ if ($venueImageFile) {\r
+ unlink($venueImageFile);\r
+ }\r
+ if ($parkingImageFile) {\r
+ unlink($parkingImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+\r
+ }\r
+\r
+\r
+ // function to print a coupon\r
+ function printCoupon()\r
+ {\r
+ // Print a Coupon\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 142, 281, 142, $this->borderColor );\r
+\r
+ // Place Coupon Image\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Coupon Title', 85, 130, "center", 'black' );\r
+ $this->glmpdfPlaceText( 'Expires on: 1/1/2020', 85, 75 );\r
+ $this->glmpdfSetFont( "Times-Bold", 30.0 );\r
+ $this->glmpdfPlaceText( "COUPON", 85, 95, "center", 'lightgrey' );\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceTextBox( 'This is a coupon description. It describes this coupon.', 5, 55, 274, 40, "left", 'black' );\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( "Michigan Maritime Museum - South Haven, MI - 269-637-8078", 144.5, 2, "center", 'darkblue' );\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to add check character to end of voucher number\r
+ *\r
+ * Uses config->voucher_check_secret and voucher # to create MD5 string\r
+ * then takes last hex character off of that string and shifts it up to\r
+ * always be a character (adds 16 to numbers and 10 to the upper-case\r
+ * version of the character).\r
+ * i.e. 0 = A, 9 = J, A = K, F =\r
+ *\r
+ */\r
+ public function addCheckCode($voucherNumb)\r
+ {\r
+\r
+ // Create MD5 string using voucher number and secret\r
+ $md5 = md5($voucherNumb.$this->config->voucher_check_secret);\r
+\r
+ // Get last character code of the last character in the MD5\r
+ $cc = strtoupper(substr($md5, -2));\r
+ $cc[0] = $this->shiftCheckCodeCharacter($cc[0]);\r
+ $cc[1] = $this->shiftCheckCodeCharacter($cc[1]);\r
+\r
+ // Return voucher number with the new character on the end\r
+ $voucherNumb .= $cc;\r
+ return $voucherNumb;\r
+\r
+ }\r
+\r
+ private function shiftCheckCodeCharacter($c) {\r
+\r
+ $x = ord($c);\r
+\r
+ // If it's a digit, add 16\r
+ if ($x < 65) {\r
+ $x += 17;\r
+ // otherwise, add 10\r
+ } else {\r
+ $x += 10;\r
+ }\r
+\r
+ // Also skip the letter O\r
+ if (x >= ord('O')) {\r
+ $x += 1;\r
+ }\r
+\r
+ return chr($x);\r
+ }\r
+\r
+} // class\r
+\r
+// Absolutely nothing after next line\r
+?>\r
--- /dev/null
+<?php // Absolutely nothing before this line\r
+/**\r
+ * Event Management System\r
+ * Model Action: Order_printVoucher\r
+ * Design: "Generic"\r
+ *\r
+ * PHP version 5\r
+ *\r
+ * @category Admin\r
+ * @package EventManagement\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @release SVN: $Id: printVoucher.inc,v 1.0 2011/01/25 19:31:47 cscott Exp $\r
+ */\r
+\r
+require_once PDF_ABSTRACT;\r
+$Pdf = new GlmPdf();\r
+\r
+/**\r
+ * PdfVoucher class\r
+ *\r
+ * @category PdfVoucher\r
+ * @package PDFLib\r
+ * @author Chuck Scott <cscott@gaslightmedia.com>\r
+ * @license http://www.gaslightmedia.com Gaslightmedia\r
+ * @link <>\r
+*/\r
+class PdfVoucher extends GlmPdf\r
+{\r
+\r
+ public $borderWidth = 1;\r
+ public $borderColor = 'black';\r
+ public $pdfCouponInterval = 5;\r
+ public $pdfMinCoupons = 3;\r
+ public $config;\r
+ public $companyContact = false;\r
+ public $venueContact = false;\r
+\r
+ function __construct($order, $vouchers, $member, $dbh, $config)\r
+ {\r
+\r
+ $this->config = $config;\r
+\r
+ // if debug.glmpdf is set in the configs/common.ini file in the CommonApp directory, do grids on PDFs\r
+ define ('GLMPDF_DEBUG', $this->config->debug->glmpdf);\r
+\r
+ // The following produces a color test sheet. There is no return from that call.\r
+ // $this->glmpdfShowValidColors();\r
+\r
+ // Start with cover page.\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 0, 'y' => 0, 'xs' => 613, 'ys' => 792 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+\r
+ // Start page\r
+ $this->glmpdfStart( $this->config->owner->name, "Gaslight Media", "Ticket System Receipt/Vouchers" );\r
+\r
+ if( !$this->glmpdfAddFont( 'barcode', 'barcode/FREE3OF9.TTF' ) )\r
+ {\r
+ echo 'ERROR: Unable to add barcode font.<P>\r
+ Did you place the barcode font provided in docs/BarcodeFonts into\r
+ a system fonts directory ("/usr/share/fonts/truetype/Barcode")?\r
+ Also check the GLMPDF_PDF_FONT_DIR setting in GlmPdf.php.';\r
+ exit;\r
+ }\r
+\r
+ // If coupon test is selected, print them all now.\r
+// if( isset($_REQUEST['test_coupons']) )\r
+// {\r
+// for( $i=1 ; $i<=count($coupons) ; $i++ )\r
+// $this->printCoupon( $i );\r
+//\r
+// glmpdf_send_to_browser( '', 'voucher.pdf' );\r
+// exit;\r
+// }\r
+\r
+ // Get images to tmp files\r
+ require_once IMAGE_SERVER_ABSTRACT;\r
+ $imServer = new ImageServerAbstract();\r
+\r
+ if (trim($member['image']) != '') {\r
+ $venueImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['image']);\r
+ if ($venueImageFile) {\r
+ $venueImage = $this->glmpdfOpenImage($venueImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($venueImage == false) {\r
+ $venueImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $venueImageFile = false;\r
+ }\r
+\r
+ if (trim($member['parking_map']) != '') {\r
+ $parkingImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['parking_map']);\r
+ if ($parkingImageFile) {\r
+ $parkingImage = $this->glmpdfOpenImage($parkingImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($parkingImage == false) {\r
+ $parkingImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $parkingImageFile = false;\r
+ }\r
+\r
+ if (trim($member['ticket_sec_map']) != '') {\r
+ $sectionImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$member['ticket_sec_map']);\r
+ if ($sectionImageFile) {\r
+ $sectionImage = $this->glmpdfOpenImage($sectionImageFile);\r
+\r
+ // If failure getting the image\r
+ if ($sectionImage == false) {\r
+ $sectionImageFile = false;\r
+ }\r
+ }\r
+ } else {\r
+ $sectionImageFile = false;\r
+ }\r
+\r
+ // Load entrance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/entrances.php';\r
+ $Entrances = new EventManagementAdminEntrances($dbh, $config);\r
+\r
+ // Load performance class\r
+ require_once EVENT_MANAGEMENT_APP_BASE.'models/admin/classes/performances.php';\r
+ $Performances = new EventManagementAdminPerformances($dbh, $config);\r
+\r
+ // Setup additional information\r
+ // Company contact info\r
+ if ($config->option->voucher->show_company_contact) {\r
+ $companyContact = '';\r
+ $sep = '';\r
+ if ($config->option->voucher->show_company_name) {\r
+ $companyContact .= $config->owner->name;\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_company_addr && $config->owner->addr1) {\r
+ $companyContact .= $sep.$config->owner->addr1;\r
+ $sep = ' - ';\r
+ if ($config->owner->addr2) {\r
+ $companyContact .= ', '.$config->owner->addr2;\r
+ }\r
+ }\r
+ if ($config->option->voucher->show_company_citystate) {\r
+ $companyContact .= $sep.$config->owner->city.', '.$config->owner->state;\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_company_phone) {\r
+ if ($config->owner->toll_free) {\r
+ $companyContact .= $sep.$config->owner->toll_free;\r
+ } else {\r
+ $companyContact .= $sep.$config->owner->phone;\r
+ }\r
+ }\r
+ }\r
+ // Venue/Location contact info\r
+ $venueContact = false;\r
+ if ($config->option->voucher->show_venue_contact) {\r
+ $venueContact = '';\r
+ $sep = '';\r
+ if ($config->option->voucher->show_venue_name) {\r
+ $venueContact .= $member['name'];\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_venue_addr && $member['addr1']) {\r
+ $venueContact .= $sep.$member['addr1'];\r
+ $sep = ' - ';\r
+ if ($member['addr2']) {\r
+ $venueContact .= ', '.$member['addr2'];\r
+ }\r
+ }\r
+ if ($config->option->voucher->show_venue_citystate) {\r
+ $venueContact .= $sep.$member['city'].', '.$member['state']['name'];\r
+ $sep = ' - ';\r
+ }\r
+ if ($config->option->voucher->show_venue_phone) {\r
+ $venueContact .= $sep.$member['phone'];\r
+ }\r
+ }\r
+\r
+ // START VOUCHER PRINTOUT\r
+\r
+ $this->glmpdfNextForm();\r
+\r
+ /* Cover Page */\r
+\r
+ // Header\r
+ if ($venueImageFile) {\r
+ $coverImage = $this->glmpdfOpenImage($venueImageFile);\r
+ $this->glmpdfPlaceImage($coverImage, 30, 690, .5, false, 'center', 280, 140);\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 18.0 ); // Header Text\r
+ $this->glmpdfPlaceText( $config->owner->name, 340, 750, "center", 'black', -400 );\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( $config->owner->short_name." - ".$member['name'], 340, $this->glmpdfCurrentY-10, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['addr1'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+ $this->glmpdfPlaceText( $member['city'].", ".$member['state']['name']." ".$member['zip'], 340, $this->glmpdfCurrentY, "center", 'black', -400 );\r
+\r
+ // Sold To Information\r
+ $valCol = 60;\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->order->cap." ID: ".trim($order['id']), $valCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( trim($order['fname'].' '.$order['lname']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['addr1']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ if( trim($order['addr2']) != '' )\r
+ $this->glmpdfPlaceText( trim($order['addr2']), $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+ $this->glmpdfPlaceText( trim($order['city']).', '.$order['state']['value'].' '.trim($order['zip']).' '.$order['country']['value'], $valCol, $this->glmpdfCurrentY-5, "left", 'black', -200 );\r
+\r
+ // Purchace/Charge information\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $promptCol = 330;\r
+ $valCol = 420;\r
+ $this->glmpdfPlaceText( "Date of Purchase:", $promptCol, 650, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['purchase_date']['date'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Type:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['cctype'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Name on Card:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccname'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Card Number:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccnumber'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Confirmation:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['ccconf'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+ $this->glmpdfPlaceText( "Total Charged:", $promptCol, $this->glmpdfCurrentY-5, "left", 'black' );\r
+ $this->glmpdfPlaceText( $order['charge_total'], $valCol, $this->glmpdfLastY, "left", 'black', -160 );\r
+\r
+ // Purchase Summary\r
+ $ticNumbCol = 20;\r
+ $perfNameCol = 80;\r
+ $ticNameCol = 200;\r
+ $secNameCol = 370;\r
+ $dateCol = 440;\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, 550, "center", 'black', 0, '');\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( $this->config->term->performance->cap, $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( $this->config->term->ticket->cap, $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( $this->config->term->section->cap, $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ $this->glmpdfPlaceText( 'Date / Time', $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+\r
+ $this->glmpdfPlaceText( '', $ticNumbCol, $this->glmpdfCurrentY-3, "center", 'black', 0, '');\r
+\r
+ foreach( $vouchers as $t ) {\r
+\r
+ $voucherCode = $this->addCheckCode($t['id']);\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceText( $voucherCode, $ticNumbCol, $this->glmpdfCurrentY, "left", 'black', -52, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), $perfNameCol, $this->glmpdfLastY, "left", 'black', -110, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), $ticNameCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), $secNameCol, $this->glmpdfLastY, "left", 'black', -60, '');\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, $dateCol, $this->glmpdfLastY, "left", 'black', -160, '');\r
+ }\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ foreach($t['addons_sold'] as $a) {\r
+\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( html_entity_decode($addonText,ENT_QUOTES,"utf-8"), $ticNameCol+10, $this->glmpdfCurrentY, "left", 'black', -240, '');\r
+ }\r
+ }\r
+\r
+ }\r
+\r
+ // Special Needs\r
+ $this->glmpdfSetFont( "Helvetica", 9.0 );\r
+ if (trim($order['special_needs']) != '') {\r
+ $this->glmpdfPlaceText( "Special Needs:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $order['special_needs'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // General Member Policies\r
+ if (trim($member['def_ticket_pol']) != '') {\r
+ $this->glmpdfPlaceText( "Policies:", 20, $this->glmpdfCurrentY-30, "left", 'black' );\r
+ $this->glmpdfPlaceTextBox( $member['def_ticket_pol'], 100, $this->glmpdfCurrentY+16, 450, 50, "left", 'black' );\r
+ }\r
+\r
+ // Now setup ticket forms\r
+ $this->glmpdfSetForms(\r
+ 1,\r
+ array(\r
+ 1 => array( 'x' => 25, 'y' => 495, 'xs' => 560, 'ys' => 275 )\r
+// 2 => array( 'x' => 25, 'y' => 210, 'xs' => 560, 'ys' => 275 )\r
+ ),\r
+ 'US Letter'\r
+ );\r
+ // Also reset form count\r
+ $this->glmpdfNextPage();\r
+\r
+ // Display Footer\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( $footer, 140.5, 2, "center", 'darkblue' );\r
+/*********CPS\r
+ // Display Parking Map\r
+ if ($parkingImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $parkingImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Parking Map', 140, 130, "center", 'black' );\r
+ }\r
+\r
+ // Display Section Map\r
+ if ($sectionImage) {\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceImage( $sectionImage, 0, 2, 0, 'meet', 'center', 280, 125);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Section Map', 140, 130, "center", 'black' );\r
+ }\r
+*/\r
+\r
+ // Load mask for darkening the bottom portion of the tickets\r
+// $ticketMask = $this->glmpdfOpenImage(EVENT_MANAGEMENT_APP_BASE.'web/custom/greatlakesbaymag/assets/ticket-gradient.png');\r
+\r
+ // Clear performance image loaded flag\r
+ $performanceLoaded = false;\r
+\r
+ // Process Vouchers - For each type of ticket purchased\r
+ $numb_tickets = 0;\r
+ foreach( $vouchers as $t )\r
+ {\r
+\r
+ if ($numb_tickets++ > 0) {\r
+ $this->glmpdfNextForm();\r
+ }\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 275, 560, 275, $this->borderColor );\r
+\r
+ // Display Logo - Only get performance image if it's not currently loaded\r
+ if ($performanceLoaded != $t['performance']) {\r
+\r
+ $performanceDetail = $Performances->getPerformanceDetail($t['performance']);\r
+\r
+ // If we have an image but it's the wrong one, dump the temp file\r
+ if ($performanceImageFile) {\r
+ unlink($performanceImageFile);\r
+ }\r
+\r
+ // This performance image is not currently loaded - so do that now\r
+\r
+ $performanceImageFile = $imServer->saveImageToTemp(IMAGE_SERVER_PREFIX.'original/'.$performanceDetail['image']);\r
+ if ($performanceImageFile) {\r
+ // If we have the image, then load it\r
+ $performanceImage = $this->glmpdfOpenImage($performanceImageFile);\r
+ $performanceLoaded = $t['performance'];\r
+ } else {\r
+\r
+ // otherwise, try the venue image\r
+ $performanceLoaded = $venueImage;\r
+ }\r
+\r
+ }\r
+\r
+ // If we have the performance image, display it\r
+ $haveTopImage = false;\r
+ if ($performanceImage) {\r
+ $this->glmpdfPlaceImage( $performanceImage, 85, 195, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ } elseif ($venueImageFile) {\r
+ $this->glmpdfPlaceImage($coverImage, 85, 195, 1, 'meet', 'center', 70, 75);\r
+ $haveTopImage = true;\r
+ }\r
+\r
+ // Place owner name at top possitioned by whether or not there's an image supplied\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ if ($haveTopImage) {\r
+\r
+// $this->glmpdfPlaceText( $config->owner->name, 315, 227, "center", 'black', -300, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8"), 315, 227, "center", 'black', -300, '');\r
+ } else {\r
+// $this->glmpdfPlaceText( $config->owner->name, 280, 227, "center", 'black', -350, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8"), 280, 227, "center", 'black', -350, '');\r
+ }\r
+\r
+ // Place mask\r
+ //$this->glmpdfPlaceImage($ticketMask, 0, 52, .25, false, 'center', 280, 140);\r
+\r
+ // If ticket has already been claimed, then mark ticket\r
+ if ($t['time_claimed']['date'] != '') {\r
+ $this->glmpdfSetFont( "Times-Bold", 72.0 );\r
+ $this->glmpdfPlaceText( "CLAIMED", 110, 80, "left", 'orangered', 0, '' ); // last parameter can be things like "rotate=90"\r
+ }\r
+\r
+ // Ticket Information Area\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ $this->glmpdfPlaceLine(1, 80, 0, 80, 275, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+ $this->glmpdfPlaceLine(1, 480, 0, 480, 275, $color = "black", $dash = false, $d_a = 1, $d_b = 1);\r
+\r
+ // Left End of Ticket - NOTE: use only "left" in glmpdfPlaceText - use "position=..." in optlist instead.\r
+ if (($t['entrance']-0) > 0) {\r
+ $entranceDetail = $Entrances->getEntranceDetail($t['entrance']);\r
+ $this->glmpdfPlaceBox(1, 0, 0, 80, -275, '', $entranceDetail['color']['name'], 'miter');\r
+ }\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+// $this->glmpdfPlaceText( 'Departing from:', 7, 40, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['entrance_name'],ENT_QUOTES,"utf-8")), 40, 138, 'left', 'black', -250, 'position=center rotate=90');\r
+// $this->glmpdfPlaceText( strtoupper(html_entity_decode($t['member_name'],ENT_QUOTES,"utf-8")), 60, 138, 'left', 'black', -250, 'position=center rotate=90');\r
+\r
+ // Display values\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 26.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['performance_name'],ENT_QUOTES,"utf-8"), 280, 170, "center", 'black', -370, '');\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 24.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($t['ticket_name'],ENT_QUOTES,"utf-8"), 280, 140, "center", 'black', -370, '' );\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+// $this->glmpdfPlaceText( html_entity_decode($t['section_name'],ENT_QUOTES,"utf-8"), 280, 130, "center", 'black', -370, '' );\r
+ $this->glmpdfSetFont( "Helvetica", 18.0 );\r
+ if ($t['date_specific']['value']) {\r
+ $this->glmpdfPlaceText( $t['ticket_date']['date'], 280, 110, "center", 'black', -370, '' );\r
+ } else {\r
+ $dateRange = 'Valid From '.$t['start_date']['date'].' through '.$t['end_date']['date'];\r
+ $this->glmpdfPlaceText( $dateRange, 280, 110, "center", 'black', -370, '' );\r
+ }\r
+\r
+ $this->glmpdfSetFont( "Helvetica", 16.0 );\r
+\r
+ // Check for Ticket add-ons\r
+ if (isset($t['addons_sold']) && count($t['addons_sold']) > 0) {\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ foreach($t['addons_sold'] as $a) {\r
+ $addonText = $a['add_on_name'];\r
+ if (($a['add_on_type']['value']-0) == 2) {\r
+ $addonText = $addonText.', '.$a['quant'].' '.$a['unit_name'];\r
+ }\r
+ $this->glmpdfPlaceText( $addonText, 280, $this->glmpdfCurrentY, "center", 'black', -370, '' );\r
+ }\r
+ }\r
+\r
+ // Display NON-REFUNDABLE MESSAGE\r
+ $this->glmpdfSetFont( "Helvetica", 14.0 );\r
+ $this->glmpdfPlaceText( "NON-REFUNDABLE", 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+\r
+ // Display address and contact information\r
+ if ($venueContact) {\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($this->config->term->prop->cap.' contact information',ENT_QUOTES,"utf-8"), 280, $this->glmpdfCurrentY-5, "center", 'black', -300, '');\r
+ $this->glmpdfPlaceText( html_entity_decode($venueContact,ENT_QUOTES,"utf-8"), 280, $this->glmpdfCurrentY, "center", 'black', -300, '');\r
+ }\r
+\r
+ // Display address and contact information\r
+ if ($companyContact) {\r
+ $this->glmpdfSetFont( "Helvetica", 10.0 );\r
+ $this->glmpdfPlaceText( html_entity_decode($companyContact,ENT_QUOTES,"utf-8"), 280, 25, "center", 'black', -380, '');\r
+ }\r
+\r
+ // Display additional voucher text at the bottom of the voucher if provided\r
+ $voucherText = '';\r
+ if (trim($t['ticket_voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($t['ticket_voucher_text'],ENT_QUOTES,"utf-8"));\r
+ } elseif (trim($performanceDetail['voucher_text']) != '') {\r
+ $voucherText = trim(html_entity_decode($performanceDetail['voucher_text'],ENT_QUOTES,"utf-8"));\r
+ }\r
+ if ($voucherText != '') {\r
+ $this->glmpdfPlaceLine(1, 80, 20, 480, 20, 'black', false);\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 14.0 );\r
+// $this->glmpdfPlaceBox(1, 80, 20, 400, 20, "black", "black");\r
+ $this->glmpdfPlaceText( html_entity_decode($voucherText,ENT_QUOTES,"utf-8"), 280, 6, "center", 'black', -370, '' );\r
+ }\r
+\r
+ // $this->glmpdfPlaceText( $t['ticket_date']['date'].' - '.$t['ticket_time']['time'], 120, $this->glmpdfCurrentY, "left", 'black', 0, '' );\r
+\r
+ // Print barcode = {ticket_sold ID}-{person type}-{person_sequence}\r
+ $barcode = $this->addCheckCode($t['id']);\r
+ // If we're supposed to print barcode and voucher number on ticket\r
+ switch ($t['ticket_voucher_type']) {\r
+\r
+ case 11: // Voucher/Ticket for Pickup - no Barcode\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( "Pickup at ".$this->config->term->prop->norm, 510, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ case 12; // Voucher/Ticket to be mailed Mailed - no Barcode\r
+ case 82; // Object Sold (i.e. books) to be mailed - no Barcode\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 20.0 );\r
+ $this->glmpdfPlaceText( "You will receive this by mail", 510, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ case 1: // Standard Voucher/Ticket with Barcode\r
+ case 81; // Object Sold (i.e. books) to be claimed - with Barcode\r
+ default:\r
+ $this->glmpdfSetFont( 'barcode', 54 );\r
+ $this->glmpdfPlaceText( "*$barcode*", 510, 140, 'left', 'black', 0, 'position=center rotate=90');\r
+ $this->glmpdfSetFont( "Courier", 12.0 );\r
+ $this->glmpdfPlaceText( $this->config->term->voucher->cap." $barcode", 540, 140, 'left', 'black', -260, 'position=center rotate=90');\r
+ break;\r
+\r
+ }\r
+\r
+ $this->glmpdfPlaceText( "Order #".$order['id'], 552, 140, 'left', 'black', 0, 'position=center rotate=90');\r
+\r
+ // Check if we need to display a coupon\r
+// if( ++$numb_tickets % $this->pdfCouponInterval == 0 )\r
+// $this->printCoupon();\r
+\r
+ } // Each voucher\r
+\r
+ // Make sure we print the minimum number of coupons\r
+// $numb_coupons = 0;\r
+// while( $numb_coupons < $this->pdfMinCoupons ) {\r
+// $this->printCoupon();\r
+// $numb_coupons++;\r
+// }\r
+\r
+ // Close PDF setup and send to user's browser\r
+ $this->glmpdfSendToBrowser( '', 'voucher.pdf' );\r
+\r
+ if ($venueImageFile) {\r
+ unlink($venueImageFile);\r
+ }\r
+ if ($parkingImageFile) {\r
+ unlink($parkingImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+ if ($sectionImageFile) {\r
+ unlink($sectionImageFile);\r
+ }\r
+\r
+ }\r
+\r
+\r
+ // function to print a coupon\r
+ function printCoupon()\r
+ {\r
+ // Print a Coupon\r
+ $this->glmpdfNextForm();\r
+ $this->glmpdfPlaceBox( $this->borderWidth, 0, 142, 281, 142, $this->borderColor );\r
+\r
+ // Place Coupon Image\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 10.0 );\r
+ $this->glmpdfPlaceText( 'Coupon Title', 85, 130, "center", 'black' );\r
+ $this->glmpdfPlaceText( 'Expires on: 1/1/2020', 85, 75 );\r
+ $this->glmpdfSetFont( "Times-Bold", 30.0 );\r
+ $this->glmpdfPlaceText( "COUPON", 85, 95, "center", 'lightgrey' );\r
+ $this->glmpdfSetFont( "Helvetica", 8.0 );\r
+ $this->glmpdfPlaceTextBox( 'This is a coupon description. It describes this coupon.', 5, 55, 274, 40, "left", 'black' );\r
+ $this->glmpdfSetFont( "Helvetica-Bold", 8.5 );\r
+ $this->glmpdfPlaceText( "Mackinaw Area Visitors Bureau - Mackinaw City, MI - 800-666-0160", 140.5, 2, "center", 'darkblue' );\r
+\r
+ }\r
+\r
+ /*\r
+ * Function to add check character to end of voucher number\r
+ *\r
+ * Uses config->voucher_check_secret and voucher # to create MD5 string\r
+ * then takes last hex character off of that string and shifts it up to\r
+ * always be a character (adds 16 to numbers and 10 to the upper-case\r
+ * version of the character).\r
+ * i.e. 0 = A, 9 = J, A = K, F =\r
+ *\r
+ */\r
+ public function addCheckCode($voucherNumb)\r
+ {\r
+\r
+ // Create MD5 string using voucher number and secret\r
+ $md5 = md5($voucherNumb.$this->config->voucher_check_secret);\r
+\r
+ // Get last character code of the last character in the MD5\r
+ $cc = strtoupper(substr($md5, -2));\r
+ $cc[0] = $this->shiftCheckCodeCharacter($cc[0]);\r
+ $cc[1] = $this->shiftCheckCodeCharacter($cc[1]);\r
+\r
+ // Return voucher number with the new character on the end\r
+ $voucherNumb .= $cc;\r
+ return $voucherNumb;\r
+\r
+ }\r
+\r
+ private function shiftCheckCodeCharacter($c) {\r
+\r
+ $x = ord($c);\r
+\r
+ // If it's a digit, add 16\r
+ if ($x < 65) {\r
+ $x += 17;\r
+ // otherwise, add 10\r
+ } else {\r
+ $x += 10;\r
+ }\r
+\r
+ // Also skip the letter O\r
+ if (x >= ord('O')) {\r
+ $x += 1;\r
+ }\r
+\r
+ return chr($x);\r
+ }\r
+\r
+} // class\r
+\r
+// Absolutely nothing after next line\r
+?>
\ No newline at end of file
--- /dev/null
+NOTE: When adding a new interface (set of view), add both here and in the web/front directory. \r
+Also add the new interface to the EventManagement configs/common.ini file.
\ No newline at end of file
--- /dev/null
+<div id="accomsListOverlayHeader" class="panelHeader">
+ <button id="accomsListOverlayToggle" type="submit" class="rightButton">Expand</button>
+</div>
+{if:accomsList}
+<table class="admin-list-table" width="100%">
+ <tr><th> </th><th>Property</th><th>Name</th><th>Title</th><th>Cateogory</th><th>Quantity</th></tr>
+ {foreach:accomsList,a}
+ <tr>
+ <td class="buttonColumn"><button class="accomSelector" value="{a.id}">Select</button></td>
+ <td>{a.property}</td>
+ <td>{a.name}</td>
+ <td>{a.title}</td>
+ <td>{a.category.name}</td>
+ <td>{a.quant}</td>
+ </tr>
+ {end:}
+</table>
+{else:}
+ (No accommodations listed for selected {term.event.norm} or no {term.event.norm} selected.)
+{end:}
+
+<!-- This data transfered by jQuery to accommodatios list header -->
+{startScript:h}
+ $(document).ready(function(){
+ $('#accomsSelectAll').html('All (' + {accomsStats.all} + ')');
+ $('#accomsSelectMember').html('Selected Property (' + {accomsStats.member} + ')');
+ });
+</script>
\ No newline at end of file
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">Delete this {term.ticket.cap} Add-On</div>
+
+ <div class="emBlockName">{AddonDetail.name}</div>
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Addon_confirmDelete" emContainerId="Addon_detail_container" emTabParams="id={addonDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Confirm Delete</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Addon_detail" emContainerId="Addon_detail_container" emTabParams="id={addonDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel Delete</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:addonDetail}
+ <div class="emListTableContainerLeft">
+ <table id="AddonDeleteTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>Delete {term.ticket.cap} Add-On:</th>
+ <td>
+ <h3 style="color: red;">Clicking "Confirm Delete" on the right will permanently delete this {term.ticket.norm} add-on.</h3>
+ </td>
+ </tr>
+ <tr><th>{term.addon.cap} Add-On Name:</th><td>{addonDetail.name}<span style="float: right;">ID: {addonDetail.id}</span></td></tr>
+ <tr><th>Description:</th><td>{addonDetail.descr:h}</td></tr>
+ <tr>
+ <th>Type:</th>
+ <td>
+ {addonDetail.add_on_type.name:h}
+ <br>Maximum Quantity: {addonDetail.max_quant}
+ </td>
+ </tr>
+ <tr><th>Unit Name:</th><td>{addonDetail.unit_name}</td></tr>
+ <tr><th>Unit Cost:</th><td>{addonDetail.unit_cost}</td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.ticket.plur} add-ons found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#AddonDeleteTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+<!-- <div class="emBlockName">{addonDetail.name}</div> -->
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Addon_delete" emContainerId="Addon_detail_container" emTabParams="AddonID={addonDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.ticket.cap} Add-On</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Addon_edit" emContainerId="Addon_detail_container" emTabParams="AddonID={addonDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.ticket.cap} Add-On</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:addonDetail}
+ <div class="emListTableContainerLeft">
+ <table id="AddonDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:addonDetail.delete}
+ <tr>
+ <th>Delete {term.ticket.cap} Add-On:</th>
+ <td>
+ {if:addonDetail.deleteConfirmed}
+ {if:addonDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {addonDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+ <button id="confirmAddonDelete" value="{addonDetail.id}">Click here to confirm that this {term.ticket.norm} add-on should be deleted.</button><br>
+ <h3 style="color: red;">Clicking the button above will permanently delete this {term.ticket.norm} add-on.</h3>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>{term.ticket.cap} Add-On Name:</th><td>{addonDetail.name}<span style="float: right;">ID: {addonDetail.id}</span></td></tr>
+ <tr><th>Description:</th><td>{addonDetail.descr:h}</td></tr>
+ <tr>
+ <th>Type:</th>
+ <td>
+ {addonDetail.add_on_type.name:h}
+ <br>Maximum Quantity: {addonDetail.max_quant}
+ </td>
+ </tr>
+ <tr><th>Unit Name:</th><td>{addonDetail.unit_name}</td></tr>
+ <tr><th>Unit Cost:</th><td>{addonDetail.unit_cost}</td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.ticket.norm} add-ons found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#AddonDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewAddon}Adding New {term.ticket.cap} Add-On{end:}
+ {if:editingAddon}Editing {term.ticket.cap} Add-On{end:}
+ </div>
+
+ <div class="emUsdTabs">
+{if:addingNewAddon}
+ <div flexy:if="checkPermission(#10#)" emTabId="Misc_blank" emContainerId="Addon_detail_container" emTabParams="id={addonDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{else:}
+ <div flexy:if="checkPermission(#10#)" emTabId="Addon_detail" emContainerId="Addon_detail_container" emTabParams="id={addonDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{end:}
+ </div> <!-- emSubTabs -->
+
+{if:formFail}
+ <div class="emRequiredInputField">Not all fields were filled in correctly. Please try again.</div>
+{end:}
+
+ <div class=".emForm">
+
+ {if:addonDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="addonForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewAddon}
+ <input type="hidden" name="Action" value="Addon_insert">
+ {else:}
+ <input type="hidden" name="Action" value="Addon_update">
+ {end:}
+
+ <input type="hidden" name="member" value="{addonDetail.member}">
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+ <input type="hidden" name="tabList" value="{tabList}">
+ <input type="hidden" name="ticket" value="{addonDetail.ticket}">
+ <input type="hidden" name="AddonID" value="{addonDetail.id}">
+
+ <div class="emListTableContainer">
+ <table class="emListTable addonEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ {if:fieldRequired.name}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Add-On Name:</th>
+ {if:fieldFail.name}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="name" value="{addonDetail.name:h}" class="emTextInput"><br>
+ {if:fieldFail.name}<br>{fieldFail.name}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.descr}<th class="emRequiredInputField">{else:}<th>{end:}Description:</th>
+ {if:fieldFail.descr}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea type="text" name="descr" id="descr">{addonDetail.descr:h}</textarea>
+ {if:fieldFail.descr}<br>{fieldFail.descr}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.add_on_type}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Add-On Type:</th>
+ {if:fieldFail.add_on_type}<td class="emBadInputField">{else:}<td>{end:}
+ <select id="addonType" name="add_on_type">
+ <option value=""> </option>
+ {foreach:addonDetail.add_on_type.list,m}
+ <option value="{m.value}" selected flexy:if="m.default">{m.name:h}</option>
+ <option value="{m.value}" flexy:if="!m.default">{m.name:h}</option>
+ {end:}
+ </select>
+ {if:fieldFail.add_on_type}<br>{fieldFail.add_on_type}{end:}
+ <div id="max_quant">
+ <table>
+ {if:fieldFail.max_quant}<tr class="emBadInputField">{else:}<tr>{end:}
+ <th>Maximum quantity a user may select:</th>
+ <td>
+ <input type="text" name="max_quant" value="{addonDetail.max_quant}" class="textInputShort">
+ <br>This is the maximum number of these {term.ticket.norm} add-ons that a user may select.
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.unit_name}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Add-On Unit Name:</th>
+ {if:fieldFail.unit_name}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="unit_name" value="{addonDetail.unit_name:h}" class="emTextInput"><br>
+ {if:fieldFail.unit_name}<br>{fieldFail.unit_name}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.unit_cost_numb}<th class="emRequiredInputField">{else:}<th>{end:}Price Per Unit:</th>
+ {if:fieldFail.unit_cost_numb}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="unit_cost_numb" value="{addonDetail.unit_cost_numb:h}" class="textInputShort">
+ {if:fieldFail.unit_cost_numb}<br>{fieldFail.unit_cost_numb}{end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id="addonFormSubmit" class="submitKeepOnPage">
+ {if:addingNewAddon}
+ <input type="submit" value="Add new {term.ticket.norm} add-on" class="emEditSubmit">
+ {end:}
+ {if:editingAddon}
+ <input type="submit" value="Update {term.ticket.norm} add-on" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No {term.ticket.norm} add-on has been selected yet.</h2>
+ <p>To edit a {term.ticket.norm} add-on, first select it from the list of available {term.ticket.plur} add-ons.
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.addonEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#addonForm').ajaxForm({
+ success: function(data) {
+ {if:addingNewAddon}
+ var container = $('#Addon_detail_container');
+ f_replaceContents(data, container);
+ {end:}
+ {if:editingAddon}
+ var container = $('#Addon_detail_container');
+ f_replaceContents(data, container);
+ {end:}
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#addonFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#descr"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ });
+
+ f_restartOnTabSelect();
+
+ function addonTypeCheck(e) {
+ typeval = $('#addonType').val();
+
+ // If this is a quantity selection
+ if (typeval == 2) {
+ $('#max_quant').show();
+ } else {
+ $('#max_quant').hide();
+ }
+ }
+
+ $('#addonType').change( function() {
+ addonTypeCheck();
+ });
+ addonTypeCheck();
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Add-Ons List -->
+<div class="emBlock">
+
+ <div id="Addon_container" class="emSliderClosed">
+ <div class="emUsdTabs">
+{if:checkPermission(#10#)}
+ <div flexy:if="!blockTab.Addon_add" emTabId="Addon_add" emContainerId="Addon_detail_container" emTabParams="memberID={memberID}&tabList={tabList}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Add a {term.ticket.cap} Add-On</div>
+ </div>
+{end:}
+ <div class="emTab emLink" style="float: right;">
+ <div id="addonListSizeChange">Larger Table</div>
+ </div>
+ </div> <!-- emSubTabs -->
+ Search {term.ticket.cap} Add-Ons: <input type="text" id="addonsSearch" name="addonsSearchField"> (start typing any information in list)
+
+ {if:addons}
+
+ <div id="AddonListTable_wrapper" class="emListTableContainer">
+ <table id="AddonListTable" class="emListTable">
+ <thead>
+ <tr><th>Add-On Name</th><th>Type</th><th>Price</th></tr>
+ </thead>
+ <tbody>
+ {foreach:addons,c}
+ <tr>
+ <td emAddonId="{c.id}" class="emLink addonListSelect">{c.name:h}</td>
+ <td emAddonId="{c.id}" class="emLink addonListSelect">{c.add_on_type.name}</td>
+ <td>{c.unit_cost} / {c.unit_name}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No {term.ticket.norm} add-ons listed.</p>
+ {end:}
+
+ <div id="Addon_detail_container" class="emSliderClosed">
+ </div>
+
+ </div>
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // Addons Search
+ var addonsSearchData = [
+ {foreach:addons,c}
+ {label:'{c.name:h}, {c.ticket_name:h}, {c.add_on_type.name}', value:'{c.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var AddonListTable = $('#AddonListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ });
+
+ $(window).resize(function(){
+ AddonListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var AddonListTableSmall = true;
+ var AddonListTableHeight = $('#AddonListTable_wrapper div.dataTables_scrollBody').height();
+ $('#addonListSizeChange').click(function() {
+ if (AddonListTableSmall) {
+ $('#AddonListTable_wrapper div.dataTables_scrollBody').height('auto');
+ AddonListTableSmall = false;
+ $(this).html('Smaller Table');
+ AddonListTable.fnSettings().oScroll.sY = '100%';
+ AddonListTable.fnDraw();
+ } else {
+ $('#AddonListTable_wrapper div.dataTables_scrollBody').height(AddonListTableHeight);
+ AddonListTableSmall = true;
+ $(this).html('Larger Table');
+ AddonListTable.fnSettings().oScroll.sY = '100px';
+ AddonListTable.fnDraw();
+ }
+ });
+
+ // Close all local sliders
+ $('#Addon_detail').hide(duration);
+
+ $('.addonListSelect').click(function(){
+ $('#AddonListTable_wrapper div.dataTables_scrollBody').height(AddonListTableHeight);
+ AddonListTableSmall = true;
+ $('#addonListSizeChange').html('Larger Table');
+ AddonListTable.fnSettings().oScroll.sY = '100px';
+ AddonListTable.fnDraw();
+ f_loadAction('Addon_selected', 'Addon_detail_container', 'AddonID=' + $(this).attr('emAddonId') + '&tabList={tabList}');
+ });
+
+ // Search Addons
+ $("#addonsSearch").autocomplete({
+ source: addonsSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#addonsSearch").attr({value: ui.item.label});
+ f_loadAction('Addon_selected', 'Addon_detail_container', 'AddonID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div style="float: left;">
+ <div class="emBlockName">{term.ticket.cap} Add-On: {addonDetail.name}</div>
+ </div>
+
+ <div class="emBlock">
+
+ <!--
+ Content Areas
+ -->
+ <div id="Addon_detail_container" class="emContentArea emSlider">
+ </div>
+
+ </div> <!-- emBlock -->
+
+</div> <!-- emBlock -->
+
+
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ // Start with ticket detail loaded
+ f_loadAction('Addon_detail', 'Addon_detail_container', "tabList={tabList}");
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">New {term.attendance_log.cap} Added</div>
+
+</div> <!-- emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ f_loadAction('Attendance_selected', 'Attendance_selected', 'member_id={attendanceDetail.id}&tabList={tabList}');
+
+ });
+
+</script>
+
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">Delete this {term.attendance_log.cap}</div>
+
+ <div class="emBlockName">{attendanceDetail.lname}, {attendanceDetail.fname}</div>
+
+{if:checkPermission(#10#)}
+ <div class="emUsdTabs">
+ <div flexy:if="!blockTab.Attendance_confirmDelete" emTabId="Attendance_confirmDelete" emContainerId="Attendance_detail_container" emTabParams="id={attendanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Confirm Delete</div>
+ </div>
+ <div flexy:if="!blockTab.Attendance_detail" emTabId="Attendance_detail" emContainerId="Attendance_detail_container" emTabParams="AttendanceListOption=member&id={attendanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel Delete</div>
+ </div>
+ </div> <!-- emSubTabs -->
+{end:}
+
+ {if:attendanceDetail}
+ <div class="emListTableContainerLeft">
+ <table id="AttendanceDeleteTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>Delete {term.attendance_log.cap}:</th>
+ <td>
+ <h3 style="color: red;">Clicking "Confirm Delete" on the right will permanently delete this {term.attendance_log.norm}.</h3>
+ </td>
+ </tr>
+ <tr><th>Name:</th><td>{attendanceDetail.lname}, {attendanceDetail.fname}</td></tr>
+ <tr><th>Organization:</th><td>{attendanceDetail.org}</td></tr>
+ <tr>
+ <th>Address:</th>
+ <td>
+ {attendanceDetail.addr1}<br>
+ {if:addr2}{attendanceDetail.addr2}<br>{end:}
+ {attendanceDetail.city}, {attendanceDetail.state.name} {attendanceDetail.zip}<br>
+ {attendanceDetail.country.name}
+ </td>
+ </tr>
+ <tr><th>Active:</th><td>{attendanceDetail.active.name}</td></tr>
+ {if:attendanceDetail.org_url}
+ <tr><th>Web Address:</th><td>{attendanceDetail.org_url}</td></tr>
+ {end:}
+ {if:attendanceDetail.office_phone}
+ <tr><th>Office Phone:</th><td>{attendanceDetail.office_phone}</td></tr>
+ {end:}
+ {if:attendanceDetail.mobile_phone}
+ <tr><th>Mobile (cell) Phone:</th><td>{attendanceDetail.mobile_phone}</td></tr>
+ {end:}
+ {if:attendanceDetail.fax}
+ <tr><th>FAX:</th><td>{attendanceDetail.fax}</td></tr>
+ {end:}
+ {if:attendanceDetail.email}
+ <tr><th>E-Mail Address:</th><td>{attendanceDetail.email}</td></tr>
+ {end:}
+ {if:attendanceDetail.login_id}
+ <tr><th>Log in ID:</th><td>{attendanceDetail.login_id}</td></tr>
+ {end:}
+ {if:attendanceDetail.alt_email}
+ <tr><th>Alternate E-Mail Address:</th><td>{attendanceDetail.alt_email}</td></tr>
+ {end:}
+ {if:attendanceDetail.notes}
+ <tr><th>Notes:</th><td>{attendanceDetail.notes}</td></tr>
+ {end:}
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.attendace_log.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#AttendanceDeleteTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewAttendance}Adding New {term.attendace_log.cap}{end:}
+ {if:editingAttendance}Editing {term.attendance_log.cap}{end:}
+ </div>
+
+ <div class="emBlockName">{term.attendace_log.cap}: {attendanceDetail.lname}, {attendanceDetail.fname}</div>
+
+ {if:checkPermission(#10#)}
+ <div class="emUsdTabs">
+ <div emTabId="Attendance_delete" emContainerId="Attendance_detail_container" emTabParams="id={attendanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.attendance.cap}</div>
+ </div>
+ <div emTabId="Attendance_edit" emContainerId="Attendance_detail_container" emTabParams="id={attendanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.attendance.cap}</div>
+ </div>
+ </div> <!-- emSubTabs -->
+ {end:}
+
+ {if:attendanceDetail}
+ <div class="emListTableContainerLeft">
+ <table id="AttendanceDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:attendanceDetail.delete}
+ <tr>
+ <th>Delete {term.attendance.cap}:</th>
+ <td>
+ {if:attendanceDetail.deleteConfirmed}
+ {if:attendanceDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {attendanceDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+ <button id="confirmAttendanceDelete" value="{attendanceDetail.id}">Click here to confirm that this {term.attendance_log.norm} should be deleted.</button><br>
+ <h3 style="color: red;">Clicking the button above will permanently delete this {term.attendance_log.norm}.</h3>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>Name:</th><td>{attendanceDetail.lname}, {attendanceDetail.fname}<span style="float: right;">ID: {attendanceDetail.id}</span></td></tr>
+ <tr><th>Organization:</th><td>{attendanceDetail.org}</td></tr>
+ <tr>
+ <th>Address:</th>
+ <td>
+ {attendanceDetail.addr1}<br>
+ {if:addr2}{attendanceDetail.addr2}<br>{end:}
+ {attendanceDetail.city}, {attendanceDetail.state.name} {attendanceDetail.zip}<br>
+ {attendanceDetail.country.name}
+ </td>
+ </tr>
+ <tr><th>Active:</th><td>{attendanceDetail.active.name}</td></tr>
+ {if:attendanceDetail.org_url}
+ <tr><th>Web Address:</th><td>{attendanceDetail.org_url}</td></tr>
+ {end:}
+ {if:attendanceDetail.office_phone}
+ <tr><th>Office Phone:</th><td>{attendanceDetail.office_phone}</td></tr>
+ {end:}
+ {if:attendanceDetail.mobile_phone}
+ <tr><th>Mobile (cell) Phone:</th><td>{attendanceDetail.mobile_phone}</td></tr>
+ {end:}
+ {if:attendanceDetail.fax}
+ <tr><th>FAX:</th><td>{attendanceDetail.fax}</td></tr>
+ {end:}
+ {if:attendanceDetail.email}
+ <tr><th>E-Mail Address:</th><td>{attendanceDetail.email}</td></tr>
+ {end:}
+ {if:attendanceDetail.login_id}
+ <tr><th>Log in ID:</th><td>{attendanceDetail.login_id}</td></tr>
+ {end:}
+ {if:attendanceDetail.alt_email}
+ <tr><th>Alternate E-Mail Address:</th><td>{attendanceDetail.alt_email}</td></tr>
+ {end:}
+ {if:attendanceDetail.image}
+ <tr>
+ <th>Image:</th>
+ <td>
+ <img src="{fileServer.secure}{fileServer.owner_id}/{option.image_style.default}/{attendanceDetail.image}">
+ </td>
+ </tr>
+ {end:}
+ <tr><th>User Permissions:</th><td>{attendanceDetail.user_rights.name}</td></tr>
+ {if:attendanceDetail.notes}
+ <tr><th>Notes:</th><td>{attendanceDetail.notes:h}</td></tr>
+ {end:}
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.attendance_log.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#AttendanceDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewAttendance}Adding New {term.attendance_log.cap}{end:}
+ {if:editingAttendance}Editing {term.attendance_log.cap}{end:}
+ </div>
+
+ <div class="emUsdTabs">
+{if:addingNewAttendance}
+ <div flexy:if="checkPermission(#10#)" emTabId="Misc_blank" emContainerId="Attendance_detail_container" emTabParams="id={attendanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{else:}
+ <div flexy:if="checkPermission(#10#)" emTabId="Attendance_detail" emContainerId="Attendance_detail_container" emTabParams="id={attendanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{end:}
+ </div> <!-- emSubTabs -->
+
+{if:formFail}
+ <div class="requiredField">Not all fields were filled in correctly. Please try again.</div>
+{end:}
+
+ <div class=".emForm">
+
+ {if:attendanceDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="AttendanceForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewAttendance}
+ <input type="hidden" name="Action" value="Attendance_insert">
+ {else:}
+ <input type="hidden" name="Action" value="Attendance_update">
+ {end:}
+ <input type="hidden" name="tabList" value="{tabList}">
+ <input type="hidden" name="create_date" value="{attendanceDetail.create_date.date}">
+ <input type="hidden" name="attendance_type_code" value="{attendanceDetail.attendance_type_code}">
+ {if:attendanceDetail.attendance_type.value}
+ <input type="hidden" name="attendance_type" value="{attendanceDetail.attendance_type.value}">
+ {else:}
+ <input type="hidden" name="attendance_type" value="{attendanceDetail.attendance_type}">
+ {end:}
+
+ <input type="hidden" name="affiliation" value="{attendanceDetail.affiliation}">
+
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+
+
+ <div class="emListTableContainer">
+ <table class="emListTable attendanceEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th class="emRequiredInputField">{term.prop.cap}:</th>
+ <td>
+ {if:addingNewAttendance}
+ <select name="member">
+ <option value=""> </option>
+ {foreach:attendanceDetail.member.pick_list,m}
+ <option value="{m.value}">{m.name}</option>
+ {end:}
+ </select>
+ {if:fieldFail.performance}<br>{fieldFail.performance}{end:}
+ {else:}
+ {attendanceDetail.member_name}
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.name}<th class="emRequiredInputField">{else:}<th>{end:}Name of this {term.attendance_log.cap}:</th>
+ {if:fieldFail.name}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="name" value="{attendanceDetail.name:h}" class="textInput">
+ {if:fieldFail.attendance}<br>{fieldFail.attendance}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.notes}<th class="emRequiredInputField">{else:}<th>{end:}Notes:</th>
+ {if:fieldFail.notes}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea type="text" name="notes" id="descr">{attendanceDetail.notes:h}</textarea>
+ {if:fieldFail.notes}<br>{fieldFail.notes}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.attendance_date}<th class="emRequiredInputField">{else:}<th>{end:}Date:</th>
+ {if:fieldFail.attendanceDate}<td class="emBadInputField">{else:}<td>{end:}
+ {if:addingNewAttendance}
+ <input type="text" id="attendanceDateInput" name="attendance_date" value="{attendanceDetail.attendance_date.date:h}" class="emTextInputShort">
+ {else:}
+ <input type="text" id="attendanceDateInput" name="attendance_date" value="" class="emTextInputShort"><br>
+ {end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id="attendanceFormSubmit" class="submitKeepOnPage">
+ {if:addingNewAttendance}
+ <input type="submit" value="Add new {term.attendance_log.norm}" class="emEditSubmit">
+ {end:}
+ {if:editingAttendance}
+ <input type="submit" value="Update {term.attendance_log.norm}" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No {term.attendance_log.norm} has been selected yet.</h2>
+ <p>To edit a {term.attendance_log.norm}, first select it from the list of available {term.attendance_log.plur}.
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.attendanceEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#AttendanceForm').ajaxForm({
+ success: function(data) {
+ {if:addingNewAttendance}
+ f_replaceContents(data, $('#Attendance_detail_container'));
+ {end:}
+ {if:editingAttendance}
+ f_replaceContents(data, $('#Attendance_detail_container'));
+ {end:}
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#attendanceFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+// f_buildCkeditor($("#notes"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#notes"));
+ });
+
+ f_restartOnTabSelect();
+
+ // Code to start datepicker for each date input
+ $("#attendanceDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{attendanceDetail.attendance_date.date_list.min}',
+ maxDate: '{attendanceDetail.attendance_date.date_list.max}'
+ });
+
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Attendance List -->
+<div class="emBlock">
+
+ <div class="emUsdTabs">
+{if:checkPermission(#10#)}
+ <div flexy:if="!blockTab.Attendance_add" emTabId="Attendance_add" emContainerId="Attendance_detail_container" emTabParams="Attendance_type_code=member" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Add a {term.attendance_log.cap}</div>
+ </div>
+{end:}
+ <div class="emTab emLink" style="float: right;">
+ <div id="AttendanceListSizeChange">Larger Table</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ Search {term.attendance_log.plur_cap}: <input type="text" id="AttendanceSearch" name="AttendanceSearchField"> (type any portion of a {term.attendance_log.norm} name)
+
+ {if:AttendanceList.Attendance_list}
+
+ <div id="AttendanceListTable_wrapper" class="emListTableContainer">
+ <table id="AttendanceListTable" class="emListTable">
+ <thead>
+ <tr><th>Last Name</th><th>First Name</th><th>Organization</th><th>Phone</th><th>E-Mail</th></tr>
+ </thead>
+ <tbody>
+ {foreach:AttendanceList.Attendance_list,c}
+ <tr>
+ <td emAttendanceId="{c.id}" class="emLink AttendanceListSelect">{c.lname:h}</td>
+ <td emAttendanceId="{c.id}" class="emLink AttendanceListSelect">{c.fname:h}</td>
+ <td>{c.org}</td>
+ <td>{c.office_phone}</td>
+ <td>{c.email}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No {term.attendance_log.plur} are currently listed.</p>
+ <p>You should have at least one {term.attendance_log.norm} listed for each {term.prop.norm}.</p>
+ {end:}
+
+ <div id="Attendance_detail_container" class="emSliderClosed">
+ </div>
+
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // Attendances Search
+ var AttendancesSearchData = [
+ {foreach:AttendanceList.Attendance_list,c}
+ {label:'{c.lname:h}, {c.fname:h}', value:'{c.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var AttendanceListTable = $('#AttendanceListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+ $(window).resize(function(){
+ AttendanceListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var AttendanceListTableSmall = true;
+ var AttendanceListTableHeight = $('#AttendanceListTable_wrapper div.dataTables_scrollBody').height();
+ $('#AttendanceListSizeChange').click(function() {
+ if (AttendanceListTableSmall) {
+ $('#AttendanceListTable_wrapper div.dataTables_scrollBody').height('auto');
+ AttendanceListTableSmall = false;
+ $(this).html('Smaller Table');
+ AttendanceListTable.fnSettings().oScroll.sY = '100%';
+ AttendanceListTable.fnDraw();
+ } else {
+ $('#AttendanceListTable_wrapper div.dataTables_scrollBody').height(AttendanceListTableHeight);
+ AttendanceListTableSmall = true;
+ $(this).html('Larger Table');
+ AttendanceListTable.fnSettings().oScroll.sY = '100px';
+ AttendanceListTable.fnDraw();
+ }
+ });
+
+ // Close all local sliders
+ $('#Attendance_detail').hide(duration);
+
+ $('.AttendanceListSelect').click(function(){
+ $('#AttendanceListTable_wrapper div.dataTables_scrollBody').height(AttendanceListTableHeight);
+ AttendanceListTableSmall = true;
+ $('#AttendanceListSizeChange').html('Larger Table');
+ AttendanceListTable.fnSettings().oScroll.sY = '100px';
+ AttendanceListTable.fnDraw();
+ f_loadAction('Attendance_detail', 'Attendance_detail_container', 'AttendanceID=' + $(this).attr('emAttendanceId') + '&tabList={tabList}');
+ });
+
+ // Search Attendances
+ $("#AttendancesSearch").autocomplete({
+ source: AttendancesSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#AttendancesSearch").attr({value: ui.item.label});
+ f_loadAction('Attendance_detail', 'Attendance_detail_container', 'AttendanceID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">New Contact Added</div>
+
+</div> <!-- emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ f_loadAction('Contact_selected', 'Contact_selected', 'member_id={contactDetail.id}&tabList={tabList}');
+
+ });
+
+</script>
+
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">Delete this {term.contact.cap}</div>
+
+ <div class="emBlockName">{contactDetail.lname}, {contactDetail.fname}</div>
+
+{if:checkPermission(#10#)}
+ <div class="emUsdTabs">
+ <div flexy:if="!blockTab.Contact_confirmDelete" emTabId="Contact_confirmDelete" emContainerId="Contact_detail_container" emTabParams="id={contactDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Confirm Delete</div>
+ </div>
+ <div flexy:if="!blockTab.Contact_detail" emTabId="Contact_detail" emContainerId="Contact_detail_container" emTabParams="ContactsListOption=member&id={contactDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel Delete</div>
+ </div>
+ </div> <!-- emSubTabs -->
+{end:}
+
+ {if:contactDetail}
+ <div class="emListTableContainerLeft">
+ <table id="ContactDeleteTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>Delete {term.contact.cap}:</th>
+ <td>
+ <h3 style="color: red;">Clicking "Confirm Delete" on the right will permanently delete this {term.contact.norm}.</h3>
+ </td>
+ </tr>
+ <tr><th>Name:</th><td>{contactDetail.lname}, {contactDetail.fname}</td></tr>
+ <tr><th>Organization:</th><td>{contactDetail.org}</td></tr>
+ <tr>
+ <th>Address:</th>
+ <td>
+ {contactDetail.addr1}<br>
+ {if:addr2}{contactDetail.addr2}<br>{end:}
+ {contactDetail.city}, {contactDetail.state.name} {contactDetail.zip}<br>
+ {contactDetail.country.name}
+ </td>
+ </tr>
+ <tr><th>Active:</th><td>{contactDetail.active.name}</td></tr>
+ {if:contactDetail.org_url}
+ <tr><th>Web Address:</th><td>{contactDetail.org_url}</td></tr>
+ {end:}
+ {if:contactDetail.office_phone}
+ <tr><th>Office Phone:</th><td>{contactDetail.office_phone}</td></tr>
+ {end:}
+ {if:contactDetail.mobile_phone}
+ <tr><th>Mobile (cell) Phone:</th><td>{contactDetail.mobile_phone}</td></tr>
+ {end:}
+ {if:contactDetail.fax}
+ <tr><th>FAX:</th><td>{contactDetail.fax}</td></tr>
+ {end:}
+ {if:contactDetail.email}
+ <tr><th>E-Mail Address:</th><td>{contactDetail.email}</td></tr>
+ {end:}
+ {if:contactDetail.login_id}
+ <tr><th>Log in ID:</th><td>{contactDetail.login_id}</td></tr>
+ {end:}
+ {if:contactDetail.alt_email}
+ <tr><th>Alternate E-Mail Address:</th><td>{contactDetail.alt_email}</td></tr>
+ {end:}
+ {if:contactDetail.notes}
+ <tr><th>Notes:</th><td>{contactDetail.notes}</td></tr>
+ {end:}
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.contact.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#ContactDeleteTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewContact}Adding New {term.contact.cap}{end:}
+ {if:editingContact}Editing {term.contact.cap}{end:}
+ </div>
+
+ <div class="emBlockName">Contact: {contactDetail.lname}, {contactDetail.fname}</div>
+
+ {if:checkPermission(#10#)}
+ <div class="emUsdTabs">
+ <div emTabId="Contact_delete" emContainerId="Contact_detail_container" emTabParams="id={contactDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.contact.cap}</div>
+ </div>
+ <div emTabId="Contact_edit" emContainerId="Contact_detail_container" emTabParams="id={contactDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.contact.cap}</div>
+ </div>
+ </div> <!-- emSubTabs -->
+ {end:}
+
+ {if:contactDetail}
+ <div class="emListTableContainerLeft">
+ <table id="ContactDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:contactDetail.delete}
+ <tr>
+ <th>Delete {term.contact.cap}:</th>
+ <td>
+ {if:contactDetail.deleteConfirmed}
+ {if:contactDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {contactDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+ <button id="confirmContactDelete" value="{contactDetail.id}">Click here to confirm that this {term.contact.norm} should be deleted.</button><br>
+ <h3 style="color: red;">Clicking the button above will permanently delete this {term.contact.norm}.</h3>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>Name:</th><td>{contactDetail.lname}, {contactDetail.fname}<span style="float: right;">ID: {contactDetail.id}</span></td></tr>
+ <tr><th>Organization:</th><td>{contactDetail.org}</td></tr>
+ <tr>
+ <th>Address:</th>
+ <td>
+ {contactDetail.addr1}<br>
+ {if:addr2}{contactDetail.addr2}<br>{end:}
+ {contactDetail.city}, {contactDetail.state.name} {contactDetail.zip}<br>
+ {contactDetail.country.name}
+ </td>
+ </tr>
+ <tr><th>Active:</th><td>{contactDetail.active.name}</td></tr>
+ {if:contactDetail.org_url}
+ <tr><th>Web Address:</th><td>{contactDetail.org_url}</td></tr>
+ {end:}
+ {if:contactDetail.office_phone}
+ <tr><th>Office Phone:</th><td>{contactDetail.office_phone}</td></tr>
+ {end:}
+ {if:contactDetail.mobile_phone}
+ <tr><th>Mobile (cell) Phone:</th><td>{contactDetail.mobile_phone}</td></tr>
+ {end:}
+ {if:contactDetail.fax}
+ <tr><th>FAX:</th><td>{contactDetail.fax}</td></tr>
+ {end:}
+ {if:contactDetail.email}
+ <tr><th>E-Mail Address:</th><td>{contactDetail.email}</td></tr>
+ {end:}
+ {if:contactDetail.login_id}
+ <tr><th>Log in ID:</th><td>{contactDetail.login_id}</td></tr>
+ {end:}
+ {if:contactDetail.alt_email}
+ <tr><th>Alternate E-Mail Address:</th><td>{contactDetail.alt_email}</td></tr>
+ {end:}
+ {if:contactDetail.image}
+ <tr>
+ <th>Image:</th>
+ <td>
+ <img src="{fileServer.secure}{fileServer.owner_id}/{option.image_style.default}/{contactDetail.image}">
+ </td>
+ </tr>
+ {end:}
+ <tr><th>User Permissions:</th><td>{contactDetail.user_rights.name}</td></tr>
+ {if:contactDetail.notes}
+ <tr><th>Notes:</th><td>{contactDetail.notes:h}</td></tr>
+ {end:}
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.contact.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#ContactDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewContact}Adding New {term.contact.cap}{end:}
+ {if:editingContact}Editing {term.contact.cap}{end:}
+ </div>
+
+ <div class="emUsdTabs">
+{if:addingNewContact}
+ <div flexy:if="checkPermission(#10#)" emTabId="Misc_blank" emContainerId="Contact_detail_container" emTabParams="id={contactDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{else:}
+ <div flexy:if="checkPermission(#10#)" emTabId="Contact_detail" emContainerId="Contact_detail_container" emTabParams="id={contactDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{end:}
+ </div> <!-- emSubTabs -->
+
+{if:formFail}
+ <div class="requiredField">Not all fields were filled in correctly. Please try again.</div>
+{end:}
+
+ <div class=".emForm">
+
+ {if:contactDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="ContactForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewContact}
+ <input type="hidden" name="Action" value="Contact_insert">
+ {else:}
+ <input type="hidden" name="Action" value="Contact_update">
+ {end:}
+ <input type="hidden" name="tabList" value="{tabList}">
+ <input type="hidden" name="create_date" value="{contactDetail.create_date.date}">
+ <input type="hidden" name="contact_type_code" value="{contactDetail.contact_type_code}">
+ {if:contactDetail.contact_type.value}
+ <input type="hidden" name="contact_type" value="{contactDetail.contact_type.value}">
+ {else:}
+ <input type="hidden" name="contact_type" value="{contactDetail.contact_type}">
+ {end:}
+
+ <input type="hidden" name="affiliation" value="{contactDetail.affiliation}">
+
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+
+
+ <div class="emListTableContainer">
+ <table class="emListTable contactEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <td valign="top" style="padding: 0px;">
+ <table class="emListTable contactEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr><th>{term.contact.cap} Type:</th><td>{contactDetail.contact_type_name}</td></tr>
+ <tr><th>Affiliation:</th><td>{contactDetail.affiliation_name}</td></tr>
+ <tr>
+ {if:fieldRequired.fname}<th class="emRequiredInputField">{else:}<th>{end:}First Name:</th>
+ {if:fieldFail.fname}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="fname" value="{contactDetail.fname:h}" class="emTextInput">
+ {if:fieldFail.fname}<br>{fieldFail.fname}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.lname}<th class="emRequiredInputField">{else:}<th>{end:}Last Name:</th>
+ {if:fieldFail.lname}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="lname" value="{contactDetail.lname:h}" class="emTextInput">
+ {if:fieldFail.lname}<br>{fieldFail.lname}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.org}<th class="emRequiredInputField">{else:}<th>{end:}Organization Name:</th>
+ {if:fieldFail.org}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="org" value="{contactDetail.org:h}" class="emTextInput">
+ {if:fieldFail.org}<br>{fieldFail.org}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.addr1}<th class="emRequiredInputField">{else:}<th>{end:}Address:</th>
+ {if:fieldFail.addr1}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="addr1" value="{contactDetail.addr1:h}" class="emTextInput">
+ {if:fieldFail.addr1}<br>{fieldFail.addr1}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.addr2}<th class="emRequiredInputField">{else:}<th>{end:} </th>
+ {if:fieldFail.addr2}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="addr2" value="{contactDetail.addr2:h}" class="emTextInput">
+ {if:fieldFail.addr2}<br>{fieldFail.addr2}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.city}<th class="emRequiredInputField">{else:}<th>{end:}City:</th>
+ {if:fieldFail.city}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="city" value="{contactDetail.city:h}" class="emTextInput">
+ {if:fieldFail.city}<br>{fieldFail.city}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.state}<th class="emRequiredInputField">{else:}<th>{end:}State:</th>
+ {if:fieldFail.state}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="state">
+ {foreach:contactDetail.state.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.state}<br>{fieldFail.state}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.zip}<th class="emRequiredInputField">{else:}<th>{end:}ZIP/Postal Code:</th>
+ {if:fieldFail.zip}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="zip" value="{contactDetail.zip}" class="emTextInputShort">
+ {if:fieldFail.zip}<br>{fieldFail.zip}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.country}<th class="emRequiredInputField">{else:}<th>{end:}Country:</th>
+ {if:fieldFail.country}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="country">
+ {foreach:contactDetail.country.list,c}
+ {if:c.default}
+ <option value="{c.value}" SELECTED>{c.name}</option>
+ {else:}
+ <option value="{c.value}">{c.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.country}<br>{fieldFail.country}{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Active:</th>
+ <td>
+ {if:contactDetail.active.value}
+ <input type="checkbox" name="active" checked="yes">
+ {else:}
+ <input type="checkbox" name="active">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.image}<th class="emRequiredInputField">{else:}<th>{end:}Image:</th>
+ {if:fieldFail.image}<td class="emBadInputField">{else:}<td>{end:}
+ {if:contactDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{contactDetail.image}">
+ <br>Delete this image: <input type="checkbox" name="image_delete">
+ {end:}
+ <input type="hidden" name="image" value="{storedDetail.image}">
+ <br>Upload or replace the image: <input type="file" name="image_new">
+ {if:fieldFail.image}<br>{fieldFail.image}{end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ <td valign="top" style="padding: 0px;">
+ <table class="emListTable contactEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ {if:fieldRequired.office_phone}<th class="emRequiredInputField">{else:}<th>{end:}Office phone:</th>
+ {if:fieldFail.office_phone}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="office_phone" value="{contactDetail.office_phone}" class="emTextInputMedium">
+ {if:fieldFail.office_phone}<br>{fieldFail.office_phone}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.mobile_phone}<th class="emRequiredInputField">{else:}<th>{end:}Mobile phone:</th>
+ {if:fieldFail.mobile_phone}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="mobile_phone" value="{contactDetail.mobile_phone}" class="emTextInputMedium">
+ {if:fieldFail.mobile_phone}<br>{fieldFail.mobile_phone}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.alt_phone}<th class="emRequiredInputField">{else:}<th>{end:}Alternate phone:</th>
+ {if:fieldFail.alt_phone}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="alt_phone" value="{contactDetail.alt_phone}" class="emTextInputMedium">
+ {if:fieldFail.alt_phone}<br>{fieldFail.alt_phone}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.fax}<th class="emRequiredInputField">{else:}<th>{end:}FAX number:</th>
+ {if:fieldFail.fax}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="fax" value="{contactDetail.fax}" class="emTextInputMedium">
+ {if:fieldFail.fax}<br>{fieldFail.fax}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.email}<th class="emRequiredInputField">{else:}<th>{end:}E-Mail address:</th>
+ {if:fieldFail.email}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="email" value="{contactDetail.email}" class="emTextInput">
+ {if:fieldFail.email}<br>{fieldFail.email}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.login_id}<th class="emRequiredInputField">{else:}<th>{end:}Optional Log in ID:</th>
+ {if:fieldFail.login_id}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="login_id" value="{contactDetail.login_id}" class="emTextInput">
+ <p>This field is optional. If a Log in ID is supplied, the user may log in either with their
+ E-Mail address or this Log in ID. This may be helpful for users with longer E-Mail addresses.
+ The password below will still be required to log in. Log in IDs are unique, so only one
+ contact may have a particular ID.</p>
+ {if:fieldFail.login_id}<br>{fieldFail.login_id}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.password}<th class="emRequiredInputField">{else:}<th>{end:}Password:</th>
+ {if:fieldFail.password}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="password" value="{contactDetail.password}" class="emTextInputMedium">
+ {if:fieldFail.password}<br>{fieldFail.password:h}{end:}
+ <br>
+ Passwords require at least 8 characters including at least one number, one letter, and one of the following characters.<br>
+ # . - _ , $ % & !
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.alt_email}<th class="emRequiredInputField">{else:}<th>{end:}Alternate E-Mail address:</th>
+ {if:fieldFail.alt_email}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="alt_email" value="{contactDetail.alt_email}" class="emTextInput">
+ {if:fieldFail.alt_email}<br>{fieldFail.alt_email}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.user_rights}<th class="emRequiredInputField">{else:}<th>{end:}User Permissions:</th>
+ {if:fieldFail.user_rights}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="user_rights">
+ {foreach:contactDetail.user_rights.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.user_rights}<br>{fieldFail.user_rights}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.notes}<th class="emRequiredInputField">{else:}<th>{end:}Notes:</th>
+ {if:fieldFail.notes}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="notes" id="notes">{contactDetail.notes:h}</textarea>
+ {if:fieldFail.notes}<br>{fieldFail.notes}{end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id="contactFormSubmit" class="submitKeepOnPage">
+ {if:addingNewContact}
+ <input type="submit" value="Add new {term.contact.norm}" class="emEditSubmit">
+ {end:}
+ {if:editingContact}
+ <input type="submit" value="Update {term.contact.norm}" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No contact has been selected yet.</h2>
+ <p>To edit a contact, first select it from the list of available contacts.
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.contactEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#ContactForm').ajaxForm({
+ success: function(data) {
+ {if:addingNewContact}
+ f_replaceContents(data, $('#Contact_detail_container'));
+ {end:}
+ {if:editingContact}
+ f_replaceContents(data, $('#Contact_detail_container'));
+ {end:}
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#contactFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+// f_buildCkeditor($("#notes"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#notes"));
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Contact List -->
+<div class="emBlock">
+
+ <div class="emUsdTabs">
+{if:checkPermission(#10#)}
+ <div flexy:if="!blockTab.Contact_add" emTabId="Contact_add" emContainerId="Contact_detail_container" emTabParams="contact_type_code=member" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Add a Contact</div>
+ </div>
+{end:}
+ <div class="emTab emLink" style="float: right;">
+ <div id="contactListSizeChange">Larger Table</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ Search Contacts: <input type="text" id="contactsSearch" name="contactsSearchField"> (type any portion of a contact name)
+
+ {if:contactList.contact_list}
+
+ <div id="ContactListTable_wrapper" class="emListTableContainer">
+ <table id="ContactListTable" class="emListTable">
+ <thead>
+ <tr><th>Last Name</th><th>First Name</th><th>Organization</th><th>Phone</th><th>E-Mail</th></tr>
+ </thead>
+ <tbody>
+ {foreach:contactList.contact_list,c}
+ <tr>
+ <td emContactId="{c.id}" class="emLink contactListSelect">{c.lname:h}</td>
+ <td emContactId="{c.id}" class="emLink contactListSelect">{c.fname:h}</td>
+ <td>{c.org}</td>
+ <td>{c.office_phone}</td>
+ <td>{c.email}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No contacts are currently listed.</p>
+ <p>You should have at least one contact listed for each {term.prop.norm}.</p>
+ {end:}
+
+ <div id="Contact_detail_container" class="emSliderClosed">
+ </div>
+
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // Contacts Search
+ var contactsSearchData = [
+ {foreach:contactList.contact_list,c}
+ {label:'{c.lname:h}, {c.fname:h}', value:'{c.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var ContactListTable = $('#ContactListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+ $(window).resize(function(){
+ ContactListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var ContactListTableSmall = true;
+ var ContactListTableHeight = $('#ContactListTable_wrapper div.dataTables_scrollBody').height();
+ $('#contactListSizeChange').click(function() {
+ if (ContactListTableSmall) {
+ $('#ContactListTable_wrapper div.dataTables_scrollBody').height('auto');
+ ContactListTableSmall = false;
+ $(this).html('Smaller Table');
+ ContactListTable.fnSettings().oScroll.sY = '100%';
+ ContactListTable.fnDraw();
+ } else {
+ $('#ContactListTable_wrapper div.dataTables_scrollBody').height(ContactListTableHeight);
+ ContactListTableSmall = true;
+ $(this).html('Larger Table');
+ ContactListTable.fnSettings().oScroll.sY = '100px';
+ ContactListTable.fnDraw();
+ }
+ });
+
+ // Close all local sliders
+ $('#Contact_detail').hide(duration);
+
+ $('.contactListSelect').click(function(){
+ $('#ContactListTable_wrapper div.dataTables_scrollBody').height(ContactListTableHeight);
+ ContactListTableSmall = true;
+ $('#contactListSizeChange').html('Larger Table');
+ ContactListTable.fnSettings().oScroll.sY = '100px';
+ ContactListTable.fnDraw();
+ f_loadAction('Contact_detail', 'Contact_detail_container', 'ContactID=' + $(this).attr('emContactId') + '&tabList={tabList}');
+ });
+
+ // Search Contacts
+ $("#contactsSearch").autocomplete({
+ source: contactsSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#contactsSearch").attr({value: ui.item.label});
+ f_loadAction('Contact_detail', 'Contact_detail_container', 'ContactID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body id="debugBody">\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Admin Debug</div>\r
+ <hr />\r
+ <div id="updateTimestamp">\r
+ <b>Updated:</b> {debugUpdateTime}\r
+ </div> \r
+ <div id="debugBody">\r
+ {debugData:h}\r
+ </div>\r
+{appAdminURL} \r
+ </body>\r
+ \r
+ \r
+\r
+ {startScript:h}\r
+ \r
+ var reloadTimerHandle = false;\r
+ var reloadTime = 2000;\r
+ \r
+ // Reload the current window with Action = Debug_update\r
+ function reloadThisWindow()\r
+ { \r
+ window.location.assign("{appAdminURL}&Action=Debug_update");\r
+ }\r
+ \r
+ // Sets debug reload timer to pick up new data in some period of time. - Called from emDebugWindowReloadRequest() in main .js file\r
+ function debugReloadRequest()\r
+ {\r
+ // Clear any pending reload request \r
+ if (reloadTimerHandle != false) {\r
+ window.clearTimeout(reloadTimerHandle);\r
+ }\r
+ \r
+ // Set timer to wait for additional actions before reloading debug page\r
+ reloadTimerHandle = window.setTimeout(reloadThisWindow, reloadTime);\r
+ \r
+ // Clear current debug data and display wait message\r
+ document.getElementById('debugBody').innerHTML = '<div style="font-size: 2em; color: red; opacity: 0.2;">Loading, waiting for possible additional requests...</div>';\r
+ } \r
+ </script> \r
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body>\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Admin Debug</div>\r
+ <hr />\r
+ <div id="debugData">Debug Startup</div>\r
+\r
+ {startScript:h}\r
+ \r
+ var reloadTimerHandle = false;\r
+ var reloadTime = 4000;\r
+ \r
+ // Reload the current window with Action = Debug_update\r
+ function reloadThisWindow()\r
+ {\r
+ window.location.assign("?Action=Debug_update");\r
+ }\r
+ \r
+ // Sets debug reload timer to pick up new data in some period of time. - Called from emDebugWindowReloadRequest() in main .js file\r
+ function debugReloadRequest()\r
+ {\r
+ // Clear any pending reload request \r
+ if (reloadTimerHandle != false) {\r
+ window.clearTimeout(reloadTimerHandle);\r
+ }\r
+ \r
+ // Set timer to wait for additional actions before reloading debug page\r
+ reloadTimerHandle = window.setTimeout(reloadThisWindow, reloadTime);\r
+ \r
+ // Clear current debug data and display wait message\r
+ document.getElementById('debugBody').innerHTML = '<div style="font-size: 2em; color: red; opacity: 0.2;">Loading, waiting for possible additional requests...</div>';\r
+ } \r
+ </script> \r
+ \r
+ \r
+ </body>\r
+</html>
\ No newline at end of file
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">Delete this {term.entrance.cap}</div>
+
+ <div class="emBlockName">{entranceDetail.name}</div>
+
+{if:checkPermission(#10#)}
+ <div class="emUsdTabs">
+ <div flexy:if="!blockTab.Entrance_confirmDelete" emTabId="Entrance_confirmDelete" emContainerId="Entrance_detail_container" emTabParams="id={entranceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Confirm Delete</div>
+ </div>
+ <div flexy:if="!blockTab.Entrance_list" emTabId="Entrance_list" emContainerId="Entrance_detail_container" emTabParams="EntrancesListOption=member&id={entranceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel Delete</div>
+ </div>
+ </div> <!-- emSubTabs -->
+{end:}
+
+ {if:entranceDetail}
+ <div class="emListTableContainerLeft">
+ <table id="EntranceDeleteTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>Delete {term.entrance.cap}:</th>
+ <td>
+ <h3 style="color: red;">Clicking "Confirm Delete" on the right will permanently delete this {term.entrance.norm}.</h3>
+ </td>
+ </tr>
+ <tr><th>Name:</th><td>{entranceDetail.name}</td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.entrance.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#EntranceDeleteTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">{term.entrance.cap}: {entranceDetail.name}</div>
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Entrance_delete" emContainerId="Entrance_detail_container" emTabParams="EntranceID={entranceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.entrance.cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Entrance_edit" emContainerId="Entrance_detail_container" emTabParams="EntranceID={entranceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.entrance.cap}</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:entranceDetail}
+ <div class="emListTableContainerLeft">
+ <table id="EntranceDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:entranceDetail.delete}
+ <tr>
+ <th>Delete {term.entrance.cap}:</th>
+ <td>
+ {if:entranceDetail.deleteConfirmed}
+ {if:entranceDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {entranceDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+ <button id="confirmEntranceDelete" value="{entranceDetail.id}">Click here to confirm that this {term.entrance.norm} should be deleted.</button><br>
+ <h3 style="color: red;">Clicking the button above will permanently delete this {term.entrance.norm}.</h3>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>{term.entrance.cap} Name:</th><td>{entranceDetail.name}</td></tr>
+ <tr>
+ <th>Location:</th>
+ <td>
+ {entranceDetail.addr1}<br>
+ {if:entranceDetail.addr2}{entranceDetail.addr2}<br>{end:}
+ {if:entranceDetail.city}{entranceDetail.city}{else:}(n/a){end:}, {entranceDetail.state.name} {entranceDetail.zip}<br>
+ {if:entranceDetail.country.name}{entranceDetail.country.name}<br>{end:}
+ <input type="hidden" id="lat" value="{entranceDetail.lat}">
+ <input type="hidden" id="lon" value="{entranceDetail.lon}">
+ <div id="locationMap" class="emMapWindowDetail">(map loads here)</div>
+ </td>
+ </tr>
+ <tr><th>Phone:</th><td>{entranceDetail.phone}</td></tr>
+ <tr><th>Description:</th><td>{entranceDetail.descr:h}</td></tr>
+ <tr>
+ <th>Image:</th>
+ <td>
+ {if:entranceDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{entranceDetail.image}">
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr><th>{term.voucher.cap} Color:</th><td><span style="background-color: #{entranceDetail.color.value}; padding-right: 4em;"> </span> {entranceDetail.color.name}</td></tr>
+ <tr><th>Sort Order:</th><td>{entranceDetail.sort}</td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.entrance.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#EntranceDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ // Code to kick off the geolocation-display feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 16
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewEntrance}Adding New {term.entrance.cap}{end:}
+ {if:editingEntrance}Editing {term.entrance.cap}{end:}
+ </div>
+
+{if:checkPermission(#10#)}
+ <div class="emUsdTabs">
+ {if:addingNewEntrance}
+ <div flexy:if="!blockTab.Entrance_list" emTabId="Misc_blank" emContainerId="Entrance_detail_container" emTabParams="id={entranceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+ {else:}
+ <div flexy:if="!blockTab.Entrance_list" emTabId="Entrance_detail" emContainerId="Entrance_detail_container" emTabParams="id={entranceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+ {end:}
+ </div> <!-- emSubTabs -->
+{end:}
+
+{if:formFail}
+ <div class="requiredField">Not all fields were filled in correctly. Please try again.</div>
+{end:}
+
+ <div class=".emForm">
+
+ {if:entranceDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="EntranceForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewEntrance}
+ <input type="hidden" name="Action" value="Entrance_insert">
+ {else:}
+ <input type="hidden" name="Action" value="Entrance_update">
+ {end:}
+
+ <input type="hidden" name="member" value="{entranceDetail.member}">
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+ <input type="hidden" name="tabList" value="{tabList}">
+
+ <div class="emListTableContainer">
+ <table class="emListTable entranceEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ {if:fieldRequired.name}<th class="emRequiredInputField">{else:}<th>{end:}{term.entrance.cap} Name:</th>
+ {if:fieldFail.name}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="name" value="{entranceDetail.name:h}" class="emTextInput">
+ {if:fieldFail.name}<br>{fieldFail.name}{end:}
+ </td>
+ </tr>
+
+
+ <tr>
+ {if:fieldRequired.addr1}<th class="emRequiredInputField">{else:}<th>{end:}Address:</th>
+ {if:fieldFail.addr1}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="addr1" id="addr1" value="{entranceDetail.addr1:h}" class="emTextInput">
+ {if:fieldFail.addr1}<br>{fieldFail.addr1}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.addr2}<th class="emRequiredInputField">{else:}<th>{end:} </th>
+ {if:fieldFail.addr2}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="addr2" id="addr2" value="{entranceDetail.addr2:h}" class="emTextInput">
+ {if:fieldFail.addr2}<br>{fieldFail.addr2}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.city}<th class="emRequiredInputField">{else:}<th>{end:}City:</th>
+ {if:fieldFail.city}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="city" id="city" value="{entranceDetail.city:h}" class="emTextInput">
+ {if:fieldFail.city}<br>{fieldFail.city}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.state}<th class="emRequiredInputField">{else:}<th>{end:}State:</th>
+ {if:fieldFail.state}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="state">
+ <option value=""> </option>
+ {foreach:entranceDetail.state.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.state}<br>{fieldFail.state}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.zip}<th class="emRequiredInputField">{else:}<th>{end:}ZIP/Postal Code:</th>
+ {if:fieldFail.zip}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="zip" id="zip" value="{entranceDetail.zip}" class="emTextInputShort">
+ {if:fieldFail.zip}<br>{fieldFail.zip}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.country}<th class="emRequiredInputField">{else:}<th>{end:}Country:</th>
+ {if:fieldFail.country}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="country">
+ <option value=""> </option>
+ {foreach:entranceDetail.country.list,c}
+ {if:c.default}
+ <option value="{c.value}" SELECTED>{c.name}</option>
+ {else:}
+ <option value="{c.value}">{c.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.country}<br>{fieldFail.country}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.lat}<th class="emRequiredInputField">{else:}<th>{end:}Location:</th>
+ <td>
+ <div>
+ <input type="hidden" name="lat" id="lat" value="{entranceDetail.lat}" class="emTextInputShort">
+ <input type="hidden" name="lon" id="lon" value="{entranceDetail.lon}" class="emTextInputShort">
+ </div>
+ <p>
+ This map will try to find the new location whenever you change the address entered above.
+ </p>
+ <div id="locationMap" class="emMapWindowEdit">(map loads here)</div>
+ <p>
+ MAP USE: Drag the pointer to the desired location for this {term.prop.norm}.
+ Use + and - buttons or the mouse wheel to zoom in or out.
+ Click and drag anywhere else on the map to move to another area.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.phone}<th class="emRequiredInputField">{else:}<th>{end:}Main Phone #:</th>
+ {if:fieldFail.phone}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="phone" value="{entranceDetail.phone}" class="emTextInput">
+ {if:fieldFail.phone}<p>{fieldFail.phone}</p>{end:}
+ </td>
+ </tr>
+
+
+
+ <tr>
+ {if:fieldRequired.descr}<th class="emRequiredInputField">{else:}<th>{end:}Description:</th>
+ {if:fieldFail.descr}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="descr" id="descr">{entranceDetail.descr:h}</textarea>
+ {if:fieldFail.descr}<br>{fieldFail.descr}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.image}<th class="emRequiredInputField">{else:}<th>{end:}Image:</th>
+ {if:fieldFail.image}<td class="emBadInputField">{else:}<td>{end:}
+ {if:entranceDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{entranceDetail.image}">
+ <br>Delete this image: <input type="checkbox" name="image_delete">
+ {end:}
+ <input type="hidden" name="image" value="{storedDetail.image}">
+ <br>Upload or replace the image: <input type="file" name="image_new">
+ {if:fieldFail.image}<br>{fieldFail.image}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.color}<th class="emRequiredInputField">{else:}<th>{end:}{term.voucher.cap} Color:</th>
+ {if:fieldFail.color}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="color">
+ <option value=""> </option>
+ {foreach:entranceDetail.color.list,c}
+ {if:c.default}
+ <option value="{c.value}" SELECTED><span style="background: #{c.value}; width: 3em;"> </span>{c.name}</option>
+ {else:}
+ <option value="{c.value}" style="background-color: #{c.value};"><span style="background-color: #{c.value}; width: 3em;"> </span>{c.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.color}<br>{fieldFail.color}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.sort}<th class="requiredField">{else:}<th>{end:}Output Order:</th>
+ {if:fieldFail.sort}<td class="badField">{else:}<td>{end:}
+ <input type="text" name="sort" value="{entranceDetail.sort:h}" class="textInputShort">
+ {if:fieldFail.sort}<br>{fieldFail.sort}{end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id="entranceFormSubmit" class="submitKeepOnPage">
+ {if:addingNewEntrance}
+ <input type="submit" value="Add new {term.entrance.norm}" class="emEditSubmit">
+ {end:}
+ {if:editingEntrance}
+ <input type="submit" value="Update {term.entrance.norm}" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No {term.entrance.norm} has been selected yet.</h2>
+ <p>To edit a {term.entrance.norm}, first select it from the list of available {term.entrance.plur}.
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.entranceEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#EntranceForm').ajaxForm({
+ success: function(data) {
+ {if:addingNewEntrance}
+ f_replaceContents(data, $('#Member_info_container'));
+ {end:}
+ {if:editingEntrance}
+ f_replaceContents(data, $('#Member_info_container'));
+ {end:}
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#entranceFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#descr"));
+ f_buildCkeditor($("#notes"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ });
+
+ /*
+ * Map operations
+ */
+
+ // Code to kick off the geolocation-edit feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ address: [
+ "#addr1",
+ "#city",
+ "#zip"
+ ],
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 16
+ },
+ markerOptions: {
+ title: "This is your selected location"
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Entrance List -->
+<div class="emBlock">
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Entrance_add" emContainerId="Entrance_detail_container" emTabParams="" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Add a {term.entrance.cap}</div>
+ </div>
+ <div class="emTab emLink" style="float: right;">
+ <div id="entranceListSizeChange">Larger Table</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ Search {term.entrance.plur_cap}: <input type="text" id="entrancesSearch" name="entrancesSearchField"> (type any portion of a {term.entrance.norm} name)
+
+ {if:entranceList}
+
+ <div id="EntranceListTable_wrapper" class="emListTableContainer">
+ <table id="EntranceListTable" class="emListTable">
+ <thead>
+ <tr><th style="width: 60px;">Sort Order</th><th>Name</th><th>{term.voucher.cap} Color</th></tr>
+ </thead>
+ <tbody>
+ {foreach:entranceList,c}
+ <tr>
+ <td>{c.sort}</td>
+ <td emEntranceId="{c.id}" class="emLink entranceListSelect">{c.name:h}</td>
+ <td><span style="background-color: #{c.color.value}; padding-right: 4em;"> </span> {c.color.name}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No {term.entrance.plur} listed.</p>
+ <p>
+ You do not need to have a {term.entrance.norm}. If you do decide to add {term.entrance.plur},
+ you may associate specific ones with specific {term.section.plur} or {term.ticket.plur}.
+ </p>
+ {end:}
+
+ <div id="Entrance_detail_container" class="emSliderClosed">
+ </div>
+
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // Entrances Search
+ var entrancesSearchData = [
+ {foreach:entranceList,c}
+ {label:'{c.name:h}', value:'{c.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var EntranceListTable = $('#EntranceListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ "aoColumns" : [
+ { sWidth: '80px' },
+ null,
+ null
+ ]
+ });
+ $(window).resize(function(){
+ EntranceListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var EntranceListTableSmall = true;
+ var EntranceListTableHeight = $('#EntranceListTable_wrapper div.dataTables_scrollBody').height();
+ $('#entranceListSizeChange').click(function() {
+ if (EntranceListTableSmall) {
+ $('#EntranceListTable_wrapper div.dataTables_scrollBody').height('auto');
+ EntranceListTableSmall = false;
+ $(this).html('Smaller Table');
+ EntranceListTable.fnSettings().oScroll.sY = '100%';
+ EntranceListTable.fnDraw();
+ } else {
+ $('#EntranceListTable_wrapper div.dataTables_scrollBody').height(EntranceListTableHeight);
+ EntranceListTableSmall = true;
+ $(this).html('Larger Table');
+ EntranceListTable.fnSettings().oScroll.sY = '100px';
+ EntranceListTable.fnDraw();
+ }
+ });
+
+ // Close all local sliders
+ $('#Entrance_detail_container').hide(duration);
+
+ $('.entranceListSelect').click(function(){
+ $('#EntranceListTable_wrapper div.dataTables_scrollBody').height(EntranceListTableHeight);
+ EntranceListTableSmall = true;
+ $('#entranceListSizeChange').html('Larger Table');
+ EntranceListTable.fnSettings().oScroll.sY = '100px';
+ EntranceListTable.fnDraw();
+ f_loadAction('Entrance_detail', 'Entrance_detail_container', 'EntranceID=' + $(this).attr('emEntranceId') + '&tabList={tabList}');
+ });
+
+ // Search Entrances
+ $("#entrancesSearch").autocomplete({
+ source: entrancesSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#entrancesSearch").attr({value: ui.item.label});
+ f_loadAction('Entrance_detail', 'Entrance_detail_container', 'EntranceID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">\r
+ <div id="EventHead">\r
+ <div class="emBlockName">This is the {term.event.norm} area....</div>\r
+ <p>\r
+ some stuff goes here\r
+ </p>\r
+ </div>\r
+</div>\r
+\r
+{startScript:h}\r
+ \r
+ // jQuery Section\r
+ $(document).ready(function(){\r
+\r
+ });\r
+\r
+</script>
\ No newline at end of file
--- /dev/null
+<div class="emBlock">\r
+ <div id="WelcomeHead">\r
+ <div class="emBlockName" style="text-align: center; margin: 2em;">Event Management System Help.</div>\r
+ <p>\r
+ <center><a href="{baseURL}common/EventManagement/admin/{userInterface}/documentation/VenueAdminGuide.pdf" target="help">Printable Help Documentation</a></center>\r
+ </p>\r
+ </div>\r
+</div>\r
+\r
+<div class="emSubBlock">\r
+ <div class="emBlockName" style="text-align: center; margin: 2em;">Packaging Quick Reference</div>\r
+ <div class="emBlock" style="width: 60%; margin: 0 auto;">\r
+ <p>Location that only offers items contained in a package</p>\r
+ <table class="emListTable" style="margin-left: 2em;">\r
+ <tr><th>Type: </th><td>Other - neither vendor nor sales</td></tr>\r
+ <tr><th>Active: </th><td>Yes</td></tr>\r
+ <tr><th>Payment: </th><td>No payment setup is required</td></tr>\r
+ </table>\r
+ <p>Categories that only contain times used in a package</p>\r
+ <table class="emListTable" style="margin-left: 2em;">\r
+ <tr><th>Active: </th><td>No</td></tr>\r
+ <tr><th>Purchace by Admin Only: </th><td>No</td></tr>\r
+ <tr><th>Promote in Cart: </th><td>No</td></tr>\r
+ </table>\r
+ <p>Items that are only used in a package</p>\r
+ <table class="emListTable" style="margin-left: 2em;">\r
+ <tr><th>Active: </th><td>No</td></tr>\r
+ <tr><th>Purchace by Admin Only: </th><td>No</td></tr>\r
+ <tr><th>Always show in cart: </th><td>No</td></tr>\r
+ <tr><th>Boarding Pass Type: </th><td>Voucher/Ticket for Pickup - no Barcode</td></tr>\r
+ <tr><th colspan="2" align="center">NO ADDONS!</th></tr>\r
+ </table>\r
+ </div>\r
+</div>\r
+\r
+{startScript:h}\r
+ \r
+ // jQuery Section\r
+ $(document).ready(function(){\r
+\r
+ });\r
+\r
+</script>
\ No newline at end of file
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">New {term.prop.cap} Added</div>
+
+</div> <!-- emBlock -->
+
+{startScript:h}
+
+ $(function() {
+ f_loadAction('Member_list', 'Member_area', 'MembersListOption=all&tabList={tabList}');
+ f_loadAction('Member_selected', 'Member_selected', 'member_id={memberDetail.id}&tabList={tabList}');
+
+ });
+
+</script>
+
--- /dev/null
+<div class="emBlock" style="width: 98%;">
+
+ <div class="emBlockName">Delete this {term.prop.cap}</div>
+
+{if:checkPermission(#10#)}
+ <div class="emUsdTabs">
+ <div emTabId="Member_detail" emContainerId="Member_info_container" emTabGroup="none" class="emTab emLink" style="float: right">
+ <div class="emTabName">Cancel Delete</div>
+ </div>
+ </div> <!-- emSubTabs -->
+{end:}
+
+ {if:memberDetail}
+ <div class="emListTableContainerLeft">
+ <table id="MemberDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>Delete {term.prop.cap}:</th>
+ <td>
+ <h3 style="color: red;">
+ <p>
+ WARNING: Deleting this {term.prop.norm} will remove all related data.
+ This will remove all history related to this {term.prop.norm} and will
+ remove all related data from reports.
+ </p>
+ <p>
+ You may want to simply mark this {term.prop.norm} as "inactive" by un-checking
+ the "Account Active" option in the {term.prop.norm} edit screen then delete the
+ {term.prop.norm} after all yearly reports have been produced.
+ </p>
+ <p>
+ If you are sure you want to continue, please enter exactly "Please Delete" in
+ the field below then click the "Confirm Delete" button. This action will not
+ be reversable!
+ </p>
+ <p>
+ <div class="emUsdTabs">
+ Delete Confirmation: <input id="deleteConfirmationText" type="text" name="deleteConfirmationText">
+ <div id="Member_confirmDelete" emTabId="Member_confirmDelete" emContainerId="Member_info_container" emTabGroup="none" class="emPseudoTab emLink" style="float: right">
+ <div class="emTabName">Confirm Delete</div>
+ </div>
+ </div>
+ </p>
+ </h3>
+ </td>
+ </tr>
+ {if:option.member_db_integrated}
+ <tr><th>Name:</th><td>{memberDetail.member_name}</td></tr>
+ {end:}
+ <tr><th>{term.prop.cap} Name:</th><td>{memberDetail.name}</td></tr>
+ <tr><th>{term.prop.cap} Type:</th><td>{memberDetail.member_type.name}</td></tr>
+ <tr>
+ <th>Location:</th>
+ <td>
+ {memberDetail.addr1}<br>
+ {if:memberDetail.addr2}{memberDetail.addr2}<br>{end:}
+ {if:memberDetail.city}{memberDetail.city}{else:}(n/a){end:}, {memberDetail.state.name} {memberDetail.zip}<br>
+ {if:memberDetail.country.name}{memberDetail.country.name}<br>{end:}
+ <input type="hidden" id="lat" value="{memberDetail.lat}">
+ <input type="hidden" id="lon" value="{memberDetail.lon}">
+ <div id="locationMap" class="emMapWindowDetail">(map loads here)</div>
+ </td>
+ </tr>
+ <tr><th>Phone:</th><td>{memberDetail.phone}</td></tr>
+ <tr><th>E-Mail Address:</th><td>{memberDetail.email}</td></tr>
+ <tr><th>Processing E-Mail Address:</th><td>{memberDetail.proc_email}</td></tr>
+ <tr><th>Secondary Processing E-Mail Address:</th><td>{memberDetail.proc_email2}</td></tr>
+ <tr><th>Send Notice of Each Customer Purchase:</th><td>{memberDetail.checkout_notify.name}</td></tr>
+ <tr><th>Description:</th><td>{memberDetail.descr:h}</td></tr>
+ <tr>
+ <th>Credit Cards Accepted:</th>
+ <td>
+ {foreach:memberDetail.cards_accepted.names,s}{s}<br>{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Payment Gateway:</th>
+ <td>
+ {memberDetail.payment_gateway.name}<br>
+ <table class="emListTable">
+ <tr id="usePar1"><th><span id="gatewayPar1Name"></span></th><td>{memberDetail.gateway_par1}<br></td></tr>
+ <tr id="usePar2"><th><span id="gatewayPar2Name"></span></th><td>{memberDetail.gateway_par2}<br></td></tr>
+ <tr id="usePar3"><th><span id="gatewayPar3Name"></span></th><td>{memberDetail.gateway_par3.name}<br></td></tr>
+ <tr id="usePar4"><th><span id="gatewayPar4Name"></span></th><td>{memberDetail.gateway_par4.name}<br></td></tr>
+ <tr id="usePar5"><th><span id="gatewayPar5Name"></span></th><td>{memberDetail.gateway_par5}<br></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>PayPal Payment Gateway:</th>
+ <td>
+ <p>PayPal Gateway Enabled: {memberDetail.paypal.name}</p>
+ <table class="emListTable">
+ <tr><th>Client ID</th><td>{memberDetail.paypal_client_id}<br></td></tr>
+ <tr><th>Secret:</th><td>{memberDetail.paypal_secret}<br></td></tr>
+ <tr><th>Mode:</th><td>{memberDetail.paypal_mode.name}<br></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>SSL Seal for Checkout Page:</th>
+ <td>
+ <table>
+ <tr><th>Head Script:</th><td>{memberDetail.ssl_seal_head_script:h}</td>
+ <tr><th>Body Script:</th><td>{memberDetail.ssl_seal_body_script:h}</td>
+ </table>
+ </td>
+ </tr>
+ <tr><th>Image:</th><td>{memberDetail.image}</td></tr>
+ <tr><th>Sections Map:</th><td>{memberDetail.ticket_sec_map}</td></tr>
+ <tr><th>Accept Special Requests:</th><td>{memberDetail.ticket_spec_req.name}</td></tr>
+ {if:option.accommodations}
+ <tr><th>Check-In Time:</th><td>{memberDetail.check_in.time}</td></tr>
+ <tr><th>Check-Out Time:</th><td>{memberDetail.check_out.time}</td></tr>
+ <tr>
+ <th>Accommodation Amenities:</th>
+ <td>
+ {if:memberDetail.amen_1.displayName}{if:memberDetail.amen_1.value}{memberDetail.amen_1.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_2.displayName}{if:memberDetail.amen_2.value}{memberDetail.amen_2.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_3.displayName}{if:memberDetail.amen_3.value}{memberDetail.amen_3.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_4.displayName}{if:memberDetail.amen_4.value}{memberDetail.amen_4.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_5.displayName}{if:memberDetail.amen_5.value}{memberDetail.amen_5.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_6.displayName}{if:memberDetail.amen_6.value}{memberDetail.amen_6.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_7.displayName}{if:memberDetail.amen_7.value}{memberDetail.amen_7.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_8.displayName}{if:memberDetail.amen_8.value}{memberDetail.amen_8.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_9.displayName}{if:memberDetail.amen_9.value}{memberDetail.amen_9.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_10.displayName}{if:memberDetail.amen_10.value}{memberDetail.amen_10.displayName}<br>{end:}{end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>General Policies:</th><td>{memberDetail.def_ticket_pol:h}</td></tr>
+ <tr><th>Sort Order:</th><td>{memberDetail.sort}</td></tr>
+ <tr><th>Notes:</th><td>{memberDetail.notes:h}</td></tr>
+ </tbody>
+ </table>
+ </div>
+ {else:}
+ No member information available.
+ {end:}
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ $('#MemberDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ // Code to kick off the geolocation-edit feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 16
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+
+ // Determine which payment gateway is selected and set prompts and visible fields accordingly
+ // Authorize.net
+ var g = {memberDetail.payment_gateway.value};
+ if (g == 1) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Login: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Key: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').show(duration);
+ $('#gatewayPar4Name').html('Merchant E-Mail Sent: ');
+ $('#usePar5').show(duration);
+ $('#gatewayPar5Name').html('Merchant E-Mail: ');
+ }
+ // Merchant Solutions
+ if (g == 2) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Account ID: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Merchant Pin: ');
+ $('#usePar3').hide(duration);
+ $('#gatewayPar3Name').html('');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ }
+ // None selected
+ if (g == 0) {
+ $('#usePar1').hide(duration);
+ $('#usePar2').hide(duration);
+ $('#usePar3').hide(duration);
+ $('#usePar4').hide(duration);
+ $('#usePar5').hide(duration);
+ }
+
+ // Check delete confirmation
+ $('#Member_confirmDelete').on('click', null, function() {
+
+ // Check for proper confirmation string
+ var conf = $('#deleteConfirmationText').val();
+ if (conf != 'Please Delete') {
+ alert('To confirm enter exactly "Please Delete" or click "Cancel Delete" to abort.');
+ } else {
+ f_loadAction('Member_confirmDelete', 'Member_info_container', false);
+ }
+ return false;
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+
+<div class="emBlock" style="width: 98%;">
+
+{if:memberNotFound}
+
+ (member not found)
+
+{else:}
+
+ {if:memberDeleted}
+ <div class="emBlockName"><span style="color: red;">Member Deleted</span></div>
+ {else:}
+ <div class="emUsdTabs">
+ {if:checkPermission(#0#)}
+ <div emTabId="Member_delete" emContainerId="Member_info_container" emTabGroup="none" class="emTab emLink" style="float: right">
+ <div class="emTabName">Delete this {term.prop.cap}</div>
+ </div>
+ {end:}
+ {if:checkPermission(#10#)}
+ <div emTabId="Member_edit" emContainerId="Member_info_container" emTabGroup="none" class="emTab emLink" style="float: right">
+ <div class="emTabName">Edit this {term.prop.cap}</div>
+ </div>
+ {end:}
+ </div> <!-- emSubTabs -->
+ {end:}
+
+ <div class="emBlockName">
+ {if:addingNewMember}Adding New {term.prop.cap}{end:}
+ {if:editingMember}Editing {term.prop.cap}{end:}
+ </div>
+
+ <div class="emListTableContainerLeft">
+ <table id="MemberDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:option.member_db_integrated}
+ <tr><th>Name:</th><td>{memberDetail.member_name}</td></tr>
+ {end:}
+ <tr><th>{term.prop.cap} Name:</th><td>{memberDetail.name:h}<span style="float: right;">ID: {memberDetail.id}</span></td></tr>
+ <tr><th>{term.prop.cap} Type:</th><td>{memberDetail.member_type.name}</td></tr>
+ {if:checkPermission(#0#)}
+ <tr><th>Active:</th><td>{memberDetail.active.name}</td></tr>
+ {end:}
+ <tr>
+ <th>Location:</th>
+ <td>
+ {memberDetail.addr1}<br>
+ {if:memberDetail.addr2}{memberDetail.addr2}<br>{end:}
+ {if:memberDetail.city}{memberDetail.city}{else:}(n/a){end:}, {memberDetail.state.name} {memberDetail.zip}<br>
+ {if:memberDetail.country.name}{memberDetail.country.name}<br>{end:}
+ <input type="hidden" id="lat" value="{memberDetail.lat}">
+ <input type="hidden" id="lon" value="{memberDetail.lon}">
+ <div id="LeafletMapContainer" style="height: 400px; width: 100%;">(map loads here)</div>
+ </td>
+ </tr>
+ <tr><th>Phone:</th><td>{memberDetail.phone}</td></tr>
+ <tr><th>E-Mail Address:</th><td>{memberDetail.email}</td></tr>
+ <tr><th>Processing E-Mail Address:</th><td>{memberDetail.proc_email}</td></tr>
+ <tr><th>Secondary Processing E-Mail Address:</th><td>{memberDetail.proc_email2}</td></tr>
+ <tr><th>Send Notice of Each Customer Purchase:</th><td>{memberDetail.checkout_notify.name}</td></tr>
+ <tr><th>Description:</th><td>{memberDetail.descr:h}</td></tr>
+ <tr>
+ <th>Credit Cards Accepted:</th>
+ <td>
+ {foreach:memberDetail.cards_accepted.names,s}{s}<br>{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Credit Card Payment Gateway:</th>
+ <td>
+ <p>{memberDetail.payment_gateway.name}</p>
+ <table class="emListTable">
+ <tr id="usePar1"><th><span id="gatewayPar1Name"></span></th><td>{memberDetail.gateway_par1}<br></td></tr>
+ <tr id="usePar2"><th><span id="gatewayPar2Name"></span></th><td>{memberDetail.gateway_par2}<br></td></tr>
+ <tr id="usePar3"><th><span id="gatewayPar3Name"></span></th><td>{memberDetail.gateway_par3.name}<br></td></tr>
+ <tr id="usePar4"><th><span id="gatewayPar4Name"></span></th><td>{memberDetail.gateway_par4.name}<br></td></tr>
+ <tr id="usePar5"><th><span id="gatewayPar5Name"></span></th><td>{memberDetail.gateway_par5}<br></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>PayPal Payment Gateway:</th>
+ <td>
+ <p>PayPal Gateway Enabled: {memberDetail.paypal.name}</p>
+ <table class="emListTable">
+ <tr><th>Client ID</th><td>{memberDetail.paypal_client_id}<br></td></tr>
+ <tr><th>Secret:</th><td>{memberDetail.paypal_secret}<br></td></tr>
+ <tr><th>Mode:</th><td>{memberDetail.paypal_mode.name}<br></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>SSL Seal for Checkout Page:</th>
+ <td>
+ <table>
+ <tr><th>Head Script:</th><td>{memberDetail.ssl_seal_head_script:h}</td>
+ <tr><th>Body Script:</th><td>{memberDetail.ssl_seal_body_script:h}</td>
+ </table>
+ </td>
+
+ </tr>
+ <tr>
+ <th>Image:</th>
+ <td>
+ {if:memberDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.image}">
+ {fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.image}
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Parking Map:</th>
+ <td>
+ {if:memberDetail.parking_map}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.parking_map}">
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Sections Map:</th>
+ <td>
+ {if:memberDetail.ticket_sec_map}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.ticket_sec_map}">
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr><th>Accept Special Requests:</th><td>{memberDetail.ticket_spec_req.name}</td></tr>
+
+ <tr>
+ <th>{term.prop.cap} Scans For:</th>
+ <td>
+ {if:haveMemberScansFor}
+ <p>When scanning packages, this {term.prop.norm} also scans for the following {term.prop.plur}.</p>
+ <table style="width: 50%;" class="emListTable">
+ <thead>
+ <tr><th>{term.prop.plur_cap}</th></tr>
+ </thead>
+ {foreach:memberScansFor,s}
+ <tr>
+ <td>{s.scans_for_name}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ {else:}
+ This {term.prop.norm} is not scanning package {term.ticket.plur} for other {term.prop.plur}.
+ {end:}
+ </td>
+ </tr>
+
+
+ {if:option.accommodations}
+ <tr><th>Check-In Time:</th><td>{memberDetail.check_in.time}</td></tr>
+ <tr><th>Check-Out Time:</th><td>{memberDetail.check_out.time}</td></tr>
+ <tr>
+ <th>Accommodation Amenities:</th>
+ <td>
+ {if:memberDetail.amen_1.displayName}{if:memberDetail.amen_1.value}{memberDetail.amen_1.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_2.displayName}{if:memberDetail.amen_2.value}{memberDetail.amen_2.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_3.displayName}{if:memberDetail.amen_3.value}{memberDetail.amen_3.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_4.displayName}{if:memberDetail.amen_4.value}{memberDetail.amen_4.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_5.displayName}{if:memberDetail.amen_5.value}{memberDetail.amen_5.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_6.displayName}{if:memberDetail.amen_6.value}{memberDetail.amen_6.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_7.displayName}{if:memberDetail.amen_7.value}{memberDetail.amen_7.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_8.displayName}{if:memberDetail.amen_8.value}{memberDetail.amen_8.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_9.displayName}{if:memberDetail.amen_9.value}{memberDetail.amen_9.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_10.displayName}{if:memberDetail.amen_10.value}{memberDetail.amen_10.displayName}<br>{end:}{end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>{term.ticket.cap} Sales Intro Text:</th><td>{memberDetail.intro_text:h}</td></tr>
+ <tr><th>{term.ticket.cap} Sales Checkout E-Mail Sent:</th><td>{memberDetail.checkout_email:h}</td></tr>
+ <tr><th>General Policies:</th><td>{memberDetail.def_ticket_pol:h}</td></tr>
+ <tr><th>Sort Order:</th><td>{memberDetail.sort}</td></tr>
+ <tr><th>Notes:</th><td>{memberDetail.notes:h}</td></tr>
+ </tbody>
+ </table>
+ </div>
+
+</div> <!-- emBlock -->
+
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ paymentGatewayVal="memberDetail.payment_gateway.value"
+>
+
+<script type="text/javascript">
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ $('#MemberDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bDestroy": true,
+ "bAutoWidth": false,
+ "aoColumns": [
+ { "sWidth": "20%" },
+ { "sWidth": "80%" }
+ ]
+ });
+
+
+
+
+
+ /*
+ * Map operations
+ */
+
+ var startLat = $('#lat').val();
+ var startLon = $('#lon').val();
+
+ var defZoom = Number(12);
+
+
+ /*
+ * Leaflet Map
+ * API reference: https://leafletjs.com/reference-1.3.2.html
+ */
+
+
+ function initMap() {
+
+ var leafletMap = L.map('LeafletMapContainer').setView([startLat, startLon], defZoom);
+ //var leafletTileServer = 'https://maps.gaslightmedia.com' + '{z}/{x}/{y}.png';
+ var leafletTileServer = 'https://maps.gaslightmedia.com/08172018-1720ec4ae0a3dea9189ce9d87f6c69e2/' + '{z}/{x}/{y}.png';
+ var leafletMinZoom = 5;
+ var leafletMaxZoom = 18;
+ var geocoder;
+
+ // Tile server
+ L.tileLayer(leafletTileServer, {
+ attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.gaslightmedia.com/">Gaslight Media</a>',
+ minZoom: leafletMinZoom,
+ maxZoom: leafletMaxZoom,
+ id: 'nothot'
+ }).addTo(leafletMap);
+
+ // Marker
+ var leafletMarker = L.marker([startLat, startLon], {
+ draggable: false
+ }).addTo(leafletMap);
+
+ // Marker Drag/Drop action
+ leafletMarker.on('dragend', function(event){
+ var marker = event.target;
+ var position = marker.getLatLng();
+
+ marker.setLatLng(new L.LatLng(position.lat, position.lng),{ draggable:'true' });
+ leafletMap.panTo(new L.LatLng(position.lat, position.lng))
+
+ // Assign it to the lat/lon fields for submission
+ $('#glmLat').val(position.lat.toFixed(6));
+ $('#glmLng').val(position.lng.toFixed(6));
+ });
+
+ /*
+ * Use OpenStreetMaps Nominatim for Geolocation
+ */
+ var nominatimAPI = "https://nominatim.openstreetmap.org/search/";
+ var addressMapFail = 'Sorry, we were unable to get a map position from the address provided.';
+ $(document).on('click','#glm-estimate-location', function() {
+
+ var addrStreet = $('#addr1').val();
+ var addrCity = $('#city option:selected').text();
+ var addrState = $('#state').val();
+ var addrCountry = $('#country').val();
+ var addrZip = $('#zip').val();
+
+ var location = $.getJSON( nominatimAPI, {
+ format: 'json',
+ street: addrStreet,
+ city: addrCity,
+ state: addrState,
+ country: addrCountry,
+ postalcode: addrZip
+ })
+ .fail(function(data) {
+ alert(addressMapFail);
+ })
+ .done(function( data ) {
+ if( !data[0] || !data[0].lat || !data[0].lon ) {
+ // Not found, try again without city name
+ // Nominatim doesn't always find with the US ZIP preferred city name
+ var location = $.getJSON( nominatimAPI, {
+ format: 'json',
+ street: addrStreet,
+ // city: addrCity,
+ state: addrState,
+ country: addrCountry,
+ postalcode: addrZip
+ })
+ .fail(function(data) {
+ alert('Sorry, we had a communications failure. 2');
+ })
+ .done(function( data ) {
+ if( !data[0] || !data[0].lat || !data[0].lon ) {
+ alert(addressMapFail);
+ } else {
+ assignNewPosition(data);
+ alert('We were unable to match all of your address data but did find this location.\n\n' + data[0].display_name + '\n\nPlease check that it is correct and adjust as needed by dragging the map pointer.\nYou may also want to check the city selected in the address.');
+ }
+ });
+ } else {
+ assignNewPosition(data);
+ }
+ });
+
+ });
+
+ // Assign a position found by the Nominatim search above
+ function assignNewPosition(data) {
+
+ // Assign the new position to the hidden fields for submission
+ glmLat = Number(data[0].lat);
+ glmLng = Number(data[0].lon);
+ $('#glmLat').val(glmLat.toFixed(6));
+ $('#glmLng').val(glmLng.toFixed(6));
+
+ // Move map pointer to the proper location
+ leafletMarker.setLatLng(new L.LatLng(glmLat, glmLng),{ draggable:'true' });
+ leafletMap.panTo(new L.LatLng(glmLat, glmLng));
+
+ }
+
+ // Recenter when Update Poineter after entering Lat/Lon is clicked
+ $(document).on('click','#latLonRecenter', function() {
+ var glmLat = $('#glmLat').val();
+ var glmLng = $('#glmLng').val();
+ leafletMarker.setLatLng(new L.LatLng(glmLat, glmLng),{ draggable:'true' });
+ leafletMap.panTo(new L.LatLng(glmLat, glmLng));
+ });
+
+ }
+ initMap();
+
+
+ // Determine which payment gateway is selected and set prompts and visible fields accordingly
+ // Authorize.net
+ if (flex_paymentGatewayVal == 1) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Login: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Key: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').show(duration);
+ $('#gatewayPar4Name').html('Merchant E-Mail Sent: ');
+ $('#usePar5').show(duration);
+ $('#gatewayPar5Name').html('Merchant E-Mail: ');
+ }
+ // Merchant Solutions
+ if (flex_paymentGatewayVal == 2) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Account ID: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Merchant Pin: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ }
+ // Merchant Solutions
+ if (flex_paymentGatewayVal == 3) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Client ID: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Secret: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ }
+ // Test
+ if (flex_paymentGatewayVal == 99) {
+ $('#usePar1').hide(duration);
+ $('#gatewayPar1Name').html('');
+ $('#usePar2').hide(duration);
+ $('#gatewayPar2Name').html('');
+ $('#usePar3').hide(duration);
+ $('#gatewayPar3Name').html('');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ }
+ // None selected
+ if (flex_paymentGatewayVal == 0) {
+ $('#usePar1').hide(duration);
+ $('#usePar2').hide(duration);
+ $('#usePar3').hide(duration);
+ $('#usePar4').hide(duration);
+ $('#usePar5').hide(duration);
+ }
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+{end:}
+
--- /dev/null
+<div class="emBlock" style="width: 98%;">
+
+{if:memberNotFound}
+
+ (member not found)
+
+{else:}
+
+ {if:memberDeleted}
+ <div class="emBlockName"><span style="color: red;">Member Deleted</span></div>
+ {else:}
+ <div class="emUsdTabs">
+ {if:checkPermission(#0#)}
+ <div emTabId="Member_delete" emContainerId="Member_info_container" emTabGroup="none" class="emTab emLink" style="float: right">
+ <div class="emTabName">Delete this {term.prop.cap}</div>
+ </div>
+ {end:}
+ {if:checkPermission(#10#)}
+ <div emTabId="Member_edit" emContainerId="Member_info_container" emTabGroup="none" class="emTab emLink" style="float: right">
+ <div class="emTabName">Edit this {term.prop.cap}</div>
+ </div>
+ {end:}
+ </div> <!-- emSubTabs -->
+ {end:}
+
+ <div class="emBlockName">
+ {if:addingNewMember}Adding New {term.prop.cap}{end:}
+ {if:editingMember}Editing {term.prop.cap}{end:}
+ </div>
+
+ <div class="emListTableContainerLeft">
+ <table id="MemberDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:option.member_db_integrated}
+ <tr><th>Name:</th><td>{memberDetail.member_name}</td></tr>
+ {end:}
+ <tr><th>{term.prop.cap} Name:</th><td>{memberDetail.name:h}<span style="float: right;">ID: {memberDetail.id}</span></td></tr>
+ <tr><th>{term.prop.cap} Type:</th><td>{memberDetail.member_type.name}</td></tr>
+ {if:checkPermission(#0#)}
+ <tr><th>Active:</th><td>{memberDetail.active.name}</td></tr>
+ {end:}
+ <tr>
+ <th>Location:</th>
+ <td>
+ {memberDetail.addr1}<br>
+ {if:memberDetail.addr2}{memberDetail.addr2}<br>{end:}
+ {if:memberDetail.city}{memberDetail.city}{else:}(n/a){end:}, {memberDetail.state.name} {memberDetail.zip}<br>
+ {if:memberDetail.country.name}{memberDetail.country.name}<br>{end:}
+ <input type="hidden" id="lat" value="{memberDetail.lat}">
+ <input type="hidden" id="lon" value="{memberDetail.lon}">
+ <div id="locationMap" class="emMapWindowDetail">(map loads here)</div>
+ </td>
+ </tr>
+ <tr><th>Phone:</th><td>{memberDetail.phone}</td></tr>
+ <tr><th>E-Mail Address:</th><td>{memberDetail.email}</td></tr>
+ <tr><th>Processing E-Mail Address:</th><td>{memberDetail.proc_email}</td></tr>
+ <tr><th>Secondary Processing E-Mail Address:</th><td>{memberDetail.proc_email2}</td></tr>
+ <tr><th>Send Notice of Each Customer Purchase:</th><td>{memberDetail.checkout_notify.name}</td></tr>
+ <tr><th>Description:</th><td>{memberDetail.descr:h}</td></tr>
+ <tr>
+ <th>Credit Cards Accepted:</th>
+ <td>
+ {foreach:memberDetail.cards_accepted.names,s}{s}<br>{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Credit Card Payment Gateway:</th>
+ <td>
+ <p>{memberDetail.payment_gateway.name}</p>
+ <table class="emListTable">
+ <tr id="usePar1"><th><span id="gatewayPar1Name"></span></th><td>{memberDetail.gateway_par1}<br></td></tr>
+ <tr id="usePar2"><th><span id="gatewayPar2Name"></span></th><td>{memberDetail.gateway_par2}<br></td></tr>
+ <tr id="usePar3"><th><span id="gatewayPar3Name"></span></th><td>{memberDetail.gateway_par3.name}<br></td></tr>
+ <tr id="usePar4"><th><span id="gatewayPar4Name"></span></th><td>{memberDetail.gateway_par4.name}<br></td></tr>
+ <tr id="usePar5"><th><span id="gatewayPar5Name"></span></th><td>{memberDetail.gateway_par5}<br></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>PayPal Payment Gateway:</th>
+ <td>
+ <p>PayPal Gateway Enabled: {memberDetail.paypal.name}</p>
+ <table class="emListTable">
+ <tr><th>Client ID</th><td>{memberDetail.paypal_client_id}<br></td></tr>
+ <tr><th>Secret:</th><td>{memberDetail.paypal_secret}<br></td></tr>
+ <tr><th>Mode:</th><td>{memberDetail.paypal_mode.name}<br></td></tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>SSL Seal for Checkout Page:</th>
+ <td>
+ <table>
+ <tr><th>Head Script:</th><td>{memberDetail.ssl_seal_head_script:h}</td>
+ <tr><th>Body Script:</th><td>{memberDetail.ssl_seal_body_script:h}</td>
+ </table>
+ </td>
+
+ </tr>
+ <tr>
+ <th>Image:</th>
+ <td>
+ {if:memberDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.image}">
+ {fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.image}
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Parking Map:</th>
+ <td>
+ {if:memberDetail.parking_map}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.parking_map}">
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Sections Map:</th>
+ <td>
+ {if:memberDetail.ticket_sec_map}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.ticket_sec_map}">
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr><th>Accept Special Requests:</th><td>{memberDetail.ticket_spec_req.name}</td></tr>
+
+ <tr>
+ <th>{term.prop.cap} Scans For:</th>
+ <td>
+ {if:haveMemberScansFor}
+ <p>When scanning packages, this {term.prop.norm} also scans for the following {term.prop.plur}.</p>
+ <table style="width: 50%;" class="emListTable">
+ <thead>
+ <tr><th>{term.prop.plur_cap}</th></tr>
+ </thead>
+ {foreach:memberScansFor,s}
+ <tr>
+ <td>{s.scans_for_name}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ {else:}
+ This {term.prop.norm} is not scanning package {term.ticket.plur} for other {term.prop.plur}.
+ {end:}
+ </td>
+ </tr>
+
+
+ {if:option.accommodations}
+ <tr><th>Check-In Time:</th><td>{memberDetail.check_in.time}</td></tr>
+ <tr><th>Check-Out Time:</th><td>{memberDetail.check_out.time}</td></tr>
+ <tr>
+ <th>Accommodation Amenities:</th>
+ <td>
+ {if:memberDetail.amen_1.displayName}{if:memberDetail.amen_1.value}{memberDetail.amen_1.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_2.displayName}{if:memberDetail.amen_2.value}{memberDetail.amen_2.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_3.displayName}{if:memberDetail.amen_3.value}{memberDetail.amen_3.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_4.displayName}{if:memberDetail.amen_4.value}{memberDetail.amen_4.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_5.displayName}{if:memberDetail.amen_5.value}{memberDetail.amen_5.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_6.displayName}{if:memberDetail.amen_6.value}{memberDetail.amen_6.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_7.displayName}{if:memberDetail.amen_7.value}{memberDetail.amen_7.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_8.displayName}{if:memberDetail.amen_8.value}{memberDetail.amen_8.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_9.displayName}{if:memberDetail.amen_9.value}{memberDetail.amen_9.displayName}<br>{end:}{end:}
+ {if:memberDetail.amen_10.displayName}{if:memberDetail.amen_10.value}{memberDetail.amen_10.displayName}<br>{end:}{end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>{term.ticket.cap} Sales Intro Text:</th><td>{memberDetail.intro_text:h}</td></tr>
+ <tr><th>{term.ticket.cap} Sales Checkout E-Mail Sent:</th><td>{memberDetail.checkout_email:h}</td></tr>
+ <tr><th>General Policies:</th><td>{memberDetail.def_ticket_pol:h}</td></tr>
+ <tr><th>Sort Order:</th><td>{memberDetail.sort}</td></tr>
+ <tr><th>Notes:</th><td>{memberDetail.notes:h}</td></tr>
+ </tbody>
+ </table>
+ </div>
+
+</div> <!-- emBlock -->
+
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ paymentGatewayVal="memberDetail.payment_gateway.value"
+>
+
+<script type="text/javascript">
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ $('#MemberDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bDestroy": true,
+ "bAutoWidth": false,
+ "aoColumns": [
+ { "sWidth": "20%" },
+ { "sWidth": "80%" }
+ ]
+ });
+
+ // Code to kick off the geolocation-display feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 16
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+
+ // Determine which payment gateway is selected and set prompts and visible fields accordingly
+ // Authorize.net
+ if (flex_paymentGatewayVal == 1) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Login: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Key: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').show(duration);
+ $('#gatewayPar4Name').html('Merchant E-Mail Sent: ');
+ $('#usePar5').show(duration);
+ $('#gatewayPar5Name').html('Merchant E-Mail: ');
+ }
+ // Merchant Solutions
+ if (flex_paymentGatewayVal == 2) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Account ID: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Merchant Pin: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ }
+ // Merchant Solutions
+ if (flex_paymentGatewayVal == 3) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Client ID: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Secret: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ }
+ // Test
+ if (flex_paymentGatewayVal == 99) {
+ $('#usePar1').hide(duration);
+ $('#gatewayPar1Name').html('');
+ $('#usePar2').hide(duration);
+ $('#gatewayPar2Name').html('');
+ $('#usePar3').hide(duration);
+ $('#gatewayPar3Name').html('');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ }
+ // None selected
+ if (flex_paymentGatewayVal == 0) {
+ $('#usePar1').hide(duration);
+ $('#usePar2').hide(duration);
+ $('#usePar3').hide(duration);
+ $('#usePar4').hide(duration);
+ $('#usePar5').hide(duration);
+ }
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+{end:}
+
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewMember}Adding New {term.prop.cap}{end:}
+ {if:editingMember}Editing {term.prop.cap}{end:}
+ </div>
+
+ <div class="emUsdTabs">
+{if:addingNewMember}
+ <div emTabId="Misc_blank" emContainerId="Member_selected_container" emTabParams="MembersListOption=all" emTabGroup="none" class="emTab emLink" style="float: right;">
+{else:}
+ <div emTabId="Member_detail" emContainerId="Member_info_container" emTabParams="" emTabGroup="none" class="emTab emLink" style="float: right;">
+{end:}
+ <div class="emTabName">Cancel</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+{if:formFail}
+ <div class="emNoticeHead">Please note:</div>
+ <ul class="emNotices">
+ <li class="emNotice">Not all fields were filled in correctly. Please try again.</li>
+ </ul>
+{end:}
+
+ <div class=".emForm">
+ {if:memberDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="memberForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewMember}<input type="hidden" name="Action" value="Member_insert">{end:}
+ {if:editingMember}<input type="hidden" name="Action" value="Member_update">{end:}
+
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+ <input type="hidden" name="tabList" value="{tabList}">
+ {if:checkPermission(#0#)}
+ {else:}
+ <input type="hidden" name="active" value="on">
+ {end:}
+
+ <div class="emListTableContainer">
+ <table id="MemberEditTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:option.member_db_integrated}
+ <tr>
+ <th>{term.prop.Cap} Name:</th>
+ <td>
+ {if:addingNewMember}
+ <select name="member_name">
+ {foreach:memberDetail.member_name.pick_list,m}
+ <option value="{m.value}" selected flexy:if="m.default">{m.name}</option>
+ <option value="{m.value}" flexy:if="!m.default">{m.name}</option>
+ {end:}
+ </select>
+ {else:}
+ {memberDetail.member_name:h}
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ {if:fieldRequired.name}<th class="emRequiredInputField">{else:}<th>{end:}{term.prop.cap} Name:</th>
+ {if:fieldFail.name}<td class="emBadInputField">{else:}<td>{end:}
+ {if:checkPermission(#0#)}
+ <input type="text" name="name" value="{memberDetail.name:h}" class="emTextInput">
+ {else:}
+ {memberDetail.name:h}<input type="hidden" name="name" value="{memberDetail.name:h}">
+ {end:}
+ {if:fieldFail.name}<br>{fieldFail.name}{end:}
+ </td>
+ </tr>
+ {if:option.member_db_integrated}
+ {else:}
+ {if:checkPermission(#0#)}
+ <tr>
+ {if:fieldRequired.member_type}<th class="emRequiredInputField">{else:}<th>{end:}{term.prop.cap} Type:</th>
+ {if:fieldFail.member_type}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="member_type">
+ {foreach:memberDetail.member_type.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.value} - {s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.value} - {s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.member_type}<br>{fieldFail.member_type}{end:}
+ </td>
+ </tr>
+ {else:}
+ <tr>
+ <th>{term.prop.cap} Type:</th>
+ <td>{memberDetail.member_type.name}</td>
+ </tr>
+ {end:}
+ {if:checkPermission(#0#)}
+ <tr>
+ <th>Account Active:</th>
+ <td>
+ {if:memberDetail.active.value}
+ <input type="checkbox" name="active" checked="yes">
+ {else:}
+ <input type="checkbox" name="active">
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ {if:fieldRequired.addr1}<th class="emRequiredInputField">{else:}<th>{end:}Address:</th>
+ {if:fieldFail.addr1}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="addr1" id="addr1" value="{memberDetail.addr1:h}" class="emTextInput">
+ {if:fieldFail.addr1}<br>{fieldFail.addr1}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.addr2}<th class="emRequiredInputField">{else:}<th>{end:} </th>
+ {if:fieldFail.addr2}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="addr2" id="addr2" value="{memberDetail.addr2:h}" class="emTextInput">
+ {if:fieldFail.addr2}<br>{fieldFail.addr2}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.city}<th class="emRequiredInputField">{else:}<th>{end:}City:</th>
+ {if:fieldFail.city}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="city" id="city" value="{memberDetail.city:h}" class="emTextInput">
+ {if:fieldFail.city}<br>{fieldFail.city}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.state}<th class="emRequiredInputField">{else:}<th>{end:}State:</th>
+ {if:fieldFail.state}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="state">
+ <option value=""> </option>
+ {foreach:memberDetail.state.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.state}<br>{fieldFail.state}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.zip}<th class="emRequiredInputField">{else:}<th>{end:}ZIP/Postal Code:</th>
+ {if:fieldFail.zip}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="zip" id="zip" value="{memberDetail.zip}" class="emTextInputShort">
+ {if:fieldFail.zip}<br>{fieldFail.zip}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.country}<th class="emRequiredInputField">{else:}<th>{end:}Country:</th>
+ {if:fieldFail.country}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="country">
+ <option value=""> </option>
+ {foreach:memberDetail.country.list,c}
+ {if:c.default}
+ <option value="{c.value}" SELECTED>{c.name}</option>
+ {else:}
+ <option value="{c.value}">{c.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.country}<br>{fieldFail.country}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.lat}<th class="emRequiredInputField">{else:}<th>{end:}Location:</th>
+ <td>
+ <div>
+ <input type="hidden" name="lat" id="lat" value="{memberDetail.lat}" class="emTextInputShort">
+ <input type="hidden" name="lon" id="lon" value="{memberDetail.lon}" class="emTextInputShort">
+ </div>
+ <p>
+ <input type="submit" id="glm-estimate-location" value="Estimate map location from address above">
+ </p>
+ <div id="LeafletMapContainer" style="height: 400px; width: 100%;">(map loads here)</div>
+ <p>
+ MAP USE: Drag the pointer to the desired location for this {term.prop.norm}.
+ Use + and - buttons or the mouse wheel to zoom in or out.
+ Click and drag anywhere else on the map to move to another area.
+ </p>
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ {if:fieldRequired.phone}<th class="emRequiredInputField">{else:}<th>{end:}Main Phone #:</th>
+ {if:fieldFail.phone}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="phone" value="{memberDetail.phone}" class="emTextInput">
+ {if:fieldFail.phone}<p>{fieldFail.phone}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.email}<th class="emRequiredInputField">{else:}<th>{end:}E-Mail Address:</th>
+ {if:fieldFail.email}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="email" value="{memberDetail.email}" class="emTextInput">
+ {if:fieldFail.email}<p>{fieldFail.email}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.proc_email}<th class="emRequiredInputField">{else:}<th>{end:}Processing E-Mail Address:</th>
+ {if:fieldFail.proc_email}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="proc_email" value="{memberDetail.proc_email}" class="emTextInput">
+ {if:fieldFail.proc_email}<p>{fieldFail.proc_email}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.proc_email2}<th class="emRequiredInputField">{else:}<th>{end:}Secondary Processing E-Mail Address:</th>
+ {if:fieldFail.proc_email2}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="proc_email2" value="{memberDetail.proc_email2}" class="emTextInput">
+ {if:fieldFail.proc_email2}<p>{fieldFail.email}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Send Notice of Each Customer Purchase:</th>
+ <td>
+ {if:memberDetail.checkout_notify.value}
+ <input type="checkbox" name="checkout_notify" checked="yes">
+ {else:}
+ <input type="checkbox" name="checkout_notify">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.descr}<th class="emRequiredInputField">{else:}<th>{end:}Description:</th>
+ {if:fieldFail.descr}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="descr" id="descr">{memberDetail.descr:h}</textarea>
+ {if:fieldFail.descr}<br>{fieldFail.descr}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.cards_accepted}<th class="emRequiredInputField">{else:}<th>{end:}Credit Cards Accepted:</th>
+ {if:fieldFail.cards_accepted}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="cards_accepted[]" multiple>
+ {foreach:memberDetail.cards_accepted.bitmap,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.cards_accepted}<br>{fieldFail.cards_accepted}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.payment_gateway}<th class="emRequiredInputField">{else:}<th>{end:}Credit Card Payment Gateway:</th>
+ {if:fieldFail.payment_gateway}<td class="emBadInputField">{else:}<td>{end:}
+ <p>
+ <select name="payment_gateway" id="payment_gateway">
+ {foreach:memberDetail.payment_gateway.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </p>
+ {if:fieldFail.payment_gateway}<br>{fieldFail.payment_gateway}{end:}
+ <p>
+ <!-- These input fields depend on which payment gateway is selected - See jQuery section -->
+ <table class="emListTable">
+ <tr id="usePar1"><th><span id="gatewayPar1Name"></span></th><td><input type="text" name="gateway_par1" value="{memberDetail.gateway_par1}"><br></td></tr>
+ <tr id="usePar2"><th><span id="gatewayPar2Name"></span></th><td><input type="text" name="gateway_par2" value="{memberDetail.gateway_par2}"><br></td></tr>
+ <tr id="usePar3">
+ <th><span id="gatewayPar3Name"></span></th>
+ <td>
+ <select name="gateway_par3">
+ {foreach:memberDetail.gateway_par3.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </td>
+ </tr>
+ <tr id="usePar4">
+ <th><span id="gatewayPar4Name"></span></th>
+ <td>
+ {if:memberDetail.gateway_par4.value}
+ <input type="checkbox" name="gateway_par4" checked="yes">
+ {else:}
+ <input type="checkbox" name="gateway_par4">
+ {end:}
+
+ <tr id="usePar5"><th><span id="gatewayPar5Name"></span></th><td><input type="text" name="gateway_par5" value="{memberDetail.gateway_par5}"><br></td></tr>
+ </table>
+ </p>
+ <div id="gatewayMessage"></div>
+
+ </td>
+ </tr>
+ <tr>
+ <th>PayPal Payment Gateway:</th>
+ <td>
+ Enable PayPal Payment Gateway:
+ {if:memberDetail.paypal.value}
+ <input type="checkbox" name="paypal" checked="yes" disabled="disabled">
+ {else:}
+ <input type="checkbox" name="paypal" disabled="disabled">
+ {end:}
+ <br>(PayPal payment option is currently unavailable - Please contact Gaslight Media if you require this option)
+ <p>
+ <table class="emListTable" style="width: 95%;">
+ <tr><th>Client ID:</th><td><input type="text" name="paypal_client_id" value="{memberDetail.paypal_client_id}" style="width: 95%; font-size: 1em;"><br></td></tr>
+ <tr><th>Secret:</th><td><input type="text" name="paypal_secret" value="{memberDetail.paypal_secret}" style="width: 95%; font-size: 1em;"><br></td></tr>
+ <tr>
+ <th>Mode:</th>
+ <td>
+ <select name="paypal_mode">
+ {foreach:memberDetail.paypal_mode.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </td>
+ </tr>
+ </table>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.image}<th class="emRequiredInputField">{else:}<th>{end:}Image:</th>
+ {if:fieldFail.image}<td class="emBadInputField">{else:}<td>{end:}
+ {if:memberDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.image}">
+ <br>Delete this image: <input type="checkbox" name="image_delete">
+ {end:}
+ <input type="hidden" name="image" value="{storedDetail.image}">
+ <br>Upload or replace the image: <input type="file" name="image_new">
+ {if:fieldFail.image}<br>{fieldFail.image}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.parking_map}<th class="emRequiredInputField">{else:}<th>{end:}Parking Map:</th>
+ {if:fieldFail.parking_map}<td class="emBadInputField">{else:}<td>{end:}
+ {if:memberDetail.parking_map}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.parking_map}">
+ <br>Delete this image: <input type="checkbox" name="image_delete">
+ {end:}
+ <input type="hidden" name="parking_map" value="{storedDetail.parking_map}">
+ <br>Upload or replace the image: <input type="file" name="parking_map_new">
+ {if:fieldFail.parking_map}<br>{fieldFail.parking_map}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.ticket_sec_map}<th class="emRequiredInputField">{else:}<th>{end:}Section Map:</th>
+ {if:fieldFail.ticket_sec_map}<td class="emBadInputField">{else:}<td>{end:}
+ {if:memberDetail.ticket_sec_map}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.ticket_sec_map}">
+ <br>Delete this image: <input type="checkbox" name="ticket_sec_map_delete">
+ {end:}
+ <input type="hidden" name="ticket_sec_map" value="{storedDetail.image}">
+ <br>Upload or replace the image: <input type="file" name="ticket_sec_map_new">
+ {if:fieldFail.ticket_sec_map}<br>{fieldFail.ticket_sec_map}{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Accept Ticket Special Requests:</th>
+ <td>
+ {if:memberDetail.ticket_spec_req.value}
+ <input type="checkbox" name="ticket_spec_req" checked="yes">
+ {else:}
+ <input type="checkbox" name="ticket_spec_req">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>{term.prop.cap} Scans For:</th>
+ <td>
+ <div id="memberScansFor">
+ <p>When scanning packages, this {term.prop.cap} also scans for the following {term.prop.plur}.</p>
+ <p>
+ <select id="memberScansForSelect" name="memberScansForSelect">
+ <option value="">(select a {term.prop.norm}) </option>
+ {foreach:memberList,x}
+ <option
+ id="member_{x.id}"
+ value="{x.id}"
+ data-name="{x.name:h}"
+ >{x.name:h}</option>
+ {end:}
+ </select>
+ <input id="addMemberScansFor" type="submit" value="Add {term.prop.cap}" onClick="return false;">
+ </p>
+ <table style="width: 50%;" class="emListTable">
+ <thead>
+ <tr><th></th><th>{term.prop.cap}</th></tr>
+ </thead>
+ <tbody id="selectedMembers">
+ {foreach:memberScansFor,y}
+ <tr id="selectedMember_{y.scans_for}">
+ <td data-id="{y.scans_for}" class="emPseudoLink deleteMemberScansFor">X</td>
+ <td>{y.scans_for_name:h}<input type="hidden" name="selectedMember[{y.scans_for}]" value="{y.scans_for}"></td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ {if:option.accommodations}
+ <tr>
+ {if:fieldRequired.check_in}<th class="emRequiredInputField">{else:}<th>{end:}Check-In Time:</th>
+ {if:fieldFail.check_in}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="check_in_hour">
+ {foreach:memberDetail.check_in.time_list.hour,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ <select name="check_in_min">
+ {foreach:memberDetail.check_in.time_list.min,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ <select name="check_in_ampm">
+ {foreach:memberDetail.check_in.time_list.ampm,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.check_in}<p>{fieldFail.check_in}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.check_out}<th class="emRequiredInputField">{else:}<th>{end:}Check-Out Time:</th>
+ {if:fieldFail.check_out}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="check_out_hour">
+ {foreach:memberDetail.check_out.time_list.hour,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ <select name="check_out_min">
+ {foreach:memberDetail.check_out.time_list.min,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ <select name="check_out_ampm">
+ {foreach:memberDetail.check_out.time_list.ampm,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.check_out}<p>{fieldFail.check_out}</p>{end:}
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ {if:fieldRequired.intro_text}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Sales Intro Text:</th>
+ {if:fieldFail.intro_text}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="intro_text" id="intro_text">{memberDetail.intro_text:h}</textarea>
+ {if:fieldFail.intro_text}<br>{fieldFail.intro_text}{end:}
+ <p>This text is displayed at the top of the page when customers first enter the ticket sales system for one of your {term.performance.plur}.</p>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.checkout_email}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Sales Checkout E-Mail Sent:</th>
+ {if:fieldFail.checkout_email}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="checkout_email" id="checkout_email">{memberDetail.checkout_email:h}</textarea>
+ {if:fieldFail.checkout_email}<br>{fieldFail.checkout_email}{end:}
+ <p>This is the E-Mail message the system sends out to a customer when they complete a purchase for {term.performance.plur}.
+ You may use certain "tags" that will be replaced with relevant text. These begin with { and end with } characters.
+ the list of such terms you can use are below.</p>
+ <p>{first-name}, {last-name}, {address-line-1}, {address-line-2},
+ {city}, {state}, {zip}, {country}, {{term.prop.norm}-text}</p>
+ <p>The {{term.performance.norm}-text} tag will insert any text in the "Text for Confirmation E-Mail:" fields of
+ any {term.performance.plur} selected by the customer. If the customer selected a particular {term.performance.norm}
+ multiple times, that text will only be used once.</p>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.def_ticket_pol}<th class="emRequiredInputField">{else:}<th>{end:}General Policies:</th>
+ {if:fieldFail.def_ticket_pol}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="def_ticket_pol" id="def_ticket_pol">{memberDetail.def_ticket_pol:h}</textarea>
+ {if:fieldFail.def_ticket_pol}<br>{fieldFail.def_ticket_pol}{end:}
+ <p>This field does not permit formatting because it is used on {term.voucher.plur}.</p>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.sort}<th class="emRequiredInputField">{else:}<th>{end:}Output Order:</th>
+ {if:fieldFail.sort}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="sort" value="{memberDetail.sort:h}" class="textInputShort">
+ {if:fieldFail.sort}<br>{fieldFail.sort}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.notes}<th class="emRequiredInputField">{else:}<th>{end:}Notes:</th>
+ {if:fieldFail.notes}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="notes" id="notes">{memberDetail.notes:h}</textarea>
+ {if:fieldFail.notes}<br>{fieldFail.notes}{end:}
+ </td>
+ </tr>
+ {if:option.accommodations}
+ <tr>
+ <th>Accommodation Amenities:</th>
+ <td>
+ <p>
+ These are pre-defined accommodation amenitities for this {term.prop.norm}. You may also add additional accommodation
+ amenities to this {term.prop.norm} using the "Amenities" sub-menu button.
+ </p>
+ {if:memberDetail.amen_1.displayName}{if:memberDetail.amen_1.value}<input type="checkbox" name="amen_1" checked>{else:}<input type="checkbox" name="amen_1">{end:}{memberDetail.amen_1.displayName}<br>{end:}
+ {if:memberDetail.amen_2.displayName}{if:memberDetail.amen_2.value}<input type="checkbox" name="amen_2" checked>{else:}<input type="checkbox" name="amen_2">{end:}{memberDetail.amen_2.displayName}<br>{end:}
+ {if:memberDetail.amen_3.displayName}{if:memberDetail.amen_3.value}<input type="checkbox" name="amen_3" checked>{else:}<input type="checkbox" name="amen_3">{end:}{memberDetail.amen_3.displayName}<br>{end:}
+ {if:memberDetail.amen_4.displayName}{if:memberDetail.amen_4.value}<input type="checkbox" name="amen_4" checked>{else:}<input type="checkbox" name="amen_4">{end:}{memberDetail.amen_4.displayName}<br>{end:}
+ {if:memberDetail.amen_5.displayName}{if:memberDetail.amen_5.value}<input type="checkbox" name="amen_5" checked>{else:}<input type="checkbox" name="amen_5">{end:}{memberDetail.amen_5.displayName}<br>{end:}
+ {if:memberDetail.amen_6.displayName}{if:memberDetail.amen_6.value}<input type="checkbox" name="amen_6" checked>{else:}<input type="checkbox" name="amen_6">{end:}{memberDetail.amen_6.displayName}<br>{end:}
+ {if:memberDetail.amen_7.displayName}{if:memberDetail.amen_7.value}<input type="checkbox" name="amen_7" checked>{else:}<input type="checkbox" name="amen_7">{end:}{memberDetail.amen_7.displayName}<br>{end:}
+ {if:memberDetail.amen_8.displayName}{if:memberDetail.amen_8.value}<input type="checkbox" name="amen_8" checked>{else:}<input type="checkbox" name="amen_8">{end:}{memberDetail.amen_8.displayName}<br>{end:}
+ {if:memberDetail.amen_9.displayName}{if:memberDetail.amen_9.value}<input type="checkbox" name="amen_9" checked>{else:}<input type="checkbox" name="amen_9">{end:}{memberDetail.amen_9.displayName}<br>{end:}
+ {if:memberDetail.amen_10.displayName}{if:memberDetail.amen_10.value}<input type="checkbox" name="amen_10" checked>{else:}<input type="checkbox" name="amen_10">{end:}{memberDetail.amen_10.displayName}<br>{end:}
+ </td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ <div id="memberFormSubmit" class="submitKeepOnPage">
+ {if:addingNewMember}
+ <input type="submit" value="Add new {term.prop.cap}" class="emEditSubmit">
+ {end:}
+ {if:editingMember}
+ <input type="submit" value="Update {term.prop.cap}" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No {term.prop.norm} has been selected yet.</h2>
+ <p>To edit a {term.prop.norm}, first select it from the list of available {term.prop.plur}.</p>
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+</div> <!-- /emBlock -->
+
+
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ addingNewMember="addingNewMember"
+ editingMember="editingMember"
+ tabList="tabList"
+>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ /*
+ * Table operations
+ */
+
+ $('#MemberEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#memberForm').ajaxForm({
+ success: function(data) {
+// f_loadAction('Member_list', 'Main_container', 'MembersListOption=all&tabList={flex_tabList}');
+ if (flex_addingNewMember) {
+ f_replaceContents(data, $('#Member_selected_container'));
+ }
+ if (flex_editingMember) {
+ f_replaceContents(data, $('#Member_info_container'));
+ }
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#memberFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#descr"));
+ f_buildCkeditor($("#intro_text"));
+ f_buildCkeditor($("#checkout_email"));
+ f_buildCkeditor($("#notes"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ f_removeCkeditor($("#intro_text"));
+ f_removeCkeditor($("#checkout_email"));
+ f_removeCkeditor($("#notes"));
+ });
+
+
+
+ /*
+ * Map operations
+ */
+
+ var startLat = $('#lat').val();
+ var startLon = $('#lon').val();
+
+ var defZoom = Number(12);
+
+
+ /*
+ * Leaflet Map
+ * API reference: https://leafletjs.com/reference-1.3.2.html
+ */
+
+ function initMap() {
+
+ var leafletMap = L.map('LeafletMapContainer').setView([startLat, startLon], defZoom);
+ //var leafletTileServer = 'https://maps.gaslightmedia.com' + '{z}/{x}/{y}.png';
+ var leafletTileServer = 'https://maps.gaslightmedia.com/08172018-1720ec4ae0a3dea9189ce9d87f6c69e2/' + '{z}/{x}/{y}.png';
+ var leafletMinZoom = 5;
+ var leafletMaxZoom = 18;
+ var geocoder;
+
+ // Tile server
+ L.tileLayer(leafletTileServer, {
+ attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.gaslightmedia.com/">Gaslight Media</a>',
+ minZoom: leafletMinZoom,
+ maxZoom: leafletMaxZoom,
+ id: 'nothot'
+ }).addTo(leafletMap);
+
+ // Marker
+ var leafletMarker = L.marker([startLat, startLon], {
+ draggable: true
+ }).addTo(leafletMap);
+
+ // Marker Drag/Drop action
+ leafletMarker.on('dragend', function(event){
+ var marker = event.target;
+ var position = marker.getLatLng();
+
+ marker.setLatLng(new L.LatLng(position.lat, position.lng),{ draggable:'true' });
+ leafletMap.panTo(new L.LatLng(position.lat, position.lng))
+
+ // Assign it to the lat/lon fields for submission
+ $('#latat').val(position.lat.toFixed(6));
+ $('#lonng').val(position.lng.toFixed(6));
+ });
+
+ /*
+ * Use OpenStreetMaps Nominatim for Geolocation
+ */
+ var nominatimAPI = "https://nominatim.openstreetmap.org/search/";
+ var addressMapFail = 'Sorry, we were unable to get a map position from the address provided.';
+ $(document).on('click','#glm-estimate-location', function() {
+
+ var addrStreet = $('#addr1').val();
+ var addrCity = $('#city option:selected').text();
+ var addrState = $('#state').val();
+ var addrCountry = $('#country').val();
+ var addrZip = $('#zip').val();
+
+ var location = $.getJSON( nominatimAPI, {
+ format: 'json',
+ street: addrStreet,
+ city: addrCity,
+ state: addrState,
+ country: addrCountry,
+ postalcode: addrZip
+ })
+ .fail(function(data) {
+ alert(addressMapFail);
+ })
+ .done(function( data ) {
+ if( !data[0] || !data[0].lat || !data[0].lon ) {
+ // Not found, try again without city name
+ // Nominatim doesn't always find with the US ZIP preferred city name
+ var location = $.getJSON( nominatimAPI, {
+ format: 'json',
+ street: addrStreet,
+ // city: addrCity,
+ state: addrState,
+ country: addrCountry,
+ postalcode: addrZip
+ })
+ .fail(function(data) {
+ alert('Sorry, we had a communications failure. 2');
+ })
+ .done(function( data ) {
+ if( !data[0] || !data[0].lat || !data[0].lon ) {
+ alert(addressMapFail);
+ } else {
+ assignNewPosition(data);
+ alert('We were unable to match all of your address data but did find this location.\n\n' + data[0].display_name + '\n\nPlease check that it is correct and adjust as needed by dragging the map pointer.\nYou may also want to check the city selected in the address.');
+ }
+ });
+ } else {
+ assignNewPosition(data);
+ }
+ });
+
+ return false;
+
+ });
+
+ // Assign a position found by the Nominatim search above
+ function assignNewPosition(data) {
+
+ // Assign the new position to the hidden fields for submission
+ glmLat = Number(data[0].lat);
+ glmLng = Number(data[0].lon);
+ $('#lat').val(glmLat.toFixed(6));
+ $('#lon').val(glmLng.toFixed(6));
+
+ // Move map pointer to the proper location
+ leafletMarker.setLatLng(new L.LatLng(glmLat, glmLng),{ draggable:'true' });
+ leafletMap.panTo(new L.LatLng(glmLat, glmLng));
+
+ }
+
+ // Recenter when Update Poineter after entering Lat/Lon is clicked
+ $(document).on('click','#latLonRecenter', function() {
+ var glmLat = $('#glmLat').val();
+ var glmLng = $('#glmLng').val();
+ leafletMarker.setLatLng(new L.LatLng(glmLat, glmLng),{ draggable:'true' });
+ leafletMap.panTo(new L.LatLng(glmLat, glmLng));
+ });
+
+ }
+ initMap();
+
+
+
+ /*
+ * Payment Gateway fields selection
+ */
+
+ // Determine which payment gateway is selected and set prompts and visible fields accordingly
+ var gateway = $('#payment_gateway option:selected').val();
+ function setGatewayOptions(g) {
+ // Authorize.net
+ if (g == 1) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Login: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Key: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').show(duration);
+ $('#gatewayPar4Name').html('Merchant E-Mail Sent: ');
+ $('#usePar5').show(duration);
+ $('#gatewayPar5Name').html('Merchant E-Mail: ');
+ $('#gatewayMessage').html('Please provide a valid merchant Login and key for an active Authorize.net account then select an operating mode. Your credit card transactions will not be processed unless you select Production Mode.');
+ }
+ // Merchant Solutions
+ if (g == 2) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Account ID: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Merchant Pin: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ $('#gatewayMessage').html('For Production Mode please provide a valid Account ID and Merchant PIN for an active Merchant Solutions account then select an operating mode. Your credit card transactions will not be processed unless you select Production Mode.');
+ }
+ // Test
+ if (g == 99) {
+ $('#usePar1').hide(duration);
+ $('#gatewayPar1Name').html('');
+ $('#usePar2').hide(duration);
+ $('#gatewayPar2Name').html('');
+ $('#usePar3').hide(duration);
+ $('#gatewayPar3Name').html('');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ $('#gatewayMessage').html('<p><b>TEST MODE!</b></p>You have selected Card Processing Test. Cards will be checked for the number to match the selected cart type, but no actual transactions will take place. You may use this mode to conduct tests while waiting for a valid credit card gateway processing account.');
+ }
+ // None selected
+ if (g == 0) {
+ $('#usePar1').hide(duration);
+ $('#usePar2').hide(duration);
+ $('#usePar3').hide(duration);
+ $('#usePar4').hide(duration);
+ $('#usePar5').hide(duration);
+ $('#gatewayMessage').html('<p><b>THIS OPTION PERMITS CHECKOUT WITHOUT PAYMENT!</b></p>You may use this option to permit checkout where no payment is required or payment is completed outside of this system. All sales will be entered as if they had been paid, will be included in reports, and bar codes may be scanned.');
+ }
+ }
+ $('#payment_gateway').change( function() {
+ gateway = $('#payment_gateway option:selected').val();
+ setGatewayOptions(gateway);
+ });
+ setGatewayOptions(gateway);
+
+ f_restartOnTabSelect();
+
+
+ // Add selected member this member scans for
+ $('#addMemberScansFor').click( function() {
+
+ var membID = $('#memberScansForSelect').val();
+
+ // Check if this member is already selected
+ if (document.querySelector('#selectedMember_' + membID)) {
+ alert('Already added.');
+ return false;
+ };
+
+ // If we have a good member ID that hasn't been added, do it now
+ if (membID) {
+ var m = $('#member_' + membID);
+ var membName = m.attr('data-name');
+ $('#selectedMembers').append(' \
+ <tr id="selectedMember_' + membID + '"> \
+ <td><div data-id="' + membID + '" class="emPseudoLink deleteMemberScansFor">X</div></td> \
+ <td>' + membName + '<input type="hidden" name="selectedMember[' + membID + ']" value="' + membID + '"></td> \
+ </tr> \
+ ');
+ }
+ });
+
+ // Delete selected member
+ $( document ).on( "click", ".deleteMemberScansFor", function() {
+ var membID = $(this).attr('data-id');
+ $('#selectedMember_' + membID).remove();
+ });
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewMember}Adding New {term.prop.cap}{end:}
+ {if:editingMember}Editing {term.prop.cap}{end:}
+ </div>
+
+ <div class="emUsdTabs">
+{if:addingNewMember}
+ <div emTabId="Misc_blank" emContainerId="Member_selected_container" emTabParams="MembersListOption=all" emTabGroup="none" class="emTab emLink" style="float: right;">
+{else:}
+ <div emTabId="Member_detail" emContainerId="Member_info_container" emTabParams="" emTabGroup="none" class="emTab emLink" style="float: right;">
+{end:}
+ <div class="emTabName">Cancel</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+{if:formFail}
+ <div class="emNoticeHead">Please note:</div>
+ <ul class="emNotices">
+ <li class="emNotice">Not all fields were filled in correctly. Please try again.</li>
+ </ul>
+{end:}
+
+ <div class=".emForm">
+ {if:memberDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="memberForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewMember}<input type="hidden" name="Action" value="Member_insert">{end:}
+ {if:editingMember}<input type="hidden" name="Action" value="Member_update">{end:}
+
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+ <input type="hidden" name="tabList" value="{tabList}">
+ {if:checkPermission(#0#)}
+ {else:}
+ <input type="hidden" name="active" value="on">
+ {end:}
+
+ <div class="emListTableContainer">
+ <table id="MemberEditTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:option.member_db_integrated}
+ <tr>
+ <th>{term.prop.Cap} Name:</th>
+ <td>
+ {if:addingNewMember}
+ <select name="member_name">
+ {foreach:memberDetail.member_name.pick_list,m}
+ <option value="{m.value}" selected flexy:if="m.default">{m.name}</option>
+ <option value="{m.value}" flexy:if="!m.default">{m.name}</option>
+ {end:}
+ </select>
+ {else:}
+ {memberDetail.member_name:h}
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ {if:fieldRequired.name}<th class="emRequiredInputField">{else:}<th>{end:}{term.prop.cap} Name:</th>
+ {if:fieldFail.name}<td class="emBadInputField">{else:}<td>{end:}
+ {if:checkPermission(#0#)}
+ <input type="text" name="name" value="{memberDetail.name:h}" class="emTextInput">
+ {else:}
+ {memberDetail.name:h}<input type="hidden" name="name" value="{memberDetail.name:h}">
+ {end:}
+ {if:fieldFail.name}<br>{fieldFail.name}{end:}
+ </td>
+ </tr>
+ {if:option.member_db_integrated}
+ {else:}
+ {if:checkPermission(#0#)}
+ <tr>
+ {if:fieldRequired.member_type}<th class="emRequiredInputField">{else:}<th>{end:}{term.prop.cap} Type:</th>
+ {if:fieldFail.member_type}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="member_type">
+ {foreach:memberDetail.member_type.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.value} - {s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.value} - {s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.member_type}<br>{fieldFail.member_type}{end:}
+ </td>
+ </tr>
+ {else:}
+ <tr>
+ <th>{term.prop.cap} Type:</th>
+ <td>{memberDetail.member_type.name}</td>
+ </tr>
+ {end:}
+ {if:checkPermission(#0#)}
+ <tr>
+ <th>Account Active:</th>
+ <td>
+ {if:memberDetail.active.value}
+ <input type="checkbox" name="active" checked="yes">
+ {else:}
+ <input type="checkbox" name="active">
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ {if:fieldRequired.addr1}<th class="emRequiredInputField">{else:}<th>{end:}Address:</th>
+ {if:fieldFail.addr1}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="addr1" id="addr1" value="{memberDetail.addr1:h}" class="emTextInput">
+ {if:fieldFail.addr1}<br>{fieldFail.addr1}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.addr2}<th class="emRequiredInputField">{else:}<th>{end:} </th>
+ {if:fieldFail.addr2}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="addr2" id="addr2" value="{memberDetail.addr2:h}" class="emTextInput">
+ {if:fieldFail.addr2}<br>{fieldFail.addr2}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.city}<th class="emRequiredInputField">{else:}<th>{end:}City:</th>
+ {if:fieldFail.city}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="city" id="city" value="{memberDetail.city:h}" class="emTextInput">
+ {if:fieldFail.city}<br>{fieldFail.city}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.state}<th class="emRequiredInputField">{else:}<th>{end:}State:</th>
+ {if:fieldFail.state}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="state">
+ <option value=""> </option>
+ {foreach:memberDetail.state.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.state}<br>{fieldFail.state}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.zip}<th class="emRequiredInputField">{else:}<th>{end:}ZIP/Postal Code:</th>
+ {if:fieldFail.zip}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="zip" id="zip" value="{memberDetail.zip}" class="emTextInputShort">
+ {if:fieldFail.zip}<br>{fieldFail.zip}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.country}<th class="emRequiredInputField">{else:}<th>{end:}Country:</th>
+ {if:fieldFail.country}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="country">
+ <option value=""> </option>
+ {foreach:memberDetail.country.list,c}
+ {if:c.default}
+ <option value="{c.value}" SELECTED>{c.name}</option>
+ {else:}
+ <option value="{c.value}">{c.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.country}<br>{fieldFail.country}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.lat}<th class="emRequiredInputField">{else:}<th>{end:}Location:</th>
+ <td>
+ <div>
+ <input type="hidden" name="lat" id="lat" value="{memberDetail.lat}" class="emTextInputShort">
+ <input type="hidden" name="lon" id="lon" value="{memberDetail.lon}" class="emTextInputShort">
+ </div>
+ <p>
+ This map will try to find the new location whenever you change the address entered above.
+ </p>
+ <div id="locationMap" class="emMapWindowEdit">(map loads here)</div>
+ <p>
+ MAP USE: Drag the pointer to the desired location for this {term.prop.norm}.
+ Use + and - buttons or the mouse wheel to zoom in or out.
+ Click and drag anywhere else on the map to move to another area.
+ </p>
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ {if:fieldRequired.phone}<th class="emRequiredInputField">{else:}<th>{end:}Main Phone #:</th>
+ {if:fieldFail.phone}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="phone" value="{memberDetail.phone}" class="emTextInput">
+ {if:fieldFail.phone}<p>{fieldFail.phone}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.email}<th class="emRequiredInputField">{else:}<th>{end:}E-Mail Address:</th>
+ {if:fieldFail.email}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="email" value="{memberDetail.email}" class="emTextInput">
+ {if:fieldFail.email}<p>{fieldFail.email}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.proc_email}<th class="emRequiredInputField">{else:}<th>{end:}Processing E-Mail Address:</th>
+ {if:fieldFail.proc_email}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="proc_email" value="{memberDetail.proc_email}" class="emTextInput">
+ {if:fieldFail.proc_email}<p>{fieldFail.proc_email}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.proc_email2}<th class="emRequiredInputField">{else:}<th>{end:}Secondary Processing E-Mail Address:</th>
+ {if:fieldFail.proc_email2}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="proc_email2" value="{memberDetail.proc_email2}" class="emTextInput">
+ {if:fieldFail.proc_email2}<p>{fieldFail.email}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Send Notice of Each Customer Purchase:</th>
+ <td>
+ {if:memberDetail.checkout_notify.value}
+ <input type="checkbox" name="checkout_notify" checked="yes">
+ {else:}
+ <input type="checkbox" name="checkout_notify">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.descr}<th class="emRequiredInputField">{else:}<th>{end:}Description:</th>
+ {if:fieldFail.descr}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="descr" id="descr">{memberDetail.descr:h}</textarea>
+ {if:fieldFail.descr}<br>{fieldFail.descr}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.cards_accepted}<th class="emRequiredInputField">{else:}<th>{end:}Credit Cards Accepted:</th>
+ {if:fieldFail.cards_accepted}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="cards_accepted[]" multiple>
+ {foreach:memberDetail.cards_accepted.bitmap,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.cards_accepted}<br>{fieldFail.cards_accepted}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.payment_gateway}<th class="emRequiredInputField">{else:}<th>{end:}Credit Card Payment Gateway:</th>
+ {if:fieldFail.payment_gateway}<td class="emBadInputField">{else:}<td>{end:}
+ <p>
+ <select name="payment_gateway" id="payment_gateway">
+ {foreach:memberDetail.payment_gateway.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </p>
+ {if:fieldFail.payment_gateway}<br>{fieldFail.payment_gateway}{end:}
+ <p>
+ <!-- These input fields depend on which payment gateway is selected - See jQuery section -->
+ <table class="emListTable">
+ <tr id="usePar1"><th><span id="gatewayPar1Name"></span></th><td><input type="text" name="gateway_par1" value="{memberDetail.gateway_par1}"><br></td></tr>
+ <tr id="usePar2"><th><span id="gatewayPar2Name"></span></th><td><input type="text" name="gateway_par2" value="{memberDetail.gateway_par2}"><br></td></tr>
+ <tr id="usePar3">
+ <th><span id="gatewayPar3Name"></span></th>
+ <td>
+ <select name="gateway_par3">
+ {foreach:memberDetail.gateway_par3.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </td>
+ </tr>
+ <tr id="usePar4">
+ <th><span id="gatewayPar4Name"></span></th>
+ <td>
+ {if:memberDetail.gateway_par4.value}
+ <input type="checkbox" name="gateway_par4" checked="yes">
+ {else:}
+ <input type="checkbox" name="gateway_par4">
+ {end:}
+
+ <tr id="usePar5"><th><span id="gatewayPar5Name"></span></th><td><input type="text" name="gateway_par5" value="{memberDetail.gateway_par5}"><br></td></tr>
+ </table>
+ </p>
+ <div id="gatewayMessage"></div>
+
+ </td>
+ </tr>
+ <tr>
+ <th>PayPal Payment Gateway:</th>
+ <td>
+ Enable PayPal Payment Gateway:
+ {if:memberDetail.paypal.value}
+ <input type="checkbox" name="paypal" checked="yes" disabled="disabled">
+ {else:}
+ <input type="checkbox" name="paypal" disabled="disabled">
+ {end:}
+ <br>(PayPal payment option is currently unavailable - Please contact Gaslight Media if you require this option)
+ <p>
+ <table class="emListTable" style="width: 95%;">
+ <tr><th>Client ID:</th><td><input type="text" name="paypal_client_id" value="{memberDetail.paypal_client_id}" style="width: 95%; font-size: 1em;"><br></td></tr>
+ <tr><th>Secret:</th><td><input type="text" name="paypal_secret" value="{memberDetail.paypal_secret}" style="width: 95%; font-size: 1em;"><br></td></tr>
+ <tr>
+ <th>Mode:</th>
+ <td>
+ <select name="paypal_mode">
+ {foreach:memberDetail.paypal_mode.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </td>
+ </tr>
+ </table>
+ </p>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.image}<th class="emRequiredInputField">{else:}<th>{end:}Image:</th>
+ {if:fieldFail.image}<td class="emBadInputField">{else:}<td>{end:}
+ {if:memberDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.image}">
+ <br>Delete this image: <input type="checkbox" name="image_delete">
+ {end:}
+ <input type="hidden" name="image" value="{storedDetail.image}">
+ <br>Upload or replace the image: <input type="file" name="image_new">
+ {if:fieldFail.image}<br>{fieldFail.image}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.parking_map}<th class="emRequiredInputField">{else:}<th>{end:}Parking Map:</th>
+ {if:fieldFail.parking_map}<td class="emBadInputField">{else:}<td>{end:}
+ {if:memberDetail.parking_map}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.parking_map}">
+ <br>Delete this image: <input type="checkbox" name="image_delete">
+ {end:}
+ <input type="hidden" name="parking_map" value="{storedDetail.parking_map}">
+ <br>Upload or replace the image: <input type="file" name="parking_map_new">
+ {if:fieldFail.parking_map}<br>{fieldFail.parking_map}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.ticket_sec_map}<th class="emRequiredInputField">{else:}<th>{end:}Section Map:</th>
+ {if:fieldFail.ticket_sec_map}<td class="emBadInputField">{else:}<td>{end:}
+ {if:memberDetail.ticket_sec_map}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{memberDetail.ticket_sec_map}">
+ <br>Delete this image: <input type="checkbox" name="ticket_sec_map_delete">
+ {end:}
+ <input type="hidden" name="ticket_sec_map" value="{storedDetail.image}">
+ <br>Upload or replace the image: <input type="file" name="ticket_sec_map_new">
+ {if:fieldFail.ticket_sec_map}<br>{fieldFail.ticket_sec_map}{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Accept Ticket Special Requests:</th>
+ <td>
+ {if:memberDetail.ticket_spec_req.value}
+ <input type="checkbox" name="ticket_spec_req" checked="yes">
+ {else:}
+ <input type="checkbox" name="ticket_spec_req">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>{term.prop.cap} Scans For:</th>
+ <td>
+ <div id="memberScansFor">
+ <p>When scanning packages, this {term.prop.cap} also scans for the following {term.prop.plur}.</p>
+ <p>
+ <select id="memberScansForSelect" name="memberScansForSelect">
+ <option value="">(select a {term.prop.norm}) </option>
+ {foreach:memberList,x}
+ <option
+ id="member_{x.id}"
+ value="{x.id}"
+ data-name="{x.name:h}"
+ >{x.name:h}</option>
+ {end:}
+ </select>
+ <input id="addMemberScansFor" type="submit" value="Add {term.prop.cap}" onClick="return false;">
+ </p>
+ <table style="width: 50%;" class="emListTable">
+ <thead>
+ <tr><th></th><th>{term.prop.cap}</th></tr>
+ </thead>
+ <tbody id="selectedMembers">
+ {foreach:memberScansFor,y}
+ <tr id="selectedMember_{y.scans_for}">
+ <td data-id="{y.scans_for}" class="emPseudoLink deleteMemberScansFor">X</td>
+ <td>{y.scans_for_name:h}<input type="hidden" name="selectedMember[{y.scans_for}]" value="{y.scans_for}"></td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ {if:option.accommodations}
+ <tr>
+ {if:fieldRequired.check_in}<th class="emRequiredInputField">{else:}<th>{end:}Check-In Time:</th>
+ {if:fieldFail.check_in}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="check_in_hour">
+ {foreach:memberDetail.check_in.time_list.hour,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ <select name="check_in_min">
+ {foreach:memberDetail.check_in.time_list.min,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ <select name="check_in_ampm">
+ {foreach:memberDetail.check_in.time_list.ampm,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.check_in}<p>{fieldFail.check_in}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.check_out}<th class="emRequiredInputField">{else:}<th>{end:}Check-Out Time:</th>
+ {if:fieldFail.check_out}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="check_out_hour">
+ {foreach:memberDetail.check_out.time_list.hour,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ <select name="check_out_min">
+ {foreach:memberDetail.check_out.time_list.min,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ <select name="check_out_ampm">
+ {foreach:memberDetail.check_out.time_list.ampm,th}
+ {if:th.default}
+ <option value="{th.value}" SELECTED>{th.name}</option>
+ {else:}
+ <option value="{th.value}">{th.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.check_out}<p>{fieldFail.check_out}</p>{end:}
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ {if:fieldRequired.intro_text}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Sales Intro Text:</th>
+ {if:fieldFail.intro_text}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="intro_text" id="intro_text">{memberDetail.intro_text:h}</textarea>
+ {if:fieldFail.intro_text}<br>{fieldFail.intro_text}{end:}
+ <p>This text is displayed at the top of the page when customers first enter the ticket sales system for one of your {term.performance.plur}.</p>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.checkout_email}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Sales Checkout E-Mail Sent:</th>
+ {if:fieldFail.checkout_email}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="checkout_email" id="checkout_email">{memberDetail.checkout_email:h}</textarea>
+ {if:fieldFail.checkout_email}<br>{fieldFail.checkout_email}{end:}
+ <p>This is the E-Mail message the system sends out to a customer when they complete a purchase for {term.performance.plur}.
+ You may use certain "tags" that will be replaced with relevant text. These begin with { and end with } characters.
+ the list of such terms you can use are below.</p>
+ <p>{first-name}, {last-name}, {address-line-1}, {address-line-2},
+ {city}, {state}, {zip}, {country}, {{term.prop.norm}-text}</p>
+ <p>The {{term.performance.norm}-text} tag will insert any text in the "Text for Confirmation E-Mail:" fields of
+ any {term.performance.plur} selected by the customer. If the customer selected a particular {term.performance.norm}
+ multiple times, that text will only be used once.</p>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.def_ticket_pol}<th class="emRequiredInputField">{else:}<th>{end:}General Policies:</th>
+ {if:fieldFail.def_ticket_pol}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="def_ticket_pol" id="def_ticket_pol">{memberDetail.def_ticket_pol:h}</textarea>
+ {if:fieldFail.def_ticket_pol}<br>{fieldFail.def_ticket_pol}{end:}
+ <p>This field does not permit formatting because it is used on {term.voucher.plur}.</p>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.sort}<th class="emRequiredInputField">{else:}<th>{end:}Output Order:</th>
+ {if:fieldFail.sort}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="sort" value="{memberDetail.sort:h}" class="textInputShort">
+ {if:fieldFail.sort}<br>{fieldFail.sort}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.notes}<th class="emRequiredInputField">{else:}<th>{end:}Notes:</th>
+ {if:fieldFail.notes}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="notes" id="notes">{memberDetail.notes:h}</textarea>
+ {if:fieldFail.notes}<br>{fieldFail.notes}{end:}
+ </td>
+ </tr>
+ {if:option.accommodations}
+ <tr>
+ <th>Accommodation Amenities:</th>
+ <td>
+ <p>
+ These are pre-defined accommodation amenitities for this {term.prop.norm}. You may also add additional accommodation
+ amenities to this {term.prop.norm} using the "Amenities" sub-menu button.
+ </p>
+ {if:memberDetail.amen_1.displayName}{if:memberDetail.amen_1.value}<input type="checkbox" name="amen_1" checked>{else:}<input type="checkbox" name="amen_1">{end:}{memberDetail.amen_1.displayName}<br>{end:}
+ {if:memberDetail.amen_2.displayName}{if:memberDetail.amen_2.value}<input type="checkbox" name="amen_2" checked>{else:}<input type="checkbox" name="amen_2">{end:}{memberDetail.amen_2.displayName}<br>{end:}
+ {if:memberDetail.amen_3.displayName}{if:memberDetail.amen_3.value}<input type="checkbox" name="amen_3" checked>{else:}<input type="checkbox" name="amen_3">{end:}{memberDetail.amen_3.displayName}<br>{end:}
+ {if:memberDetail.amen_4.displayName}{if:memberDetail.amen_4.value}<input type="checkbox" name="amen_4" checked>{else:}<input type="checkbox" name="amen_4">{end:}{memberDetail.amen_4.displayName}<br>{end:}
+ {if:memberDetail.amen_5.displayName}{if:memberDetail.amen_5.value}<input type="checkbox" name="amen_5" checked>{else:}<input type="checkbox" name="amen_5">{end:}{memberDetail.amen_5.displayName}<br>{end:}
+ {if:memberDetail.amen_6.displayName}{if:memberDetail.amen_6.value}<input type="checkbox" name="amen_6" checked>{else:}<input type="checkbox" name="amen_6">{end:}{memberDetail.amen_6.displayName}<br>{end:}
+ {if:memberDetail.amen_7.displayName}{if:memberDetail.amen_7.value}<input type="checkbox" name="amen_7" checked>{else:}<input type="checkbox" name="amen_7">{end:}{memberDetail.amen_7.displayName}<br>{end:}
+ {if:memberDetail.amen_8.displayName}{if:memberDetail.amen_8.value}<input type="checkbox" name="amen_8" checked>{else:}<input type="checkbox" name="amen_8">{end:}{memberDetail.amen_8.displayName}<br>{end:}
+ {if:memberDetail.amen_9.displayName}{if:memberDetail.amen_9.value}<input type="checkbox" name="amen_9" checked>{else:}<input type="checkbox" name="amen_9">{end:}{memberDetail.amen_9.displayName}<br>{end:}
+ {if:memberDetail.amen_10.displayName}{if:memberDetail.amen_10.value}<input type="checkbox" name="amen_10" checked>{else:}<input type="checkbox" name="amen_10">{end:}{memberDetail.amen_10.displayName}<br>{end:}
+ </td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ <div id="memberFormSubmit" class="submitKeepOnPage">
+ {if:addingNewMember}
+ <input type="submit" value="Add new {term.prop.cap}" class="emEditSubmit">
+ {end:}
+ {if:editingMember}
+ <input type="submit" value="Update {term.prop.cap}" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No {term.prop.norm} has been selected yet.</h2>
+ <p>To edit a {term.prop.norm}, first select it from the list of available {term.prop.plur}.</p>
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+</div> <!-- /emBlock -->
+
+
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ addingNewMember="addingNewMember"
+ editingMember="editingMember"
+ tabList="tabList"
+>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ /*
+ * Table operations
+ */
+
+ $('#MemberEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#memberForm').ajaxForm({
+ success: function(data) {
+// f_loadAction('Member_list', 'Main_container', 'MembersListOption=all&tabList={flex_tabList}');
+ if (flex_addingNewMember) {
+ f_replaceContents(data, $('#Member_selected_container'));
+ }
+ if (flex_editingMember) {
+ f_replaceContents(data, $('#Member_info_container'));
+ }
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#memberFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#descr"));
+ f_buildCkeditor($("#intro_text"));
+ f_buildCkeditor($("#checkout_email"));
+ f_buildCkeditor($("#notes"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ f_removeCkeditor($("#intro_text"));
+ f_removeCkeditor($("#checkout_email"));
+ f_removeCkeditor($("#notes"));
+ });
+
+ /*
+ * Map operations
+ */
+
+ // Code to kick off the geolocation-edit feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ address: [
+ "#addr1",
+ "#city",
+ "#zip"
+ ],
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 16
+ },
+ markerOptions: {
+ title: "This is your selected location"
+ }
+ });
+
+ /*
+ * Payment Gateway fields selection
+ */
+
+ // Determine which payment gateway is selected and set prompts and visible fields accordingly
+ var gateway = $('#payment_gateway option:selected').val();
+ function setGatewayOptions(g) {
+ // Authorize.net
+ if (g == 1) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Login: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Key: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').show(duration);
+ $('#gatewayPar4Name').html('Merchant E-Mail Sent: ');
+ $('#usePar5').show(duration);
+ $('#gatewayPar5Name').html('Merchant E-Mail: ');
+ $('#gatewayMessage').html('Please provide a valid merchant Login and key for an active Authorize.net account then select an operating mode. Your credit card transactions will not be processed unless you select Production Mode.');
+ }
+ // Merchant Solutions
+ if (g == 2) {
+ $('#usePar1').show(duration);
+ $('#gatewayPar1Name').html('Account ID: ');
+ $('#usePar2').show(duration);
+ $('#gatewayPar2Name').html('Merchant Pin: ');
+ $('#usePar3').show(duration);
+ $('#gatewayPar3Name').html('Mode: ');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ $('#gatewayMessage').html('For Production Mode please provide a valid Account ID and Merchant PIN for an active Merchant Solutions account then select an operating mode. Your credit card transactions will not be processed unless you select Production Mode.');
+ }
+ // Test
+ if (g == 99) {
+ $('#usePar1').hide(duration);
+ $('#gatewayPar1Name').html('');
+ $('#usePar2').hide(duration);
+ $('#gatewayPar2Name').html('');
+ $('#usePar3').hide(duration);
+ $('#gatewayPar3Name').html('');
+ $('#usePar4').hide(duration);
+ $('#gatewayPar4Name').html('');
+ $('#usePar5').hide(duration);
+ $('#gatewayPar5Name').html('');
+ $('#gatewayMessage').html('<p><b>TEST MODE!</b></p>You have selected Card Processing Test. Cards will be checked for the number to match the selected cart type, but no actual transactions will take place. You may use this mode to conduct tests while waiting for a valid credit card gateway processing account.');
+ }
+ // None selected
+ if (g == 0) {
+ $('#usePar1').hide(duration);
+ $('#usePar2').hide(duration);
+ $('#usePar3').hide(duration);
+ $('#usePar4').hide(duration);
+ $('#usePar5').hide(duration);
+ $('#gatewayMessage').html('<p><b>THIS OPTION PERMITS CHECKOUT WITHOUT PAYMENT!</b></p>You may use this option to permit checkout where no payment is required or payment is completed outside of this system. All sales will be entered as if they had been paid, will be included in reports, and bar codes may be scanned.');
+ }
+ }
+ $('#payment_gateway').change( function() {
+ gateway = $('#payment_gateway option:selected').val();
+ setGatewayOptions(gateway);
+ });
+ setGatewayOptions(gateway);
+
+ f_restartOnTabSelect();
+
+
+ // Add selected member this member scans for
+ $('#addMemberScansFor').click( function() {
+
+ var membID = $('#memberScansForSelect').val();
+
+ // Check if this member is already selected
+ if (document.querySelector('#selectedMember_' + membID)) {
+ alert('Already added.');
+ return false;
+ };
+
+ // If we have a good member ID that hasn't been added, do it now
+ if (membID) {
+ var m = $('#member_' + membID);
+ var membName = m.attr('data-name');
+ $('#selectedMembers').append(' \
+ <tr id="selectedMember_' + membID + '"> \
+ <td><div data-id="' + membID + '" class="emPseudoLink deleteMemberScansFor">X</div></td> \
+ <td>' + membName + '<input type="hidden" name="selectedMember[' + membID + ']" value="' + membID + '"></td> \
+ </tr> \
+ ');
+ }
+ });
+
+ // Delete selected member
+ $( document ).on( "click", ".deleteMemberScansFor", function() {
+ var membID = $(this).attr('data-id');
+ $('#selectedMember_' + membID).remove();
+ });
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Venues status/selection/addition -->\r
+<div class="emBlock">\r
+ \r
+ <!-- \r
+ Sub Tabs\r
+ -->\r
+{if:checkPermission(#10#)} \r
+ <div class="emSubTabs">\r
+ <div flexy:if="!blockTab.Member_stats" emTabId="Member_stats" emContainerId="Member_container" emTabGroup="VenueTabs" class="emTab VenueTabs emLink emTabSelected ">\r
+ <div class="emTabName">{term.prop.plur_cap} Summary</div>\r
+ </div>\r
+ <div flexy:if="!blockTab.Member_list" emTabId="Member_list" emContainerId="Member_container" emTabParams="MembersListOption=all" emTabGroup="VenueTabs" class="emTab VenueTabs emLink">\r
+ <div class="emTabName">Select a {term.prop.cap}</div>\r
+ </div>\r
+ </div> <!-- emSubTabs -->\r
+{end:}\r
+ \r
+ <div id="Member_container" class="emContentArea emSlider">\r
+ </div> <!-- EMcontentArea -->\r
+ \r
+</div> <!-- emBlock -->\r
+\r
+\r
+{startScript:h}\r
+ \r
+ // jQuery Section\r
+ $(document).ready(function(){\r
+ \r
+ $('#Member_selected').hide(duration);\r
+ \r
+ // Start with member stats loaded\r
+ f_loadAction('Member_stats', 'Member_container', 'tabList={tabList}');\r
+ \r
+ f_restartOnTabSelect();\r
+ \r
+ });\r
+\r
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Member List -->
+<div class="emBlock">
+
+ <div id="Member_container" class="emSliderClosed">
+
+ <!--
+ Sub Tabs
+ -->
+ <div class="emUsdTabs">
+{if:checkPermission(#0#)}
+ <div flexy:if="!blockTab.Member_add" emTabId="Member_add" emContainerId="Member_selected_container" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Add a {term.prop.cap}</div>
+ </div>
+{end:}
+ <div class="emTab emLink" style="float: right;">
+ <div id="memberListSizeChange">Larger Table</div>
+ </div>
+ </div> <!-- emSubTabs -->
+ Search {term.prop.cap}: <input type="text" id="membersSearch" name="membersSearchField"> (type any portion of a {term.prop.norm} name)
+
+ {if:membersList}
+ <div id="MemberListTable_wrapper" class="emListTableContainer">
+ <table id="MemberListTable" class="emListTable">
+ <thead>
+ <tr><th>Sort</th><th>Name</th><th>Type</th><th>City</th><th>Phone</th></tr>
+ </thead>
+ <tbody>
+ {foreach:membersList,m}
+ <tr>
+ <td>{m.sort}</td>
+ <td emMembId="{m.id}" class="emLink memberListSelect">{m.name:h}</td>
+ <td emMembId="{m.id}" class="emLink memberListSelect">{m.member_type.name:h}</td>
+ <td emMembId="{m.id}" class="emLink memberListSelect">{m.city}</td>
+ <td emMembId="{m.id}" class="emLink memberListSelect">{m.phone}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+ {else:}
+ <p>No {term.prop.plur} are currently listed.</p>
+ <p>You will need to add at least one to use this system.</p>
+ {end:}
+
+
+ <div id="Member_selected_container" class="emSliderClosed">
+ </div>
+
+ </div>
+
+</div> <!-- emBlock -->
+
+{startScript:h}
+
+ // Members Search
+ var membersSearchData = [
+ {foreach:membersList,m}
+ {label:'{m.name:h}, {m.member_type.nameEsc:h}, {m.city:h}, {m.phone}', value:'{m.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var MemberListTable = $('#MemberListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+ $(window).resize(function(){
+ MemberListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var MemberListTableSmall = true;
+ var MemberListTableHeight = $('#MemberListTable_wrapper div.dataTables_scrollBody').height();
+ $('#memberListSizeChange').click(function() {
+ if (MemberListTableSmall) {
+ $('#MemberListTable_wrapper div.dataTables_scrollBody').height('auto');
+ MemberListTableSmall = false;
+ $(this).html('Smaller Table');
+ MemberListTable.fnSettings().oScroll.sY = '100%';
+ MemberListTable.fnDraw();
+ } else {
+ $('#MemberListTable_wrapper div.dataTables_scrollBody').height(MemberListTableHeight);
+ MemberListTableSmall = true;
+ $(this).html('Larger Table');
+ MemberListTable.fnSettings().oScroll.sY = '100px';
+ MemberListTable.fnDraw();
+ }
+ });
+
+ $('.memberListSelect').click(function(){
+ $('#MemberListTable_wrapper div.dataTables_scrollBody').height(MemberListTableHeight);
+ MemberListTableSmall = true;
+ $('#memberListSizeChange').html('Larger Table');
+ MemberListTable.fnSettings().oScroll.sY = '100px';
+ MemberListTable.fnDraw();
+ f_loadAction('Member_selected', 'Member_selected_container', 'MemberID=' + $(this).attr('emMembId') + '&tabList={tabList}');
+ });
+
+ // Search Members
+ $("#membersSearch").autocomplete({
+ source: membersSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#membersSearch").attr({value: ui.item.label});
+ f_loadAction('Member_selected', 'Member_selected_container', 'MemberID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ {if:displayMember}
+ f_loadAction('Member_selected', 'Member_selected_container', 'MemberID={displayMember}&tabList={tabList}');
+ {end:}
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+ Reloading...
+</div> <!-- /emBlock -->
+
+
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ memberID="memberDetail.id"
+>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ f_loadAction('Member_list', 'Main_container', 'MembersListOption=all&memberID=' + flex_memberID + '&tabList={flex_tabList}');
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<div class="emBlock">
+
+ <div style="float: left;">
+ <div class="emBlockName">{term.prop.cap}: {memberDetail.name:h}</div>
+
+<!--
+ <div class="emListTableContainerLeft">
+ <table id="MemberSelectedStatsTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr><th>Total contacts: </th><td>{memberStats.contact}</td></tr>
+ {if:option.accommodations}
+ <tr><th>Total {term.unit.plur_cap}: </th><td>{memberStats.accom}</td></tr>
+ <tr><th>Total {term.unit.cap} inventory: </th><td>{memberStats.inven}</td></tr>
+ {end:}
+ {if:option.tickets}
+ <tr><th>Total {term.section.plur_cap}: </th><td>{memberStats.section}</td></tr>
+ <tr><th>Total {term.performance.plur_cap}: </th><td>{memberStats.performance}</td></tr>
+ <tr><th>Total {term.ticket.plur_cap}: </th><td>{memberStats.ticket}</td></tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+ -->
+ </div>
+
+<!--
+ <div style="float: right;">
+ {if:memberStats.flag}
+ <div class="emNoticeHead">Please note:</div>
+ <ul class="emNotices">
+ {if:memberStats.flags.noContacts}
+ <li class="emNotice">This {term.prop.norm} has no contacts.</li>
+ {end:}
+ {if:option.accommodations}
+ {if:memberStats.flags.noAccoms}
+ <li class="emNotice">This {term.prop.norm} has no {term.unit.plur}.</li>
+ {end:}
+ {if:memberStats.flags.noInven}
+ <li class="emNotice">This {term.prop.norm} has no {term.unit.norm} inventory.</li>
+ {end:}
+ {end:}
+ {if:option.tickets}
+ {if:memberStats.flags.noSections}
+ <li class="emNotice">This {term.prop.norm} has no {term.section.plur}.</li>
+ {end:}
+ {if:memberStats.flags.noPerformances}
+ <li class="emNotice">This {term.prop.norm} has no {term.performance.plur}.</li>
+ {end:}
+ {if:memberStats.flags.noTickets}
+ <li class="emNotice">This {term.prop.norm} has no {term.ticket.plur}.</li>
+ {end:}
+
+ <li class="emNotice">Need to add check for inventory also.</li>
+
+ {end:}
+ </ul>
+ {end:}
+ </div>
+ -->
+
+ <div class="emBlock">
+
+ <!--
+ Sub Tabs
+ -->
+{if:checkPermission(#10#)}
+ <div class="emSubTabs">
+ <div flexy:if="!blockTab.Member_detail" id="Member_detail" emTabId="Member_detail" emContainerId="Member_info_container" emTabParams="tabList={tabList}" emTabGroup="MemberTabs" class="emTab MemberTabs emLink emTabSelected">
+ <div class="emTabName">{term.prop.cap} Detail</div>
+ </div>
+ <div flexy:if="!blockTab.Contact_list" id="Contact_list" emTabId="Contact_list" emContainerId="Member_info_container" emTabParams="ContactsListOption=member&tabList={tabList}" emTabGroup="MemberTabs" class="emTab MemberTabs emLink">
+ <div class="emTabName">{term.contact.plur_cap}</div>
+ </div>
+ {if:option.accommodations}
+ <div flexy:if="!blockTab.Accommodation_list" id="Accommodation_list" emTabId="Accommodation_list" emContainerId="Member_info_container" emTabParams="tabList={tabList}" emTabGroup="MemberTabs" class="emTab MemberTabs emLink">
+ <div class="emTabName">{term.unit.plur_cap}</div>
+ </div>
+ {end:}
+ {if:option.tickets}
+ <div flexy:if="!blockTab.Entrance_list" id="Entrance_list" emTabId="Entrance_list" emContainerId="Member_info_container" emTabParams="tabList={tabList}" emTabGroup="MemberTabs" class="emTab MemberTabs emLink">
+ <div class="emTabName">{term.entrance.plur_cap}</div>
+ </div>
+ <div flexy:if="!blockTab.Section_list" id="Section_list" emTabId="Section_list" emContainerId="Member_info_container" emTabParams="tabList={tabList}" emTabGroup="MemberTabs" class="emTab MemberTabs emLink">
+ <div class="emTabName">{term.section.plur_cap}</div>
+ </div>
+ {if:blockTab.Performance_selected}
+ {else:}
+ {if:checkPermission(#0#)}
+ {if:noTab.performance}{else:}
+ <div flexy:if="!blockTab.Performance_list" id="Performance_list" emTabId="Performance_list" emContainerId="Member_info_container" emTabParams="tabList={tabList}" emTabGroup="MemberTabs" class="emTab MemberTabs emLink">
+ <div class="emTabName">{term.performance.plur_cap}</div>
+ </div>
+ {end:}
+ {end:}
+ {end:}
+ {end:}
+ </div> <!-- emSubTabs -->
+{end:}
+
+ <!--
+ Content Areas
+ -->
+ <div id="Member_info_container" class="emContentArea emSlider">
+ </div>
+
+ </div> <!-- emBlock -->
+
+</div> <!-- emBlock -->
+
+
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ var x = $('#MemberSelectedStatsTable').dataTable({
+ "sScrollY": "100px",
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ // Close all local sliders
+ $('#Member_info_container').hide(duration);
+
+ // Start with member detail loaded
+ f_loadAction('Member_detail', 'Member_info_container', "tabList={tabList}");
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">\r
+ <div style="float: left;">\r
+ <div class="emBlockName">Statistics for all {term.prop.plur}</div>\r
+ <div class="emListTableContainerLeft">\r
+ <table id="MemberStatsTable" class="emListTable">\r
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>\r
+ <tbody>\r
+ {if:option.events}\r
+ <tr><th>Total {term.prop.plur} in this system: </th><td>{membersStats.all}</td></tr>\r
+ {end:}\r
+ {if:option.accommodations}\r
+ <tr><th>{term.prop.plur_cap} with {term.unit.plur}: </th><td>{membersStats.accom}</td></tr>\r
+ {end:}\r
+ {if:option.tickets}\r
+ <tr><th>{term.prop.plur_cap} with {term.ticket.plur}: </th><td>{membersStats.ticket}</td></tr>\r
+ {end:}\r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ </div>\r
+ {if:membersStats.flag}\r
+ <div style="float: right;">\r
+ <div class="emNoticeHead">Please note:</div>\r
+ <ul class="emNotices">\r
+ {if:membersStats.all}{else:}\r
+ <li class="emNotice">No {term.prop.plur} are listed in this system.</li>\r
+ {end:}\r
+ {if:option.accommodations}\r
+ {if:membersStats.accom}{else:}\r
+ <li class="emNotice">No {term.prop.plur} have {term.unit.plur}.</li>\r
+ {end:}\r
+ {end:}\r
+ {if:option.tickets}\r
+ {if:membersStats.ticket}{else:}\r
+ <li class="emNotice">No {term.prop.plur} have {term.ticket.plur}.</li>\r
+ {end:}\r
+ {end:}\r
+ {if:option.events}\r
+ {if:membersStats.event}{else:}\r
+ <li class="emNotice">There are no {term.event.plur} associated with any {term.prop.plur}.</li>\r
+ {end:}\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+ {end:}\r
+ \r
+</div>\r
+\r
+{startScript:h}\r
+\r
+ $(function() {\r
+\r
+ $('#MemberStatsTable').dataTable({\r
+ "sScrollY": "100px",\r
+ "bScrollCollapse": true,\r
+ "bPaginate": false,\r
+ "bLengthChange": false,\r
+ "bFilter": false,\r
+ "bSort": false,\r
+ "bInfo": false,\r
+ "bAutoWidth": false,\r
+ "bDestroy": true\r
+ });\r
+\r
+ f_restartOnTabSelect();\r
+ \r
+ });\r
+\r
+</script>\r
--- /dev/null
+<div class="emBlock">
+</div> <!-- emBlock -->
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ Miscellaneous System Configuration
+ </div>
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#0#)" emTabId="Misc_configEdit" emContainerId="Misc_container" emTabParams="" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ <div class="emListTableContainerLeft">
+ <table id="MiscConfigDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr><th>Text for {term.performance.norm} selection page:</th><td>{miscConfigDetail.intro_text:h}</td></tr>
+ <tr><th>Text for {term.section.norm} selection page:</th><td>{miscConfigDetail.section_text:h}</td></tr>
+ <tr><th>Text for {term.ticket.norm} selection page:</th><td>{miscConfigDetail.ticket_text:h}</td></tr>
+ <tr><th>Text for cart page:</th><td>{miscConfigDetail.cart_text:h}</td></tr>
+ <tr><th>Text for checkout page:</th><td>{miscConfigDetail.checkout_text:h}</td></tr>
+ <tr><th>Text for checkout success page:</th><td>{miscConfigDetail.success_text:h}</td></tr>
+ <tr><th>Tracking script for checkout success page:</th><td><pre>{miscConfigDetail.tracking}</pre></td></tr>
+ <tr><th> </th><td> </td></tr>
+ <tr>
+ <th valign="top">Text prompts for<br>optional checkout fields:</th>
+ <td>
+ #1: {miscConfigDetail.opt_field_1_name}<br>
+ #2: {miscConfigDetail.opt_field_2_name}<br>
+ #3: {miscConfigDetail.opt_field_3_name}<br>
+ <br>
+ (Blank fields are not included in the checkout page.)
+ </td>
+ </tr>
+ <tr><th>Admin Checkout No Payment Info Reasons:</th><td>{miscConfigDetail.no_payment_reasons:h}</td></tr>
+ <tr>
+ <th>SSL Seal for Checkout Page:</th>
+ <td>
+ <table>
+ <tr><th>Head Script:</th><td>{miscConfigDetail.ssl_seal_head_script}</td>
+ <tr><th>Body Script:</th><td>{miscConfigDetail.ssl_seal_body_script}</td>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th>Central Payment {term.prop.Cap}:</th>
+ <td>
+ {if:miscConfigDetail.central_payment}
+ All payments will be processed through <b>{miscConfigDetail.central_payment:h}</b>.
+ {else:}
+ Payments will not be centrally processed.
+ {end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#MiscConfigDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ "aoColumns": [
+ { "sWidth": "300px" },
+ null
+ ]
+
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+ <div class="emBlock">\r
+\r
+ <div class="emBlockName">\r
+ Miscellaneous System Configuration \r
+ </div>\r
+ \r
+ <div class=".emForm">\r
+ \r
+ <form id="miscConfigForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">\r
+ <input type="hidden" name="Action" value="Misc_configUpdate">\r
+ <input type="hidden" name="tabList" value="{tabList}">\r
+ <input type="hidden" name="id" value="1">\r
+ <div class="emListTableContainer">\r
+ <table id="miscConfigTable" class="emListTable">\r
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead> \r
+ <tbody>\r
+ <tr>\r
+ {if:fieldRequired.intro_text}<th class="emRequiredInputField">{else:}<th>{end:}Text for {term.performance.norm} selection page:</th>\r
+ {if:fieldFail.intro_text}<td class="emBadInputField">{else:}<td>{end:}\r
+ <textarea type="text" name="intro_text" id="intro_text">{miscConfigDetail.intro_text:h}</textarea>\r
+ {if:fieldFail.intro_text}<br>{fieldFail.intro_text}{end:}\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ {if:fieldRequired.section_text}<th class="emRequiredInputField">{else:}<th>{end:}Text for {term.section.norm} selection page:</th>\r
+ {if:fieldFail.section_text}<td class="emBadInputField">{else:}<td>{end:}\r
+ <textarea type="text" name="section_text" id="section_text">{miscConfigDetail.section_text:h}</textarea>\r
+ {if:fieldFail.section_text}<br>{fieldFail.section_text}{end:}\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ {if:fieldRequired.ticket_text}<th class="emRequiredInputField">{else:}<th>{end:}Text for {term.ticket.norm} selection page:</th>\r
+ {if:fieldFail.ticket_text}<td class="emBadInputField">{else:}<td>{end:}\r
+ <textarea type="text" name="ticket_text" id="ticket_text">{miscConfigDetail.ticket_text:h}</textarea>\r
+ {if:fieldFail.ticket_text}<br>{fieldFail.ticket_text}{end:}\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ {if:fieldRequired.cart_text}<th class="emRequiredInputField">{else:}<th>{end:}Text for cart page:</th>\r
+ {if:fieldFail.cart_text}<td class="emBadInputField">{else:}<td>{end:}\r
+ <textarea type="text" name="cart_text" id="cart_text">{miscConfigDetail.cart_text:h}</textarea>\r
+ {if:fieldFail.cart_text}<br>{fieldFail.cart_text}{end:}\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ {if:fieldRequired.checkout_text}<th class="emRequiredInputField">{else:}<th>{end:}Text for checkout page:</th>\r
+ {if:fieldFail.checkout_text}<td class="emBadInputField">{else:}<td>{end:}\r
+ <textarea type="text" name="checkout_text" id="checkout_text">{miscConfigDetail.checkout_text:h}</textarea>\r
+ {if:fieldFail.checkout_text}<br>{fieldFail.checkout_text}{end:}\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ {if:fieldRequired.success_text}<th class="emRequiredInputField">{else:}<th>{end:}Text for checkout success page:</th>\r
+ {if:fieldFail.success_text}<td class="emBadInputField">{else:}<td>{end:}\r
+ <textarea type="text" name="success_text" id="success_text">{miscConfigDetail.success_text:h}</textarea>\r
+ {if:fieldFail.success_text}<br>{fieldFail.success_text}{end:}\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>Tracking script for checkout success page:</th>\r
+ <td><textarea type="text" name="tracking">{miscConfigDetail.tracking:h}</textarea></td> \r
+ </tr>\r
+ <tr>\r
+ <th>Optional Checkout Fields:</th>\r
+ <td>\r
+ <p>\r
+ NOTE: Optional checkout fields below are not used if they are blank.<br>\r
+ If a field name is provided, the user will be asked to provide input to a field with this name on the checkout page.\r
+ </p> \r
+ <table width="100%">\r
+ <tr>\r
+ {if:fieldRequired.opt_field_1_name}<th class="emRequiredInputField" width="20%">{else:}<th width="20%">{end:}Field #1 name:</th>\r
+ {if:fieldFail.opt_field_1_name}<td class="emBadInputField">{else:}<td>{end:}\r
+ <input type="text" name="opt_field_1_name" id="opt_field_1_name" class="emTextInput" value="{miscConfigDetail.opt_field_1_name}">\r
+ {if:fieldFail.opt_field_1_name}<br>{fieldFail.opt_field_1_name}{end:}\r
+ </td> \r
+ </tr>\r
+ <tr> \r
+ {if:fieldRequired.opt_field_2_name}<th class="emRequiredInputField">{else:}<th>{end:}Field #2 name:</th>\r
+ {if:fieldFail.opt_field_2_name}<td class="emBadInputField">{else:}<td>{end:}\r
+ <input type="text" name="opt_field_2_name" id="opt_field_2_name" class="emTextInput" value="{miscConfigDetail.opt_field_2_name}">\r
+ {if:fieldFail.opt_field_2_name}<br>{fieldFail.opt_field_2_name}{end:}\r
+ </td> \r
+ </tr>\r
+ <tr> \r
+ {if:fieldRequired.opt_field_3_name}<th class="emRequiredInputField">{else:}<th>{end:}Field #3 name:</th>\r
+ {if:fieldFail.opt_field_3_name}<td class="emBadInputField">{else:}<td>{end:}\r
+ <input type="text" name="opt_field_3_name" id="opt_field_3_name" class="emTextInput" value="{miscConfigDetail.opt_field_3_name}">\r
+ {if:fieldFail.opt_field_3_name}<br>{fieldFail.opt_field_3_name}{end:}\r
+ </td> \r
+ </tr>\r
+ </table>\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>Admin Checkout No Payment Info Reasons:</th>\r
+ <td>\r
+ <textarea type="text" name="no_payment_reasons" style="width: 90%;">{miscConfigDetail.no_payment_reasons:h}</textarea>\r
+ <br>\r
+ Place one reason per line. <b>Type in reasons!</b> Do not paste text from some other source.\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>SSL Seal for Checkout Page:</th>\r
+ <td>\r
+ <p>\r
+ NOTE: SSL Seal scripts are normally entered into this form by Gaslight Media personel.<br>\r
+ Please do not modify these fields unless directed to do so.\r
+ </p> \r
+ <p>Note also that URLs in these entries should all be "https" (SSL).</p>\r
+ <table width="100%">\r
+ <tr>\r
+ {if:fieldRequired.ssl_seal_head_script}<th class="emRequiredInputField">{else:}<th>{end:}Head Script:</th>\r
+ {if:fieldFail.ssl_seal_head_script}<td class="emBadInputField">{else:}<td>{end:}\r
+ <textarea name="ssl_seal_head_script" id="ssl_seal_head_script" style="width: 100%; height: 60px;">{miscConfigDetail.ssl_seal_head_script:h}</textarea>\r
+ {if:fieldFail.ssl_seal_head_script}<br>{fieldFail.ssl_seal_head_script}{end:}\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ {if:fieldRequired.ssl_seal_body_script}<th class="emRequiredInputField">{else:}<th>{end:}Body Script:</th>\r
+ {if:fieldFail.ssl_seal_body_script}<td class="emBadInputField">{else:}<td>{end:}\r
+ <textarea name="ssl_seal_body_script" id="ssl_seal_body_script" style="width: 100%; height: 60px;">{miscConfigDetail.ssl_seal_body_script:h}</textarea>\r
+ {if:fieldFail.ssl_seal_body_script}<br>{fieldFail.ssl_seal_body_script}{end:}\r
+ </td>\r
+ </tr>\r
+ </table>\r
+ </td>\r
+ </tr>\r
+ <tr>\r
+ {if:fieldRequired.central_payment}<th class="emRequiredInputField">{else:}<th>{end:}Central Payment {term.prop.Cap}:</th>\r
+ {if:fieldFail.central_payment}<td class="emBadInputField">{else:}<td>{end:}\r
+ <select name="central_payment">\r
+ <option value=""> </option>\r
+ {foreach:miscConfigDetail.central_payment.pick_list,m}\r
+ <option value="{m.value}" selected flexy:if="m.default">{m.name:h}</option>\r
+ <option value="{m.value}" flexy:if="!m.default">{m.name:h}</option>\r
+ {end:}\r
+ </select> All payments are processed though this {term.prop.norm}.\r
+ {if:fieldFail.central_payment}<br>{fieldFail.central_payment}{end:}\r
+ <br>\r
+ NOTE: Leave blank unless you want to force all payments to be processed through one selected {term.prop.norm}.\r
+ You may create a new {term.prop.norm} for this purpose that has no {term.performance.plur} and {term.ticket.plur} associated with it\r
+ to use strictly for payment processing.\r
+ </td> \r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ \r
+ <div id="miscConfigFormSubmit">\r
+ <input type="submit" name="miscConfig" value="Save configuration changes" class="emEditSubmit">\r
+ </div> \r
+ \r
+ </form>\r
+ \r
+ </div> <!-- / emForm -->\r
+ \r
+</div> <!-- /emBlock -->\r
+\r
+{startScript:h}\r
+\r
+ $(function() {\r
+ \r
+ /*\r
+ * Table operations\r
+ */\r
+\r
+ $('#miscConfigTable').dataTable({\r
+ "bPaginate": false,\r
+ "bLengthChange": false,\r
+ "bFilter": false,\r
+ "bSort": false,\r
+ "bInfo": false,\r
+ "bAutoWidth": false,\r
+ "bDestroy": true\r
+ });\r
+ \r
+ /*\r
+ * CKeditor actions\r
+ */\r
+ \r
+ // Code to kick off CKEditor for specific fields\r
+ f_buildCkeditor($("#intro_text"));\r
+ f_buildCkeditor($("#section_text"));\r
+ f_buildCkeditor($("#ticket_text"));\r
+ f_buildCkeditor($("#cart_text"));\r
+ f_buildCkeditor($("#checkout_text"));\r
+ f_buildCkeditor($("#success_text"));\r
+ \r
+ // Remove the editors and store the data back in the textareas before the AJAX form submission\r
+ $('.emEditSubmit').click( function() {\r
+ f_removeCkeditor($("#intro_text"));\r
+ f_removeCkeditor($("#section_text"));\r
+ f_removeCkeditor($("#ticket_text"));\r
+ f_removeCkeditor($("#cart_text"));\r
+ f_removeCkeditor($("#checkout_text"));\r
+ f_removeCkeditor($("#success_text"));\r
+ });\r
+ \r
+ /*\r
+ * AJAX form handling\r
+ */\r
+ \r
+ $('#miscConfigForm').ajaxForm({\r
+ success: function(data) { \r
+ f_replaceContents(data, $('#Misc_container'));\r
+ return false;\r
+ }\r
+ });\r
+ \r
+ // Block default form submission\r
+ $("#miscConfigForm").submit(function (e) {\r
+ $('#miscConfigFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');\r
+ e.preventDefault();\r
+ });\r
+ \r
+ f_restartOnTabSelect();\r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+<div class="emBlock">
+
+ <div style="float: left;">
+ <div class="emBlockName">Misc:</div>
+ </div>
+
+ <div class="emBlock">
+
+ <!--
+ Sub Tabs
+ -->
+{if:checkPermission(#0#)}
+ <div class="emSubTabs">
+ <div flexy:if="!blockTab.Misc_configDetail" id="Misc_configDetail" emTabId="Misc_configDetail" emContainerId="Misc_container" emTabParams="tabList={tabList}" emTabGroup="ReportTabs" class="emTab ReportTabs emLink emTabSelected">
+ <div class="emTabName">General Configuration</div>
+ </div>
+ {if:customFeatures}
+ <div flexy:if="!blockTab.Misc_upload" id="Misc_upload" emTabId="Misc_upload" emContainerId="Misc_container" emTabParams="tabList={tabList}" emTabGroup="ReportTabs" class="emTab ReportTabs emLink">
+ <div class="emTabName">Upload Files to System</div>
+ </div>
+ {end:}
+ </div> <!-- emSubTabs -->
+{end:}
+ <!--
+ Content Areas
+ -->
+ <div id="Misc_container" class="emContentArea emSlider">
+ <div class="emBlock">(select report tab above)</div>
+ </div>
+
+ </div> <!-- emBlock -->
+</div> <!-- emBlock -->
+
+
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ // Start with Upload page loaded
+ f_loadAction('Misc_configDetail', 'Misc_container', "tabList={tabList}");
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+ <div class="emBlock">\r
+ \r
+ <div class=".emForm" style="margin-top: 2em;">\r
+ \r
+ <div class="emBlockName">\r
+ Files for customizing front-end appearance \r
+ </div>\r
+ \r
+ <hr style="margin-top: 30px;">\r
+\r
+{if:doingIndex}\r
+ {if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}{Chuck}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+ {end:}\r
+ {if:indexFileUploaded}\r
+ <div id="GLMreasonTitle">\r
+ * Index file uploaded successfully. \r
+ Please test to make sure your new file works correctly.<br>\r
+ If not, click the "Restore Previous File" button. \r
+ </div>\r
+ {end:}\r
+ {if:indexFileRestored}\r
+ <div id="GLMreasonTitle">\r
+ * Previous Index file restored. \r
+ Please test to make sure your new file works correctly.<br>\r
+ If not, please try to locate a known good file to upload. \r
+ </div>\r
+ {end:}\r
+{end:}\r
+\r
+ <p><b>index.html: </b> <span class="emTextHighlight">Last updated {indexTime}</span></p>\r
+ <form id="uploadIndexForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">\r
+ <input type="hidden" name="Action" value="Misc_uploadIndex">\r
+ <input type="hidden" name="tabList" value="{tabList}">\r
+ <div class="emListTableContainer">\r
+ <table class="emListTable uploadIndexTable">\r
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead> \r
+ <tbody>\r
+ <tr>\r
+ <th class="emInputField">Upload front-end ticket sales index file:</th>\r
+ <td>\r
+ <input type="file" name="index">\r
+ </td> \r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ <p>\r
+ This file must include the "{GLM}" text where you would like the page\r
+ contents to be inserted. Anything else reasonable before or after that \r
+ is permitted. Please be sure to check your file to ensure that html container\r
+ tags match properly before uploading.\r
+ </p>\r
+ \r
+ <div id="uploadIndexFormSubmit">\r
+ <input type="submit" name="UploadIndex" value="Upload Index File" class="emEditSubmit">\r
+ <input type="submit" name="RevertIndex" value="Restore Previous Index" class="emEditSubmit">\r
+ </div> \r
+ \r
+ </form>\r
+ \r
+ </div> <!-- / emForm -->\r
+\r
+ <hr style="margin-top: 30px;">\r
+\r
+{if:doingStylesheet}\r
+ {if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}{Chuck}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+ {end:}\r
+ {if:stylesheetFileUploaded}\r
+ <div id="GLMreasonTitle">\r
+ * Stylesheet file uploaded successfully.<br>\r
+ Please test to make sure your new file works correctly. If not, click the "Restore Previous File" button. \r
+ </div>\r
+ {end:}\r
+ {if:stylesheetFileRestored}\r
+ <div id="GLMreasonTitle">\r
+ * Previous Stylesheet file restored. \r
+ Please test to make sure your new file works correctly. If not, please try to locate a known good file to upload. \r
+ </div>\r
+ {end:}\r
+{end:}\r
+ \r
+ <div class=".emForm" style="margin-top: 2em;">\r
+ \r
+ <p><b>styles.css: </b> <span class="emTextHighlight">Last updated {stylesTime}</span></p>\r
+ <form id="uploadStylesheetForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">\r
+ <input type="hidden" name="Action" value="Misc_uploadStylesheet">\r
+ <input type="hidden" name="tabList" value="{tabList}">\r
+ <div class="emListTableContainer">\r
+ <table class="emListTable uploadStylesheetTable">\r
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead> \r
+ <tbody>\r
+ <tr>\r
+ <th class="emInputField">Upload front-end ticket sales stylesheet:</th>\r
+ <td>\r
+ <input type="file" name="stylesheet">\r
+ </td> \r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ \r
+ <div id="uploadStylesheetFormSubmit">\r
+ <input type="submit" value="Upload Stylesheet" class="emEditSubmit">\r
+ <input type="submit" name="RevertStylesheet" value="Restore Previous Stylesheet" class="emEditSubmit">\r
+ </div> \r
+ \r
+ </form>\r
+ \r
+ </div> <!-- / emForm -->\r
+ \r
+ \r
+</div> <!-- /emBlock -->\r
+\r
+{startScript:h}\r
+\r
+ $(function() {\r
+\r
+ /*\r
+ * Table operations\r
+ */\r
+ \r
+ $('.uploadStylesheetTable').dataTable({\r
+ "bPaginate": false,\r
+ "bLengthChange": false,\r
+ "bFilter": false,\r
+ "bSort": false,\r
+ "bInfo": false,\r
+ "bAutoWidth": false,\r
+ "bDestroy": true\r
+ });\r
+\r
+ $('.uploadIndexTable').dataTable({\r
+ "bPaginate": false,\r
+ "bLengthChange": false,\r
+ "bFilter": false,\r
+ "bSort": false,\r
+ "bInfo": false,\r
+ "bAutoWidth": false,\r
+ "bDestroy": true\r
+ });\r
+\r
+ /*\r
+ * AJAX form handling\r
+ */\r
+ \r
+ $('#uploadStylesheetForm').ajaxForm({\r
+ success: function(data) { \r
+ f_replaceContents(data, $('#Misc_container')); \r
+ return false;\r
+ }\r
+ });\r
+\r
+ $('#uploadIndexForm').ajaxForm({\r
+ success: function(data) { \r
+ f_replaceContents(data, $('#Misc_container')); \r
+ return false;\r
+ }\r
+ });\r
+ \r
+ // Block default form submission\r
+ $("#uploadIndexForm").submit(function (e) {\r
+ $('#uploadIndexForm').html('<div class="emLoading">Submitting, Please Wait...</div>');\r
+ e.preventDefault();\r
+ });\r
+ $("#uploadStylesheetForm").submit(function (e) {\r
+ $('#uploadStylesheetForm').html('<div class="emLoading">Submitting, Please Wait...</div>');\r
+ e.preventDefault();\r
+ });\r
+ \r
+ f_restartOnTabSelect();\r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">{orderDetail.name}</div>
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Order_detail" emContainerId="Order_info_container" emTabParams="OrderID={orderDetail.id}&Option=delete" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.order.cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Order_edit" emContainerId="Order_info_container" emTabParams="OrderID={orderDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.order.cap}</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:orderDetail}
+ <div class="emListTableContainerLeft">
+ <table id="OrderDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:orderDetail.delete}
+ <tr>
+ <th>Delete {term.order.cap}:</th>
+ <td>
+ {if:orderDetail.deleteConfirmed}
+ {if:orderDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {orderDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+
+ <div class="emUsdTabs">
+ <div emTabId="Order_delete" emContainerId="Order_info_container" emTabParams="OrderID={orderDetail.id}&Option=delete" emTabGroup="none" class="emTab emLink" style="font-size: 2em;">
+ <div class="emTabName">Delete {term.order.cap}</div>
+ </div>
+ </div>
+
+ <p><h3 style="color: red;">Clicking this button will permanently delete this {term.order.norm}.</h3></p>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>{term.order.cap} #:</th><td>{orderDetail.id}</td></tr>
+ <tr><th>{term.order.cap} Date:</th><td>{orderDetail.purchase_date.date}</td></tr>
+ <tr><th>Name:</th><td>{orderDetail.lname}, {orderDetail.fname}</td></tr>
+ <tr>
+ <th>Address:</th>
+ <td>
+ {orderDetail.addr1}{if:orderDetail.addr2}<br>
+ {orderDetail.addr2}{end:}<br>
+ {orderDetail.city}, {orderDetail.state.name} {orderDetail.zip}<br>
+ {orderDetail.country.name}
+ </td>
+ </tr>
+ <tr><th>Phone:</th><td>{orderDetail.phone}</td></tr>
+ <tr><th>E-Mail:</th><td>{orderDetail.email}</td></tr>
+ <tr><th>OK to Send Info:</th><td>{orderDetail.email_ok.name}</td></tr>
+ <tr><th>{term.prop.cap}:</th><td>{orderDetail.member_name}</td></tr>
+ <tr><th>Credit Card:</th><td>{orderDetail.cctype}</td></tr>
+ <tr><th>Name On Card:</th><td>{orderDetail.ccname}</td></tr>
+ <tr><th>Card Number:</th><td>{orderDetail.ccnumber}</td></tr>
+ <tr><th>Confirmation #:</th><td>{orderDetail.ccconf}</td></tr>
+ <tr><th>Total Charge:</th><td>{orderDetail.charge_total}</td></tr>
+ <tr><th>Special Needs:</th><td>{orderDetail.special_needs:h}</td></tr>
+ <tr><th>Notes:</th><td>{orderDetail.notes:h}</td></tr>
+ <tr>
+ <th>Print {term.voucher.cap_plur}</th>
+ <td>
+ <div class="emUsdTabs">
+ <div emOrderID="{c.id}" emTabParams="" emTabGroup="none" class="emTab emLink VoucherPrint" style="float: left;">
+ <div class="emTabName">Print Desktop Vouchers Now</div>
+ </div>
+ <div id="Voucher_print_container">
+ </div>
+ </div>
+ <div class="emUsdTabs">
+ <div emOrderID="{c.id}" emTabParams="" emTabGroup="none" class="emTab emLink VoucherPrintMobile" style="float: left;">
+ <div class="emTabName">Display Mobile Vouchers Now</div>
+ </div>
+ <div id="Voucher_print_mobile_container">
+ </div>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.order.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#OrderDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ // Print vouchers
+ $('.VoucherPrint').click(function(){
+ // window.location.href = "{appAdminURL}&Action=Order_printVoucher&OrderID={orderDetail.id}";
+ var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucher&OrderID={orderDetail.id}',
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ });
+
+ // Print Mobile vouchers
+ $('.VoucherPrintMobile').click(function(){
+ // window.location.href = "{appAdminURL}&Action=Order_printVoucherMobile&OrderID={orderDetail.id}";
+ var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucherMobile&OrderID={orderDetail.id}',
+ "voucherPrintMobile",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewOrder}Adding New {term.order.cap}{end:}
+ {if:editingOrder}Editing {term.order.cap}{end:}
+ </div>
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Order_detail" emContainerId="Order_info_container" emTabParams="id={orderDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+{if:formFail}
+ <div class="emRequiredInputField">Not all fields were filled in correctly. Please try again.</div>
+{end:}
+
+ <div class=".emForm">
+
+ {if:orderDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="orderForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewOrder}
+ <input type="hidden" name="Action" value="Order_insert">
+ {else:}
+ <input type="hidden" name="Action" value="Order_update">
+ {end:}
+
+ <input type="hidden" name="OrderID" value="{orderDetail.id}">
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+ <input type="hidden" name="tabList" value="{tabList}">
+
+ <div class="emListTableContainer">
+ <table class="emListTable orderEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr><th>{term.order.cap} #:</th><td>{orderDetail.id}</td></tr>
+ <tr><th>{term.order.cap} Date:</th><td>{orderDetail.purchase_date.date}</td></tr>
+ <tr>
+ {if:fieldRequired.fname}<th class="emRequiredInputField">{else:}<th>{end:}First Name:</th>
+ {if:fieldFail.fname}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="fname" value="{orderDetail.fname:h}" class="emTextInput"><br>
+ {if:fieldFail.fname}<br>{fieldFail.fname}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.lname}<th class="emRequiredInputField">{else:}<th>{end:}Last Name:</th>
+ {if:fieldFail.lname}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="lname" value="{orderDetail.lname:h}" class="emTextInput"><br>
+ {if:fieldFail.lname}<br>{fieldFail.lname}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.addr1}<th class="emRequiredInputField">{else:}<th>{end:}Address:</th>
+ {if:fieldFail.addr1}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="addr1" value="{orderDetail.addr1:h}" class="emTextInput"><br>
+ {if:fieldFail.addr1}<br>{fieldFail.addr1}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.addr2}<th class="emRequiredInputField">{else:}<th>{end:} </th>
+ {if:fieldFail.addr2}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="addr2" value="{orderDetail.addr2:h}" class="emTextInput"><br>
+ {if:fieldFail.addr2}<br>{fieldFail.addr2}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.city}<th class="emRequiredInputField">{else:}<th>{end:}City:</th>
+ {if:fieldFail.city}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="city" value="{orderDetail.city:h}" class="emTextInput"><br>
+ {if:fieldFail.city}<br>{fieldFail.city}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.state}<th class="emRequiredInputField">{else:}<th>{end:}State:</th>
+ {if:fieldFail.state}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="state">
+ <option value=""> </option>
+ {foreach:orderDetail.state.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.state}<br>{fieldFail.state}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.zip}<th class="emRequiredInputField">{else:}<th>{end:}ZIP/Postal Code:</th>
+ {if:fieldFail.zip}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="zip" id="zip" value="{orderDetail.zip}" class="emTextInputShort">
+ {if:fieldFail.zip}<br>{fieldFail.zip}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.country}<th class="emRequiredInputField">{else:}<th>{end:}Country:</th>
+ {if:fieldFail.country}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="country">
+ <option value=""> </option>
+ {foreach:orderDetail.country.list,c}
+ {if:c.default}
+ <option value="{c.value}" SELECTED>{c.name}</option>
+ {else:}
+ <option value="{c.value}">{c.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.country}<br>{fieldFail.country}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.phone}<th class="emRequiredInputField">{else:}<th>{end:}Phone:</th>
+ {if:fieldFail.phone}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="phone" id="zip" value="{orderDetail.phone}" class="emTextInputMedium">
+ {if:fieldFail.phone}<br>{fieldFail.phone}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.email}<th class="emRequiredInputField">{else:}<th>{end:}E-Mail Address:</th>
+ {if:fieldFail.email}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="email" value="{orderDetail.email}" class="emTextInput">
+ {if:fieldFail.email}<p>{fieldFail.email}</p>{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>OK to Send Info:</th>
+ <td>
+ {if:orderDetail.email_ok.value}
+ <input type="checkbox" name="email_ok" checked="yes">
+ {else:}
+ <input type="checkbox" name="email_ok">
+ {end:}
+ <br>Note that commercial E-Mail protocols require you to have positive confirmation from the addressee before you send them general E-mail or solicitations.
+ </td>
+ </tr>
+ <tr><th>{term.prop.cap}:</th><td>{orderDetail.member_name}</td></tr>
+ <tr><th>Credit Card:</th><td>{orderDetail.cctype}</td></tr>
+ <tr><th>Name On Card:</th><td>{orderDetail.ccname}</td></tr>
+ <tr><th>Card Number:</th><td>{orderDetail.ccnumber}</td></tr>
+ <tr><th>Confirmation #:</th><td>{orderDetail.ccconf}</td></tr>
+ <tr><th>Total Charge:</th><td>{orderDetail.charge_total}</td></tr>
+ <tr>
+ {if:fieldRequired.special_needs}<th class="emRequiredInputField">{else:}<th>{end:}Special Needs:</th>
+ {if:fieldFail.special_needs}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="special_needs" cols="60">{orderDetail.special_needs:h}</textarea><br>
+ {if:fieldFail.special_needs}<br>{fieldFail.special_needs}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.notes}<th class="emRequiredInputField">{else:}<th>{end:}Notes:</th>
+ {if:fieldFail.notes}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="notes" cols="60">{orderDetail.notes:h}</textarea><br>
+ {if:fieldFail.notes}<br>{fieldFail.notes}{end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id="orderFormSubmit" class="submitKeepOnPage">
+ {if:addingNewOrder}
+ <input type="submit" value="Add new {term.order.norm}" class="emEditSubmit">
+ {end:}
+ {if:editingOrder}
+ <input type="submit" value="Update {term.order.norm}" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No {term.order.norm} has been selected yet.</h2>
+ <p>To edit a {term.order.norm}, first select it from the list of available {term.order.plur}.
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.orderEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#orderForm').ajaxForm({
+ success: function(data) {
+ {if:addingNewOrder}
+ f_replaceContents(data, $('#Order_info_container'));
+ {end:}
+ {if:editingOrder}
+ f_replaceContents(data, $('#Order_info_container'));
+ {end:}
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#orderFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#descr"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Order List -->
+<div class="emBlock">
+
+ <div class="emUsdTabs">
+ <div class="emTab emLink" style="float: right;">
+ <div id="orderListSizeChange">Larger Table</div>
+ </div>
+ </div>
+
+ Search Orders: <input type="text" id="ordersSearch" name="ordersSearchField"> (start typing any data in list)
+
+ {if:orderList}
+
+ <div id="OrderListTable_wrapper" class="emListTableContainer">
+ <table id="OrderListTable" class="emListTable">
+ <thead>
+ <tr><th>Order #</th><th>Order Date</th><th>Last Name</th><th>First Name</th><th>City</th><th>State</th><th>E-Mail</th><th>Phone</th></tr>
+ </thead>
+ <tbody>
+ {foreach:orderList,c}
+ <tr>
+ <td emOrderId="{c.id}" class="emLink orderListSelect">{c.id}</td>
+ <td>{c.purchase_date.date}</td>
+ <td emOrderId="{c.id}" class="emLink orderListSelect">{c.fname:h}</td>
+ <td emOrderId="{c.id}" class="emLink orderListSelect">{c.lname:h}</td>
+ <td>{c.city}</td>
+ <td>{c.state.value}</td>
+ <td>{c.email}</td>
+ <td>{c.phone}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No orders listed.</p>
+ {end:}
+
+ <div id="Order_detail_container" class="emSliderClosed">
+ </div>
+
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // Orders Search
+ var ordersSearchData = [
+ {foreach:orderList,c}
+ {label:'{c.purchase_date.date} - {c.lname:h}, {c.fname:h} - {c.city}, {c.state.value} - {c.email}, {c.phone}', value:'{c.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var OrderListTable = $('#OrderListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ "aoColumns" : [
+ { "sType": "numeric" },
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ]
+ });
+ $(window).resize(function(){
+ OrderListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var OrderListTableSmall = true;
+ var OrderListTableHeight = $('#OrderListTable_wrapper div.dataTables_scrollBody').height();
+ $('#orderListSizeChange').click(function() {
+ if (OrderListTableSmall) {
+ $('#OrderListTable_wrapper div.dataTables_scrollBody').height('auto');
+ OrderListTableSmall = false;
+ $(this).html('Smaller Table');
+ OrderListTable.fnSettings().oScroll.sY = '100%';
+ OrderListTable.fnDraw();
+ } else {
+ $('#OrderListTable_wrapper div.dataTables_scrollBody').height(OrderListTableHeight);
+ OrderListTableSmall = true;
+ $(this).html('Larger Table');
+ OrderListTable.fnSettings().oScroll.sY = '100px';
+ OrderListTable.fnDraw();
+ }
+ });
+
+ // Close all local sliders
+ $('#Order_detail').hide(duration);
+
+ $('.orderListSelect').click(function(){
+ $('#OrderListTable_wrapper div.dataTables_scrollBody').height(OrderListTableHeight);
+ OrderListTableSmall = true;
+ $(this).html('Larger Table');
+ OrderListTable.fnSettings().oScroll.sY = '100px';
+ OrderListTable.fnDraw();
+ f_loadAction('Order_selected', 'Order_detail_container', 'OrderID=' + $(this).attr('emOrderId') + '&tabList={tabList}');
+ });
+
+ // Search Orders
+ $("#ordersSearch").autocomplete({
+ source: ordersSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#ordersSearch").attr({value: ui.item.label});
+ f_loadAction('Order_selected', 'Order_detail_container', 'OrderID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div style="float: left;">
+ <div class="emBlockName">Order #: {orderDetail.id}</div>
+ </div>
+
+ <div class="emBlock">
+
+ <!--
+ Sub Tabs
+ -->
+{if:checkPermission(#20#)}
+ <div class="emSubTabs">
+ <div flexy:if="!blockTab.Order_detail" id="Order_detail" emTabId="Order_detail" emContainerId="Order_info_container" emTabParams="tabList={tabList}" emTabGroup="OrderTabs" class="emTab OrderTabs emLink emTabSelected">
+ <div class="emTabName">{term.order.cap} Detail</div>
+ </div>
+ <div flexy:if="!blockTab.Sold_list" id="Sold_list" emTabId="Sold_list" emContainerId="Order_info_container" emTabParams="tabList={tabList}" emTabGroup="OrderTabs" class="emTab OrderTabs emLink">
+ <div class="emTabName">{term.ticket.plur_cap} Purchased</div>
+ </div>
+ </div> <!-- emSubTabs -->
+{end:}
+ <!--
+ Content Areas
+ -->
+ <div id="Order_info_container" class="emContentArea emSlider">
+ </div>
+
+ </div> <!-- emBlock -->
+
+</div> <!-- emBlock -->
+
+
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ // Start with order detail loaded
+ f_loadAction('Order_detail', 'Order_info_container', "tabList={tabList}");
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">Delete this {term.performance.cap}</div>
+
+ <div class="emBlockName">{performanceDetail.name}</div>
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Performance_confirmDelete" emContainerId="Performance_info_container" emTabParams="id={performanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Confirm Delete</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Performance_detail" emContainerId="Performance_info_container" emTabParams="PerformancesListOption=member&id={performanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel Delete</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:performanceDetail}
+ <div class="emListTableContainerLeft">
+ <table id="PerformanceDeleteTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>Delete {term.performace.cap}:</th>
+ <td>
+ <h3 style="color: red;">Clicking "Confirm Delete" on the right will permanently delete this {term.performance.norm}.</h3>
+ </td>
+ </tr>
+ <tr><th>Name:</th><td>{performanceDetail.name}</td></tr>
+ <tr><th>Active:</th><td>{performanceDetail.active.name}</td></tr>
+ <tr><th>Purchase by Admin Only:</th><td>{performanceDetail.admin_only.name}</td></tr>
+ <tr><th>Start Date:</th><td>{performanceDetail.start_date.date}</td></tr>
+ <tr><th>End Date:</th><td>{performanceDetail.end_date.date}</td></tr>
+ <tr><th>Cuttoff Date:</th><td>{performanceDetail.cutoff_date.date}</td></tr>
+ <tr><th>Image:</th><td>{performanceDetail.image}</td></tr>
+ <tr><th>Policies:</th><td>{performanceDetail.policies}</td></tr>
+ <tr><th>Text for {term.voucher.cap}:</th><td>{performanceDetail.voucher_text:h}</td></tr>
+ <tr><th>Promote in Cart:</th><td>{performanceDetail.promote_in_cart.name}</td></tr>
+ <tr><th>Sort Order:</th><td>{performanceDetail.sort}</td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.performance.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#PerformanceDeleteTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewPerformance}Adding New {term.performance.cap}{end:}
+ {if:editingPerformance}Editing {term.performance.cap}{end:}
+ </div>
+
+<!-- <div class="emBlockName">{performanceDetail.name}</div> -->
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Performance_delete" emContainerId="Performance_info_container" emTabParams="PerformanceID={performanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.performance.cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Performance_edit" emContainerId="Performance_info_container" emTabParams="PerformanceID={performanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.performance.cap}</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:performanceDetail}
+ <div class="emListTableContainerLeft">
+ <table id="PerformanceDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:performanceDetail.delete}
+ <tr>
+ <th>Delete {term.performance.cap}:</th>
+ <td>
+ {if:performanceDetail.deleteConfirmed}
+ {if:performanceDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {performanceDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+ <button id="confirmPerformanceDelete" value="{performanceDetail.id}">Click here to confirm that this {term.performance.norm} should be deleted.</button><br>
+ <h3 style="color: red;">Clicking the button above will permanently delete this {term.performance.norm}.</h3>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ {if:checkPermission(#0#)}
+ <tr><th>{term.prop.cap} Name:</th><td>{performanceDetail.member_name:h}</td></tr>
+ {end:}
+ <tr><th>{term.performance.cap} Name:</th><td>{performanceDetail.name:h}<span style="float: right;">ID: {performanceDetail.id}</span></td></tr>
+ <tr><th>Active:</th><td>{performanceDetail.active.name}</td></tr>
+ <tr><th>Purchase by Admin Only:</th><td>{performanceDetail.admin_only.name}</td></tr>
+ <tr><th>Description:</th><td>{performanceDetail.descr:h}</td></tr>
+ <tr><th>Short Description:</th><td>{performanceDetail.short_descr:h}</td></tr>
+ <tr><th>Start Date:</th><td>{performanceDetail.start_date.date}</td></tr>
+ <tr><th>End Date:</th><td>{performanceDetail.end_date.date}</td></tr>
+ <tr><th>Purchase Lead Time:</th><td>{performanceDetail.purch_leadtime} hours</td></tr>
+ <tr>
+ <th>Image:</th>
+ <td>
+ {if:performanceDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{performanceDetail.image}">
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr><th>Policies:</th><td>{performanceDetail.policy:h}</td></tr>
+ <tr><th>Text for {term.voucher.cap}:</th><td>{performanceDetail.voucher_text:h}</td></tr>
+ <tr><th>Text for Confirmation E-Mail:</th><td>{performanceDetail.conf_text:h}</td></tr>
+ <tr><th>Promote in Cart:</th><td>{performanceDetail.promote_in_cart.name}</td></tr>
+ <tr><th>Sort Order:</th><td>{performanceDetail.sort}</td></tr>
+ <tr>
+ <th>Link to purchase:</th>
+ <td>
+ <a href="{frontEndSCRIPT}?Action=Shop_sectionSelect&PerformanceID={performanceDetail.id}" target="emFrontEnd">
+ {frontEndSCRIPT}?Action=Shop_sectionSelect&PerformanceID={performanceDetail.id}
+ </a>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.performance.norm} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#PerformanceDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewPerformance}Adding New {term.performance.cap}{end:}
+ {if:editingPerformance}Editing {term.performance.cap}{end:}
+ </div>
+
+ <div class="emUsdTabs">
+{if:addingNewPerformance}
+ <div flexy:if="checkPermission(#10#)" emTabId="Misc_blank" emContainerId="Performance_detail_container" emTabParams="id={performanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{else:}
+ <div flexy:if="checkPermission(#10#)" emTabId="Performance_detail" emContainerId="Performance_info_container" emTabParams="id={performanceDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{end:}
+ </div> <!-- emSubTabs -->
+
+{if:formFail}
+ <div class="requiredField">Not all fields were filled in correctly. Please try again.</div>
+{end:}
+
+ <div class=".emForm">
+
+ {if:performanceDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="PerformanceForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewPerformance}
+ <input type="hidden" name="Action" value="Performance_insert">
+ {else:}
+ <input type="hidden" name="Action" value="Performance_update">
+ {end:}
+
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+ <input type="hidden" name="tabList" value="{tabList}">
+
+ {if:checkPermission(#0#)}
+ {else:}
+ <input type="hidden" name="member" value="{performanceDetail.member.value}">
+ {end:}
+
+ <div class="emListTableContainer">
+ <table class="emListTable performanceEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:checkPermission(#0#)}
+ <tr>
+ <th>{term.prop.Cap} Name:</th>
+ <td>
+ {if:addingNewPerformance}
+ <select name="member">
+ {foreach:performanceDetail.member.pick_list,m}
+ <option value="{m.value}" selected flexy:if="m.default">{m.name}</option>
+ <option value="{m.value}" flexy:if="!m.default">{m.name}</option>
+ {end:}
+ </select>
+ {else:}
+ {performanceDetail.member_name:h}
+ <input type="hidden" name="member" value="{performanceDetail.member.value}">
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ {if:fieldRequired.name}<th class="emRequiredInputField">{else:}<th>{end:}{term.performance.cap} Name:</th>
+ {if:fieldFail.name}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="name" value="{performanceDetail.name:h}" class="emTextInput">
+ {if:fieldFail.name}<br>{fieldFail.name}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.descr}<th class="emRequiredInputField">{else:}<th>{end:}Description:</th>
+ {if:fieldFail.descr}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="descr" id="descr">{performanceDetail.descr:h}</textarea>
+ {if:fieldFail.descr}<br>{fieldFail.descr}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.short_descr}<th class="emRequiredInputField">{else:}<th>{end:}Short Description:</th>
+ {if:fieldFail.short_descr}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="short_descr" value="{performanceDetail.short_descr:h}" class="emTextInputLong">
+ {if:fieldFail.short_descr}<br>{fieldFail.short_descr}{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Active:</th>
+ <td>
+ {if:performanceDetail.active.value}
+ <input type="checkbox" name="active" checked="yes">
+ {else:}
+ <input type="checkbox" name="active">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Purchase by Admin Only:</th>
+ <td>
+ {if:performanceDetail.admin_only.value}
+ <input type="checkbox" name="admin_only" checked="yes">
+ {else:}
+ <input type="checkbox" name="admin_only">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.start_date}<th class="emRequiredInputField">{else:}<th>{end:}Start Date:</th>
+ {if:fieldFail.start_date}<td class="emBadInputField">{else:}<td>{end:}
+ {if:addingNewPerformance}
+ <input type="text" id="startDateInput" name="start_date" value="" class="emTextInputShort"><br>
+ {else:}
+ <input type="text" id="startDateInput" name="start_date" value="{performanceDetail.start_date.date:h}" class="emTextInputShort"><br>
+ {end:}
+ This is a general start date. {term.ticket.cap} dates will determine when each {term.performance.norm} occurs.
+ {if:fieldFail.start_date}<br>{fieldFail.start_date}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.end_date}<th class="emRequiredInputField">{else:}<th>{end:}End Date:</th>
+ {if:fieldFail.end_date}<td class="emBadInputField">{else:}<td>{end:}
+ {if:addingNewPerformance}
+ <input type="text" id="endDateInput" name="end_date" value="" class="emTextInputShort"><br>
+ {else:}
+ <input type="text" id="endDateInput" name="end_date" value="{performanceDetail.end_date.date:h}" class="emTextInputShort"><br>
+ {end:}
+ This is a general end date. {term.ticket.cap} dates will determine when each {term.performance.norm} occurs.
+ {if:fieldFail.end_date}<br>{fieldFail.end_date}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.purch_leadtime}<th class="requiredField">{else:}<th>{end:}Purchase Lead Time:</th>
+ {if:fieldFail.purch_leadtime}<td class="badField">{else:}<td>{end:}
+ <input type="text" name="purch_leadtime" value="{performanceDetail.purch_leadtime:h}" class="emTextInputVeryShort"> Hours<br>
+ Person may not purchase {term.ticket.plur} if less than this number of hours before use.
+ {if:fieldFail.purch_leadtime}<br>{fieldFail.purch_leadtime}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.image}<th class="emRequiredInputField">{else:}<th>{end:}Image:</th>
+ {if:fieldFail.image}<td class="emBadInputField">{else:}<td>{end:}
+ {if:performanceDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{performanceDetail.image}">
+ <br>Delete this image: <input type="checkbox" name="image_delete">
+ {end:}
+ <input type="hidden" name="image" value="{storedDetail.image}">
+ <br>Upload or replace the image: <input type="file" name="image_new">
+ {if:fieldFail.image}<br>{fieldFail.image}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.policy}<th class="emRequiredInputField">{else:}<th>{end:}Policies:</th>
+ {if:fieldFail.policy}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="policy" id="policy">{performanceDetail.policy:h}</textarea>
+ {if:fieldFail.policy}<br>{fieldFail.policy}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.voucher_text}<th class="emRequiredInputField">{else:}<th>{end:}Text for {term.voucher.cap}:</th>
+ {if:fieldFail.voucher_test}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="voucher_text" id="voucher_text">{performanceDetail.voucher_text:h}</textarea><br>
+ Please be brief to conserve space on {term.voucher.plur}.<br>
+ There is no formatting permitted for this field.
+ {if:fieldFail.voucher_text}<br>{fieldFail.voucher_text}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.conf_text}<th class="emRequiredInputField">{else:}<th>{end:}Text for Confirmation E-Mail:</th>
+ {if:fieldFail.conf_text}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="conf_text" id="conf_text">{performanceDetail.conf_text:h}</textarea>
+ <p>This is text that will be included inside the confirmation E-Mail sent to the purchaser upon checkout.
+ It can be placed in the desired location by editing the checkout E-Mail for the related {term.prop.norm}
+ and inserting "{{term.prop.norm}-text}" at the desired location.</p>
+ <p>Note that there is one E-Mail message sent for a purchase at a particular {term.prop.norm} and that
+ each {term.performance.norm} that includes text in this field will contribute to the entire E-Mail. If
+ you add the same text to this field in multiple {term.performance.plur}, it will show up multiple times
+ in the confirmation E-Mail message. If there is text you would always like included, consider entering
+ it into the checkout E-Mail in the edit screen for the {term.prop.norm}.</p>
+ {if:fieldFail.conf_text}<br>{fieldFail.cont_text}{end:}
+ </td>
+ </tr>
+ {if:checkPermission(#0#)}
+ <tr>
+ <th>Promote in Cart:</th>
+ <td>
+ {if:performanceDetail.promote_in_cart.value}
+ <input type="checkbox" name="promote_in_cart" checked="yes">
+ {else:}
+ <input type="checkbox" name="promote_in_cart">
+ {end:}
+ </td>
+ </tr>
+ {else:}
+ <tr><th>Promote in Cart:</th><td>{performanceDetail.promote_in_cart.name}</td></tr>
+ {end:}
+ <tr>
+ {if:fieldRequired.sort}<th class="requiredField">{else:}<th>{end:}Output Order:</th>
+ {if:fieldFail.sort}<td class="badField">{else:}<td>{end:}
+ <input type="text" name="sort" value="{performanceDetail.sort:h}" class="textInputShort">
+ {if:fieldFail.sort}<br>{fieldFail.sort}{end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+
+ <div id="performanceFormSubmit" class="submitKeepOnPage">
+ {if:addingNewPerformance}
+ <input type="submit" value="Add new {term.performance.norm}" class="emEditSubmit">
+ {end:}
+ {if:editingPerformance}
+ <input type="submit" value="Update {term.performance.norm}" class="emEditSubmit">
+ {end:}
+ </div>
+
+
+ </form>
+
+ {else:}
+ <h2>No {term.performance.norm} has been selected yet.</h2>
+ <p>To edit a {term.performance.norm}, first select it from the list of available {term.performance.plur}.
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.performanceEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#PerformanceForm').ajaxForm({
+ success: function(data) {
+ {if:addingNewPerformance}
+ f_replaceContents(data, $('#Performance_detail_container'));
+ {end:}
+ {if:editingPerformance}
+ f_replaceContents(data, $('#Performance_info_container'));
+ {end:}
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#performanceFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#descr"));
+ f_buildCkeditor($("#policy"));
+ f_buildCkeditor($("#conf_text"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ f_removeCkeditor($("#policy"));
+ f_removeCkeditor($("#conf_text"));
+ });
+
+ /*
+ * Date input operations
+ */
+
+ // Code to start datepicker for each date input
+ $("#startDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{performanceDetail.start_date.date_list.min}',
+ maxDate: '{performanceDetail.start_date.date_list.max}'
+ });
+ $("#endDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{performanceDetail.end_date.date_list.min}',
+ maxDate: '{performanceDetail.end_date.date_list.max}'
+ });
+ $("#cutoffDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{performanceDetail.cutoff_date.date_list.min}',
+ maxDate: '{performanceDetail.cutoff_date.date_list.max}'
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<!-- Performance List -->
+<div class="emBlock">
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Performance_add" emContainerId="Performance_detail_container" emTabParams="" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Add a {term.performance.cap}</div>
+ </div>
+ <div class="emTab emLink" style="float: right;">
+ <div id="PerformanceListSizeChange">Larger Table</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ Search {term.performance.plur_cap}: <input type="text" id="performancesSearch" name="performancesSearchField"> (type any portion of a {term.performance.norm} name)
+
+ {if:performanceList}
+
+ <div id="PerformanceListTable_wrapper" class="emListTableContainer">
+ <table id="PerformanceListTable" class="emListTable">
+ <thead>
+ <tr><th style="width: 60px;">Sort Order</th><th>Name</th><th>Active</th><th>Admin Only</th><th>{term.prop.cap}</th><th>Promote in Cart</tr>
+ </thead>
+ <tbody>
+ {foreach:performanceList,c}
+ <tr>
+ <td>{c.sort}</td>
+ <td emPerformanceId="{c.id}" class="emLink performanceListSelect">{c.name:h}</td>
+ <td emTicketId="{c.id}" class="emLink ticketListSelect">{c.active.name}</td>
+ <td emTicketId="{c.id}" class="emLink ticketListSelect">{c.admin_only.name}</td>
+ <td emPerformanceId="{c.id}" class="emLink performanceListSelect">{c.member_name:h}</td>
+ <td>{c.promote_in_cart.name}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No {term.performance.plur} listed.</p>
+ <p>
+ You need to have at least one {term.performance.norm} in order to sell {term.ticket.plur}.
+ If you have a {term.prop.norm} that sells {term.ticket.plur} through other {term.prop.plur},
+ then that {term.prop.norm} will need at least one {term.performance.norm}. If you're doing that,
+ the {term.prop.norm} that will be selling those {term.ticket.plur} does not need a
+ {term.performance.norm} unless it will be selling its own.
+ </p>
+ {end:}
+
+ <div id="Performance_detail_container" class="emContentAreaHidden">
+ <!-- This is a container for performance information -->
+ </div>
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // Performances Search
+ var performancesSearchData = [
+ {foreach:performanceList,c}
+ {label:'{c.name:h}', value:'{c.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var PerformanceListTable = $('#PerformanceListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ "aoColumns" : [
+ { sWidth: '80px', "sType": "numeric" },
+ null,
+ null,
+ null,
+ null,
+ null
+ ]
+ });
+
+ $(window).resize(function(){
+ PerformanceListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var PerformanceListTableSmall = true;
+ var PerformanceListTableHeight = $('#PerformanceListTable_wrapper div.dataTables_scrollBody').height();
+ $('#PerformanceListSizeChange').click(function() {
+ if (PerformanceListTableSmall) {
+ $('#PerformanceListTable_wrapper div.dataTables_scrollBody').height('auto');
+ PerformanceListTableSmall = false;
+ $(this).html('Smaller Table');
+ PerformanceListTable.fnSettings().oScroll.sY = '100%';
+ PerformanceListTable.fnDraw();
+ } else {
+ $('#PerformanceListTable_wrapper div.dataTables_scrollBody').height(PerformanceListTableHeight);
+ PerformanceListTableSmall = true;
+ $(this).html('Larger Table');
+ PerformanceListTable.fnSettings().oScroll.sY = '100px';
+ PerformanceListTable.fnDraw();
+ }
+ });
+
+ // Close all local sliders
+ $('#Performance_detail_container').hide(duration);
+
+ $('.performanceListSelect').click(function(){
+ $('#PerformanceListTable_wrapper div.dataTables_scrollBody').height(PerformanceListTableHeight);
+ PerformanceListTableSmall = true;
+ $('#PerformanceListSizeChange').html('Larger Table');
+ PerformanceListTable.fnSettings().oScroll.sY = '100px';
+ PerformanceListTable.fnDraw();
+ f_loadAction('Performance_selected', 'Performance_detail_container', 'PerformanceID=' + $(this).attr('emPerformanceId') + '&tabList={tabList}');
+ $('#Performance_info').removeClass('emContentAreaHidden');
+ });
+
+ // Search Performances
+ $("#performancesSearch").autocomplete({
+ source: performancesSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#performancesSearch").attr({value: ui.item.label});
+ f_loadAction('Performance_selected', 'Performance_detail_container', 'PerformanceID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ {if:displayPerformance}
+ f_loadAction('Performance_selected', 'Performance_detail_container', 'PerformanceID=' + {displayPerformance} + '&tabList={tabList}');
+ {end:}
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+ Reloading...
+</div> <!-- /emBlock -->
+
+
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ performanceID="performanceDetail.id"
+>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+ f_loadAction('Performance_list', 'Main_container', 'PerformancesListOption=all&performanceID=' + flex_performanceID + '&tabList={flex_tabList}');
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<div class="emBlock">
+
+ <div style="float: left;">
+ <div class="emBlockName">{term.performance.cap}: {performanceDetail.name:h}</div>
+ </div>
+
+ <div class="emBlock">
+
+ <!--
+ Sub Tabs
+ -->
+{if:checkPermission(#20#)}
+ <div class="emSubTabs">
+ <div flexy:if="!blockTab.Performance_detail" id="Performance_detail" emTabId="Performance_detail" emContainerId="Performance_info_container" emTabParams="tabList={tabList}" emTabGroup="PerformanceTabs" class="emTab PerformanceTabs emLink emTabSelected">
+ <div class="emTabName">{term.performance.cap} Detail</div>
+ </div>
+ {if:checkPermission(#0#)}
+ <div flexy:if="!blockTab.Member_selected" id="Member_selected" emTabId="Member_selected" emContainerId="Performance_info_container" emTabParams="MemberID={performanceDetail.member_id}&tabList={tabList}" emTabGroup="PerformanceTabs" class="emTab PerformanceTabs emLink">
+ <div class="emTabName">{term.prop.cap}</div>
+ </div>
+ {end:}
+ <div flexy:if="!blockTab.Ticket_list" id="Ticket_list" emTabId="Ticket_list" emContainerId="Performance_info_container" emTabParams="tabList={tabList}" emTabGroup="PerformanceTabs" class="emTab PerformanceTabs emLink">
+ <div class="emTabName">{term.ticket.plur_cap}</div>
+ </div>
+ <div flexy:if="!blockTab.Performance_summary" id="Performance_summary" emTabId="Performance_summary" emContainerId="Performance_info_container" emTabParams="performanceID={performanceDetail.id}&tabList={tabList}" emTabGroup="PerformanceTabs" class="emTab PerformanceTabs emLink">
+ <div class="emTabName">Inventory Summary</div>
+ </div>
+ </div> <!-- emSubTabs -->
+{end:}
+ <!--
+ Content Areas
+ -->
+ <div id="Performance_info_container" class="emContentArea emSlider">
+ </div>
+
+ </div> <!-- emBlock -->
+
+</div> <!-- emBlock -->
+
+
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ // Start with performance detail loaded
+ f_loadAction('Performance_detail', 'Performance_info_container', "tabList={tabList}");
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<!-- Performance List -->
+<div class="emBlock">
+
+ <div style="padding: 4px;">
+ Select Year to Display: <select id="inventoryYearSelector" name="inventoryYear">{$thisYear} -
+ {foreach:years,y}
+ {if:y.selected}
+ <option value="{y.year}" selected>{y.year}</option>
+ {else:}
+ <option value="{y.year}">{y.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+
+ {if:performanceSummary}
+
+ <div class="emSummaryTableContainer">
+ <table id="PerformanceSummaryTable" class="emListTable">
+ <thead>
+ <tr>
+ <th>Date</th>
+ <th>Time</th>
+ <th>Section</th>
+ <th>Ticket</th>
+ <th>Quant</th>
+ <th>Sold</th>
+ <th>Available</th>
+ <th>Held</th>
+ <th>Net Available</th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:performanceSummary,a}
+ {if:a.active}
+ <tr>
+ {else:}
+ <tr style="background-color: #eee; color: #888;">
+ {end:}
+ <td>{a.date}</td>
+ <td>{a.time}</td>
+ <td>{a.section}</td>
+ <td>{a.name}
+ {if:a.active}
+ {else:}
+ (inactive)
+ {end:}
+ </td>
+ <td>{if:a.unlimited_quant}(unlim){else:}{a.quant}{end:}</td>
+ <td>{a.sold}</td>
+ <td>{if:a.unlimited_quant}(unlim){else:}{a.avail}{end:}</td>
+ {if:a.held}
+ <td>{a.held}</td>
+ {else:}
+ <td></td>
+ {end:}
+ <td>{a.netAvail}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ <p style="font-size: 75%;">Grayed-out entries are currently set to inactive.</p>
+
+ {else:}
+ <p>No {term.performance.plur} listed.</p>
+ {end:}
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var PerformanceSummaryTable = $('#PerformanceSummaryTable').dataTable({
+// "sScrollY": "500px",
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ "aoColumns" : [
+ { sWidth: '120px' },
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ]
+ });
+ $(window).resize(function(){
+ PerformanceSummaryTable.fnDraw();
+ });
+
+ $('#inventoryYearSelector').on('change', null, function() {
+ inventoryYear = $('#inventoryYearSelector').val();
+ f_loadAction('Performance_summary', 'Performance_info_container', 'inventoryYear='+inventoryYear);
+ });
+
+
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">Delete this {term.promo.cap}</div>
+
+ <div class="emBlockName">{PromoDetail.name}</div>
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Promo_confirmDelete" emContainerId="Promo_detail_container" emTabParams="id={promoDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Confirm Delete</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Promo_detail" emContainerId="Promo_detail_container" emTabParams="id={promoDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel Delete</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:promoDetail}
+ <div class="emListTableContainerLeft">
+ <table id="PromoDeleteTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>Delete {term.promo.cap}:</th>
+ <td>
+ <h3 style="color: red;">Clicking "Confirm Delete" on the right will permanently delete this {term.ticket.norm} add-on.</h3>
+ </td>
+ </tr>
+ <tr><th>{term.promo.cap}:</th><td>{promoDetail.name}<span style="float: right;">ID: {promoDetail.id}</span></td></tr>
+ <tr><th>Description:</th><td>{promoDetail.descr:h}</td></tr>
+ <tr><th>Start Date:</th><td>{promoDetail.start_date.date}</td></tr>
+ <tr><th>End Date:</th><td>{promoDetail.end_date.date}</td></tr>
+ <tr><th>Notes:</th><td>{promoDetail.notes:h}</td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.promo.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#PromoDeleteTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+<!-- <div class="emBlockName">{promoDetail.name}</div> -->
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Promo_delete" emContainerId="Promo_detail_container" emTabParams="PromoID={promoDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.promo.cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Promo_edit" emContainerId="Promo_detail_container" emTabParams="PromoID={promoDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.promo.cap}</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:promoDetail}
+ <div class="emListTableContainerLeft">
+ <table id="PromoDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:promoDetail.delete}
+ <tr>
+ <th>Delete {term.promo.cap}:</th>
+ <td>
+ {if:promoDetail.deleteConfirmed}
+ {if:promoDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {promoDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+ <button id="confirmPromoDelete" value="{promoDetail.id}">Click here to confirm that this {term.promo.norm} should be deleted.</button><br>
+ <h3 style="color: red;">Clicking the button above will permanently delete this {term.promo.norm}.</h3>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>{term.promo.cap}:</th><td>{promoDetail.name}<span style="float: right;">ID: {promoDetail.id}</span></td></tr>
+ <tr><th>{term.promo.cap} Long Name:</th><td>{promoDetail.long_name:h}</td></tr>
+ <tr><th>Description:</th><td>{promoDetail.descr:h}</td></tr>
+ <tr><th>Start Date:</th><td>{promoDetail.start_date.date}</td></tr>
+ <tr><th>End Date:</th><td>{promoDetail.end_date.date}</td></tr>
+ <tr><th>Notes:</th><td>{promoDetail.notes:h}</td></tr>
+ </tbody>
+ </table>
+ <form id="promoTicketForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ <input type="hidden" name="Action" value="Promo_detail">
+ <input type="hidden" name="Option" value="update_promoTickets">
+
+ <div class="emBlockName" style="margin-top: 1em;">{term.promo.cap} {term.ticket.plur_cap}
+ <div class="promoTicketFormSubmit" style="float: right;">
+ <input type="submit" value="Update {term.promo.norm} {term.ticket.plur}" class="emEditSubmit">
+ </div>
+
+ <table id="PromoTicketTable" class="emListTable">
+ <thead>
+ <tr><th>Delete</th><th>{term.ticket.cap} Name</th><th>Type</th><th>$ or %</th><th># Sold</th><th>$ Credit</th><th>Notes</th></tr>
+ </thead>
+ <tbody>
+ {foreach:promoTicketsList,p}
+ <tr>
+ <td><input type="checkbox" name="delete[{p.id}]"></td>
+ <td>{p.ticket_name}<input type="hidden" name="ticket[{p.id}]" value="{p.ticket}"></td>
+ <td>{p.promo_type.name}<input type="hidden" name="type[{p.id}]" value="{p.promo_type.value}"></td>
+ <td><input type="text" name="amount[{p.id}]" value="{p.amount}" style="width: 4em;"></td>
+ <td>{p.numberSold}</td>
+ <td>{p.dollarsSold}</td>
+ <td><textarea name="notes[{p.id}]" style="height: 1.9em; width: 100%;">{p.notes}</textarea></td>
+ </tr>
+ {end:}
+ <tr>
+ <td>
+ <input type="submit" value="Add" class="emEditSubmit">
+ </td>
+ <td>
+ <select name="ticket[0]">
+ <option value=""></option>
+ {foreach:ticketsList,q}
+ <option value="{q.id}">{q.name} - {q.performance}</option>
+ {end:}
+ </select>
+ </td>
+ <td>
+ <select name="type[0]">
+ {foreach:promoTicketTypes,q}
+ <option value="{q.id}">{q.name}</option>
+ {end:}
+ </select>
+ </td>
+ <td><input type="text" name="amount[0]" value="" style="width: 4em;"></td>
+ <td> </td>
+ <td> </td>
+ <td><textarea name="notes[0]" value="" style="height: 1.8em;"></textarea></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td>Totals</td>
+ <th>{numberTotal}</th>
+ <th>{dollarsTotal}</th>
+ <td> </td>
+
+ </tr>
+ </tbody>
+ </table>
+ </form>
+ </div>
+ {else:}
+ <p>No {term.promo.plur} found.</p>
+ {end:}
+
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#PromoDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+ $('#PromoTicketTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ "aoColumns" : [
+ { sWidth: '40px', "sType": "numeric" },
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ]
+ });
+
+ f_restartOnTabSelect();
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#promoTicketForm').ajaxForm({
+ success: function(data) {
+ var container = $('#Promo_detail_container');
+ f_replaceContents(data, container);
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('.promoTicketFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewPromo}Adding New {term.promo.cap}{end:}
+ {if:editingPromo}Editing {term.promo.cap}{end:}
+ </div>
+
+ <div class="emUsdTabs">
+{if:addingNewPromo}
+ <div flexy:if="checkPermission(#10#)" emTabId="Misc_blank" emContainerId="Promo_detail_container" emTabParams="id={promoDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{else:}
+ <div flexy:if="checkPermission(#10#)" emTabId="Promo_detail" emContainerId="Promo_detail_container" emTabParams="id={promoDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{end:}
+ </div> <!-- emSubTabs -->
+
+{if:formFail}
+ <div class="emRequiredInputField">Not all fields were filled in correctly. Please try again.</div>
+{end:}
+
+ <div class=".emForm">
+
+ {if:promoDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="promoForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewPromo}
+ <input type="hidden" name="Action" value="Promo_insert">
+ {else:}
+ <input type="hidden" name="Action" value="Promo_update">
+ {end:}
+
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+ <input type="hidden" name="tabList" value="{tabList}">
+ <input type="hidden" name="PromoID" value="{promoDetail.id}">
+
+ <div class="emListTableContainer">
+ <table class="emListTable promoEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ {if:fieldRequired.name}<th class="emRequiredInputField">{else:}<th>{end:}{term.promo.cap}:</th>
+ {if:fieldFail.name}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="name" value="{promoDetail.name:h}" class="emTextInputMedium"><br>
+ {if:fieldFail.name}<br>{fieldFail.name}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.long_name}<th class="emRequiredInputField">{else:}<th>{end:}{term.promo.cap} Long Name:</th>
+ {if:fieldFail.long_name}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="long_name" value="{promoDetail.long_name:h}" class="emTextInput"><br>
+ For internal reference.
+ {if:fieldFail.long_name}<br>{fieldFail.long_name}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.descr}<th class="emRequiredInputField">{else:}<th>{end:}Description:</th>
+ {if:fieldFail.descr}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea type="text" name="descr" id="descr">{promoDetail.descr:h}</textarea>
+ {if:fieldFail.descr}<br>{fieldFail.descr}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.start_date}<th class="emRequiredInputField">{else:}<th>{end:}Start Date:</th>
+ {if:fieldFail.start_date}<td class="emBadInputField">{else:}<td>{end:}
+ {if:addingNewPromo}
+ <input type="text" id="startDateInput" name="start_date" value="" class="emTextInputShort">
+ {else:}
+ <input type="text" id="startDateInput" name="start_date" value="{promoDetail.start_date.date:h}" class="emTextInputShort">
+ {end:}
+ {if:fieldFail.start_date}<br>{fieldFail.start_date}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.end_date}<th class="emRequiredInputField">{else:}<th>{end:}End Date:</th>
+ {if:fieldFail.end_date}<td class="emBadInputField">{else:}<td>{end:}
+ {if:addingNewPromo}
+ <input type="text" id="endDateInput" name="end_date" value="" class="emTextInputShort">
+ {else:}
+ <input type="text" id="endDateInput" name="end_date" value="{promoDetail.end_date.date:h}" class="emTextInputShort">
+ {end:}
+ {if:fieldFail.end_date}<br>{fieldFail.end_date}{end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id="promoFormSubmit" class="submitKeepOnPage">
+ {if:addingNewPromo}
+ <input type="submit" value="Add new {term.ticket.norm} add-on" class="emEditSubmit">
+ {end:}
+ {if:editingPromo}
+ <input type="submit" value="Update {term.ticket.norm} add-on" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No {term.ticket.norm} add-on has been selected yet.</h2>
+ <p>To edit a {term.ticket.norm} add-on, first select it from the list of available {term.ticket.plur} add-ons.
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.promoEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#promoForm').ajaxForm({
+ success: function(data) {
+ {if:addingNewPromo}
+ var container = $('#Promo_detail_container');
+ f_replaceContents(data, container);
+ {end:}
+ {if:editingPromo}
+ var container = $('#Promo_detail_container');
+ f_replaceContents(data, container);
+ {end:}
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#promoFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#descr"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ });
+
+ f_restartOnTabSelect();
+
+ function promoTypeCheck(e) {
+ typeval = $('#promoType').val();
+
+ // If this is a quantity selection
+ if (typeval == 2) {
+ $('#max_quant').show();
+ } else {
+ $('#max_quant').hide();
+ }
+ }
+
+ $('#promoType').change( function() {
+ promoTypeCheck();
+ });
+ promoTypeCheck();
+
+ /*
+ * Date input operations
+ */
+
+ // Code to start datepicker for each date input
+ $("#startDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{performanceDetail.start_date.date_list.min}',
+ maxDate: '{performanceDetail.start_date.date_list.max}'
+ });
+ $("#endDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{performanceDetail.start_date.date_list.min}',
+ maxDate: '{performanceDetail.start_date.date_list.max}'
+ });
+
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Promotions List -->
+<div class="emBlock">
+
+ <div id="Promo_container" class="emSliderClosed">
+ <div class="emUsdTabs">
+{if:checkPermission(#10#)}
+ <div flexy:if="!blockTab.Promo_add" emTabId="Promo_add" emContainerId="Promo_detail_container" emTabParams="tabList={tabList}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Add a {term.promo.cap}</div>
+ </div>
+{end:}
+ <div class="emTab emLink" style="float: right;">
+ <div id="promoListSizeChange">Larger Table</div>
+ </div>
+ </div> <!-- emSubTabs -->
+ Search {term.promo.plur_cap}: <input type="text" id="promosSearch" name="promosSearchField"> (start typing any information in list)
+
+ {if:promos}
+
+ <div id="PromoListTable_wrapper" class="emListTableContainer">
+ <table id="PromoListTable" class="emListTable">
+ <thead>
+ <tr><th>{term.promo.cap}</th><th>Long Name</th><th>Start Date</th><th>End Date</th></tr>
+ </thead>
+ <tbody>
+ {foreach:promos,c}
+ <tr>
+ <td emPromoId="{c.id}" class="emLink promoListSelect">{c.name:h}</td>
+ <td emPromoId="{c.id}" class="emLink promoListSelect">{c.long_name:h}</td>
+ <td emPromoId="{c.id}" class="emLink promoListSelect">{c.start_date.date}</td>
+ <td emPromoId="{c.id}" class="emLink promoListSelect">{c.end_date.date}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No {term.promo.plur}.</p>
+ {end:}
+
+ <div id="Promo_detail_container" class="emSliderClosed">
+ </div>
+
+ </div>
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // Promotions Search
+ var promosSearchData = [
+ {foreach:promos,c}
+ {label:'{c.name:h}, {c.long_name:h}, {c.start_date.date}, {c.end_date.date}', value:'{c.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var PromoListTable = $('#PromoListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ });
+ $(window).resize(function(){
+ PromoListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var PromoListTableSmall = true;
+ var PromoListTableHeight = $('#PromoListTable_wrapper div.dataTables_scrollBody').height();
+ $('#promoListSizeChange').click(function() {
+ if (PromoListTableSmall) {
+ $('#PromoListTable_wrapper div.dataTables_scrollBody').height('auto');
+ PromoListTableSmall = false;
+ $(this).html('Smaller Table');
+ PromoListTable.fnSettings().oScroll.sY = '100%';
+ PromoListTable.fnDraw();
+ } else {
+ $('#PromoListTable_wrapper div.dataTables_scrollBody').height(PromoListTableHeight);
+ PromoListTableSmall = true;
+ $(this).html('Larger Table');
+ PromoListTable.fnSettings().oScroll.sY = '100px';
+ PromoListTable.fnDraw();
+ }
+ });
+
+ // Close all local sliders
+ $('#Promo_detail').hide(duration);
+
+ $('.promoListSelect').click(function(){
+ $('#PromoListTable_wrapper div.dataTables_scrollBody').height(PromoListTableHeight);
+ PromoListTableSmall = true;
+ $('#promoListSizeChange').html('Larger Table');
+ PromoListTable.fnSettings().oScroll.sY = '100px';
+ PromoListTable.fnDraw();
+ f_loadAction('Promo_selected', 'Promo_detail_container', 'PromoID=' + $(this).attr('emPromoId') + '&tabList={tabList}');
+ });
+
+ // Search Promotions
+ $("#promosSearch").autocomplete({
+ source: promosSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#promosSearch").attr({value: ui.item.label});
+ f_loadAction('Promo_selected', 'Promo_detail_container', 'PromoID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div style="float: left;">
+ <div class="emBlockName">{term.promo.cap}: {promoDetail.name}</div>
+ </div>
+
+ <div class="emBlock">
+
+ <!--
+ Content Areas
+ -->
+ <div id="Promo_detail_container" class="emContentArea emSlider">
+ </div>
+
+ </div> <!-- emBlock -->
+
+</div> <!-- emBlock -->
+
+
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ // Start with ticket detail loaded
+ f_loadAction('Promo_detail', 'Promo_detail_container', "tabList={tabList}");
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<!-- Sales Report -->
+
+{if:printOutput}
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+{end:}
+
+
+
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">Custom Report</span>
+ <span style="float: right;" class="emBlockName">Report Produced: {reportDate} {reportTime}</span>
+ <br clear="all">
+ <div class="emBlockName" style="text-align: center; width: 100%;">{reportNote}</div>
+
+
+ <div class="emReportTableContainer">
+ <small>
+ <table id="SalesReportTable" class="emListTable" style="width: 100%" border="1">
+ <thead>
+ <tr>
+ <th>Scanned By</th>
+ {if:checkPermission(#0#)}<th>{term.prop.cap}</th>{end:}
+ <th>{term.performance.cap}</th>
+ <th>{term.section.cap}</th>
+ <th>{term.ticket.cap}</th>
+ <th>Date/Time</th>
+ <th>{term.voucher.cap}</th>
+ <th>Scans</th>
+ <th>First Name</th>
+ <th>Last Name</th>
+ <th>City</th>
+ <th>State</th>
+ <th>Phone</th>
+ <th>E-Mail</th>
+ <th width="1%"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:reportData,r}
+ <tr>
+ <td style="text-wrap: none; white-space: nowrap;">{r.scannedBy}</td>
+ {if:checkPermission(#0#)}<td style="text-wrap: none; white-space: nowrap;">{r.member:h}</td>{end:}
+ <td style="text-wrap: none; white-space: nowrap;">{r.performance:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.section:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.ticket:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.dateTime}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.voucher}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.scans}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.fname:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.lname:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.city:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.state:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.phone:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.email:h}</td>
+ <th width="1%"></th>
+ </tr>
+ {end:}
+ <tr>
+ <td> </td>
+ {if:checkPermission(#0#)}<td> </td>{end:}
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <th width="1%"></th>
+ </tr>
+ <tr>
+ <th>Grand Totals</th>
+ <th> </th>
+ {if:checkPermission(#0#)}
+ <th> </th>
+ {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="left">{totalVouchers}</th>
+ <th align="left">{totalScans}</th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th width="1%"></th>
+ </tr>
+ </tbody>
+ </table>
+ </small>
+ </div>
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var SalesReportTable = $('#SalesReportTable').dataTable({
+ "sScrollY": "600px",
+ "sScrollX": "100%",
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false
+ });
+ $(window).resize(function(){
+ SalesReportTable.fnDraw();
+ });
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+
+{if:printOutput}
+ </body>
+</html>
+{end:}
--- /dev/null
+"Sales Report","Report Produced: {reportDate}","{reportTime}","Dates:","{dateFrom}","through","{dateTo}"
+
+"Scanned By",{if:checkPermission(#0#)}"{term.prop.cap}",{end:}"{term.performance.cap}","{term.section.cap}","{term.ticket.cap}","Date/Time","{term.voucher.cap}","Scans","First Name","Last Name","City","State","Phone","E-Mail"
+{foreach:reportData,r}"{r.scannedBy:h}"{if:checkPermission(#0#)},"{r.memb_name:h}",{end:}"{r.performance:h}","{r.section:h}","{r.ticket:h}","{r.dateTime:h}","{r.voucher}","{r.scans}","{r.fname:h}","{r.lname:h}","{r.city:h}","{r.state:h}","{r.phone:h}","{r.email:h}"
+{end:}
+"Grand Totals",{if:checkPermission(#0#)}"",{end:}"","","","","{totalVouchers}","{totalScans}"
+
--- /dev/null
+<!-- Sales Report -->
+
+{if:printOutput}
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+{end:}
+
+
+
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">Custom Report</span>
+ <span style="float: right;" class="emBlockName">Report Produced: {reportDate} {reportTime}</span>
+ <br clear="all">
+ <div class="emBlockName" style="text-align: center; width: 100%;">{reportNote}</div>
+
+ {if:salesList}
+
+ <div class="emReportTableContainer">
+ <small>
+ <table id="SalesReportTable" class="emListTable" style="width: 100%" border="1">
+ <thead>
+ <tr>
+ {if:checkPermission(#0#)}<th>{term.prop.cap}</th>{end:}
+ <th>{term.performance.cap}</th>
+ <th>Date</th>
+ <th>Time</th>
+ <th>Order ID</th>
+ <th>{term.voucher.cap}</th>
+ <th>Scans</th>
+ <th>Scanned By</th>
+ <th>First Name</th>
+ <th>Last Name</th>
+ <th>City</th>
+ <th>State</th>
+ <th width="1%"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:salesList,r}
+ <tr>
+ {if:checkPermission(#0#)}<td style="text-wrap: none; white-space: nowrap;">{r.memb_name}</td>{end:}
+ <td style="text-wrap: none; white-space: nowrap;">{r.perf_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.date_date}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.time_time}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_id}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_voucher_id}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_numb_claims}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_claims}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_fname:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_lname:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_city:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_state:h}</td>
+ <th width="1%"></th>
+ </tr>
+ {end:}
+ <tr>
+ {if:checkPermission(#0#)}<td> </td>{end:}
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <th width="1%"></th>
+ </tr>
+ <tr>
+ <th>Grand Totals</th>
+ {if:checkPermission(#0#)}
+ <th> </th>
+ {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="right">{numbVouchers}</th>
+ <th align="right">{numbClaims}</th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th width="1%"></th>
+ </tr>
+ </tbody>
+ </table>
+ </small>
+ </div>
+
+ {else:}
+ <p>No results found.</p>
+ {end:}
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var SalesReportTable = $('#SalesReportTable').dataTable({
+ "sScrollY": "600px",
+ "sScrollX": "100%",
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false
+ });
+ $(window).resize(function(){
+ SalesReportTable.fnDraw();
+ });
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+
+{if:printOutput}
+ </body>
+</html>
+{end:}
--- /dev/null
+"Sales Report","Report Produced: {reportDate}","{reportTime}","Dates:","{dateFrom}","through","{dateTo}"
+
+{if:salesList}{if:checkPermission(#0#)}"{term.prop.cap}",{end:}"{term.performance.cap}","Date","Time","Order ID","{term.voucher.cap}","Scans","Scanned By","First Name","Last Name","City","State"
+{foreach:salesList,r}{if:checkPermission(#0#)}"{r.memb_name}",{end:}"{r.perf_name}","{r.date_date}","{r.time_time}","{r.order_id}","{r.order_voucher_id}","{r.order_numb_claims}","{r.order_claims}","{r.order_fname:h}","{r.order_lname:h}","{r.order_city:h}","{r.order_state:h}"
+{end:}
+"Grand Totals",{if:checkPermission(#0#)}"",{end:}"","","","{numbVouchers}","{numbClaims}"
+
+{else:}
+No results found.
+{end:}
+
--- /dev/null
+<!-- Sales Report -->
+
+{if:printOutput}
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+{end:}
+
+
+
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">Manifest</span>
+ <span style="float: right;" class="emBlockName">Report Produced: {reportDate} {reportTime}</span>
+ <br clear="all">
+ <div class="emBlockName" style="text-align: center; width: 100%;">{reportNote}</div>
+
+
+ <div class="emReportTableContainer">
+ <small>
+ <table id="SalesReportTable" class="emListTable" style="width: 100%" border="1">
+ <thead>
+ <tr>
+ <th>{term.performance.cap}</th>
+ <th>{term.ticket.cap}</th>
+ <th>Date</th>
+ <th>Time</th>
+ <th>Order</th>
+ <th>Voucher</th>
+ <th>Last Name</th>
+ <th>First Name</th>
+ <th>Phone</th>
+ <th>Notes</th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:reportData,r}
+ <tr>
+ <td style="text-wrap: none; white-space: nowrap;">{r.performance_name:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.ticket_name:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.ticket_date}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.ticket_time}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.ticket_order}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.voucher}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.lname:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.fname:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.phone:h}</td>
+ <td>{r.notes:h}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </small>
+ </div>
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var SalesReportTable = $('#SalesReportTable').dataTable({
+ "sScrollY": "600px",
+ "sScrollX": "100%",
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false
+ });
+ $(window).resize(function(){
+ SalesReportTable.fnDraw();
+ });
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+
+{if:printOutput}
+ </body>
+</html>
+{end:}
--- /dev/null
+"Manifest","Report Produced:","{reportDate}","{reportTime}","Dates:","{dateFrom}","through","{dateTo}"\r
+\r
+"{term.performance.cap}","{term.ticket.cap}","Date","Time","Order","Voucher","Last Name","First Name","Phone","Notes"\r
+{foreach:reportData,r}"{r.performance_name:h}","{r.ticket_name:h}","{r.ticket_date}","{r.ticket_time}","{r.ticket_order}","{r.voucher}","{r.lname:h}","{r.fname:h}","{r.phone:h}","{r.notes:h}"\r
+{end:} \r
+\r
--- /dev/null
+ <div class="emBlock">\r
+\r
+ <div class="emBlockName">\r
+ Custom Report Selection\r
+ </div>\r
+ \r
+ <div class=".emForm">\r
+ \r
+ <form id="customReportForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">\r
+ <input type="hidden" name="Action" value="Report_custom">\r
+ <input type="hidden" name="tabList" value="{tabList}">\r
+ <input type="hidden" name="claimed" value="on">\r
+{if:!checkPermission(#0#)}\r
+ <input type="hidden" name="memberID" value="{userMemberID}">\r
+{end:} \r
+ <div class="emListTableContainer">\r
+ <table class="emListTable customReportTable">\r
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead> \r
+ <tbody>\r
+{if:checkPermission(#0#)} \r
+ <tr>\r
+ <th>Type of Report:</th>\r
+ <td>\r
+ <select id="reportType" name="reportType">\r
+ <option value="claimsSummary">Claims Summary</option>\r
+ <option value="claimsDetail">Claims Detail</option>\r
+ <option value="manifest">Manifest</option>\r
+ </select>\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>{term.prop.cap}:</th>\r
+ <td>\r
+ <select id="memberID" name="memberID">\r
+ <option value="0">(all {term.prop.plur})</option>\r
+ {foreach:mList,m}\r
+ <option value="{m.id}">{m.name:h}</option>\r
+ {end:}\r
+ </select>\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>Show inactive {term.prop.plur_cap}</th>\r
+ <td><input type="checkbox" name="inactive"></td>\r
+ </tr> \r
+{end:} \r
+ <tr>\r
+ <th>{term.performance.cap}:</th>\r
+ <td id="performanceSelect">\r
+ (select a {term.prop.norm} first)\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>Date Range:</th>\r
+ <td>\r
+ <select id="dateType" name="dateType">\r
+ <option value="all">(all dates)</option>\r
+ <option value="sold">Dates Sold</option>\r
+ <option value="ticket">{term.ticket.cap} Dates</option>\r
+ <option value="claimed" selected>Dates Claimed</option>\r
+ </select>\r
+ <span id="dateFields" class="">\r
+ \r
+ From: <input type="text" id="startDateInput" name="start_date" value="{thisDate}" class="emTextInputShort zTop"> \r
+ Through: <input type="text" id="endDateInput" name="end_date" value="{thisDate}" class="emTextInputShort zTop"> \r
+ </span>\r
+ </td>\r
+ </tr> \r
+ <tr>\r
+ <th>Output Type:</th>\r
+ <td>\r
+ <select id="outputType" name="outputType">\r
+ <option value="html" selected>Display in browser</option>\r
+ <option value="print">Display for printing</option>\r
+ <option value="csv">Download as a spreadsheet</option>\r
+ </select>\r
+ </td>\r
+ </tr> \r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ \r
+ <div id="customReportFormSubmit">\r
+ <input type="submit" name="customReport" value="Create Custom Report" class="emEditSubmit">\r
+ </div> \r
+ \r
+ </form>\r
+ \r
+ </div> <!-- / emForm -->\r
+ \r
+ <div id="report_result_container" style="overflow: scroll;"></div>\r
+ \r
+ \r
+</div> <!-- /emBlock -->\r
+\r
+{startScript:h}\r
+\r
+ var mList = new Array();\r
+ {foreach:mList,m}\r
+ mList[{m.id}] = '<select id="performanceID" name="performanceID"><option value="0">(all {term.performance.plur})</option>{foreach:m.performance,p}<option value="{p.id}">{p.name:h}</option>{end:}</select>';\r
+ {end:}\r
+ \r
+ $(function() {\r
+ \r
+ /*\r
+ * Table operations\r
+ */\r
+\r
+ $('.customReportTable').dataTable({\r
+ "bPaginate": false,\r
+ "bLengthChange": false,\r
+ "bFilter": false,\r
+ "bSort": false,\r
+ "bInfo": false,\r
+ "bAutoWidth": false,\r
+ "bDestroy": true,\r
+ "aoColumns" : [\r
+ { sWidth: '10%' },\r
+ null\r
+ ] \r
+ });\r
+ \r
+ /*\r
+ * AJAX form handling\r
+ */\r
+ \r
+ $('#customReportForm').ajaxForm({\r
+ beforeSubmit: function(xhr) {\r
+ \r
+ // Check if this is going to be a csv\r
+ var outputType = $('#outputType').val();\r
+ if (outputType == 'csv') {\r
+ \r
+ // Since this is a csv, open a new window with the desired URL and parameters rather than an ajax submit. \r
+ var url = appAdminURL + '&' + $('#customReportForm').formSerialize();\r
+ window.open(url, 'csvReport', 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,width=100, height=10');\r
+ return false; \r
+ }\r
+ },\r
+ success: function(data) { \r
+ \r
+ var outputType = $('#outputType').val();\r
+\r
+ if (outputType == 'print') { \r
+ var w = window.open('', 'printReport', 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25');\r
+ $(w.document.body).html(data);\r
+ } else {\r
+ f_replaceContents(data, $('#report_result_container'));\r
+ } \r
+\r
+ return false;\r
+ }\r
+ });\r
+ \r
+ // Block default form submission\r
+ $("#customReportForm").submit(function (e) {\r
+\r
+ var outputType = $('#outputType').val();\r
+\r
+ if (outputType == 'html') { \r
+ $('#report_result_container').html('<div class="emLoading">Submitting, Please Wait...</div>');\r
+ }\r
+ \r
+ e.preventDefault();\r
+ });\r
+ \r
+ \r
+ var currentMousePos = { x: -1, y: -1 };\r
+ $(document).mousemove(function(event) {\r
+ currentMousePos.x = event.pageX;\r
+ currentMousePos.y = event.pageY;\r
+ });\r
+ \r
+ // Code to start datepicker for each date input \r
+ $("#startDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [100,200]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ $("#endDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [200,300]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ \r
+ // Check if to hide dates\r
+ $('#dateType').on('change', null, function() {\r
+ var dateType = $(this).val();\r
+ if (dateType == 'all') {\r
+ $('#dateFields').addClass('emContentAreaHidden');\r
+ } else {\r
+ $('#dateFields').removeClass('emContentAreaHidden');\r
+ }\r
+ });\r
+ \r
+ // Selection of performance list\r
+ $('#memberID').on('change', null, function() {\r
+ var memberID = $(this).val();\r
+ $('#performanceSelect').html(mList[memberID]);\r
+ });\r
+ \r
+ f_restartOnTabSelect();\r
+ \r
+{if:!checkPermission(#0#)}\r
+ // This must be a member used so start with their performances loaded\r
+ $('#performanceSelect').html(mList[{userMemberID}]);\r
+{end:}\r
+\r
+ \r
+ \r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+<!-- Promo Report -->
+
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">Promo Detail Report</span>
+ <span style="float: right;" class="emBlockName">Report Produced: {reportDate} {reportTime}</span>
+ <br clear="all">
+ <div class="emBlockName" style="text-align: center; width: 100%;">{reportNote}</div>
+
+ <h3>There was a error with your request:</h3>
+ <div>{errorMsg:h}</div>
+ <p> </p>
+
+</div> <!-- emBlock -->
--- /dev/null
+<div class="emBlock">
+
+ <div style="float: left;">
+ <div class="emBlockName">Reports:</div>
+ </div>
+
+ <div class="emBlock">
+
+ <!--
+ Sub Tabs
+ -->
+{if:checkPermission(#20#)}
+ <div class="emSubTabs">
+ <div flexy:if="!blockTab.Report_orders" id="Report_orders" emTabId="Report_orders" emContainerId="Report_container" emTabParams="tabList={tabList}" emTabGroup="ReportTabs" class="emTab ReportTabs emLink emTabSelected">
+ <div class="emTabName">{term.ticket.cap} Orders</div>
+ </div>
+<!--
+ <div flexy:if="!blockTab.Report_member" id="Report_member" emTabId="Report_member" emContainerId="Report_container" emTabParams="tabList={tabList}" emTabGroup="ReportTabs" class="emTab ReportTabs emLink">
+ <div class="emTabName">{term.prop.plur_cap}</div>
+ </div>
+-->
+ <div flexy:if="!blockTab.Report_sales" id="Report_sales" emTabId="Report_sales" emContainerId="Report_container" emTabParams="tabList={tabList}" emTabGroup="ReportTabs" class="emTab ReportTabs emLink">
+ <div class="emTabName">{term.ticket.cap} Sales</div>
+ </div>
+ <div flexy:if="!blockTab.Report_promo" id="Report_promo" emTabId="Report_promo" emContainerId="Report_container" emTabParams="tabList={tabList}" emTabGroup="ReportTabs" class="emTab ReportTabs emLink">
+ <div class="emTabName">Promo Codes</div>
+ </div>
+ <div flexy:if="!blockTab.Report_custom" id="Report_custom" emTabId="Report_custom" emContainerId="Report_container" emTabParams="tabList={tabList}" emTabGroup="ReportTabs" class="emTab ReportTabs emLink">
+ <div class="emTabName">Custom</div>
+ </div>
+ </div> <!-- emSubTabs -->
+{end:}
+ <!--
+ Content Areas
+ -->
+ <div id="Report_container" class="emContentArea emSlider">
+ <div class="emBlock">(select report tab above)</div>
+ </div>
+
+ </div> <!-- emBlock -->
+</div> <!-- emBlock -->
+
+
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ // Start with Ticket Sales report form loaded
+ f_loadAction('Report_orders', 'Report_container', "tabList={tabList}");
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<!-- Member/Venue Report -->
+
+{if:printOutput}
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+{end:}
+
+
+
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">{term.prop.cap} Report</span>
+ <span style="float: right;" class="emBlockName">{reportDate} {reportTime}</span>
+ <br clear="all">
+ {reportNote}
+
+ {if:membersList}
+
+ <div class="emReportTableContainer">
+ <table id="MemberReportTable" class="emListTable" style="width: 100%;" border="1">
+ <thead>
+ <tr>
+ <th>{term.prop.cap} Name</th>
+ <th>Active</th>
+ <th align="right">{term.section.plur_cap}</th>
+ <th align="right">{term.performance.plur_cap}</th>
+ <th align="right">{term.ticket.plur_cap}</th>
+ <th align="right">Inventory</th>
+ <th align="right"># Sold</th>
+ <th align="right">$ Sold</th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:membersList,m}
+ {if:m.active.value}
+ <tr>
+ {else:}
+ <tr style="background-color: #eee; color: #888;">
+ {end:}
+ <td style="text-wrap: none; white-space: nowrap;">{m.name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{m.active.name}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{m.sectionStats}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{m.performanceStats}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{m.ticketStats}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{m.ticketSalesStats.totalquant}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{m.ticketSalesStats.totalsold}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{m.ticketSalesStats.totalMoney}</td>
+ </tr>
+ {end:}
+ <tr>
+ <td> </td>
+ <td style="text-wrap: none; white-space: nowrap; font-weight: bold;">Totals:</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap; font-weight: bold;">{totals.sections}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap; font-weight: bold;">{totals.events}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap; font-weight: bold;">{totals.tickets}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap; font-weight: bold;">{totals.inventory}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap; font-weight: bold;">{totals.sold}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap; font-weight: bold;">{totals.price}</td>
+ </tr>
+
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No results found.</p>
+ {end:}
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var MemberReportTable = $('#MemberReportTable').dataTable({
+ "sScrollX": "100%",
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false
+ });
+ $(window).resize(function(){
+ MemberReportTable.fnDraw();
+ });
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+
+{if:printOutput}
+ </body>
+</html>
+{end:}
--- /dev/null
+"{term.prop.cap} Report","{reportDate}","{reportTime}","{reportNote}"
+
+{if:membersList}"{term.prop.cap} Name","Active","{term.section.plur_cap}","{term.performance.plur_cap}","{term.ticket.plur_cap}","Inventory","# Sold","$ Sold"
+{foreach:membersList,m}"{m.name}","{m.active.name}","{m.sectionStats}","{m.performanceStats}","{m.ticketStats}","{m.ticketSalesStats.totalquant}","{m.ticketSalesStats.totalsold}","{m.ticketSalesStats.totalMoney}"
+{end:}
+"","Totals:","{totals.sections}","{totals.events}","{totals.tickets}","{totals.inventory}","{totals.sold}","{totals.price}"
+{else:}
+No results found."
+{end:}
--- /dev/null
+ <div class="emBlock">\r
+\r
+ <div class="emBlockName">\r
+ {term.prop.cap} Report Selection\r
+ </div>\r
+ \r
+ <div class=".emForm">\r
+ \r
+ <form id="memberReportForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">\r
+ <input type="hidden" name="Action" value="Report_member">\r
+ <input type="hidden" name="tabList" value="{tabList}">\r
+ <div class="emListTableContainer">\r
+ <table class="emListTable memberReportTable">\r
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead> \r
+ <tbody>\r
+ <tr>\r
+ <th>{term.prop.cap}:</th>\r
+ <td>\r
+ <select name="memberID">\r
+ <option value="0">All {term.prop.plur_cap}</option>\r
+ {foreach:membersList,m}\r
+ <option value="{m.id}">{m.name}</option>\r
+ {end:}\r
+ </select>\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>Show inactive {term.prop.plur_cap}</th>\r
+ <td><input type="checkbox" name="inactive"></td>\r
+ </tr> \r
+ <tr>\r
+ <th>Date Range for Sales Data:</th>\r
+ <td>\r
+ <select id="dateRange" name="dateRange">\r
+ <option value="thisMonth" selected>This Month</option>\r
+ <option value="lastMonth">Last Month</option>\r
+ <option value="thisYear">This Year</option>\r
+ <option value="lastYear">Last Year</option>\r
+ <option value="all">All</option>\r
+ <option value="specified">Specified Range</option>\r
+ </select>\r
+ <span id="dateFields" class="emContentAreaHidden">\r
+ \r
+ From: <input type="text" id="startDateInput" name="start_date" value="" class="emTextInputShort zTop"> \r
+ Through: <input type="text" id="endDateInput" name="end_date" value="" class="emTextInputShort zTop"> \r
+ </span>\r
+ </td>\r
+ </tr> \r
+ <tr>\r
+ <th>Output Type:</th>\r
+ <td>\r
+ <select id="outputType" name="outputType">\r
+ <option value="html" selected>Display in browser</option>\r
+ <option value="print">Display for printing</option>\r
+ <option value="csv">Download as a spreadsheet</option>\r
+ </select>\r
+ </td>\r
+ </tr> \r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ \r
+ <div id="memberReportFormSubmit">\r
+ <input type="submit" name="memberReport" value="Create {term.prop.cap} Report" class="emEditSubmit">\r
+ </div> \r
+ \r
+ </form>\r
+ \r
+ </div> <!-- / emForm -->\r
+ \r
+ <div id="report_result_container"></div>\r
+ \r
+ \r
+</div> <!-- /emBlock -->\r
+\r
+{startScript:h}\r
+\r
+ $(function() {\r
+ \r
+ /*\r
+ * Table operations\r
+ */\r
+\r
+ $('.memberReportTable').dataTable({\r
+ "bPaginate": false,\r
+ "bLengthChange": false,\r
+ "bFilter": false,\r
+ "bSort": false,\r
+ "bInfo": false,\r
+ "bAutoWidth": false,\r
+ "bDestroy": true,\r
+ "aoColumns" : [\r
+ { sWidth: '10%' },\r
+ null\r
+ ] \r
+ });\r
+ \r
+ /*\r
+ * AJAX form handling\r
+ */\r
+\r
+ $('#memberReportForm').ajaxForm({\r
+ beforeSubmit: function(xhr) {\r
+ \r
+ // Check if this is going to be a csv\r
+ var outputType = $('#outputType').val();\r
+ if (outputType == 'csv') {\r
+ \r
+ // Since this is a csv, open a new window with the desired URL and parameters rather than an ajax submit. \r
+ var url = appAdminURL + '&' + $('#memberReportForm').formSerialize();\r
+ window.open(url, 'csvReport', 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,width=100, height=10');\r
+ return false; \r
+ }\r
+ },\r
+ success: function(data) { \r
+ \r
+ var outputType = $('#outputType').val();\r
+\r
+ if (outputType == 'print') { \r
+ var w = window.open('', 'printReport', 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25');\r
+ $(w.document.body).html(data);\r
+ } else {\r
+ f_replaceContents(data, $('#report_result_container'));\r
+ } \r
+\r
+ return false;\r
+ }\r
+ });\r
+ \r
+ // Block default form submission\r
+ $("#memberReportForm").submit(function (e) {\r
+\r
+ var outputType = $('#outputType').val();\r
+\r
+ if (outputType == 'html') { \r
+ $('#report_result_container').html('<div class="emLoading">Submitting, Please Wait...</div>');\r
+ }\r
+ \r
+ e.preventDefault();\r
+ });\r
+ \r
+ // Code to start datepicker for each date input \r
+ $("#startDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [100,200]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ $("#endDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [200,300]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ \r
+ // Check if to hide dates\r
+ $('#dateRange').on('change', null, function() {\r
+ var dateRange = $(this).val();\r
+ if (dateRange == 'specified') {\r
+ $('#dateFields').removeClass('emContentAreaHidden');\r
+ } else {\r
+ $('#dateFields').addClass('emContentAreaHidden');\r
+ }\r
+ });\r
+\r
+ f_restartOnTabSelect();\r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+<!-- Orders Report -->
+
+{if:printOutput}
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+{end:}
+
+
+
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">Orders Report</span>
+ <span style="float: right;" class="emBlockName">{reportDate} {reportTime}</span>
+ <br clear="all">
+
+ {reportNote}
+
+ {if:ordersList}
+
+ <div class="emReportTableContainer">
+ <small>
+ <table id="OrdersReportTable" class="emListTable" style="width: 100%" border="1">
+ <thead>
+ <tr>
+ <th>Order #</th>
+ <th>Purch Date</th>
+ <th>Last Name</th>
+ <th>First Name</th>
+ <th class="allCols">Address</th>
+ <th class="allCols">Address</th>
+ <th>City</th>
+ <th>State</th>
+ <th>ZIP</th>
+ <th>Country</th>
+ <th>Phone</th>
+ <th>E-Mail</th>
+ <th>Contact OK</th>
+ <th>{term.prop.cap}</th>
+ <th>Credit Card</th>
+ <th>Card Number</th>
+ <th>Expiration</th>
+ <th>Name on Card</th>
+ <th>Confirmation</th>
+ <th align="right">Charge Amount</th>
+ <th width="1%"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:ordersList,r}
+ <tr>
+ <td style="text-wrap: none; white-space: nowrap;"><span class="emLink orderSelect" data-id="{r.id}">{r.id}</span></td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.purchase_date.date}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.lname}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.fname}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.addr1}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.addr2}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.city}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.state.name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.zip}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.country.name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.phone}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.email}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.email_ok.name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.member_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.cctype}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.ccnumber}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.expire}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.ccname}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.ccconf}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.charge_total}</td>
+ <th width="1%"></th>
+ </tr>
+ {end:}
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <th>Number of Orders: {numbOrders}</th>
+ <th>Average Order: {averageOrder}</th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="right">Total: {totalChargesMoney}</th>
+ <th width="1%"></th>
+ </tr>
+ </tbody>
+ </table>
+ </small>
+ </div>
+
+ {else:}
+ <p>No results found.</p>
+ {end:}
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var OrdersReportTable = $('#OrdersReportTable').dataTable({
+ "sScrollY": "600px",
+ "sScrollX": "100%",
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "columnDefs": [
+ {
+ "targets": [ 4, 5, 12, 13, 14, 15, 16, 17, 18 ],
+ "visible": false
+ }
+ ]
+ });
+
+ $(window).resize(function(){
+ OrdersReportTable.fnDraw();
+ });
+
+ $('.orderSelect').click( function (event) {
+ var orderID = $(this).attr('data-id');
+ f_loadAction('Sold_claim', 'Main_container', 'orderID=' + orderID);
+ return false;
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+
+{if:printOutput}
+ </body>
+</html>
+{end:}
--- /dev/null
+"Orders Report","{reportDate}","{reportTime}","{reportNote}"
+
+{if:ordersList}"ID","Purch Date","Last Name","First Name","Address","Address","City","State","ZIP","Country","Phone","E-Mail","Contact OK","{term.prop.cap}","Credit Card","Card Number","Expiration","Name on Card","Confirmation","Charge Amount"
+{foreach:ordersList,r}"{r.id}","{r.purchase_date.date}","{r.lname}","{r.fname}","{r.addr1}","{r.addr2}","{r.city}","{r.state.name}","{r.zip}","{r.country.name}","{r.phone}","{r.email}","{r.email_ok.name}","{r.member_name}","{r.cctype}","{r.ccnumber}","{r.expire}","{r.ccname}","{r.ccconf}","{r.charge_numb}"
+{end:}
+"","","","","","","","","","","","Number of Orders:","{numbOrders}","","","","","","Total:","{totalCharges}"
+{else:}
+No results found.
+{end:}
--- /dev/null
+ <div class="emBlock">\r
+\r
+ <div class="emBlockName">\r
+ {term.ticket.cap} Orders Report Selection\r
+ </div>\r
+ \r
+ <div class=".emForm">\r
+ \r
+ <form id="ordersReportForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">\r
+ <input type="hidden" name="Action" value="Report_orders">\r
+ <input type="hidden" name="tabList" value="{tabList}">\r
+{if:!checkPermission(#0#)}\r
+ <input type="hidden" name="memberID" value="{userMemberID}">\r
+{end:} \r
+ <div class="emListTableContainer">\r
+ <table class="emListTable ordersReportTable">\r
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead> \r
+ <tbody>\r
+ <tr>\r
+ <th>Order #:</th>\r
+ <td>\r
+ <input type="text" name="orderID" tabindex="1">\r
+ </td>\r
+{if:checkPermission(#0#)} \r
+ <th>{term.prop.cap}:</th>\r
+ <td>\r
+ <select id="memberID" name="memberID" tabindex="9">\r
+ <option value="0">(all {term.prop.plur})</option>\r
+ {foreach:mList,m}\r
+ <option value="{m.id}">{m.name}</option>\r
+ {end:}\r
+ </select>\r
+{else:}\r
+ {if:users_access_all_members}\r
+ <th>{term.prop.cap}:</th>\r
+ <td>\r
+ <select id="memberID" name="memberID" tabindex="9">\r
+ {if:location_all_option}\r
+ <option value="0">(all {term.prop.plur})</option>\r
+ {end:}\r
+ {foreach:mList,m}\r
+ <option value="{m.id}">{m.name}</option>\r
+ {end:}\r
+ </select>\r
+ {else:}\r
+ <th> </th><td> </td>\r
+ {end:}\r
+{end:} \r
+ </td> \r
+ </tr> \r
+ <tr>\r
+ <th>Last Name:</th>\r
+ <td>\r
+ <input type="text" name="lname" tabindex="2">\r
+ </td>\r
+ <th>Show inactive {term.prop.plur_cap}</th>\r
+ <td><input type="checkbox" name="inactive" tabindex="10"></td>\r
+ </tr> \r
+ <tr>\r
+ <th>First Name:</th>\r
+ <td>\r
+ <input type="text" name="fname" tabindex="3">\r
+ </td>\r
+ <th>Purchase Date Range:</th>\r
+ <td>\r
+ <select id="dateType" name="dateType" tabindex="11"><option value="all">(all dates)</option><option value="sold">Dates Sold</option></select>\r
+ <span id="dateFields" class="emContentAreaHidden">\r
+ \r
+ From: <input type="text" id="startDateInput" name="start_date" value="" class="emTextInputShort zTop" tabindex="12"> \r
+ Through: <input type="text" id="endDateInput" name="end_date" value="" class="emTextInputShort zTop" tabindex="13"> \r
+ <br>\r
+ Enter only "From:" date to display orders for a single date.\r
+ </span>\r
+ <br>\r
+ </td>\r
+ </tr> \r
+ <tr>\r
+ <th>City:</th>\r
+ <td>\r
+ <input type="text" name="city" tabindex="4">\r
+ </td>\r
+ <th>Ticket Date or Likely Date:</th>\r
+ <td>\r
+ <select id="ticketDateType" name="ticketDateType" tabindex="11"><option value="all">(all dates)</option><option value="ticketDate">Specific Dates</option></select>\r
+ <span id="ticketDateFields" class="emContentAreaHidden">\r
+ \r
+ From: <input type="text" id="ticketStartDateInput" name="ticket_start_date" value="" class="emTextInputShort zTop" tabindex="12"> \r
+ Through: <input type="text" id="ticketEndDateInput" name="ticket_end_date" value="" class="emTextInputShort zTop" tabindex="13"> \r
+ </span>\r
+ </td>\r
+ </tr> \r
+ <tr>\r
+ <th>State (2 letter code):</th>\r
+ <td>\r
+ <input type="text" name="state" tabindex="5">\r
+ </td>\r
+ <th>OK to send E-Mail:</th>\r
+ <td>\r
+ <input type="checkbox" name="emailOK" tabindex="14">\r
+ Show only orders where customer indicated<br>it was OK to sent them general E-Mail.\r
+ </td>\r
+ </tr> \r
+ <tr>\r
+ <th>ZIP/Postal Code:</th>\r
+ <td>\r
+ <input type="text" name="zip" tabindex="6">\r
+ </td>\r
+ <th>Sort By:</th>\r
+ <td>\r
+ <select id="sortType" name="sortType" tabindex="15">\r
+ <option value="id" selected>Order #</option>\r
+ <option value="date">Purchase Date, Last Name, First Name</option>\r
+ <option value="name">Last Name, First Name</option>\r
+ <option value="location">Country, State, City, Last Name, First Name</option>\r
+ <option value="venue_date">{term.prop.cap}, Date, Last Name, First Name</option>\r
+ <option value="venue_name">{term.prop.cap}, Last Name, First Name</option>\r
+ </select>\r
+ </td>\r
+ </tr> \r
+ <tr>\r
+ <th>Phone #:</th>\r
+ <td>\r
+ <input type="text" name="phone" tabindex="7">\r
+ </td>\r
+ <th>Output Type:</th>\r
+ <td>\r
+ <select id="outputType" name="outputType">\r
+ <option value="html" selected>Display in browser</option>\r
+ <option value="print">Display for printing</option>\r
+ <option value="csv">Download as a spreadsheet</option>\r
+ </select>\r
+ </td>\r
+ </tr> \r
+ \r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ \r
+ <div id="ordersReportFormSubmit">\r
+ <input type="submit" name="ordersReport" value="Create Orders Report" class="emEditSubmit">\r
+ </div> \r
+ \r
+ </form>\r
+ \r
+ </div> <!-- / emForm -->\r
+ \r
+ <div id="report_result_container"></div>\r
+ \r
+ \r
+</div> <!-- /emBlock -->\r
+\r
+{startScript:h}\r
+ \r
+ $(function() {\r
+ \r
+ /*\r
+ * Table operations\r
+ */\r
+\r
+ $('.ordersReportTable').dataTable({\r
+ "bPaginate": false,\r
+ "bLengthChange": false,\r
+ "bFilter": false,\r
+ "bSort": false,\r
+ "bInfo": false,\r
+ "bAutoWidth": false,\r
+ "bDestroy": true,\r
+ "aoColumns" : [\r
+ { sWidth: '25%' },\r
+ { sWidth: '25%' },\r
+ { sWidth: '25%' },\r
+ { sWidth: '25%' }\r
+ ] \r
+ });\r
+ \r
+ /*\r
+ * AJAX form handling\r
+ */\r
+ \r
+ $('#ordersReportForm').ajaxForm({\r
+ beforeSubmit: function(xhr) {\r
+ \r
+ // Check if this is going to be a csv\r
+ var outputType = $('#outputType').val();\r
+ if (outputType == 'csv') {\r
+ \r
+ // Since this is a csv, open a new window with the desired URL and parameters rather than an ajax submit. \r
+ var url = appAdminURL + '&' + $('#ordersReportForm').formSerialize();\r
+ window.open(url, 'csvReport', 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,width=100, height=10');\r
+ return false; \r
+ }\r
+ },\r
+ success: function(data) { \r
+ \r
+ var outputType = $('#outputType').val();\r
+\r
+ if (outputType == 'print') { \r
+ var w = window.open('', 'printReport', 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25');\r
+ $(w.document.body).html(data);\r
+ } else {\r
+ f_replaceContents(data, $('#report_result_container'));\r
+ } \r
+\r
+ return false;\r
+ }\r
+ });\r
+ \r
+ // Block default form submission\r
+ $("#ordersReportForm").submit(function (e) {\r
+\r
+ var outputType = $('#outputType').val();\r
+\r
+ if (outputType == 'html') { \r
+ $('#report_result_container').html('<div class="emLoading">Submitting, Please Wait...</div>');\r
+ }\r
+ \r
+ e.preventDefault();\r
+ });\r
+ \r
+ \r
+ var currentMousePos = { x: -1, y: -1 };\r
+ $(document).mousemove(function(event) {\r
+ currentMousePos.x = event.pageX;\r
+ currentMousePos.y = event.pageY;\r
+ });\r
+ \r
+ // Code to start datepicker for each date input \r
+ $("#startDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [100,200]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ $("#endDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [200,300]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ $("#ticketStartDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [100,200]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ $("#ticketEndDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [200,300]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ \r
+ // Check if to hide dates\r
+ $('#dateType').on('change', null, function() {\r
+ var dateType = $(this).val();\r
+ if (dateType == 'all') {\r
+ $('#dateFields').addClass('emContentAreaHidden');\r
+ } else {\r
+ $('#dateFields').removeClass('emContentAreaHidden');\r
+ }\r
+ });\r
+ $('#ticketDateType').on('change', null, function() {\r
+ var dateType = $(this).val();\r
+ if (dateType == 'all') {\r
+ $('#ticketDateFields').addClass('emContentAreaHidden');\r
+ } else {\r
+ $('#ticketDateFields').removeClass('emContentAreaHidden');\r
+ }\r
+ });\r
+ \r
+ f_restartOnTabSelect();\r
+ \r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+"Sales Report","Report Produced: {reportDate}","{reportTime}","{reportNote}"
+
+{if:salesList}{if:checkPermission(#0#)}"{term.prop.cap}",{end:}"{term.performance.cap}","{term.section.cap}","{term.ticket.cap}","Add On","Add On Sold","Date","Time","Quantity","Sold","Claimed","Promo","Paid"
+{foreach:salesList,r}{if:checkPermission(#0#)}"{r.memb_name}",{end:}"{r.perf_name}","{r.sect_name}","{r.tick_name}","{r.addon_name}","{r.addon_sold}","{r.date_date}","{r.time_time}","{r.time_quant}","{r.time_sold}","{r.time_claimed}","{r.time_promo}","{r.time_price}"
+{end:}
+"Grand Totals",{if:checkPermission(#0#)}"",{end:}"","","","","","","{totalQuant}","{totalSold}","{totalClaimed}","{totalPromos}","{totalPrice}"
+"",{if:checkPermission(#0#)},""{end:},"","","","","","","","","{percentClaimed}%"
+{else:}
+No results found.
+{end:}
--- /dev/null
+<!-- Promo Report -->
+
+{if:printOutput}
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+{end:}
+
+
+
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">Promo Detail Report</span>
+ <span style="float: right;" class="emBlockName">Report Produced: {reportDate} {reportTime}</span>
+ <br clear="all">
+ <div class="emBlockName" style="text-align: center; width: 100%;">{reportNote}</div>
+
+ {if:promoList}
+
+ <div class="emReportTableContainer">
+ <small>
+ <table id="PromoReportTable" class="emListTable" style="width: 100%" border="1">
+ <thead>
+ <tr>
+ {if:checkPermission(#0#)}<th>{term.prop.cap}</th>{end:}
+ <th>{term.performance.cap}</th>
+ <th>{term.section.cap}</th>
+ <th>{term.ticket.cap}</th>
+ <th>Add On</th>
+ <th>Add On<br>Sold</th>
+ <th>Date</th>
+ <th>Time</th>
+ <th align="right">Quantity</th>
+ <th align="right">Sold</th>
+ <th align="right">Claimed</th>
+ <th align="right">Promo</th>
+ <th align="right">Paid</th>
+ <th>Order ID</th>
+ <th>{term.voucher.cap}</th>
+ <th>First Name</th>
+ <th>Last Name</th>
+ <th>Address</th>
+ <th>Address 2</th>
+ <th>City</th>
+ <th>State</th>
+ <th>ZIP/Postal</th>
+ <th>Country</th>
+ <th>Phone #</th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:promoList,r}
+ <tr>
+ {if:checkPermission(#0#)}<td style="text-wrap: none; white-space: nowrap;">{r.memb_name}</td>{end:}
+ <td style="text-wrap: none; white-space: nowrap;">{r.perf_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.sect_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.tick_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.addon_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.addon_sold}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.date_date}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.time_time}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_quant}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_sold}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_claimed}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_promo_money}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_money}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_id}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_voucher_id}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_fname:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_lname:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_addr1:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_addr2:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_city:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_state:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_zip}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_country}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_phone}</td>
+ </tr>
+ {end:}
+ <tr>
+ {if:checkPermission(#0#)}<td> </td>{end:}
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <th>Grand Totals</th>
+ {if:checkPermission(#0#)}
+ <th> </th>
+ {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="right">{totalQuant}</th>
+ <th align="right">{totalSold}</th>
+ <th align="right">{totalClaimed}</th>
+ <th align="right">{totalPromosMoney}</th>
+ <th align="right">{totalMoney}</th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ </tr>
+ <tr>
+ <th> </th>
+ {if:checkPermission(#0#)}
+ <th> </th>
+ {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="right">{percentSold}%</th>
+ <th align="right">{percentClaimed}%</th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ </tr>
+ </tbody>
+ </table>
+ </small>
+ </div>
+
+ {else:}
+ <p>No results found.</p>
+ {end:}
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var PromoReportTable = $('#PromoReportTable').dataTable({
+ "sScrollY": "600px",
+ "sScrollX": "100%",
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false
+ });
+ $(window).resize(function(){
+ PromoReportTable.fnDraw();
+ });
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+
+{if:printOutput}
+ </body>
+</html>
+{end:}
--- /dev/null
+ <div class="emBlock">\r
+\r
+ <div class="emBlockName">\r
+ Promo Codes Report Selection\r
+ </div>\r
+ \r
+ <div class=".emForm">\r
+ \r
+ <form id="promoReportForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">\r
+ <input type="hidden" name="Action" value="Report_promo">\r
+ <input type="hidden" name="tabList" value="{tabList}">\r
+{if:!checkPermission(#0#)}\r
+ <input type="hidden" name="memberID" value="{userMemberID}">\r
+{end:} \r
+ <div class="emListTableContainer">\r
+ <table class="emListTable promoReportTable">\r
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead> \r
+ <tbody>\r
+{if:checkPermission(#0#)} \r
+ <tr>\r
+ <th>Type of Report:</th>\r
+ <td>\r
+ <select id="reportType" name="reportType">\r
+ <option value="summary">Summary Report</option>\r
+ <option value="detail">Detail Report</option>\r
+ </select>\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>Promo Code:</th>\r
+ <td>\r
+ <select id="promoID" name="promoID">\r
+ <option value="0">(all codes)</option>\r
+ {foreach:promos,p}\r
+ <option value="{p.id}">{p.name:h} - {p.long_name:h}</option>\r
+ {end:}\r
+ </select>\r
+ </td> \r
+ </tr>\r
+{end:} \r
+ <tr>\r
+ <th>Date Range:</th>\r
+ <td>\r
+ <select id="dateType" name="dateType">\r
+ <option value="all">(all dates)</option>\r
+ <option value="sold">Dates Sold</option>\r
+ <option value="claimed">Dates Claimed</option>\r
+ </select>\r
+ <span id="dateFields" class="emContentAreaHidden">\r
+ \r
+ From: <input type="text" id="startDateInput" name="start_date" value="" class="emTextInputShort zTop"> \r
+ Through: <input type="text" id="endDateInput" name="end_date" value="" class="emTextInputShort zTop"> \r
+ </span>\r
+ </td>\r
+ </tr> \r
+ <tr>\r
+ <th>Output Type:</th>\r
+ <td>\r
+ <select id="outputType" name="outputType">\r
+ <option value="html" selected>Display in browser</option>\r
+ <option value="print">Display for printing</option>\r
+ <option value="csv">Download as a spreadsheet</option>\r
+ </select>\r
+ </td>\r
+ </tr> \r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ \r
+ <div id="promoReportFormSubmit">\r
+ <input type="submit" name="promoReport" value="Create Promo Code Report" class="emEditSubmit">\r
+ </div> \r
+ \r
+ </form>\r
+ \r
+ </div> <!-- / emForm -->\r
+ \r
+ <div id="report_result_container" style="overflow: scroll;"></div>\r
+ \r
+ \r
+</div> <!-- /emBlock -->\r
+\r
+{startScript:h}\r
+\r
+ var mList = new Array();\r
+ {foreach:mList,m}\r
+ mList[{m.id}] = '<select id="performanceID" name="performanceID"><option value="0">(all {term.performance.plur})</option>{foreach:m.performance,p}<option value="{p.id}">{p.name}</option>{end:}</select>';\r
+ {end:}\r
+ \r
+ $(function() {\r
+ \r
+ /*\r
+ * Table operations\r
+ */\r
+\r
+ $('.promoReportTable').dataTable({\r
+ "bPaginate": false,\r
+ "bLengthChange": false,\r
+ "bFilter": false,\r
+ "bSort": false,\r
+ "bInfo": false,\r
+ "bAutoWidth": false,\r
+ "bDestroy": true,\r
+ "aoColumns" : [\r
+ { sWidth: '10%' },\r
+ null\r
+ ] \r
+ });\r
+ \r
+ /*\r
+ * AJAX form handling\r
+ */\r
+ \r
+ $('#promoReportForm').ajaxForm({\r
+ beforeSubmit: function(xhr) {\r
+ \r
+ // Check if this is going to be a csv\r
+ var outputType = $('#outputType').val();\r
+ if (outputType == 'csv') {\r
+ \r
+ // Since this is a csv, open a new window with the desired URL and parameters rather than an ajax submit. \r
+ var url = appAdminURL + '&' + $('#promoReportForm').formSerialize();\r
+ window.open(url, 'csvReport', 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,width=100, height=10');\r
+ return false; \r
+ }\r
+ },\r
+ success: function(data) { \r
+ \r
+ var outputType = $('#outputType').val();\r
+\r
+ if (outputType == 'print') { \r
+ var w = window.open('', 'printReport', 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25');\r
+ $(w.document.body).html(data);\r
+ } else {\r
+ f_replaceContents(data, $('#report_result_container'));\r
+ } \r
+\r
+ return false;\r
+ }\r
+ });\r
+ \r
+ // Block default form submission\r
+ $("#promoReportForm").submit(function (e) {\r
+\r
+ var outputType = $('#outputType').val();\r
+\r
+ if (outputType == 'html') { \r
+ $('#report_result_container').html('<div class="emLoading">Submitting, Please Wait...</div>');\r
+ }\r
+ \r
+ e.preventDefault();\r
+ });\r
+ \r
+ \r
+ var currentMousePos = { x: -1, y: -1 };\r
+ $(document).mousemove(function(event) {\r
+ currentMousePos.x = event.pageX;\r
+ currentMousePos.y = event.pageY;\r
+ });\r
+ \r
+ // Code to start datepicker for each date input \r
+ $("#startDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [100,200]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ $("#endDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [200,300]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ \r
+ // Check if to hide dates\r
+ $('#dateType').on('change', null, function() {\r
+ var dateType = $(this).val();\r
+ if (dateType == 'all') {\r
+ $('#dateFields').addClass('emContentAreaHidden');\r
+ } else {\r
+ $('#dateFields').removeClass('emContentAreaHidden');\r
+ }\r
+ });\r
+ \r
+ // Selection of performance list\r
+ $('#memberID').on('change', null, function() {\r
+ var memberID = $(this).val();\r
+ $('#performanceSelect').html(mList[memberID]);\r
+ });\r
+ \r
+ f_restartOnTabSelect();\r
+ \r
+{if:!checkPermission(#0#)}\r
+ // This must be a member used so start with their performances loaded\r
+ $('#performanceSelect').html(mList[{userMemberID}]);\r
+{end:}\r
+\r
+ \r
+ \r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+<!-- Promo Report -->
+
+{if:printOutput}
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+{end:}
+
+<style>
+.datatable-scroll {
+ overflow-x: auto;
+ overflow-y: visible;
+}
+</style>
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">Promo Summary Report</span>
+ <span style="float: right;" class="emBlockName">Report Produced: {reportDate} {reportTime}</span>
+ <br clear="all">
+ <div class="emBlockName" style="text-align: center; width: 100%;">{reportNote}</div>
+
+ {if:havePromoList}
+
+ <div class="emReportTableContainer">
+ <small>
+ <div style="padding: 10px">
+ <table id="PromoReportTable" class="emListTable" style="width: 10%" border="1">
+ <thead>
+ <tr>
+ <th>Code</th>
+ <th>Promo</th>
+ <th>{term.performance.cap}</th>
+ <th>{term.ticket.cap}</th>
+ <th>Name</th>
+ <th>Date</th>
+ <th align="right"># Sold</th>
+ <th align="right">Per Ticket</th>
+ <th align="right">Discount</th>
+ <th width="1%"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:promoList,p}
+ <tr>
+ <td style="text-wrap: none; white-space: nowrap;">{p.promo_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{p.long_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{p.performance_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{p.ticket_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{p.fname} {p.lname}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{p.purchase_date}</td>
+ <td style="text-wrap: none; white-space: nowrap;" align="right">{p.count}</td>
+ <td style="text-wrap: none; white-space: nowrap;" align="right">{p.amountMoney}</td>
+ <td style="text-wrap: none; white-space: nowrap;" align="right">{p.sumMoney}</td>
+ <th width="1%"></th>
+ </tr>
+ {end:}
+ <tr>
+ <th>Grand Totals</th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="right">{totalCount}</th>
+ <th> </th>
+ <th align="right">{totalDiscount}</th>
+ <th width="1%"></th>
+ </tr>
+ </tbody>
+ </table>
+ </small>
+ </div>
+ </div>
+
+ {else:}
+ <p>No results found.</p>
+ {end:}
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var PromoReportTable = $('#PromoReportTable').dataTable({
+ "sScrollY": "600px",
+ "sScrollX": "100%",
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false
+ });
+ $(window).resize(function(){
+ PromoReportTable.fnDraw();
+ });
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+
+{if:printOutput}
+ </body>
+</html>
+{end:}
--- /dev/null
+<!-- Sales Report -->
+
+{if:printOutput}
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+{end:}
+
+
+
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">Sales Report</span>
+ <span style="float: right;" class="emBlockName">Report Produced: {reportDate} {reportTime}</span>
+ <br clear="all">
+ <div class="emBlockName" style="text-align: center; width: 100%;">{reportNote}</div>
+
+ {if:salesList}
+
+ <div class="emReportTableContainer">
+ <small>
+ <table id="SalesReportTable" class="emListTable" style="width: 100%" border="1">
+ <thead>
+ <tr>
+ {if:checkPermission(#0#)}<th>{term.prop.cap}</th>{end:}
+ <th>{term.performance.cap}</th>
+ <th>{term.section.cap}</th>
+ <th>{term.ticket.cap}</th>
+ <th>Add On</th>
+ <th>Add On<br>Sold</th>
+ <th>Date</th>
+ <th>Time</th>
+ <th align="right">Quantity</th>
+ <th align="right">Sold</th>
+ <th align="right">Claimed</th>
+ <th align="right">Promo</th>
+ <th align="right">Paid</th>
+ <th width="1%"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:salesList,r}
+ <tr>
+ {if:checkPermission(#0#)}<td style="text-wrap: none; white-space: nowrap;">{r.memb_name}</td>{end:}
+ <td style="text-wrap: none; white-space: nowrap;">{r.perf_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.sect_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.tick_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.addon_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.addon_sold}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.date_date}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.time_time}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_quant}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_sold}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_claimed}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_promo_money}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_money}</td>
+ <th width="1%"></th>
+ </tr>
+ {end:}
+ <tr>
+ {if:checkPermission(#0#)}<td> </td>{end:}
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <th width="1%"></th>
+ </tr>
+ <tr>
+ <th>Grand Totals</th>
+ {if:checkPermission(#0#)}
+ <th> </th>
+ {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="right">{totalQuant}</th>
+ <th align="right">{totalSold}</th>
+ <th align="right">{totalClaimed}</th>
+ <th align="right">{totalPromosMoney}</th>
+ <th align="right">{totalMoney}</th>
+ <th width="1%"></th>
+ </tr>
+ <tr>
+ <th> </th>
+ {if:checkPermission(#0#)}
+ <th> </th>
+ {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="right">{percentSold}%</th>
+ <th align="right">{percentClaimed}%</th>
+ <th> </th>
+ <th> </th>
+ <th width="1%"></th>
+ </tr>
+ </tbody>
+ </table>
+ </small>
+ </div>
+
+ {else:}
+ <p>No results found.</p>
+ {end:}
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var SalesReportTable = $('#SalesReportTable').dataTable({
+ "sScrollY": "600px",
+ "sScrollX": "100%",
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false
+ });
+ $(window).resize(function(){
+ SalesReportTable.fnDraw();
+ });
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+
+{if:printOutput}
+ </body>
+</html>
+{end:}
--- /dev/null
+"Sales Report","Report Produced: {reportDate}","{reportTime}","{reportNote}"
+
+{if:salesList}{if:checkPermission(#0#)}"{term.prop.cap}",{end:}"{term.performance.cap}","{term.section.cap}","{term.ticket.cap}","Add On","Add On Sold","Date","Time","Quantity","Sold","Claimed","Promo","Paid"
+{foreach:salesList,r}{if:checkPermission(#0#)}"{r.memb_name}",{end:}"{r.perf_name}","{r.sect_name}","{r.tick_name}","{r.addon_name}","{r.addon_sold}","{r.date_date}","{r.time_time}","{r.time_quant}","{r.time_sold}","{r.time_claimed}","{r.time_promo}","{r.time_price}"
+{end:}
+"Grand Totals",{if:checkPermission(#0#)}"",{end:}"","","","","","","{totalQuant}","{totalSold}","{totalClaimed}","{totalPromos}","{totalPrice}"
+"",{if:checkPermission(#0#)},""{end:},"","","","","","","","","{percentClaimed}%"
+{else:}
+No results found.
+{end:}
--- /dev/null
+<!-- Sales Report -->
+
+{if:printOutput}
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+{end:}
+
+
+
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">Sales Detail Report</span>
+ <span style="float: right;" class="emBlockName">Report Produced: {reportDate} {reportTime}</span>
+ <br clear="all">
+ <div class="emBlockName" style="text-align: center; width: 100%;">{reportNote}</div>
+
+ {if:salesList}
+
+ <div class="emReportTableContainer">
+ <small>
+ <table id="SalesReportTable" class="emListTable" style="width: 100%" border="1">
+ <thead>
+ <tr>
+ {if:checkPermission(#0#)}<th>{term.prop.cap}</th>{end:}
+ <th>{term.performance.cap}</th>
+ <th>{term.section.cap}</th>
+ <th>{term.ticket.cap}</th>
+ <th>Add On</th>
+ <th>Add On<br>Sold</th>
+ <th>Date</th>
+ <th>Time</th>
+ <th align="right">Quantity</th>
+ <th align="right">Sold</th>
+ <th align="right">Claimed</th>
+ <th align="right">Promo</th>
+ <th align="right">Paid</th>
+ <th>Order ID</th>
+ <th>{term.voucher.cap}</th>
+ {if:inclClaimDetail}
+ <th>Scanned By</th>
+ {end:}
+ <th>First Name</th>
+ <th>Last Name</th>
+ <th>Address</th>
+ <th>Address 2</th>
+ <th>City</th>
+ <th>State</th>
+ <th>ZIP/Postal</th>
+ <th>Country</th>
+ <th>E-Mail</th>
+ <th>Phone #</th>
+ <th width="1%"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:salesList,r}
+ <tr>
+ {if:checkPermission(#0#)}<td style="text-wrap: none; white-space: nowrap;">{r.memb_name}</td>{end:}
+ <td style="text-wrap: none; white-space: nowrap;">{r.perf_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.sect_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.tick_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.addon_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.addon_sold}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.date_date}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.time_time}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_quant}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_sold}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_claimed}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_promo_money}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_money}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_id}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_voucher_id}</td>
+ {if:inclClaimDetail}
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_claims}</td>
+ {end:}
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_fname:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_lname:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_addr1:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_addr2:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_city:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_state:h}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_zip}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_country}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_email}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.order_phone}</td>
+ <th width="1%"></th>
+ </tr>
+ {end:}
+ <tr>
+ {if:checkPermission(#0#)}<td> </td>{end:}
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ {if:inclClaimDetail} <td> </td> {end:}
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <th width="1%"></th>
+ </tr>
+ <tr>
+ <th>Grand Totals</th>
+ {if:checkPermission(#0#)}
+ <th> </th>
+ {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="right">{totalQuant}</th>
+ <th align="right">{totalSold}</th>
+ <th align="right">{totalClaimed}</th>
+ <th align="right">{totalPromosMoney}</th>
+ <th align="right">{totalMoney}</th>
+ <th> </th>
+ <th> </th>
+ {if:inclClaimDetail} <th> </th> {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <td> </td>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th width="1%"></th>
+ </tr>
+ <tr>
+ <th> </th>
+ {if:checkPermission(#0#)}
+ <th> </th>
+ {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="right">{percentSold}%</th>
+ <th align="right">{percentClaimed}%</th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ {if:inclClaimDetail} <th> </th> {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <td> </td>
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th width="1%"></th>
+ </tr>
+ </tbody>
+ </table>
+ </small>
+ </div>
+
+ {else:}
+ <p>No results found.</p>
+ {end:}
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var SalesReportTable = $('#SalesReportTable').dataTable({
+ "sScrollY": "600px",
+ "sScrollX": "100%",
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false
+ });
+ $(window).resize(function(){
+ SalesReportTable.fnDraw();
+ });
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+
+{if:printOutput}
+ </body>
+</html>
+{end:}
--- /dev/null
+"Sales Report","Report Produced: {reportDate}","{reportTime}","{reportNote}"
+
+{if:salesList}{if:checkPermission(#0#)}"{term.prop.cap}",{end:}"{term.performance.cap}","{term.section.cap}","{term.ticket.cap}","Add On","Add On Sold","Date","Time","Quantity","Sold","Claimed","Promo","Paid","Order ID","{term.voucher.cap}",{if:inclClaimDetail}"Scanned By",{end:}"First Name","Last Name","Address","Address 2","City","State","ZIP/Postal","Country","E-Mail","Phone #"
+{foreach:salesList,r}{if:checkPermission(#0#)}"{r.memb_name}",{end:}"{r.perf_name}","{r.sect_name}","{r.tick_name}","{r.addon_name}","{r.addon_sold}","{r.date_date}","{r.time_time}","{r.time_quant}","{r.time_sold}","{r.time_claimed}","{r.time_promo}","{r.time_price}","{r.order_id}","{r.order_voucher_id}",{if:inclClaimDetail}"{r.order_claims}",{end:}"{r.order_fname:h}","{r.order_lname:h}","{r.order_addr1:h}","{r.order_addr2:h}","{r.order_city:h}","{r.order_state:h}","{r.order_zip}","{r.order_country}","{r.order_email}","{r.order_phone}"
+{end:}
+"Grand Totals",{if:checkPermission(#0#)}"",{end:}"","","","","","","{totalQuant}","{totalSold}","{totalClaimed}","{totalPromos}","{totalPrice}"
+"",{if:checkPermission(#0#)},""{end:},"","","","","","","","{percentClaimed}%"
+{else:}
+No results found.
+{end:}
+
--- /dev/null
+<!-- Sales Report -->
+
+{if:printOutput}
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.css">
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+{end:}
+
+
+
+<div class="emBlock">
+
+ <span style="float: left;" class="emBlockName">Sales Detail Report</span>
+ <span style="float: right;" class="emBlockName">Report Produced: {reportDate} {reportTime}</span>
+ <br clear="all">
+ <div class="emBlockName" style="text-align: center; width: 100%;">{reportNote}</div>
+
+ {if:salesList}
+
+ <div class="emReportTableContainer">
+ <small>
+ <table id="SalesReportTable" class="emListTable" style="width: 100%" border="1">
+ <thead>
+ <tr>
+ {if:checkPermission(#0#)}<th>{term.prop.cap}</th>{end:}
+ <th>{term.performance.cap}</th>
+ <th>{term.section.cap}</th>
+ <th>{term.ticket.cap}</th>
+ <th align="right">Sold</th>
+ <th align="right">Claimed</th>
+ <th align="right">Paid</th>
+ <th width="1%"></th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:salesList,r}
+ <tr>
+ {if:checkPermission(#0#)}<td style="text-wrap: none; white-space: nowrap;">{r.memb_name}</td>{end:}
+ <td style="text-wrap: none; white-space: nowrap;">{r.perf_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.sect_name}</td>
+ <td style="text-wrap: none; white-space: nowrap;">{r.tick_name}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_sold}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_claimed}</td>
+ <td align="right" style="text-wrap: none; white-space: nowrap;">{r.time_money}</td>
+ <th width="1%"></th>
+ </tr>
+ {end:}
+ <tr>
+ {if:checkPermission(#0#)}<td> </td>{end:}
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <th width="1%"></th>
+ </tr>
+ <tr>
+ <th>Grand Totals</th>
+ {if:checkPermission(#0#)}
+ <th> </th>
+ {end:}
+ <th> </th>
+ <th> </th>
+ <th align="right">{totalSold}</th>
+ <th align="right">{totalClaimed}</th>
+ <th align="right">{totalMoney}</th>
+ <th width="1%"></th>
+ </tr>
+ <tr>
+ <th> </th>
+ {if:checkPermission(#0#)}
+ <th> </th>
+ {end:}
+ <th> </th>
+ <th> </th>
+ <th> </th>
+ <th align="right">{percentClaimed}%</th>
+ <th> </th>
+ <th width="1%"></th>
+ </tr>
+ </tbody>
+ </table>
+ </small>
+ </div>
+
+ {else:}
+ <p>No results found.</p>
+ {end:}
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ var SalesReportTable = $('#SalesReportTable').dataTable({
+ "sScrollY": "600px",
+ "sScrollX": "100%",
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false
+ });
+ $(window).resize(function(){
+ SalesReportTable.fnDraw();
+ });
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
+
+
+{if:printOutput}
+ </body>
+</html>
+{end:}
--- /dev/null
+"Sales Report","Report Produced: {reportDate}","{reportTime}","{reportNote}"
+
+{if:salesList}{if:checkPermission(#0#)}"{term.prop.cap}",{end:}"{term.performance.cap}","{term.section.cap}","{term.ticket.cap}","Sold","Claimed","Paid"
+{foreach:salesList,r}{if:checkPermission(#0#)}"{r.memb_name}",{end:}"{r.perf_name}","{r.sect_name}","{r.tick_name}","{r.time_sold}","{r.time_claimed}","{r.time_price}"
+{end:}
+"Grand Totals",{if:checkPermission(#0#)}"",{end:}"","","{totalSold}","{totalClaimed}","{totalPrice}"
+"",{if:checkPermission(#0#)},""{end:},"","","{percentClaimed}%"
+{else:}
+No results found.
+{end:}
+
--- /dev/null
+ <div class="emBlock">\r
+\r
+ <div class="emBlockName">\r
+ Sales Report Selection\r
+ </div>\r
+ \r
+ <div class=".emForm">\r
+ \r
+ <form id="salesReportForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">\r
+ <input type="hidden" name="Action" value="Report_sales">\r
+ <input type="hidden" name="tabList" value="{tabList}">\r
+{if:!checkPermission(#0#)}\r
+ <input type="hidden" name="memberID" value="{userMemberID}">\r
+{end:} \r
+ <div class="emListTableContainer">\r
+ <table class="emListTable salesReportTable">\r
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead> \r
+ <tbody>\r
+{if:checkPermission(#0#)} \r
+ <tr>\r
+ <th>Type of Report:</th>\r
+ <td>\r
+ <select id="reportType" name="reportType">\r
+ <option value="summary">Summary Report</option>\r
+ <option value="detail">Detail Ticket Sales Report</option>\r
+ <option value="packageTicket">Package Tickets Report</option>\r
+ </select>\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>{term.prop.cap}:</th>\r
+ <td>\r
+ <select id="memberID" name="memberID">\r
+ <option value="0">(all {term.prop.plur})</option>\r
+ {foreach:mList,m}\r
+ <option value="{m.id}">{m.name:h}</option>\r
+ {end:}\r
+ </select>\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>Show inactive {term.prop.plur_cap}</th>\r
+ <td><input type="checkbox" name="inactive"></td>\r
+ </tr> \r
+{end:} \r
+ <tr>\r
+ <th>{term.performance.cap}:</th>\r
+ <td>\r
+ <input type="checkbox" id="showInactiveCats"> Show inactive Categories\r
+ <div id="performanceSelect">\r
+ (select a {term.prop.norm} first)\r
+ </div>\r
+ Note: Hold "CTRL" key to select multiple, "SHIFT" to select a range, or drag across the ones you want to select.\r
+ </td> \r
+ </tr>\r
+ <tr>\r
+ <th>Date Range:</th>\r
+ <td>\r
+ <select id="dateType" name="dateType">\r
+ <option value="all">(all dates)</option>\r
+ <option value="sold">Dates Sold</option>\r
+ <option value="ticket">{term.ticket.cap} Dates</option>\r
+ <option value="claimed">Dates Claimed</option>\r
+ </select>\r
+ <span id="dateFields" class="emContentAreaHidden">\r
+ \r
+ From: <input type="text" id="startDateInput" name="start_date" value="" class="emTextInputShort zTop"> \r
+ Through: <input type="text" id="endDateInput" name="end_date" value="" class="emTextInputShort zTop"> \r
+ </span>\r
+ </td>\r
+ </tr> \r
+ <tr>\r
+ <th>Claimed {term.ticket.plur_cap} Only:</th>\r
+ <td><input type="checkbox" name="claimed"></td>\r
+ </tr> \r
+ <tr>\r
+ <th>{term.ticket.cap} Claim Detail:</th>\r
+ <td><input type="checkbox" name="claimedDetail"></td>\r
+ </tr> \r
+ <tr>\r
+ <th>Output Type:</th>\r
+ <td>\r
+ <select id="outputType" name="outputType">\r
+ <option value="html" selected>Display in browser</option>\r
+ <option value="print">Display for printing</option>\r
+ <option value="csv">Download as a spreadsheet</option>\r
+ </select>\r
+ </td>\r
+ </tr> \r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ \r
+ <div id="salesReportFormSubmit">\r
+ <input type="submit" name="salesReport" value="Create Sales Report" class="emEditSubmit">\r
+ </div> \r
+ \r
+ </form>\r
+ \r
+ </div> <!-- / emForm -->\r
+ \r
+ <div id="report_result_container" style="overflow: scroll;"></div>\r
+ \r
+ \r
+</div> <!-- /emBlock -->\r
+\r
+{startScript:h}\r
+\r
+ $(function() {\r
+\r
+ var mList = new Array();\r
+ {foreach:mList,m}\r
+ mList['100'+{m.id}] = '<select id="performanceID" name="performanceID[]" multiple>'\r
+ {foreach:m.performance,p}\r
+ {if:p.active}\r
+ + '<option value="{p.id}">{p.name} {p.active}</option>'\r
+ {end:}\r
+ {end:}\r
+ + '</select>';\r
+ mList['200'+{m.id}] = '<select id="performanceID" name="performanceID[]" multiple>'\r
+ {foreach:m.performance,p}\r
+ + '<option value="{p.id}">{p.name} {p.active}</option>'\r
+ {end:}\r
+ + '</select>';\r
+ {end:}\r
+ \r
+ \r
+ /*\r
+ * Table operations\r
+ */\r
+\r
+ $('.salesReportTable').dataTable({\r
+ "bPaginate": false,\r
+ "bLengthChange": false,\r
+ "bFilter": false,\r
+ "bSort": false,\r
+ "bInfo": false,\r
+ "bAutoWidth": false,\r
+ "bDestroy": true,\r
+ "aoColumns" : [\r
+ { sWidth: '10%' },\r
+ null\r
+ ] \r
+ });\r
+ \r
+ /*\r
+ * AJAX form handling\r
+ */\r
+ \r
+ $('#salesReportForm').ajaxForm({\r
+ beforeSubmit: function(xhr) {\r
+ \r
+ // Check if this is going to be a csv\r
+ var outputType = $('#outputType').val();\r
+ if (outputType == 'csv') {\r
+ \r
+ // Since this is a csv, open a new window with the desired URL and parameters rather than an ajax submit. \r
+ var url = appAdminURL + '&' + $('#salesReportForm').formSerialize();\r
+ window.open(url, 'csvReport', 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,width=100, height=10');\r
+ return false; \r
+ }\r
+ },\r
+ success: function(data) { \r
+ \r
+ var outputType = $('#outputType').val();\r
+\r
+ if (outputType == 'print') { \r
+ var w = window.open('', 'printReport', 'toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25');\r
+ $(w.document.body).html(data);\r
+ } else {\r
+ f_replaceContents(data, $('#report_result_container'));\r
+ } \r
+\r
+ return false;\r
+ }\r
+ });\r
+ \r
+ // Block default form submission\r
+ $("#salesReportForm").submit(function (e) {\r
+\r
+ var outputType = $('#outputType').val();\r
+\r
+ if (outputType == 'html') { \r
+ $('#report_result_container').html('<div class="emLoading">Submitting, Please Wait...</div>');\r
+ }\r
+ \r
+ e.preventDefault();\r
+ });\r
+ \r
+ \r
+ var currentMousePos = { x: -1, y: -1 };\r
+ $(document).mousemove(function(event) {\r
+ currentMousePos.x = event.pageX;\r
+ currentMousePos.y = event.pageY;\r
+ });\r
+ \r
+ // Code to start datepicker for each date input \r
+ $("#startDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [100,200]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ $("#endDateInput").datepicker({\r
+ dateFormat: "mm/dd/yy",\r
+ dialog: [{maxDate}, false, false, [200,300]],\r
+ minDate: '{minDate}',\r
+ maxDate: '{maxDate}',\r
+ beforeShow: function (input, inst) {\r
+ setTimeout(function () {\r
+ inst.dpDiv.css({\r
+ top: currentMousePos.y,\r
+ left: currentMousePos.x\r
+ });\r
+ }, 0);\r
+ }\r
+ });\r
+ \r
+ // Check if to hide dates\r
+ $('#dateType').on('change', null, function() {\r
+ var dateType = $(this).val();\r
+ if (dateType == 'all') {\r
+ $('#dateFields').addClass('emContentAreaHidden');\r
+ } else {\r
+ $('#dateFields').removeClass('emContentAreaHidden');\r
+ }\r
+ });\r
+ \r
+ // Selection of performance list\r
+ function performanceList(e) {\r
+ var active = $('#showInactiveCats').is(':checked')?'200':'100';\r
+ var memberID = $('#memberID').val();\r
+ $('#performanceSelect').html(mList[active+memberID]);\r
+ }\r
+ $('#memberID').on('change', null, performanceList);\r
+ $('#showInactiveCats').on('change', null, performanceList);\r
+ \r
+ f_restartOnTabSelect();\r
+ \r
+{if:!checkPermission(#0#)}\r
+ // This must be a member used so start with their performances loaded\r
+ $('#performanceSelect').html(mList[{userMemberID}]);\r
+{end:}\r
+\r
+ \r
+ \r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">Delete this {term.section.cap}</div>
+
+ <div class="emBlockName">{sectionDetail.name}</div>
+
+{if:checkPermission(#10#)}
+ <div class="emUsdTabs">
+ <div flexy:if="!blockTab.Section_confirmDelete" emTabId="Section_confirmDelete" emContainerId="Section_detail_container" emTabParams="id={sectionDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Confirm Delete</div>
+ </div>
+ <div flexy:if="!blockTab.Section_list" emTabId="Section_list" emContainerId="Section_detail_container" emTabParams="SectionsListOption=member&id={sectionDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel Delete</div>
+ </div>
+ </div> <!-- emSubTabs -->
+{end:}
+
+ {if:sectionDetail}
+ <div class="emListTableContainerLeft">
+ <table id="SectionDeleteTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>Delete {term.section.cap}:</th>
+ <td>
+ <h3 style="color: red;">Clicking "Confirm Delete" on the right will permanently delete this {term.section.norm}.</h3>
+ </td>
+ </tr>
+ <tr><th>Name:</th><td>{sectionDetail.name}</td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.section.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#SectionDeleteTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">{term.section.cap}: {sectionDetail.name}</div>
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Section_delete" emContainerId="Section_detail_container" emTabParams="SectionID={sectionDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.section.cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Section_edit" emContainerId="Section_detail_container" emTabParams="SectionID={sectionDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.section.cap}</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:sectionDetail}
+ <div class="emListTableContainerLeft">
+ <table id="SectionDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:sectionDetail.delete}
+ <tr>
+ <th>Delete {term.section.cap}:</th>
+ <td>
+ {if:sectionDetail.deleteConfirmed}
+ {if:sectionDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {sectionDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+ <button id="confirmSectionDelete" value="{sectionDetail.id}">Click here to confirm that this {term.section.norm} should be deleted.</button><br>
+ <h3 style="color: red;">Clicking the button above will permanently delete this {term.section.norm}.</h3>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>{term.section.cap} Name:</th><td>{sectionDetail.name}</td></tr>
+ <tr><th>Description:</th><td>{sectionDetail.descr:h}</td></tr>
+ <tr>
+ <th>Image:</th>
+ <td>
+ {if:sectionDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{sectionDetail.image}">
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr><th>{term.entrance.cap}:</th><td>{sectionDetail.entrance}</td></tr>
+ <tr><th>Sort Order:</th><td>{sectionDetail.sort}</td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.section.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#SectionDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewSection}Adding New {term.section.cap}{end:}
+ {if:editingSection}Editing {term.section.cap}{end:}
+ </div>
+
+{if:checkPermission(#10#)}
+ <div class="emUsdTabs">
+ {if:addingNewSection}
+ <div flexy:if="!blockTab.Section_list" emTabId="Misc_blank" emContainerId="Section_detail_container" emTabParams="id={sectionDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+ {else:}
+ <div flexy:if="!blockTab.Section_list" emTabId="Section_detail" emContainerId="Section_detail_container" emTabParams="id={sectionDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+ {end:}
+ </div> <!-- emSubTabs -->
+{end:}
+
+{if:formFail}
+ <div class="requiredField">Not all fields were filled in correctly. Please try again.</div>
+{end:}
+
+ <div class=".emForm">
+
+ {if:sectionDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="SectionForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewSection}
+ <input type="hidden" name="Action" value="Section_insert">
+ {else:}
+ <input type="hidden" name="Action" value="Section_update">
+ {end:}
+
+ <input type="hidden" name="member" value="{sectionDetail.member}">
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+ <input type="hidden" name="tabList" value="{tabList}">
+
+ <div class="emListTableContainer">
+ <table class="emListTable sectionEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ {if:fieldRequired.name}<th class="emRequiredInputField">{else:}<th>{end:}{term.section.cap} Name:</th>
+ {if:fieldFail.name}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="name" value="{sectionDetail.name:h}" class="emTextInput">
+ {if:fieldFail.name}<br>{fieldFail.name}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.descr}<th class="emRequiredInputField">{else:}<th>{end:}Description:</th>
+ {if:fieldFail.descr}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="descr" id="descr">{sectionDetail.descr:h}</textarea>
+ {if:fieldFail.descr}<br>{fieldFail.descr}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.image}<th class="emRequiredInputField">{else:}<th>{end:}Image:</th>
+ {if:fieldFail.image}<td class="emBadInputField">{else:}<td>{end:}
+ {if:sectionDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{sectionDetail.image}">
+ <br>Delete this image: <input type="checkbox" name="image_delete">
+ {end:}
+ <input type="hidden" name="image" value="{storedDetail.image}">
+ <br>Upload or replace the image: <input type="file" name="image_new">
+ {if:fieldFail.image}<br>{fieldFail.image}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.entrance}<th class="emRequiredInputField">{else:}<th>{end:}{term.entrance.cap}:</th>
+ {if:fieldFail.entrance}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="entrance">
+ <option value="">(none)</option>
+ {foreach:sectionDetail.entrance.pick_list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Optional
+ {if:fieldFail.entrance}<br>{fieldFail.entrance}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.sort}<th class="requiredField">{else:}<th>{end:}Output Order:</th>
+ {if:fieldFail.sort}<td class="badField">{else:}<td>{end:}
+ <input type="text" name="sort" value="{sectionDetail.sort:h}" class="textInputShort">
+ {if:fieldFail.sort}<br>{fieldFail.sort}{end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id="sectionFormSubmit" class="submitKeepOnPage">
+ {if:addingNewSection}
+ <input type="submit" value="Add new {term.section.norm}" class="emEditSubmit">
+ {end:}
+ {if:editingSection}
+ <input type="submit" value="Update {term.section.norm}" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No {term.section.norm} has been selected yet.</h2>
+ <p>To edit a {term.section.norm}, first select it from the list of available {term.section.plur}.
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.sectionEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#SectionForm').ajaxForm({
+ success: function(data) {
+ {if:addingNewSection}
+ f_replaceContents(data, $('#Member_info_container'));
+ {end:}
+ {if:editingSection}
+ f_replaceContents(data, $('#Member_info_container'));
+ {end:}
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#sectionFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#descr"));
+ f_buildCkeditor($("#notes"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Section List -->
+<div class="emBlock">
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Section_add" emContainerId="Section_detail_container" emTabParams="" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Add a {term.section.cap}</div>
+ </div>
+ <div class="emTab emLink" style="float: right;">
+ <div id="sectionListSizeChange">Larger Table</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ Search {term.section.plur_cap}: <input type="text" id="sectionsSearch" name="sectionsSearchField"> (type any portion of a {term.section.norm} name)
+
+ {if:sectionList}
+
+ <div id="SectionListTable_wrapper" class="emListTableContainer">
+ <table id="SectionListTable" class="emListTable">
+ <thead>
+ <tr><th style="width: 60px;">Sort Order</th><th>Name</th></tr>
+ </thead>
+ <tbody>
+ {foreach:sectionList,c}
+ <tr>
+ <td>{c.sort}</td>
+ <td emSectionId="{c.id}" class="emLink sectionListSelect">{c.name:h}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No {term.section.plur} listed.</p>
+ <p>
+ You will need at least one {term.section.norm} in order to sell {term.ticket.plur}.
+ You may, however, use a single generic {term.section.norm} such as "General Admission".
+ </p>
+ {end:}
+
+ <div id="Section_detail_container" class="emSliderClosed">
+ </div>
+
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // Sections Search
+ var sectionsSearchData = [
+ {foreach:sectionList,c}
+ {label:'{c.name:h}', value:'{c.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var SectionListTable = $('#SectionListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ "aoColumns" : [
+ { sWidth: '80px' },
+ null
+ ]
+ });
+ $(window).resize(function(){
+ SectionListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var SectionListTableSmall = true;
+ var SectionListTableHeight = $('#SectionListTable_wrapper div.dataTables_scrollBody').height();
+ $('#sectionListSizeChange').click(function() {
+ if (SectionListTableSmall) {
+ $('#SectionListTable_wrapper div.dataTables_scrollBody').height('auto');
+ SectionListTableSmall = false;
+ $(this).html('Smaller Table');
+ SectionListTable.fnSettings().oScroll.sY = '100%';
+ SectionListTable.fnDraw();
+ } else {
+ $('#SectionListTable_wrapper div.dataTables_scrollBody').height(SectionListTableHeight);
+ SectionListTableSmall = true;
+ $(this).html('Larger Table');
+ SectionListTable.fnSettings().oScroll.sY = '100px';
+ SectionListTable.fnDraw();
+ }
+ });
+
+ // Close all local sliders
+ $('#Section_detail_container').hide(duration);
+
+ $('.sectionListSelect').click(function(){
+ $('#SectionListTable_wrapper div.dataTables_scrollBody').height(SectionListTableHeight);
+ SectionListTableSmall = true;
+ $('#sectionListSizeChange').html('Larger Table');
+ SectionListTable.fnSettings().oScroll.sY = '100px';
+ SectionListTable.fnDraw();
+ f_loadAction('Section_detail', 'Section_detail_container', 'SectionID=' + $(this).attr('emSectionId') + '&tabList={tabList}');
+ });
+
+ // Search Sections
+ $("#sectionsSearch").autocomplete({
+ source: sectionsSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#sectionsSearch").attr({value: ui.item.label});
+ f_loadAction('Section_detail', 'Section_detail_container', 'SectionID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+
+ <div class=".emForm">
+
+ <form id="ClaimForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ <div class="emListTableContainer">
+ <table id="ClaimTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr style="height: 5em;">
+ <th style="width: 15em">{term.voucher.cap} #:</th>
+ <td id="scanVoucherIdArea">
+ <input id="SoldID" type="text" name="SoldID" value="" class="emTextInputMedium"><br>
+ <input id="doClaim" type="checkbox" name="doCLaim" checked> Mark as claimed
+ </td>
+ </tr>
+ <tr style="height: 5em;">
+ <th>{term.order.cap} #:</th>
+ <td><input id="OrderID" type="text" name="OrderID" value="" class="emTextInputMedium"></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </form>
+
+ <div id="Voucher_detail_container">
+ </div>
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ var ClaimTable = $('#ClaimTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+
+ });
+
+ // Display selected Voucher - if Enter key is used
+ $('#SoldID').keydown( function (event) {
+ if(event.which == 13) {
+ var soldID = $('#SoldID').val();
+ var doClaim = $('#doClaim').is(':checked');
+
+ $("#SoldID").focus();
+ f_loadAction('Sold_detail', 'Voucher_detail_container', 'SoldID=' + soldID + '&doClaim=' + doClaim + '&tabList={tabList}');
+ $('#Voucher_detail_container').removeClass('emContentAreaHidden');
+ $("#SoldID").val('');
+ }
+ });
+
+ // Display selected Order
+ $('#OrderID').keydown( function (event) {
+ if(event.which == 13) {
+ var orderID = $('#OrderID').val();
+ $("#OrderID").focus();
+ f_loadAction('Order_selected', 'Voucher_detail_container', 'OrderID=' + orderID + '&tabList={tabList}');
+ $('#Voucher_detail_container').removeClass('emContentAreaHidden');
+ $("#OrderID").val('');
+ }
+ });
+
+ $("#SoldID").focus();
+
+ f_restartOnTabSelect();
+
+ $('input').keydown( function (event) {
+ $('#scanVoucherIdArea').removeClass('scanVoucherResultNone');
+ $('#scanVoucherIdArea').removeClass('scanVoucherResultClaimed');
+ $('#scanVoucherIdArea').removeClass('scanVoucherResultUsed');
+ });
+
+
+ if ({orderID} > 0) {
+ f_loadAction('Order_selected', 'Voucher_detail_container', 'OrderID=' + {orderID} + '&tabList={tabList}');
+ }
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">{soldDetail.name}</div>
+
+{if:haveProblem}
+ <h3>We're sorry, we had a problem with your request:</h3>
+ <ul style="color: red;">
+ {foreach:problem,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+{end:}
+
+
+ {if:soldDetail}
+
+ <div class="emUsdTabs">
+<!--
+ <div flexy:if="checkPermission(#20#)" emTabId="Sold_delete" emContainerId="Sold_info_container" emTabParams="SoldID={soldDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.ticket.cap} Sold</div>
+ </div>
+ <div flexy:if="checkPermission(#20#)" emTabId="Sold_edit" emContainerId="Sold_info_container" emTabParams="SoldID={soldDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.ticket.cap} Sold</div>
+ </div>
+-->
+
+ <div flexy:if="checkPermission(#20#)" emTabId="Order_selected" emContainerId="Voucher_detail_container" emTabParams="OrderID={soldDetail.ticket_order}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Show {term.order.cap}</div>
+ </div>
+
+
+ <div flexy:if="checkPermission(#20#)" id="Sold_claimVoucher" emTabId="Sold_claimVoucher" emContainerId="Sold_info_container" emTabParams="tabList={tabList}&VoucherID={soldDetail.id}" emTabGroup="OrderTabs" class="emTab OrderTabs emLink" style="float: right;">
+ <div class="emTabName">Mark as Claimed</div>
+ </div>
+ <div flexy:if="checkPermission(#20#)" id="Sold_resetVoucher" emTabId="Sold_resetVoucher" emContainerId="Sold_info_container" emTabParams="tabList={tabList}&VoucherID={soldDetail.id}" emTabGroup="OrderTabs" class="emTab OrderTabs emLink" style="float: right;">
+ <div class="emTabName">Reset to Unclaimed</div>
+ </div>
+
+
+ </div> <!-- emSubTabs -->
+
+ <div class="emListTableContainerLeft">
+ <table id="SoldDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:soldDetail.delete}
+ <tr>
+ <th>Delete {term.ticket.cap} Sold:</th>
+ <td>
+ {if:soldDetail.deleteConfirmed}
+ {if:soldDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {soldDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+ <button id="confirmSoldDelete" value="{soldDetail.id}">Click here to confirm that this {term.ticket.norm} sold should be deleted.</button><br>
+ <h3 style="color: red;">Clicking the button above will permanently delete this {term.ticket.norm} sold.</h3>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ {if:markedAsClaimed}
+ <tr><th></th><td style="color: green; font-weight: bold; font-size: 150%;">Marked as Claimed</td></tr>
+ {end:}
+ <tr><th>{term.voucher.cap} #:</th><td>{soldDetail.id}</td></tr>
+ <tr><th>{term.order.cap} #:</th><td>{soldDetail.ticket_order}</td></tr>
+ <tr>
+ <th>Type</th>
+ <td>
+ {if:soldDetail.is_package.value}
+ Package
+ <p>
+ <table id="PackageDetailTable" class="emListTable">
+ <tr><th>Ticket Name</th><th>Number of Uses</th><th>Times Claimed</th><th>Available</th></tr>
+ {foreach:packageDetail,p}
+ <tr>
+ <td>{p.ticket_name}</td>
+ <td>{p.numb_uses}</td>
+ <td>
+ {p.numb_claimed}
+ </td>
+ <td>
+ {if:p.fullyClaimedAlert}
+ <span style="color: red; font-weight: bold; font-size: 150%;">FULLY CLAIMED!</span>
+ {else:}
+ {p.remaining}
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ </table>
+ </p>
+ {else:}
+ {if:soldDetail.ticket_package}
+ Package {term.ticket.cap}
+ {else:}
+ {term.ticket.cap}
+ {end:}
+ {end:}
+ </td>
+ </tr>
+ {if:soldDetail.is_package.value}
+ <tr><th>Price Paid:</th><td>{soldDetail.price_paid}</td></tr>
+ {else:}
+ {if:soldDetail.ticket_package}
+
+ <tr>
+ <th>{term.voucher.cap} Status:</th>
+ <td id="ClaimDateTD">
+
+ {if:fullyClaimedAlert}
+ <span style="color: red; font-weight: bold; font-size: 150%;">FULLY CLAIMED!</td></tr>
+ {else:}
+ Uses available
+ {end:}
+
+ </td>
+ </tr>
+ {if:soldDetail.unlimited_use.value}
+ <tr><th>Number of Uses:</th><td>Unlimited use.</td></tr>
+ {else:}
+ <tr><th>Number of Uses:</th><td>{soldDetail.numb_uses}</td></tr>
+ {end:}
+ <tr>
+ <th>Number of Times Claimed:</th>
+ <td>
+ {soldDetail.numb_claimed}
+ {if:soldDetail.fullyClaimedAlert}
+ <span style="color: red; font-weight: bold; font-size: 150%;">FULLY CLAIMED!</span>
+ {end:}
+ </td>
+ </tr>
+ <tr><th>{term.prop.cap}:</th><td>{soldDetail.member_name}</td></tr>
+ <tr><th>{term.entrance.cap}:</th><td>{soldDetail.entrance_name}</td></tr>
+ <tr><th>{term.performance.cap}:</th><td>{soldDetail.performance_name}</td></tr>
+ <tr><th>{term.section.cap}:</th><td>{soldDetail.section_name}</td></tr>
+ <tr><th>{term.ticket.cap}:</th><td>{soldDetail.ticket_name}</td></tr>
+ <tr><th>Specific date only:</th><td>{soldDetail.date_specific.name}</td></tr>
+ {if:soldDetail.date_specific.value}
+ <tr><th>{term.ticket.cap} Date:</th><td>{soldDetail.ticket_date.date}</td></tr>
+ {else:}
+ <tr><th>Dates useable:</th><td>{soldDetail.start_date.date} through {soldDetail.end_date.date}</td></tr>
+ {end:}
+ {if:soldDetail.time_specific.value}
+ <tr><th>{term.ticket.cap} Time:</th><td>{soldDetail.ticket_time.time}</td></tr>
+ {else:}
+ <tr><th>{term.ticket.cap} Time:</th><td>Use any time of the day.</td></tr>
+ {end:}
+
+ {else:}
+
+ <tr>
+ <th>{term.voucher.cap} Status:</th>
+ <td id="ClaimDateTD">
+
+ {if:fullyClaimedAlert}
+ <span style="color: red; font-weight: bold; font-size: 150%;">FULLY CLAIMED!</td></tr>
+ {else:}
+ Uses available
+ {end:}
+
+ </td>
+ </tr>
+ {if:soldDetail.unlimited_use.value}
+ <tr><th>Number of Uses:</th><td>Unlimited use.</td></tr>
+ {else:}
+ <tr><th>Number of Uses:</th><td>{soldDetail.numb_uses}</td></tr>
+ {end:}
+ <tr>
+ <th>Number of Times Claimed:</th>
+ <td>
+ {soldDetail.numb_claimed}
+ {if:soldDetail.fullyClaimedAlert}
+ <span style="color: red; font-weight: bold; font-size: 150%;">FULLY CLAIMED!</span>
+ {end:}
+ </td>
+ </tr>
+ <tr><th>{term.prop.cap}:</th><td>{soldDetail.member_name}</td></tr>
+ <tr><th>{term.entrance.cap}:</th><td>{soldDetail.entrance_name}</td></tr>
+ <tr><th>Assigned from other {term.prop.norm}:</th><td>{soldDetail.assigned.name}</td></tr>
+ {if:soldDetail.assigned.value}
+ <tr><th>Assigned from:</th><td>{soldDetail.assigned_from_name}</td></tr>
+ {end:}
+ <tr><th>{term.performance.cap}:</th><td>{soldDetail.performance_name}</td></tr>
+ <tr><th>{term.section.cap}:</th><td>{soldDetail.section_name}</td></tr>
+ <tr><th>{term.ticket.cap}:</th><td>{soldDetail.ticket_name}</td></tr>
+ <tr><th>Specific date only:</th><td>{soldDetail.date_specific.name}</td></tr>
+ {if:soldDetail.date_specific.value}
+ <tr><th>{term.ticket.cap} Date:</th><td>{soldDetail.ticket_date.date}</td></tr>
+ {else:}
+ <tr><th>Dates useable:</th><td>{soldDetail.start_date.date} through {soldDetail.end_date.date}</td></tr>
+ <tr><th>Likely use date:</th><td>{soldDetail.likely_date.date}</td></tr>
+ {end:}
+ {if:soldDetail.time_specific.value}
+ <tr><th>{term.ticket.cap} Time:</th><td>{soldDetail.ticket_time.time}</td></tr>
+ {else:}
+ <tr><th>{term.ticket.cap} Time:</th><td>Use any time of the day.</td></tr>
+ {end:}
+ <tr><th>Price Paid:</th><td>{soldDetail.price_paid}</td></tr>
+
+
+ {end:}
+ {end:} <!-- is_package else -->
+ </tbody>
+ </table>
+ {else:}
+ <p>No sold {term.ticket.plur} detail available.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#SoldDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ // Mark as claimed
+ $('#VoucherClaim').on('click', null, function() {
+
+ $('#ClaimDateTD').html('<div class="emBLock"><div class="emLoading">Storing, Please Wait...</div></div>');
+ var voucherID = $(this).attr('voucherID');
+
+ $.ajax({
+ url: "{adminURL}&Action=Sold_claimVoucher&VoucherID=" + voucherID,
+ success: function(data) {
+
+ var code = data.substring(0, 1);
+ var time = data.substring(2);
+
+ switch (code) {
+
+ case 's':
+ break;
+ case 'c':
+ time = time + ' - NOTE: This voucher had already been claimed';
+ break;
+ case 'f':
+ time = 'Unable to mark voucher as claimed. Is this a valid voucher?';
+ break;
+ }
+
+ $('#ClaimDateTD').html(time);
+
+ } ,
+ error: function() {
+ alert('No response. Unable to mark this voucher as claimed at this time.\n');
+ }
+ });
+
+ });
+
+ f_restartOnTabSelect();
+
+ {if:alreadyClaimedAlert}
+ $('#scanVoucherIdArea').addClass('scanVoucherResultUsed');
+ {else:}
+ {if:markedAsClaimed}
+ $('#scanVoucherIdArea').addClass('scanVoucherResultClaimed');
+ {else:}
+ $('#scanVoucherIdArea').addClass('scanVoucherResultNone');
+ {end:}
+ {end:}
+
+ });
+</script>
--- /dev/null
+<!-- Sold List -->
+<div class="emBlock">
+
+ {if:soldList}
+
+ <div class="emListTableContainer">
+ <table id="SoldListTable" class="emListTable">
+ <thead>
+ <tr>
+ <th style="width: 60px;">Voucher #</th>
+ <th>Type</th>
+ <th>Uses</th>
+ <th>Claimed</th>
+ <th>{term.performance.cap}</th>
+ <th>{term.entrance.cap}</th>
+ <th>Ticket</th>
+ <th>Date</th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:soldList,c}
+ {if:c.is_package.value}
+ <tr>
+ <td emSoldId="{c.id}" class="emLink soldListSelect">{c.id}</td>
+ <td>Package</td>
+ <td> </td>
+ <td> </td>
+ <td>{c.performance_name:h}</td>
+ <td>{c.entrance_name:h}</td>
+ <td>{c.ticket_name:h}</td>
+ <td> </td>
+ </tr>
+ {else:}
+ <tr>
+ <td emSoldId="{c.id}" class="emLink soldListSelect">{c.id}</td>
+ {if:c.ticket_package}
+ <td>Package {term.ticket.cap}</td>
+ {else:}
+ <td>{term.ticket.cap}</td>
+ {end:}
+ <td>{c.numb_uses}</td>
+ <td>{c.numb_claimed}</td>
+ <td>{c.performance_name:h}</td>
+ <td>{c.entrance_name:h}</td>
+ <td>{c.ticket_name:h}
+ </td>
+ <td>
+ {if:soldDetail.date_specific.value}
+ {c.ticket_date.date}
+ {else:}
+ {c.start_date.date} through {c.end_date.date}
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No Purchased {term.ticket.plur} listed.</p>
+ {end:}
+
+ <div id="Sold_detail_container" class="emSliderClosed">
+ </div>
+
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ $(function() {
+
+ // Note, not scrolling this table - Show everything
+ var SoldListTable = $('#SoldListTable').dataTable({
+ "bScrollCollapse": true,
+ "scrollX": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ "aoColumns" : [
+ { "sWidth": "5%", "sType": "numeric" },
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null
+ ]
+ });
+ $(window).resize(function(){
+ SoldListTable.fnDraw();
+ });
+
+ // Close all local sliders
+ $('#Sold_detail_container').hide(duration);
+
+ $('.soldListSelect').click(function(){
+ f_loadAction('Sold_selected', 'Sold_detail_container', 'SoldID=' + $(this).attr('emSoldId') + '&tabList={tabList}&checkBypass=true');
+ });
+
+
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div style="float: left;">
+ <div class="emBlockName">{term.voucher.cap} ID: {soldDetail.id}</div>
+ </div>
+
+ <div class="emBlock">
+
+ <!--
+ Sub Tabs
+ -->
+ <div class="emSubTabs">
+{if:checkPermission(#30#)}
+ <div flexy:if="!blockTab.Sold_detail" id="Sold_detail" emTabId="Sold_detail" emContainerId="Sold_info_container" emTabParams="tabList={tabList}" emTabGroup="SoldTabs" class="emTab SoldTabs emLink emTabSelected">
+ <div class="emTabName">{term.ticket.cap} Sold Detail</div>
+ </div>
+ <div flexy:if="!blockTab.Order_selected" id="Order_detail" emTabId="Order_detail" emContainerId="Sold_info_container" emTabParams="tabList={tabList}" emTabGroup="SoldTabs" class="emTab SoldTabs emLink">
+ <div class="emTabName">{term.ticket.cap} Order</div>
+ </div>
+{end:}
+<!--
+{if:checkPermission(#20#)}
+ <div flexy:if="!blockTab.Member_selected" id="Member_selected" emTabId="Member_selected" emContainerId="Sold_info_container" emTabParams="MemberID={soldDetail.member}&tabList={tabList}" emTabGroup="SoldTabs" class="emTab SoldTabs emLink">
+ <div class="emTabName">{term.prop.cap}</div>
+ </div>
+ <div flexy:if="!blockTab.Performance_selected" id="Performance_selected" emTabId="Performance_selected" emContainerId="Sold_info_container" emTabParams="PerformanceID={soldDetail.performance}&tabList={tabList}" emTabGroup="SoldTabs" class="emTab SoldTabs emLink">
+ <div class="emTabName">{term.performance.cap}</div>
+ </div>
+{end:}
+-->
+ </div> <!-- emSubTabs -->
+
+ <!--
+ Content Areas
+ -->
+ <div id="Sold_info_container" class="emContentArea emSlider">
+ </div>
+
+ </div> <!-- emBlock -->
+
+</div> <!-- emBlock -->
+
+
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ // Start with ticket sold detail loaded
+ f_loadAction('Sold_detail', 'Sold_info_container', "tabList={tabList}&soldID={soldDetail.id}&checkBypass=true");
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+ <div class="emBlock">\r
+\r
+ <div class="emBlockName">\r
+ Adding New {term.ticket.cap}\r
+ </div>\r
+ \r
+ <div class="emUsdTabs">\r
+ <div flexy:if="checkPermission(#10#)" emTabId="Misc_blank" emContainerId="Ticket_detail_container" emTabParams="id={ticketDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">\r
+ <div class="emTabName">Cancel</div>\r
+ </div>\r
+ </div> <!-- emSubTabs -->\r
+ \r
+ <div class=".emForm">\r
+ \r
+ <form id="ticketForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">\r
+ <input type="hidden" name="Action" value="Ticket_add">\r
+ <input type="hidden" name="tabList" value="{tabList}">\r
+ <div class="emListTableContainer">\r
+ <table class="emListTable ticketEditTable">\r
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead> \r
+ <tbody>\r
+ <tr>\r
+ <th class="emRequiredInputField">Start by selecting {term.prop.cap}:</th>\r
+ <td>\r
+ <select name="memberID">\r
+ <option value=""> </option>\r
+ {foreach:membersList,m}\r
+ <option value="{m.id}">{m.name}</option>\r
+ {end:}\r
+ </select>\r
+ {if:fieldFail.performance}<br>{fieldFail.performance}{end:}\r
+ </td> \r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ </div>\r
+ \r
+ <div id="ticketFormSubmit">\r
+ <input type="submit" value="Continue to adding ticket" class="emEditSubmit">\r
+ </div> \r
+ \r
+ </form>\r
+ \r
+ </div> <!-- / emForm -->\r
+ \r
+ <div id="theResult"></div>\r
+ \r
+</div> <!-- /emBlock -->\r
+\r
+{startScript:h}\r
+\r
+ $(function() {\r
+ \r
+ /*\r
+ * Table operations\r
+ */\r
+\r
+ $('.ticketEditTable').dataTable({\r
+ "bPaginate": false,\r
+ "bLengthChange": false,\r
+ "bFilter": false,\r
+ "bSort": false,\r
+ "bInfo": false,\r
+ "bAutoWidth": false,\r
+ "bDestroy": true\r
+ });\r
+ \r
+ /*\r
+ * AJAX form handling\r
+ */\r
+ \r
+ $('#ticketForm').ajaxForm({\r
+ success: function(data) { \r
+ f_replaceContents(data, $('#Ticket_detail_container')); \r
+ return false;\r
+ }\r
+ });\r
+ \r
+ // Block default form submission\r
+ $("form").submit(function (e) {\r
+ $('#ticketFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');\r
+ e.preventDefault();\r
+ });\r
+ \r
+ f_restartOnTabSelect();\r
+ \r
+ });\r
+\r
+</script>\r
+\r
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">Delete this {term.ticket.cap}</div>
+
+ <div class="emBlockName">{ticketDetail.name}</div>
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Ticket_confirmDelete" emContainerId="Ticket_info_container" emTabParams="id={ticketDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Confirm Delete</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Ticket_detail" emContainerId="Ticket_info_container" emTabParams="TicketsListOption=member&id={ticketDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel Delete</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:ticketDetail}
+ <div class="emListTableContainerLeft">
+ <table id="TicketDeleteTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>Delete {term.ticket.cap}:</th>
+ <td>
+ <h3 style="color: red;">Clicking "Confirm Delete" on the right will permanently delete this {term.ticket.norm}.</h3>
+ </td>
+ </tr>
+ <tr><th>{term.prop.cap}</th><td>{ticketDetail.member_name:h}</td></tr>
+ <tr><th>{term.ticket.cap} Type:</th><td>{ticketDetail.ticket_type.name}</td></tr>
+ <tr><th>{term.ticket.cap} Name:</th><td>{ticketDetail.name}</td></tr>
+ <tr><th>{term.ticket.cap} Title:</th><td>{ticketDetail.title}</td></tr>
+ <tr><th>Active:</th><td>{ticketDetail.active.name}</td></tr>
+ <tr><th>Purchase by Admin Only:</th><td>{ticketDetail.admin_only.name}</td></tr>
+ <tr><th>{term.performance.cap}:</th><td>{ticketDetail.performance}</td></tr>
+ <tr><th>{term.section.cap}:</th><td>{ticketDetail.section}</td></tr>
+ <tr>
+ <th>Dates available for sale:</th>
+ <td>
+ {if:ticketDetail.for_sale_start_date.date}
+ May be purchased starting on {ticketDetail.for_sale_start_date.date}<br>
+ {else:}
+ {if:ticketDetail.for_sale_end_date.date}
+ {else:}
+ No purchase date restrictions
+ {end:}
+ {end:}
+ {if:ticketDetail.for_sale_end_date.date}
+ May be purchased through {ticketDetail.for_sale_end_date.date}<br>
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Date:</th>
+ <td>
+ {if:ticketDetail.date_specific.value}
+ Dates determined by inventory.
+ {else:}
+ {if:ticketDetail.start_date.date}
+ May be used from {ticketDetail.start_date.date} through {ticketDetail.end_date.date}
+ {else:}
+ May be used on any date.
+ {end:}
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Time:</th>
+ <td>
+ {if:ticketDetail.time_specific.value}
+ {ticketDetail.ticket_time.time}
+ {else:}
+ No time specified.
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Uses per {term.ticket.cap}:</th>
+ <td>
+ {if:ticketDetail.unlimited_use.value}
+ May be used an unlimited number of times.
+ {else:}
+ {ticketDetail.uses}
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Quantity:</th>
+ <td>
+ {if:ticketDetail.unlimited_quant.value}
+ Unlimited
+ {else:}
+ {ticketDetail.quant}
+ {end:}
+ </td>
+ </tr>
+ <tr><th>Consignment Type:</th><td>{ticketDetail.consignment_type.name}</td></tr>
+ {if:checkPermission(#0#)}
+ <tr><th>Always show in cart:</th><td>{ticketDetail.cart_sticky.name}<br>If checked, will force this to show in the cart regardless of quantity selected.</td></tr>
+ {end:}
+ <tr><th>Show on Start Page:</th><td>{ticketDetail.show_on_start.name}<br>If checked (Yes), will display this ticket on the start page under the category.</td></tr>
+ <tr><th>User selection of an Add-On Required:</th><td>{ticketDetail.addon_required.name}</td></tr>
+ <tr><th>Price:</th><td>{ticketDetail.price}</td></tr>
+ <tr><th>Description:</th><td>{ticketDetail.descr:h}</td></tr>
+ <tr>
+ <th>Image:</th>
+ <td>
+ {if:ticketDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{ticketDetail.image}">
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr><th>Text for {term.voucher.cap}:</th><td>{ticketDetail.voucher_text:h}</td></tr>
+ <tr><th>Alternate text for left end of {term.voucher.cap}:</th><td>{ticketDetail.voucher_leftend_text:h}</td></tr>
+ <tr><th>{term.voucher.cap} Type:</th><td>{ticketDetail.voucher_type.name}</td></tr>
+ <tr><th>Sort Order:</th><td>{ticketDetail.sort}</td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.ticket.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#TicketDeleteTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+<!-- <div class="emBlockName">{ticketDetail.name}</div> -->
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="Ticket_delete" emContainerId="Ticket_info_container" emTabParams="TicketID={ticketDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.ticket.cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Ticket_edit" emContainerId="Ticket_info_container" emTabParams="TicketID={ticketDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.ticket.cap}</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:ticketDetail}
+ <div class="emListTableContainerLeft">
+ <table id="TicketDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:ticketDetail.delete}
+ <tr>
+ <th>Delete {term.ticket.cap}:</th>
+ <td>
+ {if:ticketDetail.deleteConfirmed}
+ {if:ticketDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {ticketDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+ <button id="confirmTicketDelete" value="{ticketDetail.id}">Click here to confirm that this {term.ticket.norm} should be deleted.</button><br>
+ <h3 style="color: red;">Clicking the button above will permanently delete this {term.ticket.norm}.</h3>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>{term.prop.cap}</th><td>{ticketDetail.member_name:h}</td></tr>
+ <tr><th>{term.ticket.cap} Name:</th><td>{ticketDetail.name}<span style="float: right;">ID: {ticketDetail.id}</span></td></tr>
+ <tr><th>{term.ticket.cap} Title:</th><td>{ticketDetail.title:h}</td></tr>
+ {if:option.packages}
+ <tr>
+ <th>{term.ticket.cap} Type:</th>
+ <td>
+ <p>{ticketDetail.ticket_type.name}</p>
+ {if:isPackage}
+ <h4>Package Tickets</h4>
+ <table style="width: 95%;" class="emListTable">
+ <thead>
+ <tr><th>Quant</th><th>Separate Voucher</th><th>Location</th><th>Category</th><th>Ticket</th><th>Active</th></tr>
+ </thead>
+ <tbody id="selectedTicketList">
+ {foreach:ticketPackage,y}
+ <tr id="selectedTicket_{y.id}">
+ <td>{y.quant}</td>
+ <td>{y.separate_voucher.name}</td>
+ <td>{y.member_name:h}</td>
+ <td>{y.performance_name:h}</td>
+ <td>{y.title:h}</td>
+ <td>{if:y.active}Yes{else:}No{end:}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>Active:</th><td>{ticketDetail.active.name}</td></tr>
+ <tr><th>Purchase by Admin Only:</th><td>{ticketDetail.admin_only.name}</td></tr>
+ <tr><th>{term.performance.cap}:</th><td>{ticketDetail.performance:h}</td></tr>
+ <tr><th>{term.section.cap}:</th><td>{ticketDetail.section}</td></tr>
+ <tr>
+ <th>Dates available for sale:</th>
+ <td>
+ {if:ticketDetail.for_sale_start_date.date}
+ May be purchased starting on {ticketDetail.for_sale_start_date.date}<br>
+ {else:}
+ {if:ticketDetail.for_sale_end_date.date}
+ {else:}
+ No purchase date restrictions
+ {end:}
+ {end:}
+ {if:ticketDetail.for_sale_end_date.date}
+ May be purchased through {ticketDetail.for_sale_end_date.date}<br>
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Date:</th>
+ <td>
+ {if:ticketDetail.date_specific.value}
+ Dates determined by inventory.
+ <p>
+ Days of week: {foreach:ticketDetail.days_of_week.names,s}{s} {end:}
+ {if:ticketDetail.start_date.date}
+ <br>Inventory will be created from {ticketDetail.start_date.date} through {ticketDetail.end_date.date}
+ {end:}
+ </p>
+
+ {else:}
+ {if:ticketDetail.start_date.date}
+ May be used from {ticketDetail.start_date.date} through {ticketDetail.end_date.date}
+ {else:}
+ May be used on any date.
+ {end:}
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Time:</th>
+ <td>
+ {if:ticketDetail.time_specific.value}
+ {ticketDetail.ticket_time.time}
+ {else:}
+ No time specified.
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Uses per {term.ticket.cap}:</th>
+ <td>
+ {if:ticketDetail.unlimited_use.value}
+ May be used an unlimited number of times.
+ {else:}
+ {ticketDetail.uses}
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Quantity:</th>
+ <td>
+ {if:ticketDetail.unlimited_quant.value}
+ Unlimited
+ {else:}
+ {ticketDetail.quant}
+ {end:}
+ </td>
+ </tr>
+ <tr><th>Consignment Type:</th><td>{ticketDetail.consignment_type.name}</td></tr>
+ {if:checkPermission(#0#)}
+ <tr><th>Always show in cart (Sticky):</th><td>{ticketDetail.cart_sticky.name}<br>If checked (Yes), will force this to show in the cart regardless of quantity selected.</td></tr>
+ {end:}
+ <tr><th>Show on Start Page:</th><td>{ticketDetail.show_on_start.name}<br>If checked (Yes), will display this ticket on the start page under the category.</td></tr>
+ <tr><th>User selection of an Add-On Required:</th><td>{ticketDetail.addon_required.name}</td></tr>
+ <tr><th>Price:</th><td>{ticketDetail.price}</td></tr>
+ <tr><th>Description:</th><td>{ticketDetail.descr:h}</td></tr>
+ <tr>
+ <th>Image:</th>
+ <td>
+ {if:ticketDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{ticketDetail.image}">
+ {else:}(none){end:}
+ </td>
+ </tr>
+ <tr><th>Text for {term.voucher.cap}:</th><td>{ticketDetail.voucher_text:h}</td></tr>
+ <tr><th>Alternate text for left end of {term.voucher.cap}:</th><td>{ticketDetail.voucher_leftend_text:h}</td></tr>
+ <tr><th>{term.voucher.cap} Type:</th><td>{ticketDetail.voucher_type.name}</td></tr>
+ <tr><th>Sort Order:</th><td>{ticketDetail.sort}</td></tr>
+ <tr><th>Test Voucher</th><td><a href="" class="voucherPrint">Print test {term.voucher.plur}</a></td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.ticket.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#TicketDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ // Print test vouchers
+ $('.voucherPrint').click(function(){
+ var orderID = $(this).attr('emOrderID');
+ var orderVerify = $(this).attr('emOrderVerify');
+ var voucherWindow = window.open('{adminURL}&Action=Ticket_printSampleVoucher&testTicket={ticketDetail.id}',
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ });
+
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewTicket}Adding New {term.ticket.cap}{end:}
+ {if:editingTicket}Editing {term.ticket.cap}{end:}
+ </div>
+
+ <div class="emUsdTabs">
+{if:addingNewTicket}
+ <div flexy:if="checkPermission(#10#)" emTabId="Misc_blank" emContainerId="Ticket_detail_container" emTabParams="id={ticketDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{else:}
+ <div flexy:if="checkPermission(#10#)" emTabId="Ticket_detail" emContainerId="Ticket_info_container" emTabParams="id={ticketDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{end:}
+ </div> <!-- emSubTabs -->
+
+{if:formFail}
+ <div class="emRequiredInputField">Not all fields were filled in correctly. Please try again.</div>
+{end:}
+
+ <div class=".emForm">
+
+ {if:ticketDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="ticketForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewTicket}
+ <input type="hidden" name="Action" value="Ticket_insert">
+ {else:}
+ <input type="hidden" name="Action" value="Ticket_update">
+ {end:}
+
+ <input type="hidden" name="member" value="{ticketDetail.member}">
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+ <input type="hidden" name="tabList" value="{tabList}">
+
+ <div class="emListTableContainer">
+ <table class="emListTable ticketEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>{term.prop.cap}</th>
+ <td>{memberDetail.name}</td>
+ </tr>
+ <tr>
+ {if:addingNewTicket}
+ {if:fieldRequired.performance}<th class="emRequiredInputField">{else:}<th>{end:}{term.performance.cap}:</th>
+ {if:fieldFail.performance}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="performance">
+ <option value=""> </option>
+ {foreach:ticketDetail.performance.pick_list,m}
+ <option value="{m.value}" selected flexy:if="m.default">{m.name:h}</option>
+ <option value="{m.value}" flexy:if="!m.default">{m.name:h}</option>
+ {end:}
+ </select>
+ {if:fieldFail.performance}<br>{fieldFail.performance}{end:}
+ </td>
+ {else:}
+ <th>{term.performance.cap}</th>
+ <td>{ticketDetail.performance.name:h}<input type="hidden" name="performance" value="{ticketDetail.performance.value}"></td>
+ {end:}
+ </tr>
+ <tr>
+ {if:fieldRequired.name}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Name:</th>
+ {if:fieldFail.name}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="name" value="{ticketDetail.name:h}" class="emTextInput"><br>(for internal use)
+ {if:fieldFail.name}<br>{fieldFail.name}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.title}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Title:</th>
+ {if:fieldFail.title}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="title" value="{ticketDetail.title:h}" class="emTextInput"><br>(for display to customers)
+ {if:fieldFail.title}<br>{fieldFail.title}{end:}
+ </td>
+ </tr>
+ {if:option.packages}
+ <tr>
+ {if:fieldRequired.ticket_type}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Type:</th>
+ {if:fieldFail.ticket_type}<td class="emBadInputField">{else:}<td>{end:}
+ <select id="ticket_type" name="ticket_type">
+ {foreach:ticketDetail.ticket_type.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.ticket_type}<br>{fieldFail.ticket_type}{end:}
+ <div id="ticketPackageContents">
+ <h4>Package Tickets</h4>
+ <p>
+ <select id="packageTicketSelect" name="packageTicketSelect">
+ <option value="">(select a ticket to add to the package) </option>
+ {foreach:ticketsList,x}
+ {if:x.member_name}<option value="" disabled>{x.member_name:h}</option>{end:}
+ {if:x.performance}<option value="" disabled> {x.performance:h} {x.ticket}</option>{end:}
+ <option
+ id="packageTicketOption_{x.id}"
+ value="{x.id}"
+ data-member="{x.member_save:h}"
+ data-performance="{x.performance_save:h}"
+ data-title="{x.title:h}"
+ data-active="{x.active_name}"
+ > {x.title:h}</option>
+ {end:}
+ </select>
+ <input id="addPackageTicket" type="submit" value="Add Ticket to Package" onClick="return false;">
+ </p>
+ <table style="width: 95%;" class="emListTable">
+ <thead>
+ <tr><th> </th><th>Quant</th><th>Separate Voucher</th><th>Location</th><th>Category</th><th>Ticket</th><th>Active</th></tr>
+ </thead>
+ <tbody id="selectedTicketList">
+ {foreach:ticketPackage,y}
+ <tr id="selectedTicket_{y.ticket}">
+ <td data-id="{y.ticket}" class="emPseudoLink deleteSelectedTicket">X</td>
+ <td><input type="text" name="selected_ticket_quant[{y.ticket}]" class="emTextInputVeryShort" value="{y.quant}"></td>
+ <td>
+ {if:y.separate_voucher.value}
+ <input type="checkbox" name="selected_ticket_separatevoucher[{y.ticket}]" class="emTextInputVeryShort" checked>
+ {else:}
+ <input type="checkbox" name="selected_ticket_separatevoucher[{y.ticket}]" class="emTextInputVeryShort">
+ {end:}
+ </td>
+ <td>{y.member_name:h}</td>
+ <td>{y.performance_name:h}</td>
+ <td>{y.title:h}</td>
+ <td>{if:y.active}Yes{else:}No{end:}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ <th>Active:</th>
+ <td>
+ {if:ticketDetail.active.value}
+ <input type="checkbox" name="active" checked="yes">
+ {else:}
+ <input type="checkbox" name="active">
+ {end:}
+ {if:!option.packages}
+ <input type="hidden" name="ticket_type" value="10"> <!-- Putting this here because it need to go into a table element -->
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Purchase by Admin Only:</th>
+ <td>
+ {if:ticketDetail.admin_only.value}
+ <input type="checkbox" name="admin_only" checked="yes">
+ {else:}
+ <input type="checkbox" name="admin_only">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.section}<th class="emRequiredInputField">{else:}<th>{end:}{term.ticket.cap} Section:</th>
+ {if:fieldFail.section}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="section">
+ {foreach:ticketDetail.section.pick_list,m}
+ <option value="{m.value}" selected flexy:if="m.default">{m.name:h}</option>
+ <option value="{m.value}" flexy:if="!m.default">{m.name:h}</option>
+ {end:}
+ </select>
+ {if:fieldFail.section}<br>{fieldFail.section}{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Dates available for sale:</th>
+ <td>
+ <div>
+ Set range of dates during which a user may purchase these {term.ticket.plur}.<br>
+ Clear either or both fields if no start or end date is desired.
+ <table>
+ <tr>
+ {if:fieldRequired.for_sale_start_date}<th class="emRequiredInputField">{else:}<th>{end:}Start Date:</th>
+ {if:fieldFail.for_sale_start_date}<td class="emBadInputField">{else:}<td>{end:}
+ {if:addingNewTicket}
+ <input type="text" id="saleStartDateInput" name="for_sale_start_date" value="" class="emTextInputShort"><br>
+ {else:}
+ <input type="text" id="saleStartDateInput" name="for_sale_start_date" value="{ticketDetail.for_sale_start_date.date:h}" class="emTextInputShort">
+ {end:}
+ This is the first date on which these {term.ticket.plur} may be purchased.
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.for_sale_end_date}<th class="emRequiredInputField">{else:}<th>{end:}End Date:</th>
+ {if:fieldFail.for_sale_end_date}<td class="emBadInputField">{else:}<td>{end:}
+ {if:addingNewTicket}
+ <input type="text" id="saleEndDateInput" name="for_sale_end_date" value="" class="emTextInputShort"><br>
+ {else:}
+ <input type="text" id="saleEndDateInput" name="for_sale_end_date" value="{ticketDetail.for_sale_end_date.date:h}" class="emTextInputShort">
+ {end:}
+ This is the last date on which these {term.ticket.plur} may be purchaced.
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th>Specified Dates:</th>
+ {if:fieldFail.date_specific}<td class="emBadInputField">{else:}<td>{end:}
+ {if:ticketDetail.date_specific.value}
+ <input class="fieldSelectDateSpecific" type="checkbox" name="date_specific" checked="yes">
+ {else:}
+ <input class="fieldSelectDateSpecific" type="checkbox" name="date_specific">
+ {end:}
+ Check if {term.ticket.plur} are for specific dates as determined by inventory.<br>
+ <div id="date_specific">
+ <p>
+ Select days of the week for default inventory.<br>
+ {foreach:ticketDetail.days_of_week.bitmap,s}
+ {if:s.default}
+ <input type="checkbox" name="days_of_week[]" value="{s.value}" checked>{s.name}</option>
+ {else:}
+ <input type="checkbox" name="days_of_week[]" value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </p>
+ </div>
+ <div>
+ Set a range of dates during which this {term.ticket.norm} may be used.
+ <table>
+ <tr>
+ {if:fieldRequired.start_date}<th class="emRequiredInputField">{else:}<th>{end:}Start Date:</th>
+ {if:fieldFail.start_date}<td class="emBadInputField">{else:}<td>{end:}
+
+ {if:addingNewTicket}
+ <input type="text" id="startDateInput" name="start_date" value="" class="emTextInputShort"><br>
+ {else:}
+ <input type="text" id="startDateInput" name="start_date" value="{ticketDetail.start_date.date:h}" class="emTextInputShort">
+ {end:}
+ This is the first date on which these {term.ticket.plur} can be used.
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.end_date}<th class="emRequiredInputField">{else:}<th>{end:}End Date:</th>
+ {if:fieldFail.end_date}<td class="emBadInputField">{else:}<td>{end:}
+ {if:addingNewTicket}
+ <input type="text" id="endDateInput" name="end_date" value="" class="emTextInputShort"><br>
+ {else:}
+ <input type="text" id="endDateInput" name="end_date" value="{ticketDetail.end_date.date:h}" class="emTextInputShort">
+ {end:}
+ This is the last date on which these {term.ticket.plur} can be used.
+ </td>
+ </tr>
+ </table>
+ </div>
+ {if:fieldFail.date_specific}<br>{fieldFail.date_specific}{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Specified Time:</th>
+ <td>
+ {if:ticketDetail.time_specific.value}
+ <input class="fieldSelect" type="checkbox" name="time_specific" checked="yes">
+ {else:}
+ <input class="fieldSelect" type="checkbox" name="time_specific">
+ {end:}
+ Check if there is a specific time for this {term.ticket.norm}.
+ <div id="time_specific">
+ <table>
+ {if:fieldFail.ticket_time}<tr class="emBadInputField">{else:}<tr>{end:}
+ <th>Time:</th>
+ <td>
+ <input type="text" name="ticket_time" value="{ticketDetail.ticket_time.time:h}" class="textInputShort">
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th>Uses per {term.ticket.cap}:</th>
+ <td>
+ {if:ticketDetail.unlimited_use.value}
+ <input class="fieldSelectRev" type="checkbox" name="unlimited_use" checked="yes">
+ {else:}
+ <input class="fieldSelectRev" type="checkbox" name="unlimited_use">
+ {end:}
+ Check if this {term.ticket.norm} can be scanned/claimed an unlimited number of times.
+ <div id="unlimited_use">
+ <table>
+ {if:fieldFail.unlimited_use}<tr class="emBadInputField">{else:}<tr>{end:}
+ <th>Number of Uses:</th>
+ <td>
+ <input type="text" name="uses" value="{ticketDetail.uses:h}" class="textInputShort">
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <th>Quantity:</th>
+ <td>
+ {if:ticketDetail.unlimited_quant.value}
+ <input class="fieldSelectRev" type="checkbox" name="unlimited_quant" checked="yes">
+ {else:}
+ <input class="fieldSelectRev" type="checkbox" name="unlimited_quant">
+ {end:}
+ Check if the number of {term.ticket.plur} available is unlimited.
+ <div id="unlimited_quant">
+ <table>
+ {if:fieldFail.quant}<tr class="emBadInputField">{else:}<tr>{end:}
+ <th>Quantity:</th>
+ <td>
+ <input type="text" name="quant" value="{ticketDetail.quant:h}" class="textInputShort">
+ <br>Number of these {term.ticket.plur} normally available. Used as default when creating inventory.
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.consignment_type}<th class="emRequiredInputField">{else:}<th>{end:}Consignment Type:</th>
+ {if:fieldFail.consignment_type}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="consignment_type">
+ {foreach:ticketDetail.consignment_type.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.consignment_type}<br>{fieldFail.consignment_type}{end:}
+ </td>
+ </tr>
+ {if:checkPermission(#0#)}
+ <tr>
+ <th>Always show in cart:</th>
+ {if:fieldFail.cart_sticky}<td class="emBadInputField">{else:}<td>{end:}
+ {if:ticketDetail.cart_sticky.value}
+ <input class="fieldSelect" type="checkbox" name="cart_sticky" checked="yes">
+ {else:}
+ <input class="fieldSelect" type="checkbox" name="cart_sticky">
+ {end:}
+ {if:fieldFail.cart_sticky}<br>{fieldFail.cart_sticky}{end:}
+ </td>
+ </tr>
+ {end:}
+ <tr>
+ <th>Show Ticket on Start Page:</th>
+ {if:fieldFail.show_on_start}<td class="emBadInputField">{else:}<td>{end:}
+ {if:ticketDetail.show_on_start.value}
+ <input class="fieldSelect" type="checkbox" name="show_on_start" checked="yes">
+ {else:}
+ <input class="fieldSelect" type="checkbox" name="show_on_start">
+ {end:}
+ {if:fieldFail.show_on_start}<br>{fieldFail.show_on_start}{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>User Selection of Add-On is Required:</th>
+ {if:fieldFail.addon_required}<td class="emBadInputField">{else:}<td>{end:}
+ {if:ticketDetail.addon_required.value}
+ <input class="fieldSelect" type="checkbox" name="addon_required" checked="yes">
+ {else:}
+ <input class="fieldSelect" type="checkbox" name="addon_required">
+ {end:}
+ {if:fieldFail.addon_required}<br>{fieldFail.addon_required}{end:}
+ <p>
+ Select this option if you need the user to select at least one add-on at some cost
+ for this ticket to be included in the cart selection.
+ </p>
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.price}<th class="emRequiredInputField">{else:}<th>{end:}Price:</th>
+ {if:fieldFail.price}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="price" value="{ticketDetail.price:h}" class="textInputShort">
+ {if:fieldFail.price}<br>{fieldFail.price}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.descr}<th class="emRequiredInputField">{else:}<th>{end:}Description:</th>
+ {if:fieldFail.descr}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea type="text" name="descr" id="descr">{ticketDetail.descr:h}</textarea>
+ {if:fieldFail.descr}<br>{fieldFail.descr}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.image}<th class="emRequiredInputField">{else:}<th>{end:}Image:</th>
+ {if:fieldFail.image}<td class="emBadInputField">{else:}<td>{end:}
+ {if:ticketDetail.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{ticketDetail.image}">
+ <br>Delete this image: <input type="checkbox" name="image_delete">
+ {end:}
+ <input type="hidden" name="image" value="{storedDetail.image}">
+ <br>Upload or replace the image: <input type="file" name="image_new">
+ {if:fieldFail.image}<br>{fieldFail.image}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.voucher_text}<th class="emRequiredInputField">{else:}<th>{end:}Text for {term.voucher.cap}:</th>
+ {if:fieldFail.voucher_test}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea name="voucher_text" id="voucher_text">{ticketDetail.voucher_text:h}</textarea><br>
+ Please be brief to conserve space on {term.voucher.plur}.<br>
+ There is no formatting permitted for this field.
+ {if:fieldFail.voucher_text}<br>{fieldFail.voucher_text}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.voucher_leftend_text}<th class="emRequiredInputField">{else:}<th>{end:}Alternate text for left end of {term.voucher.cap}:</th>
+ {if:fieldFail.voucher_test}<td class="emBadInputField">{else:}<td>{end:}
+ <input name="voucher_leftend_text" id="voucher_leftend_text" value="{ticketDetail.voucher_leftend_text:h}" class="emTextInputMediumLong"><br>
+ Please be brief to conserve space on {term.voucher.plur}.<br>
+ There is no formatting permitted for this field. KEEP SHORT!
+ {if:fieldFail.voucher_leftend_text}<br>{fieldFail.voucher_leftend_text}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.voucher_type}<th class="emRequiredInputField">{else:}<th>{end:}{term.voucher.cap} Type:</th>
+ {if:fieldFail.voucher_type}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="voucher_type">
+ {foreach:ticketDetail.voucher_type.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.voucher_type}<br>{fieldFail.voucher_type}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.sort}<th class="emRequiredInputField">{else:}<th>{end:}Output Order:</th>
+ {if:fieldFail.sort}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="sort" value="{ticketDetail.sort:h}" class="textInputShort">
+ {if:fieldFail.sort}<br>{fieldFail.sort}{end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id="ticketFormSubmit" class="submitKeepOnPage">
+ {if:addingNewTicket}
+ <input type="submit" value="Add new {term.ticket.norm}" class="emEditSubmit">
+ {end:}
+ {if:editingTicket}
+ <input type="submit" value="Update {term.ticket.norm}" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No {term.ticket.norm} has been selected yet.</h2>
+ <p>To edit a {term.ticket.norm}, first select it from the list of available {term.ticket.plur}.
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.ticketEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#ticketForm').ajaxForm({
+ success: function(data) {
+ {if:addingNewTicket}
+ var container = $('#Ticket_detail_container');
+ f_replaceContents(data, container);
+ {end:}
+ {if:editingTicket}
+ var container = $('#Ticket_info_container');
+ f_replaceContents(data, container);
+ {end:}
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#ticketFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#descr"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#descr"));
+ });
+
+ f_restartOnTabSelect();
+
+ // Handle show/hide for check fields with additional form fields
+ function checkField(name, reverse, opposite = false) {
+ f = $("input[name='" + name + "']");
+ if (!reverse) {
+ if (f.is(':checked')) {
+ $('#' + name).show();
+ } else {
+ $('#' + name).hide();
+ }
+ } else {
+ if (f.is(':checked')) {
+ $('#' + name).hide();
+ } else {
+ $('#' + name).show();
+ }
+ }
+
+ // check for opposite selection
+ if (opposite) {
+ if (reverse) {
+ if (f.is(':checked')) {
+ $('#' + opposite).show();
+ } else {
+ $('#' + opposite).hide();
+ }
+ } else {
+ if (f.is(':checked')) {
+ $('#' + opposite).hide();
+ } else {
+ $('#' + opposite).show();
+ }
+ }
+
+ }
+ }
+
+ $('.fieldSelect').change( function() {
+ name = $(this).attr('name');
+ checkField(name, false);
+ });
+ $('.fieldSelectRev').change( function() {
+ name = $(this).attr('name');
+ checkField(name, true);
+ });
+
+ // Special case for date specific
+ $('.fieldSelectDateSpecific').change( function() {
+ checkField('date_specific', false);
+ });
+
+ // Setup additional form field show/hide when loading
+ checkField('section_specific', false);
+ checkField('date_specific', false);
+ checkField('time_specific', false);
+ checkField('unlimited_use', true);
+ checkField('unlimited_quant', true);
+
+ // Code to start datepicker for each date input
+ $("#saleStartDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{ticketDetail.for_sale_start_date.date_list.min}',
+ maxDate: '{ticketDetail.for_sale_start_date.date_list.max}'
+ });
+ $("#saleEndDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{ticketDetail.for_sale_end_date.date_list.min}',
+ maxDate: '{ticketDetail.for_sale_end_date.date_list.max}'
+ });
+ $("#startDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{ticketDetail.start_date.date_list.min}',
+ maxDate: '{ticketDetail.start_date.date_list.max}'
+ });
+ $("#endDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{ticketDetail.end_date.date_list.min}',
+ maxDate: '{ticketDetail.end_date.date_list.max}'
+ });
+
+ // Check for ticket_type being package and show the package table.
+ if ($('#ticket_type').val() == 20) {
+ $('#ticketPackageContents').show();
+ } else {
+ $('#ticketPackageContents').hide();
+ }
+ $('#ticket_type').change( function() {
+ if ($(this).val() == 20) {
+ $('#ticketPackageContents').show();
+ } else {
+ $('#ticketPackageContents').hide();
+ }
+ });
+
+ // Add selected package ticket
+ $('#addPackageTicket').click( function() {
+ var tickID = $('#packageTicketSelect').val();
+
+ // Check if this tickID is already selected
+ if (document.querySelector('#selectedTicket_' + tickID)) {
+ alert('This ticket has already been added to the package.\n Adjust quantity to add more.');
+ return false;
+ };
+
+ // If we have a good ticket ID that hasn't been added, do it now
+ if (tickID) {
+ var t = $('#packageTicketOption_' + tickID);
+ var tickMember = t.attr('data-member');
+ var tickPerformance = t.attr('data-performance');
+ var tickTitle = t.attr('data-title');
+ var tickActive = t.attr('data-active');
+ $('#selectedTicketList').append(' \
+ <tr id="selectedTicket_' + tickID + '"> \
+ <td><div data-id="' + tickID + '" class="emPseudoLink deleteSelectedTicket">X</div></td> \
+ <td><input type="text" name="selected_ticket_quant[' + tickID + ']" value="1" class="emTextInputVeryShort"></td> \
+ <td><input type="checkbox" name="selected_ticket_separatevoucher[' + tickID + ']" class="emTextInputVeryShort"></td> \
+ <td>' + tickMember + '</td> \
+ <td>' + tickPerformance + '</td> \
+ <td>' + tickTitle + '</td> \
+ <td>' + tickActive + '</td> \
+ </tr> \
+ ');
+ }
+ });
+
+ // Delete selected package ticket
+ $( document ).on( "click", ".deleteSelectedTicket", function() {
+ var tickID = $(this).attr('data-id');
+
+ $('#selectedTicket_' + tickID).remove();
+ });
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Tickt Inventory -->
+<div class="emBlock">
+
+<!-- <div class="emBlockName">{term.ticket.cap} Inventory: {ticketDetail.name:h}</div> -->
+
+ <div class="emCalendars">
+ {foreach:ticketCalendar,m}
+ <div class="emCalMonth">
+ <div class="emCalMonthName">{m.month} {m.year}</div>
+ <div class="emCalMonthColumn"></div>
+ <div class="emCalMonthColumn"></div>
+ <div class="emCalMonthColumn"></div>
+ <div class="emCalMonthColumn"></div>
+ <div class="emCalMonthColumn"></div>
+ <div class="emCalMonthColumn"></div>
+ <div class="emCalMonthColumn"></div>
+ <div class="emCalHead">
+ <div class="emCalHeadCell" day="emCalMonthJanSun">Sun</div>
+ <div class="emCalHeadCell" day="emCalMonthJanMon">Mon</div>
+ <div class="emCalHeadCell" day="emCalMonthJanTue">Tue</div>
+ <div class="emCalHeadCell" day="emCalMonthJanWed">Wed</div>
+ <div class="emCalHeadCell" day="emCalMonthJanThu">Thu</div>
+ <div class="emCalHeadCell" day="emCalMonthJanFri">Fri</div>
+ <div class="emCalHeadCell" day="emCalMonthJanSun">Sat</div>
+ </div> <!-- emCalHead -->
+ {foreach:m.weeks,w}
+ {if:w.weekUsed}
+ <div class="emCalWeek">
+ {foreach:w.days,d}
+ {if:d.isDate}
+ {if:d.selectable}
+ {if:d.active.value}
+ <div id="{d.time}" class="emCalDateCell emCalDateCellSelected emCalDateCellSelectable" day="{d.time}" invId="{d.id}">
+ {else:}
+ <div id="{d.time}" class="emCalDateCell emCalDateCellSelectable" day="{d.time}" invId="{d.id}">
+ {end:}
+ <div class="emCalDate">
+ <div class="emCalDateTitle">{d.dom}</div>
+ <div class="emCalDateEditLinks">
+ <img src="{baseURL}common/EventManagement/admin/icons/page_edit.png" class="emCalDateEditIcon" invId="{d.id}" calDate="{d.time}">
+ </div>
+ </div>
+ <div class="emCalData">
+ <div class="emCalDataRow">
+ <div class="emCalCap">Time: </div>
+ <div id="ticket_time_{d.time}" class="emCalValue">{d.ticket_time.time}</div>
+ <input type="hidden" id="timeInput_{d.time}" name="ticket_time_{d.time}" value="{d.ticket_time.time}">
+ </div>
+ {if:ticketDetail.unlimited_quant.value}
+ <div class="emCalDataRow">
+ <div class="emCalCap">Quantity: </div>
+ <div id="quant_{d.time}" class="emCalValue">Unlimited</div>
+ </div>
+ {else:}
+ <div class="emCalDataRow">
+ <div class="emCalCap">Quantity: </div>
+ <div id="quant_{d.time}" class="emCalValue">{d.quant}</div>
+ <input type="hidden" id="quantInput_{d.time}" name="quant_{d.time}" value="{d.quant}">
+ </div>
+ <div class="emCalDataRow">
+ <div class="emCalCap">Avail: </div>
+ <div id="avail_{d.time}" class="emCalValue">{d.available}</div>
+ <input type="hidden" id="availInput_{d.time}" name="avail_{d.time}" value="{d.avail}">
+ </div>
+ {end:}
+ <div class="emCalDataRow">
+ <div class="emCalCap">Sold: </div>
+ <div id="sold_{d.time}" class="emCalValue">{d.sold}</div>
+ <input type="hidden" id="soldInput_{d.time}" name="sold_{d.time}" value="{d.sold}">
+ </div>
+ </div>
+ <div id="edit_{d.time}" class="emCalEditContainerHidden"></div> <!-- container for temporary edit pop-up -->
+ </div>
+ {else:}
+ <div class="emCalDateCell emCalDateCellNotice">
+ <div class="emCalDate">
+ <div class="emCalDateTitle">{d.dom}</div>
+ <div class="emCalDateEditLinks"></div>
+ </div>
+ <div class="emCalData">
+ </div>
+ </div>
+ {end:}
+ {else:}
+ <div class="emCalNoDateCell"> </div>
+ {end:} <!-- isDate -->
+ {end:} <!-- days -->
+ </div> <!-- emCalWeek -->
+ {end:} <!-- weekUsed -->
+ {end:} <!-- weeks -->
+ </div> <!-- emCalMonth -->
+ {end:} <!-- ticketCalendar -->
+ </div> <!-- emCalendars -->
+
+ <ul>
+ <li>Click date cell to dissable or enable a partcular date.</li>
+ <li>Click on edit icon to change the values.</li>
+ </ul>
+
+
+</div> <!-- emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ // Send user notice if they click a non-inventory cell
+ $('.emCalDateCellNotice').click( function() {
+ alert('This is not within the date range for the {term.performance.norm}. To add inventory for this date, edit the {term.performance.norm} and change the start or end date.');
+ });
+
+ // Toggle date cell on-off
+ $('.emCalDateCellSelectable').click( function() {
+
+ var thisCell = $(this);
+ var thisId = $(this).attr('invId');
+ var invStatus;
+
+ // If the cell is currently selected
+ if (thisCell.hasClass("emCalDateCellSelected")) {
+ invStatus = 0; // Change to not selected
+ } else {
+ invStatus = 1; // Otherwise change to selected
+ }
+
+
+ $.ajax({
+ url: "{adminURL}&Action=Ticket_setActive&TicketInventoryID=" + thisId + "&TicketInventoryStatus=" + invStatus,
+ success: function() {
+ // Update cell status display
+ if (invStatus == 1) {
+ thisCell.addClass('emCalDateCellSelected');
+ } else {
+ thisCell.removeClass('emCalDateCellSelected');
+ }
+ } ,
+ error: function() {
+ alert(
+ 'There was an error while submitting this information.\n' +
+ 'The information may not have been updated.\n' +
+ 'Please try again later or call for support.'
+ );
+ }
+ });
+
+ });
+
+
+ // Pop-up calendar edit forms
+ $('.emCalDateEditIcon').click( function() {
+
+ // get needed parameters
+ var dateTime = $(this).attr('calDate');
+ var thisId = $(this).attr('invId');
+ var thisTime = $('#ticket_time_' + dateTime).html();
+ var thisQuant = $('#quant_' + dateTime).html();
+ var thisAvail = $('#avail_' + dateTime).html();
+ var thisSold = $('#sold_' + dateTime).html();
+
+ // Place edit form in cell edit container
+ $('#edit_'+dateTime).html(' \
+ <div id="calEdit" title="Edit Inventory Date"> \
+ <form id="calEditForm" action="{adminURL}" class="emCalEditForm"> \
+ <input type="hidden" name="Action" value="Ticket_inventoryUpdate"> \
+ <input type="hidden" name="TicketInventoryID" value="' + thisId + '"> \
+<!-- <div class="emCalEditField"> \
+ <div class="emCalEditPrompt">Time: </div> \
+ <input id="calEditTime" type="text" name="ticket_time" value="' + thisTime + '" class="emCalEditValue"> \
+ </div> --> \
+ {if:ticketDetail.unlimited_quant.value}
+ <div class="emCalEditField"> \
+ <div class="emCalEditPrompt">Quantity: </div> \
+ <div class="emCalEditValue">Unlimited</div> \
+ </div> \
+ {else:}
+ <div class="emCalEditField"> \
+ <div class="emCalEditPrompt">Quantity: </div> \
+ <input id="calEditQuant" type="text" name="quant" value="' + thisQuant + '" class="emCalEditValue"> \
+ </div> \
+ <div class="emCalEditField"> \
+ <div class="emCalEditPrompt">Available: </div> \
+ <input id="calEditAvail" type="text" name="available" value="' + thisAvail + '" class="emCalEditValue"> \
+ </div> \
+ {end:}
+ <div class="emCalEditField"> \
+ <div class="emCalEditPrompt">Sold: </div> \
+ <input id="calEditSold" type="text" name="sold" value="' + thisSold + '" class="emCalEditValue"> \
+ </div> \
+ </form> \
+ <div id="calEditPleaseWait"></div> \
+ </div> \
+ ');
+
+ // Start dialog pop-up
+ $('#calEdit').dialog({
+ autoOpen: true,
+ modal: true,
+ position: {
+ my: "bottom",
+ at: "top",
+ of: "#" + dateTime
+ },
+ buttons: {
+ "Update": function() {
+
+ $('#calEditForm').addClass('emCalEditContainerHidden');
+ $('#calEditPleaseWait').html('<div class="emBLock"><div class="emLoading">Storing, Please Wait...</div></div>');
+
+ var tf = $(this);
+
+ // Submit form
+ $('#calEditForm').ajaxForm({
+ success: function(data) {
+
+ // Copy data from pop-up back to selected calendar date
+ var valEditTime = $("#calEditTime").val();
+ var valEditQuant = $("#calEditQuant").val();
+ var valEditAvail = $("#calEditAvail").val();
+ var valEditSold = $("#calEditSold").val();
+ $('#ticket_time_' + dateTime).html( valEditTime );
+ $('#quant_' + dateTime).html( valEditQuant );
+ $('#avail_' + dateTime).html( valEditAvail );
+ $('#sold_' + dateTime).html( valEditSold );
+
+ // Destroy dialog pop-up
+ tf.dialog( "close" );
+ tf.dialog('destroy').remove();
+ return false;
+
+ } ,
+ error: function() {
+
+ // If the data was not able to be submitted
+ alert(
+ 'There was an error while submitting this information.\n' +
+ 'The information may not have been updated.\n' +
+ 'Please try again later or call for support.'
+ );
+
+ // Destroy dialog pop-up
+ tf.dialog( "close" );
+ tf.dialog('destroy').remove();
+ return false;
+
+ }
+ });
+
+ // Kick ajaxForm submission
+ $('#calEditForm').submit();
+
+ }
+ }
+ });
+
+ return false;
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<!-- Ticket Inventory -->
+<div class="emBlock">
+ <div class=".emForm">
+ <h2>Editing {term.ticket.norm} inventory for all dates</h2>
+ <p>This {term.ticket.norm} is not date specific.</p>
+ {foreach:inventoryData,d}
+ <form id="invEditForm" action="{adminURL}" class="emCalEditForm">
+ <input type="hidden" name="Action" value="Ticket_inventoryUpdate">
+ <input type="hidden" name="TicketInventoryID" value="{d.id}">
+ <input type="hidden" name="dateSpecific" value="true">
+ <table class="emListTable invEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tr><th>{term.performance.cap}:</th><td>{ticketDetail.performance}</td></tr>
+ <tr><th>{term.ticket.cap}:</th><td>{ticketDetail.name}</td></tr>
+ {if:ticketDetail.unlimited_quant.value}
+ <tr><th><div class="emCalEditPrompt">Quantity: </div></th><td>Unlimited<span style="float: right">Inv ID: {d.id}</span></td></tr>
+ {else:}
+ <tr>
+ <th><div class="emCalEditPrompt">Quantity: </div></th>
+ <td>
+ <input id="calEditQuant" type="text" name="quant" value="{d.quant}" class="emCalEditValueLeft">
+ <span style="float: right">Inv ID: {d.id}</span>
+ </td>
+ </tr>
+ <tr>
+ <th><div class="emCalEditPrompt">Available: </div></th>
+ <td><input id="calEditAvail" type="text" name="available" value="{d.available}" class="emCalEditValueLeft"></td>
+ </tr>
+ {end:}
+ <tr>
+ <th><div class="emCalEditPrompt">Sold: </div></th>
+ <td><input id="calEditSold" type="text" name="sold" value="{d.sold}" class="emCalEditValueLeft"></td>
+ </tr>
+ <tr><th> </th><td><input type="submit"></td></tr>
+ </table>
+ </form>
+ <div id="calEditPleaseWait">{if:inventoryUpdated}Updated{end:}</div>
+ {end:}
+
+ </div>
+
+</div> <!-- emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.invEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#invEditForm').ajaxForm({
+ beforeSend: function(e) {
+ $('#calEditPleaseWait').html('<div class="emBLock"><div class="emLoading">Storing, Please Wait...</div></div>');
+ },
+ success: function(data) {
+ var container = $('#Ticket_info_container');
+ f_replaceContents(data, container);
+ return false;
+ }
+ });
+
+
+ });
+
+</script>
--- /dev/null
+<!-- Tickt List -->
+<div class="emBlock">
+
+ <div id="Ticket_container" class="emSliderClosed">
+ <div class="emUsdTabs">
+{if:checkPermission(#10#)}
+ <div flexy:if="!blockTab.Ticket_add" emTabId="Ticket_add" emContainerId="Ticket_detail_container" emTabParams="memberID={memberID}&tabList={tabList}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Add a {term.ticket.cap}</div>
+ </div>
+{end:}
+ <div class="emTab emLink" style="float: right;">
+ <div id="ticketListSizeChange">Larger Table</div>
+ </div>
+ </div> <!-- emSubTabs -->
+ Search {term.ticket.plur_cap}: <input type="text" id="ticketsSearch" name="ticketsSearchField"> (start typing any information in list)
+
+ {if:tickets}
+
+ <div id="TicketListTable_wrapper" class="emListTableContainer">
+ <table id="TicketListTable" class="emListTable">
+ <thead>
+ <tr>
+ <th style="width: 60px;">Sort Order</th>
+ <th>Ticket Name</th>
+ {if:option.packages}
+ <th>Type</th>
+ {end:}
+ <th>Active</th>
+ <th>Admin Only</th>
+ <th>{term.prop.cap}</th>
+ <th>{term.performance.cap}</th>
+ <th>Sticky</th>
+ <th>Show on Start</th>
+ <th>Section</th>
+ <th>Time</th>
+ </tr>
+ </thead>
+ <tbody>
+ {foreach:tickets,c}
+ <tr>
+ <td>{c.sort}</td>
+ <td emTicketId="{c.id}" class="emLink ticketListSelect">{c.name}</td>
+ {if:option.packages}
+ <td emTicketId="{c.id}" class="emLink ticketListSelect">{c.ticket_type.name}</td>
+ {end:}
+ <td emTicketId="{c.id}" class="emLink ticketListSelect">{c.active.name}</td>
+ <td emTicketId="{c.id}" class="emLink ticketListSelect">{c.admin_only.name}</td>
+ <td emTicketId="{c.id}" class="emLink ticketListSelect">{c.member_name:h}</td>
+ <td emTicketId="{c.id}" class="emLink ticketListSelect">{c.performance:h}</td>
+ <td>{c.cart_sticky.name}</td>
+ <td>{c.show_on_start.name}</td>
+ <td>{c.section}</td>
+ <td>
+ {if:c.time_specific.value}
+ {c.ticket_time.time}
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No {term.ticket.plur} listed.</p>
+ {end:}
+
+ <div id="Ticket_detail_container" class="emSliderClosed">
+ </div>
+
+ </div>
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // Tickets Search
+ var ticketsSearchData = [
+ {foreach:tickets,c}
+ {label:'{c.performance}, {c.name:h}, {c.section}, {c.ticket_time.time}', value:'{c.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var TicketListTable = $('#TicketListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ "aoColumns" : [
+ { sWidth: '80px', "sType": "numeric" },
+ null,
+ null,
+ {if:option.packages}
+ null,
+ {end:}
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ { sWidth: '80px' }
+ ]
+ });
+ $(window).resize(function(){
+ TicketListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var TicketListTableSmall = true;
+ var TicketListTableHeight = $('#TicketListTable_wrapper div.dataTables_scrollBody').height();
+ $('#ticketListSizeChange').click(function() {
+ if (TicketListTableSmall) {
+ $('#TicketListTable_wrapper div.dataTables_scrollBody').height('auto');
+ TicketListTableSmall = false;
+ $(this).html('Smaller Table');
+ TicketListTable.fnSettings().oScroll.sY = '100%';
+ TicketListTable.fnDraw();
+ } else {
+ $('#TicketListTable_wrapper div.dataTables_scrollBody').height(TicketListTableHeight);
+ TicketListTableSmall = true;
+ $(this).html('Larger Table');
+ TicketListTable.fnSettings().oScroll.sY = '100px';
+ TicketListTable.fnDraw();
+ }
+ });
+
+ // Close all local sliders
+ $('#Ticket_detail').hide(duration);
+
+ $('.ticketListSelect').click(function(){
+ $('#TicketListTable_wrapper div.dataTables_scrollBody').height(TicketListTableHeight);
+ TicketListTableSmall = true;
+ $('#ticketListSizeChange').html('Larger Table');
+ TicketListTable.fnSettings().oScroll.sY = '100px';
+ TicketListTable.fnDraw();
+ f_loadAction('Ticket_selected', 'Ticket_detail_container', 'TicketID=' + $(this).attr('emTicketId') + '&tabList={tabList}');
+ });
+
+ // Search Tickets
+ $("#ticketsSearch").autocomplete({
+ source: ticketsSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#ticketsSearch").attr({value: ui.item.label});
+ f_loadAction('Ticket_selected', 'Ticket_detail_container', 'TicketID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div style="float: left;">
+ <div class="emBlockName">{term.ticket.cap}: {ticketDetail.name}</div>
+ </div>
+
+ <div class="emBlock">
+
+ <!--
+ Sub Tabs
+ -->
+ <div class="emSubTabs">
+{if:checkPermission(#30#)}
+ <div flexy:if="!blockTab.Ticket_detail" id="Ticket_detail" emTabId="Ticket_detail" emContainerId="Ticket_info_container" emTabParams="tabList={tabList}" emTabGroup="TicketTabs" class="emTab TicketTabs emLink emTabSelected">
+ <div class="emTabName">{term.ticket.cap} Detail</div>
+ </div>
+{end:}
+{if:checkPermission(#20#)}
+ <div flexy:if="!blockTab.Ticket_selected" id="Ticket_selected" emTabId="Ticket_selected" emContainerId="Ticket_info_container" emTabParams="MemberID={ticketDetail.member_id}&tabList={tabList}" emTabGroup="TicketTabs" class="emTab TicketTabs emLink">
+ <div class="emTabName">{term.prop.cap}</div>
+ </div>
+{end:}
+{if:checkPermission(#10#)}
+ <div flexy:if="!blockTab.Ticket_list" id="Ticket_list" emTabId="Ticket_list" emContainerId="Ticket_info_container" emTabParams="tabList={tabList}" emTabGroup="TicketTabs" class="emTab TicketTabs emLink">
+ <div class="emTabName">{term.ticket.plur_cap}</div>
+ </div>
+ <div flexy:if="!blockTab.Addon_list" id="Addon_list" emTabId="Addon_list" emContainerId="Ticket_info_container" emTabParams="ticketID={ticketDetail.id}&tabList={tabList}" emTabGroup="TicketTabs" class="emTab TicketTabs emLink">
+ <div class="emTabName">{term.ticket.plur_cap} Add-Ons</div>
+ </div>
+{end:}
+
+{if:checkPermission(#10#)}
+ {if:noTicketInventory}
+ <div flexy:if="checkPermission(#10#)" flexy:if="!blockTab.Ticket_inventory" id="Ticket_inventory" emTabId="Ticket_inventory" emContainerId="Ticket_info_container" emTabParams="ticketID={ticketDetail.id}&CreateInventory=true&tabList={tabList}" emTabGroup="TicketTabs" class="emTab TicketTabs emLink">
+ <div class="emTabName">Create {term.ticket.cap} Inventory</div>
+ </div>
+ {else:}
+ <div flexy:if="checkPermission(#10#)" flexy:if="!blockTab.Ticket_inventory" id="Ticket_inventory" emTabId="Ticket_inventory" emContainerId="Ticket_info_container" emTabParams="ticketID={ticketDetail.id}&tabList={tabList}" emTabGroup="TicketTabs" class="emTab TicketTabs emLink">
+ <div class="emTabName">{term.ticket.cap} Inventory</div>
+ </div>
+ {end:}
+{end:}
+{if:checkPermission(#20#)}
+ <div flexy:if="checkPermission(#20#)" flexy:if="!blockTab.Performance_selected" id="Performance_selected" emTabId="Performance_selected" emContainerId="Ticket_info_container" emTabParams="PerformanceID={ticketDetail.performance_id}&tabList={tabList}" emTabGroup="TicketTabs" class="emTab TicketTabs emLink">
+ <div class="emTabName">{term.performance.cap}</div>
+ </div>
+{end:}
+
+ </div> <!-- emSubTabs -->
+
+ <!--
+ Content Areas
+ -->
+ <div id="Ticket_info_container" class="emContentArea emSlider">
+ </div>
+
+ </div> <!-- emBlock -->
+
+</div> <!-- emBlock -->
+
+
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ // Start with ticket detail loaded
+ f_loadAction('Ticket_detail', 'Ticket_info_container', "tabList={tabList}");
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.9.4/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.9.4/media/css/jquery.dataTables.css">
+ <script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/ckeditor/ckeditor-4.1.1/ckeditor.js"></script>
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>
+
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+
+ <!--
+ Main Tabs
+ -->
+ <div class="emMainTabs">
+
+ <div emTabId="Member_list" emContainerId="Main_container" emTabParams="tabList={tabList}" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.prop.cap}</div>
+ </div>
+ {if:option.tickets}
+ <div emTabId="Performance_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.performance.cap}</div>
+ </div>
+ <div emTabId="Ticket_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.ticket.cap}</div>
+ </div>
+ <div emTabId="Order_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.ticket.cap} Orders</div>
+ </div>
+ <div emTabId="Sold_claim" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.ticket.cap} Claim/Status</div>
+ </div>
+
+ {end:}
+ {if:option.events}
+ <div emTabId="Event_stats" emContainerId="Main_container" emTabParams="tabList={tabList}" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.event.cap}</div>
+ </div>
+ {end:}
+ <div emTabId="Report_report" emContainerId="Main_container" emTabParams="tabList={tabList}" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">Report</div>
+ </div>
+ <div emTabId="Index_help" emContainerId="Main_container" emTabParams="tabList={tabList}" emTabGroup="MainTabs" class="emTab MainTabs emLink" style="float: right;">
+ <div class="emTabName">Help</div>
+ </div>
+ <div emTabId="Index_welcome" emContainerId="Main_container" emTabParams="tabList={tabList}" emTabGroup="MainTabs" class="emTab MainTabs emLink emTabSelected" style="float: right;">
+ <div class="emTabName">Welcome</div>
+ </div>
+
+ </div> <!-- emMainTabs -->
+
+ <!--
+ Content Areas
+ -->
+ <div id="Main_container" class="emContentArea emMainBlock">
+ <flexy:include src="tickets/Welcome/index.html" />
+ </div> <!-- EMcontentArea -->
+
+ <div id="EMfoot">
+ Gaslight Media - Event Management and Ticketing System
+ </div>
+
+ </body>
+
+</html>
+
+
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ {startScript:h}\r
+ \r
+ // Pass some reference parameters to JAVAScript\r
+ var baseSiteURL = '{baseURL}';\r
+ var baseAdminURL = '{baseAdminURL}';\r
+ var appAdminURL = '{appAdminURL}';\r
+ var memberUser = '{MemberUser}';\r
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};\r
+ var debugWidth = {option.admin_debug_size};\r
+ \r
+ </script> \r
+\r
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script> \r
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>\r
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css"> \r
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>\r
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.9.4/media/js/jquery.dataTables.min.js"></script>\r
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.9.4/media/css/jquery.dataTables.css">\r
+ <script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>\r
+ <script type="text/javascript" src="{baseURL}common/Public/ckeditor/ckeditor-4.1.1/ckeditor.js"></script> \r
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>\r
+ \r
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">\r
+ \r
+ </head>\r
+ <body>\r
+\r
+ {config.owner.name}\r
+ <!-- \r
+ Content Areas\r
+ -->\r
+ <div id="Main_container" class="emContentArea emMainBlock" style="text-align: center;">\r
+ <div class="emBlock">\r
+ <div id="WelcomeHead">\r
+ <div class="emBlockName">{owner.name} Event Ticket System</div>\r
+ <p>\r
+ Please log in using your user E-Mail address or ID and your password.\r
+ </p>\r
+ </div>\r
+\r
+ {if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+ {end:}\r
+\r
+ <center> \r
+ <form id="loginForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data" autocomplete="off">\r
+ <input type="hidden" name="emUserType" value="member">\r
+ <input type="hidden" name="Action" value="User_login">\r
+ <table>\r
+ <tbody>\r
+ <tr>\r
+ <th align="right">E-Mail Address or Log in ID:</th>\r
+ <td><input id="email" type="text" name="email" value="" class="emTextInput" autocomplete="off"></td> \r
+ </tr>\r
+ <tr>\r
+ <th align="right">Password:</th>\r
+ <td><input type="password" name="password" value="" class="emTextInput" autocomplete="off"></td> \r
+ </tr>\r
+ </tbody>\r
+ </table>\r
+ \r
+ <div id="loginFormSubmit">\r
+ <input type="submit" value="Log In" class="emEditSubmit">\r
+ </div>\r
+ \r
+ </form>\r
+ </center>\r
+ \r
+ <p>\r
+ This section of this Web site is for authorized persons only.\r
+ Tampering and unauthorized access will be reported. \r
+ </p>\r
+\r
+ </div>\r
+ </div> <!-- EMcontentArea -->\r
+\r
+ <div id="EMfoot">\r
+ Gaslight Media - Event Management System\r
+ </div>\r
+ \r
+ {startScript:h}\r
+ \r
+ $(document).ready(function(){\r
+ \r
+ $("#email").focus();\r
+ \r
+ });\r
+ \r
+ </script>\r
+\r
+ </body>\r
+\r
+</html>\r
+\r
+\r
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">Delete this {term.coupon.cap}</div>
+
+ <div class="emBlockName">{VoucherCouponDetail.name}</div>
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="VoucherCoupon_confirmDelete" emContainerId="VoucherCoupon_detail_container" emTabParams="id={voucherCouponDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Confirm Delete</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="VoucherCoupon_detail" emContainerId="VoucherCoupon_detail_container" emTabParams="id={vcoucherCouponDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel Delete</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:voucherCouponDetail}
+ <div class="emListTableContainerLeft">
+ <table id="VoucherCouponDeleteTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>Delete {term.coupon.cap}:</th>
+ <td>
+ <h3 style="color: red;">Clicking "Confirm Delete" on the right will permanently delete this {term.ticket.norm} add-on.</h3>
+ </td>
+ </tr>
+
+ <tr><th>{term.coupon.cap}:</th><td>{voucherCouponDetail.name:h}<span style="float: right;">ID: {voucherCouponDetail.id}</span></td></tr>
+ <tr><th>Type:</th><td>{voucherCouponDetail.coupon_type.name:h}</td></tr>
+ <tr><th>Active:</th><td>{voucherCouponDetail.active.name}</td></tr>
+ <tr><th>Position:</th><td>{voucherCouponDetail.coupon_position.name:h}</td></tr>
+ <tr><th>Display From:</th><td>{voucherCouponDetail.display_from.date}</td></tr>
+ <tr><th>Display To:</th><td>{voucherCouponDetail.display_to.date}</td></tr>
+ <tr><th>Image:</th><td><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{voucherCouponDetail.coupon_image}"></td></tr>
+ <tr><th>Stretch to Fit:</th><td>{voucherCouponDetail.stretch_to_fit.name}</td></tr>
+ <tr><th>Padding:</th><td>{voucherCouponDetail.padding}</td></tr>
+ <tr><th>Show Border:</th><td>{voucherCouponDetail.show_border.name}</td></tr>
+ <tr><th>Maximum Display Count:</th><td>{voucherCouponDetail.max_display_count}</td></tr>
+ <tr><th>Current Display Count:</th><td>{voucherCouponDetail.display_count}</td></tr>
+ <tr><th>Notes:</th><td>{voucherCouponDetail.notes:h}</td></tr>
+ </tbody>
+ </table>
+ {else:}
+ <p>No {term.coupon.plur} found.</p>
+ {end:}
+
+ </div>
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#VoucherCouponDeleteTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+<!-- <div class="emBlockName">{voucherCouponDetail.name}</div> -->
+
+ <div class="emUsdTabs">
+ <div flexy:if="checkPermission(#10#)" emTabId="VoucherCoupon_delete" emContainerId="VoucherCoupon_detail_container" emTabParams="VoucherCouponID={voucherCouponDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Delete {term.coupon.cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="VoucherCoupon_edit" emContainerId="VoucherCoupon_detail_container" emTabParams="VoucherCouponID={voucherCouponDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Edit {term.coupon.cap}</div>
+ </div>
+ </div> <!-- emSubTabs -->
+
+ {if:voucherCouponDetail}
+ <div class="emListTableContainerLeft">
+ <table id="VoucherCouponDetailTable" class="emListTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ {if:voucherCouponDetail.delete}
+ <tr>
+ <th>Delete {term.coupon.cap}:</th>
+ <td>
+ {if:voucherCouponDetail.deleteConfirmed}
+ {if:voucherCouponDetail.deleteFailure}
+ <h2 style="color: red;">FAILED:</h2>
+ Sorry, we are unable to delete the entry at this time.<br>
+ {voucherCouponDetail.reason:h}
+ {else:}
+ <h2>Deleted</h2>
+ {end:}
+ {else:}
+ <button id="confirmVoucherCouponDelete" value="{voucherCouponDetail.id}">Click here to confirm that this {term.coupon.norm} should be deleted.</button><br>
+ <h3 style="color: red;">Clicking the button above will permanently delete this {term.coupon.norm}.</h3>
+ {end:}
+ </td>
+ </tr>
+ {end:}
+ <tr><th>{term.coupon.cap}:</th><td>{voucherCouponDetail.name:h}<span style="float: right;">ID: {voucherCouponDetail.id}</span></td></tr>
+ <tr><th>Active:</th><td>{voucherCouponDetail.active.name}</td></tr>
+ <tr><th>Type:</th><td>{voucherCouponDetail.coupon_type.name:h}</td></tr>
+ <tr><th>Position:</th><td>{voucherCouponDetail.coupon_position.name:h}</td></tr>
+ <tr><th>Display From:</th><td>{voucherCouponDetail.display_from.date}</td></tr>
+ <tr><th>Display To:</th><td>{voucherCouponDetail.display_to.date}</td></tr>
+ <tr><th>Image:</th><td><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{voucherCouponDetail.coupon_image}"></td></tr>
+ <tr><th>Stretch to Fit:</th><td>{voucherCouponDetail.stretch_to_fit.name}</td></tr>
+ <tr><th>Padding:</th><td>{voucherCouponDetail.padding}</td></tr>
+ <tr><th>Show Border:</th><td>{voucherCouponDetail.show_border.name}</td></tr>
+ <tr><th>Maximum Display Count:</th><td>{voucherCouponDetail.max_display_count}</td></tr>
+ <tr><th>Current Display Count:</th><td>{voucherCouponDetail.display_count}</td></tr>
+ <tr><th>Notes:</th><td>{voucherCouponDetail.notes:h}</td></tr>
+ </tbody>
+ </table>
+ </div>
+ {else:}
+ <p>No {term.coupon.plur} found.</p>
+ {end:}
+
+
+</div>
+{startScript:h}
+ $(document).ready(function(){
+
+ $('#VoucherCouponDetailTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ f_restartOnTabSelect();
+
+ });
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ {if:addingNewVoucherCoupon}Adding New {term.coupon.cap}{end:}
+ {if:editingVoucherCoupon}Editing {term.coupon.cap}{end:}
+ </div>a
+
+ <div class="emUsdTabs">
+{if:addingNewVoucherCoupon}
+ <div flexy:if="checkPermission(#10#)" emTabId="Misc_blank" emContainerId="VoucherCoupon_detail_container" emTabParams="id={voucherCouponDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{else:}
+ <div flexy:if="checkPermission(#10#)" emTabId="VoucherCoupon_detail" emContainerId="VoucherCoupon_detail_container" emTabParams="id={voucherCouponDetail.id}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Cancel</div>
+ </div>
+{end:}
+ </div> <!-- emSubTabs -->
+
+{if:formFail}
+ <div class="emRequiredInputField">Not all fields were filled in correctly. Please try again.</div>
+{end:}
+
+ <div class=".emForm">
+
+ {if:voucherCouponDetail}
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="voucherCouponForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+ {if:addingNewVoucherCoupon}
+ <input type="hidden" name="Action" value="VoucherCoupon_insert">
+ {else:}
+ <input type="hidden" name="Action" value="VoucherCoupon_update">
+ {end:}
+
+ <input type="hidden" id="formFail" name="formFail" value="{formFail}">
+ <input type="hidden" name="tabList" value="{tabList}">
+ <input type="hidden" name="VoucherCouponID" value="{voucherCouponDetail.id}">
+
+ <div class="emListTableContainer">
+ <table class="emListTable voucherCouponEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ {if:fieldRequired.name}<th class="emRequiredInputField">{else:}<th>{end:}{term.coupon.cap} Name:</th>
+ {if:fieldFail.name}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="name" value="{voucherCouponDetail.name:h}" class="emTextInputLong"><br>
+ {if:fieldFail.name}<br>{fieldFail.name}{end:}
+ <br>This is for reference only, it is not displayed to users.
+ </td>
+ </tr>
+ <tr>
+ <th>Active:</th>
+ <td>
+ {if:voucherCouponDetail.active.value}
+ <input type="checkbox" name="active" checked="yes">
+ {else:}
+ <input type="checkbox" name="active">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.coupon_type}<th class="emRequiredInputField">{else:}<th>{end:}{term.coupon.cap} Type:</th>
+ {if:fieldFail.coupon_type}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="coupon_type">
+ <option value=""> </option>
+ {foreach:voucherCouponDetail.coupon_type.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.coupon_type}<br>{fieldFail.coupon_type}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.coupon_position}<th class="emRequiredInputField">{else:}<th>{end:}{term.coupon.cap} Position:</th>
+ {if:fieldFail.coupon_position}<td class="emBadInputField">{else:}<td>{end:}
+ <select name="coupon_position">
+ <option value=""> </option>
+ {foreach:voucherCouponDetail.coupon_position.list,s}
+ {if:s.default}
+ <option value="{s.value}" SELECTED>{s.name}</option>
+ {else:}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ {end:}
+ </select>
+ {if:fieldFail.coupon_position}<br>{fieldFail.coupon_position}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.display_from}<th class="emRequiredInputField">{else:}<th>{end:}Display From:</th>
+ {if:fieldFail.display_from}<td class="emBadInputField">{else:}<td>{end:}
+ {if:addingNewVoucherCoupon}
+ <input type="text" id="displayFromInput" name="display_from" value="" class="emTextInputShort">
+ {else:}
+ <input type="text" id="displayFromInput" name="display_from" value="{voucherCouponDetail.display_from.date:h}" class="emTextInputShort">
+ {end:}
+ {if:fieldFail.display_from}<br>{fieldFail.display_from}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.display_to}<th class="emRequiredInputField">{else:}<th>{end:}Display To:</th>
+ {if:fieldFail.display_to}<td class="emBadInputField">{else:}<td>{end:}
+ {if:addingNewVoucherCoupon}
+ <input type="text" id="displayToInput" name="display_to" value="" class="emTextInputShort">
+ {else:}
+ <input type="text" id="displayToInput" name="display_to" value="{voucherCouponDetail.display_to.date:h}" class="emTextInputShort">
+ {end:}
+ {if:fieldFail.display_to}<br>{fieldFail.display_to}{end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.coupon_image}<th class="emRequiredInputField">{else:}<th>{end:}{term.coupon.cap} Image:</th>
+ {if:fieldFail.coupon_image}<td class="emBadInputField">{else:}<td>{end:}
+ {if:voucherCouponDetail.coupon_image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.default}/{voucherCouponDetail.coupon_image}">
+ <br>Delete this image: <input type="checkbox" name="coupon_image_delete">
+ {end:}
+ <input type="hidden" name="coupon_image" value="{storedDetail.coupon_image}">
+ <br>Upload or replace the image: <input type="file" name="coupon_image_new">
+ {if:fieldFail.coupon_image}<br>{fieldFail.coupon_image}{end:}
+ </td>
+ </tr>
+ <tr>
+ <th>Stretch to Fit:</th>
+ <td>
+ {if:voucherCouponDetail.stretch_to_fit.value}
+ <input type="checkbox" name="stretch_to_fit" checked="yes">
+ {else:}
+ <input type="checkbox" name="stretch_to_fit">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.padding}<th class="emRequiredInputField">{else:}<th>{end:}Padding:</th>
+ {if:fieldFail.padding}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="padding" value="{voucherCouponDetail.padding}" class="textInputShort">
+ {if:fieldFail.padding}<br>{fieldFail.padding}{end:}
+ <br>This is the minimum amount of space between the image and all sides of the Ad/Coupon box.<br>
+ The value is in the units displayed when you select the "Test" button at the upper-right.
+ </td>
+ </tr>
+ <tr>
+ <th>Show Border:</th>
+ <td>
+ {if:voucherCouponDetail.show_border.value}
+ <input type="checkbox" name="show_border" checked="yes">
+ {else:}
+ <input type="checkbox" name="show_border">
+ {end:}
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.max_display_count}<th class="emRequiredInputField">{else:}<th>{end:}Maximum Display Count:</th>
+ {if:fieldFail.max_display_count}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="max_display_count" value="{voucherCouponDetail.max_display_count}" class="textInputShort">
+ {if:fieldFail.max_display_count}<br>{fieldFail.max_display_count}{end:}
+ <br>Maximum number of times this {term.coupon.norm} will be included in a {term.voucher.norm}. Set to -1 for unlimited.
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.display_count}<th class="emRequiredInputField">{else:}<th>{end:}Current Display Count:</th>
+ {if:fieldFail.display_count}<td class="emBadInputField">{else:}<td>{end:}
+ <input type="text" name="display_count" value="{voucherCouponDetail.display_count}" class="textInputShort">
+ {if:fieldFail.display_count}<br>{fieldFail.display_count}{end:}
+ <br>This is the number of times this {term.coupon.norm} has been included in a {term.voucher.norm}.
+ </td>
+ </tr>
+ <tr>
+ {if:fieldRequired.notes}<th class="emRequiredInputField">{else:}<th>{end:}Notes:</th>
+ {if:fieldFail.notes}<td class="emBadInputField">{else:}<td>{end:}
+ <textarea type="text" name="notes" id="notes">{voucherCouponDetail.notes:h}</textarea>
+ {if:fieldFail.notes}<br>{fieldFail.notes}{end:}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div id="voucherCouponFormSubmit" class="submitKeepOnPage">
+ {if:addingNewVoucherCoupon}
+ <input type="submit" value="Add new {term.coupon.norm}" class="emEditSubmit">
+ {end:}
+ {if:editingVoucherCoupon}
+ <input type="submit" value="Update {term.coupon.norm}" class="emEditSubmit">
+ {end:}
+ </div>
+
+ </form>
+
+ {else:}
+ <h2>No {term.coupon.norm} has been selected yet.</h2>
+ <p>To edit a {term.coupon.norm}, first select it from the list of available {term.coupon.plur}.
+ {end:}
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.voucherCouponEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ /*
+ * AJAX form handling
+ */
+
+ $('#voucherCouponForm').ajaxForm({
+ success: function(data) {
+ {if:addingNewVoucherCoupon}
+ var container = $('#VoucherCoupon_detail_container');
+ f_replaceContents(data, container);
+ {end:}
+ {if:editingVoucherCoupon}
+ var container = $('#VoucherCoupon_detail_container');
+ f_replaceContents(data, container);
+ {end:}
+ return false;
+ }
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ $('#voucherCouponFormSubmit').html('<div class="emLoading">Submitting, Please Wait...</div>');
+ e.preventDefault();
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#notes"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#notes"));
+ });
+
+ f_restartOnTabSelect();
+
+ /*
+ * Date input operations
+ */
+
+ // Code to start datepicker for each date input
+ $("#displayFromInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{voucherCouponDetail.display_from.date_list.min}',
+ maxDate: '{voucherCouponDetail.display_from.date_list.max}'
+ });
+ $("#displayToInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{voucherCouponDetail.display_to.date_list.min}',
+ maxDate: '{voucherCouponDetail.display_to.date_list.max}'
+ });
+
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<!-- Voucher Coupons List -->
+<div class="emBlock">
+
+ <div id="VoucherCoupon_container" class="emSliderClosed">
+ <div class="emUsdTabs">
+{if:checkPermission(#10#)}
+ <div flexy:if="!blockTab.VoucherCoupon_add" emTabId="VoucherCoupon_add" emContainerId="VoucherCoupon_detail_container" emTabParams="tabList={tabList}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Add a {term.coupon.cap}</div>
+ </div>
+ <div flexy:if="!blockTab.VoucherCoupon_test" emTabId="VoucherCoupon_test" emContainerId="VoucherCoupon_detail_container" emTabParams="tabList={tabList}" emTabGroup="none" class="emTab emLink" style="float: right;">
+ <div class="emTabName">Test {term.coupon.plur_cap}</div>
+ </div>
+{end:}
+ <div class="emTab emLink" style="float: right;">
+ <div id="voucherCouponListSizeChange">Larger Table</div>
+ </div>
+ </div> <!-- emSubTabs -->
+ Search {term.coupon.plur_cap}: <input type="text" id="voucherCouponsSearch" name="voucherCouponsSearchField"> (start typing any information in list)
+
+ {if:voucherCoupons}
+
+ <div id="VoucherCouponListTable_wrapper" class="emListTableContainer">
+ <table id="VoucherCouponListTable" class="emListTable">
+ <thead>
+ <tr><th>{term.coupon.cap}</th><th>Active<th>Type</th><th>Position</th><th>From</th><th>To</th><th>Max</th><th>Count</th></tr>
+ </thead>
+ <tbody>
+ {foreach:voucherCoupons,c}
+ <tr>
+ <td emVoucherCouponId="{c.id}" class="emLink voucherCouponListSelect">{c.name:h}</td>
+ <td emVoucherCouponId="{c.id}" class="emLink voucherCouponListSelect">{c.active.name}</td>
+ <td emVoucherCouponId="{c.id}" class="emLink voucherCouponListSelect">{c.coupon_type.name:h}</td>
+ <td emVoucherCouponId="{c.id}" class="emLink voucherCouponListSelect">{c.coupon_position.name:h}</td>
+ <td emVoucherCouponId="{c.id}" class="emLink voucherCouponListSelect">{c.display_from.date}</td>
+ <td emVoucherCouponId="{c.id}" class="emLink voucherCouponListSelect">{c.display_to.date}</td>
+ <td emVoucherCouponId="{c.id}" class="emLink voucherCouponListSelect">{c.max_display_count}</td>
+ <td emVoucherCouponId="{c.id}" class="emLink voucherCouponListSelect">{c.display_count:h}</td>
+ </tr>
+ {end:}
+ </tbody>
+ </table>
+ </div>
+
+ {else:}
+ <p>No {term.coupon.plur}.</p>
+ {end:}
+
+ <div id="VoucherCoupon_detail_container" class="emSliderClosed">
+ </div>
+
+ </div>
+
+</div> <!-- emBlock -->
+{startScript:h}
+
+ // Voucher Coupons Search
+ var voucherCouponsSearchData = [
+ {foreach:voucherCoupons,c}
+ {label:'{c.name:h}, {c.coupon_position.name:h}, {c.display_from.date}, {c.display_to.date}', value:'{c.id}'},
+ {end:}
+ ];
+
+ $(function() {
+
+ var VoucherCouponListTable = $('#VoucherCouponListTable').dataTable({
+ "sScrollY": "100px",
+ "scrollX": true,
+ "bScrollCollapse": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true,
+ });
+ $(window).resize(function(){
+ VoucherCouponListTable.fnDraw();
+ });
+
+ // Toggle length of table
+ var VoucherCouponListTableSmall = true;
+ var VoucherCouponListTableHeight = $('#VoucherCouponListTable_wrapper div.dataTables_scrollBody').height();
+ $('#voucherCouponListSizeChange').click(function() {
+ if (VoucherCouponListTableSmall) {
+ $('#VoucherCouponListTable_wrapper div.dataTables_scrollBody').height('auto');
+ VoucherCouponListTableSmall = false;
+ $(this).html('Smaller Table');
+ VoucherCouponListTable.fnSettings().oScroll.sY = '100%';
+ VoucherCouponListTable.fnDraw();
+ } else {
+ $('#VoucherCouponListTable_wrapper div.dataTables_scrollBody').height(VoucherCouponListTableHeight);
+ VoucherCouponListTableSmall = true;
+ $(this).html('Larger Table');
+ VoucherCouponListTable.fnSettings().oScroll.sY = '100px';
+ VoucherCouponListTable.fnDraw();
+ }
+ });
+
+ // Close all local sliders
+ $('#VoucherCoupon_detail').hide(duration);
+
+ $('.voucherCouponListSelect').click(function(){
+ $('#VoucherCouponListTable_wrapper div.dataTables_scrollBody').height(VoucherCouponListTableHeight);
+ VoucherCouponListTableSmall = true;
+ $('#voucherCouponListSizeChange').html('Larger Table');
+ VoucherCouponListTable.fnSettings().oScroll.sY = '100px';
+ VoucherCouponListTable.fnDraw();
+ f_loadAction('VoucherCoupon_selected', 'VoucherCoupon_detail_container', 'VoucherCouponID=' + $(this).attr('emVoucherCouponId') + '&tabList={tabList}');
+ });
+
+ // Search Voucher Coupons
+ $("#voucherCouponsSearch").autocomplete({
+ source: voucherCouponsSearchData,
+ minLength: 1,
+ focus: function(event, ui) {
+ // Don't auto fill on focus
+ return false;
+ },
+ select: function(event, ui) {
+ $("#voucherCouponsSearch").attr({value: ui.item.label});
+ f_loadAction('VoucherCoupon_selected', 'VoucherCoupon_detail_container', 'VoucherCouponID=' + ui.item.value + '&tabList={tabList}');
+ return false;
+ }
+ });
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div style="float: left;">
+ <div class="emBlockName">{term.coupon.cap}: {voucherCouponDetail.name}</div>
+ </div>
+
+ <div class="emBlock">
+
+ <!--
+ Content Areas
+ -->
+ <div id="VoucherCoupon_detail_container" class="emContentArea emSlider">
+ </div>
+
+ </div> <!-- emBlock -->
+
+</div> <!-- emBlock -->
+
+
+{startScript:h}
+
+ // jQuery Section
+ $(document).ready(function(){
+
+ // Start with ticket detail loaded
+ f_loadAction('VoucherCoupon_detail', 'VoucherCoupon_detail_container', "tabList={tabList}");
+
+ f_restartOnTabSelect();
+
+ });
+
+</script>
--- /dev/null
+<div class="emBlock">
+
+ <div class="emBlockName">
+ Test {term.coupon.plur_cap}
+ </div>
+
+ <div class=".emForm">
+
+ <p>Required fields in <span class="emFormReqField">RED</span>.</p>
+
+ <form id="voucherCouponTestForm" class="emAjaxForm" action="{adminURL}" method="post" enctype="multipart/form-data">
+
+ <div class="emListTableContainer">
+ <table class="emListTable voucherCouponEditTable">
+ <thead style="display: none;"><tr><td></td><td></td></tr></thead>
+ <tbody>
+ <tr>
+ <th>{term.coupon.cap} Name:</th>
+ <td>
+ <input type="text" name="name" value="{voucherCouponDetail.name:h}" class="emTextInputLong">
+ </td>
+ </tr>
+ <tr>
+ <th>Active:</th>
+ <td>
+ <input type="checkbox" name="active">
+ </td>
+ </tr>
+ <tr>
+ <th>{term.coupon.cap} Type:</th>
+ <td>
+ <select name="coupon_type">
+ <option value=""> </option>
+ {foreach:voucherCouponDetail.fieldData.coupon_type.list,s}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th>{term.coupon.cap} Position:</th>
+ <td>
+ <select name="coupon_position">
+ <option value=""> </option>
+ {foreach:voucherCouponDetail.fieldData.coupon_position.list,s}
+ <option value="{s.value}">{s.name}</option>
+ {end:}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <th>Date:</th>
+ <td>
+ <input type="text" id="date" name="date" value="" class="emTextInputShort">
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+
+ <input type="submit" value="Test {term.coupon.cap}" class="emEditSubmit">
+
+ </form>
+
+ </div> <!-- / emForm -->
+
+ <div id="theResult"></div>
+
+
+</div> <!-- /emBlock -->
+
+{startScript:h}
+
+ $(function() {
+
+ /*
+ * Table operations
+ */
+
+ $('.voucherCouponEditTable').dataTable({
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": false,
+ "bInfo": false,
+ "bAutoWidth": false,
+ "bDestroy": true
+ });
+
+ // Block default form submission
+ $("form").submit(function (e) {
+ var date = $('#date').val();
+ var voucherWindow = window.open('{adminURL}&Action=Ticket_printSampleVoucher&testCoupons=true&date=' + date,
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ return false;
+ });
+
+ /*
+ * CKeditor actions
+ */
+
+ // Code to kick off CKEditor for specific fields
+ f_buildCkeditor($("#notes"));
+
+ // Remove the editors and store the data back in the textareas before the AJAX form submission
+ $('.emEditSubmit').click( function() {
+ f_removeCkeditor($("#notes"));
+ });
+
+ f_restartOnTabSelect();
+
+ /*
+ * Date input operations
+ */
+
+ // Code to start datepicker for each date input
+ $("#date").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: '{voucherCouponDetail.display_from.date_list.min}',
+ maxDate: '{voucherCouponDetail.display_from.date_list.max}'
+ });
+
+ // Print test vouchers
+ $('.voucherPrint').click(function(){
+ var date = $(this).attr('emOrderID');
+ var orderVerify = $(this).attr('emOrderVerify');
+ var voucherWindow = window.open('{adminURL}&Action=Ticket_printSampleVoucher&testTicket={ticketDetail.id}',
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ });
+
+
+
+ });
+
+</script>
\ No newline at end of file
--- /dev/null
+<div class="emBlock">\r
+\r
+{if:userMemberID}\r
+ <div id="WelcomeHead" style="text-align: center; margin: 2em;">\r
+ <div class="emBlockName">{userMemberVenueName} {term.ticket.cap} Management System</div>\r
+ {if:checkPermission(#10#)}\r
+ <p>\r
+ For assistance with this system please call {owner.name} at {owner.phone} \r
+ </p>\r
+ {else:}\r
+ \r
+ {end:}\r
+ \r
+ </div>\r
+{else:}\r
+ <div id="WelcomeHead">\r
+ <div class="emBlockName" style="text-align: center; margin: 2em;">Welcome to the Gaslight Media Event Management / Ticketing System.</div>\r
+ <p>\r
+ In an effort to provide our customers with the best possible service, Gaslight Media will from time to \r
+ time make improvements to this application and correct problems that we have noticed \r
+ or that have been reported to us. Updates will be posted here so that you can be aware of improvements. \r
+ As always, please let us know if you have any concerns, need any assistance, or would like to suggest new features.\r
+ </p>\r
+ </div>\r
+ <div class="emBlockSeparator"></div>\r
+ <div class="emBlockSection">\r
+ <div class="emBlockSectionHEad emSlider emLink" emSliderId="Welcome_05_09_2013">Updates for 3/26/2015</div>\r
+ <div id="Welcome_07_16_2013" class="emContentArea">\r
+ <div class="emBlock">\r
+ <p>The following updates have been included in this version...</p>\r
+ <ul>\r
+ <li>\r
+ <p>\r
+ <b>"Admin Only" Sales:</b> There is now a tab at the upper-right of the Event Management / Ticketing System admin interface called\r
+ "Place an Order". When you click this, it will take you to the front-end of the the Event/Ticketing system to place an order. It \r
+ will also know that you are an admin user and will include certain categories and items that are not available to regular \r
+ users. To specify which items you would like to mark as "Admin Only", select either the "Categories" or "Items" tab, select\r
+ the desired entry from the list, edit that entry and check the "Purchase by Admin Only" checkbox then save by clicking the Update button.\r
+ </p>\r
+ <p>\r
+ Note that when you are in the front end as an "Admin" user, you will see the "Purchasing By Admin User" banner across the top of each\r
+ page. \r
+ </p>\r
+ </li>\r
+ </ul>\r
+ </div>\r
+ </div>\r
+ </div>\r
+{end:}\r
+\r
+</div>\r
+\r
+{startScript:h}\r
+ \r
+ // jQuery Section\r
+ $(document).ready(function(){\r
+\r
+ });\r
+\r
+</script>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+ var debugWidth = {option.admin_debug_size};
+ var startWithClaims = {startWithClaims};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/ckeditor/ckeditor-4.1.1/ckeditor.js"></script>
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>
+
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.3/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin=""/>
+ <script src="https://unpkg.com/leaflet@1.3.3/dist/leaflet.js" integrity="sha512-tAGcCfR4Sc5ZP5ZoVz0quoZDYX5aCtEm/eu1KhSLj2c9eFrylXZknQYmxUssFaVJKvvc0dJQixhGjG2yXWiV9Q==" crossorigin=""></script>
+
+ </head>
+ <body>
+
+ {if:userMemberID}
+ <p>
+ <span class="GLMloginStatusField"><span class="GLMloginStatusPrompt">Logged in:</span> {memberName} <a href="{appAdminURL}&EMlogout=true">(Logout)</a></span>
+ <!-- <span class="GLMloginStatusField"><span class="GLMloginStatusPrompt">{term.prop.cap}:</span> {userMemberVenueName}</span> -->
+ </p>
+ {end:}
+
+ <!--
+ Main Tabs - Note that all main tabs ask for reset of selection information in session
+ -->
+ <div class="emMainTabs">
+
+ {if:userMemberID}
+ <div flexy:if="checkPermission(#10#)" emTabId="Member_selected" emContainerId="Main_container" emTabParams="MemberID={userMemberID}&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.prop.plur_cap}</div>
+ </div>
+ {else:}
+ <div emTabId="Member_list" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.prop.plur_cap}</div>
+ </div>
+ {end:}
+ {if:option.tickets}
+ <div flexy:if="checkPermission(#10#)" emTabId="Performance_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.performance.plur_cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Ticket_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.ticket.plur_cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Promo_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.promo.plur_cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="VoucherCoupon_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.coupon.plur_cap}</div>
+ </div>
+<!--
+ <div flexy:if="checkPermission(#10#)" emTabId="Attendance_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.attendance_log.plur_cap}</div>
+ </div>
+-->
+ <div class="emTabSpace"></div>
+ <!--
+ <div flexy:if="checkPermission(#20#)" emTabId="Order_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.ticket.cap} Orders</div>
+ </div>
+ -->
+ <div flexy:if="checkPermission(#30#)" id="claimStatusTab" emTabId="Sold_claim" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.ticket.cap} Claim/Status</div>
+ </div>
+<!--
+ <div flexy:if="checkPermission(#10#)" id="fixPackagesTab" emTabId="Sold_fixPackages" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">Fix Packages</div>
+ </div>
+-->
+ <div class="emTabSpace"></div>
+ {end:}
+ {if:option.events}
+ <div flexy:if="checkPermission(#0#)" emTabId="Event_stats" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.event.cap}</div>
+ </div>
+ <div class="emTabSpace"></div>
+ {end:}
+ <div flexy:if="checkPermission(#20#)" emTabId="Report_index" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">Report</div>
+ </div>
+ <div flexy:if="checkPermission(#0#)" emTabId="Misc_index" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">Misc</div>
+ </div>
+ <div flexy:if="checkPermission(#19#)" emTabId="Help_index" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink" style="float: right;">
+ <div class="emTabName">Help</div>
+ </div>
+ <div flexy:if="checkPermission(#19#)" emTabId="Index_welcome" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink emTabSelected" style="float: right;">
+ <div class="emTabName">Welcome</div>
+ </div>
+ <div id="placeOrder" flexy:if="checkPermission(#19#)" class="emTab MainTabs emLink" style="float: right;">
+ <div class="emTabName">Place an Order</div>
+ </div>
+ </div> <!-- emMainTabs -->
+
+ <!--
+ Content Areas
+ -->
+ <div id="Main_container" class="emContentArea emMainBlock">
+ <flexy:include src="tickets/Welcome/index.html" />
+ </div> <!-- EMcontentArea -->
+
+ <div id="EMfoot">
+
+{if:userMemberID}
+ {userMemberVenueName} {term.ticket.cap} Management System<br>
+ {if:checkPermission(#10#)}
+ For assistance with this system please call {owner.name} at {owner.phone}
+ {else:}
+
+ {end:}
+{else:}
+
+ Gaslight Media - Event Management and Ticketing System
+{end:}
+ </div>
+
+ {startScript:h}
+
+ $(function() {
+
+ if (startWithClaims) {
+ f_loadAction('Sold_claim', 'Main_container', "tabList=");
+ $('#claimStatusTab').addClass('emTabSelected');
+ }
+
+ });
+
+ // Link to front-end ticket ordering
+ $('#placeOrder').click( function() {
+ window.open('{frontEndOrderLink}?adminUserCheck={adminUserFrontLinkCheck}','_blank');
+ });
+
+ </script>
+
+
+ </body>
+
+</html>
+
+
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ {startScript:h}
+
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAdminURL = '{baseAdminURL}';
+ var appAdminURL = '{appAdminURL}';
+ var memberUser = '{MemberUser}';
+ var debugEnabled = {if:option.admin_debug}true{else:}false{end:};
+ var debugWidth = {option.admin_debug_size};
+ var startWithClaims = {startWithClaims};
+
+ </script>
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-form/jquery.form.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/js/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/DataTables/DataTables-1.10.1/media/css/jquery.dataTables.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/ckeditor/ckeditor-4.1.1/ckeditor.js"></script>
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>
+
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+
+ {if:userMemberID}
+ <p>
+ <span class="GLMloginStatusField"><span class="GLMloginStatusPrompt">Logged in:</span> {memberName} <a href="{appAdminURL}&EMlogout=true">(Logout)</a></span>
+ <!-- <span class="GLMloginStatusField"><span class="GLMloginStatusPrompt">{term.prop.cap}:</span> {userMemberVenueName}</span> -->
+ </p>
+ {end:}
+
+ <!--
+ Main Tabs - Note that all main tabs ask for reset of selection information in session
+ -->
+ <div class="emMainTabs">
+
+ {if:userMemberID}
+ <div flexy:if="checkPermission(#10#)" emTabId="Member_selected" emContainerId="Main_container" emTabParams="MemberID={userMemberID}&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.prop.plur_cap}</div>
+ </div>
+ {else:}
+ <div emTabId="Member_list" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.prop.plur_cap}</div>
+ </div>
+ {end:}
+ {if:option.tickets}
+ <div flexy:if="checkPermission(#10#)" emTabId="Performance_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.performance.plur_cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Ticket_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.ticket.plur_cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="Promo_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.promo.plur_cap}</div>
+ </div>
+ <div flexy:if="checkPermission(#10#)" emTabId="VoucherCoupon_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.coupon.plur_cap}</div>
+ </div>
+<!--
+ <div flexy:if="checkPermission(#10#)" emTabId="Attendance_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.attendance_log.plur_cap}</div>
+ </div>
+-->
+ <div class="emTabSpace"></div>
+ <!--
+ <div flexy:if="checkPermission(#20#)" emTabId="Order_list" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.ticket.cap} Orders</div>
+ </div>
+ -->
+ <div flexy:if="checkPermission(#30#)" id="claimStatusTab" emTabId="Sold_claim" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.ticket.cap} Claim/Status</div>
+ </div>
+<!--
+ <div flexy:if="checkPermission(#10#)" id="fixPackagesTab" emTabId="Sold_fixPackages" emContainerId="Main_container" emTabParams="listType=all&tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">Fix Packages</div>
+ </div>
+-->
+ <div class="emTabSpace"></div>
+ {end:}
+ {if:option.events}
+ <div flexy:if="checkPermission(#0#)" emTabId="Event_stats" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">{term.event.cap}</div>
+ </div>
+ <div class="emTabSpace"></div>
+ {end:}
+ <div flexy:if="checkPermission(#20#)" emTabId="Report_index" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">Report</div>
+ </div>
+ <div flexy:if="checkPermission(#0#)" emTabId="Misc_index" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink">
+ <div class="emTabName">Misc</div>
+ </div>
+ <div flexy:if="checkPermission(#19#)" emTabId="Help_index" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink" style="float: right;">
+ <div class="emTabName">Help</div>
+ </div>
+ <div flexy:if="checkPermission(#19#)" emTabId="Index_welcome" emContainerId="Main_container" emTabParams="tabList={tabList}&resetSelected=true" emTabGroup="MainTabs" class="emTab MainTabs emLink emTabSelected" style="float: right;">
+ <div class="emTabName">Welcome</div>
+ </div>
+ <div id="placeOrder" flexy:if="checkPermission(#19#)" class="emTab MainTabs emLink" style="float: right;">
+ <div class="emTabName">Place an Order</div>
+ </div>
+ </div> <!-- emMainTabs -->
+
+ <!--
+ Content Areas
+ -->
+ <div id="Main_container" class="emContentArea emMainBlock">
+ <flexy:include src="tickets/Welcome/index.html" />
+ </div> <!-- EMcontentArea -->
+
+ <div id="EMfoot">
+
+{if:userMemberID}
+ {userMemberVenueName} {term.ticket.cap} Management System<br>
+ {if:checkPermission(#10#)}
+ For assistance with this system please call {owner.name} at {owner.phone}
+ {else:}
+
+ {end:}
+{else:}
+
+ Gaslight Media - Event Management and Ticketing System
+{end:}
+ </div>
+
+ {startScript:h}
+
+ $(function() {
+
+ if (startWithClaims) {
+ f_loadAction('Sold_claim', 'Main_container', "tabList=");
+ $('#claimStatusTab').addClass('emTabSelected');
+ }
+
+ });
+
+ // Link to front-end ticket ordering
+ $('#placeOrder').click( function() {
+ window.open('{frontEndOrderLink}?adminUserCheck={adminUserFrontLinkCheck}','_blank');
+ });
+
+ </script>
+
+
+ </body>
+
+</html>
+
+
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body id="debugBody">\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="updateTimestamp">\r
+ <b>Updated:</b> {debugUpdateTime}\r
+ </div> \r
+ <div id="debugBody">\r
+ {debugData:h}\r
+ </div>\r
+ </body>\r
+ \r
+ \r
+\r
+ {startScript:h}\r
+ \r
+ // Reload the current window with Action = Debug_update\r
+ function reloadDebugWindow()\r
+ {\r
+ window.location("{baseSCRIPT}&Action=Debug_update");\r
+ }\r
+ \r
+ </script> \r
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body>\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="debugData">Debug Startup</div>\r
+ </body>\r
+</html>
\ No newline at end of file
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="FoundationStandAlone/head.html" /> <!-- Note direct reference to interface type -->\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Your PayPal payment has been approved.</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ Your cart will now reflect that the payment has been made.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="FoundationStandAlone/head.html" /> <!-- Note direct reference to interface type -->\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Unable to process your payment!</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ <div class="glmCartFormPrompt glmCartRequired">Sorry, there was a problem.</div>\r
+ </p>\r
+ \r
+ <p>\r
+ We were unable to find your purchase information and are therefore \r
+ are unable to process your payment through PayPal. This could be\r
+ due to you not performing any action with your pending purchase\r
+ for too long. Please click the "Return to selected tickets" button\r
+ at the top of the checkout page to see if your selections are still listed.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Additional Info Page
+-->
+<flexy:include src="FoundationStandAlone/head.html" /> <!-- Note direct reference to interface type -->
+
+<form id="cartForm" action="">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a> <!-- sends user to cart page -->
+ {if:!option.ticket_shop.start_at_cart}
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to start of shop -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{cartText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+
+ <!-- Problem display -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <h2>We're sorry, we had a problem with your request:</h2>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+ <!-- Cart Contents -->
+
+{foreach:cart,c} <!-- each venue -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="large-12 columns"><h2>{c.name:h}</h2></div>
+ </div>
+ {end:}
+
+
+ <!-- If we need to assign this ticket to be sold in another venue or we need to ask for likely date of use -->
+
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ <p>
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange glmTicketDateInput"> mm/dd/yyyy
+ {if:text.cart.select_likely_date_explain}
+ <br>{text.cart.select_likely_date_explain}
+ {end:}
+ </p>
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+{end:} <!-- /each venue -->
+
+ <!-- Cart Summary and Checkout Button -->
+
+{if:cartHasContents}
+ <div class="row">
+ <div class="large-12 columns text-right">
+ {if:!blockCheckout}
+ <a class="small button right radius buttonTickets buttonTicketsGo" id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" >{term.nav.checkout}</a>
+ {else:}
+ <a class="small button right radius alert disabled buttonTickets">Please complete the items in RED above.</a>
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{else:}
+ <div class="row">
+ <div class="large-12 columns">
+ <p class="right">Your cart is currently empty.</p>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{end:}
+
+</form> <!-- /cartForm -->
+
+<!-- Set some flexy page parameters for use in JAVAscript -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ vertScroll="vertScroll"
+ addtionalInfoPage="option.ticket_shop.additionalInfo.use_page"
+>
+
+<!-- jQuery scripts for controlling page actions -->
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365,
+ beforeShow: function(){
+ $(".ui-datepicker").css('font-size', 12)
+ }
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = flex_startURL;
+ });
+
+ if (flex_vertScroll) {
+ window.scrollTo(0, flex_vertScroll);
+ }
+
+ });
+
+</script>
+<flexy:include src="FoundationStandAlone/foot.html" /> <!-- Note direct reference to interface type -->
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Cart Page
+-->
+<flexy:include src="FoundationStandAlone/head.html" /> <!-- Note direct reference to interface type -->
+
+<form id="cartForm" action="">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ {if:!option.ticket_selection.start_at_cart}
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{cartText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+
+ <!-- Problem display -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <span class="h2Tickets">We're sorry, we had a problem with your request:</span>
+ <ul class="disk">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+{if:havePromoCodes} <!-- If there's any promo codes, provide that input -->
+
+ <!-- Promo Code input -->
+
+ <div class="row colapse">
+ <div class="small-12 medium-12 large-5 columns">
+ <span class="show-for-medium-up">If you have a {term.promo.norm}, please enter it here:</span>
+ <span class="show-for-small-only">Enter {term.promo.cap} here:</span>
+ </div>
+ <div class="small-6 medium-4 large-2 columns end">
+ <input class="left inline" id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
+ </div>
+ </div>
+
+{end:}
+
+ <!-- Cart Contents -->
+
+{foreach:cart,c} <!-- each venue -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="large-12 columns"><span class="h2Tickets">{c.name:h}</span></div>
+ </div>
+ {end:}
+
+ <!-- Each Performance -->
+
+ {foreach:c.performances,p}
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel callout">
+
+ <!-- Performance Header and optional nav links -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ {if:!option.ticket_shop.start_at_cart}
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{term.nav.select_more_of_these}</a>
+ {end:}
+ <span class="h3Tickets">
+ <a class="h3Tickets" href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name:h}</a>
+ </span>
+ </div>
+ </div>
+
+ <!-- Performance descriptions and image -->
+
+ <div class="row">
+ <div class="small-9 columns">
+ {if:p.short_descr}
+ {p.short_descr:h}
+ {else:}
+ {if:p.descr}
+ {p.descr:h}
+ {end:}
+ {end:}
+ </div>
+ {if:option.ticket_shop.cart.show_performance_image}
+ {if:p.image}
+ <!-- Image for smaller displays -->
+ <div class="small-3 columns hide-for-medium-up">
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{p.image}">
+ </div>
+ <!-- Image for larger displays -->
+ <div class="medium-3 columns show-for-medium-up">
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}">
+ </div>
+ {end:}
+ {end:}
+ </div>
+
+ <!-- Each date selected for this performance -->
+
+ {foreach:p.dates,d}
+ <div class="row"> </div>
+ <div class="row">
+ <div class="large-12 columns">
+ <h5>
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+ Use any date
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </h5>
+ </div>
+ </div>
+
+ <!-- Each venue section for this date -->
+
+ {foreach:d.sections,s}
+ <div class="row show-for-medium-up">
+ <div class="small-2 columns"><b>Quant</b></div>
+ {if:!p.oneSectionOnly}
+ <div class="small-2 columns"><b>{term.section.cap}</b></div>
+ <div class="small-4 columns">
+ {else:}
+ <div class="small-6 columns">
+ {end:}
+ <b>{term.ticket.cap}</b>
+ </div>
+ <div class="small-2 columns text-right"><b>Price</b></div>
+ <div class="small-2 columns text-right"><b>Sub-Total</b></div>
+ </div>
+
+ <!-- Each ticket for this section -->
+
+ {foreach:s.tickets,i}
+
+ <!-- Cart row for LARGE browsers -->
+
+ <div class="row show-for-medium-up" style="margin-top: 1.5em;">
+ <div id="quant_ticket_{i.invID}" class="small-2 columns text-left">
+ <small><input id="quant_ticket_select_{id.invID}" class="glmCartQuant" type="number" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}"></small>
+ </div>
+ {if:!p.oneSectionOnly}
+ <div class="small-2 columns">{s.name:h}</div>
+ <div class="small-4 columns">
+ {else:}
+ <div class="small-6 columns">
+ {end:}
+ {i.title}
+ {if:i.required_addon_not_supplied}
+ <br>
+ <span class="glmCartRequired">At least one item below is required.</span>
+ {end:}
+ </div>
+ <div class="small-2 columns text-right">{if:i.show_price}{i.price}{end:}</div>
+ <div class="small-2 columns text-right">{if:!i.show_addons}{if:i.show_price}{i.extended}{end:}{end:}</div>
+ </div>
+
+ <!-- Cart row for SMALL-Medium browsers -->
+
+ <div class="hide-for-medium-up" style="margin-top: 1.5em;">
+ <div class="row">
+ <div class="small-12 columns"><span class="h2Tickets">{i.title}</span></div>
+ </div>
+ {if:i.problem}
+ <div class="row">
+ <div class="small-12 columns">
+ <div data-alert class="alert-box">{i.problemText}</div>
+ </div>
+ </div>
+ {end:}
+ {if:i.descr}
+ <!-- Ticket description and image for SMALL-Medium browsers -->
+
+ <div class="row hide-for-medium-up">
+ <div class="medium-2 columns"></div>
+ <div class="medium-10 columns">
+ {if:option.ticket_shop.cart.show_ticket_image}
+ {if:i.image}
+ <img class="right" src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}">
+ {end:}
+ {end:}
+ {i.descr:h}
+ </div>
+ </div>
+ {end:}
+
+ {if:!p.oneSectionOnly}
+ <div class="row">
+ <div class="small-4 columns"><b>{term.section.cap}:</b></div>
+ <div class="small-8 columns">{s.name:h}</div>
+ </div>
+ {end:}
+ <div class="row">
+ <div class="small-4 columns"><b>Quant:</b></div>
+ <div class="small-4 columns"> </div>
+ <div id="quant_ticket_{i.invID}_s" class="small-4 columns text-right">
+ <input class="glmCartQuant" type="number" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}">
+ </div>
+ </div>
+ {if:i.price_numb}
+ <div class="row">
+ <div class="small-4 columns"><b>Price:</b></div>
+ <div class="small-8 columns text-right">{if:i.show_price}{i.price}{end:}</div>
+ </div>
+ {end:}
+ {if:!i.show_addons}
+ <div class="row">
+ <div class="small-4 columns"><b>Sub-Total:</b></div>
+ <div class="small-8 columns text-right">{if:i.show_price}{i.extended}{end:}</div>
+ </div>
+ {end:}
+ </div>
+ {if:option.packages}
+ {foreach:i.packageData,y}
+ <div class="row">
+ <div class="medium-1 columns"> </div>
+ <div class="medium-1 columns">
+ {y.quant}
+ </div>
+ <div class="medium-10 columns">
+ {y.title} - {y.performance_name}
+ </div>
+ </div>
+ {end:}
+ {end:}
+ {if:i.descr}
+ <!-- Ticket images and description for LARGE browsers-->
+
+ <div class="row show-for-medium-up">
+ <div class="medium-2 columns"></div>
+ <div class="medium-10 columns">
+ {if:option.ticket_shop.cart.show_ticket_image}
+ {if:i.image}
+ <img class="right" src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}">
+ {end:}
+ {end:}
+ {i.descr:h}
+ </div>
+ </div>
+ {end:}
+
+ <!-- For each add-on for this ticket -->
+
+ {if:i.show_addons}
+ {foreach:i.addons,a}
+
+ <!-- Add-on for LARGE browsers -->
+
+ <div class="row show-for-medium-up">
+ <div class="medium-1 columns"> </div>
+ <div id="quant_addon_{a.id}" class="medium-2 columns text-right">
+ <input class="glmCartQuant" type="number" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units="" value="{a.selected}">
+ </div>
+ <div class="medium-5 columns">{a.name}</div>
+ <div class="medium-2 columns text-right">{a.unit_cost}/{a.unit_name:h}</div>
+ <div class="medium-2 columns text-right"><!-- {a.money} --></div>
+ </div>
+
+ <!-- Add-on for SMALL-Medium browsers -->
+
+ <div class="hide-for-medium-up" style="margin-top: 1em;">
+ <div class="row">
+ <div class="small-12 columns text-center"><h4>{a.name}</h4></div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns"><b>Quant:</b></div>
+ <div class="small-4 columns"> </div>
+ <div id="quant_addon_{a.id}_s" class="small-4 columns text-right">
+ <input class="glmCartQuant" type="number" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units="" value="{a.selected}">
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns text-left"><b>Price:</b></div>
+ <div class="small-8 columns text-right">{a.unit_cost}/{a.unit_name:h}</div>
+ </div>
+ <!--
+ <div class="row">
+ <div class="small-4 columns text-left"><b>Sub-Total:</b></div>
+ <div class="small-8 columns text-right">{a.money}</div>
+ </div>
+ -->
+ </div>
+
+ {end:} <!-- /each addons -->
+ <div class="row"> </div>
+ <div class="row">
+ <div class="small-4 columns text-left"><b>Sub-Total:</b></div>
+ <div class="small-8 columns text-right">{i.extended}</div>
+ </div>
+ <div class="row"> </div>
+ {end:} <!-- /show addons -->
+ <!-- If user selected a promo code that matches this ticket -->
+
+ {if:i.promo}
+ <div class="row show-for-medium-up">
+ <div class="medium-2 columns"> </div>
+ <div class="medium-6 columns">
+ <b>{term.promo.cap}: {promoCode}</b>
+ </div>
+ <div class="medium-2 columns text-right"></div>
+ <div class="medium-2 columns text-right">
+ {i.promo.credit}
+ </div>
+ </div>
+ <div class="row hide-for-medium-up" style="margin-top: 1em;">
+ <div class="small-4 columns"><b>Promo:</b></div>
+ <div class="small-4 columns">{promoCode}:</div>
+ <div class="small-4 columns text-right">{i.promo.credit}</div>
+ </div>
+
+ {end:} <!-- /if Promo Code -->
+
+ {end:} <!-- /each ticket -->
+
+ {end:} <!-- /each section -->
+
+ {end:} <!-- /each date -->
+
+ </div> <!-- /panel callout -->
+ </div> <!-- columns -->
+ </div> <!-- rows -->
+
+ {end:} <!-- each performance -->
+
+ <!-- If we need to assign this ticket to be sold in another venue or we need to ask for likely date of use and that's not done on a separate page -->
+
+ {if:!option.ticket_shop.additionalInfo.use_page}
+ <!-- Note that this section has not been Foundationized -->
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange"> mm/dd/yyyy
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+ {end:}
+
+{if:c.no_payment}
+ <div class="row">
+ <div class="large-12 columns">
+ <p class="alert-box info">
+ No payment is being processed for these {term.ticket.plur}.<br>Payment for these items must be arranged directly with {owner.name}.
+ </p>
+ </div>
+ </div>
+{end:}
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+ {end:}
+
+{end:} <!-- /each venue -->
+
+ <!-- Cart Summary and Checkout Button -->
+
+{if:cartHasContents}
+ <div class="row">
+ <div class="large-12 columns text-right">
+ <p>
+ <span class="h2Tickets">Grand Total {totals.grand_total_price}</span>
+ </p>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+ <div class="row">
+ <div class="large-12 columns text-right">
+ {if:blockCheckoutMixedPayment}
+ <a class="small button right radius alert disabled buttonTickets">Please read the message at the top of this page.</a>
+ {else:}
+
+ {if:option.ticket_shop.additionalInfo.use_page}
+ {if:blockCheckoutNonAssignment}
+ <a class="small button right radius alert disabled buttonTickets">Please complete the items in RED above.</a>
+ {else:}
+ {if:doingAdditionalInfo}
+ <a class="small button right radius buttonTickets buttonTicketsGo" id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_additionalInfo" >{term.nav.additional_info}</a>
+ {else:}
+ <a class="small button right radius buttonTickets buttonTicketsGo" id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" >{term.nav.checkout}</a>
+ {end:}
+ {end:}
+ {else:}
+ {if:!blockCheckout}
+ <a class="small button right radius buttonTickets buttonTicketsGo" id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" >{term.nav.checkout}</a>
+ {else:}
+ <a class="small button right radius alert disabled buttonTickets">Please complete the items in RED above.</a>
+ {end:}
+ {end:}
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{else:}
+ <div class="row">
+ <div class="large-12 columns">
+ <p class="right">Your cart is currently empty.</p>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{end:}
+
+<!-- If Cart Promotions option (promot other performances at the bottom of the cart) is enabled -->
+
+{if:option.cart_promotions}
+
+ <div class="row">
+ <div class="small-12 columns"><span class="h2Tickets">You may also be interested in ...</span></div>
+ </div>
+
+ <div class="row">
+ <div class="small-12 columns">
+ <div class="panel">
+ {foreach:cartPromotions,p}
+ <div class="row" style="margin-bottom: 1.5em;">
+ <div class="small-12 columns">
+ <span class="h3Tickets"><a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={p.id}">{p.member_name:h} - {p.name:h}</a></span>
+ </div>
+ {if:p.image}
+ <div class="small-12 columns hide-for-medium-up">
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{p.image}">
+ </div>
+ {end:}
+ <div class="small-8 columns left">
+ {if:p.short_descr}{p.short_descr:h}{end:}
+ </div>
+ {if:option.ticket_shop.cart.show_promotion_images}
+ <div class="small-4 columns show-for-medium-up">
+ {if:p.image}
+ <img class="right" src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{p.image}">
+ {end:}
+ </div>
+ {end:}
+ </div>
+ {end:}
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{end:} <!-- /If cart promotions -->
+
+</form> <!-- /cartForm -->
+
+<!-- Set some flexy page parameters for use in JAVAscript -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ vertScroll="vertScroll"
+>
+
+<!-- jQuery scripts for controlling page actions -->
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Convert input fields to select lists
+ $('.glmCartQuant').each(function() {
+
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var max = $(this).attr('data-max');
+ var value = $(this).attr('value');
+ var units = $(this).attr('data-units');
+ var numbSel = '';
+
+ // Build the picklist
+ for (var i = 0 ; i <= max ; i++) {
+ if (value == i) {
+ numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
+ } else {
+ numbSel = numbSel.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ }
+
+ // Check for ticket or addon
+ idType = 'quant_ticket_' + ticket;
+ if (addon > 0) {
+ idType = 'quant_addon_' + addon;
+ }
+
+ numbHTML = '<select class="glmCartSelect" data-ticket="' + ticket + '" data-addon="' + addon + '">' + numbSel + '</select>' + units;
+ $('#' + idType).html(numbHTML);
+ $('#' + idType + '_s').html(numbHTML);
+
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a cart value changes, submit it as a cart update.
+ $('.glmCartSelect').change(function() {
+ vertScroll = getVertScroll();
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var value = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_cart&cart=update&ticket_inv=" + ticket + "&addon=" + addon + "&quant=" + value + "&vertScroll=" + vertScroll;
+
+ });
+
+ // When there's a change in the promo code input, submit it.
+ $('#promoCodeInput').change(function() {
+ vertScroll = getVertScroll();
+ var value = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_cart&cart=promo_code&promo_code=" + value + "&vertScroll=" + vertScroll;
+ });
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_cart&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_cart&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = flex_startURL;
+ });
+
+/* Not using right now
+ // Reprint order button
+ $('#reprintVoucher').on('keypress', function(event) {
+ if(event.which == '13'){
+ var orderID = $(this).val();
+ var voucherWindow = window.open(flex_appAdminURL + '&Action=Order_printVoucher&OrderID=' + orderID,
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ }
+ });
+*/
+
+ if (flex_vertScroll) {
+ window.scrollTo(0, flex_vertScroll);
+ }
+
+ });
+
+</script>
+<flexy:include src="FoundationStandAlone/foot.html" /> <!-- Note direct reference to interface type -->
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Page
+-->
+<flexy:include src="FoundationStandAlone/head.html" /> <!-- Note direct reference to interface type -->
+
+<form id="GLMcheckoutForm" action='{baseSCRIPT}&Action=Shop_checkoutSubmit' method="POST">
+ <input type="hidden" name="Action" value="Shop_checkoutSubmit">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <p>{checkoutText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <span class="h2Tickets">We're sorry, we had a problem with your request:</span>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+ <!-- Contact Information Form -->
+ <div class="row">
+ <div class="small-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="small-12 columns">
+ <span class="h2Tickets">Contact Information</span>
+ </div>
+ </div>
+ <div class="row"> <!-- Contact form -->
+ <div class="small-12 large-6 columns"> <!-- Contact form left column -->
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.fname.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.first_name}:
+ <input type="text" tabindex="1" name="fname" value="{formData.contact.fname.value}">
+ </label>
+ {if:formData.contact.fname.problem}
+ <small class="error">{formData.contact.fname.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.lname.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.last_name}:
+ <input type="text" tabindex="2" name="lname" value="{formData.contact.lname.value}">
+ </label>
+ {if:formData.contact.lname.problem}
+ <small class="error">{formData.contact.lname.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.addr1.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.address}:
+ <input type="text" tabindex="3" name="addr1" value="{formData.contact.addr1.value}">
+ </label>
+ {if:formData.contact.addr1.problem}
+ <small class="error">{formData.contact.addr1.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.addr2.required}<label class="error">{else:}<label>{end:}
+ <input type="text" tabindex="4" name="addr2" value="{formData.contact.addr2.value}">
+ </label>
+ {if:formData.contact.addr2.problem}
+ <small class="error">{formData.contact.addr2.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.city.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.city}:
+ <input type="text" tabindex="5" name="city" value="{formData.contact.city.value}">
+ </label>
+ {if:formData.contact.city.problem}
+ <small class="error">{formData.contact.city.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.state.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.state}:
+ <select tabindex="6" name="state">
+ <option value=""> </option>
+ {foreach:formData.contact.state.states,s}
+ {if:s.stateSelected}
+ <option value="{s.stateID}" selected>{s.stateName:h}</option>
+ {else:}
+ <option value="{s.stateID}">{s.stateName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ {if:formData.contact.state.problem}
+ <small class="error">{formData.contact.state.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.country.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.country}:
+ <select tabindex="7" name="country">
+ <option value=""> </option>
+ {foreach:formData.contact.country.countries,s}
+ {if:s.countrySelected}
+ <option value="{s.countryID}" selected>{s.countryName:h}</option>
+ {else:}
+ <option value="{s.countryID}">{s.countryName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ {if:formData.contact.country.problem}
+ <small class="error">{formData.contact.country.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.zip.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.zip}:
+ <input type="text" tabindex="8" name="zip" value="{formData.contact.zip.value}">
+ </label>
+ {if:formData.contact.zip.problem}
+ <small class="error">{formData.contact.zip.problem}</small>
+ {end:}
+ </div>
+ </div>
+ </div> <!-- /Contact form left column -->
+ <div class="small-12 large-6 columns"> <!-- Contact form right column -->
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.phone.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.phone}:
+ <input type="text" tabindex="9" name="phone" value="{formData.contact.phone.value}">
+ </label>
+ {if:formData.contact.phone.problem}
+ <small class="error">{formData.contact.phone.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.email.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.email}:
+ <input type="text" tabindex="10" name="email" value="{formData.contact.email.value}">
+ </label>
+ {if:formData.contact.email.problem}
+ <small class="error">{formData.contact.email.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.email2.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.email_again}:
+ <input type="text" tabindex="11" name="email2" value="{formData.contact.email2.value}">
+ </label>
+ {if:formData.contact.email2.problem}
+ <small class="error">{formData.contact.email2.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns" style="margin-top: .4em;">
+ <label>
+ OK to Send E-Mail?
+ <br><small>{text.cart.checkout.activities_offers}</small></br>
+ </label>
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-7 columns end" style="margin-top: .6em;">
+ {if:formData.contact.email_ok}
+ <div class="glmCartFormInput"><input type="checkbox" tabindex="12" name="email_ok" checked></div>
+ {else:}
+ <div class="glmCartFormInput"><input type="checkbox" tabindex="12" name="email_ok"></div>
+ {end:}
+ </div>
+ </div>
+ {if:opt_field_1_name}
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.opt_field_1.required}<label class="error">{else:}<label>{end:}
+ {opt_field_1_name}:
+ <input type="text" tabindex="13" name="opt_field_1" value="{formData.contact.opt_field_1.value}">
+ </label>
+ {if:formData.contact.opt_field_1.problem}
+ <small class="error">{formData.contact.opt_field_1.problem}</small>
+ {end:}
+ </div>
+ </div>
+ {end:}
+ {if:opt_field_2_name}
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.opt_field_2.required}<label class="error">{else:}<label>{end:}
+ {opt_field_2_name}:
+ <input type="text" tabindex="14" name="opt_field_2" value="{formData.contact.opt_field_2.value}">
+ </label>
+ {if:formData.contact.opt_field_2.problem}
+ <small class="error">{formData.contact.opt_field_2.problem}</small>
+ {end:}
+ </div>
+ </div>
+ {end:}
+ {if:opt_field_3_name}
+ <div class="row">
+ <div class="small-12 medium-7 columns">
+ {if:formData.contact.opt_field_3.required}<label class="error">{else:}<label>{end:}
+ {opt_field_3_name}:
+ <input type="text" tabindex="15" name="opt_field_3" value="{formData.contact.opt_field_3.value}">
+ </label>
+ {if:formData.contact.opt_field_3.problem}
+ <small class="error">{formData.contact.opt_field_3.problem}</small>
+ {end:}
+ </div>
+ </div>
+ {end:}
+ </div> <!-- /Contact form right column -->
+ </div> <!-- /Contact form -->
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+ <!-- Cart Contents -->
+
+{foreach:cart,c} <!-- each venue -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ <div class="row">
+ <div class="small-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="small-12 columns">
+ <span class="h2Tickets">{c.name:h}</span>
+ </div>
+ </div>
+ {end:}
+
+ <!-- Output for Medium to Large Displays -->
+
+ {foreach:c.performances,p}
+
+ <div class="row show-for-medium-up">
+ <div class="medium-12 large-12 columns end">
+ <div class="panel callout">
+
+ <!-- Performance Header and optional nav links -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <h4>{p.name:h}</h4>
+ </div>
+ </div>
+
+ <!-- Performance descriptions and image -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ {if:p.short_descr}
+ {p.short_descr:h}
+ {else:}
+ {if:p.descr}
+ {p.descr:h}
+ {end:}
+ {end:}
+ </div>
+ </div>
+
+ <!-- Each date selected for this performance -->
+
+ {foreach:p.dates,d}
+ <div class="row"> </div>
+ <div class="row">
+ <div class="large-12 columns">
+ <h5>
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+ Use any date
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </h5>
+ </div>
+ </div>
+
+ <!-- Each venue section for this date -->
+
+ {foreach:d.sections,s}
+ <div class="row">
+ <div class="small-2 columns">
+ <b>Quant</b>
+ </div>
+ {if:!p.oneSectionOnly}
+ <div class="small-2 columns">
+ <b>{term.section.cap}</b>
+ </div>
+ <div class="small-3 columns">
+ {else:}
+ <div class="small-5 columns">
+ {end:}
+ <b>{term.ticket.cap}</b>
+ </div>
+ <div class="small-2 columns text-right">
+ <b>Price</b>
+ </div>
+ <div class="small-2 columns text-right end">
+ <b>Sub-Total</b>
+ </div>
+ </div>
+
+ <!-- Each ticket for this section -->
+
+ {foreach:s.tickets,i}
+ <div class="row">
+ <div id="quant_ticket_{i.invID}" class="small-2 columns">
+ {i.selected}
+ </div>
+ {if:!p.oneSectionOnly}
+ <div class="small-2 columns">
+ {s.name:h}
+ </div>
+ <div class="small-3 columns">
+ {else:}
+ <div class="small-5 columns">
+ {end:}
+ {i.title}
+ </div>
+ <div class="small-2 columns text-right">
+ {if:i.show_price}{i.price}{end:}
+ </div>
+ <div class="small-2 columns text-right end">
+ {if:!i.show_addons}{if:i.show_price}{i.extended}{end:}{end:}
+ </div>
+ </div>
+ {if:option.packages}
+ <div class="row"><div class="medium-1 columns"></div><div class="medium-11 columns">Includes:</div></div>
+ {foreach:i.packageData,y}
+ <div class="row">
+ <div class="medium-1 columns"> </div>
+ <div class="medium-1 columns">
+ {y.quant}
+ </div>
+ <div class="medium-10 columns">
+ {y.title} - {y.performance_name}
+ </div>
+ </div>
+ {end:}
+ <div class="row"> </div>
+ {end:}
+
+ <!-- Ticket images and description -->
+
+ {if:i.descr}
+ <div class="row">
+ <div class="medium-2 columns"></div>
+ <div class="medium-10 columns">
+ {i.descr:h}
+ </div>
+ </div>
+ {end:}
+
+ <!-- For each add-on for this ticket -->
+
+ {foreach:i.addons,a}
+ <div class="row">
+ <div class="medium-1 columns"> </div>
+ <div id="quant_addon_{a.id}" class="medium-2 columns">
+ {a.selected}
+ </div>
+ <div class="medium-4 columns">
+ {a.name}
+ </div>
+ <div class="medium-2 columns text-right">
+ {a.unit_cost}/{a.unit_name:h}
+ </div>
+ <div class="medium-2 columns text-right end">
+ <!-- {a.money} -->
+ </div>
+ </div>
+ {end:}<!-- /each addons -->
+
+ {if:i.show_addons}
+ <div class="row">
+ <div class="medium-1 columns"> </div>
+ <div id="quant_addon_{a.id}" class="medium-8 columns">
+
+ </div>
+ <div class="small-2 columns text-right end">
+ {i.extended}
+ </div>
+ </div>
+ {end:}
+
+ <!-- If user selected a promo code that matches this ticket -->
+
+ {if:i.promo}
+ <div class="row">
+ <div class="medium-2 columns"> </div>
+ <div class="medium-5 columns">
+ {term.promo.cap}: {promoCode}
+ </div>
+ <div class="medium-2 columns text-right"></div>
+ <div class="medium-2 columns text-right end">
+ {i.promo.credit}
+ </div>
+ </div>
+ {end:}<!-- /if Promo Code -->
+
+ {end:} <!-- /each ticket -->
+
+ {end:} <!-- /each section -->
+
+ {end:} <!-- /each date -->
+
+ {if:p.policy} <!-- If there's a ticket policy for anything here -->
+ <div class="row">
+ <div class="large-12 columns">
+ <p> </p>
+ <h5>Please read and agree to our policy for this {term.performance.norm}.</h5>
+ <p>{p.policy:h}</p>
+ <label class="error">I agree to the policy stated above.
+ <input class="glmPolicyCheckbox" type="checkbox" id="glmAgree" name="agree">
+ </label>
+ </div>
+ </div>
+ {end:}
+
+ </div> <!-- /panel callout -->
+ </div> <!-- columns -->
+ </div> <!-- rows -->
+
+ {end:} <!-- each performance -->
+
+ <!-- Output for Small Displays -->
+
+ {foreach:c.performances,p}
+
+ <div class="row show-for-small-only">
+ <div class="small-12 medium-4 large-4 columns">
+ <div class="panel callout">
+
+ <!-- Performance Header and optional nav links -->
+
+ <div class="row">
+ <div class="small-12 columns">
+ <h4>{p.name:h}</h4>
+ </div>
+ </div>
+
+ <!-- Performance descriptions and image -->
+
+ <div class="row">
+ <div class="small-12 columns">
+ {if:p.short_descr}
+ {p.short_descr:h}
+ {else:}
+ {if:p.descr}
+ {p.descr:h}
+ {end:}
+ {end:}
+ </div>
+ </div>
+
+ <!-- Each date selected for this performance -->
+
+ {foreach:p.dates,d}
+ <div class="row"> </div>
+ <div class="row" style="margin-bottom: 1em;">
+ <div class="small-12 columns">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+ Use any date
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </div>
+ </div>
+
+ <!-- Each venue section for this date -->
+
+ {foreach:d.sections,s}
+ {if:!p.oneSectionOnly}
+ <div class="row">
+ <div class="small-12 columns">
+ <b>{term.section.cap}:</b> {s.name:h}
+ </div>
+ </div>
+ {end:}
+
+ <!-- Each ticket for this section -->
+
+ {foreach:s.tickets,i}
+ <div class="row">
+ <div class="small-12 columns">
+ <h4>{i.title}</h4>
+ </div>
+ </div>
+ {if:i.descr}
+ <div class="row">
+ <div class="medium-2 columns"></div>
+ <div class="medium-10 columns">
+ {i.descr:h}
+ </div>
+ </div>
+ {end:}
+
+ <div class="row">
+ <div class="small-4 columns">
+ <b>Quant</b>
+ </div>
+ <div class="small-8 columns text-right">{i.selected}</div>
+ {if:i.show_price}
+ <div class="small-4 columns">
+ <b>Price</b>
+ </div>
+ <div class="small-8 columns text-right">{i.price}</div>
+ <div class="small-4 columns">
+ <b>Sub-Total</b>
+ </div>
+ <div class="small-8 columns text-right">{if:!i.show_addons}{i.extended}{end:}</div>
+ {end:}
+ </div>
+
+ <!-- For each add-on for this ticket -->
+
+ {foreach:i.addons,a}
+ <div class="row">
+ <div class="small-8 columns">
+ {a.name}
+ </div>
+ <div class="small-4 columns text-right">{a.selected}</div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns">
+ <b>{a.unit_cost}/{a.unit_name:h}</b>
+ </div>
+ <div class="small-8 columns text-right">{a.money}</div>
+ </div>
+ {end:}<!-- /each addons -->
+
+ <!-- If user selected a promo code that matches this ticket -->
+
+ {if:i.promo}
+ <div class="row">
+ <div class="medium-2 columns"> </div>
+ <div class="medium-6 columns">
+ {term.promo.cap}: {promoCode}
+ </div>
+ <div class="medium-2 columns text-right"></div>
+ <div class="medium-2 columns text-right">
+ {i.promo.credit}
+ </div>
+ </div>
+ {end:}<!-- /if Promo Code -->
+ {if:i.show_addons}
+ <div class="row">
+ <div class="small-4 columns">
+ <b>Sub-Total</b>
+ </div>
+ <div class="small-8 columns text-right">{i.extended}</div>
+ </div>
+ {end:}
+
+ {end:} <!-- /each ticket -->
+
+ {end:} <!-- /each section -->
+
+ {end:} <!-- /each date -->
+
+ {if:p.policy} <!-- If there's a ticket policy for anything here -->
+ <div class="row">
+ <div class="large-12 columns">
+ <p> </p>
+ <h5>Please read and agree to our policy for this {term.performance.norm}.</h5>
+ <p>{p.policy:h}</p>
+ <label class="error">I agree to the policy stated above.
+ <input class="glmPolicyCheckbox" type="checkbox" id="glmAgree" name="agree">
+ </label>
+ </div>
+ </div>
+ {end:}
+
+ </div> <!-- /panel callout -->
+ </div> <!-- columns -->
+ </div> <!-- rows -->
+
+ {end:} <!-- each performance -->
+
+ {if:c.ticket_spec_req.value}
+ <div class="row">
+ <div class="large-12 columns">
+ <label class="error">Please enter any special requests:
+ <textarea name="{c.id}_spec_req" value="{c.paymentForm.spec_req.value:h}">
+ </textarea>
+ </label>
+ </div>
+ </div>
+ {end:}
+
+{if:cartRequiresPayment}
+ {if:!formData.centralPayment}
+ <!-- Payment -->
+
+ <div class="row">
+ <div class="small-12 columns">
+ <div class="panel callout">
+ <div class="row">
+ <div class="small-10 columns">
+ <h5>Payment for {term.ticket.plur} at {c.name:h}</h5>
+ </div>
+ <div class="small-2 columns text-right">
+ <h5>{c.totalPrice}</h5>
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 columns">
+
+ </div>
+ </div>
+
+ {if:c.paymentResult}
+ {if:c.paymentResult.approved}
+ <div class="row">
+ <div class="small-12 columns">
+ <b>Card Payment Approved</b>
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns">
+ <b>Name on Card:</b>
+ </div>
+ <div class="small-8 columns">
+ {c.paymentResult.ccname}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns">
+ <b>Card Type:</b>
+ </div>
+ <div class="small-8 columns">
+ {c.paymentResult.cctype}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns">
+ <b>Card Number:</b>
+ </div>
+ <div class="small-8 columns">
+ {c.paymentResult.ccnumb}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns">
+ <b>Expiration Date:</b>
+ </div>
+ <div class="small-8 columns">
+ {c.paymentResult.ccexp}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns">
+ <b>Authorization Code:</b>
+ </div>
+ <div class="small-8 columns">
+ {c.paymentResult.authCode}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 columns">
+ <a class="small button right radius buttonTickets" id="GLMprintTickets">{term.nav.print_vouchers}</a>
+ </div>
+ </div>
+ {else:}
+ <div class="row">
+ <div class="small-12 columns">
+ <h5 class="error">Card Payment Not Complete</h5>
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 columns">
+ <p>{c.paymentResult.description}</p>
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>
+ {if:forceCheckoutPhase}
+ <a id="GLMDeleteVenue" class="small button right radius buttonTickets" id="GLMprintTickets">{term.nav.delete_from_cart}</a>
+ {end:}
+ </div>
+ </div>
+ {end:}<!--paymentResult approved-->
+
+ {else:}<!--paymentResult-->
+
+ {if:c.havePaymentMethod}
+ <div class="row">
+ <div class="small-12 columns">
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="pp"> PayPal
+ {else:}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="pp">
+ {end:}
+ </div>
+ </div>
+
+ {if:c.haveCreditCards}
+ <div class="row">
+ <div class="small-12 columns">
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="cc">
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-8 columns">
+ {if:c.paymentForm.cctype.required}<label class="error">{else:}<label>{end:}
+ Card Type:
+ <select name="{c.id}_cctype">
+ <option value=""> </option>
+ {foreach:c.paymentForm.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ {if:c.paymentForm.cctype.problem}
+ <small class="error">{c.paymentForm.cctype.problem}</small>
+ {end:}
+ </div>
+ <div class="end columns"> </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-8 columns">
+ {if:c.paymentForm.ccname.required}<label class="error">{else:}<label>{end:}
+ Name on Card:
+ <input type="text" name="{c.id}_ccname" value="{c.paymentForm.ccname.value}">
+ </label>
+ {if:c.paymentForm.ccname.problem}
+ <small class="error">{c.paymentForm.ccname.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-8 columns">
+ {if:c.paymentForm.ccnumb.required}<label class="error">{else:}<label>{end:}
+ Card Number:
+ <input type="text" name="{c.id}_ccnumb" value="{c.paymentForm.ccnumb.value}">
+ </label>
+ {if:c.paymentForm.ccnumb.problem}
+ <small class="error">{c.paymentForm.ccnumb.problem}</small>
+ {end:}
+ </div>
+ <div class="end columns"> </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-8 columns">
+ <div class="row">
+ <div class="small-12 medium-10 large-6 columns end">
+ {if:c.paymentForm.ccexp.required}<label class="error">{else:}<label>{end:}
+ Month
+ <select name="{c.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ </div>
+ <div class="small-12 medium-10 large-6 columns end">
+ {if:c.paymentForm.ccexp.required}<label class="error">{else:}<label>{end:}
+ Year
+ <select name="{c.id}_ccyear">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ </div>
+ </div>
+ {if:c.paymentForm.ccexp.problem}
+ <small class="error">{c.paymentForm.ccexp.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 medium-3 large-2 columns">
+ {if:c.paymentForm.cccode.required}<label class="error">{else:}<label>{end:}
+ Security Code:
+ <input type="text" name="{c.id}_cccode" value="{c.paymentForm.cccode.value}">
+ </label>
+ {if:c.paymentForm.cccode.problem}
+ <small class="error">{c.paymentForm.cccode.problem}</small>
+ {end:}
+ </div>
+ <div class="end columns"> </div>
+ </div>
+ <div class="row">
+ <div class="small-12 columns">
+ <small>The Security Code is the three or four digit number on the signature side of your credit card.</small>
+ </div>
+ </div>
+ {end:} <!-- /Have Credit Cards -->
+
+ {if:c.havePayPal} <!-- PayPal Form -->
+ <div class="row">
+ <div class="large-12 columns">
+ <img src="{baseURL}common/EventManagement/front/FoundationStandAlone/assets/paypal_but6.gif"></a> <!-- Note direct reference to interface type -->
+ </div>
+ </div>
+ {end:}
+
+ {end:}
+
+ {end:} <!-- /PaymentResult -->
+
+ </div> <!-- /panel callout -->
+ </div> <!-- columns -->
+ </div> <!-- rows -->
+
+ {end:} <!-- centralPayment -->
+{end:}
+ {if:c.no_payment}
+
+ <div class="row">
+ <div class="large-12 columns">
+ <p class="alert-box info">
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="no">
+ No payment is being processed for these {term.ticket.plur} at this time.<br>Payment for these items must be arranged directly with {owner.name}.
+ </p>
+ </div>
+ </div>
+
+ {end:}
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+ {end:}
+{end:} <!-- /each venue -->
+
+{if:cartRequiresPayment}
+{if:formData.centralPayment}
+
+ {if:formData.centralPayment.havePaymentMethod}
+
+ <div class="row">
+ <div class="small-12 columns">
+ <div class="panel callout">
+
+ <div class="row">
+ <div class="small-12 columns">
+ <p>
+ <span class="h2Tickets">Total Charged {totals.price}</span>
+ </p>
+ </div>
+ </div>
+
+ <div class="row">
+ <div class="small-12 columns">
+ {if:formData.centralPayment.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="radio" name="{formData.centralPayment.id}_payTypeSelect" value="pp"> PayPal
+ {else:}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="hidden" name="{formData.centralPayment.id}_payTypeSelect" value="pp">
+ {end:}
+ </div>
+ </div>
+
+ {foreach:formData.centralPayment.paymentForm,p} <!-- This is a pseudo-loop since there should only be one entry. Keeps data consistent. -->
+ {if:formData.centralPayment.haveCreditCards}
+ <div class="row">
+ <div class="small-12 columns">
+ {if:formData.centralPayment.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{p.id}" type="radio" name="{p.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{p.id}" type="hidden" name="{p.id}_payTypeSelect" value="cc">
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-8 columns">
+ {if:p.ccname.required}<label class="error">{else:}<label>{end:}
+ Name on Card:
+ <input type="text" name="{p.id}_ccname" value="{p.ccname.value}" class="glmTicketCcnameInput">
+ </label>
+ {if:p.ccname.problem}
+ <small class="error">{p.ccname.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-8 columns">
+ {if:p.cctype.required}<label class="error">{else:}<label>{end:}
+ Card Type:<br>
+ <select name="{p.id}_cctype" class="glmTicketCcInput">
+ <option value=""> </option>
+ {foreach:p.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ {if:p.cctype.problem}
+ <small class="error">{p.cctype.problem}</small>
+ {end:}
+ </div>
+ <div class="end columns"> </div>
+ </div>
+ <div class="row">
+ <div class="small-12 medium-8 columns">
+ {if:p.ccnumb.required}<label class="error">{else:}<label>{end:}
+ Card Number:
+ <input type="text" name="{p.id}_ccnumb" value="{p.ccnumb.value}" class="glmTicketCcInput">
+ </label>
+ {if:p.ccnumb.problem}
+ <small class="error">{p.ccnumb.problem}</small>
+ {end:}
+ </div>
+ <div class="end columns"> </div>
+ </div>
+ <div class="row">
+ <div class="small-12 columns">
+ <div class="row">
+ <div class="small-12 medium-4 columns">
+ {if:p.ccexp.required}<label class="error">{else:}<label>{end:}
+ Card Expiration Month<br>
+ <select name="{p.id}_ccmonth" class="glmTicketCcInput">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ </div>
+ <div class="small-12 medium-8 columns">
+ {if:p.ccexp.required}<label class="error">{else:}<label>{end:}
+ Card Expiration Year<br>
+ <select name="{p.id}_ccyear" class="glmTicketCcInput">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ </div>
+ </div>
+ {if:p.ccexp.problem}
+ <small class="error">{p.ccexp.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 medium-3 columns">
+ {if:p.cccode.required}<label class="error">{else:}<label>{end:}
+ Security Code:
+ <input type="text" name="{p.id}_cccode" value="{p.cccode.value}">
+ </label>
+ {if:p.cccode.problem}
+ <small class="error">{p.problem}</small>
+ {end:}
+ </div>
+ <div class="end columns"> </div>
+ </div>
+ <div class="row">
+ <div class="small-12 columns">
+ <small>The Security Code is the three or four digit number on the signature side of your credit card.</small>
+ </div>
+ </div>
+ {end:} <!-- /Have Credit Cards -->
+ {end:} <!-- foreach payment -->
+
+ {if:formData.centralPayment.havePayPal} <!-- PayPal Form -->
+ <div class="row">
+ <div class="small-12 columns">
+ <img src="{baseURL}common/EventManagement/front/FoundationStandAlone/assets/paypal_but6.gif"></a> <!-- Note direct reference to interface type -->
+ </div>
+ </div>
+ {end:} <!-- /Have Credit Cards -->
+
+ {else:} <!-- /havePaymentMethod -->
+ <div class="row">
+ <div class="small-12 columns">
+ <p>
+ No payment is being processed at this time. Payment for these items must be arranged directly with {owner.name}.
+ </p>
+ </div>
+ </div>
+
+ {end:} <!-- /havePaymentMethod -->
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+
+{else:} <!-- Central Payment -->
+
+ <div class="row">
+ <div class="large-12 columns text-right">
+ <span class="h2Tickets">Total Charged {totals.price}</span>
+ {if:!cartHasOneVenueOnly}
+ <p>NOTE: There will be a separate credit card transaction for each {term.prop.norm}.</p>
+ {end:}
+ </div>
+ </div>
+
+{end:} <!-- Central Payment -->
+{end:} <!-- Cart Requires Payment -->
+
+ <div class="row">
+ <div class="large-4 columns" style="">
+ {ssl_seal_head_script:h}
+ {ssl_seal_body_script:h}
+ </div>
+ <div class="large-8 columns text-right">
+ {if:!blockCheckout}
+ <a class="small button right radius buttonTickets buttonTicketsGo" id="GLMcheckoutBtn">{term.nav.purchase}</a>
+ {else:}
+ <a class="small button right radius alert disabled buttonTickets">Unable to checkout - please see above.</a>
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+</form>
+
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ var checkoutButtonPressed = false;
+ var duration = 400;
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+
+ // Prevent multiple submissions
+ if (checkoutButtonPressed == true) {
+ return;
+ }
+
+ // Check policy acceptance
+ var needPolicyChecked = false;
+ $(".glmPolicyCheckbox").each(function() {
+ if (!$(this).is(':checked')) {
+ needPolicyChecked = true;
+ }
+ });
+
+ if (needPolicyChecked) {
+ alert('You must agree to our policies shown in red above to checkout.');
+ return false;
+ }
+
+ checkoutButtonPressed = true;
+ setBlocker();
+ $('#GLMcheckoutForm').submit();
+
+ });
+
+ // Navigation buttons
+ $('#GLMnavCart').on('click', function() { // Add to Cart
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = flex_startURL;
+ });
+
+ // Send user to PayPal payment when button is clicked
+ $('.glmPayPalButton').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=800, left=100, top=25";
+ PayPalWindow = window.open(flex_baseURL + "?Action=Shop_PayPal&memberID=" + memberID, "PayPalWindow",disp_setting);
+ PayPalWindow.focus();
+ });
+
+ // Show payment method input when selected
+ $('.glmSelectPayByCC').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByCC').show(duration);
+ });
+ });
+ $('.glmSelectPayByPayPal').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByPayPal').show(duration);
+ });
+ });
+
+ // Start with payment types hidden - only prompt showing
+ $('.glmPayTypes').hide(0);
+
+ // Show submit access blocker
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+
+</script>
+<flexy:include src="FoundationStandAlone/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+<!-- \r
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Complete Page\r
+-->\r
+<flexy:include src="FoundationStandAlone/head.html" /> <!-- Note direct reference to interface type -->\r
+\r
+{if:checkoutSucccessText}\r
+<div class="row"> <!-- Intro text for cart page and optional navigation -->\r
+ <div class="large-12 columns">\r
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->\r
+ <p>{checkoutSuccessText:h}</p>\r
+ </div>\r
+</div> \r
+{end:}\r
+\r
+<div class="row">\r
+ <div class="large-12 columns">\r
+ <span class="h2Tickets">Purchase Complete</span>\r
+ </div>\r
+</div>\r
+\r
+<!-- Print Voucher Buttons - Large -->\r
+\r
+<div class="row">\r
+ <div class="large-12 columns">\r
+ <div class="panel">\r
+ <div class="row">\r
+ <div class="small-12 columns show-for-medium-up text-center">\r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ <p>\r
+ <a id="GLMprintTickets" class="small button right radius alert expand voucherPrint buttonTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}">CLick Here to download and PRINT your order<br>summary and VOUCHERS for {c.name}</a><br>\r
+ <a id="GLMprintMobileTickets" class="voucherPrintMobile" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}">CLick Here to download your non-printable<br>order summary and MOBILE FRIENDLY VOUCHERS</a>\r
+ </p>\r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </div>\r
+ <div class="small-12 columns hide-for-medium-up text-center">\r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ <p>\r
+ <a id="GLMprintMobileTickets" class="small button right radius alert expand voucherPrintMobile buttonTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}">CLick Here to download your non-printable<br>MOBILE FRIENDLY VOUCHERS<br>for {c.name}</a>\r
+ <a id="GLMprintTickets" class="voucherPrint text-center" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}">CLick Here to download and PRINT<br>your order summary and VOUCHERS<br>for {c.name}</a><br>\r
+ </p>\r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </div>\r
+ </div>\r
+ <div class="row" style="margin-bottom: 1em;">\r
+ <div class="small-12 medium-9 columns">\r
+ Adobe Reader is required to view and print your {term.voucher.plur}. Adobe Reader is a free program available directly from Adobe. \r
+ If you do not already have Adobe Reader installed, click the "Get Adobe Reader" link now.\r
+ </div>\r
+ <div class="small-12 medium-3 columns">\r
+ <a href="http://www.adobe.com/go/getreader" target="GetAdobeReader"><img src="{baseURL}common/EventManagement/front/FoundationStandAlone/assets/get_adobe_reader.png"></a>\r
+ </div>\r
+ <div class="small-12 medium-12 columns" style="margin-top: .5em;">\r
+ <b>\r
+ If you are unable to print your {term.voucher.plur}, please print this page or write down the order number(s)\r
+ below and bring that to the ticket office when you arrive.\r
+ </b>\r
+ </div>\r
+ <div class="small-12 medium-12 columns text-center" style="margin-top: .5em;">\r
+ ORDER #: \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ {c.paymentResult.orderID} \r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </div> \r
+ </div>\r
+ </div>\r
+ </div>\r
+</div> \r
+\r
+<!-- Contact Information Summary -->\r
+\r
+<div class="row">\r
+ <div class="small-12 columns">\r
+ <div class="panel"> \r
+ <div class="row">\r
+ <div class="small-12 columns">\r
+ <span class="h2Tickets">Contact Information</span>\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Name:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {formData.contact.fname.value} {formData.contact.lname.value} \r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>{text.cart.checkout.address}:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {formData.contact.addr1.value}<br>\r
+ {if:formData.contact.addr2.value}\r
+ {formData.contact.addr2.value}<br>\r
+ {end:}\r
+ {formData.contact.city.value}, {formData.contact.state.name} {formData.contact.zip.value}<br>\r
+ {formData.contact.country.name} \r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>{text.cart.checkout.phone}:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {formData.contact.phone.value}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>{text.cart.checkout.email}:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {formData.contact.email.value}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>OK to Send E-Mail?:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {if:formData.contact.email_ok}\r
+ You have asked us to send information on activities and offers. \r
+ {else:}\r
+ You have asked us to NOT send information on activities and offers.\r
+ We will only contact you regarding this order.\r
+ {end:}\r
+ </div>\r
+ </div>\r
+ {if:opt_field_1_name}\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ {opt_field_1_name}:\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {formData.contact.opt_field_1.value}\r
+ </div>\r
+ </div>\r
+ {end:} \r
+ {if:opt_field_2_name}\r
+ <div class="row">\r
+ <div class="small-12 medium-4 columns">\r
+ {opt_field_2_name}:\r
+ </div>\r
+ <div class="small-11 medium-8 columns">\r
+ {formData.contact.opt_field_2.value}\r
+ </div>\r
+ </div>\r
+ {end:} \r
+ {if:opt_field_3_name}\r
+ <div class="row">\r
+ <div class="small-12 medium-4 columns">\r
+ {opt_field_3_name}:\r
+ </div>\r
+ <div class="small-11 medium-8 columns">\r
+ {formData.contact.opt_field_3.value}\r
+ </div>\r
+ </div>\r
+ {end:} \r
+ \r
+ </div> <!-- /panel -->\r
+ </div> <!-- /columns -->\r
+</div> <!-- /row -->\r
+\r
+<!-- Purchases -->\r
+\r
+{foreach:cart,c} <!-- each venue -->\r
+ {if:!c.centralPaymentOnly}\r
+ \r
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->\r
+<div class="row">\r
+ <div class="large-12 columns">\r
+ <div class="panel"> \r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ <span class="h2Tickets">{c.name:h}</span> \r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ <!-- Each Performance -->\r
+ \r
+ {foreach:c.performances,p}\r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ <div class="panel callout">\r
+ \r
+ <!-- Performance Header and optional nav links -->\r
+ \r
+ <div class="row">\r
+ <div class="large-12 columns"> \r
+ <h4>{p.name:h}</h4>\r
+ </div>\r
+ </div>\r
+ \r
+ <!-- Performance descriptions and image -->\r
+ \r
+ <div class="row">\r
+ <div class="large-12 columns"> \r
+ {if:p.short_descr}\r
+ {p.short_descr:h}\r
+ {else:}\r
+ {if:p.descr}\r
+ {p.descr:h}\r
+ {end:}\r
+ {end:}\r
+ </div>\r
+ </div> \r
+ \r
+ <!-- Each date selected for this performance -->\r
+ \r
+ {foreach:p.dates,d}\r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ <h5> \r
+ {if:d.dateSpecific}\r
+ {d.fullDate}\r
+ {else:}\r
+ Use any date\r
+ {if:c.likelyDate}\r
+ - Likely Date {c.likelyDate}\r
+ {end:}\r
+ {end:}\r
+ </h5>\r
+ </div>\r
+ </div> \r
+ \r
+ <!-- Each venue section for this date -->\r
+ \r
+ {foreach:d.sections,s}\r
+ <div class="row show-for-large-up">\r
+ <div class="large-1 columns text-right">\r
+ <b>Quant</b>\r
+ </div>\r
+ {if:!p.oneSectionOnly}\r
+ <div class="large-3 columns">\r
+ <b>{term.section.cap}</b>\r
+ </div>\r
+ <div class="large-4 columns">\r
+ <b>{term.ticket.cap}</b>\r
+ </div>\r
+ {else:}\r
+ <div class="large-7 columns">\r
+ <b>{term.ticket.cap}</b>\r
+ </div>\r
+ {end:} \r
+ <div class="large-2 columns text-right">\r
+ <b>Price</b>\r
+ </div>\r
+ <div class="large-2 columns text-right">\r
+ <b>Total</b>\r
+ </div>\r
+ </div>\r
+ \r
+ <!-- Each ticket for this section -->\r
+ \r
+ {foreach:s.tickets,i}\r
+ <div class="row" style="margin-top: .6em;">\r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Quant</div>\r
+ <div class="small-8 large-1 columns hide-for-large-up">{i.selected}</div> \r
+ <div class="small-8 large-1 columns text-right show-for-large-up">{i.selected}</div> \r
+ {if:!p.oneSectionOnly}\r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">{term.section.cap}</div>\r
+ <div class="small-8 large-3 columns">{s.name:h}</div> \r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">{term.ticket.cap}</div>\r
+ <div class="small-8 large-4 columns">{i.name:h}</div> \r
+ {else:}\r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">{term.ticket.cap}</div>\r
+ <div class="small-8 large-7 columns">{i.name:h}</div> \r
+ {end:}\r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Price</div>\r
+ <div class="small-8 large-2 columns hide-for-large-up">{i.price}</div> \r
+ <div class="small-8 large-2 columns text-right show-for-large-up">{i.price}</div> \r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Total</div>\r
+ <div class="small-8 large-2 columns hide-for-large-up">{i.extended}</div> \r
+ <div class="small-8 large-2 columns text-right show-for-large-up">{i.extended}</div> \r
+ </div>\r
+ {if:option.packages} \r
+ <div class="row"><div class="medium-2 columns"></div><div class="medium-10 columns">Includes:</div></div>\r
+ {foreach:i.packageData,y}\r
+ <div class="row">\r
+ <div class="medium-1 columns"> </div> \r
+ <div class="medium-1 columns">\r
+ {y.quant}\r
+ </div> \r
+ <div class="medium-10 columns">\r
+ {y.title} - {y.performance_name}\r
+ </div> \r
+ </div> \r
+ {end:}\r
+ <div class="row"> </div>\r
+ {end:} \r
+ \r
+ <!-- Ticket images and description -->\r
+ \r
+ {if:i.descr}\r
+ <div class="row">\r
+ <div class="medium-2 columns"></div>\r
+ <div class="medium-10 columns">\r
+ {i.descr:h}\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ <!-- For each add-on for this ticket -->\r
+ \r
+ {foreach:i.addons,a}\r
+ <div class="row" style="margin-top: .6em;">\r
+ <div class="large-1 columns"> </div>\r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Quant</div>\r
+ <div class="small-8 large-1 columns hide-for-large-up">{a.selected}</div> \r
+ <div class="small-8 large-1 columns text-right show-for-large-up">{a.selected}</div> \r
+ \r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">{term.ticket.cap}</div>\r
+ <div class="small-8 large-6 columns">{a.name:h}</div> \r
+ \r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Price</div>\r
+ <div class="small-8 columns hide-for-large-up">{a.unit_cost}/{a.unit_name:h}</div>\r
+ <div class="small-8 large-2 columns text-right show-for-large-up">{a.unit_cost}/{a.unit_name:h}</div>\r
+ \r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Total</div>\r
+ <div class="small-8 large-2 columns hide-for-large-up">{a.money}</div> \r
+ <div class="small-8 large-2 columns text-right show-for-large-up">{a.money}</div> \r
+ </div>\r
+ {end:}<!-- /each addons -->\r
+ \r
+ <!-- If user selected a promo code that matches this ticket -->\r
+ \r
+ {if:i.promo}\r
+ <div class="row">\r
+ <div class="medium-2 columns"> </div>\r
+ <div class="medium-6 columns">\r
+ {term.promo.cap}: {promoCode}\r
+ </div>\r
+ <div class="medium-2 columns text-right"></div>\r
+ <div class="medium-2 columns text-right">\r
+ {i.promo.credit}\r
+ </div>\r
+ </div> \r
+ {end:}<!-- /if Promo Code -->\r
+ \r
+ {end:} <!-- /each ticket --> \r
+ \r
+ {end:} <!-- /each section -->\r
+ \r
+ {end:} <!-- /each date --> \r
+\r
+ {if:p.policy} <!-- If there's a ticket policy for anything here -->\r
+ \r
+ <!-- Ticket policy -->\r
+ \r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ <p>{p.policy:h}</p>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+\r
+ </div> <!-- /panel callout -->\r
+ </div> <!-- columns -->\r
+ </div> <!-- rows -->\r
+ \r
+ {end:} <!-- each performance -->\r
+ \r
+ {if:c.paymentForm.spec_req.value}\r
+ \r
+ <!-- Special Requests -->\r
+ \r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ {c.paymentForm.spec_req.value:h}\r
+ </div>\r
+ </div>\r
+ {end:}\r
+\r
+ {if:!formData.centralPayment} \r
+ <!-- Payment Summary -->\r
+ \r
+ <div class="row">\r
+ <div class="small-12 columns">\r
+ <div class="panel callout">\r
+ <div class="row">\r
+ <div class="large-10 columns">\r
+ <b>Payment for {term.ticket.plur} at {c.name:h}</b>\r
+ </div>\r
+ <div class="large-2 columns text-right">\r
+ <h5>{c.totalPrice}</h5>\r
+ </div>\r
+ </div>\r
+ {if:c.paymentResult.cctype}\r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ \r
+ </div>\r
+ </div>\r
+ <div class="row" style="margin-bottom: .6em;">\r
+ <div class="large-12 columns">\r
+ <b>Card Payment Approved</b>\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Card Type:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.cctype}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Name on Card:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.ccname}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Card Number:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.ccnumb}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Expiration Date:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.ccexp}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Authorization Code:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.authCode}\r
+ </div>\r
+ </div>\r
+ {else:}\r
+ <div class="row" style="margin-bottom: .6em;">\r
+ <div class="large-12 columns">\r
+ <h3>*** Payment Processed Manually ***</h3>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ </div> <!-- /panel callout -->\r
+ </div> <!-- /columns -->\r
+ </div> <!-- /row -->\r
+\r
+ {end:})\r
+ \r
+ \r
+ {if:c.ticket_policy}\r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ {c.ticket_policy:h}\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations --> \r
+ </div> <!-- /panel -->\r
+ </div> <!-- /columns -->\r
+</div> <!-- /row --> \r
+ {end:} \r
+\r
+ {end:}\r
+{end:} <!-- /each venue -->\r
+\r
+\r
+{if:formData.centralPayment} \r
+<div class="row">\r
+ <div class="small-12 columns">\r
+ <div class="panel callout">\r
+\r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ <p>\r
+ <span class="h2Tickets">Grand Total {totals.price}</span>\r
+ </p>\r
+ </div>\r
+ </div>\r
+\r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult.cctype}\r
+ <div class="row" style="margin-bottom: .6em;">\r
+ <div class="large-12 columns">\r
+ <b>Card Payment Approved</b>\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Card Type:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.cctype}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Name on Card:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.ccname}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Card Number:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.ccnumb}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Expiration Date:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.ccexp}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Authorization Code:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.authCode}\r
+ </div>\r
+ </div>\r
+ {else:}\r
+ {if:c.isCentralPaymentMember} \r
+ <div class="row" style="margin-bottom: .6em;">\r
+ <div class="large-12 columns">\r
+ <h3>*** Payment Processed Manually ***</h3>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ {end:}\r
+ \r
+ {end:}\r
+ \r
+ </div> <!-- /panel -->\r
+ </div> <!-- /columns -->\r
+ </div> <!-- /row --> \r
+\r
+\r
+{else:}\r
+<!-- Checkout Grand Totals -->\r
+\r
+<div class="row">\r
+ <div class="large-12 columns text-right">\r
+ <span class="h2Tickets">Grand Total {totals.price}</span><br>\r
+{if:!cartHasOneVenueOnly}\r
+ <p>NOTE: You will see a separate credit card transaction for each {term.prop.norm} above.</p>\r
+{end:} \r
+ </div>\r
+</div>\r
+ \r
+{end:}\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+\r
+{trackingScript:h}\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+\r
+ // Navigation buttons\r
+ $('#GLMnavCart').click(function() { // Add to Cart \r
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';\r
+ });\r
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection\r
+ window.location = flex_startURL;\r
+ });\r
+ \r
+ // Print vouchers\r
+ $('.voucherPrint').click(function(){ \r
+ \r
+ var orderID = $(this).attr('emOrderID');\r
+ var orderVerify = $(this).attr('emOrderVerify');\r
+ var voucherWindow = window.open(flex_baseSCRIPT + "&Action=Shop_printVoucher&OrderID=" + orderID + "&orderVerify=" + orderVerify, \r
+ "voucherPrint", \r
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"\r
+ );\r
+ voucherWindow.focus();\r
+ voucherWindow.print();\r
+ return false;\r
+\r
+ });\r
+\r
+ // Print Mobile vouchers\r
+ $('.voucherPrintMobile').click(function(){ \r
+ \r
+ var orderID = $(this).attr('emOrderID');\r
+ var orderVerify = $(this).attr('emOrderVerify');\r
+ var voucherWindow = window.open(flex_baseSCRIPT + "&Action=Shop_printVoucher&Mobile=yes&OrderID=" + orderID + "&orderVerify=" + orderVerify, \r
+ "voucherPrint", \r
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"\r
+ );\r
+ voucherWindow.focus();\r
+ voucherWindow.print();\r
+ return false;\r
+\r
+ });\r
+\r
+ });\r
+\r
+</script>\r
+<flexy:include src="FoundationStandAlone/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+<h2>\r
+ <a href="{baseSCRIPT}&Action=Shop_printVoucher&OrderID={cartEntry.paymentResult.orderID}&orderVerify={cartEntry.paymentResult.orderVerification}">\r
+ Click here to reprint your {term.voucher.plur}\r
+ </a>\r
+</h2>\r
+\r
+<h3>\r
+ {term.ticket.plur_cap} Purchased at:<br>\r
+ {cartEntry.name}\r
+</h3>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+{if:cartEntry.descr}<p>{cartEntry.descr:h}</p>{end:}\r
+ \r
+<table border="1" cellspacing="0" cellpadding="2">\r
+\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ <th align="left">{term.performance.cap}</th>\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+\r
+{foreach:cartEntry.performances,p} <!-- each performance -->\r
+ {foreach:p.dates,d} <!-- each date -->\r
+ {foreach:d.sections,s}\r
+ \r
+ \r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">{i.selected}</td>\r
+ <td align="left">{p.name:h}</td>\r
+ <td align="left">{i.title:h}</td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ <td align="left"> </td>\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ <td> </td>\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ \r
+ \r
+ {end:} <!-- each section -->\r
+ {end:} <!-- each performance for this date -->\r
+{end:} <!-- each date for this venue -->\r
+\r
+ <tr>\r
+ <td colspan="4"> </td>\r
+ <td align="right">{cartEntry.totalPrice}</td>\r
+ </tr>\r
+\r
+<!-- \r
+ <tr>\r
+ <th align="right">{cartEntry.totalTickets}</th>\r
+ <td colspan="6"> </td>\r
+ <th align="right">{cartEntry.totalPrice}</th>\r
+ </tr>\r
+ -->\r
+ \r
+</table>\r
+\r
+ <!-- If special requests possible -->\r
+{if:cartEntry.ticket_spec_req}\r
+<p>\r
+ Special requests: {cartEntry.paymentForm.spec_req.value:h}\r
+</p> \r
+{end:}\r
+ \r
+\r
+{if:cartEntry.ticket_policy}<p>{cartEntry.ticket_policy:h}</p>{end:}\r
+ \r
+<p> \r
+ <table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th colspan="2" align="center">Credit Card Payment Approved</th></tr>\r
+ <tr><th align="left">Card Type</th><td>{cartEntry.paymentResult.cctype}</td></tr>\r
+ <tr><th align="left">Name on Card</th><td>{cartEntry.paymentResult.ccname}</td></tr>\r
+ <tr><th align="left">Card Number</th><td>{cartEntry.paymentResult.ccnumb}</td></tr>\r
+ <tr><th align="left">Expiration Date</th><td>{cartEntry.paymentResult.ccexp}</td></tr>\r
+ <tr><th align="left">Authorization Code</th><td>{cartEntry.paymentResult.authCode}</td></tr>\r
+ </table>\r
+</p> \r
+ \r
+<!-- is this needed? <flexy:include src="FoundationStandAlone/foot.html" /> -->
\ No newline at end of file
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Section Selection Page\r
+\r
+-->\r
+\r
+<flexy:include src="FoundationStandAlone/head.html" /> <!-- Note direct reference to interface type -->\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">{term.section.cap} Selection</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem">{term.nav.show_selected}</a>\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+\r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{sectionText:h}</div>\r
+\r
+{if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+{end:}\r
+\r
+ <p>You have selected</p>\r
+ <div class="glmSection">\r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">{performanceDetail.member_name}</div><br> \r
+ <div class="glmBlockName">{performanceDetail.name}</div>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+<!-- <p><span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</p> -->\r
+<!-- <p>{performanceDetail.descr:h}</p> -->\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <!-- List of available sections -->\r
+ <hr />\r
+ <p>Please select from the following</p>\r
+ <div class="glmSection">\r
+{foreach:sectionList,x} \r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">\r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}">{x.name}</a>\r
+ </div> \r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}" class="glmNavItem">{term.nav.select}</a>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+ <p><span class="glmBold">{term.section.cap}</span>: {x.member_name}</p>\r
+ <p>{x.descr:h}</p>\r
+ </div>\r
+ </div> \r
+{end:}\r
+ \r
+ </div>\r
+\r
+</div> <!-- /GLMcontent -->\r
+\r
+ <script type="text/javascript">\r
+\r
+ $(document).ready(function(){ \r
+\r
+ // Code to kick off the geolocation-display feature \r
+ $("#locationMap").geolocate({\r
+ lat: "#lat",\r
+ lng: "#lon",\r
+ mapOptions: {\r
+ disableDefaultUI: false,\r
+ mapTypeControl: true,\r
+ mapTypeId: "roadmap",\r
+ zoom: 12\r
+ },\r
+ markerOptions: {\r
+ draggable: false,\r
+ title: "This is your selected location"\r
+ }\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+<flexy:include src="FoundationStandAlone/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+
+
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ <div class="glmBlockContentRight">
+ <div id="locationMap_{m.id}" class="GLMmapWindow" data-member-id="{m.id}">(map loads here)</div>
+ <form>
+ <input type="hidden" id="lat_{m.id}" value="{m.lat}">
+ <input type="hidden" id="lon_{m.id}" value="{m.lon}">
+ </form>
+ </div><!--/.glmBlockContentRight-->
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>
+ <div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date} through {p.end_date.date}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:!showTickets}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a>
+ {end:}
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value}, {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="FoundationStandAlone/head.html" /> <!-- Note direct reference to interface type -->
+<?php $ferry="Ferry Tickets";
+ $valet="Valet Parking";
+ $guide="Guide Books and Maps";
+ $family = "Family Specials";
+ $multiple = "Multiple Trips";
+ $liveMusic = "Live Music Cruises";
+ $sunset = "Sunset Bridge Cruise";
+ $fireWorks = "Fireworks Cruise";
+?>
+{if:showTickets}
+<!-- Site is optioned to display ticket selection on the start page using this form. -->
+<form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+<!-- <input type="hidden" name="PerformanceID" value="{performanceDetail.id}"> -->
+<!-- <input type="hidden" name="SectionID" value="{sectionDetail.id}"> -->
+{end:}
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for ticket select page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a> <!-- sends user to cart page -->
+ <a class="small button right radius buttonTicketsGo GLMSelectSubmit" id="GLMselectButtonTop">{term.nav.add_to_cart}</a>
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{ticketText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <span class="h2Tickets">We're sorry, we had a problem with your request:</span>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+ <!-- List of Locations -->
+
+{foreach:membersList,m}
+
+<!--
+ <div class="row rowPanel">
+ <div class="large-12 columns">
+ <div class="panel">
+-->
+
+ <!-- Member descriptions and image -->
+
+<!--
+ <div class="row rowPanel" style="margin-bottom: 1em;">
+ <div class="small-12 columns">
+ {if:!option.ticket_shop.start.show_performances}
+ <a class="hide-for-small-only small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_performanceSelect&MemberID={m.id}">{term.nav.select}</a>
+ <span class="h2Tickets">
+ <a href="{baseSCRIPT}&Action=Shop_performanceSelect&MemberID={m.id}">{m.name:h}</a>
+ </span>
+ {else:}
+ <span class="h2Tickets">{m.name:h}</span>
+ {end:}
+ </div>
+ {if:option.ticket_shop.start.show_venue_image}
+ {if:m.image}
+-->
+ <!-- Image for smaller displays -->
+<!--
+ <div class="small-12 columns hide-for-medium-up">
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{m.image}">
+ </div>
+ {end:}
+ {end:}
+ <div class="small-12 medium-8 columns">
+ {if:m.descr}{m.descr:h}{end:}
+ </div>
+ {if:option.ticket_shop.start.show_venue_image}
+ {if:m.image}
+-->
+ <!-- Image for larger displays -->
+<!--
+ <div class="medium-4 columns show-for-medium-up">
+ <img class="right" src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{m.image}">
+ </div>
+ {end:}
+ {end:}
+ </div>
+-->
+
+
+ <!-- List of performances for this location -->
+
+ {if:option.ticket_shop.start.show_performances}
+
+ {foreach:m.performances,p}
+
+ <div class="row rowPanel">
+ <div class="large-12 columns blocks">
+ <?php if($p->name == $liveMusic){ ?>
+ <span style="margin-bottom: 10px;" class='h2Tickets cruises'>Family Fun Cruises</span>
+ <?php } ?>
+ <?php if($p->name == $ferry || $p->name == $valet || $p->name == $guide || $p->name == $sunset || $p->name == $fireWorks) { ?>
+ <div class="panel callout ferryGuideCruise">
+ <?php } else if($p->name == $liveMusic) { ?>
+ <div class="panel callout liveMusic">
+ <?php } else { ?>
+ <div class="panel callout">
+ <?php } ?>
+ <!-- Header and optional nav links -->
+ <div class="row rowPanel">
+ <div class="large-12 columns">
+ {if:!option.ticket_shop.start.show_sections}
+ <?php if($p->name != $ferry && $p->name != $valet && $p->name != $guide){ ?>
+ <a class="hide-for-small-only small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{term.nav.select}</a>
+ <?php } ?>
+ <span class="h3Tickets">
+ <a class="h3Tickets" href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name:h}</a>
+ </span>
+ {else:}
+ <span class="h3Tickets">{p.name:h}</span>
+ {end:}
+ </div>
+ </div>
+
+ <!-- Performance descriptions and image -->
+
+ <div class="row rowPanel">
+ <div class="small-12 columns">
+ <!-- TEST DATA -->
+ {foreach:p.sections,s}
+<!-- <p style="clear: both;"> </p> Please look at spacing here -->
+<!-- <div class="glmBlock">-->
+<!-- <div class="glmBlockContent"> -->
+<!-- <div class="glmDescr">-->
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+<!-- </div>-->
+ <p>{p.short_descr:h}</p>
+
+<!-- </div>--> <!-- glmBlockContent -->
+<!-- </div> --> <!-- glmBlock -->
+
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+
+ <!-- for each performance -->
+ {if:x.show_on_start.value}
+
+ {if:x.mayBuyNow}
+
+ <div class="row rowPanel">
+ <div class="medium-12 columns">
+ <div class="panel frontPanel" style="background: none; border: none;padding: 1rem; margin-bottom: 0px">
+ <div class="row rowPanel">
+ <div class="medium-6 columns">
+
+ <!-- Ticket -->
+
+ <div class="row rowPanel">
+ <div class="medium-12 columns">
+
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <?php if($x->price != '$0.00'){ ?>
+ <h6>{x.title} - {x.price}</h6>
+ <?php } else if($x->title == 'Child Under 5'){ ?>
+ <h6>{x.title} - Free </h6>
+ <?php } else { ?>
+ <h6>{x.title}</h6>
+ <?php } ?>
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={performanceDetail.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div class="row rowPanel">
+ <div class="medium-12 columns">
+
+ {if:x.descr}
+<!-- {x.descr:h}-->
+ {end:}
+
+<!--
+ <p>
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}<br>
+ {end:}
+
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time}
+ {end:}
+
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {end:}
+ </p>
+-->
+ </div>
+ </div>
+ {if:option.packages}
+ {foreach:x.packageData,y}
+ <div class="row rowPanel">
+ <div class="medium-1 columns"> </div>
+ <div class="medium-1 columns">
+ {y.quant}
+ </div>
+ <div class="medium-10 columns">
+ {y.title} - {y.performance_name}
+ </div>
+ </div>
+ {end:}
+ {end:}
+ </div>
+
+ {if:option.ticket_selection.include_options_in_ticket_list}
+
+ <div class="medium-6 columns text-right">
+<!--
+ <b>Price:</b>
+ {x.price}
+-->
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ {if:x.date_specific.value}
+ <label>
+ <b>Date:</b>
+ <span id="GLMeventDateSelect_{x.id}_S">
+ <input type="text" id="GLMeventDateInput_{x.id}" data-ticket="{x.id}" class="glmTicketDateSelect glmTicketDateInput" name="ticket_date[{x.id}]" value="">
+ </span>
+ </label>
+ {end:}
+ <label>
+ <?php if($p->name == $valet) { ?>
+ <b> Number of Vehicles: </b>
+ <?php } else { ?>
+ <b>Quantity:</b>
+ <?php } ?>
+ <select style="height: 2.1rem;" id="glmQuantSelector_{x.id}" data-ticket="{x.id}" data-addon-required="{x.addon_required.value}" name="quant[{x.id}]" class="glmTicketQuantSelect glmTicketQuantInput">
+ <option value=""> </option>
+ </select>
+ </label>
+
+ <!-- For each add-on for this ticket -->
+
+ {foreach:x.addons,a}
+
+ <span id="glmAddonVisible_{a.id}" style="display: none;">
+ {if:x.addon_required}
+ <span class="glmCartRequired">{a.name}</span>
+ {else:}
+ {a.name}
+ {end:}<br>
+ {a.unit_cost} / {a.unit_name}
+ <input type="hidden" class="GLMaddonTicketInvID_{x.id}" name="GLMaddonTicketInvID[{a.id}]" value="">
+ <input type="hidden" name="GLMaddonID[{a.id}]" value="{a.id}">
+ <select id="glmAddonQuantSelect_{a.id}" class="glmAddonQuantSelector_{x.id} glmTicketQuantInput" type="number" data-ticket="{x.id}" data-addon="{a.id}" data-max="{a.max_quant}" data-units="" name="GLMaddonQuant[{a.id}]" >
+ <option value=""></option>
+ </select>
+ <br>
+ </span>
+
+ {end:} <!-- /each addons -->
+
+ </div>
+ </div>
+
+ {end:} <!-- /include_options_in_ticket_list -->
+
+ </div> <!-- /panel -->
+
+ {if:x.show_on_start.value}
+ <hr class="separate">
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+ {end:} <!-- /may buy now -->
+ {end:} <!-- /for each performance -->
+ {end:} <!-- /For each ticket in this section -->
+
+
+ {end:}
+
+ {if:option.ticket_shop.start.show_performance_descr_short}
+ <!--{p.short_descr:h}-->
+ {else:}
+ {if:p.descr}
+ <!--{p.descr:h}-->
+ {end:}
+ {end:}
+ {if:option.ticket_shop.start.show_performance_start_end_dates}
+ <br>
+ <!--{p.start_date.date} through {p.end_date.date}-->
+ {end:}
+ </div>
+ {if:option.ticket_shop.start.show_performance_image}
+ {if:p.image}
+ <!-- Image for smaller displays -->
+ <div class="small-3 columns hide-for-medium-up">
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{p.image}">
+ </div>
+ <!-- Image for larger displays -->
+ <div class="medium-3 columns show-for-medium-up">
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}">
+ </div>
+ {end:}
+ {end:}
+ </div>
+ <?php if($p->name == $guide){ ?>
+ <span style="display: inline-block; float: right; padding: 10px; margin-top: 20px;" id="cartButton">
+ <a class="small button right radius buttonTicketsGo GLMSelectSubmit" id="GLMselectButtonTop"> Add to cart and proceed to checkout </a>
+ </span>
+ <?php } ?>
+ <!-- End of Performances List -->
+
+ </div> <!-- /panel callout -->
+ </div> <!-- /blocks -->
+</div>
+ <!-- row -->
+
+ {end:} <!-- Performances -->
+
+ {end:} <!-- show_performances_on_start_page -->
+
+ <!-- End of Members List -->
+
+<!-- </div> /panel -->
+<!-- </div> /columns -->
+<!-- </div> /row -->
+
+{end:} <!-- Locations -->
+<!--
+
+
+{if:showTickets}
+ <div id="GLMselect">
+ <a id="GLMselectButton" class="glmNavItemWide">{term.nav.select}</a>
+ </div>
+ </form>
+{end:}
+-->
+<!--</div> /GLMcontent -->
+<!--</div> -->
+
+
+
+
+
+
+
+
+
+{if:option.ticket_selection.include_options_in_ticket_list}
+
+ <!-- OK, this is a hack. I'm using it because toJavascript won't take a ":h". -->
+ {startScript:h}
+ var tickets = {ticketsJSON:h};
+ </script>
+
+ <!-- Set some flexy page parameters for use in JAVAscript -->
+ <flexy:toJavascript
+ flexy:prefix="flex_"
+ baseURL="baseURL"
+ purchLeadtime="performanceDetail.purch_leadtime"
+ >
+
+ <!-- jQuery scripts for controlling page actions -->
+ <script type="text/javascript">
+
+ var addButtonPushed = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these ' + flex_termTicketPlur + ' on-line.\
+ ' + flex_termTicketPlurCap + ' must be purchased at least [hours] hours prior to the ' + flex_termPerformanceNorm + '.\
+ Please select another date or time.\
+ </p>\
+ ';
+
+ $(document).ready(function(){
+ $(".cruises").css("font-size", "2em");
+ $(".ferryGuideCruise").css("border-top", "none").css("padding-top", "0px").css("border-bottom","none");
+ $(".ferryGuideCruise:eq(0)").css("border-top","1px solid #b6edff").css("padding-top", "10px");
+ $(".ferryGuideCruise:eq(1)").css("padding-top", "12px");
+ $(".ferryGuideCruise:eq(2)").css("border-bottom","1px solid #b6edff");
+ $(".ferryGuideCruise:eq(3)").css("border-top","2px dashed #b6edff").css("padding-top", "10px");
+ $(".ferryGuideCruise:eq(4)").css("border-top","2px dashed #b6edff").css("padding-top", "5px");
+ $(".ferryGuideCruise:eq(5)").css("border-top","2px dashed #b6edff").css("padding-top", "5px");
+
+ $('p').each(function() {
+ var $this = $(this);
+ if($this.html().replace(/\s| /g, '').length == 0)
+ $this.remove();
+ });
+
+ var width = $(window).width();
+ $(".callout").css("margin-bottom", "10px");
+ $('#glmAddonVisible_1').show();
+ $(".rowPanel").next('p').remove();
+ $(".ferryGuideCruise").css("margin-bottom", "0px");
+ $(".liveMusic").css("border-bottom", "none").css("margin-bottom", "0px").css("padding-top", "5px");
+ $(".rowPanel").css("min-width", "100%");
+ $('.separate').css("margin", "0px").css("margin-bottom", "5px");
+ $(".frontPanel").find('.glmTicketQuantSelect').css("height", "1.6rem").css("margin", "0px").css("padding", "0px");
+ $(".frontPanel").find('.glmTicketQuantInput').css("height", "1.6rem").css("margin", "0px").css("padding", "0px");
+ $(".frontPanel").css("padding-bottom", "5px");
+
+ // set initial mobile view values
+ if(width >= 320 && width <= 639){
+ $(".frontPanel").find('h5').css("font-size", "15px").css("font-weight", "bold");
+ $(".frontPanel").find('p').css("font-size", "15px");
+ $('.separate').show();
+
+ } else {
+ $(".frontPanel").css("margin-top", "-15px");
+ $(".separate").hide();
+ }
+ // set values based on screen resizing
+ $(window).resize(function (){
+ if($(this).width() >= 320 && $(this).width() <= 639){
+ $(".frontPanel").find('h5').css("font-size", "15px").css("font-weight", "bold");
+ $(".frontPanel").find('p').css("font-size", "15px");
+ $('.separate').show();
+
+ } else if($(this).width() >= 640) {
+ $(".frontPanel").css("margin-top", "-15px");
+ $(".frontPanel").find('h5').css("font-size", "1.25rem").css("font-weight", "normal");
+ $(".separate").hide();
+ }
+ });
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+ var inventory = ticket.inventory;
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // populate date input fields
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ $('#GLMeventDateInput_' + ticket.id).val('Various Dates');
+ $('#GLMeventDateInput_' + ticket.id).hide();
+
+ // Set ticket inventory IDs for addons
+ $('.GLMaddonTicketInvID_' + ticket.id).each(function() {
+ $(this).val(dateData.id);
+ })
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if ((!ticket.dateSpecific || dateCount == 1) && ticket.haveFutureInventory) {
+
+ // populate date input fields
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ $('#GLMeventDateInput_' + ticket.id).val(dateData.ticket_date.date);
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ var inv = inventory[mdy];
+
+ todayDate = new Date();
+
+ if (inventory[mdy]) {
+
+ // Check for past dates
+ thisDate = $.datepicker.parseDate("mm/dd/yy", inv.ticket_date.date);
+ if (thisDate < todayDate) {
+ return [false,"","Date Passed"];
+ }
+
+ // Get some other detail for this ticket
+ time = inv.ticket_time.time;
+
+ // Display the quantity available or "Unlimited" if that's appropriate
+ if (inv.unlimited_quant) {
+ avail = 'Unlimited quantity available\ntime: ' + time;
+ } else {
+ avail = inv.available + ' available\ntime: ' + time;
+ }
+
+ return [true,"",avail];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ if (!ticket.haveFutureInventory) {
+
+ $('#GLMeventDateSelect_' + ticket.id + '_S').html('Sorry No Future Dates Available');
+ $('#glmQuantSelection_' + ticket.id).html('');
+
+ } else {
+
+ if($('#GLMeventDateInput_' + ticket.id).length > 0) {
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: ticket.startDate,
+ maxDate: ticket.endDate,
+ beforeShow: function(){
+ $(".ui-datepicker").css('font-size', 12)
+ },
+ onSelect: function(selectedDate, inst) {
+
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ // Populate Ticket Inventory Array Value
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+
+ $('.GLMaddonTicketInvID_' + ticket.id).each(function() {
+ $(this).val(dateData.id);
+ })
+
+ // Clear addon-on quants from any previous date selection
+ $('.glmAddonQuantSelector_' + ticket.id).empty();
+ $('.glmAddonQuantSelector_' + ticket.id).append('<option value=""> </option>');
+
+ // Setup quantity selection
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+ } // Date Selection
+ }); // Date Picker
+ }
+ }
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ // Clear select date first message
+ $('#glmQuantSelector_' + id).empty();
+
+ // Add available quantity selections
+ var ticketQuants = '<option value="" selected> </option>';
+ for (var i = 1; i <= (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ $('#glmQuantSelector_' + id).append(ticketQuants);
+
+ }
+
+ // When a ticket quantity is selected - add the select options for any add-ons
+ $('.glmTicketQuantSelect').change(function( index ) {
+
+ var id = $(this).attr('data-ticket');
+ var invID = $('#GLMeventInvID_' + id).val();
+ var v = $(this).val();
+
+ $('.glmAddonQuantSelector_' + id).each(function( index ) {
+
+ addonID = $(this).attr('data-addon');
+ addonMax = $(this).attr('data-max');
+
+ if (v != '') {
+
+ // Make this addon visible
+ $('#glmAddonVisible_' + addonID).show();
+
+ // Update any add-on quantity selection to standard quantities (need to get this from the add-on at some point)
+ var addonQuants = '<option value="" selected> </option>';
+ for (var i = 1; i <= addonMax; i++) {
+ addonQuants = addonQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ $('#glmAddonQuantSelect_' + addonID).empty();
+ $('#glmAddonQuantSelect_' + addonID).append(addonQuants);
+
+ } else {
+
+ // Make this addon hidden
+ $('#glmAddonVisible_' + addonID).hide();
+
+ $('#glmAddonQuantSelect_' + addonID).empty();
+ $('#glmAddonQuantSelect_' + addonID).append('<option value=""> </option>');
+ }
+
+ });
+
+ });
+
+ var selectButtonPressed = false;
+
+ $('.GLMSelectSubmit').click(function() {
+
+ // Prevent multiple submissions
+ if (selectButtonPressed == true) {
+ return;
+ }
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ var needAddon = false;
+ $('.glmTicketQuantSelect').each(function( index ) {
+ v = $(this).val();
+ if (v != '') {
+ ticketSelected = true;
+ }
+
+ // Check for required add on
+ addonRequired = $(this).attr('data-addon-required');
+ if (addonRequired && v != '') {
+ ticketID = $(this).attr('data-ticket');
+ haveAddon = false;
+
+ $('.glmAddonQuantSelector_' + ticketID).each(function( index ) {
+ q = $(this).val();
+ if (q) {
+ haveAddon = true;
+ }
+ });
+ if (!haveAddon) {
+ needAddon = true;
+ }
+
+ }
+ });
+
+ if (ticketSelected && !needAddon) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select an ' + flex_termTicketNorm + ' quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+ </script>
+{end:}
+<!--
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ ticketsJSON="ticketsJSON"
+ minDate="performanceDetail.start_date.date"
+ maxDate="performanceDetail.end_date.date"
+>
+
+<script type="text/javascript">
+
+ var addButtonPushed = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these ' + flex_termTicketPlur + ' on-line.\
+ </p>\
+ ';
+
+ $(document).ready(function(){
+
+ // Code to kick off the geolocation-display feature
+ function doLocationMap(id) {
+ $("#locationMap_" + id).geolocate({
+ lat: "#lat_" + id,
+ lng: "#lon_" + id,
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ }
+ $('.GLMmapWindow').each(function( index, memb ) {
+ var memberID = $(this).attr('data-member-id');
+ doLocationMap(memberID);
+ });
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // for each ticket
+ $.each(flex_ticketsJSON, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDate_' + ticket.id).html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_inv_array[' + dateData['date'] + ']" value="' + dateData.id + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: flex_minDate,
+ maxDate: flex_maxDate,
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate);
+ } else {
+
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i <= (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ $('#GLMselectButton').click(function() {
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a ' + flex_termTicketNorm + ' quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+
+</script>
+-->
+<flexy:include src="FoundationStandAlone/foot.html" /> <!-- Note direct reference to interface type -->
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+
+<flexy:include src="FoundationStandAlone/head.html" /> <!-- Note direct reference to interface type -->
+
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Ticket Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketOptText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>You have selected</p>
+ <!-- List of Ticket Options -->
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">{term.prop.cap}: {performanceDetail.member_name}</div>
+<!-- <div class="glmDescr">{term.order.cap} up to: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</div> -->
+ <!--<p>{performanceDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{sectionDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <!--<p>{sectionDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{ticketDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ {if:!ticketDetail.date_specific.value}
+ <div class="glmDescr">Use any date {if:ticketDetail.start_date.timestamp} from {ticketDetail.start_date.date} to {ticketDetail.end_date.date}{end:}</div>
+ {end:}
+ {if:!ticketDetail.time_specific.value}
+ <div class="glmDescr">Use any time</div>
+ {else:}
+ <div class="glmDescr">Time: {ticketDetail.ticket_time.time}</div>
+ {end:}
+ {if:!ticketDetail.unlimted_use.value}
+ <!-- <div class="glmDescr">Each {term.ticket.norm} may be used {ticketDetail.uses} time(s)</div> -->
+ {else:}
+ <div class="glmDescr">Each {term.ticket.norm} may be used an unlimited number of times</div>
+ {end:}
+ <div class="glmDescr">{ticketDetail.descr:h}</div>
+ </div>
+ </div>
+ </div>
+ <!-- Date and quantity selection -->
+ <p>Please select from the following</p>
+ <div class="glmSection">
+ <div id="GLMeventDateSelectBlock">
+ <div id="GLMeventDateSelect" class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">Select desired date:</div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInputShort"><input type="text" id="GLMeventDate" name="ticket_date" value=""> (click in field to set date)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr quant">Select Quantity:</div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer">(please select date first)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {if:reason}<div id="GLMaddToCart" name="ticket">(disabled - please see above)</div>{else:}<div id="GLMaddToCart" class="glmNavItem add" name="ticket">{term.nav.add_to_cart}</div>{end:}
+</div><!-- GLMcontent -->
+
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ dateSpecific="ticketDetail.date_specific.value"
+ inventoryJSON="inventoryJSON"
+ leadTime="detail.performance.purch_leadtime"
+ minDate="performanceDetail.start_date.date"
+ maxDate="performanceDetail.end_date.date"
+ performanceDetailID="performanceDetail.id"
+ sectionDetailID="sectionDetail.id"
+ ticketDetailID="ticketDetail.id"
+>
+
+<!-- jQuery scripts for controlling page actions -->
+<script type="text/javascript">
+
+ // Whether ticket has date specific inventory
+ var dateSpecific = flex_dateSpecific + 0;
+
+ // Dates for inventory data
+ var dates = flex_inventoryJSON;
+
+ $(document).ready(function(){
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+ var dateData = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector" name="quant"><option value="0"></option>[ticket-quants]</select>\
+ ';
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these flex_termTicketPlur on-line.\
+ ' + flex_termTicketPlurCap + ' must be purchased at least ' + flex_leadTime + ' hours prior to the ' + termPerformanceNorm + '.\
+ Please select another date or time.\
+ </p>\
+ ';
+ var selectedInv;
+ var ticketQuants;
+ var addButtonPushed = false;
+
+ // Start by counting the number of dates to see if we have only 1
+ var dateCount = 0;
+// if (dateSpecific) {
+ $.each(dates, function(index, date) {
+ dateCount = dateCount + 1;
+ dateData = date;
+ });
+// }
+ // if there's no date specific tickets
+ if (!dateSpecific) {
+ // Populate date input field
+ $('#GLMeventDateSelectBlock').html('<input type="hidden" name="ticket_date" value="0">');
+ doQuantSelection();
+ // if there's only one date, then display that and move on.
+ } else if (!dateSpecific || dateCount == 1) {
+ // populate date input field
+ $('#GLMeventDate').val(dateData['date']);
+ $('#GLMtickets').html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_date" value="' + dateData['date'] + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+
+ doQuantSelection();
+ } else {
+ // Use the date picker to select a date
+ dateData = false;
+ $("#GLMeventDate").datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: flex_minDate,
+ maxDate: flex_maxDate,
+ onSelect: function(selectedDate, inst) {
+ // Update input message
+ $('#GLMdateMessage').html('<br />');
+
+ // Get data for the selected date
+ dateData = dates[selectedDate];
+ doQuantSelection();
+ } // Date Selection
+
+ }); // Date Picker
+
+ }
+
+ function doQuantSelection() {
+ // Build the ticket quant options
+ ticketQuants = '';
+ var selectMax = dateData['available'];
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+ var tooLate = dateData['tooLate'];
+ if (tooLate) {
+ $('#GLMticketQuantContainer').html(ticketTooLate);
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i <= (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ $('#GLMticketQuantContainer').html(ticketQuantSelection.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+// doAddToCartSetup();
+ }
+
+// function doAddToCartSetup() {
+ // Add to cart action
+ $('#GLMaddToCart').click(function() {
+ if (addButtonPushed) {
+ return;
+ }
+ var reason = '';
+ // Check date
+ if (dateData) {
+ selectedInv = dateData.id;
+ } else {
+ reason = reason.concat('* You need to select a date first.\n');
+ }
+ // Check quantity
+ var selectedQuant = (parseInt($('#glmQuantSelector').val()) + 0);
+ if (selectedQuant == 0) {
+ reason = reason.concat('* You need to select a quantity first.\n');
+ }
+ // Check if there's a reason we can't add this to the cart yet
+ if (reason != '') {
+ alert(reason);
+ return;
+ }
+ // Adding to cart
+ addButtonPushed = true;
+ $("#GLMeventDate").datepicker('disable');
+ $('#glmQuantSelector').prop('disabled', 'disabled');
+ setBlocker();
+ // Submit to cart
+ window.location = flex_baseSCRIPT + "&Action=Shop_cart&cart=add&PerformanceID=" + flex_performanceDetailID + "&SectionID=" + flex_sectionDetailID + "&TicketID=" + flex_ticketDetailID + "&ticket_inv=" + selectedInv + "&quant=" + selectedQuant;
+
+ });
+// }
+ // Code to kick off the geolocation-display feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ // Navigation buttons
+ $('#GLMnavCart').click(function() { // Add to Cart
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = flex_startURL;
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+</script>
+<flexy:include src="FoundationStandAlone/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="FoundationStandAlone/head.html" /> <!-- Note direct reference to interface type -->
+
+<form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+ <input type="hidden" name="PerformanceID" value="{performanceDetail.id}">
+ <input type="hidden" name="SectionID" value="{sectionDetail.id}">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for ticket select page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a> <!-- sends user to cart page -->
+ {if:!option.ticket_shop.start_at_cart}
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to start of shop -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{ticketText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <span class="h2Tickets">We're sorry, we had a problem with your request:</span>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+
+ <!-- Accept Selections - Top Button -->
+
+ <div class="row">
+ <div class="large-12 columns text-right">
+ <a class="small button right radius buttonTicketsGo GLMSelectSubmit" id="GLMselectButtonTop">{term.nav.add_to_cart}</a>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+ <!-- Item Selection -->
+
+{foreach:sections,s} <!-- each section -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+
+ <!-- Member general information -->
+
+ <div class="row">
+ <div class="small-12 medium-8 columns">
+ <span class="h2Tickets">{performanceDetail.member_name:h}</span><br>
+ <h4>{performanceDetail.name:h}</h4>
+
+ {if:!oneSectionOnly}
+ <h5>{s.sectionDetail.name}</h5>
+ {end:}
+ {if:performanceDetail.descr}
+ {performanceDetail.descr:h}
+ {end:}
+ </div>
+ {if:performanceDetail.image}
+ <div class="small-12 medium-4 columns show-for-medium-up">
+ <div class="right">
+ <img class="show-for-large-only" src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{performanceDetail.image}">
+ <img class="show-for-medium-only" src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{performanceDetail.image}">
+ </div>
+ </div>
+ {end:}
+ </div>
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+ <!-- List of available events -->
+
+ {foreach:s.ticketsData,x} <!-- for each performance -->
+ {if:x.mayBuyNow}
+
+ <div class="row">
+ <div class="medium-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="medium-6 columns">
+
+ <!-- Ticket -->
+
+ <div class="row">
+ <div class="medium-12 columns">
+
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <h5>{x.title}</h5>
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={performanceDetail.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="medium-12 columns">
+
+ {if:x.descr}
+ {x.descr:h}
+ {end:}
+
+ <p>
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}<br>
+ {end:}
+
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time}
+ {end:}
+
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {end:}
+ </p>
+ </div>
+ </div>
+ {if:option.packages}
+ {foreach:x.packageData,y}
+ <div class="row">
+ <div class="medium-1 columns"> </div>
+ <div class="medium-1 columns">
+ {y.quant}
+ </div>
+ <div class="medium-10 columns">
+ {y.title} - {y.performance_name}
+ </div>
+ </div>
+ {end:}
+ {end:}
+ </div>
+
+ {if:option.ticket_selection.include_options_in_ticket_list}
+
+ <div class="medium-6 columns text-right">
+ <b>Price:</b>
+ {x.price}
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ {if:x.date_specific.value}
+ <label>
+ <b>Date:</b>
+ <span id="GLMeventDateSelect_{x.id}_S">
+ <input type="text" id="GLMeventDateInput_{x.id}" data-ticket="{x.id}" class="glmTicketDateSelect glmTicketDateInput" name="ticket_date[{x.id}]" value="">
+ </span>
+ </label>
+ {end:}
+ <label>
+ <b>Quantity:</b>
+ <select id="glmQuantSelector_{x.id}" data-ticket="{x.id}" data-addon-required="{x.addon_required.value}" name="quant[{x.id}]" class="glmTicketQuantSelect glmTicketQuantInput">
+ <option value=""> </option>
+ </select>
+ </label>
+
+ <!-- For each add-on for this ticket -->
+
+ {foreach:x.addons,a}
+
+ <span id="glmAddonVisible_{a.id}" style="display: none;">
+ {if:x.addon_required}
+ <span class="glmCartRequired">{a.name}</span>
+ {else:}
+ {a.name}
+ {end:}<br>
+ {a.unit_cost} / {a.unit_name}
+ <input type="hidden" class="GLMaddonTicketInvID_{x.id}" name="GLMaddonTicketInvID[{a.id}]" value="">
+ <input type="hidden" name="GLMaddonID[{a.id}]" value="{a.id}">
+ <select id="glmAddonQuantSelect_{a.id}" class="glmAddonQuantSelector_{x.id} glmTicketQuantInput" type="number" data-ticket="{x.id}" data-addon="{a.id}" data-max="{a.max_quant}" data-units="" name="GLMaddonQuant[{a.id}]" >
+ <option value=""></option>
+ </select>
+ <br>
+ </span>
+
+ {end:} <!-- /each addons -->
+
+ </div>
+ </div>
+
+ {end:} <!-- /include_options_in_ticket_list -->
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+ {end:} <!-- /may buy now -->
+ {end:} <!-- /for each performance -->
+
+{end:} <!-- /each section -->
+
+ <!-- Accept Selections - Bottom Button -->
+
+ <div class="row">
+ <div class="medium-12 columns text-right">
+ <a class="small button right radius buttonTickets GLMSelectSubmit buttonTicketsGo" id="GLMselectButtonBotton">{term.nav.add_to_cart}</a>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+</form>
+
+{if:option.ticket_selection.include_options_in_ticket_list}
+
+ <!-- OK, this is a hack. I'm using it because toJavascript won't take a ":h". -->
+ {startScript:h}
+ var tickets = {ticketsJSON:h};
+ </script>
+
+ <!-- Set some flexy page parameters for use in JAVAscript -->
+ <flexy:toJavascript
+ flexy:prefix="flex_"
+ baseURL="baseURL"
+ purchLeadtime="performanceDetail.purch_leadtime"
+ >
+
+ <!-- jQuery scripts for controlling page actions -->
+ <script type="text/javascript">
+
+ var addButtonPushed = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these ' + flex_termTicketPlur + ' on-line.\
+ ' + flex_termTicketPlurCap + ' must be purchased at least [hours] hours prior to the ' + flex_termPerformanceNorm + '.\
+ Please select another date or time.\
+ </p>\
+ ';
+
+ $(document).ready(function(){
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // populate date input fields
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ $('#GLMeventDateInput_' + ticket.id).val('Various Dates');
+ $('#GLMeventDateInput_' + ticket.id).hide();
+
+ // Set ticket inventory IDs for addons
+ $('.GLMaddonTicketInvID_' + ticket.id).each(function() {
+ $(this).val(dateData.id);
+ })
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if ((!ticket.dateSpecific || dateCount == 1) && ticket.haveFutureInventory) {
+
+ // populate date input fields
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ $('#GLMeventDateInput_' + ticket.id).val(dateData.ticket_date.date);
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ var inv = inventory[mdy];
+
+ todayDate = new Date();
+
+ if (inventory[mdy]) {
+
+ // Check for past dates
+ thisDate = $.datepicker.parseDate("mm/dd/yy", inv.ticket_date.date);
+ if (thisDate < todayDate) {
+ return [false,"","Date Passed"];
+ }
+
+ // Get some other detail for this ticket
+ time = inv.ticket_time.time;
+
+ // Display the quantity available or "Unlimited" if that's appropriate
+ if (inv.unlimited_quant) {
+ avail = 'Unlimited quantity available\ntime: ' + time;
+ } else {
+ avail = inv.available + ' available\ntime: ' + time;
+ }
+
+ return [true,"",avail];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ if (!ticket.haveFutureInventory) {
+
+ $('#GLMeventDateSelect_' + ticket.id + '_S').html('Sorry No Future Dates Available');
+ $('#glmQuantSelection_' + ticket.id).html('');
+
+ } else {
+
+ if($('#GLMeventDateInput_' + ticket.id).length > 0) {
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: ticket.startDate,
+ maxDate: ticket.endDate,
+ beforeShow: function(){
+ $(".ui-datepicker").css('font-size', 12)
+ },
+ onSelect: function(selectedDate, inst) {
+
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ // Populate Ticket Inventory Array Value
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+
+ $('.GLMaddonTicketInvID_' + ticket.id).each(function() {
+ $(this).val(dateData.id);
+ })
+
+ // Clear addon-on quants from any previous date selection
+ $('.glmAddonQuantSelector_' + ticket.id).empty();
+ $('.glmAddonQuantSelector_' + ticket.id).append('<option value=""> </option>');
+
+ // Setup quantity selection
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+ } // Date Selection
+ }); // Date Picker
+ }
+ }
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ // Clear select date first message
+ $('#glmQuantSelector_' + id).empty();
+
+ // Add available quantity selections
+ var ticketQuants = '<option value="" selected> </option>';
+ for (var i = 1; i <= (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ $('#glmQuantSelector_' + id).append(ticketQuants);
+
+ }
+
+ // When a ticket quantity is selected - add the select options for any add-ons
+ $('.glmTicketQuantSelect').change(function( index ) {
+
+ var id = $(this).attr('data-ticket');
+ var invID = $('#GLMeventInvID_' + id).val();
+ var v = $(this).val();
+
+ $('.glmAddonQuantSelector_' + id).each(function( index ) {
+
+ addonID = $(this).attr('data-addon');
+ addonMax = $(this).attr('data-max');
+
+ if (v != '') {
+
+ // Make this addon visible
+ $('#glmAddonVisible_' + addonID).show();
+
+ // Update any add-on quantity selection to standard quantities (need to get this from the add-on at some point)
+ var addonQuants = '<option value="" selected> </option>';
+ for (var i = 1; i <= addonMax; i++) {
+ addonQuants = addonQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ $('#glmAddonQuantSelect_' + addonID).empty();
+ $('#glmAddonQuantSelect_' + addonID).append(addonQuants);
+
+ } else {
+
+ // Make this addon hidden
+ $('#glmAddonVisible_' + addonID).hide();
+
+ $('#glmAddonQuantSelect_' + addonID).empty();
+ $('#glmAddonQuantSelect_' + addonID).append('<option value=""> </option>');
+ }
+
+ });
+
+ });
+
+ var selectButtonPressed = false;
+
+ $('.GLMSelectSubmit').click(function() {
+
+ // Prevent multiple submissions
+ if (selectButtonPressed == true) {
+ return;
+ }
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ var needAddon = false;
+ $('.glmTicketQuantSelect').each(function( index ) {
+ v = $(this).val();
+ if (v != '') {
+ ticketSelected = true;
+ }
+
+ // Check for required add on
+ addonRequired = $(this).attr('data-addon-required');
+ if (addonRequired && v != '') {
+ ticketID = $(this).attr('data-ticket');
+ haveAddon = false;
+
+ $('.glmAddonQuantSelector_' + ticketID).each(function( index ) {
+ q = $(this).val();
+ if (q) {
+ haveAddon = true;
+ }
+ });
+ if (!haveAddon) {
+ needAddon = true;
+ }
+
+ }
+ });
+
+ if (ticketSelected && !needAddon) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select an ' + flex_termTicketNorm + ' quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+ </script>
+{end:}
+<flexy:include src="FoundationStandAlone/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+<!-- Footer content for all Front-End pages -->
+
+ {if:option.development} <!-- When running on development server - provide ability to fully reset a session -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="small-12 medium-8 large-8 columns">
+ <h6>Running on Development Server:</h6>
+ </div>
+ <div class="small-12 medium-4 large-4 columns">
+ <a href="{baseSCRIPT}&session_reset=true" class="tiny button buttonTickets">Reset Session</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {end:}
+
+ <!-- Foundation Scripts -->
+ <script src="{baseURL}common/Public/foundation/5.4.0/js/foundation.min.js"></script>
+ <script>
+ $(document).foundation({
+
+ });
+ </script>
+
--- /dev/null
+<!-- Header content for all Front-End pages -->
+
+ <!-- pass flexy template parameters to JAVAscripts -->
+ <flexy:toJavascript
+ flexy:prefix="flex_"
+ baseURL="baseURL"
+ baseAppURL="baseAppURL"
+ baseSCRIPT="baseSCRIPT"
+ startURL="startURL"
+ frontDebug="frontDebug"
+ termTicketNorm="term.ticket.norm"
+ termTicketPlur="term.ticket.plur"
+ termTicketPlurCap="term.ticket.plur_cap"
+ termPerformanceNorm="term.performance.norm"
+ >
+
+ {if:!jQueryLoaded} <!-- If the site hasn't already loaded jQuery - Set in config/applications/EventManagement.ini -->
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+
+ {end:}
+
+ {if:!jQueryUiLoaded} <!-- If the site hasn't already loaded jQueryUi - Set in config/applications/EventManagement.ini -->
+
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+
+ {end:}
+
+ {if:!siteHasFoundation}
+ <!-- Load Foundation -->
+ <link rel="stylesheet" type="text/css" href="https://192.168.44.7/www.mackinacferry.com/common/Public/foundation/5.4.0/css/foundation.min.css">
+ {end:}
+
+ <!-- Load scripts for Event Management features -->
+ <script type="text/javascript" src="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.js?serial={timestamp}"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.css">
+
+ {if:customCssFile} <!-- If the site has a custom css file that should be read to override certain styles in EventManagement.css -->
+
+ <!-- local css overrides for the current site -->
+ <link rel="stylesheet" type="text/css" href="{customCssFile}">
+
+ {end:}
+
+ {if:frontDebug} <!-- If front-end debugging has been enabled -->
+
+ <!-- This is simply here as something for jQuery code to check if we're doing debug -->
+ <div id="EMadminDebug"></div>
+
+ <!-- Script to create debug window -->
+ <script type="text/javascript">
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25";
+ if (flex_frontDebug) {
+ debugWindowFront = window.open(flex_baseURL + "index.php?Action=Debug_update","emDebugWindowFront",disp_setting);
+ }
+ </script>
+
+ {end:}
+
+ <!-- This is an overlay that's displayed when something is submitted to prevent other selections on the page -->
+ <div id="glmReloadBlocker" class="glmPageLoadBlockerHidden">
+ <div class="show-for-medium-up">Updating your information<br>Please wait ...</div>
+ <div class="show-for-small-only">Updating<br>Please wait ...</div>
+ </div>
+
+ {if:adminUser}
+ <h2 style="border: 1px solid black; text-align: center;">Purchasing By Admin User</h2>
+ {end:}
+
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+
+ <h1>PLEASE NOTE:</h1>
+
+ <p>
+ There is no general access to this site.
+ All access to this site should be through an appropriate link.
+ If you arrived here by mistake (or exploring), nothing but this message will be displayed.
+ If you have any concerns about this site, please contact Gaslight Media.
+ </p>
+
+ <p>
+ Gaslight Media<br>
+ 120 East Lake Street<br>
+ Petoskey, MI 49770<br>
+ <br>
+ Phone: 231-487-0692<br>
+ E-Mail: info@gaslightmedia.com<br>
+ Web: http://www.gaslightmedia.com
+ </p>
+
+ </body>
+
+</html>
+
+
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body id="debugBody">\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="updateTimestamp">\r
+ <b>Updated:</b> {debugUpdateTime}\r
+ </div> \r
+ <div id="debugBody">\r
+ {debugData:h}\r
+ </div>\r
+ </body>\r
+ \r
+ {startScript:h}\r
+ \r
+ // Reload the current window with Action = Debug_update\r
+ function reloadDebugWindow()\r
+ {\r
+ window.location("{baseSCRIPT}&Action=Debug_update");\r
+ }\r
+ \r
+ </script> \r
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body>\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="debugData">Debug Startup</div>\r
+ </body>\r
+</html>
\ No newline at end of file
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="Gaslight/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Your PayPal payment has been approved.</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ Your cart will now reflect that the payment has been made.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="Gaslight/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Unable to process your payment!</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ <div class="glmCartFormPrompt glmCartRequired">Sorry, there was a problem.</div>\r
+ </p>\r
+ \r
+ <p>\r
+ We were unable to find your purchase information and are therefore \r
+ are unable to process your payment through PayPal. This could be\r
+ due to you not performing any action with your pending purchase\r
+ for too long. Please click the "Return to selected tickets" button\r
+ at the top of the checkout page to see if your selections are still listed.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Additional Info Page
+-->
+<flexy:include src="Gaslight/head.html" /> <!-- Note direct reference to interface type -->
+
+<form id="cartForm" action="">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a> <!-- sends user to cart page -->
+ {if:!option.ticket_shop.start_at_cart}
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to start of shop -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{cartText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+
+ <!-- Problem display -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <h2>We're sorry, we had a problem with your request:</h2>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+ <!-- Cart Contents -->
+
+{foreach:cart,c} <!-- each venue -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="large-12 columns"><h2>{c.name:h}</h2></div>
+ </div>
+ {end:}
+
+
+ <!-- If we need to assign this ticket to be sold in another venue or we need to ask for likely date of use -->
+
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ <p>
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange glmTicketDateInput"> mm/dd/yyyy
+ {if:text.cart.select_likely_date_explain}
+ <br>{text.cart.select_likely_date_explain}
+ {end:}
+ </p>
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+{end:} <!-- /each venue -->
+
+ <!-- Cart Summary and Checkout Button -->
+
+{if:cartHasContents}
+ <div class="row">
+ <div class="large-12 columns text-right">
+ {if:!blockCheckout}
+ <a class="small button right radius buttonTickets buttonTicketsGo" id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" >{term.nav.checkout}</a>
+ {else:}
+ <a class="small button right radius alert disabled buttonTickets">Please complete the items in RED above.</a>
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{else:}
+ <div class="row">
+ <div class="large-12 columns">
+ <p class="right">Your cart is currently empty.</p>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{end:}
+
+</form> <!-- /cartForm -->
+
+<!-- Set some flexy page parameters for use in JAVAscript -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ vertScroll="vertScroll"
+ addtionalInfoPage="option.ticket_shop.additionalInfo.use_page"
+>
+
+<!-- jQuery scripts for controlling page actions -->
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365,
+ beforeShow: function(){
+ $(".ui-datepicker").css('font-size', 12)
+ }
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = flex_startURL;
+ });
+
+ if (flex_vertScroll) {
+ window.scrollTo(0, flex_vertScroll);
+ }
+
+ });
+
+</script>
+<flexy:include src="Gaslight/foot.html" /> <!-- Note direct reference to interface type -->
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Cart Page
+-->
+<flexy:include src="Gaslight/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <form id="cartForm" action="">
+ <!-- GLMpageTitle - A title for this page -->
+ <!--<div id="GLMpageTitle">Selected {term.performance.plur_cap} and {term.ticket.plur_cap}</div>-->
+ <div id="GLMHeader">
+<!-- <div id="GLMpageTitle">Cart</div> -->
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+<!-- <a class="glmNavItem cart" style="margin-right: 1em;">Reprint a previous {term.order.cap}: <input id="reprintVoucher" type="text" style="width: 6em; font-size: .8em;"></a> -->
+ </div>
+ </div>
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{cartText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ {if:havePromoCodes}
+ <div class="glmCartBlock">
+ <div class="glmCartFormInput">
+ <div class="glmCartText" style="width: auto;">If you have a {term.promo.norm}, please enter it here: </div><input id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
+ </div>
+ </div>
+ {end:}
+ {foreach:cart,c}<!-- each venue -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockSmallTitle">{c.name}</div>
+ <div class="glmCartEvents">
+ {foreach:c.performances,p} <!-- each performance for this date -->
+ <div class="glmCartEvent" style="margin-bottom: 2em;">
+ <div class="glmCartEventInfo">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem" style="position: relative; top: 0px;">{term.nav.select_more_of_these}</a>
+ {end:}
+ <div class="glmCartEventInfoLeft">
+
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmDescr">
+ {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile">{p.short_descr:h}</div>{end:}
+ {if:option.cart_images}{if:p.image}
+ <img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">
+ {end:}{end:}
+ </div>
+ </div>
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%" style="padding-right: .5em;">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ <input class="glmCartQuant" type="number" id="ticket_{i.invID}" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}">
+ </td>
+ {if:!p.oneSectionOnly}
+ <td align="left">{s.name}</td>
+ {end:}
+ <td align="left">
+ {i.title}
+ {if:i.time_specific.value}
+ - {i.ticket_time.time}
+ {else:}
+
+ {end:}
+ </td>
+ <td align="right" style="padding-right: .5em;">{if:i.show_price}{i.price}{end:}</td>
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.problem}
+ <tr>
+ <td> </td><td class="glmCartRequired">{i.problemText}</td>
+ </tr>
+ {end:}
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}{if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}{end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ <input class="glmCartQuant" type="number" id="addon_{a.id}" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units=" {a.name}" value="{a.selected}">
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!-- dates -->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {end:} <!--performances-->
+ </div><!--/.glmCartEvents-->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+
+{if:option.ask_for_assignment_and_likely_date}
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange"> mm/dd/yyyy
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+{end:}
+
+
+ </div> <!-- glmCartBlock -->
+ {end:}<!-- each venue -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <div class="glmCartBlock totals">
+ {if:cartHasContents}
+ <div class="glmGrandTotals">
+ Grand Total {totals.price}
+ </div>
+ <div class="glmCartWide">
+ {if:totals.tickets}
+<!-- {if:!blockCheckout} -->
+ <a id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" class="glmNavItem">{term.nav.checkout}</a>
+<!-- {else:}
+ <a class="glmNavItemInactive">Please complete the items in RED above.</a>
+ {end:} -->
+ {else:}
+ <a class="glmNavItemInactive">Your cart is currently empty.</a>
+ {end:}
+ </div>
+ {else:}
+ <P>Your cart is currently empty.</P>
+ {end:}
+ </div> <!-- glmCartBlock -->
+
+ {if:option.cart_promotions}
+ <div class="glmCartBlock">
+ You may also be interested in ...<br>
+ {foreach:cartPromotions,p}
+ <div class="glmBlockContent" style="margin-bottom: 2em;">
+ <div class="glmCartBlockTitle" style="margin-top: .5em;"><a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={p.id}">{p.member_name:h} - {p.name:h}</a></div>
+ {if:p.image}
+ <div class="glmBlockContentRight cartImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ <div class="glmBlockContentLeft cartContent">
+ {if:p.start_date}
+ <p>
+ Dates: {p.start_date.date}
+ </p>
+ {end:}
+ <!-- PER REQUEST, WE'RE NOW JUST SHOWING SHORT DESCR HERE -->
+ {if:p.short_descr}<div class="glmCartEventDescr promoDescr">{p.short_descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile promoDescrMobile">{p.short_descr:h}</div>{end:}
+ </div>
+ </div>
+ {end:}
+ </div>
+ {end:}
+
+
+ </form>
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Convert input fields to select lists
+ $('.glmCartQuant').each(function() {
+
+ var id = $(this).attr('id');
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var max = $(this).attr('data-max');
+ var value = $(this).attr('value');
+ var units = $(this).attr('data-units');
+ var numbSel = '';
+
+ // Build a picklist for this input
+ for (var i = 0 ; i {lte:h} max ; i++) {
+ if (value == i) {
+ numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
+ } else {
+ numbSel = numbSel.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ }
+
+ $('#quant_' + id).html('<select id="' + id + '" class="glmCartSelect" data-ticket="' + ticket + '" data-addon="' + addon + '">' + numbSel + '</select>' + units);
+
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a cart value changes, submit it as a cart update.
+ $('.glmCartSelect').change(function() {
+ vertScroll = getVertScroll();
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var value = $(this).val();
+
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update&ticket_inv=" + ticket + "&addon=" + addon + "&quant=" + value + "&vertScroll=" + vertScroll;
+
+ });
+
+ // When there's a change in the promo code input, submit it.
+ $('#promoCodeInput').change(function() {
+ var value = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=promo_code&promo_code=" + value;
+ });
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = '{startURL:h}';
+ });
+
+/* Not using right now
+ // Reprint order button
+ $('#reprintVoucher').on('keypress', function(event) {
+ if(event.which == '13'){
+ var orderID = $(this).val();
+ var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucher&OrderID=' + orderID,
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ }
+ });
+*/
+
+ if ({vertScroll}) {
+ window.scrollTo(0,{vertScroll});
+ }
+
+ });
+
+</script>
+<flexy:include src="Gaslight/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Page
+-->
+<flexy:include src="Gaslight/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Selected {term.ticket.plur_cap}</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{checkoutText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ <p>See below for more information.</p>
+ </div>
+ {end:}
+ <form id="GLMcheckoutForm" action='{baseSCRIPT}&Action=Shop_checkoutSubmit' method="POST">
+ <input type="hidden" name="Action" value="Shop_checkoutSubmit">
+ <!-- glmCartBlock - Contact information - Container for all general customer information -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">Contact Information</div>
+ <!-- glmCartForm - A container for a block of form input with prompts-->
+ <div class="glmCartForm">
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ {if:formData.contact.fname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.fname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="fname" value="{formData.contact.fname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ {if:formData.contact.lname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.lname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="lname" value="{formData.contact.lname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ {if:formData.contact.addr1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr1" value="{formData.contact.addr1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr2.required"> </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr2.required"> </div>
+ {if:formData.contact.addr2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr2" value="{formData.contact.addr2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.city.required">{text.cart.checkout.city}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.city.required">{text.cart.checkout.city}: </div>
+ {if:formData.contact.city.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.city.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="city" value="{formData.contact.city.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.state.required">{text.cart.checkout.state}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.state.required">{text.cart.checkout.state}: </div>
+ {if:formData.contact.state.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.state.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="state">
+ <option value=""> </option>
+ {foreach:formData.contact.state.states,s}
+ {if:s.stateSelected}
+ <option value="{s.stateID}" selected>{s.stateName:h}</option>
+ {else:}
+ <option value="{s.stateID}">{s.stateName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.country.required">{text.cart.checkout.country}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.country.required">{text.cart.checkout.country}: </div>
+ {if:formData.contact.country.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.country.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="country">
+ <option value=""> </option>
+ {foreach:formData.contact.country.countries,s}
+ {if:s.countrySelected}
+ <option value="{s.countryID}" selected>{s.countryName:h}</option>
+ {else:}
+ <option value="{s.countryID}">{s.countryName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ {if:formData.contact.zip.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.zip.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="zip" value="{formData.contact.zip.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ {if:formData.contact.phone.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.phone.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="phone" value="{formData.contact.phone.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email.required">{text.cart.checkout.email}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email.required">{text.cart.checkout.email}: </div>
+ {if:formData.contact.email.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email" value="{formData.contact.email.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ {if:formData.contact.email2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email2" value="{formData.contact.email2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt">OK to Send E-Mail?</div>
+ {if:formData.contact.email_ok}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok" checked> {text.cart.checkout.activities_offers}</div>
+ {else:}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok"> {text.cart.checkout.activities_offers}</div>
+ {end:}
+ </div><!--/.glmCartFormLine-->
+
+ {if:opt_field_1_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ {if:formData.contact.opt_field_1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_1" value="{formData.contact.opt_field_1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_2_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ {if:formData.contact.opt_field_2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_2" value="{formData.contact.opt_field_2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_3_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ {if:formData.contact.opt_field_3.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_3.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_3" value="{formData.contact.opt_field_3.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+
+
+ </div> <!--/.glmCartForm-->
+ </div><!--/.glmCartBlock-->
+
+ {foreach:cart,c} <!-- each venue -->
+ {if:c.performances}
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">{term.prop.cap}: {c.name}</div>
+ <!-- glmCartVenueInfo -->
+<!--
+ <div class="glmCartVenueInfo">
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}
+ </div>
+-->
+ <div class="glmCartEvents">
+
+ {foreach:c.performances,p} <!-- each performance for this date -->
+<div class="glmCartBlock">
+ <div class="glmCartEvent">
+ <div class="glmCartEventInfo">
+ <div class="glmCartEventInfoLeft">
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmCartBlockText">
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} -->
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}
+ </div><!--/.glmCartBlockText-->
+ </div><!--/.glmCartEventInfoLeft-->
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ <div class="glmDescr">
+ <span class="glmCartBlockSubTitleValue">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </span>
+ </div><!--/./glmCartBlockSubTitle-->
+
+
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ {i.selected}
+ </td>
+ {if:!p.oneSectionOnly}
+ <td align="left">{s.name}</td>
+ {end:}
+ <td align="left">
+ {i.title}
+ {if:i.time_specific.value}
+ - {i.ticket_time.time}
+ {else:}
+
+ {end:}
+ </td>
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}
+ {if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ {a.selected} {a.unit_name}
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!--dates-->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {if:p.policy}
+ <div class="glmSection">
+ <div class="glmSectionName">
+ Please read and agree to our policy for this {term.performance.norm}.
+ </div>
+ <div class="glmBlockContent">
+ <p>{p.policy:h}</p>
+ </div>
+ <div class="glmSectionBold glmCartRequired">
+ <p>I agree to the policy stated above. <input class="glmPolicyCheckbox" type="checkbox" id="glmAgree" name="agree"></p>
+ </div>
+ </div>
+ {end:}
+</div>
+ {end:} <!--each performance-->
+ </div><!--/.glmCartEvents-->
+ <!-- glmCartVenueTotal - Sub totals for this venue -->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->
+ <div class="glmCartPayment">
+ <!-- If special requests possible -->
+ {if:c.ticket_spec_req.value}
+ <div class="glmSpecialRequests">
+ <div class="glmCartBlockSmallTitle">Please enter any special requests:</div>
+ <div class="glmCart"><input type="textarea" name="{c.id}_spec_req" value="{c.paymentForm.spec_req.value:h}"></div>
+ </div>
+ {end:}
+<!-- <div class="glmCartBlockSmallTitle">Payment for {term.ticket.plur} at {c.name}</div> -->
+
+ {if:!formData.centralPayment}
+ <div class="glmCartForm">
+<!--
+ {if:!cartHasOneVenueOnly}
+ <div class="glmCartSubTotals">
+ <div class="glmCartTable sub">
+ <div class="glmCartHeader">
+ <div class="glmCartText">Tickets</div>
+ <div class="glmCartText">Total</div>
+ </div>
+ <div class="glmCartValues">
+ <div class="glmCartText">{c.totalTickets}</div>
+ <div class="glmCartText">{c.totalPrice}</div>
+ </div>
+ </div>
+ </div>
+ {end:}
+-->
+ {if:c.paymentResult}
+ {if:c.paymentResult.approved}
+ <div class="glmCartBlockSTitle">Card Payment Approved</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div>{c.paymentResult.cctype}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div>{c.paymentResult.ccname}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div>{c.paymentResult.ccnumb}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div>{c.paymentResult.ccexp}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>
+ <div id="GLMnavigation">
+ <div id="GLMprintTickets" class="glmNavItem">{term.nav.print_vouchers}</div>
+ </div>
+ {else:}
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>
+ <ul><li>{c.paymentResult.description}</li></ul>
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>
+ {if:forceCheckoutPhase}
+ <div id="GLMnavigation">
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>
+ </div>
+ {end:}
+ {end:}<!--paymentResult approved-->
+ {end:}<!--paymentResult-->
+ {if:c.paymentResult.approved}
+ <p>Payment Accepted</p>
+ {else:}
+ {if:c.havePaymentMethod}
+ <!-- Payment type selection -->
+ <div class="glmCartBlockSmallTitle">
+ {if:c.havePayPal}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="pp"> PayPal
+ {else:}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="pp">
+ {end:}
+ {end:}
+ {if:c.haveCreditCards}
+ {if:c.havePayPal}
+
+ {end:}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="cc">
+ {end:}
+ {end:}
+ </div><!--/.glmCartBlockTitle-->
+ <!-- Credit Card Payment Form -->
+ {if:c.haveCreditCards}
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByCC" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByCC" class="">
+ {end:}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt" flexy:if="c.paymentForm.cctype.required">Total Charged to this Card</div>
+ <div class="glmCartFormInput">{c.totalPrice}</div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cctype.required">Card Type</div>
+ {if:c.paymentForm.cctype.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cctype.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="{c.id}_cctype">
+ <option value=""> </option>
+ {foreach:c.paymentForm.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccname.required">Name on Card</div>
+ {if:c.paymentForm.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccname" value="{c.paymentForm.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccnumb.required">Card Number</div>
+ {if:c.paymentForm.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccnumb" value="{c.paymentForm.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccexp.required">Expiration Date</div>
+ {if:c.paymentForm.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ Month
+ <select name="{c.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Year
+ <select name="{c.id}_ccyear">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cccode.required">Security Code</div>
+ {if:c.paymentForm.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_cccode" value="{c.paymentForm.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {end:}<!--haveCreditCards-->
+ {if:c.havePayPal}
+ <!-- PayPal Payment Form -->
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByPayPal" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByPayPal" class="">
+ {end:}
+ <div id="{c.id}_PayPal" memberID="{c.id}" class="glmPayPalButton">
+ <img src="{baseURL}common/EventManagement/front/Gaslight/assets/paypal_but6.gif"></a>
+ </div>
+ </span>
+ {end:}<!--havePayPal-->
+ {if:c.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+ {else:} <!-- havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+ {end:} <!-- havePaymentMethod -->
+ {end:} <!-- if payment not approved -->
+
+ </div> <!-- glmCartForm - Venue Payment -->
+ </div> <!-- glmCartPayment -->
+
+ {end:} <!-- if not central payment -->
+ </div> <!-- glmCartBlock -->
+ </div>
+ {end:} <!-- if Performances -->
+
+ {if:!cartRequiresPayment}
+ <input type="hidden" name="{c.id}_payTypeSelect" value="no">
+ {end:}
+
+ {end:} <!-- each venue -->
+
+{if:cartRequiresPayment}
+ {if:formData.centralPayment}
+
+ <div class="glmCartBlock">
+
+ {if:formData.centralPayment.havePaymentMethod}
+
+ {foreach:formData.centralPayment.paymentForm,p} <!-- This is a pseudo-loop since there should only be one entry. Keeps data consistent. -->
+
+ {if:p.cctype}
+ <!-- Credit Card Payment Form -->
+
+ <span id="{formData.centralPayment.id}_glmPayByCC" class="">
+ <div class="glmCartFormLine">
+ <div class="">
+ {if:formData.centralPayment.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{formData.centralPayment.id}" type="radio" name="{formData.centralPayment.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{formData.centralPayment.id}" type="hidden" name="{formData.centralPayment.id}_payTypeSelect" value="cc">
+ {end:}
+ </div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.cctype.required">Card Type</div>
+ <div class="glmCartFormInput">
+ <select name="{formData.centralPayment.id}_cctype">
+ <option value=""> </option>
+ {foreach:p.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccname.required">Name on Card</div>
+ {if:p.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_ccname" value="{p.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccnumb.required">Card Number</div>
+ {if:p.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_ccnumb" value="{p.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccexp.required">Expiration Date</div>
+ {if:p.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ Month
+ <select name="{formData.centralPayment.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Year
+ <select name="{formData.centralPayment.id}_ccyear">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.cccode.required">Security Code</div>
+ {if:p.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_cccode" value="{p.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {if:p.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {formData.centralPayment.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+
+ {end:} <!-- /Have Credit Cards -->
+ {end:} <!-- foreach payment -->
+
+ </div>
+
+ {else:} <!-- /havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+
+ {end:} <!-- /havePaymentMethod -->
+
+ {end:} <!-- Central Payment -->
+
+{end:} <!-- Cart Requires Payment -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <!-- glmCartBlock - A Venue -->
+ <div class="glmCartBlock">
+ {if:cartRequiresPayment}
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">Complete Purchase</div>
+<!-- NOT DISPLAYING THESE NOW
+ <div id="GLMpolicy">
+ (purchase and return policies go here)
+ </div>
+ -->
+ <p style="padding-top: 45px;">
+ {ssl_seal_head_script:h}
+ {ssl_seal_body_script:h}
+ </p>
+ </div>
+ {else:}
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">No Payment Required</div>
+ </div>
+ {end:}
+ <div style="float: right;">
+ <div class="glmCartTable totals" style="float: right;">
+ {if:cartRequiresPayment}
+
+ <div class="glmCartHeader">
+ <!-- <div class="glmCartText">{term.prop.plur_cap}</div> -->
+ <div class="glmCartText grand">Grand Total</div>
+ </div>
+ <div class="glmCartValues">
+ <!-- <div class="glmCartText">{totals.venues}</div> -->
+ <div class="glmCartText grand">{totals.price}</div>
+ </div>
+ {end:}
+ </div><!--/.glmCartTable-->
+ {if:!cartHasOneVenueOnly}
+<!-- <div class="glmCartBlockText">
+ NOTE: There will be a separate order number and a separate credit card transaction for each {term.prop.norm}.
+ </div> -->
+ {end:}
+
+ {if:adminUser}
+ <div>
+ <input type="checkbox" name="AdminNoPayment" value="TRUE"> No payment info required for Admin User.
+ </div>
+ {end:}
+
+ <div id="GLMcheckout" style="float: right;">
+ {if:!blockCheckout}
+ <a id="GLMcheckoutBtn" class="glmNavItemWide">{term.nav.purchase}</a>
+ {else:}
+ <a class="glmNavItemInactive">Unable to checkout - please see above.</a>
+ {end:}
+ </div>
+ </div>
+ </div>
+ </form>
+</div><!-- GLMcontent -->
+
+<!-- jQuery scripts for controlling page actions -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ baseSCRIPT="baseSCRIPT"
+ startURL="startURL"
+ baseURL="baseURL"
+>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ var checkoutButtonPressed = false;
+ var duration = 400;
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+
+ // Prevent multiple submissions
+ if (checkoutButtonPressed == true) {
+ return;
+ }
+
+ // Check policy acceptance
+ var needPolicyChecked = false;
+ $(".glmPolicyCheckbox").each(function() {
+ if (!$(this).is(':checked')) {
+ needPolicyChecked = true;
+ }
+ });
+
+ if (needPolicyChecked) {
+ alert('You must agree to our policies shown in red above to checkout.');
+ return false;
+ }
+
+ checkoutButtonPressed = true;
+ setBlocker();
+ $('#GLMcheckoutForm').submit();
+
+ });
+
+ // Navigation buttons
+ $('#GLMnavCart').on('click', function() { // Add to Cart
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = flex_startURL;
+ });
+
+ // Send user to PayPal payment when button is clicked
+ $('.glmPayPalButton').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=800, left=100, top=25";
+ PayPalWindow = window.open(flex_baseURL + "?Action=Shop_PayPal&memberID=" + memberID, "PayPalWindow",disp_setting);
+ PayPalWindow.focus();
+ });
+
+ // Show payment method input when selected
+ $('.glmSelectPayByCC').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByCC').show(duration);
+ });
+ });
+ $('.glmSelectPayByPayPal').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByPayPal').show(duration);
+ });
+ });
+
+ // Start with payment types hidden - only prompt showing
+ $('.glmPayTypes').hide(0);
+
+ // Show submit access blocker
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+
+</script>
+<flexy:include src="Gaslight/foot.html" />
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Complete Page\r
+\r
+-->\r
+\r
+<flexy:include src="Gaslight/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">Purchase Complete</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ <p>\r
+ <div \r
+ id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint"\r
+ style="float: none; text-align: center;"\r
+ >*** {term.nav.print_vouchers} for {c.name} ***</div>\r
+ </p>\r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ \r
+ <!-- Adobe Reader Download -->\r
+ \r
+ <div class="glmBlock">\r
+ <div class="glmBlockContentRight">\r
+ <a href="http://www.adobe.com/go/getreader" target="GetAdobeReader"><img src="{baseURL}common/EventManagement/front/TicketsFoundation/assets/get_adobe_reader.png"></a>\r
+ </div>\r
+ <div class="glmBlockContentLeft">\r
+ <small>\r
+ <p>\r
+ Adobe Reader is required to view and print your {term.voucher.plur}. Adobe Reader is a free program available directly from Adobe. \r
+ If you do not already have Adobe Reader installed, click the "Get Adobe Reader" link now.\r
+ </p>\r
+ </small>\r
+ </div>\r
+ <div class="glmBlockContent">\r
+ <small>\r
+ <p>\r
+ <b>If you are unable to print your {term.voucher.plur}, please print this page or write down the order number(s)\r
+ below and bring that to the ticket office when you arrive.</b>\r
+ </p>\r
+ ORDER #: \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ {c.paymentResult.orderID} \r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </small> \r
+ </div>\r
+ </div> \r
+ \r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{successText:h}</div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div class="glmCartBlockTitle">Contact Information</div>\r
+ <div class="glmCartForm">\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">First Name:</div><div class="glmCartFormInput">{formData.contact.fname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Last Name:</div><div class="glmCartFormInput">{formData.contact.lname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Address:</div><div class="glmCartFormInput">{formData.contact.addr1.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">{formData.contact.addr2.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">City:</div><div class="glmCartFormInput">{formData.contact.city.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">State:</div><div class="glmCartFormInput">{formData.contact.state.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Country:</div><div class="glmCartFormInput">{formData.contact.country.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">ZIP/Postal Code:</div><div class="glmCartFormInput">{formData.contact.zip.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Phone:</div><div class="glmCartFormInput">{formData.contact.phone.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">E-Mail address:</div><div class="glmCartFormInput">{formData.contact.email.value}</div></div> \r
+ {if:opt_field_1_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_1_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_1.value:h}</div></div> {end:}\r
+ {if:opt_field_2_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_2_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_2.value:h}</div></div> {end:}\r
+ {if:opt_field_3_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_3_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_3.value:h}</div></div> {end:}\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">\r
+ {if:formData.contact.email_ok}\r
+ You have asked us to send information on activities and offers. \r
+ {else:}\r
+ You have asked us to NOT send information on activities and offers.<br>\r
+ We will only contact you regarding this order.\r
+ {end:}\r
+ </div></div> \r
+ \r
+ </div> <!-- glmCartForm -->\r
+ \r
+ </div> <!-- glmCartBlock - Contact information -->\r
+ \r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ <div class="glmCartBlock">\r
+ \r
+ <div class="glmCartBlockTitle">{term.ticket.plur_cap} at: {c.name}</div>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+ <div class="glmCartVenueInfo">\r
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}\r
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}\r
+ \r
+ </div>\r
+\r
+ <div class="glmCartEvents">\r
+ \r
+ {foreach:c.performances,p} <!-- each performance for this date -->\r
+ \r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventInfoLeft">\r
+ <div class="glmCartBlockSubTitle">\r
+ {term.performance.cap}: <span class="glmCartBlockSubTitleValue">{p.name}</span>\r
+ </div>\r
+ <div class="glmCartBlockText">\r
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} --> \r
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <div class="glmCartBlockDates"> \r
+ {foreach:p.dates,d}\r
+ \r
+ <div class="glmCartBlockSubTitle">\r
+ {term.ticket.cap} date: \r
+ <span class="glmCartBlockSubTitleValue">\r
+ {if:d.dateSpecific}\r
+ {d.fullDate}\r
+ {else:}\r
+ Use any date\r
+ {if:c.likelyDate}\r
+ - Likely Date {c.likelyDate}\r
+ {end:}\r
+ {end:}\r
+ </span>\r
+ </div>\r
+ \r
+\r
+ {foreach:d.sections,s}\r
+ <table border="0" width="100%">\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ {if:!p.oneSectionOnly}\r
+ <th align="left">Section</th>\r
+ {end:}\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">\r
+ {i.selected}\r
+ </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left">{s.name}</td>\r
+ {end:}\r
+ <td align="left">\r
+ {i.title}\r
+ {if:i.time_specific.value}\r
+ - {i.ticket_time.time}\r
+ {else:}\r
+ \r
+ {end:}\r
+ </td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {if:i.descr}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td colspan="4">\r
+ {else:}\r
+ <td colspan="3">\r
+ {end:}\r
+ {if:option.cart_images}\r
+ {if:i.image}\r
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>\r
+ {end:}\r
+ {end:} \r
+ <div class="glmBlockContentLeft">{i.descr:h}</div>\r
+ </td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {if:i.show_addons} -->\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left"> </td>\r
+ {end:}\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {end:} -->\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td> </td>\r
+ {end:}\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ </table><!--/.glmCartTable-->\r
+ {end:}<!--sections-->\r
+ \r
+ \r
+ {end:} <!-- dates --> \r
+ \r
+ </div> <!-- dates -->\r
+ \r
+ </div>\r
+\r
+ {if:p.policy}\r
+ <div class="glmSection">\r
+ <div class="glmBlockContent">\r
+ <div class="glmCartBlockSubTitle">\r
+ Our policy for this {term.performance.norm}.\r
+ </div>\r
+ <p>{p.policy:h}</p>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} <!-- each performance -->\r
+ \r
+ </div>\r
+ \r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+\r
+ {if:!cartHasOneVenueOnly}\r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+ <div class="glmCartTotals">\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Sub Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText">{c.totalPrice}</div>\r
+ </div>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+\r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ \r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->\r
+ <div class="glmCartPayment">\r
+ \r
+ <!-- If special requests possible -->\r
+ {if:c.ticket_spec_req.value}\r
+ <div class="glmCartForm" style="margin-bottom: 1em;">\r
+ <div class="glmCartBlockTitle">Special requests:</div>\r
+ <div class="glmSpecialRequests">{c.paymentForm.spec_req.value:h}</div>\r
+ </div> \r
+ {end:}\r
+ \r
+ \r
+ {if:c.paymentResult}\r
+ <div class="glmCartForm">\r
+ {if:c.paymentResult.approved}\r
+ <div class="glmCartBlockTitle">Card Payment Approved</div>\r
+ \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div><div class="glmCartFormInput">{c.paymentResult.cctype}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div><div class="glmCartFormInput">{c.paymentResult.ccname}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div><div class="glmCartFormInput">{c.paymentResult.ccnumb}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div><div class="glmCartFormInput">{c.paymentResult.ccexp}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>\r
+ <div id="GLMnavigation">\r
+ <div id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint">{term.nav.print_vouchers}</div>\r
+ </div>\r
+ {else:}\r
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>\r
+ <ul><li>{c.paymentResult.description}</li></ul>\r
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>\r
+ {if:forceCheckoutPhase}\r
+ <div id="GLMnavigation">\r
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} \r
+ \r
+ </div> <!-- glmCartForm - Venue Payment -->\r
+ {end:}\r
+ \r
+ </div> <!-- glmCartPayment -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ {end:} <!-- each venue -->\r
+ \r
+ <div class="glmCartBlock totals">\r
+ {if:cartHasContents} \r
+ <div class="glmCartTotals">\r
+ <div class="glmCartBlockTitle totals">Cart Totals</div>\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText grand">Grand Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText grand">{totals.price}</div>\r
+ </div>\r
+ </div><!--/.glmCartTable-->\r
+ </div><!--/.glmCartTotals-->\r
+ {else:}\r
+ <P>Your cart is currently empty.</P> \r
+ {end:}\r
+ </div> <!-- glmCartBlock -->\r
+ \r
+</div><!-- GLMcontent -->\r
+\r
+{trackingScript:h}\r
+\r
+<!-- jQuery scripts for controlling page actions -->\r
+<flexy:toJavascript\r
+ flexy:prefix="flex_"\r
+ baseSCRIPT="baseSCRIPT"\r
+ startURL="startURL"\r
+ appAdminURL="appAdminURL"\r
+ \r
+>\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+\r
+ // Navigation buttons\r
+ $('#GLMnavCart').click(function() { // Add to Cart \r
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';\r
+ });\r
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection\r
+ window.location = flex_startURL;\r
+ });\r
+ \r
+ // Print vouchers\r
+ $('.voucherPrint').click(function(){ \r
+ \r
+ var orderID = $(this).attr('emOrderID');\r
+ var orderVerify = $(this).attr('emOrderVerify');\r
+ var voucherWindow = window.open(flex_baseSCRIPT + "&Action=Shop_printVoucher&OrderID=" + orderID + "&orderVerify=" + orderVerify, \r
+ "voucherPrint", \r
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"\r
+ );\r
+ voucherWindow.focus();\r
+ voucherWindow.print();\r
+ return false;\r
+\r
+ });\r
+\r
+ });\r
+\r
+</script>\r
+<flexy:include src="Gaslight/foot.html" />\r
--- /dev/null
+<h2>\r
+ <a href="{baseSCRIPT}&Action=Shop_printVoucher&OrderID={cartEntry.paymentResult.orderID}&orderVerify={cartEntry.paymentResult.orderVerification}">\r
+ Click here to reprint your {term.voucher.plur}\r
+ </a>\r
+</h2>\r
+\r
+<h3>\r
+<!-- Tickets Purchased at: {term.ticket.plur_cap} Purchased at:<br> -->\r
+ {cartEntry.name}\r
+</h3>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+<!-- {if:cartEntry.descr}<p>{cartEntry.descr:h}</p>{end:} -->\r
+ \r
+<table border="1" cellspacing="0" cellpadding="2">\r
+\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ <th align="left">{term.performance.cap}</th>\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+\r
+{foreach:cartForSummaryCentral,c}\r
+{foreach:c.performances,p} <!-- each performance -->\r
+ {foreach:p.dates,d} <!-- each date -->\r
+ {foreach:d.sections,s}\r
+ \r
+ \r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">{i.selected}</td>\r
+ <td align="left">{p.name:h}</td>\r
+ <td align="left">\r
+ {i.title:h}\r
+ {if:i.time_specific.value}\r
+ - {i.ticket_time.time}\r
+ {else:}\r
+ \r
+ {end:}\r
+ </td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ <td align="left"> </td>\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ <td> </td>\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ \r
+ \r
+ {end:} <!-- each section -->\r
+ {end:} <!-- each performance for this date -->\r
+{end:} <!-- each date for this venue -->\r
+\r
+ <tr>\r
+ <td colspan="4"> </td>\r
+ <td align="right">{c.totalPrice}</td>\r
+ </tr>\r
+\r
+<!-- \r
+ <tr>\r
+ <th align="right">{c.totalTickets}</th>\r
+ <td colspan="6"> </td>\r
+ <th align="right">{c.totalPrice}</th>\r
+ </tr>\r
+ -->\r
+ \r
+</table>\r
+\r
+ <!-- If special requests possible -->\r
+{if:c.ticket_spec_req}\r
+<p>\r
+ {c.paymentForm.spec_req.value:h}\r
+</p> \r
+{end:}\r
+\r
+{end:} \r
+\r
+{if:cartEntry.ticket_policy}<p>{cartEntry.ticket_policy:h}</p>{end:}\r
+\r
+<table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th>First Name:</th><td>{formData.contact.fname.value}</td></tr> \r
+ <tr><th>Last Name:</th><td>{formData.contact.lname.value}</td></tr> \r
+ <tr><th>Address:</th><td>{formData.contact.addr1.value}</td></tr> \r
+ <tr><th> </th><td>{formData.contact.addr2.value}</td></tr> \r
+ <tr><th>City:</th><td>{formData.contact.city.value}</td></tr> \r
+ <tr><th>State:</th><td>{formData.contact.state.value}</td></tr> \r
+ <tr><th>Country:</th><td>{formData.contact.country.value}</td></tr> \r
+ <tr><th>ZIP/Postal Code:</th><td>{formData.contact.zip.value}</td></tr> \r
+ <tr><th>Phone:</th><td>{formData.contact.phone.value}</td></tr> \r
+ <tr><th>E-Mail address:</th><td>{formData.contact.email.value}</td></tr> \r
+</table>\r
+ \r
+<p> \r
+ <table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th colspan="2" align="center">Credit Card Payment Approved</th></tr>\r
+ <tr><th align="left">Card Type</th><td>{cartEntry.paymentResult.cctype}</td></tr>\r
+ <tr><th align="left">Name on Card</th><td>{cartEntry.paymentResult.ccname}</td></tr>\r
+ <tr><th align="left">Card Number</th><td>{cartEntry.paymentResult.ccnumb}</td></tr>\r
+ <tr><th align="left">Expiration Date</th><td>{cartEntry.paymentResult.ccexp}</td></tr>\r
+ <tr><th align="left">Authorization Code</th><td>{cartEntry.paymentResult.authCode}</td></tr>\r
+ </table>\r
+</p> \r
+ \r
+<!-- is this needed? <flexy:include src="Gaslight/foot.html" /> -->\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Section Selection Page\r
+\r
+-->\r
+\r
+<flexy:include src="Gaslight/head.html" />\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">{term.section.cap} Selection</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem">{term.nav.show_selected}</a>\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+\r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{sectionText:h}</div>\r
+\r
+{if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+{end:}\r
+\r
+ <p>You have selected</p>\r
+ <div class="glmSection">\r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">{performanceDetail.member_name}</div><br> \r
+ <div class="glmBlockName">{performanceDetail.name}</div>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+<!-- <p><span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</p> -->\r
+<!-- <p>{performanceDetail.descr:h}</p> -->\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <!-- List of available sections -->\r
+ <hr />\r
+ <p>Please select from the following</p>\r
+ <div class="glmSection">\r
+{foreach:sectionList,x} \r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">\r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}">{x.name}</a>\r
+ </div> \r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}" class="glmNavItem">{term.nav.select}</a>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+ <p><span class="glmBold">{term.section.cap}</span>: {x.member_name}</p>\r
+ <p>{x.descr:h}</p>\r
+ </div>\r
+ </div> \r
+{end:}\r
+ \r
+ </div>\r
+\r
+</div> <!-- /GLMcontent -->\r
+\r
+ {startScript:h}\r
+\r
+ $(document).ready(function(){ \r
+\r
+ // Code to kick off the geolocation-display feature \r
+ $("#locationMap").geolocate({\r
+ lat: "#lat",\r
+ lng: "#lon",\r
+ mapOptions: {\r
+ disableDefaultUI: false,\r
+ mapTypeControl: true,\r
+ mapTypeId: "roadmap",\r
+ zoom: 12\r
+ },\r
+ markerOptions: {\r
+ draggable: false,\r
+ title: "This is your selected location"\r
+ }\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+<flexy:include src="Gaslight/foot.html" />\r
--- /dev/null
+
+
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ <div class="glmBlockContentRight">
+ <div id="locationMap_{m.id}" class="GLMmapWindow" data-member-id="{m.id}">(map loads here)</div>
+ <form>
+ <input type="hidden" id="lat_{m.id}" value="{m.lat}">
+ <input type="hidden" id="lon_{m.id}" value="{m.lon}">
+ </form>
+ </div><!--/.glmBlockContentRight-->
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>
+ <div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date} through {p.end_date.date}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:!showTickets}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a>
+ {end:}
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value}, {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="Gaslight/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.event.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{introText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>Please select from the following</p>
+{if:showTickets}
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+<!-- <input type="hidden" name="PerformanceID" value="{performanceDetail.id}"> -->
+<!-- <input type="hidden" name="SectionID" value="{sectionDetail.id}"> -->
+{end:}
+ <!-- List of Locations -->
+ {foreach:membersList,m}
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:m.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{m.image}"></div>
+ {end:}
+ {end:}
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft startContent">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+<!-- <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>-->
+ {if:p.start_date.timestamp}<div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date}{if:p.end_date.timestamp} - {p.end_date.date} {end:}</div>{end:}
+ <div class="glmDescr">{p.short_descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:p.image}
+ <div class="glmBlockContentRight startImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ {end:}
+ {if:!showTickets}
+<!-- <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a> -->
+ {end:}
+
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value} {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
+{if:showTickets}
+ <div id="GLMselect">
+ <a id="GLMselectButton" class="glmNavItemWide">{term.nav.select}</a>
+ </div>
+ </form>
+{end:}
+</div><!-- /GLMcontent -->
+<!--</div> -->
+{startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ </p>\
+ ';
+
+
+
+ $(document).ready(function(){
+
+ // Code to kick off the geolocation-display feature
+ function doLocationMap(id) {
+ $("#locationMap_" + id).geolocate({
+ lat: "#lat_" + id,
+ lng: "#lon_" + id,
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ }
+ {foreach:membersList,m}
+ doLocationMap({m.id});
+ {end:}
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDate_' + ticket.id).html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_inv_array[' + dateData['date'] + ']" value="' + dateData.id + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+// *** NEED TO FIX REFERENCE TO "performanceDetail" since that's not available on this page
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate);
+ } else {
+
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ $('#GLMselectButton').click(function() {
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+
+</script>
+<flexy:include src="Gaslight/foot.html" />
--- /dev/null
+Anthony changes for "use any date" or whatever
+--This line, and those below, will be ignored--
+
+M checkout.html
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+
+<flexy:include src="Gaslight/head.html" />
+
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Ticket Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketOptText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>You have selected</p>
+ <!-- List of Ticket Options -->
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">{term.prop.cap}: {performanceDetail.member_name}</div>
+<!-- <div class="glmDescr">{term.order.cap} up to: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</div> -->
+ <!--<p>{performanceDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{sectionDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <!--<p>{sectionDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{ticketDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ {if:!ticketDetail.date_specific.value}
+ <div class="glmDescr">Use any date {if:ticketDetail.start_date.timestamp} from {ticketDetail.start_date.date} to {ticketDetail.end_date.date}{end:}</div>
+ {end:}
+ {if:!ticketDetail.time_specific.value}
+ <div class="glmDescr">Use any time</div>
+ {else:}
+ <div class="glmDescr">Time: {ticketDetail.ticket_time.time}</div>
+ {end:}
+ {if:!ticketDetail.unlimted_use.value}
+ <!-- <div class="glmDescr">Each {term.ticket.norm} may be used {ticketDetail.uses} time(s)</div> -->
+ {else:}
+ <div class="glmDescr">Each {term.ticket.norm} may be used an unlimited number of times</div>
+ {end:}
+ <div class="glmDescr">{ticketDetail.descr:h}</div>
+ </div>
+ </div>
+ </div>
+ <!-- Date and quantity selection -->
+ <p>Please select from the following</p>
+ <div class="glmSection">
+ <div id="GLMeventDateSelectBlock">
+ <div id="GLMeventDateSelect" class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">Select desired date:</div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInputShort"><input type="text" id="GLMeventDate" name="ticket_date" value=""> (click in field to set date)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr quant">Select Quantity:</div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer">(please select date first)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {if:reason}<div id="GLMaddToCart" name="ticket">(disabled - please see above)</div>{else:}<div id="GLMaddToCart" class="glmNavItem add" name="ticket">{term.nav.add_to_cart}</div>{end:}
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ // Whether ticket has date specific inventory
+ var dateSpecific = {ticketDetail.date_specific.value} + 0;
+
+ // Dates for inventory data
+ var dates = {inventoryJSON:h};
+
+ $(document).ready(function(){
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+ var dateData = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector" name="quant"><option value="0"></option>[ticket-quants]</select>\
+ ';
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least {detail.performance.purch_leadtime} hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ </p>\
+ ';
+ var selectedInv;
+ var ticketQuants;
+ var addButtonPushed = false;
+
+ // Start by counting the number of dates to see if we have only 1
+ var dateCount = 0;
+// if (dateSpecific) {
+ $.each(dates, function(index, date) {
+ dateCount = dateCount + 1;
+ dateData = date;
+ });
+// }
+ // if there's no date specific tickets
+ if (!dateSpecific) {
+ // Populate date input field
+ $('#GLMeventDateSelectBlock').html('<input type="hidden" name="ticket_date" value="0">');
+ doQuantSelection();
+ // if there's only one date, then display that and move on.
+ } else if (!dateSpecific || dateCount == 1) {
+ // populate date input field
+ $('#GLMeventDate').val(dateData['date']);
+ $('#GLMtickets').html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_date" value="' + dateData['date'] + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+
+ doQuantSelection();
+ } else {
+ // Use the date picker to select a date
+ dateData = false;
+ $("#GLMeventDate").datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Update input message
+ $('#GLMdateMessage').html('<br />');
+
+ // Get data for the selected date
+ dateData = dates[selectedDate];
+ doQuantSelection();
+ } // Date Selection
+
+ }); // Date Picker
+
+ }
+
+ function doQuantSelection() {
+ // Build the ticket quant options
+ ticketQuants = '';
+ var selectMax = dateData['available'];
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+ var tooLate = dateData['tooLate'];
+ if (tooLate) {
+ $('#GLMticketQuantContainer').html(ticketTooLate);
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ $('#GLMticketQuantContainer').html(ticketQuantSelection.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+// doAddToCartSetup();
+ }
+
+// function doAddToCartSetup() {
+ // Add to cart action
+ $('#GLMaddToCart').click(function() {
+ if (addButtonPushed) {
+ return;
+ }
+ var reason = '';
+ // Check date
+ if (dateData) {
+ selectedInv = dateData.id;
+ } else {
+ reason = reason.concat('* You need to select a date first.\n');
+ }
+ // Check quantity
+ var selectedQuant = (parseInt($('#glmQuantSelector').val()) + 0);
+ if (selectedQuant == 0) {
+ reason = reason.concat('* You need to select a quantity first.\n');
+ }
+ // Check if there's a reason we can't add this to the cart yet
+ if (reason != '') {
+ alert(reason);
+ return;
+ }
+ // Adding to cart
+ addButtonPushed = true;
+ $("#GLMeventDate").datepicker('disable');
+ $('#glmQuantSelector').prop('disabled', 'disabled');
+ setBlocker();
+ // Submit to cart
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=add&PerformanceID={performanceDetail.id}&SectionID={sectionDetail.id}&TicketID={ticketDetail.id}&ticket_inv=" + selectedInv + "&quant=" + selectedQuant;
+
+ });
+// }
+ // Code to kick off the geolocation-display feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ // Navigation buttons
+ $('#GLMnavCart').click(function() { // Add to Cart
+ window.location = '{baseSCRIPT}&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = '{startURL:h}';
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+</script>
+<flexy:include src="Gaslight/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="Gaslight/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.ticket.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketText:h}</div>
+{if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+{end:}
+ <p>You have selected</p>
+ <!-- List of Tickets -->
+
+
+{foreach:sections,s}
+ <div class="glmSection">
+ <div class="glmBlock">
+
+
+ <div class="glmBlockContent">
+ {if:performanceDetail.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{performanceDetail.image}"></div>
+ {end:}
+ <div class="glmBlockContentLeft">
+
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.member_name:h}</div><br>
+ <div class="glmBlockName">{performanceDetail.name:h}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}
+-->
+ </div>
+
+ {if:performanceDetail.descr}
+ {performanceDetail.descr:h}
+ {end:}
+ </div> <!-- description -->
+ </div> <!-- member data left -->
+ </div> <!-- glmBlockContent -->
+ </div> <!-- glmBlock -->
+ </div> <!-- sections -->
+ <!-- List of Available Events -->
+ <p>Please select from the following</p>
+ <div class="glmSection">
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+ <input type="hidden" name="PerformanceID" value="{performanceDetail.id}">
+ <input type="hidden" name="SectionID" value="{sectionDetail.id}">
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockContentRight">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div> <!-- glmBLockContentRight -->
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={performanceDetail.id}&SectionID={x.section_id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ {end:}
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:x.descr}
+ <p>{x.short_descr:h}</p>
+ {end:}
+ <p>
+ {if:!x.date_specific.value}
+ {if:x.start_date.timestamp} Date: {x.start_date.date}{end:}{if:!x.start_end_dates_same} to {x.end_date.date}{end:}{if:!x.time_specific.value} {end:}
+ {end:}
+ {if:!x.time_specific.value}
+
+ {else:}
+ Time: {x.ticket_time.time}
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </p>
+ </div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ </div><!--/.glmBlock-->
+ {end:}
+ <div id="GLMselect">
+ <a id="GLMselectButton" class="glmNavItem">{term.nav.select}</a>
+ </div>
+ </form>
+ </div> <!-- glmSection -->
+
+{end:}
+
+</div> <!-- /GLMcontent -->
+
+{if:option.ticket_selection.include_options_in_ticket_list}
+ <!-- jQuery scripts for controlling page actions -->
+ {startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least [hours] hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ </p>\
+ ';
+
+
+ $(document).ready(function(){
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html(' \
+ <div class="glmTicketsSelectPrompt">Date Available: </div> \
+ <div class="glmTicketsSelectValue"> \
+ <div class="glmInput"> \
+ ' + dateData.ticket_date.date + ' \
+ <input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '"> \
+ </div> \
+ </div>');
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ if($('#GLMeventDateInput_' + ticket.id).length > 0) {
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: ticket.startDate,
+ maxDate: ticket.endDate,
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+ }
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate.replace(/\[hours\]/g, {performanceDetail.purch_leadtime}));
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ var selectButtonPressed = false;
+
+ $('#GLMselectButton').click(function() {
+
+ // Prevent multiple submissions
+ if (selectButtonPressed == true) {
+ return;
+ }
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+ if( $(window).width() < 768 ){
+ $('.glmBlock').not(":first").each(function() {
+ var left = $(this).find( $('.glmBlockContentLeft') );
+ left.prependTo( $(this) ).find( $('glmBlockContentRight') );
+ });
+ }
+ });
+ </script>
+{end:}
+<flexy:include src="Gaslight/foot.html" />
--- /dev/null
+<!-- Footer content for all Front-End pages -->
+{if:option.development}
+ <p id="glmDevelopmentNotice">
+ Running on Development Server:
+ <span style="float: right;">
+ <a href="{baseSCRIPT}&session_reset=true">Reset Session</a>
+ </span>
+ </p>
+{end:}
\ No newline at end of file
--- /dev/null
+<!-- Header content for all Front-End pages -->
+{startScript:h}
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAppURL = '{baseAppURL}';
+</script>
+{if:!jQueryLoaded}
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+{end:}
+{if:!jQueryUiLoaded}
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+{end:}
+<script type="text/javascript" src="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.js?serial={timestamp}"></script>
+<script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>
+<link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.css">
+{if:customCssFile}
+ <!-- local css overrides for the current site -->
+ <link rel="stylesheet" type="text/css" href="{customCssFile}">
+{end:}
+{if:frontDebug}
+ <!-- This is simply here as something for jQuery code to check if we're doing debug -->
+ <div id="EMadminDebug"></div>
+{end:}
+{startScript:h}
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25";
+ {if:frontDebug}
+ debugWindowFront = window.open("{baseURL}index.php?Action=Debug_update","emDebugWindowFront",disp_setting);
+ {end:}
+</script>
+
+<div id="glmReloadBlocker" class="glmPageLoadBlockerHidden">
+ <div>Updating your information<br>Please wait ...</div>
+</div>
+
+ {if:adminUser}
+ <h2 style="border: 1px solid black; text-align: center;">Purchasing By Admin User</h2>
+ {end:}
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+
+ <h1>PLEASE NOTE:</h1>
+
+ <p>
+ There is no general access to this site.
+ All access to this site should be through an appropriate link.
+ If you arrived here by mistake (or exploring), nothing but this message will be displayed.
+ If you have any concerns about this site, please contact Gaslight Media.
+ </p>
+
+ <p>
+ Gaslight Media<br>
+ 120 East Lake Street<br>
+ Petoskey, MI 49770<br>
+ <br>
+ Phone: 231-487-0692<br>
+ E-Mail: info@gaslightmedia.com<br>
+ Web: http://www.gaslightmedia.com
+ </p>
+
+ </body>
+
+</html>
+
+
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body id="debugBody">\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="updateTimestamp">\r
+ <b>Updated:</b> {debugUpdateTime}\r
+ </div> \r
+ <div id="debugBody">\r
+ {debugData:h}\r
+ </div>\r
+ </body>\r
+ \r
+ {startScript:h}\r
+ \r
+ // Reload the current window with Action = Debug_update\r
+ function reloadDebugWindow()\r
+ {\r
+ window.location("{baseSCRIPT}&Action=Debug_update");\r
+ }\r
+ \r
+ </script> \r
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body>\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="debugData">Debug Startup</div>\r
+ </body>\r
+</html>
\ No newline at end of file
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Your PayPal payment has been approved.</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ Your cart will now reflect that the payment has been made.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Unable to process your payment!</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ <div class="glmCartFormPrompt glmCartRequired">Sorry, there was a problem.</div>\r
+ </p>\r
+ \r
+ <p>\r
+ We were unable to find your purchase information and are therefore \r
+ are unable to process your payment through PayPal. This could be\r
+ due to you not performing any action with your pending purchase\r
+ for too long. Please click the "Return to selected tickets" button\r
+ at the top of the checkout page to see if your selections are still listed.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Additional Info Page
+-->
+<flexy:include src="MMM/head.html" /> <!-- Note direct reference to interface type -->
+
+<form id="cartForm" action="">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a> <!-- sends user to cart page -->
+ {if:!option.ticket_shop.start_at_cart}
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to start of shop -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{cartText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+
+ <!-- Problem display -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <h2>We're sorry, we had a problem with your request:</h2>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+ <!-- Cart Contents -->
+
+{foreach:cart,c} <!-- each venue -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="large-12 columns"><h2>{c.name:h}</h2></div>
+ </div>
+ {end:}
+
+
+ <!-- If we need to assign this ticket to be sold in another venue or we need to ask for likely date of use -->
+
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ <p>
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange glmTicketDateInput"> mm/dd/yyyy
+ {if:text.cart.select_likely_date_explain}
+ <br>{text.cart.select_likely_date_explain}
+ {end:}
+ </p>
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+{end:} <!-- /each venue -->
+
+ <!-- Cart Summary and Checkout Button -->
+
+{if:cartHasContents}
+ <div class="row">
+ <div class="large-12 columns text-right">
+ {if:!blockCheckout}
+ <a class="small button right radius buttonTickets buttonTicketsGo" id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" >{term.nav.checkout}</a>
+ {else:}
+ <a class="small button right radius alert disabled buttonTickets">Please complete the items in RED above.</a>
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{else:}
+ <div class="row">
+ <div class="large-12 columns">
+ <p class="right">Your cart is currently empty.</p>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{end:}
+
+</form> <!-- /cartForm -->
+
+<!-- Set some flexy page parameters for use in JAVAscript -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ vertScroll="vertScroll"
+ addtionalInfoPage="option.ticket_shop.additionalInfo.use_page"
+>
+
+<!-- jQuery scripts for controlling page actions -->
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365,
+ beforeShow: function(){
+ $(".ui-datepicker").css('font-size', 12)
+ }
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = flex_startURL;
+ });
+
+ if (flex_vertScroll) {
+ window.scrollTo(0, flex_vertScroll);
+ }
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" /> <!-- Note direct reference to interface type -->
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Cart Page
+-->
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent" class="cart">
+ <form id="cartForm" action="">
+ <!-- GLMpageTitle - A title for this page -->
+ <!--<div id="GLMpageTitle">Selected {term.performance.plur_cap} and {term.ticket.plur_cap}</div>-->
+ <div id="GLMHeader">
+<!-- <div id="GLMpageTitle">Cart</div> -->
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+<!-- <a class="glmNavItem cart" style="margin-right: 1em;">Reprint a previous {term.order.cap}: <input id="reprintVoucher" type="text" style="width: 6em; font-size: .8em;"></a> -->
+ </div>
+ </div>
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{cartText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ {if:havePromoCodes}
+ <div class="glmCartBlock">
+ <div class="glmCartFormInput">
+ <div class="glmCartText" style="width: auto;">If you have a {term.promo.norm}, please enter it here: </div><input id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
+ </div>
+ </div>
+ {end:}
+ {foreach:cart,c}<!-- each venue -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockSmallTitle venueTitle">{c.name}</div>
+ <div class="glmCartEvents">
+ {foreach:c.performances,p} <!-- each performance for this date -->
+ <div class="glmCartEvent" style="margin-bottom: 2em;">
+ <div class="glmCartEventInfo">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem" style="position: relative; top: 0px;">{term.nav.select_more_of_these}</a>
+ {end:}
+ <div class="glmCartEventInfoLeft">
+
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmDescr">
+ {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile">{p.short_descr:h}</div>{end:}
+ {if:option.cart_images}{if:p.image}
+ <img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">
+ {end:}{end:}
+ </div>
+ </div>
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%" style="padding-right: .5em;">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ <input class="glmCartQuant" type="number" id="ticket_{i.invID}" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}">
+ </td>
+ {if:!p.oneSectionOnly}
+ <td class="glmCartTicketName" align="left">{s.name}</td>
+ {end:}
+ <td class="glmCartTicketTitle" align="left">
+ {i.title}
+ {if:false}
+ {if:i.date_specific.value}
+ - {i.start_date.date}
+ {if:i.time_specific.value}
+ {i.ticket_time.time}
+ {end:}
+ {else:}
+ {if:i.time_specific.value}
+ - {i.ticket_time.time}
+ {end:}
+ {end:}
+ {end:}
+ </td>
+ <td class="glmCartTicketPrice" align="right" style="padding-right: .5em;">{if:i.show_price}{i.price}{end:}</td>
+ <td class="glmCartTicketExtended" align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.problem}
+ <tr>
+ <td> </td><td class="glmCartRequired">{i.problemText}</td>
+ </tr>
+ {end:}
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}{if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}{end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ <input class="glmCartQuant" type="number" id="addon_{a.id}" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units=" {a.name}" value="{a.selected}">
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!-- dates -->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {end:} <!--performances-->
+ </div><!--/.glmCartEvents-->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+
+{if:option.ask_for_assignment_and_likely_date}
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange"> mm/dd/yyyy
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+{end:}
+
+
+ </div> <!-- glmCartBlock -->
+ {end:}<!-- each venue -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <div class="glmCartBlock totals">
+ {if:cartHasContents}
+ <div class="glmGrandTotals">
+ Grand Total {totals.price}
+ </div>
+ <div class="glmCartWide">
+ {if:totals.tickets}
+<!-- {if:!blockCheckout} -->
+ <a id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" class="glmNavItem">{term.nav.checkout}</a>
+<!-- {else:}
+ <a class="glmNavItemInactive">Please complete the items in RED above.</a>
+ {end:} -->
+ {else:}
+ <a class="glmNavItemInactive">Your cart is currently empty.</a>
+ {end:}
+ </div>
+ {else:}
+ <P>Your cart is currently empty.</P>
+ {end:}
+ </div> <!-- glmCartBlock -->
+
+ {if:option.cart_promotions}
+ <div class="glmCartBlock">
+ You may also be interested in ...<br>
+ {foreach:cartPromotions,p}
+ <div class="glmBlockContent" style="margin-bottom: 2em;">
+ <div class="glmCartBlockTitle" style="margin-top: .5em;"><a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={p.id}">{p.member_name:h} - {p.name:h}</a></div>
+ {if:p.image}
+ <div class="glmBlockContentRight cartImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ <div class="glmBlockContentLeft cartContent">
+ {if:p.start_date}
+ <p>
+ Dates: {p.start_date.date}
+ </p>
+ {end:}
+ <!-- PER REQUEST, WE'RE NOW JUST SHOWING SHORT DESCR HERE -->
+ {if:p.short_descr}<div class="glmCartEventDescr promoDescr">{p.short_descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile promoDescrMobile">{p.short_descr:h}</div>{end:}
+ </div>
+ </div>
+ {end:}
+ </div>
+ {end:}
+
+
+ </form>
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Convert input fields to select lists
+ $('.glmCartQuant').each(function() {
+
+ var id = $(this).attr('id');
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var max = $(this).attr('data-max');
+ var value = $(this).attr('value');
+ var units = $(this).attr('data-units');
+ var numbSel = '';
+
+ // Build a picklist for this input
+ for (var i = 0 ; i {lte:h} max ; i++) {
+ if (value == i) {
+ numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
+ } else {
+ numbSel = numbSel.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ }
+
+ $('#quant_' + id).html('<select id="' + id + '" class="glmCartSelect" data-ticket="' + ticket + '" data-addon="' + addon + '">' + numbSel + '</select>' + units);
+
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a cart value changes, submit it as a cart update.
+ $('.glmCartSelect').change(function() {
+ vertScroll = getVertScroll();
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var value = $(this).val();
+
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update&ticket_inv=" + ticket + "&addon=" + addon + "&quant=" + value + "&vertScroll=" + vertScroll;
+
+ });
+
+ // When there's a change in the promo code input, submit it.
+ $('#promoCodeInput').change(function() {
+ var value = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=promo_code&promo_code=" + value;
+ });
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = '{startURL:h}';
+ });
+
+/* Not using right now
+ // Reprint order button
+ $('#reprintVoucher').on('keypress', function(event) {
+ if(event.which == '13'){
+ var orderID = $(this).val();
+ var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucher&OrderID=' + orderID,
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ }
+ });
+*/
+
+ if ({vertScroll}) {
+ window.scrollTo(0,{vertScroll});
+ }
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Page
+-->
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent" class="checkout">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Selected {term.ticket.plur_cap}</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{checkoutText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ <p>See below for more information.</p>
+ </div>
+ {end:}
+ <form id="GLMcheckoutForm" action='{baseSCRIPT}&Action=Shop_checkoutSubmit' method="POST">
+ <input type="hidden" name="Action" value="Shop_checkoutSubmit">
+ <!-- glmCartBlock - Contact information - Container for all general customer information -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">Contact Information</div>
+ <!-- glmCartForm - A container for a block of form input with prompts-->
+ <div class="glmCartForm">
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ {if:formData.contact.fname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.fname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="fname" value="{formData.contact.fname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ {if:formData.contact.lname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.lname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="lname" value="{formData.contact.lname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ {if:formData.contact.addr1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr1" value="{formData.contact.addr1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr2.required"> </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr2.required"> </div>
+ {if:formData.contact.addr2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr2" value="{formData.contact.addr2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.city.required">{text.cart.checkout.city}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.city.required">{text.cart.checkout.city}: </div>
+ {if:formData.contact.city.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.city.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="city" value="{formData.contact.city.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.state.required">{text.cart.checkout.state}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.state.required">{text.cart.checkout.state}: </div>
+ {if:formData.contact.state.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.state.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="state">
+ <option value=""> </option>
+ {foreach:formData.contact.state.states,s}
+ {if:s.stateSelected}
+ <option value="{s.stateID}" selected>{s.stateName:h}</option>
+ {else:}
+ <option value="{s.stateID}">{s.stateName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.country.required">{text.cart.checkout.country}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.country.required">{text.cart.checkout.country}: </div>
+ {if:formData.contact.country.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.country.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="country">
+ <option value=""> </option>
+ {foreach:formData.contact.country.countries,s}
+ {if:s.countrySelected}
+ <option value="{s.countryID}" selected>{s.countryName:h}</option>
+ {else:}
+ <option value="{s.countryID}">{s.countryName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ {if:formData.contact.zip.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.zip.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="zip" value="{formData.contact.zip.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ {if:formData.contact.phone.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.phone.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="phone" value="{formData.contact.phone.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email.required">{text.cart.checkout.email}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email.required">{text.cart.checkout.email}: </div>
+ {if:formData.contact.email.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email" value="{formData.contact.email.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ {if:formData.contact.email2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email2" value="{formData.contact.email2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt">Receive E-Newsletter?</div>
+ {if:formData.contact.email_ok}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok" checked>
+ {else:}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok">
+ {end:}
+ Please sign me up to receive "The Ship's Bell" e-newsletter.
+ </div>
+ </div><!--/.glmCartFormLine-->
+
+ {if:opt_field_1_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ {if:formData.contact.opt_field_1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_1" value="{formData.contact.opt_field_1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_2_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ {if:formData.contact.opt_field_2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_2" value="{formData.contact.opt_field_2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_3_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ {if:formData.contact.opt_field_3.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_3.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_3" value="{formData.contact.opt_field_3.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+
+
+ </div> <!--/.glmCartForm-->
+ </div><!--/.glmCartBlock-->
+
+ {foreach:cart,c} <!-- each venue -->
+ {if:c.performances}
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle venueTitle">{term.prop.cap}: {c.name}</div>
+ <!-- glmCartVenueInfo -->
+<!--
+ <div class="glmCartVenueInfo">
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}
+ </div>
+-->
+ <div class="glmCartEvents">
+
+ {foreach:c.performances,p} <!-- each performance for this date -->
+<div class="glmCartBlock">
+ <div class="glmCartEvent">
+ <div class="glmCartEventInfo">
+ <div class="glmCartEventInfoLeft">
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmCartBlockText">
+ {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:}
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}
+ </div><!--/.glmCartBlockText-->
+ </div><!--/.glmCartEventInfoLeft-->
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ <div class="glmDescr">
+ <span class="glmCartBlockSubTitleValue">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </span>
+ </div><!--/./glmCartBlockSubTitle-->
+
+
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ {i.selected}
+ </td>
+ {if:!p.oneSectionOnly}
+ <td align="left">{s.name}</td>
+ {end:}
+ <td align="left">
+ {i.title}
+ {if:i.time_specific.value}
+ - {i.ticket_time.time}
+ {else:}
+
+ {end:}
+ </td>
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}
+ {if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ {a.selected} {a.unit_name}
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!--dates-->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {if:p.policy}
+ <div class="glmSection policy">
+ <div class="glmSectionName">
+ Please read and agree to our policy for this {term.performance.norm}.
+ </div>
+ <div class="glmBlockContent">
+ <p>{p.policy:h}</p>
+ </div>
+ <div class="glmSectionBold glmCartRequired">
+ <p>I agree to the policy stated above. <input class="glmPolicyCheckbox" type="checkbox" id="glmAgree" name="agree"></p>
+ </div>
+ </div>
+ {end:}
+</div>
+ {end:} <!--each performance-->
+ </div><!--/.glmCartEvents-->
+ <!-- glmCartVenueTotal - Sub totals for this venue -->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->
+ <div class="glmCartPayment">
+ <!-- If special requests possible -->
+ {if:c.ticket_spec_req.value}
+ <div class="glmSpecialRequests">
+ <div class="glmCartBlockSmallTitle">Please enter any special requests:</div>
+ <div class="glmCart"><input type="textarea" name="{c.id}_spec_req" value="{c.paymentForm.spec_req.value:h}"></div>
+ </div>
+ {end:}
+<!-- <div class="glmCartBlockSmallTitle">Payment for {term.ticket.plur} at {c.name}</div> -->
+
+ {if:!formData.centralPayment}
+ <div class="glmCartForm">
+<!--
+ {if:!cartHasOneVenueOnly}
+ <div class="glmCartSubTotals">
+ <div class="glmCartTable sub">
+ <div class="glmCartHeader">
+ <div class="glmCartText">Tickets</div>
+ <div class="glmCartText">Total</div>
+ </div>
+ <div class="glmCartValues">
+ <div class="glmCartText">{c.totalTickets}</div>
+ <div class="glmCartText">{c.totalPrice}</div>
+ </div>
+ </div>
+ </div>
+ {end:}
+-->
+ {if:c.paymentResult}
+ {if:c.paymentResult.approved}
+ <div class="glmCartBlockSTitle">Card Payment Approved</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div>{c.paymentResult.cctype}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div>{c.paymentResult.ccname}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div>{c.paymentResult.ccnumb}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div>{c.paymentResult.ccexp}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>
+ <div id="GLMnavigation">
+ <div id="GLMprintTickets" class="glmNavItem">{term.nav.print_vouchers}</div>
+ </div>
+ {else:}
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>
+ <ul><li>{c.paymentResult.description}</li></ul>
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>
+ {if:forceCheckoutPhase}
+ <div id="GLMnavigation">
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>
+ </div>
+ {end:}
+ {end:}<!--paymentResult approved-->
+ {end:}<!--paymentResult-->
+ {if:c.paymentResult.approved}
+ <p>Payment Accepted</p>
+ {else:}
+ {if:c.havePaymentMethod}
+ <!-- Payment type selection -->
+ <div class="glmCartBlockSmallTitle">
+ {if:c.havePayPal}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="pp"> PayPal
+ {else:}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="pp">
+ {end:}
+ {end:}
+ {if:c.haveCreditCards}
+ {if:c.havePayPal}
+
+ {end:}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="cc">
+ {end:}
+ {end:}
+ </div><!--/.glmCartBlockTitle-->
+ <!-- Credit Card Payment Form -->
+ {if:c.haveCreditCards}
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByCC" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByCC" class="">
+ {end:}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt" flexy:if="c.paymentForm.cctype.required">Total Charged to this Card</div>
+ <div class="glmCartFormInput">{c.totalPrice}</div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cctype.required">Card Type</div>
+ {if:c.paymentForm.cctype.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cctype.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="{c.id}_cctype">
+ <option value=""> </option>
+ {foreach:c.paymentForm.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccname.required">Name on Card</div>
+ {if:c.paymentForm.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccname" value="{c.paymentForm.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccnumb.required">Card Number</div>
+ {if:c.paymentForm.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccnumb" value="{c.paymentForm.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccexp.required">Expiration Date</div>
+ {if:c.paymentForm.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ Month
+ <select name="{c.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Year
+ <select name="{c.id}_ccyear">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cccode.required">Security Code</div>
+ {if:c.paymentForm.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_cccode" value="{c.paymentForm.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {end:}<!--haveCreditCards-->
+ {if:c.havePayPal}
+ <!-- PayPal Payment Form -->
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByPayPal" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByPayPal" class="">
+ {end:}
+ <div id="{c.id}_PayPal" memberID="{c.id}" class="glmPayPalButton">
+ <img src="{baseURL}common/EventManagement/front/MMM/assets/paypal_but6.gif"></a>
+ </div>
+ </span>
+ {end:}<!--havePayPal-->
+ {if:c.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+ {else:} <!-- havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+ {end:} <!-- havePaymentMethod -->
+ {end:} <!-- if payment not approved -->
+
+ </div> <!-- glmCartForm - Venue Payment -->
+ </div> <!-- glmCartPayment -->
+
+ {end:} <!-- if not central payment -->
+ </div> <!-- glmCartBlock -->
+ </div>
+ {end:} <!-- if Performances -->
+
+ {if:!cartRequiresPayment}
+ <input type="hidden" name="{c.id}_payTypeSelect" value="no">
+ {end:}
+
+ {end:} <!-- each venue -->
+
+{if:cartRequiresPayment}
+ {if:formData.centralPayment}
+
+ <div class="glmCartBlock paymentMethod">
+
+ {if:formData.centralPayment.havePaymentMethod}
+
+ {foreach:formData.centralPayment.paymentForm,p} <!-- This is a pseudo-loop since there should only be one entry. Keeps data consistent. -->
+
+ {if:p.cctype}
+ <!-- Credit Card Payment Form -->
+
+ <span id="{formData.centralPayment.id}_glmPayByCC" class="">
+ <div class="glmCartFormLine">
+ <div class="">
+ {if:formData.centralPayment.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{formData.centralPayment.id}" type="radio" name="{formData.centralPayment.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{formData.centralPayment.id}" type="hidden" name="{formData.centralPayment.id}_payTypeSelect" value="cc">
+ {end:}
+ </div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.cctype.required">Card Type</div>
+ <div class="glmCartFormInput">
+ <select name="{formData.centralPayment.id}_cctype">
+ <option value=""> </option>
+ {foreach:p.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccname.required">Name on Card</div>
+ {if:p.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_ccname" value="{p.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccnumb.required">Card Number</div>
+ {if:p.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_ccnumb" value="{p.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccexp.required">Expiration Date</div>
+ {if:p.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ Month
+ <select name="{formData.centralPayment.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Year
+ <select name="{formData.centralPayment.id}_ccyear">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.cccode.required">Security Code</div>
+ {if:p.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_cccode" value="{p.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {if:p.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {formData.centralPayment.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+
+ {end:} <!-- /Have Credit Cards -->
+ {end:} <!-- foreach payment -->
+
+ </div>
+
+ {else:} <!-- /havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+
+ {end:} <!-- /havePaymentMethod -->
+
+ {end:} <!-- Central Payment -->
+
+{end:} <!-- Cart Requires Payment -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <!-- glmCartBlock - A Venue -->
+ <div class="glmCartBlock completePurchase">
+ {if:cartRequiresPayment}
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">Complete Purchase</div>
+<!-- NOT DISPLAYING THESE NOW
+ <div id="GLMpolicy">
+ (purchase and return policies go here)
+ </div>
+ -->
+ <p style="padding-top: 45px;">
+ {ssl_seal_head_script:h}
+ {ssl_seal_body_script:h}
+ </p>
+ </div>
+ {else:}
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">No Payment Required</div>
+ </div>
+ {end:}
+ <div style="float: right;">
+ <div class="glmCartTable totals" style="float: right;">
+ {if:cartRequiresPayment}
+
+ <div class="glmCartHeader">
+ <div class="glmGrandTotals">
+ Grand Total {totals.price}
+ </div>
+
+ <!-- <div class="glmCartText">{term.prop.plur_cap}</div> -->
+ <!-- <div class="glmCartText grand">Grand Total</div> -->
+ <!-- </div> -->
+ <!-- <div class="glmCartValues"> -->
+ <!-- <div class="glmCartText">{totals.venues}</div> -->
+ <!-- <div class="glmCartText grand">{totals.price}</div> -->
+ </div>
+ {end:}
+ </div><!--/.glmCartTable-->
+ {if:!cartHasOneVenueOnly}
+<!-- <div class="glmCartBlockText">
+ NOTE: There will be a separate order number and a separate credit card transaction for each {term.prop.norm}.
+ </div> -->
+ {end:}
+
+ {if:adminUser}
+ <div>
+ <input id="AdminNoPaymentInfo" type="checkbox" name="AdminNoPayment" value="TRUE"> No payment info required for Admin User.
+ </div>
+ {if:noPaymentReasons}
+ <div id="AdminNoPaymentInfoReason">
+ Reason for no payment information required:<br>
+ <select name="no_payment_reason">
+ <option value=""></option>
+ {foreach:noPaymentReasons,p}
+ <option value="{p:h}">{p:h}</option>
+ {end:}
+ </select>
+ </div>
+ {end:}
+ {end:}
+
+ <div id="GLMcheckout" style="float: right;">
+ {if:!blockCheckout}
+ <a id="GLMcheckoutBtn" class="glmNavItemWide">{term.nav.purchase}</a>
+ {else:}
+ <a class="glmNavItemInactive">Unable to checkout - please see above.</a>
+ {end:}
+ </div>
+ </div>
+ </div>
+ </form>
+</div><!-- GLMcontent -->
+
+<!-- jQuery scripts for controlling page actions -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ baseSCRIPT="baseSCRIPT"
+ startURL="startURL"
+ baseURL="baseURL"
+>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ var checkoutButtonPressed = false;
+ var duration = 400;
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+
+ // Prevent multiple submissions
+ if (checkoutButtonPressed == true) {
+ return;
+ }
+
+ // Check policy acceptance
+ var needPolicyChecked = false;
+ $(".glmPolicyCheckbox").each(function() {
+ if (!$(this).is(':checked')) {
+ needPolicyChecked = true;
+ }
+ });
+
+ if (needPolicyChecked) {
+ alert('You must agree to our policies shown in red above to checkout.');
+ return false;
+ }
+
+ checkoutButtonPressed = true;
+ setBlocker();
+ $('#GLMcheckoutForm').submit();
+
+ });
+
+ // Navigation buttons
+ $('#GLMnavCart').on('click', function() { // Add to Cart
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = flex_startURL;
+ });
+
+ // Send user to PayPal payment when button is clicked
+ $('.glmPayPalButton').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=800, left=100, top=25";
+ PayPalWindow = window.open(flex_baseURL + "?Action=Shop_PayPal&memberID=" + memberID, "PayPalWindow",disp_setting);
+ PayPalWindow.focus();
+ });
+
+ // Show payment method input when selected
+ $('.glmSelectPayByCC').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByCC').show(duration);
+ });
+ });
+ $('.glmSelectPayByPayPal').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByPayPal').show(duration);
+ });
+ });
+
+ // Start with payment types hidden - only prompt showing
+ $('.glmPayTypes').hide(0);
+
+ // If No Payment Info is selected, then show reasons list
+ $('#AdminNoPaymentInfo').on('click', function() {
+ checkNoPaymentInfo();
+ });
+
+ // Show or hide no payment info reasons list
+ function checkNoPaymentInfo() {
+ if ($('#AdminNoPaymentInfo').is(':checked')) {
+ $('#AdminNoPaymentInfoReason').show(0);
+ } else {
+ $('#AdminNoPaymentInfoReason').hide(0);
+ }
+ }
+
+ // Check is reasons are shown on startup.
+ checkNoPaymentInfo();
+
+ // Show submit access blocker
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Complete Page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent" class="checkoutSuccess">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">Purchase Complete</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ <p>\r
+ <div \r
+ id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint"\r
+ style="float: none; text-align: center;"\r
+ >*** {term.nav.print_vouchers} for {c.name} ***</div>\r
+ </p>\r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ \r
+ <!-- Adobe Reader Download -->\r
+ \r
+ <div class="glmBlock">\r
+ <div class="glmBlockContentRight">\r
+ <a href="http://www.adobe.com/go/getreader" target="GetAdobeReader"><img src="{baseURL}common/EventManagement/front/TicketsFoundation/assets/get_adobe_reader.png"></a>\r
+ </div>\r
+ <div class="glmBlockContentLeft">\r
+ <small>\r
+ <p>\r
+ Adobe Reader is required to view and print your {term.voucher.plur}. Adobe Reader is a free program available directly from Adobe. \r
+ If you do not already have Adobe Reader installed, click the "Get Adobe Reader" link now.\r
+ </p>\r
+ </small>\r
+ </div>\r
+ <div class="glmBlockContent">\r
+ <small>\r
+ <p>\r
+ <b>If you are unable to print your {term.voucher.plur}, please print this page or write down the order number(s)\r
+ below and bring that to the ticket office when you arrive.</b>\r
+ </p>\r
+ ORDER #: \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ {c.paymentResult.orderID} \r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </small> \r
+ </div>\r
+ </div> \r
+ \r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{successText:h}</div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div class="glmCartBlockTitle">Contact Information</div>\r
+ <div class="glmCartForm">\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">First Name:</div><div class="glmCartFormInput">{formData.contact.fname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Last Name:</div><div class="glmCartFormInput">{formData.contact.lname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Address:</div><div class="glmCartFormInput">{formData.contact.addr1.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">{formData.contact.addr2.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">City:</div><div class="glmCartFormInput">{formData.contact.city.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">State:</div><div class="glmCartFormInput">{formData.contact.state.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Country:</div><div class="glmCartFormInput">{formData.contact.country.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">ZIP/Postal Code:</div><div class="glmCartFormInput">{formData.contact.zip.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Phone:</div><div class="glmCartFormInput">{formData.contact.phone.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">E-Mail address:</div><div class="glmCartFormInput">{formData.contact.email.value}</div></div> \r
+ {if:opt_field_1_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_1_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_1.value:h}</div></div> {end:}\r
+ {if:opt_field_2_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_2_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_2.value:h}</div></div> {end:}\r
+ {if:opt_field_3_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_3_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_3.value:h}</div></div> {end:}\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">\r
+ {if:formData.contact.email_ok}\r
+ You have asked us to send information on activities and offers. \r
+ {else:}\r
+ You have asked us to NOT send information on activities and offers.<br>\r
+ We will only contact you regarding this order.\r
+ {end:}\r
+ </div></div> \r
+ \r
+ </div> <!-- glmCartForm -->\r
+ \r
+ </div> <!-- glmCartBlock - Contact information -->\r
+ \r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ <div class="glmCartBlock">\r
+ \r
+ <div class="glmCartBlockTitle">{term.ticket.plur_cap} at: {c.name}</div>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+ <div class="glmCartVenueInfo">\r
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}\r
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}\r
+ \r
+ </div>\r
+\r
+ <div class="glmCartEvents">\r
+ \r
+ {foreach:c.performances,p} <!-- each performance for this date -->\r
+ \r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventInfoLeft">\r
+ <div class="glmCartBlockSubTitle">\r
+ {term.performance.cap}: <span class="glmCartBlockSubTitleValue">{p.name}</span>\r
+ </div>\r
+ <div class="glmCartBlockText">\r
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} --> \r
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <div class="glmCartBlockDates"> \r
+ {foreach:p.dates,d}\r
+ \r
+ <div class="glmCartBlockSubTitle">\r
+ {term.ticket.cap} date: \r
+ <span class="glmCartBlockSubTitleValue">\r
+ {if:d.dateSpecific}\r
+ {d.fullDate}\r
+ {else:}\r
+ Use any date\r
+ {if:c.likelyDate}\r
+ - Likely Date {c.likelyDate}\r
+ {end:}\r
+ {end:}\r
+ </span>\r
+ </div>\r
+ \r
+\r
+ {foreach:d.sections,s}\r
+ <table border="0" width="100%">\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ {if:!p.oneSectionOnly}\r
+ <th align="left">Section</th>\r
+ {end:}\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">\r
+ {i.selected}\r
+ </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left">{s.name}</td>\r
+ {end:}\r
+ <td align="left">\r
+ {i.title}\r
+\r
+ {if:i.date_specific.value}\r
+ - {i.start_date.date}\r
+ {if:i.time_specific.value}\r
+ {i.ticket_time.time}\r
+ {end:}\r
+ {else:}\r
+ {if:i.time_specific.value}\r
+ - {i.ticket_time.time}\r
+ {end:}\r
+ {end:}\r
+ </td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {if:i.descr}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td colspan="4">\r
+ {else:}\r
+ <td colspan="3">\r
+ {end:}\r
+ {if:option.cart_images}\r
+ {if:i.image}\r
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>\r
+ {end:}\r
+ {end:} \r
+ <div class="glmBlockContentLeft">{i.descr:h}</div>\r
+ </td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {if:i.show_addons} -->\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left"> </td>\r
+ {end:}\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {end:} -->\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td> </td>\r
+ {end:}\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ </table><!--/.glmCartTable-->\r
+ {end:}<!--sections-->\r
+ \r
+ \r
+ {end:} <!-- dates --> \r
+ \r
+ </div> <!-- dates -->\r
+ \r
+ </div>\r
+\r
+ {if:p.policy}\r
+ <div class="glmSection">\r
+ <div class="glmBlockContent">\r
+ <div class="glmCartBlockSubTitle">\r
+ Our policy for this {term.performance.norm}.\r
+ </div>\r
+ <p>{p.policy:h}</p>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} <!-- each performance -->\r
+ \r
+ </div>\r
+ \r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+\r
+ {if:!cartHasOneVenueOnly}\r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+ <div class="glmCartTotals">\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Sub Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText">{c.totalPrice}</div>\r
+ </div>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+\r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ \r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->\r
+ <div class="glmCartPayment">\r
+ \r
+ <!-- If special requests possible -->\r
+ {if:c.ticket_spec_req.value}\r
+ <div class="glmCartForm" style="margin-bottom: 1em;">\r
+ <div class="glmCartBlockTitle">Special requests:</div>\r
+ <div class="glmSpecialRequests">{c.paymentForm.spec_req.value:h}</div>\r
+ </div> \r
+ {end:}\r
+ \r
+ \r
+ {if:c.paymentResult}\r
+ <div class="glmCartForm">\r
+ {if:c.paymentResult.approved}\r
+ <div class="glmCartBlockTitle">Card Payment Approved</div>\r
+ \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div><div class="glmCartFormInput">{c.paymentResult.cctype}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div><div class="glmCartFormInput">{c.paymentResult.ccname}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div><div class="glmCartFormInput">{c.paymentResult.ccnumb}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div><div class="glmCartFormInput">{c.paymentResult.ccexp}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>\r
+ <div id="GLMnavigation">\r
+ <div id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint">{term.nav.print_vouchers}</div>\r
+ </div>\r
+ {else:}\r
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>\r
+ <ul><li>{c.paymentResult.description}</li></ul>\r
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>\r
+ {if:forceCheckoutPhase}\r
+ <div id="GLMnavigation">\r
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} \r
+ \r
+ </div> <!-- glmCartForm - Venue Payment -->\r
+ {end:}\r
+ \r
+ </div> <!-- glmCartPayment -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ {end:} <!-- each venue -->\r
+ \r
+ <div class="glmCartBlock totals">\r
+ {if:cartHasContents} \r
+ <div class="glmCartTotals">\r
+ <div class="glmCartBlockTitle totals">Cart Totals</div>\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText grand">Grand Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText grand">{totals.price}</div>\r
+ </div>\r
+ </div><!--/.glmCartTable-->\r
+ </div><!--/.glmCartTotals-->\r
+ {else:}\r
+ <P>Your cart is currently empty.</P> \r
+ {end:}\r
+ </div> <!-- glmCartBlock -->\r
+ \r
+</div><!-- GLMcontent -->\r
+\r
+{trackingScript:h}\r
+\r
+<!-- jQuery scripts for controlling page actions -->\r
+<flexy:toJavascript\r
+ flexy:prefix="flex_"\r
+ baseSCRIPT="baseSCRIPT"\r
+ startURL="startURL"\r
+ appAdminURL="appAdminURL"\r
+ \r
+>\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+\r
+ // Navigation buttons\r
+ $('#GLMnavCart').click(function() { // Add to Cart \r
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';\r
+ });\r
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection\r
+ window.location = flex_startURL;\r
+ });\r
+ \r
+ // Print vouchers\r
+ $('.voucherPrint').click(function(){ \r
+ \r
+ var orderID = $(this).attr('emOrderID');\r
+ var orderVerify = $(this).attr('emOrderVerify');\r
+ var voucherWindow = window.open(flex_baseSCRIPT + "&Action=Shop_printVoucher&OrderID=" + orderID + "&orderVerify=" + orderVerify, \r
+ "voucherPrint", \r
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"\r
+ );\r
+ voucherWindow.focus();\r
+ voucherWindow.print();\r
+ return false;\r
+\r
+ });\r
+\r
+ });\r
+\r
+</script>\r
+<flexy:include src="MMM/foot.html" />\r
--- /dev/null
+<h2>\r
+ <a href="{baseSCRIPT}&Action=Shop_printVoucher&OrderID={cartEntry.paymentResult.orderID}&orderVerify={cartEntry.paymentResult.orderVerification}">\r
+ Click here to reprint your {term.voucher.plur}\r
+ </a>\r
+</h2>\r
+\r
+<h3>\r
+<!-- Tickets Purchased at: {term.ticket.plur_cap} Purchased at:<br> -->\r
+ {cartEntry.name}\r
+</h3>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+<!-- {if:cartEntry.descr}<p>{cartEntry.descr:h}</p>{end:} -->\r
+ \r
+<table border="1" cellspacing="0" cellpadding="2">\r
+\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ <th align="left">{term.performance.cap}</th>\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+\r
+{foreach:cartForSummaryCentral,c}\r
+{foreach:c.performances,p} <!-- each performance -->\r
+ {foreach:p.dates,d} <!-- each date -->\r
+ {foreach:d.sections,s}\r
+ \r
+ \r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">{i.selected}</td>\r
+ <td align="left">{p.name:h}</td>\r
+ <td align="left">\r
+ {i.title:h}\r
+ {if:i.date_specific.value}\r
+ - {i.ticket_date.date}\r
+ {if:i.time_specific.value}\r
+ {i.ticket_time.time}\r
+ {end:}\r
+ {else:}\r
+ {if:i.time_specific.value}\r
+ - {i.ticket_time.time}\r
+ {end:}\r
+ {end:}\r
+\r
+ </td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ <td align="left"> </td>\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ <td> </td>\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ \r
+ \r
+ {end:} <!-- each section -->\r
+ {end:} <!-- each performance for this date -->\r
+{end:} <!-- each date for this venue -->\r
+\r
+ <tr>\r
+ <td colspan="4"> </td>\r
+ <td align="right">{c.totalPrice}</td>\r
+ </tr>\r
+\r
+<!-- \r
+ <tr>\r
+ <th align="right">{c.totalTickets}</th>\r
+ <td colspan="6"> </td>\r
+ <th align="right">{c.totalPrice}</th>\r
+ </tr>\r
+ -->\r
+ \r
+</table>\r
+\r
+ <!-- If special requests possible -->\r
+{if:c.ticket_spec_req}\r
+<p>\r
+ {c.paymentForm.spec_req.value:h}\r
+</p> \r
+{end:}\r
+\r
+{end:} \r
+\r
+{if:cartEntry.ticket_policy}<p>{cartEntry.ticket_policy:h}</p>{end:}\r
+\r
+<table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th>First Name:</th><td>{formData.contact.fname.value}</td></tr> \r
+ <tr><th>Last Name:</th><td>{formData.contact.lname.value}</td></tr> \r
+ <tr><th>Address:</th><td>{formData.contact.addr1.value}</td></tr> \r
+ <tr><th> </th><td>{formData.contact.addr2.value}</td></tr> \r
+ <tr><th>City:</th><td>{formData.contact.city.value}</td></tr> \r
+ <tr><th>State:</th><td>{formData.contact.state.value}</td></tr> \r
+ <tr><th>Country:</th><td>{formData.contact.country.value}</td></tr> \r
+ <tr><th>ZIP/Postal Code:</th><td>{formData.contact.zip.value}</td></tr> \r
+ <tr><th>Phone:</th><td>{formData.contact.phone.value}</td></tr> \r
+ <tr><th>E-Mail address:</th><td>{formData.contact.email.value}</td></tr> \r
+</table>\r
+ \r
+<p> \r
+ <table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th colspan="2" align="center">Credit Card Payment Approved</th></tr>\r
+ <tr><th align="left">Card Type</th><td>{cartEntry.paymentResult.cctype}</td></tr>\r
+ <tr><th align="left">Name on Card</th><td>{cartEntry.paymentResult.ccname}</td></tr>\r
+ <tr><th align="left">Card Number</th><td>{cartEntry.paymentResult.ccnumb}</td></tr>\r
+ <tr><th align="left">Expiration Date</th><td>{cartEntry.paymentResult.ccexp}</td></tr>\r
+ <tr><th align="left">Authorization Code</th><td>{cartEntry.paymentResult.authCode}</td></tr>\r
+ </table>\r
+</p> \r
+ \r
+<!-- is this needed? <flexy:include src="MMM/foot.html" /> -->\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Section Selection Page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">{term.section.cap} Selection</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem">{term.nav.show_selected}</a>\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+\r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{sectionText:h}</div>\r
+\r
+{if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+{end:}\r
+\r
+ <p>You have selected</p>\r
+ <div class="glmSection">\r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">{performanceDetail.member_name}</div><br> \r
+ <div class="glmBlockName">{performanceDetail.name}</div>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+<!-- <p><span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</p> -->\r
+<!-- <p>{performanceDetail.descr:h}</p> -->\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <!-- List of available sections -->\r
+ <hr />\r
+ <p>Please select from the following</p>\r
+ <div class="glmSection">\r
+{foreach:sectionList,x} \r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">\r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}">{x.name}</a>\r
+ </div> \r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}" class="glmNavItem">{term.nav.select}</a>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+ <p><span class="glmBold">{term.section.cap}</span>: {x.member_name}</p>\r
+ <p>{x.descr:h}</p>\r
+ </div>\r
+ </div> \r
+{end:}\r
+ \r
+ </div>\r
+\r
+</div> <!-- /GLMcontent -->\r
+\r
+ {startScript:h}\r
+\r
+ $(document).ready(function(){ \r
+\r
+ // Code to kick off the geolocation-display feature \r
+ $("#locationMap").geolocate({\r
+ lat: "#lat",\r
+ lng: "#lon",\r
+ mapOptions: {\r
+ disableDefaultUI: false,\r
+ mapTypeControl: true,\r
+ mapTypeId: "roadmap",\r
+ zoom: 12\r
+ },\r
+ markerOptions: {\r
+ draggable: false,\r
+ title: "This is your selected location"\r
+ }\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+<flexy:include src="MMM/foot.html" />\r
--- /dev/null
+
+
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ <div class="glmBlockContentRight">
+ <div id="locationMap_{m.id}" class="GLMmapWindow" data-member-id="{m.id}">(map loads here)</div>
+ <form>
+ <input type="hidden" id="lat_{m.id}" value="{m.lat}">
+ <input type="hidden" id="lon_{m.id}" value="{m.lon}">
+ </form>
+ </div><!--/.glmBlockContentRight-->
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>
+ <div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date} through {p.end_date.date}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:!showTickets}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a>
+ {end:}
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value}, {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.event.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{introText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>Please select from the following</p>
+{if:showTickets}
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+<!-- <input type="hidden" name="PerformanceID" value="{performanceDetail.id}"> -->
+<!-- <input type="hidden" name="SectionID" value="{sectionDetail.id}"> -->
+{end:}
+ <!-- List of Locations -->
+ {foreach:membersList,m}
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:m.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{m.image}"></div>
+ {end:}
+ {end:}
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ {if:option.select_images}
+ {if:p.image}
+ <div class="startContent startContentLeft">
+ {else:}
+ <div class="startContent">
+ {end:}
+ {else:}
+ <div class="startContent">
+ {end:}
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+<!-- <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>-->
+ {if:p.start_date.timestamp}<div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date}{if:p.end_date.timestamp} - {p.end_date.date} {end:}</div>{end:}
+ <div class="glmDescr">{p.short_descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:p.image}
+ <div class="startImage startImageRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ {end:}
+ {if:!showTickets}
+<!-- <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a> -->
+ {end:}
+
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value} {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
+{if:showTickets}
+ <div id="GLMselect">
+ <a id="GLMselectButton" class="glmNavItemWide">{term.nav.select}</a>
+ </div>
+ </form>
+{end:}
+</div><!-- /GLMcontent -->
+<!--</div> -->
+{startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ </p>\
+ ';
+
+
+
+ $(document).ready(function(){
+
+ // Code to kick off the geolocation-display feature
+ function doLocationMap(id) {
+ $("#locationMap_" + id).geolocate({
+ lat: "#lat_" + id,
+ lng: "#lon_" + id,
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ }
+ {foreach:membersList,m}
+ doLocationMap({m.id});
+ {end:}
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDate_' + ticket.id).html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_inv_array[' + dateData['date'] + ']" value="' + dateData.id + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+// *** NEED TO FIX REFERENCE TO "performanceDetail" since that's not available on this page
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate);
+ } else {
+
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ $('#GLMselectButton').click(function() {
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+Anthony changes for "use any date" or whatever
+--This line, and those below, will be ignored--
+
+M checkout.html
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+
+<flexy:include src="MMM/head.html" />
+
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent" class="ticketOpt">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Ticket Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketOptText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>You have selected</p>
+ <!-- List of Ticket Options -->
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">{term.prop.cap}: {performanceDetail.member_name}</div>
+<!-- <div class="glmDescr">{term.order.cap} up to: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</div> -->
+ <!--<p>{performanceDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{sectionDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <!--<p>{sectionDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{ticketDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ {if:!ticketDetail.date_specific.value}
+ <div class="glmDescr">Use any date {if:ticketDetail.start_date.timestamp} from {ticketDetail.start_date.date} to {ticketDetail.end_date.date}{end:}</div>
+ {end:}
+ {if:!ticketDetail.time_specific.value}
+ <div class="glmDescr">Use any time</div>
+ {else:}
+ <div class="glmDescr">Time: {ticketDetail.ticket_time.time}</div>
+ {end:}
+ {if:!ticketDetail.unlimted_use.value}
+ <!-- <div class="glmDescr">Each {term.ticket.norm} may be used {ticketDetail.uses} time(s)</div> -->
+ {else:}
+ <div class="glmDescr">Each {term.ticket.norm} may be used an unlimited number of times</div>
+ {end:}
+ <div class="glmDescr">{ticketDetail.descr:h}</div>
+ </div>
+ </div>
+ </div>
+ <!-- Date and quantity selection -->
+ <p>Please select from the following.</p>
+ <div class="glmSection">
+ <div id="GLMeventDateSelectBlock">
+ <div id="GLMeventDateSelect" class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">Select desired date:</div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInputShort"><input type="text" id="GLMeventDate" name="ticket_date" value=""> (click in field to set date)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr quant">Select Quantity:</div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer">(please select date first)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {if:reason}<div id="GLMaddToCart" name="ticket">(disabled - please see above)</div>{else:}<div id="GLMaddToCart" class="glmNavItem add" name="ticket">{term.nav.add_to_cart}</div>{end:}
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ // Whether ticket has date specific inventory
+ var dateSpecific = {ticketDetail.date_specific.value} + 0;
+
+ // Dates for inventory data
+ var dates = {inventoryJSON:h};
+
+ $(document).ready(function(){
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+ var dateData = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector" name="quant"><option value="0"></option>[ticket-quants]</select>\
+ ';
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least {detail.performance.purch_leadtime} hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ </p>\
+ ';
+ var selectedInv;
+ var ticketQuants;
+ var addButtonPushed = false;
+
+ // Start by counting the number of dates to see if we have only 1
+ var dateCount = 0;
+// if (dateSpecific) {
+ $.each(dates, function(index, date) {
+ dateCount = dateCount + 1;
+ dateData = date;
+ });
+// }
+ // if there's no date specific tickets
+ if (!dateSpecific) {
+ // Populate date input field
+ $('#GLMeventDateSelectBlock').html('<input type="hidden" name="ticket_date" value="0">');
+ doQuantSelection();
+ // if there's only one date, then display that and move on.
+ } else if (!dateSpecific || dateCount == 1) {
+ // populate date input field
+ $('#GLMeventDate').val(dateData['date']);
+ $('#GLMtickets').html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_date" value="' + dateData['date'] + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+
+ doQuantSelection();
+ } else {
+ // Use the date picker to select a date
+ dateData = false;
+ $("#GLMeventDate").datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Update input message
+ $('#GLMdateMessage').html('<br />');
+
+ // Get data for the selected date
+ dateData = dates[selectedDate];
+ doQuantSelection();
+ } // Date Selection
+
+ }); // Date Picker
+
+ }
+
+ function doQuantSelection() {
+ // Build the ticket quant options
+ ticketQuants = '';
+ var selectMax = dateData['available'];
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+ var tooLate = dateData['tooLate'];
+ if (tooLate) {
+ $('#GLMticketQuantContainer').html(ticketTooLate);
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ $('#GLMticketQuantContainer').html(ticketQuantSelection.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+// doAddToCartSetup();
+ }
+
+// function doAddToCartSetup() {
+ // Add to cart action
+ $('#GLMaddToCart').click(function() {
+ if (addButtonPushed) {
+ return;
+ }
+ var reason = '';
+ // Check date
+ if (dateData) {
+ selectedInv = dateData.id;
+ } else {
+ reason = reason.concat('* You need to select a date first.\n');
+ }
+ // Check quantity
+ var selectedQuant = (parseInt($('#glmQuantSelector').val()) + 0);
+ if (selectedQuant == 0) {
+ reason = reason.concat('* You need to select a quantity first.\n');
+ }
+ // Check if there's a reason we can't add this to the cart yet
+ if (reason != '') {
+ alert(reason);
+ return;
+ }
+ // Adding to cart
+ addButtonPushed = true;
+ $("#GLMeventDate").datepicker('disable');
+ $('#glmQuantSelector').prop('disabled', 'disabled');
+ setBlocker();
+ // Submit to cart
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=add&PerformanceID={performanceDetail.id}&SectionID={sectionDetail.id}&TicketID={ticketDetail.id}&ticket_inv=" + selectedInv + "&quant=" + selectedQuant;
+
+ });
+// }
+ // Code to kick off the geolocation-display feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ // Navigation buttons
+ $('#GLMnavCart').click(function() { // Add to Cart
+ window.location = '{baseSCRIPT}&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = '{startURL:h}';
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent" class="ticketSelect">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.ticket.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketText:h}</div>
+{if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+{end:}
+ <p>You have selected</p>
+ <!-- List of Tickets -->
+
+
+{foreach:sections,s}
+ <div class="glmSection">
+ <div class="glmBlock">
+
+
+ <div class="glmBlockContent">
+ {if:performanceDetail.image}
+ <div class="glmBlockContentRight ticketSelectImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{performanceDetail.image}"></div>
+ <div class="glmBlockContentLeft ticketSelectContent">
+ {else:}
+ <div class="ticketSelectContent">
+ {end:}
+
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.member_name:h}</div><br>
+ <div class="glmBlockName">{performanceDetail.name:h}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}
+-->
+ </div>
+
+ {if:performanceDetail.descr}
+ {performanceDetail.descr:h}
+ {end:}
+ </div> <!-- description -->
+ </div> <!-- member data left -->
+ </div> <!-- glmBlockContent -->
+ </div> <!-- glmBlock -->
+ </div> <!-- sections -->
+ <!-- List of Available Events -->
+ <div id="GLMselect" style="float: right;">
+ <a class="GLMselectButton glmNavItem">{term.nav.select}</a>
+ </div>
+ <p class="GLMTicketSelectExtraText">Please select from the following. If you do not see the number of tickets available that you require, please select a different date or time.</p>
+ <div class="glmSection ticketOptionList">
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+ <input type="hidden" name="PerformanceID" value="{performanceDetail.id}">
+ <input type="hidden" name="SectionID" value="{sectionDetail.id}">
+ {foreach:s.ticketsData,x}
+ {if:!x.tooLateToBuy}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockContentRight">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div> <!-- glmBLockContentRight -->
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={performanceDetail.id}&SectionID={x.section_id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ {end:}
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:x.descr}
+ <p>{x.short_descr:h}</p>
+ {end:}
+ <p>
+ {if:!x.date_specific.value}
+ {if:x.start_date.timestamp} Date: {x.start_date.date}{end:}{if:!x.start_end_dates_same} to {x.end_date.date}{end:}{if:!x.time_specific.value} {end:}
+ {end:}
+ {if:!x.time_specific.value}
+
+ {else:}
+ Time: {x.ticket_time.time}
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </p>
+ </div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ </div><!--/.glmBlock-->
+ {end:}
+ {end:}
+ <div id="GLMselect">
+ <a class="GLMselectButton glmNavItem">{term.nav.select}</a>
+ </div>
+ </form>
+ </div> <!-- glmSection -->
+
+{end:}
+
+</div> <!-- /GLMcontent -->
+
+{if:option.ticket_selection.include_options_in_ticket_list}
+ <!-- jQuery scripts for controlling page actions -->
+ {startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least [hours] hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ ';
+
+
+ $(document).ready(function(){
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ if (ticket.haveFutureInventory) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html(' \
+ <div class="glmTicketsSelectPrompt">Date Available: </div> \
+ <div class="glmTicketsSelectValue"> \
+ <div class="glmInput"> \
+ ' + dateData.ticket_date.date + ' \
+ <input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '"> \
+ </div> \
+ </div>');
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ var mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ if (inventory[mdy]['tooLate']) {
+ return [false,"","Not Available"];
+ } else {
+ return [true,"","Available"];
+ }
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ if($('#GLMeventDateInput_' + ticket.id).length > 0) {
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: ticket.startDate,
+ maxDate: ticket.endDate,
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+ }
+
+ }
+
+ } // if have future inventory
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate.replace(/\[hours\]/g, {performanceDetail.purch_leadtime}));
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ var selectButtonPressed = false;
+
+ $('.GLMselectButton').click(function() {
+ // Prevent multiple submissions
+ if (selectButtonPressed == true) {
+ return;
+ }
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+ if( $(window).width() < 768 ){
+ $('.glmBlock').not(":first").each(function() {
+ var left = $(this).find( $('.glmBlockContentLeft') );
+ left.prependTo( $(this) ).find( $('glmBlockContentRight') );
+ });
+ }
+ });
+ </script>
+{end:}
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!-- Footer content for all Front-End pages -->
+{if:option.development}
+ <p id="glmDevelopmentNotice">
+ Running on Development Server:
+ <span style="float: right;">
+ <a href="{baseSCRIPT}&session_reset=true">Reset Session</a>
+ </span>
+ </p>
+{end:}
\ No newline at end of file
--- /dev/null
+<!-- Header content for all Front-End pages -->
+{startScript:h}
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAppURL = '{baseAppURL}';
+</script>
+{if:!jQueryLoaded}
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+{end:}
+{if:!jQueryUiLoaded}
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+{end:}
+<script type="text/javascript" src="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.js?serial={timestamp}"></script>
+<script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>
+<link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.css">
+{if:customCssFile}
+ <!-- local css overrides for the current site -->
+ <link rel="stylesheet" type="text/css" href="{customCssFile}">
+{end:}
+{if:frontDebug}
+ <!-- This is simply here as something for jQuery code to check if we're doing debug -->
+ <div id="EMadminDebug"></div>
+{end:}
+{startScript:h}
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25";
+ {if:frontDebug}
+ debugWindowFront = window.open("{baseURL}index.php?Action=Debug_update","emDebugWindowFront",disp_setting);
+ {end:}
+</script>
+
+<div id="glmReloadBlocker" class="glmPageLoadBlockerHidden">
+ <div>Updating your information<br>Please wait ...</div>
+</div>
+
+ {if:adminUser}
+ <h2 style="border: 1px solid black; text-align: center;">Purchasing By Admin User</h2>
+ {end:}
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+
+ <h1>PLEASE NOTE:</h1>
+
+ <p>
+ There is no general access to this site.
+ All access to this site should be through an appropriate link.
+ If you arrived here by mistake (or exploring), nothing but this message will be displayed.
+ If you have any concerns about this site, please contact Gaslight Media.
+ </p>
+
+ <p>
+ Gaslight Media<br>
+ 120 East Lake Street<br>
+ Petoskey, MI 49770<br>
+ <br>
+ Phone: 231-487-0692<br>
+ E-Mail: info@gaslightmedia.com<br>
+ Web: http://www.gaslightmedia.com
+ </p>
+
+ </body>
+
+</html>
+
+
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body id="debugBody">\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="updateTimestamp">\r
+ <b>Updated:</b> {debugUpdateTime}\r
+ </div> \r
+ <div id="debugBody">\r
+ {debugData:h}\r
+ </div>\r
+ </body>\r
+ \r
+ {startScript:h}\r
+ \r
+ // Reload the current window with Action = Debug_update\r
+ function reloadDebugWindow()\r
+ {\r
+ window.location("{baseSCRIPT}&Action=Debug_update");\r
+ }\r
+ \r
+ </script> \r
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body>\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="debugData">Debug Startup</div>\r
+ </body>\r
+</html>
\ No newline at end of file
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Your PayPal payment has been approved.</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ Your cart will now reflect that the payment has been made.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Unable to process your payment!</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ <div class="glmCartFormPrompt glmCartRequired">Sorry, there was a problem.</div>\r
+ </p>\r
+ \r
+ <p>\r
+ We were unable to find your purchase information and are therefore \r
+ are unable to process your payment through PayPal. This could be\r
+ due to you not performing any action with your pending purchase\r
+ for too long. Please click the "Return to selected tickets" button\r
+ at the top of the checkout page to see if your selections are still listed.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Additional Info Page
+-->
+<flexy:include src="MMM/head.html" /> <!-- Note direct reference to interface type -->
+
+<form id="cartForm" action="">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a> <!-- sends user to cart page -->
+ {if:!option.ticket_shop.start_at_cart}
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to start of shop -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{cartText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+
+ <!-- Problem display -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <h2>We're sorry, we had a problem with your request:</h2>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+ <!-- Cart Contents -->
+
+{foreach:cart,c} <!-- each venue -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="large-12 columns"><h2>{c.name:h}</h2></div>
+ </div>
+ {end:}
+
+
+ <!-- If we need to assign this ticket to be sold in another venue or we need to ask for likely date of use -->
+
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ <p>
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange glmTicketDateInput"> mm/dd/yyyy
+ {if:text.cart.select_likely_date_explain}
+ <br>{text.cart.select_likely_date_explain}
+ {end:}
+ </p>
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+{end:} <!-- /each venue -->
+
+ <!-- Cart Summary and Checkout Button -->
+
+{if:cartHasContents}
+ <div class="row">
+ <div class="large-12 columns text-right">
+ {if:!blockCheckout}
+ <a class="small button right radius buttonTickets buttonTicketsGo" id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" >{term.nav.checkout}</a>
+ {else:}
+ <a class="small button right radius alert disabled buttonTickets">Please complete the items in RED above.</a>
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{else:}
+ <div class="row">
+ <div class="large-12 columns">
+ <p class="right">Your cart is currently empty.</p>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{end:}
+
+</form> <!-- /cartForm -->
+
+<!-- Set some flexy page parameters for use in JAVAscript -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ vertScroll="vertScroll"
+ addtionalInfoPage="option.ticket_shop.additionalInfo.use_page"
+>
+
+<!-- jQuery scripts for controlling page actions -->
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365,
+ beforeShow: function(){
+ $(".ui-datepicker").css('font-size', 12)
+ }
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = flex_startURL;
+ });
+
+ if (flex_vertScroll) {
+ window.scrollTo(0, flex_vertScroll);
+ }
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" /> <!-- Note direct reference to interface type -->
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Cart Page
+-->
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <form id="cartForm" action="">
+ <!-- GLMpageTitle - A title for this page -->
+ <!--<div id="GLMpageTitle">Selected {term.performance.plur_cap} and {term.ticket.plur_cap}</div>-->
+ <div id="GLMHeader">
+<!-- <div id="GLMpageTitle">Cart</div> -->
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+<!-- <a class="glmNavItem cart" style="margin-right: 1em;">Reprint a previous {term.order.cap}: <input id="reprintVoucher" type="text" style="width: 6em; font-size: .8em;"></a> -->
+ </div>
+ </div>
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{cartText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ {if:havePromoCodes}
+ <div class="glmCartBlock">
+ <div class="glmCartFormInput">
+ <div class="glmCartText" style="width: auto;">If you have a {term.promo.norm}, please enter it here: </div><input id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
+ </div>
+ </div>
+ {end:}
+ {foreach:cart,c}<!-- each venue -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockSmallTitle">{c.name:h}</div>
+ <div class="glmCartEvents">
+ {foreach:c.performances,p} <!-- each performance for this date -->
+ <div class="glmCartEvent" style="margin-bottom: 2em;">
+ <div class="glmCartEventInfo">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem" style="position: relative; top: 0px;">{term.nav.select_more_of_these}</a>
+ <!--<a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem" style="position: relative; top: 0px;">{term.nav.select_more_of_these}</a>-->
+ {end:}
+ <div class="glmCartEventInfoLeft">
+
+ <div class="glmCartEventTitle">{c.name:h} - {p.name}</div>
+ <div class="glmDescr">
+ {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile">{p.short_descr:h}</div>{end:}
+ {if:option.cart_images}{if:p.image}
+ <img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">
+ {end:}{end:}
+ </div>
+ </div>
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%" style="padding-right: .5em;">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ <input class="glmCartQuant" type="number" id="ticket_{i.invID}" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}">
+ </td>
+ {if:!p.oneSectionOnly}
+ <td class="glmCartTicketName" align="left">{s.name}</td>
+ {end:}
+ <td class="glmCartTicketTitle" align="left">
+ {i.title}
+ {if:false}
+ {if:i.date_specific.value}
+ - {i.start_date.date}
+ {if:i.time_specific.value}
+ {i.ticket_time.time}
+ {end:}
+ {else:}
+ {if:i.time_specific.value}
+ - {i.ticket_time.time}
+ {end:}
+ {end:}
+ {end:}
+ </td>
+ <td class="glmCartTicketPrice" align="right" style="padding-right: .5em;">{if:i.show_price}{i.price}{end:}</td>
+ <td class="glmCartTicketExtended" align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.problem}
+ <tr>
+ <td> </td><td class="glmCartRequired">{i.problemText}</td>
+ </tr>
+ {end:}
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}{if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}{end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ <input class="glmCartQuant" type="number" id="addon_{a.id}" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units=" {a.name}" value="{a.selected}">
+ </div>
+ <div class="cartAddonDescr">{a.descr:h}</div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!-- dates -->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {end:} <!--performances-->
+ </div><!--/.glmCartEvents-->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+
+{if:option.ask_for_assignment_and_likely_date}
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange"> mm/dd/yyyy
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+{end:}
+
+
+ </div> <!-- glmCartBlock -->
+ {end:}<!-- each venue -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <div class="glmCartBlock totals">
+ {if:cartHasContents}
+ <div class="glmGrandTotals">
+ Grand Total {totals.price}
+ </div>
+ <div class="glmCartWide">
+ {if:totals.tickets}
+<!-- {if:!blockCheckout} -->
+ <a id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" class="glmNavItem">{term.nav.checkout}</a>
+<!-- {else:}
+ <a class="glmNavItemInactive">Please complete the items in RED above.</a>
+ {end:} -->
+ {else:}
+ <a class="glmNavItemInactive">Your cart is currently empty.</a>
+ {end:}
+ </div>
+ {else:}
+ <P>Your cart is currently empty.</P>
+ {end:}
+ </div> <!-- glmCartBlock -->
+
+ {if:option.cart_promotions}
+ <div class="glmCartBlock">
+ You may also be interested in ...<br>
+ {foreach:cartPromotions,p}
+ <div class="glmBlockContent" style="margin-bottom: 2em;">
+ <div class="glmCartBlockTitle" style="margin-top: .5em;"><a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={p.id}">{p.member_name:h} - {p.name:h}</a></div>
+ {if:p.image}
+ <div class="glmBlockContentRight cartImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ <div class="glmBlockContentLeft cartContent">
+ {if:p.start_date}
+ <p>
+ Dates: {p.start_date.date}
+ </p>
+ {end:}
+ <!-- PER REQUEST, WE'RE NOW JUST SHOWING SHORT DESCR HERE -->
+ {if:p.short_descr}<div class="glmCartEventDescr promoDescr">{p.short_descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile promoDescrMobile">{p.short_descr:h}</div>{end:}
+ </div>
+ </div>
+ {end:}
+ </div>
+ {end:}
+
+
+ </form>
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Convert input fields to select lists
+ $('.glmCartQuant').each(function() {
+
+ var id = $(this).attr('id');
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var max = $(this).attr('data-max');
+ var value = $(this).attr('value');
+ var units = $(this).attr('data-units');
+ var numbSel = '';
+
+ // Build a picklist for this input
+ for (var i = 0 ; i {lte:h} max ; i++) {
+ if (value == i) {
+ numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
+ } else {
+ numbSel = numbSel.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ }
+
+ $('#quant_' + id).html('<select id="' + id + '" class="glmCartSelect" data-ticket="' + ticket + '" data-addon="' + addon + '">' + numbSel + '</select>' + units);
+
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a cart value changes, submit it as a cart update.
+ $('.glmCartSelect').change(function() {
+ vertScroll = getVertScroll();
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var value = $(this).val();
+
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update&ticket_inv=" + ticket + "&addon=" + addon + "&quant=" + value + "&vertScroll=" + vertScroll;
+
+ });
+
+ // When there's a change in the promo code input, submit it.
+ $('#promoCodeInput').change(function() {
+ var value = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=promo_code&promo_code=" + value;
+ });
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = '{startURL:h}';
+ });
+
+/* Not using right now
+ // Reprint order button
+ $('#reprintVoucher').on('keypress', function(event) {
+ if(event.which == '13'){
+ var orderID = $(this).val();
+ var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucher&OrderID=' + orderID,
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ }
+ });
+*/
+
+ if ({vertScroll}) {
+ window.scrollTo(0,{vertScroll});
+ }
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Page
+-->
+
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Selected {term.ticket.plur_cap}</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{checkoutText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ <p>See below for more information.</p>
+ </div>
+ {end:}
+ <form id="GLMcheckoutForm" action='{baseSCRIPT}&Action=Shop_checkoutSubmit' method="POST">
+ <input type="hidden" name="Action" value="Shop_checkoutSubmit">
+ <!-- glmCartBlock - Contact information - Container for all general customer information -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">Contact Information</div>
+ <!-- glmCartForm - A container for a block of form input with prompts-->
+ <div class="glmCartForm">
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ {if:formData.contact.fname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.fname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="fname" value="{formData.contact.fname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ {if:formData.contact.lname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.lname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="lname" value="{formData.contact.lname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ {if:formData.contact.addr1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr1" value="{formData.contact.addr1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr2.required"> </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr2.required"> </div>
+ {if:formData.contact.addr2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr2" value="{formData.contact.addr2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.city.required">{text.cart.checkout.city}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.city.required">{text.cart.checkout.city}: </div>
+ {if:formData.contact.city.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.city.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="city" value="{formData.contact.city.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.state.required">{text.cart.checkout.state}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.state.required">{text.cart.checkout.state}: </div>
+ {if:formData.contact.state.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.state.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="state">
+ <option value=""> </option>
+ {foreach:formData.contact.state.states,s}
+ {if:s.stateSelected}
+ <option value="{s.stateID}" selected>{s.stateName:h}</option>
+ {else:}
+ <option value="{s.stateID}">{s.stateName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.country.required">{text.cart.checkout.country}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.country.required">{text.cart.checkout.country}: </div>
+ {if:formData.contact.country.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.country.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="country">
+ <option value=""> </option>
+ {foreach:formData.contact.country.countries,s}
+ {if:s.countrySelected}
+ <option value="{s.countryID}" selected>{s.countryName:h}</option>
+ {else:}
+ <option value="{s.countryID}">{s.countryName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ {if:formData.contact.zip.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.zip.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="zip" value="{formData.contact.zip.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ {if:formData.contact.phone.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.phone.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="phone" value="{formData.contact.phone.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email.required">{text.cart.checkout.email}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email.required">{text.cart.checkout.email}: </div>
+ {if:formData.contact.email.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email" value="{formData.contact.email.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ {if:formData.contact.email2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email2" value="{formData.contact.email2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt">Receive E-Newsletter?</div>
+ {if:formData.contact.email_ok}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok" checked>
+ {else:}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok">
+ {end:}
+ Please sign me up to receive Stafford's Hospitality e-newsletter.
+ </div>
+ </div><!--/.glmCartFormLine-->
+
+ {if:opt_field_1_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ {if:formData.contact.opt_field_1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_1" value="{formData.contact.opt_field_1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_2_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ {if:formData.contact.opt_field_2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_2" value="{formData.contact.opt_field_2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_3_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ {if:formData.contact.opt_field_3.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_3.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_3" value="{formData.contact.opt_field_3.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+
+
+ </div> <!--/.glmCartForm-->
+ </div><!--/.glmCartBlock-->
+
+ {foreach:cart,c} <!-- each venue -->
+ {if:c.performances}
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">{term.prop.cap}: {c.name:h}</div>
+ <!-- glmCartVenueInfo -->
+<!--
+ <div class="glmCartVenueInfo">
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}
+ </div>
+-->
+ <div class="glmCartEvents">
+
+ {foreach:c.performances,p} <!-- each performance for this date -->
+<div class="glmCartBlock">
+ <div class="glmCartEvent">
+ <div class="glmCartEventInfo">
+ <div class="glmCartEventInfoLeft">
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmCartBlockText">
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} -->
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}
+ </div><!--/.glmCartBlockText-->
+ </div><!--/.glmCartEventInfoLeft-->
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ <div class="glmDescr">
+ <span class="glmCartBlockSubTitleValue">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </span>
+ </div><!--/./glmCartBlockSubTitle-->
+
+
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ {i.selected}
+ </td>
+ {if:!p.oneSectionOnly}
+ <td align="left">{s.name}</td>
+ {end:}
+ <td align="left">
+ {i.title}
+ {if:d.dateSpecific}
+ - {d.fullDate}
+ {end:}
+ {if:i.time_specific.value}
+ <!-- NOT SHOWING TIME RIGHT NOW - {i.ticket_time.time} -->
+ {else:}
+
+ {end:}
+ </td>
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}
+ {if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ {if:a.selected}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ {a.selected} {a.unit_name}
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ {end:}
+ <!-- {end:} -->
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!--dates-->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {if:p.policy}
+ <div class="glmSection">
+ <div class="glmSectionName">
+ Please read and agree to our policy for this {term.performance.norm}.
+ </div>
+ <div class="glmBlockContent">
+ <p>{p.policy:h}</p>
+ </div>
+ <div class="glmSectionBold glmCartRequired">
+ {if:adminUser}
+ <input type="hidden" id="glmAgree" name="agree" value="on">
+ <p class="policyAgreementDescr">(Agree to policy not required for admin users)</p>
+ {else:}
+ <p class="policyAgreementLabel">I agree to the policy stated above. <input class="glmPolicyCheckbox" type="checkbox" id="glmAgree" name="agree"></p>
+ {end:}
+ </div>
+ </div>
+ {end:}
+</div>
+ {end:} <!--each performance-->
+ </div><!--/.glmCartEvents-->
+ <!-- glmCartVenueTotal - Sub totals for this venue -->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->
+ <div class="glmCartPayment">
+ <!-- If special requests possible -->
+ {if:c.ticket_spec_req.value}
+ <div class="glmSpecialRequests">
+ <div class="glmCartBlockSmallTitle">Please enter any special requests:</div>
+ <div class="glmCart"><input type="textarea" name="{c.id}_spec_req" value="{c.paymentForm.spec_req.value:h}"></div>
+ </div>
+ {end:}
+<!-- <div class="glmCartBlockSmallTitle">Payment for {term.ticket.plur} at {c.name}</div> -->
+
+ {if:!formData.centralPayment}
+ <div class="glmCartForm">
+<!--
+ {if:!cartHasOneVenueOnly}
+ <div class="glmCartSubTotals">
+ <div class="glmCartTable sub">
+ <div class="glmCartHeader">
+ <div class="glmCartText">Tickets</div>
+ <div class="glmCartText">Total</div>
+ </div>
+ <div class="glmCartValues">
+ <div class="glmCartText">{c.totalTickets}</div>
+ <div class="glmCartText">{c.totalPrice}</div>
+ </div>
+ </div>
+ </div>
+ {end:}
+-->
+ {if:c.paymentResult}
+ {if:c.paymentResult.approved}
+ <div class="glmCartBlockSTitle">Card Payment Approved</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div>{c.paymentResult.cctype}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div>{c.paymentResult.ccname}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div>{c.paymentResult.ccnumb}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div>{c.paymentResult.ccexp}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>
+<!-- CPS: Remove Vouchers
+ <div id="GLMnavigation">
+ <div id="GLMprintTickets" class="glmNavItem">{term.nav.print_vouchers}</div>
+ </div>
+-->
+ {else:}
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>
+ <ul><li>{c.paymentResult.description}</li></ul>
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>
+ {if:forceCheckoutPhase}
+ <div id="GLMnavigation">
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>
+ </div>
+ {end:}
+ {end:}<!--paymentResult approved-->
+ {end:}<!--paymentResult-->
+ {if:c.paymentResult.approved}
+ <p>Payment Accepted</p>
+ {else:}
+ {if:c.havePaymentMethod}
+ <!-- Payment type selection -->
+ <div class="glmCartBlockSmallTitle">
+ {if:c.havePayPal}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="pp"> PayPal
+ {else:}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="pp">
+ {end:}
+ {end:}
+ {if:c.haveCreditCards}
+ {if:c.havePayPal}
+
+ {end:}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="cc">
+ {end:}
+ {end:}
+ </div><!--/.glmCartBlockTitle-->
+ <!-- Credit Card Payment Form -->
+ {if:c.haveCreditCards}
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByCC" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByCC" class="">
+ {end:}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt" flexy:if="c.paymentForm.cctype.required">Total Charged to this Card</div>
+ <div class="glmCartFormInput">{c.totalPrice}</div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cctype.required">Card Type</div>
+ {if:c.paymentForm.cctype.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cctype.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="{c.id}_cctype">
+ <option value=""> </option>
+ {foreach:c.paymentForm.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccname.required">Name on Card</div>
+ {if:c.paymentForm.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccname" value="{c.paymentForm.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccnumb.required">Card Number</div>
+ {if:c.paymentForm.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccnumb" value="{c.paymentForm.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccexp.required">Expiration Date</div>
+ {if:c.paymentForm.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <span class="dateLabel">Month</span>
+ <select name="{c.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ <span class="dateLabel">Year</span>
+ <select name="{c.id}_ccyear">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cccode.required">Security Code</div>
+ {if:c.paymentForm.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_cccode" value="{c.paymentForm.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {end:}<!--haveCreditCards-->
+ {if:c.havePayPal}
+ <!-- PayPal Payment Form -->
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByPayPal" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByPayPal" class="">
+ {end:}
+ <div id="{c.id}_PayPal" memberID="{c.id}" class="glmPayPalButton">
+ <img src="{baseURL}common/EventManagement/front/MMM/assets/paypal_but6.gif"></a>
+ </div>
+ </span>
+ {end:}<!--havePayPal-->
+ {if:c.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+ {else:} <!-- havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+ {end:} <!-- havePaymentMethod -->
+ {end:} <!-- if payment not approved -->
+
+ </div> <!-- glmCartForm - Venue Payment -->
+ </div> <!-- glmCartPayment -->
+
+ {end:} <!-- if not central payment -->
+ </div> <!-- glmCartBlock -->
+ </div>
+ {end:} <!-- if Performances -->
+
+ {if:!cartRequiresPayment}
+ <input type="hidden" name="{c.id}_payTypeSelect" value="no">
+ {end:}
+
+ {end:} <!-- each venue -->
+
+{if:cartRequiresPayment}
+ {if:formData.centralPayment}
+
+ <div class="glmCartBlock">
+
+ {if:formData.centralPayment.havePaymentMethod}
+
+ {foreach:formData.centralPayment.paymentForm,p} <!-- This is a pseudo-loop since there should only be one entry. Keeps data consistent. -->
+
+ {if:p.cctype}
+ <!-- Credit Card Payment Form -->
+
+ <span id="{formData.centralPayment.id}_glmPayByCC" class="">
+ <div class="glmCartFormLine">
+ <div class="">
+ {if:formData.centralPayment.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{formData.centralPayment.id}" type="radio" name="{formData.centralPayment.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{formData.centralPayment.id}" type="hidden" name="{formData.centralPayment.id}_payTypeSelect" value="cc">
+ {end:}
+ </div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.cctype.required">Card Type</div>
+ <div class="glmCartFormInput">
+ <select name="{formData.centralPayment.id}_cctype">
+ <option value=""> </option>
+ {foreach:p.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccname.required">Name on Card</div>
+ {if:p.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_ccname" value="{p.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccnumb.required">Card Number</div>
+ {if:p.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_ccnumb" value="{p.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccexp.required">Expiration Date</div>
+ {if:p.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ Month
+ <select name="{formData.centralPayment.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Year
+ <select name="{formData.centralPayment.id}_ccyear">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.cccode.required">Security Code</div>
+ {if:p.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_cccode" value="{p.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {if:p.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {formData.centralPayment.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+
+ {end:} <!-- /Have Credit Cards -->
+ {end:} <!-- foreach payment -->
+
+ </div>
+
+ {else:} <!-- /havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+
+ {end:} <!-- /havePaymentMethod -->
+
+ {end:} <!-- Central Payment -->
+
+{end:} <!-- Cart Requires Payment -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <!-- glmCartBlock - A Venue -->
+ <div class="glmCartBlock">
+ {if:cartRequiresPayment}
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">Complete Purchase</div>
+<!-- NOT DISPLAYING THESE NOW
+ <div id="GLMpolicy">
+ (purchase and return policies go here)
+ </div>
+ -->
+ <p style="padding-top: 45px;">
+ {ssl_seal_head_script:h}
+ {ssl_seal_body_script:h}
+ </p>
+ </div>
+ {else:}
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">No Payment Required</div>
+ </div>
+ {end:}
+ <div style="float: right;">
+ <div class="glmCartTable totals" style="float: right;">
+ {if:cartRequiresPayment}
+
+ <div class="glmCartHeader">
+ <div class="glmGrandTotals">
+ Grand Total {totals.price}
+ </div>
+
+ <!-- <div class="glmCartText">{term.prop.plur_cap}</div> -->
+ <!-- <div class="glmCartText grand">Grand Total</div> -->
+ <!-- </div> -->
+ <!-- <div class="glmCartValues"> -->
+ <!-- <div class="glmCartText">{totals.venues}</div> -->
+ <!-- <div class="glmCartText grand">{totals.price}</div> -->
+ </div>
+ {end:}
+ </div><!--/.glmCartTable-->
+ {if:!cartHasOneVenueOnly}
+<!-- <div class="glmCartBlockText">
+ NOTE: There will be a separate order number and a separate credit card transaction for each {term.prop.norm}.
+ </div> -->
+ {end:}
+
+ {if:adminUser}
+ <div>
+ <input id="AdminNoPaymentInfo" type="checkbox" name="AdminNoPayment" value="TRUE"> No payment info required for Admin User.
+ </div>
+ {if:noPaymentReasons}
+ <div id="AdminNoPaymentInfoReason">
+ Reason for no payment information required:<br>
+ <select name="no_payment_reason">
+ <option value=""></option>
+ {foreach:noPaymentReasons,p}
+ <option value="{p:h}">{p:h}</option>
+ {end:}
+ </select>
+ </div>
+ {end:}
+ {end:}
+
+ <div id="GLMcheckout" style="float: right;">
+ {if:!blockCheckout}
+ <a id="GLMcheckoutBtn" class="glmNavItemWide">{term.nav.purchase}</a>
+ {else:}
+ <a class="glmNavItemInactive">Unable to checkout - please see above.</a>
+ {end:}
+ </div>
+ </div>
+ </div>
+ </form>
+</div><!-- GLMcontent -->
+
+<!-- jQuery scripts for controlling page actions -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ baseSCRIPT="baseSCRIPT"
+ startURL="startURL"
+ baseURL="baseURL"
+>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ var checkoutButtonPressed = false;
+ var duration = 400;
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+
+ // Prevent multiple submissions
+ if (checkoutButtonPressed == true) {
+ return;
+ }
+
+ // Check policy acceptance
+ var needPolicyChecked = false;
+ $(".glmPolicyCheckbox").each(function() {
+ if (!$(this).is(':checked')) {
+ needPolicyChecked = true;
+ }
+ });
+
+ if (needPolicyChecked) {
+ alert('You must agree to our policies shown in red above to checkout.');
+ return false;
+ }
+
+ checkoutButtonPressed = true;
+ setBlocker();
+ $('#GLMcheckoutForm').submit();
+
+ });
+
+ // Navigation buttons
+ $('#GLMnavCart').on('click', function() { // Add to Cart
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = flex_startURL;
+ });
+
+ // Send user to PayPal payment when button is clicked
+ $('.glmPayPalButton').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=800, left=100, top=25";
+ PayPalWindow = window.open(flex_baseURL + "?Action=Shop_PayPal&memberID=" + memberID, "PayPalWindow",disp_setting);
+ PayPalWindow.focus();
+ });
+
+ // Show payment method input when selected
+ $('.glmSelectPayByCC').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByCC').show(duration);
+ });
+ });
+ $('.glmSelectPayByPayPal').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByPayPal').show(duration);
+ });
+ });
+
+ // Start with payment types hidden - only prompt showing
+ $('.glmPayTypes').hide(0);
+
+ // If No Payment Info is selected, then show reasons list
+ $('#AdminNoPaymentInfo').on('click', function() {
+ checkNoPaymentInfo();
+ });
+
+ // Show or hide no payment info reasons list
+ function checkNoPaymentInfo() {
+ if ($('#AdminNoPaymentInfo').is(':checked')) {
+ $('#AdminNoPaymentInfoReason').show(0);
+ } else {
+ $('#AdminNoPaymentInfoReason').hide(0);
+ }
+ }
+
+ // Check is reasons are shown on startup.
+ checkNoPaymentInfo();
+
+ // Show submit access blocker
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Complete Page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">Purchase Complete</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+ \r
+<!-- CPS: Remove Vouchers\r
+ Code Removed\r
+-->\r
+ \r
+ <!-- Adobe Reader Download -->\r
+ \r
+ <div class="glmBlock">\r
+<!-- CPS: Remove Vouchers\r
+ <div class="glmBlockContentRight">\r
+ <a href="http://www.adobe.com/go/getreader" target="GetAdobeReader"><img src="{baseURL}common/EventManagement/front/TicketsFoundation/assets/get_adobe_reader.png"></a>\r
+ </div>\r
+ <div class="glmBlockContentLeft">\r
+ <small>\r
+ <p>\r
+ Adobe Reader is required to view and print your {term.voucher.plur}. Adobe Reader is a free program available directly from Adobe. \r
+ If you do not already have Adobe Reader installed, click the "Get Adobe Reader" link now.\r
+ </p>\r
+ </small>\r
+ </div>\r
+-->\r
+ <div class="glmBlockContent">\r
+ <small>\r
+ <p>\r
+ <b>Please print this page for reference.</b>\r
+<!-- CPS: Remove Vouchers\r
+ <b>If you are unable to print your {term.voucher.plur}, please print this page or write down the order number(s)\r
+ below and bring that to the ticket office when you arrive.</b>\r
+-->\r
+ </p>\r
+ ORDER #: \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ {c.paymentResult.orderID} \r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </small> \r
+ </div>\r
+ </div> \r
+ \r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{successText:h}</div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div class="glmCartBlockTitle">Contact Information</div>\r
+ <div class="glmCartForm">\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">First Name:</div><div class="glmCartFormInput">{formData.contact.fname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Last Name:</div><div class="glmCartFormInput">{formData.contact.lname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Address:</div><div class="glmCartFormInput">{formData.contact.addr1.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">{formData.contact.addr2.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">City:</div><div class="glmCartFormInput">{formData.contact.city.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">State:</div><div class="glmCartFormInput">{formData.contact.state.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Country:</div><div class="glmCartFormInput">{formData.contact.country.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">ZIP/Postal Code:</div><div class="glmCartFormInput">{formData.contact.zip.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Phone:</div><div class="glmCartFormInput">{formData.contact.phone.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">E-Mail address:</div><div class="glmCartFormInput">{formData.contact.email.value}</div></div> \r
+ {if:opt_field_1_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_1_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_1.value:h}</div></div> {end:}\r
+ {if:opt_field_2_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_2_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_2.value:h}</div></div> {end:}\r
+ {if:opt_field_3_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_3_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_3.value:h}</div></div> {end:}\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">\r
+ {if:formData.contact.email_ok}\r
+ You have asked us to send information on activities and offers. \r
+ {else:}\r
+ You have asked us to NOT send information on activities and offers.<br>\r
+ We will only contact you regarding this order.\r
+ {end:}\r
+ </div></div> \r
+ \r
+ </div> <!-- glmCartForm -->\r
+ \r
+ </div> <!-- glmCartBlock - Contact information -->\r
+ \r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ <div class="glmCartBlock">\r
+ \r
+ <div class="glmCartBlockTitle">{term.ticket.plur_cap} at: {c.name:h}</div>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+ <div class="glmCartVenueInfo">\r
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}\r
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}\r
+ \r
+ </div>\r
+\r
+ <div class="glmCartEvents">\r
+ \r
+ {foreach:c.performances,p} <!-- each performance for this date -->\r
+ \r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventInfoLeft">\r
+ <div class="glmCartBlockSubTitle">\r
+ {term.performance.cap}: <span class="glmCartBlockSubTitleValue">{p.name:h}</span>\r
+ </div>\r
+ <div class="glmCartBlockText">\r
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} --> \r
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <div class="glmCartBlockDates"> \r
+ {foreach:p.dates,d}\r
+ \r
+ <div class="glmCartBlockSubTitle">\r
+ {term.ticket.cap} date: \r
+ <span class="glmCartBlockSubTitleValue">\r
+ {if:d.dateSpecific}\r
+ {d.fullDate}\r
+ {else:}\r
+ Use any date\r
+ {if:c.likelyDate}\r
+ - Likely Date {c.likelyDate}\r
+ {end:}\r
+ {end:}\r
+ </span>\r
+ </div>\r
+ \r
+\r
+ {foreach:d.sections,s}\r
+ <table border="0" width="100%">\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ {if:!p.oneSectionOnly}\r
+ <th align="left">Section</th>\r
+ {end:}\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">\r
+ {i.selected}\r
+ </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left">{s.name:h}</td>\r
+ {end:}\r
+ <td align="left">\r
+ {i.title}\r
+\r
+ {if:i.date_specific.value}\r
+ - {i.start_date.date}\r
+ {if:i.time_specific.value}\r
+ {i.ticket_time.time}\r
+ {end:}\r
+ {else:}\r
+ {if:i.time_specific.value}\r
+ - {i.ticket_time.time}\r
+ {end:}\r
+ {end:}\r
+ </td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {if:i.descr}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td colspan="4">\r
+ {else:}\r
+ <td colspan="3">\r
+ {end:}\r
+ {if:option.cart_images}\r
+ {if:i.image}\r
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>\r
+ {end:}\r
+ {end:} \r
+ <div class="glmBlockContentLeft">{i.descr:h}</div>\r
+ </td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {if:i.show_addons} -->\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left"> </td>\r
+ {end:}\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {end:} -->\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td> </td>\r
+ {end:}\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ </table><!--/.glmCartTable-->\r
+ {end:}<!--sections-->\r
+ \r
+ \r
+ {end:} <!-- dates --> \r
+ \r
+ </div> <!-- dates -->\r
+ \r
+ </div>\r
+\r
+ {if:p.policy}\r
+ <div class="glmSection">\r
+ <div class="glmBlockContent">\r
+ <div class="glmCartBlockSubTitle">\r
+ Our policy for this {term.performance.norm}.\r
+ </div>\r
+ <p>{p.policy:h}</p>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} <!-- each performance -->\r
+ \r
+ </div>\r
+ \r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+\r
+ {if:!cartHasOneVenueOnly}\r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+ <div class="glmCartTotals">\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Sub Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText">{c.totalPrice}</div>\r
+ </div>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+\r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ \r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->\r
+ <div class="glmCartPayment">\r
+ \r
+ <!-- If special requests possible -->\r
+ {if:c.ticket_spec_req.value}\r
+ <div class="glmCartForm" style="margin-bottom: 1em;">\r
+ <div class="glmCartBlockTitle">Special requests:</div>\r
+ <div class="glmSpecialRequests">{c.paymentForm.spec_req.value:h}</div>\r
+ </div> \r
+ {end:}\r
+ \r
+ \r
+ {if:c.paymentResult}\r
+ <div class="glmCartForm">\r
+ {if:c.paymentResult.approved}\r
+ <div class="glmCartBlockTitle">Card Payment Approved</div>\r
+ \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div><div class="glmCartFormInput">{c.paymentResult.cctype}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div><div class="glmCartFormInput">{c.paymentResult.ccname}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div><div class="glmCartFormInput">{c.paymentResult.ccnumb}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div><div class="glmCartFormInput">{c.paymentResult.ccexp}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>\r
+<!-- CPS: Remove Vouchers\r
+ <div id="GLMnavigation">\r
+ <div id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint">{term.nav.print_vouchers}</div>\r
+ </div>\r
+-->\r
+ {else:}\r
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>\r
+ <ul><li>{c.paymentResult.description}</li></ul>\r
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>\r
+ {if:forceCheckoutPhase}\r
+ <div id="GLMnavigation">\r
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} \r
+ \r
+ </div> <!-- glmCartForm - Venue Payment -->\r
+ {end:}\r
+ \r
+ </div> <!-- glmCartPayment -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ {end:} <!-- each venue -->\r
+ \r
+ <div class="glmCartBlock totals">\r
+ {if:cartHasContents} \r
+ <div class="glmCartTotals">\r
+ <div class="glmCartBlockTitle totals">Cart Totals</div>\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText grand">Grand Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText grand">{totals.price}</div>\r
+ </div>\r
+ </div><!--/.glmCartTable-->\r
+ </div><!--/.glmCartTotals-->\r
+ {else:}\r
+ <P>Your cart is currently empty.</P> \r
+ {end:}\r
+ </div> <!-- glmCartBlock -->\r
+ \r
+</div><!-- GLMcontent -->\r
+\r
+{trackingScript:h}\r
+\r
+<!-- jQuery scripts for controlling page actions -->\r
+<flexy:toJavascript\r
+ flexy:prefix="flex_"\r
+ baseSCRIPT="baseSCRIPT"\r
+ startURL="startURL"\r
+ appAdminURL="appAdminURL"\r
+ \r
+>\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+\r
+ // Navigation buttons\r
+ $('#GLMnavCart').click(function() { // Add to Cart \r
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';\r
+ });\r
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection\r
+ window.location = flex_startURL;\r
+ });\r
+ \r
+ // Print vouchers\r
+ $('.voucherPrint').click(function(){ \r
+ \r
+ var orderID = $(this).attr('emOrderID');\r
+ var orderVerify = $(this).attr('emOrderVerify');\r
+ var voucherWindow = window.open(flex_baseSCRIPT + "&Action=Shop_printVoucher&OrderID=" + orderID + "&orderVerify=" + orderVerify, \r
+ "voucherPrint", \r
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"\r
+ );\r
+ voucherWindow.focus();\r
+ voucherWindow.print();\r
+ return false;\r
+\r
+ });\r
+\r
+ });\r
+\r
+</script>\r
+<flexy:include src="MMM/foot.html" />\r
--- /dev/null
+<!-- CPS: Remove Vouchers\r
+<h2>\r
+ <a href="{baseSCRIPT}&Action=Shop_printVoucher&OrderID={cartEntry.paymentResult.orderID}&orderVerify={cartEntry.paymentResult.orderVerification}">\r
+ Click here to reprint your {term.voucher.plur}\r
+ </a>\r
+</h2>\r
+-->\r
+\r
+<h3>\r
+<!-- Tickets Purchased at: {term.ticket.plur_cap} Purchased at:<br> -->\r
+ {cartEntry.name:h}\r
+</h3>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+<!-- {if:cartEntry.descr}<p>{cartEntry.descr:h}</p>{end:} -->\r
+ \r
+<table border="1" cellspacing="0" cellpadding="2">\r
+\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ <th align="left">{term.performance.cap}</th>\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+\r
+{foreach:cartForSummaryCentral,c}\r
+{foreach:c.performances,p} <!-- each performance -->\r
+ {foreach:p.dates,d} <!-- each date -->\r
+ {foreach:d.sections,s}\r
+ \r
+ \r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">{i.selected}</td>\r
+ <td align="left">{p.name:h}</td>\r
+ <td align="left">\r
+ {i.title:h}\r
+ {if:d.dateSpecific}\r
+ - {d.fullDate}\r
+ {if:i.time_specific.value}\r
+ at {i.ticket_time.time}\r
+ {end:}\r
+ {else:}\r
+ {if:i.time_specific.value}\r
+ - {i.ticket_time.time}\r
+ {end:}\r
+ {end:}\r
+\r
+ </td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {foreach:i.addons,a}\r
+ {if:a.selected}\r
+ <tr>\r
+ <td> </td>\r
+ <td align="left"> </td>\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ <td> </td>\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ \r
+ \r
+ {end:} <!-- each section -->\r
+ {end:} <!-- each performance for this date -->\r
+{end:} <!-- each date for this venue -->\r
+\r
+ <tr>\r
+ <td colspan="4"> </td>\r
+ <td align="right">{c.totalPrice}</td>\r
+ </tr>\r
+\r
+<!-- \r
+ <tr>\r
+ <th align="right">{c.totalTickets}</th>\r
+ <td colspan="6"> </td>\r
+ <th align="right">{c.totalPrice}</th>\r
+ </tr>\r
+ -->\r
+ \r
+</table>\r
+\r
+ <!-- If special requests possible -->\r
+{if:c.ticket_spec_req}\r
+<p>\r
+ {c.paymentForm.spec_req.value:h}\r
+</p> \r
+{end:}\r
+\r
+{end:} \r
+\r
+{if:cartEntry.ticket_policy}<p>{cartEntry.ticket_policy:h}</p>{end:}\r
+\r
+<table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th>First Name:</th><td>{formData.contact.fname.value}</td></tr> \r
+ <tr><th>Last Name:</th><td>{formData.contact.lname.value}</td></tr> \r
+ <tr><th>Address:</th><td>{formData.contact.addr1.value}</td></tr> \r
+ <tr><th> </th><td>{formData.contact.addr2.value}</td></tr> \r
+ <tr><th>City:</th><td>{formData.contact.city.value}</td></tr> \r
+ <tr><th>State:</th><td>{formData.contact.state.value}</td></tr> \r
+ <tr><th>Country:</th><td>{formData.contact.country.value}</td></tr> \r
+ <tr><th>ZIP/Postal Code:</th><td>{formData.contact.zip.value}</td></tr> \r
+ <tr><th>Phone:</th><td>{formData.contact.phone.value}</td></tr> \r
+ <tr><th>E-Mail address:</th><td>{formData.contact.email.value}</td></tr> \r
+</table>\r
+ \r
+<p> \r
+ <table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th colspan="2" align="center">Credit Card Payment Approved</th></tr>\r
+ <tr><th align="left">Card Type</th><td>{cartEntry.paymentResult.cctype}</td></tr>\r
+ <tr><th align="left">Name on Card</th><td>{cartEntry.paymentResult.ccname}</td></tr>\r
+ <tr><th align="left">Card Number</th><td>{cartEntry.paymentResult.ccnumb}</td></tr>\r
+ <tr><th align="left">Expiration Date</th><td>{cartEntry.paymentResult.ccexp}</td></tr>\r
+ <tr><th align="left">Authorization Code</th><td>{cartEntry.paymentResult.authCode}</td></tr>\r
+ </table>\r
+</p> \r
+ \r
+<!-- is this needed? <flexy:include src="MMM/foot.html" /> -->\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Section Selection Page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">{term.section.cap} Selection</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem">{term.nav.show_selected}</a>\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+\r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{sectionText:h}</div>\r
+\r
+{if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+{end:}\r
+\r
+ <p>You have selected</p>\r
+ <div class="glmSection">\r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">{performanceDetail.member_name}</div><br> \r
+ <div class="glmBlockName">{performanceDetail.name}</div>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+<!-- <p><span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</p> -->\r
+<!-- <p>{performanceDetail.descr:h}</p> -->\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <!-- List of available sections -->\r
+ <hr />\r
+ <p>Please select from the following</p>\r
+ <div class="glmSection">\r
+{foreach:sectionList,x} \r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">\r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}">{x.name}</a>\r
+ </div> \r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}" class="glmNavItem">{term.nav.select}</a>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+ <p><span class="glmBold">{term.section.cap}</span>: {x.member_name}</p>\r
+ <p>{x.descr:h}</p>\r
+ </div>\r
+ </div> \r
+{end:}\r
+ \r
+ </div>\r
+\r
+</div> <!-- /GLMcontent -->\r
+\r
+ {startScript:h}\r
+\r
+ $(document).ready(function(){ \r
+\r
+ // Code to kick off the geolocation-display feature \r
+ $("#locationMap").geolocate({\r
+ lat: "#lat",\r
+ lng: "#lon",\r
+ mapOptions: {\r
+ disableDefaultUI: false,\r
+ mapTypeControl: true,\r
+ mapTypeId: "roadmap",\r
+ zoom: 12\r
+ },\r
+ markerOptions: {\r
+ draggable: false,\r
+ title: "This is your selected location"\r
+ }\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+<flexy:include src="MMM/foot.html" />\r
--- /dev/null
+
+
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ <div class="glmBlockContentRight">
+ <div id="locationMap_{m.id}" class="GLMmapWindow" data-member-id="{m.id}">(map loads here)</div>
+ <form>
+ <input type="hidden" id="lat_{m.id}" value="{m.lat}">
+ <input type="hidden" id="lon_{m.id}" value="{m.lon}">
+ </form>
+ </div><!--/.glmBlockContentRight-->
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>
+ <div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date} through {p.end_date.date}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:!showTickets}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a>
+ {end:}
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value}, {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent" class="start">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.event.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{introText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <!-- <p>Please select from the following</p> -->
+{if:showTickets}
+ <div id="GLMselect" style="float: right;">
+ <a class="GLMselectButton glmNavItem">{term.nav.select}</a>
+ </div>
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+<!-- <input type="hidden" name="PerformanceID" value="{performanceDetail.id}"> -->
+<!-- <input type="hidden" name="SectionID" value="{sectionDetail.id}"> -->
+{end:}
+ <!-- List of Locations -->
+ {foreach:membersList,m}
+ <div class="glmSection startSection">
+ <div class="glmBlock startBlock">
+ <div class="glmBlockContentLeft memberDescription">
+ <!-- <div class="glmBlockHeader">
+ <div class="glmBlockName">{*m.name:h*}</div>
+ </div>-->
+ <div style="clear: both;">
+ <!--<div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>-->
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:m.image}
+ <div class="glmBlockContentRight eventImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{m.image}"></div>
+ {end:}
+ {end:}
+ <!-- List of available events for this location -->
+ <div class="glmBlockList eventsForLocation">
+ {foreach:m.performances,p}
+ <div class="glmBlock eventForLocation">
+ {if:option.select_images}
+ {if:p.image}
+ <div class="startContent startContentLeft">
+ {else:}
+ <div class="startContent">
+ {end:}
+ {else:}
+ <div class="startContent">
+ {end:}
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {m.name:h} - {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+<!-- <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>-->
+ <div class="glmDescr">{p.short_descr:h}</div>
+ {if:p.start_date.timestamp}<div class="glmDescr eventDescrDate"><span class="glmBold">Event Available</span>: {p.start_date.date}{if:p.end_date.timestamp} - {p.end_date.date} {end:}</div>{end:}
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:p.image}
+ <div class="startImage startImageRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ {end:}
+ {if:!showTickets}
+<!-- <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a> -->
+ {end:}
+
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock sectionDetail">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ {if:!x.tooLateToBuy}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockContentRight">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div> <!-- glmBLockContentRight -->
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={performanceDetail.id}&SectionID={x.section_id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ {end:}
+ </div><!--/.glmBlockContentLeft-->
+ {if:x.descr}
+ <div class="glmBlockContentBottom">
+ <div class="glmDescr">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <p>
+ {if:!x.date_specific.value}
+ {if:x.start_date.timestamp} Date: {x.start_date.date}{end:}{if:!x.start_end_dates_same} to {x.end_date.date}{end:}{if:!x.time_specific.value} {end:}
+ {end:}
+ {if:!x.time_specific.value}
+
+ {elif false:}
+ <!-- no longer show ticket time -->
+ Time: {x.ticket_time.time}
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </p>
+ <div>
+ </div>
+
+ </div>
+</div>
+ {end:}
+ </div><!--/.glmBlock-->
+ {end:}
+ {end:}
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
+{if:showTickets}
+ <div id="GLMselect">
+ <a class="GLMselectButton glmNavItem">{term.nav.select}</a>
+ </div>
+ </form>
+{end:}
+</div><!-- /GLMcontent -->
+<!--</div> -->
+{startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant">[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ </p>\
+ ';
+
+
+
+ $(document).ready(function(){
+
+ // Code to kick off the geolocation-display feature
+ function doLocationMap(id) {
+ $("#locationMap_" + id).geolocate({
+ lat: "#lat_" + id,
+ lng: "#lon_" + id,
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ }
+ {foreach:membersList,m}
+ doLocationMap({m.id});
+ {end:}
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDate_' + ticket.id).html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_inv_array[' + dateData['date'] + ']" value="' + dateData.id + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+// *** NEED TO FIX REFERENCE TO "performanceDetail" since that's not available on this page
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate);
+ } else {
+
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+
+ }
+
+ }
+
+ $('.GLMselectButton').click(function() {
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+Anthony changes for "use any date" or whatever
+--This line, and those below, will be ignored--
+
+M checkout.html
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+
+<flexy:include src="MMM/head.html" />
+
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent" class="ticketOpt">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Ticket Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketOptText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>You have selected</p>
+ <!-- List of Ticket Options -->
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">{term.prop.cap}: {performanceDetail.member_name}</div>
+<!-- <div class="glmDescr">{term.order.cap} up to: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</div> -->
+ <!--<p>{performanceDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{sectionDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <!--<p>{sectionDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{ticketDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ {if:!ticketDetail.date_specific.value}
+ <div class="glmDescr">Use any date {if:ticketDetail.start_date.timestamp} from {ticketDetail.start_date.date} to {ticketDetail.end_date.date}{end:}</div>
+ {end:}
+ {if:!ticketDetail.time_specific.value}
+ <div class="glmDescr">Use any time</div>
+ {else:}
+ <div class="glmDescr">Time: {ticketDetail.ticket_time.time}</div>
+ {end:}
+ {if:!ticketDetail.unlimted_use.value}
+ <!-- <div class="glmDescr">Each {term.ticket.norm} may be used {ticketDetail.uses} time(s)</div> -->
+ {else:}
+ <div class="glmDescr">Each {term.ticket.norm} may be used an unlimited number of times</div>
+ {end:}
+ <div class="glmDescr">{ticketDetail.descr:h}</div>
+ </div>
+ </div>
+ </div>
+ <!-- Date and quantity selection -->
+ <p>Please select from the following.</p>
+ <div class="glmSection">
+ <div id="GLMeventDateSelectBlock">
+ <div id="GLMeventDateSelect" class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">Select desired date:</div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInputShort"><input type="text" id="GLMeventDate" name="ticket_date" value=""> (click in field to set date)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr quant">Select Quantity:</div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer">(please select date first)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {if:reason}<div id="GLMaddToCart" name="ticket">(disabled - please see above)</div>{else:}<div id="GLMaddToCart" class="glmNavItem add" name="ticket">{term.nav.add_to_cart}</div>{end:}
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ // Whether ticket has date specific inventory
+ var dateSpecific = {ticketDetail.date_specific.value} + 0;
+
+ // Dates for inventory data
+ var dates = {inventoryJSON:h};
+
+ $(document).ready(function(){
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+ var dateData = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector" name="quant"><option value="0"></option>[ticket-quants]</select>\
+ ';
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least {detail.performance.purch_leadtime} hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ </p>\
+ ';
+ var selectedInv;
+ var ticketQuants;
+ var addButtonPushed = false;
+
+ // Start by counting the number of dates to see if we have only 1
+ var dateCount = 0;
+// if (dateSpecific) {
+ $.each(dates, function(index, date) {
+ dateCount = dateCount + 1;
+ dateData = date;
+ });
+// }
+ // if there's no date specific tickets
+ if (!dateSpecific) {
+ // Populate date input field
+ $('#GLMeventDateSelectBlock').html('<input type="hidden" name="ticket_date" value="0">');
+ doQuantSelection();
+ // if there's only one date, then display that and move on.
+ } else if (!dateSpecific || dateCount == 1) {
+ // populate date input field
+ $('#GLMeventDate').val(dateData['date']);
+ $('#GLMtickets').html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_date" value="' + dateData['date'] + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+
+ doQuantSelection();
+ } else {
+ // Use the date picker to select a date
+ dateData = false;
+ $("#GLMeventDate").datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Update input message
+ $('#GLMdateMessage').html('<br />');
+
+ // Get data for the selected date
+ dateData = dates[selectedDate];
+ doQuantSelection();
+ } // Date Selection
+
+ }); // Date Picker
+
+ }
+
+ function doQuantSelection() {
+ // Build the ticket quant options
+ ticketQuants = '';
+ var selectMax = dateData['available'];
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+ var tooLate = dateData['tooLate'];
+ if (tooLate) {
+ $('#GLMticketQuantContainer').html(ticketTooLate);
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ $('#GLMticketQuantContainer').html(ticketQuantSelection.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+// doAddToCartSetup();
+ }
+
+// function doAddToCartSetup() {
+ // Add to cart action
+ $('#GLMaddToCart').click(function() {
+ if (addButtonPushed) {
+ return;
+ }
+ var reason = '';
+ // Check date
+ if (dateData) {
+ selectedInv = dateData.id;
+ } else {
+ reason = reason.concat('* You need to select a date first.\n');
+ }
+ // Check quantity
+ var selectedQuant = (parseInt($('#glmQuantSelector').val()) + 0);
+ if (selectedQuant == 0) {
+ reason = reason.concat('* You need to select a quantity first.\n');
+ }
+ // Check if there's a reason we can't add this to the cart yet
+ if (reason != '') {
+ alert(reason);
+ return;
+ }
+ // Adding to cart
+ addButtonPushed = true;
+ $("#GLMeventDate").datepicker('disable');
+ $('#glmQuantSelector').prop('disabled', 'disabled');
+ setBlocker();
+ // Submit to cart
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=add&PerformanceID={performanceDetail.id}&SectionID={sectionDetail.id}&TicketID={ticketDetail.id}&ticket_inv=" + selectedInv + "&quant=" + selectedQuant;
+
+ });
+// }
+ // Code to kick off the geolocation-display feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ // Navigation buttons
+ $('#GLMnavCart').click(function() { // Add to Cart
+ window.location = '{baseSCRIPT}&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = '{startURL:h}';
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent" class="ticketSelect">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.ticket.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketText:h}</div>
+{if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+{end:}
+ <p>You have selected</p>
+ <!-- List of Tickets -->
+
+
+{foreach:sections,s}
+ <div class="glmSection">
+ <div class="glmBlock">
+
+
+ <div class="glmBlockContent">
+ {if:performanceDetail.image}
+ <div class="glmBlockContentRight ticketSelectImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{performanceDetail.image}"></div>
+ <div class="glmBlockContentLeft ticketSelectContent">
+ {else:}
+ <div class="ticketSelectContent">
+ {end:}
+
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.member_name:h}</div><br>
+ <div class="glmBlockName">{performanceDetail.name:h}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}
+-->
+ </div>
+
+ {if:performanceDetail.descr}
+ {performanceDetail.descr:h}
+ {end:}
+ </div> <!-- description -->
+ </div> <!-- member data left -->
+ </div> <!-- glmBlockContent -->
+ </div> <!-- glmBlock -->
+ </div> <!-- sections -->
+ <!-- List of Available Events -->
+ <div id="GLMselect" style="float: right;">
+ <a class="GLMselectButton glmNavItem">{term.nav.select}</a>
+ </div>
+ <p class="GLMTicketSelectExtraText">Please select from the following. If you do not see the number of tickets available that you require, please select a different date or time.</p>
+ <div class="glmSection">
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+ <input type="hidden" name="PerformanceID" value="{performanceDetail.id}">
+ <input type="hidden" name="SectionID" value="{sectionDetail.id}">
+ {foreach:s.ticketsData,x}
+ {if:!x.tooLateToBuy}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockContentRight">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div> <!-- glmBLockContentRight -->
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title:h}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={performanceDetail.id}&SectionID={x.section_id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ {end:}
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <p>
+ {if:!x.date_specific.value}
+ {if:x.start_date.timestamp} Date: {x.start_date.date}{end:}{if:!x.start_end_dates_same} to {x.end_date.date}{end:}{if:!x.time_specific.value} {end:}
+ {end:}
+ {if:!x.time_specific.value}
+
+ {elif false:}
+ <!-- no longer show ticket time -->
+ Time: {x.ticket_time.time}
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </p>
+ </div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ </div><!--/.glmBlock-->
+ {end:}
+ {end:}
+ <div id="GLMselect">
+ <a class="GLMselectButton glmNavItem">{term.nav.select}</a>
+ </div>
+ </form>
+ </div> <!-- glmSection -->
+
+{end:}
+
+</div> <!-- /GLMcontent -->
+
+{if:option.ticket_selection.include_options_in_ticket_list}
+ <!-- jQuery scripts for controlling page actions -->
+ {startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least [hours] hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ ';
+
+
+ $(document).ready(function(){
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ if (ticket.haveFutureInventory) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html(' \
+ <div class="glmTicketsSelectPrompt">Date Available: </div> \
+ <div class="glmTicketsSelectValue"> \
+ <div class="glmInput"> \
+ ' + dateData.ticket_date.date + ' \
+ <input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '"> \
+ </div> \
+ </div>');
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ var mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ if (inventory[mdy]['tooLate']) {
+ return [false,"","Not Available"];
+ } else {
+ return [true,"","Available"];
+ }
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ if($('#GLMeventDateInput_' + ticket.id).length > 0) {
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: ticket.startDate,
+ maxDate: ticket.endDate,
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+ }
+
+ }
+
+ } // if have future inventory
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate.replace(/\[hours\]/g, {performanceDetail.purch_leadtime}));
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ var selectButtonPressed = false;
+
+ $('.GLMselectButton').click(function() {
+ // Prevent multiple submissions
+ if (selectButtonPressed == true) {
+ return;
+ }
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+ if( $(window).width() < 768 ){
+ $('.glmBlock').not(":first").each(function() {
+ var left = $(this).find( $('.glmBlockContentLeft') );
+ left.prependTo( $(this) ).find( $('glmBlockContentRight') );
+ });
+ }
+ });
+ </script>
+{end:}
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Your PayPal payment has been approved.</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ Your cart will now reflect that the payment has been made.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Unable to process your payment!</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ <div class="glmCartFormPrompt glmCartRequired">Sorry, there was a problem.</div>\r
+ </p>\r
+ \r
+ <p>\r
+ We were unable to find your purchase information and are therefore \r
+ are unable to process your payment through PayPal. This could be\r
+ due to you not performing any action with your pending purchase\r
+ for too long. Please click the "Return to selected tickets" button\r
+ at the top of the checkout page to see if your selections are still listed.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Additional Info Page
+-->
+<flexy:include src="MMM/head.html" /> <!-- Note direct reference to interface type -->
+
+<form id="cartForm" action="">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a> <!-- sends user to cart page -->
+ {if:!option.ticket_shop.start_at_cart}
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to start of shop -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{cartText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+
+ <!-- Problem display -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <h2>We're sorry, we had a problem with your request:</h2>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+ <!-- Cart Contents -->
+
+{foreach:cart,c} <!-- each venue -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="large-12 columns"><h2>{c.name:h}</h2></div>
+ </div>
+ {end:}
+
+
+ <!-- If we need to assign this ticket to be sold in another venue or we need to ask for likely date of use -->
+
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ <p>
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange glmTicketDateInput"> mm/dd/yyyy
+ {if:text.cart.select_likely_date_explain}
+ <br>{text.cart.select_likely_date_explain}
+ {end:}
+ </p>
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+{end:} <!-- /each venue -->
+
+ <!-- Cart Summary and Checkout Button -->
+
+{if:cartHasContents}
+ <div class="row">
+ <div class="large-12 columns text-right">
+ {if:!blockCheckout}
+ <a class="small button right radius buttonTickets buttonTicketsGo" id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" >{term.nav.checkout}</a>
+ {else:}
+ <a class="small button right radius alert disabled buttonTickets">Please complete the items in RED above.</a>
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{else:}
+ <div class="row">
+ <div class="large-12 columns">
+ <p class="right">Your cart is currently empty.</p>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{end:}
+
+</form> <!-- /cartForm -->
+
+<!-- Set some flexy page parameters for use in JAVAscript -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ vertScroll="vertScroll"
+ addtionalInfoPage="option.ticket_shop.additionalInfo.use_page"
+>
+
+<!-- jQuery scripts for controlling page actions -->
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365,
+ beforeShow: function(){
+ $(".ui-datepicker").css('font-size', 12)
+ }
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = flex_startURL;
+ });
+
+ if (flex_vertScroll) {
+ window.scrollTo(0, flex_vertScroll);
+ }
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" /> <!-- Note direct reference to interface type -->
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Cart Page
+-->
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <form id="cartForm" action="">
+ <!-- GLMpageTitle - A title for this page -->
+ <!--<div id="GLMpageTitle">Selected {term.performance.plur_cap} and {term.ticket.plur_cap}</div>-->
+ <div id="GLMHeader">
+<!-- <div id="GLMpageTitle">Cart</div> -->
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+<!-- <a class="glmNavItem cart" style="margin-right: 1em;">Reprint a previous {term.order.cap}: <input id="reprintVoucher" type="text" style="width: 6em; font-size: .8em;"></a> -->
+ </div>
+ </div>
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{cartText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ {if:havePromoCodes}
+ <div class="glmCartBlock">
+ <div class="glmCartFormInput">
+ <div class="glmCartText" style="width: auto;">If you have a {term.promo.norm}, please enter it here: </div><input id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
+ </div>
+ </div>
+ {end:}
+ {foreach:cart,c}<!-- each venue -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockSmallTitle">{c.name}</div>
+ <div class="glmCartEvents">
+ {foreach:c.performances,p} <!-- each performance for this date -->
+ <div class="glmCartEvent" style="margin-bottom: 2em;">
+ <div class="glmCartEventInfo">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem" style="position: relative; top: 0px;">{term.nav.select_more_of_these}</a>
+ {end:}
+ <div class="glmCartEventInfoLeft">
+
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmDescr">
+ {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile">{p.short_descr:h}</div>{end:}
+ {if:option.cart_images}{if:p.image}
+ <img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">
+ {end:}{end:}
+ </div>
+ </div>
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%" style="padding-right: .5em;">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ <input class="glmCartQuant" type="number" id="ticket_{i.invID}" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}">
+ </td>
+ {if:!p.oneSectionOnly}
+ <td class="glmCartTicketName" align="left">{s.name}</td>
+ {end:}
+ <td class="glmCartTicketTitle" align="left">
+ {i.title}
+ {if:false}
+ {if:i.date_specific.value}
+ - {i.start_date.date}
+ {if:i.time_specific.value}
+ {i.ticket_time.time}
+ {end:}
+ {else:}
+ {if:i.time_specific.value}
+ - {i.ticket_time.time}
+ {end:}
+ {end:}
+ {end:}
+ </td>
+ <td class="glmCartTicketPrice" align="right" style="padding-right: .5em;">{if:i.show_price}{i.price}{end:}</td>
+ <td class="glmCartTicketExtended" align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.problem}
+ <tr>
+ <td> </td><td class="glmCartRequired">{i.problemText}</td>
+ </tr>
+ {end:}
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}{if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}{end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ <input class="glmCartQuant" type="number" id="addon_{a.id}" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units=" {a.name}" value="{a.selected}">
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!-- dates -->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {end:} <!--performances-->
+ </div><!--/.glmCartEvents-->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+
+{if:option.ask_for_assignment_and_likely_date}
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange"> mm/dd/yyyy
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+{end:}
+
+
+ </div> <!-- glmCartBlock -->
+ {end:}<!-- each venue -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <div class="glmCartBlock totals">
+ {if:cartHasContents}
+ <div class="glmGrandTotals">
+ Grand Total {totals.price}
+ </div>
+ <div class="glmCartWide">
+ {if:totals.tickets}
+<!-- {if:!blockCheckout} -->
+ <a id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" class="glmNavItem">{term.nav.checkout}</a>
+<!-- {else:}
+ <a class="glmNavItemInactive">Please complete the items in RED above.</a>
+ {end:} -->
+ {else:}
+ <a class="glmNavItemInactive">Your cart is currently empty.</a>
+ {end:}
+ </div>
+ {else:}
+ <P>Your cart is currently empty.</P>
+ {end:}
+ </div> <!-- glmCartBlock -->
+
+ {if:option.cart_promotions}
+ <div class="glmCartBlock">
+ You may also be interested in ...<br>
+ {foreach:cartPromotions,p}
+ <div class="glmBlockContent" style="margin-bottom: 2em;">
+ <div class="glmCartBlockTitle" style="margin-top: .5em;"><a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={p.id}">{p.member_name:h} - {p.name:h}</a></div>
+ {if:p.image}
+ <div class="glmBlockContentRight cartImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ <div class="glmBlockContentLeft cartContent">
+ {if:p.start_date}
+ <p>
+ Dates: {p.start_date.date}
+ </p>
+ {end:}
+ <!-- PER REQUEST, WE'RE NOW JUST SHOWING SHORT DESCR HERE -->
+ {if:p.short_descr}<div class="glmCartEventDescr promoDescr">{p.short_descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile promoDescrMobile">{p.short_descr:h}</div>{end:}
+ </div>
+ </div>
+ {end:}
+ </div>
+ {end:}
+
+
+ </form>
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Convert input fields to select lists
+ $('.glmCartQuant').each(function() {
+
+ var id = $(this).attr('id');
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var max = $(this).attr('data-max');
+ var value = $(this).attr('value');
+ var units = $(this).attr('data-units');
+ var numbSel = '';
+
+ // Build a picklist for this input
+ for (var i = 0 ; i {lte:h} max ; i++) {
+ if (value == i) {
+ numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
+ } else {
+ numbSel = numbSel.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ }
+
+ $('#quant_' + id).html('<select id="' + id + '" class="glmCartSelect" data-ticket="' + ticket + '" data-addon="' + addon + '">' + numbSel + '</select>' + units);
+
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a cart value changes, submit it as a cart update.
+ $('.glmCartSelect').change(function() {
+ vertScroll = getVertScroll();
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var value = $(this).val();
+
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update&ticket_inv=" + ticket + "&addon=" + addon + "&quant=" + value + "&vertScroll=" + vertScroll;
+
+ });
+
+ // When there's a change in the promo code input, submit it.
+ $('#promoCodeInput').change(function() {
+ var value = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=promo_code&promo_code=" + value;
+ });
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = '{startURL:h}';
+ });
+
+/* Not using right now
+ // Reprint order button
+ $('#reprintVoucher').on('keypress', function(event) {
+ if(event.which == '13'){
+ var orderID = $(this).val();
+ var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucher&OrderID=' + orderID,
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ }
+ });
+*/
+
+ if ({vertScroll}) {
+ window.scrollTo(0,{vertScroll});
+ }
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Page
+-->
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Selected {term.ticket.plur_cap}</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{checkoutText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ <p>See below for more information.</p>
+ </div>
+ {end:}
+ <form id="GLMcheckoutForm" action='{baseSCRIPT}&Action=Shop_checkoutSubmit' method="POST">
+ <input type="hidden" name="Action" value="Shop_checkoutSubmit">
+ <!-- glmCartBlock - Contact information - Container for all general customer information -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">Contact Information</div>
+ <!-- glmCartForm - A container for a block of form input with prompts-->
+ <div class="glmCartForm">
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ {if:formData.contact.fname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.fname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="fname" value="{formData.contact.fname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ {if:formData.contact.lname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.lname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="lname" value="{formData.contact.lname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ {if:formData.contact.addr1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr1" value="{formData.contact.addr1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr2.required"> </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr2.required"> </div>
+ {if:formData.contact.addr2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr2" value="{formData.contact.addr2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.city.required">{text.cart.checkout.city}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.city.required">{text.cart.checkout.city}: </div>
+ {if:formData.contact.city.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.city.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="city" value="{formData.contact.city.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.state.required">{text.cart.checkout.state}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.state.required">{text.cart.checkout.state}: </div>
+ {if:formData.contact.state.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.state.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="state">
+ <option value=""> </option>
+ {foreach:formData.contact.state.states,s}
+ {if:s.stateSelected}
+ <option value="{s.stateID}" selected>{s.stateName:h}</option>
+ {else:}
+ <option value="{s.stateID}">{s.stateName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.country.required">{text.cart.checkout.country}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.country.required">{text.cart.checkout.country}: </div>
+ {if:formData.contact.country.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.country.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="country">
+ <option value=""> </option>
+ {foreach:formData.contact.country.countries,s}
+ {if:s.countrySelected}
+ <option value="{s.countryID}" selected>{s.countryName:h}</option>
+ {else:}
+ <option value="{s.countryID}">{s.countryName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ {if:formData.contact.zip.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.zip.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="zip" value="{formData.contact.zip.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ {if:formData.contact.phone.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.phone.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="phone" value="{formData.contact.phone.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email.required">{text.cart.checkout.email}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email.required">{text.cart.checkout.email}: </div>
+ {if:formData.contact.email.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email" value="{formData.contact.email.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ {if:formData.contact.email2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email2" value="{formData.contact.email2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt">Receive E-Newsletter?</div>
+ {if:formData.contact.email_ok}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok" checked>
+ {else:}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok">
+ {end:}
+ Please sign me up to receive "The Ship's Bell" e-newsletter.
+ </div>
+ </div><!--/.glmCartFormLine-->
+
+ {if:opt_field_1_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ {if:formData.contact.opt_field_1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_1" value="{formData.contact.opt_field_1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_2_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ {if:formData.contact.opt_field_2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_2" value="{formData.contact.opt_field_2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_3_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ {if:formData.contact.opt_field_3.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_3.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_3" value="{formData.contact.opt_field_3.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+
+
+ </div> <!--/.glmCartForm-->
+ </div><!--/.glmCartBlock-->
+
+ {foreach:cart,c} <!-- each venue -->
+ {if:c.performances}
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">{term.prop.cap}: {c.name}</div>
+ <!-- glmCartVenueInfo -->
+<!--
+ <div class="glmCartVenueInfo">
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}
+ </div>
+-->
+ <div class="glmCartEvents">
+
+ {foreach:c.performances,p} <!-- each performance for this date -->
+<div class="glmCartBlock">
+ <div class="glmCartEvent">
+ <div class="glmCartEventInfo">
+ <div class="glmCartEventInfoLeft">
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmCartBlockText">
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} -->
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}
+ </div><!--/.glmCartBlockText-->
+ </div><!--/.glmCartEventInfoLeft-->
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ <div class="glmDescr">
+ <span class="glmCartBlockSubTitleValue">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </span>
+ </div><!--/./glmCartBlockSubTitle-->
+
+
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ {i.selected}
+ </td>
+ {if:!p.oneSectionOnly}
+ <td align="left">{s.name}</td>
+ {end:}
+ <td align="left">
+ {i.title}
+ {if:i.time_specific.value}
+ - {i.ticket_time.time}
+ {else:}
+
+ {end:}
+ </td>
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}
+ {if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ {a.selected} {a.unit_name}
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!--dates-->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {if:p.policy}
+ <div class="glmSection">
+ <div class="glmSectionName">
+ Please read and agree to our policy for this {term.performance.norm}.
+ </div>
+ <div class="glmBlockContent">
+ <p>{p.policy:h}</p>
+ </div>
+ <div class="glmSectionBold glmCartRequired">
+ <p>I agree to the policy stated above. <input class="glmPolicyCheckbox" type="checkbox" id="glmAgree" name="agree"></p>
+ </div>
+ </div>
+ {end:}
+</div>
+ {end:} <!--each performance-->
+ </div><!--/.glmCartEvents-->
+ <!-- glmCartVenueTotal - Sub totals for this venue -->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->
+ <div class="glmCartPayment">
+ <!-- If special requests possible -->
+ {if:c.ticket_spec_req.value}
+ <div class="glmSpecialRequests">
+ <div class="glmCartBlockSmallTitle">Please enter any special requests:</div>
+ <div class="glmCart"><input type="textarea" name="{c.id}_spec_req" value="{c.paymentForm.spec_req.value:h}"></div>
+ </div>
+ {end:}
+<!-- <div class="glmCartBlockSmallTitle">Payment for {term.ticket.plur} at {c.name}</div> -->
+
+ {if:!formData.centralPayment}
+ <div class="glmCartForm">
+<!--
+ {if:!cartHasOneVenueOnly}
+ <div class="glmCartSubTotals">
+ <div class="glmCartTable sub">
+ <div class="glmCartHeader">
+ <div class="glmCartText">Tickets</div>
+ <div class="glmCartText">Total</div>
+ </div>
+ <div class="glmCartValues">
+ <div class="glmCartText">{c.totalTickets}</div>
+ <div class="glmCartText">{c.totalPrice}</div>
+ </div>
+ </div>
+ </div>
+ {end:}
+-->
+ {if:c.paymentResult}
+ {if:c.paymentResult.approved}
+ <div class="glmCartBlockSTitle">Card Payment Approved</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div>{c.paymentResult.cctype}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div>{c.paymentResult.ccname}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div>{c.paymentResult.ccnumb}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div>{c.paymentResult.ccexp}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>
+ <div id="GLMnavigation">
+ <div id="GLMprintTickets" class="glmNavItem">{term.nav.print_vouchers}</div>
+ </div>
+ {else:}
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>
+ <ul><li>{c.paymentResult.description}</li></ul>
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>
+ {if:forceCheckoutPhase}
+ <div id="GLMnavigation">
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>
+ </div>
+ {end:}
+ {end:}<!--paymentResult approved-->
+ {end:}<!--paymentResult-->
+ {if:c.paymentResult.approved}
+ <p>Payment Accepted</p>
+ {else:}
+ {if:c.havePaymentMethod}
+ <!-- Payment type selection -->
+ <div class="glmCartBlockSmallTitle">
+ {if:c.havePayPal}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="pp"> PayPal
+ {else:}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="pp">
+ {end:}
+ {end:}
+ {if:c.haveCreditCards}
+ {if:c.havePayPal}
+
+ {end:}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="cc">
+ {end:}
+ {end:}
+ </div><!--/.glmCartBlockTitle-->
+ <!-- Credit Card Payment Form -->
+ {if:c.haveCreditCards}
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByCC" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByCC" class="">
+ {end:}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt" flexy:if="c.paymentForm.cctype.required">Total Charged to this Card</div>
+ <div class="glmCartFormInput">{c.totalPrice}</div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cctype.required">Card Type</div>
+ {if:c.paymentForm.cctype.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cctype.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="{c.id}_cctype">
+ <option value=""> </option>
+ {foreach:c.paymentForm.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccname.required">Name on Card</div>
+ {if:c.paymentForm.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccname" value="{c.paymentForm.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccnumb.required">Card Number</div>
+ {if:c.paymentForm.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccnumb" value="{c.paymentForm.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccexp.required">Expiration Date</div>
+ {if:c.paymentForm.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ Month
+ <select name="{c.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Year
+ <select name="{c.id}_ccyear">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cccode.required">Security Code</div>
+ {if:c.paymentForm.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_cccode" value="{c.paymentForm.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {end:}<!--haveCreditCards-->
+ {if:c.havePayPal}
+ <!-- PayPal Payment Form -->
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByPayPal" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByPayPal" class="">
+ {end:}
+ <div id="{c.id}_PayPal" memberID="{c.id}" class="glmPayPalButton">
+ <img src="{baseURL}common/EventManagement/front/MMM/assets/paypal_but6.gif"></a>
+ </div>
+ </span>
+ {end:}<!--havePayPal-->
+ {if:c.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+ {else:} <!-- havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+ {end:} <!-- havePaymentMethod -->
+ {end:} <!-- if payment not approved -->
+
+ </div> <!-- glmCartForm - Venue Payment -->
+ </div> <!-- glmCartPayment -->
+
+ {end:} <!-- if not central payment -->
+ </div> <!-- glmCartBlock -->
+ </div>
+ {end:} <!-- if Performances -->
+
+ {if:!cartRequiresPayment}
+ <input type="hidden" name="{c.id}_payTypeSelect" value="no">
+ {end:}
+
+ {end:} <!-- each venue -->
+
+{if:cartRequiresPayment}
+ {if:formData.centralPayment}
+
+ <div class="glmCartBlock">
+
+ {if:formData.centralPayment.havePaymentMethod}
+
+ {foreach:formData.centralPayment.paymentForm,p} <!-- This is a pseudo-loop since there should only be one entry. Keeps data consistent. -->
+
+ {if:p.cctype}
+ <!-- Credit Card Payment Form -->
+
+ <span id="{formData.centralPayment.id}_glmPayByCC" class="">
+ <div class="glmCartFormLine">
+ <div class="">
+ {if:formData.centralPayment.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{formData.centralPayment.id}" type="radio" name="{formData.centralPayment.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{formData.centralPayment.id}" type="hidden" name="{formData.centralPayment.id}_payTypeSelect" value="cc">
+ {end:}
+ </div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.cctype.required">Card Type</div>
+ <div class="glmCartFormInput">
+ <select name="{formData.centralPayment.id}_cctype">
+ <option value=""> </option>
+ {foreach:p.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccname.required">Name on Card</div>
+ {if:p.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_ccname" value="{p.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccnumb.required">Card Number</div>
+ {if:p.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_ccnumb" value="{p.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccexp.required">Expiration Date</div>
+ {if:p.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ Month
+ <select name="{formData.centralPayment.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Year
+ <select name="{formData.centralPayment.id}_ccyear">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.cccode.required">Security Code</div>
+ {if:p.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_cccode" value="{p.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {if:p.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {formData.centralPayment.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+
+ {end:} <!-- /Have Credit Cards -->
+ {end:} <!-- foreach payment -->
+
+ </div>
+
+ {else:} <!-- /havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+
+ {end:} <!-- /havePaymentMethod -->
+
+ {end:} <!-- Central Payment -->
+
+{end:} <!-- Cart Requires Payment -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <!-- glmCartBlock - A Venue -->
+ <div class="glmCartBlock">
+ {if:cartRequiresPayment}
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">Complete Purchase</div>
+<!-- NOT DISPLAYING THESE NOW
+ <div id="GLMpolicy">
+ (purchase and return policies go here)
+ </div>
+ -->
+ <p style="padding-top: 45px;">
+ {ssl_seal_head_script:h}
+ {ssl_seal_body_script:h}
+ </p>
+ </div>
+ {else:}
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">No Payment Required</div>
+ </div>
+ {end:}
+ <div style="float: right;">
+ <div class="glmCartTable totals" style="float: right;">
+ {if:cartRequiresPayment}
+
+ <div class="glmCartHeader">
+ <div class="glmGrandTotals">
+ Grand Total {totals.price}
+ </div>
+
+ <!-- <div class="glmCartText">{term.prop.plur_cap}</div> -->
+ <!-- <div class="glmCartText grand">Grand Total</div> -->
+ <!-- </div> -->
+ <!-- <div class="glmCartValues"> -->
+ <!-- <div class="glmCartText">{totals.venues}</div> -->
+ <!-- <div class="glmCartText grand">{totals.price}</div> -->
+ </div>
+ {end:}
+ </div><!--/.glmCartTable-->
+ {if:!cartHasOneVenueOnly}
+<!-- <div class="glmCartBlockText">
+ NOTE: There will be a separate order number and a separate credit card transaction for each {term.prop.norm}.
+ </div> -->
+ {end:}
+
+ {if:adminUser}
+ <div>
+ <input id="AdminNoPaymentInfo" type="checkbox" name="AdminNoPayment" value="TRUE"> No payment info required for Admin User.
+ </div>
+ {if:noPaymentReasons}
+ <div id="AdminNoPaymentInfoReason">
+ Reason for no payment information required:<br>
+ <select name="no_payment_reason">
+ <option value=""></option>
+ {foreach:noPaymentReasons,p}
+ <option value="{p:h}">{p:h}</option>
+ {end:}
+ </select>
+ </div>
+ {end:}
+ {end:}
+
+ <div id="GLMcheckout" style="float: right;">
+ {if:!blockCheckout}
+ <a id="GLMcheckoutBtn" class="glmNavItemWide">{term.nav.purchase}</a>
+ {else:}
+ <a class="glmNavItemInactive">Unable to checkout - please see above.</a>
+ {end:}
+ </div>
+ </div>
+ </div>
+ </form>
+</div><!-- GLMcontent -->
+
+<!-- jQuery scripts for controlling page actions -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ baseSCRIPT="baseSCRIPT"
+ startURL="startURL"
+ baseURL="baseURL"
+>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ var checkoutButtonPressed = false;
+ var duration = 400;
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+
+ // Prevent multiple submissions
+ if (checkoutButtonPressed == true) {
+ return;
+ }
+
+ // Check policy acceptance
+ var needPolicyChecked = false;
+ $(".glmPolicyCheckbox").each(function() {
+ if (!$(this).is(':checked')) {
+ needPolicyChecked = true;
+ }
+ });
+
+ if (needPolicyChecked) {
+ alert('You must agree to our policies shown in red above to checkout.');
+ return false;
+ }
+
+ checkoutButtonPressed = true;
+ setBlocker();
+ $('#GLMcheckoutForm').submit();
+
+ });
+
+ // Navigation buttons
+ $('#GLMnavCart').on('click', function() { // Add to Cart
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = flex_startURL;
+ });
+
+ // Send user to PayPal payment when button is clicked
+ $('.glmPayPalButton').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=800, left=100, top=25";
+ PayPalWindow = window.open(flex_baseURL + "?Action=Shop_PayPal&memberID=" + memberID, "PayPalWindow",disp_setting);
+ PayPalWindow.focus();
+ });
+
+ // Show payment method input when selected
+ $('.glmSelectPayByCC').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByCC').show(duration);
+ });
+ });
+ $('.glmSelectPayByPayPal').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByPayPal').show(duration);
+ });
+ });
+
+ // Start with payment types hidden - only prompt showing
+ $('.glmPayTypes').hide(0);
+
+ // If No Payment Info is selected, then show reasons list
+ $('#AdminNoPaymentInfo').on('click', function() {
+ checkNoPaymentInfo();
+ });
+
+ // Show or hide no payment info reasons list
+ function checkNoPaymentInfo() {
+ if ($('#AdminNoPaymentInfo').is(':checked')) {
+ $('#AdminNoPaymentInfoReason').show(0);
+ } else {
+ $('#AdminNoPaymentInfoReason').hide(0);
+ }
+ }
+
+ // Check is reasons are shown on startup.
+ checkNoPaymentInfo();
+
+ // Show submit access blocker
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Complete Page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">Purchase Complete</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ <p>\r
+ <div \r
+ id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint"\r
+ style="float: none; text-align: center;"\r
+ >*** {term.nav.print_vouchers} for {c.name} ***</div>\r
+ </p>\r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ \r
+ <!-- Adobe Reader Download -->\r
+ \r
+ <div class="glmBlock">\r
+ <div class="glmBlockContentRight">\r
+ <a href="http://www.adobe.com/go/getreader" target="GetAdobeReader"><img src="{baseURL}common/EventManagement/front/TicketsFoundation/assets/get_adobe_reader.png"></a>\r
+ </div>\r
+ <div class="glmBlockContentLeft">\r
+ <small>\r
+ <p>\r
+ Adobe Reader is required to view and print your {term.voucher.plur}. Adobe Reader is a free program available directly from Adobe. \r
+ If you do not already have Adobe Reader installed, click the "Get Adobe Reader" link now.\r
+ </p>\r
+ </small>\r
+ </div>\r
+ <div class="glmBlockContent">\r
+ <small>\r
+ <p>\r
+ <b>If you are unable to print your {term.voucher.plur}, please print this page or write down the order number(s)\r
+ below and bring that to the ticket office when you arrive.</b>\r
+ </p>\r
+ ORDER #: \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ {c.paymentResult.orderID} \r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </small> \r
+ </div>\r
+ </div> \r
+ \r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{successText:h}</div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div class="glmCartBlockTitle">Contact Information</div>\r
+ <div class="glmCartForm">\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">First Name:</div><div class="glmCartFormInput">{formData.contact.fname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Last Name:</div><div class="glmCartFormInput">{formData.contact.lname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Address:</div><div class="glmCartFormInput">{formData.contact.addr1.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">{formData.contact.addr2.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">City:</div><div class="glmCartFormInput">{formData.contact.city.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">State:</div><div class="glmCartFormInput">{formData.contact.state.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Country:</div><div class="glmCartFormInput">{formData.contact.country.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">ZIP/Postal Code:</div><div class="glmCartFormInput">{formData.contact.zip.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Phone:</div><div class="glmCartFormInput">{formData.contact.phone.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">E-Mail address:</div><div class="glmCartFormInput">{formData.contact.email.value}</div></div> \r
+ {if:opt_field_1_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_1_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_1.value:h}</div></div> {end:}\r
+ {if:opt_field_2_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_2_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_2.value:h}</div></div> {end:}\r
+ {if:opt_field_3_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_3_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_3.value:h}</div></div> {end:}\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">\r
+ {if:formData.contact.email_ok}\r
+ You have asked us to send information on activities and offers. \r
+ {else:}\r
+ You have asked us to NOT send information on activities and offers.<br>\r
+ We will only contact you regarding this order.\r
+ {end:}\r
+ </div></div> \r
+ \r
+ </div> <!-- glmCartForm -->\r
+ \r
+ </div> <!-- glmCartBlock - Contact information -->\r
+ \r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ <div class="glmCartBlock">\r
+ \r
+ <div class="glmCartBlockTitle">{term.ticket.plur_cap} at: {c.name}</div>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+ <div class="glmCartVenueInfo">\r
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}\r
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}\r
+ \r
+ </div>\r
+\r
+ <div class="glmCartEvents">\r
+ \r
+ {foreach:c.performances,p} <!-- each performance for this date -->\r
+ \r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventInfoLeft">\r
+ <div class="glmCartBlockSubTitle">\r
+ {term.performance.cap}: <span class="glmCartBlockSubTitleValue">{p.name}</span>\r
+ </div>\r
+ <div class="glmCartBlockText">\r
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} --> \r
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <div class="glmCartBlockDates"> \r
+ {foreach:p.dates,d}\r
+ \r
+ <div class="glmCartBlockSubTitle">\r
+ {term.ticket.cap} date: \r
+ <span class="glmCartBlockSubTitleValue">\r
+ {if:d.dateSpecific}\r
+ {d.fullDate}\r
+ {else:}\r
+ Use any date\r
+ {if:c.likelyDate}\r
+ - Likely Date {c.likelyDate}\r
+ {end:}\r
+ {end:}\r
+ </span>\r
+ </div>\r
+ \r
+\r
+ {foreach:d.sections,s}\r
+ <table border="0" width="100%">\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ {if:!p.oneSectionOnly}\r
+ <th align="left">Section</th>\r
+ {end:}\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">\r
+ {i.selected}\r
+ </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left">{s.name}</td>\r
+ {end:}\r
+ <td align="left">\r
+ {i.title}\r
+\r
+ {if:i.date_specific.value}\r
+ - {i.start_date.date}\r
+ {if:i.time_specific.value}\r
+ {i.ticket_time.time}\r
+ {end:}\r
+ {else:}\r
+ {if:i.time_specific.value}\r
+ - {i.ticket_time.time}\r
+ {end:}\r
+ {end:}\r
+ </td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {if:i.descr}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td colspan="4">\r
+ {else:}\r
+ <td colspan="3">\r
+ {end:}\r
+ {if:option.cart_images}\r
+ {if:i.image}\r
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>\r
+ {end:}\r
+ {end:} \r
+ <div class="glmBlockContentLeft">{i.descr:h}</div>\r
+ </td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {if:i.show_addons} -->\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left"> </td>\r
+ {end:}\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {end:} -->\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td> </td>\r
+ {end:}\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ </table><!--/.glmCartTable-->\r
+ {end:}<!--sections-->\r
+ \r
+ \r
+ {end:} <!-- dates --> \r
+ \r
+ </div> <!-- dates -->\r
+ \r
+ </div>\r
+\r
+ {if:p.policy}\r
+ <div class="glmSection">\r
+ <div class="glmBlockContent">\r
+ <div class="glmCartBlockSubTitle">\r
+ Our policy for this {term.performance.norm}.\r
+ </div>\r
+ <p>{p.policy:h}</p>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} <!-- each performance -->\r
+ \r
+ </div>\r
+ \r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+\r
+ {if:!cartHasOneVenueOnly}\r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+ <div class="glmCartTotals">\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Sub Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText">{c.totalPrice}</div>\r
+ </div>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+\r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ \r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->\r
+ <div class="glmCartPayment">\r
+ \r
+ <!-- If special requests possible -->\r
+ {if:c.ticket_spec_req.value}\r
+ <div class="glmCartForm" style="margin-bottom: 1em;">\r
+ <div class="glmCartBlockTitle">Special requests:</div>\r
+ <div class="glmSpecialRequests">{c.paymentForm.spec_req.value:h}</div>\r
+ </div> \r
+ {end:}\r
+ \r
+ \r
+ {if:c.paymentResult}\r
+ <div class="glmCartForm">\r
+ {if:c.paymentResult.approved}\r
+ <div class="glmCartBlockTitle">Card Payment Approved</div>\r
+ \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div><div class="glmCartFormInput">{c.paymentResult.cctype}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div><div class="glmCartFormInput">{c.paymentResult.ccname}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div><div class="glmCartFormInput">{c.paymentResult.ccnumb}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div><div class="glmCartFormInput">{c.paymentResult.ccexp}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>\r
+ <div id="GLMnavigation">\r
+ <div id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint">{term.nav.print_vouchers}</div>\r
+ </div>\r
+ {else:}\r
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>\r
+ <ul><li>{c.paymentResult.description}</li></ul>\r
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>\r
+ {if:forceCheckoutPhase}\r
+ <div id="GLMnavigation">\r
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} \r
+ \r
+ </div> <!-- glmCartForm - Venue Payment -->\r
+ {end:}\r
+ \r
+ </div> <!-- glmCartPayment -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ {end:} <!-- each venue -->\r
+ \r
+ <div class="glmCartBlock totals">\r
+ {if:cartHasContents} \r
+ <div class="glmCartTotals">\r
+ <div class="glmCartBlockTitle totals">Cart Totals</div>\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText grand">Grand Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText grand">{totals.price}</div>\r
+ </div>\r
+ </div><!--/.glmCartTable-->\r
+ </div><!--/.glmCartTotals-->\r
+ {else:}\r
+ <P>Your cart is currently empty.</P> \r
+ {end:}\r
+ </div> <!-- glmCartBlock -->\r
+ \r
+</div><!-- GLMcontent -->\r
+\r
+{trackingScript:h}\r
+\r
+<!-- jQuery scripts for controlling page actions -->\r
+<flexy:toJavascript\r
+ flexy:prefix="flex_"\r
+ baseSCRIPT="baseSCRIPT"\r
+ startURL="startURL"\r
+ appAdminURL="appAdminURL"\r
+ \r
+>\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+\r
+ // Navigation buttons\r
+ $('#GLMnavCart').click(function() { // Add to Cart \r
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';\r
+ });\r
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection\r
+ window.location = flex_startURL;\r
+ });\r
+ \r
+ // Print vouchers\r
+ $('.voucherPrint').click(function(){ \r
+ \r
+ var orderID = $(this).attr('emOrderID');\r
+ var orderVerify = $(this).attr('emOrderVerify');\r
+ var voucherWindow = window.open(flex_baseSCRIPT + "&Action=Shop_printVoucher&OrderID=" + orderID + "&orderVerify=" + orderVerify, \r
+ "voucherPrint", \r
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"\r
+ );\r
+ voucherWindow.focus();\r
+ voucherWindow.print();\r
+ return false;\r
+\r
+ });\r
+\r
+ });\r
+\r
+</script>\r
+<flexy:include src="MMM/foot.html" />\r
--- /dev/null
+<h2>\r
+ <a href="{baseSCRIPT}&Action=Shop_printVoucher&OrderID={cartEntry.paymentResult.orderID}&orderVerify={cartEntry.paymentResult.orderVerification}">\r
+ Click here to reprint your {term.voucher.plur}\r
+ </a>\r
+</h2>\r
+\r
+<h3>\r
+<!-- Tickets Purchased at: {term.ticket.plur_cap} Purchased at:<br> -->\r
+ {cartEntry.name}\r
+</h3>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+<!-- {if:cartEntry.descr}<p>{cartEntry.descr:h}</p>{end:} -->\r
+ \r
+<table border="1" cellspacing="0" cellpadding="2">\r
+\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ <th align="left">{term.performance.cap}</th>\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+\r
+{foreach:cartForSummaryCentral,c}\r
+{foreach:c.performances,p} <!-- each performance -->\r
+ {foreach:p.dates,d} <!-- each date -->\r
+ {foreach:d.sections,s}\r
+ \r
+ \r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">{i.selected}</td>\r
+ <td align="left">{p.name:h}</td>\r
+ <td align="left">\r
+ {i.title:h}\r
+ {if:i.date_specific.value}\r
+ - {i.ticket_date.date}\r
+ {if:i.time_specific.value}\r
+ {i.ticket_time.time}\r
+ {end:}\r
+ {else:}\r
+ {if:i.time_specific.value}\r
+ - {i.ticket_time.time}\r
+ {end:}\r
+ {end:}\r
+\r
+ </td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ <td align="left"> </td>\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ <td> </td>\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ \r
+ \r
+ {end:} <!-- each section -->\r
+ {end:} <!-- each performance for this date -->\r
+{end:} <!-- each date for this venue -->\r
+\r
+ <tr>\r
+ <td colspan="4"> </td>\r
+ <td align="right">{c.totalPrice}</td>\r
+ </tr>\r
+\r
+<!-- \r
+ <tr>\r
+ <th align="right">{c.totalTickets}</th>\r
+ <td colspan="6"> </td>\r
+ <th align="right">{c.totalPrice}</th>\r
+ </tr>\r
+ -->\r
+ \r
+</table>\r
+\r
+ <!-- If special requests possible -->\r
+{if:c.ticket_spec_req}\r
+<p>\r
+ {c.paymentForm.spec_req.value:h}\r
+</p> \r
+{end:}\r
+\r
+{end:} \r
+\r
+{if:cartEntry.ticket_policy}<p>{cartEntry.ticket_policy:h}</p>{end:}\r
+\r
+<table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th>First Name:</th><td>{formData.contact.fname.value}</td></tr> \r
+ <tr><th>Last Name:</th><td>{formData.contact.lname.value}</td></tr> \r
+ <tr><th>Address:</th><td>{formData.contact.addr1.value}</td></tr> \r
+ <tr><th> </th><td>{formData.contact.addr2.value}</td></tr> \r
+ <tr><th>City:</th><td>{formData.contact.city.value}</td></tr> \r
+ <tr><th>State:</th><td>{formData.contact.state.value}</td></tr> \r
+ <tr><th>Country:</th><td>{formData.contact.country.value}</td></tr> \r
+ <tr><th>ZIP/Postal Code:</th><td>{formData.contact.zip.value}</td></tr> \r
+ <tr><th>Phone:</th><td>{formData.contact.phone.value}</td></tr> \r
+ <tr><th>E-Mail address:</th><td>{formData.contact.email.value}</td></tr> \r
+</table>\r
+ \r
+<p> \r
+ <table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th colspan="2" align="center">Credit Card Payment Approved</th></tr>\r
+ <tr><th align="left">Card Type</th><td>{cartEntry.paymentResult.cctype}</td></tr>\r
+ <tr><th align="left">Name on Card</th><td>{cartEntry.paymentResult.ccname}</td></tr>\r
+ <tr><th align="left">Card Number</th><td>{cartEntry.paymentResult.ccnumb}</td></tr>\r
+ <tr><th align="left">Expiration Date</th><td>{cartEntry.paymentResult.ccexp}</td></tr>\r
+ <tr><th align="left">Authorization Code</th><td>{cartEntry.paymentResult.authCode}</td></tr>\r
+ </table>\r
+</p> \r
+ \r
+<!-- is this needed? <flexy:include src="MMM/foot.html" /> -->\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Section Selection Page\r
+\r
+-->\r
+\r
+<flexy:include src="MMM/head.html" />\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">{term.section.cap} Selection</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem">{term.nav.show_selected}</a>\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+\r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{sectionText:h}</div>\r
+\r
+{if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+{end:}\r
+\r
+ <p>You have selected</p>\r
+ <div class="glmSection">\r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">{performanceDetail.member_name}</div><br> \r
+ <div class="glmBlockName">{performanceDetail.name}</div>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+<!-- <p><span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</p> -->\r
+<!-- <p>{performanceDetail.descr:h}</p> -->\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <!-- List of available sections -->\r
+ <hr />\r
+ <p>Please select from the following</p>\r
+ <div class="glmSection">\r
+{foreach:sectionList,x} \r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">\r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}">{x.name}</a>\r
+ </div> \r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}" class="glmNavItem">{term.nav.select}</a>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+ <p><span class="glmBold">{term.section.cap}</span>: {x.member_name}</p>\r
+ <p>{x.descr:h}</p>\r
+ </div>\r
+ </div> \r
+{end:}\r
+ \r
+ </div>\r
+\r
+</div> <!-- /GLMcontent -->\r
+\r
+ {startScript:h}\r
+\r
+ $(document).ready(function(){ \r
+\r
+ // Code to kick off the geolocation-display feature \r
+ $("#locationMap").geolocate({\r
+ lat: "#lat",\r
+ lng: "#lon",\r
+ mapOptions: {\r
+ disableDefaultUI: false,\r
+ mapTypeControl: true,\r
+ mapTypeId: "roadmap",\r
+ zoom: 12\r
+ },\r
+ markerOptions: {\r
+ draggable: false,\r
+ title: "This is your selected location"\r
+ }\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+<flexy:include src="MMM/foot.html" />\r
--- /dev/null
+
+
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ <div class="glmBlockContentRight">
+ <div id="locationMap_{m.id}" class="GLMmapWindow" data-member-id="{m.id}">(map loads here)</div>
+ <form>
+ <input type="hidden" id="lat_{m.id}" value="{m.lat}">
+ <input type="hidden" id="lon_{m.id}" value="{m.lon}">
+ </form>
+ </div><!--/.glmBlockContentRight-->
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>
+ <div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date} through {p.end_date.date}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:!showTickets}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a>
+ {end:}
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value}, {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.event.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{introText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>Please select from the following</p>
+{if:showTickets}
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+<!-- <input type="hidden" name="PerformanceID" value="{performanceDetail.id}"> -->
+<!-- <input type="hidden" name="SectionID" value="{sectionDetail.id}"> -->
+{end:}
+ <!-- List of Locations -->
+ {foreach:membersList,m}
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:m.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{m.image}"></div>
+ {end:}
+ {end:}
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ {if:option.select_images}
+ {if:p.image}
+ <div class="startContent startContentLeft">
+ {else:}
+ <div class="startContent">
+ {end:}
+ {else:}
+ <div class="startContent">
+ {end:}
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+<!-- <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>-->
+ {if:p.start_date.timestamp}<div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date}{if:p.end_date.timestamp} - {p.end_date.date} {end:}</div>{end:}
+ <div class="glmDescr">{p.short_descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:p.image}
+ <div class="startImage startImageRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ {end:}
+ {if:!showTickets}
+<!-- <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a> -->
+ {end:}
+
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value} {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
+{if:showTickets}
+ <div id="GLMselect">
+ <a id="GLMselectButton" class="glmNavItemWide">{term.nav.select}</a>
+ </div>
+ </form>
+{end:}
+</div><!-- /GLMcontent -->
+<!--</div> -->
+{startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ </p>\
+ ';
+
+
+
+ $(document).ready(function(){
+
+ // Code to kick off the geolocation-display feature
+ function doLocationMap(id) {
+ $("#locationMap_" + id).geolocate({
+ lat: "#lat_" + id,
+ lng: "#lon_" + id,
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ }
+ {foreach:membersList,m}
+ doLocationMap({m.id});
+ {end:}
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDate_' + ticket.id).html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_inv_array[' + dateData['date'] + ']" value="' + dateData.id + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+// *** NEED TO FIX REFERENCE TO "performanceDetail" since that's not available on this page
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate);
+ } else {
+
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ $('#GLMselectButton').click(function() {
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+Anthony changes for "use any date" or whatever
+--This line, and those below, will be ignored--
+
+M checkout.html
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+
+<flexy:include src="MMM/head.html" />
+
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Ticket Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketOptText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>You have selected</p>
+ <!-- List of Ticket Options -->
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">{term.prop.cap}: {performanceDetail.member_name}</div>
+<!-- <div class="glmDescr">{term.order.cap} up to: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</div> -->
+ <!--<p>{performanceDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{sectionDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <!--<p>{sectionDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{ticketDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ {if:!ticketDetail.date_specific.value}
+ <div class="glmDescr">Use any date {if:ticketDetail.start_date.timestamp} from {ticketDetail.start_date.date} to {ticketDetail.end_date.date}{end:}</div>
+ {end:}
+ {if:!ticketDetail.time_specific.value}
+ <div class="glmDescr">Use any time</div>
+ {else:}
+ <div class="glmDescr">Time: {ticketDetail.ticket_time.time}</div>
+ {end:}
+ {if:!ticketDetail.unlimted_use.value}
+ <!-- <div class="glmDescr">Each {term.ticket.norm} may be used {ticketDetail.uses} time(s)</div> -->
+ {else:}
+ <div class="glmDescr">Each {term.ticket.norm} may be used an unlimited number of times</div>
+ {end:}
+ <div class="glmDescr">{ticketDetail.descr:h}</div>
+ </div>
+ </div>
+ </div>
+ <!-- Date and quantity selection -->
+ <p>Please select from the following.</p>
+ <div class="glmSection">
+ <div id="GLMeventDateSelectBlock">
+ <div id="GLMeventDateSelect" class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">Select desired date:</div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInputShort"><input type="text" id="GLMeventDate" name="ticket_date" value=""> (click in field to set date)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr quant">Select Quantity:</div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer">(please select date first)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {if:reason}<div id="GLMaddToCart" name="ticket">(disabled - please see above)</div>{else:}<div id="GLMaddToCart" class="glmNavItem add" name="ticket">{term.nav.add_to_cart}</div>{end:}
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ // Whether ticket has date specific inventory
+ var dateSpecific = {ticketDetail.date_specific.value} + 0;
+
+ // Dates for inventory data
+ var dates = {inventoryJSON:h};
+
+ $(document).ready(function(){
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+ var dateData = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector" name="quant"><option value="0"></option>[ticket-quants]</select>\
+ ';
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least {detail.performance.purch_leadtime} hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ </p>\
+ ';
+ var selectedInv;
+ var ticketQuants;
+ var addButtonPushed = false;
+
+ // Start by counting the number of dates to see if we have only 1
+ var dateCount = 0;
+// if (dateSpecific) {
+ $.each(dates, function(index, date) {
+ dateCount = dateCount + 1;
+ dateData = date;
+ });
+// }
+ // if there's no date specific tickets
+ if (!dateSpecific) {
+ // Populate date input field
+ $('#GLMeventDateSelectBlock').html('<input type="hidden" name="ticket_date" value="0">');
+ doQuantSelection();
+ // if there's only one date, then display that and move on.
+ } else if (!dateSpecific || dateCount == 1) {
+ // populate date input field
+ $('#GLMeventDate').val(dateData['date']);
+ $('#GLMtickets').html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_date" value="' + dateData['date'] + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+
+ doQuantSelection();
+ } else {
+ // Use the date picker to select a date
+ dateData = false;
+ $("#GLMeventDate").datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Update input message
+ $('#GLMdateMessage').html('<br />');
+
+ // Get data for the selected date
+ dateData = dates[selectedDate];
+ doQuantSelection();
+ } // Date Selection
+
+ }); // Date Picker
+
+ }
+
+ function doQuantSelection() {
+ // Build the ticket quant options
+ ticketQuants = '';
+ var selectMax = dateData['available'];
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+ var tooLate = dateData['tooLate'];
+ if (tooLate) {
+ $('#GLMticketQuantContainer').html(ticketTooLate);
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ $('#GLMticketQuantContainer').html(ticketQuantSelection.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+// doAddToCartSetup();
+ }
+
+// function doAddToCartSetup() {
+ // Add to cart action
+ $('#GLMaddToCart').click(function() {
+ if (addButtonPushed) {
+ return;
+ }
+ var reason = '';
+ // Check date
+ if (dateData) {
+ selectedInv = dateData.id;
+ } else {
+ reason = reason.concat('* You need to select a date first.\n');
+ }
+ // Check quantity
+ var selectedQuant = (parseInt($('#glmQuantSelector').val()) + 0);
+ if (selectedQuant == 0) {
+ reason = reason.concat('* You need to select a quantity first.\n');
+ }
+ // Check if there's a reason we can't add this to the cart yet
+ if (reason != '') {
+ alert(reason);
+ return;
+ }
+ // Adding to cart
+ addButtonPushed = true;
+ $("#GLMeventDate").datepicker('disable');
+ $('#glmQuantSelector').prop('disabled', 'disabled');
+ setBlocker();
+ // Submit to cart
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=add&PerformanceID={performanceDetail.id}&SectionID={sectionDetail.id}&TicketID={ticketDetail.id}&ticket_inv=" + selectedInv + "&quant=" + selectedQuant;
+
+ });
+// }
+ // Code to kick off the geolocation-display feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ // Navigation buttons
+ $('#GLMnavCart').click(function() { // Add to Cart
+ window.location = '{baseSCRIPT}&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = '{startURL:h}';
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+</script>
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="MMM/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.ticket.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketText:h}</div>
+{if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+{end:}
+ <p>You have selected</p>
+ <!-- List of Tickets -->
+
+
+{foreach:sections,s}
+ <div class="glmSection">
+ <div class="glmBlock">
+
+
+ <div class="glmBlockContent">
+ {if:performanceDetail.image}
+ <div class="glmBlockContentRight ticketSelectImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{performanceDetail.image}"></div>
+ <div class="glmBlockContentLeft ticketSelectContent">
+ {else:}
+ <div class="ticketSelectContent">
+ {end:}
+
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.member_name:h}</div><br>
+ <div class="glmBlockName">{performanceDetail.name:h}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}
+-->
+ </div>
+
+ {if:performanceDetail.descr}
+ {performanceDetail.descr:h}
+ {end:}
+ </div> <!-- description -->
+ </div> <!-- member data left -->
+ </div> <!-- glmBlockContent -->
+ </div> <!-- glmBlock -->
+ </div> <!-- sections -->
+ <!-- List of Available Events -->
+ <div id="GLMselect" style="float: right;">
+ <a class="GLMselectButton glmNavItem">{term.nav.select}</a>
+ </div>
+ <p class="GLMTicketSelectExtraText">Please select from the following. If you do not see the number of tickets available that you require, please select a different date or time.</p>
+ <div class="glmSection">
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+ <input type="hidden" name="PerformanceID" value="{performanceDetail.id}">
+ <input type="hidden" name="SectionID" value="{sectionDetail.id}">
+ {foreach:s.ticketsData,x}
+ {if:!x.tooLateToBuy}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockContentRight">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div> <!-- glmBLockContentRight -->
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={performanceDetail.id}&SectionID={x.section_id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ {end:}
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:x.descr}
+ <p>{x.short_descr:h}</p>
+ {end:}
+ <p>
+ {if:!x.date_specific.value}
+ {if:x.start_date.timestamp} Date: {x.start_date.date}{end:}{if:!x.start_end_dates_same} to {x.end_date.date}{end:}{if:!x.time_specific.value} {end:}
+ {end:}
+ {if:!x.time_specific.value}
+
+ {else:}
+ Time: {x.ticket_time.time}
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </p>
+ </div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ </div><!--/.glmBlock-->
+ {end:}
+ {end:}
+ <div id="GLMselect">
+ <a class="GLMselectButton glmNavItem">{term.nav.select}</a>
+ </div>
+ </form>
+ </div> <!-- glmSection -->
+
+{end:}
+
+</div> <!-- /GLMcontent -->
+
+{if:option.ticket_selection.include_options_in_ticket_list}
+ <!-- jQuery scripts for controlling page actions -->
+ {startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least [hours] hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ ';
+
+
+ $(document).ready(function(){
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ if (ticket.haveFutureInventory) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html(' \
+ <div class="glmTicketsSelectPrompt">Date Available: </div> \
+ <div class="glmTicketsSelectValue"> \
+ <div class="glmInput"> \
+ ' + dateData.ticket_date.date + ' \
+ <input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '"> \
+ </div> \
+ </div>');
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ var mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ if (inventory[mdy]['tooLate']) {
+ return [false,"","Not Available"];
+ } else {
+ return [true,"","Available"];
+ }
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ if($('#GLMeventDateInput_' + ticket.id).length > 0) {
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: ticket.startDate,
+ maxDate: ticket.endDate,
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+ }
+
+ }
+
+ } // if have future inventory
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate.replace(/\[hours\]/g, {performanceDetail.purch_leadtime}));
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ var selectButtonPressed = false;
+
+ $('.GLMselectButton').click(function() {
+ // Prevent multiple submissions
+ if (selectButtonPressed == true) {
+ return;
+ }
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+ if( $(window).width() < 768 ){
+ $('.glmBlock').not(":first").each(function() {
+ var left = $(this).find( $('.glmBlockContentLeft') );
+ left.prependTo( $(this) ).find( $('glmBlockContentRight') );
+ });
+ }
+ });
+ </script>
+{end:}
+<flexy:include src="MMM/foot.html" />
--- /dev/null
+<!-- Footer content for all Front-End pages -->
+{if:option.development}
+ <p id="glmDevelopmentNotice">
+ Running on Development Server:
+ <span style="float: right;">
+ <a href="{baseSCRIPT}&session_reset=true">Reset Session</a>
+ </span>
+ </p>
+{end:}
\ No newline at end of file
--- /dev/null
+<!-- Header content for all Front-End pages -->
+{startScript:h}
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAppURL = '{baseAppURL}';
+</script>
+{if:!jQueryLoaded}
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+{end:}
+{if:!jQueryUiLoaded}
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+{end:}
+<script type="text/javascript" src="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.js?serial={timestamp}"></script>
+<script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>
+<link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.css">
+{if:customCssFile}
+ <!-- local css overrides for the current site -->
+ <link rel="stylesheet" type="text/css" href="{customCssFile}">
+{end:}
+{if:frontDebug}
+ <!-- This is simply here as something for jQuery code to check if we're doing debug -->
+ <div id="EMadminDebug"></div>
+{end:}
+{startScript:h}
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25";
+ {if:frontDebug}
+ debugWindowFront = window.open("{baseURL}index.php?Action=Debug_update","emDebugWindowFront",disp_setting);
+ {end:}
+</script>
+
+<div id="glmReloadBlocker" class="glmPageLoadBlockerHidden">
+ <div>Updating your information<br>Please wait ...</div>
+</div>
+
+ {if:adminUser}
+ <h2 style="border: 1px solid black; text-align: center;">Purchasing By Admin User</h2>
+ {end:}
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+
+ <h1>PLEASE NOTE:</h1>
+
+ <p>
+ There is no general access to this site.
+ All access to this site should be through an appropriate link.
+ If you arrived here by mistake (or exploring), nothing but this message will be displayed.
+ If you have any concerns about this site, please contact Gaslight Media.
+ </p>
+
+ <p>
+ Gaslight Media<br>
+ 120 East Lake Street<br>
+ Petoskey, MI 49770<br>
+ <br>
+ Phone: 231-487-0692<br>
+ E-Mail: info@gaslightmedia.com<br>
+ Web: http://www.gaslightmedia.com
+ </p>
+
+ </body>
+
+</html>
+
+
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body id="debugBody">\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="updateTimestamp">\r
+ <b>Updated:</b> {debugUpdateTime}\r
+ </div> \r
+ <div id="debugBody">\r
+ {debugData:h}\r
+ </div>\r
+ </body>\r
+ \r
+ {startScript:h}\r
+ \r
+ // Reload the current window with Action = Debug_update\r
+ function reloadDebugWindow()\r
+ {\r
+ window.location("{baseSCRIPT}&Action=Debug_update");\r
+ }\r
+ \r
+ </script> \r
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body>\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="debugData">Debug Startup</div>\r
+ </body>\r
+</html>
\ No newline at end of file
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="SaultSteMarie/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Your PayPal payment has been approved.</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ Your cart will now reflect that the payment has been made.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="SaultSteMarie/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Unable to process your payment!</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ <div class="glmCartFormPrompt glmCartRequired">Sorry, there was a problem.</div>\r
+ </p>\r
+ \r
+ <p>\r
+ We were unable to find your purchase information and are therefore \r
+ are unable to process your payment through PayPal. This could be\r
+ due to you not performing any action with your pending purchase\r
+ for too long. Please click the "Return to selected tickets" button\r
+ at the top of the checkout page to see if your selections are still listed.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Additional Info Page
+-->
+<flexy:include src="SaultSteMarie/head.html" /> <!-- Note direct reference to interface type -->
+
+<form id="cartForm" action="">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a> <!-- sends user to cart page -->
+ {if:!option.ticket_shop.start_at_cart}
+ <a class="small button right radius buttonTickets" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to start of shop -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{cartText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+
+ <!-- Problem display -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <h2>We're sorry, we had a problem with your request:</h2>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+ <!-- Cart Contents -->
+
+{foreach:cart,c} <!-- each venue -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="large-12 columns"><h2>{c.name:h}</h2></div>
+ </div>
+ {end:}
+
+
+ <!-- If we need to assign this ticket to be sold in another venue or we need to ask for likely date of use -->
+
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ <p>
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange glmTicketDateInput"> mm/dd/yyyy
+ {if:text.cart.select_likely_date_explain}
+ <br>{text.cart.select_likely_date_explain}
+ {end:}
+ </p>
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+{end:} <!-- /each venue -->
+
+ <!-- Cart Summary and Checkout Button -->
+
+{if:cartHasContents}
+ <div class="row">
+ <div class="large-12 columns text-right">
+ {if:!blockCheckout}
+ <a class="small button right radius buttonTickets buttonTicketsGo" id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" >{term.nav.checkout}</a>
+ {else:}
+ <a class="small button right radius alert disabled buttonTickets">Please complete the items in RED above.</a>
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{else:}
+ <div class="row">
+ <div class="large-12 columns">
+ <p class="right">Your cart is currently empty.</p>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{end:}
+
+</form> <!-- /cartForm -->
+
+<!-- Set some flexy page parameters for use in JAVAscript -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ vertScroll="vertScroll"
+ addtionalInfoPage="option.ticket_shop.additionalInfo.use_page"
+>
+
+<!-- jQuery scripts for controlling page actions -->
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_additionalInfo&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365,
+ beforeShow: function(){
+ $(".ui-datepicker").css('font-size', 12)
+ }
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = flex_startURL;
+ });
+
+ if (flex_vertScroll) {
+ window.scrollTo(0, flex_vertScroll);
+ }
+
+ });
+
+</script>
+<flexy:include src="SaultSteMarie/foot.html" /> <!-- Note direct reference to interface type -->
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Cart Page
+-->
+<flexy:include src="SaultSteMarie/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <form id="cartForm" action="">
+ <!-- GLMpageTitle - A title for this page -->
+ <!--<div id="GLMpageTitle">Selected {term.performance.plur_cap} and {term.ticket.plur_cap}</div>-->
+ <div id="GLMHeader">
+<!-- <div id="GLMpageTitle">Cart</div> -->
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+<!-- <a class="glmNavItem cart" style="margin-right: 1em;">Reprint a previous {term.order.cap}: <input id="reprintVoucher" type="text" style="width: 6em; font-size: .8em;"></a> -->
+ </div>
+ </div>
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{cartText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ {if:havePromoCodes}
+ <div class="glmCartBlock">
+ <div class="glmCartFormInput">
+ <div class="glmCartText" style="width: auto;">If you have a {term.promo.norm}, please enter it here: </div><input id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
+ </div>
+ </div>
+ {end:}
+ {foreach:cart,c}<!-- each venue -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockSmallTitle">{c.name}</div>
+ <div class="glmCartEvents">
+ {foreach:c.performances,p} <!-- each performance for this date -->
+ <div class="glmCartEvent" style="margin-bottom: 2em;">
+ <div class="glmCartEventInfo">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem" style="position: relative; top: 0px;">{term.nav.select_more_of_these}</a>
+ {end:}
+ <div class="glmCartEventInfoLeft">
+
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmDescr">
+ {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile">{p.short_descr:h}</div>{end:}
+ {if:option.cart_images}{if:p.image}
+ <img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">
+ {end:}{end:}
+ </div>
+ </div>
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%" style="padding-right: .5em;">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ <input class="glmCartQuant" type="number" id="ticket_{i.invID}" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}">
+ </td>
+ {if:!p.oneSectionOnly}
+ <td align="left">{s.name}</td>
+ {end:}
+ <td align="left">{i.title}</td>
+ <td align="right" style="padding-right: .5em;">{if:i.show_price}{i.price}{end:}</td>
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.problem}
+ <tr>
+ <td> </td><td class="glmCartRequired">{i.problemText}</td>
+ </tr>
+ {end:}
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}{if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}{end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ <input class="glmCartQuant" type="number" id="addon_{a.id}" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units=" {a.name}" value="{a.selected}">
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!-- dates -->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {end:} <!--performances-->
+ </div><!--/.glmCartEvents-->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+
+{if:option.ask_for_assignment_and_likely_date}
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange"> mm/dd/yyyy
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+{end:}
+
+
+ </div> <!-- glmCartBlock -->
+ {end:}<!-- each venue -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <div class="glmCartBlock totals">
+ {if:cartHasContents}
+ <div class="glmGrandTotals">
+ Grand Total {totals.price}
+ </div>
+ <div class="glmCartWide">
+ {if:totals.tickets}
+<!-- {if:!blockCheckout} -->
+ <a id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" class="glmNavItem">{term.nav.checkout}</a>
+<!-- {else:}
+ <a class="glmNavItemInactive">Please complete the items in RED above.</a>
+ {end:} -->
+ {else:}
+ <a class="glmNavItemInactive">Your cart is currently empty.</a>
+ {end:}
+ </div>
+ {else:}
+ <P>Your cart is currently empty.</P>
+ {end:}
+ </div> <!-- glmCartBlock -->
+
+ {if:option.cart_promotions}
+ <div class="glmCartBlock">
+ You may also be interested in ...<br>
+ {foreach:cartPromotions,p}
+ <div class="glmBlockContent" style="margin-bottom: 2em;">
+ <div class="glmCartBlockTitle" style="margin-top: .5em;"><a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={p.id}">{p.member_name:h} - {p.name:h}</a></div>
+ {if:p.image}
+ <div class="glmBlockContentRight cartImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ <div class="glmBlockContentLeft cartContent">
+ {if:p.start_date}
+ <p>
+ Dates: {p.start_date.date}
+ </p>
+ {end:}
+ <!-- PER REQUEST, WE'RE NOW JUST SHOWING SHORT DESCR HERE -->
+ {if:p.short_descr}<div class="glmCartEventDescr promoDescr">{p.short_descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile promoDescrMobile">{p.short_descr:h}</div>{end:}
+ </div>
+ </div>
+ {end:}
+ </div>
+ {end:}
+
+
+ </form>
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Convert input fields to select lists
+ $('.glmCartQuant').each(function() {
+
+ var id = $(this).attr('id');
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var max = $(this).attr('data-max');
+ var value = $(this).attr('value');
+ var units = $(this).attr('data-units');
+ var numbSel = '';
+
+ // Build a picklist for this input
+ for (var i = 0 ; i {lte:h} max ; i++) {
+ if (value == i) {
+ numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
+ } else {
+ numbSel = numbSel.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ }
+
+ $('#quant_' + id).html('<select id="' + id + '" class="glmCartSelect" data-ticket="' + ticket + '" data-addon="' + addon + '">' + numbSel + '</select>' + units);
+
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a cart value changes, submit it as a cart update.
+ $('.glmCartSelect').change(function() {
+ vertScroll = getVertScroll();
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var value = $(this).val();
+
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update&ticket_inv=" + ticket + "&addon=" + addon + "&quant=" + value + "&vertScroll=" + vertScroll;
+
+ });
+
+ // When there's a change in the promo code input, submit it.
+ $('#promoCodeInput').change(function() {
+ var value = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=promo_code&promo_code=" + value;
+ });
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = '{startURL:h}';
+ });
+
+/* Not using right now
+ // Reprint order button
+ $('#reprintVoucher').on('keypress', function(event) {
+ if(event.which == '13'){
+ var orderID = $(this).val();
+ var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucher&OrderID=' + orderID,
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ }
+ });
+*/
+
+ if ({vertScroll}) {
+ window.scrollTo(0,{vertScroll});
+ }
+
+ });
+
+</script>
+<flexy:include src="SaultSteMarie/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Page
+-->
+<flexy:include src="SaultSteMarie/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Selected {term.ticket.plur_cap}</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{checkoutText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ <p>See below for more information.</p>
+ </div>
+ {end:}
+ <form id="GLMcheckoutForm" action='{baseSCRIPT}&Action=Shop_checkoutSubmit' method="POST">
+ <input type="hidden" name="Action" value="Shop_checkoutSubmit">
+ <!-- glmCartBlock - Contact information - Container for all general customer information -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">Contact Information</div>
+ <!-- glmCartForm - A container for a block of form input with prompts-->
+ <div class="glmCartForm">
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ {if:formData.contact.fname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.fname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="fname" value="{formData.contact.fname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ {if:formData.contact.lname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.lname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="lname" value="{formData.contact.lname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ {if:formData.contact.addr1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr1" value="{formData.contact.addr1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr2.required"> </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr2.required"> </div>
+ {if:formData.contact.addr2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr2" value="{formData.contact.addr2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.city.required">{text.cart.checkout.city}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.city.required">{text.cart.checkout.city}: </div>
+ {if:formData.contact.city.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.city.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="city" value="{formData.contact.city.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.state.required">{text.cart.checkout.state}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.state.required">{text.cart.checkout.state}: </div>
+ {if:formData.contact.state.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.state.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="state">
+ <option value=""> </option>
+ {foreach:formData.contact.state.states,s}
+ {if:s.stateSelected}
+ <option value="{s.stateID}" selected>{s.stateName:h}</option>
+ {else:}
+ <option value="{s.stateID}">{s.stateName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.country.required">{text.cart.checkout.country}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.country.required">{text.cart.checkout.country}: </div>
+ {if:formData.contact.country.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.country.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="country">
+ <option value=""> </option>
+ {foreach:formData.contact.country.countries,s}
+ {if:s.countrySelected}
+ <option value="{s.countryID}" selected>{s.countryName:h}</option>
+ {else:}
+ <option value="{s.countryID}">{s.countryName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ {if:formData.contact.zip.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.zip.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="zip" value="{formData.contact.zip.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ {if:formData.contact.phone.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.phone.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="phone" value="{formData.contact.phone.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email.required">{text.cart.checkout.email}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email.required">{text.cart.checkout.email}: </div>
+ {if:formData.contact.email.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email" value="{formData.contact.email.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ {if:formData.contact.email2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email2" value="{formData.contact.email2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt">OK to Send E-Mail?</div>
+ {if:formData.contact.email_ok}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok" checked> {text.cart.checkout.activities_offers}</div>
+ {else:}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok"> {text.cart.checkout.activities_offers}</div>
+ {end:}
+ </div><!--/.glmCartFormLine-->
+
+ {if:opt_field_1_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ {if:formData.contact.opt_field_1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_1" value="{formData.contact.opt_field_1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_2_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ {if:formData.contact.opt_field_2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_2" value="{formData.contact.opt_field_2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_3_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ {if:formData.contact.opt_field_3.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_3.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_3" value="{formData.contact.opt_field_3.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+
+
+ </div> <!--/.glmCartForm-->
+ </div><!--/.glmCartBlock-->
+
+ {foreach:cart,c} <!-- each venue -->
+ {if:c.performances}
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">{term.prop.cap}: {c.name}</div>
+ <!-- glmCartVenueInfo -->
+<!--
+ <div class="glmCartVenueInfo">
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}
+ </div>
+-->
+ <div class="glmCartEvents">
+
+ {foreach:c.performances,p} <!-- each performance for this date -->
+<div class="glmCartBlock">
+ <div class="glmCartEvent">
+ <div class="glmCartEventInfo">
+ <div class="glmCartEventInfoLeft">
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmCartBlockText">
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} -->
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}
+ </div><!--/.glmCartBlockText-->
+ </div><!--/.glmCartEventInfoLeft-->
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ <div class="glmDescr">
+ <span class="glmCartBlockSubTitleValue">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </span>
+ </div><!--/./glmCartBlockSubTitle-->
+
+
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ {i.selected}
+ </td>
+ {if:!p.oneSectionOnly}
+ <td align="left">{s.name}</td>
+ {end:}
+ <td align="left">{i.title}</td>
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}
+ {if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ {a.selected} {a.unit_name}
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!--dates-->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {if:p.policy}
+ <div class="glmSection">
+ <div class="glmSectionName">
+ Please read and agree to our policy for this {term.performance.norm}.
+ </div>
+ <div class="glmBlockContent">
+ <p>{p.policy:h}</p>
+ </div>
+ <div class="glmSectionBold glmCartRequired">
+ <p>I agree to the policy stated above. <input class="glmPolicyCheckbox" type="checkbox" id="glmAgree" name="agree"></p>
+ </div>
+ </div>
+ {end:}
+</div>
+ {end:} <!--each performance-->
+ </div><!--/.glmCartEvents-->
+ <!-- glmCartVenueTotal - Sub totals for this venue -->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->
+ <div class="glmCartPayment">
+ <!-- If special requests possible -->
+ {if:c.ticket_spec_req.value}
+ <div class="glmSpecialRequests">
+ <div class="glmCartBlockSmallTitle">Please enter any special requests:</div>
+ <div class="glmCart"><input type="textarea" name="{c.id}_spec_req" value="{c.paymentForm.spec_req.value:h}"></div>
+ </div>
+ {end:}
+<!-- <div class="glmCartBlockSmallTitle">Payment for {term.ticket.plur} at {c.name}</div> -->
+
+ {if:!formData.centralPayment}
+ <div class="glmCartForm">
+<!--
+ {if:!cartHasOneVenueOnly}
+ <div class="glmCartSubTotals">
+ <div class="glmCartTable sub">
+ <div class="glmCartHeader">
+ <div class="glmCartText">Tickets</div>
+ <div class="glmCartText">Total</div>
+ </div>
+ <div class="glmCartValues">
+ <div class="glmCartText">{c.totalTickets}</div>
+ <div class="glmCartText">{c.totalPrice}</div>
+ </div>
+ </div>
+ </div>
+ {end:}
+-->
+ {if:c.paymentResult}
+ {if:c.paymentResult.approved}
+ <div class="glmCartBlockSTitle">Card Payment Approved</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div>{c.paymentResult.cctype}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div>{c.paymentResult.ccname}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div>{c.paymentResult.ccnumb}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div>{c.paymentResult.ccexp}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>
+ <div id="GLMnavigation">
+ <div id="GLMprintTickets" class="glmNavItem">{term.nav.print_vouchers}</div>
+ </div>
+ {else:}
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>
+ <ul><li>{c.paymentResult.description}</li></ul>
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>
+ {if:forceCheckoutPhase}
+ <div id="GLMnavigation">
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>
+ </div>
+ {end:}
+ {end:}<!--paymentResult approved-->
+ {end:}<!--paymentResult-->
+ {if:c.paymentResult.approved}
+ <p>Payment Accepted</p>
+ {else:}
+ {if:c.havePaymentMethod}
+ <!-- Payment type selection -->
+ <div class="glmCartBlockSmallTitle">
+ {if:c.havePayPal}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="pp"> PayPal
+ {else:}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="pp">
+ {end:}
+ {end:}
+ {if:c.haveCreditCards}
+ {if:c.havePayPal}
+
+ {end:}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="cc">
+ {end:}
+ {end:}
+ </div><!--/.glmCartBlockTitle-->
+ <!-- Credit Card Payment Form -->
+ {if:c.haveCreditCards}
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByCC" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByCC" class="">
+ {end:}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt" flexy:if="c.paymentForm.cctype.required">Total Charged to this Card</div>
+ <div class="glmCartFormInput">{c.totalPrice}</div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cctype.required">Card Type</div>
+ {if:c.paymentForm.cctype.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cctype.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="{c.id}_cctype">
+ <option value=""> </option>
+ {foreach:c.paymentForm.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccname.required">Name on Card</div>
+ {if:c.paymentForm.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccname" value="{c.paymentForm.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccnumb.required">Card Number</div>
+ {if:c.paymentForm.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccnumb" value="{c.paymentForm.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccexp.required">Expiration Date</div>
+ {if:c.paymentForm.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ Month
+ <select name="{c.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Year
+ <select name="{c.id}_ccyear">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cccode.required">Security Code</div>
+ {if:c.paymentForm.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_cccode" value="{c.paymentForm.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {end:}<!--haveCreditCards-->
+ {if:c.havePayPal}
+ <!-- PayPal Payment Form -->
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByPayPal" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByPayPal" class="">
+ {end:}
+ <div id="{c.id}_PayPal" memberID="{c.id}" class="glmPayPalButton">
+ <img src="{baseURL}common/EventManagement/front/SaultSteMarie/assets/paypal_but6.gif"></a>
+ </div>
+ </span>
+ {end:}<!--havePayPal-->
+ {if:c.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+ {else:} <!-- havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+ {end:} <!-- havePaymentMethod -->
+ {end:} <!-- if payment not approved -->
+
+ </div> <!-- glmCartForm - Venue Payment -->
+ </div> <!-- glmCartPayment -->
+
+ {end:} <!-- if not central payment -->
+ </div> <!-- glmCartBlock -->
+ </div>
+ {end:} <!-- if Performances -->
+
+ {if:!cartRequiresPayment}
+ <input type="hidden" name="{c.id}_payTypeSelect" value="no">
+ {end:}
+
+ {end:} <!-- each venue -->
+
+{if:cartRequiresPayment}
+ {if:formData.centralPayment}
+
+ <div class="glmCartBlock">
+
+ {if:formData.centralPayment.havePaymentMethod}
+
+ {foreach:formData.centralPayment.paymentForm,p} <!-- This is a pseudo-loop since there should only be one entry. Keeps data consistent. -->
+
+ {if:p.cctype}
+ <!-- Credit Card Payment Form -->
+
+ <span id="{formData.centralPayment.id}_glmPayByCC" class="">
+ <div class="glmCartFormLine">
+ <div class="">
+ {if:formData.centralPayment.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{formData.centralPayment.id}" type="radio" name="{formData.centralPayment.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{formData.centralPayment.id}" type="hidden" name="{formData.centralPayment.id}_payTypeSelect" value="cc">
+ {end:}
+ </div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.cctype.required">Card Type</div>
+ <div class="glmCartFormInput">
+ <select name="{formData.centralPayment.id}_cctype">
+ <option value=""> </option>
+ {foreach:p.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccname.required">Name on Card</div>
+ {if:p.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_ccname" value="{p.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccnumb.required">Card Number</div>
+ {if:p.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_ccnumb" value="{p.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.ccexp.required">Expiration Date</div>
+ {if:p.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ Month
+ <select name="{formData.centralPayment.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Year
+ <select name="{formData.centralPayment.id}_ccyear">
+ <option value=""> </option>
+ {foreach:p.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="p.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!p.cccode.required">Security Code</div>
+ {if:p.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{p.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{formData.centralPayment.id}_cccode" value="{p.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {if:p.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {formData.centralPayment.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+
+ {end:} <!-- /Have Credit Cards -->
+ {end:} <!-- foreach payment -->
+
+ </div>
+
+ {else:} <!-- /havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+
+ {end:} <!-- /havePaymentMethod -->
+
+ {end:} <!-- Central Payment -->
+
+{end:} <!-- Cart Requires Payment -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <!-- glmCartBlock - A Venue -->
+ <div class="glmCartBlock">
+ {if:cartRequiresPayment}
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">Complete Purchase</div>
+<!-- NOT DISPLAYING THESE NOW
+ <div id="GLMpolicy">
+ (purchase and return policies go here)
+ </div>
+ -->
+ <p style="padding-top: 45px;">
+ {ssl_seal_head_script:h}
+ {ssl_seal_body_script:h}
+ </p>
+ </div>
+ {else:}
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">No Payment Required</div>
+ </div>
+ {end:}
+ <div style="float: right;">
+ <div class="glmCartTable totals" style="float: right;">
+ {if:cartRequiresPayment}
+
+ <div class="glmCartHeader">
+ <!-- <div class="glmCartText">{term.prop.plur_cap}</div> -->
+ <div class="glmCartText grand">Grand Total</div>
+ </div>
+ <div class="glmCartValues">
+ <!-- <div class="glmCartText">{totals.venues}</div> -->
+ <div class="glmCartText grand">{totals.price}</div>
+ </div>
+ {end:}
+ </div><!--/.glmCartTable-->
+ {if:!cartHasOneVenueOnly}
+<!-- <div class="glmCartBlockText">
+ NOTE: There will be a separate order number and a separate credit card transaction for each {term.prop.norm}.
+ </div> -->
+ {end:}
+
+ {if:adminUser}
+ <div>
+ <input type="checkbox" name="AdminNoPayment" value="TRUE"> No payment info required for Admin User.
+ </div>
+ {end:}
+
+ <div id="GLMcheckout" style="float: right;">
+ {if:!blockCheckout}
+ <a id="GLMcheckoutBtn" class="glmNavItemWide">{term.nav.purchase}</a>
+ {else:}
+ <a class="glmNavItemInactive">Unable to checkout - please see above.</a>
+ {end:}
+ </div>
+ </div>
+ </div>
+ </form>
+</div><!-- GLMcontent -->
+
+<!-- jQuery scripts for controlling page actions -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ baseSCRIPT="baseSCRIPT"
+ startURL="startURL"
+ baseURL="baseURL"
+>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ var checkoutButtonPressed = false;
+ var duration = 400;
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+
+ // Prevent multiple submissions
+ if (checkoutButtonPressed == true) {
+ return;
+ }
+
+ // Check policy acceptance
+ var needPolicyChecked = false;
+ $(".glmPolicyCheckbox").each(function() {
+ if (!$(this).is(':checked')) {
+ needPolicyChecked = true;
+ }
+ });
+
+ if (needPolicyChecked) {
+ alert('You must agree to our policies shown in red above to checkout.');
+ return false;
+ }
+
+ checkoutButtonPressed = true;
+ setBlocker();
+ $('#GLMcheckoutForm').submit();
+
+ });
+
+ // Navigation buttons
+ $('#GLMnavCart').on('click', function() { // Add to Cart
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = flex_startURL;
+ });
+
+ // Send user to PayPal payment when button is clicked
+ $('.glmPayPalButton').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=800, left=100, top=25";
+ PayPalWindow = window.open(flex_baseURL + "?Action=Shop_PayPal&memberID=" + memberID, "PayPalWindow",disp_setting);
+ PayPalWindow.focus();
+ });
+
+ // Show payment method input when selected
+ $('.glmSelectPayByCC').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByCC').show(duration);
+ });
+ });
+ $('.glmSelectPayByPayPal').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByPayPal').show(duration);
+ });
+ });
+
+ // Start with payment types hidden - only prompt showing
+ $('.glmPayTypes').hide(0);
+
+ // Show submit access blocker
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+
+</script>
+<flexy:include src="SaultSteMarie/foot.html" />
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Complete Page\r
+\r
+-->\r
+\r
+<flexy:include src="SaultSteMarie/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">Purchase Complete</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ <p>\r
+ <div \r
+ id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint"\r
+ style="float: none; text-align: center;"\r
+ >*** {term.nav.print_vouchers} for {c.name} ***</div>\r
+ </p>\r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ \r
+ <!-- Adobe Reader Download -->\r
+ \r
+ <div class="glmBlock">\r
+ <div class="glmBlockContentRight">\r
+ <a href="http://www.adobe.com/go/getreader" target="GetAdobeReader"><img src="{baseURL}common/EventManagement/front/TicketsFoundation/assets/get_adobe_reader.png"></a>\r
+ </div>\r
+ <div class="glmBlockContentLeft">\r
+ <small>\r
+ <p>\r
+ Adobe Reader is required to view and print your {term.voucher.plur}. Adobe Reader is a free program available directly from Adobe. \r
+ If you do not already have Adobe Reader installed, click the "Get Adobe Reader" link now.\r
+ </p>\r
+ </small>\r
+ </div>\r
+ <div class="glmBlockContent">\r
+ <small>\r
+ <p>\r
+ <b>If you are unable to print your {term.voucher.plur}, please print this page or write down the order number(s)\r
+ below and bring that to the ticket office when you arrive.</b>\r
+ </p>\r
+ ORDER #: \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ {c.paymentResult.orderID} \r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </small> \r
+ </div>\r
+ </div> \r
+ \r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{successText:h}</div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div class="glmCartBlockTitle">Contact Information</div>\r
+ <div class="glmCartForm">\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">First Name:</div><div class="glmCartFormInput">{formData.contact.fname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Last Name:</div><div class="glmCartFormInput">{formData.contact.lname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Address:</div><div class="glmCartFormInput">{formData.contact.addr1.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">{formData.contact.addr2.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">City:</div><div class="glmCartFormInput">{formData.contact.city.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">State:</div><div class="glmCartFormInput">{formData.contact.state.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Country:</div><div class="glmCartFormInput">{formData.contact.country.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">ZIP/Postal Code:</div><div class="glmCartFormInput">{formData.contact.zip.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Phone:</div><div class="glmCartFormInput">{formData.contact.phone.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">E-Mail address:</div><div class="glmCartFormInput">{formData.contact.email.value}</div></div> \r
+ {if:opt_field_1_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_1_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_1.value:h}</div></div> {end:}\r
+ {if:opt_field_2_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_2_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_2.value:h}</div></div> {end:}\r
+ {if:opt_field_3_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_3_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_3.value:h}</div></div> {end:}\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">\r
+ {if:formData.contact.email_ok}\r
+ You have asked us to send information on activities and offers. \r
+ {else:}\r
+ You have asked us to NOT send information on activities and offers.<br>\r
+ We will only contact you regarding this order.\r
+ {end:}\r
+ </div></div> \r
+ \r
+ </div> <!-- glmCartForm -->\r
+ \r
+ </div> <!-- glmCartBlock - Contact information -->\r
+ \r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ <div class="glmCartBlock">\r
+ \r
+ <div class="glmCartBlockTitle">{term.ticket.plur_cap} at: {c.name}</div>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+ <div class="glmCartVenueInfo">\r
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}\r
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}\r
+ \r
+ </div>\r
+\r
+ <div class="glmCartEvents">\r
+ \r
+ {foreach:c.performances,p} <!-- each performance for this date -->\r
+ \r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventInfoLeft">\r
+ <div class="glmCartBlockSubTitle">\r
+ {term.performance.cap}: <span class="glmCartBlockSubTitleValue">{p.name}</span>\r
+ </div>\r
+ <div class="glmCartBlockText">\r
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} --> \r
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <div class="glmCartBlockDates"> \r
+ {foreach:p.dates,d}\r
+ \r
+ <div class="glmCartBlockSubTitle">\r
+ {term.ticket.cap} date: \r
+ <span class="glmCartBlockSubTitleValue">\r
+ {if:d.dateSpecific}\r
+ {d.fullDate}\r
+ {else:}\r
+ Use any date\r
+ {if:c.likelyDate}\r
+ - Likely Date {c.likelyDate}\r
+ {end:}\r
+ {end:}\r
+ </span>\r
+ </div>\r
+ \r
+\r
+ {foreach:d.sections,s}\r
+ <table border="0" width="100%">\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ {if:!p.oneSectionOnly}\r
+ <th align="left">Section</th>\r
+ {end:}\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">\r
+ {i.selected}\r
+ </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left">{s.name}</td>\r
+ {end:}\r
+ <td align="left">{i.title}</td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {if:i.descr}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td colspan="4">\r
+ {else:}\r
+ <td colspan="3">\r
+ {end:}\r
+ {if:option.cart_images}\r
+ {if:i.image}\r
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>\r
+ {end:}\r
+ {end:} \r
+ <div class="glmBlockContentLeft">{i.descr:h}</div>\r
+ </td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {if:i.show_addons} -->\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left"> </td>\r
+ {end:}\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {end:} -->\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td> </td>\r
+ {end:}\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ </table><!--/.glmCartTable-->\r
+ {end:}<!--sections-->\r
+ \r
+ \r
+ {end:} <!-- dates --> \r
+ \r
+ </div> <!-- dates -->\r
+ \r
+ </div>\r
+\r
+ {if:p.policy}\r
+ <div class="glmSection">\r
+ <div class="glmBlockContent">\r
+ <div class="glmCartBlockSubTitle">\r
+ Our policy for this {term.performance.norm}.\r
+ </div>\r
+ <p>{p.policy:h}</p>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} <!-- each performance -->\r
+ \r
+ </div>\r
+ \r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+\r
+ {if:!cartHasOneVenueOnly}\r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+ <div class="glmCartTotals">\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Sub Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText">{c.totalPrice}</div>\r
+ </div>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+\r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ \r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->\r
+ <div class="glmCartPayment">\r
+ \r
+ <!-- If special requests possible -->\r
+ {if:c.ticket_spec_req.value}\r
+ <div class="glmCartForm" style="margin-bottom: 1em;">\r
+ <div class="glmCartBlockTitle">Special requests:</div>\r
+ <div class="glmSpecialRequests">{c.paymentForm.spec_req.value:h}</div>\r
+ </div> \r
+ {end:}\r
+ \r
+ \r
+ {if:c.paymentResult}\r
+ <div class="glmCartForm">\r
+ {if:c.paymentResult.approved}\r
+ <div class="glmCartBlockTitle">Card Payment Approved</div>\r
+ \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div><div class="glmCartFormInput">{c.paymentResult.cctype}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div><div class="glmCartFormInput">{c.paymentResult.ccname}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div><div class="glmCartFormInput">{c.paymentResult.ccnumb}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div><div class="glmCartFormInput">{c.paymentResult.ccexp}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>\r
+ <div id="GLMnavigation">\r
+ <div id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint">{term.nav.print_vouchers}</div>\r
+ </div>\r
+ {else:}\r
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>\r
+ <ul><li>{c.paymentResult.description}</li></ul>\r
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>\r
+ {if:forceCheckoutPhase}\r
+ <div id="GLMnavigation">\r
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} \r
+ \r
+ </div> <!-- glmCartForm - Venue Payment -->\r
+ {end:}\r
+ \r
+ </div> <!-- glmCartPayment -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ {end:} <!-- each venue -->\r
+ \r
+ <div class="glmCartBlock totals">\r
+ {if:cartHasContents} \r
+ <div class="glmCartTotals">\r
+ <div class="glmCartBlockTitle totals">Cart Totals</div>\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText grand">Grand Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText grand">{totals.price}</div>\r
+ </div>\r
+ </div><!--/.glmCartTable-->\r
+ </div><!--/.glmCartTotals-->\r
+ {else:}\r
+ <P>Your cart is currently empty.</P> \r
+ {end:}\r
+ </div> <!-- glmCartBlock -->\r
+ \r
+</div><!-- GLMcontent -->\r
+\r
+{trackingScript:h}\r
+\r
+<!-- jQuery scripts for controlling page actions -->\r
+<flexy:toJavascript\r
+ flexy:prefix="flex_"\r
+ baseSCRIPT="baseSCRIPT"\r
+ startURL="startURL"\r
+ appAdminURL="appAdminURL"\r
+ \r
+>\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+\r
+ // Navigation buttons\r
+ $('#GLMnavCart').click(function() { // Add to Cart \r
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';\r
+ });\r
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection\r
+ window.location = flex_startURL;\r
+ });\r
+ \r
+ // Print vouchers\r
+ $('.voucherPrint').click(function(){ \r
+ \r
+ var orderID = $(this).attr('emOrderID');\r
+ var orderVerify = $(this).attr('emOrderVerify');\r
+ var voucherWindow = window.open(flex_baseSCRIPT + "&Action=Shop_printVoucher&OrderID=" + orderID + "&orderVerify=" + orderVerify, \r
+ "voucherPrint", \r
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"\r
+ );\r
+ voucherWindow.focus();\r
+ voucherWindow.print();\r
+ return false;\r
+\r
+ });\r
+\r
+ });\r
+\r
+</script>\r
+<flexy:include src="SaultSteMarie/foot.html" />\r
--- /dev/null
+<h2>\r
+ <a href="{baseSCRIPT}&Action=Shop_printVoucher&OrderID={cartEntry.paymentResult.orderID}&orderVerify={cartEntry.paymentResult.orderVerification}">\r
+ Click here to reprint your {term.voucher.plur}\r
+ </a>\r
+</h2>\r
+\r
+<h3>\r
+<!-- Tickets Purchased at: {term.ticket.plur_cap} Purchased at:<br> -->\r
+ {cartEntry.name}\r
+</h3>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+<!-- {if:cartEntry.descr}<p>{cartEntry.descr:h}</p>{end:} -->\r
+ \r
+<table border="1" cellspacing="0" cellpadding="2">\r
+\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ <th align="left">{term.performance.cap}</th>\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+\r
+{foreach:cartForSummaryCentral,c}\r
+{foreach:c.performances,p} <!-- each performance -->\r
+ {foreach:p.dates,d} <!-- each date -->\r
+ {foreach:d.sections,s}\r
+ \r
+ \r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">{i.selected}</td>\r
+ <td align="left">{p.name:h}</td>\r
+ <td align="left">{i.title:h}</td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ <td align="left"> </td>\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ <td> </td>\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ \r
+ \r
+ {end:} <!-- each section -->\r
+ {end:} <!-- each performance for this date -->\r
+{end:} <!-- each date for this venue -->\r
+\r
+ <tr>\r
+ <td colspan="4"> </td>\r
+ <td align="right">{c.totalPrice}</td>\r
+ </tr>\r
+\r
+<!-- \r
+ <tr>\r
+ <th align="right">{c.totalTickets}</th>\r
+ <td colspan="6"> </td>\r
+ <th align="right">{c.totalPrice}</th>\r
+ </tr>\r
+ -->\r
+ \r
+</table>\r
+\r
+ <!-- If special requests possible -->\r
+{if:c.ticket_spec_req}\r
+<p>\r
+ {c.paymentForm.spec_req.value:h}\r
+</p> \r
+{end:}\r
+\r
+{end:} \r
+\r
+{if:cartEntry.ticket_policy}<p>{cartEntry.ticket_policy:h}</p>{end:}\r
+\r
+<table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th>First Name:</th><td>{formData.contact.fname.value}</td></tr> \r
+ <tr><th>Last Name:</th><td>{formData.contact.lname.value}</td></tr> \r
+ <tr><th>Address:</th><td>{formData.contact.addr1.value}</td></tr> \r
+ <tr><th> </th><td>{formData.contact.addr2.value}</td></tr> \r
+ <tr><th>City:</th><td>{formData.contact.city.value}</td></tr> \r
+ <tr><th>State:</th><td>{formData.contact.state.value}</td></tr> \r
+ <tr><th>Country:</th><td>{formData.contact.country.value}</td></tr> \r
+ <tr><th>ZIP/Postal Code:</th><td>{formData.contact.zip.value}</td></tr> \r
+ <tr><th>Phone:</th><td>{formData.contact.phone.value}</td></tr> \r
+ <tr><th>E-Mail address:</th><td>{formData.contact.email.value}</td></tr> \r
+</table>\r
+ \r
+<p> \r
+ <table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th colspan="2" align="center">Credit Card Payment Approved</th></tr>\r
+ <tr><th align="left">Card Type</th><td>{cartEntry.paymentResult.cctype}</td></tr>\r
+ <tr><th align="left">Name on Card</th><td>{cartEntry.paymentResult.ccname}</td></tr>\r
+ <tr><th align="left">Card Number</th><td>{cartEntry.paymentResult.ccnumb}</td></tr>\r
+ <tr><th align="left">Expiration Date</th><td>{cartEntry.paymentResult.ccexp}</td></tr>\r
+ <tr><th align="left">Authorization Code</th><td>{cartEntry.paymentResult.authCode}</td></tr>\r
+ </table>\r
+</p> \r
+ \r
+<!-- is this needed? <flexy:include src="SaultSteMarie/foot.html" /> -->\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Section Selection Page\r
+\r
+-->\r
+\r
+<flexy:include src="SaultSteMarie/head.html" />\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">{term.section.cap} Selection</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem">{term.nav.show_selected}</a>\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+\r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{sectionText:h}</div>\r
+\r
+{if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+{end:}\r
+\r
+ <p>You have selected</p>\r
+ <div class="glmSection">\r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">{performanceDetail.member_name}</div><br> \r
+ <div class="glmBlockName">{performanceDetail.name}</div>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+<!-- <p><span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</p> -->\r
+<!-- <p>{performanceDetail.descr:h}</p> -->\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <!-- List of available sections -->\r
+ <hr />\r
+ <p>Please select from the following</p>\r
+ <div class="glmSection">\r
+{foreach:sectionList,x} \r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">\r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}">{x.name}</a>\r
+ </div> \r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}" class="glmNavItem">{term.nav.select}</a>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+ <p><span class="glmBold">{term.section.cap}</span>: {x.member_name}</p>\r
+ <p>{x.descr:h}</p>\r
+ </div>\r
+ </div> \r
+{end:}\r
+ \r
+ </div>\r
+\r
+</div> <!-- /GLMcontent -->\r
+\r
+ {startScript:h}\r
+\r
+ $(document).ready(function(){ \r
+\r
+ // Code to kick off the geolocation-display feature \r
+ $("#locationMap").geolocate({\r
+ lat: "#lat",\r
+ lng: "#lon",\r
+ mapOptions: {\r
+ disableDefaultUI: false,\r
+ mapTypeControl: true,\r
+ mapTypeId: "roadmap",\r
+ zoom: 12\r
+ },\r
+ markerOptions: {\r
+ draggable: false,\r
+ title: "This is your selected location"\r
+ }\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+<flexy:include src="SaultSteMarie/foot.html" />\r
--- /dev/null
+
+
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ <div class="glmBlockContentRight">
+ <div id="locationMap_{m.id}" class="GLMmapWindow" data-member-id="{m.id}">(map loads here)</div>
+ <form>
+ <input type="hidden" id="lat_{m.id}" value="{m.lat}">
+ <input type="hidden" id="lon_{m.id}" value="{m.lon}">
+ </form>
+ </div><!--/.glmBlockContentRight-->
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>
+ <div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date} through {p.end_date.date}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:!showTickets}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a>
+ {end:}
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value}, {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="SaultSteMarie/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.event.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{introText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>Please select from the following</p>
+{if:showTickets}
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+<!-- <input type="hidden" name="PerformanceID" value="{performanceDetail.id}"> -->
+<!-- <input type="hidden" name="SectionID" value="{sectionDetail.id}"> -->
+{end:}
+ <!-- List of Locations -->
+ {foreach:membersList,m}
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:m.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{m.image}"></div>
+ {end:}
+ {end:}
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft startContent">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+<!-- <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>-->
+ {if:p.start_date.timestamp}<div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date}{if:p.end_date.timestamp} - {p.end_date.date} {end:}</div>{end:}
+ <div class="glmDescr">{p.short_descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:p.image}
+ <div class="glmBlockContentRight startImage"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ {end:}
+ {if:!showTickets}
+<!-- <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a> -->
+ {end:}
+
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value} {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
+{if:showTickets}
+ <div id="GLMselect">
+ <a id="GLMselectButton" class="glmNavItemWide">{term.nav.select}</a>
+ </div>
+ </form>
+{end:}
+</div><!-- /GLMcontent -->
+<!--</div> -->
+{startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ </p>\
+ ';
+
+
+
+ $(document).ready(function(){
+
+ // Code to kick off the geolocation-display feature
+ function doLocationMap(id) {
+ $("#locationMap_" + id).geolocate({
+ lat: "#lat_" + id,
+ lng: "#lon_" + id,
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ }
+ {foreach:membersList,m}
+ doLocationMap({m.id});
+ {end:}
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDate_' + ticket.id).html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_inv_array[' + dateData['date'] + ']" value="' + dateData.id + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+// *** NEED TO FIX REFERENCE TO "performanceDetail" since that's not available on this page
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate);
+ } else {
+
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ $('#GLMselectButton').click(function() {
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+
+</script>
+<flexy:include src="SaultSteMarie/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+
+<flexy:include src="SaultSteMarie/head.html" />
+
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Ticket Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketOptText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>You have selected</p>
+ <!-- List of Ticket Options -->
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">{term.prop.cap}: {performanceDetail.member_name}</div>
+<!-- <div class="glmDescr">{term.order.cap} up to: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</div> -->
+ <!--<p>{performanceDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{sectionDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <!--<p>{sectionDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{ticketDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ {if:!ticketDetail.date_specific.value}
+ <div class="glmDescr">Use any date {if:ticketDetail.start_date.timestamp} from {ticketDetail.start_date.date} to {ticketDetail.end_date.date}{end:}</div>
+ {end:}
+ {if:!ticketDetail.time_specific.value}
+ <div class="glmDescr">Use any time</div>
+ {else:}
+ <div class="glmDescr">Time: {ticketDetail.ticket_time.time}</div>
+ {end:}
+ {if:!ticketDetail.unlimted_use.value}
+ <!-- <div class="glmDescr">Each {term.ticket.norm} may be used {ticketDetail.uses} time(s)</div> -->
+ {else:}
+ <div class="glmDescr">Each {term.ticket.norm} may be used an unlimited number of times</div>
+ {end:}
+ <div class="glmDescr">{ticketDetail.descr:h}</div>
+ </div>
+ </div>
+ </div>
+ <!-- Date and quantity selection -->
+ <p>Please select from the following</p>
+ <div class="glmSection">
+ <div id="GLMeventDateSelectBlock">
+ <div id="GLMeventDateSelect" class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">Select desired date:</div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInputShort"><input type="text" id="GLMeventDate" name="ticket_date" value=""> (click in field to set date)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr quant">Select Quantity:</div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer">(please select date first)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {if:reason}<div id="GLMaddToCart" name="ticket">(disabled - please see above)</div>{else:}<div id="GLMaddToCart" class="glmNavItem add" name="ticket">{term.nav.add_to_cart}</div>{end:}
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ // Whether ticket has date specific inventory
+ var dateSpecific = {ticketDetail.date_specific.value} + 0;
+
+ // Dates for inventory data
+ var dates = {inventoryJSON:h};
+
+ $(document).ready(function(){
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+ var dateData = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector" name="quant"><option value="0"></option>[ticket-quants]</select>\
+ ';
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least {detail.performance.purch_leadtime} hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ </p>\
+ ';
+ var selectedInv;
+ var ticketQuants;
+ var addButtonPushed = false;
+
+ // Start by counting the number of dates to see if we have only 1
+ var dateCount = 0;
+// if (dateSpecific) {
+ $.each(dates, function(index, date) {
+ dateCount = dateCount + 1;
+ dateData = date;
+ });
+// }
+ // if there's no date specific tickets
+ if (!dateSpecific) {
+ // Populate date input field
+ $('#GLMeventDateSelectBlock').html('<input type="hidden" name="ticket_date" value="0">');
+ doQuantSelection();
+ // if there's only one date, then display that and move on.
+ } else if (!dateSpecific || dateCount == 1) {
+ // populate date input field
+ $('#GLMeventDate').val(dateData['date']);
+ $('#GLMtickets').html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_date" value="' + dateData['date'] + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+
+ doQuantSelection();
+ } else {
+ // Use the date picker to select a date
+ dateData = false;
+ $("#GLMeventDate").datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Update input message
+ $('#GLMdateMessage').html('<br />');
+
+ // Get data for the selected date
+ dateData = dates[selectedDate];
+ doQuantSelection();
+ } // Date Selection
+
+ }); // Date Picker
+
+ }
+
+ function doQuantSelection() {
+ // Build the ticket quant options
+ ticketQuants = '';
+ var selectMax = dateData['available'];
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+ var tooLate = dateData['tooLate'];
+ if (tooLate) {
+ $('#GLMticketQuantContainer').html(ticketTooLate);
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ $('#GLMticketQuantContainer').html(ticketQuantSelection.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+// doAddToCartSetup();
+ }
+
+// function doAddToCartSetup() {
+ // Add to cart action
+ $('#GLMaddToCart').click(function() {
+ if (addButtonPushed) {
+ return;
+ }
+ var reason = '';
+ // Check date
+ if (dateData) {
+ selectedInv = dateData.id;
+ } else {
+ reason = reason.concat('* You need to select a date first.\n');
+ }
+ // Check quantity
+ var selectedQuant = (parseInt($('#glmQuantSelector').val()) + 0);
+ if (selectedQuant == 0) {
+ reason = reason.concat('* You need to select a quantity first.\n');
+ }
+ // Check if there's a reason we can't add this to the cart yet
+ if (reason != '') {
+ alert(reason);
+ return;
+ }
+ // Adding to cart
+ addButtonPushed = true;
+ $("#GLMeventDate").datepicker('disable');
+ $('#glmQuantSelector').prop('disabled', 'disabled');
+ setBlocker();
+ // Submit to cart
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=add&PerformanceID={performanceDetail.id}&SectionID={sectionDetail.id}&TicketID={ticketDetail.id}&ticket_inv=" + selectedInv + "&quant=" + selectedQuant;
+
+ });
+// }
+ // Code to kick off the geolocation-display feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ // Navigation buttons
+ $('#GLMnavCart').click(function() { // Add to Cart
+ window.location = '{baseSCRIPT}&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = '{startURL:h}';
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+</script>
+<flexy:include src="SaultSteMarie/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="SaultSteMarie/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.ticket.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketText:h}</div>
+{if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+{end:}
+ <p>You have selected</p>
+ <!-- List of Tickets -->
+
+
+{foreach:sections,s}
+ <div class="glmSection">
+ <div class="glmBlock">
+
+
+ <div class="glmBlockContent">
+ {if:performanceDetail.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{performanceDetail.image}"></div>
+ {end:}
+ <div class="glmBlockContentLeft">
+
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.member_name:h}</div><br>
+ <div class="glmBlockName">{performanceDetail.name:h}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}
+-->
+ </div>
+
+ {if:performanceDetail.descr}
+ {performanceDetail.descr:h}
+ {end:}
+ </div> <!-- description -->
+ </div> <!-- member data left -->
+ </div> <!-- glmBlockContent -->
+ </div> <!-- glmBlock -->
+ </div> <!-- sections -->
+ <!-- List of Available Events -->
+ <p>Please select from the following</p>
+ <div class="glmSection">
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+ <input type="hidden" name="PerformanceID" value="{performanceDetail.id}">
+ <input type="hidden" name="SectionID" value="{sectionDetail.id}">
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockContentRight">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div> <!-- glmBLockContentRight -->
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={performanceDetail.id}&SectionID={x.section_id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ {end:}
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:x.descr}
+ <p>{x.short_descr:h}</p>
+ {end:}
+ <p>
+ {if:!x.date_specific.value}
+ {if:x.start_date.timestamp} Date: {x.start_date.date}{end:}{if:!x.start_end_dates_same} to {x.end_date.date}{end:}{if:!x.time_specific.value} {end:}
+ {end:}
+ {if:!x.time_specific.value}
+
+ {else:}
+ Time: {x.ticket_time.time}
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </p>
+ </div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ </div><!--/.glmBlock-->
+ {end:}
+ <div id="GLMselect">
+ <a id="GLMselectButton" class="glmNavItem">{term.nav.select}</a>
+ </div>
+ </form>
+ </div> <!-- glmSection -->
+
+{end:}
+
+</div> <!-- /GLMcontent -->
+
+{if:option.ticket_selection.include_options_in_ticket_list}
+ <!-- jQuery scripts for controlling page actions -->
+ {startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least [hours] hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ </p>\
+ ';
+
+
+ $(document).ready(function(){
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html(' \
+ <div class="glmTicketsSelectPrompt">Date Available: </div> \
+ <div class="glmTicketsSelectValue"> \
+ <div class="glmInput"> \
+ ' + dateData.ticket_date.date + ' \
+ <input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '"> \
+ </div> \
+ </div>');
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ if($('#GLMeventDateInput_' + ticket.id).length > 0) {
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: ticket.startDate,
+ maxDate: ticket.endDate,
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+ }
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate.replace(/\[hours\]/g, {performanceDetail.purch_leadtime}));
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ var selectButtonPressed = false;
+
+ $('#GLMselectButton').click(function() {
+
+ // Prevent multiple submissions
+ if (selectButtonPressed == true) {
+ return;
+ }
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+ if( $(window).width() < 768 ){
+ $('.glmBlock').not(":first").each(function() {
+ var left = $(this).find( $('.glmBlockContentLeft') );
+ left.prependTo( $(this) ).find( $('glmBlockContentRight') );
+ });
+ }
+ });
+ </script>
+{end:}
+<flexy:include src="SaultSteMarie/foot.html" />
--- /dev/null
+<!-- Footer content for all Front-End pages -->
+{if:option.development}
+ <p id="glmDevelopmentNotice">
+ Running on Development Server:
+ <span style="float: right;">
+ <a href="{baseSCRIPT}&session_reset=true">Reset Session</a>
+ </span>
+ </p>
+{end:}
\ No newline at end of file
--- /dev/null
+<!-- Header content for all Front-End pages -->
+{startScript:h}
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAppURL = '{baseAppURL}';
+</script>
+{if:!jQueryLoaded}
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+{end:}
+{if:!jQueryUiLoaded}
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+{end:}
+<script type="text/javascript" src="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.js?serial={timestamp}"></script>
+<script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>
+<link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.css">
+{if:customCssFile}
+ <!-- local css overrides for the current site -->
+ <link rel="stylesheet" type="text/css" href="{customCssFile}">
+{end:}
+{if:frontDebug}
+ <!-- This is simply here as something for jQuery code to check if we're doing debug -->
+ <div id="EMadminDebug"></div>
+{end:}
+{startScript:h}
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25";
+ {if:frontDebug}
+ debugWindowFront = window.open("{baseURL}index.php?Action=Debug_update","emDebugWindowFront",disp_setting);
+ {end:}
+</script>
+
+<div id="glmReloadBlocker" class="glmPageLoadBlockerHidden">
+ <div>Updating your information<br>Please wait ...</div>
+</div>
+
+ {if:adminUser}
+ <h2 style="border: 1px solid black; text-align: center;">Purchasing By Admin User</h2>
+ {end:}
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+
+ <h1>PLEASE NOTE:</h1>
+
+ <p>
+ There is no general access to this site.
+ All access to this site should be through an appropriate link.
+ If you arrived here by mistake (or exploring), nothing but this message will be displayed.
+ If you have any concerns about this site, please contact Gaslight Media.
+ </p>
+
+ <p>
+ Gaslight Media<br>
+ 120 East Lake Street<br>
+ Petoskey, MI 49770<br>
+ <br>
+ Phone: 231-487-0692<br>
+ E-Mail: info@gaslightmedia.com<br>
+ Web: http://www.gaslightmedia.com
+ </p>
+
+ </body>
+
+</html>
+
+
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body id="debugBody">\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="updateTimestamp">\r
+ <b>Updated:</b> {debugUpdateTime}\r
+ </div> \r
+ <div id="debugBody">\r
+ {debugData:h}\r
+ </div>\r
+ </body>\r
+ \r
+ \r
+\r
+ {startScript:h}\r
+ \r
+ // Reload the current window with Action = Debug_update\r
+ function reloadDebugWindow()\r
+ {\r
+ window.location("{baseSCRIPT}&Action=Debug_update");\r
+ }\r
+ \r
+ </script> \r
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body>\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="debugData">Debug Startup</div>\r
+ </body>\r
+</html>
\ No newline at end of file
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Cart Page
+-->
+<flexy:include src="TicketsFoundation/head.html" /> <!-- Note direct reference to interface type -->
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <form id="cartForm" action="">
+ <!-- GLMpageTitle - A title for this page -->
+ <!--<div id="GLMpageTitle">Selected {term.performance.plur_cap} and {term.ticket.plur_cap}</div>-->
+ <div id="GLMHeader">
+<!-- <div id="GLMpageTitle">Cart</div> -->
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+<!-- <a class="glmNavItem cart" style="margin-right: 1em;">Reprint a previous {term.order.cap}: <input id="reprintVoucher" type="text" style="width: 6em; font-size: .8em;"></a> -->
+ </div>
+ </div>
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{cartText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ {if:havePromoCodes}
+ <div class="glmCartBlock">
+ <div class="glmCartFormInput">
+ <div class="glmCartText" style="width: auto;">If you have a {term.promo.norm}, please enter it here: </div><input id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
+ </div>
+ </div>
+ {end:}
+ {foreach:cart,c}<!-- each venue -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockSmallTitle">{c.name:h}</div>
+ <div class="glmCartEvents">
+ {foreach:c.performances,p} <!-- each performance for this date -->
+ <div class="glmCartEvent" style="margin-bottom: 2em;">
+ <div class="glmCartEventInfo">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem" style="position: relative; top: 20px;">{term.nav.select_more_of_these}</a>
+ {end:}
+ <div class="glmCartEventInfoLeft">
+
+ <div class="glmCartEventTitle">{p.name:h}</div>
+ <div class="glmDescr">
+ {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile">{p.short_descr:h}</div>{end:}
+ {if:option.cart_images}{if:p.image}
+ <img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">
+ {end:}{end:}
+ </div>
+ </div>
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+ Use any date
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%" style="padding-right: .5em;">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ <input class="glmCartQuant" type="number" id="ticket_{i.invID}" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}">
+ </td>
+ {if:!p.oneSectionOnly}
+ <td align="left">{s.name:h}</td>
+ {end:}
+ <td align="left">{i.title}</td>
+ <td align="right" style="padding-right: .5em;">{if:i.show_price}{i.price}{end:}</td>
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}{if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}{end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ <input class="glmCartQuant" type="number" id="addon_{a.id}" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units="{a.name}" value="{a.selected}">
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name:h}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!-- dates -->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {end:} <!--performances-->
+ </div><!--/.glmCartEvents-->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name:h} - {e.name:h}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name:h} - {e.name:h}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name:h} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name:h} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange"> mm/dd/yyyy
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+
+
+
+
+ </div> <!-- glmCartBlock -->
+ {end:}<!-- each venue -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <div class="glmCartBlock totals">
+ {if:cartHasContents}
+ <div class="glmGrandTotals">
+ Grand Total {totals.price}
+ </div>
+ <div class="glmCartWide">
+ {if:totals.tickets}
+ {if:!blockCheckout}
+ <a id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" class="glmNavItem">{term.nav.checkout}</a>
+ {else:}
+ <a class="glmNavItemInactive">Please complete the items in RED above.</a>
+ {end:}
+ {else:}
+ <a class="glmNavItemInactive">Your cart is currently empty.</a>
+ {end:}
+ </div>
+ {else:}
+ <P>Your cart is currently empty.</P>
+ {end:}
+ </div> <!-- glmCartBlock -->
+
+ {if:option.cart_promotions}
+ <div class="glmCartBlock">
+ You may also be interested in ...<br>
+ {foreach:cartPromotions,p}
+ <div class="glmBlockContent" style="margin-bottom: 2em;">
+ <div class="glmCartBlockTitle" style="margin-top: .5em;"><a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={p.id}">{p.member_name:h} - {p.name:h}</a></div>
+ {if:p.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ <div class="glmBlockContentLeft">
+ <!-- PER REQUEST, WE'RE NOW JUST SHOWING SHORT DESCR HERE -->
+ {if:p.short_descr}<div class="glmCartEventDescr">{p.short_descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile">{p.short_descr:h}</div>{end:}
+ </div>
+ </div>
+ {end:}
+ </div>
+ {end:}
+
+
+ </form>
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ $(document).ready(function(){
+
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Convert input fields to select lists
+ $('.glmCartQuant').each(function() {
+
+ var id = $(this).attr('id');
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var max = $(this).attr('data-max');
+ var value = $(this).attr('value');
+ var units = $(this).attr('data-units');
+ var numbSel = '';
+
+ // Build a picklist for this input
+ for (var i = 0 ; i {lte:h} max ; i++) {
+ if (value == i) {
+ numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
+ } else {
+ numbSel = numbSel.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ }
+
+ $('#quant_' + id).html('<select id="' + id + '" class="glmCartSelect" data-ticket="' + ticket + '" data-addon="' + addon + '">' + numbSel + '</select>' + units);
+
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a cart value changes, submit it as a cart update.
+ $('.glmCartSelect').change(function() {
+ vertScroll = getVertScroll();
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var value = $(this).val();
+
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update&ticket_inv=" + ticket + "&addon=" + addon + "&quant=" + value + "&vertScroll=" + vertScroll;
+
+ });
+
+ // When there's a change in the promo code input, submit it.
+ $('#promoCodeInput').change(function() {
+ var value = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=promo_code&promo_code=" + value;
+ });
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = '{startURL:h}';
+ });
+
+/* Not using right now
+ // Reprint order button
+ $('#reprintVoucher').on('keypress', function(event) {
+ if(event.which == '13'){
+ var orderID = $(this).val();
+ var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucher&OrderID=' + orderID,
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ }
+ });
+*/
+
+ if ({vertScroll}) {
+ window.scrollTo(0,{vertScroll});
+ }
+
+ });
+
+</script>
+<flexy:include src="TicketsFoundation/foot.html" /> <!-- Note direct reference to interface type -->
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="TicketsFoundation/head.html" /> <!-- Note direct reference to interface type -->\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Your PayPal payment has been approved.</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ Your cart will now reflect that the payment has been made.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="TicketsFoundation/head.html" /> <!-- Note direct reference to interface type -->\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Unable to process your payment!</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ <div class="glmCartFormPrompt glmCartRequired">Sorry, there was a problem.</div>\r
+ </p>\r
+ \r
+ <p>\r
+ We were unable to find your purchase information and are therefore \r
+ are unable to process your payment through PayPal. This could be\r
+ due to you not performing any action with your pending purchase\r
+ for too long. Please click the "Return to selected tickets" button\r
+ at the top of the checkout page to see if your selections are still listed.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Cart Page
+-->
+<flexy:include src="TicketsFoundation/head.html" /> <!-- Note direct reference to interface type -->
+
+<form id="cartForm" action="">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ {if:!option.ticket_selection.start_at_cart}
+ <a class="small button right radius" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{cartText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+
+ <!-- Problem display -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <h2>We're sorry, we had a problem with your request:</h2>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+{if:havePromoCodes} <!-- If there's any promo codes, provide that input -->
+
+ <!-- Promo Code input -->
+
+ <div class="row colapse">
+ <div class="small-6 columns inline">
+ <label for="promoCodeInput" class="left inline">
+ <span class="show-for-medium-up">If you have a {term.promo.norm}, please enter it here:</span>
+ <span class="show-for-small-only">{term.promo.cap}:</span>
+ </label>
+ </div>
+ <div class="small-6 columns">
+ <input class="left inline" id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
+ </div>
+ </div>
+{end:}
+
+ <!-- Cart Contents -->
+
+{foreach:cart,c} <!-- each venue -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="large-12 columns"><h2>{c.name:h}</h2></div>
+ </div>
+ {end:}
+
+ <!-- Each Performance -->
+
+ {foreach:c.performances,p}
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel callout">
+
+ <!-- Performance Header and optional nav links -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <h3>{p.name:h}
+ {if:!option.ticket_selection.start_at_cart}
+ <a class="small button right radius" href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{term.nav.select_more_of_these}</a>
+ {end:}
+ </h3>
+ </div>
+ </div>
+
+ <!-- Performance descriptions and image -->
+
+ <div class="row">
+ {if:!option.cart_images}
+ <div class="small-12 columns hide-for-medium-up">
+ {if:p.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{p.image}">
+ {end:}
+ </div>
+ {end:}
+ <div class="small-9 columns">
+ {if:p.short_descr}
+ {p.short_descr:h}
+ {else:}
+ {if:p.descr}
+ {p.descr:h}
+ {end:}
+ {end:}
+ </div>
+ {if:!option.cart_images}
+ <div class="small-3 columns show-for-medium-up">
+ {if:p.image}
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{p.image}">
+ {end:}
+ </div>
+ {end:}
+ </div>
+
+ <!-- Each date selected for this performance -->
+
+ {foreach:p.dates,d}
+ <div class="row">
+ <div class="large-12 columns">
+ <h5>
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+ Use any date
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </h5>
+ </div>
+ </div>
+
+ <!-- Each venue section for this date -->
+
+ {foreach:d.sections,s}
+ <div class="row show-for-medium-up">
+ <div class="small-2 columns"><b>Quant</b></div>
+ {if:!p.oneSectionOnly}
+ <div class="small-2 columns"><b>{term.section.cap}</b></div>
+ <div class="small-4 columns">
+ {else:}
+ <div class="small-6 columns">
+ {end:}
+ <b>{term.ticket.cap}</b>
+ </div>
+ <div class="small-2 columns text-right"><b>Price</b></div>
+ <div class="small-2 columns text-right"><b>Total</b></div>
+ </div>
+
+ <!-- Each ticket for this section -->
+
+ {foreach:s.tickets,i}
+
+ <!-- Cart row for LARGE browsers -->
+
+ <div class="row show-for-medium-up" style="margin-top: 1.5em;">
+ <div id="quant_ticket_{i.invID}" class="small-2 columns text-left">
+ <small><input id="quant_ticket_select_{id.invID}" class="glmCartQuant" type="number" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}"></small>
+ </div>
+ {if:!p.oneSectionOnly}
+ <div class="small-2 columns">{s.name:h}</div>
+ <div class="small-4 columns">
+ {else:}
+ <div class="small-6 columns">
+ {end:}
+ {i.title}
+ </div>
+ <div class="small-2 columns text-right">{if:i.show_price}{i.price}{end:}</div>
+ <div class="small-2 columns text-right">{if:i.show_price}{i.extended}{end:}</div>
+ </div>
+
+ <!-- Cart row for SMALL-Medium browsers -->
+
+ <div class="hide-for-medium-up" style="margin-top: 1.5em;">
+ <div class="row">
+ <div class="small-12 columns"><h2>{i.title}</h2></div>
+ </div>
+ {if:i.problem}
+ <div class="row">
+ <div class="small-12 columns">
+ <div data-alert class="alert-box">{i.problemText}</div>
+ </div>
+ </div>
+ {end:}
+ {if:i.descr}
+ <!-- Description and image for SMALL-Medium browsers -->
+
+ <div class="row hide-for-medium-up">
+ <div class="medium-2 columns"></div>
+ <div class="medium-10 columns">
+ {if:option.cart_images}
+ {if:i.image}
+ <img class="right" src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}">
+ {end:}
+ {end:}
+ {i.descr:h}
+ </div>
+ </div>
+ {end:}
+
+ {if:!p.oneSectionOnly}
+ <div class="row">
+ <div class="small-4 columns"><b>{term.section.cap}:</b></div>
+ <div class="small-8 columns">{s.name:h}</div>
+ </div>
+ {end:}
+ <div class="row">
+ <div class="small-4 columns"><b>Quant:</b></div>
+ <div class="small-4 columns"> </div>
+ <div id="quant_ticket_{i.invID}_s" class="small-4 columns text-right">
+ <input class="glmCartQuant" type="number" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}">
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns"><b>Price:</b></div>
+ <div class="small-8 columns text-right">{if:i.show_price}{i.price}{end:}</div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns"><b>Total:</b></div>
+ <div class="small-8 columns text-right">{if:i.show_price}{i.extended}{end:}</div>
+ </div>
+ </div>
+
+ {if:i.descr}
+ <!-- Ticket images and description for LARGE browsers-->
+
+ <div class="row show-for-medium-up">
+ <div class="medium-2 columns"></div>
+ <div class="medium-10 columns">
+ {if:option.cart_images}
+ {if:i.image}
+ <img class="right" src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}">
+ {end:}
+ {end:}
+ {i.descr:h}
+ </div>
+ </div>
+ {end:}
+
+ <!-- For each add-on for this ticket -->
+
+ {foreach:i.addons,a}
+
+ <!-- Add-on for LARGE browsers -->
+
+ <div class="row show-for-medium-up">
+ <div class="medium-1 columns"> </div>
+ <div id="quant_addon_{a.id}" class="medium-2 columns text-right">
+ <input class="glmCartQuant" type="number" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units="" value="{a.selected}">
+ </div>
+ <div class="medium-5 columns">{a.name}</div>
+ <div class="medium-2 columns text-right">{a.unit_cost}/{a.unit_name:h}</div>
+ <div class="medium-2 columns text-right">{a.money}</div>
+ </div>
+
+ <!-- Add-on for SMALL-Medium browsers -->
+
+ <div class="hide-for-medium-up" style="margin-top: 1em;">
+ <div class="row">
+ <div class="small-12 columns text-center"><h4>{a.name}</h4></div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns"><b>Quant:</b></div>
+ <div class="small-4 columns"> </div>
+ <div id="quant_addon_{a.id}_s" class="small-4 columns text-right">
+ <input class="glmCartQuant" type="number" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units="" value="{a.selected}">
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns text-left"><b>Price:</b></div>
+ <div class="small-8 columns text-right">{a.unit_cost}/{a.unit_name:h}</div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns text-left"><b>Total:</b></div>
+ <div class="small-8 columns text-right">{a.money}</div>
+ </div>
+ </div>
+
+ {end:} <!-- /each addons -->
+
+ <!-- If user selected a promo code that matches this ticket -->
+
+ {if:i.promo}
+ <div class="row show-for-medium-up">
+ <div class="medium-2 columns"> </div>
+ <div class="medium-6 columns">
+ <b>{term.promo.cap}: {promoCode}</b>
+ </div>
+ <div class="medium-2 columns text-right"></div>
+ <div class="medium-2 columns text-right">
+ {i.promo.credit}
+ </div>
+ </div>
+ <div class="row hide-for-medium-up" style="margin-top: 1em;">
+ <div class="small-4 columns"><b>Promo:</b></div>
+ <div class="small-4 columns">{promoCode}:</div>
+ <div class="small-4 columns text-right">{i.promo.credit}</div>
+ </div>
+
+ {end:} <!-- /if Promo Code -->
+
+ {end:} <!-- /each ticket -->
+
+ {end:} <!-- /each section -->
+
+ {end:} <!-- /each date -->
+
+ </div> <!-- /panel callout -->
+ </div> <!-- columns -->
+ </div> <!-- rows -->
+
+ {end:} <!-- each performance -->
+
+ <!-- If we need to assign this ticket to be sold in another venue or we need to ask for likely date of use -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+ {end:}
+
+{end:} <!-- /each venue -->
+
+ <!-- Cart Summary and Checkout Button -->
+
+{if:cartHasContents}
+ <div class="row">
+ <div class="large-12 columns text-right">
+ <h2>Grand Total {totals.price}</h2>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+ <div class="row">
+ <div class="large-12 columns text-right">
+ {if:!blockCheckout}
+ <a class="small button right radius" id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" >{term.nav.checkout}</a>
+ {else:}
+ <a class="small button right radius alert disabled">Please complete the items in RED above.</a>
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{else:}
+ <div class="row">
+ <div class="large-12 columns">
+ <p class="right">Your cart is currently empty.</p>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{end:}
+
+<!-- If Cart Promotions option (promot other performances at the bottom of the cart) is enabled -->
+
+{if:option.cart_promotions}
+ <div class="row">
+ <div class="small-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="small-12 columns"><h5>You may also be interested in ...</h5></div>
+ </div>
+ {foreach:cartPromotions,p}
+ <div class="row">
+ <div class="small-12 columns">
+ <h3><a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={p.id}">{p.member_name:h} - {p.name:h}</a></h3>
+ </div>
+ {if:p.image}
+ <div class="small-12 columns hide-for-medium-up">
+ <img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{p.image}">
+ </div>
+ {end:}
+ <div class="small-8 columns">
+ {if:p.short_descr}{p.short_descr:h}{end:}
+ </div>
+ <div class="small-4 columns show-for-medium-up">
+ {if:p.image}
+ <img class="right" src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{p.image}">
+ {end:}
+ </div>
+ </div>
+ {end:}
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+{end:} <!-- /If cart promotions -->
+
+</form> <!-- /cartForm -->
+
+<!-- Set some flexy page parameters for use in JAVAscript -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ vertScroll="vertScroll"
+>
+
+<!-- jQuery scripts for controlling page actions -->
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Convert input fields to select lists
+ $('.glmCartQuant').each(function() {
+
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var max = $(this).attr('data-max');
+ var value = $(this).attr('value');
+ var units = $(this).attr('data-units');
+ var numbSel = '';
+
+ // Build the picklist
+ for (var i = 0 ; i <= max ; i++) {
+ if (value == i) {
+ numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
+ } else {
+ numbSel = numbSel.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ }
+
+ // Check for ticket or addon
+ idType = 'quant_ticket_' + ticket;
+ if (addon > 0) {
+ idType = 'quant_addon_' + addon;
+ }
+
+ numbHTML = '<select class="glmCartSelect" data-ticket="' + ticket + '" data-addon="' + addon + '">' + numbSel + '</select>' + units;
+ $('#' + idType).html(numbHTML);
+ $('#' + idType + '_s').html(numbHTML);
+
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a cart value changes, submit it as a cart update.
+ $('.glmCartSelect').change(function() {
+ vertScroll = getVertScroll();
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var value = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_cart&cart=update&ticket_inv=" + ticket + "&addon=" + addon + "&quant=" + value + "&vertScroll=" + vertScroll;
+
+ });
+
+ // When there's a change in the promo code input, submit it.
+ $('#promoCodeInput').change(function() {
+ vertScroll = getVertScroll();
+ var value = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_cart&cart=promo_code&promo_code=" + value + "&vertScroll=" + vertScroll;
+ });
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_cart&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_cart&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = flex_baseSCRIPT + "&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = flex_startURL;
+ });
+
+/* Not using right now
+ // Reprint order button
+ $('#reprintVoucher').on('keypress', function(event) {
+ if(event.which == '13'){
+ var orderID = $(this).val();
+ var voucherWindow = window.open(flex_appAdminURL + '&Action=Order_printVoucher&OrderID=' + orderID,
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ }
+ });
+*/
+
+ if (flex_vertScroll) {
+ window.scrollTo(0, flex_vertScroll);
+ }
+
+ });
+
+</script>
+<flexy:include src="TicketsFoundation/foot.html" /> <!-- Note direct reference to interface type -->
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Page
+-->
+<flexy:include src="TicketsFoundation/head.html" /> <!-- Note direct reference to interface type -->
+
+<form id="GLMcheckoutForm" action='{baseSCRIPT}&Action=Shop_checkoutSubmit' method="POST">
+ <input type="hidden" name="Action" value="Shop_checkoutSubmit">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a class="small button right radius" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <p>{checkoutText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <h2>We're sorry, we had a problem with your request:</h2>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+ <!-- Contact Information Form -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="large-12 columns">
+ <h2>Contact Information</h2>
+ </div>
+ </div>
+ <div class="row"> <!-- Contact form -->
+ <div class="medium-6 columns"> <!-- Contact form left column -->
+ <div class="row">
+ <div class="large-12 columns">
+ {if:formData.contact.fname.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.first_name}:
+ <input type="text" tabindex="1" name="fname" value="{formData.contact.fname.value}">
+ </label>
+ {if:formData.contact.fname.problem}
+ <small class="error">{formData.contact.fname.problem}</small>
+ {end:}
+ </div>
+ <div class="large-12 columns">
+ {if:formData.contact.lname.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.last_name}:
+ <input type="text" tabindex="2" name="lname" value="{formData.contact.lname.value}">
+ </label>
+ {if:formData.contact.lname.problem}
+ <small class="error">{formData.contact.lname.problem}</small>
+ {end:}
+ </div>
+ <div class="large-12 columns">
+ {if:formData.contact.addr1.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.address}:
+ <input type="text" tabindex="3" name="addr1" value="{formData.contact.addr1.value}">
+ </label>
+ {if:formData.contact.addr1.problem}
+ <small class="error">{formData.contact.addr1.problem}</small>
+ {end:}
+ </div>
+ <div class="large-12 columns">
+ {if:formData.contact.addr2.required}<label class="error">{else:}<label>{end:}
+ <input type="text" tabindex="4" name="addr2" value="{formData.contact.addr2.value}">
+ </label>
+ {if:formData.contact.addr2.problem}
+ <small class="error">{formData.contact.addr2.problem}</small>
+ {end:}
+ </div>
+ <div class="large-12 columns">
+ {if:formData.contact.city.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.city}:
+ <input type="text" tabindex="5" name="city" value="{formData.contact.city.value}">
+ </label>
+ {if:formData.contact.city.problem}
+ <small class="error">{formData.contact.city.problem}</small>
+ {end:}
+ </div>
+ <div class="large-12 columns">
+ {if:formData.contact.state.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.state}:
+ <select tabindex="6" name="state">
+ <option value=""> </option>
+ {foreach:formData.contact.state.states,s}
+ {if:s.stateSelected}
+ <option value="{s.stateID}" selected>{s.stateName:h}</option>
+ {else:}
+ <option value="{s.stateID}">{s.stateName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ {if:formData.contact.state.problem}
+ <small class="error">{formData.contact.state.problem}</small>
+ {end:}
+ </div>
+ <div class="large-12 columns">
+ {if:formData.contact.country.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.country}:
+ <select tabindex="7" name="country">
+ <option value=""> </option>
+ {foreach:formData.contact.country.countries,s}
+ {if:s.countrySelected}
+ <option value="{s.countryID}" selected>{s.countryName:h}</option>
+ {else:}
+ <option value="{s.countryID}">{s.countryName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ {if:formData.contact.country.problem}
+ <small class="error">{formData.contact.country.problem}</small>
+ {end:}
+ </div>
+ <div class="large-12 columns">
+ {if:formData.contact.zip.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.zip}:
+ <input type="text" tabindex="8" name="zip" value="{formData.contact.zip.value}">
+ </label>
+ {if:formData.contact.zip.problem}
+ <small class="error">{formData.contact.zip.problem}</small>
+ {end:}
+ </div>
+ </div>
+ </div> <!-- /Contact form left column -->
+ <div class="medium-6 columns"> <!-- Contact form right column -->
+ <div class="row">
+ <div class="large-12 columns">
+ {if:formData.contact.phone.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.phone}:
+ <input type="text" tabindex="9" name="phone" value="{formData.contact.phone.value}">
+ </label>
+ {if:formData.contact.phone.problem}
+ <small class="error">{formData.contact.phone.problem}</small>
+ {end:}
+ </div>
+ <div class="large-12 columns">
+ {if:formData.contact.email.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.email}:
+ <input type="text" tabindex="10" name="email" value="{formData.contact.email.value}">
+ </label>
+ {if:formData.contact.email.problem}
+ <small class="error">{formData.contact.email.problem}</small>
+ {end:}
+ </div>
+ <div class="large-12 columns">
+ {if:formData.contact.email2.required}<label class="error">{else:}<label>{end:}
+ {text.cart.checkout.email_again}:
+ <input type="text" tabindex="11" name="email2" value="{formData.contact.email2.value}">
+ </label>
+ {if:formData.contact.email2.problem}
+ <small class="error">{formData.contact.email2.problem}</small>
+ {end:}
+ </div>
+ <div class="small-10 columns" style="margin-top: .4em;">
+ <label>
+ OK to Send E-Mail?
+ <br><small>{text.cart.checkout.activities_offers}</small></br>
+ </label>
+ </div>
+ <div class="small-2 columns" style="margin-top: .6em;">
+ {if:formData.contact.email_ok}
+ <div class="glmCartFormInput"><input type="checkbox" tabindex="12" name="email_ok" checked></div>
+ {else:}
+ <div class="glmCartFormInput"><input type="checkbox" tabindex="12" name="email_ok"></div>
+ {end:}
+ </div>
+ {if:opt_field_1_name}
+ <div class="large-12 columns">
+ {if:formData.contact.opt_field_1.required}<label class="error">{else:}<label>{end:}
+ {opt_field_1_name}:
+ <input type="text" tabindex="13" name="opt_field_1" value="{formData.contact.opt_field_1.value}">
+ </label>
+ {if:formData.contact.opt_field_1.problem}
+ <small class="error">{formData.contact.opt_field_1.problem}</small>
+ {end:}
+ </div>
+ {end:}
+ {if:opt_field_2_name}
+ <div class="large-12 columns">
+ {if:formData.contact.opt_field_2.required}<label class="error">{else:}<label>{end:}
+ {opt_field_2_name}:
+ <input type="text" tabindex="14" name="opt_field_2" value="{formData.contact.opt_field_2.value}">
+ </label>
+ {if:formData.contact.opt_field_2.problem}
+ <small class="error">{formData.contact.opt_field_2.problem}</small>
+ {end:}
+ </div>
+ {end:}
+ {if:opt_field_1_name}
+ <div class="large-12 columns">
+ {if:formData.contact.opt_field_3.required}<label class="error">{else:}<label>{end:}
+ {opt_field_3_name}:
+ <input type="text" tabindex="15" name="opt_field_3" value="{formData.contact.opt_field_3.value}">
+ </label>
+ {if:formData.contact.opt_field_3.problem}
+ <small class="error">{formData.contact.opt_field_3.problem}</small>
+ {end:}
+ </div>
+ {end:}
+ </div>
+ </div> <!-- /Contact form right column -->
+ </div> <!-- /Contact form -->
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+ <!-- Cart Contents -->
+
+{foreach:cart,c} <!-- each venue -->
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ <div class="row">
+ <div class="small-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="small-12 columns">
+ <h2>{c.name:h}</h2>
+ </div>
+ </div>
+ {end:}
+
+ <!-- Output for Medium to Large Displays -->
+
+ {foreach:c.performances,p}
+
+ <div class="row show-for-medium-up">
+ <div class="large-12 columns">
+ <div class="panel callout">
+
+ <!-- Performance Header and optional nav links -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <h4>{p.name:h}</h4>
+ </div>
+ </div>
+
+ <!-- Performance descriptions and image -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ {if:p.short_descr}
+ {p.short_descr:h}
+ {else:}
+ {if:p.descr}
+ {p.descr:h}
+ {end:}
+ {end:}
+ </div>
+ </div>
+
+ <!-- Each date selected for this performance -->
+
+ {foreach:p.dates,d}
+ <div class="row">
+ <div class="large-12 columns">
+ <h5>
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+ Use any date
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </h5>
+ </div>
+ </div>
+
+ <!-- Each venue section for this date -->
+
+ {foreach:d.sections,s}
+ <div class="row">
+ <div class="small-2 columns">
+ <b>Quant</b>
+ </div>
+ {if:!p.oneSectionOnly}
+ <div class="small-2 columns">
+ <b>{term.section.cap}</b>
+ </div>
+ <div class="small-4 columns">
+ {else:}
+ <div class="small-6 columns">
+ {end:}
+ <b>{term.ticket.cap}</b>
+ </div>
+ <div class="small-2 columns text-right">
+ <b>Price</b>
+ </div>
+ <div class="small-2 columns text-right">
+ <b>Total</b>
+ </div>
+ </div>
+
+ <!-- Each ticket for this section -->
+
+ {foreach:s.tickets,i}
+ <div class="row">
+ <div id="quant_ticket_{i.invID}" class="small-2 columns">
+ {i.selected}
+ </div>
+ {if:!p.oneSectionOnly}
+ <div class="small-2 columns">
+ {s.name:h}
+ </div>
+ <div class="small-4 columns">
+ {else:}
+ <div class="small-6 columns">
+ {end:}
+ {i.title}
+ </div>
+ <div class="small-2 columns text-right">
+ {if:i.show_price}{i.price}{end:}
+ </div>
+ <div class="small-2 columns text-right">
+ {if:i.show_price}{i.extended}{end:}
+ </div>
+ </div>
+
+ <!-- Ticket images and description -->
+
+ {if:i.descr}
+ <div class="row">
+ <div class="medium-2 columns"></div>
+ <div class="medium-10 columns">
+ {i.descr:h}
+ </div>
+ </div>
+ {end:}
+
+ <!-- For each add-on for this ticket -->
+
+ {foreach:i.addons,a}
+ <div class="row">
+ <div class="medium-1 columns"> </div>
+ <div id="quant_addon_{a.id}" class="medium-2 columns">
+ {a.selected}
+ </div>
+ <div class="medium-5 columns">
+ {a.name}
+ </div>
+ <div class="medium-2 columns text-right">
+ {a.unit_cost}/{a.unit_name:h}
+ </div>
+ <div class="medium-2 columns text-right">
+ {a.money}
+ </div>
+ </div>
+ {end:}<!-- /each addons -->
+
+ <!-- If user selected a promo code that matches this ticket -->
+
+ {if:i.promo}
+ <div class="row">
+ <div class="medium-2 columns"> </div>
+ <div class="medium-6 columns">
+ {term.promo.cap}: {promoCode}
+ </div>
+ <div class="medium-2 columns text-right"></div>
+ <div class="medium-2 columns text-right">
+ {i.promo.credit}
+ </div>
+ </div>
+ {end:}<!-- /if Promo Code -->
+
+ {end:} <!-- /each ticket -->
+
+ {end:} <!-- /each section -->
+
+ {end:} <!-- /each date -->
+
+ {if:p.policy} <!-- If there's a ticket policy for anything here -->
+ <div class="row">
+ <div class="large-12 columns">
+ <p> </p>
+ <h5>Please read and agree to our policy for this {term.performance.norm}.</h5>
+ <p>{p.policy:h}</p>
+ <label class="error">I agree to the policy stated above.
+ <input class="glmPolicyCheckbox" type="checkbox" id="glmAgree" name="agree">
+ </label>
+ </div>
+ </div>
+ {end:}
+
+ </div> <!-- /panel callout -->
+ </div> <!-- columns -->
+ </div> <!-- rows -->
+
+ {end:} <!-- each performance -->
+
+ <!-- Output for Small Displays -->
+
+ {foreach:c.performances,p}
+
+ <div class="row hide-for-medium-up">
+ <div class="small-12 columns">
+ <div class="panel callout">
+
+ <!-- Performance Header and optional nav links -->
+
+ <div class="row">
+ <div class="small-12 columns">
+ <h4>{p.name:h}</h4>
+ </div>
+ </div>
+
+ <!-- Performance descriptions and image -->
+
+ <div class="row">
+ <div class="small-12 columns">
+ {if:p.short_descr}
+ {p.short_descr:h}
+ {else:}
+ {if:p.descr}
+ {p.descr:h}
+ {end:}
+ {end:}
+ </div>
+ </div>
+
+ <!-- Each date selected for this performance -->
+
+ {foreach:p.dates,d}
+ <div class="row" style="margin-bottom: 1em;">
+ <div class="small-12 columns">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+ Use any date
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </div>
+ </div>
+
+ <!-- Each venue section for this date -->
+
+ {foreach:d.sections,s}
+ {if:!p.oneSectionOnly}
+ <div class="row">
+ <div class="small-12 columns">
+ <b>{term.section.cap}:</b> {s.name:h}
+ </div>
+ </div>
+ {end:}
+
+ <!-- Each ticket for this section -->
+
+ {foreach:s.tickets,i}
+ <div class="row">
+ <div class="small-12 columns">
+ <h4>{i.title}<h4>
+ </div>
+ </div>
+ {if:i.descr}
+ <div class="row">
+ <div class="medium-2 columns"></div>
+ <div class="medium-10 columns">
+ {i.descr:h}
+ </div>
+ </div>
+ {end:}
+
+ <div class="row">
+ <div class="small-4 columns">
+ <b>Quant</b>
+ </div>
+ <div class="small-8 columns text-right">{i.selected}</div>
+ </div>
+ {if:i.show_price}
+ <div class="row">
+ <div class="small-4 columns">
+ <b>Price</b>
+ </div>
+ <div class="small-8 columns text-right">{i.price}</div>
+ </div>
+ <div class="row" style="margin-bottom: 1em;">
+ <div class="small-4 columns">
+ <b>Total</b>
+ </div>
+ <div class="small-8 columns text-right">{i.extended}</div>
+ </div>
+ {end:}
+
+ <!-- For each add-on for this ticket -->
+
+ {foreach:i.addons,a}
+ <div class="row">
+ <div class="small-12 columns">
+ {a.name}
+ </div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns">
+ <b>Quant</b>
+ </div>
+ <div class="small-8 columns text-right">{a.selected}</div>
+ </div>
+ <div class="row">
+ <div class="small-4 columns">
+ <b>{a.unit_cost}/{a.unit_name:h}</b>
+ </div>
+ <div class="small-8 columns text-right">{a.money}</div>
+ </div>
+ {end:}<!-- /each addons -->
+
+ <!-- If user selected a promo code that matches this ticket -->
+
+ {if:i.promo}
+ <div class="row">
+ <div class="medium-2 columns"> </div>
+ <div class="medium-6 columns">
+ {term.promo.cap}: {promoCode}
+ </div>
+ <div class="medium-2 columns text-right"></div>
+ <div class="medium-2 columns text-right">
+ {i.promo.credit}
+ </div>
+ </div>
+ {end:}<!-- /if Promo Code -->
+
+ {end:} <!-- /each ticket -->
+
+ {end:} <!-- /each section -->
+
+ {end:} <!-- /each date -->
+
+ {if:p.policy} <!-- If there's a ticket policy for anything here -->
+ <div class="row">
+ <div class="large-12 columns">
+ <p> </p>
+ <h5>Please read and agree to our policy for this {term.performance.norm}.</h5>
+ <p>{p.policy:h}</p>
+ <label class="error">I agree to the policy stated above.
+ <input class="glmPolicyCheckbox" type="checkbox" id="glmAgree" name="agree">
+ </label>
+ </div>
+ </div>
+ {end:}
+
+ </div> <!-- /panel callout -->
+ </div> <!-- columns -->
+ </div> <!-- rows -->
+
+ {end:} <!-- each performance -->
+
+ {if:c.ticket_spec_req.value}
+ <div class="row">
+ <div class="large-12 columns">
+ <label class="error">Please enter any special requests:
+ <textarea name="{c.id}_spec_req" value="{c.paymentForm.spec_req.value:h}">
+ </textarea>
+ </label>
+ </div>
+ </div>
+ {end:}
+
+ <!-- Payment -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel callout">
+ <div class="row">
+ <div class="large-10 columns">
+ <h5>Payment for {term.ticket.plur} at {c.name:h}</h5>
+ </div>
+ <div class="large-2 columns text-right">
+ <h5>{c.totalPrice}</h5>
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-12 columns">
+
+ </div>
+ </div>
+
+ {if:c.paymentResult}
+ {if:c.paymentResult.approved}
+ <div class="row">
+ <div class="large-12 columns">
+ <b>Card Payment Approved</b>
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-4 columns">
+ <b>Card Type:</b>
+ </div>
+ <div class="large-8 columns">
+ {c.paymentResult.cctype}
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-4 columns">
+ <b>Name on Card:</b>
+ </div>
+ <div class="large-8 columns">
+ {c.paymentResult.ccname}
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-4 columns">
+ <b>Card Number:</b>
+ </div>
+ <div class="large-8 columns">
+ {c.paymentResult.ccnumb}
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-4 columns">
+ <b>Expiration Date:</b>
+ </div>
+ <div class="large-8 columns">
+ {c.paymentResult.ccexp}
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-4 columns">
+ <b>Authorization Code:</b>
+ </div>
+ <div class="large-8 columns">
+ {c.paymentResult.authCode}
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-12 columns">
+ <a class="small button right radius" id="GLMprintTickets">{term.nav.print_vouchers}</a>
+ </div>
+ </div>
+ {else:}
+ <div class="row">
+ <div class="large-12 columns">
+ <h5 class="error">Card Payment Not Complete</h5>
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-12 columns">
+ <p>{c.paymentResult.description}</p>
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>
+ {if:forceCheckoutPhase}
+ <a id="GLMDeleteVenue" class="small button right radius" id="GLMprintTickets">{term.nav.delete_from_cart}</a>
+ {end:}
+ </div>
+ </div>
+ {end:}<!--paymentResult approved-->
+
+ {else:}<!--paymentResult-->
+
+ {if:c.havePaymentMethod}
+
+ {if:c.paypal.value}
+ <div class="row">
+ <div class="large-12 columns">
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="pp"> PayPal
+ {else:}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="pp">
+ {end:}
+ </div>
+ </div>
+ {end:}
+ {if:c.haveCreditCards}
+ <div class="row">
+ <div class="large-12 columns">
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="cc">
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-6 columns">
+ {if:c.paymentForm.cctype.required}<label class="error">{else:}<label>{end:}
+ Card Type:
+ <select name="{c.id}_cctype">
+ <option value=""> </option>
+ {foreach:c.paymentForm.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ {if:c.paymentForm.cctype.problem}
+ <small class="error">{c.paymentForm.cctype.problem}</small>
+ {end:}
+ </div>
+ <div class="end columns"> </div>
+ </div>
+ <div class="row">
+ <div class="large-12 columns">
+ {if:c.paymentForm.ccname.required}<label class="error">{else:}<label>{end:}
+ Name on Card:
+ <input type="text" name="{c.id}_ccname" value="{c.paymentForm.ccname.value}">
+ </label>
+ {if:c.paymentForm.ccname.problem}
+ <small class="error">{c.paymentForm.ccname.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-6 columns">
+ {if:c.paymentForm.ccnumb.required}<label class="error">{else:}<label>{end:}
+ Card Number:
+ <input type="text" name="{c.id}_ccnumb" value="{c.paymentForm.ccnumb.value}">
+ </label>
+ {if:c.paymentForm.ccnumb.problem}
+ <small class="error">{c.paymentForm.ccnumb.problem}</small>
+ {end:}
+ </div>
+ <div class="end columns"> </div>
+ </div>
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="row">
+ <div class="large-6 columns">
+ {if:c.paymentForm.ccexp.required}<label class="error">{else:}<label>{end:}
+ Month
+ <select name="{c.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ </div>
+ <div class="large-6 columns">
+ {if:c.paymentForm.ccexp.required}<label class="error">{else:}<label>{end:}
+ Year
+ <select name="{c.id}_ccyear">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </label>
+ </div>
+ </div>
+ {if:c.paymentForm.ccexp.problem}
+ <small class="error">{c.paymentForm.ccexp.problem}</small>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-6 columns">
+ {if:c.paymentForm.cccode.required}<label class="error">{else:}<label>{end:}
+ Security Code:
+ <input type="text" name="{c.id}_cccode" value="{c.paymentForm.cccode.value}">
+ </label>
+ {if:c.paymentForm.cccode.problem}
+ <small class="error">{c.paymentForm.cccode.problem}</small>
+ {end:}
+ <small>The Security Code is the three or four digit number on the signature side of your credit card.</small>
+ </div>
+ <div class="end columns"> </div>
+ </div>
+ {end:} <!-- /Have Credit Cards -->
+
+ {if:c.havePayPal} <!-- PayPal Form -->
+ <div class="row">
+ <div class="large-12 columns">
+ <img src="{baseURL}common/EventManagement/front/TicketsFoundation/assets/paypal_but6.gif"></a> <!-- Note direct reference to interface type -->
+ </div>
+ </div>
+ {end:}
+
+ {else:} <!-- /havePaymentMethod -->
+ <div class="row">
+ <div class="large-12 columns">
+ <p>
+ This {term.prop.norm} does not have a payment method configured.asdasdsadasd
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </p>
+ </div>
+ </div>
+
+
+ {end:}
+
+
+ {end:} <!-- /PaymentResult -->
+
+ </div> <!-- /panel callout -->
+ </div> <!-- columns -->
+ </div> <!-- rows -->
+
+
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+ {end:}
+{end:} <!-- /each venue -->
+
+ <div class="row">
+ <div class="large-12 columns text-right">
+ <h2>Grand Total {totals.price}</h2>
+ {if:!cartHasOneVenueOnly}
+ <p>NOTE: There will be a separate credit card transaction for each {term.prop.norm}.</p>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-4 columns" style="">
+ {ssl_seal_head_script:h}
+ {ssl_seal_body_script:h}
+ </div>
+ <div class="large-8 columns text-right">
+ {if:!blockCheckout}
+ <a class="small button right radius" id="GLMcheckoutBtn">{term.nav.purchase}</a>
+ {else:}
+ <a class="small button right radius alert disabled">Unable to checkout - please see above.</a>
+ {end:}
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+</form>
+
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ var checkoutButtonPressed = false;
+ var duration = 400;
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+
+ // Prevent multiple submissions
+ if (checkoutButtonPressed == true) {
+ return;
+ }
+
+ // Check policy acceptance
+ var needPolicyChecked = false;
+ $(".glmPolicyCheckbox").each(function() {
+ if (!$(this).is(':checked')) {
+ needPolicyChecked = true;
+ }
+ });
+
+ if (needPolicyChecked) {
+ alert('You must agree to our policies shown in red above to checkout.');
+ return false;
+ }
+
+ checkoutButtonPressed = true;
+ setBlocker();
+ $('#GLMcheckoutForm').submit();
+
+ });
+
+ // Navigation buttons
+ $('#GLMnavCart').on('click', function() { // Add to Cart
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = flex_startURL;
+ });
+
+ // Send user to PayPal payment when button is clicked
+ $('.glmPayPalButton').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=800, left=100, top=25";
+ PayPalWindow = window.open(flex_baseURL + "?Action=Shop_PayPal&memberID=" + memberID, "PayPalWindow",disp_setting);
+ PayPalWindow.focus();
+ });
+
+ // Show payment method input when selected
+ $('.glmSelectPayByCC').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByCC').show(duration);
+ });
+ });
+ $('.glmSelectPayByPayPal').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByPayPal').show(duration);
+ });
+ });
+
+ // Start with payment types hidden - only prompt showing
+ $('.glmPayTypes').hide(0);
+
+ // Show submit access blocker
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+
+</script>
+<flexy:include src="TicketsFoundation/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+<!-- \r
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Complete Page\r
+-->\r
+<flexy:include src="TicketsFoundation/head.html" /> <!-- Note direct reference to interface type -->\r
+asdasdasdasdasdasd\r
+{if:checkoutSucccessText}\r
+<div class="row"> <!-- Intro text for cart page and optional navigation -->\r
+ <div class="large-12 columns">\r
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->\r
+ <p>{checkoutSuccessText:h}</p>\r
+ </div>\r
+</div> \r
+{end:}\r
+\r
+<div class="row">\r
+ <div class="large-12 columns">\r
+ <h2>Purchase Complete</h2>\r
+ </div>\r
+</div>\r
+\r
+<!-- Print Voucher Buttons - Large -->\r
+\r
+<div class="row">\r
+ <div class="large-12 columns">\r
+ <div class="panel">\r
+ <div class="row">\r
+ <div class="small-12 columns">\r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ <p>\r
+ <a id="GLMprintTickets" class="small button right radius alert expand voucherPrint" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}">*** {term.nav.print_vouchers} for {c.name} ***</a>\r
+ </p>\r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </div>\r
+ </div>\r
+ <div class="row" style="margin-bottom: 1em;">\r
+ <div class="small-12 medium-9 columns">\r
+ <small>\r
+ Adobe Reader is required to view and print your {term.voucher.plur}. Adobe Reader is a free program available directly from Adobe. \r
+ If you do not already have Adobe Reader installed, click the "Get Adobe Reader" link now.\r
+ </small> \r
+ </div>\r
+ <div class="small-12 medium-3 columns">\r
+ <a href="http://www.adobe.com/go/getreader" target="GetAdobeReader"><img src="{baseURL}common/EventManagement/front/TicketsFoundation/assets/get_adobe_reader.png"></a>\r
+ </div>\r
+ <div class="small-12 medium-12 columns text-center" style="margin-top: .5em;">\r
+ <small>\r
+ <b>\r
+ If you are unable to print your {term.voucher.plur}, please print this page or write down the order number(s)\r
+ below and bring that to the ticket office when you arrive.\r
+ </b>\r
+ </small>\r
+ </div>\r
+ <div class="small-12 medium-12 columns text-center" style="margin-top: .5em;">\r
+ <small>\r
+ ORDER #: \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ {c.paymentResult.orderID} \r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </small>\r
+ </div> \r
+ </div>\r
+ </div>\r
+ </div>\r
+</div> \r
+\r
+<!-- Contact Information Summary -->\r
+\r
+<div class="row">\r
+ <div class="small-12 columns">\r
+ <div class="panel"> \r
+ <div class="row">\r
+ <div class="small-12 columns">\r
+ <h2>Contact Information</h2>\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Name:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {formData.contact.fname.value} {formData.contact.lname.value} \r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>{text.cart.checkout.address}:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {formData.contact.addr1.value}<br>\r
+ {if:formData.contact.addr2.value}\r
+ {formData.contact.addr2.value}<br>\r
+ {end:}\r
+ {formData.contact.city.value}, {formData.contact.state.name} {formData.contact.zip.value}<br>\r
+ {formData.contact.country.name} \r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>{text.cart.checkout.phone}:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {formData.contact.phone.value}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>{text.cart.checkout.email}:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {formData.contact.email.value}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>OK to Send E-Mail?:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {if:formData.contact.email_ok}\r
+ You have asked us to send information on activities and offers. \r
+ {else:}\r
+ You have asked us to NOT send information on activities and offers.\r
+ We will only contact you regarding this order.\r
+ {end:}\r
+ </div>\r
+ </div>\r
+ {if:opt_field_1_name}\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ {opt_field_1_name}:\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {formData.contact.opt_field_1.value}\r
+ </div>\r
+ </div>\r
+ {end:} \r
+ {if:opt_field_2_name}\r
+ <div class="row">\r
+ <div class="small-12 medium-4 columns">\r
+ {opt_field_2_name}:\r
+ </div>\r
+ <div class="small-11 medium-8 columns">\r
+ {formData.contact.opt_field_2.value}\r
+ </div>\r
+ </div>\r
+ {end:} \r
+ {if:opt_field_3_name}\r
+ <div class="row">\r
+ <div class="small-12 medium-4 columns">\r
+ {opt_field_3_name}:\r
+ </div>\r
+ <div class="small-11 medium-8 columns">\r
+ {formData.contact.opt_field_3.value}\r
+ </div>\r
+ </div>\r
+ {end:} \r
+ \r
+ </div> <!-- /panel -->\r
+ </div> <!-- /columns -->\r
+</div> <!-- /row -->\r
+\r
+<!-- Purchases -->\r
+\r
+{foreach:cart,c} <!-- each venue -->\r
+ \r
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations -->\r
+<div class="row">\r
+ <div class="large-12 columns">\r
+ <div class="panel"> \r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ <h2>{c.name:h}</h2> \r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ <!-- Each Performance -->\r
+ \r
+ {foreach:c.performances,p}\r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ <div class="panel callout">\r
+ \r
+ <!-- Performance Header and optional nav links -->\r
+ \r
+ <div class="row">\r
+ <div class="large-12 columns"> \r
+ <h4>{p.name:h}</h4>\r
+ </div>\r
+ </div>\r
+ \r
+ <!-- Performance descriptions and image -->\r
+ \r
+ <div class="row">\r
+ <div class="large-12 columns"> \r
+ {if:p.short_descr}\r
+ {p.short_descr:h}\r
+ {else:}\r
+ {if:p.descr}\r
+ {p.descr:h}\r
+ {end:}\r
+ {end:}\r
+ </div>\r
+ </div> \r
+ \r
+ <!-- Each date selected for this performance -->\r
+ \r
+ {foreach:p.dates,d}\r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ <h5> \r
+ {if:d.dateSpecific}\r
+ {d.fullDate}\r
+ {else:}\r
+ Use any date\r
+ {if:c.likelyDate}\r
+ - Likely Date {c.likelyDate}\r
+ {end:}\r
+ {end:}\r
+ </h5>\r
+ </div>\r
+ </div> \r
+ \r
+ <!-- Each venue section for this date -->\r
+ \r
+ {foreach:d.sections,s}\r
+ <div class="row show-for-large-up">\r
+ <div class="large-1 columns text-right">\r
+ <b>Quant</b>\r
+ </div>\r
+ {if:!p.oneSectionOnly}\r
+ <div class="large-3 columns">\r
+ <b>{term.section.cap}</b>\r
+ </div>\r
+ <div class="large-4 columns">\r
+ <b>{term.ticket.cap}</b>\r
+ </div>\r
+ {else:}\r
+ <div class="large-7 columns">\r
+ <b>{term.ticket.cap}</b>\r
+ </div>\r
+ {end:} \r
+ <div class="large-2 columns text-right">\r
+ <b>Price</b>\r
+ </div>\r
+ <div class="large-2 columns text-right">\r
+ <b>Total</b>\r
+ </div>\r
+ </div>\r
+ \r
+ <!-- Each ticket for this section -->\r
+ \r
+ {foreach:s.tickets,i}\r
+ <div class="row" style="margin-top: .6em;">\r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Quant</div>\r
+ <div class="small-8 large-1 columns hide-for-large-up">{i.selected}</div> \r
+ <div class="small-8 large-1 columns text-right show-for-large-up">{i.selected}</div> \r
+ {if:!p.oneSectionOnly}\r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">{term.section.cap}</div>\r
+ <div class="small-8 large-3 columns">{s.name:h}</div> \r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">{term.ticket.cap}</div>\r
+ <div class="small-8 large-4 columns">{i.name:h}</div> \r
+ {else:}\r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">{term.ticket.cap}</div>\r
+ <div class="small-8 large-7 columns">{i.name:h}</div> \r
+ {end:}\r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Price</div>\r
+ <div class="small-8 large-2 columns hide-for-large-up">{i.price}</div> \r
+ <div class="small-8 large-2 columns text-right show-for-large-up">{i.price}</div> \r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Total</div>\r
+ <div class="small-8 large-2 columns hide-for-large-up">{i.extended}</div> \r
+ <div class="small-8 large-2 columns text-right show-for-large-up">{i.extended}</div> \r
+ </div>\r
+ \r
+ <!-- Ticket images and description -->\r
+ \r
+ {if:i.descr}\r
+ <div class="row">\r
+ <div class="medium-2 columns"></div>\r
+ <div class="medium-10 columns">\r
+ {i.descr:h}\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ <!-- For each add-on for this ticket -->\r
+ \r
+ {foreach:i.addons,a}\r
+ <div class="row" style="margin-top: .6em;">\r
+ <div class="large-1 columns"> </div>\r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Quant</div>\r
+ <div class="small-8 large-1 columns hide-for-large-up">{a.selected}</div> \r
+ <div class="small-8 large-1 columns text-right show-for-large-up">{a.selected}</div> \r
+ \r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">{term.ticket.cap}</div>\r
+ <div class="small-8 large-6 columns">{a.name:h}</div> \r
+ \r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Price</div>\r
+ <div class="small-8 columns hide-for-large-up">{a.unit_cost}/{a.unit_name:h}</div>\r
+ <div class="small-8 large-2 columns text-right show-for-large-up">{a.unit_cost}/{a.unit_name:h}</div>\r
+ \r
+ <div class="small-4 columns hide-for-large-up" style="font-weight: bold;">Total</div>\r
+ <div class="small-8 large-2 columns hide-for-large-up">{a.money}</div> \r
+ <div class="small-8 large-2 columns text-right show-for-large-up">{a.money}</div> \r
+ </div>\r
+ {end:}<!-- /each addons -->\r
+ \r
+ <!-- If user selected a promo code that matches this ticket -->\r
+ \r
+ {if:i.promo}\r
+ <div class="row">\r
+ <div class="medium-2 columns"> </div>\r
+ <div class="medium-6 columns">\r
+ {term.promo.cap}: {promoCode}\r
+ </div>\r
+ <div class="medium-2 columns text-right"></div>\r
+ <div class="medium-2 columns text-right">\r
+ {i.promo.credit}\r
+ </div>\r
+ </div> \r
+ {end:}<!-- /if Promo Code -->\r
+ \r
+ {end:} <!-- /each ticket --> \r
+ \r
+ {end:} <!-- /each section -->\r
+ \r
+ {end:} <!-- /each date --> \r
+\r
+ {if:p.policy} <!-- If there's a ticket policy for anything here -->\r
+ \r
+ <!-- Ticket policy -->\r
+ \r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ <p>{p.policy:h}</p>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+\r
+ </div> <!-- /panel callout -->\r
+ </div> <!-- columns -->\r
+ </div> <!-- rows -->\r
+ \r
+ {end:} <!-- each performance -->\r
+ \r
+ {if:c.paymentForm.spec_req.value}\r
+ \r
+ <!-- Special Requests -->\r
+ \r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ {c.paymentForm.spec_req.value:h}\r
+ </div>\r
+ </div>\r
+ {end:}\r
+\r
+ <!-- Payment Summary -->\r
+ \r
+ <div class="row">\r
+ <div class="small-12 columns">\r
+ <div class="panel callout">\r
+ <div class="row">\r
+ <div class="large-10 columns">\r
+ <b>Payment for {term.ticket.plur} at {c.name:h}</b>\r
+ </div>\r
+ <div class="large-2 columns text-right">\r
+ <h5>{c.totalPrice}</h5>\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ \r
+ </div>\r
+ </div>\r
+ <div class="row" style="margin-bottom: .6em;">\r
+ <div class="large-12 columns">\r
+ <b>Card Payment Approved</b>\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Card Type:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.cctype}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Name on Card:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.ccname}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Card Number:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.ccnumb}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Expiration Date:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.ccexp}\r
+ </div>\r
+ </div>\r
+ <div class="row">\r
+ <div class="small-12 large-4 columns">\r
+ <b>Authorization Code:</b>\r
+ </div>\r
+ <div class="small-11 large-8 columns">\r
+ {c.paymentResult.authCode}\r
+ </div>\r
+ </div>\r
+ </div> <!-- /panel callout -->\r
+ </div> <!-- /columns -->\r
+ </div> <!-- /row -->\r
+ \r
+ {if:c.ticket_policy}\r
+ <div class="row">\r
+ <div class="large-12 columns">\r
+ {c.ticket_policy:h}\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {if:option.show_location_blocks} <!-- if showing location blocks - usually for multiple locations --> \r
+ </div> <!-- /panel -->\r
+ </div> <!-- /columns -->\r
+</div> <!-- /row --> \r
+ {end:} \r
+{end:} <!-- /each venue -->\r
+\r
+<!-- Checkout Grand Totals -->\r
+\r
+<div class="row">\r
+ <div class="large-12 columns text-right">\r
+ <h2>Grand Total {totals.price}</h2>\r
+{if:!cartHasOneVenueOnly}\r
+ <p>NOTE: You will see a separate credit card transaction for each {term.prop.norm} above.</p>\r
+{end:} \r
+ </div>\r
+</div>\r
+\r
+{trackingScript:h}\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+\r
+ // Navigation buttons\r
+ $('#GLMnavCart').click(function() { // Add to Cart \r
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';\r
+ });\r
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection\r
+ window.location = flex_startURL;\r
+ });\r
+ \r
+ // Print vouchers\r
+ $('.voucherPrint').click(function(){ \r
+ \r
+ var orderID = $(this).attr('emOrderID');\r
+ var orderVerify = $(this).attr('emOrderVerify');\r
+ var voucherWindow = window.open(flex_baseSCRIPT + "&Action=Shop_printVoucher&OrderID=" + orderID + "&orderVerify=" + orderVerify, \r
+ "voucherPrint", \r
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"\r
+ );\r
+ voucherWindow.focus();\r
+ voucherWindow.print();\r
+ return false;\r
+\r
+ });\r
+\r
+ });\r
+\r
+</script>\r
+<flexy:include src="TicketsFoundation/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+<script type="text/javascript"> \r
+ function reprintVoucher(baseSCRIPT, orderID, orderVerify) {\r
+ var voucherWindow = window.open(baseSCRIPT + "&Action=Shop_printVoucher&OrderID=" + orderID + "&orderVerify=" + orderVerify, "voucherPrint", "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"\r
+ );\r
+ voucherWindow.focus();\r
+ voucherWindow.print();\r
+ return false;\r
+ } \r
+</script> \r
+<h2>\r
+ <a href="" onClick="reprintVoucher('{baseSCRIPT}', {cartEntry.paymentResult.orderID}, '{cartEntry.paymentResult.orderVerification}'); return false;">\r
+ Click here to reprint your {term.voucher.plur}\r
+ </a>\r
+</h2>\r
+\r
+<h3>\r
+ {term.ticket.plur_cap} Purchased at:<br>\r
+ {cartEntry.name}\r
+</h3>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+{if:cartEntry.descr}<p>{cartEntry.descr:h}</p>{end:}\r
+ \r
+<table border="1" cellspacing="0" cellpadding="2">\r
+\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ <th align="left">{term.performance.cap}</th>\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+\r
+{foreach:cartEntry.performances,p} <!-- each performance -->\r
+ {foreach:p.dates,d} <!-- each date -->\r
+ {foreach:d.sections,s}\r
+ \r
+ \r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">{i.selected}</td>\r
+ <td align="left">{p.name:h}</td>\r
+ <td align="left">{i.title:h}</td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ <td align="left"> </td>\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ <td> </td>\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ \r
+ \r
+ {end:} <!-- each section -->\r
+ {end:} <!-- each performance for this date -->\r
+{end:} <!-- each date for this venue -->\r
+\r
+ <tr>\r
+ <td colspan="4"> </td>\r
+ <td align="right">{cartEntry.totalPrice}</td>\r
+ </tr>\r
+\r
+<!-- \r
+ <tr>\r
+ <th align="right">{cartEntry.totalTickets}</th>\r
+ <td colspan="6"> </td>\r
+ <th align="right">{cartEntry.totalPrice}</th>\r
+ </tr>\r
+ -->\r
+ \r
+</table>\r
+\r
+ <!-- If special requests possible -->\r
+{if:cartEntry.ticket_spec_req}\r
+<p>\r
+ Special requests: {cartEntry.paymentForm.spec_req.value:h}\r
+</p> \r
+{end:}\r
+ \r
+\r
+{if:cartEntry.ticket_policy}<p>{cartEntry.ticket_policy:h}</p>{end:}\r
+ \r
+<p> \r
+ <table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th colspan="2" align="center">Credit Card Payment Approved</th></tr>\r
+ <tr><th align="left">Card Type</th><td>{cartEntry.paymentResult.cctype}</td></tr>\r
+ <tr><th align="left">Name on Card</th><td>{cartEntry.paymentResult.ccname}</td></tr>\r
+ <tr><th align="left">Card Number</th><td>{cartEntry.paymentResult.ccnumb}</td></tr>\r
+ <tr><th align="left">Expiration Date</th><td>{cartEntry.paymentResult.ccexp}</td></tr>\r
+ <tr><th align="left">Authorization Code</th><td>{cartEntry.paymentResult.authCode}</td></tr>\r
+ </table>\r
+</p> \r
+ \r
+<!-- is this needed? <flexy:include src="TicketsFoundation/foot.html" /> -->
\ No newline at end of file
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Section Selection Page\r
+\r
+-->\r
+\r
+<flexy:include src="TicketsFoundation/head.html" /> <!-- Note direct reference to interface type -->\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">{term.section.cap} Selection</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem">{term.nav.show_selected}</a>\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+\r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{sectionText:h}</div>\r
+\r
+{if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+{end:}\r
+\r
+ <p>You have selected</p>\r
+ <div class="glmSection">\r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">{performanceDetail.member_name}</div><br> \r
+ <div class="glmBlockName">{performanceDetail.name}</div>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+<!-- <p><span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</p> -->\r
+<!-- <p>{performanceDetail.descr:h}</p> -->\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <!-- List of available sections -->\r
+ <hr />\r
+ <p>Please select from the following</p>\r
+ <div class="glmSection">\r
+{foreach:sectionList,x} \r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">\r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}">{x.name}</a>\r
+ </div> \r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}" class="glmNavItem">{term.nav.select}</a>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+ <p><span class="glmBold">{term.section.cap}</span>: {x.member_name}</p>\r
+ <p>{x.descr:h}</p>\r
+ </div>\r
+ </div> \r
+{end:}\r
+ \r
+ </div>\r
+\r
+</div> <!-- /GLMcontent -->\r
+\r
+ <script type="text/javascript">\r
+\r
+ $(document).ready(function(){ \r
+\r
+ // Code to kick off the geolocation-display feature \r
+ $("#locationMap").geolocate({\r
+ lat: "#lat",\r
+ lng: "#lon",\r
+ mapOptions: {\r
+ disableDefaultUI: false,\r
+ mapTypeControl: true,\r
+ mapTypeId: "roadmap",\r
+ zoom: 12\r
+ },\r
+ markerOptions: {\r
+ draggable: false,\r
+ title: "This is your selected location"\r
+ }\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+<flexy:include src="TicketsFoundation/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="TicketsFoundation/head.html" /> <!-- Note direct reference to interface type -->
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.event.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{introText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>Please select from the following</p>
+{if:showTickets}
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+<!-- <input type="hidden" name="PerformanceID" value="{performanceDetail.id}"> -->
+<!-- <input type="hidden" name="SectionID" value="{sectionDetail.id}"> -->
+{end:}
+ <!-- List of Locations -->
+ {foreach:membersList,m}
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ <div class="glmBlockContentRight">
+ <div id="locationMap_{m.id}" class="GLMmapWindow" data-member-id="{m.id}">(map loads here)</div>
+ <form>
+ <input type="hidden" id="lat_{m.id}" value="{m.lat}">
+ <input type="hidden" id="lon_{m.id}" value="{m.lon}">
+ </form>
+ </div><!--/.glmBlockContentRight-->
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>
+ <div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date} through {p.end_date.date}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:!showTickets}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a>
+ {end:}
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value}, {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
+{if:showTickets}
+ <div id="GLMselect">
+ <a id="GLMselectButton" class="glmNavItemWide">{term.nav.select}</a>
+ </div>
+ </form>
+{end:}
+</div><!-- /GLMcontent -->
+<!--</div> -->
+
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ ticketsJSON="ticketsJSON:h"
+ minDate="performanceDetail.start_date.date"
+ maxDate="performanceDetail.end_date.date",
+>
+
+<script type="text/javascript">
+
+ var addButtonPushed = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these ' + flex_termTicketPlur + ' on-line.\
+ </p>\
+ ';
+
+ $(document).ready(function(){
+
+ // Code to kick off the geolocation-display feature
+ function doLocationMap(id) {
+ $("#locationMap_" + id).geolocate({
+ lat: "#lat_" + id,
+ lng: "#lon_" + id,
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ }
+ $('.GLMmapWindow').each(function( index, memb ) {
+ var memberID = $(this).attr('data-member-id');
+ doLocationMap(memberID);
+ });
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // for each ticket
+ $.each(flex_ticketsJSON, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDate_' + ticket.id).html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_inv_array[' + dateData['date'] + ']" value="' + dateData.id + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: flex_minDate,
+ maxDate: flex_maxDate,
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate);
+ } else {
+
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i <= (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ $('#GLMselectButton').click(function() {
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a ' + flex_termTicketNorm + ' quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+
+</script>
+<flexy:include src="TicketsFoundation/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+
+<flexy:include src="TicketsFoundation/head.html" /> <!-- Note direct reference to interface type -->
+
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Ticket Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketOptText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>You have selected</p>
+ <!-- List of Ticket Options -->
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">{term.prop.cap}: {performanceDetail.member_name}</div>
+<!-- <div class="glmDescr">{term.order.cap} up to: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</div> -->
+ <!--<p>{performanceDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{sectionDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <!--<p>{sectionDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{ticketDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ {if:!ticketDetail.date_specific.value}
+ <div class="glmDescr">Use any date {if:ticketDetail.start_date.timestamp} from {ticketDetail.start_date.date} to {ticketDetail.end_date.date}{end:}</div>
+ {end:}
+ {if:!ticketDetail.time_specific.value}
+ <div class="glmDescr">Use any time</div>
+ {else:}
+ <div class="glmDescr">Time: {ticketDetail.ticket_time.time}</div>
+ {end:}
+ {if:!ticketDetail.unlimted_use.value}
+ <!-- <div class="glmDescr">Each {term.ticket.norm} may be used {ticketDetail.uses} time(s)</div> -->
+ {else:}
+ <div class="glmDescr">Each {term.ticket.norm} may be used an unlimited number of times</div>
+ {end:}
+ <div class="glmDescr">{ticketDetail.descr:h}</div>
+ </div>
+ </div>
+ </div>
+ <!-- Date and quantity selection -->
+ <p>Please select from the following</p>
+ <div class="glmSection">
+ <div id="GLMeventDateSelectBlock">
+ <div id="GLMeventDateSelect" class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">Select desired date:</div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInputShort"><input type="text" id="GLMeventDate" name="ticket_date" value=""> (click in field to set date)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr quant">Select Quantity:</div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer">(please select date first)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {if:reason}<div id="GLMaddToCart" name="ticket">(disabled - please see above)</div>{else:}<div id="GLMaddToCart" class="glmNavItem add" name="ticket">{term.nav.add_to_cart}</div>{end:}
+</div><!-- GLMcontent -->
+
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ dateSpecific="ticketDetail.date_specific.value"
+ inventoryJSON="inventoryJSON:h"
+ leadTime="detail.performance.purch_leadtime"
+ minDate="performanceDetail.start_date.date"
+ maxDate="performanceDetail.end_date.date",
+ performanceDetailID="performanceDetail.id"
+ sectionDetailID="sectionDetail.id"
+ ticketDetailID="ticketDetail.id"
+>
+
+<!-- jQuery scripts for controlling page actions -->
+<script type="text/javascript">
+
+ // Whether ticket has date specific inventory
+ var dateSpecific = flex_dateSpecific + 0;
+
+ // Dates for inventory data
+ var dates = flex_inventoryJSON;
+
+ $(document).ready(function(){
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+ var dateData = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector" name="quant"><option value="0"></option>[ticket-quants]</select>\
+ ';
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these flex_termTicketPlur on-line.\
+ ' + flex_termTicketPlurCap + ' must be purchased at least ' + flex_leadTime + ' hours prior to the ' + termPerformanceNorm + '.\
+ Please select another date or time.\
+ </p>\
+ ';
+ var selectedInv;
+ var ticketQuants;
+ var addButtonPushed = false;
+
+ // Start by counting the number of dates to see if we have only 1
+ var dateCount = 0;
+// if (dateSpecific) {
+ $.each(dates, function(index, date) {
+ dateCount = dateCount + 1;
+ dateData = date;
+ });
+// }
+ // if there's no date specific tickets
+ if (!dateSpecific) {
+ // Populate date input field
+ $('#GLMeventDateSelectBlock').html('<input type="hidden" name="ticket_date" value="0">');
+ doQuantSelection();
+ // if there's only one date, then display that and move on.
+ } else if (!dateSpecific || dateCount == 1) {
+ // populate date input field
+ $('#GLMeventDate').val(dateData['date']);
+ $('#GLMtickets').html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_date" value="' + dateData['date'] + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+
+ doQuantSelection();
+ } else {
+ // Use the date picker to select a date
+ dateData = false;
+ $("#GLMeventDate").datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: flex_minDate,
+ maxDate: flex_maxDate,
+ onSelect: function(selectedDate, inst) {
+ // Update input message
+ $('#GLMdateMessage').html('<br />');
+
+ // Get data for the selected date
+ dateData = dates[selectedDate];
+ doQuantSelection();
+ } // Date Selection
+
+ }); // Date Picker
+
+ }
+
+ function doQuantSelection() {
+ // Build the ticket quant options
+ ticketQuants = '';
+ var selectMax = dateData['available'];
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+ var tooLate = dateData['tooLate'];
+ if (tooLate) {
+ $('#GLMticketQuantContainer').html(ticketTooLate);
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i <= (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ $('#GLMticketQuantContainer').html(ticketQuantSelection.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+// doAddToCartSetup();
+ }
+
+// function doAddToCartSetup() {
+ // Add to cart action
+ $('#GLMaddToCart').click(function() {
+ if (addButtonPushed) {
+ return;
+ }
+ var reason = '';
+ // Check date
+ if (dateData) {
+ selectedInv = dateData.id;
+ } else {
+ reason = reason.concat('* You need to select a date first.\n');
+ }
+ // Check quantity
+ var selectedQuant = (parseInt($('#glmQuantSelector').val()) + 0);
+ if (selectedQuant == 0) {
+ reason = reason.concat('* You need to select a quantity first.\n');
+ }
+ // Check if there's a reason we can't add this to the cart yet
+ if (reason != '') {
+ alert(reason);
+ return;
+ }
+ // Adding to cart
+ addButtonPushed = true;
+ $("#GLMeventDate").datepicker('disable');
+ $('#glmQuantSelector').prop('disabled', 'disabled');
+ setBlocker();
+ // Submit to cart
+ window.location = flex_baseSCRIPT + "&Action=Shop_cart&cart=add&PerformanceID=" + flex_performanceDetailID + "&SectionID=" + flex_sectionDetailID + "&TicketID=" + flex_ticketDetailID + "&ticket_inv=" + selectedInv + "&quant=" + selectedQuant;
+
+ });
+// }
+ // Code to kick off the geolocation-display feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ // Navigation buttons
+ $('#GLMnavCart').click(function() { // Add to Cart
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = flex_startURL;
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+</script>
+<flexy:include src="TicketsFoundation/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="TicketsFoundation/head.html" /> <!-- Note direct reference to interface type -->
+
+<form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+ <input type="hidden" name="PerformanceID" value="{performanceDetail.id}">
+ <input type="hidden" name="SectionID" value="{sectionDetail.id}">
+
+ <!-- Top section - general page text and optional items before cart contents -->
+
+ <div class="row"> <!-- Intro text for cart page and optional navigation -->
+ <div class="large-12 columns">
+
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <a class="small button right radius" href="{baseSCRIPT}&Action=Shop_cart">{term.nav.show_selected}</a> <!-- sends user to cart page -->
+ {if:!option.ticket_selection.start_at_cart}
+ <a class="small button right radius" href="{baseSCRIPT}&Action=Shop_start">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <p>{ticketText:h}</p>
+
+ </div>
+ </div>
+
+{if:reason} <!-- If there's any problems, display reason text -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div data-alert class="alert-box info">
+ <h2>We're sorry, we had a problem with your request:</h2>
+ <ul class="disk">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ </div>
+ </div>
+{end:}
+
+ <!-- Item Selection -->
+
+{foreach:sections,s} <!-- each section -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <!-- Member general information -->
+ <div class="row">
+ <div class="small-12 large-8 columns">
+ <h2>{performanceDetail.member_name:h}</h2>
+ <h3>{performanceDetail.name:h}</h3>
+ </div>
+ {if:performanceDetail.image}
+ <div class="small-12 large-3 columns">
+ <div class="right"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{performanceDetail.image}"></div>
+ </div>
+ {end:}
+ </div>
+
+ <!-- Section information -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ {if:!oneSectionOnly}
+ <h5>{s.sectionDetail.name}</h5>
+ {end:}
+ {if:performanceDetail.descr}
+ {performanceDetail.descr:h}
+ {end:}
+ </div>
+ </div>
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+ <!-- List of available events -->
+
+ {foreach:s.ticketsData,x} <!-- for each performance -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+
+ <!-- Ticket -->
+
+ <div class="row">
+ <div class="large-12 columns">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <h4>{x.title}</h4>
+ {else:}
+ <h4><a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={performanceDetail.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a></h4>
+ {end:}
+ </div>
+ </div>
+ <div class="row">
+ <div class="large-12 columns">
+ {if:x.descr}
+ {x.descr:h}
+ {end:}
+ <p>
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}<br>
+ {end:}
+
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time}
+ {end:}
+
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {end:}
+ </p>
+ </div>
+ </div>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+
+ <div class="row">
+ <div class="medium-3 columns" style="margin-bottom: 1em;">
+ <b>Price</b><br>
+ <span style="position: relative; top: .6em;">{x.price}</span>
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ </div>
+ <div class="medium-4 columns">
+ <label>
+ <b>Date:</b>
+ <div id="GLMeventDateSelect_{x.id}_S">
+ <input type="text" id="GLMeventDateInput_{x.id}" data-ticket="{x.id}" class="glmTicketDateSelect" name="ticket_date[{x.id}]" value="">
+ </div>
+ </label>
+ </div>
+ <div class="medium-5 columns">
+ <label>
+ <b>Quantity:</b>
+ <select id="glmQuantSelector_{x.id}" data-ticket="{x.id}" name="quant[{x.id}]" class="glmTicketQuantSelect">
+ <option value="">(Select date first)</option>
+ </select>
+ </label>
+ </div>
+ </div>
+
+ <!-- For each add-on for this ticket -->
+
+ {foreach:x.addons,a}
+
+ <div class="row">
+ <div class="medium-1 columns"> </div>
+ <div class="medium-6 columns" style="position: relative; top: .6em; margin-bottom: 1em;">
+ {a.name} - {a.unit_cost}
+ </div>
+ <div class="medium-5 columns">
+ <input type="hidden" class="GLMaddonTicketInvID_{x.id}" name="GLMaddonTicketInvID[{a.id}]" value="">
+ <input type="hidden" name="GLMaddonID[{a.id}]" value="{a.id}">
+ <select id="glmAddonQuantSelect_{a.id}" class="glmAddonQuantSelector_{x.id}" type="number" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units="" name="GLMaddonQuant[{a.id}]" >
+ <option value="">(Select quantity first)</option>
+ </select>
+ </div>
+ </div>
+
+ {end:} <!-- /each addons -->
+
+ {end:} <!-- /include_options_in_ticket_list -->
+
+ </div> <!-- /panel -->
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+ {end:} <!-- /for each performance -->
+
+{end:} <!-- /each section -->
+
+ <!-- Accept Selections -->
+
+ <div class="row">
+ <div class="large-12 columns text-right">
+ <a class="small button right radius" id="GLMselectButton">{term.nav.select}</a>
+ </div> <!-- /columns -->
+ </div> <!-- /row -->
+
+</form>
+
+{if:option.ticket_selection.include_options_in_ticket_list}
+
+ <!-- OK, this is a hack. I'm using it because toJavascript won't take a ":h". -->
+ {startScript:h}
+ var tickets = {ticketsJSON:h};
+ </script>
+
+ <!-- Set some flexy page parameters for use in JAVAscript -->
+ <flexy:toJavascript
+ flexy:prefix="flex_"
+ baseURL="baseURL"
+ purchLeadtime="performanceDetail.purch_leadtime"
+ >
+
+ <!-- jQuery scripts for controlling page actions -->
+ <script type="text/javascript">
+
+ var addButtonPushed = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these ' + flex_termTicketPlur + ' on-line.\
+ ' + flex_termTicketPlurCap + ' must be purchased at least [hours] hours prior to the ' + flex_termPerformanceNorm + '.\
+ Please select another date or time.\
+ </p>\
+ ';
+
+
+ $(document).ready(function(){
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // populate date input fields
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ $('GLMaddonTicketInvID_' + ticket.id).val(dateData.id);
+ $('#GLMeventDateInput_' + ticket.id).val('Various Dates');
+ $('#GLMeventDateInput_' + ticket.id).hide();
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input fields
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ $('#GLMeventDateInput_' + ticket.id).val(dateData.ticket_date.date);
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ var inv = inventory[mdy];
+
+ todayDate = new Date();
+
+ if (inventory[mdy]) {
+
+ // Check for past dates
+ thisDate = $.datepicker.parseDate("mm/dd/yy", inv.ticket_date.date);
+ if (thisDate < todayDate) {
+ return [false,"","Date Passed"];
+ }
+
+ // Get some other detail for this ticket
+ time = inv.ticket_time.time;
+
+ // Display the quantity available or "Unlimited" if that's appropriate
+ if (inv.unlimited_quant) {
+ avail = 'Unlimited quantity available\ntime: ' + time;
+ } else {
+ avail = inv.available + ' available\ntime: ' + time;
+ }
+
+ return [true,"",avail];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ // Note that we submit with the hidden field. The large and small date selection both set the hidden field when selected.
+
+ // For Large displays
+ if($('#GLMeventDateInput_' + ticket.id).length > 0) {
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: ticket.startDate,
+ maxDate: ticket.endDate,
+ beforeShow: function(){
+ $(".ui-datepicker").css('font-size', 9)
+ },
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ // Populate Ticket Inventory Array Value
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+
+ $('.GLMaddonTicketInvID_' + ticket.id).each(function() {
+ $(this).val(dateData.id);
+ })
+
+ // Clear addon-on quants from any previous date selection
+ $('.glmAddonQuantSelector_' + ticket.id).empty();
+ $('.glmAddonQuantSelector_' + ticket.id).append('<option value="">(Select quantity first)</option>');
+
+ // Setup quantity selection
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+ } // Date Selection
+ }); // Date Picker
+ }
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ // Clear select date first message
+ $('#glmQuantSelector_' + id).empty();
+
+ // Add available quantity selections
+ var ticketQuants = '<option value="" selected>(select quantity)</option>';
+ for (var i = 1; i <= (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ $('#glmQuantSelector_' + id).append(ticketQuants);
+
+ }
+
+ // When a ticket quantity is selected - add the select options for any add-ons
+ $('.glmTicketQuantSelect').change(function( index ) {
+
+ var id = $(this).attr('data-ticket');
+ var v = $(this).val();
+
+ $('.glmAddonQuantSelector_' + id).each(function( index ) {
+
+ addonID = $(this).attr('data-addon');
+ addonMax = $(this).attr('data-max');
+
+ if (v != '') {
+
+ // Update any add-on quantity selection to standard quantities (need to get this from the add-on at some point)
+ var addonQuants = '<option value="" selected>(optional)</option>';
+ for (var i = 1; i <= addonMax; i++) {
+ addonQuants = addonQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ $('#glmAddonQuantSelect_' + addonID).empty();
+ $('#glmAddonQuantSelect_' + addonID).append(addonQuants);
+
+ } else {
+ $('#glmAddonQuantSelect_' + addonID).empty();
+ $('#glmAddonQuantSelect_' + addonID).append('<option value="">(Select quantity first)</option>');
+ }
+
+ });
+
+ });
+
+ var selectButtonPressed = false;
+
+ $('#GLMselectButton').click(function() {
+
+ // Prevent multiple submissions
+ if (selectButtonPressed == true) {
+ return;
+ }
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuantSelect').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select an ' + flex_termTicketNorm + ' quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+ </script>
+{end:}
+<flexy:include src="TicketsFoundation/foot.html" /> <!-- Note direct reference to interface type -->
\ No newline at end of file
--- /dev/null
+<!-- Footer content for all Front-End pages -->
+
+ {if:option.development} <!-- When running on development server - provide ability to fully reset a session -->
+ <div class="row">
+ <div class="large-12 columns">
+ <div class="panel">
+ <div class="row">
+ <div class="small-12 medium-8 large-8 columns">
+ <h6>Running on Development Server:</h6>
+ </div>
+ <div class="small-12 medium-4 large-4 columns">
+ <a href="{baseSCRIPT}&session_reset=true" class="tiny button">Reset Session</a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {end:}
+
--- /dev/null
+<!-- Header content for all Front-End pages -->
+
+ <!-- pass flexy template parameters to JAVAscripts -->
+ <flexy:toJavascript
+ flexy:prefix="flex_"
+ baseURL="baseURL"
+ baseAppURL="baseAppURL"
+ baseSCRIPT="baseSCRIPT"
+ startURL="startURL"
+ frontDebug="frontDebug"
+ termTicketNorm="term.ticket.norm"
+ termTicketPlur="term.ticket.plur"
+ termTicketPlurCap="term.ticket.plur_cap"
+ termPerformanceNorm="term.performance.norm"
+ >
+
+ {if:!jQueryLoaded} <!-- If the site hasn't already loaded jQuery - Set in config/applications/EventManagement.ini -->
+
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+
+ {end:}
+
+ {if:!jQueryUiLoaded} <!-- If the site hasn't already loaded jQueryUi - Set in config/applications/EventManagement.ini -->
+
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+
+ {end:}
+
+ <!-- Load scripts for Event Management features -->
+ <script type="text/javascript" src="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.js?serial={timestamp}"></script>
+ <script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.css">
+
+ {if:customCssFile} <!-- If the site has a custom css file that should be read to override certain styles in EventManagement.css -->
+
+ <!-- local css overrides for the current site -->
+ <link rel="stylesheet" type="text/css" href="{customCssFile}">
+
+ {end:}
+
+ {if:frontDebug} <!-- If front-end debugging has been enabled -->
+
+ <!-- This is simply here as something for jQuery code to check if we're doing debug -->
+ <div id="EMadminDebug"></div>
+
+ <!-- Script to create debug window -->
+ <script type="text/javascript">
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25";
+ if (flex_frontDebug) {
+ debugWindowFront = window.open(flex_baseURL + "index.php?Action=Debug_update","emDebugWindowFront",disp_setting);
+ }
+ </script>
+
+ {end:}
+
+ <!-- This is an overlay that's displayed when something is submitted to prevent other selections on the page -->
+ <div id="glmReloadBlocker" class="glmPageLoadBlockerHidden">
+ <div class="show-for-medium-up">Updating your information<br>Please wait ...</div>
+ <div class="show-for-small-only">Updating<br>Please wait ...</div>
+ </div>
+
+ {if:adminUser}
+ <h2 style="border: 1px solid black; text-align: center;">Purchasing By Admin User</h2>
+ {end:}
+
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+
+ <h1>PLEASE NOTE:</h1>
+
+ <p>
+ There is no general access to this site.
+ All access to this site should be through an appropriate link.
+ If you arrived here by mistake (or exploring), nothing but this message will be displayed.
+ If you have any concerns about this site, please contact Gaslight Media.
+ </p>
+
+ <p>
+ Gaslight Media<br>
+ 120 East Lake Street<br>
+ Petoskey, MI 49770<br>
+ <br>
+ Phone: 231-487-0692<br>
+ E-Mail: info@gaslightmedia.com<br>
+ Web: http://www.gaslightmedia.com
+ </p>
+
+ </body>
+
+</html>
+
+
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body id="debugBody">\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="updateTimestamp">\r
+ <b>Updated:</b> {debugUpdateTime}\r
+ </div> \r
+ <div id="debugBody">\r
+ {debugData:h}\r
+ </div>\r
+ </body>\r
+ \r
+ {startScript:h}\r
+ \r
+ // Reload the current window with Action = Debug_update\r
+ function reloadDebugWindow()\r
+ {\r
+ window.location("{baseSCRIPT}&Action=Debug_update");\r
+ }\r
+ \r
+ </script> \r
+</html>
\ No newline at end of file
--- /dev/null
+<!DOCTYPE HTML>\r
+<html>\r
+ <head>\r
+ <style type="text/css">\r
+ #debugTitle{\r
+ font-size: 16px;\r
+ font-weight: bold;\r
+ margin-top: 10px;\r
+ }\r
+ #debugTimestamp {\r
+ float: right;\r
+ }\r
+ #debugBody {\r
+ \r
+ }\r
+ #updateTimestamp {\r
+ padding-bottom: 10;\r
+ }\r
+ </style> \r
+ </head>\r
+ <body>\r
+ <div id="debugTimestamp"><b>Startup:</b> {debugStartupTime}</div>\r
+ <div id="debugTitle">Event Management Front-End Debug</div>\r
+ <hr />\r
+ <div id="debugData">Debug Startup</div>\r
+ </body>\r
+</html>
\ No newline at end of file
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="tickets/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Your PayPal payment has been approved.</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ Your cart will now reflect that the payment has been made.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - PayPal failure page\r
+\r
+-->\r
+\r
+<flexy:include src="tickets/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <div id="GLMpageTitle"><p>Unable to process your payment!</p></div>\r
+\r
+\r
+ <div class="glmCartBlock">\r
+\r
+ <p>\r
+ <div class="glmCartFormPrompt glmCartRequired">Sorry, there was a problem.</div>\r
+ </p>\r
+ \r
+ <p>\r
+ We were unable to find your purchase information and are therefore \r
+ are unable to process your payment through PayPal. This could be\r
+ due to you not performing any action with your pending purchase\r
+ for too long. Please click the "Return to selected tickets" button\r
+ at the top of the checkout page to see if your selections are still listed.\r
+ </p>\r
+\r
+ </div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div id="GLMpurchase" class="glmActionButton">Close This Window</div>\r
+ </div>\r
+\r
+</div>\r
+\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+ \r
+ $('.glmActionButton').on('click', function() {\r
+ window.close();\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+\r
+\r
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Cart Page
+-->
+<flexy:include src="tickets/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <form id="cartForm" action="">
+ <!-- GLMpageTitle - A title for this page -->
+ <!--<div id="GLMpageTitle">Selected {term.performance.plur_cap} and {term.ticket.plur_cap}</div>-->
+ <div id="GLMHeader">
+<!-- <div id="GLMpageTitle">Cart</div> -->
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+<!-- <a class="glmNavItem cart" style="margin-right: 1em;">Reprint a previous {term.order.cap}: <input id="reprintVoucher" type="text" style="width: 6em; font-size: .8em;"></a> -->
+ </div>
+ </div>
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{cartText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}{Chuck}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ {if:havePromoCodes}
+ <div class="glmCartBlock">
+ <div class="glmCartFormInput">
+ <div class="glmCartText" style="width: auto;">If you have a {term.promo.norm}, please enter it here: </div><input id="promoCodeInput" type="text" name="promo_code" value="{promoCode}">
+ </div>
+ </div>
+ {end:}
+ {foreach:cart,c}<!-- each venue -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockSmallTitle">{c.name}</div>
+ <div class="glmCartEvents">
+ {foreach:c.performances,p} <!-- each performance for this date -->
+ <div class="glmCartEvent" style="margin-bottom: 2em;">
+ <div class="glmCartEventInfo">
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem" style="position: relative; top: 20px;">{term.nav.select_more_of_these}</a>
+ {end:}
+ <div class="glmCartEventInfoLeft">
+
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmDescr">
+ {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile">{p.short_descr:h}</div>{end:}
+ {if:option.cart_images}{if:p.image}
+ <img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">
+ {end:}{end:}
+ </div>
+ </div>
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+ Use any date
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%" style="padding-right: .5em;">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ <input class="glmCartQuant" type="number" id="ticket_{i.invID}" data-ticket="{i.invID}" data-addon="0" data-max="{i.thisSessionSelectable}" data-units="" value="{i.selected}">
+ </td>
+ {if:!p.oneSectionOnly}
+ <td align="left">{s.name}</td>
+ {end:}
+ <td align="left">{i.title}</td>
+ <td align="right" style="padding-right: .5em;">{if:i.show_price}{i.price}{end:}</td>
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.problem}
+ <tr>
+ <td> </td><td class="glmCartRequired">{i.problemText}</td>
+ </tr>
+ {end:}
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}{if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}{end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ <input class="glmCartQuant" type="number" id="addon_{a.id}" data-ticket="{i.invID}" data-addon="{a.id}" data-max="{a.max_quant}" data-units=" {a.name}" value="{a.selected}">
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!-- dates -->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {end:} <!--performances-->
+ </div><!--/.glmCartEvents-->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+
+ {if:c.needAssignemntOrDate}
+ {if:c.needAssignment}
+ <!-- Ask user where these tickets should be used/sold -->
+ <div class="glmCartBlock">
+ {if:!c.haveAssignment}
+ <div class="glmCartBlockSmallTitle glmCartRequired">{text.cart.select_assignment_location}</div>
+ {else:}
+ <div class="glmCartBlockSmallTitle">{text.cart.select_assignment_location}</div>
+ {end:}
+ {foreach:c.assignmentMembers,a}
+ {if:a.entrances}
+ {foreach:a.entrances,e}
+ <div class="glmBlockContent">
+ {if:option.cart_images}
+ {if:e.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{e.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:e.selected}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}" checked> {a.name} - {e.name}<br>
+ {else:}
+ <input type="radio" name="assignEntrance_{e.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="{e.id}"> {a.name} - {e.name}<br>
+ {end:}
+ <div class="glmBlockContentIndent"> <!-- Entrance detail -->
+ <div class="glmDescr">{e.addr1}{if:e.addr2}, {e.addr2}{end:}, {e.city}</div>
+ <div class="glmDescr">{e.phone}</div>
+ {if:e.descr}
+ <div class="glmDescr">{e.descr:h}</div>
+ {end:}
+ </div>
+ </div> <!-- glmBlockContentLeft -->
+ {end:}
+ </div> <!-- glmBlockContent -->
+ {else:} <!-- entrances -->
+ {if:a.selected}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance="" checked> {a.name} <br>
+ {else:}
+ <input type="radio" name="assignMember_{c.id}" data-Member="{c.id}" class="glmAssignmentChange" value="{a.id}" data-entrance=""> {a.name} <br>
+ {end:}
+ {end:} <!-- each entrances -->
+ {end:} <!-- each assignmentMembers -->
+ <br>
+ {end:} <!-- if needAssignment -->
+ <!-- Likely date for non-date-specific tickets -->
+ {if:option.ask_for_likely_date}
+ {if:c.needLikelyDate}
+ <div class="glmBlockContent">
+ {if:!c.likelyDate}
+ <span class="glmCartBlockSmallTitle glmCartRequired">
+ {else:}
+ <span class="glmCartBlockSmallTitle">
+ {end:}
+ {text.cart.select_likely_date}
+ </span>
+ <input type="text" id="likelyDateInput" name="likely_date" data-member="{c.id}" value="{c.likelyDate}" class="glmEventDateInput glmLikelyDateChange"> mm/dd/yyyy
+ </div>
+ {end:} <!-- if needLikelyDate -->
+ {end:} <!-- if ask_for_likely_date -->
+ </div> <!-- ask where tickets are sold -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- needAssignemntOrDate -->
+ {if:!c.needAssignment}
+ <!-- glmCartVenueInfo -->
+ {if:option.cart_images}{if:c.image}
+ <div class="glmCartBlockText">
+ <!--{if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}-->
+ <img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">
+ </div>
+ {end:}{end:}
+ {end:}
+
+
+
+
+ </div> <!-- glmCartBlock -->
+ {end:}<!-- each venue -->
+
+ <!-- glmCartBlock - Selection Summary -->
+ <div class="glmCartBlock totals">
+ {if:cartHasContents}
+ <div class="glmGrandTotals">
+ Grand Total {totals.price}
+ </div>
+ <div class="glmCartWide">
+ {if:totals.tickets}
+ {if:!blockCheckout}
+ <a id="GLMcheckoutBtn" href="{baseSCRIPT}&Action=Shop_checkout" class="glmNavItem">{term.nav.checkout}</a>
+ {else:}
+ <a class="glmNavItemInactive">Please complete the items in RED above.</a>
+ {end:}
+ {else:}
+ <a class="glmNavItemInactive">Your cart is currently empty.</a>
+ {end:}
+ </div>
+ {else:}
+ <P>Your cart is currently empty.</P>
+ {end:}
+ </div> <!-- glmCartBlock -->
+
+ {if:option.cart_promotions}
+ <div class="glmCartBlock">
+ You may also be interested in ...<br>
+ {foreach:cartPromotions,p}
+ <div class="glmBlockContent" style="margin-bottom: 2em;">
+ <div class="glmCartBlockTitle" style="margin-top: .5em;"><a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={p.id}">{p.member_name:h} - {p.name:h}</a></div>
+ {if:p.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ <div class="glmBlockContentLeft">
+ <!-- PER REQUEST, WE'RE NOW JUST SHOWING SHORT DESCR HERE -->
+ {if:p.short_descr}<div class="glmCartEventDescr">{p.short_descr:h}</div>{end:}
+ {if:p.short_descr}<div class="glmCartEventDescrMobile">{p.short_descr:h}</div>{end:}
+ </div>
+ </div>
+ {end:}
+ </div>
+ {end:}
+
+
+ </form>
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ $(document).ready(function(){
+
+ // Block direct form submission - Everything submits by jQuery action
+ $('#cartForm').submit(function( event ) {
+ return false;
+ });
+
+ // Convert input fields to select lists
+ $('.glmCartQuant').each(function() {
+
+ var id = $(this).attr('id');
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var max = $(this).attr('data-max');
+ var value = $(this).attr('value');
+ var units = $(this).attr('data-units');
+ var numbSel = '';
+
+ // Build a picklist for this input
+ for (var i = 0 ; i {lte:h} max ; i++) {
+ if (value == i) {
+ numbSel = numbSel.concat('<option value="' + i + '" selected>' + i + '</option>');
+ } else {
+ numbSel = numbSel.concat('<option value="' + i + '">' + i + '</option>');
+ }
+ }
+
+ $('#quant_' + id).html('<select id="' + id + '" class="glmCartSelect" data-ticket="' + ticket + '" data-addon="' + addon + '">' + numbSel + '</select>' + units);
+
+ });
+
+ // Get or set vertical scroll to return to same place when cart reloads
+ function getVertScroll() {
+ var vertScroll = window.pageYOffset;
+ if (vertScroll == 0) {
+ var vertScroll = document.documentElement.scrollTop;
+ }
+ if (vertScroll == 0) {
+ var vertScroll = document.body.scrollTop;
+ }
+ return vertScroll;
+ }
+
+ // When a cart value changes, submit it as a cart update.
+ $('.glmCartSelect').change(function() {
+ vertScroll = getVertScroll();
+ var ticket = $(this).attr('data-ticket');
+ var addon = $(this).attr('data-addon');
+ var value = $(this).val();
+
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update&ticket_inv=" + ticket + "&addon=" + addon + "&quant=" + value + "&vertScroll=" + vertScroll;
+
+ });
+
+ // When there's a change in the promo code input, submit it.
+ $('#promoCodeInput').change(function() {
+ var value = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=promo_code&promo_code=" + value;
+ });
+
+ // When a member selection for unassigned items changes, submit it so it's in the session
+ $('.glmAssignmentChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var assignedTo = $(this).val();
+ var assignedToEntrance = $(this).attr('data-entrance');
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_assignment&member_assigned=" + member + "&assigned_to=" + assignedTo + "&entrance_assigned=" + assignedToEntrance + "&vertScroll=" + vertScroll;
+ });
+
+ // When a likely departure date changes, submit it so it's in the session
+ $('.glmLikelyDateChange').change(function() {
+ vertScroll = getVertScroll();
+ var member = $(this).attr('data-Member');
+ var likelyDate = $(this).val();
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=update_likelyDate&member=" + member + "&likely_date=" + likelyDate + "&vertScroll=" + vertScroll;
+
+ });
+
+ // Code to start datepicker for each date input
+ if($("#likelyDateInput").length > 0) {
+ $("#likelyDateInput").datepicker({
+ dateFormat: "mm/dd/yy",
+ minDate: -1,
+ maxDate: 365
+ });
+ }
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+ setBlocker();
+ window.location = "{baseSCRIPT}&Action=Shop_checkout";
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ setBlocker();
+ window.location = '{startURL:h}';
+ });
+
+/* Not using right now
+ // Reprint order button
+ $('#reprintVoucher').on('keypress', function(event) {
+ if(event.which == '13'){
+ var orderID = $(this).val();
+ var voucherWindow = window.open('{appAdminURL}&Action=Order_printVoucher&OrderID=' + orderID,
+ "voucherPrint",
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"
+ );
+ voucherWindow.focus();
+ voucherWindow.print();
+ return false;
+ }
+ });
+*/
+
+ if ({vertScroll}) {
+ window.scrollTo(0,{vertScroll});
+ }
+
+ });
+
+</script>
+<flexy:include src="tickets/foot.html" />
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Page
+-->
+<flexy:include src="tickets/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Selected {term.ticket.plur_cap}</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{checkoutText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ <p>See below for more information.</p>
+ </div>
+ {end:}
+ <form id="GLMcheckoutForm" action='{baseSCRIPT}&Action=Shop_checkoutSubmit' method="POST">
+ <input type="hidden" name="Action" value="Shop_checkoutSubmit">
+ <!-- glmCartBlock - Contact information - Container for all general customer information -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">Contact Information</div>
+ <!-- glmCartForm - A container for a block of form input with prompts-->
+ <div class="glmCartForm">
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.fname.required">{text.cart.checkout.first_name}: </div>
+ {if:formData.contact.fname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.fname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="fname" value="{formData.contact.fname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.lname.required">{text.cart.checkout.last_name}: </div>
+ {if:formData.contact.lname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.lname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="lname" value="{formData.contact.lname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr1.required">{text.cart.checkout.address}: </div>
+ {if:formData.contact.addr1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr1" value="{formData.contact.addr1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.addr2.required"> </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.addr2.required"> </div>
+ {if:formData.contact.addr2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.addr2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="addr2" value="{formData.contact.addr2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.city.required">{text.cart.checkout.city}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.city.required">{text.cart.checkout.city}: </div>
+ {if:formData.contact.city.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.city.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="city" value="{formData.contact.city.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.state.required">{text.cart.checkout.state}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.state.required">{text.cart.checkout.state}: </div>
+ {if:formData.contact.state.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.state.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="state">
+ <option value=""> </option>
+ {foreach:formData.contact.state.states,s}
+ {if:s.stateSelected}
+ <option value="{s.stateID}" selected>{s.stateName:h}</option>
+ {else:}
+ <option value="{s.stateID}">{s.stateName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.country.required">{text.cart.checkout.country}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.country.required">{text.cart.checkout.country}: </div>
+ {if:formData.contact.country.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.country.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="country">
+ <option value=""> </option>
+ {foreach:formData.contact.country.countries,s}
+ {if:s.countrySelected}
+ <option value="{s.countryID}" selected>{s.countryName:h}</option>
+ {else:}
+ <option value="{s.countryID}">{s.countryName:h}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.zip.required">{text.cart.checkout.zip}: </div>
+ {if:formData.contact.zip.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.zip.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="zip" value="{formData.contact.zip.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.phone.required">{text.cart.checkout.phone}: </div>
+ {if:formData.contact.phone.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.phone.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="phone" value="{formData.contact.phone.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email.required">{text.cart.checkout.email}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email.required">{text.cart.checkout.email}: </div>
+ {if:formData.contact.email.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email" value="{formData.contact.email.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.email2.required">{text.cart.checkout.email_again}: </div>
+ {if:formData.contact.email2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.email2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="email2" value="{formData.contact.email2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt">OK to Send E-Mail?</div>
+ {if:formData.contact.email_ok}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok" checked> {text.cart.checkout.activities_offers}</div>
+ {else:}
+ <div class="glmCartFormInput"><input type="checkbox" name="email_ok"> {text.cart.checkout.activities_offers}</div>
+ {end:}
+ </div><!--/.glmCartFormLine-->
+
+ {if:opt_field_1_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_1.required">{opt_field_1_name}: </div>
+ {if:formData.contact.opt_field_1.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_1.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_1" value="{formData.contact.opt_field_1.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_2_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_2.required">{opt_field_2_name}: </div>
+ {if:formData.contact.opt_field_2.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_2.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_2" value="{formData.contact.opt_field_2.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+ {if:opt_field_3_name}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ <div class="glmCartFormPrompt" flexy:if="!formData.contact.opt_field_3.required">{opt_field_3_name}: </div>
+ {if:formData.contact.opt_field_3.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{formData.contact.opt_field_3.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="opt_field_3" value="{formData.contact.opt_field_3.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ {end:}
+
+
+ </div> <!--/.glmCartForm-->
+ </div><!--/.glmCartBlock-->
+
+ {foreach:cart,c} <!-- each venue -->
+ <div class="glmCartBlock">
+ <div class="glmCartBlockTitle">{term.prop.cap}: {c.name}</div>
+ <!-- glmCartVenueInfo -->
+<!--
+ <div class="glmCartVenueInfo">
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}
+ </div>
+-->
+ <div class="glmCartEvents">
+ {foreach:c.performances,p} <!-- each performance for this date -->
+<div class="glmCartBlock">
+ <div class="glmCartEvent">
+ <div class="glmCartEventInfo">
+ <div class="glmCartEventInfoLeft">
+ <div class="glmCartEventTitle">{p.name}</div>
+ <div class="glmCartBlockText">
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} -->
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}
+ </div><!--/.glmCartBlockText-->
+ </div><!--/.glmCartEventInfoLeft-->
+ </div><!--/.glmCartEventInfo-->
+ <div class="glmCartBlockDates">
+ {foreach:p.dates,d}
+ <div class="glmCartBlockDate">
+ <div class="glmDescr">
+ <span class="glmCartBlockSubTitleValue">
+ {if:d.dateSpecific}
+ {d.fullDate}
+ {else:}
+ Use any date
+ {if:c.likelyDate}
+ - Likely Date {c.likelyDate}
+ {end:}
+ {end:}
+ </span>
+ </div><!--/./glmCartBlockSubTitle-->
+
+
+ {foreach:d.sections,s}
+ <table border="0" width="100%">
+ <tr>
+ <th align="left" width="10%">Quant</th>
+ {if:!p.oneSectionOnly}
+ <th align="left">Section</th>
+ {end:}
+ <th align="left">{term.ticket.cap}</th>
+ <th align="right" width="10%">Price</th>
+ <th align="right" width="10%">Total</th>
+ </tr>
+ {foreach:s.tickets,i}
+ <tr>
+ <td id="quant_ticket_{i.invID}" align="left">
+ {i.selected}
+ </td>
+ {if:!p.oneSectionOnly}
+ <td align="left">{s.name}</td>
+ {end:}
+ <td align="left">{i.title}</td>
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>
+ </tr>
+ {if:i.descr}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td colspan="4">
+ {else:}
+ <td colspan="3">
+ {end:}
+ {if:option.cart_images}
+ {if:i.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>
+ {end:}
+ {end:}
+ <div class="glmBlockContentLeft">{i.descr:h}</div>
+ </td>
+ </tr>
+ {end:}
+ <!-- {if:i.show_addons} -->
+ {foreach:i.addons,a}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td align="left"> </td>
+ {end:}
+ <td align="left">
+ <div id="quant_addon_{a.id}">
+ {a.selected} {a.unit_name}
+ </div>
+ </td>
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>
+ <td align="right">{a.money}</td>
+ </tr>
+ {end:}
+ <!-- {end:} -->
+ {if:i.promo}
+ <tr>
+ <td> </td>
+ {if:!p.oneSectionOnly}
+ <td> </td>
+ {end:}
+ <td align="left">{term.promo.cap}: {promoCode}</td>
+ <td> </div>
+ <td align="right">{i.promo.credit}</td>
+ </tr>
+ {end:}
+ {end:}<!--tickets-->
+ </table><!--/.glmCartTable-->
+ {end:}<!--sections-->
+ </div><!--/.glmCartBlockDate-->
+ {end:}<!--dates-->
+ </div><!--/.glmCartBlockDates-->
+ </div><!--/.glmCartEvent-->
+ {if:p.policy}
+ <div class="glmSection">
+ <div class="glmSectionName">
+ Please read and agree to our policy for this {term.performance.norm}.
+ </div>
+ <div class="glmBlockContent">
+ <p>{p.policy:h}</p>
+ </div>
+ <div class="glmSectionBold glmCartRequired">
+ <p>I agree to the policy stated above. <input class="glmPolicyCheckbox" type="checkbox" id="glmAgree" name="agree"></p>
+ </div>
+ </div>
+ {end:}
+</div>
+ {end:} <!--each performance-->
+ </div><!--/.glmCartEvents-->
+ <!-- glmCartVenueTotal - Sub totals for this venue -->
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->
+ <div class="glmCartPayment">
+ <!-- If special requests possible -->
+ {if:c.ticket_spec_req.value}
+ <div class="glmSpecialRequests">
+ <div class="glmCartBlockSmallTitle">Please enter any special requests:</div>
+ <div class="glmCart"><input type="textarea" name="{c.id}_spec_req" value="{c.paymentForm.spec_req.value:h}"></div>
+ </div>
+ {end:}
+ <div class="glmCartBlockSmallTitle">Payment for {term.ticket.plur} at {c.name}</div>
+ <div class="glmCartForm">
+<!--
+ {if:!cartHasOneVenueOnly}
+ <div class="glmCartSubTotals">
+ <div class="glmCartTable sub">
+ <div class="glmCartHeader">
+ <div class="glmCartText">Tickets</div>
+ <div class="glmCartText">Total</div>
+ </div>
+ <div class="glmCartValues">
+ <div class="glmCartText">{c.totalTickets}</div>
+ <div class="glmCartText">{c.totalPrice}</div>
+ </div>
+ </div>
+ </div>
+ {end:}
+-->
+ {if:c.paymentResult}
+ {if:c.paymentResult.approved}
+ <div class="glmCartBlockSTitle">Card Payment Approved</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div>{c.paymentResult.cctype}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div>{c.paymentResult.ccname}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div>{c.paymentResult.ccnumb}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div>{c.paymentResult.ccexp}</div>
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>
+ <div id="GLMnavigation">
+ <div id="GLMprintTickets" class="glmNavItem">{term.nav.print_vouchers}</div>
+ </div>
+ {else:}
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>
+ <ul><li>{c.paymentResult.description}</li></ul>
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>
+ {if:forceCheckoutPhase}
+ <div id="GLMnavigation">
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>
+ </div>
+ {end:}
+ {end:}<!--paymentResult approved-->
+ {end:}<!--paymentResult-->
+ {if:c.paymentResult.approved}
+ <p>Payment Accepted</p>
+ {else:}
+ {if:c.havePaymentMethod}
+ <!-- Payment type selection -->
+ <div class="glmCartBlockSmallTitle">
+ {if:c.havePayPal}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="pp"> PayPal
+ {else:}
+ <input class="glmSelectPayByPayPal" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="pp">
+ {end:}
+ {end:}
+ {if:c.haveCreditCards}
+ {if:c.havePayPal}
+
+ {end:}
+ {if:c.haveMultiplePaymentMethods}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="radio" name="{c.id}_payTypeSelect" value="cc"> Credit Card
+ {else:}
+ <input class="glmSelectPayByCC" memberID="{c.id}" type="hidden" name="{c.id}_payTypeSelect" value="cc">
+ {end:}
+ {end:}
+ </div><!--/.glmCartBlockTitle-->
+ <!-- Credit Card Payment Form -->
+ {if:c.haveCreditCards}
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByCC" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByCC" class="">
+ {end:}
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt" flexy:if="c.paymentForm.cctype.required">Total Charged to this Card</div>
+ <div class="glmCartFormInput">{c.totalPrice}</div>
+ </div>
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cctype.required">Card Type</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cctype.required">Card Type</div>
+ {if:c.paymentForm.cctype.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cctype.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <select name="{c.id}_cctype">
+ <option value=""> </option>
+ {foreach:c.paymentForm.cctype.ccards,a}
+ {if:a.selected}
+ <option value="{a.value}" selected>{a.name}</option>
+ {else:}
+ <option value="{a.value}">{a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccname.required">Name on Card</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccname.required">Name on Card</div>
+ {if:c.paymentForm.ccname.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccname.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccname" value="{c.paymentForm.ccname.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccnumb.required">Card Number</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccnumb.required">Card Number</div>
+ {if:c.paymentForm.ccnumb.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccnumb.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_ccnumb" value="{c.paymentForm.ccnumb.value}">
+ </div>
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.ccexp.required">Expiration Date</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.ccexp.required">Expiration Date</div>
+ {if:c.paymentForm.ccexp.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.ccexp.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ Month
+ <select name="{c.id}_ccmonth">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccmonths,a}
+ {if:a.selected}
+ <option value="{a.month}" selected>{a.month} - {a.name}</option>
+ {else:}
+ <option value="{a.month}">{a.month} - {a.name}</option>
+ {end:}
+ {end:}
+ </select>
+ Year
+ <select name="{c.id}_ccyear">
+ <option value=""> </option>
+ {foreach:c.paymentForm.ccexp.ccyears,a}
+ {if:a.selected}
+ <option value="{a.year}" selected>{a.year}</option>
+ {else:}
+ <option value="{a.year}">{a.year}</option>
+ {end:}
+ {end:}
+ </select>
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormPrompt glmCartRequired" flexy:if="c.paymentForm.cccode.required">Security Code</div>
+ <div class="glmCartFormPrompt" flexy:if="!c.paymentForm.cccode.required">Security Code</div>
+ {if:c.paymentForm.cccode.problem}
+ <div class="glmCartFormInput glmCartFailedInput">
+ <div class="glmProblemMsg">{c.paymentForm.cccode.problem}</div>
+ {else:}
+ <div class="glmCartFormInput">
+ {end:}
+ <input type="text" name="{c.id}_cccode" value="{c.paymentForm.cccode.value}">
+ </div><!--/.glmCartFormInput-->
+ </div><!--/.glmCartFormLine-->
+ <div class="glmCartFormLine">
+ <div class="glmCartFormComment">
+ The Security Code is the three or four digit number on the signature side of your credit card.
+ </div>
+ </div><!--/.glmCartFormLine-->
+ </span> <!-- /Credit Card Payment Form -->
+ {end:}<!--haveCreditCards-->
+ {if:c.havePayPal}
+ <!-- PayPal Payment Form -->
+ {if:c.haveMultiplePaymentMethods}
+ <span id="{c.id}_glmPayByPayPal" class="glmPayTypes {c.id}_glmPayTypes">
+ {else:}
+ <span id="{c.id}_glmPayByPayPal" class="">
+ {end:}
+ <div id="{c.id}_PayPal" memberID="{c.id}" class="glmPayPalButton">
+ <img src="{baseURL}common/EventManagement/front/tickets/assets/paypal_but6.gif"></a>
+ </div>
+ </span>
+ {end:}<!--havePayPal-->
+ {if:c.haveMultiplePaymentMethods}
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">Please select a Payment Method</div>
+ </span>
+ {end:}
+ {else:} <!-- havePaymentMethod -->
+ <span class="glmPayTypePrompt {c.id}_glmPayTypePrompt">
+ <div class="glmCartFormPrompt glmCartRequired">
+ This {term.prop.norm} does not have a payment method configured.
+ Please call this {term.prop.norm} to purchase {term.ticket.plur}.
+ </div>
+ </span>
+ {end:} <!-- havePaymentMethod -->
+ {end:} <!-- if payment not approved -->
+ </div> <!-- glmCartForm - Venue Payment -->
+ </div> <!-- glmCartPayment -->
+ </div> <!-- glmCartBlock -->
+ {end:} <!-- each venue -->
+ <!-- glmCartBlock - Selection Summary -->
+ <!-- glmCartBlock - A Venue -->
+ <div class="glmCartBlock">
+ <div style="float: left;">
+ <div class="glmCartBlockTitle">Complete Purchase</div>
+<!-- NOT DISPLAYING THESE NOW
+ <div id="GLMpolicy">
+ (purchase and return policies go here)
+ </div>
+ -->
+ <p style="padding-top: 45px;">
+ {ssl_seal_head_script:h}
+ {ssl_seal_body_script:h}
+ </p>
+ </div>
+ <div style="float: right;">
+ <div class="glmCartTable totals" style="float: right;">
+
+ <div class="glmCartHeader">
+ <!-- <div class="glmCartText">{term.prop.plur_cap}</div> -->
+ <div class="glmCartText grand">Grand Total</div>
+ </div>
+ <div class="glmCartValues">
+ <!-- <div class="glmCartText">{totals.venues}</div> -->
+ <div class="glmCartText grand">{totals.price}</div>
+ </div>
+ </div><!--/.glmCartTable-->
+ {if:!cartHasOneVenueOnly}
+ <div class="glmCartBlockText">
+ NOTE: There will be a separate order number and a separate credit card transaction for each {term.prop.norm}.
+ </div>
+ {end:}
+ <div id="GLMcheckout" style="float: right;">
+ {if:!blockCheckout}
+ <a id="GLMcheckoutBtn" class="glmNavItemWide">{term.nav.purchase}</a>
+ {else:}
+ <a class="glmNavItemInactive">Unable to checkout - please see above.</a>
+ {end:}
+ </div>
+ </div>
+ </div>
+ </form>
+</div><!-- GLMcontent -->
+
+<!-- jQuery scripts for controlling page actions -->
+<flexy:toJavascript
+ flexy:prefix="flex_"
+ baseSCRIPT="baseSCRIPT"
+ startURL="startURL"
+ baseURL="baseURL"
+>
+
+<script type="text/javascript">
+
+ $(document).ready(function(){
+
+ var checkoutButtonPressed = false;
+ var duration = 400;
+
+ // Checkout action
+ $('#GLMcheckoutBtn').click(function() {
+
+ // Prevent multiple submissions
+ if (checkoutButtonPressed == true) {
+ return;
+ }
+
+ // Check policy acceptance
+ var needPolicyChecked = false;
+ $(".glmPolicyCheckbox").each(function() {
+ if (!$(this).is(':checked')) {
+ needPolicyChecked = true;
+ }
+ });
+
+ if (needPolicyChecked) {
+ alert('You must agree to our policies shown in red above to checkout.');
+ return false;
+ }
+
+ checkoutButtonPressed = true;
+ setBlocker();
+ $('#GLMcheckoutForm').submit();
+
+ });
+
+ // Navigation buttons
+ $('#GLMnavCart').on('click', function() { // Add to Cart
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = flex_startURL;
+ });
+
+ // Send user to PayPal payment when button is clicked
+ $('.glmPayPalButton').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=800, left=100, top=25";
+ PayPalWindow = window.open(flex_baseURL + "?Action=Shop_PayPal&memberID=" + memberID, "PayPalWindow",disp_setting);
+ PayPalWindow.focus();
+ });
+
+ // Show payment method input when selected
+ $('.glmSelectPayByCC').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByCC').show(duration);
+ });
+ });
+ $('.glmSelectPayByPayPal').on('click', function() {
+ var memberID = $(this).attr('memberID');
+ $.when($('.' + memberID + '_glmPayTypes, .' + memberID + '_glmPayTypePrompt').hide(duration)).then(function() {
+ $('#' + memberID + '_glmPayByPayPal').show(duration);
+ });
+ });
+
+ // Start with payment types hidden - only prompt showing
+ $('.glmPayTypes').hide(0);
+
+ // Show submit access blocker
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+
+</script>
+<flexy:include src="tickets/foot.html" />
\ No newline at end of file
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Checkout Complete Page\r
+\r
+-->\r
+\r
+<flexy:include src="tickets/head.html" />\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">Purchase Complete</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ <p>\r
+ <div \r
+ id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint"\r
+ style="float: none; text-align: center;"\r
+ >*** {term.nav.print_vouchers} for {c.name} ***</div>\r
+ </p>\r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ \r
+ <!-- Adobe Reader Download -->\r
+ \r
+ <div class="glmBlock">\r
+ <div class="glmBlockContentRight">\r
+ <a href="http://www.adobe.com/go/getreader" target="GetAdobeReader"><img src="{baseURL}common/EventManagement/front/TicketsFoundation/assets/get_adobe_reader.png"></a>\r
+ </div>\r
+ <div class="glmBlockContentLeft">\r
+ <small>\r
+ <p>\r
+ Adobe Reader is required to view and print your {term.voucher.plur}. Adobe Reader is a free program available directly from Adobe. \r
+ If you do not already have Adobe Reader installed, click the "Get Adobe Reader" link now.\r
+ </p>\r
+ </small>\r
+ </div>\r
+ <div class="glmBlockContent">\r
+ <small>\r
+ <p>\r
+ <b>If you are unable to print your {term.voucher.plur}, please print this page or write down the order number(s)\r
+ below and bring that to the ticket office when you arrive.</b>\r
+ </p>\r
+ ORDER #: \r
+ {foreach:cart,c} <!-- each venue -->\r
+ {if:c.paymentResult}\r
+ {if:c.paymentResult.approved}\r
+ {c.paymentResult.orderID} \r
+ {end:}\r
+ {end:}\r
+ {end:} \r
+ </small> \r
+ </div>\r
+ </div> \r
+ \r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{successText:h}</div>\r
+ \r
+ <div class="glmCartBlock">\r
+ <div class="glmCartBlockTitle">Contact Information</div>\r
+ <div class="glmCartForm">\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">First Name:</div><div class="glmCartFormInput">{formData.contact.fname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Last Name:</div><div class="glmCartFormInput">{formData.contact.lname.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Address:</div><div class="glmCartFormInput">{formData.contact.addr1.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">{formData.contact.addr2.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">City:</div><div class="glmCartFormInput">{formData.contact.city.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">State:</div><div class="glmCartFormInput">{formData.contact.state.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Country:</div><div class="glmCartFormInput">{formData.contact.country.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">ZIP/Postal Code:</div><div class="glmCartFormInput">{formData.contact.zip.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Phone:</div><div class="glmCartFormInput">{formData.contact.phone.value}</div></div> \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">E-Mail address:</div><div class="glmCartFormInput">{formData.contact.email.value}</div></div> \r
+ {if:opt_field_1_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_1_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_1.value:h}</div></div> {end:}\r
+ {if:opt_field_2_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_2_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_2.value:h}</div></div> {end:}\r
+ {if:opt_field_3_name} <div class="glmCartFormLine"><div class="glmCartFormPrompt">{opt_field_3_name}:</div><div class="glmCartFormInput">{formData.contact.opt_field_3.value:h}</div></div> {end:}\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt"> </div><div class="glmCartFormInput">\r
+ {if:formData.contact.email_ok}\r
+ You have asked us to send information on activities and offers. \r
+ {else:}\r
+ You have asked us to NOT send information on activities and offers.<br>\r
+ We will only contact you regarding this order.\r
+ {end:}\r
+ </div></div> \r
+ \r
+ </div> <!-- glmCartForm -->\r
+ \r
+ </div> <!-- glmCartBlock - Contact information -->\r
+ \r
+ \r
+ {foreach:cart,c} <!-- each venue -->\r
+ <div class="glmCartBlock">\r
+ \r
+ <div class="glmCartBlockTitle">{term.ticket.plur_cap} at: {c.name}</div>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+ <div class="glmCartVenueInfo">\r
+ {if:c.descr}<div class="glmCartVenueDescr">{c.descr:h}</div>{end:}\r
+ {if:option.cart_images}{if:c.image}<img class="glmCartVenueImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{c.image}">{end:}{end:}\r
+ \r
+ </div>\r
+\r
+ <div class="glmCartEvents">\r
+ \r
+ {foreach:c.performances,p} <!-- each performance for this date -->\r
+ \r
+ <div class="glmCartEvent">\r
+ \r
+ <div class="glmCartEventInfo">\r
+ <div class="glmCartEventInfoLeft">\r
+ <div class="glmCartBlockSubTitle">\r
+ {term.performance.cap}: <span class="glmCartBlockSubTitleValue">{p.name}</span>\r
+ </div>\r
+ <div class="glmCartBlockText">\r
+ <!-- {if:p.descr}<div class="glmCartEventDescr">{p.descr:h}</div>{end:} --> \r
+ {if:option.cart_images}{if:option.cart_images}{if:p.image}<img class="glmCartEventImage" src="{fileServer.secure}{fileServer.owner_id}/{image_style.large}/{p.image}">{end:}{end:}{end:}\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <div class="glmCartBlockDates"> \r
+ {foreach:p.dates,d}\r
+ \r
+ <div class="glmCartBlockSubTitle">\r
+ {term.ticket.cap} date: \r
+ <span class="glmCartBlockSubTitleValue">\r
+ {if:d.dateSpecific}\r
+ {d.fullDate}\r
+ {else:}\r
+ Use any date\r
+ {if:c.likelyDate}\r
+ - Likely Date {c.likelyDate}\r
+ {end:}\r
+ {end:}\r
+ </span>\r
+ </div>\r
+ \r
+\r
+ {foreach:d.sections,s}\r
+ <table border="0" width="100%">\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ {if:!p.oneSectionOnly}\r
+ <th align="left">Section</th>\r
+ {end:}\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">\r
+ {i.selected}\r
+ </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left">{s.name}</td>\r
+ {end:}\r
+ <td align="left">{i.title}</td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {if:i.descr}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td colspan="4">\r
+ {else:}\r
+ <td colspan="3">\r
+ {end:}\r
+ {if:option.cart_images}\r
+ {if:i.image}\r
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.thumb}/{i.image}"></div>\r
+ {end:}\r
+ {end:} \r
+ <div class="glmBlockContentLeft">{i.descr:h}</div>\r
+ </td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {if:i.show_addons} -->\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td align="left"> </td>\r
+ {end:}\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ <!-- {end:} -->\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ {if:!p.oneSectionOnly}\r
+ <td> </td>\r
+ {end:}\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ </table><!--/.glmCartTable-->\r
+ {end:}<!--sections-->\r
+ \r
+ \r
+ {end:} <!-- dates --> \r
+ \r
+ </div> <!-- dates -->\r
+ \r
+ </div>\r
+\r
+ {if:p.policy}\r
+ <div class="glmSection">\r
+ <div class="glmBlockContent">\r
+ <div class="glmCartBlockSubTitle">\r
+ Our policy for this {term.performance.norm}.\r
+ </div>\r
+ <p>{p.policy:h}</p>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} <!-- each performance -->\r
+ \r
+ </div>\r
+ \r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+\r
+ {if:!cartHasOneVenueOnly}\r
+ <!-- glmCartVenueTotal - Sub totals for this venue -->\r
+ <div class="glmCartTotals">\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText">Sub Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText">{c.totalPrice}</div>\r
+ </div>\r
+ </div>\r
+ </div>\r
+ {end:}\r
+\r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ \r
+ {if:c.ticket_policy}<div>{c.ticket_policy:h}</div>{end:}\r
+ \r
+ <!-- glmCartPayment - Payment information for this venue (note that payment is executed per venue) -->\r
+ <div class="glmCartPayment">\r
+ \r
+ <!-- If special requests possible -->\r
+ {if:c.ticket_spec_req.value}\r
+ <div class="glmCartForm" style="margin-bottom: 1em;">\r
+ <div class="glmCartBlockTitle">Special requests:</div>\r
+ <div class="glmSpecialRequests">{c.paymentForm.spec_req.value:h}</div>\r
+ </div> \r
+ {end:}\r
+ \r
+ \r
+ {if:c.paymentResult}\r
+ <div class="glmCartForm">\r
+ {if:c.paymentResult.approved}\r
+ <div class="glmCartBlockTitle">Card Payment Approved</div>\r
+ \r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Type</div><div class="glmCartFormInput">{c.paymentResult.cctype}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Name on Card</div><div class="glmCartFormInput">{c.paymentResult.ccname}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Card Number</div><div class="glmCartFormInput">{c.paymentResult.ccnumb}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Expiration Date</div><div class="glmCartFormInput">{c.paymentResult.ccexp}</div></div>\r
+ <div class="glmCartFormLine"><div class="glmCartFormPrompt">Authorization Code</div><div class="glmCartFormInput">{c.paymentResult.authCode}</div></div>\r
+ <div id="GLMnavigation">\r
+ <div id="GLMprintTickets" emOrderID="{c.paymentResult.orderID}" emOrderVerify="{c.paymentResult.orderVerification}" class="glmNavItem voucherPrint">{term.nav.print_vouchers}</div>\r
+ </div>\r
+ {else:}\r
+ <div class="glmCartFailedInput">Card Payment Not Complete</div>\r
+ <ul><li>{c.paymentResult.description}</li></ul>\r
+ <p>Please check the payment information below and try again or contact your credit card company for assistance.</p>\r
+ {if:forceCheckoutPhase}\r
+ <div id="GLMnavigation">\r
+ <div id="GLMdeleteVenue" class="glmNavItem">{term.nav.delete_from_cart}</div>\r
+ </div>\r
+ {end:}\r
+ \r
+ {end:} \r
+ \r
+ </div> <!-- glmCartForm - Venue Payment -->\r
+ {end:}\r
+ \r
+ </div> <!-- glmCartPayment -->\r
+ \r
+ </div> <!-- glmCartBlock -->\r
+ \r
+ {end:} <!-- each venue -->\r
+ \r
+ <div class="glmCartBlock totals">\r
+ {if:cartHasContents} \r
+ <div class="glmCartTotals">\r
+ <div class="glmCartBlockTitle totals">Cart Totals</div>\r
+ <div class="glmCartTable totals">\r
+ <div class="glmCartHeader">\r
+ <div class="glmCartText grand">Grand Total</div>\r
+ </div>\r
+ <div class="glmCartValues">\r
+ <div class="glmCartText grand">{totals.price}</div>\r
+ </div>\r
+ </div><!--/.glmCartTable-->\r
+ </div><!--/.glmCartTotals-->\r
+ {else:}\r
+ <P>Your cart is currently empty.</P> \r
+ {end:}\r
+ </div> <!-- glmCartBlock -->\r
+ \r
+</div><!-- GLMcontent -->\r
+\r
+{trackingScript:h}\r
+\r
+<!-- jQuery scripts for controlling page actions -->\r
+<flexy:toJavascript\r
+ flexy:prefix="flex_"\r
+ baseSCRIPT="baseSCRIPT"\r
+ startURL="startURL"\r
+ appAdminURL="appAdminURL"\r
+ \r
+>\r
+<script type="text/javascript">\r
+\r
+ $(document).ready(function(){\r
+\r
+ // Navigation buttons\r
+ $('#GLMnavCart').click(function() { // Add to Cart \r
+ window.location = flex_baseSCRIPT + '&Action=Shop_cart';\r
+ });\r
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection\r
+ window.location = flex_startURL;\r
+ });\r
+ \r
+ // Print vouchers\r
+ $('.voucherPrint').click(function(){ \r
+ \r
+ var orderID = $(this).attr('emOrderID');\r
+ var orderVerify = $(this).attr('emOrderVerify');\r
+ var voucherWindow = window.open(flex_baseSCRIPT + "&Action=Shop_printVoucher&OrderID=" + orderID + "&orderVerify=" + orderVerify, \r
+ "voucherPrint", \r
+ "height=750,width=600,menubar=yes,toolbar=yes,alwaysRaised=yes,menu"\r
+ );\r
+ voucherWindow.focus();\r
+ voucherWindow.print();\r
+ return false;\r
+\r
+ });\r
+\r
+ });\r
+\r
+</script>\r
+<flexy:include src="tickets/foot.html" />
\ No newline at end of file
--- /dev/null
+<h2>\r
+ <a href="{baseSCRIPT}&Action=Shop_printVoucher&OrderID={cartEntry.paymentResult.orderID}&orderVerify={cartEntry.paymentResult.orderVerification}">\r
+ Click here to reprint your {term.voucher.plur}\r
+ </a>\r
+</h2>\r
+\r
+<h3>\r
+ {term.ticket.plur_cap} Purchased at:<br>\r
+ {cartEntry.name}\r
+</h3>\r
+ \r
+ <!-- glmCartVenueInfo -->\r
+{if:cartEntry.descr}<p>{cartEntry.descr:h}</p>{end:}\r
+ \r
+<table border="1" cellspacing="0" cellpadding="2">\r
+\r
+ <tr>\r
+ <th align="left" width="10%">Quant</th>\r
+ <th align="left">{term.performance.cap}</th>\r
+ <th align="left">{term.ticket.cap}</th>\r
+ <th align="right" width="10%">Price</th>\r
+ <th align="right" width="10%">Total</th>\r
+ </tr>\r
+\r
+{foreach:cartEntry.performances,p} <!-- each performance -->\r
+ {foreach:p.dates,d} <!-- each date -->\r
+ {foreach:d.sections,s}\r
+ \r
+ \r
+ {foreach:s.tickets,i}\r
+ <tr>\r
+ <td id="quant_ticket_{i.invID}" align="left">{i.selected}</td>\r
+ <td align="left">{p.name:h}</td>\r
+ <td align="left">{i.title:h}</td>\r
+ <td align="right">{if:i.show_price}{i.price}{end:}</td>\r
+ <td align="right">{if:i.show_price}{i.extended}{end:}</td>\r
+ </tr>\r
+ {foreach:i.addons,a}\r
+ <tr>\r
+ <td> </td>\r
+ <td align="left"> </td>\r
+ <td align="left">\r
+ <div id="quant_addon_{a.id}">\r
+ {a.selected} {a.unit_name}\r
+ </div>\r
+ </td>\r
+ <td align="right">{a.unit_cost}/{a.unit_name}</td>\r
+ <td align="right">{a.money}</td>\r
+ </tr>\r
+ {end:}\r
+ {if:i.promo}\r
+ <tr>\r
+ <td> </td>\r
+ <td> </td>\r
+ <td align="left">{term.promo.cap}: {promoCode}</td>\r
+ <td> </div>\r
+ <td align="right">{i.promo.credit}</td>\r
+ </tr>\r
+ {end:}\r
+ {end:}<!--tickets-->\r
+ \r
+ \r
+ {end:} <!-- each section -->\r
+ {end:} <!-- each performance for this date -->\r
+{end:} <!-- each date for this venue -->\r
+\r
+ <tr>\r
+ <td colspan="4"> </td>\r
+ <td align="right">{cartEntry.totalPrice}</td>\r
+ </tr>\r
+\r
+<!-- \r
+ <tr>\r
+ <th align="right">{cartEntry.totalTickets}</th>\r
+ <td colspan="6"> </td>\r
+ <th align="right">{cartEntry.totalPrice}</th>\r
+ </tr>\r
+ -->\r
+ \r
+</table>\r
+\r
+ <!-- If special requests possible -->\r
+{if:cartEntry.ticket_spec_req}\r
+<p>\r
+ Special requests: {cartEntry.paymentForm.spec_req.value:h}\r
+</p> \r
+{end:}\r
+ \r
+\r
+{if:cartEntry.ticket_policy}<p>{cartEntry.ticket_policy:h}</p>{end:}\r
+ \r
+<p> \r
+ <table border="1" cellspacing="0" cellpadding="2">\r
+ <tr><th colspan="2" align="center">Credit Card Payment Approved</th></tr>\r
+ <tr><th align="left">Card Type</th><td>{cartEntry.paymentResult.cctype}</td></tr>\r
+ <tr><th align="left">Name on Card</th><td>{cartEntry.paymentResult.ccname}</td></tr>\r
+ <tr><th align="left">Card Number</th><td>{cartEntry.paymentResult.ccnumb}</td></tr>\r
+ <tr><th align="left">Expiration Date</th><td>{cartEntry.paymentResult.ccexp}</td></tr>\r
+ <tr><th align="left">Authorization Code</th><td>{cartEntry.paymentResult.authCode}</td></tr>\r
+ </table>\r
+</p> \r
+ \r
+<!-- is this needed? <flexy:include src="tickets/foot.html" /> -->
\ No newline at end of file
--- /dev/null
+<!-- \r
+\r
+ Gaslight Media - Event Management - Ticketing Front-End - Section Selection Page\r
+\r
+-->\r
+\r
+<flexy:include src="tickets/head.html" />\r
+\r
+\r
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->\r
+<div id="GLMcontent">\r
+\r
+ <!-- GLMpageTitle - A title for this page -->\r
+ <div id="GLMpageTitle">{term.section.cap} Selection</div>\r
+ \r
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->\r
+ <div id="GLMnavigation">\r
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem">{term.nav.show_selected}</a>\r
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem">{term.nav.select_more}</a> <!-- returns user to main site -->\r
+ </div>\r
+\r
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->\r
+ <div id="GLMpageIntro">{sectionText:h}</div>\r
+\r
+{if:reason}\r
+ <div id="GLMreason">\r
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>\r
+ <ul class="GLMreasonList">\r
+ {foreach:reason,r}\r
+ <li>{r:h}</li>\r
+ {end:}\r
+ </ul>\r
+ </div>\r
+{end:}\r
+\r
+ <p>You have selected</p>\r
+ <div class="glmSection">\r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">{performanceDetail.member_name}</div><br> \r
+ <div class="glmBlockName">{performanceDetail.name}</div>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+<!-- <p><span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</p> -->\r
+<!-- <p>{performanceDetail.descr:h}</p> -->\r
+ </div>\r
+ </div>\r
+ </div>\r
+\r
+ <!-- List of available sections -->\r
+ <hr />\r
+ <p>Please select from the following</p>\r
+ <div class="glmSection">\r
+{foreach:sectionList,x} \r
+ <div class="glmBlock">\r
+ <div class="glmBlockHeadder">\r
+ <div class="glmBlockName">\r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}">{x.name}</a>\r
+ </div> \r
+ <a href="{baseSCRIPT}&Action=Shop_ticketSelect&PerformanceID={performanceDetail.id}&SectionID={x.id}" class="glmNavItem">{term.nav.select}</a>\r
+ </div>\r
+ <div class="glmBlockContent"> \r
+ <p><span class="glmBold">{term.section.cap}</span>: {x.member_name}</p>\r
+ <p>{x.descr:h}</p>\r
+ </div>\r
+ </div> \r
+{end:}\r
+ \r
+ </div>\r
+\r
+</div> <!-- /GLMcontent -->\r
+\r
+ {startScript:h}\r
+\r
+ $(document).ready(function(){ \r
+\r
+ // Code to kick off the geolocation-display feature \r
+ $("#locationMap").geolocate({\r
+ lat: "#lat",\r
+ lng: "#lon",\r
+ mapOptions: {\r
+ disableDefaultUI: false,\r
+ mapTypeControl: true,\r
+ mapTypeId: "roadmap",\r
+ zoom: 12\r
+ },\r
+ markerOptions: {\r
+ draggable: false,\r
+ title: "This is your selected location"\r
+ }\r
+ });\r
+ \r
+ });\r
+\r
+</script>\r
+<flexy:include src="tickets/foot.html" />
\ No newline at end of file
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="tickets/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.event.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{introText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>Please select from the following</p>
+{if:showTickets}
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+<!-- <input type="hidden" name="PerformanceID" value="{performanceDetail.id}"> -->
+<!-- <input type="hidden" name="SectionID" value="{sectionDetail.id}"> -->
+{end:}
+ <!-- List of Locations -->
+ {foreach:membersList,m}
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">{m.name}</div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">Address</span>: {m.addr1}{if:m.addr2}, {m.addr2}{end:}, {m.city}</div>
+ <div class="glmDescr"><span class="glmBold">Phone #</span>: {m.phone}</div>
+ <div class="glmDescr">{m.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:m.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{m.image}"></div>
+ {end:}
+ {end:}
+ <!-- List of available events for this location -->
+ <div class="glmBlockList">
+ {foreach:m.performances,p}
+ <div class="glmBlock">
+ <div class="glmBlockContentLeft">
+ <div class="glmBlockHeader">
+ <div class="glmBlockName">
+ {if:showTickets}
+ {p.name}
+ {else:}
+ <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}">{p.name}</a>
+ {end:}
+ </div>
+ </div>
+ <div style="clear: both;">
+ <div class="glmDescr"><span class="glmBold">{term.prop.cap}</span>: {p.member_name}</div>
+ <div class="glmDescr"><span class="glmBold">Dates</span>: {p.start_date.date} through {p.end_date.date}</div>
+ <div class="glmDescr">{p.descr:h}</div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ {if:option.select_images}
+ {if:p.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.small}/{p.image}"></div>
+ {end:}
+ {end:}
+ {if:!showTickets}
+<!-- <a href="{baseSCRIPT}&Action=Shop_sectionSelect&PerformanceID={p.id}" class="glmNavItem chooser">{term.nav.select}</a> -->
+ {end:}
+
+
+ <!-- For each section for this performance -->
+ {foreach:p.sections,s}
+ <p style="clear: both;"> </p> <!-- Please look at spacing here -->
+ <div class="glmBlock">
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!p.oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {p.purch_leadtime} hours before {term.performance.norm} -->
+ </div>
+ <!--<p>{p.descr:h}</p>-->
+ </div>
+ </div>
+
+ <!-- For each ticket in this section -->
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValue">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ <span class="glmBlockLeft">
+ <div class="glmBlockHeadder">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={p.id}&SectionID={sectionDetail.id}&TicketID={x.id}" class="glmNavItem">{term.nav.select}</a>
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+ <div class="glmBlockContent">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <div class="glmDescr">
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value}, {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </div>
+ </div><!--/.glmBlockContent-->
+ </span>
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmTicketsSelectValueWrapper">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price each: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div>
+
+ {end:}
+ </div><!--/.glmBlockHeadder-->
+
+
+ {end:} <!--/tickets-->
+
+ </div>
+
+ {end:} <!--/performances-->
+
+
+
+ </div>
+ {end:}
+ </div>
+ </div>
+ {end:}
+{if:showTickets}
+ <div id="GLMselect">
+ <a id="GLMselectButton" class="glmNavItemWide">{term.nav.select}</a>
+ </div>
+ </form>
+{end:}
+</div><!-- /GLMcontent -->
+<!--</div> -->
+{startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ </p>\
+ ';
+
+
+
+ $(document).ready(function(){
+
+ // Code to kick off the geolocation-display feature
+ function doLocationMap(id) {
+ $("#locationMap_" + id).geolocate({
+ lat: "#lat_" + id,
+ lng: "#lon_" + id,
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ }
+ {foreach:membersList,m}
+ doLocationMap({m.id});
+ {end:}
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDate_' + ticket.id).html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_inv_array[' + dateData['date'] + ']" value="' + dateData.id + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+// *** NEED TO FIX REFERENCE TO "performanceDetail" since that's not available on this page
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, dateData.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate);
+ } else {
+
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ $('#GLMselectButton').click(function() {
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+
+</script>
+<flexy:include src="tickets/foot.html" />
\ No newline at end of file
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+
+<flexy:include src="tickets/head.html" />
+
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">Ticket Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a>
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specificied in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketOptText:h}</div>
+ {if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+ {end:}
+ <p>You have selected</p>
+ <!-- List of Ticket Options -->
+ <div class="glmSection">
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">{term.prop.cap}: {performanceDetail.member_name}</div>
+<!-- <div class="glmDescr">{term.order.cap} up to: {performanceDetail.purch_leadtime} hours before {term.performance.norm}.</div> -->
+ <!--<p>{performanceDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{sectionDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ <!--<p>{sectionDetail.descr:h}</p>-->
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{ticketDetail.name}</div>
+ </div>
+ <div class="glmBlockContent">
+ {if:!ticketDetail.date_specific.value}
+ <div class="glmDescr">Use any date {if:ticketDetail.start_date.timestamp} from {ticketDetail.start_date.date} to {ticketDetail.end_date.date}{end:}</div>
+ {end:}
+ {if:!ticketDetail.time_specific.value}
+ <div class="glmDescr">Use any time</div>
+ {else:}
+ <div class="glmDescr">Time: {ticketDetail.ticket_time.time}</div>
+ {end:}
+ {if:!ticketDetail.unlimted_use.value}
+ <!-- <div class="glmDescr">Each {term.ticket.norm} may be used {ticketDetail.uses} time(s)</div> -->
+ {else:}
+ <div class="glmDescr">Each {term.ticket.norm} may be used an unlimited number of times</div>
+ {end:}
+ <div class="glmDescr">{ticketDetail.descr:h}</div>
+ </div>
+ </div>
+ </div>
+ <!-- Date and quantity selection -->
+ <p>Please select from the following</p>
+ <div class="glmSection">
+ <div id="GLMeventDateSelectBlock">
+ <div id="GLMeventDateSelect" class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">Select desired date:</div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInputShort"><input type="text" id="GLMeventDate" name="ticket_date" value=""> (click in field to set date)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="glmBlock">
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName"></div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr quant">Select Quantity:</div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer">(please select date first)</div>
+ </div>
+ </div>
+ </div>
+ </div>
+ {if:reason}<div id="GLMaddToCart" name="ticket">(disabled - please see above)</div>{else:}<div id="GLMaddToCart" class="glmNavItem add" name="ticket">{term.nav.add_to_cart}</div>{end:}
+</div><!-- GLMcontent -->
+<!-- jQuery scripts for controlling page actions -->
+{startScript:h}
+
+ // Whether ticket has date specific inventory
+ var dateSpecific = {ticketDetail.date_specific.value} + 0;
+
+ // Dates for inventory data
+ var dates = {inventoryJSON:h};
+
+ $(document).ready(function(){
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (dates[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+ var dateData = false;
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector" name="quant"><option value="0"></option>[ticket-quants]</select>\
+ ';
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least {detail.performance.purch_leadtime} hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ </p>\
+ ';
+ var selectedInv;
+ var ticketQuants;
+ var addButtonPushed = false;
+
+ // Start by counting the number of dates to see if we have only 1
+ var dateCount = 0;
+// if (dateSpecific) {
+ $.each(dates, function(index, date) {
+ dateCount = dateCount + 1;
+ dateData = date;
+ });
+// }
+ // if there's no date specific tickets
+ if (!dateSpecific) {
+ // Populate date input field
+ $('#GLMeventDateSelectBlock').html('<input type="hidden" name="ticket_date" value="0">');
+ doQuantSelection();
+ // if there's only one date, then display that and move on.
+ } else if (!dateSpecific || dateCount == 1) {
+ // populate date input field
+ $('#GLMeventDate').val(dateData['date']);
+ $('#GLMtickets').html('<div class="glmTicketsSelect"><div class="glmTicketsSelectPrompt">Date: </div><div class="glmTicketsSelectValue">' + dateData['date'] + '<input type="hidden" name="ticket_date" value="' + dateData['date'] + '"></div></div><div id="GLMticketsSelectionContainer"></div>');
+
+ doQuantSelection();
+ } else {
+ // Use the date picker to select a date
+ dateData = false;
+ $("#GLMeventDate").datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: "{performanceDetail.start_date.date}",
+ maxDate: "{performanceDetail.end_date.date}",
+ onSelect: function(selectedDate, inst) {
+ // Update input message
+ $('#GLMdateMessage').html('<br />');
+
+ // Get data for the selected date
+ dateData = dates[selectedDate];
+ doQuantSelection();
+ } // Date Selection
+
+ }); // Date Picker
+
+ }
+
+ function doQuantSelection() {
+ // Build the ticket quant options
+ ticketQuants = '';
+ var selectMax = dateData['available'];
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+ var tooLate = dateData['tooLate'];
+ if (tooLate) {
+ $('#GLMticketQuantContainer').html(ticketTooLate);
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ $('#GLMticketQuantContainer').html(ticketQuantSelection.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+// doAddToCartSetup();
+ }
+
+// function doAddToCartSetup() {
+ // Add to cart action
+ $('#GLMaddToCart').click(function() {
+ if (addButtonPushed) {
+ return;
+ }
+ var reason = '';
+ // Check date
+ if (dateData) {
+ selectedInv = dateData.id;
+ } else {
+ reason = reason.concat('* You need to select a date first.\n');
+ }
+ // Check quantity
+ var selectedQuant = (parseInt($('#glmQuantSelector').val()) + 0);
+ if (selectedQuant == 0) {
+ reason = reason.concat('* You need to select a quantity first.\n');
+ }
+ // Check if there's a reason we can't add this to the cart yet
+ if (reason != '') {
+ alert(reason);
+ return;
+ }
+ // Adding to cart
+ addButtonPushed = true;
+ $("#GLMeventDate").datepicker('disable');
+ $('#glmQuantSelector').prop('disabled', 'disabled');
+ setBlocker();
+ // Submit to cart
+ window.location = "{baseSCRIPT}&Action=Shop_cart&cart=add&PerformanceID={performanceDetail.id}&SectionID={sectionDetail.id}&TicketID={ticketDetail.id}&ticket_inv=" + selectedInv + "&quant=" + selectedQuant;
+
+ });
+// }
+ // Code to kick off the geolocation-display feature
+ $("#locationMap").geolocate({
+ lat: "#lat",
+ lng: "#lon",
+ mapOptions: {
+ disableDefaultUI: false,
+ mapTypeControl: true,
+ mapTypeId: "roadmap",
+ zoom: 12
+ },
+ markerOptions: {
+ draggable: false,
+ title: "This is your selected location"
+ }
+ });
+ // Navigation buttons
+ $('#GLMnavCart').click(function() { // Add to Cart
+ window.location = '{baseSCRIPT}&Action=Shop_cart';
+ });
+ $('#GLMnavSelectEvent').on('click', function() { // Return to Event Selection
+ window.location = '{startURL:h}';
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+ });
+</script>
+<flexy:include src="tickets/foot.html" />
\ No newline at end of file
--- /dev/null
+<!--
+ Gaslight Media - Event Management - Ticketing Front-End - Ticket Selection Page
+-->
+<flexy:include src="tickets/head.html" />
+<!-- GLMcontent is simply a wrapper for the entire content area. No need to style this unless desired. -->
+<div id="GLMcontent">
+ <!-- GLMpageTitle - A title for this page -->
+ <div id="GLMHeader">
+ <div id="GLMpageTitle">{term.ticket.cap} Selection</div>
+ <!-- GLMnavigation - Navigation items for moving away from this page other than selection of tickets -->
+ <div id="GLMnavigation">
+ <a href="{baseSCRIPT}&Action=Shop_cart" class="glmNavItem cart">{term.nav.show_selected}</a>
+ {if:!option.ticket_selection.start_at_cart}
+ <a href="{baseSCRIPT}&Action=Shop_start" class="glmNavItem cart" style="margin-right: 6px;">{term.nav.select_more}</a> <!-- returns user to main site -->
+ {end:}
+ </div>
+ </div><!--/#GLMHeader-->
+ <!-- GLMpageIntro - This is text content that may be specified in the Admin area that will show up only on the top of this page's content area -->
+ <div id="GLMpageIntro">{ticketText:h}</div>
+{if:reason}
+ <div id="GLMreason">
+ <div class="GLMreasonTitle">We're sorry, we had a problem with your request:</div>
+ <ul class="GLMreasonList">
+ {foreach:reason,r}
+ <li>{r:h}</li>
+ {end:}
+ </ul>
+ </div>
+{end:}
+ <p>You have selected</p>
+ <!-- List of Tickets -->
+
+
+{foreach:sections,s}
+ <div class="glmSection">
+ <div class="glmBlock">
+
+
+ <div class="glmBlockContent">
+ {if:performanceDetail.image}
+ <div class="glmBlockContentRight"><img src="{fileServer.secure}{fileServer.owner_id}/{image_style.medium}/{performanceDetail.image}"></div>
+ {end:}
+ <div class="glmBlockContentLeft">
+
+ <div class="glmBlockHeadder">
+ <div class="glmBlockName">{performanceDetail.member_name:h}</div><br>
+ <div class="glmBlockName">{performanceDetail.name:h}</div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:!oneSectionOnly}
+ {s.sectionDetail.name}<br>
+ {end:}
+<!-- <span class="glmBold">{term.order.cap} up to </span>: {performanceDetail.purch_leadtime} hours before {term.performance.norm}
+-->
+ </div>
+
+ {if:performanceDetail.descr}
+ {performanceDetail.descr:h}
+ {end:}
+ </div> <!-- description -->
+ </div> <!-- member data left -->
+ </div> <!-- glmBlockContent -->
+ </div> <!-- glmBlock -->
+ </div> <!-- sections -->
+ <!-- List of Available Events -->
+ <p>Please select from the following</p>
+ <div class="glmSection">
+ <form action="{baseSCRIPT}" id="GLMselectForm" method="POST">
+ <input type="hidden" name="Action" value="Shop_cart">
+ <input type="hidden" name="cart" value="add">
+ <input type="hidden" name="PerformanceID" value="{performanceDetail.id}">
+ <input type="hidden" name="SectionID" value="{sectionDetail.id}">
+ {foreach:s.ticketsData,x}
+ <div class="glmBlock">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockContentRight">
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Price: </div>
+ <div class="glmTicketsSelectValue">
+ <div class="glmInput">{x.price}</div>
+ </div>
+ </div>
+ <div id="GLMeventDateSelect_{x.id}" class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Select date: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMeventDate_{x.id}" class="glmInput">
+ <input type="hidden" id="GLMeventInvID_{x.id}" name="ticket_inv_array[{x.id}]" value="">
+ <input type="text" id="GLMeventDateInput_{x.id}" class="glmEventDateInput" name="ticket_date[{x.id}]" value="">
+ </div>
+ </div>
+ </div>
+ <div class="glmBlockContent">
+ <div class="glmTicketsSelectPrompt">Quant: </div>
+ <div class="glmTicketsSelectValue">
+ <div id="GLMticketQuantContainer_{x.id}" class="glmInput">(select date)</div>
+ </div>
+ </div>
+ </div> <!-- glmBLockContentRight -->
+ {end:}
+ <div class="glmBlockContentLeft">
+ {if:option.ticket_selection.include_options_in_ticket_list}
+ <div class="glmBlockName">{x.title}</div>
+ {else:}
+ <div class="glmBlockName">
+ <a href="{baseSCRIPT}&Action=Shop_ticketOpt&PerformanceID={performanceDetail.id}&SectionID={x.section_id}&TicketID={x.id}">{x.name}</a>
+ </div>
+ {end:}
+ <div class="glmBlockContent">
+ <div class="glmDescr">
+ {if:x.descr}
+ <p>{x.descr:h}</p>
+ {end:}
+ <p>
+ {if:!x.date_specific.value}
+ Use any date{if:x.start_date.timestamp} from {x.start_date.date} to {x.end_date.date}{end:}{if:!x.time_specific.value}, {end:}
+ {end:}
+ {if:!x.time_specific.value}
+ Use any time of day,
+ {else:}
+ Time: {x.ticket_time.time},
+ {end:}
+ {if:x.unlimted_use.value}
+ Each {term.ticket.norm} may be used an unlimited number of times
+ {else:}
+ <!-- Each {term.ticket.norm} may be used {x.uses} time(s) -->
+ {end:}
+ </p>
+ </div>
+ </div>
+ </div><!--/.glmBlockContentLeft-->
+ </div><!--/.glmBlock-->
+ {end:}
+ <div id="GLMselect">
+ <a id="GLMselectButton" class="glmNavItem">{term.nav.select}</a>
+ </div>
+ </form>
+ </div> <!-- glmSection -->
+
+{end:}
+
+</div> <!-- /GLMcontent -->
+
+{if:option.ticket_selection.include_options_in_ticket_list}
+ <!-- jQuery scripts for controlling page actions -->
+ {startScript:h}
+
+ var addButtonPushed = false;
+
+ // Dates for inventory data
+ var tickets = {ticketsJSON:h};
+
+ var ticketQuantSelection = '\
+ <select id="glmQuantSelector_[id]" name="quant[[id]]" class="glmTicketQuant"><option value=""></option>[ticket-quants]</select>\
+ ';
+
+ var ticketTooLate = '\
+ <p>\
+ Sorry, too late to select these {term.ticket.plur} on-line.\
+ {term.ticket.plur_cap} must be purchased at least [hours] hours prior to the {term.performance.norm}.\
+ Please select another date or time.\
+ </p>\
+ ';
+
+
+ $(document).ready(function(){
+
+ // for each ticket
+ $.each(tickets, function(index, ticket) {
+
+ var inventory = ticket.inventory;
+
+ // Build date data array and count dates for this ticket
+ var dateCount = 0;
+ var dateData = false
+ $.each(inventory, function(index, date) {
+
+ // Count the number of dates
+ dateCount++;
+
+ // If this is the first one, store it in case it's the only one
+ dateData = date;
+
+ }); // each date
+
+ // if there's no date specific tickets
+ if (!ticket.dateSpecific) {
+
+ // Populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html('<input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '">');
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ // if there's only one date, then display that and move on.
+ } else if (!ticket.dateSpecific || dateCount == 1) {
+
+ // populate date input field
+ $('#GLMeventDateSelect_' + ticket.id).html(' \
+ <div class="glmTicketsSelectPrompt">Date Available: </div> \
+ <div class="glmTicketsSelectValue"> \
+ <div class="glmInput"> \
+ ' + dateData.ticket_date.date + ' \
+ <input type="hidden" name="ticket_inv_array[' + ticket.id + ']" value="' + dateData.id + '"> \
+ </div> \
+ </div>');
+
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+
+ } else {
+
+ // DatePicker action
+ function avail(date) {
+ m = (date.getMonth()+1);
+ if (m < 10) {
+ m = '0' + m;
+ }
+ d = date.getDate();
+ if (d < 10) {
+ d = '0' + d;
+ }
+ y = date.getFullYear();
+ mdy = m + '/' + d + '/' + y;
+ if (inventory[mdy]) {
+ return [true,"","Available"];
+ } else {
+ return [false,"","Not Available"];
+ }
+ }
+
+ // Use the date picker to select a date
+ if($('#GLMeventDateInput_' + ticket.id).length > 0) {
+ $('#GLMeventDateInput_' + ticket.id).datepicker({
+ beforeShowDay: avail,
+ dateFormat: "mm/dd/yy",
+ minDate: ticket.startDate,
+ maxDate: ticket.endDate,
+ onSelect: function(selectedDate, inst) {
+ // Get data for the selected date
+ dateData = inventory[selectedDate];
+ $('#GLMeventInvID_' + ticket.id).val(dateData.id);
+ doQuantSelection(ticket.id, dateData.id, dateData.available, ticket.tooLate);
+ } // Date Selection
+
+ }); // Date Picker
+ }
+
+ }
+
+ }); // each ticket
+
+ function doQuantSelection(id, invId, available, tooLate) {
+
+ // Build the ticket quant options
+ var ticketQuants = '';
+ var selectMax = available;
+ if (selectMax > 50) {
+ selectMax = 50;
+ }
+
+ if (tooLate) {
+ $('#GLMticketQuantContainer_' + id).html(ticketTooLate.replace(/\[hours\]/g, {performanceDetail.purch_leadtime}));
+ } else {
+ // note that the braced lte below is needed to inject a less-than-or-equal-to operator without having flexy chew on it.
+ for (var i = 1; i {lte:h} (selectMax*1); i++) {
+ ticketQuants = ticketQuants.concat('<option value="' + i + '">' + i + '</option>');
+ }
+
+ // Populate the ticket quantity container
+ tmpQuantSel = ticketQuantSelection.replace(/\[id\]/g, id);
+ $('#GLMticketQuantContainer_' + id).html(tmpQuantSel.replace(/\[ticket-quants\]/g, ticketQuants));
+ }
+
+ }
+
+ var selectButtonPressed = false;
+
+ $('#GLMselectButton').click(function() {
+
+ // Prevent multiple submissions
+ if (selectButtonPressed == true) {
+ return;
+ }
+
+ // Check for a selected ticket
+ var ticketSelected = false;
+ $('.glmTicketQuant').each(function( index ) {
+ if ($(this).val() != '') {
+ ticketSelected = true;
+ }
+ });
+
+ if (ticketSelected) {
+ selectButtonPressed = true;
+ setBlocker();
+ $('#GLMselectForm').submit();
+ } else {
+ alert('Please select a {term.ticket.norm} quantity.')
+ return false;
+ }
+
+ });
+
+ function setBlocker() {
+ $('#glmReloadBlocker').show();
+ }
+
+
+ });
+ </script>
+{end:}
+<flexy:include src="tickets/foot.html" />
\ No newline at end of file
--- /dev/null
+<!-- Footer content for all Front-End pages -->
+{if:option.development}
+ <p id="glmDevelopmentNotice">
+ Running on Development Server:
+ <span style="float: right;">
+ <a href="{baseSCRIPT}&session_reset=true">Reset Session</a>
+ </span>
+ </p>
+{end:}
\ No newline at end of file
--- /dev/null
+<!-- Header content for all Front-End pages -->
+{startScript:h}
+ // Pass some reference parameters to JAVAScript
+ var baseSiteURL = '{baseURL}';
+ var baseAppURL = '{baseAppURL}';
+</script>
+{if:!jQueryLoaded}
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+{end:}
+{if:!jQueryUiLoaded}
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/css/smoothness/jquery-ui-1.10.2.custom.min.css">
+ <script type="text/javascript" src="{baseURL}common/Public/jquery-ui/jquery-ui-1.10.2.custom/js/jquery-ui-1.10.2.custom.min.js"></script>
+{end:}
+<script type="text/javascript" src="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.js?serial={timestamp}"></script>
+<script type="text/javascript" src="{baseURL}common/Public/geolocation-edit/jquery.geolocation.edit.min.0.0.9.js"></script>
+<link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/front/{userInterface}/EventManagement.css">
+{if:customCssFile}
+ <!-- local css overrides for the current site -->
+ <link rel="stylesheet" type="text/css" href="{customCssFile}">
+{end:}
+{if:frontDebug}
+ <!-- This is simply here as something for jQuery code to check if we're doing debug -->
+ <div id="EMadminDebug"></div>
+{end:}
+{startScript:h}
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=1000, height=700, left=100, top=25";
+ {if:frontDebug}
+ debugWindowFront = window.open("{baseURL}index.php?Action=Debug_update","emDebugWindowFront",disp_setting);
+ {end:}
+</script>
+
+<div id="glmReloadBlocker" class="glmPageLoadBlockerHidden">
+ <div>Updating your information<br>Please wait ...</div>
+</div>
+
+ {if:adminUser}
+ <h2 style="border: 1px solid black; text-align: center;">Purchasing By Admin User</h2>
+ {end:}
--- /dev/null
+<!DOCTYPE HTML>
+<html>
+ <head>
+ <script type="text/javascript" src="{baseURL}common/Public/jquery/jquery-1.9.1.min.js"></script>
+ <script type="text/javascript" src="{baseURL}common/EventManagement/admin/{userInterface}/tickets.js?serial={timestamp}"></script>
+ <link rel="stylesheet" type="text/css" href="{baseURL}common/EventManagement/admin/{userInterface}/tickets.css?serial={timestamp}">
+
+ </head>
+ <body>
+
+ <h1>PLEASE NOTE:</h1>
+
+ <p>
+ There is no general access to this site.
+ All access to this site should be through an appropriate link.
+ If you arrived here by mistake (or exploring), nothing but this message will be displayed.
+ If you have any concerns about this site, please contact Gaslight Media.
+ </p>
+
+ <p>
+ Gaslight Media<br>
+ 120 East Lake Street<br>
+ Petoskey, MI 49770<br>
+ <br>
+ Phone: 231-487-0692<br>
+ E-Mail: info@gaslightmedia.com<br>
+ Web: http://www.gaslightmedia.com
+ </p>
+
+ </body>
+
+</html>
+
+
--- /dev/null
+/* Event Management - Tickets interface */\r
+body {\r
+ padding-right: 10px;\r
+ font-family: Helvetica, Arial, sans-serif;\r
+}\r
+.emMainTabs {\r
+ \r
+}\r
+.emTabSpace {\r
+ position: relative;\r
+ float: left;\r
+ padding: .5em;\r
+}\r
+.emMainTabs .emTab {\r
+ position: relative;\r
+ z-index: 30;\r
+ float: left;\r
+ /* width: 28.33333333%; */\r
+ padding: .2em;\r
+ padding-right: .4em;\r
+ margin-right: .5em;\r
+ background: #CCC;\r
+ border-radius: 5px 5px 0 0;\r
+ font-size: .8em;\r
+ font-weight: normal;\r
+ color: #333;\r
+ border-top: 1px solid #aaa;\r
+ border-left: 1px solid #aaa;\r
+ border-right: 1px solid #aaa;\r
+}\r
+.emMainTabs .emTabSelected {\r
+ background: #AED7FF;\r
+ border-top: 1px solid #09F;\r
+ border-left: 1px solid #09F;\r
+ border-right: 1px solid #09F;\r
+ z-index: 10;\r
+ bottom: -1px;\r
+}\r
+.emRight {\r
+ float: right;\r
+}\r
+.emSubTabs {\r
+ \r
+}\r
+.emSubTabs .emTab {\r
+ position: relative;\r
+ z-index: 30;\r
+ float: left;\r
+ /* width: 28.33333333%; */\r
+ padding: .2em;\r
+ padding-right: .4em;\r
+ margin-right: .5em;\r
+ background: #CCC;\r
+ border-radius: 5px 5px 0 0;\r
+ font-size: .8em;\r
+ font-weight: normal;\r
+ color: #333;\r
+ border-top: 1px solid #aaa;\r
+ border-left: 1px solid #aaa;\r
+ border-right: 1px solid #aaa;\r
+}\r
+.emSubTabs .emTabSelected {\r
+ background: #AED7FF;\r
+ border-top: 1px solid #09F;\r
+ border-left: 1px solid #09F;\r
+ border-right: 1px solid #09F;\r
+ z-index: 10;\r
+ bottom: -1px;\r
+}\r
+.emUsdTabs .emTab {\r
+ position: relative;\r
+ z-index: 30;\r
+ float: left;\r
+ /* width: 28.33333333%; */\r
+ padding: .2em;\r
+ padding-right: .4em;\r
+ margin-right: .5em;\r
+ margin-bottom: 2px;\r
+ background: #CCC;\r
+ border-radius: 5px 5px 5px 5px;\r
+ font-size: .8em;\r
+ font-weight: normal;\r
+ color: #333;\r
+ border-top: 1px solid #aaa;\r
+ border-left: 1px solid #aaa;\r
+ border-right: 1px solid #aaa;\r
+}\r
+.emUsdTabs .emTabSelected {\r
+ background: #AED7FF;\r
+ border-top: 1px solid #09F;\r
+ border-left: 1px solid #09F;\r
+ border-right: 1px solid #09F;\r
+ z-index: 10;\r
+ bottom: -1px;\r
+}\r
+.emUsdTabs .emPseudoTab{\r
+ position: relative;\r
+ z-index: 30;\r
+ float: left;\r
+ /* width: 28.33333333%; */\r
+ padding: .2em;\r
+ padding-right: .4em;\r
+ margin-right: .5em;\r
+ margin-bottom: 2px;\r
+ background: #CCC;\r
+ border-radius: 5px 5px 5px 5px;\r
+ font-size: .8em;\r
+ font-weight: normal;\r
+ color: #333;\r
+ border-top: 1px solid #aaa;\r
+ border-left: 1px solid #aaa;\r
+ border-right: 1px solid #aaa;\r
+}\r
+.emContentArea {\r
+ clear: left;\r
+ padding: 4px;\r
+ background: #AED7FF;\r
+ border: 1px solid #09F;\r
+ margin-bottom: 5px;\r
+}\r
+.emContentAreaHidden {\r
+ display: none;\r
+}\r
+.emBlock {\r
+ padding: 3px;\r
+ background: #fff;\r
+ border-radius: 4px 4px 4px 4px;\r
+ z-index: 20;\r
+ overflow: hidden;\r
+ clear: both;\r
+}\r
+.emMainBlock {\r
+ \r
+}\r
+.emSubBlock {\r
+ \r
+}\r
+.emBlockName {\r
+ font-size: 1.2em;\r
+ font-weight: bold;\r
+ color: #333;\r
+ margin-bottom: 5px;\r
+}\r
+.emBlockSeparator {\r
+ clear: left;\r
+ margin: 0 0 10px 0px;\r
+ border-top: 1px solid #000;\r
+}\r
+.emBlockSection {\r
+ margin-top: 5px;\r
+}\r
+.emBlockSectionHEad {\r
+ padding-left: 10px;\r
+ margin-bottom: 5px;\r
+ font-weight: bold; \r
+}\r
+.emItem {\r
+ \r
+}\r
+.emItemName, .emItemValue {\r
+ display: block;\r
+ float: left;\r
+ width: 40%;\r
+}\r
+.emItemName {\r
+ clear: left;\r
+}\r
+.emItemName:after {\r
+ content: " :";\r
+}\r
+.emLink {\r
+ cursor: pointer;\r
+ color: #0077cc;\r
+}\r
+/* for things we want to look like links but that don't trigger normal actions */\r
+.emPseudoLink {\r
+ cursor: pointer;\r
+ color: #0077cc;\r
+}\r
+.emLink:hover {\r
+ color: #549BB1;\r
+}\r
+#EMfoot {\r
+ text-align: center;\r
+}\r
+\r
+.emSummary, .emListContainer {\r
+ overflow: hidden;\r
+ padding: 4px 1%;\r
+/* margin-bottom: 16px; */\r
+ background: #FFF;\r
+ /* box-shadow: inset 0 0 14px rgba(0,0,0,.6); */\r
+/* margin-top: 8px; */\r
+ border-radius: 4px;\r
+}\r
+.emListContainer {\r
+ display: table;\r
+ width: 96%;\r
+}\r
+.emListContainerShort {\r
+ height: 5em;\r
+ overflow: scroll;\r
+}\r
+.emLoading {\r
+ font-size: 2em;\r
+ color: red;\r
+ opacity: 0.2;\r
+ \r
+}\r
+.emLoadingSmall {\r
+ font-size: 1em;\r
+ color: red;\r
+ opacity: 0.2;\r
+ \r
+}\r
+.emNotices {\r
+ border: 1px solid red;\r
+ padding: 5px;\r
+ padding-left: 20px;\r
+ margin: 0px;\r
+}\r
+.emNoticeHead {\r
+ font-size: 1.5em;\r
+ color: red;\r
+ padding: 0px;\r
+ margin: 0px;\r
+}\r
+.emNotice {\r
+}\r
+.emForm {\r
+}\r
+.emFormReqField {\r
+ color: red;\r
+}\r
+/* DataTables Styling */\r
+.emListTableContainer {\r
+ margin-top: 5px;\r
+ margin-bottom: 5px;\r
+ border: 1px solid #ccc;\r
+ clear: both;\r
+}\r
+.emListTableContainerLeft {\r
+ margin-top: 5px;\r
+ margin-bottom: 5px;\r
+ border: 1px solid #ccc;\r
+ float: left;\r
+ clear: both;\r
+ width: 90%;\r
+}\r
+.emListTable {\r
+ font-size: .8em;\r
+ border: 1px solid #ccc;\r
+ spacing: 0px;\r
+ border-collapse:collapse;\r
+ text-align: left;\r
+}\r
+.emListTable tr.even {\r
+ border: 1px solid #ccc;\r
+ background: #fff;\r
+} \r
+.emListTable tr.even th {\r
+ border: 1px solid #ccc;\r
+ white-space: nowrap;\r
+ background: #eee;\r
+} \r
+.emListTable tr.even td {\r
+ border: 1px solid #ccc;\r
+} \r
+.emListTable tr.odd {\r
+ border: 1px solid #ccc;\r
+ background: #fff;\r
+} \r
+.emListTable tr.odd th {\r
+ border: 1px solid #ccc;\r
+ white-space: nowrap;\r
+ background: #eee;\r
+}\r
+.emListTable tr.odd td {\r
+ border: 1px solid #ccc;\r
+}\r
+.emListTable thead {\r
+ background: #eee;\r
+ color: #000;\r
+}\r
+.emListTable thead tr th{\r
+ border: 1px solid #ccc;\r
+ white-space: nowrap;\r
+}\r
+.emListTable thead tr td {\r
+ border: 1px solid #ccc;\r
+} \r
+.emListTable tbody {\r
+ background: #fff;\r
+ color: #000;\r
+}\r
+.emListTable tbody tr.even {\r
+ border: 1px solid #ccc;\r
+ background: #fff;\r
+} \r
+.emListTable tbody tr.even th {\r
+ border: 1px solid #ccc;\r
+ white-space: nowrap;\r
+} \r
+.emListTable tbody tr.even th.sorting_1 {\r
+ border: 1px solid #ccc;\r
+ background: #fff; \r
+}\r
+.emListTable tbody tr.even td {\r
+ border: 1px solid #ccc;\r
+} \r
+.emListTable tbody tr.even td.sorting_1 {\r
+ border: 1px solid #ccc;\r
+ background: #fff; \r
+}\r
+.emListTable tbody tr.odd {\r
+ border: 1px solid #ccc;\r
+ background: #fff;\r
+} \r
+.emListTable tbody tr.odd th {\r
+ border: 1px solid #ccc;\r
+ white-space: nowrap;\r
+}\r
+.emListTable tbody tr.odd th.sorting_1 {\r
+ border: 1px solid #ccc;\r
+ background: #fff; \r
+}\r
+.emListTable tbody tr.odd td {\r
+ border: 1px solid #ccc;\r
+}\r
+.emListTable tbody tr.odd td.sorting_1 {\r
+ border: 1px solid #ccc;\r
+ background: #fff; \r
+}\r
+.sorting_asc {\r
+ background: #000 url("../images/sort_asc.png") no-repeat scroll right center transparent;\r
+}\r
+.sorting_desc {\r
+ background: #000 url("../images/sort_desc.png") no-repeat scroll right center transparent;\r
+}\r
+/* Input Form Items */\r
+.emRequiredInputField {\r
+ color: red;\r
+}\r
+.emBadInputField {\r
+ background: #FFaBa9;\r
+}\r
+input.emTextInput {\r
+ width: 80%;\r
+}\r
+input.emTextInputMedium {\r
+ width: 120px;\r
+}\r
+input.emTextInputLong {\r
+ width: 100%;\r
+}\r
+input.emTextInputShort {\r
+ width: 80px;\r
+}\r
+input.emTextInputVeryShort {\r
+ width: 30px;\r
+}\r
+input.emTextInputGeoDegMin {\r
+ width: 2.5em;\r
+}\r
+input.emTextInputGeoSec {\r
+ width: 5em;\r
+}\r
+.emMapWindowDetail {\r
+ width: 200px; \r
+ height: 150px; \r
+ border: 1px solid #333;\r
+}\r
+.emMapWindowEdit {\r
+ width: 450px; \r
+ height: 250px; \r
+ border: 1px solid #333;\r
+}\r
+.showAsOverlay {\r
+ position: fixed; \r
+ z-index: 10000; \r
+ margin: auto;\r
+ margin-left: 20px;\r
+ box-shadow: 0px 0px 0px 20px rgba(0,0,0,0.8);\r
+ display: none;\r
+ background: black;\r
+ color: white; \r
+}\r
+\r
+/* Calendar Styles */\r
+.emCalendars {\r
+ font-size: .7em;\r
+ width: 100%;\r
+}\r
+.emCalMonth {\r
+ display: table;\r
+ table-layout: fixed;\r
+ width: 95%;\r
+ border-collapse: collapse;\r
+ border: 2px solid #333;\r
+ margin: auto;\r
+ margin-top: 1em;\r
+}\r
+.emCalMonthName {\r
+ display: table-caption;\r
+ caption-side: top;\r
+ text-align: center;\r
+ padding: .5em;\r
+ border: 1px solid #333;\r
+ font: 2em bold;\r
+ background: #AED7FF;\r
+}\r
+.emCalMonthColumn {\r
+ display: table-column;\r
+}\r
+.emCalHead {\r
+ display: table-row;\r
+}\r
+.emCalHeadCell {\r
+ display: table-cell;\r
+ text-align: center;\r
+ border: 1px solid #333;\r
+ padding: .3em;\r
+ background-color: #333;\r
+ color: #fff;\r
+}\r
+.emCalWeek {\r
+ display: table-row;\r
+}\r
+.emCalNoDateCell {\r
+ display: table-cell;\r
+ background-color: #666;\r
+ border: 1px solid #333;\r
+}\r
+.emCalDateCell {\r
+ display: table-cell;\r
+ border: 1px solid #333;\r
+ background-color: #ccc;\r
+}\r
+.emCalDate{\r
+ font-weight: bold;\r
+ margin-bottm: 2em;\r
+ clear: both;\r
+}\r
+.emCalDateTitle {\r
+ float: left;\r
+ padding: .2em;\r
+ height: 1em;\r
+ font-size: 1.5em;\r
+ font-weight: bold;\r
+ color: white;\r
+}\r
+.emCalDateEditLinks {\r
+ float: right;\r
+ padding: .3em;\r
+}\r
+.emCalData {\r
+ padding: .3em;\r
+ clear: both;\r
+ height: 4em;\r
+}\r
+.emCalDataRow {\r
+ clear: both;\r
+}\r
+.emCalCap {\r
+ font-weight: bold;\r
+ float: left;\r
+}\r
+.emCalValue{\r
+ font-weight: normal;\r
+ float: right;\r
+}\r
+.emCalDateCellSelectable {\r
+ cursor: pointer;\r
+}\r
+.emCalDateCellSelectable:hover {\r
+ background-color: #eee;\r
+}\r
+.emCalDateCellSelected {\r
+ background-color: #cde9ff;\r
+}\r
+.emCalDateCellSelected:hover {\r
+ background-color: #aed7ff;\r
+}\r
+.emCalEditContainerHidden {\r
+ display: none;\r
+}\r
+.emCalEditForm {\r
+ font-size: .8em;\r
+ font-weight: normal;\r
+}\r
+.emCalEditField {\r
+ clear: both;\r
+}\r
+.emCalEditPrompt {\r
+ float: left;\r
+}\r
+.emCalEditValue {\r
+ float: right; \r
+}\r
+.emCalEditValueLeft {\r
+ float: left; \r
+}\r
+.zTop {\r
+ z-index: 10000; \r
+}\r
+.emTextHighlight {\r
+ color: #0077cc;\r
+}\r
+.GLMreason {\r
+}\r
+.GLMreasonTitle {\r
+ font-weight: bold;\r
+}\r
+.GLMreasonList {\r
+ color: red;\r
+ padding: 0px;\r
+ margin: 0px;\r
+}\r
+.GLMloginStatusField {\r
+ white-space:nowrap;\r
+ font-size: .8em;\r
+ margin-right: 2em;\r
+}\r
+.GLMloginStatusPrompt {\r
+ font-weight: bold;\r
+}\r
+.GLMinfoValue {\r
+ \r
+}\r
+.submitKeepOnPage {\r
+ padding: 10px;\r
+ background-color: #fff;\r
+ position: fixed;\r
+ bottom: 10px;\r
+ left: 50px;\r
+ border: 5px solid #AED7FF;\r
+ border-radius: 4px 4px 4px 4px;\r
+ z-index: 1000;\r
+}\r
+.scanVoucherResultNone {\r
+ background-color: lightgray;\r
+}\r
+.scanVoucherResultClaimed {\r
+ background-color: lightgreen;\r
+}\r
+.scanVoucherResultUsed {\r
+ background-color: red;\r
+}\r
+\r
--- /dev/null
+/*
+ * Event Management Admin Area JAVAScript - Tickets interface
+ */
+
+var f_loadAction = false;
+var f_replaceContents = false;
+var f_tabSelect = false;
+var f_restartOnTabSelect = false;
+var duration = 0;
+var debugWindow = false;
+var f_createEditor = false;
+var f_removeEditor = false;
+
+if (memberUser) {
+ var adminURL = baseAdminURL;
+} else {
+ var adminURL = baseAdminURL + 'EventManagement/EventManagement.php';
+}
+
+function emDebugWindowReloadRequest() {
+ if (debugWindow) {
+ debugWindow.debugReloadRequest();
+ }
+}
+
+// jQuery Section
+$(document).ready(function(){
+
+ /*
+ * Data Setup Section
+ */
+
+ var siteURL = baseSiteURL;
+ var appURL = baseSiteURL + 'common/EventManagement/';
+ var appWebURL = baseSiteURL + 'common/Public/';
+
+ /*
+ * Load an action to a div with the specified action
+ */
+ function loadAction(action, container, params) {
+
+ // Display loading message
+ $('#'+container).html('<div class="emBLock"><div class="emLoading">Loading, Please Wait...</div></div>');
+ $('#'+container).show(duration);
+
+ // Build the URL and call it with AJAX
+ url = appAdminURL + "&Action=" + action;
+ if (params) {
+ url = url + '&' + params;
+
+ }
+
+ $.post( url,
+ '',
+ function(data) {
+ // Populate the container with the results
+ $('#'+container).html(data);
+ restartOnTabSelect();
+ }
+ );
+
+ }
+ f_loadAction = loadAction;
+
+ // Replace the contents of a div
+ function replaceContents(data, destination) {
+ destination.html(data);
+ $(window).scrollTop($(destination).position().top-50);
+ }
+ f_replaceContents = replaceContents;
+
+ /*
+ * General Slider Operations
+ */
+
+ // Slider area actions
+ $('.emSlider').on('click', null, function() {
+
+ // Get the ID of the area to slide from the emSliderId="" parameter in the div tag.
+ var sliderId = $(this).attr('emSliderId');
+
+ // If the slider is currently open - close it, otherwise open it.
+ if ($('#'+sliderId).is(':visible')) {
+ $('#'+sliderId).hide(duration);
+ } else {
+ $('#'+sliderId).show(duration);
+ }
+ });
+ // Startup by closing all areas that are supposed to be closed by default
+ $('.emSliderClosed').hide(duration);
+
+ /*
+ * Tab Operations
+ */
+
+ function tabSelect() {
+
+ // Get Tab Group Name
+ var tabGroup = $(this).attr('emTabGroup');
+
+ // Get last selected tab ID
+ var lastTab = $('.'+tabGroup+'.emTabSelected').attr('emTabId');
+
+ // Get the new tab ID
+ var newTab = $(this).attr('emTabId');
+
+ // Get destination container ID
+// ? var container = false;
+ var container = $(this).attr('emContainerId');
+
+ // Get any parmeters for the loadAction() AJAX call
+ var params = $(this).attr('emTabParams');
+
+ // If they didn't click the already selected tab
+ // if (lastTab != newTab) {
+
+ // Assign the clicked object to a parameter for use in the function
+ var selectedTab = $(this);
+
+ // If there was an already selected tab then hide old and processe new tab
+ if (lastTab) {
+
+ // Slide up the previously selected section
+ $('#'+container).hide(duration, function() {
+
+ // If there's a destination container, then get content
+ if (container) {
+ loadAction(newTab, container, params);
+ }
+
+ // Make last tab not selected and now a link
+ $('.'+tabGroup+'.emTabSelected').removeClass('emTabSelected');
+
+ // Mark new tab as selected and not a link
+ selectedTab.addClass('emTabSelected');
+
+ // Open the new tab's block
+ $('#'+newTab).show(duration);
+
+
+ });
+
+ // Otherwise if there's no old tab, just process the new one
+ } else {
+
+ // If there's a destination container, then get content
+ if (container) {
+ loadAction(newTab, container, params);
+ }
+
+ // Mark new tab as selected and not a link
+ selectedTab.addClass('emTabSelected');
+
+ // Open the new tab's block
+ $('#'+newTab).show(duration);
+
+ }
+
+ }
+ f_tabSelect = tabSelect;
+
+ function restartOnTabSelect()
+ {
+ $('.emTab').off('click', f_tabSelect);
+ $('.emTab').on('click', f_tabSelect);
+ }
+ f_restartOnTabSelect = restartOnTabSelect;
+ restartOnTabSelect();
+
+ /*
+ * CKEditor Actions
+ */
+
+ CKEDITOR.config.toolbar_EventManagement =
+ [
+ ['Font','FontSize','Bold','Italic'],
+ ['Cut','Copy','PasteText','-','Undo','Redo'],
+ ['NewPage', 'Preview'],
+ '/',
+ ['NumberedList','BulletedList','-','Outdent','Indent'],
+ ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
+ ['TextColor'],
+ ['Link','Unlink'],
+ ['Table','Find','Replace','-','RemoveFormat','Source']
+ ] ;
+
+ // Build a specific CKeditor
+ function buildCkeditor(f) {
+ // Get field ID
+ fieldId = f.attr('id');
+
+ // Create the editor
+ if (f.is("textarea")) {
+ // Only try to replace the textarea if the
+ // CKEditor is compatible w/ the browser.
+ if (CKEDITOR.env.isCompatible) {
+ CKEDITOR.replace(fieldId, {
+ toolbar : 'EventManagement',
+ // width : 570,
+ height : 100
+ });
+ }
+ }
+ }
+ f_buildCkeditor = buildCkeditor;
+
+ // Remove a specific CKeditor
+ function removeCkeditor(f) {
+ // Get field ID
+ fieldId = f.attr('id');
+ var instance = CKEDITOR.instances[fieldId];
+ var data = instance.getData();
+ instance.destroy(true);
+ f.text(data);
+ }
+ f_removeCkeditor = removeCkeditor;
+
+ // If option.admin_debug has been set, create debug window
+ if(debugEnabled) {
+ var disp_setting="toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=" + debugWidth + ", height=700, left=100, top=25";
+ debugWindow = window.open(appAdminURL + "&Action=Debug_start","emDebugWindow",disp_setting);
+ }
+
+
+ /*
+ * Check for user timeout
+ */
+
+ var inactivityTime = 86400000; // Number of milliseconds to user timeout
+
+ // If there's no activity for 86,400 seconds (1 day) do something
+ var activityTimeout = setTimeout(inActive, inactivityTime);
+
+ function resetActive(){
+ $(document.body).attr('class', 'active');
+ clearTimeout(activityTimeout);
+ activityTimeout = setTimeout(inActive, inactivityTime);
+ }
+
+ // No activity do something.
+ function inActive(){
+ $(document.body).html('<div class="emBLock"><div class="emLoading"><p>User timeout ...</p><p>Please select "Event Management" to start.</p></div></div>');
+ }
+
+ // Check for mousemove, could add other events here such as checking for key presses ect.
+ $(document).bind('mousemove', function(){resetActive()});
+
+});
--- /dev/null
+/* Additional styles for Event Management front-end */
+
+/* These are verified for use with the Foundation layouts */
+
+/* Styles to over-ride Foundation styles mudged by site styling. */
+.h2Tickets {
+ color: #B5383E;
+ display: block;
+ margin-bottom: .5em;
+ font-family: TimesNewRoman,"Times New Roman",Times,Baskerville,Georgia,serif;
+ font-size: 1.8em;
+ line-height: 110%;
+ font-weight: bold;
+}
+.h3Tickets {
+ font-size: 1.2em !important;
+ font-weight: bold !important;
+}
+.h3Tickets:hover {
+ color: #B5383E !important;
+}
+.buttonTickets {
+ color: white !important;
+ font-size: 1.3em !important;
+ padding: .2em 1em .2em 1em !important;
+ margin: 0 .2em .2em .2em !important;
+}
+.buttonTicketsGo {
+ color: white !important;
+ background-color: #00BF00;
+ font-size: 1.3em !important;
+ padding: .2em 1em .2em 1em !important;
+ margin: 0 .2em .2em .2em !important;
+}
+.buttonTicketsGo:hover {
+ background-color: #00AF00;
+}
+
+/* Anything below needs to be verified if used with the Foundation layouts */
+
+#GLMpageIntro {
+ margin: 1em 0 1em 0;
+}
+.glmBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 5px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmBlockContent {
+ margin: 0 0 0em 0;
+ clear: both;
+ width: 100%;
+}
+.glmBlockContentLeft {
+ display: block;
+ float: left;
+ overflow: hidden;
+}
+.glmBlockContentRight {
+ display: block;
+ float: right;
+ width: 40%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+}
+.glmBlockContentIndent {
+ display: block;
+ margin-left: 3em;
+}
+.glmCartVenueDescr, .glmCartEventDescr {
+ font-size: 0.8em;
+ margin: 0 0 2.2em 0
+}
+.glmCartVenueDescr, .glmCartEventDescr {
+ margin: 0 0 15px 0
+}
+.glmCartSelect {
+ width: 4em;
+}
+.glmCartBlock.totals .glmCartWide {
+ width: 100%;
+ padding-top: 10px;
+}
+.glmCartBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 1em 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartBlock.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 0;
+ border: 0;
+ background: none;
+}
+.glmCartBlockSmallTitle {
+ font-size: 16px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmCartBlock input[type="textarea"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.glmEventDateInput {
+ width: 80px;
+}
+.glmCartBlock.totals .glmCartBlockTitle {
+ border-bottom: 1px solid #CCC;
+}
+#GLMcontent {
+ padding: 0;
+ margin: 0 auto
+}
+#GLMevent, #GLMtickets, #GLMvenue {
+ /* max-width: 500px; */
+ margin: 0 auto 1em auto
+}
+#GLMnavigation:after {
+ content: "";
+ display: table;
+ clear: both
+}
+.glmNavItem {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #900;
+ border: 1px solid #900;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+}
+a.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+div.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+.glmNavItem.cart {
+ background: #040267;
+ border: 1px solid #040267;
+}
+.glmNavItemWide {
+ display: block;
+ width: 400px;
+ overflow: hidden;
+ margin: 12px 0 0 0;
+ padding: 8px 0;
+ background: #900;
+ border: 1px solid #900;
+ border-radius: 8px;
+ color: #FFF;
+ text-align: center;
+ vertical-align: middle;
+ font-size: 18px;
+ font-weight: bold;
+ font-family: "Times New Roman", Times, serif;
+ cursor: pointer;
+}
+.glmSelectItem {
+ padding: 5px;
+ margin: 0;
+ width: 150px;
+ border-left: 1px solid #e3e3e3;
+ cursor: pointer;
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ text-align: center;
+ font-weight: 600;
+ font-shadow: 0 1px #fff;
+ font-size: 0.85em;
+ background: #fcfcfc;
+ -webkit-background-clip: padding;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+}
+#GLMcheckout .glmNavItem, #GLMticketCart .glmNavItem {
+ width: 33.3333%
+}
+#GLMeventDates, #GLMvenueLocation, #GLMvenueDetail, #GLMvenueSectionMap {
+ margin: 0 0 15px 0
+}
+.glmPrompt {
+ font-weight: 600;
+ font-size: 1.1em
+}
+.glmTicketDescr {
+ font-size: 0.85em
+}
+.glmTicketAvailable {
+ margin: 5px 0;
+ font-weight: 600
+}
+.glmSectionTickets {
+ margin: 15px 0
+}
+.glmTicketName {
+ font-size: 1.35em;
+ font-weight: 600
+}
+.glmTicketDateInput {
+ width: 7em !important;
+ display: inline !important;
+}
+.glmTicketQuantInput {
+ width: 4em !important;
+ display: inline !important;
+}
+.glmTicketCcnameInput {
+ width: 32em !important;
+}
+.glmTicketCcInput {
+ width: 12em !important;
+}
+.glmSectionSelector {
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ cursor: pointer;
+ background-color: #f8f8f8;
+ padding: 8px 15px;
+ margin: 5px 0;
+ font-size: 1.15em;
+ font-weight: 600;
+ display: inline-block;
+ font-shadow: 0 1px #fff
+}
+.glmSectionSelector:active {
+ -webkit-box-shadow: inset 0 0 8px #dbdbdb;
+ -moz-box-shadow: inset 0 0 8px #dbdbdb;
+ box-shadow: inset 0 0 8px #dbdbdb
+}
+#GLMticketsSummary {
+ font-weight: 600;
+ font-size: 1.35em;
+ margin-top: 30px
+}
+.glmTicketsSelect {
+ clear: both;
+ margin: 1em;
+}
+.glmTicketsSelectPrompt {
+ font-size: 1em;
+ font-weight: 600;
+ line-height: 125%;
+ float: left;
+ padding-right: .2em;
+}
+.glmTicketsSelectValueWrapper {
+ float: right;
+ width: 150px;
+ text-align: right;
+}
+.glmTicketsSelectValue {
+ float: right;
+ width: 40%;
+ text-align: right;
+}
+#glmQuantSelector {
+ float: right;
+ text-align: right;
+ width: 100px;
+ height: 28px;
+}
+#GLMpolicy {
+ font-size: 0.85em;
+ font-style: italic;
+/* margin-bottom: 15px; */
+}
+.glmTicketPrice {
+ font-weight: 600;
+ margin: 15px 0 5px 0;
+ font-size: 1.25em
+}
+#GLMreason {
+ border: 1px solid #333;
+ padding: 1em;
+}
+.GLMreasonTitle {
+ color: red;
+}
+.GLMreasonList {
+}
+.GLMmapWindow {
+ width: 100%;
+ height: 140px;
+ border: 1px solid #CCC;
+}
+.glmDescr {
+}
+.glmCartFailedInput {
+ background: #FFaBa9;
+ padding: .2em;
+}
+.glmCartRequired {
+ color: red;
+}
+/* CHECKOUT STUFF */
+.glmCartFormLine {
+ clear: both;
+}
+.glmCartFormPrompt {
+ width: 30%;
+ float: left;
+ text-align: right;
+ font-weight: 600;
+ font-size: 1.1em;
+ padding-right: .5em;
+}
+.glmCartFormInput {
+ padding-left: 1em;
+ width: 70%;
+ float: left;
+ margin-bottom: .5em;
+}
+.glmCartFormInput span {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+}
+/* Forms */
+.glmCartForm {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ padding: 10px;
+ background: #F5F5F5;
+ margin: 0 0 10px 0;
+ font-size: 12px;
+ border: 1px solid #CCC;
+ color: #656565;
+}
+.glmCartForm input[type="text"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 300px;
+}
+.glmCartForm select {
+ display: block;
+ float: left;
+ clear: left;
+ width: 200px;
+}
+.glmCartPayment {
+ margin: 2em 0 0 0
+}
+.glmInput {
+ float: right;
+}
+/* Mobile */
+@media screen and (max-width:768px) {
+ .glmBlockContentRight {
+ float: left;
+ width: 100%;
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ }
+ .glmBlockContentLeft {
+ display: inline;
+ float: left;
+ width: 100%;
+ }
+ .glmBlockContentLeft div {
+ clear: none !important;
+ }
+ /* Mobile Forms */
+
+}
+/* Small Mobile */
+@media screen and (max-width:599px) {
+ .GLMmapWindow {
+ height: 130px;
+ }
+ .glmCartFormPrompt {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ text-align: left;
+ }
+ .glmCartFormInput {
+ margin-left: 0;
+ padding-left: 0;
+ }
+ #GLMpageTitle {
+ width: 50%;
+ }
+ .glmCartHeader {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+
+ margin-bottom: 20px;
+ }
+ .glmCartHeader .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartValues {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+ margin-bottom: 20px;
+ }
+ .glmCartValues .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals {
+ padding-left: 0;
+ padding-right: 0;
+ }
+ .glmCartTable.totals .glmCartHeader {
+ float: right;
+ width: 100%;
+ margin-bottom: 0;
+ }
+ .glmCartTable.totals .glmCartHeader .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 1px solid #CCC;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals .glmCartValues {
+ float: right;
+ width: 100%;
+ }
+ .glmCartTable.totals .glmCartValues .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmTicketsSelectValueWrapper {
+ float: left;
+ width: 150px;
+ clear: left;
+ margin-top: 10px;
+ }
+ .glmBlockLeft {
+ width: 100%;
+ }
+ .glmCartEventDescrMobile {
+ display: inline;
+ }
+ .glmCartEventDescr {
+ display: none;
+ }
+}
+/* MidSmall Mobile */
+@media screen and (max-width:449px) {
+ #GLMpageTitle {
+ font-size: 16px;
+ line-height: 20px;
+ }
+ .glmBlockName {
+ font-size: 14px;
+ line-height: 18px;
+ }
+ .glmCartFormInput {
+ width: 100%;
+ }
+ .glmCartForm input[type="text"] {
+ width: 100%;
+ }
+ .glmCartForm select {
+ width:100%;
+ }
+ .glmNavItemWide {
+ width: 100%;
+ }
+ .glmNavItem.add {
+ width: 100%;
+ text-align: center;
+ }
+ #GLMcheckoutBtn {
+ width: 100%;
+ text-align: center;
+ }
+
+}
+/* XSmall Mobile */
+@media screen and (max-width:399px) {
+ .glmNavItem.chooser {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin-top: 10px;
+ text-align: center;
+ }
+}
+
+#glmReloadBlocker {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color : transparent;
+ text-align: center;
+ z-index: 1000;
+}
+#glmReloadBlocker div {
+ height: auto;
+ width: 250px;
+ padding: 10px;
+ background: #eee;
+ position: fixed;
+ border-radius: 10px;
+ border: 2px solid #666;
+ color: red;
+ font-size: 1.1em;
+ line-height: 150%;
+
+ margin: -150px 0 0 -150px;
+ left: 55%;
+ top: 60%;
+
+ box-shadow: 10px 10px 5px #888888;
+}
+#glmDevelopmentNotice {
+ padding: 5px;
+ border: 1px solid black;
+ width: auto;
+ clear: both;
+ margin-top: 4em;
+}
--- /dev/null
+/*
+ * Event Management Front-End Area JAVAScript - TicketsFoundation interface
+ */
+
+var f_loadAction = false;
+var f_replaceContents = false;
+var duration = 0;
+
+// jQuery Section
+$(document).ready(function(){
+
+ /*
+ * Data Setup Section
+ */
+
+ var siteURL = flex_baseURL;
+ var appURL = flex_baseAppURL;
+
+ /*
+ * Load an action to a div with the specified id where id is also Action to be run
+ */
+ function loadAction(id, container, params) {
+
+ // Display loading message
+ $('#'+container).html('<div class="emBLock"><div class="emLoading">Loading, Please Wait...</div></div>');
+ $('#'+container).show(duration);
+
+ // Build the URL and call it with AJAX
+ url = appURL + "?Action=" + id;
+ if (params) {
+ url = url + '&' + params;
+ }
+ $.post( url,
+ '',
+ function(data) {
+ // Populate the container with the results
+ $('#'+container).html(data);
+ restartOnTabSelect();
+ }
+ );
+
+ }
+ f_loadAction = loadAction;
+
+ // Replace the contents of a div
+ function replaceContents(data, destination) {
+ destination.html(data);
+ }
+ f_replaceContents = replaceContents;
+
+ /*
+ * General Slider Operations
+ */
+
+ // Slider area actions
+ $('.glmSectionSelector').on('click', null, function() {
+
+ // Get the ID of the area to slide from the emSliderId="" parameter in the div tag.
+ var sliderId = $(this).attr('emSliderId');
+
+ // If the slider is currently open - close it, otherwise open it.
+ if ($('#'+sliderId).is(':visible')) {
+ $('#'+sliderId).hide(duration);
+ } else {
+ $('#'+sliderId).show(duration);
+ }
+ });
+ // Startup by closing all areas that are supposed to be closed by default
+ $('.glmSectionTickets').hide(duration);
+
+ /*
+ * Check for user timeout
+ */
+ var inactivityTime = 1800000; // Number of milliseconds to user timeout
+
+ // If theres no activity for 5 seconds do something
+ var activityTimeout = setTimeout(inActive, inactivityTime);
+
+ function resetActive(){
+ $(document.body).attr('class', 'active');
+ clearTimeout(activityTimeout);
+ activityTimeout = setTimeout(inActive, inactivityTime);
+ }
+
+ // No activity do something.
+ function inActive(){
+ alert("Your user session has timed out. Click OK to continue.");
+ window.location.href = siteURL;
+ }
+
+ // Check for mousemove, could add other events here such as checking for key presses ect.
+ $(document).bind('mousemove', function(){resetActive()});
+
+});
--- /dev/null
+/* Additional styles for Event Management front-end */
+#GLMHeader {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+ padding: 0;
+ border-bottom: 1px solid #CCC;
+}
+#GLMpageTitle {
+ color: #040267;
+ float: left;
+ font-family: "Lora","Times New Roman",Times,serif;
+ font-size: 20px;
+ line-height: 24px;
+ font-weight: normal;
+ margin: 0 0 10px;
+ padding: 0 0 5px 0;
+ width: 70%;
+ /*background: rgba(0,0,0,0.1);*/
+}
+#GLMpageIntro {
+ margin: 1em 0 1em 0;
+}
+#GLMpageIntro p{
+ font-size: 1rem;
+ font-family: "Open Sans", sans-serif;
+}
+.glmBold {
+ font-weight: 600;
+}
+.glmBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 5px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmBlockList {
+ margin-top: 10px;
+ clear: both;
+}
+.glmBlockHeader, .glmBlockHeadder {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+}
+.glmBlockName {
+ display: inline;
+ font-size: 24px;
+ line-height: 22px;
+ color: #043867;
+/* font-family: "Lora","Times New Roman",Times,serif;*/
+ font-family: "Open Sans", sans-serif;
+}
+.glmBlockName a{
+ font-size: 18px;
+ color: #043867;
+}
+.glmBlockRightCol {
+ float: right;
+}
+.glmBlockContent {
+ margin: 0 0 0em 0;
+ clear: both;
+ width: 100%;
+ font-family: "Open Sans", sans-serif;
+}
+.glmTicketQuant{
+ width: 45px;
+ height: 30px;
+}
+.glmTicketQuant option{
+ font-size: 15px;
+}
+@media (min-width: 768px){
+ .glmBlockContentRight img{
+ float: right;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent{
+ clear: none;
+ /* width: 10%;*/
+ /* float: left;*/
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent .glmTicketsSelectValue{
+ width: 10%;
+ margin-right: 10px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmTicketsSelectPrompt{
+ /* float: left;*/
+ padding: 0;
+ margin-right: 3px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmTicketsSelectValue{
+ width: 20%;
+ float: left;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmInput{
+ /* float: left;*/
+ }
+ .glmBlock:not(:first-child) .glmBlockContentLeft {
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 33%;
+ overflow: hidden;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight{
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 64%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 1%;
+ min-width: 120px;
+ }
+ .glmBlock .glmBlockContentLeft.startContent, .glmCartBlock .glmBlockContentLeft.cartContent{
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 50%;
+ overflow: hidden;
+ }
+ .glmBlock .glmBlockContentRight.startImage, .glmCartBlock .glmBlockContentRight.cartImage{
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 45%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 18% !important;
+ }
+}
+@media (min-width: 992px){
+ div[class^="GLMeventDateSelect"]{
+
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent .glmTicketsSelectValue{
+ width: 8%;
+ margin-right: 10px;
+ }
+
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 14% !important;
+ }
+
+ .glmBlock:not(:first-child) .glmBlockContentLeft:not(.startContent) {
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 35%;
+ overflow: hidden;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight:not(.startImage) {
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 60%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+ }
+}
+@media (min-width: 1200px){
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 12% !important;
+ }
+}
+.glmBlockContent p{
+ font-family: "Open Sans", sans-serif;
+}
+.glmBlockContentLeft {
+ display: block;
+ float: left;
+ width:70%;
+ overflow: hidden;
+}
+.glmBlockContentRight {
+ display: block;
+ float: right;
+ width: 20%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+}
+.glmBlockContentIndent {
+ display: block;
+ margin-left: 3em;
+}
+.glmSection {
+}
+.glmSection .glmSectionName {
+}
+.glmSection .glmSectionBold {
+ font-size: 1.1em;
+ font-weight: 600;
+}
+.glmSectionName {
+ font-size: 1.1em;
+ font-weight: 600;
+ margin: 1em 0 0 0;
+}
+#GLMeventDescr, #GLMvenueDescr, .glmCartVenueDescr, .glmCartEventDescr {
+ font-size: 0.8em;
+ margin: 0 0 2.2em 0
+}
+.glmCartEventDescrMobile {
+ display: none;
+}
+.glmCartVenueDescr, .glmCartEventDescr:not(.promoDescr) {
+ margin: 0 0 15px 0;
+/* visibility: hidden;*/
+ display: none;
+}
+
+.glmCartEvents {
+}
+.glmCartEvent {
+}
+.glmCartSelect {
+ width: 4em;
+}
+a.glmNavItem{
+ margin-bottom: 10px;
+}
+.glmCartEventTitle {
+ font-size: 20px;
+ line-height: 22px;
+/* font-family: "Lora","Times New Roman",Times,serif;*/
+ font-family: "Open Sans", sans-serif;
+ color: #043867;
+ margin-bottom: 5px;
+}
+.glmCartEventInfo {
+ margin-top: .5em;
+ clear: both;
+}
+.glmCartEventInfoLeft {
+ float: left;
+ padding-right: 100px;
+}
+.glmCartHeader {
+ font-size: 1.1em;
+ font-weight: 600;
+ clear: both;
+}
+.glmCartHeader .glmCartText {
+ font-weight: bold;
+ border-bottom: 1px solid #CCC;
+}
+.glmCartValues {
+ clear: both;
+}
+.glmCartTable {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartTable.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px 0 10px 20px;
+ border: 0;
+ background: none;
+}
+.glmCartTable.sub {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.glmCartNumb {
+ width: 20%;
+ float: left;
+ align: right;
+}
+.glmCartText {
+ display: block;
+ width: 17%;
+ margin-right: 3%;
+ float: left;
+ padding: 2px 0 0 0;
+}
+
+.glmGrandTotals {
+ float: right;
+ color: #900;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+
+.glmCartTable.totals .glmCartText {
+ display: block;
+ width: 30%;
+ margin-right: 3%;
+ float: right;
+ padding: 2px 0 0 0;
+}
+.glmCartTable.totals .glmCartHeader .glmCartText {
+ color: #900;
+}
+.glmCartTable.totals .glmCartText.grand {
+ margin-right: 0;
+ padding-right: 0;
+}
+.glmCartTotal {
+ width: 30%;
+ float: left;
+}
+.glmCartWide {
+ width: 40%;
+ float: left;
+}
+.glmCartBlock.totals .glmCartWide {
+ width: 100%;
+ padding-top: 10px;
+}
+.glmCartTotal {
+ width:20%;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+.glmCartSubTotals {
+ margin-top: 10px;
+ clear: both;
+}
+.glmCartSubTotals .glmCartTable {
+ background: none;
+ border: 0;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ height: auto;
+ text-align: left;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: left;
+}
+.glmCartTotals {
+ margin-top: 10px;
+}
+.glmCartBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 1em 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartBlock.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 0;
+ border: 0;
+ background: none;
+}
+.glmCartBlockTitle {
+ font-size: 22px;
+ line-height: 28px;
+ font-family: "Lora","Times New Roman",Times,serif;
+ margin: 0 0 0 0;
+}
+.glmCartBlockSmallTitle {
+ font-size: 16px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmCartBlock input[type="textarea"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.glmEventDateInput {
+ width: 80px;
+}
+.glmCartBlock.totals .glmCartBlockTitle {
+ border-bottom: 1px solid #CCC;
+}
+.glmCartBlockSubTitle {
+ margin-top: 1em;
+ font-size: 1.1em;
+ font-weight: 600;
+ margin-bottom: .5em;
+}
+.glmCartBlockSubTitleValue {
+
+}
+.glmCartBlockText {
+}
+.glmCartBlockDates {
+ clear: both;
+}
+.glmCartBlockDate {
+ margin-top: .5em;
+}
+.glmSpecialRequests {
+ margin: 0 0 3em 0;
+}
+#GLMcontent {
+ padding: 0;
+ margin: 0 auto
+}
+#GLMcontent>* {
+/* padding: 0 15px; */
+}
+#GLMevent, #GLMtickets, #GLMvenue {
+ /* max-width: 500px; */
+ margin: 0 auto 1em auto
+}
+#GLMnavigation:after {
+ content: "";
+ display: table;
+ clear: both
+}
+.glmNavItemInactive {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #ddd;
+ border: 1px solid #aaa;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+ text-align: center;
+}
+.glmNavItem {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #cc6535;
+ border: 1px solid #cc6535;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+}
+a.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+div.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+.glmNavItem.cart {
+ background: #043867;
+ border: 1px solid #043867;
+}
+#category h1{
+ font-size: 24px;
+ color: #3a8bb6;
+ font-family: "Open Sans", sans-serif;
+
+}
+.glmNavItemWide {
+ display: block;
+ width: 400px;
+ overflow: hidden;
+ margin: 12px 0 0 0;
+ padding: 8px 0;
+ background: #900;
+ border: 1px solid #900;
+ border-radius: 8px;
+ color: #FFF;
+ text-align: center;
+ vertical-align: middle;
+ font-size: 18px;
+ font-weight: bold;
+ font-family: "Times New Roman", Times, serif;
+ cursor: pointer;
+}
+.glmSelectItem {
+ padding: 5px;
+ margin: 0;
+ width: 150px;
+ border-left: 1px solid #e3e3e3;
+ cursor: pointer;
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ text-align: center;
+ font-weight: 600;
+ font-shadow: 0 1px #fff;
+ font-size: 0.85em;
+ background: #fcfcfc;
+ -webkit-background-clip: padding;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+}
+#GLMcheckout .glmNavItem, #GLMticketCart .glmNavItem {
+ width: 33.3333%
+}
+#GLMeventDates, #GLMvenueLocation, #GLMvenueDetail, #GLMvenueSectionMap {
+ margin: 0 0 15px 0
+}
+.glmPrompt {
+ font-weight: 600;
+ font-size: 1.1em
+}
+.glmTicketDescr {
+ font-size: 0.85em
+}
+.glmTicketAvailable {
+ margin: 5px 0;
+ font-weight: 600
+}
+.glmSectionTickets {
+ margin: 15px 0
+}
+.glmTicketName {
+ font-size: 1.35em;
+ font-weight: 600
+}
+.glmSectionSelector {
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ cursor: pointer;
+ background-color: #f8f8f8;
+ padding: 8px 15px;
+ margin: 5px 0;
+ font-size: 1.15em;
+ font-weight: 600;
+ display: inline-block;
+ font-shadow: 0 1px #fff
+}
+.glmSectionSelector:active {
+ -webkit-box-shadow: inset 0 0 8px #dbdbdb;
+ -moz-box-shadow: inset 0 0 8px #dbdbdb;
+ box-shadow: inset 0 0 8px #dbdbdb
+}
+#GLMticketsSummary {
+ font-weight: 600;
+ font-size: 1.35em;
+ margin-top: 30px
+}
+.glmTicketsSelect {
+ clear: both;
+ margin: 1em;
+}
+.glmTicketsSelectPrompt {
+ font-size: 1em;
+ font-weight: 600;
+ line-height: 125%;
+ float: left;
+ padding-right: .2em;
+}
+.glmTicketsSelectValueWrapper {
+ float: right;
+ width: 150px;
+ text-align: right;
+}
+.glmTicketsSelectValue {
+ float: right;
+ width: 40%;
+ text-align: right;
+}
+#glmQuantSelector {
+ float: right;
+ text-align: right;
+ width: 100px;
+ height: 28px;
+}
+#GLMpolicy {
+ font-size: 0.85em;
+ font-style: italic;
+/* margin-bottom: 15px; */
+}
+.glmTicketPrice {
+ font-weight: 600;
+ margin: 15px 0 5px 0;
+ font-size: 1.25em
+}
+#GLMreason {
+ border: 1px solid #333;
+ padding: 1em;
+}
+.GLMreasonTitle {
+ color: red;
+}
+.GLMreasonList {
+}
+.GLMmapWindow {
+ width: 100%;
+ height: 140px;
+ border: 1px solid #CCC;
+}
+.glmDescr {
+ font-family: "Open Sans", sans-serif;
+ line-height: 1.3;
+}
+.glmCartFailedInput {
+ background: #FFaBa9;
+ padding: .2em;
+}
+.glmCartRequired {
+ color: red;
+}
+/* CHECKOUT STUFF */
+.glmCartFormLine {
+ clear: both;
+}
+.glmCartFormPrompt {
+ width: 30%;
+ float: left;
+ text-align: right;
+ font-weight: 600;
+ font-size: 1.1em;
+ padding-right: .5em;
+}
+.glmCartFormInput {
+ padding-left: 1em;
+ width: 70%;
+ float: left;
+ margin-bottom: .5em;
+}
+.glmCartFormInput span {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+}
+/* Forms */
+.glmCartForm {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ padding: 10px;
+ background: #F5F5F5;
+ margin: 0 0 10px 0;
+ font-size: 12px;
+ border: 1px solid #CCC;
+ color: #656565;
+}
+.glmCartForm input[type="text"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 300px;
+}
+.glmCartForm select {
+ display: block;
+ float: left;
+ clear: left;
+ width: 200px;
+}
+.glmCartPayment {
+ margin: 2em 0 0 0
+}
+.glmInput {
+ float: right;
+}
+/* Mobile */
+@media screen and (max-width:768px) {
+ .glmBlockContentRight {
+ float: left;
+ width: 100%;
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ }
+ .glmBlockContentRight img{
+ max-width: 100%;
+ }
+ .glmBlockContentLeft {
+ display: inline;
+ float: left;
+ width: 100%;
+ }
+ .glmBlockContentLeft div {
+ clear: none !important;
+ }
+ /* Mobile Forms */
+
+}
+/* Small Mobile */
+@media screen and (max-width:599px) {
+ .GLMmapWindow {
+ height: 130px;
+ }
+ .glmCartFormPrompt {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ text-align: left;
+ }
+ .glmCartFormInput {
+ margin-left: 0;
+ padding-left: 0;
+ }
+ #GLMpageTitle {
+ width: 50%;
+ }
+ .glmCartHeader {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+
+ margin-bottom: 20px;
+ }
+ .glmCartHeader .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartValues {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+ margin-bottom: 20px;
+ }
+ .glmCartValues .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals {
+ padding-left: 0;
+ padding-right: 0;
+ }
+ .glmCartTable.totals .glmCartHeader {
+ float: right;
+ width: 100%;
+ margin-bottom: 0;
+ }
+ .glmCartTable.totals .glmCartHeader .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 1px solid #CCC;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals .glmCartValues {
+ float: right;
+ width: 100%;
+ }
+ .glmCartTable.totals .glmCartValues .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmTicketsSelectValueWrapper {
+ float: left;
+ width: 150px;
+ clear: left;
+ margin-top: 10px;
+ }
+ .glmBlockLeft {
+ width: 100%;
+ }
+ .glmCartEventDescrMobile {
+ display: inline;
+ }
+ .glmCartEventDescr {
+ display: none;
+ }
+}
+/* MidSmall Mobile */
+@media screen and (max-width:449px) {
+ #GLMpageTitle {
+ font-size: 16px;
+ line-height: 20px;
+ }
+ .glmBlockName {
+ font-size: 16px;
+ line-height: 18px;
+ }
+ .glmCartFormInput {
+ width: 100%;
+ }
+ .glmCartForm input[type="text"] {
+ width: 100%;
+ }
+ .glmCartForm select {
+ width:100%;
+ }
+ .glmNavItemWide {
+ width: 100%;
+ }
+ .glmNavItem.add {
+ width: 100%;
+ text-align: center;
+ }
+ #GLMcheckoutBtn {
+ width: 100%;
+ text-align: center;
+ }
+
+}
+/* XSmall Mobile */
+@media screen and (max-width:399px) {
+ .glmNavItem.chooser {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin-top: 10px;
+ text-align: center;
+ }
+}
+
+#glmReloadBlocker {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color : transparent;
+ text-align: center;
+ z-index: 1000;
+}
+#glmReloadBlocker div {
+ height: auto;
+ width: 300px;
+ padding: 10px;
+ background: #eee;
+ position: fixed;
+ border-radius: 10px;
+ border: 2px solid #666;
+ color: red;
+ font-size: 1.3em;
+ line-height: 150%;
+
+ margin: -150px 0 0 -150px;
+ left: 50%;
+ top: 60%;
+
+ box-shadow: 10px 10px 5px #888888;
+}
+#glmDevelopmentNotice {
+ padding: 5px;
+ border: 1px solid black;
+ width: auto;
+ clear: both;
+ margin-top: 4em;
+}
--- /dev/null
+/*
+ * Event Management Front-End Area JAVAScript - Tickets interface
+ */
+
+var f_loadAction = false;
+var f_replaceContents = false;
+var duration = 0;
+
+// jQuery Section
+$(document).ready(function(){
+
+ /*
+ * Data Setup Section
+ */
+
+ var siteURL = baseSiteURL;
+ var appURL = baseAppURL;
+
+ /*
+ * Load an action to a div with the specified id where id is also Action to be run
+ */
+ function loadAction(id, container, params) {
+
+ // Display loading message
+ $('#'+container).html('<div class="emBLock"><div class="emLoading">Loading, Please Wait...</div></div>');
+ $('#'+container).show(duration);
+
+ // Build the URL and call it with AJAX
+ url = appURL + "?Action=" + id;
+ if (params) {
+ url = url + '&' + params;
+ }
+ $.post( url,
+ '',
+ function(data) {
+ // Populate the container with the results
+ $('#'+container).html(data);
+ restartOnTabSelect();
+ }
+ );
+
+ }
+ f_loadAction = loadAction;
+
+ // Replace the contents of a div
+ function replaceContents(data, destination) {
+ destination.html(data);
+ }
+ f_replaceContents = replaceContents;
+
+ /*
+ * General Slider Operations
+ */
+
+ // Slider area actions
+ $('.glmSectionSelector').on('click', null, function() {
+
+ // Get the ID of the area to slide from the emSliderId="" parameter in the div tag.
+ var sliderId = $(this).attr('emSliderId');
+
+ // If the slider is currently open - close it, otherwise open it.
+ if ($('#'+sliderId).is(':visible')) {
+ $('#'+sliderId).hide(duration);
+ } else {
+ $('#'+sliderId).show(duration);
+ }
+ });
+ // Startup by closing all areas that are supposed to be closed by default
+ $('.glmSectionTickets').hide(duration);
+
+ /*
+ * Check for user timeout
+ */
+ var inactivityTime = 1800000; // Number of milliseconds to user timeout
+
+ // If theres no activity for 5 seconds do something
+ var activityTimeout = setTimeout(inActive, inactivityTime);
+
+ function resetActive(){
+ $(document.body).attr('class', 'active');
+ clearTimeout(activityTimeout);
+ activityTimeout = setTimeout(inActive, inactivityTime);
+ }
+
+ // No activity do something.
+ function inActive(){
+ alert("Your user session has timed out. Click OK to continue.");
+ window.location.href = siteURL;
+ }
+
+ // Check for mousemove, could add other events here such as checking for key presses ect.
+ $(document).bind('mousemove', function(){resetActive()});
+
+// var use_any_time = "Use any time of day,";
+// var glmDescr = $('.glmDescr').children('p');
+// var selectBtn = $('#GLMselectButton');
+// var shopBtn = $('.glmNavItem:nth-child(2)');
+//
+// shopBtn.html("Purchase Tickets");
+// selectBtn.html("Add to Cart");
+//
+// $.each(glmDescr, function(){
+// var text = $(this).text().replace(use_any_time, '');
+// $(this).text(text);
+// });
+
+});
--- /dev/null
+/* Additional styles for Event Management front-end */
+#GLMHeader {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+ padding: 0;
+ border-bottom: 1px solid #CCC;
+}
+#GLMpageTitle {
+ color: #040267;
+ float: left;
+ font-family: "Lora","Times New Roman",Times,serif;
+ font-size: 20px;
+ line-height: 24px;
+ font-weight: normal;
+ margin: 0 0 10px;
+ padding: 0 0 5px 0;
+ width: 70%;
+ /*background: rgba(0,0,0,0.1);*/
+}
+#GLMpageIntro {
+ margin: 1em 0 1em 0;
+}
+#GLMpageIntro p{
+ font-size: 1rem;
+ font-family: "Open Sans", sans-serif;
+}
+.glmBold {
+ font-weight: 600;
+}
+.glmBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 5px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmBlockList {
+ margin-top: 10px;
+ clear: both;
+}
+.glmBlockHeader, .glmBlockHeadder {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+}
+.glmBlockName {
+ display: inline;
+ font-size: 24px;
+ line-height: 22px;
+ color: #043867;
+/* font-family: "Lora","Times New Roman",Times,serif;*/
+ font-family: "Open Sans", sans-serif;
+}
+.glmBlockName a{
+ font-size: 18px;
+ color: #043867;
+}
+.glmBlockRightCol {
+ float: right;
+}
+.glmBlockContent {
+ margin: 0 0 0em 0;
+ clear: both;
+ width: 100%;
+ font-family: "Open Sans", sans-serif;
+}
+.glmTicketQuant{
+ width: 45px;
+ height: 30px;
+}
+.glmTicketQuant option{
+ font-size: 15px;
+}
+@media (min-width: 768px){
+ .glmBlockContentRight img{
+ float: right;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent{
+ clear: none;
+ /* width: 10%;*/
+ /* float: left;*/
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent .glmTicketsSelectValue{
+ width: 10%;
+ margin-right: 10px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmTicketsSelectPrompt{
+ /* float: left;*/
+ padding: 0;
+ margin-right: 3px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmTicketsSelectValue{
+ width: 20%;
+ float: left;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmInput{
+ /* float: left;*/
+ }
+ .glmBlock:not(:first-child) .glmBlockContentLeft {
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 33%;
+ overflow: hidden;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight{
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 64%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 1%;
+ min-width: 120px;
+ }
+ .glmBlock .glmBlockContentLeft.startContent, .glmCartBlock .glmBlockContentLeft.cartContent{
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 50%;
+ overflow: hidden;
+ }
+ .glmBlock .glmBlockContentRight.startImage, .glmCartBlock .glmBlockContentRight.cartImage{
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 45%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 18% !important;
+ }
+}
+@media (min-width: 992px){
+ div[class^="GLMeventDateSelect"]{
+
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent .glmTicketsSelectValue{
+ width: 8%;
+ margin-right: 10px;
+ }
+
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 14% !important;
+ }
+
+ .glmBlock:not(:first-child) .glmBlockContentLeft:not(.startContent) {
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 35%;
+ overflow: hidden;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight:not(.startImage) {
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 60%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+ }
+}
+@media (min-width: 1200px){
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 12% !important;
+ }
+}
+.glmBlockContent p{
+ font-family: "Open Sans", sans-serif;
+}
+.glmBlockContentLeft {
+ display: block;
+ float: left;
+ width:70%;
+ overflow: hidden;
+}
+.glmBlockContentRight {
+ display: block;
+ float: right;
+ width: 20%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+}
+.glmBlockContentIndent {
+ display: block;
+ margin-left: 3em;
+}
+.glmSection {
+}
+.glmSection .glmSectionName {
+}
+.glmSection .glmSectionBold {
+ font-size: 1.1em;
+ font-weight: 600;
+}
+.glmSectionName {
+ font-size: 1.1em;
+ font-weight: 600;
+ margin: 1em 0 0 0;
+}
+#GLMeventDescr, #GLMvenueDescr, .glmCartVenueDescr, .glmCartEventDescr {
+ font-size: 0.8em;
+ margin: 0 0 2.2em 0
+}
+.glmCartEventDescrMobile {
+ display: none;
+}
+.glmCartVenueDescr, .glmCartEventDescr:not(.promoDescr) {
+ margin: 0 0 15px 0;
+/* visibility: hidden;*/
+ display: none;
+}
+
+.glmCartEvents {
+}
+.glmCartEvent {
+}
+.glmCartSelect {
+ width: 4em;
+}
+a.glmNavItem{
+ margin-bottom: 10px;
+}
+.glmCartEventTitle {
+ font-size: 20px;
+ line-height: 22px;
+/* font-family: "Lora","Times New Roman",Times,serif;*/
+ font-family: "Open Sans", sans-serif;
+ color: #043867;
+ margin-bottom: 5px;
+}
+.glmCartEventInfo {
+ margin-top: .5em;
+ clear: both;
+}
+.glmCartEventInfoLeft {
+ float: left;
+ padding-right: 100px;
+}
+.glmCartHeader {
+ font-size: 1.1em;
+ font-weight: 600;
+ clear: both;
+}
+.glmCartHeader .glmCartText {
+ font-weight: bold;
+ border-bottom: 1px solid #CCC;
+}
+.glmCartValues {
+ clear: both;
+}
+.glmCartTable {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartTable.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px 0 10px 20px;
+ border: 0;
+ background: none;
+}
+.glmCartTable.sub {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.glmCartNumb {
+ width: 20%;
+ float: left;
+ align: right;
+}
+.glmCartText {
+ display: block;
+ width: 17%;
+ margin-right: 3%;
+ float: left;
+ padding: 2px 0 0 0;
+}
+
+.glmGrandTotals {
+ float: right;
+ color: #900;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+
+.glmCartTable.totals .glmCartText {
+ display: block;
+ width: 30%;
+ margin-right: 3%;
+ float: right;
+ padding: 2px 0 0 0;
+}
+.glmCartTable.totals .glmCartHeader .glmCartText {
+ color: #900;
+}
+.glmCartTable.totals .glmCartText.grand {
+ margin-right: 0;
+ padding-right: 0;
+}
+.glmCartTotal {
+ width: 30%;
+ float: left;
+}
+.glmCartWide {
+ width: 40%;
+ float: left;
+}
+.glmCartBlock.totals .glmCartWide {
+ width: 100%;
+ padding-top: 10px;
+}
+.glmCartTotal {
+ width:20%;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+.glmCartSubTotals {
+ margin-top: 10px;
+ clear: both;
+}
+.glmCartSubTotals .glmCartTable {
+ background: none;
+ border: 0;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ height: auto;
+ text-align: left;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: left;
+}
+.glmCartTotals {
+ margin-top: 10px;
+}
+.glmCartBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 1em 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartBlock.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 0;
+ border: 0;
+ background: none;
+}
+.glmCartBlockTitle {
+ font-size: 22px;
+ line-height: 28px;
+ font-family: "Lora","Times New Roman",Times,serif;
+ margin: 0 0 0 0;
+}
+.glmCartBlockSmallTitle {
+ font-size: 16px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmCartBlock input[type="textarea"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.glmEventDateInput {
+ width: 80px;
+}
+.glmCartBlock.totals .glmCartBlockTitle {
+ border-bottom: 1px solid #CCC;
+}
+.glmCartBlockSubTitle {
+ margin-top: 1em;
+ font-size: 1.1em;
+ font-weight: 600;
+ margin-bottom: .5em;
+}
+.glmCartBlockSubTitleValue {
+
+}
+.glmCartBlockText {
+}
+.glmCartBlockDates {
+ clear: both;
+}
+.glmCartBlockDate {
+ margin-top: .5em;
+}
+.glmSpecialRequests {
+ margin: 0 0 3em 0;
+}
+#GLMcontent {
+ padding: 0;
+ margin: 0 auto
+}
+#GLMcontent>* {
+/* padding: 0 15px; */
+}
+#GLMevent, #GLMtickets, #GLMvenue {
+ /* max-width: 500px; */
+ margin: 0 auto 1em auto
+}
+#GLMnavigation:after {
+ content: "";
+ display: table;
+ clear: both
+}
+.glmNavItemInactive {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #ddd;
+ border: 1px solid #aaa;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+ text-align: center;
+}
+.glmNavItem {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #cc6535;
+ border: 1px solid #cc6535;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+}
+a.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+div.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+.glmNavItem.cart {
+ background: #043867;
+ border: 1px solid #043867;
+}
+#category h1{
+ font-size: 24px;
+ color: #3a8bb6;
+ font-family: "Open Sans", sans-serif;
+
+}
+.glmNavItemWide {
+ display: block;
+ width: 400px;
+ overflow: hidden;
+ margin: 12px 0 0 0;
+ padding: 8px 0;
+ background: #900;
+ border: 1px solid #900;
+ border-radius: 8px;
+ color: #FFF;
+ text-align: center;
+ vertical-align: middle;
+ font-size: 18px;
+ font-weight: bold;
+ font-family: "Times New Roman", Times, serif;
+ cursor: pointer;
+}
+.glmSelectItem {
+ padding: 5px;
+ margin: 0;
+ width: 150px;
+ border-left: 1px solid #e3e3e3;
+ cursor: pointer;
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ text-align: center;
+ font-weight: 600;
+ font-shadow: 0 1px #fff;
+ font-size: 0.85em;
+ background: #fcfcfc;
+ -webkit-background-clip: padding;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+}
+#GLMcheckout .glmNavItem, #GLMticketCart .glmNavItem {
+ width: 33.3333%
+}
+#GLMeventDates, #GLMvenueLocation, #GLMvenueDetail, #GLMvenueSectionMap {
+ margin: 0 0 15px 0
+}
+.glmPrompt {
+ font-weight: 600;
+ font-size: 1.1em
+}
+.glmTicketDescr {
+ font-size: 0.85em
+}
+.glmTicketAvailable {
+ margin: 5px 0;
+ font-weight: 600
+}
+.glmSectionTickets {
+ margin: 15px 0
+}
+.glmTicketName {
+ font-size: 1.35em;
+ font-weight: 600
+}
+.glmSectionSelector {
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ cursor: pointer;
+ background-color: #f8f8f8;
+ padding: 8px 15px;
+ margin: 5px 0;
+ font-size: 1.15em;
+ font-weight: 600;
+ display: inline-block;
+ font-shadow: 0 1px #fff
+}
+.glmSectionSelector:active {
+ -webkit-box-shadow: inset 0 0 8px #dbdbdb;
+ -moz-box-shadow: inset 0 0 8px #dbdbdb;
+ box-shadow: inset 0 0 8px #dbdbdb
+}
+#GLMticketsSummary {
+ font-weight: 600;
+ font-size: 1.35em;
+ margin-top: 30px
+}
+.glmTicketsSelect {
+ clear: both;
+ margin: 1em;
+}
+.glmTicketsSelectPrompt {
+ font-size: 1em;
+ font-weight: 600;
+ line-height: 125%;
+ float: left;
+ padding-right: .2em;
+}
+.glmTicketsSelectValueWrapper {
+ float: right;
+ width: 150px;
+ text-align: right;
+}
+.glmTicketsSelectValue {
+ float: right;
+ width: 40%;
+ text-align: right;
+}
+#glmQuantSelector {
+ float: right;
+ text-align: right;
+ width: 100px;
+ height: 28px;
+}
+#GLMpolicy {
+ font-size: 0.85em;
+ font-style: italic;
+/* margin-bottom: 15px; */
+}
+.glmTicketPrice {
+ font-weight: 600;
+ margin: 15px 0 5px 0;
+ font-size: 1.25em
+}
+#GLMreason {
+ border: 1px solid #333;
+ padding: 1em;
+}
+.GLMreasonTitle {
+ color: red;
+}
+.GLMreasonList {
+}
+.GLMmapWindow {
+ width: 100%;
+ height: 140px;
+ border: 1px solid #CCC;
+}
+.glmDescr {
+ font-family: "Open Sans", sans-serif;
+ line-height: 1.3;
+}
+.glmCartFailedInput {
+ background: #FFaBa9;
+ padding: .2em;
+}
+.glmCartRequired {
+ color: red;
+}
+/* CHECKOUT STUFF */
+.glmCartFormLine {
+ clear: both;
+}
+.glmCartFormPrompt {
+ width: 30%;
+ float: left;
+ text-align: right;
+ font-weight: 600;
+ font-size: 1.1em;
+ padding-right: .5em;
+}
+.glmCartFormInput {
+ padding-left: 1em;
+ width: 70%;
+ float: left;
+ margin-bottom: .5em;
+}
+.glmCartFormInput span {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+}
+/* Forms */
+.glmCartForm {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ padding: 10px;
+ background: #F5F5F5;
+ margin: 0 0 10px 0;
+ font-size: 12px;
+ border: 1px solid #CCC;
+ color: #656565;
+}
+.glmCartForm input[type="text"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 300px;
+}
+.glmCartForm select {
+ display: block;
+ float: left;
+ clear: left;
+ width: 200px;
+}
+.glmCartPayment {
+ margin: 2em 0 0 0
+}
+.glmInput {
+ float: right;
+}
+/* Mobile */
+@media screen and (max-width:768px) {
+ .glmBlockContentRight {
+ float: left;
+ width: 100%;
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ }
+ .glmBlockContentRight img{
+ max-width: 100%;
+ }
+ .glmBlockContentLeft {
+ display: inline;
+ float: left;
+ width: 100%;
+ }
+ .glmBlockContentLeft div {
+ clear: none !important;
+ }
+ /* Mobile Forms */
+
+}
+/* Small Mobile */
+@media screen and (max-width:599px) {
+ .GLMmapWindow {
+ height: 130px;
+ }
+ .glmCartFormPrompt {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ text-align: left;
+ }
+ .glmCartFormInput {
+ margin-left: 0;
+ padding-left: 0;
+ }
+ #GLMpageTitle {
+ width: 50%;
+ }
+ .glmCartHeader {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+
+ margin-bottom: 20px;
+ }
+ .glmCartHeader .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartValues {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+ margin-bottom: 20px;
+ }
+ .glmCartValues .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals {
+ padding-left: 0;
+ padding-right: 0;
+ }
+ .glmCartTable.totals .glmCartHeader {
+ float: right;
+ width: 100%;
+ margin-bottom: 0;
+ }
+ .glmCartTable.totals .glmCartHeader .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 1px solid #CCC;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals .glmCartValues {
+ float: right;
+ width: 100%;
+ }
+ .glmCartTable.totals .glmCartValues .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmTicketsSelectValueWrapper {
+ float: left;
+ width: 150px;
+ clear: left;
+ margin-top: 10px;
+ }
+ .glmBlockLeft {
+ width: 100%;
+ }
+ .glmCartEventDescrMobile {
+ display: inline;
+ }
+ .glmCartEventDescr {
+ display: none;
+ }
+}
+/* MidSmall Mobile */
+@media screen and (max-width:449px) {
+ #GLMpageTitle {
+ font-size: 16px;
+ line-height: 20px;
+ }
+ .glmBlockName {
+ font-size: 16px;
+ line-height: 18px;
+ }
+ .glmCartFormInput {
+ width: 100%;
+ }
+ .glmCartForm input[type="text"] {
+ width: 100%;
+ }
+ .glmCartForm select {
+ width:100%;
+ }
+ .glmNavItemWide {
+ width: 100%;
+ }
+ .glmNavItem.add {
+ width: 100%;
+ text-align: center;
+ }
+ #GLMcheckoutBtn {
+ width: 100%;
+ text-align: center;
+ }
+
+}
+/* XSmall Mobile */
+@media screen and (max-width:399px) {
+ .glmNavItem.chooser {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin-top: 10px;
+ text-align: center;
+ }
+}
+
+#glmReloadBlocker {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color : transparent;
+ text-align: center;
+ z-index: 1000;
+}
+#glmReloadBlocker div {
+ height: auto;
+ width: 300px;
+ padding: 10px;
+ background: #eee;
+ position: fixed;
+ border-radius: 10px;
+ border: 2px solid #666;
+ color: red;
+ font-size: 1.3em;
+ line-height: 150%;
+
+ margin: -150px 0 0 -150px;
+ left: 50%;
+ top: 60%;
+
+ box-shadow: 10px 10px 5px #888888;
+}
+#glmDevelopmentNotice {
+ padding: 5px;
+ border: 1px solid black;
+ width: auto;
+ clear: both;
+ margin-top: 4em;
+}
--- /dev/null
+/*
+ * Event Management Front-End Area JAVAScript - Tickets interface
+ */
+
+var f_loadAction = false;
+var f_replaceContents = false;
+var duration = 0;
+
+// jQuery Section
+$(document).ready(function(){
+
+ /*
+ * Data Setup Section
+ */
+
+ var siteURL = baseSiteURL;
+ var appURL = baseAppURL;
+
+ /*
+ * Load an action to a div with the specified id where id is also Action to be run
+ */
+ function loadAction(id, container, params) {
+
+ // Display loading message
+ $('#'+container).html('<div class="emBLock"><div class="emLoading">Loading, Please Wait...</div></div>');
+ $('#'+container).show(duration);
+
+ // Build the URL and call it with AJAX
+ url = appURL + "?Action=" + id;
+ if (params) {
+ url = url + '&' + params;
+ }
+ $.post( url,
+ '',
+ function(data) {
+ // Populate the container with the results
+ $('#'+container).html(data);
+ restartOnTabSelect();
+ }
+ );
+
+ }
+ f_loadAction = loadAction;
+
+ // Replace the contents of a div
+ function replaceContents(data, destination) {
+ destination.html(data);
+ }
+ f_replaceContents = replaceContents;
+
+ /*
+ * General Slider Operations
+ */
+
+ // Slider area actions
+ $('.glmSectionSelector').on('click', null, function() {
+
+ // Get the ID of the area to slide from the emSliderId="" parameter in the div tag.
+ var sliderId = $(this).attr('emSliderId');
+
+ // If the slider is currently open - close it, otherwise open it.
+ if ($('#'+sliderId).is(':visible')) {
+ $('#'+sliderId).hide(duration);
+ } else {
+ $('#'+sliderId).show(duration);
+ }
+ });
+ // Startup by closing all areas that are supposed to be closed by default
+ $('.glmSectionTickets').hide(duration);
+
+ /*
+ * Check for user timeout
+ */
+ var inactivityTime = 1800000; // Number of milliseconds to user timeout
+
+ // If theres no activity for 5 seconds do something
+ var activityTimeout = setTimeout(inActive, inactivityTime);
+
+ function resetActive(){
+ $(document.body).attr('class', 'active');
+ clearTimeout(activityTimeout);
+ activityTimeout = setTimeout(inActive, inactivityTime);
+ }
+
+ // No activity do something.
+ function inActive(){
+ alert("Your user session has timed out. Click OK to continue.");
+ window.location.href = siteURL;
+ }
+
+ // Check for mousemove, could add other events here such as checking for key presses ect.
+ $(document).bind('mousemove', function(){resetActive()});
+
+// var use_any_time = "Use any time of day,";
+// var glmDescr = $('.glmDescr').children('p');
+// var selectBtn = $('#GLMselectButton');
+// var shopBtn = $('.glmNavItem:nth-child(2)');
+//
+// shopBtn.html("Purchase Tickets");
+// selectBtn.html("Add to Cart");
+//
+// $.each(glmDescr, function(){
+// var text = $(this).text().replace(use_any_time, '');
+// $(this).text(text);
+// });
+
+});
--- /dev/null
+/* Additional styles for Event Management front-end */
+#GLMHeader {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+ padding: 0;
+ border-bottom: 1px solid #CCC;
+}
+#GLMpageTitle {
+ color: #040267;
+ float: left;
+ font-family: "Lora","Times New Roman",Times,serif;
+ font-size: 20px;
+ line-height: 24px;
+ font-weight: normal;
+ margin: 0 0 10px;
+ padding: 0 0 5px 0;
+ width: 70%;
+ /*background: rgba(0,0,0,0.1);*/
+}
+#GLMpageIntro {
+ margin: 1em 0 1em 0;
+}
+#GLMpageIntro p{
+ font-size: 1rem;
+ font-family: "Open Sans", sans-serif;
+}
+.glmBold {
+ font-weight: 600;
+}
+.glmBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 5px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmBlockList {
+ margin-top: 10px;
+ clear: both;
+}
+.glmBlockHeader, .glmBlockHeadder {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+}
+.glmBlockName {
+ display: inline;
+ font-size: 24px;
+ line-height: 22px;
+ color: #043867;
+/* font-family: "Lora","Times New Roman",Times,serif;*/
+ font-family: "Open Sans", sans-serif;
+}
+.glmBlockName a{
+ font-size: 18px;
+ color: #043867;
+}
+.glmBlockRightCol {
+ float: right;
+}
+.glmBlockContent {
+ margin: 0 0 0em 0;
+ clear: both;
+ width: 100%;
+ font-family: "Open Sans", sans-serif;
+}
+.glmTicketQuant{
+ width: 45px;
+ height: 30px;
+}
+.glmTicketQuant option{
+ font-size: 15px;
+}
+@media (min-width: 768px){
+ .glmBlockContentRight img{
+ float: right;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent{
+ clear: none;
+ /* width: 10%;*/
+ /* float: left;*/
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent .glmTicketsSelectValue{
+ width: 10%;
+ margin-right: 10px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmTicketsSelectPrompt{
+ /* float: left;*/
+ padding: 0;
+ margin-right: 3px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmTicketsSelectValue{
+ width: 20%;
+ float: left;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmInput{
+ /* float: left;*/
+ }
+ .glmBlock:not(:first-child) .glmBlockContentLeft {
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 33%;
+ overflow: hidden;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight{
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 64%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 1%;
+ min-width: 120px;
+ }
+ .glmBlock .glmBlockContentLeft.startContent, .glmCartBlock .glmBlockContentLeft.cartContent{
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 50%;
+ overflow: hidden;
+ }
+ .glmBlock .glmBlockContentRight.startImage, .glmCartBlock .glmBlockContentRight.cartImage{
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 45%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 18% !important;
+ }
+}
+@media (min-width: 992px){
+ div[class^="GLMeventDateSelect"]{
+
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent .glmTicketsSelectValue{
+ width: 8%;
+ margin-right: 10px;
+ }
+
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 14% !important;
+ }
+
+ .glmBlock:not(:first-child) .glmBlockContentLeft:not(.startContent) {
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 35%;
+ overflow: hidden;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight:not(.startImage) {
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 60%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+ }
+}
+@media (min-width: 1200px){
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 12% !important;
+ }
+}
+.glmBlockContent p{
+ font-family: "Open Sans", sans-serif;
+}
+.glmBlockContentLeft {
+ display: block;
+ float: left;
+ width:70%;
+ overflow: hidden;
+}
+.glmBlockContentRight {
+ display: block;
+ float: right;
+ width: 20%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+}
+.glmBlockContentIndent {
+ display: block;
+ margin-left: 3em;
+}
+.glmSection {
+}
+.glmSection .glmSectionName {
+}
+.glmSection .glmSectionBold {
+ font-size: 1.1em;
+ font-weight: 600;
+}
+.glmSectionName {
+ font-size: 1.1em;
+ font-weight: 600;
+ margin: 1em 0 0 0;
+}
+#GLMeventDescr, #GLMvenueDescr, .glmCartVenueDescr, .glmCartEventDescr {
+ font-size: 0.8em;
+ margin: 0 0 2.2em 0
+}
+.glmCartEventDescrMobile {
+ display: none;
+}
+.glmCartVenueDescr, .glmCartEventDescr:not(.promoDescr) {
+ margin: 0 0 15px 0;
+/* visibility: hidden;*/
+ display: none;
+}
+
+.glmCartEvents {
+}
+.glmCartEvent {
+}
+.glmCartSelect {
+ width: 4em;
+}
+a.glmNavItem{
+ margin-bottom: 10px;
+}
+.glmCartEventTitle {
+ font-size: 20px;
+ line-height: 22px;
+/* font-family: "Lora","Times New Roman",Times,serif;*/
+ font-family: "Open Sans", sans-serif;
+ color: #043867;
+ margin-bottom: 5px;
+}
+.glmCartEventInfo {
+ margin-top: .5em;
+ clear: both;
+}
+.glmCartEventInfoLeft {
+ float: left;
+ padding-right: 100px;
+}
+.glmCartHeader {
+ font-size: 1.1em;
+ font-weight: 600;
+ clear: both;
+}
+.glmCartHeader .glmCartText {
+ font-weight: bold;
+ border-bottom: 1px solid #CCC;
+}
+.glmCartValues {
+ clear: both;
+}
+.glmCartTable {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartTable.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px 0 10px 20px;
+ border: 0;
+ background: none;
+}
+.glmCartTable.sub {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.glmCartNumb {
+ width: 20%;
+ float: left;
+ align: right;
+}
+.glmCartText {
+ display: block;
+ width: 17%;
+ margin-right: 3%;
+ float: left;
+ padding: 2px 0 0 0;
+}
+
+.glmGrandTotals {
+ float: right;
+ color: #900;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+
+.glmCartTable.totals .glmCartText {
+ display: block;
+ width: 30%;
+ margin-right: 3%;
+ float: right;
+ padding: 2px 0 0 0;
+}
+.glmCartTable.totals .glmCartHeader .glmCartText {
+ color: #900;
+}
+.glmCartTable.totals .glmCartText.grand {
+ margin-right: 0;
+ padding-right: 0;
+}
+.glmCartTotal {
+ width: 30%;
+ float: left;
+}
+.glmCartWide {
+ width: 40%;
+ float: left;
+}
+.glmCartBlock.totals .glmCartWide {
+ width: 100%;
+ padding-top: 10px;
+}
+.glmCartTotal {
+ width:20%;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+.glmCartSubTotals {
+ margin-top: 10px;
+ clear: both;
+}
+.glmCartSubTotals .glmCartTable {
+ background: none;
+ border: 0;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ height: auto;
+ text-align: left;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: left;
+}
+.glmCartTotals {
+ margin-top: 10px;
+}
+.glmCartBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 1em 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartBlock.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 0;
+ border: 0;
+ background: none;
+}
+.glmCartBlockTitle {
+ font-size: 22px;
+ line-height: 28px;
+ font-family: "Lora","Times New Roman",Times,serif;
+ margin: 0 0 0 0;
+}
+.glmCartBlockSmallTitle {
+ font-size: 16px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmCartBlock input[type="textarea"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.glmEventDateInput {
+ width: 80px;
+}
+.glmCartBlock.totals .glmCartBlockTitle {
+ border-bottom: 1px solid #CCC;
+}
+.glmCartBlockSubTitle {
+ margin-top: 1em;
+ font-size: 1.1em;
+ font-weight: 600;
+ margin-bottom: .5em;
+}
+.glmCartBlockSubTitleValue {
+
+}
+.glmCartBlockText {
+}
+.glmCartBlockDates {
+ clear: both;
+}
+.glmCartBlockDate {
+ margin-top: .5em;
+}
+.glmSpecialRequests {
+ margin: 0 0 3em 0;
+}
+#GLMcontent {
+ padding: 0;
+ margin: 0 auto
+}
+#GLMcontent>* {
+/* padding: 0 15px; */
+}
+#GLMevent, #GLMtickets, #GLMvenue {
+ /* max-width: 500px; */
+ margin: 0 auto 1em auto
+}
+#GLMnavigation:after {
+ content: "";
+ display: table;
+ clear: both
+}
+.glmNavItemInactive {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #ddd;
+ border: 1px solid #aaa;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+ text-align: center;
+}
+.glmNavItem {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #cc6535;
+ border: 1px solid #cc6535;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+}
+a.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+div.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+.glmNavItem.cart {
+ background: #043867;
+ border: 1px solid #043867;
+}
+#category h1{
+ font-size: 24px;
+ color: #3a8bb6;
+ font-family: "Open Sans", sans-serif;
+
+}
+.glmNavItemWide {
+ display: block;
+ width: 400px;
+ overflow: hidden;
+ margin: 12px 0 0 0;
+ padding: 8px 0;
+ background: #900;
+ border: 1px solid #900;
+ border-radius: 8px;
+ color: #FFF;
+ text-align: center;
+ vertical-align: middle;
+ font-size: 18px;
+ font-weight: bold;
+ font-family: "Times New Roman", Times, serif;
+ cursor: pointer;
+}
+.glmSelectItem {
+ padding: 5px;
+ margin: 0;
+ width: 150px;
+ border-left: 1px solid #e3e3e3;
+ cursor: pointer;
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ text-align: center;
+ font-weight: 600;
+ font-shadow: 0 1px #fff;
+ font-size: 0.85em;
+ background: #fcfcfc;
+ -webkit-background-clip: padding;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+}
+#GLMcheckout .glmNavItem, #GLMticketCart .glmNavItem {
+ width: 33.3333%
+}
+#GLMeventDates, #GLMvenueLocation, #GLMvenueDetail, #GLMvenueSectionMap {
+ margin: 0 0 15px 0
+}
+.glmPrompt {
+ font-weight: 600;
+ font-size: 1.1em
+}
+.glmTicketDescr {
+ font-size: 0.85em
+}
+.glmTicketAvailable {
+ margin: 5px 0;
+ font-weight: 600
+}
+.glmSectionTickets {
+ margin: 15px 0
+}
+.glmTicketName {
+ font-size: 1.35em;
+ font-weight: 600
+}
+.glmSectionSelector {
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ cursor: pointer;
+ background-color: #f8f8f8;
+ padding: 8px 15px;
+ margin: 5px 0;
+ font-size: 1.15em;
+ font-weight: 600;
+ display: inline-block;
+ font-shadow: 0 1px #fff
+}
+.glmSectionSelector:active {
+ -webkit-box-shadow: inset 0 0 8px #dbdbdb;
+ -moz-box-shadow: inset 0 0 8px #dbdbdb;
+ box-shadow: inset 0 0 8px #dbdbdb
+}
+#GLMticketsSummary {
+ font-weight: 600;
+ font-size: 1.35em;
+ margin-top: 30px
+}
+.glmTicketsSelect {
+ clear: both;
+ margin: 1em;
+}
+.glmTicketsSelectPrompt {
+ font-size: 1em;
+ font-weight: 600;
+ line-height: 125%;
+ float: left;
+ padding-right: .2em;
+}
+.glmTicketsSelectValueWrapper {
+ float: right;
+ width: 150px;
+ text-align: right;
+}
+.glmTicketsSelectValue {
+ float: right;
+ width: 40%;
+ text-align: right;
+}
+#glmQuantSelector {
+ float: right;
+ text-align: right;
+ width: 100px;
+ height: 28px;
+}
+#GLMpolicy {
+ font-size: 0.85em;
+ font-style: italic;
+/* margin-bottom: 15px; */
+}
+.glmTicketPrice {
+ font-weight: 600;
+ margin: 15px 0 5px 0;
+ font-size: 1.25em
+}
+#GLMreason {
+ border: 1px solid #333;
+ padding: 1em;
+}
+.GLMreasonTitle {
+ color: red;
+}
+.GLMreasonList {
+}
+.GLMmapWindow {
+ width: 100%;
+ height: 140px;
+ border: 1px solid #CCC;
+}
+.glmDescr {
+ font-family: "Open Sans", sans-serif;
+ line-height: 1.3;
+}
+.glmCartFailedInput {
+ background: #FFaBa9;
+ padding: .2em;
+}
+.glmCartRequired {
+ color: red;
+}
+/* CHECKOUT STUFF */
+.glmCartFormLine {
+ clear: both;
+}
+.glmCartFormPrompt {
+ width: 30%;
+ float: left;
+ text-align: right;
+ font-weight: 600;
+ font-size: 1.1em;
+ padding-right: .5em;
+}
+.glmCartFormInput {
+ padding-left: 1em;
+ width: 70%;
+ float: left;
+ margin-bottom: .5em;
+}
+.glmCartFormInput span {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+}
+/* Forms */
+.glmCartForm {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ padding: 10px;
+ background: #F5F5F5;
+ margin: 0 0 10px 0;
+ font-size: 12px;
+ border: 1px solid #CCC;
+ color: #656565;
+}
+.glmCartForm input[type="text"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 300px;
+}
+.glmCartForm select {
+ display: block;
+ float: left;
+ clear: left;
+ width: 200px;
+}
+.glmCartPayment {
+ margin: 2em 0 0 0
+}
+.glmInput {
+ float: right;
+}
+/* Mobile */
+@media screen and (max-width:768px) {
+ .glmBlockContentRight {
+ float: left;
+ width: 100%;
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ }
+ .glmBlockContentRight img{
+ max-width: 100%;
+ }
+ .glmBlockContentLeft {
+ display: inline;
+ float: left;
+ width: 100%;
+ }
+ .glmBlockContentLeft div {
+ clear: none !important;
+ }
+ /* Mobile Forms */
+
+}
+/* Small Mobile */
+@media screen and (max-width:599px) {
+ .GLMmapWindow {
+ height: 130px;
+ }
+ .glmCartFormPrompt {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ text-align: left;
+ }
+ .glmCartFormInput {
+ margin-left: 0;
+ padding-left: 0;
+ }
+ #GLMpageTitle {
+ width: 50%;
+ }
+ .glmCartHeader {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+
+ margin-bottom: 20px;
+ }
+ .glmCartHeader .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartValues {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+ margin-bottom: 20px;
+ }
+ .glmCartValues .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals {
+ padding-left: 0;
+ padding-right: 0;
+ }
+ .glmCartTable.totals .glmCartHeader {
+ float: right;
+ width: 100%;
+ margin-bottom: 0;
+ }
+ .glmCartTable.totals .glmCartHeader .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 1px solid #CCC;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals .glmCartValues {
+ float: right;
+ width: 100%;
+ }
+ .glmCartTable.totals .glmCartValues .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmTicketsSelectValueWrapper {
+ float: left;
+ width: 150px;
+ clear: left;
+ margin-top: 10px;
+ }
+ .glmBlockLeft {
+ width: 100%;
+ }
+ .glmCartEventDescrMobile {
+ display: inline;
+ }
+ .glmCartEventDescr {
+ display: none;
+ }
+}
+/* MidSmall Mobile */
+@media screen and (max-width:449px) {
+ #GLMpageTitle {
+ font-size: 16px;
+ line-height: 20px;
+ }
+ .glmBlockName {
+ font-size: 16px;
+ line-height: 18px;
+ }
+ .glmCartFormInput {
+ width: 100%;
+ }
+ .glmCartForm input[type="text"] {
+ width: 100%;
+ }
+ .glmCartForm select {
+ width:100%;
+ }
+ .glmNavItemWide {
+ width: 100%;
+ }
+ .glmNavItem.add {
+ width: 100%;
+ text-align: center;
+ }
+ #GLMcheckoutBtn {
+ width: 100%;
+ text-align: center;
+ }
+
+}
+/* XSmall Mobile */
+@media screen and (max-width:399px) {
+ .glmNavItem.chooser {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin-top: 10px;
+ text-align: center;
+ }
+}
+
+#glmReloadBlocker {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color : transparent;
+ text-align: center;
+ z-index: 1000;
+}
+#glmReloadBlocker div {
+ height: auto;
+ width: 300px;
+ padding: 10px;
+ background: #eee;
+ position: fixed;
+ border-radius: 10px;
+ border: 2px solid #666;
+ color: red;
+ font-size: 1.3em;
+ line-height: 150%;
+
+ margin: -150px 0 0 -150px;
+ left: 50%;
+ top: 60%;
+
+ box-shadow: 10px 10px 5px #888888;
+}
+#glmDevelopmentNotice {
+ padding: 5px;
+ border: 1px solid black;
+ width: auto;
+ clear: both;
+ margin-top: 4em;
+}
--- /dev/null
+/*
+ * Event Management Front-End Area JAVAScript - Tickets interface
+ */
+
+var f_loadAction = false;
+var f_replaceContents = false;
+var duration = 0;
+
+// jQuery Section
+$(document).ready(function(){
+
+ /*
+ * Data Setup Section
+ */
+
+ var siteURL = baseSiteURL;
+ var appURL = baseAppURL;
+
+ /*
+ * Load an action to a div with the specified id where id is also Action to be run
+ */
+ function loadAction(id, container, params) {
+
+ // Display loading message
+ $('#'+container).html('<div class="emBLock"><div class="emLoading">Loading, Please Wait...</div></div>');
+ $('#'+container).show(duration);
+
+ // Build the URL and call it with AJAX
+ url = appURL + "?Action=" + id;
+ if (params) {
+ url = url + '&' + params;
+ }
+ $.post( url,
+ '',
+ function(data) {
+ // Populate the container with the results
+ $('#'+container).html(data);
+ restartOnTabSelect();
+ }
+ );
+
+ }
+ f_loadAction = loadAction;
+
+ // Replace the contents of a div
+ function replaceContents(data, destination) {
+ destination.html(data);
+ }
+ f_replaceContents = replaceContents;
+
+ /*
+ * General Slider Operations
+ */
+
+ // Slider area actions
+ $('.glmSectionSelector').on('click', null, function() {
+
+ // Get the ID of the area to slide from the emSliderId="" parameter in the div tag.
+ var sliderId = $(this).attr('emSliderId');
+
+ // If the slider is currently open - close it, otherwise open it.
+ if ($('#'+sliderId).is(':visible')) {
+ $('#'+sliderId).hide(duration);
+ } else {
+ $('#'+sliderId).show(duration);
+ }
+ });
+ // Startup by closing all areas that are supposed to be closed by default
+ $('.glmSectionTickets').hide(duration);
+
+ /*
+ * Check for user timeout
+ */
+ var inactivityTime = 1800000; // Number of milliseconds to user timeout
+
+ // If theres no activity for 5 seconds do something
+ var activityTimeout = setTimeout(inActive, inactivityTime);
+
+ function resetActive(){
+ $(document.body).attr('class', 'active');
+ clearTimeout(activityTimeout);
+ activityTimeout = setTimeout(inActive, inactivityTime);
+ }
+
+ // No activity do something.
+ function inActive(){
+ alert("Your user session has timed out. Click OK to continue.");
+ window.location.href = siteURL;
+ }
+
+ // Check for mousemove, could add other events here such as checking for key presses ect.
+ $(document).bind('mousemove', function(){resetActive()});
+
+// var use_any_time = "Use any time of day,";
+// var glmDescr = $('.glmDescr').children('p');
+// var selectBtn = $('#GLMselectButton');
+// var shopBtn = $('.glmNavItem:nth-child(2)');
+//
+// shopBtn.html("Purchase Tickets");
+// selectBtn.html("Add to Cart");
+//
+// $.each(glmDescr, function(){
+// var text = $(this).text().replace(use_any_time, '');
+// $(this).text(text);
+// });
+
+});
--- /dev/null
+/* Additional styles for Event Management front-end */
+#GLMHeader {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+ padding: 0;
+ border-bottom: 1px solid #CCC;
+}
+#GLMpageTitle {
+ color: #040267;
+ float: left;
+ font-family: "Lora","Times New Roman",Times,serif;
+ font-size: 20px;
+ line-height: 24px;
+ font-weight: normal;
+ margin: 0 0 10px;
+ padding: 0 0 5px 0;
+ width: 70%;
+ /*background: rgba(0,0,0,0.1);*/
+}
+#GLMpageIntro {
+ margin: 1em 0 1em 0;
+}
+#GLMpageIntro p{
+ font-size: 1rem;
+ font-family: "Open Sans", sans-serif;
+}
+.glmBold {
+ font-weight: 600;
+}
+.glmBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 5px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmBlockList {
+ margin-top: 10px;
+ clear: both;
+}
+.glmBlockHeader, .glmBlockHeadder {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+}
+.glmBlockName {
+ display: inline;
+ font-size: 24px;
+ line-height: 22px;
+ color: #043867;
+/* font-family: "Lora","Times New Roman",Times,serif;*/
+ font-family: "Open Sans", sans-serif;
+}
+.glmBlockName a{
+ font-size: 18px;
+ color: #043867;
+}
+.glmBlockRightCol {
+ float: right;
+}
+.glmBlockContent {
+ margin: 0 0 0em 0;
+ clear: both;
+ width: 100%;
+ font-family: "Open Sans", sans-serif;
+}
+.glmTicketQuant{
+ width: 45px;
+ height: 30px;
+}
+.glmTicketQuant option{
+ font-size: 15px;
+}
+@media (min-width: 768px){
+ .glmBlockContentRight img{
+ float: right;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent{
+ clear: none;
+ /* width: 10%;*/
+ /* float: left;*/
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent .glmTicketsSelectValue{
+ width: 10%;
+ margin-right: 10px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmTicketsSelectPrompt{
+ /* float: left;*/
+ padding: 0;
+ margin-right: 3px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmTicketsSelectValue{
+ width: 20%;
+ float: left;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmInput{
+ /* float: left;*/
+ }
+ .glmBlock:not(:first-child) .glmBlockContentLeft {
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 33%;
+ overflow: hidden;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight{
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 64%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 1%;
+ min-width: 120px;
+ }
+ .glmBlock .glmBlockContentLeft.startContent, .glmCartBlock .glmBlockContentLeft.cartContent{
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 50%;
+ overflow: hidden;
+ }
+ .glmBlock .glmBlockContentRight.startImage, .glmCartBlock .glmBlockContentRight.cartImage{
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 45%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 18% !important;
+ }
+}
+@media (min-width: 992px){
+ div[class^="GLMeventDateSelect"]{
+
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent .glmTicketsSelectValue{
+ width: 8%;
+ margin-right: 10px;
+ }
+
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 14% !important;
+ }
+
+ .glmBlock:not(:first-child) .glmBlockContentLeft:not(.startContent) {
+ display: block;
+ float: left;
+/* width:55%;*/
+ width: 35%;
+ overflow: hidden;
+ }
+ .glmBlock:not(:first-child) .glmBlockContentRight:not(.startImage) {
+ display: block;
+ float: right;
+/* width: 40%;*/
+ width: 60%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+ }
+}
+@media (min-width: 1200px){
+ .glmBlock:not(:first-child) .glmBlockContentRight .glmBlockContent:nth-child(2) .glmTicketsSelectValue{
+
+ width: 12% !important;
+ }
+}
+.glmBlockContent p{
+ font-family: "Open Sans", sans-serif;
+}
+.glmBlockContentLeft {
+ display: block;
+ float: left;
+ width:70%;
+ overflow: hidden;
+}
+.glmBlockContentRight {
+ display: block;
+ float: right;
+ width: 20%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+}
+.glmBlockContentIndent {
+ display: block;
+ margin-left: 3em;
+}
+.glmSection {
+}
+.glmSection .glmSectionName {
+}
+.glmSection .glmSectionBold {
+ font-size: 1.1em;
+ font-weight: 600;
+}
+.glmSectionName {
+ font-size: 1.1em;
+ font-weight: 600;
+ margin: 1em 0 0 0;
+}
+#GLMeventDescr, #GLMvenueDescr, .glmCartVenueDescr, .glmCartEventDescr {
+ font-size: 0.8em;
+ margin: 0 0 2.2em 0
+}
+.glmCartEventDescrMobile {
+ display: none;
+}
+.glmCartVenueDescr, .glmCartEventDescr:not(.promoDescr) {
+ margin: 0 0 15px 0;
+/* visibility: hidden;*/
+ display: none;
+}
+
+.glmCartEvents {
+}
+.glmCartEvent {
+}
+.glmCartSelect {
+ width: 4em;
+}
+a.glmNavItem{
+ margin-bottom: 10px;
+}
+.glmCartEventTitle {
+ font-size: 20px;
+ line-height: 22px;
+/* font-family: "Lora","Times New Roman",Times,serif;*/
+ font-family: "Open Sans", sans-serif;
+ color: #043867;
+ margin-bottom: 5px;
+}
+.glmCartEventInfo {
+ margin-top: .5em;
+ clear: both;
+}
+.glmCartEventInfoLeft {
+ float: left;
+ padding-right: 100px;
+}
+.glmCartHeader {
+ font-size: 1.1em;
+ font-weight: 600;
+ clear: both;
+}
+.glmCartHeader .glmCartText {
+ font-weight: bold;
+ border-bottom: 1px solid #CCC;
+}
+.glmCartValues {
+ clear: both;
+}
+.glmCartTable {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartTable.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px 0 10px 20px;
+ border: 0;
+ background: none;
+}
+.glmCartTable.sub {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.glmCartNumb {
+ width: 20%;
+ float: left;
+ align: right;
+}
+.glmCartText {
+ display: block;
+ width: 17%;
+ margin-right: 3%;
+ float: left;
+ padding: 2px 0 0 0;
+}
+
+.glmGrandTotals {
+ float: right;
+ color: #900;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+
+.glmCartTable.totals .glmCartText {
+ display: block;
+ width: 30%;
+ margin-right: 3%;
+ float: right;
+ padding: 2px 0 0 0;
+}
+.glmCartTable.totals .glmCartHeader .glmCartText {
+ color: #900;
+}
+.glmCartTable.totals .glmCartText.grand {
+ margin-right: 0;
+ padding-right: 0;
+}
+.glmCartTotal {
+ width: 30%;
+ float: left;
+}
+.glmCartWide {
+ width: 40%;
+ float: left;
+}
+.glmCartBlock.totals .glmCartWide {
+ width: 100%;
+ padding-top: 10px;
+}
+.glmCartTotal {
+ width:20%;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+.glmCartSubTotals {
+ margin-top: 10px;
+ clear: both;
+}
+.glmCartSubTotals .glmCartTable {
+ background: none;
+ border: 0;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ height: auto;
+ text-align: left;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: left;
+}
+.glmCartTotals {
+ margin-top: 10px;
+}
+.glmCartBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 1em 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartBlock.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 0;
+ border: 0;
+ background: none;
+}
+.glmCartBlockTitle {
+ font-size: 22px;
+ line-height: 28px;
+ font-family: "Lora","Times New Roman",Times,serif;
+ margin: 0 0 0 0;
+}
+.glmCartBlockSmallTitle {
+ font-size: 16px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmCartBlock input[type="textarea"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.glmEventDateInput {
+ width: 80px;
+}
+.glmCartBlock.totals .glmCartBlockTitle {
+ border-bottom: 1px solid #CCC;
+}
+.glmCartBlockSubTitle {
+ margin-top: 1em;
+ font-size: 1.1em;
+ font-weight: 600;
+ margin-bottom: .5em;
+}
+.glmCartBlockSubTitleValue {
+
+}
+.glmCartBlockText {
+}
+.glmCartBlockDates {
+ clear: both;
+}
+.glmCartBlockDate {
+ margin-top: .5em;
+}
+.glmSpecialRequests {
+ margin: 0 0 3em 0;
+}
+#GLMcontent {
+ padding: 0;
+ margin: 0 auto
+}
+#GLMcontent>* {
+/* padding: 0 15px; */
+}
+#GLMevent, #GLMtickets, #GLMvenue {
+ /* max-width: 500px; */
+ margin: 0 auto 1em auto
+}
+#GLMnavigation:after {
+ content: "";
+ display: table;
+ clear: both
+}
+.glmNavItemInactive {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #ddd;
+ border: 1px solid #aaa;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+ text-align: center;
+}
+.glmNavItem {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #cc6535;
+ border: 1px solid #cc6535;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+}
+a.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+div.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+.glmNavItem.cart {
+ background: #043867;
+ border: 1px solid #043867;
+}
+#category h1{
+ font-size: 24px;
+ color: #3a8bb6;
+ font-family: "Open Sans", sans-serif;
+
+}
+.glmNavItemWide {
+ display: block;
+ width: 400px;
+ overflow: hidden;
+ margin: 12px 0 0 0;
+ padding: 8px 0;
+ background: #900;
+ border: 1px solid #900;
+ border-radius: 8px;
+ color: #FFF;
+ text-align: center;
+ vertical-align: middle;
+ font-size: 18px;
+ font-weight: bold;
+ font-family: "Times New Roman", Times, serif;
+ cursor: pointer;
+}
+.glmSelectItem {
+ padding: 5px;
+ margin: 0;
+ width: 150px;
+ border-left: 1px solid #e3e3e3;
+ cursor: pointer;
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ text-align: center;
+ font-weight: 600;
+ font-shadow: 0 1px #fff;
+ font-size: 0.85em;
+ background: #fcfcfc;
+ -webkit-background-clip: padding;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+}
+#GLMcheckout .glmNavItem, #GLMticketCart .glmNavItem {
+ width: 33.3333%
+}
+#GLMeventDates, #GLMvenueLocation, #GLMvenueDetail, #GLMvenueSectionMap {
+ margin: 0 0 15px 0
+}
+.glmPrompt {
+ font-weight: 600;
+ font-size: 1.1em
+}
+.glmTicketDescr {
+ font-size: 0.85em
+}
+.glmTicketAvailable {
+ margin: 5px 0;
+ font-weight: 600
+}
+.glmSectionTickets {
+ margin: 15px 0
+}
+.glmTicketName {
+ font-size: 1.35em;
+ font-weight: 600
+}
+.glmSectionSelector {
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ cursor: pointer;
+ background-color: #f8f8f8;
+ padding: 8px 15px;
+ margin: 5px 0;
+ font-size: 1.15em;
+ font-weight: 600;
+ display: inline-block;
+ font-shadow: 0 1px #fff
+}
+.glmSectionSelector:active {
+ -webkit-box-shadow: inset 0 0 8px #dbdbdb;
+ -moz-box-shadow: inset 0 0 8px #dbdbdb;
+ box-shadow: inset 0 0 8px #dbdbdb
+}
+#GLMticketsSummary {
+ font-weight: 600;
+ font-size: 1.35em;
+ margin-top: 30px
+}
+.glmTicketsSelect {
+ clear: both;
+ margin: 1em;
+}
+.glmTicketsSelectPrompt {
+ font-size: 1em;
+ font-weight: 600;
+ line-height: 125%;
+ float: left;
+ padding-right: .2em;
+}
+.glmTicketsSelectValueWrapper {
+ float: right;
+ width: 150px;
+ text-align: right;
+}
+.glmTicketsSelectValue {
+ float: right;
+ width: 40%;
+ text-align: right;
+}
+#glmQuantSelector {
+ float: right;
+ text-align: right;
+ width: 100px;
+ height: 28px;
+}
+#GLMpolicy {
+ font-size: 0.85em;
+ font-style: italic;
+/* margin-bottom: 15px; */
+}
+.glmTicketPrice {
+ font-weight: 600;
+ margin: 15px 0 5px 0;
+ font-size: 1.25em
+}
+#GLMreason {
+ border: 1px solid #333;
+ padding: 1em;
+}
+.GLMreasonTitle {
+ color: red;
+}
+.GLMreasonList {
+}
+.GLMmapWindow {
+ width: 100%;
+ height: 140px;
+ border: 1px solid #CCC;
+}
+.glmDescr {
+ font-family: "Open Sans", sans-serif;
+ line-height: 1.3;
+}
+.glmCartFailedInput {
+ background: #FFaBa9;
+ padding: .2em;
+}
+.glmCartRequired {
+ color: red;
+}
+/* CHECKOUT STUFF */
+.glmCartFormLine {
+ clear: both;
+}
+.glmCartFormPrompt {
+ width: 30%;
+ float: left;
+ text-align: right;
+ font-weight: 600;
+ font-size: 1.1em;
+ padding-right: .5em;
+}
+.glmCartFormInput {
+ padding-left: 1em;
+ width: 70%;
+ float: left;
+ margin-bottom: .5em;
+}
+.glmCartFormInput span {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+}
+/* Forms */
+.glmCartForm {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ padding: 10px;
+ background: #F5F5F5;
+ margin: 0 0 10px 0;
+ font-size: 12px;
+ border: 1px solid #CCC;
+ color: #656565;
+}
+.glmCartForm input[type="text"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 300px;
+}
+.glmCartForm select {
+ display: block;
+ float: left;
+ clear: left;
+ width: 200px;
+}
+.glmCartPayment {
+ margin: 2em 0 0 0
+}
+.glmInput {
+ float: right;
+}
+/* Mobile */
+@media screen and (max-width:768px) {
+ .glmBlockContentRight {
+ float: left;
+ width: 100%;
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ }
+ .glmBlockContentRight img{
+ max-width: 100%;
+ }
+ .glmBlockContentLeft {
+ display: inline;
+ float: left;
+ width: 100%;
+ }
+ .glmBlockContentLeft div {
+ clear: none !important;
+ }
+ /* Mobile Forms */
+
+}
+/* Small Mobile */
+@media screen and (max-width:599px) {
+ .GLMmapWindow {
+ height: 130px;
+ }
+ .glmCartFormPrompt {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ text-align: left;
+ }
+ .glmCartFormInput {
+ margin-left: 0;
+ padding-left: 0;
+ }
+ #GLMpageTitle {
+ width: 50%;
+ }
+ .glmCartHeader {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+
+ margin-bottom: 20px;
+ }
+ .glmCartHeader .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartValues {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+ margin-bottom: 20px;
+ }
+ .glmCartValues .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals {
+ padding-left: 0;
+ padding-right: 0;
+ }
+ .glmCartTable.totals .glmCartHeader {
+ float: right;
+ width: 100%;
+ margin-bottom: 0;
+ }
+ .glmCartTable.totals .glmCartHeader .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 1px solid #CCC;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals .glmCartValues {
+ float: right;
+ width: 100%;
+ }
+ .glmCartTable.totals .glmCartValues .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmTicketsSelectValueWrapper {
+ float: left;
+ width: 150px;
+ clear: left;
+ margin-top: 10px;
+ }
+ .glmBlockLeft {
+ width: 100%;
+ }
+ .glmCartEventDescrMobile {
+ display: inline;
+ }
+ .glmCartEventDescr {
+ display: none;
+ }
+}
+/* MidSmall Mobile */
+@media screen and (max-width:449px) {
+ #GLMpageTitle {
+ font-size: 16px;
+ line-height: 20px;
+ }
+ .glmBlockName {
+ font-size: 16px;
+ line-height: 18px;
+ }
+ .glmCartFormInput {
+ width: 100%;
+ }
+ .glmCartForm input[type="text"] {
+ width: 100%;
+ }
+ .glmCartForm select {
+ width:100%;
+ }
+ .glmNavItemWide {
+ width: 100%;
+ }
+ .glmNavItem.add {
+ width: 100%;
+ text-align: center;
+ }
+ #GLMcheckoutBtn {
+ width: 100%;
+ text-align: center;
+ }
+
+}
+/* XSmall Mobile */
+@media screen and (max-width:399px) {
+ .glmNavItem.chooser {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin-top: 10px;
+ text-align: center;
+ }
+}
+
+#glmReloadBlocker {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color : transparent;
+ text-align: center;
+ z-index: 1000;
+}
+#glmReloadBlocker div {
+ height: auto;
+ width: 300px;
+ padding: 10px;
+ background: #eee;
+ position: fixed;
+ border-radius: 10px;
+ border: 2px solid #666;
+ color: red;
+ font-size: 1.3em;
+ line-height: 150%;
+
+ margin: -150px 0 0 -150px;
+ left: 50%;
+ top: 60%;
+
+ box-shadow: 10px 10px 5px #888888;
+}
+#glmDevelopmentNotice {
+ padding: 5px;
+ border: 1px solid black;
+ width: auto;
+ clear: both;
+ margin-top: 4em;
+}
--- /dev/null
+/*
+ * Event Management Front-End Area JAVAScript - Tickets interface
+ */
+
+var f_loadAction = false;
+var f_replaceContents = false;
+var duration = 0;
+
+// jQuery Section
+$(document).ready(function(){
+
+ /*
+ * Data Setup Section
+ */
+
+ var siteURL = baseSiteURL;
+ var appURL = baseAppURL;
+
+ /*
+ * Load an action to a div with the specified id where id is also Action to be run
+ */
+ function loadAction(id, container, params) {
+
+ // Display loading message
+ $('#'+container).html('<div class="emBLock"><div class="emLoading">Loading, Please Wait...</div></div>');
+ $('#'+container).show(duration);
+
+ // Build the URL and call it with AJAX
+ url = appURL + "?Action=" + id;
+ if (params) {
+ url = url + '&' + params;
+ }
+ $.post( url,
+ '',
+ function(data) {
+ // Populate the container with the results
+ $('#'+container).html(data);
+ restartOnTabSelect();
+ }
+ );
+
+ }
+ f_loadAction = loadAction;
+
+ // Replace the contents of a div
+ function replaceContents(data, destination) {
+ destination.html(data);
+ }
+ f_replaceContents = replaceContents;
+
+ /*
+ * General Slider Operations
+ */
+
+ // Slider area actions
+ $('.glmSectionSelector').on('click', null, function() {
+
+ // Get the ID of the area to slide from the emSliderId="" parameter in the div tag.
+ var sliderId = $(this).attr('emSliderId');
+
+ // If the slider is currently open - close it, otherwise open it.
+ if ($('#'+sliderId).is(':visible')) {
+ $('#'+sliderId).hide(duration);
+ } else {
+ $('#'+sliderId).show(duration);
+ }
+ });
+ // Startup by closing all areas that are supposed to be closed by default
+ $('.glmSectionTickets').hide(duration);
+
+ /*
+ * Check for user timeout
+ */
+ var inactivityTime = 1800000; // Number of milliseconds to user timeout
+
+ // If theres no activity for 5 seconds do something
+ var activityTimeout = setTimeout(inActive, inactivityTime);
+
+ function resetActive(){
+ $(document.body).attr('class', 'active');
+ clearTimeout(activityTimeout);
+ activityTimeout = setTimeout(inActive, inactivityTime);
+ }
+
+ // No activity do something.
+ function inActive(){
+ alert("Your user session has timed out. Click OK to continue.");
+ window.location.href = siteURL;
+ }
+
+ // Check for mousemove, could add other events here such as checking for key presses ect.
+ $(document).bind('mousemove', function(){resetActive()});
+
+// var use_any_time = "Use any time of day,";
+// var glmDescr = $('.glmDescr').children('p');
+// var selectBtn = $('#GLMselectButton');
+// var shopBtn = $('.glmNavItem:nth-child(2)');
+//
+// shopBtn.html("Purchase Tickets");
+// selectBtn.html("Add to Cart");
+//
+// $.each(glmDescr, function(){
+// var text = $(this).text().replace(use_any_time, '');
+// $(this).text(text);
+// });
+
+});
--- /dev/null
+/* Additional styles for Event Management front-end */
+#GLMHeader {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+ padding: 0;
+ border-bottom: 1px solid #CCC;
+}
+#GLMpageTitle {
+ color: #040267;
+ float: left;
+ font-family: "Lora","Times New Roman",Times,serif;
+ font-size: 20px;
+ line-height: 24px;
+ font-weight: normal;
+ margin: 0 0 10px;
+ padding: 0 0 5px 0;
+ width: 70%;
+ /*background: rgba(0,0,0,0.1);*/
+}
+#GLMpageIntro {
+ margin: 1em 0 1em 0;
+}
+.glmBold {
+ font-weight: 600;
+}
+.glmBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 5px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmBlockList {
+ margin-top: 10px;
+ clear: both;
+}
+.glmBlockHeader, .glmBlockHeadder {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+}
+.glmBlockName {
+ display: inline;
+ font-size: 18px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmBlockRightCol {
+ float: right;
+}
+.glmBlockContent {
+ margin: 0 0 0em 0;
+ clear: both;
+ width: 100%;
+}
+.glmBlockContentLeft {
+ display: block;
+ float: left;
+ overflow: hidden;
+}
+.glmBlockContentRight {
+ display: block;
+ float: right;
+ width: 40%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+}
+.glmBlockContentIndent {
+ display: block;
+ margin-left: 3em;
+}
+.glmSection {
+}
+.glmSection .glmSectionName {
+}
+.glmSection .glmSectionBold {
+ font-size: 1.1em;
+ font-weight: 600;
+}
+.glmSectionName {
+ font-size: 1.1em;
+ font-weight: 600;
+ margin: 1em 0 0 0;
+}
+#GLMeventDescr, #GLMvenueDescr, .glmCartVenueDescr, .glmCartEventDescr {
+ font-size: 0.8em;
+ margin: 0 0 2.2em 0
+}
+.glmCartEventDescrMobile {
+ display: none;
+}
+.glmCartVenueDescr, .glmCartEventDescr {
+ margin: 0 0 15px 0
+}
+.glmCartEvents {
+}
+.glmCartEvent {
+}
+.glmCartSelect {
+ width: 4em;
+}
+.glmCartEventTitle {
+ font-size: 18px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmCartEventInfo {
+ margin-top: .5em;
+ clear: both;
+}
+.glmCartEventInfoLeft {
+ float: left;
+ padding-right: 100px;
+}
+.glmCartHeader {
+ font-size: 1.1em;
+ font-weight: 600;
+ clear: both;
+}
+.glmCartHeader .glmCartText {
+ font-weight: bold;
+ border-bottom: 1px solid #CCC;
+}
+.glmCartValues {
+ clear: both;
+}
+.glmCartTable {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartTable.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px 0 10px 20px;
+ border: 0;
+ background: none;
+}
+.glmCartTable.sub {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.glmCartNumb {
+ width: 20%;
+ float: left;
+ align: right;
+}
+.glmCartText {
+ display: block;
+ width: 17%;
+ margin-right: 3%;
+ float: left;
+ padding: 2px 0 0 0;
+}
+
+.glmGrandTotals {
+ float: right;
+ color: #900;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+
+.glmCartTable.totals .glmCartText {
+ display: block;
+ width: 30%;
+ margin-right: 3%;
+ float: right;
+ padding: 2px 0 0 0;
+}
+.glmCartTable.totals .glmCartHeader .glmCartText {
+ color: #900;
+}
+.glmCartTable.totals .glmCartText.grand {
+ margin-right: 0;
+ padding-right: 0;
+}
+.glmCartTotal {
+ width: 30%;
+ float: left;
+}
+.glmCartWide {
+ width: 40%;
+ float: left;
+}
+.glmCartBlock.totals .glmCartWide {
+ width: 100%;
+ padding-top: 10px;
+}
+.glmCartTotal {
+ width:20%;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+.glmCartSubTotals {
+ margin-top: 10px;
+ clear: both;
+}
+.glmCartSubTotals .glmCartTable {
+ background: none;
+ border: 0;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ height: auto;
+ text-align: left;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: left;
+}
+.glmCartTotals {
+ margin-top: 10px;
+}
+.glmCartBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 1em 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartBlock.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 0;
+ border: 0;
+ background: none;
+}
+.glmCartBlockTitle {
+ font-size: 22px;
+ line-height: 28px;
+ font-family: "Lora","Times New Roman",Times,serif;
+ margin: 0 0 0 0;
+}
+.glmCartBlockSmallTitle {
+ font-size: 16px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmCartBlock input[type="textarea"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.glmEventDateInput {
+ width: 80px;
+}
+.glmCartBlock.totals .glmCartBlockTitle {
+ border-bottom: 1px solid #CCC;
+}
+.glmCartBlockSubTitle {
+ margin-top: 1em;
+ font-size: 1.1em;
+ font-weight: 600;
+ margin-bottom: .5em;
+}
+.glmCartBlockSubTitleValue {
+
+}
+.glmCartBlockText {
+}
+.glmCartBlockDates {
+ clear: both;
+}
+.glmCartBlockDate {
+ margin-top: .5em;
+}
+.glmSpecialRequests {
+ margin: 0 0 3em 0;
+}
+#GLMcontent {
+ padding: 0;
+ margin: 0 auto
+}
+#GLMcontent>* {
+/* padding: 0 15px; */
+}
+#GLMevent, #GLMtickets, #GLMvenue {
+ /* max-width: 500px; */
+ margin: 0 auto 1em auto
+}
+#GLMnavigation:after {
+ content: "";
+ display: table;
+ clear: both
+}
+.glmNavItemInactive {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #ddd;
+ border: 1px solid #aaa;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+ text-align: center;
+}
+.glmNavItem {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #900;
+ border: 1px solid #900;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+}
+a.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+div.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+.glmNavItem.cart {
+ background: #040267;
+ border: 1px solid #040267;
+}
+.glmNavItemWide {
+ display: block;
+ width: 400px;
+ overflow: hidden;
+ margin: 12px 0 0 0;
+ padding: 8px 0;
+ background: #900;
+ border: 1px solid #900;
+ border-radius: 8px;
+ color: #FFF;
+ text-align: center;
+ vertical-align: middle;
+ font-size: 18px;
+ font-weight: bold;
+ font-family: "Times New Roman", Times, serif;
+ cursor: pointer;
+}
+.glmSelectItem {
+ padding: 5px;
+ margin: 0;
+ width: 150px;
+ border-left: 1px solid #e3e3e3;
+ cursor: pointer;
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ text-align: center;
+ font-weight: 600;
+ font-shadow: 0 1px #fff;
+ font-size: 0.85em;
+ background: #fcfcfc;
+ -webkit-background-clip: padding;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+}
+#GLMcheckout .glmNavItem, #GLMticketCart .glmNavItem {
+ width: 33.3333%
+}
+#GLMeventDates, #GLMvenueLocation, #GLMvenueDetail, #GLMvenueSectionMap {
+ margin: 0 0 15px 0
+}
+.glmPrompt {
+ font-weight: 600;
+ font-size: 1.1em
+}
+.glmTicketDescr {
+ font-size: 0.85em
+}
+.glmTicketAvailable {
+ margin: 5px 0;
+ font-weight: 600
+}
+.glmSectionTickets {
+ margin: 15px 0
+}
+.glmTicketName {
+ font-size: 1.35em;
+ font-weight: 600
+}
+.glmSectionSelector {
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ cursor: pointer;
+ background-color: #f8f8f8;
+ padding: 8px 15px;
+ margin: 5px 0;
+ font-size: 1.15em;
+ font-weight: 600;
+ display: inline-block;
+ font-shadow: 0 1px #fff
+}
+.glmSectionSelector:active {
+ -webkit-box-shadow: inset 0 0 8px #dbdbdb;
+ -moz-box-shadow: inset 0 0 8px #dbdbdb;
+ box-shadow: inset 0 0 8px #dbdbdb
+}
+#GLMticketsSummary {
+ font-weight: 600;
+ font-size: 1.35em;
+ margin-top: 30px
+}
+.glmTicketsSelect {
+ clear: both;
+ margin: 1em;
+}
+.glmTicketsSelectPrompt {
+ font-size: 1em;
+ font-weight: 600;
+ line-height: 125%;
+ float: left;
+ padding-right: .2em;
+}
+.glmTicketsSelectValueWrapper {
+ float: right;
+ width: 150px;
+ text-align: right;
+}
+.glmTicketsSelectValue {
+ float: right;
+ width: 40%;
+ text-align: right;
+}
+#glmQuantSelector {
+ float: right;
+ text-align: right;
+ width: 100px;
+ height: 28px;
+}
+#GLMpolicy {
+ font-size: 0.85em;
+ font-style: italic;
+/* margin-bottom: 15px; */
+}
+.glmTicketPrice {
+ font-weight: 600;
+ margin: 15px 0 5px 0;
+ font-size: 1.25em
+}
+#GLMreason {
+ border: 1px solid #333;
+ padding: 1em;
+}
+.GLMreasonTitle {
+ color: red;
+}
+.GLMreasonList {
+}
+.GLMmapWindow {
+ width: 100%;
+ height: 140px;
+ border: 1px solid #CCC;
+}
+.glmDescr {
+}
+.glmCartFailedInput {
+ background: #FFaBa9;
+ padding: .2em;
+}
+.glmCartRequired {
+ color: red;
+}
+/* CHECKOUT STUFF */
+.glmCartFormLine {
+ clear: both;
+}
+.glmCartFormPrompt {
+ width: 30%;
+ float: left;
+ text-align: right;
+ font-weight: 600;
+ font-size: 1.1em;
+ padding-right: .5em;
+}
+.glmCartFormInput {
+ padding-left: 1em;
+ width: 70%;
+ float: left;
+ margin-bottom: .5em;
+}
+.glmCartFormInput span {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+}
+/* Forms */
+.glmCartForm {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ padding: 10px;
+ background: #F5F5F5;
+ margin: 0 0 10px 0;
+ font-size: 12px;
+ border: 1px solid #CCC;
+ color: #656565;
+}
+.glmCartForm input[type="text"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 300px;
+}
+.glmCartForm select {
+ display: block;
+ float: left;
+ clear: left;
+ width: 200px;
+}
+.glmCartPayment {
+ margin: 2em 0 0 0
+}
+.glmInput {
+ float: right;
+}
+/* Mobile */
+@media screen and (max-width:768px) {
+ .glmBlockContentRight {
+ float: left;
+ width: 100%;
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ }
+ .glmBlockContentLeft {
+ display: inline;
+ float: left;
+ width: 100%;
+ }
+ .glmBlockContentLeft div {
+ clear: none !important;
+ }
+ /* Mobile Forms */
+
+}
+/* Small Mobile */
+@media screen and (max-width:599px) {
+ .GLMmapWindow {
+ height: 130px;
+ }
+ .glmCartFormPrompt {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ text-align: left;
+ }
+ .glmCartFormInput {
+ margin-left: 0;
+ padding-left: 0;
+ }
+ #GLMpageTitle {
+ width: 50%;
+ }
+ .glmCartHeader {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+
+ margin-bottom: 20px;
+ }
+ .glmCartHeader .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartValues {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+ margin-bottom: 20px;
+ }
+ .glmCartValues .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals {
+ padding-left: 0;
+ padding-right: 0;
+ }
+ .glmCartTable.totals .glmCartHeader {
+ float: right;
+ width: 100%;
+ margin-bottom: 0;
+ }
+ .glmCartTable.totals .glmCartHeader .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 1px solid #CCC;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals .glmCartValues {
+ float: right;
+ width: 100%;
+ }
+ .glmCartTable.totals .glmCartValues .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmTicketsSelectValueWrapper {
+ float: left;
+ width: 150px;
+ clear: left;
+ margin-top: 10px;
+ }
+ .glmBlockLeft {
+ width: 100%;
+ }
+ .glmCartEventDescrMobile {
+ display: inline;
+ }
+ .glmCartEventDescr {
+ display: none;
+ }
+}
+/* MidSmall Mobile */
+@media screen and (max-width:449px) {
+ #GLMpageTitle {
+ font-size: 16px;
+ line-height: 20px;
+ }
+ .glmBlockName {
+ font-size: 14px;
+ line-height: 18px;
+ }
+ .glmCartFormInput {
+ width: 100%;
+ }
+ .glmCartForm input[type="text"] {
+ width: 100%;
+ }
+ .glmCartForm select {
+ width:100%;
+ }
+ .glmNavItemWide {
+ width: 100%;
+ }
+ .glmNavItem.add {
+ width: 100%;
+ text-align: center;
+ }
+ #GLMcheckoutBtn {
+ width: 100%;
+ text-align: center;
+ }
+
+}
+/* XSmall Mobile */
+@media screen and (max-width:399px) {
+ .glmNavItem.chooser {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin-top: 10px;
+ text-align: center;
+ }
+}
+
+#glmReloadBlocker {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color : transparent;
+ text-align: center;
+ z-index: 1000;
+}
+#glmReloadBlocker div {
+ height: auto;
+ width: 250px;
+ padding: 10px;
+ background: #eee;
+ position: fixed;
+ border-radius: 10px;
+ border: 2px solid #666;
+ color: red;
+ font-size: 1.1em;
+ line-height: 150%;
+
+ margin: -150px 0 0 -150px;
+ left: 55%;
+ top: 60%;
+
+ box-shadow: 10px 10px 5px #888888;
+}
+#glmDevelopmentNotice {
+ padding: 5px;
+ border: 1px solid black;
+ width: auto;
+ clear: both;
+ margin-top: 4em;
+}
--- /dev/null
+/*
+ * Event Management Front-End Area JAVAScript - TicketsFoundation interface
+ */
+
+var f_loadAction = false;
+var f_replaceContents = false;
+var duration = 0;
+
+// jQuery Section
+$(document).ready(function(){
+
+ /*
+ * Data Setup Section
+ */
+
+ var siteURL = flex_baseURL;
+ var appURL = flex_baseAppURL;
+
+ /*
+ * Load an action to a div with the specified id where id is also Action to be run
+ */
+ function loadAction(id, container, params) {
+
+ // Display loading message
+ $('#'+container).html('<div class="emBLock"><div class="emLoading">Loading, Please Wait...</div></div>');
+ $('#'+container).show(duration);
+
+ // Build the URL and call it with AJAX
+ url = appURL + "?Action=" + id;
+ if (params) {
+ url = url + '&' + params;
+ }
+ $.post( url,
+ '',
+ function(data) {
+ // Populate the container with the results
+ $('#'+container).html(data);
+ restartOnTabSelect();
+ }
+ );
+
+ }
+ f_loadAction = loadAction;
+
+ // Replace the contents of a div
+ function replaceContents(data, destination) {
+ destination.html(data);
+ }
+ f_replaceContents = replaceContents;
+
+ /*
+ * General Slider Operations
+ */
+
+ // Slider area actions
+ $('.glmSectionSelector').on('click', null, function() {
+
+ // Get the ID of the area to slide from the emSliderId="" parameter in the div tag.
+ var sliderId = $(this).attr('emSliderId');
+
+ // If the slider is currently open - close it, otherwise open it.
+ if ($('#'+sliderId).is(':visible')) {
+ $('#'+sliderId).hide(duration);
+ } else {
+ $('#'+sliderId).show(duration);
+ }
+ });
+ // Startup by closing all areas that are supposed to be closed by default
+ $('.glmSectionTickets').hide(duration);
+
+ /*
+ * Check for user timeout
+ */
+ var inactivityTime = 1800000; // Number of milliseconds to user timeout
+
+ // If theres no activity for 5 seconds do something
+ var activityTimeout = setTimeout(inActive, inactivityTime);
+
+ function resetActive(){
+ $(document.body).attr('class', 'active');
+ clearTimeout(activityTimeout);
+ activityTimeout = setTimeout(inActive, inactivityTime);
+ }
+
+ // No activity do something.
+ function inActive(){
+ alert("Your user session has timed out. Click OK to continue.");
+ window.location.href = siteURL;
+ }
+
+ // Check for mousemove, could add other events here such as checking for key presses ect.
+ $(document).bind('mousemove', function(){resetActive()});
+
+});
--- /dev/null
+/* Additional styles for Event Management front-end */
+#GLMHeader {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+ padding: 0;
+ border-bottom: 1px solid #CCC;
+}
+#GLMpageTitle {
+ color: #040267;
+ float: left;
+ font-family: "Lora","Times New Roman",Times,serif;
+ font-size: 20px;
+ line-height: 24px;
+ font-weight: normal;
+ margin: 0 0 10px;
+ padding: 0 0 5px 0;
+ width: 70%;
+ /*background: rgba(0,0,0,0.1);*/
+}
+#GLMpageIntro {
+ margin: 1em 0 1em 0;
+}
+.glmBold {
+ font-weight: 600;
+}
+.glmBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 5px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmBlockList {
+ margin-top: 10px;
+ clear: both;
+}
+.glmBlockHeader, .glmBlockHeadder {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 5px 0;
+}
+.glmBlockName {
+ display: inline;
+ font-size: 18px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmBlockRightCol {
+ float: right;
+}
+.glmBlockContent {
+ margin: 0 0 0em 0;
+ clear: both;
+ width: 100%;
+}
+.glmBlockContentLeft {
+ display: block;
+ float: left;
+ width: 70%;
+ overflow: hidden;
+}
+.glmBlockContentRight {
+ display: block;
+ float: right;
+ width: 20%;
+ overflow: hidden;
+ margin-bottom: 10px;
+ margin-left: 5%;
+ min-width: 120px;
+}
+.glmBlockContentIndent {
+ display: block;
+ margin-left: 3em;
+}
+.glmSection {
+}
+.glmSection .glmSectionName {
+}
+.glmSection .glmSectionBold {
+ font-size: 1.1em;
+ font-weight: 600;
+}
+.glmSectionName {
+ font-size: 1.1em;
+ font-weight: 600;
+ margin: 1em 0 0 0;
+}
+#GLMeventDescr, #GLMvenueDescr, .glmCartVenueDescr, .glmCartEventDescr {
+ font-size: 0.8em;
+ margin: 0 0 2.2em 0
+}
+.glmCartEventDescrMobile {
+ display: none;
+}
+.glmCartVenueDescr, .glmCartEventDescr {
+ margin: 0 0 15px 0
+}
+.glmCartEvents {
+}
+.glmCartEvent {
+}
+.glmCartSelect {
+ width: 4em;
+}
+.glmCartEventTitle {
+ font-size: 18px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmCartEventInfo {
+ margin-top: .5em;
+ clear: both;
+}
+.glmCartEventInfoLeft {
+ float: left;
+ padding-right: 100px;
+}
+.glmCartHeader {
+ font-size: 1.1em;
+ font-weight: 600;
+ clear: both;
+}
+.glmCartHeader .glmCartText {
+ font-weight: bold;
+ border-bottom: 1px solid #CCC;
+}
+.glmCartValues {
+ clear: both;
+}
+.glmCartTable {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartTable.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 10px 0 0 0;
+ padding: 10px 0 10px 20px;
+ border: 0;
+ background: none;
+}
+.glmCartTable.sub {
+ padding-top: 0;
+ padding-bottom: 0;
+}
+.glmCartNumb {
+ width: 20%;
+ float: left;
+ align: right;
+}
+.glmCartText {
+ display: block;
+ width: 17%;
+ margin-right: 3%;
+ float: left;
+ padding: 2px 0 0 0;
+}
+
+.glmGrandTotals {
+ float: right;
+ color: #900;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+
+.glmCartTable.totals .glmCartText {
+ display: block;
+ width: 30%;
+ margin-right: 3%;
+ float: right;
+ padding: 2px 0 0 0;
+}
+.glmCartTable.totals .glmCartHeader .glmCartText {
+ color: #900;
+}
+.glmCartTable.totals .glmCartText.grand {
+ margin-right: 0;
+ padding-right: 0;
+}
+.glmCartTotal {
+ width: 30%;
+ float: left;
+}
+.glmCartWide {
+ width: 40%;
+ float: left;
+}
+.glmCartBlock.totals .glmCartWide {
+ width: 100%;
+ padding-top: 10px;
+}
+.glmCartTotal {
+ width:20%;
+ font-weight: 600;
+ font-size: 1.1em;
+}
+.glmCartSubTotals {
+ margin-top: 10px;
+ clear: both;
+}
+.glmCartSubTotals .glmCartTable {
+ background: none;
+ border: 0;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ height: auto;
+ text-align: left;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 40%;
+}
+.glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: left;
+}
+.glmCartTotals {
+ margin-top: 10px;
+}
+.glmCartBlock {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 1em 0;
+ padding: 10px;
+ border: 1px solid #CFCFCF;
+ background: rgba(0,0,0,0.05);
+}
+.glmCartBlock.totals {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin: 0 0 10px 0;
+ padding: 0;
+ border: 0;
+ background: none;
+}
+.glmCartBlockTitle {
+ font-size: 22px;
+ line-height: 28px;
+ font-family: "Lora","Times New Roman",Times,serif;
+ margin: 0 0 0 0;
+}
+.glmCartBlockSmallTitle {
+ font-size: 16px;
+ line-height: 22px;
+ font-family: "Lora","Times New Roman",Times,serif;
+}
+.glmCartBlock input[type="textarea"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.glmEventDateInput {
+ width: 80px;
+}
+.glmCartBlock.totals .glmCartBlockTitle {
+ border-bottom: 1px solid #CCC;
+}
+.glmCartBlockSubTitle {
+ margin-top: 1em;
+ font-size: 1.1em;
+ font-weight: 600;
+ margin-bottom: .5em;
+}
+.glmCartBlockSubTitleValue {
+
+}
+.glmCartBlockText {
+}
+.glmCartBlockDates {
+ clear: both;
+}
+.glmCartBlockDate {
+ margin-top: .5em;
+}
+.glmSpecialRequests {
+ margin: 0 0 3em 0;
+}
+#GLMcontent {
+ padding: 0;
+ margin: 0 auto
+}
+#GLMcontent>* {
+/* padding: 0 15px; */
+}
+#GLMevent, #GLMtickets, #GLMvenue {
+ /* max-width: 500px; */
+ margin: 0 auto 1em auto
+}
+#GLMnavigation:after {
+ content: "";
+ display: table;
+ clear: both
+}
+.glmNavItemInactive {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #ddd;
+ border: 1px solid #aaa;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+ text-align: center;
+}
+.glmNavItem {
+ float: right;
+ padding: 3px 10px;
+ width: auto;
+ display: block;
+ overflow: hidden;
+ background: #900;
+ border: 1px solid #900;
+ border-radius: 8px;
+ cursor: pointer;
+ text-transform: uppercase;
+}
+a.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+div.glmNavItem {
+ color: #FFF;
+ font-weight: bold;
+ text-shadow: none;
+}
+.glmNavItem.cart {
+ background: #040267;
+ border: 1px solid #040267;
+}
+.glmNavItemWide {
+ display: block;
+ width: 400px;
+ overflow: hidden;
+ margin: 12px 0 0 0;
+ padding: 8px 0;
+ background: #900;
+ border: 1px solid #900;
+ border-radius: 8px;
+ color: #FFF;
+ text-align: center;
+ vertical-align: middle;
+ font-size: 18px;
+ font-weight: bold;
+ font-family: "Times New Roman", Times, serif;
+ cursor: pointer;
+}
+.glmSelectItem {
+ padding: 5px;
+ margin: 0;
+ width: 150px;
+ border-left: 1px solid #e3e3e3;
+ cursor: pointer;
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ text-align: center;
+ font-weight: 600;
+ font-shadow: 0 1px #fff;
+ font-size: 0.85em;
+ background: #fcfcfc;
+ -webkit-background-clip: padding;
+ -moz-background-clip: padding;
+ background-clip: padding-box;
+}
+#GLMcheckout .glmNavItem, #GLMticketCart .glmNavItem {
+ width: 33.3333%
+}
+#GLMeventDates, #GLMvenueLocation, #GLMvenueDetail, #GLMvenueSectionMap {
+ margin: 0 0 15px 0
+}
+.glmPrompt {
+ font-weight: 600;
+ font-size: 1.1em
+}
+.glmTicketDescr {
+ font-size: 0.85em
+}
+.glmTicketAvailable {
+ margin: 5px 0;
+ font-weight: 600
+}
+.glmSectionTickets {
+ margin: 15px 0
+}
+.glmTicketName {
+ font-size: 1.35em;
+ font-weight: 600
+}
+.glmSectionSelector {
+ border: 1px solid #e3e3e3;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -o-border-radius: 6px;
+ border-radius: 6px;
+ cursor: pointer;
+ background-color: #f8f8f8;
+ padding: 8px 15px;
+ margin: 5px 0;
+ font-size: 1.15em;
+ font-weight: 600;
+ display: inline-block;
+ font-shadow: 0 1px #fff
+}
+.glmSectionSelector:active {
+ -webkit-box-shadow: inset 0 0 8px #dbdbdb;
+ -moz-box-shadow: inset 0 0 8px #dbdbdb;
+ box-shadow: inset 0 0 8px #dbdbdb
+}
+#GLMticketsSummary {
+ font-weight: 600;
+ font-size: 1.35em;
+ margin-top: 30px
+}
+.glmTicketsSelect {
+ clear: both;
+ margin: 1em;
+}
+.glmTicketsSelectPrompt {
+ font-size: 1em;
+ font-weight: 600;
+ line-height: 125%;
+ float: left;
+ padding-right: .2em;
+}
+.glmTicketsSelectValueWrapper {
+ float: right;
+ width: 150px;
+ text-align: right;
+}
+.glmTicketsSelectValue {
+ float: right;
+ width: 40%;
+ text-align: right;
+}
+#glmQuantSelector {
+ float: right;
+ text-align: right;
+ width: 100px;
+ height: 28px;
+}
+#GLMpolicy {
+ font-size: 0.85em;
+ font-style: italic;
+/* margin-bottom: 15px; */
+}
+.glmTicketPrice {
+ font-weight: 600;
+ margin: 15px 0 5px 0;
+ font-size: 1.25em
+}
+#GLMreason {
+ border: 1px solid #333;
+ padding: 1em;
+}
+.GLMreasonTitle {
+ color: red;
+}
+.GLMreasonList {
+}
+.GLMmapWindow {
+ width: 100%;
+ height: 140px;
+ border: 1px solid #CCC;
+}
+.glmDescr {
+}
+.glmCartFailedInput {
+ background: #FFaBa9;
+ padding: .2em;
+}
+.glmCartRequired {
+ color: red;
+}
+/* CHECKOUT STUFF */
+.glmCartFormLine {
+ clear: both;
+}
+.glmCartFormPrompt {
+ width: 30%;
+ float: left;
+ text-align: right;
+ font-weight: 600;
+ font-size: 1.1em;
+ padding-right: .5em;
+}
+.glmCartFormInput {
+ padding-left: 1em;
+ width: 70%;
+ float: left;
+ margin-bottom: .5em;
+}
+.glmCartFormInput span {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+}
+/* Forms */
+.glmCartForm {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ padding: 10px;
+ background: #F5F5F5;
+ margin: 0 0 10px 0;
+ font-size: 12px;
+ border: 1px solid #CCC;
+ color: #656565;
+}
+.glmCartForm input[type="text"] {
+ display: block;
+ float: left;
+ clear: left;
+ width: 300px;
+}
+.glmCartForm select {
+ display: block;
+ float: left;
+ clear: left;
+ width: 200px;
+}
+.glmCartPayment {
+ margin: 2em 0 0 0
+}
+.glmInput {
+ float: right;
+}
+/* Mobile */
+@media screen and (max-width:768px) {
+ .glmBlockContentRight {
+ float: left;
+ width: 100%;
+ margin-left: 0;
+ margin-right: 0;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ }
+ .glmBlockContentLeft {
+ display: inline;
+ float: left;
+ width: 100%;
+ }
+ .glmBlockContentLeft div {
+ clear: none !important;
+ }
+ /* Mobile Forms */
+
+}
+/* Small Mobile */
+@media screen and (max-width:599px) {
+ .GLMmapWindow {
+ height: 130px;
+ }
+ .glmCartFormPrompt {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ text-align: left;
+ }
+ .glmCartFormInput {
+ margin-left: 0;
+ padding-left: 0;
+ }
+ #GLMpageTitle {
+ width: 50%;
+ }
+ .glmCartHeader {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+
+ margin-bottom: 20px;
+ }
+ .glmCartHeader .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartValues {
+ float: left;
+ clear: none;
+ width: 50%;
+ overflow: hidden;
+ margin-bottom: 20px;
+ }
+ .glmCartValues .glmCartText {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ border-bottom: 1px solid #CCC;
+ height: 30px;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader {
+ float: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartHeader .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues {
+ float: right;
+ clear: right;
+ width: 66%;
+ }
+ .glmCartSubTotals .glmCartTable .glmCartValues .glmCartText {
+ width: 42%;
+ margin-right: 0;
+ margin-left: 8%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals {
+ padding-left: 0;
+ padding-right: 0;
+ }
+ .glmCartTable.totals .glmCartHeader {
+ float: right;
+ width: 100%;
+ margin-bottom: 0;
+ }
+ .glmCartTable.totals .glmCartHeader .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 1px solid #CCC;
+ height: auto;
+ text-align: right;
+ }
+ .glmCartTable.totals .glmCartValues {
+ float: right;
+ width: 100%;
+ }
+ .glmCartTable.totals .glmCartValues .glmCartText {
+ width: 28%;
+ margin-right: 0;
+ margin-left: 5%;
+ border-bottom: 0;
+ height: auto;
+ text-align: right;
+ }
+ .glmTicketsSelectValueWrapper {
+ float: left;
+ width: 150px;
+ clear: left;
+ margin-top: 10px;
+ }
+ .glmBlockLeft {
+ width: 100%;
+ }
+ .glmCartEventDescrMobile {
+ display: inline;
+ }
+ .glmCartEventDescr {
+ display: none;
+ }
+}
+/* MidSmall Mobile */
+@media screen and (max-width:449px) {
+ #GLMpageTitle {
+ font-size: 16px;
+ line-height: 20px;
+ }
+ .glmBlockName {
+ font-size: 14px;
+ line-height: 18px;
+ }
+ .glmCartFormInput {
+ width: 100%;
+ }
+ .glmCartForm input[type="text"] {
+ width: 100%;
+ }
+ .glmCartForm select {
+ width:100%;
+ }
+ .glmNavItemWide {
+ width: 100%;
+ }
+ .glmNavItem.add {
+ width: 100%;
+ text-align: center;
+ }
+ #GLMcheckoutBtn {
+ width: 100%;
+ text-align: center;
+ }
+
+}
+/* XSmall Mobile */
+@media screen and (max-width:399px) {
+ .glmNavItem.chooser {
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ margin-top: 10px;
+ text-align: center;
+ }
+}
+
+#glmReloadBlocker {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color : transparent;
+ text-align: center;
+ z-index: 1000;
+}
+#glmReloadBlocker div {
+ height: auto;
+ width: 300px;
+ padding: 10px;
+ background: #eee;
+ position: fixed;
+ border-radius: 10px;
+ border: 2px solid #666;
+ color: red;
+ font-size: 1.3em;
+ line-height: 150%;
+
+ margin: -150px 0 0 -150px;
+ left: 50%;
+ top: 60%;
+
+ box-shadow: 10px 10px 5px #888888;
+}
+#glmDevelopmentNotice {
+ padding: 5px;
+ border: 1px solid black;
+ width: auto;
+ clear: both;
+ margin-top: 4em;
+}
--- /dev/null
+/*
+ * Event Management Front-End Area JAVAScript - Tickets interface
+ */
+
+var f_loadAction = false;
+var f_replaceContents = false;
+var duration = 0;
+
+// jQuery Section
+$(document).ready(function(){
+
+ /*
+ * Data Setup Section
+ */
+
+ var siteURL = baseSiteURL;
+ var appURL = baseAppURL;
+
+ /*
+ * Load an action to a div with the specified id where id is also Action to be run
+ */
+ function loadAction(id, container, params) {
+
+ // Display loading message
+ $('#'+container).html('<div class="emBLock"><div class="emLoading">Loading, Please Wait...</div></div>');
+ $('#'+container).show(duration);
+
+ // Build the URL and call it with AJAX
+ url = appURL + "?Action=" + id;
+ if (params) {
+ url = url + '&' + params;
+ }
+ $.post( url,
+ '',
+ function(data) {
+ // Populate the container with the results
+ $('#'+container).html(data);
+ restartOnTabSelect();
+ }
+ );
+
+ }
+ f_loadAction = loadAction;
+
+ // Replace the contents of a div
+ function replaceContents(data, destination) {
+ destination.html(data);
+ }
+ f_replaceContents = replaceContents;
+
+ /*
+ * General Slider Operations
+ */
+
+ // Slider area actions
+ $('.glmSectionSelector').on('click', null, function() {
+
+ // Get the ID of the area to slide from the emSliderId="" parameter in the div tag.
+ var sliderId = $(this).attr('emSliderId');
+
+ // If the slider is currently open - close it, otherwise open it.
+ if ($('#'+sliderId).is(':visible')) {
+ $('#'+sliderId).hide(duration);
+ } else {
+ $('#'+sliderId).show(duration);
+ }
+ });
+ // Startup by closing all areas that are supposed to be closed by default
+ $('.glmSectionTickets').hide(duration);
+
+ /*
+ * Check for user timeout
+ */
+ var inactivityTime = 1800000; // Number of milliseconds to user timeout
+
+ // If theres no activity for 5 seconds do something
+ var activityTimeout = setTimeout(inActive, inactivityTime);
+
+ function resetActive(){
+ $(document.body).attr('class', 'active');
+ clearTimeout(activityTimeout);
+ activityTimeout = setTimeout(inActive, inactivityTime);
+ }
+
+ // No activity do something.
+ function inActive(){
+ alert("Your user session has timed out. Click OK to continue.");
+ window.location.href = siteURL;
+ }
+
+ // Check for mousemove, could add other events here such as checking for key presses ect.
+ $(document).bind('mousemove', function(){resetActive()});
+
+});