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


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

if ($usertype != 1){
include("includes/menu_rights.php");
}

switch ($action) {
    ####################### PROFILES ##########################

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

    ####################### MASTERS ##########################

    case "customer";
//        if ($guser['customer'] == '') {
//            $src = "";
//        } else {
            $src = "customer.php?mode=last";
//        }
        break;
    case "cacacust";
//        if ($guser['customer'] == '') {
//            $src = "";
//        } else {
            $src = "cacacust.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";
        $src = "drawbank.php?mode=last";
        break;

    case "godown";

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

        break;
    case "credcard";

        $src = "credcard.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 "priceloc";
        if ($guser['priceloc'] == '') {
            $src = "";
        } else {
            $src = "pricelocal.php?mode=last";
        }
        break;

    case "feloc";
        if ($guser['feloc'] == '') {
            $src = "";
        } else {
            $src = "feloc.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 "mgroup";
//        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 "pump";
            $src = "pump.php?mode=last";
        break;

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

    case "shift";

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

        break;
    
    case "tank";

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

        break;
    
    case "dipconv";

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

        break;
    
    case "department";

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

        break;


    case "vehiclemod";

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

        break;

    case "sale";

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

        break;
    
    case "salecash";

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

        break;
    
    case "cardsale";

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

        break;
    
    case "cashandcarry";

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

        break;
    
    case "slipent";

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

        break;
    
    case "pumpreading";

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

        break;
    
    case "stockreading";

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

        break;
    
    case "stocktrans";

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

        break;
    
    case "dipread";

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

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

        break;
    
    case "purchoil";

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

        break;
    
    case "debnote";

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

        break;

    case "deboth";

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

        break;
    
    case "damage";

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

        break;
    
    case "inttrf";

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

        break;
    
    case "bankrecp";

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

        break;
    
    case "bankpay";

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

        break;
    
    case "cashrecp";

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

        break;
    
    case "cashpay";

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

        break;
    
    case "cardrecp";

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

        break;
    
    case "contra";

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

        break;
    
    case "discgv";

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

        break;
    
    case "discrecv";

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

        break;
    
    case "jv";

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

        break;
    
    case "bankrecon";

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

        break;
    
    case "rementry";

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

        break;
  
        case "remdalert";

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

        break;
    
    case "stock";

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

        break;
    
    case "inwout";

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

        break;
    
    case "invoicefs";

        $src = "invoice.php?para=S";

        break;
    
    case "invoicefm";

        $src = "invoice.php?para=M";

        break;
    
    case "slipqry";

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

        break;
    
    case "vehqry";

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

        break;
    
    case "ledger";

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

        break;
    
    case "shiftrep";

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

        break;
    
    case "daychart";

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

        break;
    
    case "rmrep";

        $src = "rmrep.php";

        break;
    
    case "rmrep_d";

        $src = "rmrep.php?para=D";

        break;
    
    case "prodsale";

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

        break;
    
    case "prodgrpsale";

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

        break;
    
    case "creditac";

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

        break;
    
    case "ministk";

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

        break;
    
    case "vatmon";

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

        break;
    
    case "vatmon_s";

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

        break;
    
    case "gstr1_2";

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

        break;
    
//    <-- SUMMARIES -->
    
    
    case "acmnsumm";

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

        break;
    
    case "credsumm";

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

        break;
    
    case "banksumm";

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

        break;
    
    case "cashsumm";

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

        break;
    
    case "salesumm";

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

        break;
    
    case "invsumm";

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

        break;
    
    case "pursumm";

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

        break;
    
    case "prodsumm";

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

        break;
    
    case "pgrpsumm_p";

        $src = "pgrpsumm.php?mode=last&mpara=P";

        break;
    
    case "pgrpsumm_s";

        $src = "pgrpsumm.php?mode=last&mpara=S";

        break;
    
    case "mon_prsl";

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

        break;   
    
    case "bankbook";

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

        break;
    
    case "cashbook";

        $src = "bankbook.php?para=C";

        break;
    
    case "payslip";

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

        break;
    
    case "chqqryno";

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

        break;
    
    case "chqqry";

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

        break;
    
    case "expreg";

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

        break;
    
    case "replremd";

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

        break;
    
    case "recorep";

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

        break;
    
    case "dayrep";

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

        break;
    
    case "recmulti";

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

        break;
    
    case "accstmt";

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

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

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

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

        break;
    
    case "tcsreg";

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

        break;
    
    case "tdsregsl";

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

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

    
    case "slipreg";

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

        break;
    
    case "salereg";

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

        break;
    
    case "invreg";

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

        break;
    
    case "cacareg";

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

        break;
    
    case "preadreg";

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

        break;
    
    case "sreadreg";

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

        break;
    
    case "dreadreg";

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

        break;
    
    case "acccred";

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

        break;
    
    case "damreg";

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

        break;
    
    case "prgstreg";

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

        break;

    case "debnotereg";

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

        break;

    case "debothreg";

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

        break;
    
    case "purreg";

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

        break;
    
    case "debreg";

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

        break;
    
    case "pendledr";

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

        break;
    
    case "stktrnrg";

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

        break;
    
    case "depinou";

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

        break;
    

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

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

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

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

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

    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 "onlsale";
        if ($guser['onlsale'] == '') {
            $src = "";
        } else {
            $src = "sale_onl.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_exp";
        //        if ($guser[purchaser_mi] == '') {
        //            $src = "";
        //        } else {
        $src = "purchase_exp.php?mode=last&type=R";
        //        }
        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 "debnotex_mi";
        if ($guser['debnotex_mi'] == '') {
            $src = "";
        } else {
            $src = "debnote_mi.php?mode=last&type=E";
        }
        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 "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 "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 "multibankpay";
        if ($guser['bankpay'] == '') {
            $src = "";
        } else {
            $src = "bankmultipay.php?mode=last";
        }
        break;

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

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

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

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

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

    case "receivablerep";
//        if ($guser['payablerep'] == '') {
//            $src = "";
//        } else {
        $src = "payablerep.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 "ageingamt";
        $src = "ageingamt.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 "profreg";
        if ($guser['profreg'] == '') {
            $src = "";
        } else {
            $src = "profreg.php";
        }
        break;

    case "tiitemwise";
        if ($guser['tiitemwise'] == '') {
            $src = "";
        } else {
//            $src = "itemwisereg.php";
            $src = "prodwisesale.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 "lrreg";
//        if ($guser['lrreg'] == '') {
//            $src = "";
//        } else {
        $src = "lrreg.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 "purexpreg";
//        if ($guser['purchexp'] == '') {
//            $src = "";
//        } else {
        $src = "purexpreg.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 "closstk";
        //        if ($guser[fntrialbal] == '') {
        //            $src = "";
        //        } else {
        $src = "closstk.php?mode=last";
        //        }
        break;

    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 "gstr1x9";
        $src = "gstr1x9.php";
        break;

    case "gstr1_hsndtl";
        $src = "hsndtl.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 "gst3b";
        $src = "gstr3b.php";
        break;

    case "gst3bpre";
        $src = "gstr3b_pre.php";
        break;

    ####################### TOOLS ##########################

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

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

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

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

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

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

    case "unmarkrecp";
        $src = "unmark.php?para=R";
        break;

    case "unmarkpay";
        $src = "unmark.php?para=P";
        break;

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


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

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

$rpoutstanding = "";
if ($guser['outsrecevrp'] != "1" && $guser['outspayrp'] != "1") {
    $rpoutstanding = "style='display: none'";
}



include("includes/linkshead.php");
?>
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
    <title><</title>
    <meta name="description" content="Blueprint: Horizontal Slide Out Menu" />
    <meta name="keywords" content="horizontal, slide out, menu, navigation, responsive, javascript, images, grid" />
    <meta name="author" content="Codrops" />
    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" type="text/css" href="menu/css/default.css" />
    <link rel="stylesheet" type="text/css" href="menu/css/component.css" />
    <script src="menu/js/modernizr.custom.js"></script>
<!--    <style>
        .cbp-hssubmenu > li:hover{
            color: red
        }
    </style>-->
</head>

<body>
    <!--<div class="container-scroller">-->
    <!-- partial:partials/_horizontal-navbar.html -->
    <div class="main">
        <nav class="cbp-hsmenu-wrapper" id="cbp-hsmenu-wrapper">
            <div class="cbp-hsinner">
                <ul class="cbp-hsmenu" style="margin-left: 0px;max-width: 250em;width:100%">
                    <li class="text-left"><b><u><a href="menu.php" style="color:#4eb3c7; font-size:20px "><?= $project_title; ?></a></u></b></li>
                    <!--<li <?= $generate; ?> ><a href="menu.php?action=generate"><button type="button" class="btn" style="padding-top: 6px;font-size: 15px;color: orange;border: 1px solid #129edc;background: white;font-weight: 600;" >GENERTAE</button></a></li>-->

<!--<li class="text-left"><b><u><a href="year.php" style="color:black; font-size:10px "><?= $dispyear ?></a></u></b></li>-->
                    <li <?= $master; ?>>
                        <a href="#">Master</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $customer; ?>><a href="?action=customer">Customer - Normal</a></li>
                            <li <?= $cacacust; ?>><a href="?action=cacacust">Customer - Cash & Carry</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 Rates</a></li>
                            <li <?= $unit; ?>><a href="?action=unit">Unit</a></li>
                            <!--<hr>-->

                            <!--<hr>-->
                            <li <?= $pump; ?>><a href="?action=pump">Pump</a></li>
                            <li <?= $stockoil; ?>><a href="?action=stockoil">Stock/Oil</a></li>
                            <li <?= $credcard; ?>><a href="?action=credcard">Credit Card</a></li>
                            <li <?= $tank; ?>><a href="?action=tank">Tank</a></li>

                            <li <?= $dipconv; ?>><a href="?action=dipconv">Dip Conversion</a></li>
                            <li <?= $openbal; ?>><a href="?action=openbal">Opening Balance</a></li>
                            <li <?= $supplier; ?>><a href="?action=supplier">Supplier</a></li>
                            <li <?= $shift; ?>><a href="?action=shift">Shift</a></li>
                            <li <?= $department; ?>><a href="?action=department">Department</a></li>
                            <li <?= $staff; ?>><a href="?action=staff">Staff</a></li>
<!--                            <li <?= $job; ?>><a href="?action=job">Job</a></li>
                            <li <?= $servtype; ?>><a href="?action=servtype">Service Type</a></li>-->
                            <li <?= $vehiclemod; ?>><a href="?action=vehiclemod">Vehicle Model</a></li>
                            <hr>
                            <li <?= $mgroup; ?>><a href="?action=mgroup">Group</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 <?= $other; ?>><a href="?action=other">Other A/c. </a></li>
                            <li <?= $gsttype ?>><a href="?action=gsttype">GST Type</a></li>
                            <!--<hr>-->
                            <li <?= $drawbank; ?>><a href="?action=drawbank">Drawee Bank</a></li>
                            <li <?= $narration; ?>><a href="?action=narration">Narration</a></li>
                        </ul>
                    </li>
                    <li <?= $transactions; ?>>
                        <a href="#">Transactions</a>
                        <ul class="cbp-hssubmenu cbp-hssub-rows">
                            <li <?= $sale; ?>><a href="?action=sale">Sale - Credit Sale</a></li>
                            <li <?= $salecash; ?>><a href="?action=salecash">Sale - Cash Sale</a></li>
                            <li <?= $cardsale; ?>><a href="?action=cardsale">Card Sale</a></li>
                            <li <?= $cashandcarry; ?>><a href="?action=cashandcarry">Cash and Carry</a></li>
                            <li <?= $pumpreading; ?>><a href="?action=pumpreading">Pump Reading</a></li>
                            <li <?= $stockreading; ?>><a href="?action=stockreading">Stock Reading</a></li>
                            <!--<hr>-->
                            <li <?= $dipread; ?>><a href="?action=dipread">Dip Reading</a></li>
                            <li <?= $purfuel; ?>><a href="?action=purfuel">Purchase - Fuel</a></li>
                            <li <?= $purchoil; ?>><a href="?action=purchoil">Purchase - Oil</a></li>
                            <li <?= $debnote; ?>><a href="?action=debnote">Debit Note - Goods Return</a></li>
                            <li <?= $deboth; ?>><a href="?action=deboth">Debit Note - Others</a></li>
                            <li <?= $damage; ?>><a href="?action=damage">Damaged</a></li>
                            <!--<hr>-->
                            <hr>
                            <li <?= $bankrecp; ?>><a href="?action=bankrecp">Bank - Receipt</a></li>
                            <li <?= $bankpay; ?>><a href="?action=bankpay">Bank - Payment</a></li>
                            <li <?= $cashrecp; ?>><a href="?action=cashrecp">Cash - Receipt</a></li>
                            <li <?= $cashpay; ?>><a href="?action=cashpay">Cash - Payment</a></li>
                            <li <?= $cardrecp; ?>><a href="?action=cardrecp">Fleet Card Receipt</a></li>
                            <!--<hr>-->
                            <li <?= $contra; ?>><a href="?action=contra">Contra / Transfer</a></li>
                            <li <?= $discrecv; ?>><a href="?action=discrecv">Discount - Received</a></li>
                            <li <?= $jv; ?>><a href="?action=jv">JV</a></li>
                            <li <?= $bankrecon; ?>><a href="?action=bankrecon">Bank Reconciliation</a></li>
                            <li <?= $rementry; ?>><a href="?action=rementry">Reminder Entry</a></li>
                            <li <?= $slipent; ?>><a href="?action=slipent">Slip Entry</a></li>
                            <!--<hr>-->
                        </ul>
                    </li>
                    <li <?= $reports; ?>>
                        <a href="#">Reports</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $stock; ?>><a href="?action=stock">Current Stock</a></li>
                            <li <?= $inwout; ?>><a href="?action=inwout">Inward / Outward</a></li>
                            <li <?= $invoicefs; ?>><a href="?action=invoicefs">Invoice - Single</a></li>
                            <li <?= $invoicefm; ?>><a href="?action=invoicefm">Invoice - Multiple</a></li>
                            <li <?= $slipqry; ?>><a href="?action=slipqry">Slip no. Query</a></li>
                            <li <?= $vehqry; ?>><a href="?action=vehqry">Vehicle Query</a></li>
                            <!--<hr>-->
                            <li <?= $ledger; ?>><a href="?action=ledger">Ledger</a></li>
                            <li <?= $bankbook; ?>><a href="?action=bankbook">Bank Book</a></li>
                            <li <?= $cashbook; ?>><a href="?action=cashbook">Cash Book</a></li>
                            <li <?= $payslip; ?>><a href="?action=payslip">Pay Slip</a></li>
                            <li <?= $chqqryno; ?>><a href="?action=chqqryno">Cheque Query - No</a></li>
                            <li <?= $chqqry; ?>><a href="?action=chqqry">Cheque Query - Amount</a></li>
                            <!--<hr>-->
                            <li <?= $accstmt; ?>><a href="?action=accstmt">Invoicewise Ledger</a></li>
                            <!-- <li <?= $expreg; ?>><a href="?action=expreg">Expense</a></li> -->
                            <!-- <li <?= $replremd; ?>><a href="?action=replremd">Reminder</a></li> -->
                            <li <?= $recorep; ?>><a href="?action=recorep">Bank Reconciliation</a></li>
                            <li <?= $dayrep; ?>><a href="?action=dayrep">Daily Report</a></li>
                            <li <?= $recmulti; ?>><a href="?action=recmulti">Receipt Print</a></li>
                            <!--<hr>-->
                            <li <?= $salediff; ?>><a href="?action=salediff">Sale Difference</a></li>
                            <li <?= $receivablerep; ?>><a href="?action=receivablerep">Outstanding - Receivable</a></li>
                            <li <?= $payablerep; ?>><a href="?action=payablerep">Outstanding - Payable</a></li>
                            <li <?= $tcsreg; ?>><a href="?action=tcsreg">TCS Report</a></li>
                            <!--<hr>-->
                            <li <?= $tdsregsl; ?>><a href="?action=tdsregsl">TDS - Receivable</a></li>
                            <li <?= $tdsregpu; ?>><a href="?action=tdsregpu">TDS - Payable</a></li>
                            <li <?= $envlop; ?>><a href="?action=envlop">Envelope Print</a></li>
                        </ul>
                    </li>
                    <li <?= $registers; ?>>
                        <a href="#">Registers</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $slipreg; ?>><a href="?action=slipreg">Slip</a></li>
                            <li <?= $salereg; ?>><a href="?action=salereg">Sale</a></li>
                            <li <?= $invreg; ?>><a href="?action=invreg">Invoice</a></li>
                            <li <?= $dreadreg; ?>><a href="?action=dreadreg">Dip Reading</a></li>
                            <li <?= $preadreg; ?>><a href="?action=preadreg">Pump Reading</a></li>
                            <li <?= $sreadreg; ?>><a href="?action=sreadreg">Stock Reading</a></li>
                            <!--<hr>-->
                            <li <?= $cacareg; ?>><a href="?action=cacareg">Cash & Carry</a></li>
                            <li <?= $acccred; ?>><a href="?action=acccred">Accountwise Credit</a></li>
                            <li <?= $damreg; ?>><a href="?action=damreg">Damaged</a></li>
                            <li <?= $purreg; ?>><a href="?action=purreg">Purchase - Fuel</a></li>
                            <li <?= $prgstreg; ?>><a href="?action=prgstreg">Purchase - Oil</a></li>
                            <!--<hr>-->
                            <li <?= $debnotereg; ?>><a href="?action=debnotereg">Debit Note - Goods Return</a></li>
                            <li <?= $debothreg; ?>><a href="?action=debothreg">Debit Note - Other</a></li>
                            <li <?= $pendledr; ?>><a href="?action=pendledr">Pending Invoice Amount</a></li>
                            <li <?= $stktrnrg; ?>><a href="?action=stktrnrg">Stock Transfer</a></li>
                            <li <?= $depinou; ?>><a href="?action=depinou">Dept.Inward Outward</a></li>
                        </ul>
                    </li>
                    <li <?= $summaries; ?>>
                        <a href="#">Summaries</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $acmnsumm; ?>><a href="?action=acmnsumm">Account Monthly</a></li>
                            <li <?= $credsumm; ?>><a href="?action=credsumm">Credit Sale</a></li>
                            <li <?= $salesumm; ?>><a href="?action=salesumm">Sale</a></li>
                            <li <?= $invsumm; ?>><a href="?action=invsumm">Invoice</a></li>
                            <li <?= $banksumm; ?>><a href="?action=banksumm">Bank</a></li>
                            <li <?= $cashsumm; ?>><a href="?action=cashsumm">Cash</a></li>
                            <!--<hr>-->
                            <li <?= $pursumm; ?>><a href="?action=pursumm">Purchase</a></li>
                            <li <?= $prodsumm; ?>><a href="?action=prodsumm">Product</a></li>
                            <li <?= $pgrpsumm_p; ?>><a href="?action=pgrpsumm_p">Product Group - Purchase</a></li>
                            <li <?= $pgrpsumm_s; ?>><a href="?action=pgrpsumm_s">Product Group - Sale</a></li>
                            <li <?= $mon_prsl; ?>><a href="?action=mon_prsl">Monthwise Purhcase & Sale</a></li>
                        </ul>
                    </li>
                    <li <?= $gst; ?>>
                        <a href="#">GST</a>
                        <ul class="cbp-hssubmenu">
<!--                            <li <?= $group; ?>><a href="?action=group">Sale - b2b</a></li>
                            <li <?= $other; ?>><a href="?action=other">Sale - b2c</a></li>
                            <li <?= $bank; ?>><a href="?action=bank">Sale - b2cs</a></li>
                            <li <?= $gstr1_1; ?>><a href="#" style="font-size: 25px;">-->
                            <!--<br>-->  
                            <li <?= $gstr1_1; ?>><a href="#" style="font-size: 25px;">                            
                                    <mark>&nbsp;&nbsp;Sales&nbsp;&nbsp;</mark></a></li>
                            <br>
                            <li <?= $gstr1_b2b; ?>><a href="?action=gstr1_b2b">B2B</a></li>
                            <li <?= $gstr1_b2bl; ?>><a href="?action=gstr1_b2bl">B2C Large (Unregistered)</a></li>
                            <li <?= $gstr1_b2cs; ?>><a href="?action=gstr1_b2cs">B2C Small (Unregistered)</a></li>
<!--                            <li <?= $gstr1_4; ?>><a href="?action=gstr1_cdnr">Credit 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>
                            <li <?= $gstr1_1; ?>><a href="?action=gstr1x9">GST R X 9</a></li>
                            <li <?= $gstr1_12; ?>><a href="?action=gstr1_hsndtl">HSN Detail</a></li>
                            <hr>
                            <li <?= $gstr1_1; ?>><a href="#" style="font-size: 25px;">
                                    <mark>&nbsp;&nbsp;Purchase&nbsp;&nbsp;</mark></a></li><br>

                            <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>
                    <li <?= $mis; ?>>
                        <a href="#">MIS</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $shiftrep; ?>><a href="?action=shiftrep">Shift Chart</a></li>
                            <li <?= $daychart; ?>><a href="?action=daychart">Daily Chart</a></li>
                            <li <?= $rmrep; ?>><a href="?action=rmrep">RM / Daily Cash - Summary</a></li>
                            <li <?= $rmrep_d; ?>><a href="?action=rmrep_d">RM / Daily Cash - Detail</a></li>
                            <li <?= $prodsale; ?>><a href="?action=prodsale">Productwise Sale </a></li>
                            <li <?= $grpsale; ?>><a href="?action=prodgrpsale">Product Groupwise Sale</a></li>
                            <hr>
                            <li <?= $creditac; ?>><a href="?action=creditac">Over Credit A/c.</a></li>
                            <!--<li <?= $ministk; ?>><a href="?action=ministk">Minimum Stock</a></li>-->
<!--                            <li <?= $vatmon; ?> ><a href="?action=vatmon">Monthwise Vat Report - Purchase</a></li>
                            <li <?= $vatmon_s; ?> ><a href="?action=vatmon_s">Monthwise Vat Report - Sale</a></li>-->
                            <!--<li <?= $gstr1_2; ?> ><a href="?action=gstr1_2">Purchase GST - Excel</a></li>-->
                        </ul>
                    </li>
<!--                   <li <?= $gst; ?>>
                        <a href="#">GST Reports</a>
                        <ul class="cbp-hssubmenu">


                            <li <?= $gstr1_1; ?>><a href="#" style="font-size: 25px;">
                                    <mark>&nbsp;&nbsp;Sales&nbsp;&nbsp;</mark></a></li>
                            <br>
                            <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 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>
                            <li <?= $gstr1_1; ?>><a href="?action=gstr1x9">GST R X 9</a></li>
                            <li <?= $gstr1_12; ?>><a href="?action=gstr1_hsndtl">HSN Detail</a></li>
                            <hr>
                            <li <?= $gstr1_1; ?>><a href="#" style="font-size: 25px;">
                                    <mark>&nbsp;&nbsp;Purchase&nbsp;&nbsp;</mark></a></li><br>

                            <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>
                            <hr>
                            <li <?= $gstr1_1; ?>><a href="#" style="font-size: 25px;">
                                    <mark>&nbsp;&nbsp;Summary&nbsp;&nbsp;</mark></a></li><br>
                            <li <?= $gstr3b; ?>><a href="?action=gstr3b">GSTR - B</a></li>
                            <li <?= $inougst ?>><a href="?action=inougst">Input / Output GST</a></li>
                            <li <?= $jvgst ?>><a href="?action=jvgst">JV - GST</a></li>
                            <li <?= $gst3bpre ?>><a href="?action=gst3bpre">Pre-GST3B</a></li>
                        </ul>
                    </li>-->
                    <li <?= $finalization; ?>>
                        <a href="#">Finalization</a>
                        <ul class="cbp-hssubmenu">
                            <li <?= $closstk; ?>><a href="?action=closstk">Closing Stock</a></li>
                            <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>
                    <?php
                     $zdb = $_SESSION["zdbyear_" . $dbname];
                     $srchresult = mysqli_query($conn, "SELECT * , date_format(`vouchdt`, '%d/%m/%Y') as mydt, date_format(`remdate`, '%d/%m/%Y') as alertdate
                     FROM $zdb.remind WHERE compldt >= 1 ") or die(mysqli_error($conn));
                     if (!empty($srchresult)) {
                        $remno = mysqli_num_rows($srchresult);
                    } else {
                        $remno = 0;
                    }
                    ?>
                    <li <?= $remdalert; ?> class="dropdown settings"><a href="?action=remdalert"><label class="label-control" style="font-size: 18px;color: blue;"> Reminders : <?php echo $remno; ?></label></a></li>
                    <li class="dropdown settings" style="float: right">
                        <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 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 <? $compyear; ?>><a href="?action=compyear"><i class="fa fa-calendar-o"></i> Year Setup</a></li>
                            <!-- <li <? $generate; ?>><a href="?action=generate"><i class="fa fa-hand-o-right"></i> Generate Bills</a></li> -->
                            <li <? $tlprofile; ?>><a href="?action=profile"><i class="fa fa-user"></i> Profile</a></li>
                            <?php if ($guser['usertype'] == 1) { ?>
                                <li <? // $tlgraph;      ?>><a href="?action=graph"><i class="fa fa-bar-chart"></i> Graph</a></li>
                                <li <? // $tlgraph;      ?>><a href="?action=salelock"><i class="fa fa-lock"></i>Sale Lock</a></li>
                            <?php } ?>  
                            <li <? $tlbackup; ?>><a href="?action=backup"><i class="fa fa-cloud-download"></i> Backup</a></li>
                            <?php
                            if ($myear == "1001") {
                                echo "<li $tlbackup><a href='?action=upload_backup'><i class='fa fa-cloud-download'></i> Upload Backup</a></li>";
                            }
                            ?>
                            <li><a href="logout.php"><i class="fa fa-power-off"></i> Logout</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </nav>
    </div>
    <div class="">
        <iframe src="<?php echo $src; ?>" name="frame1" class="frame1" style="width: 100%; height:5000px;" frameBorder="0" scrolling="no"></iframe>
    </div>
    <script src="menu/js/cbpHorizontalSlideOutMenu.min.js"></script>
    <script>
        var menu = new cbpHorizontalSlideOutMenu(document.getElementById('cbp-hsmenu-wrapper'));
    </script>    
</body>


<!-- Mirrored from www.urbanui.com/yoraui/template/demo/horizontal-default-light/index.html by HTTrack Website Copier/3.x [XR&CO'2014], Tue, 02 Jul 2019 11:04:23 GMT -->
</html>