?
Current Path : /home1/savoy/www/savoyglobal.net/sec/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/sec/application/views/settings/settingsfunctions.php |
<script type="text/javascript"> function check_module_view(prefix, module) { var welements = document.getElementsByName(prefix+ module+"[]"); for (var i = 0; i < welements.length; i++) { if(document.getElementById(prefix+ module).checked==true) welements[i].checked=true; else welements[i].checked=false; } check_all_view('','',prefix); $.uniform.update(); } function check_all_view(status,prefix,prefix1) { var Length = document.getElementById('ViewCount').value; var Permision=0; var PrivatePermission =""; //var homepage_Permision=""; var FinalPermission=""; for(var i=0; i <Length; i++) { if(prefix!="") document.getElementById(prefix +""+ i).checked=status.checked; //if edit checked then view also checked if(prefix1=="view_all_") { if(document.getElementById("view_all_"+ i).checked) { document.getElementById('view_'+i ).checked = true; document.getElementById('edit_'+i ).checked = true; document.getElementById('delete_'+i ).checked = true; } if(document.getElementById("view_all_"+ i).checked==false) { document.getElementById('view_'+i ).checked = false; document.getElementById('edit_'+i ).checked = false; document.getElementById('delete_'+i ).checked = false; } } if(prefix1=="edit_") { if(document.getElementById("edit_"+ i).checked) document.getElementById('view_'+i ).checked = true; if(document.getElementById("edit_"+ i).checked==false) document.getElementById('edit_check_all').checked = false; } if(prefix1=="add_") { if(document.getElementById("add_"+ i).checked) document.getElementById('view_'+i ).checked = true; if(document.getElementById("add_"+ i).checked==false) document.getElementById('add_check_all').checked = false; } //if delete checked then view automatically checked if(prefix1=="delete_") { if(document.getElementById("delete_"+ i).checked) document.getElementById('view_'+i ).checked = true; if(document.getElementById("delete_"+ i).checked==false) document.getElementById('delete_check_all').checked = false; } if(prefix1=="view_") { if(document.getElementById('view_'+i).checked == false) { document.getElementById('edit_'+i ).checked = false; document.getElementById('delete_'+i ).checked = false; } if(document.getElementById("view_"+ i).checked==false) { document.getElementById('delete_check_all').checked = false; document.getElementById('edit_check_all').checked = false; document.getElementById('view_check_all').checked = false; } } if(document.getElementById("homepage_"+ i).checked) PrivatePermission = PrivatePermission + "1,"; else PrivatePermission = PrivatePermission + "0,"; //Calculate the Permission Value According to the user select Permission=0; if(document.getElementById("view_"+ i).checked) Permission+=8; if(document.getElementById("add_"+ i).checked) Permission+=4; if(document.getElementById("edit_"+ i).checked) Permission+=2; if(document.getElementById("delete_"+ i).checked) Permission+=1; FinalPermission = FinalPermission + "" + Permission + ","; } document.getElementById('TxtPermissionList').value = FinalPermission; document.getElementById('home_page_list').value = PrivatePermission; $.uniform.update(); } function check_module_view2(module) { var welements = document.getElementsByClass(module); for (var i = 0; i < welements.length; i++) { if(document.getElementById(prefix+ module).checked==true) welements[i].checked=true; else welements[i].checked=false; } $.uniform.update(); } function display_alert(controller,controllerfunction,id,table,field,page) { $("#alert_show").empty().html('<CENTER><img src="<?= base_url() ?>assets/img/loading.gif" class="loading"/></CENTER>'); $("#alert_show").load("<?= site_url() ?>/"+controller+'/'+controllerfunction+'/'+id+'/'+table+'/'+field+'/'+page); } function viewformdata(controller,controllerfunction,id) { $("#inner_content").empty().html('<CENTER><img src="<?= base_url() ?>assets/img/loading.gif" class="loading"/></CENTER>'); $("#inner_content").load("<?= site_url() ?>/" +controller+'/'+controllerfunction+'/'+id); } function remove_alert(id) { var clicked = function(){ $.fallr('hide'); $.ajax({ type: "GET", dataType:"json", url: "<?= site_url('settings/remove_alert/') ?>/"+'alert'+"/"+id+"/alert_id", success: function(msg){ viewdata('settings','viewinsettingssearch','search_alert','view_alert','1'); } }); }; $.fallr('show', { buttons : { button1 : {text: 'Yes', danger: true, onclick: clicked}, button2 : {text: 'Cancel', onclick: function(){$.fallr('hide')}} }, content : '<p>Are you sure you want to remove ?</p>', icon : 'error' }); } </script>