Version 3.3.4

This commit is contained in:
Neo committed 2025-12-19 00:35:52 -08:00
1 parent 78706903a2
commit fb6b5baabc
2206 files changed
+409828 -382984

No files matched your search

Binary file not shown.
+2 -2
View File
@@ -3,11 +3,11 @@
* @file api_core.php Core functions for the API classes
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* @since -
* $LastChangedDate: 2011-03-18 17:34:15 -0400 (Fri, 18 Mar 2011) $
* @version v3.2.3
* @version v3.3.4
* $Revision: 8129 $
*/
+6 -6
View File
@@ -3,12 +3,12 @@
* @file api_topic_view.php Forums topic view API
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $Author: ips_terabyte $
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 2.2.0
* $LastChangedDate: 2011-03-18 17:34:15 -0400 (Fri, 18 Mar 2011) $
* @version v3.2.3
* $Revision: 8129 $
* $LastChangedDate: 2011-12-20 11:14:05 -0500 (Tue, 20 Dec 2011) $
* @version v3.3.4
* $Revision: 10035 $
*/
if ( ! class_exists( 'apiCore' ) )
@@ -87,7 +87,7 @@ class apiTopicView extends apiCore
$this->topic_list_config['order_field'] = ( $this->topic_list_config['order_field'] == 'started' ) ? 'start_date' : $this->topic_list_config['order_field'];
$this->topic_list_config['order_field'] = ( $this->topic_list_config['order_field'] == 'lastpost' ) ? 'last_post' : $this->topic_list_config['order_field'];
$this->topic_list_config['forums'] = ( is_array( $this->topic_list_config['forums'] ) ) ? implode( ",", $this->topic_list_config['forums'] ) : $this->topic_list_config['forums'];
//-----------------------------------------
// Fix up allowed forums
//-----------------------------------------
+9 -9
View File
@@ -1,10 +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>
<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>
+9 -9
View File
@@ -1,10 +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>
<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>
@@ -3,11 +3,11 @@
* @file group_form.php Core group editing form
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* @since -
* $LastChangedDate: 2011-07-20 20:19:22 -0400 (Wed, 20 Jul 2011) $
* @version v3.2.3
* @version v3.3.4
* $Revision: 9296 $
*/
@@ -1,10 +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>
<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>
@@ -1,95 +1,95 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Member property updater (AJAX)
* Last Updated: $Date: 2010-12-17 07:40:13 -0500 (Fri, 17 Dec 2010) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 1st march 2002
* @version $Revision: 7442 $
*
*/
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_member_form__core implements admin_member_form
{
/**
* Tab name
* This can be left blank and the application title will
* be used
*
* @var string
*/
public $tab_name = "";
/**
* Returns sidebar links for this tab
* You may return an empty array or FALSE to not have
* any links show in the sidebar for this block.
*
* The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL
* is added automatically.
*
* The image must be a full URL or blank to use a default image.
*
* Use the format:
* $array[] = array( 'img' => '', 'url' => '', 'title' => '' );
*
* @author Matt Mecham
* @param array Member data
* @return array Array of links
*/
public function getSidebarLinks( $member=array() )
{
$array = array();
if( $member['failed_login_count'] )
{
$array[] = array( 'img' => '',
'url' => "app=members&amp;module=members&amp;section=tools&amp;do=do_locked&amp;auth_key=".ipsRegistry::member()->form_hash."&amp;mid_{$member['member_id']}=1&amp;type=unlock",
'title' => ipsRegistry::getClass('class_localization')->words['reset_failed_logins'] );
}
return $array;
}
/**
* Returns content for the page.
*
* @author Matt Mecham
* @param array Member data
* @return array Array of tabs, content
*/
public function getDisplayContent( $member=array(), $tabsUsed=5 )
{
return array( 'tabs' => '', 'content' => '', 'tabsUsed' => 0 );
}
/**
* Process the entries for saving and return
*
* @author Brandon Farber
* @return array Multi-dimensional array (core, extendedProfile) for saving
*/
public function getForSave()
{
return array( 'core' => array(), 'extendedProfile' => array() );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Member property updater (AJAX)
* 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 1st march 2002
* @version $Revision: 10914 $
*
*/
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_member_form__core implements admin_member_form
{
/**
* Tab name
* This can be left blank and the application title will
* be used
*
* @var string
*/
public $tab_name = "";
/**
* Returns sidebar links for this tab
* You may return an empty array or FALSE to not have
* any links show in the sidebar for this block.
*
* The links must have 'section=xxxxx&module=xxxxx[&do=xxxxxx]'. The rest of the URL
* is added automatically.
*
* The image must be a full URL or blank to use a default image.
*
* Use the format:
* $array[] = array( 'img' => '', 'url' => '', 'title' => '' );
*
* @author Matt Mecham
* @param array Member data
* @return array Array of links
*/
public function getSidebarLinks( $member=array() )
{
$array = array();
if( $member['failed_login_count'] )
{
$array[] = array( 'img' => '',
'url' => "app=members&amp;module=members&amp;section=tools&amp;do=do_locked&amp;auth_key=".ipsRegistry::member()->form_hash."&amp;mid_{$member['member_id']}=1&amp;type=unlock",
'title' => ipsRegistry::getClass('class_localization')->words['reset_failed_logins'] );
}
return $array;
}
/**
* Returns content for the page.
*
* @author Matt Mecham
* @param array Member data
* @return array Array of tabs, content
*/
public function getDisplayContent( $member=array(), $tabsUsed=5 )
{
return array( 'tabs' => '', 'content' => '', 'tabsUsed' => 0 );
}
/**
* Process the entries for saving and return
*
* @author Brandon Farber
* @return array Multi-dimensional array (core, extendedProfile) for saving
*/
public function getForSave()
{
return array( 'core' => array(), 'extendedProfile' => array() );
}
}
@@ -1,10 +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>
<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>
@@ -1,340 +1,319 @@
<?php
/**
* Report center comments class
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Downloads
* @link http://hatynka.in
* @version $Rev: 9229 $
*/
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 comments_core_reports extends classes_comments_renderer
{
/**
* Internal remap array
*
* @param array
*/
protected $_remap = array( 'comment_id' => 'id',
'comment_author_id' => 'comment_by',
'comment_author_name' => 'author_name',
'comment_text' => 'comment',
'comment_ip_address' => 'ip_address',
'comment_edit_date' => 'edit_date',
'comment_date' => 'comment_date',
'comment_approved' => 'approved',
'comment_parent_id' => 'rid' );
/**
* Internal parent remap array
*
* @param array
*/
protected $_parentRemap = array( 'parent_id' => 'id',
'parent_owner_id' => 'updated_by',
'parent_parent_id' => 'uid',
'parent_title' => 'title',
'parent_seo_title' => 'seoname',
'parent_date' => 'date_created' );
/**
* Parent SEO template
*
* @return string
*/
public function seoTemplate()
{
return '';
}
/**
* Who am I?
*
* @return string
*/
public function whoAmI()
{
return 'core-reports';
}
/**
* Comment table
*
* @return string
*/
public function table()
{
return 'rc_comments';
}
/**
* Enable reputation?
*
* @return string
*/
public function reputationEnabled()
{
return false;
}
/**
* Fetch parent
*
* @return array
*/
public function fetchParent( $id )
{
static $cachedReports = array();
if( !isset($cachedReports[ $id ]) )
{
$cachedReports[ $id ] = $this->DB->buildAndFetch( array(
'select' => 'i.*',
'from' => array( 'rc_reports_index' => 'i' ),
'where' => "i.id=" . intval($id),
'add_join' => array(
array(
'select' => 'c.*',
'from' => array( 'rc_classes' => 'c' ),
'where' => 'c.com_id=i.rc_class',
'type' => 'left',
)
)
) );
}
return $cachedReports[ $id ];
}
/**
* Fetch settings
*
* @return array
*/
public function settings()
{
return array( 'urls-showParent' => "app=core&amp;module=reports&amp;do=show_report&amp;rid=%s",
'urls-report' => '' );
}
/**
* Number of items per page
*
* @return int
*/
public function perPage()
{
return 100;
}
/**
* Pre save
* Accepts an array of GENERIC data and allows manipulation before it's added to DB
*
* @param string Type of save (edit/add)
* @param array Array of GENERIC data (comment_xxxx)
* @param int Comment id (if available)
* @param int Parent id
* @return array Array of GENERIC data
*/
public function preSave( $type, array $array, $commentId=0, $parentId=0 )
{
return $array;
}
/**
* Post save
* Accepts an array of GENERIC data and allows manipulation after it's added to DB
*
* @param string Type of action (edit/add)
* @param array Array of GENERIC data (comment_xxxx)
* @param int Comment id (if available)
* @param int Parent id
* @return array Array of GENERIC data
*/
public function postSave( $type, array $array, $commentId=0, $parentId=0 )
{
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
$this->DB->update( 'rc_reports_index', array( 'num_comments' => $_cnt['total'], 'date_updated' => time(), 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
//$this->DB->setDataType( 'num_comments', 'int' );
//$this->DB->update( 'rc_reports_index', array( 'num_comments' => 'plus:1', 'date_updated' => time(), 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
//-----------------------------------------
// Notify other moderators
//-----------------------------------------
$report = $this->fetchParent( $parentId );
$this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) );
$this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php', 'reportLibrary' );
$this->registry->setClass( 'reportLibrary', new $classToLoad( $this->registry ) );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' );
$notify = new $classToLoad( $this->registry );
$this->registry->getClass('reportLibrary')->loadPlugin( $report['my_class'], $report['app'] );
if( is_object($this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]) )
{
if( $report['extra_data'] && $report['extra_data'] != 'N;' )
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = unserialize( $report['extra_data'] );
}
else
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = array();
}
$report_data = $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->formatReportData( $report );
$notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->getNotificationList( IPSText::cleanPermString( $report['mod_group_perm'] ), $report_data ), $report_data );
$notify->sendReplyNotifications( $array['comment_text'] );
}
return $array;
}
/**
* Post delete. Can do stuff and that
*
* @param array Array of comment IDs to be deleted
* @param int Parent ID
* @return void
*/
public function postDelete( $commentIds, $parentId )
{
/* Determine most recent comment or report... */
$_comment = $this->DB->buildAndFetch( array( 'select' => 'comment_by, comment_date', 'from' => 'rc_comments', 'where' => 'approved=1 AND rid=' . $parentId, 'order' => 'comment_date DESC', 'limit' => array( 1 ) ) );
$_report = $this->DB->buildAndFetch( array( 'select' => 'report_by, date_reported', 'from' => 'rc_reports', 'where' => 'rid=' . $parentId, 'order' => 'date_reported DESC', 'limit' => array( 1 ) ) );
$_date_updated = 0;
$_updated_by = 0;
if( $_comment['comment_date'] )
{
$_date_updated = $_comment['comment_date'];
$_updated_by = $_comment['comment_by'];
}
if( $_report['date_reported'] > $_date_updated )
{
$_date_updated = $_report['date_reported'];
$_updated_by = $_report['report_by'];
}
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
$this->DB->update( 'rc_reports_index', array( 'num_comments' => $_cnt['total'], 'date_updated' => $_date_updated, 'updated_by' => $_updated_by ), "id=" . $parentId );
//$this->DB->setDataType( 'num_comments', 'int' );
//$this->DB->update( 'rc_reports_index', array( 'num_comments' => 'minus:' . count($commentIds) ), "id=" . $parentId );
}
/**
* Toggles visibility
*
* @param string on/off
* @param array Array of comment IDs to be deleted
* @param int Parent ID
* @return void
*/
public function postVisibility( $toggle, $commentIds, $parentId )
{
}
/**
* Fetch a total count of comments we can see
*
* @param mixed parent Id or parent array
* @return int
*/
public function count( $parent )
{
/* Get parent */
if ( is_numeric( $parent ) )
{
$parent = $this->fetchParent( $parent );
}
return intval($parent['num_comments']);
}
/**
* Perform a permission check
*
* @param string Type of check (add/edit/delete/editall/deleteall/approve all)
* @param array Array of GENERIC data
* @return true or string to be used in exception
*/
public function can( $type, array $array )
{
/* Init */
$comment = array();
/* Got data? */
if ( empty( $array['comment_parent_id'] ) )
{
trigger_error( "No parent ID passed to " . __FILE__, E_USER_WARNING );
}
/* Get the file */
$event = $this->fetchParent( $array['comment_parent_id'] );
/* Fetch comment */
if ( $array['comment_id'] )
{
$comment = $this->fetchById( $array['comment_id'] );
}
/* Check permissions */
switch( $type )
{
case 'view':
return true;
break;
case 'edit':
if( $this->memberData['g_is_supmod'] OR $this->memberData['member_id'] != $comment['comment_mid'] )
{
return true;
}
return 'NO_PERMISSION';
break;
case 'add':
return true;
break;
case 'delete':
return $this->memberData['g_is_supmod'] ? true : 'NO_PERMISSION';
break;
case 'visibility':
case 'moderate':
return 'NO_PERMISSION';
break;
}
}
/**
* Returns remap keys (generic => local)
*
* @return array
*/
public function remapKeys( $type='comment' )
{
return ( $type == 'comment' ) ? $this->_remap : $this->_parentRemap;
}
<?php
/**
* Report center comments class
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Downloads
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
*/
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 comments_core_reports extends classes_comments_renderer
{
/**
* Internal remap array
*
* @param array
*/
protected $_remap = array( 'comment_id' => 'id',
'comment_author_id' => 'comment_by',
'comment_author_name' => 'author_name',
'comment_text' => 'comment',
'comment_ip_address' => 'ip_address',
'comment_edit_date' => 'edit_date',
'comment_date' => 'comment_date',
'comment_approved' => 'approved',
'comment_parent_id' => 'rid' );
/**
* Internal parent remap array
*
* @param array
*/
protected $_parentRemap = array( 'parent_id' => 'id',
'parent_owner_id' => 'updated_by',
'parent_parent_id' => 'uid',
'parent_title' => 'title',
'parent_seo_title' => 'seoname',
'parent_date' => 'date_created' );
/**
* Who am I?
*
* @return string
*/
public function whoAmI()
{
return 'core-reports';
}
/**
* Comment table
*
* @return string
*/
public function table()
{
return 'rc_comments';
}
/**
* Enable reputation?
*
* @return string
*/
public function reputationEnabled()
{
return false;
}
/**
* Fetch parent
*
* @return array
*/
public function fetchParent( $id )
{
static $cachedReports = array();
if( !isset($cachedReports[ $id ]) )
{
$cachedReports[ $id ] = $this->DB->buildAndFetch( array(
'select' => 'i.*',
'from' => array( 'rc_reports_index' => 'i' ),
'where' => "i.id=" . intval($id),
'add_join' => array(
array(
'select' => 'c.*',
'from' => array( 'rc_classes' => 'c' ),
'where' => 'c.com_id=i.rc_class',
'type' => 'left',
)
)
) );
}
return $cachedReports[ $id ];
}
/**
* Fetch settings
*
* @return array
*/
public function settings()
{
return array( 'urls-showParent' => "app=core&amp;module=reports&amp;do=show_report&amp;rid=%s",
'urls-report' => '' );
}
/**
* Number of items per page
*
* @return int
*/
public function perPage()
{
return 100;
}
/**
* Pre save
* Accepts an array of GENERIC data and allows manipulation before it's added to DB
*
* @param string $type Type of save (edit/add)
* @param array $array Array of GENERIC data (comment_xxxx)
* @param integer $commentId Comment ID (only for edits)
* @param integer $parentId Parent content ID
* @return @e array Array of GENERIC data
*/
public function preSave( $type, array $array, $commentId=0, $parentId=0 )
{
/**
* Always approve comments in report center
*
* @link http://community.invisionpower.com/tracker/issue-36632-report-comments-cant-be-approved/
*/
$array['comment_approved'] = 1;
return $array;
}
/**
* Post save
* Accepts an array of GENERIC data and allows manipulation after it's added to DB
*
* @param string Type of action (edit/add)
* @param array Array of GENERIC data (comment_xxxx)
* @param int Comment id (if available)
* @param int Parent id
* @return array Array of GENERIC data
*/
public function postSave( $type, array $array, $commentId=0, $parentId=0 )
{
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => IPS_UNIX_TIME_NOW, 'updated_by' => $array['comment_author_id'] ), "id=" . $parentId );
//-----------------------------------------
// Notify other moderators
//-----------------------------------------
$report = $this->fetchParent( $parentId );
$this->registry->class_localization->loadLanguageFile( array( 'public_reports' ) );
$this->DB->loadCacheFile( IPSLib::getAppDir('core') . '/sql/' . ips_DBRegistry::getDriverType() . '_report_queries.php', 'report_sql_queries' );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') .'/sources/classes/reportLibrary.php', 'reportLibrary' );
$this->registry->setClass( 'reportLibrary', new $classToLoad( $this->registry ) );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/reportNotifications.php', 'reportNotifications' );
$notify = new $classToLoad( $this->registry );
$this->registry->getClass('reportLibrary')->loadPlugin( $report['my_class'], $report['app'] );
if( is_object($this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]) )
{
if( $report['extra_data'] && $report['extra_data'] != 'N;' )
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = unserialize( $report['extra_data'] );
}
else
{
$this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->_extra = array();
}
$report_data = $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->formatReportData( $report );
$notify->initNotify( $this->registry->getClass('reportLibrary')->plugins[ $report['my_class'] ]->getNotificationList( IPSText::cleanPermString( $report['mod_group_perm'] ), $report_data ), $report_data );
$notify->sendReplyNotifications( $array['comment_text'] );
}
return $array;
}
/**
* Post delete. Can do stuff and that
*
* @param array Array of comment IDs to be deleted
* @param int Parent ID
* @return void
*/
public function postDelete( $commentIds, $parentId )
{
/* Determine most recent comment or report... */
$_comment = $this->DB->buildAndFetch( array( 'select' => 'comment_by, comment_date', 'from' => 'rc_comments', 'where' => 'approved=1 AND rid=' . $parentId, 'order' => 'comment_date DESC', 'limit' => array( 1 ) ) );
$_report = $this->DB->buildAndFetch( array( 'select' => 'report_by, date_reported', 'from' => 'rc_reports', 'where' => 'rid=' . $parentId, 'order' => 'date_reported DESC', 'limit' => array( 1 ) ) );
$_date_updated = 0;
$_updated_by = 0;
if( $_comment['comment_date'] )
{
$_date_updated = $_comment['comment_date'];
$_updated_by = $_comment['comment_by'];
}
if( $_report['date_reported'] > $_date_updated )
{
$_date_updated = $_report['date_reported'];
$_updated_by = $_report['report_by'];
}
$_cnt = $this->DB->buildAndFetch( array( 'select' => 'count(*) as total', 'from' => 'rc_comments', 'where' => 'rid=' . $parentId ) );
$this->DB->update( 'rc_reports_index', array( 'num_comments' => intval($_cnt['total']), 'date_updated' => $_date_updated, 'updated_by' => $_updated_by ), "id=" . $parentId );
}
/**
* Fetch a total count of comments we can see
*
* @param mixed parent Id or parent array
* @return int
*/
public function count( $parent )
{
/* Get parent */
if ( is_numeric( $parent ) )
{
$parent = $this->fetchParent( $parent );
}
return intval($parent['num_comments']);
}
/**
* Perform a permission check
*
* @param string Type of check (add/edit/delete/editall/deleteall/approve all)
* @param array Array of GENERIC data
* @return true or string to be used in exception
*/
public function can( $type, array $array )
{
/* Init */
$comment = array();
/* Got data? */
if ( empty( $array['comment_parent_id'] ) )
{
trigger_error( "No parent ID passed to " . __FILE__, E_USER_WARNING );
}
/* Get the file */
$event = $this->fetchParent( $array['comment_parent_id'] );
/* Fetch comment */
if ( $array['comment_id'] )
{
$comment = $this->fetchById( $array['comment_id'] );
}
/* Check permissions */
switch( $type )
{
case 'view':
return true;
break;
case 'edit':
if( $this->memberData['g_is_supmod'] OR $this->memberData['member_id'] != $comment['comment_mid'] )
{
return true;
}
return 'NO_PERMISSION';
break;
case 'add':
return true;
break;
case 'delete':
return $this->memberData['g_is_supmod'] ? true : 'NO_PERMISSION';
break;
case 'visibility':
case 'moderate':
return 'NO_PERMISSION';
break;
}
}
/**
* Returns remap keys (generic => local)
*
* @return array
*/
public function remapKeys( $type='comment' )
{
return ( $type == 'comment' ) ? $this->_remap : $this->_parentRemap;
}
}
@@ -1,207 +1,207 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Core Sessions
* Last Updated: $Date: 2011-09-15 17:04:35 -0400 (Thu, 15 Sep 2011) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 20th February 2002
* @version $Rev: 9495 $
*
*/
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();
}
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Item Marking
* Last Updated: $Date: 2011-09-15 17:04:35 -0400 (Thu, 15 Sep 2011) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Downloads
* @link http://hatynka.in
* @version $Rev: 9495 $
*
*/
class itemMarking__core
{
/**#@+
* Registry Object Shortcuts
*
* @var object
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
/**#@-*/
/**
* I'm a constructor, twisted constructor
*
* @param object ipsRegistry reference
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
/* Make objects */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
}
/**
* Convert Data
* Takes an array of app specific data and remaps it to the DB table fields
*
* @param array
* @return array
*/
public function convertData( $data )
{
return $data;
}
/**
* Fetch unread count
*
* Grab the number of items truly unread
* This is called upon by 'markRead' when the number of items
* left hits zero (or less).
*
*
* @param array Array of data
* @param array Array of read itemIDs
* @param int Last global reset
* @return integer Last unread count
*/
public function fetchUnreadCount( $data, $readItems, $lastReset )
{
$readItems = is_array( $readItems ) ? $readItems : array( 0 );
$_count = $this->DB->buildAndFetch( array(
'select' => 'COUNT(*) as cnt, MIN(date_updated) AS lastItem',
'from' => 'rc_reports_index',
'where' => "id NOT IN(" . implode( ",", array_keys( $readItems ) ) . ") AND date_updated > " . intval($lastReset)
) );
return array( 'count' => intval( $_count['cnt'] ),
'lastItem' => intval( $_count['lastItem'] ) );
}
}
/**
* Main loader class
*/
class publicSessions__core
{
/**
* Return session variables for this application
*
* current_appcomponent, current_module and current_section are automatically
* stored. This function allows you to add specific variables in.
*
* @author Matt Mecham
* @return array
*/
public function getSessionVariables()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$array = array( 'location_1_type' => '',
'location_1_id' => 0,
'location_2_type' => '',
'location_2_id' => 0 );
/* @link http://community.invisionpower.com/tracker/issue-33345-start-new-topic-reply-to-this-topic-online-list-location */
if( ipsRegistry::$request['module'] == 'attach' )
{
define( 'NO_SESSION_UPDATE', true );
}
return $array;
}
/**
* Parse/format the online list data for the records
*
* @author Brandon Farber
* @param array Online list rows to check against
* @return array Online list rows parsed
*/
public function parseOnlineEntries( $rows )
{
if( !is_array($rows) OR !count($rows) )
{
return $rows;
}
$final = array();
foreach( $rows as $row )
{
if( $row['current_appcomponent'] == 'core' )
{
if( $row['current_module'] == 'global' )
{
if( $row['current_section'] == 'login' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_login'];
}
}
else if( $row['current_module'] == 'search' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_search'];
}
else if( $row['current_module'] == 'reports' )
{
$rcCache = ipsRegistry::cache()->getCache('report_cache');
if( is_array( $rcCache ) )
{
if( $rcCache['group_access'][ ipsRegistry::member()->getProperty('member_group_id') ] == true )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_reports'];
}
}
}
}
$final[ $row['id'] ] = $row;
}
return $final;
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Core Sessions
* 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 20th February 2002
* @version $Rev: 10914 $
*
*/
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();
}
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Item Marking
* 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.Downloads
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
*
*/
class itemMarking__core
{
/**#@+
* Registry Object Shortcuts
*
* @var object
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
/**#@-*/
/**
* I'm a constructor, twisted constructor
*
* @param object ipsRegistry reference
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
/* Make objects */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
}
/**
* Convert Data
* Takes an array of app specific data and remaps it to the DB table fields
*
* @param array
* @return array
*/
public function convertData( $data )
{
return $data;
}
/**
* Fetch unread count
*
* Grab the number of items truly unread
* This is called upon by 'markRead' when the number of items
* left hits zero (or less).
*
*
* @param array Array of data
* @param array Array of read itemIDs
* @param int Last global reset
* @return integer Last unread count
*/
public function fetchUnreadCount( $data, $readItems, $lastReset )
{
$readItems = is_array( $readItems ) ? $readItems : array( 0 );
$_count = $this->DB->buildAndFetch( array(
'select' => 'COUNT(*) as cnt, MIN(date_updated) AS lastItem',
'from' => 'rc_reports_index',
'where' => "id NOT IN(" . implode( ",", array_keys( $readItems ) ) . ") AND date_updated > " . intval($lastReset)
) );
return array( 'count' => intval( $_count['cnt'] ),
'lastItem' => intval( $_count['lastItem'] ) );
}
}
/**
* Main loader class
*/
class publicSessions__core
{
/**
* Return session variables for this application
*
* current_appcomponent, current_module and current_section are automatically
* stored. This function allows you to add specific variables in.
*
* @author Matt Mecham
* @return array
*/
public function getSessionVariables()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$array = array( 'location_1_type' => '',
'location_1_id' => 0,
'location_2_type' => '',
'location_2_id' => 0 );
/* @link http://community.invisionpower.com/tracker/issue-33345-start-new-topic-reply-to-this-topic-online-list-location */
if( ipsRegistry::$request['module'] == 'attach' )
{
define( 'NO_SESSION_UPDATE', true );
}
return $array;
}
/**
* Parse/format the online list data for the records
*
* @author Brandon Farber
* @param array Online list rows to check against
* @return array Online list rows parsed
*/
public function parseOnlineEntries( $rows )
{
if( !is_array($rows) OR !count($rows) )
{
return $rows;
}
$final = array();
foreach( $rows as $row )
{
if( $row['current_appcomponent'] == 'core' )
{
if( $row['current_module'] == 'global' )
{
if( $row['current_section'] == 'login' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_login'];
}
}
else if( $row['current_module'] == 'search' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_search'];
}
else if( $row['current_module'] == 'reports' )
{
$rcCache = ipsRegistry::cache()->getCache('report_cache');
if( is_array( $rcCache ) )
{
if( $rcCache['group_access'][ ipsRegistry::member()->getProperty('member_group_id') ] == true )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_reports'];
}
}
}
}
$final[ $row['id'] ] = $row;
}
return $final;
}
}
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Core registered caches, redirect resets and bitwise settings
* Last Updated: $Date: 2011-03-15 18:03:09 -0400 (Tue, 15 Mar 2011) $
* 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 This is NULLED!
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 8085 $
* @version $Rev: 10914 $
*
*/
@@ -1,323 +1,231 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Dashboard Notifications
* Last Updated: $Date
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @version $Rev: 9551 $
*/
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();
}
/**
* Main loader class
*/
class dashboardNotifications__core
{
/**
* Registry Object Shortcuts
*
* @var object
*/
public $settings;
public $lang;
public $cache;
public $caches;
public $DB;
public function __construct()
{
$this->settings = ipsRegistry::fetchSettings();
$this->lang = ipsRegistry::getClass('class_localization');
$this->caches =& ipsRegistry::cache()->fetchCaches();
$this->cache = ipsRegistry::cache();
$this->DB = ipsRegistry::DB();
}
public function get()
{
/* INIT */
$entries = array();
if( ! $this->settings['ipb_reg_number'] )
{
$entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&amp;section=licensekey" ) );
}
else
{
/* We need a classFileManagement object */
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classFileManagement.php', 'classFileManagement' );
$classFileManagement = new $classToLoad();
/* Try to automatically update if expired */
$licenseData = $this->cache->getCache( 'licenseData' );
if( ! $licenseData || ( $licenseData['key']['_expires'] != 9999999999 AND $licenseData['key']['_expires'] < IPS_UNIX_TIME_NOW ) )
{
/* Query the api */
$response = $classFileManagement->getFileContents( "http://myipb.in/license.php?lk={$this->settings['ipb_reg_number']}&url={$this->settings['board_url']}&flush=1" );
/* Get License Data */
$licenseData = json_decode( $response, true );
/* Copyright Removal? */
if ( $licenseData['cr'] )
{
IPSLib::updateSettings( array( 'ipb_copy_number' => $licenseData['cr'], 'ips_cp_purchase' => 1 ) );
}
elseif ( $this->settings['ips_cp_purchase'] )
{
IPSLib::updateSettings( array( 'ips_cp_purchase' => 0 ) );
}
/* Save to cache */
$licenseData['_cached_date'] = time();
$licenseData['key']['_expires'] = $licenseData['key']['_expires'] ? $licenseData['key']['_expires'] : 9999999999;
$licenseData['key']['expires'] = $licenseData['key']['expires'] ? $licenseData['key']['expires'] : 9999999999;
$this->cache->setCache( 'licenseData', $licenseData, array( 'array' => 1 ) );
}
/* Query the api */
$response = $classFileManagement->getFileContents("http://myipb.in/license.php?api=checkService&service=ipb&lk={$this->settings['ipb_reg_number']}&domain={$this->settings['board_url']}" );
/* Get License Data */
$response = json_decode( $response, true );
/* Is the Spam Service Working? */
if ( $this->settings['spam_service_enabled'] )
{
//$lastLog = $this->DB->buildAndFetch( array( 'select' => 'log_code', 'from' => 'spam_service_log', 'order' => 'id DESC', 'limit' => 1 ) ); // Order on ID since log_date has no index
//if ( $lastLog['log_code'] === '0' )
/* Get last 5 logs, and if all 5 are errors, show message */
$_errors = 0;
$_entries = 0;
$_lastError = '';
$this->DB->build( array( 'select' => 'log_code, log_msg', 'from' => 'spam_service_log', 'order' => 'id DESC', 'limit' => 5 ) );
$this->DB->execute();
while( $_r = $this->DB->fetch() )
{
$_entries++;
if( $_r['log_code'] === '0' )
{
$_errors++;
if( !$_lastError )
{
$_lastError = $_r['log_msg'];
}
}
}
if( $_entries > 0 && $_errors == $_entries )
{
$entries[] = array( $this->lang->words['spam_service_error'], sprintf( $this->lang->words['spam_service_error_msg'], $_lastError ) );
}
}
/* If it's disabled, are we entitiled to it? */
else
{
$licenseData = $this->cache->getCache( 'licenseData' );
if ( is_array( $licenseData['ipbMain'] ) && count( $licenseData['ipbMain'] ) )
{
foreach ( $licenseData['ipbMain'] as $data )
{
if ( $data['name'] == 'Spam Monitoring Service' && $data['status'] == 'Ok' )
{
$entries[] = array( $this->lang->words['spam_service_disabled'], $this->lang->words['spam_service_disabled_msg'] );
break;
}
}
}
}
}
/* FURL cache OOD? */
if ( is_file( IPS_CACHE_PATH . 'cache/furlCache.php' ) )
{
$mtime = intval( @filemtime( IPS_CACHE_PATH . 'cache/furlCache.php' ) );
/* Check mtimes on extensions.. */
foreach( ipsRegistry::$applications as $app_dir => $application )
{
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) )
{
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) );
if ( $_mtime > $mtime )
{
$entries[] = array( $this->lang->words['furlcache_outofdate'], sprintf( $this->lang->words['furlcache_outofdate_desc'], $application['app_title'] ) . "<a href='" . $this->settings['base_url'] . "app=core&amp;module=applications&amp;section=applications&amp;do=seoRebuild'>{$this->lang->words['rebuild_furl_cache']}</a>" );
break;
}
}
}
}
/* Sphinx cache OOD? */
if ( $this->settings['search_method'] == 'sphinx' )
{
$mtime = intval( $this->cache->getCache('sphinx_config') );
/* Check mtimes on extensions.. */
foreach( ipsRegistry::$applications as $app_dir => $application )
{
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) )
{
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) );
if ( !$mtime OR $_mtime > $mtime )
{
$entries[] = array( $this->lang->words['sphinxconfig_outofdate'], $this->lang->words['sphinxconfig_outofdate_desc'] . ' ' . "<a href='" . $this->settings['base_url'] . "app=core&amp;module=applications&amp;section=applications&amp;do=applications_overview'>{$this->lang->words['rebuild_sphinx_config']}</a>" );
break;
}
}
}
}
/* Minify on but /cache/tmp not writeable? */
if ( !empty( $this->settings['_use_minify'] ) )
{
$entries[] = array( $this->lang->words['minifywrite_head'], $this->lang->words['minifynot_writeable'] );
}
/* Installer Check */
if( @is_file( IPS_ROOT_PATH . 'install/index.php' ) )
{
if ( ! @is_file( DOC_IPS_ROOT_PATH . 'cache/installer_lock.php' ) )
{
$this->lang->words['cp_unlocked_warning'] = sprintf( $this->lang->words['cp_unlocked_warning'], CP_DIRECTORY );
$entries[] = array( $this->lang->words['cp_unlockedinstaller'], $this->lang->words['cp_unlocked_warning'] );
}
}
/* Unfinished Upgrade */
require_once( IPS_ROOT_PATH . '/setup/sources/base/setup.php' );/*noLibHook*/
$versions = IPSSetUp::fetchAppVersionNumbers( 'core' );
if( $versions['current'][0] != $versions['latest'][0] )
{
$this->lang->words['cp_upgrade_warning'] = sprintf( $this->lang->words['cp_upgrade_warning'], $versions['current'][1], $versions['latest'][1], $this->settings['base_acp_url'] );
$entries[] = array( $this->lang->words['cp_unfinishedupgrade'], $this->lang->words['cp_upgrade_warning'] );
}
/* PHP Version Check */
if( PHP_VERSION < '5.1.0' )
{
$entries[] = array( sprintf( $this->lang->words['cp_yourphpversion'], PHP_VERSION ), $this->lang->words['cp_php_warning'] );
}
/* Outgoing email address specified */
if ( !$this->settings['email_out'] OR !$this->settings['email_in'] )
{
$entries[] = array( $this->lang->words['cp_missingemail'], "{$this->lang->words['cp_missingemail1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&amp;module=settings&amp;section=settings&amp;do=findsetting&amp;key=email'>{$this->lang->words['cp_missingemail2']}</a>" );
}
/* Board Offline Check */
if ( $this->settings['board_offline'] )
{
$entries[] = array( $this->lang->words['cp_boardoffline'], "{$this->lang->words['cp_boardoffline1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&amp;module=settings&amp;section=settings&amp;do=findsetting&amp;key=boardoffline'>{$this->lang->words['cp_boardoffline2']}</a>" );
}
/* Fulltext Check */
if( $this->settings['search_method'] == 'traditional' AND !$this->settings['use_fulltext'] AND !$this->settings['hide_ftext_note'] )
{
$entries[] = array( $this->lang->words['fulltext_off'], "{$this->lang->words['fulltext_turnon']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&amp;module=settings&amp;section=settings&amp;do=findsetting&amp;key=searchsetup'>{$this->lang->words['fulltext_find']}</a>" );
}
/* Make sure the profile directory is writable */
if( ! is_dir( $this->settings['upload_dir'] . '/profile/' ) || ! is_writable( $this->settings['upload_dir'] . '/profile/' ) )
{
$entries[] = array( $this->lang->words['cp_profilephotoerr_title'], sprintf( $this->lang->words['cp_profilephotoerr_msg'], $this->settings['upload_dir'] . '/profile/' ) );
}
/* Check for upgrade finish folder */
if( is_dir( IPS_ROOT_PATH . 'upgradeFinish/' ) )
{
$entries[] = array( $this->lang->words['cp_upgradefinishfolder'], sprintf( $this->lang->words['cp_upgradefinishfolder_msg'], IPS_ROOT_PATH . 'upgradeFinish/' ) );
}
/* Check to see if GD is intalled */
if(! extension_loaded( 'gd' ) || ! function_exists( 'gd_info' ) )
{
$entries[] = array( $this->lang->words['cp_gdnotinstalled_title'], $this->lang->words['cp_gdnotinstalled_msg'] );
}
/* Performance mode check */
$perfMode = $this->cache->getCache('performanceCache');
if( is_array( $perfMode ) && count( $perfMode ) )
{
$entries[] = array( $this->lang->words['cp_perfmodeon_title'], $this->lang->words['cp_perfmodeon_msg'] );
}
/* Suhosin check */
if( extension_loaded( 'suhosin' ) )
{
$_postMaxVars = @ini_get('suhosin.post.max_vars');
$_reqMaxVars = @ini_get('suhosin.request.max_vars');
$_postMaxLen = @ini_get('suhosin.post.max_value_length');
$_reqMaxLen = @ini_get('suhosin.request.max_value_length');
if( $_postMaxVars < 4096 )
{
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue1'], $_postMaxVars ) );
}
if( $_reqMaxVars < 4096 )
{
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue2'], $_reqMaxVars ) );
}
if( $_postMaxLen < 1000000 )
{
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue3'], $_postMaxLen ) );
}
if( $_reqMaxLen < 1000000 )
{
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue4'], $_reqMaxLen ) );
}
}
/* SQL error check */
/*if ( is_file( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' ) )
{
$unix = @filemtime( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' );
if ( $unix )
{
$mtime = gmdate( 'd-j-Y', $unix );
$now = gmdate( 'd-j-Y', time() );
if ( $mtime == $now )
{
// Display a message
}
}
}*/
return $entries;
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Dashboard Notifications
* Last Updated: 11.07.2012
*
* @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: 11026 $
*/
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();
}
/**
* Main loader class
* DO NOT MODIFY!
*/
class dashboardNotifications__core
{
/**
* Registry Object Shortcuts
*
* @var object
*/
public $settings;
public $lang;
public $cache;
public $caches;
public $DB;
public function __construct()
{
$this->settings = ipsRegistry::fetchSettings();
$this->lang = ipsRegistry::getClass('class_localization');
$this->caches =& ipsRegistry::cache()->fetchCaches();
$this->cache = ipsRegistry::cache();
$this->DB = ipsRegistry::DB();
}
public function get()
{
/* INIT! */
$entries = array();
if( ! $this->settings['ipb_reg_number'] )
{
$entries[] = array( $this->lang->words['lc_title_nokey'], sprintf( $this->lang->words['lc_msg_nokey'], "{$this->settings['base_url']}module=tools&amp;section=licensekey" ) );
}
/* FURL cache OOD? */
if ( is_file( IPS_CACHE_PATH . 'cache/furlCache.php' ) )
{
$mtime = intval( @filemtime( IPS_CACHE_PATH . 'cache/furlCache.php' ) );
/* Check mtimes on extensions.. */
foreach( ipsRegistry::$applications as $app_dir => $application )
{
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) )
{
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/furlTemplates.php' ) );
if ( $_mtime > $mtime )
{
$entries[] = array( $this->lang->words['furlcache_outofdate'], sprintf( $this->lang->words['furlcache_outofdate_desc'], $application['app_title'] ) . "<a href='" . $this->settings['base_url'] . "app=core&amp;module=applications&amp;section=applications&amp;do=seoRebuild'>{$this->lang->words['rebuild_furl_cache']}</a>" );
break;
}
}
}
}
/* Sphinx cache OOD? */
if ( $this->settings['search_method'] == 'sphinx' )
{
$mtime = intval( $this->cache->getCache('sphinx_config') );
/* Check mtimes on extensions.. */
foreach( ipsRegistry::$applications as $app_dir => $application )
{
if ( is_file( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) )
{
$_mtime = intval( @filemtime( IPSLib::getAppDir( $app_dir ) . '/extensions/sphinxTemplate.php' ) );
if ( !$mtime OR $_mtime > $mtime )
{
$entries[] = array( $this->lang->words['sphinxconfig_outofdate'], $this->lang->words['sphinxconfig_outofdate_desc'] . ' ' . "<a href='" . $this->settings['base_url'] . "app=core&amp;module=applications&amp;section=applications&amp;do=applications_overview'>{$this->lang->words['rebuild_sphinx_config']}</a>" );
break;
}
}
}
}
/* Minify on but /cache/tmp not writeable? */
if ( !empty( $this->settings['_use_minify'] ) )
{
$entries[] = array( $this->lang->words['minifywrite_head'], $this->lang->words['minifynot_writeable'] );
}
/* Installer Check */
if( @is_file( IPS_ROOT_PATH . 'install/index.php' ) )
{
if ( ! @is_file( DOC_IPS_ROOT_PATH . 'cache/installer_lock.php' ) )
{
$this->lang->words['cp_unlocked_warning'] = sprintf( $this->lang->words['cp_unlocked_warning'], CP_DIRECTORY );
$entries[] = array( $this->lang->words['cp_unlockedinstaller'], $this->lang->words['cp_unlocked_warning'] );
}
}
/* Unfinished Upgrade */
require_once( IPS_ROOT_PATH . '/setup/sources/base/setup.php' );/*noLibHook*/
$versions = IPSSetUp::fetchAppVersionNumbers( 'core' );
if( $versions['current'][0] != $versions['latest'][0] )
{
$this->lang->words['cp_upgrade_warning'] = sprintf( $this->lang->words['cp_upgrade_warning'], $versions['current'][1], $versions['latest'][1], $this->settings['base_acp_url'] );
$entries[] = array( $this->lang->words['cp_unfinishedupgrade'], $this->lang->words['cp_upgrade_warning'] );
}
/**
* PHP Version Check
*
* @todo Remove this for 4.0? Installer/upgrader already do check for this anyway...
*/
if( PHP_VERSION < '5.2.0' )
{
$entries[] = array( sprintf( $this->lang->words['cp_yourphpversion'], PHP_VERSION ), $this->lang->words['cp_php_warning'] );
}
/* Outgoing email address specified */
if ( !$this->settings['email_out'] OR !$this->settings['email_in'] )
{
$entries[] = array( $this->lang->words['cp_missingemail'], "{$this->lang->words['cp_missingemail1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&amp;module=settings&amp;section=settings&amp;do=findsetting&amp;key=email'>{$this->lang->words['cp_missingemail2']}</a>" );
}
/* Board Offline Check */
if ( $this->settings['board_offline'] )
{
$entries[] = array( $this->lang->words['cp_boardoffline'], "{$this->lang->words['cp_boardoffline1']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&amp;module=settings&amp;section=settings&amp;do=findsetting&amp;key=boardoffline'>{$this->lang->words['cp_boardoffline2']}</a>" );
}
/* Fulltext Check */
if( $this->settings['search_method'] == 'traditional' AND !$this->settings['use_fulltext'] AND !$this->settings['hide_ftext_note'] )
{
$entries[] = array( $this->lang->words['fulltext_off'], "{$this->lang->words['fulltext_turnon']}<br /><br />{$this->lang->words['_raquo']} <a href='" . $this->settings['base_url'] . "&amp;module=settings&amp;section=settings&amp;do=findsetting&amp;key=searchsetup'>{$this->lang->words['fulltext_find']}</a>" );
}
/* Make sure the profile directory is writable */
if( ! is_dir( $this->settings['upload_dir'] . '/profile/' ) || ! is_writable( $this->settings['upload_dir'] . '/profile/' ) )
{
$entries[] = array( $this->lang->words['cp_profilephotoerr_title'], sprintf( $this->lang->words['cp_profilephotoerr_msg'], $this->settings['upload_dir'] . '/profile/' ) );
}
/* Check for upgrade finish folder */
if( is_dir( IPS_ROOT_PATH . 'upgradeFinish/' ) )
{
$entries[] = array( $this->lang->words['cp_upgradefinishfolder'], sprintf( $this->lang->words['cp_upgradefinishfolder_msg'], IPS_ROOT_PATH . 'upgradeFinish/' ) );
}
/* Check to see if GD is intalled */
if(! extension_loaded( 'gd' ) || ! function_exists( 'gd_info' ) )
{
$entries[] = array( $this->lang->words['cp_gdnotinstalled_title'], $this->lang->words['cp_gdnotinstalled_msg'] );
}
/* Performance mode check */
$perfMode = $this->cache->getCache('performanceCache');
if( is_array( $perfMode ) && count( $perfMode ) )
{
$entries[] = array( $this->lang->words['cp_perfmodeon_title'], $this->lang->words['cp_perfmodeon_msg'] );
}
/* Suhosin check */
if( extension_loaded( 'suhosin' ) )
{
$_postMaxVars = @ini_get('suhosin.post.max_vars');
$_reqMaxVars = @ini_get('suhosin.request.max_vars');
$_postMaxLen = @ini_get('suhosin.post.max_value_length');
$_reqMaxLen = @ini_get('suhosin.request.max_value_length');
if( $_postMaxVars < 4096 )
{
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue1'], $_postMaxVars ) );
}
if( $_reqMaxVars < 4096 )
{
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue2'], $_reqMaxVars ) );
}
if( $_postMaxLen < 1000000 )
{
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue3'], $_postMaxLen ) );
}
if( $_reqMaxLen < 1000000 )
{
$entries[] = array( $this->lang->words['suhosin_notification'], sprintf( $this->lang->words['suhosin_badvalue4'], $_reqMaxLen ) );
}
}
/* SQL error check */
/*if ( is_file( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' ) )
{
$unix = @filemtime( IPS_CACHE_PATH . 'cache/sql_error_latest.cgi' );
if ( $unix )
{
$mtime = gmdate( 'd-j-Y', $unix );
$now = gmdate( 'd-j-Y', time() );
if ( $mtime == $now )
{
// Display a message
}
}
}*/
return $entries;
}
}
@@ -1,25 +0,0 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Define data hook locations (core)
* Last Updated: $Date: 2011-05-18 04:49:10 -0400 (Wed, 18 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @version $Rev: 8812 $
*/
$dataHookLocations = array(
/* POSTING LIBRARY DATA LOCATIONS */
array( 'warnLogs', 'Insert Warn Log' ),
);
@@ -1,36 +1,36 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* BBCode Management : Determines if bbcode can be used in this section
* Last Updated: $LastChangedDate: 2011-04-20 18:01:37 -0400 (Wed, 20 Apr 2011) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @version $Rev: 8419 $
*
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
/*
* An array of key => value pairs
* When going to parse, the key should be passed to the editor
* to determine which bbcodes should be parsed in the section
*
*/
$BBCODE = array(
'reports' => ipsRegistry::getClass('class_localization')->words['ctype__reports'],
'global_comments' => ipsRegistry::getClass('class_localization')->words['ctype__comments'],
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* BBCode Management : Determines if bbcode can be used in this section
* 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
* @version $Rev: 10914 $
*
*/
if ( ! defined( 'IN_IPB' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
exit();
}
/*
* An array of key => value pairs
* When going to parse, the key should be passed to the editor
* to determine which bbcodes should be parsed in the section
*
*/
$BBCODE = array(
'reports' => ipsRegistry::getClass('class_localization')->words['ctype__reports'],
'global_comments' => ipsRegistry::getClass('class_localization')->words['ctype__comments'],
);
@@ -1,70 +0,0 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.2
* Sets up SEO templates
* Last Updated: $Date: 2010-07-01 18:13:46 -0400 (Thu, 01 Jul 2010) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 20th February 2002
* @version $Rev: 6596 $
*
*/
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();
}
/**
* SEO templates
*
* 'allowRedirect' is a flag to tell IP.Board whether to check the incoming link and if not formatted correctly, redirect the correct one
*
* OUT FORMAT REGEX:
* First array element is a regex to run to see if we've a match for the URL
* The second array element is the template to use the results of the parenthesis capture
*
* Special variable #{__title__} is replaced with the $title data passed to output->formatUrl( $url, $title)
*
* IMPORTANT: Remember that when these regex are used, the output has not been fully parsed so you will get:
* showuser={$data['member_id']} NOT showuser=1 so do not try and match numerics only!
*
* IN FORMAT REGEX
*
* This allows the registry to piece back together a URL based on the template regex
* So, for example: "/user/(\d+?)/", 'matches' => array( array( 'showuser' => '$1' ) )tells IP.Board to populate 'showuser' with the result
* of the parenthesis capture #1
*/
$_SEOTEMPLATES = array(
'section=register' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=register(&amp;|&|$)#i', 'register/$3' ),
'in' => array( 'regex' => "#/register(/|$|\?)#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
'section=rss' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=rss(&amp;|&)type=(\w+?)$#i', 'rss/$4/' ),
'in' => array( 'regex' => "#/rss/(\w+?)/$#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ) ) ) ),
'section=rss2' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=rss(&amp;|&)type=(\w+?)(&amp;|&)id=(\w+?)$#i', 'rss/$4/$6-#{__title__}/' ),
'in' => array( 'regex' => "#/rss/(\w+?)/(\w+?)-#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'rss' ), array( 'type', '$1' ), array( 'id', '$2' ) ) ) ),
# Changed section=rss2 id matching to use \w for more flexibility
);
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Sets up SEO templates
* Last Updated: $Date: 2011-09-16 07:16:26 -0400 (Fri, 16 Sep 2011) $
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $Author: mmecham $
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 9496 $
* @version $Rev: 10914 $
*
*/
@@ -51,11 +51,29 @@ $_SEOTEMPLATES = array(
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=register(&amp;|&|$)#i', 'register/$3' ),
'in' => array( 'regex' => "#/register(/|$|\?)#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'register' ) ) ) ),
'tags' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=search(&amp;|&)do=search(&amp;|&)search_tags=(\S+?)(&amp;|&)search_app=(\S+?)(&amp;|&|$)#i', 'tags/$6/$4/$7' ),
'in' => array( 'regex' => "#/tags/(\S+?)/(\S+?)/#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'search' ), array( 'do', 'search' ), array( 'search_tags', '$2' ), array( 'search_app', '$1' ) ) ) ),
'privacy' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=privacy(&amp;|&|$)#i', 'privacypolicy/$4/' ),
'in' => array( 'regex' => "#/privacypolicy/#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'privacy' ) ) ) ),
'likeunsubscribe' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=like(&amp;|&)do=unsubscribe(&amp;|&)key=(\S+?)(&amp;|&|$)#i', 'unsubscribe/$5/' ),
'in' => array( 'regex' => "#/unsubscribe/(\S+?)/$#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'like' ), array( 'do', 'unsubscribe' ), array( 'key', '$1' ) ) ) ),
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'like' ), array( 'do', 'unsubscribe' ), array( 'key', '$1' ) ) ) ),
'findcomment' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=comments(&amp;|&)do=findComment(&amp;|&)fromApp=(\S+?)(&amp;|&)parentId=(\d+?)(&amp;|&)commentId=(\d+?)(&amp;|&|$)#i', 'findComment/$5/$7-$9' ),
'in' => array( 'regex' => "#/findComment/(\S+?-\S+?)/(\d+?)-(\d+?)$#i",
'matches' => array( array( 'app', 'core' ), array( 'module', 'global' ), array( 'section', 'comments' ), array( 'do', 'findComment' ), array( 'fromApp', '$1' ), array( 'parentId', '$2' ), array( 'commentId', '$3' ) ) ) ),
'section=rss' => array( 'app' => 'core',
'allowRedirect' => 0,
'out' => array( '#app=core(&amp;|&)module=global(&amp;|&)section=rss(&amp;|&)type=(\w+?)$#i', 'rss/$4/' ),
@@ -1,10 +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>
<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>
@@ -0,0 +1,69 @@
<?php
/**
* @file default.php Core like class (Core application)
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* $LastChangedDate: 2011-12-08 16:43:34 +0000 (Thu, 08 Dec 2011) $
* @version v3.3.4
* $Revision: 9971 $
*/
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 like_core_default_composite
* @brief Core default like class (core application)
*/
class like_core_composite extends classes_like_composite
{
/**
* Registry Object Shortcuts
*
* @var $registry
* @var $DB
* @var $settings
* @var $request
* @var $lang
* @var $member
* @var $memberData
* @var $cache
* @var $caches
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
/**
* Constructor
*
* @return @e void
*/
public function __construct()
{
/* Make registry objects */
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
}
}
@@ -3,11 +3,11 @@
* @file generate.php Navigation plugin: attachments
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* @since 3/8/2011
* $LastChangedDate: 2011-05-12 22:28:10 -0400 (Thu, 12 May 2011) $
* @version v3.2.3
* @version v3.3.4
* $Revision: 8754 $
*/
@@ -1,10 +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>
<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>
@@ -1,50 +1,50 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Define the core notification types
* Last Updated: $Date: 2011-03-11 06:59:39 -0500 (Fri, 11 Mar 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 20th February 2002
* @version $Rev: 8031 $
*
*/
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 core_notifications
{
public function getConfiguration()
{
/**
* Notification types - Needs to be a method so when require_once is used, $_NOTIFY isn't empty
*/
$_NOTIFY = array(
// Future...
// array( 'key' => 'reputation_received', 'default' => array( 'inline' ), 'disabled' => array() ),
array( 'key' => 'report_center', 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => TRUE, 'icon' => 'notify_reportcenter' ),
array( 'key' => 'new_comment' , 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => false, 'icon' => 'notify_profilecomment' ),
);/*noLibHook*/
return $_NOTIFY;
}
public function report_center()
{
return $this->memberData['access_report_center'];
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Define the core notification types
* 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 20th February 2002
* @version $Rev: 10914 $
*
*/
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 core_notifications
{
public function getConfiguration()
{
/**
* Notification types - Needs to be a method so when require_once is used, $_NOTIFY isn't empty
*/
$_NOTIFY = array(
// Future...
// array( 'key' => 'reputation_received', 'default' => array( 'inline' ), 'disabled' => array() ),
array( 'key' => 'report_center', 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => TRUE, 'icon' => 'notify_reportcenter' ),
array( 'key' => 'new_comment' , 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => false, 'icon' => 'notify_profilecomment' ),
);/*noLibHook*/
return $_NOTIFY;
}
public function report_center()
{
return $this->memberData['access_report_center'];
}
}
File diff suppressed because it is too large. Load diff
@@ -1,10 +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>
<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>
@@ -1,118 +1,118 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* RSS output plugin :: report center
* Last Updated: $Date: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 6/24/2008
* @version $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 rss_output_core
{
/**
* Expiration date
*
* @var integer Expiration timestamp
*/
protected $expires = 0;
/**
* Grab the RSS links
*
* @return array
*/
public function getRssLinks()
{
//-----------------------------------------
// As this is member specific, hardcoded
// into output library
//-----------------------------------------
return array();
}
/**
* Grab the RSS document content and return it
*
* @return string RSS document
*/
public function returnRSSDocument()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval( ipsRegistry::$request['member_id'] );
$secure_key = IPSText::md5Clean( ipsRegistry::$request['rss_key'] );
$rss_data = array();
$to_print = '';
if( $secure_key and $member_id )
{
if( $member_id == ipsRegistry::member()->getProperty('member_id') )
{
//-----------------------------------------
// Get RSS export
//-----------------------------------------
$rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => 'rss_cache',
'from' => 'rc_modpref',
'where' => "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'"
) );
//-----------------------------------------
// Got one?
//-----------------------------------------
if ( $rss_data['rss_cache'] )
{
return $rss_data['rss_cache'];
}
}
//-----------------------------------------
// Create a dummy one
//-----------------------------------------
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_reports' ), 'core' );
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' );
$rss = new $classToLoad();
$channel_id = $rss->createNewChannel( array( 'title' => ipsRegistry::getClass('class_localization')->words['rss_feed_title'],
'link' => ipsRegistry::$settings['board_url'],
'description' => ipsRegistry::getClass('class_localization')->words['reports_rss_desc'],
'pubDate' => $rss->formatDate( time() )
) );
$rss->createRssDocument();
return $rss->rss_document;
}
}
/**
* Grab the RSS document expiration timestamp
*
* @return integer Expiration timestamp
*/
public function grabExpiryDate()
{
return time() + 3600;
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* RSS output plugin :: report center
* 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 6/24/2008
* @version $Revision: 10914 $
*/
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 rss_output_core
{
/**
* Expiration date
*
* @var integer Expiration timestamp
*/
protected $expires = 0;
/**
* Grab the RSS links
*
* @return array
*/
public function getRssLinks()
{
//-----------------------------------------
// As this is member specific, hardcoded
// into output library
//-----------------------------------------
return array();
}
/**
* Grab the RSS document content and return it
*
* @return string RSS document
*/
public function returnRSSDocument()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval( ipsRegistry::$request['member_id'] );
$secure_key = IPSText::md5Clean( ipsRegistry::$request['rss_key'] );
$rss_data = array();
$to_print = '';
if( $secure_key and $member_id )
{
if( $member_id == ipsRegistry::member()->getProperty('member_id') )
{
//-----------------------------------------
// Get RSS export
//-----------------------------------------
$rss_data = ipsRegistry::DB()->buildAndFetch( array( 'select' => 'rss_cache',
'from' => 'rc_modpref',
'where' => "mem_id=" . $member_id . " AND rss_key='" . $secure_key . "'"
) );
//-----------------------------------------
// Got one?
//-----------------------------------------
if ( $rss_data['rss_cache'] )
{
return $rss_data['rss_cache'];
}
}
//-----------------------------------------
// Create a dummy one
//-----------------------------------------
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_reports' ), 'core' );
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classRss.php', 'classRss' );
$rss = new $classToLoad();
$channel_id = $rss->createNewChannel( array( 'title' => ipsRegistry::getClass('class_localization')->words['rss_feed_title'],
'link' => ipsRegistry::$settings['board_url'],
'description' => ipsRegistry::getClass('class_localization')->words['reports_rss_desc'],
'pubDate' => $rss->formatDate( time() )
) );
$rss->createRssDocument();
return $rss->rss_document;
}
}
/**
* Grab the RSS document expiration timestamp
*
* @return integer Expiration timestamp
*/
public function grabExpiryDate()
{
return time() + 3600;
}
}
@@ -1,33 +1,33 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Config file
* Last Updated: $Date: 2011-04-13 23:15:13 -0400 (Wed, 13 Apr 2011) $
* </pre>
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Forums
* @link http://hatynka.in
* @version $Rev: 8333 $
*/
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();
}
/* Can search with this app */
$CONFIG['can_search'] = 1;
/* Can view new content with this app */
$CONFIG['can_viewNewContent'] = 0;
/* Can fetch user generated content */
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Config file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
*/
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();
}
/* Can search with this app */
$CONFIG['can_search'] = 1;
/* Can view new content with this app */
$CONFIG['can_viewNewContent'] = 0;
/* Can fetch user generated content */
$CONFIG['can_userContent'] = 0;
@@ -1,10 +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>
<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>
@@ -1,178 +1,178 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Basic Forum Search
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Forums
* @link http://hatynka.in
* @version $Rev: 8644 $
*/
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 search_engine_core extends search_engine
{
/**
* Constructor
*
* @param object ipsRegistry reference
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
parent::__construct( $registry );
}
/**
* Perform a search.
* Returns an array of a total count (total number of matches)
* and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search
*
* So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25
*
* @return array
*/
public function search()
{
/* INIT */
$sort_by = IPSSearchRegistry::get('in.search_sort_by');
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
$search_term = IPSSearchRegistry::get('in.clean_search_term');
$sortKey = '';
$rows = array();
/* Sorting */
switch( $sort_by )
{
default:
case 'date':
$sortKey = 'id';
break;
case 'title':
$sortKey = 'title';
break;
}
/* Query the count */
$count = $this->DB->buildAndFetch( array('select' => 'COUNT(*) as total_results',
'from' => 'faq',
'where' => $this->_buildWhereStatement( $search_term ),
) );
/* Fetch data */
$this->DB->build( array( 'select' => '*',
'from' => 'faq',
'where' => $this->_buildWhereStatement( $search_term ),
'order' => $sortKey . ' ' . $sort_order,
'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ),
) );
$this->DB->execute();
/* Get results */
while ( $_row = $this->DB->fetch() )
{
$rows[] = $_row;
}
/* Return it */
return array( 'count' => $count['total_results'], 'resultSet' => $rows );
}
/**
* Builds the where portion of a search string
*
* @param string $search_term The string to use in the search
* @return string
*/
protected function _buildWhereStatement( $search_term )
{
/* INI */
$where_clause = array();
if( $search_term )
{
switch( IPSSearchRegistry::get('opt.searchType') )
{
case 'both':
default:
$where_clause[] = "(title LIKE '%{$search_term}%' OR text LIKE '%{$search_term}%' OR description LIKE '%{$search_term}%')";
break;
case 'titles':
$where_clause[] = "title LIKE '%{$search_term}%'";
break;
case 'content':
$where_clause[] = "(text LIKE '%{$search_term}%' OR description LIKE '%{$search_term}%')";
break;
}
}
/* Add in AND where conditions */
if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) )
{
$where_clause = array_merge( $where_clause, $this->whereConditions['AND'] );
}
/* ADD in OR where conditions */
if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) )
{
$where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )';
}
/* Build and return the string */
return implode( " AND ", $where_clause );
}
/**
* Remap standard columns (Apps can override )
*
* @param string $column sql table column for this condition
* @return string column
* @return @e void
*/
public function remapColumn( $column )
{
if ( $column == 'member_id' )
{
return '';
}
return $column;
}
/**
* Returns an array used in the searchplugin's setCondition method
*
* @param array $data Array of forums to view
* @return array Array with column, operator, and value keys, for use in the setCondition call
*/
public function buildFilterSQL( $data )
{
return array();
}
/**
* Can handle boolean searching
*
* @return boolean
*/
public function isBoolean()
{
return false;
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Basic Forum Search
* 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 Forums
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
*/
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 search_engine_core extends search_engine
{
/**
* Constructor
*
* @param object ipsRegistry reference
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
parent::__construct( $registry );
}
/**
* Perform a search.
* Returns an array of a total count (total number of matches)
* and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search
*
* So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25
*
* @return array
*/
public function search()
{
/* INIT */
$sort_by = IPSSearchRegistry::get('in.search_sort_by');
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
$search_term = IPSSearchRegistry::get('in.clean_search_term');
$sortKey = '';
$rows = array();
/* Sorting */
switch( $sort_by )
{
default:
case 'date':
$sortKey = 'id';
break;
case 'title':
$sortKey = 'title';
break;
}
/* Query the count */
$count = $this->DB->buildAndFetch( array('select' => 'COUNT(*) as total_results',
'from' => 'faq',
'where' => $this->_buildWhereStatement( $search_term ),
) );
/* Fetch data */
$this->DB->build( array( 'select' => '*',
'from' => 'faq',
'where' => $this->_buildWhereStatement( $search_term ),
'order' => $sortKey . ' ' . $sort_order,
'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ),
) );
$this->DB->execute();
/* Get results */
while ( $_row = $this->DB->fetch() )
{
$rows[] = $_row;
}
/* Return it */
return array( 'count' => $count['total_results'], 'resultSet' => $rows );
}
/**
* Builds the where portion of a search string
*
* @param string $search_term The string to use in the search
* @return string
*/
protected function _buildWhereStatement( $search_term )
{
/* INI */
$where_clause = array();
if( $search_term )
{
switch( IPSSearchRegistry::get('opt.searchType') )
{
case 'both':
default:
$where_clause[] = "(title LIKE '%{$search_term}%' OR text LIKE '%{$search_term}%' OR description LIKE '%{$search_term}%')";
break;
case 'titles':
$where_clause[] = "title LIKE '%{$search_term}%'";
break;
case 'content':
$where_clause[] = "(text LIKE '%{$search_term}%' OR description LIKE '%{$search_term}%')";
break;
}
}
/* Add in AND where conditions */
if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) )
{
$where_clause = array_merge( $where_clause, $this->whereConditions['AND'] );
}
/* ADD in OR where conditions */
if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) )
{
$where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )';
}
/* Build and return the string */
return implode( " AND ", $where_clause );
}
/**
* Remap standard columns (Apps can override )
*
* @param string $column sql table column for this condition
* @return string column
* @return @e void
*/
public function remapColumn( $column )
{
if ( $column == 'member_id' )
{
return '';
}
return $column;
}
/**
* Returns an array used in the searchplugin's setCondition method
*
* @param array $data Array of forums to view
* @return array Array with column, operator, and value keys, for use in the setCondition call
*/
public function buildFilterSQL( $data )
{
return array();
}
/**
* Can handle boolean searching
*
* @return boolean
*/
public function isBoolean()
{
return false;
}
}
@@ -1,59 +1,59 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Returns HTML for the form (optional class, not required)
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Forums
* @link http://hatynka.in
* @version $Rev: 8644 $
*/
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 search_form_core
{
/**
* Construct
*
* @return @e void
*/
public function __construct()
{
/* Make object */
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
}
/**
* Return sort drop down
*
* @return array
*/
public function fetchSortDropDown()
{
$array = array( 'date' => $this->lang->words['s_search_type_0'],
'title' => $this->lang->words['forum_sort_title'] );
return $array;
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Returns HTML for the form (optional class, not required)
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
*/
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 search_form_core
{
/**
* Construct
*
* @return @e void
*/
public function __construct()
{
/* Make object */
$this->registry = ipsRegistry::instance();
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
}
/**
* Return sort drop down
*
* @return array
*/
public function fetchSortDropDown()
{
$array = array( 'date' => $this->lang->words['s_search_type_0'],
'title' => $this->lang->words['forum_sort_title'] );
return $array;
}
}
@@ -1,96 +1,96 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Formats forum search results
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Forums
* @link http://hatynka.in
* @version $Rev: 8644 $
*/
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 search_format_core extends search_format
{
/**
* Constructor
*
* @param object ipsRegistry
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
parent::__construct( $registry );
}
/**
* Parse search results
*
* @param array $r Search result
* @return array $html Blocks of HTML
*/
public function parseAndFetchHtmlBlocks( $rows )
{
return parent::parseAndFetchHtmlBlocks( $rows );
}
/**
* Formats the forum search result for display
*
* @param array $search_row Array of data
* @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content
*/
public function formatContent( $data )
{
return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->helpSearchResult( $data, IPSSearchRegistry::get('opt.searchType') == 'titles' ? true : false ), 0 );
}
/**
* Formats / grabs extra data for results
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
*
* @return array
*/
public function processResults( $ids )
{
$rows = array();
foreach( $ids as $i => $d )
{
$rows[ $i ] = $this->genericizeResults( $d );
}
return $rows;
}
/**
* Reassigns fields in a generic way for results output
*
* @param array $r
* @return array
*/
public function genericizeResults( $r )
{
$r['app'] = 'core';
$r['content'] = $r['title'];
$r['content_title'] = $r['description'];
$r['updated'] = 0;
$r['type_2'] = 'help';
$r['type_id_2'] = $r['id'];
return $r;
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Formats forum search results
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
*/
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 search_format_core extends search_format
{
/**
* Constructor
*
* @param object ipsRegistry
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
parent::__construct( $registry );
}
/**
* Parse search results
*
* @param array $r Search result
* @return array $html Blocks of HTML
*/
public function parseAndFetchHtmlBlocks( $rows )
{
return parent::parseAndFetchHtmlBlocks( $rows );
}
/**
* Formats the forum search result for display
*
* @param array $search_row Array of data
* @return mixed Formatted content, ready for display, or array containing a $sub section flag, and content
*/
public function formatContent( $data )
{
return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->helpSearchResult( $data, IPSSearchRegistry::get('opt.searchType') == 'titles' ? true : false ), 0 );
}
/**
* Formats / grabs extra data for results
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
*
* @return array
*/
public function processResults( $ids )
{
$rows = array();
foreach( $ids as $i => $d )
{
$rows[ $i ] = $this->genericizeResults( $d );
}
return $rows;
}
/**
* Reassigns fields in a generic way for results output
*
* @param array $r
* @return array
*/
public function genericizeResults( $r )
{
$r['app'] = 'core';
$r['content'] = $r['title'];
$r['content_title'] = $r['description'];
$r['updated'] = 0;
$r['type_2'] = 'help';
$r['type_id_2'] = $r['id'];
return $r;
}
}
@@ -1,10 +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>
<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>
@@ -1,10 +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>
<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>
@@ -2,11 +2,11 @@
/**
* @file plugin_attachments.php Shared media plugin: attachments
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: rtissier $
* @since 3/8/2011
* $LastChangedDate: 2011-03-16 19:10:59 -0400 (Wed, 16 Mar 2011) $
* @version v3.2.3
* @version v3.3.4
* $Revision: 8108 $
*/
@@ -3,18 +3,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Sphinx template file
* Last Updated: $Date: 2011-08-31 20:57:38 -0400 (Wed, 31 Aug 2011) $
* 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 This is NULLED!
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Forums
* @link http://hatynka.in
* @version $Rev: 9438 $
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
* @since 3.0.0
*
*/
@@ -32,14 +32,14 @@ $appSphinxTemplate = <<<EOF
source <!--SPHINX_CONF_PREFIX-->core_tags_search_main : <!--SPHINX_CONF_PREFIX-->ipb_source_config
{
# Set our forum PID counter
<!--SPHINX_DB_SET_NAMES-->
sql_query_pre = REPLACE INTO <!--SPHINX_DB_PREFIX-->cache_store VALUES( 'sphinx_core_tags_counter', (SELECT max(tag_id) FROM <!--SPHINX_DB_PREFIX-->core_tags), 0, UNIX_TIMESTAMP(), 0 )
# Query posts for the main source
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, t.tag_meta_area, \
p.tag_perm_text, p.tag_perm_visible \
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, REPLACE( t.tag_meta_area, '-', '_' ) as tag_meta_area, \
CONCAT( ',', p.tag_perm_text, ',') as tag_perm_text ,p.tag_perm_visible \
FROM <!--SPHINX_DB_PREFIX-->core_tags t \
LEFT JOIN <!--SPHINX_DB_PREFIX-->core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup ) \
WHERE t.tag_id <= ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_core_tags_counter' )
LEFT JOIN <!--SPHINX_DB_PREFIX-->core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup )
# Fields
sql_attr_uint = search_id
@@ -54,11 +54,12 @@ source <!--SPHINX_CONF_PREFIX-->core_tags_search_main : <!--SPHINX_CONF_PREFIX--
source <!--SPHINX_CONF_PREFIX-->core_tags_search_delta : <!--SPHINX_CONF_PREFIX-->core_tags_search_main
{
# Override the base sql_query_pre
<!--SPHINX_DB_SET_NAMES-->
sql_query_pre =
# Query posts for the main source
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, t.tag_meta_area, \
p.tag_perm_text, p.tag_perm_visible \
sql_query = SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, REPLACE( t.tag_meta_area, '-', '_' ) as tag_meta_area, \
CONCAT( ',', p.tag_perm_text, ',') as tag_perm_text ,p.tag_perm_visible \
FROM <!--SPHINX_DB_PREFIX-->core_tags t \
LEFT JOIN <!--SPHINX_DB_PREFIX-->core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup ) \
WHERE t.tag_id > ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_core_tags_counter' )
@@ -73,7 +74,7 @@ index <!--SPHINX_CONF_PREFIX-->core_tags_search_main
mlock = 0
morphology = none
min_word_len = 2
charset_type = utf-8
charset_type = sbcs
html_strip = 0
#infix_fields = tag_text
#min_infix_len = 3
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,62 @@
<?php
/**
* @file warnings.php Warnings extension for core
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $ (Original: Mark)
* @since -
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
*/
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 warnings_core
* @brief Warnings Extension for core
*/
class warnings_core
{
/**
* Get Content URL
*
* @param array $warning Row from members_warn_logs
* @return @e array array( url => URL to the content the warning came from, title => Title )
*/
public function getContentUrl( $warning )
{
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'public_profile' ), 'members' );
if ( $warning['wl_content_id1'] == 'mreport' )
{
$report = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'rc_reports_index', 'where' => "id=" . intval( $warning['wl_content_id2'] ) ) );
if ( ! empty($report['id']) )
{
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=reports&do=show_report&rid={$report['id']}" ), 'title' => $report['title'] );
}
}
elseif ( $warning['wl_content_id1'] == 'core-reports' )
{
$exploded = explode( '-', $warning['wl_content_id2'] );
require_once( IPS_ROOT_PATH . 'sources/classes/comments/bootstrap.php' );/*noLibHook*/
$comments = classes_comments_bootstrap::controller( $warning['wl_content_id1'] );
$parent = $comments->remapFromLocal( $comments->fetchParent( $exploded[0] ), 'parent' );
if ( ! empty($parent['parent_id']) )
{
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=global&section=comments&fromApp={$warning['wl_content_id1']}&do=findComment&parentId={$exploded[0]}&comment_id={$exploded[1]}" ), 'title' => $parent['parent_title'] );
}
}
return NULL;
}
}
+9 -9
View File
@@ -1,10 +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>
<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>
@@ -253,17 +253,17 @@ function IPB3TemplateDiffResults()
{
if ( json['data_type'] == 'css' )
{
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow:auto"><pre>' + json['data_content'] + '</pre></div></div>';
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow:auto;max-height: 575px;"><pre>' + json['data_content'] + '</pre></div></div>';
}
else
{
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_group'] + ' &gt; ' + json['data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow:auto"><pre>' + json['data_content'] + '</pre></div></div>';
content = '<div class="acp-box"><h3>' + _text + ': ' + json['data_group'] + ' &gt; ' + json['data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow:auto;max-height: 575px;"><pre>' + json['data_content'] + '</pre></div></div>';
}
max = document.viewport.getHeight();
max = ( max < 600 ) ? max : 600;
popup = new ipb.Popup('VPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '600px', h: max + 'px', initial: content } );
popup = new ipb.Popup('VPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '600px', h: max, initial: content } );
popup.show();
}
},
@@ -335,17 +335,17 @@ function IPB3TemplateDiffResults()
if ( json['change_data_type'] == 'css' )
{
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_title'] + '.css</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 575px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
}
else
{
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' &gt; ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
content = '<div class="acp-box"><h3>'+ _text + ': ' + json['change_data_group'] + ' &gt; ' + json['change_data_title'] + '</h3><div style="padding:4px;line-height:125%;overflow: auto;max-height: 575px;"><pre>' + json['change_data_content'] + '</pre></div>' + _qb + "</div>";
}
max = document.viewport.getHeight();
max = ( max < 600 ) ? max : 600;
IPB3TemplateDiffResults.popUps['preview-' + changeId ] = new ipb.Popup('diffPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: max + 'px', initial: content } );
IPB3TemplateDiffResults.popUps['preview-' + changeId ] = new ipb.Popup('diffPopUp', { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: max, initial: content } );
IPB3TemplateDiffResults.popUps['preview-' + changeId ].show();
/* Observe */
@@ -402,16 +402,16 @@ function IPB3TemplateDiffResults()
/* otherwise... */
if ( json['change_merge_content'] )
{
/* Ok, for some reason Safari (and possibly others) doesn't show the pop-up when viewing a
template bit. I presume it's because prototype/javascript will not insert invalid HTML into a node even
though it's encoded properly. After a few days working on merge, this is a quick hack to get it done
Force a 750px div in to position pop-up correctly on the screen, then once the pop-up has been created
shove the content in.
<3 javascript */
var _tmp = Math.floor( Math.random() * 1001 );
/* Ok, for some reason Safari (and possibly others) doesn't show the pop-up when viewing a
template bit. I presume it's because prototype/javascript will not insert invalid HTML into a node even
though it's encoded properly. After a few days working on merge, this is a quick hack to get it done
Force a 750px div in to position pop-up correctly on the screen, then once the pop-up has been created
shove the content in.
<3 javascript */
var _tmp = Math.floor( Math.random() * 1001 );
_qb = "<div style='float:left; margin-top:6px'><input type='button' id='mergeResolveCustom_" + _tmp + "' class='button __rc" + changeId + "' value='" + ipb.lang['resolveall_button'] + "' />&nbsp;<input type='button' id='mergeResolveNew_" + _tmp + "' class='button __rn" + changeId + "' value='" + ipb.lang['resolveall_newwin'] + "' /></div>";
_tb = '<textarea name="content" id="mergeContent" style="width:100%; height:700px; line-height:150%">' + json['change_merge_content'] + '</textarea>' + _qb + '<div style="text-align:right" class="acp-actionbar"><input type="button" id="mergeSubmit" value="' + ipb.lang['save_button'] + '" class="button primary __i' + changeId + '" /></div>';
_tb = '<textarea name="content" id="mergeContent" style="width:100%; height:500px; line-height:150%">' + json['change_merge_content'] + '</textarea>' + _qb + '<div style="text-align:right" class="acp-actionbar"><input type="button" id="mergeSubmit" value="' + ipb.lang['save_button'] + '" class="button primary __i' + changeId + '" /></div>';
if ( json['change_data_type'] == 'css' )
{
@@ -422,7 +422,7 @@ function IPB3TemplateDiffResults()
content = '<div class="acp-box"><h3>' + json['change_data_group'] + ' &gt; ' + json['change_data_title'] + '</h3><div style="padding:4px;">' + _tb + '</div></div>';
}
IPB3TemplateDiffResults.popUps['edit-' + changeId ] = new ipb.Popup('diffEditPopUp_' + _tmp, { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: '600px', initial: '<div style="height:750px">&nbsp;</div>' } );
IPB3TemplateDiffResults.popUps['edit-' + changeId ] = new ipb.Popup('diffEditPopUp_' + _tmp, { type: 'pane', modal: false, hideAtStart: true, w: '800px', h: 650, initial: '<div style="height:590px">&nbsp;</div>' } );
IPB3TemplateDiffResults.popUps['edit-' + changeId ].show();
$('diffEditPopUp_' + _tmp + '_inner').update( content );
@@ -611,10 +611,10 @@ function IPB3TemplateDiffResults()
alert( ipb.lang['oops'] + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
};
}
@@ -1,31 +1,31 @@
/************************************************/
/* IPB3 Javascript */
/* -------------------------------------------- */
/* acp.homepage.js - Homepage javascript */
/* (c) IPS, Inc 2008 */
/* -------------------------------------------- */
/* Author: Brandon Farber */
/************************************************/
ACPHomepage = {
/*------------------------------*/
/* Constructor */
init: function()
{
Debug.write("Initializing acp.homepage.js");
},
editMember: function()
{
if ( $('members_display_name').value == "" )
{
alert("Нужно ввести имя пользователя!");
return false;
}
return true;
}
};
/************************************************/
/* IPB3 Javascript */
/* -------------------------------------------- */
/* acp.homepage.js - Homepage javascript */
/* (c) IPS, Inc 2008 */
/* -------------------------------------------- */
/* Author: Brandon Farber */
/************************************************/
ACPHomepage = {
/*------------------------------*/
/* Constructor */
init: function()
{
Debug.write("Initializing acp.homepage.js");
},
editMember: function()
{
if ( $('members_display_name').value == "" )
{
alert("You must enter a username!");
return false;
}
return true;
}
};
ACPHomepage.init();
@@ -0,0 +1,55 @@
/************************************************/
/* IPB3 Javascript */
/* -------------------------------------------- */
/* acp.hooksList.js - Hooks listing */
/* (c) IPS, Inc 2011 */
/* -------------------------------------------- */
/* Author: Terabyte */
/************************************************/
var _hooksList = window.IPBACP;
_hooksList.prototype.hooksList = {
popups: [],
/*
* Init function
*/
init: function()
{
Debug.write("Initializing acp.hooksList.js");
document.observe("dom:loaded", function(){
acp.hooksList.initPage();
});
},
initPage: function()
{
$('install_new_hook').observe('click', acp.hooksList.addFolder);
},
addFolder: function( e, elem )
{
Event.stop(e);
if ( ! Object.isUndefined(acp.hooksList.popups['install']) )
{
acp.hooksList.popups['install'].show();
}
else
{
// Make a new popup
acp.hooksList.popups['install'] = new ipb.Popup( 'install', {
type: 'modal',
initial: ipb.templates['install_new_hook'].evaluate(),
w: '550px',
stem: false,
hideAtStart: false
});
}
}
};
acp.hooksList.init();
@@ -0,0 +1,55 @@
/************************************************/
/* IPB3 Javascript */
/* -------------------------------------------- */
/* acp.mmobileimages.js */
/* (c) IPS, Inc 2011 */
/* -------------------------------------------- */
/* Author: Matt Mecham */
/************************************************/
var _mobileImages = window.IPBACP;
_mobileImages.prototype.mobileImages = {
popups: [],
/*
* Init function
*/
init: function()
{
Debug.write("Initializing acp.mobileImages.js");
document.observe("dom:loaded", function(){
acp.mobileImages.initPage();
});
},
initPage: function()
{
$('importXml').observe('click', acp.mobileImages.importPop);
},
importPop: function( e, elem )
{
Event.stop(e);
if ( ! Object.isUndefined(acp.mobileImages.popups['install']) )
{
acp.mobileImages.popups['install'].show();
}
else
{
// Make a new popup
acp.mobileImages.popups['install'] = new ipb.Popup( 'install', {
type: 'modal',
initial: ipb.templates['import_xml'].evaluate(),
w: '550px',
stem: false,
hideAtStart: false
});
}
}
};
acp.mobileImages.init();
+9 -9
View File
@@ -1,10 +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>
<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>
+17 -17
View File
@@ -85,11 +85,11 @@ function IPBCSS()
}
else
{
alert( "Похоже у нас проблемы: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -133,21 +133,21 @@ function IPBCSS()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Message: " + json['errors'] );
}
else
{
alert("Сохранено!");
alert("Error:: Saved!");
}
}
}
else
{
alert( "Похоже у нас проблемы: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -159,14 +159,14 @@ function IPBCSS()
/* Make sure we're mean it... */
if ( $('tplate_cssRow_' + css_id ).hasClassName( 'tplateRow_new') )
{
if ( ! confirm( "Удалить CSS файл ?\nФайл будет удален из ВСЕХ стилей!" ) )
if ( ! confirm( "REMOVE CSS file?\n This will remove this template bit in ALL skins!" ) )
{
return false;
}
}
else
{
if ( ! confirm( "Отменить изменения в CSS файле ?\nВсе изменения будут утеряны!" ) )
if ( ! confirm( "Revert CSS file?\n All changes WILL be lost!" ) )
{
return false;
}
@@ -196,17 +196,17 @@ function IPBCSS()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Error:: " + json['errors'] );
}
}
}
else
{
alert( "Похоже у нас проблемы: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -239,11 +239,11 @@ function IPBCSS()
}
else
{
alert( "Похоже у нас проблемы: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
+418 -389
View File
@@ -1,390 +1,419 @@
function addAnotherRequirement()
{
requireIndex = parseInt(requireIndex) + 1;
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getApplications&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + requireIndex + "&name=requireApp";
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function ( t )
{
var newApp = ipb.templates['new_app_require'].evaluate({ index: requireIndex, dropdown: t.responseText });
if ( $('RequirementsContainer').down('tbody') )
{
$('RequirementsContainer').down('tbody').insert( newApp );
}
else
{
$('RequirementsContainer').insert( newApp );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
function removeRequirement( idToRemove )
{
idToRemove = parseInt(idToRemove);
if( $('requirementTitleRow_' + idToRemove ) != null )
{
$('requirementTitleRow_' + idToRemove ).remove();
}
if( $('requirementRow_' + idToRemove ) != null )
{
$('requirementRow_' + idToRemove ).remove();
}
}
function addAnotherFile()
{
elementIndex = parseInt(elementIndex) + 1;
var newFile = ipb.templates['new_hook_file'].evaluate({ index: elementIndex });
if ( $('fileTableContainer').down('tbody') )
{
$('fileTableContainer').down('tbody').insert( newFile );
}
else
{
$('fileTableContainer').insert( newFile );
}
}
function removeFile( elementIndex )
{
elementIndex = parseInt(elementIndex);
if( $('fileRow_' + elementIndex ) != null )
{
$('fileRow_' + elementIndex ).remove();
}
}
function selectHookType( elementIndex )
{
var type = $F('hook_type[' + elementIndex + ']');
if( $('tr_classToOverload[' + elementIndex + ']') != null )
{
$('tr_classToOverload[' + elementIndex + ']').remove();
}
if( $('tr_skinGroup[' + elementIndex + ']') != null )
{
$('tr_skinGroup[' + elementIndex + ']').remove();
}
if( $('tr_skinFunction[' + elementIndex + ']') != null )
{
$('tr_skinFunction[' + elementIndex + ']').remove();
}
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
if( $('tr_dataLocation[' + elementIndex + ']') != null )
{
$('tr_dataLocation[' + elementIndex + ']').remove();
}
if( $('tr_libApplication[' + elementIndex + ']') != null )
{
$('tr_libApplication[' + elementIndex + ']').remove();
}
if( type == 'templateHooks' )
{
// Show the skin dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getGroupsForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_skinGroup'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type == 'dataHooks' )
{
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getDataLocationsForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_dataLocation'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type == 'libraryHooks' )
{
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getApplications&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var replace = { index: elementIndex, dropdown: t.responseText };
var newRow = ipb.templates['hook_classToOverload'].evaluate(replace) + ipb.templates['hook_libApplication'].evaluate(replace);
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type != '0' )
{
// Show the classToOverload field
var newRow = ipb.templates['hook_classToOverload'].evaluate({ index: elementIndex });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
}
}
function getTemplatesForAdd( elementIndex )
{
var type = $F('skinGroup[' + elementIndex + ']');
if( $('tr_skinFunction[' + elementIndex + ']') != null )
{
$('tr_skinFunction[' + elementIndex + ']').remove();
}
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Got a type? */
if( type != '0' )
{
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getTemplatesForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&group=" + type;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_skinFunction'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
function getTypeOfHook( elementIndex )
{
var template = $F('skinFunction[' + elementIndex + ']');
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Insert the new hook type row */
if ( template != '0' )
{
var newRow = ipb.templates['hook_pointTypes'].evaluate({ index: elementIndex });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
}
}
function getHookIds( elementIndex )
{
var template = $F('skinFunction[' + elementIndex + ']');
var type = $F('type[' + elementIndex + ']');
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Got a type? */
if( type != '0' )
{
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getHookIds&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&type=" + type + "&template=" + template;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_pointIds'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
function getHookEntryPoints( elementIndex )
{
var type = $F('type[' + elementIndex + ']');
Debug.write( type );
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
var options = '';
if( type == 'foreach' )
{
options += "<option value='outer.pre'>(outer.pre) " + ipb.lang['a_outerpre'] + "</option>";
options += "<option value='inner.pre'>(inner.pre) " + ipb.lang['a_innerpre'] + "</option>";
options += "<option value='inner.post'>(inner.post) " + ipb.lang['a_innerpost']+ "</option>";
options += "<option value='outer.post'>(outer.post) " + ipb.lang['a_outerpost']+ "</option>";
}
else
{
options += "<option value='pre.startif'>(pre.startif) " + ipb.lang['a_prestartif'] + "</option>";
options += "<option value='post.startif'>(post.startif) " + ipb.lang['a_poststartif'] + "</option>";
options += "<option value='pre.else'>(pre.else) " + ipb.lang['a_preelse'] + "</option>";
options += "<option value='post.else'>(post.else) " + ipb.lang['a_postelse'] + "</option>";
options += "<option value='pre.endif'>(pre.endif) " + ipb.lang['a_preendif'] + "</option>";
options += "<option value='post.endif'>(post.endif) " + ipb.lang['a_postendif'] + "</option>";
}
/* Insert the new hook type row */
//if ( type != '0' )
//{
var newRow = ipb.templates['hook_pointLocation'].evaluate({ index: elementIndex, hookPoints: options });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
//}
function addAnotherRequirement()
{
requireIndex = parseInt(requireIndex) + 1;
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getApplications&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + requireIndex + "&name=requireApp";
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function ( t )
{
var newApp = ipb.templates['new_app_require'].evaluate({ index: requireIndex, dropdown: t.responseText });
if ( $('RequirementsContainer').down('tbody') )
{
$('RequirementsContainer').down('tbody').insert( newApp );
}
else
{
$('RequirementsContainer').insert( newApp );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
function getAppVersions( getIndex )
{
getIndex = parseInt(getIndex);
indexValue = $F('requireApp[' + getIndex + ']');
// Show the versions dropdowns now
if ( indexValue == 0 )
{
$('requirementRow_' + getIndex + '_versions').update('');
}
else
{
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getAppVersions&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + getIndex + "&chosenApp=" + indexValue;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function ( t )
{
$('requirementRow_' + getIndex + '_versions').update( t.responseText );
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
function removeRequirement( idToRemove )
{
idToRemove = parseInt(idToRemove);
if( $('requirementTitleRow_' + idToRemove ) != null )
{
$('requirementTitleRow_' + idToRemove ).remove();
}
if( $('requirementRow_' + idToRemove ) != null )
{
$('requirementRow_' + idToRemove ).remove();
}
}
function addAnotherFile()
{
elementIndex = parseInt(elementIndex) + 1;
var newFile = ipb.templates['new_hook_file'].evaluate({ index: elementIndex });
if ( $('fileTableContainer').down('tbody') )
{
$('fileTableContainer').down('tbody').insert( newFile );
}
else
{
$('fileTableContainer').insert( newFile );
}
}
function removeFile( elementIndex )
{
elementIndex = parseInt(elementIndex);
if( $('fileRow_' + elementIndex ) != null )
{
$('fileRow_' + elementIndex ).remove();
}
}
function selectHookType( elementIndex )
{
var type = $F('hook_type[' + elementIndex + ']');
if( $('tr_classToOverload[' + elementIndex + ']') != null )
{
$('tr_classToOverload[' + elementIndex + ']').remove();
}
if( $('tr_skinGroup[' + elementIndex + ']') != null )
{
$('tr_skinGroup[' + elementIndex + ']').remove();
}
if( $('tr_skinFunction[' + elementIndex + ']') != null )
{
$('tr_skinFunction[' + elementIndex + ']').remove();
}
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
if( $('tr_dataLocation[' + elementIndex + ']') != null )
{
$('tr_dataLocation[' + elementIndex + ']').remove();
}
if( $('tr_libApplication[' + elementIndex + ']') != null )
{
$('tr_libApplication[' + elementIndex + ']').remove();
}
if( type == 'templateHooks' )
{
// Show the skin dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getGroupsForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_skinGroup'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type == 'dataHooks' )
{
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getDataLocationsForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_dataLocation'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type == 'libraryHooks' )
{
// Show the data location dropdown now
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getApplications&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var replace = { index: elementIndex, dropdown: t.responseText };
var newRow = ipb.templates['hook_classToOverload'].evaluate(replace) + ipb.templates['hook_libApplication'].evaluate(replace);
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
else if( type != '0' )
{
// Show the classToOverload field
var newRow = ipb.templates['hook_classToOverload'].evaluate({ index: elementIndex });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
}
}
function getTemplatesForAdd( elementIndex )
{
var type = $F('skinGroup[' + elementIndex + ']');
if( $('tr_skinFunction[' + elementIndex + ']') != null )
{
$('tr_skinFunction[' + elementIndex + ']').remove();
}
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Got a type? */
if( type != '0' )
{
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getTemplatesForAdd&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&group=" + type;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_skinFunction'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
function getTypeOfHook( elementIndex )
{
var template = $F('skinFunction[' + elementIndex + ']');
if( $('tr_type[' + elementIndex + ']') != null )
{
$('tr_type[' + elementIndex + ']').remove();
}
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Insert the new hook type row */
if ( template != '0' )
{
var newRow = ipb.templates['hook_pointTypes'].evaluate({ index: elementIndex });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
}
}
function getHookIds( elementIndex )
{
var template = $F('skinFunction[' + elementIndex + ']');
var type = $F('type[' + elementIndex + ']');
var group = $F('skinGroup[' + elementIndex + ']');
if( $('tr_id[' + elementIndex + ']') != null )
{
$('tr_id[' + elementIndex + ']').remove();
}
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
/* Got a type? */
if( type != '0' )
{
url = ipb.vars['base_url'] + "app=core&amp;module=ajax&amp;section=hooks&amp;do=getHookIds&amp;secure_key=" + ipb.vars['md5_hash'] + "&i=" + elementIndex + "&type=" + type + "&template=" + template + "&group=" + group;
url = url.replace( /&amp;/g, '&' );
new Ajax.Request( url,
{
method: 'GET',
onSuccess: function (t )
{
var newRow = ipb.templates['hook_pointIds'].evaluate({ index: elementIndex, dropdown: t.responseText });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
},
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
}
}
function getHookEntryPoints( elementIndex )
{
var type = $F('type[' + elementIndex + ']');
Debug.write( type );
if( $('tr_position[' + elementIndex + ']') != null )
{
$('tr_position[' + elementIndex + ']').remove();
}
var options = '';
if( type == 'foreach' )
{
options += "<option value='outer.pre'>(outer.pre) " + ipb.lang['a_outerpre'] + "</option>";
options += "<option value='inner.pre'>(inner.pre) " + ipb.lang['a_innerpre'] + "</option>";
options += "<option value='inner.post'>(inner.post) " + ipb.lang['a_innerpost']+ "</option>";
options += "<option value='outer.post'>(outer.post) " + ipb.lang['a_outerpost']+ "</option>";
}
else
{
options += "<option value='pre.startif'>(pre.startif) " + ipb.lang['a_prestartif'] + "</option>";
options += "<option value='post.startif'>(post.startif) " + ipb.lang['a_poststartif'] + "</option>";
options += "<option value='pre.else'>(pre.else) " + ipb.lang['a_preelse'] + "</option>";
options += "<option value='post.else'>(post.else) " + ipb.lang['a_postelse'] + "</option>";
options += "<option value='pre.endif'>(pre.endif) " + ipb.lang['a_preendif'] + "</option>";
options += "<option value='post.endif'>(post.endif) " + ipb.lang['a_postendif'] + "</option>";
}
/* Insert the new hook type row */
//if ( type != '0' )
//{
var newRow = ipb.templates['hook_pointLocation'].evaluate({ index: elementIndex, hookPoints: options });
if ( $('fileTable_' + elementIndex).down('tbody') )
{
$('fileTable_' + elementIndex).down('tbody').insert( newRow );
}
else
{
$('fileTable_' + elementIndex).insert( newRow );
}
//}
}
@@ -217,14 +217,14 @@ function IPBTemplateDiff()
*/
this.timeOutAjax = function( t )
{
if ( confirm( "Нет ответа от сервера.\nХотите подождать?" ) )
if ( confirm( "No response from the webserver.\nDo you wish to continue waiting?" ) )
{
return true;
}
else
{
t.transport.abort();
alert( "Запрос отменен" );
alert( "Request Cancelled" );
}
};
@@ -233,7 +233,7 @@ function IPBTemplateDiff()
*/
this.failureAjax = function( t )
{
alert( "Ошибка: " + t.responseText );
alert( "Failure: " + t.responseText );
};
/**
@@ -241,7 +241,7 @@ function IPBTemplateDiff()
*/
this.exceptionAjax = function( t )
{
alert( "Исключение: " + t.responseText );
alert( "Exception: " + t.responseText );
};
/**
@@ -255,7 +255,7 @@ function IPBTemplateDiff()
/* Not a JSON response? */
if ( ! t.responseText.match( /^(\s+?)?\{/ ) )
{
alert( "Ошибка:\n" + t.responseText );
alert( "Error:\n" + t.responseText );
Debug.write( t );
return;
}
@@ -265,7 +265,7 @@ function IPBTemplateDiff()
if ( json['error'] )
{
alert( "Ошибка: " . json['error'] );
alert( "An error occurred: " . json['error'] );
return false;
}
@@ -102,11 +102,11 @@ function IPBTemplateSandR()
}
else
{
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -161,22 +161,22 @@ function IPBTemplateSandR()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Message: " + json['errors'] );
}
else
{
$('replaceButton').disabled = false;
$('replaceButton').value = "Заменить выбранные";
$('replaceButton').value = "Replace Selected";
}
}
}
else
{
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -218,7 +218,7 @@ function IPBTemplateSandR()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Message: " + json['errors'] );
}
else
{
@@ -228,11 +228,11 @@ function IPBTemplateSandR()
}
else
{
alert( "Галектеко ОПАСНОСТЕ! ПЫЩПЫЩ!11: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
//onException: function( f,e ){ alert( "Исключение: " + e ) },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
//onException: function( f,e ){ alert( "Exception: " + e ) },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -303,7 +303,7 @@ function IPBTemplateSandR()
for( i = 0 ; i < json['templates'].length; i++ )
{
_output += _tplate.evaluate( json['templates'][i] );
};
}
/* Clear out any current listing */
$$( '#groupRowTemplates_' + groupName + " table.ipsTable" ).each( function(elem) {
@@ -328,7 +328,7 @@ function IPBTemplateSandR()
/* Checked, please? */
IPB3TemplatesSandR.toggleGroupBox( json['templates'][i]['template_group'] );
}
};
}
};
/**
@@ -103,11 +103,11 @@ function IPBTemplates()
}
else
{
alert( "Ошибка: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -169,11 +169,11 @@ function IPBTemplates()
}
else
{
alert( "Ошибка: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -222,21 +222,21 @@ function IPBTemplates()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Error:: " + json['errors'] );
}
else
{
alert("Сохранено!");
alert("Error:: Saved!");
}
}
}
else
{
alert( "Ошибка: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -248,14 +248,14 @@ function IPBTemplates()
/* Make sure we're mean it... */
if ( $('tplate_templaterow_' + template_id ).hasClassName( 'tplateRow_new') )
{
if ( ! confirm( "Удалить шаблон?\n Произойдет удаление шаблона из ВСЕХ стилей!" ) )
if ( ! confirm( "REMOVE template bit?\n This will remove this template bit in ALL skins!" ) )
{
return false;
}
}
else
{
if ( ! confirm( "Откатить изменения?\n Все изменения БУДУТ УТРАЧЕНЫ!" ) )
if ( ! confirm( "Revert template bit?\n All changes WILL be lost!" ) )
{
return false;
}
@@ -295,17 +295,17 @@ function IPBTemplates()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Error:: " + json['errors'] );
}
}
}
else
{
alert( "Ошибка: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -338,11 +338,11 @@ function IPBTemplates()
}
else
{
alert( "Ошибка: " + t.responseText );
alert( "Ooops. Something went wrong. Does this help?: " + t.responseText );
}
},
onException: function( f,e ){ alert( "Исключение: " + e ); },
onFailure: function( t ){ alert( "Ошибка: " + t.responseText ); }
onException: function( f,e ){ alert( "Exception: " + e ); },
onFailure: function( t ){ alert( "Failure: " + t.responseText ); }
} );
};
@@ -499,7 +499,7 @@ function IPBTemplates()
}
_output += _tplate.evaluate( json['templates'][i] );
};
}
/* Write it out */
$('tplate_bitList').update( _output );
@@ -124,11 +124,11 @@ function IPBUAgents()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Error:: " + json['errors'] );
}
else
{
alert("Сохранено!");
alert("Error:: Saved!");
}
}
}
@@ -179,7 +179,7 @@ function IPBUAgents()
if ( json['errors'] )
{
/* Something inline would be very nice here.. rather than this ugly alert */
alert("Ошибка: " + json['errors'] );
alert("Error:: " + json['errors'] );
}
}
}
@@ -249,7 +249,7 @@ function IPBUAgents()
{
_box.selectedIndex = i;
}
};
}
ipb.positionCenter( 'tplate_editor_' + uagent_id );
};
@@ -1,226 +1,246 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Template comparison
* Last Updated: $Date: 2011-07-12 10:53:25 -0400 (Tue, 12 Jul 2011) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Friday 19th May 2006 17:33
* @version $Revision: 9208 $
*/
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_ajax_compare extends ipsAjaxCommand
{
/**
* Skin functions object handle
*
* @var object
*/
protected $skinFunctions;
/**
* HTML Skin object
*
* @var object
*/
protected $html;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinDifferences.php' );/*noLibHook*/
$this->skinFunctions = new skinDifferences( $registry );
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_templates');
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
case 'css':
$this->_getCssDifferences();
break;
default:
case 'differences':
$this->_getDifferences();
break;
}
}
/**
* Get differences of a CSS file
*
* @return @e void
*/
protected function _getCssDifferences()
{
//-----------------------------------------
// Init
//-----------------------------------------
$setID = intval($this->request['setID']);
$fileID = intval($this->request['file_id']);
//-----------------------------------------
// Get requested
//-----------------------------------------
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_css', 'where' => 'css_id=' . $fileID ) );
if( $current['css_id'] )
{
//-----------------------------------------
// Get the original
//-----------------------------------------
$set = $this->DB->buildAndFetch( array( 'select' => 'set_master_key', 'from' => 'skin_collections', 'where' => 'set_id=' . $current['css_set_id'] ) );
$set['set_master_key'] = $set['set_master_key'] ? $set['set_master_key'] : 'root';
$original = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_css', 'where' => "css_set_id=0 AND css_master_key='{$set['set_master_key']}' AND css_group='{$current['css_group']}'" ) );
}
else
{
$original['css_content'] = $current['css_content'];
}
//-----------------------------------------
// Get Diff library
//-----------------------------------------
require_once( IPS_KERNEL_PATH . 'classDifference.php' );/*noLibHook*/
$classDifference = new classDifference();
$classDifference->method = 'PHP';
$difference = $classDifference->getDifferences( $original['css_content'], $current['css_content'] );
if( $classDifference->diff_found )
{
$difference = str_replace( "\n", "<br>", $difference );
$difference = str_replace( "&gt;&lt;", "&gt;\n&lt;" ,$difference );
$difference = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", "&nbsp;" ,$difference );
$difference = str_replace( "\t", "&nbsp; &nbsp; ", $difference );
}
else
{
$difference = htmlspecialchars($current['css_content']);
$difference = str_replace( ' ', '&nbsp;', $difference );
$difference = str_replace( "\r", '<br />', $difference );
$difference = str_replace( "\n", '<br />', $difference );
$difference = str_replace( "&gt;&lt;", "&gt;\n&lt;" ,$difference );
$difference = str_replace( "\t", "&nbsp; &nbsp; ", $difference );
}
$this->returnHtml( $this->html->differenceResult( $difference ) );
}
/**
* Get differences of a template
*
* @return @e void
*/
protected function _getDifferences()
{
//-----------------------------------------
// Init
//-----------------------------------------
$setID = intval($this->request['setID']);
$templateID = intval($this->request['template_id']);
//-----------------------------------------
// Get requested
//-----------------------------------------
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'template_id=' . $templateID ) );
if( $current['template_set_id'] )
{
//-----------------------------------------
// Get the original
//-----------------------------------------
$set = $this->DB->buildAndFetch( array( 'select' => 'set_master_key', 'from' => 'skin_collections', 'where' => 'set_id=' . $current['template_set_id'] ) );
$set['set_master_key'] = $set['set_master_key'] ? $set['set_master_key'] : 'root';
$original = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "template_set_id=0 AND template_master_key='{$set['set_master_key']}' AND template_group='{$current['template_group']}' AND template_name='{$current['template_name']}'" ) );
}
else
{
$original['template_content'] = $current['template_content'];
}
//-----------------------------------------
// Get Diff library
//-----------------------------------------
require_once( IPS_KERNEL_PATH . 'classDifference.php' );/*noLibHook*/
$classDifference = new classDifference();
$classDifference->method = 'PHP';
$difference = $classDifference->getDifferences( $original['template_content'], $current['template_content'] );
if( $classDifference->diff_found )
{
$difference = str_replace( "\n", "<br>", $difference );
$difference = str_replace( "&gt;&lt;", "&gt;\n&lt;" ,$difference );
$difference = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", "&nbsp;" ,$difference );
$difference = str_replace( "\t", "&nbsp; &nbsp; ", $difference );
}
else
{
$difference = htmlspecialchars($current['template_content']);
$difference = str_replace( ' ', '&nbsp;', $difference );
$difference = str_replace( "\r", '<br />', $difference );
$difference = str_replace( "\n", '<br />', $difference );
$difference = str_replace( "&gt;&lt;", "&gt;\n&lt;" ,$difference );
$difference = str_replace( "\t", "&nbsp; &nbsp; ", $difference );
}
$this->returnHtml( $this->html->differenceResult( $difference ) );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Template comparison
* 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 Friday 19th May 2006 17:33
* @version $Revision: 10914 $
*/
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_ajax_compare extends ipsAjaxCommand
{
/**
* Skin functions object handle
*
* @var object
*/
protected $skinFunctions;
/**
* HTML Skin object
*
* @var object
*/
protected $html;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinDifferences.php' );/*noLibHook*/
$this->skinFunctions = new skinDifferences( $registry );
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_templates');
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
case 'css':
$this->_getCssDifferences();
break;
default:
case 'differences':
$this->_getDifferences();
break;
}
}
/**
* Get differences of a CSS file
*
* @return @e void
*/
protected function _getCssDifferences()
{
//-----------------------------------------
// Init
//-----------------------------------------
$setID = intval($this->request['setID']);
$fileID = intval($this->request['file_id']);
//-----------------------------------------
// Get requested
//-----------------------------------------
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_css', 'where' => 'css_id=' . $fileID ) );
if( $current['css_id'] )
{
//-----------------------------------------
// Get the original
//-----------------------------------------
$set = $this->DB->buildAndFetch( array( 'select' => 'set_master_key', 'from' => 'skin_collections', 'where' => 'set_id=' . $current['css_set_id'] ) );
$set['set_master_key'] = $set['set_master_key'] ? $set['set_master_key'] : 'root';
$original = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_css', 'where' => "css_set_id=0 AND css_master_key='{$set['set_master_key']}' AND css_group='{$current['css_group']}'" ) );
}
else
{
$original['css_content'] = $current['css_content'];
}
//-----------------------------------------
// Get Diff library
//-----------------------------------------
require_once( IPS_KERNEL_PATH . 'classDifference.php' );/*noLibHook*/
$classDifference = new classDifference();
$classDifference->method = 'PHP';
$difference = $classDifference->getDifferences( $original['css_content'], $current['css_content'] );
if( $classDifference->diff_found )
{
$difference = str_replace( "\n", "<br>", $difference );
$difference = str_replace( "&gt;&lt;", "&gt;\n&lt;" ,$difference );
$difference = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", "&nbsp;" ,$difference );
$difference = str_replace( "\t", "&nbsp; &nbsp; ", $difference );
}
else
{
$difference = htmlspecialchars($current['css_content']);
$difference = str_replace( ' ', '&nbsp;', $difference );
$difference = str_replace( "\r", '<br />', $difference );
$difference = str_replace( "\n", '<br />', $difference );
$difference = str_replace( "&gt;&lt;", "&gt;\n&lt;" ,$difference );
$difference = str_replace( "\t", "&nbsp; &nbsp; ", $difference );
}
$this->returnHtml( $this->html->differenceResult( $difference ) );
}
/**
* Get differences of a template
*
* @return @e void
*/
protected function _getDifferences()
{
//-----------------------------------------
// Init
//-----------------------------------------
$setID = intval($this->request['setID']);
$templateID = intval($this->request['template_id']);
//-----------------------------------------
// Get requested
//-----------------------------------------
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_templates', 'where' => 'template_id=' . $templateID ) );
if( $current['template_set_id'] )
{
//-----------------------------------------
// Get the original
//-----------------------------------------
$set = $this->DB->buildAndFetch( array( 'select' => 'set_master_key', 'from' => 'skin_collections', 'where' => 'set_id=' . $current['template_set_id'] ) );
$set['set_master_key'] = $set['set_master_key'] ? $set['set_master_key'] : 'root';
$original = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_templates', 'where' => "template_set_id=0 AND template_master_key='{$set['set_master_key']}' AND template_group='{$current['template_group']}' AND template_name='{$current['template_name']}'" ) );
}
else
{
$original['template_content'] = $current['template_content'];
}
//-----------------------------------------
// Get Diff library
//-----------------------------------------
require_once( IPS_KERNEL_PATH . 'classDifference.php' );/*noLibHook*/
$classDifference = new classDifference();
$classDifference->method = 'PHP';
$difference = $classDifference->getDifferences( $original['template_content'], $current['template_content'], 'unified' );
if ( 1 == 1 )
{
$difference = str_replace( array( "\r\n", "\r" ), "\n", $difference );
$difference = preg_replace( '#(^|\n)(\-|\+)([^\n]+?)\n#', "\n\\1\\2\\3\n\n", $difference );
$difference = htmlspecialchars( $difference );
$difference = preg_replace( '#^@@([^@]+?)@@#m', '', $difference );
$difference = preg_replace( '#(^|\n)\-([^\n]+?)\n#', "\\1<del>\\2</del>\n", $difference );
$difference = preg_replace( '#(^|\n)\+([^\n]+?)\n#', "\\1<ins>\\2</ins>\n", $difference );
$difference = str_replace( "</ins>\n\n", "</ins>\n", $difference );
$difference = str_replace( "</del>\n", '</del>', $difference );
$difference = str_replace( "\n\n<ins>", "\n<ins>", $difference );
$difference = str_replace( "\n\n<del>", "\n<del>", $difference );
$difference = '<pre>' . $difference . '</pre>';
}
else
{
if( $classDifference->diff_found )
{
$difference = str_replace( "\n", "<br>", $difference );
$difference = str_replace( "&gt;&lt;", "&gt;\n&lt;" ,$difference );
$difference = preg_replace( "#(?<!(\<del|\<ins)) {1}(?!:style)#i", "&nbsp;" ,$difference );
$difference = str_replace( "\t", "&nbsp; &nbsp; ", $difference );
}
else
{
$difference = htmlspecialchars($current['template_content']);
$difference = str_replace( ' ', '&nbsp;', $difference );
$difference = str_replace( "\r", '<br />', $difference );
$difference = str_replace( "\n", '<br />', $difference );
$difference = str_replace( "&gt;&lt;", "&gt;\n&lt;" ,$difference );
$difference = str_replace( "\t", "&nbsp; &nbsp; ", $difference );
}
}
$this->returnHtml( $this->html->differenceResult( $difference ) );
}
}
@@ -1,274 +1,274 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Friday 19th May 2006 17:33
* @version $Revision: 8644 $
*/
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_ajax_css extends ipsAjaxCommand
{
/**
* Skin functions object handle
*
* @var object
*/
protected $skinFunctions;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
$this->skinFunctions = new skinCaching( $registry );
/* Check... */
if ( ! $registry->getClass('class_permissions')->checkPermission( 'css_manage', ipsRegistry::$current_application, 'templates' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
exit();
}
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
case 'getCSSGroups':
$this->_getCSSGroups();
break;
case 'getCSSForEdit':
$this->_getCSSForEdit();
break;
case 'saveCSS':
$this->_saveCSS();
break;
case 'revertCSS':
/* Check... */
if ( !$registry->getClass('class_permissions')->checkPermission( 'css_delete', ipsRegistry::$current_application, 'templates' ) )
{
$this->returnJsonError( $registry->lang->words['sk_ajax_noperm'] );
exit();
}
$this->_revertCSS();
break;
}
}
/**
* Reverts CSS
*
* @return string Json
*/
protected function _revertCSS()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$cssID = intval( $this->request['css_id'] );
$fromDelete = intval( $this->request['fromDelete'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $cssID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
exit();
}
//-----------------------------------------
// Get template data
//-----------------------------------------
$css = $this->skinFunctions->revertCSS( $cssID, $setID, $fromDelete );
$this->returnJsonArray( array( 'cssData' => $css, 'errors' => $this->skinFunctions->fetchErrorMessages() ) );
}
/**
* Saves the CSS
*
* @return string Json
*/
protected function _saveCSS()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$cssID = intval( $this->request['css_id'] );
$type = ( $this->request['type'] == 'add' ) ? 'add' : 'edit';
$css_content = $_POST['css_content'];
$css_group = IPSText::alphanumericalClean( $_POST['_css_group'] );
$css_position = intval( $this->request['css_position'] );
$css_attributes = $_POST['css_attributes'];
$css_app = IPSText::alphanumericalClean( $_POST['css_app'] );
$css_app_hide = intval( $this->request['css_app_hide'] );
$css_modules = trim( $this->request['css_modules'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ( $type == 'edit' AND ! $cssID ) )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
exit();
}
//-----------------------------------------
// Add checks
//-----------------------------------------
if ( $type == 'add' )
{
if ( ! $css_group )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
exit();
}
}
//-----------------------------------------
// Save it
//-----------------------------------------
if ( $type == 'edit' )
{
$css_id = $this->skinFunctions->saveCSSFromEdit( $cssID, $setID, $css_content, $css_group, $css_position, $css_attributes, $css_app, $css_app_hide, $css_modules );
}
else
{
try
{
$css_id = $this->skinFunctions->saveCSSFromAdd( $setID, $css_content, str_replace( '.css', '', $css_group ), $css_position, $css_attributes, $css_app, $css_app_hide, $css_modules );
}
catch( Exception $err )
{
$this->returnJsonError( $err->getMessage() );
exit();
}
}
//-----------------------------------------
// Get Data
//-----------------------------------------
$css = $this->skinFunctions->fetchCSSForEdit( $css_id, $setID );
$this->returnJsonArray( array( 'cssData' => $css, 'errors' => $this->skinFunctions->fetchErrorMessages() ) );
}
/**
* Fetch a JSON list of template data ready for editing
*
* @return string Json
*/
protected function _getCSSForEdit()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$cssID = intval( $this->request['css_id'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $cssID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
exit();
}
//-----------------------------------------
// Get template data
//-----------------------------------------
$css = $this->skinFunctions->fetchCSSForEdit( $cssID, $setID );
$this->returnJsonArray( array( 'cssData' => $css ) );
}
/**
* Fetch a JSON list of CSS group names
*
* @return string Json
*/
protected function _getCSSGroups()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
exit();
}
//-----------------------------------------
// Get CSS
//-----------------------------------------
$_css = $this->skinFunctions->fetchCSS( $setID );
//-----------------------------------------
// Fix up positioning
//-----------------------------------------
foreach( $_css as $_id => $_data )
{
unset( $_data['css_content'] );
$css[ $_data['css_position'] . '.' . $_data['css_id'] ] = $_data;
}
ksort( $css, SORT_NUMERIC );
$this->returnJsonArray( array( 'css' => $css ) );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* AJAX Functions For applications/core/js/ipb3CSS.js file
* 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 Friday 19th May 2006 17:33
* @version $Revision: 10914 $
*/
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_ajax_css extends ipsAjaxCommand
{
/**
* Skin functions object handle
*
* @var object
*/
protected $skinFunctions;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
$this->skinFunctions = new skinCaching( $registry );
/* Check... */
if ( ! $registry->getClass('class_permissions')->checkPermission( 'css_manage', ipsRegistry::$current_application, 'templates' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
exit();
}
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
case 'getCSSGroups':
$this->_getCSSGroups();
break;
case 'getCSSForEdit':
$this->_getCSSForEdit();
break;
case 'saveCSS':
$this->_saveCSS();
break;
case 'revertCSS':
/* Check... */
if ( !$registry->getClass('class_permissions')->checkPermission( 'css_delete', ipsRegistry::$current_application, 'templates' ) )
{
$this->returnJsonError( $registry->lang->words['sk_ajax_noperm'] );
exit();
}
$this->_revertCSS();
break;
}
}
/**
* Reverts CSS
*
* @return string Json
*/
protected function _revertCSS()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$cssID = intval( $this->request['css_id'] );
$fromDelete = intval( $this->request['fromDelete'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $cssID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
exit();
}
//-----------------------------------------
// Get template data
//-----------------------------------------
$css = $this->skinFunctions->revertCSS( $cssID, $setID, $fromDelete );
$this->returnJsonArray( array( 'cssData' => $css, 'errors' => $this->skinFunctions->fetchErrorMessages() ) );
}
/**
* Saves the CSS
*
* @return string Json
*/
protected function _saveCSS()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$cssID = intval( $this->request['css_id'] );
$type = ( $this->request['type'] == 'add' ) ? 'add' : 'edit';
$css_content = $_POST['css_content'];
$css_group = IPSText::alphanumericalClean( $_POST['_css_group'] );
$css_position = intval( $this->request['css_position'] );
$css_attributes = $_POST['css_attributes'];
$css_app = IPSText::alphanumericalClean( $_POST['css_app'] );
$css_app_hide = intval( $this->request['css_app_hide'] );
$css_modules = trim( $this->request['css_modules'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ( $type == 'edit' AND ! $cssID ) )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
exit();
}
//-----------------------------------------
// Add checks
//-----------------------------------------
if ( $type == 'add' )
{
if ( ! $css_group )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
exit();
}
}
//-----------------------------------------
// Save it
//-----------------------------------------
if ( $type == 'edit' )
{
$css_id = $this->skinFunctions->saveCSSFromEdit( $cssID, $setID, $css_content, $css_group, $css_position, $css_attributes, $css_app, $css_app_hide, $css_modules );
}
else
{
try
{
$css_id = $this->skinFunctions->saveCSSFromAdd( $setID, $css_content, str_replace( '.css', '', $css_group ), $css_position, $css_attributes, $css_app, $css_app_hide, $css_modules );
}
catch( Exception $err )
{
$this->returnJsonError( $err->getMessage() );
exit();
}
}
//-----------------------------------------
// Get Data
//-----------------------------------------
$css = $this->skinFunctions->fetchCSSForEdit( $css_id, $setID );
$this->returnJsonArray( array( 'cssData' => $css, 'errors' => $this->skinFunctions->fetchErrorMessages() ) );
}
/**
* Fetch a JSON list of template data ready for editing
*
* @return string Json
*/
protected function _getCSSForEdit()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$cssID = intval( $this->request['css_id'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $cssID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
exit();
}
//-----------------------------------------
// Get template data
//-----------------------------------------
$css = $this->skinFunctions->fetchCSSForEdit( $cssID, $setID );
$this->returnJsonArray( array( 'cssData' => $css ) );
}
/**
* Fetch a JSON list of CSS group names
*
* @return string Json
*/
protected function _getCSSGroups()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
exit();
}
//-----------------------------------------
// Get CSS
//-----------------------------------------
$_css = $this->skinFunctions->fetchCSS( $setID );
//-----------------------------------------
// Fix up positioning
//-----------------------------------------
foreach( $_css as $_id => $_data )
{
unset( $_data['css_content'] );
$css[ $_data['css_position'] . '.' . $_data['css_id'] ] = $_data;
}
ksort( $css, SORT_NUMERIC );
$this->returnJsonArray( array( 'css' => $css ) );
}
}
@@ -1,114 +1,115 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Login handler abstraction : AJAX Find Names functions
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 8644 $
* @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( ipsRegistry::$request['name'], 0 ) );
//-----------------------------------------
// 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 );
}
<?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 );
}
}
File diff suppressed because it is too large. Load diff
@@ -1,10 +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>
<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>
File diff suppressed because it is too large. Load diff
@@ -3,21 +3,21 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* Author: Matt Mecham
*
* @author $Author: ips_terabyte $
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @link http://www.invisionpower.com
* @since Friday 19th May 2006 17:33
* @version $Revision: 8644 $
* @version $Revision: 10914 $
*/
@@ -1,84 +1,84 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Friday 19th May 2006 17:33
* @version $Revision: 8644 $
*/
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_ajax_skinsets extends ipsAjaxCommand
{
/**
* Skin functions object handle
*
* @var object
*/
protected $skinFunctions;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
$this->html = $this->registry->output->loadTemplate('cp_skin_templates');
$this->form_code = $this->html->form_code = 'module=templates&amp;section=skinsets';
$this->form_code_js = $this->html->form_code_js = 'module=templates&section=skinsets';
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
$this->skinFunctions = new skinCaching( $registry );
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'showAddDialogue':
$this->_showAddDialogue();
break;
}
}
/**
* Displays the add dialogue
*
* @return string Json
*/
protected function _showAddDialogue()
{
$this->returnHtml( $this->html->newSkinSetPopUp( IPSLib::hasActiveLicense( false ) ) );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2011-05-05 12:03:47 +0100 (Thu, 05 May 2011) $
* </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
* @since Friday 19th May 2006 17:33
* @version $Revision: 8644 $
*/
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_ajax_skinsets extends ipsAjaxCommand
{
/**
* Skin functions object handle
*
* @var object
*/
protected $skinFunctions;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
$this->html = $this->registry->output->loadTemplate('cp_skin_templates');
$this->form_code = $this->html->form_code = 'module=templates&amp;section=skinsets';
$this->form_code_js = $this->html->form_code_js = 'module=templates&section=skinsets';
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
$this->skinFunctions = new skinCaching( $registry );
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'showAddDialogue':
$this->_showAddDialogue();
break;
}
}
/**
* Displays the add dialogue
*
* @return string Json
*/
protected function _showAddDialogue()
{
$this->returnHtml( $this->html->newSkinSetPopUp( IPSLib::hasActiveLicense( false ) ) );
}
}
@@ -3,11 +3,11 @@
* @file tabs.php AJAX storage of tab order preference
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* @since 8th Feb 2011
* $LastChangedDate: 2011-03-10 16:00:38 -0500 (Thu, 10 Mar 2011) $
* @version v3.2.3
* @version v3.3.4
* $Revision: 8021 $
*/
File diff suppressed because it is too large. Load diff
@@ -1,319 +1,319 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* AJAX Functions For applications/core/js/ipb3Templates.js file
* Last Updated: $Date: 2011-07-12 17:54:40 -0400 (Tue, 12 Jul 2011) $
* </pre>
*
* Author: Matt Mecham
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Friday 19th May 2006 17:33
* @version $Revision: 9218 $
*/
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_ajax_templates extends ipsAjaxCommand
{
/**
* Skin functions object handle
*
* @var object
*/
protected $skinFunctions;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
$this->skinFunctions = new skinCaching( $registry );
/* Check... */
if ( !$registry->getClass('class_permissions')->checkPermission( 'templates_manage', ipsRegistry::$current_application, 'templates' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
}
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
case 'getTemplateBitList':
$this->_getTemplateBitList();
break;
case 'getTemplateGroupList':
$this->_getTemplateGroupList();
break;
case 'getTemplateForEdit':
$this->_getTemplateForEdit();
break;
case 'saveTemplateBit':
$this->_saveTemplateBit();
break;
case 'revertTemplateBit':
/* Check... */
if ( !$registry->getClass('class_permissions')->checkPermission( 'templates_delete', ipsRegistry::$current_application, 'templates' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
exit();
}
$this->_revertTemplateBit();
break;
}
}
/**
* Reverts a template bit
*
* @return @e void
*/
protected function _revertTemplateBit()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$templateID = intval( $this->request['template_id'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $templateID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Get template data
//-----------------------------------------
$template = $this->skinFunctions->revertTemplateBit( $templateID, $setID );
$this->returnJsonArray( array( 'templateData' => $template, 'errors' => $this->skinFunctions->fetchErrorMessages() ) );
}
/**
* Saves the template bit
*
* @return @e void
*/
protected function _saveTemplateBit()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$test = $_POST['_template_name'];
$setID = intval( $this->request['template_set'] );
$templateID = intval( $this->request['template_id'] );
$type = ( $this->request['type'] == 'add' ) ? 'add' : 'edit';
$template_content = $_POST['template_content'];
$template_group = IPSText::alphanumericalClean( $_POST['template_group'] );
$ent_template_group = str_replace( "skin_", "", IPSText::alphanumericalClean( $_POST['_template_group'] ) );
$template_name = IPSText::alphanumericalClean( $_POST['_template_name'] );
$template_data = $_POST['template_data'];
IPSDebug::fireBug( 'info', array( 'Template content: ' . $template_content ) );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ( $type == 'edit' AND ! $templateID ) )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Add checks
//-----------------------------------------
if ( $type == 'add' )
{
if ( ! $template_name )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
}
//-----------------------------------------
// Save it
//-----------------------------------------
if ( $type == 'edit' )
{
try
{
$template_id = $this->skinFunctions->saveTemplateBitFromEdit( $templateID, $setID, $template_content, $template_data );
}
catch( Exception $err )
{
$this->returnJsonError( $this->lang->words[ 'templates_' . $err->getMessage() ] ? $this->lang->words[ 'templates_' . $err->getMessage() ] : $err->getMessage() );//. ' ' . implode( "\n", $this->skinFunctions->fetchMessages() ) );
}
}
else
{
$template_group = ( $ent_template_group ) ? 'skin_' . $ent_template_group : $template_group;
try
{
$template_id = $this->skinFunctions->saveTemplateBitFromAdd( $setID, $template_content, $template_data, $template_group, $template_name );
}
catch( Exception $err )
{
$this->returnJsonError( $this->lang->words[ 'templates_' . $err->getMessage() ] ? $this->lang->words[ 'templates_' . $err->getMessage() ] : $err->getMessage() );// . ' ' . implode( "\n", $this->skinFunctions->fetchMessages() ) );
}
}
//-----------------------------------------
// Fetch new data and return
//-----------------------------------------
$template = $this->skinFunctions->fetchTemplateBitForEdit( $template_id, $setID );
//-----------------------------------------
// Get Data
//-----------------------------------------
$this->returnJsonArray( array( 'templateData' => $template, 'errors' => $this->skinFunctions->fetchErrorMessages() ) );
}
/**
* Fetch a JSON list of template data ready for editing
*
* @return @e void
*/
protected function _getTemplateForEdit()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$templateID = intval( $this->request['template_id'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $templateID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Get template data
//-----------------------------------------
$template = $this->skinFunctions->fetchTemplateBitForEdit( $templateID, $setID );
$this->returnJsonArray( array( 'templateData' => $template ) );
}
/**
* Fetch a JSON list of template groups
*
* @return @e void
*/
protected function _getTemplateGroupList()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Get templates
//-----------------------------------------
$templateGroups = $this->skinFunctions->fetchTemplates( $setID, 'groupNames' );
//-----------------------------------------
// Add in group counts
//-----------------------------------------
foreach( $templateGroups as $name => $data )
{
$templateGroups[ $name ]['_modCount'] = $this->skinFunctions->fetchModifiedTemplateCount( $setID, $name );
unset( $templateGroups[ $name ]['template_name'] );
unset( $templateGroups[ $name ]['template_data'] );
unset( $templateGroups[ $name ]['template_content'] );
}
$this->returnJsonArray( array( 'groups' => $templateGroups ) );
}
/**
* Fetch a JSON list of template bits for the template group
*
* @return @e void
*/
protected function _getTemplateBitList()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$templateGroup = IPSText::alphanumericalClean( $this->request['templateGroup'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $templateGroup )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Get templates
//-----------------------------------------
$templates = $this->skinFunctions->fetchTemplates( $setID, 'groupTemplatesNoContent', $templateGroup );
$this->returnJsonArray( array( 'templates' => array_values( $templates ),
'groupData' => array( '_modCount' => $this->skinFunctions->fetchModifiedTemplateCount( $setID, $templateGroup ) ) ) );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* AJAX Functions For applications/core/js/ipb3Templates.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* Author: Matt Mecham
*
* @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 Friday 19th May 2006 17:33
* @version $Revision: 10914 $
*/
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_ajax_templates extends ipsAjaxCommand
{
/**
* Skin functions object handle
*
* @var object
*/
protected $skinFunctions;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
$this->skinFunctions = new skinCaching( $registry );
/* Check... */
if ( !$registry->getClass('class_permissions')->checkPermission( 'templates_manage', ipsRegistry::$current_application, 'templates' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
}
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
case 'getTemplateBitList':
$this->_getTemplateBitList();
break;
case 'getTemplateGroupList':
$this->_getTemplateGroupList();
break;
case 'getTemplateForEdit':
$this->_getTemplateForEdit();
break;
case 'saveTemplateBit':
$this->_saveTemplateBit();
break;
case 'revertTemplateBit':
/* Check... */
if ( !$registry->getClass('class_permissions')->checkPermission( 'templates_delete', ipsRegistry::$current_application, 'templates' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
exit();
}
$this->_revertTemplateBit();
break;
}
}
/**
* Reverts a template bit
*
* @return @e void
*/
protected function _revertTemplateBit()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$templateID = intval( $this->request['template_id'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $templateID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Get template data
//-----------------------------------------
$template = $this->skinFunctions->revertTemplateBit( $templateID, $setID );
$this->returnJsonArray( array( 'templateData' => $template, 'errors' => $this->skinFunctions->fetchErrorMessages() ) );
}
/**
* Saves the template bit
*
* @return @e void
*/
protected function _saveTemplateBit()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$test = $_POST['_template_name'];
$setID = intval( $this->request['template_set'] );
$templateID = intval( $this->request['template_id'] );
$type = ( $this->request['type'] == 'add' ) ? 'add' : 'edit';
$template_content = $_POST['template_content'];
$template_group = IPSText::alphanumericalClean( $_POST['template_group'] );
$ent_template_group = str_replace( "skin_", "", IPSText::alphanumericalClean( $_POST['_template_group'] ) );
$template_name = IPSText::alphanumericalClean( $_POST['_template_name'] );
$template_data = $_POST['template_data'];
IPSDebug::fireBug( 'info', array( 'Template content: ' . $template_content ) );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ( $type == 'edit' AND ! $templateID ) )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Add checks
//-----------------------------------------
if ( $type == 'add' )
{
if ( ! $template_name )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
}
//-----------------------------------------
// Save it
//-----------------------------------------
if ( $type == 'edit' )
{
try
{
$template_id = $this->skinFunctions->saveTemplateBitFromEdit( $templateID, $setID, $template_content, $template_data );
}
catch( Exception $err )
{
$this->returnJsonError( $this->lang->words[ 'templates_' . $err->getMessage() ] ? $this->lang->words[ 'templates_' . $err->getMessage() ] : $err->getMessage() );//. ' ' . implode( "\n", $this->skinFunctions->fetchMessages() ) );
}
}
else
{
$template_group = ( $ent_template_group ) ? 'skin_' . $ent_template_group : $template_group;
try
{
$template_id = $this->skinFunctions->saveTemplateBitFromAdd( $setID, $template_content, $template_data, $template_group, $template_name );
}
catch( Exception $err )
{
$this->returnJsonError( $this->lang->words[ 'templates_' . $err->getMessage() ] ? $this->lang->words[ 'templates_' . $err->getMessage() ] : $err->getMessage() );// . ' ' . implode( "\n", $this->skinFunctions->fetchMessages() ) );
}
}
//-----------------------------------------
// Fetch new data and return
//-----------------------------------------
$template = $this->skinFunctions->fetchTemplateBitForEdit( $template_id, $setID );
//-----------------------------------------
// Get Data
//-----------------------------------------
$this->returnJsonArray( array( 'templateData' => $template, 'errors' => $this->skinFunctions->fetchErrorMessages() ) );
}
/**
* Fetch a JSON list of template data ready for editing
*
* @return @e void
*/
protected function _getTemplateForEdit()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$templateID = intval( $this->request['template_id'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $templateID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Get template data
//-----------------------------------------
$template = $this->skinFunctions->fetchTemplateBitForEdit( $templateID, $setID );
$this->returnJsonArray( array( 'templateData' => $template ) );
}
/**
* Fetch a JSON list of template groups
*
* @return @e void
*/
protected function _getTemplateGroupList()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Get templates
//-----------------------------------------
$templateGroups = $this->skinFunctions->fetchTemplates( $setID, 'groupNames' );
//-----------------------------------------
// Add in group counts
//-----------------------------------------
foreach( $templateGroups as $name => $data )
{
$templateGroups[ $name ]['_modCount'] = $this->skinFunctions->fetchModifiedTemplateCount( $setID, $name );
unset( $templateGroups[ $name ]['template_name'] );
unset( $templateGroups[ $name ]['template_data'] );
unset( $templateGroups[ $name ]['template_content'] );
}
$this->returnJsonArray( array( 'groups' => $templateGroups ) );
}
/**
* Fetch a JSON list of template bits for the template group
*
* @return @e void
*/
protected function _getTemplateBitList()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$templateGroup = IPSText::alphanumericalClean( $this->request['templateGroup'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $templateGroup )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Get templates
//-----------------------------------------
$templates = $this->skinFunctions->fetchTemplates( $setID, 'groupTemplatesNoContent', $templateGroup );
$this->returnJsonArray( array( 'templates' => array_values( $templates ),
'groupData' => array( '_modCount' => $this->skinFunctions->fetchModifiedTemplateCount( $setID, $templateGroup ) ) ) );
}
}
@@ -1,217 +1,217 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* AJAX Functions For applications/core/js/ipb3Templates.js file
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* Author: Matt Mecham
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Friday 19th May 2006 17:33
* @version $Revision: 8644 $
*/
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_ajax_templatesandr extends ipsAjaxCommand
{
/**
* Skin functions object handle
*
* @var object
*/
protected $skinFunctions;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinDifferences.php' );/*noLibHook*/
$this->skinFunctions = new skinDifferences( $registry );
/* Check... */
if ( !$registry->getClass('class_permissions')->checkPermission( 'templates_manage', ipsRegistry::$current_application, 'templates' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
}
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'getTemplateBitList':
$this->_getTemplateBitList();
break;
case 'replace':
$this->_replace();
break;
}
}
/**
* Fetch a JSON list of template bits for the template group
*
* @return @e void
*/
protected function _replace()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$finalIDs = array();
$templates = array();
$sessionID = IPSText::md5Clean( $this->request['sessionID'] );
$sessionData = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'template_sandr',
'where' => "sandr_session_id='" . addslashes( $sessionID ) ."'" ) );
$templateData = unserialize( $sessionData['sandr_results'] );
if ( is_array( $templateData ) )
{
foreach( $templateData as $_group => $_data )
{
if ( !empty( $_POST['groups'][ $_group ] ) )
{
foreach( $_data as $_name => $_id )
{
$finalIDs[] = $_id;
}
}
else
{
foreach( $_data as $_name => $_id )
{
if ( !empty( $_POST['templates'][ $_id ] ) )
{
$finalIDs[] = $_id;
}
}
}
}
}
/* Check... */
if ( ! count( $finalIDs ) )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
/* Load templates */
$this->DB->build( array( 'select' => '*',
'from' => 'skin_templates',
'where' => 'template_id IN ('. implode( ',', $finalIDs ) . ')' ) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$templates[ $row['template_id'] ] = $row;
}
/* Perform the replacement */
foreach( $templates as $template_id => $template )
{
if ( $sessionData['sandr_is_regex'] )
{
$before = str_replace( '#', '\#', IPSText::stripslashes( $sessionData['sandr_search_for'] ) );
$after = preg_replace( '#\\\\\\\\(\d+?)#i', '$\\1', $sessionData['sandr_replace_with'] );
$template['template_content'] = preg_replace( "#{$before}#si", $after, $template['template_content'] );
}
else
{
$template['template_content'] = str_ireplace( $sessionData['sandr_search_for'], $sessionData['sandr_replace_with'], $template['template_content'] );
}
/* Save it */
$this->skinFunctions->saveTemplateBitFromEdit( $template['template_id'], $sessionData['sandr_set_id'], $template['template_content'], $template['template_data'] );
}
/* Done */
$this->returnJsonArray( array( 'status' => 'ok' ) );
}
/**
* Fetch a JSON list of template bits for the template group
*
* @return @e void
*/
protected function _getTemplateBitList()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$templateGroup = IPSText::alphanumericalClean( $this->request['templateGroup'] );
$sessionID = IPSText::md5Clean( $this->request['sessionID'] );
$templates = array();
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $templateGroup or ! $sessionID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Get templates
//-----------------------------------------
$sessionData = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'template_sandr',
'where' => "sandr_session_id='" . addslashes( $sessionID ) ."'" ) );
$templateIDs = unserialize( $sessionData['sandr_results'] );
$this->DB->build( array( 'select' => '*',
'from' => 'skin_templates',
'where' => 'template_id IN ('. implode( ',', array_values( $templateIDs[ $templateGroup] ) ) . ')' ) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
unset( $row['template_content'] );
$templates[] = $row;
}
$this->returnJsonArray( array( 'templates' => $templates ) );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* AJAX Functions For applications/core/js/ipb3Templates.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* Author: Matt Mecham
*
* @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 Friday 19th May 2006 17:33
* @version $Revision: 10914 $
*/
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_ajax_templatesandr extends ipsAjaxCommand
{
/**
* Skin functions object handle
*
* @var object
*/
protected $skinFunctions;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinFunctions.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinCaching.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/classes/skins/skinDifferences.php' );/*noLibHook*/
$this->skinFunctions = new skinDifferences( $registry );
/* Check... */
if ( !$registry->getClass('class_permissions')->checkPermission( 'templates_manage', ipsRegistry::$current_application, 'templates' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
}
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'getTemplateBitList':
$this->_getTemplateBitList();
break;
case 'replace':
$this->_replace();
break;
}
}
/**
* Fetch a JSON list of template bits for the template group
*
* @return @e void
*/
protected function _replace()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$finalIDs = array();
$templates = array();
$sessionID = IPSText::md5Clean( $this->request['sessionID'] );
$sessionData = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'template_sandr',
'where' => "sandr_session_id='" . addslashes( $sessionID ) ."'" ) );
$templateData = unserialize( $sessionData['sandr_results'] );
if ( is_array( $templateData ) )
{
foreach( $templateData as $_group => $_data )
{
if ( !empty( $_POST['groups'][ $_group ] ) )
{
foreach( $_data as $_name => $_id )
{
$finalIDs[] = $_id;
}
}
else
{
foreach( $_data as $_name => $_id )
{
if ( !empty( $_POST['templates'][ $_id ] ) )
{
$finalIDs[] = $_id;
}
}
}
}
}
/* Check... */
if ( ! count( $finalIDs ) )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
/* Load templates */
$this->DB->build( array( 'select' => '*',
'from' => 'skin_templates',
'where' => 'template_id IN ('. implode( ',', $finalIDs ) . ')' ) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$templates[ $row['template_id'] ] = $row;
}
/* Perform the replacement */
foreach( $templates as $template_id => $template )
{
if ( $sessionData['sandr_is_regex'] )
{
$before = str_replace( '#', '\#', IPSText::stripslashes( $sessionData['sandr_search_for'] ) );
$after = preg_replace( '#\\\\\\\\(\d+?)#i', '$\\1', $sessionData['sandr_replace_with'] );
$template['template_content'] = preg_replace( "#{$before}#si", $after, $template['template_content'] );
}
else
{
$template['template_content'] = str_ireplace( $sessionData['sandr_search_for'], $sessionData['sandr_replace_with'], $template['template_content'] );
}
/* Save it */
$this->skinFunctions->saveTemplateBitFromEdit( $template['template_id'], $sessionData['sandr_set_id'], $template['template_content'], $template['template_data'] );
}
/* Done */
$this->returnJsonArray( array( 'status' => 'ok' ) );
}
/**
* Fetch a JSON list of template bits for the template group
*
* @return @e void
*/
protected function _getTemplateBitList()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$setID = intval( $this->request['setID'] );
$templateGroup = IPSText::alphanumericalClean( $this->request['templateGroup'] );
$sessionID = IPSText::md5Clean( $this->request['sessionID'] );
$templates = array();
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $setID OR ! $templateGroup or ! $sessionID )
{
$this->returnJsonError( $this->lang->words['ajax_missing_data'] );
}
//-----------------------------------------
// Get templates
//-----------------------------------------
$sessionData = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'template_sandr',
'where' => "sandr_session_id='" . addslashes( $sessionID ) ."'" ) );
$templateIDs = unserialize( $sessionData['sandr_results'] );
$this->DB->build( array( 'select' => '*',
'from' => 'skin_templates',
'where' => 'template_id IN ('. implode( ',', array_values( $templateIDs[ $templateGroup] ) ) . ')' ) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
unset( $row['template_content'] );
$templates[] = $row;
}
$this->returnJsonArray( array( 'templates' => $templates ) );
}
}
@@ -1,181 +1,181 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* Author: Matt Mecham
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Friday 19th May 2006 17:33
* @version $Revision: 8644 $
*/
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_ajax_uagents extends ipsAjaxCommand
{
/**
* User agent functions
*
* @var object Skin templates
*/
protected $userAgentFunctions;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php', 'userAgentFunctions' );
$this->userAgentFunctions = new $classToLoad( $registry );
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
case 'saveuAgent':
if ( !$registry->getClass('class_permissions')->checkPermission( 'ua_manage', ipsRegistry::$current_application, 'tools' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
}
$this->_saveuAgent();
break;
case 'removeuAgent':
if ( !$registry->getClass('class_permissions')->checkPermission( 'ua_remove', ipsRegistry::$current_application, 'tools' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
}
$this->_removeuAgent();
break;
}
}
/**
* Reverts replacement
*
* @return @e void
*/
protected function _removeuAgent()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$uagent_id = intval( $this->request['uagent_id'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $uagent_id )
{
$this->returnJsonError('Missing Data');
}
//-----------------------------------------
// Get template data
//-----------------------------------------
$userAgents = $this->userAgentFunctions->removeUserAgent( $uagent_id );
$this->returnJsonArray( array( 'uagents' => $userAgents, 'errors' => $this->userAgentFunctions->fetchErrorMessages() ) );
}
/**
* Saves the user agent
*
* @return @e void
*/
protected function _saveuAgent()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$uagent_id = intval( $this->request['uagent_id'] );
$uagent_key = IPSText::alphanumericalClean( $this->request['uagent_key'] );
$uagent_name = $this->convertAndMakeSafe( $_POST['uagent_name'] );
$uagent_regex = $this->convertUnicode( $_POST['uagent_regex'] );
$uagent_regex_capture = intval( $this->request['uagent_regex_capture'] );
$uagent_type = IPSText::alphanumericalClean( $this->request['uagent_type'] );
$uagent_position = intval( $this->request['uagent_position'] );
$type = $this->request['type'];
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( $type == 'edit' AND ! $uagent_id )
{
$this->returnJsonError('Missing Data');
}
//-----------------------------------------
// Other checks
//-----------------------------------------
if ( ! $uagent_key OR ! $uagent_name OR ! $uagent_regex OR ! $uagent_type )
{
$this->returnJsonError('Missing Data');
}
//-----------------------------------------
// Save it
//-----------------------------------------
if ( $type == 'edit' )
{
try
{
$userAgentID = $this->userAgentFunctions->saveUserAgentFromEdit( $uagent_id, $uagent_key, $uagent_name, $uagent_regex, $uagent_regex_capture, $uagent_type, $uagent_position );
}
catch( Exception $err )
{
$this->returnJsonError( $err->getMessage() . ' ' . str_replace( "\n", "\\n", implode( ",", $this->userAgentFunctions->fetchMessages() ) ) );
}
}
else
{
try
{
$userAgentID = $this->userAgentFunctions->saveUserAgentFromAdd( $uagent_key, $uagent_name, $uagent_regex, $uagent_regex_capture, $uagent_type, $uagent_position );
}
catch( Exception $err )
{
$this->returnJsonError( $err->getMessage() );
}
}
//-----------------------------------------
// Get Data
//-----------------------------------------
$this->returnJsonArray( array( 'uagents' => $this->userAgentFunctions->fetchAgents(), 'returnid' => $userAgentID, 'errors' => $this->userAgentFunctions->fetchErrorMessages() ) );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* AJAX Functions For applications/core/js/ipb3CSS.js file
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* Author: Matt Mecham
*
* @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 Friday 19th May 2006 17:33
* @version $Revision: 10914 $
*/
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_ajax_uagents extends ipsAjaxCommand
{
/**
* User agent functions
*
* @var object Skin templates
*/
protected $userAgentFunctions;
/**
* Main executable
*
* @param object registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
$registry->getClass('class_localization')->loadLanguageFile( array( 'admin_templates' ), 'core' );
//-----------------------------------------
// Load functions and cache classes
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/useragents/userAgentFunctions.php', 'userAgentFunctions' );
$this->userAgentFunctions = new $classToLoad( $registry );
//-----------------------------------------
// What shall we do?
//-----------------------------------------
switch( $this->request['do'] )
{
case 'saveuAgent':
if ( !$registry->getClass('class_permissions')->checkPermission( 'ua_manage', ipsRegistry::$current_application, 'tools' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
}
$this->_saveuAgent();
break;
case 'removeuAgent':
if ( !$registry->getClass('class_permissions')->checkPermission( 'ua_remove', ipsRegistry::$current_application, 'tools' ) )
{
$this->returnJsonError( $registry->getClass('class_localization')->words['sk_ajax_noperm'] );
}
$this->_removeuAgent();
break;
}
}
/**
* Reverts replacement
*
* @return @e void
*/
protected function _removeuAgent()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$uagent_id = intval( $this->request['uagent_id'] );
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( ! $uagent_id )
{
$this->returnJsonError('Missing Data');
}
//-----------------------------------------
// Get template data
//-----------------------------------------
$userAgents = $this->userAgentFunctions->removeUserAgent( $uagent_id );
$this->returnJsonArray( array( 'uagents' => $userAgents, 'errors' => $this->userAgentFunctions->fetchErrorMessages() ) );
}
/**
* Saves the user agent
*
* @return @e void
*/
protected function _saveuAgent()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$uagent_id = intval( $this->request['uagent_id'] );
$uagent_key = IPSText::alphanumericalClean( $this->request['uagent_key'] );
$uagent_name = $this->convertAndMakeSafe( $_POST['uagent_name'] );
$uagent_regex = $this->convertUnicode( $_POST['uagent_regex'] );
$uagent_regex_capture = intval( $this->request['uagent_regex_capture'] );
$uagent_type = IPSText::alphanumericalClean( $this->request['uagent_type'] );
$uagent_position = intval( $this->request['uagent_position'] );
$type = $this->request['type'];
//-----------------------------------------
// Checks...
//-----------------------------------------
if ( $type == 'edit' AND ! $uagent_id )
{
$this->returnJsonError('Missing Data');
}
//-----------------------------------------
// Other checks
//-----------------------------------------
if ( ! $uagent_key OR ! $uagent_name OR ! $uagent_regex OR ! $uagent_type )
{
$this->returnJsonError('Missing Data');
}
//-----------------------------------------
// Save it
//-----------------------------------------
if ( $type == 'edit' )
{
try
{
$userAgentID = $this->userAgentFunctions->saveUserAgentFromEdit( $uagent_id, $uagent_key, $uagent_name, $uagent_regex, $uagent_regex_capture, $uagent_type, $uagent_position );
}
catch( Exception $err )
{
$this->returnJsonError( $err->getMessage() . ' ' . str_replace( "\n", "\\n", implode( ",", $this->userAgentFunctions->fetchMessages() ) ) );
}
}
else
{
try
{
$userAgentID = $this->userAgentFunctions->saveUserAgentFromAdd( $uagent_key, $uagent_name, $uagent_regex, $uagent_regex_capture, $uagent_type, $uagent_position );
}
catch( Exception $err )
{
$this->returnJsonError( $err->getMessage() );
}
}
//-----------------------------------------
// Get Data
//-----------------------------------------
$this->returnJsonArray( array( 'uagents' => $this->userAgentFunctions->fetchAgents(), 'returnid' => $userAgentID, 'errors' => $this->userAgentFunctions->fetchErrorMessages() ) );
}
}
@@ -1,20 +1,14 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Group management
* Last Updated: $Date: 2011-09-09 19:44:48 -0400 (Fri, 09 Sep 2011) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Monday 15th January 2007 (15:01)
* @version $Revision: 9476 $
* @file applications.php Applications management
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $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 $
*/
if ( ! defined( 'IN_ACP' ) )
@@ -23,34 +17,39 @@ if ( ! defined( 'IN_ACP' ) )
exit();
}
/**
*
* @class admin_core_applications_applications
* @brief Applications management
*/
class admin_core_applications_applications extends ipsCommand
{
/**
* Skin object
* Skin object shortcut
*
* @var object Skin templates
* @var $html
*/
public $html;
/**
* Shortcut for url
* String for the screen url bit
*
* @var string URL shortcut
* @var $form_code
*/
public $form_code;
public $form_code = '';
/**
* Shortcut for url (javascript)
* String for the JS url bit
*
* @var string JS URL shortcut
* @var $form_code_js
*/
public $form_code_js;
public $form_code_js = '';
/**
* Main class entry point
* Main function executed automatically by the controller
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
@@ -58,17 +57,11 @@ class admin_core_applications_applications extends ipsCommand
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate( 'cp_skin_applications' );
$this->registry->class_localization->loadLanguageFile( array( 'admin_applications' ) );
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=applications&amp;section=applications&amp;';
$this->form_code_js = $this->html->form_code_js = 'module=applications&section=applications&';
$this->form_code = $this->html->form_code = 'module=applications&amp;section=applications&amp;';
$this->form_code_js = $this->html->form_code_js = 'module=applications&section=applications&';
//-----------------------------------------
// What to do...
@@ -82,6 +75,9 @@ class admin_core_applications_applications extends ipsCommand
$this->request['do'] = 'applications_overview';
$this->applicationsOverview();
break;
case 'application_details' :
$this->applicationViewDetails();
break;
case 'application_manage_position' :
$this->registry->getClass( 'class_permissions' )->checkPermissionAutoMsg( 'app_manage' );
$this->applicationManagePosition();
@@ -194,17 +190,8 @@ class admin_core_applications_applications extends ipsCommand
*/
public function applicationToggle()
{
//--------------------------------------------
// INIT
//--------------------------------------------
$app_id = intval( $this->request['app_id'] );
//-----------------------------------------
// Got an application?
//-----------------------------------------
$application = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_applications', 'where' => 'app_id=' . $app_id ) );
/* Get application */
$application = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_applications', 'where' => 'app_id=' . intval( $this->request['app_id'] ) ) );
if ( ! $application['app_id'] )
{
@@ -216,8 +203,20 @@ class admin_core_applications_applications extends ipsCommand
$this->registry->output->showError( $this->lang->words['cannot_toggle_defaults'], 111161.1 );
}
$this->DB->update( 'core_applications', array( 'app_enabled' => $application['app_enabled'] ? 0 : 1 ), 'app_id=' . $app_id );
/* We're disabling the app? */
if ( $application['app_enabled'] )
{
$this->DB->update( 'core_applications', array( 'app_enabled' => 0, 'app_position' => 0 ), 'app_id=' . $application['app_id'] );
}
else
{
$appsCount = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'core_applications', 'where' => 'app_enabled=1' ) );
$appsCount['total'] = intval($appsCount['total']) + 1;
$this->DB->update( 'core_applications', array( 'app_enabled' => 1, 'app_position' => $appsCount['total'] ), 'app_id=' . $application['app_id'] );
}
/* Recache */
$this->moduleRecacheAll( 1 );
//-----------------------------------------
@@ -360,7 +359,6 @@ class admin_core_applications_applications extends ipsCommand
// Replace out the SQL details
//-----------------------------------------
$sphinxTemplate = str_replace( "<!--SPHINX_CONF_HOST-->", ipsRegistry::$settings['sql_host'], $sphinxTemplate );
$sphinxTemplate = str_replace( "<!--SPHINX_CONF_USER-->", ipsRegistry::$settings['sql_user'], $sphinxTemplate );
$sphinxTemplate = str_replace( "<!--SPHINX_CONF_PASS-->", ipsRegistry::$settings['sql_pass'], $sphinxTemplate );
@@ -393,6 +391,8 @@ class admin_core_applications_applications extends ipsCommand
}
}
$appSphinxTemplate = str_replace( "<!--SPHINX_DB_SET_NAMES-->", ( ! empty( ipsRegistry::$settings['sql_charset'] ) ) ? 'sql_query_pre = SET NAMES ' . ipsRegistry::$settings['sql_charset'] : '', $appSphinxTemplate );
$sphinxCompiled .= $appSphinxTemplate;
}
}
@@ -855,7 +855,9 @@ class admin_core_applications_applications extends ipsCommand
// Done...
//-----------------------------------------
/* Recache menu */
$this->applicationsMenuDataRecache();
if ( $return )
{
$this->registry->output->global_message = sprintf( $this->lang->words['a_insertupdated'], $inserted, $updated );
@@ -1204,13 +1206,11 @@ class admin_core_applications_applications extends ipsCommand
if ( ! $app_id )
{
$ajax->returnString( $this->lang->words['postform_badmd5'] );
exit();
}
if ( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false )
{
$ajax->returnString( $this->lang->words['postform_badmd5'] );
exit();
}
//-----------------------------------------
@@ -1248,10 +1248,15 @@ class admin_core_applications_applications extends ipsCommand
//-----------------------------------------
// Load known modules
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.*', 'from' => array( 'core_sys_module' => 'm' ), 'where' => 'm.sys_module_visible=1', 'order' => 'a.app_position, m.sys_module_position ASC', 'add_join' => array( array( 'select' => 'a.*', 'from' => array( 'core_applications' => 'a' ), 'where' => 'm.sys_module_application=a.app_directory', 'type' => 'inner' ) ) ) );
$this->DB->build( array( 'select' => 'm.*',
'from' => array( 'core_sys_module' => 'm' ),
'where' => 'm.sys_module_visible=1',
'order' => 'a.app_position, m.sys_module_position ASC',
'add_join' => array( array( 'select' => 'a.*',
'from' => array( 'core_applications' => 'a' ),
'where' => 'm.sys_module_application=a.app_directory',
'type' => 'inner' ) )
) );
$this->DB->execute();
while ( $row = $this->DB->fetch() )
@@ -1266,7 +1271,7 @@ class admin_core_applications_applications extends ipsCommand
}
}
$modules[$row['sys_module_application']][] = $_row;
$modules[ $row['sys_module_application'] ][] = $_row;
}
$this->cache->setCache( 'module_cache', $modules, array( 'array' => 1 ) );
@@ -1462,6 +1467,31 @@ class admin_core_applications_applications extends ipsCommand
$this->DB->delete( 'core_sys_settings_titles', "conf_title_app='{$application['app_directory']}'" );
$settingsFile = IPSLib::getAppDir( $application['app_directory'] ) . '/xml/' . $application['app_directory'] . '_settings.xml';
if( is_file( $settingsFile ) )
{
require_once( IPS_KERNEL_PATH.'classXML.php' );/*noLibHook*/
$xml = new classXML( IPS_DOC_CHAR_SET );
$xml->load( $settingsFile );
$keys = array();
foreach( $xml->fetchElements('setting') as $setting )
{
$entry = $xml->fetchElementsFromRecord( $setting );
if ( $entry['conf_is_title'] )
{
continue;
}
$keys[] = "'{$entry['conf_key']}'";
}
if ( !empty( $keys ) )
{
$this->DB->delete( 'core_sys_conf_settings', 'conf_key IN(' . implode( ',', $keys ) . ')' );
}
}
//-----------------------------------------
// Remove Application Caches
//-----------------------------------------
@@ -1486,7 +1516,6 @@ class admin_core_applications_applications extends ipsCommand
//-----------------------------------------
// Remove tables
//-----------------------------------------
$_file = IPSLib::getAppDir( $application['app_directory'] ) . '/setup/versions/install/sql/' . $application['app_directory'] . '_' . ipsRegistry::dbFunctions()->getDriverType() . '_tables.php';
@@ -1500,7 +1529,6 @@ class admin_core_applications_applications extends ipsCommand
//-----------------------------------------
// Capture create tables first
//-----------------------------------------
preg_match( "/CREATE TABLE (\S+)(\s)?\(/", $q, $match );
@@ -1513,7 +1541,6 @@ class admin_core_applications_applications extends ipsCommand
//-----------------------------------------
// Then capture alter tables
//-----------------------------------------
preg_match( "/ALTER TABLE (\S+)\sADD\s(\S+)\s/i", $q, $match );
@@ -1528,7 +1555,6 @@ class admin_core_applications_applications extends ipsCommand
//-----------------------------------------
// Check for uninstall sql
//-----------------------------------------
/* Any "extra" configs required for this driver? */
if ( is_file( IPS_ROOT_PATH . 'setup/sql/' . $this->settings['sql_driver'] . '_install.php' ) )
@@ -1569,7 +1595,7 @@ class admin_core_applications_applications extends ipsCommand
$this->DB->delete( 'permission_index', "app='{$application['app_directory']}'" );
$this->DB->delete( 'reputation_index', "app='{$application['app_directory']}'" );
$this->DB->delete( 'reputation_cache', "app='{$application['app_directory']}'" );
$this->DB->delete( 'tags_index', "app='{$application['app_directory']}'" );
$this->DB->delete( 'core_tags', "tag_meta_app='{$application['app_directory']}'" );
$this->DB->delete( 'faq', "app='{$application['app_directory']}'" );
$this->DB->delete( 'custom_bbcode', "bbcode_app='{$application['app_directory']}'" );
$this->DB->delete( 'upgrade_history', "upgrade_app='{$application['app_directory']}'" );
@@ -2036,10 +2062,12 @@ XML;
public function applicationSave( $type = 'add' )
{
/* Init vars */
$app_title = trim( $this->request['app_title'] );
$app_title = trim( $this->request['app_title'] );
$app_public = trim( $this->request['app_public_title'] );
$app_directory = trim( $this->request['app_directory'] );
$app_enabled = intval( $this->request['app_enabled'] );
$application = array();
$app_enabled = intval( $this->request['app_enabled'] );
$application = array();
$sphinxRebuild = false;
/* Editing? */
if ( $type == 'edit' )
@@ -2071,13 +2099,24 @@ XML;
return;
}
if ( ! $app_enabled && in_array( $app_directory, array( 'core', 'forums', 'members' ) ) )
if ( ( empty($app_enabled) || empty($app_public) ) && in_array( $app_directory, array( 'core', 'forums', 'members' ) ) )
{
$this->registry->output->showError( $this->lang->words['cannot_toggle_defaults'], 111161.2 );
}
/* $setup update array */
$array = array( 'app_title' => $app_title, 'app_public_title' => trim( $this->request['app_public_title'] ), 'app_enabled' => $app_enabled, 'app_hide_tab' => intval( $this->request['app_hide_tab'] ), 'app_description' => trim( $this->request['app_description'] ), 'app_author' => trim( $this->request['app_author'] ), 'app_version' => trim( $this->request['app_version'] ), 'app_directory' => $app_directory, 'app_website' => trim( $this->request['app_website'] ), 'app_update_check' => trim( $this->request['app_update_check'] ), 'app_global_caches' => ( is_array( $this->request['app_global_caches'] ) && count( $this->request['app_global_caches'] ) ) ? implode( ',', $this->request['app_global_caches'] ) : '', 'app_tab_groups' => ( is_array( $this->request['app_tab_groups'] ) && count( $this->request['app_tab_groups'] ) ) ? implode( ',', $this->request['app_tab_groups'] ) : '' );
/* $etup update array */
$array = array( 'app_title' => $app_title,
'app_public_title' => $app_public,
'app_enabled' => $app_enabled,
'app_hide_tab' => intval( $this->request['app_hide_tab'] ),
'app_description' => trim( $this->request['app_description'] ),
'app_author' => trim( $this->request['app_author'] ),
'app_version' => trim( $this->request['app_version'] ),
'app_directory' => $app_directory,
'app_website' => trim( $this->request['app_website'] ),
'app_update_check' => trim( $this->request['app_update_check'] ),
'app_global_caches' => ( is_array( $this->request['app_global_caches'] ) && count( $this->request['app_global_caches'] ) ) ? implode( ',', $this->request['app_global_caches'] ) : '',
'app_tab_groups' => ( is_array( $this->request['app_tab_groups'] ) && count( $this->request['app_tab_groups'] ) ) ? implode( ',', $this->request['app_tab_groups'] ) : '' );
//-----------------------------------------
// IN DEV?
@@ -2096,24 +2135,41 @@ XML;
if ( $type == 'add' )
{
$array['app_added'] = time();
$array['app_added'] = IPS_UNIX_TIME_NOW;
$array['app_location'] = 'other';
$max = $this->DB->buildAndFetch( array( 'select' => 'MAX(app_position) as position', 'from' => 'core_applications' ) );
$array['app_position'] = $max['position'] + 1;
$array['app_position'] = intval($max['position']) + 1;
$this->DB->insert( 'core_applications', $array );
$this->registry->output->global_message = $this->lang->words['a_newapp'];
}
else
{
/* We're disabling the app? */
if ( empty($app_enabled) )
{
$array['app_position'] = 0;
}
else
{
if ( empty($application['app_enabled']) )
{
$appsCount = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'core_applications', 'where' => 'app_enabled=1' ) );
$array['app_position'] = $appsCount['total'] + 1;
}
}
/* Update the application record */
$this->DB->update( 'core_applications', $array, 'app_id=' . $application['app_id'] );
/* Update modules and tasks, if the application directory changed */
if ( $application['app_directory'] != $app_directory )
{
$sphinxRebuild = true;
$this->DB->update( 'task_manager', array( 'task_application' => $app_directory ), "task_application='{$application['app_directory']}'" );
$this->DB->update( 'core_sys_module', array( 'sys_module_application' => $app_directory ), "sys_module_application='{$application['app_directory']}'" );
$this->DB->update( 'admin_logs', array( 'appcomponent' => $app_directory ), "appcomponent='{$application['app_directory']}'" );
@@ -2134,7 +2190,6 @@ XML;
$this->DB->update( 'reputation_index', array( 'app' => $app_directory ), "app='{$application['app_directory']}'" );
$this->DB->update( 'skin_css', array( 'css_app' => $app_directory ), "css_app='{$application['app_directory']}'" );
$this->DB->update( 'skin_css_previous', array( 'p_css_app' => $app_directory ), "p_css_app='{$application['app_directory']}'" );
$this->DB->update( 'tags_index', array( 'app' => $app_directory ), "app='{$application['app_directory']}'" );
$this->DB->update( 'upgrade_history', array( 'upgrade_app' => $app_directory ), "upgrade_app='{$application['app_directory']}'" );
}
@@ -2142,6 +2197,12 @@ XML;
$this->registry->output->global_message = $this->lang->words['a_editappdone'];
}
/* Have we toggled this? */
if ( $app_enabled != $application['app_enabled'] )
{
$sphinxRebuild = true;
}
//-----------------------------------------
// Recache
//-----------------------------------------
@@ -2179,9 +2240,8 @@ XML;
//-----------------------------------------
// Sphinx involved?
//-----------------------------------------
if ( $this->settings['search_method'] == 'sphinx' )
if ( $sphinxRebuild AND $this->settings['search_method'] == 'sphinx' && is_file( IPSLib::getAppDir( $app_directory ) . '/extensions/sphinxTemplate.php' ) )
{
$this->registry->output->global_message .= sprintf( $this->lang->words['rebuild_sphinx'], $this->settings['_base_url'] );
}
@@ -2200,13 +2260,13 @@ XML;
{
/* Init vars */
$application = array();
$form = array();
$form = array();
$defaultTab = '';
//-----------------------------------------
// Add or edit?
//-----------------------------------------
if ( $type == 'add' )
{
$formcode = 'application_add_do';
@@ -2273,8 +2333,14 @@ XML;
$form['app_global_caches'] = $this->registry->output->formMultiDropdown( 'app_global_caches[]', $_caches, isset( $_POST['app_global_caches'] ) ? $_POST['app_global_caches'] : explode( ',', $application['app_global_caches'] ), 15 );
/* Got a default tab specified? */
if ( !empty($this->request['_tab']) )
{
$defaultTab = trim($this->request['_tab']);
}
/* Output */
$this->registry->output->html .= $this->html->application_form( $form, $title, $formcode, $button, $application );
$this->registry->output->html .= $this->html->application_form( $form, $title, $formcode, $button, $application, $defaultTab );
}
/**
@@ -2300,32 +2366,31 @@ XML;
if ( $this->registry->adminFunctions->checkSecurityKey( $this->request['md5check'], true ) === false )
{
$ajax->returnString( $this->lang->words['postform_badmd5'] );
exit();
}
//-----------------------------------------
// Save new position
//-----------------------------------------
$position = 1;
if ( is_array( $this->request['apps'] ) and count( $this->request['apps'] ) )
{
foreach( $this->request['apps'] as $this_id )
{
$location = $this->DB->buildAndFetch( array( 'select' => 'app_location', 'from' => 'core_applications', 'where' => 'app_id=' . $this_id ) );
$buffer = array( 'root' => 0, 'ips' => 100, 'other' => 200 );
$this->DB->update( 'core_applications', array( 'app_position' => $position + $buffer[$location['app_location']] ), 'app_id=' . $this_id );
$position ++;
}
}
$position = 1;
if ( is_array($this->request['apps']) && count($this->request['apps']) )
{
/* Reset all apps to 0 temporarily */
$this->DB->update( 'core_applications', array( 'app_position' => 0 ) );
foreach( $this->request['apps'] as $this_id )
{
$this->DB->update( 'core_applications', array( 'app_position' => $position ), 'app_id=' . intval($this_id) );
$position++;
}
}
$this->applicationsRecache();
$this->applicationsMenuDataRecache();
$ajax->returnString( 'OK' );
$ajax->returnString('OK');
}
/**
@@ -2336,20 +2401,27 @@ XML;
public function applicationsOverview()
{
/* Init vars */
$folders = array();
$application = array();
$_apps = array();
$uninstalled = array();
$appsUpdates = 0;
$checkUpdates = ! empty( $this->request['checkUpdates'] ) ? true : false;
$folders = array();
$applications = array( 'enabled' => array( 'core' => array() ), 'disabled' => array() );
$_apps = array();
$uninstalled = array();
$checkUpdates = false;
$appsUpdates = 0;
$message = '';
/* Get the setup class */
require_once ( IPS_ROOT_PATH . "setup/sources/base/setup.php" );/*noLibHook*/
/* Get hooks file for update check */
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/hooks.php', 'admin_core_applications_hooks' );
$hooksClass = new $classToLoad();
$hooksClass->makeRegistryShortcuts( $this->registry );
/* Checking for updates? */
if ( !empty( $this->request['checkUpdates'] ) )
{
$checkUpdates = true;
/* Get hooks file for update check */
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/hooks.php', 'admin_core_applications_hooks' );
$hooksClass = new $classToLoad();
$hooksClass->makeRegistryShortcuts( $this->registry );
}
//-----------------------------------------
// Get DB applications
@@ -2375,7 +2447,7 @@ XML;
$row['app_update_available'] = array( 0 );
}
$_apps[IPSLib::getAppFolder( $row['app_directory'] ) . '/' . $row['app_directory']] = $row;
$_apps[ IPSLib::getAppFolder( $row['app_directory'] ) . '/' . $row['app_directory'] ] = $row;
}
//-----------------------------------------
@@ -2407,17 +2479,11 @@ XML;
//-----------------------------------------
// Installed Loop...
//-----------------------------------------
foreach( $_apps as $_app_path => $row )
{
$app_dir = $row['app_directory'];
//-----------------------------------------
// Enabled?
//-----------------------------------------
$row['_app_enabled'] = ( $row['app_enabled'] ) ? 'tick.png' : 'cross.png';
/* Version numbers */
$_a = ( $app_dir == 'forums' or $app_dir == 'members' ) ? 'core' : $app_dir;
$numbers = IPSSetUp::fetchAppVersionNumbers( $_a );
@@ -2441,7 +2507,7 @@ XML;
$phpVersion = str_replace( substr( $phpVersion, strrpos( $phpVersion, '.' ) ), '', $phpVersion );
$encoding = "Zend {$phpVersion}";
}
elseif ( substr( $file, 36, 7 ) == 'ionCube' )
elseif ( substr( $file, 36, 7 ) == 'ionCube' or substr( $file, 37, 7 ) == 'ionCube' )
{
$encoding = 'Ioncube';
}
@@ -2449,18 +2515,16 @@ XML;
$row['_human_current'] .= " ({$encoding})";
}
$application[$row['app_location']][] = $row;
if ( $row['app_enabled'] )
{
$applications['enabled'][ $row['app_directory'] ] = $row;
}
else
{
$applications['disabled'][ $row['app_directory'] ] = $row;
}
}
/* Make sure they are in the proper order, hacky but it works :) */
$__apps = array();
$__apps['root'] = $application['root'] ? $application['root'] : array();
$__apps['ips'] = $application['ips'] ? $application['ips'] : array();
$__apps['other'] = $application['other'] ? $application['other'] : array();
$application = $__apps;
//-----------------------------------------
// Uninstalled
//-----------------------------------------
@@ -2499,14 +2563,115 @@ XML;
}
/* Got updates to show? */
$message = NULL;
if ( $checkUpdates === true )
{
$message = ( $appsUpdates == 1 ) ? $this->lang->words['updates_string_single'] : sprintf( $this->lang->words['updates_string_more'], $appsUpdates );
}
/* Output */
$this->registry->output->html .= $this->html->applications_list( $application, $uninstalled, $message );
$this->registry->output->html .= $this->html->applications_list( $applications, $uninstalled, $message );
}
/**
* View details about an application
*
* @return @e void [Outputs to screen]
*/
protected function applicationViewDetails()
{
$id = intval($this->request['app_id']);
if( !$id )
{
$this->registry->output->showError( $this->lang->words['a_noid'], 11110.1 );
}
$appData = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'core_applications', 'where' => 'app_id=' . $id ) );
if( !$appData['app_id'] )
{
$this->registry->output->showError( $this->lang->words['a_nodetails'], 11111.1 );
}
/* Format dates */
$lastUpdate = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'upgrade_history', 'where' => "upgrade_app='{$appData['app_directory']}'", 'order' => 'upgrade_version_id DESC', 'limit' => array( 1 ) ) );
$appData['_installed'] = $this->registry->getClass('class_localization')->getDate( $appData['app_added'], 'DATE' );
$appData['_updated'] = ( $lastUpdate['upgrade_date'] > $appData['app_added'] ) ? $this->registry->getClass('class_localization')->getDate( $lastUpdate['upgrade_date'], 'DATE' ) : '--';
/* Get the setup class */
require_once ( IPS_ROOT_PATH . "setup/sources/base/setup.php" );/*noLibHook*/
/* Version numbers */
$_a = in_array( $appData['app_directory'], array( 'forums', 'members' ) ) ? 'core' : $appData['app_directory'];
$numbers = IPSSetUp::fetchAppVersionNumbers( $_a );
$appData['_human_version'] = $numbers['latest'][1];
$appData['_long_version'] = $numbers['latest'][0];
$appData['_human_current'] = $numbers['current'][1];
$appData['_long_current'] = $numbers['current'][0];
/* Got updates? */
if ( $appData['app_update_check'] )
{
/* Get hooks file for update check */
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/hooks.php', 'admin_core_applications_hooks' );
$hooksClass = new $classToLoad();
$hooksClass->makeRegistryShortcuts( $this->registry );
$appData['app_update_available'] = $hooksClass->_updateAvailable( $appData['app_update_check'], $appData['app_long_version'] );
}
else
{
$appData['app_update_available'] = array( 0 );
}
/* Get related hooks */
$hooks = array();
$this->DB->build( array( 'select' => '*',
'from' => 'core_hooks',
//This is a bit hackish but there's no way around...
'where' => 'hook_requirements LIKE \'%:"' . $this->DB->addSlashes( $appData['app_directory'] ) . '";a:%\'',
'order' => 'hook_id ASC'
) );
$outer = $this->DB->execute();
/* Got results? */
if ( $this->DB->getTotalRows( $outer ) )
{
/* Get hooks file for update check */
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'core' ) . '/modules_admin/applications/hooks.php', 'admin_core_applications_hooks' );
$hooksClass = new $classToLoad();
$hooksClass->makeRegistryShortcuts( $this->registry );
/* Loop */
while ( $rh = $this->DB->fetch( $outer ) )
{
/* Check requirements */
if( $rh['hook_enabled'] )
{
$rh['_require_errors'] = $hooksClass->checkHookRequirements( $rh );
}
$hooks[] = $rh;
}
}
/* Upgrade history */
$upgradeHistory = array();
$this->DB->build( array( 'select' => '*', 'from' => 'upgrade_history', 'where' => "upgrade_app='" . $this->DB->addSlashes( $appData['app_directory'] ) . "'", 'order' => 'upgrade_version_id DESC' ) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
{
$upgradeHistory[] = $r;
}
/* Output */
$this->registry->output->html .= $this->html->application_details( $appData, $upgradeHistory, $hooks );
}
/**
@@ -2582,6 +2747,7 @@ XML;
}
$this->cache->setCache( 'app_cache', $apps, array( 'array' => 1 ) );
ipsRegistry::$applications = $apps;
/* Do we have an incomingEmails extension anywhere? */
$systemvars = $this->cache->getCache( 'systemvars' );
@@ -2592,11 +2758,12 @@ XML;
$tabs = array();
foreach( $apps as $dir => $data )
{
if ( ! $data['app_hide_tab'] )
{
# app_hide_tab is already checked in the output class
#if ( ! $data['app_hide_tab'] )
#{
$tabs[] = array( 'app' => $dir, 'groups' => $data['app_tab_groups'], 'module' => '', // Can't use IPSLib::getAppTitle() because of the IN_ACP check in it
'title' => $this->lang->words[$data['app_public_title']] ? $this->lang->words[$data['app_public_title']] : $data['app_public_title'] );
}
#}
if ( is_file( IPSLib::getAppDir( $dir ) . '/extensions/coreVariables.php' ) )
{
@@ -2648,11 +2815,11 @@ XML;
*/
protected function _getHasExtensionItemMarking( $appDir )
{
if ( is_file( IPSLib::getAppDir( $appDir ) . '/extensions/coreExtensions.php' ) )
$_file = IPSLib::getAppDir( $appDir ) . '/extensions/coreExtensions.php';
if ( is_file( $_file ) )
{
require_once( IPSLib::getAppDir( $appDir ) . '/extensions/coreExtensions.php' );/*noLibHook*/
if ( class_exists( 'itemMarking__' . $appDir ) )
$classToLoad = IPSLib::loadLibrary( $_file, 'itemMarking__'.$appDir, $appDir );
if ( class_exists( $classToLoad ) )
{
return true;
}
@@ -2794,7 +2961,7 @@ XML;
//-----------------------------------------
$this->DB->build( array( 'select' => '*', 'from' => 'core_sys_module', 'order' => 'sys_module_position ASC' ) );
$this->DB->build( array( 'select' => '*', 'from' => 'core_sys_module', 'where' => 'sys_module_visible=1 AND sys_module_admin=1', 'order' => 'sys_module_position ASC' ) );
$this->DB->execute();
while ( $module = $this->DB->fetch() )
@@ -1,42 +1,42 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Blog Application
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 27th Aug 2004
* @version $Revision: 8644 $
*
*/
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_blog extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
$this->registry->output->showInsideIframe("http://myipb.in/products/blog/");
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Blog Application
* 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 27th Aug 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_applications_blog extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
$this->registry->output->showInsideIframe("http://external.ipslink.com/ipboard30/landing/?p=blog");
}
}
@@ -1,39 +1,39 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Blog Application
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @version $Revision: 8644 $
*/
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_ccs extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
$this->registry->output->showInsideIframe("http://myipb.in/products/content/");
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Blog Application
* 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
* @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_applications_ccs extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
$this->registry->output->showInsideIframe("http://www.invisionpower.com/products/content/");
}
}
@@ -1,68 +1,68 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Download Manager Application
* Last Updated: $Date: 2011-05-11 12:57:46 -0400 (Wed, 11 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 17 February 2003
* @version $Revision: 8727 $
*
*/
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_copyright extends ipsCommand
{
/**
* HTML skin
*
* @var object Skin file
*/
public $html;
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
//-----------------------------------------
// Load HTML
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate( 'cp_skin_applications' );
$this->registry->getClass( 'class_localization' )->loadLanguageFile( array( 'admin_applications' ) );
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=applications&amp;section=copyright';
$this->form_code_js = $this->html->form_code_js = 'module=applications&section=copyright';
//-----------------------------------------
// Just redirect to the setting
//-----------------------------------------
$this->registry->output->silentRedirect( $this->settings['base_url'] . 'app=core&amp;module=settings&amp;section=settings&amp;do=setting_view&amp;conf_title_keyword=ipbcopyright' );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Download Manager Application
* 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 17 February 2003
* @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_applications_copyright extends ipsCommand
{
/**
* HTML skin
*
* @var object Skin file
*/
public $html;
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
//-----------------------------------------
// Load HTML
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate( 'cp_skin_applications' );
$this->registry->getClass( 'class_localization' )->loadLanguageFile( array( 'admin_applications' ) );
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=applications&amp;section=copyright';
$this->form_code_js = $this->html->form_code_js = 'module=applications&section=copyright';
//-----------------------------------------
// Just redirect to the setting
//-----------------------------------------
$this->registry->output->silentRedirect( $this->settings['base_url'] . 'app=core&amp;module=settings&amp;section=settings&amp;do=setting_view&amp;conf_title_keyword=ipbcopyright' );
}
}
@@ -3,11 +3,11 @@
* @file defaultSection.php Define the default section for the 'applications' module
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.2.3
* @version v3.3.4
* $Revision: 8655 $
*/
@@ -1,42 +1,42 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Download Manager Application
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Who knows...
* @version $Revision: 8644 $
*
*/
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_downloads extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
$this->registry->output->showInsideIframe("http://myipb.in/products/downloads/");
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Download Manager Application
* 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 Who knows...
* @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_applications_downloads extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
$this->registry->output->showInsideIframe("http://www.invisionpower.com/products/downloads/");
}
}
@@ -1,42 +1,42 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Gallery Application
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Who knows...
* @version $Revision: 8644 $
*
*/
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_gallery extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
$this->registry->output->showInsideIframe("http://myipb.in/products/gallery/");
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Gallery Application
* 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 Who knows...
* @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_applications_gallery extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
$this->registry->output->showInsideIframe("http://www.invisionpower.com/products/gallery/");
}
}
File diff suppressed because it is too large. Load diff
@@ -1,10 +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>
<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>
@@ -1,39 +1,39 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Nexus Application
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @version $Revision: 8644 $
*/
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_nexus extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
$this->registry->output->showInsideIframe("http://myipb.in/products/nexus/");
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Nexus Application
* 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
* @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_applications_nexus extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'purchase_app' );
$this->registry->output->showInsideIframe("http://www.invisionpower.com/products/nexus/");
}
}
File diff suppressed because it is too large. Load diff
@@ -1,10 +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>
<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>
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>Управление модулями</title>
<title>Manage Applications &amp; Modules</title>
<subitems>
<subitem>
<subitemtitle>Список модулей</subitemtitle>
<subitemtitle>Manage Applications &amp; Modules</subitemtitle>
<subitemlang>manage_apps_modules</subitemlang>
<subsection>applications</subsection>
<subitemurl>do=applications_overview</subitemurl>
@@ -14,18 +14,17 @@
</subitem>
</subitems>
</item>
<item>
<title>Управление хуками (hooks)</title>
<item>
<title>Manage Hooks</title>
<subitems>
<subitem>
<subitemtitle>Список хуков</subitemtitle>
<subitemtitle>Manage Hooks</subitemtitle>
<subitemlang>manage_hooks</subitemlang>
<subsection>hooks</subsection>
<subitemurl>do=hooks_overview</subitemurl>
<subitemrolekey>hooks_manage</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitem>
</subitems>
</item>
</tabitems>
@@ -1,62 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Управление приложениями</grouptitle>
<grouptitle>Manage Applications</grouptitle>
<grouplang>core_manage_apps</grouplang>
<items>
<item>
<key>app_manage</key>
<string>Может изменять/добавлять приложения?</string>
<string>Can manage applications?</string>
</item>
<item>
<key>app_delete</key>
<string>Может удалять приложения?</string>
<string>Can delete applications?</string>
</item>
<item>
<key>app_install</key>
<string>Может устанавливать новые приложения?</string>
<string>Can install new applications?</string>
</item>
<item>
<key>build_sphinx</key>
<string>Может создавать sphinx.conf? ВНИМАНИЕ: будут доступны данные для соединения с базой данных</string>
<string>Can build sphinx.conf? WARNING: Exposes database login details</string>
</item>
</items>
</group>
<group>
<grouptitle>Управление модулями</grouptitle>
<grouptitle>Manage Modules</grouptitle>
<grouplang>core_manage_modules</grouplang>
<items>
<item>
<key>module_manage</key>
<string>Может изменять/добавлять модули?</string>
<string>Can edit/add application modules?</string>
</item>
<item>
<key>module_delete</key>
<string>Может удалять модули приложений?</string>
<string>Can delete application modules?</string>
</item>
</items>
</group>
<group>
<grouptitle>Покупка приложений</grouptitle>
<grouptitle>Purchase Applications</grouptitle>
<grouplang>core_purchase_app</grouplang>
<items>
<item>
<key>purchase_app</key>
<string>Может просматривать страницу с платными приложениями?</string>
<string>Can view pages to purchase additional applications?</string>
</item>
</items>
</group>
<group>
<grouptitle>Управление модификациями</grouptitle>
<grouptitle>Manage Hooks</grouptitle>
<grouplang>core_manage_hooks</grouplang>
<items>
<item>
<key>hooks_manage</key>
<string>Может добавлять/изменять модификации?</string>
<string>Can manage hooks?</string>
</item>
<item>
<key>hooks_delete</key>
<string>Может удалять модификации?</string>
<string>Can remove hooks?</string>
</item>
</items>
</group>
@@ -3,11 +3,11 @@
* @file defaultSection.php Define the default section for the 'diagnostics' module
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.2.3
* @version v3.3.4
* $Revision: 8655 $
*/
File diff suppressed because it is too large. Load diff
@@ -1,10 +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>
<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>
@@ -1,10 +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>
<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>
@@ -2,10 +2,10 @@
<menu>
<tabitems>
<item>
<title>Состояние системы</title>
<title>Overview</title>
<subitems>
<subitem>
<subitemtitle>Обзор системы</subitemtitle>
<subitemtitle>Overview</subitemtitle>
<subitemlang>diag_overview</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl></subitemurl>
@@ -15,23 +15,10 @@
</subitems>
</item>
<item>
<title>Проверка версий файлов</title>
<subitems>
<title>Whitespace Checker</title>
<subitems>
<subitem>
<subitemtitle>Проверка версий файлов</subitemtitle>
<subitemlang>version_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=fileversions</subitemurl>
<subitemrolekey>version_checker</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Проверка лишних пробелов</title>
<subitems>
<subitem>
<subitemtitle>Поиск файлов содержащих лишние пробелы</subitemtitle>
<subitemtitle>Whitespace Checker</subitemtitle>
<subitemlang>whitespace_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=whitespace</subitemurl>
@@ -39,12 +26,12 @@
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</item>
<item>
<title>Проверка прав файлов</title>
<subitems>
<title>Permissions Checker</title>
<subitems>
<subitem>
<subitemtitle>Проверка прав доступа к файлам</subitemtitle>
<subitemtitle>Permissions Checker</subitemtitle>
<subitemlang>permissions_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=filepermissions</subitemurl>
@@ -54,10 +41,10 @@
</subitems>
</item>
<item>
<title>Проверка сетевых соединений</title>
<subitems>
<title>Connection Checker</title>
<subitems>
<subitem>
<subitemtitle>Проверка сетевых соединений</subitemtitle>
<subitemtitle>Connection Checker</subitemtitle>
<subitemlang>connection_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=connections</subitemurl>
@@ -65,12 +52,12 @@
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</item>
<item>
<title>Проверка структуры базы</title>
<subitems>
<title>Database Checker</title>
<subitems>
<subitem>
<subitemtitle>Проверка структуры базы данных</subitemtitle>
<subitemtitle>Database Checker</subitemtitle>
<subitemlang>db_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=dbchecker</subitemurl>
@@ -78,12 +65,12 @@
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</item>
<item>
<title>Проверка индексов базы</title>
<subitems>
<title>Database Index Checker</title>
<subitems>
<subitem>
<subitemtitle>Проверка индексов базы данных</subitemtitle>
<subitemtitle>Database Index Checker</subitemtitle>
<subitemlang>dbi_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=dbindex</subitemurl>
@@ -91,6 +78,19 @@
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</item>
<item>
<title>Email Tester</title>
<subitems>
<subitem>
<subitemtitle>Email Tester</subitemtitle>
<subitemlang>email_checker</subitemlang>
<subsection>diagnostics</subsection>
<subitemurl>do=email</subitemurl>
<subitemrolekey>email_checker</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</tabitems>
</menu>
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Инструменты диагностики</grouptitle>
<grouptitle>Diagnostic Tools</grouptitle>
<grouplang>core_diag_tools</grouplang>
<items>
<item>
<key>index_checker</key>
<string>Может проверять индексы таблиц базы? Внимание: позволяет выполнять запросы к базе.</string>
<string>Can use the database index checker? Warning: Allows ability to run database queries indirectly.</string>
</item>
<item>
<key>database_checker</key>
<string>Может использовать проверку базы данных? Внимание: позволяет выполнять запросы к базе.</string>
<string>Can use the database checker? Warning: Allows ability to run database queries indirectly.</string>
</item>
<item>
<key>whitespace_checker</key>
<string>Может проверять файлы на лишние пробелы?</string>
</item>
<item>
<key>version_checker</key>
<string>Может проверять файлы на правильность версии?</string>
<string>Can use the whitespace checker?</string>
</item>
<item>
<key>connection_checker</key>
<string>Может использовать проверку сетевых соединений?</string>
<string>Can use the connection checker?</string>
</item>
<item>
<key>permission_checker</key>
<string>Может проверять файлы и директории на правильность расстановки прав доступа?</string>
<string>Can use the permissions checker?</string>
</item>
<item>
<key>email_checker</key>
<string>Can use the email tester?</string>
</item>
</items>
</group>
@@ -3,11 +3,11 @@
* @file defaultSection.php Define the default section for the 'help' module
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.2.3
* @version v3.3.4
* $Revision: 8655 $
*/
@@ -1,10 +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>
<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>
@@ -1,145 +1,145 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Quick help - shows popups with help information
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 1st march 2002
* @version $Revision: 8644 $
*
*/
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_help_quickhelp extends ipsCommand
{
/**
* Array of help text
*
* @var array Help texts
*/
protected $help_text = array();
/**
* Initialize the help text array
*
* @return @e void [Outputs to screen]
*/
protected function _initText()
{
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_system' ) );
return array( 'mg_dohtml' => array( 'title' => $this->lang->words['q_html'],
'body' => $this->lang->words['q_html_info'],
),
'mod_mmod' => array( 'title' => $this->lang->words['q_multi'],
'body' => $this->lang->words['q_multi_info'],
),
'set_spider' => array( 'title' => $this->lang->words['q_bots'],
'body' => $this->lang->words['q_bots_info'],
),
'mg_upload' => array( 'title' => $this->lang->words['q_upload'],
'body' => $this->lang->words['q_upload_info'],
),
'mg_promote' => array( 'title' => $this->lang->words['q_promote'],
'body' => $this->lang->words['q_promote_info'],
),
's_reg_antispam' => array ( 'title' => $this->lang->words['q_captcha'],
'body' => $this->lang->words['q_captcha_info'],
),
'm_bulkemail' => array ( 'title' => $this->lang->words['q_bulk'],
'body' => $this->lang->words['q_bulk_info'],
),
'comp_menu' => array ( 'title' => $this->lang->words['q_components'],
'body' => $this->lang->words['q_components_info'],
),
);
}
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$id = $this->request['id'];
if( $this->request['do'] == 'redirect' )
{
$this->_redirect( $id );
}
$this->help_text = $this->_initText();
if ($this->help_text[ $id ]['title'] == "")
{
$this->registry->output->showError( $this->lang->words['q_nohelp'], 11148 );
}
$this->registry->output->html .= $this->registry->output->global_template->quickHelp( $this->help_text[$id]['title'], $this->help_text[$id]['body'] );
$this->registry->output->printPopupWindow();
}
/**
* Redirect offsite for more help/options
*
* @param string 'key' to redirect to
* @return @e void [Outputs to screen]
*/
private function _redirect( $id )
{
switch( $id )
{
case 'docs':
$url = "http://myipb.in/docs-ipb";
break;
case 'resources':
$url = "http://myipb.in/forums";
break;
case 'contact':
$url = "http://myipb.in/contact";
break;
case 'features':
$url = "http://myipb.in/suggestfeatures";
break;
case 'bugs':
$url = "http://myipb.in/bugtrack";
break;
default:
case 'support':
$url = "http://myipb.in/clientarea";
break;
}
$this->registry->output->silentRedirect( $url );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Quick help - shows popups with help information
* 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 1st march 2002
* @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_help_quickhelp extends ipsCommand
{
/**
* Array of help text
*
* @var array Help texts
*/
protected $help_text = array();
/**
* Initialize the help text array
*
* @return @e void [Outputs to screen]
*/
protected function _initText()
{
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_system' ) );
return array( 'mg_dohtml' => array( 'title' => $this->lang->words['q_html'],
'body' => $this->lang->words['q_html_info'],
),
'mod_mmod' => array( 'title' => $this->lang->words['q_multi'],
'body' => $this->lang->words['q_multi_info'],
),
'set_spider' => array( 'title' => $this->lang->words['q_bots'],
'body' => $this->lang->words['q_bots_info'],
),
'mg_upload' => array( 'title' => $this->lang->words['q_upload'],
'body' => $this->lang->words['q_upload_info'],
),
'mg_promote' => array( 'title' => $this->lang->words['q_promote'],
'body' => $this->lang->words['q_promote_info'],
),
's_reg_antispam' => array ( 'title' => $this->lang->words['q_captcha'],
'body' => $this->lang->words['q_captcha_info'],
),
'm_bulkemail' => array ( 'title' => $this->lang->words['q_bulk'],
'body' => $this->lang->words['q_bulk_info'],
),
'comp_menu' => array ( 'title' => $this->lang->words['q_components'],
'body' => $this->lang->words['q_components_info'],
),
);
}
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$id = $this->request['id'];
if( $this->request['do'] == 'redirect' )
{
$this->_redirect( $id );
}
$this->help_text = $this->_initText();
if ($this->help_text[ $id ]['title'] == "")
{
$this->registry->output->showError( $this->lang->words['q_nohelp'], 11148 );
}
$this->registry->output->html .= $this->registry->output->global_template->quickHelp( $this->help_text[$id]['title'], $this->help_text[$id]['body'] );
$this->registry->output->printPopupWindow();
}
/**
* Redirect offsite for more help/options
*
* @param string 'key' to redirect to
* @return @e void [Outputs to screen]
*/
private function _redirect( $id )
{
switch( $id )
{
case 'docs':
$url = "http://external.ipslink.com/ipboard30/landing/?p=docs-ipb";
break;
case 'resources':
$url = "http://external.ipslink.com/ipboard30/landing/?p=resources";
break;
case 'contact':
$url = "http://external.ipslink.com/ipboard30/landing/?p=contact";
break;
case 'features':
$url = "http://external.ipslink.com/ipboard30/landing/?p=suggestfeatures";
break;
case 'bugs':
$url = "http://external.ipslink.com/ipboard30/landing/?p=bugs";
break;
default:
case 'support':
$url = "http://external.ipslink.com/ipboard30/landing/?p=support";
break;
}
$this->registry->output->silentRedirect( $url );
}
}
@@ -1,10 +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>
<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>
@@ -1,66 +1,77 @@
<?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>Форумы IBResource</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_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>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>
</menu>
@@ -1,10 +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>
<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>
@@ -3,11 +3,11 @@
* @file defaultSection.php Define the default section for the 'languages' module
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.2.3
* @version v3.3.4
* $Revision: 8655 $
*/
@@ -1,10 +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>
<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>
File diff suppressed because it is too large. Load diff
@@ -1,10 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -> 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>
<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>
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<tabitems>
<tabitems>
<item>
<title>Языки</title>
<title>Manage Languages</title>
<subitems>
<subitem>
<subitemtitle>Языки системы</subitemtitle>
<subitemtitle>Manage Languages</subitemtitle>
<subitemlang>languages</subitemlang>
<subsection>manage_languages</subsection>
<subitemurl></subitemurl>
@@ -1,20 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Управление языками</grouptitle>
<grouptitle>Manage Languages</grouptitle>
<grouplang>core_languages</grouplang>
<items>
<item>
<key>lang_words</key>
<string>Может добавлять/изменять слова?</string>
<string>Can add/edit the language bit texts?</string>
</item>
<item>
<key>lang_packs</key>
<string>Может добавлять/изменять языковые наборы?</string>
<string>Can add/edit language packs?</string>
</item>
<item>
<key>lang_pack_info</key>
<string>Может изменять настройки и информацию языковых наборов?</string>
<string>Can alter the language pack properties and information?</string>
</item>
</items>
</group>
@@ -1,10 +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>
<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>
@@ -1,408 +1,413 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* ACP Login/Logout Routines
* Last Updated: $Date: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since Tuesday 17th August 2004
* @version $Revision: 8644 $
*/
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()
{
//-----------------------------------------
// 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;
//-----------------------------------------
// 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')->redirect( $this->settings['base_url'] . '/' . CP_DIRECTORY . '/index.php', $this->lang->words['logout_complete'] );
}
/**
* 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.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 ) ) );
}
}
@@ -1,326 +1,358 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Admin logs
* Last Updated: $LastChangedDate: 2011-06-01 22:13:27 -0400 (Wed, 01 Jun 2011) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 27th January 2004
* @version $Rev: 8938 $
*/
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_adminlogs extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_adminlogs');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=logs&amp;section=adminlogs';
$this->form_code_js = $this->html->form_code_js = 'module=logs&section=adminlogs';
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
//-----------------------------------------
// Fix up navigation bar
//-----------------------------------------
$this->registry->output->core_nav = array();
$this->registry->output->ignoreCoreNav = true;
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools&section=logsSplash', $this->lang->words['nav_logssplash'] );
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=adminlogs', $this->lang->words['alog_adminlogs'] );
///----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
case 'view':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_view' );
$this->_view();
break;
case 'remove':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_delete' );
$this->_remove();
break;
default:
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_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 admin
*
* @return @e void [Outputs to screen]
*/
protected function _view()
{
///----------------------------------------
// Basic init
//-----------------------------------------
$start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0;
///----------------------------------------
// No mid or search string?
//-----------------------------------------
if ( !$this->request['search_string'] AND !$this->request['mid'] )
{
$this->registry->output->global_message = $this->lang->words['alog_nostring'];
$this->_listCurrent();
return;
}
$this->request['mid'] = $this->request['mid'] == 'zero' ? 0 : $this->request['mid'];
///----------------------------------------
// mid?
//-----------------------------------------
if ( !$this->request['search_string'] )
{
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(id) as count', 'from' => 'admin_logs', 'where' => "member_id=" . intval($this->request['mid']) ) );
$query = "{$this->form_code}&amp;mid=" . ( $this->request['mid'] ? $this->request['mid'] : 'zero' ) . "&amp;do=view";
$this->DB->build( array( 'select' => 'm.*',
'from' => array( 'admin_logs' => 'm' ),
'where' => 'm.member_id=' . intval($this->request['mid']),
'order' => 'm.ctime DESC',
'limit' => array( $start, 20 ),
'add_join' => array(
array( 'select' => 'mem.members_display_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=m.member_id',
'type' => 'left'
)
)
) );
$this->DB->execute();
}
///----------------------------------------
// search string?
//-----------------------------------------
else
{
$this->request['search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) );
if( !$this->DB->checkForField( $this->request['search_type'], 'admin_logs' ) )
{
$this->registry->output->showError( $this->lang->words['alog_whatfield'], 4110, true );
}
if( $this->request['search_type'] == 'member_id' )
{
$dbq = "m." . $this->request['search_type'] . "='" . $this->request['search_string'] . "'";
}
else
{
$dbq = "m." . $this->request['search_type'] . " LIKE '%" . $this->request['search_string'] . "%'";
}
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(m.member_id) as count', 'from' => 'admin_logs m', 'where' => $dbq ) );
$query = "{$this->form_code}&amp;do=view&amp;search_type=" . $this->request['search_type'] . "&amp;search_string=" . urlencode($this->request['search_string']);
$this->DB->build( array( 'select' => 'm.*',
'from' => array( 'admin_logs' => 'm' ),
'where' => $dbq,
'order' => 'm.ctime DESC',
'limit' => array( $start, 20 ),
'add_join' => array(
array( 'select' => 'mem.members_display_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=m.member_id',
'type' => 'left'
)
)
) );
$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() )
{
if( !$row['member_id'] )
{
$row['member_id'] = 'zero';
}
if( !$row['members_display_name'] )
{
$row['members_display_name'] = $this->lang->words['noname_availabl'];
}
$row['_time'] = $this->registry->class_localization->getDate( $row['ctime'], 'LONG' );
$rows[] = $row;
}
///----------------------------------------
// And output
//-----------------------------------------
$this->registry->output->html .= $this->html->adminlogsView( $rows, $links );
}
/**
* Remove logs by an admin
*
* @return @e void [Outputs to screen]
*/
protected function _remove()
{
if ( !$this->request['mid'] )
{
$this->registry->output->showError( $this->lang->words['alog_whoselog'], 11114 );
}
$this->request['mid'] = $this->request['mid'] == 'zero' ? 0 : $this->request['mid'];
$this->DB->delete( 'admin_logs', "member_id=" . intval($this->request['mid']) );
$this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code );
}
/**
* List the current logs with links to view per-admin
*
* @return @e void [Outputs to screen]
*/
protected function _listCurrent()
{
$rows = array();
$admins = array();
//-----------------------------------------
// LAST FIVE ACTIONS
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.*',
'from' => array( 'admin_logs' => 'm' ),
'order' => 'm.ctime DESC',
'limit' => array( 5 ),
'add_join' => array(
array( 'select' => 'mem.members_display_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=m.member_id',
'type' => 'left'
)
)
) );
$this->DB->execute();
while ( $row = $this->DB->fetch() )
{
$row['_time'] = $this->registry->class_localization->getDate( $row['ctime'], 'LONG' );
$rows[] = $row;
}
//-----------------------------------------
// All admins
//-----------------------------------------
$this->DB->build( array(
'select' => 'count(l.member_id) as act_count, l.member_id',
'from' => array( 'admin_logs' => 'l' ),
'group' => 'l.member_id',
'order' => 'act_count DESC',
'add_join' => array(
array(
'select' => 'm.members_display_name',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=l.member_id',
'type' => 'left',
),
),
) );
$this->DB->execute();
while ( $r = $this->DB->fetch() )
{
if( !$r['member_id'] )
{
$r['member_id'] = 'zero';
}
if( !$r['members_display_name'] )
{
$r['members_display_name'] = $this->lang->words['noname_availabl'];
}
$admins[ $r['member_id'] ] = $r;
}
//-----------------------------------------
// And output
//-----------------------------------------
$this->registry->output->html .= $this->html->adminlogsWrapper( $rows, $admins );
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Admin 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_adminlogs extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_adminlogs');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=logs&amp;section=adminlogs';
$this->form_code_js = $this->html->form_code_js = 'module=logs&section=adminlogs';
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
///----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
case 'view':
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=adminlogs', $this->lang->words['alog_adminlogs'] );
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_view' );
$this->_view();
break;
case 'remove':
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=adminlogs', $this->lang->words['alog_adminlogs'] );
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_delete' );
$this->_remove();
break;
default:
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=adminlogs', $this->lang->words['alog_adminlogs'] );
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'adminlogs_view' );
$this->_listCurrent();
break;
case 'showArchived':
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=adminlogs&do=showArchived', $this->lang->words['archiver_title'] );
$this->_listArchiver();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* View archive logs
*
* @return @e void [Outputs to screen]
*/
protected function _listArchiver()
{
$data = array();
$start = intval( $this->request['st'] );
/* Get count */
$count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count', 'from' => 'core_archive_log' ) );
$this->DB->build( array( 'select' => '*',
'from' => 'core_archive_log',
'order' => 'archlog_date DESC',
'limit' => array( $start, 50 ) ) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$data[] = $row;
}
/* Pagination */
$links = $this->registry->output->generatePagination( array( 'totalItems' => $count['count'],
'itemsPerPage' => 50,
'currentStartValue' => $start,
'baseUrl' => $this->settings['base_url'] . $this->form_code . '&amp;do=showArchived' ) );
/* Show output */
$this->registry->output->html .= $this->html->archiverlogsView( $data, $links );
}
/**
* View all logs for a given admin
*
* @return @e void [Outputs to screen]
*/
protected function _view()
{
///----------------------------------------
// Basic init
//-----------------------------------------
$start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0;
///----------------------------------------
// No mid or search string?
//-----------------------------------------
if ( !$this->request['search_string'] AND !$this->request['mid'] )
{
$this->registry->output->global_message = $this->lang->words['alog_nostring'];
$this->_listCurrent();
return;
}
$this->request['mid'] = $this->request['mid'] == 'zero' ? 0 : $this->request['mid'];
///----------------------------------------
// mid?
//-----------------------------------------
if ( !$this->request['search_string'] )
{
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(id) as count', 'from' => 'admin_logs', 'where' => "member_id=" . intval($this->request['mid']) ) );
$query = "{$this->form_code}&amp;mid=" . ( $this->request['mid'] ? $this->request['mid'] : 'zero' ) . "&amp;do=view";
$this->DB->build( array( 'select' => 'm.*',
'from' => array( 'admin_logs' => 'm' ),
'where' => 'm.member_id=' . intval($this->request['mid']),
'order' => 'm.ctime DESC',
'limit' => array( $start, 20 ),
'add_join' => array(
array( 'select' => 'mem.members_display_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=m.member_id',
'type' => 'left'
)
)
) );
$this->DB->execute();
}
///----------------------------------------
// search string?
//-----------------------------------------
else
{
$this->request['search_string'] = IPSText::parseCleanValue( urldecode($this->request['search_string'] ) );
if( !$this->DB->checkForField( $this->request['search_type'], 'admin_logs' ) )
{
$this->registry->output->showError( $this->lang->words['alog_whatfield'], 4110, true );
}
if( $this->request['search_type'] == 'member_id' )
{
$dbq = "m." . $this->request['search_type'] . "='" . $this->request['search_string'] . "'";
}
else
{
$dbq = "m." . $this->request['search_type'] . " LIKE '%" . $this->request['search_string'] . "%'";
}
$row = $this->DB->buildAndFetch( array( 'select' => 'COUNT(m.member_id) as count', 'from' => 'admin_logs m', 'where' => $dbq ) );
$query = "{$this->form_code}&amp;do=view&amp;search_type=" . $this->request['search_type'] . "&amp;search_string=" . urlencode($this->request['search_string']);
$this->DB->build( array( 'select' => 'm.*',
'from' => array( 'admin_logs' => 'm' ),
'where' => $dbq,
'order' => 'm.ctime DESC',
'limit' => array( $start, 20 ),
'add_join' => array(
array( 'select' => 'mem.members_display_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=m.member_id',
'type' => 'left'
)
)
) );
$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() )
{
if( !$row['member_id'] )
{
$row['member_id'] = 'zero';
}
if( !$row['members_display_name'] )
{
$row['members_display_name'] = $this->lang->words['noname_availabl'];
}
$row['_time'] = $this->registry->class_localization->getDate( $row['ctime'], 'LONG' );
$rows[] = $row;
}
///----------------------------------------
// And output
//-----------------------------------------
$this->registry->output->html .= $this->html->adminlogsView( $rows, $links );
}
/**
* Remove logs by an admin
*
* @return @e void [Outputs to screen]
*/
protected function _remove()
{
if ( !$this->request['mid'] )
{
$this->registry->output->showError( $this->lang->words['alog_whoselog'], 11114 );
}
$this->request['mid'] = $this->request['mid'] == 'zero' ? 0 : $this->request['mid'];
$this->DB->delete( 'admin_logs', "member_id=" . intval($this->request['mid']) );
$this->registry->output->silentRedirect( $this->settings['base_url'] . $this->form_code );
}
/**
* List the current logs with links to view per-admin
*
* @return @e void [Outputs to screen]
*/
protected function _listCurrent()
{
$rows = array();
$admins = array();
//-----------------------------------------
// LAST FIVE ACTIONS
//-----------------------------------------
$this->DB->build( array( 'select' => 'm.*',
'from' => array( 'admin_logs' => 'm' ),
'order' => 'm.ctime DESC',
'limit' => array( 5 ),
'add_join' => array(
array( 'select' => 'mem.members_display_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=m.member_id',
'type' => 'left'
)
)
) );
$this->DB->execute();
while ( $row = $this->DB->fetch() )
{
$row['_time'] = $this->registry->class_localization->getDate( $row['ctime'], 'LONG' );
$rows[] = $row;
}
//-----------------------------------------
// All admins
//-----------------------------------------
$this->DB->build( array(
'select' => 'count(l.member_id) as act_count, l.member_id',
'from' => array( 'admin_logs' => 'l' ),
'group' => 'l.member_id, m.members_display_name',
'order' => 'act_count DESC',
'add_join' => array(
array(
'select' => 'm.members_display_name',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=l.member_id',
'type' => 'left',
),
),
) );
$this->DB->execute();
while ( $r = $this->DB->fetch() )
{
if( !$r['member_id'] )
{
$r['member_id'] = 'zero';
}
if( !$r['members_display_name'] )
{
$r['members_display_name'] = $this->lang->words['noname_availabl'];
}
$admins[ $r['member_id'] ] = $r;
}
//-----------------------------------------
// And output
//-----------------------------------------
$this->registry->output->html .= $this->html->adminlogsWrapper( $rows, $admins );
}
}
@@ -3,12 +3,12 @@
* @file defaultSection.php Define the default section for the 'logs' module
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $Author: ips_terabyte $
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* @since 20th February 2002
* $LastChangedDate: 2011-05-05 12:40:49 -0400 (Thu, 05 May 2011) $
* @version v3.2.3
* $Revision: 8655 $
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
*/
$DEFAULT_SECTION = 'adminlogs';
$DEFAULT_SECTION = 'logsSplash';
@@ -1,275 +1,267 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Email error logs
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 27th January 2004
* @version $Rev: 8644 $
*/
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_emailerrorlogs extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_emailerrorlogs');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=logs&amp;section=emailerrorlogs';
$this->form_code_js = $this->html->form_code_js = 'module=logs&section=emailerrorlogs';
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
//-----------------------------------------
// Fix up navigation bar
//-----------------------------------------
$this->registry->output->core_nav = array();
$this->registry->output->ignoreCoreNav = true;
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools&section=logsSplash', $this->lang->words['nav_logssplash'] );
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=emailerrorlogs', $this->lang->words['elog_email_err_logs'] );
///----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'list':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_view' );
$this->_listCurrent();
break;
case 'remove':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_delete' );
$this->_remove();
break;
case 'viewemail':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_view' );
$this->_viewEmail();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Remove email logs
*
* @return @e void [Outputs to screen]
*/
protected function _remove()
{
if ( $this->request['type'] == 'all' )
{
$this->DB->delete( 'mail_error_logs' );
}
else
{
$ids = array();
foreach ( $this->request as $k => $v )
{
if ( preg_match( "/^id_(\d+)$/", $k, $match ) )
{
if ($this->request[ $match[0] ] )
{
$ids[] = $match[1];
}
}
}
$ids = IPSLib::cleanIntArray( $ids );
//-----------------------------------------
if ( count($ids) < 1 )
{
$this->registry->output->showError( $this->lang->words['erlog_noneselected'], 11115 );
}
$this->DB->delete( 'mail_error_logs', "mlog_id IN (" . implode( ',', $ids ) . ")" );
}
$this->registry->getClass('adminFunctions')->saveAdminLog( $this->lang->words['erlog_removed'] );
$this->registry->output->silentRedirect( $this->settings['base_url']."&{$this->form_code}" );
}
/**
* List the current logs
*
* @return @e void [Outputs to screen]
*/
protected function _listCurrent()
{
$start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0;
//-----------------------------------------
// Check URL parameters
//-----------------------------------------
$url_query = array();
$db_query = array();
if ( $this->request['type'] AND $this->request['type'] != "" )
{
$string = IPSText::parseCleanValue( urldecode($this->request['string']) );
if ( $string == "" )
{
$this->registry->output->showError( $this->lang->words['erlog_enter_sumthang_yo'], 11116 );
}
$url_query[] = 'type=' . $this->request['type'];
$url_query[] = 'string=' . urlencode($string);
switch( $this->request['type'] )
{
case 'subject':
$db_query[] = $this->request['match'] == 'loose' ? "mlog_subject LIKE '%". preg_replace_callback( '/([=_\?\x00-\x1F\x80-\xFF])/', create_function( '$match', 'return "=" . strtoupper( dechex( ord( "$match[1]" ) ) );' ), $string ) ."%'" : "mlog_subject='{$string}'";
break;
case 'email_from':
$db_query[] = $this->request['match'] == 'loose' ? "mlog_from LIKE '%{$string}%'" : "mlog_from='{$string}'";
break;
case 'email_to':
$db_query[] = $this->request['match'] == 'loose' ? "mlog_to LIKE '%{$string}%'" : "mlog_to='{$string}'";
break;
case 'error':
$db_query[] = $this->request['match'] == 'loose' ? "mlog_msg LIKE '%{$string}%' or mlog_smtp_msg LIKE '%{$string}%'" : "mlog_msg='{$string} or mlog_smtp_msg='{$string}'";
break;
}
}
if( $this->request['match'] )
{
$url_query[] = 'match=' . $this->request['match'];
}
//-----------------------------------------
// LIST 'EM
//-----------------------------------------
$dbe = "";
$url = "";
if ( count($db_query) > 0 )
{
$dbe = implode( ' AND ', $db_query );
}
if ( count($url_query) > 0 )
{
$url = '&amp;' . implode( '&amp;', $url_query );
}
$count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as cnt', 'from' => 'mail_error_logs', 'where' => $dbe ) );
$links = $this->registry->output->generatePagination( array( 'totalItems' => $count['cnt'],
'itemsPerPage' => 25,
'currentStartValue' => $start,
'baseUrl' => $this->settings['base_url'] . "&{$this->form_code}" . $url,
)
);
$this->DB->build( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => $dbe, 'order' => 'mlog_date DESC', 'limit' => array( $start, 25 ) ) );
$this->DB->execute();
while ( $row = $this->DB->fetch() )
{
$row['_date'] = $this->registry->class_localization->getDate( $row['mlog_date'], 'SHORT' );
$row['mlog_subject'] = ( empty( $row['mlog_subject'] ) ) ? '--' : $row['mlog_subject'];
$row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?".IPS_DOC_CHAR_SET."?Q?" ) !== FALSE )
? str_replace( "=?".IPS_DOC_CHAR_SET."?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) )
: $row['mlog_subject'];
$rows[] = $row;
}
$this->registry->output->html .= $this->html->emailerrorlogsWrapper( $rows, $links );
}
/**
* View an individual email
*
* @return @e void [Outputs to screen]
*/
protected function _viewEmail()
{
if ( !$this->request['id'] )
{
$this->registry->output->showError( $this->lang->words['erlog_404'], 11117 );
}
$id = intval($this->request['id']);
$row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => "mlog_id={$id}" ) );
if ( ! $row['mlog_id'] )
{
$this->registry->output->showError( $this->lang->words['erlog_404'], 11118 );
}
$row['_date'] = $this->registry->class_localization->getDate( $row['mlog_date'], 'LONG' );
$row['mlog_content'] = nl2br($row['mlog_content']);
$row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?".IPS_DOC_CHAR_SET."?Q?" ) !== FALSE )
? str_replace( "=?".IPS_DOC_CHAR_SET."?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) )
: $row['mlog_subject'];
$row['mlog_msg'] = $row['mlog_msg'] ? $row['mlog_msg'] : $this->lang->words['erlog_noinfo'];
$row['mlog_code'] = $row['mlog_code'] ? $row['mlog_code'] : $this->lang->words['erlog_noinfo'];
$row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : $this->lang->words['erlog_noinfo'];
$this->registry->output->html .= $this->html->emailerrorlogsEmail( $row );
$this->registry->output->printPopupWindow();
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Email error 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_emailerrorlogs extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_emailerrorlogs');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=logs&amp;section=emailerrorlogs';
$this->form_code_js = $this->html->form_code_js = 'module=logs&section=emailerrorlogs';
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=emailerrorlogs', $this->lang->words['elog_email_err_logs'] );
///----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'list':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_view' );
$this->_listCurrent();
break;
case 'remove':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_delete' );
$this->_remove();
break;
case 'viewemail':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'emailerrorlogs_view' );
$this->_viewEmail();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Remove email logs
*
* @return @e void [Outputs to screen]
*/
protected function _remove()
{
if ( $this->request['type'] == 'all' )
{
$this->DB->delete( 'mail_error_logs' );
}
else
{
$ids = array();
foreach ( $this->request as $k => $v )
{
if ( preg_match( "/^id_(\d+)$/", $k, $match ) )
{
if ($this->request[ $match[0] ] )
{
$ids[] = $match[1];
}
}
}
$ids = IPSLib::cleanIntArray( $ids );
//-----------------------------------------
if ( count($ids) < 1 )
{
$this->registry->output->showError( $this->lang->words['erlog_noneselected'], 11115 );
}
$this->DB->delete( 'mail_error_logs', "mlog_id IN (" . implode( ',', $ids ) . ")" );
}
$this->registry->getClass('adminFunctions')->saveAdminLog( $this->lang->words['erlog_removed'] );
$this->registry->output->silentRedirect( $this->settings['base_url']."&{$this->form_code}" );
}
/**
* List the current logs
*
* @return @e void [Outputs to screen]
*/
protected function _listCurrent()
{
$start = intval($this->request['st']) >= 0 ? intval($this->request['st']) : 0;
//-----------------------------------------
// Check URL parameters
//-----------------------------------------
$url_query = array();
$db_query = array();
if ( $this->request['type'] AND $this->request['type'] != "" )
{
$string = IPSText::parseCleanValue( urldecode($this->request['string']) );
if ( $string == "" )
{
$this->registry->output->showError( $this->lang->words['erlog_enter_sumthang_yo'], 11116 );
}
$url_query[] = 'type=' . $this->request['type'];
$url_query[] = 'string=' . urlencode($string);
switch( $this->request['type'] )
{
case 'subject':
$db_query[] = $this->request['match'] == 'loose' ? "mlog_subject LIKE '%". preg_replace_callback( '/([=_\?\x00-\x1F\x80-\xFF])/', create_function( '$match', 'return "=" . strtoupper( dechex( ord( "$match[1]" ) ) );' ), $string ) ."%'" : "mlog_subject='{$string}'";
break;
case 'email_from':
$db_query[] = $this->request['match'] == 'loose' ? "mlog_from LIKE '%{$string}%'" : "mlog_from='{$string}'";
break;
case 'email_to':
$db_query[] = $this->request['match'] == 'loose' ? "mlog_to LIKE '%{$string}%'" : "mlog_to='{$string}'";
break;
case 'error':
$db_query[] = $this->request['match'] == 'loose' ? "mlog_msg LIKE '%{$string}%' or mlog_smtp_msg LIKE '%{$string}%'" : "mlog_msg='{$string} or mlog_smtp_msg='{$string}'";
break;
}
}
if( $this->request['match'] )
{
$url_query[] = 'match=' . $this->request['match'];
}
//-----------------------------------------
// LIST 'EM
//-----------------------------------------
$dbe = "";
$url = "";
if ( count($db_query) > 0 )
{
$dbe = implode( ' AND ', $db_query );
}
if ( count($url_query) > 0 )
{
$url = '&amp;' . implode( '&amp;', $url_query );
}
$count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as cnt', 'from' => 'mail_error_logs', 'where' => $dbe ) );
$links = $this->registry->output->generatePagination( array( 'totalItems' => $count['cnt'],
'itemsPerPage' => 25,
'currentStartValue' => $start,
'baseUrl' => $this->settings['base_url'] . "&{$this->form_code}" . $url,
)
);
$this->DB->build( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => $dbe, 'order' => 'mlog_date DESC', 'limit' => array( $start, 25 ) ) );
$this->DB->execute();
while ( $row = $this->DB->fetch() )
{
$row['_date'] = $this->registry->class_localization->getDate( $row['mlog_date'], 'SHORT' );
$row['mlog_subject'] = ( empty( $row['mlog_subject'] ) ) ? '--' : $row['mlog_subject'];
$row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?".IPS_DOC_CHAR_SET."?Q?" ) !== FALSE )
? str_replace( "=?".IPS_DOC_CHAR_SET."?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) )
: $row['mlog_subject'];
$rows[] = $row;
}
$this->registry->output->html .= $this->html->emailerrorlogsWrapper( $rows, $links );
}
/**
* View an individual email
*
* @return @e void [Outputs to screen]
*/
protected function _viewEmail()
{
if ( !$this->request['id'] )
{
$this->registry->output->showError( $this->lang->words['erlog_404'], 11117 );
}
$id = intval($this->request['id']);
$row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'mail_error_logs', 'where' => "mlog_id={$id}" ) );
if ( ! $row['mlog_id'] )
{
$this->registry->output->showError( $this->lang->words['erlog_404'], 11118 );
}
$row['_date'] = $this->registry->class_localization->getDate( $row['mlog_date'], 'LONG' );
$row['mlog_content'] = nl2br($row['mlog_content']);
$row['mlog_subject'] = ( strpos( $row['mlog_subject'], "=?".IPS_DOC_CHAR_SET."?Q?" ) !== FALSE )
? str_replace( "=?".IPS_DOC_CHAR_SET."?Q?", "", str_replace( "?=", "", preg_replace_callback( '/=([A-F0-9]{2})/', create_function( '$match', 'return chr( hexdec( "$match[1]" ) );' ), $row['mlog_subject'] ) ) )
: $row['mlog_subject'];
$row['mlog_msg'] = $row['mlog_msg'] ? $row['mlog_msg'] : $this->lang->words['erlog_noinfo'];
$row['mlog_code'] = $row['mlog_code'] ? $row['mlog_code'] : $this->lang->words['erlog_noinfo'];
$row['mlog_smtp_error'] = $row['mlog_smtp_error'] ? $row['mlog_smtp_error'] : $this->lang->words['erlog_noinfo'];
$this->registry->output->html .= $this->html->emailerrorlogsEmail( $row );
$this->registry->output->printPopupWindow();
}
}
@@ -1,247 +1,239 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Error logs
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Core
* @link http://hatynka.in
* @since 27th January 2004
* @version $Rev: 8644 $
*/
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_errorlogs extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_errorlogs');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=logs&amp;section=errorlogs';
$this->form_code_js = $this->html->form_code_js = 'module=logs&section=errorlogs';
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
//-----------------------------------------
// Fix up navigation bar
//-----------------------------------------
$this->registry->output->core_nav = array();
$this->registry->output->ignoreCoreNav = true;
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools', $this->lang->words['nav_toolsmodule'] );
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=tools&section=logsSplash', $this->lang->words['nav_logssplash'] );
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=errorlogs', $this->lang->words['error_log_thelogs'] );
///----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'list':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'errorlogs_view' );
$this->_listCurrent();
break;
case 'remove':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'errorlogs_delete' );
$this->_remove();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Remove email logs
*
* @return @e void [Outputs to screen]
*/
protected function _remove()
{
if( $this->request['type'] == 'all' )
{
$this->DB->delete( 'error_logs' );
}
else
{
$ids = array();
foreach( $this->request as $k => $v )
{
if ( preg_match( "/^id_(\d+)$/", $k, $match ) )
{
if ($this->request[ $match[0] ] )
{
$ids[] = $match[1];
}
}
}
$ids = IPSLib::cleanIntArray( $ids );
//-----------------------------------------
if( count($ids) < 1 )
{
$this->registry->output->showError( $this->lang->words['erlog_noneselected'], 11115 );
}
$this->DB->delete( 'error_logs', "log_id IN (" . implode( ',', $ids ) . ")" );
}
$this->registry->adminFunctions->saveAdminLog( $this->lang->words['error_log_removed'] );
$this->registry->output->silentRedirect( $this->settings['base_url'] . "&{$this->form_code}" );
}
/**
* List the current logs
*
* @return @e void [Outputs to screen]
*/
protected function _listCurrent()
{
$start = intval( $this->request['st'] ) >= 0 ? intval( $this->request['st'] ) : 0;
/* Check URL parameters */
$url_query = array();
$db_query = array();
if( $this->request['type'] )
{
$string = IPSText::parseCleanValue( urldecode( $this->request['string'] ) );
if( $string == "" )
{
$this->registry->output->showError( $this->lang->words['erlog_enter_sumthang_yo'], 11116 );
}
$url_query[] = 'type=' . $this->request['type'];
$url_query[] = 'string=' . urlencode( $string );
switch( $this->request['type'] )
{
case 'log_error':
$db_query[] = $this->request['match'] == 'loose' ? "e.log_error LIKE '%{$string}%'" : "e.log_error='{$string}'";
break;
case 'log_error_code':
$db_query[] = $this->request['match'] == 'loose' ? "e.log_error_code LIKE '%{$string}%'" : "e.log_error_code='{$string}'";
break;
case 'log_request_uri':
$db_query[] = $this->request['match'] == 'loose' ? "e.log_request_uri LIKE '%{$string}%'" : "e.log_request_uri='{$string}'";
break;
case 'members_display_name':
$db_query[] = $this->request['match'] == 'loose' ? "m.members_display_name LIKE '%{$string}%'" : "m.members_display_name='{$string}'";
break;
}
}
/* Build extra query stuff */
$dbe = '';
$url = '';
if( count( $db_query ) )
{
$dbe = implode( ' AND ', $db_query );
}
if( count( $url_query ) )
{
$url = '&amp;' . implode( '&amp;', $url_query );
}
/* Pagination */
$count = $this->DB->buildAndFetch( array(
'select' => 'count(*) as cnt',
'from' => array( 'error_logs' => 'e' ),
'where' => $dbe,
'add_join' => array(
array(
'from' => array( 'members' => 'm' ),
'where' => 'e.log_member=m.member_id',
'type' => 'left',
)
)
) );
$links = $this->registry->output->generatePagination( array(
'totalItems' => $count['cnt'],
'itemsPerPage' => 25,
'currentStartValue' => $start,
'baseUrl' => $this->settings['base_url'] . "&{$this->form_code}" . $url,
)
);
/* Query the logs */
$this->DB->build( array(
'select' => 'e.*',
'from' => array( 'error_logs' => 'e' ),
'where' => $dbe,
'order' => 'e.log_date DESC',
'limit' => array( $start, 25 ),
'add_join' => array(
array(
'select' => 'm.members_display_name',
'from' => array( 'members' => 'm' ),
'where' => 'e.log_member=m.member_id',
'type' => 'left',
)
)
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$row['_date'] = $this->registry->class_localization->getDate( $row['log_date'], 'SHORT' );
$rows[] = $row;
}
$this->registry->output->html .= $this->html->errorlogsWrapper( $rows, $links );
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Error 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_errorlogs extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Load skin
//-----------------------------------------
$this->html = $this->registry->output->loadTemplate('cp_skin_errorlogs');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=logs&amp;section=errorlogs';
$this->form_code_js = $this->html->form_code_js = 'module=logs&section=errorlogs';
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'admin_logs' ) );
$this->registry->output->core_nav[] = array( $this->settings['base_url'] . 'module=logs&section=errorlogs', $this->lang->words['error_log_thelogs'] );
///----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'list':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'errorlogs_view' );
$this->_listCurrent();
break;
case 'remove':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'errorlogs_delete' );
$this->_remove();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Remove email logs
*
* @return @e void [Outputs to screen]
*/
protected function _remove()
{
if( $this->request['type'] == 'all' )
{
$this->DB->delete( 'error_logs' );
}
else
{
$ids = array();
foreach( $this->request as $k => $v )
{
if ( preg_match( "/^id_(\d+)$/", $k, $match ) )
{
if ($this->request[ $match[0] ] )
{
$ids[] = $match[1];
}
}
}
$ids = IPSLib::cleanIntArray( $ids );
//-----------------------------------------
if( count($ids) < 1 )
{
$this->registry->output->showError( $this->lang->words['erlog_noneselected'], 11115 );
}
$this->DB->delete( 'error_logs', "log_id IN (" . implode( ',', $ids ) . ")" );
}
$this->registry->adminFunctions->saveAdminLog( $this->lang->words['error_log_removed'] );
$this->registry->output->silentRedirect( $this->settings['base_url'] . "&{$this->form_code}" );
}
/**
* List the current logs
*
* @return @e void [Outputs to screen]
*/
protected function _listCurrent()
{
$start = intval( $this->request['st'] ) >= 0 ? intval( $this->request['st'] ) : 0;
/* Check URL parameters */
$url_query = array();
$db_query = array();
if( $this->request['type'] )
{
$string = IPSText::parseCleanValue( urldecode( $this->request['string'] ) );
if( $string == "" )
{
$this->registry->output->showError( $this->lang->words['erlog_enter_sumthang_yo'], 11116 );
}
$url_query[] = 'type=' . $this->request['type'];
$url_query[] = 'string=' . urlencode( $string );
switch( $this->request['type'] )
{
case 'log_error':
$db_query[] = $this->request['match'] == 'loose' ? "e.log_error LIKE '%{$string}%'" : "e.log_error='{$string}'";
break;
case 'log_error_code':
$db_query[] = $this->request['match'] == 'loose' ? "e.log_error_code LIKE '%{$string}%'" : "e.log_error_code='{$string}'";
break;
case 'log_request_uri':
$db_query[] = $this->request['match'] == 'loose' ? "e.log_request_uri LIKE '%{$string}%'" : "e.log_request_uri='{$string}'";
break;
case 'members_display_name':
$db_query[] = $this->request['match'] == 'loose' ? "m.members_display_name LIKE '%{$string}%'" : "m.members_display_name='{$string}'";
break;
}
}
/* Build extra query stuff */
$dbe = '';
$url = '';
if( count( $db_query ) )
{
$dbe = implode( ' AND ', $db_query );
}
if( count( $url_query ) )
{
$url = '&amp;' . implode( '&amp;', $url_query );
}
/* Pagination */
$count = $this->DB->buildAndFetch( array(
'select' => 'count(*) as cnt',
'from' => array( 'error_logs' => 'e' ),
'where' => $dbe,
'add_join' => array(
array(
'from' => array( 'members' => 'm' ),
'where' => 'e.log_member=m.member_id',
'type' => 'left',
)
)
) );
$links = $this->registry->output->generatePagination( array(
'totalItems' => $count['cnt'],
'itemsPerPage' => 25,
'currentStartValue' => $start,
'baseUrl' => $this->settings['base_url'] . "&{$this->form_code}" . $url,
)
);
/* Query the logs */
$this->DB->build( array(
'select' => 'e.*',
'from' => array( 'error_logs' => 'e' ),
'where' => $dbe,
'order' => 'e.log_date DESC',
'limit' => array( $start, 25 ),
'add_join' => array(
array(
'select' => 'm.members_display_name',
'from' => array( 'members' => 'm' ),
'where' => 'e.log_member=m.member_id',
'type' => 'left',
)
)
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$row['_date'] = $this->registry->class_localization->getDate( $row['log_date'], 'SHORT' );
$rows[] = $row;
}
$this->registry->output->html .= $this->html->errorlogsWrapper( $rows, $links );
}
}
@@ -1,10 +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>
<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>
Loaded 100 of 2206 files, more files were not shown because too many files have changed in this diff. Show more