?
Current Path : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Settings/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/www/savoyglobal.net/drafthr/system/application/views/Settings/view_role.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <script type="text/javascript"> function hidesho(val,val1) { if(val.style.display=="none") { val1.src="<?php echo base_url();?>assets/treeImgs/minus.gif"; $(val).show('slow'); } else { val1.src="<?php echo base_url();?>assets/treeImgs/plus.gif"; $(val).hide('slow'); } } </script> <div style="overflow: auto"></div> <?php $modname=""; $modcheck=""; $cntr=1; $i=1; $namee= $this->customermodel->getSingleFieldValue('designation','designation','id',$userdetails->name); echo '<label>Profile Name</label> '; echo '<label>'. $namee .'</label>'; echo '<br/><br/><label>Permissions</label><br/><br/>'; echo '<div>'; $modulelist=$this->mastermodel->getmoduledata(); $allowed=explode(",",$userdetails->permission); $edit_del=explode(",",$userdetails->edit_del_permission); $private_details=explode(",",$userdetails->private); $j=0; $txtname=""; foreach ($modulelist as $menulst) { $menuid=$menulst['menu_id']; $poss=''; for($i=1;$i<sizeof($allowed)+1;$i++) { if($allowed[$i-1]==$menuid) { $poss=$i; } } if($poss!='') { $val=$edit_del[$poss-1]; $val1=$private_details[$poss-1]; } else { $val=0; $val1=0; } $a=decbin($val); $d=sprintf('%03u',$a); $ar = str_split($d); //echo $menulst['module_name']; if ($modname!=$menulst['module_name']) { if($modname!="") { echo '</div></div>'; } $txtname=$menulst['module_name']; echo '<div style=" margin-left:5px;float:left;width:100%"> <div style="height:25px;border:#badcdc 1px solid;background-color:#e8f3f3;margin:3px;padding-top:3px;"> <img style="margin-top:0px;" align="center" id='. $menulst['module_name'].'_1 onclick="hidesho(div_'. $menulst['module_name'] .','. $menulst['module_name'].'_1);" src="'. base_url() . 'assets/treeImgs/minus.gif" /> <input DISABLED onclick="checkuncheck(\''.$txtname.'\','. $menulst['module_name'] .'_3)"; id="'. $menulst['module_name'] .'_3" value="'. $menulst['module_name'] .'_3" type="checkbox" /> '. $menulst['module_name'] . '</div>'; $modname=$menulst['module_name']; echo '<div style="padding-top:5px; margin-left:12px;display:block" id=div_'. $menulst['module_name'].'>'; echo '<div id=div_'. $menulst['menu_id'].' style="height:25px;width:200px; float:left; margin-left:5px;" >';?> <input DISABLED name="Chk_Permission[]" type="checkbox" id="<?php echo $txtname.$j ?>" value="<?php echo $menulst['menu_id'] ?>"<?php if(in_array($menulst['menu_id'], $allowed)){ echo 'checked="checked"'; } ?> "/> <?php echo $menulst['caption'] ; ?> <table style="margin-left:15px;"><tr style="font-size: 10px;"><td>R</td><td>W</td><td>D</td><td>Pvt.</td></tr><tr> <td> <input DISABLED onchange="addvalue(<?php echo $menulst['menu_id'];?>,this)" name="read_permission[]" id="<?php echo $menulst['menu_id'];?>_1" value="4" type="checkbox" <?php if($ar[0]=="1"){ echo 'checked="checked"'; } ?> ></td> <td> <input DISABLED onchange="addvalue(<?php echo $menulst['menu_id'] ;?>,this)" name="read_permission[]" id="<?php echo $menulst['menu_id'];?>_2" value="2" type="checkbox" <?php if($ar[1]=="1"){ echo 'checked="checked"'; } ?>></td> <td> <input DISABLED onchange="addvalue(<?php echo $menulst['menu_id'] ;?>,this)" name="read_permission[]" id="<?php echo $menulst['menu_id'];?>_3" value="1" type="checkbox" <?php if($ar[2]=="1"){ echo 'checked="checked"'; } ?>></td> <td><input DISABLED type="checkbox" <?php if($val1=="2"){ echo 'checked="checked"'; }?>></td></tr></table> <input type="hidden" name="combine[]" value="0" id="combineresult_<?php echo $menulst['menu_id'] ;?>" /> <?php echo '</div>'; $i++; } else { echo '<div style="height:50px;width:200px; float:left; margin-left:5px;" >';?> <input DISABLED name="Chk_Permission[]" type="checkbox" id="<?php echo $txtname.$j ?>" value="<?php echo $menulst['menu_id'] ?>"<?php if(in_array($menulst['menu_id'], $allowed)){ echo 'checked="checked"'; } ?> "/> <?php echo $menulst['caption'] ; ?> <table style="margin-left:15px;"><tr style="font-size: 10px;"><td>R</td><td>W</td><td>D</td><td>Pvt.</td></tr><tr> <td> <input DISABLED onchange="addvalue(<?php echo $menulst['menu_id'];?>,this)" name="read_permission[]" id="<?php echo $menulst['menu_id'];?>_1" value="4" type="checkbox" <?php if($ar[0]=="1"){ echo 'checked="checked"'; } ?> ></td> <td> <input DISABLED onchange="addvalue(<?php echo $menulst['menu_id'] ;?>,this)" name="read_permission[]" id="<?php echo $menulst['menu_id'];?>_2" value="2" type="checkbox" <?php if($ar[1]=="1"){ echo 'checked="checked"'; } ?>></td> <td> <input DISABLED onchange="addvalue(<?php echo $menulst['menu_id'] ;?>,this)" name="read_permission[]" id="<?php echo $menulst['menu_id'];?>_3" value="1" type="checkbox" <?php if($ar[2]=="1"){ echo 'checked="checked"'; } ?>></td> <td><input DISABLED type="checkbox" name="public[]" <?php if($val1=="2"){ echo 'checked="checked"'; }?>></td></tr></table> <input type="hidden" name="combine[]" value="0" id="combineresult_<?php echo $menulst['menu_id'] ;?>" /> <?php echo '</div>'; $i++; $j++; } } echo '</div>'; echo '</div>'; ?>