/usr/home/clubcoc0/www/application/third_party/MX/Router.php
{
if(is_file(APPPATH.'controllers/'.$module.'/'.ucfirst($directory).$ext))
{
$this->directory = $module.'/';
return array_slice($segments, 1);
}
/* application sub-sub-directory controller exists? */
if($controller)
{
if(is_file(APPPATH.'controllers/'.$module.'/'.$directory.'/'.ucfirst($controller).$ext))
{
$this->directory = $module.'/'.$directory.'/';
return array_slice($segments, 2);
}
}
}
/* application controllers sub-directory exists? */
if (is_dir(APPPATH.'controllers/'.$module.'/'))
{
$this->directory = $module.'/';
return array_slice($segments, 1);
}
/* application controller exists? */
if (is_file(APPPATH.'controllers/'.ucfirst($module).$ext))
{
return $segments;
}
$this->located = -1;
}
/* set module path */
protected function _set_module_path(&$_route)
{
if ( ! empty($_route))
{
// Are module/directory/controller/method segments being specified?
Arguments
"is_dir(): open_basedir restriction in effect. File(/usr/home/clubcoc0/www/application/controllers/index.html/) is not within the allowed path(s): (/usr/home/clubcoc0:/home/clubcoc0:/tmp)"
/usr/home/clubcoc0/www/application/third_party/MX/Router.php
{
if(is_file(APPPATH.'controllers/'.$module.'/'.ucfirst($directory).$ext))
{
$this->directory = $module.'/';
return array_slice($segments, 1);
}
/* application sub-sub-directory controller exists? */
if($controller)
{
if(is_file(APPPATH.'controllers/'.$module.'/'.$directory.'/'.ucfirst($controller).$ext))
{
$this->directory = $module.'/'.$directory.'/';
return array_slice($segments, 2);
}
}
}
/* application controllers sub-directory exists? */
if (is_dir(APPPATH.'controllers/'.$module.'/'))
{
$this->directory = $module.'/';
return array_slice($segments, 1);
}
/* application controller exists? */
if (is_file(APPPATH.'controllers/'.ucfirst($module).$ext))
{
return $segments;
}
$this->located = -1;
}
/* set module path */
protected function _set_module_path(&$_route)
{
if ( ! empty($_route))
{
// Are module/directory/controller/method segments being specified?
Arguments
"/usr/home/clubcoc0/www/application/controllers/index.html/"
/usr/home/clubcoc0/www/application/third_party/MX/Router.php
{
public $module;
private $located = 0;
public function fetch_module()
{
return $this->module;
}
protected function _set_request($segments = array())
{
if ($this->translate_uri_dashes === TRUE)
{
foreach(range(0, 2) as $v)
{
isset($segments[$v]) && $segments[$v] = str_replace('-', '_', $segments[$v]);
}
}
$segments = $this->locate($segments);
if($this->located == -1)
{
$this->_set_404override_controller();
return;
}
if(empty($segments))
{
$this->_set_default_controller();
return;
}
$this->set_class($segments[0]);
if (isset($segments[1]))
{
$this->set_method($segments[1]);
}
else
Arguments
array:1 [
0 => "index.html"
]
/usr/home/clubcoc0/www/system/core/Router.php
// Remove the original string from the matches array.
array_shift($matches);
// Execute the callback using the values in matches as its parameters.
$val = call_user_func_array($val, $matches);
}
// Are we using the default routing method for back-references?
elseif (strpos($val, '$') !== FALSE && strpos($key, '(') !== FALSE)
{
$val = preg_replace('#^'.$key.'$#', $val, $uri);
}
$this->_set_request(explode('/', $val));
return;
}
}
// If we got this far it means we didn't encounter a
// matching route so we'll set the site default route
$this->_set_request(array_values($this->uri->segments));
}
// --------------------------------------------------------------------
/**
* Set class name
*
* @param string $class Class name
* @return void
*/
public function set_class($class)
{
$this->class = str_replace(array('/', '.'), '', $class);
}
// --------------------------------------------------------------------
/**
* Fetch the current class
*
Arguments
array:1 [
0 => "index.html"
]
/usr/home/clubcoc0/www/system/core/Router.php
$this->uri->rsegments = array(
1 => $this->class,
2 => $this->method
);
}
else
{
$this->_set_default_controller();
}
// Routing rules don't apply to query strings and we don't need to detect
// directories, so we're done here
return;
}
// Is there anything to parse?
if ($this->uri->uri_string !== '')
{
$this->_parse_routes();
}
else
{
$this->_set_default_controller();
}
}
// --------------------------------------------------------------------
/**
* Set request route
*
* Takes an array of URI segments as input and sets the class/method
* to be called.
*
* @used-by CI_Router::_parse_routes()
* @param array $segments URI segments
* @return void
*/
protected function _set_request($segments = array())
/usr/home/clubcoc0/www/system/core/Router.php
// --------------------------------------------------------------------
/**
* Class constructor
*
* Runs the route mapping function.
*
* @param array $routing
* @return void
*/
public function __construct($routing = NULL)
{
$this->config =& load_class('Config', 'core');
$this->uri =& load_class('URI', 'core');
$this->enable_query_strings = ( ! is_cli() && $this->config->item('enable_query_strings') === TRUE);
// If a directory override is configured, it has to be set before any dynamic routing logic
is_array($routing) && isset($routing['directory']) && $this->set_directory($routing['directory']);
$this->_set_routing();
// Set any routing overrides that may exist in the main index file
if (is_array($routing))
{
empty($routing['controller']) OR $this->set_class($routing['controller']);
empty($routing['function']) OR $this->set_method($routing['function']);
}
log_message('info', 'Router Class Initialized');
}
// --------------------------------------------------------------------
/**
* Set route mapping
*
* Determines what should be served based on the URI request,
* as well as any "routes" that have been set in the routing config file.
*
* @return void
/usr/home/clubcoc0/www/system/core/Common.php
require_once(APPPATH.$directory.'/'.$name.'.php');
}
}
// Did we find the class?
if ($name === FALSE)
{
// Note: We use exit() rather than show_error() in order to avoid a
// self-referencing loop with the Exceptions class
set_status_header(503);
echo 'Unable to locate the specified class: '.$class.'.php';
exit(5); // EXIT_UNK_CLASS
}
// Keep track of what we just loaded
is_loaded($class);
$_classes[$class] = isset($param)
? new $name($param)
: new $name();
return $_classes[$class];
}
}
// --------------------------------------------------------------------
if ( ! function_exists('is_loaded'))
{
/**
* Keeps track of which libraries have been loaded. This function is
* called by the load_class() function above
*
* @param string
* @return array
*/
function &is_loaded($class = '')
{
static $_is_loaded = array();
if ($class !== '')
/usr/home/clubcoc0/www/system/core/CodeIgniter.php
/*
* ------------------------------------------------------
* Instantiate the UTF-8 class
* ------------------------------------------------------
*/
$UNI =& load_class('Utf8', 'core');
/*
* ------------------------------------------------------
* Instantiate the URI class
* ------------------------------------------------------
*/
$URI =& load_class('URI', 'core');
/*
* ------------------------------------------------------
* Instantiate the routing class and set the routing
* ------------------------------------------------------
*/
$RTR =& load_class('Router', 'core', isset($routing) ? $routing : NULL);
/*
* ------------------------------------------------------
* Instantiate the output class
* ------------------------------------------------------
*/
$OUT =& load_class('Output', 'core');
/*
* ------------------------------------------------------
* Is there a valid cache file? If so, we're done...
* ------------------------------------------------------
*/
if ($EXT->call_hook('cache_override') === FALSE && $OUT->_display_cache($CFG, $URI) === TRUE)
{
exit;
}
/*
* -----------------------------------------------------
Arguments
/usr/home/clubcoc0/www/index.php
DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR
);
}
else
{
header('HTTP/1.1 503 Service Unavailable.', TRUE, 503);
echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF;
exit(3); // EXIT_CONFIG
}
define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR);
/*
* --------------------------------------------------------------------
* LOAD THE BOOTSTRAP FILE
* --------------------------------------------------------------------
*
* And away we go...
*/
require_once BASEPATH.'core/CodeIgniter.php';
Arguments
"/usr/home/clubcoc0/www/system/core/CodeIgniter.php"