<?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 "hall";
        $src = "hall.php?mode=last";
        break;


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


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

    case "customer";
        $src = "customer.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 "otherac";
        $src = "otherac.php?mode=last";
        break;

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

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


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

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

        ####################### TRANSACTION ##########################


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

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

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

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

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

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

    case "bankrecp";
        $src = "bankrecp.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 "othrecp";
        $src = "othrecp.php?mode=last";
        break;

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

    case "hallbookreg";
        $src = "hallbookreg.php";
        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;


        #################### ZAKAT ##############

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

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

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

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

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


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

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

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

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

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

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


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


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

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


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

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

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

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

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

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

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

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

        ########################## REGISTERS ########################


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

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

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

    case "hallreg";
        $src = "hallbookreg.php";
        break;

    case "pendhallreg";
        $src = "pendhallbookreg.php";
        break;


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

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

    case "laganreg";
        $src = "laganreg.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;

        #########################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="menutaiba.php" style="color:#005040; font-size:20px ">SMGJM</a> <a href="menutaiba.php" style="color:#B91646; font-size:20px "></a></u></b></li>


                    <li <?= $masters; ?>>
                        <a href="#">Masters</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $expense; ?>><a href="?action=expense">Expenses</a></li>
                            <li <?= $narration; ?>><a href="?action=narration">Narration</a></li>
                            <li <?= $staff; ?>><a href="?action=staff">Staff</a></li>
                            <li <?= $hall; ?>><a href="?action=hall">Hall</a></li>
                            <li <?= $cash; ?>><a href="?action=cash">Cash</a></li>
                        </ul>
                    </li>

                    <li <?= $transactions; ?>>
                        <a href="#">Transactions</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $hallbooking; ?>><a href="?action=hallbooking">Hall Booking</a></li>
                            <li <?= $cashrecp; ?>><a href="?action=cashrecp">Cash Receipt</a></li>
                            <li <?= $bankrecp; ?>><a href="?action=bankrecp">Bank Receipt</a></li>
                            <li <?= $cashpay; ?>><a href="?action=cashpay">Cash Payment</a></li>
                            <li <?= $bankpay; ?>><a href="?action=bankpay">Bank Payment</a></li>
                            <li <?= $contra; ?>><a href="?action=contra">Contra / Transfer</a></li>
                            <li <?= $othrecp; ?>><a href="?action=othrecp">Other Receipt</a></li>
                            <li <?= $othpay; ?>><a href="?action=othpay">Other Payment</a></li>

                        </ul>
                    </li>
                    <li <?= $zakat; ?>>
                        <a href="#">Zakat</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $widowhelp; ?>><a href="?action=widowhelp">Widow list (Monthly)</a></li>
                            <!--<li <?= $customer; ?>><a href="?action=">Ramzan Ration</a></li>-->
                            <li <?= $rationkit; ?>><a href="?action=rationkit">Ramzan Ration Kit</a></li>
                            <li <?= $rationform; ?>><a href="?action=rationform">Ramzan Ration Form</a></li>
                            <hr>
                            <li <?= $zakatincash; ?>><a href="?action=zakatincash">Zakat In Cash</a></li>
                            <li <?= $zakatinbank; ?>><a href="?action=zakatinbank">Zakat In Bank</a></li>
                            <!--<li <?= $widowgen; ?>><a href="?action=widowgen">Widow Help (Monthly)</a></li>-->
                            <li <?= $widowpay; ?>><a href="?action=widowpay">Widow Help </a></li>
                            <li <?= $medihelp; ?>><a href="?action=medihelp">Medical Help</a></li>
                            <li <?= $finanhelp; ?>><a href="?action=finanhelp">Financial Help</a></li>
                            <li <?= $feesapp; ?>><a href="?action=feesapp">Fees Application</a></li>
                            <li <?= $rationdonate; ?>><a href="?action=rationdonate">Ramzan Ration Donate</a></li>
                            <li <?= $rationdonatereg; ?>><a href="?action=rationdonatereg">Ramzan Ration Donate Register</a></li>
                            <li <?= $tpurchmat1; ?>><a href="?action=balsheet_zak">Balance Sheet</a></li>
                        </ul>
                    </li>
                    <li <?= $register; ?>>
                        <a href="#">Registers</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $hallreg; ?>><a href="?action=hallreg">Hall Booking </a></li>
                            <li <?= $pendhallreg; ?>><a href="?action=pendhallreg">Pending Hall Amount</a></li>
                            <li <?= $donationrecvdreg; ?>><a href="?action=donationrecvdreg">Donation Received Register</a></li>
                            <li <?= $othrecpreg; ?>><a href="?action=othrecpreg">Other Receipt Register</a></li>
                            <li <?= $othpayreg; ?>><a href="?action=othpayreg">Other Payments Register</a></li>
                            <li <?= $sagaireg; ?>><a href="?action=sagaireg">Sagai Register</a></li>
                            <li <?= $permarriagereg; ?>><a href="?action=permarriagereg">Permission of Marriage Date Register</a></li>
                            <li <?= $laganreg; ?>><a href="?action=laganreg">Lagan Register</a></li>

                        </ul>
                    </li>
                    <li <?= $reports; ?>>
                        <a href="#">Reports</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $cashbook; ?>><a href="?action=cashbook">Cash Book </a></li>
                            <li <?= $bankbook; ?>><a href="?action=bankbook">Bank Book </a></li>
                            <li <?= $income_exp; ?>><a href="?action=income_exp">Income & Expenses</a></li>
                        </ul>
                    </li>

                    <li <?= $finalization1; ?>>
                        <a href="#">Finalization</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $trbal1; ?>><a href="?action=trbal">Trial Balance</a></li>
                            <li <?= $profit1; ?>><a href="?action=profit">Profit & Loss</a></li>
                            <li <?= $profshar1; ?>><a href="?action=profshar">Profit Sharing</a></li>
                            <li <?= $balsheet1; ?>><a href="?action=balsheet">Balance Sheet</a></li>
                        </ul>
                    </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">
                    </li>
                    <li class="dropdown settings">
                    </li>
                    
                   
                    <li class="dropdown settings">
                        <a class="dropdown-toggle" href="calendar.php" target="_blank">
                            <label class="label-control" style="font-size: 18px;color:blue;"><b>Calendar</b></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>