<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
	<title>Log In </title>
	<script type="text/javascript" src="../bootstrap4/js/bootstrap.min.js"></script>
	<link rel="stylesheet" type="text/css" href="../bootstrap4/css/bootstrap.min.css">
	<style type="text/css">
	td{
		height: 50px;
		width: 200px;
	}
	.container{
		 font-family: Arial, Helvetica, sans-serif;
		 font-size: 25px;
	}
	table tr td
	{
		border: 0px;
		border-color: white;
	}
	#bo{padding: 5px; border: 2px solid navy;} 
		.container {
		  height: 100%;
		  margin: 0;
		 font-family: "Times New Roman", Times, serif;
		font-size: 14px;
		}
img{height: 40px;}
	</style>
	<meta name="viewport" content="width=device-width, initial-scale=.7">
</head>
<body>
<?php
require "dbconnect.php";
	dbhandaler::dbconnect();
	if(isset($_POST['btn']))
	{
		$username=$_POST['usd'];
		$password=$_POST["pswd"];
		$region=$_POST["Region"];
		if($username=="covid_19"&&$password=="password")
		{
			$_SESSION["Reg"]=$region;
			echo "<script> location.assign('data_input.php'); </script>";
		}
	}
?>
<form method="post">
 <div class="container">
	<div class="row" id="bo">
		<div class="col-md-8" align="center">
			<img src="image/mohs.jpg" style="width:60px; height:60px;">
			<b> ရန်ကုန်တိုင်း‌‌‌‌‌‌‌‌‌‌‌‌‌ဒေသကြီး ကုသရေးနှင့် ပြည်သူ့ကျန်းမာရေး ဦးစီးဌာန</b>
		</div>	
		<div class="col-md-4" align="center">
			<a href="home.php"><img src="homeh.gif"></a>
			<a href="covid-19.php"><img src="earthmap.gif"></a>
			<a href="patient.php"><img src="vgraph.gif"></a>
			<a href="other.php"><img src="datad.gif"></a>
	 	 </div>						
	</div><br>
	<div class="row" align="center">
		<div class="col-md-6" align="center">
		<table>
			<tr>
				<td align="left"> User Name </td>
				<td align="left"> <input type="text" name = "usd" style="width:200px; height:30Px;"></td>
			</tr>
			<tr>
				<td align="left"> Password </td>
				<td align="left"> <input type="password" name = "pswd" style="width:200px; height:30Px;"></td>
			</tr>
			<tr>
				<td align="left"> State/Region </td>
				<td align="left"> 
					<select name="Region" style="width:200px; height:30Px;" required>
						<option value="">Select...</option>
						<?php
					$array = dbhandaler::selectregion();
					foreach ($array as $key => $value) { ?>
					<option value="<?php echo $value[0];?>"> <?php echo $value[0];?> </option>
					<?php 
					}
					?>	
					</select>
				</td>
			</tr>
			<tr>
				<td></td>
				<td align="left"><input type="submit" name="btn" style="width:200px; height:30Px;"></td>
			</tr>
		</table>
		</div>
		<div class="col-md-6">
			<img src="dataentry.gif" style="height: 300px;">
		</div>
	</div>
	<br>	
</div>
</form>
</body>
</html>