Version 3.4.5

This commit is contained in:
Neo committed 2025-12-19 00:38:12 -08:00
1 parent fb6b5baabc
commit e4478369d8
1360 files changed
+228921 -179445

No files matched your search

@@ -0,0 +1,138 @@
<?php
/**
* @file bookmarks.php AJAX storage of bookmarks
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2012 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* @since 7th August 2012
* $LastChangedDate: 2011-03-10 21:00:38 +0000 (Thu, 10 Mar 2011) $
* @version v3.4.5
* $Revision: 8021 $
*/
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 AJAX storage of bookmarks
* @brief AJAX storage of tab order preference
*
*/
class admin_core_ajax_bookmarks extends ipsAjaxCommand
{
private $_classBookmark;
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_global' ), 'core' );
require_once( IPS_ROOT_PATH . 'sources/classes/admin/bookmarks.php' );
$this->_classBookmark = new classes_admin_bookmarks();
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'add':
$this->_add();
break;
case 'managePane':
$this->_managePane();
break;
case 'delete':
$this->_delete();
break;
case 'save':
$this->_save();
break;
}
}
/**
* Save all from manage screen
*/
protected function _save()
{
$home = intval( $this->request['home'] );
$names = $_POST['names'];
$position = array();
if ( is_array( $_GET['bookmark'] ) )
{
foreach( $_GET['bookmark'] as $id )
{
$position[ $id ] = count( $position ) + 1;
}
}
if ( is_array( $names ) )
{
foreach( $names as $id => $name )
{
$this->_classBookmark->update( $id, array( 'title' => $name, 'position' => intval( $position[ $id ] ) ) );
}
}
$this->_classBookmark->setAsHome( $home );
$this->returnJsonArray( array( 'status' => 'ok', 'json' => json_decode( $this->_classBookmark->asJson(), true ) ) );
}
/**
* Remove a book mark
*/
protected function _delete()
{
$id = intval( $this->request['id'] );
$this->_classBookmark->removeBookmark( $id );
$this->returnJsonArray( array( 'status' => 'ok', 'json' => json_decode( $this->_classBookmark->asJson(), true ) ) );
}
/**
* Manage panel
*/
protected function _managePane()
{
$bookmarks = $this->_classBookmark->getBookmarks();
/* Return it then */
$this->returnHtml( $this->registry->output->global_template->manageBookmarks( $bookmarks ) );
}
/**
* Add a book mark
*/
protected function _add()
{
$title = $this->request['title'];
$url = $this->request['url'];
$home = intval( $this->request['home'] );
try
{
$this->_classBookmark->addBookmark( $url, $title, $home );
$this->returnJsonArray( array( 'status' => 'ok', 'json' => json_decode( $this->_classBookmark->asJson(), true ) ) );
}
catch( Exception $err )
{
$this->returnJsonArray( array( 'status' => 'fail', 'msg' => $err->getMessage() ) );
}
}
}
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Template comparison
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
@@ -0,0 +1,31 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Handles Admin ajax functions for IP.Board Text Editor
* Author: Matt "Matt Mecham" Mecham
* Last Updated: $LastChangedDate: 2012-05-29 14:05:10 +0100 (Tue, 29 May 2012) $
* </pre>
*
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Gallery
* @link http://www.invisionpower.com
* @version $Rev: 10807 $
*
*/
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();
}
require_once( IPSLib::getAppDir('core') . '/modules_public/ajax/editor.php' );
class admin_core_ajax_editor extends public_core_ajax_editor
{
}
@@ -1,115 +1,115 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Login handler abstraction : AJAX Find Names functions
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10914 $
* @see public_core_ajax_findnames
*
*/
if ( ! defined( 'IN_ACP' ) )
{
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 admin_core_ajax_findnames extends ipsAjaxCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
switch( $this->request['do'] )
{
case 'get-member-names':
$this->_getMemberNames();
break;
}
}
/**
* Returns possible matches for the string input
*
* @return @e void Outputs to screen
*/
protected function _getMemberNames()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( IPSText::mbstrlen( $name ) < 3 )
{
$this->returnJsonError( 'requestTooShort' );
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => 'p.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->DB->getTotalRows() )
{
$this->returnJsonArray( array( ) );
}
$return = array();
while( $r = $this->DB->fetch() )
{
if( !$r['members_display_name'] )
{
continue;
}
$photo = IPSMember::buildProfilePhoto( $r );
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
'img' => $photo['pp_mini_photo'],
'img_w' => $photo['pp_mini_width'],
'img_h' => $photo['pp_mini_height']
);
}
$this->returnJsonArray( $return );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Login handler abstraction : AJAX Find Names functions
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 10721 $
* @see public_core_ajax_findnames
*
*/
if ( ! defined( 'IN_ACP' ) )
{
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 admin_core_ajax_findnames extends ipsAjaxCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
switch( $this->request['do'] )
{
case 'get-member-names':
$this->_getMemberNames();
break;
}
}
/**
* Returns possible matches for the string input
*
* @return @e void Outputs to screen
*/
protected function _getMemberNames()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = IPSText::convertUnicode( $this->convertAndMakeSafe( $this->request['name'], 0 ), true );
$name = IPSText::convertCharsets( $name, 'utf-8', IPS_DOC_CHAR_SET );
//-----------------------------------------
// Check length
//-----------------------------------------
if ( IPSText::mbstrlen( $name ) < 3 )
{
$this->returnJsonError( 'requestTooShort' );
}
//-----------------------------------------
// Try query...
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.members_display_name, m.name, m.member_id, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => "m.members_l_display_name LIKE '" . $this->DB->addSlashes( mb_strtolower( $name ) ) . "%'",
'order' => $this->DB->buildLength( 'm.members_display_name' ) . ' ASC',
'limit' => array( 0, 15 ),
'add_join' => array( array( 'select' => 'p.*',
'from' => array( 'profile_portal' => 'p' ),
'where' => 'p.pp_member_id=m.member_id',
'type' => 'left' ) ) ) );
$this->DB->execute();
//-----------------------------------------
// Got any results?
//-----------------------------------------
if ( ! $this->DB->getTotalRows() )
{
$this->returnJsonArray( array( ) );
}
$return = array();
while( $r = $this->DB->fetch() )
{
if( !$r['members_display_name'] )
{
continue;
}
$photo = IPSMember::buildProfilePhoto( $r );
$group = IPSMember::makeNameFormatted( '' , $r['member_group_id'] );
$return[ $r['member_id'] ] = array( 'name' => $r['members_display_name'],
'showas'=> '<strong>' . $r['members_display_name'] . '</strong> (' . $group . ')',
'img' => $photo['pp_mini_photo'],
'img_w' => $photo['pp_mini_width'],
'img_h' => $photo['pp_mini_height']
);
}
$this->returnJsonArray( $return );
}
}
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Hooks (AJAX)
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2013-02-15 17:36:04 -0500 (Fri, 15 Feb 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 1st march 2002
* @version $Revision: 10914 $
* @version $Revision: 11998 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -208,7 +208,7 @@ class admin_core_ajax_hooks extends ipsAjaxCommand
/* Return data ;o */
$minVersions = $this->registry->output->formDropdown( "minVersion[{$i}]", $versions );
$maxVersions = $this->registry->output->formDropdown( "minVersion[{$i}]", $versions );
$maxVersions = $this->registry->output->formDropdown( "maxVersion[{$i}]", $versions );
$this->returnHtml( "{$this->lang->words['a_min']}: {$minVersions}<br /><br />{$this->lang->words['a_max']}: {$maxVersions}" );
}
File diff suppressed because it is too large. Load diff
@@ -3,21 +3,21 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-24 16:20:59 -0400 (Thu, 24 May 2012) $
* </pre>
*
* Author: Matt Mecham
*
* @author $Author: bfarber $
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $
* @version $Revision: 10792 $
*/
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
* </pre>
@@ -7,7 +7,7 @@
* $Author: bfarber $
* @since 8th Feb 2011
* $LastChangedDate: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8021 $
*/
@@ -3,21 +3,21 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3Templates.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-11-30 10:02:12 -0500 (Fri, 30 Nov 2012) $
* </pre>
*
* Author: Matt Mecham
*
* @author $Author: bfarber $
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $
* @version $Revision: 11668 $
*/
@@ -137,6 +137,7 @@ class admin_core_ajax_templatediff extends ipsAjaxCommand
$return['data_content'] = $this->skinFunctions->fetchOriginalItem( $return );
break;
case 'custom':
$return['data_set_id'] = $session['merge_set_id'];
$return['data_content'] = $this->skinFunctions->fetchCustomItem( $return );
break;
case 'new':
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3Templates.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* Author: Matt Mecham
@@ -17,7 +17,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3Templates.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* Author: Matt Mecham
@@ -17,7 +17,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* Author: Matt Mecham
@@ -17,7 +17,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
@@ -6,9 +6,9 @@
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* @since 15 January 2007
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
* $LastChangedDate: 2013-05-07 22:02:49 -0400 (Tue, 07 May 2013) $
* @version v3.4.5
* $Revision: 12236 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -1085,6 +1085,7 @@ class admin_core_applications_applications extends ipsCommand
$this->moduleRecache();
$this->applicationsMenuDataRecache();
//-----------------------------------------
// List...
@@ -1163,8 +1164,8 @@ class admin_core_applications_applications extends ipsCommand
//-----------------------------------------
$form['sys_module_title'] = $this->registry->output->formInput( 'sys_module_title', $_POST['sys_module_title'] ? $_POST['sys_module_title'] : $module['sys_module_title'] );
$form['sys_module_description'] = $this->registry->output->formInput( 'sys_module_description', $_POST['sys_module_description'] ? $_POST['sys_module_description'] : $module['sys_module_description'] );
$form['sys_module_title'] = $this->registry->output->formInput( 'sys_module_title', $_POST['sys_module_title'] ? $_POST['sys_module_title'] : $module['sys_module_title'], '', 30, 'text', '', '', 32 );
$form['sys_module_description'] = $this->registry->output->formInput( 'sys_module_description', $_POST['sys_module_description'] ? $_POST['sys_module_description'] : $module['sys_module_description'], '', 30, 'text', '', '', 100 );
$form['sys_module_key'] = $this->registry->output->formInput( 'sys_module_key', $_POST['sys_module_key'] ? $_POST['sys_module_key'] : $module['sys_module_key'] );
$form['sys_module_version'] = $this->registry->output->formInput( 'sys_module_version', $_POST['sys_module_version'] ? $_POST['sys_module_version'] : $module['sys_module_version'] );
$form['sys_module_protected'] = $this->registry->output->formYesNo( 'sys_module_protected', $_POST['sys_module_protected'] ? $_POST['sys_module_protected'] : $module['sys_module_protected'] );
@@ -1534,7 +1535,9 @@ class admin_core_applications_applications extends ipsCommand
if ( $match[1] )
{
$this->DB->dropTable( preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] ) );
$_table = preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] );
$this->DB->dropTable( $_table );
}
else
{
@@ -1546,7 +1549,14 @@ class admin_core_applications_applications extends ipsCommand
if ( $match[1] and $match[2] )
{
$this->DB->dropField( preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] ), $match[2] );
$_table = preg_replace( '#^' . ipsRegistry::dbFunctions()->getPrefix() . "(\S+)#", "\\1", $match[1] );
$_field = $match[2];
/* check for field */
if ( $this->DB->checkForField( $_field, $_table ) )
{
$this->DB->dropField( $_table, $_field );
}
}
}
}
@@ -1621,6 +1631,7 @@ class admin_core_applications_applications extends ipsCommand
}
$this->DB->delete( 'rc_reports_index', 'rc_class=' . $plugin['com_id'] );
$this->DB->delete( 'rc_classes', 'com_id=' . $plugin['com_id'] );
}
//-----------------------------------------
@@ -1786,11 +1797,11 @@ class admin_core_applications_applications extends ipsCommand
/* Loop through skin directories */
try
{
foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/skin_cache/' ) as $dir )
foreach( new DirectoryIterator( IPS_CACHE_PATH . 'cache/skin_cache/' ) as $dir )
{
if ( preg_match( "/^(cacheid_)/", $dir->getFileName() ) )
{
foreach( new DirectoryIterator( DOC_IPS_ROOT_PATH . 'cache/skin_cache/' . $dir->getFileName() . '/' ) as $file )
foreach( new DirectoryIterator( IPS_CACHE_PATH . 'cache/skin_cache/' . $dir->getFileName() . '/' ) as $file )
{
if ( ! $file->isDot() )
{
@@ -1823,10 +1834,14 @@ class admin_core_applications_applications extends ipsCommand
if ( $match == 'contains' )
{
$this->DB->delete( 'skin_templates', "template_group LIKE '%{$name}%'" );
$this->DB->delete( 'skin_templates_previous', "p_template_group LIKE '%{$name}%'" );
$this->DB->delete( 'skin_cache', "cache_type='phptemplate' AND cache_value_1 LIKE '%{$name}%'" );
}
else
{
$this->DB->delete( 'skin_templates', "template_group='{$name}'" );
$this->DB->delete( 'skin_templates_previous', "p_template_group='{$name}'" );
$this->DB->delete( 'skin_cache', "cache_type='phptemplate' AND cache_value_1='{$name}'" );
}
}
}
@@ -2314,8 +2329,6 @@ XML;
$_groups[] = array( $gid, $gdata['g_title'] );
}
sort( $_groups );
$form['app_tab_groups'] = $this->registry->output->formMultiDropdown( 'app_tab_groups[]', $_groups, isset( $_POST['app_tab_groups'] ) ? $_POST['app_tab_groups'] : explode( ',', $application['app_tab_groups'] ), 7 );
/* Setup the global caches MDD */
@@ -2434,7 +2447,7 @@ XML;
{
/* Got updates? */
if ( $row['app_update_check'] && $checkUpdates === true )
{
{
$row['app_update_available'] = $hooksClass->_updateAvailable( $row['app_update_check'], $row['app_long_version'] );
if ( $row['app_update_available'][0] )
@@ -2554,8 +2567,8 @@ XML;
$okToGo = 1;
}
}
if ( $info['name'] )
if ( $info['name'] && $info['key'] != "ipseo" )
{
$uninstalled[$_file] = array( 'title' => $info['name'], 'author' => $info['author'], 'path' => $filepath, 'okToGo' => $okToGo, 'directory' => $_file );
}
@@ -2981,7 +2994,7 @@ XML;
{
$app_dir = $row['app_directory'];
$main_items = $modules_cache[$app_dir];
//-----------------------------------------
// Continue...
//-----------------------------------------
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Blog Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th Aug 2004
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*
*/
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Blog Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Download Manager Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 17 February 2003
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*
*/
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Download Manager Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Who knows...
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*
*/
@@ -0,0 +1,178 @@
<?php
/**
* @file applications.php Community Enhancements
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 24 July 2012
* $LastChangedDate: 2012-06-20 10:50:23 +0100 (Wed, 20 Jun 2012) $
* @version v3.4.5
* $Revision: 10952 $
*/
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 admin_core_applications_enhancements
* @brief Community Enhancements
*/
class admin_core_applications_enhancements extends ipsCommand
{
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$this->html = $this->registry->output->loadTemplate( 'cp_skin_applications' );
$this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ) );
switch( $this->request['do'] )
{
case 'edit':
$this->edit();
break;
case 'save':
$this->save();
break;
default:
$this->manage();
break;
}
$this->registry->getClass( 'output' )->html_main .= $this->registry->getClass( 'output' )->global_template->global_frame_wrapper();
$this->registry->getClass( 'output' )->sendOutput();
}
/**
* Manage
*/
public function manage()
{
$enhancements = array();
foreach ( IPSLib::getEnabledApplications() as $app )
{
if ( is_dir( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/enhancements' ) )
{
$dir = new DirectoryIterator( IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/enhancements' );
foreach ( $dir as $file )
{
if ( $file->isFile() and !$file->isDot() and substr( $file, 0, 1 ) !== '.' and substr( $file, -4 ) === '.php' )
{
$className = "enhancements_{$app['app_directory']}_" . str_replace( '.php', '', $file->getFilename() );
/* Backup system isn't ready */
if ( $className == 'enhancements_core_ipsbackup' )
{
continue;
}
$classToLoad = IPSLib::loadLibrary( $file->getPathName(), $className );
$enhancements[ $className ] = new $classToLoad( $this->registry );
}
}
}
}
uasort( $enhancements, create_function( '$a, $b', 'return $a->title > $b->title;' ) );
$this->registry->output->html .= $this->html->communityEnhancements( $enhancements );
}
/**
* Edit
*/
public function edit()
{
$exploded = explode( '_', $this->request['service'] );
if ( !IPSLib::appIsInstalled( $exploded[1] ) or !is_file( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php' ) )
{
$this->registry->output->showError( $this->lang->words['err_no_enhancement'], 111800 );
}
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php', $this->request['service'] );
$class = new $classToLoad( $this->registry );
if ( method_exists( $class, 'check' ) )
{
$class->check();
}
if ( isset( $class->settings ) and !empty( $class->settings ) )
{
$settingsClass = IPSLib::loadActionOverloader( IPSLib::getAppDir('core') . '/modules_admin/settings/settings.php', 'admin_core_settings_settings' );
$settingsClass = new $settingsClass();
$settingsClass->makeRegistryShortcuts( $this->registry );
$settingsClass->html = $this->registry->output->loadTemplate('cp_skin_settings');
$html = '';
$imploded = implode( ', ', array_map( create_function( '$v', 'return "\'{$v}\'";' ), $class->settings ) );
$settings = array();
$this->DB->build( array( 'select' => '*', 'from' => 'core_sys_conf_settings', 'where' => "conf_key IN( {$imploded} )", 'order' => 'conf_position' ) );
$e = $this->DB->execute();
while ( $row = $this->DB->fetch( $e ) )
{
$html .= $settingsClass->_processSettingEntry( $row );
}
$this->registry->output->html .= $this->html->communityEnhancementsSettings( $class, $html );
}
else
{
$this->registry->output->html .= $class->editSettings();
}
}
/**
* Save
*/
public function save()
{
$exploded = explode( '_', $this->request['service'] );
if ( !IPSLib::appIsInstalled( $exploded[1] ) or !is_file( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php' ) )
{
$this->registry->output->showError( $this->lang->words['err_no_enhancement'], 111801 );
}
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $exploded[1] ) . '/extensions/enhancements/' . $exploded[2] . '.php', $this->request['service'] );
$class = new $classToLoad( $this->registry );
if ( method_exists( $class, 'check' ) )
{
$class->check();
}
if ( isset( $class->settings ) and !empty( $class->settings ) )
{
$toSave = array();
foreach ( $class->settings as $key )
{
$toSave[ $key ] = $_POST[ $key ];
}
IPSLib::updateSettings( $toSave, TRUE );
}
else
{
$output = $class->saveSettings();
if ( $output and is_string( $output ) )
{
$this->registry->output->html .= $output;
return;
}
}
$this->registry->output->redirect( "{$this->settings['base_url']}app=core&amp;module=applications&amp;section=enhancements", $this->lang->words['enhancements_saved'] );
}
}
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Gallery Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since Who knows...
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*
*/
File diff suppressed because it is too large. Load diff
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Nexus Application
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
File diff suppressed because it is too large. Load diff
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>Manage Applications &amp; Modules</title>
<title>Управление Приложениями</title>
<subitems>
<subitem>
<subitemtitle>Manage Applications &amp; Modules</subitemtitle>
<subitemtitle>Управление Приложениями</subitemtitle>
<subitemlang>manage_apps_modules</subitemlang>
<subsection>applications</subsection>
<subitemurl>do=applications_overview</subitemurl>
@@ -15,10 +15,10 @@
</subitems>
</item>
<item>
<title>Manage Hooks</title>
<title>Управление Хуками</title>
<subitems>
<subitem>
<subitemtitle>Manage Hooks</subitemtitle>
<subitemtitle>Управление Хуками</subitemtitle>
<subitemlang>manage_hooks</subitemlang>
<subsection>hooks</subsection>
<subitemurl>do=hooks_overview</subitemurl>
@@ -27,5 +27,18 @@
</subitem>
</subitems>
</item>
<item>
<title>Расширения</title>
<subitems>
<subitem>
<subitemtitle>Расширения</subitemtitle>
<subitemlang>community_enhancements</subitemlang>
<subsection>enhancements</subsection>
<subitemurl></subitemurl>
<subitemrolekey>enhancements_manage</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</tabitems>
</menu>
@@ -1,62 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Manage Applications</grouptitle>
<grouptitle>Управление приложениями</grouptitle>
<grouplang>core_manage_apps</grouplang>
<items>
<item>
<key>app_manage</key>
<string>Can manage applications?</string>
<string>Может изменять/добавлять приложения?</string>
</item>
<item>
<key>app_delete</key>
<string>Can delete applications?</string>
<string>Может удалять приложения?</string>
</item>
<item>
<key>app_install</key>
<string>Can install new applications?</string>
<string>Может устанавливать новые приложения?</string>
</item>
<item>
<key>build_sphinx</key>
<string>Can build sphinx.conf? WARNING: Exposes database login details</string>
<string>Может создавать sphinx.conf? ВНИМАНИЕ: будут доступны данные для соединения с базой данных</string>
</item>
</items>
</group>
<group>
<grouptitle>Manage Modules</grouptitle>
<grouptitle>Управление модулями</grouptitle>
<grouplang>core_manage_modules</grouplang>
<items>
<item>
<key>module_manage</key>
<string>Can edit/add application modules?</string>
<string>Может изменять/добавлять модули?</string>
</item>
<item>
<key>module_delete</key>
<string>Can delete application modules?</string>
<string>Может удалять модули приложений?</string>
</item>
</items>
</group>
<group>
<grouptitle>Purchase Applications</grouptitle>
<grouptitle>Покупка приложений</grouptitle>
<grouplang>core_purchase_app</grouplang>
<items>
<item>
<key>purchase_app</key>
<string>Can view pages to purchase additional applications?</string>
<string>Может просматривать страницу с платными приложениями?</string>
</item>
</items>
</group>
<group>
<grouptitle>Manage Hooks</grouptitle>
<grouptitle>Управление хуками</grouptitle>
<grouplang>core_manage_hooks</grouplang>
<items>
<item>
<key>hooks_manage</key>
<string>Can manage hooks?</string>
<string>Может добавлять/изменять хуки?</string>
</item>
<item>
<key>hooks_delete</key>
<string>Can remove hooks?</string>
<string>Может удалять хуки?</string>
</item>
</items>
</group>
<group>
<grouptitle>Расширения для Сообщества</grouptitle>
<grouplang>core_community_enhancements</grouplang>
<items>
<item>
<key>enhancements_manage</key>
<string>Может управлять расширениями?</string>
</item>
</items>
</group>
@@ -0,0 +1,41 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Attachment Poster
* Last Updated: $Date: 2012-05-21 21:37:50 +0100 (Mon, 21 May 2012) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10777 $
*/
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 admin_core_attach_attach extends ipsCommand
{
/**
* Class entry point
*
* @param object Registry reference
* @return @e void [Outputs to screen/redirects]
*/
public function doExecute( ipsRegistry $registry )
{
/* Attachment Controller Class */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/controller.php', 'classes_attach_controller' );
$controller = new $classToLoad( $registry );
$controller->run( $this->request['do'] );
}
}
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
File diff suppressed because it is too large. Load diff
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>Overview</title>
<title>Обзор Системы</title>
<subitems>
<subitem>
<subitemtitle>Overview</subitemtitle>
<subitemtitle>Обзор Системы</subitemtitle>
<subitemlang>diag_overview</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl></subitemurl>
@@ -15,10 +15,10 @@
</subitems>
</item>
<item>
<title>Whitespace Checker</title>
<title>Проверка Пробелов</title>
<subitems>
<subitem>
<subitemtitle>Whitespace Checker</subitemtitle>
<subitemtitle>Проверка Пробелов</subitemtitle>
<subitemlang>whitespace_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=whitespace</subitemurl>
@@ -28,10 +28,10 @@
</subitems>
</item>
<item>
<title>Permissions Checker</title>
<title>Проверка Ограничений ФС</title>
<subitems>
<subitem>
<subitemtitle>Permissions Checker</subitemtitle>
<subitemtitle>Проверка Ограничений ФС</subitemtitle>
<subitemlang>permissions_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=filepermissions</subitemurl>
@@ -41,10 +41,10 @@
</subitems>
</item>
<item>
<title>Connection Checker</title>
<title>Проверка Соединений</title>
<subitems>
<subitem>
<subitemtitle>Connection Checker</subitemtitle>
<subitemtitle>Проверка Соединений</subitemtitle>
<subitemlang>connection_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=connections</subitemurl>
@@ -54,10 +54,10 @@
</subitems>
</item>
<item>
<title>Database Checker</title>
<title>Прверка БД</title>
<subitems>
<subitem>
<subitemtitle>Database Checker</subitemtitle>
<subitemtitle>Проверка БД</subitemtitle>
<subitemlang>db_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=dbchecker</subitemurl>
@@ -67,10 +67,10 @@
</subitems>
</item>
<item>
<title>Database Index Checker</title>
<title>Проверка Индексов БД</title>
<subitems>
<subitem>
<subitemtitle>Database Index Checker</subitemtitle>
<subitemtitle>Проверка Индексов БД</subitemtitle>
<subitemlang>dbi_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=dbindex</subitemurl>
@@ -80,10 +80,10 @@
</subitems>
</item>
<item>
<title>Email Tester</title>
<title>Тест Email</title>
<subitems>
<subitem>
<subitemtitle>Email Tester</subitemtitle>
<subitemtitle>Тест Email</subitemtitle>
<subitemlang>email_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=email</subitemurl>
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Diagnostic Tools</grouptitle>
<grouptitle>Инструменты диагностики</grouptitle>
<grouplang>core_diag_tools</grouplang>
<items>
<item>
<key>index_checker</key>
<string>Can use the database index checker? Warning: Allows ability to run database queries indirectly.</string>
<string>Может проверять индексы таблиц базы? Внимание: позволяет выполнять запросы к базе.</string>
</item>
<item>
<key>database_checker</key>
<string>Can use the database checker? Warning: Allows ability to run database queries indirectly.</string>
<string>Может использовать проверку базы данных? Внимание: позволяет выполнять запросы к базе.</string>
</item>
<item>
<key>whitespace_checker</key>
<string>Can use the whitespace checker?</string>
<string>Может проверять файлы на лишние пробелы?</string>
</item>
<item>
<key>connection_checker</key>
<string>Can use the connection checker?</string>
<string>Может использовать проверку сетевых соединений?</string>
</item>
<item>
<key>permission_checker</key>
<string>Can use the permissions checker?</string>
<string>Может проверять файлы и директории на правильность расстановки прав доступа?</string>
</item>
<item>
<key>email_checker</key>
<string>Can use the email tester?</string>
<string>Может проверять работу почты?</string>
</item>
</items>
</group>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Quick help - shows popups with help information
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 1st march 2002
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*
*/
@@ -1,77 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<tabitems>
<item>
<title>Documentation</title>
<subitems>
<subitem>
<subitemtitle>Documentation</subitemtitle>
<subitemlang>help_documentation</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=docs</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Technical Support</title>
<subitems>
<subitem>
<subitemtitle>Technical Support</subitemtitle>
<subitemlang>help_support</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=support</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Additional Resources</title>
<subitems>
<subitem>
<subitemtitle>Additional Resources</subitemtitle>
<subitemlang>help_resources</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=resources</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>IPS Contact Information</title>
<subitems>
<subitem>
<subitemtitle>IPS Contact Information</subitemtitle>
<subitemlang>help_contact</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=contact</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Feature Requests</title>
<subitems>
<subitem>
<subitemtitle>Feature Requests</subitemtitle>
<subitemlang>help_features</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=features</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Report a Bug</title>
<subitems>
<subitem>
<subitemtitle>Report a Bug</subitemtitle>
<subitemlang>help_bugs</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=bugs</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
</tabitems>
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<tabitems>
<item>
<title>Документация</title>
<subitems>
<subitem>
<subitemtitle>Документация</subitemtitle>
<subitemlang>help_documentation</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=docs</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Техническая поддержка</title>
<subitems>
<subitem>
<subitemtitle>Техническая поддержка</subitemtitle>
<subitemlang>help_support</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=support</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Дополнительные Ресурсы</title>
<subitems>
<subitem>
<subitemtitle>Дополнительные Ресурсы</subitemtitle>
<subitemlang>help_resources</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=resources</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Контактная Информация</title>
<subitems>
<subitem>
<subitemtitle>Контактная Информация</subitemtitle>
<subitemlang>help_contact</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=contact</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Запрос Функций</title>
<subitems>
<subitem>
<subitemtitle>Запрос Функций</subitemtitle>
<subitemlang>help_features</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=features</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Сообщить об Ошибке</title>
<subitems>
<subitem>
<subitemtitle>Сообщить об Ошибке</subitemtitle>
<subitemlang>help_bugs</subitemlang>
<subsection>quickhelp</subsection>
<subitemurl>do=redirect&amp;id=bugs</subitemurl>
<subisredirect>1</subisredirect>
</subitem>
</subitems>
</item>
</tabitems>
</menu>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
File diff suppressed because it is too large. Load diff
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>Manage Languages</title>
<title>Языки Системы</title>
<subitems>
<subitem>
<subitemtitle>Manage Languages</subitemtitle>
<subitemtitle>Языки Системы</subitemtitle>
<subitemlang>languages</subitemlang>
<subsection>manage_languages</subsection>
<subitemurl></subitemurl>
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Manage Languages</grouptitle>
<grouptitle>Управление языками</grouptitle>
<grouplang>core_languages</grouplang>
<items>
<item>
<key>lang_words</key>
<string>Can add/edit the language bit texts?</string>
<string>Может добавлять/изменять слова?</string>
</item>
<item>
<key>lang_packs</key>
<string>Can add/edit language packs?</string>
<string>Может добавлять/изменять языковые наборы?</string>
</item>
<item>
<key>lang_pack_info</key>
<string>Can alter the language pack properties and information?</string>
<string>Может изменять настройки и информацию языковых наборов?</string>
</item>
</items>
</group>
@@ -1,413 +1,452 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* ACP Login/Logout Routines
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 17th August 2004
* @version $Revision: 10914 $
*/
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 admin_core_login_manualResolver extends ipsCommand
{
/**
* HTML Skin object
*
* @var object
*/
protected $html;
/**#@+
* Registry objects
*
* @var object
*/
public $registry;
public $DB;
public $settings;
public $request;
public $lang;
public $member;
public $memberData;
/**#@-*/
/**
* Login handler object
*
* @var object
*/
protected $han_login;
/**
* Initiate login handler
*
* @return @e void
*/
public function initHanLogin()
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->is_admin_auth = 1;
$this->han_login->init();
}
/**
* Class entry point
*
* @param object Registry reference
* @param string Validation message
* @return @e void [Outputs to screen/redirects]
*/
public function doExecute( ipsRegistry $registry, $validationMessage='' )
{
/* Make object */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->lang = $this->registry->getClass('class_localization');
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_login' ), 'core' );
$this->initHanLogin();
//-----------------------------------------
// What to do?
//-----------------------------------------
switch( $this->request['do'] )
{
case 'login':
default:
$this->loginForm();
break;
case 'login-complete':
$this->loginComplete();
break;
case 'login-out':
$this->loginOut();
break;
}
}
/**
* Check and verify the login was successful
*
* @return @e void
*/
public function loginComplete()
{
/* Fetch sessions API */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/session/api.php', 'session_api' );
$publicApi = new $classToLoad( $this->registry );
//-----------------------------------------
// Check form details.
//-----------------------------------------
$this->request['email'] = str_replace( '|', '&#124;', $this->request['email'] );
$username = '';
$email = '';
//-----------------------------------------
// Is this a username or email address?
//-----------------------------------------
$_type = $this->han_login->emailOrUsername();
switch( $_type )
{
case 1:
$username = $this->request['username'];
break;
case 2:
$email = $this->request['username'];
break;
case 3:
$username = $this->request['username'];
$email = $this->request['username'];
break;
}
//-----------------------------------------
// Check auth
//-----------------------------------------
$this->han_login->loginAuthenticate( $username, $email, trim($this->request['password']) );
//-----------------------------------------
// Check return code...
//-----------------------------------------
$mem = $this->han_login->member_data;
if ( ( ! $mem['member_id'] ) or ( $this->han_login->return_code == 'NO_USER' ) )
{
$this->_writeToLog( $this->request['username'], 'fail' );
$this->loginForm( $this->lang->words['bad_email_password'] );
}
if ( $this->han_login->return_code == 'NO_ACCESS' )
{
$this->_writeToLog( $this->request['username'], 'fail' );
$this->loginForm( $this->lang->words['no_acp_access'] );
}
else if ( $this->han_login->return_code != 'SUCCESS' )
{
$this->_writeToLog( $this->request['username'], 'fail' );
$this->loginForm( $this->lang->words['bad_email_password'] );
}
//-----------------------------------------
// And sort secondary groups...
//-----------------------------------------
$mem = $this->member->setUpSecondaryGroups( $mem );
//-----------------------------------------
// Check access...
//-----------------------------------------
if ( $mem['g_access_cp'] != 1 )
{
$this->_writeToLog( $this->request['username'], 'fail' );
$this->loginForm( $this->lang->words['no_acp_access'] );
}
else
{
//-----------------------------------------
// Fix up query string...
//-----------------------------------------
$extra_query = "";
if ( $_POST['qstring'] )
{
$extra_query = stripslashes( $_POST['qstring'] );
$extra_query = str_replace( $this->settings['_original_base_url'] , "" , $extra_query );
$extra_query = str_ireplace( "?index." . $this->settings['php_ext'] , "" , $extra_query );
$extra_query = ltrim( $extra_query, '?' );
$extra_query = preg_replace( '!adsess=(\w){32}!' , "" , $extra_query );
$extra_query = str_replace( "adsess=x" , "" , $extra_query );
$extra_query = str_replace( array( 'old_&', 'old_&amp;' ) , "" , $extra_query );
$extra_query = preg_replace( '!s=(\w){32}!' , "" , $extra_query );
$extra_query = str_replace( "module=login" , "" , $extra_query );
$extra_query = str_replace( "do=login-complete" , "" , $extra_query );
$extra_query = str_replace( "/admin" , "" , $extra_query );
$extra_query = str_replace( '&amp;' , '&', $extra_query );
$extra_query = preg_replace( "#&{1,}#" , "&", $extra_query );
$extra_query = preg_replace( "#messageinabottleacp=(.*?)$#" , "" , $extra_query );
}
//-----------------------------------------
// Insert session
//-----------------------------------------
$sess_id = md5( uniqid( microtime() ) );
$this->DB->delete( 'core_sys_cp_sessions', 'session_member_id=' . $mem['member_id'] );
/* Grab user agent */
$uAgent = array();
$this->DB->insert( 'core_sys_cp_sessions', array( 'session_id' => $sess_id,
'session_ip_address' => $this->member->ip_address,
'session_member_name' => $mem['members_display_name'],
'session_member_id' => $mem['member_id'],
'session_member_login_key' => $mem['member_login_key'],
'session_location' => 'index',
'session_log_in_time' => time(),
'session_running_time' => time(),
'session_app_data' => serialize( $uAgent ),
'session_url' => '' ) );
$this->request['adsess'] = $sess_id;
/* Log them in public side if not already */
$publicApi->logGuestInAsMember( $mem['member_id'] );
//-----------------------------------------
// Redirect...
//-----------------------------------------
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id . '&' . $extra_query;
$this->_writeToLog( $this->request['username'], 'ok' );
ipsRegistry::getClass('output')->global_message = '';
ipsRegistry::getClass('output')->silentRedirect( $url );
}
}
/**
* Log the user out
*
* @return @e void
*/
public function loginOut()
{
//-----------------------------------------
// Do it..
//-----------------------------------------
$this->DB->delete( 'core_sys_cp_sessions', "session_id='" . $this->request['adsess'] . "'" );
//-----------------------------------------
// Redirect...
//-----------------------------------------
ipsRegistry::getClass('output')->silentRedirect( $this->settings['_admin_link'] );
}
/**
* Log the user out
*
* @param string Message to show on the form
* @return @e void
*/
public function loginForm( $message='' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$message = $message ? $message : $this->member->sessionClass()->getMessage();
//-------------------------------------------------------
// Remove all out of date sessions, like a good boy. Woof.
//-------------------------------------------------------
$cut_off_stamp = time() - 60*60*2;
$this->DB->delete( 'core_sys_cp_sessions', "session_running_time < {$cut_off_stamp}" );
//------------------------------------------------------
// Start form
//------------------------------------------------------
$qs = str_replace( '&amp;' , '&' , IPSText::parseCleanValue( urldecode( my_getenv( 'QUERY_STRING' ) ) ) );
$qs = str_replace( 'adsess=' , 'old_adsess=' , $qs );
$qs = str_replace( 'module=menu', '' , $qs );
$additional_data = $this->han_login->additionalFormHTML();
$replace = false;
$data = array();
if( !is_null($additional_data) AND is_array($additional_data) AND count($additional_data) )
{
$replace = $additional_data[0];
$data = $additional_data[1];
}
$uses_name = false;
$uses_email = false;
foreach( ipsRegistry::cache()->getCache('login_methods') as $method )
{
$login_methods[ $method['login_folder_name'] ] = $method['login_folder_name'];
if( $method['login_user_id'] == 'username' or $method['login_user_id'] == 'either' )
{
$uses_name = true;
}
if( $method['login_user_id'] == 'email' or $method['login_user_id'] == 'either' )
{
$uses_email = true;
}
}
if( $uses_name AND $uses_email )
{
$this->lang->words['gl_signinname'] = $this->lang->words['enter_name_and_email'];
}
else if( $uses_email )
{
$this->lang->words['gl_signinname'] = $this->lang->words['enter_useremail'];
}
else
{
$this->lang->words['gl_signinname'] = $this->lang->words['enter_username'];
}
ipsRegistry::getClass('output')->html_title = $this->lang->words['ipb_login'];
ipsRegistry::getClass('output')->html_main = ipsRegistry::getClass('output')->global_template->log_in_form( $qs, $message, $replace == 'replace' ? true : false, $data );
ipsRegistry::getClass('output')->html_main = str_replace( '<%TITLE%>' , ipsRegistry::getClass('output')->html_title, ipsRegistry::getClass('output')->html_main );
@header("Content-type: text/html");
print ipsRegistry::getClass('output')->html_main;
exit();
}
/**
* Write to the admin log in loggy ma log
*
* @param string Username
* @param string ok/fail flag
* @return @e void
* @note This is private so that a hacker couldn't get into ACP, upload a new hook that lets them clear the log, and then clear the login log
*/
private function _writeToLog( $username='', $flag='fail' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$username = $username ? $username : $this->request['username'];
$flag = ( $flag == 'ok' ) ? 1 : 0;
$admin_post_details = array();
//-----------------------------------------
// Generate POST / GET details
//-----------------------------------------
foreach( $_GET as $k => $v )
{
$admin_post_details['get'][ $k ] = $v;
}
foreach( $_POST as $k => $v )
{
if ( $k == 'password' AND IPSText::mbstrlen( $v ) > 1 )
{
$v = $v ? ( (IPSText::mbstrlen( $v ) - 1) > 0 ? str_repeat( '*', IPSText::mbstrlen( $v ) - 1 ) : '' ) . substr( $v, -1, 1 ) : '';
}
$admin_post_details['post'][ $k ] = $v;
}
//-----------------------------------------
// Write to disk...
//-----------------------------------------
$this->DB->insert( 'admin_login_logs', array( 'admin_ip_address' => $this->member->ip_address,
'admin_username' => $username,
'admin_time' => time(),
'admin_success' => $flag,
'admin_post_details' => serialize( $admin_post_details ) ) );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* ACP Login/Logout Routines
* Last Updated: $Date: 2013-03-20 10:14:51 -0400 (Wed, 20 Mar 2013) $
* </pre>
*
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since Tuesday 17th August 2004
* @version $Revision: 12094 $
*/
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 admin_core_login_manualResolver extends ipsCommand
{
/**
* HTML Skin object
*
* @var object
*/
protected $html;
/**#@+
* Registry objects
*
* @var object
*/
public $registry;
public $DB;
public $settings;
public $request;
public $lang;
public $member;
public $memberData;
/**#@-*/
/**
* Login handler object
*
* @var object
*/
protected $han_login;
/**
* Initiate login handler
*
* @return @e void
*/
public function initHanLogin()
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$this->han_login = new $classToLoad( $this->registry );
$this->han_login->is_admin_auth = 1;
$this->han_login->init();
}
/**
* Class entry point
*
* @param object Registry reference
* @param string Validation message
* @return @e void [Outputs to screen/redirects]
*/
public function doExecute( ipsRegistry $registry, $validationMessage='' )
{
/* Make object */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->lang = $this->registry->getClass('class_localization');
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_login' ), 'core' );
$this->initHanLogin();
//-----------------------------------------
// What to do?
//-----------------------------------------
switch( $this->request['do'] )
{
case 'login':
default:
$this->loginForm();
break;
case 'login-complete':
$this->loginComplete();
break;
case 'login-out':
$this->loginOut();
break;
}
}
/**
* Check and verify the login was successful
*
* @return @e void
*/
public function loginComplete()
{
/* Fetch sessions API */
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/session/api.php', 'session_api' );
$publicApi = new $classToLoad( $this->registry );
//-----------------------------------------
// Check form details.
//-----------------------------------------
$username = '';
$email = '';
//-----------------------------------------
// Is this a username or email address?
//-----------------------------------------
$_type = $this->han_login->emailOrUsername();
switch( $_type )
{
case 1:
$username = $this->request['username'];
break;
case 2:
$email = $this->request['username'];
break;
case 3:
$username = $this->request['username'];
$email = $this->request['username'];
break;
}
//-----------------------------------------
// Check auth
//-----------------------------------------
$this->han_login->loginAuthenticate( $username, $email, trim($this->request['password']) );
//-----------------------------------------
// Check return code...
//-----------------------------------------
$mem = $this->han_login->member_data;
if ( ( ! $mem['member_id'] ) or ( $this->han_login->return_code == 'NO_USER' ) )
{
$this->_writeToLog( $this->request['username'], 'fail' );
$this->loginForm( $this->lang->words['bad_email_password'] );
}
if ( $this->han_login->return_code == 'NO_ACCESS' )
{
$this->_writeToLog( $this->request['username'], 'fail' );
$this->loginForm( $this->lang->words['no_acp_access'] );
}
else if ( $this->han_login->return_code != 'SUCCESS' )
{
$this->_writeToLog( $this->request['username'], 'fail' );
$this->loginForm( $this->lang->words['bad_email_password'] );
}
//-----------------------------------------
// And sort secondary groups...
//-----------------------------------------
$mem = $this->member->setUpSecondaryGroups( $mem );
//-----------------------------------------
// Check access...
//-----------------------------------------
if ( $mem['g_access_cp'] != 1 )
{
$this->_writeToLog( $this->request['username'], 'fail' );
$this->loginForm( $this->lang->words['no_acp_access'] );
}
else
{
//-----------------------------------------
// Fix up query string...
//-----------------------------------------
$extra_query = "";
if ( $_POST['qstring'] )
{
$extra_query = stripslashes( htmlspecialchars( $_POST['qstring'] ) );
$extra_query = str_replace( $this->settings['_original_base_url'] , "" , $extra_query );
$extra_query = str_ireplace( "?index." . $this->settings['php_ext'] , "" , $extra_query );
$extra_query = ltrim( $extra_query, '?' );
$extra_query = preg_replace( '!adsess=(\w){32}!' , "" , $extra_query );
$extra_query = str_replace( "adsess=x" , "" , $extra_query );
$extra_query = str_replace( array( 'old_&', 'old_&amp;' ) , "" , $extra_query );
$extra_query = preg_replace( '!s=(\w){32}!' , "" , $extra_query );
$extra_query = str_replace( "module=login" , "" , $extra_query );
$extra_query = str_replace( "do=login-complete" , "" , $extra_query );
$extra_query = str_replace( "/admin" , "" , $extra_query );
$extra_query = str_replace( '&amp;' , '&', $extra_query );
$extra_query = preg_replace( "#&{1,}#" , "&", $extra_query );
$extra_query = preg_replace( "#messageinabottleacp=(.*?)$#" , "" , $extra_query );
}
//-----------------------------------------
// Insert session
//-----------------------------------------
$sess_id = md5( uniqid( microtime() ) );
$this->DB->delete( 'core_sys_cp_sessions', 'session_member_id=' . $mem['member_id'] );
/* Grab user agent */
$uAgent = array();
$this->DB->insert( 'core_sys_cp_sessions', array( 'session_id' => $sess_id,
'session_ip_address' => $this->member->ip_address,
'session_member_name' => $mem['members_display_name'],
'session_member_id' => $mem['member_id'],
'session_member_login_key' => $mem['member_login_key'],
'session_location' => 'index',
'session_log_in_time' => time(),
'session_running_time' => time(),
'session_app_data' => serialize( $uAgent ),
'session_url' => '' ) );
$this->request['adsess'] = $sess_id;
/* Log them in public side if not already */
$publicApi->logGuestInAsMember( $mem['member_id'] );
//-----------------------------------------
// Redirect...
//-----------------------------------------
if ( $extra_query )
{
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id . '&' . $extra_query;
}
else
{
/* Load main page? */
require_once( IPS_ROOT_PATH . 'sources/classes/admin/bookmarks.php' );
$bookmarks = new classes_admin_bookmarks();
$bookmarks->setMember( $mem['member_id'] );
$home = $bookmarks->getHomeUrl();
if ( $home !== false )
{
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id . '&' . $home;
}
else
{
$url = $this->settings['_original_base_url'] . '/' . CP_DIRECTORY . '/index.php?adsess=' . $sess_id;
}
}
$this->_writeToLog( $this->request['username'], 'ok' );
ipsRegistry::getClass('output')->global_message = '';
ipsRegistry::getClass('output')->silentRedirect( $url );
}
}
/**
* Log the user out
*
* @return @e void
*/
public function loginOut()
{
//-----------------------------------------
// Do it..
//-----------------------------------------
$this->DB->delete( 'core_sys_cp_sessions', "session_id='" . $this->request['adsess'] . "'" );
//-----------------------------------------
// Redirect...
//-----------------------------------------
ipsRegistry::getClass('output')->silentRedirect( $this->settings['_admin_link'] );
}
/**
* Log the user out
*
* @param string Message to show on the form
* @return @e void
*/
public function loginForm( $message='' )
{
//-----------------------------------------
// Hang on, do we need the upgrader?
//-----------------------------------------
if ( !IN_DEV AND ( !defined('SKIP_UPGRADE_CHECK') OR !SKIP_UPGRADE_CHECK ) )
{
require_once( IPS_ROOT_PATH . 'setup/sources/base/setup.php' );/*noLibHook*/
foreach( ipsRegistry::$applications as $app_dir => $app )
{
$_a = ( $app_dir == 'forums' or $app_dir == 'members' ) ? 'core' : $app_dir;
$numbers = IPSSetUp::fetchAppVersionNumbers( $_a );
if ( $numbers['latest'][0] and $numbers['latest'][0] > $numbers['current'][0] )
{
$this->registry->output->silentRedirect( $this->settings['base_acp_url'] . '/upgrade/index.php?_acpRedirect=1' );
return;
}
}
}
//-----------------------------------------
// INIT
//-----------------------------------------
$message = $message ? $message : $this->member->sessionClass()->getMessage();
//-------------------------------------------------------
// Remove all out of date sessions, like a good boy. Woof.
//-------------------------------------------------------
$cut_off_stamp = time() - 60*60*2;
$this->DB->delete( 'core_sys_cp_sessions', "session_running_time < {$cut_off_stamp}" );
//------------------------------------------------------
// Start form
//------------------------------------------------------
$qs = str_replace( '&amp;' , '&' , IPSText::parseCleanValue( urldecode( my_getenv( 'QUERY_STRING' ) ) ) );
$qs = str_replace( 'adsess=' , 'old_adsess=' , $qs );
$qs = str_replace( 'module=menu', '' , $qs );
$additional_data = $this->han_login->additionalFormHTML();
$replace = false;
$data = array();
if( !is_null($additional_data) AND is_array($additional_data) AND count($additional_data) )
{
$replace = $additional_data[0];
$data = $additional_data[1];
}
$uses_name = false;
$uses_email = false;
foreach( ipsRegistry::cache()->getCache('login_methods') as $method )
{
$login_methods[ $method['login_folder_name'] ] = $method['login_folder_name'];
if( $method['login_user_id'] == 'username' or $method['login_user_id'] == 'either' )
{
$uses_name = true;
}
if( $method['login_user_id'] == 'email' or $method['login_user_id'] == 'either' )
{
$uses_email = true;
}
}
if( $uses_name AND $uses_email )
{
$this->lang->words['gl_signinname'] = $this->lang->words['enter_name_and_email'];
}
else if( $uses_email )
{
$this->lang->words['gl_signinname'] = $this->lang->words['enter_useremail'];
}
else
{
$this->lang->words['gl_signinname'] = $this->lang->words['enter_username'];
}
ipsRegistry::getClass('output')->html_title = $this->lang->words['ipb_login'];
ipsRegistry::getClass('output')->html_main = ipsRegistry::getClass('output')->global_template->log_in_form( $qs, $message, $replace == 'replace' ? true : false, $data );
ipsRegistry::getClass('output')->html_main = str_replace( '<%TITLE%>' , ipsRegistry::getClass('output')->html_title, ipsRegistry::getClass('output')->html_main );
@header("Content-type: text/html;charset={$this->settings['gb_char_set']}");
print ipsRegistry::getClass('output')->html_main;
exit();
}
/**
* Write to the admin log in loggy ma log
*
* @param string Username
* @param string ok/fail flag
* @return @e void
* @note This is private so that a hacker couldn't get into ACP, upload a new hook that lets them clear the log, and then clear the login log
*/
private function _writeToLog( $username='', $flag='fail' )
{
//-----------------------------------------
// INIT
//-----------------------------------------
$username = $username ? $username : $this->request['username'];
$flag = ( $flag == 'ok' ) ? 1 : 0;
$admin_post_details = array();
//-----------------------------------------
// Generate POST / GET details
//-----------------------------------------
foreach( $_GET as $k => $v )
{
$admin_post_details['get'][ $k ] = $v;
}
foreach( $_POST as $k => $v )
{
if ( $k == 'password' AND IPSText::mbstrlen( $v ) > 1 )
{
$v = $v ? ( (IPSText::mbstrlen( $v ) - 1) > 0 ? str_repeat( '*', IPSText::mbstrlen( $v ) - 1 ) : '' ) . substr( $v, -1, 1 ) : '';
}
$admin_post_details['post'][ $k ] = $v;
}
//-----------------------------------------
// Write to disk...
//-----------------------------------------
$this->DB->insert( 'admin_login_logs', array( 'admin_ip_address' => $this->member->ip_address,
'admin_username' => $username,
'admin_time' => time(),
'admin_success' => $flag,
'admin_post_details' => serialize( $admin_post_details ) ) );
}
}
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Admin logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -4,11 +4,11 @@
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* $Author: mark $
* @since 20th February 2002
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
* $LastChangedDate: 2012-04-02 11:17:19 -0400 (Mon, 02 Apr 2012) $
* @version v3.4.5
* $Revision: 10537 $
*/
$DEFAULT_SECTION = 'logsSplash';
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Email error logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Error logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2013-02-01 20:54:48 -0500 (Fri, 01 Feb 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 10914 $
* @version $Rev: 11930 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -152,6 +152,7 @@ class admin_core_logs_errorlogs extends ipsCommand
$url_query[] = 'type=' . $this->request['type'];
$url_query[] = 'string=' . urlencode( $string );
$url_query[] = 'match=' . $this->request['match'];
switch( $this->request['type'] )
{
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Admin Login Logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2013-03-19 11:50:13 -0400 (Tue, 19 Mar 2013) $
* </pre>
*
* @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 12087 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -83,9 +83,7 @@ class admin_core_logs_loginlog extends ipsCommand
if ( ! $log['admin_id'] )
{
$this->registry->output->global_message = $this->lang->words['ll_noid'];
$this->login_logs_view();
return;
$this->registry->output->showError( 'll_noid' );
}
//-----------------------------------------
@@ -101,7 +99,8 @@ class admin_core_logs_loginlog extends ipsCommand
{
foreach( $log['_admin_post_details'][ $r ] as $k => $v )
{
$log['_admin_post_details'][ $r ][ $k ] = htmlspecialchars( $v );
unset( $log['_admin_post_details'][ $r ][ $k ] );
$log['_admin_post_details'][ $r ][ htmlspecialchars( $k ) ] = htmlspecialchars( $v );
}
}
}
@@ -7,7 +7,7 @@
* $Author: bfarber $
* @since 8th Feb 2011
* $LastChangedDate: 2011-09-12 20:59:05 -0400 (Mon, 12 Sep 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 9483 $
*/
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Mobile Notification logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Moderator logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -15,7 +15,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -3,9 +3,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Admin logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2013-05-01 17:35:09 -0400 (Wed, 01 May 2013) $
* </pre>
*
* @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 12211 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -138,7 +138,7 @@ class admin_core_logs_spamlogs extends ipsCommand
if( $this->request['search_term'] )
{
$where = "log_msg LIKE '%{$this->request['search_term']}%' OR email_address LIKE '%{$this->request['search_term']}%'";
$where = "log_msg LIKE '%{$this->request['search_term']}%' OR email_address LIKE '%{$this->request['search_term']}%' OR ip_address LIKE '%{$this->request['search_term']}%'";
$qs = '&search_term=' . $this->request['search_term'];
}
@@ -1,281 +1,281 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Search Engine Spider logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 10914 $
*/
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 admin_core_logs_spiderlogs extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Spider map
*
* @var array Spider keys to values
*/
protected $bot_map = array();
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
/* Load bat names from the useragents cache */
foreach( $this->cache->getCache( 'useragents' ) as $agent )
{
if( $agent['uagent_type'] == 'search' )
{
$this->bot_map[ $agent['uagent_key'] ] = $agent['uagent_name'];
}
}
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_spiderlogs');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=logs&amp;section=spiderlogs';
$this->form_code_js = $this->html->form_code_js = 'module=logs&section=spiderlogs';
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=spiderlogs', $this->lang->words['slog_spider_logs'] );
///----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
case 'view':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_view' );
$this->_view();
break;
case 'remove':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_delete' );
$this->_remove();
break;
default:
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_view' );
$this->_listCurrent();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* View all logs for a given moderator
*
* @return @e void [Outputs to screen]
*/
protected function _view()
{
///----------------------------------------
// Basic init
//-----------------------------------------
$start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0;
$botty = IPSText::parseCleanValue( urldecode($this->request['bid'] ) );
$botty = str_replace( "&#33;", "!", $botty );
///----------------------------------------
// No bid or search string?
//-----------------------------------------
if ( !$this->request['search_string'] AND !$this->request['bid'] )
{
$this->registry->output->global_message = $this->lang->words['slog_nostring'];
$this->_listCurrent();
return;
}
///----------------------------------------
// mid?
//-----------------------------------------
if ( !$this->request['search_string'] )
{
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='{$botty}'" ) );
$row_count = $row['count'];
$query = "&amp;{$this->form_code}&amp;bid=" . $this->request['bid'] . "&amp;do=view";
$this->DB->build( array( 'select' => '*',
'from' => 'spider_logs',
'where' => "bot='{$botty}'",
'order' => 'entry_date DESC',
'limit' => array( $start, 20 ) ) );
$this->DB->execute();
}
else
{
$this->request['search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) );
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%" . $this->request['search_string'] . "%'" ) );
$row_count = $row['count'];
$query = "&amp;{$this->form_code}&amp;do=view&amp;search_string=" . urlencode($this->request['search_string']);
$this->DB->build( array( 'select' => '*',
'from' => 'spider_logs',
'where' => "(query_string LIKE '%" . $this->request['search_string'] . "%') OR (request_addr LIKE '%" . $this->request['search_string'] . "%')",
'order' => 'entry_date DESC',
'limit' => array( $start, 20 ) ) );
$this->DB->execute();
}
///----------------------------------------
// Page links
//-----------------------------------------
$links = $this->registry->output->generatePagination( array( 'totalItems' => $row_count,
'itemsPerPage' => 20,
'currentStartValue' => $start,
'baseUrl' => $this->settings['base_url'] . $query,
)
);
///----------------------------------------
// Get db results
//-----------------------------------------
while ( $row = $this->DB->fetch() )
{
$extra = "";
if( $row['query_string'] )
{
if ( stripos( '#lo-fi#i', $row['query_string'] ) !== false )
{
$extra = $this->lang->words['slog_lofi'];
$query_string_html = $extra . ' ' . $row['query_string'];
}
else
{
$query_string_html = "<a href='" . $this->settings['board_url'] . "/index." . $this->settings['php_ext'] . "?{$row['query_string']}' target='_blank'>" . IPSText::truncate($row['query_string']) . "</a>";
}
}
else
{
$query_string_html = "<a href='http://" . $_SERVER['HTTP_HOST'] . "{$row['request_addr']}' target='_blank'>" . IPSText::truncate($row['request_addr']) . "</a>";
}
$row['_bot_name'] = $this->bot_map[ strtolower($row['bot']) ];
$row['_query_string'] = $query_string_html;
$row['_time'] = $this->registry->getClass('class_localization')->getDate( $row['entry_date'], 'LONG' );
$rows[] = $row;
}
///----------------------------------------
// And output
//-----------------------------------------
$this->registry->output->html .= $this->html->spiderlogsView( $rows, $links );
}
/**
* Remove logs by a moderator
*
* @return @e void [Outputs to screen]
*/
protected function _remove()
{
if ( $this->request['bid'] == "" )
{
$this->registry->output->showError( $this->lang->words['slog_nologs'], 11132 );
}
$botty = urldecode($this->request['bid']);
$botty = str_replace( "&#33;", "!", $botty );
$this->DB->delete( 'spider_logs', "bot='{$botty}'" );
$this->registry->getClass('adminFunctions')->saveAdminLog($this->lang->words['slog_adminlog']);
$this->registry->output->silentRedirect( $this->settings['base_url']."&amp;{$this->form_code}" );
}
/**
* List the current logs with links to view per-admin
*
* @return @e void [Outputs to screen]
*/
protected function _listCurrent()
{
$spiders = array();
//-----------------------------------------
// All bots
//-----------------------------------------
$this->DB->build( array( 'select' => 'count(*) as cnt, bot, max(entry_date) as entry_date',
'from' => 'spider_logs',
'group' => 'bot',
'order' => 'entry_date DESC',
) );
$this->DB->execute();
while ( $r = $this->DB->fetch() )
{
$r['_bot_name'] = $this->bot_map[ strtolower($r['bot']) ];
$r['_time'] = $this->registry->getClass('class_localization')->getDate( $r['entry_date'], 'SHORT' );
$r['_bot_url'] = urlencode($r['bot']);
$spiders[] = $r;
}
//-----------------------------------------
// And output
//-----------------------------------------
$this->registry->output->html .= $this->html->spiderlogsWrapper( $spiders );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Search Engine Spider logs
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 10721 $
*/
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 admin_core_logs_spiderlogs extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Spider map
*
* @var array Spider keys to values
*/
protected $bot_map = array();
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
/* Load bat names from the useragents cache */
foreach( $this->cache->getCache( 'useragents' ) as $agent )
{
if( $agent['uagent_type'] == 'search' )
{
$this->bot_map[ $agent['uagent_key'] ] = $agent['uagent_name'];
}
}
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_spiderlogs');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=logs&amp;section=spiderlogs';
$this->form_code_js = $this->html->form_code_js = 'module=logs&section=spiderlogs';
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=spiderlogs', $this->lang->words['slog_spider_logs'] );
///----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
case 'view':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_view' );
$this->_view();
break;
case 'remove':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_delete' );
$this->_remove();
break;
default:
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'spiderlogs_view' );
$this->_listCurrent();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* View all logs for a given moderator
*
* @return @e void [Outputs to screen]
*/
protected function _view()
{
///----------------------------------------
// Basic init
//-----------------------------------------
$start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0;
$botty = IPSText::parseCleanValue( urldecode($this->request['bid'] ) );
$botty = str_replace( "&#33;", "!", $botty );
///----------------------------------------
// No bid or search string?
//-----------------------------------------
if ( !$this->request['search_string'] AND !$this->request['bid'] )
{
$this->registry->output->global_message = $this->lang->words['slog_nostring'];
$this->_listCurrent();
return;
}
///----------------------------------------
// mid?
//-----------------------------------------
if ( !$this->request['search_string'] )
{
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "bot='{$botty}'" ) );
$row_count = $row['count'];
$query = "&amp;{$this->form_code}&amp;bid=" . $this->request['bid'] . "&amp;do=view";
$this->DB->build( array( 'select' => '*',
'from' => 'spider_logs',
'where' => "bot='{$botty}'",
'order' => 'entry_date DESC',
'limit' => array( $start, 20 ) ) );
$this->DB->execute();
}
else
{
$this->request['search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) );
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(sid) as count', 'from' => 'spider_logs', 'where' => "query_string LIKE '%" . $this->request['search_string'] . "%'" ) );
$row_count = $row['count'];
$query = "&amp;{$this->form_code}&amp;do=view&amp;search_string=" . urlencode($this->request['search_string']);
$this->DB->build( array( 'select' => '*',
'from' => 'spider_logs',
'where' => "(query_string LIKE '%" . $this->request['search_string'] . "%') OR (request_addr LIKE '%" . $this->request['search_string'] . "%')",
'order' => 'entry_date DESC',
'limit' => array( $start, 20 ) ) );
$this->DB->execute();
}
///----------------------------------------
// Page links
//-----------------------------------------
$links = $this->registry->output->generatePagination( array( 'totalItems' => $row_count,
'itemsPerPage' => 20,
'currentStartValue' => $start,
'baseUrl' => $this->settings['base_url'] . $query,
)
);
///----------------------------------------
// Get db results
//-----------------------------------------
while ( $row = $this->DB->fetch() )
{
$extra = "";
if( $row['query_string'] )
{
if ( stripos( '#lo-fi#i', $row['query_string'] ) !== false )
{
$extra = $this->lang->words['slog_lofi'];
$query_string_html = $extra . ' ' . $row['query_string'];
}
else
{
$query_string_html = "<a href='" . $this->settings['board_url'] . "/index." . $this->settings['php_ext'] . "?{$row['query_string']}' target='_blank'>" . IPSText::truncate($row['query_string']) . "</a>";
}
}
else
{
$query_string_html = "<a href='http://" . $_SERVER['HTTP_HOST'] . "{$row['request_addr']}' target='_blank'>" . IPSText::truncate($row['request_addr']) . "</a>";
}
$row['_bot_name'] = $this->bot_map[ mb_strtolower($row['bot']) ];
$row['_query_string'] = $query_string_html;
$row['_time'] = $this->registry->getClass('class_localization')->getDate( $row['entry_date'], 'LONG' );
$rows[] = $row;
}
///----------------------------------------
// And output
//-----------------------------------------
$this->registry->output->html .= $this->html->spiderlogsView( $rows, $links );
}
/**
* Remove logs by a moderator
*
* @return @e void [Outputs to screen]
*/
protected function _remove()
{
if ( $this->request['bid'] == "" )
{
$this->registry->output->showError( $this->lang->words['slog_nologs'], 11132 );
}
$botty = urldecode($this->request['bid']);
$botty = str_replace( "&#33;", "!", $botty );
$this->DB->delete( 'spider_logs', "bot='{$botty}'" );
$this->registry->getClass('adminFunctions')->saveAdminLog($this->lang->words['slog_adminlog']);
$this->registry->output->silentRedirect( $this->settings['base_url']."&amp;{$this->form_code}" );
}
/**
* List the current logs with links to view per-admin
*
* @return @e void [Outputs to screen]
*/
protected function _listCurrent()
{
$spiders = array();
//-----------------------------------------
// All bots
//-----------------------------------------
$this->DB->build( array( 'select' => 'count(*) as cnt, bot, max(entry_date) as entry_date',
'from' => 'spider_logs',
'group' => 'bot',
'order' => 'entry_date DESC',
) );
$this->DB->execute();
while ( $r = $this->DB->fetch() )
{
$r['_bot_name'] = $this->bot_map[ strtolower($r['bot']) ];
$r['_time'] = $this->registry->getClass('class_localization')->getDate( $r['entry_date'], 'SHORT' );
$r['_bot_url'] = urlencode($r['bot']);
$spiders[] = $r;
}
//-----------------------------------------
// And output
//-----------------------------------------
$this->registry->output->html .= $this->html->spiderlogsWrapper( $spiders );
}
}
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* SQL error logs
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2013-04-15 17:26:30 -0400 (Mon, 15 Apr 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 10914 $
* @version $Rev: 12179 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -151,7 +151,7 @@ class admin_core_logs_sqlerror extends ipsCommand
continue;
}
if ( preg_match( "#^sql_error_log_(\d+)_(\d+)_(\d+).cgi$#", $file->getFilename() ) )
if ( preg_match( "#^sql_error_log_(\d+)_(\d+)_(\d+).cgi$#", $file->getFilename() ) || $file->getFilename() == "sql_error_latest.cgi" )
{
$count++;
@@ -4,10 +4,10 @@
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
* $Author: AndyMillne $
* $LastChangedDate: 2012-11-28 09:38:19 -0500 (Wed, 28 Nov 2012) $
* @version v3.4.5
* $Revision: 11659 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -71,17 +71,17 @@ class admin_core_logs_tasklogs extends ipsCommand
{
default:
case 'task_logs':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tasklogs_view' );
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tasklogs_view', '', 'system' );
$this->taskLogsOverview();
break;
case 'task_log_show':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tasklogs_view' );
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tasklogs_view', '', 'system' );
$this->taskLogsShow();
break;
case 'task_log_delete':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tasklogs_delete' );
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'tasklogs_delete', '', 'system' );
$this->taskLogsDelete();
break;
}
@@ -6,9 +6,9 @@
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* @since 27th January 2004
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
* $LastChangedDate: 2013-05-02 23:43:16 -0400 (Thu, 02 May 2013) $
* @version v3.4.5
* $Revision: 12217 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -223,7 +223,7 @@ class admin_core_logs_warnlogs extends ipsCommand
$row['_date'] = $this->registry->class_localization->getDate( $row['wl_date'], 'LONG' );
$row['wl_reason'] = $row['wl_reason'] ? $reasons[ $row['wl_reason'] ]['wr_name'] : '--';
$row['_mod'] = $row['wl_mq'] == -1 ? $this->lang->words['wlog_indef'] : ( $row['wl_mq'] == 0 ? $this->lang->words['wlog_none'] : $row['wl_mq'] . ' ' . $days[ $row['wl_mq_unit'] ? $row['wl_mq_unit'] : 'd' ] );
$row['_susp'] = $row['wl_suspend'] == -1 ? $this->lang->words['wlog_indef'] : ( $row['wl_suspend'] == 0 ? $this->lang->words['wlog_none'] : $row['wl_suspend'] . ' ' . $row[ $row['wl_suspend_unit'] ? $row['wl_suspend_unit'] : 'd' ] );
$row['_susp'] = ( in_array( $row['wl_suspend'], array( -1, -2 ) ) ) ? $this->lang->words['wlog_indef'] : ( $row['wl_suspend'] == 0 ? $this->lang->words['wlog_none'] : $row['wl_suspend'] . ' ' . $row[ $row['wl_suspend_unit'] ? $row['wl_suspend_unit'] : 'd' ] );
$row['_post'] = $row['wl_rpa'] == -1 ? $this->lang->words['wlog_indef'] : ( $row['wl_rpa'] == 0 ? $this->lang->words['wlog_none'] : $row['wl_rpa'] . ' ' . $days[ $row['wl_rpa_unit'] ? $row['wl_rpa_unit'] : 'd' ] );
$rows[] = $row;
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>Logs</title>
<title>Журналы</title>
<subitems>
<subitem>
<subitemtitle>Logs</subitemtitle>
<subitemtitle>Журналы</subitemtitle>
<subitemlang>splashlogs</subitemlang>
<subsection>logsSplash</subsection>
<subitemurl></subitemurl>
@@ -1,110 +1,110 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Admin Logs</grouptitle>
<grouptitle>Журнал действий администраторов</grouptitle>
<grouplang>core_adminlogs</grouplang>
<items>
<item>
<key>adminlogs_view</key>
<string>Can view admin logs?</string>
<string>Может просматривать журнал?</string>
</item>
<item>
<key>adminlogs_delete</key>
<string>Can delete admin logs?</string>
<string>Может удалять записи?</string>
</item>
</items>
</group>
<group>
<grouptitle>Admin Login Logs</grouptitle>
<grouptitle>Журнал входа администраторов</grouptitle>
<grouplang>core_acp_loginlogs</grouplang>
<items>
<item>
<key>acplogin_log</key>
<string>Can view admin login logs?</string>
<string>Может просматривать журнал входа администраторов?</string>
</item>
</items>
</group>
<group>
<grouptitle>Moderator Logs</grouptitle>
<grouptitle>Журнал действий модераторов</grouptitle>
<grouplang>core_modlogs</grouplang>
<items>
<item>
<key>modlogs_view</key>
<string>Can view moderator logs?</string>
<string>Может просматривать журнал?</string>
</item>
<item>
<key>modlogs_delete</key>
<string>Can delete moderator logs?</string>
<string>Может удалять записи?</string>
</item>
</items>
</group>
<group>
<grouptitle>Email Error Logs</grouptitle>
<grouptitle>Журнал ошибок Email</grouptitle>
<grouplang>core_eelogs</grouplang>
<items>
<item>
<key>emailerrorlogs_view</key>
<string>Can view email error logs?</string>
<string>Может просматривать журнал?</string>
</item>
<item>
<key>emailerrorlogs_delete</key>
<string>Can delete email error logs?</string>
<string>Может удалять записи?</string>
</item>
</items>
</group>
<group>
<grouptitle>Spider Logs</grouptitle>
<grouptitle>Журнал действий поисковых роботов</grouptitle>
<grouplang>core_spiderlogs</grouplang>
<items>
<item>
<key>spiderlogs_view</key>
<string>Can view spider logs?</string>
<string>Может просматривать журнал?</string>
</item>
<item>
<key>spiderlogs_delete</key>
<string>Can delete spider logs?</string>
<string>Может удалять записи?</string>
</item>
</items>
</group>
<group>
<grouptitle>Warn Logs</grouptitle>
<grouptitle>Журнал предупреждений</grouptitle>
<grouplang>core_warnlogs</grouplang>
<items>
<item>
<key>warnlogs_view</key>
<string>Can view warn logs?</string>
<string>Может просматривать журнал?</string>
</item>
<item>
<key>warnlogs_delete</key>
<string>Can delete warn logs?</string>
<string>Может удалять записи?</string>
</item>
</items>
</group>
<group>
<grouptitle>Error Logs</grouptitle>
<grouptitle>Журнал ошибок системы</grouptitle>
<grouplang>core_errorlogs</grouplang>
<items>
<item>
<key>errorlogs_view</key>
<string>Can view error logs?</string>
<string>Может просматривать журнал?</string>
</item>
<item>
<key>errorlogs_delete</key>
<string>Can delete error logs?</string>
<string>Может удалять записи?</string>
</item>
</items>
</group>
<group>
<grouptitle>SQL Error Logs</grouptitle>
<grouptitle>Журнал SQL ошибок</grouptitle>
<grouplang>core_selogs</grouplang>
<items>
<item>
<key>sqlerrorlogs_view</key>
<string>Can view SQL error logs?</string>
<string>Может просматривать журнал?</string>
</item>
<item>
<key>sqlerrorlogs_delete</key>
<string>Can delete SQL error logs?</string>
<string>Может удалять записи?</string>
</item>
</items>
</group>
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* API Users
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-11-28 09:38:19 -0500 (Wed, 28 Nov 2012) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright © 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 1st march 2002
* @version $Revision: 10914 $
* @version $Revision: 11659 $
*
*/
@@ -77,11 +77,11 @@ class admin_core_logs_xmlrpclogs extends ipsCommand
{
default:
case 'log_list':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_logs' );
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_logs', '', 'tools' );
$this->logList();
break;
case 'log_view_detail':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_logs' );
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'api_logs', '', 'tools' );
$this->logViewDetail();
break;
}
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2010-10-14 13:11:17 -0400 (Thu, 14 Oct 2010) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 477 $
*/
@@ -3,7 +3,7 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Manage mobile app images
* Last Updated: $Date: 2012-03-30 16:23:27 +0100 (Fri, 30 Mar 2012) $
* </pre>
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>Mobile App</title>
<title>Мобильное Приложение</title>
<subitems>
<subitem>
<subitemtitle>Mobile App</subitemtitle>
<subitemtitle>Мобильное Приложение</subitemtitle>
<subitemlang>skins_manage_app_images</subitemlang>
<subsection>images</subsection>
<subitemurl>do=overview</subitemurl>
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Manage App Images</grouptitle>
<grouptitle>Изображения</grouptitle>
<grouplang>core_templates</grouplang>
<items>
<item>
<key>app_images</key>
<string>Can view and manage app images?</string>
<string>Может управлять изображениями?</string>
</item>
</items>
</group>
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Dashboard
* Last Updated: $Date: 2012-07-03 12:20:08 -0400 (Tue, 03 Jul 2012) $
* Last Updated: $Date: 2012-10-23 15:11:59 -0400 (Tue, 23 Oct 2012) $
* </pre>
*
* @author $Author: AndyMillne $
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 5th January 2005
* @version $Revision: 11029 $
* @version $Revision: 11511 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -116,6 +116,10 @@ class admin_core_mycp_dashboard extends ipsCommand
//-----------------------------------------
// Hang on, do we need the upgrader?
// The only reason this is still here, since we check on the login form, is because Rhett Buck AKA BHP wants to
// login to the ACP, then upload files, then click the System tab and be automatically redirected to the upgrader.
// Seriously though? Who does that? The login form redirects you, so if you happen to upload files and click on
// the ACP link you're already covered. Only Mr. RB, that's who.
//-----------------------------------------
if ( !IN_DEV AND ( !defined('SKIP_UPGRADE_CHECK') OR !SKIP_UPGRADE_CHECK ) )
@@ -178,7 +182,7 @@ class admin_core_mycp_dashboard extends ipsCommand
$latest_version = array( 'upgrade_version_id' => NULL );
$this->DB->build( array( 'select' => '*', 'from' => 'upgrade_history', 'order' => 'upgrade_version_id DESC', 'limit' => array(1) ) );
$this->DB->build( array( 'select' => '*', 'from' => 'upgrade_history', 'order' => 'upgrade_version_id DESC', 'limit' => array(1) ) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Admin change email/password
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 5th January 2005
* @version $Revision: 10914 $
* @version $Revision: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -0,0 +1,143 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.4.5
* Dashboard
* Last Updated: $Date: 2012-07-12 18:15:50 +0100 (Thu, 12 Jul 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 5th January 2005
* @version $Revision: 11070 $
*/
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 admin_core_mycp_tabs extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Shortcut for url
*
* @var string URL shortcut
*/
protected $form_code;
/**
* Shortcut for url (javascript)
*
* @var string JS URL shortcut
*/
protected $form_code_js;
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_mycp');
//-----------------------------------------
// Load language
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_mycp' ) );
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=mycp&amp;section=tabs';
$this->form_code_js = $this->html->form_code_js = 'module=mycp&section=tabs';
/* Geddit */
if ( $this->request['do'] == 'save' )
{
$this->tabsSave();
}
else
{
$this->tabsForm();
}
//-----------------------------------------
// Pass to CP output hander
//-----------------------------------------
$this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
$this->registry->getClass('output')->sendOutput();
}
/**
* Saves the tab form
*
* @return array
*/
public function tabsSave()
{
$tabBar = array();
$otherMenu = array();
if ( empty( $_GET['reset'] ) && is_array( $_GET ) )
{
foreach( $_GET as $k => $v )
{
if ( substr( $k, 0, 7 ) == 'tabBar_' )
{
$tabBar[ str_replace( 'tabBar_', '', $k ) ] = $v;
}
if ( substr( $k, 0, 10 ) == 'otherMenu_' )
{
$otherMenu[ str_replace( 'otherMenu_', '', $k ) ] = $v;
}
}
}
/* Save it */
$this->registry->adminFunctions->staffSaveCookie( 'tabPrefs', array( 'tabBar' => $tabBar, 'otherMenu' => $otherMenu ) );
/* Reload */
$this->registry->output->silentRedirect( $this->settings['base_url'] . '&' . $this->form_code . '&do=show' );
}
/**
* Builds the tab form
*
* @return array
*/
public function tabsForm()
{
$applications = ipsRegistry::$applications;
$mainTabs = $this->registry->output->getMainTabKeys();
$otherTabs = $this->registry->output->getOtherTabKeys();
$mainTabData = $this->registry->output->getTabDataFromKeys( $mainTabs );
$otherTabData = $this->registry->output->getTabDataFromKeys( $otherTabs );
$this->registry->output->html = $this->html->tabsForm( $mainTabData, $otherTabData );
}
}
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>My Dashboard</title>
<title>Панель Управления</title>
<subitems>
<subitem>
<subitemtitle>My Dashboard</subitemtitle>
<subitemtitle>Панель Управления</subitemtitle>
<subitemlang>dashboard</subitemlang>
<subsection>dashboard</subsection>
<subitemurl></subitemurl>
@@ -15,10 +15,10 @@
</subitems>
</item>
<item>
<title>Change My Details</title>
<title>Изменить Мои Данные</title>
<subitems>
<subitem>
<subitemtitle>Change My Details</subitemtitle>
<subitemtitle>Изменить Мои Данные</subitemtitle>
<subitemlang>mydetails</subitemlang>
<subsection>details</subsection>
<subitemurl></subitemurl>
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>My Control Panel</grouptitle>
<grouptitle>Панель управления</grouptitle>
<grouplang>core_mycp</grouplang>
<items>
<item>
<key>dashboard</key>
<string>Can access the dashboard?</string>
<string>Имеет доступ к панели?</string>
</item>
</items>
</group>
@@ -0,0 +1,245 @@
<?php
/**
* Invision Power Services
* IP.SEO Acronym Expansion
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
*
* @author $Author: bfarber $ (Orginal: Mark)
* @copyright © 2011 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Nexus
* @link http://www.invisionpower.com
* @since 16th August 2011
* @version $Revision: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly.";
exit();
}
class admin_core_posts_acronyms extends ipsCommand
{
/**
* Skin object shortcut
*
* @var $html
*/
public $html;
/**
* String for the screen url bit
*
* @var $form_code
*/
public $form_code = '';
/**
* String for the JS url bit
*
* @var $form_code_js
*/
public $form_code_js = '';
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Init
//-----------------------------------------
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'acronyms_manage' );
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_seo' ) );
$this->html = $this->registry->output->loadTemplate( 'cp_skin_seo' );
$this->form_code = $this->html->form_code = 'module=posts&amp;section=acronyms&amp;';
$this->form_code_js = $this->html->form_code_js = 'module=posts&section=acronyms&';
//-----------------------------------------
// What are we doing
//-----------------------------------------
switch ( $this->request['do'] )
{
case 'add':
$this->form( 'add' );
break;
case 'edit':
$this->form( 'edit' );
break;
case 'save':
$this->save();
break;
case 'delete':
$this->delete();
break;
default:
$this->manage();
break;
}
//-----------------------------------------
// Pass to CP output hander
//-----------------------------------------
$this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
$this->registry->getClass('output')->sendOutput();
}
/**
* Acronyms dashboard
*
* @return @e void
*/
private function manage()
{
$acronyms = array();
$this->DB->build( array( 'select' => '*', 'from' => 'seo_acronyms', 'order' => 'a_short' ) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$acronyms[ $row['a_id'] ] = $row;
}
$this->registry->output->html .= $this->html->acronyms( $acronyms );
}
/**
* Displays a form to add/edit acronyms
*
* @return @e void
*/
private function form( $type )
{
/* Normal form logic */
$current = array();
if ( $type == 'edit' )
{
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'seo_acronyms', 'where' => 'a_id=' . intval($this->request['id']) ) );
if ( !$current['a_id'] )
{
ipsRegistry::getClass('output')->showError( 'err_no_acronym', '11SEO100', FALSE, '', 404 );
}
}
$this->registry->output->html .= $this->html->acronymForm( $current );
}
/**
* Saves the new/edited acronym
*
* @return @e void
*/
private function save()
{
//-----------------------------------------
// Validate Data
//-----------------------------------------
if ( !$this->request['short'] or !$this->request['long'] )
{
ipsRegistry::getClass('output')->showError( 'err_acronym_details', '11SEO101', FALSE, '', 500 );
}
if ( strlen( $this->request['short'] ) > 255 or strlen( $this->request['long'] ) > 255 )
{
ipsRegistry::getClass('output')->showError( 'err_acronym_toolong', '21SEO102', FALSE, '', 500 );
}
//-----------------------------------------
// Save
//-----------------------------------------
$save = array( 'a_short' => $this->request['short'],
'a_long' => $this->request['long'],
'a_semantic' => intval( $this->request['semantic'] ),
'a_casesensitive' => intval( $this->request['casesensitive'] )
);
if ( ! empty($this->request['id']) )
{
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'seo_acronyms', 'where' => 'a_id=' . intval($this->request['id']) ) );
if ( empty($current['a_id']) )
{
ipsRegistry::getClass('output')->showError( 'err_no_acronym', '11SEO100', FALSE, '', 404 );
}
$this->DB->update( 'seo_acronyms', $save, "a_id={$current['a_id']}" );
}
else
{
$this->DB->insert( 'seo_acronyms', $save );
}
// And recache
$this->recache();
//-----------------------------------------
// Display
//-----------------------------------------
$this->registry->output->global_message = $this->lang->words['acronym_saved'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code );
}
/**
* Deletes acronyms
*
* @return @e void
*/
private function delete()
{
$id = intval( $this->request['id'] );
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'seo_acronyms', 'where' => "a_id={$id}" ) );
if ( !$current['a_id'] )
{
ipsRegistry::getClass('output')->showError( 'err_no_acronym', '11SEO103', FALSE, '', 404 );
}
$this->DB->delete( 'seo_acronyms', "a_id={$id}" );
$this->recache();
$this->registry->output->global_message = $this->lang->words['acronym_deleted'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code );
}
/**
* Rebuilds the acronyms cache
*
* @return @e void
*/
public function recache()
{
$cache = array();
$this->DB->build( array( 'select' => '*', 'from' => 'seo_acronyms', 'order' => 'a_short' ) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$cache[ $row['a_short'] ] = $row;
}
$this->cache->setCache( 'ipseo_acronyms', $cache, array( 'array' => 1 ) );
}
}
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Bad Word Filters
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* BBCode Management
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -14,7 +14,7 @@
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
File diff suppressed because it is too large. Load diff
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* BBCode Media Tag Management
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $LastChangedDate: 2012-05-22 13:10:11 -0400 (Tue, 22 May 2012) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 27th January 2004
* @version $Rev: 10914 $
* @version $Rev: 10783 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>Emoticon Management</title>
<title>Управление Смайликами</title>
<subitems>
<subitem>
<subitemtitle>Emoticon Management</subitemtitle>
<subitemtitle>Управление Смайликами</subitemtitle>
<subitemlang>emoticons</subitemlang>
<subsection>emoticons</subsection>
<subitemurl>do=overview</subitemurl>
@@ -15,10 +15,10 @@
</subitems>
</item>
<item>
<title>BBCode Management</title>
<title>Управление BB-кодами</title>
<subitems>
<subitem>
<subitemtitle>BBCode Management</subitemtitle>
<subitemtitle>Управление BB-кодами</subitemtitle>
<subitemlang>bbcode</subitemlang>
<subsection>bbcode</subsection>
<subitemurl>do=overview</subitemurl>
@@ -28,10 +28,10 @@
</subitems>
</item>
<item>
<title>Manage Media Tag</title>
<title>Управление Media-тагами</title>
<subitems>
<subitem>
<subitemtitle>Manage Media Tag</subitemtitle>
<subitemtitle>Управление Media-тагами</subitemtitle>
<subitemlang>mediatag</subitemlang>
<subsection>media</subsection>
<subitemurl>do=overview</subitemurl>
@@ -41,10 +41,10 @@
</subitems>
</item>
<item>
<title>Bad Word Filters</title>
<title>Фильтр Нецензурных Слов</title>
<subitems>
<subitem>
<subitemtitle>Bad Word Filters</subitemtitle>
<subitemtitle>Фильтр Нецензурных Слов</subitemtitle>
<subitemlang>badwords</subitemlang>
<subsection>badwords</subsection>
<subitemurl>do=overview</subitemurl>
@@ -53,5 +53,18 @@
</subitem>
</subitems>
</item>
<item>
<title>Расшифровка Сокращений</title>
<subitems>
<subitem>
<subitemtitle>Расшифровка Сокращений</subitemtitle>
<subitemlang>acronyms</subitemlang>
<subsection>acronyms</subsection>
<subitemurl></subitemurl>
<subitemrolekey>acronyms_manage</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</tabitems>
</menu>
@@ -1,66 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Manage Badwords</grouptitle>
<grouptitle>Управление нецензурными словами</grouptitle>
<grouplang>core_badwords</grouplang>
<items>
<item>
<key>badword_manage</key>
<string>Can manage badwords?</string>
<string>Может добавлять/изменять?</string>
</item>
<item>
<key>badword_delete</key>
<string>Can delete badwords?</string>
<string>Может удалять?</string>
</item>
</items>
</group>
<group>
<grouptitle>Emoticons</grouptitle>
<grouptitle>Смайлики</grouptitle>
<grouplang>core_emoticons</grouplang>
<items>
<item>
<key>emoticons_manage</key>
<string>Can access emoticon manager?</string>
<string>Имеет доступ к менеджеру смайликов?</string>
</item>
<item>
<key>emoticons_edit</key>
<string>Can edit emoticons?</string>
<string>Может изменять смайлики?</string>
</item>
<item>
<key>emoticons_add</key>
<string>Can add new emoticons?</string>
<string>Может добавлять смайлики?</string>
</item>
<item>
<key>emoticons_delete</key>
<string>Can remove emoticons?</string>
<string>Может удалять смайлики?</string>
</item>
</items>
</group>
<group>
<grouptitle>BBCode</grouptitle>
<grouptitle>BB-коды</grouptitle>
<grouplang>core_bbcode</grouplang>
<items>
<item>
<key>bbcode_manage</key>
<string>Can manage bbcode?</string>
<string>Может добавлять/изменять?</string>
</item>
<item>
<key>bbcode_delete</key>
<string>Can delete bbcode?</string>
<string>Может удалять?</string>
</item>
</items>
</group>
<group>
<grouptitle>Manage Media</grouptitle>
<grouptitle>Расшифровка сокращений</grouptitle>
<grouplang>acronyms</grouplang>
<items>
<item>
<key>acronyms_manage</key>
<string>Может управлять сокращениями?</string>
</item>
</items>
</group>
<group>
<grouptitle>Управление Media-тегами</grouptitle>
<grouplang>core_media</grouplang>
<items>
<item>
<key>media_manage</key>
<string>Can manage media bbcode supported sites?</string>
<string>Может добавлять/изменять?</string>
</item>
<item>
<key>media_delete</key>
<string>Can remove supported media bbcode sites?</string>
<string>Может удалять?</string>
</item>
</items>
</group>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -4,12 +4,12 @@
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* $Author: AndyMillne $
* @author Based on original "Report Center" by Luke Scott
* @since -
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
* $LastChangedDate: 2013-02-14 19:17:38 -0500 (Thu, 14 Feb 2013) $
* @version v3.4.5
* $Revision: 11992 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -237,25 +237,39 @@ class admin_core_report_reports extends ipsCommand
// Make sure stuff is right
//-----------------------------------------
if( ! $_POST['plugi_title'] || ! $_POST['plugi_desc'] || ! $_POST['plugi_file'] )
$errors = array();
if( ! $_POST['plugi_title'] )
{
$this->registry->output->global_error = $this->lang->words['r_missingfield'];
$errors[] = "<li>{$this->lang->words['r_missing_title']}</li>";
}
elseif( preg_match("/[^a-z0-9\-_]/i", $this->request['plugi_file'] ) )
{
$this->registry->output->global_error = $this->lang->words['r_incchar'];
if( ! $_POST['plugi_desc'] )
{
$errors[] = "<li>{$this->lang->words['r_missing_desc']}</li>";
}
elseif( ! is_file( IPSLib::getAppDir( $this->request['appPlugin'] ) . '/extensions/reportPlugins/' . $this->request['plugi_file'] . '.php' ) )
if( ! $_POST['plugi_file'] )
{
$errors[] = "<li>{$this->lang->words['r_missing_file']}</li>";
}
if( preg_match("/[^a-z0-9\-_]/i", $this->request['plugi_file'] ) )
{
$this->registry->output->global_error = $this->lang->words['r_404file'];
$errors[] = "<li>{$this->lang->words['r_incchar']}</li>";
}
if( ! is_file( IPSLib::getAppDir( $this->request['appPlugin'] ) . '/extensions/reportPlugins/' . $this->request['plugi_file'] . '.php' ) )
{
$errors[] = "<li>{$this->lang->words['r_404file']}</li>";
}
//-----------------------------------------
// If no errors, create the plugin
//-----------------------------------------
if( ! $this->registry->output->global_error )
if( count( $errors ) )
{
$this->registry->output->html .= "<div class='warning'><h4>{$this->lang->words['sl_formerror']}</h4><ul>" . implode( '', $errors ) . "</ul></div><br />";
}
else
{
//-----------------------------------------
// If no errors, create the plugin
//-----------------------------------------
$build_plugin = array(
'onoff' => 1,
'class_title' => $this->request['plugi_title'],
@@ -379,8 +393,7 @@ class admin_core_report_reports extends ipsCommand
'onoff' => $this->request['plugi_onoff'],
'group_can_report' => $p_can_report,
'mod_group_perm' => $p_can_gperm,
'extra_data' => serialize( $plugin->_extra ),
'app' => $this->request['appPlugin']
'extra_data' => serialize( $plugin->_extra )
);
if( $plug_data['lockd'] == 0 || IN_DEV == 1 )
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>Plugin Manager</title>
<title>Управление Плагинами</title>
<subitems>
<subitem>
<subitemtitle>Plugin Manager</subitemtitle>
<subitemtitle>Управление Плагинами</subitemtitle>
<subitemlang>reports_plugin</subitemlang>
<subsection>reports</subsection>
<subitemurl>do=plugin</subitemurl>
@@ -15,10 +15,10 @@
</subitems>
</item>
<item>
<title>Status &amp; Severity Levels</title>
<title>Статус и Приоритеты Жалоб</title>
<subitems>
<subitem>
<subitemtitle>Status &amp; Severity Levels</subitemtitle>
<subitemtitle>Статус и Приоритеты Жалоб</subitemtitle>
<subitemlang>reports_ssl</subitemlang>
<subsection>reports</subsection>
<subitemurl>do=status</subitemurl>
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Report Center Plugins</grouptitle>
<grouptitle>Плагины системы жалоб</grouptitle>
<grouplang>core_reports</grouplang>
<items>
<item>
<key>plugins_manage</key>
<string>Can add/edit supported reported content plugins?</string>
<string>Может добавлять/изменять плагины?</string>
</item>
<item>
<key>plugins_remove</key>
<string>Can remove reported content plugins?</string>
<string>Может удалять плагины?</string>
</item>
</items>
</group>
<group>
<grouptitle>Report Center Status and Severity Management</grouptitle>
<grouptitle>Управление статусами жалоб</grouptitle>
<grouplang>core_statsev</grouplang>
<items>
<item>
<key>sands_manage</key>
<string>Can add/edit report center status and severity levels?</string>
<string>Может добавлять/изменять статусы жалоб?</string>
</item>
<item>
<key>sands_remove</key>
<string>Can remove status and severity levels?</string>
<string>Может удалять статусы?</string>
</item>
</items>
</group>
@@ -0,0 +1,650 @@
<?php
/**
* Invision Power Services
* IP.SEO - Search Activity Dashboard
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
*
* @author $Author: bfarber $
* @copyright (c) 2010-2011 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.SEO
* @link http://www.invisionpower.com
* @version $Revision: 10721 $
*/
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 admin_core_seo_activity extends ipsCommand
{
public $html;
protected $engine = null;
/**
* Main class entry point
*
* @access public
* @param object ipsRegistry reference
* @return void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Init
//-----------------------------------------
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'seo_activity' );
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_seo' ) );
$this->html = $this->registry->output->loadTemplate( 'cp_skin_seo' );
if( $this->request['engine'] )
{
$this->engine = $this->DB->addSlashes( strtolower( $this->request['engine'] ) );
$this->engine = $this->engine == 'msnbot' ? 'bing' : $this->engine;
}
$app = $this->DB->buildAndFetch( array( 'select' => 'app_added', 'from' => 'core_applications', 'where' => "app_directory = 'ipseo'" ) );
$days = 7;
if($app['app_added'] > time() - (86400*7))
{
$days = 2;
}
if($app['app_added'] > time() - (86400*2))
{
$days = 1;
}
$this->days = $this->request['days'] ? intval( $this->request['days'] ) : $days;
if ( $this->days == 1 )
{
$this->mysqlGroup = '%H';
$this->phpGroup = 'H';
}
else if ( $this->days == 28 )
{
$this->mysqlGroup = '%e';
$this->phpGroup = 'j';
}
else
{
$this->mysqlGroup = '%w';
$this->phpGroup = 'w';
}
//-----------------------------------------
// What are we doing?
//-----------------------------------------
switch($this->request['do'])
{
case 'keywords':
$this->_showKeywords();
break;
case 'visitors':
$this->_showVisitors();
break;
case 'search_chart':
$this->renderSearchChart();
break;
case 'spider_chart':
$this->renderSpiderChart();
break;
default:
$this->showDashboard();
break;
}
//-----------------------------------------
// Display
//-----------------------------------------
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Page: Keywords
*/
protected function _showKeywords()
{
$st = $this->request['st'] ? $this->request['st'] : 0;
/* Pagination */
$max = $this->DB->buildAndFetch( array( 'select' => "COUNT(*) as total",
'from' => "search_keywords" ) );
$pagination = $this->registry->output->generatePagination( array( 'totalItems' => intval($max['total']),
'itemsPerPage' => 20,
'currentStartValue' => $st,
'baseUrl' => $this->settings['base_url'].'&module=seo&section=activity&do=keywords' ) );
/* Get results */
$keywords = array();
$this->DB->build( array(
'select' => '*',
'from' => 'search_keywords',
'limit' => array( $st, 20 ),
'order' => 'count DESC'
) );
$this->DB->execute();
while ( $row = $this->DB->fetch() )
{
$row['keyword'] = IPSText::parseCleanValue( strtolower( $row['keyword'] ) );
$keywords[] = $row;
}
/* Display */
$this->registry->output->html = $this->html->keywords( $pagination, $keywords );
}
/**
* Page: Visitors
*/
protected function _showVisitors()
{
/* Init vars */
$st = intval($this->request['st']);
$visitors = array();
$where = array();
/* Looking for a specific search engine? */
if ( ! is_null($this->engine) )
{
$where[] = 's.engine = \''.$this->engine.'\'';
}
/* Looking for a specific keyword? */
if ( ! is_null($this->request['keyword']) )
{
$where[] = 's.keywords = \''.$this->request['keyword'].'\'';
}
/* Pagination */
$max = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'search_visitors s', 'where' => implode(' AND ', $where) ) );
$base = $this->settings['base_url'].'module=seo&amp;section=activity&amp;do=visitors&amp;';
$base .= !is_null($this->engine) ? 'engine=' . $this->engine . '&amp;' : '';
$base .= !is_null($this->request['keyword']) ? 'keyword=' . $this->request['keyword'] . '&amp;' : '';
$pagination = $this->registry->output->generatePagination( array( 'totalItems' => intval($max['total']),
'itemsPerPage' => 20,
'currentStartValue' => $st,
'baseUrl' => $base
) );
/* Get results */
if ( $max['total'] )
{
$this->DB->build( array( 'select' => 's.*',
'from' => array( 'search_visitors' => 's' ),
'where' => implode(' AND ', $where),
'limit' => array( $st, 20 ),
'order' => 'date DESC',
'add_join' => array( array( 'select' => 'm.member_id, m.members_display_name',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=s.member',
'type' => 'left' ) )
) );
$e = $this->DB->execute();
while ( $row = $this->DB->fetch( $e ) )
{
$row['date'] = $this->lang->getDate( $row['date'], 'SHORT' );
$row['keywords'] = IPSText::parseCleanValue( urldecode( strtolower( $row['keywords'] ) ) );
$row['page'] = $this->makeLinkText( $row['url'] );
$visitors[] = $row;
}
}
/* Display */
$this->registry->output->html = $this->html->visitors( $pagination, $visitors );
}
/**
* Page: Dashboard
*/
protected function showDashboard()
{
//-----------------------------------------
// Get Keywords
//-----------------------------------------
$keywords = array();
$this->DB->build( array(
'select' => '*',
'from' => 'search_keywords',
'limit' => array( 0, 5 ),
'order' => 'count DESC'
) );
$this->DB->execute();
while ( $row = $this->DB->fetch() )
{
$row['keyword'] = IPSText::parseCleanValue( strtolower( $row['keyword'] ) );
$keywords[] = $row;
}
//-----------------------------------------
// Get Spider Hits
//-----------------------------------------
$spiders = array();
$query = array(
'select' => '*',
'from' => 'spider_logs',
'order' => 'sid DESC',
'limit' => array(0, 5)
);
if(!is_null($this->engine))
{
$query['where'] = 'bot = \''.($this->engine == 'bing' ? 'msnbot\' OR \'bing' : $this->engine).'\'';
}
$this->DB->build( $query );
$this->DB->execute();
while($row = ipsRegistry::DB()->fetch($result))
{
$row['entry_date'] = $this->lang->getDate( $row['entry_date'], 'SHORT' );
$row['page'] = $this->makeLinkText( $row['query_string'] ? $row['query_string'] : $row['request_addr'] );
$spiders[] = $row;
}
//-----------------------------------------
// Get Visitors
//-----------------------------------------
$visitors = array();
$this->DB->build( array( 'select' => 's.*',
'from' => array( 'search_visitors' => 's' ),
'limit' => array( 0, 5 ),
'order' => 'date DESC',
'add_join' => array( array( 'select' => 'm.member_id, m.members_display_name',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=s.member',
'type' => 'left' ) )
) );
$e = $this->DB->execute();
while ( $row = $this->DB->fetch( $e ) )
{
$row['date'] = $this->lang->getDate( $row['date'], 'SHORT' );
$row['keywords'] = IPSText::parseCleanValue( urldecode( strtolower( $row['keywords'] ) ) );
$row['page'] = $this->makeLinkText( $row['url'] );
$visitors[] = $row;
}
//-----------------------------------------
// Display
//-----------------------------------------
$this->registry->output->html = $this->html->activity( $keywords, $spiders, $visitors );
}
/**
* Work out page title
*/
protected function makeLinkText($qs)
{
$matches = array();
if( $qs == '' )
{
return 'Board index';
}
elseif(preg_match('/showtopic\=([0-9]+)/', $qs, $matches))
{
return 'Topic: ' . $this->getContentTitle('title', 'topics', 'tid = ' . intval($matches[1]) );
}
elseif(preg_match('/showforum\=([0-9]+)/', $qs, $matches))
{
return 'Forum: ' . $this->getContentTitle('name', 'forums', 'id = ' . intval($matches[1]) );
}
elseif(preg_match('/showuser\=([0-9]+)/', $qs, $matches))
{
return 'User: ' . $this->getContentTitle('members_display_name', 'members', 'member_id = ' . intval($matches[1]) );
}
elseif(preg_match('/entry\=([0-9]+)/', $qs, $matches))
{
return 'Blog Entry: ' . $this->getContentTitle('entry_name', 'blog_entries', 'entry_id = ' . intval($matches[1]) );
}
elseif(preg_match('/blogid\=([0-9]+)/', $qs, $matches))
{
return 'Blog: ' . $this->getContentTitle('blog_name', 'blog_blogs', 'blog_id = ' . intval($matches[1]) );
}
elseif(preg_match('/showfile\=([0-9]+)/', $qs, $matches))
{
return 'Download: ' . $this->getContentTitle('file_name', 'downloads_files', 'file_id = ' . intval($matches[1]) );
}
elseif(preg_match('/app=downloads(.*)showcat\=([0-9]+)/', $qs, $matches))
{
return 'Download: ' . $this->getContentTitle('cname', 'downloads_categories', 'cid = ' . intval($matches[2]) );
}
elseif(preg_match('/app=sitemap(.*)sitemap\=(.*)$/', $qs, $matches))
{
return 'Sitemap: ' . IPSText::parseCleanValue( $matches[2] );
}
elseif(preg_match('/app=seo(.*)sitemap\=(.*)$/', $qs, $matches))
{
return 'Sitemap: ' . IPSText::parseCleanValue( $matches[2] );
}
elseif(preg_match('/app=ipseo(.*)sitemap\=(.*)$/', $qs, $matches))
{
return 'Sitemap: ' . IPSText::parseCleanValue( $matches[2] );
}
else
{
foreach( ipsRegistry::$applications as $appDir => $appData )
{
if( preg_match( "/app\={$appDir}/", $qs ) )
{
return IPSLib::getAppTitle( $appDir, true ) ? IPSLib::getAppTitle( $appDir, true ) : IPSLib::getAppTitle( $appDir );
}
}
}
return 'Unknown';
}
protected function getContentTitle( $select, $table, $where )
{
$data = $this->DB->buildAndFetch( array( 'select' => $select . ' AS content_title', 'from' => $table, 'where' => $where ) );
if( empty($data['content_title']) )
{
return '(Could not load title)';
}
else
{
return $data['content_title'];
}
}
/**
* Action: Render Latest Visitors Chart
*/
public function renderSearchChart()
{
//-----------------------------------------
// Init
//-----------------------------------------
$week = $this->getDateFrom();
$engine= is_null($this->engine) ? '' : ' AND engine = \''.$this->engine.'\'';
$graph = $this->_buildChart( $week );
$series = array();
if ( $this->days == 1 )
{
for ( IPSTime::setTimestamp( $week ); IPSTime::getTimestamp()<(time()+3600); IPSTime::add_minutes( 60 ) )
{
$series[ intval( date( $this->phpGroup, IPSTime::getTimestamp() ) ) ] = 0;
}
}
else
{
for ( IPSTime::setTimestamp( $week ); IPSTime::getTimestamp()<time(); IPSTime::add_days( 1 ) )
{
$series[ intval( date( $this->phpGroup, IPSTime::getTimestamp() ) ) ] = 0;
}
}
//-----------------------------------------
// Get Results
//-----------------------------------------
$this->DB->build(array(
'select' => $this->DB->buildFromUnixtime('date', $this->mysqlGroup ) . ' AS chart_day, COUNT(*) AS chart_count',
'from' => 'search_visitors',
'where' => 'date >= ' . $week . $engine,
'group' => $this->DB->buildFromUnixtime('date', $this->mysqlGroup ),
'order' => 'id ASC'
));
$result = $this->DB->execute();
if($result)
{
$i = 0;
$rows = ipsRegistry::DB()->getTotalRows();
while($row = ipsRegistry::DB()->fetch($result))
{
$i++;
$title = false;
switch($this->days)
{
case 1:
if($i == 1 || $i % 2)
{
$title = true;
}
break;
case 2:
if($i == 1 || $i == $rows || $i == round($rows/2))
{
$title = true;
}
break;
default:
$title = true;
break;
}
if ( isset( $series[ intval( $row['chart_day'] ) ] ) )
{
$series[ intval( $row['chart_day'] ) ] = $row['chart_count'];
}
}
}
$plotSeries = array();
foreach ( $series as $v )
{
$plotSeries[] = $v;
}
//-----------------------------------------
// Render
//-----------------------------------------
$graph->addSeries( '', $plotSeries );
@$graph->display( $this->getDateFrom() );
exit;
}
/**
* Action: Render Latest Spider Hits
*/
public function renderSpiderChart()
{
//-----------------------------------------
// Init
//-----------------------------------------
$week = $this->getDateFrom();
$engine= is_null($this->engine) ? '' : ' AND engine = \''.$this->engine.'\'';
$graph = $this->_buildChart( $week );
$series = array();
if ( $this->days == 1 )
{
for ( IPSTime::setTimestamp( $week ); IPSTime::getTimestamp()<(time()+3600); IPSTime::add_minutes( 60 ) )
{
$series[ intval( date( $this->phpGroup, IPSTime::getTimestamp() ) ) ] = 0;
}
}
else
{
for ( IPSTime::setTimestamp( $week ); IPSTime::getTimestamp()<time(); IPSTime::add_days( 1 ) )
{
$series[ intval( date( $this->phpGroup, IPSTime::getTimestamp() ) ) ] = 0;
}
}
//-----------------------------------------
// Get Results
//-----------------------------------------
$this->DB->build(array(
'select' => $this->DB->buildFromUnixtime('entry_date', $this->mysqlGroup ) . ' AS chart_day, COUNT(*) AS chart_count',
'from' => 'spider_logs',
'where' => 'entry_date >= ' . $week . $engine,
'group' => $this->DB->buildFromUnixtime('entry_date', $this->mysqlGroup ),
'order' => 'entry_date ASC'
));
$result = $this->DB->execute();
if($result)
{
$i = 0;
$rows = ipsRegistry::DB()->getTotalRows();
while($row = ipsRegistry::DB()->fetch($result))
{
$i++;
$title = false;
switch($this->days)
{
case 1:
if($i == 1 || $i % 2)
{
$title = true;
}
break;
case 2:
if($i == 1 || $i == $rows || $i == round($rows/2))
{
$title = true;
}
break;
default:
$title = true;
break;
}
if ( isset( $series[ intval( $row['chart_day'] ) ] ) )
{
$series[ intval( $row['chart_day'] ) ] = $row['chart_count'];
}
}
}
$plotSeries = array();
foreach ( $series as $v )
{
$plotSeries[] = $v;
}
//-----------------------------------------
// Render
//-----------------------------------------
$graph->addSeries( '', $plotSeries );
@$graph->display( $this->getDateFrom() );
exit;
}
/**
* Work out start date
*/
protected function getDateFrom()
{
$now = time();
if ( $this->days == 1 )
{
return $now - 86400 + 3600;
}
else
{
$minus = $now - (86400 * ($this->days-1));
$from = strtotime('00:00:01', $minus);
}
return $from;
}
/**
* Build A Chart
*/
private function _buildChart( $startTime )
{
//-----------------------------------------
// Silly Timezones
//-----------------------------------------
$this->DB->setTimeZone( $this->memberData['time_offset'] );
//-----------------------------------------
// Init Graph
//-----------------------------------------
require_once( IPS_KERNEL_PATH . 'classGraph.php' );/*noLibHook*/
$graph = new classGraph();
$graph->options['font'] = DOC_IPS_ROOT_PATH . '/public/style_captcha/captcha_fonts/DejaVuSans.ttf';
$graph->options['width'] = 800;
$graph->options['height'] = 300;
$graph->options['style3D'] = 0;
$graph->options['charttype'] = 'Area';
$graph->options['showgridlinesx'] = 0;
$graph->options['showdatalabels'] = 0;
$graph->options['title'] = '';
$graph->options['showlegend'] = 0;
//-----------------------------------------
// Add Labels
//-----------------------------------------
$labels = array();
if ( $this->days == 1 )
{
for ( IPSTime::setTimestamp( $startTime ); IPSTime::getTimestamp()<(time()+3600); IPSTime::add_minutes( 60 ) )
{
$labels[] = date( 'ga', IPSTime::getTimestamp() );
}
}
else
{
for ( IPSTime::setTimestamp( $startTime ); IPSTime::getTimestamp()<time(); IPSTime::add_days( 1 ) )
{
$labels[] = date( 'M j', IPSTime::getTimestamp() );
}
}
$graph->addLabels( $labels );
//-----------------------------------------
// Return
//-----------------------------------------
return $graph;
}
}
@@ -0,0 +1,217 @@
<?php
/**
* Invision Power Services
* IP.SEO - Dashboard
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
*
* @author $Author: bfarber $
* @copyright (c) 2010-2011 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.SEO
* @link http://www.invisionpower.com
* @version $Revision: 10721 $
*/
class admin_core_seo_advice extends ipsCommand
{
/**
* Main class entry point
*
* @access public
* @param object ipsRegistry reference
* @return void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Init
//-----------------------------------------
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'seo_advice' );
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_seo' ) );
$this->html = $this->registry->output->loadTemplate( 'cp_skin_seo' );
//-----------------------------------------
// What are we doing?
//-----------------------------------------
switch($this->request['do'])
{
case 'ignore':
$this->ignoreWarning();
break;
case 'clear_warnings':
$this->clearWarnings();
break;
case 'download_sitemap':
$this->downloadSitemap();
break;
default:
$this->dashboard();
break;
}
//-----------------------------------------
// Display
//-----------------------------------------
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Action: Download Sitemap
*/
public function downloadSitemap()
{
header( "Content-type: application/xml" );
header( "Content-Disposition: attachment; filename=\"sitemap.xml\"" );
exit;
}
/**
* Action: Show Dashboard
*/
public function dashboard()
{
$messages = array();
//-----------------------------------------
// Get Ignored Messages
//-----------------------------------------
$ignores = ips_CacheRegistry::instance()->getCache('ipseo_ignore_messages');
if(!$ignores) $ignores = array();
//-----------------------------------------
// Work out the setting group for SEO settings
//-----------------------------------------
$group = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_sys_settings_titles', 'where' => "conf_title_keyword='seo'" ) );
//-----------------------------------------
// Get meta tags for board index
//-----------------------------------------
$metaTags = $this->cache->getCache('meta_tags');
//-----------------------------------------
// Any messages?
//-----------------------------------------
/* Sitemap path not writable */
$this->settings['sitemap_path'] = $this->settings['sitemap_path'] ? $this->settings['sitemap_path'] : DOC_IPS_ROOT_PATH;
if ( !array_key_exists( 'sitemap_path', $ignores ) and ( !file_exists( $this->settings['sitemap_path'] . 'sitemap.xml' ) or !is_writable( $this->settings['sitemap_path'] . 'sitemap.xml' ) ) )
{
// Hang on, can we create one?
@file_put_contents( $this->settings['sitemap_path'] . 'sitemap.xml', '' );
@chmod( $this->settings['sitemap_path'] . 'sitemap.xml', 0777 );
if ( !file_exists( $this->settings['sitemap_path'] . 'sitemap.xml' ) or !is_writable( $this->settings['sitemap_path'] . 'sitemap.xml' ) )
{
$messages[] = array( 'level' => 'bad', 'fix' => 'app=core&module=seo&section=advice&do=download_sitemap', 'key' => 'sitemap_path' );
}
}
/* URL type not path info */
if(!array_key_exists('url_type', $ignores) && $this->settings['url_type'] != 'path_info')
{
$messages[] = array('level' => 'bad', 'fix' => "app=core&module=settings&section=settings&do=setting_view&conf_group={$group['conf_title_id']}", 'key' => 'url_type');
}
/* No board index title */
if(!array_key_exists('seo_index_title', $ignores) && !$this->settings['seo_index_title'] )
{
$messages[] = array('level' => 'bad', 'fix' => "app=core&module=settings&section=settings&do=setting_view&conf_group={$group['conf_title_id']}", 'key' => 'seo_index_title');
}
/* No board index description */
if( !array_key_exists('seo_index_md', $ignores) && !$this->settings['seo_index_md'] )
{
$messages[] = array('level' => 'bad', 'fix' => "app=core&module=settings&section=settings&do=setting_view&conf_group={$group['conf_title_id']}", 'key' => 'seo_index_md');
}
/* Not logging spider visits */
if(!array_key_exists('spider_visit', $ignores) && !$this->settings['spider_visit'] )
{
$messages[] = array('level' => 'bad', 'fix' => "app=core&module=settings&section=settings&do=setting_view&conf_group={$group['conf_title_id']}", 'key' => 'spider_visit');
}
/* No Meta Tags */
if( !array_key_exists('ipseo_no_meta', $ignores) && empty( $metaTags ) )
{
$messages[] = array('level' => 'warn', 'fix' => 'app=core&module=templates&section=meta', 'key' => 'ipseo_no_meta');
}
/* Sitemap ping disabled */
if(!array_key_exists('sitemap_ping', $ignores) && !$this->settings['sitemap_ping'])
{
$messages[] = array('level' => 'warn', 'fix' => 'app=core&module=settings&section=settings&&do=findsetting&key=sitemap', 'key' => 'sitemap_ping');
}
if(!array_key_exists('seo_r_on', $ignores) && !$this->settings['seo_r_on'])
{
$messages[] = array('level' => 'warn', 'fix' => "app=core&module=settings&section=settings&do=setting_view&conf_group={$group['conf_title_id']}", 'key' => 'seo_r_on');
}
if(!array_key_exists('htaccess_mod_rewrite', $ignores) && !$this->settings['htaccess_mod_rewrite'])
{
$messages[] = array('level' => 'warn', 'fix' => "app=core&module=settings&section=settings&do=setting_view&conf_group={$group['conf_title_id']}", 'key' => 'htaccess_mod_rewrite');
}
//-----------------------------------------
// Display
//-----------------------------------------
$this->registry->output->html = $this->html->dashboard( $messages, $ignores );
}
/**
* Action: Ignore Message
*/
public function ignoreWarning()
{
$ignores = ips_CacheRegistry::instance()->getCache('ipseo_ignore_messages');
if( !$ignores )
{
$ignores = array();
}
$ignores[ $this->request['key'] ] = 1;
ips_CacheRegistry::instance()->setCache( 'ipseo_ignore_messages', $ignores, array( 'array' => 1 ) );
$this->registry->output->silentRedirect( ipsRegistry::$settings['base_url'] . "module=seo" );
}
/**
* Action: Clear Warnings
*/
public function clearWarnings()
{
ips_CacheRegistry::instance()->setCache( 'ipseo_ignore_messages', array(), array( 'array' => 1 ) );
$this->registry->output->silentRedirect( ipsRegistry::$settings['base_url'] . "module=seo" );
}
/**
* Recache
*/
public function recache()
{
$current = ipsRegistry::instance()->cache()->getCache('ipseo_ignore_messages');
if(!is_array($current))
{
$current = array();
}
ipsRegistry::instance()->cache()->setCache( 'ipseo_ignore_messages', $current, array( 'array' => 1, 'donow' => 1 ) );
}
}
@@ -0,0 +1,5 @@
<?php
$DEFAULT_SECTION = 'advice';
//
@@ -0,0 +1,65 @@
<?php
/**
* Invision Power Services
* IP.SEO Upgrade Message
* Last Updated: $Date: 2012-05-10 21:10:13 +0100 (Thu, 10 May 2012) $
*
* @author $Author: bfarber $
* @copyright (c) 2010-2011 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package Core
* @link http://www.invisionpower.com
* @version $Revision: 10721 $
*/
class admin_core_seo_upgrade extends ipsCommand
{
/**
* Main class entry point
*
* @access public
* @param object ipsRegistry reference
* @return void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Init
//-----------------------------------------
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_seo' ) );
$this->html = $this->registry->output->loadTemplate( 'cp_skin_seo' );
//-----------------------------------------
// What are we doing?
//-----------------------------------------
switch($this->request['do'])
{
case 'ok':
$this->ok();
break;
default:
$this->splash();
break;
}
//-----------------------------------------
// Display
//-----------------------------------------
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Action: Splash
*/
public function splash()
{
$this->registry->output->html = $this->html->upgradeSplash();
}
}
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<tabitems>
<item>
<title>SEO-поддержка</title>
<subitems>
<subitem>
<subitemtitle>SEO-поддержка</subitemtitle>
<subitemlang>seo_advice</subitemlang>
<subsection>advice</subsection>
<subitemurl></subitemurl>
<subitemrolekey>seo_advice</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Активность Поисковых Машин</title>
<subitems>
<subitem>
<subitemtitle>Активность Поисковых Машин</subitemtitle>
<subitemlang>seo_dashboard</subitemlang>
<subsection>activity</subsection>
<subitemurl></subitemurl>
<subitemrolekey>seo_activity</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</tabitems>
</menu>
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>SEO</grouptitle>
<grouplang>core_seo</grouplang>
<items>
<item>
<key>seo_advice</key>
<string>Может просматривать SEO-поддержку?</string>
</item>
<item>
<key>seo_activity</key>
<string>Может просматривать SEO-активность?</string>
</item>
</items>
</group>
</permissions>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
File diff suppressed because it is too large. Load diff
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>System Settings</title>
<title>Системные Настройки</title>
<subitems>
<subitem>
<subitemtitle>System Settings</subitemtitle>
<subitemtitle>Системные Настройки</subitemtitle>
<subitemlang>settings</subitemlang>
<subsection>settings</subsection>
<subitemurl>do=settingsview</subitemurl>
@@ -1,24 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Manage Settings</grouptitle>
<grouptitle>Настройки системы</grouptitle>
<grouplang>core_settings</grouplang>
<items>
<item>
<key>settings_manage</key>
<string>Can edit/add settings and setting groups?</string>
<string>Может изменять/добавлять группы настроек?</string>
</item>
<item>
<key>settings_delete</key>
<string>Can delete settings and setting groups?</string>
</item>
<item>
<key>performance_toggle</key>
<string>Can toggle performance mode?</string>
</item>
<item>
<key>licensekey_manage</key>
<string>Can manage license key?</string>
<string>Может удалять группы настроек?</string>
</item>
</items>
</group>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -3,18 +3,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* mySQL Admin
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2013-01-23 21:10:55 -0500 (Wed, 23 Jan 2013) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 11891 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -188,14 +188,8 @@ class admin_core_sql_toolbox_module extends ipsCommand {
$this->registry->output->showError( $this->lang->words['my_cantdo'], 2114, true );
}
/**
* Rikki wants a stupid template so we can output his stupid header. Yes, this creates more work for me.
* This template serves no other purpose than to make Rikki happy. Must make Rikki happy. Rikki gets cranky when he's not happy.
*
* Ask him about roundabouts sometime. Apparently...they're round.
*/
$this->registry->output->html .= $this->html->sqlToolResultHeader();
$output = '';
/* Loop through each table and run the tool */
foreach( $tables as $table )
{
@@ -224,8 +218,25 @@ class admin_core_sql_toolbox_module extends ipsCommand {
}
/* Add to output */
$this->registry->output->html .= $this->html->sqlToolResult( $this->lang->words['resultprefix'] . $this->request['tool'] . " " . $table, $columns, $rows );
$output .= $this->html->sqlToolResult( $columns, $rows );
}
/**
* Rikki wants a stupid template so we can output his stupid header. Yes, this creates more work for me.
* This template serves no other purpose than to make Rikki happy. Must make Rikki happy. Rikki gets cranky when he's not happy.
*
* Ask him about roundabouts sometime. Apparently...they're round.
*/
$this->registry->output->html .= $this->html->sqlToolResultHeader( $columns );
$this->registry->output->html .= $output;
/**
* Rikki wanted a stupid header template so we could output his stupid header. This created more work for Brandon.
* This in turn meant I had to create a stupid footer to keep other people happy. Must make other people happy. I'm on a horse.
*/
$this->registry->output->html .= $this->html->sqlToolResultFooter();
}
/**
@@ -395,13 +406,22 @@ class admin_core_sql_toolbox_module extends ipsCommand {
if( strstr( $sql, ";" ) )
{
$the_queries = preg_split( "/;[\r\n|\n]+/", $sql, -1, PREG_SPLIT_NO_EMPTY );
$queries = preg_split( "/;[\r\n|\n]+/", $sql, -1, PREG_SPLIT_NO_EMPTY );
foreach( $queries as $query )
{
if( substr( $query, -1, 1 ) == ";" )
{
$query = substr( $query, 0, -1 );
}
$the_queries[]['sql'] = $query;
}
}
else
{
if( $sql )
{
$the_queries[] = $sql;
$the_queries[]['sql'] = $sql;
}
}
@@ -418,28 +438,25 @@ class admin_core_sql_toolbox_module extends ipsCommand {
else
{
/* Loop through the queries and run them */
foreach( $the_queries as $sql )
foreach( $the_queries as $key => $sql )
{
/* INIT */
$links = "";
$sql = trim( $sql );
$sql['sql'] = trim( $sql['sql'] );
if ( ! $tableName )
if ( preg_match( "#^SELECT(?:.*)\s+?FROM\s+?(\S+?)(;?)(?:\s|$)#i", $sql['sql'], $match ) )
{
if ( preg_match( "#^SELECT(?:.*)\s+?FROM\s+?(\S+?)(?:\s|$)#i", $sql, $match ) )
{
$tableName = $match[1];
}
$the_queries[$key]['tableName'] = $match[1];
}
/* Check the sql */
$test_sql = str_replace( "\'", "", $sql );
$test_sql = str_replace( "\'", "", $sql['sql'] );
$apos_count = substr_count( $test_sql, "'" );
if( $apos_count % 2 != 0 )
{
$columns[ $queryCntForArray ][] = $this->lang->words['manual_error'];
$rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_invalid'] . htmlspecialchars( $sql ) );
$rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_invalid'] . htmlspecialchars( $sql['sql'] ) );
unset( $apos_count, $test_sql );
continue;
@@ -448,14 +465,14 @@ class admin_core_sql_toolbox_module extends ipsCommand {
unset( $apos_count, $test_sql );
/* Check for drop and flush */
if ( preg_match( "/^(DROP|FLUSH)/i",$sql ) )
if ( preg_match( "/^(DROP|FLUSH)/i",$sql['sql'] ) )
{
$columns[ $queryCntForArray ][] = $this->lang->words['manual_error'];
$rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_notallowed'] );
continue;
}
/* Protect admin_login_logs */
else if ( preg_match( "/^(?!SELECT)/i", preg_replace( "#\s{1,}#s", "", $sql ) ) and preg_match( "/admin_login_logs/i", preg_replace( "#\s{1,}#s", "", $sql ) ) )
else if ( preg_match( "/^(?!SELECT)/i", preg_replace( "#\s{1,}#s", "", $sql['sql'] ) ) and ( preg_match( "/admin_login_logs/i", preg_replace( "#\s{1,}#s", "", $sql['sql'] ) ) || preg_match( "/admin_permission_rows/i", preg_replace( "#\s{1,}#s", "", $sql['sql'] ) ) ) )
{
$columns[ $queryCntForArray ][] = $this->lang->words['manual_error'];
$rows[ $queryCntForArray ][] = array( 'error' => $this->lang->words['manual_loginlogs'] );
@@ -467,7 +484,7 @@ class admin_core_sql_toolbox_module extends ipsCommand {
$this->DB->allow_sub_select = 1;
/* Run the query */
$this->DB->query( $sql, 1 );
$this->DB->query( $sql['sql'], 1 );
/* Check for errors... */
if ( $this->DB->error != "")
@@ -481,10 +498,10 @@ class admin_core_sql_toolbox_module extends ipsCommand {
$rows[ $queryCntForArray ] = array();
$columns[ $queryCntForArray ] = array();
if ( preg_match( "/^SELECT/i", $sql ) or preg_match( "/^SHOW/i", $sql ) or preg_match( "/^EXPLAIN/i", $sql ) )
if ( preg_match( "/^SELECT/i", $sql['sql'] ) or preg_match( "/^SHOW/i", $sql['sql'] ) or preg_match( "/^EXPLAIN/i", $sql['sql'] ) )
{
/* Sort out the pages and stuff, auto limit if need be */
if ( ( ! preg_match( "/^EXPLAIN/i", $sql ) && ! preg_match( "/^SHOW/i", $sql ) ) AND ! preg_match( "/LIMIT[ 0-9,]+$/i", $sql ) )
if ( ( ! preg_match( "/^EXPLAIN/i", $sql['sql'] ) && ! preg_match( "/^SHOW/i", $sql['sql'] ) ) AND ! preg_match( "/LIMIT[ 0-9,]+$/i", $sql['sql'] ) )
{
/* Start value */
$start = $this->request['st'] ? intval( $this->request['st'] ) : 0;
@@ -499,19 +516,19 @@ class admin_core_sql_toolbox_module extends ipsCommand {
'totalItems' => $rows_returned,
'itemsPerPage' => $limit,
'currentStartValue' => $start,
'baseUrl' => "{$this->settings['base_url']}{$this->form_code}&do=runsql&query=" . urlencode( $sql ),
'baseUrl' => "{$this->settings['base_url']}{$this->form_code}&do=runsql&query=" . urlencode( $sql['sql'] ),
) );
/* Reformat the query with a LIMIT */
if( substr( $sql, -1, 1 ) == ";" )
if( substr( $sql['sql'], -1, 1 ) == ";" )
{
$sql = substr( $sql, 0, -1 );
$sql['sql'] = substr( $sql['sql'], 0, -1 );
}
$sql .= " LIMIT $start, $limit";
$sql['sql'] .= " LIMIT $start, $limit";
/* Re-run with limit */
$this->DB->query( $sql, 1 );
$this->DB->query( $sql['sql'], 1 );
}
}
@@ -534,7 +551,7 @@ class admin_core_sql_toolbox_module extends ipsCommand {
{
if( $man_query == 1 )
{
if( IPSText::mbstrlen( $r[ $fields[$i]->name ] ) > 200 AND ! preg_match( "/^SHOW/i", $sql ) )
if( IPSText::mbstrlen( $r[ $fields[$i]->name ] ) > 200 AND ! preg_match( "/^SHOW/i", $sql['sql'] ) )
{
if ( ! $this->request['notruncate'] )
{
@@ -571,13 +588,13 @@ class admin_core_sql_toolbox_module extends ipsCommand {
}
}
if ( $tableName )
if ( count($the_queries) == 1 && $the_queries[0]['tableName'] )
{
$this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&amp;do=runsql&query=" . urlencode( "SELECT * FROM $tableName" ), $tableName );
$this->registry->output->extra_nav[] = array( "{$this->settings['base_url']}{$this->form_code}&amp;do=runsql&query=" . urlencode( "SELECT * FROM {$the_queries[0]['tableName']}" ), $the_queries[0]['tableName'] );
}
/* Output */
$this->registry->output->html .= $this->html->sqlViewResults( $the_queries, $columns, $rows, $links, $tableName, $truncated );
$this->registry->output->html .= $this->html->sqlViewResults( $the_queries, $columns, $rows, $links, $truncated );
}
/**
@@ -667,17 +684,11 @@ class admin_core_sql_toolbox_module extends ipsCommand {
if( $create_tbl )
{
/* Generate table structure */
if( $this->request['addticks'] )
{
$this->DB->query( "SHOW CREATE TABLE `{$this->settings['sql_database']}.{$tbl}`" );
}
else
{
$this->DB->query( "SHOW CREATE TABLE {$this->settings['sql_database']}.{$tbl}" );
}
$this->DB->query( "SHOW CREATE TABLE {$this->settings['sql_database']}.{$tbl}" );
$ctable = $this->DB->fetch();
echo $this->sqlStripTicks( $ctable['Create Table'] ).";\n";
}
@@ -2,9 +2,9 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* SQL Admin
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-05-10 16:10:13 -0400 (Thu, 10 May 2012) $
* </pre>
*
* @author $Author: bfarber $
@@ -13,7 +13,7 @@
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @version $Rev: 10721 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>SQL Toolbox</title>
<title>Инструменты SQL</title>
<subitems>
<subitem>
<subitemtitle>SQL Toolbox</subitemtitle>
<subitemtitle>Инструменты SQL</subitemtitle>
<subitemlang>sql_toolbox</subitemlang>
<subsection>toolbox</subsection>
<subitemurl>do=overview</subitemurl>
@@ -15,10 +15,10 @@
</subitems>
</item>
<item>
<title>SQL Back Up</title>
<title>Резервное Копирование SQL</title>
<subitems>
<subitem>
<subitemtitle>SQL Back Up</subitemtitle>
<subitemtitle>Резервное Копирование SQL</subitemtitle>
<subitemlang>sql_backup</subitemlang>
<subsection>toolbox</subsection>
<subitemurl>do=backup</subitemurl>
@@ -28,10 +28,10 @@
</subitems>
</item>
<item>
<title>SQL Runtime Info</title>
<title>Состояние SQL-сервера</title>
<subitems>
<subitem>
<subitemtitle>SQL Runtime Info</subitemtitle>
<subitemtitle>Состояние SQL-сервера</subitemtitle>
<subitemlang>sql_ri</subitemlang>
<subsection>toolbox</subsection>
<subitemurl>do=runtime</subitemurl>
@@ -54,10 +54,10 @@
</subitems>
</item>
<item>
<title>SQL Processes</title>
<title>SQL-процессы</title>
<subitems>
<subitem>
<subitemtitle>SQL Processes</subitemtitle>
<subitemtitle>SQL-процессы</subitemtitle>
<subitemlang>sql_processes</subitemlang>
<subsection>toolbox</subsection>
<subitemurl>do=processes</subitemurl>
@@ -7,7 +7,7 @@
* $Author: bfarber $
* @since -
* $LastChangedDate: 2011-11-23 14:13:15 -0500 (Wed, 23 Nov 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 9873 $
*/
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* IP.Board v3.4.5
* Security center tools
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* Last Updated: $Date: 2012-11-29 16:02:25 -0500 (Thu, 29 Nov 2012) $
* </pre>
*
* @author $Author: bfarber $
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @since 2.2 IIRC
* @version $Revision: 10914 $
* @version $Revision: 11663 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -298,13 +298,65 @@ class admin_core_system_security extends ipsCommand
$content = array( 'bad' => '', 'good' => '', 'ok' => '' );
$cache_array = $this->cache->getCache('systemvars');
/* Disabled functions */
$functionsToDisable = array( 'exec', 'system', 'passhtru', 'pcntl_exec', 'popen', 'proc_open', 'shell_exec' );
$showingFunctionWarning = FALSE;
foreach ( $functionsToDisable as $k => $function )
{
if ( function_exists( $function ) )
{
$showingFunctionWarning = TRUE;
}
else
{
unset( $functionsToDisable[ $k ] );
}
}
if ( $showingFunctionWarning )
{
$content['bad'] .= $this->html->security_item_bad( $this->lang->words['s_functions'],
sprintf( $this->lang->words['s_functions_bad'], implode( ', ', $functionsToDisable ) ),
$this->lang->words['s_learnmore'],
'http://external.ipslink.com/ipboard30/landing/?p=security',
'functions' );
}
else
{
$content['good'] .= $this->html->security_item_good($this->lang->words['s_functions'],
$this->lang->words['s_functions_good'],
$this->lang->words['s_learnmore'],
'http://external.ipslink.com/ipboard30/landing/?p=security',
'functions' );
}
/* open_basedir */
$dir = @dir( '/' );
if ( $dir instanceof Directory )
{
$content['bad'] .= $this->html->security_item_bad( $this->lang->words['s_open_basedir'],
$this->lang->words['s_open_basedir_bad'],
$this->lang->words['s_learnmore'],
'http://external.ipslink.com/ipboard30/landing/?p=security',
'open_basedir' );
}
else
{
$value = @ini_get( 'open_basedir' );
$content['good'] .= $this->html->security_item_good( $this->lang->words['s_open_basedir'],
$value ? sprintf( $this->lang->words['s_open_basedir_good'], $value ) : $this->lang->words['s_open_basedir_good_noval'],
$this->lang->words['s_learnmore'],
'http://external.ipslink.com/ipboard30/landing/?p=security',
'open_basedir' );
}
/* Virus checker link */
if ( intval($cache_array['last_virus_check']) < time() - 7 * 86400 )
{
$content['bad'] .= $this->html->security_item_bad( $this->lang->words['s_virus'],
$this->lang->words['s_virus_bad'],
$this->lang->words['s_runtool'],
$this->form_code_js.'&code=virus_check',
$this->settings['base_url'] . $this->form_code_js . '&code=virus_check',
'vchecker' );
}
@@ -314,7 +366,7 @@ class admin_core_system_security extends ipsCommand
$content['good'] .= $this->html->security_item_good( $this->lang->words['s_virus'],
$this->lang->words['s_virus_good'].$last_run,
$this->lang->words['s_runtool'],
$this->form_code_js.'&code=virus_check',
$this->settings['base_url'] . $this->form_code_js . '&code=virus_check',
'vchecker' );
}
@@ -324,7 +376,7 @@ class admin_core_system_security extends ipsCommand
$content['bad'] .= $this->html->security_item_bad( $this->lang->words['s_deep'],
$this->lang->words['s_deep_bad'],
$this->lang->words['s_runtool'],
$this->form_code_js.'&do=deep_scan',
$this->settings['base_url'] . $this->form_code_js . '&do=deep_scan',
'deepscan' );
}
@@ -334,7 +386,7 @@ class admin_core_system_security extends ipsCommand
$content['good'] .= $this->html->security_item_good( $this->lang->words['s_deep'],
$this->lang->words['s_deep_good'] . $last_run,
$this->lang->words['s_runtool'],
$this->form_code_js.'&do=deep_scan',
$this->settings['base_url'] . $this->form_code_js . '&do=deep_scan',
'deepscan' );
}
@@ -346,7 +398,7 @@ class admin_core_system_security extends ipsCommand
$content['ok'] .= $this->html->security_item_ok( $this->lang->words['s_htaccess'],
sprintf( $this->lang->words['s_htaccess_bad'], CP_DIRECTORY ),
$this->lang->words['s_learnmore'],
$this->form_code_js.'&do=acphtaccess',
$this->settings['base_url'] . $this->form_code_js . '&do=acphtaccess',
'acphtaccess' );
}
else
@@ -354,7 +406,7 @@ class admin_core_system_security extends ipsCommand
$content['good'] .= $this->html->security_item_good( $this->lang->words['s_htaccess'],
sprintf( $this->lang->words['s_htaccess_good'], CP_DIRECTORY ),
$this->lang->words['s_learnmore'],
$this->form_code_js.'&do=acphtaccess',
$this->settings['base_url'] . $this->form_code_js . '&do=acphtaccess',
'acphtaccess' );
}
@@ -364,7 +416,7 @@ class admin_core_system_security extends ipsCommand
$content['ok'] .= $this->html->security_item_ok( $this->lang->words['s_phpcgi'],
$this->lang->words['s_phpcgi_bad'],
$this->lang->words['s_runtool'],
$this->form_code_js.'&do=htaccess',
$this->settings['base_url'] . $this->form_code_js . '&do=htaccess',
'htaccess' );
}
else
@@ -372,7 +424,7 @@ class admin_core_system_security extends ipsCommand
$content['good'] .= $this->html->security_item_good( $this->lang->words['s_phpcgi'],
$this->lang->words['s_phpcgi_good'],
$this->lang->words['s_runtool'],
$this->form_code_js.'&do=htaccess',
$this->settings['base_url'] . $this->form_code_js . '&do=htaccess',
'htaccess' );
}
@@ -382,7 +434,7 @@ class admin_core_system_security extends ipsCommand
$content['bad'] .= $this->html->security_item_bad( $this->lang->words['s_conf'],
$this->lang->words['s_conf_bad'],
$this->lang->words['s_runtool'],
$this->form_code_js.'&do=confglobal',
$this->settings['base_url'] . $this->form_code_js . '&do=confglobal',
'confglobal' );
}
@@ -391,7 +443,7 @@ class admin_core_system_security extends ipsCommand
$content['good'] .= $this->html->security_item_good( $this->lang->words['s_conf'],
$this->lang->words['s_conf_good'],
$this->lang->words['s_learnmore'],
$this->form_code_js.'&do=confglobal',
$this->settings['base_url'] . $this->form_code_js . '&do=confglobal',
'confglobal' );
}
}
@@ -402,7 +454,7 @@ class admin_core_system_security extends ipsCommand
$content['ok'] .= $this->html->security_item_ok( $this->lang->words['s_rename'],
$this->lang->words['s_rename_bad'],
$this->lang->words['s_learnmore'],
$this->form_code_js.'&do=acprename',
$this->settings['base_url'] . $this->form_code_js . '&do=acprename',
'acprename' );
}
@@ -411,7 +463,7 @@ class admin_core_system_security extends ipsCommand
$content['good'] .= $this->html->security_item_good( $this->lang->words['s_rename'],
$this->lang->words['s_rename_good'],
$this->lang->words['s_learnmore'],
$this->form_code_js.'&do=acprename',
$this->settings['base_url'] . $this->form_code_js . '&do=acprename',
'acprename' );
}
@@ -4,10 +4,10 @@
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
* $Author: ips_terabyte $
* $LastChangedDate: 2012-03-26 12:16:52 -0400 (Mon, 26 Mar 2012) $
* @version v3.4.5
* $Revision: 10490 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>System Scheduler</title>
<title>Планировщик Задач</title>
<subitems>
<subitem>
<subitemtitle>System Scheduler</subitemtitle>
<subitemtitle>Планировщик Задач</subitemtitle>
<subitemlang>taskmanager</subitemlang>
<subsection>taskmanager</subsection>
<subitemurl>do=overview</subitemurl>
@@ -15,10 +15,10 @@
</subitems>
</item>
<item>
<title>Security Center</title>
<title>Центр Безопасности</title>
<subitems>
<subitem>
<subitemtitle>Security Center</subitemtitle>
<subitemtitle>Центр Безопасности</subitemtitle>
<subitemlang>security</subitemlang>
<subsection>security</subsection>
<subitemurl></subitemurl>
@@ -28,10 +28,10 @@
</subitems>
</item>
<item>
<title>List Admins</title>
<title>Список Администраторов</title>
<subitems>
<subitem>
<subitemtitle>List Admins</subitemtitle>
<subitemtitle>Список Администраторов</subitemtitle>
<subitemlang>listadmins</subitemlang>
<subsection>security</subsection>
<subitemurl>do=list_admins</subitemurl>
@@ -1,70 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Security Center</grouptitle>
<grouptitle>Центр безопасности</grouptitle>
<grouplang>core_security</grouplang>
<items>
<item>
<key>security_center</key>
<string>Can view the Security Center?</string>
<string>Может просматривать центр безопасности?</string>
</item>
<item>
<key>acplink_remove</key>
<string>Remove the ACP Link?</string>
<string>Может удалить ссылку на АЦ?</string>
</item>
<item>
<key>deepscan</key>
<string>Perform a deepscan for suspicious files?</string>
<string>Может запустить глубокое сканирование на подозрительные файлы?</string>
</item>
<item>
<key>virus_checker</key>
<string>Run the virus-checker scanner?</string>
<string>Может запустить обычное сканирование на подозрительные файлы?</string>
</item>
<item>
<key>list_admins</key>
<string>List members with administrative access?</string>
<string>Может просматривать список пользователей, имеющих доступ в АЦ?</string>
</item>
<item>
<key>htaccess_protection</key>
<string>Create a .htaccess to protect writable directories?</string>
<string>Может создать .htaccess для защиты директорий?</string>
</item>
<item>
<key>nowrite_conf_global</key>
<string>Make conf_global.php not writable?</string>
<string>Может сделать conf_global.php незаписываемым?</string>
</item>
<item>
<key>acp_rename</key>
<string>Rename the ACP directory?</string>
<string>Может переименовать директорию АЦ?</string>
</item>
<item>
<key>acp_htaccess</key>
<string>Create a .htaccess to protect the ACP?</string>
<string>Может создать .htaccess для защиты АЦ?</string>
</item>
</items>
</group>
<group>
<grouptitle>Manage Scheduled Tasks</grouptitle>
<grouptitle>Управление задачами планировщика</grouptitle>
<grouplang>core_tasks</grouplang>
<items>
<item>
<key>task_manage</key>
<string>Can manage scheduled tasks?</string>
<string>Может добавлять/изменять задачи?</string>
</item>
<item>
<key>task_remove</key>
<string>Can remove scheduled tasks?</string>
<string>Может удалять задачи?</string>
</item>
<item>
<key>task_run_lock</key>
<string>Can unlock and/or run scheduled tasks manually?</string>
<string>Может блокировать выполнение задач или запускать задачи вручную?</string>
</item>
<item>
<key>tasklogs_view</key>
<string>Can view task logs?</string>
<string>Может просматривать журнал задач?</string>
</item>
<item>
<key>tasklogs_delete</key>
<string>Can remove task logs?</string>
<string>Может удалять записи из журнала?</string>
</item>
</items>
</group>
@@ -7,7 +7,7 @@
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.3.4
* @version v3.4.5
* $Revision: 8655 $
*/
Loaded 100 of 1360 files, more files were not shown because too many files have changed in this diff. Show more