<?php session_start();
include ('../inc/dbcon.php');
include ('../inc/functions.php');
if(isset($_SESSION["axeslogin"]) && $_SESSION["axeslogin"] == true){
get_pagesecurity('44','edits','R');     
$_SESSION['cuPages']='rou_rolelist.php';   
$cuPage='rou_rolelist.php';    
$aid=$_SESSION['uid'];
$brid=$_SESSION['abrid'];    
$uty=$_SESSION['utype'];     
}else{
header('Location:../index.php');
exit;    
}
$mhead='user';
$menuh='User &amp; Role';
$phead='rollist';
$page='User Role Edit';
$dtnow = date("Y-m-d h:i:s", time());
?>
<?php
include('../layout/head.php');
include('../layout/header.php');
include('../layout/side_nav.php');
?>
<?php 
if(isset($_POST['role_update'])){
$rid = remove_junk(escape($_POST['rid']));    
$name =remove_junk(escape($_POST['name']));     
$description =remove_junk(escape($_POST['description']));
$status =remove_junk(escape($_POST['status']));


$daily =remove_junk(escape($_POST['daily']));
$purchase =remove_junk(escape($_POST['purchase']));
$sales =remove_junk(escape($_POST['sales']));
$service =remove_junk(escape($_POST['service']));
$warranty =remove_junk(escape($_POST['warranty']));
$inventory =remove_junk(escape($_POST['inventory']));
$operation =remove_junk(escape($_POST['operation']));
$client =remove_junk(escape($_POST['client']));

$product =remove_junk(escape($_POST['product']));
$master =remove_junk(escape($_POST['master']));
$account =remove_junk(escape($_POST['account']));
$financial =remove_junk(escape($_POST['financial']));
$payrol =remove_junk(escape($_POST['payrol']));
$bank =remove_junk(escape($_POST['bank']));
$user =remove_junk(escape($_POST['user']));
$report =remove_junk(escape($_POST['report']));

if(isset($_POST['name'])){
$ducode = mysqli_query($con,"SELECT * FROM tbl_usergroup WHERE name = '$name' AND id!='$rid'");
}    
if($ducode->num_rows > 0) {
save_msg('w','Role name alrady used! Plz try another');
echo "<script>window.location='rou_rolelist.php'</script>";
}else{
    
$sql="UPDATE tbl_usergroup SET name='$name',description='$description',status='$status' WHERE id='$rid'";    
$result = mysqli_query($con,$sql) or die(mysqli_error($con));

$sql="UPDATE tbl_usermodule SET daily='$daily',purchase='$purchase',sales='$sales',service='$service',warranty='$warranty',
operation='$operation',client='$client',product='$product',master='$master',account='$account',financial='$financial',payrol='$payrol',bank='$bank',user='$user',report='$report' WHERE seid='$rid'";    
$result = mysqli_query($con,$sql) or die(mysqli_error($con));
    
if(isset($_POST['data']) && !empty($_POST['data'])){
$settings=$_POST['data'];
foreach($settings as $setup){
$pageid=remove_junk(escape($setup['id']));
if(!isset($setup['read'])){
$views=0;    
}else{
$views=remove_junk(escape($setup['read']));    
}
if(!isset($setup['write'])){
$creates=0;    
}else{
$creates=remove_junk(escape($setup['write']));    
}
if(!isset($setup['edit'])){
$edits=0;    
}else{
$edits=remove_junk(escape($setup['edit']));     
}
if(!isset($setup['delete'])){
$deletes=0;   
}else{
$deletes=remove_junk(escape($setup['delete']));    
}
if(!isset($setup['print'])){
$prints=0;    
}else{
$prints=remove_junk(escape($setup['print']));     
}    	
$section=remove_junk(escape($setup['sec']));
$sql="UPDATE tbl_userpermision SET views='$views',creates='$creates',edits='$edits',deletes='$deletes',prints='$prints' WHERE seid='$rid' AND pageid='$pageid'";
$result = mysqli_query($con,$sql) or die(mysqli_error($con));  
}
}
$act =remove_junk(escape('Role name: '.$name));    
write_activity($aid,'ROL','Role has been updated',$act);     
save_msg('s','Role Setting Successfully Update!');	
echo "<script>window.location='rou_rolelist.php'</script>";    
}
}
?>
<div class="content-wrapper">
<?php include('../layout/page_head.php'); ?>
<!-- Main content -->
<section class="content">

<div class="row">
<div class="col-md-8">
<div class="box box-solid">
<div class="box-header with-border">
<h3 class="box-title">Assigned Role Edit</h3>
</div>
<div class="box-body">
<?php echo display_msg();?>  
<form action="rou_roleedit.php" onsubmit="return validate()" enctype="multipart/form-data" method="post" accept-charset="utf-8">
<div class="col-md-12 popup_details_div">

<div class="row">
<div class="col-md-12">
<div class="col-md-1"></div>
<div class="col-md-5">
<?php 
if(isset($_POST['editrol'])){
$ids = $_POST['editrol'];
$sql="SELECT * FROM tbl_usergroup WHERE id='".$ids."' ORDER BY id ASC LIMIT 1";    
$admin=mysqli_query($con,$sql) or die(mysqli_error($con));    
while ($adm=mysqli_fetch_array($admin)){    
?>      
<div class="form-group">
<label>Name</label>
<input type="text" name="name" maxlength="25" value="<?php echo $adm['name'];?>" id="pname" class="form-control" placeholder="Role Name"  />
<input type="hidden" maxlength="11" value="<?php echo $adm['id'];?>" class="form-control" name="rid" autocomplete="off" readonly>    
</div>
<div class="form-group" >
<label>Status</label>  
<select class="form-control" name="status" id="status">
<option <?php if($adm['status']==1){echo 'selected';}?> value="1">Active</option>
<option <?php if($adm['status']==0){echo 'selected';}?> value="0">De-Active</option>
</select>    
</div>    
<div class="form-group">
<label>Description</label>
<textarea class="form-control" maxlength="150" rows="6" name="description" placeholder="Description"><?php echo $adm['description'];?></textarea>
</div>
<?php }} ?>    
</div>
<?php 
$sql="SELECT * FROM tbl_usermodule WHERE seid='$ids' ORDER BY id ASC LIMIT 1";    
$querym=mysqli_query($con,$sql) or die(mysqli_error($con));  
$rowm=mysqli_fetch_array($querym);
?>
<div class="col-md-5">
<div class="form-group">
<label>Module Access</label>    
<ul class="list-group">
<li class="list-groups-item">
Daily Process
<div class="material-switch pull-right">
<input id="daily" name="daily" type="checkbox" class="access" <?php if($rowm['daily']==1){echo 'checked=""';}?> value="<?php echo $rowm['daily']; ?>">
<label for="daily" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Purchase
<div class="material-switch pull-right">
<input id="purchase"  name="purchase" type="checkbox"  class="access" <?php if($rowm['purchase']==1){echo 'checked=""';}?> value="<?php echo $rowm['purchase']; ?>">
<label for="purchase" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Sales
<div class="material-switch pull-right">
<input id="sales" name="sales" type="checkbox"  class="access" <?php if($rowm['sales']==1){echo 'checked=""';}?> value="<?php echo $rowm['sales']; ?>">
<label for="sales" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Service
<div class="material-switch pull-right">
<input id="service" name="service" type="checkbox"  class="access" <?php if($rowm['service']==1){echo 'checked=""';}?> value="<?php echo $rowm['service']; ?>">
<label for="service" class="label-success"></label>
</div>
</li>

<li class="list-groups-item">
Inventory
<div class="material-switch pull-right">
<input id="inventory" name="inventory" type="checkbox"  class="access" <?php if($rowm['inventory']==1){echo 'checked=""';}?> value="<?php echo $rowm['inventory']; ?>">
<label for="inventory" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Operation Process
<div class="material-switch pull-right">
<input id="operation" name="operation" type="checkbox"  class="access" <?php if($rowm['operation']==1){echo 'checked=""';}?> value="<?php echo $rowm['operation']; ?>">
<label for="operation" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Client
<div class="material-switch pull-right">
<input id="client" name="client" type="checkbox"  class="access" <?php if($rowm['client']==1){echo 'checked=""';}?> value="<?php echo $rowm['client']; ?>">
<label for="client" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Product
<div class="material-switch pull-right">
<input id="product" name="product" type="checkbox"  class="access" <?php if($rowm['product']==1){echo 'checked=""';}?> value="1">
<label for="product" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Master
<div class="material-switch pull-right">
<input id="master" name="master" type="checkbox"  class="access" <?php if($rowm['master']==1){echo 'checked=""';}?> value="1>">
<label for="master" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Accounts
<div class="material-switch pull-right">
<input id="account" name="account" type="checkbox"  class="access" <?php if($rowm['account']==1){echo 'checked=""';}?> value="1">
<label for="account" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Financials
<div class="material-switch pull-right">
<input id="financial" name="financial" type="checkbox"  class="access" <?php if($rowm['financial']==1){echo 'checked=""';}?> value="1">
<label for="financial" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Payroll
<div class="material-switch pull-right">
<input id="payrol" name="payrol" type="checkbox"  class="access" <?php if($rowm['payrol']==1){echo 'checked=""';}?> value="1">
<label for="payrol" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Bank
<div class="material-switch pull-right">
<input id="bank" name="bank" type="checkbox"  class="access" <?php if($rowm['bank']==1){echo 'checked=""';}?> value="1">
<label for="bank" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
User &amp; Role
<div class="material-switch pull-right">
<input id="user" name="user" type="checkbox"  class="access" <?php if($rowm['user']==1){echo 'checked=""';}?> value="1">
<label for="user" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Report
<div class="material-switch pull-right">
<input id="report" name="report" type="checkbox"  class="access" <?php if($rowm['report']==1){echo 'checked=""';}?> value="1">
<label for="report" class="label-success"></label>
</div>
</li>
<li class="list-groups-item">
Warranty Management
<div class="material-switch pull-right">
<input id="warranty" name="warranty" type="checkbox"  class="access" <?php if($rowm['warranty']==1){echo 'checked=""';}?> value="1">
<label for="warranty" class="label-success"></label>
</div>
</li> 
</ul>    
</div>
</div>    
<div class="col-md-1"></div>    
</div>    
</div>    

<div class="row" id="edaily">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Daily Process</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Price List
<input type="hidden" maxlength="11" name="data[2][id]" value="2" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[2][sec]" value="daily" class="form-control" autocomplete="off">    
</td>
<td class="text-center">
<input type="checkbox"  name="data[2][read]" class="role" <?php if(get_pageval($ids,'2','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'2','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[2][write]" class="role" <?php if(get_pageval($ids,'2','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'2','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[2][edit]" class="role" <?php if(get_pageval($ids,'2','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'2','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[2][delete]" class="role" <?php if(get_pageval($ids,'2','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'2','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[2][print]" class="role" <?php if(get_pageval($ids,'2','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'2','prints'); ?>">
</td>
</tr>
<tr>
<td>Expenses Record
<input type="hidden" maxlength="11" name="data[3][id]" value="3" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[3][sec]" value="daily" class="form-control" autocomplete="off"> 
</td>
<td class="text-center">
<input type="checkbox"  name="data[3][read]" class="role" <?php if(get_pageval($ids,'3','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'3','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[3][write]" class="role" <?php if(get_pageval($ids,'3','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'3','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[3][edit]" class="role" <?php if(get_pageval($ids,'3','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'3','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[3][delete]" class="role" <?php if(get_pageval($ids,'3','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'3','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[3][print]" class="role" <?php if(get_pageval($ids,'3','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'3','prints'); ?>">
</td>
</tr>
<tr>
<td>Expenses Head
<input type="hidden" maxlength="11" name="data[4][id]" value="4" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[4][sec]" value="daily" class="form-control" autocomplete="off"> 
</td>
<td class="text-center">
<input type="checkbox"  name="data[4][read]" class="role" <?php if(get_pageval($ids,'4','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'4','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[4][write]" class="role" <?php if(get_pageval($ids,'4','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'4','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[4][edit]" class="role" <?php if(get_pageval($ids,'4','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'4','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[4][delete]" class="role" <?php if(get_pageval($ids,'4','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'4','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[4][print]" class="role" <?php if(get_pageval($ids,'4','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'4','prints'); ?>">
</td>
</tr>
</tbody>
</table>        
</div>
</div>
    
<div class="row" id="eoperation">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Operation Process</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Proforma Invoice (PI)
<input type="hidden" maxlength="11" name="data[5][id]" value="5" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[5][sec]" value="operation" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[5][read]" class="role" <?php if(get_pageval($ids,'5','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'5','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[5][write]" class="role" <?php if(get_pageval($ids,'5','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'5','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[5][edit]" class="role" <?php if(get_pageval($ids,'5','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'5','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[5][delete]" class="role" <?php if(get_pageval($ids,'5','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'5','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[5][print]" class="role" <?php if(get_pageval($ids,'5','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'5','prints'); ?>">
</td>
</tr>
<tr>
<td>Letter of Credit (LC)
<input type="hidden" maxlength="11" name="data[6][id]" value="6" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[6][sec]" value="operation" class="form-control" autocomplete="off"> 
</td>
<td class="text-center">
<input type="checkbox"  name="data[6][read]" class="role" <?php if(get_pageval($ids,'6','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'6','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[6][write]" class="role" <?php if(get_pageval($ids,'6','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'6','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[6][edit]" class="role" <?php if(get_pageval($ids,'6','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'6','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[6][delete]" class="role" <?php if(get_pageval($ids,'6','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'6','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[6][print]" class="role" <?php if(get_pageval($ids,'6','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'6','prints'); ?>">
</td>
</tr>
<tr>
<td>Invoice
<input type="hidden" maxlength="11" name="data[7][id]" value="7" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[7][sec]" value="operation" class="form-control" autocomplete="off"> 
</td>
<td class="text-center">
<input type="checkbox"  name="data[7][read]" class="role" <?php if(get_pageval($ids,'7','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'7','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[7][write]" class="role" <?php if(get_pageval($ids,'7','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'7','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[7][edit]" class="role" <?php if(get_pageval($ids,'7','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'7','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[7][delete]" class="role" <?php if(get_pageval($ids,'7','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'7','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[7][print]" class="role" <?php if(get_pageval($ids,'7','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'7','prints'); ?>">
</td>
</tr>
<tr>
<td>Delivery Record
<input type="hidden" maxlength="11" name="data[8][id]" value="8" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[8][sec]" value="operation" class="form-control" autocomplete="off"> 
</td>
<td class="text-center">
<input type="checkbox"  name="data[8][read]" class="role" <?php if(get_pageval($ids,'8','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'8','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[8][write]" class="role" <?php if(get_pageval($ids,'8','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'8','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[8][edit]" class="role" <?php if(get_pageval($ids,'8','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'8','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[8][delete]" class="role" <?php if(get_pageval($ids,'8','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'8','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[8][print]" class="role" <?php if(get_pageval($ids,'8','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'8','prints'); ?>">
</td>
</tr>    
</tbody>
</table>        
</div>
</div>    

<div class="row" id="eclient">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Client</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Customer
<input type="hidden" maxlength="11" name="data[9][id]" value="9" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[9][sec]" value="client" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[9][read]" class="role" <?php if(get_pageval($ids,'9','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'9','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[9][write]" class="role" <?php if(get_pageval($ids,'9','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'9','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[9][edit]" class="role" <?php if(get_pageval($ids,'9','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'9','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[9][delete]" class="role" <?php if(get_pageval($ids,'9','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'9','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[9][print]" class="role" <?php if(get_pageval($ids,'9','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'9','prints'); ?>">
</td>
</tr>
<tr>
<td>Supplier
<input type="hidden" maxlength="11" name="data[10][id]" value="10" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[10][sec]" value="client" class="form-control" autocomplete="off"> 
</td>
<td class="text-center">
<input type="checkbox"  name="data[10][read]" class="role" <?php if(get_pageval($ids,'10','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'10','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[10][write]" class="role" <?php if(get_pageval($ids,'10','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'10','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[10][edit]" class="role" <?php if(get_pageval($ids,'10','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'10','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[10][delete]" class="role" <?php if(get_pageval($ids,'10','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'10','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[10][print]" class="role" <?php if(get_pageval($ids,'10','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'10','prints'); ?>">
</td>
</tr>
</tbody>
</table>        
</div>
</div>    
    
<div class="row" id="eproduct">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Product</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Parent
<input type="hidden" maxlength="11" name="data[11][id]" value="11" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[11][sec]" value="product" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[11][read]" class="role" <?php if(get_pageval($ids,'11','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'11','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[11][write]" class="role" <?php if(get_pageval($ids,'11','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'11','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[11][edit]" class="role" <?php if(get_pageval($ids,'11','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'11','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[11][delete]" class="role" <?php if(get_pageval($ids,'11','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'11','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[11][print]" class="role" <?php if(get_pageval($ids,'11','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'11','prints'); ?>">
</td>
</tr>
<tr>
<td>Category
<input type="hidden" maxlength="11" name="data[12][id]" value="12" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[12][sec]" value="product" class="form-control" autocomplete="off"> 
</td>
<td class="text-center">
<input type="checkbox"  name="data[12][read]" class="role" <?php if(get_pageval($ids,'12','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'12','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[12][write]" class="role" <?php if(get_pageval($ids,'12','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'12','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[12][edit]" class="role" <?php if(get_pageval($ids,'12','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'12','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[12][delete]" class="role" <?php if(get_pageval($ids,'12','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'12','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[12][print]" class="role" <?php if(get_pageval($ids,'12','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'12','prints'); ?>">
</td>
</tr>
<tr>
<td>Sub-Category
<input type="hidden" maxlength="11" name="data[13][id]" value="13" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[13][sec]" value="product" class="form-control" autocomplete="off"> 
</td>
<td class="text-center">
<input type="checkbox"  name="data[13][read]" class="role" <?php if(get_pageval($ids,'13','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'13','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[13][write]" class="role" <?php if(get_pageval($ids,'13','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'13','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[13][edit]" class="role" <?php if(get_pageval($ids,'13','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'13','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[13][delete]" class="role" <?php if(get_pageval($ids,'13','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'13','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[13][print]" class="role" <?php if(get_pageval($ids,'13','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'13','prints'); ?>">
</td>
</tr>
<tr>
<td>Product
<input type="hidden" maxlength="11" name="data[14][id]" value="14" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[14][sec]" value="product" class="form-control" autocomplete="off"> 
</td>
<td class="text-center">
<input type="checkbox"  name="data[14][read]" class="role" <?php if(get_pageval($ids,'14','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'14','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[14][write]" class="role" <?php if(get_pageval($ids,'14','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'14','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[14][edit]" class="role" <?php if(get_pageval($ids,'14','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'14','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[14][delete]" class="role" <?php if(get_pageval($ids,'14','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'14','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[14][print]" class="role" <?php if(get_pageval($ids,'14','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'14','prints'); ?>">
</td>
</tr>
</tbody>
</table>        
</div>
</div>    

<div class="row" id="emaster">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Master</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Brand
<input type="hidden" maxlength="11" name="data[15][id]" value="15" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[15][sec]" value="master" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[15][read]" class="role" <?php if(get_pageval($ids,'15','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'15','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[15][write]" class="role" <?php if(get_pageval($ids,'15','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'15','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[15][edit]" class="role" <?php if(get_pageval($ids,'15','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'15','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[15][delete]" class="role" <?php if(get_pageval($ids,'15','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'15','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[15][print]" class="role" <?php if(get_pageval($ids,'15','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'15','prints'); ?>">
</td>
</tr>
<tr>
<td>Manufacturer
<input type="hidden" maxlength="11" name="data[16][id]" value="16" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[16][sec]" value="master" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[16][read]" class="role" <?php if(get_pageval($ids,'16','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'16','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[16][write]" class="role" <?php if(get_pageval($ids,'16','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'16','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[16][edit]" class="role" <?php if(get_pageval($ids,'16','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'16','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[16][delete]" class="role" <?php if(get_pageval($ids,'16','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'16','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[16][print]" class="role" <?php if(get_pageval($ids,'16','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'16','prints'); ?>">
</td>
</tr>
<tr>
<td>Unit
<input type="hidden" maxlength="11" name="data[17][id]" value="17" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[17][sec]" value="master" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[17][read]" class="role" <?php if(get_pageval($ids,'17','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'17','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[17][write]" class="role" <?php if(get_pageval($ids,'17','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'17','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[17][edit]" class="role" <?php if(get_pageval($ids,'17','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'17','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[17][delete]" class="role" <?php if(get_pageval($ids,'17','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'17','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[17][print]" class="role" <?php if(get_pageval($ids,'17','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'17','prints'); ?>">
</td>
</tr>
<tr>
<td>Currency
<input type="hidden" maxlength="11" name="data[18][id]" value="18" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[18][sec]" value="master" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[18][read]" class="role" <?php if(get_pageval($ids,'18','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'18','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[18][write]" class="role" <?php if(get_pageval($ids,'18','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'18','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[18][edit]" class="role" <?php if(get_pageval($ids,'18','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'18','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[18][delete]" class="role" <?php if(get_pageval($ids,'18','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'18','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[18][print]" class="role" <?php if(get_pageval($ids,'18','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'18','prints'); ?>">
</td>
</tr>
<tr>
<td>Country
<input type="hidden" maxlength="11" name="data[19][id]" value="19" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[19][sec]" value="master" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[19][read]" class="role" <?php if(get_pageval($ids,'19','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'19','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[19][write]" class="role" <?php if(get_pageval($ids,'19','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'19','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[19][edit]" class="role" <?php if(get_pageval($ids,'19','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'19','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[19][delete]" class="role" <?php if(get_pageval($ids,'19','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'19','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[19][print]" class="role" <?php if(get_pageval($ids,'19','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'19','prints'); ?>">
</td>
</tr>
<tr>
<td>Shipping
<input type="hidden" maxlength="11" name="data[20][id]" value="20" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[20][sec]" value="master" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[20][read]" class="role" <?php if(get_pageval($ids,'20','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'20','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[20][write]" class="role" <?php if(get_pageval($ids,'20','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'20','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[20][edit]" class="role" <?php if(get_pageval($ids,'20','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'20','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[20][delete]" class="role" <?php if(get_pageval($ids,'20','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'20','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[20][print]" class="role" <?php if(get_pageval($ids,'20','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'20','prints'); ?>">
</td>
</tr>
<tr>
<td>Color
<input type="hidden" maxlength="11" name="data[21][id]" value="21" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[21][sec]" value="master" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[21][read]" class="role" <?php if(get_pageval($ids,'21','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'21','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[21][write]" class="role" <?php if(get_pageval($ids,'21','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'21','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[21][edit]" class="role" <?php if(get_pageval($ids,'21','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'21','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[21][delete]" class="role" <?php if(get_pageval($ids,'21','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'21','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[21][print]" class="role" <?php if(get_pageval($ids,'21','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'21','prints'); ?>">
</td>
</tr>    
</tbody>
</table>        
</div>
</div>    

<div class="row" id="eaccount">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Accounts</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Class
<input type="hidden" maxlength="11" name="data[22][id]" value="22" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[22][sec]" value="account" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[22][read]" class="role" <?php if(get_pageval($ids,'22','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'22','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[22][write]" class="role" <?php if(get_pageval($ids,'22','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'22','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[22][edit]" class="role" <?php if(get_pageval($ids,'22','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'22','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[22][delete]" class="role" <?php if(get_pageval($ids,'22','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'22','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[22][print]" class="role" <?php if(get_pageval($ids,'22','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'22','prints'); ?>">
</td>
</tr>
<tr>
<td>Account Group
<input type="hidden" maxlength="11" name="data[23][id]" value="23" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[23][sec]" value="account" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[23][read]" class="role" <?php if(get_pageval($ids,'23','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'23','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[23][write]" class="role" <?php if(get_pageval($ids,'23','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'23','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[23][edit]" class="role" <?php if(get_pageval($ids,'23','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'23','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[23][delete]" class="role" <?php if(get_pageval($ids,'23','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'23','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[23][print]" class="role" <?php if(get_pageval($ids,'23','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'23','prints'); ?>">
</td>
</tr>
<tr>
<td>Account Sub-Group
<input type="hidden" maxlength="11" name="data[24][id]" value="24" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[24][sec]" value="account" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[24][read]" class="role" <?php if(get_pageval($ids,'24','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'24','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[24][write]" class="role" <?php if(get_pageval($ids,'24','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'24','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[24][edit]" class="role" <?php if(get_pageval($ids,'24','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'24','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[24][delete]" class="role" <?php if(get_pageval($ids,'24','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'24','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[24][print]" class="role" <?php if(get_pageval($ids,'24','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'24','prints'); ?>">
</td>
</tr>
<tr>
<td>Account Ledger
<input type="hidden" maxlength="11" name="data[25][id]" value="25" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[25][sec]" value="account" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[25][read]" class="role" <?php if(get_pageval($ids,'25','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'25','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[25][write]" class="role" <?php if(get_pageval($ids,'25','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'25','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[25][edit]" class="role" <?php if(get_pageval($ids,'25','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'25','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[25][delete]" class="role" <?php if(get_pageval($ids,'25','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'25','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[25][print]" class="role" <?php if(get_pageval($ids,'25','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'25','prints'); ?>">
</td>
</tr>
<tr>
<td>Payment Voucher
<input type="hidden" maxlength="11" name="data[26][id]" value="26" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[26][sec]" value="account" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[26][read]" class="role" <?php if(get_pageval($ids,'26','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'26','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[26][write]" class="role" <?php if(get_pageval($ids,'26','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'26','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[26][edit]" class="role" <?php if(get_pageval($ids,'26','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'26','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[26][delete]" class="role" <?php if(get_pageval($ids,'26','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'26','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[26][print]" class="role" <?php if(get_pageval($ids,'26','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'26','prints'); ?>">
</td>
</tr>
<tr>
<td>Received Voucher
<input type="hidden" maxlength="11" name="data[27][id]" value="27" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[27][sec]" value="account" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[27][read]" class="role" <?php if(get_pageval($ids,'27','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'27','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[27][write]" class="role" <?php if(get_pageval($ids,'27','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'27','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[27][edit]" class="role" <?php if(get_pageval($ids,'27','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'27','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[27][delete]" class="role" <?php if(get_pageval($ids,'27','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'27','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[27][print]" class="role" <?php if(get_pageval($ids,'27','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'27','prints'); ?>">
</td>
</tr>
<tr>
<td>Journal Entry
<input type="hidden" maxlength="11" name="data[28][id]" value="28" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[28][sec]" value="account" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[28][read]" class="role" <?php if(get_pageval($ids,'28','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'28','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[28][write]" class="role" <?php if(get_pageval($ids,'28','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'28','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[28][edit]" class="role" <?php if(get_pageval($ids,'28','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'28','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[28][delete]" class="role" <?php if(get_pageval($ids,'28','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'28','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[28][print]" class="role" <?php if(get_pageval($ids,'28','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'28','prints'); ?>">
</td>
</tr>    
</tbody>
</table>        
</div>
</div>    

<div class="row" id="efinancial">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Financials</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Chart Of Account
<input type="hidden" maxlength="11" name="data[29][id]" value="29" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[29][sec]" value="financial" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[29][read]" class="role" <?php if(get_pageval($ids,'29','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'29','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[29][write]" class="role" <?php if(get_pageval($ids,'29','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'29','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[29][edit]" class="role" <?php if(get_pageval($ids,'29','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'29','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[29][delete]" class="role" <?php if(get_pageval($ids,'29','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'29','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[29][print]" class="role" <?php if(get_pageval($ids,'29','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'29','prints'); ?>">
</td>
</tr>
<tr>
<td>Profit &amp; Loss
<input type="hidden" maxlength="11" name="data[30][id]" value="30" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[30][sec]" value="financial" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[30][read]" class="role" <?php if(get_pageval($ids,'30','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'30','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[30][write]" class="role" <?php if(get_pageval($ids,'30','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'30','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[30][edit]" class="role" <?php if(get_pageval($ids,'30','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'30','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[30][delete]" class="role" <?php if(get_pageval($ids,'30','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'30','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[30][print]" class="role" <?php if(get_pageval($ids,'30','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'30','prints'); ?>">
</td>
</tr>
<tr>
<td>Trial Balance
<input type="hidden" maxlength="11" name="data[31][id]" value="31" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[31][sec]" value="financial" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[31][read]" class="role" <?php if(get_pageval($ids,'31','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'31','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[31][write]" class="role" <?php if(get_pageval($ids,'31','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'31','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[31][edit]" class="role" <?php if(get_pageval($ids,'31','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'31','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[31][delete]" class="role" <?php if(get_pageval($ids,'31','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'31','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[31][print]" class="role" <?php if(get_pageval($ids,'31','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'31','prints'); ?>">
</td>
</tr>
<tr>
<td>Balance Sheet
<input type="hidden" maxlength="11" name="data[32][id]" value="32" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[32][sec]" value="financial" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[32][read]" class="role" <?php if(get_pageval($ids,'32','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'32','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[32][write]" class="role" <?php if(get_pageval($ids,'32','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'32','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[32][edit]" class="role" <?php if(get_pageval($ids,'32','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'32','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[32][delete]" class="role" <?php if(get_pageval($ids,'32','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'32','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[32][print]" class="role" <?php if(get_pageval($ids,'32','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'32','prints'); ?>">
</td>
</tr>
<tr>
<td>Finance Analysis
<input type="hidden" maxlength="11" name="data[33][id]" value="33" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[33][sec]" value="financial" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[33][read]" class="role" <?php if(get_pageval($ids,'33','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'33','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[33][write]" class="role" <?php if(get_pageval($ids,'33','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'33','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[33][edit]" class="role" <?php if(get_pageval($ids,'33','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'33','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[33][delete]" class="role" <?php if(get_pageval($ids,'33','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'33','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[33][print]" class="role" <?php if(get_pageval($ids,'33','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'33','prints'); ?>">
</td>
</tr>
</tbody>
</table>        
</div>
</div>    

<div class="row" id="epayrol">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Payroll</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Department
<input type="hidden" maxlength="11" name="data[34][id]" value="34" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[34][sec]" value="payrol" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[34][read]" class="role" <?php if(get_pageval($ids,'34','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'34','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[34][write]" class="role" <?php if(get_pageval($ids,'34','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'34','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[34][edit]" class="role" <?php if(get_pageval($ids,'34','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'34','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[34][delete]" class="role" <?php if(get_pageval($ids,'34','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'34','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[34][print]" class="role" <?php if(get_pageval($ids,'34','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'34','prints'); ?>">
</td>
</tr>
<tr>
<td>Designation
<input type="hidden" maxlength="11" name="data[35][id]" value="35" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[35][sec]" value="payrol" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[35][read]" class="role" <?php if(get_pageval($ids,'35','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'35','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[35][write]" class="role" <?php if(get_pageval($ids,'35','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'35','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[35][edit]" class="role" <?php if(get_pageval($ids,'35','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'35','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[35][delete]" class="role" <?php if(get_pageval($ids,'35','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'35','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[35][print]" class="role" <?php if(get_pageval($ids,'35','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'35','prints'); ?>">
</td>
</tr>
<tr>
<td>Employee
<input type="hidden" maxlength="11" name="data[36][id]" value="36" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[36][sec]" value="payrol" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[36][read]" class="role" <?php if(get_pageval($ids,'36','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'36','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[36][write]" class="role" <?php if(get_pageval($ids,'36','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'36','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[36][edit]" class="role" <?php if(get_pageval($ids,'36','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'36','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[36][delete]" class="role" <?php if(get_pageval($ids,'36','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'36','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[36][print]" class="role" <?php if(get_pageval($ids,'36','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'36','prints'); ?>">
</td>
</tr>
<tr>
<td>Leave
<input type="hidden" maxlength="11" name="data[37][id]" value="37" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[37][sec]" value="payrol" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[37][read]" class="role" <?php if(get_pageval($ids,'37','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'37','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[37][write]" class="role" <?php if(get_pageval($ids,'37','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'37','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[37][edit]" class="role" <?php if(get_pageval($ids,'37','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'37','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[37][delete]" class="role" <?php if(get_pageval($ids,'37','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'37','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[37][print]" class="role" <?php if(get_pageval($ids,'37','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'37','prints'); ?>">
</td>
</tr>
<tr>
<td>Leave Record
<input type="hidden" maxlength="11" name="data[38][id]" value="38" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[38][sec]" value="payrol" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[38][read]" class="role" <?php if(get_pageval($ids,'38','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'38','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[38][write]" class="role" <?php if(get_pageval($ids,'38','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'38','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[38][edit]" class="role" <?php if(get_pageval($ids,'38','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'38','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[38][delete]" class="role" <?php if(get_pageval($ids,'38','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'38','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[38][print]" class="role" <?php if(get_pageval($ids,'38','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'38','prints'); ?>">
</td>
</tr>
<tr>
<td>Leave Application
<input type="hidden" maxlength="11" name="data[39][id]" value="39" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[39][sec]" value="payrol" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[39][read]" class="role" <?php if(get_pageval($ids,'39','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'39','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[39][write]" class="role" <?php if(get_pageval($ids,'39','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'39','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[39][edit]" class="role" <?php if(get_pageval($ids,'39','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'39','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[39][delete]" class="role" <?php if(get_pageval($ids,'39','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'39','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[39][print]" class="role" <?php if(get_pageval($ids,'39','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'39','prints'); ?>">
</td>
</tr>
<tr>
<td>Attendance &amp; Payslip
<input type="hidden" maxlength="11" name="data[40][id]" value="40" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[40][sec]" value="payrol" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[40][read]" class="role" <?php if(get_pageval($ids,'40','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'40','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[40][write]" class="role" <?php if(get_pageval($ids,'40','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'40','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[40][edit]" class="role" <?php if(get_pageval($ids,'40','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'40','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[40][delete]" class="role" <?php if(get_pageval($ids,'40','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'40','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[40][print]" class="role" <?php if(get_pageval($ids,'40','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'40','prints'); ?>">
</td>
</tr>    
</tbody>
</table>        
</div>
</div>    

<div class="row" id="ebank">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Bank</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bank
<input type="hidden" maxlength="11" name="data[41][id]" value="41" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[41][sec]" value="bank" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[41][read]" class="role" <?php if(get_pageval($ids,'41','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'41','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[41][write]" class="role" <?php if(get_pageval($ids,'41','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'41','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[41][edit]" class="role" <?php if(get_pageval($ids,'41','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'41','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[41][delete]" class="role" <?php if(get_pageval($ids,'41','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'41','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[41][print]" class="role" <?php if(get_pageval($ids,'41','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'41','prints'); ?>">
</td>
</tr>
<tr>
<td>Account
<input type="hidden" maxlength="11" name="data[42][id]" value="42" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[42][sec]" value="bank" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[42][read]" class="role" <?php if(get_pageval($ids,'42','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'42','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[42][write]" class="role" <?php if(get_pageval($ids,'42','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'42','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[42][edit]" class="role" <?php if(get_pageval($ids,'42','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'42','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[42][delete]" class="role" <?php if(get_pageval($ids,'42','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'42','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[42][print]" class="role" <?php if(get_pageval($ids,'42','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'42','prints'); ?>">
</td>
</tr>
<tr>
<td>Transaction
<input type="hidden" maxlength="11" name="data[43][id]" value="43" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[43][sec]" value="bank" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[43][read]" class="role" <?php if(get_pageval($ids,'43','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'43','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[43][write]" class="role" <?php if(get_pageval($ids,'43','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'43','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[43][edit]" class="role" <?php if(get_pageval($ids,'43','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'43','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[43][delete]" class="role" <?php if(get_pageval($ids,'43','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'43','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[43][print]" class="role" <?php if(get_pageval($ids,'43','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'43','prints'); ?>">
</td>
</tr>
</tbody>
</table>        
</div>
</div>    

<div class="row" id="euser">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">User &amp; Role</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>User Role
<input type="hidden" maxlength="11" name="data[44][id]" value="44" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[44][sec]" value="user" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[44][read]" class="role" <?php if(get_pageval($ids,'44','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'44','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[44][write]" class="role" <?php if(get_pageval($ids,'44','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'44','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[44][edit]" class="role" <?php if(get_pageval($ids,'44','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'44','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[44][delete]" class="role" <?php if(get_pageval($ids,'44','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'44','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[44][print]" class="role" <?php if(get_pageval($ids,'44','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'44','prints'); ?>">
</td>
</tr>
<tr>
<td>User
<input type="hidden" maxlength="11" name="data[45][id]" value="45" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[45][sec]" value="user" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[45][read]" class="role" <?php if(get_pageval($ids,'45','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'45','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[45][write]" class="role" <?php if(get_pageval($ids,'45','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'45','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[45][edit]" class="role" <?php if(get_pageval($ids,'45','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'45','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[45][delete]" class="role" <?php if(get_pageval($ids,'45','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'45','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[45][print]" class="role" <?php if(get_pageval($ids,'45','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'45','prints'); ?>">
</td>
</tr>
</tbody>
</table>        
</div>
</div>        
    
<div class="row" id="ereport">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Report</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Report
<input type="hidden" maxlength="11" name="data[46][id]" value="46" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[46][sec]" value="report" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[46][read]" class="role" <?php if(get_pageval($ids,'46','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'46','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[46][write]" class="role" <?php if(get_pageval($ids,'46','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'46','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[46][edit]" class="role" <?php if(get_pageval($ids,'46','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'46','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[46][delete]" class="role" <?php if(get_pageval($ids,'46','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'46','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[46][print]" class="role" <?php if(get_pageval($ids,'46','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'46','prints'); ?>">
</td>
</tr>
</tbody>
</table>        
</div>
</div>  

<div class="row" id="epurchase">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Purchase</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Purchase Order
<input type="hidden" maxlength="11" name="data[47][id]" value="47" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[47][sec]" value="purchase" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[47][read]" class="role" <?php if(get_pageval($ids,'47','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'47','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[47][write]" class="role" <?php if(get_pageval($ids,'47','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'47','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[47][edit]" class="role" <?php if(get_pageval($ids,'47','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'47','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[47][delete]" class="role" <?php if(get_pageval($ids,'47','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'47','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[47][print]" class="role" <?php if(get_pageval($ids,'47','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'47','prints'); ?>">
</td>
</tr>
<tr>
<tr>
<td>Purchase Invoice
<input type="hidden" maxlength="11" name="data[48][id]" value="48" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[48][sec]" value="purchase" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[48][read]" class="role" <?php if(get_pageval($ids,'48','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'48','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[48][write]" class="role" <?php if(get_pageval($ids,'48','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'48','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[48][edit]" class="role" <?php if(get_pageval($ids,'48','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'48','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[48][delete]" class="role" <?php if(get_pageval($ids,'48','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'48','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[48][print]" class="role" <?php if(get_pageval($ids,'48','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'48','prints'); ?>">
</td>
</tr>

<tr>
<td>Purchase Return
<input type="hidden" maxlength="11" name="data[49][id]" value="49" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[49][sec]" value="purchase" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[49][read]" class="role"<?php if(get_pageval($ids,'49','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'49','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[49][write]" class="role" <?php if(get_pageval($ids,'49','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'49','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[49][edit]" class="role" <?php if(get_pageval($ids,'49','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'49','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[49][delete]" class="role" <?php if(get_pageval($ids,'49','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'49','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[49][print]" class="role" <?php if(get_pageval($ids,'49','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'49','prints'); ?>">
</td>
</tr>
</tbody>
</table>        
</div>
</div> 


<div class="row" id="esales">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Sales</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Sales Estimate
<input type="hidden" maxlength="11" name="data[50][id]" value="50" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[50][sec]" value="sales" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[50][read]" class="role" <?php if(get_pageval($ids,'50','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'50','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[50][write]" class="role" <?php if(get_pageval($ids,'50','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'50','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[50][edit]" class="role" <?php if(get_pageval($ids,'50','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'50','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[50][delete]" class="role" <?php if(get_pageval($ids,'50','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'50','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[50][print]" class="role" <?php if(get_pageval($ids,'50','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'50','prints'); ?>">
</td>
</tr>

<tr>
<td>Sales Invoice
<input type="hidden" maxlength="11" name="data[51][id]" value="51" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[51][sec]" value="sales" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[51][read]" class="role" <?php if(get_pageval($ids,'51','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'51','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[51][write]" class="role" <?php if(get_pageval($ids,'51','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'51','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[51][edit]" class="role" <?php if(get_pageval($ids,'51','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'51','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[51][delete]" class="role" <?php if(get_pageval($ids,'51','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'51','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[51][print]" class="role" <?php if(get_pageval($ids,'51','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'51','prints'); ?>">
</td>
</tr>

<tr>
<td>Sales Return
<input type="hidden" maxlength="11" name="data[52][id]" value="52" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[52][sec]" value="sales" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[52][read]" class="role" <?php if(get_pageval($ids,'52','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'52','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[52][write]" class="role" <?php if(get_pageval($ids,'52','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'52','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[52][edit]" class="role" <?php if(get_pageval($ids,'52','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'52','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[52][delete]" class="role" <?php if(get_pageval($ids,'52','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'52','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[52][print]" class="role" <?php if(get_pageval($ids,'52','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'52','prints'); ?>">
</td>
</tr>

</tbody>
</table>        
</div>
</div> 


<div class="row" id="eservice">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Service</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Service List
<input type="hidden" maxlength="11" name="data[53][id]" value="53" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[53][sec]" value="service" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[53][read]" class="role" <?php if(get_pageval($ids,'53','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'53','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[53][write]" class="role" <?php if(get_pageval($ids,'53','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'53','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[53][edit]" class="role" <?php if(get_pageval($ids,'53','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'53','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[53][delete]" class="role" <?php if(get_pageval($ids,'53','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'53','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[53][print]" class="role" <?php if(get_pageval($ids,'53','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'53','prints'); ?>">
</td>
</tr>
<tr>
<td>Service Received List
<input type="hidden" maxlength="11" name="data[54][id]" value="54" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[54][sec]" value="service" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[54][read]" class="role" <?php if(get_pageval($ids,'54','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'54','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[54][write]" class="role" <?php if(get_pageval($ids,'54','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'54','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[54][edit]" class="role" <?php if(get_pageval($ids,'54','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'54','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[54][delete]" class="role" <?php if(get_pageval($ids,'54','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'54','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[54][print]" class="role" <?php if(get_pageval($ids,'54','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'54','prints'); ?>">
</td>
</tr>


<tr>
<td>Sales Service 
<input type="hidden" maxlength="11" name="data[55][id]" value="55" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[55][sec]" value="service" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[55][read]" class="role" <?php if(get_pageval($ids,'55','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'55','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[55][write]" class="role" <?php if(get_pageval($ids,'55','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'55','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[55][edit]" class="role" <?php if(get_pageval($ids,'55','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'55','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[55][delete]" class="role" <?php if(get_pageval($ids,'55','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'55','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[55][print]" class="role" <?php if(get_pageval($ids,'55','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'55','prints'); ?>">
</td>
</tr>


</tbody>
</table>        
</div>
</div>




<div class="row" id="ewarranty">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Warranty Management</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Warranty Claim
<input type="hidden" maxlength="11" name="data[56][id]" value="56" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[56][sec]" value="warranty" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[56][read]" class="role" <?php if(get_pageval($ids,'56','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'56','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[56][write]" class="role" <?php if(get_pageval($ids,'56','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'56','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[56][edit]" class="role" <?php if(get_pageval($ids,'56','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'56','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[56][delete]" class="role" <?php if(get_pageval($ids,'56','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'56','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[56][print]" class="role" <?php if(get_pageval($ids,'56','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'56','prints'); ?>">
</td>
</tr>
<tr>
<td>Product Checking
<input type="hidden" maxlength="11" name="data[57][id]" value="57" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[57][sec]" value="warranty" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[57][read]" class="role" <?php if(get_pageval($ids,'57','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'57','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[57][write]" class="role" <?php if(get_pageval($ids,'57','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'57','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[57][edit]" class="role" <?php if(get_pageval($ids,'57','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'57','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[57][delete]" class="role" <?php if(get_pageval($ids,'57','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'57','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[57][print]" class="role" <?php if(get_pageval($ids,'57','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'57','prints'); ?>">
</td>
</tr>
<tr>
<td>Manage Proudct
<input type="hidden" maxlength="11" name="data[58][id]" value="58" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[58][sec]" value="warranty" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[58][read]" class="role" <?php if(get_pageval($ids,'58','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'58','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[58][write]" class="role" <?php if(get_pageval($ids,'58','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'58','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[58][edit]" class="role" <?php if(get_pageval($ids,'58','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'58','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[58][delete]" class="role" <?php if(get_pageval($ids,'58','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'58','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[58][print]" class="role" <?php if(get_pageval($ids,'58','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'58','prints'); ?>">
</td>
</tr>

<tr>
<td>Warranty Deliver
<input type="hidden" maxlength="11" name="data[59][id]" value="59" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[59][sec]" value="warranty" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[59][read]" class="role" <?php if(get_pageval($ids,'59','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'59','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[59][write]" class="role" <?php if(get_pageval($ids,'59','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'59','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[59][edit]" class="role" <?php if(get_pageval($ids,'59','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'59','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[59][delete]" class="role" <?php if(get_pageval($ids,'59','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'59','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[59][print]" class="role" <?php if(get_pageval($ids,'59','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'59','prints'); ?>">
</td>
</tr>
<tr>
<td>Warranty Stock
<input type="hidden" maxlength="11" name="data[60][id]" value="60" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[60][sec]" value="warranty" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[60][read]" class="role" <?php if(get_pageval($ids,'60','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'60','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[60][write]" class="role" <?php if(get_pageval($ids,'60','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'60','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[60][edit]" class="role" <?php if(get_pageval($ids,'60','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'60','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[60][delete]" class="role" <?php if(get_pageval($ids,'60','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'60','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[60][print]" class="role" <?php if(get_pageval($ids,'60','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'60','prints'); ?>">
</td>
</tr>

<tr>
<td>Claim to Supplier
<input type="hidden" maxlength="11" name="data[61][id]" value="61" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[61][sec]" value="warranty" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[61][read]" class="role" <?php if(get_pageval($ids,'61','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'61','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[61][write]" class="role" <?php if(get_pageval($ids,'61','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'61','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[61][edit]" class="role" <?php if(get_pageval($ids,'61','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'61','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[61][delete]" class="role" <?php if(get_pageval($ids,'61','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'61','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[61][print]" class="role" <?php if(get_pageval($ids,'61','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'61','prints'); ?>">
</td>
</tr>
<tr>
<td>Service Center
<input type="hidden" maxlength="11" name="data[62][id]" value="62" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[62][sec]" value="warranty" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[62][read]" class="role" <?php if(get_pageval($ids,'62','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'62','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[62][write]" class="role" <?php if(get_pageval($ids,'62','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'62','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[62][edit]" class="role" <?php if(get_pageval($ids,'62','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'62','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[62][delete]" class="role" <?php if(get_pageval($ids,'62','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'62','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[62][print]" class="role" <?php if(get_pageval($ids,'62','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'62','prints'); ?>">
</td>
</tr>

</tbody>
</table>        
</div>
</div>



<div class="row" id="einventory">
<div class="col-md-12">
<table class="table">
<thead>
<tr>
<th style="width:285px;">Inventory</th>
<th class="text-center">Read</th>
<th class="text-center">Write</th>
<th class="text-center">Edit</th>
<th class="text-center">Delete</th>
<th class="text-center">Print</th>
</tr>
</thead>
<tbody>
<tr>
<td>Branch
<input type="hidden" maxlength="11" name="data[63][id]" value="63" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[63][sec]" value="inventory" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[63][read]" class="role" <?php if(get_pageval($ids,'63','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'63','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[63][write]" class="role" <?php if(get_pageval($ids,'63','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'63','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[63][edit]" class="role" <?php if(get_pageval($ids,'63','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'63','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[63][delete]" class="role" <?php if(get_pageval($ids,'63','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'63','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[63][print]" class="role" <?php if(get_pageval($ids,'63','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'63','prints'); ?>">
</td>
</tr>

<td>Warehouse 
<input type="hidden" maxlength="11" name="data[64][id]" value="64" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[64][sec]" value="inventory" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[64][read]" class="role" <?php if(get_pageval($ids,'64','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'64','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[64][write]" class="role" <?php if(get_pageval($ids,'64','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'64','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[64][edit]" class="role" <?php if(get_pageval($ids,'64','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'64','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[64][delete]" class="role" <?php if(get_pageval($ids,'64','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'64','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[64][print]" class="role" <?php if(get_pageval($ids,'64','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'64','prints'); ?>">
</td>
</tr>


<tr>
<td>Product Delivery
<input type="hidden" maxlength="11" name="data[65][id]" value="65" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[65][sec]" value="inventory" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[65][read]" class="role" <?php if(get_pageval($ids,'65','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'65','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[65][write]" class="role" <?php if(get_pageval($ids,'65','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'65','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[65][edit]" class="role" <?php if(get_pageval($ids,'65','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'65','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[65][delete]" class="role" <?php if(get_pageval($ids,'65','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'65','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[65][print]" class="role" <?php if(get_pageval($ids,'65','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'65','prints'); ?>">
</td>
</tr>

<tr>
<td>Product Received
<input type="hidden" maxlength="11" name="data[66][id]" value="66" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[66][sec]" value="inventory" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[66][read]" class="role" <?php if(get_pageval($ids,'66','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'66','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[66][write]" class="role" <?php if(get_pageval($ids,'66','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'66','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[66][edit]" class="role" <?php if(get_pageval($ids,'66','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'66','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[66][delete]" class="role" <?php if(get_pageval($ids,'66','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'66','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[66][print]" class="role" <?php if(get_pageval($ids,'66','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'66','prints'); ?>">
</td>
</tr>
<tr>
<td>Branch Stock
<input type="hidden" maxlength="11" name="data[67][id]" value="67" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[67][sec]" value="inventory" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[67][read]" class="role" <?php if(get_pageval($ids,'67','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'67','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[67][write]" class="role" <?php if(get_pageval($ids,'67','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'67','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[67][edit]" class="role" <?php if(get_pageval($ids,'67','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'67','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[67][delete]" class="role" <?php if(get_pageval($ids,'67','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'67','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[67][print]" class="role" <?php if(get_pageval($ids,'67','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'67','prints'); ?>">
</td>
</tr>


<tr>
<td>Warehouse Stock
<input type="hidden" maxlength="11" name="data[68][id]" value="68" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[68][sec]" value="inventory" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[68][read]" class="role" <?php if(get_pageval($ids,'68','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'68','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[68][write]" class="role" <?php if(get_pageval($ids,'68','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'68','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[68][edit]" class="role" <?php if(get_pageval($ids,'68','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'68','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[68][delete]" class="role" <?php if(get_pageval($ids,'68','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'68','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[68][print]" class="role" <?php if(get_pageval($ids,'68','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'68','prints'); ?>">
</td>
</tr>

<tr>
<td>Combined Stock
<input type="hidden" maxlength="11" name="data[69][id]" value="69" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[69][sec]" value="inventory" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[69][read]" class="role" <?php if(get_pageval($ids,'69','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'69','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[69][write]" class="role" <?php if(get_pageval($ids,'69','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'69','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[69][edit]" class="role" <?php if(get_pageval($ids,'69','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'69','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[69][delete]" class="role" <?php if(get_pageval($ids,'69','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'69','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[69][print]" class="role" <?php if(get_pageval($ids,'69','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'69','prints'); ?>">
</td>
</tr>

<tr>
<td>Transfer From Branch
<input type="hidden" maxlength="11" name="data[70][id]" value="70" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[70][sec]" value="inventory" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[70][read]" class="role" <?php if(get_pageval($ids,'70','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'70','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[70][write]" class="role" <?php if(get_pageval($ids,'70','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'70','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[70][edit]" class="role" <?php if(get_pageval($ids,'70','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'70','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[70][delete]" class="role" <?php if(get_pageval($ids,'70','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'70','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[70][print]" class="role" <?php if(get_pageval($ids,'70','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'70','prints'); ?>">
</td>
</tr>

<tr>
<td>Transfer From Warehouse
<input type="hidden" maxlength="11" name="data[71][id]" value="71" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[71][sec]" value="inventory" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[71][read]" class="role" <?php if(get_pageval($ids,'71','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'71','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[71][write]" class="role" <?php if(get_pageval($ids,'71','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'71','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[71][edit]" class="role" <?php if(get_pageval($ids,'71','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'71','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[71][delete]" class="role" <?php if(get_pageval($ids,'71','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'71','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[71][print]" class="role" <?php if(get_pageval($ids,'71','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'71','prints'); ?>">
</td>
</tr>

<tr>
<td>Prouduct Disposal
<input type="hidden" maxlength="11" name="data[72][id]" value="72" class="form-control" autocomplete="off">
<input type="hidden" maxlength="11" name="data[72][sec]" value="inventory" class="form-control" autocomplete="off">  </td>
<td class="text-center">
<input type="checkbox"  name="data[72][read]" class="role" <?php if(get_pageval($ids,'72','views')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'72','views'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[72][write]" class="role" <?php if(get_pageval($ids,'72','creates')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'72','creates'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[72][edit]" class="role" <?php if(get_pageval($ids,'72','edits')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'72','edits'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[72][delete]" class="role" <?php if(get_pageval($ids,'72','deletes')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'72','deletes'); ?>">
</td>
<td class="text-center">
<input type="checkbox" name="data[72][print]" class="role" <?php if(get_pageval($ids,'72','prints')){echo 'checked=""';}?> value="<?php echo get_pageval($ids,'72','prints'); ?>">
</td>
</tr>

</tbody>
</table>        
</div>
</div>
    
</div>
<div class="clearfix" ></div>
<div class="col-md-12 nopadding widgets_area"></div>    
<div class="row"style="margin-top: 15px" >
<div class="col-md-8"></div>
<div class="col-md-4 text-right" >
<input type="submit" name="role_update" id="submit" class="btn btn-flat bg-purple btn-sm " value="Update"/> <a href="rou_rolelist.php" class="btn btn-flat bg-gray  ">Close</a>
</div> 
</div>     
</form>    
</div>
</div>
</div>
<div class="col-md-4">
<div class="row">
<div class="col-md-12">
<div class="box box-solid">
<div class="box-header">
<h3 class="box-title">History </h3>
</div>
<!-- /.box-header -->
<div class="box-body" >
<?php if($_SESSION['access']=='1'){echo read_activity($aid,'ROL','A');}else{echo read_activity($aid,'ROL','U');}?>
</div>
</div>
</div>
</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 pname = new LiveValidation('pname');
pname.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');    
}	
});    
</script>    
<!-- /page script -->
</html>    