Version 2.3.6
This commit is contained in:
1 parent
a3bb603c96
commit
19b38c7c74
764 files changed
+143731
-118164
No files matched your search
@@ -2,28 +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 IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2006-12-04 10:31:02 -0600 (Mon, 04 Dec 2006) $
|
||||
| > $Revision: 757 $
|
||||
| > $Author: matt $
|
||||
| > $Date: 2008-04-23 15:02:02 -0400 (Wed, 23 Apr 2008) $
|
||||
| > $Revision: 1254 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Messenger functions
|
||||
@@ -38,7 +28,7 @@
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -211,14 +201,14 @@ class messenger
|
||||
// If we have any HTML to print, do so...
|
||||
|
||||
$fj = $this->ipsclass->build_forum_jump();
|
||||
$fj = str_replace( "#Forum Jump#", $this->ipsclass->lang['forum_jump'], $fj);
|
||||
$fj = str_replace( '#Forum Jump#', $this->ipsclass->lang['forum_jump'], $fj);
|
||||
|
||||
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->CP_end();
|
||||
|
||||
$this->output .= $this->ipsclass->compiled_templates['skin_msg']->forum_jump($fj);
|
||||
|
||||
$this->ipsclass->print->add_output( $this->output );
|
||||
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'JS' => 0, 'NAV' => $this->nav ) );
|
||||
$this->ipsclass->print->do_output( array( 'TITLE' => $this->page_title, 'NAV' => $this->nav ) );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
@@ -421,17 +411,6 @@ class messenger
|
||||
$this->email->ipsclass =& $this->ipsclass;
|
||||
$this->email->email_init();
|
||||
|
||||
//-----------------------------------------
|
||||
// Require BBCode library
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH."sources/handlers/han_parse_bbcode.php" );
|
||||
$this->parser = new parse_bbcode();
|
||||
$this->parser->ipsclass = $this->ipsclass;
|
||||
$this->parser->allow_update_caches = 1;
|
||||
|
||||
$this->parser->bypass_badwords = intval($this->ipsclass->member['g_bypass_badwords']);
|
||||
|
||||
//-----------------------------------------
|
||||
// Did we specify a folder, or choose all?
|
||||
//-----------------------------------------
|
||||
@@ -500,6 +479,7 @@ class messenger
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'mt.*',
|
||||
'from' => array( 'message_topics' => 'mt' ),
|
||||
'where' => "mt.mt_owner_id={$this->ipsclass->member['id']} AND mt.mt_date {$older_newer} {$time_cut} {$folder_query}",
|
||||
'order' => 'mt.mt_date DESC',
|
||||
'limit' => array( 0, $this->ipsclass->input['number'] ),
|
||||
'add_join' => array(
|
||||
array(
|
||||
@@ -535,10 +515,6 @@ class messenger
|
||||
$info = array();
|
||||
$msg_ids[] = $r['mt_id'];
|
||||
|
||||
$this->parser->parse_smilies = 0;
|
||||
$this->parser->parse_html = $this->ipsclass->vars['msg_allow_html'];
|
||||
$this->parser->parse_bbcode = $this->ipsclass->vars['msg_allow_code'];
|
||||
|
||||
$info['msg_date'] = $this->ipsclass->get_date( $r['mt_date'], 'LONG' );
|
||||
$info['msg_title'] = $r['mt_title'];
|
||||
|
||||
@@ -551,7 +527,7 @@ class messenger
|
||||
$info['msg_sender'] = $r['members_display_name'];
|
||||
}
|
||||
|
||||
$info['msg_content'] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $r['msg_post'] ) );
|
||||
$info['msg_content'] = $r['msg_post'];
|
||||
|
||||
if ($type == 'xls')
|
||||
{
|
||||
@@ -632,6 +608,7 @@ class messenger
|
||||
//-----------------------------------------
|
||||
|
||||
$output = str_replace( "<#IMG_DIR#>", $this->ipsclass->skin['_imagedir'], $output );
|
||||
$output = str_replace( "<#EMO_DIR#>", $this->ipsclass->skin['_emodir'] , $output );
|
||||
|
||||
$this->email->get_template("pm_archive");
|
||||
|
||||
@@ -734,6 +711,13 @@ class messenger
|
||||
|
||||
function do_prefs()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->input['in'] = $this->ipsclass->txt_alphanumerical_clean( $_POST['in'], " " );
|
||||
$this->ipsclass->input['sent'] = $this->ipsclass->txt_alphanumerical_clean( $_POST['sent'], " " );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check to ensure than we've not tried to
|
||||
// remove the inbox and sent items directories.
|
||||
@@ -789,21 +773,29 @@ class messenger
|
||||
// Fetch the rest of the dirs
|
||||
//-----------------------------------------
|
||||
|
||||
$ids = array();
|
||||
$ids = array();
|
||||
$others = array();
|
||||
|
||||
foreach ($this->ipsclass->input as $key => $value)
|
||||
{
|
||||
if ( preg_match( "/^dir_(\d+)$/", $key, $match ) )
|
||||
{
|
||||
if ($this->ipsclass->input[$match[0]])
|
||||
if ( $this->ipsclass->input[$match[0]] )
|
||||
{
|
||||
$count = isset($cur_dir[ $match[0] ]) ? intval( $cur_dir[ $match[0] ] ) : 0;
|
||||
|
||||
$v_dir .= '|'.$match[0].':'.trim(str_replace( '|', '', str_replace( ";", "", $this->ipsclass->input[$match[0]] ) ) ).';'.$count;
|
||||
$others[ $this->ipsclass->input[$match[0]] ] = $match[0].':'.trim(str_replace( '|', '', str_replace( ";", "", $this->ipsclass->input[$match[0]] ) ) ).';'.$count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( count($others) )
|
||||
{
|
||||
ksort($others);
|
||||
|
||||
$v_dir .= '|' . implode( '|', $others );
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array('update' => 'member_extra', 'set' => "vdirs='$v_dir'", 'where' => 'id='.$this->ipsclass->member['id']) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
@@ -935,7 +927,7 @@ class messenger
|
||||
}
|
||||
}
|
||||
|
||||
if( $do_override == 0 )
|
||||
if( $do_override == 1 )
|
||||
{
|
||||
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'cannot_block' ) );
|
||||
}
|
||||
@@ -1164,7 +1156,7 @@ class messenger
|
||||
}
|
||||
else if ($this->ipsclass->input['move'])
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'update' => 'message_topics', 'set' => "mt_vid_folder='{$this->msglib->vid}', mt_to_id={$this->ipsclass->member['id']}", 'where' => "mt_vid_folder != '{$this->msglib->vid}' AND mt_owner_id=".$this->ipsclass->member['id']." AND mt_id IN ($id_string)" ) );
|
||||
$this->ipsclass->DB->simple_construct( array( 'update' => 'message_topics', 'set' => "mt_vid_folder='{$this->msglib->vid}'", 'where' => "mt_vid_folder != '{$this->msglib->vid}' AND mt_owner_id=".$this->ipsclass->member['id']." AND mt_id IN ($id_string)" ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
if ( $this->ipsclass->DB->get_affected_rows() )
|
||||
@@ -1271,8 +1263,55 @@ class messenger
|
||||
{
|
||||
$id_string = implode( ",", $ids );
|
||||
|
||||
# For directory counts....
|
||||
$member = array();
|
||||
$counts = array();
|
||||
|
||||
$this->ipsclass->DB->build_query( array( 'select' => 'mt.mt_id, mt.mt_msg_id, mt.mt_read, mt.mt_owner_id',
|
||||
'from' => array( 'message_topics' => 'mt' ),
|
||||
'where' => "mt.mt_read=0 and mt.mt_tracking=1 AND mt.mt_from_id=".$this->ipsclass->member['id']." AND mt.mt_id IN({$id_string})",
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'me.vdirs, me.id',
|
||||
'from' => array( 'member_extra' => 'me' ),
|
||||
'where' => 'me.id=mt.mt_owner_id',
|
||||
'type' => 'left'
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->ipsclass->DB->exec_query();
|
||||
|
||||
while( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
if( array_key_exists( $r['id'], $counts ) )
|
||||
{
|
||||
$counts[ $r['id'] ]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$counts[ $r['id'] ] = 1;
|
||||
}
|
||||
|
||||
$member[ $r['id'] ] = $r['vdirs'];
|
||||
}
|
||||
|
||||
$this->msglib->delete_messages( $ids, $this->ipsclass->member['id'], "mt_read=0 and mt_tracking=1 AND mt_from_id=".$this->ipsclass->member['id'] );
|
||||
|
||||
if( count($member) )
|
||||
{
|
||||
foreach($member as $id => $vdirs )
|
||||
{
|
||||
$inbox_count = $this->msglib->_get_dir_count( $vdirs, 'in' );
|
||||
|
||||
$new_vdir = $this->msglib->rebuild_dir_count( $id,
|
||||
$vdirs,
|
||||
'in',
|
||||
$inbox_count - $counts[ $id ],
|
||||
'save'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$this->ipsclass->boink_it($this->base_url."act=Msg&CODE=30");
|
||||
}
|
||||
else
|
||||
@@ -1324,19 +1363,6 @@ class messenger
|
||||
|
||||
function view_msg()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get extra LIBBIES
|
||||
//-----------------------------------------
|
||||
|
||||
require ( ROOT_PATH.'sources/action_public/topics.php' );
|
||||
|
||||
$this->topiclib = new topics();
|
||||
$this->topiclib->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->topiclib->topic_init();
|
||||
$this->topiclib->topic['forum_id'] = 0;
|
||||
$this->topiclib->topic['tid'] = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// check for a msg ID
|
||||
//-----------------------------------------
|
||||
@@ -1389,7 +1415,7 @@ class messenger
|
||||
|
||||
if ( $msg['id'] )
|
||||
{
|
||||
$member = $this->topiclib->parse_member( $msg );
|
||||
$member = $this->ipsclass->parse_member( $msg, 0, 'skin_msg' );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1407,21 +1433,8 @@ class messenger
|
||||
$member['signature'] = "";
|
||||
}
|
||||
|
||||
$this->topiclib->parser->parse_smilies = 1;
|
||||
$this->topiclib->parser->parse_html = $this->ipsclass->vars['msg_allow_html'];
|
||||
$this->topiclib->parser->parse_bbcode = $this->ipsclass->vars['msg_allow_code'];
|
||||
$this->topiclib->parser->parse_nl2br = 1;
|
||||
$this->topiclib->parser->parsing_signature = 0;
|
||||
|
||||
$msg['msg_post'] = $this->topiclib->parser->pre_display_parse( $this->topiclib->parser->pre_db_parse( $msg['msg_post'] ) );
|
||||
|
||||
if ( $this->ipsclass->member['view_sigs'] and $member['signature'] )
|
||||
{
|
||||
$this->topiclib->parser->parse_smilies = 0;
|
||||
$this->topiclib->parser->parse_html = $this->ipsclass->vars['sig_allow_html'];
|
||||
$this->topiclib->parser->parse_bbcode = $this->ipsclass->vars['sig_allow_ibc'];
|
||||
|
||||
$member['signature'] = $this->topiclib->parser->pre_display_parse( $member['signature'] );
|
||||
$member['signature'] = $this->ipsclass->compiled_templates['skin_global']->signature_separator($member['signature']);
|
||||
}
|
||||
else
|
||||
@@ -1480,16 +1493,16 @@ class messenger
|
||||
require_once( ROOT_PATH . 'sources/classes/attach/class_attach.php' );
|
||||
$this->class_attach = new class_attach();
|
||||
$this->class_attach->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->ipsclass->load_language( 'lang_topic' );
|
||||
}
|
||||
|
||||
$this->class_attach->type = 'msg';
|
||||
$this->class_attach->init();
|
||||
|
||||
$html = $this->class_attach->render_attachments( $html, array( $msg['msg_id'] ) );
|
||||
$html = $this->class_attach->render_attachments( $html, array( $msg['msg_id'] ), 'skin_msg' );
|
||||
}
|
||||
|
||||
unset($this->topiclib);
|
||||
|
||||
$this->output .= $html;
|
||||
|
||||
$this->page_title = $this->ipsclass->lang['t_welcome'];
|
||||
@@ -1590,7 +1603,7 @@ class messenger
|
||||
return;
|
||||
}
|
||||
|
||||
if ( strlen( trim( $_POST['Post'] ) ) < 2 )
|
||||
if ( strlen( trim( $this->ipsclass->my_br2nl( $_POST['Post'] ) ) ) < 2 )
|
||||
{
|
||||
$this->msglib->send_form( 0, $this->ipsclass->lang['err_no_msg'] );
|
||||
$this->output .= $this->msglib->output;
|
||||
@@ -1627,8 +1640,26 @@ class messenger
|
||||
// Now we have safe HTML and bbcode
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->vars['max_emos'] = 0;
|
||||
|
||||
$this->ipsclass->input['Post'] = $this->msglib->postlib->han_editor->process_raw_post( 'Post' );
|
||||
|
||||
$this->msglib->postlib->parser->parse_smilies = 1;
|
||||
$this->msglib->postlib->parser->parse_nl2br = 1;
|
||||
$this->msglib->postlib->parser->parse_html = $this->ipsclass->vars['msg_allow_html'];
|
||||
$this->msglib->postlib->parser->parse_bbcode = $this->ipsclass->vars['msg_allow_code'];
|
||||
|
||||
$this->ipsclass->input['Post'] = $this->msglib->postlib->parser->pre_db_parse( $this->ipsclass->input['Post'] );
|
||||
$this->ipsclass->input['Post'] = $this->msglib->postlib->parser->pre_display_parse( $this->ipsclass->input['Post'] );
|
||||
$this->ipsclass->input['Post'] = $this->msglib->postlib->parser->bad_words( $this->ipsclass->input['Post'] );
|
||||
|
||||
if( $this->msglib->postlib->parser->error != "" )
|
||||
{
|
||||
$this->msglib->send_form( 0, $this->ipsclass->lang[$this->msglib->postlib->parser->error] );
|
||||
$this->output .= $this->msglib->output;
|
||||
return;
|
||||
}
|
||||
|
||||
$this->ipsclass->input['msg_title'] = $this->msglib->postlib->parser->bad_words($this->ipsclass->input['msg_title']);
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -1636,7 +1667,7 @@ class messenger
|
||||
//-----------------------------------------
|
||||
|
||||
//$this->upload_id = $this->msglib->postlib->process_upload();
|
||||
$this->msglib->cc_users = $this->ipsclass->parse_clean_value( $this->ipsclass->txt_UNhtmlspecialchars($_POST['carbon_copy']) );
|
||||
$this->msglib->cc_users = $this->ipsclass->input['carbon_copy'];
|
||||
$this->msglib->from_member = $this->ipsclass->member;
|
||||
$this->msglib->msg_title = $this->ipsclass->input['msg_title'];
|
||||
$this->msglib->msg_post = $this->ipsclass->input['Post'];
|
||||
|
||||
Reference in new issue
Block a user