?
Current Path : /home1/savoy/www/savoyglobal.net/eldertree/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/eldertree/application/views/settings/edit_profile.php |
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); $this->load->view('documentreadyfunctions'); $this->load->view('settings/settingsfunctions'); ?> <div class="row-fluid"> <div class="tab-pane " id="tab_2"> <div class="portlet box yellow"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i>Updating Profile</div> <div class="tools"> <a href="#" onclick="viewdata('settings','viewinsettingssearch','search_profile','view_profile','<?=$_SESSION['pagenum'];?>')" class="remove"></a> </div> </div> <div class="portlet-body form"> <!-- BEGIN FORM--> <?php $attributes = array('id' => 'validateform', 'class' => 'form-horizontal validate'); echo form_open('settings/addinsettings/update_profile/view_profile/1',$attributes); ?> <h3 class="form-section"></h3> <div class="row-fluid"> <div class="span6 "> <div class="control-group"> <label class="control-label">Designation</label> <div class="controls"><span class="text bold"> <?php echo $this->mastermodel->get_single_field_value('designation','designation_name','designation_id',$viewinfo->designation_id); ?></span> </div> </div> </div> </div> <div class="portlet box yellow"> <div class="portlet-title"> <div class="caption"><i class="icon-reorder"></i>Permissions</div> </div> <div class="portlet-body form"> <table class="table table-striped table-hover table-bordered"> <thead> <tr> <th>Module Name</th> <th><input style="width: 15px;" type="checkbox" id="view_check_all" onchange="check_all_view(this,'view_')">View </th> <th><input style="width: 15px;" type="checkbox" id="add_check_all" onchange="check_all_view(this,'add_')">Create</th> <th><input style="width: 15px;" type="checkbox" id="edit_check_all" onchange="check_all_view(this,'edit_')">Edit</th> <th><input style="width: 15px;" type="checkbox" id="delete_check_all" onchange="check_all_view(this,'delete_')">Delete</th> <th><input style="width: 15px;" type="checkbox" id="delete_check_all" onchange="check_all_view(this,'homepage_','')">Home Page</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); $is_homepage = explode(",",$viewinfo->profile_modules_home_page); $homepage_list=$viewinfo->profile_modules_home_page; 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('%04u',$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><?=$menulst['module_title'];?></th> <th><input style="width: 15px;" class="" type="checkbox" id="view_<?=$modname?>" onchange="check_module_view('view_','<?=$modname?>')"></th> <th><input style="width: 15px;" class="" type="checkbox" id="add_<?=$modname?>" onchange="check_module_view('add_','<?=$modname?>')"></th> <th><input style="width: 15px;" class="" type="checkbox" id="edit_<?=$modname?>" onchange="check_module_view('edit_','<?=$modname?>')"></th> <th><input style="width: 15px;" class="" type="checkbox" id="delete_<?=$modname?>" onchange="check_module_view('delete_','<?=$modname?>')"></th> <th><input style="width: 15px;" class="" type="checkbox" id="homepage_<?=$modname?>" onchange="check_module_view('homepage_','<?=$modname?>')"></th> </tr> <tr> <?php $i++; } ?> <?php echo " <td>".$menulst['caption']."</td>"; ?> <td style="text-align:center;"><input style="width: 15px;" onchange="check_all_view(this,'','view_')" name="view_<?=$modname?>[]" id="view_<?php echo $j;?>" value="8" type="checkbox" <?php if($ar[0]=="1"){ echo 'checked="checked"'; } ?>></td> <td style="text-align:center;"><input style="width: 15px;" onchange="check_all_view(this,'','add_')" name="add_<?=$modname?>[]" id="add_<?php echo $j;?>" value="4" type="checkbox" <?php if($ar[1]=="1"){ echo 'checked="checked"'; } ?>></td> <td style="text-align:center;"><input style="width: 15px;" onchange="check_all_view(this,'','edit_')" name="edit_<?=$modname?>[]" id="edit_<?php echo $j;?>" value="2" type="checkbox" <?php if($ar[2]=="1"){ echo 'checked="checked"'; } ?>></td> <td style="text-align:center;"><input style="width: 15px;" onchange="check_all_view(this,'','delete_')" name="delete_<?=$modname?>[]" id="delete_<?php echo $j;?>" value="1" type="checkbox" <?php if($ar[3]=="1"){ echo 'checked="checked"'; } ?>></td> <td style="text-align:center;"><input style="width: 15px;" onchange="check_all_view(this,'','delete_')" name="homepage_<?=$modname?>[]" id="homepage_<?php echo $j;?>" value="1" type="checkbox" <?php if($is_homepage[$j] == 1) { echo "checked"; } ?>></td> </tr> <?php $i++; $j++; } ?> </tbody> </table> <input type="hidden" id="ViewCount" value=<?php echo $viewCount?>> <input type="hidden" id="TxtPermissionList" name="role_edit_del_permission" value=<?php echo $viewinfo->profile_modules_permission;?>> <input type="hidden" id="ModuleidList" name="role_permission" value=<?php echo $moduleidList;?>> <input type="hidden" id="profile_id" name="profile_id" value=<?php echo $viewinfo->profile_id;?>> <input type="hidden" id="tab_name" name="tab_name" value="user_profile"> <input type="hidden" id="home_page_list" name="role_home_page" value="<?php echo $homepage_list?>"/> </div> </div> <div class="form-actions"> <input type="hidden" name="resfunction" value="search_profile"/> <button type="submit" onclick="addformdata('validateform')" class="btn blue"><i class="icon-ok"></i> Save</button> <button type="button" onclick="viewdata('settings','viewinsettingssearch','search_profile','view_profile','<?=$_SESSION['pagenum'];?>')" class="btn">Cancel</button> </div> <?php echo form_close(); ?> <!-- END FORM--> </div> </div> </div> </div> <script> $(document).ready(function() { var checkbox_list = $("input[type=checkbox]:not(.toggle), input[type=radio]:not(.toggle, .star)"); if (checkbox_list.size() > 0) { checkbox_list.each(function () { if ($(this).parents(".checker").size() == 0) { $(this).show(); $(this).uniform(); } }); } }); </script>