<!doctype html>
<?php 
include("../connection.php");
include("../user.php");
?>
<?php 
$user_id=$_REQUEST['user_id'];
$edituser=mysqli_fetch_array(mysqli_query($con,"select  * from user_master where user_id='$user_id'"));	

?>
 <html class="no-js" lang=""> 
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title><?php echo TITLE;?></title>
    <meta name="description" content="Ela Admin - HTML5 Admin Template">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="apple-touch-icon" href="../images/bluebase.png">
    <link rel="shortcut icon" href="../images/bluebase.png">
    <!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/html5shiv/3.7.3/html5shiv.min.js"></script> -->
	<style>
	input[type=text] 
	{
	text-transform:uppercase;
	}
	</style> 
</head>
<body>
  
		<div class="col-lg-8">
	<div class="card">
		<div class="card-header">
		<strong style="float:left;">Edit User</strong>
			<a href="user_master.php" style="float:right;"><button class="btn btn-primary" style="width:50px;"onclick=""><i class="fa fa-backward"></i></button></a>			
	</div>
	<div class="card-header">
	 <button class="btn btn-success" style="" id="<?php echo $edituser['user_id'];?>"onclick="rolemap(this.id)"><i class="fa fa-user"></i>Role Mapping Here</button>	
			
		</div>
	<div class="card-body card-block">
	<form  method="post" enctype="multipart/form-data" class="form-horizontal" action="user_update.php">
		<div class="row form-group">
		<div class="col col-md-3"><label for="text-input" class=" form-control-label">Full Name</label><span style="color:red;">*</span></div>
		<div class="col-12 col-md-9"><input type="text" id="fullname" name="fullname" placeholder="Enter  your full name"  class="form-control" autocomplete="off" value="<?php echo $edituser['full_name'];?>" required></div>
		</div>
		<div class="row form-group">
		<div class="col col-md-3"><label for="text-input" class=" form-control-label">User Name</label><span style="color:red;">*</span></div>
		<div class="col-12 col-md-9"><input type="text" id="username" name="username" placeholder="Enter  your user name" class="form-control" autocomplete="off" onchange="user(this.value)" value="<?php echo $edituser['user_name'];?>" required></div>
		</div>
		<div class="row form-group">
		<div class="col col-md-3"><label for="email-input" class=" form-control-label">Email </label></div>
		<div class="col-12 col-md-9"><input type="email" id="email" name="email" placeholder="Enter your  Email" class="form-control"autocomplete="off" onchange="user(this.value)" value="<?php echo $edituser['email_id'];?>"></div>
		</div>
		<div class="row form-group">
		<div class="col col-md-3"><label class=" form-control-label">Gender</label><span style="color:red;">*</span></div>
		<div class="col col-md-9">
		<div class="form-check">
		<div class="radio">
			<label for="radio1" class="form-check-label">
			<input type="radio" id="gender" name="gender" value="male" class="form-check-input" <?php if( $edituser['gender'] == "male"){echo "checked";}?>>Male
			</label>
		</div>
		<div class="radio">
			<label for="radio2" class="form-check-label">
			<input type="radio" id="gender" name="gender" value="female" class="form-check-input" <?php if( $edituser['gender'] == "female"){echo "checked";}?>>Female
			</label>
		</div>
		</div>
		</div>
		</div>
		<div class="row form-group">
		<div class="col col-md-3"><label for="file-input" class=" form-control-label">Profile Photo</label></div>
		<div class="col-12 col-md-9"><input type="file" id="file" name="file" class="form-control-file"></div>
		</div>
		<div style="">
		<input type="hidden" id="user_id" name="user_id" value="<?php echo $edituser['user_id'];?>">
		<button type="submit" name="submit" id="submit" onclick="userupdate()" class="btn btn-success" ><i class="fa fa-dot-circle-o"></i> Update</button>
		
		</div>
	</form>
	</div>
	</div>
    <div class="clearfix"></div>

    <footer class="site-footer">
        
    </footer>

</div><!-- /#right-panel -->

<!-- Right Panel -->

<!-- Scripts -->




</body>
</html>
