diff --git a/Admin/Templates/add_village.tpl b/Admin/Templates/add_village.tpl index 767b54e5..721eda53 100644 --- a/Admin/Templates/add_village.tpl +++ b/Admin/Templates/add_village.tpl @@ -19,44 +19,78 @@ ################################################################################# ?>
- +
- - - + + - + - + + + +
Add Village
Coordinates (X|Y)
- X: - > -
+ Coordinates (X|Y) +
- Y: - > - +
+ + > +
+
- - +
+ + > +
+
+
+ +
+
diff --git a/Admin/Templates/player.tpl b/Admin/Templates/player.tpl index f8de7ddb..1b38bc8d 100644 --- a/Admin/Templates/player.tpl +++ b/Admin/Templates/player.tpl @@ -97,10 +97,14 @@ if($deletion){ include("playermedals.tpl"); include ("villages.tpl"); ?> -
-
-
-
+
+
+ +
+
+ +
+
getUserActive(); ?> diff --git a/Templates/Profile/medal.php b/Templates/Profile/medal.php index 01955c36..ccf8deea 100644 --- a/Templates/Profile/medal.php +++ b/Templates/Profile/medal.php @@ -64,14 +64,135 @@ $profiel = preg_replace("/\[#TEAM]/is",'', $profiel, 1); } -// WW Winner IMAGES - MUST TO BE SET FROM ADMIN PANEL @iopietro must code -// Added by Shadow - cata7007@gmail.com / Skype : cata7007 -if($displayarray['username'] == "Shadow"){ -$profiel = preg_replace("/\[#WWBUILDER]/is",'', $profiel, 1); -$profiel = preg_replace("/\[#WINNERWW]/is",'', $profiel, 1); -$profiel = preg_replace("/\[#OFFENSIVE]/is",'', $profiel, 1); -$profiel = preg_replace("/\[#DEFENSIVE]/is",'', $profiel, 1); -$profiel = preg_replace("/\[#POPULATION]/is",'', $profiel, 1); +// ========================= +// NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM - DYNAMIC +// ========================= +if(defined('NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM') && NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM){ + + $uid = (int)$displayarray['id']; + $username = htmlspecialchars($displayarray['username'], ENT_QUOTES); + $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 .= "Type:{$type}Artefact:{$aname}"; + } + + $tip = "{$arts}
Name:{$username}
Tribe:{$tribeName}
Category:Artefact Holder
"; + + return ""; + }, $profiel); + + // [#WWBUILDER] + if($wwLevel > 0){ + $tip = "
Name:{$username}
Tribe:{$tribeName}
Category:World Wonder
Village:{$wwName}
WW Level:{$wwLevel}
"; + $profiel = preg_replace("/\[#WWBUILDER\]/is","", + $profiel); + } else { + $profiel = str_replace("[#WWBUILDER]", "", $profiel); + } + + // [#WINNERWW] + if($wwLevel >= 100){ + $tip = "
Name:{$username}
Tribe:{$tribeName}
Category:Winner
WW Level:100
"; + $profiel = preg_replace("/\[#WINNERWW\]/is", + "", + $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 = "
Name:{$username}
Tribe:{$tribeName}
Category:Great Store
Village:{$gsVillage}
Great Warehouse:20
Great Granary:20
"; + $profiel = str_replace("[#GREATSTORE]", "", $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 = "
Name:{$username}
Tribe:{$tribeName}
Category:Hero Level
Level:{$heroLvl}
"; + $profiel = str_replace("[#HERO100]", "", $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 = "
Name:{$username}
Tribe:{$tribeName}
Category:Wall Master
Walls level 20:{$wallCount}
"; + $profiel = str_replace("[#WALLMASTER]", "", $profiel); + } else { + $profiel = str_replace("[#WALLMASTER]", "", $profiel); + } + } // Added by Shadow - cata7007@gmail.com / Skype : cata7007 diff --git a/Templates/Profile/profile.tpl b/Templates/Profile/profile.tpl index e50dc3b5..98251560 100644 --- a/Templates/Profile/profile.tpl +++ b/Templates/Profile/profile.tpl @@ -291,6 +291,107 @@ if(($session->userinfo['username'] ?? '') == "Shadow"){ echo "Shadow [#EVENT]"; } + +// ========================= +// 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 " + Artefact Holder + + + [#ARTEFACT] + "; + } + + // 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 " + WW Builder + + + [#WWBUILDER] + "; + + $lvl = (int)$ww->fetch_assoc()['f99']; + if($lvl >= 100){ + echo " + WW Winner + + + [#WINNERWW] + "; + } + } + + // 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 " + Great Store + + + [#GREATSTORE] + "; + } + + // 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 " + Wall Master + + + [#WALLMASTER] + "; + } + + // 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 " + Hero 99+ + + + [#HERO100] + "; + } +} ?> diff --git a/gpack/travian_default/img/gloriamedals/artifact.png b/gpack/travian_default/img/gloriamedals/artifact.png new file mode 100644 index 00000000..7259790f Binary files /dev/null and b/gpack/travian_default/img/gloriamedals/artifact.png differ diff --git a/gpack/travian_default/img/gloriamedals/greatstore.png b/gpack/travian_default/img/gloriamedals/greatstore.png new file mode 100644 index 00000000..2ae0cb06 Binary files /dev/null and b/gpack/travian_default/img/gloriamedals/greatstore.png differ diff --git a/gpack/travian_default/img/gloriamedals/hero.png b/gpack/travian_default/img/gloriamedals/hero.png new file mode 100644 index 00000000..d6139c6e Binary files /dev/null and b/gpack/travian_default/img/gloriamedals/hero.png differ diff --git a/gpack/travian_default/img/gloriamedals/wallmaster.png b/gpack/travian_default/img/gloriamedals/wallmaster.png new file mode 100644 index 00000000..cf80a14c Binary files /dev/null and b/gpack/travian_default/img/gloriamedals/wallmaster.png differ diff --git a/gpack/travian_default/img/gloriamedals/ww_builder.png b/gpack/travian_default/img/gloriamedals/ww_builder.png new file mode 100644 index 00000000..1426f8e6 Binary files /dev/null and b/gpack/travian_default/img/gloriamedals/ww_builder.png differ diff --git a/gpack/travian_default/img/gloriamedals/ww_winner.png b/gpack/travian_default/img/gloriamedals/ww_winner.png new file mode 100644 index 00000000..ec474b3b Binary files /dev/null and b/gpack/travian_default/img/gloriamedals/ww_winner.png differ diff --git a/install/data/constant_format.tpl b/install/data/constant_format.tpl index ce1c437c..5221def8 100644 --- a/install/data/constant_format.tpl +++ b/install/data/constant_format.tpl @@ -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_5YEAR", %NEW_FUNCTIONS_MEDAL_5YEAR%); define("NEW_FUNCTIONS_MEDAL_10YEAR", %NEW_FUNCTIONS_MEDAL_10YEAR%); +define("NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM", %NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM%); ////////////////////////////////////////// diff --git a/install/process.php b/install/process.php index 78dfc160..3956fc72 100644 --- a/install/process.php +++ b/install/process.php @@ -168,6 +168,7 @@ class Process { $findReplace["%NEW_FUNCTIONS_MEDAL_3YEAR%"] = $_POST['new_functions_medal_3year']; $findReplace["%NEW_FUNCTIONS_MEDAL_5YEAR%"] = $_POST['new_functions_medal_5year']; $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)); diff --git a/install/templates/accounts.tpl b/install/templates/accounts.tpl index df56b5c1..6494d18c 100644 --- a/install/templates/accounts.tpl +++ b/install/templates/accounts.tpl @@ -1,106 +1,84 @@

At least Multihunter & Support password are required in this form.


"; + echo '
At least Multihunter & Support password are required.
'; } - if(isset($_GET['err']) && $_GET['err'] == 2) { - echo "


Natars is a reserved username for an in-game NPC tribe. Please choose a different admin username.


"; + echo '
Natars is reserved. Choose different admin username.
'; } - ?> - +
+
+ Multihunter account +
+
+
+
+
+
+ Support account +
+
+
+
+
+
-

- Multihunter account - - - - -
Name:
Password:
Note: Rember this password! You need it for the Admin
-

- -

- Support account - - - - -
Name:
Password:
Note: Rember this password! You need it for the Admin
-

- -

- Admin account - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Admin name:
Admin email:
Admin password:
Admin tribe: - -
Show admin in stats: - -
Include Support Messages in Admin Mailbox: - -
Allow Administrative Accounts to be Raided and Attacked: - -
Note: this will add a first user and will set them up as an Admin
Note: you can leave this section empty, if you want
-

- -
-
-
- - +
+ Admin account +
+
+
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+

Note: leave empty if you want to skip admin creation.

+
+ +
+
+ \ No newline at end of file diff --git a/install/templates/config.tpl b/install/templates/config.tpl index cb993566..33d0702e 100644 --- a/install/templates/config.tpl +++ b/install/templates/config.tpl @@ -3,14 +3,20 @@ ################################################################################# ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## -## Project: TravianZ ## -## Filename config.php ## -## Developed by: Dzoki ## -## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## -## URLs: https://travianz.org ## -## https://github.com/Shadowss/TravianZ ## -## ## +## Filename : config.tpl ## +## Type : Install Panel Frontend & Backend ## +## --------------------------------------------------------------------------- ## +## Developed by : Dzoki (Original) ## +## Refactored by : Shadow ## +## Redesign by : Shadow ## +## --------------------------------------------------------------------------- ## +## Contact : cata7007@gmail.com ## +## Project : TravianZ ## +## GitHub : https://github.com/Shadowss/TravianZ ## +## --------------------------------------------------------------------------- ## +## License : TravianZ Project ## +## Copyright : TravianZ (c) 2010-2025. All rights reserved. ## +## --------------------------------------------------------------------------- ## ################################################################################# if(isset($_GET['c']) && $_GET['c'] == 1) { @@ -19,7 +25,7 @@ echo "
Error creating constant.php @session_start(); -$envPath = dirname(__DIR__, 2) . '/.env'; +$envPath = dirname(__DIR__, 2). '/.env'; $envDefaults = []; if(file_exists($envPath)) { $lines = @file($envPath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); @@ -54,777 +60,231 @@ if(file_exists($envPath)) { $ref = $m[1]; if(isset($envDefaults[$ref])) return $envDefaults[$ref]; $fromEnv = getenv($ref); - return ($fromEnv !== false) ? $fromEnv : ''; + return ($fromEnv!== false)? $fromEnv : ''; }, $value); } } } -$dbHost = $envDefaults['DB_HOST'] ?? 'localhost'; -$dbPort = $envDefaults['DB_PORT'] ?? '3306'; -$dbUser = $envDefaults['MARIADB_USER'] ?? ($envDefaults['MYSQL_USER'] ?? ''); -$dbPass = $envDefaults['MARIADB_PASSWORD'] ?? ($envDefaults['MYSQL_PASSWORD'] ?? ''); -$dbName = $envDefaults['MARIADB_DATABASE'] ?? ($envDefaults['MYSQL_DATABASE'] ?? ''); +$dbHost = $envDefaults['DB_HOST']?? 'localhost'; +$dbPort = $envDefaults['DB_PORT']?? '3306'; +$dbUser = $envDefaults['MARIADB_USER']?? ($envDefaults['MYSQL_USER']?? ''); +$dbPass = $envDefaults['MARIADB_PASSWORD']?? ($envDefaults['MYSQL_PASSWORD']?? ''); +$dbName = $envDefaults['MARIADB_DATABASE']?? ($envDefaults['MYSQL_DATABASE']?? ''); if(empty($_SESSION['install_random_prefix'])) { try { - $_SESSION['install_random_prefix'] = 's' . substr(bin2hex(random_bytes(2)), 0, 4) . '_'; + $_SESSION['install_random_prefix'] = 's'. substr(bin2hex(random_bytes(2)), 0, 4). '_'; } catch (Throwable $e) { - $_SESSION['install_random_prefix'] = 's' . str_pad((string) mt_rand(0, 9999), 4, '0', STR_PAD_LEFT) . '_'; + $_SESSION['install_random_prefix'] = 's'. str_pad((string) mt_rand(0, 9999), 4, '0', STR_PAD_LEFT). '_'; } } $dbPrefix = $_SESSION['install_random_prefix']; ?>
-

- SERVER RELATED - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Server name: - - -
- Server Timezone: - - -
- Server speed: - - -
- Troop speed: - - -
- Evasion speed: - - -
- Trader capacity (1 = 1x...): - - -
Cranny capacity:
Trapper capacity:
Natars Units Multiplier:
Natars Spawn (Days):
WW spawn (Days):
WW building plan spawn (Days):
World size: - -
Register Open: - -
Server:
Domain:
Homepage:
Language: - -
Beginners protection length: - -
Nature troops regeneration time: - -
Oasis wood production multiplier:
Oasis clay production multiplier:
Oasis iron production multiplier:
Oasis crop production multiplier:
Medal Interval: - -
Storage Multipler:
Tourn Threshold:
Great Workshop: - -
ww: - -
Show Natars in Statistics: - -
Peace system: - -
-

-

- NEW MECHANICS AND FUNCTIONS RELATED - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Display oasis in profile: - -
Alliance invitation message: - -
New Alliance & Embassy Mechanics: - -
New forum post message: - -
Tribes images in profile: - -
MHs images in profile: - -
Display artifact in profile: - -
Display wonder in profile: - -
Vacation Mode: - -
Catapult targets: - -
Manual on Nature and Natars: - -
Direct links placement: - -
Medal Veteran Player: - -
Medal Veteran Player 5a: - -
Medal Veteran Player 10a: - -
-

-

- SQL RELATED - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Hostname:
Port:
Username:
Password:
DB name:
Prefix:
Type: - -
-

- - -

- PLUS GOLD PACKAGES - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Your PayPal E-Mail Address: -
(must be either Business or Premier account)
 
Payment Currency: -
(your PayPal account must be able to receive this currency)
 
Package "A" Amount of Gold:
Package "A" Price:
 
Package "B" Amount of Gold:
Package "B" Price:
 
Package "C" Amount of Gold:
Package "C" Price:
 
Package "D" Amount of Gold:
Package "D" Price:
 
Package "E" Amount of Gold:
Package "E" Price:
 
Plus account length: - -
+25% production length: - -
-

-

- NEWSBOX OPTIONS - - - - - - - - - - - -
Newsbox 1: - -
Newsbox 2: - -
Newsbox 3: - -
-

-

- LOG RELATED (You should disable them) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Log Building: - -
Log Tech: - -
Log Login: - -
Log Gold: - -
Log Admin: - -
Log War: - -
Log Market: - -
Log Illegal: - -
Log : - -
-

-

- EXTRA OPTIONS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quest: - -
Quest Type: - -
Activate: - -
Limit Mailbox: - - (NOT DONE) -
Max mails: (NOT DONE)
Demolish - lvl required: - -
Village Expand: - -
Error Reporting: - -
T4 is Coming screen: - -
-

-
- Server Start Settings - - - - - - - - - -
Start Date:
Start Time:
-
- - -
-
+
+
+ SQL RELATED +
+
+
+
+
+
+
+
+
+
+
+ SERVER URLS +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ NEW MECHANICS AND FUNCTIONS +
+ + '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 " +
+ + +
"; +} +?>
+
+ +
+ PLUS GOLD PACKAGES +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ NEWSBOX OPTIONS +
+
+
+
+
+
+
+ LOG RELATED (You should disable them) +
+
+
+
+
+
+
+
+
+
+
+
+ +
+ EXTRA OPTIONS +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ +
+ \ No newline at end of file diff --git a/install/templates/dataform.tpl b/install/templates/dataform.tpl index 90bb29b5..3a4c6196 100644 --- a/install/templates/dataform.tpl +++ b/install/templates/dataform.tpl @@ -3,50 +3,37 @@ ################################################################################# ## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ## ## --------------------------------------------------------------------------- ## -## Project: TravianZ ## -## Filename dataform.php ## -## Developed by: Dzoki ## -## License: TravianZ Project ## -## Copyright: TravianZ (c) 2010-2026. All rights reserved. ## -## URLs: https://travianz.org ## -## https://github.com/Shadowss/TravianZ ## -## ## +## Filename : dataform.tpl ## +## Type : Install Panel Frontend & Backend ## +## --------------------------------------------------------------------------- ## +## Developed by : Dzoki (Original) ## +## Refactored by : Shadow ## +## Redesign by : Shadow ## +## --------------------------------------------------------------------------- ## +## Contact : cata7007@gmail.com ## +## Project : TravianZ ## +## GitHub : https://github.com/Shadowss/TravianZ ## +## --------------------------------------------------------------------------- ## +## License : TravianZ Project ## +## Copyright : TravianZ (c) 2010-2025. All rights reserved. ## +## --------------------------------------------------------------------------- ## ################################################################################# include_once('../GameEngine/config.php'); - if(isset($_GET['c']) && $_GET['c'] == 1) { - echo "
Error importing database. Check configuration.

"; + echo '
Error importing database. Check configuration.
'; } - if(isset($_GET['err']) && $_GET['err'] == 1) { - echo "


Existing structure was found in the database! Please remove old game tables with the ".TB_PREFIX." prefix from the '".SQL_DB."' database before continuing.


"; + echo '
Existing structure found! Please remove tables with prefix '.TB_PREFIX.' from database '.SQL_DB.'.
'; } ?>
- - -

- Create Database Structure - - - - - - - - -
- Warning: This can take some time. Please wait until the next page has been loaded. Click Create to proceed... -
-
-
-
- -
-
-
-
-

-
-
+ +
+ Create Database Structure +

Warning: This can take some time. Please wait until the next page loads.

+
+ +
+
+ \ No newline at end of file diff --git a/install/templates/end.tpl b/install/templates/end.tpl index 1228d469..f7c3619e 100755 --- a/install/templates/end.tpl +++ b/install/templates/end.tpl @@ -1,57 +1,61 @@ - -

-Thanks for installing TravianZ. -

Please remove/rename the installation folder.

-All the files are placed. The database is created, so you can now start playing on your own Travian. -

- - - - - - -

-

> My TravianZ homepage <
-

-
-
-

Please support our developers and donate.

-
-
- - - - -
-
+include("../GameEngine/config.php"); $time=time(); @rename("../install/","../installed_".$time); @touch('../var/installed'); ?> +
+

🎉 Installation Complete!

+

Thanks for installing TravianZ. Please remove the install folder.

+
+ rm -R install
+ chmod -R 755 GameEngine
+ chmod -R 777 GameEngine/Prevention
+ chmod -R 777 GameEngine/Notes
+ chmod -R 777 var/log +
+
Go to Homepage →
+ +
+

🚀 Next Steps

+
+
+ 🔒 Secure Your Server +

Protect /Admin with .htpasswd, enable HTTPS, and set cronjobs for automated tasks.

+
+
+ 📖 Read the Docs +

Learn about speed settings, Natars, and world configuration in the GitHub Wiki.

+
+
+ 💬 Join Community +

Get help, share mods, and report bugs on GitHub Discussions.

+
+
+ ⭐ Star on GitHub +

If you like TravianZ, star the repo to support the project.

+
+
+
+ GitHub + Documentation + Contact Support +
+
\ No newline at end of file diff --git a/install/templates/greet.tpl b/install/templates/greet.tpl index 06a3283e..f2a3763a 100644 --- a/install/templates/greet.tpl +++ b/install/templates/greet.tpl @@ -1,51 +1,40 @@ - -
- -

  Disclaimer

- - - -
- - - - -
- TravianZ Team -
-
- -
-
- -
-
- +
+

⚠️ Disclaimer

+
+ +
+
+

🐧 Before Installation (Linux)

+
+ chmod -R 777 install
chmod -R 777 GameEngine +
+
+
+

✅ After Installation

+
+ rm -R install
+ chmod -R 755 GameEngine
+ chmod -R 777 GameEngine/Prevention
+ chmod -R 777 GameEngine/Notes
+ chmod -R 777 var/log +
+
+
+ +
+ 🔒 Protect /Admin with password protect directory (.htaccess). +
+ +
+ Next → +
TravianZ Team
+
\ No newline at end of file diff --git a/install/templates/menu.tpl b/install/templates/menu.tpl index 821f4f6e..e7816279 100644 --- a/install/templates/menu.tpl +++ b/install/templates/menu.tpl @@ -1,38 +1,30 @@ - \ No newline at end of file diff --git a/install/templates/script.tpl b/install/templates/script.tpl index 26c9141f..4dd5daeb 100644 --- a/install/templates/script.tpl +++ b/install/templates/script.tpl @@ -1,145 +1,113 @@ - + + 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 draw() { - $this->draw_bar(); - $this->draw_progress(); - } - - static public function draw_css() { - echo ' - - '; - } - - protected function draw_bar() { - echo ' -
- -
- -
-
- '; - echo ' - - '; - - $this->flush(); - } - - protected function draw_progress() { - - $width = round($this->ticks / $this->max_ticks * 100, 2); - $label = sprintf($this->label, $this->ticks, $this->max_ticks); - - echo ' - - - '; - $this->flush(); - } - - protected function flush() { - while(ob_get_level() > 0) { - ob_end_flush(); - } - - flush(); - } + protected $bar_id; protected $max_ticks; protected $ticks; protected $label; + public function __construct($max_ticks, $label = 'Step %d from %d') { + $this->bar_id = uniqid('pb'); $this->label = $label; + $this->max_ticks = $max_ticks; $this->ticks = 0; + } + public function tick(){ $this->ticks++; $this->draw_progress(); } + public function draw(){ $this->draw_bar(); $this->draw_progress(); } + static public function draw_css(){ + echo ''; + } + protected function draw_bar(){ + echo '
'; + echo ''; + $this->flush(); + } + protected function draw_progress(){ + $w = round($this->ticks/$this->max_ticks*100,2); + $t = sprintf($this->label,$this->ticks,$this->max_ticks); + echo ''; $this->flush(); + } + protected function flush(){ while(ob_get_level()>0){ob_end_flush();} flush(); } } ?> \ No newline at end of file diff --git a/install/templates/wdata.tpl b/install/templates/wdata.tpl index cd8c3754..4a3f21a2 100644 --- a/install/templates/wdata.tpl +++ b/install/templates/wdata.tpl @@ -1,202 +1,61 @@ - - -

Error creating wdata. Check configuration or file.


'; + echo '
Error creating wdata. Check configuration or file.
'; } if (isset($_GET['err']) && $_GET['err'] == '1') { - echo '


Existing World Data found in the database! Please empty tables ' - . TB_PREFIX . 'odata, ' . TB_PREFIX . 'units, ' . TB_PREFIX . 'vdata, ' . TB_PREFIX . 'wdata before continuing.


'; + echo '
Existing World Data found! Empty tables '.TB_PREFIX.'odata, '.TB_PREFIX.'units, '.TB_PREFIX.'vdata, '.TB_PREFIX.'wdata.
'; } - $autoStartCroppers = isset($_GET['startCroppers']) && $_GET['startCroppers'] === '1'; ?> -
- - -

- Create World Data - - - - - -
- Warning: This can take some time. Please wait until the next page has been loaded. - Click Create to proceed... -

- - -
-
- -

-
-
- - -
-
Building croppers…
- -
- -
-
- -
Starting…
- -

-
-                        
-						
-                    
+ +
+ Create World Data +

Warning: This can take some time. Please wait until the next page has been loaded.

+ +
+ +
+
+
Building croppers…
+
+
+
+
Starting…
+

+      
+    
+
+ + + - - -
-

- - + \ No newline at end of file