<?php
session_start();
include("dbConfig.php");
if(isset($_SESSION['username']) && isset($_SESSION['name']))
{
    $username=$_SESSION['username'];
    $name=$_SESSION['name'];
}
else
{
     echo '<META http-equiv="refresh" content="0;logout.php">';
}

?><?php
include("dbConfig.php");
if(isset($_GET['staffid'])){
$staffid=$_GET['staffid'];

$query=mysqli_query($db,"SELECT * FROM staffdetails WHERE StaffId='$staffid'");
          if(mysqli_num_rows($query)!=0){
          while($row=$query->fetch_assoc()){
$StaffName=$row['Name'];
$Group=$row['StaffGroup'];
$Spec=$row['Specification']; 
$FHN=$row['FatherHusband']; 
$Contact=$row['Contact'];
$EmContact=$row['EmContact']; 
$Email =$row['Email'];
$dob =$row['dob'];
$Gender =$row['Gender'];
$Blood =$row['Blood'];
$Education=$row['Education'];
$Address=$row['Address'];
$Photo=$row['Photo'];
          }
?>

<!DOCTYPE html>
<html>
<head>
  <title>
    
  </title>
  <meta charset="UTF-8">
  <link href="assets/img/favicon.png" rel="icon">
  <link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon">
  <script src='https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.css'>
<link href='https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css'>
  <!-- Google Fonts -->
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Raleway:300,400,500,700,800|Montserrat:300,400,700" rel="stylesheet">
<link href='https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css'>
<link href='https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.css'>

  <!-- Vendor CSS Files -->
  <link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="assets/vendor/ionicons/css/ionicons.min.css" rel="stylesheet">
  <link href="assets/vendor/animate.css/animate.min.css" rel="stylesheet">
  <link href="assets/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet">
  <link href="assets/vendor/venobox/venobox.css" rel="stylesheet">
  <link href="assets/vendor/owl.carousel/assets/owl.carousel.min.css" rel="stylesheet">
  <link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <script src="https://code.jquery.com/jquery.min.js"></script>
  <script src="jquery.dependent.fields.js"></script>
  <!-- Template Main CSS File -->
  <link href="assets/css/style.css" rel="stylesheet">
  <script src="https://code.jquery.com/jquery.min.js"></script>
<script src="jquery.dependent.fields.js"></script>
<style>
    .footer {
   position: relative;
   left: 0;
   bottom: 0;
   width: 100%;
   background-color: #efe8e8;
   color: black;
   text-align: center;
   padding:4px;
   font-size:12px;
}
</style>
</head>
<body>

<section>
	<div class="row">
		<div class="col-md-2"></div>
		<div class="col-md-8">
	            		
<button type="button" class="btn btn-primary btn-lg" onclick="history.back()">Back</button>
	<div class="shadow p-3 mb-5 bg-light rounded">
	<h2>Staff Information</h2>
	<table class="table table-striped">
	<tr>
		<td>Staff Name</td>
		<td><? echo $StaffName;?></td>
	</tr>
	<tr>
		<td>Staff Group</td>
		<td><? echo $Group;?></td>
	</tr>
	<tr>
		<td>Specialisation</td>
		<td><? echo $Spec;?></td>
	</tr>
	<tr>
		<td>Father/Wife/Husband Name</td>
		<td><? echo $FHN;?></td>
	</tr>
	<tr>
		<td>Contact No.</td>
		<td><? echo $Contact;?></td>
	</tr>
	<tr>
		<td>Emergency Contact No.</td>
		<td><? echo $EmContact;?></td>
	</tr>
	<tr>
		<td>Email Id</td>
		<td><? echo $Email;?></td>
	</tr>
	<tr>
		<td>Date of Birth</td>
		<td><? echo $dob;?></td>
	</tr>
	<tr>
		<td>Gender</td>
		<td><? echo $Gender;?></td>
	</tr>
	<tr>
		<td>Blood Group</td>
		<td><? echo $Blood;?></td>
	</tr>
	<tr>
		<td>Education</td>
		<td><? echo $Education;?></td>
	</tr>
	<tr>
		<td>Address</td>
		<td><? echo $Address;?></td>
	</tr>
		<?if($Photo!=""){
			echo "<tr><td>Staff Photo</td>";
			echo "<td><img src=\"assets/StaffPhotos/$Photo\" width=\"70px\" height=\"70px\"></td></tr>";
		}
		?>
</table>            
            

		</div>
		<div class="col-md-2"></div>
	</div>
</div>
</section>
 <script src='https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js'></script>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js'></script>
  <script src="assets/vendor/jquery/jquery.min.js"></script>
  <script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  <script src="assets/vendor/jquery.easing/jquery.easing.min.js"></script>
  <script src="assets/vendor/php-email-form/validate.js"></script>
  <script src="assets/vendor/wow/wow.min.js"></script>
  <script src="assets/vendor/venobox/venobox.min.js"></script>
  <script src="assets/vendor/owl.carousel/owl.carousel.min.js"></script>
  <script src="assets/vendor/jquery-sticky/jquery.sticky.js"></script>
  <script src="assets/vendor/superfish/superfish.min.js"></script>
  <script src="assets/vendor/hoverIntent/hoverIntent.js"></script>
  <script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
  <script src="assets/js/main.js"></script>
</body>
</html>
<?
 }
}
?>