Version 1.3.0
This commit is contained in:
1 parent
7ef3d1712a
commit
f87d29ba65
290 files changed
+50206
-17930
No files matched your search
@@ -2,15 +2,17 @@
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Board v1.1
|
||||
| Invision Power Board v1.3 Final
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001,2002 Invision Power Services
|
||||
| http://www.ibforums.com
|
||||
| (c) 2001 - 2003 Invision Power Services
|
||||
| http://www.invisionpower.com
|
||||
| ========================================
|
||||
| Web: http://www.ibforums.com
|
||||
| Email: phpboards@ibforums.com
|
||||
| Licence Info: phpib-licence@ibforums.com
|
||||
| Web: http://www.invisionboard.com
|
||||
| Time: Sun, 04 Jan 2004 00:30:16 GMT
|
||||
| Release: 28e7bfb25f08ac72a789cb1b172fa185
|
||||
| Email: matt@invisionpower.com
|
||||
| Licence Info: http://www.invisionboard.com/?license
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Import functions
|
||||
@@ -22,8 +24,11 @@
|
||||
*/
|
||||
|
||||
|
||||
// Ensure we've not accessed this script directly:
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
$idx = new ad_modlogs();
|
||||
@@ -34,7 +39,20 @@ class ad_modlogs {
|
||||
var $base_url;
|
||||
|
||||
function ad_modlogs() {
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
//---------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
//---------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
//---------------------------------------
|
||||
|
||||
switch($IN['code'])
|
||||
{
|
||||
@@ -62,7 +80,7 @@ class ad_modlogs {
|
||||
|
||||
function view()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
$start = $IN['st'] ? $IN['st'] : 0;
|
||||
|
||||
@@ -78,7 +96,9 @@ class ad_modlogs {
|
||||
|
||||
$query = "&act=modlog&mid={$IN['mid']}&code=view";
|
||||
|
||||
$DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m, ibf_forums f WHERE m.member_id='".$IN['mid']."' AND f.id=m.forum_id ORDER BY m.ctime DESC LIMIT $start, 20");
|
||||
$DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m
|
||||
LEFT JOIN ibf_forums f ON(f.id=m.forum_id)
|
||||
WHERE m.member_id='".$IN['mid']."' ORDER BY m.ctime DESC LIMIT $start, 20");
|
||||
|
||||
}
|
||||
else
|
||||
@@ -101,9 +121,9 @@ class ad_modlogs {
|
||||
|
||||
$query = "&act=modlog&code=view&search_type={$IN['search_type']}&search_string=".urlencode($IN['search_string']);
|
||||
|
||||
$DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m, ibf_forums f WHERE $dbq AND f.id=m.forum_id ORDER BY m.ctime DESC LIMIT $start, 20");
|
||||
|
||||
|
||||
$DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m
|
||||
LEFT JOIN ibf_forums f ON(f.id=m.forum_id)
|
||||
WHERE $dbq ORDER BY m.ctime DESC LIMIT $start, 20");
|
||||
|
||||
}
|
||||
|
||||
@@ -136,15 +156,20 @@ class ad_modlogs {
|
||||
while ( $row = $DB->fetch_row() )
|
||||
{
|
||||
|
||||
$row['ctime'] = $std->get_date( $row['ctime'], 'LONG' );
|
||||
$row['ctime'] = $ADMIN->get_date( $row['ctime'], 'LONG' );
|
||||
|
||||
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'] );
|
||||
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$row['member_name']}</b>",
|
||||
"<span style='font-weight:bold;color:red'><a href='#' onClick=\"alert('HTTP REFERRER OF ACTION:\\n{$row['http_referer']}\\nSESSION ID OF ACTION:\\n$sess_id')\">{$row['action']}</a></span>",
|
||||
"<span style='font-weight:bold;color:red'>{$row['action']}</span>",
|
||||
"<b>{$row['name']}</b>",
|
||||
"{$row['topic_title']}",
|
||||
"{$row['topic_title']}".$topicid,
|
||||
"{$row['ctime']}",
|
||||
"{$row['ip_address']}",
|
||||
) );
|
||||
@@ -175,7 +200,7 @@ class ad_modlogs {
|
||||
|
||||
function remove()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
if ($IN['mid'] == "")
|
||||
{
|
||||
@@ -202,12 +227,65 @@ class ad_modlogs {
|
||||
|
||||
function list_current()
|
||||
{
|
||||
global $IN, $root_path, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
|
||||
|
||||
$form_array = array();
|
||||
|
||||
$ADMIN->page_detail = "You may view and remove actions performed by your moderators";
|
||||
$ADMIN->page_title = "Moderator Logs Manager";
|
||||
|
||||
|
||||
//+-------------------------------
|
||||
// VIEW LAST 5
|
||||
//+-------------------------------
|
||||
|
||||
$DB->query("SELECT m.*, f.id as forum_id, f.name FROM ibf_moderator_logs m
|
||||
LEFT JOIN ibf_forums f ON (f.id=m.forum_id)
|
||||
ORDER BY m.ctime DESC LIMIT 0, 5");
|
||||
|
||||
$SKIN->td_header[] = array( "Member Name" , "15%" );
|
||||
$SKIN->td_header[] = array( "Action Perfomed" , "15%" );
|
||||
$SKIN->td_header[] = array( "Forum" , "15%" );
|
||||
$SKIN->td_header[] = array( "Topic Title" , "25%" );
|
||||
$SKIN->td_header[] = array( "Time of action" , "20%" );
|
||||
$SKIN->td_header[] = array( "IP address" , "10%" );
|
||||
|
||||
$ADMIN->html .= $SKIN->start_table( "Last 5 Moderation Actions" );
|
||||
|
||||
if ( $DB->get_num_rows() )
|
||||
{
|
||||
while ( $row = $DB->fetch_row() )
|
||||
{
|
||||
|
||||
$row['ctime'] = $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'] );
|
||||
|
||||
$ADMIN->html .= $SKIN->add_td_row( array( "<b>{$row['member_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
|
||||
{
|
||||
$ADMIN->html .= $SKIN->add_td_basic("<center>No results</center>");
|
||||
}
|
||||
|
||||
$ADMIN->html .= $SKIN->end_table();
|
||||
|
||||
//+-------------------------------
|
||||
|
||||
|
||||
Reference in new issue
Block a user