<?php

require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include('includes/function.php');

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);
$zyear = right($zdb, 4);
$mfrdate = getzdates($zyear, 'S');
$mtodate = getzdates($zyear, 'E');


if (isset($_POST["date"])) {
    $date = $_POST["date"];

    if ($date < $mfrdate) {
        echo "Date Does Not Belong To Financial Year";
    } else if ($date > $mtodate) {
        echo "Date Does Not Belong To Financial Year";
    } else if ($date == " ") {
        echo "Date Cannot Be Empty";
    }
}
?>