File: /var/www/ilya/data/www/irkboard.ru/admin/applications/members/modules_public/ajax/warn.php
<?php
/**
* Invision Power Services
* IP.Board v3.0.1
* Retrieve member warn log
* Last Updated: $Date: 2009-02-04 15:03:36 -0500 (Wed, 04 Feb 2009) $
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @package Invision Power Board
* @subpackage Members
* @link http://www.invisionpower.com
* @since Tuesday 1st March 2005 (11:52)
* @version $Revision: 3887 $
*
*/
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 ) );
}
}
}