Version 2.2.0 RC-1

This commit is contained in:
Neo committed 2025-12-19 00:22:37 -08:00
1 parent f73f8bff6d
commit 22f1b963ee
1034 files changed
+178610 -70897

No files matched your search

+254 -38
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Tuesday 18th of July 2006 05:56:00 PM
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
| 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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
| > $Revision: 23 $
| > $Date: 2006-10-06 11:57:24 +0100 (Fri, 06 Oct 2006) $
| > $Revision: 612 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -35,7 +25,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();
}
@@ -48,9 +38,6 @@ class han_editor
# Method
var $method;
# Skin method
var $skin_function;
# Html handler
var $html;
@@ -60,6 +47,23 @@ class han_editor
# Pass height
var $ed_height = 250;
# Using RTE?
var $rte_on = 0;
# Board or ACP?
var $from_acp = 0;
var $image_dir;
var $emo_dir;
# Editor ID
var $editor_id = 'ed-0';
# Remove side panel
var $remove_side_panel = 0;
# ACP editor ID
var $acp_editor_id = '0';
/*-------------------------------------------------------------------------*/
// INIT
/*-------------------------------------------------------------------------*/
@@ -86,13 +90,28 @@ class han_editor
// Fix width
//-----------------------------------------
$this->ed_width = $this->ipsclass->vars['rte_width'] ? $this->ipsclass->vars['rte_width'] : $this->ed_width;
$this->ed_width = isset($this->ipsclass->vars['rte_width']) ? $this->ipsclass->vars['rte_width'] : $this->ed_width;
//-----------------------------------------
// Make sure we haven't had any messin'
//-----------------------------------------
if ( intval($_POST['rte_used']) )
if ( isset( $_POST['editor_ids'] ) AND is_array( $_POST['editor_ids'] ) )
{
foreach( $_POST['editor_ids'] as $k => $v )
{
if ( isset($_POST[ $v . '_wysiwyg_used']) AND intval($_POST[$v . '_wysiwyg_used']) == 1)
{
$this->method = 'rte';
}
else
{
$this->method = 'std';
}
}
}
if ( isset($_POST['ed-0_wysiwyg_used']) AND intval($_POST['ed-0_wysiwyg_used']) == 1 )
{
$this->method = 'rte';
}
@@ -101,7 +120,7 @@ class han_editor
// Force STD editor (fast reply, etc)
//-----------------------------------------
if ( intval($_POST['std_used']) )
if ( ( isset($_POST['std_used']) AND intval($_POST['std_used']) ) OR isset($_POST['fast_reply_used']) AND intval($_POST['fast_reply_used']) )
{
$this->method = 'std';
}
@@ -112,7 +131,7 @@ class han_editor
if ( $this->method == 'rte' )
{
if ( $this->ipsclass->browser['browser'] == 'opera' AND $this->browser['version'] < 9.0 ) # Okay... this is for future compat.
if ( $this->ipsclass->browser['browser'] == 'opera' AND $this->ipsclass->browser['version'] < '9.00' ) # Okay... this is for future compat.
{
$this->method = 'std';
$this->ipsclass->force_editor_change = 1;
@@ -138,22 +157,22 @@ class han_editor
switch( $this->method )
{
case 'rte':
$class = 'class_editor_rte.php';
$this->skin_function = 'editor_rte';
$class = 'class_editor_rte.php';
$this->rte_on = 1;
break;
case 'std':
$class = 'class_editor_std.php';
$this->skin_function = 'editor_std';
$class = 'class_editor_std.php';
$this->rte_on = 0;
break;
default:
$class = 'class_editor_std.php';
$this->skin_function = 'editor_std';
$class = 'class_editor_std.php';
$this->rte_on = 0;
}
//-----------------------------------------
// Load classes
//-----------------------------------------
require_once( ROOT_PATH . 'sources/classes/editor/class_editor.php' );
require_once( ROOT_PATH . 'sources/classes/editor/'.$class );
@@ -174,27 +193,224 @@ class han_editor
// Takes raw text with BBCode *NOT* converted BBCode
/*-------------------------------------------------------------------------*/
function show_editor( $text, $form_field='post_content' )
{
//-----------------------------------------
function show_editor( $text, $form_field='post_content' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$smilie_array = array();
$smilies = '';
$total = 0;
$count = 0;
$smilie_id = 0;
$bbcode_array = array();
$bbcode = '';
//-----------------------------------------
// Load skin and language
//-----------------------------------------
if ( ! $this->ipsclass->compiled_templates['skin_editors'] )
if ( $this->from_acp == 1 )
{
$this->ipsclass->load_template( 'skin_editors' );
if ( !isset($this->ipsclass->compiled_templates['skin_editors']) )
{
$this->ipsclass->compiled_templates['skin_editors'] = $this->ipsclass->acp_load_template('cp_skin_editors');
}
//-----------------------------------------
// Set up for replacement
//-----------------------------------------
$this->ipsclass->vars['img_url'] = "<#IMG_DIR#>";
$this->ipsclass->DB->simple_construct( array( 'select' => 'set_image_dir, set_emoticon_folder', 'from' => 'skin_sets', 'where' => 'set_default=1' ) );
$this->ipsclass->DB->simple_exec();
$image_set = $this->ipsclass->DB->fetch_row();
$this->image_dir = $image_set['set_image_dir'];
$this->emo_dir = $image_set['set_emoticon_folder'];
//-----------------------------------------
// Remove side panel
//-----------------------------------------
$this->remove_side_panel = 1;
//-----------------------------------------
// Sort out editor id
//-----------------------------------------
$this->editor_id = 'ed-'.$this->acp_editor_id;
$this->acp_editor_id++;
}
else
{
if ( ! isset($this->ipsclass->compiled_templates['skin_editors']) )
{
$this->ipsclass->load_template( 'skin_editors' );
}
$this->emo_dir = $this->ipsclass->skin['_emodir'];
}
$this->ipsclass->load_language( 'lang_editors' );
//-----------------------------------------
// Get the smilies from the DB
//-----------------------------------------
if ( ! is_array( $this->ipsclass->cache['emoticons'] ) )
{
$this->ipsclass->cache['emoticons'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => 'typed,image,clickable,emo_set', 'from' => 'emoticons' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['emoticons'][] = $r;
}
@usort( $this->ipsclass->cache['emoticons'] , array( 'class_bbcode_core', 'smilie_alpha_sort' ) );
}
foreach( $this->ipsclass->cache['emoticons'] as $clickable )
{
if ( $clickable['emo_set'] != $this->emo_dir )
{
continue;
}
if ( $clickable['clickable'] )
{
$total++;
}
}
foreach( $this->ipsclass->cache['emoticons'] as $elmo )
{
if ( $elmo['emo_set'] != $this->emo_dir )
{
continue;
}
if ( ! $elmo['clickable'] )
{
continue;
}
$count++;
$smilie_id++;
//-----------------------------------------
// Make single quotes as URL's with html entites in them
// are parsed by the browser, so ' causes JS error :o
//-----------------------------------------
if ( strstr( $elmo['typed'], "&#39;" ) )
{
$in_delim = '"';
}
else
{
$in_delim = "'";
}
$smilie_array[] = $in_delim . $elmo['typed'] . $in_delim . ' : "' . $smilie_id . ','.$elmo['image'].'"';
}
//-----------------------------------------
// Finish up smilies...
//-----------------------------------------
if ( count( $smilie_array ) )
{
$smilies = implode( ",\n", $smilie_array );
}
//-----------------------------------------
// BBCode
//-----------------------------------------
if ( ! is_array( $this->ipsclass->cache['bbcode'] ) )
{
$this->ipsclass->cache['bbcode'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['bbcode'][] = $r;
}
@usort( $this->ipsclass->cache['bbcode'] , array( 'class_bbcode_core', 'smilie_alpha_sort' ) );
}
//-----------------------------------------
// Showing any?
//-----------------------------------------
foreach( $this->ipsclass->cache['bbcode'] as $data )
{
if ( $data['bbcode_add_into_menu'] )
{
$_title = str_replace( '|', '', str_replace( '"', '&amp;quot;', $data['bbcode_title'] ) );
$_example = str_replace( '|', '', str_replace( '"', '&amp;quot;', $data['bbcode_example'] ) );
$_tag = str_replace( '|', '', str_replace( '"', '&amp;quot;', $data['bbcode_tag'] ) );
$_use_option = str_replace( '|', '', str_replace( '"', '&amp;quot;', $data['bbcode_useoption'] ) );
$_switch_option = str_replace( '|', '', str_replace( '"', '&amp;quot;', $data['bbcode_switch_option'] ) );
$_text_option = str_replace( '|', '', str_replace( '"', '&amp;quot;', $data['bbcode_menu_option_text'] ) );
$_content_option = str_replace( '|', '', str_replace( '"', '&amp;quot;', $data['bbcode_menu_content_text'] ) );
$_string = $data['bbcode_id'] . ': {';
$_string .= "\n\t\t'title' : \"".$_title . "\",";
$_string .= "\n\t\t'example' : \"".$_example . "\",";
$_string .= "\n\t\t'tag' : \"".$_tag . "\",";
$_string .= "\n\t\t'use_option' : \"".$_use_option . "\",";
$_string .= "\n\t\t'switch_option' : \"".$_switch_option . "\",";
$_string .= "\n\t\t'text_option' : \"".$_text_option . "\",";
$_string .= "\n\t\t'text_content' : \"".$_content_option . "\"";
$_string .= "\n\t\t}";
$bbcode_array[] = $_string;
}
}
if ( is_array( $bbcode_array ) )
{
$bbcode = implode( ",\n", $bbcode_array );
}
//-----------------------------------------
// Side panel..
//-----------------------------------------
$this->ipsclass->vars['_remove_side_panel'] = $this->remove_side_panel;
//-----------------------------------------
// Pre parse...
//-----------------------------------------
$text = $this->class_editor->process_before_form( $text );
$func = $this->skin_function;
$return_html = $this->ipsclass->compiled_templates['skin_editors']->ips_editor( $form_field, $text, $this->ipsclass->vars['img_url'].'/folder_editor_images/', 'jscripts/folder_rte_files/', $this->rte_on, $this->editor_id, $smilies, $bbcode );
return $this->ipsclass->compiled_templates['skin_editors']->$func( $text, $form_field, $this->ed_width, $this->ed_height );
//-----------------------------------------
// Comment
//-----------------------------------------
if ( $this->from_acp )
{
$return_html = preg_replace( "#([^/])jscripts#is", "\\1".$this->ipsclass->vars['board_url']."/jscripts" , $return_html );
$return_html = str_replace( "<#IMG_DIR#>" , $this->ipsclass->vars['board_url']."/style_images/{$this->image_dir}", $return_html );
}
return $return_html;
}
/*-------------------------------------------------------------------------*/
+9 -17
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Tuesday 18th of July 2006 05:56:00 PM
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
| 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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
| > $Revision: 23 $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -35,7 +25,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();
}
@@ -48,6 +38,7 @@ class han_login
var $is_admin_auth = 0;
var $return_code = 'WRONG_AUTH';
var $account_unlock = 0;
var $member = array( 'id' => 0 );
# Work
@@ -198,8 +189,9 @@ class han_login
else
{
$this->module->authenticate( $username, $password );
$this->return_code = $this->module->return_code;
$this->member = $this->module->member;
$this->return_code = $this->module->return_code;
$this->account_unlock = $this->module->account_unlock;
$this->member = $this->module->member;
}
}
}
+75 -64
View File
@@ -1,28 +1,18 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Tuesday 18th of July 2006 05:56:00 PM
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
| 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: 2005-10-24 22:17:00 +0100 (Mon, 24 Oct 2005) $
| > $Revision: 64 $
| > $Author: bfarber $
| > $Date: 2006-10-16 13:01:42 +0100 (Mon, 16 Oct 2006) $
| > $Revision: 649 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Handler for BBCode parsing
@@ -31,6 +21,12 @@
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class parse_bbcode
{
# Global
@@ -45,12 +41,14 @@ class parse_bbcode
var $pre_db_parse_method = 'new';
# Permissions
var $parse_smilies = 0;
var $parse_html = 0;
var $parse_bbcode = 1;
var $strip_quotes = 1;
var $parse_n12br = 1;
var $bypass_badwords = 0;
var $parse_smilies = 0;
var $parse_html = 0;
var $parse_bbcode = 1;
var $strip_quotes = 1;
var $parse_nl2br = 1;
var $bypass_badwords = 0;
var $parse_custombbcode = 1;
var $parsing_signature = 0;
# Error
var $error;
@@ -80,31 +78,33 @@ class parse_bbcode
$class = "";
//-----------------------------------------
// Get the correct class
//-----------------------------------------
$this->_load_classes();
//-----------------------------------------
// Check the DB cache
//-----------------------------------------
$this->check_caches();
//-----------------------------------------
// Get the correct class
//-----------------------------------------
$this->_load_classes();
//-----------------------------------------
// Decide the settings...
//-----------------------------------------
$this->bbclass->bypass_badwords = $this->bypass_badwords ? $this->bypass_badwords : intval($this->ipsclass->member['g_bypass_badwords']);
$this->bbclass->parse_smilies = $this->parse_smilies;
$this->bbclass->parse_html = $this->parse_html;
$this->bbclass->parse_bbcode = $this->parse_bbcode;
$this->bbclass->strip_quotes = $this->ipsclass->vars['strip_quotes'];
$this->bbclass->parse_n12br = $this->parse_n12br;
$this->bbclass->parse_wordwrap = $this->ipsclass->vars['post_wordwrap'];
$this->bbclass->max_embed_quotes = $this->ipsclass->vars['max_quotes_per_post'];
$this->bbclass->bypass_badwords = $this->bypass_badwords ? $this->bypass_badwords : intval($this->ipsclass->member['g_bypass_badwords']);
$this->bbclass->parse_smilies = $this->parse_smilies;
$this->bbclass->parse_html = $this->parse_html;
$this->bbclass->parse_bbcode = $this->parse_bbcode;
$this->bbclass->strip_quotes = $this->ipsclass->vars['strip_quotes'];
$this->bbclass->parse_nl2br = $this->parse_nl2br;
$this->bbclass->parse_wordwrap = $this->ipsclass->vars['post_wordwrap'];
$this->bbclass->max_embed_quotes = $this->ipsclass->vars['max_quotes_per_post'];
$this->bbclass->parse_custombbcode = $this->parse_custombbcode;
$this->bbclass->parsing_signature = $this->parsing_signature;
//-----------------------------------------
// Parse
//-----------------------------------------
@@ -140,15 +140,17 @@ class parse_bbcode
// Decide the settings...
//-----------------------------------------
$this->bbclass->bypass_badwords = $this->bypass_badwords ? $this->bypass_badwords : intval($this->ipsclass->member['g_bypass_badwords']);
$this->bbclass->parse_smilies = $this->parse_smilies;
$this->bbclass->parse_html = $this->parse_html;
$this->bbclass->parse_bbcode = $this->parse_bbcode;
$this->bbclass->strip_quotes = $this->ipsclass->vars['strip_quotes'];
$this->bbclass->parse_n12br = $this->parse_n12br;
$this->bbclass->parse_wordwrap = $this->ipsclass->vars['post_wordwrap'];
$this->bbclass->max_embed_quotes = $this->ipsclass->vars['max_quotes_per_post'];
$this->bbclass->bypass_badwords = $this->bypass_badwords ? $this->bypass_badwords : intval($this->ipsclass->member['g_bypass_badwords']);
$this->bbclass->parse_smilies = $this->parse_smilies;
$this->bbclass->parse_html = $this->parse_html;
$this->bbclass->parse_bbcode = $this->parse_bbcode;
$this->bbclass->strip_quotes = $this->ipsclass->vars['strip_quotes'];
$this->bbclass->parse_nl2br = $this->parse_nl2br;
$this->bbclass->parse_wordwrap = $this->ipsclass->vars['post_wordwrap'];
$this->bbclass->max_embed_quotes = $this->ipsclass->vars['max_quotes_per_post'];
$this->bbclass->parse_custombbcode = $this->parse_custombbcode;
$this->bbclass->parsing_signature = $this->parsing_signature;
//-----------------------------------------
// Parse
//-----------------------------------------
@@ -185,15 +187,17 @@ class parse_bbcode
// Decide the settings...
//-----------------------------------------
$this->bbclass->bypass_badwords = $this->bypass_badwords ? $this->bypass_badwords : intval($this->ipsclass->member['g_bypass_badwords']);
$this->bbclass->parse_smilies = $this->parse_smilies;
$this->bbclass->parse_html = $this->parse_html;
$this->bbclass->parse_bbcode = $this->parse_bbcode;
$this->bbclass->strip_quotes = $this->ipsclass->vars['strip_quotes'];
$this->bbclass->parse_nl2br = $this->parse_nl2br;
$this->bbclass->parse_wordwrap = $this->ipsclass->vars['post_wordwrap'];
$this->bbclass->max_embed_quotes = $this->ipsclass->vars['max_quotes_per_post'];
$this->bbclass->bypass_badwords = $this->bypass_badwords ? $this->bypass_badwords : intval($this->ipsclass->member['g_bypass_badwords']);
$this->bbclass->parse_smilies = $this->parse_smilies;
$this->bbclass->parse_html = $this->parse_html;
$this->bbclass->parse_bbcode = $this->parse_bbcode;
$this->bbclass->strip_quotes = $this->ipsclass->vars['strip_quotes'];
$this->bbclass->parse_nl2br = $this->parse_nl2br;
$this->bbclass->parse_wordwrap = $this->ipsclass->vars['post_wordwrap'];
$this->bbclass->max_embed_quotes = $this->ipsclass->vars['max_quotes_per_post'];
$this->bbclass->parse_custombbcode = $this->parse_custombbcode;
$this->bbclass->parsing_signature = $this->parsing_signature;
//-----------------------------------------
// Parse
//-----------------------------------------
@@ -294,7 +298,7 @@ class parse_bbcode
$this->_load_classes();
$this->bbclass->bypass_badwords = $this->bypass_badwords ? $this->bypass_badwords : intval($this->ipsclass->member['g_bypass_badwords']);
$this->bbclass->bypass_badwords = isset( $this->bypass_badwords ) ? $this->bypass_badwords : intval($this->ipsclass->member['g_bypass_badwords']);
return $this->bbclass->bad_words( $t );
}
@@ -316,13 +320,13 @@ class parse_bbcode
// [url=http://www.index.com]ibforums![/url]
//-----------------------------------------
$txt = preg_replace( "#\[url\](\S+?)\[/url\]#ie" , "\$this->bbclass->regex_build_url(array('html' => '\\1', 'show' => '\\1'))", $txt );
$txt = preg_replace( "#\[url\s*=\s*\&quot\;\s*(\S+?)\s*\&quot\;\s*\](.*?)\[\/url\]#ie" , "\$this->bbclass->regex_build_url(array('html' => '\\1', 'show' => '\\2'))", $txt );
$txt = preg_replace( "#\[url\s*=\s*(\S+?)\s*\](.*?)\[\/url\]#ie" , "\$this->bbclass->regex_build_url(array('html' => '\\1', 'show' => '\\2'))", $txt );
$txt = preg_replace_callback( "#\[url\](.*?)\[/url\]#is" , array( $this->bbclass, '_regex_build_url_tags'), $txt );
$txt = preg_replace_callback( "#\[url\s*=\s*(?:\&quot\;|\")\s*(.*?)\s*(?:\&quot\;|\")\s*\](.*?)\[\/url\]#is", array( $this->bbclass, '_regex_build_url_tags'), $txt );
$txt = preg_replace_callback( "#\[url\s*=\s*(.*?)\s*\](.*?)\[\/url\]#is" , array( $this->bbclass, '_regex_build_url_tags'), $txt );
if ( $this->ipsclass->vars['allow_images'] )
{
$txt = preg_replace( "#\[img\](.+?)\[/img\]#ie", "\$this->bbclass->regex_check_image('\\1')", $txt );
$txt = preg_replace_callback( "#\[img\](.+?)\[/img\]#i", array( $this->bbclass, 'regex_check_image' ), $txt );
}
return $txt;
@@ -369,7 +373,7 @@ class parse_bbcode
// Check emoticons
//-----------------------------------------
if ( ! is_array( $this->ipsclass->cache['emoticons'] ) )
if ( !isset($this->ipsclass->cache['emoticons']) OR !is_array( $this->ipsclass->cache['emoticons'] ) )
{
$this->ipsclass->cache['emoticons'] = array();
@@ -380,6 +384,8 @@ class parse_bbcode
{
$this->ipsclass->cache['emoticons'][] = $r;
}
@usort( $this->ipsclass->cache['emoticons'] , array( 'class_bbcode_core', 'smilie_length_sort' ) );
if ( $this->allow_update_caches )
{
@@ -391,11 +397,11 @@ class parse_bbcode
// Check BBCode
//-----------------------------------------
if ( ! is_array( $this->ipsclass->cache['bbcode'] ) )
if ( !isset($this->ipsclass->cache['bbcode']) OR !is_array( $this->ipsclass->cache['bbcode'] ) )
{
$this->ipsclass->cache['bbcode'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => 'bbcode_id, bbcode_tag, bbcode_replace, bbcode_useoption', 'from' => 'custom_bbcode' ) );
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
$bbcode = $this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row($bbcode) )
@@ -413,7 +419,7 @@ class parse_bbcode
// Check badwords
//-----------------------------------------
if ( ! is_array( $this->ipsclass->cache['badwords'] ) )
if ( !isset($this->ipsclass->cache['badwords']) OR !is_array( $this->ipsclass->cache['badwords'] ) )
{
$this->ipsclass->cache['badwords'] = array();
@@ -425,6 +431,11 @@ class parse_bbcode
$this->ipsclass->cache['badwords'][] = $r;
}
if( count($this->ipsclass->cache['badwords']) )
{
@usort( $this->ipsclass->cache['badwords'] , array( 'class_bbcode_core', 'word_length_sort' ) );
}
if ( $this->allow_update_caches )
{
$this->ipsclass->update_cache( array( 'name' => 'badwords', 'array' => 1, 'deletefirst' => 1 ) );
+144 -39
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Tuesday 18th of July 2006 05:56:00 PM
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
| 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: 2005-12-01 16:45:12 +0000 (Thu, 01 Dec 2005) $
| > $Revision: 88 $
| > $Date: 2006-10-05 23:01:22 +0100 (Thu, 05 Oct 2006) $
| > $Revision: 610 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -88,7 +78,7 @@ class han_paysubscriptions
}
}
if ( $this->ipsclass->input['currency'] )
if ( isset($this->ipsclass->input['currency']) AND $this->ipsclass->input['currency'] )
{
if ( is_array($this->all_currency[ $this->ipsclass->input['currency'] ]) )
{
@@ -206,7 +196,8 @@ class han_paysubscriptions
// We're upgrading!! Yay! - Get cur subs
//--------------------------------------------
$this->ipsclass->DB->query("SELECT * FROM ibf_subscription_trans WHERE subtrans_member_id={$this->ipsclass->member['id']} AND subtrans_sub_id={$sub_current['sub_id']} AND subtrans_state='paid'");
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'subscription_trans', 'where' => "subtrans_member_id={$this->ipsclass->member['id']} AND subtrans_sub_id={$sub_current['sub_id']} AND subtrans_state='paid'" ) );
$this->ipsclass->DB->exec_query();
if ( ! $cur_trans = $this->ipsclass->DB->fetch_row() )
{
@@ -222,12 +213,17 @@ class han_paysubscriptions
$end_date = ( $sub_upgrade['sub_unit'] == 'x' or $sub_current['sub_unit'] == 'x' )
? $this->ipsclass->lang['no_expire']
: $this->ipsclass->get_date( $cur_trans['subtrans_end_date'], 'JOINED' );
$new_date = ( $sub_upgrade['sub_unit'] == 'x' or $sub_current['sub_unit'] == 'x' )
? $this->ipsclass->lang['no_expire']
: $this->ipsclass->get_date( ( $cur_trans['subtrans_end_date'] - ($sub_current['sub_length'] * $this->day_to_seconds[$sub_current['sub_unit']]) + ($sub_upgrade['sub_length'] * $this->day_to_seconds[$sub_upgrade['sub_unit']])) , 'JOINED' );
$this->ipsclass->lang['sc_upgrade_string'] = sprintf( $this->ipsclass->lang['sc_upgrade_string'],
$sub_current['sub_title'],
$sub_upgrade['sub_title'],
$end_date,
sprintf( "%.2f", $balance * $this->cho_currency['subcurrency_exchange'] ).' '.$this->cho_currency['subcurrency_code']
sprintf( "%.2f", $balance * $this->cho_currency['subcurrency_exchange'] ).' '.$this->cho_currency['subcurrency_code'],
$new_date
);
//---------------------------------------
@@ -236,7 +232,7 @@ class han_paysubscriptions
if ( $sub_current['sub_unit'] != 'x' )
{
$time_left_to_run = $cur_trans['subtrans_end_date'] - time();
$time_left_to_run = ($cur_trans['subtrans_end_date'] + $sub_upgrade['sub_length']) - time();
$time_left_to_run = ceil($time_left_to_run / 86400);
$time_left_units = 'D';
@@ -376,7 +372,6 @@ class han_paysubscriptions
'ttr_int' => '',
'ttr_unit' => '',
'ttr_balance' => '',
'ttr_package_id' => $cur_trans['subtrans_sub_id'],
'vendor_id' => $pay_method['submethod_sid'],
'product_id' => $extra['subextra_product_id'],
'extra_1' => $pay_method['submethod_custom_1'],
@@ -450,6 +445,16 @@ class han_paysubscriptions
if ( $pay_method['submethod_is_auto'] != 1 )
{
$this->do_log("{$this->class_gateway->i_am}: Tried to return validate but failed: ACP settings have auto validate switched off");
if ( $this->class_gateway->no_postback )
{
$this->ipsclass->boink_it( GW_URL_PAYDONE );
}
else
{
$this->class_gateway->core_print_status_message();
}
exit();
}
@@ -460,6 +465,16 @@ class han_paysubscriptions
if ( empty( $_REQUEST ) )
{
$this->do_log("{$this->class_gateway->i_am}: Tried to return validate but failed: REQUEST DATA EMPTY");
if ( $this->class_gateway->no_postback )
{
$this->ipsclass->boink_it( GW_URL_PAYDONE );
}
else
{
$this->class_gateway->core_print_status_message();
}
exit();
}
@@ -482,8 +497,18 @@ class han_paysubscriptions
if ( ! $this->results['verified'] )
{
if ( ! GW_TEST_MODE_ON )
{
$this->do_log("{$this->class_gateway->i_am}: UPGRADE - NOT VERIFIED" . $this->class_gateway->error );
{
$this->do_log("{$this->class_gateway->i_am}: UPGRADE - NOT VERIFIED " . $this->class_gateway->error );
if ( $this->class_gateway->no_postback )
{
$this->ipsclass->boink_it( GW_URL_PAYDONE );
}
else
{
$this->class_gateway->core_print_status_message();
}
exit();
}
}
@@ -511,6 +536,16 @@ class han_paysubscriptions
if ( ! $this->member['id'] )
{
$this->do_log("{$this->class_gateway->i_am}: Could not locate a member id to upgrade");
if ( $this->class_gateway->no_postback )
{
$this->ipsclass->boink_it( GW_URL_PAYDONE );
}
else
{
$this->class_gateway->core_print_status_message();
}
exit();
}
@@ -523,9 +558,17 @@ class han_paysubscriptions
if ( ! $this->new_sub['sub_id'] )
{
$this->do_log("{$this->class_gateway->i_am}: Tried to return validate but failed: No start sub package found");
exit();
}
if ( $this->class_gateway->no_postback )
{
$this->ipsclass->boink_it( GW_URL_PAYDONE );
}
else
{
$this->class_gateway->core_print_status_message();
}
}
//--------------------------------------
// Check for txn_id - if already used, this
// is a dupe from a repeated form submit
@@ -533,7 +576,7 @@ class han_paysubscriptions
$this->trans = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'subtrans_id',
'from' => 'subscription_trans',
'where' => "subtrans_trxid='".addslashes($this->results['transaction_id'])."'" ) );
'where' => "subtrans_subscrid='".addslashes($this->results['subscription_id'])."'" ) );
if ( $this->trans['subtrans_id'] )
{
@@ -541,7 +584,7 @@ class han_paysubscriptions
// Is this a reversal?
//--------------------------------------
if ( $this->results['payment_status'] == 'REFUND' )
if ( $this->results['payment_status'] == 'REFUND' OR $this->results['payment_status'] == 'CANCEL' )
{
//-----------------------------
// Update trans for the refund
@@ -556,15 +599,34 @@ class han_paysubscriptions
//-----------------------------
$this->do_log("{$this->class_gateway->i_am}: Reversal / Subscription cancellation completed");
if ( $this->class_gateway->no_postback )
{
$this->ipsclass->boink_it( GW_URL_PAYDONE );
}
else
{
$this->class_gateway->core_print_status_message();
}
exit();
}
else
{
$this->do_log("{$this->class_gateway->i_am}: Duplicate transaction ID - failing and exiting transaction");
if ( $this->class_gateway->no_postback )
{
$this->ipsclass->boink_it( GW_URL_PAYDONE );
}
else
{
$this->class_gateway->core_print_status_message();
}
exit();
}
}
//--------------------------------------
// UPGRADE
//--------------------------------------
@@ -633,7 +695,15 @@ class han_paysubscriptions
}
}
$this->class_gateway->core_print_status_message();
if ( $this->class_gateway->no_postback )
{
$this->ipsclass->boink_it( GW_URL_PAYDONE );
}
else
{
$this->class_gateway->core_print_status_message();
}
exit();
}
@@ -662,6 +732,11 @@ class han_paysubscriptions
exit();
}
$this->existing_sub = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
'from' => 'subscriptions',
'where' => 'sub_id='.intval($this->cur_details['subtrans_sub_id'])
) );
//--------------------------------------
// Update subscription
//--------------------------------------
@@ -681,6 +756,16 @@ class han_paysubscriptions
$this->update['subtrans_end_date'] = 9999999999;
}
//--------------------------------------
// Else increase their sub
//--------------------------------------
else
{
$this->update['subtrans_end_date'] = $this->cur_details['subtrans_end_date'] + ( $this->new_sub['sub_length'] * $this->day_to_seconds[ $this->new_sub['sub_unit'] ] );
$this->update['subtrans_end_date'] -= ($this->existing_sub['sub_length'] * $this->day_to_seconds[ $this->existing_sub['sub_unit'] ] );
}
//--------------------------------------
// Update DB
//--------------------------------------
@@ -733,6 +818,11 @@ class han_paysubscriptions
exit();
}
$this->existing_sub = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
'from' => 'subscriptions',
'where' => 'sub_id='.intval($this->cur_details['subtrans_sub_id'])
) );
//--------------------------------------
// Update subscription
//--------------------------------------
@@ -752,6 +842,16 @@ class han_paysubscriptions
$this->update['subtrans_end_date'] = 9999999999;
}
//--------------------------------------
// Else increase their sub
//--------------------------------------
else
{
$this->update['subtrans_end_date'] = $this->cur_details['subtrans_end_date'] + ( $this->new_sub['sub_length'] * $this->day_to_seconds[ $this->new_sub['sub_unit'] ] );
$this->update['subtrans_end_date'] -= ($this->existing_sub['sub_length'] * $this->day_to_seconds[ $this->existing_sub['sub_unit'] ] );
}
//--------------------------------------
// Update DB
//--------------------------------------
@@ -808,6 +908,8 @@ class han_paysubscriptions
// Update subscription
//--------------------------------------
$old_group = ($this->new_sub[ 'sub_new_group' ] > 0) ? $this->member['mgroup'] : 0;
$this->update['subtrans_paid'] = $results['amount_paid'] * $this->def_currency['subcurrency_exchange'];
$this->update['subtrans_trxid'] = $this->results['transaction_id'];
$this->update['subtrans_sub_id'] = $this->new_sub['sub_id'];
@@ -815,7 +917,7 @@ class han_paysubscriptions
$this->update['subtrans_state'] = strtolower( $results['state'] );
$this->update['subtrans_cumulative'] = $this->update['subtrans_paid'];
$this->update['subtrans_member_id'] = $this->member['id'];
$this->update['subtrans_old_group'] = $this->member['mgroup'];
$this->update['subtrans_old_group'] = $old_group;
$this->update['subtrans_start_date'] = time();
//--------------------------------------
@@ -1041,16 +1143,15 @@ class han_paysubscriptions
}
}
$query = "UPDATE ibf_members SET sub_end=$end_date";
$update_fields = array();
$update_fields['sub_end'] = $end_date;
if ( $new_sub['sub_new_group'] )
{
$query .= ", mgroup={$new_sub['sub_new_group']}";
$update_fields['mgroup'] = $new_sub['sub_new_group'];
}
$query .= " WHERE id={$member['id']}";
$this->ipsclass->DB->query($query);
$this->ipsclass->DB->do_update( "members", $update_fields, "id=".$member['id'] );
//--------------------------------------
// Running Custom code?
@@ -1112,9 +1213,13 @@ class han_paysubscriptions
{
define( 'IPB_CALLED', 1 );
$query = "UPDATE ibf_members SET sub_end=0";
$update_fields = array();
$update_fields['sub_end'] = 0;
if ( $cur_trx_id )
// We want to move them back to the member group if the payment
// failed, but not if they cancelled a subscription - bug 2008
if ( $cur_trx_id AND !$this->results['payment_status'] == 'CANCEL' )
{
$this->ipsclass->DB->cache_add_query( 'mod_failed_member', array( 'cur_trx_id' => $cur_trx_id ), 'sql_subsm_queries' );
$this->ipsclass->DB->cache_exec_query();
@@ -1123,12 +1228,10 @@ class han_paysubscriptions
$mgroup = $r['g_id'] ? $r['g_id'] : $this->ipsclass->vars['member_group'];
$query .= ", mgroup={$mgroup}";
$update_fields['mgroup'] = $mgroup;
}
$query .= " WHERE id={$member['id']}";
$this->ipsclass->DB->query($query);
$this->ipsclass->DB->do_update( "members", $update_fields, "id=".$member['id'] );
//--------------------------------------
// Running Custom code?
@@ -1202,6 +1305,8 @@ class han_paysubscriptions
}
}
$extra = htmlentities( strip_tags( str_replace( '\\', '', $extra ) ) );
//--------------------------------------
// Add to DB
//--------------------------------------
+9 -15
View File
@@ -2,27 +2,17 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.1.7
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Tuesday 18th of July 2006 05:56:00 PM
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
| 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: 2005-10-10 14:08:54 +0100 (Mon, 10 Oct 2005) $
| > $Revision: 23 $
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -35,7 +25,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();
}
@@ -52,6 +42,10 @@ class han_post
var $forum;
var $md5_check;
var $modules = array();
var $obj = array();
/*-------------------------------------------------------------------------*/
// INIT
/*-------------------------------------------------------------------------*/
+1 -15
View File
@@ -1,15 +1 @@
<html>
<head><title>Ошибка &lt; Русская версия Invision Power Board</title></head>
<body>
<h1>Ошибка &lt; Русская версия Invision Power Board</h1>
<hr>
Вы попали на несуществующую страницу!<br>Пожалуйста нажмите на кнопочку &laquo;<b>Назад</b>&raquo;
в вашем браузере для возвращения на предыдущую страницу.
<hr>
<b>Invision Power Board:</b>
<ul>
<li><a href="http://www.bestwarez.ru" title="BestWarez.Ru - Только лучший Варез!">Русская версия</a></li>
<li><a href="http://www.invisionboard.com" title="Official Site">English version</a></li>
</ul>
</body>
</html>
<html>␍<head><title>Invision Power Board - Bulletin Board System</title></head>␍<body>␍<h1>403: Invision Power Board -> Forbidden</h1>␍<hr>␍You have reached this Page in error, please use␍your back button to return to Invision Board.␍<hr>␍<a href="http://www.invisionboard.com/">Invision Power Board</a>␍</body>␍</html>␍