<?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_assoc($getuser);
        $line    = '';
        
        $none   = "style='display:none'";
    
    ################## MASTERS ##################
    if($guser['school']              == ''){ $school     = $none; }
    if($guser['center']              == ''){ $center     = $none; }
    if($guser['medium']              == ''){ $medium     = $none; }
    if($guser['subject']             == ''){ $subject    = $none; }
    if($guser['district']            == ''){ $district   = $none; }
    if($guser['exam']                == ''){ $exam       = $none; }
    if($guser['courier']             == ''){ $courier    = $none; }
    if($guser['stdepot']             == ''){ $stdepot    = $none; }
    if($guser['bank']                == ''){ $bank       = $none; }
    if($guser['cash']                == ''){ $cash       = $none; }
    if($guser['expense']             == ''){ $expense    = $none; }
    if($guser['narration']           == ''){ $narration  = $none; }
    if($guser['prprimary']           == ''){ $prprimary  = $none; }
    if($guser['prsecondry']          == ''){ $prsecondry = $none; }
    if($guser['prprelium']           == ''){ $prpreliums = $none; }

    ################## TRANSACTION ##################
    if($guser['dmndfrm']            == ''){ $dmndfrm     = $none; }
    if($guser['gendemd']            == ''){ $gendemd     = $none; }
    if($guser['geninvs']             == ''){ $geninvs    = $none; }
    if($guser['geninvm']             == ''){ $geninvm    = $none; }
    if($guser['invoice']            == ''){ $invoice     = $none; }
    if($guser['bankpay']            == ''){ $bankpay     = $none; }
    if($guser['bankrecp']           == ''){ $bankrecp    = $none; }
    if($guser['cashpay']            == ''){ $cashpay     = $none; }
    if($guser['cashrecp']           == ''){ $cashrecp    = $none; }
    if($guser['prevbill']           == ''){ $prevbill    = $none; }
    if($guser['discgvn']            == ''){ $discgvn     = $none; }
    if($guser['discrecd']           == ''){ $discrecd    = $none; }
    
    if($guser['bankpay'] == '' && $guser['bankrecp'] == ''){$mbank      = $none;} 
    if($guser['cashpay'] == '' && $guser['cashrecp'] == ''){$mcash      = $none;} 
    if($guser['discgvn'] == '' && $guser['discrecd'] == ''){$mdiscount  = $none;} 
    
    ################## REPORTS ##################
    if($guser['invprin']            == ''){ $invprin     = $none; }
    if($guser['qtypress']           == ''){ $qtypress    = $none; }
    if($guser['packet']             == ''){ $packet      = $none; }
    if($guser['schldmnd']           == ''){ $schldmnd    = $none; }
    if($guser['ledger']             == ''){ $ledger      = $none; }
    if($guser['osbill']             == ''){ $osbill      = $none; }
    if($guser['multenvp']           == ''){ $multenvp      = $none; }
    if($guser['unmark']             == ''){ $unmark      = $none; }
    if($guser['rpsubject']          == ''){ $rpsubject   = $none; }
    if($guser['rpbill']             == ''){ $rpbill      = $none; }
    if($guser['rpschool']           == ''){ $rpschool    = $none; }
    if($guser['rpunmark']           == ''){ $rpunmark    = $none; }
    
    if($guser['rpschool'] == '' && $guser['rpbill'] == '' && $guser['rpsubject'] == '' )
      {$label  = $none;} 
      
    ################## REGISTERS ##################
    if($guser['rgbill']             == ''){ $rgbill      = $none; }
    if($guser['rgbillpend']         == ''){ $rgbillpend  = $none; }
    if($guser['cheqretu']         == ''){ $cheqretu  = $none; }
    if($guser['dmndreg']            == ''){ $dmndreg     = $none; }
    if($guser['bankbook']           == ''){ $bankbook    = $none; }
    if($guser['cashbook']           == ''){ $cashbook    = $none; }
    if($guser['payrecpbank']           == ''){ $payrecpbank    = $none; }
    if($guser['payrecpcash']           == ''){ $payrecpcash    = $none; }

    ################## SUMMARY ##################
    if($guser['salesumppr']         == ''){ $salesumppr  = $none; }
    if($guser['salesumamt']         == ''){ $salesumamt  = $none; }
    if($guser['packsum']            == ''){ $packsum     = $none; }
    if($guser['schlstrprnt']        == ''){ $schlstrprnt = $none; }
   
    if($guser['salesumamt'] == ''  && $guser[salesumppr] == ''){$rpsales  = $none;} 
    ################## TOOLS & DASHBOARD ##################
    if($guser['company']             == ''){ $tlcompany   = $none; }
    if($guser['backup']              == ''){ $tlbackup    = $none; }
    if($guser['profile']             == ''){ $tlprofile   = $none; }
    if($guser['dstock']              == ''){ $dstock      = $none; }
    }

?>