Version 2.1.7
This commit is contained in:
1 parent
0eecc172d9
commit
f73f8bff6d
941 files changed
+215301
-103093
No files matched your search
@@ -0,0 +1,395 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board 2.1.7
|
||||
| =============================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001 - 2005 Invision Power Services, Inc.
|
||||
| http://www.invisionpower.com
|
||||
| =============================================
|
||||
| Web: http://www.invisionboard.com
|
||||
| http://www.ibresource.ru/products/invisionpowerboard/
|
||||
| Time: Tuesday 18th of July 2006 05:56:00 PM
|
||||
| Release: 52f408a29988b02f45b5e6f4ba5af0ae
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
| http://www.ibresource.ru/license
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD IS NOT FREE / OPEN SOURCE!
|
||||
+---------------------------------------------------------------------------
|
||||
| INVISION POWER BOARD ÍÅ ßÂËßÅÒÑß ÁÅÑÏËÀÒÍÛÌ ÏÐÎÃÐÀÌÌÍÛÌ ÎÁÅÑÏÅ×ÅÍÈÅÌ!
|
||||
| Ïðàâà íà ÏÎ ïðèíàäëåæàò Invision Power Services
|
||||
| Ïðàâà íà ïåðåâîä IBResource (http://www.ibresource.ru)
|
||||
+---------------------------------------------------------------------------
|
||||
| > $Date: 2005-10-28 15:18:16 +0100 (Fri, 28 Oct 2005) $
|
||||
| > $Revision: 67 $
|
||||
| > $Author: bfarber $
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Import functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 22nd April 2002
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
| > DBA Checked: Tue 25th May 2004
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Íåâåðíûé âõîä</h1> Ó Âàñ íåò äîñòóïà ê äèðåêòèâå ýòîãî ôàéëà. Åñëè Âû ïðîâîäèëè îáíîâëåíèÿ, óáåäèòåñü, ÷òî íå çàáûëè îáíîâèòü 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
class ad_modlogs {
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_main = "admin";
|
||||
|
||||
/**
|
||||
* Section title name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
var $perm_child = "modlog";
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
//-----------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
//-----------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
switch($this->ipsclass->input['code'])
|
||||
{
|
||||
|
||||
case 'view':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->view();
|
||||
break;
|
||||
|
||||
case 'remove':
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':remove' );
|
||||
$this->remove();
|
||||
break;
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->ipsclass->admin->cp_permission_check( $this->perm_main.'|'.$this->perm_child.':' );
|
||||
$this->list_current();
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
function view()
|
||||
{
|
||||
$start = $this->ipsclass->input['st'] ? $this->ipsclass->input['st'] : 0;
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Ïðîñìîòð âñåõ äåéñòâèé ñîâåðøåííûõ ìîäåðàòîðîì";
|
||||
$this->ipsclass->admin->page_title = "Ëîãè ìîäåðàöèé";
|
||||
|
||||
if ($this->ipsclass->input['search_string'] == "")
|
||||
{
|
||||
if (! $this->ipsclass->input['mid'] )
|
||||
{
|
||||
// Empty search form...sneaky...
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'moderator_logs' ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&act=modlog&code=view";
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'modlogs_view_three', array( 'start' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(id) as count', 'from' => 'moderator_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&act=modlog&mid={$this->ipsclass->input['mid']}&code=view";
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'modlogs_view_one', array( 'mid' => $this->ipsclass->input['mid'], 'start' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->input['search_string'] = urldecode($this->ipsclass->input['search_string']);
|
||||
|
||||
if ( ($this->ipsclass->input['search_type'] == 'topic_id') or ($this->ipsclass->input['search_type'] == 'forum_id') )
|
||||
{
|
||||
$dbq = "m.".$this->ipsclass->input['search_type']."='".$this->ipsclass->input['search_string']."'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$dbq = "m.".$this->ipsclass->input['search_type']." LIKE '%".$this->ipsclass->input['search_string']."%'";
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->simple_construct( array( 'select' => 'COUNT(m.id) as count', 'from' => 'moderator_logs m', 'where' => $dbq ) );
|
||||
$this->ipsclass->DB->simple_exec();
|
||||
|
||||
$row = $this->ipsclass->DB->fetch_row();
|
||||
|
||||
$row_count = $row['count'];
|
||||
|
||||
$query = "&act=modlog&code=view&search_type={$this->ipsclass->input['search_type']}&search_string=".urlencode($this->ipsclass->input['search_string']);
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'modlogs_view_two', array( 'dbq' => $dbq, 'start' => $start ) );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
}
|
||||
|
||||
$links = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $row_count,
|
||||
'PER_PAGE' => 20,
|
||||
'CUR_ST_VAL' => $start,
|
||||
'L_SINGLE' => "Îäíà ñòðàíèöà",
|
||||
'L_MULTI' => "Ñòðàíèöû: ",
|
||||
'BASE_URL' => $this->ipsclass->base_url.$query,
|
||||
)
|
||||
);
|
||||
|
||||
$this->ipsclass->admin->page_detail = "YÂ ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óäàëÿòü äåéñòâèÿ ñîâåðøåííûå ìîäåðàòîðàìè ôîðóìîâ";
|
||||
$this->ipsclass->admin->page_title = "Ëîãè ìîäåðàöèé";
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèå" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ôîðóì" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Òåìà" , "25%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äàòà Âðåìÿ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ëîãè ìîäåðàòîðîâ ñîõðàíåíû" );
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'pformstrip');
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' );
|
||||
|
||||
if ( $row['topic_id'] )
|
||||
{
|
||||
$topicid = "<br />ID òåìû: ".$row['topic_id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$topicid = " ";
|
||||
}
|
||||
|
||||
$sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] );
|
||||
$row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$row['members_display_name']}</b>",
|
||||
"<span style='font-weight:bold;color:red'>{$row['action']}</span>",
|
||||
"<b>{$row['name']}</b>",
|
||||
"{$row['topic_title']}".$topicid,
|
||||
"{$row['ctime']}",
|
||||
"{$row['ip_address']}",
|
||||
) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic($links, 'right', 'pformstrip');
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
}
|
||||
|
||||
//-----------------------------------------
|
||||
// Remove archived files
|
||||
//-----------------------------------------
|
||||
|
||||
function remove()
|
||||
{
|
||||
if ($this->ipsclass->input['mid'] == "")
|
||||
{
|
||||
$this->ipsclass->admin->error("Âû äîëæíû âûáðàòü ID ìîäåðàòîðà!");
|
||||
}
|
||||
|
||||
$this->ipsclass->DB->simple_exec_query( array( 'delete' => 'moderator_logs', 'where' => "member_id=".intval($this->ipsclass->input['mid']) ) );
|
||||
|
||||
$this->ipsclass->admin->save_log("Óäàëåíû ëîãè ìîäåðàöèé");
|
||||
|
||||
$this->ipsclass->boink_it($this->ipsclass->base_url."&act=modlog");
|
||||
exit();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// SHOW ALL LANGUAGE PACKS
|
||||
//-----------------------------------------
|
||||
|
||||
function list_current()
|
||||
{
|
||||
$form_array = array();
|
||||
|
||||
$this->ipsclass->admin->page_detail = "Â ýòîé ñåêöèè âû ìîæåòå ïðîñìàòðèâàòü è óäàëÿòü äåéñòâèÿ ñîâåðøåííûå ìîäåðàòîðàìè ôîðóìîâ";
|
||||
$this->ipsclass->admin->page_title = "Ëîãè ìîäåðàöèé";
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
// VIEW LAST 5
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'modlogs_list_current_last_five', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèå" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ôîðóì" , "15%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Òåìà" , "25%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äàòà Âðåìÿ" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "IP-àäðåñ" , "10%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîñëåäíèå 5 äåéñòâèé ìîäåðàòîðîâ" );
|
||||
|
||||
if ( $this->ipsclass->DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
|
||||
$row['ctime'] = $this->ipsclass->admin->get_date( $row['ctime'], 'LONG' );
|
||||
|
||||
$topicid = "";
|
||||
|
||||
if ( $row['topic_id'] )
|
||||
{
|
||||
$topicid = "<br />Topic ID: ".$row['topic_id'];
|
||||
}
|
||||
|
||||
$sess_id = preg_replace( "/^.+?s=(\w{32}).+?$/" , "\\1", $row['http_referer'] );
|
||||
$row['http_referer'] = preg_replace( "/s=(\w){32}/" , "" , $row['http_referer'] );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$row['members_display_name']}</b>",
|
||||
"<span style='font-weight:bold;color:red'>{$row['action']}</span>",
|
||||
"<b>{$row['name']}</b>",
|
||||
"{$row['topic_title']}".$topicid,
|
||||
"{$row['ctime']}",
|
||||
"{$row['ip_address']}",
|
||||
) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_basic("<center>Íåò çàïèñåé</center>");
|
||||
}
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ìîäåðàòîð" , "30%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Äåéñòâèé ñîâåðøåíî" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Ïðîñìîòð âñåõ äåéñòâèé ìîäåðàòîðà" , "20%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( "Óäàëåíèå âñåõ äåéñòâèé ìîäåðàòîðà" , "30%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ñîõðàíåííûå ëîãè ìîäåðàöèé" );
|
||||
|
||||
$this->ipsclass->DB->cache_add_query( 'modlogs_list_current_show_all', array() );
|
||||
$this->ipsclass->DB->cache_exec_query();
|
||||
|
||||
while ( $r = $this->ipsclass->DB->fetch_row() )
|
||||
{
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>{$r['members_display_name']}</b>",
|
||||
"<center>{$r['act_count']}</center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&act=modlog&code=view&mid={$r['member_id']}'>Ïðîñìîòð</a></center>",
|
||||
"<center><a href='".$this->ipsclass->base_url."&act=modlog&code=remove&mid={$r['member_id']}'>Óäàëåíèå</a></center>",
|
||||
) );
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , 'view' ),
|
||||
2 => array( 'act' , 'modlog' ),
|
||||
4 => array( 'section', $this->ipsclass->section_code ),
|
||||
) );
|
||||
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "40%" );
|
||||
$this->ipsclass->adskin->td_header[] = array( " " , "60%" );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->start_table( "Ïîèñê ëîãîâ ìîäåðàöèé" );
|
||||
|
||||
$form_array = array(
|
||||
0 => array( 'topic_title', 'Íàçâàíèå òåìû' ),
|
||||
1 => array( 'ip_address', 'IP-àäðåñ' ),
|
||||
2 => array( 'member_name', 'Ìîäåðàòîð' ),
|
||||
3 => array( 'topic_id' , 'ID òåìû' ),
|
||||
4 => array( 'forum_id' , 'ID ôîðóìà' )
|
||||
);
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü...</b>" ,
|
||||
$this->ipsclass->adskin->form_input( "search_string")
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( "<b>Èñêàòü â...</b>" ,
|
||||
$this->ipsclass->adskin->form_dropdown( "search_type", $form_array)
|
||||
) );
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_form("Èñêàòü");
|
||||
|
||||
$this->ipsclass->html .= $this->ipsclass->adskin->end_table();
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$this->ipsclass->admin->output();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user