SHARE
TWEET

Proses

alifbrian12 May 21st, 2017 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. session_start();
  3. require_once("koneksi.php");
  4. date_default_timezone_set("Asia/Jakarta");
  5. $tanggal = date("Y-m-d H:i:s");
  6. $username = $_POST['username'];
  7. $pass = $_POST['password'];
  8. $cekuser = mysqli_query("SELECT * FROM user WHERE username = '$username'");
  9. $jumlah = mysqli_num_rows($cekuser);
  10. $hasil = mysqli_fetch_array($cekuser);
  11. $expired = $hasil['expired_date'];
  12. $level = $hasil['level'];
  13. $level1 = "Banned";
  14. if($jumlah == 0) {
  15.    header("location:login.php?pesan=1&isi=Pastikan data yang Anda masukkan benar");
  16. } else {
  17.    if($pass <> $hasil['password']) {
  18.      header("location:login.php?pesan=1&isi=Password yang Anda masukkan salah.");
  19. } else {
  20.    if($level == $level1) {
  21.      header("location:login.php?pesan=1&isi=Akun Anda sudah dibanned.");
  22. } else {
  23.    if($tanggal > $expired) {
  24.      header("location:login.php?pesan=1&isi=Akun Anda sudah jatuh tempo.");
  25.    } else {
  26.      $_SESSION['username'] = $hasil['username'];
  27.      header('location:/');
  28.    }
  29. }
  30. ERROR
  31. ?>
  32. <? }
  33. ?>
  34. <? } ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top