mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-08-15 07:41:00 +00:00
Make generated config instance-aware
This commit is contained in:
@@ -14,6 +14,37 @@
|
|||||||
## https://github.com/Shadowss/TravianZ ##
|
## https://github.com/Shadowss/TravianZ ##
|
||||||
#################################################################################
|
#################################################################################
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// Multi-instance bootstrap
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// config.php is generated from this template. The bootstrap resolves the
|
||||||
|
// current world before any server constants are defined.
|
||||||
|
//
|
||||||
|
// For a normal/default installation, execution continues in this file exactly
|
||||||
|
// as before. For s1/s2/etc., an instance-local config is loaded instead. The
|
||||||
|
// guard prevents that instance config from recursively loading itself.
|
||||||
|
require_once __DIR__ . '/../GameEngine/Instance/Bootstrap.php';
|
||||||
|
|
||||||
|
if (defined('TRAVIANZ_INSTANCE_ID')
|
||||||
|
&& TRAVIANZ_INSTANCE_ID !== 'default'
|
||||||
|
&& !defined('TRAVIANZ_LOADING_INSTANCE_CONFIG')) {
|
||||||
|
|
||||||
|
$instanceConfigPath = dirname(__DIR__) . '/instances/'
|
||||||
|
. TRAVIANZ_INSTANCE_ID . '/config.php';
|
||||||
|
|
||||||
|
if (is_file($instanceConfigPath)) {
|
||||||
|
define('TRAVIANZ_LOADING_INSTANCE_CONFIG', true);
|
||||||
|
require $instanceConfigPath;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Do not silently fall back to the default world. A request reaching an
|
||||||
|
// instance hostname without its configuration must fail safely rather than
|
||||||
|
// allowing s2.example.com to operate on the default database/settings.
|
||||||
|
http_response_code(503);
|
||||||
|
die('TravianZ instance configuration is missing for ' . htmlspecialchars(TRAVIANZ_INSTANCE_ID, ENT_QUOTES, 'UTF-8'));
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
// ***** ERROR REPORTING *****//
|
// ***** ERROR REPORTING *****//
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
@@ -172,7 +203,7 @@ define("PLUS_STATS_KEEP_DAYS", %PLUSSTATSKEEP%);
|
|||||||
// only letters and numbers are allowed.
|
// only letters and numbers are allowed.
|
||||||
define("USRNM_SPECIAL", %USRNMSPECIAL%);
|
define("USRNM_SPECIAL", %USRNMSPECIAL%);
|
||||||
define("USRNM_MIN_LENGTH", %USRNMMIN%);
|
define("USRNM_MIN_LENGTH", %USRNMMIN%);
|
||||||
define("USRNM_MAX_LENGTH", %USRNMMAX%);
|
define("USRNM_MAX_LENGTH", %USR NMMAX%);
|
||||||
define("PW_MIN_LENGTH", %PWMIN%);
|
define("PW_MIN_LENGTH", %PWMIN%);
|
||||||
|
|
||||||
// ***** Activation Mail
|
// ***** Activation Mail
|
||||||
@@ -218,368 +249,3 @@ define("STORAGE_BASE",800*STORAGE_MULTIPLIER);
|
|||||||
define("QUEST",%QUEST%);
|
define("QUEST",%QUEST%);
|
||||||
//quest type : 25 = Travian Official
|
//quest type : 25 = Travian Official
|
||||||
// 37 = TravianZ Extended
|
// 37 = TravianZ Extended
|
||||||
define("QTYPE",%QTYPE%);
|
|
||||||
|
|
||||||
// ***** Beginners Protection
|
|
||||||
// 3600 = 1 hour
|
|
||||||
// 3600*12 = 12 hours
|
|
||||||
// 3600*24 = 1 day
|
|
||||||
// 3600*24*3 = 3 days
|
|
||||||
// You can choose any value you want!
|
|
||||||
define("PROTECTION","%BEGINNER%");
|
|
||||||
|
|
||||||
// ***** Enable WW Statistics
|
|
||||||
define("WW",%WW%);
|
|
||||||
|
|
||||||
// ***** Show Natars in Statistics
|
|
||||||
define("SHOW_NATARS",%SHOW_NATARS%);
|
|
||||||
|
|
||||||
// ***** Natars Units Multiplier
|
|
||||||
define("NATARS_UNITS",%NATARS_UNITS%);
|
|
||||||
|
|
||||||
// ***** Natars Spawn Time
|
|
||||||
define("NATARS_SPAWN_TIME",%NATARS_SPAWN_TIME%);
|
|
||||||
define("NATARS_WW_SPAWN_TIME",%NATARS_WW_SPAWN_TIME%);
|
|
||||||
define("NATARS_WW_BUILDING_PLAN_SPAWN_TIME",%NATARS_WW_BUILDING_PLAN_SPAWN_TIME%);
|
|
||||||
|
|
||||||
// ***** Natars' World Wonder
|
|
||||||
// Number of DAYS after the Building Plans appear before the Natars begin
|
|
||||||
// constructing their own World Wonder. In Travian, the server ends when
|
|
||||||
// the World Wonder reaches level 100. At level 75, the Natars recall all
|
|
||||||
// of their troops to defend it.
|
|
||||||
//
|
|
||||||
// 0 = The Natars do not build a World Wonder.
|
|
||||||
define("NATARS_WW_START_DELAY", %NATARS_WW_START_DELAY%);
|
|
||||||
|
|
||||||
// ***** Nature troops regeneration time
|
|
||||||
define("NATURE_REGTIME",%NATURE_REGTIME%);
|
|
||||||
|
|
||||||
// ***** Oasis production
|
|
||||||
define("OASIS_WOOD_MULTIPLIER",%OASIS_WOOD_MULTIPLIER%);
|
|
||||||
define("OASIS_CLAY_MULTIPLIER",%OASIS_CLAY_MULTIPLIER%);
|
|
||||||
define("OASIS_IRON_MULTIPLIER",%OASIS_IRON_MULTIPLIER%);
|
|
||||||
define("OASIS_CROP_MULTIPLIER",%OASIS_CROP_MULTIPLIER%);
|
|
||||||
define("OASIS_WOOD_PRODUCTION",OASIS_WOOD_MULTIPLIER*SPEED);
|
|
||||||
define("OASIS_CLAY_PRODUCTION",OASIS_CLAY_MULTIPLIER*SPEED);
|
|
||||||
define("OASIS_IRON_PRODUCTION",OASIS_IRON_MULTIPLIER*SPEED);
|
|
||||||
define("OASIS_CROP_PRODUCTION",OASIS_CROP_MULTIPLIER*SPEED);
|
|
||||||
|
|
||||||
// ***** Medal Interval check
|
|
||||||
define("MEDALINTERVAL",%MEDALINTERVAL%);
|
|
||||||
// ***** Great Workshop
|
|
||||||
define("GREAT_WKS",%GREAT_WKS%);
|
|
||||||
// ***** Tourn threshold
|
|
||||||
define("TS_THRESHOLD",%TS_THRESHOLD%);
|
|
||||||
|
|
||||||
// ***** Register open/close
|
|
||||||
define("REG_OPEN",%REG_OPEN%);
|
|
||||||
|
|
||||||
// ***** Peace system
|
|
||||||
// 0 = None
|
|
||||||
// 1 = Normal
|
|
||||||
// 2 = Christmas
|
|
||||||
// 3 = New Year
|
|
||||||
// 4 = Easter
|
|
||||||
define("PEACE",%PEACE%);
|
|
||||||
|
|
||||||
// ***** Players protected from attacks
|
|
||||||
// Comma-separated list of names. Players listed here cannot be attacked or
|
|
||||||
// raided by anyone; reinforcements are still allowed. Leave empty to disable.
|
|
||||||
// Example: define("PROTECTED_PLAYERS", "Shadow,Multihunter");
|
|
||||||
define("PROTECTED_PLAYERS", "%PROTECTEDPLAYERS%");
|
|
||||||
|
|
||||||
//////////////////////////////////
|
|
||||||
// ***** Alliance Bonuses *****//
|
|
||||||
//////////////////////////////////
|
|
||||||
|
|
||||||
// Members donate resources, allowing the alliance to unlock four bonuses, each
|
|
||||||
// with five levels. The costs, durations, and limits below are based on
|
|
||||||
// Travian T4; upgrade times and donation limits are scaled by the server speed.
|
|
||||||
define("NEW_FUNCTIONS_ALLIANCE_BONUSES", %ALLIANCEBONUSES%);
|
|
||||||
|
|
||||||
// Total resources required for each level (cumulative for that level).
|
|
||||||
define("ALLIANCE_BONUS_COSTS", "1200000,5600000,17100000,51200000,153600000");
|
|
||||||
|
|
||||||
// Upgrade duration in HOURS for each level (divided by the server speed).
|
|
||||||
define("ALLIANCE_BONUS_HOURS", "24,48,72,96,120");
|
|
||||||
|
|
||||||
// Daily donation limit per player, based on the highest bonus level unlocked
|
|
||||||
// by the alliance (index 0 = no bonuses unlocked).
|
|
||||||
define("ALLIANCE_BONUS_DAILY", "300000,300000,400000,550000,750000,1000000");
|
|
||||||
|
|
||||||
// Percentage granted by each level. Two sets: "small" bonuses (2% per level:
|
|
||||||
// Recruitment, Philosophy) and "large" bonuses (4% per level: Metallurgy,
|
|
||||||
// Commerce), exactly as in T4.
|
|
||||||
define("ALLIANCE_BONUS_PCT_SMALL", 2);
|
|
||||||
define("ALLIANCE_BONUS_PCT_LARGE", 4);
|
|
||||||
|
|
||||||
// Gold cost to triple a donation.
|
|
||||||
define("ALLIANCE_BONUS_TRIPLE_GOLD", 3);
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////
|
|
||||||
// ***** Graphic Pack *****//
|
|
||||||
//////////////////////////////////
|
|
||||||
//
|
|
||||||
// SERVER_GP is the pack every player sees by default (chosen at install or in
|
|
||||||
// Admin -> Server Configuration). GP_ENABLE decides whether players may pick a
|
|
||||||
// different pack for themselves in Profile -> Graphic Pack.
|
|
||||||
//
|
|
||||||
// GP_LOCATE is the pack ACTUALLY used for the current request. It follows the
|
|
||||||
// same pattern as LANG above: the player's own choice wins when it is enabled
|
|
||||||
// and points at a real pack on disk, otherwise the server pack is used. A pack
|
|
||||||
// counts as real when the folder exists and contains travian.css, so a stale
|
|
||||||
// value in the database can never leave the game without stylesheets.
|
|
||||||
define("GP_ENABLE",%GP%);
|
|
||||||
define("SERVER_GP", "%GP_LOCATE%");
|
|
||||||
|
|
||||||
$__user_gp = '';
|
|
||||||
|
|
||||||
if (GP_ENABLE && isset($_SESSION['gpack']) && is_string($_SESSION['gpack'])) {
|
|
||||||
$__candidate = trim((string) $_SESSION['gpack']);
|
|
||||||
|
|
||||||
// only local packs: "gpack/<name>/" with no traversal and no remote URL
|
|
||||||
if (preg_match('#^gpack/[A-Za-z0-9_\-]+/$#', $__candidate)
|
|
||||||
&& is_file(__DIR__ . "/../" . $__candidate . "travian.css")) {
|
|
||||||
$__user_gp = $__candidate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define("GP_LOCATE", $__user_gp !== '' ? $__user_gp : SERVER_GP);
|
|
||||||
|
|
||||||
// ***** Tribe-specific World Wonder style
|
|
||||||
// When set to true, each tribe sees its own World Wonder, both on the village
|
|
||||||
// map and on the building page. Tribes without dedicated images on disk will
|
|
||||||
// continue to use the original image, regardless of this setting.
|
|
||||||
define("NEW_FUNCTION_WW_IMAGE", %WWIMAGE%);
|
|
||||||
|
|
||||||
// ***** Enable T4 is Coming screen
|
|
||||||
define("T4_COMING",%T4_COMING%);
|
|
||||||
|
|
||||||
//////////////////////////////////
|
|
||||||
// ***** PLUS *****//
|
|
||||||
//////////////////////////////////
|
|
||||||
|
|
||||||
//Plus PayPal e-mail address
|
|
||||||
define("PAYPAL_EMAIL","%PAYPAL_EMAIL%");
|
|
||||||
//Plus PayPal currency
|
|
||||||
define("PAYPAL_CURRENCY","%PAYPAL_CURRENCY%");
|
|
||||||
//Plus Package A Price
|
|
||||||
define("PLUS_PACKAGE_A_PRICE","%PLUS_PACKAGE_A_PRICE%");
|
|
||||||
//Plus Package A Gold
|
|
||||||
define("PLUS_PACKAGE_A_GOLD","%PLUS_PACKAGE_A_GOLD%");
|
|
||||||
//Plus Package B Price
|
|
||||||
define("PLUS_PACKAGE_B_PRICE","%PLUS_PACKAGE_B_PRICE%");
|
|
||||||
//Plus Package B Gold
|
|
||||||
define("PLUS_PACKAGE_B_GOLD","%PLUS_PACKAGE_B_GOLD%");
|
|
||||||
//Plus Package C Price
|
|
||||||
define("PLUS_PACKAGE_C_PRICE","%PLUS_PACKAGE_C_PRICE%");
|
|
||||||
//Plus Package C Gold
|
|
||||||
define("PLUS_PACKAGE_C_GOLD","%PLUS_PACKAGE_C_GOLD%");
|
|
||||||
//Plus Package D Gold
|
|
||||||
define("PLUS_PACKAGE_D_GOLD","%PLUS_PACKAGE_D_GOLD%");
|
|
||||||
//Plus Package D Price
|
|
||||||
define("PLUS_PACKAGE_D_PRICE","%PLUS_PACKAGE_D_PRICE%");
|
|
||||||
//Plus Package E Price
|
|
||||||
define("PLUS_PACKAGE_E_PRICE","%PLUS_PACKAGE_E_PRICE%");
|
|
||||||
//Plus Package E Gold
|
|
||||||
define("PLUS_PACKAGE_E_GOLD","%PLUS_PACKAGE_E_GOLD%");
|
|
||||||
//Plus account lenght
|
|
||||||
define("PLUS_TIME",%PLUS_TIME%);
|
|
||||||
//+25% production lenght
|
|
||||||
define("PLUS_PRODUCTION",%PLUS_PRODUCTION%);
|
|
||||||
|
|
||||||
//////////////////////////////////
|
|
||||||
// **** LOG SETTINGS **** //
|
|
||||||
//////////////////////////////////
|
|
||||||
//
|
|
||||||
// LOG BUILDING/UPGRADING
|
|
||||||
define("LOG_BUILD",%LOGBUILD%);
|
|
||||||
// LOG RESEARCHES
|
|
||||||
define("LOG_TECH",%LOGTECH%);
|
|
||||||
// LOG USER LOGIN (IP's)
|
|
||||||
define("LOG_LOGIN",%LOGLOGIN%);
|
|
||||||
// LOG GOLD
|
|
||||||
define("LOG_GOLD_FIN",%LOGGOLDFIN%);
|
|
||||||
// LOG ADMIN
|
|
||||||
define("LOG_ADMIN",%LOGADMIN%);
|
|
||||||
// LOG ATTACK REPORTS
|
|
||||||
define("LOG_WAR",%LOGWAR%);
|
|
||||||
// LOG MARKET REPORTS
|
|
||||||
define("LOG_MARKET",%LOGMARKET%);
|
|
||||||
// LOG ILLEGAL ACTIONS
|
|
||||||
define("LOG_ILLEGAL",%LOGILLEGAL%);
|
|
||||||
|
|
||||||
//////////////////////////////////
|
|
||||||
// **** NEWSBOX SETTINGS **** //
|
|
||||||
//////////////////////////////////
|
|
||||||
//true = enabled
|
|
||||||
//false = disabled
|
|
||||||
define("NEWSBOX1",%BOX1%);
|
|
||||||
define("NEWSBOX2",%BOX2%);
|
|
||||||
define("NEWSBOX3",%BOX3%);
|
|
||||||
|
|
||||||
//////////////////////////////////
|
|
||||||
// **** SQL SETTINGS **** //
|
|
||||||
//////////////////////////////////
|
|
||||||
|
|
||||||
// ***** SQL Hostname
|
|
||||||
// example: sql106.000space.com / localhost
|
|
||||||
// If you host server on own PC than this value is: localhost
|
|
||||||
// If you use online hosting, value must be written in host cpanel
|
|
||||||
define("SQL_SERVER", "%SSERVER%");
|
|
||||||
|
|
||||||
// ***** SQL Port
|
|
||||||
// default: 3306
|
|
||||||
define("SQL_PORT", %SPORT%);
|
|
||||||
|
|
||||||
// ***** Database Username
|
|
||||||
define("SQL_USER", "%SUSER%");
|
|
||||||
|
|
||||||
// ***** Database Password
|
|
||||||
define("SQL_PASS", "%SPASS%");
|
|
||||||
|
|
||||||
// ***** Database Name
|
|
||||||
define("SQL_DB", "%SDB%");
|
|
||||||
|
|
||||||
// ***** Database - Table Prefix
|
|
||||||
define("TB_PREFIX", "%PREFIX%");
|
|
||||||
|
|
||||||
// ***** Database type
|
|
||||||
// 0 = MYSQL
|
|
||||||
// 1 = MYSQLi
|
|
||||||
// default: 1
|
|
||||||
define("DB_TYPE", %CONNECTT%);
|
|
||||||
|
|
||||||
////////////////////////////////////
|
|
||||||
// **** EXTRA SETTINGS **** //
|
|
||||||
////////////////////////////////////
|
|
||||||
|
|
||||||
// ***** Censore words
|
|
||||||
//define("WORD_CENSOR", "%ACTCEN%");
|
|
||||||
|
|
||||||
// ***** Words (censore)
|
|
||||||
// Choose which words do you want to be censored
|
|
||||||
//define("CENSORED","%CENWORDS%");
|
|
||||||
|
|
||||||
|
|
||||||
// ***** Limit Mailbox
|
|
||||||
// Limits mailbox to defined number of mails. (IGM's)
|
|
||||||
define("LIMIT_MAILBOX",%LIMIT_MAILBOX%);
|
|
||||||
// If enabled, define number of maximum mails.
|
|
||||||
define("MAX_MAIL","%MAX_MAILS%");
|
|
||||||
|
|
||||||
// ***** Include administrator in statistics/rank
|
|
||||||
define("INCLUDE_ADMIN", %ARANK%);
|
|
||||||
|
|
||||||
////////////////////////////////////
|
|
||||||
// **** ADMIN SETTINGS **** //
|
|
||||||
////////////////////////////////////
|
|
||||||
|
|
||||||
// ***** Admin Email
|
|
||||||
define("ADMIN_EMAIL", "%AEMAIL%");
|
|
||||||
|
|
||||||
// ***** Admin Name
|
|
||||||
define("ADMIN_NAME", "%ANAME%");
|
|
||||||
|
|
||||||
// ***** Show Support Messages in Admin
|
|
||||||
define("ADMIN_RECEIVE_SUPPORT_MESSAGES", %ASUPPMSGS%);
|
|
||||||
|
|
||||||
// ***** Allow Admin accounts to be raided and attacked
|
|
||||||
define("ADMIN_ALLOW_INCOMING_RAIDS", %ARAIDS%);
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////
|
|
||||||
// **** NEW MECHANICS AND FUNCTIONS **** //
|
|
||||||
/////////////////////////////////////////////////
|
|
||||||
|
|
||||||
define("NEW_FUNCTIONS_OASIS", %NEW_FUNCTIONS_OASIS%);
|
|
||||||
define("NEW_FUNCTIONS_ALLIANCE_INVITATION", %NEW_FUNCTIONS_ALLIANCE_INVITATION%);
|
|
||||||
define("NEW_FUNCTIONS_EMBASSY_MECHANICS", %NEW_FUNCTIONS_EMBASSY_MECHANICS%);
|
|
||||||
define("NEW_FUNCTIONS_FORUM_POST_MESSAGE", %NEW_FUNCTIONS_FORUM_POST_MESSAGE%);
|
|
||||||
define("NEW_FUNCTIONS_TRIBE_IMAGES", %NEW_FUNCTIONS_TRIBE_IMAGES%);
|
|
||||||
define("NEW_FUNCTIONS_MHS_IMAGES", %NEW_FUNCTIONS_MHS_IMAGES%);
|
|
||||||
define("NEW_FUNCTIONS_DISPLAY_ARTIFACT", %NEW_FUNCTIONS_DISPLAY_ARTIFACT%);
|
|
||||||
define("NEW_FUNCTIONS_DISPLAY_WONDER", %NEW_FUNCTIONS_DISPLAY_WONDER%);
|
|
||||||
define("NEW_FUNCTIONS_VACATION", %NEW_FUNCTIONS_VACATION%);
|
|
||||||
define("NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET", %NEW_FUNCTIONS_DISPLAY_CATAPULT_TARGET%);
|
|
||||||
define("NEW_FUNCTIONS_MANUAL_NATURENATARS", %NEW_FUNCTIONS_MANUAL_NATURENATARS%);
|
|
||||||
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%);
|
|
||||||
define("NEW_FUNCTIONS_MILESTONES", %NEW_FUNCTIONS_MILESTONES%);
|
|
||||||
define("NEW_FUNCTIONS_MEDAL_RESET", %NEW_FUNCTIONS_MEDAL_RESET%);
|
|
||||||
define("NEW_FUNCTIONS_HERO_T4", %NEW_FUNCTIONS_HERO_T4%);
|
|
||||||
define("NEW_FUNCTION_TRIBE_HUNS", %NEW_FUNCTION_TRIBE_HUNS%);
|
|
||||||
define("NEW_FUNCTION_TRIBE_EGIPTEANS", %NEW_FUNCTION_TRIBE_EGIPTEANS%);
|
|
||||||
define("NEW_FUNCTION_TRIBE_SPARTANS", %NEW_FUNCTION_TRIBE_SPARTANS%);
|
|
||||||
define("NEW_FUNCTION_TRIBE_VIKINGS", %NEW_FUNCTION_TRIBE_VIKINGS%);
|
|
||||||
define("NEW_FUNCTION_REGISTRATION_GOLD", %NEW_FUNCTION_REGISTRATION_GOLD%);
|
|
||||||
define("NEW_FUNCTION_REGISTRATION_GOLD_VALUE", %NEW_FUNCTION_REGISTRATION_GOLD_VALUE%);
|
|
||||||
|
|
||||||
//////////////////////////////////////////
|
|
||||||
// **** DO NOT EDIT SETTINGS **** //
|
|
||||||
//////////////////////////////////////////
|
|
||||||
|
|
||||||
define("AUTO_DEL_INACTIVE",false); // auto-delete inactive players; default = false
|
|
||||||
define("UN_ACT_TIME", 3628800); // 6 weeks to consider a player inactive
|
|
||||||
define("ALLOW_BURST",false);
|
|
||||||
define("BASIC_MAX",1);
|
|
||||||
define("INNER_MAX",1);
|
|
||||||
define("PLUS_MAX",1);
|
|
||||||
define("ALLOW_ALL_TRIBE",false);
|
|
||||||
define("CFM_ADMIN_ACT",true);
|
|
||||||
define("SERVER_WEB_ROOT",false);
|
|
||||||
|
|
||||||
////////////////////////////
|
|
||||||
// **** IP BAN **** //
|
|
||||||
////////////////////////////
|
|
||||||
|
|
||||||
// Master switch for IP-ban enforcement.
|
|
||||||
define("BAN_IP_ENABLED",true);
|
|
||||||
// Comma-separated list of trusted proxy IPs/CIDRs allowed to set the forwarded
|
|
||||||
// header. Leave EMPTY for direct access (REMOTE_ADDR only - non-spoofable).
|
|
||||||
// Reverse proxy example: "127.0.0.1,::1" | set to your proxy/Cloudflare ranges.
|
|
||||||
define("IP_TRUSTED_PROXIES","");
|
|
||||||
// $_SERVER key read for the real client IP when behind a trusted proxy.
|
|
||||||
// Cloudflare: use "HTTP_CF_CONNECTING_IP".
|
|
||||||
define("IP_FORWARDED_HEADER","HTTP_X_FORWARDED_FOR");
|
|
||||||
define("BANNED",0);
|
|
||||||
define("AUTH",1);
|
|
||||||
define("USER",2);
|
|
||||||
define("MULTIHUNTER",8);
|
|
||||||
define("ADMIN",9);
|
|
||||||
define("COOKIE_EXPIRE", 60*60*24*7);
|
|
||||||
define("COOKIE_PATH", "/");
|
|
||||||
define("LOG_PAGE_ACCESS", false);
|
|
||||||
define("PAGE_ACCESS_LOG_DATE", true);
|
|
||||||
define("PAGE_ACCESS_LOG_IP", true);
|
|
||||||
define("PAGE_ACCESS_LOG_FILENAME", 'access.log'); // filename ONLY, no path!
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////
|
|
||||||
// **** DOMAIN/SERVER SETTINGS **** //
|
|
||||||
////////////////////////////////////////////
|
|
||||||
define("DOMAIN", "%DOMAIN%");
|
|
||||||
define("HOMEPAGE", "%HOMEPAGE%");
|
|
||||||
define("SERVER", "%SERVER%");
|
|
||||||
|
|
||||||
$requse = 0;
|
|
||||||
|
|
||||||
############################### E N D ##################################
|
|
||||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
|
||||||
## --------------------------------------------------------------------------- ##
|
|
||||||
## Filename config.php ##
|
|
||||||
## Version 11.0 Full Refactor & Security ##
|
|
||||||
## Developed by: Dzoki and Dixie Edited by Advocaite ##
|
|
||||||
## License: TravianZ Project ##
|
|
||||||
## Copyright: TravianZ (c) 2013-2026. All rights reserved. ##
|
|
||||||
## Modified by: Shadow and ronix ##
|
|
||||||
## Refactored by: Shadow ##
|
|
||||||
## ##
|
|
||||||
## URLs: https://travianz.org ##
|
|
||||||
## https://github.com/Shadowss/TravianZ ##
|
|
||||||
#################################################################################
|
|
||||||
|
|
||||||
?>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user