Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,129 +1,131 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Member form manipulation
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 4948 $
|
||||
*
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @access public
|
||||
* @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' => '' );
|
||||
*
|
||||
* @access public
|
||||
* @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&module=members&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&module=members&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&module=members&do=unsuspend',
|
||||
'title' => ipsRegistry::getClass('class_localization')->words['form_unsuspendmem'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$array[] = array( 'img' => '',
|
||||
'url' => 'section=members&module=members&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&module=members&do=merge',
|
||||
'title' => ipsRegistry::getClass('class_localization')->words['form_mergemember'] );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns content for the page.
|
||||
*
|
||||
* @access public
|
||||
* @author Matt Mecham
|
||||
* @param array Member data
|
||||
* @return array Array of tabs, content
|
||||
*/
|
||||
public function getDisplayContent( $member=array() )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Process the entries for saving and return
|
||||
*
|
||||
* @access public
|
||||
* @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.1.4
|
||||
* Member form manipulation
|
||||
* Last Updated: $Date: 2010-01-15 14:28:09 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 5715 $
|
||||
*
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @access public
|
||||
* @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' => '' );
|
||||
*
|
||||
* @access public
|
||||
* @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&module=members&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&module=members&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&module=members&do=unsuspend',
|
||||
'title' => ipsRegistry::getClass('class_localization')->words['form_unsuspendmem'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$array[] = array( 'img' => '',
|
||||
'url' => 'section=members&module=members&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&module=members&do=merge',
|
||||
'title' => ipsRegistry::getClass('class_localization')->words['form_mergemember'] );
|
||||
}
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns content for the page.
|
||||
*
|
||||
* @access public
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @author Brandon Farber
|
||||
* @return array Multi-dimensional array (core, extendedProfile) for saving
|
||||
*/
|
||||
public function getForSave()
|
||||
{
|
||||
return array( 'core' => array(), 'extendedProfile' => array() );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,550 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* IP.Board messenger attachments plugin
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 5713 $
|
||||
*/
|
||||
|
||||
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 plugin_msg extends class_attach
|
||||
{
|
||||
/**
|
||||
* Module type
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $module = 'msg';
|
||||
|
||||
/**
|
||||
* Checks the attachment and checks for download / show perms
|
||||
*
|
||||
* @access public
|
||||
* @param integer Attachment id
|
||||
* @return array Attachment data
|
||||
*/
|
||||
public function getAttachmentData( $attach_id )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$_ok = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab 'em
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'a.*',
|
||||
'from' => array( 'attachments' => 'a' ),
|
||||
'where' => "a.attach_rel_module='".$this->module."' AND a.attach_id=".$attach_id,
|
||||
'add_join' => array( 0 => array( 'select' => 'p.*',
|
||||
'from' => array( 'message_posts' => 'p' ),
|
||||
'where' => "p.msg_id=a.attach_rel_id",
|
||||
'type' => 'left' ),
|
||||
1 => array( 'select' => 't.*',
|
||||
'from' => array( 'message_topics' => 't' ),
|
||||
'where' => "t.mt_id=p.msg_topic_id",
|
||||
'type' => 'left' ),
|
||||
2 => array( 'select' => 'u.*',
|
||||
'from' => array( 'message_topic_user_map' => 'u' ),
|
||||
'where' => "u.map_topic_id=t.mt_id AND u.map_user_id=" . $this->memberData['member_id'],
|
||||
'type' => 'left' ) ) ) );
|
||||
|
||||
$attach_sql = $this->DB->execute();
|
||||
|
||||
$attach = $this->DB->fetch( $attach_sql );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check..
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! isset( $attach['msg_id'] ) OR empty( $attach['msg_id'] ) )
|
||||
{
|
||||
if( $attach['attach_member_id'] != $this->memberData['member_id'] )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// For previews
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $attach['attach_rel_id'] == 0 AND $attach['attach_member_id'] == $this->memberData['member_id'] )
|
||||
{
|
||||
$_ok = 1;
|
||||
}
|
||||
else if ( $attach['map_user_id'] )
|
||||
{
|
||||
$_ok = 1;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Ok?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $_ok )
|
||||
{
|
||||
return $attach;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the attachment and make sure its OK to display
|
||||
*
|
||||
* @access public
|
||||
* @param array Array of ids
|
||||
* @param array Array of relationship ids
|
||||
* @return array Attachment data
|
||||
*/
|
||||
public function renderAttachment( $attach_ids, $rel_ids=array(), $attach_post_key=0 )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$rows = array();
|
||||
$query_bits = array();
|
||||
$query = '';
|
||||
$match = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_array( $attach_ids ) AND count( $attach_ids ) )
|
||||
{
|
||||
$query_bits[] = "attach_id IN (" . implode( ",", $attach_ids ) .")";
|
||||
}
|
||||
|
||||
if ( is_array( $rel_ids ) and count( $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 ) )
|
||||
{
|
||||
$_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;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Return
|
||||
//-----------------------------------------
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Recounts number of attachments for the articles row
|
||||
*
|
||||
* @access public
|
||||
* @param string Post key
|
||||
* @param integer Related ID
|
||||
* @param array Arguments for query
|
||||
* @return array Returns count of items found
|
||||
*/
|
||||
public function postUploadProcess( $post_key, $rel_id, $args=array() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$cnt = array( 'cnt' => 0 );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check..
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $post_key )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
$cnt = $this->DB->buildAndFetch( array( "select" => 'COUNT(*) as cnt',
|
||||
'from' => 'attachments',
|
||||
'where' => "attach_post_key='{$post_key}'") );
|
||||
|
||||
/*if ( $cnt['cnt'] )
|
||||
{
|
||||
$this->DB->update( 'message_topics', "mt_hasattach=mt_hasattach+" . $cnt['cnt'], "mt_id=" . intval( $args['mt_id'] ), FALSE, TRUE );
|
||||
}*/
|
||||
|
||||
return array( 'count' => $cnt['cnt'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Recounts number of attachments for the articles row
|
||||
*
|
||||
* @access public
|
||||
* @param array Attachment data
|
||||
* @return boolean
|
||||
*/
|
||||
public function attachmentRemovalCleanup( $attachment )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $attachment['attach_id'] )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
$message = $this->DB->buildAndFetch( array( 'select' => '*',
|
||||
'from' => 'message_posts',
|
||||
'where' => 'msg_id=' . intval( $attachment['attach_rel_id'] ) ) );
|
||||
|
||||
if ( isset( $message['msg_topic_id'] ) )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// GET ALL MSG IDS IN THIS TOPIC
|
||||
//-----------------------------------------
|
||||
|
||||
$pids = array();
|
||||
$count = 0;
|
||||
|
||||
$this->DB->build( array( 'select' => 'msg_id',
|
||||
'from' => 'message_posts',
|
||||
'where' => "msg_topic_id=". $message['msg_topic_id'] ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while ( $p = $this->DB->fetch() )
|
||||
{
|
||||
$pids[] = $p['msg_id'];
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// GET ATTACHMENT COUNT
|
||||
//-----------------------------------------
|
||||
|
||||
if ( count( $pids ) )
|
||||
{
|
||||
$this->DB->build( array( "select" => 'count(*) as cnt',
|
||||
'from' => 'attachments',
|
||||
'where' => "attach_rel_module='msg' AND attach_rel_id IN(".implode(",",$pids).")") );
|
||||
$this->DB->execute();
|
||||
|
||||
$cnt = $this->DB->fetch();
|
||||
|
||||
$count = intval( $cnt['cnt'] );
|
||||
}
|
||||
|
||||
$this->DB->update( 'message_topics', array( 'mt_hasattach' => $count ), "mt_id=" . $message['msg_topic_id'] );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if you have permission for bulk attachment removal
|
||||
* Returns TRUE or FALSE
|
||||
* IT really does
|
||||
*
|
||||
* @access public
|
||||
* @param array Ids to check against
|
||||
* @return boolean
|
||||
*/
|
||||
public function canBulkRemove( $attach_rel_ids=array() )
|
||||
{
|
||||
return $this->memberData['g_is_supmod'] ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if you can remove this attachment
|
||||
* Returns TRUE or FALSE
|
||||
* IT really does
|
||||
*
|
||||
* @access public
|
||||
* @param array Attachment data
|
||||
* @return boolean
|
||||
*/
|
||||
public function canRemove( $attachment )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$ok_to_remove = FALSE;
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $attachment['attach_id'] )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Allowed to remove?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->memberData['member_id'] == $attachment['attach_member_id'] )
|
||||
{
|
||||
$ok_to_remove = TRUE;
|
||||
}
|
||||
else if ( $this->memberData['g_is_supmod'] )
|
||||
{
|
||||
$ok_to_remove = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = $this->DB->buildAndFetch( array( 'select' => '*',
|
||||
'from' => 'message_posts',
|
||||
'where' => 'msg_id=' . intval( $attachment['attach_rel_id'] ) ) );
|
||||
|
||||
if ( $this->memberData['member_id'] == $message['msg_author_id'] )
|
||||
{
|
||||
$ok_to_remove = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return $ok_to_remove;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of the allowed upload sizes in bytes.
|
||||
* Return 'space_allowed' as -1 to not allow uploads.
|
||||
* Return 'space_allowed' as 0 to allow unlimited uploads
|
||||
* Return 'max_single_upload' as 0 to not set a limit
|
||||
*
|
||||
* @access public
|
||||
* @param string MD5 post key
|
||||
* @param id Member ID
|
||||
* @return array [ 'space_used', 'space_left', 'space_allowed', 'max_single_upload' ]
|
||||
*/
|
||||
public function getSpaceAllowance( $post_key='', $member_id='' )
|
||||
{
|
||||
$max_php_size = intval( IPSLib::getMaxPostSize() );
|
||||
$member_id = intval( $member_id ? $member_id : $this->memberData['member_id'] );
|
||||
$space_left = 0;
|
||||
$space_used = 0;
|
||||
$space_allowed = 0;
|
||||
$max_single_upload = 0;
|
||||
|
||||
//-----------------------------------------
|
||||
// Allowed to attach?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member_id )
|
||||
{
|
||||
$space_allowed = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Generate total space allowed
|
||||
//-----------------------------------------
|
||||
|
||||
$total_space_allowed = ( $this->memberData['g_attach_per_post'] ? $this->memberData['g_attach_per_post'] : $this->memberData['g_attach_max'] ) * 1024;
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate space used figure
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->memberData['g_attach_per_post'] )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Per post limit...
|
||||
//-----------------------------------------
|
||||
|
||||
$_space_used = $this->DB->buildAndFetch( array( 'select' => 'SUM(attach_filesize) as figure',
|
||||
'from' => 'attachments',
|
||||
'where' => "attach_post_key='".$post_key."'" ) );
|
||||
|
||||
$space_used = intval( $_space_used['figure'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Global limit...
|
||||
//-----------------------------------------
|
||||
|
||||
$_space_used = $this->DB->buildAndFetch( array( 'select' => 'SUM(attach_filesize) as figure',
|
||||
'from' => 'attachments',
|
||||
'where' => 'attach_member_id='.$member_id . " AND attach_rel_module IN( 'post', 'msg' )" ) );
|
||||
|
||||
$space_used = intval( $_space_used['figure'] );
|
||||
}
|
||||
//-----------------------------------------
|
||||
// Generate space allowed figure
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->memberData['g_attach_max'] > 0 )
|
||||
{
|
||||
if ( $this->memberData['g_attach_per_post'] )
|
||||
{
|
||||
$_g_space_used = $this->DB->buildAndFetch( array( 'select' => 'SUM(attach_filesize) as figure',
|
||||
'from' => 'attachments',
|
||||
'where' => 'attach_member_id='.$member_id . " AND attach_rel_module IN( 'post', 'msg' )" ) );
|
||||
|
||||
$g_space_used = intval( $_g_space_used['figure'] );
|
||||
|
||||
if( intval( ( $this->memberData['g_attach_max'] * 1024 ) - $g_space_used ) < 0 )
|
||||
{
|
||||
$space_used = $g_space_used;
|
||||
$total_space_allowed = $this->memberData['g_attach_max'] * 1024;
|
||||
|
||||
$space_allowed = ( $this->memberData['g_attach_max'] * 1024 ) - $space_used;
|
||||
$space_allowed = $space_allowed < 0 ? -1 : $space_allowed;
|
||||
}
|
||||
else
|
||||
{
|
||||
$space_allowed = ( $this->memberData['g_attach_per_post'] * 1024 ) - $space_used;
|
||||
$space_allowed = $space_allowed < 0 ? -1 : $space_allowed;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$space_allowed = ( $this->memberData['g_attach_max'] * 1024 ) - $space_used;
|
||||
$space_allowed = $space_allowed < 0 ? -1 : $space_allowed;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $this->memberData['g_attach_per_post'] )
|
||||
{
|
||||
$space_allowed = ( $this->memberData['g_attach_per_post'] * 1024 ) - $space_used;
|
||||
$space_allowed = $space_allowed < 0 ? -1 : $space_allowed;
|
||||
}
|
||||
else
|
||||
{
|
||||
# Unlimited
|
||||
$space_allowed = 0;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate space left figure
|
||||
//-----------------------------------------
|
||||
|
||||
$space_left = $space_allowed ? $space_allowed : 0;
|
||||
$space_left = ($space_left < 0) ? -1 : $space_left;
|
||||
|
||||
//-----------------------------------------
|
||||
// Generate max upload size
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $max_single_upload )
|
||||
{
|
||||
if ( $space_left > 0 AND $space_left < $max_php_size )
|
||||
{
|
||||
$max_single_upload = $space_left;
|
||||
}
|
||||
else if ( $max_php_size )
|
||||
{
|
||||
$max_single_upload = $max_php_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IPSDebug::fireBug( 'info', array( 'Space left: ' . $space_left ) );
|
||||
IPSDebug::fireBug( 'info', array( 'Max PHP size: ' . $max_php_size ) );
|
||||
IPSDebug::fireBug( 'info', array( 'Max single file size: ' . $max_single_upload ) );
|
||||
|
||||
$return = array( 'space_used' => $space_used, 'space_left' => $space_left, 'space_allowed' => $space_allowed, 'max_single_upload' => $max_single_upload, 'total_space_allowed' => $total_space_allowed );
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of settings:
|
||||
* 'siu_thumb' = Allow thumbnail creation?
|
||||
* 'siu_height' = Height of the generated thumbnail in pixels
|
||||
* 'siu_width' = Width of the generated thumbnail in pixels
|
||||
* 'upload_dir' = Base upload directory (must be a full path)
|
||||
*
|
||||
* You can omit any of these settings and IPB will use the default
|
||||
* settings (which are the ones entered into the ACP for post thumbnails)
|
||||
*
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function getSettings()
|
||||
{
|
||||
$this->mysettings = array();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,141 +1,143 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Core extensions
|
||||
* Last Updated: $Date: 2009-11-10 18:07:22 -0500 (Tue, 10 Nov 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 5345 $
|
||||
*
|
||||
*/
|
||||
|
||||
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.
|
||||
*
|
||||
* @access public
|
||||
* @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( 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
|
||||
*
|
||||
* @access public
|
||||
* @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.1.4
|
||||
* Core extensions
|
||||
* Last Updated: $Date: 2010-09-15 19:24:12 -0400 (Wed, 15 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 6882 $
|
||||
*
|
||||
*/
|
||||
|
||||
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.
|
||||
*
|
||||
* @access public
|
||||
* @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( ( isset(ipsRegistry::$request['id']) AND 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
|
||||
*
|
||||
* @access public
|
||||
* @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;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Core variables extension file
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-09-22 11:32:51 -0400 (Wed, 22 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 4948 $
|
||||
* @version $Revision: 6904 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -22,7 +24,16 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
exit();
|
||||
}
|
||||
|
||||
$_LOAD = array();
|
||||
$_LOAD = array();
|
||||
$_RESET = array();
|
||||
|
||||
/* No default module? Reset to member list */
|
||||
if ( !isset($_REQUEST['module']) )
|
||||
{
|
||||
$_RESET['module'] = 'list';
|
||||
// Load properly the caches too
|
||||
$_GET['module'] = 'list';
|
||||
}
|
||||
|
||||
# PERSONAL MESSAGES
|
||||
if( ( isset( $_GET['module'] ) && $_GET['module'] == 'messaging' ) )
|
||||
@@ -37,7 +48,7 @@ if( ( isset( $_GET['module'] ) && $_GET['module'] == 'messaging' ) )
|
||||
}
|
||||
|
||||
# MEMBER LIST
|
||||
if( ( isset( $_GET['section'] ) && $_GET['section'] == 'view' ) && ( isset( $_GET['module'] ) && $_GET['module'] == 'list' ) )
|
||||
if( isset( $_GET['module'] ) && $_GET['module'] == 'list' )
|
||||
{
|
||||
$_LOAD['ranks'] = 1;
|
||||
$_LOAD['profilefields'] = 1;
|
||||
@@ -54,6 +65,16 @@ if( isset( $_GET['module'] ) && $_GET['module'] == 'online' )
|
||||
// we should load this on the assumption it'll be needed anyways
|
||||
}
|
||||
|
||||
# Status updates
|
||||
if( isset( $_GET['section'] ) && $_GET['section'] == 'status' )
|
||||
{
|
||||
$_LOAD['ranks'] = 1;
|
||||
$_LOAD['profilefields'] = 1;
|
||||
$_LOAD['reputation_levels'] = 1;
|
||||
$_LOAD['moderators'] = 1; // This is need for forums application - as there are usually people browsing topics,
|
||||
// we should load this on the assumption it'll be needed anyways
|
||||
}
|
||||
|
||||
# PROFILE
|
||||
if ( ( isset( $_GET['showuser'] ) && $_GET['showuser'] ) OR $_GET['module'] == 'profile' AND $_GET['section'] == 'view' )
|
||||
{
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Dashboard Notifications
|
||||
* Last Updated: $Date
|
||||
*
|
||||
* @author $Author: mark $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6688 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Main loader class
|
||||
*/
|
||||
class dashboardNotifications__members
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->settings = ipsRegistry::fetchSettings();
|
||||
$this->lang = ipsRegistry::getClass( 'class_localization' );
|
||||
$this->DB = ipsRegistry::DB();
|
||||
}
|
||||
|
||||
public function get()
|
||||
{
|
||||
/* INIT */
|
||||
$entries = array();
|
||||
|
||||
if ( $this->settings['reg_auth_type'] == 'admin_user' or $this->settings['reg_auth_type'] == 'admin' )
|
||||
{
|
||||
if( $this->settings['reg_auth_type'] == 'admin' )
|
||||
{
|
||||
$where = " new_reg=1";
|
||||
}
|
||||
else
|
||||
{
|
||||
$where = "new_reg=1 AND user_verified=1";
|
||||
}
|
||||
$count = $this->DB->buildAndFetch( array( 'select' => 'COUNT(*) as count',
|
||||
'from' => array( 'validating' => 'v' ),
|
||||
'where' => "v.lost_pass=0 AND m.member_group_id={$this->settings['auth_group']} AND {$where}",
|
||||
'add_join' => array(
|
||||
array( 'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=v.member_id',
|
||||
'type' => 'left' ) ) ) );
|
||||
$count = $count['count'];
|
||||
|
||||
if ( $count )
|
||||
{
|
||||
$entries[] = array( $this->lang->words['cp_validations'], sprintf( $this->lang->words['cp_validations_info'], $count ) . ' <a href="' . ipsRegistry::getClass('output')->buildUrl( 'app=members&module=members§ion=members§ion=tools&do=validating', 'admin' ) . '">' . $this->lang->words['cp_validations_review'] . '</a>' );
|
||||
}
|
||||
}
|
||||
|
||||
return $entries;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Define data hook locations (Members)
|
||||
* Last Updated: $Date: 2010-10-12 13:04:59 -0400 (Tue, 12 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Core
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6964 $
|
||||
*/
|
||||
|
||||
$dataHookLocations = array(
|
||||
|
||||
/* MESSENGER DATA LOCATIONS */
|
||||
array( 'messengerSendReplyData', 'Messenger: Reply data'),
|
||||
array( 'messengerSendTopicData', 'Messenger: New conversation, topic data' ),
|
||||
array( 'messengerSendTopicFirstPostData', 'Messenger: New conversation, first post' ),
|
||||
|
||||
/* PROFILE DATA LOCATIONS */
|
||||
array( 'profileCommentNew', 'Profile: New comment' ),
|
||||
array( 'profileFriendsNew', 'Profile: New friend' ),
|
||||
|
||||
/* OUTPUT ARRAYS */
|
||||
array( 'memberListData', 'Member List View Output' ),
|
||||
array( 'onlineUsersListData', 'Online Users List Output' ),
|
||||
|
||||
);
|
||||
@@ -1,37 +1,39 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* BBCode Management : Determines if bbcode can be used in this section
|
||||
* Last Updated: $LastChangedDate: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 4948 $
|
||||
*
|
||||
*/
|
||||
|
||||
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'],
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* BBCode Management : Determines if bbcode can be used in this section
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 27th January 2004
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
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,46 +1,74 @@
|
||||
<?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 http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @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' ) ) ) ),
|
||||
);
|
||||
<?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 http://www.invisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @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(?:&|&)module=profile(?:&|&)section=status(?:&|&)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(?:&|&)module=profile(?:&|&)section=status((?:&|&)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((&|&)module=list)?#i', 'members/' ),
|
||||
'in' => array(
|
||||
'regex' => "#/members(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'members' ),
|
||||
array( 'module', 'list' ) )
|
||||
)
|
||||
),
|
||||
);
|
||||
@@ -1,139 +1,141 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* RSS output plugin :: posts
|
||||
* Last Updated: $Date: 2009-01-05 22:21:54 +0000 (Mon, 05 Jan 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 3572 $
|
||||
*/
|
||||
|
||||
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)
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $_type = '';
|
||||
|
||||
/**
|
||||
* Key ID
|
||||
*
|
||||
* @access private
|
||||
* @var int
|
||||
*/
|
||||
private $_id = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->DB = $registry->DB();
|
||||
$this->settings =& $registry->fetchSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the key ID
|
||||
* @example furlRedirect_forums::setKey( 'topic', 12 );
|
||||
*
|
||||
* @access public
|
||||
* @param string Type
|
||||
* @param mixed Value
|
||||
*/
|
||||
public function setKey( $name, $value )
|
||||
{
|
||||
$this->_type = $name;
|
||||
$this->_id = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up the key by URI
|
||||
*
|
||||
* @access public
|
||||
* @param string URI (example: index.php?showtopic=5&view=getlastpost)
|
||||
* @return void
|
||||
*/
|
||||
public function setKeyByUri( $uri )
|
||||
{
|
||||
$uri = str_replace( '&', '&', $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
|
||||
*
|
||||
* @access public
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @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.1.4
|
||||
* RSS output plugin :: posts
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 6/24/2008
|
||||
* @version $Revision: 5713 $
|
||||
*/
|
||||
|
||||
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)
|
||||
*
|
||||
* @access private
|
||||
* @var string
|
||||
*/
|
||||
private $_type = '';
|
||||
|
||||
/**
|
||||
* Key ID
|
||||
*
|
||||
* @access private
|
||||
* @var int
|
||||
*/
|
||||
private $_id = 0;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
*/
|
||||
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>
|
||||
*
|
||||
* @access public
|
||||
* @param string Type
|
||||
* @param mixed Value
|
||||
*/
|
||||
public function setKey( $name, $value )
|
||||
{
|
||||
$this->_type = $name;
|
||||
$this->_id = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up the key by URI
|
||||
*
|
||||
* @access public
|
||||
* @param string URI (example: index.php?showtopic=5&view=getlastpost)
|
||||
* @return void
|
||||
*/
|
||||
public function setKeyByUri( $uri )
|
||||
{
|
||||
$uri = str_replace( '&', '&', $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
|
||||
*
|
||||
* @access public
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @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;
|
||||
}
|
||||
}
|
||||
@@ -1,53 +1,83 @@
|
||||
<?php
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* 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 http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4136 $
|
||||
*
|
||||
*/
|
||||
|
||||
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=(.+?)((?:&|&)f=(.+?))?(&|$)#i', 'user/$1-#{__title__}/$2$4' ),
|
||||
'in' => array( 'regex' => "#/user/(\d+?)-#i",
|
||||
'matches' => array( array( 'showuser', '$1' ) ) ) ),
|
||||
|
||||
);
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Sets up SEO templates
|
||||
* Last Updated: $Date: 2010-06-15 03:53:37 -0400 (Tue, 15 Jun 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 6531 $
|
||||
*
|
||||
*/
|
||||
|
||||
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=(.+?)((?:&|&)f=(.+?))?(&|$)#i', 'user/$1-#{__title__}/$2$4' ),
|
||||
'in' => array( 'regex' => "#/user/(\d+?)-#i",
|
||||
'matches' => array( array( 'showuser', '$1' ) ) ) ),
|
||||
|
||||
'members_status_friends'=> array( 'app' => 'members',
|
||||
'allowRedirect' => 0,
|
||||
'out' => array( '#app=members(?:&|&)module=profile(?:&|&)section=status(?:&|&)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(?:&|&)module=profile(?:&|&)section=status((?:&|&)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((&|&)module=list)?#i', 'members/' ),
|
||||
'in' => array(
|
||||
'regex' => "#/members(/|$|\?)#i",
|
||||
'matches' => array( array( 'app', 'members' ),
|
||||
array( 'module', 'list' ) )
|
||||
)
|
||||
),
|
||||
);
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Forum permissions mappings
|
||||
* Last Updated: $Date: 2010-04-26 19:40:44 +0100 (Mon, 26 Apr 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6179 $
|
||||
**/
|
||||
|
||||
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/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6179 $
|
||||
**/
|
||||
class membersMemberSync
|
||||
{
|
||||
/**
|
||||
* Registry reference
|
||||
*
|
||||
* @access public
|
||||
* @var object
|
||||
*/
|
||||
public $registry;
|
||||
|
||||
/**
|
||||
* CONSTRUCTOR
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
**/
|
||||
public function __construct()
|
||||
{
|
||||
$this->registry = ipsRegistry::instance();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is run when a member is flagged as a spammer
|
||||
*
|
||||
* @access public
|
||||
* @param array $member Array of member data
|
||||
* @return 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
|
||||
*
|
||||
* @access public
|
||||
* @param array $member Array of member data
|
||||
* @return void
|
||||
**/
|
||||
public function onUnSetAsSpammer( $member )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called after a member account has been removed
|
||||
*
|
||||
* @access public
|
||||
* @param string $ids SQL IN() clause
|
||||
* @return 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 );
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Define the core notification types
|
||||
* Last Updated: $Date: 2010-04-16 21:25:51 -0400 (Fri, 16 Apr 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 6142 $
|
||||
*
|
||||
*/
|
||||
|
||||
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( 'pm' ), 'disabled' => array(), 'icon' => 'notify_profilecomment' ),
|
||||
array( 'key' => 'profile_comment_pending', 'default' => array( 'pm' ), 'disabled' => array(), 'icon' => 'notify_profilecomment' ),
|
||||
array( 'key' => 'friend_request', 'default' => array( 'pm' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'friend_request_pending', 'default' => array( 'pm' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'friend_request_approve', 'default' => array( 'pm' ), 'disabled' => array(), 'icon' => 'notify_friendrequest' ),
|
||||
array( 'key' => 'new_private_message', 'default' => array( 'email', 'inline' ), 'disabled' => array( 'pm' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'reply_private_message', 'default' => array( 'email', 'inline' ), 'disabled' => array( 'pm' ), 'icon' => 'notify_pm' ),
|
||||
array( 'key' => 'invite_private_message', 'default' => array( 'email', 'inline' ), 'disabled' => array( 'pm' ), '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' ),
|
||||
);
|
||||
|
||||
return $_NOTIFY;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Portal plugin: online users
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 4948 $
|
||||
* @version $Revision: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Portal plugin: online users
|
||||
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
* Last Updated: $Date: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 1st march 2002
|
||||
* @version $Revision: 3887 $
|
||||
*
|
||||
* @version $Revision: 7007 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -28,7 +28,6 @@ class ppi_online_users extends public_portal_portal_portal
|
||||
/**
|
||||
* Initialize module
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function init()
|
||||
@@ -38,7 +37,6 @@ class ppi_online_users extends public_portal_portal_portal
|
||||
/**
|
||||
* Show the online users
|
||||
*
|
||||
* @access public
|
||||
* @return string HTML content to replace tag with
|
||||
*/
|
||||
public function online_users_show()
|
||||
@@ -47,8 +45,8 @@ class ppi_online_users extends public_portal_portal_portal
|
||||
// Get the users from the DB
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'forums', 'forums' ) . '/boards.php' );
|
||||
$boards = new public_forums_forums_boards();
|
||||
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'forums', 'forums' ) . '/boards.php', 'public_forums_forums_boards' );
|
||||
$boards = new $classToLoad();
|
||||
$boards->makeRegistryShortcuts( $this->registry );
|
||||
|
||||
$active = $boards->getActiveUserDetails();
|
||||
@@ -57,5 +55,4 @@ class ppi_online_users extends public_portal_portal_portal
|
||||
|
||||
return $this->registry->getClass('output')->getTemplate('portal')->onlineUsers( $active );
|
||||
}
|
||||
|
||||
}
|
||||
+10
-8
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Config for about me tab
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -25,7 +27,7 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
/**
|
||||
* Plug in name (Default tab name)
|
||||
*/
|
||||
$CONFIG['plugin_name'] = 'Обо мне';
|
||||
$CONFIG['plugin_name'] = 'About Me';
|
||||
|
||||
/**
|
||||
* Language string for the tab
|
||||
@@ -45,4 +47,4 @@ $CONFIG['plugin_enabled'] = 1;
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
$CONFIG['plugin_order'] = 1;
|
||||
$CONFIG['plugin_order'] = 2;
|
||||
+10
-8
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Profile Plugin Library
|
||||
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
|
||||
* Last Updated: $Date: 2010-05-24 11:38:42 -0400 (Mon, 24 May 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: michael $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 3887 $
|
||||
* @version $Revision: 6381 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -50,7 +52,7 @@ class profile_aboutme extends profile_plugin_parent
|
||||
if( $member['signature'] )
|
||||
{
|
||||
IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings[ 'msg_allow_code' ];
|
||||
IPSText::getTextClass('bbcode')->parse_smilies = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_smilies = 0;
|
||||
IPSText::getTextClass('bbcode')->parse_html = $this->settings[ 'msg_allow_html' ];
|
||||
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
|
||||
IPSText::getTextClass('bbcode')->parsing_section = 'signatures';
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
+14
-12
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Config for posts plugin
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* IP.Board v3.1.4
|
||||
* Config for about me tab
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -25,24 +27,24 @@ if ( ! defined( 'IN_IPB' ) )
|
||||
/**
|
||||
* Plug in name (Default tab name)
|
||||
*/
|
||||
$CONFIG['plugin_name'] = 'Сообщения';
|
||||
$CONFIG['plugin_name'] = 'Recent Status Updates';
|
||||
|
||||
/**
|
||||
* Language string for the tab
|
||||
*/
|
||||
$CONFIG['plugin_lang_bit'] = 'pp_tab_posts';
|
||||
$CONFIG['plugin_lang_bit'] = 'pp_tab_statusupdates';
|
||||
|
||||
/**
|
||||
* Plug in key (must be the same as the main {file}.php name
|
||||
*/
|
||||
$CONFIG['plugin_key'] = 'posts';
|
||||
$CONFIG['plugin_key'] = 'status';
|
||||
|
||||
/**
|
||||
* Show tab?
|
||||
*/
|
||||
$CONFIG['plugin_enabled'] = 1;
|
||||
$CONFIG['plugin_enabled'] = intval( ipsRegistry::$settings['su_enabled'] );
|
||||
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
$CONFIG['plugin_order'] = 3;
|
||||
$CONFIG['plugin_order'] = 1;
|
||||
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile Plugin Library
|
||||
* Last Updated: $Date: 2010-07-15 21:31:17 -0400 (Thu, 15 Jul 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 6661 $
|
||||
*
|
||||
*/
|
||||
|
||||
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_status extends profile_plugin_parent
|
||||
{
|
||||
/**
|
||||
* Feturn HTML block
|
||||
*
|
||||
* @access public
|
||||
* @param array Member information
|
||||
* @return string HTML block
|
||||
*/
|
||||
public function return_html_block( $member=array() )
|
||||
{
|
||||
if ( ! is_array( $member ) OR ! count( $member ) )
|
||||
{
|
||||
return $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_status_to_show' );
|
||||
}
|
||||
|
||||
/* 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() ) );
|
||||
}
|
||||
|
||||
/* Fetch */
|
||||
$statuses = $this->registry->getClass('memberStatus')->fetch( $this->memberData, array( 'member_id' => $member['member_id'], 'limit' => 2 ) );
|
||||
|
||||
/* Fetch actions */
|
||||
$actions = $this->registry->getClass('memberStatus')->fetchActions( $this->memberData, array( 'member_id' => $member['member_id'], 'limit' => 10, 'not_theirs' => 1, 'custom' => 0 ) );
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->tabStatusUpdates( $statuses, $actions, $member );
|
||||
|
||||
/* Replace Macros and return */
|
||||
$content = $this->registry->output->replaceMacros( $content );
|
||||
|
||||
return $content ? $content : $this->registry->getClass('output')->getTemplate('profile')->tabNoContent( 'err_no_status_to_show' );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,408 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Report Center :: Private Messages plugin
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </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/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*/
|
||||
|
||||
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 objects
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $cache;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Holds extra data for the plugin
|
||||
*
|
||||
* @access private
|
||||
* @var array Data specific to the plugin
|
||||
*/
|
||||
public $_extra;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return 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
|
||||
*
|
||||
* @access public
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @param array New reports
|
||||
* @param array New members cache
|
||||
* @return boolean
|
||||
*/
|
||||
public function updateReportsTimestamp( $new_reports, &$new_members_cache )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get report permissions
|
||||
*
|
||||
* @access public
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @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&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&module=messaging&section=view&do=showConversation&topicID=" . $ex_form_data['topic'] . "&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
|
||||
*
|
||||
* @access public
|
||||
* @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&module=reports&section=reports&do=showMessage&topicID={$report_row['exdat1']}&st={$report_row['exdat3']}&msg={$report_row['exdat2']}",
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Process a report and save the data appropriate
|
||||
*
|
||||
* @access public
|
||||
* @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§ion=view&do=showConversation&topicID=' . $topic;
|
||||
|
||||
if( $msg < 1 )
|
||||
{
|
||||
$this->registry->output->showError( 'reports_no_msg', 10167 );
|
||||
}
|
||||
|
||||
$return_data = array();
|
||||
$a_url = str_replace("&", "&", $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&module=messaging&section=view&do=showConversation&topicID=" . $topic . "&st=" . $st . "#msg" . $msg,
|
||||
'REPORT_INDEX' => $rid,
|
||||
'SAVED_URL' => '/index.php?' . $url,
|
||||
'REPORT' => $build_report['report']
|
||||
);
|
||||
|
||||
return $return_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Where to send user after report is submitted
|
||||
*
|
||||
* @access public
|
||||
* @param array Report data
|
||||
* @return 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
|
||||
*
|
||||
* @access public
|
||||
* @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' => 'noti.*',
|
||||
'from' => array( 'rc_modpref' => 'noti' ),
|
||||
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
|
||||
'add_join' => array(
|
||||
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_id=noti.mem_id',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
if( $this->DB->getTotalRows() > 0 )
|
||||
{
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$notify[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
return $notify;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,354 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Report Center :: Profiles plugin
|
||||
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </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/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*/
|
||||
|
||||
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 objects
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $registry;
|
||||
protected $DB;
|
||||
protected $settings;
|
||||
protected $request;
|
||||
protected $lang;
|
||||
protected $member;
|
||||
protected $cache;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Holds extra data for the plugin
|
||||
*
|
||||
* @access private
|
||||
* @var array Data specific to the plugin
|
||||
*/
|
||||
public $_extra;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry object
|
||||
* @return 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
|
||||
*
|
||||
* @access public
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @param array Plugin data for save
|
||||
* @return string Error message
|
||||
*/
|
||||
public function processAdminForm( &$save_data_array )
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Update timestamp for report
|
||||
*
|
||||
* @access public
|
||||
* @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)
|
||||
*
|
||||
* @access public
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @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("&", "&", $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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Where to send user after report is submitted
|
||||
*
|
||||
* @access public
|
||||
* @param array Report data
|
||||
* @return 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
|
||||
*
|
||||
* @access public
|
||||
* @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' => 'noti.*',
|
||||
'from' => array( 'rc_modpref' => 'noti' ),
|
||||
'where' => 'mem.member_group_id IN(' . $group_ids . ')',
|
||||
'add_join' => array(
|
||||
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_id=noti.mem_id',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
if( $this->DB->getTotalRows() > 0 )
|
||||
{
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$notify[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
return $notify;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Config file
|
||||
* Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5855 $
|
||||
**/
|
||||
|
||||
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;
|
||||
|
||||
/* Can fetch active content with this app */
|
||||
$CONFIG['can_activeContent'] = 1;
|
||||
|
||||
/* Can fetch user generated content */
|
||||
$CONFIG['can_userContent'] = 1;
|
||||
|
||||
/* Content types, put the default one first */
|
||||
$CONFIG['contentTypes'] = array( 'members', 'comments' );
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,428 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Basic Forum Search
|
||||
* Last Updated: $Date: 2010-02-23 12:38:11 +0000 (Tue, 23 Feb 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5861 $
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class search_engine_members extends search_engine
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
parent::__construct( $registry );
|
||||
}
|
||||
|
||||
/**
|
||||
* Decide what type of search we're using
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
/* Ok, now because the top bar search box defaults to members default search, which is profile comments, we need
|
||||
to convince it to default to members if the user used the top search bar with members selected */
|
||||
if ( $this->request['fromMainBar'] )
|
||||
{
|
||||
IPSSearchRegistry::set('members.searchInKey', 'members');
|
||||
}
|
||||
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') AND IPSSearchRegistry::get('members.searchInKey') != 'comments' )
|
||||
{
|
||||
return $this->_membersSearch();
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->_commentsSearch();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a comment search.
|
||||
* Returns an array of a total count (total number of matches)
|
||||
* and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search
|
||||
*
|
||||
* So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function _commentsSearch()
|
||||
{
|
||||
/* INIT */
|
||||
$count = 0;
|
||||
$results = array();
|
||||
$sort_by = IPSSearchRegistry::get('in.search_sort_by');
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$content_title_only = IPSSearchRegistry::get('opt.searchTitleOnly');
|
||||
$post_search_only = IPSSearchRegistry::get('opt.onlySearchPosts');
|
||||
$order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc';
|
||||
$sortKey = '';
|
||||
$sortType = '';
|
||||
$rows = array();
|
||||
$got = 0;
|
||||
|
||||
/* Sorting */
|
||||
switch( $sort_by )
|
||||
{
|
||||
default:
|
||||
case 'date':
|
||||
$sortKey = 'comment_date';
|
||||
$sortType = 'numerical';
|
||||
break;
|
||||
}
|
||||
|
||||
/* Not allowed to see profile information */
|
||||
if ( ! $this->memberData['g_mem_info'] )
|
||||
{
|
||||
return array( 'count' => 0, 'resultSet' => array() );
|
||||
}
|
||||
|
||||
/* Query the count */
|
||||
$count = $this->DB->buildAndFetch( array('select' => 'COUNT(*) as total_results',
|
||||
'from' => array( 'profile_comments' => 'c' ),
|
||||
'where' => $this->_buildCommentsWhereStatement( $search_term, $content_title_only ),
|
||||
'add_join' => array( array( 'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=c.comment_by_member_id",
|
||||
'type' => 'left' ) ) ) );
|
||||
|
||||
|
||||
|
||||
/* Fetch data */
|
||||
$this->DB->build( array('select' => 'c.*',
|
||||
'from' => array( 'profile_comments' => 'c' ),
|
||||
'where' => $this->_buildCommentsWhereStatement( $search_term, $content_title_only ),
|
||||
'order' => $sortKey . ' ' . $sort_order,
|
||||
'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ),
|
||||
'add_join' => array( array( 'select' => 'x.members_display_name as members_display_name_from, x.members_seo_name as members_seo_name_from',
|
||||
'from' => array( 'members' => 'x' ),
|
||||
'where' => "x.member_id=c.comment_by_member_id",
|
||||
'type' => 'left' ),
|
||||
array( 'select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => "m.member_id=c.comment_for_member_id",
|
||||
'type' => 'left' ),
|
||||
array( 'select' => 'p.*',
|
||||
'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=c.comment_for_member_id",
|
||||
'type' => 'left' ) ) ) );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->DB->execute();
|
||||
|
||||
/* Sort */
|
||||
while ( $_row = $this->DB->fetch() )
|
||||
{
|
||||
$rows[ $got ] = $_row;
|
||||
|
||||
$got++;
|
||||
}
|
||||
|
||||
/* Return it */
|
||||
return array( 'count' => $count['total_results'], 'resultSet' => $rows );
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a MEMBER search.
|
||||
* Returns an array of a total count (total number of matches)
|
||||
* and an array of IDs ( 0 => 1203, 1 => 928, 2 => 2938 ).. matching the required number based on pagination. The ids returned would be based on the filters and type of search
|
||||
*
|
||||
* So if we had 1000 replies, and we are on page 2 of 25 per page, we'd return 25 items offset by 25
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function _membersSearch()
|
||||
{
|
||||
/* INIT */
|
||||
$count = 0;
|
||||
$results = array();
|
||||
$sort_by = IPSSearchRegistry::get('in.search_sort_by');
|
||||
$sort_order = IPSSearchRegistry::get('in.search_sort_order');
|
||||
$search_term = IPSSearchRegistry::get('in.clean_search_term');
|
||||
$content_title_only = IPSSearchRegistry::get('opt.searchTitleOnly');
|
||||
$post_search_only = IPSSearchRegistry::get('opt.onlySearchPosts');
|
||||
$order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc';
|
||||
$sortKey = '';
|
||||
$sortType = '';
|
||||
$rows = array();
|
||||
$got = 0;
|
||||
|
||||
if ( IPSSearchRegistry::get('opt.noPostPreview') OR IPSSearchRegistry::get('display.onlyTitles') )
|
||||
{
|
||||
$group_by = 'm.member_id';
|
||||
}
|
||||
|
||||
/* Sorting */
|
||||
switch( $sort_by )
|
||||
{
|
||||
default:
|
||||
case 'date':
|
||||
$sortKey = ( $content_title_only ) ? 'member_id' : 'member_id';
|
||||
$sortType = 'numerical';
|
||||
break;
|
||||
case 'title':
|
||||
$sortKey = 'members_l_display_name';
|
||||
$sortType = 'string';
|
||||
break;
|
||||
}
|
||||
|
||||
/* Query the count */
|
||||
$count = $this->DB->buildAndFetch( array('select' => 'COUNT(*) as total_results',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => $this->_buildWhereStatement( $search_term, $content_title_only ),
|
||||
'group' => $group_by,
|
||||
'add_join' => array( array( 'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=m.member_id",
|
||||
'type' => 'left' ) ) ) );
|
||||
|
||||
|
||||
|
||||
/* Fetch data */
|
||||
$this->DB->build( array('select' => 'm.*',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => $this->_buildWhereStatement( $search_term, $content_title_only ),
|
||||
'group' => $group_by,
|
||||
'order' => $sortKey . ' ' . $sort_order,
|
||||
'limit' => array( IPSSearchRegistry::get('in.start'), IPSSearchRegistry::get('opt.search_per_page') ),
|
||||
'add_join' => array( array( 'select' => 'p.*',
|
||||
'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=m.member_id",
|
||||
'type' => 'left' ) ) ) );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$this->DB->execute();
|
||||
|
||||
/* Sort */
|
||||
while ( $_row = $this->DB->fetch() )
|
||||
{
|
||||
$rows[ $got ] = $_row;
|
||||
|
||||
$got++;
|
||||
}
|
||||
|
||||
/* Return it */
|
||||
return array( 'count' => $count['total_results'], 'resultSet' => $rows );
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the where portion of a search string
|
||||
*
|
||||
* @access private
|
||||
* @param string $search_term The string to use in the search
|
||||
* @param bool $content_title_only Search only title records
|
||||
* @return string
|
||||
**/
|
||||
private function _buildCommentsWhereStatement( $search_term, $content_title_only=false )
|
||||
{
|
||||
/* INI */
|
||||
$where_clause = array();
|
||||
|
||||
if( $search_term )
|
||||
{
|
||||
$where_clause[] = "c.comment_content LIKE '%" . mb_strtolower( $search_term ) . "%'";
|
||||
}
|
||||
|
||||
/* Add in AND where conditions */
|
||||
if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) )
|
||||
{
|
||||
$where_clause = array_merge( $where_clause, $this->whereConditions['AND'] );
|
||||
}
|
||||
|
||||
/* ADD in OR where conditions */
|
||||
if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) )
|
||||
{
|
||||
$where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )';
|
||||
}
|
||||
|
||||
/* Date Restrict */
|
||||
if( $this->search_begin_timestamp && $this->search_end_timestamp )
|
||||
{
|
||||
$where_clause[] = $this->DB->buildBetween( "c.comment_date", $this->search_begin_timestamp, $this->search_end_timestamp );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $this->search_begin_timestamp )
|
||||
{
|
||||
$where_clause[] = "c.comment_date > {$this->search_begin_timestamp}";
|
||||
}
|
||||
|
||||
if( $this->search_end_timestamp )
|
||||
{
|
||||
$where_clause[] = "c.comment_date < {$this->search_end_timestamp}";
|
||||
}
|
||||
}
|
||||
|
||||
$where_clause[] = "c.comment_approved=1";
|
||||
|
||||
/* Build and return the string */
|
||||
return implode( " AND ", $where_clause );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Builds the where portion of a search string
|
||||
*
|
||||
* @access private
|
||||
* @param string $search_term The string to use in the search
|
||||
* @param bool $content_title_only Search only title records
|
||||
* @return string
|
||||
**/
|
||||
private function _buildWhereStatement( $search_term, $content_title_only=false )
|
||||
{
|
||||
/* INI */
|
||||
$where_clause = array();
|
||||
|
||||
if( $search_term )
|
||||
{
|
||||
if( $content_title_only )
|
||||
{
|
||||
$where_clause[] = "m.members_l_display_name LIKE '%" . mb_strtolower( $search_term ) . "%'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$where_clause[] = "m.members_l_display_name LIKE '%" . mb_strtolower( $search_term ) . "%' OR p.signature LIKE '%{$search_term}%' OR p.pp_about_me LIKE '%{$search_term}%'";
|
||||
}
|
||||
}
|
||||
|
||||
/* Add in AND where conditions */
|
||||
if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) )
|
||||
{
|
||||
$where_clause = array_merge( $where_clause, $this->whereConditions['AND'] );
|
||||
}
|
||||
|
||||
/* ADD in OR where conditions */
|
||||
if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) )
|
||||
{
|
||||
$where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )';
|
||||
}
|
||||
|
||||
/* Date Restrict */
|
||||
if( $this->search_begin_timestamp && $this->search_end_timestamp )
|
||||
{
|
||||
$where_clause[] = $this->DB->buildBetween( "m.joined", $this->search_begin_timestamp, $this->search_end_timestamp );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $this->search_begin_timestamp )
|
||||
{
|
||||
$where_clause[] = "m.joined > {$this->search_begin_timestamp}";
|
||||
}
|
||||
|
||||
if( $this->search_end_timestamp )
|
||||
{
|
||||
$where_clause[] = "m.joined < {$this->search_end_timestamp}";
|
||||
}
|
||||
}
|
||||
|
||||
/* Build and return the string */
|
||||
return implode( " AND ", $where_clause );
|
||||
}
|
||||
|
||||
/**
|
||||
* Remap standard columns (Apps can override )
|
||||
*
|
||||
* @access public
|
||||
* @param string $column sql table column for this condition
|
||||
* @return string column
|
||||
* @return void
|
||||
*/
|
||||
public function remapColumn( $column )
|
||||
{
|
||||
if ( IPSSearchRegistry::get( 'members.searchInKey') == 'comments' )
|
||||
{
|
||||
$column = ( $column == 'member_id' ) ? 'c.comment_by_member_id' : '';
|
||||
}
|
||||
|
||||
return $column;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array used in the searchplugin's setCondition method
|
||||
*
|
||||
* @access public
|
||||
* @param array $data Array of forums to view
|
||||
* @return array Array with column, operator, and value keys, for use in the setCondition call
|
||||
**/
|
||||
public function buildFilterSQL( $data )
|
||||
{
|
||||
/* INIT */
|
||||
$return = array();
|
||||
|
||||
/* Set up some defaults */
|
||||
IPSSearchRegistry::set( 'opt.noPostPreview' , false );
|
||||
IPSSearchRegistry::set( 'opt.onlySearchPosts', false );
|
||||
//IPSSearchRegistry::set( 'members.searchInKey' , 'comments' );
|
||||
|
||||
/* member specific search */
|
||||
/* Make default search type topics */
|
||||
if( isset( $data ) && is_array( $data ) && count( $data ) )
|
||||
{
|
||||
foreach( $data as $field => $_data )
|
||||
{
|
||||
/* CONTENT ONLY */
|
||||
if ( $field == 'searchInKey' AND $_data['searchInKey'] == 'members' )
|
||||
{
|
||||
//IPSSearchRegistry::set( 'member.searchType', 'members' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Can handle boolean searching
|
||||
*
|
||||
* @access public
|
||||
* @return boolean
|
||||
*/
|
||||
public function isBoolean()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform the viewNewContent search
|
||||
* Forum Version
|
||||
* Populates $this->_count and $this->_results
|
||||
*
|
||||
* @access public
|
||||
* @return nothin'
|
||||
*/
|
||||
public function viewNewContent()
|
||||
{
|
||||
/* Set up some vars */
|
||||
IPSSearchRegistry::set('set.resultCutToDate', intval( $this->memberData['last_visit'] ) );
|
||||
|
||||
return parent::viewNewContent();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Returns HTML for the form (optional class, not required)
|
||||
* Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5855 $
|
||||
**/
|
||||
|
||||
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
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @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'.
|
||||
*
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function fetchSortIn()
|
||||
{
|
||||
$array = array( 0 => array( 'members', $this->lang->words['s_msin_members'] ),
|
||||
1 => array( 'comments', $this->lang->words['s_msin_comments'] ) );
|
||||
|
||||
return $array;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Formats forum search results
|
||||
* Last Updated: $Date: 2010-02-19 01:29:54 +0000 (Fri, 19 Feb 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5855 $
|
||||
**/
|
||||
|
||||
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
|
||||
*
|
||||
* @access private
|
||||
* @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
|
||||
*
|
||||
* @access public
|
||||
* @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') AND IPSSearchRegistry::get('members.searchInKey') != 'comments' ) ? 'memberSearchResult' : 'memberCommentsSearchResult';
|
||||
|
||||
return array( ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->$template( $data, IPSSearchRegistry::get('display.onlyTitles') ), 0 );
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats / grabs extra data for results
|
||||
* Takes an array of IDS (can be IDs from anything) and returns an array of expanded data.
|
||||
*
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function processResults( $ids )
|
||||
{
|
||||
$rows = array();
|
||||
|
||||
foreach( $ids as $i => $d )
|
||||
{
|
||||
$rows[ $i ] = $this->genericizeResults( $d );
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reassigns fields in a generic way for results output
|
||||
*
|
||||
* @param array $r
|
||||
* @return array
|
||||
**/
|
||||
public function genericizeResults( $r )
|
||||
{
|
||||
if ( IPSSearchRegistry::get('members.searchInKey') AND IPSSearchRegistry::get('members.searchInKey') != 'comments' )
|
||||
{
|
||||
$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']
|
||||
) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$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']
|
||||
) );
|
||||
}
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,69 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Format member search results
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
*
|
||||
* @author $author$
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 4948 $
|
||||
**/
|
||||
|
||||
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 membersSearchDisplay implements iSearchDisplay
|
||||
{
|
||||
/**
|
||||
* The search plugin for this app
|
||||
*
|
||||
* @access public
|
||||
* @var object
|
||||
*/
|
||||
public $search_plugin;
|
||||
|
||||
/**
|
||||
* Formats the member search result for display
|
||||
*
|
||||
* @access public
|
||||
* @param array $search_row Array of data from search_index
|
||||
* @return string Formatted content, ready for display
|
||||
*/
|
||||
public function formatContent( $search_row )
|
||||
{
|
||||
$search_row['misc'] = unserialize( $search_row['misc'] );
|
||||
|
||||
return ipsRegistry::getClass( 'output' )->getTemplate( 'search' )->memberSearchResult( $search_row, $this->search_plugin->onlyTitles );
|
||||
}
|
||||
|
||||
/**
|
||||
* Retuns the html for displaying the member filter on the advanced search page
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getFilterHTML()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Build filter SQL data
|
||||
*
|
||||
* @access public
|
||||
* @param array
|
||||
* @return array
|
||||
*/
|
||||
public function buildFilterSQL( $data )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -1,425 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Basic Member Search
|
||||
* Last Updated: $Date: 2009-01-12 16:56:39 -0500 (Mon, 12 Jan 2009) $
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 3640 $
|
||||
*/
|
||||
|
||||
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 searchMembersPlugin implements iSearchIndexPlugin
|
||||
{
|
||||
/**
|
||||
* Database object
|
||||
*
|
||||
* @access private
|
||||
* @var object
|
||||
*/
|
||||
private $DB;
|
||||
|
||||
/**
|
||||
* Date range restriction start
|
||||
*
|
||||
* @access private
|
||||
* @var integer
|
||||
*/
|
||||
private $search_begin_timestamp = 0;
|
||||
|
||||
/**
|
||||
* Date range restriction end
|
||||
*
|
||||
* @access private
|
||||
* @var integer
|
||||
*/
|
||||
private $search_end_timestamp = 0;
|
||||
|
||||
/**
|
||||
* Array of conditions for this search
|
||||
*
|
||||
* @access private
|
||||
* @var array
|
||||
*/
|
||||
private $whereConditions = array();
|
||||
|
||||
/**
|
||||
* Remoe self from search results
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $removeSelf = false;
|
||||
|
||||
/**
|
||||
* Only display title
|
||||
*
|
||||
* @access public
|
||||
* @var boolean
|
||||
*/
|
||||
public $onlyTitles = false;
|
||||
|
||||
/**
|
||||
* Setup registry objects
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry $registry
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( ipsRegistry $registry )
|
||||
{
|
||||
$this->DB = $registry->DB();
|
||||
$this->member = $registry->member();
|
||||
$this->memberData =& $registry->member()->fetchMemberData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs search and returns an array of results
|
||||
*
|
||||
* @access public
|
||||
* @param string $search_term
|
||||
* @param array $limit_clause The erray should be array( begin, end )
|
||||
* @param string $sort_by Column to sort by
|
||||
* @param string $group_by Column to group by
|
||||
* @param bool $content_title_only Only search title records
|
||||
* @return array
|
||||
*/
|
||||
public function getSearchResults( $search_term, $limit_clause, $sort_by, $group_by='', $content_title_only=false, $sort_order='' )
|
||||
{
|
||||
if( $group_by )
|
||||
{
|
||||
$group_by = 'm.' . $group_by;
|
||||
}
|
||||
|
||||
/* User prefs */
|
||||
$order_dir = ( $sort_order == 'asc' ) ? 'asc' : 'desc';
|
||||
|
||||
/* Do the search */
|
||||
$this->DB->build( array(
|
||||
'select' => "m.*",
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => $this->_buildWhereStatement( $search_term, $content_title_only ),
|
||||
'limit' => $limit_clause,
|
||||
'group' => $group_by,
|
||||
'order' => "m.member_id " . $order_dir, //"m.joined DESC", - m.member_id uses Primary key and avoids filesort
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'p.*',
|
||||
'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=m.member_id",
|
||||
'type' => 'left',
|
||||
),
|
||||
array(
|
||||
'from' => array( 'profile_friends' => 'friend' ),
|
||||
'where' => 'friend.friends_member_id=m.member_id AND friend.friends_friend_id=' . $this->memberData['member_id'],
|
||||
'type' => 'left',
|
||||
),
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
/* Build result array */
|
||||
$rows = array();
|
||||
|
||||
while( $r = $this->DB->fetch() )
|
||||
{
|
||||
/* Reassign stuff to match the search_index */
|
||||
$rows[] = $this->formatFieldsForIndex( $r );
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs live search and returns an array of results
|
||||
* NOT AVAILABLE IN BASIC SEARCH
|
||||
*
|
||||
* @access public
|
||||
* @param string $search_term
|
||||
* @return array
|
||||
*/
|
||||
public function getLiveSearchResults( $search_term )
|
||||
{
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total number of results the search will return
|
||||
*
|
||||
* @access public
|
||||
* @param string $search_term Search term
|
||||
* @param string $group_by Column to group by
|
||||
* @param bool $content_title_only Only search title records
|
||||
* @return integer
|
||||
*/
|
||||
public function getSearchCount( $search_term, $group_by='', $content_title_only=false )
|
||||
{
|
||||
/* Query the count */
|
||||
$this->DB->build( array(
|
||||
'select' => 'COUNT(*) as total_results',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => $this->_buildWhereStatement( $search_term, $content_title_only ),
|
||||
'group' => $group_by,
|
||||
'add_join' => array(
|
||||
array(
|
||||
'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=m.member_id",
|
||||
'type' => 'left',
|
||||
)
|
||||
)
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
$search = $this->DB->fetch();
|
||||
|
||||
/* Return the count */
|
||||
return $search['total_results'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Restrict the date range that the search is performed on
|
||||
*
|
||||
* @access public
|
||||
* @param int $begin Start timestamp
|
||||
* @param int [$end] End timestamp
|
||||
* @return void
|
||||
*/
|
||||
public function setDateRange( $begin, $end=0 )
|
||||
{
|
||||
$this->search_begin_timestamp = $begin;
|
||||
$this->search_end_timestamp = $end;
|
||||
}
|
||||
|
||||
/**
|
||||
* mySQL function for adding special search conditions
|
||||
*
|
||||
* @access public
|
||||
* @param string $column sql table column for this condition
|
||||
* @param string $operator Operation to perform for this condition, ex: =, <>, IN, NOT IN
|
||||
* @param mixed $value Value to check with
|
||||
* @param string $comp Comparison type
|
||||
* @return void
|
||||
*/
|
||||
public function setCondition( $column, $operator, $value, $comp='AND' )
|
||||
{
|
||||
if( $column == 'app' OR $column == 'type_id' )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Build the condition based on operator */
|
||||
switch( strtoupper( $operator ) )
|
||||
{
|
||||
case 'IN':
|
||||
case 'NOT IN':
|
||||
$this->whereConditions[$comp][] = "m.{$column} {$operator} ( {$value} )";
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->whereConditions[$comp][] = "m.{$column} {$operator} {$value}";
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Allows you to specify multiple conditions that are chained together
|
||||
*
|
||||
* @access public
|
||||
* @param array $conditions Array of conditions, each element has 3 keys: column, operator, value, see the setCondition function for information on each
|
||||
* @param string $inner_comp Comparison operator to use inside the chain
|
||||
* @param string $outer_comp Comparison operator to use outside the chain
|
||||
* @return void
|
||||
*/
|
||||
public function setMultiConditions( $conditions, $inner_comp='OR', $outer_comp='AND' )
|
||||
{
|
||||
/* Loop through the conditions to build the statement */
|
||||
$_temp = array();
|
||||
|
||||
foreach( $conditions as $r )
|
||||
{
|
||||
/* REMAP */
|
||||
if( $r['column'] == 'type_id' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if( $r['column'] == 'app' )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
switch( strtoupper( $r['operator'] ) )
|
||||
{
|
||||
case 'IN':
|
||||
case 'NOT IN':
|
||||
$_temp[] = "m.{$r['column']} {$r['operator']} ( {$r['value']} )";
|
||||
break;
|
||||
|
||||
default:
|
||||
$_temp[] = "m.{$r['column']} {$r['operator']} {$r['value']}";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$this->whereConditions[$outer_comp][] = '( ' . implode( $_temp, ' ' . $inner_comp . ' ' ) . ' ) ';
|
||||
}
|
||||
|
||||
/**
|
||||
* Set search conditions for "View unread content"
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setUnreadConditions()
|
||||
{
|
||||
$this->setDateRange( intval( $this->memberData['last_visit'] ), time() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds the where portion of a search string
|
||||
*
|
||||
* @access private
|
||||
* @param string $search_term The string to use in the search
|
||||
* @param bool $content_title_only Search only title records
|
||||
* @return string
|
||||
**/
|
||||
private function _buildWhereStatement( $search_term, $content_title_only=false )
|
||||
{
|
||||
/* INI */
|
||||
$where_clause = array();
|
||||
|
||||
if( $search_term )
|
||||
{
|
||||
if( $content_title_only )
|
||||
{
|
||||
$where_clause[] = "m.members_l_display_name LIKE '%" . mb_strtolower( $search_term ) . "%'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$where_clause[] = "m.members_l_display_name LIKE '%" . mb_strtolower( $search_term ) . "%' OR p.pp_bio_content LIKE '%{$search_term}%' OR p.signature LIKE '%{$search_term}%' OR p.pp_about_me LIKE '%{$search_term}%'";
|
||||
}
|
||||
}
|
||||
|
||||
/* Add in AND where conditions */
|
||||
if( isset( $this->whereConditions['AND'] ) && count( $this->whereConditions['AND'] ) )
|
||||
{
|
||||
$where_clause = array_merge( $where_clause, $this->whereConditions['AND'] );
|
||||
}
|
||||
|
||||
/* ADD in OR where conditions */
|
||||
if( isset( $this->whereConditions['OR'] ) && count( $this->whereConditions['OR'] ) )
|
||||
{
|
||||
$where_clause[] = '( ' . implode( ' OR ', $this->whereConditions['OR'] ) . ' )';
|
||||
}
|
||||
|
||||
/* Date Restrict */
|
||||
if( $this->search_begin_timestamp && $this->search_end_timestamp )
|
||||
{
|
||||
$where_clause[] = $this->DB->buildBetween( "m.joined", $this->search_begin_timestamp, $this->search_end_timestamp );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $this->search_begin_timestamp )
|
||||
{
|
||||
$where_clause[] = "m.joined > {$this->search_begin_timestamp}";
|
||||
}
|
||||
|
||||
if( $this->search_end_timestamp )
|
||||
{
|
||||
$where_clause[] = "m.joined < {$this->search_end_timestamp}";
|
||||
}
|
||||
}
|
||||
|
||||
/* Build and return the string */
|
||||
return implode( " AND ", $where_clause );
|
||||
}
|
||||
|
||||
/**
|
||||
* Reassigns fields in a way the index exepcts
|
||||
*
|
||||
* @param array $r
|
||||
* @return array
|
||||
**/
|
||||
public function formatFieldsForIndex( $r )
|
||||
{
|
||||
$r['app'] = 'members';
|
||||
$r['content'] = $r['signature'] . ' ' . $r['bio'] . ' ' . $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_bio_content' => $r['pp_bio_content'],
|
||||
'pp_thumb_photo' => $r['pp_thumb_photo'],
|
||||
'pp_thumb_width' => $r['pp_thumb_width'],
|
||||
'pp_thumb_height' => $r['pp_thumb_height']
|
||||
) );
|
||||
|
||||
return $r;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function grabs the actual results for display
|
||||
*
|
||||
* @param array $ids
|
||||
* @return query result
|
||||
**/
|
||||
public function getResultsForSphinx( $ids )
|
||||
{
|
||||
$this->DB->build( array(
|
||||
'select' => "m.*",
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id IN( ' . implode( ',', $ids ) . ')',
|
||||
'order' => 'm.member_id DESC', //'m.joined DESC',
|
||||
'add_join' => array(
|
||||
array(
|
||||
'select' => 'p.*',
|
||||
'from' => array( 'profile_portal' => 'p' ),
|
||||
'where' => "p.pp_member_id=m.member_id",
|
||||
'type' => 'left',
|
||||
)
|
||||
)
|
||||
) );
|
||||
return $this->DB->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of the field this search index uses for dates.... >_<
|
||||
*
|
||||
* @return string
|
||||
**/
|
||||
public function getDateField()
|
||||
{
|
||||
return 'joined';
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets field names for other conditions
|
||||
*
|
||||
* @param string Column
|
||||
* @return string
|
||||
**/
|
||||
public function getConditionField( $column )
|
||||
{
|
||||
switch( $column )
|
||||
{
|
||||
case 'member_id':
|
||||
return 'search_id';
|
||||
break;
|
||||
}
|
||||
|
||||
return $column;
|
||||
}
|
||||
}
|
||||
@@ -1,92 +1,97 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Sphinx template file
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 4948 $
|
||||
* @since 3.0.0
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
$appSphinxTemplate = <<<EOF
|
||||
|
||||
############################## --- MEMBERS --- ##############################
|
||||
|
||||
source members_search_main : ipb_source_config
|
||||
{
|
||||
# Set our forum PID counter
|
||||
sql_query_pre = REPLACE INTO <!--SPHINX_DB_PREFIX-->cache_store VALUES( 'sphinx_members_counter', (SELECT max(member_id) FROM <!--SPHINX_DB_PREFIX-->members), '', 0, UNIX_TIMESTAMP() )
|
||||
|
||||
# Query posts for the main source
|
||||
sql_query = SELECT m.member_id, m.member_id as search_id, m.member_group_id, m.email, m.joined, m.members_display_name, m.name, \
|
||||
REPLACE( pi.perm_view, '*', 0 ) as perm_view, \
|
||||
CASE WHEN pi.authorized_users IS NULL THEN 0 ELSE pi.authorized_users END AS authorized_users, \
|
||||
CASE WHEN pi.friend_only=0 THEN 0 ELSE m.member_id END AS friend_only, \
|
||||
CASE WHEN pi.owner_only=0 THEN 0 ELSE m.member_id END AS owner_only \
|
||||
FROM <!--SPHINX_DB_PREFIX-->members m \
|
||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->permission_index pi ON ( pi.perm_type_id=1 AND pi.perm_type='profile_view' ) \
|
||||
WHERE m.member_id <= ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_members_counter' )
|
||||
|
||||
# Fields
|
||||
sql_attr_uint = search_id
|
||||
sql_attr_uint = friend_only
|
||||
sql_attr_uint = owner_only
|
||||
sql_attr_timestamp = joined
|
||||
sql_attr_multi = uint perm_view from field
|
||||
sql_attr_multi = uint authorized_users from field
|
||||
|
||||
sql_ranged_throttle = 0
|
||||
}
|
||||
|
||||
source members_search_delta : members_search_main
|
||||
{
|
||||
# Override the base sql_query_pre
|
||||
sql_query_pre =
|
||||
|
||||
# Query posts for the main source
|
||||
sql_query = SELECT m.member_id, m.member_id as search_id, m.member_group_id, m.email, m.joined, m.members_display_name, m.name, \
|
||||
REPLACE( pi.perm_view, '*', 0 ) as perm_view, \
|
||||
CASE WHEN pi.authorized_users IS NULL THEN 0 ELSE pi.authorized_users END AS authorized_users, \
|
||||
CASE WHEN pi.friend_only=0 THEN 0 ELSE m.member_id END AS friend_only, \
|
||||
CASE WHEN pi.owner_only=0 THEN 0 ELSE m.member_id END AS owner_only \
|
||||
FROM <!--SPHINX_DB_PREFIX-->members m \
|
||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->permission_index pi ON ( pi.perm_type_id=1 AND pi.perm_type='profile_view' ) \
|
||||
WHERE m.member_id > ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_members_counter' )
|
||||
}
|
||||
|
||||
index members_search_main
|
||||
{
|
||||
source = members_search_main
|
||||
path = <!--SPHINX_BASE_PATH-->/members_search_main
|
||||
|
||||
docinfo = extern
|
||||
mlock = 0
|
||||
morphology = none
|
||||
min_word_len = 2
|
||||
charset_type = sbcs
|
||||
html_strip = 0
|
||||
}
|
||||
|
||||
index members_search_delta : members_search_main
|
||||
{
|
||||
source = members_search_delta
|
||||
path = <!--SPHINX_BASE_PATH-->/members_search_delta
|
||||
}
|
||||
|
||||
|
||||
EOF;
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Sphinx template file
|
||||
* Last Updated: $Date: 2010-06-22 03:39:59 -0400 (Tue, 22 Jun 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6566 $
|
||||
* @since 3.0.0
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
$appSphinxTemplate = <<<EOF
|
||||
|
||||
############################## --- MEMBERS --- ##############################
|
||||
|
||||
source members_search_main : ipb_source_config
|
||||
{
|
||||
# Set our forum PID counter
|
||||
sql_query_pre = REPLACE INTO <!--SPHINX_DB_PREFIX-->cache_store VALUES( 'sphinx_members_counter', (SELECT max(member_id) FROM <!--SPHINX_DB_PREFIX-->members), '', 0, UNIX_TIMESTAMP() )
|
||||
|
||||
# Query posts for the main source
|
||||
sql_query = SELECT m.member_id, m.member_id as search_id, m.member_group_id, m.email, m.joined, m.members_display_name, m.name, \
|
||||
REPLACE( pi.perm_view, '*', 0 ) as perm_view, \
|
||||
CASE WHEN pi.authorized_users IS NULL THEN 0 ELSE pi.authorized_users END AS authorized_users, \
|
||||
CASE WHEN pi.friend_only=0 THEN 0 ELSE m.member_id END AS friend_only, \
|
||||
CASE WHEN pi.owner_only=0 THEN 0 ELSE m.member_id END AS owner_only \
|
||||
FROM <!--SPHINX_DB_PREFIX-->members m \
|
||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->permission_index pi ON ( pi.perm_type_id=1 AND pi.perm_type='profile_view' ) \
|
||||
WHERE m.member_id <= ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_members_counter' )
|
||||
|
||||
# Fields
|
||||
sql_attr_uint = search_id
|
||||
sql_attr_uint = friend_only
|
||||
sql_attr_uint = owner_only
|
||||
sql_attr_timestamp = joined
|
||||
sql_attr_multi = uint perm_view from field
|
||||
sql_attr_multi = uint authorized_users from field
|
||||
|
||||
sql_ranged_throttle = 0
|
||||
}
|
||||
|
||||
source members_search_delta : members_search_main
|
||||
{
|
||||
# Override the base sql_query_pre
|
||||
sql_query_pre =
|
||||
|
||||
# Query posts for the main source
|
||||
sql_query = SELECT m.member_id, m.member_id as search_id, m.member_group_id, m.email, m.joined, m.members_display_name, m.name, \
|
||||
REPLACE( pi.perm_view, '*', 0 ) as perm_view, \
|
||||
CASE WHEN pi.authorized_users IS NULL THEN 0 ELSE pi.authorized_users END AS authorized_users, \
|
||||
CASE WHEN pi.friend_only=0 THEN 0 ELSE m.member_id END AS friend_only, \
|
||||
CASE WHEN pi.owner_only=0 THEN 0 ELSE m.member_id END AS owner_only \
|
||||
FROM <!--SPHINX_DB_PREFIX-->members m \
|
||||
LEFT JOIN <!--SPHINX_DB_PREFIX-->permission_index pi ON ( pi.perm_type_id=1 AND pi.perm_type='profile_view' ) \
|
||||
WHERE m.member_id > ( SELECT cs_value FROM <!--SPHINX_DB_PREFIX-->cache_store WHERE cs_key='sphinx_members_counter' )
|
||||
}
|
||||
|
||||
index members_search_main
|
||||
{
|
||||
source = members_search_main
|
||||
path = <!--SPHINX_BASE_PATH-->/members_search_main
|
||||
|
||||
docinfo = extern
|
||||
mlock = 0
|
||||
morphology = none
|
||||
min_word_len = 2
|
||||
charset_type = sbcs
|
||||
html_strip = 0
|
||||
#infix_fields = members_display_name, email, name
|
||||
#min_infix_len = 3
|
||||
#enable_star = 1
|
||||
}
|
||||
|
||||
index members_search_delta : members_search_main
|
||||
{
|
||||
source = members_search_delta
|
||||
path = <!--SPHINX_BASE_PATH-->/members_search_delta
|
||||
}
|
||||
|
||||
|
||||
EOF;
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,39 +1,104 @@
|
||||
function checkform() {
|
||||
|
||||
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 stripGuestLegend()
|
||||
{
|
||||
$$('.guest_legend').each(
|
||||
function( elem )
|
||||
{
|
||||
elem.hide();
|
||||
}
|
||||
);
|
||||
//$('tabtab-GROUPS|6').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 += 'Пользователи этой группы имеют доступ к Админцентру\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');
|
||||
|
||||
cbox = new Element('input', { type: 'checkbox', name: field + '_cb', id: field + '_cb' } );
|
||||
span = new Element('span').addClassName('desctext').update(" Unlimited");
|
||||
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();
|
||||
}
|
||||
);
|
||||
//$('tabtab-GROUPS|6').hide();
|
||||
|
||||
$('g_view_board_no').observe('click', function(e){
|
||||
$('g_view_board_warning').style.display = 'inline';
|
||||
});
|
||||
$('g_view_board_yes').observe('click', function(e){
|
||||
$('g_view_board_warning').style.display = 'none';
|
||||
});
|
||||
}
|
||||
@@ -1,38 +1,38 @@
|
||||
function check_boxes()
|
||||
{
|
||||
var ticked = $('maincheckbox').checked;
|
||||
|
||||
var checkboxes = document.getElementsByTagName('input');
|
||||
|
||||
for ( var i = 0 ; i <= checkboxes.length ; i++ )
|
||||
{
|
||||
var e = checkboxes[i];
|
||||
|
||||
if ( typeof(e) != 'undefined' && e.type == 'checkbox')
|
||||
{
|
||||
var boxname = e.id;
|
||||
var boxcheck = boxname.replace( /^(.+?)_.+?$/, "$1" );
|
||||
|
||||
if ( boxcheck == 'mid' )
|
||||
{
|
||||
e.checked = ticked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkThisForm()
|
||||
{
|
||||
var selectedOpt = $F('manage_type');
|
||||
|
||||
if( selectedOpt == 'delete' )
|
||||
{
|
||||
return confirm( "Are you SURE you want to delete all of the selected accounts?\n\nThere are no other confirmation screens and there is no way to undo this action!" );
|
||||
}
|
||||
else if( selectedOpt == 'unban' )
|
||||
{
|
||||
return confirm( "Please note that this action ONLY removes the 'Ban this member' flag!\n\nIf you moved the member to a banned group, or banned the member's IP address, email address or username, you will need to update each of these items separately.\n\nAlternatively you can click 'Cancel' and click on the member's name to use the member's centralized ban management panel." );
|
||||
}
|
||||
|
||||
return false;
|
||||
function check_boxes()
|
||||
{
|
||||
var ticked = $('maincheckbox').checked;
|
||||
|
||||
var checkboxes = document.getElementsByTagName('input');
|
||||
|
||||
for ( var i = 0 ; i <= checkboxes.length ; i++ )
|
||||
{
|
||||
var e = checkboxes[i];
|
||||
|
||||
if ( typeof(e) != 'undefined' && e.type == 'checkbox')
|
||||
{
|
||||
var boxname = e.id;
|
||||
var boxcheck = boxname.replace( /^(.+?)_.+?$/, "$1" );
|
||||
|
||||
if ( boxcheck == 'mid' )
|
||||
{
|
||||
e.checked = ticked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function checkThisForm()
|
||||
{
|
||||
var selectedOpt = $F('manage_type');
|
||||
|
||||
if( selectedOpt == 'delete' )
|
||||
{
|
||||
return confirm( "Вы действительно хотите удалить все отмеченные учетные записи?\n\nЭто действие невозможно будет остановить и/или отменить!" );
|
||||
}
|
||||
else if( selectedOpt == 'unban' )
|
||||
{
|
||||
return confirm( "Данной действие только убирает флаг 'Блокировки пользователя'!\n\nЕсли пользователь был перенесен в группу для заблокированных, или был добавлен IP адрес, email адрес или логин пользователя в список заблокированных, вам необходимо самостоятельно убрать эти ограничения.\n\nВы также можете нажать кнопку 'Отменить' и кликнув по имени пользователя перейти в централизованную панель управления блокировкой пользоватля." );
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Define the default ajax section
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Define the default bulkmail section
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Define the default groups section
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,278 +1,280 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Ban Filters
|
||||
* Last Updated: $Date: 2009-10-01 10:02:08 -0400 (Thu, 01 Oct 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 5190 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Skin object
|
||||
*
|
||||
* @access private
|
||||
* @var object Skin templates
|
||||
*/
|
||||
private $html;
|
||||
|
||||
/**
|
||||
* Shortcut for url
|
||||
*
|
||||
* @access private
|
||||
* @var string URL shortcut
|
||||
*/
|
||||
private $form_code;
|
||||
|
||||
/**
|
||||
* Shortcut for url (javascript)
|
||||
*
|
||||
* @access private
|
||||
* @var string JS URL shortcut
|
||||
*/
|
||||
private $form_code_js;
|
||||
|
||||
/**
|
||||
* Main class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Load skin
|
||||
//-----------------------------------------
|
||||
|
||||
$this->html = $this->registry->output->loadTemplate( 'cp_skin_banfilters' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up stuff
|
||||
//-----------------------------------------
|
||||
|
||||
$this->form_code = $this->html->form_code = 'module=members&section=banfilters';
|
||||
$this->form_code_js = $this->html->form_code_js = 'module=members§ion=banfilters';
|
||||
|
||||
//-----------------------------------------
|
||||
// Load lang
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// 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;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Pass to CP output hander
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new ban filter
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function banAdd()
|
||||
{
|
||||
/* 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' => $this->request['bantype'], 'ban_content' => trim( $this->request['bantext'] ), 'ban_date' => time() ) );
|
||||
|
||||
/* Rebuild cacne and bounce */
|
||||
$this->rebuildBanCache();
|
||||
|
||||
$this->registry->output->global_message = $this->lang->words['ban_added'];
|
||||
$this->banOverview();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a ban filter
|
||||
*
|
||||
* @access public
|
||||
* @return 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( "/^id_(\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 ) . ')' );
|
||||
$this->DB->execute();
|
||||
}
|
||||
|
||||
/* Rebuild the cache */
|
||||
$this->rebuildBanCache();
|
||||
|
||||
/* Bounce */
|
||||
$this->registry->output->global_message = $this->lang->words['ban_removed'];
|
||||
$this->banOverview();
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the ban overview screen
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function banOverview()
|
||||
{
|
||||
/* INI */
|
||||
$ban = 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 */
|
||||
$ips = array();
|
||||
|
||||
if( isset( $ban['ip'] ) AND is_array( $ban['ip'] ) AND count( $ban['ip'] ) )
|
||||
{
|
||||
foreach( $ban['ip'] as $entry )
|
||||
{
|
||||
$entry['_checkbox'] = "<input type='checkbox' name='id_{$entry['ban_id']}' value='1' />";
|
||||
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT' );
|
||||
$ips[] = $entry;
|
||||
}
|
||||
}
|
||||
|
||||
/* Emails */
|
||||
$emails = array();
|
||||
|
||||
if( isset( $ban['email'] ) AND is_array( $ban['email'] ) AND count( $ban['email'] ) )
|
||||
{
|
||||
foreach( $ban['email'] as $entry )
|
||||
{
|
||||
$entry['_checkbox'] = "<input type='checkbox' name='id_{$entry['ban_id']}' value='1' />";
|
||||
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT' );
|
||||
$emails[] = $entry;
|
||||
}
|
||||
}
|
||||
|
||||
/* Banned Names */
|
||||
$names = array();
|
||||
|
||||
if( isset( $ban['name'] ) AND is_array( $ban['name'] ) AND count( $ban['name'] ) )
|
||||
{
|
||||
foreach( $ban['name'] as $entry )
|
||||
{
|
||||
$entry['_checkbox'] = "<input type='checkbox' name='id_{$entry['ban_id']}' value='1' />";
|
||||
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT' );
|
||||
$names[] = $entry;
|
||||
}
|
||||
}
|
||||
|
||||
/* Output */
|
||||
$this->registry->output->html .= $this->html->banOverview( $ips, $emails, $names );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuilds the ban cache
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function rebuildBanCache()
|
||||
{
|
||||
/* INI */
|
||||
$cache = array();
|
||||
|
||||
/* Get the ban filters */
|
||||
$this->DB->build( array( 'select' => 'ban_content', 'from' => 'banfilters', 'where' => "ban_type='ip' AND ban_nocache=0" ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while ( $r = $this->DB->fetch() )
|
||||
{
|
||||
$cache[] = $r['ban_content'];
|
||||
}
|
||||
|
||||
/* Update the cache */
|
||||
$this->cache->setCache( 'banfilters', $cache, array( 'array' => 1 ) );
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Ban Filters
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Skin object
|
||||
*
|
||||
* @access private
|
||||
* @var object Skin templates
|
||||
*/
|
||||
private $html;
|
||||
|
||||
/**
|
||||
* Shortcut for url
|
||||
*
|
||||
* @access private
|
||||
* @var string URL shortcut
|
||||
*/
|
||||
private $form_code;
|
||||
|
||||
/**
|
||||
* Shortcut for url (javascript)
|
||||
*
|
||||
* @access private
|
||||
* @var string JS URL shortcut
|
||||
*/
|
||||
private $form_code_js;
|
||||
|
||||
/**
|
||||
* Main class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Load skin
|
||||
//-----------------------------------------
|
||||
|
||||
$this->html = $this->registry->output->loadTemplate( 'cp_skin_banfilters' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Set up stuff
|
||||
//-----------------------------------------
|
||||
|
||||
$this->form_code = $this->html->form_code = 'module=members&section=banfilters';
|
||||
$this->form_code_js = $this->html->form_code_js = 'module=members§ion=banfilters';
|
||||
|
||||
//-----------------------------------------
|
||||
// Load lang
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'admin_member' ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// 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;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Pass to CP output hander
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new ban filter
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function banAdd()
|
||||
{
|
||||
/* 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' => $this->request['bantype'], 'ban_content' => trim( $this->request['bantext'] ), 'ban_date' => time() ) );
|
||||
|
||||
/* Rebuild cacne and bounce */
|
||||
$this->rebuildBanCache();
|
||||
|
||||
$this->registry->output->global_message = $this->lang->words['ban_added'];
|
||||
$this->banOverview();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a ban filter
|
||||
*
|
||||
* @access public
|
||||
* @return 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( "/^id_(\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 ) . ')' );
|
||||
$this->DB->execute();
|
||||
}
|
||||
|
||||
/* Rebuild the cache */
|
||||
$this->rebuildBanCache();
|
||||
|
||||
/* Bounce */
|
||||
$this->registry->output->global_message = $this->lang->words['ban_removed'];
|
||||
$this->banOverview();
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays the ban overview screen
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function banOverview()
|
||||
{
|
||||
/* INI */
|
||||
$ban = 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 */
|
||||
$ips = array();
|
||||
|
||||
if( isset( $ban['ip'] ) AND is_array( $ban['ip'] ) AND count( $ban['ip'] ) )
|
||||
{
|
||||
foreach( $ban['ip'] as $entry )
|
||||
{
|
||||
$entry['_checkbox'] = "<input type='checkbox' name='id_{$entry['ban_id']}' value='1' />";
|
||||
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT' );
|
||||
$ips[] = $entry;
|
||||
}
|
||||
}
|
||||
|
||||
/* Emails */
|
||||
$emails = array();
|
||||
|
||||
if( isset( $ban['email'] ) AND is_array( $ban['email'] ) AND count( $ban['email'] ) )
|
||||
{
|
||||
foreach( $ban['email'] as $entry )
|
||||
{
|
||||
$entry['_checkbox'] = "<input type='checkbox' name='id_{$entry['ban_id']}' value='1' />";
|
||||
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT' );
|
||||
$emails[] = $entry;
|
||||
}
|
||||
}
|
||||
|
||||
/* Banned Names */
|
||||
$names = array();
|
||||
|
||||
if( isset( $ban['name'] ) AND is_array( $ban['name'] ) AND count( $ban['name'] ) )
|
||||
{
|
||||
foreach( $ban['name'] as $entry )
|
||||
{
|
||||
$entry['_checkbox'] = "<input type='checkbox' name='id_{$entry['ban_id']}' value='1' />";
|
||||
$entry['_date'] = $this->registry->class_localization->getDate( $entry['ban_date'], 'SHORT' );
|
||||
$names[] = $entry;
|
||||
}
|
||||
}
|
||||
|
||||
/* Output */
|
||||
$this->registry->output->html .= $this->html->banOverview( $ips, $emails, $names );
|
||||
}
|
||||
|
||||
/**
|
||||
* Rebuilds the ban cache
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function rebuildBanCache()
|
||||
{
|
||||
/* INI */
|
||||
$cache = array();
|
||||
|
||||
/* Get the ban filters */
|
||||
$this->DB->build( array( 'select' => 'ban_content', 'from' => 'banfilters', 'where' => "ban_type='ip' AND ban_nocache=0" ) );
|
||||
$this->DB->execute();
|
||||
|
||||
while ( $r = $this->DB->fetch() )
|
||||
{
|
||||
$cache[] = $r['ban_content'];
|
||||
}
|
||||
|
||||
/* Update the cache */
|
||||
$this->cache->setCache( 'banfilters', $cache, array( 'array' => 1 ) );
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Define the default members section
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,183 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Configure default notification options
|
||||
* Last Updated: $Date: 2010-06-17 21:29:47 -0400 (Thu, 17 Jun 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 6553 $
|
||||
*
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @access private
|
||||
* @var object Skin templates
|
||||
*/
|
||||
private $html;
|
||||
|
||||
/**
|
||||
* Shortcut for url
|
||||
*
|
||||
* @access private
|
||||
* @var string URL shortcut
|
||||
*/
|
||||
private $form_code;
|
||||
|
||||
/**
|
||||
* Shortcut for url (javascript)
|
||||
*
|
||||
* @access private
|
||||
* @var string JS URL shortcut
|
||||
*/
|
||||
private $form_code_js;
|
||||
|
||||
/**
|
||||
* Notifications library
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $notifyLibrary;
|
||||
|
||||
/**
|
||||
* Main class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return 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&section=notifications';
|
||||
$this->form_code_js = $this->html->form_code_js = 'module=members§ion=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
|
||||
*
|
||||
* @access public
|
||||
* @return 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
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function saveDefaults()
|
||||
{
|
||||
$_configOptions = $this->notifyLibrary->getNotificationData();
|
||||
$_notifyConfig = $this->notifyLibrary->getDefaultNotificationConfig();
|
||||
$_noPrivateMessage = array( 'new_private_message', 'reply_private_message' );
|
||||
|
||||
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'] ]);
|
||||
|
||||
/**
|
||||
* @link http://community.invisionpower.com/tracker/issue-23453-notification-defaults/
|
||||
*/
|
||||
if( in_array( $option['key'], $_noPrivateMessage ) AND in_array( 'pm', $_notifyConfig[ $option['key'] ]['selected'] ) )
|
||||
{
|
||||
$_newSelected = array();
|
||||
|
||||
foreach( $_notifyConfig[ $option['key'] ]['selected'] as $_v )
|
||||
{
|
||||
if( $_v != 'pm' )
|
||||
{
|
||||
$_newSelected[] = $_v;
|
||||
}
|
||||
}
|
||||
|
||||
$_notifyConfig[ $option['key'] ]['selected'] = $_newSelected;
|
||||
}
|
||||
}
|
||||
|
||||
$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,334 +1,336 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Member management
|
||||
* Last Updated: $Date: 2009-10-01 10:02:08 -0400 (Thu, 01 Oct 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Revision: 5190 $
|
||||
*
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @access private
|
||||
* @var object Skin templates
|
||||
*/
|
||||
private $html;
|
||||
|
||||
/**
|
||||
* Shortcut for url
|
||||
*
|
||||
* @access private
|
||||
* @var string URL shortcut
|
||||
*/
|
||||
private $form_code;
|
||||
|
||||
/**
|
||||
* Shortcut for url (javascript)
|
||||
*
|
||||
* @access private
|
||||
* @var string JS URL shortcut
|
||||
*/
|
||||
private $form_code_js;
|
||||
|
||||
/**
|
||||
* Editor object
|
||||
*
|
||||
* @access private
|
||||
* @var object Editor library
|
||||
*/
|
||||
private $han_editor;
|
||||
|
||||
/**
|
||||
* Trash can forum id
|
||||
*
|
||||
* @access private
|
||||
* @var integer Trash can forum
|
||||
*/
|
||||
private $trash_forum = 0;
|
||||
|
||||
/**
|
||||
* Main class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return 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&section=ranks';
|
||||
$this->form_code_js = $this->html->form_code_js = 'module=members§ion=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
|
||||
*
|
||||
* @access public
|
||||
* @return 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
|
||||
*
|
||||
* @access protected
|
||||
* @return 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]
|
||||
*
|
||||
* @access protected
|
||||
* @param string 'add' or 'edit'
|
||||
* @return 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->doneScreen($this->lang->words['rnk_added2'], $this->lang->words['rnk_rankcontrol'], "{$this->form_code}&do=title", 'redirect' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->doneScreen($this->lang->words['rnk_edited'], $this->lang->words['rnk_rankcontrol'], "{$this->form_code}&do=title", 'redirect' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a rank
|
||||
*
|
||||
* @access protected
|
||||
* @return 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->doneScreen($this->lang->words['rnk_removed2'], $this->lang->words['rnk_rankcontrol'], "{$this->form_code}&do=title", 'redirect' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the form to add/edit a rank
|
||||
*
|
||||
* @access protected
|
||||
* @param string Type of form (add|edit)
|
||||
* @return 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.1.4
|
||||
* Member management
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Revision: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @access private
|
||||
* @var object Skin templates
|
||||
*/
|
||||
private $html;
|
||||
|
||||
/**
|
||||
* Shortcut for url
|
||||
*
|
||||
* @access private
|
||||
* @var string URL shortcut
|
||||
*/
|
||||
private $form_code;
|
||||
|
||||
/**
|
||||
* Shortcut for url (javascript)
|
||||
*
|
||||
* @access private
|
||||
* @var string JS URL shortcut
|
||||
*/
|
||||
private $form_code_js;
|
||||
|
||||
/**
|
||||
* Editor object
|
||||
*
|
||||
* @access private
|
||||
* @var object Editor library
|
||||
*/
|
||||
private $han_editor;
|
||||
|
||||
/**
|
||||
* Trash can forum id
|
||||
*
|
||||
* @access private
|
||||
* @var integer Trash can forum
|
||||
*/
|
||||
private $trash_forum = 0;
|
||||
|
||||
/**
|
||||
* Main class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return 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&section=ranks';
|
||||
$this->form_code_js = $this->html->form_code_js = 'module=members§ion=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
|
||||
*
|
||||
* @access public
|
||||
* @return 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
|
||||
*
|
||||
* @access protected
|
||||
* @return 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]
|
||||
*
|
||||
* @access protected
|
||||
* @param string 'add' or 'edit'
|
||||
* @return 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->doneScreen($this->lang->words['rnk_added2'], $this->lang->words['rnk_rankcontrol'], "{$this->form_code}&do=title", 'redirect' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->doneScreen($this->lang->words['rnk_edited'], $this->lang->words['rnk_rankcontrol'], "{$this->form_code}&do=title", 'redirect' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a rank
|
||||
*
|
||||
* @access protected
|
||||
* @return 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->doneScreen($this->lang->words['rnk_removed2'], $this->lang->words['rnk_rankcontrol'], "{$this->form_code}&do=title", 'redirect' );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show the form to add/edit a rank
|
||||
*
|
||||
* @access protected
|
||||
* @param string Type of form (add|edit)
|
||||
* @return 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,299 +1,301 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Reputation System
|
||||
* Last Updated: $Date: 2009-10-01 10:02:08 -0400 (Thu, 01 Oct 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @version $Rev: 5190 $
|
||||
*
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @access private
|
||||
* @var object Skin templates
|
||||
*/
|
||||
private $html;
|
||||
|
||||
/**
|
||||
* Shortcut for url
|
||||
*
|
||||
* @access private
|
||||
* @var string URL shortcut
|
||||
*/
|
||||
private $form_code;
|
||||
|
||||
/**
|
||||
* Shortcut for url (javascript)
|
||||
*
|
||||
* @access private
|
||||
* @var string JS URL shortcut
|
||||
*/
|
||||
private $form_code_js;
|
||||
|
||||
/**
|
||||
* Main class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return 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&section=reputation';
|
||||
$this->form_code_js = $this->html->form_code_js = 'module=members§ion=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
|
||||
*
|
||||
* @access public
|
||||
* @return 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
|
||||
*
|
||||
* @access public
|
||||
* @return 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->doneScreen( $this->lang->words['rep_level_removed'], $this->lang->words['rep_management'], $this->form_code, 'redirect' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the add/edit reputation level form
|
||||
*
|
||||
* @access public
|
||||
* @param string $mode Either add or edit
|
||||
* @return 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->doneScreen( $this->lang->words['rep_level_added'], $this->lang->words['rep_management'], $this->form_code, 'redirect' );
|
||||
}
|
||||
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->doneScreen( $this->lang->words['rep_level_edited'], $this->lang->words['rep_management'], $this->form_code, 'redirect' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Form for adding/exiting reputation levels
|
||||
*
|
||||
* @access public
|
||||
* @param string $mode Either add or edit
|
||||
* @param array $errors Array of error messages to display
|
||||
* @return 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
|
||||
*
|
||||
* @access public
|
||||
* @return 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.1.4
|
||||
* Reputation System
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
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
|
||||
*
|
||||
* @access private
|
||||
* @var object Skin templates
|
||||
*/
|
||||
private $html;
|
||||
|
||||
/**
|
||||
* Shortcut for url
|
||||
*
|
||||
* @access private
|
||||
* @var string URL shortcut
|
||||
*/
|
||||
private $form_code;
|
||||
|
||||
/**
|
||||
* Shortcut for url (javascript)
|
||||
*
|
||||
* @access private
|
||||
* @var string JS URL shortcut
|
||||
*/
|
||||
private $form_code_js;
|
||||
|
||||
/**
|
||||
* Main class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return 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&section=reputation';
|
||||
$this->form_code_js = $this->html->form_code_js = 'module=members§ion=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
|
||||
*
|
||||
* @access public
|
||||
* @return 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
|
||||
*
|
||||
* @access public
|
||||
* @return 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->doneScreen( $this->lang->words['rep_level_removed'], $this->lang->words['rep_management'], $this->form_code, 'redirect' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the add/edit reputation level form
|
||||
*
|
||||
* @access public
|
||||
* @param string $mode Either add or edit
|
||||
* @return 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->doneScreen( $this->lang->words['rep_level_added'], $this->lang->words['rep_management'], $this->form_code, 'redirect' );
|
||||
}
|
||||
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->doneScreen( $this->lang->words['rep_level_edited'], $this->lang->words['rep_management'], $this->form_code, 'redirect' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Form for adding/exiting reputation levels
|
||||
*
|
||||
* @access public
|
||||
* @param string $mode Either add or edit
|
||||
* @param array $errors Array of error messages to display
|
||||
* @return 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
|
||||
*
|
||||
* @access public
|
||||
* @return 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 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -14,28 +14,35 @@
|
||||
<subitem>
|
||||
<subitemtitle>Список неактивированных</subitemtitle>
|
||||
<subsection>tools</subsection>
|
||||
<subitemurl>do=validating</subitemurl>
|
||||
<subitemurl>section=tools&do=validating</subitemurl>
|
||||
<subitemrolekey></subitemrolekey>
|
||||
<subisredirect>0</subisredirect>
|
||||
</subitem>
|
||||
<subitem>
|
||||
<subitemtitle>Список заблокированных</subitemtitle>
|
||||
<subsection>tools</subsection>
|
||||
<subitemurl>do=locked</subitemurl>
|
||||
<subitemurl>section=tools&do=locked</subitemurl>
|
||||
<subitemrolekey></subitemrolekey>
|
||||
<subisredirect>0</subisredirect>
|
||||
</subitem>
|
||||
<subitem>
|
||||
<subitemtitle>Список забаненных</subitemtitle>
|
||||
<subsection>tools</subsection>
|
||||
<subitemurl>do=banned</subitemurl>
|
||||
<subitemurl>section=tools&do=banned</subitemurl>
|
||||
<subitemrolekey></subitemrolekey>
|
||||
<subisredirect>0</subisredirect>
|
||||
</subitem>
|
||||
<subitem>
|
||||
<subitemtitle>Список спамеров</subitemtitle>
|
||||
<subsection>tools</subsection>
|
||||
<subitemurl>do=spam</subitemurl>
|
||||
<subitemurl>section=tools&do=spam</subitemurl>
|
||||
<subitemrolekey></subitemrolekey>
|
||||
<subisredirect>0</subisredirect>
|
||||
</subitem>
|
||||
<subitem>
|
||||
<subitemtitle>Список не завершивших регистрацию</subitemtitle>
|
||||
<subsection>members</subsection>
|
||||
<subitemurl>section=tools&do=incomplete</subitemurl>
|
||||
<subitemrolekey></subitemrolekey>
|
||||
<subisredirect>0</subisredirect>
|
||||
</subitem>
|
||||
@@ -131,6 +138,19 @@
|
||||
<subisredirect>0</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Настройки уведомлений</title>
|
||||
<subitems>
|
||||
<subitem>
|
||||
<subitemtitle>Настройки уведомлений</subitemtitle>
|
||||
<subsection>notifications</subsection>
|
||||
<subitemurl></subitemurl>
|
||||
<subitemrolekey></subitemrolekey>
|
||||
<subisredirect>0</subisredirect>
|
||||
</subitem>
|
||||
</subitems>
|
||||
</item>
|
||||
</tabitems>
|
||||
</menu>
|
||||
@@ -118,6 +118,10 @@
|
||||
<group>
|
||||
<grouptitle>Дополнительные поля</grouptitle>
|
||||
<items>
|
||||
<item>
|
||||
<key>profilefields_global</key>
|
||||
<string>Can access custom profile fields management?</string>
|
||||
</item>
|
||||
<item>
|
||||
<key>profilefields_add</key>
|
||||
<string>Может добавлять новые?</string>
|
||||
@@ -158,4 +162,13 @@
|
||||
</item>
|
||||
</items>
|
||||
</group>
|
||||
<group>
|
||||
<grouptitle>Уведомления</grouptitle>
|
||||
<items>
|
||||
<item>
|
||||
<key>configure_notifications</key>
|
||||
<string>Может настраивать уведомления?</string>
|
||||
</item>
|
||||
</items>
|
||||
</group>
|
||||
</permissions>
|
||||
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Define the default restrictions section
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,83 +1,109 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Profile AJAX hCard
|
||||
* Last Updated: $Date: 2009-09-30 06:58:35 -0400 (Wed, 30 Sep 2009) $
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 5180 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_card extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile') );
|
||||
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['mid'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Can we access?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$this->memberData['g_mem_info'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
if( !$member_id )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
$member = IPSMember::load( $member_id, 'profile_portal,pfields_content,sessions,groups,basic', 'id' );
|
||||
|
||||
if( !$member['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_online' ), 'members' );
|
||||
|
||||
$member = IPSMember::buildDisplayData( $member, array( 'customFields' => 1, 'cfSkinGroup' => 'profile', 'spamStatus' => 1 ) );
|
||||
$member = IPSMember::getLocation( $member );
|
||||
|
||||
$board_posts = $this->caches['stats']['total_topics'] + $this->caches['stats']['total_replies'];
|
||||
|
||||
if( $member['posts'] and $board_posts )
|
||||
{
|
||||
$member['_posts_day'] = round( $member['posts'] / ( ( time() - $member['joined']) / 86400 ), 2 );
|
||||
|
||||
# Fix the issue when there is less than one day
|
||||
$member['_posts_day'] = ( $member['_posts_day'] > $member['posts'] ) ? $member['posts'] : $member['_posts_day'];
|
||||
$member['_total_pct'] = sprintf( '%.2f', ( $member['posts'] / $board_posts * 100 ) );
|
||||
}
|
||||
|
||||
$member['_posts_day'] = floatval( $member['_posts_day'] );
|
||||
|
||||
$this->returnHtml( $this->registry->getClass('output')->getTemplate('profile')->showCard( $member ) );
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile AJAX hCard
|
||||
* Last Updated: $Date: 2010-09-08 12:09:02 -0400 (Wed, 08 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6840 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_card extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile') );
|
||||
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['mid'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Can we access?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$this->memberData['g_mem_info'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
if( !$member_id )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
$member = IPSMember::load( $member_id, 'profile_portal,pfields_content,sessions,groups,basic', 'id' );
|
||||
|
||||
if( !$member['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_online' ), 'members' );
|
||||
|
||||
$member = IPSMember::buildDisplayData( $member, array( 'customFields' => 1, 'cfSkinGroup' => 'profile', 'spamStatus' => 1 ) );
|
||||
$member = IPSMember::getLocation( $member );
|
||||
|
||||
$board_posts = $this->caches['stats']['total_topics'] + $this->caches['stats']['total_replies'];
|
||||
|
||||
if( $member['posts'] and $board_posts )
|
||||
{
|
||||
$member['_posts_day'] = round( $member['posts'] / ( ( time() - $member['joined']) / 86400 ), 2 );
|
||||
|
||||
# Fix the issue when there is less than one day
|
||||
$member['_posts_day'] = ( $member['_posts_day'] > $member['posts'] ) ? $member['posts'] : $member['_posts_day'];
|
||||
$member['_total_pct'] = sprintf( '%.2f', ( $member['posts'] / $board_posts * 100 ) );
|
||||
}
|
||||
|
||||
$member['_posts_day'] = floatval( $member['_posts_day'] );
|
||||
|
||||
/* 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() ) );
|
||||
}
|
||||
|
||||
/* Fetch */
|
||||
$member['_status'] = $this->registry->getClass('memberStatus')->fetch( $this->memberData, array( 'member_id' => $member['member_id'], 'limit' => 1 ) );
|
||||
|
||||
if ( is_array( $member['_status'] ) AND count( $member['_status'] ) )
|
||||
{
|
||||
$member['_status'] = array_pop( $member['_status'] );
|
||||
}
|
||||
|
||||
/* Reputation */
|
||||
if ( $this->settings['reputation_protected_groups'] )
|
||||
{
|
||||
if ( in_array( $this->memberData['member_group_id'], explode( ",", $this->settings['reputation_protected_groups'] ) ) )
|
||||
{
|
||||
$this->settings['reputation_show_profile'] = false;
|
||||
}
|
||||
}
|
||||
|
||||
$this->returnHtml( $this->registry->getClass('output')->getTemplate('profile')->showCard( $member ) );
|
||||
}
|
||||
}
|
||||
@@ -1,232 +1,234 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Profile AJAX Comment Handler
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 4948 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_comments extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Comments library
|
||||
*
|
||||
* @access private
|
||||
* @var object
|
||||
*/
|
||||
private $comments;
|
||||
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/sources/comments.php' );
|
||||
$this->comments = new profileCommentsLib( $this->registry );
|
||||
|
||||
switch( $this->request[ 'do' ] )
|
||||
{
|
||||
case 'view':
|
||||
default:
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( intval( $this->request['member_id'] ) ) ) );
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
$this->_addComment();
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$this->_deleteComment();
|
||||
break;
|
||||
|
||||
case 'approve':
|
||||
$this->_approveComment();
|
||||
break;
|
||||
|
||||
case 'reload':
|
||||
$this->_reloadComment();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Approve a comment on member's profile
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
private function _approveComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$comment_id = intval( $this->request['comment_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete
|
||||
//-----------------------------------------
|
||||
|
||||
$result = $this->comments->approveComment( $member_id, $comment_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( $member_id ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload comments
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-15
|
||||
*/
|
||||
private function _reloadComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Regenerate comments...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->returnHtml( $this->comments->buildComments( $member ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a comment on member's profile
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
private function _deleteComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$comment_id = intval( $this->request['comment_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete
|
||||
//-----------------------------------------
|
||||
|
||||
$result = $this->comments->deleteComment( $member_id, $comment_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( $member_id ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saves a comment on member's profile
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
private function _addComment()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
|
||||
$result = $this->comments->addCommentToDB( $member_id, IPSText::parseCleanValue( $_POST['comment'] ) );
|
||||
|
||||
/* Check for error */
|
||||
if( $result AND $result != 'pp_comment_added_mod' )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( $member_id ), $new_id, $return_msg ) );
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile AJAX Comment Handler
|
||||
* Last Updated: $Date: 2010-09-07 14:10:16 -0400 (Tue, 07 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6834 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_comments extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Comments library
|
||||
*
|
||||
* @access protected
|
||||
* @var object
|
||||
*/
|
||||
protected $comments;
|
||||
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/comments.php', 'profileCommentsLib', 'members' );
|
||||
$this->comments = new $classToLoad( $this->registry );
|
||||
|
||||
switch( $this->request[ 'do' ] )
|
||||
{
|
||||
case 'view':
|
||||
default:
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( intval( $this->request['member_id'] ) ) ) );
|
||||
break;
|
||||
|
||||
case 'add':
|
||||
$this->_addComment();
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$this->_deleteComment();
|
||||
break;
|
||||
|
||||
case 'approve':
|
||||
$this->_approveComment();
|
||||
break;
|
||||
|
||||
case 'reload':
|
||||
$this->_reloadComment();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Approve a comment on member's profile
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
protected function _approveComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$comment_id = intval( $this->request['comment_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete
|
||||
//-----------------------------------------
|
||||
|
||||
$result = $this->comments->approveComment( $member_id, $comment_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( $member_id ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reload comments
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-15
|
||||
*/
|
||||
protected function _reloadComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Regenerate comments...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->returnHtml( $this->comments->buildComments( $member ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deletes a comment on member's profile
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
protected function _deleteComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$comment_id = intval( $this->request['comment_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Delete
|
||||
//-----------------------------------------
|
||||
|
||||
$result = $this->comments->deleteComment( $member_id, $comment_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( $member_id ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Saves a comment on member's profile
|
||||
*
|
||||
* @access protected
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
protected function _addComment()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
|
||||
$result = $this->comments->addCommentToDB( $member_id, IPSText::parseCleanValue( $_POST['comment'] ) );
|
||||
|
||||
/* Check for error */
|
||||
if( $result AND $result != 'pp_comment_added_mod' )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->comments->buildComments( IPSMember::load( $member_id ), 0, '' ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Profile display name history
|
||||
* Last Updated: $Date: 2010-04-15 15:46:26 -0400 (Thu, 15 Apr 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 4948 $
|
||||
* @version $Revision: 6133 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,51 +1,53 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Member AJAX DST switcher
|
||||
* Last Updated: $Date: 2009-09-29 17:59:02 -0400 (Tue, 29 Sep 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 5178 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_dst extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
if( !$this->memberData['member_id'] )
|
||||
{
|
||||
$this->returnNull();
|
||||
}
|
||||
|
||||
if( $this->memberData['members_auto_dst'] == 1 AND $this->settings['time_dst_auto_correction'] )
|
||||
{
|
||||
$newValue = $this->memberData['dst_in_use'] ? 0 : 1;
|
||||
|
||||
IPSMember::save( $this->memberData['member_id'], array( 'members' => array( 'dst_in_use' => $newValue ) ) );
|
||||
}
|
||||
|
||||
$this->returnNull();
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Member AJAX DST switcher
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_dst extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
if( !$this->memberData['member_id'] )
|
||||
{
|
||||
$this->returnNull();
|
||||
}
|
||||
|
||||
if( $this->memberData['members_auto_dst'] == 1 AND $this->settings['time_dst_auto_correction'] )
|
||||
{
|
||||
$newValue = $this->memberData['dst_in_use'] ? 0 : 1;
|
||||
|
||||
IPSMember::save( $this->memberData['member_id'], array( 'members' => array( 'dst_in_use' => $newValue ) ) );
|
||||
}
|
||||
|
||||
$this->returnNull();
|
||||
}
|
||||
}
|
||||
@@ -1,202 +1,204 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Profile AJAX Comment Handler
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 4948 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_friends extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Friends library
|
||||
*
|
||||
* @access private
|
||||
* @var object
|
||||
*/
|
||||
private $friends;
|
||||
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Friends Enabled */
|
||||
if( ! $this->settings['friends_enabled'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'friends_not_enabled', 10220 );
|
||||
}
|
||||
|
||||
/* Friends Library */
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/sources/friends.php' );
|
||||
$this->friends = new profileFriendsLib( $registry );
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'add':
|
||||
$this->_addFriend();
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
$this->_removeFriend();
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
$this->_iframeList();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the content for the friends tab
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-15
|
||||
*/
|
||||
private function _iframeList()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$content = '';
|
||||
$friends = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( $this->lang->words['nofriendid'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab the friends
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'f.*',
|
||||
'from' => array( 'profile_friends' => 'f' ),
|
||||
'where' => 'f.friends_member_id=' . $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' )
|
||||
)
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Get and store...
|
||||
//-----------------------------------------
|
||||
|
||||
while( $row = $this->DB->fetch($outer) )
|
||||
{
|
||||
$row['members_display_name_short'] = IPSText::truncate( $row['members_display_name'], 13 );
|
||||
|
||||
$friends[] = IPSMember::buildDisplayData( $row, 0 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Ok.. show the friends
|
||||
//-----------------------------------------
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->friendsIframe( $member, $friends );
|
||||
|
||||
$this->returnHtml( $content );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a friend
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function _addFriend()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
|
||||
/* Add friend */
|
||||
$result = $this->friends->addFriend( $member_id );
|
||||
|
||||
/* Add to other user as well, but only if not pending */
|
||||
if( !$this->friends->pendingApproval )
|
||||
{
|
||||
$result2 = $this->friends->addFriend( $this->memberData['member_id'], $member_id, true );
|
||||
}
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnString( 'success' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a friend
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function _removeFriend()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
|
||||
/* Remove friend */
|
||||
$result = $this->friends->removeFriend( $member_id );
|
||||
|
||||
/* Remove from other user as well */
|
||||
$result2 = $this->friends->removeFriend( $this->memberData['member_id'], $member_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnString( 'success' );
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile AJAX Comment Handler
|
||||
* Last Updated: $Date: 2010-07-14 17:57:17 -0400 (Wed, 14 Jul 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6651 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_friends extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Friends library
|
||||
*
|
||||
* @access private
|
||||
* @var object
|
||||
*/
|
||||
private $friends;
|
||||
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Friends Enabled */
|
||||
if( ! $this->settings['friends_enabled'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'friends_not_enabled', 10220 );
|
||||
}
|
||||
|
||||
/* Friends Library */
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/friends.php', 'profileFriendsLib', 'members' );
|
||||
$this->friends = new $classToLoad( $registry );
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'add':
|
||||
$this->_addFriend();
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
$this->_removeFriend();
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
$this->_iframeList();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the content for the friends tab
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-15
|
||||
*/
|
||||
private function _iframeList()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$content = '';
|
||||
$friends = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( $this->lang->words['nofriendid'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab the friends
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'f.*',
|
||||
'from' => array( 'profile_friends' => 'f' ),
|
||||
'where' => 'f.friends_member_id=' . $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' )
|
||||
)
|
||||
) );
|
||||
$outer = $this->DB->execute();
|
||||
|
||||
//-----------------------------------------
|
||||
// Get and store...
|
||||
//-----------------------------------------
|
||||
|
||||
while( $row = $this->DB->fetch($outer) )
|
||||
{
|
||||
$row['members_display_name_short'] = IPSText::truncate( $row['members_display_name'], 13 );
|
||||
|
||||
$friends[] = IPSMember::buildDisplayData( $row, 0 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Ok.. show the friends
|
||||
//-----------------------------------------
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->friendsIframe( $member, $friends );
|
||||
|
||||
$this->returnHtml( $content );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a friend
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function _addFriend()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
|
||||
/* Add friend */
|
||||
$result = $this->friends->addFriend( $member_id );
|
||||
|
||||
/* Add to other user as well, but only if not pending */
|
||||
if( !$this->friends->pendingApproval )
|
||||
{
|
||||
$result2 = $this->friends->addFriend( $this->memberData['member_id'], $member_id, true );
|
||||
}
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnString( 'success' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a friend
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function _removeFriend()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
|
||||
/* Remove friend */
|
||||
$result = $this->friends->removeFriend( $member_id );
|
||||
|
||||
/* Remove from other user as well */
|
||||
$result2 = $this->friends->removeFriend( $this->memberData['member_id'], $member_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->returnString( $result );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnString( 'success' );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,64 +1,63 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Profile AJAX Ignore User
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 4948 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_ignore extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Get ignore user quick call file */
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/modules_public/profile/ignore.php' );
|
||||
$library = new public_members_profile_ignore( $registry );
|
||||
$library->makeRegistryShortcuts( $registry );
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
default:
|
||||
case 'add':
|
||||
$result = $library->ignoreMember( $this->request['memberID'], 'topics' );
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
$result = $library->stopIgnoringMember( $this->request['memberID'], 'topics' );
|
||||
break;
|
||||
|
||||
case 'addPM':
|
||||
$result = $library->ignoreMember( $this->request['memberID'], 'messages' );
|
||||
break;
|
||||
|
||||
case 'removePM':
|
||||
$result = $library->stopIgnoringMember( $this->request['memberID'], 'messages' );
|
||||
break;
|
||||
}
|
||||
|
||||
$this->returnJsonArray( $result );
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile AJAX Ignore User
|
||||
* Last Updated: $Date: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 7007 $
|
||||
*/
|
||||
|
||||
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 public_members_ajax_ignore extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
/* Get ignore user quick call file */
|
||||
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir( 'members' ) . '/modules_public/profile/ignore.php', 'public_members_profile_ignore' );
|
||||
$library = new $classToLoad( $registry );
|
||||
$library->makeRegistryShortcuts( $registry );
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
default:
|
||||
case 'add':
|
||||
$result = $library->ignoreMember( $this->request['memberID'], 'topics' );
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
$result = $library->stopIgnoringMember( $this->request['memberID'], 'topics' );
|
||||
break;
|
||||
|
||||
case 'addPM':
|
||||
$result = $library->ignoreMember( $this->request['memberID'], 'messages' );
|
||||
break;
|
||||
|
||||
case 'removePM':
|
||||
$result = $library->stopIgnoringMember( $this->request['memberID'], 'messages' );
|
||||
break;
|
||||
}
|
||||
|
||||
$this->returnJsonArray( $result );
|
||||
}
|
||||
}
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,113 +1,115 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Profile AJAX Tab Loader
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 4948 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_load extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( ipsRegistry::$request['member_id'] );
|
||||
$tab = substr( IPSText::alphanumericalClean( str_replace( '..', '', trim( ipsRegistry::$request['tab'] ) ) ), 0, 20 );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load config
|
||||
//-----------------------------------------
|
||||
|
||||
if( !file_exists( IPSLib::getAppDir( 'members' ) . '/sources/tabs/' . $tab . '.conf.php' ) )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
require( IPSLib::getAppDir( 'members' ) . '/sources/tabs/' . $tab . '.conf.php' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Active?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $CONFIG['plugin_enabled'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load main class...
|
||||
//-----------------------------------------
|
||||
|
||||
if( !file_exists( IPSLib::getAppDir( 'members' ) . '/sources/tabs/' . $tab . '.php' ) )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
require( IPSLib::getAppDir( 'members' ) . '/sources/tabs/pluginParentClass.php' );
|
||||
require( IPSLib::getAppDir( 'members' ) . '/sources/tabs/' . $tab . '.php' );
|
||||
$_func_name = 'profile_' . $tab;
|
||||
$plugin = new $_func_name( $this->registry );
|
||||
|
||||
$html = $plugin->return_html_block( $member );
|
||||
|
||||
//-----------------------------------------
|
||||
// Return it...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->returnHtml( $html );
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile AJAX Tab Loader
|
||||
* Last Updated: $Date: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 7007 $
|
||||
*/
|
||||
|
||||
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 public_members_ajax_load extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( ipsRegistry::$request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$CONFIG = array();
|
||||
|
||||
$tab = explode( ':', ipsRegistry::$request['tab'] );
|
||||
$app = substr( IPSText::alphanumericalClean( str_replace( '..', '', trim( $tab[0] ) ) ), 0, 20 );
|
||||
$tab = substr( IPSText::alphanumericalClean( str_replace( '..', '', trim( $tab[1] ) ) ), 0, 20 );
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load config
|
||||
//-----------------------------------------
|
||||
|
||||
if( !file_exists( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.conf.php' ) )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
require( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.conf.php' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Active?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $CONFIG['plugin_enabled'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load main class...
|
||||
//-----------------------------------------
|
||||
|
||||
if( !file_exists( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.php' ) )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
require( IPSLib::getAppDir( 'members' ) . '/sources/tabs/pluginParentClass.php' );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( $app ) . '/extensions/profileTabs/' . $tab . '.php', 'profile_' . $tab, $app );
|
||||
$plugin = new $classToLoad( $this->registry );
|
||||
|
||||
$html = $plugin->return_html_block( $member );
|
||||
|
||||
//-----------------------------------------
|
||||
// Return it...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->returnHtml( $html );
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,149 +1,163 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Profile AJAX Tab Loader
|
||||
* Last Updated: $Date: 2009-09-22 17:31:43 -0400 (Tue, 22 Sep 2009) $
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 5141 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_rate extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$rating_id = intval($this->request['rating']);
|
||||
$rating_id = $rating_id > 5 ? 5 : $rating_id;
|
||||
$rating_id = $rating_id < 0 ? 0 : $rating_id;
|
||||
$member_id = intval($this->request['member_id']);
|
||||
$member = array();
|
||||
$type = 'new';
|
||||
$md5_check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$error = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->settings['pp_allow_member_rate'] )
|
||||
{
|
||||
$error['error_key'] = 'user_rate_no_perm';
|
||||
$this->returnJsonArray( $error );
|
||||
}
|
||||
|
||||
if ( ! $member_id OR ! $this->memberData['member_id'] OR $member_id == $this->memberData['member_id'] )
|
||||
{
|
||||
$error['error_key'] = 'user_rate_no_perm';
|
||||
$this->returnJsonArray( $error );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5_check != $this->member->form_hash )
|
||||
{
|
||||
$error['error_key'] = 'user_rate_no_perm3';
|
||||
$this->returnJsonArray( $error );
|
||||
}
|
||||
|
||||
$member = IPSMember::load( $member_id, 'extendedProfile,groups' );
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$error['error_key'] = 'user_rate_no_perm4';
|
||||
$this->returnJsonArray( $error );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Have we already rated?
|
||||
//-----------------------------------------
|
||||
|
||||
$rating = $this->DB->buildAndFetch( array( 'select' => '*',
|
||||
'from' => 'profile_ratings',
|
||||
'where' => "rating_for_member_id={$member_id} AND rating_by_member_id=" . $this->memberData['member_id'] ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Already rated?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $rating['rating_id'] )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Do we allow re-ratings?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $rating_id != $rating['rating_value'] )
|
||||
{
|
||||
$member['pp_rating_value'] = intval( $member['pp_rating_value'] );
|
||||
$member['pp_rating_value'] = ( $member['pp_rating_value'] + $rating_id ) - $rating['rating_value'];
|
||||
|
||||
$this->DB->update( 'profile_ratings', array( 'rating_value' => $rating_id ), 'rating_id=' . $rating['rating_id'] );
|
||||
|
||||
$this->DB->update( 'profile_portal', array( 'pp_rating_value' => $member['pp_rating_value'],
|
||||
'pp_rating_real' => round( $member['pp_rating_value'] / $member['pp_rating_hits'] ) ), 'pp_member_id=' . $member_id );
|
||||
|
||||
$type = 'update';
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// NEW RATING!
|
||||
//-----------------------------------------
|
||||
|
||||
else
|
||||
{
|
||||
$member['pp_rating_value'] = intval($member['pp_rating_value']) + $rating_id;
|
||||
$member['pp_rating_hits'] = intval($member['pp_rating_hits']) + 1;
|
||||
|
||||
$this->DB->insert( 'profile_ratings', array( 'rating_for_member_id' => $member_id,
|
||||
'rating_by_member_id' => $this->memberData['member_id'],
|
||||
'rating_value' => $rating_id,
|
||||
'rating_ip_address' => $this->member->ip_address ) );
|
||||
|
||||
$this->DB->update( 'profile_portal', array( 'pp_rating_hits' => intval($member['pp_rating_hits']),
|
||||
'pp_rating_value' => intval($member['pp_rating_value']),
|
||||
'pp_rating_real' => round( $member['pp_rating_value'] / $member['pp_rating_hits'] ) ), 'pp_member_id=' . $member_id );
|
||||
|
||||
|
||||
}
|
||||
|
||||
$member['pp_rating_real'] = round( $member['pp_rating_value'] / $member['pp_rating_hits'] );
|
||||
|
||||
$return = array(
|
||||
'rating' => $member['pp_rating_value'],
|
||||
'total' => $member['pp_rating_real'],
|
||||
'average' => $member['pp_rating_real'],
|
||||
'rated' => $type
|
||||
);
|
||||
|
||||
$this->returnJsonArray( $return );
|
||||
//$this->returnString( $member['pp_rating_value'] . ',' . $member['pp_rating_hits'] . ',' . $member['pp_rating_real'] . ',' . $type );
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile AJAX Tab Loader
|
||||
* Last Updated: $Date: 2010-07-14 23:29:48 -0400 (Wed, 14 Jul 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 6655 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_rate extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$rating_id = intval($this->request['rating']);
|
||||
$rating_id = $rating_id > 5 ? 5 : $rating_id;
|
||||
$rating_id = $rating_id < 0 ? 0 : $rating_id;
|
||||
$member_id = intval($this->request['member_id']);
|
||||
$member = array();
|
||||
$type = 'new';
|
||||
$md5_check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$error = array();
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $this->settings['pp_allow_member_rate'] )
|
||||
{
|
||||
$error['error_key'] = 'user_rate_no_perm';
|
||||
$this->returnJsonArray( $error );
|
||||
}
|
||||
|
||||
if ( ! $member_id OR ! $this->memberData['member_id'] OR $member_id == $this->memberData['member_id'] )
|
||||
{
|
||||
$error['error_key'] = 'user_rate_no_perm';
|
||||
$this->returnJsonArray( $error );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5_check != $this->member->form_hash )
|
||||
{
|
||||
$error['error_key'] = 'user_rate_no_perm3';
|
||||
$this->returnJsonArray( $error );
|
||||
}
|
||||
|
||||
$member = IPSMember::load( $member_id, 'extendedProfile,groups' );
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$error['error_key'] = 'user_rate_no_perm4';
|
||||
$this->returnJsonArray( $error );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Have we already rated?
|
||||
//-----------------------------------------
|
||||
|
||||
$rating = $this->DB->buildAndFetch( array( 'select' => '*',
|
||||
'from' => 'profile_ratings',
|
||||
'where' => "rating_for_member_id={$member_id} AND rating_by_member_id=" . $this->memberData['member_id'] ) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Already rated?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $rating['rating_id'] )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Do we allow re-ratings?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $rating_id != $rating['rating_value'] )
|
||||
{
|
||||
$member['pp_rating_value'] = intval( $member['pp_rating_value'] );
|
||||
$member['pp_rating_value'] = ( $member['pp_rating_value'] + $rating_id ) - $rating['rating_value'];
|
||||
|
||||
$this->DB->update( 'profile_ratings', array( 'rating_value' => $rating_id ), 'rating_id=' . $rating['rating_id'] );
|
||||
|
||||
$this->DB->update( 'profile_portal', array( 'pp_rating_value' => $member['pp_rating_value'],
|
||||
'pp_rating_real' => round( $member['pp_rating_value'] / $member['pp_rating_hits'] ) ), 'pp_member_id=' . $member_id );
|
||||
|
||||
$type = 'update';
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// NEW RATING!
|
||||
//-----------------------------------------
|
||||
|
||||
else
|
||||
{
|
||||
$member['pp_rating_value'] = intval($member['pp_rating_value']) + $rating_id;
|
||||
$member['pp_rating_hits'] = intval($member['pp_rating_hits']) + 1;
|
||||
|
||||
$this->DB->insert( 'profile_ratings', array( 'rating_for_member_id' => $member_id,
|
||||
'rating_by_member_id' => $this->memberData['member_id'],
|
||||
'rating_value' => $rating_id,
|
||||
'rating_ip_address' => $this->member->ip_address ) );
|
||||
|
||||
$this->DB->update( 'profile_portal', array( 'pp_rating_hits' => intval($member['pp_rating_hits']),
|
||||
'pp_rating_value' => intval($member['pp_rating_value']),
|
||||
'pp_rating_real' => round( $member['pp_rating_value'] / $member['pp_rating_hits'] ) ), 'pp_member_id=' . $member_id );
|
||||
|
||||
|
||||
}
|
||||
|
||||
$member['pp_rating_real'] = round( $member['pp_rating_value'] / $member['pp_rating_hits'] );
|
||||
|
||||
$return = array(
|
||||
'rating' => $member['pp_rating_value'],
|
||||
'total' => $member['pp_rating_real'],
|
||||
'average' => $member['pp_rating_real'],
|
||||
'rated' => $type
|
||||
);
|
||||
|
||||
$this->outputResult( $return, $member );
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method to make hooking into file easier
|
||||
*
|
||||
* @access protected
|
||||
* @param array Data to return
|
||||
* @param array Member data
|
||||
* @return void
|
||||
*/
|
||||
protected function outputResult( $return, $member )
|
||||
{
|
||||
$this->returnJsonArray( $return );
|
||||
}
|
||||
}
|
||||
@@ -1,153 +1,155 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Profile AJAX Tab Loader
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 4948 $
|
||||
* @deprecated We no longer have AJAX setting changes in profile
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_settings extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval($this->request['member_id']);
|
||||
$member = array();
|
||||
$command = trim( $this->request['cmd'] );
|
||||
$value = $this->convertAndMakeSafe( $this->request['value'], 0 );
|
||||
$md5_check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$return_string = '';
|
||||
$pp_b_day = intval( $this->request['pp_b_day'] );
|
||||
$pp_b_month = intval( $this->request['pp_b_month'] );
|
||||
$pp_b_year = intval( $this->request['pp_b_year'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5_check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member_id OR ! $this->memberData['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
if ( ! $this->memberData['g_edit_profile'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id, 'extendedProfile,groups' );
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Not the same member?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$this->memberData['g_is_supmod'] AND $member_id != $this->memberData['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Alright.. what are we doing?
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $command )
|
||||
{
|
||||
case 'birthdate':
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ) );
|
||||
|
||||
if( $pp_b_month OR $pp_b_day OR $pp_b_year )
|
||||
{
|
||||
if ( ! $pp_b_month or ! $pp_b_day )
|
||||
{
|
||||
$return_string = 'dateerror';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( $pp_b_month AND $pp_b_day AND $pp_b_year ) AND ! @checkdate( $pp_b_month, $pp_b_day, $pp_b_year ) )
|
||||
{
|
||||
$return_string = 'dateerror';
|
||||
}
|
||||
|
||||
if( $return_string != 'dateerror' )
|
||||
{
|
||||
IPSMember::save( $member_id, array( 'core' => array( 'bday_month' => intval( $pp_b_month ), 'bday_day' => intval( $pp_b_day ), 'bday_year' => intval( $pp_b_year ) ) ) );
|
||||
|
||||
$_pp_b_month = '';
|
||||
|
||||
if( $pp_b_month > 0 AND $pp_b_month < 13 )
|
||||
{
|
||||
$_pp_b_month = $this->lang->words['M_' . $pp_b_month ];
|
||||
}
|
||||
|
||||
$date_vars = array();
|
||||
|
||||
# Adding this to support birthdays that don't specify all 3 params
|
||||
|
||||
if( $_pp_b_month )
|
||||
{
|
||||
$date_vars[] = $_pp_b_month;
|
||||
}
|
||||
|
||||
if( $pp_b_day )
|
||||
{
|
||||
$date_vars[] = $pp_b_day;
|
||||
}
|
||||
|
||||
if( $pp_b_year )
|
||||
{
|
||||
$date_vars[] = $pp_b_year;
|
||||
}
|
||||
|
||||
$return_string = ( count($date_vars) ) ? implode( '-', $date_vars ) : $this->lang->words['m_bday_unknown'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->returnString( $return_string );
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile AJAX Tab Loader
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 5713 $
|
||||
* @deprecated We no longer have AJAX setting changes in profile
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_settings extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval($this->request['member_id']);
|
||||
$member = array();
|
||||
$command = trim( $this->request['cmd'] );
|
||||
$value = $this->convertAndMakeSafe( $this->request['value'], 0 );
|
||||
$md5_check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$return_string = '';
|
||||
$pp_b_day = intval( $this->request['pp_b_day'] );
|
||||
$pp_b_month = intval( $this->request['pp_b_month'] );
|
||||
$pp_b_year = intval( $this->request['pp_b_year'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5_check != $this->member->form_hash )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member_id OR ! $this->memberData['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
if ( ! $this->memberData['g_edit_profile'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id, 'extendedProfile,groups' );
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Not the same member?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$this->memberData['g_is_supmod'] AND $member_id != $this->memberData['member_id'] )
|
||||
{
|
||||
$this->returnString( 'error' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Alright.. what are we doing?
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $command )
|
||||
{
|
||||
case 'birthdate':
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ) );
|
||||
|
||||
if( $pp_b_month OR $pp_b_day OR $pp_b_year )
|
||||
{
|
||||
if ( ! $pp_b_month or ! $pp_b_day )
|
||||
{
|
||||
$return_string = 'dateerror';
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( $pp_b_month AND $pp_b_day AND $pp_b_year ) AND ! @checkdate( $pp_b_month, $pp_b_day, $pp_b_year ) )
|
||||
{
|
||||
$return_string = 'dateerror';
|
||||
}
|
||||
|
||||
if( $return_string != 'dateerror' )
|
||||
{
|
||||
IPSMember::save( $member_id, array( 'core' => array( 'bday_month' => intval( $pp_b_month ), 'bday_day' => intval( $pp_b_day ), 'bday_year' => intval( $pp_b_year ) ) ) );
|
||||
|
||||
$_pp_b_month = '';
|
||||
|
||||
if( $pp_b_month > 0 AND $pp_b_month < 13 )
|
||||
{
|
||||
$_pp_b_month = $this->lang->words['M_' . $pp_b_month ];
|
||||
}
|
||||
|
||||
$date_vars = array();
|
||||
|
||||
# Adding this to support birthdays that don't specify all 3 params
|
||||
|
||||
if( $_pp_b_month )
|
||||
{
|
||||
$date_vars[] = $_pp_b_month;
|
||||
}
|
||||
|
||||
if( $pp_b_day )
|
||||
{
|
||||
$date_vars[] = $pp_b_day;
|
||||
}
|
||||
|
||||
if( $pp_b_year )
|
||||
{
|
||||
$date_vars[] = $pp_b_year;
|
||||
}
|
||||
|
||||
$return_string = ( count($date_vars) ) ? implode( '-', $date_vars ) : $this->lang->words['m_bday_unknown'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->returnString( $return_string );
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Allow user to change their status
|
||||
* Last Updated: $Date: 2010-10-04 21:50:24 -0400 (Mon, 04 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 4948 $
|
||||
* @version $Revision: 6942 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -45,26 +48,309 @@ class public_members_ajax_status extends ipsAjaxCommand
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Can we access?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$this->memberData['g_mem_info'] OR $this->memberData['gbw_no_status_update'] )
|
||||
/* 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() ) );
|
||||
}
|
||||
|
||||
/* WHAT R WE DOING? */
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
default:
|
||||
case 'new':
|
||||
$this->_new();
|
||||
break;
|
||||
case 'reply':
|
||||
$this->_reply();
|
||||
break;
|
||||
case 'showall':
|
||||
$this->_showAll();
|
||||
break;
|
||||
case 'deleteStatus':
|
||||
$this->_deleteStatus();
|
||||
break;
|
||||
case 'deleteReply':
|
||||
$this->_deleteReply();
|
||||
break;
|
||||
case 'lockStatus':
|
||||
$this->_lockStatus();
|
||||
break;
|
||||
case 'unlockStatus':
|
||||
$this->_unlockStatus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a reply statussesses
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function _showAll()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
$st = intval( $this->request['st'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Set Author */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Set Data */
|
||||
$this->registry->getClass('memberStatus')->setStatusData( $status_id );
|
||||
|
||||
/* And the number of replies */
|
||||
$statusData = $this->registry->getClass('memberStatus')->getStatusData();
|
||||
|
||||
/* Fetch */
|
||||
$this->returnJsonArray( array( 'status' => 'success', 'status_replies' => $statusData['status_replies'] + 1, 'html' => $this->cleanOutput( $this->registry->getClass('output')->getTemplate('profile')->statusReplies( $this->registry->getClass('memberStatus')->fetchAllReplies() ) ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Lock a status
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function _lockStatus()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
if( !$id )
|
||||
{
|
||||
/* Set Author */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Set Data */
|
||||
$this->registry->getClass('memberStatus')->setStatusData( $status_id );
|
||||
|
||||
/* Can we reply? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canLockStatus() )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
$newStatus = trim( IPSText::getTextClass('bbcode')->stripBadWords( IPSText::parseCleanValue( $_POST['new_status'] ) ) );
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->lockStatus();
|
||||
|
||||
IPSMember::save( $id, array( 'extendedProfile' => array( 'pp_status' => $newStatus, 'pp_status_update' => time() ) ) );
|
||||
/* Success? */
|
||||
$this->returnJsonArray( array( 'status' => 'success' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Lock a status
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function _unlockStatus()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
$this->returnJsonArray( array( 'status' => 'success', 'new_status' => $newStatus ) );
|
||||
/* Set Author */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Set Data */
|
||||
$this->registry->getClass('memberStatus')->setStatusData( $status_id );
|
||||
|
||||
/* Can we reply? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canUnlockStatus() )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->unlockStatus();
|
||||
|
||||
/* Success? */
|
||||
$this->returnJsonArray( array( 'status' => 'success' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a status
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function _deleteStatus()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Set Author */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Set Data */
|
||||
$this->registry->getClass('memberStatus')->setStatusData( $status_id );
|
||||
|
||||
/* Can we reply? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canDeleteStatus() )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->deleteStatus();
|
||||
|
||||
/* Success? */
|
||||
$this->returnJsonArray( array( 'status' => 'success' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a status reply
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function _deleteReply()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
$reply_id = intval( $this->request['reply_id'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id OR ! $reply_id )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Set Author */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Set Data */
|
||||
$this->registry->getClass('memberStatus')->setStatusData( $status_id );
|
||||
$this->registry->getClass('memberStatus')->setReplyData( $reply_id );
|
||||
|
||||
/* Can we reply? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canDeleteReply() )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->deleteReply();
|
||||
|
||||
/* Success? */
|
||||
$this->returnJsonArray( array( 'status' => 'success' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a reply statussesses
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function _reply()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
$comment = $this->convertAndMakeSafe( $_POST['content'] );
|
||||
$id = intval( $this->request['id'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id OR ! $comment )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_no_reply'] );
|
||||
}
|
||||
|
||||
/* Set Author */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Set Content */
|
||||
$this->registry->getClass('memberStatus')->setContent( $comment );
|
||||
|
||||
/* Set Data */
|
||||
$this->registry->getClass('memberStatus')->setStatusData( $status_id );
|
||||
|
||||
/* Can we reply? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canReply() )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_no_reply'] );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->reply();
|
||||
|
||||
/* Now grab the reply and return it */
|
||||
$reply = $this->registry->getClass('output')->getTemplate('profile')->statusReplies( $this->registry->getClass('memberStatus')->fetchAllReplies( $status_id, array( 'sort_dir' => 'desc', 'limit' => 1 ) ) );
|
||||
|
||||
/* And the number of replies */
|
||||
$statusData = $this->registry->getClass('memberStatus')->getStatusData();
|
||||
|
||||
$this->returnJsonArray( array( 'status' => 'success', 'html' => $this->cleanOutput( $reply ), 'status_replies' => $statusData['status_replies'] + 1 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new statussesses
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function _new()
|
||||
{
|
||||
IPSDebug::fireBug( 'info', array( 'Status content: ' . $_POST['content'] ) );
|
||||
IPSDebug::fireBug( 'info', array( 'Cleaned status: ' . trim( $this->convertAndMakeSafe( $_POST['content'] ) ) ) );
|
||||
|
||||
/* INIT */
|
||||
$smallSpace = intval( $this->request['smallSpace'] );
|
||||
$su_Twitter = intval( $this->request['su_Twitter'] );
|
||||
$su_Facebook = intval( $this->request['su_Facebook'] );
|
||||
|
||||
/* Got content? */
|
||||
if( !trim( $this->convertAndMakeSafe( str_replace( array( ' ', ' ' ), '', $_POST['content'] ) ) ) )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['no_status_sent'] );
|
||||
}
|
||||
|
||||
/* Set Author */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Set Content */
|
||||
$this->registry->getClass('memberStatus')->setContent( trim( $this->convertAndMakeSafe( $_POST['content'] ) ) );
|
||||
|
||||
/* Set post outs */
|
||||
$this->registry->getClass('memberStatus')->setExternalUpdates( array( 'twitter' => $su_Twitter, 'facebook' => $su_Facebook ) );
|
||||
|
||||
/* Can we reply? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canCreate() )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['status_off'] );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$newStatus = $this->registry->getClass('memberStatus')->create();
|
||||
|
||||
/* Now grab the reply and return it */
|
||||
$new = $this->registry->getClass('output')->getTemplate('profile')->statusUpdates( $this->registry->getClass('memberStatus')->fetch( $this->memberData['member_id'], array( 'member_id' => $this->memberData['member_id'], 'sort_dir' => 'desc', 'limit' => 1 ) ), $smallSpace );
|
||||
|
||||
$this->returnJsonArray( array( 'status' => 'success', 'html' => $this->cleanOutput( $new ) ) );
|
||||
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -1,76 +1,74 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Retrieve member warn log
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 4948 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_ajax_warn extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_mod' ), 'forums' );
|
||||
|
||||
if ( ! $this->settings['warn_on'] )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['ajax_no_warn'] );
|
||||
}
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'view':
|
||||
$this->_viewWarnLogs();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retieve warn logs and return them
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function _viewWarnLogs()
|
||||
{
|
||||
require_once( IPSLib::getAppDir('members') . '/modules_public/warn/warn.php' );
|
||||
$warn = new public_members_warn_warn( $this->registry );
|
||||
$warn->makeRegistryShortcuts( $this->registry );
|
||||
$warn->loadData();
|
||||
|
||||
$warnHTML = $warn->viewLog();
|
||||
|
||||
if ( !$warnHTML )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['ajax_bad_html'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->registry->getClass('output')->getTemplate('mod')->warnLogsAjaxWrapper( $warnHTML ) );
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Retrieve member warn log
|
||||
* Last Updated: $Date: 2010-10-21 07:08:38 -0400 (Thu, 21 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Tuesday 1st March 2005 (11:52)
|
||||
* @version $Revision: 7007 $
|
||||
*/
|
||||
|
||||
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 public_members_ajax_warn extends ipsAjaxCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
ipsRegistry::getClass( 'class_localization')->loadLanguageFile( array( 'public_mod' ), 'forums' );
|
||||
|
||||
if ( ! $this->settings['warn_on'] )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['ajax_no_warn'] );
|
||||
}
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'view':
|
||||
$this->_viewWarnLogs();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retieve warn logs and return them
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _viewWarnLogs()
|
||||
{
|
||||
$classToLoad = IPSLib::loadActionOverloader( IPSLib::getAppDir('members') . '/modules_public/warn/warn.php', 'public_members_warn_warn' );
|
||||
$warn = new $classToLoad();
|
||||
$warn->makeRegistryShortcuts( $this->registry );
|
||||
$warn->loadData();
|
||||
|
||||
$warnHTML = $warn->viewLog();
|
||||
|
||||
if ( !$warnHTML )
|
||||
{
|
||||
$this->returnJsonError( $this->lang->words['ajax_bad_html'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->returnHtml( $this->registry->getClass('output')->getTemplate('mod')->warnLogsAjaxWrapper( $warnHTML ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Define the default memberlist section
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Contact Member Functions
|
||||
* Last Updated: $Date: 2009-04-14 03:01:20 -0400 (Tue, 14 Apr 2009) $
|
||||
* Last Updated: $Date: 2010-09-29 20:23:38 -0400 (Wed, 29 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4453 $
|
||||
* @version $Rev: 6925 $
|
||||
*
|
||||
*/
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
@@ -93,7 +95,7 @@ class public_members_messaging_contact extends ipsCommand
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->registry->output->showError( 'contact_what_action', 1034 );
|
||||
$this->registry->output->showError( 'contact_what_action', 1034, null, null, 404 );
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -104,7 +106,7 @@ class public_members_messaging_contact extends ipsCommand
|
||||
}
|
||||
|
||||
/* Output */
|
||||
$this->registry->output->setTitle( $this->page_title );
|
||||
$this->registry->output->setTitle( $this->page_title . ' - ' . ipsRegistry::$settings['board_name'] );
|
||||
$this->registry->output->addContent( $this->output );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
@@ -146,13 +148,13 @@ class public_members_messaging_contact extends ipsCommand
|
||||
|
||||
if( empty( $this->memberData['member_id'] ) )
|
||||
{
|
||||
ipsRegistry::getClass('output')->showError( 'members_only_mail', 10313 );
|
||||
ipsRegistry::getClass('output')->showError( 'members_only_mail', 10313, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Check email permission */
|
||||
if( ! $this->memberData['g_email_friend'] )
|
||||
{
|
||||
ipsRegistry::getClass('output')->showError( 'no_member_mail', 10314 );
|
||||
ipsRegistry::getClass('output')->showError( 'no_member_mail', 10314, null, null, 403 );
|
||||
}
|
||||
|
||||
if( $this->request['do'] == '01' )
|
||||
@@ -181,7 +183,7 @@ class public_members_messaging_contact extends ipsCommand
|
||||
|
||||
if( ! $id )
|
||||
{
|
||||
$this->registry->output->showError( 'mail_member_no_mid', 10315 );
|
||||
$this->registry->output->showError( 'mail_member_no_mid', 10315, null, null, 404 );
|
||||
}
|
||||
|
||||
/* Query member information */
|
||||
@@ -190,7 +192,7 @@ class public_members_messaging_contact extends ipsCommand
|
||||
/* Make sure we have a valid user */
|
||||
if( ! $member['member_id'] )
|
||||
{
|
||||
$this->registry->output->showError( 'mail_member_no_member', 10316 );
|
||||
$this->registry->output->showError( 'mail_member_no_member', 10316, null, null, 404 );
|
||||
}
|
||||
|
||||
/* Check email privacy */
|
||||
@@ -254,7 +256,7 @@ class public_members_messaging_contact extends ipsCommand
|
||||
|
||||
if( $this->request['to'] == 0 )
|
||||
{
|
||||
$this->registry->output->showError( 'mail_member_no_mid', 10318 );
|
||||
$this->registry->output->showError( 'mail_member_no_mid', 10318, null, null, 404 );
|
||||
}
|
||||
|
||||
/* Query Member */
|
||||
@@ -264,7 +266,7 @@ class public_members_messaging_contact extends ipsCommand
|
||||
/* Check for schtuff */
|
||||
if( ! $member['member_id'] )
|
||||
{
|
||||
$this->registry->output->showError( 'mail_member_no_member', 10319 );
|
||||
$this->registry->output->showError( 'mail_member_no_member', 10319, null, null, 404 );
|
||||
}
|
||||
|
||||
/* Check email privacy */
|
||||
@@ -397,7 +399,7 @@ class public_members_messaging_contact extends ipsCommand
|
||||
$this->DB->build( array(
|
||||
'select' => 'count(email_id) as cnt',
|
||||
'from' => 'email_logs',
|
||||
'where' => "from_member_id=$member_id AND email_date > $time_range",
|
||||
'where' => "from_member_id={$member_id} AND email_date > {$time_range}",
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
@@ -406,12 +408,12 @@ class public_members_messaging_contact extends ipsCommand
|
||||
if( $quota_sent['cnt'] + 1 > $limit )
|
||||
{
|
||||
$this->int_error = 'exceeded_quota';
|
||||
$this->int_extra = limit;
|
||||
$this->int_extra = $limit;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE; //<{%dyn.down.var.md5p2%}> If we get here...
|
||||
return TRUE;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Define the default messaging section
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>␍<head><title>IP.Board - Bulletin Board System</title></head>␍<body>␍<h1>403: IP.Board -> Forbidden</h1>␍<hr>␍You have reached this page in error, please use your back button to return to the forum.␍<hr>␍<a href="http://www.invisionboard.com/">IP.Board</a>␍</body>␍</html>␍
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Mark a private message as read
|
||||
* Last Updated: $Date: 2010-07-01 18:13:46 -0400 (Thu, 01 Jul 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author Brandon Farber
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Forums
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Thurs 7th Jan 2010
|
||||
* @version $Rev: 6596 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class public_members_messaging_markasread extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Main execution point
|
||||
*
|
||||
* @access public
|
||||
* @param object ipsRegistry reference
|
||||
* @return void
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
$_ajax = intval($this->request['ajax']);
|
||||
$topic = intval($this->request['topicID']);
|
||||
|
||||
if( !$topic )
|
||||
{
|
||||
$this->endReturn( $_ajax );
|
||||
}
|
||||
|
||||
$_className = IPSLib::loadLibrary( IPSLib::getAppDir('members') . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
|
||||
|
||||
$_messenger = new $_className( $this->registry );
|
||||
$_messenger->toggleReadStatus( $this->memberData['member_id'], array( $topic ), true );
|
||||
|
||||
$this->endReturn( $_ajax );
|
||||
}
|
||||
|
||||
/**
|
||||
* All done, return
|
||||
*
|
||||
* @access public
|
||||
* @param int AJAX result
|
||||
* @return void
|
||||
*/
|
||||
public function endReturn( $_ajax )
|
||||
{
|
||||
if( !$_ajax )
|
||||
{
|
||||
$_returnTo = $_SERVER['HTTP_REFERER'] ? $_SERVER['HTTP_REFERER'] : $this->settings['base_url'];
|
||||
|
||||
$this->registry->output->silentRedirect( $_returnTo );
|
||||
}
|
||||
else
|
||||
{
|
||||
print 'ok';
|
||||
}
|
||||
|
||||
exit;
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Online list
|
||||
* Last Updated: $Date: 2009-07-08 17:04:40 -0400 (Wed, 08 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-07-01 18:13:46 -0400 (Thu, 01 Jul 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 12th March 2002
|
||||
* @version $Revision: 4855 $
|
||||
* @version $Revision: 6596 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -73,22 +75,22 @@ class public_members_messaging_search extends ipsCommand
|
||||
|
||||
if ( ! $this->memberData['g_use_pm'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10226 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10226, null, null, 403 );
|
||||
}
|
||||
|
||||
if ( $this->memberData['members_disable_pm'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227, null, null, 403 );
|
||||
}
|
||||
|
||||
if ( ! $this->memberData['member_id'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_guests', 10228 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_guests', 10228, null, null, 403 );
|
||||
}
|
||||
|
||||
if( ! IPSLib::moduleIsEnabled( 'messaging', 'members' ) )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227, null, null, 404 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -102,8 +104,8 @@ class public_members_messaging_search extends ipsCommand
|
||||
// Grab class
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php' );
|
||||
$this->messengerFunctions = new messengerFunctions( $registry );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
|
||||
$this->messengerFunctions = new $classToLoad( $registry );
|
||||
|
||||
/* Messenger Totals */
|
||||
$totals = $this->messengerFunctions->buildMessageTotals();
|
||||
@@ -125,7 +127,7 @@ class public_members_messaging_search extends ipsCommand
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->output->addContent( $this->registry->getClass('output')->getTemplate('messaging')->messengerTemplate( $html, $this->messengerFunctions->_jumpMenu, $this->messengerFunctions->_dirData, $totals, $this->_topicParticipants, $this->_errorString ) );
|
||||
$this->registry->output->setTitle( $this->_title );
|
||||
$this->registry->output->setTitle( $this->_title . ' - ' . ipsRegistry::$settings['board_name']);
|
||||
|
||||
$this->registry->output->addNavigation( $this->lang->words['messenger__nav'], 'app=members&module=messaging' );
|
||||
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Online list
|
||||
* Last Updated: $Date: 2009-08-24 20:56:22 -0400 (Mon, 24 Aug 2009) $
|
||||
* Last Updated: $Date: 2010-10-28 08:16:00 -0400 (Thu, 28 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: mmecham $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 12th March 2002
|
||||
* @version $Revision: 5041 $
|
||||
* @version $Revision: 7061 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -29,42 +31,42 @@ class public_members_messaging_send extends ipsCommand
|
||||
/**
|
||||
* Page title
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
private $_title;
|
||||
protected $_title;
|
||||
|
||||
/**
|
||||
* Navigation
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var array[ 0 => [ title, url ] ]
|
||||
*/
|
||||
private $_navigation;
|
||||
protected $_navigation;
|
||||
|
||||
/**
|
||||
* Post Key
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var string Md5 key
|
||||
*/
|
||||
private $_postKey;
|
||||
protected $_postKey;
|
||||
|
||||
/**
|
||||
* Flag: Can we upload?
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var int 1 or 0
|
||||
*/
|
||||
private $_canUpload;
|
||||
protected $_canUpload;
|
||||
|
||||
/**
|
||||
* Error string
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var string
|
||||
*/
|
||||
private $_errorString = '';
|
||||
protected $_errorString = '';
|
||||
|
||||
/**
|
||||
* Class entry point
|
||||
@@ -81,22 +83,22 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
if ( ! $this->memberData['g_use_pm'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10222 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10222, null, null, 403 );
|
||||
}
|
||||
|
||||
if ( $this->memberData['members_disable_pm'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10223 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10223, null, null, 403 );
|
||||
}
|
||||
|
||||
if ( ! $this->memberData['member_id'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_guests', 10224 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_guests', 10224, null, null, 403 );
|
||||
}
|
||||
|
||||
if( ! IPSLib::moduleIsEnabled( 'messaging', 'members' ) )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227, null, null, 404 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -141,8 +143,8 @@ class public_members_messaging_send extends ipsCommand
|
||||
// Grab class
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php' );
|
||||
$this->messengerFunctions = new messengerFunctions( $registry );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
|
||||
$this->messengerFunctions = new $classToLoad( $registry );
|
||||
|
||||
/* Messenger Totals */
|
||||
$totals = $this->messengerFunctions->buildMessageTotals();
|
||||
@@ -207,7 +209,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->output->addContent( $this->registry->getClass('output')->getTemplate('messaging')->messengerTemplate( $html, $this->messengerFunctions->_jumpMenu, $this->messengerFunctions->_dirData, $totals, array(), $this->_errorString ) );
|
||||
$this->registry->output->setTitle( $this->_title );
|
||||
$this->registry->output->setTitle( $this->_title . ' - ' . ipsRegistry::$settings['board_name']);
|
||||
|
||||
$this->registry->output->addNavigation( $this->lang->words['messenger__nav'], 'app=members&module=messaging' );
|
||||
|
||||
@@ -225,10 +227,10 @@ class public_members_messaging_send extends ipsCommand
|
||||
/**
|
||||
* Deletes a reply
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
private function _deleteReply()
|
||||
protected function _deleteReply()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -244,7 +246,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
if ( $this->request['authKey'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -253,7 +255,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
if ( $this->messengerFunctions->canAccessTopic( $this->memberData['member_id'], $topicID ) !== TRUE )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_msgid', 10229 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_msgid', 10229, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -262,7 +264,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
if ( $this->messengerFunctions->deleteMessages( array( $msgID ), $this->memberData['member_id'] ) !== TRUE )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_delete_permission', 10264 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_delete_permission', 10264, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -275,10 +277,10 @@ class public_members_messaging_send extends ipsCommand
|
||||
/**
|
||||
* Sends a reply
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return mixed void, or HTML form
|
||||
*/
|
||||
private function _sendReply()
|
||||
protected function _sendReply()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -299,7 +301,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
if ( $this->request['authKey'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -324,14 +326,14 @@ class public_members_messaging_send extends ipsCommand
|
||||
{
|
||||
$_msgString = $this->lang->words[ 'err_' . $msg ];
|
||||
$_msgString = str_replace( '#NAMES#' , implode( ",", $this->messengerFunctions->exceptionData ), $_msgString );
|
||||
$_msgString = str_replace( '#TONAME#' , $toMember['members_display_name'] , $_msgString );
|
||||
$_msgString = str_replace( '#TONAME#' , $this->messengerFunctions->exceptionData[0], $_msgString );
|
||||
$_msgString = str_replace( '#FROMNAME#', $this->memberData['members_display_name'], $_msgString );
|
||||
}
|
||||
else
|
||||
{
|
||||
$_msgString = $this->lang->words['err_UNKNOWN'] . ' ' . $msg;
|
||||
}
|
||||
|
||||
|
||||
return $this->_showForm( 'reply', $_msgString );
|
||||
}
|
||||
|
||||
@@ -345,10 +347,10 @@ class public_members_messaging_send extends ipsCommand
|
||||
/**
|
||||
* Sends a reply
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return mixed void, or HTML form
|
||||
*/
|
||||
private function _sendEdit()
|
||||
protected function _sendEdit()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -370,7 +372,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
if ( $this->request['authKey'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -395,7 +397,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
{
|
||||
$_msgString = $this->lang->words[ 'err_' . $msg ];
|
||||
$_msgString = str_replace( '#NAMES#' , implode( ",", $this->messengerFunctions->exceptionData ), $_msgString );
|
||||
$_msgString = str_replace( '#TONAME#' , $toMember['members_display_name'] , $_msgString );
|
||||
$_msgString = str_replace( '#TONAME#' , $this->messengerFunctions->exceptionData[0], $_msgString );
|
||||
$_msgString = str_replace( '#FROMNAME#', $this->memberData['members_display_name'], $_msgString );
|
||||
}
|
||||
else
|
||||
@@ -416,10 +418,10 @@ class public_members_messaging_send extends ipsCommand
|
||||
/**
|
||||
* Sends the PM
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return void, or HTML form
|
||||
*/
|
||||
private function _sendNewPersonalTopic()
|
||||
protected function _sendNewPersonalTopic()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -457,14 +459,14 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
if ( $this->request['auth_key'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->_showNewTopicForm( 'messenger_bad_key', 2024 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024 );
|
||||
}
|
||||
|
||||
if ( $sendToID AND $sendToName == "" )
|
||||
if ( !$sendToID AND !$sendToName )
|
||||
{
|
||||
return $this->_showNewTopicForm( $this->lang->words['err_no_chosen_member'] );
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// Invite Users
|
||||
//-----------------------------------------
|
||||
@@ -528,7 +530,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
{
|
||||
$_msgString = $this->lang->words['err_UNKNOWN'] . ' ' . $msg;
|
||||
}
|
||||
|
||||
|
||||
return $this->_showNewTopicForm( $_msgString );
|
||||
}
|
||||
|
||||
@@ -543,7 +545,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = "Your message has been saved as a draft";
|
||||
$text = $this->lang->words['saved_as_a_draft'];
|
||||
}
|
||||
|
||||
$this->registry->getClass('output')->redirectScreen( $text , $this->settings['base_url'] . 'app=members&module=messaging&section=view&do=inbox' );
|
||||
@@ -552,12 +554,12 @@ class public_members_messaging_send extends ipsCommand
|
||||
/**
|
||||
* Show PM form
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param string Type of form (edit / reply)
|
||||
* @param array Array of errors
|
||||
* @param string Error message
|
||||
* @return string returns HTML
|
||||
*/
|
||||
private function _showForm( $type, $errors='' )
|
||||
protected function _showForm( $type, $errors='' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -566,14 +568,14 @@ class public_members_messaging_send extends ipsCommand
|
||||
$topicID = intval( $this->request['topicID'] );
|
||||
$msgID = intval( $this->request['msgID'] );
|
||||
$preview = isset( $this->request['previewReply'] ) ? 1 : 0;
|
||||
$displayData = array( 'errors' => $errors,
|
||||
$displayData = array( 'errors' => $errors ? array( $errors ) : array(),
|
||||
'topicID' => $topicID,
|
||||
'msgID' => $msgID,
|
||||
'type' => $type,
|
||||
'message' => '' );
|
||||
|
||||
$_POST['Post-NS'] = isset($_POST['msgContent']) ? $_POST['msgContent'] : '';
|
||||
$_POST['msgContent'] = IPSText::removeMacrosFromInput( IPSText::raw2form( isset($_POST['msgContent']) ? $_POST['msgContent'] : '' ) );
|
||||
$_POST['msgContent'] = IPSText::raw2form( isset($_POST['msgContent']) ? $_POST['msgContent'] : '' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Fetch topic Data
|
||||
@@ -593,7 +595,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
if ( $this->messengerFunctions->canAccessTopic( $this->memberData['member_id'], $topicData, $topicParticipants ) !== TRUE )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_msgid', 10229 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_msgid', 10229, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -611,7 +613,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
/* We're quoting a post... */
|
||||
if ( IPSText::getTextClass( 'editor' )->method == 'rte' )
|
||||
{
|
||||
$displayData['message'] = "[quote name='".IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($msgData['members_display_name'])."' timestamp='" . $msgData['msg_date'] . "' date='".IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($this->registry->getClass( 'class_localization')->getDate( $msgData['msg_date'], 'LONG', 1 ))."']<br />{$msgData['msg_post']}".'[/quote]'."<br /><br /><br />";
|
||||
$displayData['message'] = "[quote name='".IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($msgData['members_display_name'])."' timestamp='" . $msgData['msg_date'] . "']<br />{$msgData['msg_post']}".'[/quote]'."<br /><br /><br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -623,7 +625,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
$msgData['msg_post'] = IPSText::getTextClass('bbcode')->preEditParse( $msgData['msg_post'] );
|
||||
|
||||
$displayData['message'] = "[quote name='".IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($msgData['members_display_name'])."' timestamp='" . $msgData['msg_date'] . "' date='".IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($this->registry->getClass( 'class_localization')->getDate( $msgData['msg_date'], 'LONG', 1 ))."']\n{$msgData['msg_post']}".'[/quote]'."\n\n\n";
|
||||
$displayData['message'] = "[quote name='".IPSText::getTextClass( 'bbcode' )->makeQuoteSafe($msgData['members_display_name'])."' timestamp='" . $msgData['msg_date'] . "']\n{$msgData['msg_post']}".'[/quote]'."\n\n\n";
|
||||
}
|
||||
}
|
||||
else if ( $type == 'edit' )
|
||||
@@ -680,8 +682,8 @@ class public_members_messaging_send extends ipsCommand
|
||||
// Grab render attach class
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' );
|
||||
$this->class_attach = new class_attach( $this->registry );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
|
||||
$this->class_attach = new $classToLoad( $this->registry );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -701,7 +703,12 @@ class public_members_messaging_send extends ipsCommand
|
||||
// Errors
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $errors OR ( IPSText::getTextClass('bbcode')->error != "" ) )
|
||||
if( is_array($errors) AND count($errors) )
|
||||
{
|
||||
$preview = 1;
|
||||
}
|
||||
|
||||
if ( IPSText::getTextClass('bbcode')->error != "" )
|
||||
{
|
||||
if ( IPSText::getTextClass('bbcode')->error )
|
||||
{
|
||||
@@ -726,7 +733,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
if ( IPSText::getTextClass('editor')->method == 'rte' AND $displayData['message'] )
|
||||
{
|
||||
if ( count( $errors ) or $preview )
|
||||
if ( $preview )
|
||||
{
|
||||
$displayData['message'] = stripslashes( $displayData['message'] );
|
||||
}
|
||||
@@ -734,8 +741,8 @@ class public_members_messaging_send extends ipsCommand
|
||||
$displayData['message'] = IPSText::getTextClass('bbcode')->convertForRTE( $displayData['message'] );
|
||||
}
|
||||
else if ( $displayData['message'] )
|
||||
{
|
||||
$displayData['message'] = IPSText::stripslashes( $displayData['message'] );
|
||||
{
|
||||
// Not needed as is handled in above $type == 'edit' block
|
||||
}
|
||||
|
||||
$displayData['editor'] = IPSText::getTextClass('editor')->showEditor( $displayData['message'], 'msgContent' );
|
||||
@@ -751,8 +758,8 @@ class public_members_messaging_send extends ipsCommand
|
||||
// Load attachments so we get some stats
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' );
|
||||
$class_attach = new class_attach( $this->registry );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
|
||||
$class_attach = new $classToLoad( $this->registry );
|
||||
$class_attach->type = 'msg';
|
||||
$class_attach->init();
|
||||
$class_attach->getUploadFormSettings();
|
||||
@@ -785,11 +792,11 @@ class public_members_messaging_send extends ipsCommand
|
||||
/**
|
||||
* Show PM form
|
||||
*
|
||||
* @access private
|
||||
* @param array Array of errors
|
||||
* @access protected
|
||||
* @param string Error message
|
||||
* @return string returns HTML
|
||||
*/
|
||||
private function _showNewTopicForm( $errors='' )
|
||||
protected function _showNewTopicForm( $errors='' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -812,16 +819,16 @@ class public_members_messaging_send extends ipsCommand
|
||||
$topicID = intval($this->request['topicID']);
|
||||
$preview = $this->request['preview'];
|
||||
$inviteUsers = array();
|
||||
$displayData = array( 'errors' => $errors,
|
||||
$displayData = array( 'errors' => $errors ? array( $errors ) : array(),
|
||||
'topicID' => $topicID,
|
||||
'preview' => '',
|
||||
'name' => '',
|
||||
'title' => '',
|
||||
'message' => '' );
|
||||
|
||||
$_POST['Post-NS'] = isset($_POST['Post']) ? $_POST['Post'] : '';
|
||||
$_POST['Post'] = IPSText::removeMacrosFromInput( IPSText::raw2form( isset($_POST['Post']) ? $_POST['Post'] : '' ) );
|
||||
|
||||
$_POST['Post-NS'] = isset($_POST['Post']) ? $_POST['Post'] : '';
|
||||
$_POST['Post'] = IPSText::raw2form( isset($_POST['Post']) ? $_POST['Post'] : '' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Preview post?
|
||||
//-----------------------------------------
|
||||
@@ -841,7 +848,15 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
$this->settings['max_emos'] = 0;
|
||||
|
||||
$old_msg = IPSText::getTextClass('editor')->processRawPost( 'Post-NS' );
|
||||
if( $this->request['_from'] == 'quickPM' )
|
||||
{
|
||||
$old_msg = $_POST['Post'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$old_msg = IPSText::getTextClass('editor')->processRawPost( 'Post-NS' );
|
||||
}
|
||||
|
||||
$old_msg = IPSText::getTextClass('bbcode')->preDisplayParse( IPSText::getTextClass('bbcode')->preDbParse( $old_msg ) );
|
||||
|
||||
if ( ! is_object( $this->class_attach ) )
|
||||
@@ -850,8 +865,8 @@ class public_members_messaging_send extends ipsCommand
|
||||
// Grab render attach class
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' );
|
||||
$this->class_attach = new class_attach( $this->registry );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
|
||||
$this->class_attach = new $classToLoad( $this->registry );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -906,39 +921,58 @@ class public_members_messaging_send extends ipsCommand
|
||||
if ( $preview )
|
||||
{
|
||||
$displayData['message'] = $_POST['Post-NS'];
|
||||
|
||||
if( $this->request['_from'] == 'quickPM' )
|
||||
{
|
||||
$displayData['message'] = IPSText::parseCleanValue( $displayData['message'], true );
|
||||
}
|
||||
|
||||
$displayData['title'] = str_replace( "'", "'", str_replace( '"', '"', IPSText::stripslashes($_POST['msg_title']) ) );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Sending as draft...
|
||||
//-----------------------------------------
|
||||
|
||||
else if ( $topicID )
|
||||
{
|
||||
$draftTopic = $this->messengerFunctions->fetchTopicDataWithMessage( $topicID, TRUE );
|
||||
|
||||
if ( $draftTopic['mt_to_member_id'] )
|
||||
/* Permission to view this? */
|
||||
if ( $draftTopic['mt_starter_id'] == $this->memberData['member_id'] )
|
||||
{
|
||||
$displayData['name'] = $draftTopic['from_name'];
|
||||
}
|
||||
|
||||
if ( $draftTopic['mt_title'] )
|
||||
{
|
||||
$_member = IPSMember::load( $draftTopic['mt_to_member_id'], 'core' );
|
||||
|
||||
$displayData['name'] = $_member['members_display_name'];
|
||||
$displayData['title'] = $draftTopic['mt_title'];
|
||||
$_msg_id = $draftTopic['msg_id'];
|
||||
$this->_postKey = $draftTopic['msg_post_key'];
|
||||
|
||||
IPSText::getTextClass('bbcode')->parse_html = $this->settings['msg_allow_html'];
|
||||
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_smilies = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings['msg_allow_code'];
|
||||
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
|
||||
|
||||
$displayData['message'] = IPSText::getTextClass('bbcode')->preEditParse( $draftTopic['msg_post'] );
|
||||
}
|
||||
if ( $draftTopic['mt_to_member_id'] )
|
||||
{
|
||||
$displayData['name'] = $draftTopic['from_name'];
|
||||
}
|
||||
|
||||
if ( $draftTopic['mt_title'] )
|
||||
{
|
||||
$_member = IPSMember::load( $draftTopic['mt_to_member_id'], 'core' );
|
||||
|
||||
$displayData['name'] = $_member['members_display_name'];
|
||||
$displayData['title'] = $draftTopic['mt_title'];
|
||||
$_msg_id = $draftTopic['msg_id'];
|
||||
$this->_postKey = $draftTopic['msg_post_key'];
|
||||
|
||||
IPSText::getTextClass('bbcode')->parse_html = $this->settings['msg_allow_html'];
|
||||
IPSText::getTextClass('bbcode')->parse_nl2br = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_smilies = 1;
|
||||
IPSText::getTextClass('bbcode')->parse_bbcode = $this->settings['msg_allow_code'];
|
||||
IPSText::getTextClass('bbcode')->parsing_section = 'pms';
|
||||
|
||||
if ( IPSText::getTextClass('editor')->method == 'rte' )
|
||||
{
|
||||
$displayData['message'] = IPSText::getTextClass('bbcode')->convertForRTE( $draftTopic['msg_post'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$displayData['message'] = IPSText::getTextClass('bbcode')->preEditParse( $draftTopic['msg_post'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// CC Boxes
|
||||
//-----------------------------------------
|
||||
@@ -981,31 +1015,18 @@ class public_members_messaging_send extends ipsCommand
|
||||
// PM returns
|
||||
//-----------------------------------------
|
||||
|
||||
if ( IPSText::getTextClass('editor')->method == 'rte' AND $displayData['message'] AND $fromMsgID )
|
||||
{
|
||||
$displayData['message'] = IPSText::getTextClass('bbcode')->convertForRTE( nl2br( $displayData['message'] ) );
|
||||
}
|
||||
else if( IPSText::getTextClass('editor')->method == 'std' AND $displayData['message'] AND $fromMsgID )
|
||||
{
|
||||
$displayData['message'] = IPSText::getTextClass('bbcode')->preEditParse( $displayData['message'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Is this RTE? If so, convert BBCode
|
||||
//-----------------------------------------
|
||||
|
||||
if ( IPSText::getTextClass('editor')->method == 'rte' AND $displayData['message'] )
|
||||
if ( IPSText::getTextClass('editor')->method == 'rte' AND $displayData['message'] )
|
||||
{
|
||||
if ( count( $errors ) or $preview )
|
||||
{
|
||||
$displayData['message'] = stripslashes( $displayData['message'] );
|
||||
$displayData['message'] = IPSText::stripslashes( $displayData['message'] );
|
||||
}
|
||||
|
||||
$displayData['message'] = IPSText::getTextClass('bbcode')->convertForRTE( $displayData['message'] );
|
||||
}
|
||||
else if ( $displayData['message'] )
|
||||
{
|
||||
$displayData['message'] = IPSText::stripslashes( $displayData['message'] );
|
||||
$displayData['message'] = IPSText::getTextClass('bbcode')->preEditParse( $displayData['message'] );
|
||||
}
|
||||
|
||||
$displayData['editor'] = IPSText::getTextClass('editor')->showEditor( $displayData['message'], 'Post' );
|
||||
@@ -1021,8 +1042,8 @@ class public_members_messaging_send extends ipsCommand
|
||||
// Load attachments so we get some stats
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php' );
|
||||
$class_attach = new class_attach( $this->registry );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'core' ) . '/sources/classes/attach/class_attach.php', 'class_attach' );
|
||||
$class_attach = new $classToLoad( $this->registry );
|
||||
$class_attach->type = 'msg';
|
||||
$class_attach->init();
|
||||
$class_attach->getUploadFormSettings();
|
||||
@@ -1035,7 +1056,7 @@ class public_members_messaging_send extends ipsCommand
|
||||
|
||||
$this->_title = $this->lang->words['sendMsgTitle'];
|
||||
$this->_navigation[] = array( $this->lang->words['sendMsgTitle'], '' );
|
||||
|
||||
|
||||
return $this->registry->getClass('output')->getTemplate('messaging')->sendNewPersonalTopicForm( $displayData );
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Online list
|
||||
* Last Updated: $Date: 2009-08-31 20:32:10 -0400 (Mon, 31 Aug 2009) $
|
||||
* Last Updated: $Date: 2010-09-14 05:48:02 -0400 (Tue, 14 Sep 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 12th March 2002
|
||||
* @version $Revision: 5066 $
|
||||
* @version $Revision: 6865 $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -89,22 +91,22 @@ class public_members_messaging_view extends ipsCommand
|
||||
|
||||
if ( ! $this->memberData['g_use_pm'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10226 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10226, null, null, 403 );
|
||||
}
|
||||
|
||||
if ( $this->memberData['members_disable_pm'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227, null, null, 403 );
|
||||
}
|
||||
|
||||
if ( ! $this->memberData['member_id'] )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_guests', 10228 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_guests', 10228, null, null, 403 );
|
||||
}
|
||||
|
||||
if( ! IPSLib::moduleIsEnabled( 'messaging', 'members' ) )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_disabled', 10227, null, null, 404 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -119,8 +121,8 @@ class public_members_messaging_view extends ipsCommand
|
||||
// Grab class
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php' );
|
||||
$this->messengerFunctions = new messengerFunctions( $registry );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
|
||||
$this->messengerFunctions = new $classToLoad( $registry );
|
||||
|
||||
/* Messenger Totals */
|
||||
$this->_totals = $this->messengerFunctions->buildMessageTotals();
|
||||
@@ -180,7 +182,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->output->addContent( $this->registry->getClass('output')->getTemplate('messaging')->messengerTemplate( $html, $this->messengerFunctions->_jumpMenu, $this->messengerFunctions->_dirData, $this->_totals, $this->_topicParticipants, $this->_errorString, $this->_deletedTopic ) );
|
||||
$this->registry->output->setTitle( $this->_title );
|
||||
$this->registry->output->setTitle( $this->_title . ' - ' . ipsRegistry::$settings['board_name']);
|
||||
|
||||
$this->registry->output->addNavigation( $this->lang->words['messenger__nav'], 'app=members&module=messaging' );
|
||||
|
||||
@@ -217,7 +219,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
|
||||
if ( $this->request['authKey'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -261,7 +263,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
|
||||
if ( $this->request['authKey'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -305,7 +307,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
|
||||
if ( $this->request['authKey'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -348,7 +350,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
|
||||
if ( $this->request['authKey'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -394,7 +396,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
|
||||
if ( $this->request['authKey'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_bad_key', 2024, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -435,7 +437,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
{
|
||||
$_msgString = $this->lang->words[ 'err_' . $msg ];
|
||||
$_msgString = str_replace( '#NAMES#' , implode( ",", $this->messengerFunctions->exceptionData ), $_msgString );
|
||||
$_msgString = str_replace( '#TONAME#' , $toMember['members_display_name'] , $_msgString );
|
||||
$_msgString = str_replace( '#TONAME#' , implode( ",", $inviteUsers), $_msgString );
|
||||
$_msgString = str_replace( '#FROMNAME#', $this->memberData['members_display_name'], $_msgString );
|
||||
}
|
||||
else
|
||||
@@ -452,10 +454,10 @@ class public_members_messaging_view extends ipsCommand
|
||||
/**
|
||||
* Redirects the user to the correct page in a conversation based on the incoming msg ID
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return string returns HTML
|
||||
*/
|
||||
private function _findMessage()
|
||||
protected function _findMessage()
|
||||
{
|
||||
$msgID = ( $this->request['msgID'] == '__firstUnread__' ) ? '__firstUnread__' : intval( $this->request['msgID'] );
|
||||
$topicID = intval( $this->request['topicID'] );
|
||||
@@ -558,10 +560,16 @@ class public_members_messaging_view extends ipsCommand
|
||||
if ( $method == 'delete' )
|
||||
{
|
||||
$this->messengerFunctions->deleteTopics( $this->memberData['member_id'], $ids );
|
||||
|
||||
$p_end = $this->settings['show_max_msg_list'] > 0 ? $this->settings['show_max_msg_list'] : 50;
|
||||
$start = ( count( $ids ) >= $p_end ) ? $start-$p_end : $start;
|
||||
}
|
||||
else if ( $method == 'move' )
|
||||
{
|
||||
$this->messengerFunctions->moveTopics( $this->memberData['member_id'], $ids, $folderID );
|
||||
|
||||
$p_end = $this->settings['show_max_msg_list'] > 0 ? $this->settings['show_max_msg_list'] : 50;
|
||||
$start = ( count( $ids ) >= $p_end ) ? $start-$p_end : $start;
|
||||
}
|
||||
else if ( $method == 'markread' OR $method == 'markunread' )
|
||||
{
|
||||
@@ -631,7 +639,7 @@ class public_members_messaging_view extends ipsCommand
|
||||
|
||||
if ( ! $topicID )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_msgid', 10225 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_msgid', 10225, null, null, 404 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -648,11 +656,11 @@ class public_members_messaging_view extends ipsCommand
|
||||
|
||||
if ( $_msg == 'NO_READ_PERMISSION' )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_msgid', 10229 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_no_msgid', 10229, null, null, 403 );
|
||||
}
|
||||
else if ( $_msg == 'YOU_ARE_BANNED' )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'messenger_you_be_banned_yo', 99910229 );
|
||||
$this->registry->getClass('output')->showError( 'messenger_you_be_banned_yo', 10275, null, null, 403 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Define the default online section
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1 +1,10 @@
|
||||
<html>
<head><title>IP.Board - Bulletin Board System</title></head>
<body>
<h1>403: IP.Board -> Forbidden</h1>
<hr>
You have reached this page in error, please use your back button to return to the forum.
<hr>
<a href="http://www.invisionboard.com/">IP.Board</a>
</body>
</html>
|
||||
<html>
|
||||
<head><title>IP.Board - Bulletin Board System</title></head>
|
||||
<body>
|
||||
<h1>403: IP.Board -> Forbidden</h1>
|
||||
<hr>
|
||||
You have reached this page in error, please use your back button to return to the forum.
|
||||
<hr>
|
||||
<a href="http://www.invisionboard.com/">IP.Board</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,23 +1,22 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Online list
|
||||
* Last Updated: $Date: 2009-09-28 13:36:50 -0400 (Mon, 28 Sep 2009) $
|
||||
* Last Updated: $Date: 2010-10-21 09:25:51 -0400 (Thu, 21 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: josh $
|
||||
* @author $Author: ips_terabyte $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 12th March 2002
|
||||
* @version $Revision: 5169 $
|
||||
*
|
||||
* @version $Revision: 7009 $
|
||||
*/
|
||||
|
||||
|
||||
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.";
|
||||
@@ -29,7 +28,6 @@ class public_members_online_online extends ipsCommand
|
||||
/**
|
||||
* Temporary stored output HTML
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $output;
|
||||
@@ -37,7 +35,6 @@ class public_members_online_online extends ipsCommand
|
||||
/**
|
||||
* DB result start point
|
||||
*
|
||||
* @access public
|
||||
* @var integer
|
||||
*/
|
||||
public $first = 0;
|
||||
@@ -45,7 +42,6 @@ class public_members_online_online extends ipsCommand
|
||||
/**
|
||||
* DB number of rows to pull
|
||||
*
|
||||
* @access public
|
||||
* @var integer
|
||||
*/
|
||||
public $perpage = 25;
|
||||
@@ -53,7 +49,6 @@ class public_members_online_online extends ipsCommand
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
@@ -92,7 +87,7 @@ class public_members_online_online extends ipsCommand
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->output->addContent( $this->output );
|
||||
$this->registry->output->setTitle( $this->lang->words['page_title'] );
|
||||
$this->registry->output->setTitle( $this->lang->words['page_title'] . ' - ' . ipsRegistry::$settings['board_name']);
|
||||
$this->registry->output->addNavigation( $this->lang->words['page_title'], '' );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
@@ -101,10 +96,9 @@ class public_members_online_online extends ipsCommand
|
||||
/**
|
||||
* Show the online list
|
||||
*
|
||||
* @access private
|
||||
* @return void [Stores HTML in $this->output]
|
||||
*/
|
||||
private function _listAll()
|
||||
protected function _listAll()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -241,17 +235,21 @@ class public_members_online_online extends ipsCommand
|
||||
{
|
||||
foreach( $modules as $module_array )
|
||||
{
|
||||
$filename = IPSLib::getAppDir( IPSText::alphanumericalClean($module_array['app']) ) . '/extensions/coreExtensions.php';
|
||||
|
||||
if ( file_exists( $filename ) )
|
||||
if( IPSLib::appIsInstalled( $module_array['app'] ) )
|
||||
{
|
||||
require_once( $filename );
|
||||
$toload = 'publicSessions__' . IPSText::alphanumericalClean($module_array['app']);
|
||||
$loader = new $toload;
|
||||
|
||||
if( method_exists( $loader, 'parseOnlineEntries' ) )
|
||||
$module_array['app'] = IPSText::alphanumericalClean($module_array['app']);
|
||||
|
||||
$filename = IPSLib::getAppDir( $module_array['app'] ) . '/extensions/coreExtensions.php';
|
||||
|
||||
if ( file_exists( $filename ) )
|
||||
{
|
||||
$final = $loader->parseOnlineEntries( $final );
|
||||
$classToLoad = IPSLib::loadLibrary( $filename, 'publicSessions__' . $module_array['app'], $module_array['app'] );
|
||||
$loader = new $classToLoad();
|
||||
|
||||
if( method_exists( $loader, 'parseOnlineEntries' ) )
|
||||
{
|
||||
$final = $loader->parseOnlineEntries( $final );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -268,23 +266,28 @@ class public_members_online_online extends ipsCommand
|
||||
|
||||
$newFinal = array();
|
||||
|
||||
foreach( $final as $id => $data )
|
||||
if( is_array($final) AND count($final) )
|
||||
{
|
||||
if ( $data['member_id'] )
|
||||
foreach( $final as $id => $data )
|
||||
{
|
||||
$newFinal[ 'member-' . $data['member_id'] ] = $data;
|
||||
$newFinal[ 'member-' . $data['member_id'] ]['memberData'] = $members[ $data['member_id'] ];
|
||||
$newFinal[ 'member-' . $data['member_id'] ]['_memberData'] = IPSMember::buildProfilePhoto( $members[ $data['member_id'] ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$newFinal[ $data['id'] ] = $data;
|
||||
$newFinal[ $data['id'] ]['memberData'] = array();
|
||||
$newFinal[ $data['id'] ]['_memberData'] = IPSMember::buildProfilePhoto( 0 );
|
||||
if ( $data['member_id'] )
|
||||
{
|
||||
$newFinal[ 'member-' . $data['member_id'] ] = $data;
|
||||
$newFinal[ 'member-' . $data['member_id'] ]['memberData'] = $members[ $data['member_id'] ];
|
||||
$newFinal[ 'member-' . $data['member_id'] ]['_memberData'] = IPSMember::buildProfilePhoto( $members[ $data['member_id'] ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$newFinal[ $data['id'] ] = $data;
|
||||
$newFinal[ $data['id'] ]['memberData'] = array();
|
||||
$newFinal[ $data['id'] ]['_memberData'] = IPSMember::buildProfilePhoto( 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Data Hook Location */
|
||||
IPSLib::doDataHooks( $newFinal, 'onlineUsersListData' );
|
||||
|
||||
$this->output .= $this->registry->getClass('output')->getTemplate('online')->showOnlineList( $newFinal, $links, $defaults );
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,408 +1,309 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Profile View
|
||||
* Last Updated: $Date: 2009-05-18 22:05:12 -0400 (Mon, 18 May 2009) $
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 4668 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_profile_comments extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get HTML and skin
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Can we access?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$this->memberData['g_mem_info'] )
|
||||
{
|
||||
$this->registry->output->showError( 'comments_profiles', 10231 );
|
||||
}
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
case 'view':
|
||||
default:
|
||||
$this->_viewComments();
|
||||
break;
|
||||
|
||||
case 'save':
|
||||
$this->_saveComment();
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$this->_deleteComment();
|
||||
break;
|
||||
|
||||
case 'approve':
|
||||
$this->_approveComment();
|
||||
break;
|
||||
|
||||
case 'add_new_comment':
|
||||
$this->_doAddComment();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Approve a comment on member's profile
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
private function _approveComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$comment_id = intval( $this->request['comment_id'] );
|
||||
//-----------------------------------------
|
||||
// Try it. You might like it.
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/sources/comments.php' );
|
||||
$comment_lib = new profileCommentsLib( $this->registry );
|
||||
|
||||
$result = $comment_lib->approveComment( $member_id, $comment_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->registry->output->showError( $result, 10232 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$member = IPSMember::load( $member_id );
|
||||
$this->registry->output->redirectScreen( $this->lang->words['comment_was_approved'], $this->settings['base_url'] . 'showuser=' . $member_id, $member['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a comment on member's profile
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
private function _deleteComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$comment_id = intval( $this->request['comment_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Try it. You might like it.
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/sources/comments.php' );
|
||||
$comment_lib = new profileCommentsLib( $this->registry );
|
||||
|
||||
$result = $comment_lib->deleteComment( $member_id, $comment_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->registry->output->showError( $result, 10232 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$member = IPSMember::load( $member_id );
|
||||
$this->registry->output->redirectScreen( $this->lang->words['comment_was_deleted'], $this->settings['base_url'] . 'showuser=' . $member_id, $member['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the comments
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-15
|
||||
*/
|
||||
private function _saveComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$content = '';
|
||||
$comment_ids = array();
|
||||
$final_ids = '';
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
die( '' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// My tab?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $member_id != $this->memberData['member_id'] AND !$this->memberData['g_is_supmod'] )
|
||||
{
|
||||
die( '' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
die( '' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab comment_ids
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_array( $this->request['pp-checked'] ) AND count( $this->request['pp-checked'] ) )
|
||||
{
|
||||
foreach( $this->request['pp-checked'] as $key => $value )
|
||||
{
|
||||
$key = intval( $key );
|
||||
|
||||
if ( $value )
|
||||
{
|
||||
$comment_ids[ $key ] = $key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Update the database...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_array( $comment_ids ) AND count( $comment_ids ) )
|
||||
{
|
||||
$final_ids = implode( ',', $comment_ids );
|
||||
|
||||
//-----------------------------------------
|
||||
// Now update...
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $this->request['pp-moderation'] )
|
||||
{
|
||||
case 'approve':
|
||||
$this->DB->update( 'profile_comments', array( 'comment_approved' => 1 ), 'comment_id IN(' . $final_ids . ')' );
|
||||
break;
|
||||
case 'unapprove':
|
||||
$this->DB->update( 'profile_comments', array( 'comment_approved' => 0 ), 'comment_id IN(' . $final_ids . ')' );
|
||||
break;
|
||||
case 'delete':
|
||||
$this->DB->delete( 'profile_comments', 'comment_id IN(' . $final_ids . ')' );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Bounce...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->output->silentRedirect( $this->settings['base_url'] . 'app=members§ion=comments&module=profile&member_id=' . $member_id . '&do=list&_saved=1&___msg=pp_comments_updated&md5check=' . $this->member->form_hash );
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the content for the comments tab
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
private function _viewComments()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$content = '';
|
||||
$comment_perpage = 10;
|
||||
$pages = '';
|
||||
$start = intval( $this->request['st'] );
|
||||
$sql_extra = '';
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
die( '' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Not my tab? So no moderation...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ( $member_id != $this->memberData['member_id'] ) AND ( ! $this->memberData['g_is_supmod'] ) )
|
||||
{
|
||||
$sql_extra = ' AND comment_approved=1';
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
die( '' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// How many comments must a man write down
|
||||
// before he is considered a spammer?
|
||||
//-----------------------------------------
|
||||
|
||||
$comment_count = $this->DB->buildAndFetch( array( 'select' => 'count(*) as count_comment',
|
||||
'from' => 'profile_comments',
|
||||
'where' => 'comment_for_member_id=' . $member_id . $sql_extra
|
||||
) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Pages
|
||||
//-----------------------------------------
|
||||
|
||||
$pages = $this->registry->output->generatePagination( array( 'totalItems' => intval( $comment_count['count_comment'] ),
|
||||
'itemsPerPage' => $comment_perpage,
|
||||
'currentStartValue' => $start,
|
||||
'baseUrl' => $this->settings['base_url'] . 'app=members&section=comments&module=profile&member_id=' . $member_id . '&do=view&md5check=' . $this->member->form_hash,
|
||||
) );
|
||||
|
||||
//-----------------------------------------
|
||||
// Regenerate comments...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'pc.*',
|
||||
'from' => array( 'profile_comments' => 'pc' ),
|
||||
'where' => 'pc.comment_for_member_id='.$member_id . $sql_extra,
|
||||
'order' => 'pc.comment_date DESC',
|
||||
'limit' => array( $start, $comment_perpage ),
|
||||
'add_join' => array(
|
||||
0 => array(
|
||||
'select' => 'm.members_display_name, m.login_anonymous',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=pc.comment_by_member_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
1 => array(
|
||||
'select' => 'pp.*',
|
||||
'from' => array( 'profile_portal' => 'pp' ),
|
||||
'where' => 'pp.pp_member_id=m.member_id',
|
||||
'type' => 'left'
|
||||
),
|
||||
)
|
||||
) );
|
||||
$o = $this->DB->execute();
|
||||
|
||||
while( $row = $this->DB->fetch($o) )
|
||||
{
|
||||
$row['comment_content'] = IPSText::wordwrap( $row['comment_content'], '19', ' ' );
|
||||
|
||||
$row = IPSMember::buildDisplayData( $row, 0 );
|
||||
|
||||
if( !$row['members_display_name_short'] )
|
||||
{
|
||||
$row = array_merge( $row, IPSMember::setUpGuest() );
|
||||
}
|
||||
|
||||
$comments[] = $row;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Ok.. show the settings
|
||||
//-----------------------------------------
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->showIframeComments( $member, $comments, $pages );
|
||||
|
||||
$this->registry->getClass('output')->setTitle( $this->settings['board_name'] );
|
||||
$this->registry->getClass('output')->popUpWindow( $content );
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the new comment
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function _doAddComment()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$comment = $this->request['comment_text'];
|
||||
|
||||
/* Add Comment */
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/sources/comments.php' );
|
||||
$comment_lib = new profileCommentsLib( $this->registry );
|
||||
|
||||
$result = $comment_lib->addCommentToDB( $member_id, $comment );
|
||||
|
||||
/* Check for error */
|
||||
if( $result AND $result != 'pp_comment_added_mod' )
|
||||
{
|
||||
$this->registry->output->showError( $result, 10232 );
|
||||
}
|
||||
else if ( $result == 'pp_comment_added_mod' )
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words[ $result ], $this->settings['base_url'] . 'showuser=' . $member_id );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->silentRedirect( $this->settings['base_url'] . 'showuser=' . $member_id );
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile View
|
||||
* Last Updated: $Date: 2010-07-01 18:13:46 -0400 (Thu, 01 Jul 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 6596 $
|
||||
*
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_IPB' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded all the relevant files.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class public_members_profile_comments extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Get HTML and skin
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Can we access?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$this->memberData['g_mem_info'] )
|
||||
{
|
||||
$this->registry->output->showError( 'comments_profiles', 10231 );
|
||||
}
|
||||
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
default:
|
||||
die('');
|
||||
break;
|
||||
|
||||
case 'save':
|
||||
$this->_saveComment();
|
||||
break;
|
||||
|
||||
case 'delete':
|
||||
$this->_deleteComment();
|
||||
break;
|
||||
|
||||
case 'approve':
|
||||
$this->_approveComment();
|
||||
break;
|
||||
|
||||
case 'add_new_comment':
|
||||
$this->_doAddComment();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Approve a comment on member's profile
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
private function _approveComment()
|
||||
{
|
||||
/* Security Check */
|
||||
if ( $this->request['secure_key'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->output->showError( 'usercp_forums_bad_key', 103999, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$comment_id = intval( $this->request['comment_id'] );
|
||||
//-----------------------------------------
|
||||
// Try it. You might like it.
|
||||
//-----------------------------------------
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/comments.php', 'profileCommentsLib', 'members' );
|
||||
$comment_lib = new $classToLoad( $this->registry );
|
||||
|
||||
$result = $comment_lib->approveComment( $member_id, $comment_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->registry->output->showError( $result, 10232 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$member = IPSMember::load( $member_id );
|
||||
$this->registry->output->redirectScreen( $this->lang->words['comment_was_approved'], $this->settings['base_url'] . 'showuser=' . $member_id, $member['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a comment on member's profile
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-02
|
||||
*/
|
||||
private function _deleteComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Check form hash
|
||||
//-----------------------------------------
|
||||
|
||||
$this->request['secure_key'] = $this->request['secure_key'] ? $this->request['secure_key'] : $this->request['md5check'];
|
||||
|
||||
if( $this->request['secure_key'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->output->showError( 'usercp_forums_bad_key', 1023222 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$comment_id = intval( $this->request['comment_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Try it. You might like it.
|
||||
//-----------------------------------------
|
||||
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/comments.php', 'profileCommentsLib', 'members' );
|
||||
$comment_lib = new $classToLoad( $this->registry );
|
||||
|
||||
$result = $comment_lib->deleteComment( $member_id, $comment_id );
|
||||
|
||||
/* Check for error */
|
||||
if( $result )
|
||||
{
|
||||
$this->registry->output->showError( $result, 10232 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$member = IPSMember::load( $member_id );
|
||||
$this->registry->output->redirectScreen( $this->lang->words['comment_was_deleted'], $this->settings['base_url'] . 'showuser=' . $member_id, $member['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the comments
|
||||
*
|
||||
* @access private
|
||||
* @return void [Prints to screen]
|
||||
* @since IPB 2.2.0.2006-08-15
|
||||
*/
|
||||
private function _saveComment()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$content = '';
|
||||
$comment_ids = array();
|
||||
$final_ids = '';
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
die( '' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// My tab?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $member_id != $this->memberData['member_id'] AND !$this->memberData['g_is_supmod'] )
|
||||
{
|
||||
die( '' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $member_id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
die( '' );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Grab comment_ids
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_array( $this->request['pp-checked'] ) AND count( $this->request['pp-checked'] ) )
|
||||
{
|
||||
foreach( $this->request['pp-checked'] as $key => $value )
|
||||
{
|
||||
$key = intval( $key );
|
||||
|
||||
if ( $value )
|
||||
{
|
||||
$comment_ids[ $key ] = $key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Update the database...
|
||||
//-----------------------------------------
|
||||
|
||||
if ( is_array( $comment_ids ) AND count( $comment_ids ) )
|
||||
{
|
||||
$final_ids = implode( ',', $comment_ids );
|
||||
|
||||
//-----------------------------------------
|
||||
// Now update...
|
||||
//-----------------------------------------
|
||||
|
||||
switch( $this->request['pp-moderation'] )
|
||||
{
|
||||
case 'approve':
|
||||
$this->DB->update( 'profile_comments', array( 'comment_approved' => 1 ), 'comment_id IN(' . $final_ids . ')' );
|
||||
break;
|
||||
case 'unapprove':
|
||||
$this->DB->update( 'profile_comments', array( 'comment_approved' => 0 ), 'comment_id IN(' . $final_ids . ')' );
|
||||
break;
|
||||
case 'delete':
|
||||
$this->DB->delete( 'profile_comments', 'comment_id IN(' . $final_ids . ')' );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Bounce...
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->output->silentRedirect( $this->settings['base_url'] . 'app=members§ion=comments&module=profile&member_id=' . $member_id . '&do=list&_saved=1&___msg=pp_comments_updated&md5check=' . $this->member->form_hash );
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the new comment
|
||||
*
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
private function _doAddComment()
|
||||
{
|
||||
/* INIT */
|
||||
$member_id = intval( $this->request['member_id'] );
|
||||
$comment = $this->request['comment_text'];
|
||||
$md5check = IPSText::md5Clean( $this->request['auth_key'] );
|
||||
|
||||
/* Check member has */
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->output->showError( $this->lang->words['no_permission'], 10233 );
|
||||
}
|
||||
|
||||
/* Add Comment */
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/comments.php', 'profileCommentsLib', 'members' );
|
||||
$comment_lib = new $classToLoad( $this->registry );
|
||||
|
||||
$result = $comment_lib->addCommentToDB( $member_id, $comment );
|
||||
|
||||
/* Check for error */
|
||||
if( $result AND $result != 'pp_comment_added_mod' )
|
||||
{
|
||||
$this->registry->output->showError( $result, 10232 );
|
||||
}
|
||||
else if ( $result == 'pp_comment_added_mod' )
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words[ $result ], $this->settings['base_url'] . 'showuser=' . $member_id );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->silentRedirect( $this->settings['base_url'] . 'showuser=' . $member_id );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,20 @@
|
||||
<?php
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Define the default profile section
|
||||
* Last Updated: $Date: 2009-07-28 20:26:37 -0400 (Tue, 28 Jul 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Rev: 4948 $
|
||||
* @version $Rev: 5713 $
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,107 +1,109 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Profile View
|
||||
* Last Updated: $Date: 2009-03-04 07:36:56 -0500 (Wed, 04 Mar 2009) $
|
||||
*
|
||||
* @author $Author: matt $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Board
|
||||
* @subpackage Members
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 4135 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_profile_dname extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$info = array();
|
||||
$id = intval( $this->request['id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get HTML and skin
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Can we access?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$this->memberData['g_mem_info'] )
|
||||
{
|
||||
$this->registry->output->showError( 'dname_profiles_off', 10233 );
|
||||
}
|
||||
|
||||
if ( ! $this->settings['auth_allow_dnames'] )
|
||||
{
|
||||
$this->registry->output->showError( 'dnames_off', 10234 );
|
||||
}
|
||||
|
||||
if( !$id )
|
||||
{
|
||||
$this->registry->output->showError( 'dnames_no_id', 10235 );
|
||||
}
|
||||
|
||||
$member = IPSMember::load( $id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get Dname history
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'd.*',
|
||||
'from' => array( 'dnames_change' => 'd' ),
|
||||
'where' => 'dname_member_id='.$id,
|
||||
'add_join' => array( 0 => array( 'select' => 'm.members_display_name',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=d.dname_member_id',
|
||||
'type' => 'inner' ) ),
|
||||
'order' => 'dname_date DESC'
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$records[] = $row;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Print the pop-up window
|
||||
//-----------------------------------------
|
||||
|
||||
$html = $this->registry->getClass('output')->getTemplate('profile')->dnameWrapper( $member['members_display_name'], $records );
|
||||
|
||||
//-----------------------------------------
|
||||
// Push to print handler
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->getClass('output')->setTitle( $this->lang->words['dname_title'] );
|
||||
$this->registry->getClass('output')->addNavigation( $this->lang->words['dname_title'], '' );
|
||||
$this->registry->getClass('output')->addContent( $html );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Profile View
|
||||
* Last Updated: $Date: 2010-06-10 06:36:42 -0400 (Thu, 10 Jun 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: danc $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Members
|
||||
* @link http://www.invisionpower.com
|
||||
* @since 20th February 2002
|
||||
* @version $Revision: 6502 $
|
||||
*
|
||||
*/
|
||||
|
||||
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 public_members_profile_dname extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$info = array();
|
||||
$id = intval( $this->request['id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get HTML and skin
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Can we access?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( !$this->memberData['g_mem_info'] )
|
||||
{
|
||||
$this->registry->output->showError( 'dname_profiles_off', 10233, null, null, 403 );
|
||||
}
|
||||
|
||||
if ( ! $this->settings['auth_allow_dnames'] )
|
||||
{
|
||||
$this->registry->output->showError( 'dnames_off', 10234, null, null, 403 );
|
||||
}
|
||||
|
||||
if( !$id )
|
||||
{
|
||||
$this->registry->output->showError( 'dnames_no_id', 10235, null, null, 404 );
|
||||
}
|
||||
|
||||
$member = IPSMember::load( $id );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get Dname history
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->build( array( 'select' => 'd.*',
|
||||
'from' => array( 'dnames_change' => 'd' ),
|
||||
'where' => 'dname_member_id='.$id,
|
||||
'add_join' => array( 0 => array( 'select' => 'm.members_display_name',
|
||||
'from' => array( 'members' => 'm' ),
|
||||
'where' => 'm.member_id=d.dname_member_id',
|
||||
'type' => 'inner' ) ),
|
||||
'order' => 'dname_date DESC'
|
||||
) );
|
||||
$this->DB->execute();
|
||||
|
||||
while( $row = $this->DB->fetch() )
|
||||
{
|
||||
$records[] = $row;
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Print the pop-up window
|
||||
//-----------------------------------------
|
||||
|
||||
$html = $this->registry->getClass('output')->getTemplate('profile')->dnameWrapper( $member['members_display_name'], $records );
|
||||
|
||||
//-----------------------------------------
|
||||
// Push to print handler
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->getClass('output')->setTitle( $this->lang->words['dname_title'] . ' - ' . ipsRegistry::$settings['board_name'] );
|
||||
$this->registry->getClass('output')->addNavigation( $this->lang->words['dname_title'], '' );
|
||||
$this->registry->getClass('output')->addContent( $html );
|
||||
$this->registry->output->sendOutput();
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Loaded 100 of 2563 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user