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,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
@@ -1,247 +1,249 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Ignore a user
|
||||
* Last Updated: $Date: 2009-04-07 08:23:29 -0400 (Tue, 07 Apr 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: 4414 $
|
||||
*
|
||||
*/
|
||||
|
||||
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_ignore extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
default:
|
||||
case 'add':
|
||||
$result = $this->ignoreMember( $this->request['memberID'], 'topics' );
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
$result = $this->stopIgnoringMember( $this->request['memberID'], 'topics' );
|
||||
break;
|
||||
|
||||
case 'addPM':
|
||||
$result = $this->ignoreMember( $this->request['memberID'], 'messages' );
|
||||
break;
|
||||
|
||||
case 'removePM':
|
||||
$result = $this->stopIgnoringMember( $this->request['memberID'], 'messages' );
|
||||
break;
|
||||
}
|
||||
|
||||
if( $result['error'] )
|
||||
{
|
||||
$this->registry->output->showError( $result['error'], 10266 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->redirectScreen( $result['message'], $this->settings['base_url'] . 'showuser=' . $this->request['memberID'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ignore a member's topics
|
||||
*
|
||||
* @access public
|
||||
* @param integer Member ID to ignore
|
||||
* @param string Column to update
|
||||
* @return array Array of info
|
||||
*/
|
||||
public function ignoreMember( $ignoreId, $type='topics' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$this->lang->loadLanguageFile( array( 'public_usercp' ), 'core' );
|
||||
|
||||
$ignoreId = intval( $ignoreId );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$antiType = $type == 'topics' ? 'messages' : 'topics';
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$ignoreId )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['ignoreuser_noid'] );
|
||||
}
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['securehash_not_secure'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $ignoreId, 'core' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['ignoreuser_noid'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Can we ignore them?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $member['_canBeIgnored'] !== TRUE )
|
||||
{
|
||||
return array( 0 => $this->lang->words['ignoreuser_cannot'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Already ignoring?
|
||||
//-----------------------------------------
|
||||
|
||||
$ignoreMe = $this->DB->buildAndFetch( array(
|
||||
'select' => '*',
|
||||
'from' => 'ignored_users',
|
||||
'where' => 'ignore_owner_id=' . $this->memberData['member_id'] . ' AND ignore_ignore_id=' . $member['member_id']
|
||||
) );
|
||||
|
||||
if ( $ignoreMe['ignore_id'] )
|
||||
{
|
||||
if( $ignoreMe['ignore_' . $type ] )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['ignoreuser_already'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->DB->update( 'ignored_users', array( 'ignore_' . $type => 1 ), 'ignore_id=' . $ignoreMe['ignore_id'] );
|
||||
|
||||
return array( 'message' => $this->lang->words['ignoreuser_success'] );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Add it
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->insert( 'ignored_users', array(
|
||||
'ignore_owner_id' => $this->memberData['member_id'],
|
||||
'ignore_ignore_id' => $member['member_id'],
|
||||
'ignore_' . $antiType => 0,
|
||||
'ignore_' . $type => 1,
|
||||
)
|
||||
);
|
||||
|
||||
/* Rebuild cache */
|
||||
IPSMember::rebuildIgnoredUsersCache( $this->memberData );
|
||||
|
||||
return array( 'message' => $this->lang->words['ignoreuser_success'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop ignoring the user's topics
|
||||
*
|
||||
* @access public
|
||||
* @param integer Member ID to stop ignoring
|
||||
* @param string Column to update
|
||||
* @return array Array of info
|
||||
*/
|
||||
public function stopIgnoringMember( $ignoreId, $type='topics' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$this->lang->loadLanguageFile( array( 'public_usercp' ), 'core' );
|
||||
|
||||
$ignoreId = intval( $ignoreId );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$antiType = $type == 'topics' ? 'messages' : 'topics';
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$ignoreId )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['noignoreuser_noid'] );
|
||||
}
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['securehash_not_secure'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $ignoreId, 'core' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['noignoreuser_noid'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Already ignoring?
|
||||
//-----------------------------------------
|
||||
|
||||
$ignoreMe = $this->DB->buildAndFetch( array(
|
||||
'select' => '*',
|
||||
'from' => 'ignored_users',
|
||||
'where' => 'ignore_owner_id=' . $this->memberData['member_id'] . ' AND ignore_ignore_id=' . $member['member_id']
|
||||
) );
|
||||
|
||||
if ( $ignoreMe['ignore_id'] )
|
||||
{
|
||||
if( !$ignoreMe['ignore_' . $antiType ] )
|
||||
{
|
||||
$this->DB->delete( 'ignored_users', 'ignore_id=' . $ignoreMe['ignore_id'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->DB->update( 'ignored_users', array( 'ignore_' . $type => 0 ), 'ignore_id=' . $ignoreMe['ignore_id'] );
|
||||
}
|
||||
|
||||
/* Rebuild cache */
|
||||
IPSMember::rebuildIgnoredUsersCache( $this->memberData );
|
||||
|
||||
return array( 'message' => $this->lang->words['noignoreuser_success'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
return array( 'error' => $this->lang->words['noignoreuser_noid'] );
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Ignore a user
|
||||
* 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 20th February 2002
|
||||
* @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_profile_ignore extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
switch( $this->request['do'] )
|
||||
{
|
||||
default:
|
||||
case 'add':
|
||||
$result = $this->ignoreMember( $this->request['memberID'], 'topics' );
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
$result = $this->stopIgnoringMember( $this->request['memberID'], 'topics' );
|
||||
break;
|
||||
|
||||
case 'addPM':
|
||||
$result = $this->ignoreMember( $this->request['memberID'], 'messages' );
|
||||
break;
|
||||
|
||||
case 'removePM':
|
||||
$result = $this->stopIgnoringMember( $this->request['memberID'], 'messages' );
|
||||
break;
|
||||
}
|
||||
|
||||
if( $result['error'] )
|
||||
{
|
||||
$this->registry->output->showError( $result['error'], 10266 );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->redirectScreen( $result['message'], $this->settings['base_url'] . 'showuser=' . $this->request['memberID'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ignore a member's topics
|
||||
*
|
||||
* @access public
|
||||
* @param integer Member ID to ignore
|
||||
* @param string Column to update
|
||||
* @return array Array of info
|
||||
*/
|
||||
public function ignoreMember( $ignoreId, $type='topics' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$this->lang->loadLanguageFile( array( 'public_usercp' ), 'core' );
|
||||
|
||||
$ignoreId = intval( $ignoreId );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$antiType = $type == 'topics' ? 'messages' : 'topics';
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$ignoreId )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['ignoreuser_noid'] );
|
||||
}
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['securehash_not_secure'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $ignoreId, 'core' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['ignoreuser_noid'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Can we ignore them?
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $member['_canBeIgnored'] !== TRUE )
|
||||
{
|
||||
return array( 0 => $this->lang->words['ignoreuser_cannot'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Already ignoring?
|
||||
//-----------------------------------------
|
||||
|
||||
$ignoreMe = $this->DB->buildAndFetch( array(
|
||||
'select' => '*',
|
||||
'from' => 'ignored_users',
|
||||
'where' => 'ignore_owner_id=' . $this->memberData['member_id'] . ' AND ignore_ignore_id=' . $member['member_id']
|
||||
) );
|
||||
|
||||
if ( $ignoreMe['ignore_id'] )
|
||||
{
|
||||
if( $ignoreMe['ignore_' . $type ] )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['ignoreuser_already'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->DB->update( 'ignored_users', array( 'ignore_' . $type => 1 ), 'ignore_id=' . $ignoreMe['ignore_id'] );
|
||||
|
||||
return array( 'message' => $this->lang->words['ignoreuser_success'] );
|
||||
}
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Add it
|
||||
//-----------------------------------------
|
||||
|
||||
$this->DB->insert( 'ignored_users', array(
|
||||
'ignore_owner_id' => $this->memberData['member_id'],
|
||||
'ignore_ignore_id' => $member['member_id'],
|
||||
'ignore_' . $antiType => 0,
|
||||
'ignore_' . $type => 1,
|
||||
)
|
||||
);
|
||||
|
||||
/* Rebuild cache */
|
||||
IPSMember::rebuildIgnoredUsersCache( $this->memberData );
|
||||
|
||||
return array( 'message' => $this->lang->words['ignoreuser_success'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop ignoring the user's topics
|
||||
*
|
||||
* @access public
|
||||
* @param integer Member ID to stop ignoring
|
||||
* @param string Column to update
|
||||
* @return array Array of info
|
||||
*/
|
||||
public function stopIgnoringMember( $ignoreId, $type='topics' )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$this->lang->loadLanguageFile( array( 'public_usercp' ), 'core' );
|
||||
|
||||
$ignoreId = intval( $ignoreId );
|
||||
$md5check = IPSText::md5Clean( $this->request['md5check'] );
|
||||
$antiType = $type == 'topics' ? 'messages' : 'topics';
|
||||
|
||||
//-----------------------------------------
|
||||
// MD5 check
|
||||
//-----------------------------------------
|
||||
|
||||
if( !$ignoreId )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['noignoreuser_noid'] );
|
||||
}
|
||||
|
||||
if ( $md5check != $this->member->form_hash )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['securehash_not_secure'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load member
|
||||
//-----------------------------------------
|
||||
|
||||
$member = IPSMember::load( $ignoreId, 'core' );
|
||||
|
||||
//-----------------------------------------
|
||||
// Check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( ! $member['member_id'] )
|
||||
{
|
||||
return array( 'error' => $this->lang->words['noignoreuser_noid'] );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Already ignoring?
|
||||
//-----------------------------------------
|
||||
|
||||
$ignoreMe = $this->DB->buildAndFetch( array(
|
||||
'select' => '*',
|
||||
'from' => 'ignored_users',
|
||||
'where' => 'ignore_owner_id=' . $this->memberData['member_id'] . ' AND ignore_ignore_id=' . $member['member_id']
|
||||
) );
|
||||
|
||||
if ( $ignoreMe['ignore_id'] )
|
||||
{
|
||||
if( !$ignoreMe['ignore_' . $antiType ] )
|
||||
{
|
||||
$this->DB->delete( 'ignored_users', 'ignore_id=' . $ignoreMe['ignore_id'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->DB->update( 'ignored_users', array( 'ignore_' . $type => 0 ), 'ignore_id=' . $ignoreMe['ignore_id'] );
|
||||
}
|
||||
|
||||
/* Rebuild cache */
|
||||
IPSMember::rebuildIgnoredUsersCache( $this->memberData );
|
||||
|
||||
return array( 'message' => $this->lang->words['noignoreuser_success'] );
|
||||
}
|
||||
else
|
||||
{
|
||||
return array( 'error' => $this->lang->words['noignoreuser_noid'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,77 +1,79 @@
|
||||
<?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_photo 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( 'photos_profiles_off', 10242 );
|
||||
}
|
||||
|
||||
if( !$id )
|
||||
{
|
||||
$this->registry->output->showError( 'photos_no_id', 10243 );
|
||||
}
|
||||
|
||||
$member = IPSMember::load( $id );
|
||||
$member = IPSMember::buildDisplayData( $member );
|
||||
|
||||
$html = $this->registry->getClass('output')->getTemplate('profile')->showPhoto( $member );
|
||||
|
||||
//-----------------------------------------
|
||||
// Push to print handler
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->getClass('output')->setTitle( $this->lang->words['photo_title'] );
|
||||
$this->registry->getClass('output')->popUpWindow( $html );
|
||||
}
|
||||
|
||||
<?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_photo 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( 'photos_profiles_off', 10242, null, null, 403 );
|
||||
}
|
||||
|
||||
if( !$id )
|
||||
{
|
||||
$this->registry->output->showError( 'photos_no_id', 10243, null, null, 404 );
|
||||
}
|
||||
|
||||
$member = IPSMember::load( $id );
|
||||
$member = IPSMember::buildDisplayData( $member );
|
||||
|
||||
$html = $this->registry->getClass('output')->getTemplate('profile')->showPhoto( $member );
|
||||
|
||||
//-----------------------------------------
|
||||
// Push to print handler
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->getClass('output')->setTitle( $this->lang->words['photo_title'] . ' - ' . ipsRegistry::$settings['board_name']);
|
||||
$this->registry->getClass('output')->popUpWindow( $html );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Allow user to change their status
|
||||
*
|
||||
* @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: 4239 $
|
||||
*
|
||||
*/
|
||||
|
||||
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_status extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Security check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->request['k'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'no_permission', 20314 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$info = array();
|
||||
$id = intval( $this->memberData['member_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( 'status_off', 10268 );
|
||||
}
|
||||
|
||||
if( !$id )
|
||||
{
|
||||
$this->registry->output->showError( 'status_off', 10269 );
|
||||
}
|
||||
|
||||
$newStatus = trim( IPSText::getTextClass('bbcode')->stripBadWords( $this->request['new_status'] ) );
|
||||
|
||||
IPSMember::save( $id, array( 'extendedProfile' => array( 'pp_status' => $newStatus, 'pp_status_update' => time() ) ) );
|
||||
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_was_changed'], $this->settings['base_url'] . 'showuser=' . $id, $this->memberData['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
@@ -1,86 +1,389 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* Allow user to change their status
|
||||
*
|
||||
* @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_profile_status extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Security check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->request['k'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'no_permission', 20314 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
//-----------------------------------------
|
||||
|
||||
$info = array();
|
||||
$id = intval( $this->memberData['member_id'] );
|
||||
|
||||
//-----------------------------------------
|
||||
// Get HTML and skin
|
||||
//-----------------------------------------
|
||||
|
||||
$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'] )
|
||||
{
|
||||
$this->registry->output->showError( 'status_off', 10268 );
|
||||
}
|
||||
|
||||
if( !$id )
|
||||
{
|
||||
$this->registry->output->showError( 'status_off', 10269 );
|
||||
}
|
||||
|
||||
$newStatus = trim( IPSText::getTextClass('bbcode')->stripBadWords( $this->request['new_status'] ) );
|
||||
|
||||
IPSMember::save( $id, array( 'extendedProfile' => array( 'pp_status' => $newStatus, 'pp_status_update' => time() ) ) );
|
||||
|
||||
/* Got a return URL? */
|
||||
if ( $this->request['rurl'] )
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_was_changed'], $this->settings['base_url'] . base64_decode( $this->request['rurl'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_was_changed'], $this->settings['base_url'] . 'showuser=' . $id, $this->memberData['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.1.4
|
||||
* Allow user to change their status
|
||||
* 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 Tuesday 1st March 2005 (11:52)
|
||||
* @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_status extends ipsCommand
|
||||
{
|
||||
/**
|
||||
* Class entry point
|
||||
*
|
||||
* @access public
|
||||
* @param object Registry reference
|
||||
* @return void [Outputs to screen]
|
||||
*/
|
||||
public function doExecute( ipsRegistry $registry )
|
||||
{
|
||||
$this->request['do'] = ( $this->request['do'] ) ? $this->request['do'] : 'list';
|
||||
|
||||
//-----------------------------------------
|
||||
// Security check
|
||||
//-----------------------------------------
|
||||
|
||||
if ( $this->request['do'] != 'list' AND ( $this->request['k'] != $this->member->form_hash ) )
|
||||
{
|
||||
$this->registry->getClass('output')->showError( 'no_permission', 20314, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Get HTML and skin
|
||||
//-----------------------------------------
|
||||
|
||||
$this->registry->class_localization->loadLanguageFile( array( 'public_profile' ), 'members' );
|
||||
|
||||
/* 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 'list':
|
||||
$this->_list();
|
||||
break;
|
||||
case 'new':
|
||||
$this->_new();
|
||||
break;
|
||||
case 'reply':
|
||||
$this->_reply();
|
||||
break;
|
||||
case 'deleteStatus':
|
||||
$this->_deleteStatus();
|
||||
break;
|
||||
case 'deleteReply':
|
||||
$this->_deleteReply();
|
||||
break;
|
||||
case 'lockStatus':
|
||||
$this->_lockStatus();
|
||||
break;
|
||||
case 'unlockStatus':
|
||||
$this->_unlockStatus();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lock a status
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
private function _lockStatus()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id )
|
||||
{
|
||||
$this->registry->output->showError( 'status_off', 10276, null, null, 404 );
|
||||
}
|
||||
|
||||
/* 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->registry->output->showError( 'status_off', 10277, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->lockStatus();
|
||||
|
||||
/* Got a return URL? */
|
||||
if ( $this->request['rurl'] )
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_locked'], $this->settings['base_url'] . base64_decode( $this->request['rurl'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_locked'], $this->settings['base_url'] . 'showuser=' . $this->memberData['member_id'], $this->memberData['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Lock a status
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
private function _unlockStatus()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id )
|
||||
{
|
||||
$this->registry->output->showError( 'status_off', 10276, null, null, 404 );
|
||||
}
|
||||
|
||||
/* 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->registry->output->showError( 'status_off', 10277, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->unlockStatus();
|
||||
|
||||
/* Got a return URL? */
|
||||
if ( $this->request['rurl'] )
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_unlocked'], $this->settings['base_url'] . base64_decode( $this->request['rurl'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_unlocked'], $this->settings['base_url'] . 'showuser=' . $this->memberData['member_id'], $this->memberData['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a status reply
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
private function _list()
|
||||
{
|
||||
/* INIT */
|
||||
$filters = array( 'limit' => 15 );
|
||||
|
||||
/* Add to the filters */
|
||||
if ( $this->request['member_id'] )
|
||||
{
|
||||
$filters['member_id'] = intval( $this->request['member_id'] );
|
||||
}
|
||||
else if ( $this->request['status_id'] )
|
||||
{
|
||||
$filters['status_id'] = intval( $this->request['status_id'] );
|
||||
}
|
||||
else if ( $this->request['type'] == 'friends' )
|
||||
{
|
||||
$filters['friends_only'] = 1;
|
||||
}
|
||||
|
||||
/* Fetch last 20 */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Fetch */
|
||||
$statuses = $this->registry->getClass('memberStatus')->fetch( $this->memberData, $filters );
|
||||
|
||||
/* Fetch actions */
|
||||
$actions = $this->registry->getClass('memberStatus')->fetchActions( $this->memberData, array( 'limit' => 30, 'not_theirs' => 1, 'custom' => 0 ) );
|
||||
|
||||
$content = $this->registry->getClass('output')->getTemplate('profile')->statusUpdatesPage( $statuses, $actions );
|
||||
|
||||
$this->registry->output->addContent( $content );
|
||||
$this->registry->output->setTitle( $this->lang->words['status_updates_title'] . ' - ' . ipsRegistry::$settings['board_name'] );
|
||||
$this->registry->output->addNavigation( $this->lang->words['status_updates_title'], '' );
|
||||
$this->registry->output->sendOutput();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a status reply
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
private 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->registry->output->showError( 'status_off', 10276, null, null, 404 );
|
||||
}
|
||||
|
||||
/* 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->registry->output->showError( 'status_off', 10277, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->deleteReply();
|
||||
|
||||
/* Got a return URL? */
|
||||
if ( $this->request['rurl'] )
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_reply_deleted'], $this->settings['base_url'] . base64_decode( $this->request['rurl'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_reply_deleted'], $this->settings['base_url'] . 'app=members&module=profile&section=status&status_id=' . $status_id, 'false', 'members_status_all' );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a status
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
private function _deleteStatus()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id )
|
||||
{
|
||||
$this->registry->output->showError( 'status_off', 10278, null, null, 404 );
|
||||
}
|
||||
|
||||
/* 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->registry->output->showError( 'status_off', 10279, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->deleteStatus();
|
||||
|
||||
/* Got a return URL? */
|
||||
if ( $this->request['rurl'] )
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_deleted'], $this->settings['base_url'] . base64_decode( $this->request['rurl'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_deleted'], $this->settings['base_url'] . 'showuser=' . $this->memberData['member_id'], $this->memberData['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a reply statussesses
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
private function _reply()
|
||||
{
|
||||
/* INIT */
|
||||
$status_id = intval( $this->request['status_id'] );
|
||||
$comment = trim( $this->request['comment-' . $status_id ] );
|
||||
$id = intval( $this->request['id'] );
|
||||
|
||||
/* Quick check? */
|
||||
if ( ! $status_id OR ! $comment )
|
||||
{
|
||||
$this->registry->output->showError( 'status_off', 10280, null, null, 404 );
|
||||
}
|
||||
|
||||
/* 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->registry->output->showError( 'status_off', 10281, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->reply();
|
||||
|
||||
/* Got a return URL? */
|
||||
if ( $this->request['rurl'] )
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_reply_done'], $this->settings['base_url'] . base64_decode( $this->request['rurl'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_reply_done'], $this->settings['base_url'] . 'showuser=' . $id, $this->memberData['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new statussesses
|
||||
*
|
||||
* @access private
|
||||
*/
|
||||
private function _new()
|
||||
{
|
||||
$id = intval( $this->memberData['member_id'] );
|
||||
$su_Twitter = intval( $this->request['su_Twitter'] );
|
||||
$su_Facebook = intval( $this->request['su_Facebook'] );
|
||||
|
||||
/* Set Author */
|
||||
$this->registry->getClass('memberStatus')->setAuthor( $this->memberData );
|
||||
|
||||
/* Set Content */
|
||||
$this->registry->getClass('memberStatus')->setContent( trim( $this->request['content'] ) );
|
||||
|
||||
/* Can we reply? */
|
||||
if ( ! $this->registry->getClass('memberStatus')->canCreate() )
|
||||
{
|
||||
$this->registry->output->showError( 'status_off', 10268, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Set post outs */
|
||||
$this->registry->getClass('memberStatus')->setExternalUpdates( array( 'twitter' => $su_Twitter, 'facebook' => $su_Facebook ) );
|
||||
|
||||
/* Update */
|
||||
$this->registry->getClass('memberStatus')->create();
|
||||
|
||||
/* Got a return URL? */
|
||||
if ( $this->request['rurl'] )
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_was_changed'], $this->settings['base_url'] . base64_decode( $this->request['rurl'] ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->registry->output->redirectScreen( $this->lang->words['status_was_changed'], $this->settings['base_url'] . 'showuser=' . $id, $this->memberData['members_seo_name'] );
|
||||
}
|
||||
}
|
||||
}
|
||||
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 warn section
|
||||
* Last Updated: $Date: 2008-12-22 18:10:25 -0500 (Mon, 22 Dec 2008) $
|
||||
* 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: 3540 $
|
||||
* @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,19 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* Member warn functions
|
||||
* Last Updated: $Date: 2009-06-24 23:14:22 -0400 (Wed, 24 Jun 2009) $
|
||||
* Last Updated: $Date: 2010-10-08 10:15:14 -0400 (Fri, 08 Oct 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @author $Author: mark $
|
||||
* @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: 4818 $
|
||||
* @version $Revision: 6956 $
|
||||
*
|
||||
* @todo [Future] Ability to require confirmation of a warning (feature)?
|
||||
*/
|
||||
@@ -37,90 +39,90 @@ class public_members_warn_warn extends ipsCommand
|
||||
/**
|
||||
* Forum information
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var array Array of forum details
|
||||
*/
|
||||
private $forum = array();
|
||||
protected $forum = array();
|
||||
|
||||
/**
|
||||
* Topic information
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var array Array of topic details
|
||||
*/
|
||||
private $topic = array();
|
||||
protected $topic = array();
|
||||
|
||||
/**
|
||||
* Topic ID
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var integer Topic id
|
||||
*/
|
||||
private $topic_id = 0;
|
||||
protected $topic_id = 0;
|
||||
|
||||
/**
|
||||
* Forum ID
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var integer Forum id
|
||||
*/
|
||||
private $forum_id = 0;
|
||||
protected $forum_id = 0;
|
||||
|
||||
/**
|
||||
* Moderator information
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var array Array of moderator details
|
||||
*/
|
||||
private $moderator = array();
|
||||
protected $moderator = array();
|
||||
|
||||
/**
|
||||
* Can ban member from warn panel
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var bool Can ban member
|
||||
*/
|
||||
private $canSuspend = 0;
|
||||
protected $canSuspend = 0;
|
||||
|
||||
/**
|
||||
* Can mod queue member from warn panel
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var bool Can mod queue member
|
||||
*/
|
||||
private $canModQueue = 0;
|
||||
protected $canModQueue = 0;
|
||||
|
||||
/**
|
||||
* Can remove posting rights from member from warn panel
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var bool Can remove posting for member
|
||||
*/
|
||||
private $canRemovePostAbility = 0;
|
||||
protected $canRemovePostAbility = 0;
|
||||
|
||||
/**
|
||||
* Number of times per day member can be warned
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var integer Number of times per day member can be warned
|
||||
*/
|
||||
private $restrictWarnsPerDay = 0;
|
||||
protected $restrictWarnsPerDay = 0;
|
||||
|
||||
/**
|
||||
* Type of member
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var string mod, supmod, or member
|
||||
*/
|
||||
private $type = 'mod';
|
||||
protected $type = 'mod';
|
||||
|
||||
/**
|
||||
* Data for the member being warned
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @var array Member being warned
|
||||
*/
|
||||
private $warn_member = array();
|
||||
protected $warn_member = array();
|
||||
|
||||
/**
|
||||
* Class entry point
|
||||
@@ -144,17 +146,14 @@ class public_members_warn_warn extends ipsCommand
|
||||
break;
|
||||
|
||||
case 'add_note':
|
||||
$this->_checkAccess();
|
||||
$this->_addNoteform();
|
||||
break;
|
||||
|
||||
case 'save_note':
|
||||
$this->_checkAccess();
|
||||
$this->_saveNote();
|
||||
break;
|
||||
|
||||
case 'view':
|
||||
$this->_checkAccess();
|
||||
$this->viewLog();
|
||||
break;
|
||||
|
||||
@@ -210,8 +209,8 @@ class public_members_warn_warn extends ipsCommand
|
||||
}
|
||||
|
||||
/* Need app_class_forums to setup moderator stuff */
|
||||
require_once( IPS_ROOT_PATH . 'applications/forums/app_class_forums.php' );
|
||||
$app_class_forums = new app_class_forums( $this->registry );
|
||||
$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'applications/forums/app_class_forums.php', 'app_class_forums', 'forums' );
|
||||
$app_class_forums = new $classToLoad( $this->registry );
|
||||
|
||||
//-----------------------------------------
|
||||
// Make sure we're a moderator...
|
||||
@@ -236,11 +235,12 @@ class public_members_warn_warn extends ipsCommand
|
||||
}
|
||||
else if( $this->memberData['is_mod'] )
|
||||
{
|
||||
$other_mgroups = array();
|
||||
$other_mgroups = array();
|
||||
$_other_mgroups = IPSText::cleanPermString( $this->memberData['mgroup_others'] );
|
||||
|
||||
if( $this->memberData['mgroup_others'] )
|
||||
if( $_other_mgroups )
|
||||
{
|
||||
$other_mgroups = explode( ",", IPSText::cleanPermString( $this->memberData['mgroup_others'] ) );
|
||||
$other_mgroups = explode( ",", $_other_mgroups );
|
||||
}
|
||||
|
||||
$other_mgroups[] = $this->memberData['member_group_id'];
|
||||
@@ -292,7 +292,7 @@ class public_members_warn_warn extends ipsCommand
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->registry->output->showError( 'warn_no_access', 2025 );
|
||||
$this->registry->output->showError( 'warn_no_access', 2025, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -308,7 +308,7 @@ class public_members_warn_warn extends ipsCommand
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->registry->output->showError( 'warn_no_user', 10249 );
|
||||
$this->registry->output->showError( 'warn_no_user', 10249, null, null, 404 );
|
||||
}
|
||||
|
||||
$this->warn_member = IPSMember::load( $mid, 'all' );
|
||||
@@ -320,23 +320,29 @@ class public_members_warn_warn extends ipsCommand
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->registry->output->showError( 'warn_no_user', 10250 );
|
||||
$this->registry->output->showError( 'warn_no_user', 10250, null, null, 404 );
|
||||
}
|
||||
|
||||
$this->registry->output->setTitle( $this->page_title ? $this->page_title : $this->lang->words['w_title'] );
|
||||
$this->registry->output->setTitle( $this->page_title ? $this->page_title : $this->lang->words['w_title'] . ' - ' . ipsRegistry::$settings['board_name'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Save a new note
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
private function _saveNote()
|
||||
protected function _saveNote()
|
||||
{
|
||||
if ( $this->type == 'member' )
|
||||
{
|
||||
$this->registry->output->showError( 'warn_member_notes', 2026 );
|
||||
$this->registry->output->showError( 'warn_member_notes', 2026, null, null, 403 );
|
||||
}
|
||||
|
||||
/* Security Check */
|
||||
if ( $this->request['auth_key'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->output->showError( 'no_permission', 3021, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -382,14 +388,14 @@ class public_members_warn_warn extends ipsCommand
|
||||
/**
|
||||
* Form to add a new note
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
private function _addNoteForm()
|
||||
protected function _addNoteForm()
|
||||
{
|
||||
if ( $this->type == 'member' )
|
||||
{
|
||||
$this->registry->output->showError( 'warn_member_notes', 2027 );
|
||||
$this->registry->output->showError( 'warn_member_notes', 2027, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -400,7 +406,7 @@ class public_members_warn_warn extends ipsCommand
|
||||
|
||||
$this->output .= $this->registry->getClass('output')->getTemplate('mod')->warn_add_note_form( $this->warn_member['member_id'], $this->warn_member['members_display_name'], $this->warn_member['members_seo_name'] );
|
||||
|
||||
$this->registry->getClass('output')->setTitle( $this->lang->words['warn_popup_title'] );
|
||||
$this->registry->getClass('output')->setTitle( $this->lang->words['warn_popup_title'] . ' - ' . ipsRegistry::$settings['board_name'] );
|
||||
$this->registry->getClass('output')->popUpWindow( $this->output );
|
||||
}
|
||||
|
||||
@@ -474,7 +480,7 @@ class public_members_warn_warn extends ipsCommand
|
||||
|
||||
$this->output .= $this->registry->getClass('output')->getTemplate('mod')->warn_view_log( $this->warn_member, $rows, $links );
|
||||
|
||||
$this->registry->getClass('output')->setTitle( $this->lang->words['warn_popup_title'] );
|
||||
$this->registry->getClass('output')->setTitle( $this->lang->words['warn_popup_title'] . ' - ' . ipsRegistry::$settings['board_name'] );
|
||||
|
||||
return $this->output;
|
||||
}
|
||||
@@ -482,10 +488,10 @@ class public_members_warn_warn extends ipsCommand
|
||||
/**
|
||||
* Add a new arn entry
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
private function _doWarn()
|
||||
protected function _doWarn()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// INIT
|
||||
@@ -503,12 +509,21 @@ class public_members_warn_warn extends ipsCommand
|
||||
$member_banned = intval( $this->warn_member['member_banned'] );
|
||||
$warn_level = intval( $this->warn_member['warn_level']) ;
|
||||
|
||||
//--------------------------------------
|
||||
// Are we allowed to do this?
|
||||
//--------------------------------------
|
||||
|
||||
if ( $this->request['level'] == 'add' or ( $this->request['level'] == 'custom' and $level_custom > $warn_level ) )
|
||||
{
|
||||
$this->_checkAccess();
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Load Mod Squad
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php' );
|
||||
$moderatorLibrary = new moderatorLibrary( $this->registry );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'forums' ) . '/sources/classes/moderate.php', 'moderatorLibrary', 'forums' );
|
||||
$moderatorLibrary = new $classToLoad( $this->registry );
|
||||
|
||||
//-----------------------------------------
|
||||
// Security checks
|
||||
@@ -516,7 +531,7 @@ class public_members_warn_warn extends ipsCommand
|
||||
|
||||
if ( $this->type == 'member' )
|
||||
{
|
||||
$this->registry->output->showError( 'warn_member_notes', 2028 );
|
||||
$this->registry->output->showError( 'warn_member_notes', 2028, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -525,7 +540,7 @@ class public_members_warn_warn extends ipsCommand
|
||||
|
||||
if ( $this->request['key'] != $this->member->form_hash )
|
||||
{
|
||||
$this->registry->output->showError( 'warn_bad_key', 3020 );
|
||||
$this->registry->output->showError( 'warn_bad_key', 3020, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -655,8 +670,8 @@ class public_members_warn_warn extends ipsCommand
|
||||
// Grab PM class
|
||||
//-----------------------------------------
|
||||
|
||||
require_once( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php' );
|
||||
$messengerFunctions = new messengerFunctions( $this->registry );
|
||||
$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir( 'members' ) . '/sources/classes/messaging/messengerFunctions.php', 'messengerFunctions', 'members' );
|
||||
$messengerFunctions = new $classToLoad( $this->registry );
|
||||
|
||||
try
|
||||
{
|
||||
@@ -892,15 +907,15 @@ class public_members_warn_warn extends ipsCommand
|
||||
/**
|
||||
* Show the add new warn form
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @param mixed Empty | Error message language key
|
||||
* @return void [Outputs to screen/redirects]
|
||||
*/
|
||||
private function _showForm( $errors="" )
|
||||
protected function _showForm( $errors="" )
|
||||
{
|
||||
if ( $this->type == 'member' )
|
||||
{
|
||||
$this->registry->output->showError( 'warn_member_notes', 10255 );
|
||||
$this->registry->output->showError( 'warn_member_notes', 10255, null, null, 403 );
|
||||
}
|
||||
|
||||
$this->warn_member['warn_level'] = intval($this->warn_member['warn_level']);
|
||||
@@ -920,10 +935,10 @@ class public_members_warn_warn extends ipsCommand
|
||||
/**
|
||||
* Checking method access
|
||||
*
|
||||
* @access private
|
||||
* @access protected
|
||||
* @return void [Displays error if appropriate]
|
||||
*/
|
||||
private function _checkAccess()
|
||||
protected function _checkAccess()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Protected member? Really? o_O
|
||||
@@ -931,7 +946,7 @@ class public_members_warn_warn extends ipsCommand
|
||||
|
||||
if ( strstr( ',' . $this->settings['warn_protected'] . ',', ',' . $this->warn_member['member_group_id'] . ',' ) )
|
||||
{
|
||||
$this->registry->output->showError( 'warn_protected_member', 10256 );
|
||||
$this->registry->output->showError( 'warn_protected_member', 10256, null, null, 403 );
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
@@ -946,7 +961,7 @@ class public_members_warn_warn extends ipsCommand
|
||||
|
||||
if ( $check['warn_times'] >= $this->restrictWarnsPerDay )
|
||||
{
|
||||
$this->registry->output->showError( 'warned_already', 10257 );
|
||||
$this->registry->output->showError( 'warned_already', 10257, null, null, 403 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user