<?php
session_start();

include 'koneksi.php';
function rupiah($angka)
{
  if ($angka != "") {
    $angkafix = $angka;
  } else {
    $angkafix = 0;
  }
  $hasilrupiah = "Rp " . number_format($angkafix, 2, ',', '.');
  return $hasilrupiah;
}
function tanggal($tgl)
{
  $tanggal = substr($tgl, 8, 2);
  $bulan = getBulan(substr($tgl, 5, 2));
  $tahun = substr($tgl, 0, 4);
  return $tanggal . ' ' . $bulan . ' ' . $tahun;
}
function getBulan($bln)
{
  switch ($bln) {
    case 1:
      return "Januari";
      break;
    case 2:
      return "Februari";
      break;
    case 3:
      return "Maret";
      break;
    case 4:
      return "April";
      break;
    case 5:
      return "Mei";
      break;
    case 6:
      return "Juni";
      break;
    case 7:
      return "Juli";
      break;
    case 8:
      return "Agustus";
      break;
    case 9:
      return "September";
      break;
    case 10:
      return "Oktober";
      break;
    case 11:
      return "November";
      break;
    case 12:
      return "Desember";
      break;
  }
}

?>
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>Sikar Tembakau</title>
  <meta content="width=device-width, initial-scale=1.0" name="viewport">
  <meta content="" name="keywords">
  <meta content="" name="description">

  <!-- Favicon -->
  <link href="img/favicon.ico" rel="icon">

  <!-- Google Web Fonts -->
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@700&family=Open+Sans:wght@400;500;600&display=swap" rel="stylesheet">

  <!-- Icon Font Stylesheet -->
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.0/css/all.min.css" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" rel="stylesheet">

  <!-- Libraries Stylesheet -->
  <link href="home/lib/animate/animate.min.css" rel="stylesheet">
  <link href="home/lib/owlcarousel/assets/owl.carousel.min.css" rel="stylesheet">
  <link href="home/lib/lightbox/css/lightbox.min.css" rel="stylesheet">
  <!-- Template Stylesheet -->
  <link href="home/css/style.css" rel="stylesheet">
  <link href="home/css/gaya.css" rel="stylesheet">
  <link rel="stylesheet" href="https://cdn.datatables.net/2.0.0/css/dataTables.dataTables.css">
  <link rel="stylesheet" href="https://cdn.datatables.net/buttons/3.0.0/css/buttons.dataTables.css">
  <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />

  <style>
    .hero {
      background: url('foto/tembakau.jpg') no-repeat center center;
      background-size: cover;
      position: relative;
      height: 100vh;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: flex-start;
      padding: 100px;
      box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.6);
    }

    .hero p,
    .hero h1,
    .hero h3 {
      color: #ffffff;
      margin: 0;
      text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    }

    .welcome-text {
      margin-bottom: 10px;
      padding-left: 10px;
    }

    .center-text {
      align-self: center;
      margin-bottom: 10px;
      text-align: center;
    }

    .call-to-action {
      align-self: flex-end;
      text-align: right;
      margin-right: 40px;
      /* Menambahkan margin untuk jarak dari kanan */
    }

    .hero .center-text h1 {
      font-size: 2.5rem;
      font-family: 'Georgia', serif;
    }

    .hero .call-to-action h3 {
      font-size: 1.2rem;
      font-family: 'Georgia', serif;
    }

    @media (max-width: 768px) {
      .hero .center-text h1 {
        font-size: 2rem;
      }

      .hero .call-to-action h3 {
        font-size: 1rem;
      }
    }
  </style>
</head>

<body>
  <!-- Navbar Start -->
  <nav class="navbar navbar-expand-lg background-putih navbar-light sticky-top jarakkirikanan-4 px-lg-5">
    <a href="index.php" class="navbar-brand d-flex align-items-center jarak-tengah">
      <img src="foto/logo.png" alt="Logo" class="logo me-2" style="max-width: 70px;">
      <h5 class="m-0">Sikar Tembakau</h5>
    </a>
    <button type="button" class="navbar-toggler me-0" data-bs-toggle="collapse" data-bs-target="#navbarCollapse">
      <span class="navbar-toggler-icon"></span>
    </button>
    <div class="collapse navbar-collapse" id="navbarCollapse">
      <div class="navbar-nav ms-auto p-4 p-lg-0">
        <a href="index.php" class="nav-item nav-link">Beranda</a>
        <a href="diagnosis.php" class="nav-item nav-link">Diagnosis</a>
        <a href="penyakit.php" class="nav-item nav-link">Penyakit</a>
       <!-- <a href="akun.php" class="nav-item nav-link">Akun</a> -->
        <a href="login.php" class="nav-item nav-link">Login</a>
      </div>
    </div>
  </nav>
  <!-- Navbar End -->