Library inside library

#10
[eluser]Sawariya[/eluser]
Thanks for your reply here is library..

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');


class Ua_authorize {


var $allowed_users = array(); // Allowed Groups and users
var $denied_users = array(); // Denied Groups and users
var $allowed_set = FALSE; // Has set_allowed() been used
var $denied_set = FALSE; // Has set_denied() been used
var $allow = FALSE; // Cuurent status of permission

function Ua_authorize()
{
$this->obj =& get_instance();
}

function roleCheck($role = 'guest', $uri = '')
{
If ( $role != 'guest' ) {

$list = 'ua_role_'.$role.'_allow';
$list = $this->obj->config->item($list);
if( !empty($list) ) { $this->set_allow($list); }

$list = 'ua_role_'.$role.'_deny';
$list = $this->obj->config->item($list);
if( !empty($list) ) { $this->set_deny($list); }
}
$this->obj->session->set_flashdata('uri', $uri);

log_message('debug','roleCheck: Role = '.$role);

if(!$this->obj->userauth->check('', TRUE)) {
redirect('user/auth_error');
}
}


Messages In This Thread
Library inside library - by El Forum - 01-09-2008, 05:14 AM
Library inside library - by El Forum - 01-09-2008, 05:23 AM
Library inside library - by El Forum - 01-09-2008, 05:42 AM
Library inside library - by El Forum - 01-09-2008, 05:43 AM
Library inside library - by El Forum - 01-09-2008, 05:53 AM
Library inside library - by El Forum - 01-09-2008, 05:54 AM
Library inside library - by El Forum - 01-09-2008, 05:57 AM
Library inside library - by El Forum - 01-09-2008, 06:00 AM
Library inside library - by El Forum - 01-09-2008, 06:02 AM
Library inside library - by El Forum - 01-09-2008, 06:04 AM
Library inside library - by El Forum - 01-09-2008, 06:08 AM
Library inside library - by El Forum - 01-09-2008, 06:10 AM
Library inside library - by El Forum - 01-09-2008, 06:18 AM
Library inside library - by El Forum - 01-09-2008, 06:21 AM
Library inside library - by El Forum - 01-09-2008, 06:26 AM
Library inside library - by El Forum - 01-09-2008, 06:30 AM
Library inside library - by El Forum - 01-09-2008, 06:31 AM
Library inside library - by El Forum - 01-09-2008, 06:32 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.