<?php
session_start();
include("header.php");
include("leftSideMenu.php");
include("../config.php");
?>

<script type="text/javascript">
function confirmDelete() {
	var agree = confirm("Are you sure to delete this user");
	if (agree) return true;
	else return false ;
}
</script>

<div id="main">
	<div class="full_w">
		<div class="h_title">Ticket Status</div>
		<h2>
		    <?php
		        if($_GET['eid']==26){
		            echo "DC Event (26 July) Ticket Status";
		        } else if($_GET['eid']==27) {
		            echo "NYC Event (27 July) Ticket Status";
		            
		        } else if($_GET['eid']== 2){
		        
		        	echo "CA Event (2 August) Ticket Status";
		        }
		        
		    ?>
		</h2>
		<p>Gala 2014 Ticket status</p>
         <div style="float: right; font-size: 14px; padding: 31px;">
            <a href="printAllpdf.php?eid=<?php echo base64_encode($_GET['eid']) ?>">Print All tickets</a>
        </div>			
		<div class="entry">
			<div class="sep"></div>
		</div>
		<table>
			<thead>
				<tr>
					<!--<th scope="col">Event Name</th>-->
					<th scope="col">Ticket Type</th>
                      <th scope="col">Ticket Starting from</th>
                     <th scope="col">Total generated ticket</th>
                      <th scope="col">Remaining ticket</th>
                      <th scope="col">Action</th>
				</tr>
			</thead>
            <?php
            $sqlGetUsers = "SELECT * FROM ticket_master where event_number='".$_GET['eid']."'";

            $usersListing = mysql_query($sqlGetUsers);
            while($users = mysql_fetch_array($usersListing)){
            if($users['event_number']=="26"){
                    $event = "DC  (26th July 2014: 7:30pm)";
            } else if ($users['event_number']=="27"){
                    $event = "NYC (27th July: 6:30pm)";
                    
            } else if($users['event_number']=="2"){
            
            		$event = "CA (2nd August: 6:00pm)";
            }
            ?>
            <tbody>
                <tr>
                  <!--<td><?php echo $event;?></td>-->
                  <td><?php echo $users['tkt_type'];?></td>
                  <td><?php echo $users['tkt_start'];?></td>
                  <td><?php echo ($users['tkt_current'] - $users['tkt_start']);?></td>
                 <td><?php echo ($users['tkt_end'] - $users['tkt_current']+1);?></td>
                 <td><a href="printcategorywisepdf.php?pid=<?php echo base64_encode($_GET['eid']);?>&type=<?php echo base64_encode($users['tkt_type']);?>" title="View Details">Print Ticket</a></td>
                </tr>
            </tbody>
            <?php
            } 
            ?>
		</table>
	</div>

</div>
<div class="clear"></div>
</div>

<?php include("footer.php"); ?>
