<?php
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include('includes/function.php');
$admin = $_SESSION["admin_" . $dbname];
$usertype = $_SESSION["usertype_" . $dbname];
$spec = $_SESSION["spltype_" . $dbname];
$zroot = $_SESSION["zdir"];
$fseries = $_SESSION["series_" . $dbname];

//if ($usertype != 1) {
include("includes/menu_rights.php");
//}
$project_title = "SMGJM";
$project_title1 = "S";
$project_title2 = "M";

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

switch ($action) {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    ####################### TRANSACTION ##########################
    case "purchase";
        $src = "purchase.php?mode=last";
        break;

    case "repgiven";
        $src = "repairgiven.php?mode=last&para=G";
        break;

    case "reptaken";
        $src = "repairgiven.php?mode=last&para=T";
        break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    case "debnote";
        $src = "debnote.php?mode=last&credtype=G";
        break;

    case "debitnotegst";
        $src = "debnotegst.php?mode=last&credtype=G";
        break;

    case "creditnote";
        $src = "crednote.php?mode=last&credtype=G";
        break;

    case "creditnotegst";
        $src = "crednotegst.php?mode=last&credtype=G";
        break;

    case "creditnotemulti";
        $src = "creditnotemulti.php?mode=last&credtype=G";
        break;

    case "credoth";
        $src = "credoth.php?mode=last&credtype=O";
        break;

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

    case "credothgst";
        $src = "credothgst.php?mode=last&credtype=O";
        break;
    case "credothgstmulti";
        $src = "creditnotegstmulti.php?mode=last&credtype=O";
        break;

    case "deboth";
        $src = "deboth.php?mode=last&credtype=O";
        break;

    case "debothgst";
        $src = "debothgst.php?mode=last&credtype=O";
        break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    case "inwout";
        $src = "inwoutrep.php";
        break;

    case "rawinwout";
        $src = "inwoutmat.php";
        break;

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

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

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

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

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

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

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

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

    case "itemwisesale";
        $src = "itemwise_sale.php";
        break;

    case "itemgrpwisesale";
//        $src = "itemgrpsale.php";
        $src = "saleitemgrp.php";
        break;

    case "partygrpwisesale";
        $src = "partgrp_sale.php";
        break;

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

    case "dailyreport";
        $src = "dailyrep.php";
        break;

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

    case "dailycashrp";
        $src = "dailyrepcash.php";
        break;

    case "checkstock";
        $src = "check_stock.php";
        break;

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

    case "bankbook";
        $src = "bankbook.php?para=B";
        break;

    case "cashbook";
        $src = "bankbook.php?para=C";
        break;

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

    case "stocknew";
        $src = "stock_new.php";
        break;

    case "stockold";
        $src = "stock_old.php";
        break;

    case "stockonlyshade";
        $src = "stock_shade.php";
        break;

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

    case "payablerep";
        $src = "osbill.php?para=P";
        break;

    case "receivable";
        $src = "osbill.php?para=R";
        break;

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

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

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

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

    ########################## REGISTERS ########################
    case "purchreg";
        $src = "purchreg.php";
        break;

    case "pumultigstreg";
        $src = "pumultigstreg.php";
        break;
    case "purexp";
        $src = "purexpreg.php";
        break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    case "autoinw";
        $src = "trnfreg.php";
        break;

    case "transreg";
        $src = "intrnfreg.php";
        break;

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

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

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

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

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

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

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

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

    case "repgivreg";
        $src = "repaireg.php?para=G";
        break;

    case "jobgvnreg";
        $src = "jobgvnreg.php?";
        break;

    case "jobrecdreg";
        $src = "jobrecdreg.php?";
        break;

    case "packreg";
        $src = "packreg.php?";
        break;

    case "reprecreg";
        $src = "repaireg.php?para=R";
        break;

    ########################## GST REPORTS   ########################
    case "gstr1_1";
        $src = "gstr1_1.php";
        break;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    ########################## FINAALIZATION ########################
    case "trbal";
        $src = "trbal.php";
        break;

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

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

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

##############Combine Stock##############
    case "custnopay";
        $src = "custnopay.php";
        break;

    case "custnosale";
        $src = "custnosale.php";
        break;
    case "karigpay";
        $src = "karigpay.php";
        break;
    case "karadvbal";
        $src = "karadvbal.php";
        break;
    case "karigmatgv";
        $src = "karigmatgv.php";
        break;
    case "kargoodrc";
        $src = "kargoodrc.php";
        break;
##############Combine Stock##############

    case "combstock";
        $src = "stockall.php";
        break;

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

    case "profile";

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

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

    case "balsms";
        $src = "http://vas.gsmash.com/balance.php?username=ABDRAS&password=ABDRAS2017&route=1";
        break;

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

    case "graph";
        $src = "misdashboard.php";
        break;

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

$dispyear = right(($_SESSION["zdbyear_" . $dbname]), 4);

$zdb = $_SESSION["zdbyear_" . $dbname];

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

$getcomp = mysqli_query($conn, "SELECT code, name FROM `company` where `code`= '$compcd'") or die(mysqli_error($conn));
$fetcomp = mysqli_fetch_array($getcomp);
$cmpname = $fetcomp['name'];
mysqli_select_db($conn, $zdb);

//browse($zdb);
//$srchresult = mysqli_query($conn, "SELECT vouchno, DATE_FORMAT(`vouchdt`, '%d-%m-%Y')as vouchdt, compcode, source, qty
//                                       FROM `transacn` where `complete`= '0000-00-00' and `source`='TR' group by vouchno order by vouchdt DESC") or die(mysqli_error($conn));
//$srchresult = mysqli_query($conn, "SELECT vouchno FROM `trnfmain` where `tocomp`= '$fseries' and `complete` = '' group by vouchno order by vouchdt DESC") or die(mysqli_error($conn));
//            print table($srchresult);
if (!empty($srchresult)) {
    $srcinst = mysqli_num_rows($srchresult);
} else {
    $srcinst = 0;
}
include("includes/linksheadmenu.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>

        body {
            animation: fadeInAnimation ease 1s;
            animation-iteration-count: 1;
            animation-fill-mode: forwards;
        }


        @keyframes fadeInAnimation {
            0% {
                opacity: 0;
            }
            100% {
                opacity: 1;
            }
        }
        .dropdown-menu {
            border-radius: 15px;
            border: 1px;
        }
    </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="menuconstruct.php" style="color:#005040; font-size:20px ">SMGJM</a> <a href="menuconstruct.php" style="color:#B91646; font-size:20px "></a></u></b></li>

                    <li <?= $menu; ?>>
                        <a href="#">MENU</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $expenses; ?>><a href="?action=expenses">Cash Master</a></li>
                            <li <?= $narration; ?>><a href="?action=narration">Bank Master</a></li>
                            <li <?= $staff; ?>><a href="?action=staff">Supplier</a></li>
                            <li <?= $expenses; ?>><a href="?action=expenses">Cash Payment</a></li>
                            <li <?= $expenses; ?>><a href="?action=expenses">Bank Payment</a></li>
                            <li <?= $expenses; ?>><a href="?action=expenses">Bill Payable</a></li>
                            <li <?= $expenses; ?>><a href="?action=expenses">Ledger</a></li>
                            <li <?= $expenses; ?>><a href="?action=expenses">Cash Register</a></li>
                            <li <?= $expenses; ?>><a href="?action=expenses">Bank Register</a></li>
                            <li <?= $expenses; ?>><a href="?action=expenses">Bill Payable Register</a></li>

                        </ul>
                    </li>

<!--                    <li <?= $expenses; ?>><a href="?action=expenses"><i class="fa fa-graduation-cap"></i>Cash Master</a></li>
                    <li <?= $narration; ?>><a href="?action=narration"><i class="fa fa-bank"></i>Bank Master</a></li>
                    <li <?= $staff; ?>><a href="?action=staff"><i class="fa fa-industry"></i>Supplier</a></li>
                    <li <?= $expenses; ?>><a href="?action=expenses"><i class="fa fa-money"></i>Cash Payment</a></li>
                    <li <?= $expenses; ?>><a href="?action=expenses"><i class="fa fa-bank"></i>Bank Payment</a></li>
                    <li <?= $expenses; ?>><a href="?action=expenses"><i class="fa fa-credit-card"></i>Bill Payable</a></li>
                    <li <?= $expenses; ?>><a href="?action=expenses"><i class="fa fa-file"></i>Ledger</a></li>
                    <li <?= $expenses; ?>><a href="?action=expenses"><i class="fa fa-money"></i>Cash Register</a></li>
                    <li <?= $expenses; ?>><a href="?action=expenses"><i class="fa fa-bank"></i>Bank Register</a></li>
                    <li <?= $expenses; ?>><a href="?action=expenses"><i class="fa fa-credit-card"></i>Bill Payable Register</a></li>-->


                    <!-- <li class="dropdown settings"><a href="<?
                    // if ($usertype == 1) {
                    //     Echo "comp.php";
                    // } else {
                    //     Echo "#";
                    // }
                    ?>"><label class="label-control" style="font-size: 12px;color: <?php //echo $bgclr ?>;"> Company : <?php // echo $cmpname; ?></label></a></li> -->
                    <li class="dropdown settings" >
                        <a class="dropdown-toggle" href="series.php">
                            <label class="label-control" style="font-size: 18px;">Branch : <?= $fseries ?></label>
                        </a>
                    </li>

                    <li class="dropdown settings" style="float: right">
                        <a class="dropdown-toggle" href="year.php">
                            <label class="label-control" style="font-size: 15px;font-weight: bold;"><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>
        <input type="hidden" name="ustype" class="ustype" value="<?= $usertype ?>">

    </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>