<?php
session_start();

if (isset($_SESSION['username']) == true) {
	include 'master.php';
	$username = $_SESSION['username'];
}else{
	header("location:login");
}

$query = $conn->query("SELECT * FROM administrator WHERE username = '$username' ");
$val = mysqli_fetch_array($query);
$email = $val['email'];
$phone_number = $val['phone_number'];

?>
		<!--page-wrapper-->
		<div class="page-wrapper">
			<!--page-content-wrapper-->
			<div class="page-content-wrapper">
				<div class="page-content">
					<!--breadcrumb-->
					<div class="page-breadcrumb d-none d-md-flex align-items-center mb-3">
						<div class="breadcrumb-title pr-3">User Profile</div>
						<div class="pl-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">User Profile</li>
								</ol>
							</nav>
						</div>
						<div class="ml-auto">
							<div class="btn-group">
								<button type="button" class="btn btn-primary">Settings</button>
								<button type="button" class="btn btn-primary bg-split-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown">	<span class="sr-only">Toggle Dropdown</span>
								</button>
								<div class="dropdown-menu dropdown-menu-right dropdown-menu-lg-left">	<a class="dropdown-item" href="javascript:;">Action</a>
									<a class="dropdown-item" href="javascript:;">Another action</a>
									<a class="dropdown-item" href="javascript:;">Something else here</a>
									<div class="dropdown-divider"></div>	<a class="dropdown-item" href="javascript:;">Separated link</a>
								</div>
							</div>
						</div>
					</div>
					<!--end breadcrumb-->
					<div class="user-profile-page">
						<div class="card radius-15">
							<div class="card-body">
								<div class="row">
									<div class="col-12 col-lg-7 border-right">
										<div class="d-md-flex align-items-center">
											<div class="mb-md-0 mb-3">
												<img src="../images/user.png" class="rounded-circle shadow" width="130" height="130" alt="" />
											</div>
											<div class="ml-md-4 flex-grow-1">
												<div class="d-flex align-items-center mb-1">
													<h4 class="mb-0">Michle Clark</h4>
													<p class="mb-0 ml-auto">$44/hr</p>
												</div>
												<p class="mb-0 text-muted"><?php echo $username;?></p>
												<p class="text-primary"><i class='bx bx-buildings'></i> Administrator</p>
												<button type="button" class="btn btn-primary">Active</button>
											</div>
										</div>
									</div>
									<div class="col-12 col-lg-5">
										<table class="table table-sm table-borderless mt-md-0 mt-3">
											<tbody>
												<tr>
													<th>Availability:</th>
													<td>Full-time (40hr/wk) <span class="badge badge-success">available</span>
													</td>
												</tr>
											</tbody>
										</table>
									</div>
								</div><br>
								<!--end row-->
								<ul class="nav nav-pills">
									<li class="nav-item"> <a class="nav-link" data-toggle="tab" href="#Edit-Profile"><span class="p-tab-name">Edit Profile</span><i class='bx bx-message-edit font-24 d-sm-none'></i></a>
									</li>
								</ul>
								<div class="tab-content mt-3">
									<div class="tab-pane fade" id="Edit-Profile">
										<div class="card shadow-none border mb-0 radius-15">
											<div class="card-body">
												<div class="form-body">
													<div class="row">
														<div class="col-12 col-lg-5 border-right">
															<div class="form-row">
																<div class="form-group col-md-6">
																	<label>Username</label>
																	<input type="text" value="<?php echo $username;?>" disabled class="form-control">
																</div>
															</div>
															<div class="form-group">
																<label>Email</label>
																<input type="email" value="<?php echo $email;?>" class="form-control" disabled>
															</div>
															<div class="form-group">
																<label>Phone Number</label>
																<input type="text" value="<?php echo $phone_number;?>" class="form-control">
															</div>
														</div>
														<div class="col-12 col-lg-7">
															<div class="form-row">
																<div class="form-group col-md-6">
																	<label>Gender</label>
																	<select class="form-control">
																		<option>Male</option>
																		<option>Female</option>
																		<option>Other</option>
																	</select>
																</div>
															</div>
															<div class="form-group">
																<p class="mb-0">Date of Birth</p>
															</div>
															<div class="form-row">
																<div class="form-group col-md-4">
																	<select class="form-control">
																		<option>January</option>
																		<option>February</option>
																		<option selected>March</option>
																		<option>April</option>
																		<option>May</option>
																		<option>June</option>
																		<option>July</option>
																		<option>August</option>
																		<option>September</option>
																		<option>October</option>
																		<option>November</option>
																		<option>December</option>
																	</select>
																</div>
																<div class="form-group col-md-4">
																	<select class="form-control">
																		<option>01</option>
																		<option>02</option>
																		<option>03</option>
																		<option>04</option>
																		<option>05</option>
																		<option>06</option>
																		<option>07</option>
																		<option>08</option>
																		<option>09</option>
																		<option selected>10</option>
																		<option>11</option>
																		<option>12</option>
																		<option>13</option>
																		<option>14</option>
																		<option>15</option>
																		<option>16</option>
																		<option>17</option>
																		<option>18</option>
																		<option>19</option>
																		<option>20</option>
																		<option>21</option>
																		<option>22</option>
																		<option>23</option>
																		<option>24</option>
																		<option>25</option>
																		<option>26</option>
																		<option>27</option>
																		<option>28</option>
																		<option>29</option>
																		<option>30</option>
																		<option>31</option>
																	</select>
																</div>
																<div class="form-group col-md-4">
																	<select class="form-control">
																		<option>1990</option>
																		<option>1991</option>
																		<option>1992</option>
																		<option selected>1993</option>
																		<option>1994</option>
																	</select>
																</div>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--end page-content-wrapper-->
		</div>
		<!--end page-wrapper-->
		<!--start overlay-->
		<div class="overlay toggle-btn-mobile"></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-->
<?php
include 'footer.php';