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

+77 -63
View File
@@ -2,26 +2,18 @@
/*
+--------------------------------------------------------------------------
| 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:54 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)
+---------------------------------------------------------------------------
| > $Date: 2006-11-28 09:41:42 -0600 (Tue, 28 Nov 2006) $
| > $Revision: 743 $
| > $Author: matt $
| > $Date: 2008-04-21 17:32:17 -0400 (Mon, 21 Apr 2008) $
| > $Revision: 1249 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > UserCP functions library
@@ -33,9 +25,9 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
@@ -149,7 +141,7 @@ class func_usercp
if ( ! $this->ipsclass->member['vdirs'] )
{
$this->ipsclass->member['vdirs'] = "in:Âõîäÿùèå|sent:Îòïðàâëåííûå";
$this->ipsclass->member['vdirs'] = "in:{$this->ipsclass->lang['account_inbox']}|sent:{$this->ipsclass->lang['account_sent']}";
}
foreach( explode( "|", $this->ipsclass->member['vdirs'] ) as $dir )
@@ -247,7 +239,7 @@ class func_usercp
// Passy check
//-----------------------------------------
if ( isset($forum['password']) AND $forum['password'] != "" )
if ( ! in_array( $this->ipsclass->member['mgroup'], explode(",", $forum['password_override']) ) AND ( isset($forum['password']) AND $forum['password'] != "" ) )
{
if ( $this->ipsclass->forums->forums_compare_password( $forum['id'] ) != TRUE )
{
@@ -291,6 +283,15 @@ class func_usercp
}
else
{
//-----------------------------------------
// Auth check
//-----------------------------------------
if ( $this->ipsclass->input['auth_key'] != $this->class->md5_check )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'del_post') );
}
//-----------------------------------------
// Method..
//-----------------------------------------
@@ -323,7 +324,6 @@ class func_usercp
if ( $method == 'forum' )
{
$this->ipsclass->DB->do_insert( 'forum_tracker', array (
'member_id' => $this->ipsclass->member['id'],
'forum_id' => $fid,
@@ -394,13 +394,6 @@ class func_usercp
$photo = $this->lib_upload_photo();
if ( $photo['status'] == 'fail' )
{
$this->ipsclass->load_language( 'lang_profile' );
$this->class->photo( $this->ipsclass->lang[ 'pp_' . $photo['error'] ] );
return;
}
//-----------------------------------------
// Save...
//-----------------------------------------
@@ -414,26 +407,33 @@ class func_usercp
{
# Update...
$this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_main_photo' => $photo['final_location'],
'pp_main_width' => $photo['final_width'],
'pp_main_height' => $photo['final_height'],
'pp_main_width' => intval($photo['final_width']),
'pp_main_height' => intval($photo['final_height']),
'pp_thumb_photo' => $photo['t_final_location'],
'pp_thumb_width' => $photo['t_final_width'],
'pp_thumb_height' => $photo['t_final_height'],
'pp_thumb_width' => intval($photo['t_final_width']),
'pp_thumb_height' => intval($photo['t_final_height']),
), 'pp_member_id='.$member_id );
}
else
{
# Insert
$this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_main_photo' => $photo['final_location'],
'pp_main_width' => $photo['final_width'],
'pp_main_height' => $photo['final_height'],
'pp_main_width' => intval($photo['final_width']),
'pp_main_height' => intval($photo['final_height']),
'pp_thumb_photo' => $photo['t_final_location'],
'pp_thumb_width' => $photo['t_final_width'],
'pp_thumb_height' => $photo['t_final_height'],
'pp_thumb_width' => intval($photo['t_final_width']),
'pp_thumb_height' => intval($photo['t_final_height']),
'pp_member_id' => $member_id,
) );
}
if ( $photo['status'] == 'fail' )
{
$this->ipsclass->load_language( 'lang_profile' );
$this->class->photo( $this->ipsclass->lang[ 'pp_' . $photo['error'] ] );
return;
}
$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['photo_c_up'], "act=UserCP&CODE=photo" );
}
@@ -489,7 +489,7 @@ class func_usercp
// Already a dir?
//-----------------------------------------
if ( ! file_exists( $upload_path . "/profile" ) )
if ( ! is_dir( $upload_path . "/profile" ) )
{
if ( @mkdir( $upload_path . "/profile", 0777 ) )
{
@@ -499,13 +499,18 @@ class func_usercp
$upload_path .= "/profile";
$upload_dir = "profile/";
}
else
{
$upload_dir = "";
}
}
else
{
# Set path and dir correct
$upload_dir = "";
$upload_path .= "/profile";
$upload_dir = "profile/";
}
//-----------------------------------------
// Deleting the photo?
//-----------------------------------------
@@ -522,21 +527,21 @@ class func_usercp
if ( $this->ipsclass->DB->get_num_rows() )
{
$this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_main_photo' => '',
'pp_main_width' => '',
'pp_main_height' => '',
'pp_main_width' => 0,
'pp_main_height' => 0,
'pp_thumb_photo' => '',
'pp_thumb_width' => '',
'pp_thumb_height' => '',
'pp_thumb_width' => 0,
'pp_thumb_height' => 0,
), 'pp_member_id='.$member_id );
}
else
{
$this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_main_photo' => '',
'pp_main_width' => '',
'pp_main_height' => '',
'pp_main_width' => 0,
'pp_main_height' => 0,
'pp_thumb_photo' => '',
'pp_thumb_width' => '',
'pp_thumb_height' => '',
'pp_thumb_width' => 0,
'pp_thumb_height' => 0,
'pp_member_id' => $member_id
) );
}
@@ -608,7 +613,7 @@ class func_usercp
//-----------------------------------------
$upload->upload_process();
//-----------------------------------------
// Error?
//-----------------------------------------
@@ -1623,7 +1628,7 @@ class func_usercp
foreach ( array('day','month','year') as $v )
{
if (!empty($this->ipsclass->input[$v]))
if ( ! empty($this->ipsclass->input[$v] ) )
{
$c_cnt++;
}
@@ -1633,25 +1638,25 @@ 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' ) );
}
}
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
//-----------------------------------------
@@ -1670,7 +1675,7 @@ class func_usercp
'location' => $this->class->parser->bad_words( $this->ipsclass->input['Location'] ),
'interests' => $this->class->parser->bad_words( $this->ipsclass->input['Interests'] ),
);
$_gender = $this->ipsclass->input['gender'] == 'male' ? 'male' : ( $this->ipsclass->input['gender'] == 'female' ? 'female' : '' );
//-----------------------------------------
@@ -1693,7 +1698,16 @@ class func_usercp
$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'] );
$check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'pp_member_id', 'from' => 'profile_portal', 'where' => 'pp_member_id=' . $this->ipsclass->member['id'] ) );
if( $check['pp_member_id'] )
{
$this->ipsclass->DB->do_update( 'profile_portal', array( 'pp_gender' => $_gender ), 'pp_member_id=' . $this->ipsclass->member['id'] );
}
else
{
$this->ipsclass->DB->do_insert( 'profile_portal', array( 'pp_gender' => $_gender, 'pp_member_id' => $this->ipsclass->member['id'] ) );
}
//-----------------------------------------
// Save the profile stuffy wuffy
@@ -1803,7 +1817,7 @@ class func_usercp
$this->class->parser->parse_bbcode = intval($this->ipsclass->vars['sig_allow_ibc']);
$this->class->parser->parsing_signature = 1;
$this->ipsclass->input['Post'] = $this->class->parser->bad_words( $this->class->parser->pre_db_parse( $this->ipsclass->input['Post'] ) );
$this->ipsclass->input['Post'] = $this->class->parser->bad_words( $this->class->parser->pre_display_parse( $this->class->parser->pre_db_parse( $this->ipsclass->input['Post'] ) ) );
if ($this->class->parser->error != "")
{