<?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";
        if ($guser['customer'] == '') {
            $src = "";
        } else {
            $src = "partyposn_fr.php";
        }
        break;

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

    case "agent";
        if ($guser['agent'] == '') {
            $src = "";
        } else {
            $src = "agentposn_fr.php";
        }
        break;

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

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

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

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

    ####################### TRANSACTIONS ##########################

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

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

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

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

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

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

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

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

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

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

    case "partyinout";
        if ($guser['partyinout'] == '') {
            $src = "";
        } else {
            $src = "ledgernew_party.php";
        }
        break;

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

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

    case "companyinoutrep";
        if ($guser['companyinoutrep'] == '') {
            $src = "";
        } else {
            $src = "comp_in_out.php";
        }
        break;

    case "cashinoutrep";
        if ($guser['cashinoutrep'] == '') {
            $src = "";
        } else {
            $src = "cashbook_in_out.php";
        }
        break;

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

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

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

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

    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:#43bbd4; font-size:20px "><?= $project_title; ?></a></u></b></li>

<!-- <li <?= $master; ?>> -->
                    <!-- <a href="#">Entries</a>
                    <ul class="cbp-hssubmenu"> -->
                    <li <?= $customer; ?>><a href="?action=customer">Parties</a></li>
                    <li <?= $agent; ?>><a href="?action=purchsale">Purchase & Sale</a></li>
<!--                    <li <?= $cash; ?>>
                        <a href="?action=cash">Cash/Bank</a>
                        <ul class="cbp-hssubmenu cbp-hssub-rows">
                            <li <?= $cash; ?>><a href="?action=cash">New Cash/Bank </a></li>
                            <li <?= $cashbankposn; ?>><a href="?action=cashbankposn">Cash/Bank </a></li>
                            <hr>
                            <li <?= $payin; ?>><a href="?action=payin">Received</a></li>
                            <li <?= $payout; ?>><a href="?action=payout">Paid</a></li>
                            <li <?= $payout; ?>><a href="?action=contra">Internal Transfer</a></li>
                        </ul>
                    </li>                        
                    -->
<!--                    <li <?= $expense; ?>><a href="?action=expense">Expense</a></li>
                    <li <?= $contexp; ?>><a href="?action=contexp">Container Expense</a></li>
                     <li <?= $carrierfees; ?>><a href="?action=carrierfees">Container Entry</a></li> 
                    <li <?= $invoiceent; ?>><a href="?action=invoiceent">Invoice</a></li>
                    <li <?= $companyinoutrep; ?>><a href="?action=companyinoutrep">Company </a></li>
                    <li <?= $loadsheet; ?>><a href="?action=loadsheet">Load Sheet </a></li>-->
                    <!-- </ul> -->
                    <!-- </li> -->

<!-- <li <?= $transactions ?>>
    <a href="#">Transactions</a>
    <ul class="cbp-hssubmenu cbp-hssub-rows">
        <li <?= $payin; ?>><a href="?action=payin">Payment In</a></li>
        <li <?= $payout; ?>><a href="?action=payout">Payment Out</a></li>
        <li <?= $agentin; ?>><a href="?action=agentin">Payment To Agent</a></li>
        <li <?= $agentout; ?>><a href="?action=agentout">Payment From Agent</a></li>
    </ul>
</li>

<li <?= $reports; ?>>
    <a href="#">Reports</a>
    <ul class="cbp-hssubmenu">
        <li <?= $partyinout; ?>><a href="?action=partyinout">Party In / Out</a></li>
        <li <?= $agentinrep; ?>><a href="?action=agentinrep">Agent In</a></li>
        <li <?= $agentoutrep; ?>><a href="?action=agentoutrep">Agent Out</a></li>
        <li <?= $cashinoutrep; ?>><a href="?action=cashinoutrep">Cash/Bank In / Out</a></li>
        <li <?= $containerrep; ?>><a href="?action=containerrep">Container Report</a></li>
    </ul>
</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>