<?php
include"initialize_page.php";

?>
<!DOCTYPE html>
<html lang="en">

<head>
  
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

	<title>Contact Us</title>

	<!-- Bootstrap core CSS -->
	<link rel="stylesheet" href="assets/css/bootstrap/bootstrap.css" /> 

	<!-- datatables Styling  -->
    <link rel="stylesheet" href="assets/css/plugins/datatables/jquery.dataTables.css" />
    
    <!-- Fonts  -->
    <link href='http://fonts.googleapis.com/css?family=Raleway:400,500,600,700,300' rel='stylesheet' type='text/css'>
    
    <!-- Base Styling  -->
    <link rel="stylesheet" href="assets/css/app/app.v1.css" />

	<script type="text/javascript" src="jquery-1.11.1.min.js"></script>
		
	
   
   
   
</head>
<body>

 
	

    

    
    
    
	<?php    include"xleftmenu.php"; ?>
    
    <section class="content">
    	
         <?php  include"xheader.php";  ?>
        <!-- Header Ends -->
        
        
        <div class="warper container-fluid">
        	
            <div class="page-header"><h1>Contact Us <?php //echo time();  ?></h1></div>
            
       
            
                <div class="panel panel-default">
                  
                     
                   
                    <div class="row">
                    <div class="col-md-12">
                    <div class="panel-body">
                   
<table class="table table-striped table-bordered" id="basic-datatable" width="100%">
        <thead>
            <tr>
                <th>Name/Email</th>
                <th>Subject	</th>
                  <th>Reason</th>
                <th>Comments</th>
               
                 <th>Action</th>
              
            </tr>
        </thead>
        <tbody>
                            
                             <?php
						  $sr=1;
						 
						  
						      $data_q=mysqli_query($con,"SELECT b.x_fname, b.x_lname, b.x_email, a.x_subject, a.x_reason, a.x_msg, a.x_id 
							                       FROM x_contact a, x_users b 
												   WHERE a.x_userid=b.x_id
												   ORDER by a.x_id DESC");  
							  
							
							   
			while($data_array=mysqli_fetch_array($data_q))
			{
				
			?>
                <tr class="odd gradeX">
              
                
                
             
                 
                
                    
                       <td><?php echo $data_array[0];  ?> <?php echo $data_array[1];  ?>/<?php echo $data_array[2];  ?></td>
                      
                  <td><?php echo $data_array[3];  ?></td>
                  <td><?php echo $data_array[4];  ?></td>
<td><?php echo $data_array[5];  ?></td>
                
                <td><a href="<?php   echo website_settingdata('x_weburl');   ?>admin/view_contact.php?id=<?php echo $data_array[6];  ?>&ss=<?php  echo md5(rand(00000,99999));    ?>"><button class="btn btn-primary" >View</button></a></td>
               
                                 
                </tr>
			<?php
            
            $sr++;
            }
            ?>  
</tbody>
</table>

</div></div>
</div></div>
</div>
<!-- Warper Ends Here (working area) -->


<footer class="container-fluid footer">
Copyright &copy; <?php    echo date('Y');  ?>
</footer>


</section>
<!-- Content Block Ends Here (right box)-->



<!-- JQuery v1.9.1 -->
			<script src="assets/js/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
            
            <!-- Bootstrap -->
            <script src="assets/js/bootstrap/bootstrap.min.js"></script>
            
            <!-- NanoScroll -->
            <script src="assets/js/plugins/nicescroll/jquery.nicescroll.min.js"></script>
            
            
            <!-- Data Table -->
            <script src="assets/js/plugins/datatables/jquery.dataTables.js"></script>
            <script src="assets/js/plugins/datatables/DT_bootstrap.js"></script>
            <script src="assets/js/plugins/datatables/jquery.dataTables-conf.js"></script>
            
            
            <!-- Custom JQuery -->
            <script src="assets/js/app/custom.js" type="text/javascript"></script>
            
            
            
            <script>
            (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
            (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
            m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
            })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
            
            ga('create', 'UA-56821827-1', 'auto');
            ga('send', 'pageview');
            
            </script>
</body>
</html>
