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

$usertype = $_SESSION["usertype"];

include("includes/menu_rights.php");

$admin = $_SESSION["admin_" . $dbname];
$fseries = $_SESSION["series"];

$src = "";
$action = isset($_GET["action"]) ? $_GET["action"] : "";
$dispyear = right(($_SESSION["zdbyear_" . $dbname]), 4);
$myear = $_SESSION[$myyear];

switch ($action) {
    ####################### PROFILES ##########################

    case "profile";
        $head = "Create User";
        $src = '';
        if ($usertype == 1) {
            $src = "user.php?mode=last";
        } else {
            $src = "user2.php?mode=last";
        }
        break;
    ####################### MASTERS ##########################

    case "customer";
        $src = "customer.php?mode=last";
        break;

    case "supplier";
        $src = "supplier.php?mode=last";
        break;

    case "product";
        $src = "product.php?mode=last";
        break;

    case "changeofrates";
        $src = "openstock.php?mode=last";
        break;
    
        case "compmast";
        $src = "company_mast.php?mode=last";
        break;


    case "onlent";
        $src = "onlent.php?mode=last";
        break;
    


    case "inward";
        $src = "inward.php?mode=last";
        break;
    
    case "onlent_upload";
        $src = "onlent_upload.php?mode=last";
        break;
    
        case "minstkalert";
        $src = "minstkalert.php?mode=last";
        break;

    ####################### TRANSACTIONS ##########################
    case "purchase";
        $src = "purchase.php?mode=last";
        break;

    case "sale";
        $src = "sale.php?mode=last";
        break;

    case "debnote";
        $src = "debnote.php?mode=last";
        break;

    case "crednote";
        $src = "crednote.php?mode=last";
        break;
    
        case "onlent_demo";
        $src = "onlent_demo.php?mode=last";
        break;

    case "inward";
        $src = "inward.php?mode=last";
        break;

    case "outward";
        $src = "outward.php?mode=last";
        break;

    case "damaged";
        $src = "damaged.php?mode=last";
        break;

    ####################### REGISTERS ##########################
    case "purreg";
        $src = "purreg.php";
        break;

    case "salereg";
        $src = "salereg.php";
        break;

    case "credreg";
        $src = "credreg.php";
        break;

    case "debreg";
        $src = "debreg.php";
        break;

    case "damreg";
        $src = "damreg.php";
        break;

    case "inwreg";
        $src = "inw_newreg.php";
        break;

    case "outreg";
        $src = "outreg.php";
        break;
    
        ####################### REPORTS ##########################
    case "stock";
        $src = "stock.php";
        break;

    case "prodhist";
        $src = "prodhist.php";
        break;

    case "negstock";
        $src = "negstock.php";
        break;

    case "itemwise";
        $src = "prodwisesale.php";
        break;

    case "itemwisepl";
        $src = "itemwisepl.php";
        break;

    case "leadparty";
        $src = "leadparty.php";
        break;

    case "leadprod";
        $src = "leadprodsale.php";
        break;
    
        ####################### TOOLS ##########################
//
//        case "inward_entry";
//        $src = "inward_ent.php";
//        break;

    ####################### TOOLS ##########################

    case "company";
        $src = "company.php?mode=last";
        break;

    case "yearselection";
        if ($guser['yearselection'] == '') {
            $src = "";
        } else {
            $src = "yea.php?mode=last";
        }
        break;

    case "backup";
        //        if ($guser['tlbackup'] == '') {
        //            $src = "";
        //        } else {
        $src = "backup.php";
        //        }
        break;

    default:
        $src = "default.php";
}

include("includes/linkshead.php");
?>

<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <meta name="description" content="Blueprint: Horizontal Slide Out Menu" />
    <meta name="keywords" content="horizontal, slide out, menu, navigation, responsive, javascript, images, grid" />
    <meta name="author" content="Codrops" />
    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" type="text/css" href="menu/css/default.css" />
    <link rel="stylesheet" type="text/css" href="menu/css/component.css" />
    <script src="menu/js/modernizr.custom.js"></script>
</head>

<body>
    <div class="main">
        <nav class="cbp-hsmenu-wrapper" id="cbp-hsmenu-wrapper">
            <div class="cbp-hsinner">
                <ul class="cbp-hsmenu" style="margin-left: 0px;max-width: 250em;width:100%">

                    <li class="text-left"><b><u><a href="menu.php" style="color:#004e98; font-size:20px "><?= $project_title; ?></a></u></b></li>

                    <li <?= $master; ?>>
                        <a href="#">Master</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $customer; ?>><a href="?action=customer">Customer</a></li>
                            <li <?= $supplier; ?>><a href="?action=supplier">Supplier</a></li>
                            <li <?= $product; ?>><a href="?action=product">Product</a></li>
                            <li <?= $changeofrates; ?>><a href="?action=changeofrates">Change Of Rates</a></li>
                            <li <?= $compmast; ?>><a href="?action=compmast">Company Master</a></li>
                        </ul>
                    </li>
                    <li <?= $transactions ?>>
                        <a href="#">Transactions</a>
                        <ul class="cbp-hssubmenu cbp-hssub-rows">
                            <li <?= $purchase; ?>><a href="?action=purchase">Purchase</a></li>
                            <li <?= $sale; ?>><a href="?action=sale">Sale</a></li>
                            <li <?= $debnote ?>><a href="?action=debnote">Purchase Return / Debit Note</a></li>
                            <li <?= $crednote; ?>><a href="?action=crednote">Sale Return / Credit Note</a></li>
                            <!-- <li <?= $crednote; ?>><a href="?action=credoth">Other Credit Note</a></li> -->
                            <li <?= $inward; ?>><a href="?action=inward">Inward</a></li>
                            <li <?= $outward; ?>><a href="?action=outward">Outward</a></li>
                            <li <?= $damaged ?>><a href="?action=damaged">Damaged</a></li>
                        </ul>
                    </li>
                    <li <?= $reports; ?>>
                        <a href="#">Reports</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $stock; ?>><a href="?action=stock">Stock</a></li>
                            <li <?= $inouthist; ?>><a href="?action=prodhist">Inward / Outward History</a></li>
                            <li <?= $negstock; ?>><a href="?action=negstock">Negative Stock</a></li>
                            <!-- <li <?= $stockmov; ?>><a href="?action=stockmov">Stock Movement</a></li> -->
                            <!-- <li <?= $vat; ?>><a href="?action=vatrep">VAT</a></li> -->
                            <!-- <li <?= $ledger; ?>><a href="?action=ledger">Ledger</a></li> -->
                            <!--<li <?= $labels; ?>><a href="?action=labels">Labels</a></li>-->
                            <!--                            <li <?= $stock; ?>><a href="?action=stock">Query Cheque No.</a></li>
                            <li <?= $stock; ?>><a href="?action=stock">Query Amount</a></li>-->
                            <li <?= $itemwise; ?>><a href="?action=itemwise">Itemwise Sale</a></li>
                            <!-- <li <?= $itemwisepl; ?>><a href="?action=itemwisepl">Itemwise P/L</a></li> -->
                            <!-- <li <?= $itemwisegrpsl; ?>><a href="?action=tiitemgrpwise">Itemwise Group Sale</a></li> -->
                            <!-- <li <?= $tipartysl; ?>><a href="?action=tipitemreg">Partywise Sale</a></li> -->
                            <li <?= $leadparty; ?>><a href="?action=leadparty">Leading Parties</a></li>
                            <li <?= $leadprod; ?>><a href="?action=leadprod">Leading Products</a></li>
                            <!-- <li <?= $dailyrep; ?>><a href="?action=dailyrep">Daily Report</a></li> -->
                            <!-- <li <?= $dailycash; ?>><a href="?action=dailycash">Daily Cash</a></li> -->
                            <!-- <hr> -->
                            <!-- <li <?= $bankbook; ?>><a href="?action=bankbook">Bank Book</a></li>
                            <li <?= $cashbook; ?>><a href="?action=cashbook">Cash Book</a></li>
                            <li <?= $exprep; ?>><a href="?action=expenserep">Expense</a></li> -->
                            <!--<li <?= $addlabels; ?>><a href="?action=addlabels">Address Labels</a></li>-->
                            <!--<li <?= $pricelist; ?>><a href="?action=pricelist">Price List</a></li>-->
                            <!--<li <?= $partyadd; ?>><a href="?action=partyadd">Party Address</a></li>-->

                            <!--<li <?= $certoforg; ?>><a href="?action=certoforg">Certificate Of Origin</a></li>-->
                            <!--<li <?= $gsp; ?>><a style="color:rosybrown;" href="?action=gsp">GSP</a></li>-->
                            <!--<li <?= $excourier; ?>><a href="?action=excourier">Courier</a></li>-->
                            <!--<hr>-->
                            <!--<li <?= $exgsp; ?>><a href="?action=exgsp">GSP Register</a></li>-->
                            <!--<li <?= $excourreg; ?>><a href="?action=excourreg">Courier Register</a></li>-->
                        </ul>
                    </li>
                    <li <?= $registers; ?>>
                        <a href="#">Registers</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $purreg; ?>><a href="?action=purreg">Purchase</a></li>
                            <li <?= $salereg; ?>><a href="?action=salereg">Sale</a></li>
                            <li <?= $debreg; ?>><a href="?action=debreg">Debit Note</a></li>
                            <li <?= $credreg; ?>><a href="?action=credreg">Credit Note</a></li>
                            <li <?= $inwreg; ?>><a href="?action=inwreg">Inward</a></li>
                            <li <?= $outreg; ?>><a href="?action=outreg">Outward</a></li>
                            <li <?= $damreg; ?>><a href="?action=damreg">Damaged</a></li>
                        </ul>
                    </li>
                    <li <?= $inward; ?>><a href="?action=onlent">Label Entry</a></li>
                    <li <?= $onlent_demo; ?>><a href="?action=onlent_demo">Label Entry - DEMO</a></li>
                    <li <?= $inward; ?>><a href="?action=onlent_upload">Label Entry - Excel Upload</a></li>
                    <li <?= $minstkalert; ?>><a href="minstkalert.php" target="_blank" style="color: red;">Stock Level</a></li>
                    <li class="dropdown settings" style="float: right">
                        <a class="dropdown-toggle" href="year.php">
                            <label class="label-control" style="font-size: 13px"><i class="fa fa-calendar" aria-hidden="true"></i> <?php echo 'Financial Year : ' . $dispyear; ?></label>
                        </a>
                    </li>
                    <li class="dropdown settings" style="float: right">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <b><? echo $_SESSION["username_" . $dbname] ?></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li <?= $tlcompany; ?>><a href="?action=company"><i class="fa fa-building-o"></i> Company Setup</a></li>
                            <li <?= $tlprofile; ?>><a href="?action=profile"><i class="fa fa-user"></i> Profile</a></li>
                            <li><a href="logout.php"><i class="fa fa-power-off"></i> Logout</a></li>
                        </ul>
                    </li>

                </ul>
            </div>
        </nav>
    </div>
    <div class="">
        <iframe src="<?php echo $src; ?>" name="frame1" class="frame1" style="width: 100%; height:5000px;" frameBorder="0" scrolling="no"></iframe>
    </div>
    <script src="menu/js/cbpHorizontalSlideOutMenu.min.js"></script>
    <script>
        var menu = new cbpHorizontalSlideOutMenu(document.getElementById('cbp-hsmenu-wrapper'));
    </script>
</body>


<!-- Mirrored from www.urbanui.com/yoraui/template/demo/horizontal-default-light/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 02 Jul 2019 11:04:23 GMT -->

</html>