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

include("includes/menu_rights.php");

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

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;

    ####################### MASTERS ##########################
    case "customer";
        if ($guser['customer'] == '') {
            $src = "";
        } else {
            $src = "customer.php?mode=last";
        }
        break;

    case "supplier";
        if ($guser['supplier'] == '') {
            $src = "";
        } else {
            $src = "supplier.php?mode=last";
        }
        break;

    case "state";
        if ($guser['state'] == '') {
            $src = "";
        } else {
            $src = "state.php?mode=last";
        }
        break;

    case "itemgrp";
        if ($guser['itemgrp'] == '') {
            $src = "";
        } else {
            $src = "itemgrp.php?mode=last";
        }
        break;

    case "item";
        if ($guser['item'] == '') {
            $src = "";
        } else {
            $src = "item.php?mode=last";
        }
        break;

    case "chcustdtl";
        if ($guser['chcustdtl'] == '') {
            $src = "";
        } else {
            $src = "chcustdtls.php?mode=last";
        }
        break;



    case "staff";
        if ($guser['staff'] == '') {
            $src = "";
        } else {
            $src = "staff.php?mode=last";
        }
        break;

    case "drawbank";
        if ($guser['staff'] == '') {
            $src = "";
        } else {
            $src = "drawbank.php?mode=last";
        }
        break;

    case "godown";

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

        break;

    case "openbal";
        if ($guser['openbal'] == '') {
            $src = "";
        } else {
            $src = "openbal.php?mode=last&form=openbal";
        }
        break;

    case "openrate";
        if ($guser['openrate'] == '') {
            $src = "";
        } else {
            $src = "openrate.php?mode=last&form=openstock";
        }
        break;


    case "bank";
        if ($guser['bank'] == '') {
            $src = "";
        } else {
            $src = "bank.php?mode=last";
        }
        break;

    case "cash";
        if ($guser['cash'] == '') {
            $src = "";
        } else {
            $src = "cash.php?mode=last";
        }
        break;

    case "expense";
        if ($guser['expense'] == '') {
            $src = "";
        } else {
            $src = "expense.php?mode=last";
        }
        break;

    case "other";
        if ($guser['other'] == '') {
            $src = "";
        } else {
            $src = "otherac.php?mode=last";
        }
        break;

    case "group";
        if ($guser['group'] == '') {
            $src = "";
        } else {
            $src = "group.php?mode=last";
        }
        break;

    case "colour";
        if ($guser['group'] == '') {
            $src = "";
        } else {
            $src = "colour.php?mode=last";
        }
        break;

    case "narration";
        if ($guser['group'] == '') {
            $src = "";
        } else {
            $src = "narration.php?mode=last";
        }
        break;

    case "gsttype";
        if ($guser['gsttype'] == '') {
            $src = "";
        } else {
            $src = "gsttype.php?mode=last&para=gsttype";
        }
        break;

    case "transport";
        if ($guser['transport'] == '') {
            $src = "";
        } else {
            $src = "transport.php?mode=last";
        }
        break;

    case "product";
        if ($guser['product'] == '') {
            $src = "";
        } else {
            $src = "product.php?mode=last";
        }
        break;

    case "prodgrp";
        if ($guser['prodgrp'] == '') {
            $src = "";
        } else {
            $src = "prodgrp.php?mode=last";
        }
        break;

    case "midamreg";
        if ($guser['midamreg'] == '') {
            $src = "";
        } else {
            $src = "midamreg.php?mode=last";
        }
        break;

    case "area";
        if ($guser['area'] == '') {
            $src = "";
        } else {
            $src = "area.php?mode=last";
        }
        break;



    case "courier";
        if ($guser['courier'] == '') {
            $src = "";
        } else {
            $src = "courier.php?mode=last";
        }
        break;


    case "unit";
        if ($guser['unit'] == '') {
            $src = "";
        } else {
            $src = "unit.php?mode=last";
        }
        break;

    case "changeofrates";
        if ($guser['changeofrates'] == '') {
            $src = "";
        } else {
            $src = "changeRate.php";
        }
        break;

    ####################### TRADING INVENTARY ##########################

    case "tiinward";
        if ($guser['tiinward'] == '') {
            $src = "";
        } else {
            $src = "inward.php?mode=last";
        }
        break;

    case "openstock";
        if ($guser['openstock'] == '') {
            $src = "";
        } else {
            $src = "openstk_prod.php?mode=last";
        }
        break;

    case "tidamage";
        if ($guser['tidamage'] == '') {
            $src = "";
        } else {
            $src = "damaged.php?mode=last";
        }
        break;

    case "tisale";
        if ($guser['tisale'] == '') {
            $src = "";
        } else {
            $src = "sale_ti.php?mode=last";
        }
        break;

    case "deemsale";
        if ($guser['deemsale'] == '') {
            $src = "";
        } else {
            $src = "sale_de.php?mode=last";
        }
        break;

    case "inwardexp";
//        if ($guser['inwardexp'] == '') {
//            $src = "";
//        } else {
        $src = "inwardexp.php?mode=last";
//        }
        break;

    case "deeminward";
        if ($guser['deeminward'] == '') {
            $src = "";
        } else {
            $src = "deeminward.php?mode=last";
        }
        break;

    case "deeminwdreg";
        if ($guser['deeminwdreg'] == '') {
            $src = "";
        } else {
            $src = "deeminwdreg.php?mode=last";
        }
        break;

    case "deemslreg";
        //        if ($guser['deemslreg'] == '') {
        //            $src = "";
        //        } else {
        $src = "deemslreg.php?mode=last";
        //        }
        break;

    case "saleoth";
        //        if ($guser['tisale'] == '') {
        //            $src = "";
        //        } else {
        $src = "saleoth.php?mode=last";
        //        }
        break;

    case "ticrednote";
        if ($guser['ticrednote'] == '') {
            $src = "";
        } else {
            $src = "crednote.php?mode=last&credtype=G";
        }
        break;

    case "ticredoth";
        if ($guser['ticredoth'] == '') {
            $src = "";
        } else {
            $src = "credoth.php?mode=last&credtype=O";
        }
        break;

    case "transfer";
        if ($guser['transfer'] == '') {
            $src = "";
        } else {
            $src = "transfer.php?mode=last";
        }
        break;

    case "tds";
//        if ($guser['transfer'] == '') {
//            $src = "";
//        } else {
        $src = "tds.php?mode=last";
//        }
        break;

    case "dismantle";
        if ($guser['dismantle'] == '') {
            $src = "";
        } else {
            $src = "dismantle.php?mode=last";
        }
        break;

    case "multiinvoice";
//        if ($guser['dismantle'] == '') {
//            $src = "";
//        } else {
        $src = "multiinvoice.php?mode=last";
//        }
        break;

    ####################### MANUFACTURING INVENTARY ##########################

    case "production";
        if ($guser['production'] == '') {
            $src = "";
        } else {
            $src = "production.php?mode=last";
        }
        break;

    case "damrawmat";
        if ($guser['damrawmat'] == '') {
            $src = "";
        } else {
            $src = "damaged_mi.php?mode=last";
        }
        break;

    case "purchaser_mi";
        //        if ($guser[purchaser_mi] == '') {
        //            $src = "";
        //        } else {
        $src = "purchase_mi.php?mode=last&type=R";
        //        }
        break;

    case "purchasep_mi";
        //        if ($guser[purchasep_mi] == '') {
        //            $src = "";
        //        } else {
        $src = "purchase_mi.php?mode=last&type=P";
        //        }
        break;

    case "inward_mi";
        //        if ($guser[purchasep_mi] == '') {
        //            $src = "";
        //        } else {
        $src = "inward_mi.php?mode=last&type=I";
        //        }
        break;

    case "purcoth_mi";
        //        if ($guser[purchasep_mi] == '') {
        //            $src = "";
        //        } else {
        $src = "purcoth.php?mode=last";
        //        }
        break;

    case "changerate_item";
        if ($guser['changerate_item'] == '') {
            $src = "";
        } else {
            $src = "changeRate_item.php?mode=last";
        }
        break;

    case "openstock_item";
        if ($guser['openstock_item'] == '') {
            $src = "";
        } else {
            $src = "openstk_item.php?mode=last";
        }
        break;

    case "openpack";
        if ($guser['openpack'] == '') {
            $src = "";
        } else {
            $src = "openstk_pack.php?mode=last";
        }
        break;

    case "packgrp";
        if ($guser['packgrp'] == '') {
            $src = "";
        } else {
            $src = "packgrp.php?mode=last";
        }
        break;

    case "packing";
        if ($guser['packing'] == '') {
            $src = "";
        } else {
            $src = "packing.php?mode=last";
        }
        break;

    case "finprod";
        if ($guser['finprod'] == '') {
            $src = "";
        } else {
            $src = "finprod.php?mode=last";
        }
        break;

    case "debnoter_mi";
        if ($guser['debnoter_mi'] == '') {
            $src = "";
        } else {
            $src = "debnote_mi.php?mode=last&type=R";
        }
        break;

    case "debnotep_mi";
        if ($guser['debnotep_mi'] == '') {
            $src = "";
        } else {
            $src = "debnote_mi.php?mode=last&type=P";
        }
        break;

    case "deboth_mi";
        if ($guser['deboth_mi'] == '') {
            $src = "";
        } else {
            $src = "deboth_mi.php?mode=last";
        }
        break;

    case "exinward";
        if ($guser['exinward'] == '') {
            $src = "";
        } else {
            $src = "inwardexp.php?mode=last";
        }
        break;

    case "purrawreg";
//        if ($guser['purrawreg'] == '') {
//            $src = "";
//        } else {
            $src = "purrawreg.php?mode=last";
//        }
        break;

    case "purordreg";
        if ($guser['purordreg'] == '') {
            $src = "";
        } else {
            $src = "purordreg.php?mode=last";
        }
        break;

    case "purretreg";
        if ($guser['purretreg'] == '') {
            $src = "";
        } else {
            $src = "purretreg.php?mode=last";
        }
        break;

    case "prodreg";
        if ($guser['prodreg'] == '') {
            $src = "";
        } else {
            $src = "prodreg.php?mode=last";
        }
        break;

    ####################### EXPORT INVENTARY ##########################
//    case "exsale";
//        if ($guser['exsale'] == '') {
//            $src = "";
//        } else {
//            $src = "sale_ex.php?mode=last";
//        }
//        break;

    case "exinward";
        if ($guser['exinward'] == '') {
            $src = "";
        } else {
            $src = "inwardexp.php?mode=last";
        }
        break;

    case "proforma";
        if ($guser['proforma'] == '') {
            $src = "";
        } else {
            $src = "proforma.php?mode=last&form=6";
        }
        break;

    case "exinvoice";
        if ($guser['exinvoice'] == '') {
            $src = "";
        } else {
            $src = "invoexp.php?mode=last&form=6";
        }
        break;

    ####################### TRANSACTIONS ##########################

    case "salea";
        if ($guser['salea'] == '') {
            $src = "";
        } else {
            $src = "sale.php?mode=last&form=6";
        }
        break;


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


    case "saleb";
        if ($guser['saleb'] == '') {
            $src = "";
        } else {
            $src = "sale.php?mode=last&form=13.5";
        }
        break;

    case "spare5";
        if ($guser['salespa'] == '') {
            $src = "";
        } else {
            $src = "salespare.php?mode=last&form=6";
        }
        break;

    case "spare12";
        if ($guser['salespb'] == '') {
            $src = "";
        } else {
            $src = "salespare.php?mode=last&form=13.5";
        }
        break;

    case "midelv";
        if ($guser['midelv'] == '') {
            $src = "";
        } else {
            $src = "midelv.php?mode=last";
        }
        break;

    case "salegst";
        if ($guser['salegst'] == '') {
            $src = "";
        } else {
            $src = "salegst.php?mode=last&form=6";
        }
        break;

    case "salegstdtl";
        if ($guser['salegst'] == '') {
            $src = "";
        } else {
            $src = "salegst_dtl.php?mode=last";
        }
        break;


    case "purchase";
        if ($guser['purchase'] == '') {
            $src = "";
        } else {
            $src = "purchase.php?mode=last";
        }
        break;

    case "purchasegst";
        if ($guser['purchase'] == '') {
            $src = "";
        } else {
            $src = "purchasegst.php?mode=last";
        }
        break;

    case "inward";
        if ($guser['inward'] == '') {
            $src = "";
        } else {
            $src = "inward.php?mode=last";
        }
        break;

    case "outward";
        if ($guser['outward'] == '') {
            $src = "";
        } else {
            $src = "outward.php?mode=last";
        }
        break;

    case "damage";
        if ($guser['damage'] == '') {
            $src = "";
        } else {
            $src = "damaged.php?mode=last";
        }
        break;

    case "order";
        if ($guser['ordform'] == '') {
            $src = "";
        } else {
            $src = "ordform.php?mode=last";
        }
        break;

    case "debnotegr";
        if ($guser['debnotegr'] == '') {
            $src = "";
        } else {
            $src = "debnote.php?mode=last&form=debnote&type=G";
        }
        break;

    case "debnoteoth";
        if ($guser['debnoteoth'] == '') {
            $src = "";
        } else {
            $src = "debnote.php?mode=last&form=debnote&type=O";
        }
        break;

    case "crednotegr";
        if ($guser['crednotegr'] == '') {
            $src = "";
        } else {
            $src = "crednote.php?mode=last&form=crednote&type=G";
        }
        break;

    case "crednoteoth";
        if ($guser['crednoteoth'] == '') {
            $src = "";
        } else {
            $src = "crednote.php?mode=last&form=crednote&type=O";
        }
        break;

    case "creditnote";
        if ($guser['creditnote'] == '') {
            $src = "";
        } else {
            $src = "creditnote.php?mode=last&form=creditnote&type=G";
        }
        break;

    case "credoth";
        if ($guser['credoth'] == '') {
            $src = "";
        } else {
            $src = "creditnote.php?mode=last&form=creditnote&type=O";
        }
        break;

    case "bankrecp";
        if ($guser['bankrecp'] == '') {
            $src = "";
        } else {
            $src = "bankrecp.php?mode=last";
        }
        break;

    case "cashrecp";
        if ($guser['cashrecp'] == '') {
            $src = "";
        } else {
            $src = "cashrecp.php?mode=last";
        }
        break;


    case "bankpay";
        if ($guser['bankpay'] == '') {
            $src = "";
        } else {
            $src = "bankpay.php?mode=last";
        }
        break;


    case "cashpay";
        if ($guser['cashpay'] == '') {
            $src = "";
        } else {
            $src = "cashpay.php?mode=last";
        }
        break;

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

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

    case "payablerep";
//        if ($guser['payablerep'] == '') {
//            $src = "";
//        } else {
        $src = "osbill.php?para=P";
//        }
        break;

    case "receivablerep";
//        if ($guser['payablerep'] == '') {
//            $src = "";
//        } else {
        $src = "osbill.php?para=R";
//        }
        break;

    case "journal";
        if ($guser['journal'] == '') {
            $src = "";
        } else {
            $src = "jv.php?mode=last";
        }
        break;

    case "discrecd";
        if ($guser['discrecev'] == '') {
            $src = "";
        } else {
            $src = "discrecd.php?mode=last";
        }
        break;

    case "discgiven";
        if ($guser['discrecev'] == '') {
            $src = "";
        } else {
            $src = "discgiven.php?mode=last";
        }
        break;

    case "purchord";
        if ($guser['purchord'] == '') {
            $src = "";
        } else {
            $src = "purchord.php?mode=last";
        }
        break;

    case "prevbill";
        if ($guser['prevbill'] == '') {
            $src = "";
        } else {
            $src = "prevbill.php?mode=last";
        }
        break;


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

    case "bankrecorep";
        $src = "bankreco_rep.php";
        break;

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

    case "withmrp";
        if ($guser['bpmrp'] == '') {
            $src = "";
        } else {
            $src = "barcodelbl.php?report=withmrp";
        }
        break;

    case "purchsumm";
        //        if ($guser['purchsumm'] == '') {
        //            $src = "";
        //        } else {
        $src = "purchsumm.php";
        //        }
        break;


    case "salesumm";
//        if ($guser['salesumm'] == '') {
//            $src = "";
//        } else {
            $src = "salesumm.php";
//        }
        break;


    case "dailysalsumm";
        if ($guser['dailysalsumm'] == '') {
            $src = "";
        } else {
            $src = "dailysalsumm.php";
        }
        break;

    case "itemsalereg";
        if ($guser['itemsalereg'] == '') {
            $src = "";
        } else {
            $src = "itemsalereg.php?mode=last";
        }
        break;

    case "prodhist";
        if ($guser['prodhist'] == '') {
            $src = "";
        } else {
            $src = "prodhist.php?mode=last";
        }
        break;

    case "partywisesale";
        if ($guser['partywisesale'] == '') {
            $src = "";
        } else {
            $src = "partywisesale.php?mode=last";
        }
        break;

    case "withoutmrp";
        if ($guser['bpwmrp'] == '') {
            $src = "";
        } else {
            $src = "barcodelbl.php?report=withoutmrp";
        }
        break;

    case "lwithmrp";
        if ($guser['lpmrp'] == '') {
            $src = "";
        } else {
            $src = "barcodelbl.php?report=lwithmrp";
        }
        break;

    case "lwithoutmrp";
        if ($guser['lpwmrp'] == '') {
            $src = "";
        } else {
            $src = "barcodelbl.php?report=lwithoutmrp";
        }
        break;

    case "withmrp";
        if ($guser['bpmrp'] == '') {
            $src = "";
        } else {
            $src = "barcodelbl.php?report=withmrp";
        }
        break;

    case "withoutmrp";
        if ($guser['bpwmrp'] == '') {
            $src = "";
        } else {
            $src = "barcodelbl.php?report=withoutmrp";
        }
        break;

    case "lwithmrp";
        if ($guser['lpmrp'] == '') {
            $src = "";
        } else {
            $src = "barcodelbl.php?report=lwithmrp";
        }
        break;

    case "lwithoutmrp";
        if ($guser['lpwmrp'] == '') {
            $src = "";
        } else {
            $src = "barcodelbl.php?report=lwithoutmrp";
        }
        break;


    case "inwout";
        if ($guser['rpitemhist'] == '') {
            $src = "";
        } else {
            $src = "inwoutrep.php";
        }
        break;

    case "stock";
        if ($guser['rpstock'] == '') {
            $src = "";
        } else {
            $src = "stock.php";
        }
        break;

    case "vatrep";
        if ($guser['rpvat'] == '') {
            $src = "";
        } else {
            $src = "vatrep.php";
        }
        break;

    case "income";
        if ($guser['incometaxrp'] == '') {
            $src = "";
        } else {
            $src = "taxreg.php?report=income";
        }
        break;

    case "sales";
        if ($guser['salestaxrp'] == '') {
            $src = "";
        } else {
            $src = "taxreg.php?report=sales";
        }
        break;

    case "osrec";
        if ($guser['outsrecevrp'] == '') {
            $src = "";
        } else {
            $src = "osbill.php?para=R";
        }
        break;

    case "ospay";
        if ($guser['outspayrp'] == '') {
            $src = "";
        } else {
            $src = "osbill.php?para=P";
        }
        break;

    case "ledger";
        if ($guser['ledger'] == '') {
            $src = "";
        } else {
            $src = "ledger.php";
        }
        break;

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

    case "stock";
        if ($guser['stockrp'] == '') {
            $src = "";
        } else {
            $src = "stock.php";
        }
        break;

    case "stkrawmat";
//        if ($guser['stkrawmat'] == '') {
//            $src = "";
//        } else {
        $src = "stkrawmat.php?";
//        }
        break;

    case "stkprod";
//        if ($guser['stkprod'] == '') {
//            $src = "";
//        } else {
        $src = "stkprod.php?";
//        }
        break;

    case "stkpack";
//        if ($guser['stkpack'] == '') {
//            $src = "";
//        } else {
        $src = "stkpack.php?";
//        }
        break;

    case "tdsrep";
//        if ($guser['stkpack'] == '') {
//            $src = "";
//        } else {
        $src = "tdsrep.php?";
//        }
        break;

    case "bankbook";
        //        if ($guser[rpbankbook] == '') {
        //            browse('1');
        //            $src = "";
        //        } else {
        //            browse('2');
        $src = "bankbook.php?para=B";
        //        }
        break;

    case "cashbook";
        //        if ($guser[rpcashbook] == '') {
        //            $src = "";
        //        } else {
        $src = "bankbook.php?para=C";
        //        }
        break;

    case "jvbook";
        //        if ($guser[rpcashbook] == '') {
        //            $src = "";
        //        } else {
        $src = "jvbook.php?para=C";
        //        }
        break;

    case "jvgst";
        //        if ($guser[rpcashbook] == '') {
        //            $src = "";
        //        } else {
        $src = "jvgst.php";
        //        }
        break;

    case "bpaychq";
        if ($guser['bpaychq'] == '') {
            $src = "";
        } else {
            $src = "bkpy_chq.php";
        }
        break;

    case "discreg";
        if ($guser['discrecevrp'] == '') {
            $src = "";
        } else {
            $src = "discreg.php";
        }
        break;

    case "dailyrep";
        if ($guser['dailyreprp'] == '') {
            $src = "";
        } else {
            $src = "dailyrep.php";
        }
        break;

    case "chqrep";
//        if ($guser['rpchqnoqry'] == '') {
//            $src = "";
//        } else {
        $src = "chqrep.php";
//        }
        break;

    case "amtrep";
//        if ($guser['rpamountqry'] == '') {
//            $src = "";
//        } else {
        $src = "amtrep.php";
//        }
        break;

    case "itemwise";
        if ($guser['rpitemwise'] == '') {
            $src = "";
        } else {
            $src = "itemwise.php";
        }
        break;

    case "itemwisesale";
        if ($guser['rpitemwisesale'] == '') {
            $src = "";
        } else {
            $src = "itemwise_sale.php";
        }
        break;
    case "itemgrpwisesale";
        if ($guser['rpitemgrpwisesale'] == '') {
            $src = "";
        } else {
            $src = "saleitemgrp.php";
        }
        break;
    case "partygrpwisesale";
        if ($guser['rppartygrpwisesale'] == '') {
            $src = "";
        } else {
            $src = "partgrp_sale.php";
        }
        break;


//    case "chqrep";
//        $src = "chqrep.php";
//        break;
//
//    case "amtrep";
//        $src = "amtrep.php";
//        break;
    ####################### REGISTERS ##########################

    case "tisalereg";
        if ($guser['tisalereg'] == '') {
            $src = "";
        } else {
            $src = "tisalereg.php";
        }
        break;

    case "tiitemwise";
        if ($guser['tiitemwise'] == '') {
            $src = "";
        } else {
            $src = "itemwisereg.php";
        }
        break;

    case "tiitemgrpwise";
        if ($guser['tiitemgrpwise'] == '') {
            $src = "";
        } else {
            $src = "itemgrpwisereg.php";
        }
        break;

    case "tipitemreg";
        if ($guser['tipitemreg'] == '') {
            $src = "";
        } else {
            $src = "tipitemreg.php";
        }
        break;

    case "tiipartyreg";
        if ($guser['tiipartyreg'] == '') {
            $src = "";
        } else {
            $src = "tiipartyreg.php";
        }
        break;

    case "tisalitemwise";
        if ($guser['tisalitemwise'] == '') {
            $src = "";
        } else {
            $src = "salitemwisereg.php";
        }
        break;

    case "midelvreg";
        if ($guser['midelvreg'] == '') {
            $src = "";
        } else {
            $src = "midelvreg.php";
        }
        break;

    case "tidisreg";
        if ($guser['tidisreg'] == '') {
            $src = "";
        } else {
            $src = "tidisreg.php";
        }
        break;

//    case "exsalereg";
//        if ($guser['exsalereg'] == '') {
//            $src = "";
//        } else {
//            $src = "exsalereg.php";
//        }
//        break;

    case "tiinwdreg";
        if ($guser['tiinwdreg'] == '') {
            $src = "";
        } else {
            $src = "tiinwdreg.php";
        }
        break;

    case "exinwdreg";
        if ($guser['exinwdreg'] == '') {
            $src = "";
        } else {
            $src = "exinwdreg.php";
        }
        break;
    case "exinvoicereg";
        if ($guser['exinvoicereg'] == '') {
            $src = "";
        } else {
            $src = "exinvoicereg.php";
        }
        break;
    case "ticredreg";
        if ($guser['ticredreg'] == '') {
            $src = "";
        } else {
            $src = "ticredreg.php";
        }
        break;

    case "ticredothreg";
        if ($guser['ticredothreg'] == '') {
            $src = "";
        } else {
            $src = "ticredothreg.php";
        }
        break;

    case "tidamreg";
        if ($guser['tidamreg'] == '') {
            $src = "";
        } else {
            $src = "tidamreg.php";
        }
        break;

    case "titranreg";
        if ($guser['titranreg'] == '') {
            $src = "";
        } else {
            $src = "titranreg.php";
        }
        break;

    case "saletinreg";
        if ($guser['saletinrg'] == '') {
            $src = "";
        } else {
            $src = "saletinreg.php";
        }
        break;

    case "purreg";
        if ($guser['purchaserg'] == '') {
            $src = "";
        } else {
            $src = "purreg.php";
        }
        break;

    case "purgstreg";
        if ($guser['purchasegstrg'] == '') {
            $src = "";
        } else {
            $src = "purgstreg.php";
        }
        break;

    case "orderreg";
        if ($guser['ordformrg'] == '') {
            $src = "";
        } else {
            $src = "orderreg.php";
        }
        break;

    case "inwardreg";
        if ($guser['inwardrg'] == '') {
            $src = "";
        } else {
            $src = "inwardreg.php";
        }
        break;

    case "outwardreg";
        if ($guser['outwardrg'] == '') {
            $src = "";
        } else {
            $src = "outwardreg.php";
        }
        break;

    case "debreg";
        if ($guser['debnoterg'] == '') {
            $src = "";
        } else {
            $src = "debreg.php";
        }
        break;

    case "credreg";
        if ($guser['crednoterg'] == '') {
            $src = "";
        } else {
            $src = "credreg.php";
        }
        break;

    ####################### SUMMARY ##########################

    case "pursalessum";
        if ($guser['pursalessum'] == '') {
            $src = "";
        } else {
            $src = "purs.php?mode=last";
        }
        break;

    case "purgrpsum";
        if ($guser['purgrpsum'] == '') {
            $src = "";
        } else {
            $src = "purg.php?mode=last";
        }
        break;

    case "salegrpsum";
        if ($guser['salegrpsum'] == '') {
            $src = "";
        } else {
            $src = "sale.php?mode=last";
        }
        break;
    ####################### FINALIZATION ##########################

    case "trbal";
        //        if ($guser[fntrialbal] == '') {
        //            $src = "";
        //        } else {
        $src = "trbal.php?mode=last";
        //        }
        break;

    case "profit";
        //        if ($guser[fnprofit] == '') {
        //            $src = "";
        //        } else {
        $src = "profit.php?mode=last";
        //        }
        break;

    case "profshar";
        //        if ($guser[fnprofshar] == '') {
        //            $src = "";
        //        } else {
        $src = "profshar.php?mode=last";
        //        }
        break;

    case "balsheet";
        //        if ($guser[fnbalsheet] == '') {
        //            $src = "";
        //        } else {
        $src = "balsheet.php?mode=last";
        //        }
        break;


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

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

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

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

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

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

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

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

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

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

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


    case "gstsum";
        $src = "gstsum.php";
        break;
    ////////////////////////GSTR2_PURCHASE////////////////////////////////////////
    case "gstr2_b2b";
        $src = "gstr2_b2b.php";
        break;

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

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

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

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

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

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

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

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

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

    case "gstr2_docs";
        $src = "gstr2_docs.php";
        break;
    /////////////////////////////GST SUMMARY/////////////////////////////
    case "gstsum";
        $src = "gstsum.php";
        break;

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

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

    case "company";
        //        if ($guser[tlcompany] == '') {
        //            $src = "";
        //        } else {
        $src = "company.php?mode=last";
        //        }
        break;

    case "yearselection";
        if ($guser['yearselection'] == '') {
            $src = "";
        } else {
            $src = "yea.php?mode=last";
        }
        break;

    case "backup";
//        if ($guser['tlbackup'] == '') {
//            $src = "";
//        } else {
        $src = "backup.php";
//        }
        break;

    default: {
            $src = 'default.php';
            break;
        }
}
$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");
?>
<!--<script>
    $("li").click(function() {
  $("li").removeClass("active");
  $(this).addClass("active");
}); 
</script>-->
</head>

<body class="navbar-top  pace-done sidebar-xs">

    <!-- Main navbar -->
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="navbar-header">
            <!--<a class="navbar-brand" href="index.html"><img src="assets/images/logo_light.png" alt=""></a>-->
            <a class="navbar-brand" href="menu.php"><b>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $project_title ?></b></a>
            <ul class="nav navbar-nav visible-xs-block">
                <li><a data-toggle="collapse" data-target="#navbar-mobile"><i class="icon-tree5"></i></a></li>
                <li><a class="sidebar-mobile-main-toggle"><i class="icon-paragraph-justify3"></i></a></li>
            </ul>
        </div>

        <div class="navbar-collapse collapse" id="navbar-mobile">
            <ul class="nav navbar-nav">
                <li><a class="sidebar-control sidebar-main-toggle hidden-xs"><i class="icon-paragraph-justify3"></i></a></li>

                <li class="dropdown">
                    <!--                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                            <i class="icon-git-compare"></i>
                                            <span class="visible-xs-inline-block position-right">Git updates</span>
                                            <span class="badge bg-warning-400">9</span>
                                        </a>-->

                    <div class="dropdown-menu dropdown-content">
                        <div class="dropdown-content-heading">
                            Git updates
                            <ul class="icons-list">
                                <li><a href="#"><i class="icon-sync"></i></a></li>
                            </ul>
                        </div>

                        <ul class="media-list dropdown-content-body width-350">
                            <li class="media">
                                <div class="media-left">
                                    <a href="#" class="btn border-primary text-primary btn-flat btn-rounded btn-icon btn-sm"><i class="icon-git-pull-request"></i></a>
                                </div>

                                <div class="media-body">
                                    Drop the IE <a href="#">specific hacks</a> for temporal inputs
                                    <div class="media-annotation">4 minutes ago</div>
                                </div>
                            </li>

                            <li class="media">
                                <div class="media-left">
                                    <a href="#" class="btn border-warning text-warning btn-flat btn-rounded btn-icon btn-sm"><i class="icon-git-commit"></i></a>
                                </div>

                                <div class="media-body">
                                    Add full font overrides for popovers and tooltips
                                    <div class="media-annotation">36 minutes ago</div>
                                </div>
                            </li>

                            <li class="media">
                                <div class="media-left">
                                    <a href="#" class="btn border-info text-info btn-flat btn-rounded btn-icon btn-sm"><i class="icon-git-branch"></i></a>
                                </div>

                                <div class="media-body">
                                    <a href="#">Chris Arney</a> created a new <span class="text-semibold">Design</span> branch
                                    <div class="media-annotation">2 hours ago</div>
                                </div>
                            </li>

                            <li class="media">
                                <div class="media-left">
                                    <a href="#" class="btn border-success text-success btn-flat btn-rounded btn-icon btn-sm"><i class="icon-git-merge"></i></a>
                                </div>

                                <div class="media-body">
                                    <a href="#">Eugene Kopyov</a> merged <span class="text-semibold">Master</span> and <span class="text-semibold">Dev</span> branches
                                    <div class="media-annotation">Dec 18, 18:36</div>
                                </div>
                            </li>

                            <li class="media">
                                <div class="media-left">
                                    <a href="#" class="btn border-primary text-primary btn-flat btn-rounded btn-icon btn-sm"><i class="icon-git-pull-request"></i></a>
                                </div>

                                <div class="media-body">
                                    Have Carousel ignore keyboard events
                                    <div class="media-annotation">Dec 12, 05:46</div>
                                </div>
                            </li>
                        </ul>

                        <div class="dropdown-content-footer">
                            <a href="#" data-popup="tooltip" title="All activity"><i class="icon-menu display-block"></i></a>
                        </div>
                    </div>
                </li>
            </ul>

            <!--<p class="navbar-text"><span class="label bg-success-400" style="background-color: black;color:white">Trial Version</span></p>-->
            <ul class="nav navbar-nav navbar-right">
                <li class="dropdown settings">
                    <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 dropdown-user">
                    <a class="dropdown-toggle" data-toggle="dropdown">
                        <!--<img src="assets/images/demo/users/face11.jpg" alt="">-->
                        <span><?php echo $_SESSION["username_" . $dbname]; ?></span>
                        <i class="caret"></i>
                    </a>

                    <ul class="dropdown-menu dropdown-menu-right">
                        <!--<li ><a href="?action=compseries"><i class="fa fa-building-o"></i> Company Address</a></li>-->
                        <li <? $tlcompany; ?>><a href="?action=company"><i class="fa fa-building-o"></i> Company SetUp</a></li>
                        <? if ($_SESSION["usertype"] == "1") { ?>
                            <li <? $tlbackup; ?>><a href="?action=backup"><i class="fa fa-cloud-download"></i> Backup</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>
    </div>
    <!-- /main navbar -->


    <!-- Page container -->
    <div class="page-container">

        <!-- Page content -->
        <div class="page-content">

            <!-- Main sidebar -->
            <div class="sidebar sidebar-main">
                <div class="sidebar-content">
                    <!-- Main navigation -->
                    <div class="sidebar-category sidebar-category-visible">
                        <div class="category-content no-padding">
                            <ul class="navigation navigation-main navigation-accordion" id="grand">
                                <!-- Main -->
                                <li <?= $master; ?> id="1">
                                    <a href="#"><i class="fa fa-graduation-cap"></i> <span>Masters</span></a>
                                    <ul class="nav-sub">
                                        <li <?= $customer; ?>><a href="?action=customer">Customer</a></li>
                                        <li <?= $supplier; ?>><a href="?action=supplier">Supplier</a></li>
                                        <!--<li <?= $gsttype ?>><a href="?action=gsttype">GST Type</a></li>-->
                                        <li <?= $state; ?>><a href="?action=state">State</a></li>
                                        <li <?= $area; ?>><a href="?action=area">Area</a></li>
                                        <li <?= $chcustdtl; ?>><a href="?action=chcustdtl">Change of Customer Details</a></li>
                                        <li <?= $openbal; ?>><a href="?action=openbal">Opening Balance</a></li>
                                        <li <?= $transport; ?>><a href="?action=transport">Transporter</a></li>
                                        <li <?= $courier; ?>><a href="?action=courier">Courier</a></li>
                                        <!--<li <?= $staff; ?>><a href="?action=staff">Staff</a></li>-->
                                        <li <?= $narration; ?>><a href="?action=narration">Narration</a></li>
                                        <li <?= $unit; ?>><a href="?action=unit">Unit</a></li>
                                        <li <?= $godown; ?>><a href="?action=godown">Godown</a></li>
                                        <li <?= $prevoutstand; ?>><a href="?action=prevoutstand">Previous Outstanding</a></li>
                                    </ul>
                                </li>
                                <li <?= $trading_inventory; ?> id="2">
                                    <a href="#"><i class="fa fa-globe"></i> <span>Trading Inventory</span></a>
                                    <ul class="nav-sub">
                                        <li <?= $ti_master; ?>>
                                            <a href="#" class="has-ul"><i class="fa fa-graduation-cap"></i>Master</a>
                                            <ul class="hidden-ul" style="display: none;">
                                                <li <?= $colour; ?>><a href="?action=colour">Colour</a></li>
                                                <li <?= $prodgrp; ?>><a href="?action=prodgrp">Product Group</a></li>
                                                <li <?= $product; ?>><a href="?action=product">Product</a></li>
                                                <li <?= $changeofrates; ?>><a href="?action=changeofrates">Change of Rate</a></li>
                                                <li <?= $openstock; ?>><a href="?action=openstock">Opening Stock</a></li>
                                            </ul>
                                        </li>
                                        <hr>
                                        <li <?= $tisale; ?>><a href="?action=tisale">Local Sale</a></li>
                                        <li <?= $deemsale ?>><a href="?action=deemsale">Deemed Sale</a></li>
                                        <li <?= $saleoth ?>><a href="?action=saleoth">Sale Other</a></li>
                                        <li <?= $ticred; ?>>
                                            <a href="#">Credit Note</a>
                                            <ul class="nav-sub">
                                                <li <?= $ticrednote; ?>><a href="?action=ticrednote">Goods Return</a></li>
                                                <li <?= $ticredoth; ?>><a href="?action=ticredoth">Others</a></li>
                                            </ul>
                                        </li>
                                        <li <?= $tiinward; ?>><a href="?action=tiinward">Inward</a></li>
                                        <!--<li <?= $tiinward; ?>><a href="?action=deeminward">Deemed Inward</a></li>-->

                                        <li <?= $tidamage; ?>><a href="?action=tidamage">Damage</a></li>
                                        <li <?= $transfer; ?>><a href="?action=transfer">Transfer</a></li>
                                        <!--<li <?= $tds ?>><a href="?action=tds">TDS</a></li>-->
                                        <li <?= $multiinvoice; ?>><a href="?action=multiinvoice">Multi Invoice</a></li>
                                        <hr>
                                        <li <?= $ti_register ;?>>
                                            <a href="#" class="has-ul"><i class="fa fa-book"></i>Register</a>
                                            <ul class="hidden-ul" style="display: none;">
                                                <li <?= $tisalereg; ?>><a href="?action=tisalereg">Normal</a></li>
                                                <li <?= $ticredreg; ?>><a href="?action=ticredreg">Credit Note</a></li>
                                                <li <?= $tiinwdreg; ?>><a href="?action=tiinwdreg">Inward Register</a></li>
                                                <!--<li <? ?>><a href="?action=deemslreg">Deemed Register</a></li>-->
                                                <!--<li <? ?>><a href="?action=deeminwdreg">Deemed Inward Register</a></li>-->
                                                <li <?= $tidamreg; ?>><a href="?action=tidamreg">Damage Register</a></li>
                                                <li <?= $titranreg; ?>><a href="?action=titranreg">Transfer Register</a></li>
                                                <!--<li <?= $tidisreg; ?>><a href="?action=tidisreg">Dismantle Register</a></li>-->
                                            </ul>
                                        </li>
                                    </ul>
                                </li>
                                <li <?= $export; ?> id="3">
                                    <a href="#"><i class="fa fa-exchange"></i><span>Export</span></a>
                                    <ul class="nav-sub">
                                        <li <?= $exinvoice; ?>><a href="?action=exinvoice">Invoice / Sale</a></li>
                                        <li <?= $expinward; ?>><a href="?action=inwardexp">Inward</a></li>
                                        <li <?= $certoforg; ?>><a href="?action=certoforg">Certificate Of Origin</a></li>
                                        <li <?= $gsp; ?>><a style="color:rosybrown;" href="?action=gsp">GSP</a></li>

                                        <li <?= $excourier; ?>><a href="?action=excourier">Courier</a></li>
                                        <!--<hr>-->
<!--                                        <li>
                                            <a href="#" class="has-ul"><i class="fa fa-book"></i>Register</a>
                                            <ul class="hidden-ul" style="display: none;">
                                                <li <?= $exinvoicereg; ?>><a href="?action=exinvoicereg">Inward Export Register</a></li>
                                                <li <?= $exgsp; ?>><a href="?action=exgsp">GSP Register</a></li>
                                                <li <?= $excourreg; ?>><a href="?action=excourreg">Courier Register</a></li>
                                            </ul>
                                        </li>-->
                                    </ul>
                                </li>
                                <li <?= $mi; ?> id="4">
                                    <a href="#"><i class="fa fa-building"></i><span>Manufacturing Inventory</span></a>
                                    <ul class="nav-sub">
                                        <li <?= $mi_master; ?>>
                                            <a href="#" class="has-ul"><i class="fa fa-graduation-cap"></i>Master</a>

                                            <ul class="hidden-ul" style="display: none;">
                                                <li <?= $item; ?>><a href="?action=item">Raw Material</a></li>
                                                <li <?= $packing; ?>><a href="?action=packing">Packing Material</a></li>
                                                <li <?= $openstock_item; ?>><a href="?action=openstock_item">Opening Stock Raw.</a></li>
                                                <li <?= $openpack; ?>><a href="?action=openpack">Opening Stock Packing</a></li>
                                                <li <?= $finprod; ?>><a href="?action=finprod">Finished Product</a></li>
                                                <li <?= $changerate_item; ?>><a href="?action=changerate_item">Change of Rates</a></li>
                                            </ul>
                                        </li>
                                        <hr>

                                        <li <?= $purchord; ?>><a href="?action=purchord">Purchase Order</a></li>
                                        <li class="nav-dropdown">
                                            <a href="#">Purchase</a>
                                            <ul class="nav-sub">
                                                <li <?= $purchaser_mi; ?>><a href="?action=purchaser_mi">Raw Material</a></li>
                                                <li <?= $purchasep_mi; ?>><a href="?action=purchasep_mi">Packing Material</a></li>
                                                <li <?= $purchasep_mi; ?>><a href="?action=inward_mi">Inward</a></li>
                                                <li <?= $purcoth_mi ?>><a href="?action=purcoth_mi">Other</a></li>
                                            </ul>
                                        </li>

                                        <li class="nav-dropdown">
                                            <a href="#">Purchase Return</a>
                                            <ul class="nav-sub">
                                                <li <?= $debnoter_mi; ?>><a href="?action=debnoter_mi">Raw Material</a></li>
                                                <li <?= $debnotep_mi; ?>><a href="?action=debnotep_mi">Packing Material</a></li>
                                            </ul>
                                        </li>
                                        <li <?= $production; ?>><a href="?action=production">Production / BMR.</a></li>
                                        <hr>
                                        <li <?= $damrawmat; ?>><a href="?action=damrawmat">Damage Raw Material</a></li>
                                        <li <?= $midelv; ?>><a href="?action=midelv">Delivery / Dispatch</a></li>
                                        <hr>
                                        <li>
                                            <a href="#" class="has-ul"><i class="fa fa-book"></i>Register</a>
                                            <ul class="hidden-ul" style="display: none;">
                                                <li <?= $purordreg; ?>><a href="?action=purordreg">Purchase Order</a></li>
                                                <li <?= $purrawreg; ?>><a href="?action=purrawreg">Purchase</a></li>
                                                <li <?= $mirawmat; ?>><a href="?action=mirawmat">Raw Material O/S</a></li>
                                                <li <?= $purretreg; ?>><a href="?action=purretreg">Purchase Return / Debit Note</a></li>
                                                <li <?= $prodreg; ?>><a href="?action=prodreg">Production Register</a></li>
                                                <li <?= $midamreg; ?>><a href="?action=midamreg">Damage Register</a></li>
                                                <li <?= $midelvreg; ?>><a href="?action=midelvreg">Delivery Register</a></li>
                                            </ul>
                                        </li>
                                    </ul>
                                </li>
                                <li <?= $accounts; ?> id="5">
                                    <a href="#"><i class="fa fa-money"></i> <span>Accounts</span></a>
                                    <ul class="nav-sub">
                                        <li >
                                            <a href="#" class="has-ul"><i class="fa fa-graduation-cap"></i>Master</a>
                                            <ul class="hidden-ul" style="display: none;">
                                                <li <?= $group; ?>><a href="?action=group">Group</a></li>
                                                <li <?= $other; ?>><a href="?action=other">Other A/C </a></li>
                                                <li <?= $bank; ?>><a href="?action=bank">Bank </a></li>
                                                <li <?= $cash; ?>><a href="?action=cash">Cash </a></li>
                                                <li <?= $expense; ?>><a href="?action=expense">Expense </a></li>
                                                <li <?= $drawbank; ?>><a href="?action=drawbank">Drawee Bank</a></li>

                                            </ul>
                                        </li>
                                        <hr>
                                        <li <?= $mbank; ?> class="nav-dropdown">
                                            <a href="#">Bank</a>
                                            <ul class="nav-sub">
                                                <li <?= $bankrecp; ?>><a href="?action=bankrecp">Receipt</a></li>
                                                <li <?= $bankpay; ?>><a href="?action=bankpay">Payment</a></li>
                                            </ul>
                                        </li>
                                        <li <?= $mcash; ?> class="nav-dropdown">
                                            <a href="#">Cash</a>
                                            <ul class="nav-sub">
                                                <li <?= $cashrecp; ?>><a href="?action=cashrecp">Receipt</a></li>
                                                <li <?= $cashpay; ?>><a href="?action=cashpay">Payment</a></li>
                                            </ul>
                                        </li>
                                        <li <?= $journal; ?>><a href="?action=bankrecon">Bank Reconcillation</a></li>
                                        <li <?= $journal; ?>><a href="?action=journal">JV</a></li>
                                        <li <?= $contraent; ?>><a href="?action=contra">Contra</a></li>
                                        <li <?= $bankbook; ?>><a href="?action=bankbook">Bank Book</a></li>
                                        <li <?= $cashbook; ?>><a href="?action=cashbook">Cash Book</a></li>
                                        <li <?= $jvbook; ?>><a href="?action=jvbook">JV Book</a></li>
                                        <li <?= $contreg; ?>><a href="?action=contreg">Contra Register</a></li>
                                        <hr>
                                        <li <?= $bankrecorep; ?>><a href="?action=bankrecorep">Bank Reconcillation Report</a></li>
                                        <li <?= $outstanding ; ?> class="nav-dropdown">
                                            <a href="#">Outstanding</a>
                                            <ul class="nav-sub">
                                                <li <?= $receivablerep ?> ><a href="?action=receivablerep">Receivable</a></li>
                                                <li <?= $payablerep ?> ><a href="?action=payablerep">Payable</a></li>
                                            </ul>
                                        </li>

                                    </ul>
                                </li>
                                <li <?= $mis ?> id="6">
                                    <a href="#"><i class="fa fa-file"></i><span>MIS Reports</span></a>
                                    <ul class="nav-sub">
                                        <li <?= $ledger; ?>><a href="?action=ledger">Ledger</a></li>
                                        <li <?= $purchsumm; ?>><a href="?action=purchsumm">Purchase Summary</a></li>
                                        <li <?= $salesum; ?>><a href="?action=salesumm">Sale Summary</a></li>
                                        <li <?= $dailysalsumm; ?>><a href="?action=dailysalsumm">Daily Sale Summary</a></li>
                                        <li <?= $tiitemwise ;?>><a href="?action=tiitemwise">Product Sale</a></li>
                                        <li <?= $tiitemgrpwise ?>><a href="?action=tiitemgrpwise">Product Groupwise</a></li>
                                        <li <?= $tipitemreg ?>><a href="?action=tipitemreg">Party + Productwise</a></li>
                                        <li <?= $tiipartyreg ?>><a href="?action=tiipartyreg">Sale Productwise & Partywise </a></li>
                                        <li <?= $tisalitemwise ?>><a href="?action=tisalitemwise">Sale Value Productwise</a></li>
                                        <!--<li <?= $itemsalereg; ?>><a href="?action=itemsalereg">Itemwise Sale</a></li>-->
                                        <li <?= $prodhist ?>><a href="?action=prodhist">Product Inward / Outward History</a></li>
                                        <!--<li <?= $partywisesale; ?>><a href="?action=tipitemreg">Partywise Sale</a></li>-->
                                        <li <?= $stkprod; ?>><a href="?action=stkprod">Product Stock</a></li>
                                        <li <?= $stkrawmat; ?>><a href="?action=stkrawmat">Raw Material Stock</a></li>
                                        <li <?= $stkpack; ?>><a href="?action=stkpack">Packing Stock</a></li>
                                        <li <?= $tdsrep; ?>><a href="?action=tdsrep">TDS</a></li>
                                        <li <? ?> class="nav-dropdown">
                                            <a href="#">Query<i></i></a>
                                            <ul class="nav-sub">
                                                <li <?= $chqrep ?> ><a href="?action=chqrep">Cheque No.</a></li>
                                                <li <?= $amtrep ?> ><a href="?action=amtrep">Amount</a></li>
                                            </ul>
                                        </li>
                                                    <!--<li <?= $stkfingood; ?>><a href="?action=stkfingood">Stock (Finished Goods)</a></li>-->
                                    </ul>
                                </li>
                                <li <?= $gst ?> id="7">
                                    <a href="#" class="has-ul"><i class="fa fa-line-chart"></i> <span>GST Returns</span></a>
                                    <ul class="hidden-ul" style="display: none;">
                                        <li>
                                            <a href="#" class="has-ul">GSTR - 1(Sales)</a>
                                            <ul class="hidden-ul" style="display: none;">
                                                <li <?= $gstr1_1; ?>><a href="?action=gstr1_b2b">B2B</a></li>
                                                <li <?= $gstr1_2; ?>><a href="?action=gstr1_b2bl">B2C Large (Unregistered)</a></li>
                                                <li <?= $gstr1_3; ?>><a href="?action=gstr1_b2cs">B2C Small (Unregistered)</a></li>
                                                <li <?= $gstr1_4; ?>><a href="?action=gstr1_cdnr">Credit / Debit Note</a></li>
                                                <li <?= $gstr1_5; ?>><a href="?action=gstr1_cdnur">Credit / Debit Note for URD</a></li>
                                                <li <?= $gstr1_6; ?>><a href="?action=gstr1_exp">Export</a></li>
                                                <li <?= $gstr1_9; ?>><a href="?action=gstr1_exemp">Nil / Exempted / Non GST</a></li>
                                                <li <?= $gstr1_10; ?>><a href="?action=gstr1_hsn">HSN Summary</a></li>
                                                <li <?= $gstr1_11; ?>><a href="?action=gstr1_docs">Document Summary</a></li>
                                            </ul>
                                        </li>
                                        <hr>
                                        <li>
                                            <a href="#" class="has-ul">GSTR - 2(Purchase)</a>
                                            <ul class="hidden-ul" style="display: none;">
                                                <li <?= $gstr2_b2b; ?>><a href="?action=gstr2_b2b">B2B</a></li>
                                                <li <?= $gstr2_b2bur; ?>><a href="?action=gstr2_b2bur">B2B Unregistered </a></li>
                                                <li <?= $gstr2_cdnr; ?>><a href="?action=gstr2_cdnr">Credit/Debit Note</a></li>
                                                <li <?= $gstr2_cdnur; ?>><a href="?action=gstr2_cdnur">Credit/Debit Note Unregistered</a></li>
                                                <li <?= $gstr2_hsn; ?>><a href="?action=gstr2_hsn">HSN Summary</a></li>
                                            </ul>
                                        </li>
                                        <hr>
                                        <li <? ?>><a href="?action=gstr3B">GSTR - B</a></li>
                                        <li <? ?>><a href="?action=inougst">Input / Output GST</a></li>
                                        <li <? ?>><a href="?action=jvgst">JV - GST</a></li>
                                    </ul>
                                </li>
                                <li <?= $finalization; ?> class="nav-dropdown" id="8">
                                    <a href='#' class="has-ul"><i class="icon-tree5"></i><span>Finalization</span></a>
                                    <ul class='nav-sub'>
                                        <li <?= $trbal; ?>><a href="?action=trbal">Trial Balance</a></li>
                                        <li <?= $profit; ?>><a href="?action=profit">Profit / Loss</a></li>
                                        <li <?= $profshar; ?>><a href="?action=profshar">Profit Sharing</a></li>
                                        <li <?= $balsheet; ?>><a href="?action=balsheet">Balance Sheet</a></li>
                                    </ul>
                                </li>
                                <!-- /main -->
                            </ul>
                        </div>
                    </div>
                    <!-- /main navigation -->
                </div>
            </div>
            <!-- /main sidebar -->
            <!-- Main content -->
            <div class="content-wrapper">
                <iframe src="<?php echo $src; ?>" name="frame1" class="frame1" style="width: 100%; height:5000px;" frameBorder="0" scrolling="no"></iframe>
            </div>
            <!-- /main content -->
        </div>
        <!-- /page content -->
    </div>
    <!-- /page container -->
</body>
<script>
    $(document).ready(function () {

        $("#1").children("a").removeClass();
        $("#1").children("a").addClass("active");
    });
</script>

</html>