Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -0,0 +1,266 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-12-02 10:17:19 +0000 (Fri, 02 Dec 2005) $
|
||||
| > $Revision: 89 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > API: Core functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Wednesday 19th July 2005 (14:57)
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/**
|
||||
* API: CORE
|
||||
*
|
||||
* This class deals with all core functions.
|
||||
* This class deals with all available language functions.
|
||||
* If $ipsclass is passed to it, then it will skip the init
|
||||
* However, if $ipsclass is not an object, it'll initialize
|
||||
* the $ipsclass object, and by default load all the required
|
||||
* IPB classes and init them (DB, converge, forums, display, session)
|
||||
* and it'll also get a new DB connection and load settings and caches.
|
||||
* You can alter which classes are loaded via the $this->load_classes[-class-] = 1;
|
||||
* array
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage APIs
|
||||
* @author Matt Mecham
|
||||
* @copyright Invision Power Services, Inc.
|
||||
* @version 2.1
|
||||
*/
|
||||
|
||||
/**
|
||||
* API: CORE
|
||||
*
|
||||
* This class deals with all core functions.
|
||||
*
|
||||
* @package InvisionPowerBoard
|
||||
* @subpackage APIs
|
||||
* @author Matt Mecham
|
||||
* @version 2.1
|
||||
* @since 2.1.0
|
||||
*/
|
||||
class api_core
|
||||
{
|
||||
/**
|
||||
* IPS Class Object
|
||||
*
|
||||
* @var object
|
||||
*/
|
||||
var $ipsclass;
|
||||
|
||||
/**
|
||||
* API init run
|
||||
*
|
||||
* @var integer boolean
|
||||
*/
|
||||
var $init_run;
|
||||
|
||||
/**
|
||||
* API Error string
|
||||
*
|
||||
* @var array Errors
|
||||
*/
|
||||
var $api_error = array();
|
||||
|
||||
/**
|
||||
* API Load full?
|
||||
*
|
||||
* @var integer boolean
|
||||
*/
|
||||
var $full_load = 1;
|
||||
|
||||
/**
|
||||
* API Path to IPB root (where init.php/index.php is)
|
||||
*
|
||||
* @var string Path to IPB root folder
|
||||
*/
|
||||
var $path_to_ipb = './';
|
||||
|
||||
/**
|
||||
* API Load classes
|
||||
*
|
||||
* @var array Classes to load default: [display,forums,converge,session]
|
||||
*/
|
||||
var $load_classes = array( 'display' => 1,
|
||||
'forums' => 1,
|
||||
'converge' => 1,
|
||||
'session' => 1 );
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// API init
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/**
|
||||
* Determines if we have required ipsclass vars
|
||||
* on hand
|
||||
*
|
||||
* @return void;
|
||||
*/
|
||||
function api_init()
|
||||
{
|
||||
//-------------------------------
|
||||
// Already loaded?
|
||||
//-------------------------------
|
||||
|
||||
if ( $this->init_run OR ! $this->full_load )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// INIT run?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! defined( 'IPB_INIT_DONE' ) )
|
||||
{
|
||||
define( 'IPB_THIS_SCRIPT', 'api' );
|
||||
|
||||
require_once( $this->path_to_ipb.'init.php' );
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// IPS Class an object?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! is_object( $this->ipsclass ) )
|
||||
{
|
||||
$INFO = array();
|
||||
|
||||
//--------------------------------
|
||||
// Load our classes
|
||||
//--------------------------------
|
||||
|
||||
require_once ROOT_PATH . "sources/ipsclass.php";
|
||||
require_once ROOT_PATH . "conf_global.php";
|
||||
|
||||
# Initiate super-class
|
||||
$ipsclass = new ipsclass();
|
||||
$ipsclass->vars = $INFO;
|
||||
|
||||
$this->ipsclass =& $ipsclass;
|
||||
$this->ipsclass->base_url = $this->ipsclass->vars['board_url'].'/index.'.$this->ipsclass->vars['php_ext'].'?';
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// DB connected?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! defined( 'IPSCLASS_DB_LOADED' ) )
|
||||
{
|
||||
$this->ipsclass->vars['sql_force_new_connection'] = 1;
|
||||
$this->ipsclass->init_db_connection();
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// DISPLAY Object?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! is_object( $this->ipsclass->print ) AND $this->load_classes['print'] )
|
||||
{
|
||||
require_once ROOT_PATH . "sources/classes/class_display.php";
|
||||
|
||||
$this->ipsclass->print = new display();
|
||||
$this->ipsclass->print->ipsclass =& $this->ipsclass;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// SESSION Object?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! is_object( $this->ipsclass->sess ) AND $this->load_classes['session'] )
|
||||
{
|
||||
require_once ROOT_PATH . "sources/classes/class_session.php";
|
||||
|
||||
$this->ipsclass->sess = new session();
|
||||
$this->ipsclass->sess->ipsclass =& $this->ipsclass;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// FORUMS Object?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! is_object( $this->ipsclass->forums ) AND $this->load_classes['forums'] )
|
||||
{
|
||||
require_once ROOT_PATH . "sources/classes/class_forums.php";
|
||||
|
||||
$this->ipsclass->forums = new forum_functions();
|
||||
$this->ipsclass->forums->ipsclass =& $this->ipsclass;
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Converge Object?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! is_object( $this->ipsclass->converge ) AND $this->load_classes['converge'] )
|
||||
{
|
||||
require_once KERNEL_PATH . "class_converge.php";
|
||||
|
||||
$this->ipsclass->converge = new class_converge( $this->ipsclass->DB );
|
||||
}
|
||||
|
||||
//-------------------------------
|
||||
// Caches init?
|
||||
//-------------------------------
|
||||
|
||||
if ( ! defined('IPSCLASS_CACHE_LOADED') )
|
||||
{
|
||||
$this->ipsclass->init_load_cache( array('rss_export', 'bbcode', 'badwords', 'emoticons', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats') );
|
||||
}
|
||||
|
||||
if ( ! defined('IPSCLASS_INITIATED') )
|
||||
{
|
||||
$this->ipsclass->initiate_ipsclass();
|
||||
$this->ipsclass->md5_check = $ipsclass->return_md5_check();
|
||||
$this->ipsclass->parse_incoming();
|
||||
|
||||
if ( ! is_object( $this->ipsclass->forums ) )
|
||||
{
|
||||
$this->ipsclass->forums->ipsclass =& $this->ipsclass;
|
||||
$this->ipsclass->forums->strip_invisible = 1;
|
||||
$this->ipsclass->forums->forums_init();
|
||||
}
|
||||
|
||||
$this->ipsclass->load_skin();
|
||||
}
|
||||
|
||||
$this->init_run = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user