<?php

if(isset($_SESSION["username_" . $dbname])){
        $user    = $_SESSION["username_" . $dbname];
        $getuser = mysqli_query($conn, "SELECT * FROM `passmain` WHERE `user`='$user'")or die(mysql_error($conn));
        $guser   = mysqli_fetch_assoc($getuser);
        $line = '';
        
        $none  = "style='display:none'";
    
    ################## MASTERS ##################
    if($guser[customer] == ''){ $customer = $none; }
    if($guser[item] == ''){ $item = $none; }
    if($guser[designation] == ''){ $designation = $none; }
    if($guser[staff] == ''){ $staff = $none; }
    if($guser[expense] == ''){ $expense = $none; }
    if($guser[metric] == ''){ $metric = $none; }
    if($guser[nbmetric] == ''){ $nbmetric = $none; }
    if($guser[guagemetric] == ''){ $guagemetric = $none; }
    if($guser[area] == ''){ $area = $none; }
    if($guser[openbal] == ''){ $openbal = $none; }
    if($guser[bank] == ''){ $bank = $none; }
    if($guser[narration] == ''){ $narration = $none; }
    if($guser[narrmast] == ''){ $narrmast = $none; }
    if($guser[diamaster] == ''){ $diamaster = $none; }

    ################## TRANSACTION ##################
    if($guser[challan]  == ''){ $challan = $none; }
    if($guser[genbill]  == ''){ $genbill = $none; }
    if($guser[cashrecd]  == ''){ $cashrecd = $none; }
    if($guser[expensevoch]  == ''){ $expensevoch = $none; }
    if($guser[bankrecp]  == ''){ $bankrecp = $none; }
    if($guser[bankpay]  == ''){ $bankpay = $none; }
    if($guser[persexpense]  == ''){ $persexpense = $none; }
    if($guser[discgive]  == ''){ $discgive = $none; }
    if($guser[attendance]  == ''){ $attendance = $none; }
    if($guser[attendedit]  == ''){ $attendedit = $none; }
    if($guser[salprocess]  == ''){ $salprocess = $none; }
//    if($guser[bankpay]  == ''){ $bankpay = $none; }
//    if($guser[diamaster]  == ''){ $diamaster = $none; }
//    if($guser[openbal]  == ''){ $openbal = $none; }
    

    ################## REPORTS ##################
    if($guser[challprint] == ''){ $challprint = $none; }
    if($guser[gstinvrep] == ''){ $gstinvrep = $none; }
    if($guser[summparty] == ''){ $summparty = $none; }
    if($guser[ledger] == ''){ $ledger = $none; }
    if($guser[labels] == ''){ $labels = $none; }
    if($guser[query] == ''){ $query = $none; }
    if($guser[analysis] == ''){ $analysis = $none; }
    if($guser[diaprint] == ''){ $diaprint = $none; }
    if($guser[bankbook] == ''){ $bankbook = $none; }
    if($guser[partratecomp] == ''){ $partratecomp = $none; }
    if($guser[calcbonus] == ''){ $calcbonus = $none; }
    if($guser[dailycash] == ''){ $dailycash = $none; }
    
    ################## REGISTERS ##################
    if($guser[chalreg] == ''){ $chalreg = $none; }
    if($guser[gstinvreg] == ''){ $gstinvreg = $none; }
//    if($guser[cashrecdreg] == ''){ $cashrecdreg = $none; }
    if($guser[cashrecd_print] == ''){ $cashrecd_print = $none; }
    if($guser[expreg] == ''){ $expreg = $none; }
    if($guser[attendreg] == ''){ $attendreg = $none; }
    if($guser[stafattend] == ''){ $stafattend = $none; }
    if($guser[salreg] == ''){ $salreg = $none; }
    if($guser[bonusreg] == ''){ $bonusreg = $none; }
    if($guser[shopreg] == ''){ $shopreg = $none; }
    if($guser[persexpreg] == ''){ $persexpreg = $none; }
//    if($guser[balsheet] == ''){ $balsheet = $none; }
    if($guser[discgvreg] == ''){ $discgvreg = $none; }
    
    ################## FINAZLIZATION ##################
    if($guser[trbal] == ''){ $trbal = $none; }
    if($guser[profit] == ''){ $profit = $none; }
    if($guser[profshar] == ''){ $profshar = $none; }
    if($guser[balsheet] == ''){ $balsheet = $none; }
    
    ################## TOOLS & DASHBOARD ##################
//    if($guser[tlcompany] == ''){ $tlcompany = $none; }
//    if($guser[tlbackup] == ''){ $tlbackup = $none; }
//    if($guser[tlprofile] == ''){ $tlprofile = $none; }
//    if($guser[dstock] == ''){ $dstock = $none; }
    }

?>