Version 2.2.2
This commit is contained in:
1 parent
22f1b963ee
commit
a3bb603c96
858 files changed
+479463
-188140
No files matched your search
+83
-49
@@ -2,21 +2,28 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board
|
||||
| Invision Power Board 2.2.2
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services
|
||||
| (c) 2001 - 2006 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| Email: matt@invisionpower.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
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
|
||||
| http://www.invisionboard.com/?license
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-09-27 15:23:03 +0100 (Wed, 27 Sep 2006) $
|
||||
| > $Revision: 579 $
|
||||
| > $Author: matt $
|
||||
| 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 $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Wrapper script
|
||||
@@ -66,6 +73,28 @@ 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?
|
||||
@@ -83,7 +112,7 @@ $ipsclass->vars = $INFO;
|
||||
//--------------------------------
|
||||
// The clocks a' tickin'
|
||||
//--------------------------------
|
||||
|
||||
|
||||
$Debug = new Debug;
|
||||
$Debug->startTimer();
|
||||
|
||||
@@ -97,7 +126,7 @@ $ipsclass->init_db_connection();
|
||||
// Set debug mode
|
||||
//--------------------------------
|
||||
|
||||
$ipsclass->DB->set_debug_mode( $ipsclass->vars['sql_debug'] == 1 ? ( isset($_GET['debug']) ? intval($_GET['debug']) : 0 ) : 0 );
|
||||
$ipsclass->DB->set_debug_mode( ( IPS_SQL_DEBUG_MODE ) ? ( isset($_GET['debug']) ? intval($_GET['debug']) : 0 ) : 0 );
|
||||
|
||||
//--------------------------------
|
||||
// INIT other classes
|
||||
@@ -174,17 +203,22 @@ $choice = array(
|
||||
// Short tags...
|
||||
//===========================================================================
|
||||
|
||||
if( is_array($ipsclass->input['act']) )
|
||||
{
|
||||
$ipsclass->input['act'] = ( IPB_MAKE_PORTAL_HOMEPAGE ) ? 'home' : 'idx';
|
||||
}
|
||||
|
||||
//---------------------------------------------------
|
||||
// Check to make sure the array key exits..
|
||||
//---------------------------------------------------
|
||||
|
||||
$ipsclass->input['_low_act'] = strtolower( $ipsclass->input['act'] );
|
||||
|
||||
if ( ! isset($choice[ $ipsclass->input['_low_act'] ][0]) )
|
||||
if ( ! isset($choice[ strtolower($ipsclass->input['act']) ][0]) )
|
||||
{
|
||||
$ipsclass->input['act'] = $ipsclass->input['_low_act'] = ( IPB_MAKE_PORTAL_HOMEPAGE ) ? 'home' : 'idx';
|
||||
$ipsclass->input['act'] = ( IPB_MAKE_PORTAL_HOMEPAGE ) ? 'home' : 'idx';
|
||||
}
|
||||
|
||||
$ipsclass->input['_low_act'] = strtolower( $ipsclass->input['act'] );
|
||||
|
||||
if ( isset($ipsclass->input['showforum']) && $ipsclass->input['showforum'] != "" )
|
||||
{
|
||||
$ipsclass->input['act'] = "sf";
|
||||
@@ -194,19 +228,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'];
|
||||
}
|
||||
@@ -227,7 +261,7 @@ else if ( isset($ipsclass->input['autocom']) && $ipsclass->input['autocom'] != "
|
||||
}
|
||||
else
|
||||
{
|
||||
$ipsclass->input['act'] = ! isset($ipsclass->input['act']) || $ipsclass->input['act'] == '' ? "idx" : $ipsclass->input['act'];
|
||||
$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' )
|
||||
@@ -248,7 +282,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 );
|
||||
@@ -286,7 +320,7 @@ $ipsclass->my_session = $ipsclass->sess->session_id; // Used in code
|
||||
//-----------------------------------------
|
||||
|
||||
$ipsclass->md5_check = $ipsclass->return_md5_check();
|
||||
|
||||
|
||||
//--------------------------------
|
||||
// Initialize the forums
|
||||
//--------------------------------
|
||||
@@ -307,7 +341,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'];
|
||||
|
||||
@@ -339,10 +373,10 @@ $ipsclass->hdl_forum_read_cookie();
|
||||
|
||||
$ipsclass->skin_id = $ipsclass->skin['_setid'];
|
||||
|
||||
$ipsclass->vars['img_url'] = 'style_images/' . $ipsclass->skin['_imagedir'];
|
||||
$ipsclass->vars['AVATARS_URL'] = 'style_avatars';
|
||||
$ipsclass->vars['EMOTICONS_URL'] = 'style_emoticons/<#EMO_DIR#>';
|
||||
$ipsclass->vars['mime_img'] = 'style_images/<#IMG_DIR#>';
|
||||
$ipsclass->vars['img_url'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_images/' . $ipsclass->skin['_imagedir'] : 'style_images/' . $ipsclass->skin['_imagedir'];
|
||||
$ipsclass->vars['AVATARS_URL'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_avatars' : 'style_avatars';
|
||||
$ipsclass->vars['EMOTICONS_URL'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_emoticons/<#EMO_DIR#>' : 'style_emoticons/<#EMO_DIR#>';
|
||||
$ipsclass->vars['mime_img'] = $ipsclass->vars['ipb_img_url'] ? $ipsclass->vars['ipb_img_url'] . 'style_images/<#IMG_DIR#>' : 'style_images/<#IMG_DIR#>';
|
||||
|
||||
//--------------------------------
|
||||
// Set up our language choice
|
||||
@@ -350,7 +384,7 @@ $ipsclass->vars['mime_img'] = 'style_images/<#IMG_DIR#>';
|
||||
|
||||
if ( !isset($ipsclass->vars['default_language']) OR $ipsclass->vars['default_language'] == "")
|
||||
{
|
||||
$ipsclass->vars['default_language'] = 'en';
|
||||
$ipsclass->vars['default_language'] = 'ru';
|
||||
}
|
||||
|
||||
//--------------------------------
|
||||
@@ -371,7 +405,7 @@ if ( (isset($ipsclass->input['setlanguage']) AND $ipsclass->input['setlanguage']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$ipsclass->load_language('lang_global');
|
||||
|
||||
//--------------------------------
|
||||
@@ -386,7 +420,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'];
|
||||
}
|
||||
@@ -399,7 +433,7 @@ if ( USE_SHUTDOWN and $ipsclass->input['act'] != 'task' )
|
||||
{
|
||||
@chdir( ROOT_PATH );
|
||||
$ROOT_PATH = getcwd();
|
||||
|
||||
|
||||
register_shutdown_function( array( &$ipsclass, 'my_deconstructor') );
|
||||
}
|
||||
|
||||
@@ -418,31 +452,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)
|
||||
@@ -451,31 +485,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';
|
||||
@@ -484,18 +518,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';
|
||||
@@ -507,7 +541,7 @@ if ($ipsclass->input['_low_act'] != 'login' and
|
||||
|
||||
//===========================================================================
|
||||
// REQUIRE AND RUN
|
||||
//===========================================================================
|
||||
//===========================================================================
|
||||
|
||||
if ( $ipsclass->input['act'] == 'home' AND $ipsclass->vars['csite_on'] )
|
||||
{
|
||||
@@ -526,7 +560,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 );
|
||||
@@ -540,7 +574,7 @@ else if ( $ipsclass->input['act'] == 'component' )
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
// Require and run
|
||||
require_once( ROOT_PATH."sources/action_public/".$choice[ strtolower($ipsclass->input['act']) ][0].".php" );
|
||||
$runme = new $choice[ strtolower($ipsclass->input['act']) ][1];
|
||||
|
||||
Reference in new issue
Block a user