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

include("includes/menu_rights.php");
$admin = $_SESSION["admin_" . $dbname];
$usertype = $_SESSION["usertype_" . $dbname];

include("includes/linkshead.php");
$dispyear = right(($_SESSION["zdbyear_" . $dbname]), 4);

$zseries = $_SESSION["series_" . $dbname];

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

$spec = $_SESSION["spltype_" . $dbname];
$compcd = $_SESSION["comp_" . $dbname];

//$gpass = mysqli_query($conn, "SELECT spltype FROM passmain WHERE spltype = '$spec'")or die(mysqli_error($conn));
//
//if ($spec == 1) {
//    $bgclr = "#8cc4f5";
//    $clr = "";
//} else {
//    $bgclr = "#c89595";
//    $clr = "color: white;";
//}
//
//
//$src = "";
//$action = isset($_GET["misaction"]) ? $_GET["misaction"] : "";
//switch ($action) {
//
//    case "monthsale";
//        $src = "monthsale.php";
//        break;
//
//    case "dailysale";
//        $src = "dailysale.php";
//        break;
//        
//    case "prodsalecompare";
//        $src = "prodsalecompare.php";
//        break;
//
//    case "topsellprod";
//        $src = "topsellprod.php";
//        break;
//
//    case "slowsellprod";
//        $src = "slowsellprod.php";
//        break;
//
//    case "nonperfcust";
//        $src = "nonperfcust.php";
//        break;
//
//    default :
//        $head = "monthsale";
//        $src = "monthsale.php";
//        break;
}

$dispyear = right(($_SESSION["zdbyear_" . $dbname]), 4);
//browse($dispyear);
//browse($bseries);

$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);
include("includes/linkshead.php");
?>
<script src="MyScript/outward.js" type="text/javascript"></script>
<style>
    .flex-container {
        display: flex;
        flex-wrap: wrap;
        background-color: transparent;
    }

    .flex-container > div {
        background-color: <?= $bgclr ?>;
        width: 194px;
        height: 100px;
        margin: 10px;
        text-align: center;
        line-height: 75px;
        border-radius: 53px 11px;
        font-size: 30px;
    }
    .zoom {
        cursor: pointer;
        color: white;
    }
    <?= $clr ?>
    
    .flex-container > div:hover {
        -ms-transform: scale(1.1); /* IE 9 */
        -webkit-transform: scale(1.1); /* Safari 3-8 */
        transform: scale(1.1);
    }
</style>
<style>
    h4{
        font-weight: 600;
        color: #1C1C59;
    }
    
    img{
        height: 100px;
    }

/*    .col-lg-2{
        width: 12.5% !important;
    }*/

    .col-lg-1{
        width: 6.33% !important;
    }
</style>
</head>
<body>

<div class="container-fluid">

        <!--sidebar left start-->
        <!--sidebar left end-->
        <!--main content start-->

<!--        <div class="container-fluid">

            <div class="row">
                <div class='col-lg-1 col-md-1 col-sm-12 col-xs-12 text-center'></div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 text-center'>
                    <h4>Monthly Sales</h4>
                </div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 text-center'>
                    <h4>Daily Sales</h4>
                </div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 text-center'>
                    <h4>Product Sale Comparison</h4>
                </div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 text-center'>
                    <h4>Top Selling Products</h4>
                </div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 text-center'>
                    <h4>Slow Moving Products</h4>
                </div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 text-center'>
                    <h4>Non Performing Customers</h4>
                </div>
            </div>
            
            <div class="row">
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 pad'>
                    <a href="misdashboard.php"><img src="images/monthlysale.png" alt="Monthly Sales" ></a>
                </div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 pad'>
                    <a href="misdashboard.php?misaction=dailysale"><img src="images/dailysale.png" alt="Daily Sale"></a>
                </div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 pad'>
                    <a href="misdashboard.php?misaction=prodsalecompare"><img src="images/prodsalecomp.png" alt="Product Sale Comparison" ></a>
                </div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 pad'>
                    <a href="misdashboard.php?misaction=topsellprod"><img src="images/topsellprod.png" alt="Top Selling Products" ></a>
                </div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 pad'>
                    <a href="misdashboard.php?misaction=slowsellprod"><img src="images/slowsellprod.png" alt="Slow Moving Products" ></a>
                </div>
                <div class='col-lg-2 col-md-2 col-sm-12 col-xs-12 pad'>
                    <a href="misdashboard.php?misaction=nonperfcust"><img src="images/nonperfcust.png" alt="Non Performing Customers" ></a>
                </div>
            </div>
        </div>-->

        <section class="main-content-wrapper" style="margin-left: 0px;">
            <section id="main-content">
                <div class="row">
                    <div class="col-md-12">
                        <iframe src="<?php echo $src; ?>" name="frame2" style="width: 100%; height:4000px;"  frameBorder="0" scrolling="no"></iframe>
                    </div>
                </div>
            </section>
        </section>
    </div>
    <div>
        <?php
//        include("misdashboard.php");
        
//        if ($spec == 1) {
//            ?>
<!--            <div class="flex-container">
                <div class="zoom" //<?= $item; ?> onclick="location.href = 'itemmain.php?mode=last';">Item</div>
                <div class="zoom" //<?= $salegmul; ?> onclick="location.href = 'salegstmulti.php?mode=last';">Sale Gst</div>
                <div class="zoom" //<?= $purchmatgst; ?> onclick="location.href = 'purchmatgst.php?mode=last';">Purchase Gst</div>  
                <div class="zoom" //<?= $creditnotemulti; ?> onclick="location.href = 'creditnotemulti.php?mode=last';" style="font-size:20px;">Credit Note - Multi</div>
                <div class="zoom" //<?= $credoth; ?> onclick="location.href = 'credoth.php?mode=last';" style="font-size:20px;">Credit Note - Others</div>
                <div class="zoom" //<?= $credoth; ?> onclick="location.href = 'credoth.php?mode=last';"></div>
                <div class="zoom" //<?= $inward; ?> onclick="location.href = 'inward.php?mode=last';">Inward</div>
                <div class="zoom" //<?= $outward; ?> onclick="location.href = 'outward.php?mode=last';">Outward</div>
                <div class="zoom" //<?= $rpstock; ?> onclick="location.href = 'stock.php';">Stock</div>  
                <div class="zoom" //<?= $rpledger; ?> onclick="location.href = 'ledger.php';">Ledger</div>
                <div class="zoom" //<?= $transport; ?> onclick="location.href = 'transport.php?mode=last';">Transport</div>
                <div class="zoom" //<?= $customer; ?> onclick="location.href = 'customer.php?mode=last';">Customer</div>  
                <div class="zoom" //<?= $supplier; ?> onclick="location.href = 'supplier.php?mode=last';">Supplier</div>
                <div class="zoom" //<?= $cashpay; ?> onclick="location.href = 'cashpay.php?mode=last';">Cash Pay</div>
                <div class="zoom" //<?= $bankpay; ?> onclick="location.href = 'bankpay.php?mode=last';">Bank Pay</div>  
                <div class="zoom" //<?= $cashrecp; ?> onclick="location.href = 'cashrecp.php?mode=last';">Cash Receipt</div>
                <div class="zoom" //<?= $bankrecp; ?> onclick="location.href = 'bankrecp.php?mode=last';">Bank Receipt</div>
                <div class="zoom" //<?= $rpdailyreport; ?> onclick="location.href = 'dailyrep.php';">Daily Report</div>  
                <div class="zoom" //<?= $dailycashrep; ?> onclick="location.href = 'dailyrepcash.php';">Daily Cash</div>
                <div class="zoom" //<?= $rpcashbook; ?> onclick="location.href = 'bankbook.php?para=C';">Cash Book</div>
                <div class="zoom" //<?= $rpbankbook; ?> onclick="location.href = 'bankbook.php?para=B';">Bank Book</div>  
            </div>
        <?php// } else { ?>
            <div class="flex-container">
                <div class="zoom" //<?= $item; ?> onclick="location.href = 'itemmain.php?mode=last';">Item</div>
                <div class="zoom" //<?= $salegmul; ?> onclick="location.href = 'sale.php?mode=last';">Sale</div>
                <div class="zoom" //<?= $purchase; ?> onclick="location.href = 'purchase.php?mode=last';">Purchase</div>  
                <div class="zoom" //<?= $inward; ?> onclick="location.href = 'inward.php?mode=last';">Inward</div>
                <div class="zoom" //<?= $outward; ?> onclick="location.href = 'outward.php?mode=last';">Outward</div>
                <div class="zoom" //<?= $rpstock; ?> onclick="location.href = 'stock.php';">Stock</div>  
                <div class="zoom" //<?= $rpledger; ?> onclick="location.href = 'ledger.php';">Ledger</div>
                <div class="zoom" //<?= $transport; ?> onclick="location.href = 'transport.php?mode=last';">Transport</div>
                <div class="zoom" //<?= $customer; ?> onclick="location.href = 'customer.php?mode=last';">Customer</div>  
                <div class="zoom" //<?= $supplier; ?> onclick="location.href = 'supplier.php?mode=last';">Supplier</div>
                <div class="zoom" //<?= $cashpay; ?> onclick="location.href = 'cashpay.php?mode=last';">Cash Pay</div>
                <div class="zoom" //<?= $bankpay; ?> onclick="location.href = 'bankpay.php?mode=last';">Bank Pay</div>  
                <div class="zoom" //<?= $cashrecp; ?> onclick="location.href = 'cashrecp.php?mode=last';">Cash Receipt</div>
                <div class="zoom" //<?= $bankrecp; ?> onclick="location.href = 'bankrecp.php?mode=last';">Bank Receipt</div>
                <div class="zoom" //<?= $rpdailyreport; ?> onclick="location.href = 'dailyrep.php';">Daily Report</div>  
                <div class="zoom" //<?= $dailycashrep; ?> onclick="location.href = 'dailyrepcash.php';">Daily Cash</div>
                <div class="zoom" //<?= $rpcashbook; ?> onclick="location.href = 'bankbook.php?para=C';">Cash Book</div>
                <div class="zoom"  //<?= $rpbankbook; ?> onclick="location.href = 'bankbook.php?para=B';">Bank Book</div>  
            </div>-->
        <?php// } ?>
        <?php include("includes/linksfoot.php"); ?>
</body>
</html>
