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

+33 -15
View File
@@ -2,15 +2,22 @@
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| (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 IS NOT FREE SOFTWARE!
| http://www.invisionboard.com
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
|
| > File Management Functions
@@ -101,7 +108,7 @@ class class_file_management
* file_get_contents() has caching issues
* @return string File data
*/
function get_file_contents( $file_location )
function get_file_contents( $file_location, $http_user='', $http_pass='' )
{
//-------------------------------
// INIT
@@ -110,6 +117,17 @@ class class_file_management
$contents = "";
$file_location = str_replace( '&', '&', $file_location );
//-----------------------------------------
// Inline user/pass?
//-----------------------------------------
if ( $http_user and $http_pass )
{
$this->auth_req = 1;
$this->auth_user = $http_user;
$this->auth_pass = $http_pass;
}
//-------------------------------
// Hello
//-------------------------------
@@ -127,7 +145,7 @@ class class_file_management
if ( ! file_exists( $file_location ) )
{
$this->errors[] = "File '$file_location' does not exist, please check the path.";
$this->errors[] = "Ôàéë '$file_location' íå ñóùåñòâóåò, ïðîâåðüòå ïóòü.";
return;
}
@@ -210,7 +228,7 @@ class class_file_management
if ( ! $url_parts['host'] )
{
$this->errors[] = "No host found in the URL '$file_location'!";
$this->errors[] = "Íå íàéäåí õîñò â çàäàííîì URL '$file_location'!";
return FALSE;
}
@@ -245,7 +263,7 @@ class class_file_management
if ( ! $fp = @fsockopen( $host, $port, $errno, $errstr, $fsocket_timeout ) )
{
$this->errors[] = "Could not establish a connection with $host";
$this->errors[] = "Ñîåäèíåíèå ïðåðâàíî óäàëåííûì ñåðâåðîì $host";
return FALSE;
}
@@ -253,14 +271,14 @@ class class_file_management
{
$final_carriage = "";
if( ! $this->auth_req )
if ( ! $this->auth_req )
{
$final_carriage = "\r\n";
}
if ( ! fputs( $fp, "GET $path HTTP/1.0\r\nHost:$host\r\nConnection: Keep-Alive\r\n{$final_carriage}" ) )
{
$this->errors[] = "Unable to send request to $host!";
$this->errors[] = "Íå âîçìîæíî îòïðàâèòü çàïðîñ óäàëåííîìó ñåðâåðó $host!";
return FALSE;
}
@@ -272,7 +290,7 @@ class class_file_management
if ( ! fputs( $fp, $header ) )
{
$this->errors[] = "Authorization Failed!";
$this->errors[] = "Íå óäàëîñü àâòîðèçîâàòüñÿ!";
return FALSE;
}
}
@@ -357,7 +375,7 @@ class class_file_management
if ( ! is_dir( $from_path ) )
{
$this->errors[] = "Could not locate directory '$from_path'";
$this->errors[] = "Íå âîçìîæíî íàéòè äèðåêòîðèþ '$from_path'";
return FALSE;
}
@@ -365,7 +383,7 @@ class class_file_management
{
if ( ! @mkdir( $to_path, $mode ) )
{
$this->errors[] = "Could not create directory '$to_path' please check the CHMOD permissions and re-try";
$this->errors[] = "Íå âîçìîæíî ñîçäàòü äèðåêòîðèþ '$to_path' ïðîâåðüòå ïðàâà äîñòóïà (CHMOD) è ïîïðîáóéòå ñíîâà";
return FALSE;
}
else