PHP Classes

File: views/manage/acl.php

Recommend this page to a friend!
  Classes of Roni  >  EZ PHP RBAC  >  views/manage/acl.php  >  Download  
File: views/manage/acl.php
Role: Example script
Content type: text/plain
Description: Example script
Manages the accesses features by users and roles
Author: By
Last change:
Date: 4 months ago
Size: 4,712 bytes


Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="en">
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>Manage Role Access</title>
     <link rel="stylesheet" type="text/css" href="<?php echo $this->ezuri->assets_url('css/style.css')?>" media="all" />
     <script type="text/javascript" src="<?php echo $this->ezuri->assets_url('js/jquery-1.6.2.min.js')?>"></script>
<body class="bg_c">
<div id="page" class="container">
    <div id="header">
        <div class="top-menus">
            <a href="">help</a> |
            <a href="">ezrbac</a> |
            <?php echo anchor($logout_url,'Logout'); ?>
        <div id="logo"><h3>Manage ezRbac ACL</h3></div>
    </div><!-- header -->

    <div class="container">
        <div id="content">
            <h1>Role's Privilege Manager</h1>
            <p>This interface helps to manage the user's access Privilege according their role.</p>
            <div class="form">
                <form id="frm_acl_gui" method="post" onsubmit="return false">
                    <div class="row">
                        <label for="form_field_user_role">Select user Role<span class="required">*</span></label>
                           <select size="1" name="user_role_id" id="form_field_user_role" style="width:250px;" onchange="update_previlage()">
                        <option value="0">--select--</option>
foreach ($access_roles as $role) {
"<option value='$role[id]'>$role[role_name]</option>";
                   <div class="row">
                        <label for="form_field_access_node">Select Controller<span class="required">*</span></label>
                           <select size="1" name="controller" id="form_field_access_node" style="width:250px;" onchange="update_previlage()">
                        <option value="0">--select--</option>
foreach ($controller_list as $controller) {
"<option value='$controller'>$controller</option>";
                    <div class="row">
                        <label>Chose Privileges<span class="required">*</span></label>
                    <div class="clear"></div>
                    <?php $i=0; foreach($access_list as $access){ ?>
<div class="row">
                        <label for="chk_permisssion_<?php echo $i ?>" class="secondlevel">Can <?php echo ucfirst($access); ?>?</label>
                        <input id="chk_permisssion_<?php echo $i ?>" class="permission_cls" type="checkbox" name="permission[]" value="<?php echo pow(2,$i) ?>" />
                   <?php $i++; } ?>

                   <div class="row" style="padding-left: 150px">
                       <button id="save_data" class="btn_a btn " type="submit">Save</button>
        </div><!-- content -->

<div id="footer">
    Powered by <a rel="external" href="">CodeIgniter</a>. <br>A product of <a rel="external" href="">Xiidea</a>.

    (function($,a){$.fn.serializeObject=function(){var b={};$.each(this.serializeArray(),function(d,e){var,c=e.value;b[f]=b[f]===a?c:$.isArray(b[f])?b[f].concat(c):[b[f],c]});return b}})(jQuery);

        if($("#form_field_user_role").val()==0 || $("#form_field_access_node").val()==0 ){
            alert("You must select the user role and access node first!");
            return false;

        var post = $("#frm_acl_gui").serializeObject();

        $.post('<?php echo $update_url; ?>',post,function(data) {
           // alert('saved!');

function update_previlage(){
    if($("#form_field_user_role").val()==0 || $("#form_field_access_node").val()==0){
            $(".permission_cls").attr('checked', false);
            return ;
    var post={
        user_role_id :$("#form_field_user_role").val(),
        controller :$("#form_field_access_node").val()
    $.post('<?php echo $permission_url; ?>', post, function(data) {
      for (var i in data){
          $("#chk_permisssion_"+i).attr('checked', (data[i]=='1'));
    //Get/Set Current Value to check box



For more information send a message to info at phpclasses dot org.