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

+59 -38
View File
@@ -3,22 +3,15 @@
/*
+--------------------------------------------------------------------------
| Invision Power Services Kernel [DB Abstraction]
| Invision Power Board 2.2.2
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 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 ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
| THIS IS NOT FREE / OPEN SOURCE SOFTWARE
+---------------------------------------------------------------------------
|
| > Core Module
@@ -53,10 +46,10 @@
* $db->build_query( array( 'select' => 'd.*',
* 'from' => array( 'dnames_change' => 'd' ),
* 'where' => 'dname_member_id='.$id,
* 'add_join' => 0 => array( 'select' => 'm.members_display_name',
* 'add_join' => array( 0 => array( 'select' => 'm.members_display_name',
* 'from' => array( 'members' => 'm' ),
* 'where' => 'm.id=d.dname_member_id',
* 'type' => 'inner' ),
* 'type' => 'inner' ) ),
* 'order' => 'dname_date DESC' ) );
* $db->exec_query();
* </code>
@@ -116,7 +109,6 @@ class db_main
'error_log' => '' ,
'use_error_log' => 0 ,
'use_debug_log' => 0 ,
'mysql_codepage' => 'cp1251' ,
);
/**
@@ -126,7 +118,6 @@ class db_main
*/
var $error = "";
var $error_no = "";
var $error_codepage = "windows_1251";
/**
* Return error message or die inline
@@ -494,6 +485,24 @@ class db_main
}
/*-------------------------------------------------------------------------*/
// Shutdown replace into
/*-------------------------------------------------------------------------*/
/**
* Alias for do_replace_into
*
* @see do_update
* @since 2.1
*/
function do_shutdown_replace_into( $tbl, $arr, $where )
{
# Alias, redirect.
$this->do_replace_into( $tbl, $arr, $where, TRUE );
}
/*-------------------------------------------------------------------------*/
// Quick function: DO DELETE
/*-------------------------------------------------------------------------*/
@@ -570,7 +579,7 @@ class db_main
function build_and_exec_query( $a )
{
$this->build_query( $a );
$ci = $this->exec_query();
if ( isset($a['select']) AND $a['select'] )
@@ -594,6 +603,21 @@ class db_main
function build_query_from_cache( $q="", $args=array(), $method='sql_queries' )
{
if ( $method == 'sql_queries' and !method_exists( $this->sql, $q ) )
{
if ( is_array( $this->loaded_classes ) )
{
foreach ( $this->loaded_classes as $sql_extension_obj )
{
if ( method_exists( $this->$sql_extension_obj, $q ) )
{
$method = $sql_extension_obj;
continue;
}
}
}
}
if ( $this->obj['query_cache_file'] and $method == 'sql_queries' )
{
$this->cur_query .= $this->sql->$q( $args );
@@ -748,11 +772,12 @@ class db_main
else if ( $this->obj['use_error_log'] AND $this->obj['error_log'] )
{
$_error_string = "\n===================================================";
$_error_string .= "\n Âðåìÿ: ". date( 'r' );
$_error_string .= "\n Êîä îøèáêè: " . $this->error_no;
$_error_string .= "\n Ñîîáùåíèå ñåðâåðà: " . $this->error;
$_error_string .= "\n IP Àäðåñ êëèåíòà: " . $_SERVER['REMOTE_ADDR'];
$_error_string .= "\n Çàïðîñ: ".$the_error;
$_error_string .= "\n Date: ". date( 'r' );
$_error_string .= "\n Error Number: " . $this->error_no;
$_error_string .= "\n Error: " . $this->error;
$_error_string .= "\n IP Address: " . $_SERVER['REMOTE_ADDR'];
$_error_string .= "\n Page: " . $_SERVER['REQUEST_URI'];
$_error_string .= "\n ".$the_error;
if ( $FH = @fopen( $this->obj['error_log'], 'a' ) )
{
@@ -760,28 +785,24 @@ class db_main
@fclose( $FH );
}
print "<html><head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=" . $this->error_codepage . "\" />
<title>Îøèáêà ðàáîòû äðàéâåðà ÁÄ</title>
print "<html><head><title>IPS Driver Error</title>
<style>P,BODY{ font-family:arial,sans-serif; font-size:11px; }</style></head><body>
<blockquote><h1>Îøèáêà ïðè ðàáîòå ñ áàçîé äàííûõ</h1><b>Âîçíèêëà ïðîáëåìà ïðè ðàáîòå ñ áàçîé äàííûõ.</b><br>
Âû ìîæåòå ïîïðîáîâàòü îáíîâèòü ýòó ñòðàíèöó, íàæàâ <a href=\"javascript:window.location=window.location;\">ñþäà</a>
<blockquote><h1>IPS Driver Error</h1><b>There appears to be an error with the database.</b><br>
You can try to refresh the page by clicking <a href=\"javascript:window.location=window.location;\">here</a>
</body></html>";
}
else
{
$the_error .= "\n\nÑîîáùåíèå ñåðâåðà: ".$this->error."\n";
$the_error .= "Êîä îøèáêè: ".$this->error_no."\n";
$the_error .= "Âðåìÿ: ".date("l dS \o\f F Y h:i:s A");
$the_error .= "\n\nSQL error: ".$this->error."\n";
$the_error .= "SQL error code: ".$this->error_no."\n";
$the_error .= "Date: ".date("l dS \o\f F Y h:i:s A");
$out = "<html><head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=" . $this->error_codepage . "\" />
<title>Îøèáêà ðàáîòû äðàéâåðà ÁÄ</title>
$out = "<html><head><title>IPS Driver Error</title>
<style>P,BODY{ font-family:arial,sans-serif; font-size:11px; }</style></head><body>
<blockquote><h1>Îøèáêà ïðè ðàáîòå ñ áàçîé äàííûõ</h1><b>Âîçíèêëà ïðîáëåìà ïðè ðàáîòå ñ áàçîé äàííûõ.</b><br>
Âû ìîæåòå ïîïðîáîâàòü îáíîâèòü ýòó ñòðàíèöó, íàæàâ <a href=\"javascript:window.location=window.location;\">ñþäà</a>.
<br><br><b>Îòëàäî÷íàÿ èíôîðìàöèÿ:</b><br>
<form name='mysql'><textarea rows=\"15\" cols=\"60\">".htmlspecialchars($the_error)."</textarea></form><br>Ïðèíîñèì ñâîè èçâèíåíèÿ çà âîçìîæíûå íåóäîáñòâà.</blockquote></body></html>";
<blockquote><h1>IPS Driver Error</h1><b>There appears to be an error with the database.</b><br>
You can try to refresh the page by clicking <a href=\"javascript:window.location=window.location;\">here</a>.
<br><br><b>Error Returned</b><br>
<form name='mysql'><textarea rows=\"15\" cols=\"60\">".htmlspecialchars($the_error)."</textarea></form><br>We apologise for any inconvenience</blockquote></body></html>";
print $out;
@@ -1026,10 +1047,10 @@ class db_main
if ( $this->obj['use_debug_log'] AND $this->obj['debug_log'] )
{
$_string = "\n==============================================================================";
$_string .= "\n Äàòà: ". date( 'r' );
$_string .= "\n IP Àäðåñ êëèåíòà: " . $_SERVER['REMOTE_ADDR'];
$_string .= "\n Âðåìÿ âûïîëíåíèÿ: ".$endtime;
$_string .= "\n Çàïðîñ: ".$query;
$_string .= "\n Date: ". date( 'r' );
$_string .= "\n IP Address: " . $_SERVER['REMOTE_ADDR'];
$_string .= "\n Time Taken: ".$endtime;
$_string .= "\n ".$query;
$_string .= "\n==============================================================================";
$_string .= "\n".$data;