mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-21 20:16:11 +00:00
Fix Command Center Capital Change #329
Fix Command Center Capital Change #329 , Fix forum units, fix trooplist on raidlist,
This commit is contained in:
@@ -10,28 +10,33 @@
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="imagetoolbar" content="no">
|
||||
<style>
|
||||
.log-wrap{max-width:100%;margin:12px;font-family:Tahoma,Verdana,Arial,sans-serif;color:#222}
|
||||
.log-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
|
||||
.log-head h2{margin:0;font-size:16px;display:flex;align-items:center;gap:6px;color:#111}
|
||||
.log-filters{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:8px}
|
||||
.log-filters button{padding:4px 10px;font-size:11px;border:1px solid #bbb;border-radius:14px;background:#f5f5f5;cursor:pointer;color:#222}
|
||||
.log-filters button.active{background:#2c3e50;color:#fff;border-color:#2c3e50}
|
||||
.log-card{background:#fff;border:1px solid #bbb;border-radius:6px;overflow:hidden;color:#222}
|
||||
.logTable{width:100%;border-collapse:collapse;font-size:11px;color:#222}
|
||||
.logTable th{background:#0891b2;color:#fff;padding:5px 6px;text-align:left;font-weight:bold;font-size:10px;white-space:nowrap}
|
||||
.logTable td{padding:5px 6px;border-bottom:1px solid #eee;vertical-align:top;line-height:14px;color:#111;background:#fff}
|
||||
.logTable tr:hover{background:#f5f9ff}
|
||||
.logTable a{color:#004a9f;text-decoration:none}
|
||||
.log-wrap{max-width:100%;margin:12px;font-family:Tahoma,Verdana,Arial,sans-serif;color:#e2e8f0}
|
||||
.log-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}
|
||||
.log-head h2{margin:0;font-size:16px;display:flex;align-items:center;gap:6px;color:#f1f5f9}
|
||||
.log-filters{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:10px}
|
||||
.log-filters a{padding:4px 11px;font-size:11px;border:1px solid #334155;border-radius:14px;background:#111827;cursor:pointer;color:#cbd5e1;text-decoration:none;line-height:15px}
|
||||
.log-filters a:hover{border-color:#f59e0b;color:#fde68a}
|
||||
.log-filters a.active{background:#f59e0b;color:#1a1a2e;border-color:#f59e0b;font-weight:bold}
|
||||
.log-card{background:#0b1220;border:1px solid #1f2937;border-radius:8px;overflow:hidden;color:#e2e8f0}
|
||||
.log-scroll{overflow-x:auto}
|
||||
.logTable{width:100%;border-collapse:collapse;font-size:11px;color:#cbd5e1}
|
||||
.logTable th{background:#111827;color:#94a3b8;padding:7px 8px;text-align:left;font-weight:bold;font-size:9px;white-space:nowrap;text-transform:uppercase;letter-spacing:.3px;border-bottom:1px solid #1f2937}
|
||||
.logTable td{padding:6px 8px;border-bottom:1px solid #14203a;vertical-align:top;line-height:16px;color:#cbd5e1}
|
||||
.logTable tr:hover td{background:#0f1a30}
|
||||
.logTable a{color:#7dd3fc;text-decoration:none}
|
||||
.logTable a:hover{text-decoration:underline}
|
||||
.logCat{font-weight:bold;padding:2px 6px;border-radius:3px;color:#fff;font-size:10px;white-space:nowrap}
|
||||
.cat-ban{background:#FF0000}
|
||||
.cat-unban{background:#27ae60}
|
||||
.cat-gold{background:#FFCC00;color:#000}
|
||||
.cat-plus{background:#33CCFF;color:#003344}
|
||||
.cat-maint{background:#555}
|
||||
.cat-village{background:#66CCFF;color:#003344}
|
||||
.cat-msg{background:#e67e22}
|
||||
.cat-other{background:#CCFF00;color:#000}
|
||||
.logCat{font-weight:bold;padding:2px 7px;border-radius:4px;color:#fff;font-size:10px;white-space:nowrap}
|
||||
.cat-ban{background:#dc2626}
|
||||
.cat-unban{background:#16a34a}
|
||||
.cat-gold{background:#d97706;color:#fff}
|
||||
.cat-plus{background:#0891b2;color:#fff}
|
||||
.cat-maint{background:#475569}
|
||||
.cat-village{background:#2563eb;color:#fff}
|
||||
.cat-msg{background:#ea580c}
|
||||
.cat-other{background:#64748b;color:#fff}
|
||||
.log-page a{padding:3px 9px;border:1px solid #334155;background:#111827;color:#cbd5e1;text-decoration:none;margin:0 2px;border-radius:4px}
|
||||
.log-page a:hover{border-color:#f59e0b;color:#fde68a}
|
||||
.log-page .cur{padding:3px 9px;background:#f59e0b;color:#1a1a2e;margin:0 2px;border-radius:4px;font-weight:bold}
|
||||
</style>
|
||||
</head>
|
||||
<?php
|
||||
@@ -106,6 +111,15 @@ while($b = mysqli_fetch_assoc($banQ)) {
|
||||
|
||||
usort($unified, function($a,$b){ return $b['time'] <=> $a['time']; });
|
||||
$unified = array_slice($unified, 0, 300);
|
||||
|
||||
// Server-side category filter (applies across ALL entries, not just current page)
|
||||
$catFilter = isset($_GET['cat']) ? strtoupper(preg_replace('/[^A-Za-z]/','',$_GET['cat'])) : 'ALL';
|
||||
if ($catFilter !== '' && $catFilter !== 'ALL') {
|
||||
$unified = array_values(array_filter($unified, function($e) use ($catFilter) {
|
||||
$c = logCategory($e); return $c[0] === $catFilter;
|
||||
}));
|
||||
}
|
||||
|
||||
$perPage = 20;
|
||||
$page = isset($_GET['pg']) ? max(1,intval($_GET['pg'])) : 1;
|
||||
$total = count($unified);
|
||||
@@ -135,19 +149,24 @@ function logCategory($entry) {
|
||||
</div>
|
||||
|
||||
<div class="log-filters" id="logFilters">
|
||||
<button class="active" data-filter="all">All</button>
|
||||
<button data-filter="BAN">🔨 Ban</button>
|
||||
<button data-filter="UNBAN">🔓 Unban</button>
|
||||
<button data-filter="GOLD">💰 Gold</button>
|
||||
<button data-filter="PLUS">⭐ Plus</button>
|
||||
<button data-filter="BONUS">📈 Bonus</button>
|
||||
<button data-filter="VILLAGE">🏘 Village</button>
|
||||
<button data-filter="MESSAGE">✉ Message</button>
|
||||
<button data-filter="RESET">⚙ Reset</button>
|
||||
<button data-filter="OTHER">📝 Other</button>
|
||||
<?php
|
||||
$cats = [
|
||||
'all'=>'All','BAN'=>'🔨 Ban','UNBAN'=>'🔓 Unban','GOLD'=>'💰 Gold',
|
||||
'PLUS'=>'⭐ Plus','BONUS'=>'📈 Bonus','VILLAGE'=>'🏘 Village',
|
||||
'MESSAGE'=>'✉ Message','RESET'=>'⚙ Reset','OTHER'=>'📝 Other'
|
||||
];
|
||||
$curCat = ($catFilter === '' ? 'ALL' : $catFilter);
|
||||
foreach ($cats as $key=>$label):
|
||||
$isAll = ($key === 'all');
|
||||
$active = ($isAll && $curCat === 'ALL') || (!$isAll && $curCat === $key);
|
||||
$href = 'admin.php?p=admin_log' . ($isAll ? '' : '&cat=' . $key);
|
||||
?>
|
||||
<a href="<?php echo $href; ?>" class="<?php echo $active ? 'active' : ''; ?>"><?php echo $label; ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<div class="log-card">
|
||||
<div class="log-scroll">
|
||||
<table class="logTable" id="logTable">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -180,27 +199,12 @@ foreach($paged as $e) {
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:center;margin:8px 0;font-size:11px">
|
||||
<?php if($page>1){ ?><a href="?p=admin_log&pg=<?php echo $page-1;?>" style="padding:3px 8px;border:1px solid #bbb;background:#f5f5f5;text-decoration:none;margin:0 2px">« Prev</a><?php } ?>
|
||||
<span style="padding:3px 8px;background:#3a4f63;color:#fff;margin:0 2px"><?php echo $page;?> / <?php echo $totalPages;?></span>
|
||||
<?php if($page<$totalPages){ ?><a href="?p=admin_log&pg=<?php echo $page+1;?>" style="padding:3px 8px;border:1px solid #bbb;background:#f5f5f5;text-decoration:none;margin:0 2px">Next »</a><?php } ?>
|
||||
</div>
|
||||
<?php $catQS = ($catFilter !== '' && $catFilter !== 'ALL') ? '&cat='.$catFilter : ''; ?>
|
||||
<div class="log-page" style="text-align:center;margin:10px 0;font-size:11px">
|
||||
<?php if($page>1){ ?><a href="admin.php?p=admin_log&pg=<?php echo $page-1;?><?php echo $catQS;?>">« Prev</a><?php } ?>
|
||||
<span class="cur"><?php echo $page;?> / <?php echo max(1,$totalPages);?></span>
|
||||
<?php if($page<$totalPages){ ?><a href="admin.php?p=admin_log&pg=<?php echo $page+1;?><?php echo $catQS;?>">Next »</a><?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function(){
|
||||
var btns = document.querySelectorAll('#logFilters button');
|
||||
var rows = document.querySelectorAll('#logTable tbody tr');
|
||||
btns.forEach(function(b){
|
||||
b.onclick = function(){
|
||||
btns.forEach(x=>x.classList.remove('active'));
|
||||
b.classList.add('active');
|
||||
var f = b.getAttribute('data-filter');
|
||||
rows.forEach(function(r){
|
||||
r.style.display = (f==='all' || r.getAttribute('data-cat')===f) ? '' : 'none';
|
||||
});
|
||||
};
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
+45
-97
@@ -54,114 +54,62 @@ $plansStatus = $plans > 0 ? "Launched ($plans) - ".($plansDate ? date('d.m.Y',$p
|
||||
$role = $_SESSION['access'] == ADMIN ? 'Administrator' : 'MultiHunter';
|
||||
?>
|
||||
<style>
|
||||
/* === HOME.TPL - FORȚAT CU CULORI === */
|
||||
.dashboard { max-width:1150px; margin:0 auto; font-family:system-ui, Verdana; }
|
||||
.dash-head { text-align:center; margin-bottom:24px; }
|
||||
.dash-head h1 { font-size:26px !important; margin:0 !important; color:##ffffff !important; font-weight:800 !important; letter-spacing:-0.5px; }
|
||||
.dash-head .sub { color:##ffffff !important; font-size:13px !important; margin-top:6px !important; }
|
||||
.dash-head .sub b{color:#2563eb !important;}
|
||||
/* === HOME.TPL — dark dashboard === */
|
||||
.dashboard { max-width:1150px; margin:0 auto; font-family:system-ui, Verdana, Arial, sans-serif; color:#e2e8f0; }
|
||||
.dash-head { text-align:center; margin-bottom:22px; }
|
||||
.dash-head h1 { font-size:24px !important; margin:0 !important; color:#f1f5f9 !important; font-weight:800 !important; letter-spacing:-0.3px; }
|
||||
.dash-head .sub { color:#94a3b8 !important; font-size:13px !important; margin-top:6px !important; }
|
||||
.dash-head .sub b{color:#f59e0b !important;}
|
||||
|
||||
/* CARDS CENTRATE */
|
||||
.cards {
|
||||
display:grid !important;
|
||||
grid-template-columns: repeat(4, 1fr) !important;
|
||||
gap:16px !important;
|
||||
margin:0 auto 24px !important;
|
||||
max-width:960px !important;
|
||||
/* CARDS — clean auto-fit grid */
|
||||
.cards {
|
||||
display:grid !important;
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
|
||||
gap:14px !important;
|
||||
margin:0 auto 22px !important;
|
||||
}
|
||||
.card {
|
||||
background:#fff !important;
|
||||
border:1px solid #e2e8f0 !important;
|
||||
border-radius:12px !important;
|
||||
padding:4px !important;
|
||||
box-shadow:0 2px 8px rgba(0,0,0,.06) !important;
|
||||
.card {
|
||||
background:#0b1220 !important;
|
||||
border:1px solid #1f2937 !important;
|
||||
border-radius:12px !important;
|
||||
padding:14px 12px !important;
|
||||
box-shadow:0 2px 8px rgba(0,0,0,.25) !important;
|
||||
text-align:center !important;
|
||||
transition:all .2s;
|
||||
width:90% !important;
|
||||
transition:transform .15s, border-color .15s;
|
||||
}
|
||||
|
||||
.card:hover { transform:translateY(-3px); box-shadow:0 6px 16px rgba(0,0,0,.1) !important; }
|
||||
.card h3 { margin:0 0 8px !important; font-size:11px !important; text-transform:uppercase !important; color:#64748b !important; font-weight:700 !important; letter-spacing:.5px; }
|
||||
.card .val { font-size:24px !important; font-weight:800 !important; color:#0f172a !important; line-height:1.2; }
|
||||
.card:hover { transform:translateY(-3px); border-color:#334155 !important; }
|
||||
.card h3 { margin:0 0 8px !important; font-size:10px !important; text-transform:uppercase !important; color:#94a3b8 !important; font-weight:700 !important; letter-spacing:.5px; }
|
||||
.card .val { font-size:24px !important; font-weight:800 !important; color:#f1f5f9 !important; line-height:1.2; }
|
||||
.card .subv { font-size:11px !important; color:#64748b !important; margin-top:6px !important; }
|
||||
.card.green .val{color:#16a34a !important}
|
||||
.card.red .val{color:#dc2626 !important}
|
||||
.card.blue .val{color:#2563eb !important}
|
||||
.card.orange .val{color:#ea580c !important}
|
||||
.card .subv a{color:#2563eb !important; text-decoration:none !important; font-weight:600 !important;}
|
||||
.card.green .val{color:#4ade80 !important}
|
||||
.card.red .val{color:#f87171 !important}
|
||||
.card.blue .val{color:#60a5fa !important}
|
||||
.card.orange .val{color:#fb923c !important}
|
||||
.card .subv a{color:#7dd3fc !important; text-decoration:none !important; font-weight:600 !important;}
|
||||
|
||||
/* PANELS */
|
||||
.panel { background:#fff !important; border:1px solid #e2e8f0 !important; border-radius:12px !important; padding:16px !important; margin-bottom:20px !important; box-shadow:0 1px 3px rgba(0,0,0,.05) !important; }
|
||||
.panel h2 { margin:0 0 12px !important; font-size:15px !important; color:#0f172a !important; border-bottom:2px solid #f1f5f9 !important; padding-bottom:8px !important; font-weight:700 !important; }
|
||||
.panel { background:#0b1220 !important; border:1px solid #1f2937 !important; border-radius:12px !important; padding:16px !important; margin-bottom:18px !important; }
|
||||
.panel h2 { margin:0 0 12px !important; font-size:14px !important; color:#f1f5f9 !important; border-bottom:1px solid #1f2937 !important; padding-bottom:8px !important; font-weight:700 !important; }
|
||||
|
||||
.timeline { display:grid !important; grid-template-columns: repeat(3,1fr) !important; gap:12px !important; }
|
||||
.timeline div { padding:10px !important; background:#f8fafc !important; border-radius:8px !important; font-size:12px !important; color:#334155 !important; border:1px solid #e2e8f0 !important; }
|
||||
.timeline b { color:#0f172a !important; font-weight:700 !important; display:block; margin-bottom:3px; }
|
||||
.timeline { display:grid !important; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)) !important; gap:10px !important; }
|
||||
.timeline div { padding:10px !important; background:#0f172a !important; border-radius:8px !important; font-size:12px !important; color:#cbd5e1 !important; border:1px solid #1f2937 !important; }
|
||||
.timeline b { color:#f59e0b !important; font-weight:700 !important; display:block; margin-bottom:3px; }
|
||||
|
||||
.grid2 { display:grid !important; grid-template-columns:2fr 1fr !important; gap:16px !important; }
|
||||
.logmini { font-size:12px !important; }
|
||||
.logmini div { padding:6px 0 !important; border-bottom:1px dotted #e2e8f0 !important; color:#334155 !important; }
|
||||
.logmini b{color:#0f172a !important;}
|
||||
.logmini { font-size:12px !important; }
|
||||
.logmini div { padding:6px 0 !important; border-bottom:1px dotted #1f2937 !important; color:#cbd5e1 !important; }
|
||||
.logmini b{color:#f1f5f9 !important;}
|
||||
|
||||
.quick a { display:block !important; padding:9px 12px !important; background:#f8fafc !important; margin-bottom:6px !important; text-decoration:none !important; color:#334155 !important; border-radius:8px !important; font-size:12px !important; border:1px solid #e2e8f0 !important; font-weight:500 !important; transition:all .15s; }
|
||||
.quick a:hover { background:#2563eb !important; color:#fff !important; border-color:#2563eb !important; transform:translateX(3px); }
|
||||
.quick a { display:block !important; padding:9px 12px !important; background:#0f172a !important; margin-bottom:6px !important; text-decoration:none !important; color:#cbd5e1 !important; border-radius:8px !important; font-size:12px !important; border:1px solid #1f2937 !important; font-weight:500 !important; transition:all .15s; }
|
||||
.quick a:hover { background:#f59e0b !important; color:#1a1a2e !important; border-color:#f59e0b !important; transform:translateX(3px); }
|
||||
|
||||
/* === CREDITS AGRESIV SHADOW === */
|
||||
.credits {
|
||||
margin-top:5px !important;
|
||||
padding:22px 16px !important;
|
||||
text-align:center !important;
|
||||
background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
|
||||
border:2px solid #dc2626 !important;
|
||||
border-radius:14px !important;
|
||||
box-shadow: 0 0 30px rgba(220,38,38,0.4), inset 0 1px 0 rgba(255,255,255,0.08) !important;
|
||||
position:relative !important;
|
||||
overflow:hidden !important;
|
||||
}
|
||||
.credits::before {
|
||||
content:""; position:absolute; top:-50%; left:-50%; width:200%; height:200%;
|
||||
background: radial-gradient(circle, rgba(220,38,38,0.15) 0%, transparent 60%);
|
||||
animation: rotate 8s linear infinite;
|
||||
}
|
||||
.credits .shadow-main {
|
||||
font-size:17px !important;
|
||||
font-weight:900 !important;
|
||||
color:#fff !important;
|
||||
letter-spacing:1px !important;
|
||||
text-transform:none !important;
|
||||
position:relative; z-index:2;
|
||||
margin-bottom:6px !important;
|
||||
}
|
||||
.credits .shadow-main span {
|
||||
color:#ef4444 !important;
|
||||
font-size:22px !important;
|
||||
text-shadow: 0 0 12px rgba(239,68,68,0.9), 0 0 25px rgba(239,68,68,0.6) !important;
|
||||
animation: pulse 1.8s infinite;
|
||||
}
|
||||
.credits .shadow-sub {
|
||||
font-size:12px !important;
|
||||
color:#cbd5e1 !important;
|
||||
font-weight:600 !important;
|
||||
position:relative; z-index:2;
|
||||
margin-bottom:8px !important;
|
||||
}
|
||||
.credits .shadow-old {
|
||||
font-size:10px !important;
|
||||
color:#64748b !important;
|
||||
position:relative; z-index:2;
|
||||
border-top:1px solid rgba(255,255,255,0.1) !important;
|
||||
padding-top:8px !important;
|
||||
margin-top:8px !important;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%,100% { transform: scale(1); opacity:1; }
|
||||
50% { transform: scale(1.05); opacity:0.9; }
|
||||
}
|
||||
@keyframes rotate {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
/* compact footer (replaces the heavy animated credits block) */
|
||||
.credits { margin-top:6px !important; padding:12px 16px !important; text-align:center !important;
|
||||
background:#0b1220 !important; border:1px solid #1f2937 !important; border-radius:10px !important; }
|
||||
.credits .shadow-main { font-size:12px !important; font-weight:700 !important; color:#cbd5e1 !important; }
|
||||
.credits .shadow-main span { color:#f59e0b !important; }
|
||||
.credits .shadow-sub { font-size:11px !important; color:#64748b !important; margin-top:3px !important; }
|
||||
.credits .shadow-old { font-size:10px !important; color:#475569 !important; margin-top:4px !important; }
|
||||
</style>
|
||||
|
||||
<div class="dashboard">
|
||||
@@ -178,7 +126,7 @@ $role = $_SESSION['access'] == ADMIN ? 'Administrator' : 'MultiHunter';
|
||||
<div class="card red"><h3>Active Bans</h3><div class="val"><?php echo $activeBans; ?></div><div class="subv"><a href="admin.php?p=ban">manage</a></div></div>
|
||||
<div class="card"><h3>Last Registration</h3><div class="val" style="font-size:15px !important"><a href="admin.php?p=player&uid=<?php echo $lastReg['id']; ?>" style="color:#2563eb !important"><?php echo htmlspecialchars($lastReg['username']); ?></a></div><div class="subv">ID #<?php echo $lastReg['id']; ?></div></div>
|
||||
<div class="card"><h3>PHP / MySQL</h3><div class="val" style="font-size:15px !important"><?php echo PHP_VERSION; ?></div><div class="subv"><?php echo $database->dblink->server_info; ?></div></div>
|
||||
<div class="card"><h3>Server Load</h3><div class="val" style="font-size:15px !important"><?php echo date('H:i:s'); ?></div><div class="subv">Uptime: <?php echo @exec('uptime -p') ?: 'n/a'; ?></div></div>
|
||||
<div class="card"><h3>Server Clock</h3><div class="val" style="font-size:15px !important"><?php echo date('H:i:s'); ?></div><div class="subv">Uptime: <?php echo @exec('uptime -p') ?: 'n/a'; ?></div></div>
|
||||
</div>
|
||||
<!-- TIMELINE NOU - IN PLUS -->
|
||||
<div class="panel">
|
||||
|
||||
+1
-1
@@ -887,8 +887,8 @@ body.app #menu li.sub ul li a:hover{color:#d97706!important}
|
||||
<li class="sub"><a href="#">Admin</a>
|
||||
<ul>
|
||||
<li><a href="?p=admin_log"><font color="Red"><b>Admin Log</b></font></a></li>
|
||||
<li><a href="?p=heatmap"><font color="Red"><b>World Map Heatmap</b></font></a></li>
|
||||
<li><a href="?p=questEditor"><font color="Red"><b>Quest Editor</b></font></a></li>
|
||||
<li><a href="?p=heatmap"><font color="Red"><b>World Map Heatmap</b></font></a></li>
|
||||
<li><a href="?p=debug_log">Debug Error Log</a></li>
|
||||
<li><a href="?p=config">Server Settings</a></li>
|
||||
<li><a href="?p=maintenance">Server Maintenance</a></li>
|
||||
|
||||
Reference in New Issue
Block a user