Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -0,0 +1,213 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 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 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Post Handler
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Wednesday 9th March 2005 (15:23)
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class han_editor
|
||||
{
|
||||
# Global
|
||||
var $ipsclass;
|
||||
var $class_editor;
|
||||
|
||||
# Method
|
||||
var $method;
|
||||
|
||||
# Skin method
|
||||
var $skin_function;
|
||||
|
||||
# Html handler
|
||||
var $html;
|
||||
|
||||
# Pass width
|
||||
var $ed_width = '650px';
|
||||
|
||||
# Pass height
|
||||
var $ed_height = 250;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function init()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$class = "";
|
||||
|
||||
if ( ! $this->ipsclass->vars['posting_allow_rte'] )
|
||||
{
|
||||
$this->ipsclass->member['members_editor_choice'] = 'std';
|
||||
}
|
||||
|
||||
if ( ! $this->method )
|
||||
{
|
||||
$this->method = $this->ipsclass->member['members_editor_choice'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Fix width
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ed_width = $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']) )
|
||||
{
|
||||
$this->method = 'rte';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Force STD editor (fast reply, etc)
|
||||
//-----------------------------------------
|
||||
|
||||
if ( intval($_POST['std_used']) )
|
||||
{
|
||||
$this->method = 'std';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Sneaky Opera or Safari
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->method == 'rte' )
|
||||
{
|
||||
if ( $this->ipsclass->browser['browser'] == 'opera' AND $this->browser['version'] < 9.0 ) # Okay... this is for future compat.
|
||||
{
|
||||
$this->method = 'std';
|
||||
$this->ipsclass->force_editor_change = 1;
|
||||
}
|
||||
else if ( $this->ipsclass->browser['browser'] == 'safari' AND $this->ipsclass->browser['version'] < 1000 ) # Okay... this is for future compat.
|
||||
{
|
||||
$this->method = 'std';
|
||||
$this->ipsclass->force_editor_change = 1;
|
||||
}
|
||||
else if ( $this->ipsclass->browser['browser'] == 'konqueror' )
|
||||
{
|
||||
$this->method = 'std';
|
||||
$this->ipsclass->force_editor_change = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//$this->method = "rte";
|
||||
|
||||
//-----------------------------------------
|
||||
// Which class
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $this->method )
|
||||
{
|
||||
case 'rte':
|
||||
$class = 'class_editor_rte.php';
|
||||
$this->skin_function = 'editor_rte';
|
||||
break;
|
||||
case 'std':
|
||||
$class = 'class_editor_std.php';
|
||||
$this->skin_function = 'editor_std';
|
||||
break;
|
||||
default:
|
||||
$class = 'class_editor_std.php';
|
||||
$this->skin_function = 'editor_std';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load classes
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH . 'sources/classes/editor/class_editor.php' );
|
||||
require_once( ROOT_PATH . 'sources/classes/editor/'.$class );
|
||||
|
||||
$this->class_editor = new class_editor_module();
|
||||
$this->class_editor->ipsclass =& $this->ipsclass;
|
||||
$this->class_editor->allow_unicode = $this->ipsclass->allow_unicode;
|
||||
$this->class_editor->get_magic_quotes = $this->ipsclass->get_magic_quotes;
|
||||
|
||||
//-----------------------------------------
|
||||
// Init class
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class_editor->main_init();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Mode: Show editor
|
||||
// Takes raw text with BBCode *NOT* converted BBCode
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function show_editor( $text, $form_field='post_content' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Load skin and language
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->ipsclass->compiled_templates['skin_editors'] )
|
||||
{
|
||||
$this->ipsclass->load_template( 'skin_editors' );
|
||||
}
|
||||
|
||||
$this->ipsclass->load_language( 'lang_editors' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Pre parse...
|
||||
//-----------------------------------------
|
||||
|
||||
$text = $this->class_editor->process_before_form( $text );
|
||||
$func = $this->skin_function;
|
||||
|
||||
return $this->ipsclass->compiled_templates['skin_editors']->$func( $text, $form_field, $this->ed_width, $this->ed_height );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Mode: Process text
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function process_raw_post( $form_field )
|
||||
{
|
||||
return $this->class_editor->process_after_form( $form_field );
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,207 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 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 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Post Handler
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Wednesday 9th March 2005 (15:23)
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class han_login
|
||||
{
|
||||
# Global
|
||||
var $ipsclass;
|
||||
|
||||
var $module;
|
||||
|
||||
var $is_admin_auth = 0;
|
||||
var $return_code = 'WRONG_AUTH';
|
||||
var $member = array( 'id' => 0 );
|
||||
|
||||
# Work
|
||||
var $login_method = array();
|
||||
var $login_conf = array();
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function init()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$class = "";
|
||||
$conf = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// Load DB info
|
||||
//-----------------------------------------
|
||||
|
||||
$this->login_method = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_enabled=1' ) );
|
||||
|
||||
//$this->login_method['login_folder_name'] = 'external';
|
||||
|
||||
$class = ROOT_PATH.'sources/loginauth/'.$this->login_method['login_folder_name'].'/auth.php';
|
||||
$conf = ROOT_PATH.'sources/loginauth/'.$this->login_method['login_folder_name'].'/conf.php';
|
||||
|
||||
//-----------------------------------------
|
||||
// Got nothing?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->login_method['login_id'] OR ! file_exists( $class ) )
|
||||
{
|
||||
$this->login_method = array( 'login_title' => 'Internal',
|
||||
'login_folder_name' => 'internal',
|
||||
'login_allow_create' => 0 );
|
||||
|
||||
$class = ROOT_PATH.'sources/loginauth/internal/auth.php';
|
||||
$conf = ROOT_PATH.'sources/loginauth/internal/conf.php';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Attempt to load class
|
||||
//-----------------------------------------
|
||||
|
||||
if ( file_exists( $class ) )
|
||||
{
|
||||
require_once( ROOT_PATH . "sources/loginauth/login_core.php" );
|
||||
require_once( $class );
|
||||
$this->module = new login_method();
|
||||
$this->module->ipsclass =& $this->ipsclass;
|
||||
}
|
||||
else
|
||||
{
|
||||
fatal_error( "CANNOT LOCATE LOG IN FILE FOR {$this->login_method['login_folder_name']}" );
|
||||
exit();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get conf
|
||||
//-----------------------------------------
|
||||
|
||||
if ( file_exists( $conf ) )
|
||||
{
|
||||
require_once( $conf );
|
||||
$this->login_conf = $LOGIN_CONF;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up
|
||||
//-----------------------------------------
|
||||
|
||||
$this->module->is_admin_auth = $this->is_admin_auth;
|
||||
$this->module->allow_create = $this->login_method['login_allow_create'];
|
||||
$this->module->login_method = $this->login_method;
|
||||
$this->module->login_conf = $this->login_conf;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// PASSWORD CHECK
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function login_password_check( $username, $password )
|
||||
{
|
||||
$this->module->allow_create = 0;
|
||||
|
||||
if ( $this->login_method['login_folder_name'] != 'internal' AND $this->login_method['login_type'] == 'onfail' )
|
||||
{
|
||||
# Attempt local-auth first
|
||||
$this->module->auth_local( $username, $password );
|
||||
|
||||
# Success? Return...
|
||||
if ( $this->module->return_code == 'SUCCESS' )
|
||||
{
|
||||
$this->return_code = $this->module->return_code;
|
||||
$this->member = $this->module->member;
|
||||
return;
|
||||
}
|
||||
# No? attempt remote auth
|
||||
else
|
||||
{
|
||||
$this->module->authenticate( $username, $password );
|
||||
$this->return_code = $this->module->return_code == 'SUCCESS' ? 'SUCCESS' : 'FAIL';
|
||||
$this->member = $this->module->member;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->module->authenticate( $username, $password );
|
||||
$this->return_code = $this->module->return_code == 'SUCCESS' ? 'SUCCESS' : 'FAIL';
|
||||
$this->member = $this->module->member;
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// AUTHENTICATE
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function login_authenticate( $username, $password )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// On fail?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->login_method['login_folder_name'] != 'internal' AND $this->login_method['login_type'] == 'onfail' )
|
||||
{
|
||||
# Attempt local-auth first
|
||||
$this->module->auth_local( $username, $password );
|
||||
|
||||
# Success? Return...
|
||||
if ( $this->module->return_code == 'SUCCESS' )
|
||||
{
|
||||
$this->return_code = $this->module->return_code;
|
||||
$this->member = $this->module->member;
|
||||
return;
|
||||
}
|
||||
# No? attempt remote auth
|
||||
else
|
||||
{
|
||||
$this->module->authenticate( $username, $password );
|
||||
$this->return_code = $this->module->return_code;
|
||||
$this->member = $this->module->member;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->module->authenticate( $username, $password );
|
||||
$this->return_code = $this->module->return_code;
|
||||
$this->member = $this->module->member;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,468 @@
|
||||
<?php
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 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 $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Handler for BBCode parsing
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Wednesday 9th March 2005 11:03
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
class parse_bbcode
|
||||
{
|
||||
# Global
|
||||
var $ipsclass;
|
||||
var $bbclass;
|
||||
|
||||
# Already loaded classes?
|
||||
var $classes_loaded = 0;
|
||||
|
||||
# Update caches if not present?
|
||||
var $allow_update_caches = 0;
|
||||
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;
|
||||
|
||||
# Error
|
||||
var $error;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Constructor
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function parse_bbcode()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Anything to init?
|
||||
//-----------------------------------------
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// This function is called before inserting the post text into the DB
|
||||
// Depending on which method we're using, it will either check for errors
|
||||
// or parse the code into legacy (IPB 2.0<) format.
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function pre_db_parse( $text )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$class = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// 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'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Parse
|
||||
//-----------------------------------------
|
||||
|
||||
return $this->bbclass->pre_db_parse( $text );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// This function is called before showing the post for edit
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function pre_edit_parse( $text )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$class = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// 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'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Parse
|
||||
//-----------------------------------------
|
||||
|
||||
return $this->bbclass->pre_edit_parse( $text );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// This function is called before displaying the final post in the user's browser
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function pre_display_parse( $text )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$class = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// Check the DB cache
|
||||
// { Dont need this, for this }
|
||||
//-----------------------------------------
|
||||
|
||||
///$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_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'];
|
||||
|
||||
//-----------------------------------------
|
||||
// Parse
|
||||
//-----------------------------------------
|
||||
|
||||
return $this->bbclass->pre_display_parse( $text );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Function: convert_std_to_rte
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Convert STD contents TO RTE compatible
|
||||
*
|
||||
* Used when switching between editors or
|
||||
* when using the fast reply and hitting "More..."
|
||||
*
|
||||
* @param string STD text
|
||||
* @return string RTE text
|
||||
*/
|
||||
function convert_std_to_rte( $t )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get the correct class
|
||||
//-----------------------------------------
|
||||
|
||||
$this->_load_classes();
|
||||
|
||||
//-----------------------------------------
|
||||
// Ensure no slashy slashy
|
||||
//-----------------------------------------
|
||||
|
||||
$t = str_replace( '"','"', $t );
|
||||
$t = str_replace( "'",''', $t );
|
||||
|
||||
//-----------------------------------------
|
||||
// Convert <>
|
||||
//-----------------------------------------
|
||||
|
||||
$t = str_replace( '<', '<', $t );
|
||||
$t = str_replace( '>', '>', $t );
|
||||
|
||||
//-----------------------------------------
|
||||
// RTE expects <br /> not \n
|
||||
//-----------------------------------------
|
||||
|
||||
$t = str_replace( "\n", "<br />", str_replace( "\r\n", "\n", $t ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Okay, convert ready for DB
|
||||
//-----------------------------------------
|
||||
|
||||
$t = $this->pre_db_parse( $t );
|
||||
$t = $this->bbclass->clean_ipb_html( $t );
|
||||
|
||||
return $t;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Passthrough function: Clean up IPB HTML
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function convert_ipb_html_to_html( $t )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get the correct class
|
||||
//-----------------------------------------
|
||||
|
||||
$this->_load_classes();
|
||||
|
||||
return $this->bbclass->clean_ipb_html( $t );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Passthrough function: Strip all tags
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function strip_all_tags( $t )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get the correct class
|
||||
//-----------------------------------------
|
||||
|
||||
$this->_load_classes();
|
||||
|
||||
return $this->bbclass->strip_all_tags( $t );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Passthrough function: Badwords
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function bad_words( $t )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get the correct class
|
||||
//-----------------------------------------
|
||||
|
||||
$this->_load_classes();
|
||||
|
||||
$this->bbclass->bypass_badwords = $this->bypass_badwords ? $this->bypass_badwords : intval($this->ipsclass->member['g_bypass_badwords']);
|
||||
|
||||
return $this->bbclass->bad_words( $t );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Passthrough function: Parse poll tags
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function parse_poll_tags( $txt )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get the correct class
|
||||
//-----------------------------------------
|
||||
|
||||
$this->_load_classes();
|
||||
|
||||
//-----------------------------------------
|
||||
// [url]http://www.index.com[/url]
|
||||
// [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*\"\;\s*(\S+?)\s*\"\;\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 );
|
||||
|
||||
if ( $this->ipsclass->vars['allow_images'] )
|
||||
{
|
||||
$txt = preg_replace( "#\[img\](.+?)\[/img\]#ie", "\$this->bbclass->regex_check_image('\\1')", $txt );
|
||||
}
|
||||
|
||||
return $txt;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Passthrough function: make_quote_safe
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function make_quote_safe( $t )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get the correct class
|
||||
//-----------------------------------------
|
||||
|
||||
$this->_load_classes();
|
||||
|
||||
return $this->bbclass->_make_quote_safe( $t );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Passthrough function: Strip Quotes
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function strip_quotes( $t )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get the correct class
|
||||
//-----------------------------------------
|
||||
|
||||
$this->_load_classes();
|
||||
|
||||
return $this->bbclass->strip_quotes( $t );
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// CHECK (AND LOAD) CACHES
|
||||
// This function loads all the data we'll need.
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function check_caches()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check emoticons
|
||||
//-----------------------------------------
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if ( $this->allow_update_caches )
|
||||
{
|
||||
$this->ipsclass->update_cache( array( 'name' => 'emoticons', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check BBCode
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! 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' ) );
|
||||
$bbcode = $this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row($bbcode) )
|
||||
{
|
||||
$this->ipsclass->cache['bbcode'][] = $r;
|
||||
}
|
||||
|
||||
if ( $this->allow_update_caches )
|
||||
{
|
||||
$this->ipsclass->update_cache( array( 'name' => 'bbcode', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check badwords
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! is_array( $this->ipsclass->cache['badwords'] ) )
|
||||
{
|
||||
$this->ipsclass->cache['badwords'] = array();
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'type,swop,m_exact', 'from' => 'badwords' ) );
|
||||
$bbcode = $this->ipsclass->DB->simple_exec();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row($bbcode) )
|
||||
{
|
||||
$this->ipsclass->cache['badwords'][] = $r;
|
||||
}
|
||||
|
||||
if ( $this->allow_update_caches )
|
||||
{
|
||||
$this->ipsclass->update_cache( array( 'name' => 'badwords', 'array' => 1, 'deletefirst' => 1 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Load classes
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function _load_classes()
|
||||
{
|
||||
if ( ! $this->classes_loaded )
|
||||
{
|
||||
require_once( ROOT_PATH . 'sources/classes/bbcode/class_bbcode_core.php' );
|
||||
|
||||
switch( $this->pre_db_parse_method )
|
||||
{
|
||||
case 'legacy':
|
||||
$class = 'class_bbcode_legacy.php';
|
||||
break;
|
||||
default:
|
||||
$class = 'class_bbcode.php';
|
||||
break;
|
||||
}
|
||||
|
||||
require_once ( ROOT_PATH . 'sources/classes/bbcode/' . $class );
|
||||
|
||||
$this->bbclass = new class_bbcode();
|
||||
$this->bbclass->ipsclass =& $this->ipsclass;
|
||||
|
||||
$this->classes_loaded = 1;
|
||||
$this->error =& $this->bbclass->error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 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 $
|
||||
| > $Author: matt $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Post Handler
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: Wednesday 9th March 2005 (15:23)
|
||||
|
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class han_post
|
||||
{
|
||||
# Global
|
||||
var $ipsclass;
|
||||
var $class_post;
|
||||
|
||||
# Method
|
||||
var $method;
|
||||
|
||||
# Forum
|
||||
var $forum;
|
||||
var $md5_check;
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// INIT
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function init()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$class = "";
|
||||
|
||||
//-----------------------------------------
|
||||
// Which class
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $this->method )
|
||||
{
|
||||
case 'new':
|
||||
$class = 'class_post_new.php';
|
||||
break;
|
||||
case 'reply':
|
||||
$class = 'class_post_reply.php';
|
||||
break;
|
||||
case 'poll':
|
||||
$class = 'class_post_poll.php';
|
||||
break;
|
||||
case 'edit':
|
||||
$class = 'class_post_edit.php';
|
||||
break;
|
||||
|
||||
default:
|
||||
$class = 'class_post_new.php';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load classes
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( ROOT_PATH . 'sources/classes/post/class_post.php' );
|
||||
require_once( ROOT_PATH . 'sources/classes/post/'.$class );
|
||||
|
||||
$this->class_post = new post_functions();
|
||||
$this->class_post->ipsclass =& $this->ipsclass;
|
||||
$this->class_post->forum =& $this->forum;
|
||||
$this->class_post->md5_check = $this->md5_check;
|
||||
$this->class_post->obj = $this->obj;
|
||||
$this->class_post->modules = $this->modules;
|
||||
|
||||
//-----------------------------------------
|
||||
// Init class
|
||||
//-----------------------------------------
|
||||
|
||||
$this->class_post->main_init();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Mode: Save post in DB
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function show_form()
|
||||
{
|
||||
return $this->class_post->show_form();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Mode: Save post in DB
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function save_post()
|
||||
{
|
||||
return $this->class_post->save_post();
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
// Mode: Process
|
||||
/*-------------------------------------------------------------------------*/
|
||||
|
||||
function process_post()
|
||||
{
|
||||
return $this->class_post->process_post();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,15 @@
|
||||
<html>
|
||||
<head><title>Ошибка < Русская версия Invision Power Board</title></head>
|
||||
<body>
|
||||
<h1>Ошибка < Русская версия Invision Power Board</h1>
|
||||
<hr>
|
||||
Вы попали на несуществующую страницу!<br>Пожалуйста нажмите на кнопочку «<b>Назад</b>»
|
||||
в вашем браузере для возвращения на предыдущую страницу.
|
||||
<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>
|
||||
Reference in new issue
Block a user