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

$usertype = $_SESSION["usertype"];

if ($usertype != 1) {
    include("includes/menu_rights.php");
}

$compcd = $_SESSION["comp_" . $dbname];
$menucolor = $_SESSION["menucolor"];

// $project_title = "DEVYANI";
$admin = $_SESSION["admin_" . $dbname];
$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;

    ####################### EXPENSES ##########################

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

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

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

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

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

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

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

    case "shipmentadd";
        $src = "shipment.php?mode=true";
        break;

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

    case "updcontainer";
        $src = "contupdate.php";
        break;

    case "updrecv";
        $src = "recvupdate.php";
        break;

    case "upddelv";
        $src = "delvupdate.php";
        break;


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

    case "shiporiginrep";
        $src = "shiporiginrep.php";
        break;
    case "ledger";
        $src = "ledger.php";
        break;
    case "recpreg";
        $src = "recpreg.php";
        break;

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

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

    case "shipmentmultireg";
        $src = "shipmultireg.php";
        break;

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

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

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

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


    default:
        // if ($guser['dashboard'] == '') {
        //         $src = "";
        //     } else {
        $src = "dashboardsk.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>
    <style>
        <?php
        $compcd = 2;
        // if ($compcd == 1) {
        //     $colr = "#a98467";
        // } elseif ($compcd == 2) {
        //     $colr = "#5f2b54";
        // }
        ?>

        .button-29 {
            align-items: center;
            appearance: none;
            background: transparent;
            border: 2px solid  <?= $menucolor ?>;
            border-radius: 6px;
            box-sizing: border-box;
            color: <?= $menucolor ?>;
            cursor: pointer;
            display: inline-flex;
            font-family: "JetBrains Mono", monospace;
            height: 38px;
            width: 180px;
            justify-content: center;
            line-height: 1;
            list-style: none;
            overflow: hidden;
            padding-left: 16px;
            padding-right: 16px;
            position: relative;
            text-align: left;
            text-decoration: none;
            transition: box-shadow .15s, transform .15s;
            user-select: none;
            -webkit-user-select: none;
            touch-action: manipulation;
            white-space: nowrap;
            will-change: box-shadow, transform;
            font-size: 18px;
        }


        .button-29:hover {
            box-shadow: rgba(45, 35, 66, .4) 0 4px 8px, rgba(45, 35, 66, .3) 0 7px 13px -3px, <?= $menucolor ?> 0 -3px 0 inset;
            transform: translateY(-2px);
        }

        .button-29:active {
            box-shadow: <?= $menucolor ?> 0 3px 7px inset;
            transform: translateY(2px);
        }

        .cbp-hsmenu-wrapper ul {
            margin-left: -40px;
        }


        .cbp-hsmenu>li.cbp-hsitem-open .cbp-hssubmenu {
            z-index: 1000;
            visibility: visible;
            background-color:
                <?= $menucolor ?>
                !important;
        }
    </style>
</head>

<body>
    <!--<div class="container-scroller">-->
    <!-- partial:partials/_horizontal-navbar.html -->
    <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:<?= $menucolor ?>; font-size:20px "><?= $project_title; ?></a></u></b></li>

                    <li <?= $masters; ?>>
                        <a href="#">Masters</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $customer; ?>><a href="?action=customer">Customer</a></li>
                            <li <?= $originmaster; ?>><a href="?action=origin">Origin</a></li>
                            <li <?= $destination; ?>><a href="?action=destination">Destination</a></li>
                            <li <?= $account; ?>><a href="?action=account">Account</a></li>
                        </ul>
                    </li>

                    <li <?= $transactions ?>>
                        <a href="#">Transactions</a>
                        <ul class="cbp-hssubmenu cbp-hssub-rows">
                            <li <?= $shipment; ?>><a href="?action=shipment">Shipment</a></li>
                            <li <?= $updcontainer; ?>><a href="?action=updcontainer">Update Sailing</a></li>
                            <li <?= $updrecv; ?>><a href="?action=updrecv">Container Port Arrival</a></li>
                            <li <?= $upddelv; ?>><a href="?action=upddelv">Delivery from Destination</a></li>
                            <li <?= $recp_ent; ?>><a href="?action=recp_ent">Receipt Entry</a></li>
                        </ul>
                    </li>

                    <li <?= $reports; ?>>
                        <a href="#">Reports</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $shipmentstatus; ?>><a href="?action=shipmentstatus">Shipment as per Origin</a></li>
                            <li <?= $deststockrep; ?>><a href="?action=deststockrep">Stock at Destination</a></li>
                            <li <?= $shipmentmultireg; ?>><a href="?action=shipmentmultireg">Multiple Shipment
                                    Register</a></li>
                            <li <?= $ledger; ?>><a href="?action=ledger">Ledger</a></li>
                            <li <?= $recpreg; ?>><a href="?action=recpreg">Receipt Register</a></li>
                        </ul>
                    </li>

                    <?php if ($usertype == 1) { ?>

                        <li class="dropdown settings" <?= $shipment; ?>><a href="?action=shipmentadd"><button type="button"
                                    class="button-29">NEW SHIPMENT</button></a></li>
                        <li class="dropdown settings" <?= $shipmentstatus; ?>><a href="?action=shipmentstatus"><button
                                    type="button" class="button-29">SHIPMENT STATUS</button></a></li>

                    <?php } ?>

                    <li class="dropdown settings" style="float: right;margin-right:50px">
                        <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 <? $tlbackup; ?>><a href="backup_ali.php"><i class="fa fa-cloud-download"></i>
                                    Backup</a></li>
                            <?php
                            //                            if ($myear == "1001") {
                            //                                echo "<li $tlbackup><a href='?action=upload_backup'><i class='fa fa-cloud-download'></i> Upload Backup</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>