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


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

$zyear = right($zdb, 4);
$mfrdate = getzdates($zyear, 'S');
$mtodate = getzdates($zyear, 'E');

$formname = "Invoice/Bill Report";
//$action = "invprin_fr.php";
$action = "invoice_print.php?para=M";

$myyear = $_SESSION[$myyear];
mysqli_select_db($conn, $zdb);

include("includes/linkshead.php");
?>
<style>
    .row {
        margin-right: -5px;
        margin-left: -15px;
    }

    .button {
        padding: 13px 22px;
        font-size: 20px;
        text-align: center;
        cursor: pointer;
        outline: none;
        color: #fff;
        background-color: #4CAF50;
        border: none;
        border-radius: 15px;
        /* box-shadow: 0 9px #999; */
    }

    .button:hover {background-color: #3e8e41}

    .button:active {
        background-color: #3e8e41;
        box-shadow: 0 5px #666;
        transform: translateY(4px);
    }
</style>
<script src="MyScript/invprin.js" type="text/javascript"></script>
</head>
<body>
    <form method='POST' action="<?= $action; ?>">
        <!-- Default box -->

        <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 class="actions pull-right">
                        <i class="fa fa-chevron-down"></i>
                        <i class="fa fa-times"></i>
                    </div>
                </div>
                <div class="panel-body">

                    <div class="row" style="background-color: #a3e2f7">
                        <div class="col-lg-4 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control">Demand Voucher - From</label>
                        </div>
                        <div class="col-lg-3 col-md-3 text-right pad">
                            <input type="text" name="frmvouch" class="form-control frmvouch">
                        </div>
                    </div>
                    <div class="row" style="background-color: #a3e2f7">
                        <div class="col-lg-4 col-md-4 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control">Demand Voucher - To </label>
                        </div>
                        <div class="col-lg-3 col-md-3 text-right pad">
                            <input type="text" name="tovouch" class="form-control tovouch">
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-lg-4 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control">Exam</label>
                        </div>
                        <div class="col-lg-5 col-md-5 col-sm-5 col-xs-3 pad">
                            <select class='form-control select2 exam' name='exam' >
                                <option value=""></option>
                                <?php
                                $gexam = mysqli_query($conn, "SELECT * FROM `exam` ORDER BY `name`") or die(mysqli_error($conn));
                                while ($schexam = mysqli_fetch_array($gexam)) {
                                    echo "<option value='$schexam[code]'>$schexam[name]</option>";
                                }
                                ?>
                            </select>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-lg-4 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control marg">Section</label>
                        </div>
                        <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5 pad">
                            <select name="section" class="form-control section select2" >
                                <option value=""></option>
                                <option value="P">Primary</option>
                                <option value="S">Secondary</option>
                                <option value="M">Prelims</option>
                            </select>
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-lg-4 col-md-3 col-sm-3 col-xs-3 text-right pad">
                            <label class="label-control marg">Session</label>
                        </div>
                        <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5 pad">
                            <select name="session" class="form-control select2 session" >
                                <option value=""></option>
                                <option value="M">Morning</option>
                                <option value="A">Afternoon</option>
                            </select>
                        </div>
                    </div>

                </div>
                <div class="panel-footer">
                    <div style="overflow: auto; ">
                        <table class="table-condensed" style="margin: 0 auto;">
                            <tr>
                                <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
                                <td class=" buttonform tooltip-bottom" id="ssubmit" style="display: <? echo $savedisabled ?>" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="View">
                                    <button id='view' type='submit' formtarget="_blank" name='view' class="btn btn-pad btn-square" style="background-color:#05B2EA; ">
                                        <i class="fa fa-television" style="color:#ffffff"></i>
                                    </button>
                                </td>
                                <td class=" buttonform tooltip-bottom" id="scancel" style="display: <? echo $canceldisabled ?>" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Close">
                                    <button id='cancel' type="reset" class="btn btn-pad btn-square " style="background-color:red;" onclick="window.parent.location.href = 'menu.php'">
                                        <i class="fa fa-power-off" style="color:#ffffff"></i>
                                    </button>
                                </td>
                                 <td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td> 
                            <br>
                             <td class=" buttonform tooltip-bottom" id="" style="display: <? ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Multiple Print">
                                <button id='' type="button" class="btn btn-pad btn-lg button multmail" style="background-color:#6082BF;color:white ">
                                    Multiple Mail
                                </button>
                            </td> 
                            </tr> 
                        </table>
                    </div>
                                       

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