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

$formname = "Karigar Print";
$action = "karigar_print_fr.php";

$admin = $_SESSION["admin_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
$myyear = $_SESSION[$myyear];
mysqli_select_db($conn, $zdb);

include("includes/linkshead.php");
?>
</head>
<body>
    <form method='POST' action="<?= $action; ?>">
        <!-- Default box -->
        <div>
            <div class="col-lg-5 col-md-12 col-sm-12 col-xs-12  pad">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><?php Echo $formname; ?></h3>
                    </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">Name</label>
                            </div>
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-6 pad">
                                <select class="form-control select2 name" name="name">
                                    <option value=""></option>
                                    <?php
                                    $getname = mysqli_query($conn, "SELECT accode,custcode, name FROM `accmast` WHERE type='K'and `grpcode`='009' order by name")or die(mysqli_error($conn));
                                    While ($name = mysqli_fetch_array($getname)) {
                                        Echo "<option value='$name[accode]'>$name[name] ( $name[custcode] )</option>";
                                    }
                                    ?>
                                </select>
                            </div>
                        </div>
                        <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">Department</label>
                            </div>
                            <div class="col-lg-6 col-md-6 col-sm-6 col-xs-3  pad">
                                <select class="form-control select2 " name="dept">
                                    <option value=""></option>
                                    <?php
                                    $getdept = mysqli_query($conn, "SELECT `name`,`code` FROM `dept` ORDER BY name ")or die(mysqli_error($conn));
                                    while ($fdept = mysqli_fetch_array($getdept)) {
                                        Echo"<option value = '$fdept[code]'>$fdept[name]</option> ";
                                    }
                                    ?>
                                </select>
                            </div>

                        </div>
                        <!-- <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">Group Code</label>
                            </div>
                            <div class="col-lg-2 col-md-6 col-sm-6 col-xs-6 pad">
                                <select class="form-control select2 grpcod" name="grpcod">
                                    <option value=""></option>
                                    <?php
                                    $getname2 = mysqli_query($conn, "SELECT custcode FROM `accmast` WHERE type='K'and `grpcode`='009' and active = 1 order by name")or die(mysqli_error($conn));
                                    While ($name2 = mysqli_fetch_array($getname2)) {
                                        Echo "<option value='$name2[custcode]'>$name2[custcode]</option>";
                                    }
                                    ?>
                                </select>
                            </div>
                        </div> -->
                        <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">Type</label>
                            </div>
                            <div class="col-lg-3 col-md-3 col-sm-8 col-xs-8 pad">
                                <select  id="cmbtype" name="dtype" class="form-control">
                                    <option value="2">Detail</option>   
                                    <option value="1">Summary</option>   
                                </select>
                            </div>
                        </div>
                        <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">Gender</label>
                            </div>
                            <div class="col-lg-3 col-md-3 col-sm-8 col-xs-8 pad">
                                <select  name="gender" class="form-control">
                                    <option value=""></option>   
                                    <option value="M">Male</option>   
                                    <option value="F">Female</option>   
                                </select>
                            </div>
                        </div>
                        <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">Active</label>
                            </div>
                            <div class="col-lg-3 col-md-3 col-sm-8 col-xs-8 pad">
                                <select  name="active" class="form-control">
                                    <option value=""></option>   
                                    <option value="A">Active</option>   
                                    <option value="I">Un Active</option>   
                                </select>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="panel-footer">
                    <div class="text-center pad">
                        <div class="panel-footer">
                            <?php include("includes/but_rep.php"); ?>
                        </div>
                    </div>                       
                </div>
            </div>

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