<?php include("links/top.php");
$action=$_GET['action'];
?>
<?php
if($action=='delete'){
$id=$_GET['id'];

$del="delete from acc_transactions where id='$id'";
$DB->executeQuery($del);

header('Location:acc_transactions.php?action=list');
}
?>
<?php
if(isset($_POST['update'])){
$id=$_GET['id'];
extract($_POST);

$arr=array('delivery'  => $delivery,'updated' 	=> date('Y-m-d H:i:s'));
$DB->update('acc_transactions',$arr,"id='$id'");

header('Location: acc_transactions.php?action=list&oid='.$oid);
}
?>
		<div id="content">
			<div class="container">
				<div class="page-header">
					<div class="page-title">
						<h3>accommodation registrations Management</h3>
					</div>
				</div>
				<div class="row">

					<div class="col-md-12">
                     
					<div class="widget box">
                        <div class="widget-header">
                            <h4>registrations List</h4>
							</div>
                        <div class="widget-content">
                             <?php if($action=='list'){
								 $sno=1;
								$sel=executeQuery("select * from acc_registrations  ");
								?>

								<table class="table table-striped table-bordered table-hover table-checkable datatable">
									<thead>
										<tr>
											<!-- <th class="checkbox-column"><input type="checkbox" class="uniform"></th> -->
                                 <th>S.No</th>
								 <th>Name</th>
                                   <th>Email</th>
                                   <th>Alternate Email</th>
                                   <th>Phone No</th>
                                   <th>Whatsapp Phone No</th>
                                   <th>Institution</th>
                                   <th>Country</th>
                                   <th>Presentation</th>
                                   <th>No of Participations</th>
                                   <th>Regtype Price</th>
                                   
                                   <th>checkin</th>
                                   <th>checkout</th>
                                   <th>nights</th>
                                   <th>Accommodation Price</th>
                                   <th>Total accommodation</th>
                                   <th>Accomanying person fee</th>
                                   <th>Accomanying total price</th>
                                   
                                  
                                   <th>Total Price</th>
                                   
                                   <th>Date</th>

										</tr>
									</thead>
									<tbody>
                                    <?php
								  $sno=1;
								 while($rec=getAssoc($sel)){
								 	
								 	?>
										<tr>
											<!--<td class="checkbox-column"><input type="checkbox" class="uniform"></td>-->
                                 <td><?php echo $sno;?></td>

									<td><?php echo $rec['name'];?></td>
                                    <td><?php echo $rec['email'];?></td>
                                    <td><?php echo $rec['aemail'];?></td>
                                    <td><?php echo $rec['phone'];?></td>
                                    <td><?php echo $rec['wphone'];?></td>
                                    <td><?php echo $rec['institution'];?></td>
                                    
                                    <td><?php echo $rec['country'];?></td>
                                    <td><?php echo $rec['presentation'];?></td>
                                    <td><?php echo $rec['participants'];?></td>
                                    <td><?php echo $rec['regtype'];?></td>
                                   
                                    <td><?php echo $rec['checkin'];?></td>
                                    <td><?php echo $rec['checkout'];?></td>
                                    <td><?php echo $rec['nights'];?></td>
                                     <td><?php echo $rec['accomm'];?></td>
                                    <td><?php echo $rec['accm'];?></td>
                                    <td><?php echo $rec['acmpng'];?></td>
                                    <td><?php echo $rec['acc_pr'];?></td>
                                    <td>$<?php echo $rec['tot_price'];?></td>
                                    
                                  <?php /*  <td><?php if($rec['status']=='0'){?> Failed <?php } ?> <?php if($rec['status']=='1'){?> Sucess <?php } ?></td> */ ?>
                                    
                                    <td><?php echo $rec['now'];?></td>
										</tr>
                                        <?php $sno++;}?>
									</tbody>
								</table>

                            <?php }?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
	<?php include("links/bottom.php");?>