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

+27 -94
View File
@@ -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-10-19 09:37:14 -0500 (Thu, 19 Oct 2006) $
| > $Revision: 657 $
| > $Author: matt $
| > $Date: 2007-12-17 18:07:20 -0500 (Mon, 17 Dec 2007) $
| > $Revision: 1149 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Show all emo's / BB Tags module
@@ -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();
}
@@ -140,7 +130,7 @@ class legends {
$this->ipsclass->DB->simple_construct( array( 'select' => 'id, name, members_display_name',
'from' => 'members',
'where' => "members_l_display_name LIKE '".$this->ipsclass->input['username']."%'",
'where' => "members_l_display_name LIKE '%".$this->ipsclass->input['username']."%'",
'limit' => array( 0,101) ) );
$this->ipsclass->DB->simple_exec();
@@ -264,15 +254,15 @@ class legends {
1 => array('[s]', '[/s]', $this->ipsclass->lang['bbc_ex1'] ),
2 => array('[i]', '[/i]', $this->ipsclass->lang['bbc_ex1'] ),
3 => array('[u]', '[/u]', $this->ipsclass->lang['bbc_ex1'] ),
4 => array('[email]', '[/email]', 'user@domain.ru' ),
5 => array('[email=user@domain.ru]', '[/email]', $this->ipsclass->lang['bbc_ex2'] ),
6 => array('[url]', '[/url]', 'http://www.domain.ru' ),
7 => array('[url=http://www.domain.ru]', '[/url]', $this->ipsclass->lang['bbc_ex2'] ),
4 => array('[email]', '[/email]', 'user@domain.com' ),
5 => array('[email=user@domain.com]', '[/email]', $this->ipsclass->lang['bbc_ex2'] ),
6 => array('[url]', '[/url]', 'http://www.domain.com' ),
7 => array('[url=http://www.domain.com]', '[/url]', $this->ipsclass->lang['bbc_ex2'] ),
8 => array('[size=7]', '[/size]' , $this->ipsclass->lang['bbc_ex1'] ),
9 => array('[font=times]', '[/font]', $this->ipsclass->lang['bbc_ex1'] ),
10 => array('[color=red]', '[/color]', $this->ipsclass->lang['bbc_ex1'] ),
11 => array('[img]', '[/img]', $this->ipsclass->vars['board_url'].'/'.$this->ipsclass->vars['img_url'].'/folder_post_icons/icon11.gif' ),
12 => array('[list]', '[/list]', '[*]'.$this->ipsclass->lang['bbc_li'].' [*]'.$this->ipsclass->lang['bbc_li'] ),
11 => array('[img]', '[/img]', ( !$this->ipsclass->vars['ipb_img_url'] ? $this->ipsclass->vars['board_url'] . '/' : '' ) . $this->ipsclass->vars['img_url'].'/folder_post_icons/icon11.gif' ),
12 => array('[list]', '[/list]', '[*]'.$this->ipsclass->lang['bbc_li'].' [*]List Item'.$this->ipsclass->lang['bbc_li'] ),
13 => array('[list=1]', '[/list]', '[*]'.$this->ipsclass->lang['bbc_li'].' [*]'.$this->ipsclass->lang['bbc_li'] ),
14 => array('[list=a]', '[/list]', '[*]'.$this->ipsclass->lang['bbc_li'].' [*]'.$this->ipsclass->lang['bbc_li'] ),
15 => array('[list=i]', '[/list]', '[*]'.$this->ipsclass->lang['bbc_li'].' [*]'.$this->ipsclass->lang['bbc_li'] ),
@@ -307,83 +297,26 @@ class legends {
// Add in custom bbcode
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
$this->ipsclass->DB->simple_exec();
while ( $row = $this->ipsclass->DB->fetch_row() )
//$this->ipsclass->init_load_cache( array( 'bbcode' ) );
if( count($this->ipsclass->cache['bbcode']) )
{
$before = $row['bbcode_example'];
$t = $before;
$replace = explode( '{content}', $row['bbcode_replace'] );
$preg_tag = preg_quote($row['bbcode_tag'], '#' );
//-----------------------------------------
// Parse the BBcode
//-----------------------------------------
if ( $row['bbcode_useoption'] )
foreach( $this->ipsclass->cache['bbcode'] as $row )
{
preg_match_all( "#(\[".$preg_tag."=(?:&quot;|&\#39;|\"\')?(.+?)(?:&quot;|&\#39;|\"\')?\])(.+?)(\[/".$preg_tag."\])#si", $t, $match );
$before = $row['bbcode_example'];
$t = $this->parser->pre_display_parse( $before );
for ( $i = 0; $i < count($match[0]); $i++)
{
//-----------------------------------------
// Does the option tag come first?
//-----------------------------------------
$_option = 2;
$_content = 3;
$_o = strpos( $row['bbcode_replace'], '{option}' );
$_c = strpos( $row['bbcode_replace'], '{content}' );
if ( $_c < $_o )
{
$_option = 3;
$_content = 2;
}
# XSS Check: Bug ID: 980
if ( $row['bbcode_tag'] == 'post' OR $row['bbcode_tag'] == 'topic' OR $row['bbcode_tag'] == 'snapback' )
{
$match[ $_option ][$i] = intval( $match[ $_option ][$i] );
}
$tmp = $row['bbcode_replace'];
$tmp = str_replace( '{option}' , $match[ $_option ][$i], $tmp );
$tmp = str_replace( '{content}', $match[ $_content ][$i], $tmp );
$t = str_replace( $match[0][$i], $tmp, $t );
}
}
else
{
# Tricky.. match anything that's not a closing tag, or nothing
preg_match_all( "#(\[$preg_tag\])(.+?)?(\[/$preg_tag\])#si", $t, $match );
for ( $i = 0; $i < count($match[0]); $i++)
{
# XSS Check: Bug ID: 980
if ( $row['bbcode_tag'] == 'snapback' )
{
$match[2][$i] = intval( $match[2][$i] );
}
$tmp = $row['bbcode_replace'];
$tmp = str_replace( '{content}', $match[2][$i], $tmp );
$t = str_replace( $match[0][$i], $tmp, $t );
}
$before = preg_replace( "#(\[".$row['bbcode_tag']."(?:[^\]]+)?\])#is", $this->ipsclass->compiled_templates['skin_legends']->wrap_tag("\\1"), $before );
$before = preg_replace( "#(\[/".$row['bbcode_tag']."\])#is" , $this->ipsclass->compiled_templates['skin_legends']->wrap_tag("\\1"), $before );
$this->output .= $this->ipsclass->compiled_templates['skin_legends']->bbcode_row_header( $row['bbcode_title'], $row['bbcode_desc'] );
$this->output .= $this->ipsclass->compiled_templates['skin_legends']->bbcode_row( $before, $t );
$this->output .= $this->ipsclass->compiled_templates['skin_legends']->bbcode_row_footer();
}
$before = preg_replace( "#(\[".$row['bbcode_tag']."(?:[^\]]+)?\])#is", $this->ipsclass->compiled_templates['skin_legends']->wrap_tag("\\1"), $before );
$before = preg_replace( "#(\[/".$row['bbcode_tag']."\])#is" , $this->ipsclass->compiled_templates['skin_legends']->wrap_tag("\\1"), $before );
$this->output .= $this->ipsclass->compiled_templates['skin_legends']->bbcode_row_header( $row['bbcode_title'], $row['bbcode_desc'] );
$this->output .= $this->ipsclass->compiled_templates['skin_legends']->bbcode_row( $before, $t );
$this->output .= $this->ipsclass->compiled_templates['skin_legends']->bbcode_row_footer();
}
}
}