Version 2.0.0
This commit is contained in:
1 parent
5699abfc0e
commit
0eecc172d9
696 files changed
+120723
-77160
No files matched your search
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
+--------------------------------------------------------------------------
|
||||
| Invision Power Board v2.0.0
|
||||
| ========================================
|
||||
| by Matthew Mecham
|
||||
| (c) 2001,2002 Invision Power Services
|
||||
| http://www.ibforums.com
|
||||
| ========================================
|
||||
| Web: http://www.ibforums.com
|
||||
| Email: phpboards@ibforums.com
|
||||
| Licence Info: phpib-licence@ibforums.com
|
||||
+---------------------------------------------------------------------------
|
||||
|
|
||||
| > Admin: Warning Functions
|
||||
| > Module written by Matt Mecham
|
||||
| > Date started: 23rd April 2003
|
||||
|
|
||||
| > Module Version Number: 1.0.0
|
||||
+--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
if ( ! defined( 'IN_ACP' ) )
|
||||
{
|
||||
print "<h1>Incorrect access</h1>You cannot access this file directly. If you have recently upgraded, make sure you upgraded 'admin.php'.";
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
class ad_warn {
|
||||
|
||||
var $base_url;
|
||||
|
||||
function auto_run()
|
||||
{
|
||||
global $ibforums, $DB, $std, $ibforums;
|
||||
|
||||
//-----------------------------------------
|
||||
// Kill globals - globals bad, Homer good.
|
||||
//-----------------------------------------
|
||||
|
||||
$tmp_in = array_merge( $_GET, $_POST, $_COOKIE );
|
||||
|
||||
foreach ( $tmp_in as $k => $v )
|
||||
{
|
||||
unset($$k);
|
||||
}
|
||||
|
||||
$ibforums->admin->nav[] = array( 'act=warn', 'Warning Set-up' );
|
||||
|
||||
$ibforums->admin->page_detail = "This section will allow you to modify your warning parameters";
|
||||
$ibforums->admin->page_title = "Member Warning Set-up";
|
||||
|
||||
//-----------------------------------------
|
||||
|
||||
switch($ibforums->input['code'])
|
||||
{
|
||||
|
||||
//-----------------------------------------
|
||||
default:
|
||||
$this->overview();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------
|
||||
//
|
||||
// Overview: show um.. overview.
|
||||
//
|
||||
//-----------------------------------------
|
||||
|
||||
function overview()
|
||||
{
|
||||
global $ibforums, $DB, $std, $ibforums;
|
||||
|
||||
$unit_map = array(
|
||||
'd' => 'Day(s)' ,
|
||||
'h' => 'Hour(s)',
|
||||
);
|
||||
|
||||
$ibforums->adskin->td_header[] = array( "Warn Level" , "20%" );
|
||||
$ibforums->adskin->td_header[] = array( "Details" , "80%" );
|
||||
|
||||
$ibforums->html .= $ibforums->adskin->start_table( "Currently active Auto tasks" );
|
||||
|
||||
$warns = array();
|
||||
|
||||
$DB->query("SELECT * from ibf_warn_settings ORDER BY warn_level");
|
||||
|
||||
while ( $r = $DB->fetch_row() )
|
||||
{
|
||||
$warns[ $r['warn_level'] ][] = $r;
|
||||
}
|
||||
|
||||
if ( count($warns) > 0 )
|
||||
{
|
||||
foreach( $warns as $id => $data )
|
||||
{
|
||||
$tmp = "";
|
||||
|
||||
$ban = "";
|
||||
$mod = "";
|
||||
$nop = "";
|
||||
|
||||
if ( $data['warn_ban'] != "" )
|
||||
{
|
||||
if ( $data['warn_ban'] == 'p' )
|
||||
{
|
||||
$ban = "Permanent Ban";
|
||||
}
|
||||
else
|
||||
{
|
||||
list ($val, $unit) = explode( ',', $data['warn_ban'] );
|
||||
|
||||
$ban = "Temporary suspension for ".$val." ".$unit_map[$unit];
|
||||
}
|
||||
}
|
||||
|
||||
if ( $data['warn_modq'] != "" )
|
||||
{
|
||||
if ( $data['warn_modq'] == 'p' )
|
||||
{
|
||||
$mod = "Permanent post moderation";
|
||||
}
|
||||
else
|
||||
{
|
||||
list ($val, $unit) = explode( ',', $data['warn_modq'] );
|
||||
|
||||
$mod = "Require post moderation for ".$val." ".$unit_map[$unit];
|
||||
}
|
||||
}
|
||||
|
||||
if ( $data['warn_nopost'] != "" )
|
||||
{
|
||||
if ( $data['warn_nopost'] == 'p' )
|
||||
{
|
||||
$nop = "Permanent post banning";
|
||||
}
|
||||
else
|
||||
{
|
||||
list ($val, $unit) = explode( ',', $data['warn_nopost'] );
|
||||
|
||||
$nop = "Post ban for ".$val." ".$unit_map[$unit];
|
||||
}
|
||||
}
|
||||
|
||||
$html = "<table width='100%' cellpadding='4'>";
|
||||
|
||||
if ( $ban != "" )
|
||||
{
|
||||
$html .= "<tr>
|
||||
<td width='20%'><strong>Ban</strong></td>
|
||||
<td width='30%'>$ban</td>
|
||||
<td width='25%'>Edit</td>
|
||||
<td width='25%'>Remove</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
if ( $mod != "" )
|
||||
{
|
||||
$html .= "<tr>
|
||||
<td width='20%'><strong>Post Moderation</strong></td>
|
||||
<td width='30%'>$mod</td>
|
||||
<td width='25%'>Edit</td>
|
||||
<td width='25%'>Remove</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
if ( $nop != "" )
|
||||
{
|
||||
$html .= "<tr>
|
||||
<td width='20%'><strong>Post Ban</strong></td>
|
||||
<td width='30%'>$nop</td>
|
||||
<td width='25%'>Edit</td>
|
||||
<td width='25%'>Remove</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
$html .= "</table>";
|
||||
|
||||
|
||||
$ibforums->html .= $ibforums->adskin->add_td_row( array( "<b>{$warns['warn_level']}</b>",
|
||||
$html
|
||||
) );
|
||||
}
|
||||
}
|
||||
|
||||
$ibforums->html .= $ibforums->adskin->add_td_basic( 'Add new auto task', 'center', 'pformstrip' );
|
||||
|
||||
$ibforums->html .= $ibforums->adskin->end_table();
|
||||
|
||||
//-----------------------------------------
|
||||
//-------------------------------
|
||||
|
||||
$ibforums->admin->output();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user