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


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

//include("includes/menu_rights.php")
switch ($action) {
    ####################### PROFILES ##########################

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


    case "slipent";
        $head = "Slip Entry";
        $src = "slipent.php?mode=last";
        break;


    default :
//        $head = "Home";
//        $src = "misdashboard.php";
//        if ($usertype == 1) {
//            $src = "misdashboard.php";
//        } else {
//            $src = "default.php";
//        }
        $src = "";
}

$mcred = "";
if ($guser['creditnote'] != "1" && $guser['creditoth'] != "1") {
    $mcred = "style='display: none'";
}
$mbank = "";
if ($guser['bankpay'] != "1" && $guser['bankrecp'] != "1") {
    $mbank = "style='display: none'";
}
$mcash = "";
if ($guser['cashpay'] != "1" && $guser['cashrecp'] != "1") {
    $mcash = "style='display: none'";
}

$mbpmrp = "";
if ($guser['bpmrp'] != "1" && $guser['bpwmrp'] != "1") {
    $mbpmrp = "style='display: none'";
}
$mlpmrp = "";
if ($guser['lpmrp'] != "1" && $guser['lpwmrp'] != "1") {
    $mlpmrp = "style='display: none'";
}
$rpquery = "";
if ($guser['rpchqnoqry'] != "1" && $guser['rpamountqry'] != "1") {
    $rpquery = "style='display: none'";
}

$rpoutstanding = "";
if ($guser['outsrecevrp'] != "1" && $guser['outspayrp'] != "1") {
    $rpoutstanding = "style='display: none'";
}
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>
        .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="menuuser.php" style="color:#4eb3c7; font-size:20px "><?= $project_title; ?></a></u></b></li>

                    <li class="text-left"><b><u><a href="?action=slipent" style="color:blue; font-size:20px ">Slip Entry</a></u></b></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 <? $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>