HEX
Server: Apache/2.4.59 (Debian)
System: Linux skycube.cz 4.19.0-25-amd64 #1 SMP Debian 4.19.289-2 (2023-08-08) x86_64
User: ilya (534)
PHP: 7.3.31-1~deb10u7
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: /var/www/ilya/data/www/kamforum.ru/modules/module_loader.php
<?php
/*
+--------------------------------------------------------------------------
|   Invision Power Board v2.1.5
|   =============================================
|   by Matthew Mecham
|   (c) 2001 - 2005 Invision Power Services, Inc.
|   http://www.invisionpower.com
|   =============================================
|   Web: http://www.invisionboard.com
|   Time: Sun, 09 Oct 2005 11:51:26 GMT
|   Release: 1a47e28f0443faa9f14d0c0a45151e54
|   Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
|
|   > MODULE LOADER
|   > Module written by Matt Mecham
|   > Date started: Thu 14th April 2005 (17:55)
|
+--------------------------------------------------------------------------
| USAGE:
| ------
|
| This is a module loader file
| example: index.php?act=module&module=register&var=foo
| 
| Looks for a file called "mod_register.php" and runs it
|
+--------------------------------------------------------------------------
*/

class module_loader
{
	var $ipsclass;
	var $class;
	var $module;
	
	function run_loader()
	{
		$this->module = $this->ipsclass->txt_alphanumerical_clean($this->ipsclass->input['module']);
			
		if ( $this->module == "" )
		{
			$this->_return_dead();
		}
		
		//----------------------------------
		// Does module file exist?
		//----------------------------------
		
		if ( ! @file_exists( ROOT_PATH.'modules/mod_'.$this->module.'.php' ) )
		{
			$this->_return_dead();
		}
		
		//----------------------------------
		// Require and run
		//----------------------------------
		
		require_once( ROOT_PATH.'modules/mod_'.$this->module.'.php' );
		
		$mod_run           = new module();
		$mod_run->ipsclass =& $this->ipsclass;
		$mod_run->run_module();
		
		exit();
	}
	
	//------------------------------------------
	// _return_dead
	// 
	// Return to board index
	//
	//------------------------------------------
	
	function _return_dead()
	{
		global $ibforums;
		
		header("Location: ".$ibforums->base_url);
		
		exit();
	}
	
}


?>