<?php
include"initialize_page.php";
include"systemfunctions.php";
?>
<?php include('resources/header.php') ?>
	<title></title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
<?php include('resources/css-file.php') ?>
<?php include('resources/navigation.php') ?> 
<!-- Dashboard wrapper starts -->
<div class="dashboard-wrapper">
	<div class="main-container">				
		<div class="row">
			<div class="col-sm-12 ac-summ">
				<!--<h2>Account Summary</h2>-->
				<h2>Download Forms</h2>
			</div>
		</div>
		</br>
		<div class="row">
			<div class="col-sm-12">	
				
				
							<h2>Form  List</h2>
							<div class="table-responsive">
								<table class="table">
									<thead>
										<tr>
											<th>Sr.</th>
											<th>Form Name</th>
											<th>File</th>
										
										</tr>
									</thead>
									<tbody>
									<?php
										$form_q=mysqli_query($con,"SELECT * FROM x_formspdf ORDER by x_id DESC");
											 
										$form_row = mysqli_num_rows($form_q);
										$sr = 1;
										if( $form_row>0)
							              {
										while($form_array=mysqli_fetch_array($form_q))
										{
														
										?>
										 <tr>
                                           <td><?php echo $sr;?></td>
										
										   
									
										   <td>  
										       <?php  echo $form_array['x_name'];  ?>
										   </td>
										   
											<td>
											  <a href ="pdfs/<?php  echo $form_array['x_pdf'];?>" download="Form" >  Download </a> 
											</td>
											

										  </tr>
   
                    
									<?php
											  $sr++;
										}
										 }
										 else {
									
									?>
									       <tr>
										   <td colspan="3" style="text-align:center;"><strong>No  Form Available</strong></td>
										   </tr>
									<?php
										 }
							   ?>
									</tbody>
									
								</table> 
								
							</div>
						
							  
                              
				
			</div>	
		</div>
	</div>	
</div>
<?php include('resources/footer.php') ?>
<?php include('resources/js-file.php') ?>
<script src="js/jQuery.style.switcher.js"></script>
<script type="text/javascript">
		
		
		function deletebeni(id)
		             {
						 //alert(id);
					   var r=confirm("Do you want to Delete this Beneficiary Detail..??");
  if(r==true)
  { 
  
               $.post("controller.php", { id:id, q:"remove_beneficiaryfrom"  }, function(data)
			     {
					 alert("Deleted Successfully..");
					 window.location.href='<?php  echo website_settingdata('x_weburl'); ?>user/accountbene.php';
				 }
			   );   	
		
		}	 
						 
					 }
		
		</script>