<?php 
include('config.php');

?>
<?php
if(isset($_POST['updateprofile']))
  {
$name=$_POST['fullname'];
$mobileno=$_POST['mobilenumber'];

// $city=$_POST['city'];
// $country=$_POST['country'];
$email=$_SESSION['login'];
$sql="update teachers set name=:name,phone_number=:mobileno where email=:email";
$query = $dbh->prepare($sql);
$query->bindParam(':name',$name,PDO::PARAM_STR);
$query->bindParam(':mobileno',$mobileno,PDO::PARAM_STR);
// $query->bindParam(':dob',$dob,PDO::PARAM_STR);
//$query->bindParam(':adress',$adress,PDO::PARAM_STR);
// $query->bindParam(':city',$city,PDO::PARAM_STR);
// $query->bindParam(':country',$country,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->execute();
$msg="Profile Updated Successfully";
}

?>

<?php
include('includes/user_data.php');

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


<!-- Mirrored from codervent.com/rocker/demo/vertical/user-profile.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 26 Aug 2022 06:47:36 GMT -->
<head>
	<!-- Required meta tags -->
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!--favicon-->
	<link rel="icon" href="assets/images/favicon-32x32.png" type="image/png" />
	<!--plugins-->
	<link href="assets/plugins/simplebar/css/simplebar.css" rel="stylesheet" />
	<link href="assets/plugins/perfect-scrollbar/css/perfect-scrollbar.css" rel="stylesheet" />
	<link href="assets/plugins/metismenu/css/metisMenu.min.css" rel="stylesheet" />
	<!-- loader-->
	<link href="assets/css/pace.min.css" rel="stylesheet" />
	<script src="assets/js/pace.min.js"></script>
	<!-- Bootstrap CSS -->
	<link href="assets/css/bootstrap.min.css" rel="stylesheet">
	<link href="assets/css/bootstrap-extended.css" rel="stylesheet">
	<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&amp;display=swap" rel="stylesheet">
	<link href="assets/css/app.css" rel="stylesheet">
	<link href="assets/css/icons.css" rel="stylesheet">
	<!-- Theme Style CSS -->
	<link rel="stylesheet" href="assets/css/dark-theme.css" />
	<link rel="stylesheet" href="assets/css/semi-dark.css" />
	<link rel="stylesheet" href="assets/css/header-colors.css" />
	<title> Profile</title>
	<style>
	    label{
	        margin:20px;
	    }
	</style>
</head>

<body>
	<!--wrapper-->
	<div class="wrapper">
		<!--sidebar wrapper -->
		<?php include 'includes/side.php'; ?>
		<!--end sidebar wrapper -->
		<!--start header -->
		<?php include 'includes/head.php'; ?>
		<!--end header -->
		<!--start page wrapper -->
		<div class="page-wrapper">
			<div class="page-content">
				<!--breadcrumb-->
				<div class="page-breadcrumb d-none d-sm-flex align-items-center mb-3">
					<div class="breadcrumb-title pe-3">User Profile</div>
					<div class="ps-3">
						<nav aria-label="breadcrumb">
							<ol class="breadcrumb mb-0 p-0">
								<li class="breadcrumb-item"><a href="javascript:;"><i class="bx bx-home-alt"></i></a>
								</li>
								<li class="breadcrumb-item active" aria-current="page">Student Profile</li>
							</ol>
						</nav>
					</div>
					
				</div>
				<!--end breadcrumb-->
				<div class="container">
					<div class="main-body">
						<div class="row">
							<div class="col-lg-12">
								<div class="card">
									<div class="card-body">
								

										<div class="d-flex flex-column align-items-left"style="padding:1px;">
											<img src="../staff/<?php echo $image;?>" alt="Admin" class="rounded-circle p-1 " width="180"> 
											
											
		
		
											
										<div class="row mb-3">
											<div class="col-sm-3">
												<label class="mb-0">Full Name</label>
											</div>
											<div class="col-sm-9 text-secondary">
												<input name="fullname" type="text" class="form-control" value="<?php echo $full_name;?>" readonly  />
											</div>
										</div>
										<div class="row mb-3">
											<div class="col-sm-3">
												<label class="mb-0">Class</label>
											</div>
											<div class="col-sm-9 text-secondary">
												<input name="fullname" type="text" class="form-control" value="<?php echo $class_id;?>" readonly />
											</div>
										</div>
										<div class="row mb-3">
											<div class="col-sm-3">
												<label class="mb-0">Gender </label>
											</div>
											

		
											
											
											
											<div class="col-sm-9 text-secondary">
												<input name="fullname" type="text" class="form-control" value="<?php echo $sex;?>" readonly />
											</div>
										</div>
										<div class="row mb-3">
											<div class="col-sm-3">
												<label class="mb-0">Religion</label>
											</div>
											<div class="col-sm-9 text-secondary">
												<input name="fullname" type="text" class="form-control" value="<?php echo $religion;?>" readonly/>
											</div>
										</div>
										
										<div class="row mb-3">
											<div class="col-sm-3">
												<label class="mb-0">DOB</label>
											</div>
											<div class="col-sm-9 text-secondary">
												<input name="fullname" type="text" class="form-control" value="<?php echo $dob;?>" readonly />
											</div>
										</div>
										
										<div class="row mb-3">
											<div class="col-sm-3">
												<label class="mb-0">Address</label>
											</div>
											<div class="col-sm-9 text-secondary">
												<input name="fullname" type="text" class="form-control" value="<?php echo $address;?>" readonly />
											</div>
										</div>
										
										<div class="row mb-3">
											<div class="col-sm-3">
												<label class="mb-0">Parent</label>
											</div>
											<div class="col-sm-9 text-secondary">
												<input name="fullname" type="text" class="form-control" value="<?php echo $parent_name;?>" readonly />
											</div>
										</div>
											
										<div class="row mb-3">
											<div class="col-sm-3">
												<label class="mb-0">Parent Tel</label>
											</div>
											<div class="col-sm-9 text-secondary">
												<input name="fullname" type="text" class="form-control" value="<?php echo $parent_phone;?>" readonly />
											</div>
										</div>
											
											
										</div>
										<hr class="my-4" />
										
									</div>
								</div>
							</div>
							
							
							
							
							
							
							
							
							
						
								</div>
								
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<!--end page wrapper -->
		<!--start overlay-->
		<div class="overlay toggle-icon"></div>
		<!--end overlay-->
		<!--Start Back To Top Button--> <a href="javaScript:;" class="back-to-top"><i class='bx bxs-up-arrow-alt'></i></a>
		<!--End Back To Top Button-->
		<footer class="page-footer">
			<p class="mb-0">Copyright © 2024. All right reserved.</p>
		</footer>
	</div>
	<!--end wrapper-->
	<!--start switcher-->
	<?php include 'includes/customiser.php'; ?>

	<!--end switcher-->
	<!-- Bootstrap JS -->
	<script src="assets/js/bootstrap.bundle.min.js"></script>
	<!--plugins-->
	<script src="assets/js/jquery.min.js"></script>
	<script src="assets/plugins/simplebar/js/simplebar.min.js"></script>
	<script src="assets/plugins/metismenu/js/metisMenu.min.js"></script>
	<script src="assets/plugins/perfect-scrollbar/js/perfect-scrollbar.js"></script>
	<!--app JS-->
	<script src="assets/js/app.js"></script>
</body>


<!-- Mirrored from codervent.com/rocker/demo/vertical/user-profile.html by HTTrack Website Copier/3.x [XR&CO'2014], Fri, 26 Aug 2022 06:47:36 GMT -->
</html>