OTcreator
Active Member
- Joined
- Feb 14, 2022
- Messages
- 412
- Solutions
- 1
- Reaction score
- 44
Hello. I have one problem. Bans and others informations is visible, but in row "Player" don't have player name.
@Znote could you check this please? All work good, and sorted by player.account_Id = bans.value but don't give player name.
This is CODE:
@Znote could you check this please? All work good, and sorted by player.account_Id = bans.value but don't give player name.
This is CODE:
PHP:
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; ?>
<?PHP
$ban_reason = array (
0 => 'Offensive Name',
1 => 'Invalid Name Format',
2 => 'Unsuitable Name',
3 => 'Name Inciting Rule Violation',
4 => 'Offensive Statement',
5 => 'Spamming',
6 => 'Illegal Advertising',
7 => 'Off-Topic Public Statement',
8 => 'Non-English Public Statement',
9 => 'Inciting Rule Violation',
10 => 'Bug Abuse',
11 => 'Game Weakness Abuse',
12 => 'Using Unofficial Software',
13 => 'Hacking',
14 => 'Multi-Clienting',
15 => 'Account Trading or Sharing',
16 => 'Threatening Gamemaster',
17 => 'Pretending to Have Influence on Rule Enforcement',
18 => 'False Report to Gamemaster',
19 => 'Destructive Behaviour',
28 => 'Excessive Unjustified Player Killing',
21 => 'Spoiling Auction'
);
// bans.value - nie bans.id
$players_banned = mysql_select_multi('SELECT `bans`.`value`, `bans`.`comment`, `bans`.`admin_id`, `bans`.`expires`, `bans`.`added`, `bans`.`reason` FROM `bans`, `players` WHERE `players`.`account_id` = `bans`.`value` GROUP BY `bans`.`value` ORDER BY `bans`.`added` DESC');
if(!$players_banned) { ?>
<h2><center><b>There are no players banned on <?php echo $config['site_title'] ?>!</b></center></h2>
<?php } else {
$number_of_players = 0;
foreach($players_banned as $player) {
$nick = mysql_select_multi("SELECT name, id, level, account_id FROM `players` WHERE account_id =".$player['value']." ORDER BY level DESC LIMIT 20");
$gmnick = mysql_select_multi("SELECT name, id FROM `players` WHERE id =".$player['admin_id']."");
if($player['admin_id'] >= "1")
$banby = "<a href=characterprofile.php?name=".$gmnick['name']."><font color ='green'>".$gmnick['name']."</font></a>";
else
$banby = "Auto Ban";
$number_of_players++;
if ($player['expires'] == -1) // If the banishment is permanent
$expires = "PERMANENT";
else
$expires = date("d/m/Y, G:i:s", $player['expires']);
$players_rows .= '
<TD align="center">'.$player['name'].'</A></TD>
<TD align="center"><font color="#e43725">'.$ban_reason[$player['reason']].'</TD>
<TD align="center">'.$player['comment'].'</TD>
<TD align="center">'.$banby.'</TD>
<TD align="center">'.date("d/m/Y, G:i:s", $player['added']).'</TD>
<TD align="center">'.' <font color="#e43725">12 hours </TD>
</TR>';
} ?>
<!-- List of players -->
<table class="table table-bordered table-condensed table-striped">
<TR><TD CLASS="white"><b><center>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>By:</center></b></TD>
<TD class="white"><b><center>Added:</center></b></TD>
<TD class="white"><b><center>Expires:</center></b></TD></TR><?php echo $players_rows ?>
</TABLE>
<?php } ?>
<?php include 'layout/overall/footer.php'; ?>