<?php



if (isset($_SESSION["username_" . $dbname])) {

    $user = $_SESSION["username_" . $dbname];



    $getuser = mysqli_query($conn, "SELECT * FROM `passmain` WHERE `user`='$user'") or die(mysqli_error($conn));

    $guser = mysqli_fetch_array($getuser);

    $line = '';



    $none = "style='display:none'";

    

    

###################### TO DO LIST ######################



    if ($guser['todolist'] == '') {

        $todolist = $none;

    }

    if ($guser['todoreg'] == '') {

        $todoreg = $none;

    }

    if ($guser['pendtodo'] == '') {

        $pendtodo = $none;

    }

    

    if (

            $guser['todolist'] == '' && $guser['todoreg'] == '' && $guser['pendtodo'] == ''

    ) {

        $todo = $none;

    }

    ###################### STOCK ######################

    if ($guser['godown'] == '') {

        $godown = $none;

    }

    if ($guser['staff'] == '') {

        $staff = $none;

    }

    if ($guser['location'] == '') {

        $location = $none;

    }

    if ($guser['brand'] == '') {

        $brand = $none;

    }

    if ($guser['itemgrp'] == '') {

        $itemgrp = $none;

    }

    if ($guser['item'] == '') {

        $item = $none;

    }

    if ($guser['inward_mi'] == '') {

        $inward_mi = $none;

    }

    if ($guser['outard_mi'] == '') {

        $outard_mi = $none;

    }

    if ($guser['damrawmat'] == '') {

        $damrawmat = $none;

    }

    if ($guser['stock'] == '') {

        $stock = $none;

    }

    if ($guser['inwoutraw'] == '') {

        $inwoutraw = $none;

    }

    if ($guser['minwreg'] == '') {

        $minwreg = $none;

    }

    if ($guser['mioutreg'] == '') {

        $mioutreg = $none;

    }

    if ($guser['midamreg'] == '') {

        $midamreg = $none;

    }



    if (

            $guser['godown'] == '' && $guser['staff'] == '' && $guser['location'] == '' && $guser['brand'] == '' && $guser['itemgrp'] == '' && $guser['item'] == '' && $guser['inward_mi'] == '' && $guser['outard_mi'] == '' && $guser['damrawmat'] == '' && $guser['stock'] == '' && $guser['inwoutraw'] == '' && $guser['minwreg'] == '' && $guser['mioutreg'] == '' && $guser['midamreg'] == ''

    ) {

        $stockm = $none;

    }



    ###################### MAINTENANCE ######################

    if ($guser['member'] == '') {

        $member = $none;

    }

    if ($guser['openingbal'] == '') {

        $openingbal = $none;

    }

    if ($guser['maintaintype'] == '') {

        $maintaintype = $none;

    }

    if ($guser['bank'] == '') {

        $bank = $none;

    }

    if ($guser['cash'] == '') {

        $cash = $none;

    }

    if ($guser['generatebill'] == '') {

        $generatebill = $none;

    }

    if ($guser['billprint'] == '') {

        $billprint = $none;

    }

    if ($guser['smsos'] == '') {

        $smsos = $none;

    }

    if ($guser['flattransfer'] == '') {

        $flattransfer = $none;

    }

    if ($guser['bankreceipt'] == '') {

        $bankreceipt = $none;

    }

    if ($guser['bankpaymnet'] == '') {

        $bankpaymnet = $none;

    }

    if ($guser['contram'] == '') {

        $contram = $none;

    }

    if ($guser['cashreceipt'] == '') {

        $cashreceipt = $none;

    }

    if ($guser['cashpayment'] == '') {

        $cashpayment = $none;

    }

    if ($guser['creditnote'] == '') {

        $creditnote = $none;

    }

    if ($guser['memberledger'] == '') {

        $memberledger = $none;

    }

    if ($guser['billreport'] == '') {

        $billreport = $none;

    }

    if ($guser['bankbook'] == '') {

        $bankbook = $none;

    }

    if ($guser['cashbook'] == '') {

        $cashbook = $none;

    }

    if ($guser['incomeexp'] == '') {

        $incomeexp = $none;

    }



    if (

            $guser['member'] == '' && $guser['openingbal'] == '' && $guser['maintaintype'] == '' && $guser['bank'] == '' && $guser['cash'] == '' && $guser['generatebill'] == '' && $guser['billprint'] == '' && $guser['smsos'] == '' && $guser['flattransfer'] == '' && $guser['bankreceipt'] == '' && $guser['bankpaymnet'] == '' && $guser['contram'] == '' && $guser['cashreceipt'] == '' && $guser['cashpayment'] == '' && $guser['creditnote'] == '' && $guser['memberledger'] == '' && $guser['billreport'] == '' && $guser['bankbook'] == '' && $guser['cashbook'] == '' && $guser['incomeexp'] == ''

    ) {

        $maintenance = $none;

    }

    ######################RENT######################



    if ($guser['tenant'] == '') {

        $tenant = $none;

    }

    if ($guser['openbalr'] == '') {

        $openbalr = $none;

    }

    if ($guser['manrecpres'] == '') {

        $manrecpres = $none;

    }

    if ($guser['manrecpcom'] == '') {

        $manrecpcom = $none;

    }

    if ($guser['deposit'] == '') {

        $deposit = $none;

    }

    if ($guser['bnkreceiptr'] == '') {

        $bnkreceiptr = $none;

    }

    if ($guser['cshreceiptr'] == '') {

        $cshreceiptr = $none;

    }

    if ($guser['tenledger'] == '') {

        $tenledger = $none;

    }

    if ($guser['recpsumm'] == '') {

        $recpsumm = $none;

    }

    if ($guser['recpreg'] == '') {

        $recpreg = $none;

    }

    if ($guser['recpcomreg'] == '') {

        $recpcomreg = $none;

    }

    if ($guser['deporeg'] == '') {

        $deporeg = $none;

    }

    

    if (

            $guser['tenant'] == '' && $guser['openbalr'] == '' && $guser['manrecpres'] == '' && $guser['manrecpcom'] == '' && $guser['deposit'] == '' && $guser['bnkreceiptr'] == ''&& $guser['cshreceiptr'] == '' && $guser['tenledger'] == '' && $guser['recpsumm'] == '' && $guser['recpreg'] == '' && $guser['recpcomreg'] == '' && $guser['deporeg'] == ''

    ) {

        $rent = $none;

    }



    ################### EXPENSE ###################

    if ($guser['expense'] == '') {

        $expense = $none;

    }

    if ($guser['contra'] == '') {

        $contra = $none;

    }

    if ($guser['cashpay'] == '') {

        $cashpay = $none;

    }

    if ($guser['expreg'] == '') {

        $expreg = $none;

    }

    if ($guser['expledg'] == '') {

        $expledg = $none;

    }

    if ($guser['cashexp'] == '') {

        $cashexp = $none;

    }

    

    if (

            $guser['expense'] == '' && $guser['contra'] == '' && $guser['cashpay'] == '' && $guser['expreg'] == '' && $guser['expledg'] == ''&& $guser['cashexp'] == ''

    ) {

        $expenses = $none;

    }

    

    

    

    

    if ($guser['comprecdby'] == '') {

        $comprecdby = $none;

    }

    if ($guser['complaint'] == '') {

        $complaint = $none;

    }

    if ($guser['compquery'] == '') {

        $compquery = $none;

    }

    

    if (

            $guser['comprecdby'] == '' && $guser['complaint'] == '' && $guser['compquery'] == ''

    ) {

        $complaints = $none;

    }

    

    

    

    if ($guser['followuprep'] == '') {

        $followuprep = $none;

    }

    if ($guser['followup_print'] == '') {

        $followup_print = $none;

    }

    if ($guser['remdalert'] == '') {

        $remdalert = $none;

    }

    

    if (

            $guser['followuprep'] == '' && $guser['followup_print'] == '' && $guser['remdalert'] == ''

    ) {

        $followup = $none;

    }

    

    



//    ################### Accounts ###################

//    if ($guser['group'] == '') {

//        $group = $none;

//    }

//    if ($guser['other'] == '') {

//        $other = $none;

//    }

//    if ($guser['bank'] == '') {

//        $bank = $none;

//    }

//    if ($guser['cash'] == '') {

//        $cash = $none;

//    }

//    if ($guser['expense'] == '') {

//        $expense = $none;

//    }

//    if ($guser['drawbank'] == '') {

//        $drawbank = $none;

//    }

//    if ($guser['bankrecp'] == '') {

//        $bankrecp = $none;

//    }

//    if ($guser['bankpay'] == '') {

//        $bankpay = $none;

//    }

//    if ($guser['cashrecp'] == '') {

//        $cashrecp = $none;

//    }

//    if ($guser['cashpay'] == '') {

//        $cashpay = $none;

//    }

//    if ($guser['journal'] == '') {

//        $journal = $none;

//    }

//    if ($guser['contra'] == '') {

//        $contra = $none;

//    }

//    if ($guser['contraent'] == '') {

//        $contraent = $none;

//    }

//    if ($guser['bankrecorep'] == '') {

//        $bankrecorep = $none;

//    }

//    if ($guser['bankrecon'] == '') {

//        $bankrecon = $none;

//    }

//    if ($guser['receivablerep'] == '') {

//        $receivablerep = $none;

//    }

//    if ($guser['payablerep'] == '') {

//        $payablerep = $none;

//    }

//    if ($guser['payablerep'] == '' && $guser['receivablerep'] == '') {

//        $oustanding = $none;

//    }

//

//    if (

//            $guser['group'] == '' && $guser['other'] == '' && $guser['bank'] == '' && $guser['cash'] == '' && $guser['expense'] == '' && $guser['drawbank'] == '' &&

//            $guser['bankrecp'] == '' && $guser['bankpay'] == '' && $guser['cashrecp'] == '' && $guser['cashpay'] == '' && $guser['journal'] == '' && $guser['contra'] == ''

//    ) {

//        $accounts = $none;

//    }

//

//    ################### MIS REPORTS ###################

//

//    if ($guser['purchsumm'] == '') {

//        $purchsumm = $none;

//    }

//    if ($guser['salesum'] == '') {

//        $salesum = $none;

//    }

//    if ($guser['dailysalsumm'] == '') {

//        $dailysalsumm = $none;

//    }

//    if ($guser['itemsalereg'] == '') {

//        $itemsalereg = $none;

//    }

//    if ($guser['partywisesale'] == '') {

//        $partywisesale = $none;

//    }

//    if ($guser['stkrawmat'] == '') {

//        $stkrawmat = $none;

//    }

//    if ($guser['stkprod'] == '') {

//        $stkprod = $none;

//    }

//    if ($guser['stkpack'] == '') {

//        $stkpack = $none;

//    }

//    if ($guser['stkfingood'] == '') {

//        $stkfingood = $none;

//    }

//    if ($guser['ledger'] == '') {

//        $ledger = $none;

//    }

//    if ($guser['bankbook'] == '') {

//        $bankbook = $none;

//    }

//    if ($guser['cashbook'] == '') {

//        $cashbook = $none;

//    }

//    if ($guser['jvbook'] == '') {

//        $jvbook = $none;

//    }

//    if ($guser['contreg'] == '') {

//        $contreg = $none;

//    }

//    if ($guser['prodhist'] == '') {

//        $prodhist = $none;

//    }

//    if ($guser['ageingamt'] == '') {

//        $ageingamt = $none;

//    }

//    if ($guser['unmarkrecp'] == '') {

//        $unmarkrecp = $none;

//    }

//    if ($guser['unmarkpay'] == '') {

//        $unmarkpay = $none;

//    }

//

//    if (

//            $guser['purchsumm'] == '' && $guser['salesumm'] == '' && $guser['dailysalsumm'] == '' && $guser['stkrawmat'] == '' &&

//            $guser['stkprod'] == '' && $guser['stkfingood'] == '' && $guser['ledger'] == '' && $guser['bankbook'] == '' &&

//            $guser['cashbook'] == '' && $guser['jvbook'] == '' && $guser['contreg'] == '' && $guser['prodhist'] == '' && $guser['ageingamt'] == '' &&

//            $guser['unmarkrecp'] == '' && $guser['unmarkpay'] == '' &&

//            $guser['tiipartyreg'] == '' && $guser['tisalitemwise'] == '' && $guser['tiitemwise'] == '' && $guser['tiitemgrpwise'] == '' &&

//            $guser['prodhist'] == '' && $guser['stkpack'] == '' && $guser['tdsrep'] == '' && $guser['chqrep'] == '' && $guser['amtrep'] == '') {

//        $mis = $none;

//    }

//

//    ################### GST REPORTS ###################

//    if ($guser['gstr1_1'] == '') {

//        $gstr1_1 = $none;

//    }

//    if ($guser['gstr1_2'] == '') {

//        $gstr1_2 = $none;

//    }

//    if ($guser['gstr1_3'] == '') {

//        $gstr1_3 = $none;

//    }

//    if ($guser['gstr1_4'] == '') {

//        $gstr1_4 = $none;

//    }

//    if ($guser['gstr1_5'] == '') {

//        $gstr1_5 = $none;

//    }

//    if ($guser['gstr1_6'] == '') {

//        $gstr1_6 = $none;

//    }

//    if ($guser['gstr1_9'] == '') {

//        $gstr1_9 = $none;

//    }

//    if ($guser['gstr1_10'] == '') {

//        $gstr1_10 = $none;

//    }

//    if ($guser['gstr1_11'] == '') {

//        $gstr1_11 = $none;

//    }

//

//    if ($guser['gstr2_b2b'] == '') {

//        $gstr2_b2b = $none;

//    }

//    if ($guser['gstr2_b2bur'] == '') {

//        $gstr2_b2bur = $none;

//    }

//    if ($guser['gstr2_cdnr'] == '') {

//        $gstr2_cdnr = $none;

//    }

//    if ($guser['gstr2_cdnur'] == '') {

//        $gstr2_cdnur = $none;

//    }

//    if ($guser['gstr2_hsn'] == '') {

//        $gstr2_hsn = $none;

//    }

//    if ($guser['gstr3B'] == '') {

//        $gstr3B = $none;

//    }

//    if ($guser['gstr3b'] == '') {

//        $gstr3b = $none;

//    }

//    if ($guser['inougst'] == '') {

//        $inougst = $none;

//    }

//    if ($guser['jvgst'] == '') {

//        $jvgst = $none;

//    }

//

//    if (

//            $guser['gstr1_1'] == '' && $guser['gstr1_2'] == '' && $guser['gstr1_3'] == '' && $guser['gstr1_4'] == '' && $guser['gstr1_5'] == '' &&

//            $guser['gstr1_6'] == '' && $guser['gstr1_7'] == '' && $guser['gstr1_8'] == '' && $guser['gstr1_9'] == '' && $guser['gstr1_10'] == '' &&

//            $guser['gstr1_11'] == '' && $guser['gstr3b'] == '' && $guser['inougst'] == '' && $guser['jvgst'] == ''

//    ) {

//        $gst = $none;

//    }

//    ################### FINALIZATION ###################

//    if ($guser['trbal'] == '') {

//        $trbal = $none;

//    }

//    if ($guser['profit'] == '') {

//        $profit = $none;

//    }

//    if ($guser['profshar'] == '') {

//        $profshar = $none;

//    }

//    if ($guser['balsheet'] == '') {

//        $balsheet = $none;

//    }

//    if (

//            $guser['balsheet'] == '' && $guser['profshar'] == '' && $guser['profit'] == '' && $guser['trbal'] == ''

//    ) {

//        $finalization = $none;

//    }

}

