Version 3.2.3

This commit is contained in:
Neo committed 2025-12-19 00:34:03 -08:00
1 parent ae5c01cc78
commit 78706903a2
2641 files changed
+228363 -201264

No files matched your search

@@ -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,184 @@
<?php
/**
* @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 $
* @since 2/17/2011
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
* @version v3.2.3
* $Revision: 9425 $
*/
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 plugin_members_banned
* @brief Moderator control panel plugin: banned members
*
*/
class plugin_members_banned
{
/**
* 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;
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// Make shortcuts
//-----------------------------------------
$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;
/* Load language strings.. */
$this->lang->loadLanguageFile( array( 'public_list' ), 'members' );
}
/**
* Returns the primary tab key for the navigation bar
*
* @return @e string
*/
public function getPrimaryTab()
{
return 'manage_members';
}
/**
* Returns the secondary tab key for the navigation bar
*
* @return @e string
*/
public function getSecondaryTab()
{
return 'banned';
}
/**
* Determine if we can view tab
*
* @param array $permissions Moderator permissions
* @return @e bool
*/
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'] ) )
{
return true;
}
return false;
}
/**
* Execute plugin
*
* @param array $permissions Moderator permissions
* @return @e string
*/
public function executePlugin( $permissions )
{
//-----------------------------------------
// Check permissions
//-----------------------------------------
if( !$this->canView( $permissions ) )
{
return '';
}
/* Add some CSS */
$this->registry->output->addToDocumentHead( 'importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_mlist.css" );
//-----------------------------------------
// Get 10 banned members
//-----------------------------------------
$members = array();
$_bannedGroup = '';
if( $this->settings['banned_group'] )
{
$_bannedGroup = " OR m.member_group_id=" . $this->settings['banned_group'];
}
$st = intval($this->request['st']);
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "member_banned=1" . str_replace( 'm.', '', $_bannedGroup ) ) );
$this->DB->build( array(
'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'order' => 'm.joined DESC',
'limit' => array( $st, 10 ),
'where' => "m.member_banned=1" . $_bannedGroup,
'add_join' => array(
array(
'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'm.member_id=pp.pp_member_id',
'type' => 'left',
),
),
) );
$outer = $this->DB->execute();
while( $r = $this->DB->fetch($outer) )
{
$r['_language'] = $this->lang->words['modcp_modq_indef'];
$members[] = IPSMember::buildDisplayData( $r );
}
//-----------------------------------------
// Page links
//-----------------------------------------
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['members'],
'itemsPerPage' => 10,
'currentStartValue' => $st,
'baseUrl' => "app=core&amp;module=modcp&amp;fromapp=members&amp;tab=banned",
) );
return $this->registry->output->getTemplate('modcp')->membersList( 'banned', $members, $pages );
}
}
@@ -0,0 +1,356 @@
<?php
/**
* @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!
* $Author: bfarber $
* @since 2/18/2011
* $LastChangedDate: 2011-03-16 21:13:06 -0400 (Wed, 16 Mar 2011) $
* @version v3.2.3
* $Revision: 8110 $
*/
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 plugin_members_iplookup
* @brief Moderator control panel plugin: IP lookup tool
*
*/
class plugin_members_iplookup
{
/**
* 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;
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// Make shortcuts
//-----------------------------------------
$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;
}
/**
* Returns the primary tab key for the navigation bar
*
* @return @e string
*/
public function getPrimaryTab()
{
return 'ip_tools';
}
/**
* Returns the secondary tab key for the navigation bar
*
* @return @e string
*/
public function getSecondaryTab()
{
return 'iplookup';
}
/**
* Determine if we can view tab
*
* @param array $permissions Moderator permissions
* @return @e bool
*/
public function canView( $permissions )
{
if( $this->memberData['g_is_supmod'] )
{
return true;
}
return false;
}
/**
* Execute plugin
*
* @param array $permissions Moderator permissions
* @return @e string
*/
public function executePlugin( $permissions )
{
//-----------------------------------------
// Check permissions
//-----------------------------------------
if( !$this->canView( $permissions ) )
{
return '';
}
//-----------------------------------------
// Check permissions
//-----------------------------------------
if( $this->request['_do'] == 'submit' )
{
return $this->_doLookup();
}
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'] );
}
/**
* Lookup IP address info
*
* @return @e string
*/
protected function _doLookup()
{
//-----------------------------------------
// INIT
//-----------------------------------------
$exactMatch = 1;
$finalIPString = trim( $this->request['ip'] );
$startVal = intval($this->request['st']);
$ipTool = $this->request['iptool'];
//-----------------------------------------
// Remove trailing periods
//-----------------------------------------
if ( strstr( $finalIPString, '*' ) )
{
$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)
//-----------------------------------------
if ( $ipTool == 'resolve' )
{
$resolved = @gethostbyaddr( $finalIPString );
if ( $resolved == "" )
{
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage( $this->lang->words['cp_no_matches'] ) );
}
else
{
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage( sprintf( $this->lang->words['ip_resolve_result'], $finalIPString, $resolved ) ) );
}
}
else if ( $ipTool == 'members' )
{
$sql = $exactMatch ? "ip_address='$finalIPString'" : "ip_address LIKE '$finalIPString'";
if ( !$this->memberData['g_access_cp'] )
{
$sql .= "AND g.g_access_cp != 1";
}
$total_possible = $this->DB->buildAndFetch( array(
'select' => 'count(m.member_id) as max',
'from' => array( 'members' => 'm' ),
'where' => $sql,
'add_join' => array(
array(
'from' => array( 'groups' => 'g' ),
'type' => 'left',
'where' => 'g.g_id=m.member_group_id',
)
)
) );
if ( $total_possible['max'] < 1 )
{
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage( $this->lang->words['cp_no_matches'] ) );
}
$pages = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $total_possible['max'],
'itemsPerPage' => 20,
'currentStartValue' => $startVal,
'baseUrl' => "app=core&amp;module=modcp&amp;tab=iplookup&amp;fromapp=members&amp;_do=submit&amp;iptool=members&amp;ip=" . $this->request['ip'],
) );
$this->DB->build( array(
'select' => 'm.name, m.members_display_name, m.members_seo_name, m.member_id, m.ip_address, m.posts, m.joined, m.member_group_id',
'from' => array( 'members' => 'm' ),
'where' => 'm.' . $sql,
'order' => "m.joined DESC",
'limit' => array( $startVal, 20 ),
'add_join' => array(
array( 'select' => 'g.g_access_cp',
'from' => array( 'groups' => 'g' ),
'type' => 'left',
'where' => 'g.g_id=m.member_group_id',
)
)
) );
$this->DB->execute();
while( $row = $this->DB->fetch() )
{
$row['joined'] = $this->registry->getClass( 'class_localization')->getDate( $row['joined'], 'JOINED' );
$row['groupname'] = IPSMember::makeNameFormatted( $this->caches['group_cache'][ $row['member_group_id'] ]['g_title'], $row['member_group_id'] );
$members[ $row['member_id'] ] = $row;
}
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->membersModIPFormMembers( $pages, $members ) );
}
else
{
$sql = $exactMatch ? "p.ip_address LIKE '$finalIPString'" : "p.ip_address='$finalIPString'";
//-----------------------------------------
// Get forums we can view
//-----------------------------------------
$aforum = $this->registry->getClass('class_forums')->fetchSearchableForumIds();
if ( count($aforum) < 1)
{
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage( $this->lang->words['cp_no_matches'] ) );
}
$the_forums = implode( ",", $aforum );
$count = $this->DB->buildAndFetch( array(
'select' => 'COUNT(*) as total',
'from' => array( 'posts' => 'p' ),
'where' => "t.forum_id IN({$the_forums}) AND {$sql}",
'add_join' => array(
array(
'from' => array( 'topics' => 't' ),
'where' => 't.tid=p.topic_id',
'type' => 'left'
),
)
) );
//-----------------------------------------
// Do we have any results?
//-----------------------------------------
if ( !$count['total'] )
{
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->inlineModIPMessage( $this->lang->words['cp_no_matches'] ) );
}
//-----------------------------------------
// Pages
//-----------------------------------------
$pageLinks = $this->registry->getClass('output')->generatePagination( array( 'totalItems' => $count['total'],
'itemsPerPage' => 10,
'currentStartValue' => $startVal,
'baseUrl' => "app=core&amp;module=modcp&amp;tab=iplookup&amp;fromapp=members&amp;_do=submit&amp;iptool=posts&amp;ip=" . $this->request['ip'],
) );
$results = array();
$this->DB->build( array(
'select' => 'p.*',
'from' => array( 'posts' => 'p' ),
'where' => "t.forum_id IN({$the_forums}) AND {$sql}",
'limit' => array( $startVal, 10 ),
'order' => 'p.pid DESC',
'add_join' => array(
array(
'select' => 't.forum_id',
'from' => array( 'topics' => 't' ),
'where' => 't.tid=p.topic_id',
'type' => 'left'
),
array(
'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=p.author_id',
'type' => 'left'
),
array(
'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'pp.pp_member_id=m.member_id',
'type' => 'left'
),
array(
'select' => 'pf.*',
'from' => array( 'pfields_content' => 'pf' ),
'where' => 'pf.member_id=m.member_id',
'type' => 'left'
),
)
) );
$outer = $this->DB->execute();
while ( $row = $this->DB->fetch($outer) )
{
//-----------------------------------------
// Parse the member
//-----------------------------------------
$row = IPSMember::buildDisplayData( $row, array( 'customFields' => 1, 'signature' => 1, 'warn' => 1 ) );
//-----------------------------------------
// Parse the post
//-----------------------------------------
IPSText::getTextClass( 'bbcode' )->parse_smilies = $row['use_emo'];
IPSText::getTextClass( 'bbcode' )->parse_html = ( $this->registry->class_forums->allForums[ $row['forum_id'] ]['use_html'] and $this->caches['group_cache'][ $row['member_group_id'] ]['g_dohtml'] and $row['post_htmlstate'] ) ? 1 : 0;
IPSText::getTextClass( 'bbcode' )->parse_nl2br = $row['post_htmlstate'] == 2 ? 1 : 0;
IPSText::getTextClass( 'bbcode' )->parse_bbcode = $this->registry->class_forums->allForums[ $row['forum_id'] ]['use_ibc'];
IPSText::getTextClass( 'bbcode' )->parsing_section = 'topics';
IPSText::getTextClass( 'bbcode' )->parsing_mgroup = $row['member_group_id'];
IPSText::getTextClass( 'bbcode' )->parsing_mgroup_others = $row['mgroup_others'];
$row['post'] = IPSText::getTextClass( 'bbcode' )->preDisplayParse( $row['post'] );
$results[] = $row;
}
return $this->registry->getClass('output')->getTemplate('modcp')->membersModIPForm( $this->request['ip'], $this->registry->getClass('output')->getTemplate('modcp')->membersModIPFormPosts( $count['total'], $pageLinks, $results ) );
}
}
}
@@ -0,0 +1,192 @@
<?php
/**
* @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 $
* @since 2/17/2011
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
* @version v3.2.3
* $Revision: 9425 $
*/
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 plugin_members_modposts
* @brief Moderator control panel plugin: show members on mod queue
*
*/
class plugin_members_modposts
{
/**
* 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;
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// Make shortcuts
//-----------------------------------------
$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;
/* Load language strings.. */
$this->registry->class_localization->loadLanguageFile( array( 'public_list' ), 'members' );
}
/**
* Returns the primary tab key for the navigation bar
*
* @return @e string
*/
public function getPrimaryTab()
{
return 'manage_members';
}
/**
* Returns the secondary tab key for the navigation bar
*
* @return @e string
*/
public function getSecondaryTab()
{
return 'modposts';
}
/**
* Determine if we can view tab
*
* @param array $permissions Moderator permissions
* @return @e bool
*/
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'] ) )
{
return true;
}
return false;
}
/**
* Execute plugin
*
* @param array $permissions Moderator permissions
* @return @e string
*/
public function executePlugin( $permissions )
{
//-----------------------------------------
// Check permissions
//-----------------------------------------
if( !$this->canView( $permissions ) )
{
return '';
}
/* Add some additional CSS */
$this->registry->output->addToDocumentHead( 'importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_mlist.css" );
//-----------------------------------------
// Get 10 members on mod queue
//-----------------------------------------
$st = intval($this->request['st']);
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "mod_posts!=0 AND mod_posts!='' AND mod_posts " . $this->DB->buildIsNull( false ) ) );
$members = array();
$this->DB->build( array(
'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'order' => 'm.joined DESC',
'limit' => array( $st, 10 ),
'where' => "m.mod_posts!=0 AND m.mod_posts!='' AND m.mod_posts " . $this->DB->buildIsNull( false ),
'add_join' => array(
array(
'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'm.member_id=pp.pp_member_id',
'type' => 'left',
),
),
) );
$outer = $this->DB->execute();
while( $r = $this->DB->fetch($outer) )
{
$mod_arr = IPSMember::processBanEntry( $r['mod_posts'] );
if( $mod_arr['date_end'] AND $mod_arr['date_end'] < time() )
{
IPSMember::save( $r['member_id'], array( 'core' => array( 'mod_posts' => 0 ) ) );
continue;
}
if( $mod_arr['date_start'] == 1 )
{
$r['_language'] = $this->lang->words['modcp_modq_indef'];
}
else
{
$r['_language'] = $this->registry->getClass('class_localization')->getDate( $mod_arr['date_end'], 'SHORT' );
}
$members[] = IPSMember::buildDisplayData( $r );
}
//-----------------------------------------
// Page links
//-----------------------------------------
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['members'],
'itemsPerPage' => 10,
'currentStartValue' => $st,
'baseUrl' => "app=core&amp;module=modcp&amp;fromapp=members&amp;tab=modposts",
) );
return $this->registry->output->getTemplate('modcp')->membersList( 'modposts', $members, $pages );
}
}
@@ -0,0 +1,192 @@
<?php
/**
* @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 $
* @since 2/17/2011
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
* @version v3.2.3
* $Revision: 9425 $
*/
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 plugin_members_restrictposts
* @brief Moderator control panel plugin: show members with post restriction
*
*/
class plugin_members_restrictposts
{
/**
* 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;
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// Make shortcuts
//-----------------------------------------
$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;
/* Load language strings.. */
$this->lang->loadLanguageFile( array( 'public_list' ), 'members' );
}
/**
* Returns the primary tab key for the navigation bar
*
* @return @e string
*/
public function getPrimaryTab()
{
return 'manage_members';
}
/**
* Returns the secondary tab key for the navigation bar
*
* @return @e string
*/
public function getSecondaryTab()
{
return 'restrictposts';
}
/**
* Determine if we can view tab
*
* @param array $permissions Moderator permissions
* @return @e bool
*/
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'] ) )
{
return true;
}
return false;
}
/**
* Execute plugin
*
* @param array $permissions Moderator permissions
* @return @e string
*/
public function executePlugin( $permissions )
{
//-----------------------------------------
// Check permissions
//-----------------------------------------
if( !$this->canView( $permissions ) )
{
return '';
}
/* Add some CSS.. */
$this->registry->output->addToDocumentHead( 'importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_mlist.css" );
//-----------------------------------------
// Get 10 members on mod queue
//-----------------------------------------
$st = intval($this->request['st']);
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "restrict_post!=0 AND restrict_post!='' AND restrict_post " . $this->DB->buildIsNull( false ) ) );
$members = array();
$this->DB->build( array(
'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'order' => 'm.joined DESC',
'limit' => array( $st, 10 ),
'where' => "m.restrict_post!=0 AND m.restrict_post!='' AND m.restrict_post " . $this->DB->buildIsNull( false ),
'add_join' => array(
array(
'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'm.member_id=pp.pp_member_id',
'type' => 'left',
),
),
) );
$outer = $this->DB->execute();
while( $r = $this->DB->fetch($outer) )
{
$mod_arr = IPSMember::processBanEntry( $r['restrict_post'] );
if( $mod_arr['date_end'] AND $mod_arr['date_end'] < time() )
{
IPSMember::save( $r['member_id'], array( 'core' => array( 'restrict_post' => 0 ) ) );
continue;
}
if( $mod_arr['date_start'] == 1 )
{
$r['_language'] = $this->lang->words['modcp_modq_indef'];
}
else
{
$r['_language'] = $this->registry->getClass('class_localization')->getDate( $mod_arr['date_end'], 'SHORT' );
}
$members[] = IPSMember::buildDisplayData( $r );
}
//-----------------------------------------
// Page links
//-----------------------------------------
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['members'],
'itemsPerPage' => 10,
'currentStartValue' => $st,
'baseUrl' => "app=core&amp;module=modcp&amp;fromapp=members&amp;tab=restrictposts",
) );
return $this->registry->output->getTemplate('modcp')->membersList( 'restrictposts', $members, $pages );
}
}
@@ -0,0 +1,192 @@
<?php
/**
* @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 $
* @since 2/17/2011
* $LastChangedDate: 2011-08-29 22:12:22 -0400 (Mon, 29 Aug 2011) $
* @version v3.2.3
* $Revision: 9425 $
*/
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 plugin_members_suspended
* @brief Moderator control panel plugin: temporarily suspended members
*
*/
class plugin_members_suspended
{
/**
* 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;
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// Make shortcuts
//-----------------------------------------
$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;
/* Load language strings.. */
$this->lang->loadLanguageFile( array( 'public_list' ), 'members' );
}
/**
* Returns the primary tab key for the navigation bar
*
* @return @e string
*/
public function getPrimaryTab()
{
return 'manage_members';
}
/**
* Returns the secondary tab key for the navigation bar
*
* @return @e string
*/
public function getSecondaryTab()
{
return 'suspended';
}
/**
* Determine if we can view tab
*
* @param array $permissions Moderator permissions
* @return @e bool
*/
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'] ) )
{
return true;
}
return false;
}
/**
* Execute plugin
*
* @param array $permissions Moderator permissions
* @return @e string
*/
public function executePlugin( $permissions )
{
//-----------------------------------------
// Check permissions
//-----------------------------------------
if( !$this->canView( $permissions ) )
{
return '';
}
/* Add some CSS.. */
$this->registry->output->addToDocumentHead( 'importcss', "{$this->settings['css_base_url']}style_css/{$this->registry->output->skin['_csscacheid']}/ipb_mlist.css" );
//-----------------------------------------
// Get 10 members on suspension
//-----------------------------------------
$st = intval($this->request['st']);
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as members', 'from' => 'members', 'where' => "temp_ban!=0 AND temp_ban!='' AND temp_ban " . $this->DB->buildIsNull( false ) ) );
$members = array();
$this->DB->build( array(
'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'order' => 'm.joined DESC',
'limit' => array( $st, 10 ),
'where' => "m.temp_ban!=0 AND m.temp_ban!='' AND m.temp_ban " . $this->DB->buildIsNull( false ),
'add_join' => array(
array(
'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'm.member_id=pp.pp_member_id',
'type' => 'left',
),
),
) );
$outer = $this->DB->execute();
while( $r = $this->DB->fetch($outer) )
{
$mod_arr = IPSMember::processBanEntry( $r['temp_ban'] );
if( $mod_arr['date_end'] AND $mod_arr['date_end'] < time() )
{
IPSMember::save( $r['member_id'], array( 'core' => array( 'temp_ban' => 0 ) ) );
continue;
}
if( $mod_arr['date_start'] == 1 )
{
$r['_language'] = $this->lang->words['modcp_modq_indef'];
}
else
{
$r['_language'] = $this->registry->getClass('class_localization')->getDate( $mod_arr['date_end'], 'SHORT' );
}
$members[] = IPSMember::buildDisplayData( $r );
}
//-----------------------------------------
// Page links
//-----------------------------------------
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['members'],
'itemsPerPage' => 10,
'currentStartValue' => $st,
'baseUrl' => "app=core&amp;module=modcp&amp;fromapp=members&amp;tab=suspended",
) );
return $this->registry->output->getTemplate('modcp')->membersList( 'suspended', $members, $pages );
}
}
@@ -0,0 +1,210 @@
<?php
/**
* @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!
* $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 $
*/
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 plugin_members_warn
* @brief Moderator control panel plugin: show latest warnings
*
*/
class plugin_members_warn
{
/**
* 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;
/**
* Main function executed automatically by the controller
*
* @param object $registry Registry object
* @return @e void
*/
public function __construct( ipsRegistry $registry )
{
//-----------------------------------------
// Make shortcuts
//-----------------------------------------
$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;
}
/**
* Returns the primary tab key for the navigation bar
*
* @return @e string
*/
public function getPrimaryTab()
{
return 'manage_members';
}
/**
* Returns the secondary tab key for the navigation bar
*
* @return @e string
*/
public function getSecondaryTab()
{
return 'warn';
}
/**
* Determine if we can view tab
*
* @param array $permissions Moderator permissions
* @return @e bool
*/
public function canView( $permissions )
{
if( $this->memberData['g_is_supmod'] OR ( $this->memberData['is_mod'] AND $permissions['allow_warn'] ) )
{
return true;
}
return false;
}
/**
* Execute plugin
*
* @param array $permissions Moderator permissions
* @return @e string
*/
public function executePlugin( $permissions )
{
//-----------------------------------------
// Check permissions
//-----------------------------------------
if( !$this->canView( $permissions ) )
{
return '';
}
//-----------------------------------------
// Get last 10 warnings
//-----------------------------------------
$st = intval($this->request['st']);
$total = $this->DB->buildAndFetch( array( 'select' => 'count(*) as warns', 'from' => 'warn_logs' ) );
$warnings = array();
$this->DB->build( array(
'select' => 'w.*',
'from' => array( 'warn_logs' => 'w' ),
'order' => 'w.wlog_date DESC',
'limit' => array( $st, 10 ),
'add_join' => array(
array(
'select' => 'm.*',
'from' => array( 'members' => 'm' ),
'where' => 'm.member_id=w.wlog_mid',
'type' => 'left',
),
array(
'select' => 'pp.*',
'from' => array( 'profile_portal' => 'pp' ),
'where' => 'm.member_id=pp.pp_member_id',
'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',
'from' => array( 'members' => 'mm' ),
'where' => 'mm.member_id=w.wlog_addedby',
'type' => 'left',
),
array(
'select' => 'ppp.pp_main_photo as punisher_check, ppp.pp_thumb_photo as punisher_photo, ppp.pp_thumb_width as punisher_width, ppp.pp_thumb_height as punisher_height',
'from' => array( 'profile_portal' => 'ppp' ),
'where' => 'mm.member_id=ppp.pp_member_id',
'type' => 'left',
),
),
) );
$outer = $this->DB->execute();
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'];
}
}
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 );
}
//-----------------------------------------
// Page links
//-----------------------------------------
$pages = $this->registry->output->generatePagination( array( 'totalItems' => $total['warns'],
'itemsPerPage' => 10,
'currentStartValue' => $st,
'baseUrl' => "app=core&amp;module=modcp&amp;fromapp=members&amp;tab=warn",
) );
return $this->registry->output->getTemplate('modcp')->latestWarnLogs( $warnings, $pages );
}
}