• 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!

bans.php modern aac ERROR

Lbtg

Advanced OT User
Joined
Nov 22, 2008
Messages
2,398
Reaction score
165
A PHP Error was encountered

Severity: Notice

Message: Undefined index: site

Filename: pages/bans.php

Line Number: 37
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: players_rows

Filename: pages/bans.php

Line Number: 45
A PHP Error was encountered

Severity: Notice

Message: Undefined index: site

Filename: pages/bans.php

Line Number: 48


why i getting Chose error on website then i look who got banned ?
 
<?PHP
require("config.php");
$ots = POT::getInstance();
$ots->connect(POT::DB_MYSQL, connection());
$SQL = $ots->getDBHandle();

//////////////////
/// CREATED BY ///
/// SAMME ///
/// AND EDITED ///
//// BY MINDEZ ///
///// FROM /////
/// OTLAND.NET ///
//////////////////

//Please respect the copyrights!//
$ban_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");

$players_banned = $SQL->query('SELECT `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`expires`, `bans`.`added`, `bans`.`reason` FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` AND `bans`.`type` = 3 AND `bans`.`active` = 1 GROUP BY `bans`.`value` ORDER BY `bans`.`added` DESC')->fetchAll();
if(!$players_banned)echo "There are currently no players banned.";
else{
$number_of_players = 0;
foreach($players_banned as $player) {
$nick = $SQL->query("SELECT name, id, level, account_id FROM `players` WHERE account_id =".$player['value']." ORDER BY level DESC LIMIT 1")->fetch();
$gmnick = $SQL->query("SELECT name, id FROM `players` WHERE id =".$player['admin_id']."")->fetch();

if($player['admin_id'] > "1")
$banby = "<a href=http://www.xivarian.com//index.php/character/view/$gmnick[0]><font color ='green'>$gmnick[0]</font></a>";
else
$banby = "Auto Ban";

$number_of_players++;

if(is_int($number_of_players / 2))
$bgcolor = $config['site']['darkborder'];
else
$bgcolor = $config['site']['lightborder'];

if ($player['expires'] == -1) // If the banishment is permanent
$expires = "PERMANENT";
else
$expires = date("d/m/Y, G:i:s", $player['expires']);


$players_rows .= '<TR BGCOLOR='.$bgcolor.'><TD WIDTH=15%><A HREF="http://www.mtibia.cl//index.php/character/view/'.$nick['name'].'">'.$nick['name'].'</A></TD><TD WIDTH=5%><font color ="red">'.$ban_reason[$player['reason']].'</font></TD><TD WIDTH=20%>'.$player['comment'].'</TD><TD>'.$banby.'</TD><TD>'.date("d/m/Y, G:i:s", $player['added']).'</TD><TD>'.$expires.'</TD></TR>';
}
//list of players
echo '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=white><b><center>Banned Player</center></b></TD><TD class="white"><b><center>Reason</center></b></TD><TD class="white"><b><center>Comment</center></b></TD><TD class="white"><b><center>Banned By</center></b></TD><TD class="white"><b><center>Added</center></b></TD><TD class="white"><b><center>Expires</center></b></TD></TR>'.$players_rows.'</TABLE>';
}
//COPY RIGHTS!! DO NOT DELETE!
echo '<br/><p align="right">Scripted by <B>Samme</B><br>Improved by <B>Mindez</B></p>';
?>
 
try this one
PHP:
<?php

# Banishments Script
# Version: 1.0
# Author: Archez
# Contact: archez
# This script was merely designed for Modern AAC

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

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>';

?>
 
Back
Top