?
Current Path : /home1/savoy/public_html/savoyglobal.net/sgms/draft/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/public_html/savoyglobal.net/sgms/draft/application/views/Settings/single_profile.php |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?> <div class="select-bar"> <label><img src="<?=base_url()?>assets/images/backbutton.png" title="Back" class="clickimage" onclick="viewdata('settings','viewinsettingssearch','search_profile','view_profile','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="25" height="25" /> </label> <span class="heading">Profile Details</span> <span class="heading-right"> <img src="<?=base_url()?>assets/images/edit-icon.gif" title="Edit" width="20" height="20" alt="Edit" align = "center" class="clickimage" onclick="editformdata('settings','edit_page','<?=$id;?>','user_profile','profile_id','edit_profile')" alt="" /> </span> </div> <fieldset> <?php $designation=$this->mastermodel->getdatas('designation','designation_id'); $attributes=array('id'=>'validateform','class'=>'customForm'); echo form_open('',$attributes);?> <ul> <li> <label for="data">Designation</label> <div class="record_entry"> <?=$this->mastermodel->getSingleFieldValue('designation','designation_name','designation_id',$viewinfo->designation_id);?> </div> </li> <li id="role_permissions"> <table class="sort" align="center" width="100%"> <caption>Permissions</caption> <thead> <tr> <th>Module</th> <th>View</th> <th>Create / Edit</th> <th>Delete</th> <th>Private</th> </tr> </thead> <tbody> <?php $modname=""; $modcheck=""; $cntr=1; $i=1; $modulelist=$this->mastermodel->getmoduledata(); $j=0; $txtname=""; $viewCount=0; $initialPermission=""; $moduleidList=""; $allowed=explode(",",$viewinfo->profile_modules); $edit_del=explode(",",$viewinfo->profile_modules_permission); $isPrivate = explode(",",$viewinfo->profile_modules_private); $privateList=$viewinfo->profile_modules_private; 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]; } else { $val=0; $val1=0; } $a=decbin($val); $d=sprintf('%03u',$a); $ar = str_split($d); $viewCount++; $initialPermission .= "0,"; $moduleidList .= $menulst['menu_id'].","; $txtname = $menulst['module_name']; if($modname!=$menulst['module_name']) { $modname=$menulst['module_name']; ?> <tr> <th colspan="5"><?=$modname;?></th> </tr> <?php $i++; } ?> <?php echo "<tr><td>".$menulst['caption']."</td>"; ?> <td><input disabled style="width: 15px;" onchange="CheckAllView(this,'','View_')" name="View_<?=$modname?>[]" id="View_<?php echo $j;?>" value="4" type="checkbox" <?php if($ar[0]=="1"){ echo 'checked="checked"'; } ?>></td> <td><input disabled style="width: 15px;" onchange="CheckAllView(this,'','Edit_')" name="Edit_<?=$modname?>[]" id="Edit_<?php echo $j;?>" value="2" type="checkbox" <?php if($ar[1]=="1"){ echo 'checked="checked"'; } ?>></td> <td><input disabled style="width: 15px;" onchange="CheckAllView(this,'','Delete_')" name="Delete_<?=$modname?>[]" id="Delete_<?php echo $j;?>" value="1" type="checkbox" <?php if($ar[2]=="1"){ echo 'checked="checked"'; } ?>></td> <td><input disabled style="width: 15px;" onchange="CheckAllView(this,'','Delete_')" name="Private_<?=$modname?>[]" id="Private_<?php echo $j;?>" value="1" type="checkbox" <?php if($isPrivate[$j] == 1) { echo "checked"; } ?>></td> <?php $i++; $j++; } ?> </table> </li> </ul> <?php echo form_close();?> </fieldset>