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

$admin = $_SESSION["admin_" . $dbname];


$src = "";
$action = isset($_GET["action"]) ? $_GET["action"] : "";
switch ($action) {

    ####################### MASTERS ##########################
    case "slider";
        $src = "slider.php?mode=last";
        break;

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

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

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

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

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

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


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


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


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

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

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

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

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

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

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

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

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

    case "user";
        if ($admin == '1') {
            $src = "user.php?mode=last";
        } else {
            $src = "user2.php?mode=last";
        }
        break;

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

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

    default :
        $head = "Home";
        $src = "dashboard.php?mode=last";
}

include("includes/linkshead.php");
?>
<style>
    .menubtn{
        margin-left: 10px;
        margin-top: 20px;
    }
</style>
<script>
//        document.documentElement.requestFullscreen();
    $(window).load(function () {
        var featuredimg = document.getElementById("fbody");
        if (featuredimg.requestFullscreen) {
            featuredimg.requestFullscreen();
        }
    });
</script>
</head>
<body class="off-canvas" id="fbody">
    <div id="container" class="sidebar-mini">
        <header id="header">
            <!--logo start-->
            <!--<div class="brand"><a href="menu2.php" class="logo"><?php // Echo $project_name;                           ?></a></div>-->
            <!--            <a href="?action=dashboard">
                            <button type="button" class="btn btn-primary btn-lg menubtn">Dashboard</button>
                        </a>-->
            <!--<button onclick="openFullscreen();" id="fullscreen">fullscreen</button>-->

            <a href="kotent.php?mode=true">
                <button type="button" class="btn btn-primary btn-lg menubtn" style="background-color: white; color: #B9408F; border: #B9408F 1px solid;">KOT</button>
            </a>
            <a href="tabletrans.php?mode=last">
                <button type="button" class="btn btn-primary btn-lg menubtn" style="background-color: white; color: #B9408F; border: #B9408F 1px solid;">&nbsp;T&nbsp;&nbsp;T&nbsp; </button>
            </a>
            <!--logo end-->
            <!--            <div class="toggle-navigation toggle-left">
                            <button type="button" class="btn btn-default" id="toggle-left" data-toggle="tooltip" data-placement="right" title="Toggle Navigation">
                                <i class="fa fa-bars"></i>
                            </button>
                        </div>-->
            <div class="user-nav">
                <ul>
                    <li class="dropdown settings">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                            <?php echo $_SESSION["username_" . $dbname]; ?> <i class="fa fa-angle-down"></i>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="?action=company"><i class="fa fa-desktop"></i>  Company</a></li>
                            <li><a href="?action=user"><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>
        </header>
        <section class="main-content-wrapper" style="margin-left: 0px;">
            <section id="main-content">
                <div class="col-md-12 pad">
                    <iframe src="<?php echo $src; ?>" name="frame1" style="width: 100%; height:5000px;"  frameBorder="0" scrolling="no"></iframe>
                </div>
            </section>
        </section>
    </div>
    <!--main content end-->
    <?php include("includes/linksfoot.php") ?>
</body>
</html>
