<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>SIMARI KING</title>
<link href="stile.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style5 {
	font-size: 38px;
	font-weight: bold;
}
.style6 {
	color: #FFFFFF;
	font-weight: bold;
	font-family: Cambria;
}
.style7 {
	font-family: Cambria;
	font-size: 12px;
}
.style8 {color: #FF0000}
-->
</style>
</head>

<body>
<form id="form1" name="form1" method="post" action="" style="background-image:url(image/wall2.png); background-attachment:fixed; background-repeat:no-repeat; height:680px; background-position:center;">
<div align="center" style="padding-top:8%;">
<fieldset style="width:400px; height:400px; box-shadow: 0px 0px 20px 10px black; background:rgba(4,29,23,0.5);">
<span style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:24px; color:#FFFFFF; font-weight:bold;">SIMARI KING</span>
<br /><span style="font-family:'Bauhaus 93'; font-size:18px; color:#CCCCCC;">Sistem Manajemen Pengiriman<br /> Dokumen Banding</span>

<div id="login" align="center" style="padding-top:2%; padding-left:8%;">
<fieldset style="width:300px; height:270px; box-shadow: 0px 0px 20px 10px black; background:rgba(4,29,23,0.5); clear:left; float:left;"><legend align="center" style="width:60px;"><img src="image/PTA.png" style="width:70%; height:70%;"/></legend>
<p align="center" class="style6" style="font-size:18px;">LOGIN FORM</p>
<table width="73%" border="0" align="center">
  <tr>
    <td width="8%"><img src="image/username.png" width="25" height="25" /></td>
    <td width="92%"><p>
      <input name="name" id="name" type="text" size="30" placeholder="Nama Satker" style="font-family:Cambria; font-size:14px;"/>
    </p>
      </td>
  </tr>
  <tr>
    <td width="8%"><img src="image/login.png" width="25" height="25" /></td>
    <td width="92%">
      <input name="pass" id="pass" type="password" size="30" placeholder="Password" style="font-family:Cambria; font-size:14px;" id="pass"/>
      </td>
  </tr>
  <tr>
    <td width="8%">&nbsp;</td>
    <td width="92%">
      <a href="#"><div align="right" class="style8"><span class="style7">Forgotten Password?</span> </div></a></td>
  </tr>
</table>
<p align="center">
  <input name="login" id="login" type="submit" value="Log In" style="width:90%; font-family:Cambria; font-size:14px; font-weight:bold; background-color:#00FF99;" align="middle"/></p>
</fieldset>
</div>
<?php
if (isset($_POST['login'])){
session_start();
include 'database.php';
$username=$_POST['name'];
$password=$_POST['pass'];
	$sql=mysqli_query($koneksi,"select * from tbl_userpa where nama_pa = '$username' and password = '$password'") or die(mysql_error());
$cocok=mysqli_num_rows($sql);
  if ($cocok > 0) {
  $_SESSION['username']=$username;
  header("location:home.php");
  }
  }
  ?>
  
  </fieldset>
  </div>
  
<div align="center"><p>
<i style="font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9px;">copyright &copy; 2021 FerdianHaruna.IT Clubs</i>
</p>
</div>
</form>
</body>
</html>
