<?php

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

$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);
$admin = $_SESSION["admin_" . $dbname];
$transcurdate = date("Y-m-d\TH:i");

if ($_REQUEST["ctr"]) {
    $ctr = $_REQUEST["ctr"];
    $hide = $_REQUEST["hide"];

    $hide_var = "";

    if ($hide == 0) {
        $hide_var = 'style="display:none;"';
    }
    $mctr = $ctr;
    $mctr++;

    echo "<tr>";
//                                                            echo "<td style='text-align:center'><i class='fa fa-close remove' ></i></td>";
//                                                            echo "<td><input type='text' name='rsrno_$rctr' value='$fettrans[srno]' class='form-control form'></td>";
    echo "<td><input type='text' name='rfcnfno_$ctr' value='' class='form-control form'></td>";
    echo "<td>";
    echo "<select class='form-control form rftype fetchpart_$ctr select2' name='rftype_$ctr' style='width:100%'  >";
    echo "<option value=''></option>";
    echo "<option value='A'>Arrival</option>";
    echo "<option value='D'>Departure</option>";

    echo "</select>";
    echo "</td>";

    echo "<td><input type='datetime-local' min='$transcurdate' name='rflttime_$ctr' value='' class='form-control form rflttime'></td>";
    echo "<td><input type='text' name='rfsector_$ctr' value='' class='form-control form rfsector'></td>";
    echo "<td><input type='text' name='rfltno_$ctr' value='' class='form-control form rfltno'></td>";

    echo "</tr>";
    $ctr++;
} else {
    echo "ERROR";
}
?>
 