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

+64 -18
View File
@@ -2,17 +2,25 @@
/*
+--------------------------------------------------------------------------
| 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:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| > $Date: 2006-10-16 13:01:42 +0100 (Mon, 16 Oct 2006) $
| > $Revision: 649 $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-11-28 09:41:42 -0600 (Tue, 28 Nov 2006) $
| > $Revision: 743 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -25,9 +33,9 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_IPB' ) )
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
exit();
}
@@ -141,7 +149,7 @@ class func_usercp
if ( ! $this->ipsclass->member['vdirs'] )
{
$this->ipsclass->member['vdirs'] = "in:Inbox|sent:Sent Items";
$this->ipsclass->member['vdirs'] = "in:Âõîäÿùèå|sent:Îòïðàâëåííûå";
}
foreach( explode( "|", $this->ipsclass->member['vdirs'] ) as $dir )
@@ -483,9 +491,9 @@ class func_usercp
if ( ! file_exists( $upload_path . "/profile" ) )
{
if ( @mkdir( $upload_path . "/" . $this_month, 0777 ) )
if ( @mkdir( $upload_path . "/profile", 0777 ) )
{
@chmod( $upload_path . "/" . $this_month, 0777 );
@chmod( $upload_path . "/profile", 0777 );
# Set path and dir correct
$upload_path .= "/profile";
@@ -495,8 +503,7 @@ class func_usercp
else
{
# Set path and dir correct
$upload_path .= "/profile";
$upload_dir = "profile/";
$upload_dir = "";
}
//-----------------------------------------
@@ -614,22 +621,27 @@ class func_usercp
// No upload
$return['status'] = 'fail';
$return['error'] = 'upload_failed';
break;
case 2:
// Invalid file ext
$return['status'] = 'fail';
$return['error'] = 'invalid_file_extension';
break;
case 3:
// Too big...
$return['status'] = 'fail';
$return['error'] = 'upload_to_big';
break;
case 4:
// Cannot move uploaded file
$return['status'] = 'fail';
$return['error'] = 'upload_failed';
break;
case 5:
// Possible XSS attack (image isn't an image)
$return['status'] = 'fail';
$return['error'] = 'upload_failed';
break;
}
return $return;
@@ -656,7 +668,7 @@ class func_usercp
$image_lib->out_type = 'file';
$image_lib->in_file_dir = $upload_path;
$image_lib->in_file_name = $real_name;
$image_lib->out_file_name = 'photos-'.$member_id;
$image_lib->out_file_name = 'photo-'.$member_id;
$image_lib->desired_width = $p_width;
$image_lib->desired_height = $p_height;
@@ -977,7 +989,7 @@ class func_usercp
'view_sigs' => intval($this->ipsclass->input['VIEW_SIGS']),
'view_img' => intval($this->ipsclass->input['VIEW_IMG']),
'view_pop' => intval($this->ipsclass->input['DO_POPUP']),
'dst_in_use' => isset($this->ipsclass->input['DST']) ? intval($this->ipsclass->input['DST']) : 0,
'dst_in_use' => ( isset($this->ipsclass->input['DST']) AND intval($this->ipsclass->input['DSTCHECK']) == 0 ) ? intval($this->ipsclass->input['DST']) : 0,
'members_auto_dst' => intval($this->ipsclass->input['DSTCHECK']),
'members_disable_pm' => intval($this->ipsclass->member['members_disable_pm']),
'members_editor_choice' => substr( $this->ipsclass->input['editor_choice'], 0, 3 ),
@@ -1107,7 +1119,7 @@ class func_usercp
$dh = opendir( CACHE_PATH.'style_avatars'.$real_dir );
while ( $file = readdir( $dh ) )
while ( false !== ( $file = readdir( $dh ) ) )
{
if ( !preg_match( "/^..?$|^index/i", $file ) )
{
@@ -1319,18 +1331,23 @@ class func_usercp
case 1:
// No upload
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'upload_failed' ) );
break;
case 2:
// Invalid file ext
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_av_type' ) );
break;
case 3:
// Too big...
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'upload_to_big') );
break;
case 4:
// Cannot move uploaded file
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'upload_failed' ) );
break;
case 5:
// Possible XSS attack (image isn't an image)
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'upload_failed' ) );
break;
}
}
@@ -1616,11 +1633,24 @@ class func_usercp
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'calendar_not_all' ) );
}
else if( ($c_cnt > 0) and ($c_cnt == 3) )
{
//-----------------------------------------
// Make sure it's a legal date
//-----------------------------------------
$_year = $this->ipsclass->input['year'] ? $this->ipsclass->input['year'] : 1999;
if ( ! checkdate( $this->ipsclass->input['month'], $this->ipsclass->input['day'], $_year ) )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'ucp_birthday_legal_date' ) );
}
}
if ( ! preg_match( "#^http://#", $this->ipsclass->input['WebSite'] ) )
{
$this->ipsclass->input['WebSite'] = 'http://'.$this->ipsclass->input['WebSite'];
}
}
//-----------------------------------------
// Start off our array
@@ -1633,7 +1663,7 @@ class func_usercp
);
$bet = array( 'website' => $this->ipsclass->input['WebSite'],
'icq_number' => $this->ipsclass->input['ICQNumber'],
'icq_number' => intval($this->ipsclass->input['ICQNumber']),
'aim_name' => $this->ipsclass->input['AOLName'],
'yahoo' => $this->ipsclass->input['YahooName'],
'msnname' => $this->ipsclass->input['MSNName'],
@@ -1641,6 +1671,8 @@ class func_usercp
'interests' => $this->class->parser->bad_words( $this->ipsclass->input['Interests'] ),
);
$_gender = $this->ipsclass->input['gender'] == 'male' ? 'male' : ( $this->ipsclass->input['gender'] == 'female' ? 'female' : '' );
//-----------------------------------------
// check to see if we can enter a member title
// and if one is entered, update it.
@@ -1659,14 +1691,14 @@ class func_usercp
$this->ipsclass->DB->do_update( 'members' , $set, 'id='.$this->ipsclass->member['id'] );
$this->ipsclass->DB->force_data_type = array( 'icq_number' => 'string' );
$this->ipsclass->DB->do_update( 'member_extra', $bet, 'id='.$this->ipsclass->member['id'] );
$this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_gender' => $_gender ), 'pp_member_id=' . $this->ipsclass->member['id'] );
//-----------------------------------------
// Save the profile stuffy wuffy
//-----------------------------------------
if ( count( $fields->out_fields ) )
{
//-----------------------------------------
@@ -1682,10 +1714,24 @@ class func_usercp
// We have it, so simply update
//-----------------------------------------
$this->ipsclass->DB->force_data_type = array();
foreach( $fields->out_fields as $_field => $_data )
{
$this->ipsclass->DB->force_data_type[ $_field ] = 'string';
}
$this->ipsclass->DB->do_update( 'pfields_content', $fields->out_fields, 'member_id='.$this->ipsclass->member['id'] );
}
else
{
$this->ipsclass->DB->force_data_type = array();
foreach( $fields->out_fields as $_field => $_data )
{
$this->ipsclass->DB->force_data_type[ $_field ] = 'string';
}
$fields->out_fields['member_id'] = $this->ipsclass->member['id'];
$this->ipsclass->DB->do_insert( 'pfields_content', $fields->out_fields );