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/mod_example.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 FILE (EXAMPLE)
|   > Module written by Matt Mecham
|   > Date started: Thu 14th April 2005 (17:59)
|
+--------------------------------------------------------------------------
*/

//=====================================
// Define class, this must be the same
// in all modules
//=====================================

class module
{
	//=====================================
	// Define vars if required
	//=====================================
	
	var $ipsclass;
	var $class  = "";
	var $module = "";
	var $html   = "";
	
	var $result = "";
	
	//=====================================
	// Constructer, called and run by IPB
	//=====================================
	
	function run_module()
	{
		//=====================================
		// Do any set up here, like load lang
		// skin files, etc
		//=====================================
		
		$this->ipsclass->load_language('lang_boards');
        $this->ipsclass->load_template('skin_boards');
		
		//=====================================
		// Set up structure
		//=====================================
		
		switch( $this->ipsclass->input['cmd'] )
		{
			case 'dosomething':
				$this->do_something();
				break;
				
			default:
				$this->do_something();
				break;
		}
		
		print $this->result;
		
		exit();
	}
	
	//------------------------------------------
	// do_something
	// 
	// Test sub, show if admin or not..
	//
	//------------------------------------------
	
	function do_something()
	{
		if ( $this->ipsclass->member['mgroup'] == $this->ipsclass->vars['admin_group'] )
		{
			$this->result = "You're an admin!";
		}
		else
		{
			$this->result = "You're not an admin!";
		}
	}
	
	
}


?>