<!DOCTYPE html>

<html class="no-js" lang="en">
<head>
<link rel="shortcut icon" type="image/x-icon" href="images/Anandvanfevicon.ico">
  <!-- title and meta -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0" />
<meta name="description" content="">
<meta name="keywords" content="De-Addiction Centers in Pune, E-Addiction Center, Pune Addiction, Mobile De-Addiction">
<link rel="shortcut icon" type="image/x-icon" href="../images/favicon.ico"> 
<title>Partners E-Addiction Test | Anandvan</title>
  
<link href="css/stylesheet.css" type="text/css" rel="stylesheet" />
<link href="css/responsive.css" type="text/css" rel="stylesheet" />
<link href="css/bootstrap.min.css" type="text/css" rel="stylesheet">
<link href="css/datatables.min.css" type="text/css" rel="stylesheet">

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/datatables.min.js"></script>
<script>
	$(document).ready(function () {
   $('#dataTable').DataTable();
});

</script>
<!--for slider-->
 <link rel="stylesheet" href="css/demo.css">


  <!-- css 
  <link rel="stylesheet" href="css/base.css">-->
  <link rel="stylesheet" href="css/style.css">

  <!-- js -->
  <script src="js/modernizr.js"></script>
</head>

<body>
<?php
session_start();
include 'database.php';
if (isset($_SESSION['session_empid'])) {


$sql = "SELECT * FROM partner_e_addiction ORDER BY test_id desc";
$result = mysqli_query($conn,$sql);
    

?>

<div class="wrapper">

<div class="topline"></div><!--topline-->
<div class="header">
<div class="container">

<div class="rightside">
<div class="menu">
<nav class="navbar navbar-default navigation">
  <div class="container-fluid space2">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
	  <!--<a class="navbar-brand" href="#">Menu</a>-->
     </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse style_menu" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><a href="dashboard.php" >Child Technology Test</a></li>
		<li><a href="dashbard-self-addiction.php" >Self E-Addiction Test</a></li>
		<li><a href="dashbard-partner-addiction.php" class="active_tab spin"><span class="blue">Partners E-Addiction Test</span></a></li>
      </ul>
      
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
</div>
</div><!--rightside-->
<div class="top_header">
<div class="info">
<h4><a href="logout.php" class="logoutbtn">Logout</a></h4>

</div>


</div><!--top_header-->
</div><!--container-->
</div><!--header-->


  <main>
      


      <section class="module test-outerblock">
        	<div class="test-heading">
		 		<h2>Partners E-Addiction Test</h2>
		    </div><!--test-club-->
<div class="container">
	<div class="row">
		<div class="col-sm-12">
			<?php
			if ($result->num_rows > 0) {
				?>
							<div class="table-responsive testtable">
				<table class="table table-bordered table-striped" id="dataTable">
					<thead>
					<tr>
						<th>Name</th>
						<th>Email</th>
						<th>Contact No.</th>
						<th>Question 1</th>
						<th>Question 2</th>
						<th>Question 3</th>
						<th>Question 4</th>
						<th>Question 5</th>
						<th>Question 6</th>
						<th>Action</th>
					</tr>
				</thead>
				<tbody>
				<?php
				while($row = mysqli_fetch_assoc($result)) {
					?>
					<tr>
						<td><?php echo $row["name"]; ?></td>
						<td><?php echo $row["email"]; ?></td>
						<td><?php echo $row["contactno"]; ?></td>
						<td><?php echo $row["question1"]; ?></td>
						<td><?php echo $row["question2"]; ?></td>
						<td><?php echo $row["question3"]; ?></td>
						<td><?php echo $row["question4"]; ?></td>
						<td><?php echo $row["question5"]; ?></td>
						<td><?php echo $row["question6"]; ?></td>
			              <td class="text-center"><a href="<?php echo 'delete_record.php?record_partnertest='.$row['test_id'];?>" onclick="return confirm('Are you sure you want to delete record ?');" class="btn btn-primary btn-sm">Delete</a></td>
					</tr>
					<?php
				}
				?>
				</tbody>
				</table>
			</div>


				<?php
}else{
	echo "<h3>No data found</h3>";
}
	
	mysqli_close($conn);
	?>
 

		</div>
	</div>
</div><!--container-->

		</section>
		</main>    
  </div>
<?php }else{
	echo "<h4>You don't have rights to access this page !!!</h4>";
} ?>
</body>
</html>