Alpha V2.5.16
This commit is contained in:
parent
c4765c0e6f
commit
21605b9c4e
BIN
assets/pasted-20260311-013128-30744512.png
Normal file
BIN
assets/pasted-20260311-013128-30744512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
BIN
assets/pasted-20260311-013758-2dba1cce.png
Normal file
BIN
assets/pasted-20260311-013758-2dba1cce.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 161 KiB |
57
guilde.php
57
guilde.php
@ -32,7 +32,7 @@ $u_data = $stmt->fetch();
|
||||
if ($u_data) {
|
||||
$user_role = $u_data['role'] ?? 'user';
|
||||
$_SESSION['display_name'] = $u_data['display_name'] ?: $u_data['username'];
|
||||
$level_num = (int)filter_var($u_data['level_raw'], FILTER_SANITIZE_NUMBER_INT);
|
||||
$level_num = (int)filter_var($u_data['level_raw'] ?? '0', FILTER_SANITIZE_NUMBER_INT);
|
||||
$_SESSION['level'] = $level_num;
|
||||
$_SESSION['guild_id'] = $u_data['guild_id'];
|
||||
|
||||
@ -48,7 +48,7 @@ if ($u_data) {
|
||||
AND (min_level <= ? OR min_level IS NULL)
|
||||
AND (max_level >= ? OR max_level IS NULL)
|
||||
LIMIT 1");
|
||||
$g_stmt->execute([$grade_type, $level_num, $level_num]);
|
||||
$g_stmt->execute([$grade_type, $level_num, $level_num]);
|
||||
$grade_data = $g_stmt->fetch();
|
||||
|
||||
if ($grade_data) {
|
||||
@ -327,7 +327,6 @@ if ($in_guild) {
|
||||
min-width: 140px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.resource-box:hover { border-color: #88c0d0; background: rgba(30, 41, 59, 0.8); }
|
||||
.resource-icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
@ -466,36 +465,52 @@ if ($in_guild) {
|
||||
<!-- Liste des guildes -->
|
||||
<div style="flex: 2; min-width: 300px;">
|
||||
<h2><i class="fa-solid fa-list"></i> Guildes Actives</h2>
|
||||
<table class="guild-table">
|
||||
<thead><tr><th>Guilde</th><th>Membres</th><th>Recrutement</th><th>Actions</th></tr></thead>
|
||||
<table class="guild-table" style="table-layout: fixed; width: 100%; border-collapse: collapse;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 45%; color: #88c0d0; text-transform: uppercase; font-size: 11px; padding: 15px; border-bottom: 1px solid #1e293b; background: rgba(30, 41, 59, 0.5);">Guilde</th>
|
||||
<th style="width: 15%; color: #88c0d0; text-transform: uppercase; font-size: 11px; padding: 15px; border-bottom: 1px solid #1e293b; background: rgba(30, 41, 59, 0.5);">Membres</th>
|
||||
<th style="width: 20%; color: #88c0d0; text-transform: uppercase; font-size: 11px; padding: 15px; border-bottom: 1px solid #1e293b; background: rgba(30, 41, 59, 0.5);">Recrutement</th>
|
||||
<th style="width: 20%; color: #88c0d0; text-transform: uppercase; font-size: 11px; padding: 15px; border-bottom: 1px solid #1e293b; background: rgba(30, 41, 59, 0.5);">Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if (empty($all_guilds)): ?>
|
||||
<tr><td colspan="4" style="text-align:center; color:#8c92a3;">Aucune guilde pour le moment.</td></tr>
|
||||
<tr><td colspan="4" style="text-align:center; color:#8c92a3; padding: 20px;">Aucune guilde pour le moment.</td></tr>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($all_guilds as $g): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td style="padding: 15px; border-bottom: 1px solid #1e293b; overflow: hidden;">
|
||||
<strong style="color:#ebcb8b;">[<?php echo htmlspecialchars($g['tag']); ?>]</strong>
|
||||
<strong><?php echo htmlspecialchars($g['name']); ?></strong><br>
|
||||
<small style="color:#8c92a3;"><?php echo htmlspecialchars(mb_strimwidth($g['description'], 0, 80, "...")); ?></small>
|
||||
<strong style="color:#fff;"><?php echo htmlspecialchars($g['name']); ?></strong><br>
|
||||
<small style="color:#8c92a3; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
||||
<?php
|
||||
$desc = htmlspecialchars($g['description']);
|
||||
echo (strlen($desc) > 80) ? substr($desc, 0, 80) . "..." : $desc;
|
||||
?>
|
||||
</small>
|
||||
</td>
|
||||
<td><?php echo $g['member_count']; ?> / <?php echo $member_limit; ?></td>
|
||||
<td>
|
||||
<td style="padding: 15px; border-bottom: 1px solid #1e293b;">
|
||||
<span style="color:#fff; font-weight:bold; display: block;"><?php echo (int)($g['member_count'] ?? 0); ?> / <?php echo (int)$member_limit; ?></span>
|
||||
</td>
|
||||
<td style="padding: 15px; border-bottom: 1px solid #1e293b;">
|
||||
<?php if ($g['recruitment_status'] === 'ouvert'): ?>
|
||||
<span style="color:#a3be8c; font-size:11px; font-weight:bold;">OUVERT</span>
|
||||
<span style="color:#a3be8c; font-weight:bold; text-transform: uppercase;">OUVERT</span>
|
||||
<?php elseif ($g['recruitment_status'] === 'validation'): ?>
|
||||
<span style="color:#ebcb8b; font-size:11px; font-weight:bold;">SUR VALIDATION</span>
|
||||
<span style="color:#ebcb8b; font-weight:bold; text-transform: uppercase;">DEMANDE</span>
|
||||
<?php else: ?>
|
||||
<span style="color:#bf616a; font-size:11px; font-weight:bold;">FERMÉ</span>
|
||||
<span style="color:#bf616a; font-weight:bold; text-transform: uppercase;">FERMÉ</span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($g['member_count'] < $member_limit && $g['recruitment_status'] !== 'ferme'): ?>
|
||||
<a href="?join=<?php echo $g['id']; ?>" class="btn btn-join"><?php echo $g['recruitment_status'] === 'validation' ? 'Postuler' : 'Rejoindre'; ?></a>
|
||||
<?php elseif ($g['member_count'] >= $member_limit): ?>
|
||||
<span style="color:#bf616a; font-size:11px; font-weight:bold;">PLEINE</span>
|
||||
<td style="padding: 15px; border-bottom: 1px solid #1e293b;">
|
||||
<?php if ($g['recruitment_status'] === 'ouvert' && (int)($g['member_count'] ?? 0) < $member_limit): ?>
|
||||
<a href="?join=<?php echo $g['id']; ?>" class="btn btn-join" style="width:100%; text-align:center; display: block; box-sizing: border-box;">REJOINDRE</a>
|
||||
<?php elseif ($g['recruitment_status'] === 'validation' && (int)($g['member_count'] ?? 0) < $member_limit): ?>
|
||||
<a href="?join=<?php echo $g['id']; ?>" class="btn btn-primary" style="width:100%; text-align:center; display: block; box-sizing: border-box;">POSTULER</a>
|
||||
<?php else: ?>
|
||||
<span style="color:#bf616a; font-size:11px; font-weight:bold;">-</span>
|
||||
<button class="btn" disabled style="background:#4c566a; color:#8c92a3; width:100%; cursor:not-allowed; display: block; box-sizing: border-box; text-align: center;">
|
||||
<?php echo ((int)($g['member_count'] ?? 0) >= $member_limit) ? 'PLEIN' : 'FERMÉ'; ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
@ -581,7 +596,7 @@ if ($in_guild) {
|
||||
<thead><tr><th style="text-align: center;">Niveau</th><th>Membre</th><th>Grade</th><th>Ancienneté</th><?php if ($user_guild_info['role'] === 'superviseur' || $user_guild_info['role'] === 'officier'): ?><th>Gestion</th><?php endif; ?></tr></thead>
|
||||
<tbody>
|
||||
<?php foreach ($guild_members as $member): ?>
|
||||
<?php $m_level = (int)filter_var($member["level_raw"], FILTER_SANITIZE_NUMBER_INT); ?>
|
||||
<?php $m_level = (int)filter_var($member["level_raw"] ?? '0', FILTER_SANITIZE_NUMBER_INT); ?>
|
||||
<tr>
|
||||
<td style="text-align: center; font-weight: bold; color: #88c0d0;"><?php echo $m_level; ?></td>
|
||||
<td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user