diff --git a/Templates/Build/43.tpl b/Templates/Build/43.tpl
index 9435557a..577cbffa 100644
--- a/Templates/Build/43.tpl
+++ b/Templates/Build/43.tpl
@@ -27,6 +27,7 @@ $level = (int)$village->resarray['f'.$id];
$current = $level > 0 ? (int)$bid43[$level]['attri'] : 0;
?>
+
diff --git a/Templates/Build/44.tpl b/Templates/Build/44.tpl
index 8cce6a24..c270b231 100644
--- a/Templates/Build/44.tpl
+++ b/Templates/Build/44.tpl
@@ -7,7 +7,7 @@
## Type : BUILDING TEMPLATE ##
## --------------------------------------------------------------------------- ##
## Created by : Shadow ##
-## Designed by : Shadow ##
+## Developed by : Shadow ##
## --------------------------------------------------------------------------- ##
## Contact : cata7007@gmail.com ##
## Project : TravianZ ##
@@ -19,7 +19,70 @@
## --------------------------------------------------------------------------- ##
#################################################################################
-global $village, $id;
+global $village, $id, $session, $database, $building, $automation;
+
+if(time() - (!empty($_SESSION['time_p']) ? $_SESSION['time_p'] : 0) > 5){
+ $_SESSION['time_p'] = '';
+ $_SESSION['error_p'] = '';
+}
+// --- CHANGE CAPITAL LOGIC (Command Center = echivalentul Palatului la Huni) ---
+if($_POST && isset($_GET['action']) && $_GET['action'] == 'change_capital' && !$village->capital){
+ $pass = $_POST['pass'];
+ $query = mysqli_query($database->dblink, 'SELECT password FROM `'.TB_PREFIX.'users` WHERE `id` = '.(int)$session->uid);
+ $data = mysqli_fetch_assoc($query);
+ if(password_verify($pass, $data['password'])){
+ $query1 = mysqli_query($database->dblink, 'SELECT wref FROM `'.TB_PREFIX.'vdata` WHERE `owner` = '.(int)$session->uid.' AND `capital` = 1');
+ $data1 = mysqli_fetch_assoc($query1);
+ $oldWid = (int)$data1['wref'];
+ $newWid = (int)$village->wid;
+
+ if($oldWid != $newWid){
+ $query2 = mysqli_query($database->dblink, 'SELECT * FROM `'.TB_PREFIX.'fdata` WHERE `vref` = '.$oldWid);
+ $data2 = mysqli_fetch_assoc($query2);
+ $query3 = mysqli_query($database->dblink, 'SELECT * FROM `'.TB_PREFIX.'fdata` WHERE `vref` = '.$newWid);
+ $data3 = mysqli_fetch_assoc($query3);
+
+ // 1. campurile de resurse ale vechii capitale coboara la nivel 10
+ for($i = 1; $i <= 18; ++$i){
+ if($data2['f'.$i] > 10){
+ mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'` = 10 WHERE `vref` = '.$oldWid);
+ }
+ }
+ // 2. sterge Stonemason's Lodge (34) din vechea capitala
+ for($i = 19; $i <= 40; ++$i){
+ if($data2['f'.$i.'t'] == 34){
+ mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'t` = 0, `f'.$i.'` = 0 WHERE `vref` = '.$oldWid);
+ }
+ }
+ // 3. sterge cladirile capital-only din noua capitala
+ // (Great Barracks 29, Great Stable 30, Great Granary 38, Great Warehouse 39, Great Workshop 49)
+ $capitalOnly = [29,30,38,39,49];
+ for($i = 19; $i <= 40; ++$i){
+ if(in_array((int)$data3['f'.$i.'t'], $capitalOnly)){
+ mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'t` = 0, `f'.$i.'` = 0 WHERE `vref` = '.$newWid);
+ }
+ }
+
+ $database->changeCapital($oldWid, 0);
+ $database->changeCapital($newWid);
+
+ if(!isset($automation)){
+ include_once("GameEngine/Automation.php");
+ }
+ $automation->recountPop($oldWid, false);
+ $automation->recountPop($newWid, false);
+
+ header("location: build.php?gid=44");
+ exit;
+ }
+ }else{
+ $error = '
'.LOGIN_PW_ERROR.'';
+ $_SESSION['error_p'] = $error;
+ $_SESSION['time_p'] = time();
+ echo '';
+ exit;
+ }
+}
$level = (int)$village->resarray['f'.$id];
?>
@@ -32,10 +95,6 @@ $level = (int)$village->resarray['f'.$id];
- capital == 1):?>
-
-
-
= 10):?>
@@ -44,5 +103,24 @@ $level = (int)$village->resarray['f'.$id];
+ capital == 1) {
+ echo '
'.CAPITAL.'
';
+ } else {
+ if(empty($_GET['confirm'])) {
+ print '
» '.CHANGE_CAPITAL.'
';
+ } else {
+ print '
Are you sure, that you want to change your capital?
You can\'t undo this!
For security you must enter your password to confirm:
+
+';
+ }
+ }
+ ?>
+
\ No newline at end of file
diff --git a/Templates/Build/47.tpl b/Templates/Build/47.tpl
index 57eee5a3..e54ff324 100644
--- a/Templates/Build/47.tpl
+++ b/Templates/Build/47.tpl
@@ -27,6 +27,7 @@ $level = (int)$village->resarray['f'.$id];
$current = $level > 0 ? (int)$bid47[$level]['attri'] : 0;
?>
+
diff --git a/Templates/Build/50.tpl b/Templates/Build/50.tpl
index 44d1afbf..8ce9e971 100644
--- a/Templates/Build/50.tpl
+++ b/Templates/Build/50.tpl
@@ -27,6 +27,7 @@ $level = (int)$village->resarray['f'.$id];
$current = $level > 0 ? (int)$bid50[$level]['attri'] : 0;
?>
+
diff --git a/Templates/goldClub/trooplist.tpl b/Templates/goldClub/trooplist.tpl
index 0ef26f99..2af28fb9 100644
--- a/Templates/goldClub/trooplist.tpl
+++ b/Templates/goldClub/trooplist.tpl
@@ -1,14 +1,16 @@
tribe - 1) * 10 + 1;
-$end = $start + 5;
+$end = $session->tribe * 10;
/* build unit list once (keeps alignment safe) */
+global $unitsbytype;
$units = [];
for ($i = $start; $i <= $end; $i++) {
- if (in_array($i, [4, 14, 23])) {
+ // scoutii nu pot fi folositi in farmlist (generic pentru toate triburile)
+ if (in_array($i, $unitsbytype['scout'])) {
continue;
}
diff --git a/img/admin/admin_dark.css b/img/admin/admin_dark.css
new file mode 100644
index 00000000..b2c2d3c3
--- /dev/null
+++ b/img/admin/admin_dark.css
@@ -0,0 +1,65 @@
+/* =========================================================================
+ TravianZ Admin β Dark theme override
+ Loaded LAST in admin.php so it wins over admin.css / acp.css.
+ Scoped to body.app (the logged-in panel); login page keeps its own look.
+ Palette: page #0f172a Β· panel #0b1220 Β· border #1f2937 Β· header #111827
+ text #e2e8f0 Β· muted #94a3b8 Β· accent #f59e0b Β· link #7dd3fc
+ ========================================================================= */
+
+body.app{background:#0f172a;color:#e2e8f0}
+
+/* ---- layout containers from admin.css ---- */
+body.app #lmidall,body.app #lmidlc,body.app #lmid1,body.app #lmid2,
+body.app #lmid3,body.app #content,body.app .nb{background:transparent!important;color:#e2e8f0}
+body.app #lmid3 .nb{background:transparent!important}
+
+/* ---- side menu (overrides the white menu declared inline in admin.php) ---- */
+body.app #menu{background:#0b1220!important;border:1px solid #1f2937;box-shadow:0 4px 14px rgba(0,0,0,.45)}
+body.app #menu>li>a{color:#cbd5e1!important;border-left:3px solid transparent}
+body.app #menu>li>a:hover,body.app #menu>li>a.active{background:#111827!important;color:#fde68a!important;border-left-color:#f59e0b}
+body.app #menu li.sub>a:before{color:#f59e0b}
+body.app #menu li.sub ul{background:#0f172a!important}
+body.app #menu li.sub ul li a{color:#94a3b8!important}
+body.app #menu li.sub ul li a:hover,body.app #menu li.sub ul li a.active{color:#fde68a!important}
+
+/* ---- typography & links ---- */
+body.app h1,body.app h2,body.app h3,body.app h4{color:#f1f5f9}
+body.app a{color:#7dd3fc}
+body.app a:hover{color:#bae6fd}
+body.app hr{border:0;border-top:1px solid #1f2937}
+body.app fieldset{border:1px solid #1f2937;border-radius:8px}
+body.app legend{color:#f59e0b}
+
+/* ---- classic Travian tables (.tbg) + generic tables ---- */
+body.app table.tbg,body.app .tbg{background:#0b1220!important;color:#e2e8f0;border-color:#1f2937!important}
+body.app table.tbg th,body.app .tbg th{background:#111827!important;color:#94a3b8!important;border-color:#1f2937!important}
+body.app table.tbg td,body.app .tbg td{background:#0b1220!important;color:#e2e8f0;border-color:#1f2937!important}
+body.app table.tbg tr:hover td,body.app .tbg tr:hover td{background:#0f1a30!important}
+
+/* generic unclassed tables that some pages render via admin.css */
+body.app #lmid3 table:not([class]) th{background:#111827;color:#94a3b8;border-color:#1f2937}
+body.app #lmid3 table:not([class]) td{border-color:#1f2937}
+
+/* ---- form controls ---- */
+body.app input[type=text],body.app input[type=password],body.app input[type=number],
+body.app input[type=email],body.app input[type=search],body.app input[type=date],
+body.app input[type=datetime-local],body.app select,body.app textarea,body.app .fm{
+ background:#0b1220!important;color:#e2e8f0!important;border:1px solid #334155!important;
+ border-radius:5px;padding:5px 7px}
+body.app input::placeholder,body.app textarea::placeholder{color:#64748b}
+body.app input:focus,body.app select:focus,body.app textarea:focus{border-color:#f59e0b!important;outline:none}
+body.app select option{background:#0b1220;color:#e2e8f0}
+
+body.app input[type=submit],body.app input[type=button],body.app button,
+body.app .adminButton,body.app .button{
+ background:#f59e0b;color:#1a1a2e;border:0;border-radius:6px;padding:6px 14px;
+ cursor:pointer;font-weight:bold}
+body.app input[type=submit]:hover,body.app input[type=button]:hover,
+body.app button:hover,body.app .adminButton:hover,body.app .button:hover{background:#fbbf24}
+
+/* checkbox / radio accent */
+body.app input[type=checkbox],body.app input[type=radio]{accent-color:#f59e0b}
+
+/* medal mouseover tooltip layer (from admin.css) */
+body.app #medal_mouseover table{background:#0b1220;color:#e2e8f0;border:1px solid #1f2937}
+body.app #medal_mouseover table th{background:#111827;color:#94a3b8}