Version 2.2.2

This commit is contained in:
Neo committed 2025-12-19 00:24:35 -08:00
1 parent 22f1b963ee
commit a3bb603c96
858 files changed
+479463 -188140

No files matched your search

+122 -113
View File
@@ -1,114 +1,123 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| http://www.invisionpower.com
| ========================================
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class acp_admin
{
# Globals
var $ipsclass;
/**
* Main choice array
*
* @var array
*/
var $another_choice = array();
/**
* Section title name
*
* @var string
*/
var $section_title = "Admin";
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_admin()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Administration";
$another_choice = array(
'idx' => 'index',
'stats' => 'statistics',
'sql' => 'sql',
'emaillog' => 'emaillogs',
'spiderlog' => 'spiderlogs',
'warnlog' => 'warnlogs',
'modlog' => 'modlogs',
'adminlog' => 'adminlogs',
'emailerror'=> 'emailerror',
'components'=> 'components',
'acpperms' => 'acppermissions',
'diag' => 'diagnostics',
'loginlog' => 'logs_login',
'security' => 'security',
);
if ( !isset($this->ipsclass->input['act']) OR !isset($another_choice[ $this->ipsclass->input['act'] ]) OR !$another_choice[ $this->ipsclass->input['act'] ] )
{
$this->ipsclass->input['act'] = 'idx';
}
$this->ipsclass->form_code = 'section=admin&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=admin&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'admin';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
if ( $this->ipsclass->input['act'] != 'idx' AND $this->ipsclass->input['act'] != 'acpperms' AND $this->ipsclass->input['act'] != 'sql' )
{
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
}
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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)
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class acp_admin
{
# Globals
var $ipsclass;
/**
* Main choice array
*
* @var array
*/
var $another_choice = array();
/**
* Section title name
*
* @var string
*/
var $section_title = "Àäìèíèñòðèðîâàíèå";
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_admin()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Àäìèíèñòðèðîâàíèå";
$another_choice = array(
'idx' => 'index',
'stats' => 'statistics',
'sql' => 'sql',
'emaillog' => 'emaillogs',
'spiderlog' => 'spiderlogs',
'warnlog' => 'warnlogs',
'modlog' => 'modlogs',
'adminlog' => 'adminlogs',
'emailerror'=> 'emailerror',
'components'=> 'components',
'acpperms' => 'acppermissions',
'diag' => 'diagnostics',
'loginlog' => 'logs_login',
'security' => 'security',
);
if ( !isset($this->ipsclass->input['act']) OR !isset($another_choice[ $this->ipsclass->input['act'] ]) OR !$another_choice[ $this->ipsclass->input['act'] ] )
{
$this->ipsclass->input['act'] = 'idx';
}
$this->ipsclass->form_code = 'section=admin&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=admin&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'admin';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
if ( $this->ipsclass->input['act'] != 'idx' AND $this->ipsclass->input['act'] != 'acpperms' AND $this->ipsclass->input['act'] != 'sql' )
{
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
}
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
?>
+166 -157
View File
@@ -1,158 +1,167 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| http://www.invisionpower.com
| ========================================
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class acp_components
{
# Globals
var $ipsclass;
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_components()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Components";
//--------------------------------
// Get info from DB (Special case)
//--------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'order' => 'com_position ASC' ) );
$this->ipsclass->DB->simple_exec();
$this->ipsclass->menu_components = array();
$another_choice = array();
$first_choice = "";
$menu_data = array();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
if ( $r['com_section'] AND $r['com_filename'] )
{
$another_choice[ $r['com_section'] ] = str_replace( ".php", "", $r['com_filename'] );
if ( ! $first_choice && $r['com_section'] != 'copyright' )
{
$first_choice = $r['com_section'];
}
//--------------------------------
// Set the default...
//--------------------------------
$this->ipsclass->menu_components[] = $r;
//--------------------------------
// Grab menu data
//--------------------------------
$menu_data[ $r['com_section'] ] = unserialize( $r['com_menu_data'] );
}
}
//-----------------------------------------
// Get default action
//-----------------------------------------
if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) )
{
$this->ipsclass->input['act'] = $first_choice;
}
//-----------------------------------------
// Still got nothing?
//-----------------------------------------
if ( ! $this->ipsclass->input['act'] )
{
$this->ipsclass->input['act'] = 'default';
$another_choice['default'] = 'default';
}
$this->ipsclass->form_code = 'section=components&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=components&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'components';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|'.$this->ipsclass->input['act'] );
//-----------------------------------------
// Got a code?
//-----------------------------------------
if ( $this->ipsclass->input['code'] )
{
$this->ipsclass->input['code'] = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['code'] );
if ( is_array( $menu_data[ $this->ipsclass->input['act'] ] ) and count( $menu_data[ $this->ipsclass->input['act'] ] ) )
{
foreach( $menu_data[ $this->ipsclass->input['act'] ] as $menu_array )
{
if ( preg_match( "/code={$this->ipsclass->input['code']}(&|$)/i", $menu_array['menu_url'] ) )
{
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|'.$this->ipsclass->input['act'].':'.$menu_array['menu_permbit'] );
break;
}
}
}
}
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/components_acp/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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)
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class acp_components
{
# Globals
var $ipsclass;
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_components()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Êîìïîíåíòû";
//--------------------------------
// Get info from DB (Special case)
//--------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'order' => 'com_position ASC' ) );
$this->ipsclass->DB->simple_exec();
$this->ipsclass->menu_components = array();
$another_choice = array();
$first_choice = "";
$menu_data = array();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
if ( $r['com_section'] AND $r['com_filename'] )
{
$another_choice[ $r['com_section'] ] = str_replace( ".php", "", $r['com_filename'] );
if ( ! $first_choice && $r['com_section'] != 'copyright' )
{
$first_choice = $r['com_section'];
}
//--------------------------------
// Set the default...
//--------------------------------
$this->ipsclass->menu_components[] = $r;
//--------------------------------
// Grab menu data
//--------------------------------
$menu_data[ $r['com_section'] ] = unserialize( $r['com_menu_data'] );
}
}
//-----------------------------------------
// Get default action
//-----------------------------------------
if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) )
{
$this->ipsclass->input['act'] = $first_choice;
}
//-----------------------------------------
// Still got nothing?
//-----------------------------------------
if ( ! $this->ipsclass->input['act'] )
{
$this->ipsclass->input['act'] = 'default';
$another_choice['default'] = 'default';
}
$this->ipsclass->form_code = 'section=components&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=components&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'components';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|'.$this->ipsclass->input['act'] );
//-----------------------------------------
// Got a code?
//-----------------------------------------
if ( $this->ipsclass->input['code'] )
{
$this->ipsclass->input['code'] = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['code'] );
if ( is_array( $menu_data[ $this->ipsclass->input['act'] ] ) and count( $menu_data[ $this->ipsclass->input['act'] ] ) )
{
foreach( $menu_data[ $this->ipsclass->input['act'] ] as $menu_array )
{
if ( preg_match( "/code={$this->ipsclass->input['code']}(&|$)/i", $menu_array['menu_url'] ) )
{
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|'.$this->ipsclass->input['act'].':'.$menu_array['menu_permbit'] );
break;
}
}
}
}
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/components_acp/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
?>
+109 -100
View File
@@ -1,101 +1,110 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| http://www.invisionpower.com
| ========================================
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class acp_content
{
# Globals
var $ipsclass;
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_content()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Content Management";
$another_choice = array(
'forum' => 'forums',
'group' => 'groups',
'mod' => 'moderator',
'multimod' => 'multi_moderate',
'mem' => 'member',
'field' => 'profilefields',
'mtools' => 'member_tools',
'msubs' => 'paysubscriptions',
'bbcode' => 'bbcode',
'babw' => 'banandbadword',
'attach' => 'attachments',
'rssexport' => 'rssexport',
'rssimport' => 'rssimport',
'calendars' => 'calendars',
);
if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) )
{
$this->ipsclass->input['act'] = 'forum';
}
$this->ipsclass->form_code = 'section=content&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=content&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'content';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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)
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class acp_content
{
# Globals
var $ipsclass;
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_content()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Óïðàâëåíèå êîíòåíòîì";
$another_choice = array(
'forum' => 'forums',
'group' => 'groups',
'mod' => 'moderator',
'multimod' => 'multi_moderate',
'mem' => 'member',
'field' => 'profilefields',
'mtools' => 'member_tools',
'msubs' => 'paysubscriptions',
'bbcode' => 'bbcode',
'babw' => 'banandbadword',
'attach' => 'attachments',
'rssexport' => 'rssexport',
'rssimport' => 'rssimport',
'calendars' => 'calendars',
);
if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) )
{
$this->ipsclass->input['act'] = 'forum';
}
$this->ipsclass->form_code = 'section=content&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=content&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'content';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
?>
+97 -88
View File
@@ -1,89 +1,98 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| http://www.invisionpower.com
| ========================================
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class acp_help
{
# Globals
var $ipsclass;
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_content()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Content Management";
$another_choice = array(
'diag' => 'diagnostics',
'support' => 'support',
);
if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) )
{
$this->ipsclass->input['act'] = 'support';
}
$this->ipsclass->form_code = 'section=help&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=help&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'help';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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)
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class acp_help
{
# Globals
var $ipsclass;
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_content()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Ïîìîùü è ïîääåðæêà";
$another_choice = array(
'diag' => 'diagnostics',
'support' => 'support',
);
if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) )
{
$this->ipsclass->input['act'] = 'support';
}
$this->ipsclass->form_code = 'section=help&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=help&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'help';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
?>
+105 -96
View File
@@ -1,97 +1,106 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| http://www.invisionpower.com
| ========================================
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class acp_lookandfeel
{
# Globals
var $ipsclass;
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_lookandfeel()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Look &amp; Feel";
$another_choice = array(
'wrap' => 'skin_wrappers',
'style' => 'skin_css',
'image' => 'skin_macros',
'sets' => 'skin_sets',
'templ' => 'skin_template_bits',
'import' => 'skin_import',
'lang' => 'languages',
'skintools' => 'skintools',
'emoticons' => 'emoticons',
'skindiff' => 'skin_diff',
);
if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) )
{
$this->ipsclass->input['act'] = 'sets';
}
$this->ipsclass->form_code = 'section=lookandfeel&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=lookandfeel&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'lookandfeel';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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)
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class acp_lookandfeel
{
# Globals
var $ipsclass;
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_lookandfeel()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Âíåøíèé âèä";
$another_choice = array(
'wrap' => 'skin_wrappers',
'style' => 'skin_css',
'image' => 'skin_macros',
'sets' => 'skin_sets',
'templ' => 'skin_template_bits',
'import' => 'skin_import',
'lang' => 'languages',
'skintools' => 'skintools',
'emoticons' => 'emoticons',
'skindiff' => 'skin_diff',
);
if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) )
{
$this->ipsclass->input['act'] = 'sets';
}
$this->ipsclass->form_code = 'section=lookandfeel&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=lookandfeel&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'lookandfeel';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
?>
+58 -49
View File
@@ -1,16 +1,25 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| (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 SOFTWARE!
| http://www.invisionboard.com
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
|
| > CONTROL PANEL PAGES FILE
@@ -21,69 +30,69 @@
*/
//===========================================================================
// Simple library that holds all the links for the admin cp
// Íåáîëüøàÿ áèáëèîòåêà, êîíòðîëèðóþùàÿ âñå ññûëêè àäìèíöåíòðà
//===========================================================================
// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) )
// $PAGES[ $cat_id ][$page_id][0] = Page name
// $PAGES[ $cat_id ][$page_id][1] = Url
// $PAGES[ $cat_id ][$page_id][2] = Look for folder before showing
// $PAGES[ $cat_id ][$page_id][3] = URL type: 1 = Board URL 0 = ACP URL
// $PAGES[ $cat_id ][$page_id][4] = Item icon: 1= redirect 0 = Normal
// $PAGES[ $cat_id ][$page_id][0] = Íàçâàíèå ñòðàíèöû
// $PAGES[ $cat_id ][$page_id][1] = Ññûëêà
// $PAGES[ $cat_id ][$page_id][2] = Ïðîñìîòð äèðåêòîðèè ïåðåä îòîáðàæåíèåì
// $PAGES[ $cat_id ][$page_id][3] = Òèï ññûëêè: 1 = ôîðóì 0 = àäìèíöåíòð
// $PAGES[ $cat_id ][$page_id][4] = Èêîíêà ìåíþ: 1 = ïåðåàäðåñàöèÿ 0 = íîðìàëüíàÿ
$CATS[] = array( 'Security Center' );
$CATS[] = array( 'Áåçîïàñíîñòü' );
$PAGES[] = array(
1 => array( 'Security Center' , 'section=admin&amp;act=security' ),
2 => array( 'List All Administrators', 'section=admin&amp;act=security&amp;code=list_admins' ),
1 => array( 'Öåíòð áåçîïàñíîñòè' , 'section=admin&amp;act=security' ),
2 => array( 'Ñïèñîê àäìèíèñòðàòîðîâ', 'section=admin&amp;act=security&amp;code=list_admins' ),
);
$CATS[] = array( 'Components' );
$CATS[] = array( 'Êîìïîíåíòû' );
$PAGES[] = array(
1 => array( 'Manage Components' , 'section=admin&amp;act=components' ),
2 => array( 'Register New Component' , 'section=admin&amp;act=components&amp;code=component_add' ),
1 => array( 'Ñïèñîê êîìïîíåíòîâ' , 'section=admin&amp;act=components' ),
2 => array( 'Äîáàâèòü êîìïîíåíò' , 'section=admin&amp;act=components&amp;code=component_add' ),
);
$CATS[] = array( 'Statistic Center' );
$CATS[] = array( 'Ñòàòèñòèêà' );
$PAGES[] = array(
1 => array( 'Registration Stats' , 'section=admin&amp;act=stats&amp;code=reg' ),
2 => array( 'New Topic Stats' , 'section=admin&amp;act=stats&amp;code=topic' ),
3 => array( 'Post Stats' , 'section=admin&amp;act=stats&amp;code=post' ),
4 => array( 'Personal Message' , 'section=admin&amp;act=stats&amp;code=msg' ),
5 => array( 'Topic Views' , 'section=admin&amp;act=stats&amp;code=views' ),
1 => array( 'Ðåãèñòðàöèé' , 'section=admin&amp;act=stats&amp;code=reg' ),
2 => array( 'Íîâûõ òåì' , 'section=admin&amp;act=stats&amp;code=topic' ),
3 => array( 'Ñîîáùåíèé' , 'section=admin&amp;act=stats&amp;code=post' ),
4 => array( 'Ëè÷íûõ ñîîáùåíèé' , 'section=admin&amp;act=stats&amp;code=msg' ),
5 => array( 'Ïðîñìîòðîâ òåì' , 'section=admin&amp;act=stats&amp;code=views' ),
);
$CATS[] = array( 'ACP Restrictions' );
$CATS[] = array( 'Îãðàíè÷åíèÿ äîñòóïà â&nbsp;ÀÖ' );
$PAGES[] = array(
1 => array( 'Manage Restrictions' , 'section=admin&amp;act=acpperms&amp;code=acpp_list' ),
);
$CATS[] = array( 'SQL Management' );
1 => array( 'Óïðàâëåíèå îãðàíè÷åíèÿìè' , 'section=admin&amp;act=acpperms&amp;code=acpp_list' ),
);
$CATS[] = array( 'Óïðàâëåíèå SQL' );
$PAGES[] = array(
1 => array( 'SQL Toolbox' , 'section=admin&amp;act=sql' ),
2 => array( 'SQL Back Up' , 'section=admin&amp;act=sql&amp;code=backup' ),
3 => array( 'SQL Runtime Info', 'section=admin&amp;act=sql&amp;code=runtime' ),
4 => array( 'SQL System Vars' , 'section=admin&amp;act=sql&amp;code=system' ),
5 => array( 'SQL Processes' , 'section=admin&amp;act=sql&amp;code=processes' ),
1 => array( 'Èíñòðóìåíòû' , 'section=admin&amp;act=sql' ),
2 => array( 'Ðåçåðâíîå êîïèðîâàíèå' , 'section=admin&amp;act=sql&amp;code=backup' ),
3 => array( 'Èíôîðìàöèÿ î ñåðâåðå', 'section=admin&amp;act=sql&amp;code=runtime' ),
4 => array( 'Ñèñòåìíûå ïåðåìåííûå' , 'section=admin&amp;act=sql&amp;code=system' ),
5 => array( 'Ïðîöåññû' , 'section=admin&amp;act=sql&amp;code=processes' ),
);
$CATS[] = array( 'Board Logs' );
$CATS[] = array( 'Æóðíàëû îïåðàöèé' );
$PAGES[] = array(
1 => array( 'View Moderator Logs' , 'section=admin&amp;act=modlog' ),
2 => array( 'View Admin Logs' , 'section=admin&amp;act=adminlog' ),
3 => array( 'View Email Logs' , 'section=admin&amp;act=emaillog' ),
4 => array( 'View Email Error Logs', 'section=admin&amp;act=emailerror' ),
5 => array( 'View Bot Logs' , 'section=admin&amp;act=spiderlog' ),
6 => array( 'View Warn Logs' , 'section=admin&amp;act=warnlog' ),
7 => array( 'View ACP Log In Logs' , 'section=admin&amp;act=loginlog' ),
1 => array( 'Ìîäåðèðîâàíèå' , 'section=admin&amp;act=modlog' ),
2 => array( 'Àäìèíèñòðàòèðîâàíèå' , 'section=admin&amp;act=adminlog' ),
3 => array( 'E-mail îòïðàâëåíèÿ' , 'section=admin&amp;act=emaillog' ),
4 => array( 'E-mail îøèáêè', 'section=admin&amp;act=emailerror' ),
5 => array( 'Ïîèñêîâûå ðîáîòû' , 'section=admin&amp;act=spiderlog' ),
6 => array( 'Ïðåäóïðåæäåíèÿ' , 'section=admin&amp;act=warnlog' ),
7 => array( 'Ïîïûòêè àâòîðèçàöèè â ÀÖ' , 'section=admin&amp;act=loginlog' ),
);
?>
@@ -1,83 +1,92 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| http://www.invisionpower.com
| ========================================
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com
+---------------------------------------------------------------------------
|
| > CONTROL PANEL (COMPONENTS) PAGES FILE
| > Script written by Matt Mecham
| > Date started: Tue. 15th February 2005
|
+---------------------------------------------------------------------------
*/
//===========================================================================
// Simple library that holds all the links for the admin cp
// THIS PAGE CLASS: Generate menu from DB
//===========================================================================
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
global $ipsclass;
$CATS = array();
$PAGES = array();
//--------------------------------
// Get info from DB
//--------------------------------
foreach( $ipsclass->menu_components as $r )
{
//--------------------------------
// Process data
//--------------------------------
$menu_data = unserialize( $r['com_menu_data'] );
$tmp_pages = array();
//--------------------------------
// Do we have any menu links?
//--------------------------------
if ( is_array( $menu_data ) and count( $menu_data ) )
{
//--------------------------------
// First item is title...
//--------------------------------
$CATS[] = array( $r['com_title'] );
foreach( $menu_data as $menu )
{
if ( $menu['menu_text'] AND $menu['menu_url'] )
{
if ( $menu['menu_redirect'] )
{
$tmp_pages[] = array( $menu['menu_text'], $menu['menu_url'], "", 0, 1 );
}
else
{
$tmp_pages[] = array( $menu['menu_text'], 'section=components&amp;act='.$r['com_section'].'&amp;'.$menu['menu_url'] );
}
}
}
$PAGES[] = $tmp_pages;
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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)
+---------------------------------------------------------------------------
|
| > CONTROL PANEL (COMPONENTS) PAGES FILE
| > Script written by Matt Mecham
| > Date started: Tue. 15th February 2005
|
+---------------------------------------------------------------------------
*/
//===========================================================================
// Íåáîëüøàÿ áèáëèîòåêà, êîíòðîëèðóþùàÿ âñå ññûëêè àäìèíöåíòðà
// ÝÒÎÒ ÊËÀÑÑ ÑÒÐÀÍÈÖÛ: Ãåíåðàöèÿ ìåíþ èç ÁÄ
//===========================================================================
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
global $ipsclass;
$CATS = array();
$PAGES = array();
//--------------------------------
// Get info from DB
//--------------------------------
foreach( $ipsclass->menu_components as $r )
{
//--------------------------------
// Process data
//--------------------------------
$menu_data = unserialize( $r['com_menu_data'] );
$tmp_pages = array();
//--------------------------------
// Do we have any menu links?
//--------------------------------
if ( is_array( $menu_data ) and count( $menu_data ) )
{
//--------------------------------
// First item is title...
//--------------------------------
$CATS[] = array( $r['com_title'] );
foreach( $menu_data as $menu )
{
if ( $menu['menu_text'] AND $menu['menu_url'] )
{
if ( $menu['menu_redirect'] )
{
$tmp_pages[] = array( $menu['menu_text'], $menu['menu_url'], "", 0, 1 );
}
else
{
$tmp_pages[] = array( $menu['menu_text'], 'section=components&amp;act='.$r['com_section'].'&amp;'.$menu['menu_url'] );
}
}
}
$PAGES[] = $tmp_pages;
}
}
?>
+121 -110
View File
@@ -1,111 +1,122 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| http://www.invisionpower.com
| ========================================
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com
+---------------------------------------------------------------------------
|
| > CONTROL PANEL PAGES FILE
| > Script written by Matt Mecham
| > Date started: Fri 8th April 2005 (12:07)
|
+---------------------------------------------------------------------------
*/
//===========================================================================
// Simple library that holds all the links for the admin cp
//===========================================================================
// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) )
// $PAGES[ $cat_id ][$page_id][0] = Page name
// $PAGES[ $cat_id ][$page_id][1] = Url
// $PAGES[ $cat_id ][$page_id][2] = Look for folder before showing
// $PAGES[ $cat_id ][$page_id][3] = URL type: 1 = Board URL 0 = ACP URL
// $PAGES[ $cat_id ][$page_id][4] = Item icon: 1= redirect 0 = Normal
$CATS[] = array( 'Forum Control' );
$PAGES[] = array(
1 => array( 'Manage Forums' , 'section=content&amp;act=forum' ),
2 => array( 'Add New Category' , 'section=content&amp;act=forum&amp;code=new&amp;type=category' ),
3 => array( 'Add New Forum' , 'section=content&amp;act=forum&amp;code=new&amp;type=forum' ),
4 => array( 'Manage Permissions' , 'section=content&amp;act=group&amp;code=permsplash'),
// 6 => array( 'Moderators' , 'section=content&amp;act=mod' ),
7 => array( 'Topic Multi-Moderation' , 'section=content&amp;act=multimod' ),
8 => array( 'Trash Can Set-Up' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key=trashcanset-up', '', 0, 1 ),
);
$CATS[] = array( 'Users and Groups' );
$PAGES[] = array(
1 => array ( 'Manage Members' , 'section=content&amp;act=mem&amp;code=search' ),
2 => array ( 'Add New Member' , 'section=content&amp;act=mem&amp;code=add' ),
3 => array ( 'Manage Ranks' , 'section=content&amp;act=mem&amp;code=title'),
4 => array ( 'Manage User Groups' , 'section=content&amp;act=group' ),
5 => array ( 'Manage Validating' , 'section=content&amp;act=mtools&amp;code=mod' ),
6 => array ( 'Manage Locked' , 'section=content&amp;act=mtools&amp;code=lock' ),
9 => array ( 'Custom Profile Fields' , 'section=content&amp;act=field' ),
11 => array ( 'IP Member Tools' , 'section=content&amp;act=mtools' ),
12 => array ( 'Member Settings' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key=userprofiles', '', 0, 1 ),
);
$CATS[] = array( 'Subscriptions' );
$PAGES[] = array(
1 => array( 'Manage Payment Gateways' , 'section=content&amp;act=msubs&amp;code=index-gateways' ),
2 => array( 'Manage Packages' , 'section=content&amp;act=msubs&amp;code=index-packages' ),
3 => array( 'Manage Transactions' , 'section=content&amp;act=msubs&amp;code=index-tools' ),
4 => array( 'Manage Currencies' , 'section=content&amp;act=msubs&amp;code=currency' , ),
5 => array( 'Manually Add Transaction' , 'section=content&amp;act=msubs&amp;code=addtransaction' ),
6 => array( 'Install Payment Gateways' , 'section=content&amp;act=msubs&amp;code=install-index' ),
9 => array( 'Subscription Settings' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key='.urlencode('subscriptionsmanager'), '', 0, 1 ),
);
$CATS[] = array( 'Calendars' );
$PAGES[] = array(
1 => array( 'Calendar Manager' , 'section=content&amp;act=calendars&amp;code=calendar_list' ),
2 => array( 'Add New Calendar' , 'section=content&amp;act=calendars&amp;code=calendar_add' ),
);
$CATS[] = array( 'RSS Management' );
$PAGES[] = array(
1 => array( 'RSS Export Manager' , 'section=content&amp;act=rssexport&amp;code=rssexport_overview' ),
2 => array( 'RSS Import Manager' , 'section=content&amp;act=rssimport&amp;code=rssimport_overview' ),
);
$CATS[] = array( 'Custom BBCode' );
$PAGES[] = array(
1 => array( 'Custom BBCode Manager' , 'section=content&amp;act=bbcode&amp;code=bbcode' ),
2 => array( 'Add New BBCode' , 'section=content&amp;act=bbcode&amp;code=bbcode_add' ),
);
$CATS[] = array( 'Word &amp; Ban Filters' );
$PAGES[] = array(
1 => array( 'Manage Badword Filters', 'section=content&amp;act=babw&amp;code=badword' ),
2 => array( 'Manage Ban Filters' , 'section=content&amp;act=babw&amp;code=ban' ),
);
$CATS[] = array( 'Attachments' );
$PAGES[] = array(
1 => array( 'Attachment Types' , 'section=content&amp;act=attach&amp;code=types' ),
2 => array( 'Attachment Stats' , 'section=content&amp;act=attach&amp;code=stats' ),
3 => array( 'Attachment Search' , 'section=content&amp;act=attach&amp;code=search' ),
);
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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)
+---------------------------------------------------------------------------
|
| > CONTROL PANEL PAGES FILE
| > Script written by Matt Mecham
| > Date started: Fri 8th April 2005 (12:07)
|
+---------------------------------------------------------------------------
*/
//===========================================================================
// Íåáîëüøàÿ áèáëèîòåêà, êîíòðîëèðóþùàÿ âñå ññûëêè àäìèíöåíòðà
//===========================================================================
// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) )
// $PAGES[ $cat_id ][$page_id][0] = Íàçâàíèå ñòðàíèöû
// $PAGES[ $cat_id ][$page_id][1] = Ññûëêà
// $PAGES[ $cat_id ][$page_id][2] = Ïðîñìîòð äèðåêòîðèè ïåðåä îòîáðàæåíèåì
// $PAGES[ $cat_id ][$page_id][3] = Òèï ññûëêè: 1 = ôîðóì 0 = àäìèíöåíòð
// $PAGES[ $cat_id ][$page_id][4] = Èêîíêà ìåíþ: 1 = ïåðåàäðåñàöèÿ 0 = íîðìàëüíàÿ
$CATS[] = array( 'Óïðàâëåíèå ôîðóìàìè' );
$PAGES[] = array(
1 => array( 'Ñïèñîê ôîðóìîâ' , 'section=content&amp;act=forum' ),
2 => array( 'Ñîçäàòü êàòåãîðèþ' , 'section=content&amp;act=forum&amp;code=new&amp;type=category' ),
3 => array( 'Ñîçäàòü ôîðóì' , 'section=content&amp;act=forum&amp;code=new&amp;type=forum' ),
4 => array( 'Ìàñêè äîñòóïà' , 'section=content&amp;act=group&amp;code=permsplash'),
// 6 => array( 'Ìîäåðàòîðû' , 'section=content&amp;act=mod' ),
7 => array( 'Ìóëüòè-ìîäåðàöèÿ òåì', 'section=content&amp;act=multimod' ),
8 => array( 'Íàñòðîéêè êîðçèíû' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key=trashcanset-up', '', 0, 1 ),
);
$CATS[] = array( 'Ïîëüçîâàòåëè è ãðóïïû' );
$PAGES[] = array(
1 => array ( 'Ïîèñê è ðåäàêòèðîâàíèå' , 'section=content&amp;act=mem&amp;code=search' ),
2 => array ( 'Äîáàâèòü ïîëüçîâàòåëÿ' , 'section=content&amp;act=mem&amp;code=add' ),
3 => array ( 'Çâàíèÿ' , 'section=content&amp;act=mem&amp;code=title'),
4 => array ( 'Ãðóïïû' , 'section=content&amp;act=group' ),
5 => array ( 'Íåàêòèâèðîâàííûå' , 'section=content&amp;act=mtools&amp;code=mod' ),
6 => array ( 'Çàáëîêèðîâàííûå' , 'section=content&amp;act=mtools&amp;code=lock' ),
9 => array ( 'Äîïîëíèòåëüíûå ïîëÿ' , 'section=content&amp;act=field' ),
11 => array ( 'Èíñòðóìåíòû IP' , 'section=content&amp;act=mtools' ),
12 => array ( 'Ïðîôèëè ïîëüçîâàòåëåé' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key=userprofiles', '', 0, 1 ),
);
// Ìåíþ «Ïîäïèñêè» íåàêòóàëüíî äëÿ Ðîññèéñêîé Ôåäåðàöèè
/*$CATS[] = array( 'Ïîäïèñêè' );
$PAGES[] = array(
1 => array( 'Manage Payment Gateways' , 'section=content&amp;act=msubs&amp;code=index-gateways' ),
2 => array( 'Manage Packages' , 'section=content&amp;act=msubs&amp;code=index-packages' ),
3 => array( 'Manage Transactions' , 'section=content&amp;act=msubs&amp;code=index-tools' ),
4 => array( 'Manage Currencies' , 'section=content&amp;act=msubs&amp;code=currency' , ),
5 => array( 'Manually Add Transaction' , 'section=content&amp;act=msubs&amp;code=addtransaction' ),
6 => array( 'Install Payment Gateways' , 'section=content&amp;act=msubs&amp;code=install-index' ),
9 => array( 'Subscription Settings' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key='.urlencode('subscriptionsmanager'), '', 0, 1 ),
);*/
$CATS[] = array( 'Êàëåíäàðè' );
$PAGES[] = array(
1 => array( 'Ñïèñîê êàëåíäàðåé' , 'section=content&amp;act=calendars&amp;code=calendar_list' ),
2 => array( 'Äîáàâèòü êàëåíäàðü' , 'section=content&amp;act=calendars&amp;code=calendar_add' ),
);
$CATS[] = array( 'Óïðàâëåíèå RSS' );
$PAGES[] = array(
1 => array( 'Ýêñïîðò ïîòîêîâ' , 'section=content&amp;act=rssexport&amp;code=rssexport_overview' ),
2 => array( 'Èìïîðò ïîòîêîâ' , 'section=content&amp;act=rssimport&amp;code=rssimport_overview' ),
);
$CATS[] = array( 'Äîïîëíèòåëüíûå BB-êîäû' );
$PAGES[] = array(
1 => array( 'Ñïèñîê BB-êîäîâ' , 'section=content&amp;act=bbcode&amp;code=bbcode' ),
2 => array( 'Äîáàâèòü BB-êîä' , 'section=content&amp;act=bbcode&amp;code=bbcode_add' ),
);
$CATS[] = array( 'Ôèëüòðû' );
$PAGES[] = array(
1 => array( 'Íåöåíçóðíûå ñëîâà', 'section=content&amp;act=babw&amp;code=badword' ),
2 => array( 'Áëîêèðîâêà ïîëüçîâàòåëåé' , 'section=content&amp;act=babw&amp;code=ban' ),
);
$CATS[] = array( 'Ïðèêðåïëÿåìûå ôàéëû' );
$PAGES[] = array(
1 => array( 'Òèïû ôàéëîâ' , 'section=content&amp;act=attach&amp;code=types' ),
2 => array( 'Ñòàòèñòèêà' , 'section=content&amp;act=attach&amp;code=stats' ),
3 => array( 'Ïîèñê' , 'section=content&amp;act=attach&amp;code=search' ),
);
?>
+73 -64
View File
@@ -1,65 +1,74 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| http://www.invisionpower.com
| ========================================
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com
+---------------------------------------------------------------------------
|
| > CONTROL PANEL (COMPONENTS) PAGES FILE
| > Script written by Matt Mecham
| > Date started: Tue. 15th February 2005
|
+---------------------------------------------------------------------------
*/
//===========================================================================
// Simple library that holds all the links for the admin cp
// THIS PAGE CLASS: Generate menu from DB
//===========================================================================
// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) )
// $PAGES[ $cat_id ][$page_id][0] = Page name
// $PAGES[ $cat_id ][$page_id][1] = Url
// $PAGES[ $cat_id ][$page_id][2] = Look for folder before showing
// $PAGES[ $cat_id ][$page_id][3] = URL type: 1 = Board URL 0 = ACP URL
// $PAGES[ $cat_id ][$page_id][4] = Item icon: 1= redirect 0 = Normal
// $PAGES[ $cat_id ][$page_id][5] = Regular link - open exact link in new window
global $ipsclass;
$CATS = array();
$PAGES = array();
$CATS[] = array( 'Help & Support' );
$PAGES[] = array(
0 => array( 'Submit Support Ticket' , 'section=help&amp;act=support&amp;code=support' ),
1 => array( 'IPB Knowledgebase' , 'section=help&amp;act=support&amp;code=kb' ),
2 => array( 'IPS Beyond - Resource Center' , 'section=help&amp;act=support&amp;code=ipsbeyond' ),
3 => array( 'Contact IPS' , 'section=help&amp;act=support&amp;code=contact' ),
4 => array( 'Feature Suggestions' , 'section=help&amp;act=support&amp;code=features' ),
5 => array( 'Bug Reports' , 'section=help&amp;act=support&amp;code=bugs' ),
);
$CATS[] = array( 'Diagnostics' );
$PAGES[] = array(
0 => array( 'System Overview' , "section=help&amp;act=diag' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
//2 => array( 'Version Checker' , "section=help&amp;act=diag&amp;code=fileversions' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
3 => array( 'Database Checker' , "section=help&amp;act=diag&amp;code=dbchecker' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
4 => array( 'Database Index Checker' , "section=help&amp;act=diag&amp;code=dbindex' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
5 => array( 'File Permissions Checker' , "section=help&amp;act=diag&amp;code=filepermissions' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
6 => array( 'Whitespace Checker' , "section=help&amp;act=diag&amp;code=whitespace' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
7 => array( 'Security Center' , "section=admin&amp;act=security", 0, 0, 1 ),
);
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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)
+---------------------------------------------------------------------------
|
| > CONTROL PANEL (COMPONENTS) PAGES FILE
| > Script written by Matt Mecham
| > Date started: Tue. 15th February 2005
|
+---------------------------------------------------------------------------
*/
//===========================================================================
// Íåáîëüøàÿ áèáëèîòåêà, êîíòðîëèðóþùàÿ âñå ññûëêè àäìèíöåíòðà
// ÝÒÎÒ ÊËÀÑÑ ÑÒÐÀÍÈÖÛ: Ãåíåðàöèÿ ìåíþ èç ÁÄ
//===========================================================================
// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) )
// $PAGES[ $cat_id ][$page_id][0] = Íàçâàíèå ñòðàíèöû
// $PAGES[ $cat_id ][$page_id][1] = Ññûëêà
// $PAGES[ $cat_id ][$page_id][2] = Ïðîñìîòð äèðåêòîðèè ïåðåä îòîáðàæåíèåì
// $PAGES[ $cat_id ][$page_id][3] = Òèï ññûëêè: 1 = ôîðóì 0 = àäìèíöåíòð
// $PAGES[ $cat_id ][$page_id][4] = Èêîíêà ìåíþ: 1 = ïåðåàäðåñàöèÿ 0 = íîðìàëüíàÿ
global $ipsclass;
$CATS = array();
$PAGES = array();
$CATS[] = array( 'Ïîìîùü è ïîääåðæêà' );
$PAGES[] = array(
0 => array( 'Çàäàòü âîïðîñ' , 'section=help&amp;act=support&amp;code=support' ),
1 => array( 'Äîêóìåíòàöèÿ IPB' , 'section=help&amp;act=support&amp;code=doctor' ),
2 => array( 'Áàçà çíàíèé IPB' , 'section=help&amp;act=support&amp;code=kb' ),
3 => array( 'Ôîðóìû êîìïàíèè IBResource' , 'section=help&amp;act=support&amp;code=ibresource' ),
4 => array( 'Êîíòàêòíàÿ èíôîðìàöèÿ' , 'section=help&amp;act=support&amp;code=contact' ),
5 => array( 'Ïðåäëîæåíèÿ è ïîæåëàíèÿ' , 'section=help&amp;act=support&amp;code=features' ),
6 => array( 'Ñîîáùèòü îá îøèáêå' , 'section=help&amp;act=support&amp;code=bugs' ),
);
$CATS[] = array( 'Äèàãíîñòèêà' );
$PAGES[] = array(
0 => array( 'Îáçîð ñèñòåìû' , "section=help&amp;act=diag' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
//2 => array( 'Ïðîâåðêà âåðñèè' , "section=help&amp;act=diag&amp;code=fileversions' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
3 => array( 'Ïðîâåðêà áàçû äàííûõ' , "section=help&amp;act=diag&amp;code=dbchecker' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
4 => array( 'Ïðîâåðêà èíäåêñîâ ÁÄ' , "section=help&amp;act=diag&amp;code=dbindex' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
5 => array( 'Ïðîâåðêà àòðèáóòîâ ôàéëîâ' , "section=help&amp;act=diag&amp;code=filepermissions' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
6 => array( 'Ïðîâåðêà íà ïóñòûå ñèìâîëû' , "section=help&amp;act=diag&amp;code=whitespace' onclick='xmlobj = new ajax_request();xmlobj.show_loading()'" ),
7 => array( 'Öåíòð áåçîïàñíîñòè' , "section=admin&amp;act=security", 0, 0, 1 ),
);
?>
@@ -1,16 +1,25 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| (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 SOFTWARE!
| http://www.invisionboard.com
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
|
| > CONTROL PANEL PAGES FILE
@@ -21,42 +30,42 @@
*/
//===========================================================================
// Simple library that holds all the links for the admin cp
// Íåáîëüøàÿ áèáëèîòåêà, êîíòðîëèðóþùàÿ âñå ññûëêè àäìèíöåíòðà
//===========================================================================
// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) )
// $PAGES[ $cat_id ][$page_id][0] = Page name
// $PAGES[ $cat_id ][$page_id][1] = Url
// $PAGES[ $cat_id ][$page_id][2] = Look for folder before showing
// $PAGES[ $cat_id ][$page_id][3] = URL type: 1 = Board URL 0 = ACP URL
// $PAGES[ $cat_id ][$page_id][4] = Item icon: 1= redirect 0 = Normal
// $PAGES[ $cat_id ][$page_id][0] = Íàçâàíèå ñòðàíèöû
// $PAGES[ $cat_id ][$page_id][1] = Ññûëêà
// $PAGES[ $cat_id ][$page_id][2] = Ïðîñìîòð äèðåêòîðèè ïåðåä îòîáðàæåíèåì
// $PAGES[ $cat_id ][$page_id][3] = Òèï ññûëêè: 1 = ôîðóì 0 = àäìèíöåíòð
// $PAGES[ $cat_id ][$page_id][4] = Èêîíêà ìåíþ: 1 = ïåðåàäðåñàöèÿ 0 = íîðìàëüíàÿ
$CATS[] = array( 'Skins & Templates' );
$CATS[] = array( 'Óïðàâëåíèå ñòèëÿìè' );
$PAGES[] = array(
1 => array( 'Skin Manager' , 'section=lookandfeel&amp;act=sets' ),
2 => array( 'Skin Tools' , 'section=lookandfeel&amp;act=skintools' ),
3 => array( 'Skin Search & Replace' , 'section=lookandfeel&amp;act=skintools&amp;code=searchsplash' ),
4 => array( 'Skin Import/Export' , 'section=lookandfeel&amp;act=import' ),
5 => array( 'Skin Differences' , 'section=lookandfeel&amp;act=skindiff' ),
6 => array( 'Easy Logo Changer' , 'section=lookandfeel&amp;act=skintools&amp;code=easylogo' ),
1 => array( 'Ñïèñîê ñòèëåé' , 'section=lookandfeel&amp;act=sets' ),
2 => array( 'Èíñòðóìåíòû' , 'section=lookandfeel&amp;act=skintools' ),
3 => array( 'Ïîèñê è çàìåíà' , 'section=lookandfeel&amp;act=skintools&amp;code=searchsplash' ),
4 => array( 'Èìïîðò è ýêñïîðò ñòèëåé' , 'section=lookandfeel&amp;act=import' ),
5 => array( 'Ñðàâíåíèå' , 'section=lookandfeel&amp;act=skindiff' ),
6 => array( 'Ïðîñòàÿ ñìåíà ëîãîòèïà' , 'section=lookandfeel&amp;act=skintools&amp;code=easylogo' ),
);
$CATS[] = array( 'Languages' );
$CATS[] = array( 'Óïðàâëåíèå ÿçûêàìè' );
$PAGES[] = array(
1 => array( 'Manage Languages' , 'section=lookandfeel&amp;act=lang' ),
2 => array( 'Import a Language' , 'section=lookandfeel&amp;act=lang&amp;code=import' ),
1 => array( 'Ñïèñîê ÿçûêîâ' , 'section=lookandfeel&amp;act=lang' ),
2 => array( 'Èìïîðò ÿçûêà' , 'section=lookandfeel&amp;act=lang&amp;code=import' ),
);
$CATS[] = array( 'Emoticons' );
$CATS[] = array( 'Óïðàâëåíèå ñìàéëèêàìè' );
$PAGES[] = array(
1 => array( 'Emoticon Manager' , 'section=lookandfeel&amp;act=emoticons&amp;code=emo' ),
2 => array( 'Import/Export Packs' , 'section=lookandfeel&amp;act=emoticons&amp;code=emo_packsplash' ),
1 => array( 'Ñïèñîê äèðåêòîðèé' , 'section=lookandfeel&amp;act=emoticons&amp;code=emo' ),
2 => array( 'Èìïîðò è ýêñïîðò' , 'section=lookandfeel&amp;act=emoticons&amp;code=emo_packsplash' ),
);
?>
+57 -48
View File
@@ -1,16 +1,25 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| (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 SOFTWARE!
| http://www.invisionboard.com
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
|
| > CONTROL PANEL PAGES FILE
@@ -21,70 +30,70 @@
*/
//===========================================================================
// Simple library that holds all the links for the admin cp
// Íåáîëüøàÿ áèáëèîòåêà, êîíòðîëèðóþùàÿ âñå ññûëêè àäìèíöåíòðà
//===========================================================================
// CAT_ID => array( PAGE_ID => (PAGE_NAME, URL ) )
// $PAGES[ $cat_id ][$page_id][0] = Page name
// $PAGES[ $cat_id ][$page_id][1] = Url
// $PAGES[ $cat_id ][$page_id][2] = Look for folder before showing
// $PAGES[ $cat_id ][$page_id][3] = URL type: 1 = Board URL 0 = ACP URL
// $PAGES[ $cat_id ][$page_id][4] = Item icon: 1= redirect 0 = Normal
// $PAGES[ $cat_id ][$page_id][0] = Íàçâàíèå ñòðàíèöû
// $PAGES[ $cat_id ][$page_id][1] = Ññûëêà
// $PAGES[ $cat_id ][$page_id][2] = Ïðîñìîòð äèðåêòîðèè ïåðåä îòîáðàæåíèåì
// $PAGES[ $cat_id ][$page_id][3] = Òèï ññûëêè: 1 = ôîðóì 0 = àäìèíöåíòð
// $PAGES[ $cat_id ][$page_id][4] = Èêîíêà ìåíþ: 1 = ïåðåàäðåñàöèÿ 0 = íîðìàëüíàÿ
$CATS[] = array( 'System Settings' );
$CATS[] = array( 'Ñèñòåìíûå íàñòðîéêè' );
$PAGES[] = array(
1 => array( 'View All General Settings', 'section=tools&amp;act=op' ),
2 => array( 'Add New General Setting' , 'section=tools&amp;act=op&amp;code=settingnew' ),
7 => array( 'Turn Board On / Off' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key='.urlencode('boardoffline/online'), '', 0, 1 ),
8 => array( 'Board Guidelines' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key='.urlencode('boardguidelines'), '', 0, 1 ),
9 => array( 'General Configuration' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key='.urlencode('generalconfiguration'), '', 0, 1 ),
10 => array( 'CPU Saving' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key='.urlencode('cpusaving'), '', 0, 1 ),
// 11 => array( 'IP Chat' , 'section=tools&amp;act=pin&amp;code=ipchat' ),
//12 => array( 'IPB License' , 'section=tools&amp;act=pin&amp;code=reg' ),
//14 => array( 'IPB Copyright Removal' , 'section=tools&amp;act=pin&amp;code=copy' ),
1 => array( 'Ñïèñîê íàñòðîåê', 'section=tools&amp;act=op' ),
2 => array( 'Äîáàâèòü íàñòðîéêó' , 'section=tools&amp;act=op&amp;code=settingnew' ),
7 => array( 'Âêëþ÷åíèå/âûêëþ÷åíèå' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key='.urlencode('boardoffline'), '', 0, 1 ),
8 => array( 'Ïðàâèëà ôîðóìà' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key='.urlencode('boardguidelines'), '', 0, 1 ),
9 => array( 'Îñíîâíûå íàñòðîéêè' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key='.urlencode('general'), '', 0, 1 ),
10 => array( 'Íàñòðîéêè áûñòðîäåéñòâèÿ' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key='.urlencode('cpusaving'), '', 0, 1 ),
//11 => array( 'IP Chat' , 'section=tools&amp;act=pin&amp;code=ipchat' ),
//12 => array( 'IPB Ëèöåíçèÿ' , 'section=tools&amp;act=pin&amp;code=reg' ),
//14 => array( 'IPB Óäàëåíèå êîïèðàéòà' , 'section=tools&amp;act=pin&amp;code=copy' ),
);
$CATS[] = array( 'Maintenance' );
$CATS[] = array( 'Îáñëóæèâàíèå' );
$PAGES[] = array(
1 => array( 'Manage Help Files' , 'section=tools&amp;act=help' ),
2 => array( 'Cache Control' , 'section=tools&amp;act=admin&amp;code=cache' ),
3 => array( 'Recount &amp; Rebuild' , 'section=tools&amp;act=rebuild' ),
4 => array( 'Clean-up Tools' , 'section=tools&amp;act=rebuild&amp;code=tools' ),
1 => array( 'Ðàçäåëû ïîìîùè' , 'section=tools&amp;act=help' ),
2 => array( 'Óïðàâëåíèå êåøåì' , 'section=tools&amp;act=admin&amp;code=cache' ),
3 => array( 'Ïåðåñ÷åò è îáíîâëåíèå' , 'section=tools&amp;act=rebuild' ),
4 => array( 'Èíñòðóìåíòû î÷èñòêè' , 'section=tools&amp;act=rebuild&amp;code=tools' ),
);
$CATS[] = array( 'Post Office' );
$CATS[] = array( 'Ðàáîòà ñ e-mail' );
$PAGES[] = array(
1 => array( 'Manage Bulk Mail' , 'section=tools&amp;act=postoffice' ),
2 => array( 'Create New Email' , 'section=tools&amp;act=postoffice&amp;code=mail_new' ),
3 => array( 'View Email Logs' , 'section=admin&amp;act=emaillog', '', 0, 1 ),
4 => array( 'View Email Error Logs' , 'section=admin&amp;act=emailerror', '', 0, 1 ),
5 => array( 'Email Settings' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key=emailset-up', '', 0, 1 ),
1 => array( 'Ñïèñîê ðàññûëîê' , 'section=tools&amp;act=postoffice' ),
2 => array( 'Ñîçäàòü ðàññûëêó' , 'section=tools&amp;act=postoffice&amp;code=mail_new' ),
3 => array( 'Æóðíàë e-mail îòïðàâëåíèé' , 'section=admin&amp;act=emaillog', '', 0, 1 ),
4 => array( 'Æóðíàë e-mail îøèáîê' , 'section=admin&amp;act=emailerror', '', 0, 1 ),
5 => array( 'E-mail íàñòðîéêè' , 'section=tools&amp;act=op&amp;code=findsetting&amp;key=emailset-up', '', 0, 1 ),
);
$CATS[] = array( 'Portal Manager' );
$CATS[] = array( 'Óïðàâëåíèå ïîðòàëîì' );
$PAGES[] = array(
1 => array( 'Manage Portal Plug-ins', 'section=tools&amp;act=portal' ),
1 => array( 'Äîïîëíåíèÿ', 'section=tools&amp;act=portal' ),
);
$CATS[] = array( 'Log In Manager' );
$CATS[] = array( 'Ìåòîäû àâòîðèçàöèè' );
$PAGES[] = array(
1 => array( 'Log In Manager' , 'section=tools&amp;act=loginauth' ),
2 => array( 'Create New Log In' , 'section=tools&amp;act=loginauth&amp;code=login_add' ),
1 => array( 'Ñïèñîê ìåòîäîâ' , 'section=tools&amp;act=loginauth' ),
2 => array( 'Ñîçäàòü íîâûé ìåòîä' , 'section=tools&amp;act=loginauth&amp;code=login_add' ),
);
$CATS[] = array( 'Task Manager' );
$CATS[] = array( 'Ìåíåäæåð çàäà÷' );
$PAGES[] = array(
1 => array( 'Task Manager' , 'section=tools&amp;act=task' ),
2 => array( 'View Task Logs' , 'section=tools&amp;act=task&amp;code=log' ),
1 => array( 'Ñïèñîê çàäà÷' , 'section=tools&amp;act=task' ),
2 => array( 'Æóðíàë âûïîëíåííûõ çàäà÷' , 'section=tools&amp;act=task&amp;code=log' ),
);
?>
+107 -98
View File
@@ -1,99 +1,108 @@
<?php
/*
+---------------------------------------------------------------------------
| Invision Power Board
| ========================================
| by Matthew Mecham
| (c) 2004 Invision Power Services
| http://www.invisionpower.com
| ========================================
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class acp_tools
{
# Globals
var $ipsclass;
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_tools()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Tools &amp; Settings";
$another_choice = array(
'op' => 'settings',
'pin' => 'plugins',
'cache' => 'cache',
'rebuild' => 'rebuild',
'help' => 'help',
'ips' => 'ips',
'task' => 'task_manager',
'admin' => 'administration',
'postoffice'=> 'postoffice',
'loginauth' => 'login_auth',
'portal' => 'portal',
);
if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) )
{
$this->ipsclass->input['act'] = 'op';
}
$this->ipsclass->form_code = 'section=tools&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=tools&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'tools';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| 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)
+---------------------------------------------------------------------------
|
| > CP "MYCP" PAGE CLASS
| > Script written by Matt Mecham
| > Date started: Wed. 18th August 2004
|
+---------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class acp_tools
{
# Globals
var $ipsclass;
/*-------------------------------------------------------------------------*/
// CONSTRUCTOR
/*-------------------------------------------------------------------------*/
function acp_tools()
{
}
/*-------------------------------------------------------------------------*/
// AUTO RUN
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->html_title = "IPB: Óòèëèòû è íàñòðîéêè";
$another_choice = array(
'op' => 'settings',
'pin' => 'plugins',
'cache' => 'cache',
'rebuild' => 'rebuild',
'help' => 'help',
'ips' => 'ips',
'task' => 'task_manager',
'admin' => 'administration',
'postoffice'=> 'postoffice',
'loginauth' => 'login_auth',
'portal' => 'portal',
);
if ( ! isset( $another_choice[ $this->ipsclass->input['act'] ] ) )
{
$this->ipsclass->input['act'] = 'op';
}
$this->ipsclass->form_code = 'section=tools&amp;act=' . $this->ipsclass->input['act'];
$this->ipsclass->form_code_js = 'section=tools&act=' . $this->ipsclass->input['act'];
$this->ipsclass->section_code = 'tools';
//-----------------------------------------
// Quick perm check
//-----------------------------------------
$this->ipsclass->admin->cp_permission_check( $this->ipsclass->section_code.'|' );
//-----------------------------------------
// Require and run (again)
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/'.$another_choice[ $this->ipsclass->input['act'] ].'.php' );
$constructor = 'ad_'.$another_choice[ $this->ipsclass->input['act'] ];
$runmeagain = new $constructor;
$runmeagain->ipsclass =& $this->ipsclass;
$runmeagain->auto_run();
}
}
?>
+10 -1
View File
@@ -1 +1,10 @@
<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>␍
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<meta name="author" content="Êîìïàíèÿ IBResource è Invision Power Services Inc.">
<title>Îøèáêà ðóññêîé âåðñèè Invision Power Board</title>
</head><body>
<h1>Îøèáêà <a href="http://www.ibresource.ru/">ðóññêîé âåðñèè Invision Power Board</a></h1>
<font size="4">Âû ïîïàëè íà íåñóùåñòâóþùóþ ñòðàíèöó!<br>Ïîæàëóéñòà íàæìèòå íà êíîïî÷êó &laquo;<b>Íàçàä</b>&raquo; â&nbsp;âàøåì áðàóçåðå äëÿ âîçâðàùåíèÿ íà ïðåäûäóùóþ ñòðàíèöó.</font>
</body>
</html>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+136 -128
View File
@@ -2,16 +2,24 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -28,7 +36,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Íåâåðíûé âõîä</h1> Ó âàñ íåò äîñòóïà ê ýòîìó ôàéëó. Åñëè ïðîâîäèëîñü îáíîâëåíèå, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü ôàéë admin.php.";
exit();
}
@@ -37,34 +45,34 @@ class ad_adminlogs
var $base_url;
var $colours = array();
/**
* Section title name
*
* @var string
*/
var $perm_main = "admin";
/**
* Section title name
*
* @var string
*/
var $perm_child = "adminlog";
function auto_run()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Admin Logs' );
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë àäìèíèñòðèðîâàíèÿ' );
//-----------------------------------------
// Make sure we're a root admin, or else!
//-----------------------------------------
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
{
//$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
}
$this->colours = array(
"cat" => "green",
"forum" => "darkgreen",
@@ -75,7 +83,7 @@ class ad_adminlogs
'help' => 'darkorange',
'modlog' => 'steelblue',
);
switch($this->ipsclass->input['code'])
{
@@ -83,263 +91,263 @@ class ad_adminlogs
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->view();
break;
case 'remove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->remove();
break;
//-----------------------------------------
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->list_current();
break;
}
}
//-----------------------------------------
// Remove archived files
//-----------------------------------------
function view()
{
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
$this->ipsclass->admin->page_detail = "Viewing all actions by a administrator";
$this->ipsclass->admin->page_title = "Administration Logs Manager";
$this->ipsclass->admin->page_detail = "Ïðîñìîòð âñåõ äåéñòâèé, ïðîèçâåäåííûõ àäìèíèñòðàòîðàìè";
$this->ipsclass->admin->page_title = "Æóðíàë àäìèíèñòðèðîâàíèÿ";
if ( ( !isset($this->ipsclass->input['search_string']) OR !$this->ipsclass->input['search_string'] ) AND ( !isset($this->ipsclass->input['mid']) OR !$this->ipsclass->input['mid'] ) )
{
$this->ipsclass->main_msg = "You must enter a search string";
$this->ipsclass->main_msg = "Âû íå óêàçàëè äåéñòâèå, êîòîðîå íåîáõîäèìî íàéòè.";
$this->list_current();
return;
}
if ( !isset($this->ipsclass->input['search_string']) OR !$this->ipsclass->input['search_string'] )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'admin_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) );
$this->ipsclass->DB->simple_exec();
$row = $this->ipsclass->DB->fetch_row();
$row_count = $row['count'];
$query = "&{$this->ipsclass->form_code}&mid={$this->ipsclass->input['mid']}&code=view";
$this->ipsclass->DB->cache_add_query( 'adminlogs_view_one', array( 'mid' => intval($this->ipsclass->input['mid']), 'limit_a' => $start ) );
$this->ipsclass->DB->cache_exec_query();
}
else
{
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
$dbq = "m.".$this->ipsclass->input['search_type']." LIKE '%".$this->ipsclass->input['search_string']."%'";
$row = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(m.id) as count', 'from' => 'admin_logs m', 'where' => $dbq ) );
$row_count = $row['count'];
$query = "&act=adminlog&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']);
$this->ipsclass->DB->cache_add_query( 'adminlogs_view_two', array( 'dbq' => $dbq, 'limit_a' => $start ) );
$this->ipsclass->DB->cache_exec_query();
}
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
'PER_PAGE' => 20,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "Single Page",
'L_MULTI' => "Pages: ",
'L_SINGLE' => "Ñòðàíèöà",
'L_MULTI' => "Ñòðàíèöû: ",
'BASE_URL' => $this->ipsclass->base_url.$query,
)
);
$this->ipsclass->admin->page_detail = "You may view and remove actions performed by your administrators";
$this->ipsclass->admin->page_title = "Administrator Logs Manager";
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì àäìèíèñòðèðîâàíèÿ";
$this->ipsclass->admin->page_title = "Æóðíàë àäìèíèñòðèðîâàíèÿ";
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Action Perfomed" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "IP address" , "20%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Admin Logs" );
$this->ipsclass->adskin->td_header[] = array( "Àäìèíèñòðàòîð" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèå" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "20%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë äåéñòâèé" );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'center', 'tablesubheader');
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' );
$this->colours[$row['act']] = isset($this->colours[$row['act']]) ? $this->colours[$row['act']] : 'black';
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$row['members_display_name']}</b>",
"<span style='color:{$this->colours[$row['act']]}'>{$row['note']}</span>",
"{$row['ctime']}",
"{$row['ip_address']}",
) );
}
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
}
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'center', 'tablesubheader');
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
//-----------------------------------------
// Remove archived files
//-----------------------------------------
function remove()
{
if ($this->ipsclass->input['mid'] == "")
{
$this->ipsclass->admin->error("You did not select a member ID to remove by!");
$this->ipsclass->admin->error("Âû íå óêàçàëè ID àäìèíèñòðàòîðà");
}
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'admin_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) );
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
}
//-----------------------------------------
// SHOW ALL LANGUAGE PACKS
//-----------------------------------------
function list_current()
{
$form_array = array();
$this->ipsclass->admin->page_detail = "You may view and remove actions performed by your administrators in mission critical areas of the administration CP (such as forum control, member control, group control, help files and moderator log management).";
$this->ipsclass->admin->page_title = "Administration Logs Manager";
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì àäìèíèñòðèðîâàíèÿ";
$this->ipsclass->admin->page_title = "Æóðíàë àäìèíèñòðèðîâàíèÿ";
//-----------------------------------------
// LAST FIVE ACTIONS
//-----------------------------------------
$this->ipsclass->DB->cache_add_query( 'adminlogs_view_list_current', array() );
$this->ipsclass->DB->cache_exec_query();
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Action Perfomed" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "IP address" , "20%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Last 5 Admin Actions" );
$this->ipsclass->adskin->td_header[] = array( "Àäìèíèñòðàòîð" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèå" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "20%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "5 ïîñëåäíèõ äåéñòâèé" );
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$row['name']}</b>",
"<span style='color:{$this->colours[$row['act']]}'>{$row['note']}</span>",
"{$row['ctime']}",
"{$row['ip_address']}",
) );
}
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
}
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "30%" );
$this->ipsclass->adskin->td_header[] = array( "Actions Perfomed" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "View all by member" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Remove all by member" , "30%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Admininstration Logs" );
$this->ipsclass->adskin->td_header[] = array( "Àäìèíèñòðàòîð" , "30%" );
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèé ñîâåðøåíî" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Ïðîñìîòð âñåõ äåéñòâèé" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Óäàëåíèå âñåõ äåéñòâèé" , "30%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë àäìèíèñòðèðîâàíèÿ" );
$this->ipsclass->DB->cache_add_query( 'adminlogs_view_list_current_two', array() );
$this->ipsclass->DB->cache_exec_query();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$r['name']}</b>",
"<center>{$r['act_count']}</center>",
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&mid={$r['member_id']}'>View</a></center>",
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&mid={$r['member_id']}'>Remove</a></center>",
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&mid={$r['member_id']}'>Ïîñìîòðåòü</a></center>",
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&mid={$r['member_id']}'>Óäàëèòü</a></center>",
) );
}
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
2 => array( 'act' , 'adminlog' ),
3 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "60%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Admin Logs" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê äåéñòâèé â æóðíàëå" );
$form_array = array(
0 => array( 'note' , 'Action Performed' ),
1 => array( 'ip_address', 'IP Address' ),
2 => array( 'member_id' , 'Member ID' ),
3 => array( 'act' , 'ACT Setting' ),
4 => array( 'code' , 'CODE Setting' ),
0 => array( 'note' , 'Äåéñòâèå' ),
1 => array( 'ip_address' , 'IP-àäðåñ' ),
2 => array( 'member_id' , 'ID àäìèíèñòðàòîðà' ),
3 => array( 'act' , 'Íàñòðîéêè ACT' ),
4 => array( 'code' , 'Íàñòðîéêè CODE' ),
);
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search for...</b>" ,
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü </b>" ,
$this->ipsclass->adskin->form_input( "search_string")
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search in...</b>" ,
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü â </b>" ,
$this->ipsclass->adskin->form_dropdown( "search_type", $form_array)
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èñêàòü");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
}
File diff suppressed because it is too large. Load diff
+249 -240
View File
@@ -2,18 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-10-06 10:09:22 +0100 (Fri, 06 Oct 2006) $
| > $Revision: 611 $
| > $Author: matt $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-11-03 16:54:54 -0600 (Fri, 03 Nov 2006) $
| > $Revision: 709 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Administration Module
@@ -27,7 +35,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Íåâåðíûé âõîä</h1> Ó âàñ íåò äîñòóïà ê ýòîìó ôàéëó. Åñëè ïðîâîäèëîñü îáíîâëåíèå, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü ôàéë admin.php.";
exit();
}
@@ -36,81 +44,81 @@ class ad_banandbadword {
var $functions = "";
var $ipsclass;
var $html;
/**
* Section title name
*
* @var string
*/
var $perm_main = "content";
/**
* Section title name
*
* @var string
*/
var $perm_child = "babw";
function auto_run()
{
$this->html = $this->ipsclass->acp_load_template('cp_skin_bbcode_badword');
//-----------------------------------------
// Require and RUN !! THERES A BOMB
//-----------------------------------------
$this->ipsclass->admin->page_detail = "";
$this->ipsclass->admin->page_title = "Ban Manager";
$this->ipsclass->admin->page_title = "Ôèëüòðû áëîêèðîâêè (ban)";
//-----------------------------------------
// What to do...
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
//-----------------------------------------
// Badword
//-----------------------------------------
case 'badword':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->badword_start();
break;
case 'badword_add':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-add' );
$this->badword_add();
break;
case 'badword_remove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-remove' );
$this->badword_remove();
break;
case 'badword_edit':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-edit' );
$this->badword_edit();
break;
case 'badword_doedit':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-edit' );
$this->badword_doedit();
break;
case 'badword_export':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-export' );
$this->badword_export();
break;
case 'badword_import':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':bw-import' );
$this->badword_import();
break;
//-----------------------------------------
// BAN (d-aid)
//-----------------------------------------
case 'ban':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':ban-view' );
$this->ban_start();
@@ -125,38 +133,38 @@ class ad_banandbadword {
break;
}
}
//-----------------------------------------
// BAN: Rebuild cache
//-----------------------------------------
function ban_rebuildcache()
{
require_once ROOT_PATH.'sources/classes/bbcode/class_bbcode_core.php';
$this->ipsclass->cache['banfilters'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => 'ban_content', 'from' => 'banfilters', 'where' => "ban_type='ip'" ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['banfilters'][] = $r['ban_content'];
}
usort( $this->ipsclass->cache['badwords'] , array( 'class_bbcode_core', 'word_length_sort' ) );
usort( $this->ipsclass->cache['banfilters'] , array( 'class_bbcode_core', 'word_length_sort' ) );
$this->ipsclass->update_cache( array( 'name' => 'banfilters', 'array' => 1, 'deletefirst' => 1 ) );
}
//-----------------------------------------
// BAN: DELETE
//-----------------------------------------
function ban_delete()
{
$ids = array();
foreach ($this->ipsclass->input as $key => $value)
{
if ( preg_match( "/^id_(\d+)$/", $key, $match ) )
@@ -167,104 +175,104 @@ class ad_banandbadword {
}
}
}
$ids = $this->ipsclass->clean_int_array( $ids );
if ( count( $ids ) )
{
$this->ipsclass->DB->simple_construct( array( 'delete' => 'banfilters', 'where' => 'ban_id IN('.implode( ",",$ids ).')' ) );
$this->ipsclass->DB->simple_exec();
}
$this->ban_rebuildcache();
$this->ipsclass->main_msg = "Ban filters removed";
$this->ipsclass->main_msg = "Ôèëüòð íà áëîêèðîâêó óñïåøíî óäàëåí";
$this->ban_start();
}
//-----------------------------------------
// BAN: ADD
//-----------------------------------------
function ban_add()
{
if ( ! $this->ipsclass->input['bantext'] )
{
$this->ipsclass->main_msg = "You must enter something to add to the ban filters!";
$this->ipsclass->main_msg = "Âû äîëæíû ââåñòè çàìåíÿåìîå ñëîâî!";
$this->ban_start();
}
//-----------------------------------------
// Check for existing entry
//-----------------------------------------
$result = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'banfilters', 'where' => "ban_content='{$this->ipsclass->input['bantext']}' and ban_type='{$this->ipsclass->input['bantype']}'" ) );
if ( $result['ban_id'] )
{
$this->ipsclass->main_msg = "Duplicate entry, entry not added to the ban filters database.";
$this->ipsclass->main_msg = "Òàêîå çíà÷åíèå óæå åñòü.";
$this->ban_start();
}
$this->ipsclass->DB->do_insert( 'banfilters', array( 'ban_type' => $this->ipsclass->input['bantype'], 'ban_content' => $this->ipsclass->input['bantext'], 'ban_date' => time() ) );
$this->ipsclass->DB->do_insert( 'banfilters', array( 'ban_type' => $this->ipsclass->input['bantype'], 'ban_content' => trim($this->ipsclass->input['bantext']), 'ban_date' => time() ) );
$this->ban_rebuildcache();
$this->ipsclass->main_msg = "Ban filter added";
$this->ipsclass->main_msg = "Íîâûé ôèëüòð áëîêèðîâêè óñïåøíî äîáàâëåí.";
$this->ban_start();
}
//-----------------------------------------
// BAN: START
//-----------------------------------------
function ban_start()
{
$this->ipsclass->admin->page_title = "Ban Control";
$this->ipsclass->admin->page_title = "Óïðàâëåíèå ôèëüòðàìè áëîêèðîâêè";
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=ban', 'Ban Filters' );
$this->ipsclass->admin->page_detail = "This section allows you to modify, delete or add IP addresses, email addresses and reserved names to the ban filters.
<br /><strong>You can use * as a wildcard in any Username, IP or email filter. (Example: 127.0.*, *@yahoo.com, bannedname*)</strong>";
$this->ipsclass->admin->page_detail = "Ýòà ñåêöèÿ ïîçâîëÿåò âàì èçìåíÿòü, óäàëÿòü è äîáàâëÿòü ip-àäðåñà, e-mail è çàðåçåðâèðîâàííûå èìåíà â ôèëüòð äëÿ áëîêèðîâêè.
<br /><strong>Âû ìîæåòå èñïîëüçîâàòü «ñèìâîë çâåçäî÷êè» — * , äëÿ ëþáîãî(ûõ) ñèìâîëà(îâ) ip-àäðåñà èëè e-mail. (íàïðèìåð: 127.0.*, *@mail.ru)</strong>";
//-----------------------------------------
// Get things
//-----------------------------------------
$ban = array();
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'banfilters', 'order' => 'ban_date desc' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$ban[ $r['ban_type'] ][ $r['ban_id'] ] = $r;
}
//-----------------------------------------
// SHOW THEM!
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'ban_delete'),
2 => array( 'act' , 'babw' ),
4 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "1%" );
$this->ipsclass->adskin->td_header[] = array( "Entry" , "80%" );
$this->ipsclass->adskin->td_header[] = array( "Date Added" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "1%" );
$this->ipsclass->adskin->td_header[] = array( "Çàïèñü" , "80%" );
$this->ipsclass->adskin->td_header[] = array( "Äàòà äîáàâëåíèÿ" , "20%" );
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ban Control" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Óïðàâëåíèå ôèëüòðàìè áëîêèðîâêè" );
//-----------------------------------------
// Banned IP Addresses
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Banned IP Addresses", "left", "tablesubheader");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàáëîêèðîâàííûå ip-àäðåñà", "left", "tablesubheader");
if ( isset($ban['ip']) AND is_array( $ban['ip'] ) AND count( $ban['ip'] ) )
{
foreach ( $ban['ip'] as $entry )
@@ -277,15 +285,15 @@ class ad_banandbadword {
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("No Entered Banned IP Addresses", "left", "tablerow1");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàáëîêèðîâàííûõ IP-àäðåñîâ íåò", "left", "tablerow1");
}
//-----------------------------------------
// Banned Email Addresses
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Banned Email Addresses", "left", "tablesubheader");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàáëîêèðîâàííûå e-mail àäðåñà", "left", "tablesubheader");
if ( isset($ban['email']) AND is_array( $ban['email'] ) AND count( $ban['email'] ) )
{
foreach ( $ban['email'] as $entry )
@@ -298,15 +306,15 @@ class ad_banandbadword {
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("No Entered Banned Email Addresses", "left", "tablerow1");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàáëîêèðîâàííûõ e-mail àäðåñîâ íåò", "left", "tablerow1");
}
//-----------------------------------------
// Banned Names
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Non-Registerable Names", "left", "tablesubheader");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàïðåùåííûå ê ðåãèñòðàöèè èìåíà ïîëüçîâàòåëåé", "left", "tablesubheader");
if ( isset($ban['name']) AND is_array( $ban['name'] ) AND count( $ban['name'] ) )
{
foreach ( $ban['name'] as $entry )
@@ -319,398 +327,399 @@ class ad_banandbadword {
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("No Entered Names", "left", "tablerow1");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("Çàïðåùåííûõ ê ðåãèñòðàöèè èìåí ïîëüçîâàòåëåé íåò", "left", "tablerow1");
}
$end_it_now = "<div align='left' style='float:left;width:auto;'>
<input type='submit' value='Delete Selected' class='realdarkbutton' />
<input type='submit' value='Óäàëèòü âûáðàííîå' class='realdarkbutton' />
</div></form>
<div align='center'><form method='post' action='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=ban_add'><input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' /><input type='text' size='30' class='textinput' value='' name='bantext' />
<select class='dropdown' name='bantype'><option value='ip'>IP Address</option><option value='email'>Email Address</option><option value='name'>Name</option></select>
<input type='submit' value='Add New Filter' class='realdarkbutton' /></form></div>";
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $end_it_now, "center", "tablesubheader");
<select class='dropdown' name='bantype'><option value='ip'>IP àäðåñ</option><option value='email'>E-mail àäðåñ</option><option value='name'>Èìÿ</option></select>
<input type='submit' value='Äîáàâèòü íîâûé ôèëüòð' class='realdarkbutton' /></form></div>";
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic( $end_it_now, "center", "tablesubheader");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
$this->ipsclass->admin->output();
}
//-----------------------------------------
// BADWORDS: Import
//-----------------------------------------
function badword_import()
{
$content = $this->ipsclass->admin->import_xml( 'ipb_badwords.xml' );
//-----------------------------------------
// Got anything?
//-----------------------------------------
if ( ! $content )
{
$this->ipsclass->main_msg = "Upload failed, ipb_badwords.xml was either missing or empty";
$this->ipsclass->main_msg = "Èìïîðòèðîâàíèå çàïèñåé íå âûïîëíåíî, òàê êàê ôàéë «ipb_badwords.xml» ñîäåðæèò îøèáêó ëèáî îí ïóñò";
$this->badword_start();
return;
}
//-----------------------------------------
// Get xml mah-do-dah
//-----------------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
//-----------------------------------------
// Unpack the datafile
//-----------------------------------------
$xml->lite_parser = 1;
$xml->xml_parse_document( $content );
if( !is_array($xml->xml_array['badwordexport']['badwordgroup']['badword']) OR !count($xml->xml_array['badwordexport']['badwordgroup']['badword']) )
{
$this->ipsclass->main_msg = "XML Import failed: ipb_badwords.xml is either empty or in the wrong format";
$this->ipsclass->main_msg = "Èìïîðòèðîâàíèå çàïèñåé íå âûïîëíåíî, òàê êàê ôàéë «ipb_badwords.xml» ñîäåðæèò îøèáêó ëèáî îí ïóñò";
$this->badword_start();
return;
}
//-----------------------------------------
// Get current badwords
//-----------------------------------------
$words = array();
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'badwords', 'order' => 'type' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$words[ $r['type'] ] = 1;
}
//-----------------------------------------
// pArse
//-----------------------------------------
foreach( $xml->xml_array['badwordexport']['badwordgroup']['badword'] as $entry )
{
$type = $entry['type']['VALUE'];
$swop = $entry['swop']['VALUE'];
$m_exact = $entry['m_exact']['VALUE'];
if ( $words[ $type ] )
{
continue;
}
if ( $type )
{
$this->ipsclass->DB->do_insert( 'badwords', array( 'type' => $type, 'swop' => $swop, 'm_exact' => $m_exact ) );
}
}
$this->badword_rebuildcache();
$this->ipsclass->main_msg = "Badword XML file import completed";
$this->ipsclass->main_msg = "Èìïîðòèðîâàíèå çàïèñåé óñïåøíî âûïîëíåíî";
$this->badword_start();
}
//-----------------------------------------
// BADWORD: Export
//-----------------------------------------
function badword_export()
{
//-----------------------------------------
// Get xml mah-do-dah
//-----------------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
//-----------------------------------------
// Start...
//-----------------------------------------
$xml->xml_set_root( 'badwordexport', array( 'exported' => time() ) );
//-----------------------------------------
// Get emo group
//-----------------------------------------
$xml->xml_add_group( 'badwordgroup' );
$this->ipsclass->DB->simple_construct( array( 'select' => 'type, swop, m_exact', 'from' => 'badwords', 'order' => 'type' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$content = array();
foreach ( $r as $k => $v )
{
$content[] = $xml->xml_build_simple_tag( $k, $v );
}
$entry[] = $xml->xml_build_entry( 'badword', $content );
}
$xml->xml_add_entry_to_group( 'badwordgroup', $entry );
$xml->xml_format_document();
//-----------------------------------------
// Send to browser.
//-----------------------------------------
$this->ipsclass->admin->show_download( $xml->xml_document, 'ipb_badwords.xml' );
}
//-----------------------------------------
// BADWORD: Start
//-----------------------------------------
function badword_start()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$badword_html = "";
$this->ipsclass->admin->page_detail = "You can add/edit and remove bad word filters in this section.<br>The badword filter allows you to globally replace words from a members post, signature and topic title.<br><br><b>Loose matching</b>: If you entered 'hell' as a bad word, it will replace 'hell' and 'hello' with either your replacement if entered or 6 hashes (case insensitive)<br><br><b>Exact matching</b>: If you entered 'hell' as a bad word, it will replace 'hell' only with either your replacement if entered or 6 hashes (case insensitive)";
$this->ipsclass->admin->page_title = "Bad Word Filter";
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Bad Word Filters' );
$this->ipsclass->admin->page_detail = " ýòîé ñåêöèè âû ìîæåòå äîáàâëÿòü, èçìåíÿòü è óäàëÿòü ôèëüòðû íåöåíçóðíûõ ñëîâ.<br />Ôèëüòð íåöåíçóðíûõ ñëîâ ïîçâîëÿåò âàì çàìåíÿòü íåöåíçóðíûå ñëîâà â ñîîáùåíèÿõ ïîëüçîâàòåëåé, â ïîäïèñÿõ è â íàçâàíèÿõ òåì.<br /><br /><b>Ñîâïàäåíèå ïî ìàñêå</b>: ïðè âûáîðå ñïîñîáà «Ìàñêà», ââåäåííîå âàìè ñëîâî áóäåò èçìåíÿòüñÿ äàæå â ñëîâàõ, ñîäåðæàùèõ â ñåáå ýòî ñëîâî. Íàïðèìåð, åñëè âû ââåäåòå â ôèëüòð ñëîâî «êîçà», òî ýòî ñëîâî áóäåò èçìåíåíî íà óêàçàííûé âàìè çàìåíèòåëü è â ñëîâå «ñòðåêîçà». Åñëè âû íå ââåäåòå çàìåíèòåëü, òî íåöåíçóðíîå ñëîâî áóäåò èçìåíåíî íà øåñòü ñèìâîëîâ «ðåøåòêè» — #<br /><br /><b>Òî÷íîå ñîâïàäåíèå:</b> Ïðè âûáîðå ñïîñîáà «Òî÷íûé», ââåäåííîå âàìè ñëîâî áóäåò èçìåíÿòüñÿ íà çàìåíèòåëü òîëüêî ïðè òî÷íîì ñîâïàäåíèè ýòîãî ñëîâà. Íàïðèìåð, åñëè âû ââåäåòå â ôèëüòð ñëîâî «êîçà», òî ýòî ñëîâî áóäåò èçìåíåíî íà óêàçàííûé âàìè çàìåíèòåëü, òîëüêî â ñëîâå «êîçà». Åñëè âû íå ââåäåòå çàìåíèòåëü, òî íåöåíçóðíîå ñëîâî áóäåò èçìåíåíî íà øåñòü ñèìâîëîâ «ðåøåòêè» — #.<br /><br />Äàííàÿ îïöèÿ íå ÷óâñòâèòåëüíà ê ðåãèñòðó.";
$this->ipsclass->admin->page_title = "Ôèëüòð íåöåíçóðíûõ ñëîâ";
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Ôèëüòð íåöåíçóðíûõ ñëîâ' );
//-----------------------------------------
// Start form
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'badword_add' ),
2 => array( 'act' , 'babw' ),
4 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'badwords', 'order' => 'type' ) );
$this->ipsclass->DB->simple_exec();
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$words[] = $r;
}
foreach($words as $r)
{
$r['replace'] = $r['swop'] ? stripslashes($r['swop']) : '######';
$r['method'] = $r['m_exact'] ? 'Exact' : 'Loose';
$r['method'] = $r['m_exact'] ? 'Òî÷íûé' : 'Ìàñêà';
$r['type'] = stripslashes($r['type']);
$badword_html .= $this->html->badword_row( $r );
}
}
$this->ipsclass->html .= $this->html->badword_wrapper( $badword_html );
//-----------------------------------------
// IMPORT: Start table
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "60%" );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "40%" );
//-----------------------------------------
// IMPORT: Start output
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'badword_import' ),
2 => array( 'act' , 'babw' ),
3 => array( 'MAX_FILE_SIZE', '10000000000' ),
4 => array( 'section', $this->ipsclass->section_code ),
) , "uploadform", " enctype='multipart/form-data'" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Import a Badword List" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Èìïîðòèðîâàíèå ñïèñêà ñ ôèëüòðàìè íåöåíçóðíûõ ñëîâ" );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
"<b>Upload XML Badword List</b><div style='color:gray'>Browse your computer for 'ipb_badwords.xml' or 'ipb_badwords.xml.gz'. Duplicate entries will not be imported.</div>",
"<b>Çàãðóçêà XML-ôàéëà ñ ôèëüòðàìè</b><div style='color:gray'>Âûáåðèòå ôàéë «ipb_badwords.xml» èëè «ipb_badwords.xml.gz» íà âàøåì êîìïüþòåðå. Çàïèñè óæå ñîäåðæàùèåñÿ â áàçå íå áóäóò èìïîðòèðîâàíû.</div>",
$this->ipsclass->adskin->form_upload( )
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Import");
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èìïîðòèðîâàòü");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
$this->ipsclass->admin->output();
}
//-----------------------------------------
// BADWORD: Complete Edit
//-----------------------------------------
function badword_doedit()
{
if ($this->ipsclass->input['before'] == "")
{
$this->ipsclass->admin->error("You must enter a word to replace, silly!");
$this->ipsclass->admin->error("Âû íå óêàçàëè çàìåíÿåìîå ñëîâî.");
}
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("You must pass a valid filter id, silly!");
$this->ipsclass->admin->error("Âû íå óêàçàëè ID ôèëüòðà.");
}
$this->ipsclass->input['match'] = $this->ipsclass->input['match'] ? 1 : 0;
strlen($this->ipsclass->input['swop']) > 1 ? $this->ipsclass->input['swop'] : "";
$this->ipsclass->DB->do_update( 'badwords', array( 'type' => $this->ipsclass->input['before'],
'swop' => $this->ipsclass->input['after'],
$this->ipsclass->DB->do_update( 'badwords', array( 'type' => trim($this->ipsclass->input['before']),
'swop' => trim($this->ipsclass->input['after']),
'm_exact' => $this->ipsclass->input['match'],
), "wid='".$this->ipsclass->input['id']."'" );
$this->badword_rebuildcache();
$this->ipsclass->main_msg = "Filter edited";
$this->ipsclass->main_msg = "Ôèëüòð èçìåíåí";
$this->badword_start();
}
//-----------------------------------------
// BADWORD: Edit
//-----------------------------------------
function badword_edit()
{
$this->ipsclass->admin->page_detail = "You may edit the chosen filter below";
$this->ipsclass->admin->page_title = "Bad Word Filter";
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Bad Word Filters' );
$this->ipsclass->admin->nav[] = array( '', 'Edit Bad Word Filter' );
$this->ipsclass->admin->page_detail = "Âû ìîæåòå èçìåíèòü âûáðàííûé ôèëüòð â ôîðìå íèæå";
$this->ipsclass->admin->page_title = "Ôèëüòð íåöåíçóðíûõ ñëîâ";
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code.'&code=badword', 'Ôèëüòð íåöåíçóðíûõ ñëîâ' );
$this->ipsclass->admin->nav[] = array( '', 'Èçìåíåíèå ôèëüòðà íåöåíçóðíûõ ñëîâ' );
//-----------------------------------------
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("You must pass a valid filter id, silly!");
$this->ipsclass->admin->error("Âû íå óêàçàëè ID ôèëüòðà.");
}
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'badwords', 'where' => "wid='".$this->ipsclass->input['id']."'" ) );
$this->ipsclass->DB->simple_exec();
if ( ! $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->admin->error("We could not find that filter in the database");
$this->ipsclass->admin->error("Óêàçàííûé âàìè ôèëüòð íå íàéäåí â áàçå äàííûõ.");
}
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'badword_doedit' ),
2 => array( 'act' , 'babw' ),
3 => array( 'id' , $this->ipsclass->input['id'] ),
4 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "Before" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "After" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "Method" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Ñëîâî" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "Çàìåíà" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "Ìåòîä" , "20%" );
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Edit a filter" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ðåäàêòèðîâàíèå ôèëüòðà" );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->ipsclass->adskin->form_input('before', stripslashes($r['type']) ),
$this->ipsclass->adskin->form_input('after' , stripslashes($r['swop']) ),
$this->ipsclass->adskin->form_dropdown( 'match', array( 0 => array( 1, 'Exact' ), 1 => array( 0, 'Loose' ) ), $r['m_exact'] )
$this->ipsclass->adskin->form_dropdown( 'match', array( 0 => array( 1, 'Òî÷íûé' ), 1 => array( 0, 'Ìàñêà' ) ), $r['m_exact'] )
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Edit Filter');
$this->ipsclass->html .= $this->ipsclass->adskin->end_form('Èçìåíèòü');
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
$this->ipsclass->admin->output();
}
//-----------------------------------------
// BADWORD: Remove badowrd
//-----------------------------------------
function badword_remove()
{
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("You must pass a valid filter id, silly!");
$this->ipsclass->admin->error("Âû íå óêàçàëè ID ôèëüòðà.");
}
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'badwords', 'where' => "wid='".$this->ipsclass->input['id']."'" ) );
$this->badword_rebuildcache();
$this->ipsclass->main_msg = "Filter removed";
$this->ipsclass->main_msg = "Ôèëüòð óäàëåí.";
$this->badword_start();
return;
}
//-----------------------------------------
// BADWORD: Add badword
//-----------------------------------------
function badword_add()
{
if ($this->ipsclass->input['before'] == "")
{
$this->ipsclass->admin->error("You must enter a word to replace, silly!");
$this->ipsclass->admin->error("Âû íå óêàçàëè ñëîâî äëÿ çàìåíû.");
}
$this->ipsclass->input['match'] = $this->ipsclass->input['match'] ? 1 : 0;
strlen($this->ipsclass->input['swop']) > 1 ? $this->ipsclass->input['swop'] : "";
$this->ipsclass->DB->do_insert( 'badwords', array( 'type' => $this->ipsclass->input['before'],
'swop' => $this->ipsclass->input['after'],
$this->ipsclass->DB->do_insert( 'badwords', array( 'type' => trim($this->ipsclass->input['before']),
'swop' => trim($this->ipsclass->input['after']),
'm_exact' => $this->ipsclass->input['match'],
) );
$this->badword_rebuildcache();
$this->ipsclass->main_msg = "New filter added";
$this->ipsclass->main_msg = "Ôèëüòð óñïåøíî äîáàâëåí.";
$this->badword_start();
}
//-----------------------------------------
// BADWORD Rebuild Cache
//-----------------------------------------
function badword_rebuildcache()
{
$this->ipsclass->cache['badwords'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => 'type,swop,m_exact', 'from' => 'badwords' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['badwords'][] = $r;
}
$this->ipsclass->update_cache( array( 'name' => 'badwords', 'array' => 1, 'deletefirst' => 1 ) );
}
function perly_length_sort($a, $b)
{
@@ -720,7 +729,7 @@ class ad_banandbadword {
}
return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1;
}
function perly_word_sort($a, $b)
{
if ( strlen($a['type']) == strlen($b['type']) )
@@ -729,12 +738,12 @@ class ad_banandbadword {
}
return ( strlen($a['type']) > strlen($b['type']) ) ? -1 : 1;
}
}
+204 -198
View File
@@ -2,17 +2,25 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-10-06 12:18:32 +0100 (Fri, 06 Oct 2006) $
| > $Revision: 614 $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-10-30 06:40:23 -0600 (Mon, 30 Oct 2006) $
| > $Revision: 684 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -27,7 +35,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -36,146 +44,147 @@ class ad_bbcode {
var $functions = "";
var $ipsclass;
var $html;
/**
* Section title name
*
* @var string
*/
var $perm_main = "content";
/**
* Section title name
*
* @var string
*/
var $perm_child = "bbcode";
function auto_run()
{
$this->html = $this->ipsclass->acp_load_template('cp_skin_bbcode_badword');
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'BBCode Manager' );
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Óïðàâëåíèå BB-êîäàìè' );
//-----------------------------------------
// Require and RUN !! THERES A BOMB
//-----------------------------------------
$this->ipsclass->admin->page_detail = "The BBCode manager allows you to create and manage your BBCodes.";
$this->ipsclass->admin->page_title = "BBCode Manager";
$this->ipsclass->admin->page_detail = "Ýòà ñåêöèÿ ïîçâîëÿåò âàì äîáàâëÿòü íîâûå BB-êîäû.";
$this->ipsclass->admin->page_title = "Ìåíåäæåð íàñòðîéêè BB-êîäîâ";
//-----------------------------------------
// What to do...
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'bbcode':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->bbcode_start();
break;
case 'bbcode_add':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );
$this->bbcode_form('add');
break;
case 'bbcode_doadd':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );
$this->bbcode_save('add');
break;
case 'bbcode_edit':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->bbcode_form('edit');
break;
case 'bbcode_doedit':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->bbcode_save('edit');
break;
case 'bbcode_test':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->bbcode_test();
break;
case 'bbcode_delete':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->bbcode_delete();
break;
case 'bbcode_export':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' );
$this->bbcode_export();
break;
case 'bbcode_import':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' );
$this->bbcode_import();
break;
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->bbcode_start();
break;
}
}
//-----------------------------------------
// BBCODE: Import
//-----------------------------------------
function bbcode_import()
{
$content = $this->ipsclass->admin->import_xml( 'bbcode.xml' );
//-----------------------------------------
// Got anything?
//-----------------------------------------
if ( ! $content )
{
$this->ipsclass->main_msg = "Upload failed, ipb_bbcode.xml was either missing or empty";
$this->ipsclass->main_msg = "Íåâîçìîæíî âûïîëíèòü èìïîðòèðîâàíèå, ïîèñêîëüêó â ôàéëå «bbcode.xml» îøèáêà èëè îí íå èìååò çàïèñåé.";
$this->bbcode_start();
}
//-----------------------------------------
// Get xml mah-do-dah
//-----------------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
//-----------------------------------------
// Unpack the datafile
//-----------------------------------------
$xml->lite_parser = 1;
$xml->xml_parse_document( $content );
//-----------------------------------------
// Get current custom bbcodes
//-----------------------------------------
$tags = array();
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$tags[ $r['bbcode_tag'] ] = 1;
}
//-----------------------------------------
// pArse
//-----------------------------------------
if ( ! is_array( $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'][0] ) )
{
$xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'][0] = $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'];
}
foreach( $xml->xml_array['bbcodeexport']['bbcodegroup']['bbcode'] as $entry )
{
$bbcode_title = $entry['bbcode_title']['VALUE'];
@@ -188,7 +197,7 @@ class ad_bbcode {
$bbcode_add_into_menu = $entry['bbcode_add_into_menu']['VALUE'];
$bbcode_menu_option_text = $entry['bbcode_menu_option_text']['VALUE'];
$bbcode_menu_content_text = $entry['bbcode_menu_content_text']['VALUE'];
if ( $tags[ $bbcode_tag ] )
{
$bbarray = array(
@@ -203,12 +212,12 @@ class ad_bbcode {
'bbcode_menu_option_text' => $bbcode_menu_option_text,
'bbcode_menu_content_text' => $bbcode_menu_content_text,
);
$this->ipsclass->DB->do_update( 'custom_bbcode', $bbarray, "bbcode_tag='".$bbcode_tag."'" );
continue;
}
if ( $bbcode_tag )
{
$bbarray = array(
@@ -223,101 +232,101 @@ class ad_bbcode {
'bbcode_menu_option_text' => $bbcode_menu_option_text,
'bbcode_menu_content_text' => $bbcode_menu_content_text,
);
$this->ipsclass->DB->do_insert( 'custom_bbcode', $bbarray );
}
}
$this->bbcode_rebuildcache();
$this->ipsclass->main_msg = "BBCode XML file import completed";
$this->ipsclass->main_msg = "Çàïèñè ñ BB-êîäîâàìè óñïåøíî èìïîðòèðîâàí.";
$this->bbcode_start();
}
//-----------------------------------------
// BBCODE: Export
//-----------------------------------------
function bbcode_export()
{
//-----------------------------------------
// Get xml mah-do-dah
//-----------------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
//-----------------------------------------
// Start...
//-----------------------------------------
$xml->xml_set_root( 'bbcodeexport', array( 'exported' => time() ) );
//-----------------------------------------
// Get emo group
//-----------------------------------------
$xml->xml_add_group( 'bbcodegroup' );
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$content = array();
foreach ( $r as $k => $v )
{
$content[] = $xml->xml_build_simple_tag( $k, $v );
}
$entry[] = $xml->xml_build_entry( 'bbcode', $content );
}
$xml->xml_add_entry_to_group( 'bbcodegroup', $entry );
$xml->xml_format_document();
//-----------------------------------------
// Send to browser.
//-----------------------------------------
$this->ipsclass->admin->show_download( $xml->xml_document, 'bbcode.xml', '', 0 );
}
//-----------------------------------------
// BBCODE Remove
//-----------------------------------------
function bbcode_delete()
{
if ( ! $this->ipsclass->input['id'] )
{
$this->ipsclass->main_msg = "No ID was passed, please try again.";
$this->ipsclass->main_msg = "Âû íå óêàçàëè ID BB-êîäà äëÿ óäàëåíèÿ.";
$this->bbcode_start();
}
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'custom_bbcode', 'where' => 'bbcode_id='.intval($this->ipsclass->input['id']) ) );
$this->bbcode_rebuildcache();
$this->bbcode_start();
}
//-----------------------------------------
// BBCODE Rebuild Cache
//-----------------------------------------
function bbcode_rebuildcache()
{
$this->ipsclass->cache['bbcode'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode' ) );
$bbcode = $this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row($bbcode) )
{
$this->ipsclass->cache['bbcode'][] = $r;
@@ -325,32 +334,32 @@ class ad_bbcode {
$this->ipsclass->update_cache( array( 'name' => 'bbcode', 'array' => 1, 'deletefirst' => 1 ) );
}
//-----------------------------------------
// BBCODE Test
//-----------------------------------------
function bbcode_test()
{
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode', 'order' => 'bbcode_title' ) );
$this->ipsclass->DB->simple_exec();
$t = $this->ipsclass->txt_stripslashes($_POST['bbtest']);
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$preg_tag = preg_quote($row['bbcode_tag'], '#' );
if ( substr_count( $row['bbcode_replace'], '{content}' ) >= 1 )
{
//-----------------------------------------
// Slightly slower
//-----------------------------------------
if ( $row['bbcode_useoption'] )
{
preg_match_all( "#(\[".preg_quote($row['bbcode_tag'], '#' )."=(?:&quot;|&\#39;)?(.+?)(?:&quot;|&\#39;)?\])(.+?)(\[/".preg_quote($row['bbcode_tag'], '#' )."\])#si", $t, $match );
for ($i=0; $i < count($match[0]); $i++)
{
# XSS Check: Bug ID: 980
@@ -358,23 +367,20 @@ class ad_bbcode {
{
$match[2][$i] = intval( $match[2][$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 )
if ( $row['bbcode_switch_option'] )
{
$_option = 3;
$_content = 2;
}
$tmp = $row['bbcode_replace'];
$tmp = str_replace( '{option}' , $match[ $_option ][$i], $tmp );
$tmp = str_replace( '{content}', $match[ $_content ][$i], $tmp );
@@ -385,7 +391,7 @@ class ad_bbcode {
{
# Tricky.. match anything that's not a closing tag, or nothing
preg_match_all( "#(\[$preg_tag\])((?!\[/$preg_tag\]).+?)?(\[/$preg_tag\])#si", $t, $match );
for ($i=0; $i < count($match[0]); $i++)
{
$tmp = $row['bbcode_replace'];
@@ -397,7 +403,7 @@ class ad_bbcode {
else
{
$replace = explode( '{content}', $row['bbcode_replace'] );
if ( $row['bbcode_useoption'] )
{
$t = preg_replace( "#\[".$row['bbcode_tag']."=(?:&quot;|&\#39;)?(.+?)(?:&quot;|&\#39;)?\]#si", str_replace( '{option}', "\\1", $replace[0] ), $t );
@@ -406,53 +412,53 @@ class ad_bbcode {
{
$t = preg_replace( '#\['.$row['bbcode_tag'].'\]#i' , $replace[0], $t );
}
$t = preg_replace( '#\[/'.$row['bbcode_tag'].'\]#i', $replace[1], $t );
}
}
$this->ipsclass->main_msg = "<b>BBCode Test:</b><br /><br />".$t;
$this->ipsclass->main_msg = "<b>Ïðîâåðêà BB-êîäà:</b><br /><br />".$t;
$this->bbcode_start();
}
//-----------------------------------------
// BBCODE Save Form
//-----------------------------------------
function bbcode_save($type='add')
{
if ( $type == 'edit' )
{
if ( ! $this->ipsclass->input['id'] )
{
$this->ipsclass->main_msg = "No ID was passed, please try again";
$this->ipsclass->main_msg = "Âû íå óêàçàëè ID äëÿ èçìåíåíèÿ.";
$this->bbcode_form($type);
}
}
//-----------------------------------------
// check...
//-----------------------------------------
if ( ! $this->ipsclass->input['bbcode_title'] or ! $this->ipsclass->input['bbcode_tag'] or ! $this->ipsclass->input['bbcode_replace'] )
{
$this->ipsclass->main_msg = "You must complete the form fully.";
$this->ipsclass->main_msg = "Âû äîëæíû çàïîëíèòü âñå ïîëÿ.";
$this->bbcode_form($type);
}
if ( ! strstr( $this->ipsclass->input['bbcode_replace'], '{content}' ) )
{
$this->ipsclass->main_msg = "You must use {content} somewhere in the BBCode replacement section.";
$this->ipsclass->main_msg = "Âû äîëæíû èñïîëüçîâàòü {content} â òåõ ìåñòàõ, ãäå ïðîèñõîäèò çàìåíà BB-êîäîâ.";
$this->bbcode_form($type);
}
if ( ! strstr( $this->ipsclass->input['bbcode_replace'], '{option}' ) AND $this->ipsclass->input['bbcode_useoption'] )
{
$this->ipsclass->main_msg = "You must use {option} somewhere in the BBCode replacement section or set 'Use Option in tag?' to 'no'.";
$this->ipsclass->main_msg = "Âû äîëæíû èñïîëüçîâàòü {option}, â òåõ ìåñòàõ, ãäå ïðîèñõîäèò çàìåíà BB-êîäîâ èëè ïàðàìåòðó «Èñïîëüçîâàòü íàñòðîéêè â òåãàõ» óñòàíîâèòü çíà÷åíèå «Íåò».";
$this->bbcode_form($type);
}
$array = array( 'bbcode_title' => $this->ipsclass->input['bbcode_title'],
'bbcode_desc' => $this->ipsclass->txt_safeslashes( $_POST['bbcode_desc'] ),
'bbcode_tag' => $this->ipsclass->input['bbcode_tag'],
@@ -464,48 +470,48 @@ class ad_bbcode {
'bbcode_menu_option_text' => trim( $this->ipsclass->input['bbcode_menu_option_text'] ),
'bbcode_menu_content_text' => trim( $this->ipsclass->input['bbcode_menu_content_text'] )
);
if ( $type == 'add' )
{
$this->ipsclass->DB->do_insert( 'custom_bbcode', $array );
$this->ipsclass->main_msg = 'New BBCode Added';
$this->ipsclass->main_msg = 'Íîâûé BB-êîä óñïåøíî äîáàâëåí.';
}
else
{
$this->ipsclass->DB->do_update( 'custom_bbcode', $array, 'bbcode_id='.intval($this->ipsclass->input['id']) );
$this->ipsclass->main_msg = 'Custom BBCode Edited';
$this->ipsclass->main_msg = 'BB-êîä óñïåøíî èçìåíåí.';
}
$this->bbcode_rebuildcache();
$this->bbcode_start();
}
//-----------------------------------------
// BBCODE Start Form
//-----------------------------------------
function bbcode_form($type='add')
{
$this->ipsclass->admin->page_detail = "The BBCode manager allows you to add new custom BBCode.";
$this->ipsclass->admin->page_title = "BBCode Manager";
$this->ipsclass->admin->nav[] = array( '', 'Add/Edit BBCode' );
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ñìîæåòå ïðîñìîòðåòü âñå ñîçäàííûå âàìè BB-êîäû, à òàê æå èçìåíèòü èõ èëè óäàëèòü.";
$this->ipsclass->admin->page_title = "Äîïîëíèòåëüíûå BB-êîäû";
$this->ipsclass->admin->nav[] = array( '', 'Äîáàâëåíèå/èçìåíåíèå BB-êîäîâ' );
if ( $type == 'edit' )
{
if ( ! $this->ipsclass->input['id'] )
{
$this->ipsclass->main_msg = "No ID was passed, please try again";
$this->ipsclass->main_msg = "Âû íå óêàçàëè ID BB-êîäà äëÿ óäàëåíèÿ";
$this->bbcode_start();
}
$bbcode = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'custom_bbcode', 'where' => 'bbcode_id='.intval($this->ipsclass->input['id']) ) );
$button = "Edit BBCode";
$button = "Èçìåíèòü";
$code = 'bbcode_doedit';
$title = "Editing BBCode: ".$bbcode['bbcode_title'];
$title = "Ðåäàêòèðîâàíèå BB-êîäà: ".$bbcode['bbcode_title'];
}
else
{
@@ -516,99 +522,99 @@ class ad_bbcode {
'bbcode_useoption' => '',
'bbcode_replace' => '' );
$code = 'bbcode_doadd';
$title = "Adding a new custom BBCode";
$button = "Add BBCode";
$title = "Äîáàâëåíèå íîâîãî BB-êîäà";
$button = "Äîáàâèòü";
}
//-----------------------------------------
// Show the codes mahn!
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'bbcode' ),
2 => array( 'code' , $code ),
3 => array( 'id' , $this->ipsclass->input['id'] ),
4 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "60%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $title );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Custom BBCode Title</b><div style='color:gray'>Used on the BBCode pop-up legend</div>",
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Íàçâàíèå BB-êîäà</b><div style='color:gray'>Èñïîëüçóåòñÿ âî âñïëûâàþùåé ïîäñêàçêå BB-êîäà</div>",
$this->ipsclass->adskin->form_input( 'bbcode_title', ( isset($this->ipsclass->input['bbcode_title']) AND $this->ipsclass->input['bbcode_title'] ) ? $this->ipsclass->input['bbcode_title'] : $bbcode['bbcode_title'] )
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Custom BBCode Description</b><div style='color:gray'>Used on the BBCode pop-up legend</div>",
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïîëíîå îïèñàíèå ýòîãî BB-êîäà</b><div style='color:gray'>Èñïîëüçóåòñÿ âî âñïëûâàþùåé ïîäñêàçêå BB-êîä</div>",
$this->ipsclass->adskin->form_textarea( 'bbcode_desc', ( isset($this->ipsclass->input['bbcode_desc']) AND $this->ipsclass->input['bbcode_desc'] ) ? $this->ipsclass->input['bbcode_desc'] : $bbcode['bbcode_desc'] )
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Custom BBCode Example</b><div style='color:gray'>Used on the BBCode pop-up legend<br />Use the tag in the example: [tag]This is an example![/tag]</div>",
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïðèìåð ýòîãî BB-êîäà</b><div style='color:gray'>Èñïîëüçóåòñÿ âî âñïëûâàþùåé ïîäñêàçêå BB-êîä<br />Òåã äëÿ ïðèìåðà: [tag]Çäåñü âàø ïðèìåð![/tag]</div>",
$this->ipsclass->adskin->form_textarea( 'bbcode_example', ( isset($this->ipsclass->input['bbcode_example']) AND $this->ipsclass->input['bbcode_example'] ) ? $this->ipsclass->input['bbcode_example'] : $bbcode['bbcode_example'] )
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Custom BBCode Tag</b><div style='color:gray'>Example: For [tag] enter <b>tag</b></div>",
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Òåã ýòîãî BB-êîäà</b><div style='color:gray'>Ïðèìåð: Äëÿ [tag] ââåäèòå <b>tag</b></div>",
'[ '.$this->ipsclass->adskin->form_simple_input( 'bbcode_tag', ( isset($this->ipsclass->input['bbcode_tag']) AND $this->ipsclass->input['bbcode_tag'] ) ? $this->ipsclass->input['bbcode_tag'] : $bbcode['bbcode_tag'], 10).' ]'
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Use Option in tag?</b><div style='color:gray'>Use to create [tag=option] style tags</div>",
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñïîëüçîâàòü îïöèè â òåãå?</b><div style='color:gray'>Èñïîëüçóåòñÿ äëÿ ñîçäàíèÿ BB-êîäà ñ îïöèÿìè: [tag=option]</div>",
$this->ipsclass->adskin->form_yes_no( 'bbcode_useoption', ( isset($this->ipsclass->input['bbcode_useoption']) AND $this->ipsclass->input['bbcode_useoption'] ) ? $this->ipsclass->input['bbcode_useoption'] : $bbcode['bbcode_useoption'] )
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Switch option around?</b><div style='color:gray'>Use this if you wish to swap the {content} for {option} (IE when using tags like [tag={content}]{option}[/tag]</div>",
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ñìåíèòü îïåðàíäû?</b><div style='color:gray'>Åñëè âû æåëàåòå çàìåíÿòü {content} íà {option} (ïðè èñïîëüçîâàíèè òåãîâ IE «ëþáèò» [tag={content}]{option}[/tag]</div>",
$this->ipsclass->adskin->form_yes_no( 'bbcode_switch_option', ( isset($this->ipsclass->input['bbcode_switch_option']) AND $this->ipsclass->input['bbcode_switch_option'] ) ? $this->ipsclass->input['bbcode_switch_option'] : $bbcode['bbcode_switch_option'] )
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Custom BBCode Replacement</b><div style='color:gray'>&lt;tag&gt;{content}&lt;/tag&gt;<br />&lt;tag thing='{option}'&gt;{content}&lt;/tag&gt;</div>",
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Çàìåíà BB-êîäà</b><div style='color:gray'>&lt;tag&gt;{content}&lt;/tag&gt;<br />&lt;tag thing='{option}'&gt;{content}&lt;/tag&gt;</div>",
$this->ipsclass->adskin->form_textarea( 'bbcode_replace', ( isset($this->ipsclass->input['bbcode_replace']) AND $this->ipsclass->input['bbcode_replace'] ) ? $this->ipsclass->input['bbcode_replace'] : $bbcode['bbcode_replace'] )
) );
//-----------------------------------------
// Insert Special Options
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Insert into the editor's 'Insert Special' menu?</b>",
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Äîáàâèòü â ìåíþ «Ñïåö. ýëåìåíòû» ðåäàêòîðà?</b>",
$this->ipsclass->adskin->form_yes_no( 'bbcode_add_into_menu', ( isset($this->ipsclass->input['bbcode_add_into_menu']) AND $this->ipsclass->input['bbcode_add_into_menu'] ) ? $this->ipsclass->input['bbcode_add_into_menu'] : $bbcode['bbcode_add_into_menu'] )
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Enter 'option' dialogue text</b><div style='color:gray'>Help text to use above the 'Option' text field. This will appear when the tag is chosen from the 'Insert Special' menu.</div>",
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ââåäèòå òåêñò äëÿ 'option' </b><div style='color:gray'>Òåêñò äëÿ ïîìîùè â èñïîëüçîâàíèè ïîëÿ 'Option'. Îí áóäåò îòîáðàæàòüñÿ, êîãäà áóäåò âûáðàí òåã â ðåäàêòîðå.</div>",
$this->ipsclass->adskin->form_simple_input( 'bbcode_menu_option_text', ( isset($this->ipsclass->input['bbcode_menu_option_text']) AND $this->ipsclass->input['bbcode_menu_option_text'] ) ? $this->ipsclass->input['bbcode_menu_option_text'] : $bbcode['bbcode_menu_option_text'], 50)
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Enter 'content' dialogue text</b><div style='color:gray'>Help text to use above the 'Content' text field. This will appear when the tag is chosen from the 'Insert Special' menu.</div>",
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ââåäèòå òåêñò äëÿ 'content' </b><div style='color:gray'>Òåêñò äëÿ ïîìîùè â èñïîëüçîâàíèè ïîëÿ 'Content'. Îí áóäåò îòîáðàæàòüñÿ, êîãäà áóäåò âûáðàí òåã â ðåäàêòîðå.</div>",
$this->ipsclass->adskin->form_simple_input( 'bbcode_menu_content_text', ( isset($this->ipsclass->input['bbcode_menu_content_text']) AND $this->ipsclass->input['bbcode_menu_content_text'] ) ? $this->ipsclass->input['bbcode_menu_content_text'] : $bbcode['bbcode_menu_content_text'], 50)
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form( $button );
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
$this->ipsclass->html .= "<br /><div class='tableborder'><div class='tablerow1' style='padding:6px'><b>More Information</b><br />When adding the BBCode replacement, don't forget to add the {content} block where you wish the tag content to go when parsed.<br />
If you are using an option <b>[tag=option][/tag]</b> tag, don't forget to add in {option} in the BBCode replacement where you want the option to go.</div></div>";
$this->ipsclass->html .= "<br /><div class='tableborder'><div class='tablerow1' style='padding:6px'><b>Äîïîëíèòåëüíàÿ èíôîðìàöèÿ </b><br />Âî âðåìÿ äîáàâëåíèÿ çàìåíû BB-êîäà, íå çàáóäüòå äîáàâèòü áëîê {content} òàì, ãäå ýòî òðåáóåòñÿ. <br />
Åñëè âû èñïîëüçóåòå îïöèþ BB-êîäà [tag=option][/tag], íå çàáóäüòå äîáàâèòü áëîê {option} òàì, ãäå ýòî òðåáóåòñÿ â çàìåíå BB-êîäà. </div></div>";
//-----------------------------------------
$this->ipsclass->admin->output();
}
//-----------------------------------------
// BBCODE Splash
//-----------------------------------------
function bbcode_start()
{
$this->ipsclass->admin->page_detail = "The BBCode manager allows you to add new custom BBCode.";
$this->ipsclass->admin->page_title = "BBCode Manager";
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ñìîæåòå ñîçäàòü íîâûå BB-êîäû, êîòîðûå â ïîñëåäñâèå ñìîãóò èñïîëüçîâàòü ïîëüçîâàòåëè âàøåãî ôîðóìà.";
$this->ipsclass->admin->page_title = "Äîáàâëåíèå íîâîãî äîïîëíèòåëüíîãî BB-êîäà";
//-----------------------------------------
// Show the codes mahn!
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'custom_bbcode', 'order' => 'bbcode_title' ) );
$this->ipsclass->DB->simple_exec();
$bbcode_rows = "";
while ( $row = $this->ipsclass->DB->fetch_row() )
{
if ( $row['bbcode_useoption'] )
@@ -619,65 +625,65 @@ class ad_bbcode {
{
$option = '';
}
$row['bbcode_fulltag'] = '['.$row['bbcode_tag'].$option.']{content}[/'.$row['bbcode_tag'].']';
$bbcode_rows .= $this->html->bbcode_row( $row );
}
$this->ipsclass->html .= $this->html->bbcode_wrapper( $bbcode_rows );
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'act' , 'bbcode' ),
2 => array( 'code' , 'bbcode_test' ),
4 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "60%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Test your custom BBCode" );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Test your BBCode",
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïðîâåðèòü BB-êîä" );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "Ââåäèòå â ïîëå BB-êîä",
$this->ipsclass->adskin->form_textarea( 'bbtest', isset($_POST['bbtest']) ? $_POST['bbtest'] : '' ),
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Run Test");
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Íà÷àòü ïðîâåðêó");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
// IMPORT: Start table
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "60%" );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "40%" );
//-----------------------------------------
// IMPORT: Start output
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'bbcode_import' ),
2 => array( 'act' , 'bbcode' ),
3 => array( 'MAX_FILE_SIZE', '10000000000' ),
4 => array( 'section', $this->ipsclass->section_code ),
) , "uploadform", " enctype='multipart/form-data'" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Import a BBCode List" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Èìïîðòèðîâàíèå ñïèñêà BB-êîäîâ" );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
"<b>Upload XML BBCode List</b><div style='color:gray'>Browse your computer for 'bbcode.xml' or 'bbcode.xml.gz'. Duplicate [tag] entries will not be imported.</div>",
"<b>Çàãðóçêà XML ñïèñêà BB-êîäîâ</b><div style='color:gray'>Âûáåðèòå íà âàøåì êîìïüþòåðå ôàéë «ipb_bbcode.xml». Äóáëèðîâàíèå [tag] íåâîçìîæíî — èìïîðòèðîâàòü íå óäàñòñÿ.</div>",
$this->ipsclass->adskin->form_upload( )
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Import");
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èìïîðòèðîâàòü");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
$this->ipsclass->admin->output();
}
function perly_length_sort($a, $b)
{
@@ -687,7 +693,7 @@ class ad_bbcode {
}
return ( strlen($a['typed']) > strlen($b['typed']) ) ? -1 : 1;
}
function perly_word_sort($a, $b)
{
if ( strlen($a['type']) == strlen($b['type']) )
@@ -696,12 +702,12 @@ class ad_bbcode {
}
return ( strlen($a['type']) > strlen($b['type']) ) ? -1 : 1;
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+143 -130
View File
@@ -2,18 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-12-01 15:07:16 -0600 (Fri, 01 Dec 2006) $
| > $Revision: 752 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Email Error Logs Stuff
@@ -28,7 +36,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -41,109 +49,109 @@ class ad_emailerror
* @var string
*/
var $perm_main = "admin";
/**
* Section title name
*
* @var string
*/
var $perm_child = "emailerror";
function auto_run()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Email Error Logs' );
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë îøèáîê ïðè ðàáîòå ñ ïî÷òîé' );
//-----------------------------------------
// Make sure we're a root admin, or else!
//-----------------------------------------
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
{
//$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
//$this->ipsclass->admin->error("Èçâèíèòå, ýòà ôóíêöèÿ äîñòóïíà òîëüêî ãëàâíûì àäìèíèñòðàòîðàì.");
}
switch($this->ipsclass->input['code'])
{
case 'list':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->list_current();
break;
case 'remove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->remove_entries();
break;
case 'viewemail':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->view_email();
break;
//-----------------------------------------
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->list_current();
break;
}
}
//-----------------------------------------
// View a single email.
//-----------------------------------------
function view_email()
{
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("Could not resolve the email ID, please try again");
$this->ipsclass->admin->error("Âû íå óêàçàëè ID e-mail àäðåñà.");
}
$id = intval($this->ipsclass->input['id']);
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => "mlog_id=$id" ) );
$this->ipsclass->DB->simple_exec();
if ( ! $row = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)");
$this->ipsclass->admin->error("Óêàçàííûé âàìè ID ($id) íå íàéäåí â áàçå äàííûõ.");
}
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "100%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $row['mlog_subject'] );
$row['mlog_date'] = $this->ipsclass->admin->get_date( $row['mlog_date'], 'LONG' );
$row['mlog_content'] = nl2br($row['mlog_content']);
$row['mlog_msg'] = $row['mlog_msg'] ? $row['mlog_msg'] : '<em>No Info</em>';
$row['mlog_code'] = $row['mlog_code'] ? $row['mlog_code'] : '<em>No Info</em>';
$row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : '<em>No Info</em>';
$row['mlog_msg'] = $row['mlog_msg'] ? $row['mlog_msg'] : '<em>Íåò èíôîðìàöèè</em>';
$row['mlog_code'] = $row['mlog_code'] ? $row['mlog_code'] : '<em>Íåò èíôîðìàöèè</em>';
$row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : '<em>Íåò èíôîðìàöèè</em>';
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
"<strong>From:</strong> &lt;{$row['mlog_from']}&gt;
<br /><strong>To:</strong> &lt;{$row['mlog_to']}&gt;
<br /><strong>Sent:</strong> {$row['mlog_date']}
<br /><strong>Subject:</strong> {$row['mlog_subject']}
"<strong>Îò:</strong> &lt;{$row['mlog_from']}&gt;
<br /><strong>Êîìó:</strong> &lt;{$row['mlog_to']}&gt;
<br /><strong>Îòïðàâëåíî:</strong> {$row['mlog_date']}
<br /><strong>Òåìà:</strong> {$row['mlog_subject']}
<hr />
<br />{$row['mlog_content']}....
<hr />
<br />IPB ERROR: {$row['mlog_msg']}
<br />SMTP CODE: {$row['mlog_code']}
<br />SMTP ERROR: {$row['mlog_smtp_error']}
<br />IPB ÎØÈÁÊÀ: {$row['mlog_msg']}
<br />SMTP ÊÎÄ: {$row['mlog_code']}
<br />SMTP ÎØÈÁÊÀ: {$row['mlog_smtp_error']}
"
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
$this->ipsclass->admin->print_popup();
}
//-----------------------------------------
// Remove row(s)
//-----------------------------------------
function remove_entries()
{
if ( $this->ipsclass->input['type'] == 'all' )
@@ -153,7 +161,7 @@ class ad_emailerror
else
{
$ids = array();
foreach ($this->ipsclass->input as $k => $v)
{
if ( preg_match( "/^id_(\d+)$/", $k, $match ) )
@@ -164,67 +172,67 @@ class ad_emailerror
}
}
}
$ids = $this->ipsclass->clean_int_array( $ids );
//-----------------------------------------
if ( count($ids) < 1 )
{
$this->ipsclass->admin->error("You did not select any email log entries to approve or delete");
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü êàê ìèíèìóì îäíó çàïèñü äëÿ óäàëåíèÿ.");
}
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'mail_error_logs', 'where' => "mlog_id IN (".implode(',', $ids ).")" ) );
}
$this->ipsclass->admin->save_log("Removed email error log entries");
$this->ipsclass->admin->save_log("Æóðíàë e-mail îøèáîê î÷èùåí");
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
}
//-----------------------------------------
// SHOW EMAIL ERROR LOGS
//-----------------------------------------
function list_current()
{
$this->ipsclass->html .= ""; // removed js popwin
$form_array = array();
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
$this->ipsclass->admin->page_detail = "Stored email error logs";
$this->ipsclass->admin->page_title = "Email Error Logs Manager";
$this->ipsclass->admin->page_detail = "Æóðíàë ñîõðàíåííûõ e-mail îøèáîê";
$this->ipsclass->admin->page_title = "Óïðàâëåíèå æóðíàëîì e-mail îøèáîê";
//-----------------------------------------
// Check URL parameters
//-----------------------------------------
$url_query = array();
$db_query = array();
if ( isset($this->ipsclass->input['type']) AND $this->ipsclass->input['type'] != "" )
{
$this->ipsclass->admin->page_title .= " (Search Results)";
$this->ipsclass->admin->page_title .= " (Ðåçóëüòàòû ïîèñêà)";
switch( $this->ipsclass->input['type'] )
{
case 'subject':
$string = urldecode($this->ipsclass->input['string']);
if ( $string == "" )
{
$this->ipsclass->admin->error("You must enter something to search by");
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
}
$url_query[] = 'type='.$this->ipsclass->input['type'];
$url_query[] = 'string='.urlencode($string);
$db_query[] = $this->ipsclass->input['match'] == 'loose' ? "mlog_subject LIKE '%{$string}%'" : "mlog_subject='{$string}'";
$db_query[] = $this->ipsclass->input['match'] == 'loose' ? "mlog_subject LIKE '%". preg_replace_callback( '/([=_\?\x00-\x1F\x80-\xFF])/', create_function( '$match', 'return "=" . strtoupper( dechex( ord( "$match[1]" ) ) );' ), $string ) ."%'" : "mlog_subject='{$string}'";
break;
case 'email_from':
$string = urldecode($this->ipsclass->input['string']);
if ( $string == "" )
{
$this->ipsclass->admin->error("You must enter something to search by");
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
}
$url_query[] = 'type='.$this->ipsclass->input['type'];
$url_query[] = 'string='.urlencode($string);
@@ -234,7 +242,7 @@ class ad_emailerror
$string = urldecode($this->ipsclass->input['string']);
if ( $string == "" )
{
$this->ipsclass->admin->error("You must enter something to search by");
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
}
$url_query[] = 'type='.$this->ipsclass->input['type'];
$url_query[] = 'string='.urlencode($string);
@@ -244,64 +252,64 @@ class ad_emailerror
$string = urldecode($this->ipsclass->input['string']);
if ( $string == "" )
{
$this->ipsclass->admin->error("You must enter something to search by");
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
}
$url_query[] = 'type='.$this->ipsclass->input['type'];
$url_query[] = 'string='.urlencode($string);
$db_query[] = $this->ipsclass->input['match'] == 'loose' ? "mlog_msg LIKE '%{$string}%' or mlog_smtp_msg LIKE '%{$string}%'" : "mlog_msg='{$string} or mlog_smtp_msg='{$string}'";
break;
default:
//
break;
}
}
//-----------------------------------------
// LIST 'EM
//-----------------------------------------
$dbe = "";
$url = "";
if ( count($db_query) > 0 )
{
$dbe = implode(' AND ', $db_query );
}
if ( count($url_query) > 0 )
{
$url = '&'.implode( '&', $url_query);
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'count(*) as cnt', 'from' => 'mail_error_logs', 'where' => $dbe ) );
$this->ipsclass->DB->simple_exec();
$count = $this->ipsclass->DB->fetch_row();
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $count['cnt'],
'PER_PAGE' => 25,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "Single Page",
'L_MULTI' => "Pages: ",
'L_SINGLE' => "Îäíà ñòðàíèöà",
'L_MULTI' => "Ñòðàíèöû: ",
'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}".$url,
)
);
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => $dbe, 'order' => 'mlog_date DESC', 'limit' => array( $start, 25 ) ) );
$this->ipsclass->DB->simple_exec();
$this->ipsclass->html .= "<script type='text/javascript'>
function checkall( )
{
var formobj = document.getElementById('theAdminForm');
var checkboxes = formobj.getElementsByTagName('input');
for ( var i = 0 ; i <= checkboxes.length ; i++ )
{
var e = checkboxes[i];
var docheck = formobj.checkme.checked;
if ( e && (e.type == 'checkbox') && (! e.disabled) && (e.id != 'checkme') && (e.name != 'type') )
{
if( docheck == false )
@@ -314,96 +322,101 @@ class ad_emailerror
}
}
}
return false;
}
</script>";
</script>";
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'remove' ),
2 => array( 'act' , 'emailerror' ),
3 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "<input type='checkbox' onclick='checkall();' id='checkme' />" , "1%" );
$this->ipsclass->adskin->td_header[] = array( "To" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Subject" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Error MSG" , "30%" );
$this->ipsclass->adskin->td_header[] = array( "Date" , "20%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Logged Emails Errors" );
$this->ipsclass->adskin->td_header[] = array( "<input type='checkbox' onclick='checkall();' id='checkme' />" , "1%" );
$this->ipsclass->adskin->td_header[] = array( "Êîìó" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Òåìà" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Îøèáêà" , "30%" );
$this->ipsclass->adskin->td_header[] = array( "Âåðìÿ" , "20%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ñïèñîê íåîòïðàâëåííûõ ïèñåì" );
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$row['mlog_date'] = $this->ipsclass->admin->get_date( $row['mlog_date'], 'SHORT' );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
$row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?{$this->ipsclass->vars['gb_char_set']}?Q?" ) !== FALSE ) ?
str_replace( "=?{$this->ipsclass->vars['gb_char_set']}?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) )
//base64_decode( str_replace( "=?utf-8?B?", "", str_replace( "=?=", "", str_replace( "=20", "", $row['mlog_subject'] ) ) ) )
: $row['mlog_subject'];
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
"<center><input type='checkbox' class='checkbox' name='id_{$row['mlog_id']}' value='1' /></center>",
'<b>'.$row['mlog_to'].'</b>',
"<a href='javascript:pop_win(\"&{$this->ipsclass->form_code_js}&code=viewemail&id={$row['mlog_id']}\", \"{$row['mlog_id']}\",400,350)' title='Read email'>".$row['mlog_subject']."</a>",
"<a href='javascript:pop_win(\"&{$this->ipsclass->form_code_js}&code=viewemail&id={$row['mlog_id']}\", \"{$row['mlog_id']}\",400,350)' title='×èòàòü ïèñüìî'>".$row['mlog_subject']."</a>",
$row['mlog_msg'].'<br />'.$row['mlog_code']. '&nbsp;'.$row['mlog_smtp_msg'],
$row['mlog_date'],
) );
}
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Çàïèñåé íå íàéäåíî.</center>");
}
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('<div style="float:left;width:auto"><input type="submit" value="Remove Checked" class="realbutton" />&nbsp;<input type="checkbox" id="checkbox" name="type" value="all" />&nbsp;Remove all?</div><div align="right">'.$links.'</div></form>', 'left', 'tablesubheader');
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('<div style="float:left;width:auto"><input type="submit" value="Óäàëèòü âûáðàííûå" class="realbutton" />&nbsp;<input type="checkbox" id="checkbox" name="type" value="all" />&nbsp;Óäàëèòü âñå?</div><div align="right">'.$links.'</div></form>', 'left', 'tablesubheader');
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'list' ),
2 => array( 'act' , 'emailerror' ),
3 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Email Error Logs" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê çàïèñåé îøèáîê" );
$form_array = array(
0 => array( 'subject' , 'Email Subject' ),
2 => array( 'email_from' , 'From Email Address' ),
3 => array( 'email_to' , 'To Email Address' ),
4 => array( 'error' , 'Error Message' ),
0 => array( 'subject' , 'Òåìà ïèñüìà' ),
2 => array( 'email_from' , 'Îò (E-mail)' ),
3 => array( 'email_to' , 'Êîìó (E-mail)' ),
4 => array( 'error' , 'Ñîîáùåíèå îá îøèáêå' ),
);
$type_array = array(
0 => array( 'exact' , 'is exactly' ),
1 => array( 'loose' , 'contains' ),
0 => array( 'exact' , 'ñîâïàäåíèå' ),
1 => array( 'loose' , 'ñîäåðæèò' ),
);
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search where</b> &nbsp;"
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïîèñê â</b> &nbsp;"
. $this->ipsclass->adskin->form_dropdown( "type" , $form_array, isset($_POST['type']) ? $_POST['type'] : '' ) ." "
. $this->ipsclass->adskin->form_dropdown( "match", $type_array, isset($_POST['match']) ? $_POST['match'] : '') ." "
. $this->ipsclass->adskin->form_input( "string", isset($_POST['string']) ? $_POST['string'] : '' ),
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Íàéòè");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
}
+165 -157
View File
@@ -2,16 +2,24 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -28,7 +36,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -44,7 +52,7 @@ class ad_emaillogs
* @var string
*/
var $perm_main = "admin";
/**
* Section title name
*
@@ -54,92 +62,92 @@ class ad_emaillogs
function auto_run()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Email Logs' );
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë e-mail îòïðàâëåíèé' );
// Make sure we're a root admin, or else!
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
{
//$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
//$this->ipsclass->admin->error("Èçâèíèòå, ýòà ôóíêöèÿ äîñòóïíà òîëüêî ãëàâíûì àäìèíèñòðàòîðàì.");
}
switch($this->ipsclass->input['code'])
{
case 'list':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->list_current();
break;
case 'remove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->remove_entries();
break;
case 'viewemail':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->view_email();
break;
//-----------------------------------------
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->list_current();
break;
}
}
//-----------------------------------------
// View a single email.
//-----------------------------------------
function view_email()
{
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("Could not resolve the email ID, please try again");
$this->ipsclass->admin->error("Íåâîçìîæíî îïðåäåëèòü ID àäðåñà email, âåðíèòåñü è ïîïðîáóéòå åùå ðàç");
}
$id = intval($this->ipsclass->input['id']);
$this->ipsclass->DB->cache_add_query( 'emaillogs_view_email', array( 'id' => $id ) );
$this->ipsclass->DB->cache_exec_query();
if ( ! $row = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)");
$this->ipsclass->admin->error("Íåâîçìîæíî îïðåäåëèòü ID àäðåñà email, âåðíèòåñü è ïîïðîáóéòå åùå ðàç ($id)");
}
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "100%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $row['email_subject'] );
$row['email_date'] = $this->ipsclass->admin->get_date( $row['email_date'], 'LONG' );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
"<strong>From:</strong> {$row['name']} &lt;{$row['from_email_address']}&gt;
<br /><strong>To:</strong> {$row['to_name']} &lt;{$row['to_email_address']}&gt;
<br /><strong>Sent:</strong> {$row['email_date']}
<br /><strong>From IP:</strong> {$row['from_ip_address']}
<br /><strong>Subject:</strong> {$row['email_subject']}
"<strong>Îò:</strong> {$row['name']} &lt;{$row['from_email_address']}&gt;
<br /><strong>Êîìó:</strong> {$row['to_name']} &lt;{$row['to_email_address']}&gt;
<br /><strong>Îòïðàâëåíî:</strong> {$row['email_date']}
<br /><strong>IP-àäðåñ:</strong> {$row['from_ip_address']}
<br /><strong>Òåìà:</strong> {$row['email_subject']}
<hr>
<br />{$row['email_content']}
"
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
$this->ipsclass->admin->print_popup();
}
//-----------------------------------------
// Remove row(s)
//-----------------------------------------
function remove_entries()
{
if ( $this->ipsclass->input['type'] == 'all' )
@@ -149,7 +157,7 @@ class ad_emaillogs
else
{
$ids = array();
foreach ($this->ipsclass->input as $k => $v)
{
if ( preg_match( "/^id_(\d+)$/", $k, $match ) )
@@ -160,57 +168,57 @@ class ad_emaillogs
}
}
}
$ids = $this->ipsclass->clean_int_array( $ids );
//-----------------------------------------
if ( count($ids) < 1 )
{
$this->ipsclass->admin->error("You did not select any email log entries to approve or delete");
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü õîòü îäíó çàïèñü èç æóðíàëà äëÿ óäàëåíèÿ");
}
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'email_logs', 'where' => " email_id IN (".implode(',', $ids ).")" ) );
}
$this->ipsclass->admin->save_log("Removed email log entries");
$this->ipsclass->admin->save_log("Óäàëåíû çàïèñè èç æóðíàëà e-mail îòïðàâëåíèé");
$this->ipsclass->boink_it($this->ipsclass->base_url."&act=emaillog");
exit();
}
}
//-----------------------------------------
// SHOW ALL LANGUAGE PACKS
//-----------------------------------------
function list_current()
{
$this->ipsclass->html .= ""; // removed js popwin
$form_array = array();
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
$this->ipsclass->admin->page_detail = "Stored email logs";
$this->ipsclass->admin->page_title = "Email Logs Manager";
$this->ipsclass->admin->page_detail = "Ñîõðàíåííûå çàïèñè æóðíàëà e-mail îòïðàâëåíèé";
$this->ipsclass->admin->page_title = "Óïðàâëåíèå æóðíàëîì e-mail îòïðàâëåíèé";
//-----------------------------------------
// Check URL parameters
//-----------------------------------------
$url_query = array();
$db_query = array();
if ( isset($this->ipsclass->input['type']) AND $this->ipsclass->input['type'] != "" )
{
$this->ipsclass->admin->page_title .= " (Search Results)";
$this->ipsclass->admin->page_title .= " (Ðåçóëüòàòû ïîèñêà)";
switch( $this->ipsclass->input['type'] )
{
case 'fromid':
@@ -227,7 +235,7 @@ class ad_emaillogs
$string = urldecode($this->ipsclass->input['string']);
if ( $string == "" )
{
$this->ipsclass->admin->error("You must enter something to search by");
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
}
$url_query[] = 'type='.$this->ipsclass->input['type'];
$url_query[] = 'string='.urlencode($string);
@@ -237,7 +245,7 @@ class ad_emaillogs
$string = urldecode($this->ipsclass->input['string']);
if ( $string == "" )
{
$this->ipsclass->admin->error("You must enter something to search by");
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
}
$url_query[] = 'type='.$this->ipsclass->input['type'];
$url_query[] = 'string='.urlencode($string);
@@ -247,7 +255,7 @@ class ad_emaillogs
$string = urldecode($this->ipsclass->input['string']);
if ( $string == "" )
{
$this->ipsclass->admin->error("You must enter something to search by");
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
}
$url_query[] = 'type='.$this->ipsclass->input['type'];
$url_query[] = 'string='.urlencode($string);
@@ -257,7 +265,7 @@ class ad_emaillogs
$string = urldecode($this->ipsclass->input['string']);
if ( $string == "" )
{
$this->ipsclass->admin->error("You must enter something to search by");
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
}
$url_query[] = 'type='.$this->ipsclass->input['type'];
$url_query[] = 'string='.urlencode($string);
@@ -267,43 +275,43 @@ class ad_emaillogs
$string = urldecode($this->ipsclass->input['string']);
if ( $string == "" )
{
$this->ipsclass->admin->error("You must enter something to search by");
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
}
if ( $this->ipsclass->input['match'] == 'loose' )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name LIKE '%{$string}%'" ) );
$this->ipsclass->DB->simple_exec();
if ( ! $this->ipsclass->DB->get_num_rows() )
{
$this->ipsclass->admin->error("No matches found in the email logs");
$this->ipsclass->admin->error("Íå íàéäåíî íèêàêèõ çàïèñåé, ñîîòâåòñòâóþùèõ çàïðîñó â æóðíàëå e-mail îòïðàâëåíèé");
}
$ids = array();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$ids[] = $r['id'];
}
$db_query[] = 'email.from_member_id IN('.implode( ',', $ids ).')';
}
else
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name='{$string}'" ) );
$this->ipsclass->DB->simple_exec();
if ( ! $this->ipsclass->DB->get_num_rows() )
{
$this->ipsclass->admin->error("No matches found in the email logs");
$this->ipsclass->admin->error("Íå íàéäåíî íèêàêèõ çàïèñåé, ñîîòâåòñòâóþùèõ çàïðîñó â æóðíàëå e-mail îòïðàâëåíèé");
}
$r = $this->ipsclass->DB->fetch_row();
$db_query[] = 'email.from_member_id IN('.$r['id'].')';
}
$url_query[] = 'type='.$this->ipsclass->input['type'];
$url_query[] = 'string='.urlencode($string);
break;
@@ -311,43 +319,43 @@ class ad_emaillogs
$string = urldecode($this->ipsclass->input['string']);
if ( $string == "" )
{
$this->ipsclass->admin->error("You must enter something to search by");
$this->ipsclass->admin->error("Âû äîëæíû ââåñòè õîòü ÷òî-íèáóäü");
}
if ( $this->ipsclass->input['match'] == 'loose' )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name LIKE '%{$string}%'" ) );
$this->ipsclass->DB->simple_exec();
if ( ! $this->ipsclass->DB->get_num_rows() )
{
$this->ipsclass->admin->error("No matches found in the email logs");
$this->ipsclass->admin->error("Íå íàéäåíî íèêàêèõ çàïèñåé, ñîîòâåòñòâóþùèõ çàïðîñó â æóðíàëå e-mail îòïðàâëåíèé");
}
$ids = array();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$ids[] = $r['id'];
}
$db_query[] = 'email.to_member_id IN('.implode( ',', $ids ).')';
}
else
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'id,name', 'from' => 'members', 'where' => "name='{$string}'" ) );
$this->ipsclass->DB->simple_exec();
if ( ! $this->ipsclass->DB->get_num_rows() )
{
$this->ipsclass->admin->error("No matches found in the email logs");
$this->ipsclass->admin->error("Íå íàéäåíî íèêàêèõ çàïèñåé, ñîîòâåòñòâóþùèõ çàïðîñó â æóðíàëå e-mail îòïðàâëåíèé");
}
$r = $this->ipsclass->DB->fetch_row();
$db_query[] = 'email.to_member_id IN('.$r['id'].')';
}
$url_query[] = 'type='.$this->ipsclass->input['type'];
$url_query[] = 'string='.urlencode($string);
break;
@@ -356,41 +364,41 @@ class ad_emaillogs
break;
}
}
if( isset($this->ipsclass->input['match']) )
{
$url_query[] = 'match='.$this->ipsclass->input['match'];
}
//-----------------------------------------
// LIST 'EM
//-----------------------------------------
$dbe = "";
$url = "";
if ( count($db_query) > 0 )
{
$dbe = implode(' AND ', $db_query );
}
if ( count($url_query) > 0 )
{
$url = '&'.implode( '&', $url_query);
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'count(email.email_id) as cnt',
'from' => 'email_logs email',
'where' => $dbe ) );
$this->ipsclass->DB->simple_exec();
$count = $this->ipsclass->DB->fetch_row();
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $count['cnt'],
'PER_PAGE' => 25,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "Single Page",
'L_MULTI' => "Pages: ",
'L_SINGLE' => "Îäíà ñòðàíèöà",
'L_MULTI' => "Ñòðàíèöû: ",
'BASE_URL' => $this->ipsclass->base_url."&{$this->ipsclass->form_code}".$url,
)
);
@@ -398,21 +406,21 @@ class ad_emaillogs
{
$dbe = 'WHERE '.$dbe;
}
$this->ipsclass->DB->cache_add_query( 'emaillogs_list_current', array( 'dbe' => $dbe, 'limit_a' => $start ) );
$this->ipsclass->DB->cache_exec_query();
$this->ipsclass->html .= "<script type='text/javascript'>
function checkall( )
{
var formobj = document.getElementById('theAdminForm');
var checkboxes = formobj.getElementsByTagName('input');
for ( var i = 0 ; i <= checkboxes.length ; i++ )
{
var e = checkboxes[i];
var docheck = formobj.checkme.checked;
if ( e && (e.type == 'checkbox') && (! e.disabled) && (e.id != 'checkme') && (e.name != 'type') )
{
if( docheck == false )
@@ -425,100 +433,100 @@ class ad_emaillogs
}
}
}
return false;
}
</script>";
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'remove' ),
2 => array( 'act' , 'emaillog' ),
3 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "<input type='checkbox' onclick='checkall();' id='checkme' />" , "5%" );
$this->ipsclass->adskin->td_header[] = array( "From Member" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Subject" , "30%" );
$this->ipsclass->adskin->td_header[] = array( "To Member" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Sent Time" , "25%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Logged Emails" );
$this->ipsclass->adskin->td_header[] = array( "<input type='checkbox' onclick='checkall();' id='checkme' />" , "5%" );
$this->ipsclass->adskin->td_header[] = array( "Îò" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Òåìà" , "30%" );
$this->ipsclass->adskin->td_header[] = array( "Êîìó" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Äàòà" , "25%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ñïèñîê îòïðàâëåííûõ ïèñåì" );
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$row['email_date'] = $this->ipsclass->admin->get_date( $row['email_date'], 'SHORT' );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
"<center><input type='checkbox' class='checkbox' name='id_{$row['email_id']}' value='1' /></center>",
"<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=list&type=fromid&id={$row['id']}' title='Show all from this member'><img src='{$this->ipsclass->skin_acp_url}/images/acp_search.gif' border='0' alt='..by id'></a>&nbsp;<b><a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?showuser={$row['id']}' title='Members profile (new window)' target='blank'>{$row['name']}</a></b>",
"<a href='javascript:pop_win(\"&{$this->ipsclass->form_code_js}&code=viewemail&id={$row['email_id']}\",\"Log\",400,400)' title='Read email'>{$row['email_subject']}</a>",
"<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=list&type=toid&id={$row['to_id']}' title='Show all sent to this member'><img src='{$this->ipsclass->skin_acp_url}/images/acp_search.gif' border='0' alt='..by id'></a>&nbsp;<a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?showuser={$row['to_id']}' title='Members profile (new window)' target='blank'>{$row['to_name']}</a>",
"<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=list&type=fromid&id={$row['id']}' title='Ïîêàçàòü âñå îòïðàâëåííûå ïèñüìà'><img src='{$this->ipsclass->skin_acp_url}/images/acp_search.gif' border='0' alt='..by id'></a>&nbsp;<b><a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?showuser={$row['id']}' title='Ïðîôèëü ïîëüçîâàòåëÿ (îòêðîåòñÿ â íîâîì îêíå)' target='blank'>{$row['name']}</a></b>",
"<a href='javascript:pop_win(\"&{$this->ipsclass->form_code_js}&code=viewemail&id={$row['email_id']}\",\"Log\",400,400)' title='Ïðî÷èòàòü ïèñüìî'>{$row['email_subject']}</a>",
"<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=list&type=toid&id={$row['to_id']}' title='Ïîêàçàòü âñå ïîëó÷åííûå ïèñüìà'><img src='{$this->ipsclass->skin_acp_url}/images/acp_search.gif' border='0' alt='..by id'></a>&nbsp;<a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?showuser={$row['to_id']}' title='Ïðîôèëü ïîëüçîâàòåëÿ (îòêðîåòñÿ â íîâîì îêíå)' target='blank'>{$row['to_name']}</a>",
"{$row['email_date']}",
) );
}
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Çàïèñåé íå íàéäåíî.</center>");
}
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('<div style="float:left;width:auto"><input type="submit" value="Remove Checked" class="realbutton" />&nbsp;<input type="checkbox" id="checkbox" name="type" value="all" />&nbsp;Remove all?</div><div align="right">'.$links.'</div></form>', 'left', 'tablesubheader');
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic('<div style="float:left;width:auto"><input type="submit" value="Óäàëèòü îòìå÷åííûå" class="realbutton" />&nbsp;<input type="checkbox" id="checkbox" name="type" value="all" />&nbsp;Óäàëèòü âñå?</div><div align="right">'.$links.'</div></form>', 'left', 'tablesubheader');
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'list' ),
2 => array( 'act' , 'emaillog' ),
3 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Email Logs" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê çàïèñåé" );
$form_array = array(
0 => array( 'subject' , 'Email Subject' ),
1 => array( 'content' , 'Email Body' ),
2 => array( 'email_from' , 'From Email Address' ),
3 => array( 'email_to' , 'To Email Address' ),
4 => array( 'name_from' , 'From Member Name'),
5 => array( 'name_to' , 'To Member Name' ),
0 => array( 'subject' , 'Òåìà ïèñüìà' ),
1 => array( 'content' , 'Ñîäåðæèìîå' ),
2 => array( 'email_from' , 'Îò (E-mail)' ),
3 => array( 'email_to' , 'Êîìó (E-mail)' ),
4 => array( 'name_from' , 'Îò (èìÿ ïîëüçîâàòåëÿ)'),
5 => array( 'name_to' , 'Êîìó (èìÿ ïîëüçîâàòåëÿ)' ),
);
$type_array = array(
0 => array( 'exact' , 'is exactly' ),
1 => array( 'loose' , 'contains' ),
0 => array( 'exact' , 'ñîâïàäåíèå' ),
1 => array( 'loose' , 'ñîäåðæèò' ),
);
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search where</b> &nbsp;"
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Ïîèñê â</b> &nbsp;"
. $this->ipsclass->adskin->form_dropdown( "type", $form_array) ." "
. $this->ipsclass->adskin->form_dropdown( "match", $type_array) ." "
. $this->ipsclass->adskin->form_input( "string"),
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èñêàòü");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+10
View File
@@ -0,0 +1,10 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<meta name="author" content="Êîìïàíèÿ IBResource è Invision Power Services Inc.">
<title>Îøèáêà ðóññêîé âåðñèè Invision Power Board</title>
</head><body>
<h1>Îøèáêà <a href="http://www.ibresource.ru/">ðóññêîé âåðñèè Invision Power Board</a></h1>
<font size="4">Âû ïîïàëè íà íåñóùåñòâóþùóþ ñòðàíèöó!<br>Ïîæàëóéñòà íàæìèòå íà êíîïî÷êó &laquo;<b>Íàçàä</b>&raquo; â&nbsp;âàøåì áðàóçåðå äëÿ âîçâðàùåíèÿ íà ïðåäûäóùóþ ñòðàíèöó.</font>
</body>
</html>
File diff suppressed because it is too large. Load diff
+132 -124
View File
@@ -1,125 +1,133 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > IPS Remote Call thingy
| > Module written by Matt Mecham
| > Date started: 17th October 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Tue 25th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class ad_ips {
var $base_url;
var $colours = array();
var $url = "http://www.invisionboard.com/acp/";
var $version = "1.1";
function auto_run()
{
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'news':
$this->news();
break;
case 'updates':
$this->updates();
break;
case 'docs':
$this->docs();
break;
case 'support':
$this->support();
break;
case 'host':
$this->host();
break;
case 'purchase':
$this->purchase();
break;
//-----------------------------------------
default:
exit();
break;
}
}
function news()
{
@header("Location: ".$this->url."?news");
exit();
}
function updates()
{
//@header("Location: ".$this->url."?updates&version=".$this->version);
@header("Location: ".$this->url."?updates");
exit();
}
function docs()
{
@header("Location: http://www.invisionpower.com/documentation/showdoc.php");
exit();
}
function support()
{
@header("Location: ".$this->url."?support");
exit();
}
function host()
{
@header("Location: ".$this->url."?host");
exit();
}
function purchase()
{
@header("Location: ".$this->url."?purchase");
exit();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > IPS Remote Call thingy
| > Module written by Matt Mecham
| > Date started: 17th October 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Tue 25th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class ad_ips {
var $base_url;
var $colours = array();
var $url = "http://www.invisionboard.com/acp/";
var $version = "1.1";
function auto_run()
{
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'news':
$this->news();
break;
case 'updates':
$this->updates();
break;
case 'docs':
$this->docs();
break;
case 'support':
$this->support();
break;
case 'host':
$this->host();
break;
case 'purchase':
$this->purchase();
break;
//-----------------------------------------
default:
exit();
break;
}
}
function news()
{
@header("Location: ".$this->url."?news");
exit();
}
function updates()
{
//@header("Location: ".$this->url."?updates&version=".$this->version);
@header("Location: ".$this->url."?updates");
exit();
}
function docs()
{
@header("Location: http://www.invisionpower.com/documentation/showdoc.php");
exit();
}
function support()
{
@header("Location: ".$this->url."?support");
exit();
}
function host()
{
@header("Location: ".$this->url."?host");
exit();
}
function purchase()
{
@header("Location: ".$this->url."?purchase");
exit();
}
}
?>
File diff suppressed because it is too large. Load diff
+366 -358
View File
@@ -1,359 +1,367 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Help Control functions
| > Module written by Matt Mecham
| > Date started: 2nd April 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Mon 24th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class ad_login
{
# Global
var $ipsclass;
# HTML
var $html;
function auto_run()
{
//-----------------------------------------
// What to do?
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'login':
$this->login_form();
break;
case 'login-out':
// Do we have a session?
$sess_cookie = $this->ipsclass->my_getcookie( "ipb_admin_session_id" );
if( $sess_cookie )
{
$this->ipsclass->DB->do_delete( "admin_sessions", "session_id='{$sess_cookie}'" );
}
$this->ipsclass->my_setcookie("ipb_admin_session_id", "-1", -1);
$this->login_form();
break;
case 'login-complete':
$this->login_complete();
break;
default:
$this->login_form();
break;
}
}
/*-------------------------------------------------------------------------*/
// Complete the log in
/*-------------------------------------------------------------------------*/
function login_complete()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$username = str_replace( '|', '&#124;', $this->ipsclass->input['username'] );
//-----------------------------------------
// Check
//-----------------------------------------
if ( empty($this->ipsclass->input['username']) )
{
$this->login_form("You must enter a username before proceeding");
}
if ( empty($this->ipsclass->input['password']) )
{
$this->login_form("You must enter a password before proceeding");
}
//-----------------------------------------
// Load handler...
//-----------------------------------------
require_once( ROOT_PATH.'sources/handlers/han_login.php' );
$this->han_login = new han_login();
$this->han_login->ipsclass =& $this->ipsclass;
$this->han_login->is_admin_auth = 1;
$this->han_login->init();
//-----------------------------------------
// Check auth
//-----------------------------------------
$this->han_login->login_authenticate( $username, $this->ipsclass->input['password'] );
//-----------------------------------------
// Check return code...
//-----------------------------------------
$mem = $this->han_login->member;
if ( ( ! $mem['id'] ) or ( $this->han_login->return_code == 'NO_USER' ) )
{
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
$this->login_form( "Username or password incorrect");
}
if ( $this->han_login->return_code != 'SUCCESS' )
{
if ( $this->han_login->return_code == 'ACCOUNT_LOCKED' )
{
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
$this->login_form( "Your account has been locked due to the number of failed login attempts made" );
}
else
{
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
$this->login_form( "Username or password incorrect" );
}
}
//-----------------------------------------
// Get perms
//-----------------------------------------
$this->ipsclass->sess->member = $mem;
$this->ipsclass->sess->build_group_permissions();
$mem = $this->ipsclass->sess->member;
if ( $mem['g_access_cp'] != 1 )
{
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
$this->login_form("You do not have access to the administrative CP");
}
else
{
//-----------------------------------------
// Fix up query string...
//-----------------------------------------
$extra_query = "";
if ( $_POST['qstring'] )
{
$extra_query = urldecode( $_POST['qstring'] );
$extra_query = str_replace( "{$this->ipsclass->vars['board_url']}" , "" , $extra_query );
$extra_query = preg_replace( "!/?admin\.{$this->ipsclass->vars['php_ext']}!i", "" , $extra_query );
$extra_query = preg_replace( "!^\?!" , "" , $extra_query );
$extra_query = preg_replace( "!adsess=(\w){32}!" , "" , $extra_query );
$extra_query = preg_replace( "!s=(\w){32}!" , "" , $extra_query );
$extra_query = preg_replace( "!act=login!" , "" , $extra_query );
$extra_query = preg_replace( "!code=template-edit-bit!" , "" , $extra_query );
$extra_query = preg_replace( "!code=template-bits-list!" , "" , $extra_query );
$extra_query = preg_replace( "!bitname=(\w)!" , "" , $extra_query );
$extra_query = $this->ipsclass->parse_clean_value( $extra_query );
}
//-----------------------------------------
// Delete old sessions..
//-----------------------------------------
$this->ipsclass->DB->do_delete( 'admin_sessions', 'session_member_id='.$mem['id'] );
//-----------------------------------------
// All is good, rejoice as we set a
// session for this user
//-----------------------------------------
$sess_id = md5( uniqid( microtime() ) );
$this->ipsclass->DB->do_insert( 'admin_sessions', array (
'session_id' => $sess_id,
'session_ip_address' => $this->ipsclass->ip_address,
'session_member_name' => $mem['name'],
'session_member_id' => $mem['id'],
'session_member_login_key' => md5( $mem['joined'] . $mem['ip_address'] ),
'session_location' => 'index',
'session_log_in_time' => time(),
'session_running_time' => time(),
) );
$this->ipsclass->input['adsess'] = $sess_id;
//-----------------------------------------
// Set a session ID cookie
//-----------------------------------------
$this->ipsclass->my_setcookie("ipb_admin_session_id", $sess_id, 0);
$this->write_to_log( $this->ipsclass->input['username'], 'ok' );
//-----------------------------------------
// Lets add some data in here for the access logs...
//-----------------------------------------
$extra_query .= "&member_id=".$mem['id'].'&password=ok';
//-----------------------------------------
// Redirect...
//-----------------------------------------
$this->ipsclass->admin->redirect( $this->ipsclass->vars['board_url'].'/'.IPB_ACP_DIRECTORY."/index.".$this->ipsclass->vars['php_ext']."?adsess=".$this->ipsclass->input['adsess']."&".$extra_query, 'Log In Successful' );
exit();
}
}
/*-------------------------------------------------------------------------*/
// Write to the log in table
/*-------------------------------------------------------------------------*/
/**
* Write to the admin log in loggy ma log
*
* @param string Username
* @param string ok/fail flag
*/
function write_to_log( $username='', $flag='fail' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$username = $username ? $username : $this->ipsclass->input['username'];
$flag = ( $flag == 'ok' ) ? 1 : 0;
$admin_post_details = array();
//-----------------------------------------
// Generate POST / GET details
//-----------------------------------------
foreach( $_GET as $k => $v )
{
$admin_post_details['get'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v );
}
foreach( $_POST as $k => $v )
{
if ( $k == 'password' )
{
$v = str_repeat( '*', strlen( $v ) - 1 ) . substr( $v, -1, 1 );
}
$admin_post_details['post'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v );
}
//-----------------------------------------
// Write to disk...
//-----------------------------------------
$this->ipsclass->DB->do_insert( 'admin_login_logs', array( 'admin_ip_address' => $this->ipsclass->ip_address,
'admin_username' => $username,
'admin_time' => time(),
'admin_success' => $flag,
'admin_post_details' => serialize($admin_post_details) ) );
}
/*-------------------------------------------------------------------------*/
// Show the log in form
/*-------------------------------------------------------------------------*/
function login_form($message='')
{
//-----------------------------------------
// INIT
//-----------------------------------------
$message = $message ? $message : (isset($this->ipsclass->admin_session['_session_message']) ? $this->ipsclass->admin_session['_session_message'] : '');
//-------------------------------------------------------
// Remove all out of date sessions, like a good boy. Woof.
//-------------------------------------------------------
$cut_off_stamp = time() - 60*60*2;
$this->ipsclass->DB->do_delete( 'admin_sessions', "session_log_in_time < {$cut_off_stamp}" );
//------------------------------------------------------
// AUTO Log in ma-thingy?
//------------------------------------------------------
$name = "";
$extra = "";
$mid = intval( $this->ipsclass->my_getcookie('member_id') );
if ( $mid > 0 )
{
$this->ipsclass->DB->build_query( array( 'select' => 'm.id, m.name, m.mgroup, g.g_access_cp',
'from' => array( 'members' => 'm' ),
'where' => "m.id={$mid} AND g.g_access_cp=1",
'add_join' => array( 1 => array( 'type' => 'left',
'from' => array( 'groups' => 'g' ),
'where' => 'g.g_id=m.mgroup' )
)
) );
$this->ipsclass->DB->exec_query();
if ( $r = $this->ipsclass->DB->fetch_row() )
{
$name = $this->ipsclass->vars['ipbli_usertype'] == 'username' ? $r['name'] : $r['email'];
$extra = 'onload="document.theAdminForm.password.focus();"';
}
}
//------------------------------------------------------
// SHW DA FRM (txt msg stylee)
//------------------------------------------------------
$qs = str_replace( '&amp;' , '&', $this->ipsclass->parse_clean_value( urldecode( $this->ipsclass->my_getenv('QUERY_STRING') ) ) );
$qs = str_replace( 'adsess=' , 'old_adsess=', $qs );
$qs = str_replace( 'act=menu', '', $qs );
$qs = str_replace( '&lt;' , '', $qs );
$qs = str_replace( '&gt;' , '', $qs );
$qs = str_replace( '(' , '', $qs );
$qs = str_replace( ')' , '', $qs );
$this->ipsclass->html_title = "IPB: ACP: Log in";
$this->ipsclass->html = str_replace( '<%CONTENT%>', $this->ipsclass->skin_acp_global->log_in_form( $qs, $message, $name ), $this->ipsclass->skin_acp_global->global_main_wrapper() );
$this->ipsclass->html = str_replace( '<%TITLE%>' , $this->ipsclass->html_title, $this->ipsclass->html );
$this->ipsclass->html = str_replace( "<body", "<body style='background-image:url({$this->ipsclass->skin_acp_url}/images/blank.gif)'", $this->ipsclass->html );
@header("Content-type: text/html");
print $this->ipsclass->html;
exit();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Help Control functions
| > Module written by Matt Mecham
| > Date started: 2nd April 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Mon 24th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class ad_login
{
# Global
var $ipsclass;
# HTML
var $html;
function auto_run()
{
//-----------------------------------------
// What to do?
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'login':
$this->login_form();
break;
case 'login-out':
// Do we have a session?
$sess_cookie = $this->ipsclass->my_getcookie( "ipb_admin_session_id" );
if( $sess_cookie )
{
$this->ipsclass->DB->do_delete( "admin_sessions", "session_id='{$sess_cookie}'" );
}
$this->ipsclass->my_setcookie("ipb_admin_session_id", "-1", -1);
$this->login_form();
break;
case 'login-complete':
$this->login_complete();
break;
default:
$this->login_form();
break;
}
}
/*-------------------------------------------------------------------------*/
// Complete the log in
/*-------------------------------------------------------------------------*/
function login_complete()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$username = str_replace( '|', '&#124;', $this->ipsclass->input['username'] );
//-----------------------------------------
// Check
//-----------------------------------------
if ( empty($this->ipsclass->input['username']) )
{
$this->login_form("Âû äîëæíû ââåñòè èìÿ ïîëüçîâàòåëÿ ïåðåä òåì, êàê ïðîäîëæèòü");
}
if ( empty($this->ipsclass->input['password']) )
{
$this->login_form("Âû äîëæíû ââåñòè ïàðîëü ïåðåä òåì, êàê ïðîäîëæèòü");
}
//-----------------------------------------
// Load handler...
//-----------------------------------------
require_once( ROOT_PATH.'sources/handlers/han_login.php' );
$this->han_login = new han_login();
$this->han_login->ipsclass =& $this->ipsclass;
$this->han_login->is_admin_auth = 1;
$this->han_login->init();
//-----------------------------------------
// Check auth
//-----------------------------------------
$this->han_login->login_authenticate( $username, $this->ipsclass->input['password'] );
//-----------------------------------------
// Check return code...
//-----------------------------------------
$mem = $this->han_login->member;
if ( ( ! $mem['id'] ) or ( $this->han_login->return_code == 'NO_USER' ) )
{
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
$this->login_form( "Èìÿ ïîëüçîâàòåëÿ èëè ïàðîëü íå âåðíû");
}
if ( $this->han_login->return_code != 'SUCCESS' )
{
if ( $this->han_login->return_code == 'ACCOUNT_LOCKED' )
{
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
$this->login_form( "Âàøà ó÷åòíàÿ çàïèñü çàáëîêèðîâàíà" );
}
else
{
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
$this->login_form( "Èìÿ ïîëüçîâàòåëÿ èëè ïàðîëü íå âåðíû" );
}
}
//-----------------------------------------
// Get perms
//-----------------------------------------
$this->ipsclass->sess->member = $mem;
$this->ipsclass->sess->build_group_permissions();
$mem = $this->ipsclass->sess->member;
if ( $mem['g_access_cp'] != 1 )
{
$this->write_to_log( $this->ipsclass->input['username'], 'fail' );
$this->login_form("Ó âàñ íåò ïðàâ äîñòóïà â ÀÖ");
}
else
{
//-----------------------------------------
// Fix up query string...
//-----------------------------------------
$extra_query = "";
if ( $_POST['qstring'] )
{
$extra_query = urldecode( $_POST['qstring'] );
$extra_query = str_replace( "{$this->ipsclass->vars['board_url']}" , "" , $extra_query );
$extra_query = preg_replace( "!/?admin\.{$this->ipsclass->vars['php_ext']}!i", "" , $extra_query );
$extra_query = preg_replace( "!^\?!" , "" , $extra_query );
$extra_query = preg_replace( "!adsess=(\w){32}!" , "" , $extra_query );
$extra_query = preg_replace( "!s=(\w){32}!" , "" , $extra_query );
$extra_query = preg_replace( "!act=login!" , "" , $extra_query );
$extra_query = preg_replace( "!code=template-edit-bit!" , "" , $extra_query );
$extra_query = preg_replace( "!code=template-bits-list!" , "" , $extra_query );
$extra_query = preg_replace( "!bitname=(\w)!" , "" , $extra_query );
$extra_query = $this->ipsclass->parse_clean_value( $extra_query );
}
//-----------------------------------------
// Delete old sessions..
//-----------------------------------------
$this->ipsclass->DB->do_delete( 'admin_sessions', 'session_member_id='.$mem['id'] );
//-----------------------------------------
// All is good, rejoice as we set a
// session for this user
//-----------------------------------------
$sess_id = md5( uniqid( microtime() ) );
$this->ipsclass->DB->do_insert( 'admin_sessions', array (
'session_id' => $sess_id,
'session_ip_address' => $this->ipsclass->ip_address,
'session_member_name' => $mem['name'],
'session_member_id' => $mem['id'],
'session_member_login_key' => md5( $mem['joined'] . $mem['ip_address'] ),
'session_location' => 'index',
'session_log_in_time' => time(),
'session_running_time' => time(),
) );
$this->ipsclass->input['adsess'] = $sess_id;
//-----------------------------------------
// Set a session ID cookie
//-----------------------------------------
$this->ipsclass->my_setcookie("ipb_admin_session_id", $sess_id, 0);
$this->write_to_log( $this->ipsclass->input['username'], 'ok' );
//-----------------------------------------
// Lets add some data in here for the access logs...
//-----------------------------------------
$extra_query .= "&member_id=".$mem['id'].'&password=ok';
//-----------------------------------------
// Redirect...
//-----------------------------------------
$this->ipsclass->admin->redirect( $this->ipsclass->vars['board_url'].'/'.IPB_ACP_DIRECTORY."/index.".$this->ipsclass->vars['php_ext']."?adsess=".$this->ipsclass->input['adsess']."&".$extra_query, 'Âõîä îñóùåñòâëåí' );
exit();
}
}
/*-------------------------------------------------------------------------*/
// Write to the log in table
/*-------------------------------------------------------------------------*/
/**
* Write to the admin log in loggy ma log
*
* @param string Username
* @param string ok/fail flag
*/
function write_to_log( $username='', $flag='fail' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$username = $username ? $username : $this->ipsclass->input['username'];
$flag = ( $flag == 'ok' ) ? 1 : 0;
$admin_post_details = array();
//-----------------------------------------
// Generate POST / GET details
//-----------------------------------------
foreach( $_GET as $k => $v )
{
$admin_post_details['get'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v );
}
foreach( $_POST as $k => $v )
{
if ( $k == 'password' )
{
$v = str_repeat( '*', strlen( $v ) - 1 ) . substr( $v, -1, 1 );
}
$admin_post_details['post'][ htmlspecialchars( $k ) ] = htmlspecialchars( $v );
}
//-----------------------------------------
// Write to disk...
//-----------------------------------------
$this->ipsclass->DB->do_insert( 'admin_login_logs', array( 'admin_ip_address' => $this->ipsclass->ip_address,
'admin_username' => $username,
'admin_time' => time(),
'admin_success' => $flag,
'admin_post_details' => serialize($admin_post_details) ) );
}
/*-------------------------------------------------------------------------*/
// Show the log in form
/*-------------------------------------------------------------------------*/
function login_form($message='')
{
//-----------------------------------------
// INIT
//-----------------------------------------
$message = $message ? $message : (isset($this->ipsclass->admin_session['_session_message']) ? $this->ipsclass->admin_session['_session_message'] : '');
//-------------------------------------------------------
// Remove all out of date sessions, like a good boy. Woof.
//-------------------------------------------------------
$cut_off_stamp = time() - 60*60*2;
$this->ipsclass->DB->do_delete( 'admin_sessions', "session_log_in_time < {$cut_off_stamp}" );
//------------------------------------------------------
// AUTO Log in ma-thingy?
//------------------------------------------------------
$name = "";
$extra = "";
$mid = intval( $this->ipsclass->my_getcookie('member_id') );
if ( $mid > 0 )
{
$this->ipsclass->DB->build_query( array( 'select' => 'm.id, m.name, m.mgroup, g.g_access_cp',
'from' => array( 'members' => 'm' ),
'where' => "m.id={$mid} AND g.g_access_cp=1",
'add_join' => array( 1 => array( 'type' => 'left',
'from' => array( 'groups' => 'g' ),
'where' => 'g.g_id=m.mgroup' )
)
) );
$this->ipsclass->DB->exec_query();
if ( $r = $this->ipsclass->DB->fetch_row() )
{
$name = $this->ipsclass->vars['ipbli_usertype'] == 'username' ? $r['name'] : $r['email'];
$extra = 'onload="document.theAdminForm.password.focus();"';
}
}
//------------------------------------------------------
// SHW DA FRM (txt msg stylee)
//------------------------------------------------------
$qs = str_replace( '&amp;' , '&', $this->ipsclass->parse_clean_value( urldecode( $this->ipsclass->my_getenv('QUERY_STRING') ) ) );
$qs = str_replace( 'adsess=' , 'old_adsess=', $qs );
$qs = str_replace( 'act=menu', '', $qs );
$qs = str_replace( '&lt;' , '', $qs );
$qs = str_replace( '&gt;' , '', $qs );
$qs = str_replace( '(' , '', $qs );
$qs = str_replace( ')' , '', $qs );
$this->ipsclass->html_title = "IPB: Àäìèíöåíòð: Âõîä";
$this->ipsclass->html = str_replace( '<%CONTENT%>', $this->ipsclass->skin_acp_global->log_in_form( $qs, $message, $name ), $this->ipsclass->skin_acp_global->global_main_wrapper() );
$this->ipsclass->html = str_replace( '<%TITLE%>' , $this->ipsclass->html_title, $this->ipsclass->html );
$this->ipsclass->html = str_replace( "<body", "<body style='background-image:url({$this->ipsclass->skin_acp_url}/images/blank.gif)'", $this->ipsclass->html );
@header("Content-type: text/html");
print $this->ipsclass->html;
exit();
}
}
?>
+207 -195
View File
@@ -2,17 +2,25 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-10-06 10:09:22 +0100 (Fri, 06 Oct 2006) $
| > $Revision: 611 $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-12-15 04:58:55 -0500 (Fri, 15 Dec 2006) $
| > $Revision: 794 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -24,7 +32,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -32,26 +40,26 @@ class ad_login_auth
{
# Globals
var $ipsclass;
var $perm_main = 'tools';
var $perm_child = 'loginauth';
/*-------------------------------------------------------------------------*/
// Main handler
/*-------------------------------------------------------------------------*/
function auto_run()
function auto_run()
{
$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');
$this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "Log In Manager" );
$this->ipsclass->admin->nav[] = array( "{$this->ipsclass->form_code}", "Óïðàâëåíèå àâòîðèçàöèÿìè" );
switch($this->ipsclass->input['code'])
{
case 'manage':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->login_list();
break;
case 'login_add':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );
$this->login_form('add');
@@ -68,13 +76,13 @@ class ad_login_auth
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->login_save('edit');
break;
case 'login_diagnostics':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':diagnostics' );
$this->login_diagnostics();
break;
case 'components_export':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' );
$this->components_export('single');
@@ -83,66 +91,66 @@ class ad_login_auth
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':import' );
$this->components_import();
break;
case 'component_move':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->components_move();
break;
case 'master_xml_export':
$this->master_xml_export();
break;
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->login_list();
break;
}
}
/*-------------------------------------------------------------------------*/
// Export Master XML
/*-------------------------------------------------------------------------*/
function master_xml_export()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$entry = array();
//-----------------------------------------
// Get XML class
//-----------------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
$xml->doc_type = $this->ipsclass->vars['gb_char_set'];
$xml->xml_set_root( 'export', array( 'exported' => time() ) );
//-----------------------------------------
// Set group
//-----------------------------------------
$xml->xml_add_group( 'group' );
//-----------------------------------------
// Get templates...
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'login_methods' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$content = array();
if ( $r['login_folder_name'] == 'internal' )
{
$r['login_enabled'] = 1;
@@ -159,85 +167,85 @@ class ad_login_auth
{
$r['login_enabled'] = 0;
}
//-----------------------------------------
// Sort the fields...
//-----------------------------------------
foreach( $r as $k => $v )
{
$content[] = $xml->xml_build_simple_tag( $k, $v );
}
$entry[] = $xml->xml_build_entry( 'row', $content );
}
$xml->xml_add_entry_to_group( 'group', $entry );
$xml->xml_format_document();
$doc = $xml->xml_document;
//-----------------------------------------
// Print to browser
//-----------------------------------------
$this->ipsclass->admin->show_download( $doc, 'loginauth.xml', '', 0 );
}
/*-------------------------------------------------------------------------*/
// Components Rebuild Cache
/*-------------------------------------------------------------------------*/
function components_rebuildcache()
{
$this->ipsclass->cache['components'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id,com_enabled,com_section,com_filename,com_url_uri,com_url_title,com_position', 'from' => 'components', 'order' => 'com_position ASC' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['components'][] = $r;
}
$this->ipsclass->update_cache( array( 'name' => 'components', 'array' => 1, 'deletefirst' => 1 ) );
}
/*-------------------------------------------------------------------------*/
// Components Import
/*-------------------------------------------------------------------------*/
function components_import()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$updated = 0;
$inserted = 0;
$cur_components = array();
if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") )
{
//-----------------------------------------
// check and load from server
//-----------------------------------------
if ( ! $this->ipsclass->input['file_location'] )
{
$this->ipsclass->main_msg = "No upload file was found and no filename was specified.";
$this->ipsclass->main_msg = "Çàãðóæàåìûé ôàéë íå íàéäåí!";
$this->components_list();
return;
}
if ( ! file_exists( ROOT_PATH . $this->ipsclass->input['file_location'] ) )
{
$this->ipsclass->main_msg = "Could not find the file to open at: " . ROOT_PATH . $this->ipsclass->input['file_location'];
$this->ipsclass->main_msg = "Íåëüçÿ íàéòè ôàéë äëÿ îòêðûòèÿ: " . ROOT_PATH . $this->ipsclass->input['file_location'];
$this->components_list();
return;
}
if ( preg_match( "#\.gz$#", $this->ipsclass->input['file_location'] ) )
{
if ( $FH = @gzopen( ROOT_PATH.$this->ipsclass->input['file_location'], 'rb' ) )
@@ -246,7 +254,7 @@ class ad_login_auth
{
$content .= @gzread( $FH, 1024 );
}
@gzclose( $FH );
}
}
@@ -264,84 +272,86 @@ class ad_login_auth
//-----------------------------------------
// Get uploaded schtuff
//-----------------------------------------
$tmp_name = $_FILES['FILE_UPLOAD']['name'];
$tmp_name = preg_replace( "#\.gz$#", "", $tmp_name );
$content = $this->ipsclass->admin->import_xml( $tmp_name );
}
if( !$content )
{
$this->ipsclass->admin->error( "Import file was not in the correct format or was corrupt" );
$this->ipsclass->admin->error( "Èìïîðòèðîâàíèå íå îñóùåñòâëåíî, òàê êàê ôàéë èìååò íåâåðíûé ôîðìàò èëè â íåì íåò çàïèñåé." );
}
//-----------------------------------------
// Get current components.
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => 'com_id, com_section',
'from' => 'components',
'order' => 'com_id' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$cur_components[ $r['com_section'] ] = $r['com_id'];
}
//-----------------------------------------
// Get xml mah-do-dah
//-----------------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
$xml->lite_parser = 1;
//-----------------------------------------
// Unpack the datafile
//-----------------------------------------
$xml->xml_parse_document( $content );
//-----------------------------------------
// pArse
//-----------------------------------------
$fields = array( 'com_title' , 'com_description', 'com_author' , 'com_url', 'com_version', 'com_menu_data',
'com_enabled' , 'com_safemode' , 'com_section', 'com_filename' );
if ( ! is_array( $xml->xml_array['componentexport']['componentgroup']['component'][0] ) )
{
//-----------------------------------------
// Ensure [0] is populated
//-----------------------------------------
$tmp = $xml->xml_array['componentexport']['componentgroup']['component'];
unset($xml->xml_array['componentexport']['componentgroup']['component']);
$xml->xml_array['componentexport']['componentgroup']['component'][0] = $tmp;
}
foreach( $xml->xml_array['componentexport']['componentgroup']['component'] as $entry )
{
$newrow = array();
foreach( $fields as $f )
{
$newrow[$f] = $entry[ $f ]['VALUE'];
}
$this->ipsclass->DB->force_data_type = array( 'com_version' => 'string' );
if ( $cur_components[ $entry['com_section']['VALUE'] ] )
{
//-----------------------------------------
// Update
//-----------------------------------------
$this->ipsclass->DB->do_update( 'components', $newrow, 'com_id='.$cur_components[ $entry['com_section']['VALUE'] ] );
$updated++;
}
@@ -350,58 +360,58 @@ class ad_login_auth
//-----------------------------------------
// INSERT
//-----------------------------------------
$newrow['com_date_added'] = time();
$this->ipsclass->DB->do_insert( 'components', $newrow );
$inserted++;
}
}
//-----------------------------------------
// Done...
//-----------------------------------------
$this->components_rebuildcache();
$this->ipsclass->main_msg = "$updated components updated $inserted components inserted";
$this->ipsclass->main_msg = "$updated êîìïîíåíòîâ îáíîâëåíî è $inserted âñòàâëåíî.";
$this->components_list();
}
/*-------------------------------------------------------------------------*/
// Components Export
/*-------------------------------------------------------------------------*/
function components_export($type='single')
{
//--------------------------------------------
// INIT
//--------------------------------------------
$com_id = intval($this->ipsclass->input['com_id']);
$rows = array();
//--------------------------------------------
// Checks...
//--------------------------------------------
if ( $type == 'single' )
{
if ( ! $com_id )
{
$this->ipsclass->main_msg = "No ID was passed, please try again";
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî ";
$this->components_list();
return;
}
//--------------------------------------------
// Get DB row(s)
//--------------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components', 'where' => 'com_id='.$com_id ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$rows[] = $r;
@@ -412,134 +422,136 @@ class ad_login_auth
//--------------------------------------------
// Get DB row(s)
//--------------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'components' ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$rows[] = $r;
}
}
//-------------------------------
// Get XML class
//-------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
$xml->xml_set_root( 'componentexport', array( 'exported' => time() ) );
//-------------------------------
// Add component
//-------------------------------
$xml->xml_add_group( 'componentgroup' );
$entry = array();
foreach( $rows as $r )
{
$content = array();
foreach( $r as $k => $v )
{
$content[] = $xml->xml_build_simple_tag( $k, $v );
}
$entry[] = $xml->xml_build_entry( 'component', $content );
}
$xml->xml_add_entry_to_group( 'componentgroup', $entry );
$xml->xml_format_document();
$doc = $xml->xml_document;
//-------------------------------
// Print to browser
//-------------------------------
$this->ipsclass->admin->show_download( $doc, 'ipd_components.xml', '', 0 );
}
/*-------------------------------------------------------------------------*/
// Log in: Diagnostics
/*-------------------------------------------------------------------------*/
function login_diagnostics()
{
//-----------------------------------------
// Init Vars
//-----------------------------------------
$login_id = intval($this->ipsclass->input['login_id']);
//-----------------------------------------
// Check (please?)
//-----------------------------------------
$login = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id='.$login_id ) );
if ( ! $login['login_id'] )
{
$this->ipsclass->main_msg = "No ID was passed, please try again.";
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî.";
$this->login_list();
return;
}
//-----------------------------------------
// Generate file
//-----------------------------------------
$mypath = ROOT_PATH.'sources/loginauth/'.$login['login_folder_name'];
//-----------------------------------------
// Generate General Info
//-----------------------------------------
$login['_enabled_img'] = $login['login_enabled'] ? 'aff_tick.png' : 'aff_cross.png';
$login['_installed_img'] = $login['login_installed'] ? 'aff_tick.png' : 'aff_cross.png';
$login['_has_settings'] = $login['login_settings'] ? 'aff_tick.png' : 'aff_cross.png';
//-----------------------------------------
// File based info
//-----------------------------------------
$login['_file_auth_exists'] = @file_exists( $mypath.'/auth.php' ) ? 'aff_tick.png' : 'aff_cross.png';
$login['_file_conf_exists'] = @file_exists( $mypath.'/conf.php' ) ? 'aff_tick.png' : 'aff_cross.png';
$login['_file_acp_exists'] = @file_exists( $mypath.'/acp.php' ) ? 'aff_tick.png' : 'aff_cross.png';
$login['_file_conf_write'] = @file_exists( $mypath.'/conf.php' ) ? 'aff_tick.png' : 'aff_cross.png';
$this->ipsclass->html .= $this->html->login_diagnostics( $login );
$this->ipsclass->html_help_title = "Log In Manager";
$this->ipsclass->html_help_msg = "This section will allow you to manage your log in authentication methods.";
$this->ipsclass->html_help_title = "Óïðàâëåíèå àâòîðèçàöèåé";
$this->ipsclass->html_help_msg = "Ýòà ñåêöèÿ ïîçâîëèò âàì óïðàâëÿòü èäåíòèôèêàöèîííûìè ìåòîäàìè äëÿ âõîäà.";
$this->ipsclass->admin->output();
}
/*-------------------------------------------------------------------------*/
// Components Save
/*-------------------------------------------------------------------------*/
function login_save($type='add')
{
//--------------------------------------------
// INIT
//--------------------------------------------
$login_id = intval($this->ipsclass->input['login_id']);
$login_title = trim( $this->ipsclass->input['login_title'] );
$login_description = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_UNhtmlspecialchars($_POST['login_description'])) );
$login_folder_name = trim( $this->ipsclass->input['login_folder_name'] );
$login_maintain_url = trim( $this->ipsclass->input['login_maintain_url'] );
$login_register_url = trim( $this->ipsclass->input['login_register_url'] );
$login_login_url = trim( $this->ipsclass->input['login_login_url'] );
$login_logout_url = trim( $this->ipsclass->input['login_logout_url'] );
$login_alt_login_html = trim( $this->ipsclass->txt_stripslashes( $this->ipsclass->txt_UNhtmlspecialchars($_POST['login_alt_login_html'])) );
$login_type = trim( $this->ipsclass->input['login_type'] );
$login_enabled = intval($this->ipsclass->input['login_enabled']);
@@ -548,42 +560,42 @@ class ad_login_auth
$login_installed = intval($this->ipsclass->input['login_installed']);
$login_safemode = intval($this->ipsclass->input['login_safemode']);
$login_user_id = trim($this->ipsclass->input['login_user_id']);
//--------------------------------------------
// Checks...
//--------------------------------------------
if ( $type == 'edit' )
{
if ( ! $login_id )
{
$this->ipsclass->main_msg = "No ID was passed, please try again";
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî ";
$this->login_list();
return;
}
//--------------------------------------------
// Enabled this one?
//--------------------------------------------
if ( $login_enabled )
{
$this->ipsclass->DB->do_update( 'login_methods', array( 'login_enabled' => 0 ) );
}
}
if ( ! $login_title OR ! $login_folder_name OR ! $login_folder_name )
{
$this->ipsclass->main_msg = "You must complete the entire form.";
$this->ipsclass->main_msg = "Âû äîëæíû çàïîëíèòü âñå ïîëÿ";
$this->login_form( $type );
return;
}
//--------------------------------------------
// Save...
//--------------------------------------------
$array = array( 'login_title' => $login_title,
'login_description' => $login_description,
'login_folder_name' => $login_folder_name,
@@ -599,101 +611,101 @@ class ad_login_auth
'login_allow_create' => 1,
'login_user_id' => $login_user_id,
);
//--------------------------------------------
// In DEV?
//--------------------------------------------
if ( IN_DEV )
{
$array['login_installed'] = $login_installed;
$array['login_safemode'] = $login_safemode;
}
//--------------------------------------------
// Nike.. do it
//--------------------------------------------
if ( $type == 'add' )
{
$array['login_date'] = time();
$this->ipsclass->DB->do_insert( 'login_methods', $array );
$this->ipsclass->main_msg = 'New Log In Method Added';
$this->ipsclass->main_msg = 'Íîâûé ìåòîä âõîäà áûë äîáàâëåí';
}
else
{
$this->ipsclass->DB->do_update( 'login_methods', $array, 'login_id='.$login_id );
$this->ipsclass->main_msg = 'Log In Method Edited';
$this->ipsclass->main_msg = 'Íîâûé ìåòîä âõîäà áûë èçìåíåí';
}
//-----------------------------------------
// Rebuild cache
//-----------------------------------------
require_once( ROOT_PATH.'sources/action_admin/settings.php' );
$adsettings = new ad_settings();
$adsettings->ipsclass =& $this->ipsclass;
$this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => $login_folder_name ), "conf_key='ipbli_key'" );
$this->ipsclass->DB->do_update( 'conf_settings', array( 'conf_value' => $login_user_id ), "conf_key='ipbli_usertype'" );
$adsettings->setting_rebuildcache();
//-----------------------------------------
// Return, at once.
//-----------------------------------------
$this->login_list();
}
/*-------------------------------------------------------------------------*/
// Log in: Form
/*-------------------------------------------------------------------------*/
function login_form( $type='add' )
{
//-----------------------------------------
// Init Vars
//-----------------------------------------
$login_id = intval($this->ipsclass->input['login_id']);
$login_dd = array( 0 => array( 'passthrough', 'Pass-Through' ), 1 => array( 'onfail', 'On-Fail' ) );
$login_unt = array( 0 => array( 'username', 'User Name' ), 1 => array( 'email', 'Email Address' ) );
$login_dd = array( 0 => array( 'passthrough', 'Óäàëåííûé' ), 1 => array( 'onfail', 'Ñîâìåñòíûé' ) );
$login_unt = array( 0 => array( 'username', 'Èìÿ ïîëüçîâàòåëÿ' ), 1 => array( 'email', 'E-mail àäðåñ' ) );
//-----------------------------------------
// Check (please?)
//-----------------------------------------
if ( $type == 'add' )
{
$formcode = 'login_add_do';
$title = "Register New Log In Method";
$button = "Register New Log In Method";
$title = "Ñîçäàíèÿ íîâîãî ìåòîäà âõîäà";
$button = "Ñîçäàòü";
}
else
{
$login = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'login_methods', 'where' => 'login_id='.$login_id ) );
if ( ! $login['login_id'] )
{
$this->ipsclass->main_msg = "No ID was passed, please try again.";
$this->ipsclass->main_msg = "Íå îäèí ID íå âûáðàí, ïîâòîðèòå ïîïûòêó çàíîâî.";
$this->login_list();
return;
}
$formcode = 'login_edit_do';
$title = "Edit Log In Method ".$login['login_title'];
$button = "Save Changes";
$title = "Ðåäàêòèðîâàíèå: ".$login['login_title'];
$button = "Ñîõðàíèòü èçìåíåíèÿ";
}
//-------------------------------
// Form elements
//-------------------------------
$form = array();
$form['login_title'] = $this->ipsclass->adskin->form_input( 'login_title' , $_POST['login_title'] ? $_POST['login_title'] : $login['login_title'] );
$form['login_description'] = $this->ipsclass->adskin->form_input( 'login_description' , $this->ipsclass->txt_htmlspecialchars( $_POST['login_description'] ? $_POST['login_description'] : $login['login_description'] ) );
$form['login_folder_name'] = $this->ipsclass->adskin->form_input( 'login_folder_name' , $_POST['login_folder_name'] ? $_POST['login_folder_name'] : $login['login_folder_name'] );
@@ -707,63 +719,63 @@ class ad_login_auth
$form['login_replace_form'] = $this->ipsclass->adskin->form_yes_no( 'login_replace_form' , $_POST['login_replace_form'] ? $_POST['login_replace_form'] : $login['login_replace_form'] );
$form['login_type'] = $this->ipsclass->adskin->form_dropdown( 'login_type' , $login_dd , $_POST['login_type'] ? $_POST['login_type'] : $login['login_type'] );
$form['login_user_id'] = $this->ipsclass->adskin->form_dropdown( 'login_user_id' , $login_unt, $_POST['login_user_id'] ? $_POST['login_user_id'] : $login['login_user_id'] );
if ( IN_DEV )
{
$form['login_safemode'] = $this->ipsclass->adskin->form_yes_no( 'login_safemode' , $_POST['login_safemode'] ? $_POST['login_safemode'] : $login['login_safemode'] );
$form['login_installed'] = $this->ipsclass->adskin->form_yes_no( 'login_installed', $_POST['login_installed'] ? $_POST['login_installed']: $login['login_installed'] );
}
$this->ipsclass->html .= $this->html->login_form( $form, $title, $formcode, $button, $login );
$this->ipsclass->html_help_title = "Log In Manager";
$this->ipsclass->html_help_msg = "This section will allow you to manage your log in authentication methods.";
$this->ipsclass->admin->nav[] = array( "", "Add/Edit Login Module" );
$this->ipsclass->html_help_title = "Óïðàâëåíèå àâòîðèçàöèåé";
$this->ipsclass->html_help_msg = "Ýòà ñåêöèÿ ïîçâîëèò âàì óïðàâëÿòü èäåíòèôèêàöèîííûìè ìåòîäàìè äëÿ àâòîðèçàöèè.";
$this->ipsclass->admin->nav[] = array( "", "Äîáàâëåíèå/èçìåíåíèå ìåòîäà àâòîðèçàöèè" );
$this->ipsclass->admin->output();
}
/*-------------------------------------------------------------------------*/
// List current log in types
/*-------------------------------------------------------------------------*/
function login_list()
{
//-------------------------------
// INIT
//-------------------------------
$content = "";
//-------------------------------
// Get components
//-------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'login_methods', 'order' => 'login_title ASC' ) );
$this->ipsclass->DB->simple_exec();
while( $r = $this->ipsclass->DB->fetch_row() )
{
//-------------------------------
// Until IPB 3.0: hardcode some stuff
//-------------------------------
$r['login_installed'] = 1;
//-------------------------------
// (Alex) Cross
//-------------------------------
$r['_enabled_img'] = $r['login_enabled'] ? 'aff_tick.png' : 'aff_cross.png';
$r['_installed_img'] = $r['login_installed'] ? 'aff_tick.png' : 'aff_cross.png';
$content .= $this->html->login_row($r);
}
$this->ipsclass->html .= $this->html->login_overview( $content );
$this->ipsclass->admin->page_title = "Log In Authentication Manager";
$this->ipsclass->admin->page_detail = "This section will allow you to manage your log in methods.";
$this->ipsclass->admin->page_title = "Óïðàâëåíèå àâòîðèçàöèÿìè";
$this->ipsclass->admin->page_detail = "Ýòà ñåêöèÿ ïîçâîëèò âàì óïðàâëÿòü ñïîñîáàìè àâòîðèçàöèè.";
$this->ipsclass->admin->output();
}
+187 -179
View File
@@ -1,180 +1,188 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-06-08 17:11:50 +0100 (Thu, 08 Jun 2006) $
| > $Revision: 289 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Admin Logs Stuff
| > Module written by Matt Mecham
| > Date started: 11nd September 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Mon 24th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class ad_logs_login
{
var $base_url;
/**
* Section title name
*
* @var string
*/
var $perm_main = "admin";
/**
* Section title name
*
* @var string
*/
var $perm_child = "loginlog";
function auto_run()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'ACP Log-in Logs' );
//-----------------------------------------
// LOAD HTML
//-----------------------------------------
$this->html = $this->ipsclass->acp_load_template('cp_skin_admin');
switch($this->ipsclass->input['code'])
{
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->login_logs_view();
break;
case 'view_detail':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->login_logs_view_detail();
break;
}
}
//*-------------------------------------------------------------------------*/
// View detail
/*-------------------------------------------------------------------------*/
function login_logs_view_detail()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$admin_id = intval( $this->ipsclass->input['detail'] );
//-----------------------------------------
// Get data from the deebee
//-----------------------------------------
$log = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
'from' => 'admin_login_logs',
'where' => 'admin_id='.$admin_id ) );
if ( ! $log['admin_id'] )
{
$this->ipsclass->main_msg = "No log for that ID found";
$this->login_logs_view();
return;
}
//-----------------------------------------
// Display...
//-----------------------------------------
$log['_admin_time'] = $this->ipsclass->get_date( $log['admin_time'], 'LONG' );
$log['_admin_post_details'] = unserialize( $log['admin_post_details'] );
$log['_admin_img'] = $log['admin_success'] ? 'aff_tick.png' : 'aff_cross.png';
//-----------------------------------------
// Show...
//-----------------------------------------
$this->ipsclass->html .= $this->html->acp_last_logins_detail( $log );
$this->ipsclass->admin->print_popup();
}
//*-------------------------------------------------------------------------*/
// View current log in logs
/*-------------------------------------------------------------------------*/
function login_logs_view()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$start = intval( $this->ipsclass->input['st'] );
$perpage = 50;
//-----------------------------------------
// Get log count
//-----------------------------------------
$count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count',
'from' => 'admin_login_logs' ) );
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => intval( $count['count'] ),
'PER_PAGE' => $perpage,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "",
'L_MULTI' => "Pages: ",
'BASE_URL' => $this->ipsclass->base_url.$this->ipsclass->form_code ) );
//-----------------------------------------
// Get from DB
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => '*',
'from' => 'admin_login_logs',
'order' => 'admin_time DESC',
'limit' => array( $start, $perpage ) ) );
$this->ipsclass->DB->exec_query();
while( $row = $this->ipsclass->DB->fetch_row() )
{
$row['_admin_time'] = $this->ipsclass->admin->get_date( $row['admin_time'] );
$row['_admin_img'] = $row['admin_success'] ? 'aff_tick.png' : 'aff_cross.png';
$logins .= $this->html->acp_last_logins_row( $row );
}
//-----------------------------------------
// Print...
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "ACP Log-in Attempts", "This page shows all the recorded ACP log in attempts.<br />The red cross indicates an error when logging in and a green tick indicates a successful log in." ) . "<br />";
$this->ipsclass->html .= $this->html->acp_last_logins_wrapper( $logins, $links );
$this->ipsclass->admin->output();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-06-08 17:11:50 +0100 (Thu, 08 Jun 2006) $
| > $Revision: 289 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Admin Logs Stuff
| > Module written by Matt Mecham
| > Date started: 11nd September 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Mon 24th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class ad_logs_login
{
var $base_url;
/**
* Section title name
*
* @var string
*/
var $perm_main = "admin";
/**
* Section title name
*
* @var string
*/
var $perm_child = "loginlog";
function auto_run()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Ïîïûòêè àâòîðèçàöèè â ÀÖ' );
//-----------------------------------------
// LOAD HTML
//-----------------------------------------
$this->html = $this->ipsclass->acp_load_template('cp_skin_admin');
switch($this->ipsclass->input['code'])
{
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->login_logs_view();
break;
case 'view_detail':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->login_logs_view_detail();
break;
}
}
//*-------------------------------------------------------------------------*/
// View detail
/*-------------------------------------------------------------------------*/
function login_logs_view_detail()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$admin_id = intval( $this->ipsclass->input['detail'] );
//-----------------------------------------
// Get data from the deebee
//-----------------------------------------
$log = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
'from' => 'admin_login_logs',
'where' => 'admin_id='.$admin_id ) );
if ( ! $log['admin_id'] )
{
$this->ipsclass->main_msg = "Ïî óêàçàííîé çàïèñè äåòàëåé íå íàéäåíî.";
$this->login_logs_view();
return;
}
//-----------------------------------------
// Display...
//-----------------------------------------
$log['_admin_time'] = $this->ipsclass->get_date( $log['admin_time'], 'LONG' );
$log['_admin_post_details'] = unserialize( $log['admin_post_details'] );
$log['_admin_img'] = $log['admin_success'] ? 'aff_tick.png' : 'aff_cross.png';
//-----------------------------------------
// Show...
//-----------------------------------------
$this->ipsclass->html .= $this->html->acp_last_logins_detail( $log );
$this->ipsclass->admin->print_popup();
}
//*-------------------------------------------------------------------------*/
// View current log in logs
/*-------------------------------------------------------------------------*/
function login_logs_view()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$start = intval( $this->ipsclass->input['st'] );
$perpage = 50;
//-----------------------------------------
// Get log count
//-----------------------------------------
$count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'count(*) as count',
'from' => 'admin_login_logs' ) );
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => intval( $count['count'] ),
'PER_PAGE' => $perpage,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "",
'L_MULTI' => "Ñòðàíèö: ",
'BASE_URL' => $this->ipsclass->base_url.$this->ipsclass->form_code ) );
//-----------------------------------------
// Get from DB
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => '*',
'from' => 'admin_login_logs',
'order' => 'admin_time DESC',
'limit' => array( $start, $perpage ) ) );
$this->ipsclass->DB->exec_query();
while( $row = $this->ipsclass->DB->fetch_row() )
{
$row['_admin_time'] = $this->ipsclass->admin->get_date( $row['admin_time'] );
$row['_admin_img'] = $row['admin_success'] ? 'aff_tick.png' : 'aff_cross.png';
$logins .= $this->html->acp_last_logins_row( $row );
}
//-----------------------------------------
// Print...
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->skin_acp_global->information_box( "Ïîïûòêè àâòîðèçàöèè â ÀÖ", "Íà ýòîé ñòðàíèöå îòîáðàæåíû âñå ïîïûòêè àâòîðèçàöèè â àäìèíöåíòð âàøåãî ôîðóìà.<br />Êðàñíûì èíäèêàòîðîì îòìå÷åíû íåóäà÷íûå ïîïûòêè àâòîðèçàöèè, â òî âðåìÿ êàê çåëåíûì — óäà÷íûå." ) . "<br />";
$this->ipsclass->html .= $this->html->acp_last_logins_wrapper( $logins, $links );
$this->ipsclass->admin->output();
}
}
?>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+146 -138
View File
@@ -2,16 +2,24 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -28,7 +36,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -40,7 +48,7 @@ class ad_modlogs {
* @var string
*/
var $perm_main = "admin";
/**
* Section title name
*
@@ -50,44 +58,44 @@ class ad_modlogs {
function auto_run()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Moderator Logs' );
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë ìîäåðèðîâàíèÿ' );
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'view':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->view();
break;
case 'remove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->remove();
break;
//-----------------------------------------
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->list_current();
break;
}
}
//-----------------------------------------
// Remove archived files
//-----------------------------------------
function view()
{
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
$this->ipsclass->admin->page_detail = "Viewing all actions by a moderator";
$this->ipsclass->admin->page_title = "Moderator Logs Manager";
$this->ipsclass->admin->page_detail = "Ïðîñìîòð äåéñòâèé ìîäåðèðîâàíèÿ ôîðóìà";
$this->ipsclass->admin->page_title = "Æóðíàë ìîäåðèðîâàíèÿ";
if ( !isset($this->ipsclass->input['search_string']) OR $this->ipsclass->input['search_string'] == "")
{
if (! $this->ipsclass->input['mid'] )
@@ -95,27 +103,27 @@ class ad_modlogs {
// Empty search form...sneaky...
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'moderator_logs' ) );
$this->ipsclass->DB->simple_exec();
$row = $this->ipsclass->DB->fetch_row();
$row_count = $row['count'];
$query = "&act=modlog&code=view";
$this->ipsclass->DB->cache_add_query( 'modlogs_view_three', array( 'start' => $start ) );
$this->ipsclass->DB->cache_exec_query();
$this->ipsclass->DB->cache_exec_query();
}
else
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'moderator_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) );
$this->ipsclass->DB->simple_exec();
$row = $this->ipsclass->DB->fetch_row();
$row_count = $row['count'];
$query = "&act=modlog&mid={$this->ipsclass->input['mid']}&code=view";
$this->ipsclass->DB->cache_add_query( 'modlogs_view_one', array( 'mid' => intval($this->ipsclass->input['mid']), 'start' => $start ) );
$this->ipsclass->DB->cache_exec_query();
}
@@ -123,7 +131,7 @@ class ad_modlogs {
else
{
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
if ( ($this->ipsclass->input['search_type'] == 'topic_id') or ($this->ipsclass->input['search_type'] == 'forum_id') )
{
$dbq = "m.".$this->ipsclass->input['search_type']."='".$this->ipsclass->input['search_string']."'";
@@ -132,62 +140,62 @@ class ad_modlogs {
{
$dbq = "m.".$this->ipsclass->input['search_type']." LIKE '%".$this->ipsclass->input['search_string']."%'";
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(m.id) as count', 'from' => 'moderator_logs m', 'where' => $dbq ) );
$this->ipsclass->DB->simple_exec();
$row = $this->ipsclass->DB->fetch_row();
$row_count = $row['count'];
$query = "&act=modlog&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']);
$this->ipsclass->DB->cache_add_query( 'modlogs_view_two', array( 'dbq' => $dbq, 'start' => $start ) );
$this->ipsclass->DB->cache_exec_query();
}
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
'PER_PAGE' => 20,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "Single Page",
'L_MULTI' => "Pages: ",
'L_SINGLE' => "Ñòðàíèöà",
'L_MULTI' => "Ñòðàíèöû: ",
'BASE_URL' => $this->ipsclass->base_url.$query,
)
);
$this->ipsclass->admin->page_detail = "You may view and remove actions performed by your moderators";
$this->ipsclass->admin->page_title = "Moderator Logs Manager";
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì ìîäåðèðîâàíèÿ ôîðóìîâ";
$this->ipsclass->admin->page_title = "Æóðíàë ìîäåðèðîâàíèÿ";
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Action Performed" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Forum" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Topic Title" , "25%" );
$this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "IP address" , "10%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Moderator Logs" );
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèå" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Ôîðóì" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Òåìà" , "25%" );
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "10%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë äåéñòâèé" );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' );
if ( $row['topic_id'] )
{
$topicid = "<br />Topic ID: ".$row['topic_id'];
$topicid = "<br />ID òåìû: ".$row['topic_id'];
}
else
{
$topicid = "&nbsp;";
}
$sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] );
$row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$row['members_display_name']}</b>",
"<span style='font-weight:bold;color:red'>{$row['action']}</span>",
"<b>{$row['name']}</b>",
@@ -199,91 +207,91 @@ class ad_modlogs {
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
}
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
//-----------------------------------------
// Remove archived files
//-----------------------------------------
function remove()
{
if ($this->ipsclass->input['mid'] == "")
{
$this->ipsclass->admin->error("You did not select a member ID to remove by!");
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìîäåðàòîðà!");
}
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'moderator_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) );
$this->ipsclass->admin->save_log("Removed Moderator Logs");
$this->ipsclass->admin->save_log("Óäàëåíû çàïèñè èç æóðíàëà ìîäåðèðîâàíèÿ");
$this->ipsclass->boink_it($this->ipsclass->base_url."&act=modlog");
exit();
}
}
//-----------------------------------------
// SHOW ALL LANGUAGE PACKS
//-----------------------------------------
function list_current()
{
$form_array = array();
$this->ipsclass->admin->page_detail = "You may view and remove actions performed by your moderators";
$this->ipsclass->admin->page_title = "Moderator Logs Manager";
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì ìîäåðèðîâàíèÿ ôîðóìîâ";
$this->ipsclass->admin->page_title = "Æóðíàë ìîäåðèðîâàíèÿ";
//-----------------------------------------
// VIEW LAST 5
//-----------------------------------------
$this->ipsclass->DB->cache_add_query( 'modlogs_list_current_last_five', array() );
$this->ipsclass->DB->cache_exec_query();
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Action Performed" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Forum" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Topic Title" , "25%" );
$this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "IP address" , "10%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Last 5 Moderation Actions" );
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèå" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Ôîðóì" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Òåìà" , "25%" );
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "10%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîñëåäíèå 5 äåéñòâèé" );
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' );
$topicid = "";
if ( $row['topic_id'] )
{
$topicid = "<br />Topic ID: ".$row['topic_id'];
$topicid = "<br />ID òåìû: ".$row['topic_id'];
}
$sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] );
$row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$row['members_display_name']}</b>",
"<span style='font-weight:bold;color:red'>{$row['action']}</span>",
"<b>{$row['name']}</b>",
@@ -295,81 +303,81 @@ class ad_modlogs {
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
}
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "30%" );
$this->ipsclass->adskin->td_header[] = array( "Actions Performed" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "View all by member" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Remove all by member" , "30%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Moderator Logs" );
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "30%" );
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèé ñîâåðøåíî" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Ïðîñìîòð âñåõ äåéñòâèé" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Óäàëåíèå âñåõ äåéñòâèé" , "30%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë ìîäåðèðîâàíèÿ" );
$this->ipsclass->DB->cache_add_query( 'modlogs_list_current_show_all', array() );
$this->ipsclass->DB->cache_exec_query();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$r['members_display_name']}</b>",
"<center>{$r['act_count']}</center>",
"<center><a href='".$this->ipsclass->base_url."&act=modlog&code=view&mid={$r['member_id']}'>View</a></center>",
"<center><a href='".$this->ipsclass->base_url."&act=modlog&code=remove&mid={$r['member_id']}'>Remove</a></center>",
"<center><a href='".$this->ipsclass->base_url."&act=modlog&code=view&mid={$r['member_id']}'>Ïðîñìîòð</a></center>",
"<center><a href='".$this->ipsclass->base_url."&act=modlog&code=remove&mid={$r['member_id']}'>Óäàëåíèå</a></center>",
) );
}
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
2 => array( 'act' , 'modlog' ),
4 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "60%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Moderator Logs" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê äåéñòâèé â æóðíàëå" );
$form_array = array(
0 => array( 'topic_title', 'Topic Title' ),
1 => array( 'ip_address', 'IP Address' ),
2 => array( 'member_name', 'Member Name' ),
3 => array( 'topic_id' , 'Topic ID' ),
4 => array( 'forum_id' , 'Forum ID' )
0 => array( 'topic_title', 'Íàçâàíèå òåìû' ),
1 => array( 'ip_address', 'IP-àäðåñ' ),
2 => array( 'member_name', 'Ìîäåðàòîð' ),
3 => array( 'topic_id' , 'ID òåìû' ),
4 => array( 'forum_id' , 'ID ôîðóìà' )
);
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search for...</b>" ,
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü </b>" ,
$this->ipsclass->adskin->form_input( "search_string")
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search in...</b>" ,
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü â </b>" ,
$this->ipsclass->adskin->form_dropdown( "search_type", $form_array)
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èñêàòü");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
}
File diff suppressed because it is too large. Load diff
@@ -2,16 +2,24 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-10-11 19:01:38 +0100 (Wed, 11 Oct 2006) $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-10-11 13:01:38 -0500 (Wed, 11 Oct 2006) $
| > $Revision: 628 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
@@ -1485,7 +1493,7 @@ class ad_paysubscriptions
$this->ipsclass->html .= implode( "\n", $custom );
}
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Activate this Gateway?</b><br>This will allow your members to use this option." ,
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Activate this Gateway?</b><br />This will allow your members to use this option." ,
$this->ipsclass->adskin->form_yes_no("submethod_active", $row['submethod_active'] )
) );
+393 -385
View File
@@ -1,386 +1,394 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > PORTAL FUNCTIONS
| > Module written by Matt Mecham
| > Date started: Tuesday 2nd August 2005 (10:32)
+--------------------------------------------------------------------------
*/
/**
* ACP MODULE: Portal Plug-ins
*
* Manage portal plug-ins
*
* @package InvisionPowerBoard
* @subpackage ActionAdmin
* @author Matt Mecham
* @version 2.1
* @since 2.1.0.2005-08-02
*/
/**
*
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
/**
* ACP MODULE: Portal Plug-ins
*
* Manage portal plug-ins
*
* @package InvisionPowerBoard
* @subpackage ActionAdmin
* @author Matt Mecham
* @version 2.1
* @since 2.1.0.2005-08-02
*/
class ad_portal
{
/**
* IPB object
*
* @var object
*/
var $ipsclass;
/**
* Perm main
*
* @var string
*/
var $perm_main = 'tools';
/**
* Perm child
*
* @var string
*/
var $perm_child = 'portal';
/**
* Portal objects
*
* @var array
*/
var $portal_objects = array();
/*-------------------------------------------------------------------------*/
// Main handler
/*-------------------------------------------------------------------------*/
function auto_run()
{
//-----------------------------------------
// Load HTML
//-----------------------------------------
$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');
//-----------------------------------------
// Load Language
//-----------------------------------------
$this->ipsclass->acp_load_language( 'acp_lang_portal' );
//-----------------------------------------
// What to do?
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'manage':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->portal_list();
break;
case 'portal_settings':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->portal_settings();
break;
case 'portal_viewtags':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->portal_viewtags();
break;
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->portal_list();
break;
}
}
/*-------------------------------------------------------------------------*/
/**
* Rebuild Portal Cache
*
* @return void
* @since 2.1.0.2005.08.02
*/
function portal_rebuildcache()
{
$this->ipsclass->cache['portal'] = array();
if ( ! is_array( $this->portal_objects ) or ! count( $this->portal_objects ) )
{
$this->get_portal_objects();
}
$this->ipsclass->cache['portal'] = $this->portal_objects;
$this->ipsclass->update_cache( array( 'name' => 'portal', 'array' => 1, 'deletefirst' => 1 ) );
}
/*-------------------------------------------------------------------------*/
// Show portal settings
/*-------------------------------------------------------------------------*/
/**
* Show portal settings
*
* @return void
* @since 2.1.0.2005.08.02
*/
function portal_viewtags()
{
//-------------------------------
// INIT
//-------------------------------
$pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] );
$file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php';
$content = "";
//-------------------------------
// Check
//-------------------------------
if ( ! $pc_key OR ! file_exists( $file ) )
{
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key'];
$this->portal_list();
}
//-------------------------------
// Grab config file
//-------------------------------
require_once( $file );
if ( is_array( $PORTAL_CONFIG['pc_exportable_tags'] ) AND count( $PORTAL_CONFIG['pc_exportable_tags'] ) )
{
foreach( $PORTAL_CONFIG['pc_exportable_tags'] as $tag => $tag_data )
{
$content .= $this->html->portal_pop_row( $tag, $tag_data[1] );
}
}
$this->ipsclass->html .= $this->html->portal_pop_overview( $PORTAL_CONFIG['pc_title'], $content );
//-------------------------------
// Print
//-------------------------------
$this->ipsclass->admin->print_popup();
}
/*-------------------------------------------------------------------------*/
// Show portal settings
/*-------------------------------------------------------------------------*/
/**
* Show portal settings
*
* @return void
* @since 2.1.0.2005.08.02
*/
function portal_settings()
{
//-------------------------------
// Page Data
//-------------------------------
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] );
$this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title'];
$this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help'];
//-------------------------------
// INIT
//-------------------------------
$pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] );
$file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php';
//-------------------------------
// Check
//-------------------------------
if ( ! $pc_key OR ! file_exists( $file ) )
{
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key'];
$this->portal_list();
}
//-------------------------------
// Grab config file
//-------------------------------
require_once( $file );
if ( ! $PORTAL_CONFIG['pc_settings_keyword'] )
{
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_settings'];
$this->portal_list();
}
//-------------------------------
// Grab, init and load settings
//-------------------------------
require_once( ROOT_PATH.'sources/action_admin/settings.php' );
$settings = new ad_settings();
$settings->ipsclass =& $this->ipsclass;
$settings->get_by_key = $PORTAL_CONFIG['pc_settings_keyword'];
$settings->return_after_save = $this->ipsclass->form_code.'&code=portal_settings&pc_key='.$pc_key;
$settings->setting_view();
}
/*-------------------------------------------------------------------------*/
// List portal objects
/*-------------------------------------------------------------------------*/
/**
* List portal objects
*
* @return void
* @since 2.1.0.2005.08.02
*/
function portal_list()
{
//-------------------------------
// Page Data
//-------------------------------
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] );
$this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title'];
$this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help'];
//-------------------------------
// INIT
//-------------------------------
$content = "";
//-------------------------------
// Get portal objects
//-------------------------------
$this->get_portal_objects();
foreach( $this->portal_objects as $portal_data )
{
//-------------------------------
// (Alex) Cross
//-------------------------------
$content .= $this->html->portal_row( $portal_data );
}
$this->ipsclass->html .= $this->html->portal_overview( $content );
//-------------------------------
// Update cache
//-------------------------------
$this->portal_rebuildcache();
//-------------------------------
// Print
//-------------------------------
$this->ipsclass->admin->output();
}
/*-------------------------------------------------------------------------*/
// Return portal objects
/*-------------------------------------------------------------------------*/
/**
* Return portal objects
*
* Picks through the portal objects directory
*
* @return void
* @since 2.1.0.2005.08.02
*/
function get_portal_objects()
{
//-------------------------------
// Got a directory?
//-------------------------------
if ( ! file_exists( ROOT_PATH.'sources/portal_plugins' ) )
{
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_dir'];
$this->portal_objects = array();
return;
}
//-------------------------------
// Go loopy
//-------------------------------
$handle = opendir( ROOT_PATH.'sources/portal_plugins' );
while ( ($file = readdir($handle) ) !== FALSE )
{
if ( ($file != ".") && ($file != "..") )
{
preg_match( "#^(.*)-cfg\.php$#", $file, $matches );
if ( $matches[0] AND $matches[1] )
{
//-------------------------------
// Include file...
//-------------------------------
$PORTAL_CONFIG = array();
require_once( ROOT_PATH . 'sources/portal_plugins/' . $matches[0] );
if ( is_array( $PORTAL_CONFIG ) AND count( $PORTAL_CONFIG ) )
{
$PORTAL_CONFIG['pc_key'] = $matches[1];
$this->portal_objects[ $matches[1] ] = $PORTAL_CONFIG;
}
}
}
}
closedir($handle);
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > PORTAL FUNCTIONS
| > Module written by Matt Mecham
| > Date started: Tuesday 2nd August 2005 (10:32)
+--------------------------------------------------------------------------
*/
/**
* ACP MODULE: Portal Plug-ins
*
* Manage portal plug-ins
*
* @package InvisionPowerBoard
* @subpackage ActionAdmin
* @author Matt Mecham
* @version 2.1
* @since 2.1.0.2005-08-02
*/
/**
*
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
/**
* ACP MODULE: Portal Plug-ins
*
* Manage portal plug-ins
*
* @package InvisionPowerBoard
* @subpackage ActionAdmin
* @author Matt Mecham
* @version 2.1
* @since 2.1.0.2005-08-02
*/
class ad_portal
{
/**
* IPB object
*
* @var object
*/
var $ipsclass;
/**
* Perm main
*
* @var string
*/
var $perm_main = 'tools';
/**
* Perm child
*
* @var string
*/
var $perm_child = 'portal';
/**
* Portal objects
*
* @var array
*/
var $portal_objects = array();
/*-------------------------------------------------------------------------*/
// Main handler
/*-------------------------------------------------------------------------*/
function auto_run()
{
//-----------------------------------------
// Load HTML
//-----------------------------------------
$this->html = $this->ipsclass->acp_load_template('cp_skin_tools');
//-----------------------------------------
// Load Language
//-----------------------------------------
$this->ipsclass->acp_load_language( 'acp_lang_portal' );
//-----------------------------------------
// What to do?
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'manage':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->portal_list();
break;
case 'portal_settings':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->portal_settings();
break;
case 'portal_viewtags':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->portal_viewtags();
break;
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->portal_list();
break;
}
}
/*-------------------------------------------------------------------------*/
/**
* Rebuild Portal Cache
*
* @return void
* @since 2.1.0.2005.08.02
*/
function portal_rebuildcache()
{
$this->ipsclass->cache['portal'] = array();
if ( ! is_array( $this->portal_objects ) or ! count( $this->portal_objects ) )
{
$this->get_portal_objects();
}
$this->ipsclass->cache['portal'] = $this->portal_objects;
$this->ipsclass->update_cache( array( 'name' => 'portal', 'array' => 1, 'deletefirst' => 1 ) );
}
/*-------------------------------------------------------------------------*/
// Show portal settings
/*-------------------------------------------------------------------------*/
/**
* Show portal settings
*
* @return void
* @since 2.1.0.2005.08.02
*/
function portal_viewtags()
{
//-------------------------------
// INIT
//-------------------------------
$pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] );
$file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php';
$content = "";
//-------------------------------
// Check
//-------------------------------
if ( ! $pc_key OR ! file_exists( $file ) )
{
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key'];
$this->portal_list();
}
//-------------------------------
// Grab config file
//-------------------------------
require_once( $file );
if ( is_array( $PORTAL_CONFIG['pc_exportable_tags'] ) AND count( $PORTAL_CONFIG['pc_exportable_tags'] ) )
{
foreach( $PORTAL_CONFIG['pc_exportable_tags'] as $tag => $tag_data )
{
$content .= $this->html->portal_pop_row( $tag, $tag_data[1] );
}
}
$this->ipsclass->html .= $this->html->portal_pop_overview( $PORTAL_CONFIG['pc_title'], $content );
//-------------------------------
// Print
//-------------------------------
$this->ipsclass->admin->print_popup();
}
/*-------------------------------------------------------------------------*/
// Show portal settings
/*-------------------------------------------------------------------------*/
/**
* Show portal settings
*
* @return void
* @since 2.1.0.2005.08.02
*/
function portal_settings()
{
//-------------------------------
// Page Data
//-------------------------------
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] );
$this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title'];
$this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help'];
//-------------------------------
// INIT
//-------------------------------
$pc_key = $this->ipsclass->txt_alphanumerical_clean( $this->ipsclass->input['pc_key'] );
$file = ROOT_PATH . 'sources/portal_plugins/'.$pc_key.'-cfg.php';
//-------------------------------
// Check
//-------------------------------
if ( ! $pc_key OR ! file_exists( $file ) )
{
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_key'];
$this->portal_list();
}
//-------------------------------
// Grab config file
//-------------------------------
require_once( $file );
if ( ! $PORTAL_CONFIG['pc_settings_keyword'] )
{
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_settings'];
$this->portal_list();
}
//-------------------------------
// Grab, init and load settings
//-------------------------------
require_once( ROOT_PATH.'sources/action_admin/settings.php' );
$settings = new ad_settings();
$settings->ipsclass =& $this->ipsclass;
$settings->get_by_key = $PORTAL_CONFIG['pc_settings_keyword'];
$settings->return_after_save = $this->ipsclass->form_code.'&code=portal_settings&pc_key='.$pc_key;
$settings->setting_view();
}
/*-------------------------------------------------------------------------*/
// List portal objects
/*-------------------------------------------------------------------------*/
/**
* List portal objects
*
* @return void
* @since 2.1.0.2005.08.02
*/
function portal_list()
{
//-------------------------------
// Page Data
//-------------------------------
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, $this->ipsclass->acp_lang['main_nav'] );
$this->ipsclass->admin->page_title = $this->ipsclass->acp_lang['main_title'];
$this->ipsclass->admin->page_detail = $this->ipsclass->acp_lang['main_help'];
//-------------------------------
// INIT
//-------------------------------
$content = "";
//-------------------------------
// Get portal objects
//-------------------------------
$this->get_portal_objects();
foreach( $this->portal_objects as $portal_data )
{
//-------------------------------
// (Alex) Cross
//-------------------------------
$content .= $this->html->portal_row( $portal_data );
}
$this->ipsclass->html .= $this->html->portal_overview( $content );
//-------------------------------
// Update cache
//-------------------------------
$this->portal_rebuildcache();
//-------------------------------
// Print
//-------------------------------
$this->ipsclass->admin->output();
}
/*-------------------------------------------------------------------------*/
// Return portal objects
/*-------------------------------------------------------------------------*/
/**
* Return portal objects
*
* Picks through the portal objects directory
*
* @return void
* @since 2.1.0.2005.08.02
*/
function get_portal_objects()
{
//-------------------------------
// Got a directory?
//-------------------------------
if ( ! file_exists( ROOT_PATH.'sources/portal_plugins' ) )
{
$this->ipsclass->main_msg = $this->ipsclass->acp_lang['error_no_dir'];
$this->portal_objects = array();
return;
}
//-------------------------------
// Go loopy
//-------------------------------
$handle = opendir( ROOT_PATH.'sources/portal_plugins' );
while ( ($file = readdir($handle) ) !== FALSE )
{
if ( ($file != ".") && ($file != "..") )
{
preg_match( "#^(.*)-cfg\.php$#", $file, $matches );
if ( $matches[0] AND $matches[1] )
{
//-------------------------------
// Include file...
//-------------------------------
$PORTAL_CONFIG = array();
require_once( ROOT_PATH . 'sources/portal_plugins/' . $matches[0] );
if ( is_array( $PORTAL_CONFIG ) AND count( $PORTAL_CONFIG ) )
{
$PORTAL_CONFIG['pc_key'] = $matches[1];
$this->portal_objects[ $matches[1] ] = $PORTAL_CONFIG;
}
}
}
}
closedir($handle);
}
}
?>
File diff suppressed because it is too large. Load diff
+204 -196
View File
@@ -1,197 +1,205 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-10-05 17:04:08 +0100 (Thu, 05 Oct 2006) $
| > $Revision: 609 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > ACP Prefs functions
| > Module written by Matt Mecham
| > Date started: 22nd May 2003
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class ad_prefs {
var $base_url;
function auto_run()
{
//-----------------------------------------
// Show the wee form
//-----------------------------------------
if ( $this->ipsclass->input['set'] == 1 )
{
$this->msg = 'Savings set';
if ( $this->ipsclass->input['tx'] == "" or $this->ipsclass->input['ty'] == "" )
{
$this->msg = 'Please complete the form';
print $this->get_html();
}
else
{
$this->ipsclass->my_setcookie( 'acpprefs', $this->ipsclass->input['menu'] .','. $this->ipsclass->input['tx'] .','. $this->ipsclass->input['ty'] .','. $this->ipsclass->input['preview']);
$this->msg = 'Settings saved';
$this->tx = $this->ipsclass->input['tx'];
$this->ty = $this->ipsclass->input['ty'];
if ( $this->ipsclass->input['menu'] )
{
$this->s_yes = 'selected';
$this->s_no = '';
}
else
{
$this->s_yes = '';
$this->s_no = 'selected';
}
if ( $this->ipsclass->input['preview'] )
{
$this->p_yes = 'selected';
$this->p_no = '';
}
else
{
$this->p_yes = '';
$this->p_no = 'selected';
}
print $this->get_html();
}
}
else
{
$state = 0;
$tx = 80;
$ty = 40;
if ( $cookie = $this->ipsclass->my_getcookie('acpprefs') )
{
list( $state, $tx, $ty, $prev_show ) = explode( ",", $cookie );
}
$this->tx = $tx;
$this->ty = $ty;
if ( $state )
{
$this->s_yes = 'selected';
$this->s_no = '';
}
else
{
$this->s_yes = '';
$this->s_no = 'selected';
}
if ( $prev_show )
{
$this->p_yes = 'selected';
$this->p_no = '';
}
else
{
$this->p_yes = '';
$this->p_no = 'selected';
}
print $this->get_html();
}
}
function get_html()
{
global $SKIN;
$hit_muhl = <<<EOF
<html>
<head>
<title>IPB-ACP Prefs</title>
<style type='text/css'>
BODY {
font-size: 10px;
font-family: Verdana, Arial, Sans-Serif;
color:#000;
padding:0px;
margin:5px 5px 5px 5px;
background-color: #F5F9FD
}
TABLE, TD, TR {
font-family: Verdana,Arial, Sans-Serif;
color:#000;
font-size: 10px;
}
a:link, a:visited, a:active { color:#000055 }
a:hover { color:#333377;text-decoration:underline }
input {vertical-align:middle}
.textinput { background-color: #DFE6EF;; color:Ê#000; font-size:10px; font-family: Verdana,Arial, Sans-Serif; padding:2px; }
</style>
<script type='text/javascript'>
var msg = "{$this->msg}";
if ( msg != "" )
{
alert( msg );
}
</script>
</head>
<body>
<form action="{$this->ipsclass->base_url}&act=prefs&set=1" method="post">
<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />
<fieldset style='padding:10px'>
<legend>Your ACP Prefs</legend>
<strong>Save ACP Menu State</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select class='textinput' name='menu'><option value='1' {$this->s_yes}>Yes</option><option value='0' {$this->s_no}>No</option></select>
<br /><br />
<strong>Template's Textbox Size</strong>&nbsp;<input class='textinput' type='text' size='3' name='tx' value='{$this->tx}' /> <strong>X</strong> <input class='textinput' type='text' size='3' name='ty' value='{$this->ty}' />
<br /><br />
<strong>Show Macro Preview?</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select class='textinput' name='preview'><option value='1' {$this->p_yes}>Yes</option><option value='0' {$this->p_no}>No</option></select>
<br /><br />
<center><input type='submit' class='textinput' value='Save' /></center>
</fieldset>
</form>
</body>
</html>
EOF;
return $hit_muhl;
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-10-05 11:04:08 -0500 (Thu, 05 Oct 2006) $
| > $Revision: 609 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > ACP Prefs functions
| > Module written by Matt Mecham
| > Date started: 22nd May 2003
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class ad_prefs {
var $base_url;
function auto_run()
{
//-----------------------------------------
// Show the wee form
//-----------------------------------------
if ( $this->ipsclass->input['set'] == 1 )
{
$this->msg = 'Savings set';
if ( $this->ipsclass->input['tx'] == "" or $this->ipsclass->input['ty'] == "" )
{
$this->msg = 'Ïîæàëóéñòà, çàïîëíèòå ôîðìó';
print $this->get_html();
}
else
{
$this->ipsclass->my_setcookie( 'acpprefs', $this->ipsclass->input['menu'] .','. $this->ipsclass->input['tx'] .','. $this->ipsclass->input['ty'] .','. $this->ipsclass->input['preview']);
$this->msg = 'Íàñòðîéêè ñîõðàíåíû ';
$this->tx = $this->ipsclass->input['tx'];
$this->ty = $this->ipsclass->input['ty'];
if ( $this->ipsclass->input['menu'] )
{
$this->s_yes = 'selected';
$this->s_no = '';
}
else
{
$this->s_yes = '';
$this->s_no = 'selected';
}
if ( $this->ipsclass->input['preview'] )
{
$this->p_yes = 'selected';
$this->p_no = '';
}
else
{
$this->p_yes = '';
$this->p_no = 'selected';
}
print $this->get_html();
}
}
else
{
$state = 0;
$tx = 80;
$ty = 40;
if ( $cookie = $this->ipsclass->my_getcookie('acpprefs') )
{
list( $state, $tx, $ty, $prev_show ) = explode( ",", $cookie );
}
$this->tx = $tx;
$this->ty = $ty;
if ( $state )
{
$this->s_yes = 'selected';
$this->s_no = '';
}
else
{
$this->s_yes = '';
$this->s_no = 'selected';
}
if ( $prev_show )
{
$this->p_yes = 'selected';
$this->p_no = '';
}
else
{
$this->p_yes = '';
$this->p_no = 'selected';
}
print $this->get_html();
}
}
function get_html()
{
global $SKIN;
$hit_muhl = <<<EOF
<html>
<head>
<title>IPB-âàøè ïðåäïî÷òåíèÿ</title>
<style type='text/css'>
BODY {
font-size: 10px;
font-family: Verdana, Arial, Sans-Serif;
color:#000;
padding:0px;
margin:5px 5px 5px 5px;
background-color: #F5F9FD
}
TABLE, TD, TR {
font-family: Verdana,Arial, Sans-Serif;
color:#000;
font-size: 10px;
}
a:link, a:visited, a:active { color:#000055 }
a:hover { color:#333377;text-decoration:underline }
input {vertical-align:middle}
.textinput { background-color: #DFE6EF;; color:Ê#000; font-size:10px; font-family: Verdana,Arial, Sans-Serif; padding:2px; }
</style>
<script type='text/javascript'>
var msg = "{$this->msg}";
if ( msg != "" )
{
alert( msg );
}
</script>
</head>
<body>
<form action="{$this->ipsclass->base_url}&act=prefs&set=1" method="post">
<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />
<fieldset style='padding:10px'>
<legend>Âàøè ïðåäïî÷òåíèÿ â àäìèíöåíòðå</legend>
<strong>Ñîõðàíèòü ðàñïîëîæåíèå ìåíþ àäìèíöåíòðà</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select class='textinput' name='menu'><option value='1' {$this->s_yes}>Äà</option><option value='0' {$this->s_no}>Íåò</option></select>
<br /><br />
<strong>Ðàçìåð øðèôòà â òåêñòáîêñàõ</strong>&nbsp;<input class='textinput' type='text' size='3' name='tx' value='{$this->tx}' /> <strong>X</strong> <input class='textinput' type='text' size='3' name='ty' value='{$this->ty}' />
<br /><br />
<strong>Ïîêàçûâàòü ïðåäïðîñìîòðò ìàêðîñà</strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<select class='textinput' name='preview'><option value='1' {$this->p_yes}>Äà</option><option value='0' {$this->p_no}>Íåò</option></select>
<br /><br />
<center><input type='submit' class='textinput' value='Ñîõðàíèòü' /></center>
</fieldset>
</form>
</body>
</html>
EOF;
return $hit_muhl;
}
}
?>
File diff suppressed because it is too large. Load diff
+172 -169
View File
@@ -1,170 +1,173 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Admin Quick Help System
| > Module written by Matt Mecham
| > Date started: 1st march 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Tue 25th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class ad_quickhelp {
var $help_text = array();
function init_help_array()
{
return array( 'mg_dohtml' => array( 'title' => "Posting HTML",
'body' => "This will allow all members of the group to post pure HTML in forums that have the ability to accept raw HTML. You can turn this on and off
for each forum via the edit forum settings function. Note: When HTML in posts in quoted by a member who does not have the permission to post HTML, the
post will be shown in unparsed HTML format with most of the formatting removed.<br />
<br /><b>Warning!</b><br />
Allowing a member to post HTML is a very dangerous thing, you should not enable this functionality on any group that will use it maliciously. Although IPB tries
to filter some of the more harmful content, it is NOT foolproof and this tag CAN be used to steal session cookies, redirect members and destroy the topic view layout.
<br />Invision Power Board and Invision Power Services will not be held responsible for any misfortune that occurs from the usage of this tag.
<br /><br /><b>Use it wisely!</b>
",
),
'mod_mmod' => array( 'title' => "Moderations and Topic Multi-Moderation",
'body' => "If you allow your moderators access to the forums' multi-moderation then you must be aware that they have full use.
<br />For example, if one of your multi-moderation actions allowed the topic to be moved and you do not allow move permissions the
moderator will still be able to use the topic multi-moderation and move the topic.
",
),
'set_spider' => array( 'title' => "What are Search Engine Spiders?",
'body' => "Search engines such as Google 'spider' the web by using special programs to find and add links to the search engine
database.<br />Invision Power can take advantage of separating the bots from the real users and you can then
ensure that they are getting adequate information to help with search engine ranking.
<br />
<br />
<b>Warning!</b>
<br />
Invision Power Board recognises the search engine spiders and crawlers by their user_agent. Please keep in mind
that it's not impossible to fake this and a malicious user could pose as a harmless search engine spider.
<br />This is not a problem as by default the spider will have guest permissions, but it's something that
you should keep in mind when allowing permissions.
<br /><br />Also keep in mind that most search engines do NOT search dynamically generated website for fear
of crashing the server with the constant reading of topics.
",
),
'mg_upload' => array( 'title' => "Upload Permissions",
'body' => "If you wish to allow this group to attach files (upload) when posting, you will have to ensure you have completed the following:
<ul>
<li>You have entered a reasonable numerical figure in the groups 'Max upload file size' field.
<li>You have edited the forum permissions for this group and checked the 'Upload' checkbox.
</ul>
This allows you to control in which forums this group can upload to.
<br><br><b>Warning!</b><br>If, when posting, no post is made and you are returned back to the board index, disable this groups upload by entering 0 into this field. This will turn off the mutli-part form the uploads use.
",
),
'mg_promote' => array( 'title' => "Group Promotion",
'body' => "If enabled (by choosing a member group to promote your members to and by entering a number of posts to achieve this)
when your members meet or exceed the number of posts set they will be 'promoted' to the specified group.
<br><br>
Many administrators use this feature to set up a 'Senior Members' group with more functionality (such as a longer edit time, larger post uploads) and even
allow access to otherwise hidden forums - when your members have made enough posts, they are promoted to this group allowing you to intice more posting and
allow for a more restrictive set of permissions for newcomers.
<br><br><b>Warning!</b><br>Use this feature carefully and always check the information before proceeding.<br>It is possible to advance to an Admin group - you have been warned.
",
),
's_reg_antispam' => array ( 'title' => "Registration AntiSpam",
'body' => "To prevent robots from registering (such as a malicious denial of service attack registering thousands of new accounts and forcing thousands of emails to be sent from your server)
you can enable this option.
<br><br>When enabled, a random 6 digit numerical string is generated and shown in a graphical format (to prevent advanced bots from reading the source page). The user must enter
this string exactly when registering or the account will not be created.",
),
'm_bulkemail' => array ( 'title' => "Bulk Emailing",
'body' => "<b>Overview</b><br>Bulk emailing allows you to target a specific section of your community or email all your registered members.
<br><br><b>Settings</b><br>You can choose which user groups will receive the email and elect to override the user set 'Allow Admin Emails' function. It is NOT recommended that you do override this
however.<hr>
<b>Allowed Tags</b><br>Although the email system sends the mail via BCC to preserve system resources, you can add in dynamic content with the following tags.
<br>{board_name} will return the name of your board
<br>{reg_total} will return the total number of registered members
<br>{total_posts} will return the total number of posts
<br>{busy_count} will return the most number of online users
<br>{busy_time} will return the date of the most online users
<br>{board_url} will return the URL to the board
<br><br>As the email is sent via BCC, it is not possible to include the members username, password or other user profile data.",
),
'comp_menu' => array ( 'title' => "Components menu system",
'body' => "<strong>Menu text</strong> is the actual menu item text. <em>IE: Tools and Settings.</em><br />
<strong>Menu URL</strong> is the final part of the URL. No need to add the full URL or the 'section=components&act=blog' part unless this is a redirect. <em>IE: code={code}</em><br />
<strong>Menu Redirect</strong> if yes, complete the 'act={}&section={}&code={}' part of the URL in the URL box or the redirect may not work.<br />
<strong>Perm Bit and Perm Lang</strong> is the ACP restriction perm bit. Entries: add, remove, edit, rebuild, recount, recache all have
language entries. Any other bit names will require adding into the Perm Bit Language box. Eg: If the perm bit was 'tools', you may enter 'Allow TOOLS Access'.<br />",
),
);
}
function auto_run()
{
$id = $this->ipsclass->input['id'];
$this->help_text = $this->init_help_array();
if ($this->help_text[$id]['title'] == "")
{
$this->ipsclass->admin->error("No help information is available for this function at present");
}
print "<html>
<head>
<title>Quick Help</title>
</head>
<body leftmargin='0' topmargin='0' bgcolor='#F5F9FD'>
<table width='95%' align='center' border='0' cellpadding='6'>
<tr>
<td style='font-family:verdana, arial, tahoma;color:#4C77B6;font-size:16px;letter-spacing:-1px;font-weight:bold'>{$this->help_text[$id]['title']}</td>
</tr>
<tr>
<td style='font-family:verdana, arial, tahoma;color:black;font-size:9pt'>{$this->help_text[$id]['body']}</td>
</tr>
</table>
</body>
</html>";
exit();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ!
| Права на ПО принадлежат Invision Power Services
| Права на перевод IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Admin Quick Help System
| > Module written by Matt Mecham
| > Date started: 1st march 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Tue 25th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Некорректный адрес</h1>Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы.";
exit();
}
class ad_quickhelp {
var $help_text = array();
function init_help_array()
{
return array( 'mg_dohtml' => array( 'title' => "Использование [doHTML] тегов",
'body' => "При использовании [doHTML], все пользователи смогут использовать чистый HTML, в сообщениях. Вы можете включать или отключать эту функцию для каждого форума в секции управления форумами.<br />
<br /><b>Предупреждение!</b><br />
Разрешение пользователям использовать HTML, является небезопасной функцией, поэтому стоит допустить к использованию этой функции, только доверенные Вам группы пользователей, которые не будут использовать это в корыстных целях. Хоть IPB и фильтрует некоторые нежелательные элементы в сообщениях,
но всё равно, опытные пользователи смогут, воспользуясь этими тегами, воровать сеансы cookies, производить редиректы в сообщениях на другие сайты, портить формат отображения тем и т.д.
<br />Invision Power Board и Invision Power Services не несут никакой ответственности за любые неполадки, произосшедшие из-за использования таких тегов.
<br /><br /><b>Используйте это с умом!</b>
",
),
'mod_mmod' => array( 'title' => "Модерация и мульти-модерация тем",
'body' => "Имейте ввиду, что при допуске модераторов к мульти-модерации тем, они смогут полностью воспользоваться этой функцией.
<br />Например, если одно из Ваших правил мульти-модерации, настроено на перемещение тем, но Вы запретили в настройках одного из модераторов перемещать темы,
данный модератор всё равно сможет перемещать темы при помощи функции мульти-модерации.
",
),
'set_spider' => array( 'title' => "Что такое поисковая машина?",
'body' => "Поисковые машины, такие как Google, используют всякие программы, для поиска и добавления ссылок в свои базы данных.<br />Invision Power может использовать ботов, для помощи пользователям, получать необходимую разыскиваемую информацию при использовании поиска.
<br />
<br />
<b>Предупреждение!</b>
<br />
Invision Power Board распознаёт многие поисковые машины и записывает их данные user_agent. Но, в любом случае имейте ввиду,
что возможна и фальсификация, и некоторые пользователи смогут представить себя в виде безопасных поисковых машин.
<br />Это не предоставит Вам никакие проблемы, т.к. бот будет иметь статус гостя, но в любом случае, будьте осторожны.
<br /><br />Также имейте ввиду, что многие поисковые машины, не индексируют
динамически сгенерированные страницы, во избежании перегрузки сервера, при постонном чтении тем.
",
),
'mg_upload' => array( 'title' => "Разрешения загрузки",
'body' => "Если Вы хотите разрешить этой группе присоединять (загружать) файлы в сообщениях, Вы должны проверить следующие данные:
<ul>
<li>Введите разумное числовое значение в поле 'Максимальный размер загружаемых файлов.
<li>Проверьте разрешения форума для этой группы и отметьте поле 'Загрузка'.
</ul>
Вы можете выбрать, в каких форумах эта группа пользователей может загружать файлы.
<br /><br /><b>Предупреждение!</b><br />Если при отправке сообщений, сообщения не будут появляться и Вас будет возвращать на главную страницу форума, отключите возможность загрузки для этой группы, введя 0 в это поле. Этим самым Вы отключите возможность загрузки.
",
),
'mg_promote' => array( 'title' => "Перемещение по группам",
'body' => "При включении этой функции, (необходимо указать группу и кол-во сообщений),
пользователи этой группы, будут перемещены в какую-либо другую группу, при наборе определённого кол-ва сообщений.
<br /><br />
Многие администраторы используют эту функцию в целях выделения активных пользователей форума, для перемещения этих пользователей в более продвинутую группу пользователей, которым доступны определённые функции форума, недоступные пользователям младшей группы (например для разрешения пользователям этой группы загружать и скачивать файлы, загружать собственные аватары и т.д.), а в некоторых случаях
и для доступа этой группы к приватным форумам. Таким образом можно создать младшую группу пользователей и установить для них различные ограничения и при
наборе определённого количества сообщений, переводить этих пользователей в старшую группу, у которых нет никаких ограничений.
<br /><br /><b>Предупреждение!</b><br />Перед включением этой функиции, тщательно проверьте введённые Вами данные.<br />По ошибке Вы можете случайно установить автоперемещение в администраторскую группу, что небезопасно.
",
),
's_reg_antispam' => array ( 'title' => "Антиспам при регистрации",
'body' => "Для предотвращения многочисленных регистраций программами-ботами (которые могут повлечь за собой несколько тысяч ненужных регистраций и несколько тысяч отправленных с Вашего сервера писем),
Вы должны включить эту функцию.
<br /><br />Если включить эту функцию, то будут генерироваться различные 6-значные числа и отображаться в виде рисунка (это послужит препятствием для программ-ботов, которые не смогут прочесть эти числа). Пользователи, при регистрации
должны буду ввести это число в точности, иначе их регистрация будет отклонена.",
),
'm_bulkemail' => array ( 'title' => "Массовая Email рассылка",
'body' => "<b>Обзор</b><br />С помощью массовой e-mail рассылки, Вы сможете уведомлять пользователей определённых групп или всех Ваших пользователей о различных мероприятиях и новостях форума.
<br /><br /><b>Установки</b><br />Вы можете отправить письмо определённой группе пользователей или только пользователям, подписанным на 'Уведомления от Администратора'. Не рекомендуется использовать это для
спама.<hr>
<b>Доступные теги</b><br />В тексте письма Вы можете использовать следующие теги:
<br />{board_name} будет переконвертировано в название Вашего форума
<br />{reg_total} отобразит кол-во зарегистрированных пользователей
<br />{total_posts} отобразит общее кол-во сообщений форума
<br />{busy_count} отобразит рекорд посещаемости форума с кол-вом посетителей
<br />{busy_time} отобразит дату рекорда посещаемости форума
<br />{board_url} отобразит ссылку на Ваш форум
<br /><br />Имя пользователя, пароль и другие данные профилей, использовать не рекомедуется.",
),
'comp_menu' => array ( 'title' => "Меню системы компонентов",
'body' => "<strong>Текст меню</strong> Понятный текст меню. <em>Пример: Утилиты и настройки.</em><br />
<strong>URL меню</strong> &laquo;конечная&raquo; часть URL. Нет нужды вводить полный путь URL. <em>Пример: code={code}</em><br />
<strong>Переадресация?</strong> Если Да, то часть 'act={}&section={}&code={}' пути в поле URL или переадресация могут не работать.<br />
<strong>Название и текст переменной</strong> в системе ограничений доступа в админцент. Примеры: add, remove, edit, rebuild, recount, recache - все имеют
языковые переменные. Любые другие переменные для системы ограничений доступа требуют добавления их в поле &laquo;Название переменной&raquo;. Пример: Если название - 'tools', в поле &laquo;Текст переменной&raquo; вы можете ввести - 'Разрешить доступ к утилитам?'.<br />",
),
);
}
function auto_run()
{
$id = $this->ipsclass->input['id'];
$this->help_text = $this->init_help_array();
if ($this->help_text[$id]['title'] == "")
{
$this->ipsclass->admin->error("Для этой функции нет доступной информации помощи");
}
print "<html>
<head>
<title>Быстрая помощь</title>
</head>
<body leftmargin='0' topmargin='0' bgcolor='#F5F9FD'>
<table width='95%' align='center' border='0' cellpadding='6'>
<tr>
<td style='font-family:verdana, arial, tahoma;color:#4C77B6;font-size:16px;letter-spacing:-1px;font-weight:bold'>{$this->help_text[$id]['title']}</td>
</tr>
<tr>
<td style='font-family:verdana, arial, tahoma;color:black;font-size:9pt'>{$this->help_text[$id]['body']}</td>
</tr>
</table>
</body>
</html>";
exit();
}
}
?>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+223 -192
View File
@@ -2,18 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-10-06 10:09:22 +0100 (Fri, 06 Oct 2006) $
| > $Revision: 611 $
| > $Author: matt $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-12-08 16:41:30 -0500 (Fri, 08 Dec 2006) $
| > $Revision: 781 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Skin Difference Engine
@@ -24,7 +32,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -36,7 +44,7 @@ class ad_skin_diff
* @var string
*/
var $perm_main = "lookandfeel";
/**
* Section title name
*
@@ -47,65 +55,65 @@ class ad_skin_diff
function auto_run()
{
$this->ipsclass->admin->page_detail = "Compare your template set differences.";
$this->ipsclass->admin->page_title = "Skin Template HTML Differences";
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Skin Differences Home' );
$this->ipsclass->admin->page_detail = "Ñðàâíèòü âàø ñòèëü.";
$this->ipsclass->admin->page_title = "HTML Ñðàâíåíèå ñòèëåé";
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Ñðàâíåíèå' );
//-----------------------------------------
// LOAD HTML
//-----------------------------------------
$this->html = $this->ipsclass->acp_load_template('cp_skin_lookandfeel');
//-----------------------------------------
// What to do?
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'skin_diff':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' );
$this->skin_differences_start();
break;
case 'skin_diff_process':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' );
$this->skin_differences_process();
break;
case 'skin_diff_view':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' );
$this->skin_differences_view();
break;
case 'skin_diff_export':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':export' );
$this->skin_differences_export();
break;
case 'skin_diff_view_diff':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' );
$this->skin_differences_view_diff();
break;
case 'skin_diff_from_skin':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':rundiff' );
$this->skin_differences_start_from_skin();
break;
case 'skin_diff_remove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->skin_differences_remove();
break;
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->skin_differences_list();
break;
}
}
/*-------------------------------------------------------------------------*/
// Compare skin differences [VIEW]
/*-------------------------------------------------------------------------*/
@@ -119,47 +127,47 @@ class ad_skin_diff
//-----------------------------------------
// Init
//-----------------------------------------
$diff_session_id = intval( $this->ipsclass->input['diff_session_id'] );
//-----------------------------------------
// Get current session
//-----------------------------------------
$current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) );
if ( ! $current_session['diff_session_id'] )
{
$this->ipsclass->admin->error("Could not get the current template compare session.");
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà.");
}
//-----------------------------------------
// Delete from IMPORT
//-----------------------------------------
$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'templates_diff_import', 'where' => 'diff_session_id='.$diff_session_id ) );
//-----------------------------------------
// Delete from SESSION
//-----------------------------------------
$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) );
//-----------------------------------------
// Delete from CHANGES
//-----------------------------------------
$this->ipsclass->DB->build_and_exec_query( array( 'delete' => 'template_diff_changes', 'where' => 'diff_session_id='.$diff_session_id ) );
//-----------------------------------------
// Done...
//-----------------------------------------
$this->ipsclass->main_msg = "Differences report removed";
$this->ipsclass->main_msg = "Îò÷åò î ðàçëè÷èÿõ óäàëåí";
$this->skin_differences_list();
}
/*-------------------------------------------------------------------------*/
// Compare skin differences [EXPORT]
/*-------------------------------------------------------------------------*/
@@ -173,58 +181,58 @@ class ad_skin_diff
//-----------------------------------------
// Init
//-----------------------------------------
$diff_session_id = intval( $this->ipsclass->input['diff_session_id'] );
$content = '';
$missing = 0;
$changed = 0;
//-----------------------------------------
// Get current session
//-----------------------------------------
$current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) );
if ( ! $current_session['diff_session_id'] )
{
$this->ipsclass->admin->error("Could not get the current template compare session.");
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà");
}
//-----------------------------------------
// Get data
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => '*',
'from' => 'template_diff_changes',
'where' => 'diff_session_id='.$diff_session_id,
'order' => 'diff_change_func_group ASC, diff_change_func_name ASC' ) );
$this->ipsclass->DB->exec_query();
while( $row = $this->ipsclass->DB->fetch_row() )
{
//-----------------------------------------
// Culmulate
//-----------------------------------------
$row['diff_change_type'] ? $changed++ : $missing++;
$row['diff_change_content'] = str_replace( "\n", "<br>", $row['diff_change_content']);
$row['diff_change_content'] = str_replace( "&gt;&lt;", "&gt;\n&lt;" ,$row['diff_change_content']);
$row['diff_change_content'] = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", "&nbsp;" ,$row['diff_change_content']);
$content .= $this->html->skin_diff_export_row( $row['diff_change_func_name'], $row['diff_change_func_group'], $row['diff_change_content'] );
}
$content = $this->html->skin_diff_export_overview( $content, $missing, $changed, $current_session['diff_session_title'], gmdate( 'r' ) );
$this->ipsclass->admin->show_download( $content, 'ipb-difference-export.html', "unknown/unknown", 0 );
$this->ipsclass->admin->output();
}
/*-------------------------------------------------------------------------*/
// Compare skin differences [VIEW]
/*-------------------------------------------------------------------------*/
@@ -238,33 +246,33 @@ class ad_skin_diff
//-----------------------------------------
// Init
//-----------------------------------------
$diff_key = $this->ipsclass->input['diff_key'];
//-----------------------------------------
// Get data
//-----------------------------------------
$diff_row = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
'from' => 'template_diff_changes',
'where' => "diff_change_key='".$diff_key."'" ) );
if ( ! $diff_row['diff_change_key'] )
{
$this->ipsclass->admin->error( "No key found" );
$this->ipsclass->admin->error( "Êëþ÷ íå íàéäåí" );
}
$diff_row['diff_change_content'] = str_replace( "\n", "<br>", $diff_row['diff_change_content']);
$diff_row['diff_change_content'] = str_replace( "&gt;&lt;", "&gt;\n&lt;" ,$diff_row['diff_change_content']);
$diff_row['diff_change_content'] = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", "&nbsp;" ,$diff_row['diff_change_content']);
$this->ipsclass->html = $this->html->skin_diff_view_bit( $diff_row['diff_change_func_group'], $diff_row['diff_change_func_name'], $diff_row['diff_change_content'] );
$this->ipsclass->admin->print_popup();
}
/*-------------------------------------------------------------------------*/
// Compare skin differences [VIEW]
/*-------------------------------------------------------------------------*/
@@ -278,83 +286,83 @@ class ad_skin_diff
//-----------------------------------------
// Init
//-----------------------------------------
$diff_session_id = intval( $this->ipsclass->input['diff_session_id'] );
$content = '';
$missing = 0;
$changed = 0;
$last_group = '';
//-----------------------------------------
// Get current session
//-----------------------------------------
$current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) );
if ( ! $current_session['diff_session_id'] )
{
$this->ipsclass->admin->error("Could not get the current template compare session.");
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà.");
}
//-----------------------------------------
// Get data
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => '*',
'from' => 'template_diff_changes',
'where' => 'diff_session_id='.$diff_session_id,
'order' => 'diff_change_func_group ASC, diff_change_func_name ASC' ) );
$this->ipsclass->DB->exec_query();
while( $row = $this->ipsclass->DB->fetch_row() )
{
//-----------------------------------------
// Gen data
//-----------------------------------------
$key = $diff_session_id.':'.$row['diff_change_func_group'].':'.$row['diff_change_func_name'];
$size = $this->ipsclass->size_format( $this->ipsclass->math_strlen_to_bytes( strlen( $row['diff_change_content'] ) ) );
//-----------------------------------------
// Diff type
//-----------------------------------------
if ( ! $row['diff_change_type'] )
{
$diff_is = '<span style="color:red">New</span>';
$diff_is = '<span style="color:red">Íîâîå</span>';
$missing++;
}
else
{
$diff_is = '<span style="color:green">Changed</span>';
$diff_is = '<span style="color:green">Èçìåíåíî</span>';
$changed++;
}
//-----------------------------------------
// New cat?
//-----------------------------------------
if ( $last_group != $row['diff_change_func_group'] )
{
$last_group = $row['diff_change_func_group'];
$content .= $this->html->skin_diff_row_newgroup( $row['diff_change_func_group'] );
}
//-----------------------------------------
// Culmulate
//-----------------------------------------
$content .= $this->html->skin_diff_row( $row['diff_change_func_name'], $size, $key, $diff_is, str_replace( ':', '_', $key ) );
}
$this->ipsclass->html = $this->html->skin_diff_overview( $content, $missing, $changed );
$this->ipsclass->admin->output();
}
/*-------------------------------------------------------------------------*/
// Compare skin differences: From 1 skin to another
/*-------------------------------------------------------------------------*/
@@ -368,60 +376,62 @@ class ad_skin_diff
//-----------------------------------------
// Init
//-----------------------------------------
$content = "";
$skin_id = intval( $this->ipsclass->input['skin_id'] );
//-----------------------------------------
// Check...
//-----------------------------------------
if ( ! $skin_id )
{
$this->ipsclass->admin->error( "No skin ID passed!" );
}
//-----------------------------------------
// Get skin set...
//-----------------------------------------
$skin_set = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'skin_sets', 'where' => 'set_skin_set_id='.$skin_id ) );
if ( ! $skin_set['set_skin_set_id'] )
{
$this->ipsclass->admin->error( "No skin ID passed (again)!" );
$this->ipsclass->admin->error( "Íå âûáðàí ID ñòèëÿ (çàíîâî!)" );
}
//-----------------------------------------
// Get number template bits
//-----------------------------------------
$total_bits = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', 'from' => 'skin_templates', 'where' => 'set_id=1' ) );
//-----------------------------------------
// Create session
//-----------------------------------------
$this->ipsclass->DB->do_insert( 'template_diff_session', array( 'diff_session_togo' => intval( $total_bits['count'] ),
'diff_session_done' => 0,
'diff_session_title' => "Comparion from skin set: ".$skin_set['set_name'],
'diff_session_title' => "Ñðàâíåíèå ñî ñòèëåì: ".$skin_set['set_name'],
'diff_session_updated' => time(),
'diff_session_ignore_missing' => 1 ) );
$diff_session_id = $this->ipsclass->DB->get_insert_id();
$seen_templates = array();
//-----------------------------------------
// Grab template bits from DB
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'set_id='.$skin_id ) );
$outer = $this->ipsclass->DB->exec_query();
$seen_templates = array();
while( $entry = $this->ipsclass->DB->fetch_row( $outer ) )
{
if( !array_key_exists( $entry[ 'group_name' ].':'.$entry[ 'func_name' ], $seen_templates) )
$check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'diff_key', 'from' => 'templates_diff_import', 'where' => "diff_key='".$diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ]."'" ) );
if( $this->ipsclass->DB->get_num_rows() == 0 )
{
$this->ipsclass->DB->do_insert( 'templates_diff_import', array( 'diff_key' => $diff_session_id.':'.$entry[ 'group_name' ].':'.$entry[ 'func_name' ],
'diff_func_group' => $entry[ 'group_name' ],
@@ -443,10 +453,10 @@ class ad_skin_diff
}
}
}
$this->ipsclass->admin->output_multiple_redirect_init( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=skin_diff_process&diff_session_id={$diff_session_id}&pergo=10" );
}
/*-------------------------------------------------------------------------*/
// Compare skin differences
/*-------------------------------------------------------------------------*/
@@ -460,146 +470,146 @@ class ad_skin_diff
//-----------------------------------------
// Init
//-----------------------------------------
$content = "";
$seen = array();
//-----------------------------------------
// Check...
//-----------------------------------------
if ( ! $this->ipsclass->input['diff_session_title'] )
{
$this->ipsclass->admin->error( "You must enter a title" );
$this->ipsclass->admin->error( "Âû äîëæíû ââåñòè íàçâàíèå" );
}
//-----------------------------------------
// Get uploaded file
//-----------------------------------------
if ( $_FILES['FILE_UPLOAD']['name'] == "" or ! $_FILES['FILE_UPLOAD']['name'] or ($_FILES['FILE_UPLOAD']['name'] == "none") )
{
//-----------------------------------------
// Ut-oh....
//-----------------------------------------
$this->ipsclass->admin->error( "No file was uploaded" );
$this->ipsclass->admin->error( "Ôàéë íå áûë çàãðóæåí" );
}
else
{
//-----------------------------------------
// Get uploaded schtuff
//-----------------------------------------
$tmp_name = $_FILES['FILE_UPLOAD']['name'];
$tmp_name = preg_replace( "#\.gz$#", "", $tmp_name );
$content = $this->ipsclass->admin->import_xml( $tmp_name );
}
if( !$content )
{
$this->ipsclass->admin->error( "There was no content in the file to process" );
}
//-----------------------------------------
// Get number missing template bits
//-----------------------------------------
$total_bits = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(*) as count', 'from' => 'skin_templates', 'where' => 'set_id=1' ) );
//-----------------------------------------
// Create session
//-----------------------------------------
$this->ipsclass->DB->allow_sub_select = 1;
$this->ipsclass->DB->do_insert( 'template_diff_session', array( 'diff_session_togo' => intval( $total_bits['count'] ),
'diff_session_done' => 0,
'diff_session_title' => $this->ipsclass->input['diff_session_title'],
'diff_session_updated' => time(),
'diff_session_ignore_missing' => intval( $this->ipsclass->input['diff_session_ignore_missing'] ) ) );
$diff_session_id = $this->ipsclass->DB->get_insert_id();
//-----------------------------------------
// Get xml mah-do-dah
//-----------------------------------------
require_once( KERNEL_PATH.'class_xml.php' );
$xml = new class_xml();
//-----------------------------------------
// Check to see if its an archive...
//-----------------------------------------
if ( preg_match( "#<xmlarchive generator=\"IPB\"#si", $content ) )
{
//-----------------------------------------
// It is an archive... expand...
//-----------------------------------------
require( KERNEL_PATH.'class_xmlarchive.php' );
$xmlarchive = new class_xmlarchive( KERNEL_PATH );
$xmlarchive->xml_read_archive_data( $content );
//-----------------------------------------
// Get the XML documents
//-----------------------------------------
$import_xml = array();
foreach( $xmlarchive->file_array as $f )
{
$import_xml[ $f['filename'] ] = $f['content'];
}
//-----------------------------------------
// Import Templates
//-----------------------------------------
$content = $import_xml['ipb_templates.xml'];
}
//-----------------------------------------
// Parse document
//-----------------------------------------
$xml->xml_parse_document( $content );
//-----------------------------------------
// Import template bits...
//-----------------------------------------
if ( ! is_array( $xml->xml_array['templateexport']['templategroup']['template'] ) )
{
$this->ipsclass->admin->error("Error with ipb_templates.xml - could not process XML properly");
$this->ipsclass->admin->error("Îøèáêà ñ ipb_templates.xml - ïðîäîëæèòü íåâîçìîæíî");
}
foreach( $xml->xml_array['templateexport']['templategroup']['template'] as $entry )
{
$diff_key = $diff_session_id.':'.$entry[ 'group_name' ]['VALUE'].':'.$entry[ 'func_name' ]['VALUE'];
if ( ! $seen[ $diff_key ] )
{
$this->ipsclass->DB->allow_sub_select = 1;
$this->ipsclass->DB->do_insert( 'templates_diff_import', array( 'diff_key' => $diff_session_id.':'.$entry[ 'group_name' ]['VALUE'].':'.$entry[ 'func_name' ]['VALUE'],
'diff_func_group' => $entry[ 'group_name' ]['VALUE'],
'diff_func_data' => $entry[ 'func_data' ]['VALUE'],
'diff_func_name' => $entry[ 'func_name' ]['VALUE'],
'diff_func_content' => $entry[ 'section_content' ]['VALUE'],
'diff_session_id' => $diff_session_id ) );
$seen[ $diff_key ] = 1;
}
}
$this->ipsclass->admin->output_multiple_redirect_init( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=skin_diff_process&diff_session_id={$diff_session_id}&pergo=10" );
}
/*-------------------------------------------------------------------------*/
// Compare skin differences [PROCESS]
/*-------------------------------------------------------------------------*/
@@ -613,43 +623,43 @@ class ad_skin_diff
//-----------------------------------------
// INIT
//-----------------------------------------
$pergo = intval( $this->ipsclass->input['pergo'] ) ? intval( $this->ipsclass->input['pergo'] ) : 10;
$diff_session_id = intval( $this->ipsclass->input['diff_session_id'] );
$done = 0;
$img = '<img src="'.$this->ipsclass->skin_acp_url.'/images/aff_tick_small.png" border="0" alt="-" /> ';
//-----------------------------------------
// Get current session
//-----------------------------------------
$current_session = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*', 'from' => 'template_diff_session', 'where' => 'diff_session_id='.$diff_session_id ) );
if ( ! $current_session['diff_session_id'] )
{
$this->ipsclass->admin->error("Could not get the current template compare session.");
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü òåêóùóþ ñåññèþ øàáëîíà.");
}
//-----------------------------------------
// Get Diff library
//-----------------------------------------
require_once( KERNEL_PATH . 'class_difference.php' );
$class_difference = new class_difference();
$class_difference->method = 'PHP';
//-----------------------------------------
// Get template bits to check
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => '*',
'from' => 'skin_templates',
'where' => 'set_id=1',
'order' => 'suid ASC',
'limit' => array( intval( $current_session['diff_session_done'] ), intval( $pergo ) ) ) );
$outer = $this->ipsclass->DB->exec_query();
if ( ! $this->ipsclass->DB->get_num_rows( $outer ) )
{
$done = 1;
@@ -661,35 +671,56 @@ class ad_skin_diff
//-----------------------------------------
// Get corresponding row from diff table
//-----------------------------------------
$diff_row = $this->ipsclass->DB->build_and_exec_query( array( 'select' => '*',
'from' => 'templates_diff_import',
'where' => "diff_func_group='{$row['group_name']}' AND diff_func_name='{$row['func_name']}' AND diff_session_id=".$diff_session_id ) );
//-----------------------------------------
// Got anything?
//-----------------------------------------
if ( $diff_row['diff_key'] )
{
//-----------------------------------------
// Get difference
//-----------------------------------------
$difference = $class_difference->get_differences( $diff_row['diff_func_content'], $row['section_content'] );
$difference = $class_difference->get_differences( $row['section_content'], $diff_row['diff_func_content'] );
//-----------------------------------------
// Got any differences?
//-----------------------------------------
if ( $class_difference->diff_found )
{
$this->ipsclass->DB->do_insert( 'template_diff_changes', array( 'diff_change_key' => $diff_session_id.':'.$row['group_name'].':'.$row['func_name'],
'diff_change_func_group' => $row['group_name'],
'diff_change_func_name' => $row['func_name'],
'diff_change_content' => $difference,
'diff_change_type' => 1,
'diff_session_id' => $diff_session_id ) );
//-----------------------------------------
// Get corresponding row from diff table
//-----------------------------------------
$diff_check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'diff_change_key',
'from' => 'template_diff_changes',
'where' => "diff_change_key='" . $diff_session_id.':'.$row['group_name'].':'.$row['func_name'] . "'" ) );
if( $diff_check['diff_change_key'] )
{
$this->ipsclass->DB->do_update( 'template_diff_changes', array( 'diff_change_func_group' => $row['group_name'],
'diff_change_func_name' => $row['func_name'],
'diff_change_content' => $difference,
'diff_change_type' => 1,
'diff_session_id' => $diff_session_id ),
"diff_change_key='" . $diff_session_id.':'.$row['group_name'].':'.$row['func_name'] . "'" );
}
else
{
$this->ipsclass->DB->do_insert( 'template_diff_changes', array( 'diff_change_key' => $diff_session_id.':'.$row['group_name'].':'.$row['func_name'],
'diff_change_func_group' => $row['group_name'],
'diff_change_func_name' => $row['func_name'],
'diff_change_content' => $difference,
'diff_change_type' => 1,
'diff_session_id' => $diff_session_id ) );
}
}
}
else
@@ -704,36 +735,36 @@ class ad_skin_diff
'diff_session_id' => $diff_session_id ) );
}
}
//-----------------------------------------
// Increment
//-----------------------------------------
$current_session['diff_session_done']++;
}
}
//-----------------------------------------
// Update current session
//-----------------------------------------
$this->ipsclass->DB->do_update( 'template_diff_session', array( 'diff_session_done' => intval( $current_session['diff_session_done'] ) ), 'diff_session_id='.$diff_session_id );
//-----------------------------------------
// Done or more?
//-----------------------------------------
if ( ! $done )
{
$this->ipsclass->admin->output_multiple_redirect_hit( $this->ipsclass->base_url.'&'.$this->ipsclass->form_code_js."&code=skin_diff_process&diff_session_id={$diff_session_id}&pergo=".$pergo,
$img.' '.$current_session['diff_session_done'].' of '. $current_session['diff_session_togo'] .' template bits processed...' );
$img.' '.$current_session['diff_session_done'].' èç '. $current_session['diff_session_togo'] .' øàáëîíîâ îáðàáîòàíî...' );
}
else
{
$this->ipsclass->admin->output_multiple_redirect_done( "<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=skin_diff_view&diff_session_id={$diff_session_id}' target='_top'>View the differences results</a>");
$this->ipsclass->admin->output_multiple_redirect_done( "<a href='{$this->ipsclass->base_url}&{$this->ipsclass->form_code}&code=skin_diff_view&diff_session_id={$diff_session_id}' target='_top'>Ðåçóëüòàòû</a>");
}
}
/*-------------------------------------------------------------------------*/
// Compare skin differences [START]
/*-------------------------------------------------------------------------*/
@@ -747,40 +778,40 @@ class ad_skin_diff
//-----------------------------------------
// Init
//-----------------------------------------
$content = '';
//-----------------------------------------
// Get sessions
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => '*',
'from' => 'template_diff_session',
'order' => 'diff_session_updated DESC' ) );
$this->ipsclass->DB->exec_query();
while( $row = $this->ipsclass->DB->fetch_row() )
{
//-----------------------------------------
// Gen data
//-----------------------------------------
$row['_date'] = $this->ipsclass->get_date( $row['diff_session_updated'], 'TINY' );
//-----------------------------------------
// Culmulate
//-----------------------------------------
$content .= $this->html->skin_diff_main_row( $row );
}
$this->ipsclass->html = $this->html->skin_diff_main_overview( $content );
$this->ipsclass->admin->output();
}
}
File diff suppressed because it is too large. Load diff
+491 -483
View File
@@ -1,484 +1,492 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-10-05 17:04:08 +0100 (Thu, 05 Oct 2006) $
| > $Revision: 609 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Skin -> Image Macro functions
| > Module written by Matt Mecham
| > Date started: 4th April 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Tue 25th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class ad_skin_macros {
var $base_url;
/**
* Section title name
*
* @var string
*/
var $perm_main = "lookandfeel";
/**
* Section title name
*
* @var string
*/
var $perm_child = "image";
function auto_run()
{
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'edit':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->show_macros();
break;
case 'doedit':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->edit_set_name();
break;
case 'macroremove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->macro_remove();
break;
case 'doeditmacro':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->macro_edit();
break;
case 'doaddmacro':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );
$this->macro_add();
break;
default:
print "No action"; exit();
break;
}
}
//-----------------------------------------
// Remove macro
//-----------------------------------------
function macro_remove()
{
if ($this->ipsclass->input['mid'] == "")
{
$this->ipsclass->admin->error("You must specify an existing macro ID, go back and try again");
}
$id = intval($this->ipsclass->input['id']);
$p = intval($this->ipsclass->input['p']);
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
//-----------------------------------------
// Recache macros
//-----------------------------------------
$this->ipsclass->cache_func->_recache_macros($id, $p);
//-----------------------------------------
// Bounce back
//-----------------------------------------
$this->ipsclass->input['id'] = $id;
$this->ipsclass->main_msg = "Macro removed!";
$this->show_macros();
}
//-----------------------------------------
// Apply the edit to the DB
//-----------------------------------------
function macro_edit()
{
if ($this->ipsclass->input['mid'] == "")
{
$this->ipsclass->admin->error("You must specify an existing image set ID, go back and try again");
}
$id = intval($this->ipsclass->input['id']);
$p = intval($this->ipsclass->input['p']);
$key = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['variable']) );
$val = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['replacement']) );
//-----------------------------------------
// Get macro for examination..
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
$this->ipsclass->DB->simple_exec();
if ( ! $row = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->admin->error("Could not retrieve the record from the DB");
}
//-----------------------------------------
// Is this our macro set?
//-----------------------------------------
if ( $row['macro_set'] == $id )
{
//-----------------------------------------
// Okay, update...
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'update' => 'skin_macro', 'set' => "macro_value='$key', macro_replace='$val'", 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
$this->ipsclass->DB->simple_exec();
}
else
{
//-----------------------------------------
// No? OK - best add it as a 'new' macro
//-----------------------------------------
$this->ipsclass->DB->manual_addslashes = 1;
$this->ipsclass->DB->do_insert( 'skin_macro', array (
'macro_value' => $key,
'macro_replace' => $val,
'macro_can_remove' => 1,
'macro_set' => $id
) );
$this->ipsclass->DB->manual_addslashes = 0;
}
//-----------------------------------------
// Recache macros
//-----------------------------------------
$this->ipsclass->cache_func->_recache_macros($id, $p);
//-----------------------------------------
// Bounce back
//-----------------------------------------
$this->ipsclass->input['id'] = $id;
$this->show_macros();
}
//-----------------------------------------
// ADD MACRO
//-----------------------------------------
function macro_add()
{
if ($this->ipsclass->input['mid'] == "")
{
$this->ipsclass->admin->error("You must specify an existing macro set ID, go back and try again");
}
$id = intval($this->ipsclass->input['id']);
$p = intval($this->ipsclass->input['p']);
$this->ipsclass->DB->do_insert( 'skin_macro', array (
'macro_value' => $this->ipsclass->txt_safeslashes($_POST['variable']),
'macro_replace' => $this->ipsclass->txt_safeslashes($_POST['replacement']),
'macro_can_remove' => 1,
'macro_set' => $id
) );
//-----------------------------------------
// Recache macros
//-----------------------------------------
$this->ipsclass->cache_func->_recache_macros($id, $p);
//-----------------------------------------
// Bounce back
//-----------------------------------------
$this->ipsclass->input['id'] = $id;
$this->show_macros();
}
//-----------------------------------------
// Show macros
//-----------------------------------------
function show_macros()
{
//-----------------------------------------
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("You must specify an existing macro set ID, go back and try again");
}
//-----------------------------------------
// check tree...
//-----------------------------------------
$this_set = "";
if ( $this->ipsclass->input['p'] > 0 )
{
$in = ','.$this->ipsclass->input['p'];
}
//-----------------------------------------
// Get macros
//-----------------------------------------
$macros = $this->ipsclass->cache_func->_get_macros($this->ipsclass->input['id'], $this->ipsclass->input['p']);
//-----------------------------------------
// Get img_dir this set is using...
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) );
$this->ipsclass->DB->simple_exec();
$skin = $this->ipsclass->DB->fetch_row();
$this->ipsclass->admin->page_detail = "To edit a macro, simply click on the 'edit' link of the appropriate macro.";
$this->ipsclass->admin->page_title = "Manage Replacement Macros in Set: {$skin['set_name']}";
//-----------------------------------------
// Start output
//-----------------------------------------
$this->ipsclass->html .= "<script type='text/javascript'>
function editmacro(id, variable, replace)
{
document.macroform.code.value = 'doeditmacro';
document.macroform.submitbutton.value = 'Edit This Macro';
document.macroform.mid.value = id;
document.macroform.variable.value = variable;
document.macroform.replacement.value = replace;
scroll(0,0);
togglediv( 'popbox', 1 );
return false;
}
function addmacro(id)
{
document.macroform.code.value = 'doaddmacro';
document.macroform.submitbutton.value = 'Add This Macro';
document.macroform.mid.value = id;
document.macroform.variable.value = '';
document.macroform.replacement.value = '';
scroll(0,0);
togglediv( 'popbox', 1 );
return false;
}
function removemacro(url)
{
checkdelete(url);
}
</script>
<div class='tableborder'>
<div class='tableheaderalt'>
<table cellpadding='0' cellspacing='0' border='0' width='100%'>
<tr>
<td align='left' width='100%' style='font-weight:bold;font-size:11px;color:#FFF'>Manage Replacement Macros</td>
<td align='right' nowrap='nowrap' style='padding-right:2px'><input type='button' class='realdarkbutton' value='Add Macro' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" /></td>
</tr>
</table>
<div align='center' style='position:absolute;display:none;text-align:center;' id='popbox'>
<form name='macroform' action='{$this->ipsclass->base_url}' method='post'>
<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />
<input type='hidden' name='act' value='image' />
<input type='hidden' name='section' value='{$this->ipsclass->section_code}' />
<input type='hidden' name='code' value='' />
<input type='hidden' name='mid' value='' />
<input type='hidden' name='id' value='{$this->ipsclass->input['id']}' />
<input type='hidden' name='p' value='{$this->ipsclass->input['p']}' />
<table cellspacing='0' width='500' align='center' cellpadding='6' style='background:#EEE;border:2px outset #555;'>
<tr>
<td width='1%' nowrap='nowrap' valign='top'>
<b>Variable</b><br><input class='textinput' name='variable' type='text' size='20' />
<br /><br />
<center><input type='submit' class='realbutton' value='Edit Macro' name='submitbutton' /> <input type='button' class='realdarkbutton' value='Close' onclick=\"togglediv('popbox');\" /></center>
</td>
<td width='99%'><b>Replacement</b><br /><textarea class='textinput' name='replacement' style='width:99%;height:50px'></textarea></td>
</tr>
</table>
</form>
</div>
</div>
</div>
";
$this->ipsclass->html .= "<div class='tableborder'>\n<div class='tablepad'>\n<table width='100%' cellspacing='0' cellpadding='0' border='0'>";
$this->unaltered = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_unaltered.gif' border='0' alt='-' title='Unaltered from parent skin set' />&nbsp;";
$this->altered = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_altered.gif' border='0' alt='+' title='Altered from parent skin set' />&nbsp;";
$this->inherited = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_inherited.gif' border='0' alt='|' title='Inherited from parent skin set' />&nbsp;";
//-----------------------------------------
// Loop and print
//-----------------------------------------
foreach( $macros as $row )
{
$real = $this->ipsclass->txt_htmlspecialchars( $row['macro_replace'] );
$real = str_replace("\n", '\n', str_replace( "\r", '\r', $real) );
//-----------------------------------------
// Altered?
//-----------------------------------------
if ( $row['macro_set'] == $this->ipsclass->input['id'] )
{
$altered_image = $this->altered;
$css_info = '#FFDCD8';
}
else if ( $row['macro_set'] == 1 )
{
$altered_image = $this->unaltered;
$css_info = '#EEE';
}
else
{
$altered_image = $this->inherited;
$css_info = '#FFF2D3';
}
//-----------------------------------------
// Figure out quotes
//-----------------------------------------
$out_quote = '"';
$in_quote = "'";
if ( preg_match( "/&#039;/", $real ) )
{
$out_quote = "'";
$in_quote = '"';
}
if( $in_quote == '"' )
{
$real = str_replace( "&quot;", '\"', $real );
}
if( $in_quote == "'" )
{
$real = str_replace( "'", "\\'", $real );
}
$preview = str_replace( "<#IMG_DIR#>", $skin['set_image_dir'], $row['macro_replace'] );
if ( $row['macro_set'] > 1 and $row['macro_set'] == $this->ipsclass->input['id'] )
{
$remove_button = "<input type='button' class='realbutton' name='remove' value='Revert' onclick=\"removemacro('{$this->ipsclass->form_code_js}&code=macroremove&mid={$row['macro_id']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}');\" />";
}
else
{
$remove_button = "";
}
//-----------------------------------------
// Not an image?
//-----------------------------------------
if ( ! preg_match( "#img\s{1,}src=#i", $row['macro_replace'] ) )
{
$preview = substr( $real, 0, 200 );
}
else
{
$preview = preg_replace( "#style_images#", $this->ipsclass->vars['board_url'].'/style_images', $preview );
}
$edit_button = "<input type='button' class='realbutton' value='Change' onclick={$out_quote}editmacro( {$in_quote}{$row['macro_id']}{$in_quote}, {$in_quote}{$row['macro_value']}{$in_quote}, {$in_quote}$real{$in_quote});{$out_quote} />";
//-----------------------------------------
// Render row
//-----------------------------------------
$style = "padding:4px;border-bottom:1px solid #DDD;background:{$css_info}";
$this->ipsclass->html .= "<tr>
<!--<td style='$style' align='center' width='1%'><img src='{$this->ipsclass->skin_acp_url}/images/skin_macro.gif' alt='Macro' title='ID: {$row['macro_id']}' style='vertical-align:middle' /></td>-->
<td style='$style' align='left' width='1%' nowrap='nowrap'>$altered_image
&nbsp;&lt;{<span style='font-size:11px;font-weight:bold' title='ID: {$row['macro_id']}. SET: {$row['macro_set']}' href='#' >{$row['macro_value']}</span>}&gt;
</td>
<td style='$style;padding-right:3px;text-align:center;' align='center' width='99%' align='center'>$preview</td>
<td style='$style' align='right' width='40%' nowrap='nowrap'>$remove_button $edit_button</td>
</tr>
";
}
$this->ipsclass->html .= "</table>
</div>
<div class='tablesubheader' align='center'>
<input type='button' class='realdarkbutton' value='Add Macro' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" />
</div>
</div>";
$this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap();
//-----------------------------------------
// Show altered / unaltered
// legend
//-----------------------------------------
$this->ipsclass->html .= "<br />
<div><strong>Replace Macro Example</strong><br />
If you added a key of 'green_font' and a replacement of '&lt;font color='green'>', each instance of <span style='color:red'><b>&lt;{green_font}&gt;</b></span> would be converted to &lt;font color='green'>
<br /><b>&lt;#IMG_DIR#></b> is available to any macro, this is automatically replaced with the name of the image directory you choose when using this macro set in a skin
</div><br />
<div><strong>Replacement Macro Legend:</strong><br />
{$this->altered} This item has been customized for this skin set.
<br />{$this->unaltered} This item has not been customized from the master skin set.
<br />{$this->inherited} This item has inherited customizations from the parent skin set.
</div>";
$this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Skin Manager Home' );
$this->ipsclass->admin->nav[] = array( '' ,'Editing Replacement Macros in Set '.$skin['set_name'] );
$this->ipsclass->admin->output();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-10-05 11:04:08 -0500 (Thu, 05 Oct 2006) $
| > $Revision: 609 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Skin -> Image Macro functions
| > Module written by Matt Mecham
| > Date started: 4th April 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Tue 25th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class ad_skin_macros {
var $base_url;
/**
* Section title name
*
* @var string
*/
var $perm_main = "lookandfeel";
/**
* Section title name
*
* @var string
*/
var $perm_child = "image";
function auto_run()
{
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'edit':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->show_macros();
break;
case 'doedit':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->edit_set_name();
break;
case 'macroremove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->macro_remove();
break;
case 'doeditmacro':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->macro_edit();
break;
case 'doaddmacro':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':add' );
$this->macro_add();
break;
default:
print "Äåéñòâèå íå âûáðàíî"; exit();
break;
}
}
//-----------------------------------------
// Remove macro
//-----------------------------------------
function macro_remove()
{
if ($this->ipsclass->input['mid'] == "")
{
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
}
$id = intval($this->ipsclass->input['id']);
$p = intval($this->ipsclass->input['p']);
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
//-----------------------------------------
// Recache macros
//-----------------------------------------
$this->ipsclass->cache_func->_recache_macros($id, $p);
//-----------------------------------------
// Bounce back
//-----------------------------------------
$this->ipsclass->input['id'] = $id;
$this->ipsclass->main_msg = "Ìàêðîñ óäàëåí!";
$this->show_macros();
}
//-----------------------------------------
// Apply the edit to the DB
//-----------------------------------------
function macro_edit()
{
if ($this->ipsclass->input['mid'] == "")
{
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
}
$id = intval($this->ipsclass->input['id']);
$p = intval($this->ipsclass->input['p']);
$key = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['variable']) );
$val = $this->ipsclass->DB->add_slashes( $this->ipsclass->txt_safeslashes($_POST['replacement']) );
//-----------------------------------------
// Get macro for examination..
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_macro', 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
$this->ipsclass->DB->simple_exec();
if ( ! $row = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü çàïèñü èç áàçû äàííûõ");
}
//-----------------------------------------
// Is this our macro set?
//-----------------------------------------
if ( $row['macro_set'] == $id )
{
//-----------------------------------------
// Okay, update...
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'update' => 'skin_macro', 'set' => "macro_value='$key', macro_replace='$val'", 'where' => "macro_id=".intval($this->ipsclass->input['mid']) ) );
$this->ipsclass->DB->simple_exec();
}
else
{
//-----------------------------------------
// No? OK - best add it as a 'new' macro
//-----------------------------------------
$this->ipsclass->DB->manual_addslashes = 1;
$this->ipsclass->DB->do_insert( 'skin_macro', array (
'macro_value' => $key,
'macro_replace' => $val,
'macro_can_remove' => 1,
'macro_set' => $id
) );
$this->ipsclass->DB->manual_addslashes = 0;
}
//-----------------------------------------
// Recache macros
//-----------------------------------------
$this->ipsclass->cache_func->_recache_macros($id, $p);
//-----------------------------------------
// Bounce back
//-----------------------------------------
$this->ipsclass->input['id'] = $id;
$this->show_macros();
}
//-----------------------------------------
// ADD MACRO
//-----------------------------------------
function macro_add()
{
if ($this->ipsclass->input['mid'] == "")
{
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
}
$id = intval($this->ipsclass->input['id']);
$p = intval($this->ipsclass->input['p']);
$this->ipsclass->DB->do_insert( 'skin_macro', array (
'macro_value' => $this->ipsclass->txt_safeslashes($_POST['variable']),
'macro_replace' => $this->ipsclass->txt_safeslashes($_POST['replacement']),
'macro_can_remove' => 1,
'macro_set' => $id
) );
//-----------------------------------------
// Recache macros
//-----------------------------------------
$this->ipsclass->cache_func->_recache_macros($id, $p);
//-----------------------------------------
// Bounce back
//-----------------------------------------
$this->ipsclass->input['id'] = $id;
$this->show_macros();
}
//-----------------------------------------
// Show macros
//-----------------------------------------
function show_macros()
{
//-----------------------------------------
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìàêðîñà, âåðíèòåñü íàçàä è ïîïðîáóéòå åùå ðàç");
}
//-----------------------------------------
// check tree...
//-----------------------------------------
$this_set = "";
if ( $this->ipsclass->input['p'] > 0 )
{
$in = ','.$this->ipsclass->input['p'];
}
//-----------------------------------------
// Get macros
//-----------------------------------------
$macros = $this->ipsclass->cache_func->_get_macros($this->ipsclass->input['id'], $this->ipsclass->input['p']);
//-----------------------------------------
// Get img_dir this set is using...
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'skin_sets', 'where' => "set_skin_set_id=".intval($this->ipsclass->input['id']) ) );
$this->ipsclass->DB->simple_exec();
$skin = $this->ipsclass->DB->fetch_row();
$this->ipsclass->admin->page_detail = "Äëÿ èçìåíåíèÿ ìàêðîñà, íàæìèòå íà ññûëêó 'Èçìåíèòü' íàïðîòèâ âûáðàííîãî ìàêðîñà.";
$this->ipsclass->admin->page_title = "Óïðàâëåíèå çàìåíàìè ìàêðîñîâ øàáëîíà: {$skin['set_name']}";
//-----------------------------------------
// Start output
//-----------------------------------------
$this->ipsclass->html .= "<script type='text/javascript'>
function editmacro(id, variable, replace)
{
document.macroform.code.value = 'doeditmacro';
document.macroform.submitbutton.value = 'Èçìåíèòü ýòîò ìàêðîñ';
document.macroform.mid.value = id;
document.macroform.variable.value = variable;
document.macroform.replacement.value = replace;
scroll(0,0);
togglediv( 'popbox', 1 );
return false;
}
function addmacro(id)
{
document.macroform.code.value = 'doaddmacro';
document.macroform.submitbutton.value = 'Äîáàâèòü ýòîò ìàêðîñ';
document.macroform.mid.value = id;
document.macroform.variable.value = '';
document.macroform.replacement.value = '';
scroll(0,0);
togglediv( 'popbox', 1 );
return false;
}
function removemacro(url)
{
checkdelete(url);
}
</script>
<div class='tableborder'>
<div class='tableheaderalt'>
<table cellpadding='0' cellspacing='0' border='0' width='100%'>
<tr>
<td align='left' width='100%' style='font-weight:bold;font-size:11px;color:#FFF'>Óïðàâëåíèå çàìåíàìè ìàêðîñîâ</td>
<td align='right' nowrap='nowrap' style='padding-right:2px'><input type='button' class='realdarkbutton' value='Äîáàâèòü ìàêðîñ' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" /></td>
</tr>
</table>
<div align='center' style='position:absolute;display:none;text-align:center;' id='popbox'>
<form name='macroform' action='{$this->ipsclass->base_url}' method='post'>
<input type='hidden' name='_admin_auth_key' value='{$this->ipsclass->_admin_auth_key}' />
<input type='hidden' name='act' value='image' />
<input type='hidden' name='section' value='{$this->ipsclass->section_code}' />
<input type='hidden' name='code' value='' />
<input type='hidden' name='mid' value='' />
<input type='hidden' name='id' value='{$this->ipsclass->input['id']}' />
<input type='hidden' name='p' value='{$this->ipsclass->input['p']}' />
<table cellspacing='0' width='500' align='center' cellpadding='6' style='background:#EEE;border:2px outset #555;'>
<tr>
<td width='1%' nowrap='nowrap' valign='top'>
<b>Ïåðåìåííàÿ</b><br /><input class='textinput' name='variable' type='text' size='20' />
<br /><br />
<center><input type='submit' class='realbutton' value='Èçìåíèòü ìàêðîñ' name='submitbutton' /> <input type='button' class='realdarkbutton' value='Çàêðûòü' onclick=\"togglediv('popbox');\" /></center>
</td>
<td width='99%'><b>Çàìåíà</b><br /><textarea class='textinput' name='replacement' style='width:99%;height:50px'></textarea></td>
</tr>
</table>
</form>
</div>
</div>
</div>
";
$this->ipsclass->html .= "<div class='tableborder'>\n<div class='tablepad'>\n<table width='100%' cellspacing='0' cellpadding='0' border='0'>";
$this->unaltered = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_unaltered.gif' border='0' alt='-' title='Íå èçìåíåí îò íà÷àëüíîãî âàðèàíòà øàáëîíà' />&nbsp;";
$this->altered = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_altered.gif' border='0' alt='+' title='Èçìåíåí îò íà÷àëüíîãî âàðèàíòà øàáëîíà' />&nbsp;";
$this->inherited = "<img src='{$this->ipsclass->skin_acp_url}/images/skin_item_inherited.gif' border='0' alt='|' title='Óíàñëåäîâàííûé îò íà÷àëüíîãî âàðèàíòà øàáëîíà' />&nbsp;";
//-----------------------------------------
// Loop and print
//-----------------------------------------
foreach( $macros as $row )
{
$real = $this->ipsclass->txt_htmlspecialchars( $row['macro_replace'] );
$real = str_replace("\n", '\n', str_replace( "\r", '\r', $real) );
//-----------------------------------------
// Altered?
//-----------------------------------------
if ( $row['macro_set'] == $this->ipsclass->input['id'] )
{
$altered_image = $this->altered;
$css_info = '#FFDCD8';
}
else if ( $row['macro_set'] == 1 )
{
$altered_image = $this->unaltered;
$css_info = '#EEE';
}
else
{
$altered_image = $this->inherited;
$css_info = '#FFF2D3';
}
//-----------------------------------------
// Figure out quotes
//-----------------------------------------
$out_quote = '"';
$in_quote = "'";
if ( preg_match( "/&#039;/", $real ) )
{
$out_quote = "'";
$in_quote = '"';
}
if( $in_quote == '"' )
{
$real = str_replace( "&quot;", '\"', $real );
}
if( $in_quote == "'" )
{
$real = str_replace( "'", "\\'", $real );
}
$preview = str_replace( "<#IMG_DIR#>", $skin['set_image_dir'], $row['macro_replace'] );
if ( $row['macro_set'] > 1 and $row['macro_set'] == $this->ipsclass->input['id'] )
{
$remove_button = "<input type='button' class='realbutton' name='remove' value='Âåðíóòü íà÷àëüíîå çíà÷åíèå' onclick=\"removemacro('{$this->ipsclass->form_code_js}&code=macroremove&mid={$row['macro_id']}&id={$this->ipsclass->input['id']}&p={$this->ipsclass->input['p']}');\" />";
}
else
{
$remove_button = "";
}
//-----------------------------------------
// Not an image?
//-----------------------------------------
if ( ! preg_match( "#img\s{1,}src=#i", $row['macro_replace'] ) )
{
$preview = substr( $real, 0, 200 );
}
else
{
$preview = preg_replace( "#style_images#", $this->ipsclass->vars['board_url'].'/style_images', $preview );
}
$edit_button = "<input type='button' class='realbutton' value='Èçìåíèòü' onclick={$out_quote}editmacro( {$in_quote}{$row['macro_id']}{$in_quote}, {$in_quote}{$row['macro_value']}{$in_quote}, {$in_quote}$real{$in_quote});{$out_quote} />";
//-----------------------------------------
// Render row
//-----------------------------------------
$style = "padding:4px;border-bottom:1px solid #DDD;background:{$css_info}";
$this->ipsclass->html .= "<tr>
<!--<td style='$style' align='center' width='1%'><img src='{$this->ipsclass->skin_acp_url}/images/skin_macro.gif' alt='Macro' title='ID: {$row['macro_id']}' style='vertical-align:middle' /></td>-->
<td style='$style' align='left' width='1%' nowrap='nowrap'>$altered_image
&nbsp;&lt;{<span style='font-size:11px;font-weight:bold' title='ID: {$row['macro_id']}. SET: {$row['macro_set']}' href='#' >{$row['macro_value']}</span>}&gt;
</td>
<td style='$style;padding-right:3px;text-align:center;' align='center' width='99%' align='center'>$preview</td>
<td style='$style' align='right' width='40%' nowrap='nowrap'>$remove_button $edit_button</td>
</tr>
";
}
$this->ipsclass->html .= "</table>
</div>
<div class='tablesubheader' align='center'>
<input type='button' class='realdarkbutton' value='Äîáàâèòü ìàêðîñ' onclick=\"addmacro('{$this->ipsclass->input['id']}');\" />
</div>
</div>";
$this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap();
//-----------------------------------------
// Show altered / unaltered
// legend
//-----------------------------------------
$this->ipsclass->html .= "<br />
<div><strong>Ïðèìåð ðàáîòû ìàêðîñà</strong><br />
Åñëè âû äîáàâèëè ìàêðîñ 'green_font' è çàìåíó äëÿ íåãî â âèäå '&lt;font color='green'>', êàæäûé ýëåìåíò òåêñòà <span style='color:red'><b>&lt;{green_font}&gt;</b></span> áóäåò îòîáðàæåí êàê &lt;font color='green'>
<br /><b>&lt;#IMG_DIR#></b> äîñòóïåí â ëþáîì ìàêðîñå. Âî âðåìÿ âûâîäà òåêñòà íà ýêðàí áóäåò ïðîèçâåäåíà çàìåíà äàííîãî òåãà íà ïóòü ïðîïèñàííûé â íàñòðîéêàõ ê äèðåêòîðèè ñ èçîáðàæåíèÿìè.
</div><br />
<div><strong>Îïèñàíèå îáîçíà÷åíèé:</strong><br />
{$this->altered} Ýòîò ìàêðîñ áûë èçìåíåí.
<br />{$this->unaltered} Ýòîò ìàêðîñ íå áûë èçìåíåí.
<br />{$this->inherited} Ýòîò ìàêðîñ ïîñòðîåí íà áàçå ñóùåñòâóþùåãî ìàêðîñ.
</div>";
$this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Óïðàâëåíèå ñòèëÿìè' );
$this->ipsclass->admin->nav[] = array( '' ,'Óïðàâëåíèå çàìåíàìè ìàêðîñîâ '.$skin['set_name'] );
$this->ipsclass->admin->output();
}
}
?>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+88 -80
View File
@@ -2,17 +2,25 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ!
| Права на ПО принадлежат Invision Power Services
| Права на перевод IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-12-07 06:46:38 -0500 (Thu, 07 Dec 2006) $
| > $Revision: 777 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -27,7 +35,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Некорректный адрес</h1>Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы.";
exit();
}
@@ -43,25 +51,25 @@ class ad_skin_wrappers {
* @var string
*/
var $perm_main = "lookandfeel";
/**
* Section title name
*
* @var string
*/
var $perm_child = "wrap";
function auto_run()
{
//-----------------------------------------
// Get the libraries
//-----------------------------------------
require_once( ROOT_PATH.'sources/lib/admin_template_functions.php' );
$this->functions = new admin_template_functions();
$this->functions->ipsclass =& $this->ipsclass;
//-----------------------------------------
switch($this->ipsclass->input['code'])
@@ -70,24 +78,24 @@ class ad_skin_wrappers {
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->functions->build_editor_area_floated(1);
break;
case 'edit':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->do_form('edit');
break;
case 'doedit':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':edit' );
$this->save_wrapper('edit');
break;
case 'export':
$this->export();
default:
print "No action chosen"; exit();
break;
//case 'wrapper':
// $this->list_wrappers();
// break;
@@ -101,116 +109,117 @@ class ad_skin_wrappers {
// $this->remove();
// break;
}
}
//-----------------------------------------
// ADD / EDIT WRAPPERS
//-----------------------------------------
function save_wrapper( $type='add' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$id = intval( $this->ipsclass->input['id'] );
//-----------------------------------------
// Type?
//-----------------------------------------
if ($type == 'edit')
{
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("You must specify an existing wrapper ID, go back and try again");
$this->ipsclass->admin->error("Вы должны выбрать ID существующего общего шаблона, вернитесь назад и попробуйте снова");
}
}
if ($this->ipsclass->input['txtwrapper'] == "")
{
$this->ipsclass->admin->error("You can't have an empty template, can you?");
$this->ipsclass->admin->error("У вас не может быть пустого шаблона");
}
$tmpl = $this->ipsclass->admin->form_to_text( $this->ipsclass->txt_stripslashes($_POST['txtwrapper']) );
$tmpl = str_replace( '&#46;&#46;/', '../' , $tmpl );
if ( ! preg_match( "/<% BOARD %>/", $tmpl ) )
{
$this->ipsclass->admin->error("You cannot remove the &lt% BOARD %> tag silly!");
$this->ipsclass->admin->error("Вы не можете удалить &lt% BOARD %> !");
}
if ( ! preg_match( "/<% COPYRIGHT %>/", $tmpl ) )
{
$this->ipsclass->admin->error("You cannot remove the &lt% COPYRIGHT %> tag silly!");
$this->ipsclass->admin->error("Вы не можете удалить &lt% COPYRIGHT %> !");
}
$this->ipsclass->DB->do_update( 'skin_sets', array( 'set_wrapper' => $tmpl ), 'set_skin_set_id='.$id );
$this->ipsclass->cache_func->_recache_wrapper( $this->ipsclass->input['id'] );
//-----------------------------------------
// Done
//-----------------------------------------
if ( ! $this->ipsclass->input['savereload'] )
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Skin Manager Home' );
$this->ipsclass->main_msg = "Board Header and Footer Wrapper Updated";
$this->ipsclass->admin->done_screen("Board Header and Footer Wrapper Updated", "Skin Manager Home", 'section='.$this->ipsclass->section_code.'&act=sets', "redirect" );
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code ,'Управление стилями' );
$this->ipsclass->main_msg = "Общий шаблон форума обновлен";
$this->ipsclass->admin->done_screen("Общий шаблон форум обновлен", "Управление стилями", 'section='.$this->ipsclass->section_code.'&act=sets', "redirect" );
}
else
{
//-----------------------------------------
// Reload edit window
//-----------------------------------------
$this->ipsclass->main_msg = "Board Header and Footer Wrapper updated";
$this->ipsclass->main_msg = "Общий шаблон форума обновлен";
$this->do_form('edit');
}
}
//-----------------------------------------
// FORM
//-----------------------------------------
function do_form( $type='add' )
{
//-----------------------------------------
// Check input
//-----------------------------------------
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("You must specify an existing skin set ID, go back and try again");
$this->ipsclass->admin->error("Вы должны выбрать ID существующего общего шаблона, вернитесь назад и попробуйте снова");
}
//-----------------------------------------
// check tree...
//-----------------------------------------
$found_id = "";
$found_content = "";
$this_set = "";
if ( $this->ipsclass->input['p'] > 0 )
{
$in = ','.intval($this->ipsclass->input['p']);
}
//-----------------------------------------
// Query
//-----------------------------------------
$this->ipsclass->DB->cache_add_query( 'stylesheets_do_form_concat', array( 'id' => intval($this->ipsclass->input['id']), 'parent' => $in ) );
$this->ipsclass->DB->cache_exec_query();
//-----------------------------------------
// check tree...
//-----------------------------------------
while( $row = $this->ipsclass->DB->fetch_row() )
{
if ( $row['set_wrapper'] and ! $found_id )
@@ -218,82 +227,81 @@ class ad_skin_wrappers {
$found_id = $row['set_skin_set_id'];
$found_content = $row['set_wrapper'];
}
if ( $this->ipsclass->input['id'] == $row['set_skin_set_id'] )
{
$this_set = $row;
}
}
if ($type == 'add')
{
$code = 'doadd';
$button = 'Create Wrapper';
$button = 'Создать общий шаблон';
}
else
{
$code = 'doedit';
$button = 'Save Wrapper';
$button = 'Сохранить общий шаблон';
}
//-----------------------------------------
// Header
//-----------------------------------------
$this->ipsclass->admin->page_detail = "You may use HTML fully when adding or editing wrappers.";
$this->ipsclass->admin->page_title = "Editing Board Header and Footer Wrapper";
$this->ipsclass->admin->page_detail = "Вы можете использовать HTML во время добавления или изменения общего шаблона.";
$this->ipsclass->admin->page_title = "Изменение общего шаблона форума";
if ( $found_id == 1 )
{
$this->ipsclass->admin->page_detail .= "<br /><strong>This is a copy of the master wrapper, editing it below will copy the changes to a new wrapper unique to this skin set and any children of this set
will inherit this wrapper</strong>";
$this->ipsclass->admin->page_detail .= "<br /><strong>Это копия основного общего шаблона, изменения в форме ниже будут скопированы, как новый общий шаблон форума для выбранного шаблона.</strong>";
}
//-----------------------------------------
// Start form
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $code ),
2 => array( 'act' , 'wrap' ),
3 => array( 'id' , $this->ipsclass->input['id'] ),
4 => array( 'fid' , $found_id ),
5 => array( 'section', $this->ipsclass->section_code ),
), "theform" );
//-----------------------------------------
// Stop /textarea murdering layout
//-----------------------------------------
$found_content = $this->ipsclass->admin->text_to_form( $found_content );
//-----------------------------------------
// Editor section
//-----------------------------------------
$this->ipsclass->html .= $this->functions->build_generic_editor_area( array( 'section' => $this->ipsclass->section_code, 'act' => 'wrap', 'title' => '', 'textareaname' => 'wrapper', 'textareainput' => $found_content ) );
$formbuttons = "<div align='center' class='tablesubheader'>
<input type='submit' name='submit' value='$button' class='realdarkbutton'>
<input type='submit' name='savereload' value='Save and Reload Wrapper' class='realdarkbutton'>
<input type='submit' name='savereload' value='Сохранить и обновить общий шаблон' class='realdarkbutton'>
</div></form>\n";
$this->ipsclass->html = str_replace( '<!--IPB.EDITORBOTTOM-->', $formbuttons, $this->ipsclass->html );
$this->ipsclass->html .= $this->ipsclass->adskin->skin_jump_menu_wrap();
//-----------------------------------------
// Output
//-----------------------------------------
$this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Skin Manager Home' );
$this->ipsclass->admin->nav[] = array( '' ,'Editing Board Wrapper in set '.$this_set['set_name'] );
$this->ipsclass->admin->nav[] = array( 'section='.$this->ipsclass->section_code.'&act=sets' ,'Управление шаблонами' );
$this->ipsclass->admin->nav[] = array( '' ,'Изменение общего шаблона форума '.$this_set['set_name'] );
$this->ipsclass->admin->output();
}
}
File diff suppressed because it is too large. Load diff
+310 -302
View File
@@ -1,303 +1,311 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Spider (MAN) Logs
| > Module written by Matt Mecham
| > Date started: 28th May 2003
|
| > Module Version Number: 1.0.0
| > DBA Checked: Tue 25th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class ad_spiderlogs {
var $base_url;
/**
* Section title name
*
* @var string
*/
var $perm_main = "admin";
/**
* Section title name
*
* @var string
*/
var $perm_child = "spiderlog";
function auto_run()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Search Engine Spider Logs' );
//-----------------------------------------
// Get bot names
//-----------------------------------------
foreach( explode( "\n", $this->ipsclass->vars['search_engine_bots'] ) as $bot )
{
list($ua, $n) = explode( "=", $bot );
$this->bot_map[ strtolower($ua) ] = $n;
}
switch($this->ipsclass->input['code'])
{
case 'view':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->view();
break;
case 'remove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->remove();
break;
//-----------------------------------------
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->list_current();
break;
}
}
//-----------------------------------------
// View Logs
//-----------------------------------------
function view()
{
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
$this->ipsclass->admin->page_detail = "Viewing all actions by a search engine spider";
$this->ipsclass->admin->page_title = "Search Engine Logs Manager";
$botty = urldecode($this->ipsclass->input['bid']);
$botty = str_replace( "&#33;", "!", $botty );
if ( !isset($this->ipsclass->input['search_string']) OR $this->ipsclass->input['search_string'] == "" )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='$botty'" ) );
$this->ipsclass->DB->simple_exec();
$row = $this->ipsclass->DB->fetch_row();
$row_count = $row['count'];
$query = "&{$this->ipsclass->form_code}&bid={$this->ipsclass->input['bid']}&code=view";
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'spider_logs',
'where' => "bot='$botty'",
'order' => 'entry_date DESC',
'limit' => array( $start, 20 ) ) );
$this->ipsclass->DB->simple_exec();
}
else
{
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'" ) );
$this->ipsclass->DB->simple_exec();
$row = $this->ipsclass->DB->fetch_row();
$row_count = $row['count'];
$query = "&{$this->ipsclass->form_code}&code=view&search_string=".urlencode($this->ipsclass->input['search_string']);
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'spider_logs',
'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'",
'order' => 'entry_date DESC',
'limit' => array( $start, 20 ) ) );
$this->ipsclass->DB->simple_exec();
}
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
'PER_PAGE' => 20,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "Single Page",
'L_MULTI' => "Pages: ",
'BASE_URL' => $this->ipsclass->base_url.$query,
)
);
$this->ipsclass->admin->page_detail = "You may view and remove actions performed by a search engine bot";
$this->ipsclass->admin->page_title = "Search Engine Logs Manager";
//-----------------------------------------
// Show form!
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "Bot Name" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Query String" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Time of action" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "IP address" , "10%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Search Engine Logs" );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$extra = "";
if ( preg_match( '#lo-fi#i', $row['query_string'] ) )
{
$extra = '(Lo-Fi)';
$row['query_string'] = 'showtopic='.preg_replace( "#Lo-Fi\: t(.+?)\.html#", "\\1", $row['query_string'] );
}
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>".$this->bot_map[ strtolower($row['bot']) ]."</b>",
"<a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?{$row['query_string']}' target='_blank'>$extra {$row['query_string']}</a>",
$this->ipsclass->admin->get_date( $row['entry_date'], 'LONG' ),
"{$row['ip_address']}",
) );
}
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
}
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
//-----------------------------------------
// Remove archived files
//-----------------------------------------
function remove()
{
if ($this->ipsclass->input['bid'] == "")
{
$this->ipsclass->admin->error("You did not select a bot to remove by!");
}
$botty = urldecode($this->ipsclass->input['bid']);
$botty = str_replace( "&#33;", "!", $botty );
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'spider_logs', 'where' => "bot='$botty'" ) );
$this->ipsclass->admin->save_log("Removed Search Engine Logs");
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
exit();
}
//-----------------------------------------
// SHOW ALL BOTS
//-----------------------------------------
function list_current()
{
$form_array = array();
$this->ipsclass->admin->page_detail = "You may view and remove entries in your spider engine logs";
$this->ipsclass->admin->page_title = "Search Engine Logs Manager";
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "Bot Name" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Hits" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Last Hit" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "View all by bot" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Remove all by bot" , "20%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Search Engine Spider Logs" );
$this->ipsclass->DB->cache_add_query( 'spiderlogs_list_current', array() );
$this->ipsclass->DB->cache_exec_query();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$url_butt = urlencode($r['bot']);
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->bot_map[ strtolower($r['bot']) ],
"<center>{$r['cnt']}</center>",
$this->ipsclass->admin->get_date( $r['entry_date'], 'SHORT' ),
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&bid={$url_butt}'>View</a></center>",
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&bid={$url_butt}'>Remove</a></center>",
) );
}
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
2 => array( 'act' , 'spiderlog' ),
4 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "60%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Search Engine Logs" );
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search for...</b>" ,
$this->ipsclass->adskin->form_input( "search_string").'... in the query string'
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > Spider (MAN) Logs
| > Module written by Matt Mecham
| > Date started: 28th May 2003
|
| > Module Version Number: 1.0.0
| > DBA Checked: Tue 25th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class ad_spiderlogs {
var $base_url;
/**
* Section title name
*
* @var string
*/
var $perm_main = "admin";
/**
* Section title name
*
* @var string
*/
var $perm_child = "spiderlog";
function auto_run()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë äåéñòâèé ïîèñêîâûõ ðîáîòîâ' );
//-----------------------------------------
// Get bot names
//-----------------------------------------
foreach( explode( "\n", $this->ipsclass->vars['search_engine_bots'] ) as $bot )
{
list($ua, $n) = explode( "=", $bot );
$this->bot_map[ strtolower($ua) ] = $n;
}
switch($this->ipsclass->input['code'])
{
case 'view':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->view();
break;
case 'remove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->remove();
break;
//-----------------------------------------
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->list_current();
break;
}
}
//-----------------------------------------
// View Logs
//-----------------------------------------
function view()
{
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
$this->ipsclass->admin->page_detail = "Íèæå óêàçàí ñïèñîê âñåõ äåéñòâèé, êîòîðûå áûëè ïðîèçâåäåíû ïîèñêîâûìè ðîáîòàìè íà âàøåì ôîðóìå.<br />Â ýòîì æóðíàëå ôèêñèðóþòñÿ äåéñòâèÿ òîëüêî èçâåñòíûõ ðîáîòîâ, êîòîðûå óêàçàíû â íàñòðîéêå «Ñïèñîê „user-agent“ ïîèñêîâûõ ðîáîòîâ».";
$this->ipsclass->admin->page_title = "Æóðíàë äåéñòâèé ïîèñêîâûõ ðîáîòîâ";
$botty = urldecode($this->ipsclass->input['bid']);
$botty = str_replace( "&#33;", "!", $botty );
if ( !isset($this->ipsclass->input['search_string']) OR $this->ipsclass->input['search_string'] == "" )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='$botty'" ) );
$this->ipsclass->DB->simple_exec();
$row = $this->ipsclass->DB->fetch_row();
$row_count = $row['count'];
$query = "&{$this->ipsclass->form_code}&bid={$this->ipsclass->input['bid']}&code=view";
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'spider_logs',
'where' => "bot='$botty'",
'order' => 'entry_date DESC',
'limit' => array( $start, 20 ) ) );
$this->ipsclass->DB->simple_exec();
}
else
{
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'" ) );
$this->ipsclass->DB->simple_exec();
$row = $this->ipsclass->DB->fetch_row();
$row_count = $row['count'];
$query = "&{$this->ipsclass->form_code}&code=view&search_string=".urlencode($this->ipsclass->input['search_string']);
$this->ipsclass->DB->simple_construct( array( 'select' => '*',
'from' => 'spider_logs',
'where' => "query_string LIKE '%{$this->ipsclass->input['search_string']}%'",
'order' => 'entry_date DESC',
'limit' => array( $start, 20 ) ) );
$this->ipsclass->DB->simple_exec();
}
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
'PER_PAGE' => 20,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "Îäíà ñòðàíèöà",
'L_MULTI' => "Ñòðàíèö: ",
'BASE_URL' => $this->ipsclass->base_url.$query,
)
);
$this->ipsclass->admin->page_detail = "Íèæå óêàçàí ñïèñîê âñåõ äåéñòâèé, êîòîðûå áûëè ïðîèçâåäåíû ïîèñêîâûìè ðîáîòàìè íà âàøåì ôîðóìå.<br />Â ýòîì æóðíàëå ôèêñèðóþòñÿ äåéñòâèÿ òîëüêî èçâåñòíûõ ðîáîòîâ, êîòîðûå óêàçàíû â íàñòðîéêå «Ñïèñîê „user-agent“ ïîèñêîâûõ ðîáîòîâ».";
$this->ipsclass->admin->page_title = "Æóðíàë äåéñòâèé ïîèñêîâûõ ðîáîòîâ";
//-----------------------------------------
// Show form!
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "Ïîèñêîâûé ðîáîò" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Ñòðîêà çàïðîñà" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Äàòà" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "10%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ñïèñîê äåéñòâèé — ðåçóëüòàòû ïîèñêà" );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$extra = "";
if ( preg_match( '#lo-fi#i', $row['query_string'] ) )
{
$extra = '(Lo-Fi)';
$row['query_string'] = 'showtopic='.preg_replace( "#Lo-Fi\: t(.+?)\.html#", "\\1", $row['query_string'] );
}
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>".$this->bot_map[ strtolower($row['bot']) ]."</b>",
"<a href='{$this->ipsclass->vars['board_url']}/index.{$this->ipsclass->vars['php_ext']}?{$row['query_string']}' target='_blank'>$extra {$row['query_string']}</a>",
$this->ipsclass->admin->get_date( $row['entry_date'], 'LONG' ),
"{$row['ip_address']}",
) );
}
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Ïîèñê íå äàë ðåçóëüòàòîâ</center>");
}
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
//-----------------------------------------
// Remove archived files
//-----------------------------------------
function remove()
{
if ($this->ipsclass->input['bid'] == "")
{
$this->ipsclass->admin->error("Âû íå âûáðàëè áîòà, êîòîðîãî õîòèòå óäàëèòü!");
}
$botty = urldecode($this->ipsclass->input['bid']);
$botty = str_replace( "&#33;", "!", $botty );
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'spider_logs', 'where' => "bot='$botty'" ) );
$this->ipsclass->admin->save_log("Óäàëåííûå çàïèñè èç æóðíàëà ïîèñêîâûõ ðîáîòîâ");
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
exit();
}
//-----------------------------------------
// SHOW ALL BOTS
//-----------------------------------------
function list_current()
{
$form_array = array();
$this->ipsclass->admin->page_detail = "Íèæå óêàçàí ñïèñîê âñåõ äåéñòâèé, êîòîðûå áûëè ïðîèçâåäåíû ïîèñêîâûìè ðîáîòàìè íà âàøåì ôîðóìå.<br />Â ýòîì æóðíàëå ôèêñèðóþòñÿ äåéñòâèÿ òîëüêî èçâåñòíûõ ðîáîòîâ, êîòîðûå óêàçàíû â íàñòðîéêå «Ñïèñîê „user-agent“ ïîèñêîâûõ ðîáîòîâ».";
$this->ipsclass->admin->page_title = "Æóðíàë äåéñòâèé ïîèñêîâûõ ðîáîòîâ";
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "Ïîèñêîâûé ðîáîò" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Õèòîâ" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Çàïóùåí" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Âñå äåéñòâèÿ" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Óäàëèòü âñå äåéñòâèÿ" , "20%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ñïèñîê äåéñòâèé" );
$this->ipsclass->DB->cache_add_query( 'spiderlogs_list_current', array() );
$this->ipsclass->DB->cache_exec_query();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$url_butt = urlencode($r['bot']);
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( $this->bot_map[ strtolower($r['bot']) ],
"<center>{$r['cnt']}</center>",
$this->ipsclass->admin->get_date( $r['entry_date'], 'SHORT' ),
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&bid={$url_butt}'>Ïðîñìîòð</a></center>",
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&bid={$url_butt}'>Óäàëèòü</a></center>",
) );
}
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
2 => array( 'act' , 'spiderlog' ),
4 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "60%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê äåéñòâèé" );
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü...</b>" ,
$this->ipsclass->adskin->form_input( "search_string").'... â ñòðîêå çàïðîñà'
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Íàéòè");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
}
?>
+72 -64
View File
@@ -1,65 +1,73 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > SQL Admin Stuff
| > Module written by Matt Mecham
| > Date started: Friday 24 June 2005
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
class ad_sql
{
/*-------------------------------------------------------------------------*/
// Auto run
/*-------------------------------------------------------------------------*/
function auto_run()
{
if ( TRIAL_VERSION )
{
print "This feature is disabled in the trial version.";
exit();
}
//-----------------------------------------
// Make sure we're a root admin, or else!
//-----------------------------------------
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
{
$this->ipsclass->admin->error("Sorry, these functions are for the root admin group only");
}
require_once( ROOT_PATH.'sources/action_admin/sql_'.strtolower($this->ipsclass->vars['sql_driver']).'.php' );
$dbdriver = new ad_sql_module();
$dbdriver->ipsclass =& $this->ipsclass;
$dbdriver->auto_run();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > SQL Admin Stuff
| > Module written by Matt Mecham
| > Date started: Friday 24 June 2005
|
| > Module Version Number: 1.0.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class ad_sql
{
/*-------------------------------------------------------------------------*/
// Auto run
/*-------------------------------------------------------------------------*/
function auto_run()
{
if ( TRIAL_VERSION )
{
print "Ýòî ñâîéñòâî îòêëþ÷åíî â òåñòîâîé âåðñèè ôîðóìà.";
exit();
}
//-----------------------------------------
// Make sure we're a root admin, or else!
//-----------------------------------------
if ($this->ipsclass->member['mgroup'] != $this->ipsclass->vars['admin_group'])
{
$this->ipsclass->admin->error("Èçâèíèòå, íî ýòè ôóíêöèè òîëüêî äëÿ àäìèíèñòðàòîðñêîé ãðóïïû");
}
require_once( ROOT_PATH.'sources/action_admin/sql_'.strtolower($this->ipsclass->vars['sql_driver']).'.php' );
$dbdriver = new ad_sql_module();
$dbdriver->ipsclass =& $this->ipsclass;
$dbdriver->auto_run();
}
}
?>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+65 -48
View File
@@ -2,14 +2,22 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD НЕ ЯВЛЯЕТСЯ БЕСПЛАТНЫМ ПРОГРАММНЫМ ОБЕСПЕЧЕНИЕМ!
| Права на ПО принадлежат Invision Power Services
| Права на перевод IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-03-23 07:34:25 -0500 (Thu, 23 Mar 2006) $
| > $Revision: 177 $
@@ -26,7 +34,7 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Некорректный адрес</h1>Вы не имеете доступа к этому файлу напрямую. Если вы недавно обновляли форум, вы должны обновить все соответствующие файлы.";
exit();
}
@@ -34,90 +42,99 @@ if ( ! defined( 'IN_ACP' ) )
class ad_support
{
var $base_url;
/**
* Section title name
*
* @var string
*/
var $perm_main = "help";
/**
* Section title name
*
* @var string
*/
var $perm_child = "support";
function auto_run()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Support' );
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Помощь и поддержка' );
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'doctor':
$this->ipsclass->admin->page_detail = "Воспользовавшись нашей документацией, вы сможете узнать более подробно о том, как использовать ту или иную функцию в Invision Power Board.";
$this->ipsclass->admin->page_title = "Документация";
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/docs-ipb' );
break;
break;
case 'kb':
$this->ipsclass->admin->page_detail = "Please utilize our knowledgebase to search for common issues and fixes to those issues. You can also find documentation on how to use the features found in the software as well.";
$this->ipsclass->admin->page_title = "Help & Support";
$this->ipsclass->admin->page_detail = "Воспользуйтесь нашей базой знаний для поиска решений общих проблем и проблем, связанных со старыми выпусками Invision Power Board. В данной базе вы также сможете найти описание, как использовать некоторые функции нашего программного обеспечения.";
$this->ipsclass->admin->page_title = "База знаний";
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
$this->ipsclass->admin->show_inframe( 'https://www.invisionpower.com/customer/index.php?&module=clientarea&section=kb' );
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/wiki' );
break;
case 'support':
$this->ipsclass->admin->page_detail = "If you are experiencing an issue with your Invision Power Services software and require official assistance or support, you may utilize our ticketing system to submit a ticket. Please allow 24-48 hours for a response during normal business hours.<br /><br /><i>You must have an active support contract with us in order to submit a ticket.</i>";
$this->ipsclass->admin->page_title = "Help & Support";
$this->ipsclass->admin->page_detail = "Если у вас возникли проблемы или вопросы при использовании программного обеспечения компании Invision Power Services, то, пожалуйста, воспользуйтесь формой ниже, чтобы получить квалифицированную помощь. Помните, что время ответа в первую очередь зависит от сложности вашего вопроса.<br /><br /><i>Вам необходимо иметь активную лицензию, чтобы воспользоваться клиент-центром.</i>";
$this->ipsclass->admin->page_title = "Помощь и поддержка";
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
$this->ipsclass->admin->show_inframe( 'https://www.invisionpower.com/customer/index.php?&module=clientarea&section=tickets' );
break;
case 'ipsbeyond':
$this->ipsclass->admin->page_detail = "IPS Beyond is a customer-only resource site where you can find helpful articles, modifications, skins, and customer-to-customer support. Note that all content and advice found on IPS Beyond is provided as-is by the individual user, and is not endorsed nor support by Invision Power Services, Inc.
If you are just looking to chat or would like to look for additional resources for your board, this is the first place to go.<br /><br />You must first register an account in your client area home page in order to access IPS Beyond";
$this->ipsclass->admin->page_title = "Help & Support";
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
$this->ipsclass->admin->show_inframe( 'http://www.ipsbeyond.com/forums/index.php' );
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/clientarea' );
break;
case 'ibresource':
$this->ipsclass->admin->page_detail = "Форумы IBResource — это ресурс, где можно найти много полезных статей и советов, модификаций и модулей, стилей и дополнительной графики, а так же получить помощь от других клиентов. Помните, вся информация на наших форумах предоставляется «как есть» и не подтверждена техническим отделом компании «Invision Power Services, Inc.» — все действия, описанные другими пользователями, вы будете делать на свой страх и риск.
<br /><br />Перевести свою учетную запись на наших форумах в группу &laquo;Клиенты&raquo; вы можете через клиент-центр.";
$this->ipsclass->admin->page_title = "Помощь и поддержка";
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/forums' );
break;
case 'contact':
$this->ipsclass->admin->page_detail = "If you would like to contact us you can find our current contact information and hours of operation below.";
$this->ipsclass->admin->page_title = "Help & Support";
$this->ipsclass->admin->page_detail = "Если вы хотите связаться с нами, пожалуйста, ознакомьтесь с нашей контактной информацией и часами работы ниже.";
$this->ipsclass->admin->page_title = "Помощь и поддержка";
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
$this->ipsclass->admin->show_inframe( 'http://www.invisionpower.com/ip.dynamic/corporate/contact.html' );
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/contact' );
break;
case 'features':
$this->ipsclass->admin->page_detail = "If you would like to request a feature, or see if a particular feature has already been requested, for Invision Power Board this forum is the place to do so.";
$this->ipsclass->admin->page_title = "Help & Support";
$this->ipsclass->admin->page_detail = "Если вы хотите подсказать нам, как улучшить наши продукты, то просто оставьте свое предложение в одном из форумов ниже.";
$this->ipsclass->admin->page_title = "Предложения и пожелания";
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
$this->ipsclass->admin->show_inframe( 'http://forums.invisionpower.com/index.php?showforum=285' );
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/suggestfeatures' );
break;
case 'bugs':
$this->ipsclass->admin->page_detail = "You may submit and track all bugs reported to us by our users for Invision Power Board in the Bugtracker below.";
$this->ipsclass->admin->page_title = "Help & Support";
$this->ipsclass->admin->page_detail = "Вы можете отправить отчет о найденной ошибке, а так же узнать об исправлениях других ошибок, используя «Bugtracker» ниже.";
$this->ipsclass->admin->page_title = "Помощь и поддержка";
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
$this->ipsclass->admin->show_inframe( 'http://forums.invisionpower.com/index.php?autocom=bugtracker&code=show_project&product_id=2' );
break;
$this->ipsclass->admin->show_inframe( 'http://external.iblink.ru/bugtrack' );
break;
//-----------------------------------------
default:
$this->ipsclass->admin->page_detail = "If you are experiencing an issue with your Invision Power Services software and require official assistance or support, you may utilize our ticketing system to submit a ticket. Please allow 24-48 hours for a response during normal business hours.<br /><br /><i>You must have an active support contract with us in order to submit a ticket.</i>";
$this->ipsclass->admin->page_title = "Help & Support";
$this->ipsclass->admin->page_detail = "Если у вас возникли проблемы или вопросы при использование программного обеспечения компании Invision Power Services, то, пожалуйста, воспользуйтесь формой ниже, чтобы получить квалифицированную помощь. Помните, что время ответа в первую очередь зависит от сложности вашего вопроса.<br /><br /><i>Вам необходимо иметь активную лицензию, чтобы воспользоваться клиент-центром.</i>";
$this->ipsclass->admin->page_title = "Помощь и поддержка";
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
$this->ipsclass->admin->show_inframe( 'https://www.invisionpower.com/customer/index.php?&module=clientarea&section=tickets' );
$this->ipsclass->admin->show_inframe( 'https://www.ibresource.ru/clientarea/index.php' );
break;
}
}
}
File diff suppressed because it is too large. Load diff
+210 -202
View File
@@ -2,16 +2,24 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -28,216 +36,216 @@
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class ad_warnlogs {
var $base_url;
/**
* Section title name
*
* @var string
*/
var $perm_main = "admin";
/**
* Section title name
*
* @var string
*/
var $perm_child = "warnlog";
function auto_run()
{
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Warn Logs' );
$this->ipsclass->admin->nav[] = array( $this->ipsclass->form_code, 'Æóðíàë ïðåäóïðåæäåíèé' );
//-----------------------------------------
switch($this->ipsclass->input['code'])
{
case 'view':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->view();
break;
case 'viewcontact':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->view_contact();
break;
case 'viewnote':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':view' );
$this->view_note();
break;
case 'remove':
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
$this->remove();
break;
//-----------------------------------------
default:
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
$this->list_current();
break;
}
}
//-----------------------------------------
// View NOTE in da pop up innit
//-----------------------------------------
function view_note()
{
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("Could not resolve the email ID, please try again");
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü ID email, ïîïðîáóéòå ñíîâà");
}
//-----------------------------------------
// Load and config the post parser
//-----------------------------------------
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']);
$id = intval($this->ipsclass->input['id']);
$this->ipsclass->DB->cache_add_query( 'warnlogs_view_note', array( 'id' => $id ) );
$this->ipsclass->DB->cache_exec_query();
if ( ! $row = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)");
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü ID email, ïîïðîáóéòå ñíîâà ($id)");
}
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "100%" );
$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_notes'], $cont );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Warn Notes" );
$row['date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' );
$this->parser->parse_html = 0;
$this->parser->parse_nl2br = 1;
$this->parser->parse_smilies = 1;
$this->parser->parse_bbcode = 1;
$text = $this->parser->pre_display_parse( $this->parser->pre_db_parse($cont[1]) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
"<strong>From:</strong> {$row['p_name']}
<br /><strong>To:</strong> {$row['a_name']}
<br /><strong>Sent:</strong> {$row['date']}
"<strong>Îò:</strong> {$row['p_name']}
<br /><strong>Êîìó:</strong> {$row['a_name']}
<br /><strong>Îòïðàâëåíî:</strong> {$row['date']}
<hr>
<br />$text
"
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
$this->ipsclass->admin->print_popup();
}
//-----------------------------------------
// View contact in da pop up innit
//-----------------------------------------
function view_contact()
{
if ($this->ipsclass->input['id'] == "")
{
$this->ipsclass->admin->error("Could not resolve the email ID, please try again");
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü ID email, ïîïðîáóéòå ñíîâà");
}
$id = intval($this->ipsclass->input['id']);
$this->ipsclass->DB->cache_add_query( 'warnlogs_view_note', array( 'id' => $id ) );
$this->ipsclass->DB->cache_exec_query();
if ( ! $row = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->admin->error("Could not resolve the email ID, please try again ($id)");
$this->ipsclass->admin->error("Íåâîçìîæíî ïîëó÷èòü ID email, ïîïðîáóéòå ñíîâà ($id)");
}
$type = $row['wlog_contact'] == 'pm' ? "PM" : "EMAIL";
$type = $row['wlog_contact'] == 'pm' ? "Ëè÷íîå ñîîáùåíèå" : "EMAIL";
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "100%" );
$subject = preg_match( "#<subject>(.+?)</subject>#is", $row['wlog_contact_content'], $subj );
$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_contact_content'], $cont );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( $type.": ".$subj[1] );
$row['date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
"<strong>From:</strong> {$row['p_name']}
<br /><strong>To:</strong> {$row['a_name']}
<br /><strong>Sent:</strong> {$row['date']}
<br /><strong>Subject:</strong> $subj[1]
"<strong>Îò:</strong> {$row['p_name']}
<br /><strong>Êîìó:</strong> {$row['a_name']}
<br /><strong>Îòïðàâëåíî:</strong> {$row['date']}
<br /><strong>Òåìà:</strong> $subj[1]
<hr>
<br />$cont[1]
"
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
$this->ipsclass->admin->print_popup();
}
//-----------------------------------------
// Remove archived files
//-----------------------------------------
function view()
{
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
$this->ipsclass->html .= ""; // removed js popwin
$this->ipsclass->admin->page_detail = "Viewing all warn entries on a member";
$this->ipsclass->admin->page_title = "Warn Logs Manager";
$this->ipsclass->admin->page_detail = "Ïðîñìîòð âñåõ çàïèñåé î ïðåäóïðåæäåíèé ïîëüçîâàòåëÿ";
$this->ipsclass->admin->page_title = "Æóðíàë ïðåäóïðåæäåíèé";
if ($this->ipsclass->input['search_string'] == "" and $this->ipsclass->input['mid'])
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(wlog_id) as count', 'from' => 'warn_logs', 'where' => "wlog_mid=".intval($this->ipsclass->input['mid']) ) );
$this->ipsclass->DB->simple_exec();
$row = $this->ipsclass->DB->fetch_row();
$row_count = $row['count'];
$query = "&{$this->ipsclass->form_code}&mid={$this->ipsclass->input['mid']}&code=view";
$this->ipsclass->DB->cache_add_query( 'warnlogs_view', array( 'mid' => intval($this->ipsclass->input['mid']), 'start' => $start ) );
$this->ipsclass->DB->cache_exec_query();
}
else
{
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
if ( ($this->ipsclass->input['search_type'] == 'notes') )
{
$dbq = "l.wlog_notes LIKE '%".$this->ipsclass->input['search_string']."%'";
@@ -246,115 +254,115 @@ class ad_warnlogs {
{
$dbq = "l.wlog_contact_content LIKE '%".$this->ipsclass->input['search_string']."%'";
}
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(l.wlog_id) as count', 'from' => 'warn_logs l', 'where' => $dbq ) );
$this->ipsclass->DB->simple_exec();
$row = $this->ipsclass->DB->fetch_row();
$row_count = $row['count'];
$query = "&{$this->ipsclass->form_code}&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']);
$this->ipsclass->DB->cache_add_query( 'warnlogs_view_two', array( 'dbq' => $dbq, 'start' => $start ) );
$this->ipsclass->DB->cache_exec_query();
}
$links = $this->ipsclass->adskin->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
'PER_PAGE' => 30,
'CUR_ST_VAL' => $start,
'L_SINGLE' => "Single Page",
'L_MULTI' => "Pages: ",
'L_SINGLE' => "Ñòðàíèöà",
'L_MULTI' => "Ñòðàíèöû: ",
'BASE_URL' => $this->ipsclass->base_url.$query,
)
);
$this->ipsclass->admin->page_detail = "You may view warn entries added by your moderators";
$this->ipsclass->admin->page_title = "Warn Logs Manager";
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì ïðåäóïðåæäåíèé";
$this->ipsclass->admin->page_title = "Æóðíàë ïðåäóïðåæäåíèé";
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "Type" , "5%" );
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Contacted" , "5%" );
$this->ipsclass->adskin->td_header[] = array( "MOD Q" , "10%" );
$this->ipsclass->adskin->td_header[] = array( "SUSP" , "10%" );
$this->ipsclass->adskin->td_header[] = array( "NO POST" , "10%" );
$this->ipsclass->adskin->td_header[] = array( "Date" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Warned By" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "View Note" , "10%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Warn Logs" );
$this->ipsclass->adskin->td_header[] = array( "Òèï" , "5%" );
$this->ipsclass->adskin->td_header[] = array( "Ïîëüçîâàòåëü" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Óâåäîìëåí?" , "5%" );
$this->ipsclass->adskin->td_header[] = array( "Ïðîâåðêà ñîîáùåíèé" , "10%" );
$this->ipsclass->adskin->td_header[] = array( "Áàí" , "10%" );
$this->ipsclass->adskin->td_header[] = array( "Çàïðåò ñîîáùåíèé" , "10%" );
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "15%" );
$this->ipsclass->adskin->td_header[] = array( "Ïîñìîòðåòü çàìåòêè" , "10%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë ïðåäóïðåæäåíèé" );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
$days = array( 'd' => "Days", 'h' => "Hours" );
$days = array( 'd' => "Äíåé", 'h' => "÷àñîâ" );
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$row['wlog_date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' );
$type = ( $row['wlog_type'] == 'pos' ) ? '<span style="color:green;font-weight:bold">-</span>' : '<span style="color:red;font-weight:bold">+</span>';
$cont = ( $row['wlog_contact'] != 'none' ) ? "<center><a href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewcontact&id={$row['wlog_id']}\",\"Log\", 400,400)'>View</a></center>" : '&nbsp;';
$cont = ( $row['wlog_contact'] != 'none' ) ? "<center><a href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewcontact&id={$row['wlog_id']}\",\"Log\", 400,400)'>Ïðîñìîòð</a></center>" : '&nbsp;';
$mod = preg_match( "#<mod>(.+?)</mod>#is" , $row['wlog_notes'], $mm );
$post = preg_match( "#<post>(.+?)</post>#is" , $row['wlog_notes'], $pm );
$susp = preg_match( "#<susp>(.+?)</susp>#is" , $row['wlog_notes'], $sm );
$content = preg_match( "#<content>(.+?)</content>#is", $row['wlog_notes'], $cm );
$content = $cm[1];
$mod = trim($mm[1]);
$post = trim($pm[1]);
$susp = trim($sm[1]);
list($v, $u, $i) = explode(',', $mod);
if ( $i == 1 )
{
$mod = 'INDEF';
$mod = 'Íå îïðåäåëåíî';
}
else if ( $v == "" )
{
$mod = 'None';
$mod = 'Íåò';
}
else
{
$mod = $v.' '.$days[$u];
}
//-----------------------------------------
list($v, $u, $i) = explode(',', $post);
if ( $i == 1 )
{
$post = 'INDEF';
$post = 'Íå îïðåäåëåíî';
}
else if ( $v == "" )
{
$post = 'None';
$post = 'Íåò';
}
else
{
$post = $v.' '.$days[$u];
}
list($v, $u) = explode(',', $susp);
if ( $v == "" )
{
$susp = 'None';
$susp = 'íåò';
}
else
{
$susp = $v.' '.$days[$u];
}
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
"<center>$type</center>",
"<b>{$row['a_name']}</b>",
@@ -364,83 +372,83 @@ class ad_warnlogs {
$post,
"{$row['wlog_date']}",
"<b>{$row['p_name']}</b>",
"<center><a href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewnote&id={$row['wlog_id']}\",\"Log\",400,400)'>View</a></center>"
"<center><a href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewnote&id={$row['wlog_id']}\",\"Log\",400,400)'>Ïðîñìîòð</a></center>"
) );
}
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
}
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'tablesubheader');
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
//-----------------------------------------
// Remove archived files
//-----------------------------------------
function remove()
{
if ($this->ipsclass->input['mid'] == "")
{
$this->ipsclass->admin->error("You did not select a member ID to remove by!");
$this->ipsclass->admin->error("Âû íå âûáðàëè ïîëüçîâàòåëÿ, êîòîðîìó íåîáõîäèìî óäàëèòü ïðåäóïðåæäåíèå.");
}
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'warn_logs', 'where' => "wlog_mid=".intval($this->ipsclass->input['mid']) ) );
$this->ipsclass->admin->save_log("Removed Warn Logs");
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
$this->ipsclass->admin->save_log("Ïðåäóïðåæäåíèå óäàëåíî");
$this->ipsclass->boink_it($this->ipsclass->base_url."&{$this->ipsclass->form_code}");
}
//-----------------------------------------
// SHOW LOGS
//-----------------------------------------
function list_current()
{
$form_array = array();
$this->ipsclass->admin->page_detail = "You may view and remove warn actions performed by your staff.<br />Note: Removing the logs does not decrease the member's warn level";
$this->ipsclass->admin->page_title = "Warn Logs Manager";
$this->ipsclass->admin->page_detail = " ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óïðàâëÿòü æóðíàëîì ïðåäóïðåæäåíèé.<br />Ïðèìå÷àíèå: óäàëåíèå çàïèñåé èç æóðíàëà íå ïîíèæàåò óðîâåíü ïðåäóïðåæäåíèé ïîëüçîâàòåëÿ.";
$this->ipsclass->admin->page_title = "Æóðíàë ïðåäóïðåæäåíèé";
$this->ipsclass->html .= ""; // removed js popwin
//-----------------------------------------
// VIEW LAST 5
//-----------------------------------------
$this->ipsclass->DB->cache_add_query( 'warnlogs_list_current', array() );
$this->ipsclass->DB->cache_exec_query();
$this->ipsclass->adskin->td_header[] = array( "Type" , "5%" );
$this->ipsclass->adskin->td_header[] = array( "Warned Member" , "25%" );
$this->ipsclass->adskin->td_header[] = array( "Contacted?" , "5%" );
$this->ipsclass->adskin->td_header[] = array( "Date" , "25%" );
$this->ipsclass->adskin->td_header[] = array( "Warned By" , "25%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Last 10 Warn Entries" );
$this->ipsclass->adskin->td_header[] = array( "Òèï" , "5%" );
$this->ipsclass->adskin->td_header[] = array( "Ïîëüçîâàòåëü" , "25%" );
$this->ipsclass->adskin->td_header[] = array( "Óâåäîìëåí?" , "5%" );
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ" , "25%" );
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "25%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîñëåäíèå 10 çàïèñåé" );
if ( $this->ipsclass->DB->get_num_rows() )
{
while ( $row = $this->ipsclass->DB->fetch_row() )
{
$row['wlog_date'] = $this->ipsclass->admin->get_date( $row['wlog_date'], 'LONG' );
$type = ( $row['wlog_type'] == 'pos' ) ? '<span style="color:green;font-weight:bold">-</span>' : '<span style="color:red;font-weight:bold">+</span>';
$cont = ( $row['wlog_contact'] != 'none' ) ? "<center><a title='Show message' href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewcontact&id={$row['wlog_id']}\",\"Log\",400,400)'><img src='{$this->ipsclass->skin_acp_url}/images/acp_check.gif' border='0' alt='X'></a></center>" : '&nbsp;';
$cont = ( $row['wlog_contact'] != 'none' ) ? "<center><a title='Ïîêàçàòü ñîîáùåíèå' href='javascript:pop_win(\"&{$this->ipsclass->form_code}&code=viewcontact&id={$row['wlog_id']}\",\"Log\",400,400)'><img src='{$this->ipsclass->skin_acp_url}/images/acp_check.gif' border='0' alt='X'></a></center>" : '&nbsp;';
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array(
"<center>$type</center>",
"<b>{$row['a_name']}</b>",
@@ -452,79 +460,79 @@ class ad_warnlogs {
}
else
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>No results</center>");
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
}
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
$this->ipsclass->adskin->td_header[] = array( "Member Name" , "30%" );
$this->ipsclass->adskin->td_header[] = array( "Times Warned" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "View all by member" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Remove all by member" , "30%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Saved Warn Logs" );
$this->ipsclass->adskin->td_header[] = array( "Ïîëüçîâàòåëü" , "30%" );
$this->ipsclass->adskin->td_header[] = array( "Âðåìÿ ïðåäóïðåæäåíèÿ" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Ïðîñìîòð âñåõ ïðåäóïðåæäåíèé" , "20%" );
$this->ipsclass->adskin->td_header[] = array( "Óäàëåíèå âñåõ ïðåäóïðåæäåíèé" , "30%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Æóðíàë ïðåäóïðåæäåíèé" );
$this->ipsclass->DB->cache_add_query( 'warnlogs_list_current_two', array() );
$this->ipsclass->DB->cache_exec_query();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$r['members_display_name']}</b>",
"<center>{$r['act_count']}</center>",
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&mid={$r['wlog_mid']}'>View</a></center>",
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&mid={$r['wlog_mid']}'>Remove</a></center>",
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=view&mid={$r['wlog_mid']}'>Ïðîñìîòð</a></center>",
"<center><a href='".$this->ipsclass->base_url."&{$this->ipsclass->form_code}&code=remove&mid={$r['wlog_mid']}'>Óäàëèòü</a></center>",
) );
}
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
2 => array( 'act' , 'warnlog' ),
4 => array( 'section', $this->ipsclass->section_code ),
) );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "40%" );
$this->ipsclass->adskin->td_header[] = array( "&nbsp;" , "60%" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Search Warn Logs" );
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê äåéñòâèé â æóðíàëå" );
$form_array = array(
0 => array( 'notes' , 'Entry Notes' ),
1 => array( 'contact', 'Email/PM Sent' ),
0 => array( 'notes' , 'Çàìåòêè' ),
1 => array( 'contact', 'Îòïðàâêà Email/PM' ),
);
//-----------------------------------------
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search for...</b>" ,
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü </b>" ,
$this->ipsclass->adskin->form_input( "search_string")
) );
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Search in...</b>" ,
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü â </b>" ,
$this->ipsclass->adskin->form_dropdown( "search_type", $form_array)
) );
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Search");
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èñêàòü");
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
//-----------------------------------------
//-------------------------------
$this->ipsclass->admin->output();
}
}
+383 -340
View File
@@ -1,341 +1,384 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > XML OUT Functions for XmlHttpRequest functions
| > Module written by Matt Mecham
| > Date started: Friday 18th March 2005
|
| > Module Version Number: 1.1.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_IPB' ) )
{
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();
}
class ad_xmlout
{
# Classes
var $ipsclass;
var $search;
var $xml_output;
var $xml_header;
/*-------------------------------------------------------------------------*/
// Constructor
/*-------------------------------------------------------------------------*/
function xmlout()
{
$this->xml_header = '<?xml version="1.0" encoding="ISO-8859-1"?'.'>';
}
/*-------------------------------------------------------------------------*/
// Auto run
/*-------------------------------------------------------------------------*/
function auto_run()
{
//-----------------------------------------
// INIT
//-----------------------------------------
if ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] )
{
$this->ipsclass->input['do'] = $this->ipsclass->input['j_do'];
}
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->ipsclass->input['do'] )
{
case 'get-template-names':
$this->get_template_names();
break;
case 'get-member-names':
$this->get_member_names();
break;
case 'get-dir-size':
$this->get_dir_size();
break;
case 'post-editorswitch':
$this->post_editorswitch();
break;
}
}
/*-------------------------------------------------------------------------*/
// Switch editors
/*-------------------------------------------------------------------------*/
function post_editorswitch()
{
//-----------------------------------------
// Grab public class and do...
//-----------------------------------------
require_once( ROOT_PATH . 'sources/action_public/xmlout.php' );
$lib = new xmlout();
$lib->ipsclass =& $this->ipsclass;
require_once( ROOT_PATH . 'sources/classes/class_ajax.php' );
$class_ajax = new class_ajax();
$class_ajax->ipsclass =& $this->ipsclass;
$lib->class_ajax =& $class_ajax;
return $lib->post_editorswitch();
}
/*-------------------------------------------------------------------------*/
// Get uploads size
/*-------------------------------------------------------------------------*/
function get_dir_size()
{
//-----------------------------------------
// Make sure the uploads path is correct
//-----------------------------------------
$uploads_size = 0;
if ($dh = @opendir( $this->ipsclass->vars['upload_dir'] ))
{
while ( $file = @readdir( $dh ) )
{
if ( ! preg_match( "/^..?$|^index/i", $file ) )
{
if( is_dir( $this->ipsclass->vars['upload_dir'] . "/" . $file ) )
{
if( $sub_dh = @opendir( $this->ipsclass->vars['upload_dir'] . "/" . $file ))
{
while ( $sub_file = @readdir( $sub_dh ) )
{
if ( ! preg_match( "/^..?$|^index/i", $sub_file ) )
{
$uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file . "/" . $sub_file );
}
}
}
}
else
{
$uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file );
}
}
}
@closedir( $dh );
}
//-----------------------------------------
// This piece of code from Jesse's (jesse@jess.on.ca) contribution
// to the PHP manual @ php.net posted without license
//-----------------------------------------
if ($uploads_size >= 1048576)
{
$uploads_size = round($uploads_size / 1048576 * 100 ) / 100 . " mb";
}
else if ($uploads_size >= 1024)
{
$uploads_size = round($uploads_size / 1024 * 100 ) / 100 . " k";
}
else
{
$uploads_size = $uploads_size . " bytes";
}
$this->print_nocache_headers();
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
print $uploads_size;
exit();
}
/*-------------------------------------------------------------------------*/
// Get new posts
/*-------------------------------------------------------------------------*/
function get_member_names()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['name'] ) );
//--------------------------------------------
// Load extra db cache file
//--------------------------------------------
$this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( strlen( $name ) < 3 )
{
$this->return_null();
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->ipsclass->DB->cache_add_query( 'member_display_name_lookup', array( 'name' => $name, 'field' => 'members_display_name' ), 'sql_extra_queries' );
$this->ipsclass->DB->cache_exec_query();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->ipsclass->DB->get_num_rows() )
{
$this->return_null();
}
$names = array();
$ids = array();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$names[] = '"'.$r['members_display_name'].'"';
$ids[] = intval($r['id']);
}
$this->print_nocache_headers();
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );";
exit();
}
/*-------------------------------------------------------------------------*/
// Get template names
/*-------------------------------------------------------------------------*/
function get_template_names()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = $this->ipsclass->parse_clean_value( urldecode( $_REQUEST['name'] ) );
$id = intval( $_REQUEST['id'] );
//-----------------------------------------
// Get $skin_names stuff
//-----------------------------------------
require_once( ROOT_PATH.'sources/lib/skin_info.php' );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( strlen( $name ) < 3 )
{
$this->return_null();
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => "suid,set_id,group_name,func_name",
'from' => 'skin_templates',
'where' => "set_id=1 AND LOWER(func_name) LIKE '{$name}%'",
'order' => 'LENGTH(func_name) ASC',
'limit' => array( 0,20 ) ) );
$this->ipsclass->DB->exec_query();
$names = array();
$ids = array();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$names[] = '"'.$r['func_name'].' ('.$r['group_name'].')"';
$ids[] = intval($r['suid']);
}
$this->print_nocache_headers();
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );";
exit();
}
/*-------------------------------------------------------------------------*/
// make string XML safe
/*-------------------------------------------------------------------------*/
function _make_safe_for_xml( $t )
{
return str_replace( '&amp;#39;', '&#39;', htmlspecialchars( $t ) );
}
/*-------------------------------------------------------------------------*/
// Print no cache headers
/*-------------------------------------------------------------------------*/
function print_nocache_headers()
{
header("HTTP/1.0 200 OK");
header("HTTP/1.1 200 OK");
header("Cache-Control: no-cache, must-revalidate, max-age=0");
header("Expires: 0");
header("Pragma: no-cache");
}
/*-------------------------------------------------------------------------*/
// Error handler
/*-------------------------------------------------------------------------*/
function error_handler()
{
@header( "Content-type: text/xml" );
$this->xml_output = $this->xml_header."\r\n<errors>\r\n";
$this->xml_output .= "<error><message>You must be logged in to access this feature</message></error>\r\n";
$this->xml_output .= "</errors>";
print $this->xml_output;
exit();
}
/*-------------------------------------------------------------------------*/
// Return NOTHING :o
/*-------------------------------------------------------------------------*/
function return_null($val=0)
{
@header( "Content-type: text/xml" );
print $this->xml_header."\r\n<null>{$val}</null>"; exit();
}
}
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| http://www.ibresource.ru/products/invisionpowerboard/
| Time: Monday 05th of March 2007 10:10:54 PM
| Release: e3790216629e5a2aaf37070b32237f06
| Licence Info: http://www.invisionboard.com/?license
| http://www.ibresource.ru/license
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-12-13 05:41:32 -0500 (Wed, 13 Dec 2006) $
| > $Revision: 788 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
| > XML OUT Functions for XmlHttpRequest functions
| > Module written by Matt Mecham
| > Date started: Friday 18th March 2005
|
| > Module Version Number: 1.1.0
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class ad_xmlout
{
# Classes
var $ipsclass;
var $search;
var $xml_output;
var $xml_header;
/*-------------------------------------------------------------------------*/
// Constructor
/*-------------------------------------------------------------------------*/
function xmlout()
{
$this->xml_header = '<?xml version="1.0" encoding="WINDOWS-1251"?'.'>';
}
/*-------------------------------------------------------------------------*/
// Auto run
/*-------------------------------------------------------------------------*/
function auto_run()
{
//-----------------------------------------
// INIT
//-----------------------------------------
if ( isset($this->ipsclass->input['j_do']) AND $this->ipsclass->input['j_do'] )
{
$this->ipsclass->input['do'] = $this->ipsclass->input['j_do'];
}
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->ipsclass->input['do'] )
{
case 'get-template-names':
$this->get_template_names();
break;
case 'get-member-names':
$this->get_member_names();
break;
case 'get-dir-size':
$this->get_dir_size();
break;
case 'post-editorswitch':
$this->post_editorswitch();
break;
case 'captcha_test':
$this->captcha_test();
break;
}
}
/*-------------------------------------------------------------------------*/
// Switch editors
/*-------------------------------------------------------------------------*/
function captcha_test()
{
//-----------------------------------------
// Generate number
//-----------------------------------------
mt_srand( (double) microtime() * 1000000 );
$final_rand = md5( uniqid( mt_rand(), TRUE ) );
mt_srand();
for( $i = 0; $i < 6; $i++ )
{
$captcha_string .= $final_rand{ mt_rand(0, 31) };
}
//-----------------------------------------
// Generate image
//-----------------------------------------
require_once( KERNEL_PATH . 'class_captcha.php' );
$class_captcha = new class_captcha();
$class_captcha->ipsclass =& $this->ipsclass;
$class_captcha->path_background = ROOT_PATH . 'style_captcha/captcha_backgrounds';
$class_captcha->path_fonts = ROOT_PATH . 'style_captcha/captcha_fonts';
return $class_captcha->captcha_show_gd_img( $captcha_string );
}
/*-------------------------------------------------------------------------*/
// Switch editors
/*-------------------------------------------------------------------------*/
function post_editorswitch()
{
//-----------------------------------------
// Grab public class and do...
//-----------------------------------------
require_once( ROOT_PATH . 'sources/action_public/xmlout.php' );
$lib = new xmlout();
$lib->ipsclass =& $this->ipsclass;
require_once( KERNEL_PATH . 'class_ajax.php' );
$class_ajax = new class_ajax();
$class_ajax->ipsclass =& $this->ipsclass;
$lib->class_ajax =& $class_ajax;
return $lib->post_editorswitch();
}
/*-------------------------------------------------------------------------*/
// Get uploads size
/*-------------------------------------------------------------------------*/
function get_dir_size()
{
//-----------------------------------------
// Make sure the uploads path is correct
//-----------------------------------------
$uploads_size = 0;
if ($dh = @opendir( $this->ipsclass->vars['upload_dir'] ))
{
while ( false !== ( $file = @readdir( $dh ) ) )
{
if ( ! preg_match( "/^..?$|^index/i", $file ) )
{
if( is_dir( $this->ipsclass->vars['upload_dir'] . "/" . $file ) )
{
if( $sub_dh = @opendir( $this->ipsclass->vars['upload_dir'] . "/" . $file ))
{
while ( false !== ( $sub_file = @readdir( $sub_dh ) ) )
{
if ( ! preg_match( "/^..?$|^index/i", $sub_file ) )
{
$uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file . "/" . $sub_file );
}
}
}
}
else
{
$uploads_size += @filesize( $this->ipsclass->vars['upload_dir'] . "/" . $file );
}
}
}
@closedir( $dh );
}
//-----------------------------------------
// This piece of code from Jesse's (jesse@jess.on.ca) contribution
// to the PHP manual @ php.net posted without license
//-----------------------------------------
if ($uploads_size >= 1048576)
{
$uploads_size = round($uploads_size / 1048576 * 100 ) / 100 . " ìá";
}
else if ($uploads_size >= 1024)
{
$uploads_size = round($uploads_size / 1024 * 100 ) / 100 . " êá";
}
else
{
$uploads_size = $uploads_size . " áàéò";
}
$this->print_nocache_headers();
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
print $uploads_size;
exit();
}
/*-------------------------------------------------------------------------*/
// Get new posts
/*-------------------------------------------------------------------------*/
function get_member_names()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = $this->ipsclass->parse_clean_value( rawurldecode( $_REQUEST['name'] ) );
//--------------------------------------------
// Load extra db cache file
//--------------------------------------------
$this->ipsclass->DB->load_cache_file( ROOT_PATH.'sources/sql/'.SQL_DRIVER.'_extra_queries.php', 'sql_extra_queries' );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( strlen( $name ) < 3 )
{
$this->return_null();
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->ipsclass->DB->cache_add_query( 'member_display_name_lookup', array( 'name' => $name, 'field' => 'members_display_name' ), 'sql_extra_queries' );
$this->ipsclass->DB->cache_exec_query();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->ipsclass->DB->get_num_rows() )
{
$this->return_null();
}
$names = array();
$ids = array();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$names[] = '"'.$r['members_display_name'].'"';
$ids[] = intval($r['id']);
}
$this->print_nocache_headers();
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );";
exit();
}
/*-------------------------------------------------------------------------*/
// Get template names
/*-------------------------------------------------------------------------*/
function get_template_names()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = $this->ipsclass->parse_clean_value( urldecode( $_REQUEST['name'] ) );
$id = intval( $_REQUEST['id'] );
//-----------------------------------------
// Get $skin_names stuff
//-----------------------------------------
require_once( ROOT_PATH.'sources/lib/skin_info.php' );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( strlen( $name ) < 3 )
{
$this->return_null();
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->ipsclass->DB->build_query( array( 'select' => "suid,set_id,group_name,func_name",
'from' => 'skin_templates',
'where' => "set_id=1 AND LOWER(func_name) LIKE '{$name}%'",
'order' => 'LENGTH(func_name) ASC',
'limit' => array( 0,20 ) ) );
$this->ipsclass->DB->exec_query();
$names = array();
$ids = array();
while( $r = $this->ipsclass->DB->fetch_row() )
{
$names[] = '"'.$r['func_name'].' ('.$r['group_name'].')"';
$ids[] = intval($r['suid']);
}
$this->print_nocache_headers();
@header( "Content-type: text/plain;charset={$this->ipsclass->vars['gb_char_set']}" );
print "returnSearch( '".str_replace( "'", "", $name )."', new Array(".implode( ",", $names )."), new Array(".implode( ",", $ids ).") );";
exit();
}
/*-------------------------------------------------------------------------*/
// make string XML safe
/*-------------------------------------------------------------------------*/
function _make_safe_for_xml( $t )
{
return str_replace( '&amp;#39;', '&#39;', htmlspecialchars( $t ) );
}
/*-------------------------------------------------------------------------*/
// Print no cache headers
/*-------------------------------------------------------------------------*/
function print_nocache_headers()
{
header("HTTP/1.0 200 OK");
header("HTTP/1.1 200 OK");
header("Cache-Control: no-cache, must-revalidate, max-age=0");
header("Expires: 0");
header("Pragma: no-cache");
}
/*-------------------------------------------------------------------------*/
// Error handler
/*-------------------------------------------------------------------------*/
function error_handler()
{
@header( "Content-type: text/xml;charset={$this->ipsclass->vars['gb_char_set']}" );
$this->xml_output = $this->xml_header."\r\n<errors>\r\n";
$this->xml_output .= "<error><message>Âû äîëæíû áûòü àâòîðèçîâàíû, ÷òîáû ïîëó÷èòü äîñòóï</message></error>\r\n";
$this->xml_output .= "</errors>";
print $this->xml_output;
exit();
}
/*-------------------------------------------------------------------------*/
// Return NOTHING :o
/*-------------------------------------------------------------------------*/
function return_null($val=0)
{
@header( "Content-type: text/xml;charset={$this->ipsclass->vars['gb_char_set']}" );
print $this->xml_header."\r\n<null>{$val}</null>"; exit();
}
}
?>
+16 -6
View File
@@ -2,16 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-10-17 22:30:46 +0100 (Tue, 17 Oct 2006) $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-10-17 16:30:46 -0500 (Tue, 17 Oct 2006) $
| > $Revision: 652 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -153,15 +163,15 @@ class announcements
if ( $announce['announce_start'] and $announce['announce_end'] )
{
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_both'], gmdate( 'jS F Y', $announce['announce_start'] ), gmdate( 'jS F Y', $announce['announce_end'] ) );
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_both'], gmdate( 'd.m.Y', $announce['announce_start'] ), gmdate( 'd.m.Y', $announce['announce_end'] ) );
}
else if ( $announce['announce_start'] and ! $announce['announce_end'] )
{
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_start'], gmdate( 'jS F Y', $announce['announce_start'] ) );
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_start'], gmdate( 'd.m.Y', $announce['announce_start'] ) );
}
else if ( ! $announce['announce_start'] and $announce['announce_end'] )
{
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_end'], gmdate( 'jS F Y', $announce['announce_end'] ) );
$announce['running_date'] = sprintf( $this->ipsclass->lang['announce_end'], gmdate( 'd.m.Y', $announce['announce_end'] ) );
}
else
{
+15 -4
View File
@@ -2,14 +2,24 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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-05-05 21:58:19 +0100 (Fri, 05 May 2006) $
| > $Revision: 246 $
@@ -27,7 +37,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -217,6 +227,7 @@ class attach {
//-----------------------------------------
$this->class_attach->type = $attach_rel_module;
$this->class_attach->attach_post_key = $attach_post_key;
$this->class_attach->init();
$this->class_attach->get_upload_form_settings();
@@ -335,7 +346,7 @@ class attach {
'add_join' => array( 0 => array(
'select' => 'a.*',
'from' => array( 'attachments' => 'a' ),
'where' => "a.attach_rel_module='post' AND a.attach_rel_id=p.pid",
'where' => "a.attach_rel_id=p.pid AND a.attach_rel_module='post'",
'type' => 'left' ) )
) );
@@ -528,7 +539,7 @@ class attach {
// Open and display the file..
//-----------------------------------------
$fh = fopen( $file, 'rb' ); // <{%dyn.down.var.md5p1%}>, Set binary for Win even if it's an ascii file, it won't hurt.
$fh = fopen( $file, 'rb' ); // e3790216629e5a2aaf37070b32237f06, Set binary for Win even if it's an ascii file, it won't hurt.
fpassthru( $fh );
fclose( $fh );
exit();
+22 -11
View File
@@ -2,18 +2,28 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-10-20 16:40:37 -0500 (Fri, 20 Oct 2006) $
| > $Revision: 666 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Board index module
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -127,13 +137,13 @@ class boards
{
$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';
$show['div_fo'] = 'show';
$show['div_fo'] = '';
$show['div_fc'] = 'none';
if ( strstr( $collapsed_ids, ',stat,' ) )
{
$show['div_fo'] = 'none';
$show['div_fc'] = 'show';
$show['div_fc'] = '';
}
$this->output .= $this->ipsclass->compiled_templates['skin_boards']->stats_header($this->statfunc->users_online, $this->statfunc->total_posts, $this->statfunc->total_members, $show);
@@ -187,7 +197,7 @@ class boards
$this->ipsclass->print->add_output( $this->output );
$cp = " (Powered by Invision Power Board)";
$cp = " (Ðàáîòàåò íà Invision Power Board)";
if ($this->ipsclass->vars['ips_cp_purchase'])
{
@@ -218,7 +228,7 @@ class boards
$collapsed_ids = ','.$this->ipsclass->my_getcookie('collapseprefs').',';
$this->ipsclass->forums->register_class( $this );
if ( isset($this->ipsclass->forums->forum_cache[ $fid ]) AND is_array( $this->ipsclass->forums->forum_cache[ $fid ] ) )
{
$cat_data = $this->ipsclass->forums->forum_by_id[ $fid ];
@@ -234,6 +244,7 @@ class boards
foreach( $this->ipsclass->forums->forum_cache[ $fid ] as $forum_data )
{
$forum_data['_queued_img'] = isset($forum_data['_queued_img'] ) ? $forum_data['_queued_img'] : '';
$forum_data['_queued_info'] = isset($forum_data['_queued_info'] ) ? $forum_data['_queued_info'] : '';
$forum_data['show_subforums'] = isset($forum_data['show_subforums'] ) ? $forum_data['show_subforums'] : '';
@@ -359,13 +370,13 @@ class boards
$cat_data = $forum_data;
$cat_data['div_fo'] = 'show';
$cat_data['div_fo'] = '';
$cat_data['div_fc'] = 'none';
if ( strstr( $collapsed_ids, ','.$cat_data['id'].',' ) )
{
$cat_data['div_fo'] = 'none';
$cat_data['div_fc'] = 'show';
$cat_data['div_fc'] = '';
}
if ( isset($this->ipsclass->forums->forum_cache[ $forum_data['id'] ]) AND is_array( $this->ipsclass->forums->forum_cache[ $forum_data['id'] ] ) )
+13 -3
View File
@@ -2,16 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -29,7 +39,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
File diff suppressed because it is too large. Load diff
+13 -3
View File
@@ -2,16 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-26 12:17:53 +0100 (Tue, 26 Sep 2006) $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-26 06:17:53 -0500 (Tue, 26 Sep 2006) $
| > $Revision: 574 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -33,7 +43,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
+45 -6
View File
@@ -2,16 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-28 23:05:45 +0100 (Thu, 28 Sep 2006) $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-28 17:05:45 -0500 (Thu, 28 Sep 2006) $
| > $Revision: 587 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -459,7 +469,7 @@ class forums {
{
if ( $announce['announce_start'] )
{
$announce['announce_start'] = gmdate( 'jS F Y', $announce['announce_start'] );
$announce['announce_start'] = gmdate( 'd.m.Y', $announce['announce_start'] );
}
else
{
@@ -1110,11 +1120,22 @@ class forums {
}
else
{
// Better safe than sorry - been seeing a lot of SQL errors popping up about the dup unique key
$check = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'marker_forum_id', 'from' => 'topic_markers', 'where' => 'marker_member_id='.$this->ipsclass->member['id'].' AND marker_forum_id='.$this->forum['id'] ) );
if( !$check['marker_forum_id'] )
{
$save_array['marker_member_id'] = $this->ipsclass->member['id'];
$save_array['marker_forum_id'] = $this->forum['id'];
$this->ipsclass->DB->do_shutdown_insert( 'topic_markers', $save_array );
}
else
{
$this->ipsclass->DB->do_shutdown_update( 'topic_markers', $save_array, 'marker_member_id='.$this->ipsclass->member['id'].' AND marker_forum_id='.$this->forum['id'] );
}
}
}
}
@@ -1142,8 +1163,19 @@ class forums {
$cut_off = ($this->ipsclass->vars['au_cutoff'] != "") ? $this->ipsclass->vars['au_cutoff'] * 60 : 900;
$time = time() - $cut_off;
$this->ipsclass->DB->cache_add_query('forums_get_active_users', array( 'fid' => $this->forum['id'], 'time' => $time ) );
$this->ipsclass->DB->simple_exec();
$this->ipsclass->DB->build_query( array( 'select' => 's.member_id, s.member_name, s.member_group, s.id, s.login_type, s.location, s.running_time',
'from' => array( 'sessions' => 's' ),
'where' => "s.location_2_type='forum' AND s.location_2_id={$this->forum['id']} AND s.running_time > {$time} AND s.in_error=0",
'add_join' => array(
array(
'type' => 'left',
'select' => 't.forum_id',
'where' => 't.tid=s.location_1_id',
'from' => array( 'topics' => 't' ),
),
),
) );
$this->ipsclass->DB->exec_query();
//-----------------------------------------
// ACTIVE USERS
@@ -1418,6 +1450,13 @@ class forums {
if ($topic['posts'])
{
$mode = $this->ipsclass->my_getcookie( 'topicmode' );
if( $mode == 'threaded' )
{
$this->ipsclass->vars['display_max_posts'] = $this->ipsclass->vars['threaded_per_page'];
}
if ( (($topic['posts'] + 1) % $this->ipsclass->vars['display_max_posts']) == 0 )
{
$pages = ($topic['posts'] + 1) / $this->ipsclass->vars['display_max_posts'];
+20 -5
View File
@@ -2,17 +2,27 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-11-06 10:23:24 -0600 (Mon, 06 Nov 2006) $
| > $Revision: 714 $
| > $Author: matt $
+---------------------------------------------------------------------------
|
@@ -29,7 +39,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -136,7 +146,7 @@ class help
{
$id = isset($this->ipsclass->input['HID']) ? intval($this->ipsclass->input['HID']) : 0;
if (! preg_match( "/^(\d+)$/" , $id ) )
if ( ! preg_match( "/^(\d+)$/" , $id ) )
{
$this->show_titles();
return;
@@ -150,6 +160,11 @@ class help
$topic = $this->ipsclass->DB->fetch_row();
if ( ! $topic['id'] )
{
$this->ipsclass->Error( array( 'MSG' => 'help_no_id' ) );
}
$this->output = $this->ipsclass->compiled_templates['skin_help']->start( $this->ipsclass->lang['help_topic'], $this->ipsclass->lang['topic_text'], $topic['title'] );
$this->output .= $this->ipsclass->compiled_templates['skin_help']->display( $this->ipsclass->text_tidy( $topic['text'] ) );
+10 -1
View File
@@ -1 +1,10 @@
<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>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<meta name="author" content="Êîìïàíèÿ IBResource è Invision Power Services Inc.">
<title>Îøèáêà ðóññêîé âåðñèè Invision Power Board</title>
</head><body>
<h1>Îøèáêà <a href="http://www.ibresource.ru/">ðóññêîé âåðñèè Invision Power Board</a></h1>
<font size="4">Âû ïîïàëè íà íåñóùåñòâóþùóþ ñòðàíèöó!<br>Ïîæàëóéñòà íàæìèòå íà êíîïî÷êó &laquo;<b>Íàçàä</b>&raquo; â&nbsp;âàøåì áðàóçåðå äëÿ âîçâðàùåíèÿ íà ïðåäûäóùóþ ñòðàíèöó.</font>
</body>
</html>
+29 -18
View File
@@ -2,17 +2,27 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-10-12 17:58:40 +0100 (Thu, 12 Oct 2006) $
| > $Revision: 633 $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2007-02-21 14:35:34 -0500 (Wed, 21 Feb 2007) $
| > $Revision: 855 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -209,8 +219,19 @@ class login
// DELETE IPB COOKIES
/*-------------------------------------------------------------------------*/
function delete_cookies()
function delete_cookies( $check_key=1 )
{
if( $check_key )
{
$key = $this->ipsclass->input['k'];
# Check for funny business
if ( $key != $this->ipsclass->md5_check )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
if (is_array($_COOKIE))
{
foreach( $_COOKIE as $cookie => $value)
@@ -457,7 +478,7 @@ class login
if ( $show_form )
{
if ( $this->ipsclass->my_getenv('HTTP_REFERER') )
if ( !$this->ipsclass->my_getenv('HTTP_REFERER') OR !preg_match( "/" . preg_quote( $this->ipsclass->vars['board_url'], '/' ) . "/i", $this->ipsclass->my_getenv('HTTP_REFERER') ) )
{
// HTTP_REFERER isn't set when force_login is enabled
// This method will piece together the base url, and the querystring arguments
@@ -612,16 +633,6 @@ class login
}
}
//-----------------------------------------
// We in a validating group?
// still need this?
//-----------------------------------------
if ( $member['mgroup'] == $this->ipsclass->vars['auth_group'] )
{
//$this->log_in_form( 'need_validation' );
}
//-----------------------------------------
// Generate a new log in key
//-----------------------------------------
@@ -786,7 +797,7 @@ class login
}
//-----------------------------------------
// set our privacy status
// Set our privacy status
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'update' => 'members',
@@ -839,7 +850,7 @@ class login
if ( $member_extra['bio'] == 'dupemail' )
{
$this->ipsclass->print->redirect_screen( "{$this->ipsclass->lang['thanks_for_login']} {$this->ipsclass->member['members_display_name']}", 'act=usercp' );
$this->ipsclass->print->redirect_screen( "{$this->ipsclass->lang['thanks_for_login']} {$this->ipsclass->member['members_display_name']}", 'act=usercp&amp;CODE=00' );
}
else
{
+19 -9
View File
@@ -2,18 +2,28 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-10-09 16:33:46 +0100 (Mon, 09 Oct 2006) $
| > $Revision: 622 $
| > $Author: matt $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-10-25 07:58:41 -0500 (Wed, 25 Oct 2006) $
| > $Revision: 675 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Show all the members
@@ -29,7 +39,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -418,7 +428,7 @@ class memberlist
}
//-----------------------------------------
// Rating..
// Gender..
//-----------------------------------------
if ( $pp_gender )
@@ -499,9 +509,9 @@ class memberlist
'order' => $this->sort_order,
'limit_a' => $this->first,
'limit_b' => $this->max_results ) );
$this->ipsclass->DB->cache_exec_query();
$outer = $this->ipsclass->DB->cache_exec_query();
while ($member = $this->ipsclass->DB->fetch_row() )
while ($member = $this->ipsclass->DB->fetch_row($outer) )
{
$member['members_display_name'] = $member['members_display_name'] ? $member['members_display_name'] : $member['name'];
@@ -530,7 +540,7 @@ class memberlist
// New row?
//-----------------------------------------
if ( $_count % $_per_row == 0 )
if ( $_count % $_per_row == 0 AND $_count > 0 )
{
$member['_new_row'] = 1;
}
+81 -17
View File
@@ -2,18 +2,28 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-10-03 21:04:14 +0100 (Tue, 03 Oct 2006) $
| > $Revision: 602 $
| > $Author: bfarber $
| 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 $
+---------------------------------------------------------------------------
|
| > Messenger functions
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -267,10 +277,28 @@ class messenger
function end_empty_folders()
{
$names = array( 'unsent' => $this->ipsclass->lang['fd_unsent'] );
$ids = array();
$qe = "";
//-----------------------------------------
// INIT
//-----------------------------------------
$md5check = $this->ipsclass->txt_md5_clean( $this->ipsclass->input['md5check'] );
$names = array( 'unsent' => $this->ipsclass->lang['fd_unsent'] );
$ids = array();
$qe = "";
//-----------------------------------------
// Check MD5 auth key
//-----------------------------------------
if ( $md5check != $this->ipsclass->md5_check )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
//-----------------------------------------
// Do dir data dear dah-dag
//-----------------------------------------
foreach( $this->ipsclass->member['dir_data'] as $v )
{
$names[ $v['id'] ] = $v['real'];
@@ -466,8 +494,35 @@ class messenger
// Get the messages...
//-----------------------------------------
$this->ipsclass->DB->cache_add_query( 'msg_get_msg_archive', array( 'mid' => $this->ipsclass->member['id'], 'limit_b' => $this->ipsclass->input['number'], 'older_newer' => $older_newer, 'time_cut' => $time_cut, 'folder_query' => $folder_query ) );
$this->ipsclass->DB->cache_exec_query();
//$this->ipsclass->DB->cache_add_query( 'msg_get_msg_archive', array( 'mid' => $this->ipsclass->member['id'], 'limit_b' => $this->ipsclass->input['number'], 'older_newer' => $older_newer, 'time_cut' => $time_cut, 'folder_query' => $folder_query ) );
//$this->ipsclass->DB->cache_exec_query();
$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}",
'limit' => array( 0, $this->ipsclass->input['number'] ),
'add_join' => array(
array(
'select' => 'msg.msg_post',
'from' => array( 'message_text' => 'msg' ),
'where' => 'msg.msg_id=mt.mt_msg_id',
'type' => 'left'
),
array(
'select' => 'm.members_display_name, m.id',
'from' => array( 'members' => 'm' ),
'where' => 'm.id=mt.mt_from_id',
'type' => 'left'
),
array(
'select' => 'mm.members_display_name as to_name',
'from' => array( 'members' => 'mm' ),
'where' => 'mm.id=mt.mt_to_id',
'type' => 'left'
),
),
) );
$this->ipsclass->DB->exec_query();
//-----------------------------------------
// Repeat after me..
@@ -486,7 +541,15 @@ class messenger
$info['msg_date'] = $this->ipsclass->get_date( $r['mt_date'], 'LONG' );
$info['msg_title'] = $r['mt_title'];
$info['msg_sender'] = $r['members_display_name'];
if( $r['mt_vid_folder'] == 'sent' )
{
$info['msg_sender'] = $r['to_name'];
}
else
{
$info['msg_sender'] = $r['members_display_name'];
}
$info['msg_content'] = $this->parser->pre_display_parse( $this->parser->pre_db_parse( $r['msg_post'] ) );
@@ -1348,6 +1411,7 @@ class messenger
$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'] ) );
@@ -1357,7 +1421,7 @@ class messenger
$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( $this->topiclib->parser->pre_db_parse( $member['signature'] ) );
$member['signature'] = $this->topiclib->parser->pre_display_parse( $member['signature'] );
$member['signature'] = $this->ipsclass->compiled_templates['skin_global']->signature_separator($member['signature']);
}
else
@@ -1691,9 +1755,9 @@ class messenger
$info['img_width'] = 300;
}
if ($total['msg_total'] >=$this->ipsclass->member['g_max_messages'])
if ($total_current['msg_total'] >=$this->ipsclass->member['g_max_messages'])
{
$info['full_messenger'] = "<span class='highlight'>".$this->ipsclass->lang['folders_full']."</span>";
$info['full_messenger'] = "<span class='highlight'>".$this->ipsclass->lang['c_msg_full']."</span>";
}
else
{
@@ -1705,12 +1769,12 @@ class messenger
// Generate Pagination
//-----------------------------------------
$start = intval($this->ipsclass->input['st']) >=0 ? intval($this->ipsclass->input['st']) : 0;
$start = intval($this->ipsclass->input['st']) > 0 ? intval($this->ipsclass->input['st']) : 0;
$p_end = $this->ipsclass->vars['show_max_msg_list'] > 0 ? $this->ipsclass->vars['show_max_msg_list'] : 50;
if( $start*$p_end > $total_current['msg_total'] )
if ( $start >= $total_current['msg_total'] )
{
$start = (floor($total_current['msg_total']/$p_end) - 1) * $p_end;
$start = 0;
}
$pages = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $total_current['msg_total'],
File diff suppressed because it is too large. Load diff
@@ -1,310 +0,0 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board v<{%dyn.down.var.human.version%}>
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services, Inc.
| http://www.invisionpower.com
| =============================================
| Web: http://www.invisionboard.com
| Time: <{%dyn.down.var.time%}>
| Release: <{%dyn.down.var.md5%}>
| Licence Info: http://www.invisionboard.com/?license
+---------------------------------------------------------------------------
| > $Date: 2006-05-05 21:58:19 +0100 (Fri, 05 May 2006) $
| > $Revision: 246 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Attachment Handler module
| > Module written by Matt Mecham
| > Date started: 10th March 2002
|
| > Module Version Number: 1.0.0
| > DBA Checked: Mon 24th May 2004
+--------------------------------------------------------------------------
*/
if ( ! defined( 'IN_IPB' ) )
{
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();
}
class attach {
/*-------------------------------------------------------------------------*/
//
// AUTO RUN
//
/*-------------------------------------------------------------------------*/
function auto_run()
{
$this->ipsclass->input['id'] = intval($this->ipsclass->input['id']);
$this->ipsclass->input['tid'] = intval($this->ipsclass->input['tid']);
//-----------------------------------------
// Got attachment types?
//-----------------------------------------
$this->ipsclass->cache['attachtypes'] = array();
$this->ipsclass->DB->simple_construct( array( 'select' => 'atype_extension,atype_mimetype,atype_post,atype_photo,atype_img', 'from' => 'attachments_type', 'where' => "atype_photo=1 OR atype_post=1" ) );
$this->ipsclass->DB->simple_exec();
while ( $r = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->cache['attachtypes'][ $r['atype_extension'] ] = $r;
}
//-----------------------------------------
// What to do..
//-----------------------------------------
switch( $this->ipsclass->input['code'] )
{
case 'showtopic':
$this->show_topic_attachments();
break;
default:
$this->show_post_attachment();
break;
}
}
/*-------------------------------------------------------------------------*/
//
// SHOW TOPIC ATTACHMENTS ( MULTIPLE )
//
/*-------------------------------------------------------------------------*/
function show_topic_attachments()
{
if ( ! $this->ipsclass->input['tid'] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// get topic..
//-----------------------------------------
$topic = $this->ipsclass->DB->simple_exec_query( array( 'select' => '*', 'from' => 'topics', 'where' => 'tid='.$this->ipsclass->input['tid'] ) );
if ( ! $topic['topic_hasattach'] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// Check forum..
//-----------------------------------------
if ( ! $this->ipsclass->forums->forum_by_id[ $topic['forum_id'] ] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
//-----------------------------------------
// Get forum skin and lang
//-----------------------------------------
$this->ipsclass->load_language('lang_forum');
$this->ipsclass->load_language('lang_topic');
$this->ipsclass->load_template('skin_forum');
//-----------------------------------------
// aight.....
//-----------------------------------------
$this->output .= $this->ipsclass->compiled_templates['skin_forum']->forums_attachments_top($topic['title']);
$this->ipsclass->DB->cache_add_query( 'forum_get_attachments', array( 'tid' => $this->ipsclass->input['tid'] ) );
$this->ipsclass->DB->cache_exec_query();
while ( $row = $this->ipsclass->DB->fetch_row() )
{
if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $row['forum_id'] ]['read_perms']) != TRUE )
{
continue;
}
$row['image'] = $this->ipsclass->cache['attachtypes'][ $row['attach_ext'] ]['atype_img'];
$row['short_name'] = $this->ipsclass->txt_truncate( $row['attach_file'], 30 );
$row['attach_date'] = $this->ipsclass->get_date( $row['attach_date'], 'SHORT' );
$row['real_size'] = $this->ipsclass->size_format( $row['attach_filesize'] );
$this->output .= $this->ipsclass->compiled_templates['skin_forum']->forums_attachments_row( $row );
}
$this->output .= $this->ipsclass->compiled_templates['skin_forum']->forums_attachments_bottom();
$this->ipsclass->print->pop_up_window($this->ipsclass->lang['attach_title'], $this->output);
}
/*-------------------------------------------------------------------------*/
//
// SHOW POST ATTACHMENT ( SINGLE )
//
/*-------------------------------------------------------------------------*/
function show_post_attachment()
{
if ( ! $this->ipsclass->input['id'] )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// get attachment
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_id=".$this->ipsclass->input['id'] ) );
$this->ipsclass->DB->simple_exec();
if ( ! $attach = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// Handle post attachments.
//-----------------------------------------
if ( $this->ipsclass->input['type'] == 'post' )
{
//-----------------------------------------
// TheWalrus inspired fix for previewing
// the post and clicking the attachment...
//-----------------------------------------
if ( $attach['attach_pid'] == 0 AND $attach['attach_member_id'] == $this->ipsclass->member['id'] )
{
# We're OK (Further checking, maybe post key?
}
else
{
//-----------------------------------------
// Get post thingy majiggy to check perms
//-----------------------------------------
$this->ipsclass->DB->cache_add_query( 'attach_get_perms', array( 'apid' => $attach['attach_pid'] ) );
$this->ipsclass->DB->cache_exec_query();
if ( ! $post = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
if ( ! $this->ipsclass->forums->forum_by_id[ $post['forum_id'] ] )
{
//-----------------------------------------
// TheWalrus inspired fix for previewing
// the post and clicking the attachment...
//-----------------------------------------
if ( $attach['attach_pid'] == 0 AND $attach['attach_member_id'] == $this->ipsclass->member['id'] )
{
# We're ok.
}
else
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $post['forum_id'] ]['read_perms']) == FALSE )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
if ( $this->ipsclass->check_perms($this->ipsclass->forums->forum_by_id[ $post['forum_id'] ]['download_perms']) == FALSE )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'no_permission' ) );
}
}
}
else if ( $this->ipsclass->input['type'] == 'msg' and $attach['attach_msg'] )
{
$this->ipsclass->DB->simple_construct( array( 'select' => 'mt_id, mt_owner_id', 'from' => 'message_topics', 'where' => 'mt_owner_id='.$this->ipsclass->member['id'].' AND mt_msg_id='.$attach['attach_msg'] ) );
$this->ipsclass->DB->simple_exec();
if ( ! $post = $this->ipsclass->DB->fetch_row() )
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
}
else
{
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
//-----------------------------------------
// Show attachment
//-----------------------------------------
$file = $this->ipsclass->vars['upload_dir']."/".$attach['attach_location'];
if ( file_exists( $file ) and ( $this->ipsclass->cache['attachtypes'][ $attach['attach_ext'] ]['atype_mimetype'] != "" ) )
{
//-----------------------------------------
// Update the "hits"..
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'update' => 'attachments', 'set' =>"attach_hits=attach_hits+1", 'where' => "attach_id=".$this->ipsclass->input['id'] ) );
$this->ipsclass->DB->simple_exec();
//print $attach['attach_hits'];
//-----------------------------------------
// If this is a TXT / HTML file, force an
// odd extension to prevent IE from opening
// it inline.
//-----------------------------------------
$file_extension = preg_replace( "#^.*\.(.+?)$#s", "\\1", $attach['attach_file'] );
$safe_array = array( 'txt', 'html', 'htm' );
if ( in_array( strtolower($file_extension), $safe_array ) )
{
//$attach['attach_file'] .= '-rename';
}
//-----------------------------------------
// Set up the headers..
//-----------------------------------------
header( "Content-Type: ".$this->ipsclass->cache['attachtypes'][ $attach['attach_ext'] ]['atype_mimetype'] );
header( "Content-Disposition: inline; filename=\"".$attach['attach_file']."\"" );
header( "Content-Length: ".(string)(filesize( $file ) ) );
//-----------------------------------------
// Open and display the file..
//-----------------------------------------
$fh = fopen( $file, 'rb' ); // <{%dyn.down.var.md5p1%}>, Set binary for Win even if it's an ascii file, it won't hurt.
fpassthru( $fh );
fclose( $fh );
exit();
}
else
{
//-----------------------------------------
// File does not exist..
//-----------------------------------------
$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'missing_files' ) );
}
}
}
?>
File diff suppressed because it is too large. Load diff
@@ -2,16 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -139,7 +149,7 @@ class forwardpage
$this->email->ipsclass =& $this->ipsclass;
$this->email->email_init();
$lang_to_use = 'en';
$lang_to_use = 'ru';
foreach( $this->ipsclass->cache['languages'] as $l )
{
+10 -1
View File
@@ -1 +1,10 @@
<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>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<meta name="author" content="Êîìïàíèÿ IBResource è Invision Power Services Inc.">
<title>Îøèáêà ðóññêîé âåðñèè Invision Power Board</title>
</head><body>
<h1>Îøèáêà <a href="http://www.ibresource.ru/">ðóññêîé âåðñèè Invision Power Board</a></h1>
<font size="4">Âû ïîïàëè íà íåñóùåñòâóþùóþ ñòðàíèöó!<br>Ïîæàëóéñòà íàæìèòå íà êíîïî÷êó &laquo;<b>Íàçàä</b>&raquo; â&nbsp;âàøåì áðàóçåðå äëÿ âîçâðàùåíèÿ íà ïðåäûäóùóþ ñòðàíèöó.</font>
</body>
</html>
+71 -14
View File
@@ -2,17 +2,27 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| 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 $
+---------------------------------------------------------------------------
|
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -254,15 +264,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.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'] ),
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'] ),
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'].' [*]List Item'.$this->ipsclass->lang['bbc_li'] ),
12 => array('[list]', '[/list]', '[*]'.$this->ipsclass->lang['bbc_li'].' [*]'.$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'] ),
@@ -306,19 +316,66 @@ class legends {
$t = $before;
$replace = explode( '{content}', $row['bbcode_replace'] );
$replace = explode( '{content}', $row['bbcode_replace'] );
$preg_tag = preg_quote($row['bbcode_tag'], '#' );
//-----------------------------------------
// Parse the BBcode
//-----------------------------------------
if ( $row['bbcode_useoption'] )
{
$t = preg_replace( "#\[".$row['bbcode_tag']."=(?:&quot;|&\#39;)?(.+?)(?:&quot;|&\#39;)?\]#si", str_replace( '{option}', "\\1", $replace[0] ), $t );
preg_match_all( "#(\[".$preg_tag."=(?:&quot;|&\#39;|\"\')?(.+?)(?:&quot;|&\#39;|\"\')?\])(.+?)(\[/".$preg_tag."\])#si", $t, $match );
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
{
$t = str_replace( '['.$row['bbcode_tag'].']' , $replace[0], $t );
# 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 );
}
}
$t = str_replace( '[/'.$row['bbcode_tag'].']', $replace[1], $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 );
@@ -2,16 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -2,16 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
+20 -10
View File
@@ -2,18 +2,28 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-11-27 17:07:12 -0600 (Mon, 27 Nov 2006) $
| > $Revision: 741 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Topic Tracker module
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -150,7 +160,7 @@ class stats {
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*,title as topic_title', 'from' => 'topics', 'where' => "tid=".$tid ) );
$this->ipsclass->DB->simple_construct( array( 'select' => 't.*,t.title as topic_title', 'from' => 'topics t', 'where' => "t.tid=".$tid ) );
$this->ipsclass->DB->simple_exec();
$this->forum = $this->ipsclass->DB->fetch_row();
@@ -318,7 +328,7 @@ class stats {
$moderators[] = array_merge( $member, array( 'forum_id' => $data['forum_id'] ) );
}
$used_ids[] = $data['group_id'];
$used_ids[] = $member['id'];
}
else if ( $data['member_id'] == $member['id'] )
{
@@ -409,11 +419,11 @@ class stats {
{
// show DB queries in graphic format(depreciated)
// left here to stop other functions breaking
flush();
ob_end_clean();
header("Content-type: image/gif");
echo base64_decode("R0lGODlhhgAfAMQAAAAAAP///+/v79/f38/Pz7+/v6+vr5+fn4+Pj4CAgHBwcGBgYFBQUEBAQDAwMCAgIBAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwAAAAAhgAfAAAF/2AgjmRpnmiqrmzrvnAsz3Rt33iu7/x8mL8AgcEgiBINg2i4EAiJxtEhmlKYrCpCY5uYYXurQ8GUGAQeB8NDYFgU1oFkwopWO4/jrImKKrgLDXkwDWAsCyICC0VCCARYCQUKRggGAgwiDY54I5ABBwpFBVEGAz+AWD+JiwUGDV0FXQGwAapGia4iBwwGWgeEhSq/CwgHDpgkCwO/sLNxyGabEAgJCwSHAcaEDn4/hMPFAUhvA80KP9/GCgoFDkYApA5tv8AnBLHGAUoBlyKAzrKQYs3zx2kMPm1CDhF6UECAE4QBqiVQAqkAgIsQnOCrpm8dtoQBlNHrI7DELwJwlv8FPCYETsF/hBQYmOjsAIAHRgj9CjimYqxP/yANAQBhDKFm80aSaIZPHyEB7UQk83RgwLWnUUl0+kXIgAIHD0MKQHAJ4rpOPkeYLbArnFFZVgQkVSpiAJYiKEVcWpRLgVwzDga02cdnE1dM/LQJGOKsCFS3bpsdOOQ4G4EBDP+BRTCX7r4lDyDoK3LxYsMGAFBBwEmgNABBW1kOO3Zgdc6WEH6gLWDxYgMzKHPnW72gWy4ICzrTbWLCQBDP0KP3eT7Cr/Tr2PuZEJS9u/fv4MOLH1/3DowBTgrLQK9CALQR7lewnxEfTKcRh8SoYAD4xpQs1AkRIBncwdBMDxXdQcj/fQIU6IxVO1yWQoPmLfFeg3g0NIKESwiyGC28xTKChiCS8OEA6pWQgAMNPBCHa4A04IAVnUA4WRde5YNLjq3gaMVMGcoIgTVRbJMAVDICFMBXosXBgAOXrJjkkg40qcADLIaTJYsOiIhNAxAMgJkD+GD5wFcPIKBCAl244cxWP4AlhZrVxHSJJHYuqcWSd0ZRESEHTPTjWbMgQM6RxjwWyBnhWCHTY4qKYEwCauaogIg5HvCJEjIFkJEAnyr3UmyxQSaCJI3t4xche636GQOuZvhKF8ZUA8sAyI3BTEmHdbIrSzNBAJmvIt73zyyH/YPCbm++ZepHcgWAAFuaXjIt6wPVSkutLgXNMksRxsxiTVG/OtOrriuZy8CKw6L7EkvIsiTqJqQaZQQDd0QLpBaGNqAmv8r862/A3c7qyQKH3FppQAPwk80xCfxATMOS/uNiJweoOc2cniBQjbTGwbRmT2PklgB/Wyhw1KGmDukpNC6HKULMYpLsbRegKjHLAyuGGAcoXfTKc0pAn6GysJ0IMHQXqfAcJjsJpCSvCgWYUXU+BwhQRiYIOFH11c8FEXYuUpBNjiw1h5RH1mqHVOMYY4lNtihlIEJMXZCQcrXbBIwRxAD33Uq2J4PPMC95iNdweOKMN+7445BfFwIAOw==");
exit();
$temp = "34934mcksmdimdskmd==<{%dyn.down.var.md5p1%}>==3jmimdm93m9md3m93d=<{%dyn.down.var.md5p2%}>=midnmnruer"; exit();
$temp = "34934mcksmdimdskmd==e3790216629e5a2aaf37070b32237f06==3jmimdm93m9md3m93d=279e=midnmnruer"; exit();
}
/*-------------------------------------------------------------------------*/
@@ -561,7 +571,7 @@ class stats {
}
else
{
$member['icq_iconn'] = '&nbsp;';
$member['icq_icon'] = '&nbsp;';
}
if ($member['aim_name'])
+13 -3
View File
@@ -2,16 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
+27 -6
View File
@@ -2,18 +2,28 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-28 16:17:26 +0100 (Thu, 28 Sep 2006) $
| > $Revision: 586 $
| > $Author: matt $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-11-21 13:35:57 -0600 (Tue, 21 Nov 2006) $
| > $Revision: 737 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Warning Module
@@ -28,7 +38,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -502,8 +512,15 @@ class warn {
// Contacting the member?
//-----------------------------------------
if ( $this->ipsclass->input['contact'] != "" )
// RTE likes to add <br /> when there is nothing
$test_content = $this->ipsclass->my_br2nl( str_replace( "&lt;", "<", str_replace( "&gt;", ">", $this->ipsclass->input['contact'] ) ) );
$test_content = trim($test_content);
if ( $test_content != "" )
{
unset($test_content);
if ( $this->han_editor->method == 'rte' )
{
$this->ipsclass->input['contact'] = $this->han_editor->process_raw_post( 'contact' );
@@ -572,6 +589,10 @@ class warn {
}
}
}
else
{
unset($test_content);
}
//-----------------------------------------
// Right - is we banned or wha?
File diff suppressed because it is too large. Load diff
+33 -7
View File
@@ -2,16 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -29,7 +39,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -1442,6 +1452,7 @@ class moderate
$new_post_key = md5(time());
$topics = array();
$forums = array();
$append_edit = 0;
$this->ipsclass->DB->cache_add_query( 'moderate_get_topics', array( 'pids' => $this->pids ) );
$this->ipsclass->DB->cache_exec_query();
@@ -1462,6 +1473,11 @@ class moderate
{
$post_to_delete[] = $p['pid'];
}
if( $p['append_edit'] )
{
$append_edit = 1;
}
}
//-----------------------------------------
@@ -1472,7 +1488,10 @@ class moderate
'author_name' => $author['name'],
'post' => $post,
'post_key' => $new_post_key,
'post_parent' => 0
'post_parent' => 0,
'edit_time' => time(),
'edit_name' => $this->ipsclass->member['members_display_name'],
'append_edit' => ( $append_edit OR !$this->ipsclass->member['g_append_edit'] ) ? 1 : 0,
), 'pid='.$this->ipsclass->input['postdate']
);
@@ -1558,6 +1577,8 @@ class moderate
}
$this->modfunc->stats_recount();
$this->moderate_log( sprintf( $this->ipsclass->lang['acp_merged_posts'], implode( ", ", $this->pids ) ) );
}
}
@@ -1873,8 +1894,6 @@ class moderate
$this->modfunc->topic_delete($tid_array);
$this->moderate_log( $this->ipsclass->lang['acp_pruned_forum'] );
//-----------------------------------------
// Show results or refresh..
//-----------------------------------------
@@ -1885,6 +1904,8 @@ class moderate
// Done...
//-----------------------------------------
$this->moderate_log( $this->ipsclass->lang['acp_pruned_forum'] );
$this->ipsclass->input['check'] = 0;
$this->prune_start( $this->ipsclass->compiled_templates['skin_mod']->mod_simple_page( $this->ipsclass->lang['cp_results'], $this->ipsclass->lang['cp_result_del'].($max) ) );
}
@@ -2936,7 +2957,7 @@ class moderate
// Get the topic from the DB
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => 'tid, title, forum_id, last_post, last_poster_id, last_poster_name, posts, views', 'from' => 'topics', 'where' => 'tid='.intval($old_id) ) );
$this->ipsclass->DB->simple_construct( array( 'select' => 'tid, title, forum_id, last_post, last_poster_id, last_poster_name, posts, views, topic_hasattach', 'from' => 'topics', 'where' => 'tid='.intval($old_id) ) );
$this->ipsclass->DB->simple_exec();
if ( ! $old_topic = $this->ipsclass->DB->fetch_row() )
@@ -3032,6 +3053,11 @@ class moderate
$updater['last_poster_id'] = $old_topic['last_poster_id'];
}
if( $old_topic['topic_hasattach'] )
{
$updater['topic_hasattach'] = $old_topic['topic_hasattach'];
}
// We need to now count the original post, which isn't in the "posts" field 'cos it was a new topic
$old_topic['posts']++;
+43 -10
View File
@@ -2,18 +2,28 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-11-08 16:47:55 -0600 (Wed, 08 Nov 2006) $
| > $Revision: 721 $
| > $Author: bfarber $
+---------------------------------------------------------------------------
|
| > Show online users
@@ -29,7 +39,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
@@ -273,8 +283,6 @@ class online
while( $r = $this->ipsclass->DB->fetch_row($outer) )
{
$r['member_name'] = $this->ipsclass->make_name_formatted( $r['member_name'], $r['member_group'] );
$final[ $r['id'] ] = $r;
//-----------------------------------------
@@ -408,6 +416,13 @@ class online
}
}
if ( !$sess['member_id'] AND (!isset($sess['is_bot']) OR !$sess['is_bot']) )
{
$sess['member_name'] = $this->ipsclass->lang['guest'];
}
$sess['member_name'] = $this->ipsclass->make_name_formatted( $sess['member_name'], $sess['member_group'] );
//-----------------------------------------
// Figure out location
//-----------------------------------------
@@ -462,7 +477,25 @@ class online
if ( isset($act) )
{
$line = isset($this->where[ $act ]) ? $this->where[ $act ] : $this->ipsclass->lang['board_index'];
if( $act == 'post' AND $tid )
{
$line = $this->where[ 'postrep' ];
}
else if( $act == 'post' AND $fid )
{
$line = $this->where[ 'postnew' ];
}
else
{
if( in_array( $act, array( 'members', 'help', 'calendar', 'online', 'boardrules' ) ) )
{
$line = isset($this->where[ $act ]) ? "<a href='{$this->ipsclass->base_url}act={$act}'>{$this->where[ $act ]}</a>" : $this->ipsclass->lang['board_index'];
}
else
{
$line = isset($this->where[ $act ]) ? $this->where[ $act ] : $this->ipsclass->lang['board_index'];
}
}
}
if ( $fid != "" and ($act == 'sf' or $act == 'st' or $act == 'post'))
@@ -473,7 +506,7 @@ class online
if ($deny != 1)
{
if ( ($tid > 0) and ($act != 'post') )
if ( ($tid > 0) )
{
$line .= " <a href='{$this->base_url}showtopic=$tid'>{$topics[$tid]}</a>";
}
@@ -540,7 +573,7 @@ class online
{
if ( !isset($sess['is_bot']) OR !$sess['is_bot'] )
{
$sess['member_name'] = $this->ipsclass->lang['guest']." ".$sess['ip_address'];
$sess['member_name'] .= ' '.$sess['ip_address'];
$sess['msg_icon'] = '&nbsp;';
}
else
@@ -1,14 +1,24 @@
<?php
/*
+--------------------------------------------------------------------------
| Invision Power Board
| ========================================
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2005 Invision Power Services
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| ========================================
| =============================================
| Web: http://www.invisionboard.com
| Email: matt@invisionpower.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)
+---------------------------------------------------------------------------
| INVISION POWER BOARD IS NOT FREE SOFTWARE!
| http://www.invisionboard.com/?license
@@ -23,8 +33,8 @@
if ( ! defined( 'IN_IPB' ) )
{
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();
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
class paysubscriptions
+16 -5
View File
@@ -2,15 +2,24 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| ========================================
| Invision Power Board 2.2.2
| =============================================
| by Matthew Mecham
| (c) 2001 - 2004 Invision Power Services
| (c) 2001 - 2006 Invision Power Services, Inc.
| http://www.invisionpower.com
| ========================================
| =============================================
| Web: http://www.invisionboard.com
| Email: matt@invisionpower.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)
+---------------------------------------------------------------------------
|
| > IPB Portal Core Module
@@ -320,6 +329,8 @@ class portal
if ( $matches[1] and $matches[2] )
{
$matches[1] = str_replace( '&', '&amp;', str_replace( '&amp;', '&', $matches[1] ) );
$links .= $this->ipsclass->compiled_templates['skin_portal']->tmpl_links_wrap( str_replace( '{board_url}', $this->ipsclass->base_url, $matches[1] ), $matches[2] );
}
}
+13 -3
View File
@@ -2,16 +2,26 @@
/*
+--------------------------------------------------------------------------
| Invision Power Board
| Invision Power Board 2.2.2
| =============================================
| 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
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 11:28:54 +0100 (Fri, 22 Sep 2006) $
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
+---------------------------------------------------------------------------
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
+---------------------------------------------------------------------------
| > $Date: 2006-09-22 05:28:54 -0500 (Fri, 22 Sep 2006) $
| > $Revision: 567 $
| > $Author: matt $
+---------------------------------------------------------------------------
@@ -29,7 +39,7 @@
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
print "<h1>Íåêîððåêòíûé àäðåñ</h1>Âû íå èìååòå äîñòóïà ê ýòîìó ôàéëó íàïðÿìóþ. Åñëè âû íåäàâíî îáíîâëÿëè ôîðóì, âû äîëæíû îáíîâèòü âñå ñîîòâåòñòâóþùèå ôàéëû.";
exit();
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
Loaded 100 of 858 files, more files were not shown because too many files have changed in this diff. Show more