<?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 "cashbank":
        $src = "cash.php?mode=last";
        break;

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

    case "receipt":
        $src = "cashrecp.php?mode=last";
        break;

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

    ####################### REPORTS ##########################

    case "ledger":
        $src = "ledger.php";
        break;

    case "osrecv":
        $src = "osbill.php?para=R";
        break;

    case "cashbook":
        $src = "bankbook.php?para=C";
        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 = "dashboard.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:#43bbd4; font-size:20px "><?= $project_title; ?></a></u></b></li>

                    <li <?= $customer; ?>><a href="?action=customer"><b>Customer</b></a></li>
                    <li <?= $cash; ?>><a href="?action=cashbank"><b>Cash/Bank</b></a></li>
                    <li <?= $sale; ?>><a href="?action=sale"><b>Sale</b></a></li>
                    <li <?= $receipt; ?>><a href="?action=receipt"><b>Receipt</b></a></li>
                    <li <?= $salereg; ?>><a href="?action=salereg"><b>Sale Register</b></a></li>
                    <li <?= $ledger; ?>><a href="?action=ledger"><b>Ledger</b></a></li>
                    <li <?= $osrecv; ?>><a href="?action=osrecv"><b>O/s Receivable</b></a></li>
                    <li <?= $cashbook; ?>><a href="?action=cashbook"><b>Cash Book</b></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 <?= $tlbackup; ?>><a href="backup_ali.php"><i class="fa fa-cloud-download"></i>
                                    Backup</a></li>
                            <li <? $tlprofile; ?>><a href="?action=profile"><i class="fa fa-user"></i> Password
                                    Maintainence</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>