Aici e codul pe care il folosesc
Cod: Selectaţi tot
<h2 class="main-title">Jucatori banati</h2>
<div class="users-table table-wrapper">
<table id="dataTable" class="table table-dark table-borderless">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">Nume Jucator</th>
<th scope="col">Nume Administrator</th>
<th scope="col">Motiv</th>
<th scope="col">Timp Ramas</th>
</tr>
</thead>
<tbody>
<?php
$query = Config::$g_con->query("SELECT * FROM Advanced_Bans ORDER BY id DESC");
$results = $query->fetchAll();
foreach($results as $key => $result) {
?>
<tr>
<td><div class="top-cat-list__subtitle"><span class="purple"><?php echo $key+1 ?></span></div></td>
<td><div class="top-cat-list__subtitle"><span class="blue"><?php echo $result['victim_name']?></span></div></td>
<td><div class="top-cat-list__subtitle"><span class="success"><?php echo $result['admin_name'] ?></span></div></td>
<td><div class="top-cat-list__subtitle"><span class="warning"><?php echo $result['reason'] ?></span></div></td>
<?php if($result['banlength'] != 0) { ?>
<td><div class="top-cat-list__subtitle"><span class="purple"><?php echo round($result['banlength'] / 60) ?>h</span></div></td>
<?php } else { ?>
<td><div class="top-cat-list__subtitle"><span class="danger">Permanent</span></div></td>
<?php } ?>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>



