Redesign install system & New Medal System

Redesign install system & New Medal System

Artefact Holder			[#ARTEFACT]
WW Builder			[#WWBUILDER]
Great Store			[#GREATSTORE]
Wall Master			[#WALLMASTER]
Hero 99+			[#HERO100]
This commit is contained in:
novgorodschi catalin
2026-05-26 10:42:28 +03:00
parent 8c3ab3e5eb
commit fe19587c90
21 changed files with 907 additions and 1389 deletions
+52 -18
View File
@@ -19,43 +19,77 @@
################################################################################# #################################################################################
?> ?>
<style> <style>
.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} .punish-box{
.addv-box th{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:6px 10px;font-weight:600;text-align:center;font-size:13px} width:100%;
.addv-box td{padding:6px 8px;border-bottom:1px solid #f1f5f9;font-size:12px;color:#334155} max-width:none;
.addv-box tr:last-child td{border-bottom:0;text-align:center} border-collapse:separate;
.addv-sub{font-size:11px;color:#64748b;text-align:center;padding:4px 8px !important;border-bottom:0 !important} border-spacing:0;
.addv-box td:first-child{width:25%;color:#64748b;font-weight:500} background:#fff;
.addv-box input.fm{width:100%;padding:3px 6px;font-size:12px;border:1px solid #cbd5e1;border-radius:5px;box-sizing:border-box} border:1px solid #e5e7eb;
.addv-box input.fm:focus{outline:none;border-color:#3b82f6;box-shadow:0 0 0 1px #3b82f6} border-radius:10px;
.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} overflow:hidden;
box-shadow:0 2px 8px rgba(0,0,0,.04);
font-family:system-ui;
margin-bottom:12px;
}
.punish-box th{
background:linear-gradient(135deg,#0f172a,#1e293b);
color:#fff;
padding:8px 12px;
font-weight:600;
text-align:center;
font-size:14px
}
.punish-box td{padding:8px 10px;border-bottom:1px solid #f1f5f9;font-size:13px}
.punish-box tr:last-child td{border-bottom:0}
.punish-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.fm{padding:4px 8px;font-size:13px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;width:100%}
.fm:disabled{background:#f1f5f9;color:#94a3b8}
.btn-add{
padding:4px 14px;font-size:12px;font-weight:600;color:#fff;
background:linear-gradient(180deg,#3b82f6,#2563eb);
border:0;border-radius:6px;cursor:pointer;
box-shadow:0 1px 2px rgba(0,0,0,.1);text-transform:uppercase
}
.btn-add:hover{filter:brightness(1.05)} .btn-add:hover{filter:brightness(1.05)}
.btn-add:disabled{opacity:.5;cursor:not-allowed} .btn-add:disabled{opacity:.6;cursor:not-allowed}
.addv-label{color:#64748b;font-size:12px;text-align:center;display:block;margin-bottom:2px}
</style> </style>
<form method="post" action="admin.php" style="margin:0"> <form method="post" action="admin.php" style="margin:0">
<input name="action" type="hidden" value="addVillage"> <input name="action" type="hidden" value="addVillage">
<input name="uid" type="hidden" value="<?php echo $user['id'];?>"> <input name="uid" type="hidden" value="<?php echo $user['id'];?>">
<table class="addv-box"> <table class="punish-box">
<thead> <thead>
<tr><th>Add Village</th></tr> <tr><th>Add Village</th></tr>
</thead> </thead>
<tbody> <tbody>
<tr><td class="addv-sub">Coordinates (X|Y)</td></tr>
<tr> <tr>
<td style="display:flex;align-items:center;gap:6px;border-bottom:0"> <td style="padding-bottom:4px;border-bottom:0">
<span style="width:15px">X:</span> <span class="addv-label">Coordinates (X|Y)</span>
<input name="x" class="fm" type="text" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="display:flex;align-items:center;gap:6px;border-bottom:0;padding-top:0"> <td style="border-bottom:0;padding-top:0;padding-bottom:4px">
<span style="width:15px">Y:</span> <div class="punish-row">
<label style="width:18px">X:</label>
<input name="x" class="fm" type="text" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>
</div>
</td>
</tr>
<tr>
<td style="border-bottom:0;padding-top:0">
<div class="punish-row">
<label style="width:18px">Y:</label>
<input name="y" class="fm" type="text" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>> <input name="y" class="fm" type="text" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>
</div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="padding-top:8px"> <td style="padding-top:8px">
<button type="submit" class="btn-add" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>Add Village</button> <div class="punish-row" style="justify-content:center">
<button type="submit" class="btn-add" <?php if($_SESSION['access'] != ADMIN){ echo 'disabled'; } ?>>ADD VILLAGE</button>
</div>
</td> </td>
</tr> </tr>
</tbody> </tbody>
+7 -3
View File
@@ -97,9 +97,13 @@ if($deletion){
include("playermedals.tpl"); include("playermedals.tpl");
include ("villages.tpl"); ?> include ("villages.tpl"); ?>
<div class="player-bottom"> <div style="display:grid;grid-template-columns:1fr;gap:12px;margin-top:12px;width:100%">
<div><?php include ('punish.tpl'); ?></div> <div>
<div><?php include ('add_village.tpl'); ?></div> <?php include "punish.tpl"; ?>
</div>
<div>
<?php include "add_village.tpl"; ?>
</div>
</div> </div>
<?php <?php
+26 -7
View File
@@ -22,14 +22,33 @@
$active = $admin->getUserActive(); $active = $admin->getUserActive();
?> ?>
<style> <style>
.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{
.punish-box th{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff;padding:6px 10px;font-weight:600;text-align:center;font-size:13px} width:100%;
.punish-box td{padding:6px 8px;border-bottom:1px solid #f1f5f9;font-size:12px} max-width:none; /* asta era problema */
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;
margin-bottom:12px; /* spațiu între ele */
}
.punish-box th{
background:linear-gradient(135deg,#0f172a,#1e293b);
color:#fff;
padding:8px 12px;
font-weight:600;
text-align:center;
font-size:14px
}
.punish-box td{padding:8px 10px;border-bottom:1px solid #f1f5f9;font-size:13px}
.punish-box tr:last-child td{border-bottom:0} .punish-box tr:last-child td{border-bottom:0}
.punish-row{display:flex;align-items:center;justify-content:space-between;gap:6px} .punish-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.punish-box select{padding:3px 6px;font-size:12px;border:1px solid #cbd5e1;border-radius:5px;background:#fff} .punish-box select{padding:4px 8px;font-size:13px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;flex:1}
.punish-box label{display:flex;align-items:center;gap:5px;cursor:pointer} .punish-box label{display:flex;align-items:center;gap:6px;cursor:pointer;flex:1}
.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{padding:4px 12px;font-size:12px;font-weight:600;color:#fff;background:linear-gradient(180deg,#22c55e,#16a34a);border:0;border-radius:6px;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.1);text-transform:uppercase}
.btn-ok:hover{filter:brightness(1.05)} .btn-ok:hover{filter:brightness(1.05)}
</style> </style>
+129 -8
View File
@@ -64,14 +64,135 @@ $profiel = preg_replace("/\[#TEAM]/is",'<img src="'.$gpack.'img/t/team.png" bord
$profiel = preg_replace("/\[#EVENT]/is",'<img src="'.$gpack.'img/t/t10_1.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>You played on Travian Hammelburg Event. Congrats !</td></tr></table>\')">', $profiel, 1); $profiel = preg_replace("/\[#EVENT]/is",'<img src="'.$gpack.'img/t/t10_1.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>You played on Travian Hammelburg Event. Congrats !</td></tr></table>\')">', $profiel, 1);
} }
// WW Winner IMAGES - MUST TO BE SET FROM ADMIN PANEL @iopietro must code // =========================
// Added by Shadow - cata7007@gmail.com / Skype : cata7007 // NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM - DYNAMIC
if($displayarray['username'] == "Shadow"){ // =========================
$profiel = preg_replace("/\[#WWBUILDER]/is",'<img src="'.$gpack.'img/t/builderWW.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Country:</td><td>Romania</td></tr><tr><td>Category:</td><td>World of Wonder</td></tr><tr><td>Name:</td><td>Shadow</td></tr><tr><td>Tribe:</td><td>Romans</td></tr><tr><td>WW LEVEL:</td><td>80</td></tr></table>\')">', $profiel, 1); if(defined('NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM') && NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM){
$profiel = preg_replace("/\[#WINNERWW]/is",'<img src="'.$gpack.'img/t/winnerww.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Country:</td><td>Romania</td></tr><tr><td>Category:</td><td>World of Wonder</td></tr><tr><td>Name:</td><td>Shadow</td></tr><tr><td>Tribe:</td><td>Romans</td></tr><tr><td>WW LEVEL:</td><td>100</td></tr></table>\')">', $profiel, 1);
$profiel = preg_replace("/\[#OFFENSIVE]/is",'<img src="'.$gpack.'img/t/Offensive_1.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Country:</td><td>Romania</td></tr><tr><td>Category:</td><td>Offensive</td></tr><tr><td>Name:</td><td>Shadow</td></tr><tr><td>Tribe:</td><td>Romans</td></tr><tr><td>Rank:</td><td>1</td></tr></table>\')">', $profiel, 1); $uid = (int)$displayarray['id'];
$profiel = preg_replace("/\[#DEFENSIVE]/is",'<img src="'.$gpack.'img/t/Defensive_1.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Country:</td><td>Romania</td></tr><tr><td>Category:</td><td>Defensive</td></tr><tr><td>Name:</td><td>Shadow</td></tr><tr><td>Tribe:</td><td>Romans</td></tr><tr><td>Rank:</td><td>1</td></tr></table>\')">', $profiel, 1); $username = htmlspecialchars($displayarray['username'], ENT_QUOTES);
$profiel = preg_replace("/\[#POPULATION]/is",'<img src="'.$gpack.'img/t/Population_1.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Country:</td><td>Romania</td></tr><tr><td>Category:</td><td>Population</td></tr><tr><td>Name:</td><td>Shadow</td></tr><tr><td>Tribe:</td><td>Romans</td></tr><tr><td>Rank:</td><td>1</td></tr></table>\')">', $profiel, 1); $tribeMap = [1=>'Romans',2=>'Teutons',3=>'Gauls'];
$tribeName = $tribeMap[$displayarray['tribe']??0]?? 'Unknown';
// luam WW real
$wwLevel = 0;
$wwName = 'N/A';
$qww = $database->query("
SELECT v.name AS village, f.f99 AS lvl
FROM ".TB_PREFIX."vdata v
INNER JOIN ".TB_PREFIX."fdata f ON f.vref = v.wref
WHERE v.owner = $uid
AND f.f99t = 40 -- tipul 40 = Wonder
AND f.f99 > 0 -- nivel real
ORDER BY f.f99 DESC
LIMIT 1
");
if($qww && $row = $qww->fetch_assoc()){
$wwLevel = (int)$row['lvl'];
$wwName = htmlspecialchars($row['village'], ENT_QUOTES);
}
// [#ARTEFACT]
$profiel = preg_replace_callback("/\[#ARTEFACT\]/is", function($m) use ($database,$uid,$username,$tribeName,$gpack){
$q = $database->query("SELECT size, name FROM ".TB_PREFIX."artefacts WHERE owner=$uid");
if(!$q || !$q->num_rows) return '';
$sizeMap = [
1 => 'Small (Village Effect)',
2 => 'Large (Account Effect)',
3 => 'Unique (Account Effect)'
];
$arts = '';
while($a = $q->fetch_assoc()){
$type = $sizeMap[(int)$a['size']] ?? 'Unknown';
$aname = htmlspecialchars($a['name'], ENT_QUOTES);
$arts .= "<tr><td>Type:</td><td>{$type}</td></tr><tr><td>Artefact:</td><td>{$aname}</td></tr>";
}
$tip = "<table><tr><td>Name:</td><td>{$username}</td></tr><tr><td>Tribe:</td><td>{$tribeName}</td></tr><tr><td>Category:</td><td>Artefact Holder</td></tr>{$arts}</table>";
return "<img src='{$gpack}img/gloriamedals/artifact.png' border='0' onmouseout='med_closeDescription()' onmousemove=\"med_mouseMoveHandler(arguments[0],'{$tip}')\">";
}, $profiel);
// [#WWBUILDER]
if($wwLevel > 0){
$tip = "<table <tr><td>Name:</td><td>{$username}</td></tr><tr><td>Tribe:</td><td>{$tribeName}</td></tr><tr><td>Category:</td><td>World Wonder</td></tr><tr><td>Village:</td><td>{$wwName}</td></tr><tr><td>WW Level:</td><td>{$wwLevel}</td></tr></table>";
$profiel = preg_replace("/\[#WWBUILDER\]/is","<img src='{$gpack}img/gloriamedals/ww_builder.png' border='0' onmouseout='med_closeDescription()' onmousemove=\"med_mouseMoveHandler(arguments[0],'{$tip}')\">",
$profiel);
} else {
$profiel = str_replace("[#WWBUILDER]", "", $profiel);
}
// [#WINNERWW]
if($wwLevel >= 100){
$tip = "<table><tr><td>Name:</td><td>{$username}</td></tr><tr><td>Tribe:</td><td>{$tribeName}</td></tr><tr><td>Category:</td><td>Winner</td></tr><tr><td>WW Level:</td><td>100</td></tr></table>";
$profiel = preg_replace("/\[#WINNERWW\]/is",
"<img src='{$gpack}img/gloriamedals/ww_winner.png' border='0' onmouseout='med_closeDescription()' onmousemove=\"med_mouseMoveHandler(arguments[0],'{$tip}')\">",
$profiel);
}
//[#GREATSTORE] - DOAR Great Warehouse (38) si Great Granary (39) nivel 20
$hasGreatStore = false;
$gsVillage = '';
$q = $database->query("SELECT v.name, f.* FROM ".TB_PREFIX."fdata f JOIN ".TB_PREFIX."vdata v ON v.wref=f.vref WHERE v.owner=$uid");
if($q){
while($f = $q->fetch_assoc()){
$wh = $gr = false;
for($i=1; $i<=99; $i++){
if(!isset($f["f{$i}t"])) continue;
$t = (int)$f["f{$i}t"];
$l = (int)$f["f{$i}"];
if($l == 20 && $t == 38) $wh = true; // Great Warehouse
if($l == 20 && $t == 39) $gr = true; // Great Granary
}
if($wh && $gr){
$hasGreatStore = true;
$gsVillage = htmlspecialchars($f['name'], ENT_QUOTES);
break;
}
}
}
if($hasGreatStore){
$tip = "<table><tr><td>Name:</td><td>{$username}</td></tr><tr><td>Tribe:</td><td>{$tribeName}</td></tr><tr><td>Category:</td><td>Great Store</td></tr><tr><td>Village:</td><td>{$gsVillage}</td></tr><tr><td>Great Warehouse:</td><td>20</td></tr><tr><td>Great Granary:</td><td>20</td></tr></table>";
$profiel = str_replace("[#GREATSTORE]", "<img src='{$gpack}img/gloriamedals/greatstore.png' border='0' onmouseout='med_closeDescription()' onmousemove=\"med_mouseMoveHandler(arguments[0],'{$tip}')\">", $profiel);
} else {
$profiel = str_replace("[#GREATSTORE]", "", $profiel);
}
// [#HERO100]
$q = $database->query("SELECT level FROM ".TB_PREFIX."hero WHERE uid=$uid AND level>=99 LIMIT 1");
if($q && $q->num_rows){
$heroLvl = (int)$q->fetch_assoc()['level'];
$tip = "<table><tr><td>Name:</td><td>{$username}</td></tr><tr><td>Tribe:</td><td>{$tribeName}</td></tr><tr><td>Category:</td><td>Hero Level</td></tr><tr><td>Level:</td><td>{$heroLvl}</td></tr></table>";
$profiel = str_replace("[#HERO100]", "<img src='{$gpack}img/gloriamedals/hero.png' border='0' onmouseout='med_closeDescription()' onmousemove=\"med_mouseMoveHandler(arguments[0],'{$tip}')\">", $profiel);
} else {
$profiel = str_replace("[#HERO100]", "", $profiel);
}
// [#WALLMASTER] - 3 sate cu zid (31/32/33) nivel 20 in slotul 40
$wallCount = 0;
$q = $database->query("SELECT f.f40, f.f40t FROM ".TB_PREFIX."fdata f
JOIN ".TB_PREFIX."vdata v ON v.wref=f.vref
WHERE v.owner=$uid");
if($q){
while($r = $q->fetch_assoc()){
if((int)$r['f40'] == 20 && in_array((int)$r['f40t'], [31,32,33])){
$wallCount++;
}
}
}
if($wallCount >= 3){
$tip = "<table><tr><td>Name:</td><td>{$username}</td></tr><tr><td>Tribe:</td><td>{$tribeName}</td></tr><tr><td>Category:</td><td>Wall Master</td></tr><tr><td>Walls level 20:</td><td>{$wallCount}</td></tr></table>";
$profiel = str_replace("[#WALLMASTER]", "<img src='{$gpack}img/gloriamedals/wallmaster.png' border='0' onmouseout='med_closeDescription()' onmousemove=\"med_mouseMoveHandler(arguments[0],'{$tip}')\">", $profiel);
} else {
$profiel = str_replace("[#WALLMASTER]", "", $profiel);
}
} }
// Added by Shadow - cata7007@gmail.com / Skype : cata7007 // Added by Shadow - cata7007@gmail.com / Skype : cata7007
+101
View File
@@ -291,6 +291,107 @@ if(($session->userinfo['username'] ?? '') == "Shadow"){
echo "<tr><td>Shadow</td><td></td><td></td> echo "<tr><td>Shadow</td><td></td><td></td>
<td><a href='#' onclick=\"insertMedal('[#EVENT]'); return false;\">[#EVENT]</a></td></tr>"; <td><a href='#' onclick=\"insertMedal('[#EVENT]'); return false;\">[#EVENT]</a></td></tr>";
} }
// =========================
// SPECIAL MEDALS
// =========================
if(defined('NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM') && NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM){
$uid = (int)$session->uid;
// 1. Artefact - CORECTAT coloanele (4 td-uri)
$arte = $database->query("SELECT 1 FROM ".TB_PREFIX."artefacts WHERE owner = $uid LIMIT 1");
if($arte && $arte->num_rows > 0){
echo "<tr>
<td>Artefact Holder</td>
<td></td>
<td></td>
<td><a href='#' onclick=\"insertMedal('[#ARTEFACT]'); return false;\">[#ARTEFACT]</a></td>
</tr>";
}
// 2. WW - CORECTAT la f99 (la tine WW e in f99, nu f40)
$ww = $database->query("SELECT f.f99 FROM ".TB_PREFIX."vdata v
INNER JOIN ".TB_PREFIX."fdata f ON f.vref = v.wref
WHERE v.owner = $uid AND f.f99t = 40 AND f.f99 > 0 LIMIT 1");
if($ww && $ww->num_rows > 0){
echo "<tr>
<td>WW Builder</td>
<td></td>
<td></td>
<td><a href='#' onclick=\"insertMedal('[#WWBUILDER]'); return false;\">[#WWBUILDER]</a></td>
</tr>";
$lvl = (int)$ww->fetch_assoc()['f99'];
if($lvl >= 100){
echo "<tr>
<td>WW Winner</td>
<td></td>
<td></td>
<td><a href='#' onclick=\"insertMedal('[#WINNERWW]'); return false;\">[#WINNERWW]</a></td>
</tr>";
}
}
// 3. GREATSTORE - DOAR 38 si 39 nivel 20
$hasGreatStore = false;
$qgs = $database->query("SELECT f.* FROM ".TB_PREFIX."fdata f
JOIN ".TB_PREFIX."vdata v ON v.wref=f.vref
WHERE v.owner=$uid");
if($qgs){
while($f = $qgs->fetch_assoc()){
$hasWh = $hasGr = false;
for($i=1; $i<=99; $i++){
if(!isset($f["f{$i}t"])) continue;
$type = (int)$f["f{$i}t"];
$lvl = (int)$f["f{$i}"];
if($type == 38 && $lvl == 20) $hasWh = true; // Great Warehouse
if($type == 39 && $lvl == 20) $hasGr = true; // Great Granary
}
if($hasWh && $hasGr){ $hasGreatStore = true; break; }
}
}
if($hasGreatStore){
echo "<tr>
<td>Great Store</td>
<td></td>
<td></td>
<td><a href='#' onclick=\"insertMedal('[#GREATSTORE]'); return false;\">[#GREATSTORE]</a></td>
</tr>";
}
// 4. WALLMASTER - 5 sate cu zid 20 (31/32/33), fara f40/f99
$wallCount = 0;
$qw = $database->query("SELECT f.f40, f.f40t FROM ".TB_PREFIX."fdata f
JOIN ".TB_PREFIX."vdata v ON v.wref=f.vref
WHERE v.owner=$uid");
if($qw){
while($r = $qw->fetch_assoc()){
if((int)$r['f40'] == 20 && in_array((int)$r['f40t'], [31,32,33])){
$wallCount++;
}
}
}
if($wallCount >= 3){
echo "<tr>
<td>Wall Master</td>
<td></td>
<td></td>
<td><a href='#' onclick=\"insertMedal('[#WALLMASTER]'); return false;\">[#WALLMASTER]</a></td>
</tr>";
}
// 5. HERO100 - erou nivel 99+
$h100 = $database->query("SELECT 1 FROM ".TB_PREFIX."hero WHERE uid=$uid AND level>=99 LIMIT 1");
if($h100 && $h100->num_rows){
echo "<tr>
<td>Hero 99+</td>
<td></td>
<td></td>
<td><a href='#' onclick=\"insertMedal('[#HERO100]'); return false;\">[#HERO100]</a></td>
</tr>";
}
}
?> ?>
</table> </table>
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

+1
View File
@@ -318,6 +318,7 @@ define("NEW_FUNCTIONS_DISPLAY_LINKS", %NEW_FUNCTIONS_DISPLAY_LINKS%);
define("NEW_FUNCTIONS_MEDAL_3YEAR", %NEW_FUNCTIONS_MEDAL_3YEAR%); define("NEW_FUNCTIONS_MEDAL_3YEAR", %NEW_FUNCTIONS_MEDAL_3YEAR%);
define("NEW_FUNCTIONS_MEDAL_5YEAR", %NEW_FUNCTIONS_MEDAL_5YEAR%); define("NEW_FUNCTIONS_MEDAL_5YEAR", %NEW_FUNCTIONS_MEDAL_5YEAR%);
define("NEW_FUNCTIONS_MEDAL_10YEAR", %NEW_FUNCTIONS_MEDAL_10YEAR%); define("NEW_FUNCTIONS_MEDAL_10YEAR", %NEW_FUNCTIONS_MEDAL_10YEAR%);
define("NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM", %NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM%);
////////////////////////////////////////// //////////////////////////////////////////
+1
View File
@@ -168,6 +168,7 @@ class Process {
$findReplace["%NEW_FUNCTIONS_MEDAL_3YEAR%"] = $_POST['new_functions_medal_3year']; $findReplace["%NEW_FUNCTIONS_MEDAL_3YEAR%"] = $_POST['new_functions_medal_3year'];
$findReplace["%NEW_FUNCTIONS_MEDAL_5YEAR%"] = $_POST['new_functions_medal_5year']; $findReplace["%NEW_FUNCTIONS_MEDAL_5YEAR%"] = $_POST['new_functions_medal_5year'];
$findReplace["%NEW_FUNCTIONS_MEDAL_10YEAR%"] = $_POST['new_functions_medal_10year']; $findReplace["%NEW_FUNCTIONS_MEDAL_10YEAR%"] = $_POST['new_functions_medal_10year'];
$findReplace["%NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM%"] = $_POST['new_functions_special_medals_system'];
fwrite($gameConfig, str_replace(array_keys($findReplace), array_values($findReplace), $text)); fwrite($gameConfig, str_replace(array_keys($findReplace), array_values($findReplace), $text));
+62 -84
View File
@@ -1,106 +1,84 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename : accounts.tpl ##
## Type : Install Panel Frontend & Backend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ## ## Project : TravianZ ##
## Filename accounts.php ## ## GitHub : https://github.com/Shadowss/TravianZ ##
## Developed by: Dzoki ## ## --------------------------------------------------------------------------- ##
## License : TravianZ Project ## ## License : TravianZ Project ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## URLs: https://travianz.org ## ## --------------------------------------------------------------------------- ##
## https://github.com/Shadowss/TravianZ ##
## ##
################################################################################# #################################################################################
if(isset($_GET['err']) && $_GET['err'] == 1) { if(isset($_GET['err']) && $_GET['err'] == 1) {
echo "<br /><hr /><br /><div class=\"headline\"><span class=\"f10 c5\">At least Multihunter &amp; Support password are required in this form.</span></div><br /><br />"; echo '<div class="card" style="background:#fef2f2;border-color:#fecaca;color:#991b1b;margin-bottom:14px;">At least Multihunter & Support password are required.</div>';
} }
if(isset($_GET['err']) && $_GET['err'] == 2) { if(isset($_GET['err']) && $_GET['err'] == 2) {
echo "<br /><hr /><br /><div class=\"headline\"><span class=\"f10 c5\">Natars is a reserved username for an in-game NPC tribe. Please choose a different admin username.</span></div><br /><br />"; echo '<div class="card" style="background:#fef2f2;border-color:#fecaca;color:#991b1b;margin-bottom:14px;">Natars is reserved. Choose different admin username.</div>';
} }
?> ?>
<form action="include/accounts.php" method="post" id="dataform"> <form action="include/accounts.php" method="post" id="dataform">
<div class="grid-2">
<p> <div class="card">
<span class="f10 c">Multihunter account</span> <span class="f10 c">Multihunter account</span>
<table> <div style="margin-top:12px;display:grid;gap:10px;">
<tr><td>Name:</td><td><input type="text" name="mhuser" id="mhuser" value="Multihunter" disabled="disabled"></td></tr> <div><label>Name</label><input class="input" type="text" value="Multihunter" disabled></div>
<tr><td>Password:</td><td><input type="password" name="mhpw" id="mhpw" value=""></td></tr> <div><label>Password</label><input class="input" type="password" name="mhpw" required></div>
<tr><td>Note: Rember this password! You need it for the Admin</td><td></td></tr> </div>
</table> </div>
</p> <div class="card">
<p>
<span class="f10 c">Support account</span> <span class="f10 c">Support account</span>
<table> <div style="margin-top:12px;display:grid;gap:10px;">
<tr><td>Name:</td><td><input type="text" name="suser" id="suser" value="Support" disabled="disabled"></td></tr> <div><label>Name</label><input class="input" type="text" value="Support" disabled></div>
<tr><td>Password:</td><td><input type="password" name="spw" id="spw" value=""></td></tr> <div><label>Password</label><input class="input" type="password" name="spw" required></div>
<tr><td>Note: Rember this password! You need it for the Admin</td><td></td></tr> </div>
</table> </div>
</p> </div>
<p> <div class="card">
<span class="f10 c">Admin account</span> <span class="f10 c">Admin account</span>
<table> <div class="grid-2" style="margin-top:12px;">
<tr> <div><label>Admin name</label><input class="input" name="aname"></div>
<td><span class="f9 c6">Admin name:</span></td> <div><label>Admin email</label><input class="input" name="aemail" type="email"></div>
<td><input type="text" name="aname" id="aname" value=""></td> <div><label>Admin password</label><input class="input" name="apass" type="password"></div>
</tr> <div><label>Tribe</label>
<tr> <select class="input" name="atribe">
<td><span class="f9 c6">Admin email:</span></td> <option value="1" selected>Romans</option>
<td><input type="text" name="aemail" id="aemail" value=""></td>
</tr>
<tr>
<td><span class="f9 c6">Admin password:</span></td>
<td><input type="password" name="apass" id="apass" value=""></td>
</tr>
<tr>
<td><span class="f9 c6">Admin tribe:</span></td>
<td>
<select name="atribe" id="atribe">
<option value="1" selected="selected">Romans</option>
<option value="2">Teutons</option> <option value="2">Teutons</option>
<option value="3">Gauls</option> <option value="3">Gauls</option>
</select> </select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Show admin in stats:</span></td>
<td>
<select name="admin_rank">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Include Support Messages in Admin Mailbox:</span></td>
<td>
<select name="admin_support_msgs">
<option value="true" selected="selected">true</option>
<option value="false">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Allow Administrative Accounts to be Raided and Attacked:</span></td>
<td>
<select name="admin_raidable">
<option value="true" selected="selected">true</option>
<option value="false">false</option>
</select>
</td>
</tr>
<tr><td colspan="2">Note: this will add a first user and will set them up as an Admin</td><td></td></tr>
<tr><td colspan="2">Note: you can leave this section empty, if you want</td><td></td></tr>
</table>
</p>
<center>
<input type="submit" name="Submit" id="Submit" value="Submit"></center>
</form>
</div> </div>
<div><label>Show in stats</label>
<select class="input" name="admin_rank">
<option value="true">true</option>
<option value="false" selected>false</option>
</select>
</div>
<div><label>Include Support Msgs</label>
<select class="input" name="admin_support_msgs">
<option value="true" selected>true</option>
<option value="false">false</option>
</select>
</div>
<div><label>Allow Raidable</label>
<select class="input" name="admin_raidable">
<option value="true" selected>true</option>
<option value="false">false</option>
</select>
</div>
</div>
<p style="color:#64748b;font-size:12px;margin-top:12px;">Note: leave empty if you want to skip admin creation.</p>
<div style="text-align:center;margin-top:12px;">
<button class="btn" type="submit">Create Accounts</button>
</div>
</div>
</form>
+214 -754
View File
@@ -3,14 +3,20 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename : config.tpl ##
## Type : Install Panel Frontend & Backend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ## ## Project : TravianZ ##
## Filename config.php ## ## GitHub : https://github.com/Shadowss/TravianZ ##
## Developed by: Dzoki ## ## --------------------------------------------------------------------------- ##
## License : TravianZ Project ## ## License : TravianZ Project ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## URLs: https://travianz.org ## ## --------------------------------------------------------------------------- ##
## https://github.com/Shadowss/TravianZ ##
## ##
################################################################################# #################################################################################
if(isset($_GET['c']) && $_GET['c'] == 1) { if(isset($_GET['c']) && $_GET['c'] == 1) {
@@ -77,754 +83,208 @@ $dbPrefix = $_SESSION['install_random_prefix'];
?> ?>
<form action="process.php" method="post" id="dataform"> <form action="process.php" method="post" id="dataform">
<p>
<span class="f10 c">SERVER RELATED</span>
<table>
<tr>
<td>
<span class="f9 c6">Server name:</span>
</td>
<td width="140">
<input type="text" name="servername" id="servername" value="TravianZ">
</td>
</tr>
<tr>
<td>
<span class="f9 c6">Server Timezone:</span>
</td>
<td>
<select name="tzone" onChange="refresh(this.value)">
<option value="1,Africa/Dakar" <?php if ($tz==1) echo "selected";?>>Africa</option>
<option value="2,America/New_York" <?php if ($tz==2) echo "selected";?>>America</option>
<option value="13,America/Sao_Paulo" <?php if ($tz==13) echo "selected";?>>Brazil (Sao Paulo)</option>
<option value="3,Antarctica/Casey" <?php if ($tz==3) echo "selected";?>>Antarctica</option>
<option value="4,Arctic/Longyearbyen" <?php if ($tz==4) echo "selected";?>>Arctic</option>
<option value="5,Asia/Kuala_Lumpur" <?php if ($tz==5) echo "selected";?>>Asia</option>
<option value="6,Atlantic/Azores" <?php if ($tz==6) echo "selected";?>>Atlantic</option>
<option value="7,Australia/Melbourne" <?php if ($tz==7) echo "selected";?>>Australia</option>
<option value="8,Europe/Bucharest" <?php if ($tz==8) echo "selected";?>>Europe (Bucharest)</option>
<option value="9,Europe/London" <?php if ($tz==9) echo "selected";?>>Europe (London)</option>
<option value="10,Europe/Bratislava" <?php if ($tz==10) echo "selected";?>>Europe (Bratislava)</option>
<option value="11,Indian/Maldives" <?php if ($tz==11) echo "selected";?>>Indian</option>
<option value="12,Pacific/Fiji" <?php if ($tz==12) echo "selected";?>>Pacific</option>
</select>
</td>
</tr>
<tr>
<td>
<span class="f9 c6">Server speed:</span>
</td>
<td>
<input name="speed" type="text" id="speed" value="1" size="2">
</td>
</tr>
<tr>
<td>
<span class="f9 c6">Troop speed:</span>
</td>
<td width="140">
<input type="text" name="incspeed" id="incspeed" value="1" size="2">
</td>
</tr>
<tr>
<td>
<span class="f9 c6">Evasion speed:</span>
</td>
<td>
<input name="evasionspeed" type="text" id="evasionspeed" value="1" size="2">
</td>
</tr>
<tr>
<td>
<span class="f9 c6">Trader capacity (1 = 1x...):</span>
</td>
<td width="140">
<input type="text" name="tradercap" id="tradercap" value="1" size="2">
</td>
</tr>
<tr>
<td><span class="f9 c6">Cranny capacity:</span></td>
<td width="140"><input type="text" name="crannycap" id="crannycap" value="1" size="2"></td>
</tr>
<tr>
<td><span class="f9 c6">Trapper capacity:</span></td>
<td width="140"><input type="text" name="trappercap" id="trappercap" value="1" size="2"></td>
</tr>
<tr>
<td><span class="f9 c6">Natars Units Multiplier:</span></td>
<td width="140"><input type="text" name="natars_units" id="natars_units" value="100" size="3"></td>
</tr>
<tr>
<td><span class="f9 c6">Natars Spawn (Days):</span></td>
<td width="140"><input type="text" name="natars_spawn_time" id="natars_spawn_time" value="260" size="3"></td>
</tr>
<tr>
<td><span class="f9 c6">WW spawn (Days):</span></td>
<td width="140"><input type="text" name="natars_ww_spawn_time" id="natars_ww_spawn_time" value="260" size="3"></td>
</tr>
<tr>
<td><span class="f9 c6">WW building plan spawn (Days):</span></td>
<td width="140"><input type="text" name="natars_ww_building_plan_spawn_time" id="natars_ww_building_plan_spawn_time" value="260" size="3"></td>
</tr>
<tr>
<td><span class="f9 c6">World size:</span></td>
<td>
<select name="wmax">
<option value="10">10x10</option>
<option value="25">25x25</option>
<option value="50">50x50</option>
<option value="100" selected="selected">100x100</option>
<option value="150">150x150</option>
<option value="200">200x200</option>
<option value="250">250x250</option>
<option value="300">300x300</option>
<option value="350">350x350</option>
<option value="400">400x400</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Register Open:</span></td>
<td>
<select name="reg_open">
<option value="true" selected="selected">true</option>
<option value="false">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Server:</span></td>
<td><input name="server" type="text" id="homepage" value="http://<?php echo $_SERVER['HTTP_HOST']; ?>/"></td>
</tr>
<tr>
<td><span class="f9 c6">Domain:</span></td>
<td><input name="domain" type="text" id="homepage" value="http://<?php echo $_SERVER['HTTP_HOST']; ?>/"></td>
</tr>
<tr>
<td><span class="f9 c6">Homepage:</span></td>
<td><input name="homepage" type="text" id="homepage" value="http://<?php echo $_SERVER['HTTP_HOST']; ?>/"></td>
</tr>
<tr>
<td><span class="f9 c6">Language:</span></td>
<td>
<select name="lang">
<option value="en" selected="selected">English</option>
<option value="es">Spanish</option>
<option value="rs">Serbian</option>
<option value="ru">Rusian</option>
<option value="zh_tw">Taiwanese</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Beginners protection length:</span></td>
<td>
<select name="beginner">
<option value="7200">2 hours</option>
<option value="10800">3 hours</option>
<option value="18000">5 hours</option>
<option value="28800">8 hours</option>
<option value="36000">10 hours</option>
<option value="43200" selected="selected">12 hours</option>
<option value="86400">24 hours (1 day)</option>
<option value="172800">48 hours (2 days)</option>
<option value="259200">72 hours (3 days)</option>
<option value="432000">120 hours (5 days)</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Nature troops regeneration time:</span></td>
<td>
<select name="nature_regtime">
<option value="28800">8 hours</option>
<option value="36000">10 hours</option>
<option value="43200" selected="selected">12 hours</option>
<option value="57600">16 hours</option>
<option value="72000">20 hours</option>
<option value="86400">24 hours</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Oasis wood production multiplier:</span></td>
<td width="140"><input type="text" name="oasis_wood_multiplier" id="oasis_wood_multiplier" value="40"></td>
</tr>
<tr>
<td><span class="f9 c6">Oasis clay production multiplier:</span></td>
<td width="140"><input type="text" name="oasis_clay_multiplier" id="oasis_clay_multiplier" value="40"></td>
</tr>
<tr>
<td><span class="f9 c6">Oasis iron production multiplier:</span></td>
<td width="140"><input type="text" name="oasis_iron_multiplier" id="oasis_iron_multiplier" value="40"></td>
</tr>
<tr>
<td><span class="f9 c6">Oasis crop production multiplier:</span></td>
<td width="140"><input type="text" name="oasis_crop_multiplier" id="oasis_crop_multiplier" value="40"></td>
</tr>
<tr>
<tr class="hover">
<td><span class="f9 c6">Medal Interval:</span></td>
<td>
<select name="medalinterval">
<option value="0">none</option>
<option value="(3600*24)">1 day</option>
<option value="(3600*24*2)">2 days</option>
<option value="(3600*24*3)">3 days</option>
<option value="(3600*24*4)">4 days</option>
<option value="(3600*24*5)">5 days</option>
<option value="(3600*24*6)">6 days</option>
<option value="(3600*24*7)" selected="selected">7 days</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Storage Multipler:</span></td>
<td width="140"><input type="text" name="storage_multiplier" id="storage_multiplier" value="1"></td>
</tr>
<tr>
<td><span class="f9 c6">Tourn Threshold:</span></td>
<td width="140"><input type="text" name="ts_threshold" id="ts_threshold" value="20"></td>
</tr>
<tr>
<td><span class="f9 c6">Great Workshop:</span></td>
<td>
<select name="great_wks">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">ww:</span></td>
<td>
<select name="ww">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Show Natars in Statistics:</span></td>
<td>
<select name="show_natars">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Peace system:</span></td>
<td>
<select name="peace">
<option value="0" selected="selected">None</option>
<option value="1">Normal</option>
<option value="2">Christmas</option>
<option value="3">New Year</option>
<option value="4">Easter</option>
</select>
</td>
</tr>
</table>
</p>
<p>
<span class="f10 c">NEW MECHANICS AND FUNCTIONS RELATED</span>
<table>
<tr>
<td><span class="f9 c6">Display oasis in profile:</span></td>
<td>
<select name="new_functions_oasis">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Alliance invitation message:</span></td>
<td>
<select name="new_functions_alliance_invitation">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">New Alliance & Embassy Mechanics:</span></td>
<td>
<select name="new_functions_embassy_mechanics">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">New forum post message:</span></td>
<td>
<select name="new_functions_forum_post_message">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Tribes images in profile:</span></td>
<td>
<select name="new_functions_tribe_images">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">MHs images in profile:</span></td>
<td>
<select name="new_functions_mhs_images">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Display artifact in profile:</span></td>
<td>
<select name="new_functions_display_artifact">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Display wonder in profile:</span></td>
<td>
<select name="new_functions_display_wonder">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Vacation Mode:</span></td>
<td>
<select name="new_functions_vacation">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Catapult targets:</span></td>
<td>
<select name="new_functions_display_catapult_target">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Manual on Nature and Natars:</span></td>
<td>
<select name="new_functions_manual_naturenatars">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Direct links placement:</span></td>
<td>
<select name="new_functions_display_links">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Medal Veteran Player:</span></td>
<td>
<select name="new_functions_medal_3year">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Medal Veteran Player 5a:</span></td>
<td>
<select name="new_functions_medal_5year">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Medal Veteran Player 10a:</span></td>
<td>
<select name="new_functions_medal_10year">
<option value="true">true</option>
<option value="false" selected="selected">false</option>
</select>
</td>
</tr>
</table>
</p>
<p>
<span class="f10 c">SQL RELATED</span>
<table>
<tr>
<td><span class="f9 c6">Hostname:</span></td>
<td><input name="sserver" type="text" id="sserver" value="<?php echo htmlspecialchars($dbHost, ENT_QUOTES, 'UTF-8'); ?>"></td>
</tr>
<tr>
<td><span class="f9 c6">Port:</span></td>
<td><input name="sport" type="text" id="sport" value="<?php echo htmlspecialchars($dbPort, ENT_QUOTES, 'UTF-8'); ?>"></td>
</tr>
<tr>
<td><span class="f9 c6">Username:</span></td>
<td><input name="suser" type="text" id="suser" value="<?php echo htmlspecialchars($dbUser, ENT_QUOTES, 'UTF-8'); ?>"></td>
</tr>
<tr>
<td><span class="f9 c6">Password:</span></td>
<td><input type="password" name="spass" id="spass" value="<?php echo htmlspecialchars($dbPass, ENT_QUOTES, 'UTF-8'); ?>"></td>
</tr>
<tr>
<td><span class="f9 c6">DB name:</span></td>
<td><input type="text" name="sdb" id="sdb" value="<?php echo htmlspecialchars($dbName, ENT_QUOTES, 'UTF-8'); ?>"></td>
</tr>
<tr>
<td><span class="f9 c6">Prefix:</span></td>
<td><input type="text" name="prefix" id="prefix" value="<?php echo htmlspecialchars($dbPrefix, ENT_QUOTES, 'UTF-8'); ?>" size="7"></td>
</tr>
<td><span class="f9 c6">Type:</span></td>
<td>
<select name="connectt">
<option value="0" disabled="disabled">MYSQL (deprecated, removed in PHP 7)</option>
<option value="1" selected="selected">MYSQLi</option>
</select>
</td>
</tr>
</table>
</p>
<!-- <RIGHT BOX - GPACK RELATED>
<span><center><strong>GPACK RELATED</strong></center></span><br />
<span class="f9 c6 c2">GPack:</span><span class="c3"><select name="gpack">
<option value="false" selected="selected">No</option>
<option value="true" disabled="disabled">Yes</option></select></span><br /><br />
<span class="f9 c6 c2">GPack Design:</span><span class="c3"><select name="gp_locate">
<option value="gpack/travian_default/" selected="selected">Travian Default
<option value="gpack/travianx_v1/">TravianX v1 by Dzoki</option></select></span><br /><br />
-->
<!-- </RIGHT BOX - GPACK RELATED> -->
<p>
<span class="f10 c">PLUS GOLD PACKAGES</span>
<table>
<tr>
<td><span class="f9 c6">Your PayPal E-Mail Address:</span>
<br />(must be either <b>Business</b> or <b>Premier</b> account)</td>
<td><input type="text" name="paypal-email" id="paypal-email" value="@"></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td><span class="f9 c6">Payment Currency:</span>
<br />(your PayPal account must be able to receive this currency)</td>
<td><input type="text" name="paypal-currency" id="paypal-currency" value="EUR"></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td><span class="f9 c6">Package "A" Amount of Gold:</span></td>
<td><input type="text" name="plus-a-gold" id="plus-a-gold" value="60"></td>
</tr>
<tr>
<td><span class="f9 c6">Package "A" Price:</span></td>
<td><input type="text" name="plus-a-price" id="plus-a-price" value="1,99"></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td><span class="f9 c6">Package "B" Amount of Gold:</span></td>
<td><input type="text" name="plus-b-gold" id="plus-b-gold" value="120"></td>
</tr>
<tr>
<td><span class="f9 c6">Package "B" Price:</span></td>
<td><input type="text" name="plus-b-price" id="plus-b-price" value="4,99"></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td><span class="f9 c6">Package "C" Amount of Gold:</span></td>
<td><input type="text" name="plus-c-gold" id="plus-c-gold" value="360"></td>
</tr>
<tr>
<td><span class="f9 c6">Package "C" Price:</span></td>
<td><input type="text" name="plus-c-price" id="plus-c-price" value="9,99"></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td><span class="f9 c6">Package "D" Amount of Gold:</span></td>
<td><input type="text" name="plus-d-gold" id="plus-d-gold" value="1000"></td>
</tr>
<tr>
<td><span class="f9 c6">Package "D" Price:</span></td>
<td><input type="text" name="plus-d-price" id="plus-d-price" value="19,99"></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td><span class="f9 c6">Package "E" Amount of Gold:</span></td>
<td><input type="text" name="plus-e-gold" id="plus-e-gold" value="2000"></td>
</tr>
<tr>
<td><span class="f9 c6">Package "E" Price:</span></td>
<td><input type="text" name="plus-e-price" id="plus-e-price" value="49,99"></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td><span class="f9 c6">Plus account length:</span></td>
<td>
<select name="plus_time">
<option value="(3600*12)">12 hours</option>
<option value="(3600*24)">1 day</option>
<option value="(3600*24*2)">2 days</option>
<option value="(3600*24*3)">3 days</option>
<option value="(3600*24*4)">4 days</option>
<option value="(3600*24*5)">5 days</option>
<option value="(3600*24*6)">6 days</option>
<option value="(3600*24*7)" selected="selected">7 days</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">+25% production length:</span></td>
<td>
<select name="plus_production">
<option value="(3600*12)">12 hours</option>
<option value="(3600*24)">1 day</option>
<option value="(3600*24*2)">2 days</option>
<option value="(3600*24*3)">3 days</option>
<option value="(3600*24*4)">4 days</option>
<option value="(3600*24*5)">5 days</option>
<option value="(3600*24*6)">6 days</option>
<option value="(3600*24*7)" selected="selected">7 days</option>
</select>
</td>
</tr>
</table>
</p>
<p>
<span class="f10 c">NEWSBOX OPTIONS</span>
<table>
<tr>
<td><span class="f9 c6">Newsbox 1:</span></td>
<td>
<select name="box1">
<option value="true">Enabled</option>
<option value="false" selected="selected">Disabled</option>
</select>
</td>
</tr>
<td><span class="f9 c6">Newsbox 2:</span></td>
<td>
<select name="box2">
<option value="true">Enabled</option>
<option value="false" selected="selected">Disabled</option>
</select>
</td>
</tr>
<td><span class="f9 c6">Newsbox 3:</span></td>
<td>
<select name="box3">
<option value="true">Enabled</option>
<option value="false" selected="selected">Disabled</option>
</select>
</td>
</tr>
</table>
</p>
<p>
<span class="f10 c">LOG RELATED (You should disable them)</span>
<table>
<tr>
<td><span class="f9 c6">Log Building:</span></td>
<td>
<select name="log_build">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Log Tech:</span></td>
<td>
<select name="log_tech">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Log Login:</span></td>
<td>
<select name="log_login">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Log Gold:</span></td>
<td>
<select name="log_gold_fin">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Log Admin:</span></td>
<td>
<select name="log_admin">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Log War:</span></td>
<td>
<select name="log_war">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Log Market:</span></td>
<td>
<select name="log_market">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Log Illegal:</span></td>
<td>
<select name="log_illegal">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Log :</span></td>
<td>
<select name="">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
</table>
</p>
<p>
<span class="f10 c">EXTRA OPTIONS</span>
<table>
<tr>
<td><span class="f9 c6">Quest:</span></td>
<td>
<select name="quest">
<option value="true" selected="selected">Yes</option>
<option value="false">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Quest Type:</span></td>
<td>
<select name="qtype">
<option value="25" selected="selected">Official Travian</option>
<option value="37">TravianZ Extended</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Activate:</span></td>
<td>
<select name="activate">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Limit Mailbox:</span></td>
<td>
<select name="limit_mailbox">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
(NOT DONE)
</td>
</tr>
<tr>
<td><span class="f9 c6">Max mails:</span></td>
<td><input type="text" name="max_mails" id="max_mails" value="30" size="4"> (NOT DONE)</td>
</tr>
<tr>
<td><span class="f9 c6">Demolish - lvl required:</span></td>
<td>
<select name="demolish">
<option value="5">5</option>
<option value="10" selected="selected">10 - Default</option>
<option value="15">15</option>
<option value="20">20</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Village Expand:</span></td>
<td>
<select name="village_expand">
<option value="1" selected="selected">Slow</option>
<option value="0">Fast</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">Error Reporting:</span></td>
<td>
<select name="error">
<option value="error_reporting (E_ALL ^ E_NOTICE ^ E_DEPRECATED);" selected="selected">Yes</option>
<option value="error_reporting (0);">No</option>
</select>
</td>
</tr>
<tr>
<td><span class="f9 c6">T4 is Coming screen:</span></td>
<td>
<select name="t4_coming">
<option value="true">Yes</option>
<option value="false" selected="selected">No</option>
</select>
</td>
</tr>
</table>
</p>
<br />
<span class="f10 c">Server Start Settings</span>
<table>
<tr>
<td><span class="f9 c6">Start Date:</span></td>
<td width="140"><input type="text" name="start_date" id="start_date" value="<?php echo date('d.m.Y'); ?>"></td>
</tr>
<tr>
<td><span class="f9 c6">Start Time:</span></td>
<td width="140"><input type="text" name="start_time" id="start_time" value="<?php echo date('H:i'); ?>"></td>
</tr>
</table>
<center>
<input type="submit" name="Submit" id="Submit" value="Submit">
<input type="hidden" name="subconst" value="1"> <input type="hidden" name="subconst" value="1">
</center>
</form> <div class="card">
<span class="f10 c">SERVER RELATED</span>
<div class="grid-2" style="margin-top:8px;">
<div><label>Server name</label><input class="input" name="servername" id="servername" value="TravianZ"></div>
<div><label>Timezone</label>
<select class="input" name="tzone" onchange="refresh(this.value)">
<option value="1,Africa/Dakar" <?=$tz==1?'selected':''?>>Africa</option>
<option value="2,America/New_York" <?=$tz==2?'selected':''?>>America</option>
<option value="13,America/Sao_Paulo" <?=$tz==13?'selected':''?>>Brazil</option>
<option value="3,Antarctica/Casey" <?=$tz==3?'selected':''?>>Antarctica</option>
<option value="4,Arctic/Longyearbyen" <?=$tz==4?'selected':''?>>Arctic</option>
<option value="5,Asia/Kuala_Lumpur" <?=$tz==5?'selected':''?>>Asia</option>
<option value="6,Atlantic/Azores" <?=$tz==6?'selected':''?>>Atlantic</option>
<option value="7,Australia/Melbourne" <?=$tz==7?'selected':''?>>Australia</option>
<option value="8,Europe/Bucharest" <?=$tz==8?'selected':''?>>Europe (Bucharest)</option>
<option value="9,Europe/London" <?=$tz==9?'selected':''?>>Europe (London)</option>
<option value="10,Europe/Bratislava" <?=$tz==10?'selected':''?>>Europe (Bratislava)</option>
<option value="11,Indian/Maldives" <?=$tz==11?'selected':''?>>Indian</option>
<option value="12,Pacific/Fiji" <?=$tz==12?'selected':''?>>Pacific</option>
</select>
</div>
<div><label>Server speed</label><input class="input" name="speed" id="speed" value="1"></div>
<div><label>Troop speed</label><input class="input" name="incspeed" id="incspeed" value="1"></div>
<div><label>Evasion speed</label><input class="input" name="evasionspeed" id="evasionspeed" value="1"></div>
<div><label>Trader capacity</label><input class="input" name="tradercap" id="tradercap" value="1"></div>
<div><label>Cranny capacity</label><input class="input" name="crannycap" id="crannycap" value="1"></div>
<div><label>Trapper capacity</label><input class="input" name="trappercap" id="trappercap" value="1"></div>
<div><label>World size</label>
<select class="input" name="wmax">
<option value="10">10x10</option><option value="25">25x25</option><option value="50">50x50</option>
<option value="100" selected>100x100</option><option value="150">150x150</option><option value="200">200x200</option>
<option value="250">250x250</option><option value="300">300x300</option><option value="350">350x350</option><option value="400">400x400</option>
</select>
</div>
<div><label>Language</label>
<select class="input" name="lang"><option value="en" selected>English</option><option value="es">Spanish</option><option value="rs">Serbian</option><option value="ru">Rusian</option><option value="zh_tw">Taiwanese</option></select>
</div>
<div><label>Beginners protection</label>
<select class="input" name="beginner">
<option value="7200">2 hours</option><option value="10800">3 hours</option><option value="18000">5 hours</option><option value="28800">8 hours</option><option value="36000">10 hours</option>
<option value="43200" selected>12 hours</option><option value="86400">24 hours (1 day)</option><option value="172800">48 hours (2 days)</option><option value="259200">72 hours (3 days)</option><option value="432000">120 hours (5 days)</option>
</select>
</div>
<div><label>Register Open</label><select class="input" name="reg_open"><option value="true" selected>true</option><option value="false">false</option></select></div>
</div>
</div>
<div class="grid-2">
<div class="card">
<span class="f10 c">NATARS & MAP</span>
<div style="margin-top:12px;display:grid;gap:10px;">
<div><label>Natars Units Multiplier</label><input class="input" name="natars_units" id="natars_units" value="100"></div>
<div><label>Natars Spawn (days)</label><input class="input" name="natars_spawn_time" id="natars_spawn_time" value="260"></div>
<div><label>WW Spawn (days)</label><input class="input" name="natars_ww_spawn_time" id="natars_ww_spawn_time" value="260"></div>
<div><label>WW BP Spawn (days)</label><input class="input" name="natars_ww_building_plan_spawn_time" id="natars_ww_building_plan_spawn_time" value="260"></div>
<div><label>Nature regen</label><select class="input" name="nature_regtime"><option value="28800">8 hours</option><option value="36000">10 hours</option><option value="43200" selected>12 hours</option><option value="57600">16 hours</option><option value="72000">20 hours</option><option value="86400">24 hours</option></select></div>
</div>
</div>
<div class="card">
<span class="f10 c">OASIS & STORAGE</span>
<div style="margin-top:12px;display:grid;gap:10px;">
<div><label>Wood multiplier</label><input class="input" name="oasis_wood_multiplier" id="oasis_wood_multiplier" value="40"></div>
<div><label>Clay multiplier</label><input class="input" name="oasis_clay_multiplier" id="oasis_clay_multiplier" value="40"></div>
<div><label>Iron multiplier</label><input class="input" name="oasis_iron_multiplier" id="oasis_iron_multiplier" value="40"></div>
<div><label>Crop multiplier</label><input class="input" name="oasis_crop_multiplier" id="oasis_crop_multiplier" value="40"></div>
<div><label>Storage Multiplier</label><input class="input" name="storage_multiplier" id="storage_multiplier" value="1"></div>
<div><label>TS Threshold</label><input class="input" name="ts_threshold" id="ts_threshold" value="20"></div>
</div>
</div>
</div>
<div class="grid-2">
<div class="card">
<span class="f10 c">SQL RELATED</span>
<div style="margin-top:12px;display:grid;gap:10px;">
<div><label>Hostname</label><input class="input" name="sserver" id="sserver" value="<?=htmlspecialchars($dbHost, ENT_QUOTES, 'UTF-8')?>"></div>
<div><label>Port</label><input class="input" name="sport" id="sport" value="<?=htmlspecialchars($dbPort, ENT_QUOTES, 'UTF-8')?>"></div>
<div><label>Username</label><input class="input" name="suser" id="suser" value="<?=htmlspecialchars($dbUser, ENT_QUOTES, 'UTF-8')?>"></div>
<div><label>Password</label><input class="input" type="password" name="spass" id="spass" value="<?=htmlspecialchars($dbPass, ENT_QUOTES, 'UTF-8')?>"></div>
<div><label>DB name</label><input class="input" name="sdb" id="sdb" value="<?=htmlspecialchars($dbName, ENT_QUOTES, 'UTF-8')?>"></div>
<div><label>Prefix</label><input class="input" name="prefix" id="prefix" value="<?=htmlspecialchars($dbPrefix, ENT_QUOTES, 'UTF-8')?>" size="7"></div>
<div><label>Type</label><select class="input" name="connectt"><option value="0" disabled>MYSQL (deprecated, removed in PHP 7)</option><option value="1" selected>MYSQLi</option></select></div>
</div>
</div>
<div class="card">
<span class="f10 c">SERVER URLS</span>
<div style="margin-top:12px;display:grid;gap:10px;">
<div><label>Server</label><input class="input" name="server" id="homepage" value="http://<?=$_SERVER['HTTP_HOST']?>/"></div>
<div><label>Domain</label><input class="input" name="domain" id="homepage" value="http://<?=$_SERVER['HTTP_HOST']?>/"></div>
<div><label>Homepage</label><input class="input" name="homepage" id="homepage" value="http://<?=$_SERVER['HTTP_HOST']?>/"></div>
<div><label>Medal Interval</label><select class="input" name="medalinterval"><option value="0">none</option><option value="(3600*24)">1 day</option><option value="(3600*24*2)">2 days</option><option value="(3600*24*3)">3 days</option><option value="(3600*24*4)">4 days</option><option value="(3600*24*5)">5 days</option><option value="(3600*24*6)">6 days</option><option value="(3600*24*7)" selected>7 days</option></select></div>
<div><label>Great Workshop</label><select class="input" name="great_wks"><option value="true">true</option><option value="false" selected>false</option></select></div>
<div><label>WW enabled</label><select class="input" name="ww"><option value="true">true</option><option value="false" selected>false</option></select></div>
<div><label>Show Natars</label><select class="input" name="show_natars"><option value="true">true</option><option value="false" selected>false</option></select></div>
<div><label>Peace system</label><select class="input" name="peace"><option value="0" selected>None</option><option value="1">Normal</option><option value="2">Christmas</option><option value="3">New Year</option><option value="4">Easter</option></select></div>
</div>
</div>
</div>
<div class="card">
<span class="f10 c">NEW MECHANICS AND FUNCTIONS</span>
<div class="grid-1" style="margin-top:12px;display:flex;flex-direction:column;gap:10px;">
<?php
$mechs = [
'new_functions_oasis' => 'Display oasis in profile',
'new_functions_alliance_invitation' => 'Alliance invitation',
'new_functions_embassy_mechanics' => 'Embassy mechanics',
'new_functions_forum_post_message' => 'Forum post message',
'new_functions_tribe_images' => 'Tribes images',
'new_functions_mhs_images' => 'MHs images',
'new_functions_display_artifact' => 'Display artifact',
'new_functions_display_wonder' => 'Display wonder',
'new_functions_vacation' => 'Vacation Mode',
'new_functions_display_catapult_target'=> 'Catapult targets',
'new_functions_manual_naturenatars' => 'Manual Nature/Natars',
'new_functions_display_links' => 'Direct links',
'new_functions_medal_3year' => 'Medal 3y',
'new_functions_medal_5year' => 'Medal 5y',
'new_functions_medal_10year' => 'Medal 10y',
'new_functions_special_medals_system' => 'Special Medals System'
];
foreach($mechs as $k => $l){
echo "
<div style='display:flex;flex-direction:column;gap:4px;'>
<label>$l</label>
<select class='input' name='$k'>
<option value='true'>true</option>
<option value='false' selected>false</option>
</select>
</div>";
}
?>
</div> </div>
</div>
<div class="card">
<span class="f10 c">PLUS GOLD PACKAGES</span>
<div class="grid-2" style="margin-top:12px;">
<div><label>PayPal Email</label><input class="input" name="paypal-email" id="paypal-email" value="@"></div>
<div><label>Currency</label><input class="input" name="paypal-currency" id="paypal-currency" value="EUR"></div>
<div><label>Package A Gold</label><input class="input" name="plus-a-gold" id="plus-a-gold" value="60"></div>
<div><label>Package A Price</label><input class="input" name="plus-a-price" id="plus-a-price" value="1,99"></div>
<div><label>Package B Gold</label><input class="input" name="plus-b-gold" id="plus-b-gold" value="120"></div>
<div><label>Package B Price</label><input class="input" name="plus-b-price" id="plus-b-price" value="4,99"></div>
<div><label>Package C Gold</label><input class="input" name="plus-c-gold" id="plus-c-gold" value="360"></div>
<div><label>Package C Price</label><input class="input" name="plus-c-price" id="plus-c-price" value="9,99"></div>
<div><label>Package D Gold</label><input class="input" name="plus-d-gold" id="plus-d-gold" value="1000"></div>
<div><label>Package D Price</label><input class="input" name="plus-d-price" id="plus-d-price" value="19,99"></div>
<div><label>Package E Gold</label><input class="input" name="plus-e-gold" id="plus-e-gold" value="2000"></div>
<div><label>Package E Price</label><input class="input" name="plus-e-price" id="plus-e-price" value="49,99"></div>
<div><label>Plus length</label><select class="input" name="plus_time"><option value="(3600*12)">12 hours</option><option value="(3600*24)">1 day</option><option value="(3600*24*2)">2 days</option><option value="(3600*24*3)">3 days</option><option value="(3600*24*4)">4 days</option><option value="(3600*24*5)">5 days</option><option value="(3600*24*6)">6 days</option><option value="(3600*24*7)" selected>7 days</option></select></div>
<div><label>+25% production</label><select class="input" name="plus_production"><option value="(3600*12)">12 hours</option><option value="(3600*24)">1 day</option><option value="(3600*24*2)">2 days</option><option value="(3600*24*3)">3 days</option><option value="(3600*24*4)">4 days</option><option value="(3600*24*5)">5 days</option><option value="(3600*24*6)">6 days</option><option value="(3600*24*7)" selected>7 days</option></select></div>
</div>
</div>
<div class="grid-2">
<div class="card">
<span class="f10 c">NEWSBOX OPTIONS</span>
<div style="margin-top:12px;display:grid;gap:10px;">
<div><label>Newsbox 1</label><select class="input" name="box1"><option value="true">Enabled</option><option value="false" selected>Disabled</option></select></div>
<div><label>Newsbox 2</label><select class="input" name="box2"><option value="true">Enabled</option><option value="false" selected>Disabled</option></select></div>
<div><label>Newsbox 3</label><select class="input" name="box3"><option value="true">Enabled</option><option value="false" selected>Disabled</option></select></div>
</div>
</div>
<div class="card">
<span class="f10 c">LOG RELATED (You should disable them)</span>
<div style="margin-top:12px;display:grid;gap:10px;">
<div><label>Log Building</label><select class="input" name="log_build"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
<div><label>Log Tech</label><select class="input" name="log_tech"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
<div><label>Log Login</label><select class="input" name="log_login"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
<div><label>Log Gold</label><select class="input" name="log_gold_fin"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
<div><label>Log Admin</label><select class="input" name="log_admin"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
<div><label>Log War</label><select class="input" name="log_war"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
<div><label>Log Market</label><select class="input" name="log_market"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
<div><label>Log Illegal</label><select class="input" name="log_illegal"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
</div>
</div>
</div>
<div class="card">
<span class="f10 c">EXTRA OPTIONS</span>
<div class="grid-2" style="margin-top:12px;">
<div><label>Quest</label><select class="input" name="quest"><option value="true" selected>Yes</option><option value="false">No</option></select></div>
<div><label>Quest Type</label><select class="input" name="qtype"><option value="25" selected>Official Travian</option><option value="37">TravianZ Extended</option></select></div>
<div><label>Activate</label><select class="input" name="activate"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
<div><label>Limit Mailbox</label><select class="input" name="limit_mailbox"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
<div><label>Max mails</label><input class="input" name="max_mails" id="max_mails" value="30"></div>
<div><label>Demolish - lvl required</label><select class="input" name="demolish"><option value="5">5</option><option value="10" selected>10 - Default</option><option value="15">15</option><option value="20">20</option></select></div>
<div><label>Village Expand</label><select class="input" name="village_expand"><option value="1" selected>Slow</option><option value="0">Fast</option></select></div>
<div><label>Error Reporting</label><select class="input" name="error"><option value="error_reporting (E_ALL ^ E_NOTICE ^ E_DEPRECATED);" selected>Yes</option><option value="error_reporting (0);">No</option></select></div>
<div><label>T4 is Coming screen</label><select class="input" name="t4_coming"><option value="true">Yes</option><option value="false" selected>No</option></select></div>
<div><label>Start Date</label><input class="input" name="start_date" id="start_date" value="<?=date('d.m.Y')?>"></div>
<div><label>Start Time</label><input class="input" name="start_time" id="start_time" value="<?=date('H:i')?>"></div>
</div>
</div>
<div style="text-align:center;margin:18px 0;">
<button class="btn" type="submit" name="Submit" id="Submit">Save Configuration →</button>
</div>
</form>
+20 -33
View File
@@ -3,50 +3,37 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename : dataform.tpl ##
## Type : Install Panel Frontend & Backend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ## ## Project : TravianZ ##
## Filename dataform.php ## ## GitHub : https://github.com/Shadowss/TravianZ ##
## Developed by: Dzoki ## ## --------------------------------------------------------------------------- ##
## License : TravianZ Project ## ## License : TravianZ Project ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## URLs: https://travianz.org ## ## --------------------------------------------------------------------------- ##
## https://github.com/Shadowss/TravianZ ##
## ##
################################################################################# #################################################################################
include_once('../GameEngine/config.php'); include_once('../GameEngine/config.php');
if(isset($_GET['c']) && $_GET['c'] == 1) { if(isset($_GET['c']) && $_GET['c'] == 1) {
echo "<div class=\"headline\"><span class=\"f10 c5\">Error importing database. Check configuration.</span></div><br>"; echo '<div class="card" style="border-color:#fecaca;background:#fef2f2;color:#991b1b;"><b>Error importing database. Check configuration.</b></div>';
} }
if(isset($_GET['err']) && $_GET['err'] == 1) { if(isset($_GET['err']) && $_GET['err'] == 1) {
echo "<br /><hr /><br /><div class=\"headline\"><span class=\"f10 c5\">Existing structure was found in the database! Please remove old game tables with the <i>".TB_PREFIX."</i> prefix from the '<strong>".SQL_DB."</strong>' database before continuing.</span></div><br /><br />"; echo '<div class="card" style="border-color:#fecaca;background:#fef2f2;color:#991b1b;">Existing structure found! Please remove tables with prefix <b>'.TB_PREFIX.'</b> from database <b>'.SQL_DB.'</b>.</div>';
} }
?> ?>
<form action="process.php" method="post" id="dataform"> <form action="process.php" method="post" id="dataform">
<input type="hidden" name="substruc" value="1"> <input type="hidden" name="substruc" value="1">
<div class="card">
<p>
<span class="f10 c">Create Database Structure</span> <span class="f10 c">Create Database Structure</span>
<p style="color:#475569;"><b>Warning</b>: This can take some time. Please wait until the next page loads.</p>
<table> <div style="text-align:center;margin-top:12px;">
<tr> <button class="btn" id="Submit" onclick="return proceed()">Create Database...</button>
<td>
<b>Warning</b>: This can take some time. Please wait until the next page has been loaded. Click Create to proceed...
<br>
<br>
</td>
</tr>
<tr>
<td>
<center>
<input type="submit" name="Submit" id="Submit" value="Create..." onClick="return proceed()">
<br>
<br>
</center>
</td>
</tr>
</table>
</p>
</form>
</div> </div>
</div>
</form>
+51 -47
View File
@@ -1,57 +1,61 @@
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename : end.tpl ##
## Type : Install Panel Frontend & Backend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ## ## Project : TravianZ ##
## Filename end.php ## ## GitHub : https://github.com/Shadowss/TravianZ ##
## Developed by: Dzoki ## ## --------------------------------------------------------------------------- ##
## License : TravianZ Project ## ## License : TravianZ Project ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## URLs: https://travianz.org ## ## --------------------------------------------------------------------------- ##
## https://github.com/Shadowss/TravianZ ##
## ##
################################################################################# #################################################################################
?> include("../GameEngine/config.php"); $time=time(); @rename("../install/","../installed_".$time); @touch('../var/installed'); ?>
<p> <div class="card" style="text-align:center;">
Thanks for installing TravianZ. <h2 style="margin:0 0 8px;">🎉 Installation Complete!</h2>
<h4>Please remove/rename the installation folder.</h4> <p style="color:#475569;">Thanks for installing TravianZ. Please remove the install folder.</p>
All the files are placed. The database is created, so you can now start playing on your own Travian. <div style="display:inline-block;text-align:left;background:#0f172a;color:#e2e8f0;border-radius:10px;padding:12px 16px;font-family:ui-monospace;font-size:13px;line-height:1.6;">
</p> rm -R install<br>
chmod -R 755 GameEngine<br>
<ul> chmod -R 777 GameEngine/Prevention<br>
<li><h4>After Installation</h4></li> chmod -R 777 GameEngine/Notes<br>
<li>Delete install folder (sudo rm -R install)</li> chmod -R 777 var/log
<li>CHMOD GameEngine back to 755 (sudo chmod -R 755 GameEngine)</li> </div>
<li>CHMOD Prevention to 777 (sudo chmod -R 777 GameEngine/Prevention)</li> <div style="margin-top:16px;"><a class="btn" href="<?php echo HOMEPAGE; ?>">Go to Homepage →</a></div>
<li>CHMOD Notes to 777 (sudo chmod -R 777 GameEngine/Notes)</li> </div>
<li>CHMOD var/log to 777 (sudo chmod -R 777 var/log)</li>
</ul> <div class="card">
<h3 style="margin:0 0 12px;text-align:center;">🚀 Next Steps</h3>
<ul> <div class="grid-2" style="gap:14px;">
<li><h4>After Installation</h4></li> <div style="background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:14px;">
<li>Protect folder /Admin with password protect directory</li> <b>🔒 Secure Your Server</b>
</ul> <p style="margin:6px 0 0;color:#475569;font-size:14px;">Protect /Admin with .htpasswd, enable HTTPS, and set cronjobs for automated tasks.</p>
</div>
<?php include("../GameEngine/config.php"); <div style="background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:14px;">
$time = time(); <b>📖 Read the Docs</b>
rename("../install/","../installed_".$time); <p style="margin:6px 0 0;color:#475569;font-size:14px;">Learn about speed settings, Natars, and world configuration in the GitHub Wiki.</p>
touch('../var/installed'); </div>
?> <div style="background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:14px;">
<p> <b>💬 Join Community</b>
<center><font size="4"><a href="<?php echo HOMEPAGE; ?>">> My TravianZ homepage <</font></a></center> <p style="margin:6px 0 0;color:#475569;font-size:14px;">Get help, share mods, and report bugs on GitHub Discussions.</p>
</p> </div>
</br> <div style="background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:14px;">
<center> <b>⭐ Star on GitHub</b>
<h2>Please support our developers and donate.</h2> <p style="margin:6px 0 0;color:#475569;font-size:14px;">If you like TravianZ, star the repo to support the project.</p>
</br> </div>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> </div>
<input type="hidden" name="cmd" value="_s-xclick"> <div style="text-align:center;margin-top:16px;display:flex;gap:10px;justify-content:center;flex-wrap:wrap;">
<input type="hidden" name="hosted_button_id" value="QHUTVY5MLECFQ"> <a class="btn" style="background:#0f172a;" href="https://github.com/Shadowss/TravianZ" target="_blank">GitHub</a>
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal The safer, easier way to pay online!"> <a class="btn" style="background:#16a34a;" href="https://github.com/Shadowss/TravianZ/wiki" target="_blank">Documentation</a>
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1"> <a class="btn" style="background:#64748b;" href="mailto:cata7007@gmail.com">Contact Support</a>
</form> </div>
</center>
</div> </div>
+34 -45
View File
@@ -1,51 +1,40 @@
<div class="card">
<br> <h3 style="margin:0 0 8px;font-size:16px;">⚠️ Disclaimer</h3>
<ul style="margin:0;padding-left:18px;line-height:1.6;color:#334155;">
<h4>&nbsp;&nbsp;Disclaimer</h4> <li>Along with the installation/usage of this game, you shall be fully responsible for any legal results...</li>
<li>Neither the team that created this script nor the team that customised it shall be responsible for any damage...</li>
<ul> <li>All code was confirmed to be running correctly by the creation team...</li>
<li>Along with the installation/usage of this game, you shall be fully responsible for any legal results that may raised initiated by the owners of any unlicensed content you permit your copy of this game to publish.</li> <li>Users are asked to review the code on their own accord.</li>
<li>Any customization to the source code are the property of each author's discretion.</li>
<li>Neither the team that created this script nor the team that customised it to create this distribution/release shall be responsible for any damage done to your computer/server system.</li>
<li>All code was confirmed to be running correctly by the creation team without any visible security risk they were aware of at the time the released it. Similarly for the customisation team who customised it to create this distribution/release.</li>
<li>Users are asked to review the code on their own accord and behalf.</li>
<li>Any customization to the source code are the property of each customisation's author, it is up to each author's discretion whether to share it by including it in free open source distributions such as this one.</li>
<li><b>You have no rights to edit copyright notices or/and claim this script as your own.</b></li> <li><b>You have no rights to edit copyright notices or/and claim this script as your own.</b></li>
<li>Last but not least, Enjoy.</li> <li>Last but not least, Enjoy.</li>
</ul> </ul>
<br>
<ul>
<li><h4>Before Installation (Linux):</h4></li>
<li>CHMOD install to 777 (chmod -R 777 install)</li>
<li>CHMOD GameEngine to 777 (chmod -R 777 GameEngine)</li>
<li><h4>After Installation</h4></li>
<li>Delete install folder (sudo rm -R install)</li>
<li>CHMOD GameEngine back to 755 (sudo chmod -R 755 GameEngine)</li>
<li>CHMOD Prevention to 777 (sudo chmod -R 777 GameEngine/Prevention)</li>
<li>CHMOD Notes to 777 (sudo chmod -R 777 GameEngine/Notes)</li>
<li>CHMOD var/log to 777 (sudo chmod -R 777 var/log)</li>
</ul>
<ul>
<li><h4>After Installation</h4></li>
<li>Protect folder /Admin with password protect directory</li>
</ul>
<div class="lbox">
TravianZ Team
</div> </div>
<br>
<center>
<form>
<input type="button" name="next" value="Next" onclick="location.href='?s=1'">
</form>
</center>
<div class="grid-2">
<div class="card">
<h3 style="margin:0 0 8px;">🐧 Before Installation (Linux)</h3>
<div style="font-family:ui-monospace;background:#0f172a;color:#e2e8f0;padding:10px;border-radius:8px;font-size:13px;">
chmod -R 777 install<br>chmod -R 777 GameEngine
</div>
</div>
<div class="card">
<h3 style="margin:0 0 8px;">✅ After Installation</h3>
<div style="font-family:ui-monospace;background:#0f172a;color:#e2e8f0;padding:10px;border-radius:8px;font-size:13px;">
rm -R install<br>
chmod -R 755 GameEngine<br>
chmod -R 777 GameEngine/Prevention<br>
chmod -R 777 GameEngine/Notes<br>
chmod -R 777 var/log
</div>
</div>
</div>
<div class="card">
<b>🔒 Protect /Admin</b> with password protect directory (.htaccess).
</div>
<div style="text-align:center;margin-top:16px;">
<a class="btn" href="?s=1">Next →</a>
<div style="margin-top:8px;color:#64748b;font-size:12px;">TravianZ Team</div>
</div> </div>
+20 -28
View File
@@ -1,38 +1,30 @@
<div class="menu"> <div class="stepper">
<?php <?php
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename : menu.tpl ##
## Type : Install Panel Frontend & Backend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ## ## Project : TravianZ ##
## Filename menu.php ## ## GitHub : https://github.com/Shadowss/TravianZ ##
## Developed by: Dzoki ## ## --------------------------------------------------------------------------- ##
## License : TravianZ Project ## ## License : TravianZ Project ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## URLs: http://travian.shadowss.ro ## ## --------------------------------------------------------------------------- ##
## Source code: https://github.com/Shadowss/TravianZ ##
## ##
################################################################################# #################################################################################
switch($_GET['s']) { $steps = ['Intro','Configuration','Database','World Data','Accounts','End'];
case 0: $cur = (int)($_GET['s'] ?? 0);
echo "<li class=\"c2 f9\">Intro</li><li class=\"c1 f9\">Configuration</li><li class=\"c1 f9\">Database</li><li class= \"c1 f9\">World Data</li><li class=\"c1 f9\">Accounts</li><li class=\"c1 f9\">End</li>"; foreach($steps as $i=>$name){
break; $state = $i < $cur ? 'done' : ($i == $cur ? 'active' : '');
case 1: echo "<div class='step $state'><span class='num'>".($i+1)."</span><span>$name</span></div>";
echo "<li class=\"c3 f9\">Intro</li><li class=\"c2 f9\">Configuration</li><li class=\"c1 f9\">Database</li><li class= \"c1 f9\">World Data</li><li class=\"c1 f9\">Accounts</li><li class=\"c1 f9\">End</li>";
break;
case 2:
echo "<li class=\"c3 f9\">Intro</li><li class=\"c3 f9\">Configuration</li><li class=\"c2 f9\">Database</li><li class= \"c1 f9\">World Data</li><li class=\"c1 f9\">Accounts</li><li class=\"c1 f9\">End</li>";
break;
case 3:
echo "<li class=\"c3 f9\">Intro</li><li class=\"c3 f9\">Configuration</li><li class=\"c3 f9\">Database</li><li class= \"c2 f9\">World Data</li><li class=\"c1 f9\">Accounts</li><li class=\"c1 f9\">End</li>";
break;
case 4:
echo "<li class=\"c3 f9\">Intro</li><li class=\"c3 f9\">Configuration</li><li class=\"c3 f9\">Database</li><li class= \"c3 f9\">World Data</li><li class=\"c2 f9\">Accounts</li><li class=\"c1 f9\">End</li>";
break;
case 5:
echo "<li class=\"c3 f9\">Intro</li><li class=\"c3 f9\">Configuration</li><li class=\"c3 f9\">Database</li><li class= \"c3 f9\">World Data</li><li class=\"c3 f9\">Accounts</li><li class=\"c2 f9\">End</li>";
break;
} }
?>
?></div> </div>
+95 -127
View File
@@ -1,145 +1,113 @@
<style type="text/css"> <style>
.menu{ :root{
margin-left: 23px; --bg:#0f172a; --bg2:#1e293b; --card:#ffffff; --muted:#64748b;
margin-top: 50px; --text:#0f172a; --border:#e5e7eb; --primary:#16a34a; --radius:14px;
} }
.f18 { *{box-sizing:border-box}
font-size: 18pt; body{margin:0;background:#f1f5f9!important;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;color:var(--text);}
/* ASCUNDE VECHIUL */
#header, #mtop, #dynamic_header, img#msfilter, .footer-stopper, #side_info,
#footer, .footer, #ce, div[style*="TRAVIANGAMES"], .copyright {display:none !important;}
.wrapper{max-width:1100px;margin:0 auto!important;padding:0 16px 20px!important;background:transparent!important;box-shadow:none!important;}
/* HEADER */
.tz-header{
max-width:1100px;margin:20px auto 0;padding:22px 24px;
background:linear-gradient(135deg,var(--bg),var(--bg2));
border-radius:18px;color:#fff;display:flex;align-items:center;gap:16px;
box-shadow:0 12px 30px rgba(2,6,23,.25);
} }
span.cc3 {position: absolute;right:10%} .tz-header svg{width:42px;height:42px;flex-shrink:0;}
span.cc2 {position: absolute;left:10%} .tz-header h1{margin:0;font-size:24px;letter-spacing:.3px;}
.tz-header p{margin:2px 0 0;color:#cbd5e1;font-size:13px;}
div.lbox {width: 280px; padding-left: 29px; padding-bottom: 15px;} /* FOOTER NOU */
div.rbox {width: 196px; padding-left: 10px; padding-bottom: 15px;} .tz-footer{
div.wholebox {width: 494px; padding-left: 29px; padding-bottom: 15px;} max-width:1100px;margin:30px auto 30px;padding:16px 20px;
div.wholebox div {float:none;} background:#fff;border:1px solid var(--border);border-radius:14px;
div.lbox ul, div.rbox ul {margin: 0 0 0 15px; padding: 0 15px 0 0;} display:flex;justify-content:space-between;align-items:center;gap:12px;
color:#64748b;font-size:13px;box-shadow:0 4px 14px rgba(0,0,0,.04);
}
.tz-footer b{color:#0f172a;}
@media(max-width:700px){.tz-footer{flex-direction:column;text-align:center;}}
#mid{display:grid!important;grid-template-columns:260px 1fr!important;gap:18px!important;margin:18px 0 0!important;background:transparent!important;}
#side_navi{background:var(--card)!important;border:1px solid var(--border)!important;border-radius:var(--radius)!important;padding:14px!important;height:fit-content!important;box-shadow:0 4px 14px rgba(0,0,0,.04)!important;}
#content.login{background:var(--card)!important;border:1px solid var(--border)!important;border-radius:var(--radius)!important;padding:22px!important;box-shadow:0 4px 14px rgba(0,0,0,.04)!important;float:none!important;width:auto!important;margin:0!important;}
.headline{text-align:center;margin:8px 0 18px;}
.headline .f18{font-size:22px!important;font-weight:700!important;color:#dc2626!important;}
.card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:16px;margin-bottom:14px;}
.btn{display:inline-block;background:var(--primary);color:#fff;border:0;padding:10px 18px;border-radius:10px;font-weight:600;cursor:pointer;text-decoration:none;box-shadow:0 6px 16px rgba(22,163,74,.2);}
.btn:hover{filter:brightness(1.05);}
.input{width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:10px;font-size:14px;background:#fff;}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;}
@media(max-width:900px){#mid{grid-template-columns:1fr!important;}.tz-header{margin:12px 16px 0;}}
/* STEPPER */
.stepper{display:flex;flex-direction:column;gap:8px;}
.step{display:flex!important;align-items:center!important;gap:10px!important;padding:8px 10px!important;border-radius:10px!important;color:#334155!important;position:static!important;}
.step .num{width:28px!important;height:28px!important;min-width:28px!important;border-radius:50%!important;display:flex!important;align-items:center!important;justify-content:center!important;background:#e2e8f0!important;color:#334155!important;font-weight:700!important;font-size:13px!important;position:static!important;}
.step.active{background:#ecfdf5!important;color:#065f46!important;}
.step.active .num{background:#16a34a!important;color:#fff!important;}
.step.done{color:#166534!important;}
.step.done .num{background:#bbf7d0!important;color:#166534!important;}
</style> </style>
<script>
document.addEventListener('DOMContentLoaded',function(){
// HEADER
var h = document.createElement('div');
h.className = 'tz-header';
h.innerHTML = `
<svg viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M32 4L8 14v14c0 13.5 9.3 26.1 24 30 14.7-3.9 24-16.5 24-30V14L32 4z" fill="url(#g)"/>
<path d="M32 8l20 8v12c0 11.2-7.7 21.7-20 25-12.3-3.3-20-13.8-20-25V16l20-8z" fill="#16a34a" opacity=".9"/>
<path d="M26 32l5 5 11-11" stroke="white" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
<defs><linearGradient id="g" x1="8" y1="4" x2="56" y2="58"><stop stop-color="#22c55e"/><stop offset="1" stop-color="#0f172a"/></linearGradient></defs>
</svg>
<div><h1>TravianZ Installation</h1><p>Setup wizard v.9.0 Incremental Refactor</p></div>
`;
var wrap = document.querySelector('.wrapper');
if(wrap) wrap.parentNode.insertBefore(h, wrap);
// FOOTER
var f = document.createElement('div');
f.className = 'tz-footer';
f.innerHTML = `<div>© 2010 - 2026 TravianZ All rights reserved</div><div>Server running on <b>v.9.0 Incremental Refactor</b></div>`;
document.body.appendChild(f);
// curăță resturi vechi
document.querySelectorAll('img, div, footer').forEach(el=>{
if(el.textContent && el.textContent.includes('TRAVIANGAMES')) el.style.display='none';
});
});
</script>
<?php <?php
class IHG_Progressbar { class IHG_Progressbar {
protected $bar_id; protected $max_ticks; protected $ticks; protected $label;
protected $bar_id; public function __construct($max_ticks, $label = 'Step %d from %d') {
$this->bar_id = uniqid('pb'); $this->label = $label;
protected $max_ticks; $this->max_ticks = $max_ticks; $this->ticks = 0;
protected $ticks;
protected $label;
public function __construct($max_ticks, $label = '%d van %d') {
$this->bar_id = uniqid('progressbar');
$this->label = $label;
$this->max_ticks = $max_ticks;
$this->ticks = 0;
} }
public function tick(){ $this->ticks++; $this->draw_progress(); }
public function tick() { public function draw(){ $this->draw_bar(); $this->draw_progress(); }
$this->ticks++;
$this->draw_progress();
}
public function draw() {
$this->draw_bar();
$this->draw_progress();
}
static public function draw_css(){ static public function draw_css(){
echo ' echo '<style>.ihg_wrap{margin:8px 0 18px}.ihg_bar{height:10px;background:#e5e7eb;border-radius:999px;overflow:hidden}.ihg_fill{height:100%;width:0;background:linear-gradient(90deg,#22c55e,#16a34a);transition:width .3s}.ihg_lab{font-size:12px;color:#64748b;margin-top:6px;text-align:center}</style>';
<style type="text/css">
.ihg_progress_bar {
display: block;
width: 500px;
height: 20px;
border: 1px solid gray;
padding: 1px;
margin: 3px auto;
position: relative;
} }
.ihg_progress_ticks {
display: block;
position: absolute;
background-color: orange;
width: 0;
height: 20px;
overflow: hidden;
}
.ihg_progress_label_a,
.ihg_progress_label_b {
display: block;
position: absolute;
width: 500px;
height: 20px;
text-align: center;
}
.ihg_progress_label_a {
color: black;
}
.ihg_progress_label_b {
color: white;
}
</style>
';
}
protected function draw_bar(){ protected function draw_bar(){
echo ' echo '<div class="ihg_wrap"><div class="ihg_bar"><div class="ihg_fill" id="'.$this->bar_id.'"></div></div><div class="ihg_lab" id="'.$this->bar_id.'_l"></div></div>';
<div class="ihg_progress_bar"> echo '<script>(function(){var b=document.getElementById("'.$this->bar_id.'"),l=document.getElementById("'.$this->bar_id.'_l");window["'.$this->bar_id.'"]=function(w,t){b.style.width=w+"%";l.textContent=t}})();</script>';
<span class="ihg_progress_label_a" id="' . $this->bar_id . '_label_a"></span>
<div class="ihg_progress_ticks" id="' . $this->bar_id . '">
<span class="ihg_progress_label_b" id="' . $this->bar_id . '_label_b"></span>
</div>
</div>
';
echo '
<script type="text/javascript">
(function() {
var bar = document.getElementById("' . $this->bar_id . '");
var label_a = document.getElementById("' . $this->bar_id . '_label_a");
var label_b = document.getElementById("' . $this->bar_id . '_label_b");
window["' . $this->bar_id . '"] = function(width, label) {
bar.style.width = width + "%";
label_a.innerHTML = label;
label_b.innerHTML = label;
}
})();
</script>
';
$this->flush(); $this->flush();
} }
protected function draw_progress(){ protected function draw_progress(){
$w = round($this->ticks/$this->max_ticks*100,2);
$width = round($this->ticks / $this->max_ticks * 100, 2); $t = sprintf($this->label,$this->ticks,$this->max_ticks);
$label = sprintf($this->label, $this->ticks, $this->max_ticks); echo '<script>window["'.$this->bar_id.'"]("'.$w.'","'.addslashes($t).'");</script>'; $this->flush();
echo '
<script type="text/javascript">
window["' . $this->bar_id . '"]("' . $width . '", "' . addslashes($label) . '");
</script>
';
$this->flush();
}
protected function flush() {
while(ob_get_level() > 0) {
ob_end_flush();
}
flush();
} }
protected function flush(){ while(ob_get_level()>0){ob_end_flush();} flush(); }
} }
?> ?>
+32 -173
View File
@@ -3,200 +3,59 @@
################################################################################# #################################################################################
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
## --------------------------------------------------------------------------- ## ## --------------------------------------------------------------------------- ##
## Filename : wdata.tpl ##
## Type : Install Panel Frontend & Backend ##
## --------------------------------------------------------------------------- ##
## Developed by : Dzoki (Original) ##
## Refactored by : Shadow ##
## Redesign by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ## ## Project : TravianZ ##
## Filename dataform.php ## ## GitHub : https://github.com/Shadowss/TravianZ ##
## Developed by: Dzoki ## ## --------------------------------------------------------------------------- ##
## License : TravianZ Project ## ## License : TravianZ Project ##
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## ## Copyright : TravianZ (c) 2010-2025. All rights reserved. ##
## URLs: https://travianz.org ## ## --------------------------------------------------------------------------- ##
## https://github.com/Shadowss/TravianZ ##
## ##
################################################################################# #################################################################################
?>
<?php
// install/wdata.tpl
include_once('../GameEngine/config.php'); include_once('../GameEngine/config.php');
if (isset($_GET['c']) && $_GET['c'] == '1') { if (isset($_GET['c']) && $_GET['c'] == '1') {
echo '<br /><hr /><br /><div class="headline"><span class="f10 c5">Error creating wdata. Check configuration or file.</span></div><br><br>'; echo '<div class="card" style="background:#fef2f2;border-color:#fecaca;color:#991b1b;">Error creating wdata. Check configuration or file.</div>';
} }
if (isset($_GET['err']) && $_GET['err'] == '1') { if (isset($_GET['err']) && $_GET['err'] == '1') {
echo '<br /><hr /><br /><div class="headline"><span class="f10 c5">Existing World Data found in the database! Please empty tables <i>' echo '<div class="card" style="background:#fef2f2;border-color:#fecaca;color:#991b1b;">Existing World Data found! Empty tables <i>'.TB_PREFIX.'odata, '.TB_PREFIX.'units, '.TB_PREFIX.'vdata, '.TB_PREFIX.'wdata</i>.</div>';
. TB_PREFIX . 'odata, ' . TB_PREFIX . 'units, ' . TB_PREFIX . 'vdata, ' . TB_PREFIX . 'wdata</i> before continuing.</span></div><br /><br />';
} }
$autoStartCroppers = isset($_GET['startCroppers']) && $_GET['startCroppers'] === '1'; $autoStartCroppers = isset($_GET['startCroppers']) && $_GET['startCroppers'] === '1';
?> ?>
<form action="process.php" method="post" id="dataform"> <form action="process.php" method="post" id="dataform">
<input type="hidden" name="subwdata" value="1" /> <input type="hidden" name="subwdata" value="1" />
<div class="card">
<p>
<span class="f10 c">Create World Data</span> <span class="f10 c">Create World Data</span>
<p style="color:#475569;"><b>Warning</b>: This can take some time. Please wait until the next page has been loaded.</p>
<table> <div id="submitWrap" style="display:<?php echo $autoStartCroppers?'none':'block';?>;text-align:center;">
<tr> <button class="btn" id="Submit" onclick="return proceed()">Create World...</button>
<td>
<b>Warning</b>: This can take some time. Please wait until the next page has been loaded.
Click Create to proceed...
<br /><br />
<!-- Submit block (hidden when autoStartCroppers=1) -->
<div id="submitWrap" style="display:<?php echo $autoStartCroppers ? 'none' : 'block'; ?>;">
<center>
<input type="submit" name="Submit" id="Submit" value="Create..." onClick="return proceed()" />
<br /><br />
</center>
</div> </div>
<!-- Progress UI (shown when startCroppers=1) --> <div id="progressBox" style="display:<?php echo $autoStartCroppers?'block':'none';?>;">
<div id="progressBox" style="display:<?php echo $autoStartCroppers ? 'block' : 'none'; ?>; margin-top:20px;"> <div style="font-weight:600;margin:10px 0;">Building croppers…</div>
<div style="font-weight:bold;margin-bottom:6px;">Building croppers…</div> <div style="background:#e5e7eb;border-radius:999px;overflow:hidden;height:12px;max-width:600px;">
<div id="pbar" style="background:linear-gradient(90deg,#f59e0b,#f97316);height:100%;width:0%;transition:width .2s;"></div>
<div style="background:#ddd;border-radius:8px;overflow:hidden;height:20px;max-width:500px;">
<!-- Orange bar to match Travian vibes -->
<div id="pbar" style="background:#f6a21a;height:100%;width:0%;transition:width .2s;"></div>
</div> </div>
<div id="pinfo" style="margin-top:6px;font-size:13px;color:#475569;">Starting…</div>
<div id="pinfo" style="margin-top:6px;font-size:13px;color:#333;">Starting…</div> <pre id="plog" style="margin-top:10px;background:#0f172a;color:#e2e8f0;border-radius:10px;padding:10px;font-size:12px;max-height:200px;overflow:auto;"></pre>
<div id="autoNext" style="display:none;margin-top:10px;color:#166534;font-weight:600;">Proceeding to next step in <b id="cd">3</b>…</div>
<pre id="plog" style="margin-top:10px;background:#f9f9f9;border:1px solid #ddd;border-radius:8px;padding:8px;font-size:12px;max-height:200px;overflow:auto;"></pre>
<!-- Continue button appears on completion -->
<div id="autoNext" style="display:none;margin-top:10px;">
Proceeding to next step in <b id="cd">3</b>…
</div> </div>
</div> </div>
</form>
<script><?php include('wdata_js_here_if_needed'); ?></script>
<!-- păstrezi scriptul tău JS de mai jos exact cum era -->
<script> <script>
(function () { (function () {
var NEXT_URL = 'index.php?s=4'; // your next step var NEXT_URL = 'index.php?s=4'; var COUNTDOWN_SECS = 3; var finished = false;
var COUNTDOWN_SECS = 3; function startCountdown(){var box=document.getElementById('autoNext'),cd=document.getElementById('cd'),left=COUNTDOWN_SECS;box.style.display='block';cd.textContent=left;var t=setInterval(function(){left--;cd.textContent=left;if(left<=0){clearInterval(t);window.location.href=NEXT_URL}},1000)}
var finished = false; function startCroppersBuild(){var box=document.getElementById('progressBox'),pbar=document.getElementById('pbar'),pinfo=document.getElementById('pinfo'),plog=document.getElementById('plog'),submitWrap=document.getElementById('submitWrap');if(submitWrap)submitWrap.style.display='none';box.style.display='block';if(!('EventSource'in window)){plog.textContent+="Browser no SSE\n";return}var MAX=3,retries=0,es=new EventSource('ajax_croppers.php');es.onopen=function(){if(!finished&&retries>0){plog.textContent+="Reconnected\n"}};es.onmessage=function(e){if(!e.data||e.data.charCodeAt(0)!==123)return;try{var d=JSON.parse(e.data),pct=d.pct|0,done=d.done|0,total=d.total|0;if(finished)return;retries=0;pbar.style.width=pct+'%';pinfo.textContent=done+' / '+total+' ('+pct+'%)';if(d.msg){plog.textContent+=d.msg+"\n";plog.scrollTop=plog.scrollHeight}if(pct>=100){finished=true;plog.textContent+="✅ Completed!\n";es.close();startCountdown()}if(d.error){finished=true;plog.textContent+="❌ "+(d.msg||"Error")+"\n";es.close();startCountdown()}}catch(err){}};es.onerror=function(){if(finished)return;retries++;plog.textContent+="⚠ hiccup ("+retries+"/"+MAX+")\n";if(retries>=MAX){finished=true;plog.textContent+="❌ Too many failures\n";es.close();startCountdown()}}}
document.addEventListener('DOMContentLoaded',function(){<?php if($autoStartCroppers){echo 'startCroppersBuild();';} ?>});
function startCountdown() {
var box = document.getElementById('autoNext');
var cdEl = document.getElementById('cd');
var left = COUNTDOWN_SECS;
box.style.display = 'block';
cdEl.textContent = left;
var t = setInterval(function () {
left--;
cdEl.textContent = left;
if (left <= 0) {
clearInterval(t);
window.location.href = NEXT_URL;
}
}, 1000);
}
function startCroppersBuild() {
var box = document.getElementById('progressBox');
var pbar = document.getElementById('pbar');
var pinfo= document.getElementById('pinfo');
var plog = document.getElementById('plog');
var submitWrap = document.getElementById('submitWrap');
if (submitWrap) submitWrap.style.display = 'none';
box.style.display = 'block';
if (!('EventSource' in window)) {
plog.textContent += "Your browser does not support live progress.\n";
return;
}
var MAX_RETRIES = 3;
var retries = 0;
var es = new EventSource('ajax_croppers.php');
es.onopen = function () {
// When a connection (re)opens and we had errors before, log a small note
if (!finished && retries > 0) {
plog.textContent += "Reconnected to server.\n";
plog.scrollTop = plog.scrollHeight;
}
};
es.onmessage = function (e) {
// Ignore non-JSON messages (pings / blanks)
if (!e.data || e.data.charCodeAt(0) !== 123 /* '{' */) return;
try {
var d = JSON.parse(e.data);
var pct = (d.pct || 0) | 0;
var done = (d.done || 0) | 0;
var total = (d.total|| 0) | 0;
// If we've already finished, ignore further events
if (finished) return;
// Valid data received -> reset retry counter
retries = 0;
pbar.style.width = pct + '%';
pinfo.textContent = done + ' / ' + total + ' (' + pct + '%)';
if (d.msg) {
plog.textContent += d.msg + "\n";
plog.scrollTop = plog.scrollHeight;
}
if (pct >= 100) {
finished = true;
plog.textContent += "✅ Completed!\n";
plog.scrollTop = plog.scrollHeight;
es.close();
startCountdown();
}
// Optional: handle explicit error flag from server if you ever send it
if (d.error) {
finished = true;
plog.textContent += "❌ " + (d.msg || "Server reported an error.") + "\n";
plog.scrollTop = plog.scrollHeight;
es.close();
startCountdown();
}
} catch (err) {
// Silently ignore parsing problems now that we guard by '{'
// plog.textContent += "Parse error.\n";
}
};
es.onerror = function () {
// Dont spam after were done
if (finished) return;
retries++;
plog.textContent += "⚠ Connection hiccup (" + retries + "/" + MAX_RETRIES + "), retrying…\n";
plog.scrollTop = plog.scrollHeight;
// EventSource will auto-reconnect by itself; we just decide when to give up
if (retries >= MAX_RETRIES) {
finished = true;
plog.textContent += "❌ Too many connection failures — skipping croppers build.\n";
plog.scrollTop = plog.scrollHeight;
es.close();
// Reuse the same countdown UI to move on
startCountdown();
}
};
}
document.addEventListener('DOMContentLoaded', function () {
<?php if ($autoStartCroppers) { echo 'startCroppersBuild();'; } ?>
});
})(); })();
</script> </script>
</td>
</tr>
</table>
</p>
</form>
</div>