<?php
session_start();
$usertype = $_SESSION["usertype"];
?>


<style>
    .btn {
        font-weight: bolder;
        border-radius: 7px;
        padding: 8px 10px;
        margin-bottom: 5px;
        -webkit-font-smoothing: subpixel-antialiased;
        -webkit-transition: border 0.25s linear, color 0.25s linear, background-color 0.25s linear;
        transition: border 0.25s linear, color 0.25s linear, background-color 0.25s linear;
        /* background-image: linear-gradient(135deg, #f5f7fa 10%, #c3cfe2 100%); */
        background-color: white;
        border: 1px solid #C3CFE2;
        /* border: 1px solid #E2EBF0; */
        color: black;
    }

    .btn:hover {
       color:red ; 
    }

    .btn:before {
        height: 0%;
        width: 1.5px;
    }

    .btn:hover {
        box-shadow: inset 2px 2px 2px 0px rgba(255, 255, 255, .5),
            7px 7px 20px 0px rgba(0, 0, 0, .1),
            4px 4px 5px 0px rgba(0, 0, 0, .1);
    }

    .fa {
        font-size: 20px !important;
        margin-top: -5px;
    }
</style>

<div style="overflow: auto;">
    <table class="table-condensed" style="margin: 0 auto;">
        <tr>
            <td class=" buttonform tooltip-bottom " id="hprevious" style="display: <? Echo $pdisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Previous">
                <button id='previous' type="button" class="btn btn-pad btn-square btn-square prevBtn hvr-float-shadow" style="background-color:white; "  onClick="window.location.href = '<?= $file . "?mode=edit&$keyfld=$prevvouch" . $para; ?>'" <? Echo $pdisabled1 ?>>
                    <i class="fa fa-chevron-left" style="color:#B38A6C"></i>
                </button>
            </td>
            <td class=" buttonform tooltip-bottom" id="hnext" style="display: <? Echo $ndisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Next">
                <button id='next' type="button" class="btn btn-pad btn-square nextBtn hvr-float-shadow" style="background-color:#white;  " onClick="window.location.href = '<?= $file . "?mode=edit&$keyfld=$nextvouch" . $para; ?>'" <? Echo $ndisabled1 ?>>
                    <i class="fa fa-chevron-right" style="color:#F89693"></i>    
                </button>
            </td>
            <td class=" buttonform tooltip-bottom" id="hsearch" style="display: <? Echo $searchdisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Search">
                <button id="search" type="button" class="btn btn-pad btn-square " style="background-color:white; " data-toggle="modal" data-target=".bs-example-modal-lg" >
                    <i class="fa fa-search" style="color:#B19CD9"></i>
                </button>
            </td>
            <td class=" buttonform tooltip-bottom" id="hprint" style="display: <? Echo $printdisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Print">
                <a id='print' class="btn btn-pad btn-square " style="background-color:white;" href="<?= $printfile ?>?vouchno=<?= $qvouch . $para; ?>" target="_blank">
                    <i class="fa fa-print" style="color:#5BC0DE"></i>
                </a>
            </td>
            <td class=" buttonform tooltip-bottom" id="hadd" style="display: <? Echo $adddisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Add Record" >
                <button id='add' type="button" class="btn btn-pad btn-square " style="background-color:white; " onclick="window.location.href = '<?= $file . "?mode=true" . $para; ?>'" class="btn btn-labeled btn-success ">
                    <i class="fa fa-plus" style="color:#C0CA33"></i>    
                </button>
            </td>
 <!-- As Said By Tabreza Maam  -->
            <td class=" buttonform tooltip-bottom" id="hedit" style="display: <? Echo $editdisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Edit Record">
                <button id='edit' type="button" style="background-color:white; " class="btn btn-pad btn-square">
                    <i class="fa fa-pencil" style="color:#F0AD4E"></i>
                </button>
            </td>

            <?php
            if ($usertype < 2) {
                ?>

                <td class=" buttonform tooltip-bottom" id="hdelete" style="display: <? Echo $deletedisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Delete Record">
                    <a id='delete' class="btn btn-pad btn-square delete-entry" href="?delete&<?= $keyfld . "=" . $qvouch . "&series=$zseries" . "&source='$msource'" . $para ?>"  onClick="return confirm('Confirm Delete?');" style="background-color:white;">
                        <i class="fa fa-trash" style="color:#D9534F"></i>
                    </a>
                </td>
            <?php } ?>

            <td class=" buttonform tooltip-bottom" id="hexit" style="display: <? Echo $exitdisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Exit">
                <button id='exit' type="button" class="btn btn-pad btn-square " style="background-color:white; "  onClick="window.location.href = '<?= 'default.php' ?>'">
                    <i class="fa fa-power-off" style="color:red"></i>
                </button>
            </td>


            <td class=" buttonform tooltip-bottom" id="finishButt" style="display: <? Echo $savedisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Save Record">
                <input type="button" id="finishTab" class="btn btn-primary pull-right form" style="background-color:white;color: black;" value="Check & Finish">

            </td>
            <td class=" buttonform tooltip-bottom" id="ssubmit" style="display: <? Echo $savedisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Save Record">
                <button id='submit' type='submit' name='submit' value='<?php echo ($addflag == 0) ? "Update" : "Save"; ?>' class="btn btn-pad btn-square " style="background-color:white; ">
                    <i class="fa fa-check" style="color:#008D4C"></i>
                </button>
            </td>
            <td class=" buttonform tooltip-bottom" id="scancel" style="display: <? Echo $canceldisabled ?>" data-toggle="tooltip" data-placement="top" title="" data-original-title="Cancel Record">
                <button id='cancel' type="button" class="btn btn-pad btn-square " style="background-color:white; "  onClick="window.location.href = '<?= $file . "?mode=last" . $para; ?>'">
                    <i class="fa fa-times" style="color:#39CCCC"></i>
                </button>
            </td>

        </tr>

    </table>
</div>