id = $context['id']; $this->database = $context['database']; $this->group_access = $context['group_access']; $this->db_name = $context['db_name']; $this->table_module = $context['table_module']; $this->table_module_sub = $context['table_module_sub']; $this->table = $context['group_table']; } public function form() { $id = $this->id; $database = $this->database; $group_access = $this->group_access; $db_name = $this->db_name; $table_module = $this->table_module; $table_module_sub = $this->table_module_sub; $table = $this->table; $perms = array(); $perms[] = $permission; $get_mod = " SELECT * FROM $db_name$table_module WHERE status = '1' ORDER BY ordering ASC "; $query_mod = $database->getAll($get_mod); ?>
getAll($get_module_type); foreach($query_module_type AS $results_module_type) { $module_type = mysql_escape_string($results_module_type['module_type']); $get_permission_type = " SELECT permission_type FROM $db_name$table_module_sub WHERE module_type = '$module_type' AND primary_module = '$id' GROUP BY permission_type ORDER BY permission_type ASC "; $query_permission_type = $database->getAll($get_permission_type); $perm_all = array(); foreach($query_permission_type AS $results_permission_type) { $permission_type = $results_permission_type['permission_type']; $get_sub_mod = " SELECT permission FROM $db_name$table_module_sub WHERE permission_type = '$permission_type' AND module_type = '$module_type' AND primary_module = '$id'"; $query_sub_mod = $database->getAll($get_sub_mod); $permission_array = array(); foreach($query_sub_mod AS $results_sub_mod) $permission_array[] = $results_sub_mod['permission']; $perm_sum = acl::setup_acl($permission_array); $perm_all[$permission_type] = $perm_sum; } ?>
 
  Check - Uncheck Read Write Delete
      checked="checked" value="" /> Delete  checked="checked" value="" /> Write   checked="checked" value="" /> Write checked="checked" value="" /> Delete checked="checked" value="" /> Read   checked="checked" value="" /> Read  checked="checked" value="" /> Delete checked="checked" value="" /> Read checked="checked" value="" /> Write  checked="checked" value="" /> Read checked="checked" value="" /> Write checked="checked" value="" /> Delete
 
  
     
id; $table = $this->table; $database = $this->database; $db_name = $this->db_name; $permissions_access = $_POST['permission_access']; $permissions = array(); if(is_array($permissions_access)) foreach($permissions_access AS $perm) $permissions[] = $perm; $access = acl::setup_acl($permissions); $update_groups = " UPDATE $db_name$table SET access = '$access' WHERE id = '$id' LIMIT 1"; $database->query($update_groups); } } ?>