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

$formname = "Qurbani";
$action = "qurbani_fr.php";
$fuser = $_SESSION["usertype"];

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];

$zyear = right($zdb, 4);
$mfrdate = getzdates($zyear, 'S');
$mtodate = getzdates($zyear, 'E');
mysqli_select_db($conn, $zdb);
$tourcode = $_SESSION['tourcode'];
$tourname = $_SESSION['tourname'];
include("includes/linkshead.php");
?>
</head>

<body>
    <form method='POST' action="<?= $action; ?>?para=<?= $para ?>" target="_blank">
        <!-- Default box -->
        <div class="col-lg-8 col-md-62 col-sm-12 col-xs-12  pad">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title" style="color:black;"><?php echo $formname; ?></h3>
                    <div class="actions pull-right">
                    </div>
                </div>
                <div class="panel-body">
                    <div class="row">
                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control marg">Tour</label>
                        </div>
                        <div class="col-lg-2 col-md-5 col-sm-8 col-xs-8 pad">
                            <select class="form-control select2 tour" name="tour" required>
                                <option value="<?=$tourcode?>"><?=$tourname?></option>
                                <?php
//                                $gettour = mysqli_query($conn, "SELECT code,name FROM tour order by name") or die(mysqli_error($conn));
//                                while ($fettour = mysqli_fetch_array($gettour)) {
//                                    echo "<option value='$fettour[code]'>$fettour[name]</option>";
//                                }
                                ?>
                            </select>
                        </div>
                    </div>

                    <div class="row pad" >
                        <div class="col-lg-1 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control"></label>
                            </div>
                        <div class="col-lg-2 col-md-3 col-sm-3 col-xs-3 text-right pad" style="background-color: #f6e0bb;">
                            <label class="label-control">From Regn No.</label>
                        </div>
                        <div class="col-lg-2 col-md-5 col-sm-8 col-xs-8 pad" style="background-color: #f6e0bb;">
                            <input type="number" class="form-control frmregno" name="frmregnno" value="">
                        </div>
                        
                    </div>
                    <div class="row pad" >
                        <div class="col-lg-1 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control"></label>
                        </div>
                        <div class="col-lg-2 col-md-3 col-sm-3 col-xs-3 text-right pad" style="background-color: #f6e0bb;">
                            <label class="label-control">To Regn No.</label>
                        </div>
                        <div class="col-lg-2 col-md-5 col-sm-8 col-xs-8 pad" style="background-color: #f6e0bb;">
                            <input type="number" class="form-control toregno" name="toregnno" value="">
                        </div>
                        
                    </div>
                    <br>
                    <div class="row pad" >
                        <div class="col-lg-1 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control"></label>
                        </div>
                        <div class="col-lg-2 col-md-3 col-sm-3 col-xs-3 text-right pad" style="background-color: #b2efda;">
                            <label class="label-control">From Pax No.</label>
                        </div>
                        <div class="col-lg-2 col-md-5 col-sm-8 col-xs-8 pad" style="background-color: #b2efda;">
                            <input type="number" class="form-control frmpaxno" name="frmpaxno" value="">
                        </div>
                        
                    </div>
                    <div class="row pad" >
                        <div class="col-lg-1 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control"></label>
                        </div>
                        <div class="col-lg-2 col-md-3 col-sm-3 col-xs-3 text-right pad" style="background-color: #b2efda;">
                            <label class="label-control">To Pax No.</label>
                        </div>
                        <div class="col-lg-2 col-md-5 col-sm-8 col-xs-8 pad" style="background-color: #b2efda;">
                            <input type="number" class="form-control topaxno" name="topaxno" value="">
                        </div>
                    </div>

                    <div class="row pad">
                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control marg">Class</label>
                        </div>
                        <div class="col-lg-4 col-md-6 col-sm-8 col-xs-8 pad">
                            <select class='form-control select2' name='class[]' multiple>
                                <option value=''></option>
                                <?php
                                $gclass = mysqli_query($conn, "SELECT batchno FROM `bookform` where batchno != '' group by batchno") or die(mysqli_error($conn));
                                while ($sclass = mysqli_fetch_array($gclass)) {
                                    echo "<option value='$sclass[batchno]'>$sclass[batchno]</option>";
                                }
                                ?>
                            </select>
                        </div>
                    </div>
                    <div class="row pad">
                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control marg">Sort On </label>
                        </div>
                        <div class="col-lg-2 col-md-6 col-sm-8 col-xs-8 pad">
                            <select class='form-control select2' name='sorton'>
                                <option value='A'>All</option>
                                <option value='S'>Selected</option>
                                <option value='H'>Haj</option>
                                <option value='D'>Dum</option>
                                <option value='O'>Other</option>
                            </select>
                        </div>
                    </div>
                    <div class="row pad">
                        <div class="col-lg-3 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control marg">Scope</label>
                        </div>
                        <div class="col-lg-2 col-md-6 col-sm-8 col-xs-8 pad">
                            <select class='form-control select2' name='scope'>
                                <option value='1'>Both</option>
                                <option value='B'>Big</option>
                                <option value='S'>Small</option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="panel-footer text-center">
                    <?php include("includes/but_rep.php"); ?>
                </div>

            </div>
        </div>

    </form>
    <?php include("includes/linksfoot.php"); ?>
</body>

</html>