<?php 
include "koneksi.php";
if (!isset($_SESSION["UserID"]))
{
	header("location:login.php?p=3");
}
?>
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="style.css">
<html>
  <head>
	<title> PT. MULTI HIDRACHROME BALIKPAPAN </title>
	<link rel="icon" type="image/png" href="images/mhb.jpeg">
	<?php
						include "part/menu2.php";
					?>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<?php
		include "part/jss.php";
	?>
	
  </head>
  <body>
	
<div style="width:1280px; height:100px" class="container">
	
			<div class="alert alert-info" style='background-color:#F8F8FF' href="#">
            <div style="display: block; margin-left: auto; margin-right: auto; width: 1000px;  height:100px;"><img style="width: 1000px;  height:180px;" src="images/hd.jpg"></div>
            <div>
                <center>
                    <h1>PT. MULTI HIDRACHROM BALIKPAPAN</h1>
                </center>
            </div>
            <div>
                <center>
                    <h4>PROFESIONAL INFORMATION SYSTEM</h4>
                </center>
            </div>
        </div>
		<div class="alert alert-info" align='center'>
			 <h3>User Persis</h3>
			 
			 <?php
			if (isset($_GET["p"]))
				{
					$p=mysqli_real_escape_string($conn,$_GET["p"]);
					if ($p=="3")
					{
						?>
							<div class="alert alert-primary" role="alert">
							  Akun berhasil di Ferivikasi!
							</div>
						<?php
					}
				}
			?>
			 
			 <table class="table table-bordered">
			    <thead>
				  <tr>
				    <th>
					   Username
					</th>
					<th>
					   Password 
					</th>
					<th>
					   Hak Akses 
					</th>
				  </tr>
				</thead>
				<tbody>
				    <?php
						$q="SELECT * FROM user";
						$res=mysqli_query($conn,$q);
						while ($row=mysqli_fetch_assoc($res))
						{
							?>
							  <tr>
							    <td>
								  <?php
									echo $row["nama"];
								  ?>
								</td>
								<td>
								  <?php
									echo $row["password"];
								  ?>
								</td>
								<td>
								  <?php
									if ($row["status"]=="0")
									{
										echo "Belum Verifikasi";
									}
									if ($row["level"]=="1")
									{
										echo "Admin Persis";
									}
									if ($row["status"]=="2")
									{
										echo "HSE IT SYSTEM";
									}
									if ($row["status"]=="3")
									{
										echo "HCGA";
									}
									if ($row["status"]=="4")
									{
										echo "Admin HCGA";
									}
									if ($row["status"]=="5")
									{
										echo "Direktur";
									}
									if ($row["status"]=="6")
									{
										echo "Accounting";
									}
									if ($row["status"]=="7")
									{
										echo "Operasional";
									}
									if ($row["status"]=="9")
									{
										echo "Produksi / PIC";
									}
									if ($row["status"]=="10")
									{
										echo "Purchasing";
									}
									if ($row["status"]=="11")
									{
										echo "Admin Warehouse";
									}
									if ($row["status"]=="1002")
									{
										echo "SPV HSE IT SYSTEM";
									}
									if ($row["status"]=="1008")
									{
										echo "SPV QC";
									}
									if ($row["status"]=="1009")
									{
										echo "SPV Produksi / PIC";
									}
									if ($row["status"]=="10010")
									{
										echo "SPV PRC";
									}
								  ?>
								</td>
							  </tr>
							<?php
						}
					?>
				</tbody>
			 </table>
		</div>		
	</div>
	
  
  </body>
</html>




