mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-30 01:24:23 +00:00
Redesign Admin Panel
Full frontend & backend redesign and refactor
This commit is contained in:
@@ -1,5 +1,29 @@
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="overview">
|
||||
<style>
|
||||
.msg-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;font-family:system-ui}
|
||||
.msg-table{width:100%;border-collapse:collapse}
|
||||
.msg-table thead th{background:#0f172a;color:#fff;padding:8px 10px;font-size:12px;font-weight:600;text-align:left}
|
||||
.msg-table thead th.sent{text-align:right}
|
||||
.msg-table thead a{color:#93c5fd;text-decoration:none}
|
||||
.msg-table thead a:hover{text-decoration:underline}
|
||||
.msg-table tbody td{padding:9px 10px;font-size:13px;border-bottom:1px solid #f1f5f9;vertical-align:middle}
|
||||
.msg-table tbody tr:hover{background:#f8fafc}
|
||||
.msg-table tbody tr.sup td{background:#fef3c7}
|
||||
.msg-table tbody tr.multihunterMsg td{background:#fff7ed}
|
||||
.msg-table tbody tr.multihunterMsg td.sel{background:orange!important;color:#fff}
|
||||
.msg-table.top a{color:#0f172a;text-decoration:none;font-weight:500}
|
||||
.msg-table.top a:hover{color:#2563eb;text-decoration:underline}
|
||||
.msg-table.send a{color:#334155;text-decoration:none}
|
||||
.msg-table.send a:hover{text-decoration:underline}
|
||||
.msg-table.dat{font-family:monospace;font-size:12px;color:#64748b;text-align:right;white-space:nowrap}
|
||||
.msg-table.none{padding:20px;text-align:center;color:#94a3b8}
|
||||
.msg-foot{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:#f8fafc;border-top:1px solid #e5e7eb}
|
||||
.msg-foot.navi a{padding:4px 8px;margin:0 2px;background:#fff;border:1px solid #d1d5db;border-radius:4px;color:#374151;text-decoration:none;font-size:12px}
|
||||
.msg-foot.navi a:hover{background:#f3f4f6}
|
||||
</style>
|
||||
|
||||
<div class="msg-card">
|
||||
<table class="msg-table" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Subject</th>
|
||||
@@ -7,62 +31,36 @@
|
||||
<th class="sent"><a href="nachrichten.php?o=1">Sent</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th colspan="3" class="buttons"></th>
|
||||
<th class="navi"><?php
|
||||
if (! isset($_GET['s']) && count($allMessages) < 10) {
|
||||
echo "«»";
|
||||
} else if (! isset($_GET['s']) && count($allMessages) > 10) {
|
||||
echo "«<a href=\"?p=msg&" . (! empty($_GET['t']) ? 't=' . $_GET['t'] . '&' : '') . "s=10&o=" . (!empty($_GET['o']) ? $_GET['o'] : 0) . "\">»</a>";
|
||||
} else if (isset($_GET['s']) && count($allMessages) > $_GET['s']) {
|
||||
if (count($allMessages) > ($_GET['s'] + 10) && $_GET['s'] - 10 < count($allMessages) && $_GET['s'] != 0) {
|
||||
echo "<a href=\"?p=msg&" . (! empty($_GET['t']) ? 't=' . $_GET['t'] . '&' : '') . "s=" . ($_GET['s'] - 10) . "&o=0\">«</a><a href=\"?p=msg&" . (! empty($_GET['t']) ? 't=' . $_GET['t'] . '&' : '') . "s=" . ($_GET['s'] + 10) . "&o=0\">»</a>";
|
||||
} else if (count($allMessages) > $_GET['s'] + 10) {
|
||||
echo "«<a href=\"?p=msg&" . (! empty($_GET['t']) ? 't=' . $_GET['t'] . '&' : '') . "s=" . ($_GET['s'] + 10) . "&o=0\">»</a>";
|
||||
} else if (count($allMessages) > 10) {
|
||||
echo "<a href=\"?p=msg&" . (! empty($_GET['t']) ? 't=' . $_GET['t'] . '&' : '') . "s=" . ($_GET['s'] - 10) . "&o=0\">«</a>»";
|
||||
}
|
||||
}
|
||||
?></th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
|
||||
<style>
|
||||
tr.multihunterMsg td.sel {
|
||||
background-color: orange;
|
||||
}
|
||||
</style>
|
||||
<?php
|
||||
if (isset($_GET['s'])) $s = $_GET['s'];
|
||||
else $s = 0;
|
||||
|
||||
for ($i = (1 + $s); $i <= (10 + $s); $i ++) {
|
||||
$s = $_GET['s']?? 0;
|
||||
for ($i = 1+$s; $i <= 10+$s; $i++) {
|
||||
if (count($allMessages) >= $i) {
|
||||
if ($allMessages[$i - 1]['owner'] <= 1) echo "<tr class=\"sup\">";
|
||||
elseif ($allMessages[$i - 1]['owner'] == 5) echo "<tr class=\"multihunterMsg\">";
|
||||
else echo "<tr>";
|
||||
|
||||
echo "<td class=\"top\" colspan=\"2\"><a href=\"admin.php?p=msg&nid=" . $allMessages[$i - 1]['id'] . "\">" . $allMessages[$i - 1]['topic'] . "</a> ";
|
||||
|
||||
$date = $generator->procMtime($allMessages[$i - 1]['time']);
|
||||
if ($allMessages[$i - 1]['owner'] <= 1) {
|
||||
echo "</td><td class=\"send\"><a href=\"admin.php?p=player&uid=1\"><u>" . $database->getUserField($allMessages[$i - 1]['owner'], 'username', 0) . "</u></a></td>
|
||||
<td class=\"dat\">" . $date[0] . " " . $date[1] . "</td></tr>";
|
||||
} else {
|
||||
$linkSender = ($allMessages[$i - 1]['owner'] != 2 && $allMessages[$i - 1]['owner'] != 4);
|
||||
|
||||
echo "</td><td class=\"send\">" . ($linkSender ? "<a href=\"admin.php?p=player&uid=" . $allMessages[$i - 1]['owner'] . "\">" : '<b>') . $database->getUserField($allMessages[$i - 1]['owner'], 'username', 0) . ($linkSender ? '</a>' : '</b>') . "</td>
|
||||
|
||||
<td class=\"dat\">" . $date[0] . " " . $date[1] . "</td></tr>";
|
||||
}
|
||||
$m = $allMessages[$i-1];
|
||||
$cls = $m['owner']<=1? 'sup' : ($m['owner']==5? 'multihunterMsg' : '');
|
||||
echo "<tr class=\"$cls\">";
|
||||
echo "<td class=\"top\" colspan=\"2\"><a href=\"admin.php?p=msg&nid={$m['id']}\">".htmlspecialchars($m['topic'])."</a></td>";
|
||||
$date = $generator->procMtime($m['time']);
|
||||
$uname = $database->getUserField($m['owner'],'username',0);
|
||||
$link = ($m['owner']!=2 && $m['owner']!=4);
|
||||
echo "<td class=\"send\">".($link?"<a href=\"admin.php?p=player&uid={$m['owner']}\">":"<b>").htmlspecialchars($uname).($link?"</a>":"</b>")."</td>";
|
||||
echo "<td class=\"dat\">{$date[0]} {$date[1]}</td></tr>";
|
||||
}
|
||||
}
|
||||
if (count($allMessages) == 0) {
|
||||
echo "<td colspan=\"4\" class=\"none\">There are no messages available.</td></tr>";
|
||||
}
|
||||
if (count($allMessages)==0) echo "<tr><td colspan=\"4\" class=\"none\">There are no messages available.</td></tr>";
|
||||
?>
|
||||
</tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="msg-foot">
|
||||
<div></div>
|
||||
<div class="navi"><?php
|
||||
if (!isset($_GET['s']) && count($allMessages)<10) echo "«»";
|
||||
elseif (!isset($_GET['s']) && count($allMessages)>10) echo "«<a href=\"?p=msg&".(!empty($_GET['t'])?'t='.$_GET['t'].'&':'')."s=10&o=".($_GET['o']??0)."\">»</a>";
|
||||
elseif (isset($_GET['s']) && count($allMessages)>$_GET['s']) {
|
||||
if (count($allMessages)>($_GET['s']+10) && $_GET['s']!=0) echo "<a href=\"?p=msg&".(!empty($_GET['t'])?'t='.$_GET['t'].'&':'')."s=".($_GET['s']-10)."&o=0\">«</a><a href=\"?p=msg&".(!empty($_GET['t'])?'t='.$_GET['t'].'&':'')."s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
elseif (count($allMessages)>$_GET['s']+10) echo "«<a href=\"?p=msg&".(!empty($_GET['t'])?'t='.$_GET['t'].'&':'')."s=".($_GET['s']+10)."&o=0\">»</a>";
|
||||
else echo "<a href=\"?p=msg&".(!empty($_GET['t'])?'t='.$_GET['t'].'&':'')."s=".($_GET['s']-10)."&o=0\">«</a>»";
|
||||
}
|
||||
?></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2,80 +2,92 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename newmessage.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## Reworked: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : Newmessage.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
error_reporting(E_ALL ^ E_NOTICE);
|
||||
$id = (int)$_GET['uid'];
|
||||
if($id){
|
||||
$user = $database->getUserArray($id,1);
|
||||
?>
|
||||
<style>
|
||||
.msg-wrap{font-family:system-ui;max-width:720px;margin:12px auto}
|
||||
.msg-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,.06);overflow:hidden}
|
||||
.msg-head{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:14px 18px;display:flex;align-items:center;justify-content:space-between}
|
||||
.msg-head h4{margin:0;font-size:15px;font-weight:600}
|
||||
.msg-head a{color:#93c5fd;text-decoration:none}
|
||||
.msg-head a:hover{color:#fff}
|
||||
.msg-body{padding:18px}
|
||||
.msg-row{display:grid;grid-template-columns:120px 1fr;gap:12px;align-items:center;margin-bottom:12px}
|
||||
.msg-label{font-size:12px;color:#64748b;text-transform:uppercase;font-weight:600}
|
||||
.msg-input,.msg-text{width:100%;padding:9px 12px;border:1px solid #d1d5db;border-radius:8px;font-size:14px;font-family:system-ui;box-sizing:border-box;transition:.15s}
|
||||
.msg-input:focus,.msg-text:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
|
||||
.msg-text{min-height:220px;resize:vertical;line-height:1.5}
|
||||
.msg-meta{display:flex;gap:16px;font-size:12px;color:#64748b;margin:-4px 0 14px 132px}
|
||||
.msg-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:16px;padding-top:14px;border-top:1px solid #f1f5f9}
|
||||
.btn-primary{background:#2563eb;color:#fff;border:0;padding:9px 18px;border-radius:8px;font-weight:600;cursor:pointer;font-size:14px}
|
||||
.btn-primary:hover{background:#1d4ed8}
|
||||
.btn-ghost{background:#f1f5f9;color:#334155;border:0;padding:9px 14px;border-radius:8px;text-decoration:none;font-size:14px}
|
||||
.alert-ok{background:#ecfdf5;color:#065f46;padding:10px 12px;border-radius:8px;margin-bottom:12px;font-size:13px;border:1px solid #a7f3d0}
|
||||
@media(max-width:600px){.msg-row{grid-template-columns:1fr}.msg-meta{margin-left:0}}
|
||||
</style>
|
||||
|
||||
$id = $_GET['uid'];
|
||||
if(isset($id))
|
||||
{
|
||||
$varray = $database->getProfileVillages($id);
|
||||
$varmedal = $database->getProfileMedal($id); ?>
|
||||
<div class="msg-wrap">
|
||||
<?php if(isset($_GET['msg'])){ echo '<div class="alert-ok">✓ Message sent successfully</div>'; } ?>
|
||||
|
||||
<div class="msg-card">
|
||||
<div class="msg-head">
|
||||
<h4>New Message</h4>
|
||||
<div>to <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></div>
|
||||
</div>
|
||||
|
||||
<form method="post" action="../Admin/Mods/sendMessage.php" name="msg">
|
||||
<div class="msg-body">
|
||||
<input type="hidden" name="uid" value="<?php echo $id; ?>">
|
||||
|
||||
<div class="msg-row">
|
||||
<div class="msg-label">Recipient</div>
|
||||
<div><strong style="color:#0f172a"><?php echo $user['username']; ?></strong> (UID <?php echo $id; ?>)</div>
|
||||
</div>
|
||||
|
||||
<div class="msg-row">
|
||||
<div class="msg-label">Subject</div>
|
||||
<input class="msg-input" type="text" name="topic" maxlength="35" value="Message From Admin" required>
|
||||
</div>
|
||||
|
||||
<div class="msg-meta">
|
||||
<span><?php echo date('d.m.Y'); ?></span>
|
||||
<span><?php echo date('H:i:s'); ?></span>
|
||||
</div>
|
||||
|
||||
<div class="msg-row" style="align-items:start">
|
||||
<div class="msg-label" style="padding-top:8px">Message</div>
|
||||
<textarea class="msg-text" name="message" required placeholder="Write your message here..."></textarea>
|
||||
</div>
|
||||
|
||||
<div class="msg-actions">
|
||||
<a href="javascript:history.go(-1)" class="btn-ghost">Cancel</a>
|
||||
<button type="submit" name="s1" class="btn-primary">Send Message</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css">
|
||||
<style type="text/css">
|
||||
input.dynamic_img, img.dynamic_img
|
||||
{
|
||||
background-position: center top;
|
||||
height: 20px;
|
||||
}
|
||||
input#btn_send
|
||||
{
|
||||
width: 97px;
|
||||
background-image: url(../<?php echo GP_LOCATE; ?>lang/en/b/send.gif);
|
||||
}
|
||||
div.messages div#write_content #heading input
|
||||
{
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
<h4>Compose New Message to <a href="admin.php?p=player&uid=<?php echo $user['id'] ?>"><?php echo $user['username']; ?></a></h4>
|
||||
|
||||
<form method="post" action="../Admin/Mods/sendMessage.php" accept-charset="UTF-8" name="msg">
|
||||
<div id="content" class="messages">
|
||||
<div id="read_head" class="msg_head"></div>
|
||||
<div id="read_content" class="msg_content">
|
||||
<img src="../../<?php echo GP_LOCATE; ?>lang/en/msg/block_bg24b.gif" id="label" class="read" alt="">
|
||||
|
||||
<div id="heading">
|
||||
<input type="hidden" name="uid" value="<?php echo $id; ?>">
|
||||
<div><a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></div>
|
||||
<div><input type="text" value="Message From Admin" name="topic" id="subject" value="" maxlength="35" style="background-image: url('../<?php echo GP_LOCATE; ?>img/msg/underline.gif'); background-position: left -2px; background-repeat: repeat-x; outline: none; border: medium none; width: 267px; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px;"></div>
|
||||
</div>
|
||||
<div id="time">
|
||||
<div><?php echo date('d.m.y'); ?></div>
|
||||
<div><?php echo date('H:i:s'); ?></div>
|
||||
</div>
|
||||
<div class="clear"></div>
|
||||
<div class="line"></div>
|
||||
<div class="message" style="margin-top: 10px;">
|
||||
<textarea id="message" name="message" style="background-image: url('../<?php echo GP_LOCATE; ?>img/msg/underline.gif'); background-repeat: repeat; font-size: 12px; border: medium none; height: 258px; line-height: 16px; width: 412px; font-family: Verdana,Arial,Helvetica,sans-serif;">Message Here</textarea>
|
||||
</div>
|
||||
<p class="btn">
|
||||
<button value="submit" name="s1" id="btn_send" class="trav_buttons" alt="send" tabindex="4;">Send</button>
|
||||
</p>
|
||||
<div id="read_foot" class="msg_foot"></div>
|
||||
</div>
|
||||
<br /><br /><br />
|
||||
</div>
|
||||
<?php
|
||||
if(isset($_GET['msg']))
|
||||
{
|
||||
echo "<font color=\"blue\">Message Sent</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br /><br />Not found. <a href=\"javascript: history.go(-1)\"> Go Back</a>";
|
||||
}?>
|
||||
<?php } else { ?>
|
||||
<div style="font-family:system-ui;padding:30px;text-align:center;color:#64748b">
|
||||
Player not found. <a href="javascript:history.go(-1)" style="color:#2563eb">Go Back</a>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -2,61 +2,85 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename addABTroops.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Thanks to: Dzoki & itay2277(Add troops) ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : addABTroops.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
$unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0);
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
$id = $_GET['did'];
|
||||
if(isset($id))
|
||||
{
|
||||
$abtech = $database->getABTech($id); // Armory/blacksmith level
|
||||
if(isset($id)){
|
||||
$abtech = $database->getABTech($id);
|
||||
$units = $database->getUnit($village['wref']);
|
||||
$coor = $database->getCoor($village['wref']);
|
||||
|
||||
$tribe = $user['tribe'];
|
||||
if($tribe ==1){ $img = 0;}
|
||||
if($tribe ==2){ $img = 10;}
|
||||
if($tribe ==3){ $img = 20;}
|
||||
if($tribe ==4){ $img = 30;}
|
||||
if($tribe ==5){ $img = 40;}
|
||||
if($tribe ==6){ $img = 50;}
|
||||
if($tribe ==1){ $img = 0;} if($tribe ==2){ $img = 10;} if($tribe ==3){ $img = 20;} if($tribe ==4){ $img = 30;} if($tribe ==5){ $img = 40;} if($tribe ==6){ $img = 50;}
|
||||
include("search2.tpl");
|
||||
?>
|
||||
|
||||
?>
|
||||
<style>
|
||||
.ab-wrap{max-width:650px;margin:12px auto;font-family:system-ui}
|
||||
.ab-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.05)}
|
||||
.ab-head{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 14px;font-weight:600;font-size:14px}
|
||||
.ab-grid{display:grid;grid-template-columns:1fr}
|
||||
.ab-row{display:grid;grid-template-columns:48px 1.2fr 90px 90px;align-items:center;padding:8px 12px;border-bottom:1px solid #f1f5f9;gap:10px}
|
||||
.ab-row.header{background:#f8fafc;font-size:11px;color:#64748b;text-transform:uppercase;font-weight:600;border-bottom:1px solid #e5e7eb}
|
||||
.ab-row:last-child{border-bottom:0}
|
||||
.ab-row:hover:not(.header){background:#fcfdff}
|
||||
.ab-row img{width:20px;height:20px;margin:0 auto}
|
||||
.ab-name{font-size:13px;color:#334155}
|
||||
.ab-input input{width:70px;padding:5px 6px;border:1px solid #d1d5db;border-radius:6px;font-size:13px;text-align:center;font-family:monospace}
|
||||
.ab-input input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.1)}
|
||||
.ab-foot{display:flex;justify-content:space-between;padding:10px 12px;background:#f8fafc;border-top:1px solid #e5e7eb}
|
||||
.btn{padding:7px 14px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;border:0;display:inline-flex;gap:6px;align-items:center}
|
||||
.btn-back{background:#fff;color:#475569;border:1px solid #d1d5db}
|
||||
.btn-save{background:#16a34a;color:#fff}
|
||||
.btn-save:hover{background:#15803d}
|
||||
.btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}
|
||||
</style>
|
||||
|
||||
<div class="ab-wrap">
|
||||
<form action="../GameEngine/Admin/Mods/addABTroops.php" method="POST">
|
||||
<input type="hidden" name="id" id="id" value="<?php echo $_GET['did']; ?>">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Upgrades AB Tech troops</th>
|
||||
</tr></thead><tbody>
|
||||
<tr><td align="center">Troop Type</td>
|
||||
<td align="center">Armour</td>
|
||||
<td align="center">Blackmith</td>
|
||||
</tr>
|
||||
<?php
|
||||
for($i=1; $i<9; $i++) {
|
||||
echo '<tr>
|
||||
<td class="addTroops"><img src="../img/un/u/'.($img+$i).'.gif"></img> '.$unarray[$img+$i].'</td>
|
||||
<td class="addTroops"><input class="addTroops" name="a'.$i.'" id="a'.$i.'" value="'.$abtech["a".$i].'" maxlength="10"></td>
|
||||
<td class="addTroops"><input class="addTroops" name="b'.$i.'" id="b'.$i.'" value="'.$abtech["b".$i].'" maxlength="10"></td>
|
||||
</tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<button style="float: right" name="save" id="btn_save" class="trav_buttons" value="save" alt="save" /> Save </button>
|
||||
<button style="float: left" name="back" id="btn_back" class="trav_buttons" value="back" alt="back" onclick="return go_url('../Admin/admin.php?p=village&did=<?php echo $_GET["did"];?>')" /> Back </button>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</form>
|
||||
<?php }?>
|
||||
<input type="hidden" name="id" value="<?php echo $_GET['did']; ?>">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
|
||||
<div class="ab-card">
|
||||
<div class="ab-head">Upgrades – <?php echo $village['name']; ?> (<?php echo $coor['x'].'|'.$coor['y']; ?>)</div>
|
||||
|
||||
<div class="ab-grid">
|
||||
<div class="ab-row header">
|
||||
<div></div><div>Troop</div><div style="text-align:center">Armoury</div><div style="text-align:center">Blacksmith</div>
|
||||
</div>
|
||||
<?php for($i=1;$i<9;$i++){ ?>
|
||||
<div class="ab-row">
|
||||
<img src="../img/un/u/<?=($img+$i)?>.gif" alt="">
|
||||
<div class="ab-name"><?=$unarray[$img+$i]?></div>
|
||||
<div class="ab-input"><input name="a<?=$i?>" value="<?=$abtech['a'.$i]?>" type="number" min="0" max="20"></div>
|
||||
<div class="ab-input"><input name="b<?=$i?>" value="<?=$abtech['b'.$i]?>" type="number" min="0" max="20"></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="ab-foot">
|
||||
<button type="button" class="btn btn-back" onclick="location.href='admin.php?p=village&did=<?=$_GET['did']?>'">
|
||||
<svg viewBox="0 0 24 24"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>Back
|
||||
</button>
|
||||
<button type="submit" name="save" class="btn btn-save">
|
||||
<svg viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/></svg>Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -2,52 +2,89 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename addTroops.tpl ##
|
||||
## Developed by: Dzoki & Advocatie ##
|
||||
## License: TravianZ Project ##
|
||||
## Reworks by: ronix ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : addTroops.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
$unarray = [1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0];
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
$id = $_GET['did'];
|
||||
if(isset($id))
|
||||
{
|
||||
if(isset($id)){
|
||||
$units = $database->getUnit($village['wref']);
|
||||
$coor = $database->getCoor($village['wref']);
|
||||
$tribe = $user['tribe'];
|
||||
$img = ($tribe - 1) * 10;
|
||||
|
||||
include("search2.tpl");
|
||||
?>
|
||||
?>
|
||||
<style>
|
||||
.addtroops-wrap{max-width:600px;margin:12px auto;font-family:system-ui}
|
||||
.addtroops-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.05)}
|
||||
.addtroops-head{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 14px;font-weight:600;font-size:14px}
|
||||
.addtroops-grid{display:grid;grid-template-columns:1fr;gap:0}
|
||||
.troop-row{display:grid;grid-template-columns:48px 1fr 120px;align-items:center;padding:8px 12px;border-bottom:1px solid #f1f5f9;gap:10px}
|
||||
.troop-row:last-child{border-bottom:0}
|
||||
.troop-row:hover{background:#f8fafc}
|
||||
.troop-row img{width:22px;height:22px;margin:0 auto;display:block}
|
||||
.troop-name{font-size:13px;color:#334155;font-weight:500}
|
||||
.troop-input{display:flex;flex-direction:column;align-items:flex-end;gap:2px}
|
||||
.troop-input input{width:100px;padding:6px 8px;border:1px solid #d1d5db;border-radius:6px;font-size:13px;text-align:right;font-family:monospace}
|
||||
.troop-input input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1)}
|
||||
.troop-current{font-size:11px;color:#9ca3af}
|
||||
.troop-current b{color:#64748b}
|
||||
.addtroops-foot{display:flex;justify-content:space-between;padding:10px 12px;background:#f8fafc;border-top:1px solid #e5e7eb}
|
||||
.btn{padding:7px 14px;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;border:0;display:inline-flex;align-items:center;gap:6px;text-decoration:none}
|
||||
.btn-back{background:#fff;color:#475569;border:1px solid #d1d5db}
|
||||
.btn-back:hover{background:#f8fafc}
|
||||
.btn-save{background:#2563eb;color:#fff}
|
||||
.btn-save:hover{background:#1d4ed8}
|
||||
.btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}
|
||||
</style>
|
||||
|
||||
<div class="addtroops-wrap">
|
||||
<form action="../GameEngine/Admin/Mods/addTroops.php" method="POST">
|
||||
<input type="hidden" name="id" id="id" value="<?php echo $_GET['did']; ?>">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit troops</th>
|
||||
</tr></thead><tbody>
|
||||
<?php
|
||||
for($i = 1; $i < 11; $i++) {
|
||||
echo '<tr>
|
||||
<td class="addTroops"><img src="../img/un/u/'.($img+$i).'.gif"></img> '.$unarray[$img+$i].'</td>
|
||||
<td class="addTroops"><input class="addTroops" name="u'.($img+$i).'" id="u'.($img+$i).'" value="'.$units["u".($img+$i)].'" maxlength="10">
|
||||
<font color="#bcbcbc" size="1">Currently: <b>'.$units["u".($img+$i)].'</b><font></td>
|
||||
</tr>';
|
||||
} ?>
|
||||
</tbody>
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<button style="float: right" name="save" id="btn_save" class="trav_buttons" value="save" alt="save" /> Save </button>
|
||||
<button style="float: left" name="back" id="btn_back" class="trav_buttons" value="back" alt="back" onclick="return go_url('../Admin/admin.php?p=village&did=<?php echo $_GET["did"];?>')" /> Back </button>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
} ?>
|
||||
<input type="hidden" name="id" value="<?php echo $_GET['did']; ?>">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
|
||||
<div class="addtroops-card">
|
||||
<div class="addtroops-head">Edit troops – <?php echo $village['name']; ?> (<?php echo $coor['x'].'|'.$coor['y']; ?>)</div>
|
||||
|
||||
<div class="addtroops-grid">
|
||||
<?php for($i=1;$i<11;$i++){
|
||||
$uid = $img+$i;
|
||||
$current = $units['u'.$uid];
|
||||
?>
|
||||
<div class="troop-row">
|
||||
<img src="../img/un/u/<?=$uid?>.gif" alt="">
|
||||
<div class="troop-name"><?=$unarray[$uid]?></div>
|
||||
<div class="troop-input">
|
||||
<input name="u<?=$uid?>" id="u<?=$uid?>" value="<?=$current?>" maxlength="10" type="number" min="0">
|
||||
<div class="troop-current">Now: <b><?=number_format($current)?></b></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="addtroops-foot">
|
||||
<button type="button" class="btn btn-back" onclick="location.href='admin.php?p=village&did=<?=$_GET['did']?>'">
|
||||
<svg viewBox="0 0 24 24"><path d="M19 12H5M12 19l-7-7 7-7"/></svg>Back
|
||||
</button>
|
||||
<button type="submit" name="save" class="btn btn-save">
|
||||
<svg viewBox="0 0 24 24"><path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
<?php } ?>
|
||||
@@ -1,6 +1,21 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## addUsers.tpl - REDESIGN 2025 v2 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : addUsers.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied!");
|
||||
$id = $_SESSION['id'];
|
||||
|
||||
@@ -2,43 +2,62 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename add_village.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : add_village.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
?>
|
||||
<style>
|
||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||
</style>
|
||||
<form method="post" action="admin.php">
|
||||
.addv-box{width:100%;max-width:220px;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);font-family:system-ui}
|
||||
.addv-box th{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:6px 10px;font-weight:600;text-align:center;font-size:13px}
|
||||
.addv-box td{padding:6px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#334155}
|
||||
.addv-box tr:last-child td{border-bottom:0;text-align:center}
|
||||
.addv-sub{font-size:11px;color:#64748b;text-align:center;padding:4px 8px !important;border-bottom:0 !important}
|
||||
.addv-box td:first-child{width:25%;color:#64748b;font-weight:500}
|
||||
.addv-box input.fm{width:100%;padding:3px 6px;font-size:12px;border:1px solid #cbd5e1;border-radius:5px;box-sizing:border-box}
|
||||
.addv-box input.fm:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 1px #3b82f6}
|
||||
.btn-add{display:inline-block;padding:4px 14px;font-size:11px;font-weight:600;color:#fff;background:linear-gradient(180deg,#3b82f6,#2563eb);border:0;border-radius:5px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.1);text-transform:uppercase;letter-spacing:.3px}
|
||||
.btn-add:hover{filter:brightness(1.05)}
|
||||
.btn-add:disabled{opacity:.5;cursor:not-allowed}
|
||||
</style>
|
||||
|
||||
<form method="post" action="admin.php" style="margin:0">
|
||||
<input name="action" type="hidden" value="addVillage">
|
||||
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
|
||||
<table id="member" style="width: 225px;" align="center">
|
||||
<table class="addv-box">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Add Village</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tr><th>Add Village</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td class="addv-sub">Coordinates (X|Y)</td></tr>
|
||||
<tr>
|
||||
<td colspan="2"><center>Coordinates (<b>X</b>|<b>Y</b>)</center></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>X:</td>
|
||||
<td><input name="x" class="fm" value="" type="input" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>></td>
|
||||
<td style="display:flex;align-items:center;gap:6px;border-bottom:0">
|
||||
<span style="width:15px">X:</span>
|
||||
<input name="x" class="fm" type="text" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Y:</td>
|
||||
<td><input name="y" class="fm" value="" type="input" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>></td>
|
||||
<td style="display:flex;align-items:center;gap:6px;border-bottom:0;padding-top:0">
|
||||
<span style="width:15px">Y:</span>
|
||||
<input name="y" class="fm" type="text" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><center><input value="Add Village" type="submit" <?php if($_SESSION['access'] == ADMIN){ echo ''; } else if($_SESSION['access'] == MULTIHUNTER){ echo 'disabled="disabled"'; } ?>></center></td>
|
||||
</tr>
|
||||
|
||||
<td style="padding-top:8px">
|
||||
<button type="submit" class="btn-add" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>Add Village</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</form>
|
||||
@@ -31,8 +31,24 @@
|
||||
</style>
|
||||
</head>
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## admin_log.tpl - FIX unban duplicat ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : ademin_log.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
+239
-365
@@ -1,386 +1,260 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename alliance.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## Reworked: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : alliance.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_GET['aid'])
|
||||
{
|
||||
$alidata = $database->getAlliance($_GET['aid']);
|
||||
$aliusers = $database->getAllMember($_GET['aid']);
|
||||
if($alidata and $aliusers)
|
||||
{
|
||||
$memberIDs = [];
|
||||
foreach($aliusers as $member) {
|
||||
$memberIDs[] = $member['id'];
|
||||
}
|
||||
if($_GET['aid']) {
|
||||
$aid = (int)$_GET['aid'];
|
||||
$alidata = $database->getAlliance($aid);
|
||||
$aliusers = $database->getAllMember($aid);
|
||||
|
||||
if($alidata && $aliusers) {
|
||||
$memberIDs = array_column($aliusers, 'id');
|
||||
$data = $database->getVSumField($memberIDs,"pop");
|
||||
$totalpop = 0;
|
||||
if(count($data)) {
|
||||
foreach($data as $row) { $totalpop += $row['Total']; }
|
||||
}
|
||||
$founder = $database->getUserField($alidata['leader'],"username",0);
|
||||
|
||||
if (count($data)) {
|
||||
foreach ($data as $row) {
|
||||
$totalpop += $row['Total'];
|
||||
}
|
||||
} ?>
|
||||
// --- FIX 1: calculeaza max membri dupa Ambasada (lvl 20 = 60) ---
|
||||
$embassyLevel = 0;
|
||||
$embQ = mysqli_query($GLOBALS["link"], "SELECT MAX(b.level) as lvl FROM ".TB_PREFIX."bdata b JOIN ".TB_PREFIX."vdata v ON v.wref=b.wid WHERE v.owner=".(int)$alidata['leader']." AND b.type=18");
|
||||
if($embR = mysqli_fetch_assoc($embQ)) $embassyLevel = (int)$embR['lvl'];
|
||||
$maxMembers = $embassyLevel * 3;
|
||||
if($maxMembers < 3) $maxMembers = 3;
|
||||
if((int)$alidata['max'] > 0) $maxMembers = (int)$alidata['max']; // daca e setat manual, il respectam
|
||||
|
||||
<br>
|
||||
<table id="profile" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Alliance <a href="?p=alliance&aid=<?php echo $alidata['id'];?>"><?php echo $alidata['name'];?></a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Details</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="empty"></td>
|
||||
<td class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="details">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Tag</th>
|
||||
<td><?php echo $alidata['tag']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td><?php echo $alidata['name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Rank</th>
|
||||
<td>???</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Points</th>
|
||||
<td><?php echo $totalpop; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Members</th>
|
||||
<td><?php echo count($aliusers); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Alliance Founder</th>
|
||||
<td><a href="?p=player&uid=<?php echo $alidata['leader']; ?>"><?php echo $database->getUserField($alidata['leader'],"username",0); ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><b>Alliance Positions</b></td>
|
||||
</tr>
|
||||
// --- FIX 3: calculeaza rank real dupa puncte ---
|
||||
$allianceRank = 1;
|
||||
$rankSql = "SELECT a.id, COALESCE(SUM(v.pop),0) as pts FROM ".TB_PREFIX."alidata a LEFT JOIN ".TB_PREFIX."users u ON u.alliance=a.id LEFT JOIN ".TB_PREFIX."vdata v ON v.owner=u.id GROUP BY a.id ORDER BY pts DESC";
|
||||
$rankRes = mysqli_query($GLOBALS["link"], $rankSql);
|
||||
while($rr = mysqli_fetch_assoc($rankRes)){ if((int)$rr['id'] == $aid) break; $allianceRank++; }
|
||||
?>
|
||||
<style>
|
||||
.ali-wrap{max-width:1200px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.ali-head{background:linear-gradient(#fff,#f2f2f2);border:1px solid #c9c9c9;border-radius:5px;padding:14px 16px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;}
|
||||
.ali-head h1{margin:0;font-size:22px;color:#222;}
|
||||
.ali-head h1 span.tag{background:#71D000;color:#fff;padding:2px 8px;border-radius:3px;font-size:14px;margin-right:8px;}
|
||||
.ali-head .stats{display:flex;gap:16px;font-size:12px;color:#555;}
|
||||
.ali-head .stats b{color:#000;font-size:13px;}
|
||||
|
||||
<?php
|
||||
error_reporting(0);
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."ali_permission WHERE alliance = ".(int) $_GET['aid']."";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
$player = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".(int) $row['uid'].""));
|
||||
if($row['opt1'] == 1) { $position1 = "Assign To Position"; } else { $position1 = "No Assigning Positions"; }
|
||||
if($row['opt2'] == 1) { $position2 = "Kick Players"; } else { $position2 = "No Kicking Players"; }
|
||||
if($row['opt3'] == 1) { $position3 = "Change Description"; } else { $position3 = "No Changing Description"; }
|
||||
if($row['opt4'] == 1) { $position4 = "Invite Players"; } else { $position4 = "No Invitations"; }
|
||||
if($row['opt5'] == 1) { $position5 = "Manage Forums"; } else { $position5 = "No Forum Management"; }
|
||||
if($row['opt6'] == 1) { $position6 = "Alliance Diplomacy"; } else { $position6 = "No Diplomacy"; }
|
||||
if($row['opt7'] == 1) { $position7 = "Mass IGMs (MMs)"; } else { $position7 = "No MMs"; }
|
||||
if($row['opt8'] == 1) { $position8 = "???"; } else { $position8 = "No ???"; }
|
||||
.grid-2{display:grid;grid-template-columns:380px 1fr;gap:12px;}
|
||||
@media(max-width:950px){.grid-2{grid-template-columns:1fr;}}
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td>Position:</td>
|
||||
<td><a href="admin.php?p=player&uid='.$row['uid'].'">'.$player['username'].'</a><br /><b>'.$row['rank'].'</b><br />
|
||||
<select>
|
||||
<option>Permissions</option>
|
||||
<option>'.$position1.'</option>
|
||||
<option>'.$position2.'</option>
|
||||
<option>'.$position3.'</option>
|
||||
<option>'.$position4.'</option>
|
||||
<option>'.$position5.'</option>
|
||||
<option>'.$position6.'</option>
|
||||
<option>'.$position7.'</option>
|
||||
<option>'.$position8.'</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
?>
|
||||
.card{background:#fff;border:1px solid #d5d5d5;border-radius:4px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.04);margin-bottom:12px;}
|
||||
.card h3{margin:0;padding:8px 12px;background:#f7f7f7;border-bottom:1px solid #e0e0e0;font-size:13px;text-transform:uppercase;color:#444;letter-spacing:.4px;}
|
||||
.card .body{padding:12px;}
|
||||
|
||||
<tr>
|
||||
<th>Capacity</th>
|
||||
<td>
|
||||
<?php
|
||||
$now = count($aliusers);
|
||||
$max = $alidata['max'];
|
||||
if($now > $max)
|
||||
{
|
||||
$color = "red";
|
||||
}
|
||||
else
|
||||
{
|
||||
$color = "blue";
|
||||
}
|
||||
echo "<b><font color=\"$color\">($now/$max)</font></b>";
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=editAli&aid=<?php echo $alidata['id'];?>">» Edit Alliance</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=DelAli&aid=<?php echo $alidata['id'];?>">» Delete Alliance</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="desc2" colspan="2">
|
||||
<center><div class="desc2div">
|
||||
<?php echo nl2br($alidata['notice']); ?>
|
||||
</div></center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td class="desc1">
|
||||
<center><div class="desc1div">
|
||||
<?php echo nl2br($alidata['desc']); ?>
|
||||
</div></center>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="empty"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
/* --- FIX 2: fundal alb, text negru lizibil --- */
|
||||
.info-list{width:100%;font-size:12px;border-collapse:collapse;}
|
||||
.info-list th{width:130px;text-align:left;color:#333;font-weight:600;padding:8px;background:#f8fafc;border-bottom:1px solid #eee;vertical-align:top;}
|
||||
.info-list td{padding:8px;color:#000;background:#ffffff;border-bottom:1px solid #f5f5f5;}
|
||||
.info-list td a{color:#0066cc;text-decoration:none;}
|
||||
.info-list td a:hover{text-decoration:underline;}
|
||||
|
||||
.positions{display:flex;flex-direction:column;gap:8px;max-height:220px;overflow:auto;padding-right:4px;}
|
||||
.pos-item{border:1px solid #eee;border-radius:3px;padding:6px 8px;background:#fafafa;}
|
||||
.pos-item .name{font-weight:bold;color:#222;}
|
||||
.pos-item .rank{font-size:11px;color:#71D000;margin-left:4px;}
|
||||
.pos-item .perms{font-size:11px;color:#666;margin-top:3px;}
|
||||
|
||||
<table id="member" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Player</th>
|
||||
<th>Population</th>
|
||||
<th>Villages</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
// preload villages data
|
||||
$userIDs = [];
|
||||
foreach($aliusers as $user) {
|
||||
$userIDs[] = $user['id'];
|
||||
.desc-box{background:#fcfcfc;border:1px solid #eee;border-radius:3px;padding:10px;min-height:120px;font-size:12px;line-height:1.5;white-space:pre-wrap;}
|
||||
|
||||
.members-table,.mini-table{width:100%;border-collapse:collapse;font-size:12px;}
|
||||
.members-table th,.mini-table th{background:#f0f0f0;padding:7px;border:1px solid #ddd;text-align:left;font-weight:bold;color:#333;}
|
||||
.members-table td,.mini-table td{padding:6px;border:1px solid #eee;}
|
||||
.members-table tr:hover{background:#f9fff0;}
|
||||
.members-table td.ra{width:30px;text-align:center;color:#888;}
|
||||
.members-table td.on{width:24px;text-align:center;}
|
||||
|
||||
.badge-cap{padding:2px 6px;border-radius:3px;font-weight:bold;color:#fff;}
|
||||
.badge-cap.ok{background:#2a7;}.badge-cap.full{background:#c00;}
|
||||
|
||||
.btn-row{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;}
|
||||
.btn{padding:6px 12px;border-radius:3px;font-size:12px;text-decoration:none;border:1px solid #bbb;background:#f5f5f5;color:#333;}
|
||||
.btn:hover{background:#fff;}
|
||||
.btn.edit{border-color:#71D000;background:#eaffd5;color:#2a5a00;}
|
||||
.btn.del{border-color:#c00;background:#ffe5e5;color:#900;}
|
||||
|
||||
.diplo-type{font-size:11px;padding:2px 5px;border-radius:2px;color:#fff;}
|
||||
.diplo-1{background:#2a7;}.diplo-2{background:#06a;}.diplo-3{background:#c00;}
|
||||
</style>
|
||||
|
||||
<div class="ali-wrap">
|
||||
<!-- HEADER -->
|
||||
<div class="ali-head">
|
||||
<h1><span class="tag"><?php echo htmlspecialchars($alidata['tag']); ?></span> <?php echo htmlspecialchars($alidata['name']); ?></h1>
|
||||
<div class="stats">
|
||||
<div>👑 Founder: <b><a href="?p=player&uid=<?php echo $alidata['leader']; ?>"><?php echo htmlspecialchars($founder); ?></a></b></div>
|
||||
<div>👥 Members: <b><?php echo count($aliusers); ?>/<?php echo $maxMembers; ?></b></div>
|
||||
<div>🏆 Points: <b><?php echo number_format($totalpop); ?></b></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid-2">
|
||||
<!-- LEFT -->
|
||||
<div>
|
||||
<div class="card">
|
||||
<h3>📋 Alliance Details</h3>
|
||||
<div class="body">
|
||||
<table class="info-list">
|
||||
<tr><th>Tag</th><td><?php echo htmlspecialchars($alidata['tag']); ?></td></tr>
|
||||
<tr><th>Name</th><td><?php echo htmlspecialchars($alidata['name']); ?></td></tr>
|
||||
<tr><th>Rank</th><td><b>#<?php echo $allianceRank; ?></b></td></tr>
|
||||
<tr><th>Points</th><td><?php echo number_format($totalpop); ?></td></tr>
|
||||
<tr><th>Capacity</th><td>
|
||||
<?php $now=count($aliusers); $cls=$now>=$maxMembers?'full':'ok'; ?>
|
||||
<span class="badge-cap <?php echo $cls; ?>"><?php echo "$now/$maxMembers"; ?></span>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<div style="margin-top:12px;">
|
||||
<b style="font-size:12px;">🛡️ Alliance Positions</b>
|
||||
<div class="positions">
|
||||
<?php
|
||||
error_reporting(0);
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."ali_permission WHERE alliance = $aid";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result)){
|
||||
$player = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT username FROM ".TB_PREFIX."users WHERE id = ".(int)$row['uid']));
|
||||
$perms = [];
|
||||
if($row['opt1']) $perms[]="Assign"; if($row['opt2']) $perms[]="Kick";
|
||||
if($row['opt3']) $perms[]="Edit Desc"; if($row['opt4']) $perms[]="Invite";
|
||||
if($row['opt5']) $perms[]="Forum"; if($row['opt6']) $perms[]="Diplomacy";
|
||||
if($row['opt7']) $perms[]="MM";
|
||||
echo '<div class="pos-item"><span class="name"><a href="admin.php?p=player&uid='.$row['uid'].'">'.htmlspecialchars($player['username']).'</a></span> <span class="rank">'.htmlspecialchars($row['rank']).'</span><div class="perms">'.implode(' • ', $perms).'</div></div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="btn-row">
|
||||
<a class="btn edit" href="?p=editAli&aid=<?php echo $alidata['id'];?>">✏️ Edit Alliance</a>
|
||||
<a class="btn del" href="?p=DelAli&aid=<?php echo $alidata['id'];?>" onclick="return confirm('Delete alliance?')">🗑️ Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>📢 Alliance Notice</h3>
|
||||
<div class="body"><div class="desc-box"><?php echo nl2br(htmlspecialchars($alidata['notice'])); ?></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RIGHT -->
|
||||
<div>
|
||||
<div class="card">
|
||||
<h3>📖 Alliance Description</h3>
|
||||
<div class="body"><div class="desc-box" style="min-height:260px;"><?php echo nl2br(htmlspecialchars($alidata['desc'])); ?></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- MEMBERS -->
|
||||
<div class="card">
|
||||
<h3>👥 Members (<?php echo count($aliusers); ?>)</h3>
|
||||
<div class="body" style="padding:0;">
|
||||
<table class="members-table">
|
||||
<thead><tr><th>#</th><th>Player</th><th>Population</th><th>Villages</th><th></th></tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$rank=0;
|
||||
$database->getProfileVillages($memberIDs);
|
||||
foreach($aliusers as $user){
|
||||
$rank++;
|
||||
$TotalUserPop = $database->getVSumField($user['id'],"pop");
|
||||
$TotalVillages = $database->getProfileVillages($user['id']);
|
||||
echo "<tr>";
|
||||
echo "<td class='ra'>$rank.</td>";
|
||||
echo "<td><a href='admin.php?p=player&uid=".$user['id']."'>".htmlspecialchars($user['username'])."</a></td>";
|
||||
echo "<td>".(int)$TotalUserPop."</td>";
|
||||
echo "<td>".count($TotalVillages)."</td>";
|
||||
echo "<td class='on'>";
|
||||
if((time()-600) < $user['timestamp']) echo "<img class='online1' src='img/x.gif' title='Online now'>";
|
||||
elseif((time()-86400) < $user['timestamp']) echo "<img class='online2' src='img/x.gif' title='<1 day'>";
|
||||
elseif((time()-259200) < $user['timestamp']) echo "<img class='online3' src='img/x.gif' title='<3 days'>";
|
||||
elseif((time()-604800) < $user['timestamp']) echo "<img class='online4' src='img/x.gif' title='<7 days'>";
|
||||
else echo "<img class='online5' src='img/x.gif' title='Offline'>";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
$database->getProfileVillages($userIDs);
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
// display the page
|
||||
foreach($aliusers as $user)
|
||||
{
|
||||
$rank = $rank + 1;
|
||||
$TotalUserPop = $database->getVSumField($user['id'],"pop");
|
||||
$TotalVillages = $database->getProfileVillages($user['id']);
|
||||
echo "<tr>";
|
||||
echo "<td class=ra>".$rank.".</td>";
|
||||
echo "<td class=pla><a href=spieler.php?uid=".$user['id'].">".$user['username']."</a></td>";
|
||||
echo "<td class=hab>".$TotalUserPop."</td>";
|
||||
echo "<td class=vil>".count($TotalVillages)."</td>";
|
||||
if($aid == $session->alliance)
|
||||
{
|
||||
if ((time()-600) < $user['timestamp'])
|
||||
{
|
||||
// 0 Min - 10 Min
|
||||
echo "<td class=on><img class=online1 src=img/x.gif title=now online alt=now online /></td>";
|
||||
}
|
||||
elseif ((time()-86400) < $user['timestamp'] && (time()-600) > $user['timestamp'])
|
||||
{
|
||||
// 10 Min - 1 Days
|
||||
echo "<td class=on><img class=online2 src=img/x.gif title=now online alt=now online /></td>";
|
||||
}
|
||||
elseif ((time()-259200) < $user['timestamp'] && (time()-86400) > $user['timestamp'])
|
||||
{
|
||||
// 1-3 Days
|
||||
echo "<td class=on><img class=online3 src=img/x.gif title=now online alt=now online /></td>";
|
||||
}
|
||||
elseif ((time()-604800) < $user['timestamp'] && (time()-259200) > $user['timestamp'])
|
||||
{
|
||||
echo "<td class=on><img class=online4 src=img/x.gif title=now online alt=now online /></td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<td class=on><img class=online5 src=img/x.gif title=now online alt=now online /></td>";
|
||||
}
|
||||
}
|
||||
echo " </tr>";
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<br /><br />
|
||||
<div class="grid-2">
|
||||
<!-- NEWS -->
|
||||
<div class="card">
|
||||
<h3>📰 Alliance News</h3>
|
||||
<div class="body" style="padding:0;max-height:300px;overflow:auto;">
|
||||
<table class="mini-table">
|
||||
<thead><tr><th>Event</th><th style="width:130px;">Time</th></tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."ali_log WHERE aid = $aid ORDER BY date DESC LIMIT 50";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result)){
|
||||
// --- FIX 4: curata HTML-ul din news ---
|
||||
$comment = html_entity_decode($row['comment']);
|
||||
$comment = preg_replace('/<a href="spieler\.php\?uid=(\d+)">([^<]+)<\/a>/i', '<a href="admin.php?p=player&uid=$1">$2</a>', $comment);
|
||||
$comment = strip_tags($comment, '<a>'); // lasa doar linkurile curate
|
||||
echo '<tr><td>'.$comment.'</td><td>'.date('d.m.Y H:i', $row['date']).'</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="profile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Alliance News</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Event</td>
|
||||
<td>Time</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."ali_log WHERE aid = ".(int) $_GET['aid']."";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$row['comment'].'</td>
|
||||
<td>'.date('d:m:Y H:i', $row['date']).'</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</thead>
|
||||
</table>
|
||||
<br /><br />
|
||||
<!-- DIPLOMACY -->
|
||||
<div class="card">
|
||||
<h3>🤝 Diplomacy</h3>
|
||||
<div class="body" style="padding:0;">
|
||||
<table class="mini-table">
|
||||
<thead><tr><th>Alliance</th><th>Type</th><th style="width:60px;">Status</th></tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli1 = $aid OR alli2 = $aid ORDER BY accepted DESC";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result)){
|
||||
$other = ($row['alli1']==$aid) ? $row['alli2'] : $row['alli1'];
|
||||
$ally = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT tag FROM ".TB_PREFIX."alidata WHERE id = ".(int)$other));
|
||||
$type = $row['type']==1?'Confederation':($row['type']==2?'NAP':'War');
|
||||
$cls = 'diplo-'.$row['type'];
|
||||
$acc = $row['accepted'] ? '<img src="../../gpack/travian_default/img/a/acc.gif">' : '<img src="../../gpack/travian_default/img/a/del.gif">';
|
||||
echo '<tr><td><a href="admin.php?p=alliance&aid='.$other.'">'.htmlspecialchars($ally['tag']).'</a></td><td><span class="diplo-type '.$cls.'">'.$type.'</span></td><td>'.$acc.'</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Not Sure this Diplomacy is correct, but I think it is</h3>
|
||||
<br />
|
||||
<table id="profile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Alliance Diplomacy Sent</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Recipient Alliance</td>
|
||||
<td>Type</td>
|
||||
<td>Accepted</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli1 = ".(int) $_GET['aid']."";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
if($row['type'] == 1) { $type = 'Confederation Pact'; }
|
||||
if($row['type'] == 2) { $type = 'Non Agression Pact'; }
|
||||
if($row['type'] == 3) { $type = 'Declaration of War'; }
|
||||
if($row['accepted'] == 0) { $accepted = "<img src=\"../../gpack/travian_default/img/a/del.gif\">"; }
|
||||
if($row['accepted'] ==1) { $accepted = "<img src=\"../../gpack/travian_default/img/a/acc.gif\">"; }
|
||||
<?php include("allymedals.tpl"); ?>
|
||||
</div>
|
||||
|
||||
$ally = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".(int) $row['alli2'].""));
|
||||
echo '
|
||||
<tr>
|
||||
<td><a href="admin.php?p=alliance&aid='.$row['alli1'].'">'.$ally['tag'].'</a></td>
|
||||
<td>'.$type.'</td>
|
||||
<td>'.$accepted.'</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</thead>
|
||||
</table>
|
||||
<br /><br />
|
||||
|
||||
<table id="profile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Alliance Diplomacy Recieved</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>From Alliance</td>
|
||||
<td>Type</td>
|
||||
<td>Accepted</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli2 = ".(int) $_GET['aid']."";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
if($row['type'] == 1) { $type = 'Confederation Pact'; }
|
||||
if($row['type'] == 2) { $type = 'Non Agression Pact'; }
|
||||
if($row['type'] == 3) { $type = 'Declaration of War'; }
|
||||
if($row['accepted'] == 0) { $accepted = "<img src=\"../../gpack/travian_default/img/a/del.gif\">"; }
|
||||
if($row['accepted'] ==1) { $accepted = "<img src=\"../../gpack/travian_default/img/a/acc.gif\">"; }
|
||||
|
||||
$ally = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".(int) $row['alli1'].""));
|
||||
echo '
|
||||
<tr>
|
||||
<td><a href="admin.php?p=alliance&aid='.$row['alli2'].'">'.$ally['tag'].'</a></td>
|
||||
<td>'.$type.'</td>
|
||||
<td>'.$accepted.'</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br /><br />
|
||||
|
||||
<table id="profile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Alliance Relationships</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alliance</td>
|
||||
<td>Type</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."diplomacy WHERE alli1 = ".(int) $_GET['aid']." OR alli2 = ".(int) $_GET['aid']." AND accepted = 1";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
if($row['type'] == 1) { $type = 'Confederation Pact'; }
|
||||
if($row['type'] == 2) { $type = 'Non Agression Pact'; }
|
||||
if($row['type'] == 3) { $type = 'Declaration of War'; }
|
||||
if($row['accepted'] == 0) { $accepted = "<img src=\"../../gpack/travian_default/img/a/del.gif\">"; }
|
||||
if($row['accepted'] == 1) { $accepted = "<img src=\"../../gpack/travian_default/img/a/acc.gif\">"; }
|
||||
|
||||
$ally1 = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".(int) $row['alli1'].""));
|
||||
$ally2 = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."alidata WHERE id = ".(int) $row['alli2'].""));
|
||||
echo '
|
||||
<tr>
|
||||
<td><a href="admin.php?p=alliance&aid='.$row['alli1'].'">'.$ally1['tag'].'</a> & <a href="admin.php?p=alliance&aid='.$row['alli2'].'">'.$ally2['tag'].'</a></td>
|
||||
<td>'.$type.'</td>
|
||||
<td><img src="../../gpack/travian_default/img/a/acc.gif"></td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<br /><br />
|
||||
|
||||
<?php
|
||||
include("allymedals.tpl");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Not found...<a href=\"javascript: history.go(-1)\">Back</a>";
|
||||
}
|
||||
<?php
|
||||
} else {
|
||||
echo "<div style='padding:30px;text-align:center;'>Alliance not found... <a href='javascript:history.go(-1)'>Back</a></div>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -1,87 +1,95 @@
|
||||
<?php
|
||||
$varmedal = $database->getProfileMedalAlly($_GET['aid'])
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : allymedal.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$varmedal = $database->getProfileMedalAlly($_GET['aid']);
|
||||
|
||||
?>
|
||||
<form action="../GameEngine/Admin/Mods/delallymedal.php" method="POST">
|
||||
<input type="hidden" name="aid" value="<?php echo $_GET['aid']; ?>">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<table id="profile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="6">Alliance Medals (<?php echo sizeof($varmedal); ?>)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Category</td>
|
||||
<td>Rank</td>
|
||||
<td>Week</td>
|
||||
<td>Points</td>
|
||||
<td>Medal</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
if(sizeof($varmedal) ==0)
|
||||
{ ?>
|
||||
<td colspan="5"><center>This alliance has no medals yet</center></td><?php
|
||||
}
|
||||
elseif(sizeof($varmedal) >0)
|
||||
{
|
||||
foreach($varmedal as $medal)
|
||||
{
|
||||
$titel="Bonus";
|
||||
switch ($medal['categorie'])
|
||||
{
|
||||
case "1": $titel="Attackers"; break;
|
||||
case "2": $titel="Defenders"; break;
|
||||
case "3": $titel="Climbers"; break;
|
||||
case "4": $titel="Robbers"; break;
|
||||
}
|
||||
$title = $titel;
|
||||
$rank = $medal['plaats'];
|
||||
if($rank == '0') { $rank = "<p>Bonus</p>"; } else { $rank = $rank; }
|
||||
$week = $medal['week'];
|
||||
$points = $medal['points'];
|
||||
if($points == '') { $points = "<p>Bonus</p>"; } else { $points = $points; }
|
||||
<style>
|
||||
.medal-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;font-family:system-ui;margin-bottom:12px}
|
||||
.medal-head{background:#0f172a;color:#fff;padding:8px 12px;font-size:13px;font-weight:600}
|
||||
.medal-table{width:100%;border-collapse:collapse}
|
||||
.medal-table th{background:#f8fafc;padding:7px 6px;font-size:11px;color:#64748b;text-transform:uppercase;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
|
||||
.medal-table td{padding:8px 6px;font-size:12.5px;text-align:center;border-bottom:1px solid #f1f5f9;vertical-align:middle}
|
||||
.medal-table tr:last-child td{border-bottom:0}
|
||||
.medal-table img{width:28px;height:36px;display:block;margin:0 auto;border-radius:3px}
|
||||
.medal-del{width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;background:#fef2f2;border-radius:5px;color:#dc2626;border:0;cursor:pointer}
|
||||
.medal-del:hover{background:#fee2e2}
|
||||
.medal-del svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2}
|
||||
.medal-empty{padding:20px;text-align:center;color:#94a3b8;font-size:13px}
|
||||
.medal-avg{background:#f8fafc;font-weight:600;color:#0f172a}
|
||||
</style>
|
||||
|
||||
echo"
|
||||
<tr>
|
||||
<td>$title</td>
|
||||
<td>$rank</td>
|
||||
<td>$week</td>
|
||||
<td>$points</td>
|
||||
<td><img src=\"../gpack/travian_default/img/t/".$medal['img'].".jpg\"></td>
|
||||
<td>
|
||||
<input type=\"image\" name=\"medalid\" value=\"".$medal['id']."\" style=\"background-image: url('../gpack/travian_default/img/a/del.gif'); height: 12px; width: 12px;\" src=\"../gpack/travian_default/img/a/x.gif\">
|
||||
</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
$averagerank = 0;
|
||||
foreach($varmedal as $medal)
|
||||
{
|
||||
$rank = $medal['plaats'];
|
||||
if($rank > 0)
|
||||
{
|
||||
if(is_numeric($rank))
|
||||
{
|
||||
$i = $i + 1;
|
||||
$averagerank = $averagerank + $medal['plaats'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$averagerank = $averagerank + 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
$average = $averagerank / $i;
|
||||
echo "</form><tr><td><b>Average Rank</b></td><td>$average</td><td></td><td></td><td>Delete All</td>";
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
<form action="../GameEngine/Admin/Mods/delallymedalbyaid.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="aid" value="<?php echo $_GET['aid']; ?>">
|
||||
<input type="image" name="allyid" value="<?php echo $id; ?>" style="background-image: url('../gpack/travian_default/img/a/del.gif'); height: 12px; width: 12px;" src="../gpack/travian_default/img/a/x.gif">
|
||||
</form>
|
||||
</td>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="medal-card">
|
||||
<div class="medal-head">Alliance Medals (<?=sizeof($varmedal)?>)</div>
|
||||
<table class="medal-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Category</th><th>Rank</th><th>Week</th><th>Points</th><th>Medal</th><th style="width:32px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if(sizeof($varmedal)==0){ ?>
|
||||
<tr><td colspan="6" class="medal-empty">This alliance has no medals yet</td></tr>
|
||||
<?php } else {
|
||||
$i=0;$averagerank=0;
|
||||
foreach($varmedal as $medal){
|
||||
switch($medal['categorie']){case "1":$t="Attackers";break;case "2":$t="Defenders";break;case "3":$t="Climbers";break;case "4":$t="Robbers";break;default:$t="Bonus";}
|
||||
$rank=$medal['plaats']; if($rank=='0') $rank='Bonus'; else {$i++; $averagerank+=$medal['plaats'];}
|
||||
$points=$medal['points']; if($points=='') $points='Bonus';
|
||||
?>
|
||||
<tr>
|
||||
<td><?=$t?></td>
|
||||
<td><?=$rank?></td>
|
||||
<td><?=$medal['week']?></td>
|
||||
<td><?=$points?></td>
|
||||
<td><img src="../gpack/travian_default/img/t/<?=$medal['img']?>.jpg"></td>
|
||||
<td>
|
||||
<form action="../GameEngine/Admin/Mods/delallymedal.php" method="POST" style="margin:0">
|
||||
<input type="hidden" name="aid" value="<?=$_GET['aid']?>">
|
||||
<input type="hidden" name="admid" value="<?=$_SESSION['id']?>">
|
||||
<button type="submit" name="medalid" value="<?=$medal['id']?>" class="medal-del" title="Delete">
|
||||
<svg viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php }
|
||||
$average = $i>0 ? round($averagerank/$i,2) : 0;
|
||||
?>
|
||||
<tr class="medal-avg">
|
||||
<td>Average Rank</td>
|
||||
<td><?=$average?></td>
|
||||
<td></td><td></td>
|
||||
<td>Delete All</td>
|
||||
<td>
|
||||
<form action="../GameEngine/Admin/Mods/delallymedalbyaid.php" method="POST" style="margin:0">
|
||||
<input type="hidden" name="admid" value="<?=$_SESSION['id']?>">
|
||||
<input type="hidden" name="aid" value="<?=$_GET['aid']?>">
|
||||
<button type="submit" class="medal-del" title="Delete All">
|
||||
<svg viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/><line x1="10" y1="11" x2="10" y2="17"/><line x1="14" y1="11" x2="14" y2="17"/></svg>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1,4 +1,24 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : artifact.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../GameEngine/Artifacts.php");
|
||||
|
||||
$artifact = reset($database->getOwnArtefactInfo($_GET['did']));
|
||||
|
||||
+16
-1
@@ -1,6 +1,21 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## ban.tpl - REDESIGN 2025 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : ban.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied!");
|
||||
|
||||
|
||||
@@ -2,12 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename ban_msg.tpl ##
|
||||
## Developed by: yi12345 ##
|
||||
## Reworked: Shadow ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : ban_msg.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : yi12345 (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$uid = isset($session->uid) ? (int)$session->uid : 0;
|
||||
|
||||
@@ -2,15 +2,42 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename cleanban.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : cleanban.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
?>
|
||||
<form action="../GameEngine/Admin/Mods/mainteneceCleanBanData.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<td class="hab">Clean Banlist Data (TRUNCATE)</td>
|
||||
<td class="hab"><center><input type="image" src="../img/admin/b/ok1.gif" value="submit"></center></td>
|
||||
<style>
|
||||
.clean-card{max-width:480px;margin:12px auto;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;font-family:system-ui}
|
||||
.clean-head{background:#0f172a;color:#fff;padding:10px 14px;font-weight:600;font-size:14px}
|
||||
.clean-body{display:flex;justify-content:space-between;align-items:center;padding:14px}
|
||||
.clean-desc{font-size:13.5px;color:#334155}
|
||||
.clean-desc strong{color:#dc2626}
|
||||
.clean-btn{padding:8px 14px;background:#dc2626;color:#fff;border:0;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:6px}
|
||||
.clean-btn:hover{background:#b91c1c}
|
||||
.clean-btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}
|
||||
</style>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/mainteneceCleanBanData.php" method="POST" onsubmit="return confirm('TRUNCATE banlist? This cannot be undone!')">
|
||||
<input type="hidden" name="admid" value="<?=$_SESSION['id']?>">
|
||||
<div class="clean-card">
|
||||
<div class="clean-head">Clear – Banlist - Data</div>
|
||||
<div class="clean-body">
|
||||
<div class="clean-desc">Clean Banlist Data <strong>(TRUNCATE)</strong></div>
|
||||
<button type="submit" class="clean-btn">
|
||||
<svg viewBox="0 0 24 24"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>Clean
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
+193
-478
@@ -2,498 +2,214 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename config.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## Rework by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : config.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Rework by : ronix ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die(ACCESS_DENIED_ADMIN);
|
||||
|
||||
$editIcon = '<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#93c5fd" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"/><path d="M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/></svg>';
|
||||
?>
|
||||
<style>
|
||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||
.config-wrap{max-width:1100px;margin:0 auto;font-family:system-ui,-apple-system,Segoe UI,Roboto}
|
||||
.config-title{text-align:center;font-size:20px;font-weight:800;margin:8px 0 12px;color:#0f172a}
|
||||
.config-card{background:#fff;border:1px solid #e5e7eb;border-radius:8px;margin-bottom:10px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.04)}
|
||||
.config-head{display:flex;justify-content:space-between;align-items:center;padding:7px 10px;background:#0f172a;color:#fff;font-weight:600;font-size:13px;line-height:1}
|
||||
.edit-btn{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;transition:.15s}
|
||||
.edit-btn:hover{background:rgba(255,255,255,.12)}
|
||||
.edit-btn svg{width:14px;height:14px;transition:.15s}
|
||||
.edit-btn:hover svg{stroke:#fff;transform:scale(1.05)}
|
||||
.config-table{width:100%;border-collapse:collapse}
|
||||
.config-table tr{border-top:1px solid #f1f5f9}
|
||||
.config-table tr:first-child{border-top:0}
|
||||
.config-table td{padding:5px 8px;vertical-align:middle;font-size:13px;line-height:1.25}
|
||||
.config-table td.b{background:#f8fafc;font-weight:700;color:#334155;text-transform:uppercase;font-size:11px;letter-spacing:.3px;padding:4px 8px}
|
||||
.config-table td:first-child{color:#475569;width:60%}
|
||||
.config-table td:last-child{color:#0f172a;font-weight:500}
|
||||
em.tooltip{position:relative;display:inline-block;margin-left:4px;cursor:help;color:#94a3b8;font-style:normal;font-weight:700}
|
||||
em.tooltip span.classic{display:none;position:absolute;z-index:99;left:-8px;top:20px;width:220px;padding:6px 8px;background:#0f172a;color:#e2e8f0;border-radius:6px;font-size:11px;line-height:1.3;box-shadow:0 4px 12px rgba(0,0,0,.2);font-weight:400}
|
||||
em.tooltip:hover span.classic{display:block}
|
||||
em.tooltip span.classic:before{content:'';position:absolute;left:14px;top:-6px;border:6px solid transparent;border-bottom-color:#0f172a}
|
||||
.badge{display:inline-block;padding:1px 6px;border-radius:999px;font-size:11px;font-weight:600;line-height:1.3}
|
||||
.badge.green{background:#dcfce7;color:#166534}
|
||||
.badge.red{background:#fee2e2;color:#991b1b}
|
||||
.badge.blue{background:#dbeafe;color:#1e40af}
|
||||
.badge.gray{background:#f1f5f9;color:#475569}
|
||||
</style>
|
||||
<h2><center><?php echo SERV_CONFIG ?></center></h2>
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo SERV_SETT ?> <a href="admin.php?p=editServerSet"><img src="../img/admin/edit.gif" title="<?php echo EDIT_SERV_SETT ?>"></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<table id="profile">
|
||||
<tr>
|
||||
<td class="b"><?php echo SERV_VARIABLE ?></td>
|
||||
<td class="b"><?php echo SERV_VALUE ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_NAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NAME_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo SERVER_NAME;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_STARTED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_STARTED_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo "Date:".START_DATE." Time:".START_TIME; //date("d.m.y H:i",COMMENCE);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_TIMEZONE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TIMEZONE_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo TIMEZONE;?></td>
|
||||
</tr>
|
||||
<td><?php echo CONF_SERV_LANG ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_LANG_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LANG == 'en') echo "English";
|
||||
elseif(LANG == 'es') echo "Spain";
|
||||
elseif(LANG == 'rs') echo "Serbian";
|
||||
elseif(LANG == 'ru') echo "Russian";
|
||||
elseif(LANG == 'zh_tw') echo "Taiwanese"; ?>
|
||||
</td>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_SERVSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_SERVSPEED_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo ''.SPEED.'x';?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_TROOPSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TROOPSPEED_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo INCREASE_SPEED;?>x</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_EVASIONSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_EVASIONSPEED_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo EVASION_SPEED;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_STORMULTIPLER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_STORMULTIPLER_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo STORAGE_MULTIPLIER;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_TRADCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TRADCAPACITY_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo TRADER_CAPACITY;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_CRANCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_CRANCAPACITY_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo CRANNY_CAPACITY;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_TRAPCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TRAPCAPACITY_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo TRAPPER_CAPACITY;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_NATUNITSMULTIPLIER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATUNITSMULTIPLIER_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo NATARS_UNITS;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_NATARS_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_SPAWN_TIME_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo NATARS_SPAWN_TIME;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_NATARS_WW_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_WW_SPAWN_TIME_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo NATARS_WW_SPAWN_TIME;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_NATARS_WW_BUILDING_PLAN_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_WW_BUILDING_PLAN_SPAWN_TIME_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo NATARS_WW_BUILDING_PLAN_SPAWN_TIME;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_MAPSIZE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_MAPSIZE_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_VILLEXPSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_VILLEXPSPEED_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo CP == 0 ? "Fast" : "Slow"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_BEGINPROTECT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_BEGINPROTECT_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (PROTECTION / 3600);?> hour/s</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_REGOPEN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_REGOPEN_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo REG_OPEN ? "<b><font color='blue'>True</font></b>" : "<b><font color='Red'>False</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_ACTIVMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_ACTIVMAIL_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo AUTH_EMAIL ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_QUEST ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_QUEST_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo QUEST ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_QTYPE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_QTYPE_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo QTYPE == 25 ? "<b><font color='Blue'>Travian Official</font></b>" : "<b><font color='Blue'>TravianZ Extended</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_DLR ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_DLR_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo DEMOLISH_LEVEL_REQ; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_WWSTATS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_WWSTATS_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(WW) { echo "<b><font color='Green'>Enabled</font></b>"; } else if(WW == false) { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_NTRTIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NTRTIME_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(NATURE_REGTIME >= 86400){ echo ''.(NATURE_REGTIME/86400).' Days'; } else if(NATURE_REGTIME < 86400){ echo ''.(NATURE_REGTIME/3600).' Hours'; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_OASIS_WOOD_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_WOOD_PROD_MULT_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo OASIS_WOOD_MULTIPLIER ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_OASIS_CLAY_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_CLAY_PROD_MULT_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo OASIS_CLAY_MULTIPLIER ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_OASIS_IRON_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_IRON_PROD_MULT_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo OASIS_IRON_MULTIPLIER ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_OASIS_CROP_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_CROP_PROD_MULT_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo OASIS_CROP_MULTIPLIER ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_MEDALINTERVAL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_MEDALINTERVAL_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(MEDALINTERVAL >= 86400){ echo ''.(MEDALINTERVAL/86400).' Days'; } else if(MEDALINTERVAL < 86400){ echo ''.(MEDALINTERVAL/3600).' Hours'; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_TOURNTHRES ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TOURNTHRES_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo TS_THRESHOLD;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_GWORKSHOP ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_GWORKSHOP_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(GREAT_WKS) { echo "<b><font color='Green'>Enabled</font></b>"; } else { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_NATARSTAT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARSTAT_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(SHOW_NATARS) { echo "<b><font color='blue'>True</font></b>"; } else { echo "<b><font color='Red'>False</font></b>"; } ?></td>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_PEACESYST ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_PEACESYST_TOOLTIP ?></span></em></td>
|
||||
<td>
|
||||
<?php echo (["None", "Normal", "Christmas", "New Year", "Easter"])[PEACE]; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_GRAPHICPACK ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_GRAPHICPACK_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(GP_ENABLE) { echo "<b><font color='Green'>Enabled</font></b>"; } else { echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SERV_ERRORREPORT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_ERRORREPORT_TOOLTIP ?></span></em></td>
|
||||
<td><b><?php echo (ERROR_REPORT=="error_reporting (0);")? "No": "Yes";?></b></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>New Mechanics and Functions <a href="admin.php?p=editNewFunctions"><img src="../img/admin/edit.gif" title="Edit New Mechanics and Functions"></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div class="config-wrap">
|
||||
<h2 class="config-title"><?php echo SERV_CONFIG ?></h2>
|
||||
|
||||
<table id="profile">
|
||||
<tr>
|
||||
<td class="b"><?php echo SERV_VARIABLE ?></td>
|
||||
<td class="b"><?php echo SERV_VALUE ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Display oasis in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of oases of each village in the player profile</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_OASIS ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alliance invitation message <em class="tooltip">?<span class="classic">Enable (Disable) sending an in-game message to the player, if he was invited to the alliance</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_ALLIANCE_INVITATION ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>New Alliance & Embassy Mechanics <em class="tooltip">?<span class="classic">For this setting, you can find more information on the link: <a href="https://github.com/Shadowss/TravianZ/wiki/New-Alliance-&-Embassy-Mechanics" target="_blank">https://github.com</a></span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_EMBASSY_MECHANICS ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>New forum post message <em class="tooltip">?<span class="classic">Enable (Disable) if a player leaves at least one message in the thread on the forum, he will receive in-game messages about the fact that new messages have appeared in the same thread (i.e. is technically "subscribed to")</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_FORUM_POST_MESSAGE ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Tribes images in profile <em class="tooltip">?<span class="classic">Enable (Disable) displaying images of tribes with a description in the players profile</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_TRIBE_IMAGES ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>MHs images in profile <em class="tooltip">?<span class="classic">Enable (Disable) displaying images of Multihunters with a description in the MHs profile</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_MHS_IMAGES ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Display artifact in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of the artifact in the player profile, opposite the corresponding village in which it is located</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_DISPLAY_ARTIFACT ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Display WoW in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of the wonder in the player profile, opposite the corresponding village in which it is located</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_DISPLAY_WONDER ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vacation Mode <em class="tooltip">?<span class="classic">Enable (Disable) vacation mode, will be displayed or hidden in the player profile menu</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_VACATION ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Catapult targets <em class="tooltip">?<span class="classic">Enable (Disable) the display of the targets of the catapults in the rally point that were sent by you</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Manual on Nature and Natars <em class="tooltip">?<span class="classic">Enable (Disable) displaying information in the Manual about the troops of Nature and Natars</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_MANUAL_NATURENATARS ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Direct links placement <em class="tooltip">?<span class="classic">If Enabled, then the Direct links will be placed in the left menu, if Disabled then Direct links will be placed in the right menu as in the original Travian</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_DISPLAY_LINKS ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Medal Veteran Player <em class="tooltip">?<span class="classic">Enable (Disable) medal achieved for playing 3 years of Travian</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_MEDAL_3YEAR ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Medal Veteran Player 5a <em class="tooltip">?<span class="classic">Enable (Disable) medal achieved for playing 5 years of Travian</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_MEDAL_5YEAR ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Medal Veteran Player 10a <em class="tooltip">?<span class="classic">Enable (Disable) medal achieved for playing 10 years of Travian</span></em></td>
|
||||
<td><?php echo NEW_FUNCTIONS_MEDAL_10YEAR ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo PLUS_SETT ?> <a href="admin.php?p=editPlusSet"><img src="../img/admin/edit.gif" title="<?php echo EDIT_PLUS_SETT1 ?>"></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<!-- SERVER SETTINGS -->
|
||||
<div class="config-card">
|
||||
<div class="config-head">
|
||||
<span><?php echo SERV_SETT ?></span>
|
||||
<a href="admin.php?p=editServerSet" title="<?php echo EDIT_SERV_SETT ?>" class="edit-btn"><?php echo $editIcon; ?></a>
|
||||
</div>
|
||||
<table class="config-table">
|
||||
<tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_NAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NAME_TOOLTIP ?></span></em></td><td><?php echo SERVER_NAME;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_STARTED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_STARTED_TOOLTIP ?></span></em></td><td><?php echo "Date:".START_DATE." Time:".START_TIME;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_TIMEZONE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TIMEZONE_TOOLTIP ?></span></em></td><td><?php echo TIMEZONE;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_LANG ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_LANG_TOOLTIP ?></span></em></td><td><?php if(LANG == 'en') echo "English"; elseif(LANG == 'es') echo "Spain"; elseif(LANG == 'rs') echo "Serbian"; elseif(LANG == 'ru') echo "Russian"; elseif(LANG == 'zh_tw') echo "Taiwanese"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_SERVSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_SERVSPEED_TOOLTIP ?></span></em></td><td><?php echo ''.SPEED.'x';?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_TROOPSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TROOPSPEED_TOOLTIP ?></span></em></td><td><?php echo INCREASE_SPEED;?>x</td></tr>
|
||||
<tr><td><?php echo CONF_SERV_EVASIONSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_EVASIONSPEED_TOOLTIP ?></span></em></td><td><?php echo EVASION_SPEED;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_STORMULTIPLER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_STORMULTIPLER_TOOLTIP ?></span></em></td><td><?php echo STORAGE_MULTIPLIER;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_TRADCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TRADCAPACITY_TOOLTIP ?></span></em></td><td><?php echo TRADER_CAPACITY;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_CRANCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_CRANCAPACITY_TOOLTIP ?></span></em></td><td><?php echo CRANNY_CAPACITY;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_TRAPCAPACITY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TRAPCAPACITY_TOOLTIP ?></span></em></td><td><?php echo TRAPPER_CAPACITY;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_NATUNITSMULTIPLIER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATUNITSMULTIPLIER_TOOLTIP ?></span></em></td><td><?php echo NATARS_UNITS;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_NATARS_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_SPAWN_TIME_TOOLTIP ?></span></em></td><td><?php echo NATARS_SPAWN_TIME;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_NATARS_WW_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_WW_SPAWN_TIME_TOOLTIP ?></span></em></td><td><?php echo NATARS_WW_SPAWN_TIME;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_NATARS_WW_BUILDING_PLAN_SPAWN_TIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARS_WW_BUILDING_PLAN_SPAWN_TIME_TOOLTIP ?></span></em></td><td><?php echo NATARS_WW_BUILDING_PLAN_SPAWN_TIME;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_MAPSIZE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_MAPSIZE_TOOLTIP ?></span></em></td><td><?php echo WORLD_MAX;?>x<?php echo WORLD_MAX;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_VILLEXPSPEED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_VILLEXPSPEED_TOOLTIP ?></span></em></td><td><?php echo CP == 0 ? "Fast" : "Slow"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_BEGINPROTECT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_BEGINPROTECT_TOOLTIP ?></span></em></td><td><?php echo (PROTECTION / 3600);?> hour/s</td></tr>
|
||||
<tr><td><?php echo CONF_SERV_REGOPEN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_REGOPEN_TOOLTIP ?></span></em></td><td><?php echo REG_OPEN ? "<span class='badge blue'>True</span>" : "<span class='badge red'>False</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_ACTIVMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_ACTIVMAIL_TOOLTIP ?></span></em></td><td><?php echo AUTH_EMAIL ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_QUEST ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_QUEST_TOOLTIP ?></span></em></td><td><?php echo QUEST ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_QTYPE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_QTYPE_TOOLTIP ?></span></em></td><td><?php echo QTYPE == 25 ? "<span class='badge blue'>Travian Official</span>" : "<span class='badge blue'>TravianZ Extended</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_DLR ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_DLR_TOOLTIP ?></span></em></td><td><?php echo DEMOLISH_LEVEL_REQ; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_WWSTATS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_WWSTATS_TOOLTIP ?></span></em></td><td><?php echo WW ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_NTRTIME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NTRTIME_TOOLTIP ?></span></em></td><td><?php echo NATURE_REGTIME >= 86400 ? (NATURE_REGTIME/86400).' Days' : (NATURE_REGTIME/3600).' Hours'; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_OASIS_WOOD_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_WOOD_PROD_MULT_TOOLTIP ?></span></em></td><td><?php echo OASIS_WOOD_MULTIPLIER ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_OASIS_CLAY_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_CLAY_PROD_MULT_TOOLTIP ?></span></em></td><td><?php echo OASIS_CLAY_MULTIPLIER ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_OASIS_IRON_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_IRON_PROD_MULT_TOOLTIP ?></span></em></td><td><?php echo OASIS_IRON_MULTIPLIER ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_OASIS_CROP_PROD_MULT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_OASIS_CROP_PROD_MULT_TOOLTIP ?></span></em></td><td><?php echo OASIS_CROP_MULTIPLIER ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_MEDALINTERVAL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_MEDALINTERVAL_TOOLTIP ?></span></em></td><td><?php echo MEDALINTERVAL >= 86400 ? (MEDALINTERVAL/86400).' Days' : (MEDALINTERVAL/3600).' Hours'; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_TOURNTHRES ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_TOURNTHRES_TOOLTIP ?></span></em></td><td><?php echo TS_THRESHOLD;?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_GWORKSHOP ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_GWORKSHOP_TOOLTIP ?></span></em></td><td><?php echo GREAT_WKS ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_NATARSTAT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_NATARSTAT_TOOLTIP ?></span></em></td><td><?php echo SHOW_NATARS ? "<span class='badge blue'>True</span>" : "<span class='badge red'>False</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_PEACESYST ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_PEACESYST_TOOLTIP ?></span></em></td><td><?php echo (["None", "Normal", "Christmas", "New Year", "Easter"])[PEACE]; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_GRAPHICPACK ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_GRAPHICPACK_TOOLTIP ?></span></em></td><td><?php echo GP_ENABLE ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_SERV_ERRORREPORT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SERV_ERRORREPORT_TOOLTIP ?></span></em></td><td><b><?php echo (ERROR_REPORT=="error_reporting (0);")? "No": "Yes";?></b></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table id="profile">
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PAYPALEMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PAYPALEMAIL_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_CURRENCY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_CURRENCY_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PACKAGEGOLDA ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDA_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_A_GOLD') ? PLUS_PACKAGE_A_GOLD : 60); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PACKAGEPRICEA ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEA_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_A_PRICE') ? PLUS_PACKAGE_A_PRICE : '1,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PACKAGEGOLDB ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDB_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_B_GOLD') ? PLUS_PACKAGE_B_GOLD : 120); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PACKAGEPRICEB ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEB_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_B_PRICE') ? PLUS_PACKAGE_B_PRICE : '4,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PACKAGEGOLDC ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDC_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_C_GOLD') ? PLUS_PACKAGE_C_GOLD : 360); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PACKAGEPRICEC ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEC_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_C_PRICE') ? PLUS_PACKAGE_C_PRICE : '9,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PACKAGEGOLDD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDD_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_D_GOLD') ? PLUS_PACKAGE_D_GOLD : 1000); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PACKAGEPRICED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICED_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_D_PRICE') ? PLUS_PACKAGE_D_PRICE : '19,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PACKAGEGOLDE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDE_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_E_GOLD') ? PLUS_PACKAGE_E_GOLD : 2000); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PACKAGEPRICEE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEE_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo (defined('PLUS_PACKAGE_E_PRICE') ? PLUS_PACKAGE_E_PRICE : '49,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_ACCDURATION ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_ACCDURATION_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(PLUS_TIME >= 86400){ echo ''.(PLUS_TIME/86400).' Days'; } else if(PLUS_TIME < 86400){ echo ''.(PLUS_TIME / 3600).' Hours'; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_PLUS_PRODUCTDURATION ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PRODUCTDURATION_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(PLUS_PRODUCTION >= 86400){ echo ''.(PLUS_PRODUCTION/86400).' Days'; } else if(PLUS_PRODUCTION < 86400){ echo ''.(PLUS_PRODUCTION/3600).' Hours'; } ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- NEW FUNCTIONS -->
|
||||
<div class="config-card">
|
||||
<div class="config-head"><span>New Mechanics and Functions</span><a href="admin.php?p=editNewFunctions" title="Edit New Mechanics and Functions" class="edit-btn"><?php echo $editIcon; ?></a></div>
|
||||
<table class="config-table">
|
||||
<tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
|
||||
<tr><td>Display oasis in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of oases of each village in the player profile</span></em></td><td><?php echo NEW_FUNCTIONS_OASIS ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Alliance invitation message <em class="tooltip">?<span class="classic">Enable (Disable) sending an in-game message to the player, if he was invited to the alliance</span></em></td><td><?php echo NEW_FUNCTIONS_ALLIANCE_INVITATION ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>New Alliance & Embassy Mechanics <em class="tooltip">?<span class="classic">https://github.com/Shadowss/TravianZ/wiki/New-Alliance-&-Embassy-Mechanics</span></em></td><td><?php echo NEW_FUNCTIONS_EMBASSY_MECHANICS ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>New forum post message <em class="tooltip">?<span class="classic">Enable (Disable) forum subscription messages</span></em></td><td><?php echo NEW_FUNCTIONS_FORUM_POST_MESSAGE ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Tribes images in profile <em class="tooltip">?<span class="classic">Enable (Disable) displaying images of tribes</span></em></td><td><?php echo NEW_FUNCTIONS_TRIBE_IMAGES ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>MHs images in profile <em class="tooltip">?<span class="classic">Enable (Disable) displaying images of Multihunters</span></em></td><td><?php echo NEW_FUNCTIONS_MHS_IMAGES ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Display artifact in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of the artifact</span></em></td><td><?php echo NEW_FUNCTIONS_DISPLAY_ARTIFACT ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Display WoW in profile <em class="tooltip">?<span class="classic">Enable (Disable) the display of the wonder</span></em></td><td><?php echo NEW_FUNCTIONS_DISPLAY_WONDER ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Vacation Mode <em class="tooltip">?<span class="classic">Enable (Disable) vacation mode</span></em></td><td><?php echo NEW_FUNCTIONS_VACATION ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Catapult targets <em class="tooltip">?<span class="classic">Enable (Disable) the display of catapult targets</span></em></td><td><?php echo NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Manual on Nature and Natars <em class="tooltip">?<span class="classic">Enable (Disable) manual info</span></em></td><td><?php echo NEW_FUNCTIONS_MANUAL_NATURENATARS ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Direct links placement <em class="tooltip">?<span class="classic">Left menu vs right menu</span></em></td><td><?php echo NEW_FUNCTIONS_DISPLAY_LINKS ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Medal Veteran Player <em class="tooltip">?<span class="classic">3 years</span></em></td><td><?php echo NEW_FUNCTIONS_MEDAL_3YEAR ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Medal Veteran Player 5a <em class="tooltip">?<span class="classic">5 years</span></em></td><td><?php echo NEW_FUNCTIONS_MEDAL_5YEAR ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td>Medal Veteran Player 10a <em class="tooltip">?<span class="classic">10 years</span></em></td><td><?php echo NEW_FUNCTIONS_MEDAL_10YEAR ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo LOG_SETT ?> <a href="admin.php?p=editLogSet"><img src="../img/admin/edit.gif" title="<?php echo EDIT_LOG_SETT ?>"></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<!-- PLUS -->
|
||||
<div class="config-card">
|
||||
<div class="config-head"><span><?php echo PLUS_SETT ?></span><a href="admin.php?p=editPlusSet" title="<?php echo EDIT_PLUS_SETT1 ?>" class="edit-btn"><?php echo $editIcon; ?></a></div>
|
||||
<table class="config-table">
|
||||
<tr><td><?php echo CONF_PLUS_PAYPALEMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PAYPALEMAIL_TOOLTIP ?></span></em></td><td><?php echo (defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'martin@martinambrus.com'); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_CURRENCY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_CURRENCY_TOOLTIP ?></span></em></td><td><?php echo (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PACKAGEGOLDA ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDA_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_A_GOLD') ? PLUS_PACKAGE_A_GOLD : 60); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PACKAGEPRICEA ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEA_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_A_PRICE') ? PLUS_PACKAGE_A_PRICE : '1,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PACKAGEGOLDB ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDB_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_B_GOLD') ? PLUS_PACKAGE_B_GOLD : 120); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PACKAGEPRICEB ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEB_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_B_PRICE') ? PLUS_PACKAGE_B_PRICE : '4,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PACKAGEGOLDC ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDC_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_C_GOLD') ? PLUS_PACKAGE_C_GOLD : 360); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PACKAGEPRICEC ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEC_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_C_PRICE') ? PLUS_PACKAGE_C_PRICE : '9,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PACKAGEGOLDD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDD_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_D_GOLD') ? PLUS_PACKAGE_D_GOLD : 1000); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PACKAGEPRICED ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICED_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_D_PRICE') ? PLUS_PACKAGE_D_PRICE : '19,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PACKAGEGOLDE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEGOLDE_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_E_GOLD') ? PLUS_PACKAGE_E_GOLD : 2000); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PACKAGEPRICEE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PACKAGEPRICEE_TOOLTIP ?></span></em></td><td><?php echo (defined('PLUS_PACKAGE_E_PRICE') ? PLUS_PACKAGE_E_PRICE : '49,99') . ' ' . (defined('PAYPAL_CURRENCY') ? PAYPAL_CURRENCY : 'EUR'); ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_ACCDURATION ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_ACCDURATION_TOOLTIP ?></span></em></td><td><?php echo PLUS_TIME >= 86400 ? (PLUS_TIME/86400).' Days' : (PLUS_TIME/3600).' Hours'; ?></td></tr>
|
||||
<tr><td><?php echo CONF_PLUS_PRODUCTDURATION ?> <em class="tooltip">?<span class="classic"><?php echo CONF_PLUS_PRODUCTDURATION_TOOLTIP ?></span></em></td><td><?php echo PLUS_PRODUCTION >= 86400 ? (PLUS_PRODUCTION/86400).' Days' : (PLUS_PRODUCTION/3600).' Hours'; ?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table id="profile">
|
||||
<tr>
|
||||
<td class="b"><?php echo SERV_VARIABLE ?></td>
|
||||
<td class="b"><?php echo SERV_VALUE ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_LOG_BUILD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_BUILD_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LOG_BUILD) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_BUILD){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_LOG_TECHNOLOGY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_TECHNOLOGY_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LOG_TECH) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_TECH){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_LOG_LOGIN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_LOGIN_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LOG_LOGIN) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_LOGIN){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_LOG_GOLD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_GOLD_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LOG_GOLD_FIN) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_GOLD_FIN){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_LOG_ADMIN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_ADMIN_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LOG_ADMIN) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_ADMIN){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_LOG_WAR ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_WAR_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LOG_WAR) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_WAR){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_LOG_MARKET ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_MARKET_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LOG_MARKET) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_MARKET){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_LOG_ILLEGAL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_ILLEGAL_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LOG_ILLEGAL) { echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!LOG_ILLEGAL){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- LOG -->
|
||||
<div class="config-card">
|
||||
<div class="config-head"><span><?php echo LOG_SETT ?></span><a href="admin.php?p=editLogSet" title="<?php echo EDIT_LOG_SETT ?>" class="edit-btn"><?php echo $editIcon; ?></a></div>
|
||||
<table class="config-table">
|
||||
<tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
|
||||
<tr><td><?php echo CONF_LOG_BUILD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_BUILD_TOOLTIP ?></span></em></td><td><?php echo LOG_BUILD ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_LOG_TECHNOLOGY ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_TECHNOLOGY_TOOLTIP ?></span></em></td><td><?php echo LOG_TECH ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_LOG_LOGIN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_LOGIN_TOOLTIP ?></span></em></td><td><?php echo LOG_LOGIN ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_LOG_GOLD ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_GOLD_TOOLTIP ?></span></em></td><td><?php echo LOG_GOLD_FIN ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_LOG_ADMIN ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_ADMIN_TOOLTIP ?></span></em></td><td><?php echo LOG_ADMIN ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_LOG_WAR ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_WAR_TOOLTIP ?></span></em></td><td><?php echo LOG_WAR ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_LOG_MARKET ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_MARKET_TOOLTIP ?></span></em></td><td><?php echo LOG_MARKET ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_LOG_ILLEGAL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_LOG_ILLEGAL_TOOLTIP ?></span></em></td><td><?php echo LOG_ILLEGAL ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo NEWSBOX_SETT ?> <a href="admin.php?p=editNewsboxSet"><img src="../img/admin/edit.gif" title="<?php echo EDIT_NEWSBOX_SETT ?>"></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<!-- NEWSBOX -->
|
||||
<div class="config-card">
|
||||
<div class="config-head"><span><?php echo NEWSBOX_SETT ?></span><a href="admin.php?p=editNewsboxSet" title="<?php echo EDIT_NEWSBOX_SETT ?>" class="edit-btn"><?php echo $editIcon; ?></a></div>
|
||||
<table class="config-table">
|
||||
<tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
|
||||
<tr><td><?php echo EDIT_NEWSBOX1 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX1_TOOLTIP ?></span></em></td><td><?php echo NEWSBOX1 ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo EDIT_NEWSBOX2 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX2_TOOLTIP ?></span></em></td><td><?php echo NEWSBOX2 ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo EDIT_NEWSBOX3 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX3_TOOLTIP ?></span></em></td><td><?php echo NEWSBOX3 ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table id="profile">
|
||||
<tr>
|
||||
<td class="b"><?php echo SERV_VARIABLE ?></td>
|
||||
<td class="b"><?php echo SERV_VALUE ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo EDIT_NEWSBOX1 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX1_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(NEWSBOX1){ echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!NEWSBOX1){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo EDIT_NEWSBOX2 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX2_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(NEWSBOX2){ echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!NEWSBOX2){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo EDIT_NEWSBOX3 ?> <em class="tooltip">?<span class="classic"><?php echo EDIT_NEWSBOX3_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(NEWSBOX3){ echo "<b><font color='Green'>Enabled</font></b>"; } elseif(!NEWSBOX3){ echo "<b><font color='Red'>Disabled</font></b>"; } ?> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- SQL -->
|
||||
<div class="config-card">
|
||||
<div class="config-head"><span><?php echo SQL_SETTINGS ?></span></div>
|
||||
<table class="config-table">
|
||||
<tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
|
||||
<tr><td><?php echo CONF_SQL_HOSTNAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_HOSTNAME_TOOLTIP ?></span></em></td><td><?php echo SQL_SERVER;?></td></tr>
|
||||
<tr><td><?php echo CONF_SQL_PORT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_PORT_TOOLTIP ?></span></em></td><td><?php echo SQL_PORT;?></td></tr>
|
||||
<tr><td><?php echo CONF_SQL_DBUSER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBUSER_TOOLTIP ?></span></em></td><td><?php echo SQL_USER;?></td></tr>
|
||||
<tr><td><?php echo CONF_SQL_DBPASS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBPASS_TOOLTIP ?></span></em></td><td>*********</td></tr>
|
||||
<tr><td><?php echo CONF_SQL_DBNAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBNAME_TOOLTIP ?></span></em></td><td><?php echo SQL_DB;?></td></tr>
|
||||
<tr><td><?php echo CONF_SQL_TBPREFIX ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_TBPREFIX_TOOLTIP ?></span></em></td><td><?php echo TB_PREFIX;?></td></tr>
|
||||
<tr><td><?php echo CONF_SQL_DBTYPE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBTYPE_TOOLTIP ?></span></em></td><td><?php echo DB_TYPE == 0 ? "MYSQL" : "MYSQLi"; ?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo SQL_SETTINGS ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<!-- EXTRA -->
|
||||
<div class="config-card">
|
||||
<div class="config-head"><span><?php echo EXTRA_SETT ?></span><a href="admin.php?p=editExtraSet" title="<?php echo EDIT_EXTRA_SETT ?>" class="edit-btn"><?php echo $editIcon; ?></a></div>
|
||||
<table class="config-table">
|
||||
<tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
|
||||
<tr><td><?php echo CONF_EXTRA_LIMITMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_EXTRA_LIMITMAIL_TOOLTIP ?></span></em></td><td><?php echo LIMIT_MAILBOX ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_EXTRA_MAXMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_EXTRA_MAXMAIL_TOOLTIP ?></span></em></td><td><?php echo LIMIT_MAILBOX ? MAX_MAIL : "<span class='badge gray'>Limit mailbox disabled</span>"; ?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<table id="profile">
|
||||
<tr>
|
||||
<td class="b"><?php echo SERV_VARIABLE ?></td>
|
||||
<td class="b"><?php echo SERV_VALUE ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SQL_HOSTNAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_HOSTNAME_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo SQL_SERVER;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SQL_PORT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_PORT_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo SQL_PORT;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SQL_DBUSER ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBUSER_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo SQL_USER;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SQL_DBPASS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBPASS_TOOLTIP ?></span></em></td>
|
||||
<td>*********</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SQL_DBNAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBNAME_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo SQL_DB;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SQL_TBPREFIX ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_TBPREFIX_TOOLTIP ?></span></em></td>
|
||||
<td><?php echo TB_PREFIX;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_SQL_DBTYPE ?> <em class="tooltip">?<span class="classic"><?php echo CONF_SQL_DBTYPE_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(DB_TYPE == 0) { echo "MYSQL"; } else if(DB_TYPE == 1) { echo "MYSQLi"; } ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo EXTRA_SETT ?> <a href="admin.php?p=editExtraSet"><img src="../img/admin/edit.gif" title="<?php echo EDIT_EXTRA_SETT ?>"></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<table id="profile">
|
||||
<tr>
|
||||
<td class="b"><?php echo SERV_VARIABLE ?></td>
|
||||
<td class="b"><?php echo SERV_VALUE ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_EXTRA_LIMITMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_EXTRA_LIMITMAIL_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LIMIT_MAILBOX){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(LIMIT_MAILBOX == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_EXTRA_MAXMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_EXTRA_MAXMAIL_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(LIMIT_MAILBOX){ echo MAX_MAIL; } else if(LIMIT_MAILBOX == false){ echo "<font color='Gray'>Limit mailbox disabled</font>"; } ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo ADMIN_INFO ?> <a href="admin.php?p=editAdminInfo"><img src="../img/admin/edit.gif" title="<?php echo EDIT_ADMIN_INFO ?>"></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<table id="profile">
|
||||
<tr>
|
||||
<td class="b"><?php echo SERV_VARIABLE ?></td>
|
||||
<td class="b"><?php echo SERV_VALUE ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_ADMIN_NAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_NAME_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(empty(ADMIN_NAME)){ echo "<b><font color='Red'>No admin name defined!</b></font>"; } else if(ADMIN_NAME != ''){ echo ADMIN_NAME; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_ADMIN_EMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_EMAIL_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(empty(ADMIN_EMAIL)){ echo "<b><font color='Red'>No admin email defined!</b></font>"; } else if(ADMIN_EMAIL != ''){ echo ADMIN_EMAIL; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_ADMIN_SHOWSTATS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_SHOWSTATS_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(INCLUDE_ADMIN){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(INCLUDE_ADMIN == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_ADMIN_SUPPMESS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_SUPPMESS_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(ADMIN_RECEIVE_SUPPORT_MESSAGES){ echo "<b><font color='Green'>Enabled</font></b>"; } else if(ADMIN_RECEIVE_SUPPORT_MESSAGES == false){ echo "<b><font color='Red'>Disabled</font></b>"; } ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo CONF_ADMIN_RAIDATT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_RAIDATT_TOOLTIP ?></span></em></td>
|
||||
<td><?php if(ADMIN_ALLOW_INCOMING_RAIDS){ echo "<b><font color='Green'>Yes</font></b>"; } else if(ADMIN_ALLOW_INCOMING_RAIDS == false){ echo "<b><font color='Red'>No</font></b>"; } ?></td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- ADMIN INFO -->
|
||||
<div class="config-card">
|
||||
<div class="config-head"><span><?php echo ADMIN_INFO ?></span><a href="admin.php?p=editAdminInfo" title="<?php echo EDIT_ADMIN_INFO ?>" class="edit-btn"><?php echo $editIcon; ?></a></div>
|
||||
<table class="config-table">
|
||||
<tr><td class="b"><?php echo SERV_VARIABLE ?></td><td class="b"><?php echo SERV_VALUE ?></td></tr>
|
||||
<tr><td><?php echo CONF_ADMIN_NAME ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_NAME_TOOLTIP ?></span></em></td><td><?php echo empty(ADMIN_NAME) ? "<span class='badge red'>No admin name defined!</span>" : ADMIN_NAME; ?></td></tr>
|
||||
<tr><td><?php echo CONF_ADMIN_EMAIL ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_EMAIL_TOOLTIP ?></span></em></td><td><?php echo empty(ADMIN_EMAIL) ? "<span class='badge red'>No admin email defined!</span>" : ADMIN_EMAIL; ?></td></tr>
|
||||
<tr><td><?php echo CONF_ADMIN_SHOWSTATS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_SHOWSTATS_TOOLTIP ?></span></em></td><td><?php echo INCLUDE_ADMIN ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_ADMIN_SUPPMESS ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_SUPPMESS_TOOLTIP ?></span></em></td><td><?php echo ADMIN_RECEIVE_SUPPORT_MESSAGES ? "<span class='badge green'>Enabled</span>" : "<span class='badge red'>Disabled</span>"; ?></td></tr>
|
||||
<tr><td><?php echo CONF_ADMIN_RAIDATT ?> <em class="tooltip">?<span class="classic"><?php echo CONF_ADMIN_RAIDATT_TOOLTIP ?></span></em></td><td><?php echo ADMIN_ALLOW_INCOMING_RAIDS ? "<span class='badge green'>Yes</span>" : "<span class='badge red'>No</span>"; ?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
function define_array($array, $keys = null){
|
||||
foreach($array as $key => $value){
|
||||
@@ -502,5 +218,4 @@ function define_array($array, $keys = null){
|
||||
else define($keyname, $value);
|
||||
}
|
||||
}
|
||||
//define_array($array);
|
||||
?>
|
||||
?>
|
||||
@@ -2,11 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename delallymedal.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## Improved: aggenkeech ##
|
||||
## Filename : delallymedal.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
+105
-81
@@ -2,87 +2,111 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename deletion.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : deletion.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
include_once("../GameEngine/Ranking.php");
|
||||
if($_GET['uid'])
|
||||
{
|
||||
$varray = $database->getProfileVillages($_GET['uid']);
|
||||
if($user)
|
||||
{
|
||||
$totalpop = 0;
|
||||
foreach($varray as $vil)
|
||||
{
|
||||
$totalpop += $vil['pop'];
|
||||
} ?>
|
||||
<style>
|
||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||
</style>
|
||||
<form action="" method="post">
|
||||
<input type="hidden" name="action" value="DelPlayer">
|
||||
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4">Delete player</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Name:</td>
|
||||
<td><a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></td>
|
||||
<td>Gold:</td>
|
||||
<td><?php echo $user['gold'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rank:</td>
|
||||
<td><?php $ranking->procRankArray();echo $ranking->getUserRank($user['id']); ?></td>
|
||||
<td>Population:</td>
|
||||
<td><?php echo $totalpop;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Villages:</td>
|
||||
<td>
|
||||
<?php
|
||||
$result = mysqli_query($GLOBALS["link"], "SELECT Count(*) as Total FROM ".TB_PREFIX."vdata WHERE owner = ".(int) $user['id']."");
|
||||
$num_rows = mysqli_fetch_array($result, MYSQLI_ASSOC)['Total'];
|
||||
echo $num_rows;
|
||||
?>
|
||||
</td>
|
||||
<td><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b>:</td>
|
||||
<td>
|
||||
<?php
|
||||
$plus = date('d.m.Y H:i',$user['plus']);
|
||||
echo $plus;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alliance:</td>
|
||||
<td><?php echo $database->getAllianceName($user['alliance']);?></td>
|
||||
<td>Status:</td>
|
||||
<td>-</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4" class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password:</td>
|
||||
<td><input type="password" name="pass"></td>
|
||||
<td colspan="2"><input type="submit" class="c5" value="Delete player"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form><?php
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
}
|
||||
if($_GET['uid']) {
|
||||
$uid = (int)$_GET['uid'];
|
||||
$varray = $database->getProfileVillages($uid);
|
||||
if($user) {
|
||||
$totalpop = 0;
|
||||
foreach($varray as $vil) { $totalpop += $vil['pop']; }
|
||||
$ranking->procRankArray();
|
||||
$rank = $ranking->getUserRank($user['id']);
|
||||
$villages = mysqli_fetch_array(mysqli_query($GLOBALS["link"], "SELECT COUNT(*) as Total FROM ".TB_PREFIX."vdata WHERE owner = $uid"), MYSQLI_ASSOC)['Total'];
|
||||
?>
|
||||
<style>
|
||||
.del-wrap{max-width:650px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.del-head{background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;border-radius:6px;padding:18px 20px;margin-bottom:14px;text-align:center;}
|
||||
.del-head .icon{font-size:36px;margin-bottom:6px;}
|
||||
.del-head h2{margin:0;font-size:20px;}
|
||||
.del-head .warn{font-size:12px;opacity:.9;margin-top:4px;}
|
||||
|
||||
.card{background:#fff;border:2px solid #fecaca;border-radius:6px;box-shadow:0 2px 8px rgba(220,38,38,.15);overflow:hidden;}
|
||||
.card h3{margin:0;padding:10px 14px;background:#fef2f2;border-bottom:1px solid #fecaca;font-size:13px;text-transform:uppercase;color:#991b1b;}
|
||||
|
||||
.player-info{display:grid;grid-template-columns:1fr 1fr;gap:0;border-bottom:1px solid #fee2e2;}
|
||||
.info-item{padding:12px 14px;border-right:1px solid #fee2e2;border-bottom:1px solid #fee2e2;font-size:13px;}
|
||||
.info-item:nth-child(2n){border-right:none;}
|
||||
.info-item b{color:#6b7280;font-weight:normal;display:block;font-size:11px;text-transform:uppercase;margin-bottom:2px;}
|
||||
.info-item .val{font-weight:600;color:#1f2937;}
|
||||
.info-item .val a{color:#dc2626;text-decoration:none;}
|
||||
.info-item .val a:hover{text-decoration:underline;}
|
||||
|
||||
.danger-box{background:#fff1f2;border:1px solid #fca5a5;border-radius:5px;padding:12px;margin:14px;font-size:12px;color:#7f1d1d;display:flex;gap:10px;align-items:flex-start;}
|
||||
.danger-box .icon{font-size:20px;flex-shrink:0;}
|
||||
|
||||
.confirm-area{padding:0 14px 16px;text-align:center;}
|
||||
.confirm-area label{display:block;font-size:12px;font-weight:600;color:#374151;margin-bottom:6px;}
|
||||
.confirm-area input[type=password]{width:240px;max-width:100%;padding:9px;border:2px solid #fca5a5;border-radius:5px;font-size:14px;text-align:center;}
|
||||
.confirm-area input[type=password]:focus{outline:none;border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.2);}
|
||||
|
||||
.actions{display:flex;justify-content:space-between;align-items:center;padding:14px;background:#fef2f2;border-top:1px solid #fecaca;}
|
||||
.btn-cancel{background:#fff;border:1px solid #d1d5db;color:#374151;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;}
|
||||
.btn-cancel:hover{background:#f9fafb;}
|
||||
.btn-delete{background:linear-gradient(#dc2626,#b91c1c);border:1px solid #7f1d1d;color:#fff;padding:9px 22px;border-radius:5px;font-size:13px;font-weight:700;cursor:pointer;box-shadow:0 1px 3px rgba(0,0,0,.2);}
|
||||
.btn-delete:hover{filter:brightness(1.1);}
|
||||
</style>
|
||||
|
||||
<div class="del-wrap">
|
||||
<div class="del-head">
|
||||
<div class="icon">⚠️</div>
|
||||
<h2>DELETE PLAYER PERMANENTLY</h2>
|
||||
<div class="warn">This action cannot be undone!</div>
|
||||
</div>
|
||||
|
||||
<form action="" method="post" onsubmit="return confirm('ESTI SIGUR? Se va sterge tot: sate, trupe, rapoarte!')">
|
||||
<input type="hidden" name="action" value="DelPlayer">
|
||||
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
|
||||
<div class="card">
|
||||
<h3>🗑️ Player to delete</h3>
|
||||
|
||||
<div class="player-info">
|
||||
<div class="info-item"><b>Name</b><div class="val"><a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></div></div>
|
||||
<div class="info-item"><b>Gold</b><div class="val"><?php echo $user['gold'];?> <img src="../img/x.gif" class="gold" style="vertical-align:-2px;"></div></div>
|
||||
<div class="info-item"><b>Rank</b><div class="val">#<?php echo $rank; ?></div></div>
|
||||
<div class="info-item"><b>Population</b><div class="val"><?php echo number_format($totalpop);?></div></div>
|
||||
<div class="info-item"><b>Villages</b><div class="val"><?php echo $villages;?></div></div>
|
||||
<div class="info-item"><b>Plus ends</b><div class="val"><?php echo date('d.m.Y H:i',$user['plus']);?></div></div>
|
||||
<div class="info-item" style="grid-column:1/-1;border-bottom:none;"><b>Alliance</b><div class="val"><?php echo $database->getAllianceName($user['alliance']) ?: '-';?></div></div>
|
||||
</div>
|
||||
|
||||
<div class="danger-box">
|
||||
<div class="icon">🚨</div>
|
||||
<div><b>WARNING:</b> All villages (<?php echo $villages; ?>), troops, buildings, reports, messages and player statistics will be <u>permanently</u> deleted. There is no recovery!</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="confirm-area">
|
||||
<label for="pass">Confirm with your admin password:</label>
|
||||
<input type="password" name="pass" id="pass" placeholder="••••••••" required autocomplete="current-password">
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="?p=player&uid=<?php echo $uid;?>" class="btn-cancel">← Cancel</a>
|
||||
<button type="submit" class="btn-delete">🗑️ DELETE PLAYER</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
@@ -2,11 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename gold.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## Improved: aggenkeech ##
|
||||
## Filename : delmedal.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
@@ -2,11 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editAccess.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editAccess.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
+160
-154
@@ -2,160 +2,166 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editAdditional.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editAdditional.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
if (!isset($_SESSION)) { session_start(); }
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$id = $_GET['uid'];
|
||||
$dur=$user['protect']-time();
|
||||
$protect=0;
|
||||
if($dur>43200) {
|
||||
$protect=intval($dur/86400)+1;
|
||||
}
|
||||
if(isset($id))
|
||||
{
|
||||
?>
|
||||
<script LANGUAGE="JavaScript">
|
||||
function go_url(url) {
|
||||
location=url;
|
||||
return(false);
|
||||
}
|
||||
</script>
|
||||
<form action="../GameEngine/Admin/Mods/additional.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<br />
|
||||
<table id="profile" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit Additional Info For: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Change Access</td>
|
||||
<td>
|
||||
<?php if($id != $_SESSION['id']) { ?>
|
||||
<select name="access" class="dropdown">
|
||||
<option value="0" <?php if($user['access'] == 0) echo 'selected="selected"'; ?>>Banned</option>
|
||||
<option value="2" <?php if($user['access'] == 2) echo 'selected="selected"'; ?>>Normal User</option>
|
||||
<option value="8" <?php if($user['access'] == 8) echo 'selected="selected"'; ?>>Multihunter</option>
|
||||
<option value="9" <?php if($user['access'] == 9) echo 'selected="selected"'; ?>>Admin</option>
|
||||
</select>
|
||||
<?php } else { ?>
|
||||
<!-- nu permiți editarea propriului acces -->
|
||||
<input type="hidden" name="access" value="<?php echo $user['access']; ?>">
|
||||
<?php
|
||||
$names = [0=>'Banned', 2=>'Normal User', 8=>'Multihunter', 9=>'Admin'];
|
||||
echo '<b style="color:#c00;">'.$names[$user['access']].'</b> - You cannot change your own access.';
|
||||
?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit Gold</td>
|
||||
<td>
|
||||
<input class="give_gold" name="gold" value="<?php echo $user['gold'];?>"> <img src="../img/admin/gold.gif">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sitter 1</td>
|
||||
<td>
|
||||
<input class="fm" name="sitter1" value="<?php echo $user['sit1']; ?>"><br />
|
||||
<?php
|
||||
$sitter1 = $database->getUserArray($user['sit1'], 1);
|
||||
if($user['sit1'] ==0)
|
||||
{
|
||||
echo 'No Sitter';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a href="admin.php?p=player&uid='.$sitter1['id'].'">'.$sitter1['username'].'</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sitter 2</td>
|
||||
<td>
|
||||
<input class="fm" name="sitter2" value="<?php echo $user['sit2']; ?>"><br />
|
||||
<?php
|
||||
$sitter2 = $database->getUserArray($user['sit2'], 1);
|
||||
if($user['sit2'] ==0)
|
||||
{
|
||||
echo 'No Sitter';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a href="admin.php?p=player&uid='.$sitter2['id'].'">'.$sitter2['username'].'</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Give Protection For</td>
|
||||
<td>
|
||||
<input class="fm" name="protect" value="<?php echo $protect;?>" style="width: 60%;"> Days
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit Culture Points</td>
|
||||
<td>
|
||||
<input class="fm" name="cp" value="<?php echo round($user['cp'], 0); ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit Attack Points</td>
|
||||
<td>
|
||||
<input class="fm" name="off" value="<?php echo $user['ap']; ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit Defence Points</td>
|
||||
<td>
|
||||
<input class="fm" name="def" value="<?php echo $user['dp']; ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit Resources Raided</td>
|
||||
<td>
|
||||
<input class="fm" name="res" value="<?php echo $user['RR']; ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Attack Points</td>
|
||||
<td>
|
||||
<input class="fm" name="ooff" value="<?php echo $user['apall']; ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Defence Points</td>
|
||||
<td>
|
||||
<input class="fm" name="odef" value="<?php echo $user['dpall']; ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input style="float: right" name="save" type="image" id="btn_save" class="dynamic_img" src="img/x.gif" value="save" alt="save" />
|
||||
<input style="float: left" name="back" type="image" id="btn_back" class="dynamic_img" src="img/x.gif" value="back" alt="back" onclick="return go_url('../Admin/admin.php?p=player&uid=<?php echo $_GET["uid"];?>')" />
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
}
|
||||
$id = (int)$_GET['uid'];
|
||||
$dur = $user['protect'] - time();
|
||||
$protect = 0;
|
||||
if($dur > 43200) { $protect = intval($dur/86400) + 1; }
|
||||
|
||||
if(isset($id)) {
|
||||
$sitter1 = $user['sit1'] ? $database->getUserArray($user['sit1'], 1) : null;
|
||||
$sitter2 = $user['sit2'] ? $database->getUserArray($user['sit2'], 1) : null;
|
||||
?>
|
||||
<style>
|
||||
.editAdd-wrap{max-width:950px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.editAdd-head{background:linear-gradient(#fff,#f3f3);border:1px solid #ccc;border-radius:5px;padding:12px 16px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;}
|
||||
.editAdd-head h2{margin:0;font-size:18px;color:#222;}
|
||||
.editAdd-head h2 a{color:#71D000;text-decoration:none;}
|
||||
.editAdd-head .uid{font-size:12px;color:#666;}
|
||||
|
||||
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
|
||||
@media(max-width:800px){.grid-2{grid-template-columns:1fr;}}
|
||||
|
||||
.card{background:#fff;border:1px solid #d4d4d4;border-radius:4px;overflow:hidden;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.04);}
|
||||
.card h3{margin:0;padding:8px 12px;background:#f7f7f7;border-bottom:1px solid #e5e5e5;font-size:12px;text-transform:uppercase;color:#444;letter-spacing:.5px;}
|
||||
.card .body{padding:14px;}
|
||||
|
||||
.form-row{display:flex;align-items:center;margin-bottom:12px;gap:10px;}
|
||||
.form-row label{width:160px;font-size:12px;color:#333;font-weight:bold;}
|
||||
.form-row .field{flex:1;}
|
||||
.form-row input[type=text], .form-row input[type=number], .form-row select{
|
||||
width:100%;box-sizing:border-box;padding:6px 8px;border:1px solid #bbb;border-radius:3px;font-size:13px;
|
||||
}
|
||||
.form-row input:focus, select:focus{border-color:#71D000;outline:none;box-shadow:0 0 3px rgba(113,208,0,.3);}
|
||||
.input-icon{display:flex;align-items:center;gap:6px;}
|
||||
.input-icon img{vertical-align:middle;}
|
||||
|
||||
.badge{display:inline-block;padding:2px 6px;border-radius:3px;font-size:11px;color:#fff;margin-left:6px;}
|
||||
.badge.banned{background:#c00;} .badge.user{background:#666;} .badge.mh{background:#06a;} .badge.admin{background:#e67e00;}
|
||||
|
||||
.sitter-link{font-size:11px;margin-top:3px;display:block;}
|
||||
.sitter-link a{color:#0066cc;text-decoration:none;}
|
||||
|
||||
.actions{display:flex;justify-content:space-between;margin-top:16px;padding-top:12px;border-top:1px solid #eee;}
|
||||
.btn{padding:8px 18px;border-radius:4px;font-size:13px;font-weight:bold;cursor:pointer;border:1px solid;text-decoration:none;display:inline-block;}
|
||||
.btn-save{background:linear-gradient(#7ed321,#5eae0f);border-color:#4a8a0c;color:#fff;}
|
||||
.btn-back{background:#f0f0f0;border-color:#bbb;color:#333;}
|
||||
.btn-save:hover{filter:brightness(1.05);}
|
||||
</style>
|
||||
|
||||
<div class="editAdd-wrap">
|
||||
<div class="editAdd-head">
|
||||
<h2>⚙️ Edit Additional: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo htmlspecialchars($user['username']); ?></a></h2>
|
||||
<div class="uid">UID: <?php echo $id; ?> | Gold: <?php echo $user['gold']; ?> <img src="../img/admin/gold.gif" style="vertical-align:-2px;"></div>
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/additional.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
|
||||
<div class="grid-2">
|
||||
<!-- LEFT: ACCOUNT CONTROL -->
|
||||
<div class="card">
|
||||
<h3>🔐 Account Control</h3>
|
||||
<div class="body">
|
||||
<div class="form-row">
|
||||
<label>Access Level</label>
|
||||
<div class="field">
|
||||
<?php if($id != $_SESSION['id']) { ?>
|
||||
<select name="access">
|
||||
<option value="0" <?php if($user['access']==0)echo'selected'; ?>>0 - Banned</option>
|
||||
<option value="2" <?php if($user['access']==2)echo'selected'; ?>>2 - Normal User</option>
|
||||
<option value="8" <?php if($user['access']==8)echo'selected'; ?>>8 - Multihunter</option>
|
||||
<option value="9" <?php if($user['access']==9)echo'selected'; ?>>9 - Admin</option>
|
||||
</select>
|
||||
<?php } else {
|
||||
$names=[0=>'Banned',2=>'Normal',8=>'Multihunter',9=>'Admin'];
|
||||
$cls=[0=>'banned',2=>'user',8=>'mh',9=>'admin'];
|
||||
echo '<input type="hidden" name="access" value="'.$user['access'].'">';
|
||||
echo '<span class="badge '.$cls[$user['access']].'">'.$names[$user['access']].'</span> <span style="font-size:11px;color:#c00;">(nu-ți poți schimba propriul acces)</span>';
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label>💰 Gold</label>
|
||||
<div class="field input-icon">
|
||||
<input type="number" name="gold" value="<?php echo (int)$user['gold']; ?>">
|
||||
<img src="../img/admin/gold.gif" alt="gold">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<label>🛡️ Protection</label>
|
||||
<div class="field input-icon">
|
||||
<input type="number" name="protect" value="<?php echo $protect; ?>" min="0" max="30">
|
||||
<span style="font-size:12px;color:#666;">zile</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RIGHT: SITTERS -->
|
||||
<div class="card">
|
||||
<h3>👥 Sitters</h3>
|
||||
<div class="body">
|
||||
<div class="form-row">
|
||||
<label>Sitter 1 (UID)</label>
|
||||
<div class="field">
|
||||
<input type="number" name="sitter1" value="<?php echo (int)$user['sit1']; ?>">
|
||||
<span class="sitter-link"><?php echo $sitter1 ? '→ <a href="admin.php?p=player&uid='.$sitter1['id'].'">'.htmlspecialchars($sitter1['username']).'</a>' : 'No Sitter'; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>Sitter 2 (UID)</label>
|
||||
<div class="field">
|
||||
<input type="number" name="sitter2" value="<?php echo (int)$user['sit2']; ?>">
|
||||
<span class="sitter-link"><?php echo $sitter2 ? '→ <a href="admin.php?p=player&uid='.$sitter2['id'].'">'.htmlspecialchars($sitter2['username']).'</a>' : 'No Sitter'; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- STATISTICS -->
|
||||
<div class="card">
|
||||
<h3>📊 Statistics & Points</h3>
|
||||
<div class="body">
|
||||
<div class="grid-2">
|
||||
<div class="form-row"><label>🏛️ Culture Points</label><div class="field"><input type="number" name="cp" value="<?php echo round($user['cp']); ?>"></div></div>
|
||||
<div class="form-row"><label>⚔️ Attack Points</label><div class="field"><input type="number" name="off" value="<?php echo (int)$user['ap']; ?>"></div></div>
|
||||
<div class="form-row"><label>🛡️ Defence Points</label><div class="field"><input type="number" name="def" value="<?php echo (int)$user['dp']; ?>"></div></div>
|
||||
<div class="form-row"><label>💎 Resources Raided</label><div class="field"><input type="number" name="res" value="<?php echo (int)$user['RR']; ?>"></div></div>
|
||||
<div class="form-row"><label>⚔️ Total Attack</label><div class="field"><input type="number" name="ooff" value="<?php echo (int)$user['apall']; ?>"></div></div>
|
||||
<div class="form-row"><label>🛡️ Total Defence</label><div class="field"><input type="number" name="odef" value="<?php echo (int)$user['dpall']; ?>"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="admin.php?p=player&uid=<?php echo $id; ?>" class="btn btn-back">← Back</a>
|
||||
<button type="submit" name="save" class="btn btn-save">💾 Save Changes</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
@@ -2,11 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editAdminInfo.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editAdminInfo.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : editAli.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$aid = isset($_GET['aid']) ? (int)$_GET['aid'] : 0;
|
||||
if($aid) {
|
||||
$alidata = $database->getAlliance($aid);
|
||||
$members = $database->getAllMember($aid);
|
||||
if(!$alidata){ echo "<div style='padding:30px'>Alliance not found</div>"; return; }
|
||||
|
||||
// calculeaza max dupa ambasada ca fallback
|
||||
$embLevel = 0;
|
||||
$embQ = mysqli_query($GLOBALS["link"], "SELECT MAX(level) as lvl FROM ".TB_PREFIX."bdata b JOIN ".TB_PREFIX."vdata v ON v.wref=b.wid WHERE v.owner=".(int)$alidata['leader']." AND b.type=18");
|
||||
if($r = mysqli_fetch_assoc($embQ)) $embLevel = (int)$r['lvl'];
|
||||
$calcMax = max(3, $embLevel * 3);
|
||||
?>
|
||||
<style>
|
||||
.editAli-wrap{max-width:900px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.editAli-head{background:linear-gradient(#fff,#f2f2f2);border:1px solid #c9c9c9;border-radius:5px;padding:14px 16px;margin-bottom:12px;}
|
||||
.editAli-head h2{margin:0;font-size:20px;color:#222;}
|
||||
.editAli-head h2 span{color:#71D000;}
|
||||
.card{background:#fff;border:1px solid #d5d5d5;border-radius:4px;margin-bottom:12px;overflow:hidden;}
|
||||
.card h3{margin:0;padding:8px 12px;background:#f7f7f7;border-bottom:1px solid #e0e0e0;font-size:13px;text-transform:uppercase;color:#444;}
|
||||
.card .body{padding:14px;}
|
||||
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
|
||||
@media(max-width:700px){.form-grid{grid-template-columns:1fr;}}
|
||||
.form-row{margin-bottom:12px;}
|
||||
.form-row label{display:block;font-size:12px;font-weight:bold;color:#333;margin-bottom:4px;}
|
||||
.form-row input[type=text], .form-row select, .form-row input[type=number]{
|
||||
width:100%;box-sizing:border-box;padding:7px 8px;border:1px solid #bbb;border-radius:3px;font-size:13px;
|
||||
}
|
||||
.form-row input:focus, select:focus, textarea:focus{border-color:#71D000;outline:none;box-shadow:0 0 3px rgba(113,208,0,.3);}
|
||||
textarea{width:100%;box-sizing:border-box;min-height:120px;padding:8px;border:1px solid #bbb;border-radius:3px;font-family:Verdana,Arial;font-size:12px;resize:vertical;}
|
||||
.btn-save{background:linear-gradient(#7ed321,#5eae0f);border:1px solid #4a8a0c;color:#fff;padding:9px 26px;font-size:14px;font-weight:bold;border-radius:4px;cursor:pointer;}
|
||||
.btn-save:hover{filter:brightness(1.05);}
|
||||
.actions{text-align:center;margin-top:16px;}
|
||||
.hint{font-size:11px;color:#777;margin-top:3px;}
|
||||
</style>
|
||||
|
||||
<div class="editAli-wrap">
|
||||
<div class="editAli-head">
|
||||
<h2>✏️ Edit Alliance: <span><?php echo htmlspecialchars($alidata['tag']); ?></span> - <?php echo htmlspecialchars($alidata['name']); ?></h2>
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/editAli.php" method="POST">
|
||||
<input type="hidden" name="aid" value="<?php echo $aid; ?>">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
|
||||
<div class="card">
|
||||
<h3>⚙️ Basic Settings</h3>
|
||||
<div class="body">
|
||||
<div class="form-grid">
|
||||
<div class="form-row">
|
||||
<label>Alliance Tag (max 8)</label>
|
||||
<input type="text" name="tag" maxlength="8" value="<?php echo htmlspecialchars($alidata['tag']); ?>" required>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>Alliance Name</label>
|
||||
<input type="text" name="name" maxlength="25" value="<?php echo htmlspecialchars($alidata['name']); ?>" required>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>👑 Leader (Founder)</label>
|
||||
<select name="leader">
|
||||
<?php foreach($members as $m){
|
||||
$sel = $m['id']==$alidata['leader'] ? 'selected' : '';
|
||||
echo '<option value="'.$m['id'].'" '.$sel.'>'.htmlspecialchars($m['username']).'</option>';
|
||||
} ?>
|
||||
</select>
|
||||
<div class="hint">Schimbă fondatorul alianței</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>👥 Max Members</label>
|
||||
<input type="number" name="max" min="3" max="60" value="<?php echo (int)($alidata['max'] ? $alidata['max'] : $calcMax); ?>">
|
||||
<div class="hint">Calculat automat: <?php echo $calcMax; ?> (Ambasada lvl <?php echo $embLevel; ?> × 3)</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>📢 Alliance Notice (apare sus)</h3>
|
||||
<div class="body">
|
||||
<textarea name="notice" placeholder="Mesaj scurt pentru membri..."><?php echo htmlspecialchars($alidata['notice']); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>📖 Alliance Description (pagina publică)</h3>
|
||||
<div class="body">
|
||||
<textarea name="desc" style="min-height:200px;" placeholder="Descriere lungă, BBCode permis..."><?php echo htmlspecialchars($alidata['desc']); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<button type="submit" class="btn-save">💾 Save Alliance</button>
|
||||
<a href="admin.php?p=alliance&aid=<?php echo $aid; ?>" style="margin-left:12px;color:#555;text-decoration:none;">← Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
} // <- închide if($aid)
|
||||
?>
|
||||
@@ -2,11 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editExtraSet.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editExtraSet.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
|
||||
+154
-194
@@ -2,210 +2,170 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editHero.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editHero.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if(isset($_GET['uid'])){
|
||||
$id = (int) $_GET['uid'];
|
||||
$hid = (int) $_GET['hid'];
|
||||
include_once("../GameEngine/Data/hero_full.php");
|
||||
include_once("../GameEngine/Units.php");
|
||||
$heroes = $units->Hero($id,1);
|
||||
$id = (int)$_GET['uid'];
|
||||
$hid = (int)$_GET['hid'];
|
||||
include_once("../GameEngine/Data/hero_full.php");
|
||||
include_once("../GameEngine/Units.php");
|
||||
$heroes = $units->Hero($id,1);
|
||||
|
||||
foreach ($heroes as $hdata) {
|
||||
if ($hdata['heroid'] == $hid) {
|
||||
$hero = $hdata;
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach ($heroes as $hdata) {
|
||||
if ($hdata['heroid'] == $hid) { $hero = $hdata; break; }
|
||||
}
|
||||
|
||||
$unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0);
|
||||
$utribe=($user['tribe']-1)*10;
|
||||
$unarray = array(1=>U1,U2,U3,U4,U5,U6,U7,U8,U9,U10,U11,U12,U13,U14,U15,U16,U17,U18,U19,U20,U21,U22,U23,U24,U25,U26,U27,U28,U29,U30,U31,U32,U33,U34,U35,U36,U37,U38,U39,U40,U41,U42,U43,U44,U45,U46,U47,U48,U49,U50,U99,U0);
|
||||
$utribe = ($user['tribe']-1)*10;
|
||||
?>
|
||||
<style>
|
||||
td {
|
||||
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black;
|
||||
}
|
||||
th {
|
||||
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black;
|
||||
}
|
||||
.thead {
|
||||
background-image:url(../img/un/a/c2.gif); background-repeat:repeat; text-align:center; font-weight:bold;
|
||||
}
|
||||
.hero-wrap{max-width:1000px;margin:20px auto;font-family:Verdana,Arial;}
|
||||
.hero-head{background:linear-gradient(#2c3e50,#1a2530);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between;}
|
||||
.hero-head.left{display:flex;align-items:center;gap:12px;}
|
||||
.hero-head.avatar{width:48px;height:48px;border-radius:50%;background:#fff2;display:flex;align-items:center;justify-content:center;font-size:24px;}
|
||||
.hero-head h2{margin:0;font-size:20px;}
|
||||
.hero-head.lvl{background:#71D000;color:#000;padding:3px 8px;border-radius:12px;font-size:12px;font-weight:bold;margin-left:8px;}
|
||||
|
||||
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
|
||||
@media(max-width:850px){.grid-2{grid-template-columns:1fr;}}
|
||||
|
||||
.card{background:#fff;border:1px solid #d8d8d8;border-radius:6px;overflow:hidden;box-shadow:0 2px 4px rgba(0,0,0,.05);}
|
||||
.card h3{margin:0;padding:10px 14px;background:#f5f7fa;border-bottom:1px solid #e5e7eb;font-size:13px;text-transform:uppercase;color:#374151;letter-spacing:.5px;}
|
||||
.card.body{padding:14px;}
|
||||
|
||||
.form-row{display:flex;align-items:center;margin-bottom:12px;gap:10px;}
|
||||
.form-row label{width:130px;font-size:12px;color:#374151;font-weight:600;}
|
||||
.form-row.field{flex:1;}
|
||||
.form-row input[type=text],.form-row select{width:100%;padding:7px 9px;border:1px solid #cbd5e1;border-radius:4px;font-size:13px;}
|
||||
.form-row input:focus, select:focus{border-color:#71D000;outline:none;box-shadow:0 0 0 2px rgba(113,208,0,.2);}
|
||||
|
||||
.stat-table{width:100%;border-collapse:separate;border-spacing:0 6px;}
|
||||
.stat-table th{background:#f9fafb;padding:8px;font-size:11px;text-transform:uppercase;color:#6b7280;text-align:left;border-bottom:1px solid #e5e7eb;}
|
||||
.stat-table td{background:#fff;padding:10px;border-top:1px solid #f1f5f9;border-bottom:1px solid #f1f5f9;vertical-align:middle;}
|
||||
.stat-table td:first-child{border-left:1px solid #f1f5f9;border-radius:6px 0 0 6px;font-weight:600;color:#1f2937;}
|
||||
.stat-table td:last-child{border-right:1px solid #f1f5f9;border-radius:0 6px 6px 0;text-align:center;}
|
||||
|
||||
.ctrl{display:flex;align-items:center;justify-content:center;gap:8px;}
|
||||
.btn-step{width:28px;height:28px;border-radius:50%;border:1px solid #d1d5db;background:#fff;cursor:pointer;font-weight:bold;font-size:16px;line-height:1;display:flex;align-items:center;justify-content:center;transition:.15s;}
|
||||
.btn-step:hover{background:#71D000;color:#fff;border-color:#71D000;}
|
||||
.btn-step:disabled{opacity:.4;cursor:not-allowed;}
|
||||
.val-box{min-width:36px;text-align:center;font-weight:bold;font-size:15px;color:#111;}
|
||||
|
||||
.unit-preview{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:4px;}
|
||||
|
||||
.actions{display:flex;justify-content:space-between;margin-top:18px;}
|
||||
.btn{padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;border:1px solid;text-decoration:none;}
|
||||
.btn-save{background:linear-gradient(#22c55e,#16a34a);border-color:#15803d;color:#fff;}
|
||||
.btn-back{background:#f3f4f6;border-color:#d1d5db;color:#374151;}
|
||||
</style>
|
||||
<script LANGUAGE="JavaScript">
|
||||
<script>
|
||||
function changeValue(u,c) {
|
||||
var objv=document.getElementById(c);
|
||||
var objd=document.getElementById(c+'2');
|
||||
var obje=document.getElementById('exp1');
|
||||
n=objv.value;
|
||||
l=document.frmHero.hlvl.value;
|
||||
e=document.frmHero.exp.value;
|
||||
if (u==0) {
|
||||
if (n<5){
|
||||
v=0;
|
||||
}else{
|
||||
v=n-5;
|
||||
if (l>0){
|
||||
l-=1;
|
||||
}else if (v==0 && l==0) {
|
||||
obje.innerHTML='5';
|
||||
document.frmHero.exp.value='5';
|
||||
}
|
||||
}
|
||||
var objv=document.getElementById(c);
|
||||
var objd=document.getElementById(c+'2');
|
||||
var obje=document.getElementById('exp1');
|
||||
var n=parseInt(objv.value)||0;
|
||||
var l=parseInt(document.frmHero.hlvl.value)||0;
|
||||
var e=parseInt(document.frmHero.exp.value)||0;
|
||||
var v=n;
|
||||
if(u==0){ v = n<5?0:n-5; if(l>0 && n>=5) l--; else if(v==0 && l==0){ obje.innerHTML='5'; document.frmHero.exp.value='5'; } }
|
||||
if(u==1){ v = n>95?100:n+5; if(e!=0){ obje.innerHTML='0'; document.frmHero.exp.value='0'; } else if(l<99) l++; }
|
||||
|
||||
}
|
||||
if (u==1) {
|
||||
if (n>95){
|
||||
v=100;
|
||||
}else{
|
||||
if(e!=0) {
|
||||
obje.innerHTML='0';
|
||||
document.frmHero.exp.value='0';
|
||||
}else{
|
||||
if (l<99) l++;
|
||||
}
|
||||
v=parseInt(n) + 5;
|
||||
}
|
||||
}
|
||||
if (v>0) document.getElementById(c+'0').innerHTML="<a href=\"#\" onclick=\"return changeValue(0,'"+c+"')\">(-)</a>";
|
||||
if (v<99) document.getElementById(c+'1').innerHTML="<a href=\"#\" onclick=\"return changeValue(1,'"+c+"')\">(+)</a>";
|
||||
if (v<1) document.getElementById(c+'0').innerHTML="<font color=\"grey\">(-)</font>";
|
||||
if (v>98) document.getElementById(c+'1').innerHTML="<font color=\"grey\">(+)</font>";
|
||||
document.getElementById("hlvl").innerHTML=l;
|
||||
objd.innerHTML=v;
|
||||
objv.value=v;
|
||||
document.frmHero.hlvl.value=l;
|
||||
return(true);
|
||||
document.getElementById(c+'0').innerHTML = v>0? "<button type='button' class='btn-step' onclick=\"return changeValue(0,'"+c+"')\">−</button>" : "<button type='button' class='btn-step' disabled>−</button>";
|
||||
document.getElementById(c+'1').innerHTML = v<99? "<button type='button' class='btn-step' onclick=\"return changeValue(1,'"+c+"')\">+</button>" : "<button type='button' class='btn-step' disabled>+</button>";
|
||||
|
||||
document.getElementById("hlvl").innerHTML=l;
|
||||
objd.innerHTML=v;
|
||||
objv.value=v;
|
||||
document.frmHero.hlvl.value=l;
|
||||
return false;
|
||||
}
|
||||
function go_url(url) {
|
||||
location=url;
|
||||
return(false);
|
||||
}
|
||||
function check_unit(el) {
|
||||
var obj=el;
|
||||
var uname=obj.options[obj.options.selectedIndex].text;
|
||||
document.getElementById("unt").innerHTML=""+
|
||||
"<span><img class=\"unit u"+obj.value+"\" src=\"img/x.gif\" alt=\""+uname+"\" title=\""+uname+"\" /></span>";
|
||||
function check_unit(el){
|
||||
var uname=el.options[el.selectedIndex].text;
|
||||
document.getElementById("unt").innerHTML="<img class=\"unit u"+el.value+"\" src=\"img/x.gif\" alt=\""+uname+"\" title=\""+uname+"\" />";
|
||||
}
|
||||
function go_url(url){ location=url; return false; }
|
||||
</script>
|
||||
<form name="frmHero" action="../GameEngine/Admin/Mods/editHero.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<input type="hidden" name="hid" value="<?php echo $hid; ?>" />
|
||||
<table style="border-collapse:collapse; margin-top:25px; line-height:16px; width:100%;">
|
||||
<tr>
|
||||
<td colspan="6" align="center"><b>Edit Player Hero</b></td>
|
||||
</tr>
|
||||
|
||||
<tr class="thead">
|
||||
<td width="30%">Details</td>
|
||||
<td width="35%" colspan="2">Old Value</td>
|
||||
<td width="35%" colspan="3">New Value</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hero Name</td>
|
||||
<td colspan="2"><?php echo $hero['name'];?></td>
|
||||
<td colspan="3"><input name="hname" class="fm" value="<?php echo $hero['name'];?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hero Level</td>
|
||||
<td colspan="2"><?php echo $hero['level']; ?></td>
|
||||
<td colspan="3" style="font-weight:bold"><div id="hlvl">0</div><input name="hlvl" type="hidden" value="0"</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hero Unit</td>
|
||||
<td colspan="2"><?php echo "<img class=\"unit u".$hero['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($hero['unit'])."\" title=\"".$technology->getUnitName($hero['unit'])."\" /> (".$technology->getUnitName($hero['unit']); ?>)</td>
|
||||
<td width="10%" align="center" style="border-right:none"><div id="unt"><?php echo "<img class=\"unit u".$hero['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($hero['unit'])."\" title=\"".$technology->getUnitName($hero['unit'])."\" />";?></div></td>
|
||||
<td width="25%" colspan="2" style="border-left:none" align="left"><select name="hunit" class="dropdown" onchange="check_unit(this)">
|
||||
<?php
|
||||
for ($i=1;$i<7;$i++) {
|
||||
if (($i==3 && $user['tribe']==4) || ($i==4 && $user['tribe']!=3)) {
|
||||
}else{
|
||||
echo "<option value='".($utribe+$i)."'".($hero['unit'] == ($utribe+$i)? 'selected':'').">".$unarray[($utribe+$i)]."</option>\<br>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="thead">
|
||||
<td>Items</td>
|
||||
<td width="18%">Point</td>
|
||||
<td width="17%">Level</td>
|
||||
<td colspan="3" width="35%">Level</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Offence</td>
|
||||
<td align="center"><?php echo $hero['atk']; ?></td>
|
||||
<td align="center"><?php echo $hero['attack'];?></td>
|
||||
<td width="10%" align="center" id="hatk0"><font color="grey">(-)</font></td>
|
||||
<td width="10%" align="center" id="hatk1"><a href="#" onclick="return changeValue(1,'hatk')">(+)</a></td>
|
||||
<td width="15%" align="center" style="font-weight:bold"><div id="hatk2">0</div><input id="hatk" name="hatk" type="hidden" value="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Defence</td>
|
||||
<td align="center"><?php echo $hero['di'] . "/" . $hero['dc']; ?></td>
|
||||
<td align="center"><?php echo $hero['defence'];?></td>
|
||||
<td align="center" id="hdef0"><font color="grey">(-)</font></td>
|
||||
<td align="center" id="hdef1"><a href="#" onclick="return changeValue(1,'hdef')">(+)</a></td>
|
||||
<td align="center" style="font-weight:bold"><div id="hdef2">0</div><input id="hdef" name="hdef" type="hidden" value="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Off-Bonus</td>
|
||||
<td align="center"><?php echo ($hero['ob']-1)*100; ?>%</td>
|
||||
<td align="center"><?php echo $hero['attackbonus'];?></td>
|
||||
<td align="center" id="hob0"><font color="grey">(-)</font></td>
|
||||
<td align="center" id="hob1"><a href="#" onclick="return changeValue(1,'hob')">(+)</a></td>
|
||||
<td align="center" style="font-weight:bold"><div id="hob2">0</div><input id="hob" name="hob" type="hidden" value="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Def-Bonus</td>
|
||||
<td align="center"><?php echo ($hero['db']-1)*100; ?>%</td>
|
||||
<td align="center"><?php echo $hero['defencebonus'];?></td>
|
||||
<td align="center" id="hdb0"><font color="grey">(-)</font></td>
|
||||
<td align="center" id="hdb1"><a href="#" onclick="return changeValue(1,'hdb')">(+)</a></td>
|
||||
<td align="center" style="font-weight:bold"><div id="hdb2">0</div><input id="hdb" name="hdb" type="hidden" value="0"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Regeneration</td>
|
||||
<td align="center"><?php echo ($hero['regeneration']*5*SPEED); ?>/Day</font></td>
|
||||
<td align="center"><?php echo $hero['regeneration'];?></td>
|
||||
<td align="center" id="hrege0"><font color="grey">(-)</font></td>
|
||||
<td align="center" id="hrege1"><a href="#" onclick="return changeValue(1,'hrege')">(+)</a></td>
|
||||
<td align="center" style="font-weight:bold"><div id="hrege2">0</div><input id="hrege" name="hrege" type="hidden" value="0"></td>
|
||||
<tr>
|
||||
<?php
|
||||
$count_level_exp=500-intval($hero['attack']+$hero['defence']+$hero['attackbonus']+$hero['defencebonus']+$hero['regeneration']);
|
||||
if ($hero['points']>$count_level_exp) $hero['points']=$count_level_exp;
|
||||
if($hero['experience'] < 495000){ ?>
|
||||
<td>Experience</td>
|
||||
<td colspan="2" align="center"><?php echo (int) (($hero['experience'] - $hero_levels[$hero['level']]) / ($hero_levels[$hero['level']+1] - $hero_levels[$hero['level']])*100) ?>% (
|
||||
<?php echo $hero['points']; ?>)</td>
|
||||
<?php }else{ ?>
|
||||
<td>Experience</td>
|
||||
<td colspan="2" align="center">100% (<?php echo $hero['points']; ?>)</td>
|
||||
<?php } ?>
|
||||
<td align="center" style="font-weight:bold" colspan="3"><div id="exp1">5</div><input id="exp" name="exp" type="hidden" value="5"></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Health</td>
|
||||
<td colspan="2" align="center"><?php echo round($hero['health']);?>%</td>
|
||||
<td colspan="3" align="center"><input name="hhealth" class="fm fm40" maxlength="3" value="<?php echo round($hero['health']);?>">%</td>
|
||||
</tr>
|
||||
<tr class="thead">
|
||||
<td style="border-right:none" align="left"><input name="back" type="image" id="btn_back" class="dynamic_img" src="img/x.gif" value="back" alt="back" onclick="return go_url('../Admin/admin.php?p=player&uid=<?php echo $_GET["uid"];?>')" /></td>
|
||||
<td style="border-left:none" colspan="5" align="right"><input name="save" type="image" id="btn_save" class="dynamic_img" src="img/x.gif" value="save" alt="save" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
if(isset($_GET['e'])){
|
||||
echo '<div align="center"><font color="Red"><b>Please fill hero name</font></b></div>';
|
||||
}
|
||||
?>
|
||||
<div class="hero-wrap">
|
||||
<div class="hero-head">
|
||||
<div class="left">
|
||||
<div class="avatar">🦸</div>
|
||||
<div>
|
||||
<h2><?php echo htmlspecialchars($hero['name']);?> <span class="lvl">Lv <?php echo $hero['level'];?></span></h2>
|
||||
<div style="font-size:12px;opacity:.8;">Player: <a href="admin.php?p=player&uid=<?php echo $id;?>" style="color:#9ae6b4;"><?php echo htmlspecialchars($user['username']);?></a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div><img class="unit u<?php echo $hero['unit'];?>" src="img/x.gif" alt=""></div>
|
||||
</div>
|
||||
|
||||
<form name="frmHero" action="../GameEngine/Admin/Mods/editHero.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id'];?>">
|
||||
<input type="hidden" name="id" value="<?php echo $id;?>" />
|
||||
<input type="hidden" name="hid" value="<?php echo $hid;?>" />
|
||||
<input name="hlvl" type="hidden" value="0">
|
||||
|
||||
<div class="grid-2">
|
||||
<div class="card">
|
||||
<h3>📝 Basic Info</h3>
|
||||
<div class="body">
|
||||
<div class="form-row"><label>Hero Name</label><div class="field"><input name="hname" type="text" value="<?php echo htmlspecialchars($hero['name']);?>"></div></div>
|
||||
<div class="form-row"><label>Hero Unit</label><div class="field">
|
||||
<div class="unit-preview"><span id="unt"><img class="unit u<?php echo $hero['unit'];?>" src="img/x.gif"></span>
|
||||
<select name="hunit" onchange="check_unit(this)" style="flex:1;border:none;background:transparent;">
|
||||
<?php for($i=1;$i<7;$i++){ if(($i==3&&$user['tribe']==4)||($i==4&&$user['tribe']!=3))continue; $v=$utribe+$i; echo "<option value='$v'".($hero['unit']==$v?' selected':'').">".$unarray[$v]."</option>"; }?>
|
||||
</select></div>
|
||||
</div></div>
|
||||
<div class="form-row"><label>❤️ Health</label><div class="field"><input name="hhealth" type="text" value="<?php echo round($hero['health']);?>" style="width:80px;"> %</div></div>
|
||||
<div class="form-row"><label>✨ Experience</label><div class="field"><b><span id="exp1">5</span>%</b> <input id="exp" name="exp" type="hidden" value="5"></div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>📈 Current Stats</h3>
|
||||
<div class="body" style="font-size:12px;line-height:1.8;">
|
||||
<div>Level: <b><?php echo $hero['level'];?></b> | Points: <b><?php echo $hero['atk']+$hero['di']+$hero['dc'];?></b></div>
|
||||
<div>Offence: <b><?php echo $hero['atk'];?></b> (Lv <?php echo $hero['attack'];?>)</div>
|
||||
<div>Defence: <b><?php echo $hero['di']."/".$hero['dc'];?></b> (Lv <?php echo $hero['defence'];?>)</div>
|
||||
<div>Off-Bonus: <b><?php echo ($hero['ob']-1)*100;?>%</b> | Def-Bonus: <b><?php echo ($hero['db']-1)*100;?>%</b></div>
|
||||
<div>Regen: <b><?php echo $hero['regeneration']*5*SPEED;?>/day</b></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>⚔️ Add Points</h3>
|
||||
<div class="body">
|
||||
<table class="stat-table">
|
||||
<thead><tr><th>Attribute</th><th style="width:80px;text-align:center;">Current</th><th style="width:120px;text-align:center;">Add</th><th style="width:60px;text-align:center;">New</th></tr></thead>
|
||||
<tbody>
|
||||
<?php $attrs=[['hatk','Offence',$hero['attack']],['hdef','Defence',$hero['defence']],['hob','Off-Bonus',$hero['attackbonus']],['hdb','Def-Bonus',$hero['defencebonus']],['hrege','Regeneration',$hero['regeneration']]];
|
||||
foreach($attrs as $a){ echo '<tr><td>'.$a[1].'</td><td style="text-align:center;">'.$a[2].'</td><td><div class="ctrl"><span id="'.$a[0].'0"><button type="button" class="btn-step" disabled>−</button></span><div class="val-box" id="'.$a[0].'2">0</div><span id="'.$a[0].'1"><button type="button" class="btn-step" onclick="return changeValue(1,\''.$a[0].'\')">+</button></span></div></td><td><input id="'.$a[0].'" name="'.$a[0].'" type="hidden" value="0"><span id="'.$a[0].'2v">0</span></td></tr>'; }?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div style="text-align:center;margin-top:10px;font-size:12px;">Level nou: <b><span id="hlvl">0</span></b></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="admin.php?p=player&uid=<?php echo $id;?>" class="btn btn-back" onclick="return go_url(this.href)">← Back</a>
|
||||
<button type="submit" class="btn btn-save">💾 Save Hero</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
if(isset($_GET['e'])){ echo '<div style="text-align:center;color:red;margin-top:10px;"><b>Please fill hero name</b></div>'; }
|
||||
?>
|
||||
@@ -2,11 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editLogSet.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editLogSet.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editNewFunctions.tpl ##
|
||||
## Developed by: velhbxtyrj ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editNewFunctions.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : velhbxtyrj (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
@@ -2,11 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editNewsboxSet.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editNewsboxSet.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
|
||||
@@ -2,51 +2,102 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editOverall.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editOverall.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
$id = (int)($_GET['uid'] ?? 0);
|
||||
$uid = $id;
|
||||
if($id){
|
||||
?>
|
||||
<style>
|
||||
.over-wrap{max-width:700px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.over-head{background:linear-gradient(135deg,#7c3aed,#5b21b6);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;gap:12px;}
|
||||
.over-head .icon{font-size:28px;background:rgba(255,255,255,.15);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
|
||||
.over-head h2{margin:0;font-size:18px;}
|
||||
.over-head h2 a{color:#fff;text-decoration:none;}
|
||||
.over-head .sub{font-size:12px;opacity:.85;margin-top:2px;}
|
||||
|
||||
$id = $_GET['uid'];
|
||||
$uid = $_GET['uid'];
|
||||
if(isset($id))
|
||||
{
|
||||
?>
|
||||
<form action="../GameEngine/Admin/Mods/editOverall.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<br />
|
||||
<table id="profile" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit Overall Attack and Defence Points For: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Edit Attack Points</td>
|
||||
<td>
|
||||
<input class="fm" name="off" value="<?php echo $user['apall']; ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit Defence Points</td>
|
||||
<td>
|
||||
<input class="fm" name="def" value="<?php echo $user['dpall']; ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
<center><input type="image" value="submit" src="../img/admin/b/ok1.gif"></center>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
.card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
|
||||
.card .body{padding:20px;}
|
||||
.info{background:#f5f3ff;border:1px solid #ddd6fe;border-radius:5px;padding:10px 12px;font-size:12px;color:#5b21b6;margin-bottom:16px;}
|
||||
|
||||
.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
|
||||
@media(max-width:600px){.stats-grid{grid-template-columns:1fr;}}
|
||||
.stat-box{border:1px solid #e2e8f0;border-radius:8px;padding:18px;text-align:center;background:#fafafa;transition:.2s;}
|
||||
.stat-box:hover{transform:translateY(-2px);box-shadow:0 4px 8px rgba(0,0,0,.06);}
|
||||
.stat-box.off{border-top:3px solid #dc2626;background:#fef2f2;}
|
||||
.stat-box.def{border-top:3px solid #2563eb;background:#eff6ff;}
|
||||
.stat-box .icon{font-size:32px;margin-bottom:8px;}
|
||||
.stat-box .label{font-size:13px;font-weight:600;color:#475569;margin-bottom:4px;text-transform:uppercase;letter-spacing:.5px;}
|
||||
.stat-box .current{font-size:11px;color:#64748b;margin-bottom:10px;}
|
||||
.stat-box input{width:140px;padding:10px;border:1px solid #cbd5e1;border-radius:5px;font-size:18px;font-weight:bold;text-align:center;font-family:monospace;}
|
||||
.stat-box input:focus{outline:none;box-shadow:0 0 0 3px rgba(124,58,237,.15);}
|
||||
.stat-box.off input:focus{border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.15);}
|
||||
.stat-box.def input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15);}
|
||||
|
||||
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding-top:14px;border-top:1px solid #e5e7eb;}
|
||||
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
|
||||
.btn-back:hover{background:#e5e7eb;}
|
||||
.btn-save{background:linear-gradient(#7c3aed,#5b21b6);border:1px solid #4c1d95;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;}
|
||||
.btn-save:hover{filter:brightness(1.05);}
|
||||
</style>
|
||||
|
||||
<div class="over-wrap">
|
||||
<div class="over-head">
|
||||
<div class="icon">⚔️</div>
|
||||
<div>
|
||||
<h2>Overall Points: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
|
||||
<div class="sub">UID: <?php echo $uid; ?> • Rank: #<?php echo (int)$user['rank']; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/editOverall.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>">
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>">
|
||||
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<div class="info">🛡️ Acestea sunt punctele <b>totale</b> din statistici (nu cele săptămânale). Se adună din toate atacurile.</div>
|
||||
|
||||
<div class="stats-grid">
|
||||
<div class="stat-box off">
|
||||
<div class="icon">⚔️</div>
|
||||
<div class="label">Attack Points</div>
|
||||
<div class="current">Current: <?php echo number_format($user['apall']); ?></div>
|
||||
<input type="number" name="off" value="<?php echo (int)$user['apall']; ?>" min="0" step="1">
|
||||
</div>
|
||||
|
||||
<div class="stat-box def">
|
||||
<div class="icon">🛡️</div>
|
||||
<div class="label">Defence Points</div>
|
||||
<div class="current">Current: <?php echo number_format($user['dpall']); ?></div>
|
||||
<input type="number" name="def" value="<?php echo (int)$user['dpall']; ?>" min="0" step="1">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back">← Back</a>
|
||||
<button type="submit" class="btn-save">💾 Save Points</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
@@ -1,45 +1,109 @@
|
||||
<?php
|
||||
if(isset($_GET['uid']))
|
||||
{
|
||||
$user = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT * FROM ".TB_PREFIX."users WHERE id = ".(int) $_GET['uid']."")); ?>
|
||||
<form action="../GameEngine/Admin/Mods/editPassword.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" id="uid" value="<?php echo $_GET['uid']; ?>">
|
||||
|
||||
<table id="profile" cellpadding="1" cellspacing="1" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>New Password</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Password</th>
|
||||
<td>
|
||||
<input type="text" style="width: 80%;" class="fm" name="newpw" value="new password">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<center>
|
||||
<input type="image" value="submit" src="../img/admin/b/ok1.gif" title="Edit Location">
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form><?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : editPassword.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if(isset($_GET['uid'])) {
|
||||
$uid = (int)$_GET['uid'];
|
||||
$user = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT id, username, email FROM ".TB_PREFIX."users WHERE id = $uid"));
|
||||
if(!$user){ include("404.tpl"); return; }
|
||||
?>
|
||||
<style>
|
||||
.pw-wrap{max-width:600px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.pw-head{background:linear-gradient(135deg,#dc2626,#991b1b);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;gap:12px;}
|
||||
.pw-head .icon{font-size:28px;background:rgba(255,255,255,.15);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
|
||||
.pw-head h2{margin:0;font-size:18px;}
|
||||
.pw-head h2 a{color:#fff;text-decoration:none;}
|
||||
.pw-head .sub{font-size:12px;opacity:.85;margin-top:2px;}
|
||||
|
||||
.card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
|
||||
.card .body{padding:20px;}
|
||||
.warning{background:#fef2f2;border:1px solid #fecaca;border-radius:5px;padding:10px 12px;font-size:12px;color:#991b1b;margin-bottom:16px;display:flex;gap:8px;align-items:flex-start;}
|
||||
|
||||
.form-group{margin-bottom:16px;}
|
||||
.form-group label{display:block;font-size:12px;font-weight:600;color:#374151;margin-bottom:6px;}
|
||||
.input-wrap{position:relative;display:flex;align-items:center;}
|
||||
.input-wrap input{width:100%;padding:10px 40px 10px 12px;border:1px solid #d1d5db;border-radius:5px;font-size:14px;font-family:monospace;box-sizing:border-box;}
|
||||
.input-wrap input:focus{border-color:#dc2626;outline:none;box-shadow:0 0 0 3px rgba(220,38,38,.15);}
|
||||
.toggle-eye{position:absolute;right:8px;background:none;border:none;cursor:pointer;font-size:18px;color:#6b7280;padding:4px;}
|
||||
.btn-gen{background:#f3f4f6;border:1px solid #d1d5db;color:#374151;padding:6px 12px;border-radius:4px;font-size:12px;cursor:pointer;margin-top:6px;}
|
||||
.btn-gen:hover{background:#e5e7eb;}
|
||||
|
||||
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding-top:14px;border-top:1px solid #e5e7eb;}
|
||||
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
|
||||
.btn-back:hover{background:#e5e7eb;}
|
||||
.btn-save{background:linear-gradient(#dc2626,#b91c1c);border:1px solid #991b1b;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;box-shadow:0 1px 2px rgba(0,0,0,.1);}
|
||||
.btn-save:hover{filter:brightness(1.05);}
|
||||
</style>
|
||||
<script>
|
||||
function togglePw(){
|
||||
const i = document.getElementById('newpw');
|
||||
i.type = i.type === 'password' ? 'text' : 'password';
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
function genPw(){
|
||||
const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789!@#';
|
||||
let pw = '';
|
||||
for(let i=0;i<12;i++) pw += chars.charAt(Math.floor(Math.random()*chars.length));
|
||||
document.getElementById('newpw').value = pw;
|
||||
document.getElementById('newpw').type = 'text';
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="pw-wrap">
|
||||
<div class="pw-head">
|
||||
<div class="icon">🔐</div>
|
||||
<div>
|
||||
<h2>Change Password: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
|
||||
<div class="sub">UID: <?php echo $uid; ?> • <?php echo htmlspecialchars($user['email']); ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/editPassword.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>">
|
||||
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<div class="warning">
|
||||
<span>⚠️</span>
|
||||
<div><b>Atenție:</b> Parola se schimbă instant. Jucătorul va fi delogat. Nu se trimite email automat.</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="newpw">New Password</label>
|
||||
<div class="input-wrap">
|
||||
<input type="text" id="newpw" name="newpw" value="" placeholder="Introdu parola nouă" autocomplete="new-password" required>
|
||||
<button type="button" class="toggle-eye" onclick="togglePw()" title="Show/Hide">👁️</button>
|
||||
</div>
|
||||
<button type="button" class="btn-gen" onclick="genPw()">🎲 Generează parolă sigură</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back">← Back</a>
|
||||
<button type="submit" class="btn-save">🔐 Change Password</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
+115
-83
@@ -1,89 +1,121 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editPlus.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editPlus.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$id = $_GET['uid'];
|
||||
$uid = $_GET['uid'];
|
||||
if(isset($id))
|
||||
{
|
||||
?>
|
||||
<form action="../GameEngine/Admin/Mods/editPlus.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<br>
|
||||
<p>Adding the value in days it is delivered to the already existing value. In order to remove the bonus it is necessary to put a minus value.</p>
|
||||
<br>
|
||||
<table id="profile">
|
||||
<tbody>
|
||||
<td class="details">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Plus and Resource Bonuses for: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php include("playerplusbonus.tpl"); ?>
|
||||
<tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
<table id="profile" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit Plus & Bonus</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Give Plus Bonus</td>
|
||||
<td>
|
||||
<input class="fm" name="plus" value="0" style="width: 60%;"> Days
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Give +25% Wood</td>
|
||||
<td>
|
||||
<input class="fm" name="wood" value="0" style="width: 60%;"> Days
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Give +25% Clay</td>
|
||||
<td>
|
||||
<input class="fm" name="clay" value="0" style="width: 60%;"> Days
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Give +25% Iron</td>
|
||||
<td>
|
||||
<input class="fm" name="iron" value="0" style="width: 60%;"> Days
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Give +25% Crop</td>
|
||||
<td>
|
||||
<input class="fm" name="crop" value="0" style="width: 60%;"> Days
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
<center><input type="image" value="submit" src="../img/admin/b/ok1.gif"></center>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
$id = (int)($_GET['uid']?? 0);
|
||||
$uid = $id;
|
||||
if($id){
|
||||
?>
|
||||
<style>
|
||||
.plus-wrap{max-width:900px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.plus-head{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;justify-content:space-between;align-items:center;}
|
||||
.plus-head h2{margin:0;font-size:20px;}.plus-head h2 a{color:#fff;}
|
||||
.card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;margin-bottom:14px;box-shadow:0 1px 3px rgba(0,0,0,.05);}
|
||||
.card h3{margin:0;padding:10px 14px;background:#f9fafb;border-bottom:1px solid #e5e7eb;font-size:13px;text-transform:uppercase;color:#374151;}
|
||||
.card.body{padding:14px;}
|
||||
.info-box{background:#fffbeb;border:1px solid #fde68a;border-radius:4px;padding:10px;font-size:12px;color:#92400e;margin-bottom:12px;}
|
||||
|
||||
/* NOU: grid frumos pentru bonusuri active */
|
||||
.active-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;}
|
||||
.active-item{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:10px;text-align:center;}
|
||||
.active-item.name{font-size:12px;font-weight:600;color:#334155;margin-bottom:4px;}
|
||||
.active-item.time{font-size:13px;font-weight:bold;color:#0f172a;}
|
||||
.active-item.icon{font-size:20px;margin-bottom:4px;}
|
||||
.active-item.plus{border-color:#fbbf24;background:#fffbeb;}
|
||||
.active-item.wood{border-color:#16a34a;background:#f0fdf4;}
|
||||
.active-item.clay{border-color:#ea580c;background:#fff7ed;}
|
||||
.active-item.iron{border-color:#64748b;background:#f8fafc;}
|
||||
.active-item.crop{border-color:#eab308;background:#fefce8;}
|
||||
.active-item.none{opacity:.5;}
|
||||
|
||||
.bonus-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;}
|
||||
.bonus-item{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:12px;text-align:center;transition:.2s;}
|
||||
.bonus-item.icon{font-size:26px;}
|
||||
.bonus-item input{width:70px;text-align:center;padding:5px;margin-top:6px;border:1px solid #cbd5e1;border-radius:4px;font-weight:bold;}
|
||||
.bonus-item input:focus{border-color:#f59e0b;outline:none;box-shadow:0 0 0 2px rgba(245,158,11,.2);}
|
||||
|
||||
/* BUTOANE CA LA HERO */
|
||||
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding-top:14px;border-top:1px solid #e5e7eb;}
|
||||
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
|
||||
.btn-back:hover{background:#e5e7eb;}
|
||||
.btn-save{background:linear-gradient(#22c55e,#16a34a);border:1px solid #15803d;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;box-shadow:0 1px 2px rgba(0,0,0,.1);}
|
||||
.btn-save:hover{filter:brightness(1.05);}
|
||||
</style>
|
||||
|
||||
<div class="plus-wrap">
|
||||
<div class="plus-head">
|
||||
<h2>⭐ Plus & Bonuses: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
|
||||
<div>UID: <?php echo $uid;?></div>
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/editPlus.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id'];?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid;?>">
|
||||
<input type="hidden" name="id" value="<?php echo $id;?>">
|
||||
|
||||
<div class="info-box">ℹ️ The values add up. Put 5 to add 5 days.</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>📊 Current Active Bonuses</h3>
|
||||
<div class="body">
|
||||
<div class="active-grid">
|
||||
<?php
|
||||
// Citim datele direct din DB ca să nu mai depindem de playerplusbonus.tpl urât
|
||||
$p = $database->getUserField($uid, 'plus', 0);
|
||||
$b = [
|
||||
'plus' => ['Plus','⭐',$p],
|
||||
'b1' => ['Wood','🌲',$database->getUserField($uid,'b1',0)],
|
||||
'b2' => ['Clay','🧱',$database->getUserField($uid,'b2',0)],
|
||||
'b3' => ['Iron','⛏️',$database->getUserField($uid,'b3',0)],
|
||||
'b4' => ['Crop','🌾',$database->getUserField($uid,'b4',0)],
|
||||
];
|
||||
foreach($b as $k=>$v){
|
||||
$end = (int)$v[2];
|
||||
$left = $end - time();
|
||||
$cls = strtolower($v[0]);
|
||||
if($left > 0){
|
||||
$d = floor($left/86400); $h = floor(($left%86400)/3600); $m = floor(($left%3600)/60);
|
||||
echo "<div class='active-item $cls'><div class='icon'>{$v[1]}</div><div class='name'>{$v[0]}</div><div class='time'>{$d}d {$h}h {$m}m</div></div>";
|
||||
} else {
|
||||
echo "<div class='active-item $cls none'><div class='icon'>{$v[1]}</div><div class='name'>{$v[0]}</div><div class='time'>—</div></div>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>➕ Add / Remove Days</h3>
|
||||
<div class="body">
|
||||
<div class="bonus-grid">
|
||||
<?php $items=['plus'=>['⭐','Travian Plus'],'wood'=>['🌲','+25% Wood'],'clay'=>['🧱','+25% Clay'],'iron'=>['⛏️','+25% Iron'],'crop'=>['🌾','+25% Crop']];
|
||||
foreach($items as $k=>$v){ echo "<div class='bonus-item'><div class='icon'>{$v[0]}</div><div>{$v[1]}</div><input type='number' name='$k' value='0'><div style='font-size:11px;color:#666'>days</div></div>"; }?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back">← Back</a>
|
||||
<button type="submit" class="btn-save">💾 Apply Bonuses</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php } else { include("404.tpl"); }?>
|
||||
@@ -1,13 +1,24 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editPlusSet.tpl ##
|
||||
## Developed by: martinambrus ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2017. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editPlusSet.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : martinambrus (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
@@ -2,46 +2,114 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editProtection.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editProtection.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : aggenkeech (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$id = $_GET['uid'];
|
||||
$uid = $_GET['uid'];
|
||||
$id = (int)($_GET['uid'] ?? 0);
|
||||
$uid = $id;
|
||||
$user = $database->getUserArray($id,1);
|
||||
if(isset($id))
|
||||
{
|
||||
?>
|
||||
<form action="../GameEngine/Admin/Mods/editProtection.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<br />
|
||||
<table id="profile" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit Protection For: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Give Protection For</td>
|
||||
<td>
|
||||
<input class="fm" name="protect" value="0" style="width: 60%;"> Days
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
<center><input type="image" value="submit" src="../img/admin/b/ok1.gif"></center>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
if($id && $user){
|
||||
$now = time();
|
||||
$prot = (int)$user['protect'];
|
||||
$isActive = $prot > $now;
|
||||
$ends = $isActive ? date('d.m.Y H:i', $prot) : 'Expired';
|
||||
$left = $isActive ? ceil(($prot - $now)/86400) : 0;
|
||||
?>
|
||||
<style>
|
||||
.prot-wrap{max-width:550px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.prot-head{background:linear-gradient(135deg,#0ea5e9,#0284c7);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;gap:12px;}
|
||||
.prot-head .icon{font-size:28px;background:rgba(255,255,255,.15);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
|
||||
.prot-head h2{margin:0;font-size:18px;}
|
||||
.prot-head h2 a{color:#fff;text-decoration:none;}
|
||||
.prot-head .sub{font-size:12px;opacity:.85;margin-top:2px;}
|
||||
|
||||
.card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
|
||||
.card .body{padding:20px;}
|
||||
|
||||
.status-box{text-align:center;padding:16px;border-radius:6px;margin-bottom:18px;border:1px solid;}
|
||||
.status-box.active{background:#ecfdf5;border-color:#a7f3d0;color:#065f46;}
|
||||
.status-box.expired{background:#fef2f2;border-color:#fecaca;color:#991b1b;}
|
||||
.status-box .label{font-size:12px;text-transform:uppercase;font-weight:600;opacity:.8;}
|
||||
.status-box .date{font-size:18px;font-weight:bold;margin:4px 0;}
|
||||
.status-box .left{font-size:12px;}
|
||||
|
||||
.input-group{display:flex;align-items:center;justify-content:center;gap:10px;margin:18px 0;}
|
||||
.input-group input{width:100px;padding:10px;border:2px solid #cbd5e1;border-radius:5px;font-size:18px;font-weight:bold;text-align:center;}
|
||||
.input-group input:focus{outline:none;border-color:#0ea5e9;box-shadow:0 0 0 3px rgba(14,165,233,.2);}
|
||||
.input-group span{font-size:14px;color:#475569;font-weight:600;}
|
||||
|
||||
.quick-btns{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-bottom:10px;}
|
||||
.quick-btns button{background:#f1f5f9;border:1px solid #cbd5e1;padding:5px 10px;border-radius:4px;font-size:12px;cursor:pointer;}
|
||||
.quick-btns button:hover{background:#e2e8f0;}
|
||||
|
||||
.info{background:#eff6ff;border:1px solid #bfdbfe;border-radius:5px;padding:10px;font-size:12px;color:#1e40af;text-align:center;}
|
||||
|
||||
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding-top:14px;border-top:1px solid #e5e7eb;}
|
||||
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;}
|
||||
.btn-save{background:linear-gradient(#0ea5e9,#0284c7);border:1px solid #0369a1;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;}
|
||||
</style>
|
||||
<script>
|
||||
function setDays(d){ document.getElementById('protect').value = d; }
|
||||
</script>
|
||||
|
||||
<div class="prot-wrap">
|
||||
<div class="prot-head">
|
||||
<div class="icon">🛡️</div>
|
||||
<div>
|
||||
<h2>Protection: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
|
||||
<div class="sub">UID: <?php echo $uid; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/editProtection.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>">
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>">
|
||||
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<div class="status-box <?php echo $isActive ? 'active' : 'expired'; ?>">
|
||||
<div class="label">Current Status</div>
|
||||
<div class="date"><?php echo $isActive ? 'ACTIVE' : 'EXPIRED'; ?></div>
|
||||
<div class="left">Ends: <?php echo $ends; ?><?php if($isActive) echo " ($left days left)"; ?></div>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<input type="number" id="protect" name="protect" value="0" min="0" max="365">
|
||||
<span>Days</span>
|
||||
</div>
|
||||
|
||||
<div class="quick-btns">
|
||||
<button type="button" onclick="setDays(1)">+1 day</button>
|
||||
<button type="button" onclick="setDays(3)">+3 days</button>
|
||||
<button type="button" onclick="setDays(7)">+7 days</button>
|
||||
<button type="button" onclick="setDays(0)">Remove</button>
|
||||
</div>
|
||||
|
||||
<div class="info">💡 Pune 0 ca să scoți protecția. Protecția se adaugă de la momentul salvării.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back">← Back</a>
|
||||
<button type="submit" class="btn-save">💾 Save Protection</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
@@ -1,81 +1,90 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editResources.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editResources.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : aggenkeech (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$id = $_GET['did'];
|
||||
if(isset($id))
|
||||
{
|
||||
$coor = $database->getCoor($village['wref']);
|
||||
//$varray = $database->getProfileVillages($village['owner']);
|
||||
//$type = $database->getVillageType($village['wref']);
|
||||
//$fdata = $database->getResourceLevel($village['wref']);
|
||||
$id = (int)$_GET['did'];
|
||||
if($id){
|
||||
$coor = $database->getCoor($village['wref']);
|
||||
include("search2.tpl"); ?>
|
||||
<style>
|
||||
.res-wrap{font-family:system-ui;max-width:600px;margin:12px auto}
|
||||
.res-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.06)}
|
||||
.res-head{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:12px 16px;font-weight:600;font-size:14px}
|
||||
.res-table{width:100%;border-collapse:collapse}
|
||||
.res-table thead td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;font-weight:600;padding:8px 12px;border-bottom:1px solid #e5e7eb}
|
||||
.res-table tbody td{padding:10px 12px;border-bottom:1px solid #f1f5f9;font-size:13px}
|
||||
.res-table tbody tr:last-child td{border-bottom:0}
|
||||
.res-name{display:flex;align-items:center;gap:8px;font-weight:500;color:#334155}
|
||||
.res-name img{width:18px;height:18px}
|
||||
.res-input{width:100%;padding:7px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:13px;box-sizing:border-box}
|
||||
.res-input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
|
||||
.res-actions{display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:#f8fafc;border-top:1px solid #e5e7eb}
|
||||
.btn-back{color:#64748b;text-decoration:none;font-size:13px}
|
||||
.btn-back:hover{color:#0f172a}
|
||||
.btn-save{background:#2563eb;color:#fff;border:0;padding:8px 16px;border-radius:8px;font-weight:600;cursor:pointer;font-size:13px}
|
||||
.btn-save:hover{background:#1d4ed8}
|
||||
</style>
|
||||
|
||||
include("search2.tpl"); ?>
|
||||
<form action="../GameEngine/Admin/Mods/editResources.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="did" id="did" value="<?php echo $_GET['did']; ?>">
|
||||
<br />
|
||||
|
||||
<table id="member" cellpadding="1" cellspacing="1" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4">Modify Resources</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="on">Resource</td>
|
||||
<td class="hab">Amount</td>
|
||||
<td class="hab">Maximum Capacity</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="on"><img src="../img/admin/r/1.gif"> Wood</td>
|
||||
<td class="hab"><input class="fm" name="wood" value="<?php echo round($village['wood'], 0); ?>"></td>
|
||||
<td rowspan="3" class="hab">
|
||||
<input class="fm" name="maxstore" value="<?php echo round($village['maxstore'], 0); ?>">
|
||||
</tr>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="on"><img src="../img/admin/r/2.gif"> Clay</td>
|
||||
<td class="hab">
|
||||
<input class="fm" name="clay" value="<?php echo round($village['clay'], 0); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="on"><img src="../img/admin/r/3.gif"> Iron</td>
|
||||
<td class="hab">
|
||||
<input class="fm" name="iron" value="<?php echo round($village['iron'], 0); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="on"><img src="../img/admin/r/4.gif"> Crop</td>
|
||||
<td class="hab">
|
||||
<input class="fm" name="crop" value="<?php echo round($village['crop'], 0); ?>">
|
||||
</td>
|
||||
<td class="hab">
|
||||
<input class="fm" name="maxcrop" value="<?php echo round($village['maxcrop'], 0); ?>">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
<table id="ejas" border="0" width="100%">
|
||||
<tr><td align="left"><a href="../Admin/admin.php?p=village&did=<?php echo $_GET['did'];?>"><< back</a></td>
|
||||
<td align="right"><input type="image" border="0" src="../img/admin/b/ok1.gif"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form><?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
<div class="res-wrap">
|
||||
<form action="../GameEngine/Admin/Mods/editResources.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="did" value="<?php echo $id; ?>">
|
||||
|
||||
<div class="res-card">
|
||||
<div class="res-head">Modify Resources — <?php echo $village['name']; ?> (<?php echo $coor['x']; ?>|<?php echo $coor['y']; ?>)</div>
|
||||
|
||||
<table class="res-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width:140px">Resource</td>
|
||||
<td>Amount</td>
|
||||
<td style="width:160px">Maximum Capacity</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><div class="res-name"><img src="../img/admin/r/1.gif"> Wood</div></td>
|
||||
<td><input class="res-input" name="wood" value="<?php echo round($village['wood'],0); ?>"></td>
|
||||
<td rowspan="3"><input class="res-input" name="maxstore" value="<?php echo round($village['maxstore'],0); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="res-name"><img src="../img/admin/r/2.gif"> Clay</div></td>
|
||||
<td><input class="res-input" name="clay" value="<?php echo round($village['clay'],0); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="res-name"><img src="../img/admin/r/3.gif"> Iron</div></td>
|
||||
<td><input class="res-input" name="iron" value="<?php echo round($village['iron'],0); ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><div class="res-name"><img src="../img/admin/r/4.gif"> Crop</div></td>
|
||||
<td><input class="res-input" name="crop" value="<?php echo round($village['crop'],0); ?>"></td>
|
||||
<td><input class="res-input" name="maxcrop" value="<?php echo round($village['maxcrop'],0); ?>"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="res-actions">
|
||||
<a href="../Admin/admin.php?p=village&did=<?php echo $_GET['did'];?>" class="btn-back">← Back to village</a>
|
||||
<button type="submit" class="btn-save">Save Changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php } else { include("404.tpl"); } ?>
|
||||
@@ -2,11 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editServerSet.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editServerSet.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : ronix (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
|
||||
+105
-69
@@ -2,76 +2,112 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editSitter.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editSitter.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
$id = (int)($_GET['uid'] ?? 0);
|
||||
$uid = $id;
|
||||
if($id){
|
||||
$sitter1 = $user['sit1'] ? $database->getUserArray($user['sit1'], 1) : null;
|
||||
$sitter2 = $user['sit2'] ? $database->getUserArray($user['sit2'], 1) : null;
|
||||
?>
|
||||
<style>
|
||||
.sit-wrap{max-width:700px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.sit-head{background:linear-gradient(135deg,#0ea5e9,#0284c7);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;gap:12px;}
|
||||
.sit-head .icon{font-size:28px;background:rgba(255,255,255,.15);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
|
||||
.sit-head h2{margin:0;font-size:18px;}
|
||||
.sit-head h2 a{color:#fff;text-decoration:none;}
|
||||
.sit-head .sub{font-size:12px;opacity:.85;margin-top:2px;}
|
||||
|
||||
$id = $_GET['uid'];
|
||||
$uid = $_GET['uid'];
|
||||
if(isset($id))
|
||||
{
|
||||
?>
|
||||
<form action="../GameEngine/Admin/Mods/editSitter.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<br />
|
||||
<p>To change sitters, you must use their "uid" you can find this using the search. Delete a sitter, put 0 as sitter.</p>
|
||||
<br />
|
||||
<table id="profile" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit Sitters For: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Sitter 1</td>
|
||||
<td>
|
||||
<input class="fm" name="sitter1" value="<?php echo $user['sit1']; ?>"><br />
|
||||
<?php
|
||||
$sitter1 = $database->getUserArray($user['sit1'], 1);
|
||||
if($user['sit1'] ==0)
|
||||
{
|
||||
echo 'No Sitter';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a href="admin.php?p=player&uid='.$sitter1['id'].'">'.$sitter1['username'].'</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sitter 2</td>
|
||||
<td>
|
||||
<input class="fm" name="sitter2" value="<?php echo $user['sit2']; ?>"><br />
|
||||
<?php
|
||||
$sitter2 = $database->getUserArray($user['sit2'], 1);
|
||||
if($user['sit2'] ==0)
|
||||
{
|
||||
echo 'No Sitter';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<a href="admin.php?p=player&uid='.$sitter2['id'].'">'.$sitter2['username'].'</a>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
<center><input type="image" value="submit" src="../img/admin/b/ok1.gif"></center>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
.card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);margin-bottom:14px;overflow:hidden;}
|
||||
.card h3{margin:0;padding:10px 14px;background:#f9fafb;border-bottom:1px solid #e5e7eb;font-size:13px;text-transform:uppercase;color:#374151;}
|
||||
.card .body{padding:16px;}
|
||||
.info{background:#eff6ff;border:1px solid #bfdbfe;border-radius:5px;padding:10px 12px;font-size:12px;color:#1e40af;margin-bottom:14px;}
|
||||
|
||||
.sitter-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
|
||||
@media(max-width:600px){.sitter-grid{grid-template-columns:1fr;}}
|
||||
.sitter-box{border:1px solid #e2e8f0;border-radius:6px;padding:14px;background:#f8fafc;}
|
||||
.sitter-box h4{margin:0 0 10px;font-size:13px;color:#334155;display:flex;align-items:center;gap:6px;}
|
||||
.sitter-box input{width:100%;padding:8px;border:1px solid #cbd5e1;border-radius:4px;font-size:14px;text-align:center;font-weight:bold;box-sizing:border-box;}
|
||||
.sitter-box input:focus{border-color:#0ea5e9;outline:none;box-shadow:0 0 0 2px rgba(14,165,233,.2);}
|
||||
.sitter-current{margin-top:8px;font-size:12px;text-align:center;min-height:20px;}
|
||||
.sitter-current a{color:#0284c7;text-decoration:none;font-weight:600;}
|
||||
.sitter-current a:hover{text-decoration:underline;}
|
||||
.sitter-current.none{color:#94a3b8;font-style:italic;}
|
||||
.btn-clear{background:#fee2e2;border:1px solid #fca5a5;color:#b91c1c;padding:4px 8px;border-radius:3px;font-size:11px;cursor:pointer;margin-top:6px;}
|
||||
.btn-clear:hover{background:#fecaca;}
|
||||
|
||||
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding-top:14px;border-top:1px solid #e5e7eb;}
|
||||
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
|
||||
.btn-back:hover{background:#e5e7eb;}
|
||||
.btn-save{background:linear-gradient(#0ea5e9,#0284c7);border:1px solid #0369a1;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;}
|
||||
.btn-save:hover{filter:brightness(1.05);}
|
||||
</style>
|
||||
<script>
|
||||
function clearSitter(n){ document.getElementById('sit'+n).value = '0'; }
|
||||
</script>
|
||||
|
||||
<div class="sit-wrap">
|
||||
<div class="sit-head">
|
||||
<div class="icon">👥</div>
|
||||
<div>
|
||||
<h2>Edit Sitters: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
|
||||
<div class="sub">UID: <?php echo $uid; ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/editSitter.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>">
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>">
|
||||
|
||||
<div class="card">
|
||||
<h3>⚙️ Sitter Settings</h3>
|
||||
<div class="body">
|
||||
<div class="info">💡 Folosește UID-ul jucătorului. Pune <b>0</b> ca să ștergi sitter-ul. Găsești UID-ul din Search.</div>
|
||||
|
||||
<div class="sitter-grid">
|
||||
<div class="sitter-box">
|
||||
<h4>👤 Sitter 1</h4>
|
||||
<input type="number" id="sit1" name="sitter1" value="<?php echo (int)$user['sit1']; ?>" min="0">
|
||||
<div class="sitter-current <?php echo $sitter1 ? '' : 'none'; ?>">
|
||||
<?php if($sitter1){ echo '→ <a href="admin.php?p=player&uid='.$sitter1['id'].'">'.htmlspecialchars($sitter1['username']).'</a> (UID '.$sitter1['id'].')'; } else { echo 'No Sitter'; } ?>
|
||||
</div>
|
||||
<?php if($sitter1){ echo '<div style="text-align:center"><button type="button" class="btn-clear" onclick="clearSitter(1)">✕ Remove</button></div>'; } ?>
|
||||
</div>
|
||||
|
||||
<div class="sitter-box">
|
||||
<h4>👤 Sitter 2</h4>
|
||||
<input type="number" id="sit2" name="sitter2" value="<?php echo (int)$user['sit2']; ?>" min="0">
|
||||
<div class="sitter-current <?php echo $sitter2 ? '' : 'none'; ?>">
|
||||
<?php if($sitter2){ echo '→ <a href="admin.php?p=player&uid='.$sitter2['id'].'">'.htmlspecialchars($sitter2['username']).'</a> (UID '.$sitter2['id'].')'; } else { echo 'No Sitter'; } ?>
|
||||
</div>
|
||||
<?php if($sitter2){ echo '<div style="text-align:center"><button type="button" class="btn-clear" onclick="clearSitter(2)">✕ Remove</button></div>'; } ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back">← Back</a>
|
||||
<button type="submit" class="btn-save">💾 Save Sitters</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
+186
-161
@@ -2,169 +2,194 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## Reworked: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editUser.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$id = $_GET['uid'];
|
||||
if(isset($id))
|
||||
{
|
||||
$varray = $database->getProfileVillages($id);
|
||||
$varmedal = $database->getProfileMedal($id); ?>
|
||||
|
||||
<style type="text/css">
|
||||
select.dropdown
|
||||
{
|
||||
border: 1px solid #71D000;
|
||||
margin: 0;
|
||||
padding: 1px 1px;
|
||||
width: 90%;
|
||||
}
|
||||
</style>
|
||||
<form action="../GameEngine/Admin/Mods/editUser.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<table id="profile" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Details</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="details">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th>Tribe</th>
|
||||
<td>
|
||||
<select name="tribe" class="dropdown">
|
||||
<option value="1" <?php if($user['tribe'] == 1) { echo "selected='selected'"; } else {} ?>>Roman</option>
|
||||
<option value="2" <?php if($user['tribe'] == 2) { echo "selected='selected'"; } else {} ?>>Teuton</option>
|
||||
<option value="3" <?php if($user['tribe'] == 3) { echo "selected='selected'"; } else {} ?>>Gaul</option>
|
||||
<option value="4" <?php if($user['tribe'] == 4) { echo "selected='selected'"; } else {} ?>>Nature</option>
|
||||
<option value="5" <?php if($user['tribe'] == 5) { echo "selected='selected'"; } else {} ?>>Natars</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<td><input class="fm" name="location" value="<?php echo $user['location']; ?>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>E-mail</th><td><input class="fm" name="email" value="<?php echo $user['email']; ?>"></td></tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<th>Quest</th><td><input class="fm" name="quest" value="<?php echo $user['quest']; ?>"></td></tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=player&uid=<?php echo $user['id']; ?>"><span class="rn2" >»</span> Go back</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="desc2"><textarea cols="25" rows="14" tabindex="1" name="desc1"><?php echo $user['desc1']; ?></textarea></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="desc1">
|
||||
<textarea tabindex="8" cols="30" rows="20" name="desc2"><?php echo $user['desc2']; ?></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table cellspacing="1" cellpadding="2" id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="4">Medals</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Category</td>
|
||||
<td>Rank</td>
|
||||
<td>Week</td>
|
||||
<td>BB-Code</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($varmedal as $medal)
|
||||
{
|
||||
$titel="Bonus";
|
||||
switch ($medal['categorie'])
|
||||
{
|
||||
case "1":
|
||||
$titel="Attacker of the Week";
|
||||
break;
|
||||
case "2":
|
||||
$titel="Defender of the Week";
|
||||
break;
|
||||
case "3":
|
||||
$titel="Climber of the week";
|
||||
break;
|
||||
case "4":
|
||||
$titel="Robber of the week";
|
||||
break;
|
||||
}
|
||||
echo"
|
||||
<tr>
|
||||
<td> ".$titel."</td>
|
||||
<td>".$medal['plaats']."</td>
|
||||
<td>".$medal['week']."</td>
|
||||
<td>[#".$medal['id']."]</td>
|
||||
</tr>";
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td>Beginners Protection</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>[#0]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<center>
|
||||
<input type="image" src="../img/admin/b/ok1.gif" value="submit">
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form><?php
|
||||
$id = (int)$_GET['uid'];
|
||||
if(isset($id) && $id > 0) {
|
||||
$varray = $database->getProfileVillages($id);
|
||||
$varmedal = $database->getProfileMedal($id);
|
||||
$uid = $id;
|
||||
?>
|
||||
<style>
|
||||
.editUser-wrap { max-width:1100px; margin:0 auto; font-family:Verdana,Arial; }
|
||||
.editUser-head {
|
||||
background: linear-gradient(#f8f8f8,#e9e9e9);
|
||||
border:1px solid #c0c0c0; padding:10px 14px; margin-bottom:12px;
|
||||
border-radius:4px; display:flex; align-items:center; justify-content:space-between;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<br /><br />Not found. <a href=\"javascript: history.go(-1)\"> Go Back</a>";
|
||||
.editUser-head h2 { margin:0; font-size:18px; color:#333; }
|
||||
.editUser-head h2 a { color:#71D000; text-decoration:none; }
|
||||
.editUser-head .meta { font-size:12px; color:#666; }
|
||||
.editUser-grid { display:grid; grid-template-columns: 380px 1fr; gap:12px; }
|
||||
@media(max-width:900px){ .editUser-grid{grid-template-columns:1fr;} }
|
||||
|
||||
.card { background:#fff; border:1px solid #d0d0d0; border-radius:4px; box-shadow:0 1px 2px rgba(0,0,0,.05); overflow:hidden; }
|
||||
.card h3 { margin:0; padding:8px 12px; background:#f0f0f0; border-bottom:1px solid #d0d0d0; font-size:13px; text-transform:uppercase; color:#444; letter-spacing:.5px; }
|
||||
.card .body { padding:12px; }
|
||||
|
||||
.form-row { display:flex; margin-bottom:10px; align-items:center; }
|
||||
.form-row label { width:110px; font-size:12px; color:#333; font-weight:bold; }
|
||||
.form-row input.fm, .form-row select.dropdown { flex:1; border:1px solid #bbb; padding:5px 6px; font-size:12px; border-radius:3px; background:#fff; }
|
||||
.form-row input.fm:focus, select.dropdown:focus { border-color:#71D000; outline:none; box-shadow:0 0 3px rgba(113,208,0,.4); }
|
||||
select.dropdown { width:100%; }
|
||||
|
||||
.username-row { background:#f9fff0; border:1px solid #d4edaa; border-radius:3px; padding:8px; margin-bottom:12px; }
|
||||
.username-row .form-row { margin-bottom:0; }
|
||||
.btn-mini { background:linear-gradient(#7ed321,#5eae0f); border:1px solid #4a8a0c; color:#fff; padding:5px 10px; font-size:11px; font-weight:bold; border-radius:3px; cursor:pointer; margin-left:6px; }
|
||||
.btn-mini:hover { filter:brightness(1.05); }
|
||||
|
||||
.desc-box textarea { width:100%; box-sizing:border-box; border:1px solid #bbb; border-radius:3px; padding:6px; font-family:Consolas,monospace; font-size:12px; resize:vertical; }
|
||||
.desc-box textarea:focus { border-color:#71D000; outline:none; }
|
||||
|
||||
.medals-table { width:100%; border-collapse:collapse; font-size:12px; }
|
||||
.medals-table th { background:#f5f5f5; padding:6px; border:1px solid #ddd; text-align:left; }
|
||||
.medals-table td { padding:6px; border:1px solid #eee; }
|
||||
.medals-table tr:nth-child(even){ background:#fafafa; }
|
||||
.badge { display:inline-block; padding:2px 6px; border-radius:3px; font-size:11px; color:#fff; }
|
||||
.badge.att { background:#c00; } .badge.def { background:#069; } .badge.climb { background:#e67e00; } .badge.rob { background:#6a0dad; }
|
||||
|
||||
.actions { margin-top:14px; text-align:center; }
|
||||
.btn-save { background:linear-gradient(#7ed321,#5eae0f); border:1px solid #4a8a0c; color:#fff; padding:8px 24px; font-size:14px; font-weight:bold; border-radius:4px; cursor:pointer; text-shadow:0 -1px 0 rgba(0,0,0,.2); }
|
||||
.btn-save:hover { filter:brightness(1.05); }
|
||||
.back-link { font-size:12px; margin-left:12px; }
|
||||
.back-link a { color:#0066cc; text-decoration:none; }
|
||||
.back-link a:hover { text-decoration:underline; }
|
||||
</style>
|
||||
|
||||
<div class="editUser-wrap">
|
||||
<div class="editUser-head">
|
||||
<h2>✏️ Edit Player: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo htmlspecialchars($user['username']); ?></a></h2>
|
||||
<div class="meta">ID: <?php echo $id; ?> | Villages: <?php echo count($varray); ?> | Gold: <?php echo $user['gold']; ?> <img src="../img/x.gif" class="gold" style="vertical-align:-2px;"></div>
|
||||
</div>
|
||||
|
||||
<div class="editUser-grid">
|
||||
<!-- LEFT: DETAILS -->
|
||||
<div class="card">
|
||||
<h3>👤 Account Details</h3>
|
||||
<div class="body">
|
||||
|
||||
<!-- USERNAME EDIT - NOU -->
|
||||
<div class="username-row">
|
||||
<form action="../GameEngine/Admin/Mods/editUsername.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>">
|
||||
<div class="form-row">
|
||||
<label>👤 Username</label>
|
||||
<input class="fm" name="username" value="<?php echo htmlspecialchars($user['username']); ?>" style="flex:1;">
|
||||
<button type="submit" class="btn-mini" title="Change Username">💾 Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- RESTUL FORMULUI PRINCIPAL -->
|
||||
<form action="../GameEngine/Admin/Mods/editUser.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
|
||||
<div class="form-row">
|
||||
<label> ⚔️ Tribe</label>
|
||||
<select name="tribe" class="dropdown">
|
||||
<option value="1" <?php if($user['tribe']==1)echo"selected"; ?>>1. Roman</option>
|
||||
<option value="2" <?php if($user['tribe']==2)echo"selected"; ?>>2. Teuton</option>
|
||||
<option value="3" <?php if($user['tribe']==3)echo"selected"; ?>>3. Gaul</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>📍 Location</label>
|
||||
<input class="fm" name="location" value="<?php echo htmlspecialchars($user['location']); ?>">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>✉️ E-mail</label>
|
||||
<input class="fm" name="email" value="<?php echo htmlspecialchars($user['email']); ?>">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>🎯 Quest</label>
|
||||
<input class="fm" name="quest" value="<?php echo (int)$user['quest']; ?>">
|
||||
</div>
|
||||
|
||||
<div style="margin-top:14px; border-top:1px dashed #ddd; padding-top:10px;">
|
||||
<label style="font-weight:bold; font-size:12px; display:block; margin-bottom:4px;">📝 Profile Description (left)</label>
|
||||
<div class="desc-box">
|
||||
<textarea name="desc1" rows="10"><?php echo htmlspecialchars($user['desc1']); ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- RIGHT: DESCRIPTION -->
|
||||
<div class="card">
|
||||
<h3>📄 Profile Description (right)</h3>
|
||||
<div class="body desc-box">
|
||||
<textarea name="desc2" rows="22"><?php echo htmlspecialchars($user['desc2']); ?></textarea>
|
||||
<div style="font-size:11px; color:#777; margin-top:4px;">Suport BBCode. Folosește Enter pentru linii noi.</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- MEDALS -->
|
||||
<div class="card" style="margin-top:12px;">
|
||||
<h3>🏅 Medals</h3>
|
||||
<div class="body" style="padding:0;">
|
||||
<table class="medals-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:35%;">Category</th>
|
||||
<th style="width:15%;">Rank</th>
|
||||
<th style="width:15%;">Week</th>
|
||||
<th>BB-Code</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach($varmedal as $medal){
|
||||
$titel="Bonus"; $class=""; $icon="⭐";
|
||||
switch($medal['categorie']){
|
||||
case "1": $titel="Attacker of the Week"; $class="att"; $icon="⚔️"; break;
|
||||
case "2": $titel="Defender of the Week"; $class="def"; $icon="🛡️"; break;
|
||||
case "3": $titel="Climber of the Week"; $class="climb"; $icon="📈"; break;
|
||||
case "4": $titel="Robber of the Week"; $class="rob"; $icon="💰"; break;
|
||||
}
|
||||
echo "<tr>
|
||||
<td><span class='badge $class'>$icon</span> $titel</td>
|
||||
<td>#".$medal['plaats']."</td>
|
||||
<td>".$medal['week']."</td>
|
||||
<td><code>[#".$medal['id']."]</code></td>
|
||||
</tr>";
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><span class="badge" style="background:#999;">🔰</span> Beginners Protection</td>
|
||||
<td>-</td><td>-</td><td><code>[#0]</code></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
</form> <!-- închidem form-ul principal aici -->
|
||||
<button type="submit" form="dummy" onclick="document.querySelector('form[action*=\'editUser.php\']').submit()" class="btn-save">💾 Save Changes</button>
|
||||
<span class="back-link"><a href="?p=player&uid=<?php echo $user['id']; ?>">« Go back to player</a></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
echo "<div style='padding:20px; text-align:center;'>❌ Player not found. <a href=\"javascript:history.go(-1)\">Go Back</a></div>";
|
||||
}
|
||||
?>
|
||||
@@ -2,11 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editVillage.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editVillage.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$id = $_GET['did'];
|
||||
|
||||
+104
-50
@@ -2,57 +2,111 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editWeek.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : editWeek.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
$id = (int)($_GET['uid'] ?? 0);
|
||||
$uid = $id;
|
||||
if($id){
|
||||
?>
|
||||
<style>
|
||||
.week-wrap{max-width:800px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.week-head{background:linear-gradient(135deg,#059669,#047857);color:#fff;border-radius:6px;padding:16px 20px;margin-bottom:14px;display:flex;align-items:center;gap:12px;}
|
||||
.week-head .icon{font-size:28px;background:rgba(255,255,255,.15);width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;}
|
||||
.week-head h2{margin:0;font-size:18px;}
|
||||
.week-head h2 a{color:#fff;text-decoration:none;}
|
||||
.week-head .sub{font-size:12px;opacity:.85;margin-top:2px;}
|
||||
|
||||
$id = $_GET['uid'];
|
||||
$uid = $_GET['uid'];
|
||||
if(isset($id))
|
||||
{
|
||||
?>
|
||||
<form action="../GameEngine/Admin/Mods/editWeek.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>" />
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>" />
|
||||
<br />
|
||||
<table id="profile" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit Off, Def, Raid Points This Week For: <a href="admin.php?p=player&uid=<?php echo $user['id']; ?>"><?php echo $user['username']; ?></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Edit Attack Points</td>
|
||||
<td>
|
||||
<input class="fm" name="off" value="<?php echo $user['ap']; ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit Defence Points</td>
|
||||
<td>
|
||||
<input class="fm" name="def" value="<?php echo $user['dp']; ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edit Resources Raided</td>
|
||||
<td>
|
||||
<input class="fm" name="res" value="<?php echo $user['RR']; ?>" style="width: 60%;"> Points
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
<center><input type="image" value="submit" src="../img/admin/b/ok1.gif"></center>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
.card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
|
||||
.card .body{padding:20px;}
|
||||
.info{background:#ecfdf5;border:1px solid #a7f3d0;border-radius:5px;padding:10px 12px;font-size:12px;color:#065f46;margin-bottom:16px;}
|
||||
|
||||
.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;}
|
||||
@media(max-width:700px){.stats-grid{grid-template-columns:1fr;}}
|
||||
.stat-box{border:1px solid #e2e8f0;border-radius:8px;padding:16px;text-align:center;background:#fafafa;transition:.2s;}
|
||||
.stat-box:hover{transform:translateY(-2px);box-shadow:0 4px 8px rgba(0,0,0,.06);}
|
||||
.stat-box.off{border-top:3px solid #dc2626;background:#fef2f2;}
|
||||
.stat-box.def{border-top:3px solid #2563eb;background:#eff6ff;}
|
||||
.stat-box.raid{border-top:3px solid #d97706;background:#fffbeb;}
|
||||
.stat-box .icon{font-size:28px;margin-bottom:6px;}
|
||||
.stat-box .label{font-size:12px;font-weight:600;color:#475569;margin-bottom:3px;text-transform:uppercase;}
|
||||
.stat-box .current{font-size:11px;color:#64748b;margin-bottom:8px;}
|
||||
.stat-box input{width:120px;padding:8px;border:1px solid #cbd5e1;border-radius:5px;font-size:16px;font-weight:bold;text-align:center;font-family:monospace;}
|
||||
.stat-box input:focus{outline:none;}
|
||||
.stat-box.off input:focus{border-color:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.15);}
|
||||
.stat-box.def input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15);}
|
||||
.stat-box.raid input:focus{border-color:#d97706;box-shadow:0 0 0 3px rgba(217,119,6,.15);}
|
||||
|
||||
.actions{display:flex;justify-content:space-between;align-items:center;margin-top:20px;padding-top:14px;border-top:1px solid #e5e7eb;}
|
||||
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:9px 18px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
|
||||
.btn-back:hover{background:#e5e7eb;}
|
||||
.btn-save{background:linear-gradient(#059669,#047857);border:1px solid #065f46;color:#fff;padding:9px 20px;border-radius:5px;font-size:13px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:6px;}
|
||||
.btn-save:hover{filter:brightness(1.05);}
|
||||
</style>
|
||||
|
||||
<div class="week-wrap">
|
||||
<div class="week-head">
|
||||
<div class="icon">📅</div>
|
||||
<div>
|
||||
<h2>Weekly Stats: <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a></h2>
|
||||
<div class="sub">UID: <?php echo $uid; ?> • Reset săptămânal</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/editWeek.php" method="POST">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $uid; ?>">
|
||||
<input type="hidden" name="id" value="<?php echo $id; ?>">
|
||||
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<div class="info">📊 Acestea sunt punctele <b>din săptămâna curentă</b> pentru top 10. Se resetează automat.</div>
|
||||
|
||||
<div class="stats-grid">
|
||||
<div class="stat-box off">
|
||||
<div class="icon">⚔️</div>
|
||||
<div class="label">Attack</div>
|
||||
<div class="current">Now: <?php echo number_format($user['ap']); ?></div>
|
||||
<input type="number" name="off" value="<?php echo (int)$user['ap']; ?>" min="0">
|
||||
</div>
|
||||
|
||||
<div class="stat-box def">
|
||||
<div class="icon">🛡️</div>
|
||||
<div class="label">Defence</div>
|
||||
<div class="current">Now: <?php echo number_format($user['dp']); ?></div>
|
||||
<input type="number" name="def" value="<?php echo (int)$user['dp']; ?>" min="0">
|
||||
</div>
|
||||
|
||||
<div class="stat-box raid">
|
||||
<div class="icon">💰</div>
|
||||
<div class="label">Raid</div>
|
||||
<div class="current">Now: <?php echo number_format($user['RR']); ?></div>
|
||||
<input type="number" name="res" value="<?php echo (int)$user['RR']; ?>" min="0">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="admin.php?p=player&uid=<?php echo $uid;?>" class="btn-back">← Back</a>
|
||||
<button type="submit" class="btn-save">💾 Save Week</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
@@ -1,7 +1,24 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## givePlus.tpl - REDESIGN 2025 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : givePlus.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$id = $_SESSION['id'];
|
||||
?>
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## givePlusRes.tpl - REDESIGN 2025 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : givePlusRes.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$id = $_SESSION['id'];
|
||||
?>
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## gold.tpl - REDESIGN 2025 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : gold.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$id = $_SESSION['id'];
|
||||
@@ -34,7 +49,7 @@ $id = $_SESSION['id'];
|
||||
<svg viewBox="0 0 24 24"><path d="M12 2L9 8H3l5 4-2 6 6-4 6 4-2-6 5-4h-6z"/></svg>
|
||||
</div>
|
||||
<h3>Give Everyone Free Gold</h3>
|
||||
<p>Acest gold va fi adăugat la TOȚI jucătorii activi de pe server.</p>
|
||||
<p>This gold will be added to ALL active players on the server.</p>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/gold.php" method="POST" class="gold-form">
|
||||
<input type="hidden" name="admid" value="<?php echo $id; ?>">
|
||||
@@ -47,6 +62,6 @@ $id = $_SESSION['id'];
|
||||
</div>
|
||||
|
||||
<?php if(isset($_GET['g'])){ ?>
|
||||
<div class="gold-success">✓ Gold a fost adăugat cu succes la toți jucătorii!</div>
|
||||
<div class="gold-success">✓ Gold has been successfully added to all players!</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
+16
-11
@@ -1,19 +1,24 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : home.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Project: TravianZ ##
|
||||
## Version: 22.05.2026 ##
|
||||
## Filename: Admin\Templates\home.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## Refactored by: Shadow ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ##
|
||||
## URLs: https://travianz.org ##
|
||||
## https://github.com/Shadowss/TravianZ ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
|
||||
|
||||
// ---- STATS ----
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## inactive.tpl - FIXED 2025 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : inactive.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
|
||||
global $database;
|
||||
|
||||
|
||||
+106
-44
@@ -1,53 +1,115 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename login.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## Reworked: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : login.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
?>
|
||||
<div align="center">
|
||||
<img src="../img/admin/admin.gif" width="468" height="60" border="0">
|
||||
</div>
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Cinzel:wght@600&display=swap');
|
||||
*{box-sizing:border-box}
|
||||
body{margin:0;background:#0a0f1c;font-family:'Inter',sans-serif;color:#e2e8f0}
|
||||
/* ASCUNDE ELEMENTELE VECHI */
|
||||
body > img[src*="Travian"], img[src*="admin.gif"]{display:none !important}
|
||||
|
||||
<img src="../<?php echo GP_LOCATE; ?>lang/en/t1/login.gif">
|
||||
.login-page{min-height:100vh;display:flex;align-items:flex-start;justify-content:center;padding:60px 20px 20px;position:relative;background:#0a0f1c}
|
||||
.login-page::before{content:"";position:absolute;inset:0;background:url('https://i.imgur.com/8Km9tLL.jpg') center/cover no-repeat;opacity:.25;filter:brightness(.6);z-index:0}
|
||||
.login-page::before{display:none}
|
||||
|
||||
<form method="post" action="admin.php">
|
||||
<input type="hidden" name="action" value="login">
|
||||
<p class="old_p1">
|
||||
<table width="75%" cellspacing="1" cellpadding="0" id="profile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Server Admin Login</th>
|
||||
</td>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Username</td>
|
||||
<td>
|
||||
<input class="fm fm110" type="text" name="name" value="<?php echo (isset($_SESSION['admin_username']) ? $_SESSION['admin_username'] : '')?>" maxlength="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Password:</td>
|
||||
<td>
|
||||
<input class="fm fm110" type="password" name="pw" value="" maxlength="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<center>
|
||||
<input type="image" border="0" src="../img/admin/b/l1.gif" width="80" height="20">
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
||||
<img align="right" src="../<?php echo GP_LOCATE; ?>img/new/background_plus.png" width="500">
|
||||
</form>
|
||||
.login-container{position:relative;z-index:2;width:100%;max-width:420px;margin-top:0}
|
||||
.login-header{text-align:center;margin-bottom:24px}
|
||||
.travian-logo{font-family:'Cinzel',serif;font-size:38px;font-weight:600;color:#fff;letter-spacing:2px;text-shadow:0 0 20px rgba(14,165,233,.6);margin-bottom:8px}
|
||||
.travian-logo span{color:#0ea5e9}
|
||||
.admin-badge{display:inline-flex;align-items:center;gap:6px;background:rgba(14,165,233,.15);border:1px solid rgba(14,165,233,.3);padding:4px 12px;border-radius:20px;font-size:11px;color:#7dd3fc;text-transform:uppercase;letter-spacing:1px}
|
||||
|
||||
.login-card{background:rgba(15,23,42,.9);backdrop-filter:blur(20px);border:1px solid rgba(148,163,184,.15);border-radius:20px;padding:32px;box-shadow:0 25px 50px rgba(0,0,0,.7)}
|
||||
.login-title{text-align:center;margin-bottom:28px}
|
||||
.login-title h2{margin:0;font-size:20px;font-weight:600;color:#fff}
|
||||
.login-title p{margin:6px 0 0;font-size:13px;color:#94a3b8}
|
||||
|
||||
.form-group{margin-bottom:18px}
|
||||
.form-group label{display:block;font-size:12px;color:#cbd5e1;margin-bottom:6px;font-weight:500}
|
||||
.form-input{width:100%;padding:12px 14px;background:#1e293b;border:1px solid #334155;border-radius:10px;color:#f1f5f9;font-size:14px;transition:all .2s}
|
||||
.form-input:focus{outline:none;border-color:#0ea5e9;background:#0f172a;box-shadow:0 0 0 3px rgba(14,165,233,.15)}
|
||||
.form-input::placeholder{color:#64748b}
|
||||
|
||||
.login-btn{width:100%;padding:13px;background:linear-gradient(135deg,#0ea5e9 0%,#0284c7 100%);border:none;border-radius:10px;color:#fff;font-weight:600;font-size:14px;cursor:pointer;transition:all .2s;margin-top:8px;box-shadow:0 4px 14px rgba(2,132,199,.35)}
|
||||
.login-btn:hover{transform:translateY(-1px);box-shadow:0 6px 20px rgba(2,132,199,.45)}
|
||||
.login-btn:active{transform:translateY(0)}
|
||||
|
||||
.login-footer{margin-top:28px;padding-top:20px;border-top:1px solid rgba(148,163,184,.1);text-align:center;font-size:11px;color:#64748b}
|
||||
.login-footer a{color:#38bdf8;text-decoration:none}
|
||||
|
||||
.tribes{display:flex;justify-content:center;gap:24px;margin-top:24px;opacity:.6}
|
||||
.tribe-icon{width:36px;height:36px;border-radius:50%;background:rgba(30,41,59,.8);display:flex;align-items:center;justify-content:center;font-size:18px;border:1px solid rgba(148,163,184,.2)}
|
||||
|
||||
/* CREDIT SHADOW - ELEGANT */
|
||||
.credits{margin-top:22px;text-align:center;font-size:11px;color:#64748b;letter-spacing:.4px;opacity:.9}
|
||||
.credits .shadow{color:#38bdf8;font-weight:700;text-shadow:0 0 12px rgba(56,189,248,.45)}
|
||||
.credits a{color:#7dd3fc;text-decoration:none;border-bottom:1px solid rgba(125,211,252,.25);padding-bottom:1px;transition:all .2s}
|
||||
.credits a:hover{color:#fff;border-bottom-color:#38bdf8;text-shadow:0 0 10px rgba(56,189,248,.7)}
|
||||
</style>
|
||||
|
||||
<div class="login-page">
|
||||
<div class="login-container">
|
||||
<div class="login-header">
|
||||
<div class="travian-logo">TRA<span>VIAN</span>Z</div>
|
||||
<div class="admin-badge">
|
||||
<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10z"/></svg>
|
||||
Admin Control
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login-card">
|
||||
<div class="login-title">
|
||||
<h2>Server Administration</h2>
|
||||
<p>Secure access to TravianZ panel</p>
|
||||
</div>
|
||||
|
||||
<form method="post" action="admin.php">
|
||||
<input type="hidden" name="action" value="login">
|
||||
|
||||
<div class="form-group">
|
||||
<label>Username</label>
|
||||
<input class="form-input" type="text" name="name" value="<?php echo (isset($_SESSION['admin_username']) ? $_SESSION['admin_username'] : '')?>" maxlength="20" placeholder="Enter admin username" autocomplete="username" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Password</label>
|
||||
<input class="form-input" type="password" name="pw" value="" maxlength="20" placeholder="••••••••" autocomplete="current-password" required>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="login-btn">Access Panel</button>
|
||||
</form>
|
||||
|
||||
<div class="login-footer">
|
||||
© 2010-2026 TravianZ Project • v5.0
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tribes">
|
||||
<div class="tribe-icon" title="Romans">⚔️</div>
|
||||
<div class="tribe-icon" title="Teutons">🪓</div>
|
||||
<div class="tribe-icon" title="Gauls">🛡️</div>
|
||||
</div>
|
||||
|
||||
<div class="credits">
|
||||
Admin Panel Redesigned & Refactored by <span class="shadow">Shadow</span> – <a href="https://github.com/Shadowss/TravianZ" target="_blank" rel="noopener">TravianZ Copyright</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,45 +1,80 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename maintenance.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : maintenance.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Shadow (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if(isset($_POST['startMaint_x'])) {
|
||||
$database->setUsersOk(2);
|
||||
$error = "The maintenance has started";
|
||||
}
|
||||
elseif($_POST['removeMaint_x']) {
|
||||
$database->setUsersOk(0);
|
||||
$error = "The maintenance has been removed";
|
||||
global $database;
|
||||
|
||||
$uid = 0;
|
||||
if(isset($_SESSION['id'])) {
|
||||
$uid = (int)$_SESSION['id'];
|
||||
} elseif(isset($GLOBALS['session']->uid)) {
|
||||
$uid = (int)$GLOBALS['session']->uid;
|
||||
}
|
||||
|
||||
if(isset($_POST['startMaint'])) {
|
||||
$database->setMaintenance(1, $uid);
|
||||
$error = "Maintenance ACTIVAT";
|
||||
}
|
||||
if(isset($_POST['removeMaint'])) {
|
||||
$database->setMaintenance(0, $uid);
|
||||
$error = "Maintenance OPRIT";
|
||||
}
|
||||
$maint = $database->getMaintenance();
|
||||
|
||||
$starterName = 'Necunoscut';
|
||||
if($maint['started_by'] > 0){
|
||||
$u = $database->getUserArray($maint['started_by'], 1);
|
||||
$starterName = $u['username'] ?? 'UID '.$maint['started_by'];
|
||||
}
|
||||
?>
|
||||
<form action="../Admin/admin.php?p=maintenance" method="POST">
|
||||
<p><div style="text-align: center;color: red"><?php echo $error; ?></div></p>
|
||||
<table id="member" cellpadding="1" cellspacing="1" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Server Maintenance</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="on">Description</td>
|
||||
<td class="hab">Execute</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="hab">Start a maintenance</td>
|
||||
<td class="hab"><div style="text-align: center"><input name="startMaint" type="image" src="../img/admin/b/ok1.gif"/></div></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hab">Remove a Maintenance</td>
|
||||
<td class="hab"><div style="text-align: center"><input name="removeMaint" type="image" src="../img/admin/b/ok1.gif"></div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<style>
|
||||
.maint-card{max-width:520px;margin:12px auto;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;font-family:system-ui}
|
||||
.maint-head{background:#0f172a;color:#fff;padding:10px 14px;font-weight:600}
|
||||
.maint-status{padding:14px;text-align:center;font-weight:600}
|
||||
.maint-status.on{color:#dc2626;background:#fef2f2}
|
||||
.maint-status.off{color:#16a34a;background:#f0fdf4}
|
||||
.maint-row{display:grid;grid-template-columns:1fr 120px;padding:12px 14px;border-top:1px solid #f1f5f9;align-items:center}
|
||||
.maint-btn{padding:8px;border:0;border-radius:6px;color:#fff;font-weight:500;cursor:pointer;width:100%}
|
||||
.start{background:#16a34a}.stop{background:#dc2626}
|
||||
.maint-info{font-size:12px;color:#64748b;padding:0 14px 10px}
|
||||
.msg{padding:8px 12px;margin:8px auto;max-width:520px;background:#f0fdf4;border:1px solid #bbf7d0;color:#166534;border-radius:6px;font-weight:600}
|
||||
</style>
|
||||
|
||||
<?php if(!empty($error)) echo '<div class="msg">'.$error.'</div>'; ?>
|
||||
|
||||
<form method="POST">
|
||||
<div class="maint-card">
|
||||
<div class="maint-head">Server Maintenance</div>
|
||||
<div class="maint-status <?= $maint['active'] ? 'on' : 'off' ?>">
|
||||
<?= $maint['active'] ? 'ACTIV din '.($maint['started_at'] ? date('H:i d.m.Y',$maint['started_at']) : '-') : 'INACTIV – server deschis' ?>
|
||||
</div>
|
||||
<?php if($maint['active']){ ?>
|
||||
<div class="maint-info">Pornit de: <b><?= htmlspecialchars($starterName) ?></b> (UID: <?= (int)$maint['started_by'] ?>)</div>
|
||||
<?php } ?>
|
||||
<div class="maint-row">
|
||||
<div>Activeaza mentenanta</div>
|
||||
<button type="submit" name="startMaint" class="maint-btn start">Start</button>
|
||||
</div>
|
||||
<div class="maint-row">
|
||||
<div>Dezactiveaza mentenanta</div>
|
||||
<button type="submit" name="removeMaint" class="maint-btn stop">Stop</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -1,7 +1,24 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## MaintenenceResetGold.tpl - REDESIGN 2025 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : maintenenceResetGold.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
?>
|
||||
<style>
|
||||
@@ -23,7 +40,7 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
<div class="resetgold-wrap">
|
||||
<div class="resetgold-head">
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2v10l4-4" stroke="#e74c3c" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="17" r="5" fill="#c0392b"/></svg>
|
||||
<h2>Maintenance</h2>
|
||||
<h2>Reset Gold for all players</h2>
|
||||
</div>
|
||||
|
||||
<div class="resetgold-card">
|
||||
@@ -31,13 +48,13 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
<svg viewBox="0 0 24 24"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>
|
||||
</div>
|
||||
<h3>Reset All Players Gold</h3>
|
||||
<p>Această acțiune va seta gold-ul la <b>0</b> pentru TOȚI jucătorii de pe server.</p>
|
||||
<p>This action will set the gold to <b>0</b> for ALL players from the server.</p>
|
||||
|
||||
<div class="danger-box">
|
||||
⚠️ ATENȚIE: Acțiunea este ireversibilă! Asigură-te că ai backup înainte.
|
||||
⚠️ WARNING: The action is irreversible! Make sure you have backup first.
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/mainteneceResetGold.php" method="POST" class="resetgold-form" onsubmit="return confirm('Ești SIGUR că vrei să resetezi gold-ul la TOȚI jucătorii?');">
|
||||
<form action="../GameEngine/Admin/Mods/mainteneceResetGold.php" method="POST" class="resetgold-form" onsubmit="return confirm('Are you SURE you want to reset gold to ALL players?');">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<button type="submit">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z" stroke="#fff" stroke-width="2" stroke-linecap="round"/></svg>
|
||||
@@ -47,6 +64,6 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
</div>
|
||||
|
||||
<?php if(isset($_GET['g'])){ ?>
|
||||
<div class="resetgold-success">✓ Gold-ul tuturor jucătorilor a fost resetat!</div>
|
||||
<div class="resetgold-success">✓ All players gold has been reset!</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -1,7 +1,24 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## MaintenenceResetPlus.tpl - REDESIGN 2025 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : maintenenceResetPlus.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
?>
|
||||
<style>
|
||||
@@ -23,7 +40,7 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
<div class="resetplus-wrap">
|
||||
<div class="resetplus-head">
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 2v10l4-4" stroke="#8e44ad" stroke-width="2" stroke-linecap="round"/><circle cx="12" cy="17" r="5" fill="#6c3483"/></svg>
|
||||
<h2>Maintenance</h2>
|
||||
<h2>Reset All Players Plus</h2>
|
||||
</div>
|
||||
|
||||
<div class="resetplus-card">
|
||||
@@ -31,13 +48,13 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
<svg viewBox="0 0 24 24"><path d="M12 4v16M4 12h16" stroke="white" stroke-width="3" stroke-linecap="round"/></svg>
|
||||
</div>
|
||||
<h3>Reset All Players Plus</h3>
|
||||
<p>Această acțiune va dezactiva Travian Plus pentru TOȚI jucătorii.</p>
|
||||
<p>This action will disable Travian Plus for ALL players.</p>
|
||||
|
||||
<div class="danger-box">
|
||||
⚠️ Plus-ul va fi setat la 0 zile pentru toată lumea.
|
||||
⚠️ Plus it will be set to 0 days for everyone.
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/mainteneceResetPlus.php" method="POST" class="resetplus-form" onsubmit="return confirm('Ești SIGUR că vrei să resetezi Plus-ul la TOȚI jucătorii?');">
|
||||
<form action="../GameEngine/Admin/Mods/mainteneceResetPlus.php" method="POST" class="resetplus-form" onsubmit="return confirm('Are you SURE you want to reset the Plus to ALL players?');">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<button type="submit">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z" stroke="#fff" stroke-width="2" stroke-linecap="round"/></svg>
|
||||
@@ -47,6 +64,6 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
</div>
|
||||
|
||||
<?php if(isset($_GET['g'])){ ?>
|
||||
<div class="resetplus-success">✓ Plus-ul tuturor jucătorilor a fost resetat!</div>
|
||||
<div class="resetplus-success">✓ Plus all the players have been reset!</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -2,6 +2,26 @@
|
||||
#################################################################################
|
||||
## MaintenenceResetPlusBonus.tpl - REDESIGN 2025 ##
|
||||
#################################################################################
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : maintenenceResetPlusBonus.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
?>
|
||||
<style>
|
||||
@@ -25,7 +45,7 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
<div class="resetres-wrap">
|
||||
<div class="resetres-head">
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 7h16v10H4z" fill="#27ae60"/><path d="M8 3v4M16 3v4" stroke="#16a085" stroke-width="2"/></svg>
|
||||
<h2>Maintenance</h2>
|
||||
<h2>Reset All Resource Bonuses</h2>
|
||||
</div>
|
||||
|
||||
<div class="resetres-card">
|
||||
@@ -33,7 +53,7 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
<svg viewBox="0 0 24 24"><path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5"/></svg>
|
||||
</div>
|
||||
<h3>Reset All Resource Bonuses</h3>
|
||||
<p>Această acțiune va dezactiva bonusul de 25% pentru TOATE resursele la toți jucătorii.</p>
|
||||
<p>This action will disable the 25% bonus for ALL resources at all players.</p>
|
||||
|
||||
<div class="res-icons">
|
||||
<img src="../img/admin/r/1.gif" title="Wood">
|
||||
@@ -43,10 +63,10 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
</div>
|
||||
|
||||
<div class="danger-box">
|
||||
⚠️ Toate bonusurile de resurse vor fi setate la 0 zile.
|
||||
⚠️ All resource bonuses will be set to 0 days.
|
||||
</div>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/mainteneceResetPlusBonus.php" method="POST" class="resetres-form" onsubmit="return confirm('Ești SIGUR că vrei să resetezi bonusurile de resurse?');">
|
||||
<form action="../GameEngine/Admin/Mods/mainteneceResetPlusBonus.php" method="POST" class="resetres-form" onsubmit="return confirm('Are you SURE you want to reset resource bonuses?');">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<button type="submit">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z" stroke="#fff" stroke-width="2" stroke-linecap="round"/></svg>
|
||||
@@ -56,6 +76,6 @@ if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
</div>
|
||||
|
||||
<?php if(isset($_GET['g'])){ ?>
|
||||
<div class="resetres-success">✓ Bonusurile de resurse au fost resetate pentru toți jucătorii!</div>
|
||||
<div class="resetres-success">✓ Resource bonuses have been reset for all players!</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
+223
-370
@@ -2,46 +2,52 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename map.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## Updated by: iopietro ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : map.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : ronix (Original) ##
|
||||
## Refactored by : iopietro ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
// ----------------- PHP (logic unchanged, except $pixelDiv = 255) -----------------
|
||||
$check1 = $check2 = $check3 = "";
|
||||
$includeSize = true;
|
||||
$criteria = "";
|
||||
|
||||
if (isset($_POST['show1']) || isset($_POST['show2']) || isset($_POST['show3'])) {
|
||||
$check1 = isset($_POST['show1']) ? "checked " : "";
|
||||
$check2 = isset($_POST['show2']) ? "checked " : "";
|
||||
$check3 = isset($_POST['show3']) ? "checked " : "";
|
||||
|
||||
if($check1 != "" && $check2 == "" && $check3 == "") {
|
||||
$check1 = isset($_POST['show1'])? "checked " : "";
|
||||
$check2 = isset($_POST['show2'])? "checked " : "";
|
||||
$check3 = isset($_POST['show3'])? "checked " : "";
|
||||
|
||||
if($check1!= "" && $check2 == "" && $check3 == "") {
|
||||
$criteria = " WHERE u.tribe <> 5";
|
||||
$includeSize = false;
|
||||
}
|
||||
elseif($check1 == "" && $check2 != "" && $check3 == "") {
|
||||
elseif($check1 == "" && $check2!= "" && $check3 == "") {
|
||||
$criteria = " WHERE u.tribe = 5 AND (v.capital = 1 OR v.natar = 1)";
|
||||
$includeSize = false;
|
||||
}
|
||||
elseif($check1 != "" && $check2 != "" && $check3 == "") {
|
||||
elseif($check1!= "" && $check2!= "" && $check3 == "") {
|
||||
$criteria = " WHERE u.tribe <> 5 OR (u.tribe = 5 AND (v.capital = 1 OR v.natar = 1))";
|
||||
$includeSize = false;
|
||||
}
|
||||
elseif($check1 == "" && $check2 == "" && $check3 != "") {
|
||||
elseif($check1 == "" && $check2 == "" && $check3!= "") {
|
||||
$criteria = " INNER JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref";
|
||||
}
|
||||
elseif($check1 != "" && $check2 == "" && $check3 != ""){
|
||||
elseif($check1!= "" && $check2 == "" && $check3!= ""){
|
||||
$criteria = " LEFT JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref WHERE u.tribe <> 5 OR (u.tribe = 5 AND v.capital <> 1 AND v.natar <> 1)";
|
||||
}
|
||||
elseif($check1 == "" && $check2 != "" && $check3 != ""){
|
||||
elseif($check1 == "" && $check2!= "" && $check3!= ""){
|
||||
$criteria = " LEFT JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref WHERE u.tribe = 5";
|
||||
}
|
||||
elseif($check1 != "" && $check2 != "" && $check3 != ""){
|
||||
elseif($check1!= "" && $check2!= "" && $check3!= ""){
|
||||
$criteria = " LEFT JOIN ".TB_PREFIX."artefacts AS a ON a.vref = v.wref";
|
||||
}
|
||||
}
|
||||
@@ -51,414 +57,261 @@ if ($check1 == "" && $check2 == "" && $check3 == "") $criteria = "";
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title><?php echo SERVER_NAME; ?> Map</title>
|
||||
<link rel="stylesheet" href="../img/admin/map.css" type="text/css" media="all">
|
||||
|
||||
<title><?php echo SERVER_NAME;?> Map</title>
|
||||
<style>
|
||||
:root { --map-width:510px; --map-height:510px; }
|
||||
/* ===== MODERN SKIN ===== */
|
||||
body{margin:0;background:#f1f5f9;font-family:system-ui,-apple-system,Segoe UI,Roboto;color:#0f172a}
|
||||
.map-wrap{max-width:1200px;margin:16px auto;padding:0 12px}
|
||||
.map-header{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:14px 18px;margin-bottom:14px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
|
||||
.map-header h2{margin:0 0 4px;font-size:20px;font-weight:800}
|
||||
.map-header p{margin:0;color:#64748b;font-size:13px}
|
||||
.map-filters{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:12px 16px;margin-bottom:14px;display:flex;align-items:center;gap:18px;flex-wrap:wrap}
|
||||
.filter-group{display:flex;align-items:center;gap:8px}
|
||||
.filter-group label{font-size:13px;font-weight:500;cursor:pointer}
|
||||
.filter-group input{width:16px;height:16px;accent-color:#0f172a;cursor:pointer}
|
||||
.btn-show{background:#0f172a;color:#fff;border:0;padding:7px 14px;border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;transition:.2s}
|
||||
.btn-show:hover{background:#1e293b;transform:translateY(-1px)}
|
||||
|
||||
/* Container */
|
||||
#map {
|
||||
width: 510px; height: 510px; position: relative; overflow: hidden;
|
||||
border: 1px solid #333; background: #f3f3f3;
|
||||
}
|
||||
#map.grab { cursor: grab; } #map.grabbing { cursor: grabbing; }
|
||||
.map-layout{display:grid;grid-template-columns:1fr 240px;gap:14px;align-items:start}
|
||||
@media(max-width:900px){.map-layout{grid-template-columns:1fr}}
|
||||
|
||||
/* World layer that we translate/scale */
|
||||
#map_bg {
|
||||
position:absolute; inset:0; width:var(--map-width); height:var(--map-height);
|
||||
transform-origin:0 0; will-change:transform; transition: transform 80ms ease;
|
||||
--zoom:1;
|
||||
}
|
||||
/* MAP CONTAINER - untouched logic */
|
||||
#map {width:510px;height:510px;position:relative;overflow:hidden;border:1px solid #cbd5e1;background:#f8fafc;border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,.08)}
|
||||
#map.grab{cursor:grab} #map.grabbing{cursor:grabbing}
|
||||
#map_bg{position:absolute;inset:0;width:510px;height:510px;transform-origin:0 0;will-change:transform;transition:transform 80ms ease;--zoom:1}
|
||||
#gridSvg{position:absolute;inset:0;pointer-events:none}
|
||||
#gridSvg line{vector-effect:non-scaling-stroke;shape-rendering:crispEdges}
|
||||
#gridSvg.minor{stroke:rgba(0,0,0,.08);stroke-width:1}
|
||||
#gridSvg.major{stroke:rgba(0,0,0,.18);stroke-width:1}
|
||||
.marker{position:absolute;transform:translate(-50%,-50%)}
|
||||
#map_bg.pin{transform-origin:center;transform:scale(calc(1/var(--zoom)));cursor:pointer}
|
||||
|
||||
/* CRISP GRID (SVG lines) */
|
||||
#gridSvg { position:absolute; inset:0; pointer-events:none; }
|
||||
#gridSvg line { vector-effect: non-scaling-stroke; shape-rendering: crispEdges; }
|
||||
#gridSvg .minor { stroke: rgba(0,0,0,0.12); stroke-width: 1; }
|
||||
#gridSvg .major { stroke: rgba(0,0,0,0.25); stroke-width: 1; }
|
||||
/* Zoom controls modern */
|
||||
.zoom-controls{position:absolute;top:10px;right:10px;display:flex;gap:6px;align-items:center;z-index:1000;background:#fff;padding:6px 8px;border-radius:10px;box-shadow:0 4px 12px rgba(0,0,0,.15);border:1px solid #e5e7eb}
|
||||
.zoom-controls button{font-size:13px;padding:6px 9px;border-radius:6px;border:1px solid #e2e8f0;background:#f8fafc;cursor:pointer;font-weight:600;transition:.15s}
|
||||
.zoom-controls button:hover{background:#e2e8f0}
|
||||
.zoom-controls span{min-width:52px;text-align:center;font:12px system-ui;font-weight:600;color:#334155}
|
||||
|
||||
/* Markers centered on coords; keep constant size visually */
|
||||
.marker { position:absolute; transform: translate(-50%,-50%); }
|
||||
#map_bg .pin { transform-origin:center; transform: scale(calc(1 / var(--zoom))); cursor:pointer; }
|
||||
/* Axis */
|
||||
.zoomlevels span{position:absolute;font:11px system-ui;color:#64748b;font-weight:600;background:rgba(255,255,255,.9);padding:2px 5px;border-radius:4px}
|
||||
#zl{left:6px;top:50%;transform:translateY(-50%)} #zr{right:6px;top:50%;transform:translateY(-50%)}
|
||||
#zo{right:50%;top:6px;transform:translateX(50%)} #zb{right:50%;bottom:6px;transform:translateX(50%)}
|
||||
#zc{left:50%;top:50%;transform:translate(-50%,-50%)}
|
||||
#lijn_hor,#lijn_ver{position:absolute;background:#94a3b8;opacity:.4}
|
||||
#lijn_hor{left:0;right:0;top:50%;height:1px} #lijn_ver{top:0;bottom:0;left:50%;width:1px}
|
||||
|
||||
/* Zoom controls */
|
||||
.zoom-controls {
|
||||
position:absolute; top:8px; right:8px; display:flex; gap:6px; align-items:center;
|
||||
z-index:1000; background:rgba(255,255,255,.9); padding:6px 8px; border-radius:8px;
|
||||
box-shadow:0 2px 6px rgba(0,0,0,.15); user-select:none;
|
||||
}
|
||||
.zoom-controls button { font-size:12px; padding:6px 10px; border-radius:6px; border:1px solid #ccc; background:#f7f7f7; cursor:pointer; }
|
||||
.zoom-controls span { min-width:56px; text-align:center; font:12px system-ui,Arial; }
|
||||
/* Legend cards */
|
||||
.legend-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;margin-bottom:12px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
|
||||
.legend-head{background:#0f172a;color:#fff;padding:8px 12px;font-size:13px;font-weight:700}
|
||||
.legend-body{padding:10px 12px}
|
||||
.legend-body table{width:100%;border-collapse:collapse}
|
||||
.legend-body td{padding:4px 0;font-size:12px}
|
||||
.legend-body td:first-child{width:20px}
|
||||
.legend-body img{width:11px;height:11px;display:block}
|
||||
|
||||
/* Axis labels & crosshair */
|
||||
.zoomlevels span { position:absolute; font:12px Arial; color:#000; }
|
||||
#zl { left:2px; top:50%; transform:translateY(-50%); }
|
||||
#zr { right:2px; top:50%; transform:translateY(-50%); }
|
||||
#zo { right:50%; top:2px; transform:translateX(50%); }
|
||||
#zb { right:50%; bottom:2px; transform:translateX(50%); }
|
||||
#zc { left:50%; top:50%; transform:translate(-50%,-50%); background:rgba(255,255,255,.85); padding:2px 4px; border-radius:4px; }
|
||||
#lijn_hor,#lijn_ver { position:absolute; background:#666; opacity:.5; }
|
||||
#lijn_hor { left:0; right:0; top:50%; height:1px; }
|
||||
#lijn_ver { top:0; bottom:0; left:50%; width:1px; }
|
||||
|
||||
/* Ensure tooltip list looks same for hover & sticky */
|
||||
.p_info { list-style:none; margin:0; padding:0; }
|
||||
.p_info li { margin:2px 0; }
|
||||
|
||||
/* Buttons inside tooltip */
|
||||
.p_actions { margin-top:6px; display:flex; gap:6px; }
|
||||
.p_btn {
|
||||
display:inline-block; font:12px/1 Arial; padding:4px 8px;
|
||||
border:1px solid #bbb; border-radius:6px; background:#fff; color:#2a2a2a; text-decoration:none;
|
||||
}
|
||||
.p_btn:hover { background:#f2f2f2; }
|
||||
|
||||
/* Sticky tooltip (same style family as your hover) */
|
||||
#tipBackdrop { position:absolute; inset:0; display:none; z-index:1099; background:transparent; }
|
||||
#stickyTip {
|
||||
position:absolute; z-index:1100; display:none; max-width:320px;
|
||||
background:#fff; border:1px solid #aaa; border-radius:8px;
|
||||
box-shadow:0 8px 24px rgba(0,0,0,.25); padding:8px 10px;
|
||||
}
|
||||
/* Tooltip */
|
||||
.p_info{list-style:none;margin:0;padding:0}
|
||||
.p_info li{margin:3px 0;font-size:12px}
|
||||
.p_actions{margin-top:8px;display:flex;gap:6px}
|
||||
.p_btn{display:inline-block;font:12px/1 system-ui;padding:5px 9px;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc;color:#0f172a;text-decoration:none;font-weight:500}
|
||||
.p_btn:hover{background:#e2e8f0}
|
||||
#tipBackdrop{position:absolute;inset:0;display:none;z-index:1099;background:transparent}
|
||||
#stickyTip{position:absolute;z-index:1100;display:none;max-width:300px;background:#fff;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:10px 12px}
|
||||
.badge-tribe{display:inline-block;padding:1px 6px;border-radius:5px;font-size:10.5px;font-weight:600;background:#e2e8f0;color:#334155}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="start">
|
||||
<div class="clear"><h2 class="left"><?php echo SERVER_NAME;?> Map!</h2></div>
|
||||
<p>This is the map of <?php echo SERVER_NAME;?>. Search and find players.</p>
|
||||
<div class="map-wrap">
|
||||
<div class="map-header">
|
||||
<h2><?php echo SERVER_NAME;?> Map</h2>
|
||||
<p>Interactive world map – search players, villages and artifacts</p>
|
||||
</div>
|
||||
|
||||
<h1>Show Option</h1>
|
||||
<form id="show" name="show" action="admin.php?p=map" method="POST">
|
||||
<table width="70%"><tr>
|
||||
<td><input id="show1" name="show1" type="checkbox" <?php echo $check1;?> value="1">Players</td>
|
||||
<td><input id="show2" name="show2" type="checkbox" <?php echo $check2;?> value="2"><?php echo TRIBE5; ?></td>
|
||||
<td><input id="show3" name="show3" type="checkbox" <?php echo $check3;?> value="2">Artifacts</td>
|
||||
<td><input id="btnshow" type="submit" value="Show" style="font-size:9px"></td>
|
||||
</tr></table>
|
||||
<form id="show" action="admin.php?p=map" method="POST" class="map-filters">
|
||||
<div class="filter-group">
|
||||
<input id="show1" name="show1" type="checkbox" <?php echo $check1;?> value="1">
|
||||
<label for="show1">Players</label>
|
||||
</div>
|
||||
<div class="filter-group">
|
||||
<input id="show2" name="show2" type="checkbox" <?php echo $check2;?> value="2">
|
||||
<label for="show2"><?php echo TRIBE5;?></label>
|
||||
</div>
|
||||
<div class="filter-group">
|
||||
<input id="show3" name="show3" type="checkbox" <?php echo $check3;?> value="2">
|
||||
<label for="show3">Artifacts</label>
|
||||
</div>
|
||||
<button type="submit" class="btn-show">Apply Filters</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="kaart">
|
||||
<div id="map" class="grab" title="">
|
||||
<!-- Zoom UI -->
|
||||
<div class="zoom-controls">
|
||||
<button type="button" id="zoomOut">−</button>
|
||||
<span id="zoomLabel">100%</span>
|
||||
<button type="button" id="zoomIn">+</button>
|
||||
<button type="button" id="zoomReset">Reset</button>
|
||||
</div>
|
||||
|
||||
<div class="zoomlevels">
|
||||
<span id="zl">-<?php echo WORLD_MAX;?></span>
|
||||
<span id="zr"><?php echo WORLD_MAX;?></span>
|
||||
<span id="zb"><?php echo WORLD_MAX;?></span>
|
||||
<span id="zo">-<?php echo WORLD_MAX;?></span>
|
||||
<span id="zc">(0,0)</span>
|
||||
<div id="lijn_hor"></div>
|
||||
<div id="lijn_ver"></div>
|
||||
</div>
|
||||
|
||||
<!-- World layer -->
|
||||
<div id="map_bg">
|
||||
<!-- Grid -->
|
||||
<svg id="gridSvg" width="510" height="510" aria-hidden="true"></svg>
|
||||
|
||||
<?php
|
||||
if ($criteria != "") {
|
||||
$artifactsEffect = ['-', VILLAGE_EFFECT, ACCOUNT_EFFECT, UNIQUE_EFFECT];
|
||||
$array_tribe = ['-', TRIBE1, TRIBE2, TRIBE3, TRIBE4, TRIBE5, TRIBE6];
|
||||
|
||||
$q = "SELECT v.wref, v.owner, v.name, v.capital, v.pop, u.username, u.tribe, u.access, w.x, w.y"
|
||||
. ($includeSize ? ", a.size" : "")
|
||||
. " FROM ".TB_PREFIX."vdata AS v"
|
||||
. " LEFT JOIN ".TB_PREFIX."users AS u ON v.owner = u.id"
|
||||
. " LEFT JOIN ".TB_PREFIX."wdata AS w ON v.wref = w.id "
|
||||
. $criteria;
|
||||
|
||||
$player_info = $database->query_return($q);
|
||||
|
||||
foreach ($player_info as $p_array) {
|
||||
$p_name = htmlspecialchars($p_array['username'], ENT_QUOTES);
|
||||
$p_village= htmlspecialchars($p_array['name'], ENT_QUOTES);
|
||||
$p_pop = (int)$p_array['pop'];
|
||||
$p_tribe = $array_tribe[$p_array['tribe']];
|
||||
$did = (int)$p_array['wref'];
|
||||
$uid = (int)$p_array['owner'];
|
||||
$x = (int)$p_array['x'];
|
||||
$y = (int)$p_array['y'];
|
||||
|
||||
$imgName = "../img/admin/map_".(isset($p_array['size']) ? "1".$p_array['size'] : ($p_array['access'] != ADMIN ? $p_array['tribe'] : 0)).".gif";
|
||||
|
||||
// world to pixels (510x510 world; center 255,255)
|
||||
$pixelDiv = 255;
|
||||
$xdiv = $pixelDiv / WORLD_MAX;
|
||||
$p_x = $pixelDiv + ($x * $xdiv);
|
||||
$p_y = $pixelDiv - ($y * $xdiv);
|
||||
|
||||
// Tooltip HTML (shared by hover & sticky)
|
||||
$tooltip = "<ul class='p_info'>";
|
||||
$tooltip .= "<li>Player name: <b>{$p_name}</b></li>";
|
||||
$tooltip .= "<li>Village name : <b>{$p_village}</b></li>";
|
||||
$tooltip .= "<li>Coordinate: <b>({$x}|{$y})</b></li>";
|
||||
$tooltip .= "<li>Population: <b>{$p_pop}</b></li>";
|
||||
$tooltip .= "<li>Tribe: <b>{$p_tribe}</b></li>";
|
||||
if ($check3 != "" && isset($p_array['size'])) {
|
||||
$tooltip .= "<li>Artifact effect: <b>".$artifactsEffect[$p_array['size']]."</b></li>";
|
||||
<div class="map-layout">
|
||||
<div>
|
||||
<div id="map" class="grab">
|
||||
<div class="zoom-controls">
|
||||
<button type="button" id="zoomOut">−</button>
|
||||
<span id="zoomLabel">100%</span>
|
||||
<button type="button" id="zoomIn">+</button>
|
||||
<button type="button" id="zoomReset">Reset</button>
|
||||
</div>
|
||||
<div class="zoomlevels">
|
||||
<span id="zl">-<?php echo WORLD_MAX;?></span>
|
||||
<span id="zr"><?php echo WORLD_MAX;?></span>
|
||||
<span id="zb"><?php echo WORLD_MAX;?></span>
|
||||
<span id="zo">-<?php echo WORLD_MAX;?></span>
|
||||
<span id="zc">(0,0)</span>
|
||||
<div id="lijn_hor"></div>
|
||||
<div id="lijn_ver"></div>
|
||||
</div>
|
||||
<div id="map_bg">
|
||||
<svg id="gridSvg" width="510" height="510" aria-hidden="true"></svg>
|
||||
<?php
|
||||
if ($criteria!= "") {
|
||||
$artifactsEffect = ['-', VILLAGE_EFFECT, ACCOUNT_EFFECT, UNIQUE_EFFECT];
|
||||
$array_tribe = ['-', TRIBE1, TRIBE2, TRIBE3, TRIBE4, TRIBE5, TRIBE6];
|
||||
$q = "SELECT v.wref, v.owner, v.name, v.capital, v.pop, u.username, u.tribe, u.access, w.x, w.y"
|
||||
. ($includeSize? ", a.size" : "")
|
||||
. " FROM ".TB_PREFIX."vdata AS v"
|
||||
. " LEFT JOIN ".TB_PREFIX."users AS u ON v.owner = u.id"
|
||||
. " LEFT JOIN ".TB_PREFIX."wdata AS w ON v.wref = w.id "
|
||||
. $criteria;
|
||||
$player_info = $database->query_return($q);
|
||||
foreach ($player_info as $p_array) {
|
||||
$p_name = htmlspecialchars($p_array['username'], ENT_QUOTES);
|
||||
$p_village = htmlspecialchars($p_array['name'], ENT_QUOTES);
|
||||
$p_pop = (int)$p_array['pop'];
|
||||
$p_tribe = $array_tribe[$p_array['tribe']];
|
||||
$did = (int)$p_array['wref'];
|
||||
$uid = (int)$p_array['owner'];
|
||||
$x = (int)$p_array['x'];
|
||||
$y = (int)$p_array['y'];
|
||||
$imgName = "../img/admin/map_".(isset($p_array['size'])? "1".$p_array['size'] : ($p_array['access']!= ADMIN? $p_array['tribe'] : 0)).".gif";
|
||||
$pixelDiv = 255;
|
||||
$xdiv = $pixelDiv / WORLD_MAX;
|
||||
$p_x = $pixelDiv + ($x * $xdiv);
|
||||
$p_y = $pixelDiv - ($y * $xdiv);
|
||||
$tooltip = "<ul class='p_info'>";
|
||||
$tooltip.= "<li>Player: <b>{$p_name}</b></li>";
|
||||
$tooltip.= "<li>Village: <b>{$p_village}</b></li>";
|
||||
$tooltip.= "<li>Coord: <b>({$x}|{$y})</b></li>";
|
||||
$tooltip.= "<li>Pop: <b>{$p_pop}</b></li>";
|
||||
$tooltip.= "<li>Tribe: <b>{$p_tribe}</b></li>";
|
||||
if ($check3!= "" && isset($p_array['size'])) {
|
||||
$tooltip.= "<li>Artifact: <b>".$artifactsEffect[$p_array['size']]."</b></li>";
|
||||
}
|
||||
$tooltip.= "</ul>";
|
||||
$tooltip.= "<div class='p_actions'>"
|
||||
. "<a class='p_btn' href='?p=village&did={$did}' target='_blank'>Village</a>"
|
||||
. "<a class='p_btn' href='?p=player&uid={$uid}' target='_blank'>Profile</a>"
|
||||
. "</div>";
|
||||
$tooltipHover = str_replace(["\\", "'"], ["\\\\", "\\'"], $tooltip);
|
||||
$tooltipAttr = htmlspecialchars($tooltip, ENT_QUOTES);
|
||||
echo '<div class="marker" style="left:'.$p_x.'px; top:'.$p_y.'px;" data-tip="'.$tooltipAttr.'">'
|
||||
. '<img class="pin" src="'.$imgName.'" border="0" '
|
||||
. ' onmouseout="med_closeDescription()" '
|
||||
. " onmousemove=\"med_mouseMoveHandler(arguments[0], '".$tooltipHover."')\" "
|
||||
. '>'
|
||||
. '</div>';
|
||||
}
|
||||
$tooltip .= "</ul>";
|
||||
$tooltip .= "<div class='p_actions'>"
|
||||
. "<a class='p_btn' href='?p=village&did={$did}' target='_blank' rel='noopener'>Open village</a>"
|
||||
. "<a class='p_btn' href='?p=player&uid={$uid}' target='_blank' rel='noopener'>Open profile</a>"
|
||||
. "</div>";
|
||||
|
||||
// JS string version for hover (escape quotes and backslashes)
|
||||
$tooltipHover = str_replace(["\\", "'"], ["\\\\", "\\'"], $tooltip);
|
||||
// Attribute version for sticky (HTML-encode quotes)
|
||||
$tooltipAttr = htmlspecialchars($tooltip, ENT_QUOTES);
|
||||
|
||||
echo '<div class="marker" style="left:'.$p_x.'px; top:'.$p_y.'px;" data-tip="'.$tooltipAttr.'">'
|
||||
. '<img class="pin" src="'.$imgName.'" border="0" '
|
||||
. ' onmouseout="med_closeDescription()" '
|
||||
. " onmousemove=\"med_mouseMoveHandler(arguments[0], '".$tooltipHover."')\" "
|
||||
. '>'
|
||||
. '</div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<!-- Sticky tooltip containers -->
|
||||
<div id="tipBackdrop"></div>
|
||||
<div id="stickyTip"></div>
|
||||
</div>
|
||||
|
||||
<div id="legenda">
|
||||
<div class="content">
|
||||
<h3>Legend</h3>
|
||||
<div id="items">
|
||||
<div class="first"></div>
|
||||
<table>
|
||||
<tr><td><img src="../img/admin/map_1.gif" height="11" width="11"></td><td class="show"><?php echo TRIBE1;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_2.gif" height="11" width="11"></td><td class="show"><?php echo TRIBE2;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_3.gif" height="11" width="11"></td><td class="show"><?php echo TRIBE3;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_5.gif" height="11" width="11"></td><td class="show"><?php echo TRIBE5;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_0.gif" height="11" width="11"></td><td class="show">Multihunters</td></tr>
|
||||
</table>
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div id="tipBackdrop"></div>
|
||||
<div id="stickyTip"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="legenda">
|
||||
<div class="content">
|
||||
<h3>Artifacts Legend</h3>
|
||||
<div id="items">
|
||||
<div class="first"></div>
|
||||
<table>
|
||||
<tr><td><img src="../img/admin/map_11.gif" height="11" width="11"></td><td class="show"><?php echo VILLAGE_EFFECT;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_12.gif" height="11" width="11"></td><td class="show"><?php echo ACCOUNT_EFFECT;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_13.gif" height="11" width="11"></td><td class="show"><?php echo UNIQUE_EFFECT;?></td></tr>
|
||||
</table>
|
||||
<div>
|
||||
<div class="legend-card">
|
||||
<div class="legend-head">Tribes</div>
|
||||
<div class="legend-body">
|
||||
<table>
|
||||
<tr><td><img src="../img/admin/map_1.gif"></td><td><?php echo TRIBE1;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_2.gif"></td><td><?php echo TRIBE2;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_3.gif"></td><td><?php echo TRIBE3;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_5.gif"></td><td><?php echo TRIBE5;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_0.gif"></td><td>Multihunters</td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="legend-card">
|
||||
<div class="legend-head">Artifacts</div>
|
||||
<div class="legend-body">
|
||||
<table>
|
||||
<tr><td><img src="../img/admin/map_11.gif"></td><td><?php echo VILLAGE_EFFECT;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_12.gif"></td><td><?php echo ACCOUNT_EFFECT;?></td></tr>
|
||||
<tr><td><img src="../img/admin/map_13.gif"></td><td><?php echo UNIQUE_EFFECT;?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ===================== JS: crisp SVG grid + clamped pan + cursor zoom + sticky tooltip ===================== -->
|
||||
<script>
|
||||
// === JS ORIGINAL - NEMODIFICAT ===
|
||||
(function () {
|
||||
const map = document.getElementById('map');
|
||||
const map = document.getElementById('map');
|
||||
const layer = document.getElementById('map_bg');
|
||||
const grid = document.getElementById('gridSvg');
|
||||
|
||||
const zl = document.getElementById('zl');
|
||||
const zr = document.getElementById('zr');
|
||||
const zo = document.getElementById('zo');
|
||||
const zb = document.getElementById('zb');
|
||||
const zc = document.getElementById('zc');
|
||||
|
||||
const zoomInBtn = document.getElementById('zoomIn');
|
||||
const zoomOutBtn = document.getElementById('zoomOut');
|
||||
const zoomResetBtn = document.getElementById('zoomReset');
|
||||
const zoomLabel = document.getElementById('zoomLabel');
|
||||
|
||||
const sticky = document.getElementById('stickyTip');
|
||||
const stickyBackdrop = document.getElementById('tipBackdrop');
|
||||
|
||||
const WORLD_MAX = <?php echo json_encode(WORLD_MAX); ?>;
|
||||
|
||||
// Base sizes (match CSS)
|
||||
const baseW = parseFloat(getComputedStyle(layer).getPropertyValue('--map-width')) || 510;
|
||||
const baseH = parseFloat(getComputedStyle(layer).getPropertyValue('--map-height')) || 510;
|
||||
|
||||
// World->pixel conversion (0,0 at center)
|
||||
const pixelDiv = baseW / 2; // 255
|
||||
const xdiv = pixelDiv / WORLD_MAX; // px per world unit
|
||||
|
||||
// Build SVG grid (even, crisp)
|
||||
const grid = document.getElementById('gridSvg');
|
||||
const zl = document.getElementById('zl'); const zr = document.getElementById('zr');
|
||||
const zo = document.getElementById('zo'); const zb = document.getElementById('zb'); const zc = document.getElementById('zc');
|
||||
const zoomInBtn = document.getElementById('zoomIn'); const zoomOutBtn = document.getElementById('zoomOut');
|
||||
const zoomResetBtn = document.getElementById('zoomReset'); const zoomLabel = document.getElementById('zoomLabel');
|
||||
const sticky = document.getElementById('stickyTip'); const stickyBackdrop = document.getElementById('tipBackdrop');
|
||||
const WORLD_MAX = <?php echo json_encode(WORLD_MAX);?>;
|
||||
const baseW = 510; const baseH = 510;
|
||||
const pixelDiv = baseW / 2; const xdiv = pixelDiv / WORLD_MAX;
|
||||
function buildGrid() {
|
||||
const MAJOR_UNIT = 10;
|
||||
grid.setAttribute('viewBox', `0 0 ${baseW} ${baseH}`);
|
||||
grid.innerHTML = "";
|
||||
|
||||
grid.setAttribute('viewBox', `0 0 ${baseW} ${baseH}`); grid.innerHTML = "";
|
||||
for (let x = -WORLD_MAX; x <= WORLD_MAX; x++) {
|
||||
const px = pixelDiv + x * xdiv;
|
||||
const v = document.createElementNS('http://www.w3.org/2000/svg','line');
|
||||
v.setAttribute('x1',px); v.setAttribute('y1',0);
|
||||
v.setAttribute('x2',px); v.setAttribute('y2',baseH);
|
||||
v.setAttribute('class', (x % MAJOR_UNIT === 0) ? 'major' : 'minor');
|
||||
grid.appendChild(v);
|
||||
v.setAttribute('x1',px); v.setAttribute('y1',0); v.setAttribute('x2',px); v.setAttribute('y2',baseH);
|
||||
v.setAttribute('class', (x % MAJOR_UNIT === 0)? 'major' : 'minor'); grid.appendChild(v);
|
||||
}
|
||||
for (let y = -WORLD_MAX; y <= WORLD_MAX; y++) {
|
||||
const py = pixelDiv - y * xdiv;
|
||||
const h = document.createElementNS('http://www.w3.org/2000/svg','line');
|
||||
h.setAttribute('x1',0); h.setAttribute('y1',py);
|
||||
h.setAttribute('x2',baseW); h.setAttribute('y2',py);
|
||||
h.setAttribute('class', (y % MAJOR_UNIT === 0) ? 'major' : 'minor');
|
||||
grid.appendChild(h);
|
||||
h.setAttribute('x1',0); h.setAttribute('y1',py); h.setAttribute('x2',baseW); h.setAttribute('y2',py);
|
||||
h.setAttribute('class', (y % MAJOR_UNIT === 0)? 'major' : 'minor'); grid.appendChild(h);
|
||||
}
|
||||
}
|
||||
buildGrid();
|
||||
|
||||
// Zoom levels
|
||||
const STEP_SCALE = 1.25;
|
||||
const MAX_Z = 16;
|
||||
let MIN_Z = 0;
|
||||
const STEP_SCALE = 1.25; const MAX_Z = 16; let MIN_Z = 0;
|
||||
function sFromLvl(lvl){ return Math.pow(STEP_SCALE, lvl); }
|
||||
|
||||
// Clamp pan to avoid blank
|
||||
function clampPan() {
|
||||
const s = sFromLvl(zoomLevel);
|
||||
const scaledW = baseW * s;
|
||||
const scaledH = baseH * s;
|
||||
|
||||
if (scaledW <= map.clientWidth) {
|
||||
tx = (map.clientWidth - scaledW) / 2;
|
||||
} else {
|
||||
const minTx = map.clientWidth - scaledW;
|
||||
tx = Math.max(minTx, Math.min(tx, 0));
|
||||
}
|
||||
|
||||
if (scaledH <= map.clientHeight) {
|
||||
ty = (map.clientHeight - scaledH) / 2;
|
||||
} else {
|
||||
const minTy = map.clientHeight - scaledH;
|
||||
ty = Math.max(minTy, Math.min(ty, 0));
|
||||
}
|
||||
const s = sFromLvl(zoomLevel); const scaledW = baseW * s; const scaledH = baseH * s;
|
||||
if (scaledW <= map.clientWidth) { tx = (map.clientWidth - scaledW) / 2; } else { const minTx = map.clientWidth - scaledW; tx = Math.max(minTx, Math.min(tx, 0)); }
|
||||
if (scaledH <= map.clientHeight) { ty = (map.clientHeight - scaledH) / 2; } else { const minTy = map.clientHeight - scaledH; ty = Math.max(minTy, Math.min(ty, 0)); }
|
||||
}
|
||||
|
||||
function applyTransform(){
|
||||
clampPan();
|
||||
const s = sFromLvl(zoomLevel);
|
||||
layer.style.setProperty('--zoom', s);
|
||||
layer.style.transform = `translate(${tx}px, ${ty}px) scale(${s})`;
|
||||
zoomLabel.textContent = Math.round(s*100) + '%';
|
||||
updateAxes();
|
||||
}
|
||||
|
||||
// Map-local px -> world coords
|
||||
function screenToWorld(localX, localY){
|
||||
const s = sFromLvl(zoomLevel);
|
||||
const lx = (localX - tx) / s;
|
||||
const ly = (localY - ty) / s;
|
||||
return { x: (lx - pixelDiv) / xdiv, y: (pixelDiv - ly) / xdiv };
|
||||
}
|
||||
|
||||
function updateAxes(){
|
||||
const w=map.clientWidth, h=map.clientHeight;
|
||||
const left = screenToWorld(0,h/2).x, right = screenToWorld(w,h/2).x;
|
||||
const top = screenToWorld(w/2,0).y, bottom = screenToWorld(w/2,h).y;
|
||||
const center = screenToWorld(w/2,h/2);
|
||||
zl.textContent=Math.round(left); zr.textContent=Math.round(right);
|
||||
zo.textContent=Math.round(top); zb.textContent=Math.round(bottom);
|
||||
zc.textContent=`(${Math.round(center.x)},${Math.round(center.y)})`;
|
||||
}
|
||||
|
||||
function computeMinLevel(){
|
||||
const fit = Math.max(map.clientWidth / baseW, map.clientHeight / baseH);
|
||||
let lvl=0, s=1;
|
||||
if (fit >= 1) { while (s < fit) { s *= STEP_SCALE; lvl++; } }
|
||||
else { while (s / STEP_SCALE >= fit) { s /= STEP_SCALE; lvl--; } }
|
||||
MIN_Z = lvl;
|
||||
}
|
||||
|
||||
function applyTransform(){ clampPan(); const s = sFromLvl(zoomLevel); layer.style.setProperty('--zoom', s); layer.style.transform = `translate(${tx}px, ${ty}px) scale(${s})`; zoomLabel.textContent = Math.round(s*100) + '%'; updateAxes(); }
|
||||
function screenToWorld(localX, localY){ const s = sFromLvl(zoomLevel); const lx = (localX - tx) / s; const ly = (localY - ty) / s; return { x: (lx - pixelDiv) / xdiv, y: (pixelDiv - ly) / xdiv }; }
|
||||
function updateAxes(){ const w=map.clientWidth, h=map.clientHeight; const left = screenToWorld(0,h/2).x, right = screenToWorld(w,h/2).x; const top = screenToWorld(w/2,0).y, bottom = screenToWorld(w/2,h).y; const center = screenToWorld(w/2,h/2); zl.textContent=Math.round(left); zr.textContent=Math.round(right); zo.textContent=Math.round(top); zb.textContent=Math.round(bottom); zc.textContent=`(${Math.round(center.x)},${Math.round(center.y)})`; }
|
||||
function computeMinLevel(){ const fit = Math.max(map.clientWidth / baseW, map.clientHeight / baseH); let lvl=0, s=1; if (fit >= 1) { while (s < fit) { s *= STEP_SCALE; lvl++; } } else { while (s / STEP_SCALE >= fit) { s /= STEP_SCALE; lvl--; } } MIN_Z = lvl; }
|
||||
function clampLevel(next){ return Math.min(MAX_Z, Math.max(MIN_Z, next)); }
|
||||
|
||||
function toLocal(e){ const r = map.getBoundingClientRect(); return { x:e.clientX-r.left, y:e.clientY-r.top }; }
|
||||
|
||||
// Zoom toward cursor
|
||||
function zoomAt(deltaLevel, localX, localY){
|
||||
const newLevel = clampLevel(zoomLevel + deltaLevel);
|
||||
if (newLevel === zoomLevel) return;
|
||||
const oldS = sFromLvl(zoomLevel), newS = sFromLvl(newLevel);
|
||||
const lx = (localX - tx) / oldS, ly = (localY - ty) / oldS;
|
||||
tx = localX - lx * newS; ty = localY - ly * newS;
|
||||
zoomLevel = newLevel; applyTransform();
|
||||
}
|
||||
function zoomAt(deltaLevel, localX, localY){ const newLevel = clampLevel(zoomLevel + deltaLevel); if (newLevel === zoomLevel) return; const oldS = sFromLvl(zoomLevel), newS = sFromLvl(newLevel); const lx = (localX - tx) / oldS, ly = (localY - ty) / oldS; tx = localX - lx * newS; ty = localY - ly * newS; zoomLevel = newLevel; applyTransform(); }
|
||||
function zoomBy(delta){ zoomAt(delta, map.clientWidth/2, map.clientHeight/2); }
|
||||
|
||||
// State
|
||||
let zoomLevel = 0, tx = 0, ty = 0;
|
||||
|
||||
// Controls
|
||||
zoomInBtn.addEventListener('click', ()=>zoomBy(+1));
|
||||
zoomOutBtn.addEventListener('click', ()=>zoomBy(-1));
|
||||
zoomResetBtn.addEventListener('click', ()=>{
|
||||
computeMinLevel(); zoomLevel = MIN_Z;
|
||||
const s = sFromLvl(zoomLevel);
|
||||
tx = (map.clientWidth - baseW * s) / 2;
|
||||
ty = (map.clientHeight - baseH * s) / 2;
|
||||
applyTransform();
|
||||
});
|
||||
|
||||
// Wheel / dblclick
|
||||
zoomInBtn.addEventListener('click', ()=>zoomBy(+1)); zoomOutBtn.addEventListener('click', ()=>zoomBy(-1));
|
||||
zoomResetBtn.addEventListener('click', ()=>{ computeMinLevel(); zoomLevel = MIN_Z; const s = sFromLvl(zoomLevel); tx = (map.clientWidth - baseW * s) / 2; ty = (map.clientHeight - baseH * s) / 2; applyTransform(); });
|
||||
map.addEventListener('wheel', (e)=>{ e.preventDefault(); const p=toLocal(e); zoomAt(e.deltaY<0?+1:-1, p.x,p.y); }, {passive:false});
|
||||
map.addEventListener('dblclick', (e)=>{ e.preventDefault(); const p=toLocal(e); zoomAt(e.shiftKey?-1:+1, p.x,p.y); });
|
||||
|
||||
// Drag pan
|
||||
let dragging=false, lastX=0, lastY=0;
|
||||
map.addEventListener('mousedown',(e)=>{ if(e.button!==0) return; dragging=true; map.classList.add('grabbing'); const p=toLocal(e); lastX=p.x; lastY=p.y; });
|
||||
window.addEventListener('mousemove',(e)=>{ if(!dragging) return; const p=toLocal(e); tx+=(p.x-lastX); ty+=(p.y-lastY); lastX=p.x; lastY=p.y; applyTransform(); });
|
||||
window.addEventListener('mouseup',()=>{ dragging=false; map.classList.remove('grabbing'); });
|
||||
map.addEventListener('mouseleave',()=>{ dragging=false; map.classList.remove('grabbing'); });
|
||||
|
||||
// Touch
|
||||
map.addEventListener('touchstart',(e)=>{ if(e.touches.length===1){ const t=e.touches[0], r=map.getBoundingClientRect(); dragging=true; map.classList.add('grabbing'); lastX=t.clientX-r.left; lastY=t.clientY-r.top; } }, {passive:true});
|
||||
map.addEventListener('touchmove',(e)=>{ if(dragging && e.touches.length===1){ const t=e.touches[0], r=map.getBoundingClientRect(); const x=t.clientX-r.left, y=t.clientY-r.top; tx+=(x-lastX); ty+=(y-lastY); lastX=x; lastY=y; applyTransform(); e.preventDefault(); } }, {passive:false});
|
||||
map.addEventListener('touchend',()=>{ dragging=false; map.classList.remove('grabbing'); });
|
||||
|
||||
// Init
|
||||
computeMinLevel(); zoomLevel = MIN_Z;
|
||||
tx = (map.clientWidth - baseW) / 2; ty = (map.clientHeight - baseH) / 2; applyTransform();
|
||||
computeMinLevel(); zoomLevel = MIN_Z; tx = (map.clientWidth - baseW) / 2; ty = (map.clientHeight - baseH) / 2; applyTransform();
|
||||
window.addEventListener('resize', ()=>{ computeMinLevel(); if(zoomLevel<MIN_Z) zoomLevel=MIN_Z; applyTransform(); });
|
||||
|
||||
// Sticky tooltip behavior
|
||||
function openSticky(html, localX, localY){
|
||||
sticky.innerHTML = html;
|
||||
sticky.style.display = 'block';
|
||||
const rect = sticky.getBoundingClientRect();
|
||||
const W = rect.width || 280, H = rect.height || 140;
|
||||
let left = localX + 12, top = localY + 12;
|
||||
left = Math.max(8, Math.min(left, map.clientWidth - W - 8));
|
||||
top = Math.max(8, Math.min(top, map.clientHeight - H - 8));
|
||||
sticky.style.left = left + 'px';
|
||||
sticky.style.top = top + 'px';
|
||||
stickyBackdrop.style.display = 'block';
|
||||
}
|
||||
function openSticky(html, localX, localY){ sticky.innerHTML = html; sticky.style.display = 'block'; const rect = sticky.getBoundingClientRect(); const W = rect.width || 280, H = rect.height || 140; let left = localX + 12, top = localY + 12; left = Math.max(8, Math.min(left, map.clientWidth - W - 8)); top = Math.max(8, Math.min(top, map.clientHeight - H - 8)); sticky.style.left = left + 'px'; sticky.style.top = top + 'px'; stickyBackdrop.style.display = 'block'; }
|
||||
function closeSticky(){ sticky.style.display='none'; stickyBackdrop.style.display='none'; sticky.innerHTML=''; }
|
||||
stickyBackdrop.addEventListener('click', closeSticky);
|
||||
document.addEventListener('keydown', (e)=>{ if(e.key==='Escape') closeSticky(); });
|
||||
sticky.addEventListener('click', (e)=> e.stopPropagation());
|
||||
|
||||
// Click marker -> sticky tooltip (uses clean HTML from data-tip)
|
||||
layer.addEventListener('click', (e)=>{
|
||||
const marker = e.target.closest('.marker'); if(!marker) return;
|
||||
const html = marker.getAttribute('data-tip'); if(!html) return;
|
||||
const r = map.getBoundingClientRect();
|
||||
openSticky(html, e.clientX - r.left, e.clientY - r.top);
|
||||
});
|
||||
stickyBackdrop.addEventListener('click', closeSticky); document.addEventListener('keydown', (e)=>{ if(e.key==='Escape') closeSticky(); }); sticky.addEventListener('click', (e)=> e.stopPropagation());
|
||||
layer.addEventListener('click', (e)=>{ const marker = e.target.closest('.marker'); if(!marker) return; const html = marker.getAttribute('data-tip'); if(!html) return; const r = map.getBoundingClientRect(); openSticky(html, e.clientX - r.left, e.clientY - r.top); });
|
||||
})();
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
+141
-297
@@ -1,336 +1,180 @@
|
||||
<h1 class="left">Check & Edit Map Tile</h1>
|
||||
<h1 class="left">Check & Edit Map Tile</h1>
|
||||
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename map_tile.tpl ##
|
||||
## Developed by: Taras ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : map_tile.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
function get_map_tile_info($coord_x, $coord_y){ // todo mv to queries file
|
||||
function get_map_tile_info($coord_x, $coord_y){
|
||||
$tbp = TB_PREFIX;
|
||||
$q = 'SELECT map_data.`id` AS village_id, map_data.`fieldtype`, map_data.`oasistype`, map_data.`occupied`, map_data.`image`, '.
|
||||
'oasis_data.`type`, '.
|
||||
'CASE '.
|
||||
'WHEN oasis_data.`owner` IS NOT NULL AND oasis_data.`owner` != 2 '.
|
||||
'THEN oasis_data.`owner` '.
|
||||
'ELSE village_data.`owner` '.
|
||||
'END AS owner_id, '.
|
||||
'CASE WHEN oasis_data.`owner` IS NOT NULL AND oasis_data.`owner`!= 2 THEN oasis_data.`owner` ELSE village_data.`owner` END AS owner_id, '.
|
||||
'u.`username` '.
|
||||
'FROM (SELECT * FROM `'.$tbp.'wdata` WHERE `x` = '.$coord_x.' AND `y` = '.$coord_y.') AS map_data '.
|
||||
'LEFT JOIN `'.$tbp.'odata` AS oasis_data ON map_data.`id` = oasis_data.`wref` '.
|
||||
'LEFT JOIN `'.$tbp.'vdata` AS village_data ON village_data.`wref` = map_data.`id` '.
|
||||
'LEFT JOIN `'.$tbp.'users` AS u ON u.`id` = COALESCE(oasis_data.`owner`, village_data.`owner`, 0);'; // todo check this db tables fields -- del doublings like oasistype = '2' and image = 'o2'
|
||||
'LEFT JOIN `'.$tbp.'users` AS u ON u.`id` = COALESCE(oasis_data.`owner`, village_data.`owner`, 0);';
|
||||
$result = mysqli_query($GLOBALS['link'], $q);
|
||||
return mysqli_fetch_assoc($result);
|
||||
}
|
||||
|
||||
|
||||
function upd_oasis_to_oasis($village_id, $new_oasis_type){ // $village_id aka wref
|
||||
function upd_oasis_to_oasis($village_id, $new_oasis_type){
|
||||
mysqli_begin_transaction($GLOBALS['link']);
|
||||
$q = 'UPDATE `'.TB_PREFIX.'odata` SET `type` = '.$new_oasis_type.' WHERE `wref` = '.$village_id;
|
||||
mysqli_query($GLOBALS['link'], $q);
|
||||
$q2 = 'UPDATE `'.TB_PREFIX.'wdata` SET `oasistype` = '.$new_oasis_type.', `image` = "o'.$new_oasis_type.'" WHERE `id` = '.$village_id;
|
||||
mysqli_query($GLOBALS['link'], $q2);
|
||||
mysqli_query($GLOBALS['link'], 'UPDATE `'.TB_PREFIX.'odata` SET `type` = '.$new_oasis_type.' WHERE `wref` = '.$village_id);
|
||||
mysqli_query($GLOBALS['link'], 'UPDATE `'.TB_PREFIX.'wdata` SET `oasistype` = '.$new_oasis_type.', `image` = "o'.$new_oasis_type.'" WHERE `id` = '.$village_id);
|
||||
mysqli_commit($GLOBALS['link']);
|
||||
}
|
||||
function upd_village_to_village($village_id, $new_village_type){
|
||||
mysqli_query($GLOBALS['link'], 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = '.$new_village_type.', `image` = "t'.$new_village_type.'" WHERE `id` = '.$village_id);
|
||||
}
|
||||
function upd_village_to_oasis($village_id, $new_oasis_type){
|
||||
mysqli_begin_transaction($GLOBALS['link']);
|
||||
mysqli_query($GLOBALS['link'], 'INSERT INTO `'.TB_PREFIX.'odata` (`wref`, `type`, `conqured`, `wood`, `iron`, `clay`, `maxstore`, `crop`, `maxcrop`, `loyalty`, `owner`, `name`, `high`) VALUES ('.$village_id.', '.$new_oasis_type.', 0, 800, 800, 800, 800, 800, 800, 100, 2, "Unoccupied Oasis", '.rand(0, 2).')');
|
||||
mysqli_query($GLOBALS['link'], 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = 0, `oasistype` = '.$new_oasis_type.', `image` = "o'.$new_oasis_type.'" WHERE `id` = '.$village_id);
|
||||
mysqli_commit($GLOBALS['link']);
|
||||
}
|
||||
function upd_oasis_to_village($village_id, $new_village_type){
|
||||
mysqli_begin_transaction($GLOBALS['link']);
|
||||
mysqli_query($GLOBALS['link'], 'DELETE FROM `'.TB_PREFIX.'odata` WHERE `wref` = '.$village_id);
|
||||
mysqli_query($GLOBALS['link'], 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = '.$new_village_type.', `oasistype` = 0, `image` = "t'.rand(0, 8).'" WHERE `id` = '.$village_id);
|
||||
mysqli_commit($GLOBALS['link']);
|
||||
}
|
||||
|
||||
$msg = ''; $coord_x = 0; $coord_y = 0; $search_result = ''; $edit_form = '';
|
||||
|
||||
function upd_village_to_village($village_id, $new_village_type){ // $village_id aka wref
|
||||
//mysqli_begin_transaction($GLOBALS['link']);
|
||||
//$q = '';
|
||||
//mysqli_query($GLOBALS['link'], $q);
|
||||
$q2 = 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = '.$new_village_type.', `image` = "t'.$new_village_type.'" WHERE `id` = '.$village_id;
|
||||
mysqli_query($GLOBALS['link'], $q2);
|
||||
//mysqli_commit($GLOBALS['link']);
|
||||
function oasis_type_by_id($id){
|
||||
$map=[1=>'+25% Lumber',2=>'+25% Lumber',3=>'+25% Lumber +25% Crop',4=>'+25% Clay',5=>'+25% Clay',6=>'+25% Clay +25% Crop',7=>'+25% Iron',8=>'+25% Iron',9=>'+25% Iron +25% Crop',10=>'+25% Crop',11=>'+25% Crop',12=>'+50% Crop'];
|
||||
return $map[$id]??'undefined';
|
||||
}
|
||||
function village_type_by_fieldtype_id($id){
|
||||
$map=[1=>'3-3-3-9',2=>'3-4-5-6',3=>'4-4-4-6',4=>'4-5-3-6',5=>'5-3-4-6',6=>'1-1-1-15',7=>'4-4-3-7',8=>'3-4-4-7',9=>'4-3-4-7',10=>'3-5-4-6',11=>'4-3-5-6',12=>'5-4-3-6'];
|
||||
return $map[$id]??'undefined';
|
||||
}
|
||||
|
||||
|
||||
function upd_village_to_oasis($village_id, $new_oasis_type){ // $village_id aka wref
|
||||
mysqli_begin_transaction($GLOBALS['link']);
|
||||
//$q = 'INSERT INTO `'.TB_PREFIX.'odata` (`wref`, `type`, `conqured`, `wood`, `iron`, `clay`, `maxstore`, `crop`, `maxcrop`, `lastupdated`, `lastupdated2`, `loyalty`, `owner`, `name`, `high`) VALUES ('.$village_id.', '.$new_oasis_type.', 0, 800, 800, 800, 800, 800, 800, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, 100, 2, "Unoccupied Oasis", '.rand(0, 2).')'; // todo fix maxstore + maxcrop
|
||||
$q = 'INSERT INTO `'.TB_PREFIX.'odata` (`wref`, `type`, `conqured`, `wood`, `iron`, `clay`, `maxstore`, `crop`, `maxcrop`, `loyalty`, `owner`, `name`, `high`) VALUES ('.$village_id.', '.$new_oasis_type.', 0, 800, 800, 800, 800, 800, 800, 100, 2, "Unoccupied Oasis", '.rand(0, 2).')'; // todo fix maxstore + maxcrop
|
||||
mysqli_query($GLOBALS['link'], $q);
|
||||
$q2 = 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = 0, `oasistype` = '.$new_oasis_type.', `image` = "o'.$new_oasis_type.'" WHERE `id` = '.$village_id;
|
||||
mysqli_query($GLOBALS['link'], $q2);
|
||||
mysqli_commit($GLOBALS['link']);
|
||||
}
|
||||
|
||||
|
||||
function upd_oasis_to_village($village_id, $new_village_type){ // $village_id aka wref
|
||||
mysqli_begin_transaction($GLOBALS['link']);
|
||||
$q = 'DELETE FROM `'.TB_PREFIX.'odata` WHERE `wref` = '.$village_id;
|
||||
mysqli_query($GLOBALS['link'], $q);
|
||||
$q2 = 'UPDATE `'.TB_PREFIX.'wdata` SET `fieldtype` = '.$new_village_type.', `oasistype` = 0, `image` = "t'.rand(0, 8).'" WHERE `id` = '.$village_id;
|
||||
mysqli_query($GLOBALS['link'], $q2);
|
||||
mysqli_commit($GLOBALS['link']);
|
||||
}
|
||||
|
||||
|
||||
$msg = '';
|
||||
$coord_x = 0;
|
||||
$coord_y = 0;
|
||||
$search_result = '';
|
||||
$edit_form = '';
|
||||
|
||||
//print_r($_GET);
|
||||
//print_r($_POST);
|
||||
|
||||
// todo mv to other file with functions
|
||||
function oasis_type_by_id($oasis_type_id){
|
||||
if($oasis_type_id == 1){
|
||||
return '+25% Lumber';
|
||||
}else if($oasis_type_id == 2){
|
||||
return '+25% Lumber'; // todo think maybe add +50% instead the same +25% ?
|
||||
}else if($oasis_type_id == 3){
|
||||
return '+25% Lumber +25% Crop';
|
||||
}else if($oasis_type_id == 4){
|
||||
return '+25% Clay';
|
||||
}else if($oasis_type_id == 5){
|
||||
return '+25% Clay';
|
||||
}else if($oasis_type_id == 6){
|
||||
return '+25% Clay +25% Crop';
|
||||
}else if($oasis_type_id == 7){
|
||||
return '+25% Iron';
|
||||
}else if($oasis_type_id == 8){
|
||||
return '+25% Iron';
|
||||
}else if($oasis_type_id == 9){
|
||||
return '+25% Iron +25% Crop';
|
||||
}else if($oasis_type_id == 10){
|
||||
return '+25% Crop';
|
||||
}else if($oasis_type_id == 11){
|
||||
return '+25% Crop';
|
||||
}else if($oasis_type_id == 12){
|
||||
return '+50% Crop';
|
||||
function gen_map_tiles_select_list_form($is_ocuppied,$is_oasis,$oasis_type,$fieldtype,$x,$y){
|
||||
$not_ocuppied =!$is_ocuppied;
|
||||
$html = '<div class="tile-edit"><b>New Map Tile Type</b><form method="post" action="?p=map_tile&do_save"><select name="new_field_type" class="tile-select">';
|
||||
if($is_oasis){
|
||||
for($i=1;$i<13;$i++){ $sel=($i==$oasis_type)?' selected':''; $html.='<option value="'.$i.'_0"'.$sel.'>['.$i.'] Oasis '.oasis_type_by_id($i).'</option>'; }
|
||||
if($not_ocuppied){ for($i=1;$i<13;$i++){ $html.='<option value="'.$i.'_1">['.$i.'] Valley '.village_type_by_fieldtype_id($i).'</option>'; } }
|
||||
}else{
|
||||
return 'undefined';
|
||||
if($not_ocuppied){ for($i=1;$i<13;$i++){ $html.='<option value="'.$i.'_0">['.$i.'] Oasis '.oasis_type_by_id($i).'</option>'; } }
|
||||
for($i=1;$i<13;$i++){ $sel=($i==$fieldtype)?' selected':''; $html.='<option value="'.$i.'_1"'.$sel.'>['.$i.'] Valley '.village_type_by_fieldtype_id($i).'</option>'; }
|
||||
}
|
||||
$html.='</select><input type="hidden" name="x" value="'.$x.'"><input type="hidden" name="y" value="'.$y.'"><button type="submit" name="save" class="btn-save">Save</button></form></div>';
|
||||
return $html;
|
||||
}
|
||||
|
||||
// fieldtype =
|
||||
// 0 = oasis ?
|
||||
// 1+ = village - valley ?
|
||||
|
||||
function village_type_by_fieldtype_id($village_fieldtype_id){ // fieldtype (and image aka t0, t1, .. - can be any?)
|
||||
// 1 = 3-3-3-9
|
||||
// 2 = 3-4-5-6
|
||||
// 3 = 4-4-4-6
|
||||
// 4 = 4-5-3-6
|
||||
// 5 = 5-3-4-6
|
||||
// 6 = 1-1-1-15 // todo add 0-0-0-18 (with few resources for 0 fields)
|
||||
// 7 = 4-4-3-7
|
||||
// 8 = 3-4-4-7
|
||||
// 9 = 4-3-4-7
|
||||
// 10 = 3-5-4-6
|
||||
// 11 = 4-3-5-6
|
||||
// 12 = 5-4-3-6
|
||||
if($village_fieldtype_id == 1){
|
||||
return '3-3-3-9';
|
||||
}else if($village_fieldtype_id == 2){
|
||||
return '3-4-5-6'; // todo think maybe add +50% instead the same +25% ?
|
||||
}else if($village_fieldtype_id == 3){
|
||||
return '4-4-4-6';
|
||||
}else if($village_fieldtype_id == 4){
|
||||
return '4-5-3-6';
|
||||
}else if($village_fieldtype_id == 5){
|
||||
return '5-3-4-6';
|
||||
}else if($village_fieldtype_id == 6){
|
||||
return '1-1-1-15'; // todo add 0-0-0-18 (with few resources for 0 fields)
|
||||
}else if($village_fieldtype_id == 7){
|
||||
return '4-4-3-7';
|
||||
}else if($village_fieldtype_id == 8){
|
||||
return '3-4-4-7';
|
||||
}else if($village_fieldtype_id == 9){
|
||||
return '4-3-4-7';
|
||||
}else if($village_fieldtype_id == 10){
|
||||
return '3-5-4-6';
|
||||
}else if($village_fieldtype_id == 11){
|
||||
return '4-3-5-6';
|
||||
}else if($village_fieldtype_id == 12){
|
||||
return '5-4-3-6';
|
||||
if(isset($_GET['do_save'])){
|
||||
$new = explode('_', $_POST['new_field_type']);
|
||||
$new_type=(int)$new[0]; $new_is=(int)$new[1];
|
||||
$coord_x=max(-WORLD_MAX,min(WORLD_MAX,(int)$_POST['x'])); $coord_y=max(-WORLD_MAX,min(WORLD_MAX,(int)$_POST['y']));
|
||||
$row=get_map_tile_info($coord_x,$coord_y); $is_village=($row['oasistype']==0);
|
||||
if($is_village && $row['owner_id'] && $row['owner_id']!=2){ $msg='Can not change map tile type for village that exists!'; }
|
||||
elseif(($is_village && $new_is==1 && $row['fieldtype']==$new_type) || (!$is_village && $new_is==0 && $row['oasistype']==$new_type)){ $msg='Can not change to the same field type!'; }
|
||||
else{
|
||||
if($is_village && $new_is==0) upd_village_to_oasis($row['village_id'],$new_type);
|
||||
elseif(!$is_village && $new_is==1) upd_oasis_to_village($row['village_id'],$new_type);
|
||||
elseif(!$is_village && $new_is==0) upd_oasis_to_oasis($row['village_id'],$new_type);
|
||||
else upd_village_to_village($row['village_id'],$new_type);
|
||||
}
|
||||
if($msg=='') $msg='Saved!';
|
||||
}
|
||||
elseif(isset($_GET['do_get']) && isset($_POST['x'])){
|
||||
$coord_x=max(-WORLD_MAX,min(WORLD_MAX,(int)$_POST['x'])); $coord_y=max(-WORLD_MAX,min(WORLD_MAX,(int)$_POST['y']));
|
||||
$row=get_map_tile_info($coord_x,$coord_y); $is_village=($row['oasistype']==0);
|
||||
if($is_village){
|
||||
$bonus='<b>type:</b> ['.$row['fieldtype'].'] '.village_type_by_fieldtype_id($row['fieldtype']);
|
||||
if(!$row['owner_id'] || $row['owner_id']==2){ $place='Abandoned Valley'; $owner=''; $edit_form=gen_map_tiles_select_list_form(false,false,false,$row['fieldtype'],$coord_x,$coord_y); }
|
||||
else{ $place='Village'; $owner='<b>owner:</b> <a href="?p=player&uid='.$row['owner_id'].'">'.$row['username'].' [id: '.$row['owner_id'].']</a>'; $edit_form=gen_map_tiles_select_list_form(true,false,false,$row['fieldtype'],$coord_x,$coord_y); }
|
||||
}else{
|
||||
return 'undefined';
|
||||
$bonus='<b>bonus:</b> ['.$row['oasistype'].'] '.oasis_type_by_id($row['oasistype']);
|
||||
if(!$row['owner_id'] || $row['owner_id']==2){ $place='Unoccupied Oasis'; $owner=''; $edit_form=gen_map_tiles_select_list_form(false,true,$row['oasistype'],false,$coord_x,$coord_y); }
|
||||
else{ $place='Occupied Oasis'; $owner='<b>owner:</b> <a href="?p=player&uid='.$row['owner_id'].'">'.$row['username'].' [id: '.$row['owner_id'].']</a>'; $edit_form=gen_map_tiles_select_list_form(true,true,$row['oasistype'],false,$coord_x,$coord_y); }
|
||||
}
|
||||
$search_result='<div class="tile-card"><div class="tile-preview"><div class="map"><div id="map"><div id="map_content"><div class="'.$row['image'].'"></div></div></div></div></div><div class="tile-info"><div class="info-row"><span>X</span><b>'.$coord_x.'</b></div><div class="info-row"><span>Y</span><b>'.$coord_y.'</b></div><div class="info-row"><span>Type</span><b>'.$place.'</b></div><div class="info-row"><span>Detail</span><b>'.$bonus.'</b></div>'.($owner?'<div class="info-row"><span>Owner</span><b>'.$owner.'</b></div>':'').'</div></div>';
|
||||
}
|
||||
|
||||
|
||||
function gen_map_tiles_select_list_form($is_ocuppied, $is_oasis_tile_type, $oasis_type, $fieldtype, $coord_x, $coord_y){
|
||||
// if ocuppied village --can change only to other $fieldtype (cannot change to oasis)
|
||||
// if ocuppied oasis -- can change only to other $oasis_type (cannot change to village field - valley)
|
||||
// unoccypied can change to oasis, to village field, and back
|
||||
$not_ocuppied = (!($is_ocuppied));
|
||||
$result = '<br><hr><br>'.
|
||||
'<b>New Map Tile Type</b>:<br>'.
|
||||
'<form name="new_tile_type" method="post" action="?p=map_tile&do_save" style="padding-top:10px">'.
|
||||
'<select name="new_field_type">';
|
||||
if($is_oasis_tile_type){
|
||||
for($i = 1; $i < 13; $i++){
|
||||
$oasis_txt = oasis_type_by_id($i);
|
||||
$selected = ($i == $oasis_type) ? ' selected' : '';
|
||||
$result .= '<option value="'.$i.'_0"'.$selected.'>['.$i.'] Oasis '.$oasis_txt.'</option>'; // value "x_0" -- 0 for oasis
|
||||
}
|
||||
if($not_ocuppied){
|
||||
for($i = 1; $i < 13; $i++){
|
||||
$village_field_type_txt = village_type_by_fieldtype_id($i);
|
||||
$result .= '<option value="'.$i.'_1">['.$i.'] Valley ' .$village_field_type_txt.'</option>'; // value "x_1" -- 1 for village - valley filed type
|
||||
}
|
||||
}
|
||||
|
||||
}else{ // village fieldtype
|
||||
if($not_ocuppied){
|
||||
for($i = 1; $i < 13; $i++){
|
||||
$oasis_txt = oasis_type_by_id($i);
|
||||
$result .= '<option value="'.$i.'_0">['.$i.'] Oasis '.$oasis_txt.'</option>'; // value "x_0" -- 0 for oasis
|
||||
}
|
||||
}
|
||||
for($i = 1; $i < 13; $i++){
|
||||
$village_field_type_txt = village_type_by_fieldtype_id($i);
|
||||
$selected = ($i == $fieldtype) ? ' selected' : '';
|
||||
$result .= '<option value="'.$i.'_1"'.$selected.'>['.$i.'] Valley '.$village_field_type_txt.'</option>'; // value "x_1" -- 1 for village - valley filed type
|
||||
}
|
||||
}
|
||||
$result .= '</select>'.
|
||||
'<input type="image" id="btn_save" class="dynamic_img" value="save" name="save" src="/img/x.gif" alt="Save">'.
|
||||
'<input type="hidden" name="x" value="'.$coord_x.'">'.
|
||||
'<input type="hidden" name="y" value="'.$coord_y.'">'.
|
||||
'</form>';
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(isset($_GET['do_save'])){ // update map tile type
|
||||
//print_r($_POST); // Array ( [new_field_type] => 2_1 [save_x] => 29 [save_y] => 18 [x] => 0 [y] => 1 )
|
||||
|
||||
$new_tile_numbers = explode('_', $_POST['new_field_type']);
|
||||
$new_tile_is_type = (int) $new_tile_numbers[0]; // oasis field type OR village - valley - field type
|
||||
$new_tile_is_oasis_or_village = (int) $new_tile_numbers[1]; // 0 - oasis, 1 - village - valley - field
|
||||
|
||||
$coord_x = (int) $_POST['x'];
|
||||
$coord_y = (int) $_POST['y'];
|
||||
if($coord_x > WORLD_MAX){ $coord_x = WORLD_MAX; }
|
||||
if($coord_x < (-WORLD_MAX)){ $coord_x = (-WORLD_MAX); }
|
||||
if($coord_y > WORLD_MAX){ $coord_y = WORLD_MAX; }
|
||||
if($coord_y < (-WORLD_MAX)){ $coord_y = (-WORLD_MAX); }
|
||||
|
||||
$row = get_map_tile_info($coord_x, $coord_y);
|
||||
|
||||
$is_not_oasis_tile_type = ($row['oasistype'] == 0); // not oasis but village - valley - field
|
||||
|
||||
if($is_not_oasis_tile_type && $row['owner_id'] && ($row['owner_id'] != 2) ){
|
||||
$msg = 'Can not change map tile type for village that exists!<br>'; // todo add this feature as other option
|
||||
|
||||
}else if( ($is_not_oasis_tile_type && ($new_tile_is_oasis_or_village == 1) && ($row['fieldtype'] == $new_tile_is_type) ) ||
|
||||
( (!($is_not_oasis_tile_type)) && ($new_tile_is_oasis_or_village == 0) && ($row['oasistype'] == $new_tile_is_type) ) ){ // check new tile not same as old tile
|
||||
$msg = 'Can not change to the same field type!<br>';
|
||||
|
||||
}else if($is_not_oasis_tile_type && ($new_tile_is_oasis_or_village == 0) ){ // old tile was not oasis - new is oasis
|
||||
upd_village_to_oasis($row['village_id'], $new_tile_is_type);
|
||||
|
||||
}else if( (!($is_not_oasis_tile_type)) && ($new_tile_is_oasis_or_village == 1) ){ // old tile was oasis - new is village
|
||||
upd_oasis_to_village($row['village_id'], $new_tile_is_type);
|
||||
|
||||
}else if( (!($is_not_oasis_tile_type)) && ($new_tile_is_oasis_or_village == 0) ){ // from same to same - from oasis to oasis
|
||||
upd_oasis_to_oasis($row['village_id'], $new_tile_is_type);
|
||||
|
||||
}else{ // from same to same - from village valley to village valley
|
||||
upd_village_to_village($row['village_id'], $new_tile_is_type);
|
||||
}
|
||||
if($msg == ''){ $msg = 'Saved!<br>'; }
|
||||
|
||||
|
||||
|
||||
}else if(isset($_GET['do_get']) && isset($_POST['x']) && isset($_POST['y'])){ // get and show map tile type
|
||||
$coord_x = (int) $_POST['x'];
|
||||
$coord_y = (int) $_POST['y'];
|
||||
if($coord_x > WORLD_MAX){ $coord_x = WORLD_MAX; }
|
||||
if($coord_x < (-WORLD_MAX)){ $coord_x = (-WORLD_MAX); }
|
||||
if($coord_y > WORLD_MAX){ $coord_y = WORLD_MAX; }
|
||||
if($coord_y < (-WORLD_MAX)){ $coord_y = (-WORLD_MAX); }
|
||||
|
||||
$row = get_map_tile_info($coord_x, $coord_y);
|
||||
|
||||
//print_r($row);
|
||||
|
||||
$is_not_oasis_tile_type = ($row['oasistype'] == 0);
|
||||
|
||||
if($is_not_oasis_tile_type){ // not oasis map tile
|
||||
$bonus_or_type = '<b>type:</b> ['.$row['fieldtype'].'] '.village_type_by_fieldtype_id( $row['fieldtype'] );
|
||||
if( is_null($row['owner_id']) || ($row['owner_id'] == 2) ){
|
||||
$place_type = 'Abandoned Valley';
|
||||
$owner = '';
|
||||
//$edit_form = gen_map_tiles_select_list_form($is_ocuppied, $is_oasis, $oasistype_id, $row['fieldtype'], $coord_x, $coord_y);
|
||||
$edit_form = gen_map_tiles_select_list_form(false, false, false, $row['fieldtype'], $coord_x, $coord_y);
|
||||
}else{
|
||||
$place_type = 'Village';
|
||||
$owner = '<b>owner:</b> <a href="?p=player&uid='.$row['owner_id'].'" target="_blank">'.$row['username'].' [id: '.$row['owner_id'].']</a><br>';
|
||||
//$edit_form = gen_map_tiles_select_list_form($is_ocuppied, $is_oasis, $oasistype_id, $row['fieldtype'], $coord_x, $coord_y);
|
||||
$edit_form = gen_map_tiles_select_list_form(true, false, false, $row['fieldtype'], $coord_x, $coord_y);
|
||||
}
|
||||
|
||||
}else{ // oasis map tile
|
||||
$bonus_or_type = '<b>bonus:</b> ['.$row['oasistype'].'] '.oasis_type_by_id( $row['oasistype'] );
|
||||
if( is_null($row['owner_id']) || ($row['owner_id'] == 2) ){ // todo check why $row['occupied'] == 0 for ocuppied oasis // todo use only owner_id / status -- not save 'Nature'/'oasis' texts in db
|
||||
$place_type = 'Unocuppied oasis';
|
||||
//$owner = '<b>owner:</b> <a href="?p=player&uid='.$row['owner_id'].'" target="_blank">'.$row['username'].' [id: '.$row['owner_id'].']</a><br>'; // Nature
|
||||
$owner = '';
|
||||
|
||||
//$edit_form = gen_map_tiles_select_list_form($is_ocuppied, $is_oasis, $row['oasistype'], $village_filedtype_id, $coord_x, $coord_y);
|
||||
$edit_form = gen_map_tiles_select_list_form(false, true, $row['oasistype'], false, $coord_x, $coord_y);
|
||||
}else{
|
||||
$place_type = 'Occupied oasis';
|
||||
$owner = '<b>owner:</b> <a href="?p=player&uid='.$row['owner_id'].'" target="_blank">'.$row['username'].' [id: '.$row['owner_id'].']</a><br>';
|
||||
//$edit_form = gen_map_tiles_select_list_form($is_ocuppied, $is_oasis, $row['oasistype'], $village_filedtype_id, $coord_x, $coord_y);
|
||||
$edit_form = gen_map_tiles_select_list_form(true, true, $row['oasistype'], false, $coord_x, $coord_y);
|
||||
}
|
||||
}
|
||||
|
||||
$search_result = '<link href="/css/compact.css" rel="stylesheet">'.
|
||||
'<p>'.
|
||||
'<b>x:</b> '.$coord_x.'<br>'.
|
||||
'<b>y:</b> '.$coord_y.'<br>'.
|
||||
'<b>type:</b> '.$place_type.'<br>'.
|
||||
$bonus_or_type.'<br>'.$owner.
|
||||
'</p>'.
|
||||
'<div class="map">'.
|
||||
'<div id="map">'.
|
||||
'<div id="map_content">'.
|
||||
'<div class="'.$row['image'].'"></div>'.
|
||||
'</div>'.
|
||||
'</div>'.
|
||||
'</div>';
|
||||
|
||||
|
||||
//}else{ // show begin search map tile form
|
||||
|
||||
}
|
||||
|
||||
echo $search_result;
|
||||
?>
|
||||
|
||||
<link href="/css/admin_map_tile.css" rel="stylesheet">
|
||||
<style>
|
||||
/* === MAP TILE MODERN OVERRIDE === */
|
||||
.tile-wrapper{max-width:760px !important;margin:12px 0 !important;font-family:system-ui,-apple-system,Segoe UI,Roboto !important}
|
||||
.tile-form{background:#fff !important;border:1px solid #e5e7eb !important;border-radius:12px !important;padding:16px !important;margin-bottom:14px !important;box-shadow:0 1px 3px rgba(0,0,0,.05) !important}
|
||||
.coord-wrap{display:flex !important;align-items:center !important;gap:14px !important}
|
||||
.coord-item{display:flex !important;align-items:center !important;gap:6px !important}
|
||||
.coord-item b{color:#0f172a !important;font-weight:700 !important;font-size:15px !important}
|
||||
.coord-item input.text{width:90px !important;height:38px !important;padding:0 10px !important;border:1px solid #d1d5db !important;border-radius:8px !important;text-align:center !important;background:#fff !important;color:#111 !important}
|
||||
.btn-go{height:38px !important;padding:0 18px !important;background:#0f172a !important;color:#fff !important;border:0 !important;border-radius:8px !important;font-weight:600 !important;cursor:pointer !important}
|
||||
|
||||
<div id="map_coords">
|
||||
<!--<form name="map_coords" method="post" action="./Mods/edit_map_tile.php" style="padding-top:10px">-->
|
||||
<form name="map_coords" method="post" action="?p=map_tile&do_get" style="padding-top:10px">
|
||||
<span><b>x</b> </span><input id="x" class="text fm" name="x" style="width:30px" value="<?php echo $coord_x; ?>" maxlength="4">
|
||||
<span><b>y</b> </span><input id="y" class="text fm" name="y" style="width:30px" value="<?php echo $coord_y; ?>" maxlength="4">
|
||||
<!-- <input type="hidden" name="do_get"> -->
|
||||
<input type="image" id="btn_ok" class="dynamic_img" value="ok" name="btn" src="/img/x.gif" alt="OK"><br><br>
|
||||
<?php
|
||||
/* card info */
|
||||
.tile-card{background:#fff !important;border:1px solid #e5e7eb !important;border-radius:12px !important;padding:16px !important;margin-bottom:14px !important;display:grid !important;grid-template-columns:110px 1fr !important;gap:16px !important;align-items:start !important}
|
||||
.tile-preview .map{transform:scale(0.85) !important;transform-origin:top left !important}
|
||||
.tile-info{display:flex !important;flex-direction:column !important;gap:6px !important}
|
||||
.info-row{display:grid !important;grid-template-columns:70px 1fr !important;padding:4px 0 !important;border-bottom:1px dashed #f1f5f9 !important}
|
||||
.info-row:last-child{border:0 !important}
|
||||
.info-row span{color:#64748b !important;font-size:13px !important}
|
||||
.info-row b{color:#0f172a !important;font-weight:600 !important}
|
||||
.info-row b a{color:#16a34a !important;text-decoration:none !important;font-weight:600 !important}
|
||||
|
||||
echo $msg;
|
||||
/* edit form */
|
||||
.tile-edit{background:#fff !important;border:1px solid #e5e7eb !important;border-radius:12px !important;padding:16px !important}
|
||||
.tile-edit b{display:block !important;margin-bottom:8px !important;color:#0f172a !important;font-size:15px !important}
|
||||
.tile-edit form{display:flex !important;gap:10px !important;align-items:center !important;flex-wrap:wrap !important}
|
||||
.tile-select{
|
||||
flex:1 !important;min-width:220px !important;height:40px !important;
|
||||
padding:0 12px !important;border:1px solid #d1d5db !important;border-radius:8px !important;
|
||||
background:#fff !important;color:#111 !important;font-size:14px !important;
|
||||
appearance:none !important;-webkit-appearance:none !important;
|
||||
}
|
||||
.btn-save{
|
||||
height:40px !important;padding:0 20px !important;
|
||||
background:#0f172a !important;color:#fff !important;
|
||||
border:0 !important;border-radius:8px !important;font-weight:600 !important;
|
||||
cursor:pointer !important;white-space:nowrap !important
|
||||
}
|
||||
.btn-save:hover{opacity:.9 !important}
|
||||
|
||||
?>
|
||||
</form>
|
||||
<?php
|
||||
/* mesaje */
|
||||
.msg-box{padding:10px 12px !important;border-radius:8px !important;margin:10px 0 !important;font-weight:600 !important}
|
||||
.msg-ok{background:#f0fdf4 !important;color:#166534 !important;border:1px solid #bbf7d0 !important}
|
||||
.msg-err{background:#fef2f2 !important;color:#991b1b !important;border:1px solid #fecaca !important}
|
||||
</style>
|
||||
|
||||
echo $edit_form;
|
||||
<div class="tile-wrapper">
|
||||
<form class="tile-form" method="post" action="?p=map_tile&do_get">
|
||||
<div class="coord-wrap">
|
||||
<div class="coord-item">
|
||||
<b>X</b>
|
||||
<input class="text" name="x" value="<?=$coord_x?>" maxlength="4">
|
||||
</div>
|
||||
<div class="coord-item">
|
||||
<b>Y</b>
|
||||
<input class="text" name="y" value="<?=$coord_y?>" maxlength="4">
|
||||
</div>
|
||||
<button class="btn-go" type="submit">Check Tile</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
?>
|
||||
</div>
|
||||
<?php if($msg){ $cls = ($msg=='Saved!')?'msg-ok':'msg-err'; echo '<div class="msg-box '.$cls.'">'.$msg.'</div>'; }?>
|
||||
|
||||
<?=$search_result?>
|
||||
<?=$edit_form?>
|
||||
</div>
|
||||
|
||||
<link href="/css/admin_map_tile.css" rel="stylesheet">
|
||||
+73
-27
@@ -2,36 +2,82 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename message.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : message.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
|
||||
|
||||
$nid = $_GET['nid']?? '';
|
||||
$bid = $_GET['bid']?? '';
|
||||
?>
|
||||
<style>
|
||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||
.message-wrap{max-width:900px;margin:20px auto;font-family:Verdana}
|
||||
.message-head{display:flex;align-items:center;gap:8px;margin-bottom:16px}
|
||||
.message-head svg{width:24px;height:24px}
|
||||
.message-head h2{margin:0;font-size:18px}
|
||||
.message-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:12px}
|
||||
.msg-card{background:#fff;border:1px solid #ddd;border-radius:8px;padding:14px;box-shadow:0 1px 3px rgba(0,0,0,.05)}
|
||||
.msg-card h3{margin:0 0 10px;font-size:14px;display:flex;align-items:center;gap:6px;color:#333}
|
||||
.msg-card form{display:flex;gap:6px}
|
||||
.msg-card input[type="text"]{flex:1;padding:8px 10px;border:1px solid #ccc;border-radius:6px;font-size:13px}
|
||||
.msg-card button{background:#333;color:#fff;border:0;padding:8px 12px;border-radius:6px;cursor:pointer;font-weight:bold}
|
||||
.msg-card button:hover{background:#000}
|
||||
.msg-card.igm{border-left:4px solid #3498db}
|
||||
.msg-card.report{border-left:4px solid #e67e22}
|
||||
.result-wrap{margin-top:20px}
|
||||
</style>
|
||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css">
|
||||
<table id="member" style="width:225px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">IGM/Reports</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr>
|
||||
<td>IGM ID</td>
|
||||
<td><form action="" method="get"><input type="hidden" name="p" value="message"><input type="text" class="fm" name="nid" value="<?php echo $_GET['nid'];?>"> <input type="image" value="submit" src="../img/admin/b/ok1.gif"></form></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Report ID</td>
|
||||
<td><form action="" method="get"><input type="hidden" name="p" value="message"><input type="text" class="fm" name="bid" value="<?php echo $_GET['bid'];?>"> <input type="image" value="submit" src="../img/admin/b/ok1.gif"></form></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
|
||||
<?php
|
||||
if($_GET['nid'] && is_numeric($_GET['nid'])) include('msg.tpl');
|
||||
elseif($_GET['bid'] && is_numeric($_GET['bid'])) include('report.tpl');
|
||||
?>
|
||||
<div class="message-wrap">
|
||||
<div class="message-head">
|
||||
<!-- ICON INLINE -->
|
||||
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 6h16v10H7l-3 3V6z" fill="#555"/>
|
||||
</svg>
|
||||
<h2>IGM / Reports Lookup</h2>
|
||||
</div>
|
||||
|
||||
<div class="message-grid">
|
||||
<div class="msg-card igm">
|
||||
<h3>
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none"><path d="M4 5h16v10H7l-3 3V5z" fill="#3498db"/></svg>
|
||||
IGM by ID
|
||||
</h3>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="p" value="message">
|
||||
<input type="text" name="nid" placeholder="Enter message ID..." value="<?php echo htmlspecialchars($nid);?>" autofocus>
|
||||
<button type="submit">Go</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="msg-card report">
|
||||
<h3>
|
||||
<svg width="16" height="16" viewBox="0 0 24 24" fill="none"><path d="M6 2h9l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z" fill="#e67e22"/><path d="M14 2v6h6" fill="#d35400"/></svg>
|
||||
Report by ID
|
||||
</h3>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="p" value="message">
|
||||
<input type="text" name="bid" placeholder="Enter report ID..." value="<?php echo htmlspecialchars($bid);?>">
|
||||
<button type="submit">Go</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="result-wrap">
|
||||
<?php
|
||||
if($nid && is_numeric($nid)) include('msg.tpl');
|
||||
elseif($bid && is_numeric($bid)) include('report.tpl');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
+16
-1
@@ -1,6 +1,21 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## msg.tpl - REDESIGN 2025 (stil Reports) ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : msg.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
|
||||
include_once("../GameEngine/Generator.php");
|
||||
|
||||
@@ -1,4 +1,24 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : natars.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$deletedArtifacts = $database->getDeletedArtifacts();
|
||||
?>
|
||||
<style>
|
||||
|
||||
@@ -1,23 +1,52 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : notregistered.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if(!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied");
|
||||
?>
|
||||
<style>
|
||||
.notreg-wrap{max-width:980px;margin:12px auto;font-family:Tahoma,Verdana,Arial,sans-serif}
|
||||
.notreg-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
|
||||
.notreg-wrap{max-width:100%;margin:12px auto;font-family:Tahoma,Verdana,Arial,sans-serif;padding:0 10px;box-sizing:border-box}
|
||||
.notreg-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;flex-wrap:wrap;gap:8px}
|
||||
.notreg-head h2{margin:0;font-size:16px;color:#c0392b;display:flex;align-items:center;gap:6px}
|
||||
.notreg-search input{padding:4px 8px;border:1px solid #bbb;border-radius:14px;font-size:11px;width:180px}
|
||||
.notreg-card{background:#fff;border:1px solid #bbb;border-radius:6px;overflow:hidden}
|
||||
.notreg-table{width:100%;border-collapse:collapse;font-size:11px}
|
||||
.notreg-table th{background:#3a4f63;color:#fff;padding:6px 5px;text-align:left;font-weight:bold;font-size:10px;white-space:nowrap;cursor:pointer}
|
||||
.notreg-table td{padding:5px;border-bottom:1px solid #eee;vertical-align:middle}
|
||||
.notreg-search input{padding:6px 12px;border:1px solid #bbb;border-radius:14px;font-size:12px;width:200px;box-sizing:border-box}
|
||||
.notreg-card{background:#fff;border:1px solid #bbb;border-radius:6px;overflow-x:auto;-webkit-overflow-scrolling:touch}
|
||||
.notreg-table{width:100%;border-collapse:collapse;font-size:12px;min-width:720px}
|
||||
.notreg-table th{background:#3a4f63;color:#fff;padding:8px 6px;text-align:left;font-weight:bold;font-size:11px;white-space:nowrap;position:sticky;top:0;z-index:1}
|
||||
.notreg-table td{padding:7px 6px;border-bottom:1px solid #eee;vertical-align:middle}
|
||||
.notreg-table tr:hover{background:#fff5f5}
|
||||
.notreg-table a{color:#004a9f;text-decoration:none}
|
||||
.notreg-table a{color:#004a9f;text-decoration:none;word-break:break-all}
|
||||
.notreg-table a:hover{text-decoration:underline}
|
||||
.badge-tribe{padding:2px 5px;border-radius:3px;color:#fff;font-size:10px;font-weight:bold}
|
||||
.badge-tribe{padding:3px 6px;border-radius:3px;color:#fff;font-size:10px;font-weight:bold;white-space:nowrap;display:inline-block}
|
||||
.tribe-1{background:#c0392b} .tribe-2{background:#2c3e50} .tribe-3{background:#27ae60}
|
||||
.code{font-family:monospace;background:#f4f4f4;padding:1px 4px;border-radius:2px;font-size:10px}
|
||||
.time{color:#666;font-size:10px}
|
||||
.code{font-family:monospace;background:#f4f4f4;padding:2px 5px;border-radius:3px;font-size:10px;word-break:break-all}
|
||||
.time{color:#666;font-size:10px;white-space:nowrap}
|
||||
|
||||
/* MOBILE FIX */
|
||||
@media (max-width:768px){
|
||||
.notreg-wrap{padding:0 5px}
|
||||
.notreg-head{flex-direction:column;align-items:stretch}
|
||||
.notreg-search input{width:100%}
|
||||
.notreg-table{font-size:11px;min-width:650px}
|
||||
.notreg-table th,.notreg-table td{padding:6px 4px}
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="notreg-wrap">
|
||||
@@ -54,10 +83,10 @@ while($row = mysqli_fetch_assoc($result)) {
|
||||
<td>{$i}</td>
|
||||
<td>{$row['id']}</td>
|
||||
<td><b>".htmlspecialchars($row['username'])."</b></td>
|
||||
<td><a href=\"mailto:{$row['email']}\">{$row['email']}</a></td>
|
||||
<td><a href=\"mailto:{$row['email']}\">".htmlspecialchars($row['email'])."</a></td>
|
||||
<td><span class='badge-tribe {$tclass}'>{$tribe}</span></td>
|
||||
<td><span class='code'>{$row['act']}</span></td>
|
||||
<td>{$row['act2']}</td>
|
||||
<td><span class='code'>".htmlspecialchars($row['act'])."</span></td>
|
||||
<td>".htmlspecialchars($row['act2'])."</td>
|
||||
<td class='time'>{$time}</td>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
@@ -1,6 +1,21 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## online.tpl - REDESIGN 2025 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : online.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
|
||||
$active = $admin->getUserActive();
|
||||
|
||||
+78
-23
@@ -1,15 +1,32 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename player.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## Reworked: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : player.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$id = $_GET['uid'];
|
||||
// --- FIX: Anulează ștergerea direct din tpl ---
|
||||
if(isset($_GET['action']) && $_GET['action'] == 'StopDel' && $id > 0){
|
||||
$database->query("DELETE FROM `".TB_PREFIX."deleting` WHERE `uid` = $id");
|
||||
// redirect ca să dispară ?action din URL
|
||||
header("Location: ?p=player&uid=".$id);
|
||||
exit;
|
||||
}
|
||||
if(isset($id))
|
||||
{
|
||||
include_once("../GameEngine/Ranking.php");
|
||||
@@ -21,41 +38,78 @@ if(isset($id))
|
||||
$varray = $database->getProfileVillages($id);
|
||||
$refreshiconfrm = "../img/admin/refresh.png";
|
||||
$refreshicon = "<img src=\"".$refreshiconfrm."\">";
|
||||
?>
|
||||
<style>
|
||||
/* PLAYER.TPL - GLOBAL 2026 COMPACT */
|
||||
.player-page{font-family:system-ui}
|
||||
.player-page > br,.player-page br{display:none}
|
||||
#profile, .hero-wrap, #member, .ban-history{margin-bottom:10px !important}
|
||||
table.ban-history{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-top:10px;font-family:system-ui}
|
||||
table.ban-history thead tr:first-child th{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:6px 10px;font-weight:600;text-align:left;font-size:13px}
|
||||
table.ban-history thead tr:nth-child(2) td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:4px 8px;border-bottom:1px solid #e5e7eb;font-weight:600}
|
||||
table.ban-history tbody td{padding:3px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#334155;line-height:1.2}
|
||||
table.ban-history tbody tr:last-child td{border-bottom:0}
|
||||
table.ban-history tbody tr:hover td{background:#f8fafc}
|
||||
table.ban-history td.hab{width:18%}
|
||||
table.ban-history td.on{color:#0f172a}
|
||||
.player-bottom{display:block;margin-top:10px;overflow:hidden}
|
||||
.player-bottom > div:first-child{float:left;width:49%}
|
||||
.player-bottom > div:last-child{float:right;width:49%}
|
||||
</style>
|
||||
<div class="player-page">
|
||||
<?php
|
||||
if($user){
|
||||
$totalpop = 0;
|
||||
foreach($varray as $vil) $totalpop += $vil['pop'];
|
||||
|
||||
include('search2.tpl');
|
||||
echo "<br />";
|
||||
$deletion = false;
|
||||
if($deletion) include("playerdeletion.tpl");
|
||||
|
||||
$deletion = false;
|
||||
$delTime = '00:00:00';
|
||||
|
||||
// 1. ia timestamp-ul din tabelul de ștergere
|
||||
$uid = (int)$user['id'];
|
||||
$sql = "SELECT `timestamp` FROM `".TB_PREFIX."deleting` WHERE `uid` = $uid LIMIT 1";
|
||||
$result = $database->query($sql);
|
||||
|
||||
if($result && $row = mysqli_fetch_assoc($result)){
|
||||
if($row['timestamp'] > time()){
|
||||
$deletion = true;
|
||||
|
||||
// 2. calculează cât a mai rămas
|
||||
$remaining = $row['timestamp'] - time();
|
||||
$h = floor($remaining / 3600);
|
||||
$m = floor(($remaining % 3600) / 60);
|
||||
$s = $remaining % 60;
|
||||
$delTime = sprintf("%02d:%02d:%02d", $h, $m, $s);
|
||||
}
|
||||
}
|
||||
|
||||
// 3. afișează doar dacă e în proces
|
||||
if($deletion){
|
||||
include("playerdeletion.tpl");
|
||||
}
|
||||
|
||||
include("playerinfo.tpl");
|
||||
include("playerheroinfo.tpl");
|
||||
include("playeradditionalinfo.tpl");
|
||||
echo "<br />";
|
||||
include("playeradditionalinfo.tpl");
|
||||
|
||||
include("playermedals.tpl");
|
||||
include ("villages.tpl"); ?>
|
||||
|
||||
<div style="float: left;">
|
||||
<?php
|
||||
include ('punish.tpl');
|
||||
?>
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<?php
|
||||
include ('add_village.tpl');
|
||||
?>
|
||||
<div class="player-bottom">
|
||||
<div><?php include ('punish.tpl'); ?></div>
|
||||
<div><?php include ('add_village.tpl'); ?></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."banlist WHERE uid = ".(int) $id."";
|
||||
$numbans = mysqli_num_rows(mysqli_query($GLOBALS["link"], $sql));
|
||||
?>
|
||||
<table id="member" cellpadding="1" cellspacing="1">
|
||||
<table class="ban-history" cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="6">Ban History (<?php echo $numbans; ?>)</th>
|
||||
<th colspan="4">Ban History (<?php echo $numbans; ?>)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hab"><b>Start</b></td>
|
||||
@@ -73,13 +127,14 @@ if(isset($id))
|
||||
<tr>
|
||||
<td class="hab">'.date('d:m:Y H:i', $row['time']).'</td>
|
||||
<td class="hab">'.date('d:m:Y H:i', $row['end']).'</td>
|
||||
<td class="hab">'.round((($row['end'] - $row['time']) / 3600), 2).' minutes</td>
|
||||
<td class="hab">'.round((($row['end'] - $row['time']) / 3600), 2).' hours</td>
|
||||
<td class="on">'.$row['reason'].'</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
else include("404.tpl");
|
||||
|
||||
@@ -1,138 +1,91 @@
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Additional Information <a href='admin.php?p=editAdditional&uid=<?php echo $id; ?>'><img src="../img/admin/edit.gif" title="Edit Player Additional Info"></a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Access</td>
|
||||
<td>
|
||||
<?php
|
||||
if($user['access'] == 0)
|
||||
{
|
||||
echo "Banned";
|
||||
}
|
||||
else if($user['access'] == 2)
|
||||
{
|
||||
echo "Normal user";
|
||||
}
|
||||
else if($user['access'] == 8)
|
||||
{
|
||||
echo "<b>Multihunter</b>";
|
||||
}
|
||||
else if($user['access'] == 9)
|
||||
{
|
||||
echo "<b>Administrator</b>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vacation Mode</td>
|
||||
<td>
|
||||
<?php
|
||||
if($user['vac_mode'] == 0)
|
||||
{
|
||||
echo "Disabled";
|
||||
}
|
||||
else if($user['vac_mode'] == 1)
|
||||
{
|
||||
echo "Enabled";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gold</td>
|
||||
<td><img src="../img/admin/gold.gif"> <?php echo $user['gold']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sitter 1</td>
|
||||
<td>
|
||||
<?php
|
||||
if($user['sit1'] >= 1)
|
||||
{
|
||||
echo '<a href="admin.php?p=player&uid='.$user['sit1'].'">'.$database->getUserField($user['sit1'],"username",0).'</a>';
|
||||
}
|
||||
else if($user['sit1'] == 0)
|
||||
{
|
||||
echo 'No Sitter';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sitter 2</td>
|
||||
<td>
|
||||
<?php
|
||||
if($user['sit2'] >= 1)
|
||||
{
|
||||
echo '<a href="admin.php?p=player&uid='.$user['sit2'].'">'.$database->getUserField($user['sit2'],"username",0).'</a>';
|
||||
}
|
||||
else if($user['sit2'] == 0)
|
||||
{
|
||||
echo 'No Sitter';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Beginners Protection</td>
|
||||
<td>
|
||||
<?php
|
||||
$datetime = $user['protect'];
|
||||
$now = time();
|
||||
if($datetime ==0)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Protection</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($datetime <= $now)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Protection</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$tsdiffact = $datetime - $now;
|
||||
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
|
||||
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['protect']+3600*2).'">';
|
||||
echo "<font color=\"blue\"> $timetoecho</font>";
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Culture Points</td>
|
||||
<td><?php echo round($user['cp'], 0);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Last Activity</td>
|
||||
<td><?php echo date('d.m.Y H:i',$user['timestamp']+3600*2);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Attack Points ("This "Week")</td>
|
||||
<td><?php echo $user['ap'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Defence Points ("This Week")</td>
|
||||
<td><?php echo $user['dp'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Resources Raided ("This Week")</td>
|
||||
<td><?php echo $user['RR'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Attack Points</td>
|
||||
<td><?php echo $user['apall'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Total Defence Points</td>
|
||||
<td><?php echo $user['dpall'];?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<style>
|
||||
#member{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-top:10px;font-family:system-ui}
|
||||
#member thead th{background:linear-gradient(135deg,#0f172a,#1e293b) !important;color:#fff;padding:6px 10px;font-weight:600;text-align:left;font-size:13px;position:relative}
|
||||
#member thead th .edit-icon{float:right;display:inline-flex;opacity:.85;transition:.15s}
|
||||
#member thead th .edit-icon:hover{opacity:1}
|
||||
#member thead th .edit-icon svg{width:14px;height:14px;stroke:#93c5fd;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
|
||||
#member thead th .edit-icon:hover svg{stroke:#fff}
|
||||
#member tbody td{padding:3px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#334155;vertical-align:middle;line-height:1.2}
|
||||
#member tbody tr:last-child td{border-bottom:0}
|
||||
#member tbody tr:hover td{background:#f8fafc}
|
||||
#member td:first-child{width:35%;color:#64748b;font-weight:500}
|
||||
|
||||
.badge{display:inline-block;padding:1px 6px;border-radius:5px;font-size:10.5px;font-weight:600;line-height:1.1}
|
||||
.badge-banned{background:#fee2e2;color:#991b1b}
|
||||
.badge-user{background:#e2e8f0;color:#334155}
|
||||
.badge-mh{background:#fef3c7;color:#92400e}
|
||||
.badge-admin{background:#dbeafe;color:#1e40af;font-weight:700}
|
||||
.badge-on{background:#dcfce7;color:#166534}
|
||||
.badge-off{background:#f1f5f9;color:#64748b}
|
||||
|
||||
.gold-val{display:flex;align-items:center;gap:5px;font-weight:600;color:#b45309}
|
||||
.gold-val img{width:14px;height:14px}
|
||||
|
||||
.status-icon{display:inline-flex;vertical-align:middle;margin-right:4px}
|
||||
.status-icon svg{width:14px;height:14px;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
|
||||
.status-ok svg{stroke:#16a34a}
|
||||
.status-no svg{stroke:#dc2626}
|
||||
</style>
|
||||
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Additional Information
|
||||
<a href='admin.php?p=editAdditional&uid=<?php echo $id; ?>' class="edit-icon" title="Edit Player Additional Info">
|
||||
<svg viewBox="0 0 24 24"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>
|
||||
</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Access</td>
|
||||
<td>
|
||||
<?php
|
||||
if($user['access'] == 0) echo '<span class="badge badge-banned">Banned</span>';
|
||||
else if($user['access'] == 2) echo '<span class="badge badge-user">Normal user</span>';
|
||||
else if($user['access'] == 8) echo '<span class="badge badge-mh">Multihunter</span>';
|
||||
else if($user['access'] == 9) echo '<span class="badge badge-admin">Administrator</span>';
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vacation Mode</td>
|
||||
<td><?php echo $user['vac_mode'] ? '<span class="badge badge-on">Enabled</span>' : '<span class="badge badge-off">Disabled</span>'; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gold</td>
|
||||
<td><span class="gold-val"><img src="../img/admin/gold.gif"> <?php echo $user['gold']; ?></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sitter 1</td>
|
||||
<td><?php echo $user['sit1'] >= 1 ? '<a href="admin.php?p=player&uid='.$user['sit1'].'">'.$database->getUserField($user['sit1'],"username",0).'</a>' : '<span style="color:#94a3b8">No Sitter</span>'; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Sitter 2</td>
|
||||
<td><?php echo $user['sit2'] >= 1 ? '<a href="admin.php?p=player&uid='.$user['sit2'].'">'.$database->getUserField($user['sit2'],"username",0).'</a>' : '<span style="color:#94a3b8">No Sitter</span>'; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Beginners Protection</td>
|
||||
<td>
|
||||
<?php
|
||||
$datetime = $user['protect']; $now = time();
|
||||
if($datetime==0 || $datetime <= $now){
|
||||
echo '<span class="status-icon status-no"><svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><path d="M15 9l-6 6M9 9l6 6"/></svg></span> <span style="color:#dc2626;font-weight:600">No Protection</span>';
|
||||
}else{
|
||||
$tsdiffact = $datetime - $now;
|
||||
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
|
||||
echo '<span class="status-icon status-ok" title="Ends: '.date('d.m.Y H:i',$user['protect']+3600*2).'"><svg viewBox="0 0 24 24"><path d="M20 6L9 17l-5-5"/></svg></span> <span style="color:#2563eb;font-weight:600">'.$timetoecho.'</span>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>Culture Points</td><td><?php echo number_format($user['cp'],0,',','.');?></td></tr>
|
||||
<tr><td>Last Activity</td><td><?php echo date('d.m.Y H:i',$user['timestamp']+3600*2);?></td></tr>
|
||||
<tr><td>Attack Points (This Week)</td><td><?php echo $user['ap'];?></td></tr>
|
||||
<tr><td>Defence Points (This Week)</td><td><?php echo $user['dp'];?></td></tr>
|
||||
<tr><td>Resources Raided (This Week)</td><td><?php echo number_format($user['RR'],0,',','.');?></td></tr>
|
||||
<tr><td>Total Attack Points</td><td><b><?php echo number_format($user['apall'],0,',','.');?></b></td></tr>
|
||||
<tr><td>Total Defence Points</td><td><b><?php echo number_format($user['dpall'],0,',','.');?></b></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,8 +1,13 @@
|
||||
<table id="member" cellpadding="1" cellspacing="1">
|
||||
<tr>
|
||||
<td>
|
||||
The account will be deleted in <span class="c2">79:56:11</span>
|
||||
<a href="?action=StopDel&uid=<?php echo $user['id'];?>" onClick="return del('stopDel','<?php echo $user['username'];?>');"><img src="img/x.gif" class="del"></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="background:#fff8e6; border:1px solid #ffcc80; color:#333; padding:12px 16px; margin:12px 0; border-radius:10px; display:flex; justify-content:space-between; align-items:center; font-size:14px;">
|
||||
<div>
|
||||
<i class="fa fa-exclamation-triangle" style="color:#e67e22; margin-right:6px;"></i>
|
||||
The account will be deleted in
|
||||
<strong style="color:#e67e22;"><?php echo $delTime; ?></strong>
|
||||
</div>
|
||||
<a href="?p=player&uid=<?php echo $user['id']; ?>&action=StopDel"
|
||||
onclick="return confirm('Cancel deletion for <?php echo $user['username']; ?>?');"
|
||||
title="Cancel deletion"
|
||||
style="background:#e74c3c; color:#fff; text-decoration:none; padding:6px 10px; border-radius:6px; font-weight:bold;">
|
||||
✖ Cancel
|
||||
</a>
|
||||
</div>
|
||||
+107
-143
@@ -1,12 +1,22 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename playerheroinfo.tpl ##
|
||||
## Developed by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : playerheroinfo.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../GameEngine/Data/hero_full.php");
|
||||
@@ -14,38 +24,53 @@ include_once("../GameEngine/Units.php");
|
||||
$id = (int) $_GET['uid'];
|
||||
$hero = $units->Hero($id,1);
|
||||
|
||||
// find a hero who's alive
|
||||
$heroAliveIndex = -1;
|
||||
if ($hero !== false) {
|
||||
foreach ($hero as $hid => $h) {
|
||||
if (!$h['dead']) {
|
||||
$heroAliveIndex = $hid;
|
||||
break;
|
||||
}
|
||||
if (!$h['dead']) { $heroAliveIndex = $hid; break; }
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
td {
|
||||
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black;
|
||||
}
|
||||
th {
|
||||
vertical-align:middle; padding:2px 7px; border:1px solid silver; font-size:13px; color:black;
|
||||
}
|
||||
thead {
|
||||
background-image:url(../img/un/a/c2.gif); background-repeat:repeat; text-align:center; font-weight:bold;
|
||||
}
|
||||
|
||||
.hero-wrap{width:100%;margin-top:15px;font-family:system-ui}
|
||||
.hero-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04)}
|
||||
.hero-table th,.hero-table td{vertical-align:middle;padding:3px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#1e293b;line-height:1.2}
|
||||
.hero-table thead th{background:linear-gradient(180deg,#f8fafc,#eef2f7);text-align:center;font-weight:600;color:#334155;border-bottom:1px solid #e2e8f0;padding:4px 8px}
|
||||
.hero-table tr:last-child td{border-bottom:0}
|
||||
.hero-table thead th.hero-head{background:linear-gradient(135deg,#0f172a,#1e293b) !important;color:#fff !important;padding:6px 10px !important;font-size:13px}
|
||||
.hero-sub{background:#e2e8f0 !important;font-weight:600;color:#1e293b;text-align:center;padding:3px 8px !important}
|
||||
.hero-name{font-weight:600;color:#0f172a}
|
||||
.badge{display:inline-block;padding:1px 6px;border-radius:5px;font-size:10.5px;font-weight:600}
|
||||
.badge-alive{background:#dcfce7;color:#166534}
|
||||
.badge-dead{background:#fee2e2;color:#991b1b}
|
||||
.hero-actions{display:flex;align-items:center;gap:8px}
|
||||
.hero-icon{display:inline-flex;opacity:.8;transition:.15s}
|
||||
.hero-icon:hover{opacity:1}
|
||||
.hero-icon svg{width:14px;height:14px;stroke:#64748b;stroke-width:2;fill:none;stroke-linecap:round;stroke-linejoin:round}
|
||||
.hero-icon.edit:hover svg{stroke:#2563eb}
|
||||
.hero-icon.kill:hover svg{stroke:#dc2626}
|
||||
.hero-icon.revive:hover svg{stroke:#16a34a}
|
||||
.hero-unit img{vertical-align:middle;margin-right:3px;width:16px;height:16px}
|
||||
.hero-bar{height:4px;background:#e5e7eb;border-radius:2px;overflow:hidden;margin-top:2px}
|
||||
.hero-bar-fill{height:100%;background:linear-gradient(90deg,#22c55e,#16a34a)}
|
||||
.add-hero a{margin:0 2px;opacity:.9}
|
||||
.add-hero a:hover{opacity:1}
|
||||
.add-hero img{width:18px;height:18px}
|
||||
.notice{margin-top:6px;text-align:center;font-size:12px;padding:4px;border-radius:5px}
|
||||
.notice-blue{background:#eff6ff;color:#1d4ed8}
|
||||
.notice-red{background:#fef2f2;color:#b91c1c}
|
||||
</style>
|
||||
<table style="border-collapse:collapse; margin-top:25px; line-height:16px; width:100%;">
|
||||
|
||||
<div class="hero-wrap">
|
||||
<table class="hero-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td colspan="3">Player Heroes</td>
|
||||
</tr>
|
||||
<tr><th colspan="3" class="hero-head">Player Heroes</th></tr>
|
||||
</thead>
|
||||
|
||||
<?php if ($hero === false) {?>
|
||||
<tr>
|
||||
<td colspan="3" align="center">None <font color="blue">Add Hero</font>
|
||||
<tr>
|
||||
<td colspan="3" align="center" class="add-hero">
|
||||
None <span style="color:#2563eb;font-weight:600">Add Hero</span>
|
||||
<?php
|
||||
$utribe=($user['tribe']-1)*10;
|
||||
echo " <a href='?action=addHero&uid=".$id."&u=".($utribe+1)."'><img class=\"unit u".($utribe+1)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+1)."\" title=\"".$technology->getUnitName($utribe+1)."\" /></a>";
|
||||
@@ -58,21 +83,15 @@ thead {
|
||||
echo " <a href='?action=addHero&uid=".$id."&u=".($utribe+5)."'><img class=\"unit u".($utribe+5)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+5)."\" title=\"".$technology->getUnitName($utribe+5)."\" /></a>";
|
||||
echo " <a href='?action=addHero&uid=".$id."&u=".($utribe+6)."'><img class=\"unit u".($utribe+6)."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($utribe+6)."\" title=\"".$technology->getUnitName($utribe+6)."\" /></a>";
|
||||
?>
|
||||
|
||||
</tr>
|
||||
<?php
|
||||
} else {
|
||||
$x = 1;
|
||||
foreach ($hero as $h) {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align: center; color: blue; font-weight: bold">
|
||||
Hero #<?php echo $x++; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php } else {
|
||||
$x = 1;
|
||||
foreach ($hero as $h) { ?>
|
||||
<tr><td colspan="3" class="hero-sub" style="text-align:center">Hero #<?php echo $x++; ?></td></tr>
|
||||
<tr>
|
||||
<td width="35%">Hero Name</td>
|
||||
<td colspan="2" width="65%"><?php echo $h['name']; ?></td>
|
||||
<td colspan="2" class="hero-name"><?php echo $h['name']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hero Level</td>
|
||||
@@ -80,115 +99,60 @@ thead {
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Hero Unit</td>
|
||||
<td colspan="2"><?php echo "<img class=\"unit u".$h['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($h['unit'])."\" title=\"".$technology->getUnitName($h['unit'])."\" /> (".$technology->getUnitName($h['unit']); ?>)</td>
|
||||
<td colspan="2" class="hero-unit"><?php echo "<img class=\"unit u".$h['unit']."\" src=\"img/x.gif\" alt=\"".$technology->getUnitName($h['unit'])."\" title=\"".$technology->getUnitName($h['unit'])."\" /> ".$technology->getUnitName($h['unit']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Status</td>
|
||||
<td colspan="2"<?php
|
||||
if ($h['dead']) {
|
||||
echo ' class="c5"';
|
||||
}
|
||||
?>>
|
||||
<?php
|
||||
if (!$h['dead']) {
|
||||
?>
|
||||
<span style="color: green; font-weight: bold">Alive</span>
|
||||
<a href='admin.php?p=editHero&uid=<?php echo $id; ?>&hid=<?php echo $h['heroid'] ?>'>
|
||||
<img src="../img/admin/edit.gif" title="Edit Player Hero Info"></a>
|
||||
<a href='?action=killHero&uid=<?php echo $id; ?>'>
|
||||
<img src="../img/admin/del.gif" title="Kill Player Hero"></a></td>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
Dead
|
||||
<?php
|
||||
if ($heroAliveIndex === -1) {
|
||||
?><a href="?action=reviveHero&uid=<?php echo $id;?>&hid=<?php echo $h['heroid'] ?>" title="Revive hero"><?php echo $refreshicon; ?></a>
|
||||
<?php
|
||||
} else {
|
||||
echo '<span style="color: black; font-size: smaller">(cannot revive, kill living hero first)</span>';
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php if (!$h['dead']) { ?>
|
||||
<thead>
|
||||
<tr>
|
||||
<td width="35%">Details</td>
|
||||
<td width="40%">Point</td>
|
||||
<td width="25%">Level</td>
|
||||
<td colspan="2" class="hero-actions">
|
||||
<?php if (!$h['dead']) { ?>
|
||||
<span class="badge badge-alive">Alive</span>
|
||||
<a class="hero-icon edit" href='admin.php?p=editHero&uid=<?php echo $id; ?>&hid=<?php echo $h['heroid'] ?>' title="Edit">
|
||||
<svg viewBox="0 0 24 24"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>
|
||||
</a>
|
||||
<a class="hero-icon kill" href='?action=killHero&uid=<?php echo $id; ?>' title="Kill">
|
||||
<svg viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg>
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<span class="badge badge-dead">Dead</span>
|
||||
<?php if ($heroAliveIndex === -1) { ?>
|
||||
<a class="hero-icon revive" href="?action=reviveHero&uid=<?php echo $id;?>&hid=<?php echo $h['heroid'] ?>" title="Revive">
|
||||
<svg viewBox="0 0 24 24"><path d="M21 12a9 9 0 1 1-3-6.7"/><path d="M21 3v6h-6"/></svg>
|
||||
</a>
|
||||
<?php } else { echo '<span style="color:#64748b;font-size:11px">(kill living hero first)</span>'; } ?>
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<?php if (!$h['dead']) { ?>
|
||||
<tr><th>Details</th><th>Point</th><th>Level</th></tr>
|
||||
<tr><td>Offence</td><td><?php echo $h['atk']; ?></td><td><?php echo $h['attack']; ?></td></tr>
|
||||
<tr><td>Defence</td><td><?php echo $h['di']."/".$h['dc']; ?></td><td><?php echo $h['defence']; ?></td></tr>
|
||||
<tr><td>Off-Bonus</td><td><?php echo ($h['ob']-1)*100; ?>%</td><td><?php echo $h['attackbonus']; ?></td></tr>
|
||||
<tr><td>Def-Bonus</td><td><?php echo ($h['db']-1)*100; ?>%</td><td><?php echo $h['defencebonus']; ?></td></tr>
|
||||
<tr><td>Regeneration</td><td><?php echo ($h['regeneration']*5*SPEED); ?>/Day</td><td><?php echo $h['regeneration']; ?></td></tr>
|
||||
<tr>
|
||||
<td>Offence</td>
|
||||
<td><?php echo $h['atk']; ?></td>
|
||||
<td><?php echo $h['attack']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Defence</td>
|
||||
<td><?php echo $h['di'] . "/" . $h['dc']; ?></td>
|
||||
<td><?php echo $h['defence']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Off-Bonus</td>
|
||||
<td><?php echo ($h['ob']-1)*100; ?>%</td>
|
||||
<td><?php echo $h['attackbonus']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Def-Bonus</td>
|
||||
<td><?php echo ($h['db']-1)*100; ?>%</td>
|
||||
<td><?php echo $h['defencebonus']; ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Regeneration</td>
|
||||
<td><?php echo ($h['regeneration']*5*SPEED); ?>/Day</td>
|
||||
<td><?php echo $h['regeneration']; ?></td>
|
||||
<tr>
|
||||
<?php
|
||||
$count_level_exp=500-intval($h['attack']+$h['defence']+$h['attackbonus']+$h['defencebonus']+$h['regeneration']);
|
||||
if ($h['points']>$count_level_exp) $h['points']=$count_level_exp;
|
||||
if($h['experience'] < 495000){ ?>
|
||||
<td>Experience: <?php echo (int) (($h['experience'] - $hero_levels[$h['level']]) / ($hero_levels[$h['level']+1] - $hero_levels[$h['level']])*100) ?>%</td>
|
||||
<td colspan="2"><?php echo $h['points']; ?></td>
|
||||
<?php }else{ ?>
|
||||
<td>Experience: 100%</td>
|
||||
<td colspan="2"><?php echo $h['points']; ?></td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Health</td>
|
||||
<td colspan="2"><?php echo round($h['health']); ?>%</td>
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
} else {
|
||||
$count_level_exp=500-intval($h['attack']+$h['defence']+$h['attackbonus']+$h['defencebonus']+$h['regeneration']);
|
||||
if ($h['points']>$count_level_exp) $h['points']=$count_level_exp;
|
||||
$expPct = ($h['experience'] < 495000) ? (int)(($h['experience'] - $hero_levels[$h['level']]) / ($hero_levels[$h['level']+1] - $hero_levels[$h['level']])*100) : 100;
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="3"> </td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
<?php
|
||||
if(isset($_GET['e'])){
|
||||
echo '<div align="center"><font color="Red"><b>Here could not be killed due to an unexpected error.</font></b></div>';
|
||||
}elseif(isset($_GET['kc'])){
|
||||
echo '<div align="center"><font color="blue"><b>Hero has been killed.</b></font></div>';
|
||||
}elseif(isset($_GET['rc'])){
|
||||
echo '<div align="center"><font color="blue"><b>Hero has been revived.</b></font></div>';
|
||||
}elseif(isset($_GET['re'])){
|
||||
echo '<div align="center"><font color="red"><b>Hero cannot be revived because another hero still lives or is in revival.</b></font></div>';
|
||||
}elseif(isset($_GET['ac'])){
|
||||
echo '<div align="center"><font color="blue"><b>A new hero was added.</b></font></div>';
|
||||
}elseif(isset($_GET['cs'])){
|
||||
echo '<div align="center"><font color="blue"><b>Hero information has been saved.</b></font></div>';
|
||||
}elseif(isset($_GET['ce'])){
|
||||
echo '<div align="center"><font color="Red"><b>Hero data could not be edited due to an unexpected error.</b></font></div>';
|
||||
}
|
||||
?>
|
||||
<td>Experience: <?php echo $expPct; ?>%</td>
|
||||
<td colspan="2"><?php echo $h['points']; ?><div class="hero-bar"><div class="hero-bar-fill" style="width:<?php echo $expPct; ?>%"></div></div></td>
|
||||
</tr>
|
||||
<tr><td>Health</td><td colspan="2"><?php echo round($h['health']); ?>%<div class="hero-bar"><div class="hero-bar-fill" style="width:<?php echo round($h['health']); ?>%"></div></div></td></tr>
|
||||
<tr><td colspan="3" style="height:8px;background:#f8fafc"></td></tr>
|
||||
<?php } else { ?>
|
||||
<tr><td colspan="3" style="height:8px;background:#f8fafc"></td></tr>
|
||||
<?php } } } ?>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
if(isset($_GET['e'])) echo '<div class="notice notice-red"><b>Hero could not be killed.</b></div>';
|
||||
elseif(isset($_GET['kc'])) echo '<div class="notice notice-blue"><b>Hero has been killed.</b></div>';
|
||||
elseif(isset($_GET['rc'])) echo '<div class="notice notice-blue"><b>Hero has been revived.</b></div>';
|
||||
elseif(isset($_GET['re'])) echo '<div class="notice notice-red"><b>Cannot revive – another hero lives.</b></div>';
|
||||
elseif(isset($_GET['ac'])) echo '<div class="notice notice-blue"><b>New hero added.</b></div>';
|
||||
elseif(isset($_GET['cs'])) echo '<div class="notice notice-blue"><b>Hero information saved.</b></div>';
|
||||
elseif(isset($_GET['ce'])) echo '<div class="notice notice-red"><b>Edit failed.</b></div>';
|
||||
?>
|
||||
</div>
|
||||
+224
-260
@@ -1,270 +1,234 @@
|
||||
<? php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : playerinfo.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : ronix (Original) ##
|
||||
## Refactored by : iopietro ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
?>
|
||||
|
||||
<table id="profile" cellpadding="1" cellspacing="1" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Details</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="empty"></td><td class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="details">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th>Rank</th>
|
||||
<td><?php $ranking->procRankArray();echo $ranking->getUserRank($user['id']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Tribe</th>
|
||||
<td>
|
||||
<?php
|
||||
if($user['tribe'] == 1)
|
||||
{
|
||||
echo "Roman";
|
||||
}
|
||||
else if($user['tribe'] == 2)
|
||||
{
|
||||
echo "Teutons";
|
||||
}
|
||||
else if($user['tribe'] == 3)
|
||||
{
|
||||
echo "Gauls";
|
||||
}
|
||||
else if($user['tribe'] == 4)
|
||||
{
|
||||
echo "Natars";
|
||||
}
|
||||
else if($user['tribe'] == 5)
|
||||
{
|
||||
echo "Nature";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Alliance</th>
|
||||
<td>
|
||||
<?php
|
||||
if($user['alliance'] == 0)
|
||||
{
|
||||
echo "-";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<a href=\"?p=alliance&aid=".$user['alliance']."\">".$database->getAllianceName($user['alliance'])."</a>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Villages</th>
|
||||
<td><?php echo count($varray);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Population</th>
|
||||
<td><?php echo $totalpop;?> <a href="?action=recountPopUsr&uid=<?php echo $user['id'];?>"><?php echo $refreshicon; ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Age</td>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($user['birthday']) && $user['birthday'] != 0)
|
||||
{
|
||||
$age = date("Y")-substr($user['birthday'],0,4);
|
||||
echo $age;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<font color=\"red\">Not Available</font>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Gender</td>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($user['gender']) && $user['gender'] != 0)
|
||||
{
|
||||
$gender = ($user['gender']== 1)? "Male" : "Female";
|
||||
echo $gender;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<font color=\"red\">Not Available</font>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<style>
|
||||
#profile{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.05);font-family:system-ui}
|
||||
#profile thead tr:first-child th{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:6px 10px;font-size:14px;font-weight:600;text-align:left}
|
||||
#profile thead tr:first-child th a{color:#93c5fd;text-decoration:none}
|
||||
#profile thead tr:first-child th a:hover{text-decoration:underline}
|
||||
#profile thead tr:nth-child(2) td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;letter-spacing:.5px;padding:4px 8px;border-bottom:1px solid #e5e7eb;font-weight:600}
|
||||
#profile tbody td.empty{height:2px;background:#fff;border:0}
|
||||
#profile td.details{width:32%;vertical-align:top;padding:0;background:#fff}
|
||||
#profile td.details table{width:100%;border-collapse:collapse}
|
||||
#profile td.details th{width:38%;text-align:left;padding:3px 8px;font-size:12px;color:#64748b;font-weight:500;border-bottom:1px solid #f1f5f9;background:#fcfcfd;line-height:1.2}
|
||||
#profile td.details td{padding:3px 8px;font-size:12px;color:#0f172a;border-bottom:1px solid #f1f5f9;line-height:1.2}
|
||||
#profile td.details tr:hover td,#profile td.details tr:hover th{background:#f8fafc}
|
||||
#profile td.details tr:last-child th,#profile td.details tr:last-child td{border-bottom:0}
|
||||
#profile td.desc1{vertical-align:top;padding:0;background:#fff;border-left:1px solid #e5e7eb;width:68%}
|
||||
.desc-block{padding:6px 8px;border-bottom:1px solid #f1f5f9}
|
||||
.desc-block:last-child{border-bottom:0}
|
||||
.desc-title{font-size:11px;text-transform:uppercase;color:#64748b;font-weight:600;margin-bottom:4px;letter-spacing:.4px}
|
||||
.desc1div,.desc2div{min-height:0;max-height:160px;overflow:auto;font-size:12px;line-height:1.3;color:#334155;text-align:center}
|
||||
#profile a{color:#2563eb;text-decoration:none}
|
||||
#profile a:hover{text-decoration:underline}
|
||||
#profile .rn3{color:#dc2626!important}
|
||||
.badge-tribe{display:inline-block;padding:1px 6px;border-radius:5px;font-size:10.5px;font-weight:600;background:#e2e8f0;color:#334155}
|
||||
</style>
|
||||
|
||||
<tr>
|
||||
<th>Username</th>
|
||||
<td>
|
||||
<form action="../GameEngine/Admin/Mods/editUsername.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input type="hidden" name="uid" id="uid" value="<?php echo $_GET['uid']; ?>">
|
||||
<input type="text" style="width: 80%;" class="fm" name="username" value="<?php echo $user['username']; ?>"> <input type="image" value="submit" src="../img/admin/edit.gif" title="Edit Username"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Player <a href="admin.php?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Details</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="empty"></td><td class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="details">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<th>Rank</th>
|
||||
<td><?php $ranking->procRankArray();echo $ranking->getUserRank($user['id']);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Tribe</th>
|
||||
<td>
|
||||
<?php
|
||||
if($user['tribe'] == 1) { echo '<span class="badge-tribe">Roman</span>'; }
|
||||
else if($user['tribe'] == 2) { echo '<span class="badge-tribe">Teutons</span>'; }
|
||||
else if($user['tribe'] == 3) { echo '<span class="badge-tribe">Gauls</span>'; }
|
||||
else if($user['tribe'] == 4) { echo '<span class="badge-tribe">Nature</span>'; }
|
||||
else if($user['tribe'] == 5) { echo '<span class="badge-tribe">Natars</span>'; }
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Alliance</th>
|
||||
<td>
|
||||
<?php
|
||||
if($user['alliance'] == 0) { echo "-"; }
|
||||
else { echo "<a href=\"?p=alliance&aid=".$user['alliance']."\">".$database->getAllianceName($user['alliance'])."</a>"; }
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Villages</th>
|
||||
<td><?php echo count($varray);?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Population</th>
|
||||
<td><?php echo number_format($totalpop,0,',','.'); ?>
|
||||
<a href="?action=recountPopUsr&uid=<?php echo $user['id'];?>" title="Recount population" style="margin-left:6px;vertical-align:middle;display:inline-flex">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="#64748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M21 12a9 9 0 1 1-3-6.7"/>
|
||||
<path d="M21 3v6h-6"/>
|
||||
</svg>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Age</th>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($user['birthday']) && $user['birthday']!= 0) {
|
||||
$age = date("Y")-substr($user['birthday'],0,4);
|
||||
echo $age;
|
||||
} else {
|
||||
echo "<span style='color:#dc2626'>Not Available</span>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Gender</th>
|
||||
<td>
|
||||
<?php
|
||||
if(isset($user['gender']) && $user['gender']!= 0) {
|
||||
$gender = ($user['gender']== 1)? "Male" : "Female";
|
||||
echo $gender;
|
||||
} else {
|
||||
echo "<span style='color:#dc2626'>Not Available</span>";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<td>
|
||||
<input type="text" style="width: 80%;" disabled="disabled" class="fm" name="location" value="<?php echo $user['location']; ?>"> <a href="admin.php?p=editUser&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Edit Location"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Username</th>
|
||||
<td><?php echo htmlspecialchars($user['username']?? '');?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Password</th>
|
||||
<td>
|
||||
Change <a href="admin.php?p=editPassword&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Change Password"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Location</th>
|
||||
<td><?php echo htmlspecialchars($user['location']?? '');?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<?php include("playerplusbonus.tpl"); ?>
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<td>
|
||||
<input disabled="disabled" style="width: 80%;" class="fm" name="email" value="<?php echo $user['email']; ?>"> <a href="admin.php?p=editUser&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Edit Email"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php /*
|
||||
<tr>
|
||||
<th>Send</th>
|
||||
<td>
|
||||
<?php
|
||||
$link = "<a href=\"mailto:".$user['email']."\">".$user['email']."</a>";
|
||||
echo $link;
|
||||
?>
|
||||
</td>
|
||||
</tr> */ ?>
|
||||
<tr>
|
||||
<th>Quest</td>
|
||||
<td>
|
||||
<?php
|
||||
## not sure if this is correct
|
||||
$quest = $user['quest'];
|
||||
if($quest == 1) { $questname = "Woodcutter"; }
|
||||
elseif($quest ==2) {$questname = "Crop"; }
|
||||
elseif($quest ==3) {$questname = "Your Villages Name"; }
|
||||
elseif($quest ==4) {$questname = "Other Players"; }
|
||||
elseif($quest ==5) {$questname = "Two Building Order"; }
|
||||
elseif($quest ==6) {$questname = "Messages"; }
|
||||
elseif($quest ==7) {$questname = "Huge Army!"; }
|
||||
elseif($quest ==8) {$questname = "Everything to 1!"; }
|
||||
elseif($quest ==9) {$questname = "Dove of Peace"; }
|
||||
elseif($quest ==10) {$questname = "Cranny"; }
|
||||
elseif($quest ==11) {$questname = "To Two!"; }
|
||||
elseif($quest ==12) {$questname = "Instruction"; }
|
||||
elseif($quest ==13) {$questname = "Main Building"; }
|
||||
elseif($quest ==14) {$questname = "Advanced!" ;}
|
||||
elseif($quest ==15) {$questname = "Weapons or Dough"; }
|
||||
elseif($quest ==16) {$questname = "Military: Rally Point"; }
|
||||
elseif($quest ==17) {$questname = "Military: Barracks"; }
|
||||
elseif($quest ==18) {$questname = "Military: Train 2 Troops"; }
|
||||
elseif($quest ==19) {$questname = "Economy: Granary"; }
|
||||
elseif($quest ==20) {$questname = "Economy: Warehouse"; }
|
||||
elseif($quest ==21) {$questname = "Economy: Marketplace"; }
|
||||
elseif($quest ==22) {$questname = "Everything to 2!"; }
|
||||
elseif($quest ==28) {$questname = "Alliance : Join to one"; }
|
||||
elseif($quest ==29) {$questname = "Main Building to 5"; }
|
||||
elseif($quest ==30) {$questname = "Granary to Level 3"; }
|
||||
elseif($quest ==31) {$questname = "Warehouse to Level 7"; }
|
||||
elseif($quest ==32) {$questname = "Everything to 5!"; }
|
||||
elseif($quest ==33) {$questname = "Palace or Residence"; }
|
||||
elseif($quest ==34) {$questname = "3 settlers"; }
|
||||
elseif($quest ==35) {$questname = "New Village"; }
|
||||
elseif($quest ==36) {$questname = "Build a Wall/Palisade"; }
|
||||
elseif($quest >=37) {$questname = "Finish"; }
|
||||
else { $questname = "Unknown"; }
|
||||
$quesst = $quest;
|
||||
$questinfo = "$quesst - $questname";
|
||||
?>
|
||||
<input disabled="disabled" style="width: 80%;" class="fm" name="quest" value="<?php echo $questinfo; ?>"> <a href="admin.php?p=editUser&uid=<?php echo $id; ?>"><img src="../img/admin/edit.gif" title="Edit Quest"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Password</th>
|
||||
<td>•••••••</td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if($_SESSION['access'] == ADMIN)
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a href="?p=editUser&uid='.$user['id'].'"><font color="blue">»</font> Edit User</a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
else if($_SESSION['access'] == MULTIHUNTER)
|
||||
{
|
||||
echo '';
|
||||
}
|
||||
if($_SESSION['access'] == ADMIN)
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<a class="rn3" href="?p=deletion&uid='.$user['id'].'"><font color="red">»</font> Delete User</a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
else if($_SESSION['access'] == MULTIHUNTER)
|
||||
{
|
||||
echo '';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<?php include("playerplusbonus.tpl");?>
|
||||
<tr>
|
||||
<th>Email</th>
|
||||
<td><?php echo htmlspecialchars($user['email']?? '');?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=ban&uid=<?php echo $user['id']; ?>">» Ban User</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Quest</th>
|
||||
<td>
|
||||
<?php
|
||||
$quest = $user['quest'];
|
||||
if($quest == 1) { $questname = "Woodcutter"; }
|
||||
elseif($quest ==2) {$questname = "Crop"; }
|
||||
elseif($quest ==3) {$questname = "Your Villages Name"; }
|
||||
elseif($quest ==4) {$questname = "Other Players"; }
|
||||
elseif($quest ==5) {$questname = "Two Building Order"; }
|
||||
elseif($quest ==6) {$questname = "Messages"; }
|
||||
elseif($quest ==7) {$questname = "Huge Army!"; }
|
||||
elseif($quest ==8) {$questname = "Everything to 1!"; }
|
||||
elseif($quest ==9) {$questname = "Dove of Peace"; }
|
||||
elseif($quest ==10) {$questname = "Cranny"; }
|
||||
elseif($quest ==11) {$questname = "To Two!"; }
|
||||
elseif($quest ==12) {$questname = "Instruction"; }
|
||||
elseif($quest ==13) {$questname = "Main Building"; }
|
||||
elseif($quest ==14) {$questname = "Advanced!" ;}
|
||||
elseif($quest ==15) {$questname = "Weapons or Dough"; }
|
||||
elseif($quest ==16) {$questname = "Military: Rally Point"; }
|
||||
elseif($quest ==17) {$questname = "Military: Barracks"; }
|
||||
elseif($quest ==18) {$questname = "Military: Train 2 Troops"; }
|
||||
elseif($quest ==19) {$questname = "Economy: Granary"; }
|
||||
elseif($quest ==20) {$questname = "Economy: Warehouse"; }
|
||||
elseif($quest ==21) {$questname = "Economy: Marketplace"; }
|
||||
elseif($quest ==22) {$questname = "Everything to 2!"; }
|
||||
elseif($quest ==28) {$questname = "Alliance : Join to one"; }
|
||||
elseif($quest ==29) {$questname = "Main Building to 5"; }
|
||||
elseif($quest ==30) {$questname = "Granary to Level 3"; }
|
||||
elseif($quest ==31) {$questname = "Warehouse to Level 7"; }
|
||||
elseif($quest ==32) {$questname = "Everything to 5!"; }
|
||||
elseif($quest ==33) {$questname = "Palace or Residence"; }
|
||||
elseif($quest ==34) {$questname = "3 settlers"; }
|
||||
elseif($quest ==35) {$questname = "New Village"; }
|
||||
elseif($quest ==36) {$questname = "Build a Wall/Palisade"; }
|
||||
elseif($quest >=37) {$questname = "Finish"; }
|
||||
else { $questname = "Unknown"; }
|
||||
echo $quest." - ".$questname;
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="empty"></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=Newmessage&uid=<?php echo $user['id']; ?>">» Send Message</a></td>
|
||||
</tr>
|
||||
<?php
|
||||
if($_SESSION['access'] == ADMIN) {
|
||||
echo '<tr><td colspan="2"><a href="?p=editUser&uid='.$user['id'].'">» Edit User</a></td></tr>';
|
||||
}
|
||||
if($_SESSION['access'] == ADMIN) {
|
||||
echo '<tr><td colspan="2"><a class="rn3" href="?p=deletion&uid='.$user['id'].'">» Delete User</a></td></tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=editPlus&uid=<?php echo $user['id']; ?>">» Edit Plus & Res Bonus</a></td>
|
||||
</tr>
|
||||
<tr><td colspan="2"><a href="?p=ban&uid=<?php echo $user['id'];?>">» Ban User</a></td></tr>
|
||||
<tr><td colspan="2"><a href="?p=Newmessage&uid=<?php echo $user['id'];?>">» Send Message</a></td></tr>
|
||||
<tr><td colspan="2"><a href="?p=editPlus&uid=<?php echo $user['id'];?>">» Edit Plus & Res Bonus</a></td></tr>
|
||||
<tr><td colspan="2"><a href="?p=editSitter&uid=<?php echo $user['id'];?>">» Edit Sitters</a></td></tr>
|
||||
<!-- BUTON NOU ADAUGAT -->
|
||||
<tr><td colspan="2"><a href="?p=editProtection&uid=<?php echo $user['id'];?>">» Edit Protection</a></td></tr>
|
||||
<tr><td colspan="2"><a href="?p=editPassword&uid=<?php echo $user['id'];?>">» Edit Password</a></td></tr>
|
||||
<tr><td colspan="2"><a href="?p=editOverall&uid=<?php echo $user['id'];?>">» Edit Overall Off & Def</a></td></tr>
|
||||
<tr><td colspan="2"><a href="?p=editWeek&uid=<?php echo $user['id'];?>">» Edit Weekly Off, Def, Raid</a></td></tr>
|
||||
<tr><td colspan="2"><a href="?p=userlogin&uid=<?php echo $user['id'];?>">» User Login Log</a></td></tr>
|
||||
<tr><td colspan="2"><a href="?p=userillegallog&uid=<?php echo $user['id'];?>">» User Illegal Log</a></td></tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=editSitter&uid=<?php echo $user['id']; ?>">» Edit Sitters</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=editOverall&uid=<?php echo $user['id']; ?>">» Edit Overall Off & Def</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=editWeek&uid=<?php echo $user['id']; ?>">» Edit Weekly Off, Def, Raid</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=userlogin&uid=<?php echo $user['id']; ?>">» User Login Log</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><a href="?p=userillegallog&uid=<?php echo $user['id']; ?>">» User Illegal Log</a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2" class="desc2">
|
||||
<div class="desc2div">
|
||||
<center><?php echo nl2br($profiel[0]); ?></center>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<td class="desc1"><div class="desc1div">
|
||||
<center><?php echo nl2br($profiel[1]); ?></center>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<tr>
|
||||
<td colspan="2" class="desc2">
|
||||
<div class="desc2div">
|
||||
<center><?php echo nl2br($profiel[0]?? '');?></center>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<td class="desc1"><div class="desc1div">
|
||||
<center><?php echo nl2br($profiel[1]?? '');?></center>
|
||||
</div></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,83 +1,83 @@
|
||||
<table id="profile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="6">Player Medals (<?php echo sizeof($varmedal); ?>)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Category</td>
|
||||
<td>Rank</td>
|
||||
<td>Week</td>
|
||||
<td>Points</td>
|
||||
<td>Medal</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
if(empty($varmedal)){ ?>
|
||||
<td colspan="5"><div style="text-align: center">This player has no medals yet</div></td><?php
|
||||
}
|
||||
elseif(!empty($varmedal)){
|
||||
foreach($varmedal as $medal){
|
||||
$title = "Bonus";
|
||||
switch ($medal['categorie']){
|
||||
case 1: $title = "Attackers"; break;
|
||||
case 2: $title = "Defenders"; break;
|
||||
case 3: $title = "Climbers"; break;
|
||||
case 4: $title = "Robbers"; break;
|
||||
case 5: $title = "Top 10 Att and Def"; break;
|
||||
case 6: $title = "Top 3 Att, ".$medal['points']." in a row"; break;
|
||||
case 7: $title = "Top 3 Def,".$medal['points']." in a row"; break;
|
||||
case 8: $title = "Top 3 Climber, ".$medal['points']." in a row"; break;
|
||||
case 9: $title = "Top 3 Robber, ".$medal['points']." in a row"; break;
|
||||
case 10: $title = "Climber of the week"; break;
|
||||
case 11: $title = "Top 3 Climber, ".$medal['points']." in a row"; break;
|
||||
case 12: $title = "Top 10 Attacker, ".$medal['points']." in a row"; break;
|
||||
}
|
||||
<style>
|
||||
.medals-wrap{font-family:system-ui;margin-top:12px}
|
||||
.medals-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:8px 12px;font-weight:600;text-align:center;font-size:13px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-sizing:border-box}
|
||||
.medals-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04)}
|
||||
.medals-table tr.head td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:6px 8px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
|
||||
.medals-table td{padding:6px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#334155;text-align:center;vertical-align:middle}
|
||||
.medals-table tr:last-child td{border-bottom:0}
|
||||
.medals-table tr:hover td{background:#f8fafc}
|
||||
.medals-table img.medal{width:28px;height:40px;object-fit:contain}
|
||||
.medals-del{background:none;border:0;padding:0;cursor:pointer;display:inline-flex;opacity:.7;transition:.15s}
|
||||
.medals-del:hover{opacity:1}
|
||||
.medals-del svg{width:14px;height:14px;stroke:#dc2626;stroke-width:2;fill:none;stroke-linecap:round}
|
||||
.no-medals{padding:20px;text-align:center;color:#94a3b8;font-style:italic}
|
||||
.avg-row td{background:#f8fafc !important;font-weight:600;color:#0f172a}
|
||||
</style>
|
||||
|
||||
$rank = $medal['plaats'];
|
||||
if($rank == 0) $rank = "<p>Bonus</p>";
|
||||
|
||||
$week = $medal['week'];
|
||||
$points = $medal['points'];
|
||||
if($points == '') $points = "<p>Bonus</p>";
|
||||
|
||||
echo"
|
||||
<tr>
|
||||
<td>$title</td>
|
||||
<td>$rank</td>
|
||||
<td>$week</td>
|
||||
<td>$points</td>
|
||||
<td><img src=\"../gpack/travian_default/img/t/".$medal['img'].".jpg\"></td>
|
||||
<form action=\"../GameEngine/Admin/Mods/medals.php\" method=\"POST\">
|
||||
<td>
|
||||
<input type=\"hidden\" name=\"uid\" value=\"".$_GET['uid']."\">
|
||||
<input type=\"hidden\" name=\"medalid\" value=\"".$medal['id']."\" >
|
||||
<input type=\"image\" style=\"background-image: url('../gpack/travian_default/img/a/del.gif'); height: 12px; width: 12px;\" src=\"../gpack/travian_default/img/a/x.gif\">
|
||||
</td>
|
||||
</form>
|
||||
</tr>";
|
||||
}
|
||||
|
||||
$averagerank = 0;
|
||||
foreach($varmedal as $medal){
|
||||
$rank = $medal['plaats'];
|
||||
if($rank > 0){
|
||||
if(is_numeric($rank)){
|
||||
$i++;
|
||||
$averagerank += $medal['plaats'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$average = round($averagerank / $i, 1);
|
||||
echo "</form><tr><td><b>Average Rank</b></td><td>$average</td><td></td><td></td><td>Delete All</td>";
|
||||
}
|
||||
?>
|
||||
<td>
|
||||
<form action="../GameEngine/Admin/Mods/medals.php" method="POST">
|
||||
<input type="hidden" name="uid" value="<?php echo $_GET['uid']; ?>">
|
||||
<input type="hidden" name="userid" value="<?php echo $id; ?>">
|
||||
<input type="image" style="background-image: url('../gpack/travian_default/img/a/del.gif'); height: 12px; width: 12px;" src="../gpack/travian_default/img/a/x.gif">
|
||||
</form>
|
||||
</td>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="medals-wrap">
|
||||
<div class="medals-head">Player Medals (<?php echo sizeof($varmedal); ?>)</div>
|
||||
<table class="medals-table">
|
||||
<tr class="head">
|
||||
<td>CATEGORY</td>
|
||||
<td>RANK</td>
|
||||
<td>WEEK</td>
|
||||
<td>POINTS</td>
|
||||
<td>MEDAL</td>
|
||||
<td style="width:30px"></td>
|
||||
</tr>
|
||||
<?php
|
||||
if(empty($varmedal)){ ?>
|
||||
<tr><td colspan="6" class="no-medals">This player has no medals yet</td></tr>
|
||||
<?php } else {
|
||||
foreach($varmedal as $medal){
|
||||
$title = "Bonus";
|
||||
switch ($medal['categorie']){
|
||||
case 1: $title = "Attackers"; break;
|
||||
case 2: $title = "Defenders"; break;
|
||||
case 3: $title = "Climbers"; break;
|
||||
case 4: $title = "Robbers"; break;
|
||||
case 5: $title = "Top 10 Att and Def"; break;
|
||||
case 6: $title = "Top 3 Att, ".$medal['points']." in a row"; break;
|
||||
case 7: $title = "Top 3 Def,".$medal['points']." in a row"; break;
|
||||
case 8: $title = "Top 3 Climber, ".$medal['points']." in a row"; break;
|
||||
case 9: $title = "Top 3 Robber, ".$medal['points']." in a row"; break;
|
||||
case 10: $title = "Climber of the week"; break;
|
||||
case 11: $title = "Top 3 Climber, ".$medal['points']." in a row"; break;
|
||||
case 12: $title = "Top 10 Attacker, ".$medal['points']." in a row"; break;
|
||||
}
|
||||
$rank = $medal['plaats'] == 0 ? "Bonus" : $medal['plaats'];
|
||||
$points = $medal['points'] == '' ? "Bonus" : $medal['points'];
|
||||
echo '
|
||||
<tr>
|
||||
<td style="text-align:left">'.$title.'</td>
|
||||
<td>'.$rank.'</td>
|
||||
<td>'.$medal['week'].'</td>
|
||||
<td>'.$points.'</td>
|
||||
<td><img class="medal" src="../gpack/travian_default/img/t/'.$medal['img'].'.jpg"></td>
|
||||
<td>
|
||||
<form action="../GameEngine/Admin/Mods/medals.php" method="POST" style="margin:0">
|
||||
<input type="hidden" name="uid" value="'.$_GET['uid'].'">
|
||||
<input type="hidden" name="medalid" value="'.$medal['id'].'">
|
||||
<button type="submit" class="medals-del" title="Delete medal">
|
||||
<svg viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg>
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
$averagerank = 0; $i = 0;
|
||||
foreach($varmedal as $m){ if($m['plaats']>0){ $i++; $averagerank += $m['plaats']; } }
|
||||
$average = $i ? round($averagerank/$i,1) : 0;
|
||||
echo '<tr class="avg-row"><td style="text-align:left"><b>Average Rank</b></td><td>'.$average.'</td><td></td><td></td><td>Delete All</td>
|
||||
<td>
|
||||
<form action="../GameEngine/Admin/Mods/medals.php" method="POST" style="margin:0">
|
||||
<input type="hidden" name="uid" value="'.$_GET['uid'].'">
|
||||
<input type="hidden" name="userid" value="'.$id.'">
|
||||
<button type="submit" class="medals-del" title="Delete all medals">
|
||||
<svg viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg>
|
||||
</button>
|
||||
</form>
|
||||
</td></tr>';
|
||||
} ?>
|
||||
</table>
|
||||
</div>
|
||||
@@ -1,187 +1,59 @@
|
||||
<th><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b></th>
|
||||
<td>
|
||||
<?php
|
||||
$datetime = $user['plus'];
|
||||
$now = time();
|
||||
if($datetime ==0)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Bonus</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($datetime <= $now)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Bonus</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$tsdiffact = $datetime - $now;
|
||||
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
|
||||
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['plus']+3600*2).'">';
|
||||
echo "<font color=\"blue\"> $timetoecho</font>";
|
||||
}
|
||||
}
|
||||
/*if(date('d.m.Y H:i',$user['plus']) == '01.01.1970 00:00')
|
||||
{
|
||||
echo "Not enabled!</tr></th>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "".date('d.m.Y H:i',$user['plus']+3600*2)."</tr></th>";
|
||||
} */
|
||||
?>
|
||||
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><img src="../img/admin/r/1.gif"> Bonus</th>
|
||||
<td>
|
||||
<?php
|
||||
$datetime = $user['b1'];
|
||||
$now = time();
|
||||
if($datetime ==0)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Bonus</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($datetime <= $now)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Bonus</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$tsdiffact = $datetime - $now;
|
||||
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
|
||||
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['b1']+3600*2).'">';
|
||||
echo "<font color=\"blue\"> $timetoecho</font>";
|
||||
}
|
||||
}
|
||||
/*if(date('d.m.Y H:i',$user['b1']) == '01.01.1970 00:00')
|
||||
{
|
||||
echo "Not enabled!</tr></th>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "".date('d.m.Y H:i',$user['b1']+3600*2)."</tr></th>";
|
||||
} */
|
||||
?>
|
||||
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><img src="../img/admin/r/2.gif"> Bonus</th>
|
||||
<td>
|
||||
<?php
|
||||
$datetime = $user['b2'];
|
||||
$now = time();
|
||||
if($datetime ==0)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Bonus</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($datetime <= $now)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Bonus</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$tsdiffact = $datetime - $now;
|
||||
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
|
||||
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['b2']+3600*2).'">';
|
||||
echo "<font color=\"blue\"> $timetoecho</font>";
|
||||
}
|
||||
}
|
||||
/*
|
||||
if(date('d.m.Y H:i',$user['b2']) == '01.01.1970 00:00')
|
||||
{
|
||||
echo "Not enabled!</tr></th>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "".date('d.m.Y H:i',$user['b2']+3600*2)."</tr></th>";
|
||||
} */
|
||||
?>
|
||||
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><img src="../img/admin/r/3.gif"> Bonus</th>
|
||||
<td>
|
||||
<?php
|
||||
$datetime = $user['b3'];
|
||||
$now = time();
|
||||
if($datetime ==0)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Bonus</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($datetime <= $now)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Bonus</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$tsdiffact = $datetime - $now;
|
||||
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
|
||||
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['b3']+3600*2).'">';
|
||||
echo "<font color=\"blue\"> $timetoecho</font>";
|
||||
}
|
||||
}
|
||||
/*
|
||||
if(date('d.m.Y H:i',$user['b3']) == '01.01.1970 00:00')
|
||||
{
|
||||
echo "Not enabled!</tr></th>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "".date('d.m.Y H:i',$user['b3']+3600*2)."</tr></th>";
|
||||
} */
|
||||
?>
|
||||
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><img src="../img/admin/r/4.gif"> Bonus</th>
|
||||
<td>
|
||||
<?php
|
||||
$datetime = $user['b4'];
|
||||
$now = time();
|
||||
if($datetime ==0)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Bonus</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if($datetime <= $now)
|
||||
{
|
||||
echo '<img src="../img/admin/del.gif">';
|
||||
echo "<font color=\"red\"> No Bonus</font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$tsdiffact = $datetime - $now;
|
||||
$timetoecho = \App\Utils\DateTime::getTimeFormat($tsdiffact);
|
||||
echo '<img src="../gpack/travian_default/img/new/tick.png" title="Ends: '.date('d.m.Y H:i',$user['b4']+3600*2).'">';
|
||||
echo "<font color=\"blue\"> $timetoecho</font>";
|
||||
}
|
||||
}
|
||||
/*
|
||||
if(date('d.m.Y H:i',$user['b4']) == '01.01.1970 00:00')
|
||||
{
|
||||
echo "Not enabled!</tr></th>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "".date('d.m.Y H:i',$user['b4']+3600*2)."</tr></th>";
|
||||
} */
|
||||
?>
|
||||
<a href="admin.php?p=editPlus&uid=<?php echo $user['id']; ?>"><img src="../img/admin/edit.gif" title="Edit Plus and Bonus"></a></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : playerplusbonus.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : ronix (Original) ##
|
||||
## Refactored by : iopietro ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
function fmt_bonus($ts){
|
||||
$now = time();
|
||||
$ts = (int)$ts;
|
||||
if($ts == 0 || $ts <= $now){
|
||||
return '<span style="color:#cc0000;">✗ No Bonus</span>';
|
||||
}
|
||||
$diff = $ts - $now;
|
||||
$days = floor($diff / 86400);
|
||||
$hours = floor(($diff % 86400) / 3600);
|
||||
$mins = floor(($diff % 3600) / 60);
|
||||
|
||||
$out = '';
|
||||
if($days > 0) $out .= $days.'d ';
|
||||
$out .= $hours.'h '.sprintf('%02dm', $mins);
|
||||
|
||||
return '<span style="color:#0066cc;font-weight:bold;white-space:nowrap;">✓ '.$out.'</span>';
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<th><b><font color='#71D000'>P</font><font color='#FF6F0F'>l</font><font color='#71D000'>u</font><font color='#FF6F0F'>s</font></b></th>
|
||||
<td><?php echo fmt_bonus($user['plus']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><img src="../img/admin/r/1.gif"> Bonus</th>
|
||||
<td><?php echo fmt_bonus($user['b1']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><img src="../img/admin/r/2.gif"> Bonus</th>
|
||||
<td><?php echo fmt_bonus($user['b2']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><img src="../img/admin/r/3.gif"> Bonus</th>
|
||||
<td><?php echo fmt_bonus($user['b3']); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><img src="../img/admin/r/4.gif"> Bonus</th>
|
||||
<td><?php echo fmt_bonus($user['b4']); ?></td>
|
||||
</tr>
|
||||
+75
-81
@@ -1,92 +1,86 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename punish.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : punish.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : ronix (Original) ##
|
||||
## Refactored by : iopietro ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$active = $admin->getUserActive();
|
||||
?>
|
||||
|
||||
<style>
|
||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||
.punish-box{width:100%;max-width:220px;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);font-family:system-ui}
|
||||
.punish-box th{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:6px 10px;font-weight:600;text-align:center;font-size:13px}
|
||||
.punish-box td{padding:6px 8px;border-bottom:1px solid #f1f5f9;font-size:12px}
|
||||
.punish-box tr:last-child td{border-bottom:0}
|
||||
.punish-row{display:flex;align-items:center;justify-content:space-between;gap:6px}
|
||||
.punish-box select{padding:3px 6px;font-size:12px;border:1px solid #cbd5e1;border-radius:5px;background:#fff}
|
||||
.punish-box label{display:flex;align-items:center;gap:5px;cursor:pointer}
|
||||
.btn-ok{padding:3px 10px;font-size:11px;font-weight:600;color:#fff;background:linear-gradient(180deg,#22c55e,#16a34a);border:0;border-radius:5px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.1);text-transform:uppercase}
|
||||
.btn-ok:hover{filter:brightness(1.05)}
|
||||
</style>
|
||||
|
||||
<form method="post" action="admin.php">
|
||||
<input name="action" type="hidden" value="punish">
|
||||
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
|
||||
<table id="member" style="width: 200px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Punish Player</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<div style="text-align: center">
|
||||
<select name="punish">
|
||||
<option value="10" selected="selected">10%</option>
|
||||
<option value="20">20%</option>
|
||||
<option value="30">30%</option>
|
||||
<option value="40">40%</option>
|
||||
<option value="50">50%</option>
|
||||
<option value="60">60%</option>
|
||||
<option value="70">70%</option>
|
||||
<option value="80">80%</option>
|
||||
<option value="90">90%</option>
|
||||
<option value="100">100%</option>
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<input type="image" src="../img/admin/b/ok1.gif" value="submit">
|
||||
</form>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<form method="post" action="admin.php">
|
||||
<input name="action" type="hidden" value="punish">
|
||||
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<td colspan="1" style="text-align: center;">
|
||||
<input type="checkbox" name="del_troop" value="1"> <strike>Delete Troops</strike>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<input type="image" src="../img/admin/b/ok1.gif" value="submit">
|
||||
</form>
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<form method="post" action="admin.php">
|
||||
<input name="action" type="hidden" value="punish">
|
||||
<input name="uid" type="hidden" value="<?php echo $user['id'];?>">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<td colspan="1" style="text-align: center;">
|
||||
<input type="checkbox" name="clean_ware" value="1"> Empty Warehouses
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<center>
|
||||
<input type="image" src="../img/admin/b/ok1.gif" value="submit">
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><br />
|
||||
</form>
|
||||
<table class="punish-box">
|
||||
<thead><tr><th>Punish Player</th></tr></thead>
|
||||
<tbody>
|
||||
<tr><td>
|
||||
<form method="post" action="admin.php" style="margin:0">
|
||||
<input type="hidden" name="action" value="punish">
|
||||
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<div class="punish-row">
|
||||
<select name="punish">
|
||||
<option value="10" selected>10%</option>
|
||||
<option value="20">20%</option>
|
||||
<option value="30">30%</option>
|
||||
<option value="40">40%</option>
|
||||
<option value="50">50%</option>
|
||||
<option value="60">60%</option>
|
||||
<option value="70">70%</option>
|
||||
<option value="80">80%</option>
|
||||
<option value="90">90%</option>
|
||||
<option value="100">100%</option>
|
||||
</select>
|
||||
<button type="submit" class="btn-ok">OK</button>
|
||||
</div>
|
||||
</form>
|
||||
</td></tr>
|
||||
|
||||
<tr><td>
|
||||
<form method="post" action="admin.php" style="margin:0">
|
||||
<input type="hidden" name="action" value="punish">
|
||||
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<div class="punish-row">
|
||||
<label><input type="checkbox" name="del_troop" value="1"> <span style="text-decoration:line-through;color:#94a3b8">Delete Troops</span></label>
|
||||
<button type="submit" class="btn-ok">OK</button>
|
||||
</div>
|
||||
</form>
|
||||
</td></tr>
|
||||
|
||||
<tr><td>
|
||||
<form method="post" action="admin.php" style="margin:0">
|
||||
<input type="hidden" name="action" value="punish">
|
||||
<input type="hidden" name="uid" value="<?php echo $user['id'];?>">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<div class="punish-row">
|
||||
<label><input type="checkbox" name="clean_ware" value="1"> Empty Warehouses</label>
|
||||
<button type="submit" class="btn-ok">OK</button>
|
||||
</div>
|
||||
</form>
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename renameVillage.tpl ##
|
||||
## Developed by: Dzoki & Advocatie ##
|
||||
## License: TravianZ Project ##
|
||||
## Thanks to: Dzoki & itay2277(Edit troops) ##
|
||||
## Copyright: TravianZ (c) 2010-2011. All rights reserved. ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
|
||||
|
||||
$id = $_GET['did'];
|
||||
|
||||
if(isset($id))
|
||||
{
|
||||
$village = $database->getVillage($id);
|
||||
$user = $database->getUserArray($village['owner'],1);
|
||||
$coor = $database->getCoor($village['wref']);
|
||||
$varray = $database->getProfileVillages($village['owner']);
|
||||
$type = $database->getVillageType($village['wref']);
|
||||
$fdata = $database->getResourceLevel($village['wref']);
|
||||
$units = $database->getUnit($village['wref']);
|
||||
?>
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Edit Village Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo $village['name']; ?></td>
|
||||
</td>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php }?>
|
||||
@@ -1,16 +1,22 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename report.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## Enhanced: aggenkeech ##
|
||||
## Refactored by: Shadow ##
|
||||
## Filename : report.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : ronix (Original) ##
|
||||
## Refactored by : iopietro ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
|
||||
include_once("../GameEngine/Generator.php");
|
||||
include_once("../GameEngine/Technology.php");
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename resetPlus.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$id = $_SESSION['id']; ?>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/mainteneceResetPlus.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<table id="member" style="width:300px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Reset Everyone's Plus</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<center>
|
||||
<input type="image" src="../img/admin/b/ok1.gif" value="submit">
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if(isset($_GET['g']))
|
||||
{
|
||||
echo '<br /><br /><font color="Red"><b>Plus For Everyone Reset</font></b>';
|
||||
}
|
||||
?>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename resetPlusBonus.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$id = $_SESSION['id']; ?>
|
||||
|
||||
<form action="../GameEngine/Admin/Mods/mainteneceResetPlusBonus.php" method="POST">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<table id="member" style="width:300px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Reset Everyone's Resource Bonuses</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<center>
|
||||
<input type="image" src="../img/admin/b/ok1.gif" value="submit">
|
||||
</center>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
if(isset($_GET['g']))
|
||||
{
|
||||
echo '<br /><br /><font color="Red"><b>Plus Resource Bonuses For Everyone Reset</font></b>';
|
||||
}
|
||||
?>
|
||||
@@ -2,101 +2,80 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename resetServer.php ##
|
||||
## Developed by: Ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2012-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : resetServer.php ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../GameEngine/config.php");
|
||||
include_once("../../GameEngine/Database.php");
|
||||
|
||||
if (session_status() !== PHP_SESSION_ACTIVE) {
|
||||
session_start();
|
||||
session_start();
|
||||
}
|
||||
if (!isset($_SESSION['access']) || (int)$_SESSION['access'] !== (int)ADMIN) {
|
||||
die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
if (!isset($_SESSION['access']) || (int)$_SESSION['access'] < ADMIN) {
|
||||
die("<h1><font color=\"red\">Access Denied: You are not Admin!</font></h1>");
|
||||
}
|
||||
set_time_limit(0);
|
||||
// TODO: truncate ALL tables (in a single query, not like this),
|
||||
// then perform install steps (createDbStructure() && populateWorldData())
|
||||
// .. no need for updates and inserts here, as that would keep autoincrements high
|
||||
// and one nice day, after 100th reset, there will be no more integers to go for
|
||||
// and the whole game would be screwed :P
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."a2b");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."abdata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."activate");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."active");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."admin_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."alidata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ali_invite");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ali_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ali_permission");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."allimedal");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."artefacts");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."attacks");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."banlist");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."bdata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."build_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."chat");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."config");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."deleting");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."demolition");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."diplomacy");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."enforcement");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."farmlist");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."fdata");
|
||||
mysqli_query($GLOBALS["link"], "DELETE FROM ".TB_PREFIX."forum_cat WHERE forum_area != 1");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_edit");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_post");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_survey");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."forum_topic");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."general");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."gold_fin_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."hero");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."illegal_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."links");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."login_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."market");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."market_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."mdata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."medal");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."movement");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ndata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."online");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."password");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."prisoners");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."raidlist");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."research");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."route");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."send");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."tdata");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."tech_log");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."training");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."units");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."wdata");
|
||||
$time=time();
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."odata");
|
||||
|
||||
// 1. Salvăm adminul dacă e bifat
|
||||
$keepAdmin = isset($_POST['keep_admin']) && $_POST['keep_admin'] == '1';
|
||||
$adminData = null;
|
||||
if($keepAdmin){
|
||||
$admin_id = (int)$_SESSION['id'];
|
||||
$res = mysqli_query($GLOBALS["link"], "SELECT username, password, email, access, tribe FROM `".TB_PREFIX."users` WHERE id = $admin_id LIMIT 1");
|
||||
$adminData = mysqli_fetch_assoc($res);
|
||||
}
|
||||
|
||||
$uid=$database->getVillageID(5);
|
||||
// 2. Golim tot - fără FK checks
|
||||
mysqli_query($GLOBALS["link"], "SET FOREIGN_KEY_CHECKS=0");
|
||||
|
||||
$passw=password_hash("12345", PASSWORD_BCRYPT,['cost' => 12]);
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."users");
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."users (id, username, password, email, tribe, access, gold, gender, birthday, location, desc1, desc2, plus, b1, b2, b3, b4, sit1, sit2, alliance, sessid, act, timestamp, ap, apall, dp, dpall, protect, quest, gpack, cp, lastupdate, RR, Rc, ok) VALUES
|
||||
(5, 'Multihunter', '".$passw."', 'multihunter@travianx.mail', 0, 9, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
|
||||
(1, 'Support', '', 'support@travianz.game', 0, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
|
||||
(2, 'Nature', '', 'nature@travianz.game', 4, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0),
|
||||
(4, 'Taskmaster', '', 'taskmaster@travianz.game', 0, 8, 0, 0, '0000-00-00', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 'gpack/travian_default/', 1, 0, 0, 0, 0)");
|
||||
$tables = ["a2b","abdata","activate","active","admin_log","alidata","ali_invite","ali_log","ali_permission","allimedal","artefacts","attacks","banlist","bdata","build_log","chat","deleting","demolition","diplomacy","enforcement","farmlist","fdata","forum_cat","forum_edit","forum_post","forum_survey","forum_topic","general","gold_fin_log","hero","illegal_log","links","login_log","market","market_log","mdata","medal","movement","ndata","online","odata","password","prisoners","raidlist","research","route","send","tdata","tech_log","training","units","vdata","wdata","ww_attacks","users"];
|
||||
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."units (vref) VALUES ($uid)");
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."tdata (vref) VALUES ($uid)");
|
||||
foreach($tables as $t){
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE `".TB_PREFIX.$t."`");
|
||||
}
|
||||
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."fdata (vref, f1t, f2t, f3t, f4t, f5t, f6t, f7t, f8t, f9t, f10t, f11t, f12t, f13t, f14t, f15t, f16t, f17t, f18t, f26, f26t, wwname) VALUES ($uid, '1', '4', '1', '3', '2', '2', '3', '4', '4', '3', '3', '4', '4', '1', '4', '2', '1', '2', '1', '15', 'World Wonder')");
|
||||
mysqli_query($GLOBALS["link"], "SET FOREIGN_KEY_CHECKS=1");
|
||||
|
||||
mysqli_query($GLOBALS["link"], "DELETE FROM ".TB_PREFIX."vdata WHERE owner<>5");
|
||||
mysqli_query($GLOBALS["link"], "TRUNCATE TABLE ".TB_PREFIX."ww_attacks");
|
||||
// 3. Recreăm structura și harta
|
||||
$database->createDbStructure();
|
||||
$database->populateWorldData();
|
||||
|
||||
// 4. Conturi sistem
|
||||
$passw = password_hash("12345", PASSWORD_BCRYPT, ['cost' => 12]);
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO `".TB_PREFIX."users` (id, username, password, email, tribe, access, gold, plus, protect) VALUES
|
||||
(1, 'Support', '', 'support@travianz.game', 0, 8, 0, 0, 0),
|
||||
(2, 'Nature', '', 'nature@travianz.game', 4, 8, 0, 0, 0),
|
||||
(4, 'Taskmaster', '', 'taskmaster@travianz.game', 0, 8, 0, 0, 0),
|
||||
(5, 'Multihunter', '$passw', 'multihunter@travianx.mail', 0, 9, 0, 0, 0)");
|
||||
|
||||
// 5. Reintroducem adminul
|
||||
if($keepAdmin && $adminData){
|
||||
$u = mysqli_real_escape_string($GLOBALS["link"], $adminData['username']);
|
||||
$p = mysqli_real_escape_string($GLOBALS["link"], $adminData['password']);
|
||||
$e = mysqli_real_escape_string($GLOBALS["link"], $adminData['email']);
|
||||
$a = (int)$adminData['access'];
|
||||
$t = (int)$adminData['tribe'];
|
||||
// ID 6 ca să nu se calce cu sistemele
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO `".TB_PREFIX."users` (id, username, password, email, tribe, access, gold, plus, protect) VALUES (6, '$u', '$p', '$e', $t, $a, 0, 0, 0)");
|
||||
$_SESSION['id'] = 6; // actualizăm sesiunea
|
||||
}
|
||||
|
||||
// 6. Log
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO `".TB_PREFIX."admin_log` (user, ip, time, action) VALUES (".(int)$_SESSION['id'].", '".$_SERVER['REMOTE_ADDR']."', ".time().", 'Server reset".($keepAdmin ? ' (admin kept)' : '')."')");
|
||||
|
||||
header("Location: ../admin.php?p=resetdone");
|
||||
?>
|
||||
exit;
|
||||
?>
|
||||
@@ -2,40 +2,95 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename resetServer.tpl ##
|
||||
## Developed by: Ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2012-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : resetServer.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
?>
|
||||
<form action="" method="post">
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2">Server Resetting</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="2" id="txtreset">
|
||||
<br>
|
||||
This server will be reset to create new game server.<br>Click button Reset to proceed..<br>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<thead>
|
||||
<tr id="hideobj">
|
||||
<td style="border-right:none; text-align:left"><input name="back" type="button" src="img/x.gif" value="<< back" alt="back" onclick="go_url('../Admin/admin.php')" /></td>
|
||||
<td style="border-left:none; text-align:right"><input name="reset" type="button" src="img/x.gif" value="Reset" alt="Reset" onclick="go_proceed()" /></td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<style>
|
||||
.reset-wrap{max-width:720px;margin:20px auto;font-family:Tahoma,Verdana,Arial,sans-serif;padding:0 10px;box-sizing:border-box}
|
||||
.reset-card{background:#fff;border:1px solid #bbb;border-radius:8px;overflow:hidden;box-shadow:0 2px 6px rgba(0,0,0,0.08)}
|
||||
.reset-head{background:#c0392b;color:#fff;padding:12px 16px;display:flex;align-items:center;gap:8px}
|
||||
.reset-head h2{margin:0;font-size:16px;font-weight:bold}
|
||||
.reset-body{padding:24px 20px 10px;text-align:center;color:#333;font-size:13px;line-height:1.6}
|
||||
.reset-warning{background:#fff5f5;border:1px solid #e74c3c;border-left:4px solid #c0392b;padding:14px;margin:0 auto 16px;max-width:520px;border-radius:4px;color:#a93226;text-align:left}
|
||||
.reset-warning strong{display:block;margin-bottom:4px;font-size:13px}
|
||||
.reset-option{padding:0 20px 18px;text-align:left;background:#fff} /* DOAR ASTA E NOU */
|
||||
.reset-option label{font-size:12px;color:#333;cursor:pointer}
|
||||
.reset-option input{margin-right:6px;vertical-align:-1px}
|
||||
.reset-foot{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;background:#f8f9fa;border-top:1px solid #ddd;gap:10px}
|
||||
.btn{padding:7px 16px;border-radius:4px;font-size:12px;font-weight:bold;cursor:pointer;border:1px solid transparent;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s}
|
||||
.btn-back{background:#ecf0f1;color:#2c3e50;border-color:#bdc3c7}
|
||||
.btn-back:hover{background:#d5dbdb}
|
||||
.btn-reset{background:#c0392b;color:#fff;border-color:#a93226}
|
||||
.btn-reset:hover{background:#a93226}
|
||||
.btn:disabled{opacity:0.6;cursor:not-allowed}
|
||||
.reset-loader{display:none;padding:30px 20px;text-align:center}
|
||||
.reset-loader .spinner{width:28px;height:28px;border:3px solid #f3f3f3;border-top:3px solid #c0392b;border-radius:50%;animation:spin 1s linear infinite;margin:0 auto 12px}
|
||||
@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}
|
||||
@media (max-width:600px){
|
||||
.reset-foot{flex-direction:column-reverse}
|
||||
.btn{width:100%;justify-content:center}
|
||||
}
|
||||
</style>
|
||||
|
||||
<form action="Templates/resetServer.php" method="post" id="resetForm">
|
||||
<div class="reset-wrap">
|
||||
<div class="reset-card">
|
||||
<div class="reset-head">
|
||||
<h2>⚠️ Server Resetting</h2>
|
||||
</div>
|
||||
|
||||
<div class="reset-body" id="txtreset">
|
||||
<div class="reset-warning">
|
||||
<strong>WARNING! Irreversible action</strong>
|
||||
This operation will delete ALL data: players, watches, allies, reports. The server will be reset for a new game.
|
||||
</div>
|
||||
<p>This server will be reset to create new game server.<br>Click button <b>Reset</b> to proceed.</p>
|
||||
</div>
|
||||
<!-- BIFA MUTATA AICI, IN AFARA reset-body -->
|
||||
<div class="reset-option">
|
||||
<label>
|
||||
<input type="checkbox" name="keep_admin" value="1" checked>
|
||||
Keep Admin accout (<?php echo htmlspecialchars($_SESSION['username'] ?? 'Admin'); ?>) after reset
|
||||
</label>
|
||||
</div>
|
||||
</br></br>
|
||||
<div class="reset-loader" id="resetLoader">
|
||||
<div class="spinner"></div>
|
||||
<div>Please wait... while the server is being reset</div>
|
||||
</div>
|
||||
|
||||
<div class="reset-foot" id="hideobj">
|
||||
<button type="button" class="btn btn-back" onclick="go_url('../Admin/admin.php')">« Back</button>
|
||||
<button type="button" class="btn btn-reset" onclick="go_proceed()">Reset Server</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">
|
||||
function go_proceed() {
|
||||
document.getElementById("txtreset").innerHTML = '<br><center>Please wait..while the server was reset</center><br> ';
|
||||
document.getElementById("hideobj").innerHTML = '';
|
||||
location="Templates/resetServer.php";
|
||||
}
|
||||
</script>
|
||||
function go_proceed() {
|
||||
if(!confirm('ARE YOU SURE? All data will be deleted permanently!')) return;
|
||||
|
||||
document.getElementById("txtreset").style.display = 'none';
|
||||
document.querySelector('.reset-option').style.display = 'none';
|
||||
document.getElementById("hideobj").style.display = 'none';
|
||||
document.getElementById("resetLoader").style.display = 'block';
|
||||
|
||||
setTimeout(function(){
|
||||
document.getElementById('resetForm').submit();
|
||||
}, 800);
|
||||
}
|
||||
</script>
|
||||
@@ -1,51 +1,62 @@
|
||||
<?php
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename results_alliances.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : results_alliances.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
?>
|
||||
<?php
|
||||
$result = $admin->search_alliance($_POST['s']);
|
||||
?>
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="dtbl"><a href="">1 «</a></th><th>Found alliances (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
<table id="profile">
|
||||
$result = $admin->search_alliance($_POST['s']); ?>
|
||||
<style>
|
||||
.search-wrap{font-family:system-ui;margin-top:10px}
|
||||
.search-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-shadow:0 2px 8px rgba(0,0,0,.08);box-sizing:border-box}
|
||||
.search-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
|
||||
.search-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 10px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
|
||||
.search-table td{padding:7px 10px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center}
|
||||
.search-table tr:last-child td{border-bottom:0}
|
||||
.search-table tr:hover td{background:#f8fafc}
|
||||
.search-table a{color:#2563eb;text-decoration:none;font-weight:500}
|
||||
.search-table a:hover{text-decoration:underline}
|
||||
.no-res{padding:20px;text-align:center;color:#94a3b8;font-style:italic}
|
||||
</style>
|
||||
|
||||
<div class="search-wrap">
|
||||
<div class="search-head">Found alliances (<?php echo count($result);?>)</div>
|
||||
|
||||
<table class="search-table">
|
||||
<tr>
|
||||
<td class="b">AID</td>
|
||||
<td class="b">Name</td>
|
||||
<td class="b">Tag</td>
|
||||
<td class="b">Founder</td>
|
||||
<td>AID</td>
|
||||
<td>NAME</td>
|
||||
<td>TAG</td>
|
||||
<td>FOUNDER</td>
|
||||
</tr>
|
||||
<?php
|
||||
if($result){
|
||||
<?php if($result){
|
||||
for ($i = 0; $i <= count($result)-1; $i++) {
|
||||
$founder = $database->getUserField($result[$i]["leader"],'username',0);
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$result[$i]["id"].'</td>
|
||||
<td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["name"].'</a></td>
|
||||
<td><a href="?p=alliance&aid='.$result[$i]["id"].'">'.$result[$i]["tag"].'</a></td>
|
||||
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["leader"],'username',0).'</a></td>
|
||||
</tr>
|
||||
';
|
||||
}}
|
||||
else{
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="4">No results</td>
|
||||
<td><a href="?p=player&uid='.$result[$i]["leader"].'">'.$founder.'</a></td>
|
||||
</tr>
|
||||
';
|
||||
}} else {
|
||||
echo '<tr><td colspan="4" class="no-res">No results</td></tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
@@ -2,48 +2,58 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename resutls_email.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : result_email.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
?>
|
||||
<?php
|
||||
$result = $admin->search_email($_POST['s']);
|
||||
?>
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="dtbl"><a href="">1 «</a></th><th>Found emails (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $result = $admin->search_email($_POST['s']); ?>
|
||||
<style>
|
||||
.search-wrap{font-family:system-ui;margin-top:10px}
|
||||
.search-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-shadow:0 2px 8px rgba(0,0,0,.08);box-sizing:border-box}
|
||||
.search-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
|
||||
.search-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 10px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
|
||||
.search-table td{padding:7px 10px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center;word-break:break-all}
|
||||
.search-table tr:last-child td{border-bottom:0}
|
||||
.search-table tr:hover td{background:#f8fafc}
|
||||
.search-table a{color:#2563eb;text-decoration:none;font-weight:500}
|
||||
.search-table a:hover{text-decoration:underline}
|
||||
.no-res{padding:20px;text-align:center;color:#94a3b8;font-style:italic}
|
||||
</style>
|
||||
|
||||
</table>
|
||||
<table id="profile">
|
||||
<div class="search-wrap">
|
||||
<div class="search-head">Found emails (<?php echo count($result);?>)</div>
|
||||
|
||||
<table class="search-table">
|
||||
<tr>
|
||||
<td class="b">UID</td>
|
||||
<td class="b">Name</td>
|
||||
<td class="b">Email</td>
|
||||
<td>UID</td>
|
||||
<td>NAME</td>
|
||||
<td>EMAIL</td>
|
||||
</tr>
|
||||
<?php
|
||||
if($result){
|
||||
<?php if($result){
|
||||
for ($i = 0; $i <= count($result)-1; $i++) {
|
||||
$uname = $database->getUserField($result[$i]["id"],'username',0);
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$result[$i]["id"].'</td>
|
||||
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$database->getUserField($result[$i]["id"],'username',0).'</a></td>
|
||||
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$uname.'</a></td>
|
||||
<td>'.$result[$i]["email"].'</td>
|
||||
</tr>
|
||||
';
|
||||
}}
|
||||
else{
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="4">No results</td>
|
||||
</tr>
|
||||
';
|
||||
}} else {
|
||||
echo '<tr><td colspan="3" class="no-res">No results</td></tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
@@ -2,62 +2,69 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename results_ip.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : result_ip.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
?>
|
||||
<?php
|
||||
$result = $admin->search_ip($_POST['s']);
|
||||
$newArray = array();
|
||||
function arr($arr,$el){
|
||||
global $newArray;
|
||||
for ($i = 0; $i <= count($arr)-1; $i++) {
|
||||
if(in_array($el,$newArray)){
|
||||
return false;
|
||||
}else{
|
||||
array_push($newArray,$el);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="dtbl"><a href="">1 «</a></th><th>Found IPs (<?php echo count($newArray);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
<table id="profile">
|
||||
<tr>
|
||||
<td class="b">IP</td>
|
||||
<td class="b">Name</td>
|
||||
</tr>
|
||||
<?php
|
||||
$seen = [];
|
||||
$rows = [];
|
||||
if($result){
|
||||
for ($i = 0; $i <= count($result)-1; $i++) {
|
||||
if(arr($result,$result[$i]["ip"].$result[$i]["uid"])){
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$result[$i]["ip"].'</td>
|
||||
<td><a href="?p=player&uid='.$result[$i]["uid"].'">'.$database->getUserField($result[$i]["uid"],'username',0).'</a></td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="4">No results</td>
|
||||
</tr>
|
||||
';
|
||||
foreach($result as $r){
|
||||
$key = $r['ip'].'_'.$r['uid'];
|
||||
if(!isset($seen[$key])){
|
||||
$seen[$key] = true;
|
||||
$rows[] = $r;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<style>
|
||||
.search-wrap{font-family:system-ui;margin-top:10px}
|
||||
.search-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-shadow:0 2px 8px rgba(0,0,0,.08);box-sizing:border-box}
|
||||
.search-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
|
||||
.search-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 10px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
|
||||
.search-table td{padding:7px 10px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center;font-family:monospace}
|
||||
.search-table tr:last-child td{border-bottom:0}
|
||||
.search-table tr:hover td{background:#f8fafc}
|
||||
.search-table a{color:#2563eb;text-decoration:none;font-weight:500;font-family:system-ui}
|
||||
.search-table a:hover{text-decoration:underline}
|
||||
.no-res{padding:20px;text-align:center;color:#94a3b8;font-style:italic;font-family:system-ui}
|
||||
</style>
|
||||
|
||||
</table>
|
||||
<div class="search-wrap">
|
||||
<div class="search-head">Found IPs (<?php echo count($rows);?>)</div>
|
||||
|
||||
<table class="search-table">
|
||||
<tr>
|
||||
<td>IP</td>
|
||||
<td>NAME</td>
|
||||
</tr>
|
||||
<?php if($rows){
|
||||
foreach($rows as $r){
|
||||
$uname = $database->getUserField($r['uid'],'username',0);
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$r['ip'].'</td>
|
||||
<td><a href="?p=player&uid='.$r['uid'].'">'.$uname.'</a></td>
|
||||
</tr>
|
||||
';
|
||||
}} else {
|
||||
echo '<tr><td colspan="2" class="no-res">No results</td></tr>';
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
@@ -2,66 +2,67 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename results_player.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : result_players.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
?>
|
||||
<?php
|
||||
$result = $admin->search_player($_POST['s']);
|
||||
?>
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="dtbl"><a href="">1 «</a></th><th>Found player (<?php echo count($result);?>)</th><th class="dtbl"><a href="">» 100</a></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php $result = $admin->search_player($_POST['s']); ?>
|
||||
<style>
|
||||
.search-wrap{font-family:system-ui;margin-top:10px}
|
||||
.search-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-shadow:0 2px 8px rgba(0,0,0,.08);box-sizing:border-box}
|
||||
.search-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
|
||||
.search-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 10px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
|
||||
.search-table td{padding:7px 10px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center}
|
||||
.search-table tr:last-child td{border-bottom:0}
|
||||
.search-table tr:hover td{background:#f8fafc}
|
||||
.search-table a{color:#2563eb;text-decoration:none;font-weight:500}
|
||||
.search-table a:hover{text-decoration:underline}
|
||||
.no-res{padding:20px;text-align:center;color:#94a3b8;font-style:italic}
|
||||
</style>
|
||||
|
||||
</table>
|
||||
<table id="profile">
|
||||
<div class="search-wrap">
|
||||
<div class="search-head">Found players (<?php echo count($result);?>)</div>
|
||||
|
||||
<table class="search-table">
|
||||
<tr>
|
||||
<td class="b">UID</td>
|
||||
<td class="b">Player</td>
|
||||
<td class="b">Villages</td>
|
||||
<td class="b">Pop</td>
|
||||
<td>UID</td>
|
||||
<td>PLAYER</td>
|
||||
<td>VILLAGES</td>
|
||||
<td>POP</td>
|
||||
</tr>
|
||||
<?php
|
||||
if($result){
|
||||
|
||||
// preload villages data
|
||||
$userIDs = [];
|
||||
for ($i = 0; $i <= count($result)-1; $i++) {
|
||||
$userIDs[] = $result[$i]["id"];
|
||||
}
|
||||
$userIDs = array_column($result, 'id');
|
||||
$database->getProfileVillages($userIDs);
|
||||
|
||||
// display
|
||||
for ($i = 0; $i <= count($result)-1; $i++) {
|
||||
$varray = $database->getProfileVillages($result[$i]["id"]);
|
||||
foreach($result as $p){
|
||||
$varray = $database->getProfileVillages($p['id']);
|
||||
$totalpop = 0;
|
||||
|
||||
foreach($varray as $vil) {
|
||||
$totalpop += $vil['pop'];
|
||||
}
|
||||
echo '
|
||||
foreach($varray as $vil){ $totalpop += $vil['pop']; }
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$result[$i]["id"].'</td>
|
||||
<td><a href="?p=player&uid='.$result[$i]["id"].'">'.$result[$i]["username"].'</a></td>
|
||||
<td>'.$p['id'].'</td>
|
||||
<td><a href="?p=player&uid='.$p['id'].'">'.$p['username'].'</a></td>
|
||||
<td>'.count($varray).'</td>
|
||||
<td>'.$totalpop.'</td>
|
||||
</tr>
|
||||
';
|
||||
}
|
||||
}
|
||||
else{
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="4">No results</td>
|
||||
</tr>
|
||||
';
|
||||
} else {
|
||||
echo '<tr><td colspan="4" class="no-res">No results</td></tr>';
|
||||
}
|
||||
?>
|
||||
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
@@ -2,90 +2,68 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename results_villages.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## Reworked: aggenkeech ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : results_villages.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$result = $admin->search_village($_POST['s']);
|
||||
?>
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="5">
|
||||
Found villages (<?php echo count($result);?>)
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="">1 «</a></td>
|
||||
<td colspan="2"></td>
|
||||
<td colspan="2"><a href="">» 100</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="background-color: #F3F3F3;">ID</th>
|
||||
<td style="background-color: #F3F3F3;">Village Name</th>
|
||||
<td style="background-color: #F3F3F3;">Village Owner</th>
|
||||
<td style="background-color: #F3F3F3;">Population</th>
|
||||
<td style="background-color: #F3F3F3;"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if($result)
|
||||
{
|
||||
for ($i = 0; $i <= count($result)-1; $i++)
|
||||
{
|
||||
$delLink = '<a href="?action=delVil&did='.$result[$i]['wref'].'" onClick="return del(\'did\','.$result[$i]['wref'].');"><img src="../img/admin/del.gif" class="del"></a>';
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$result[$i]["wref"].'</td>
|
||||
<td><a href="?p=village&did='.$result[$i]["wref"].'">'.$result[$i]["name"].'</a></td>
|
||||
<td><a href="?p=player&uid='.$result[$i]["owner"].'">'.$database->getUserField($result[$i]["owner"],'username',0).'</a></td>
|
||||
<td>'.$result[$i]["pop"].'</td>
|
||||
<td>'.$delLink.'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="5"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" style="background-image: url(../../gpack/travian_default/img/f/c4.gif);">
|
||||
<center>
|
||||
<font color="red">'.count($result).'</font> Villages Found "<font color="red">'.$_POST['s'].'</font>"
|
||||
</center>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5" style="background-image: url(../../gpack/travian_default/img/f/c4.gif);">
|
||||
<center>
|
||||
<font color="#9F9F90">No Villages Called</font> <font color="red">'.$_POST['s'].'</font>
|
||||
</center>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php $result = $admin->search_village($_POST['s']); ?>
|
||||
<style>
|
||||
.search-wrap{font-family:system-ui;margin-top:10px}
|
||||
.search-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:10px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-shadow:0 2px 8px rgba(0,0,0,.08);box-sizing:border-box}
|
||||
.search-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
|
||||
.search-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 8px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
|
||||
.search-table td{padding:7px 8px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center}
|
||||
.search-table tr:last-child td{border-bottom:0}
|
||||
.search-table tr:hover td{background:#f8fafc}
|
||||
.search-table a{color:#2563eb;text-decoration:none;font-weight:500}
|
||||
.search-table a:hover{text-decoration:underline}
|
||||
.search-table .del{width:12px;height:12px;vertical-align:middle;opacity:.7}
|
||||
.search-table .del:hover{opacity:1}
|
||||
.search-foot{padding:8px;text-align:center;font-size:12px;color:#64748b;background:#f8fafc;border-top:1px solid #e5e7eb}
|
||||
.search-foot font{color:#dc2626 !important;font-weight:600}
|
||||
.no-res{padding:20px;text-align:center;color:#94a3b8;font-style:italic}
|
||||
</style>
|
||||
|
||||
<div class="search-wrap">
|
||||
<div class="search-head">Found villages (<?php echo count($result);?>)</div>
|
||||
|
||||
<table class="search-table">
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>VILLAGE NAME</td>
|
||||
<td>OWNER</td>
|
||||
<td>POP</td>
|
||||
<td style="width:30px"></td>
|
||||
</tr>
|
||||
<?php if($result){
|
||||
foreach($result as $v){
|
||||
$owner = $database->getUserField($v['owner'],'username',0);
|
||||
$delLink = '<a href="?action=delVil&did='.$v['wref'].'" onclick="return del(\'did\','.$v['wref'].');"><img src="../img/admin/del.gif" class="del"></a>';
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$v['wref'].'</td>
|
||||
<td><a href="?p=village&did='.$v['wref'].'">'.$v['name'].'</a></td>
|
||||
<td><a href="?p=player&uid='.$v['owner'].'">'.$owner.'</a></td>
|
||||
<td>'.$v['pop'].'</td>
|
||||
<td>'.$delLink.'</td>
|
||||
</tr>';
|
||||
}
|
||||
echo '</table><div class="search-foot"><font>'.count($result).'</font> Villages Found "<font>'.$_POST['s'].'</font>"</div>';
|
||||
} else {
|
||||
echo '<tr><td colspan="5" class="no-res">No results</td></tr></table>';
|
||||
echo '<div class="search-foot">No Villages Called "<font>'.$_POST['s'].'</font>"</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -1,6 +1,21 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## search.tpl - REDESIGN 2025 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : search.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
|
||||
|
||||
|
||||
+49
-26
@@ -2,12 +2,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename search2.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## Reworked: aggenkeech && ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : search2.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
$array_tribe=array('-',TRIBE1,TRIBE2,TRIBE3,TRIBE4,TRIBE5,TRIBE6);
|
||||
$tribename = $array_tribe[$user['tribe']];
|
||||
@@ -17,32 +25,47 @@ $numsimplayers = count($searchresults);
|
||||
$id = $user['id'];
|
||||
$varray = $database->getProfileVillages($id);
|
||||
$totalpop = 0;
|
||||
foreach($varray as $vil)
|
||||
{
|
||||
$totalpop += $vil['pop'];
|
||||
}
|
||||
foreach($varray as $vil) $totalpop += $vil['pop'];
|
||||
?>
|
||||
<style>
|
||||
#member.search-modern{border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04);margin-bottom:12px}
|
||||
#member.search-modern th{background:linear-gradient(135deg,#0f172a,#334155);color:#fff;padding:10px 12px;font-weight:600;text-align:left;font-size:13px}
|
||||
#member.search-modern th font{color:#fca5a5 !important;font-weight:500}
|
||||
|
||||
.s-info-wrap{display:grid;grid-template-columns:1fr 1fr;gap:12px;max-width:100%;margin:0 auto 15px}
|
||||
.s-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:12px 14px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
|
||||
.s-card-title{font-size:11px;text-transform:uppercase;color:#64748b;letter-spacing:.5px;margin-bottom:4px;font-weight:600}
|
||||
.s-card-main{font-size:14px;font-weight:600;color:#0f172a}
|
||||
.s-card-main a{color:#2563eb;text-decoration:none}
|
||||
.s-card-main a:hover{text-decoration:underline}
|
||||
.s-card-sub{font-size:12px;color:#475569;margin-top:3px}
|
||||
.s-card-sub b{color:#334155;font-weight:600}
|
||||
|
||||
@media(max-width:700px){.s-info-wrap{grid-template-columns:1fr}}
|
||||
</style>
|
||||
|
||||
<form action="" method="post">
|
||||
<table id="member">
|
||||
<table id="member" class="search-modern">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Search <font color="red">("<?php echo $user['username']; ?>" = <?php echo $numsimplayers; ?> Similar)</font></th>
|
||||
<th colspan="3">Search <font>("<?php echo htmlspecialchars($user['username']); ?>" = <?php echo $numsimplayers; ?> Similar)</font></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<center>
|
||||
<div id="s_nav2" >
|
||||
<div align="left" style="font-size: 10pt;"><b>Player:</b> <a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo $user['username'];?></a> (uid: <?php echo $user['id'];?>)</div>
|
||||
<div align="left" style="font-size: 9pt;"><b>Tribe:</b> <?php echo $tribename; ?> | <b>Villages:</b> <?php echo count($varray);?> | <b>Inhabitants:</b> <?php echo $totalpop; ?></div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if(isset($_GET['did']))
|
||||
{ ?>
|
||||
<div id="s_nav4">
|
||||
<div align="left" style="font-size: 10pt;"><b>Village:</b> <a href="?p=village&did=<?php echo $village['wref'];?>"><?php echo $village['name'];?></a> (did: <?php echo $village['wref'];?>)</div>
|
||||
<div align="left" style="font-size: 9pt;"><b>Coordinates:</b> (<?php echo $coor['x'];?>|<?php echo $coor['y'];?>) | <b>Inhabitants</b>: <?php echo $village['pop'];?>
|
||||
</div><?php
|
||||
} ?>
|
||||
</center>
|
||||
<div class="s-info-wrap">
|
||||
<div class="s-card">
|
||||
<div class="s-card-title">Player</div>
|
||||
<div class="s-card-main"><a href="?p=player&uid=<?php echo $user['id'];?>"><?php echo htmlspecialchars($user['username']);?></a> <span style="color:#94a3b8;font-weight:500">(uid: <?php echo $user['id'];?>)</span></div>
|
||||
<div class="s-card-sub"><b>Tribe:</b> <?php echo $tribename; ?> • <b>Villages:</b> <?php echo count($varray);?> • <b>Pop:</b> <?php echo number_format($totalpop,0,',','.'); ?></div>
|
||||
</div>
|
||||
|
||||
<?php if(isset($_GET['did']) && isset($village)) { ?>
|
||||
<div class="s-card">
|
||||
<div class="s-card-title">Village</div>
|
||||
<div class="s-card-main"><a href="?p=village&did=<?php echo $village['wref'];?>"><?php echo htmlspecialchars($village['name']);?></a> <span style="color:#94a3b8;font-weight:500">(did: <?php echo $village['wref'];?>)</span></div>
|
||||
<div class="s-card-sub"><b>Coords:</b> (<?php echo $coor['x'];?>|<?php echo $coor['y'];?>) • <b>Pop:</b> <?php echo $village['pop'];?></div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
</form>
|
||||
@@ -3,12 +3,20 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename server_info.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## Enhanced: aggenkeech ##
|
||||
## Refactored by: Shadow ##
|
||||
## Filename : server_info.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
|
||||
@@ -102,8 +110,8 @@ $ue = q1("SELECT ".implode(',',$cells)." FROM ".TB_PREFIX."enforcement");
|
||||
'Romans' => range(1,10),
|
||||
'Teutons' => range(11,20),
|
||||
'Gauls' => range(21,30),
|
||||
'Natars' => range(31,40),
|
||||
'Other' => range(41,50)
|
||||
'Nature' => range(31,40),
|
||||
'Natars' => range(41,50)
|
||||
];
|
||||
foreach($tribesUnits as $tribe=>$ids){
|
||||
echo "<div class='tribe-box'><h4>$tribe</h4>";
|
||||
|
||||
+92
-38
@@ -1,39 +1,93 @@
|
||||
<?php
|
||||
$id = $_GET['did'];
|
||||
if(isset($id))
|
||||
{
|
||||
?>
|
||||
<br /><br />
|
||||
<table id="profile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3" class="on"><a href="#"><?php echo $village['name']; ?></a>'s Research Log</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 12%">#</td>
|
||||
<td>Event</td>
|
||||
<td>Date</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."tech_log WHERE wid = ".(int) $_GET['did']."";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
$j = 0;
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.++$j.'</td>
|
||||
<td>'.$row['log'].'</td>
|
||||
<td style="white-space: nowrap">'.$row['date'].'</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</thead>
|
||||
</table><?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : techlog.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$id = (int)($_GET['did'] ?? 0);
|
||||
if(!$id){ include("404.tpl"); return; }
|
||||
|
||||
$logs = $database->query("SELECT * FROM ".TB_PREFIX."tech_log WHERE wid = $id ORDER BY id DESC LIMIT 200");
|
||||
?>
|
||||
<style>
|
||||
.back-btn{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid #e5e7eb;padding:8px 14px;border-radius:8px;color:#334155;text-decoration:none;font-size:13px;font-weight:500;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.05)}
|
||||
.back-btn:hover{background:#f8fafc}
|
||||
.tlog-wrap{max-width:900px;margin:20px auto;font-family:system-ui}
|
||||
.tlog-head{background:linear-gradient(135deg,#1e3a8a,#3b82f6);color:#fff;padding:16px 20px;border-radius:12px 12px 0 0;display:flex;align-items:center;gap:12px}
|
||||
.tlog-head .icon{width:36px;height:36px;background:#ffffff20;border-radius:8px;display:grid;place-items:center;font-size:20px}
|
||||
.tlog-head h2{margin:0;font-size:18px;font-weight:600}
|
||||
.tlog-head span{opacity:.8;font-size:13px}
|
||||
.tlog-card{background:#fff;border:1px solid #e5e7eb;border-radius:0 0 12px 12px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.05)}
|
||||
.tlog-table{width:100%;border-collapse:collapse}
|
||||
.tlog-table th{background:#f8fafc;color:#64748b;font-size:12px;text-transform:uppercase;letter-spacing:.5px;padding:12px 16px;text-align:left;border-bottom:1px solid #e5e7eb}
|
||||
.tlog-table td{padding:14px 16px;border-bottom:1px solid #f1f5f9;font-size:14px;color:#334155}
|
||||
.tlog-table tr:hover td{background:#f0f7ff}
|
||||
.tlog-table tr:last-child td{border-bottom:0}
|
||||
.badge{display:inline-block;padding:3px 8px;border-radius:6px;font-size:11px;font-weight:600;margin-right:6px}
|
||||
.badge-research{background:#dbeafe;color:#1e40af}
|
||||
.badge-academy{background:#fef3c7;color:#92400e}
|
||||
.badge-complete{background:#dcfce7;color:#166534}
|
||||
.tlog-num{width:50px;color:#94a3b8;font-variant-numeric:tabular-nums}
|
||||
.tlog-date{white-space:nowrap;color:#64748b;font-size:13px;width:160px}
|
||||
.empty{padding:40px;text-align:center;color:#94a3b8}
|
||||
</style>
|
||||
|
||||
<div class="tlog-wrap">
|
||||
<a href="admin.php?p=village&did=<?php echo $id; ?>" class="back-btn">← Back to Village</a>
|
||||
|
||||
<div class="tlog-head">
|
||||
<div class="icon">🔬</div>
|
||||
<div>
|
||||
<h2><?php echo htmlspecialchars($village['name']); ?> <span style="opacity:.7">— Research Log</span></h2>
|
||||
<span>Latest 200 searches</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tlog-card">
|
||||
<?php if(mysqli_num_rows($logs) == 0): ?>
|
||||
<div class="empty">No registered searches.</div>
|
||||
<?php else: ?>
|
||||
<table class="tlog-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="tlog-num">#</th>
|
||||
<th>Event</th>
|
||||
<th class="tlog-date">Data</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = mysqli_num_rows($logs);
|
||||
while($row = mysqli_fetch_assoc($logs)):
|
||||
$log = htmlspecialchars($row['log']);
|
||||
$badge = 'badge-research';
|
||||
if(stripos($log,'academy')!==false) $badge='badge-academy';
|
||||
if(stripos($log,'completed')!==false || stripos($log,'finished')!==false) $badge='badge-complete';
|
||||
$date = date('d.m.Y H:i', strtotime($row['date']));
|
||||
?>
|
||||
<tr>
|
||||
<td class="tlog-num"><?php echo $i--; ?></td>
|
||||
<td><span class="badge <?php echo $badge; ?>">TECH</span> <?php echo $log; ?></td>
|
||||
<td class="tlog-date"><?php echo $date; ?></td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,45 +1,63 @@
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="16">Troop Upgrades</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="8">Armoury</td>
|
||||
<td colspan="8">Blacksmith</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<?php
|
||||
$tribe = $user['tribe'];
|
||||
$img = $tribe == 1 ? "" : $tribe - 1;
|
||||
|
||||
for($i = 1; $i < 9; $i++) echo '<td><center><img src="../img/un/u/'.$img.''.$i.'.gif"></center></td>';
|
||||
for($i = 1; $i < 9; $i++) echo '<td><center><img src="../img/un/u/'.$img.''.$i.'.gif"></center></td>';
|
||||
?>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<?php
|
||||
//Armoury
|
||||
for($i = 1; $i < 9; $i++){
|
||||
if($tribe==5) { $abtech['a'.$i]="<font color=\"grey\">?</font>"; $abtech['b'.$i]="<font color=\"grey\">?</font>";}
|
||||
echo '<td><center>'.$abtech['a'.$i].'</center></td>';
|
||||
}
|
||||
|
||||
//Blacksmith
|
||||
for($i = 1; $i < 9; $i++) echo '<td><center>'.$abtech['b'.$i].'</center></td>';
|
||||
?>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<?php
|
||||
|
||||
if($tribe == 5) echo '<span class="none">Upgrades Troops</span>';
|
||||
else echo '<a href="admin.php?p=addABTroops&did='.$_GET['did'].'">Upgrades Troops</a><a href="admin.php?p=techlog&did='.$_GET['did'].'" style="float: right">Research Log</a>';
|
||||
<?php
|
||||
|
||||
if(isset($_GET['ab'])) echo '<div align="right"><font color="Red"><b>AB Tech Troops upgrades</font></b></div>';
|
||||
?>
|
||||
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : troopUpgrades.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : ronix (Original) ##
|
||||
## Refactored by : iopietro ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$tribe = (int)$user['tribe'];
|
||||
$img = $tribe==1 ? "" : $tribe-1;
|
||||
?>
|
||||
<style>
|
||||
.upg-modern{font-family:system-ui;background:#fff;border:1px solid #e5e7eb;border-top:0}
|
||||
.upg-head{display:grid;grid-template-columns:1fr 1fr;background:#f8fafc;border-bottom:1px solid #e5e7eb}
|
||||
.upg-head div{padding:6px;text-align:center;font-size:12px;font-weight:600;color:#475569;text-transform:uppercase}
|
||||
.upg-icons{display:grid;grid-template-columns:repeat(16,1fr);gap:0;background:#fff;padding:6px 4px;border-bottom:1px solid #f1f5f9}
|
||||
.upg-icons img{width:20px;height:20px;margin:0 auto;display:block;image-rendering:pixelated}
|
||||
.upg-levels{display:grid;grid-template-columns:repeat(16,1fr);gap:0;padding:4px;background:#fff}
|
||||
.upg-levels div{text-align:center;font-size:12px;font-weight:600;padding:3px 0;color:#0f172a}
|
||||
.upg-levels div.zero{color:#cbd5e1}
|
||||
.upg-foot{display:flex;justify-content:space-between;padding:6px 8px;background:#f8fafc;font-size:12.5px}
|
||||
.upg-foot a{color:#16a34a;text-decoration:none;font-weight:500}
|
||||
.upg-foot a:hover{text-decoration:underline}
|
||||
</style>
|
||||
|
||||
<div class="upg-modern">
|
||||
<div class="upg-head"><div>Armoury</div><div>Blacksmith</div></div>
|
||||
<div class="upg-icons">
|
||||
<?php for($i=1;$i<9;$i++) echo '<img src="../img/un/u/'.$img.$i.'.gif">'; for($i=1;$i<9;$i++) echo '<img src="../img/un/u/'.$img.$i.'.gif">'; ?>
|
||||
</div>
|
||||
<div class="upg-levels">
|
||||
<?php
|
||||
for($i=1;$i<9;$i++){
|
||||
$val = $tribe==5 ? '?' : (int)$abtech['a'.$i];
|
||||
$cls = ($val==0 || $val=='?')?'zero':'';
|
||||
echo '<div class="'.$cls.'">'.$val.'</div>';
|
||||
}
|
||||
for($i=1;$i<9;$i++){
|
||||
$val = $tribe==5 ? '?' : (int)$abtech['b'.$i];
|
||||
$cls = ($val==0 || $val=='?')?'zero':'';
|
||||
echo '<div class="'.$cls.'">'.$val.'</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div class="upg-foot">
|
||||
<?php if($tribe==5){ echo '<span style="color:#94a3b8">Upgrades Troops</span>'; } else { echo '<a href="admin.php?p=addABTroops&did='.$_GET['did'].'">Upgrades Troops</a>'; } ?>
|
||||
<a href="admin.php?p=techlog&did=<?=$_GET['did']?>" style="color:#64748b">Research Log</a>
|
||||
</div>
|
||||
<?php if(isset($_GET['ab'])) echo '<div style="text-align:right;padding:0 8px 6px;color:#dc2626;font-weight:600;font-size:12px">AB Tech updated</div>'; ?>
|
||||
</div>
|
||||
+55
-275
@@ -1,278 +1,58 @@
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="10">Troops in village</th>
|
||||
<?php
|
||||
## Roman
|
||||
if($units['u1'] == 0){$u1 = '<font color="gray">'.$units['u1'].'';}
|
||||
else if($units['u1'] > 0){$u1 = '<font color="black">'.$units['u1'].'';}
|
||||
if($units['u2'] == 0){$u2 = '<font color="gray">'.$units['u2'].'';}
|
||||
else if($units['u2'] > 0){$u2 = '<font color="black">'.$units['u2'].'';}
|
||||
if($units['u3'] == 0){$u3 = '<font color="gray">'.$units['u3'].'';}
|
||||
else if($units['u3'] > 0){$u3 = '<font color="black">'.$units['u3'].'';}
|
||||
if($units['u4'] == 0){$u4 = '<font color="gray">'.$units['u4'].'';}
|
||||
else if($units['u4'] > 0){$u4 = '<font color="black">'.$units['u4'].'';}
|
||||
if($units['u5'] == 0){$u5 = '<font color="gray">'.$units['u5'].'';}
|
||||
else if($units['u5'] > 0){$u5 = '<font color="black">'.$units['u5'].'';}
|
||||
if($units['u6'] == 0){$u6 = '<font color="gray">'.$units['u6'].'';}
|
||||
else if($units['u6'] > 0){$u6 = '<font color="black">'.$units['u6'].'';}
|
||||
if($units['u7'] == 0){$u7 = '<font color="gray">'.$units['u7'].'';}
|
||||
else if($units['u7'] > 0){$u7 = '<font color="black">'.$units['u7'].'';}
|
||||
if($units['u8'] == 0){$u8 = '<font color="gray">'.$units['u8'].'';}
|
||||
else if($units['u8'] > 0){$u8 = '<font color="black">'.$units['u8'].'';}
|
||||
if($units['u9'] == 0){$u9 = '<font color="gray">'.$units['u9'].'';}
|
||||
else if($units['u9'] > 0){$u9 = '<font color="black">'.$units['u9'].'';}
|
||||
if($units['u10'] == 0){$u10 = '<font color="gray">'.$units['u10'].'';}
|
||||
else if($units['u10'] > 0){$u10 = '<font color="black">'.$units['u10'].'';}
|
||||
## Teuton
|
||||
if($units['u11'] == 0){$u11 = '<font color="gray">'.$units['u11'].'';}
|
||||
else if($units['u11'] > 0){$u11 = '<font color="black">'.$units['u11'].'';}
|
||||
if($units['u12'] == 0){$u12 = '<font color="gray">'.$units['u12'].'';}
|
||||
else if($units['u12'] > 0){$u12 = '<font color="black">'.$units['u12'].'';}
|
||||
if($units['u13'] == 0){$u13 = '<font color="gray">'.$units['u13'].'';}
|
||||
else if($units['u13'] > 0){$u13 = '<font color="black">'.$units['u13'].'';}
|
||||
if($units['u14'] == 0){$u14 = '<font color="gray">'.$units['u14'].'';}
|
||||
else if($units['u14'] > 0){$u14 = '<font color="black">'.$units['u14'].'';}
|
||||
if($units['u15'] == 0){$u15 = '<font color="gray">'.$units['u15'].'';}
|
||||
else if($units['u15'] > 0){$u15 = '<font color="black">'.$units['u15'].'';}
|
||||
if($units['u16'] == 0){$u16 = '<font color="gray">'.$units['u16'].'';}
|
||||
else if($units['u16'] > 0){$u16 = '<font color="black">'.$units['u16'].'';}
|
||||
if($units['u17'] == 0){$u17 = '<font color="gray">'.$units['u17'].'';}
|
||||
else if($units['u17'] > 0){$u17 = '<font color="black">'.$units['u17'].'';}
|
||||
if($units['u18'] == 0){$u18 = '<font color="gray">'.$units['u18'].'';}
|
||||
else if($units['u18'] > 0){$u18 = '<font color="black">'.$units['u18'].'';}
|
||||
if($units['u19'] == 0){$u19 = '<font color="gray">'.$units['u19'].'';}
|
||||
else if($units['u19'] > 0){$u19 = '<font color="black">'.$units['u19'].'';}
|
||||
if($units['u20'] == 0){$u20 = '<font color="gray">'.$units['u20'].'';}
|
||||
else if($units['u20'] > 0){$u20 = '<font color="black">'.$units['u20'].'';}
|
||||
## Gaul
|
||||
if($units['u21'] == 0){$u21 = '<font color="gray">'.$units['u21'].'';}
|
||||
else if($units['u21'] > 0){$u21 = '<font color="black">'.$units['u21'].'';}
|
||||
if($units['u22'] == 0){$u22 = '<font color="gray">'.$units['u22'].'';}
|
||||
else if($units['u22'] > 0){$u22 = '<font color="black">'.$units['u22'].'';}
|
||||
if($units['u23'] == 0){$u23 = '<font color="gray">'.$units['u23'].'';}
|
||||
else if($units['u23'] > 0){$u23 = '<font color="black">'.$units['u23'].'';}
|
||||
if($units['u24'] == 0){$u24 = '<font color="gray">'.$units['u24'].'';}
|
||||
else if($units['u24'] > 0){$u24 = '<font color="black">'.$units['u24'].'';}
|
||||
if($units['u25'] == 0){$u25 = '<font color="gray">'.$units['u25'].'';}
|
||||
else if($units['u25'] > 0){$u25 = '<font color="black">'.$units['u25'].'';}
|
||||
if($units['u26'] == 0){$u26 = '<font color="gray">'.$units['u26'].'';}
|
||||
else if($units['u26'] > 0){$u26 = '<font color="black">'.$units['u26'].'';}
|
||||
if($units['u27'] == 0){$u27 = '<font color="gray">'.$units['u27'].'';}
|
||||
else if($units['u27'] > 0){$u27 = '<font color="black">'.$units['u27'].'';}
|
||||
if($units['u28'] == 0){$u28 = '<font color="gray">'.$units['u28'].'';}
|
||||
else if($units['u28'] > 0){$u28 = '<font color="black">'.$units['u28'].'';}
|
||||
if($units['u29'] == 0){$u29 = '<font color="gray">'.$units['u29'].'';}
|
||||
else if($units['u29'] > 0){$u29 = '<font color="black">'.$units['u29'].'';}
|
||||
if($units['u30'] == 0){$u30 = '<font color="gray">'.$units['u30'].'';}
|
||||
else if($units['u30'] > 0){$u30 = '<font color="black">'.$units['u30'].'';}
|
||||
## Nature
|
||||
if($units['u31'] == 0){$u31 = '<font color="gray">'.$units['u31'].'';}
|
||||
else if($units['u31'] > 0){$u31 = '<font color="black">'.$units['u31'].'';}
|
||||
if($units['u32'] == 0){$u32 = '<font color="gray">'.$units['u32'].'';}
|
||||
else if($units['u32'] > 0){$u32 = '<font color="black">'.$units['u32'].'';}
|
||||
if($units['u33'] == 0){$u33 = '<font color="gray">'.$units['u33'].'';}
|
||||
else if($units['u33'] > 0){$u33 = '<font color="black">'.$units['u33'].'';}
|
||||
if($units['u34'] == 0){$u34 = '<font color="gray">'.$units['u34'].'';}
|
||||
else if($units['u34'] > 0){$u34 = '<font color="black">'.$units['u34'].'';}
|
||||
if($units['u35'] == 0){$u35 = '<font color="gray">'.$units['u35'].'';}
|
||||
else if($units['u35'] > 0){$u35 = '<font color="black">'.$units['u35'].'';}
|
||||
if($units['u36'] == 0){$u36 = '<font color="gray">'.$units['u36'].'';}
|
||||
else if($units['u36'] > 0){$u36 = '<font color="black">'.$units['u36'].'';}
|
||||
if($units['u37'] == 0){$u37 = '<font color="gray">'.$units['u37'].'';}
|
||||
else if($units['u37'] > 0){$u37 = '<font color="black">'.$units['u37'].'';}
|
||||
if($units['u38'] == 0){$u38 = '<font color="gray">'.$units['u38'].'';}
|
||||
else if($units['u38'] > 0){$u38 = '<font color="black">'.$units['u38'].'';}
|
||||
if($units['u39'] == 0){$u39 = '<font color="gray">'.$units['u39'].'';}
|
||||
else if($units['u39'] > 0){$u39 = '<font color="black">'.$units['u39'].'';}
|
||||
## Natars
|
||||
if($units['u40'] == 0){$u40 = '<font color="gray">'.$units['u40'].'';}
|
||||
else if($units['u40'] > 0){$u40 = '<font color="black">'.$units['u40'].'';}
|
||||
if($units['u41'] == 0){$u41 = '<font color="gray">'.$units['u41'].'';}
|
||||
else if($units['u41'] > 0){$u41 = '<font color="black">'.$units['u41'].'';}
|
||||
if($units['u42'] == 0){$u42 = '<font color="gray">'.$units['u42'].'';}
|
||||
else if($units['u42'] > 0){$u42 = '<font color="black">'.$units['u42'].'';}
|
||||
if($units['u43'] == 0){$u43 = '<font color="gray">'.$units['u43'].'';}
|
||||
else if($units['u43'] > 0){$u43 = '<font color="black">'.$units['u43'].'';}
|
||||
if($units['u44'] == 0){$u44 = '<font color="gray">'.$units['u44'].'';}
|
||||
else if($units['u44'] > 0){$u44 = '<font color="black">'.$units['u44'].'';}
|
||||
if($units['u45'] == 0){$u45 = '<font color="gray">'.$units['u45'].'';}
|
||||
else if($units['u45'] > 0){$u45 = '<font color="black">'.$units['u45'].'';}
|
||||
if($units['u46'] == 0){$u46 = '<font color="gray">'.$units['u46'].'';}
|
||||
else if($units['u46'] > 0){$u46 = '<font color="black">'.$units['u46'].'';}
|
||||
if($units['u47'] == 0){$u47 = '<font color="gray">'.$units['u47'].'';}
|
||||
else if($units['u47'] > 0){$u47 = '<font color="black">'.$units['u47'].'';}
|
||||
if($units['u48'] == 0){$u48 = '<font color="gray">'.$units['u48'].'';}
|
||||
else if($units['u48'] > 0){$u48 = '<font color="black">'.$units['u48'].'';}
|
||||
if($units['u49'] == 0){$u49 = '<font color="gray">'.$units['u49'].'';}
|
||||
else if($units['u49'] > 0){$u49 = '<font color="black">'.$units['u49'].'';}
|
||||
if($units['u50'] == 0){$u50 = '<font color="gray">'.$units['u50'].'';}
|
||||
else if($units['u50'] > 0){$u50 = '<font color="black">'.$units['u50'].'';}
|
||||
if($_SESSION['access'] >= MULTIHUNTER)
|
||||
{
|
||||
if($user['tribe'] == 1)
|
||||
{
|
||||
echo '
|
||||
</tr></thead><tbody>
|
||||
<tr>
|
||||
<td><center /><img src="../img/un/u/1.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/2.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/3.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/4.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/5.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/6.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/7.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/8.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/9.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/10.gif"></img></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center />'.$u1.'</td>
|
||||
<td><center />'.$u2.'</td>
|
||||
<td><center />'.$u3.'</td>
|
||||
<td><center />'.$u4.'</td>
|
||||
<td><center />'.$u5.'</td>
|
||||
<td><center />'.$u6.'</td>
|
||||
<td><center />'.$u7.'</td>
|
||||
<td><center />'.$u8.'</td>
|
||||
<td><center />'.$u9.'</td>
|
||||
<td><center />'.$u10.'</td>
|
||||
</tr>';
|
||||
}
|
||||
// TEUTON UNITS
|
||||
else if($user['tribe'] == 2)
|
||||
{
|
||||
echo '
|
||||
</tr></thead><tbody>
|
||||
<tr>
|
||||
<td><center /><img src="../img/un/u/11.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/12.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/13.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/14.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/15.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/16.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/17.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/18.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/19.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/20.gif"></img></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center />'.$u11.'</td>
|
||||
<td><center />'.$u12.'</td>
|
||||
<td><center />'.$u13.'</td>
|
||||
<td><center />'.$u14.'</td>
|
||||
<td><center />'.$u15.'</td>
|
||||
<td><center />'.$u16.'</td>
|
||||
<td><center />'.$u17.'</td>
|
||||
<td><center />'.$u18.'</td>
|
||||
<td><center />'.$u19.'</td>
|
||||
<td><center />'.$u20.'</td>
|
||||
</tr>';
|
||||
}
|
||||
// GAUL UNITS
|
||||
else if($user['tribe'] == 3)
|
||||
{
|
||||
echo '
|
||||
</tr></thead><tbody>
|
||||
<tr>
|
||||
<td><center /><img src="../img/un/u/21.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/22.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/23.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/24.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/25.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/26.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/27.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/28.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/29.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/30.gif"></img></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : troops.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : ronix (Original) ##
|
||||
## Refactored by : iopietro ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
<tr>
|
||||
<td><center />'.$u21.'</td>
|
||||
<td><center />'.$u22.'</td>
|
||||
<td><center />'.$u23.'</td>
|
||||
<td><center />'.$u24.'</td>
|
||||
<td><center />'.$u25.'</td>
|
||||
<td><center />'.$u26.'</td>
|
||||
<td><center />'.$u27.'</td>
|
||||
<td><center />'.$u28.'</td>
|
||||
<td><center />'.$u29.'</td>
|
||||
<td><center />'.$u30.'</td>
|
||||
</tr>';
|
||||
}
|
||||
// Nature UNITS
|
||||
else if($user['tribe'] == 4)
|
||||
{
|
||||
echo '
|
||||
</tr></thead><tbody>
|
||||
<tr>
|
||||
<td><center /><img src="../img/un/u/31.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/32.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/33.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/34.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/35.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/36.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/37.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/38.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/39.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/40.gif"></img></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><center />'.$u31.'</td>
|
||||
<td><center />'.$u32.'</td>
|
||||
<td><center />'.$u33.'</td>
|
||||
<td><center />'.$u34.'</td>
|
||||
<td><center />'.$u35.'</td>
|
||||
<td><center />'.$u36.'</td>
|
||||
<td><center />'.$u37.'</td>
|
||||
<td><center />'.$u38.'</td>
|
||||
<td><center />'.$u39.'</td>
|
||||
<td><center />'.$u40.'</td>
|
||||
</tr>';
|
||||
}
|
||||
// Natar Units
|
||||
else if($user['tribe'] == 5)
|
||||
{
|
||||
echo '
|
||||
</tr></thead><tbody>
|
||||
<tr>
|
||||
<td><center /><img src="../img/un/u/41.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/42.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/43.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/44.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/45.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/46.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/47.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/48.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/49.gif"></img></td>
|
||||
<td><center /><img src="../img/un/u/50.gif"></img></td>
|
||||
</tr>
|
||||
if($_SESSION['access'] < MULTIHUNTER) return;
|
||||
$tribe = (int)$user['tribe'];
|
||||
$hero = $database->getHero($village['owner']);
|
||||
$heroCount = $hero ? 1 : 0;
|
||||
?>
|
||||
<style>
|
||||
.troops-modern{font-family:system-ui}
|
||||
.troops-grid{display:grid;grid-template-columns:repeat(11,1fr);gap:4px;padding:6px;background:#fff}
|
||||
.troop-item{text-align:center;padding:4px 2px;border:1px solid #f1f5f9;border-radius:6px;background:#fcfdff}
|
||||
.troop-item:hover{background:#f8fafc}
|
||||
.troop-item img, .troop-item svg{width:18px;height:18px;margin:0 auto 2px;display:block}
|
||||
.troop-num{font-size:11.5px;font-weight:600;line-height:1}
|
||||
.troop-num.zero{color:#cbd5e1}
|
||||
.troop-num.has{color:#0f172a}
|
||||
.troop-hero{background:#fffbeb!important;border-color:#fde68a!important}
|
||||
.troops-foot{display:flex;justify-content:space-between;padding:6px 8px;background:#f8fafc;border-top:1px solid #e5e7eb;font-size:12px}
|
||||
.troops-foot a{color:#2563eb;text-decoration:none;font-weight:500;display:flex;gap:4px;align-items:center}
|
||||
</style>
|
||||
|
||||
|
||||
<tr>
|
||||
<td><center />'.$u41.'</td>
|
||||
<td><center />'.$u42.'</td>
|
||||
<td><center />'.$u43.'</td>
|
||||
<td><center />'.$u44.'</td>
|
||||
<td><center />'.$u45.'</td>
|
||||
<td><center />'.$u46.'</td>
|
||||
<td><center />'.$u47.'</td>
|
||||
<td><center />'.$u48.'</td>
|
||||
<td><center />'.$u49.'</td>
|
||||
<td><center />'.$u50.'</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
if($_SESSION['access'] == ADMIN)
|
||||
{
|
||||
echo '<a href="admin.php?p=addTroops&did='.$_GET['did'].'">Edit Troops</a>';
|
||||
if(isset($_GET['d'])){
|
||||
echo '<div align="right"><font color="Red"><b>Troops edited</font></b></div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="troops-modern">
|
||||
<div class="troops-grid">
|
||||
<?php
|
||||
if($tribe==1){$s=1;$e=10;} elseif($tribe==2){$s=11;$e=20;} elseif($tribe==3){$s=21;$e=30;} elseif($tribe==4){$s=31;$e=40;} else{$s=41;$e=50;}
|
||||
for($i=$s;$i<=$e;$i++){ $cnt=(int)$units['u'.$i]; $cls=$cnt==0?'zero':'has'; echo '<div class="troop-item"><img src="../img/un/u/'.$i.'.gif"><div class="troop-num '.$cls.'">'.$cnt.'</div></div>'; }
|
||||
if($tribe<=3){
|
||||
$hcls=$heroCount==0?'zero':'has';
|
||||
echo '<div class="troop-item troop-hero"><svg viewBox="0 0 24 24" fill="#facc15" stroke="#eab308" stroke-width="1.5"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg><div class="troop-num '.$hcls.'">'.$heroCount.'</div></div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php if($_SESSION['access']==ADMIN){ ?>
|
||||
<div class="troops-foot">
|
||||
<a href="admin.php?p=addTroops&did=<?=$_GET['did']?>"><svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>Edit Troops</a>
|
||||
<?php if(isset($_GET['d'])) echo '<span style="color:#dc2626;font-weight:600">Troops edited</span>'; ?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -1,76 +0,0 @@
|
||||
<?php
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
include('ver.tpl');
|
||||
//if(isset($_GET['c']))
|
||||
//{
|
||||
// copy("https://raw.github.com/yi12345/TravianZ/master/Admin/Templates/update_latest.tpl", "Templates/update_latest.tpl");
|
||||
//}
|
||||
include('update_latest.tpl');
|
||||
/*
|
||||
if(isset($_GET['u']))
|
||||
{
|
||||
for ($dl=$ver+1; $dl<=$latest; $dl++)
|
||||
{
|
||||
$file = "http://travian.gamingcrazy.net/Update/$dl.zip";
|
||||
$newfile = "update.zip";
|
||||
if (!copy($file, $newfile))
|
||||
{
|
||||
echo "Update Files of Version $dl were not found.<br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
$zip = new ZipArchive;
|
||||
if ($zip->open('update.zip') === TRUE)
|
||||
{
|
||||
$zip->extractTo('../');
|
||||
$zip->close();
|
||||
unlink('update.zip');
|
||||
echo "Successfully Updated to Version $dl.<br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Failed to update to Version $dl.<br />';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
?>
|
||||
<table id="member" cellpadding="1" cellspacing="1" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">System Updates</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="hab" colspan="2">Current Version :</td>
|
||||
<td class="hab" colspan="1"><font color="red"><?php include('ver.tpl'); echo "$ver"; ?></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hab" colspan="2">Latest Version :</td>
|
||||
<td class="hab" colspan="1"><font color="red"><?php echo "$latest"; ?></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hab" colspan="2">Check for Update</td>
|
||||
<td class="hab" colspan="1"><center><a href="?p=update&c"><img src="../img/admin/b/ok1.gif"></a></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hab" colspan="2">Update</td>
|
||||
<td class="hab" colspan="1"><?php
|
||||
if($latest > $ver)
|
||||
{
|
||||
echo'<center><a href="https://github.com/yi12345/TravianZ"><img src="../img/admin/b/update.png"></a></center>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "No updates Avaiable";
|
||||
}
|
||||
?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hab" colspan="2">Visit Forum</td>
|
||||
<td class="hab" colspan="1"><center><a href="#"><img src="../img/admin/b/ok1.gif"></a></center></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,3 +0,0 @@
|
||||
<?php
|
||||
$latest="v.8.4.α ⚡ Quantum Build 42β";
|
||||
?>
|
||||
@@ -1,6 +1,21 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## usergold.tpl - REDESIGN 2025 ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : usergold.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if($_SESSION['access'] < ADMIN) die("Access Denied: You are not Admin!");
|
||||
$id = $_SESSION['id'];
|
||||
@@ -40,7 +55,7 @@ $id = $_SESSION['id'];
|
||||
</div>
|
||||
<div>
|
||||
<h3>Give Gold to Specific Player</h3>
|
||||
<p>Adaugă gold doar pentru un singur cont (după ID).</p>
|
||||
<p>Add gold only for single account (after ID).</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,6 +80,6 @@ $id = $_SESSION['id'];
|
||||
</div>
|
||||
|
||||
<?php if(isset($_GET['g'])){ ?>
|
||||
<div class="usergold-success">✓ Gold adăugat cu succes pentru user!</div>
|
||||
<div class="usergold-success">✓ Gold successfully added for user!</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -1,39 +1,108 @@
|
||||
<?php
|
||||
$id = (int) $_GET['uid'];
|
||||
if(isset($id))
|
||||
{
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="10"><a href="admin.php?p=player&uid=<?php echo $player['id']; ?>"><?php echo $player['username']; ?></a>'s Illegals Log</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Offence</td>
|
||||
<td>ID</td>
|
||||
<td>Description</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."illegal_log WHERE user = $id";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
$i++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$i.'</td>
|
||||
<td>'.$row['id'].'</td>
|
||||
<td>'.$row['log'].'</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table><?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : userillegallog.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$id = (int)($_GET['uid'] ?? 0);
|
||||
if($id){
|
||||
$player = $database->getUserArray($id,1);
|
||||
?>
|
||||
<style>
|
||||
.illegal-wrap{max-width:900px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.illegal-head{background:linear-gradient(135deg,#b91c1c,#7f1d1d);color:#fff;border-radius:6px;padding:14px 18px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;}
|
||||
.illegal-head h2{margin:0;font-size:17px;}
|
||||
.illegal-head h2 a{color:#fff;text-decoration:none;}
|
||||
.illegal-head .uid{font-size:12px;opacity:.85;}
|
||||
|
||||
.card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
|
||||
.card h3{margin:0;padding:10px 14px;background:#fef2f2;border-bottom:1px solid #fecaca;font-size:12px;text-transform:uppercase;color:#991b1b;display:flex;justify-content:space-between;align-items:center;}
|
||||
.badge{background:#fee2e2;color:#b91c1c;padding:2px 8px;border-radius:12px;font-size:11px;font-weight:600;}
|
||||
|
||||
.illegal-table{width:100%;border-collapse:collapse;font-size:13px;}
|
||||
.illegal-table thead{background:#fff1f2;}
|
||||
.illegal-table th{padding:8px 10px;text-align:left;font-size:11px;text-transform:uppercase;color:#991b1b;font-weight:600;border-bottom:1px solid #fecaca;}
|
||||
.illegal-table td{padding:10px;border-bottom:1px solid #fef2f2;vertical-align:top;}
|
||||
.illegal-table tr:hover{background:#fffafa;}
|
||||
.illegal-table td:nth-child(1){width:50px;color:#6b7280;text-align:center;font-weight:600;}
|
||||
.illegal-table td:nth-child(2){width:70px;font-family:monospace;color:#6b7280;}
|
||||
.illegal-table td:nth-child(3){font-family:monospace;font-size:12px;color:#1f2937;word-break:break-word;}
|
||||
|
||||
.empty{padding:40px;text-align:center;color:#16a34a;font-size:14px;}
|
||||
.empty .icon{font-size:32px;margin-bottom:8px;}
|
||||
|
||||
.actions{margin-top:14px;text-align:left;}
|
||||
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:8px 16px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
|
||||
.btn-back:hover{background:#e5e7eb;}
|
||||
</style>
|
||||
|
||||
<div class="illegal-wrap">
|
||||
<div class="illegal-head">
|
||||
<h2>🚨 Illegals Log: <a href="admin.php?p=player&uid=<?php echo $player['id'];?>"><?php echo htmlspecialchars($player['username']);?></a></h2>
|
||||
<div class="uid">UID: <?php echo $id; ?></div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>
|
||||
<span>Detected Offences</span>
|
||||
<?php
|
||||
$count = mysqli_num_rows(mysqli_query($GLOBALS["link"], "SELECT id FROM ".TB_PREFIX."illegal_log WHERE user = $id"));
|
||||
echo '<span class="badge">'.$count.' records</span>';
|
||||
?>
|
||||
</h3>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."illegal_log WHERE user = $id ORDER BY id DESC LIMIT 200";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
if(mysqli_num_rows($result) > 0){
|
||||
?>
|
||||
<table class="illegal-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>ID</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
while($row = mysqli_fetch_assoc($result)){
|
||||
$i++;
|
||||
echo '<tr>';
|
||||
echo '<td>'.$i.'</td>';
|
||||
echo '<td>'.$row['id'].'</td>';
|
||||
echo '<td>'.htmlspecialchars($row['log']).'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } else {
|
||||
echo '<div class="empty"><div class="icon">✅</div><div>No illegal activities recorded.<br><span style="font-size:12px;color:#6b7280;">Player is clean</span></div></div>';
|
||||
} ?>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="admin.php?p=player&uid=<?php echo $id;?>" class="btn-back">← Back to player</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
+105
-36
@@ -1,39 +1,108 @@
|
||||
<?php
|
||||
$id = (int) $_GET['uid'];
|
||||
if(isset($id))
|
||||
{
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="10"><a href="admin.php?p=player&uid=<?php echo $player['id']; ?>"><?php echo $player['username']; ?></a> Login Log</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Login Attempt</td>
|
||||
<td>ID</td>
|
||||
<td>IP</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."login_log WHERE uid = $id";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
$i++;
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.$i.'</td>
|
||||
<td>'.$row['id'].'</td>
|
||||
<td>'.$row['ip'].'</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table><?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : userlogin.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$id = (int)($_GET['uid'] ?? 0);
|
||||
if($id){
|
||||
$player = $database->getUserArray($id,1);
|
||||
?>
|
||||
<style>
|
||||
.log-wrap{max-width:800px;margin:0 auto;font-family:Verdana,Arial;}
|
||||
.log-head{background:linear-gradient(135deg,#1e40af,#1e3a8a);color:#fff;border-radius:6px;padding:14px 18px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center;}
|
||||
.log-head h2{margin:0;font-size:17px;}
|
||||
.log-head h2 a{color:#fff;text-decoration:none;}
|
||||
.log-head .uid{font-size:12px;opacity:.85;}
|
||||
|
||||
.card{background:#fff;border:1px solid #e5e7eb;border-radius:6px;box-shadow:0 1px 3px rgba(0,0,0,.05);overflow:hidden;}
|
||||
.card h3{margin:0;padding:10px 14px;background:#f9fafb;border-bottom:1px solid #e5e7eb;font-size:12px;text-transform:uppercase;color:#374151;display:flex;justify-content:space-between;align-items:center;}
|
||||
.badge{background:#dbeafe;color:#1e40af;padding:2px 8px;border-radius:12px;font-size:11px;font-weight:600;}
|
||||
|
||||
.log-table{width:100%;border-collapse:collapse;font-size:13px;}
|
||||
.log-table thead{background:#f3f4f6;}
|
||||
.log-table th{padding:8px 10px;text-align:left;font-size:11px;text-transform:uppercase;color:#6b7280;font-weight:600;border-bottom:1px solid #e5e7eb;}
|
||||
.log-table td{padding:9px 10px;border-bottom:1px solid #f1f5f9;}
|
||||
.log-table tr:hover{background:#f9fafb;}
|
||||
.log-table td:nth-child(1){width:60px;color:#6b7280;}
|
||||
.log-table td:nth-child(2){width:80px;font-family:monospace;}
|
||||
.ip-link{color:#2563eb;text-decoration:none;font-family:monospace;font-weight:600;}
|
||||
.ip-link:hover{text-decoration:underline;}
|
||||
.empty{padding:30px;text-align:center;color:#9ca3af;font-size:13px;}
|
||||
|
||||
.actions{margin-top:14px;text-align:left;}
|
||||
.btn-back{background:#f3f4f6;border:1px solid #d1d5db;color:#16a34a;padding:8px 16px;border-radius:5px;font-size:13px;font-weight:600;text-decoration:none;display:inline-flex;align-items:center;gap:6px;}
|
||||
.btn-back:hover{background:#e5e7eb;}
|
||||
</style>
|
||||
|
||||
<div class="log-wrap">
|
||||
<div class="log-head">
|
||||
<h2>🔐 Login Log: <a href="admin.php?p=player&uid=<?php echo $player['id'];?>"><?php echo htmlspecialchars($player['username']);?></a></h2>
|
||||
<div class="uid">UID: <?php echo $id; ?></div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>
|
||||
<span>Recent Login Attempts</span>
|
||||
<?php
|
||||
$count = mysqli_num_rows(mysqli_query($GLOBALS["link"], "SELECT id FROM ".TB_PREFIX."login_log WHERE uid = $id"));
|
||||
echo '<span class="badge">'.$count.' total</span>';
|
||||
?>
|
||||
</h3>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."login_log WHERE uid = $id ORDER BY id DESC LIMIT 100";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
if(mysqli_num_rows($result) > 0){
|
||||
?>
|
||||
<table class="log-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Log ID</th>
|
||||
<th>IP Address</th>
|
||||
<th>Info</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
while($row = mysqli_fetch_assoc($result)){
|
||||
$i++;
|
||||
$ip = htmlspecialchars($row['ip']);
|
||||
echo '<tr>';
|
||||
echo '<td>'.$i.'</td>';
|
||||
echo '<td>'.$row['id'].'</td>';
|
||||
echo '<td><a class="ip-link" href="https://ipinfo.io/'.$ip.'" target="_blank">'.$ip.'</a></td>';
|
||||
echo '<td><span style="color:#9ca3af;font-size:11px;">—</span></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php } else { echo '<div class="empty">No login records found.</div>'; } ?>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
<a href="admin.php?p=player&uid=<?php echo $id;?>" class="btn-back">← Back to player</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
} else {
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
@@ -1,6 +1,21 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## users.tpl - REDESIGN 2025 v3 (ultra-compact + tribe label) ##
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : users.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
if($_SESSION['access'] < MULTIHUNTER) die("Access Denied!");
|
||||
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
<?php
|
||||
$ver="v.8.4.α ⚡ Quantum Build 42β";
|
||||
?>
|
||||
+180
-360
@@ -1,15 +1,25 @@
|
||||
<?php
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename village.php ##
|
||||
## Developed by: Dzoki & Advocatie ##
|
||||
## License: TravianX Project ##
|
||||
## Thanks to: Dzoki & itay2277(Edit some additions) ##
|
||||
## Fix by: ronix (some additions) ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## Improved: aggenkeech ##
|
||||
## Filename : villagelog.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki & Advocatie (Original) ##
|
||||
## Thanks to : itay2277 & ronix(Edit some additions) ##
|
||||
## Redesign by : Shadow ##
|
||||
## Improved: : aggenkeech ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../GameEngine/Generator.php");
|
||||
|
||||
$id = $_GET['did'];
|
||||
@@ -20,7 +30,7 @@ if(isset($id)){
|
||||
$type = $database->getVillageType($village['wref']);
|
||||
$fdata = $database->getResourceLevel($village['wref']);
|
||||
$units = $database->getUnit($village['wref']);
|
||||
$abtech = $database->getABTech($id); // Armory/blacksmith level
|
||||
$abtech = $database->getABTech($id);
|
||||
|
||||
switch($type){
|
||||
case 1: $typ = [3, 3, 3, 9]; break;
|
||||
@@ -37,369 +47,179 @@ if(isset($id)){
|
||||
case 12: $typ = [5, 4, 3, 6]; break;
|
||||
}
|
||||
|
||||
$ocounter = [];
|
||||
$wood = $clay = $iron =$crop = 0;
|
||||
$ocounter = []; $wood = $clay = $iron =$crop = 0;
|
||||
$q = "SELECT o.*, w.x, w.y FROM ".TB_PREFIX."odata AS o LEFT JOIN ".TB_PREFIX."wdata AS w ON o.wref=w.id WHERE conqured = ".(int) $village['wref'];
|
||||
$result = $database->query_return($q);
|
||||
if(!empty($result)){
|
||||
$newResult = [];
|
||||
foreach($result as $row){
|
||||
$type = $row['type'];
|
||||
if ( $type == 1 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/1.gif"> + 25%';
|
||||
$wood += 1;
|
||||
} elseif ( $type == 2 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/1.gif"> + 25%';
|
||||
$wood += 1;
|
||||
} elseif ( $type == 3 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/1.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%';
|
||||
$wood += 1;
|
||||
$crop += 1;
|
||||
} elseif ( $type == 4 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/2.gif"> + 25%';
|
||||
$clay += 1;
|
||||
} elseif ( $type == 5 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/2.gif"> + 25%';
|
||||
$clay += 1;
|
||||
} elseif ( $type == 6 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/2.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%';
|
||||
$clay += 1;
|
||||
$crop += 1;
|
||||
} elseif ( $type == 7 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/3.gif"> + 25%';
|
||||
$iron += 1;
|
||||
} elseif ( $type == 8 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/3.gif"> + 25%';
|
||||
$iron += 1;
|
||||
} elseif ( $type == 9 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/3.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%';
|
||||
$iron += 1;
|
||||
$crop += 1;
|
||||
} elseif ( $type == 10 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/4.gif"> + 25%';
|
||||
$crop += 1;
|
||||
} elseif ( $type == 11 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/4.gif"> + 25%';
|
||||
$crop += 1;
|
||||
} elseif ( $type == 12 ) {
|
||||
$row['type'] = '<img src="../img/admin/r/4.gif"> + 50%';
|
||||
$crop += 2;
|
||||
}
|
||||
|
||||
if ( $type == 1 ) { $row['type'] = '<img src="../img/admin/r/1.gif"> + 25%'; $wood += 1; }
|
||||
elseif ( $type == 2 ) { $row['type'] = '<img src="../img/admin/r/1.gif"> + 25%'; $wood += 1; }
|
||||
elseif ( $type == 3 ) { $row['type'] = '<img src="../img/admin/r/1.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%'; $wood += 1; $crop += 1; }
|
||||
elseif ( $type == 4 ) { $row['type'] = '<img src="../img/admin/r/2.gif"> + 25%'; $clay += 1; }
|
||||
elseif ( $type == 5 ) { $row['type'] = '<img src="../img/admin/r/2.gif"> + 25%'; $clay += 1; }
|
||||
elseif ( $type == 6 ) { $row['type'] = '<img src="../img/admin/r/2.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%'; $clay += 1; $crop += 1; }
|
||||
elseif ( $type == 7 ) { $row['type'] = '<img src="../img/admin/r/3.gif"> + 25%'; $iron += 1; }
|
||||
elseif ( $type == 8 ) { $row['type'] = '<img src="../img/admin/r/3.gif"> + 25%'; $iron += 1; }
|
||||
elseif ( $type == 9 ) { $row['type'] = '<img src="../img/admin/r/3.gif"> + 25%<br /><img src="../img/admin/r/4.gif"> + 25%'; $iron += 1; $crop += 1; }
|
||||
elseif ( $type == 10 ) { $row['type'] = '<img src="../img/admin/r/4.gif"> + 25%'; $crop += 1; }
|
||||
elseif ( $type == 11 ) { $row['type'] = '<img src="../img/admin/r/4.gif"> + 25%'; $crop += 1; }
|
||||
elseif ( $type == 12 ) { $row['type'] = '<img src="../img/admin/r/4.gif"> + 50%'; $crop += 2; }
|
||||
$newResult[] = $row;
|
||||
}
|
||||
}
|
||||
$ocounter = array($wood,$clay,$iron,$crop);
|
||||
$production=$admin->calculateProduction($id,$user['id'],$user['b1'],$user['b2'],$user['b3'],$user['b4'],$fdata, $ocounter, $village['pop']);
|
||||
$refreshiconfrm = "../img/admin/refresh.png";
|
||||
$refreshicon = "<img src=\"".$refreshiconfrm."\">";
|
||||
|
||||
if($village && $user){
|
||||
include("search2.tpl"); ?>
|
||||
<style>
|
||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||
</style>
|
||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css">
|
||||
<br />
|
||||
|
||||
<table id="profile" cellpadding="1" cellspacing="1" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Village Information</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Village owner:</td>
|
||||
<td><a href="admin.php?p=player&uid=<?php echo $village['owner']; ?>"><?php echo $user['username']; ?></a></td>
|
||||
<td>
|
||||
<form action="../GameEngine/Admin/Mods/editVillageOwner.php" method="POST" accept-charset="UTF-8">
|
||||
<input type="hidden" name="did" value="<?php echo $_GET['did']; ?>">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
Owner(uid): <input class="text" type="text" name="newowner" value="<?php echo $user['id']; ?>"><input type="image" value="submit" src="../img/admin/edit.gif">
|
||||
</form>
|
||||
</td>
|
||||
<tr>
|
||||
<td>Village name:</td>
|
||||
<form action="../GameEngine/Admin/Mods/renameVillage.php" method="POST" accept-charset="UTF-8">
|
||||
<input type="hidden" name="did" value="<?php echo $_GET['did']; ?>">
|
||||
<input type="hidden" name="admid" id="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<td colspan="2">
|
||||
<input class="text" type="text" name="villagename" value="<?php echo $village['name']; ?>"> <input type="image" value="submit" src="../img/admin/edit.gif">
|
||||
</td>
|
||||
</form>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Population</td>
|
||||
<td colspan="2"><?php echo $village['pop'];?> <a href="admin.php?action=recountPop&did=<?php echo $_GET['did']; ?>"><?php echo $refreshicon; ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Coordinates:</td>
|
||||
<td colspan="2"><a href="<?php echo HOMEPAGE ?>/karte.php?d=<?php echo $village['wref']; ?>&c=<?php echo $generator->getMapCheck($village['wref']); ?>" target="blank">(<?php echo $coor['x']."|".$coor['y']; ?>)</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Village ID</td>
|
||||
<td colspan="2"><?php echo $village['wref'];?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Field type</td>
|
||||
<td colspan="2">
|
||||
<?php
|
||||
for ($i = 0; $i <= 3; $i++){
|
||||
$a = $i + 1;
|
||||
if($i != 3) echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif">| ';
|
||||
else echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif"> ';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="7">Resources <a href="admin.php?p=editResources&did=<?php echo $_GET['did']; ?>"><img src="../img/admin/edit.gif" title="Edit Resources and Capacity"></a></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Resource</td>
|
||||
<td colspan="2">Warehouse</td>
|
||||
<td>Production</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><img class="r1" src="../img/x.gif"> Lumber</td>
|
||||
<td><center><?php echo floor($village['wood']); ?></center></td>
|
||||
<td rowspan="3"><center><?php echo $village['maxstore'];?></center></td>
|
||||
<td><center><?php echo $production['wood'];?></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img class="r2" src="../img/x.gif"> Clay</td>
|
||||
<td><center><?php echo floor($village['clay']); ?></center></td>
|
||||
<td><center><?php echo $production['clay'];?></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img class="r3" src="../img/x.gif"> Iron</td>
|
||||
<td><center><?php echo floor($village['iron']); ?></center></td>
|
||||
<td><center><?php echo $production['iron'];?></center></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img class="r4" src="../img/x.gif"> Crop</td>
|
||||
<td><center><?php echo floor($village['crop']); ?></center></td>
|
||||
<td><center><?php echo $village['maxcrop'];?></center></td>
|
||||
<td><center><?php echo $production['crop'];?></center></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="5">Village Expansion</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="hab">Village</td>
|
||||
<td class="hab">Inhabitants</td>
|
||||
<td class="hab">CP Production</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for($e = 1; $e < 4; $e++){
|
||||
$exp = $village['exp'.$e.''];
|
||||
if($exp == 0){
|
||||
echo '
|
||||
<tr>
|
||||
<td class="hab"><center> - </center></td>
|
||||
<td class="hab"><center> - </center></td>
|
||||
<td class="hab"><center> - </center></td>
|
||||
</tr>';
|
||||
}else{
|
||||
$vill = $database->getVillage($exp);
|
||||
$link = '<a href="admin.php?p=village&did='.$vill['wref'].'">'.$vill['name'].'</a>';
|
||||
echo '
|
||||
<tr>
|
||||
<td class="hab">'.$link.'</td>
|
||||
<td class="ra"><center>'.$vill['pop'].'<center></td>
|
||||
<td class="ra"><center>'.$vill['cp'].'</center></td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table id="member" cellpadding="1" cellspacing="1" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="6">Oasis</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="ra"></td>
|
||||
<td class="hab">Name</td>
|
||||
<td class="hab">Coordinates</td>
|
||||
<td class="hab">Loyalty</td>
|
||||
<td class="hab">Resources</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if(!empty($newResult)){
|
||||
foreach($newResult as $row){
|
||||
echo "
|
||||
<tr>
|
||||
<td><a href=\"?action=delOas&oid=".$row['wref']."&did=".$_GET['did']."\" onClick=\"return del('oas',".$row['wref'].")\"><img src=\"../img/admin/del.gif\"></a></td>
|
||||
<td class=\"hab\">".$row['name']."</td>
|
||||
<td class=\"hab\"><a href=\"../karte.php?d=".$row['wref']."&c=".$generator->getMapCheck($row['wref'])."\" target=\"blank\">(".$row['x']."|".$row['y'].")</a></td>
|
||||
<td class=\"hab\">".round($row['loyalty'])."%</td>
|
||||
<td class=\"hab\">".$row['type']."</td>
|
||||
</tr>";
|
||||
}
|
||||
}
|
||||
else echo '<td colspan="5"><center>This village has no oases</center></td>';
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
include('troops.tpl');
|
||||
?>
|
||||
|
||||
<?php
|
||||
include('troopUpgrades.tpl');
|
||||
?>
|
||||
|
||||
<?php
|
||||
include('artifact.tpl');
|
||||
?>
|
||||
|
||||
<a href="admin.php?p=editVillage&did=<?php echo $_GET['did']; ?>" title="Edit Village">
|
||||
<div id="content" class="village1" style="min-height: 264px;">
|
||||
<div id="village_map" class="f<?php echo $database->getVillageType($village['wref']); ?>" style="float: left;">
|
||||
<?php
|
||||
for($f = 1; $f < 19; $f++){
|
||||
$gid = $fdata['f'.($f).'t'];
|
||||
$level = $fdata['f'.($f)];
|
||||
echo "<img src=\"../img/x.gif\" class=\"reslevel rf".$f." level".$level."\">";
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div></a>
|
||||
<?php
|
||||
|
||||
$WWLevel = $fdata['f99t'];
|
||||
$wallLevel = $fdata['f40t'];
|
||||
if($wallLevel == 0) $wallType = "d2_0";
|
||||
else
|
||||
{
|
||||
switch($user['tribe']){
|
||||
case 1:
|
||||
case 5:
|
||||
default: $wallType = "d2_11"; break;
|
||||
|
||||
case 2: $wallType = "d2_12"; break;
|
||||
case 3: $wallType = "d2_1"; break;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="content" class="village2" style="padding: 0; margin-left: -20px;">
|
||||
<h1><?php echo $village['name']; ?></h1>
|
||||
<div id="village_map" class="<?php echo $wallType; ?>">
|
||||
<?php
|
||||
for($b = 1; $b < 21; $b++){
|
||||
$gid = $fdata['f'.($b + 18).'t'];
|
||||
if($gid > 0) echo "<img src=\"../img/x.gif\" class=\"building d".$b." g".$gid."\">";
|
||||
elseif($gid == 0) echo "<img src=\"../img/x.gif\" class=\"building d".$b." iso\">";
|
||||
}
|
||||
|
||||
$rplevel = $fdata['f39t'];
|
||||
|
||||
if($rplevel > 0) echo "<img src=\"../img/x.gif\" class=\"dx1 g16\">";
|
||||
elseif($rplevel == 0) echo "<img src=\"../img/x.gif\" class=\"dx1 g16e\">";
|
||||
|
||||
$resourcearray = $database->getResourceLevel($village['wref']);
|
||||
if($resourcearray['f99t'] == 40){
|
||||
if($resourcearray['f99'] >= 0 && $resourcearray['f99'] <= 19) {
|
||||
echo '<img class="ww g40" src="img/x.gif" alt="Worldwonder">';
|
||||
}elseif($resourcearray['f99'] >= 20 && $resourcearray['f99'] <= 39) {
|
||||
echo '<img class="ww g40_1" src="img/x.gif" alt="Worldwonder">';
|
||||
}elseif($resourcearray['f99'] >= 40 && $resourcearray['f99'] <= 59) {
|
||||
echo '<img class="ww g40_2" src="img/x.gif" alt="Worldwonder">';
|
||||
}elseif($resourcearray['f99'] >= 60 && $resourcearray['f99'] <= 79) {
|
||||
echo '<img class="ww g40_3" src="img/x.gif" alt="Worldwonder">';
|
||||
}elseif($resourcearray['f99'] >= 80 && $resourcearray['f99'] <= 99) {
|
||||
echo '<img class="ww g40_4" src="img/x.gif" alt="Worldwonder">';
|
||||
}elseif($resourcearray['f99'] == 100) {
|
||||
echo '<img class="ww g40_5" src="img/x.gif" alt="Worldwonder">';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="levels" class="on">
|
||||
<?php
|
||||
for($b = 1; $b < 21; $b++){
|
||||
$level = $fdata['f'.($b + 18)];
|
||||
if($level >0) echo "<div class=\"d$b\">$level</div>";
|
||||
}
|
||||
if($rplevel > 0) echo "<div class=\"l39\">".$fdata['f39']."</div>";
|
||||
if($wallLevel > 0) echo "<div class=\"l40\">".$fdata['f40']."</div>";
|
||||
if($WWLevel > 0) echo "<div class=\"d40\">".$fdata['f99']."</div>";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table id="member" cellpadding="1" cellspacing="1" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="5">Buildings</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="on">ID</td>
|
||||
<td class="on">GID</td>
|
||||
<td class="hab">Name</td>
|
||||
<td class="on">Level</td>
|
||||
<td class="on">Edit</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i = 1; $i <= 41; $i++){
|
||||
if($i == 41) $i = 99;
|
||||
|
||||
if($fdata['f'.$i.'t'] == 0) $bu = "-";
|
||||
else $bu = $funct->procResType($fdata['f'.$i.'t']);
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td class="on">'.$i.'</td>
|
||||
<td class="on">'.$fdata['f'.$i.'t'].'</td>
|
||||
<td class="hab">'.$bu.'</td>
|
||||
<td class="on">'.$fdata['f'.$i].'</td>
|
||||
<td class="on"><a href="admin.php?p=editVillage&did='.$_GET['did'].'"><img src="../img/admin/edit.gif" title="Edit Building & Level"></a></td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br /><br />
|
||||
|
||||
<a href="admin.php?p=villagelog&did=<?php echo $_GET['did']; ?>">Village Build Log</a>
|
||||
<br />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
}
|
||||
}
|
||||
include("search2.tpl");
|
||||
$svgEdit = '<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 20h9"/><path d="M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4 12.5-12.5z"/></svg>';
|
||||
$svgRefresh = '<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 12a9 9 0 1 1-3-6.7"/><path d="M21 3v6h-6"/></svg>';
|
||||
$svgDel = '<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg>';
|
||||
?>
|
||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css">
|
||||
<style>
|
||||
/* COMPACT V2 - centrat */
|
||||
.village-page{font-family:system-ui;max-width:1000px;margin:0 auto;padding:0 6px}
|
||||
.vgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
|
||||
@media(max-width:900px){.vgrid{grid-template-columns:1fr}}
|
||||
.vcard{background:#fff;border:1px solid #e5e7eb;border-radius:10px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,.04);margin-bottom:8px}
|
||||
.vhead{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:7px 10px;font-weight:600;font-size:13px;display:flex;justify-content:space-between;align-items:center}
|
||||
.vhead a{color:#93c5fd;display:inline-flex}
|
||||
.vtable{width:100%;border-collapse:collapse}
|
||||
.vtable td{padding:5px 8px;border-bottom:1px solid #f1f5f9;font-size:12.5px;color:#334155;vertical-align:middle}
|
||||
.vtable tr:last-child td{border-bottom:0}
|
||||
.vtable tr:hover td{background:#f8fafc}
|
||||
.vtable td.label{width:30%;color:#64748b;font-weight:500;background:#fcfcfd}
|
||||
.input-mini{padding:4px 6px;border:1px solid #d1d5db;border-radius:5px;font-size:12.5px}
|
||||
.btn-icon{background:none;border:0;padding:3px;cursor:pointer;color:#64748b;border-radius:4px;display:inline-flex}
|
||||
.btn-icon:hover{color:#2563eb;background:#eff6ff}
|
||||
.btn-icon.danger:hover{color:#dc2626;background:#fef2f2}
|
||||
.res-row{display:flex;align-items:center;gap:6px}
|
||||
.res-row img.r1,.res-row img.r2,.res-row img.r3,.res-row img.r4{width:14px;height:14px;background:url(../img/x.gif)}
|
||||
.badge-field img{width:13px;height:13px;vertical-align:middle}
|
||||
|
||||
/* HĂRȚI CENTRATE PERFECT */
|
||||
.vmap-wrap{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
|
||||
@media(max-width:900px){.vmap-wrap{grid-template-columns:1fr}}
|
||||
.map-card{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:8px;box-shadow:0 1px 4px rgba(0,0,0,.04);text-align:center}
|
||||
.map-card h3{margin:0 0 6px;font-size:12.5px;color:#0f172a;font-weight:600}
|
||||
.map-card #village_map{float:none!important;margin:0 auto!important;position:relative;left:0!important;right:0!important;display:block}
|
||||
.map-card .village1,.map-card .village2{min-height:auto!important}
|
||||
.map-card #content{padding:0!important;margin:0!important}
|
||||
</style>
|
||||
|
||||
<div class="village-page">
|
||||
|
||||
<div class="vgrid">
|
||||
<div>
|
||||
<div class="vcard">
|
||||
<div class="vhead">Village Information</div>
|
||||
<table class="vtable">
|
||||
<tr><td class="label">Owner</td><td><a href="admin.php?p=player&uid=<?php echo $village['owner']; ?>" style="color:#2563eb;font-weight:600"><?php echo $user['username']; ?></a></td>
|
||||
<td style="text-align:right">
|
||||
<form action="../GameEngine/Admin/Mods/editVillageOwner.php" method="POST" style="display:flex;gap:4px;align-items:center;justify-content:flex-end">
|
||||
<input type="hidden" name="did" value="<?php echo $_GET['did']; ?>">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input class="input-mini" type="text" name="newowner" value="<?php echo $user['id']; ?>" style="width:65px">
|
||||
<button class="btn-icon" title="Change"><?php echo $svgEdit; ?></button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td class="label">Name</td><td colspan="2">
|
||||
<form action="../GameEngine/Admin/Mods/renameVillage.php" method="POST" style="display:flex;gap:4px">
|
||||
<input type="hidden" name="did" value="<?php echo $_GET['did']; ?>">
|
||||
<input type="hidden" name="admid" value="<?php echo $_SESSION['id']; ?>">
|
||||
<input class="input-mini" type="text" name="villagename" value="<?php echo $village['name']; ?>" style="flex:1">
|
||||
<button class="btn-icon" title="Rename"><?php echo $svgEdit; ?></button>
|
||||
</form>
|
||||
</td></tr>
|
||||
<tr><td class="label">Population</td><td colspan="2"><?php echo $village['pop'];?> <a href="admin.php?action=recountPop&did=<?php echo $_GET['did']; ?>" class="btn-icon" style="margin-left:4px"><?php echo $svgRefresh; ?></a></td></tr>
|
||||
<tr><td class="label">Coords</td><td colspan="2"><a href="<?php echo HOMEPAGE ?>/karte.php?d=<?php echo $village['wref']; ?>&c=<?php echo $generator->getMapCheck($village['wref']); ?>" target="_blank" style="color:#16a34a;font-weight:600">(<?php echo $coor['x']."|".$coor['y']; ?>)</a></td></tr>
|
||||
<tr><td class="label">ID</td><td colspan="2"><?php echo $village['wref'];?></td></tr>
|
||||
<tr><td class="label">Field</td><td colspan="2" class="badge-field"><?php for ($i = 0; $i <= 3; $i++){ $a = $i + 1; echo $typ[$i].'x <img src="../img/admin/r/'.$a.'.gif">'.($i!=3?' | ':''); } ?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="vcard">
|
||||
<div class="vhead">Resources <a href="admin.php?p=editResources&did=<?php echo $_GET['did']; ?>"><?php echo $svgEdit; ?></a></div>
|
||||
<table class="vtable" style="text-align:center">
|
||||
<tr style="background:#f8fafc;font-size:11px;color:#64748b"><td style="text-align:left">Res</td><td>Amt</td><td>Cap</td><td>Prod</td></tr>
|
||||
<tr><td style="text-align:left" class="res-icon"><img src="../img/admin/r/1.gif"> Wood</td><td><?php echo floor($village['wood']); ?></td><td rowspan="3"><?php echo $village['maxstore'];?></td><td><?php echo $production['wood'];?></td></tr>
|
||||
<tr><td style="text-align:left" class="res-icon"><img src="../img/admin/r/2.gif"> Clay</td><td><?php echo floor($village['clay']); ?></td><td><?php echo $production['clay'];?></td></tr>
|
||||
<tr><td style="text-align:left" class="res-icon"><img src="../img/admin/r/3.gif"> Iron</td><td><?php echo floor($village['iron']); ?></td><td><?php echo $production['iron'];?></td></tr>
|
||||
<tr><td style="text-align:left" class="res-icon"><img src="../img/admin/r/4.gif"> Crop</td><td><?php echo floor($village['crop']); ?></td><td><?php echo $village['maxcrop'];?></td><td><?php echo $production['crop'];?></td></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="vcard">
|
||||
<div class="vhead">Expansion</div>
|
||||
<table class="vtable" style="text-align:center">
|
||||
<tr style="background:#f8fafc;font-size:11px;color:#64748b"><td>Village</td><td>Pop</td><td>CP</td></tr>
|
||||
<?php for($e = 1; $e < 4; $e++){ $exp = $village['exp'.$e.'']; if($exp == 0){ echo '<tr><td>-</td><td>-</td><td>-</td></tr>'; }else{ $vill = $database->getVillage($exp); echo '<tr><td><a href="admin.php?p=village&did='.$vill['wref'].'" style="color:#2563eb">'.$vill['name'].'</a></td><td>'.$vill['pop'].'</td><td>'.$vill['cp'].'</td></tr>'; } } ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="vcard">
|
||||
<div class="vhead">Oasis</div>
|
||||
<table class="vtable" style="text-align:center">
|
||||
<tr style="background:#f8fafc;font-size:11px;color:#64748b"><td style="width:28px"></td><td>Name</td><td>Coords</td><td>Loy</td><td>Bonus</td></tr>
|
||||
<?php if(!empty($newResult)){ foreach($newResult as $row){ echo '<tr><td><a href="?action=delOas&oid='.$row['wref'].'&did='.$_GET['did'].'" onclick="return del(\'oas\','.$row['wref'].')" class="btn-icon danger">'.$svgDel.'</a></td><td>'.$row['name'].'</td><td><a href="../karte.php?d='.$row['wref'].'&c='.$generator->getMapCheck($row['wref']).'" target="_blank" style="color:#2563eb">('.$row['x'].'|'.$row['y'].')</a></td><td>'.round($row['loyalty']).'%</td><td>'.$row['type'].'</td></tr>'; } } else { echo '<tr><td colspan="5" style="color:#94a3b8;padding:10px">No oases</td></tr>'; } ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="vcard"><div class="vhead">Troops</div><div style="padding:4px"><?php include('troops.tpl'); ?></div></div>
|
||||
<div class="vcard"><div class="vhead">Upgrades</div><div style="padding:4px"><?php include('troopUpgrades.tpl'); ?></div></div>
|
||||
<div class="vcard"><div class="vhead">Artifact</div><div style="padding:4px"><?php include('artifact.tpl'); ?></div></div>
|
||||
|
||||
<div class="vmap-wrap">
|
||||
<div class="map-card">
|
||||
<h3>Resource Fields</h3>
|
||||
<a href="admin.php?p=editVillage&did=<?php echo $_GET['did']; ?>">
|
||||
<div id="content" class="village1">
|
||||
<div id="village_map" class="f<?php echo $database->getVillageType($village['wref']); ?>">
|
||||
<?php for($f = 1; $f < 19; $f++){ $level = $fdata['f'.($f)]; echo "<img src=\"../img/x.gif\" class=\"reslevel rf".$f." level".$level."\">"; } ?>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="map-card">
|
||||
<h3>Village Center - <?php echo $village['name']; ?></h3>
|
||||
<?php $WWLevel = $fdata['f99t']; $wallLevel = $fdata['f40t']; if($wallLevel == 0) $wallType = "d2_0"; else { switch($user['tribe']){ case 1: case 5: default: $wallType = "d2_11"; break; case 2: $wallType = "d2_12"; break; case 3: $wallType = "d2_1"; break; } } ?>
|
||||
<div id="content" class="village2">
|
||||
<div id="village_map" class="<?php echo $wallType; ?>">
|
||||
<?php for($b = 1; $b < 21; $b++){ $gid = $fdata['f'.($b + 18).'t']; if($gid > 0) echo "<img src=\"../img/x.gif\" class=\"building d".$b." g".$gid."\">"; elseif($gid == 0) echo "<img src=\"../img/x.gif\" class=\"building d".$b." iso\">"; }
|
||||
$rplevel = $fdata['f39t']; if($rplevel > 0) echo "<img src=\"../img/x.gif\" class=\"dx1 g16\">"; elseif($rplevel == 0) echo "<img src=\"../img/x.gif\" class=\"dx1 g16e\">";
|
||||
$resourcearray = $database->getResourceLevel($village['wref']);
|
||||
if($resourcearray['f99t'] == 40){
|
||||
if($resourcearray['f99'] <= 19) echo '<img class="ww g40" src="img/x.gif">';
|
||||
elseif($resourcearray['f99'] <= 39) echo '<img class="ww g40_1" src="img/x.gif">';
|
||||
elseif($resourcearray['f99'] <= 59) echo '<img class="ww g40_2" src="img/x.gif">';
|
||||
elseif($resourcearray['f99'] <= 79) echo '<img class="ww g40_3" src="img/x.gif">';
|
||||
elseif($resourcearray['f99'] <= 99) echo '<img class="ww g40_4" src="img/x.gif">';
|
||||
else echo '<img class="ww g40_5" src="img/x.gif">';
|
||||
} ?>
|
||||
<div id="levels" class="on">
|
||||
<?php for($b = 1; $b < 21; $b++){ $level = $fdata['f'.($b + 18)]; if($level >0) echo "<div class=\"d$b\">$level</div>"; } if($rplevel > 0) echo "<div class=\"l39\">".$fdata['f39']."</div>"; if($wallLevel > 0) echo "<div class=\"l40\">".$fdata['f40']."</div>"; if($WWLevel > 0) echo "<div class=\"d40\">".$fdata['f99']."</div>"; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="vcard" style="margin-top:8px">
|
||||
<div class="vhead">Buildings</div>
|
||||
<table class="vtable" style="text-align:center">
|
||||
<tr style="background:#f8fafc;font-size:11px;color:#64748b"><td>ID</td><td>GID</td><td style="text-align:left">Name</td><td>Lvl</td><td>Edit</td></tr>
|
||||
<?php for ($i = 1; $i <= 41; $i++){ if($i == 41) $i = 99; if($fdata['f'.$i.'t'] == 0) $bu = "-"; else $bu = $funct->procResType($fdata['f'.$i.'t']); echo '<tr><td>'.$i.'</td><td>'.$fdata['f'.$i.'t'].'</td><td style="text-align:left">'.$bu.'</td><td>'.$fdata['f'.$i].'</td><td><a href="admin.php?p=editVillage&did='.$_GET['did'].'" class="btn-icon">'.$svgEdit.'</a></td></tr>'; } ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div style="text-align:center;margin:12px 0"><a href="admin.php?p=villagelog&did=<?php echo $_GET['did']; ?>" style="color:#2563eb;font-weight:500;font-size:13px">Village Build Log →</a></div>
|
||||
|
||||
</div>
|
||||
<?php } else { include("404.tpl"); } } ?>
|
||||
@@ -1,39 +1,93 @@
|
||||
<?php
|
||||
$id = $_GET['did'];
|
||||
if(isset($id))
|
||||
{
|
||||
?>
|
||||
<br /><br />
|
||||
<table id="profile">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3" class="on"><a href="#"><?php echo $village['name']; ?></a>'s Build Log</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 12%">#</td>
|
||||
<td>Event</td>
|
||||
<td>Date</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php
|
||||
$sql = "SELECT * FROM ".TB_PREFIX."build_log WHERE wid = ".(int) $_GET['did']."";
|
||||
$result = mysqli_query($GLOBALS["link"], $sql);
|
||||
$j = 0;
|
||||
while($row = mysqli_fetch_assoc($result))
|
||||
{
|
||||
echo '
|
||||
<tr>
|
||||
<td>'.++$j.'</td>
|
||||
<td>'.$row['log'].'</td>
|
||||
<td style="white-space: nowrap">'.$row['date'].'</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</thead>
|
||||
</table><?php
|
||||
}
|
||||
else
|
||||
{
|
||||
include("404.tpl");
|
||||
}
|
||||
?>
|
||||
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename : villagelog.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
|
||||
$id = (int)($_GET['did'] ?? 0);
|
||||
if(!$id){ include("404.tpl"); return; }
|
||||
|
||||
$logs = $database->query("SELECT * FROM ".TB_PREFIX."build_log WHERE wid = $id ORDER BY id DESC LIMIT 200");
|
||||
?>
|
||||
<style>
|
||||
.back-btn{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid #e5e7eb;padding:8px 14px;border-radius:8px;color:#334155;text-decoration:none;font-size:13px;font-weight:500;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.05)}
|
||||
.back-btn:hover{background:#f8fafc}
|
||||
.vlog-wrap{max-width:900px;margin:20px auto;font-family:system-ui}
|
||||
.vlog-head{background:linear-gradient(135deg,#2c3e50,#34495e);color:#fff;padding:16px 20px;border-radius:12px 12px 0 0;display:flex;align-items:center;gap:12px}
|
||||
.vlog-head .icon{width:36px;height:36px;background:#71D00020;border-radius:8px;display:grid;place-items:center;font-size:20px}
|
||||
.vlog-head h2{margin:0;font-size:18px;font-weight:600}
|
||||
.vlog-head span{opacity:.8;font-size:13px}
|
||||
.vlog-card{background:#fff;border:1px solid #e5e7eb;border-radius:0 0 12px 12px;overflow:hidden;box-shadow:0 4px 12px rgba(0,0,0,.05)}
|
||||
.vlog-table{width:100%;border-collapse:collapse}
|
||||
.vlog-table th{background:#f8fafc;color:#64748b;font-size:12px;text-transform:uppercase;letter-spacing:.5px;padding:12px 16px;text-align:left;border-bottom:1px solid #e5e7eb}
|
||||
.vlog-table td{padding:14px 16px;border-bottom:1px solid #f1f5f9;font-size:14px;color:#334155}
|
||||
.vlog-table tr:hover td{background:#f8fafc}
|
||||
.vlog-table tr:last-child td{border-bottom:0}
|
||||
.badge{display:inline-block;padding:3px 8px;border-radius:6px;font-size:11px;font-weight:600}
|
||||
.badge-build{background:#dcfce7;color:#166534}
|
||||
.badge-demolish{background:#fee2e2;color:#991b1b}
|
||||
.badge-upgrade{background:#dbeafe;color:#1e40af}
|
||||
.vlog-num{width:50px;color:#94a3b8;font-variant-numeric:tabular-nums}
|
||||
.vlog-date{white-space:nowrap;color:#64748b;font-size:13px;width:160px}
|
||||
.empty{padding:40px;text-align:center;color:#94a3b8}
|
||||
</style>
|
||||
|
||||
<div class="vlog-wrap">
|
||||
<a href="admin.php?p=village&did=<?php echo $id; ?>" class="back-btn">← Back to Village</a>
|
||||
|
||||
<div class="vlog-head">
|
||||
<div class="icon">🏗️</div>
|
||||
<div>
|
||||
<h2><?php echo htmlspecialchars($village['name']); ?> <span style="opacity:.7">— Build Log</span></h2>
|
||||
<span>Latest 200 action</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="vlog-card">
|
||||
<?php if(mysqli_num_rows($logs) == 0): ?>
|
||||
<div class="empty">No action recorded yet.</div>
|
||||
<?php else: ?>
|
||||
<table class="vlog-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="vlog-num">#</th>
|
||||
<th>Event</th>
|
||||
<th class="vlog-date">Data</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = mysqli_num_rows($logs);
|
||||
while($row = mysqli_fetch_assoc($logs)):
|
||||
$log = htmlspecialchars($row['log']);
|
||||
$badge = 'badge-upgrade';
|
||||
if(stripos($log,'demolish')!==false || stripos($log,'destroy')!==false) $badge='badge-demolish';
|
||||
if(stripos($log,'built')!==false || stripos($log,'construct')!==false) $badge='badge-build';
|
||||
$date = date('d.m.Y H:i', strtotime($row['date']));
|
||||
?>
|
||||
<tr>
|
||||
<td class="vlog-num"><?php echo $i--; ?></td>
|
||||
<td><span class="badge <?php echo $badge; ?>"></span> <?php echo $log; ?></td>
|
||||
<td class="vlog-date"><?php echo $date; ?></td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2,58 +2,74 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename villages.tpl ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
## Filename : villages.tpl ##
|
||||
## Type : Admin Panel Frontend ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Developed by : Dzoki (Original) ##
|
||||
## Refactored by : Shadow ##
|
||||
## Redesign by : Shadow ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Contact : cata7007@gmail.com ##
|
||||
## Project : TravianZ ##
|
||||
## GitHub : https://github.com/Shadowss/TravianZ ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## License : TravianZ Project ##
|
||||
## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
#################################################################################
|
||||
?>
|
||||
<style>
|
||||
.del {width:12px; height:12px; background-image: url(img/admin/icon/del.gif);}
|
||||
.vil-wrap{font-family:system-ui;margin-top:8px}
|
||||
.vil-head{width:100%;background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:9px 12px;font-weight:600;text-align:center;font-size:14px;border:1px solid #0f172a;border-radius:10px 10px 0 0;box-sizing:border-box}
|
||||
.vil-table{width:100%;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e5e7eb;border-top:0;border-radius:0 0 10px 10px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,.04)}
|
||||
.vil-table tr:first-child td{background:#f8fafc;color:#64748b;font-size:11px;text-transform:uppercase;padding:7px 10px;font-weight:600;border-bottom:1px solid #e5e7eb;text-align:center}
|
||||
.vil-table td{padding:7px 10px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;text-align:center}
|
||||
.vil-table tr:last-child td{border-bottom:0}
|
||||
.vil-table tr:hover td{background:#f8fafc}
|
||||
.vil-table a{color:#2563eb;text-decoration:none;font-weight:500}
|
||||
.vil-table a:hover{text-decoration:underline}
|
||||
.vil-table .c{color:#dc2626;font-size:11px;margin-left:4px;font-weight:600}
|
||||
.vil-icon{display:inline-flex;vertical-align:middle;opacity:.7;transition:.15s}
|
||||
.vil-icon:hover{opacity:1}
|
||||
.vil-icon svg{width:14px;height:14px;stroke:#64748b;stroke-width:2;fill:none}
|
||||
.vil-icon:hover svg{stroke:#2563eb}
|
||||
.vil-icon.del:hover svg{stroke:#dc2626}
|
||||
</style>
|
||||
<table id="member">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Villages</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
<table id="profile">
|
||||
<div class="vil-wrap">
|
||||
<div class="vil-head">Villages (<?php echo count($varray);?>)</div>
|
||||
|
||||
<table class="vil-table">
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>Population</td>
|
||||
<td>Coordinates</td>
|
||||
<td>Add Troops</td>
|
||||
<td></td>
|
||||
<td>NAME</td>
|
||||
<td>POPULATION</td>
|
||||
<td>COORDINATES</td>
|
||||
<td>TROOPS</td>
|
||||
<td style="width:32px"></td>
|
||||
</tr>
|
||||
<?php
|
||||
for ($i = 0; $i <= count($varray)-1; $i++) {
|
||||
$coorproc = $database->getCoor($varray[$i]['wref']);
|
||||
if($varray[$i]['capital']){
|
||||
$capital = '<span class="c">(Capital)</span>';
|
||||
$delLink = '<a href="#"><img src="../img/admin/del_g.gif" class="del"></a>';
|
||||
}else{
|
||||
$capital = '';
|
||||
if($_SESSION['access'] == ADMIN){
|
||||
$delLink = '<a href="?action=delVil&did='.$varray[$i]['wref'].'" onClick="return del(\'did\','.$varray[$i]['wref'].');"><img src="../img/admin/del.gif" class="del"></a>';
|
||||
}else if($_SESSION['access'] == MULTIHUNTER){
|
||||
$delLink = '<a href="#"><img src="../img/admin/del_g.gif" class="del"></a>';
|
||||
}
|
||||
}
|
||||
$addTroops = '<a href="?p=addTroops&did='.$varray[$i]['wref'].'"> Edit Troops</a>';
|
||||
echo '
|
||||
for ($i = 0; $i < count($varray); $i++) {
|
||||
$coor = $database->getCoor($varray[$i]['wref']);
|
||||
$capital = $varray[$i]['capital'] ? '<span class="c">(Capital)</span>' : '';
|
||||
|
||||
$canDel = ($_SESSION['access'] == ADMIN && !$varray[$i]['capital']);
|
||||
if($canDel){
|
||||
$delLink = '<a class="vil-icon del" href="?action=delVil&did='.$varray[$i]['wref'].'" onclick="return del(\'did\','.$varray[$i]['wref'].');" title="Delete village"><svg viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg></a>';
|
||||
} else {
|
||||
$delLink = '<span class="vil-icon" style="opacity:.3" title="Cannot delete"><svg viewBox="0 0 24 24"><path d="M3 6h18M8 6V4h8v2m-1 0v14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2V6h10z"/></svg></span>';
|
||||
}
|
||||
|
||||
$recount = '<a class="vil-icon" href="?action=recountPop&did='.$varray[$i]['wref'].'" title="Recount population"><svg viewBox="0 0 24 24"><path d="M21 12a9 9 0 1 1-3-6.7"/><path d="M21 3v6h-6"/></svg></a>';
|
||||
|
||||
echo '
|
||||
<tr>
|
||||
<td><a href="?p=village&did='.$varray[$i]['wref'].'">'.$varray[$i]['name'].'</a> '.$capital.'</td>
|
||||
<td>'.$varray[$i]['pop'].' <a href="?action=recountPop&did='.$varray[$i]['wref'].'">Recount<a/></td>
|
||||
<td>('.$coorproc['x'].'|'.$coorproc['y'].')</td>
|
||||
<td>'.$addTroops.' </td>
|
||||
<td>'.$delLink.' </td>
|
||||
</tr>
|
||||
';
|
||||
<td style="text-align:left"><a href="?p=village&did='.$varray[$i]['wref'].'">'.$varray[$i]['name'].'</a> '.$capital.'</td>
|
||||
<td>'.$varray[$i]['pop'].' '.$recount.'</td>
|
||||
<td>('.$coor['x'].'|'.$coor['y'].')</td>
|
||||
<td><a href="?p=addTroops&did='.$varray[$i]['wref'].'">Edit</a></td>
|
||||
<td>'.$delLink.'</td>
|
||||
</tr>';
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
+82
-46
@@ -7,7 +7,7 @@
|
||||
## ##
|
||||
## Project: TravianZ ##
|
||||
## Version: 05.03.2026 ##
|
||||
## Filename: Admin/admin.php ##
|
||||
## Filename: Admin/admin.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## Refactored by: Shadow ##
|
||||
## License: TravianZ Project ##
|
||||
@@ -359,19 +359,54 @@ if (!empty($_GET['p'])) {
|
||||
<link rel="stylesheet" type="text/css" href="../img/img.css">
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="jquery.cookie.js"></script>
|
||||
<?php
|
||||
if($not_include_mootools_js){}else{
|
||||
?>
|
||||
<?php if($not_include_mootools_js){}else{ ?>
|
||||
<script type="text/javascript" src="/mt-full.js?423cb"></script>
|
||||
<script type="text/javascript" src="ajax.js"></script>
|
||||
<script type="text/javascript" src="../new.js?0faab"></script>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<?php } ?>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="imagetoolbar" content="no">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<style>
|
||||
/* === TRAVIANZ ADMIN === */
|
||||
body{margin:0;font-family:Verdana,Arial,sans-serif}
|
||||
#ltop1{border-bottom:3px solid #f59e0b}
|
||||
.tz-topbar{display:flex;align-items:center;justify-content:space-between;padding:14px 22px;min-height:64px}
|
||||
.tz-brand{display:flex;align-items:center;gap:12px}
|
||||
.tz-logo{width:38px;height:38px;background:#f59e0b;border-radius:8px;display:flex;align-items:center;justify-content:center;font-weight:bold;color:#fff;font-size:18px}
|
||||
.tz-brand h1{margin:0;font-size:20px;font-weight:700}
|
||||
.tz-brand h1 span{color:#f59e0b}
|
||||
.tz-brand .tz-sub{display:block;font-size:10px;margin-top:2px;text-transform:uppercase;letter-spacing:.7px;opacity:.7}
|
||||
.tz-user{font-size:12px}
|
||||
.tz-logout{margin-left:10px;background:#ef4444;color:#fff;padding:5px 11px;border-radius:6px;text-decoration:none;font-size:11px;font-weight:bold}
|
||||
|
||||
/* LOGIN = header NEGRU */
|
||||
body.login{background:#0f172a;color:#e2e8f0}
|
||||
body.login #ltop1{background:#0b1220 !important;background-image:none !important}
|
||||
body.login .tz-topbar{color:#fff !important}
|
||||
body.login .tz-brand h1{color:#fff !important}
|
||||
body.login .tz-brand .tz-sub{color:#94a3b8 !important}
|
||||
|
||||
/* APP = header ALB */
|
||||
body.app{background:#eef2f7;color:#1f2937}
|
||||
body.app #ltop1{background:#ffffff !important;background-image:none !important;border-bottom:1px solid #e5e7eb !important}
|
||||
body.app .tz-topbar{color:#1f2937 !important}
|
||||
body.app .tz-brand h1{color:#111827 !important}
|
||||
body.app .tz-brand .tz-sub{color:#6b7280 !important}
|
||||
body.app .tz-user{color:#4b5563}
|
||||
body.app #lleft{background:#ffffff!important;border-right:1px solid #e5e7eb}
|
||||
body.app #lmid1{background:#ffffff;border:1px solid #e5e7eb;border-radius:10px;box-shadow:0 1px 2px rgba(0,0,0,.04);margin:16px;padding:20px!important}
|
||||
body.app #menu>li>a{display:block;padding:10px 16px;color:#374151!important;font-weight:600;font-size:12px;border-left:3px solid transparent;text-decoration:none}
|
||||
body.app #menu>li>a:hover,body.app #menu>li>a.active{background:#f3f4f6;border-left-color:#f59e0b;color:#111827!important}
|
||||
body.app #menu li.sub ul{background:#f9fafb}
|
||||
body.app #menu li.sub ul li a{display:block;padding:8px 16px 8px 34px;font-size:11px;color:#6b7280!important}
|
||||
body.app #menu li.sub ul li a:hover{color:#d97706!important}
|
||||
body.app #menu li a{background:#ffffff !important;color:#374151 !important;border-bottom:1px solid #f3f4f6 !important}
|
||||
body.app #menu li a:hover{background:#f9fafb !important}
|
||||
body.app #lleft{box-shadow:none !important}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body class="<?php echo $funct->CheckLogin() ? 'app' : 'login'; ?>">
|
||||
<script type="text/javascript">
|
||||
init_local();
|
||||
function getMouseCoords(e) {
|
||||
@@ -389,28 +424,23 @@ if (!empty($_GET['p'])) {
|
||||
}
|
||||
return coords;
|
||||
}
|
||||
|
||||
function med_mouseMoveHandler(e, desc_string){
|
||||
var coords = getMouseCoords(e);
|
||||
med_showDescription(coords, desc_string);
|
||||
}
|
||||
|
||||
function med_closeDescription(){
|
||||
var layer = document.getElementById("medal_mouseover");
|
||||
layer.className = "hide";
|
||||
}
|
||||
|
||||
function init_local(){
|
||||
med_init();
|
||||
}
|
||||
|
||||
function med_init(){
|
||||
layer = document.createElement("div");
|
||||
layer.id = "medal_mouseover";
|
||||
layer.className = "hide";
|
||||
document.body.appendChild(layer);
|
||||
}
|
||||
|
||||
function med_showDescription(coords, desc_string){
|
||||
var layer = document.getElementById("medal_mouseover");
|
||||
layer.style.top = (coords.y + 25)+ "px";
|
||||
@@ -422,7 +452,6 @@ if (!empty($_GET['p'])) {
|
||||
<script language="javascript">
|
||||
function aktiv() {this.srcElement.className='fl1'; }
|
||||
function inaktiv() {event.srcElement.className='fl2'; }
|
||||
|
||||
function del(e,id){
|
||||
if(e == 'arti'){ var conf = confirm('Dou you really want delete artifact id '+id+'?'); }
|
||||
if(e == 'did'){ var conf = confirm('Dou you really want delete village id '+id+'?'); }
|
||||
@@ -433,19 +462,10 @@ if (!empty($_GET['p'])) {
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
function showStuff(id) {
|
||||
document.getElementById(id).style.display = 'block';
|
||||
}
|
||||
function hideStuff(id) {
|
||||
document.getElementById(id).style.display = 'none';
|
||||
}
|
||||
function go_url(url) {
|
||||
location=url;
|
||||
return(false);
|
||||
}
|
||||
|
||||
function showStuff(id) { document.getElementById(id).style.display = 'block'; }
|
||||
function hideStuff(id) { document.getElementById(id).style.display = 'none'; }
|
||||
function go_url(url) { location=url; return(false); }
|
||||
</script>
|
||||
<!-- Start Accordeon Menu -->
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function () {
|
||||
var checkCookie = $.cookie("sub-nav");
|
||||
@@ -462,8 +482,6 @@ if (!empty($_GET['p'])) {
|
||||
$(this).next().slideToggle();
|
||||
}
|
||||
return false;
|
||||
$('#menu li a').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
var checkCookie = $.cookie("sub-link");
|
||||
if (checkCookie != "") {
|
||||
@@ -475,28 +493,47 @@ if (!empty($_GET['p'])) {
|
||||
$('.sub ul li a').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<!-- End Accordeon Menu -->
|
||||
|
||||
<div id="ltop1">
|
||||
<div style="position:relative; height:100px; float:left;">
|
||||
<img src="../img/x.gif" width="1" height="1">
|
||||
<div class="tz-topbar">
|
||||
<div class="tz-brand">
|
||||
<div class="tz-logo">TZ</div>
|
||||
<div>
|
||||
<h1>TravianZ <span>Admin Panel</span></h1>
|
||||
<span class="tz-sub"><?php echo htmlspecialchars($subpage); ?> • v05.03.2026</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tz-user">
|
||||
<?php if($funct->CheckLogin()){ ?>
|
||||
<?php
|
||||
$adminName = $database->getUserField($_SESSION['id'], 'username', 0);
|
||||
$adminAccess = $database->getUserField($_SESSION['id'], 'access', 0);
|
||||
$rank = $adminAccess == 9 ? 'Admin' : ($adminAccess == 8 ? 'MH' : 'User');
|
||||
?>
|
||||
Logged: <b><?=$adminName?></b> <span style="color:#999;font-size:11px">(<?=$rank?>)</span>
|
||||
<a href="?action=logout" class="tz-logout">Logout</a>
|
||||
<?php } else { ?>
|
||||
Not Logged in
|
||||
<?php } ?>
|
||||
</div>
|
||||
</div>
|
||||
<p class="center-img">
|
||||
<img class="fl2" src="../img/admin/x1.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'">
|
||||
<img class="fl2" src="../img/admin/x2.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'">
|
||||
<img class="fl2" src="../img/admin/x3.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'">
|
||||
<img class="fl2" src="../img/admin/x4.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'">
|
||||
<img class="fl2" src="../img/admin/x5.gif" width="70" height="100" border="0" onmouseover="this.className='fl1'" onmouseout="this.className='fl2'">
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div id="lmidall">
|
||||
<div id="lmidlc">
|
||||
<div id="lleft">
|
||||
<p class="center-img">
|
||||
<a href="<?php echo HOMEPAGE; ?>"><img src="../img/en/a/travian0.gif" class="logo_plus" width="116" height="60" border="0"></a>
|
||||
</p>
|
||||
<!-- Start Accordeon Menu -->
|
||||
<a href="<?php echo HOMEPAGE; ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="78" height="78" style="display:block;margin:0 auto;filter:drop-shadow(0 2px 4px rgba(0,0,0,.25));">
|
||||
<defs><linearGradient id="tz1" x1="128" y1="28" x2="128" y2="236"><stop offset="0%" stop-color="#f59e0b"/><stop offset="100%" stop-color="#d97706"/></linearGradient></defs>
|
||||
<path d="M128 28c-32 0-64 3-84 16v86c0 54 36 90 84 104 48-14 84-50 84-104V44c-20-13-52-16-84-16z" fill="url(#tz1)" stroke="#78350f" stroke-width="5"/>
|
||||
<path d="M106 38l9-12 8 7 5-14 5 14 8-7 9 12v8c-14-4.5-30-4.5-44 0v-8z" fill="#fcd34d" stroke="#78350f" stroke-width="3"/>
|
||||
<text x="128" y="165" font-family="Georgia" font-size="90" font-weight="700" text-anchor="middle" fill="#3c1f0a">TZ</text>
|
||||
</svg>
|
||||
</a>
|
||||
</p>
|
||||
<?php
|
||||
if($funct->CheckLogin())
|
||||
{
|
||||
@@ -537,7 +574,6 @@ if (!empty($_GET['p'])) {
|
||||
<li class="sub"><a href="#">Ban</a>
|
||||
<ul>
|
||||
<li><a href="?p=ban">Ban/Unban Players</a></li>
|
||||
<li><a href="?p=maintenance">Server Maintenance</a></li>
|
||||
<li><a href="?p=cleanban">Clean Banlist Data</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -566,6 +602,7 @@ if (!empty($_GET['p'])) {
|
||||
<ul>
|
||||
<li><a href="?p=admin_log"><font color="Red"><b>Admin Log</b></font></a></li>
|
||||
<li><a href="?p=config">Server Settings</a></li>
|
||||
<li><a href="?p=maintenance">Server Maintenance</a></li>
|
||||
<li><a href="?p=resetServer">Server Resetting</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@@ -588,7 +625,6 @@ if (!empty($_GET['p'])) {
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!-- End Accordeon Menu -->
|
||||
</div>
|
||||
<div id="lmid1">
|
||||
<div id="lmid3">
|
||||
@@ -624,4 +660,4 @@ if (!empty($_GET['p'])) {
|
||||
<div id="ce"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
#################################################################################
|
||||
## editAli.php - Backend pentru editAli.tpl ##
|
||||
#################################################################################
|
||||
|
||||
include_once("../../config.php");
|
||||
include_once("../../Session.php");
|
||||
include_once("../../Database.php");
|
||||
|
||||
$session = new Session();
|
||||
$database = new Database();
|
||||
|
||||
// doar admini
|
||||
if(!$session->isAdmin()){
|
||||
header("Location: ../../../Admin/admin.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
$aid = (int)($_POST['aid'] ?? 0);
|
||||
$admid = (int)($_POST['admid'] ?? 0);
|
||||
|
||||
// verificare sesiune
|
||||
if($admid != $session->uid || $aid <= 0){
|
||||
die("Access denied");
|
||||
}
|
||||
|
||||
$tag = $database->escape(substr(trim($_POST['tag']), 0, 8));
|
||||
$name = $database->escape(substr(trim($_POST['name']), 0, 25));
|
||||
$leader = (int)$_POST['leader'];
|
||||
$max = (int)$_POST['max'];
|
||||
if($max < 3) $max = 3;
|
||||
if($max > 60) $max = 60;
|
||||
|
||||
$notice = $database->escape($_POST['notice']);
|
||||
$desc = $database->escape($_POST['desc']);
|
||||
|
||||
// update alidata
|
||||
$database->query("UPDATE ".TB_PREFIX."alidata SET
|
||||
tag = '$tag',
|
||||
name = '$name',
|
||||
leader = $leader,
|
||||
`max` = $max,
|
||||
notice = '$notice',
|
||||
`desc` = '$desc'
|
||||
WHERE id = $aid");
|
||||
|
||||
// log admin
|
||||
$database->query("INSERT INTO ".TB_PREFIX."admin_log (uid, action, time) VALUES ($admid, 'Edited alliance $aid ($tag)', ".time().")");
|
||||
|
||||
// redirect inapoi
|
||||
header("Location: ../../../Admin/admin.php?p=alliance&aid=$aid&edited=1");
|
||||
exit;
|
||||
?>
|
||||
@@ -5,9 +5,9 @@
|
||||
## Filename editBuildings.php ##
|
||||
## Type BACKEND ##
|
||||
## Developed by: aggenkeech ##
|
||||
## Fix by: ronix ##
|
||||
## Fix by: ronix + Shadow 2026 (WW lvl 100 + auto pop) ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2011-2014. All rights reserved. ##
|
||||
## Copyright: TravianZ (c) 2011-2026. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
@@ -52,16 +52,25 @@ for ($i = 1; $i <= 40; $i++) {
|
||||
$gid = (int)($_POST["id{$i}gid"] ?? 0);
|
||||
// limităm la valori rezonabile Travian
|
||||
$level = max(0, min(20, $level));
|
||||
$gid = max(0, min(40, $gid));
|
||||
$gid = max(0, min(44, $gid)); // 44 = ziduri speciale
|
||||
$sets[] = "f{$i} = $level";
|
||||
$sets[] = "f{$i}t = $gid";
|
||||
}
|
||||
|
||||
// câmpurile speciale f99 (capcană / zid?)
|
||||
// câmpurile speciale f99
|
||||
$level99 = (int)($_POST['id99level'] ?? 0);
|
||||
$gid99 = (int)($_POST['id99gid'] ?? 0);
|
||||
$sets[] = "f99 = " . max(0, min(20, $level99));
|
||||
$sets[] = "f99t = " . max(0, min(40, $gid99));
|
||||
|
||||
// --- FIX WW: gid 40 = World Wonder, level maxim 100 ---
|
||||
if ($gid99 == 40) {
|
||||
$level99 = max(0, min(100, $level99));
|
||||
} else {
|
||||
$level99 = max(0, min(20, $level99)); // capcană, etc.
|
||||
}
|
||||
$gid99 = max(0, min(44, $gid99));
|
||||
|
||||
$sets[] = "f99 = " . $level99;
|
||||
$sets[] = "f99t = " . $gid99;
|
||||
|
||||
$setSql = implode(', ', $sets);
|
||||
|
||||
@@ -70,9 +79,23 @@ $setSql = implode(', ', $sets);
|
||||
// ---------------------------------------------------------------------------
|
||||
$database->query("UPDATE " . TB_PREFIX . "fdata SET $setSql WHERE vref = $id");
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// recalculăm populația după editare
|
||||
// ---------------------------------------------------------------------------
|
||||
$automation = new Automation();
|
||||
$automation->recountPop($id);
|
||||
$pop = $automation->recountPop($id);
|
||||
|
||||
// --- FIX: recountPop original nu include f99 (WW), îl adăugăm ---
|
||||
$fdata = $database->getResourceLevel($id);
|
||||
if ((int)$fdata['f99t'] === 40) {
|
||||
$wwLevel = (int)$fdata['f99'];
|
||||
if ($wwLevel > 0) {
|
||||
// buildingPOP există în Automation
|
||||
$wwPop = $automation->buildingPOP(40, $wwLevel);
|
||||
$pop += $wwPop;
|
||||
$database->query("UPDATE " . TB_PREFIX . "vdata SET pop = $pop WHERE wref = $id");
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Log admin
|
||||
|
||||
+21
-3
@@ -3021,10 +3021,11 @@ class MYSQLi_DB implements IDbConnection {
|
||||
$q = "DELETE from " . TB_PREFIX . "forum_post where id = '$id'";
|
||||
return mysqli_query($this->dblink,$q);
|
||||
}
|
||||
|
||||
|
||||
function getAllianceName($id, $use_cache = true) {
|
||||
// return from cache
|
||||
return $this->getAlliance($id, $use_cache)['tag'];
|
||||
if (!$id) return '-';
|
||||
$alliance = $this->getAlliance($id, $use_cache);
|
||||
return $alliance['tag'] ?? '-';
|
||||
}
|
||||
|
||||
// no need to cache this method
|
||||
@@ -8751,6 +8752,22 @@ $q = "INSERT INTO ".TB_PREFIX."demolition VALUES (
|
||||
hero.wref = $wref";
|
||||
return mysqli_query($this->dblink, $q);
|
||||
}
|
||||
|
||||
public function getMaintenance() {
|
||||
$q = "SELECT * FROM ".TB_PREFIX."maintenance WHERE id=1 LIMIT 1";
|
||||
$res = $this->query_return($q);
|
||||
return $res[0]?? ['active'=>0];
|
||||
}
|
||||
public function setMaintenance($active, $uid=0) {
|
||||
$time = time();
|
||||
$active = (int)$active;
|
||||
$uid = (int)$uid;
|
||||
// REPLACE creează rândul dacă nu există
|
||||
return $this->query("REPLACE INTO ".TB_PREFIX."maintenance
|
||||
(id, active, started_by, started_at)
|
||||
VALUES (1, $active, $uid, $time)");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Changed the actual capital with a new one
|
||||
@@ -8767,6 +8784,7 @@ $q = "INSERT INTO ".TB_PREFIX."demolition VALUES (
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// database is not needed if we're displaying static pages
|
||||
$req_file = basename($_SERVER['PHP_SELF']);
|
||||
if (!in_array($req_file, ['tutorial.php', 'anleitung.php'])) {
|
||||
|
||||
@@ -115,6 +115,7 @@ class MyGenerator
|
||||
*/
|
||||
public function getTimeFormat($time)
|
||||
{
|
||||
$time = (int) $time;
|
||||
$min = 0;
|
||||
$hr = 0;
|
||||
|
||||
@@ -139,6 +140,7 @@ class MyGenerator
|
||||
*/
|
||||
public function procMtime($time, $pref = 3)
|
||||
{
|
||||
$time = (int) $time;
|
||||
$time += 0; // placeholder for timezone adjustments
|
||||
|
||||
$today = date('d', time()) - 1;
|
||||
|
||||
+33
-18
@@ -87,27 +87,42 @@ class Session {
|
||||
var $sit1;
|
||||
var $sit2;
|
||||
var $cp;
|
||||
function __construct() {
|
||||
global $database;
|
||||
function __construct() {
|
||||
global $database;
|
||||
|
||||
$this->time = time();
|
||||
$this->time = time();
|
||||
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
$this->logged_in = $this->checkLogin();
|
||||
|
||||
if ($this->logged_in && TRACK_USR) {
|
||||
$database->updateActiveUser($this->username, $this->time);
|
||||
}
|
||||
|
||||
$this->referrer = $_SESSION['url'] ?? "/";
|
||||
$this->url = $_SESSION['url'] = $_SERVER['PHP_SELF'];
|
||||
|
||||
$this->SurfControl();
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
$this->logged_in = $this->checkLogin();
|
||||
|
||||
if ($this->logged_in && TRACK_USR) {
|
||||
$database->updateActiveUser($this->username, $this->time);
|
||||
}
|
||||
|
||||
// aici se seteaza access-ul in checkLogin, dar sa fim siguri
|
||||
if(!isset($this->access)) {
|
||||
$this->access = $this->logged_in ? $database->getUserField($this->uid, "access", 1) : 0;
|
||||
}
|
||||
|
||||
// === MAINTENANCE CHECK - DUPA ce avem access ===
|
||||
$maint = $database->getMaintenance();
|
||||
if($maint['active'] == 1 && $this->access < 9) {
|
||||
// evita loop infinit
|
||||
if(strpos($_SERVER['PHP_SELF'], 'maintenance.php') === false) {
|
||||
header('Location: maintenance.php');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$this->referrer = $_SESSION['url'] ?? "/";
|
||||
$this->url = $_SESSION['url'] = $_SERVER['PHP_SELF'];
|
||||
|
||||
$this->SurfControl();
|
||||
}
|
||||
|
||||
/**
|
||||
* LOGIN USER
|
||||
*/
|
||||
@@ -140,7 +155,7 @@ class Session {
|
||||
$data = $database->getVillage($userFields["id"]);
|
||||
}
|
||||
|
||||
$_SESSION['wid'] = $data['wref'];
|
||||
$_SESSION['wid'] = isset($data['wref']) ? (int)$data['wref'] : 0;
|
||||
}
|
||||
|
||||
$this->logged_in = true;
|
||||
|
||||
@@ -62,7 +62,6 @@ if (isset($packages[$amount]) && $amount > 0) {
|
||||
$_SESSION['amount'] = 0;
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
<head>
|
||||
@@ -78,7 +77,6 @@ if (isset($packages[$amount]) && $amount > 0) {
|
||||
<script src="new.js?0faab" type="text/javascript"></script>
|
||||
<link href="<?php echo GP_LOCATE; ?>lang/en/lang.css?f4b7d" rel="stylesheet" type="text/css" />
|
||||
<link href="<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css" />
|
||||
|
||||
<?php
|
||||
if ($session->gpack == null || GP_ENABLE == false) {
|
||||
echo '<link href="' . GP_LOCATE . 'travian.css?e21d2" rel="stylesheet" type="text/css" />';
|
||||
@@ -91,13 +89,10 @@ if (isset($packages[$amount]) && $amount > 0) {
|
||||
<script type="text/javascript">window.addEvent('domready', start);</script>
|
||||
</head>
|
||||
<body class="v35">
|
||||
|
||||
<div class="wrapper">
|
||||
<img style="filter:chroma();" src="img/x.gif" id="msfilter" alt="" />
|
||||
<div id="dynamic_header"></div>
|
||||
|
||||
<?php include("Templates/header.tpl"); ?>
|
||||
|
||||
<div id="mid">
|
||||
<?php include("Templates/menu.tpl"); ?>
|
||||
<?php include("Templates/Plus/pmenu.tpl"); ?>
|
||||
@@ -106,7 +101,6 @@ if (isset($packages[$amount]) && $amount > 0) {
|
||||
|
||||
<div id="products">
|
||||
<?php if ($transactionProcessed) { ?>
|
||||
<!-- Partea de mulțumire după plată -->
|
||||
<p>Thank you for your purchase here at <?php echo SERVER_NAME; ?>.</p>
|
||||
<p>Below you see the entry record. Out of it, you can observe your old as well as your new account balance.</p>
|
||||
|
||||
@@ -122,7 +116,6 @@ if (isset($packages[$amount]) && $amount > 0) {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- tabelul cu old / package / new balance -->
|
||||
<tr>
|
||||
<td class="desc"><b> Account Balance (old)</b></td>
|
||||
<td class="desc"><div style="text-align:center"><?php echo $oldBalance; ?></div></td>
|
||||
@@ -151,9 +144,8 @@ if (isset($packages[$amount]) && $amount > 0) {
|
||||
<p>Please mail your username, package, order time and email used to
|
||||
<a href="mailto:<?php echo defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'novgorodschi@icloud.com'; ?>">our billing address</a>.</p>
|
||||
|
||||
<?php } else { ?>
|
||||
<!-- Partea cu istoricul normal -->
|
||||
<?php
|
||||
<?php } else {
|
||||
// --- ISTORIC NORMAL CU FILTRU ---
|
||||
$result = mysqli_query($database->dblink, "SELECT gold FROM ".TB_PREFIX."users WHERE id = $uid LIMIT 1");
|
||||
$golds = mysqli_fetch_assoc($result);
|
||||
|
||||
@@ -163,100 +155,126 @@ if (isset($packages[$amount]) && $amount > 0) {
|
||||
SUM(CASE WHEN gold < 0 THEN -gold ELSE 0 END) as spent
|
||||
FROM ".TB_PREFIX."gold_fin_log WHERE uid = $uid
|
||||
"));
|
||||
|
||||
$received = (int)($stats['received'] ?? 0);
|
||||
$spent = (int)($stats['spent'] ?? 0);
|
||||
?>
|
||||
|
||||
// FILTRU + PAGINARE
|
||||
$perPage = 25;
|
||||
$page = isset($_GET['p']) ? max(1,(int)$_GET['p']) : 1;
|
||||
$offset = ($page-1)*$perPage;
|
||||
$f = $_GET['f'] ?? 'all';
|
||||
|
||||
$where = "l.uid = $uid";
|
||||
if($f==='in') $where .= " AND l.gold > 0";
|
||||
elseif($f==='out') $where .= " AND l.gold < 0";
|
||||
elseif($f==='gift') $where .= " AND (l.action LIKE '%Gift%' OR l.details LIKE '%gift%' OR l.details LIKE '%Admin%')";
|
||||
|
||||
$countRes = mysqli_query($database->dblink, "SELECT COUNT(*) as c FROM ".TB_PREFIX."gold_fin_log l WHERE $where");
|
||||
$totalRows = (int)mysqli_fetch_assoc($countRes)['c'];
|
||||
$totalPages = max(1, ceil($totalRows / $perPage));
|
||||
?>
|
||||
<p>Here you can see your current account statement.</p>
|
||||
<p>Current balance: <img src="img/x.gif" class="gold" alt="Gold" /> <b><?php echo (int)$golds['gold']; ?></b>
|
||||
| Total received: <b style="color:#71D000;">+<?php echo $received; ?></b>
|
||||
| Total spent: <b style="color:#FF6F0F;">-<?php echo $spent; ?></b></p>
|
||||
|
||||
<!-- Tabelul cu istoricul (codul tău complet) -->
|
||||
<table class="plusFunctions" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="6" height="20">Gold history</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">Date & Time</td>
|
||||
<td align="center">Village</td>
|
||||
<td align="center">Action</td>
|
||||
<td align="center">Details</td>
|
||||
<td align="center">
|
||||
<img src="img/x.gif" class="gold" alt="Gold" title="Gold" />
|
||||
</td>
|
||||
<td align="center">Balance</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- AICI INCEPE PROBLEMA -->
|
||||
<tbody>
|
||||
<?php
|
||||
$q = mysqli_query(
|
||||
$database->dblink,
|
||||
"SELECT l.*, v.name as vname
|
||||
FROM ".TB_PREFIX."gold_fin_log l
|
||||
LEFT JOIN ".TB_PREFIX."vdata v ON v.wref = l.wid
|
||||
WHERE l.uid = $uid
|
||||
ORDER BY l.time DESC
|
||||
LIMIT 200"
|
||||
);
|
||||
|
||||
$balance = (int)$golds['gold'];
|
||||
|
||||
if (mysqli_num_rows($q) > 0) {
|
||||
while ($r = mysqli_fetch_assoc($q)) {
|
||||
$date = date('d.m.Y H:i:s', $r['time']);
|
||||
$villageName = !empty($r['vname']) ? htmlspecialchars($r['vname'], ENT_QUOTES, 'UTF-8') : '-';
|
||||
$action = htmlspecialchars($r['action'], ENT_QUOTES, 'UTF-8');
|
||||
$details = htmlspecialchars(($r['details'] ?? ''), ENT_QUOTES, 'UTF-8');
|
||||
$gold = (int)$r['gold'];
|
||||
|
||||
if (stripos($details, 'Mass gift') !== false) {
|
||||
$action = 'Admin Gift (All)';
|
||||
$details = str_replace('Mass gift by ', 'by ', $details);
|
||||
} elseif (stripos($details, 'gift by') !== false) {
|
||||
$action = 'Admin Gift';
|
||||
}
|
||||
|
||||
$color = $gold < 0 ? '#FF6F0F' : '#71D000';
|
||||
$sign = $gold > 0 ? '+' : '';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="desc"><div style="text-align:center">'.$date.'</div></td>';
|
||||
echo '<td class="desc"><div style="text-align:center">'.$villageName.'</div></td>';
|
||||
echo '<td class="desc"><div style="text-align:center"><b>'.$action.'</b></div></td>';
|
||||
echo '<td class="desc"><div style="text-align:center"><span style="color:#666;font-size:11px">'.$details.'</span></div></td>';
|
||||
echo '<td class="desc"><div style="text-align:center"><font color="'.$color.'"><b>'.$sign.$gold.'</b></font></div></td>';
|
||||
echo '<td class="act"><div style="text-align:center">'.$balance.'</div></td>';
|
||||
echo '</tr>';
|
||||
|
||||
$balance -= $gold;
|
||||
}
|
||||
} else {
|
||||
echo '
|
||||
<tr>
|
||||
<td colspan="6" class="desc">
|
||||
<div style="text-align:center;padding:8px;">
|
||||
No transactions yet.
|
||||
<!-- BARA CU ICONITE -->
|
||||
<div style="background:#f0f0f0; border:1px solid #d0d0d0; padding:6px 8px; margin:10px 0; border-radius:3px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap;">
|
||||
<div style="display:flex; gap:10px; align-items:center;">
|
||||
<a href="a2b2.php?f=all" style="text-decoration:none; padding:3px 8px; <?php if($f=='all') echo 'background:#fff; border:1px solid #aaa; border-radius:3px; font-weight:bold;'; ?>">
|
||||
<img src="img/x.gif" class="gold" style="vertical-align:-2px;"> Toate
|
||||
</a>
|
||||
<a href="a2b2.php?f=in" style="text-decoration:none; padding:3px 8px; color:#228B22; <?php if($f=='in') echo 'background:#fff; border:1px solid #aaa; border-radius:3px; font-weight:bold;'; ?>">
|
||||
<b style="font-size:15px;">+</b> Intrări
|
||||
</a>
|
||||
<a href="a2b2.php?f=out" style="text-decoration:none; padding:3px 8px; color:#D00000; <?php if($f=='out') echo 'background:#fff; border:1px solid #aaa; border-radius:3px; font-weight:bold;'; ?>">
|
||||
<b style="font-size:15px;">−</b> Ieșiri
|
||||
</a>
|
||||
<a href="a2b2.php?f=gift" style="text-decoration:none; padding:3px 8px; color:#0066cc; <?php if($f=='gift') echo 'background:#fff; border:1px solid #aaa; border-radius:3px; font-weight:bold;'; ?>">
|
||||
🎁 Cadouri
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<form method="get" style="margin:0;">
|
||||
<input type="hidden" name="f" value="<?php echo htmlspecialchars($f); ?>">
|
||||
<select name="p" onchange="this.form.submit()" style="font-size:11px; padding:2px;">
|
||||
<?php for($i=1;$i<=$totalPages;$i++){ echo '<option value="'.$i.'"'.($i==$page?' selected':'').'>Pagina '.$i.' / '.$totalPages.'</option>'; } ?>
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<!-- AICI SE TERMINA PROBLEMA -->
|
||||
|
||||
<table class="plusFunctions" cellpadding="1" cellspacing="1">
|
||||
<thead>
|
||||
<tr><th colspan="6" height="20">Gold history (<?php echo $totalRows; ?>)</th></tr>
|
||||
<tr>
|
||||
<td align="center">Date & Time</td>
|
||||
<td align="center">Village</td>
|
||||
<td align="center">Action</td>
|
||||
<td align="center">Details</td>
|
||||
<td align="center"><img src="img/x.gif" class="gold" alt="Gold" /></td>
|
||||
<td align="center">Balance</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$q = mysqli_query($database->dblink,
|
||||
"SELECT l.*, v.name as vname
|
||||
FROM ".TB_PREFIX."gold_fin_log l
|
||||
LEFT JOIN ".TB_PREFIX."vdata v ON v.wref = l.wid
|
||||
WHERE $where
|
||||
ORDER BY l.time DESC
|
||||
LIMIT $offset, $perPage");
|
||||
|
||||
$sumBefore = 0;
|
||||
if($offset > 0){
|
||||
$sumRes = mysqli_query($database->dblink,
|
||||
"SELECT COALESCE(SUM(gold),0) as s FROM (
|
||||
SELECT gold FROM ".TB_PREFIX."gold_fin_log l WHERE $where ORDER BY l.time DESC LIMIT $offset
|
||||
) t");
|
||||
$sumBefore = (int)mysqli_fetch_assoc($sumRes)['s'];
|
||||
}
|
||||
$balance = (int)$golds['gold'] - $sumBefore;
|
||||
|
||||
if(mysqli_num_rows($q) > 0){
|
||||
while($r = mysqli_fetch_assoc($q)){
|
||||
$date = date('d.m.Y H:i:s', $r['time']);
|
||||
$villageName = !empty($r['vname']) ? htmlspecialchars($r['vname'], ENT_QUOTES, 'UTF-8') : '-';
|
||||
$action = htmlspecialchars($r['action'], ENT_QUOTES, 'UTF-8');
|
||||
$details = htmlspecialchars(($r['details'] ?? ''), ENT_QUOTES, 'UTF-8');
|
||||
$gold = (int)$r['gold'];
|
||||
|
||||
if(stripos($details,'Mass gift')!==false){ $action='Admin Gift (All)'; $details=str_replace('Mass gift by ','by ',$details); }
|
||||
elseif(stripos($details,'gift by')!==false){ $action='Admin Gift'; }
|
||||
|
||||
$color = $gold < 0 ? '#FF6F0F' : '#71D000';
|
||||
$sign = $gold > 0 ? '+' : '';
|
||||
|
||||
echo '<tr>';
|
||||
echo '<td class="desc"><div style="text-align:center">'.$date.'</div></td>';
|
||||
echo '<td class="desc"><div style="text-align:center">'.$villageName.'</div></td>';
|
||||
echo '<td class="desc"><div style="text-align:center"><b>'.$action.'</b></div></td>';
|
||||
echo '<td class="desc"><div style="text-align:center"><span style="color:#666;font-size:11px">'.$details.'</span></div></td>';
|
||||
echo '<td class="desc"><div style="text-align:center"><font color="'.$color.'"><b>'.$sign.$gold.'</b></font></div></td>';
|
||||
echo '<td class="act"><div style="text-align:center">'.$balance.'</div></td>';
|
||||
echo '</tr>';
|
||||
$balance -= $gold;
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="6" class="desc"><div style="text-align:center;padding:8px;">No transactions yet.</div></td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Please verify the information.<br>It will let us know if the data is incorrect.</p>
|
||||
<p>Please mail your username, package, order time and email used to
|
||||
<a href="mailto:<?php echo defined('PAYPAL_EMAIL') ? PAYPAL_EMAIL : 'cata7007@gmail.com'; ?>">our billing address</a>.</p>
|
||||
<?php } ?>
|
||||
</div> <!-- #products -->
|
||||
</div> <!-- #mid -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br /><br /><br /><br />
|
||||
|
||||
<div id="side_info">
|
||||
<?php
|
||||
include("Templates/multivillage.tpl");
|
||||
@@ -268,18 +286,15 @@ if (isset($packages[$amount]) && $amount > 0) {
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div> <!-- .wrapper -->
|
||||
</div>
|
||||
|
||||
<div class="footer-stopper"></div>
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
include("Templates/footer.tpl");
|
||||
include("Templates/res.tpl"); // ← foarte important aici
|
||||
include("Templates/res.tpl");
|
||||
?>
|
||||
|
||||
<div id="stime">
|
||||
<div id="ltime">
|
||||
<div id="ltimeWrap">
|
||||
@@ -288,7 +303,6 @@ include("Templates/res.tpl"); // ← foarte important aici
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="ce"></div>
|
||||
</body>
|
||||
</html>
|
||||
+4
-2
@@ -37,7 +37,9 @@ if(isset($_GET['newdid'])) {
|
||||
exit;
|
||||
}
|
||||
|
||||
if($_SESSION['ok'] == 2){
|
||||
// ==== NOUA VERIFICARE (in loc de $_SESSION['ok']) ====
|
||||
$maintenance = $database->getMaintenance();
|
||||
if($maintenance['active'] == 1 && $session->access < 9){
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html>
|
||||
@@ -128,4 +130,4 @@ echo round(($generator->pageLoadTimeEnd()-$start_timer)*1000);
|
||||
header("Location: dorf1.php");
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
?>
|
||||
@@ -1,17 +0,0 @@
|
||||
- shouldn't we create accounts from middle towards corners, not middle-corners-everywhere?
|
||||
+ change "incoming attacker" title of the raid list icon when actually attacking a farm (it should be "Own attacking troops")
|
||||
+ change "select all" button to actually select all checkboxes via JS, not via page reload
|
||||
- make sure that when auto-removing inactive players, anyone who have units going there + anyone with them in their raid lists etc. gets notified and sorted out
|
||||
- display "send troops" link for own villages, so we don't have to enter coordinates or search by name (which can search good name but wrong owner!)
|
||||
- check the following queries for performing stuff on DB rather than in PHP:
|
||||
"SELECT * FROM s1_vdata WHERE wood > maxstore OR clay > maxstore OR iron > maxstore OR crop > maxcrop"
|
||||
"SELECT * FROM s1_odata WHERE maxstore < 800 OR maxcrop < 800"
|
||||
"SELECT * FROM s1_vdata WHERE wood < 0 OR clay < 0 OR iron < 0 OR crop < 0"
|
||||
"SELECT * FROM `s1_fdata`"
|
||||
- try to find and fix this (it's probably automation but has came up with a new registration, first login):
|
||||
"UPDATE s1_units set hero = hero - WHERE vref = 38801"
|
||||
- there is an excessive amount of these, find where and correct that:
|
||||
"UPDATE s1_hero set dead = 1 where uid = 99"
|
||||
- this shouldn't be:
|
||||
"UPDATE s1_bdata SET timestamp = 1508863345 WHERE id = ''"
|
||||
- when refactored version is complete, make a bot competition and create server only for bots to fight each other to see who can program the better bot :)
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user