<?php session_start();
include ('../inc/dbcon.php');
include ('../inc/functions.php');
if(isset($_SESSION["axeslogin"]) && $_SESSION["axeslogin"] == true){
get_pagesecurity('44','creates','R');     
$_SESSION['cuPages']='rou_rolecreate.php';   
$cuPage='rou_rolecreate.php';    
$aid=$_SESSION['uid'];
$brid=$_SESSION['abrid'];    
}else{
header('Location:../index.php');
exit;    
}
$mhead='user';
$menuh='User &amp; Role';
$phead='reprolcre';
$page='Report Role Create';
$dtnow = date("Y-m-d h:i:s", time());
?>

<?php
if(isset($_POST['save_rprole'])){
$access = remove_junk(escape($_POST['access']));  

$drp = remove_junk(escape($_POST['drp']));
if($drp==""){$drp="0";}else{$drp="'".$drp."'";}
$drs = remove_junk(escape($_POST['drs']));
if($drs==""){$drs="0";}else{$drs="'".$drs."'";}
$dre = remove_junk(escape($_POST['dre'])); 
if($dre==""){$dre="0";}else{$dre="'".$dre."'";}  
$dred = remove_junk(escape($_POST['dred']));  
if($dred==""){$dred="0";}else{$dred="'".$dred."'";}
$drdcs = remove_junk(escape($_POST['drdcs'])); 
if($drdcs==""){$drdcs="0";}else{$drdcs="'".$drdcs."'";} 
$drplin = remove_junk(escape($_POST['drplin'])); 
if($drplin==""){$drplin="0";}else{$drplin="'".$drplin."'";} 
$drplit = remove_junk(escape($_POST['drplit'])); 
if($drplit==""){$drplit="0";}else{$drplit="'".$drplit."'";} 
$dro = remove_junk(escape($_POST['dro']));   
if($dro==""){$dro="0";}else{$dro="'".$dro."'";}

$sarin = remove_junk(escape($_POST['sarin']));
if($sarin==""){$sarin="0";}else{$sarin="'".$sarin."'";}
$sarrin = remove_junk(escape($_POST['sarrin']));
if($sarrin==""){$sarrin="0";}else{$sarrin="'".$sarrin."'";}
$sacw = remove_junk(escape($_POST['sacw'])); 
if($sacw==""){$sacw="0";}else{$sacw="'".$sacw."'";}  
$sait = remove_junk(escape($_POST['sait']));
if($sait==""){$sait="0";}else{$sait="'".$sait."'";}  
$saitst = remove_junk(escape($_POST['saitst']));  
if($saitst==""){$saitst="0";}else{$saitst="'".$saitst."'";}
$sapsr = remove_junk(escape($_POST['sapsr']));  
if($sapsr==""){$sapsr="0";}else{$sapsr="'".$sapsr."'";}
$sao = remove_junk(escape($_POST['sao']));  
if($sao==""){$sao="0";}else{$sao="'".$sao."'";}

$aclst = remove_junk(escape($_POST['aclst']));
if($aclst==""){$aclst="0";}else{$aclst="'".$aclst."'";}
$accst = remove_junk(escape($_POST['accst']));
if($accst==""){$accst="0";}else{$accst="'".$accst."'";}
$acbst = remove_junk(escape($_POST['acbst']));  
if($acbst==""){$acbst="0";}else{$acbst="'".$acbst."'";} 
$acmst = remove_junk(escape($_POST['acmst'])); 
if($acmst==""){$acmst="0";}else{$acmst="'".$acmst."'";} 
$acjh = remove_junk(escape($_POST['acjh']));  
if($acjh==""){$acjh="0";}else{$acjh="'".$acjh."'";}
$actb = remove_junk(escape($_POST['actb'])); 
if($actb==""){$actb="0";}else{$actb="'".$actb."'";} 
$acbs = remove_junk(escape($_POST['acbs'])); 
if($acbs==""){$acbs="0";}else{$acbs="'".$acbs."'";}
$acpl = remove_junk(escape($_POST['acpl']));  
if($acpl==""){$acpl="0";}else{$acpl="'".$acpl."'";}
$aco = remove_junk(escape($_POST['aco']));   
if($aco==""){$aco="0";}else{$aco="'".$aco."'";}


$puriv = remove_junk(escape($_POST['puriv']));
if($puriv==""){$puriv="0";}else{$puriv="'".$puriv."'";}
$purrin = remove_junk(escape($_POST['purrin']));
if($purrin==""){$purrin="0";}else{$purrin="'".$purrin."'";}
$pusw = remove_junk(escape($_POST['pusw']));   
if($pusw==""){$pusw="0";}else{$pusw="'".$pusw."'";}
$puit = remove_junk(escape($_POST['puit']));  
if($puit==""){$puit="0";}else{$puit="'".$puit."'";}
$puitst = remove_junk(escape($_POST['puitst']));  
if($puitst==""){$puitst="0";}else{$puitst="'".$puitst."'";}
$puppr = remove_junk(escape($_POST['puppr']));  
if($puppr==""){$puppr="0";}else{$puppr="'".$puppr."'";}
$puo = remove_junk(escape($_POST['puo'])); 
if($puo==""){$puo="0";}else{$puo="'".$puo."'";}


$recl = remove_junk(escape($_POST['recl']));  
if($recl==""){$recl="0";}else{$recl="'".$recl."'";}
$resl = remove_junk(escape($_POST['resl']));  
if($resl==""){$resl="0";}else{$resl="'".$resl."'";}
$recst = remove_junk(escape($_POST['recst']));   
if($recst==""){$recst="0";}else{$recst="'".$recst."'";}
$recstit = remove_junk(escape($_POST['recstit']));  
if($recstit==""){$recstit="0";}else{$recstit="'".$recstit."'";}
$recdc = remove_junk(escape($_POST['recdc']));  
if($recdc==""){$recdc="0";}else{$recdc="'".$recdc."'";}
$reco = remove_junk(escape($_POST['reco']));  
if($reco==""){$reco="0";}else{$reco="'".$reco."'";}
$reo = remove_junk(escape($_POST['reo']));  
if($reo==""){$reo="0";}else{$reo="'".$reo."'";}



$vop = remove_junk(escape($_POST['vop']));  
if($vop==""){$vop="0";}else{$vop="'".$vop."'";}
$vor = remove_junk(escape($_POST['vor']));  
if($vor==""){$vor="0";}else{$vor="'".$vor."'";}
$voj = remove_junk(escape($_POST['voj']));   
if($voj==""){$voj="0";}else{$voj="'".$voj."'";}
$voprst = remove_junk(escape($_POST['voprst']));  
if($voprst==""){$voprst="0";}else{$voprst="'".$voprst."'";}
$voit = remove_junk(escape($_POST['voit']));  
if($voit==""){$voit="0";}else{$voit="'".$voit."'";}
$voo = remove_junk(escape($_POST['voo']));  
if($voo==""){$voo="0";}else{$voo="'".$voo."'";}


$inpl = remove_junk(escape($_POST['inpl']));  
if($inpl==""){$inpl="0";}else{$inpl="'".$inpl."'";}
$insr = remove_junk(escape($_POST['insr']));  
if($insr==""){$insr="0";}else{$insr="'".$insr."'";}
$inis = remove_junk(escape($_POST['inis']));   
if($inis==""){$inis="0";}else{$inis="'".$inis."'";}
$inpic = remove_junk(escape($_POST['inpic'])); 
if($inpic==""){$inpic="0";}else{$inpic="'".$inpic."'";} 
$iniv = remove_junk(escape($_POST['iniv']));  
if($iniv==""){$iniv="0";}else{$iniv="'".$iniv."'";}
$inpiv = remove_junk(escape($_POST['inpiv']));  
if($inpiv==""){$inpiv="0";}else{$inpiv="'".$inpiv."'";}
$invo = remove_junk(escape($_POST['invo']));  
if($invo==""){$invo="0";}else{$invo="'".$invo."'";}

$pasl = remove_junk(escape($_POST['pasl']));  
if($pasl==""){$pasl="0";}else{$pasl="'".$pasl."'";}
$pasb = remove_junk(escape($_POST['pasb']));  
if($pasb==""){$pasb="0";}else{$pasb="'".$pasb."'";}
$pass = remove_junk(escape($_POST['pass']));   
if($pass==""){$pass="0";}else{$pass="'".$pass."'";}
$passi = remove_junk(escape($_POST['passi']));  
if($passi==""){$passi="0";}else{$passi="'".$passi."'";}
$pao = remove_junk(escape($_POST['pao']));  
if($pao==""){$pao="0";}else{$pao="'".$pao."'";}

$prel = remove_junk(escape($_POST['prel']));  
if($prel==""){$prel="0";}else{$prel="'".$prel."'";}
$pra = remove_junk(escape($_POST['pra']));
if($pra==""){$pra="0";}else{$pra="'".$pra."'";}
$prla = remove_junk(escape($_POST['prla']));  
if($prla==""){$prla="0";}else{$prla="'".$prla."'";}
$prsr = remove_junk(escape($_POST['prsr']));   
if($prsr==""){$prsr="0";}else{$prsr="'".$prsr."'";}
$prcr = remove_junk(escape($_POST['prcr']));  
if($prcr==""){$prcr="0";}else{$prcr="'".$prcr."'";}
$pro = remove_junk(escape($_POST['pro']));  
if($pro==""){$pro="0";}else{$pro="'".$pro."'";}

if(isset($_POST['access'])){
$ducode = mysqli_query($con,"SELECT * FROM tbl_userreportrole WHERE access = '$access'");
}
	
if($ducode->num_rows > 0) {

$sql="UPDATE  tbl_userreportrole  SET  drp =$drp,
 drs =$drs, dre =$dre, dred =$dred, drdcs =$drdcs, drplin =$drplin, drplit =$drplit, dro =$dro, sarin =$sarin,
 sarrin =$sarrin, sacw =$sacw, sait =$sait, saitst =$saitst, sapsr =$sapsr, sao =$sao, aclst =$aclst,
 accst =$accst, acbst =$acbst, acmst =$acmst, acjh =$acjh, actb =$actb, acbs =$acbs, acpl =$acpl,
 aco =$aco, puriv =$puriv, purrin =$purrin, pusw =$pusw, puit =$puit, puitst =$puitst, puppr =$puppr,
 puo =$puo, recl =$recl, resl =$resl, recst =$recst, recstit =$recstit, recdc =$recdc, reco =$reco,
 reo =$reo, vop =$vop, vor =$vor, voj =$voj, voprst =$voprst, voit =$voit, voo =$voo, inpl =$inpl,
 insr =$insr, inis =$inis, inpic =$inpic, iniv =$iniv, inpiv =$inpiv, invo =$invo, pasl =$pasl, pasb =$pasb,
 pass =$pass, passi =$passi, pao =$pao, prel =$prel, pra =$pra, prla =$prla, prsr =$prsr,
 prcr =$prcr, pro =$pro WHERE access=$access";
$result = mysqli_query($con,$sql) or die(mysqli_error($con)); 

if($result){
    $queryd=mysqli_query($con,"SELECT * FROM tbl_usergroup WHERE id='$access'")or die(mysqli_error($con));
    $rowd=mysqli_fetch_array($queryd);
    $name=$rowd['name'];

    $act =remove_junk(escape(' Report Role Updated: '.$name));    
    write_activity($aid,'ROL','Report Role has been Updated',$act);     
    save_msg('s','Report Role Updated Successfully!!!');
    echo "<script>window.location='rou_reprolecreate.php'</script>";	
}else{
    save_msg('e','Report Role insert fail!!!!');
    echo "<script>window.location='rou_reprolecreate.php'</script>";		
}
}else{       
$sql="INSERT INTO tbl_userreportrole( access, uid, brid, date, drp, drs, dre, dred, drdcs, drplin,
 drplit, dro, sarin, sarrin, sacw, sait, saitst, sapsr, sao, aclst, accst, acbst, acmst, acjh,
  actb, acbs, acpl, aco, puriv, purrin, pusw, puit, puitst, puppr, puo, recl, resl, recst,
   recstit, recdc, reco, reo, vop, vor, voj, voprst, voit, voo, inpl, insr, inis, inpic, 
   iniv, inpiv, invo, pasl, pasb, pass, passi, pao, prel, pra, prla, prsr, prcr, pro) 
VALUES ($access,$aid,$brid,'$dtnow',$drp,$drs,$dre,$dred,$drdcs,$drplin,$drplit,$dro,$sarin,
$sarrin,$sacw,$sait,$saitst,$sapsr,$sao,$aclst,$accst,$acbst,$acmst,$acjh,$actb,$acbs,$acpl,
$aco,$puriv,$purrin,$pusw,$puit,$puitst,$puppr,$puo,$recl,$resl,$recst,$recstit,$recdc,$reco,
$reo,$vop,$vor,$voj,$voprst,$voit,$voo,$inpl,$insr,$inis,$inpic,$iniv,$inpiv,$invo,$pasl,
$pasb,$pass,$passi,$pao,$prel,$pra,$prla,$prsr,$prcr,$pro)";

$result = mysqli_query($con,$sql) or die(mysqli_error($con)); 
    if($result){
        $queryd=mysqli_query($con,"SELECT * FROM tbl_usergroup WHERE id='$access'")or die(mysqli_error($con));
        $rowd=mysqli_fetch_array($queryd);
        $name=$rowd['name'];

        $act =remove_junk(escape('New Report Role Add: '.$name));    
        write_activity($aid,'ROL','Report Role has been Added',$act);     
        save_msg('s','Report Role Added Successfully!!!');
        echo "<script>window.location='rou_reprolecreate.php'</script>";	
    }else{
        save_msg('e','Report Role insert fail!!!!');
        echo "<script>window.location='rou_reprolecreate.php'</script>";		
    }
}
}    
?>
<?php
include('../layout/head.php');
include('../layout/header.php');
include('../layout/side_nav.php');
?>

<div class="content-wrapper">
<?php include('../layout/page_head.php'); ?>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-12">
<div class="box box-solid">

<?php 
if(isset($_POST['save_submit'])){
    $access = remove_junk(escape($_POST['access'])); 
    $queryd=mysqli_query($con,"SELECT * FROM tbl_usergroup Where id='$access'")or die(mysqli_error($con));
    $rowd=mysqli_fetch_array($queryd);
    $accessname=$rowd['name'];
    $query=mysqli_query($con,"SELECT * FROM tbl_userreportrole WHERE access='$access'")or die(mysqli_error($con));
    if($query->num_rows > 0){
     $row=mysqli_fetch_array($query); 
?>
     
     <div class="box-body">    
<form action="rou_reprolecreate.php" onsubmit="return validate()" enctype="multipart/form-data" method="post" accept-charset="utf-8" id="formId_0068942179912190161635615690995">    
<div class="row">
    <div class="col-md-12 form-group">
        <div style="width: 250px" class="input-group pull-left">
            <div class="input-group-addon">Role</div>
            <input type="text" class="form-control" value="<?php echo $accessname;?>" > 
            <input type="hidden" class="form-control" name="access" value="<?php echo $access;?>" >  
        </div>
        <div style="width: 200px" class="input-group pull-right">
            <div class="input-group-addon"><i class="fa fa-search"></i></div>
            <input type="text" class="form-control search_text" placeholder="Search.." onkeyup="search_text()">
        </div>
    </div>
<div class="col-md-4">
<ul class="smenu">
<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-exchange" aria-hidden="true"></i>  Daily Report</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[1][id]" value="1" readonly=""><input type="checkbox" name="drp" class="role" value="1" <?php if($row['drp']==1){ echo'checked';}?> >   Purchase</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[2][id]" value="2" readonly=""><input type="checkbox" name="drs" class="role" value="1" <?php if($row['drs']==1){ echo'checked';}?>>  Sales</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[3][id]" value="3" readonly=""><input type="checkbox" name="dre" class="role"  value="1" <?php if($row['dre']==1){ echo'checked';}?> >  Expenses</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[4][id]" value="4" readonly=""><input type="checkbox" name="dred" class="role"  value="1" <?php if($row['dred']==1){ echo'checked';}?>>  Expenses Details</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[5][id]" value="5" readonly=""><input type="checkbox" name="drdcs" class="role"  value="1" <?php if($row['drdcs']==1){ echo'checked';}?>>  Daily Cash Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[6][id]" value="6" readonly=""><input type="checkbox" name="drplin" class="role"  value="1" <?php if($row['drplin']==1){ echo'checked';}?>>  Profit &amp; Loss (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[7][id]" value="7" readonly=""><input type="checkbox" name="drplit" class="role"  value="1" <?php if($row['drplit']==1){ echo'checked';}?>>  Profit &amp; Loss (Item)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[8][id]" value="8" readonly=""><input type="checkbox" name="dro" class="role"  value="1" <?php if($row['dro']==1){ echo'checked';}?>>  Overview</a></li>    
</ul>
</li>

<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-puzzle-piece" aria-hidden="true"></i>  Sales (Product)</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[9][id]" value="9" readonly=""><input type="checkbox" name="sarin" class="role"  value="1" <?php if($row['sarin']==1){ echo'checked';}?>>   Sales Record (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[10][id]" value="10" readonly=""><input type="checkbox" name="sarrin" class="role"  value="1" <?php if($row['sarrin']==1){ echo'checked';}?>>  Return Reord (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[11][id]" value="11" readonly=""><input type="checkbox" name="sacw" class="role"  value="1" <?php if($row['sacw']==1){ echo'checked';}?>>  Customer Wise (Invoce)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[12][id]" value="12" readonly=""><input type="checkbox" name="sait" class="role"  value="1" <?php if($row['sait']==1){ echo'checked';}?>>  Item Wise</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[13][id]" value="13" readonly=""><input type="checkbox" name="saitst" class="role"  value="1" <?php if($row['saitst']==1){ echo'checked';}?>>  Item Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[14][id]" value="14" readonly=""><input type="checkbox" name="sapsr" class="role"  value="1" <?php if($row['sapsr']==1){ echo'checked';}?>>   Periodic Sales Record</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[15][id]" value="15" readonly=""><input type="checkbox" name="sao" class="role"  value="1" <?php if($row['sao']==1){ echo'checked';}?>>  Overview</a></li>    
</ul>
</li>

<!-- <li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-puzzle-piece" aria-hidden="true"></i>  Sales (Service)</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[16][id]" value="16" readonly=""><input type="checkbox" name="data[16][read]" class="role"  value="1" >   Sales Record (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[17][id]" value="17" readonly=""><input type="checkbox" name="data[17][read]" class="role"  value="1" >  Customer Wise (Invoce)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[18][id]" value="18" readonly=""><input type="checkbox" name="data[18][read]" class="role"  value="1" >  Item Wise</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[19][id]" value="19" readonly=""><input type="checkbox" name="data[19][read]" class="role"  value="1" >  Item Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[20][id]" value="20" readonly=""><input type="checkbox" name="data[20][read]" class="role"  value="1" >   Periodic Sales Record</a></li>   
<li><a href="#"><input type="hidden" maxlength="3" name="data[21][id]" value="21" readonly=""><input type="checkbox" name="data[21][read]" class="role"  value="1" >  Overview</a></li>    
</ul>
</li>     -->
    
<li class="smenu-treeview">
<a href="#" class="smenu-title"><i class="fa fa-sticky-note" aria-hidden="true"></i>  Account</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[22][id]" value="22" readonly=""><input type="checkbox" name="aclst" class="role"  value="1" <?php if($row['aclst']==1){ echo'checked';}?>>  Ledger Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[23][id]" value="23" readonly=""><input type="checkbox" name="accst" class="role"  value="1" <?php if($row['accst']==1){ echo'checked';}?>>  Cash Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[24][id]" value="24" readonly=""><input type="checkbox" name="acbst" class="role"  value="1" <?php if($row['acbst']==1){ echo'checked';}?>>  Bank Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[25][id]" value="25" readonly=""><input type="checkbox" name="acmst" class="role"  value="1" <?php if($row['acmst']==1){ echo'checked';}?>>  Mobile Statement</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[26][id]" value="26" readonly=""><input type="checkbox" name="acjh" class="role"  value="1" <?php if($row['acjh']==1){ echo'checked';}?>>  Journal History</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[27][id]" value="27" readonly=""><input type="checkbox" name="actb" class="role"  value="1" <?php if($row['actb']==1){ echo'checked';}?>>  Trial Balance</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[28][id]" value="28" readonly=""><input type="checkbox" name="acbs" class="role"  value="1" <?php if($row['acbs']==1){ echo'checked';}?>>  Balance Sheet</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[29][id]" value="29" readonly=""><input type="checkbox" name="acpl" class="role"  value="1" <?php if($row['acpl']==1){ echo'checked';}?>>  Profit &amp; Loss</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[30][id]" value="30" readonly=""><input type="checkbox" name="aco" class="role"  value="1" <?php if($row['aco']==1){ echo'checked';}?>>  Overview</a></li>    
</ul>
</li>
</ul>
</div>
    
<div class="col-md-4">
<ul class="smenu">
<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-exchange" aria-hidden="true"></i>  Purchase</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[31][id]" value="31" readonly=""><input type="checkbox" name="puriv" class="role"  value="1" <?php if($row['puriv']==1){ echo'checked';}?>>   Purchase Record (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[32][id]" value="32" readonly=""><input type="checkbox" name="purrin" class="role"  value="1" <?php if($row['purrin']==1){ echo'checked';}?>>   Retrun Record (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[33][id]" value="33" readonly=""><input type="checkbox" name="pusw" class="role"  value="1" <?php if($row['pusw']==1){ echo'checked';}?>>  Supplier Wise (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[34][id]" value="34" readonly=""><input type="checkbox" name="puit" class="role"  value="1" <?php if($row['puit']==1){ echo'checked';}?>>  Item Wise</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[35][id]" value="35" readonly=""><input type="checkbox" name="puitst" class="role"  value="1" <?php if($row['puitst']==1){ echo'checked';}?>>  Item Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[36][id]" value="36" readonly=""><input type="checkbox" name="puppr" class="role"  value="1" <?php if($row['puppr']==1){ echo'checked';}?>>  Periodic Purchase Record</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[37][id]" value="37" readonly=""><input type="checkbox" name="puo" class="role"  value="1" <?php if($row['puo']==1){ echo'checked';}?>>  Overview</a></li>    
</ul>
</li>

<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-puzzle-piece" aria-hidden="true"></i>  Receivables</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[38][id]" value="38" readonly=""><input type="checkbox" name="recl" class="role"  value="1" <?php if($row['recl']==1){ echo'checked';}?>>  Customer List</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[39][id]" value="39" readonly=""><input type="checkbox" name="resl" class="role"  value="1" <?php if($row['resl']==1){ echo'checked';}?>>  Customer Balance</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[40][id]" value="40" readonly=""><input type="checkbox" name="recst" class="role"  value="1" <?php if($row['recst']==1){ echo'checked';}?>>  Customer Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[41][id]" value="41" readonly=""><input type="checkbox" name="recstit" class="role"  value="1" <?php if($row['recstit']==1){ echo'checked';}?>>  Customer Statement (Item)</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[42][id]" value="42" readonly=""><input type="checkbox" name="recdc" class="role"  value="1" <?php if($row['recdc']==1){ echo'checked';}?>>  Customer Due Collection</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[43][id]" value="43" readonly=""><input type="checkbox" name="reco" class="role"  value="1" <?php if($row['reco']==1){ echo'checked';}?>>  Customer Overview</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[44][id]" value="44" readonly=""><input type="checkbox" name="reo" class="role"  value="1" <?php if($row['reo']==1){ echo'checked';}?>>  Overview</a></li>    
</ul>
</li>

<li class="smenu-treeview">
<a href="#" class="smenu-title"><i class="fa fa-sticky-note" aria-hidden="true"></i>  Voucher</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[45][id]" value="45" readonly=""><input type="checkbox" name="vop" class="role"  value="1" <?php if($row['vop']==1){ echo'checked';}?>>  Payment</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[46][id]" value="46" readonly=""><input type="checkbox" name="vor" class="role"  value="1" <?php if($row['vor']==1){ echo'checked';}?>>  Receipt</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[47][id]" value="47" readonly=""><input type="checkbox" name="voj" class="role"  value="1" <?php if($row['voj']==1){ echo'checked';}?>>  Journal</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[48][id]" value="48" readonly=""><input type="checkbox" name="voprst" class="role"  value="1" <?php if($row['voprst']==1){ echo'checked';}?>>  Payment &amp; Receipt Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[49][id]" value="49" readonly=""><input type="checkbox" name="voit" class="role"  value="1" <?php if($row['voit']==1){ echo'checked';}?>>  Internal Transaction</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[50][id]" value="50" readonly=""><input type="checkbox" name="voo" class="role"  value="1" <?php if($row['voo']==1){ echo'checked';}?>>  Overview</a></li>    
</ul>
</li>
</ul>
</div>
<div class="col-md-4">
<ul class="smenu">
    
<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-exchange" aria-hidden="true"></i>  Inventory</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[51][id]" value="51" readonly=""><input type="checkbox" name="inpl" class="role"  value="1" <?php if($row['inpl']==1){ echo'checked';}?>>   Product List</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[52][id]" value="52" readonly=""><input type="checkbox" name="insr" class="role"  value="1" <?php if($row['insr']==1){ echo'checked';}?>>   Serial Record</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[53][id]" value="53" readonly=""><input type="checkbox" name="inis" class="role"  value="1" <?php if($row['inis']==1){ echo'checked';}?>>  Inventory Summary</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[54][id]" value="54" readonly=""><input type="checkbox" name="inpic" class="role"  value="1" <?php if($row['inpic']==1){ echo'checked';}?>>  Periodic Inventory Summary</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[55][id]" value="55" readonly=""><input type="checkbox" name="iniv" class="role"  value="1" <?php if($row['iniv']==1){ echo'checked';}?>>  Inventory Valuation</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[56][id]" value="56" readonly=""><input type="checkbox" name="inpiv" class="role"  value="1" <?php if($row['inpiv']==1){ echo'checked';}?>>  Periodic Inventory Valuation</a></li>
<!-- <li><a href="#"><input type="hidden" maxlength="3" name="data[57][id]" value="57" readonly=""><input type="checkbox" name="data[57][read]" class="role"  value="1" >  Disposal Inventory &amp; Valuation</a></li>     -->
<li><a href="#"><input type="hidden" maxlength="3" name="data[58][id]" value="58" readonly=""><input type="checkbox" name="invo" class="role"  value="1" <?php if($row['invo']==1){ echo'checked';}?>>  Overview</a></li>    
</ul>
</li>

<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-puzzle-piece" aria-hidden="true"></i> Payables</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[59][id]" value="59" readonly=""><input type="checkbox" name="pasl" class="role"  value="1" <?php if($row['pasl']==1){ echo'checked';}?>>   Supplier List</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[60][id]" value="60" readonly=""><input type="checkbox" name="pasb" class="role"  value="1" <?php if($row['pasb']==1){ echo'checked';}?>>  Supplier Balance</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[61][id]" value="61" readonly=""><input type="checkbox" name="pass" class="role"  value="1" <?php if($row['pass']==1){ echo'checked';}?>>  Supplier Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[62][id]" value="62" readonly=""><input type="checkbox" name="passi" class="role"  value="1" <?php if($row['passi']==1){ echo'checked';}?>>  Supplier Statement (Item)</a></li>
<!-- <li><a href="#"><input type="hidden" maxlength="3" name="data[63][id]" value="63" readonly=""><input type="checkbox" name="data[63][read]" class="role"  value="1" >  Purchase &amp; Sold (Supplier Wise)</a></li>     -->
<li><a href="#"><input type="hidden" maxlength="3" name="data[64][id]" value="64" readonly=""><input type="checkbox" name="pao" class="role"  value="1" <?php if($row['pao']==1){ echo'checked';}?>>  Overview</a></li>    
</ul>
</li>    

<li class="smenu-treeview">
<a href="#" class="smenu-title"><i class="fa fa-sticky-note" aria-hidden="true"></i>  Payroll</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[65][id]" value="65" readonly=""><input type="checkbox" name="prel" class="role"  value="1" <?php if($row['prel']==1){ echo'checked';}?>>  Employee List</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[66][id]" value="66" readonly=""><input type="checkbox" name="pra" class="role"  value="1" <?php if($row['pra']==1){ echo'checked';}?>>  Attendance</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[67][id]" value="67" readonly=""><input type="checkbox" name="prla" class="role"  value="1" <?php if($row['prla']==1){ echo'checked';}?>>  Leave Record</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[68][id]" value="68" readonly=""><input type="checkbox" name="prsr" class="role"  value="1" <?php if($row['prsr']==1){ echo'checked';}?>>  Salary Report</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[69][id]" value="69" readonly=""><input type="checkbox" name="prcr" class="role"  value="1" <?php if($row['prcr']==1){ echo'checked';}?>>  Commission Report</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[70][id]" value="70" readonly=""><input type="checkbox" name="pro" class="role"  value="1" <?php if($row['pro']==1){ echo'checked';}?>>  Overview</a></li>    
</ul>
</li>
</ul>
</div>
<div class="col-md-12 form-group text-right">
<input type="reset" id="reset_rprole" class="btn btn-flat bg-red btn-sm" value="Reset">
<input type="submit" name="save_rprole" id="save_rprole" class="btn btn-flat bg-purple btn-sm" value="Save">    
</div>    
</div>
</form>    
</div>

<?php     
    }else{
    
?>

<div class="box-body">    
<form action="rou_reprolecreate.php" onsubmit="return validate()" enctype="multipart/form-data" method="post" accept-charset="utf-8" id="formId_0068942179912190161635615690995">    
<div class="row">
    <div class="col-md-12 form-group">
        <div style="width: 250px" class="input-group pull-left">
            <div class="input-group-addon">Role</div>
            <input type="text" class="form-control" value="<?php echo $accessname;?>" > 
            <input type="hidden" class="form-control" name="access" value="<?php echo $access;?>" >  
        </div>
        <div style="width: 200px" class="input-group pull-right">
            <div class="input-group-addon"><i class="fa fa-search"></i></div>
            <input type="text" class="form-control search_text" placeholder="Search.." onkeyup="search_text()">
        </div>
    </div>
<div class="col-md-4">
<ul class="smenu">
<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-exchange" aria-hidden="true"></i>  Daily Report</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[1][id]" value="1" readonly=""><input type="checkbox" name="drp" class="role" value="1" >   Purchase</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[2][id]" value="2" readonly=""><input type="checkbox" name="drs" class="role" value="1">  Sales</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[3][id]" value="3" readonly=""><input type="checkbox" name="dre" class="role" value="1">  Expenses</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[4][id]" value="4" readonly=""><input type="checkbox" name="dred" class="role" value="1">  Expenses Details</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[5][id]" value="5" readonly=""><input type="checkbox" name="drdcs" class="role" value="1">  Daily Cash Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[6][id]" value="6" readonly=""><input type="checkbox" name="drplin" class="role" value="1">  Profit &amp; Loss (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[7][id]" value="7" readonly=""><input type="checkbox" name="drplit" class="role" value="1">  Profit &amp; Loss (Item)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[8][id]" value="8" readonly=""><input type="checkbox" name="dro" class="role" value="1">  Overview</a></li>    
</ul>
</li>

<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-puzzle-piece" aria-hidden="true"></i>  Sales (Product)</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[9][id]" value="9" readonly=""><input type="checkbox" name="sarin" class="role" value="1">   Sales Record (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[10][id]" value="10" readonly=""><input type="checkbox" name="sarrin" class="role" value="1">  Return Reord (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[11][id]" value="11" readonly=""><input type="checkbox" name="sacw" class="role" value="1">  Customer Wise (Invoce)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[12][id]" value="12" readonly=""><input type="checkbox" name="sait" class="role" value="1">  Item Wise</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[13][id]" value="13" readonly=""><input type="checkbox" name="saitst" class="role" value="1">  Item Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[14][id]" value="14" readonly=""><input type="checkbox" name="sapsr" class="role" value="1">   Periodic Sales Record</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[15][id]" value="15" readonly=""><input type="checkbox" name="sao" class="role" value="1">  Overview</a></li>    
</ul>
</li>

<!-- <li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-puzzle-piece" aria-hidden="true"></i>  Sales (Service)</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[16][id]" value="16" readonly=""><input type="checkbox" name="data[16][read]" class="role" value="1">   Sales Record (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[17][id]" value="17" readonly=""><input type="checkbox" name="data[17][read]" class="role" value="1">  Customer Wise (Invoce)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[18][id]" value="18" readonly=""><input type="checkbox" name="data[18][read]" class="role" value="1">  Item Wise</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[19][id]" value="19" readonly=""><input type="checkbox" name="data[19][read]" class="role" value="1">  Item Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[20][id]" value="20" readonly=""><input type="checkbox" name="data[20][read]" class="role" value="1">   Periodic Sales Record</a></li>   
<li><a href="#"><input type="hidden" maxlength="3" name="data[21][id]" value="21" readonly=""><input type="checkbox" name="data[21][read]" class="role" value="1">  Overview</a></li>    
</ul>
</li>     -->
    
<li class="smenu-treeview">
<a href="#" class="smenu-title"><i class="fa fa-sticky-note" aria-hidden="true"></i>  Account</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[22][id]" value="22" readonly=""><input type="checkbox" name="aclst" class="role" value="1">  Ledger Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[23][id]" value="23" readonly=""><input type="checkbox" name="accst" class="role" value="1">  Cash Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[24][id]" value="24" readonly=""><input type="checkbox" name="acbst" class="role" value="1">  Bank Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[25][id]" value="25" readonly=""><input type="checkbox" name="acmst" class="role" value="1">  Mobile Statement</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[26][id]" value="26" readonly=""><input type="checkbox" name="acjh" class="role" value="1">  Journal History</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[27][id]" value="27" readonly=""><input type="checkbox" name="actb" class="role" value="1">  Trial Balance</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[28][id]" value="28" readonly=""><input type="checkbox" name="acbs" class="role" value="1">  Balance Sheet</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[29][id]" value="29" readonly=""><input type="checkbox" name="acpl" class="role" value="1">  Profit &amp; Loss</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[30][id]" value="30" readonly=""><input type="checkbox" name="aco" class="role" value="1">  Overview</a></li>    
</ul>
</li>
</ul>
</div>
    
<div class="col-md-4">
<ul class="smenu">
<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-exchange" aria-hidden="true"></i>  Purchase</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[31][id]" value="31" readonly=""><input type="checkbox" name="puriv" class="role" value="1">   Purchase Record (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[32][id]" value="32" readonly=""><input type="checkbox" name="purrin" class="role" value="1">   Retrun Record (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[33][id]" value="33" readonly=""><input type="checkbox" name="pusw" class="role" value="1">  Supplier Wise (Invoice)</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[34][id]" value="34" readonly=""><input type="checkbox" name="puit" class="role" value="1">  Item Wise</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[35][id]" value="35" readonly=""><input type="checkbox" name="puitst" class="role" value="1">  Item Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[36][id]" value="36" readonly=""><input type="checkbox" name="puppr" class="role" value="1">  Periodic Purchase Record</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[37][id]" value="37" readonly=""><input type="checkbox" name="puo" class="role" value="1">  Overview</a></li>    
</ul>
</li>

<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-puzzle-piece" aria-hidden="true"></i>  Receivables</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[38][id]" value="38" readonly=""><input type="checkbox" name="recl" class="role" value="1">  Customer List</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[39][id]" value="39" readonly=""><input type="checkbox" name="resl" class="role" value="1">  Customer Balance</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[40][id]" value="40" readonly=""><input type="checkbox" name="recst" class="role" value="1">  Customer Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[41][id]" value="41" readonly=""><input type="checkbox" name="recstit" class="role" value="1">  Customer Statement (Item)</a></li>    
<li><a href="#"><input type="hidden" maxlength="3" name="data[42][id]" value="42" readonly=""><input type="checkbox" name="recdc" class="role" value="1">  Customer Due Collection</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[43][id]" value="43" readonly=""><input type="checkbox" name="reco" class="role" value="1">  Customer Overview</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[44][id]" value="44" readonly=""><input type="checkbox" name="reo" class="role" value="1">  Overview</a></li>    
</ul>
</li>

<li class="smenu-treeview">
<a href="#" class="smenu-title"><i class="fa fa-sticky-note" aria-hidden="true"></i>  Voucher</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[45][id]" value="45" readonly=""><input type="checkbox" name="vop" class="role" value="1">  Payment</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[46][id]" value="46" readonly=""><input type="checkbox" name="vor" class="role" value="1">  Receipt</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[47][id]" value="47" readonly=""><input type="checkbox" name="voj" class="role" value="1">  Journal</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[48][id]" value="48" readonly=""><input type="checkbox" name="voprst" class="role" value="1">  Payment &amp; Receipt Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[49][id]" value="49" readonly=""><input type="checkbox" name="voit" class="role" value="1">  Internal Transaction</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[50][id]" value="50" readonly=""><input type="checkbox" name="voo" class="role" value="1">  Overview</a></li>    
</ul>
</li>
</ul>
</div>
<div class="col-md-4">
<ul class="smenu">
    
<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-exchange" aria-hidden="true"></i>  Inventory</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[51][id]" value="51" readonly=""><input type="checkbox" name="inpl" class="role" value="1">   Product List</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[52][id]" value="52" readonly=""><input type="checkbox" name="insr" class="role" value="1">   Serial Record</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[53][id]" value="53" readonly=""><input type="checkbox" name="inis" class="role" value="1">  Inventory Summary</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[54][id]" value="54" readonly=""><input type="checkbox" name="inpic" class="role" value="1">  Periodic Inventory Summary</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[55][id]" value="55" readonly=""><input type="checkbox" name="iniv" class="role" value="1">  Inventory Valuation</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[56][id]" value="56" readonly=""><input type="checkbox" name="inpiv" class="role" value="1">  Periodic Inventory Valuation</a></li>
<!-- <li><a href="#"><input type="hidden" maxlength="3" name="data[57][id]" value="57" readonly=""><input type="checkbox" name="data[57][read]" class="role" value="1">  Disposal Inventory &amp; Valuation</a></li>     -->
<li><a href="#"><input type="hidden" maxlength="3" name="data[58][id]" value="58" readonly=""><input type="checkbox" name="invo" class="role" value="1">  Overview</a></li>    
</ul>
</li>

<li class="smenu-treeview"><a href="#" class="smenu-title"><i class="fa fa-puzzle-piece" aria-hidden="true"></i> Payables</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[59][id]" value="59" readonly=""><input type="checkbox" name="pasl" class="role" value="1">   Supplier List</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[60][id]" value="60" readonly=""><input type="checkbox" name="pasb" class="role" value="1">  Supplier Balance</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[61][id]" value="61" readonly=""><input type="checkbox" name="pass" class="role" value="1">  Supplier Statement</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[62][id]" value="62" readonly=""><input type="checkbox" name="passi" class="role" value="1">  Supplier Statement (Item)</a></li>
<!-- <li><a href="#"><input type="hidden" maxlength="3" name="data[63][id]" value="63" readonly=""><input type="checkbox" name="data[63][read]" class="role" value="1">  Purchase &amp; Sold (Supplier Wise)</a></li>     -->
<li><a href="#"><input type="hidden" maxlength="3" name="data[64][id]" value="64" readonly=""><input type="checkbox" name="pao" class="role" value="1">  Overview</a></li>    
</ul>
</li>    

<li class="smenu-treeview">
<a href="#" class="smenu-title"><i class="fa fa-sticky-note" aria-hidden="true"></i>  Payroll</a>
<ul class="smenu-treeview-menu">
<li><a href="#"><input type="hidden" maxlength="3" name="data[65][id]" value="65" readonly=""><input type="checkbox" name="prel" class="role" value="1">  Employee List</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[66][id]" value="66" readonly=""><input type="checkbox" name="pra" class="role" value="1">  Attendance</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[67][id]" value="67" readonly=""><input type="checkbox" name="prla" class="role" value="1">  Leave Record</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[68][id]" value="68" readonly=""><input type="checkbox" name="prsr" class="role" value="1">  Salary Report</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[69][id]" value="69" readonly=""><input type="checkbox" name="prcr" class="role" value="1">  Commission Report</a></li>
<li><a href="#"><input type="hidden" maxlength="3" name="data[70][id]" value="70" readonly=""><input type="checkbox" name="pro" class="role" value="1">  Overview</a></li>    
</ul>
</li>
</ul>
</div>
<div class="col-md-12 form-group text-right">
<input type="reset" id="reset_rprole" class="btn btn-flat bg-red btn-sm" value="Reset">
<input type="submit" name="save_rprole" id="save_rprole" class="btn btn-flat bg-purple btn-sm" value="Save">    
</div>    
</div>
</form>    
</div>

<?php } }else{ ?>

    <div class="box-body">
    <?php echo display_msg();?>     
    <form action="rou_reprolecreate.php" onsubmit="return validate()" enctype="multipart/form-data" method="post" accept-charset="utf-8" id="formId_0068942179912190161635615690995">    
        <div class="row">
            <div class="col-md-6 form-group">
                <div  class="input-group pull-left">
                    <div class="input-group-addon">Role</div>
                    <select class="form-control" name="access" id="access">  
                    <option value="">-Select-</option>   
                    <?php									
                    $queryd=mysqli_query($con,"SELECT * FROM tbl_usergroup Where id!=1 ORDER BY id ASC")or die(mysqli_error($con));
                    while ($rowd=mysqli_fetch_array($queryd)){
                    ?>
                    <option value="<?php echo $rowd['id'];?>"><?php echo $rowd['name'];?></option>
                    <?php } ?>   
                    </select>     
                </div>
            </div>
            <div class="col-md-6 form-group text-left">
            <input type="submit" name="save_submit" id="save_submit" class="btn btn-flat bg-purple btn-sm" value="Submit">    
            </div> 
        </div>
    </form>
</div>
</div>
</div>
</div> 


<?php 
} ?>

</div>
</div>
</div>  
 
<?php include('../layout/quick.php');?>    
</section>
<!-- /.main content -->    
</div>

<?php 
include('../layout/footer.php');
?>

<!-- page script -->
<script type="text/javascript">
$(document).ready(function () {  
var rprole = new LiveValidation('rprole');
rprole.add(Validate.Presence);
});
    
$(document).on('change', '.role', function () {
if ($(this).is(":checked")){
$(this).val('1');
}else{
$(this).val("0");	
}    
});
    
$(document).on('change', '.access', function() {
ids = $(this).attr('id');    
if (this.checked){
$('#e'+ids).fadeIn('slow');   
}else{
$('#e'+ids).fadeOut('slow');    
}	
});
    
function search_text() {
var term = $(".search_text").val();
$('.smenu-treeview-menu a').each(function () {
var str = $(this).text().toLowerCase();
if (term.trim() && str.indexOf(term) >= 0) {
$(this).css("background-color", "yellow");
} else {
$(this).css("background-color", "transparent");
}
});
}    
</script>    
<!-- /page script -->

</html>    