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

@@ -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,127 +1,127 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Member form manipulation
* Last Updated: $Date: 2011-03-10 21:04:50 -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 Members
* @link http://hatynka.in
* @since 1st march 2002
* @version $Revision: 8024 $
*
*/
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__members implements admin_member_form
{
/**
* Tab name
* This can be left blank and the application title will
* be used
*
* @var string Tab name
*/
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() )
{
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_members' ), 'members' );
$array = array();
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'membertools_delete_pms', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=deleteMessages',
'title' => ipsRegistry::getClass('class_localization')->words['form_deletepms'] );
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'membertools_ip', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=show_all_ips',
'title' => ipsRegistry::getClass('class_localization')->words['form_showallips'] );
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'member_suspend', 'members', 'members' ) )
{
if( $member['temp_ban'] )
{
$array[] = array( 'img' => '',
'url' => 'section=members&amp;module=members&amp;do=unsuspend',
'title' => ipsRegistry::getClass('class_localization')->words['form_unsuspendmem'] );
}
else
{
$array[] = array( 'img' => '',
'url' => 'section=members&amp;module=members&amp;do=banmember',
'title' => ipsRegistry::getClass('class_localization')->words['form_suspendmem'] );
}
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'members_merge', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=merge',
'title' => ipsRegistry::getClass('class_localization')->words['form_mergemember'] );
}
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 form manipulation
* 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 Members
* @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__members implements admin_member_form
{
/**
* Tab name
* This can be left blank and the application title will
* be used
*
* @var string Tab name
*/
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() )
{
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_members' ), 'members' );
$array = array();
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'membertools_delete_pms', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=deleteMessages',
'title' => ipsRegistry::getClass('class_localization')->words['form_deletepms'] );
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'membertools_ip', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=show_all_ips',
'title' => ipsRegistry::getClass('class_localization')->words['form_showallips'] );
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'member_suspend', 'members', 'members' ) )
{
if( $member['temp_ban'] )
{
$array[] = array( 'img' => '',
'url' => 'section=members&amp;module=members&amp;do=unsuspend',
'title' => ipsRegistry::getClass('class_localization')->words['form_unsuspendmem'] );
}
else
{
$array[] = array( 'img' => '',
'url' => 'section=members&amp;module=members&amp;do=banmember',
'title' => ipsRegistry::getClass('class_localization')->words['form_suspendmem'] );
}
}
if( ipsRegistry::getClass('class_permissions')->checkPermission( 'members_merge', 'members', 'members' ) )
{
$array[] = array( 'img' => '',
'url' => 'section=tools&amp;module=members&amp;do=merge',
'title' => ipsRegistry::getClass('class_localization')->words['form_mergemember'] );
}
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>
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* IP.Board messenger attachments plugin
* Last Updated: $Date: 2011-09-20 21:18:18 -0400 (Tue, 20 Sep 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 6/24/2008
* @version $Revision: 9520 $
* @version $Revision: 10914 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -139,67 +139,62 @@ class plugin_msg extends class_attach
if ( is_array( $rel_ids ) and count( $rel_ids ) )
{
$rel_ids = array_map( 'intval', $rel_ids );
// We need to reset the array - this query bit will return everything we need, but
// if we "OR" join the above query bit with this one, it causes bigger mysql loads
$query_bits = array();
$query_bits[] = "attach_rel_id IN (" . implode( ",", $rel_ids ) . ")";
//$query = " OR attach_rel_id IN (-1," . implode( ",", $rel_ids ) . ")";
$match = 1;
}
if ( $attach_post_key )
{
$query_bits[] = "attach_post_key='".$this->DB->addSlashes( $attach_post_key )."'";
//$query .= " OR attach_post_key='".$this->DB->addSlashes( $attach_post_key )."'";
$match = 2;
}
if( !count($query_bits) )
{
$query = "attach_id IN (-1)";
}
else
{
$query = implode( " OR ", $query_bits );
}
//-----------------------------------------
// Grab 'em
//-----------------------------------------
$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module='{$this->module}' AND ( {$query} )" ) );
$attach_sql = $this->DB->execute();
//-----------------------------------------
// Loop through and filter off naughty ids
//-----------------------------------------
while( $db_row = $this->DB->fetch( $attach_sql ) )
if( count($query_bits) )
{
$_ok = 1;
if ( $match == 1 )
{
if ( ! in_array( $db_row['attach_rel_id'], $rel_ids ) )
{
$_ok = 0;
}
}
else if ( $match == 2 )
{
if ( $db_row['attach_post_key'] != $attach_post_key )
{
$_ok = 0;
}
}
$this->DB->build( array( 'select' => '*', 'from' => 'attachments', 'where' => "attach_rel_module='{$this->module}' AND ( " . implode( ' OR ', $query_bits ) . " )" ) );
$attach_sql = $this->DB->execute();
//-----------------------------------------
// Ok?
// Loop through and filter off naughty ids
//-----------------------------------------
if ( $_ok )
while( $db_row = $this->DB->fetch( $attach_sql ) )
{
$rows[ $db_row['attach_id'] ] = $db_row;
$_ok = 1;
if ( $match == 1 )
{
if ( ! in_array( $db_row['attach_rel_id'], $rel_ids ) )
{
$_ok = 0;
}
}
else if ( $match == 2 )
{
if ( $db_row['attach_post_key'] != $attach_post_key )
{
$_ok = 0;
}
}
//-----------------------------------------
// Ok?
//-----------------------------------------
if ( $_ok )
{
$rows[ $db_row['attach_id'] ] = $db_row;
}
}
}
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -0,0 +1,279 @@
<?php
/**
* Online friends plugin
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Content
* @link http://www.invisionpower.com
* @version $Rev: 8752 $
* @since 1st March 2009
*/
class plugin_online_friends implements pluginBlockInterface
{
/**#@+
* Registry Object Shortcuts
*
* @access protected
* @var object
*/
protected $DB;
protected $settings;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $registry;
protected $caches;
protected $request;
/**#@-*/
/**
* Constructor
*
* @access public
* @param object Registry reference
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// Make shortcuts
//-----------------------------------------
$this->registry = $registry;
$this->DB = $registry->DB();
$this->settings = $registry->fetchSettings();
$this->member = $registry->member();
$this->cache = $registry->cache();
$this->caches =& $registry->cache()->fetchCaches();
$this->request = $registry->fetchRequest();
$this->lang = $registry->class_localization;
$this->memberData =& $this->registry->member()->fetchMemberData();
}
/**
* Return the tag help for this block type
*
* @access public
* @return array
*/
public function getTags()
{
$_finalColumns = array();
$_noinfoColumns = array();
foreach( $this->DB->getFieldNames( 'sessions' ) as $_column )
{
if( $this->lang->words['col__sessions_' . $_column ] )
{
$_finalColumns[ $_column ] = array( "&#36;r['" . $_column . "']", $this->lang->words['col__sessions_' . $_column ] );
}
else
{
$_noinfoColumns[ $_column ] = array( "&#36;r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true );
}
}
foreach( $this->DB->getFieldNames( 'members' ) as $_column )
{
if( $this->lang->words['col__members_' . $_column ] )
{
$_finalColumns[ $_column ] = array( "&#36;r['" . $_column . "']", $this->lang->words['col__members_' . $_column ] );
}
else
{
$_noinfoColumns[ $_column ] = array( "&#36;r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true );
}
}
$_fieldInfo = array();
$this->DB->buildAndFetch( array( 'select' => 'pf_id,pf_title,pf_desc', 'from' => 'pfields_data' ) );
$this->DB->execute();
while( $r= $this->DB->fetch() )
{
$_fieldInfo[ $r['pf_id'] ] = $r;
}
foreach( $this->DB->getFieldNames( 'pfields_content' ) as $_column )
{
if( $this->lang->words['col__pfields_content_' . $_column ] )
{
$_finalColumns[ $_column ] = array( "&#36;r['" . $_column . "']", $this->lang->words['col__pfields_content_' . $_column ] );
}
else if( preg_match( "/^field_(\d+)$/", $_column, $matches ) AND isset( $_fieldInfo[ $matches[1] ] ) )
{
$_finalColumns[ $_column ] = array( "&#36;r['" . $_column . "']", $_fieldInfo[ $matches[1] ]['pf_title'] . ( $_fieldInfo[ $matches[1] ]['pf_desc'] ? ': ' . $_fieldInfo[ $matches[1] ]['pf_desc'] : '' ) );
}
else
{
$_noinfoColumns[ $_column ] = array( "&#36;r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true );
}
}
foreach( $this->DB->getFieldNames( 'profile_portal' ) as $_column )
{
if( $this->lang->words['col__profile_portal_' . $_column ] )
{
$_finalColumns[ $_column ] = array( "&#36;r['" . $_column . "']", $this->lang->words['col__profile_portal_' . $_column ] );
}
else
{
$_noinfoColumns[ $_column ] = array( "&#36;r['" . $_column . "']", $this->lang->words['notaghelpinfoavailable'], true );
}
}
$_finalColumns['my_member_id'] = array( "&#36;r['my_member_id']", $this->lang->words['col__special_my_member_id'] );
$_finalColumns['pp_main_photo'] = array( "&#36;r['pp_main_photo']", $this->lang->words['col__special_pp_main_photo'] );
$_finalColumns['pp_main_width'] = array( "&#36;r['pp_main_width']", $this->lang->words['col__special_pp_main_width'] );
$_finalColumns['pp_main_height'] = array( "&#36;r['pp_main_height']", $this->lang->words['col__special_pp_main_height'] );
$_finalColumns['_has_photo'] = array( "&#36;r['_has_photo']", $this->lang->words['col__special__has_photo'] );
$_finalColumns['pp_small_photo'] = array( "&#36;r['pp_small_photo']", $this->lang->words['col__special_pp_small_photo'] );
$_finalColumns['pp_small_width'] = array( "&#36;r['pp_small_width']", $this->lang->words['col__special_pp_small_width'] );
$_finalColumns['pp_small_height'] = array( "&#36;r['pp_small_height']", $this->lang->words['col__special_pp_small_height'] );
$_finalColumns['pp_mini_photo'] = array( "&#36;r['pp_mini_photo']", $this->lang->words['col__special_pp_mini_photo'] );
$_finalColumns['pp_mini_width'] = array( "&#36;r['pp_mini_width']", $this->lang->words['col__special_pp_mini_width'] );
$_finalColumns['pp_mini_height'] = array( "&#36;r['pp_mini_height']", $this->lang->words['col__special_pp_mini_height'] );
$_finalColumns['member_rank_img_i'] = array( "&#36;r['member_rank_img_i']", $this->lang->words['col__special_member_rank_img_i'] );
$_finalColumns['member_rank_img'] = array( "&#36;r['member_rank_img']", $this->lang->words['col__special_member_rank_img'] );
return array(
$this->lang->words['block_plugin__generic'] => array(
array( '&#36;title', $this->lang->words['block_custom__title'] ) ,
),
$this->lang->words['block_plugin__of_users'] => array(
array( '&#36;friends', $this->lang->words['block_plugin__of_us'], IPSLib::mergeArrays( $_finalColumns, $_noinfoColumns ) ),
),
);
}
/**
* Return the plugin meta data
*
* @access public
* @return array Plugin data (name, description, hasConfig)
*/
public function returnPluginInfo()
{
return array(
'key' => 'online_friends',
'name' => $this->lang->words['plugin_name__online_friends'],
'description' => $this->lang->words['plugin_description__online_friends'],
'hasConfig' => false,
'templateBit' => 'block__online_friends',
);
}
/**
* Get plugin configuration data. Returns form elements and data
*
* @access public
* @param array Session data
* @return array Form data
*/
public function returnPluginConfig( $session )
{
return array();
}
/**
* Check the plugin config data
*
* @access public
* @param array Submitted plugin data to check (usually $this->request)
* @return array Array( (bool) Ok or not, (array) Plugin data to use )
*/
public function validatePluginConfig( $data )
{
return array( true, $data );
}
/**
* Execute the plugin and return the HTML to show on the page.
* Can be called from ACP or front end, so the plugin needs to setup any appropriate lang files, skin files, etc.
*
* @access public
* @param array Block data
* @return string Block HTML to display or cache
*/
public function executePlugin( $block )
{
$config = unserialize($block['block_config']);
$this->lang->loadLanguageFile( array( 'public_ccs' ), 'ccs' );
$friends = array();
$onlineFriends = array();
$this->DB->build( array( 'select' => '*', 'from' => 'profile_friends', 'where' => 'friends_member_id=' . $this->memberData['member_id'] ) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
{
$friends[ $r['friends_friend_id'] ] = $r['friends_friend_id'];
}
if( count($friends) )
{
$_time = $this->settings['au_cutoff'] * 60;
$_cutoff = time() - $_time;
$this->DB->build( array(
'select' => 's.*',
'from' => array( 'sessions' => 's' ),
'where' => 's.member_id IN(' . implode( ',', $friends ) . ') AND s.running_time > ' . $_cutoff,
'order' => 's.running_time DESC',
'add_join' => array(
array(
'select' => 'm.*, m.member_id as my_member_id',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=s.member_id',
'type' => 'left',
),
array(
'select' => 'pf.*',
'from' => array( 'pfields_content' => 'pf' ),
'where' => 'pf.member_id=m.member_id',
'type' => 'left',
),
array(
'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'pp.pp_member_id=m.member_id',
'type' => 'left',
),
)
) );
$outer = $this->DB->execute();
while( $r = $this->DB->fetch($outer) )
{
$r['member_id'] = $r['my_member_id'];
$r = IPSMember::buildDisplayData( $r );
$onlineFriends[ $r['member_id'] ] = $r;
}
}
if( $config['hide_empty'] AND !count($onlineFriends) )
{
return '';
}
$pluginConfig = $this->returnPluginInfo();
$templateBit = $pluginConfig['templateBit'] . '_' . $block['block_id'];
ob_start();
$_return = $this->registry->output->getTemplate('ccs')->$templateBit( $block['block_name'], $onlineFriends );
ob_end_clean();
return $_return;
}
}
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com">IP.Board</a>
</body>
</html>
@@ -0,0 +1,139 @@
<?php
/**
* Status Updates widget
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Content
* @link http://www.invisionpower.com
* @version $Rev: 8644 $
* @since 1st March 2009
*/
class plugin_status_updates implements pluginBlockInterface
{
/**#@+
* Registry Object Shortcuts
*
* @access protected
* @var object
*/
protected $DB;
protected $settings;
protected $lang;
protected $member;
protected $memberData;
protected $cache;
protected $caches;
protected $registry;
protected $request;
/**#@-*/
/**
* Constructor
*
* @access public
* @param object Registry reference
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// Make shortcuts
//-----------------------------------------
$this->registry = $registry;
$this->DB = $registry->DB();
$this->settings = $registry->fetchSettings();
$this->member = $registry->member();
$this->memberData =& $registry->member()->fetchMemberData();
$this->cache = $registry->cache();
$this->caches =& $registry->cache()->fetchCaches();
$this->request = $registry->fetchRequest();
$this->lang = $registry->class_localization;
}
/**
* Return the tag help for this block type
*
* @access public
* @return array
*/
public function getTags()
{
return array(
$this->lang->words['block_plugin__generic'] => array(
array( '&#36;title', $this->lang->words['block_custom__title'] ) ,
array( '&#36;output', $this->lang->words['block_plugin_su_content'] ) ,
),
);
}
/**
* Return the plugin meta data
*
* @access public
* @return array Plugin data (name, description, hasConfig)
*/
public function returnPluginInfo()
{
return array(
'key' => 'status_updates',
'name' => $this->lang->words['plugin_name__status_updates'],
'description' => $this->lang->words['plugin_description__status_updates'],
'hasConfig' => false,
'templateBit' => 'block__status_updates',
);
}
/**
* Get plugin configuration data. Returns form elements and data
*
* @access public
* @param array Session data
* @return array Form data
*/
public function returnPluginConfig( $session )
{
return array();
}
/**
* Check the plugin config data
*
* @access public
* @param array Submitted plugin data to check (usually $this->request)
* @return array Array( (bool) Ok or not, (array) Plugin data to use )
*/
public function validatePluginConfig( $data )
{
return array( true, $data );
}
/**
* Execute the plugin and return the HTML to show on the page.
* Can be called from ACP or front end, so the plugin needs to setup any appropriate lang files, skin files, etc.
*
* @access public
* @param array Block data
* @return string Block HTML to display or cache
*/
public function executePlugin( $block )
{
$this->lang->loadLanguageFile( array( 'public_boards' ), 'forums' );
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/hooks/gateway.php', "members_hookGateway", 'members' );
$hookGateway = new $classToLoad( $this->registry );
$output = $hookGateway->statusUpdates();
$pluginConfig = $this->returnPluginInfo();
$templateBit = $pluginConfig['templateBit'] . '_' . $block['block_id'];
ob_start();
$_return = $this->registry->output->getTemplate('ccs')->$templateBit( $block['block_name'], $output );
ob_end_clean();
return $_return;
}
}
@@ -1,141 +1,253 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Core extensions
* Last Updated: $Date: 2011-03-10 21:04:50 -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 Members
* @link http://hatynka.in
* @since 20th February 2002
* @version $Rev: 8024 $
*
*/
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 publicSessions__members
{
/**
* 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 );
if( !empty(ipsRegistry::$request['id']) AND ipsRegistry::$request['section'] == 'view' AND ipsRegistry::$request['module'] == 'profile' )
{
$array['location_1_type'] = 'profile';
$array['location_1_id'] = ipsRegistry::$request['id'];
}
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();
$profiles = array();
$names = array();
//-----------------------------------------
// Extract the topic/forum data
//-----------------------------------------
foreach( $rows as $row )
{
if( $row['current_appcomponent'] != 'members' OR !$row['current_module'] )
{
continue;
}
if( $row['current_module'] == 'profile' )
{
$profiles[] = $row['location_1_id'];
}
}
if( count($profiles) )
{
ipsRegistry::DB()->build( array( 'select' => 'member_id, members_display_name, members_seo_name', 'from' => 'members', 'where' => 'member_id IN(' . implode( ',', $profiles ) . ')' ) );
$pr = ipsRegistry::DB()->execute();
while( $r = ipsRegistry::DB()->fetch($pr) )
{
$names[ $r['member_id'] ] = array( 'members_display_name' => $r['members_display_name'], 'members_seo_name' => $r['members_seo_name'] );
}
}
foreach( $rows as $row )
{
if( $row['current_appcomponent'] == 'members' )
{
if( $row['current_module'] == 'online' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_online'];
}
if( $row['current_module'] == 'list' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_members'];
}
if( $row['current_module'] == 'messaging' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_msg'];
}
if( $row['current_module'] == 'profile' )
{
if ( isset( $names[ $row['location_1_id'] ] ) )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_profile'];
$row['where_line_more'] = $names[ $row['location_1_id'] ]['members_display_name'];
$row['where_link'] = 'showuser=' . $row['location_1_id'];
$row['_whereLinkSeo'] = ipsRegistry::getClass('output')->buildSEOUrl( $row['where_link'], 'public', $names[ $row['location_1_id'] ]['members_seo_name'], 'showuser' );
}
}
}
$final[ $row['id'] ] = $row;
}
return $final;
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Core extensions
* 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 Members
* @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 publicSessions__members
{
/**
* 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 );
if( !empty(ipsRegistry::$request['id']) AND ipsRegistry::$request['section'] == 'view' AND ipsRegistry::$request['module'] == 'profile' )
{
$array['location_1_type'] = 'profile';
$array['location_1_id'] = ipsRegistry::$request['id'];
}
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();
$profiles = array();
$members = array();
//-----------------------------------------
// Extract the topic/forum data
//-----------------------------------------
foreach( $rows as $row )
{
if( $row['current_appcomponent'] != 'members' OR !$row['current_module'] )
{
continue;
}
if( $row['current_module'] == 'profile' )
{
$profiles[] = $row['location_1_id'];
}
}
if( count($profiles) )
{
ipsRegistry::DB()->build( array( 'select' => 'member_id, members_display_name, members_seo_name, member_banned, members_bitoptions', 'from' => 'members', 'where' => 'member_id IN(' . implode( ',', $profiles ) . ')' ) );
$pr = ipsRegistry::DB()->execute();
while( $r = ipsRegistry::DB()->fetch($pr) )
{
/* Setup bitwise option to check for banned/spammer members */
$r = IPSMember::buildBitWiseOptions( $r );
if ( ! IPSMember::isInactive( $r ) || ipsRegistry::member()->getProperty('g_is_supmod') )
{
$members[ $r['member_id'] ] = array( 'members_display_name' => $r['members_display_name'], 'members_seo_name' => $r['members_seo_name'] );
}
}
}
foreach( $rows as $row )
{
if( $row['current_appcomponent'] == 'members' )
{
if( $row['current_module'] == 'online' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_online'];
}
if( $row['current_module'] == 'list' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_members'];
}
if( $row['current_module'] == 'messaging' )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_msg'];
}
if( $row['current_module'] == 'profile' )
{
if ( isset($members[ $row['location_1_id'] ]) )
{
$row['where_line'] = ipsRegistry::getClass( 'class_localization' )->words['WHERE_profile'];
$row['where_line_more'] = $members[ $row['location_1_id'] ]['members_display_name'];
$row['where_link'] = 'showuser=' . $row['location_1_id'];
$row['_whereLinkSeo'] = ipsRegistry::getClass('output')->buildSEOUrl( $row['where_link'], 'public', $members[ $row['location_1_id'] ]['members_seo_name'], 'showuser' );
}
}
}
$final[ $row['id'] ] = $row;
}
return $final;
}
}
/**
* <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.Board
* @subpackage Forums
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
*/
class itemMarking__members
{
/**
* Field Convert Data Remap Array
*
* This is where you can map your app_key_# numbers to application savvy fields
*
* @var array
*/
protected $_convertData = array();
/**#@+
* 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;
}
/**
* Determines whether to load all markers for this view or not
*
* @return bool
*/
public function loadAllMarkers()
{
/* don't need markers for this app */
return false;
}
/**
* 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 )
{
return 0;
}
}
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Core variables extension file
* Last Updated: $Date: 2010-12-19 21:06:50 -0500 (Sun, 19 Dec 2010) $
* 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 Members
* @link http://hatynka.in
* @link http://www.invisionpower.com
* @since 1st march 2002
* @version $Revision: 7452 $
* @version $Revision: 10914 $
*
*/
@@ -3,17 +3,17 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Dashboard Notifications
* Last Updated: $Date
*
* @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 Members
* @link http://hatynka.in
* @version $Rev: 8397 $
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
*
*/
@@ -2,18 +2,18 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Define data hook locations (Members)
* Last Updated: $Date: 2011-05-18 04:49:10 -0400 (Wed, 18 May 2011) $
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @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
* @version $Rev: 8812 $
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
*/
$dataHookLocations = array(
@@ -24,7 +24,12 @@ $dataHookLocations = array(
array( 'messengerSendTopicFirstPostData', 'Messenger: New conversation, first post' ),
/* PROFILE DATA LOCATIONS */
array( 'profileCommentNew', 'Profile: New comment' ),
array( 'statusUpdateNew', 'New Status Update' ),
array( 'statusCommentNew', 'New Status Comment' ),
array( 'profileFriendsNew', 'Profile: New friend' ),
/* MEMBER WARNINGS LOCATIONS */
array( 'memberWarningPre', 'Warn Member (Pre Save)' ),
array( 'memberWarningPost', 'Warn Member (Post Save)' ),
);
@@ -1,39 +1,39 @@
<?php
/**
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* BBCode Management : Determines if bbcode can be used in this section
* Last Updated: $LastChangedDate: 2010-12-17 07:40:13 -0500 (Fri, 17 Dec 2010) $
* 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: ips_terabyte $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Members
* @link http://hatynka.in
* @since 27th January 2004
* @version $Rev: 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();
}
/*
* 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(
'signatures' => ipsRegistry::getClass('class_localization')->words['ctype__signatures'],
'aboutme' => ipsRegistry::getClass('class_localization')->words['ctype__aboutme'],
'pms' => ipsRegistry::getClass('class_localization')->words['ctype__pms'],
'warn' => ipsRegistry::getClass('class_localization')->words['ctype__warn'],
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Members
* @link http://www.invisionpower.com
* @since 27th January 2004
* @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();
}
/*
* 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(
'signatures' => ipsRegistry::getClass('class_localization')->words['ctype__signatures'],
'aboutme' => ipsRegistry::getClass('class_localization')->words['ctype__aboutme'],
'pms' => ipsRegistry::getClass('class_localization')->words['ctype__pms'],
'warn' => ipsRegistry::getClass('class_localization')->words['ctype__warn'],
);
@@ -1,74 +0,0 @@
<?php
/**
* Invision Power Services
* IP.Board v3.0.1
* Sets up SEO templates
* Last Updated: $Date: 2009-03-04 15:08:31 +0000 (Wed, 04 Mar 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package Invision Power Board
* @subpackage Members
* @link http://hatynka.in
* @since 20th February 2002
* @version $Rev: 4136 $
*
*/
/**
* 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(
'showuser' => array( 'app' => 'members',
'allowRedirect' => 1,
'out' => array( '#showuser=(.+?)(&|$)#i', 'user/$1/$2' ),
'in' => array( 'regex' => "#/user/(\d+)/?#i",
'matches' => array( array( 'showuser', '$1' ) ) ) ),
'members_status_friends'=> array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status(?:&|&amp;)type=friends(&|$)#i', 'statuses/friends/$2' ),
'in' => array( 'regex' => "#/statuses/friends#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ),
array( 'type' , 'friends' ) ) ) ),
'members_status_all' => array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status((?:&|&amp;)type=all)?(&|$)#i', 'statuses/all/$2' ),
'in' => array( 'regex' => "#/statuses/all#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ) ) ) ),
'members_list' => array(
'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members((&|&amp;)module=list)?#i', 'members/' ),
'in' => array(
'regex' => "#/members(/|$|\?)#i",
'matches' => array( array( 'app', 'members' ),
array( 'module', 'list' ) )
)
),
);
@@ -1,135 +1,133 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* RSS output plugin :: posts
* 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
* @since 6/24/2008
* @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 furlRedirect_members
{
/**
* Key type: Type of action (topic/forum)
*
* @var string
*/
protected $_type = '';
/**
* Key ID
*
* @var int
*/
protected $_id = 0;
/**
* Constructor
*
*/
public function __construct( ipsRegistry $registry )
{
$this->registry = $registry;
$this->DB = $registry->DB();
$this->settings =& $registry->fetchSettings();
}
/**
* Set the key ID
* <code>furlRedirect_forums::setKey( 'topic', 12 );</code>
*
* @param string Type
* @param mixed Value
*/
public function setKey( $name, $value )
{
$this->_type = $name;
$this->_id = $value;
}
/**
* Set up the key by URI
*
* @param string URI (example: index.php?showtopic=5&view=getlastpost)
* @return @e void
*/
public function setKeyByUri( $uri )
{
$uri = str_replace( '&amp;', '&', $uri );
if ( strstr( $uri, '?' ) )
{
list( $_chaff, $uri ) = explode( '?', $uri );
}
foreach( explode( '&', $uri ) as $bits )
{
list( $k, $v ) = explode( '=', $bits );
if ( $k )
{
if ( $k == 'showuser' )
{
$this->setKey( 'user', intval( $v ) );
return TRUE;
}
}
}
return FALSE;
}
/**
* Return the SEO title
*
* @return string The SEO friendly name
*/
public function fetchSeoTitle()
{
switch ( $this->_type )
{
default:
return FALSE;
break;
case 'user':
return $this->_fetchSeoTitle_user();
break;
}
}
/**
* Return the SEO title for a user
*
* @return string The SEO friendly name
*/
public function _fetchSeoTitle_user()
{
$member = IPSMember::load( intval( $this->_id ), 'core' );
if ( $member['member_id'] )
{
if ( IPB_USE_ONLY_ID_FURL ) return $member['member_id'];
return ( $member['members_seo_name'] ) ? $member['members_seo_name'] : IPSText::makeSeoTitle( $member['members_display_name'] );
}
return FALSE;
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* RSS output plugin :: posts
* 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
* @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 furlRedirect_members
{
/**
* Key type: Type of action (topic/forum)
*
* @var string
*/
protected $_type = '';
/**
* Key ID
*
* @var int
*/
protected $_id = 0;
/**
* Constructor
*
*/
public function __construct( ipsRegistry $registry )
{
$this->registry = $registry;
$this->DB = $registry->DB();
$this->settings =& $registry->fetchSettings();
}
/**
* Set the key ID
* <code>furlRedirect_forums::setKey( 'topic', 12 );</code>
*
* @param string Type
* @param mixed Value
*/
public function setKey( $name, $value )
{
$this->_type = $name;
$this->_id = $value;
}
/**
* Set up the key by URI
*
* @param string URI (example: index.php?showtopic=5&view=getlastpost)
* @return @e void
*/
public function setKeyByUri( $uri )
{
$uri = str_replace( '&amp;', '&', $uri );
if ( strstr( $uri, '?' ) )
{
list( $_chaff, $uri ) = explode( '?', $uri );
}
foreach( explode( '&', $uri ) as $bits )
{
list( $k, $v ) = explode( '=', $bits );
if ( $k )
{
if ( $k == 'showuser' )
{
$this->setKey( 'user', intval( $v ) );
return TRUE;
}
}
}
return FALSE;
}
/**
* Return the SEO title
*
* @return string The SEO friendly name
*/
public function fetchSeoTitle()
{
switch ( $this->_type )
{
default:
return FALSE;
break;
case 'user':
return $this->_fetchSeoTitle_user();
break;
}
}
/**
* Return the SEO title for a user
*
* @return string The SEO friendly name
*/
public function _fetchSeoTitle_user()
{
$member = IPSMember::load( intval( $this->_id ), 'core' );
if ( $member['member_id'] )
{
return ( $member['members_seo_name'] ) ? $member['members_seo_name'] : IPSText::makeSeoTitle( $member['members_display_name'] );
}
return FALSE;
}
}
@@ -1,94 +1,106 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Sets up SEO templates
* Last Updated: $Date: 2011-04-11 06:49:17 -0400 (Mon, 11 Apr 2011) $
* </pre>
*
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Members
* @link http://hatynka.in
* @since 20th February 2002
* @version $Rev: 8294 $
*
*/
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(
'showuser' => array( 'app' => 'members',
'allowRedirect' => 1,
'out' => array( '#showuser=(.+?)((?:&|&amp;)f=(.+?))?(&|$)#i', 'user/$1-#{__title__}/$2$4' ),
'in' => array( 'regex' => "#/user/(\d+?)-#i",
'matches' => array( array( 'showuser', '$1' ) ) ) ),
'members_status_single' => array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status(?:&|&amp;)type=single(?:&|&amp;)status_id=(\d+?)(&|$)#i', 'statuses/id/$1/$2' ),
'in' => array( 'regex' => "#/statuses/id/(\d+?)/#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ),
array( 'type' , 'single' ),
array( 'status_id', '$1' ) ) ) ),
'members_status_friends'=> array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status(?:&|&amp;)type=friends(&|$)#i', 'statuses/friends/$2' ),
'in' => array( 'regex' => "#/statuses/friends#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ),
array( 'type' , 'friends' ) ) ) ),
'members_status_all' => array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status((?:&|&amp;)type=all)?(&|$)#i', 'statuses/all/$2' ),
'in' => array( 'regex' => "#/statuses/all#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ) ) ) ),
'members_list' => array(
'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members((&|&amp;)module=list)?#i', 'members/' ),
'in' => array(
'regex' => "#/members(/|$|\?)#i",
'matches' => array( array( 'app', 'members' ),
array( 'module', 'list' ) )
)
),
);
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Sets up SEO templates
* 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 Members
* @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();
}
/**
* 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(
'showuser' => array( 'app' => 'members',
'allowRedirect' => 1,
'out' => array( '#showuser=(.+?)((?:&|&amp;)f=(.+?))?(&|$)#i', 'user/$1-#{__title__}/$2$4' ),
'in' => array( 'regex' => "#^/user/(\d+?)-#i",
'matches' => array( array( 'showuser', '$1' ) ) ) ),
'members_status_single' => array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status(?:&|&amp;)type=single(?:&|&amp;)status_id=(\d+?)(&|$)#i', 'statuses/id/$1/$2' ),
'in' => array( 'regex' => "#/statuses/id/(\d+?)/#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ),
array( 'type' , 'single' ),
array( 'status_id', '$1' ) ) ) ),
'members_status_friends'=> array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status(?:&|&amp;)type=friends(&|$)#i', 'statuses/friends/$2' ),
'in' => array( 'regex' => "#/statuses/friends#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ),
array( 'type' , 'friends' ) ) ) ),
'members_status_all' => array( 'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=profile(?:&|&amp;)section=status((?:&|&amp;)type=all)?(&|$)#i', 'statuses/all/$2' ),
'in' => array( 'regex' => "#/statuses/all#i",
'matches' => array( array( 'app' , 'members' ),
array( 'section', 'status' ),
array( 'module' , 'profile' ) ) ) ),
'members_list' => array(
'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members((&|&amp;)module=list)?#i', 'members/' ),
'in' => array(
'regex' => "#/members(/|$|\?)#i",
'matches' => array( array( 'app', 'members' ),
array( 'module', 'list' ) )
)
),
'most_liked' => array(
'app' => 'members',
'allowRedirect' => 0,
'out' => array( '#app=members(?:&|&amp;)module=reputation(?:&|&amp;)section=most#i', 'best-content/' ),
'in' => array(
'regex' => "#/best-content(/|$|\?)#i",
'matches' => array( array( 'app', 'members' ),
array( 'module', 'reputation' ),
array( 'section', 'most' ) )
)
),
);
@@ -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,101 +1,101 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Forum permissions mappings
* 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();
}
/**
* Member Synchronization extensions
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Members
* @link http://hatynka.in
* @version $Rev: 8644 $
*/
class membersMemberSync
{
/**
* Registry reference
*
* @var object
*/
public $registry;
/**
* CONSTRUCTOR
*
* @return @e void
*/
public function __construct()
{
$this->registry = ipsRegistry::instance();
}
/**
* This method is run when a member is flagged as a spammer
*
* @param array $member Array of member data
* @return @e void
*/
public function onSetAsSpammer( $member )
{
/* Load status class */
if ( ! $this->registry->isClassLoaded( 'memberStatus' ) )
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/member/status.php', 'memberStatus' );
$this->registry->setClass( 'memberStatus', new $classToLoad( ipsRegistry::instance() ) );
}
/* Delete the stuff */
$this->registry->getClass('memberStatus')->setAuthor( $member );
$this->registry->getClass('memberStatus')->deleteAllReplies();
$this->registry->getClass('memberStatus')->deleteAllMemberStatus();
}
/**
* This method is run when a member is un-flagged as a spammer
*
* @param array $member Array of member data
* @return @e void
*/
public function onUnSetAsSpammer( $member )
{
}
/**
* This method is called after a member account has been removed
*
* @param string $ids SQL IN() clause
* @return @e void
*/
public function onDelete( $mids )
{
/* Delete Status Updates - note, we can't do this via memberStatus class, since we no longer have the member data */
ipsRegistry::DB()->delete( 'member_status_updates', "status_member_id" . $mids );
ipsRegistry::DB()->delete( 'member_status_actions', "action_member_id" . $mids );
ipsRegistry::DB()->delete( 'member_status_replies', "reply_member_id" . $mids );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Forum permissions mappings
* 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();
}
/**
* Member Synchronization extensions
*
* @author $author$
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Members
* @link http://www.invisionpower.com
* @version $Rev: 10914 $
*/
class membersMemberSync
{
/**
* Registry reference
*
* @var object
*/
public $registry;
/**
* CONSTRUCTOR
*
* @return @e void
*/
public function __construct()
{
$this->registry = ipsRegistry::instance();
}
/**
* This method is run when a member is flagged as a spammer
*
* @param array $member Array of member data
* @return @e void
*/
public function onSetAsSpammer( $member )
{
/* Load status class */
if ( ! $this->registry->isClassLoaded( 'memberStatus' ) )
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/member/status.php', 'memberStatus' );
$this->registry->setClass( 'memberStatus', new $classToLoad( ipsRegistry::instance() ) );
}
/* Delete the stuff */
$this->registry->getClass('memberStatus')->setAuthor( $member );
$this->registry->getClass('memberStatus')->deleteAllReplies();
$this->registry->getClass('memberStatus')->deleteAllMemberStatus();
}
/**
* This method is run when a member is un-flagged as a spammer
*
* @param array $member Array of member data
* @return @e void
*/
public function onUnSetAsSpammer( $member )
{
}
/**
* This method is called after a member account has been removed
*
* @param string $ids SQL IN() clause
* @return @e void
*/
public function onDelete( $mids )
{
/* Delete Status Updates - note, we can't do this via memberStatus class, since we no longer have the member data */
ipsRegistry::DB()->delete( 'member_status_updates', "status_member_id" . $mids );
ipsRegistry::DB()->delete( 'member_status_actions', "action_member_id" . $mids );
ipsRegistry::DB()->delete( 'member_status_replies', "reply_member_id" . $mids );
}
}
@@ -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,12 +3,12 @@
* @file plugin_banned.php Moderator control panel plugin: banned members
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $Author: bfarber $
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mmecham $
* @since 2/17/2011
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
* @version v3.2.3
* $Revision: 9425 $
* $LastChangedDate: 2012-01-24 11:56:40 -0500 (Tue, 24 Jan 2012) $
* @version v3.3.4
* $Revision: 10180 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -102,7 +102,7 @@ class plugin_members_banned
*/
public function canView( $permissions )
{
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_ban'] ) )
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] ) )
{
return true;
}
@@ -134,23 +134,17 @@ class plugin_members_banned
// Get 10 banned members
//-----------------------------------------
$members = array();
$_bannedGroup = '';
if( $this->settings['banned_group'] )
{
$_bannedGroup = " OR m.member_group_id=" . $this->settings['banned_group'];
}
$members = array();
$st = intval($this->request['st']);
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "member_banned=1" . str_replace( 'm.', '', $_bannedGroup ) ) );
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "member_banned=1" ) );
$this->DB->build( array(
'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'order' => 'm.joined DESC',
'limit' => array( $st, 10 ),
'where' => "m.member_banned=1" . $_bannedGroup,
'where' => "m.member_banned=1",
'add_join' => array(
array(
'select' => 'pp.*',
@@ -3,12 +3,12 @@
* @file plugin_iplookup.php Moderator control panel plugin: IP lookup tool
*~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 2/18/2011
* $LastChangedDate: 2011-03-16 21:13:06 -0400 (Wed, 16 Mar 2011) $
* @version v3.2.3
* $Revision: 8110 $
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -161,7 +161,7 @@ class plugin_members_iplookup
$exactMatch = 0;
$finalIPString = preg_replace( "/^(.+?)\*(.+?)?$/", "\\1", $finalIPString ).'%';
}
//-----------------------------------------
// H'okay, what have we been asked to do?
// (that's a metaphorical "we" in a rhetorical question)
@@ -241,7 +241,7 @@ class plugin_members_iplookup
}
else
{
$sql = $exactMatch ? "p.ip_address LIKE '$finalIPString'" : "p.ip_address='$finalIPString'";
$sql = $exactMatch ? "p.ip_address='$finalIPString'" : "p.ip_address LIKE '$finalIPString'";
//-----------------------------------------
// Get forums we can view
@@ -298,7 +298,7 @@ class plugin_members_iplookup
'order' => 'p.pid DESC',
'add_join' => array(
array(
'select' => 't.forum_id',
'select' => 't.forum_id, t.title_seo',
'from' => array( 'topics' => 't' ),
'where' => 't.tid=p.topic_id',
'type' => 'left'
@@ -331,7 +331,7 @@ class plugin_members_iplookup
// Parse the member
//-----------------------------------------
$row = IPSMember::buildDisplayData( $row, array( 'customFields' => 1, 'signature' => 1, 'warn' => 1 ) );
$row = IPSMember::buildDisplayData( $row, array( 'reputation' => 0, 'warn' => 0 ) );
//-----------------------------------------
// Parse the post
@@ -3,12 +3,12 @@
* @file plugin_modposts.php Moderator control panel plugin: show members on mod queue
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $Author: bfarber $
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 2/17/2011
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
* @version v3.2.3
* $Revision: 9425 $
* $LastChangedDate: 2011-11-16 11:36:38 -0500 (Wed, 16 Nov 2011) $
* @version v3.3.4
* $Revision: 9829 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -102,7 +102,7 @@ class plugin_members_modposts
*/
public function canView( $permissions )
{
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_modq'] ) )
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] ) )
{
return true;
}
@@ -3,12 +3,12 @@
* @file plugin_restrictposts.php Moderator control panel plugin: show members with post restriction
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $Author: bfarber $
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 2/17/2011
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
* @version v3.2.3
* $Revision: 9425 $
* $LastChangedDate: 2011-11-16 11:36:38 -0500 (Wed, 16 Nov 2011) $
* @version v3.3.4
* $Revision: 9829 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -102,7 +102,7 @@ class plugin_members_restrictposts
*/
public function canView( $permissions )
{
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_post'] ) )
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] ) )
{
return true;
}
@@ -3,12 +3,12 @@
* @file plugin_suspended.php Moderator control panel plugin: temporarily suspended members
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $Author: bfarber $
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: mark $
* @since 2/17/2011
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
* @version v3.2.3
* $Revision: 9425 $
* $LastChangedDate: 2011-11-16 11:36:38 -0500 (Wed, 16 Nov 2011) $
* @version v3.3.4
* $Revision: 9829 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -102,7 +102,7 @@ class plugin_members_suspended
*/
public function canView( $permissions )
{
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] AND $this->settings['warn_mod_ban'] ) )
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] ) )
{
return true;
}
@@ -3,12 +3,12 @@
* @file plugin_warn.php Moderator control panel plugin: show latest warnings
*~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 2/14/2011
* $LastChangedDate: 2011-03-09 17:51:33 -0500 (Wed, 09 Mar 2011) $
* @version v3.2.3
* $Revision: 8003 $
* $LastChangedDate: 2011-12-14 12:27:41 -0500 (Wed, 14 Dec 2011) $
* @version v3.3.4
* $Revision: 10000 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -123,25 +123,37 @@ class plugin_members_warn
{
return '';
}
//-----------------------------------------
// Load reasons
//-----------------------------------------
$reasons = array();
$this->DB->build( array( 'select' => '*', 'from' => 'members_warn_reasons', 'order' => 'wr_order' ) );
$this->DB->execute();
while ( $row = $this->DB->fetch() )
{
$reasons[ $row['wr_id'] ] = $row;
}
//-----------------------------------------
// Get last 10 warnings
//-----------------------------------------
$st = intval($this->request['st']);
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as warns', 'from' => 'warn_logs' ) );
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as warns', 'from' => 'members_warn_logs' ) );
$warnings = array();
$this->DB->build( array(
'select' => 'w.*',
'from' => array( 'warn_logs' => 'w' ),
'order' => 'w.wlog_date DESC',
'from' => array( 'members_warn_logs' => 'w' ),
'order' => 'w.wl_date DESC',
'limit' => array( $st, 10 ),
'add_join' => array(
array(
'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=w.wlog_mid',
'where' => 'm.member_id=w.wl_member',
'type' => 'left',
),
array(
@@ -151,9 +163,9 @@ class plugin_members_warn
'type' => 'left',
),
array(
'select' => 'mm.member_id as punisher_id, mm.members_display_name as punisher_name, mm.members_seo_name as punisher_seo_name',
'select' => 'mm.member_id as punisher_id, mm.member_group_id as punisher_group, mm.members_display_name as punisher_name, mm.members_seo_name as punisher_seo_name',
'from' => array( 'members' => 'mm' ),
'where' => 'mm.member_id=w.wlog_addedby',
'where' => 'mm.member_id=w.wl_moderator',
'type' => 'left',
),
array(
@@ -168,31 +180,18 @@ class plugin_members_warn
while( $r = $this->DB->fetch($outer) )
{
if ( strstr( $r['wlog_notes'], '<content>' ) )
{
$raw = preg_match( "#<content>(.+?)</content>#is", $r['wlog_notes'], $match );
}
else
{
$_array = unserialize( $r['wlog_notes'] );
if ( is_array( $_array ) AND $_array['content'] )
{
$match[1] = $_array['content'];
}
}
/* Sort out punisher */
$r['punisherMember'] = array( 'member_id' => $r['punisher_id'],
'member_group_id' => $r['punisher_group'],
'members_display_name' => $r['punisher_name'],
'members_seo_name' => $r['punisher_seo_name']
);
IPSText::getTextClass( 'bbcode' )->parse_smilies = 1;
IPSText::getTextClass( 'bbcode' )->parse_html = 0;
IPSText::getTextClass( 'bbcode' )->parse_bbcode = 1;
IPSText::getTextClass( 'bbcode' )->parsing_section = 'warn';
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $r['member_group_id'];
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $r['mgroup_others'];
$r['content'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $match[1] );
$r['punisher_photo'] = IPSMember::buildProfilePhoto( array( 'pp_main_photo' => $r['punisher_check'], 'pp_thumb_photo' => $r['punisher_photo'], 'pp_thumb_width' => $r['punisher_width'], 'pp_thumb_height' => $r['punisher_height'] ), 'mini' );
$warnings[] = IPSMember::buildDisplayData( $r );
$r['wl_reason'] = $r['wl_reason'] ? $reasons[ $r['wl_reason'] ]['wr_name'] : '--';
$warnings[] = IPSMember::buildDisplayData( $r, array( 'reputation' => 0, 'warn' => 0 ) );
}
//-----------------------------------------
@@ -1,53 +1,116 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Define the core notification types
* Last Updated: $Date: 2011-04-27 07:31:56 -0400 (Wed, 27 Apr 2011) $
* </pre>
*
* @author $Author: mmecham $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Forums
* @link http://hatynka.in
* @since 20th February 2002
* @version $Rev: 8490 $
*
*/
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();
}
/**
* Notification types
*/
class members_notifications
{
public function getConfiguration()
{
/**
* Notification types - Needs to be a method so when require_once is used, $_NOTIFY isn't empty
*/
$_NOTIFY = array(
array( 'key' => 'profile_comment', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_profilecomment' ),
array( 'key' => 'friend_request', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
array( 'key' => 'friend_request_approve', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
array( 'key' => 'new_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
array( 'key' => 'reply_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
array( 'key' => 'invite_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
array( 'key' => 'reply_your_status', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
array( 'key' => 'reply_any_status', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
array( 'key' => 'friend_status_update', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
);/*noLibHook*/
return $_NOTIFY;
}
<?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 Forums
* @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();
}
/**
* Notification types
*/
class members_notifications
{
public function getConfiguration()
{
/**
* Notification types - Needs to be a method so when require_once is used, $_NOTIFY isn't empty
*/
$_NOTIFY = array(
array( 'key' => 'profile_comment', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_profilecomment' ),
array( 'key' => 'friend_request', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
array( 'key' => 'friend_request_approve', 'default' => array( 'inline' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
array( 'key' => 'new_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
array( 'key' => 'reply_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
array( 'key' => 'invite_private_message', 'default' => array( 'email' ), 'disabled' => array( 'inline' ), 'icon' => 'notify_pm' ),
array( 'key' => 'reply_your_status', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
array( 'key' => 'reply_any_status', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
array( 'key' => 'friend_status_update', 'default' => array(), 'disabled' => array(), 'icon' => 'notify_statusreply' ),
array( 'key' => 'warning', 'default' => array( 'email' ), 'disabled' => array(), 'show_callback' => true, 'icon' => 'notify_warning' ),
array( 'key' => 'warning_mods', 'default' => array( 'inline' ), 'disabled' => array(), 'show_callback' => true, 'icon' => 'notify_warning' ),
);/*noLibHook*/
return $_NOTIFY;
}
public function warning( $member )
{
if ( !ipsRegistry::$settings['warn_on'] )
{
return false;
}
if ( ipsRegistry::$settings['warn_protected'] )
{
if ( IPSMember::isInGroup( $member, explode( ',', ipsRegistry::$settings['warn_protected'] ) ) )
{
return false;
}
}
return true;
}
public function warning_mods( $member )
{
if ( !ipsRegistry::$settings['warn_on'] )
{
return FALSE;
}
if ( $member['g_is_supmod'] )
{
return TRUE;
}
elseif ( $member['is_mod'] )
{
$other_mgroups = array();
$_other_mgroups = IPSText::cleanPermString( $member['mgroup_others'] );
if( $_other_mgroups )
{
$other_mgroups = explode( ",", $_other_mgroups );
}
$other_mgroups[] = $member['member_group_id'];
ipsRegistry::DB()->build( array(
'select' => '*',
'from' => 'moderators',
'where' => "(member_id='" . $member['member_id'] . "' OR (is_group=1 AND group_id IN(" . implode( ",", $other_mgroups ) . ")))"
) );
ipsRegistry::DB()->execute();
while ( $this->moderator = ipsRegistry::DB()->fetch() )
{
if ( $this->moderator['allow_warn'] )
{
return TRUE;
}
}
}
return FALSE;
}
}
@@ -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,106 +1,106 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Fetches meta data for notifications
* Last Updated: $Date: 2011-09-21 10:55:45 -0400 (Wed, 21 Sep 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: 9528 $
*/
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 members_class_notifications
{
/**
* Construct
*
*/
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();
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
$this->messengerFunctions = new $classToLoad( $this->registry );
}
/**
* Fetches data by meta data
* Must return: authorId, content, title, date
* @param array $metaData
*/
public function getLinkedDataByMetaData( array $metaData )
{
/* Fetch topic */
$topic = $this->messengerFunctions->fetchTopicDataWithMessage( $metaData['meta_id'] );
/* Get participants */
$parts = $this->messengerFunctions->fetchTopicParticipants( $metaData['meta_id'] );
/* New or reply? */
if ( ! empty( $parts[ $this->memberData['member_id'] ]['map_read_time'] ) && ! empty( $parts[ $this->memberData['member_id'] ]['map_has_unread'] ) )
{
/* Is reply */
$msg = $this->messengerFunctions->fetchMessageData( $metaData['meta_id'], $topic['mt_last_msg_id'] );
$topic['msg_author_id'] = $msg['msg_author_id'];
$topic['msg_post'] = $msg['msg_post'];
$topic['msg_date'] = $msg['msg_date'];
}
/* Is this a new topic or reply? */
return array( 'authorId' => $topic['msg_author_id'],
'content' => $this->_formatMessageForDisplay( $topic['msg_post'], $this->memberData ),
'title' => $topic['mt_title'],
'date' => $topic['msg_date'],
'type' => $this->lang->words['gbl_notify_pm'] );
}
/**
* Function to format the actual message (applies BBcode, etc)
*
* @param string Raw text
* @param array PM data
* @return string Processed text
*/
private function _formatMessageForDisplay( $msgContent, $data=array() )
{
IPSText::resetTextClass('bbcode');
$this->settings['max_emos'] = 0;
IPSText::getTextClass('bbcode')->parse_smilies = 1;
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parse_html = 0;
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $data['member_group_id'];
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $data['mgroup_others'];
$msgContent = IPSText::getTextClass('bbcode')->preDisplayParse( $msgContent );
return $msgContent;
}
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Fetches meta data for notifications
* 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 members_class_notifications
{
/**
* Construct
*
*/
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();
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
$this->messengerFunctions = new $classToLoad( $this->registry );
}
/**
* Fetches data by meta data
* Must return: authorId, content, title, date
* @param array $metaData
*/
public function getLinkedDataByMetaData( array $metaData )
{
/* Fetch topic */
$topic = $this->messengerFunctions->fetchTopicDataWithMessage( $metaData['meta_id'] );
/* Get participants */
$parts = $this->messengerFunctions->fetchTopicParticipants( $metaData['meta_id'] );
/* New or reply? */
if ( ! empty( $parts[ $this->memberData['member_id'] ]['map_read_time'] ) && ! empty( $parts[ $this->memberData['member_id'] ]['map_has_unread'] ) )
{
/* Is reply */
$msg = $this->messengerFunctions->fetchMessageData( $metaData['meta_id'], $topic['mt_last_msg_id'] );
$topic['msg_author_id'] = $msg['msg_author_id'];
$topic['msg_post'] = $msg['msg_post'];
$topic['msg_date'] = $msg['msg_date'];
}
/* Is this a new topic or reply? */
return array( 'authorId' => $topic['msg_author_id'],
'content' => $this->_formatMessageForDisplay( $topic['msg_post'], $this->memberData ),
'title' => $topic['mt_title'],
'date' => $topic['msg_date'],
'type' => $this->lang->words['gbl_notify_pm'] );
}
/**
* Function to format the actual message (applies BBcode, etc)
*
* @param string Raw text
* @param array PM data
* @return string Processed text
*/
private function _formatMessageForDisplay( $msgContent, $data=array() )
{
IPSText::resetTextClass('bbcode');
$this->settings['max_emos'] = 0;
IPSText::getTextClass('bbcode')->parse_smilies = 1;
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parse_html = 0;
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $data['member_group_id'];
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $data['mgroup_others'];
$msgContent = IPSText::getTextClass('bbcode')->preDisplayParse( $msgContent );
return $msgContent;
}
}
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Config for about me tab
* Last Updated: $Date: 2011-03-14 13:48:27 -0400 (Mon, 14 Mar 2011) $
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @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 Members
* @link http://hatynka.in
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 8063 $
* @version $Rev: 10914 $
*
*/
@@ -47,4 +47,4 @@ $CONFIG['plugin_enabled'] = 1;
/**
* Order
*/
$CONFIG['plugin_order'] = 2;
$CONFIG['plugin_order'] = 3;
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Profile Plugin Library
* Last Updated: $Date: 2011-05-31 15:22:26 -0400 (Tue, 31 May 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 Members
* @link http://hatynka.in
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Revision: 8931 $
* @version $Revision: 10914 $
*
*/
@@ -27,6 +27,8 @@ if ( ! defined( 'IN_IPB' ) )
class profile_friends extends profile_plugin_parent
{
const FRIENDS_PER_PAGE = 100;
/**
* Feturn HTML block
*
@@ -49,22 +51,45 @@ class profile_friends extends profile_plugin_parent
//-----------------------------------------
// Grab the friends
//-----------------------------------------
$this->DB->build( array( 'select' => 'f.*',
'from' => array( 'profile_friends' => 'f' ),
'where' => 'f.friends_member_id=' . $member['member_id'] . ' AND f.friends_approved=1',
//'order' => 'm.members_display_name ASC',
'add_join' => array(
1 => array( 'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'pp.pp_member_id=f.friends_friend_id',
'type' => 'left' ),
2 => array( 'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=f.friends_friend_id',
'type' => 'left' )
)
) );
/* How many friends do we have? */
$count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as dracula', 'from' => 'profile_friends', 'where' => 'friends_member_id=' . $member['member_id'] . ' AND friends_approved=1' ) );
/* Sort out pagination */
$st = intval($this->request['st']) >=0 ? intval($this->request['st']) : 0;
$pagination = $this->registry->output->generatePagination( array(
'totalItems' => $count['dracula'],
'itemsPerPage' => self::FRIENDS_PER_PAGE,
'currentStartValue' => $st,
'baseUrl' => "showuser={$member['member_id']}&amp;tab=friends",
'seoTemplate' => 'showuser',
'seoTitle' => $member['members_seo_name'],
) );
/* Get em! */
$queryData = array( 'select' => 'f.*',
'from' => array( 'profile_friends' => 'f' ),
'where' => 'f.friends_member_id=' . $member['member_id'] . ' AND f.friends_approved=1',
'add_join' => array(
1 => array( 'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'pp.pp_member_id=f.friends_friend_id',
'type' => 'left' ),
2 => array( 'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=f.friends_friend_id',
'type' => 'left' )
)
);
// Ordering is bad because it causes a filesort, but if they have more than 100 members, we're going to have
// to order so we can paginate
if ( $count['dracula'] > self::FRIENDS_PER_PAGE )
{
$queryData['order'] = 'm.members_display_name';
$queryData['limit'] = array( $st, self::FRIENDS_PER_PAGE );
}
$this->DB->build( $queryData );
$outer = $this->DB->execute();
//-----------------------------------------
@@ -81,7 +106,7 @@ class profile_friends extends profile_plugin_parent
ksort($friends);
$content = $this->registry->getClass('output')->getTemplate('profile')->tabFriends( $friends, $member );
$content = $this->registry->getClass('output')->getTemplate('profile')->tabFriends( $friends, $member, $pagination );
//-----------------------------------------
// Macros...
@@ -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,21 +2,20 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Config for about me tab
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
* IP.Board v3.3.4
* Config for reputation tab
* 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 Members
* @link http://hatynka.in
* @since 20th February 2002
* @version $Rev: 5713 $
* @link http://www.invisionpower.com
* @since 4th January 2012
* @version $Rev: 10914 $
*
* @note This file is only included in order to *disable* the tab for 3.1 upgrades
*/
if ( ! defined( 'IN_IPB' ) )
@@ -28,22 +27,22 @@ if ( ! defined( 'IN_IPB' ) )
/**
* Plug in name (Default tab name)
*/
$CONFIG['plugin_name'] = 'About Me';
$CONFIG['plugin_name'] = 'Reputation';
/**
* Language string for the tab
*/
$CONFIG['plugin_lang_bit'] = 'pp_tab_aboutme';
$CONFIG['plugin_lang_bit'] = ipsRegistry::$settings['reputation_point_types'] == 'like' ? 'pp_tab_rep_likes' : 'pp_tab_rep_rep';
/**
* Plug in key (must be the same as the main {file}.php name
*/
$CONFIG['plugin_key'] = 'aboutme';
$CONFIG['plugin_key'] = 'reputation';
/**
* Show tab?
*/
$CONFIG['plugin_enabled'] = 0;
$CONFIG['plugin_enabled'] = intval( ipsRegistry::$settings['reputation_enabled'] );
/**
* Order
@@ -0,0 +1,136 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Reputation Profile Tab
* Last Updated: $Date: 2012-07-09 12:56:26 -0400 (Mon, 09 Jul 2012) $
* </pre>
*
* @author $Author: AndyMillne $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Members
* @link http://www.invisionpower.com
* @since 4th January 2012
* @version $Revision: 11047 $
*
*/
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 profile_reputation extends profile_plugin_parent
{
const PER_PAGE = 15;
/**
* Feturn HTML block
*
* @param array Member information
* @return string HTML block
*/
public function return_html_block( $member=array() )
{
//-----------------------------------------
// Get supported applications
//-----------------------------------------
$supportedApps = array();
foreach( IPSLib::getEnabledApplications() as $app )
{
$file = IPSLib::getAppDir( $app['app_directory'] ) . '/extensions/reputation.php';
if( is_file( $file ) )
{
require_once( $file );/*maybeLibHook*/
if( class_exists( 'reputation_' . $app['app_directory'] ) )
{
$supportedApps[ $app['app_directory'] ] = $app;
}
}
}
//-----------------------------------------
// Get results
//-----------------------------------------
/* What is it we're getting? */
$app = ( ! empty($this->request['app_tab']) and isset( $supportedApps[ $this->request['app_tab'] ] ) ) ? $this->request['app_tab'] : 'forums';
$type = ( isset( $this->request['type'] ) and $this->request['type'] == 'received' ) ? 'received' : 'given';
$st = isset( $this->request['st'] ) ? intval( $this->request['st'] ) : 0;
/* Can we view given reputation - If not, no point going any further*/
if ( $type == 'given' && ! $this->memberData['gbw_view_reps'] )
{
return $this->registry->getClass('output')->getTemplate('profile')->tabReputation( $member, $app, 'received', $supportedApps );
}
/* Load our extension class */
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app ) . '/extensions/reputation.php', 'reputation_' . $app, $app );
$reputationClass = new $classToLoad();
/* Get our query */
$_query = $reputationClass->fetch( $type, $member );
$_query['group'] = 'r.app, r.type, r.type_id';
/* Get a count */
$queryForCount = $_query;
$queryForCount['select'] = 'r.type_id';
$this->DB->build( $queryForCount );
$rawQuery = $this->DB->fetchSqlString();
$this->DB->flushQuery();
$this->DB->allow_sub_select = 1;
$this->DB->query( 'SELECT COUNT(*) as dracula FROM ( ' . $rawQuery . ') as x' );
$this->DB->execute();
$count = $this->DB->fetch();
/* Get em? */
$processedResults = '';
$pagination = '';
if ( ! empty($count['dracula']) )
{
$_query['limit'] = array( $st, self::PER_PAGE );
$_query['order'] = ( $type == 'received' ) ? 'r.type_id DESC' : 'r.rep_date DESC';
$results = array();
$this->DB->build( $_query );
$e = $this->DB->execute();
while ( $row = $this->DB->fetch( $e ) )
{
$results[] = $reputationClass->process( $row );
}
/* Sort out pagination */
$pagination = $this->registry->output->generatePagination( array(
'totalItems' => intval($count['dracula']),
'itemsPerPage' => self::PER_PAGE,
'currentStartValue' => $st,
'baseUrl' => "showuser={$member['member_id']}&amp;tab=reputation&amp;app_tab={$app}&amp;type={$type}",
'seoTitle' => $member['members_seo_name'],
'seoTemplate' => 'showuser'
) );
/* Process Results */
$processedResults = $reputationClass->display( $results );
}
/* Display processed results */
return $this->registry->getClass('output')->getTemplate('profile')->tabReputation( $member, $app, $type, $supportedApps, $processedResults, $pagination );
}
}
@@ -2,19 +2,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Config for about me tab
* Last Updated: $Date: 2010-12-17 07:40:13 -0500 (Fri, 17 Dec 2010) $
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @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 Members
* @link http://hatynka.in
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Rev: 7442 $
* @version $Rev: 10914 $
*
*/
@@ -3,19 +3,19 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Profile Plugin Library
* Last Updated: $Date: 2011-08-25 07:46:38 -0400 (Thu, 25 Aug 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 Members
* @link http://hatynka.in
* @link http://www.invisionpower.com
* @since 20th February 2002
* @version $Revision: 9413 $
* @version $Revision: 10914 $
*
*/
@@ -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,421 +1,421 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Report Center :: Private Messages plugin
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @author Based on original "Report Center" by Luke Scott
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Members
* @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 'admin.php'.";
exit();
}
class messages_plugin
{
/**
* 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;
/**
* Holds extra data for the plugin
*
* @var array Data specific to the plugin
*/
public $_extra;
/**
* Constructor
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// 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->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->lang = $this->registry->class_localization;
}
/**
* Display the form for extra data in the ACP
*
* @param array Plugin data
* @param object HTML object
* @return string HTML to add to the form
*/
public function displayAdminForm( $plugin_data, &$html )
{
$req_input = '';
$return = '';
if( is_array($plugin_data['required_input']) && count($plugin_data['required_input']) > 0 )
{
foreach( $plugin_data['required_input'] as $key => $value )
{
if( $req_input != '' )
{
$req_input .= "\r\n";
}
$req_input .= $key . ' ' . $value;
}
}
foreach( $this->cache->getCache('group_cache') as $g )
{
$groups[] = array( $g['g_id'], $g['g_title'] );
}
$return .= $html->addRow( $this->lang->words['r_messages_enter'],
$this->lang->words['r_menter_desc'],
$this->registry->output->formMultiDropdown('plugi_messages_add[]', $groups, explode( ',', $plugin_data['plugi_messages_add'] ) )
);
return $return;
}
/**
* Process the plugin's form fields for saving
*
* @param array Plugin data for save
* @return string Error message
*/
public function processAdminForm( &$save_data_array )
{
$save_data_array['plugi_messages_add'] = ( is_array($this->request['plugi_messages_add']) AND count($this->request['plugi_messages_add']) ) ? implode( ',', $this->request['plugi_messages_add'] ) : '';
return '';
}
/**
* Update timestamp for report
*
* @param array New reports
* @param array New members cache
* @return boolean
*/
public function updateReportsTimestamp( $new_reports, &$new_members_cache )
{
return true;
}
/**
* Get report permissions
*
* @param string Type of perms to check
* @param array Permissions data
* @param array group ids
* @param string Special permissions
* @return boolean
*/
public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return )
{
if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 )
{
return true;
}
else
{
return false;
}
}
/**
* Show the report form for this module
*
* @param array Application data
* @return string HTML form information
*/
public function reportForm( $com_dat )
{
$this->registry->class_localization->loadLanguageFile( array( 'public_messaging' ), 'members' );
$msg = intval($this->request['topicID']);
if( ! $msg )
{
$this->registry->output->showError( 'reports_no_msg', 10166 );
}
//-----------------------------------------
// Check user can access PM
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
$_messengerLib = new $classToLoad( $this->registry );
if( !$_messengerLib->canAccessTopic( $this->memberData['member_id'], $msg ) )
{
$this->registry->output->showError( 'reports_no_msg', 1016666 );
}
$message = $this->DB->buildAndFetch( array(
'select' => 'mt_title',
'from' => 'message_topics',
'where' => 'mt_id=' . intval($msg)
) );
$ex_form_data = array(
'topic' => $msg,
'msg' => intval($this->request['msg']),
'st' => intval($this->request['st']),
'ctyp' => 'message',
'title' => $message['mt_title']
);
$this->registry->output->setTitle( $this->lang->words['report_msg_page'] );
$this->registry->output->addNavigation( $this->lang->words['t_welcome'], "app=members&amp;module=messaging" );
$this->registry->output->addNavigation( $this->lang->words['report_msg_page'], '' );
$this->lang->words['report_basic_title'] = $this->lang->words['report_msg_title'];
$this->lang->words['report_basic_url_title'] = $this->lang->words['report_msg_title'];
$this->lang->words['report_basic_enter'] = $this->lang->words['report_msg_msg'];
$url = $this->settings['base_url'] . "app=members&amp;module=messaging&amp;section=view&amp;do=showConversation&amp;topicID=" . $ex_form_data['topic'] . "&amp;st=" . $ex_form_data['st'] . "#msg" . $ex_form_data['msg'];
return $this->registry->getClass('reportLibrary')->showReportForm( $message['mt_title'], $url, $ex_form_data );
}
/**
* Get section and link
*
* @param array Report data
* @return array Section/link
*/
public function giveSectionLinkTitle( $report_row )
{
return array(
'title' => $this->lang->words['report_section_title_msg'],
'url' => "/index.php?app=core&amp;module=reports&amp;section=reports&amp;do=showMessage&amp;topicID={$report_row['exdat1']}&amp;st={$report_row['exdat3']}&amp;msg={$report_row['exdat2']}",
);
}
/**
* Process a report and save the data appropriate
*
* @param array Report data
* @return array Data from saving the report
*/
public function processReport( $com_dat )
{
$topic = $this->request['topic'];
$msg = $this->request['msg'];
$st = $this->request['st'];
$url = 'app=members&module=messaging&section=view&do=showConversation&topicID=' . $topic;
if( $msg < 1 )
{
$this->registry->output->showError( 'reports_no_msg', 10167 );
}
$return_data = array();
$a_url = str_replace("&", "&amp;", $url);
$uid = md5( 'msg_' . $msg . '_' . $com_dat['com_id'] );
$status = array();
$this->DB->build( array( 'select' => 'status, is_new, is_complete',
'from' => 'rc_status',
'where' => "is_new=1 OR is_complete=1",
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
if( $row['is_new'] == 1 )
{
$status['new'] = $row['status'];
}
elseif( $row['is_complete'] == 1 )
{
$status['complete'] = $row['status'];
}
}
$this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) );
$this->DB->execute();
if( $this->DB->getTotalRows() == 0 )
{
$built_report_main = array(
'uid' => $uid,
'title' => $this->request['title'],
'status' => $status['new'],
'url' => '/index.php?' . $a_url,
'rc_class' => $com_dat['com_id'],
'updated_by' => $this->memberData['member_id'],
'date_updated' => time(),
'date_created' => time(),
'exdat1' => $topic,
'exdat2' => $msg,
'exdat3' => $st,
);
$this->DB->insert( 'rc_reports_index', $built_report_main );
$rid = $this->DB->getInsertId();
}
else
{
$the_report = $this->DB->fetch();
$rid = $the_report['id'];
$this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "id='{$rid}'" );
}
$data = $this->DB->buildAndFetch( array(
'select' => 't.mt_title',
'from' => array( 'message_topics' => 't' ),
'where' => 't.mt_id=' . $topic . ' AND m.msg_id=' . $msg,
'add_join' => array(
array(
'select' => 'm.msg_post',
'from' => array( 'message_posts' => 'm' ),
'where' => 't.mt_id=m.msg_topic_id',
'type' => 'left',
),
array(
'select' => 'mem.member_id, mem.members_display_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=m.msg_author_id',
'type' => 'left',
),
)
) );
$message = "[quote name='" . IPSText::getTextClass('bbcode')->makeQuoteSafe( $data['members_display_name'] ) . "']";
$message .= $data['msg_post'];
$message .= "[/quote]\n\n";
$message .= $this->request['message'];
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parse_html = 0;
IPSText::getTextClass('bbcode')->parse_emoticons = 1;
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'reports';
$build_report = array(
'rid' => $rid,
'report' => IPSText::getTextClass('bbcode')->preDbParse( $message ),
'report_by' => $this->memberData['member_id'],
'date_reported' => time(),
);
$this->DB->insert( 'rc_reports', $build_report );
$reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) );
$this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" );
$return_data = array(
'REDIRECT_URL' => "app=members&amp;module=messaging&amp;section=view&amp;do=showConversation&amp;topicID=" . $topic . "&amp;st=" . $st . "#msg" . $msg,
'REPORT_INDEX' => $rid,
'SAVED_URL' => '/index.php?' . $url,
'REPORT' => $build_report['report']
);
return $return_data;
}
/**
* Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
*
* @param array Report data
* @return array Formatted report data
*/
public function formatReportData( $report_data )
{
return array(
'REDIRECT_URL' => $report_data['url'],
'REPORT_INDEX' => $report_data['id'],
'SAVED_URL' => str_replace( '&amp;', '&', $report_data['url'] ),
'REPORT' => '',
);
}
/**
* Where to send user after report is submitted
*
* @param array Report data
* @return @e void
*/
public function reportRedirect( $report_data )
{
$this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'] );
}
/**
* Retrieve list of users to send notifications to
*
* @param string Group ids
* @param array Report data
* @return array Array of users to PM/Email
*/
public function getNotificationList( $group_ids, $report_data )
{
$notify = array();
$this->DB->build( array(
'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
'add_join' => array(
array(
'select' => 'noti.*',
'from' => array( 'rc_modpref' => 'noti' ),
'where' => 'mem.member_id=noti.mem_id',
)
)
) );
$this->DB->execute();
if( $this->DB->getTotalRows() > 0 )
{
while( $row = $this->DB->fetch() )
{
$notify[] = $row;
}
}
return $notify;
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Report Center :: Private Messages plugin
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $Author: bfarber $
* @author Based on original "Report Center" by Luke Scott
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Members
* @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();
}
class messages_plugin
{
/**
* 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;
/**
* Holds extra data for the plugin
*
* @var array Data specific to the plugin
*/
public $_extra;
/**
* Constructor
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// 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->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->lang = $this->registry->class_localization;
}
/**
* Display the form for extra data in the ACP
*
* @param array Plugin data
* @param object HTML object
* @return string HTML to add to the form
*/
public function displayAdminForm( $plugin_data, &$html )
{
$req_input = '';
$return = '';
if( is_array($plugin_data['required_input']) && count($plugin_data['required_input']) > 0 )
{
foreach( $plugin_data['required_input'] as $key => $value )
{
if( $req_input != '' )
{
$req_input .= "\r\n";
}
$req_input .= $key . ' ' . $value;
}
}
foreach( $this->cache->getCache('group_cache') as $g )
{
$groups[] = array( $g['g_id'], $g['g_title'] );
}
$return .= $html->addRow( $this->lang->words['r_messages_enter'],
$this->lang->words['r_menter_desc'],
$this->registry->output->formMultiDropdown('plugi_messages_add[]', $groups, explode( ',', $plugin_data['plugi_messages_add'] ) )
);
return $return;
}
/**
* Process the plugin's form fields for saving
*
* @param array Plugin data for save
* @return string Error message
*/
public function processAdminForm( &$save_data_array )
{
$save_data_array['plugi_messages_add'] = ( is_array($this->request['plugi_messages_add']) AND count($this->request['plugi_messages_add']) ) ? implode( ',', $this->request['plugi_messages_add'] ) : '';
return '';
}
/**
* Update timestamp for report
*
* @param array New reports
* @param array New members cache
* @return boolean
*/
public function updateReportsTimestamp( $new_reports, &$new_members_cache )
{
return true;
}
/**
* Get report permissions
*
* @param string Type of perms to check
* @param array Permissions data
* @param array group ids
* @param string Special permissions
* @return boolean
*/
public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return )
{
if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 )
{
return true;
}
else
{
return false;
}
}
/**
* Show the report form for this module
*
* @param array Application data
* @return string HTML form information
*/
public function reportForm( $com_dat )
{
$this->registry->class_localization->loadLanguageFile( array( 'public_messaging' ), 'members' );
$msg = intval($this->request['topicID']);
if( ! $msg )
{
$this->registry->output->showError( 'reports_no_msg', 10166 );
}
//-----------------------------------------
// Check user can access PM
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
$_messengerLib = new $classToLoad( $this->registry );
if( !$_messengerLib->canAccessTopic( $this->memberData['member_id'], $msg ) )
{
$this->registry->output->showError( 'reports_no_msg', 1016666 );
}
$message = $this->DB->buildAndFetch( array(
'select' => 'mt_title',
'from' => 'message_topics',
'where' => 'mt_id=' . intval($msg)
) );
$ex_form_data = array(
'topic' => $msg,
'msg' => intval($this->request['msg']),
'st' => intval($this->request['st']),
'ctyp' => 'message',
'title' => $message['mt_title']
);
$this->registry->output->setTitle( $this->lang->words['report_msg_page'] );
$this->registry->output->addNavigation( $this->lang->words['t_welcome'], "app=members&amp;module=messaging" );
$this->registry->output->addNavigation( $this->lang->words['report_msg_page'], '' );
$this->lang->words['report_basic_title'] = $this->lang->words['report_msg_title'];
$this->lang->words['report_basic_url_title'] = $this->lang->words['report_msg_title'];
$this->lang->words['report_basic_enter'] = $this->lang->words['report_msg_msg'];
$url = $this->settings['base_url'] . "app=members&amp;module=messaging&amp;section=view&amp;do=showConversation&amp;topicID=" . $ex_form_data['topic'] . "&amp;st=" . $ex_form_data['st'] . "#msg" . $ex_form_data['msg'];
return $this->registry->getClass('reportLibrary')->showReportForm( $message['mt_title'], $url, $ex_form_data );
}
/**
* Get section and link
*
* @param array Report data
* @return array Section/link
*/
public function giveSectionLinkTitle( $report_row )
{
return array(
'title' => $this->lang->words['report_section_title_msg'],
'url' => "/index.php?app=core&amp;module=reports&amp;section=reports&amp;do=showMessage&amp;topicID={$report_row['exdat1']}&amp;st={$report_row['exdat3']}&amp;msg={$report_row['exdat2']}",
);
}
/**
* Process a report and save the data appropriate
*
* @param array Report data
* @return array Data from saving the report
*/
public function processReport( $com_dat )
{
$topic = $this->request['topic'];
$msg = $this->request['msg'];
$st = $this->request['st'];
$url = 'app=members&module=messaging&section=view&do=showConversation&topicID=' . $topic;
if( $msg < 1 )
{
$this->registry->output->showError( 'reports_no_msg', 10167 );
}
$return_data = array();
$a_url = str_replace("&", "&amp;", $url);
$uid = md5( 'msg_' . $msg . '_' . $com_dat['com_id'] );
$status = array();
$this->DB->build( array( 'select' => 'status, is_new, is_complete',
'from' => 'rc_status',
'where' => "is_new=1 OR is_complete=1",
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
if( $row['is_new'] == 1 )
{
$status['new'] = $row['status'];
}
elseif( $row['is_complete'] == 1 )
{
$status['complete'] = $row['status'];
}
}
$this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) );
$this->DB->execute();
if( $this->DB->getTotalRows() == 0 )
{
$built_report_main = array(
'uid' => $uid,
'title' => $this->request['title'],
'status' => $status['new'],
'url' => '/index.php?' . $a_url,
'rc_class' => $com_dat['com_id'],
'updated_by' => $this->memberData['member_id'],
'date_updated' => time(),
'date_created' => time(),
'exdat1' => $topic,
'exdat2' => $msg,
'exdat3' => $st,
);
$this->DB->insert( 'rc_reports_index', $built_report_main );
$rid = $this->DB->getInsertId();
}
else
{
$the_report = $this->DB->fetch();
$rid = $the_report['id'];
$this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'] ), "id='{$rid}'" );
}
$data = $this->DB->buildAndFetch( array(
'select' => 't.mt_title',
'from' => array( 'message_topics' => 't' ),
'where' => 't.mt_id=' . $topic . ' AND m.msg_id=' . $msg,
'add_join' => array(
array(
'select' => 'm.msg_post',
'from' => array( 'message_posts' => 'm' ),
'where' => 't.mt_id=m.msg_topic_id',
'type' => 'left',
),
array(
'select' => 'mem.member_id, mem.members_display_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=m.msg_author_id',
'type' => 'left',
),
)
) );
$message = "[quote name='" . IPSText::getTextClass('bbcode')->makeQuoteSafe( $data['members_display_name'] ) . "']";
$message .= $data['msg_post'];
$message .= "[/quote]\n\n";
$message .= $this->request['message'];
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parse_html = 0;
IPSText::getTextClass('bbcode')->parse_emoticons = 1;
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'reports';
$build_report = array(
'rid' => $rid,
'report' => IPSText::getTextClass('bbcode')->preDbParse( $message ),
'report_by' => $this->memberData['member_id'],
'date_reported' => time(),
);
$this->DB->insert( 'rc_reports', $build_report );
$reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) );
$this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" );
$return_data = array(
'REDIRECT_URL' => "app=members&amp;module=messaging&amp;section=view&amp;do=showConversation&amp;topicID=" . $topic . "&amp;st=" . $st . "#msg" . $msg,
'REPORT_INDEX' => $rid,
'SAVED_URL' => '/index.php?' . $url,
'REPORT' => $build_report['report']
);
return $return_data;
}
/**
* Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
*
* @param array Report data
* @return array Formatted report data
*/
public function formatReportData( $report_data )
{
return array(
'REDIRECT_URL' => $report_data['url'],
'REPORT_INDEX' => $report_data['id'],
'SAVED_URL' => str_replace( '&amp;', '&', $report_data['url'] ),
'REPORT' => '',
);
}
/**
* Where to send user after report is submitted
*
* @param array Report data
* @return @e void
*/
public function reportRedirect( $report_data )
{
$this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'] );
}
/**
* Retrieve list of users to send notifications to
*
* @param string Group ids
* @param array Report data
* @return array Array of users to PM/Email
*/
public function getNotificationList( $group_ids, $report_data )
{
$notify = array();
$this->DB->build( array(
'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
'add_join' => array(
array(
'select' => 'noti.*',
'from' => array( 'rc_modpref' => 'noti' ),
'where' => 'mem.member_id=noti.mem_id',
)
)
) );
$this->DB->execute();
if( $this->DB->getTotalRows() > 0 )
{
while( $row = $this->DB->fetch() )
{
$notify[] = $row;
}
}
return $notify;
}
}
@@ -1,369 +1,369 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Report Center :: Profiles plugin
* Last Updated: $LastChangedDate: 2011-05-05 07:03:47 -0400 (Thu, 05 May 2011) $
* </pre>
*
* @author $Author: ips_terabyte $
* @author Based on original "Report Center" by Luke Scott
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Members
* @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 'admin.php'.";
exit();
}
class profiles_plugin
{
/**
* 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;
/**
* Holds extra data for the plugin
*
* @var array Data specific to the plugin
*/
public $_extra;
/**
* Constructor
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// 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->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->lang = $this->registry->class_localization;
}
/**
* Display the form for extra data in the ACP
*
* @param array Plugin data
* @param object HTML object
* @return string HTML to add to the form
*/
public function displayAdminForm( $plugin_data, &$html )
{
$return = '';
return $return;
}
/**
* Process the plugin's form fields for saving
*
* @param array Plugin data for save
* @return string Error message
*/
public function processAdminForm( &$save_data_array )
{
return '';
}
/**
* Update timestamp for report
*
* @param array New reports
* @param array New members cache
* @return boolean
*/
public function updateReportsTimestamp( $new_reports, &$new_members_cache )
{
return true;
}
/**
* Get report permissions (only supermods can moderate profiles)
*
* @param string Type of perms to check
* @param array Permissions data
* @param array group ids
* @param string Special permissions
* @return boolean
*/
public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return )
{
if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 )
{
return true;
}
else
{
return false;
}
}
/**
* Show the report form for this module
*
* @param array Application data
* @return string HTML form information
*/
public function reportForm( $com_dat )
{
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
$mem = intval($this->request['member_id']);
if( ! $mem )
{
$this->registry->output->showError( 'reports_no_member', 10175 );
}
$member = IPSMember::load( $mem );
$ex_form_data = array(
'member_id' => $mem,
'ctyp' => 'profile',
'title' => $member['members_display_name']
);
$this->registry->output->setTitle( $this->lang->words['report_mem_page'] );
$this->registry->output->addNavigation( $member['members_display_name'], "showuser=" . $member['member_id'] );
$this->registry->output->addNavigation( $this->lang->words['report_mem_page'], '' );
$this->lang->words['report_basic_title'] = $this->lang->words['report_mem_page'];
$this->lang->words['report_basic_url_title'] = $this->lang->words['report_mem_page'];
$this->lang->words['report_basic_enter'] = $this->lang->words['report_mem_msg'];
$url = $this->registry->getClass('output')->buildSEOUrl( "showuser=" . $ex_form_data['member_id'], 'public', $member['members_seo_name'], 'showuser' );
return $this->registry->getClass('reportLibrary')->showReportForm( $member['members_display_name'], $url, $ex_form_data );
}
/**
* Get section and link
*
* @param array Report data
* @return array Section/link
*/
public function giveSectionLinkTitle( $report_row )
{
return array(
'title' => $this->lang->words['report_section_title_mem'],
'url' => "/index.php?showuser={$report_row['exdat1']}",
'seo_template' => "showuser",
'seo_title' => $report_row['seoname'],
);
}
/**
* Process a report and save the data appropriate
*
* @param array Report data
* @return array Data from saving the report
*/
public function processReport( $com_dat )
{
$mem = $this->request['member_id'];
$url = 'showuser=' . $mem;
if( $mem < 1 )
{
$this->registry->output->showError( 'reports_no_member', 10176 );
}
$return_data = array();
$a_url = str_replace("&", "&amp;", $url);
$uid = md5( 'mem_' . $mem . '_' . $com_dat['com_id'] );
$status = array();
$this->DB->build( array( 'select' => 'status, is_new, is_complete',
'from' => 'rc_status',
'where' => "is_new=1 OR is_complete=1",
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
if( $row['is_new'] == 1 )
{
$status['new'] = $row['status'];
}
elseif( $row['is_complete'] == 1 )
{
$status['complete'] = $row['status'];
}
}
$data = IPSMember::load( $this->request['member_id'] );
$this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) );
$this->DB->execute();
if( $this->DB->getTotalRows() == 0 )
{
$built_report_main = array(
'uid' => $uid,
'title' => $this->request['title'],
'status' => $status['new'],
'url' => '/index.php?' . $a_url,
'seoname' => $data['members_seo_name'],
'seotemplate' => 'showuser',
'rc_class' => $com_dat['com_id'],
'updated_by' => $this->memberData['member_id'],
'date_updated' => time(),
'date_created' => time(),
'exdat1' => $mem,
'exdat2' => 0,
'exdat3' => 0
);
$this->DB->insert( 'rc_reports_index', $built_report_main );
$rid = $this->DB->getInsertId();
}
else
{
$the_report = $this->DB->fetch();
$rid = $the_report['id'];
$this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'], 'seoname' => $data['members_seo_name'], 'seotemplate' => 'showuser' ), "id='{$rid}'" );
}
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parse_html = 0;
IPSText::getTextClass('bbcode')->parse_emoticons = 1;
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'reports';
$build_report = array(
'rid' => $rid,
'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ),
'report_by' => $this->memberData['member_id'],
'date_reported' => time(),
);
$this->DB->insert( 'rc_reports', $build_report );
$reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) );
$this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" );
$return_data = array(
'REDIRECT_URL' => $a_url,
'REPORT_INDEX' => $rid,
'SAVED_URL' => '/index.php?' . $url,
'REPORT' => $build_report['report'],
'TEMPLATE' => 'showuser',
'SEOTITLE' => $data['members_seo_name'],
);
return $return_data;
}
/**
* Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
*
* @param array Report data
* @return array Formatted report data
*/
public function formatReportData( $report_data )
{
return array(
'REDIRECT_URL' => $report_data['url'],
'REPORT_INDEX' => $report_data['id'],
'SAVED_URL' => str_replace( '&amp;', '&', $report_data['url'] ),
'REPORT' => '',
'SEOTITLE' => $report_data['seoname'],
'TEMPLATE' => 'showuser',
);
}
/**
* Where to send user after report is submitted
*
* @param array Report data
* @return @e void
*/
public function reportRedirect( $report_data )
{
if( $report_data['SEOTITLE'] )
{
$name['members_seo_name'] = $report_data['SEOTITLE'];
}
else
{
$name = $this->DB->buildAndFetch( array( 'select' => 'members_seo_name', 'from' => 'members', 'where' => 'member_id=' . intval($this->request['member_id']) ) );
}
$this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'], $name['members_seo_name'], 'showuser' );
}
/**
* Retrieve list of users to send notifications to
*
* @param string Group ids
* @param array Report data
* @return array Array of users to PM/Email
*/
public function getNotificationList( $group_ids, $report_data )
{
$notify = array();
$this->DB->build( array(
'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
'add_join' => array(
array(
'select' => 'noti.*',
'from' => array( 'rc_modpref' => 'noti' ),
'where' => 'mem.member_id=noti.mem_id',
)
)
) );
$this->DB->execute();
if( $this->DB->getTotalRows() > 0 )
{
while( $row = $this->DB->fetch() )
{
$notify[] = $row;
}
}
return $notify;
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Report Center :: Profiles plugin
* Last Updated: $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $Author: bfarber $
* @author Based on original "Report Center" by Luke Scott
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Members
* @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();
}
class profiles_plugin
{
/**
* 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;
/**
* Holds extra data for the plugin
*
* @var array Data specific to the plugin
*/
public $_extra;
/**
* Constructor
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// 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->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->lang = $this->registry->class_localization;
}
/**
* Display the form for extra data in the ACP
*
* @param array Plugin data
* @param object HTML object
* @return string HTML to add to the form
*/
public function displayAdminForm( $plugin_data, &$html )
{
$return = '';
return $return;
}
/**
* Process the plugin's form fields for saving
*
* @param array Plugin data for save
* @return string Error message
*/
public function processAdminForm( &$save_data_array )
{
return '';
}
/**
* Update timestamp for report
*
* @param array New reports
* @param array New members cache
* @return boolean
*/
public function updateReportsTimestamp( $new_reports, &$new_members_cache )
{
return true;
}
/**
* Get report permissions (only supermods can moderate profiles)
*
* @param string Type of perms to check
* @param array Permissions data
* @param array group ids
* @param string Special permissions
* @return boolean
*/
public function getReportPermissions( $check, $com_dat, $group_ids, &$to_return )
{
if( $this->_extra['report_bypass'] == 0 || $this->memberData['g_is_supmod'] == 1 )
{
return true;
}
else
{
return false;
}
}
/**
* Show the report form for this module
*
* @param array Application data
* @return string HTML form information
*/
public function reportForm( $com_dat )
{
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
$mem = intval($this->request['member_id']);
if( ! $mem )
{
$this->registry->output->showError( 'reports_no_member', 10175 );
}
$member = IPSMember::load( $mem );
$ex_form_data = array(
'member_id' => $mem,
'ctyp' => 'profile',
'title' => $member['members_display_name']
);
$this->registry->output->setTitle( $this->lang->words['report_mem_page'] );
$this->registry->output->addNavigation( $member['members_display_name'], "showuser=" . $member['member_id'] );
$this->registry->output->addNavigation( $this->lang->words['report_mem_page'], '' );
$this->lang->words['report_basic_title'] = $this->lang->words['report_mem_page'];
$this->lang->words['report_basic_url_title'] = $this->lang->words['report_mem_page'];
$this->lang->words['report_basic_enter'] = $this->lang->words['report_mem_msg'];
$url = $this->registry->getClass('output')->buildSEOUrl( "showuser=" . $ex_form_data['member_id'], 'public', $member['members_seo_name'], 'showuser' );
return $this->registry->getClass('reportLibrary')->showReportForm( $member['members_display_name'], $url, $ex_form_data );
}
/**
* Get section and link
*
* @param array Report data
* @return array Section/link
*/
public function giveSectionLinkTitle( $report_row )
{
return array(
'title' => $this->lang->words['report_section_title_mem'],
'url' => "/index.php?showuser={$report_row['exdat1']}",
'seo_template' => "showuser",
'seo_title' => $report_row['seoname'],
);
}
/**
* Process a report and save the data appropriate
*
* @param array Report data
* @return array Data from saving the report
*/
public function processReport( $com_dat )
{
$mem = $this->request['member_id'];
$url = 'showuser=' . $mem;
if( $mem < 1 )
{
$this->registry->output->showError( 'reports_no_member', 10176 );
}
$return_data = array();
$a_url = str_replace("&", "&amp;", $url);
$uid = md5( 'mem_' . $mem . '_' . $com_dat['com_id'] );
$status = array();
$this->DB->build( array( 'select' => 'status, is_new, is_complete',
'from' => 'rc_status',
'where' => "is_new=1 OR is_complete=1",
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
if( $row['is_new'] == 1 )
{
$status['new'] = $row['status'];
}
elseif( $row['is_complete'] == 1 )
{
$status['complete'] = $row['status'];
}
}
$data = IPSMember::load( $this->request['member_id'] );
$this->DB->build( array( 'select' => 'id', 'from' => 'rc_reports_index', 'where' => "uid='{$uid}'" ) );
$this->DB->execute();
if( $this->DB->getTotalRows() == 0 )
{
$built_report_main = array(
'uid' => $uid,
'title' => $this->request['title'],
'status' => $status['new'],
'url' => '/index.php?' . $a_url,
'seoname' => $data['members_seo_name'],
'seotemplate' => 'showuser',
'rc_class' => $com_dat['com_id'],
'updated_by' => $this->memberData['member_id'],
'date_updated' => time(),
'date_created' => time(),
'exdat1' => $mem,
'exdat2' => 0,
'exdat3' => 0
);
$this->DB->insert( 'rc_reports_index', $built_report_main );
$rid = $this->DB->getInsertId();
}
else
{
$the_report = $this->DB->fetch();
$rid = $the_report['id'];
$this->DB->update( 'rc_reports_index', array( 'date_updated' => time(), 'status' => $status['new'], 'seoname' => $data['members_seo_name'], 'seotemplate' => 'showuser' ), "id='{$rid}'" );
}
IPSText::getTextClass('bbcode')->parse_bbcode = 1;
IPSText::getTextClass('bbcode')->parse_html = 0;
IPSText::getTextClass('bbcode')->parse_emoticons = 1;
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
IPSText::getTextClass('bbcode')->parsing_section = 'reports';
$build_report = array(
'rid' => $rid,
'report' => IPSText::getTextClass('bbcode')->preDbParse( $this->request['message'] ),
'report_by' => $this->memberData['member_id'],
'date_reported' => time(),
);
$this->DB->insert( 'rc_reports', $build_report );
$reports = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as total', 'from' => 'rc_reports', 'where' => "rid='{$rid}'" ) );
$this->DB->update( 'rc_reports_index', array( 'num_reports' => $reports['total'] ), "id='{$rid}'" );
$return_data = array(
'REDIRECT_URL' => $a_url,
'REPORT_INDEX' => $rid,
'SAVED_URL' => '/index.php?' . $url,
'REPORT' => $build_report['report'],
'TEMPLATE' => 'showuser',
'SEOTITLE' => $data['members_seo_name'],
);
return $return_data;
}
/**
* Accepts an array of data from rc_reports_index and returns an array formatted nearly identical to processReport()
*
* @param array Report data
* @return array Formatted report data
*/
public function formatReportData( $report_data )
{
return array(
'REDIRECT_URL' => $report_data['url'],
'REPORT_INDEX' => $report_data['id'],
'SAVED_URL' => str_replace( '&amp;', '&', $report_data['url'] ),
'REPORT' => '',
'SEOTITLE' => $report_data['seoname'],
'TEMPLATE' => 'showuser',
);
}
/**
* Where to send user after report is submitted
*
* @param array Report data
* @return @e void
*/
public function reportRedirect( $report_data )
{
if( $report_data['SEOTITLE'] )
{
$name['members_seo_name'] = $report_data['SEOTITLE'];
}
else
{
$name = $this->DB->buildAndFetch( array( 'select' => 'members_seo_name', 'from' => 'members', 'where' => 'member_id=' . intval($this->request['member_id']) ) );
}
$this->registry->output->redirectScreen( $this->lang->words['report_sending'], $this->settings['base_url'] . $report_data['REDIRECT_URL'], $name['members_seo_name'], 'showuser' );
}
/**
* Retrieve list of users to send notifications to
*
* @param string Group ids
* @param array Report data
* @return array Array of users to PM/Email
*/
public function getNotificationList( $group_ids, $report_data )
{
$notify = array();
$this->DB->build( array(
'select' => 'mem.member_id, mem.members_display_name as name, mem.language, mem.members_disable_pm, mem.email, mem.member_group_id',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
'add_join' => array(
array(
'select' => 'noti.*',
'from' => array( 'rc_modpref' => 'noti' ),
'where' => 'mem.member_id=noti.mem_id',
)
)
) );
$this->DB->execute();
if( $this->DB->getTotalRows() > 0 )
{
while( $row = $this->DB->fetch() )
{
$notify[] = $row;
}
}
return $notify;
}
}
@@ -1,44 +1,44 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Config file
* Last Updated: $Date: 2011-04-14 23:16:18 -0400 (Thu, 14 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: 8347 $
*/
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'] = 1;
$CONFIG['can_vnc_filter_by_followed'] = 0;
$CONFIG['can_vnc_unread_content'] = 0;
/* Can fetch user generated content */
$CONFIG['can_userContent'] = 1;
/* Content types, put the default one first */
if( $_REQUEST['do'] == 'user_activity' )
{
$CONFIG['contentTypes'] = array( 'comments' );
}
else
{
$CONFIG['contentTypes'] = array( 'members', 'comments' );
<?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'] = 1;
$CONFIG['can_vnc_filter_by_followed'] = 0;
$CONFIG['can_vnc_unread_content'] = 0;
/* Can fetch user generated content */
$CONFIG['can_userContent'] = 1;
/* Content types, put the default one first */
if( $_REQUEST['do'] == 'user_activity' )
{
$CONFIG['contentTypes'] = array( 'comments' );
}
else
{
$CONFIG['contentTypes'] = array( 'members', 'comments' );
}
@@ -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,81 +1,81 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Returns HTML for the form (optional class, not required)
* Last Updated: $Date: 2011-04-14 23:16:18 -0400 (Thu, 14 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: 8347 $
*/
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_members
{
/**
* Construct
*
*/
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( 'members' => array( 'date' => $this->lang->words['s_search_type_0'],
'title' => $this->lang->words['forum_sort_title'] ),
'comments' => array( 'date' => $this->lang->words['s_search_sort_creation_date'] ) );
return $array;
}
/**
* Return sort in
* Optional function to allow apps to define searchable 'sub-apps'.
*
*
* @return array
*/
public function fetchSortIn()
{
if( $this->request['do'] == 'user_activity' )
{
$array = array();
}
else
{
$array = array( 0 => array( 'members', $this->lang->words['s_msin_members'] ),
1 => array( 'comments', $this->lang->words['s_msin_comments'] ) );
}
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_members
{
/**
* Construct
*
*/
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( 'members' => array( 'date' => $this->lang->words['s_search_type_0'],
'title' => $this->lang->words['forum_sort_title'] ),
'comments' => array( 'date' => $this->lang->words['s_search_sort_creation_date'] ) );
return $array;
}
/**
* Return sort in
* Optional function to allow apps to define searchable 'sub-apps'.
*
*
* @return array
*/
public function fetchSortIn()
{
if( $this->request['do'] == 'user_activity' )
{
$array = array();
}
else
{
$array = array( 0 => array( 'members', $this->lang->words['s_msin_members'] ),
1 => array( 'comments', $this->lang->words['s_msin_comments'] ) );
}
return $array;
}
}
@@ -1,234 +1,249 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Formats forum search results
* Last Updated: $Date: 2011-06-15 07:22:24 -0400 (Wed, 15 Jun 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: 9043 $
*/
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_members extends search_format
{
/**
* Constructor
*/
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 )
{
$data['misc'] = unserialize( $data['misc'] );
$template = IPSSearchRegistry::get('members.searchInKey') == 'comments' ? 'memberCommentsSearchResult' : 'memberSearchResult';
return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->$template( $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 )
{
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
{
return $this->processResultsComments( $ids );
}
else
{
$rows = array();
foreach( $ids as $i => $d )
{
$rows[ $i ] = $this->genericizeResults( $d );
}
return $rows;
}
}
/**
* Formats / grabs extra data for results
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
*
* @param array $ids Ids
* @return array
*/
public function processResultsComments( $ids )
{
/* INIT */
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
$search_term = IPSSearchRegistry::get('in.clean_search_term');
$content_title_only = IPSSearchRegistry::get('opt.searchType') == 'content' ? false : true;
$members = array();
$results = array();
$statusIds = array();
$replyIds = IPSSearchRegistry::get('_internal.replyIds');
$replyData = IPSSearchRegistry::get('_internal.replyData');
$replies = array();
$sortKey = '';
/* Got some? */
if ( count( $ids ) )
{
/* Set vars */
IPSSearch::$ask = 'status_date';
IPSSearch::$aso = strtolower( $sort_order );
IPSSearch::$ast = 'numerical';
/* Get the status updates */
$this->DB->build( array('select' => "s.*",
'from' => array( 'member_status_updates' => 's' ),
'where' => 's.status_id IN( ' . implode( ',', $ids ) . ')',
'add_join' => array_merge( array( array( 'select' => 'm.member_id as owner_id, m.members_display_name as owner_display_name, m.members_seo_name as owner_seo_name',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=s.status_member_id',
'type' => 'left' ),
array( 'select' => 'mem.member_id as author_id, mem.members_display_name as author_display_name, mem.members_seo_name as author_seo_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=s.status_author_id',
'type' => 'left' ) ) ) ) );
/* Grab data */
$this->DB->execute();
/* Grab the results */
while( $row = $this->DB->fetch() )
{
$statusIds[ $row['status_id'] ] = $row;
}
/* Sort */
if ( count( $statusIds ) )
{
usort( $statusIds, array("IPSSearch", "usort") );
foreach( $statusIds as $id => $row )
{
/* Do we have any reply data? */
if ( ! empty( $replyData[ $id ] ) )
{
$row = array_merge( $row, $replyData[ $id ] );
}
/* Get author data? */
if ( ! empty( $row['status_author_id'] ) )
{
$members[ $row['status_author_id'] ] = $row['status_author_id'];
}
if ( ! empty( $row['status_member_id'] ) )
{
$members[ $row['status_member_id'] ] = $row['status_member_id'];
}
if ( ! empty( $row['reply_member_id'] ) )
{
$members[ $row['reply_member_id'] ] = $row['reply_member_id'];
}
$results[ $row['status_id'] ] = $row;
}
}
/* Need to load members? */
if ( count( $members ) )
{
$mems = IPSMember::load( $members, 'all' );
foreach( $results as $id => $r )
{
$_status_member = IPSMember::buildDisplayData( $mems[ $r['status_member_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
$_status_author = IPSMember::buildDisplayData( $mems[ $r['status_author_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
$results[ $id ]['status_member'] = $_status_member;
$results[ $id ]['status_author'] = $_status_author;
if ( ! empty( $r['reply_member_id'] ) )
{
$results[ $id ]['reply_author'] = IPSMember::buildDisplayData( $mems[ $r['reply_member_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
}
}
}
}
return $results;
}
/**
* Reassigns fields in a generic way for results output
*
* @param array $r
* @return array
*/
public function genericizeResults( $r )
{
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
{
$r['app'] = 'members';
$r['content'] = $r['comment_content'];
$r['content_title'] = $r['member_display_name_owner'];
$r['updated'] = $r['comment_date'];
$r['type_2'] = 'comment_id';
$r['type_id_2'] = $r['comment_id'];
$r['misc'] = serialize( array(
'members_display_name' => $r['members_display_name'],
'pp_thumb_photo' => $r['pp_thumb_photo'],
'pp_thumb_width' => $r['pp_thumb_width'],
'pp_thumb_height' => $r['pp_thumb_height']
) );
}
else
{
$r['app'] = 'members';
$r['content'] = $r['signature'] . ' ' . $r['pp_about_me'];
$r['content_title'] = $r['members_display_name'];
$r['updated'] = time();
$r['type_2'] = 'profile_view';
$r['type_id_2'] = $r['member_id'];
$r['misc'] = serialize( array(
'pp_thumb_photo' => $r['pp_thumb_photo'],
'pp_thumb_width' => $r['pp_thumb_width'],
'pp_thumb_height' => $r['pp_thumb_height']
) );
}
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_members extends search_format
{
/**
* Constructor
*/
public function __construct( ipsRegistry $registry )
{
parent::__construct( $registry );
$this->registry->getClass('class_localization')->loadLanguageFile( array( 'public_profile' ), 'members' );
}
/**
* Parse search results
*
* @param array $r Search result
* @return array $html Blocks of HTML
*/
public function parseAndFetchHtmlBlocks( $rows )
{
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
{
$this->registry->getClass('output')->addJSModule( 'status', 0 );
}
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 )
{
$data['misc'] = unserialize( $data['misc'] );
$template = IPSSearchRegistry::get('members.searchInKey') == 'comments' ? 'memberCommentsSearchResult' : 'memberSearchResult';
if ( $data['status_last_ids'] )
{
foreach ( unserialize( $data['status_last_ids'] ) as $_data )
{
$data['replies'][ $_data['reply_id'] ] = array_merge( $_data, IPSMember::buildDisplayData( $_data['reply_member_id'] ) );
}
}
return array( ipsRegistry::getClass('output')->getTemplate('search')->$template( $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 )
{
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
{
return $this->processResultsComments( $ids );
}
else
{
$rows = array();
foreach( $ids as $i => $d )
{
$rows[ $i ] = $this->genericizeResults( $d );
}
return $rows;
}
}
/**
* Formats / grabs extra data for results
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
*
* @param array $ids Ids
* @return array
*/
public function processResultsComments( $ids )
{
/* INIT */
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
$search_term = IPSSearchRegistry::get('in.clean_search_term');
$content_title_only = IPSSearchRegistry::get('opt.searchType') == 'content' ? false : true;
$members = array();
$results = array();
$statusIds = array();
$replyIds = IPSSearchRegistry::get('_internal.replyIds');
$replyData = IPSSearchRegistry::get('_internal.replyData');
$replies = array();
$sortKey = '';
/* Got some? */
if ( count( $ids ) )
{
/* Set vars */
IPSSearch::$ask = 'status_date';
IPSSearch::$aso = strtolower( $sort_order );
IPSSearch::$ast = 'numerical';
/* Get the status updates */
$this->DB->build( array('select' => "s.*",
'from' => array( 'member_status_updates' => 's' ),
'where' => 's.status_id IN( ' . implode( ',', $ids ) . ')',
'add_join' => array_merge( array( array( 'select' => 'm.member_id as owner_id, m.members_display_name as owner_display_name, m.members_seo_name as owner_seo_name',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=s.status_member_id',
'type' => 'left' ),
array( 'select' => 'mem.member_id as author_id, mem.members_display_name as author_display_name, mem.members_seo_name as author_seo_name',
'from' => array( 'members' => 'mem' ),
'where' => 'mem.member_id=s.status_author_id',
'type' => 'left' ) ) ) ) );
/* Grab data */
$this->DB->execute();
/* Grab the results */
while( $row = $this->DB->fetch() )
{
$statusIds[ $row['status_id'] ] = $row;
}
/* Sort */
if ( count( $statusIds ) )
{
usort( $statusIds, array("IPSSearch", "usort") );
foreach( $statusIds as $id => $row )
{
/* Do we have any reply data? */
if ( ! empty( $replyData[ $id ] ) )
{
$row = array_merge( $row, $replyData[ $id ] );
}
/* Get author data? */
if ( ! empty( $row['status_author_id'] ) )
{
$members[ $row['status_author_id'] ] = $row['status_author_id'];
}
if ( ! empty( $row['status_member_id'] ) )
{
$members[ $row['status_member_id'] ] = $row['status_member_id'];
}
if ( ! empty( $row['reply_member_id'] ) )
{
$members[ $row['reply_member_id'] ] = $row['reply_member_id'];
}
$results[ $row['status_id'] ] = $row;
}
}
/* Need to load members? */
if ( count( $members ) )
{
$mems = IPSMember::load( $members, 'all' );
foreach( $results as $id => $r )
{
$_status_member = IPSMember::buildDisplayData( $mems[ $r['status_member_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
$_status_author = IPSMember::buildDisplayData( $mems[ $r['status_author_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
$results[ $id ]['status_member'] = $_status_member;
$results[ $id ]['status_author'] = $_status_author;
if ( ! empty( $r['reply_member_id'] ) )
{
$results[ $id ]['reply_author'] = IPSMember::buildDisplayData( $mems[ $r['reply_member_id'] ], array( 'reputation' => 0, 'warn' => 0 ) );
}
}
}
}
return $results;
}
/**
* Reassigns fields in a generic way for results output
*
* @param array $r
* @return array
*/
public function genericizeResults( $r )
{
if ( IPSSearchRegistry::get('members.searchInKey') == 'comments' )
{
$r['app'] = 'members';
$r['content'] = $r['comment_content'];
$r['content_title'] = $r['member_display_name_owner'];
$r['updated'] = $r['comment_date'];
$r['type_2'] = 'comment_id';
$r['type_id_2'] = $r['comment_id'];
$r['misc'] = serialize( array(
'members_display_name' => $r['members_display_name'],
'pp_thumb_photo' => $r['pp_thumb_photo'],
'pp_thumb_width' => $r['pp_thumb_width'],
'pp_thumb_height' => $r['pp_thumb_height']
) );
}
else
{
$r['app'] = 'members';
$r['content'] = $r['signature'] . ' ' . $r['pp_about_me'];
$r['content_title'] = $r['members_display_name'];
$r['updated'] = time();
$r['type_2'] = 'profile_view';
$r['type_id_2'] = $r['member_id'];
$r['misc'] = serialize( array(
'pp_thumb_photo' => $r['pp_thumb_photo'],
'pp_thumb_width' => $r['pp_thumb_width'],
'pp_thumb_height' => $r['pp_thumb_height']
) );
}
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>
@@ -3,16 +3,16 @@
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* IP.Board v3.3.4
* Sphinx template file
* Last Updated: $Date: 2011-06-02 17:57:20 -0400 (Thu, 02 Jun 2011) $
* </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
* @link http://hatynka.in
* @link http://www.invisionpower.com
* @version $Rev: 8953 $
* @since 3.0.0
*
@@ -0,0 +1,71 @@
<?php
/**
* @file warnings.php Warnings extension for members
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $ (Original: Mark)
* @since -
* $LastChangedDate: 2010-10-14 13:11:17 -0400 (Thu, 14 Oct 2010) $
* @version v3.3.4
* $Revision: 477 $
*/
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_members
* @brief Warnings Extension for members
*/
class warnings_members
{
/**
* 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'] )
{
$post = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'message_posts', 'where' => "msg_id=" . intval( $warning['wl_content_id1'] ) ) );
if ( ! empty($post['msg_topic_id']) )
{
$topic = ipsRegistry::DB()->buildAndFetch( array( 'select' => '*', 'from' => 'message_topics', 'where' => "mt_id={$post['msg_topic_id']}" ) );
if ( ! empty($topic['mt_id']) )
{
ipsRegistry::DB()->build( array( 'select' => '*', 'from' => 'message_topic_user_map', 'where' => "map_topic_id={$post['msg_topic_id']}" ) );
ipsRegistry::DB()->execute();
while ( $row = ipsRegistry::DB()->fetch() )
{
if ( $row['map_user_id'] == ipsRegistry::member()->getProperty('member_id') )
{
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=members&amp;module=messaging&amp;section=view&amp;do=findMessage&amp;topicID={$topic['mt_id']}&amp;msgID={$post['msg_id']}" ), 'title' => $topic['mt_title'] );
}
}
return array( 'url' => ipsRegistry::getClass('output')->buildUrl( "app=core&module=reports&section=reports&do=showMessage&topicID={$topic['mt_id']}&msg={$post['msg_id']}" ), 'title' => $topic['mt_title'] );
}
}
}
else
{
$member = IPSMember::load( $warning['wl_member'] );
if ( ! empty($member['member_id']))
{
return array( 'url' => ipsRegistry::getClass('output')->buildSEOUrl( "showuser={$member['member_id']}", 'public', $member['members_seo_name'], 'showuser' ), 'title' => ipsRegistry::getClass('class_localization')->words['warnings_profile'] );
}
}
}
}
+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>
@@ -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,96 +1,96 @@
function checkform() {
/* Unlimited stuff */
$$('._unlimitedNumber').each( function(elem)
{
field = elem.readAttribute('unlimited-field');
input = elem.down('input');
if ( $(field + '_cb').checked == true )
{
$(field).value = -1;
Debug.write( $(field).name + "is -1");
}
} );
/* Admin check */
isAdmin = $('g_access_cp_yes');
isMod = $('g_is_supmod_yes');
msg = '';
if ( isAdmin && isAdmin.checked == true )
{
msg += 'Пользователи этой группы имеют доступ к Админцентру\n\n';
}
if ( isMod && isMod.checked == true )
{
msg += 'Пользователи этой группы являются супермодераторы.\n\n';
}
if ( msg != '' )
{
if( confirm( "Проверка безопасности\n--------------\nНазвание группы пользователей: " + $F('g_title') + "\n--------------\n\n" + msg + 'Это верно?' ) )
{
return true;
}
else
{
return false;
}
}
}
function setUpForm()
{
$$('._unlimitedNumber').each( function(elem)
{
field = elem.readAttribute('unlimited-field');
input = elem.down('input');
var cbox = new Element('input', { type: 'checkbox', name: field + '_cb', id: field + '_cb' } );
var span = new Element('label', { 'for': field + '_cb', 'class': 'desctext clickable' } ).update( '&nbsp;' + ipb.lang['unlimited_text'] );
var div = new Element('div').setStyle( 'padding-bottom: 3px' ).insert( cbox ).insert( span );
input.insert( { before: div } );
$(field + '_cb').observe( 'click', setUpFormCbToggle );
if ( input.value == -1 )
{
$(field + '_cb').checked = true;
input.hide();
}
} );
}
function setUpFormCbToggle(e)
{
elem = Event.findElement(e);
field = elem.id.replace( /_cb$/, '' );
if ( elem.checked == true )
{
new Effect.Fade( $(field), { duration: 0.4 } );
}
else
{
new Effect.Appear( $(field), { duration: 0.4 } );
if ( $(field).value == -1 )
{
$(field).value = 0;
}
}
}
function stripGuestLegend()
{
$$('.guest_legend').each(
function( elem )
{
elem.hide();
}
);
function checkform() {
/* Unlimited stuff */
$$('._unlimitedNumber').each( function(elem)
{
field = elem.readAttribute('unlimited-field');
input = elem.down('input');
if ( $(field + '_cb').checked == true )
{
$(field).value = -1;
Debug.write( $(field).name + "is -1");
}
} );
/* Admin check */
isAdmin = $('g_access_cp_yes');
isMod = $('g_is_supmod_yes');
msg = '';
if ( isAdmin && isAdmin.checked == true )
{
msg += 'Members in this group can access the Admin Control Panel\n\n';
}
if ( isMod && isMod.checked == true )
{
msg += 'Members in this group are super moderators.\n\n';
}
if ( msg != '' )
{
if( confirm( "Security Check\n--------------\nMember Group Title: " + $F('g_title') + "\n--------------\n\n" + msg + 'Is this correct?' ) )
{
return true;
}
else
{
return false;
}
}
}
function setUpForm()
{
$$('._unlimitedNumber').each( function(elem)
{
field = elem.readAttribute('unlimited-field');
input = elem.down('input');
var cbox = new Element('input', { type: 'checkbox', name: field + '_cb', id: field + '_cb' } );
var span = new Element('label', { 'for': field + '_cb', 'class': 'desctext clickable' } ).update( '&nbsp;' + ipb.lang['unlimited_text'] );
var div = new Element('div').setStyle( 'padding-bottom: 3px' ).insert( cbox ).insert( span );
input.insert( { before: div } );
$(field + '_cb').observe( 'click', setUpFormCbToggle );
if ( input.value == -1 )
{
$(field + '_cb').checked = true;
input.hide();
}
} );
}
function setUpFormCbToggle(e)
{
elem = Event.findElement(e);
field = elem.id.replace( /_cb$/, '' );
if ( elem.checked == true )
{
new Effect.Fade( $(field), { duration: 0.4 } );
}
else
{
new Effect.Appear( $(field), { duration: 0.4 } );
if ( $(field).value == -1 )
{
$(field).value = 0;
}
}
}
function stripGuestLegend()
{
$$('.guest_legend').each(
function( elem )
{
elem.hide();
}
);
}
@@ -3,11 +3,11 @@
* @file defaultSection.php Define the default section for the 'ajax' 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,277 +1,277 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Member property updater (AJAX)
* Last Updated: $Date: 2011-06-09 18:03:22 -0400 (Thu, 09 Jun 2011) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Members
* @link http://hatynka.in
* @version $Revision: 9021 $
*/
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_members_ajax_editform extends ipsAjaxCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ), 'members' );
switch( $this->request['do'] )
{
default:
case 'show':
$this->show();
break;
case 'remove_photo':
$this->remove_photo();
break;
}
}
/**
* Remove user's photo
*
* @return @e void [Outputs to screen]
*/
protected function remove_photo()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval( $this->request['member_id'] );
//-----------------------------------------
// Get member
//-----------------------------------------
$member = IPSMember::load( $member_id );
if ( ! $member['member_id'] )
{
$this->returnJsonError( $this->lang->words['m_noid'] );
exit();
}
//-----------------------------------------
// Allowed to upload pics for administrators?
//-----------------------------------------
if( $member['g_access_cp'] AND !$this->registry->getClass('class_permissions')->checkPermission( 'member_photo_admin', 'members', 'members' ) )
{
$this->returnJsonError( $this->lang->words['m_editadmin'] );
exit();
}
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/member/photo.php', 'classes_member_photo' );
$photos = new $classToLoad( $this->registry );
$photos->remove( $member_id );
ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf($this->lang->words['m_imgremlog'], $member_id ) );
$member = IPSMember::load( $member_id );
$member = IPSMember::buildDisplayData( $member, 0 );
//-----------------------------------------
// Return
//-----------------------------------------
$this->returnJsonArray( array(
'success' => 1,
'pp_main_photo' => $member['pp_main_photo'],
'pp_main_width' => $member['pp_main_width'],
'pp_main_height' => $member['pp_main_height']
) );
}
/**
* Show the form
*
* @return @e void [Outputs to screen]
*/
protected function show()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = trim( IPSText::alphanumericalClean( $this->request['name'] ) );
$member_id = intval( $this->request['member_id'] );
$output = '';
//-----------------------------------------
// Load language and skin
//-----------------------------------------
$html = $this->registry->output->loadTemplate('cp_skin_member_form');
$this->lang->loadLanguageFile( array( 'admin_member' ) );
//-----------------------------------------
// Get member data
//-----------------------------------------
$member = IPSMember::load( $member_id, 'extendedProfile,customFields' );
//-----------------------------------------
// Got a member?
//-----------------------------------------
if ( ! $member['member_id'] )
{
$this->returnJsonError( $this->lang->words['m_noid'] );
}
//-----------------------------------------
// Return the form
//-----------------------------------------
if ( method_exists( $html, $name ) )
{
$output = $html->$name( $member );
}
else
{
$save_to = '';
$div_id = '';
$form_field = '';
$text = '';
$description = '';
$method = '';
switch( $name )
{
case 'inline_ban_member':
if( !$this->registry->getClass('class_permissions')->checkPermission( 'member_ban', 'members', 'members' ) )
{
$this->returnJsonError($this->lang->words['m_noban']);
}
if( $member['g_access_cp'] AND !$this->registry->getClass('class_permissions')->checkPermission( 'member_ban_admin', 'members', 'members' ) )
{
$this->returnJsonError($this->lang->words['m_noban']);
}
//-----------------------------------------
// INIT
//-----------------------------------------
$ban_filters = array( 'email' => array(), 'name' => array(), 'ip' => array() );
$email_banned = false;
$ip_banned = array();
$name_banned = false;
//-----------------------------------------
// Grab existing ban filters
//-----------------------------------------
$this->DB->build( array( 'select' => '*', 'from' => 'banfilters' ) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
{
$ban_filters[ $r['ban_type'] ][] = $r['ban_content'];
}
//-----------------------------------------
// Check name and email address
//-----------------------------------------
if( in_array( $member['email'], $ban_filters['email'] ) )
{
$email_banned = true;
}
if( in_array( $member['name'], $ban_filters['name'] ) )
{
$name_banned = true;
}
//-----------------------------------------
// Retrieve IP addresses
//-----------------------------------------
$ip_addresses = IPSMember::findIPAddresses( $member['member_id'] );
//-----------------------------------------
// Start form fields
//-----------------------------------------
$form['member'] = ipsRegistry::getClass('output')->formCheckbox( "ban__member", $member['member_banned'] );
$form['email'] = ipsRegistry::getClass('output')->formCheckbox( "ban__email", $email_banned );
$form['name'] = ipsRegistry::getClass('output')->formCheckbox( "ban__name", $name_banned );
$form['note'] = ipsRegistry::getClass('output')->formCheckbox( "ban__note", 0 );
$form['note_field'] = ipsRegistry::getClass('output')->formTextarea( "ban__note_field" );
$form['ips'] = array();
//-----------------------------------------
// What about IPs?
//-----------------------------------------
if( is_array($ip_addresses) AND count($ip_addresses) )
{
foreach( $ip_addresses as $ip_address => $count )
{
if( in_array( $ip_address, $ban_filters['ip'] ) )
{
$form['ips'][ $ip_address ] = ipsRegistry::getClass('output')->formCheckbox( "ban__ip_" . str_replace( '.', '_', $ip_address ), true );
}
else
{
$form['ips'][ $ip_address ] = ipsRegistry::getClass('output')->formCheckbox( "ban__ip_" . str_replace( '.', '_', $ip_address ), false );
}
}
}
$member_groups = array();
foreach( ipsRegistry::cache()->getCache('group_cache') as $group )
{
if( $group['g_id'] == $member['member_group_id'] )
{
$member['_group_title'] = $group['g_title'];
}
$member_groups[] = array( $group['g_id'], $group['g_title'] );
}
$form['groups_confirm'] = ipsRegistry::getClass('output')->formCheckbox( "ban__group_change", 0 );
$form['groups'] = ipsRegistry::getClass('output')->formDropdown( "ban__group", $member_groups, $member['member_group_id'] );
$output = $html->inline_ban_member_form( $member, $form );
break;
}
if( !$output AND $method AND method_exists( $html, $method ) )
{
$output = $html->$method( $member, $save_to, $div_id, $form_field, $text, $description );
}
}
//-----------------------------------------
// Print...
//-----------------------------------------
$this->returnHtml( $output );
}
<?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 Members
* @link http://www.invisionpower.com
* @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_members_ajax_editform extends ipsAjaxCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ), 'members' );
switch( $this->request['do'] )
{
default:
case 'show':
$this->show();
break;
case 'remove_photo':
$this->remove_photo();
break;
}
}
/**
* Remove user's photo
*
* @return @e void [Outputs to screen]
*/
protected function remove_photo()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval( $this->request['member_id'] );
//-----------------------------------------
// Get member
//-----------------------------------------
$member = IPSMember::load( $member_id );
if ( ! $member['member_id'] )
{
$this->returnJsonError( $this->lang->words['m_noid'] );
exit();
}
//-----------------------------------------
// Allowed to upload pics for administrators?
//-----------------------------------------
if( $member['g_access_cp'] AND !$this->registry->getClass('class_permissions')->checkPermission( 'member_photo_admin', 'members', 'members' ) )
{
$this->returnJsonError( $this->lang->words['m_editadmin'] );
exit();
}
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/member/photo.php', 'classes_member_photo' );
$photos = new $classToLoad( $this->registry );
$photos->remove( $member_id );
ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf($this->lang->words['m_imgremlog'], $member_id ) );
$member = IPSMember::load( $member_id );
$member = IPSMember::buildDisplayData( $member, 0 );
//-----------------------------------------
// Return
//-----------------------------------------
$this->returnJsonArray( array(
'success' => 1,
'pp_main_photo' => $member['pp_main_photo'],
'pp_main_width' => $member['pp_main_width'],
'pp_main_height' => $member['pp_main_height']
) );
}
/**
* Show the form
*
* @return @e void [Outputs to screen]
*/
protected function show()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$name = trim( IPSText::alphanumericalClean( $this->request['name'] ) );
$member_id = intval( $this->request['member_id'] );
$output = '';
//-----------------------------------------
// Load language and skin
//-----------------------------------------
$html = $this->registry->output->loadTemplate('cp_skin_member_form');
$this->lang->loadLanguageFile( array( 'admin_member' ) );
//-----------------------------------------
// Get member data
//-----------------------------------------
$member = IPSMember::load( $member_id, 'extendedProfile,customFields' );
//-----------------------------------------
// Got a member?
//-----------------------------------------
if ( ! $member['member_id'] )
{
$this->returnJsonError( $this->lang->words['m_noid'] );
}
//-----------------------------------------
// Return the form
//-----------------------------------------
if ( method_exists( $html, $name ) )
{
$output = $html->$name( $member );
}
else
{
$save_to = '';
$div_id = '';
$form_field = '';
$text = '';
$description = '';
$method = '';
switch( $name )
{
case 'inline_ban_member':
if( !$this->registry->getClass('class_permissions')->checkPermission( 'member_ban', 'members', 'members' ) )
{
$this->returnJsonError($this->lang->words['m_noban']);
}
if( $member['g_access_cp'] AND !$this->registry->getClass('class_permissions')->checkPermission( 'member_ban_admin', 'members', 'members' ) )
{
$this->returnJsonError($this->lang->words['m_noban']);
}
//-----------------------------------------
// INIT
//-----------------------------------------
$ban_filters = array( 'email' => array(), 'name' => array(), 'ip' => array() );
$email_banned = false;
$ip_banned = array();
$name_banned = false;
//-----------------------------------------
// Grab existing ban filters
//-----------------------------------------
$this->DB->build( array( 'select' => '*', 'from' => 'banfilters' ) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
{
$ban_filters[ $r['ban_type'] ][] = $r['ban_content'];
}
//-----------------------------------------
// Check name and email address
//-----------------------------------------
if( in_array( $member['email'], $ban_filters['email'] ) )
{
$email_banned = true;
}
if( in_array( $member['name'], $ban_filters['name'] ) )
{
$name_banned = true;
}
//-----------------------------------------
// Retrieve IP addresses
//-----------------------------------------
$ip_addresses = IPSMember::findIPAddresses( $member['member_id'] );
//-----------------------------------------
// Start form fields
//-----------------------------------------
$form['member'] = ipsRegistry::getClass('output')->formCheckbox( "ban__member", $member['member_banned'] );
$form['email'] = ipsRegistry::getClass('output')->formCheckbox( "ban__email", $email_banned );
$form['name'] = ipsRegistry::getClass('output')->formCheckbox( "ban__name", $name_banned );
$form['note'] = ipsRegistry::getClass('output')->formCheckbox( "ban__note", 0 );
$form['note_field'] = ipsRegistry::getClass('output')->formTextarea( "ban__note_field" );
$form['ips'] = array();
//-----------------------------------------
// What about IPs?
//-----------------------------------------
if( is_array($ip_addresses) AND count($ip_addresses) )
{
foreach( $ip_addresses as $ip_address => $count )
{
if( in_array( $ip_address, $ban_filters['ip'] ) )
{
$form['ips'][ $ip_address ] = ipsRegistry::getClass('output')->formCheckbox( "ban__ip_" . str_replace( '.', '_', $ip_address ), true );
}
else
{
$form['ips'][ $ip_address ] = ipsRegistry::getClass('output')->formCheckbox( "ban__ip_" . str_replace( '.', '_', $ip_address ), false );
}
}
}
$member_groups = array();
foreach( ipsRegistry::cache()->getCache('group_cache') as $group )
{
if( $group['g_id'] == $member['member_group_id'] )
{
$member['_group_title'] = $group['g_title'];
}
$member_groups[] = array( $group['g_id'], $group['g_title'] );
}
$form['groups_confirm'] = ipsRegistry::getClass('output')->formCheckbox( "ban__group_change", 0 );
$form['groups'] = ipsRegistry::getClass('output')->formDropdown( "ban__group", $member_groups, $member['member_group_id'] );
$output = $html->inline_ban_member_form( $member, $form );
break;
}
if( !$output AND $method AND method_exists( $html, $method ) )
{
$output = $html->$method( $member, $save_to, $div_id, $form_field, $text, $description );
}
}
//-----------------------------------------
// Print...
//-----------------------------------------
$this->returnHtml( $output );
}
}
@@ -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
File diff suppressed because it is too large. Load diff
@@ -3,11 +3,11 @@
* @file defaultSection.php Define the default section for the 'bulkmail' 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,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>Bulk Mail</title>
<subitems>
<subitem>
<subitemtitle>Рассылки</subitemtitle>
<subitemtitle>Bulk Mail</subitemtitle>
<subitemlang>bulkmail</subitemlang>
<subsection>bulkmail</subsection>
<subitemurl>do=bulk_mail</subitemurl>
@@ -1,34 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Управление рассылками</grouptitle>
<grouptitle>Creating Bulk Mail</grouptitle>
<grouplang>mem_bulkmail</grouplang>
<items>
<item>
<key>bulkmail_addedit</key>
<string>Может добавлять/изменять рассылки?</string>
<string>Can add/edit bulk emails?</string>
</item>
<item>
<key>bulkmail_delete</key>
<string>Может удалять рассылки?</string>
<string>Can delete bulk emails?</string>
</item>
</items>
</group>
<group>
<grouptitle>Отправка рассылок</grouptitle>
<grouptitle>Sending/Resending Bulk Mails</grouptitle>
<grouplang>mem_bulkmailsend</grouplang>
<items>
<item>
<key>bulkmail_view</key>
<string>Может просматривать текущие рассылки?</string>
<string>Can monitor/view bulk emails?</string>
</item>
<item>
<key>bulkmail_send</key>
<string>Может запускать отправку рассылки?</string>
<string>Can send bulk emails?</string>
</item>
<item>
<key>bulkmail_cancel</key>
<string>Может отменить отправку рассылки?</string>
<string>Can cancel bulk emails?</string>
</item>
</items>
</group>
File diff suppressed because it is too large. Load diff
@@ -3,12 +3,12 @@
* @file defaultSection.php Define the default section for the 'cfields' 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
* $Revision: 8655 $
* $LastChangedDate: 2010-10-14 13:11:17 -0400 (Thu, 14 Oct 2010) $
* @version v3.3.4
* $Revision: 477 $
*/
$DEFAULT_SECTION = 'customfields';
@@ -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>
@@ -3,11 +3,11 @@
* @file defaultSection.php Define the default section for the 'groups' 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>
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 Member Groups</title>
<subitems>
<subitem>
<subitemtitle>Управление группами пользователей</subitemtitle>
<subitemtitle>Manage Member Groups</subitemtitle>
<subitemlang>manage_groups</subitemlang>
<subsection>groups</subsection>
<subitemurl>do=groups_overview</subitemurl>
@@ -15,10 +15,10 @@
</subitems>
</item>
<item>
<title>Маски доступа</title>
<title>Manage User Permissions</title>
<subitems>
<subitem>
<subitemtitle>Управление масками доступа</subitemtitle>
<subitemtitle>Manage User Permissions</subitemtitle>
<subitemlang>manage_perms</subitemlang>
<subsection>permissions</subsection>
<subitemurl>do=overview</subitemurl>
@@ -1,44 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Управление группами</grouptitle>
<grouptitle>Managing Groups</grouptitle>
<grouplang>members_groups</grouplang>
<items>
<item>
<key>groups_add</key>
<string>Может добавлять группы?</string>
<string>Can add groups?</string>
</item>
<item>
<key>groups_add_admin</key>
<string>Может добавлять АДМИНИСТРАТОРСКИЕ группы?</string>
<string>Can add ADMIN groups?</string>
</item>
<item>
<key>groups_edit</key>
<string>Может редактировать группы?</string>
<string>Can edit groups?</string>
</item>
<item>
<key>groups_edit_admin</key>
<string>Может редактировать АДМИНИСТРАТОРСКИЕ группы?</string>
<string>Can edit ADMIN groups?</string>
</item>
<item>
<key>groups_delete</key>
<string>Может удалять группы?</string>
<string>Can delete groups?</string>
</item>
<item>
<key>groups_delete_admin</key>
<string>Может удалять АДМИНИСТРАТОРСКИЕ группы?</string>
<string>Can delete ADMIN groups?</string>
</item>
</items>
</group>
<group>
<grouptitle>Управление правами</grouptitle>
<grouptitle>Managing Permissions</grouptitle>
<grouplang>members_perms</grouplang>
<items>
<item>
<key>perms_manage</key>
<string>Может добавлять и редактировать маски доступа?</string>
<string>Can manage permission sets and configure permission access?</string>
</item>
<item>
<key>perms_delete</key>
<string>Может удалять маски доступа?</string>
<string>Can remove permission sets?</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,251 +1,251 @@
<?php
/**
* @file banfilters.php Provides helper methods to add ban filters
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $Author: ips_terabyte $
* @since -
* $LastChangedDate: 2011-03-22 12:48:06 -0400 (Tue, 22 Mar 2011) $
* @version v3.2.3
* $Revision: 8149 $
*/
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_members_members_banfilters
* @brief Provides helper methods to add ban filters
*/
class admin_members_members_banfilters extends ipsCommand
{
/**
* Skin object shortcut
*
* @var $html
*/
public $html;
/**
* String for the screen url bit
*
* @var $form_code
*/
public $form_code = '';
/**
* String for the JS url bit
*
* @var $form_code_js
*/
public $form_code_js = '';
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
/* Load skin & setup some stuff */
$this->html = $this->registry->output->loadTemplate( 'cp_skin_banfilters' );
$this->form_code = $this->html->form_code = 'module=members&amp;section=banfilters&amp;';
$this->form_code_js = $this->html->form_code_js = 'module=members&section=banfilters&';
/* Load lang */
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ), 'members' );
/* What to do... */
switch( $this->request['do'] )
{
case 'ban_add':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ban_manage' );
$this->banAdd();
break;
case 'ban_delete':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ban_remove' );
$this->banDelete();
break;
default:
case 'ban':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ban_manage' );
$this->banOverview();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Displays the ban overview screen
*
* @return @e void
*/
public function banOverview()
{
/* INI */
$ban = array();
$ips = array();
$emails = array();
$names = array();
/* Get ban filters */
$this->DB->build( array( 'select' => '*', 'from' => 'banfilters', 'order' => 'ban_date desc' ) );
$this->DB->execute();
while ( $r = $this->DB->fetch() )
{
$ban[ $r['ban_type'] ][ $r['ban_id'] ] = $r;
}
/* IPs */
if( isset( $ban['ip'] ) AND is_array( $ban['ip'] ) AND count( $ban['ip'] ) )
{
foreach( $ban['ip'] as $entry )
{
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT', 1 );
$ips[] = $entry;
}
}
/* Emails */
if( isset( $ban['email'] ) AND is_array( $ban['email'] ) AND count( $ban['email'] ) )
{
foreach( $ban['email'] as $entry )
{
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT' );
$emails[] = $entry;
}
}
/* Banned Names */
if( isset( $ban['name'] ) AND is_array( $ban['name'] ) AND count( $ban['name'] ) )
{
foreach( $ban['name'] as $entry )
{
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT' );
$names[] = $entry;
}
}
/* Output */
$this->registry->output->html .= $this->html->banOverview( $ips, $emails, $names );
}
/**
* Add a new ban filter
*
* @return @e void
*/
public function banAdd()
{
$this->request['bantext'] = trim($this->request['bantext']);
/* Error checking */
if( ! $this->request['bantext'] )
{
$this->registry->output->global_message = $this->lang->words['ban_entersomething'];
$this->banOverview();
return;
}
/* Check for duplicate */
$result = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'banfilters',
'where' => "ban_content='{$this->request['bantext']}' and ban_type='{$this->request['bantype']}'"
) );
if ( $result['ban_id'] )
{
$this->registry->output->global_message = $this->lang->words['ban_dupe'];
$this->banOverview();
return;
}
/* Insert the new ban filter */
$this->DB->insert( 'banfilters', array( 'ban_type' => trim($this->request['bantype']),
'ban_content' => trim($this->request['bantext']),
'ban_date' => time(),
'ban_reason' => trim($this->request['banreason'])
)
);
/* Rebuild cacne and bounce */
$this->rebuildBanCache();
$this->registry->output->global_message = $this->lang->words['ban_added'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'].$this->form_code.'do=ban' );
}
/**
* Delete a ban filter
*
* @return @e void
*/
public function banDelete()
{
/* INI */
$ids = array();
/* Loop through the request fields and find checked ban filters */
foreach( $this->request as $key => $value )
{
if( preg_match( '/^banid_(\d+)$/', $key, $match ) )
{
if( $this->request[ $match[0] ] )
{
$ids[] = $match[1];
}
}
}
/* Clean the array */
$ids = IPSLib::cleanIntArray( $ids );
/* Delete any checked ban filters */
if ( count( $ids ) )
{
$this->DB->delete( 'banfilters', 'ban_id IN(' . implode( ",", $ids ) . ')' );
}
/* Rebuild the cache */
$this->rebuildBanCache();
/* Bounce */
$this->registry->output->global_message = $this->lang->words['ban_removed'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'].$this->form_code.'do=ban' );
}
/**
* Rebuilds the ban cache
*
* @return @e void
*/
public function rebuildBanCache()
{
/* INI */
$cache = array();
/* Get the ban filters */
$this->DB->build( array( 'select' => 'ban_content', 'from' => 'banfilters', 'where' => "ban_type='ip'" ) );
$this->DB->execute();
while ( $r = $this->DB->fetch() )
{
$cache[] = $r['ban_content'];
}
/* Update the cache */
$this->cache->setCache( 'banfilters', $cache, array( 'array' => 1 ) );
}
<?php
/**
* @file banfilters.php Provides helper methods to add ban filters
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: ips_terabyte $
* @since -
* $LastChangedDate: 2011-03-22 12:48:06 -0400 (Tue, 22 Mar 2011) $
* @version v3.3.4
* $Revision: 8149 $
*/
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_members_members_banfilters
* @brief Provides helper methods to add ban filters
*/
class admin_members_members_banfilters extends ipsCommand
{
/**
* Skin object shortcut
*
* @var $html
*/
public $html;
/**
* String for the screen url bit
*
* @var $form_code
*/
public $form_code = '';
/**
* String for the JS url bit
*
* @var $form_code_js
*/
public $form_code_js = '';
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
/* Load skin & setup some stuff */
$this->html = $this->registry->output->loadTemplate( 'cp_skin_banfilters' );
$this->form_code = $this->html->form_code = 'module=members&amp;section=banfilters&amp;';
$this->form_code_js = $this->html->form_code_js = 'module=members&section=banfilters&';
/* Load lang */
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ), 'members' );
/* What to do... */
switch( $this->request['do'] )
{
case 'ban_add':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ban_manage' );
$this->banAdd();
break;
case 'ban_delete':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ban_remove' );
$this->banDelete();
break;
default:
case 'ban':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ban_manage' );
$this->banOverview();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Displays the ban overview screen
*
* @return @e void
*/
public function banOverview()
{
/* INI */
$ban = array();
$ips = array();
$emails = array();
$names = array();
/* Get ban filters */
$this->DB->build( array( 'select' => '*', 'from' => 'banfilters', 'order' => 'ban_date desc' ) );
$this->DB->execute();
while ( $r = $this->DB->fetch() )
{
$ban[ $r['ban_type'] ][ $r['ban_id'] ] = $r;
}
/* IPs */
if( isset( $ban['ip'] ) AND is_array( $ban['ip'] ) AND count( $ban['ip'] ) )
{
foreach( $ban['ip'] as $entry )
{
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT', 1 );
$ips[] = $entry;
}
}
/* Emails */
if( isset( $ban['email'] ) AND is_array( $ban['email'] ) AND count( $ban['email'] ) )
{
foreach( $ban['email'] as $entry )
{
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT' );
$emails[] = $entry;
}
}
/* Banned Names */
if( isset( $ban['name'] ) AND is_array( $ban['name'] ) AND count( $ban['name'] ) )
{
foreach( $ban['name'] as $entry )
{
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT' );
$names[] = $entry;
}
}
/* Output */
$this->registry->output->html .= $this->html->banOverview( $ips, $emails, $names );
}
/**
* Add a new ban filter
*
* @return @e void
*/
public function banAdd()
{
$this->request['bantext'] = trim($this->request['bantext']);
/* Error checking */
if( ! $this->request['bantext'] )
{
$this->registry->output->global_message = $this->lang->words['ban_entersomething'];
$this->banOverview();
return;
}
/* Check for duplicate */
$result = $this->DB->buildAndFetch( array( 'select' => '*',
'from' => 'banfilters',
'where' => "ban_content='{$this->request['bantext']}' and ban_type='{$this->request['bantype']}'"
) );
if ( $result['ban_id'] )
{
$this->registry->output->global_message = $this->lang->words['ban_dupe'];
$this->banOverview();
return;
}
/* Insert the new ban filter */
$this->DB->insert( 'banfilters', array( 'ban_type' => trim($this->request['bantype']),
'ban_content' => trim($this->request['bantext']),
'ban_date' => time(),
'ban_reason' => trim($this->request['banreason'])
)
);
/* Rebuild cacne and bounce */
$this->rebuildBanCache();
$this->registry->output->global_message = $this->lang->words['ban_added'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'].$this->form_code.'do=ban' );
}
/**
* Delete a ban filter
*
* @return @e void
*/
public function banDelete()
{
/* INI */
$ids = array();
/* Loop through the request fields and find checked ban filters */
foreach( $this->request as $key => $value )
{
if( preg_match( '/^banid_(\d+)$/', $key, $match ) )
{
if( $this->request[ $match[0] ] )
{
$ids[] = $match[1];
}
}
}
/* Clean the array */
$ids = IPSLib::cleanIntArray( $ids );
/* Delete any checked ban filters */
if ( count( $ids ) )
{
$this->DB->delete( 'banfilters', 'ban_id IN(' . implode( ",", $ids ) . ')' );
}
/* Rebuild the cache */
$this->rebuildBanCache();
/* Bounce */
$this->registry->output->global_message = $this->lang->words['ban_removed'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'].$this->form_code.'do=ban' );
}
/**
* Rebuilds the ban cache
*
* @return @e void
*/
public function rebuildBanCache()
{
/* INI */
$cache = array();
/* Get the ban filters */
$this->DB->build( array( 'select' => 'ban_content', 'from' => 'banfilters', 'where' => "ban_type='ip'" ) );
$this->DB->execute();
while ( $r = $this->DB->fetch() )
{
$cache[] = $r['ban_content'];
}
/* Update the cache */
$this->cache->setCache( 'banfilters', $cache, array( 'array' => 1 ) );
}
}
@@ -3,11 +3,11 @@
* @file defaultSection.php Define the default section for the 'members' 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,377 +1,377 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Member property updater (AJAX)
* Last Updated: $Date: 2011-06-06 18:06:01 -0400 (Mon, 06 Jun 2011) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license This is NULLED!
* @package IP.Board
* @subpackage Members
* @link http://hatynka.in
* @version $Revision: 8982 $
*/
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_members_members_editform extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ), 'members' );
switch( $this->request['do'] )
{
case 'save_display_name':
$this->save_member_name( 'members_display_name' );
break;
case 'save_name':
$this->save_member_name( 'name' );
break;
case 'save_password':
$this->save_password();
break;
case 'save_email':
$this->save_email();
break;
}
}
/**
* Change a member's email address
*
* @return @e void [Outputs to screen]
*/
protected function save_email()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval( $this->request['member_id'] );
$email = trim( $this->request['email'] );
//-----------------------------------------
// Get member
//-----------------------------------------
$member = IPSMember::load( $member_id );
if ( ! $member['member_id'] )
{
$this->registry->output->showError( $this->lang->words['m_noid'] );
}
//-----------------------------------------
// Allowed to edit administrators?
//-----------------------------------------
if( $member['g_access_cp'] AND !$this->registry->getClass('class_permissions')->checkPermission( 'member_edit_admin', 'members', 'members' ) )
{
$this->registry->output->showError( $this->lang->words['m_editadmin'] );
}
//-----------------------------------------
// Is this email addy taken? CONVERGE THIS??
//-----------------------------------------
$email_check = IPSMember::load( strtolower($email) );
if ( $email_check['member_id'] AND $email_check['member_id'] != $member_id )
{
$this->registry->output->showError( $this->lang->words['m_emailalready'] );
}
//-----------------------------------------
// Load handler...
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$han_login = new $classToLoad( $this->registry );
$han_login->init();
$han_login->changeEmail( trim( strtolower( $member['email'] ) ), trim( strtolower( $email ) ), $member );
//-----------------------------------------
// We don't want to die just from a Converge error
//-----------------------------------------
/*if ( $han_login->return_code AND ( $han_login->return_code != 'METHOD_NOT_DEFINED' AND $han_login->return_code != 'SUCCESS' ) )
{
$this->returnJsonError( $this->lang->words['m_emailalready'] );
exit();
}*/
//-----------------------------------------
// Update member
//-----------------------------------------
IPSLib::runMemberSync( 'onEmailChange', $member_id, strtolower( $email ), $member['email'] );
IPSMember::save( $member_id, array( 'core' => array( 'email' => strtolower( $email ) ) ) );
ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf( $this->lang->words['m_emailchangelog'], $member['email'], $email, $member_id ) );
$this->registry->output->global_message = $this->lang->words['email_updated_success'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . 'module=members&do=viewmember&member_id=' . $member_id );
}
/**
* Change a member's password
*
* @return @e void [Outputs to screen]
*/
protected function save_password()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval( $this->request['member_id'] );
$password = IPSText::parseCleanValue( $_POST['password'] );
$password2 = IPSText::parseCleanValue( $_POST['password2'] );
$new_key = intval( $this->request['new_key'] );
$new_salt = intval( $this->request['new_salt'] );
$salt = str_replace( '\\', "\\\\", IPSMember::generatePasswordSalt(5) );
$key = IPSMember::generateAutoLoginKey();
$md5_once = md5( trim($password) );
//-----------------------------------------
// AJAX debug
//-----------------------------------------
IPSDebug::fireBug( 'info', array( 'Password: ' . $password ) );
//-----------------------------------------
// Check
//-----------------------------------------
if ( ! $password OR ! $password2 )
{
$this->registry->output->showError( $this->lang->words['password_nogood'] );
}
if ( $password != $password2 )
{
$this->registry->output->showError( $this->lang->words['m_passmatch'] );
}
//-----------------------------------------
// Get member
//-----------------------------------------
$member = IPSMember::load( $member_id );
//-----------------------------------------
// Allowed to edit administrators?
//-----------------------------------------
if( $member['g_access_cp'] AND !$this->registry->getClass('class_permissions')->checkPermission( 'member_edit_admin', 'members', 'members' ) )
{
$this->registry->output->showError( $this->lang->words['m_editadmin'] );
}
//-----------------------------------------
// Check Converge: Password
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$han_login = new $classToLoad( $this->registry );
$han_login->init();
$han_login->changePass( $member['email'], $md5_once, $password, $member );
/*if ( $han_login->return_code != 'METHOD_NOT_DEFINED' AND $han_login->return_code != 'SUCCESS' )
{
$this->returnJsonError( $this->lang->words['m_passchange']);
exit();
}*/
//-----------------------------------------
// Local DB
//-----------------------------------------
$update = array();
if( $new_salt )
{
$update['members_pass_salt'] = $salt;
}
if( $new_key )
{
$update['member_login_key'] = $key;
}
if( count($update) )
{
IPSMember::save( $member_id, array( 'core' => $update ) );
}
IPSMember::updatePassword( $member_id, $md5_once );
IPSLib::runMemberSync( 'onPassChange', $member_id, $password );
ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf( $this->lang->words['m_passlog'], $member_id ) );
$this->registry->output->global_message = $this->lang->words['pw_updated_success'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . 'module=members&do=viewmember&member_id=' . $member_id );
}
/**
* Update a user's login or display name
*
* @param string Field to update
* @return @e void [Outputs to screen]
*/
protected function save_member_name( $field='members_display_name' )
{
$member_id = intval( $this->request['member_id'] );
$member = IPSMember::load( $member_id );
//-----------------------------------------
// Allowed to edit administrators?
//-----------------------------------------
if( $member['g_access_cp'] AND !$this->registry->getClass('class_permissions')->checkPermission( 'member_edit_admin', 'members', 'members' ) )
{
$this->registry->output->showError( $this->lang->words['m_editadmin'] );
}
if ( $field == 'members_display_name' )
{
$display_name = $this->request['display_name'];
$display_name = str_replace("&#43;", "+", $display_name );
}
else
{
$display_name = $this->request['name'];
$display_name = str_replace("&#43;", "+", $display_name );
$display_name = str_replace( '|', '&#124;' , $display_name );
$display_name = trim( preg_replace( "/\s{2,}/", " ", $display_name ) );
}
if ( $this->settings['strip_space_chr'] )
{
// use hexdec to convert between '0xAD' and chr
$display_name = IPSText::removeControlCharacters( $display_name );
}
if ( $field == 'members_display_name' AND preg_match( "#[\[\];,\|]#", str_replace( '&#39;', "'", str_replace( '&amp;', '&', str_replace( '&quot;', '"', str_replace( '&#33;', '!', $display_name ) ) ) ) ) )
{
$this->registry->output->showError( $this->lang->words['m_displaynames'] );
}
try
{
if ( IPSMember::getFunction()->updateName( $member_id, $display_name, $field ) === TRUE )
{
if ( $field == 'members_display_name' )
{
ipsRegistry::getClass('adminFunctions')->saveAdminLog(sprintf( $this->lang->words['m_dnamelog'], $member['members_display_name'], $display_name ));
}
else
{
ipsRegistry::getClass('adminFunctions')->saveAdminLog(sprintf( $this->lang->words['m_namelog'], $member['name'], $display_name ) );
//-----------------------------------------
// If updating a name, and display names
// disabled, update display name too
//-----------------------------------------
if( !ipsRegistry::$settings['auth_allow_dnames'] )
{
IPSMember::getFunction()->updateName( $member_id, $display_name, 'members_display_name' );
}
//-----------------------------------------
// I say, did we choose to email 'dis member?
//-----------------------------------------
if ( $this->request['send_email'] == 1 )
{
//-----------------------------------------
// By golly, we did!
//-----------------------------------------
$msg = trim( IPSText::stripslashes( nl2br( $_POST['email_contents'] ) ) );
$msg = str_replace( "{old_name}", $member['name'], $msg );
$msg = str_replace( "{new_name}", $display_name , $msg );
$msg = str_replace( "<#BOARD_NAME#>", $this->settings['board_name'], $msg );
$msg = str_replace( "<#BOARD_ADDRESS#>", $this->settings['board_url'] . '/index.' . $this->settings['php_ext'], $msg );
IPSText::getTextClass('email')->message = stripslashes( IPSText::getTextClass('email')->cleanMessage($msg) );
IPSText::getTextClass('email')->subject = $this->lang->words['m_changesubj'];
IPSText::getTextClass('email')->to = $member['email'];
IPSText::getTextClass('email')->sendMail();
}
}
$this->cache->rebuildCache( 'stats', 'global' );
}
else
{
# We should absolutely never get here. So this is a fail-safe, really to
# prevent a "false" positive outcome for the end-user
$this->registry->output->showError( $this->lang->words['m_namealready'] );
}
}
catch( Exception $error )
{
// $this->returnJsonError( $error->getMessage() );
switch( $error->getMessage() )
{
case 'NO_USER':
$this->registry->output->showError( $this->lang->words['m_noid'] );
break;
case 'NO_PERMISSION':
case 'NO_NAME':
$this->registry->output->showError( sprintf($this->lang->words['m_morethan3'], $this->settings['max_user_name_length'] ) );
break;
case 'ILLEGAL_CHARS':
$this->registry->output->showError( $this->lang->words['m_illegal'] );
break;
case 'USER_NAME_EXISTS':
$this->registry->output->showError( $this->lang->words['m_namealready'] );
break;
default:
$this->registry->output->showError( $error->getMessage() );
break;
}
}
//-----------------------------------------
// Load handler...
//-----------------------------------------
if( $field == 'name' )
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$han_login = new $classToLoad( $this->registry );
$han_login->init();
$han_login->changeName( $member['name'], $display_name, $member['email'], $member );
}
else
{
IPSLib::runMemberSync( 'onNameChange', $member_id, $display_name );
}
$this->registry->output->global_message = $this->lang->words[ $field . '_updated_success'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . 'module=members&do=viewmember&member_id=' . $member_id );
}
<?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 Members
* @link http://www.invisionpower.com
* @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_members_members_editform extends ipsCommand
{
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ), 'members' );
switch( $this->request['do'] )
{
case 'save_display_name':
$this->save_member_name( 'members_display_name' );
break;
case 'save_name':
$this->save_member_name( 'name' );
break;
case 'save_password':
$this->save_password();
break;
case 'save_email':
$this->save_email();
break;
}
}
/**
* Change a member's email address
*
* @return @e void [Outputs to screen]
*/
protected function save_email()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval( $this->request['member_id'] );
$email = trim( $this->request['email'] );
//-----------------------------------------
// Get member
//-----------------------------------------
$member = IPSMember::load( $member_id );
if ( ! $member['member_id'] )
{
$this->registry->output->showError( $this->lang->words['m_noid'] );
}
//-----------------------------------------
// Allowed to edit administrators?
//-----------------------------------------
if( $member['g_access_cp'] AND !$this->registry->getClass('class_permissions')->checkPermission( 'member_edit_admin', 'members', 'members' ) )
{
$this->registry->output->showError( $this->lang->words['m_editadmin'] );
}
//-----------------------------------------
// Is this email addy taken? CONVERGE THIS??
//-----------------------------------------
$email_check = IPSMember::load( strtolower($email) );
if ( $email_check['member_id'] AND $email_check['member_id'] != $member_id )
{
$this->registry->output->showError( $this->lang->words['m_emailalready'] );
}
//-----------------------------------------
// Load handler...
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$han_login = new $classToLoad( $this->registry );
$han_login->init();
$han_login->changeEmail( trim( strtolower( $member['email'] ) ), trim( strtolower( $email ) ), $member );
//-----------------------------------------
// We don't want to die just from a Converge error
//-----------------------------------------
/*if ( $han_login->return_code AND ( $han_login->return_code != 'METHOD_NOT_DEFINED' AND $han_login->return_code != 'SUCCESS' ) )
{
$this->returnJsonError( $this->lang->words['m_emailalready'] );
exit();
}*/
//-----------------------------------------
// Update member
//-----------------------------------------
IPSLib::runMemberSync( 'onEmailChange', $member_id, strtolower( $email ), $member['email'] );
IPSMember::save( $member_id, array( 'core' => array( 'email' => strtolower( $email ) ) ) );
ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf( $this->lang->words['m_emailchangelog'], $member['email'], $email, $member_id ) );
$this->registry->output->global_message = $this->lang->words['email_updated_success'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . 'module=members&do=viewmember&member_id=' . $member_id );
}
/**
* Change a member's password
*
* @return @e void [Outputs to screen]
*/
protected function save_password()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$member_id = intval( $this->request['member_id'] );
$password = IPSText::parseCleanValue( $_POST['password'] );
$password2 = IPSText::parseCleanValue( $_POST['password2'] );
$new_key = intval( $this->request['new_key'] );
$new_salt = intval( $this->request['new_salt'] );
$salt = str_replace( '\\', "\\\\", IPSMember::generatePasswordSalt(5) );
$key = IPSMember::generateAutoLoginKey();
$md5_once = md5( trim($password) );
//-----------------------------------------
// AJAX debug
//-----------------------------------------
IPSDebug::fireBug( 'info', array( 'Password: ' . $password ) );
//-----------------------------------------
// Check
//-----------------------------------------
if ( ! $password OR ! $password2 )
{
$this->registry->output->showError( $this->lang->words['password_nogood'] );
}
if ( $password != $password2 )
{
$this->registry->output->showError( $this->lang->words['m_passmatch'] );
}
//-----------------------------------------
// Get member
//-----------------------------------------
$member = IPSMember::load( $member_id );
//-----------------------------------------
// Allowed to edit administrators?
//-----------------------------------------
if( $member['g_access_cp'] AND !$this->registry->getClass('class_permissions')->checkPermission( 'member_edit_admin', 'members', 'members' ) )
{
$this->registry->output->showError( $this->lang->words['m_editadmin'] );
}
//-----------------------------------------
// Check Converge: Password
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$han_login = new $classToLoad( $this->registry );
$han_login->init();
$han_login->changePass( $member['email'], $md5_once, $password, $member );
/*if ( $han_login->return_code != 'METHOD_NOT_DEFINED' AND $han_login->return_code != 'SUCCESS' )
{
$this->returnJsonError( $this->lang->words['m_passchange']);
exit();
}*/
//-----------------------------------------
// Local DB
//-----------------------------------------
$update = array();
if( $new_salt )
{
$update['members_pass_salt'] = $salt;
}
if( $new_key )
{
$update['member_login_key'] = $key;
}
if( count($update) )
{
IPSMember::save( $member_id, array( 'core' => $update ) );
}
IPSMember::updatePassword( $member_id, $md5_once );
IPSLib::runMemberSync( 'onPassChange', $member_id, $password );
ipsRegistry::getClass('adminFunctions')->saveAdminLog( sprintf( $this->lang->words['m_passlog'], $member_id ) );
$this->registry->output->global_message = $this->lang->words['pw_updated_success'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . 'module=members&do=viewmember&member_id=' . $member_id );
}
/**
* Update a user's login or display name
*
* @param string Field to update
* @return @e void [Outputs to screen]
*/
protected function save_member_name( $field='members_display_name' )
{
$member_id = intval( $this->request['member_id'] );
$member = IPSMember::load( $member_id );
//-----------------------------------------
// Allowed to edit administrators?
//-----------------------------------------
if( $member['g_access_cp'] AND !$this->registry->getClass('class_permissions')->checkPermission( 'member_edit_admin', 'members', 'members' ) )
{
$this->registry->output->showError( $this->lang->words['m_editadmin'] );
}
if ( $field == 'members_display_name' )
{
$display_name = $this->request['display_name'];
$display_name = str_replace("&#43;", "+", $display_name );
}
else
{
$display_name = $this->request['name'];
$display_name = str_replace("&#43;", "+", $display_name );
$display_name = str_replace( '|', '&#124;' , $display_name );
$display_name = trim( preg_replace( "/\s{2,}/", " ", $display_name ) );
}
if ( $this->settings['strip_space_chr'] )
{
// use hexdec to convert between '0xAD' and chr
$display_name = IPSText::removeControlCharacters( $display_name );
}
if ( $field == 'members_display_name' AND preg_match( "#[\[\];,\|]#", str_replace( '&#39;', "'", str_replace( '&amp;', '&', str_replace( '&quot;', '"', str_replace( '&#33;', '!', $display_name ) ) ) ) ) )
{
$this->registry->output->showError( $this->lang->words['m_displaynames'] );
}
try
{
if ( IPSMember::getFunction()->updateName( $member_id, $display_name, $field, TRUE ) === TRUE )
{
if ( $field == 'members_display_name' )
{
ipsRegistry::getClass('adminFunctions')->saveAdminLog(sprintf( $this->lang->words['m_dnamelog'], $member['members_display_name'], $display_name ));
}
else
{
ipsRegistry::getClass('adminFunctions')->saveAdminLog(sprintf( $this->lang->words['m_namelog'], $member['name'], $display_name ) );
//-----------------------------------------
// If updating a name, and display names
// disabled, update display name too
//-----------------------------------------
if( !ipsRegistry::$settings['auth_allow_dnames'] )
{
IPSMember::getFunction()->updateName( $member_id, $display_name, 'members_display_name', TRUE );
}
//-----------------------------------------
// I say, did we choose to email 'dis member?
//-----------------------------------------
if ( $this->request['send_email'] == 1 )
{
//-----------------------------------------
// By golly, we did!
//-----------------------------------------
$msg = trim( IPSText::stripslashes( nl2br( $_POST['email_contents'] ) ) );
$msg = str_replace( "{old_name}", $member['name'], $msg );
$msg = str_replace( "{new_name}", $display_name , $msg );
$msg = str_replace( "<#BOARD_NAME#>", $this->settings['board_name'], $msg );
$msg = str_replace( "<#BOARD_ADDRESS#>", $this->settings['board_url'] . '/index.' . $this->settings['php_ext'], $msg );
IPSText::getTextClass('email')->message = stripslashes( IPSText::getTextClass('email')->cleanMessage($msg) );
IPSText::getTextClass('email')->subject = $this->lang->words['m_changesubj'];
IPSText::getTextClass('email')->to = $member['email'];
IPSText::getTextClass('email')->sendMail();
}
}
$this->cache->rebuildCache( 'stats', 'global' );
}
else
{
# We should absolutely never get here. So this is a fail-safe, really to
# prevent a "false" positive outcome for the end-user
$this->registry->output->showError( $this->lang->words['m_namealready'] );
}
}
catch( Exception $error )
{
// $this->returnJsonError( $error->getMessage() );
switch( $error->getMessage() )
{
case 'NO_USER':
$this->registry->output->showError( $this->lang->words['m_noid'] );
break;
case 'NO_PERMISSION':
case 'NO_NAME':
$this->registry->output->showError( sprintf($this->lang->words['m_morethan3'], $this->settings['max_user_name_length'] ) );
break;
case 'ILLEGAL_CHARS':
$this->registry->output->showError( $this->lang->words['m_illegal'] );
break;
case 'USER_NAME_EXISTS':
$this->registry->output->showError( $this->lang->words['m_namealready'] );
break;
default:
$this->registry->output->showError( $error->getMessage() );
break;
}
}
//-----------------------------------------
// Load handler...
//-----------------------------------------
if( $field == 'name' )
{
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/handlers/han_login.php', 'han_login' );
$han_login = new $classToLoad( $this->registry );
$han_login->init();
$han_login->changeName( $member['name'], $display_name, $member['email'], $member );
}
else
{
IPSLib::runMemberSync( 'onNameChange', $member_id, $display_name );
}
$this->registry->output->global_message = $this->lang->words[ $field . '_updated_success'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . 'module=members&do=viewmember&member_id=' . $member_id );
}
}
@@ -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,157 +1,157 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Configure default notification options
* 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 Members
* @link http://hatynka.in
* @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_members_members_notifications extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Shortcut for url
*
* @var string URL shortcut
*/
protected $form_code;
/**
* Shortcut for url (javascript)
*
* @var string JS URL shortcut
*/
protected $form_code_js;
/**
* Notifications library
*
* @var object
*/
protected $notifyLibrary;
/**
* 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_notifications' );
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=members&amp;section=notifications';
$this->form_code_js = $this->html->form_code_js = 'module=members&section=notifications';
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ) );
//-----------------------------------------
// Permissions config
//-----------------------------------------
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'configure_notifications' );
//-----------------------------------------
// Notifications library
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' );
$this->notifyLibrary = new $classToLoad( $this->registry );
//-----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
case 'save':
$this->saveDefaults();
break;
default:
case 'show':
$this->showDefaults();
break;
}
//-----------------------------------------
// Pass to CP output hander
//-----------------------------------------
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Show form to configure notification default options
*
* @return @e void
*/
public function showDefaults()
{
$_configOptions = $this->notifyLibrary->getNotificationData();
$_notifyConfig = $this->notifyLibrary->getDefaultNotificationConfig();
$this->registry->output->html .= $this->html->showConfigurationOptions( $_configOptions, $_notifyConfig );
}
/**
* Save default notification configuration
*
* @return @e void
*/
public function saveDefaults()
{
$_configOptions = $this->notifyLibrary->getNotificationData();
$_notifyConfig = $this->notifyLibrary->getDefaultNotificationConfig();
foreach( $_configOptions as $option )
{
$_notifyConfig[ $option['key'] ] = array();
$_notifyConfig[ $option['key'] ]['selected'] = ( is_array($this->request['default_' . $option['key'] ]) AND count($this->request['default_' . $option['key'] ]) ) ? $this->request['default_' . $option['key'] ] : array();
$_notifyConfig[ $option['key'] ]['disabled'] = ( is_array($this->request['disabled_' . $option['key'] ]) AND count($this->request['disabled_' . $option['key'] ]) ) ? $this->request['disabled_' . $option['key'] ] : array();
$_notifyConfig[ $option['key'] ]['disable_override'] = intval($this->request['disable_override_' . $option['key'] ]);
}
$this->notifyLibrary->saveNotificationConfig( $_notifyConfig );
$this->registry->output->global_message = $this->lang->words['notificationconfig_saved'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Configure default notification options
* 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 Members
* @link http://www.invisionpower.com
* @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_members_members_notifications extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Shortcut for url
*
* @var string URL shortcut
*/
protected $form_code;
/**
* Shortcut for url (javascript)
*
* @var string JS URL shortcut
*/
protected $form_code_js;
/**
* Notifications library
*
* @var object
*/
protected $notifyLibrary;
/**
* 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_notifications' );
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=members&amp;section=notifications';
$this->form_code_js = $this->html->form_code_js = 'module=members&section=notifications';
//-----------------------------------------
// Load lang
//-----------------------------------------
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ) );
//-----------------------------------------
// Permissions config
//-----------------------------------------
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'configure_notifications' );
//-----------------------------------------
// Notifications library
//-----------------------------------------
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . '/sources/classes/member/notifications.php', 'notifications' );
$this->notifyLibrary = new $classToLoad( $this->registry );
//-----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
case 'save':
$this->saveDefaults();
break;
default:
case 'show':
$this->showDefaults();
break;
}
//-----------------------------------------
// Pass to CP output hander
//-----------------------------------------
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Show form to configure notification default options
*
* @return @e void
*/
public function showDefaults()
{
$_configOptions = $this->notifyLibrary->getNotificationData();
$_notifyConfig = $this->notifyLibrary->getDefaultNotificationConfig();
$this->registry->output->html .= $this->html->showConfigurationOptions( $_configOptions, $_notifyConfig );
}
/**
* Save default notification configuration
*
* @return @e void
*/
public function saveDefaults()
{
$_configOptions = $this->notifyLibrary->getNotificationData();
$_notifyConfig = $this->notifyLibrary->getDefaultNotificationConfig();
foreach( $_configOptions as $option )
{
$_notifyConfig[ $option['key'] ] = array();
$_notifyConfig[ $option['key'] ]['selected'] = ( is_array($this->request['default_' . $option['key'] ]) AND count($this->request['default_' . $option['key'] ]) ) ? $this->request['default_' . $option['key'] ] : array();
$_notifyConfig[ $option['key'] ]['disabled'] = ( is_array($this->request['disabled_' . $option['key'] ]) AND count($this->request['disabled_' . $option['key'] ]) ) ? $this->request['disabled_' . $option['key'] ] : array();
$_notifyConfig[ $option['key'] ]['disable_override'] = intval($this->request['disable_override_' . $option['key'] ]);
}
$this->notifyLibrary->saveNotificationConfig( $_notifyConfig );
$this->registry->output->global_message = $this->lang->words['notificationconfig_saved'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code );
}
}
@@ -1,314 +1,314 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Member management
* 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 Members
* @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_members_members_ranks extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Shortcut for url
*
* @var string URL shortcut
*/
protected $form_code;
/**
* Shortcut for url (javascript)
*
* @var string JS URL shortcut
*/
protected $form_code_js;
/**
* Main 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_ranks');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=members&amp;section=ranks';
$this->form_code_js = $this->html->form_code_js = 'module=members&section=ranks';
//-----------------------------------------
// Load lang
//-----------------------------------------
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_member' ) );
///-----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'title':
$this->_titlesStart();
break;
case 'rank_edit':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ranks_edit' );
$this->_titlesForm( 'edit' );
break;
case 'rank_add':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ranks_add' );
$this->_titlesForm( 'add' );
break;
case 'do_add_rank':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ranks_add' );
$this->_titlesSave( 'add' );
break;
case 'do_rank_edit':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ranks_edit' );
$this->_titlesSave( 'edit' );
break;
case 'rank_delete':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ranks_delete' );
$this->_titlesDelete();
break;
}
//-----------------------------------------
// Pass to CP output hander
//-----------------------------------------
$this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
$this->registry->getClass('output')->sendOutput();
}
/**
* Recache ranks
*
* @return @e void
*/
public function titlesRecache()
{
$ranks = array();
$this->DB->build( array( 'select' => 'id, title, pips, posts',
'from' => 'titles',
'order' => 'posts DESC',
) );
$this->DB->execute();
while ( $i = $this->DB->fetch() )
{
$ranks[ $i['id'] ] = array(
'TITLE' => $i['title'],
'PIPS' => $i['pips'],
'POSTS' => $i['posts'],
);
}
$this->cache->setCache( 'ranks', $ranks, array( 'array' => 1 ) );
}
/**
* Overview page
*
* @return @e void [Outputs to screen]
*/
protected function _titlesStart()
{
$this->registry->output->extra_nav[] = array( '', $this->lang->words['member_rank_nav'] );
$titles = array();
//-----------------------------------------
// Parse macro
//-----------------------------------------
$row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_replacements', 'where' => "replacement_set_id=0 AND replacement_key='pip_pip'" ) );
$row['A_STAR'] = str_replace( "{style_image_url}", $this->settings['img_url'], $row['replacement_content'] );
//-----------------------------------------
// Lets get on with it...
//-----------------------------------------
$this->DB->build( array( 'select' => '*', 'from' => 'titles', 'order' => "posts" ) );
$this->DB->execute();
while ( $r = $this->DB->fetch() )
{
$r['A_STAR'] = $row['A_STAR'];
$titles[] = $r;
}
$this->registry->output->html .= $this->html->titlesOverview( $titles );
}
/**
* Save rank [add/edit]
*
* @param string 'add' or 'edit'
* @return @e void [Outputs to screen]
*/
protected function _titlesSave( $type = 'add' )
{
//-----------------------------------------
// check for input
//-----------------------------------------
foreach( array( 'title', 'pips' ) as $field )
{
if ( ! isset( $this->request[ $field ] ) )
{
$this->registry->output->showError( $this->lang->words['rnk_completeform'], 11239 );
}
}
if ( $this->request['pips'] > 100 )
{
$this->registry->output->showError( $this->lang->words['rnk_max100'], 11240 );
}
if( $type == 'add' )
{
$this->DB->insert( 'titles', array(
'posts' => intval( trim( $this->request['posts'] ) ),
'title' => trim($this->request['title']),
'pips' => trim($this->request['pips']),
) );
ipsRegistry::getClass('adminFunctions')->saveAdminLog( $this->lang->words['rnk_added'] );
}
else
{
if ( !$this->request['id'] )
{
$this->registry->output->showError( $this->lang->words['rnk_notfound'], 11241 );
}
$this->DB->update( 'titles', array ( 'posts' => trim($this->request['posts']),
'title' => trim($this->request['title']),
'pips' => trim($this->request['pips']),
) , "id=" . intval( $this->request['id'] ) );
ipsRegistry::getClass('adminFunctions')->saveAdminLog( $this->lang->words['rnk_edit'] );
}
$this->titlesRecache();
if( $type == 'add' )
{
$this->registry->output->global_message = $this->lang->words['rnk_added2'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&amp;do=title' );
}
else
{
$this->registry->output->global_message = $this->lang->words['rnk_edited'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&amp;do=title' );
}
}
/**
* Delete a rank
*
* @return @e void [Outputs to screen]
*/
protected function _titlesDelete()
{
//-----------------------------------------
// check for input
//-----------------------------------------
if ( !$this->request['id'] )
{
$this->registry->output->showError( $this->lang->words['rnk_notfounddel'], 11242 );
}
$this->DB->delete( 'titles', "id=" . intval($this->request['id']) );
$this->titlesRecache();
ipsRegistry::getClass('adminFunctions')->saveAdminLog( $this->lang->words['rnk_removed'] );
$this->registry->output->global_message = $this->lang->words['rnk_removed2'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&amp;do=title' );
}
/**
* Show the form to add/edit a rank
*
* @param string Type of form (add|edit)
* @return @e void [Outputs to screen]
*/
protected function _titlesForm( $mode='edit' )
{
$this->registry->output->extra_nav[] = array( '', $this->lang->words['rnk_setup'] );
if ( $mode == 'edit' )
{
$form_code = 'do_rank_edit';
if ( !$this->request['id'] )
{
$this->registry->output->showError( $this->lang->words['rnk_notfound'], 11243 );
}
$rank = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'titles', 'where' => "id=" . intval($this->request['id']) ) );
$button = $this->lang->words['rnk_editrank'];
}
else
{
$form_code = 'do_add_rank';
$rank = array( 'posts' => '', 'title' => "", 'pips' => "");
$button = $this->lang->words['rnk_addrank'];
}
//-----------------------------------------
$this->registry->output->html .= $this->html->titlesForm( $rank, $form_code, $button );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Member management
* 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 Members
* @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_members_members_ranks extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Shortcut for url
*
* @var string URL shortcut
*/
protected $form_code;
/**
* Shortcut for url (javascript)
*
* @var string JS URL shortcut
*/
protected $form_code_js;
/**
* Main 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_ranks');
//-----------------------------------------
// Set up stuff
//-----------------------------------------
$this->form_code = $this->html->form_code = 'module=members&amp;section=ranks';
$this->form_code_js = $this->html->form_code_js = 'module=members&section=ranks';
//-----------------------------------------
// Load lang
//-----------------------------------------
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_member' ) );
///-----------------------------------------
// What to do...
//-----------------------------------------
switch( $this->request['do'] )
{
default:
case 'title':
$this->_titlesStart();
break;
case 'rank_edit':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ranks_edit' );
$this->_titlesForm( 'edit' );
break;
case 'rank_add':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ranks_add' );
$this->_titlesForm( 'add' );
break;
case 'do_add_rank':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ranks_add' );
$this->_titlesSave( 'add' );
break;
case 'do_rank_edit':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ranks_edit' );
$this->_titlesSave( 'edit' );
break;
case 'rank_delete':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'ranks_delete' );
$this->_titlesDelete();
break;
}
//-----------------------------------------
// Pass to CP output hander
//-----------------------------------------
$this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
$this->registry->getClass('output')->sendOutput();
}
/**
* Recache ranks
*
* @return @e void
*/
public function titlesRecache()
{
$ranks = array();
$this->DB->build( array( 'select' => 'id, title, pips, posts',
'from' => 'titles',
'order' => 'posts DESC',
) );
$this->DB->execute();
while ( $i = $this->DB->fetch() )
{
$ranks[ $i['id'] ] = array(
'TITLE' => $i['title'],
'PIPS' => $i['pips'],
'POSTS' => $i['posts'],
);
}
$this->cache->setCache( 'ranks', $ranks, array( 'array' => 1 ) );
}
/**
* Overview page
*
* @return @e void [Outputs to screen]
*/
protected function _titlesStart()
{
$this->registry->output->extra_nav[] = array( '', $this->lang->words['member_rank_nav'] );
$titles = array();
//-----------------------------------------
// Parse macro
//-----------------------------------------
$row = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'skin_replacements', 'where' => "replacement_set_id=0 AND replacement_key='pip_pip'" ) );
$row['A_STAR'] = str_replace( "{style_image_url}", $this->settings['img_url'], $row['replacement_content'] );
//-----------------------------------------
// Lets get on with it...
//-----------------------------------------
$this->DB->build( array( 'select' => '*', 'from' => 'titles', 'order' => "posts" ) );
$this->DB->execute();
while ( $r = $this->DB->fetch() )
{
$r['A_STAR'] = $row['A_STAR'];
$titles[] = $r;
}
$this->registry->output->html .= $this->html->titlesOverview( $titles );
}
/**
* Save rank [add/edit]
*
* @param string 'add' or 'edit'
* @return @e void [Outputs to screen]
*/
protected function _titlesSave( $type = 'add' )
{
//-----------------------------------------
// check for input
//-----------------------------------------
foreach( array( 'title', 'pips' ) as $field )
{
if ( ! isset( $this->request[ $field ] ) )
{
$this->registry->output->showError( $this->lang->words['rnk_completeform'], 11239 );
}
}
if ( $this->request['pips'] > 100 )
{
$this->registry->output->showError( $this->lang->words['rnk_max100'], 11240 );
}
if( $type == 'add' )
{
$this->DB->insert( 'titles', array(
'posts' => intval( trim( $this->request['posts'] ) ),
'title' => trim($this->request['title']),
'pips' => trim($this->request['pips']),
) );
ipsRegistry::getClass('adminFunctions')->saveAdminLog( $this->lang->words['rnk_added'] );
}
else
{
if ( !$this->request['id'] )
{
$this->registry->output->showError( $this->lang->words['rnk_notfound'], 11241 );
}
$this->DB->update( 'titles', array ( 'posts' => trim($this->request['posts']),
'title' => trim($this->request['title']),
'pips' => trim($this->request['pips']),
) , "id=" . intval( $this->request['id'] ) );
ipsRegistry::getClass('adminFunctions')->saveAdminLog( $this->lang->words['rnk_edit'] );
}
$this->titlesRecache();
if( $type == 'add' )
{
$this->registry->output->global_message = $this->lang->words['rnk_added2'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&amp;do=title' );
}
else
{
$this->registry->output->global_message = $this->lang->words['rnk_edited'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&amp;do=title' );
}
}
/**
* Delete a rank
*
* @return @e void [Outputs to screen]
*/
protected function _titlesDelete()
{
//-----------------------------------------
// check for input
//-----------------------------------------
if ( !$this->request['id'] )
{
$this->registry->output->showError( $this->lang->words['rnk_notfounddel'], 11242 );
}
$this->DB->delete( 'titles', "id=" . intval($this->request['id']) );
$this->titlesRecache();
ipsRegistry::getClass('adminFunctions')->saveAdminLog( $this->lang->words['rnk_removed'] );
$this->registry->output->global_message = $this->lang->words['rnk_removed2'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code . '&amp;do=title' );
}
/**
* Show the form to add/edit a rank
*
* @param string Type of form (add|edit)
* @return @e void [Outputs to screen]
*/
protected function _titlesForm( $mode='edit' )
{
$this->registry->output->extra_nav[] = array( '', $this->lang->words['rnk_setup'] );
if ( $mode == 'edit' )
{
$form_code = 'do_rank_edit';
if ( !$this->request['id'] )
{
$this->registry->output->showError( $this->lang->words['rnk_notfound'], 11243 );
}
$rank = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'titles', 'where' => "id=" . intval($this->request['id']) ) );
$button = $this->lang->words['rnk_editrank'];
}
else
{
$form_code = 'do_add_rank';
$rank = array( 'posts' => '', 'title' => "", 'pips' => "");
$button = $this->lang->words['rnk_addrank'];
}
//-----------------------------------------
$this->registry->output->html .= $this->html->titlesForm( $rank, $form_code, $button );
}
}
@@ -1,295 +1,295 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.3
* Reputation System
* 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 Members
* @link http://hatynka.in
* @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_members_members_reputation extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Shortcut for url
*
* @var string URL shortcut
*/
protected $form_code;
/**
* Shortcut for url (javascript)
*
* @var string JS URL shortcut
*/
protected $form_code_js;
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
/* Load Skin & Lang */
$this->html = $this->registry->output->loadTemplate( 'cp_skin_reputation' );
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ) );
/* URL Bits */
$this->form_code = $this->html->form_code = 'module=members&amp;section=reputation';
$this->form_code_js = $this->html->form_code_js = 'module=members&section=reputation';
/* What to do */
switch( $this->request['do'] )
{
case 'add_level_form':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_manage' );
$this->levelForm( 'add' );
break;
case 'do_add_level':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_manage' );
$this->doLevelForm( 'add' );
break;
case 'edit_level_form':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_manage' );
$this->levelForm( 'edit' );
break;
case 'do_edit_level':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_manage' );
$this->doLevelForm( 'edit' );
break;
case 'delete_level':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_delete' );
$this->deleteLevel();
break;
default:
case 'overview':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_manage' );
$this->reputationOverview();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Rebuilds the reputation level cache
*
* @return @e void
*/
public function rebuildReputationLevelCache()
{
/* Cache */
$cache = array();
/* Query the levels */
$this->DB->build( array( 'select' => '*', 'from' => 'reputation_levels', 'order' => 'level_points DESC' ) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
{
$cache[] = $r;
}
/* Update the cache */
$this->cache->setCache( 'reputation_levels', $cache, array( 'array' => 1 ) );
}
/**
* Removes the selected reputation level
*
* @return @e void
*/
public function deleteLevel()
{
/* ID */
$id = intval( $this->request['id'] );
if( ! $id )
{
$this->registry->output->showError( $this->lang->words['invalid_id'], 11244 );
}
/* Delete */
$this->DB->delete( 'reputation_levels', "level_id={$id}" );
$this->rebuildReputationLevelCache();
/* Redirect */
$this->registry->output->global_message = $this->lang->words['rep_level_removed'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code );
}
/**
* Handles the add/edit reputation level form
*
* @param string $mode Either add or edit
* @return @e void
*/
public function doLevelForm( $mode='add' )
{
/* Error Checking */
$errors = array();
if( ! $this->request['level_title'] && ! $this->request['level_image'] )
{
$errors[] = $this->lang->words['rep_no_title_img'];
}
if( count( $errors ) )
{
$this->levelForm( $mode, $errors );
return;
}
/* Build the data array */
$data = array(
'level_title' => $this->request['level_title'],
'level_image' => $this->request['level_image'],
'level_points' => intval( $this->request['level_points'] )
);
/* Add the level */
if( $mode == 'add' )
{
/* Insert */
$this->DB->insert( 'reputation_levels', $data );
$this->rebuildReputationLevelCache();
/* Redirect */
$this->registry->output->global_message = $this->lang->words['rep_level_added'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code );
}
else
{
/* ID Check */
$id = intval( $this->request['id'] );
if( ! $id )
{
$this->registry->output->showError( $this->lang->words['invalid_id'], 11245 );
}
/* Update */
$this->DB->update( 'reputation_levels', $data, "level_id={$id}" );
$this->rebuildReputationLevelCache();
/* Redirect */
$this->registry->output->global_message = $this->lang->words['rep_level_edited'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code );
}
}
/**
* Form for adding/exiting reputation levels
*
* @param string $mode Either add or edit
* @param array $errors Array of error messages to display
* @return @e void
*/
public function levelForm( $mode='add', $errors=array() )
{
/* Add Level Form */
if( $mode == 'add' )
{
/* ID */
$id = 0;
/* Data */
$data = array();
/* Text Bits */
$title = $this->lang->words['rep_form_add_title'];
$do = 'do_add_level';
}
/* Edit Level Form */
else
{
/* ID */
$id = intval( $this->request['id'] );
if( ! $id )
{
$this->registry->output->showError( $this->lang->words['invalid_id'], 11246 );
}
/* Data */
$data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'reputation_levels', 'where' => 'level_id=' . $id ) );
/* Text Bits */
$title = $this->lang->words['rep_form_edit_title'];
$do = 'do_edit_level';
}
/* Default Values */
$data['level_title'] = isset( $this->request['level_title'] ) ? $this->request['level_title'] : $data['level_title'];
$data['level_image'] = isset( $this->request['level_image'] ) ? $this->request['level_image'] : $data['level_image'];
$data['level_points'] = isset( $this->request['level_points'] ) ? $this->request['level_points'] : $data['level_points'];
/* Form Elements */
$form = array();
$form['level_title'] = $this->registry->output->formInput( 'level_title' , $data['level_title'] );
$form['level_image'] = $this->registry->output->formInput( 'level_image' , $data['level_image'] );
$form['level_points'] = $this->registry->output->formInput( 'level_points', $data['level_points'] );
/* Output */
$this->registry->output->html .= $this->html->reputationForm( $id, $do, $title, $form, $errors );
}
/**
* Reputation overview
*
* @return @e void
*/
public function reputationOverview()
{
/* INIT */
$levels = array();
/* Query Levels */
$this->DB->build( array( 'select' => '*', 'from' => 'reputation_levels', 'order' => 'level_points ASC' ) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
{
$r['level_image'] = $r['level_image'] ? "<img src='{$this->settings['public_dir']}style_extra/reputation_icons/{$r['level_image']}'>" : '';
$levels[] = $r;
}
/* Output */
$this->registry->output->html .= $this->html->reputationOverview( $levels );
}
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Reputation System
* 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 Members
* @link http://www.invisionpower.com
* @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_members_members_reputation extends ipsCommand
{
/**
* Skin object
*
* @var object Skin templates
*/
protected $html;
/**
* Shortcut for url
*
* @var string URL shortcut
*/
protected $form_code;
/**
* Shortcut for url (javascript)
*
* @var string JS URL shortcut
*/
protected $form_code_js;
/**
* Main class entry point
*
* @param object ipsRegistry reference
* @return @e void [Outputs to screen]
*/
public function doExecute( ipsRegistry $registry )
{
/* Load Skin & Lang */
$this->html = $this->registry->output->loadTemplate( 'cp_skin_reputation' );
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ) );
/* URL Bits */
$this->form_code = $this->html->form_code = 'module=members&amp;section=reputation';
$this->form_code_js = $this->html->form_code_js = 'module=members&section=reputation';
/* What to do */
switch( $this->request['do'] )
{
case 'add_level_form':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_manage' );
$this->levelForm( 'add' );
break;
case 'do_add_level':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_manage' );
$this->doLevelForm( 'add' );
break;
case 'edit_level_form':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_manage' );
$this->levelForm( 'edit' );
break;
case 'do_edit_level':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_manage' );
$this->doLevelForm( 'edit' );
break;
case 'delete_level':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_delete' );
$this->deleteLevel();
break;
default:
case 'overview':
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reps_manage' );
$this->reputationOverview();
break;
}
/* Output */
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
$this->registry->output->sendOutput();
}
/**
* Rebuilds the reputation level cache
*
* @return @e void
*/
public function rebuildReputationLevelCache()
{
/* Cache */
$cache = array();
/* Query the levels */
$this->DB->build( array( 'select' => '*', 'from' => 'reputation_levels', 'order' => 'level_points DESC' ) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
{
$cache[] = $r;
}
/* Update the cache */
$this->cache->setCache( 'reputation_levels', $cache, array( 'array' => 1 ) );
}
/**
* Removes the selected reputation level
*
* @return @e void
*/
public function deleteLevel()
{
/* ID */
$id = intval( $this->request['id'] );
if( ! $id )
{
$this->registry->output->showError( $this->lang->words['invalid_id'], 11244 );
}
/* Delete */
$this->DB->delete( 'reputation_levels', "level_id={$id}" );
$this->rebuildReputationLevelCache();
/* Redirect */
$this->registry->output->global_message = $this->lang->words['rep_level_removed'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code );
}
/**
* Handles the add/edit reputation level form
*
* @param string $mode Either add or edit
* @return @e void
*/
public function doLevelForm( $mode='add' )
{
/* Error Checking */
$errors = array();
if( ! $this->request['level_title'] && ! $this->request['level_image'] )
{
$errors[] = $this->lang->words['rep_no_title_img'];
}
if( count( $errors ) )
{
$this->levelForm( $mode, $errors );
return;
}
/* Build the data array */
$data = array(
'level_title' => $this->request['level_title'],
'level_image' => $this->request['level_image'],
'level_points' => intval( $this->request['level_points'] )
);
/* Add the level */
if( $mode == 'add' )
{
/* Insert */
$this->DB->insert( 'reputation_levels', $data );
$this->rebuildReputationLevelCache();
/* Redirect */
$this->registry->output->global_message = $this->lang->words['rep_level_added'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code );
}
else
{
/* ID Check */
$id = intval( $this->request['id'] );
if( ! $id )
{
$this->registry->output->showError( $this->lang->words['invalid_id'], 11245 );
}
/* Update */
$this->DB->update( 'reputation_levels', $data, "level_id={$id}" );
$this->rebuildReputationLevelCache();
/* Redirect */
$this->registry->output->global_message = $this->lang->words['rep_level_edited'];
$this->registry->output->silentRedirectWithMessage( $this->settings['base_url'] . $this->form_code );
}
}
/**
* Form for adding/exiting reputation levels
*
* @param string $mode Either add or edit
* @param array $errors Array of error messages to display
* @return @e void
*/
public function levelForm( $mode='add', $errors=array() )
{
/* Add Level Form */
if( $mode == 'add' )
{
/* ID */
$id = 0;
/* Data */
$data = array();
/* Text Bits */
$title = $this->lang->words['rep_form_add_title'];
$do = 'do_add_level';
}
/* Edit Level Form */
else
{
/* ID */
$id = intval( $this->request['id'] );
if( ! $id )
{
$this->registry->output->showError( $this->lang->words['invalid_id'], 11246 );
}
/* Data */
$data = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'reputation_levels', 'where' => 'level_id=' . $id ) );
/* Text Bits */
$title = $this->lang->words['rep_form_edit_title'];
$do = 'do_edit_level';
}
/* Default Values */
$data['level_title'] = isset( $this->request['level_title'] ) ? $this->request['level_title'] : $data['level_title'];
$data['level_image'] = isset( $this->request['level_image'] ) ? $this->request['level_image'] : $data['level_image'];
$data['level_points'] = isset( $this->request['level_points'] ) ? $this->request['level_points'] : $data['level_points'];
/* Form Elements */
$form = array();
$form['level_title'] = $this->registry->output->formInput( 'level_title' , $data['level_title'] );
$form['level_image'] = $this->registry->output->formInput( 'level_image' , $data['level_image'] );
$form['level_points'] = $this->registry->output->formInput( 'level_points', $data['level_points'] );
/* Output */
$this->registry->output->html .= $this->html->reputationForm( $id, $do, $title, $form, $errors );
}
/**
* Reputation overview
*
* @return @e void
*/
public function reputationOverview()
{
/* INIT */
$levels = array();
/* Query Levels */
$this->DB->build( array( 'select' => '*', 'from' => 'reputation_levels', 'order' => 'level_points ASC' ) );
$this->DB->execute();
while( $r = $this->DB->fetch() )
{
$r['level_image'] = $r['level_image'] ? "<img src='{$this->settings['public_dir']}style_extra/reputation_icons/{$r['level_image']}'>" : '';
$levels[] = $r;
}
/* Output */
$this->registry->output->html .= $this->html->reputationOverview( $levels );
}
}
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 Members</title>
<subitems>
<subitem>
<subitemtitle>Управление пользователями</subitemtitle>
<subitemtitle>Manage Members</subitemtitle>
<subitemlang>manage_members</subitemlang>
<subsection>members</subsection>
<subitemurl>do=members_overview</subitemurl>
@@ -16,24 +16,24 @@
</item>
<item>
<title>Звания</title>
<title>Member Ranks</title>
<subitems>
<subitem>
<subitemtitle>Управление званиями пользователей</subitemtitle>
<subitemtitle>Member Ranks</subitemtitle>
<subitemlang>mem_ranks</subitemlang>
<subsection>ranks</subsection>
<subitemurl>do=ranks_overview</subitemurl>
<subitemrolekey>ranks_add</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitem>
</subitems>
</item>
<item>
<title>Репутация</title>
<title>Member Reputation</title>
<subitems>
<subitem>
<subitemtitle>Управление репутацией пользователей</subitemtitle>
<subitemtitle>Member Reputation</subitemtitle>
<subitemlang>mem_rep</subitemlang>
<subsection>reputation</subsection>
<subitemurl>do=overview</subitemurl>
@@ -41,61 +41,61 @@
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</item>
<item>
<title>Дополнительные поля</title>
<title>Member Management Tools</title>
<subitems>
<subitem>
<subitemtitle>Управление дополнительными полями профиля</subitemtitle>
<subitemtitle>Member Management Tools</subitemtitle>
<subitemlang>mem_tools</subitemlang>
<subsection>tools</subsection>
<subitemurl></subitemurl>
<subitemrolekey>membertools_ip</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitem>
</subitems>
</item>
<item>
<title>Добавление пользователя</title>
<title>Add New Member</title>
<subitems>
<subitem>
<subitemtitle>Добавление пользователя</subitemtitle>
<subitemtitle>Add New Member</subitemtitle>
<subitemlang>mem_add</subitemlang>
<subsection>members</subsection>
<subitemurl>do=add</subitemurl>
<subitemrolekey>member_add</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitem>
</subitems>
</item>
</item>
<item>
<title>Бан фильтры</title>
<title>Ban Filters</title>
<subitems>
<subitem>
<subitemtitle>Управление бан фильтрами</subitemtitle>
<subitemtitle>Ban Filters</subitemtitle>
<subitemlang>banfilters</subitemlang>
<subsection>banfilters</subsection>
<subitemurl></subitemurl>
<subitemrolekey>ban_manage</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitem>
</subitems>
</item>
<item>
<title>Настройки уведомлений</title>
<title>Notification Defaults</title>
<subitems>
<subitem>
<subitemtitle>Настройки уведомлений</subitemtitle>
<subitemtitle>Notification Defaults</subitemtitle>
<subitemlang>notifications</subitemlang>
<subsection>notifications</subsection>
<subitemurl></subitemurl>
<subitemrolekey>configure_notifications</subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitem>
</subitems>
</item>
</tabitems>
@@ -1,170 +1,174 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Управление пользователями</grouptitle>
<grouptitle>Managing Members</grouptitle>
<grouplang>members_members</grouplang>
<items>
<item>
<key>member_add</key>
<string>Может добавлять?</string>
<string>Can add members?</string>
</item>
<item>
<key>member_add_admin</key>
<string>Может добавлять администраторов?</string>
<string>Can add ADMINS?</string>
</item>
<item>
<key>member_edit</key>
<string>Может изменять?</string>
<string>Can edit members?</string>
</item>
<item>
<key>member_edit_admin</key>
<string>Может изменять администраторов?</string>
<string>Can edit ADMINS?</string>
</item>
<item>
<key>member_delete</key>
<string>Может удалять?</string>
<string>Can delete members?</string>
</item>
<item>
<key>member_delete_admin</key>
<string>Может удалять администраторов?</string>
<string>Can delete ADMINS?</string>
</item>
<item>
<key>member_login</key>
<string>Can log in as members?</string>
</item>
<item>
<key>members_merge</key>
<string>Может объединять?</string>
<string>Can merge two user accounts?</string>
</item>
<item>
<key>member_suspend</key>
<string>Может блокировать?</string>
<string>Can suspend and unsuspend members?</string>
</item>
<item>
<key>member_suspend_admin</key>
<string>Может блокировать администраторов?</string>
<string>Can suspend and unsuspend ADMINS?</string>
</item>
<item>
<key>member_prune</key>
<string>Может удалять?</string>
<string>Can prune members?</string>
</item>
<item>
<key>member_prune_admin</key>
<string>Может удалять администраторов?</string>
<string>Can prune ADMINS?</string>
</item>
<item>
<key>member_move</key>
<string>Может переносить из группы в группу?</string>
<string>Can bulk move members to other groups? (Does not apply to editing members where the group can still be changed)</string>
</item>
<item>
<key>member_move_admin1</key>
<string>Может переносить администраторов в другие группы?</string>
<string>Can move ADMINS to other groups?</string>
</item>
<item>
<key>member_move_admin2</key>
<string>Может переносить в группу администраторов?</string>
<string>Can promote members to ADMIN?</string>
</item>
<item>
<key>member_ban</key>
<string>Может банить?</string>
<string>Can ban members?</string>
</item>
<item>
<key>member_ban_admin</key>
<string>Может банить администраторов?</string>
<string>Can ban ADMINS?</string>
</item>
<item>
<key>member_photo</key>
<string>Может изменять фотографии пользователям?</string>
<string>Can upload new member photos?</string>
</item>
<item>
<key>member_photo_admin</key>
<string>Может изменять фотографии администраторам?</string>
<string>Can upload new photos for ADMINS?</string>
</item>
<item>
<key>membertools_validating</key>
<string>Может управлять ожидающими активации?</string>
<string>Can manage validating members?</string>
</item>
<item>
<key>membertools_locked</key>
<string>Может управлять заблокированными?</string>
<string>Can manage locked members?</string>
</item>
<item>
<key>membertools_banned</key>
<string>Может управлять забаненными?</string>
<string>Can manage banned members?</string>
</item>
<item>
<key>membertools_spam</key>
<string>Может управлять спам-пользователями?</string>
<string>Can manage spam members?</string>
</item>
<item>
<key>membertools_incomplete</key>
<string>Может управлять не завершившими регистрацию?</string>
<string>Can manage incomplete members?</string>
</item>
<item>
<key>membertools_delete_pms</key>
<string>Может удалять личные сообщения?</string>
<string>Can delete private messages?</string>
</item>
</items>
</group>
<group>
<grouptitle>Инструменты</grouptitle>
<grouptitle>Member Tools</grouptitle>
<grouplang>members_tools</grouplang>
<items>
<item>
<key>membertools_ip</key>
<string>Может использовать инструменты работы с IP-адресами?</string>
<string>Can use the IP address tools?</string>
</item>
</items>
</group>
<group>
<grouptitle>Звания</grouptitle>
<grouptitle>Member Ranks</grouptitle>
<grouplang>members_ranks</grouplang>
<items>
<item>
<key>ranks_add</key>
<string>Может просматривать и добавлять?</string>
<string>Can view and add new member ranks?</string>
</item>
<item>
<key>ranks_edit</key>
<string>Может изменять?</string>
<string>Can edit member ranks?</string>
</item>
<item>
<key>ranks_delete</key>
<string>Может удалять?</string>
<string>Can delete member ranks?</string>
</item>
</items>
</group>
<group>
<grouptitle>Бан-фильтр</grouptitle>
<grouptitle>Managing Ban Filters</grouptitle>
<grouplang>members_banfilters</grouplang>
<items>
<item>
<key>ban_manage</key>
<string>Может управлять фильтром?</string>
<string>Can manage ban filters?</string>
</item>
<item>
<key>ban_remove</key>
<string>Может удалять правила?</string>
<string>Can remove ban filters?</string>
</item>
</items>
</group>
<group>
<grouptitle>Репутация</grouptitle>
<grouptitle>Member Reputation</grouptitle>
<grouplang>members_reputation</grouplang>
<items>
<item>
<key>reps_manage</key>
<string>Может управлять?</string>
<string>Can manage reputation levels?</string>
</item>
<item>
<key>reps_delete</key>
<string>Может удалять уровни репутации?</string>
<string>Can delete reputation levels?</string>
</item>
</items>
</group>
<group>
<grouptitle>Уведомления</grouptitle>
<grouptitle>Notification Defaults</grouptitle>
<grouplang>members_notifications</grouplang>
<items>
<item>
<key>configure_notifications</key>
<string>Может настраивать значения по-умолчанию для уведомлений?</string>
<string>Configure notification defaults?</string>
</item>
</items>
</group>
@@ -3,11 +3,11 @@
* @file defaultSection.php Define the default section for the 'restrictions' 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 -&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 ACP Restrictions</title>
<subitems>
<subitem>
<subitemtitle>Администраторские ограничения</subitemtitle>
<subitemtitle>Manage ACP Restrictions</subitemtitle>
<subitemlang>restrictions</subitemlang>
<subsection>restrictions</subsection>
<subitemurl>do=overview</subitemurl>
@@ -1,32 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Управление ограничениями доступа</grouptitle>
<grouptitle>Manage ACP Restrictions</grouptitle>
<grouplang>members_restrictions</grouplang>
<items>
<item>
<key>restrictions_add_member</key>
<string>Может добавлять ограничения?</string>
<string>Can add member restrictions?</string>
</item>
<item>
<key>restrictions_edit_member</key>
<string>Может изменять ограничения?</string>
<string>Can edit member restrictions?</string>
</item>
<item>
<key>restrictions_delete_member</key>
<string>Может удалять ограничения?</string>
<string>Can remove member restrictions?</string>
</item>
<item>
<key>restrictions_add_group</key>
<string>Может добавлять ограничения для групп?</string>
<string>Can add group restrictions?</string>
</item>
<item>
<key>restrictions_edit_group</key>
<string>Может изменять ограничения для групп?</string>
<string>Can edit group restrictions?</string>
</item>
<item>
<key>restrictions_delete_group</key>
<string>Может удалять ограничения для групп?</string>
<string>Can remove group restrictions?</string>
</item>
</items>
</group>
@@ -0,0 +1,239 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Warning Actions
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $Author: bfarber $ (original: Mark)
* @copyright © 2011 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Members
* @link http://www.invisionpower.com
* @version $Revision: 10914 $
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly.";
exit();
}
class admin_members_warnings_actions extends ipsCommand
{
/**
* Skin object shortcut
*
* @var $html
*/
public $html;
/**
* String for the screen url bit
*
* @var $form_code
*/
public $form_code = '';
/**
* String for the JS url bit
*
* @var $form_code_js
*/
public $form_code_js = '';
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Init
//-----------------------------------------
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'actions_view' );
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_member' ), 'members' );
$this->html = $this->registry->output->loadTemplate( 'cp_skin_warnings_actions' );
$this->form_code = $this->html->form_code = 'module=warnings&amp;section=actions&amp;';
$this->form_code_js = $this->html->form_code_js = 'module=warnings&section=actions&';
//-----------------------------------------
// What are we doing
//-----------------------------------------
switch ( $this->request['do'] )
{
case 'add':
$this->form( 'add' );
break;
case 'edit':
$this->form( 'edit' );
break;
case 'save':
$this->save();
break;
case 'delete':
$this->delete();
break;
case 'do_delete':
$this->do_delete();
break;
case 'reorder':
$this->reorder();
break;
default:
$this->manage();
break;
}
//-----------------------------------------
// Pass to CP output hander
//-----------------------------------------
$this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
$this->registry->getClass('output')->sendOutput();
}
/**
* Action: Manage
*/
private function manage()
{
$actions = array();
$this->DB->build( array( 'select' => '*', 'from' => 'members_warn_actions', 'order' => 'wa_points ASC' ) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$actions[ $row['wa_id'] ] = $row;
}
$this->registry->output->html .= $this->html->manage( $actions );
}
/**
* Action: Show form
*/
private function form( $type )
{
$current = array();
if ( $type == 'edit' )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'actions_edit' );
$id = intval( $this->request['id'] );
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_actions', 'where' => "wa_id={$id}" ) );
if ( !$current['wa_id'] )
{
ipsRegistry::getClass('output')->showError( 'err_no_warn_reason', '112160', FALSE, '', 404 );
}
}
else
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'actions_add' );
}
$this->registry->output->html .= $this->html->form( $current );
}
/**
* Action: Save
*/
private function save()
{
//-----------------------------------------
// Validate Data
//-----------------------------------------
if ( !$this->request['points'] )
{
ipsRegistry::getClass('output')->showError( 'err_warning_action_points', '112161', FALSE, '', 500 );
}
//-----------------------------------------
// Save
//-----------------------------------------
$save = array(
'wa_points' => floatval( $this->request['points'] ),
'wa_mq' => ( $this->request['mq_perm'] ) ? -1 : intval( $this->request['mq'] ),
'wa_mq_unit' => ( $this->request['mq_unit'] == 'd' ) ? 'd' : 'h',
'wa_rpa' => ( $this->request['rpa_perm'] ) ? -1 :intval( $this->request['rpa'] ),
'wa_rpa_unit' => ( $this->request['rpa_unit'] == 'd' ) ? 'd' : 'h',
'wa_suspend' => ( $this->request['suspend_perm'] ) ? -1 :intval( $this->request['suspend'] ),
'wa_suspend_unit' => ( $this->request['suspend_unit'] == 'd' ) ? 'd' : 'h',
'wa_ban_group' => ( intval( $this->request['ban_group'] ) > 0 ) ? intval( $this->request['ban_group_id'] ) : 0,
'wa_override' => intval( $this->request['override'] )
);
if ( $this->request['id'] )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'actions_edit' );
$id = intval( $this->request['id'] );
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_actions', 'where' => "wa_id={$id}" ) );
if ( !$current['wa_id'] )
{
ipsRegistry::getClass('output')->showError( 'err_no_warn_reason', '112162', FALSE, '', 500 );
}
$this->DB->update( 'members_warn_actions', $save, "wa_id={$id}" );
$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['warn_actions_edited'], $save['wa_name'] ) );
}
else
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'actions_add' );
$this->DB->insert( 'members_warn_actions', $save );
$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['warn_actions_created'], $save['wa_name'] ) );
}
//-----------------------------------------
// Display
//-----------------------------------------
$this->registry->output->redirect( "{$this->settings['base_url']}app=members&amp;module=warnings&amp;section=actions", $this->lang->words['warn_actions_saved'] );
}
/**
* Action: Delete
*/
private function delete()
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'actions_delete' );
$id = intval( $this->request['id'] );
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_actions', 'where' => "wa_id={$id}" ) );
if ( !$current['wa_id'] )
{
ipsRegistry::getClass('output')->showError( 'err_no_warn_reason', '112163', FALSE, '', 404 );
}
$new = intval( $this->request['new'] );
$new = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_actions', 'where' => "wa_id={$new}" ) );
if ( !$current['wa_id'] )
{
ipsRegistry::getClass('output')->showError( 'err_no_warn_reason', '112164', FALSE, '', 500 );
}
$this->DB->delete( 'members_warn_actions', "wa_id={$id}" );
$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['warn_actions_deleted'], $current['wa_name'] ) );
$this->registry->output->redirect( "{$this->settings['base_url']}app=members&amp;module=warnings&amp;section=actions", $this->lang->words['warn_actions_del_saved'] );
}
}
@@ -0,0 +1,14 @@
<?php
/**
* @file defaultSection.php Define the default section for the 'warnings' module
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: http://www.invisionpower.com/company/standards.php#license$
* $Author: bfarber $
* @since 07th May 2012
* $LastChangedDate: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* @version v3.3.4
* $Revision: 10914 $
*/
$DEFAULT_SECTION = 'reasons';
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -0,0 +1,274 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.3.4
* Warning Reasons
* Last Updated: $Date: 2012-06-12 10:14:49 -0400 (Tue, 12 Jun 2012) $
* </pre>
*
* @author $Author: bfarber $ (original: Mark)
* @copyright © 2011 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package IP.Board
* @subpackage Members
* @link http://www.invisionpower.com
* @version $Revision: 10914 $
*/
if ( ! defined( 'IN_ACP' ) )
{
print "<h1>Incorrect access</h1>You cannot access this file directly.";
exit();
}
class admin_members_warnings_reasons extends ipsCommand
{
/**
* Skin object shortcut
*
* @var $html
*/
public $html;
/**
* String for the screen url bit
*
* @var $form_code
*/
public $form_code = '';
/**
* String for the JS url bit
*
* @var $form_code_js
*/
public $form_code_js = '';
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function doExecute( ipsRegistry $registry )
{
//-----------------------------------------
// Init
//-----------------------------------------
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reasons_view' );
ipsRegistry::getClass('class_localization')->loadLanguageFile( array( 'admin_member' ), 'members' );
$this->html = $this->registry->output->loadTemplate( 'cp_skin_warnings_reasons' );
$this->form_code = $this->html->form_code = 'module=warnings&amp;section=reasons&amp;';
$this->form_code_js = $this->html->form_code_js = 'module=warnings&section=reasons&';
//-----------------------------------------
// What are we doing
//-----------------------------------------
switch ( $this->request['do'] )
{
case 'add':
$this->form( 'add' );
break;
case 'edit':
$this->form( 'edit' );
break;
case 'save':
$this->save();
break;
case 'delete':
$this->delete();
break;
case 'do_delete':
$this->do_delete();
break;
case 'reorder':
$this->reorder();
break;
default:
$this->manage();
break;
}
//-----------------------------------------
// Pass to CP output hander
//-----------------------------------------
$this->registry->getClass('output')->html_main .= $this->registry->getClass('output')->global_template->global_frame_wrapper();
$this->registry->getClass('output')->sendOutput();
}
/**
* Action: Manage
*/
private function manage()
{
$reasons = array();
$this->DB->build( array( 'select' => '*', 'from' => 'members_warn_reasons', 'order' => 'wr_order' ) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$reasons[ $row['wr_id'] ] = $row;
}
$this->registry->output->html .= $this->html->manage( $reasons );
}
/**
* Action: Show form
*/
private function form( $type )
{
$current = array();
if ( $type == 'edit' )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reasons_edit' );
$id = intval( $this->request['id'] );
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_reasons', 'where' => "wr_id={$id}" ) );
if ( !$current['wr_id'] )
{
ipsRegistry::getClass('output')->showError( 'err_no_warn_reason', '112150', FALSE, '', 404 );
}
}
else
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reasons_add' );
}
$this->registry->output->html .= $this->html->form( $current );
}
/**
* Action: Save
*/
private function save()
{
//-----------------------------------------
// Validate Data
//-----------------------------------------
if ( !$this->request['name'] )
{
ipsRegistry::getClass('output')->showError( 'err_warning_reason_name', '112151', FALSE, '', 500 );
}
//-----------------------------------------
// Save
//-----------------------------------------
$save = array(
'wr_name' => $this->request['name'],
'wr_points' => floatval( $this->request['points'] ),
'wr_points_override' => intval( $this->request['points_override'] ),
'wr_remove' => intval( $this->request['remove'] ),
'wr_remove_unit' => ( $this->request['remove_unit'] == 'd' ) ? 'd' : 'h',
'wr_remove_override' => intval( $this->request['remove_override'] )
);
if ( $this->request['id'] )
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reasons_edit' );
$id = intval( $this->request['id'] );
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_reasons', 'where' => "wr_id={$id}" ) );
if ( !$current['wr_id'] )
{
ipsRegistry::getClass('output')->showError( 'err_no_warn_reason', '112152', FALSE, '', 500 );
}
$this->DB->update( 'members_warn_reasons', $save, "wr_id={$id}" );
$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['warn_reasons_edited'], $save['wr_name'] ) );
}
else
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reasons_add' );
$top = $this->DB->buildAndFetch( array( 'select' => 'MAX(wr_id) as _top', 'from' => 'members_warn_reasons' ) );
$save['wr_order'] = ++$top['_top'];
$this->DB->insert( 'members_warn_reasons', $save );
$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['warn_reasons_created'], $save['wr_name'] ) );
}
//-----------------------------------------
// Display
//-----------------------------------------
$this->registry->output->redirect( "{$this->settings['base_url']}app=members&amp;module=warnings&amp;section=reasons", $this->lang->words['warn_reasons_saved'] );
}
/**
* Action: Delete
*/
private function delete()
{
$this->registry->getClass('class_permissions')->checkPermissionAutoMsg( 'reasons_delete' );
$id = intval( $this->request['id'] );
$current = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_reasons', 'where' => "wr_id={$id}" ) );
if ( !$current['wr_id'] )
{
ipsRegistry::getClass('output')->showError( 'err_no_warn_reason', '112153', FALSE, '', 404 );
}
$new = intval( $this->request['new'] );
$new = $this->DB->buildAndFetch( array( 'select' => '*', 'from' => 'members_warn_reasons', 'where' => "wr_id={$new}" ) );
if ( !$current['wr_id'] )
{
ipsRegistry::getClass('output')->showError( 'err_no_warn_reason', '112154', FALSE, '', 500 );
}
$this->DB->delete( 'members_warn_reasons', "wr_id={$id}" );
$this->registry->adminFunctions->saveAdminLog( sprintf( $this->lang->words['warn_reasons_deleted'], $current['wl_name'] ) );
$this->registry->output->redirect( "{$this->settings['base_url']}app=members&amp;module=warnings&amp;section=reasons", $this->lang->words['warn_reasons_del_saved'] );
}
/**
* AJAX Action: Reorder
*/
private function reorder()
{
/* Get ajax class */
$classToLoad = IPSLib::loadLibrary( IPS_KERNEL_PATH . 'classAjax.php', 'classAjax' );
$ajax = new $classToLoad();
//-----------------------------------------
// Checks...
//-----------------------------------------
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['reasons']) AND count($this->request['reasons']) )
{
foreach( $this->request['reasons'] as $this_id )
{
$this->DB->update( 'members_warn_reasons', array( 'wr_order' => $position ), 'wr_id=' . $this_id );
$position++;
}
}
$ajax->returnString( 'OK' );
}
}
@@ -0,0 +1,10 @@
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -&gt; Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionpower.com/">IP.Board</a>
</body>
</html>
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<tabitems>
<item>
<title>Reasons</title>
<subitems>
<subitem>
<subitemtitle>Reasons</subitemtitle>
<subitemlang>warn_reasons</subitemlang>
<subsection>reasons</subsection>
<subitemurl></subitemurl>
<subitemrolekey></subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
<item>
<title>Actions</title>
<subitems>
<subitem>
<subitemtitle>Actions</subitemtitle>
<subitemlang>warn_actions</subitemlang>
<subsection>actions</subsection>
<subitemurl></subitemurl>
<subitemrolekey></subitemrolekey>
<subisredirect>0</subisredirect>
</subitem>
</subitems>
</item>
</tabitems>
</menu>
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
<group>
<grouptitle>Reasons</grouptitle>
<grouplang>warn_reasons</grouplang>
<items>
<item>
<key>reasons_view</key>
<string>Can view warning reasons?</string>
</item>
<item>
<key>reasons_edit</key>
<string>Can edit warning reasons?</string>
</item>
<item>
<key>reasons_add</key>
<string>Can add new warning reasons?</string>
</item>
<item>
<key>reasons_delete</key>
<string>Can delete warning reasons?</string>
</item>
</items>
</group>
<group>
<grouptitle>Actions</grouptitle>
<grouplang>warn_actions</grouplang>
<items>
<item>
<key>actions_view</key>
<string>Can view warning actions?</string>
</item>
<item>
<key>actions_edit</key>
<string>Can edit warning actions?</string>
</item>
<item>
<key>actions_add</key>
<string>Can add new warning actions?</string>
</item>
<item>
<key>actions_delete</key>
<string>Can delete warning actions?</string>
</item>
</items>
</group>
</permissions>
Loaded 100 of 2206 files, more files were not shown because too many files have changed in this diff. Show more