Version 2.2.2
This commit is contained in:
1 parent
22f1b963ee
commit
a3bb603c96
858 files changed
+479463
-188140
No files matched your search
@@ -3,15 +3,22 @@
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Services Kernel [DB Abstraction]
|
||||
| Invision Power Board
|
||||
| Invision Power Board 2.2.2
|
||||
| =============================================
|
||||
| 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
|
||||
+---------------------------------------------------------------------------
|
||||
| THIS IS NOT FREE / OPEN SOURCE SOFTWARE
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Core Module
|
||||
@@ -108,6 +115,8 @@ class db_main
|
||||
'force_new_connection' => 0 ,
|
||||
'error_log' => '' ,
|
||||
'use_error_log' => 0 ,
|
||||
'use_debug_log' => 0 ,
|
||||
'mysql_codepage' => 'cp1251' ,
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -117,6 +126,7 @@ class db_main
|
||||
*/
|
||||
var $error = "";
|
||||
var $error_no = "";
|
||||
var $error_codepage = "windows_1251";
|
||||
|
||||
/**
|
||||
* Return error message or die inline
|
||||
@@ -738,11 +748,11 @@ class db_main
|
||||
else if ( $this->obj['use_error_log'] AND $this->obj['error_log'] )
|
||||
{
|
||||
$_error_string = "\n===================================================";
|
||||
$_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 ".$the_error;
|
||||
$_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;
|
||||
|
||||
if ( $FH = @fopen( $this->obj['error_log'], 'a' ) )
|
||||
{
|
||||
@@ -750,24 +760,28 @@ class db_main
|
||||
@fclose( $FH );
|
||||
}
|
||||
|
||||
print "<html><head><title>IPS Driver Error</title>
|
||||
print "<html><head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=" . $this->error_codepage . "\" />
|
||||
<title>Îøèáêà ðàáîòû äðàéâåðà ÁÄ</title>
|
||||
<style>P,BODY{ font-family:arial,sans-serif; font-size:11px; }</style></head><body>
|
||||
<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>
|
||||
<blockquote><h1>Îøèáêà ïðè ðàáîòå ñ áàçîé äàííûõ</h1><b>Âîçíèêëà ïðîáëåìà ïðè ðàáîòå ñ áàçîé äàííûõ.</b><br>
|
||||
Âû ìîæåòå ïîïðîáîâàòü îáíîâèòü ýòó ñòðàíèöó, íàæàâ <a href=\"javascript:window.location=window.location;\">ñþäà</a>
|
||||
</body></html>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$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");
|
||||
$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");
|
||||
|
||||
$out = "<html><head><title>IPS Driver Error</title>
|
||||
$out = "<html><head>
|
||||
<meta http-equiv=\"content-type\" content=\"text/html; charset=" . $this->error_codepage . "\" />
|
||||
<title>Îøèáêà ðàáîòû äðàéâåðà ÁÄ</title>
|
||||
<style>P,BODY{ font-family:arial,sans-serif; font-size:11px; }</style></head><body>
|
||||
<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>";
|
||||
<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>";
|
||||
|
||||
|
||||
print $out;
|
||||
@@ -970,23 +984,24 @@ class db_main
|
||||
|
||||
function remove_all_quotes( $t )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Remove empty comments
|
||||
// We now check for comments in SQL classes
|
||||
//-----------------------------------------
|
||||
|
||||
#$t = preg_replace( "#/\*(.??)\*/#s", " ", $t );
|
||||
#$t = preg_replace( "#/\*.+?\*/#s" , " ", $t );
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove quotes
|
||||
//-----------------------------------------
|
||||
|
||||
$t = preg_replace( "#\\\{1,}[\"']#s", "", $t );
|
||||
$t = preg_replace( "#'[^'].*'#s" , "", $t );
|
||||
$t = preg_replace( "#\"[^\"].*\"#s" , "", $t );
|
||||
$t = preg_replace( "#'[^']*'#s" , "", $t );
|
||||
$t = preg_replace( "#\"[^\"]*\"#s" , "", $t );
|
||||
$t = preg_replace( "#\"\"#s" , "", $t );
|
||||
$t = preg_replace( "#''#s" , "", $t );
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove comments
|
||||
//-----------------------------------------
|
||||
|
||||
$t = preg_replace( "#/\*(.??)\*/#s", "", $t );
|
||||
$t = preg_replace( "#/\*.+?\*/#s", "", $t );
|
||||
|
||||
#print $t;
|
||||
return $t;
|
||||
}
|
||||
|
||||
@@ -1011,10 +1026,10 @@ class db_main
|
||||
if ( $this->obj['use_debug_log'] AND $this->obj['debug_log'] )
|
||||
{
|
||||
$_string = "\n==============================================================================";
|
||||
$_string .= "\n Date: ". date( 'r' );
|
||||
$_string .= "\n IP Address: " . $_SERVER['REMOTE_ADDR'];
|
||||
$_string .= "\n Time Taken: ".$endtime;
|
||||
$_string .= "\n ".$query;
|
||||
$_string .= "\n Äàòà: ". date( 'r' );
|
||||
$_string .= "\n IP Àäðåñ êëèåíòà: " . $_SERVER['REMOTE_ADDR'];
|
||||
$_string .= "\n Âðåìÿ âûïîëíåíèÿ: ".$endtime;
|
||||
$_string .= "\n Çàïðîñ: ".$query;
|
||||
$_string .= "\n==============================================================================";
|
||||
$_string .= "\n".$data;
|
||||
|
||||
|
||||
Reference in new issue
Block a user