feat: fix ui leaderboard
This commit is contained in:
parent
4e50ae9f5a
commit
b5672b2326
@ -190,14 +190,12 @@
|
||||
width: 300px;
|
||||
image-rendering: pixelated;
|
||||
margin: 20px;
|
||||
margin-top: 160px;
|
||||
}
|
||||
|
||||
.container-board .menu {
|
||||
margin: 0 auto;
|
||||
border-radius: 6px;
|
||||
width: 400px;
|
||||
border: 5px solid;
|
||||
height: 40px;
|
||||
align-content: center;
|
||||
}
|
||||
@ -231,14 +229,28 @@ td {
|
||||
}
|
||||
|
||||
|
||||
.container-board .board table tbody tr {
|
||||
background: #0b0e00bd;
|
||||
.container-board .board table {
|
||||
background: #0b0e00f3;
|
||||
}
|
||||
|
||||
.container-board .board table tbody tr:hover {
|
||||
background: #c1fc0032;
|
||||
}
|
||||
|
||||
.container-board .back {
|
||||
color: #ffff009a;
|
||||
text-decoration: none;
|
||||
font-size: 30px;
|
||||
position: absolute;
|
||||
z-index: 99999;
|
||||
left: 2%;
|
||||
top: 5%;
|
||||
}
|
||||
|
||||
.container-board .back:hover {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.container-onboard {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
@ -1,7 +1,4 @@
|
||||
<?php
|
||||
|
||||
use LDAP\Result;
|
||||
|
||||
session_start();
|
||||
require_once "config/db.php";
|
||||
|
||||
@ -20,10 +17,6 @@ if ($result_me && mysqli_num_rows($result_me)>0){
|
||||
$score = $row['score'];
|
||||
}
|
||||
|
||||
$queryrank = "SELECT COUNT(*) as ranking FROM users WHERE score > $score";
|
||||
$resultrank = mysqli_query($db, $queryrank);
|
||||
$rowrank = mysqli_fetch_assoc($resultrank);
|
||||
$realrank = $rowrank['ranking']+1;
|
||||
|
||||
$result = mysqli_query($db, $sql);
|
||||
$leaderboard = [];
|
||||
@ -46,12 +39,10 @@ if($result){
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-board">
|
||||
<a class="back" href="onboard.php" data-aos="fade-in" data-aos-duration="3000">✖</a>
|
||||
<div class="chara">
|
||||
<div class="menu">
|
||||
<h1 style="text-align: center;"><?php echo $nama; ?></h1>
|
||||
</div>
|
||||
<h1 style="text-align: center;"> <?php echo $score; ?> </h1>
|
||||
<div class="character">
|
||||
<h1 style="text-align: center; padding-right: 45px; color: yellow;">Knight</h1>
|
||||
<img src="/assets/Design/KnightPixLE2-exporgift.gif" alt="knight">
|
||||
</div>
|
||||
</div>
|
||||
@ -87,15 +78,19 @@ if($result){
|
||||
?>
|
||||
</tbody>
|
||||
<tbody>
|
||||
<?php
|
||||
$peringkat = 1;
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<table >
|
||||
<tbody >
|
||||
<tr >
|
||||
<td style="color: gold; font-weight: bold; border: 5px solid #bbd000;;" ><?php echo $realrank; ?></td>
|
||||
<td style="color: gold; font-weight: bold; border: 5px solid #bbd000;;"><?php echo $nama; ?></td>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo $peringkat; ?></td>
|
||||
<td><?php echo $nama; ?></td>
|
||||
|
||||
<td style="color: gold; font-weight: bold; border: 5px solid #bbd000;;"><?php echo $score; ?> PTS</td>
|
||||
<td><?php echo $pemain['score']; ?> PTS</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user