rendered paste body<div align="center">
<?php
require_once('../../Connections/Shopping.php');
require_once('../../Connections/ghostlicense.php');
mysql_select_db($database_Shopping, $Shopping);
$query_Ghost_Hunt_Dates = "SELECT CubeCart_inventory.name FROM CubeCart_inventory WHERE CubeCart_inventory.cat_id =6 ORDER BY CubeCart_inventory.productId";
$Ghost_Hunt_Dates = mysql_query($query_Ghost_Hunt_Dates, $Shopping) or die(mysql_error());
$row_Ghost_Hunt_Dates = mysql_fetch_assoc($Ghost_Hunt_Dates);
$totalRows_Ghost_Hunt_Dates = mysql_num_rows($Ghost_Hunt_Dates);
mysql_select_db($database_ghostlicense, $ghostlicense);
$query_Tour_Date = "SELECT * FROM license ORDER BY Last_Name";
$result = mysql_query( $query_Tour_Date ) or die( mysql_error() );
if ( isset( $_GET['order'] ) ) {
$query_Tour_Date = "SELECT * FROM license ORDER BY " . mysql_real_escape_string( $_GET['order'] );
$result = mysql_query( $query_Tour_Date ) or die( mysql_error() );
}
if(isset($_POST['filter'])){
if($fGhost_Hunt=='all'){
$query_Tour_Date = "SELECT * FROM license ORDER BY Last_Name";
$result = mysql_query($query_Tour_Date) or die(mysql_error());
$Tour_Date = mysql_query($query_Tour_Date, $ghostlicense) or die(mysql_error());
$row_Tour_Date = mysql_fetch_assoc($Tour_Date);
}else{
$query_Tour_Date = "SELECT * FROM license WHERE Ghost_Hunt = '$fGhost_Hunt' ORDER BY Last_Name";
$result = mysql_query($query_Tour_Date) or die(mysql_error());
$Tour_Date = mysql_query($query_Tour_Date, $ghostlicense) or die(mysql_error());
$row_Tour_Date = mysql_fetch_assoc($Tour_Date);
}
}
if ( isset( $_GET['id'] ) ) {
$query_Tour_Date = "SELECT * FROM license WHERE ID = " . mysql_real_escape_string( $_GET['id'] );
$result = mysql_query( $query_Tour_Date ) or die( mysql_error() );
}
$Tour_Date = mysql_query( $query_Tour_Date, $ghostlicense ) or die( mysql_error() );
$row_Tour_Date = mysql_fetch_assoc( $Tour_Date );
if ( isset( $_GET['delete'] ) ) {
$query_Delete = "delete FROM license WHERE ID =" . mysql_real_escape_string($_GET['delete']);
header( 'location: http://www.wvpentours.com/admin/ghost_license_2008.php' );
$result = mysql_query( $query_Delete ) or die( mysql_error() );
}
if ( isset( $_GET['edit'] ) ) {
$fFirst_Name = mysql_real_escape_string( $_POST['fFirst_Name'] );
$fLast_Name = mysql_real_escape_string( $_POST['fLast_Name'] );
$fAddress = mysql_real_escape_string( $_POST['fAddress'] );
$fCity = mysql_real_escape_string( $_POST['fCity'] );
$fState = mysql_real_escape_string( $_POST['fState'] );
$fZip_Code = mysql_real_escape_string( $_POST['fZip_Code'] );
$fPhone = mysql_real_escape_string( $_POST['fPhone'] );
$fEMail = mysql_real_escape_string( $_POST['fEMail'] );
$fDate = mysql_real_escape_string( $_POST['fDate'] );
$fLicense = mysql_real_escape_string( $_POST['fLicense'] );
$fGhost_Hunt = mysql_real_escape_string( $_POST['aGhost_Hunt'] );
$fComments = mysql_real_escape_string( $_POST['fComments'] );
$fPeople_Attending = mysql_real_escape_string( $_POST['fPeople_Attending'] );
$query_edit =
"UPDATE
wvpentou_ghostlicense.license
SET
First_Name = '$fFirst_Name',
Last_Name = '$fLast_Name',
Address = '$fAddress',
City = '$fCity', State = '$fState',
Zip_Code = '$fZip_Code',
Phone = '$fPhone', EMail = '$fEMail',
Date = '$fDate',
Terms_Of_Service = '$fLicense',
Ghost_Hunt = '$fGhost_Hunt',
Comments = '$fComments',
People_Attending = '$fPeople_Attending'
WHERE
ID =" . mysql_real_escape_string( $_GET['edit'] );
header( 'location: http://www.wvpentours.com/admin/ghost_license_2008.php' );
$result = mysql_query( $query_edit ) or die( mysql_error() );
}
?>
<!-- DO NOT MOVE! The following AllWebMenus code must always be placed right AFTER the BODY tag-->
<!-- ******** BEGIN ALLWEBMENUS CODE FOR menu ******** -->
<script type='text/javascript'>var MenuLinkedBy='AllWebMenus [4]',awmMenuName='menu',awmBN='DW';awmAltUrl='';</script>
<script charset='UTF-8' src='menu.js' type='text/javascript'></script>
<script type='text/javascript'>awmBuildMenu();</script>
<!-- ******** END ALLWEBMENUS CODE FOR menu ******** -->
<style type="text/css">
<!--
.style5 {font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; }
body {
background-color: #FFFFD5;
}
.style8 {color: #0000066}
.style9 {font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #000066; }
.style10 {color: #000066; }
.style11 {font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #000066; }
-->
FORM {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000080;
border: 2px solid #4682B4;
padding: 5px;
background-color: #0099CC;
}
table {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #000080;
border-color: #0066CC;
background-color: #0099CC;
}
input {
font-size:10px;
}
</style>
<span id='awmAnchor-menu'> </span>
</div>
<p> </p>
<form id="filter" name="filter" method="post" action="<?php echo "edit_ghost_license.php?filter='" . $fGhost_Hunt . "'";?>">
<table border="0">
<tr>
<td>
<select name="fGhost_Hunt">
<option name="Ghost Hunt" value='all'>All Ghost Hunts</option>
<?php
do {
?>
<option name="Ghost_Hunt" value="<?php echo $row_Ghost_Hunt_Dates['name']?>"><?php echo $row_Ghost_Hunt_Dates['name']?></option>
<?php
} while ($row_Ghost_Hunt_Dates = mysql_fetch_assoc($Ghost_Hunt_Dates));
$rows = mysql_num_rows($Ghost_Hunt_Dates);
?>
</select>
</td>
<td><input type="submit" value="Filter" name="filter"></td>
</tr>
</table>
</form>
<table border="1">
<?php
$menu_background = "awmdata/main-button-tile.gif";
?>
<tr> <td><div align="center" class="style10 style11 style13 style15"><img width=16 height=16 src="email.gif"></div></td>
<td><div align="center" class="style10 style11 style13 style15"><img src="edit.png"></div></td>
<td><div align="center" class="style10 style11 style13 style15"><img src="drop.png"></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style13 style15"><a href="edit_ghost_license.php?order=ID">ID</a></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style13 style15"> <a href="edit_ghost_license.php?order=Last_Name">Last_Name</a> </div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style13 style15"><a href="edit_ghost_license.php?order=First_Name">First_Name</a></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style13 style15"><a href="edit_ghost_license.php?order=Address">Address</a></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style13 style15"> <a href="edit_ghost_license.php?order=City">City</a></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style13 style15"><a href="edit_ghost_license.php?order=State">State</a></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style13 style15"><a href="edit_ghost_license.php?order=Zip_Code">Zip_Code</a></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style13 style15"><a href="edit_ghost_license.php?order=Phone">Phone</a></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style13 style15"><a href="edit_ghost_license.php?order=EMail">EMail</a></div></td>
<td width="120" background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style13 style15"><a href="edit_ghost_license.php?order=Date">Date</a></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style15 style13"><a href="edit_ghost_license.php?order=Ghost_Hunt">Ghost_Hunt</a></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style15 style13"><a href="edit_ghost_license.php?order=Comments">Comments</a></div></td>
<td background="<?php echo $menu_background ;
?>" bgcolor="#FFFF00"><div align="center" class="style10 style11 style15 style13"><a href="edit_ghost_license.php?order=People_Attending">People_Attending</a></div></td>
</tr>
<?php do {
?>
<tr>
<?php
$GID = $row_Tour_Date['ID'];
$GLast_Name = $row_Tour_Date['Last_Name'];
$GFirst_Name = $row_Tour_Date['First_Name'];
$GAddress = $row_Tour_Date['Address'];
$GCity = $row_Tour_Date['City'];
$GState = $row_Tour_Date['State'];
$GZip_Code = $row_Tour_Date['Zip_Code'];
$GPhone = $row_Tour_Date['Phone'];
$GEMail = $row_Tour_Date['EMail'];
$GDate = $row_Tour_Date['Date'];
$GLicense = $row_Tour_Date['Terms_Of_Service'];
$GGhost_Hunt = $row_Tour_Date['Ghost_Hunt'];
$GComments = $row_Tour_Date['Comments'];
$GPeople_Attending = $row_Tour_Date['People_Attending'];
?>
<form id="edit" name="edit" action="edit_ghost_license.php?edit=<?php echo $GID ;?>" target="_self" method="post">
<td background ="<?php echo $menu_background ;
?>"><div align="center" class="style8"><span class="style5"><a href="mailto:<?php echo $GEMail;
?>?subject=Email from WVPenTours&body=Dear <?php echo $GFirst_Name . " " . $GLast_Name;
?>,"><img border=0 width=16 height=16 src="email.gif"></a></span></div></td>
<td background ="<?php echo $menu_background ;
?>"> <div align="center" class="style8"><span class="style5">
<img onClick="submit();" border=0 src="edit.png">
</a></span></div></td>
<td background =" <?php echo $menu_background ;
?>"><div align="center" class="style8"><span class="style5"><a onclick="javascript:return confirm('Are you sure you want to delete <?php echo $GFirst_Name . " " . $GLast_Name . " for " . $GGhost_Hunt ; ?>?')" href="edit_ghost_license.php?delete=<?php echo $GID;
?>"><img border=0 src="drop.png"></span></div></td>
<td><div align="center" class="style8"><span class="style5"><?php echo $GID;
?></span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="fLast_Name" type="text" value="<?php echo $GLast_Name;
?>" size="10">
</span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="fFirst_Name" size="5" type="text" value="<?php echo $GFirst_Name;
?>"></span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="fAddress" size="25" type="text" value="<?php echo $GAddress;
?>"></span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="fCity" size="10" type="text" value="<?php echo $GCity;
?>"></span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="fState" size="1" type="text" value="<?php echo $GState;
?>"></span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="fZip_Code" size="5" type="text" value="<?php echo $GZip_Code;
?>"></span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="fPhone" size="10" type="text" value="<?php echo $GPhone;
?>"></span></div></td>
<td><div align="center" class="style8"><span class="style5">
<input name="fEMail" size="35" type="text" value="<?php echo $GEMail;
?>"></span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="fDate" size="10" type="text" value="<?php echo $GDate;
?>"></span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="aGhost_Hunt" size="30" type="text" value="<?php echo $GGhost_Hunt;
?>"></span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="fComments" size="30" type="text" width=255 value="<?php echo $GComments;
?>"></span></div></td>
<td><div align="center" class="style8"><span class="style5"><input name="fPeople_Attending" size="30" type="text" width=255 value="<?php echo $GPeople_Attending;
?>"></span></div></td>
</span></form>
</tr>
<?php } while ( $row_Tour_Date = mysql_fetch_assoc( $Tour_Date ) );
?>
</table>
<?php
mysql_free_result( $Tour_Date );
?>