Version 2.2.2

This commit is contained in:
Neo committed 2025-12-19 00:24:35 -08:00
1 parent 22f1b963ee
commit a3bb603c96
858 files changed
+479463 -188140

No files matched your search

+77 -20
View File
@@ -1,16 +1,25 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Time: Tue, 01 Nov 2005 14:38:09 GMT
| Release: 68ff9281c6fdcce88910e08cec1045a3
| Licence Info: http://www.invisionboard.com/?license
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| Invision Power Board INSTALLER
| ========================================
| 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: Monday 05th of March 2007 10:10:55 PM
| Release: e3790216629e5a2aaf37070b32237f06
| 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-10-10 16:01:09 +0100 (Mon, 10 Oct 2005) $
| > $Revision: 5 $
@@ -332,7 +341,7 @@ class ipsclass {
// Char set
//-----------------------------------------
$this->vars['gb_char_set'] = $this->vars['gb_char_set'] ? $this->vars['gb_char_set'] : 'iso-8859-1';
$this->vars['gb_char_set'] = $this->vars['gb_char_set'] ? $this->vars['gb_char_set'] : 'windows-1251';
//-----------------------------------------
// PHP API
@@ -487,7 +496,7 @@ class ipsclass {
* @return void
*/
function init_db_connection( $db, $user, $pass, $host, $pre, $driver='mysql' )
function init_db_connection( $db, $user, $pass, $host, $pre, $cp, $driver='mysql' )
{
//-----------------------------------------
// INIT
@@ -503,8 +512,8 @@ class ipsclass {
{
$file = str_replace( '<%driver%>', $driver, INS_SQL_FILE );
}
$classname = "db_driver_".$driver;
$classname = "db_driver_".$driver;
$this->DB = new $classname;
@@ -512,19 +521,20 @@ class ipsclass {
$this->DB->obj['sql_user'] = $user;
$this->DB->obj['sql_pass'] = $pass;
$this->DB->obj['sql_host'] = $host;
$this->DB->obj['sql_tbl_prefix'] = $pre;
$this->DB->obj['sql_tbl_prefix'] = $pre;
$this->DB->obj['mysql_codepage'] = $cp;
$this->DB->obj['use_shutdown'] = 0;
if ( $file )
{
$this->DB->obj['query_cache_file'] = $file;
}
if ( ! defined( 'SQL_PREFIX' ) )
{
define( 'SQL_PREFIX', $pre );
}
//-----------------------------------
// Required vars?
//-----------------------------------
@@ -993,7 +1003,54 @@ class ipsclass {
$this->DB->close_db();
}
/*-------------------------------------------------------------------------*/
// Convert string between char-sets
/*-------------------------------------------------------------------------*/
/**
* Convert a string between charsets
*
* @param string Input String
* @param string Current char set
* @param string Destination char set
* @return string Parsed string
* @since 2.1.0
*/
function txt_convert_charsets($t, $original_cset, $destination_cset="")
{
$original_cset = strtolower($original_cset);
$text = $t;
//-----------------------------------------
// Did we pass a destination?
//-----------------------------------------
$destination_cset = strtolower($destination_cset) ? strtolower($destination_cset) : strtolower($this->vars['gb_char_set']);
// echo $destination_cset; exit;
//-----------------------------------------
// Not the same?
//-----------------------------------------
if ( $destination_cset == $original_cset )
{
return $t;
}
//-----------------------------------------
// Do the convert
//-----------------------------------------
if ( ! is_object( $this->class_convert_charset ) )
{
require_once( INS_KERNEL_PATH.'/class_convert_charset.php' );
$this->class_convert_charset = new class_convert_charset();
}
$text = $this->class_convert_charset->convert_charset( $text, $original_cset, $destination_cset );
return $text ? $text : $t;
}
/*-------------------------------------------------------------------------*/
// txt_alphanumerical_clean
// ------------------