Version 2.3.6

This commit is contained in:
Neo committed 2025-12-19 00:26:08 -08:00
1 parent a3bb603c96
commit 19b38c7c74
764 files changed
+143731 -118164

No files matched your search

+54 -78
View File
@@ -1,29 +1,23 @@
<?php
#apd_set_pprof_trace();
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services
| (c) 2001 - 2005 Invision Power Services
| http://www.invisionpower.com
| ========================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
| Email: matt@invisionpower.com
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-11-13 15:22:45 -0600 (Mon, 13 Nov 2006) $
| > $Revision: 726 $
| > $Author: bfarber $
| > $Date: 2008-10-02 11:12:17 -0400 (Thu, 02 Oct 2008) $
| > $Revision: 2569 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Wrapper script
@@ -53,7 +47,6 @@ define( 'IPB_LOAD_SQL' , 'queries' );
require_once( './init.php' );
//===========================================================================
// MAIN PROGRAM
//===========================================================================
@@ -73,28 +66,6 @@ require_once KERNEL_PATH . "class_converge.php";
if ( file_exists( ROOT_PATH . "conf_global.php" ) )
{
require_once ROOT_PATH . "conf_global.php";
// And the LOCALE Begin!
if ( $INFO['mysql_codepage'] ) {
switch ($INFO['mysql_codepage']) {
case 'koi8r':
if ( substr(PHP_OS, 0, 3) == 'WIN' )
{
setlocale(LC_ALL, 'Russian_Russia.20866');
} else {
setlocale(LC_ALL, 'ru_RU.KOI8R');
}
break;
default:
if ( substr(PHP_OS, 0, 3) == 'WIN' )
{
setlocale(LC_ALL, 'Russian_Russia.1251');
} else {
setlocale(LC_ALL, 'ru_RU.CP1251');
}
}
}
}
# Are we installed?
@@ -112,7 +83,7 @@ $ipsclass->vars = $INFO;
//--------------------------------
// The clocks a' tickin'
//--------------------------------
$Debug = new Debug;
$Debug->startTimer();
@@ -162,17 +133,17 @@ $choice = array(
"sc" => array( "boards" , 'boards' , array('chatting','birthdays', 'calendar') ),
"sf" => array( "forums" , 'forums' , array('announcements', 'multimod') ),
"sr" => array( "forums" , 'forums' , array() ),
"st" => array( "topics" , 'topics' , array('attachtypes','bbcode', 'multimod','ranks','profilefields' ) ),
"announce" => array( "announcements" , 'announcements', array('bbcode','badwords','emoticons','ranks','profilefields' ) ),
"st" => array( "topics" , 'topics' , array('badwords','emoticons','attachtypes','bbcode', 'multimod','ranks','profilefields' ) ),
"announce" => array( "announcements" , 'announcements', array('ranks' ) ),
"login" => array( "login" , 'login' , array() ),
"post" => array( "post" , 'post' , array('attachtypes','badwords','bbcode','emoticons','ranks' ) ),
"reg" => array( "register" , 'register' , array('profilefields') ),
"online" => array( "online" , 'online' , array() ),
"members" => array( "memberlist" , 'memberlist' , array('ranks','profilefields' ) ),
"help" => array( "help" , 'help' , array() ),
"search" => array( "search" , 'search' , array('badwords','emoticons','attachtypes','multimod','bbcode','ranks','profilefields' ) ),
"search" => array( "search" , 'search' , array('badwords','attachtypes','multimod','ranks' ) ),
"mod" => array( "moderate" , 'moderate' , array('attachtypes','multimod','bbcode','emoticons','badwords' ) ),
"print" => array( "misc/print_page" , 'printpage' , array('attachtypes','bbcode', 'multimod','ranks','profilefields' ) ),
"print" => array( "misc/print_page" , 'printpage' , array('attachtypes','multimod','ranks' ) ),
"forward" => array( "misc/forward_page" , 'forwardpage' , array() ),
"mail" => array( "misc/contact_member", 'contactmember', array() ),
"report" => array( "misc/contact_member", 'contactmember', array() ),
@@ -184,18 +155,19 @@ $choice = array(
"track" => array( "misc/tracker" , 'tracker' , array() ),
"stats" => array( "misc/stats" , 'stats' , array() ),
"attach" => array( "attach" , 'attach' , array('attachtypes' ) ),
'legends' => array( 'misc/legends' , 'legends' , array('badwords','bbcode' ,'emoticons' ) ),
'legends' => array( 'misc/legends' , 'legends' , array('badwords','bbcode','emoticons' ) ),
'calendar' => array( "calendar" , 'calendar' , array('attachtypes','bbcode', 'ranks', 'multimod', 'emoticons', 'badwords', 'calendars', 'profilefields' ) ),
'buddy' => array( "browsebuddy" , 'assistant' , array() ),
'mmod' => array( "misc/multi_moderate", 'mmod' , array('multimod' ) ),
'warn' => array( "misc/warn" , 'warn' , array('badwords','bbcode' ,'emoticons' ) ),
'home' => array( 'portal' , 'portal' , array('portal','attachtypes','bbcode', 'multimod','ranks','profilefields' ) ),
'home' => array( 'portal' , 'portal' , array('portal','attachtypes','multimod','ranks','profilefields' ) ),
'module' => array( 'modules' , 'modules' , array() ),
'task' => array( 'taskloader' , 'taskloader' , array() ),
'findpost' => array( 'findpost' , 'findpost' , array() ),
"xmlout" => array( "xmlout" , 'xmlout' , array('attachtypes','multimod','bbcode','ranks','profilefields','emoticons','badwords' ) ),
'paysubs' => array( 'paysubscriptions' , 'paysubscriptions' , array() ),
'rssout' => array( 'rssout' , 'rssout' , array() ),
'captcha' => array( 'captcha' , 'captcha' , array() ),
'component' => array( 'component' , 'component' , array() ),
);
@@ -203,6 +175,8 @@ $choice = array(
// Short tags...
//===========================================================================
$ipsclass->input['act'] = isset($ipsclass->input['act']) ? $ipsclass->input['act'] : ( IPB_MAKE_PORTAL_HOMEPAGE ? 'home' : 'idx' );
if( is_array($ipsclass->input['act']) )
{
$ipsclass->input['act'] = ( IPB_MAKE_PORTAL_HOMEPAGE ) ? 'home' : 'idx';
@@ -228,19 +202,19 @@ else if ( isset($ipsclass->input['showtopic']) && $ipsclass->input['showtopic']
{
$ipsclass->input['act'] = "st";
$ipsclass->input['t'] = intval($ipsclass->input['showtopic']);
//---------------------------------------------------
// Grab and cache the topic now as we need the 'f' attr for
// the skins...
//---------------------------------------------------
$ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'topics',
'where' => "tid=".$ipsclass->input['t'],
) );
$ipsclass->DB->simple_exec();
$ipsclass->topic_cache = $ipsclass->DB->fetch_row();
$ipsclass->input['f'] = $ipsclass->topic_cache['forum_id'];
}
@@ -264,7 +238,7 @@ else
$ipsclass->input['act'] = ( ! isset($ipsclass->input['act']) || $ipsclass->input['act'] == '' ) ? "idx" : $ipsclass->input['act'];
}
if ( !isset($ipsclass->input['_low_act']) OR !$ipsclass->input['_low_act'] OR $ipsclass->input['_low_act'] == 'idx' )
if ( !isset($ipsclass->input['_low_act']) OR !$ipsclass->input['_low_act'] OR $ipsclass->input['_low_act'] == 'idx' OR $ipsclass->input['_low_act'] == 'home' )
{
$ipsclass->input['_low_act'] = strtolower($ipsclass->input['act']);
}
@@ -273,7 +247,7 @@ if ( !isset($ipsclass->input['_low_act']) OR !$ipsclass->input['_low_act'] OR $i
// Start off the cache array
//--------------------------------
$ipsclass->cache_array = array_merge( $choice[ $ipsclass->input['_low_act'] ][2], array('rss_calendar', 'rss_export', 'components', 'banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') );
$ipsclass->cache_array = array_merge( $choice[ $ipsclass->input['_low_act'] ][2], array('skin_remap', 'rss_calendar', 'rss_export', 'components', 'banfilters', 'settings', 'group_cache', 'systemvars', 'skin_id_cache', 'forum_cache', 'moderators', 'stats', 'languages') );
//--------------------------------
// Module? Load INIT class
@@ -282,7 +256,7 @@ $ipsclass->cache_array = array_merge( $choice[ $ipsclass->input['_low_act'] ][2]
if ( ( $ipsclass->input['act'] == 'module' OR $ipsclass->input['act'] == 'component' ) and $ipsclass->input['module'] )
{
$file = ROOT_PATH.'sources/components_init/'. $ipsclass->txt_alphanumerical_clean( $ipsclass->input['module'] ).'.php';
if ( file_exists( $file ) )
{
require_once( $file );
@@ -320,7 +294,7 @@ $ipsclass->my_session = $ipsclass->sess->session_id; // Used in code
//-----------------------------------------
$ipsclass->md5_check = $ipsclass->return_md5_check();
//--------------------------------
// Initialize the forums
//--------------------------------
@@ -341,7 +315,7 @@ if( isset($ipsclass->member['view_prefs']) )
{
list($ppu,$tpu) = explode( "&", $ipsclass->member['view_prefs'] );
}
$ipsclass->vars['display_max_topics'] = ($tpu > 0) ? $tpu : $ipsclass->vars['display_max_topics'];
$ipsclass->vars['display_max_posts'] = ($ppu > 0) ? $ppu : $ipsclass->vars['display_max_posts'];
@@ -384,7 +358,7 @@ $ipsclass->vars['mime_img'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->v
if ( !isset($ipsclass->vars['default_language']) OR $ipsclass->vars['default_language'] == "")
{
$ipsclass->vars['default_language'] = 'ru';
$ipsclass->vars['default_language'] = 'en';
}
//--------------------------------
@@ -405,7 +379,7 @@ if ( (isset($ipsclass->input['setlanguage']) AND $ipsclass->input['setlanguage']
}
}
}
$ipsclass->load_language('lang_global');
//--------------------------------
@@ -420,7 +394,7 @@ if ( LEGACY_MODE )
$forums =& $ipsclass->forums;
$print =& $ipsclass->print;
$sess =& $ipsclass->sess;
$ipsclass->load_template('skin_global');
$ipsclass->skin_global = $ipsclass->compiled_templates['skin_global'];
}
@@ -433,7 +407,7 @@ if ( USE_SHUTDOWN and $ipsclass->input['act'] != 'task' )
{
@chdir( ROOT_PATH );
$ROOT_PATH = getcwd();
register_shutdown_function( array( &$ipsclass, 'my_deconstructor') );
}
@@ -452,31 +426,31 @@ if ($ipsclass->input['_low_act'] != 'login' and
//-----------------------------------------
// Do we have a display name?
//-----------------------------------------
if ( ! $ipsclass->member['members_display_name'] AND $ipsclass->member['members_created_remote'] )
{
$pmember = $ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'members_partial', 'where' => "partial_member_id=" . $ipsclass->member['id'] ) );
if ( $pmember['partial_member_id'] )
{
$ipsclass->boink_it( $ipsclass->base_url . 'act=reg&CODE=complete_login&mid='.$ipsclass->member['id'].'&key='.$pmember['partial_date'] );
}
}
//--------------------------------
// Do we have permission to view
// the board?
//--------------------------------
if ( $ipsclass->member['g_view_board'] != 1 )
{
{
$ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_view_board') );
}
//--------------------------------
// Is the board offline?
//--------------------------------
if ($ipsclass->vars['board_offline'] == 1)
{
if ($ipsclass->member['g_access_offline'] != 1)
@@ -485,31 +459,31 @@ if ($ipsclass->input['_low_act'] != 'login' and
$ipsclass->board_offline();
}
}
//--------------------------------
// Is log in enforced?
//--------------------------------
if ( (! $ipsclass->member['id']) and ($ipsclass->vars['force_login'] == 1) )
{
require ROOT_PATH."sources/action_public/login.php";
$runme = new login();
$runme->ipsclass =& $ipsclass;
$runme->auto_run();
}
//--------------------------------
// Show PURCHASE screen?
// Not enforced
//--------------------------------
if ( !isset($ipsclass->member['sub_end']) OR !$ipsclass->member['sub_end'] )
{
//--------------------------------
// 1: No enforce, chosen from reg
//--------------------------------
if ( ! $ipsclass->vars['subsm_enforce'] and (isset($ipsclass->member['subs_pkg_chosen']) AND $ipsclass->member['subs_pkg_chosen']) )
{
$ipsclass->input['act'] = 'paysubs';
@@ -518,18 +492,18 @@ if ($ipsclass->input['_low_act'] != 'login' and
$ipsclass->input['nocp'] = 1;
$ipsclass->input['msgtype'] = 'fromreg';
}
//--------------------------------
// Show PURCHASE screen?
// Enforced
//--------------------------------
if ( $ipsclass->vars['subsm_enforce'] and $ipsclass->member['mgroup'] == $ipsclass->vars['subsm_nopkg_group'] )
{
$ipsclass->input['act'] = 'paysubs';
$ipsclass->input['nocp'] = 1;
$ipsclass->input['msgtype'] = 'force';
if ( $ipsclass->member['subs_pkg_chosen'] )
{
$ipsclass->input['CODE'] = 'paymentmethod';
@@ -541,7 +515,7 @@ if ($ipsclass->input['_low_act'] != 'login' and
//===========================================================================
// REQUIRE AND RUN
//===========================================================================
//===========================================================================
if ( $ipsclass->input['act'] == 'home' AND $ipsclass->vars['csite_on'] )
{
@@ -560,7 +534,7 @@ else if ( $ipsclass->input['act'] == 'module' AND USE_MODULES )
else if ( $ipsclass->input['act'] == 'component' )
{
$file = ROOT_PATH.'sources/components_public/'. $ipsclass->txt_alphanumerical_clean( $ipsclass->input['module'] ).'.php';
if ( file_exists( $file ) )
{
require_once( $file );
@@ -574,11 +548,13 @@ else if ( $ipsclass->input['act'] == 'component' )
}
}
else
{
{
// Require and run
require_once( ROOT_PATH."sources/action_public/".$choice[ strtolower($ipsclass->input['act']) ][0].".php" );
$_pre_load = $ipsclass->memory_debug_make_flag();
require( ROOT_PATH."sources/action_public/".$choice[ strtolower($ipsclass->input['act']) ][0].".php" );
$runme = new $choice[ strtolower($ipsclass->input['act']) ][1];
$runme->ipsclass =& $ipsclass;
$ipsclass->memory_debug_add( "CORE: Loaded ".$choice[ strtolower($ipsclass->input['act']) ][0].".php", $_pre_load );
$runme->auto_run();
}