<?php 
session_start();
include '../../connection.php';
$query = " SELECT 
            ts.schedule_id,
            ts.UniqueID,
            ts.settle_date,
            ts.status AS schedule_status,
            ts.date_created AS schedule_created_date,
            t.resident_id,
            t.respondent,
            t.incident_address,
            t.complaint_type_id,
            t.description,
            t.incident_date,
            r.first_name,
            r.middle_name,
            r.last_name
        FROM tbl_transaction_schedule AS ts
        LEFT JOIN tbl_transaction AS t ON ts.UniqueID = t.UniqueID
        LEFT JOIN tbl_resident AS r ON t.resident_id = r.resident_id
        ";
$query_result = $conn->query($query);
$row = $query_result->fetch_assoc();
$fullname = $row['first_name'].', '.$row['middle_name'].' '.$row['last_name'];
?>
<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">

    <title>FORM 3</title>
  </head>
  <style>
    body{
      font-family: 'Arial','Helvetica',sans-serif ;
      font-size: 20px;
    }
      hr {
        border: 0;
        border-bottom: 1px solid #000;
        margin: 10px 0;
      }
  </style>
  <body>
    <div class="container">
      
 
    <div class="text-center">
      <p>
        Republic of the philippines <br>
        Province of SULTAN KUDARAT <br>
        CITY/MUNICIPALITY OF PRESIDENT QUIRINO <br>
        Baranggay Tual
      </p>
      <p>OFFICE OF THE LUPON TAGAPAMAYAPA</p>
      <p>NOTICE OF HEARING <br> (MEDIATION PROCEEDING)</p>
    </div>
    <br>
    <div class="description-section">
      <p>
        TO: <strong><?= $fullname ?></strong>  <br>
        Complainants /s <br><br>
        You are here by required to apear before me on the <strong><?= date("d", strtotime($row['settle_date'])) ?></strong> day of <br>
        <strong><?= date("F, Y", strtotime($row['settle_date'])) ?></strong>  at <strong> 9: 00</strong> o'clock morning/afternoon for the hearing of <br> your complaint.
      </p>
        <p>Notified this <strong><?= date("d", strtotime($row['settle_date'])) ?></strong>  day of <strong><?= date("F Y", strtotime($row['settle_date'])) ?></strong> </p>
    </div>
    <br>
    <br>

    <div class="row">
      <div class="col-6">
        
      </div>
      <div class="col-6">
        <p class="text-center"><strong>HON. ELMER S. JANOLINO</strong></p>
        <p class="text-center">(Punong Barangay)</p>
      </div>

    
    </div>

    <div class="row">
      <div class="col-6"></div>
      <div class="col-6">
        <p class="text-center">Complaint's</p><br>
        <hr><br>
        <hr><br>
        <hr><br>
      </div>
    </div>
   </div>
    <!-- Optional JavaScript; choose one of the two! -->

    <!-- Option 1: jQuery and Bootstrap Bundle (includes Popper) -->
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
    <script>window.print();</script>

    <!-- Option 2: Separate Popper and Bootstrap JS -->
    <!--
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.min.js" integrity="sha384-+sLIOodYLS7CIrQpBjl+C7nPvqq+FbNUBDunl/OZv93DB7Ln/533i8e/mZXLi/P+" crossorigin="anonymous"></script>
    -->
  </body>
</html>