• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[ModernAAC] Bans List by Archez

Status
Not open for further replies.

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
Code:
# Banishments Script
# Version: 1.0
# Author: Archez
# Contact: archez
# This script was merely designed for Modern AAC
# Original TOPIC: http://otland.net/f251/your-website-modern-aac-only-94021/index3.html#post955176

SCRIPT:
PHP:
<?php

# Banishments Script
# Version: 1.0
# Author: Archez
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

require('config.php');

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$a = $ots->getDBHandle();

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

# Number of bans to show
$archez['limit'] = '15';

/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */

$reason = array('Offensive Name', 'Invalid Name Format', 'Unsuitable Name', 'Name Inciting Rule Violation', 'Offensive Statement', 'Spamming', 'Illegal Advertising', 'Off-Topic Public Statement', 'Non-English Public Statement', 'Inciting Rule Violation', 'Bug Abuse', 'Game Weakness Abuse', 'Using Unofficial Software to Play', 'Hacking', 'Multi-Clienting', 'Account Trading or Sharing', 'Threatening Gamemaster', 'Pretending to Have Influence on Rule Enforcer', 'False Report to Gamemaster', 'Destructive Behaviour', 'Excessive Unjustified Player Killing', 'Invalid Payment', 'Spoiling Auction');

$data = $a->query('SELECT * FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`type` = 3 AND `bans`.`active` = 1 ORDER BY `bans`.`added` DESC LIMIT '.$archez['limit']);

echo '<table border="0" width="100%">
<tr><td width="5%"><b>#</b></td><td width="25%"><b>Player</b></td><td width="30%"><b>Reason</b></td><td width="25%"><b>Imposed by</b></td><td width="15%"><b>Expires on</b></td></tr>';

$count = 0;
foreach($data as $ban) {

$count++;

$player = $a->query('SELECT * FROM `players` WHERE `account_id` = '.$ban['value'].'')->fetch();
$staff = $a->query('SELECT * FROM `players` WHERE `id` = '.$ban['admin_id'].'')->fetch();

if($ban['admin_id'] == 0) {
$staff['name'] = '<span style="font-size:10px;color:#e87300;">AUTOMATIC</span>';
} else { $staff['name'] = '<a href="/index.php/character/view/'.strtolower($staff['name']).'">'.$staff['name'].'</a>';
}

if($ban['expires'] == '-1') {
$expires = '<span style="font-size:10px;color:#e80000;">PERMANENT</span>';
} else {
$expires = '<span style="font-size:10px;">'.strtoupper(date('dS/F/Y', $ban['expires'])).'</span>';
}

echo '<tr class="highlight"><td>'.$count.'</td><td><a href="/index.php/character/view/'.strtolower($player['name']).'">'.$player['name'].'</a></td><td>'.$reason[$ban['reason']].'</td><td>'.$staff['name'].'</td><td>'.$expires.'</td></tr>';
}

echo '</table>';

?>
 
where is preview?
nvm you're banned
 
Simple script using TR highlight, you won't need a preview. :p
 
ohp yes i have php supahpowers i can preview it at my mind :D
 
Status
Not open for further replies.
Back
Top