?
Current Path : /home1/savoy/public_html/savoyglobal.net/hr/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/hr/application/views/Settings/add_role.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_role','view_role','<?=$_SESSION['pagenum'];?>')" alt="Back" align = "center" width="25" height="25" /> </label> <span class="heading">Creating new profile</span> </div> <fieldset> <?php $designation=$this->mastermodel->getdatas('designation','designation_id'); $attributes=array('id'=>'validateform','class'=>'customForm'); echo form_open('settings/addinsettings/insert_role/view_role/1',$attributes); ?> <ul> <li> <label for="data">Designation</label> <select name="designation_id" id="designation_id" class="required" onchange="checkexistence('role','designation_id ',this.value)"> <option value="">Select</option> <?php foreach($designation as $roles) { echo "<option value='". $roles['designation_id'] . "'>" . $roles['designation_name'] . "</option>"; } ?> </select> </li> <li id="role_permissions"> <table class="sort" align="center" width="100%"> <caption>Permissions</caption> <thead> <tr> <th>Module Name</th> <th><input style="width: 15px;" type="checkbox" id="View_CheckAll" onchange="CheckAllView(this,'View_','')">View </th> <th><input style="width: 15px;" type="checkbox" id="Edit_CheckAll" onchange="CheckAllView(this,'Edit_','')">Create / Edit</th> <th><input style="width: 15px;" type="checkbox" id="Delete_CheckAll" onchange="CheckAllView(this,'Delete_','')">Delete</th> </tr> </thead> <tbody> <?php $modname=""; $modcheck=""; $cntr=1; $i=1; $modulelist=$this->mastermodel->getmoduledata(); $j=0; $txtname=""; $viewCount=0; $initialPermission=""; $moduleidList=""; foreach ($modulelist as $menulst) { $viewCount++; $initialPermission .= "0,"; $moduleidList .= $menulst['menu_id'].","; $txtname = $menulst['module_name']; if($modname!=$menulst['module_name']) { $modname=$menulst['module_name']; ?> <tr> <th><?=$modname;?></th> <th><input style="width: 15px;" class="" type="checkbox" id="View_<?=$modname?>" onchange="CheckModuleView('View_','<?=$modname?>')"></th> <th><input style="width: 15px;" class="" type="checkbox" id="Edit_<?=$modname?>" onchange="CheckModuleView('Edit_','<?=$modname?>')"></th> <th><input style="width: 15px;" class="" type="checkbox" id="Delete_<?=$modname?>" onchange="CheckModuleView('Delete_','<?=$modname?>')"></th> </tr> <?php $i++; } ?> <tr> <td><?=$menulst['caption']; ?><input class="<?=$modname?>" style="width: 15px; margin-right: 20px;" onchange="CheckAllView(this,'','ViewAll_')" name="read_permission[]" id="ViewAll_<?php echo $j;?>" type="checkbox"></td> <td><input class="" style="width: 15px;" onchange="CheckAllView(this,'','View_')" name="View_<?=$modname?>[]" id="View_<?php echo $j;?>" value="4" type="checkbox"></td> <td><input class="" style="width: 15px;" onchange="CheckAllView(this,'','Edit_')" name="Edit_<?=$modname?>[]" id="Edit_<?php echo $j;?>" value="2" type="checkbox"></td> <td><input class="" style="width: 15px;" onchange="CheckAllView(this,'','Delete_')" name="Delete_<?=$modname?>[]" id="Delete_<?php echo $j;?>" value="1" type="checkbox"></td> </tr> <?php $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 $initialPermission?>> <input type="hidden" id="ModuleidList" name="role_permission" value=<?php echo $moduleidList?>> <input type="hidden" id="tab_name" name="tab_name" value="role"> </li> <li> <label for="submit"> </label> <button type="submit" id="submit" class="clickimage" onclick="addformdata('validateform')">Save</button> </li> </ul> <?php echo form_close();?> </fieldset>