관리-도구
편집 파일: tix_details.php
<?php if ($_POST['res_seating']!='0') { session_start(); $dbhost = 'internal-db.s3783.gridserver.com'; $dbusername = 'aaronmeyer'; $dbuserpassword = 'CQDZZDsu'; $default_dbname = 'db3783_ticketingSystem'; $link_id = mysql_connect($dbhost, $dbusername, $dbuserpassword); $dbid = mysql_select_db($default_dbname); $_SESSION['res_seating']= $_POST['res_seating']; $_SESSION['gen_1_seating']= $_POST['gen_1_seating']; $_SESSION['gen_2_seating']= $_POST['gen_2_seating']; $_SESSION['event_eid']= $_POST['eid']; $_SESSION['visitIp']= $_SERVER['REMOTE_ADDR']; $sql = "delete from `tempseating` where sessionticketid='" . $_SERVER['REMOTE_ADDR'] . "'"; $res = mysql_query($sql); $sql = "delete from `tempseating_details` where sessionticketid='" . $_SERVER['REMOTE_ADDR'] . "'"; $res = mysql_query($sql); $sql = "insert into `tempseating` values ('" . $_SERVER['REMOTE_ADDR'] . "', '" . $_POST['res_seating'] . "', '" . $_POST['gen_1_seating'] . "', '" . $_POST['gen_2_seating'] . "', '', '', '', '')"; $res = mysql_query($sql); header('Location:tix_seating.php'); } $referrer = strpos($_SERVER['HTTP_REFERER'],"seatReserve.php"); if ($referrer != '') $functun = 'Y'; else $functun = 'N'; if (($functun == 'Y') && ($_POST['res_seating']=='0') && (($_POST['gen_1_seating']!='0') || ($_POST['gen_2_seating']!='0'))) { session_start(); $dbhost = 'internal-db.s3783.gridserver.com'; $dbusername = 'aaronmeyer'; $dbuserpassword = 'CQDZZDsu'; $default_dbname = 'db3783_ticketingSystem'; $link_id = mysql_connect($dbhost, $dbusername, $dbuserpassword); $dbid = mysql_select_db($default_dbname); $_SESSION['res_seating']= $_POST['res_seating']; $_SESSION['gen_1_seating']= $_POST['gen_1_seating']; $_SESSION['gen_2_seating']= $_POST['gen_2_seating']; $_SESSION['event_eid']= $_POST['eid']; $_SESSION['visitIp']= $_SERVER['REMOTE_ADDR']; $sql = "delete from `tempseating` where sessionticketid='" . $_SERVER['REMOTE_ADDR'] . "'"; $res = mysql_query($sql); $sql = "delete from `tempseating_details` where sessionticketid='" . $_SERVER['REMOTE_ADDR'] . "'"; $res = mysql_query($sql); $sql = "insert into `tempseating` values ('" . $_SERVER['REMOTE_ADDR'] . "', '" . $_POST['res_seating'] . "', '" . $_POST['gen_1_seating'] . "', '" . $_POST['gen_2_seating'] . "', '', '', '', '')"; $res = mysql_query($sql); } session_start(); $dbhost = 'internal-db.s3783.gridserver.com'; $dbusername = 'aaronmeyer'; $dbuserpassword = 'CQDZZDsu'; $default_dbname = 'db3783_ticketingSystem'; $link_id = mysql_connect($dbhost, $dbusername, $dbuserpassword); $dbid = mysql_select_db($default_dbname); ?> <link rel="stylesheet" href="../../inc/styles.css" type="text/css" /> <style type="text/css"> <!-- .style4 {font-family: Georgia, "Times New Roman", Times, serif; } .style14 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; } .style15 {font-family: Georgia, "Times New Roman", Times, serif; font-weight: bold; } .style16 {color: #F2F2F2} .style17 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; color: #F2F2F2; } --> </style> <script language="Javascript"> function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features); } </script> <form id="frmDetails" name="frmDetails" method="post" action="tix_confirmOrder.php"> <input type="hidden" name="actiontype" id="actiontype" value="PersonalDetails" /> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000"> <tr> <td><table width="100%" border="0" cellspacing="1" cellpadding="4"> <tr> <td width="50%" height="25" bgcolor="#FFFFFF"><? echo '<b class="red">'."Zupan's Markets Aaron Meyer Holiday Concerts & CD Release".'</b><p>'; echo 'Presented by American Industries, Inc.<br><em><b>'.'Experience A Northwest Holiday Tradition'.'</em></b><br><br>'; echo '<b>Venue Information:<br>First Congregational Church</b> - the historic church with the white tower - 1126 SW Park Ave between Madison & Main across from Portland Art Museum and next to Portland Center for Performing Arts. For directions <a href="http://www.mapquest.com/maps?city=Portland&state=OR&address=1126+SW+Park+Avenue&zipcode=97205" target="_BLANK">click here</a><br>'; ?> </td> <td width="50%" align="center" valign="middle" bgcolor="#FFFFFF"><a href="#" onclick="MM_openBrWindow('../seating.gif','splan','width=730,height=580')"><img src="../seating.gif" width="250" height="180" /></a><br /> Click to zoom </td> </tr> <tr> <td colspan="2" bgcolor="#FFFFFF" class="style15">Your Current Selection....</td> </tr> <tr> <td colspan="2" bgcolor="#000000" class="style4"><table width="100%" border="0" cellpadding="3" cellspacing="2" bgcolor="#FFFFFF"> <tr> <td width="50%" align="right" bgcolor="#F8F8F8" class="style14">Reserved Seats </td> <td width="6%" align="right" bgcolor="#F0F0F0" class="style14"><?php echo $_SESSION['res_seating']; ?></td> <td width="44%" align="right" bgcolor="#EBEBEB" class="style14"> <?php if ($_SESSION['res_seating']!='0') { $sql = "select seatid from eventseatingplan where id in (select resseatid from tempseating_details where sessionticketid='" . $_SESSION['visitIp'] . "')"; $res = mysql_query($sql); while ($row = mysql_fetch_row($res)) { $seatnumbers .= trim(substr($row[0],0,6)) . ', '; } } if ($seatnumbers=='') echo 'No Reserved Seats Selected'; else { $seatnumbers = trim(substr($seatnumbers,0,strlen(trim($seatnumbers))-1)); echo 'Selected Seats - ' . $seatnumbers; } ?> </td> </tr> <tr> <td align="right" bgcolor="#F8F8F8" class="style14">General Admission Adult </td> <td align="right" bgcolor="#F0F0F0" class="style14"><?php echo $_SESSION['gen_1_seating']; ?></td> <td align="right" bgcolor="#EBEBEB" class="style14"><?php if ($_SESSION['gen_1_seating']=='0') echo 'No General Admission tickets purchased'; else echo $_SESSION['gen_1_seating'] . ' General Admission Tickets Selected'; ?> </td> </tr> <tr> <td align="right" bgcolor="#F8F8F8" class="style14">General Admission (Senior, Children, Student) </td> <td align="right" bgcolor="#F0F0F0" class="style14"><?php echo $_SESSION['gen_2_seating']; ?></td> <td align="right" bgcolor="#EBEBEB" class="style14"><?php if ($_SESSION['gen_2_seating']=='0') echo 'No General Admission tickets selected'; else echo $_SESSION['gen_2_seating'] . ' General Admission Tickets Selected'; ?> </td> </tr> </table></td> </tr> <tr> <td colspan="2" bgcolor="#FFFFFF" class="style4"> </td> </tr> <tr> <td height="45" colspan="2" bgcolor="#FFFFFF"><label> <div align="center"> <input type="submit" name="Submit" value=" Reserve Now " /> </div> </label></td> </tr> </table></td> </tr> </table> </form> </body> </html>