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

//include("includes/menu_rights.php");
//browse(1);
$admin = $_SESSION["admin_" . $dbname];
$usertype = $_SESSION["usertype"];
$src = "";
$action = isset($_GET["action"]) ? $_GET["action"] : "";
$dispyear = right(($_SESSION["zdbyear_" . $dbname]), 4);
$myear = $_SESSION[$myyear];

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

//browse($reports);
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 "matsup";
        $src = "matsup.php?mode=last";
        break;

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


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

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

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

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

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

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

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



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

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

    case "chalreg";
        $src = "challanreg.php";
        break;

    case "invreg";
        $src = "invreg.php";
        break;
    
    case "pendbill";
        $src = "pendbill.php";
        break;

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

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

    case "einvoicecred";
        $src = "einvoicegen.php?para=C";
        break;

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

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

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


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


include("includes/linkshead.php");

//$zdb = $_SESSION["zdbyear_" . $dbname];
//$myyear = $_SESSION[$myyear];
//mysqli_select_db($conn, $zdb);
?>

<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>
        .cbp-hssubmenu > li:hover{
            color: red
        }
    </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:#175298; 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 <?= $vessel; ?>><a href="?action=vessel">Vessel</a></li>
                            <li <?= $port; ?>><a href="?action=port">Port / Anchor</a></li>
                            <li <?= $launch; ?>><a href="?action=launch">Launch</a></li>
                            <li <?= $orderby; ?>><a href="?action=orderby">Order By</a></li>
                        </ul>
                    </li>
                    <li <?= $transactions; ?>>
                        <a href="#">Transactions</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $challan; ?>><a href="?action=challan">Challan / Bill</a></li>
                            <li <?= $invoice; ?>><a href="?action=invoice">Invoice</a></li>
                        </ul>
                    </li>
                    <li <?= $reports; ?>>
                        <a href="#">Reports</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $chalreg; ?>><a href="?action=chalreg">Challan Register</a></li>
                            <li <?= $invreg; ?>><a href="?action=invreg">Invoice Register</a></li>
                            <li <?= $pendbill; ?>><a href="?action=pendbill">Pending Bills</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 <? $generate; ?>><a href="?action=generate"><i class="fa fa-hand-o-right"></i> Generate Bills</a></li>-->
                            <li <? $tlprofile; ?>><a href="?action=profile"><i class="fa fa-user"></i> Profile</a></li>
                            <?php if ($guser['usertype'] == 1) { ?>
                                <li <? // $tlgraph;               
                                    ?>><a href="?action=graph"><i class="fa fa-bar-chart""></i> Graph</a></li>
                                  <?php } ?>  
                            <!-- <li <? $tlbackup; ?>><a href=" ?action=backup"><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>
                    <?php //if ($mno > 0) { 
                    ?>
                    <!-- <li class="dropdown settings" style="float: right">
                        <a class="dropdown-toggle" href="?action=pendlv">
                            <label class="label-control" style="font-size: 13px;color: blue"> <?php echo "Pending Delivery ($mno)"; ?></label>
                        </a>
                    </li> -->
                    <?php //}
                    //                    if ($getno2 > 0) { 
                    ?>
                    <!-- <li class="dropdown settings" style="float: right">
                        <a class="dropdown-toggle" href="?action=pendcp">
                            <label class="label-control" style="font-size: 13px;color: red"> <?php echo "Pending CP "; ?></label>
                        </a>
                    </li> -->
                    <?php // }  
                    ?>
                </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>