<?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];

if ($_REQUEST["ctr"]) {
    $ctr = $_REQUEST["ctr"];
    $hide = $_REQUEST["hide"];
    $hide_var = "";
    if ($hide == 0) {
        $hide_var = 'style="display:none;"';
    }
    $mctr = $ctr;
    $mctr++;
?>
    <div class="row pxrw_<?= $ctr ?>" style="padding-top: 5px;">
        <div class="col-lg-1 col-md-3 col-sm-3 col-xs-3 text-right adjcolh2">
            <i class='fa fa-close rmfitPax' id="<?= $ctr ?>"></i>
        </div>

        <div class="col-lg-1 col-md-3 col-sm-3 col-xs-3 adjcolh2">
            <select name="tsuffix_<?= $ctr; ?>" class="form-control form select2 tsuffix fetchpart_<?= $ctr; ?>">
                <option value=""></option>
                <option value="Mr">Mr</option>
                <option value="Mrs">Mrs</option>
                <option value="Miss">Miss</option>
                <option value="Master">Master</option>
                <option value="Chd">Chd</option>
                <option value="Inf">INF</option>
            </select>
        </div>

        <div class="col-lg-2 col-md-8 col-sm-8 col-xs-8 adjcolh3">
            <input type="text" class="form-control form  tsurname" name="tsurname_<?= $ctr; ?>" value="">
        </div>
        <div class="col-lg-2 col-md-8 col-sm-8 col-xs-8 adjcolh3">
            <input type="text" class="form-control form  tname" name="tname_<?= $ctr; ?>" value="" required>
        </div>

        <div class="col-lg-2 col-md-8 col-sm-8 col-xs-8 adjcolh3">
            <input type="text" class="form-control form  tmidname" name="tmidname_<?= $ctr; ?>" value="">
        </div>

        <div class="col-lg-1 col-md-3 col-sm-3 col-xs-3 adjcolh2">
            <select name="tgender_<?= $ctr; ?>" class="form-control form select2 tgender fetchpart_<?= $ctr; ?>">
                <option value=""></option>
                <option value="Male">Male</option>
                <option value="Female">Female</option>
            </select>
        </div>

        <div class="col-lg-1 col-md-8 col-sm-8 col-xs-8 adjcolh2">
            <input type="text" class="form-control form tpaxpassport" name="tpaxpassport_<?= $ctr; ?>" value="">
        </div>

        <div class="col-lg-1 col-md-8 col-sm-8 col-xs-8 adjcolh2">
            <input type="text" class="form-control form taadhaarno" name="taadhaarno_<?= $ctr; ?>" value="">
        </div>

        <div class="col-lg-1 col-md-8 col-sm-8 col-xs-8 adjcolh2">
            <input type="text" class="form-control form tpanno" name="tpanno_<?= $ctr; ?>" value="">
        </div>
    </div>
<?php
    $ctr++;
} else {
    echo "ERROR";
}
?>