mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Merge branch 'Shadowss:master' into ita
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
## Developed by: Dzoki & Advocatie ##
|
||||
## License: TravianZ Project ##
|
||||
## Reworks by: ronix ##
|
||||
## Copyright: TravianZ (c) 2010-2014. All rights reserved. ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
<?php
|
||||
#########################################################
|
||||
## Filename addUsers.php ##
|
||||
## Created by: KFCSpike ##
|
||||
## Contributors: KFCSpike ##
|
||||
## Improve by: ronix ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2014. All rights reserved. ##
|
||||
#########################################################
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename addUsers.php ##
|
||||
## Created by KFCSpike ##
|
||||
## Improve by ronix ##
|
||||
## Developed by: Shadow ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
use App\Entity\User;
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename cp.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
include_once("../../config.php");
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename cp.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename delallymedal.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename deletemedalsbyuser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename deletemedalsbyweek.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename deletemedalsbyweek.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
##################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
include_once("../../config.php");
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Filename editOverall.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Filename editPassword.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Filename editPlus.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Filename editProtection ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editResources.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Filename editSitter.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename deletemedalsbyuser.php ##
|
||||
## Filename editUsername.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Filename editVillageOwner.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editUser.php ##
|
||||
## Filename editWeek.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceBan.php ##
|
||||
## Filename givePlus.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceBan.php ##
|
||||
## Filename givePlusRes.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename gold_1.php ##
|
||||
## Filename giveResBonus.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename gold.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename gold_1.php ##
|
||||
## Filename gold_1.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename 404.tpl ##
|
||||
## Filename index.tpl ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
?>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceBan.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceCleanBanData.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceResetGold.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceResetPlus.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceResetPlusBonus.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename mainteneceUnban.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -5,8 +5,9 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename medals.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if($_SESSION['access'] < 9) die("Access Denied: You are not Admin!");
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename editBuildings.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename renameVillage.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename sendMessage.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
if (!isset($_SESSION)) session_start();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
## Edited by: Shadow and ronix ##
|
||||
## License: Creative Commons BY-NC-SA 3.0 ##
|
||||
## Copyright: TravianZ (c) 2014 - All rights reserved ##
|
||||
## URLs: http://travian.shadowss/ro ##
|
||||
## URLs: http://travian.shadowss.ro ##
|
||||
## Source code: https://github.com/Shadowss/TravianZ ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
## Edited by: Shadow and ronix ##
|
||||
## License: Creative Commons BY-NC-SA 3.0 ##
|
||||
## Copyright: TravianZ (c) 2014 - All rights reserved ##
|
||||
## URLs: http://travian.shadowss/ro ##
|
||||
## URLs: http://travian.shadowss.ro ##
|
||||
## Source code: https://github.com/Shadowss/TravianZ ##
|
||||
## ##
|
||||
#################################################################################
|
||||
@@ -82,6 +82,7 @@ class adm_DB {
|
||||
$bcrypted = false;
|
||||
}
|
||||
|
||||
$username = htmlspecialchars($username);
|
||||
if($pwOk) {
|
||||
// update password to bcrypt, if correct
|
||||
if (!$dbarray['is_bcrypt'] && !$bcrypted) {
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<?php
|
||||
|
||||
// ################################################################################
|
||||
// # ##
|
||||
// # -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
// # ##
|
||||
// # --------------------------------------------------------------------------- ##
|
||||
// # ##
|
||||
// # Project: TravianZ ##
|
||||
// # Version: 05.03.2014 ##
|
||||
// # Filename: Admin/function.php ##
|
||||
// # Developed by: Dzoki ##
|
||||
// # Edited by: Shadow and ronix ##
|
||||
// # License: Creative Commons BY-NC-SA 3.0 ##
|
||||
// # Copyright: TravianZ (c) 2014 - All rights reserved ##
|
||||
// # URLs: http://travian.shadowss/ro ##
|
||||
// # Source code: https://github.com/Shadowss/TravianZ ##
|
||||
// # ##
|
||||
// ################################################################################
|
||||
#################################################################################
|
||||
## ##
|
||||
## -= YOU MUST NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## ##
|
||||
## Project: TravianZ ##
|
||||
## Version: 05.03.2014 ##
|
||||
## Filename: GameEngine/Admin/function.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## Edited by: Shadow and ronix ##
|
||||
## License: Creative Commons BY-NC-SA 3.0 ##
|
||||
## Copyright: TravianZ (c) 2014 - All rights reserved ##
|
||||
## URLs: http://travian.shadowss.ro ##
|
||||
## Source code: https://github.com/Shadowss/TravianZ ##
|
||||
## ##
|
||||
#################################################################################
|
||||
include_once(__DIR__ . "/../Artifacts.php");
|
||||
include_once(__DIR__ . "/../Units.php");
|
||||
include_once(__DIR__ . "/../Generator.php");
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename 404.tpl ##
|
||||
## Filename GameEngine\Admin\index.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2012. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
?>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Hello %USER%,
|
||||
|
||||
Thank you for registering on our server.
|
||||
Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy. To not get lost in this devastating battle, you should look for allies even though you are <b>protected by beginner\'s protection for %PROTECTION% hours</b>.
|
||||
Since the %START% at %TIME% Romans, Gauls and Teutons attack each other on this game world. Right now, %PLAYERS% players in %ALLI% Alliances are fighting for supremacy. To not get lost in this devastating battle, you should look for allies even though you are <b>protected by beginner's protection for %PROTECTION% hours</b>.
|
||||
|
||||
The taskmaster will help you on your way to establishing your empire with advice, deed and resources (after a few tasks such as finding out the exact duration of your beginner\'s protection). You can find him on the right side of your village. After successfully completing all of his tasks you will be on your own again.
|
||||
The taskmaster will help you on your way to establishing your empire with advice, deed and resources (after a few tasks such as finding out the exact duration of your beginner's protection). You can find him on the right side of your village. After successfully completing all of his tasks you will be on your own again.
|
||||
|
||||
<ul style="margin-top:0;margin-bottom:0;"><li>You have to heed the <a href="rules.php">game rules</a></li><li>Information concerning troops and buildings can be found in the <a href="#" onClick="return Popup(0,0);">instructions</a></li><li>Problems? Check the <a href="http://t3.answers.travian.com" target="_blank">Travian Answers</a> first!</li><li>No solution? Try asking in the <a href="http://forum.travian.com/">Forum</a></li><li>Tried everything to no avail? Write an answer to this message to contact the Support</li></ul>
|
||||
|
||||
|
||||
+20
-18
@@ -4,36 +4,38 @@
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Project: TravianZ ##
|
||||
## Version: 22.06.2015 ##
|
||||
## Version: 22.06.2015 ##
|
||||
## Filename Automation.php ##
|
||||
## Developed by: Mr.php , Advocaite , brainiacX , yi12345 , Shadow , ronix ##
|
||||
## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ##
|
||||
## Fixed by: InCube - double troops ##
|
||||
## Fixed by: Shadow - STARVATION , HERO FIXED COMPL. ##
|
||||
## Fixed by: InCube - double troops ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2018. All rights reserved. ##
|
||||
## URLs: http://travian.shadowss.ro ##
|
||||
## Source code: https://github.com/Shadowss/TravianZ ##
|
||||
## URLs: http://travian.shadowss.ro ##
|
||||
## Source code: https://github.com/Shadowss/TravianZ ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
// make sure we only run the automation script once and wait until it's done,
|
||||
// so concurrent AJAX calls from many different users won't overload the server
|
||||
if ( !defined('AUTOMATION_MANUAL_RUN') ) {
|
||||
if ( file_exists( AUTOMATION_LOCK_FILE_NAME ) ) {
|
||||
// check that the file is not too old, in which case our PHP script hung
|
||||
// and we need to remove the lock and run automation again
|
||||
$fileTime = filemtime( AUTOMATION_LOCK_FILE_NAME );
|
||||
|
||||
// allow for 60 seconds of old automation script processing time, which is still way too plenty
|
||||
if ( ! $fileTime || time() - $fileTime > 60 ) {
|
||||
@unlink( AUTOMATION_LOCK_FILE_NAME );
|
||||
if(defined('AUTOMATION_LOCK_FILE_NAME')){
|
||||
if ( file_exists( AUTOMATION_LOCK_FILE_NAME ) ) {
|
||||
// check that the file is not too old, in which case our PHP script hung
|
||||
// and we need to remove the lock and run automation again
|
||||
$fileTime = filemtime( AUTOMATION_LOCK_FILE_NAME );
|
||||
|
||||
// allow for 60 seconds of old automation script processing time, which is still way too plenty
|
||||
if ( ! $fileTime || time() - $fileTime > 60 ) {
|
||||
@unlink( AUTOMATION_LOCK_FILE_NAME );
|
||||
} else {
|
||||
// automation file exists and is valid, don't run another automation
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
// automation file exists and is valid, don't run another automation
|
||||
exit;
|
||||
// create automation lock file
|
||||
file_put_contents( AUTOMATION_LOCK_FILE_NAME, '' );
|
||||
}
|
||||
} else {
|
||||
// create automation lock file
|
||||
file_put_contents( AUTOMATION_LOCK_FILE_NAME, '' );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -149,14 +149,14 @@ $replace[50] = "<img class='unit u48' src='img/x.gif' title='".U48."' alt='".U48
|
||||
$replace[51] = "<img class='unit u49' src='img/x.gif' title='".U49."' alt='".U49."'>";
|
||||
$replace[52] = "<img class='unit u50' src='img/x.gif' title='".U50."' alt='".U50."'>";
|
||||
$replace[53] = "<img class='unit uhero' src='img/x.gif' title='".U0."' alt='".U0."'>";
|
||||
$replace[54] = "<img src='img/x.gif' class='r1' title='".R1."' alt='".R1."'>";
|
||||
$replace[55] = "<img src='img/x.gif' class='r2' title='".R2."' alt='".R2."'>";
|
||||
$replace[56] = "<img src='img/x.gif' class='r3' title='".R3."' alt='".R3."'>";
|
||||
$replace[57] = "<img src='img/x.gif' class='r4' title='".R4."' alt='".R4."'>";
|
||||
$replace[54] = "<img src='img/x.gif' class='r1' title='Lumber' alt='Lumber'>";
|
||||
$replace[55] = "<img src='img/x.gif' class='r2' title='Clay' alt='Clay'>";
|
||||
$replace[56] = "<img src='img/x.gif' class='r3' title='Iron' alt='Iron'>";
|
||||
$replace[57] = "<img src='img/x.gif' class='r4' title='Crop' alt='Crop'>";
|
||||
$replace[54] = "<img src='img/x.gif' class='r1' title='".LUMBER."' alt='".LUMBER."'>";
|
||||
$replace[55] = "<img src='img/x.gif' class='r2' title='".CLAY."' alt='".CLAY."'>";
|
||||
$replace[56] = "<img src='img/x.gif' class='r3' title='".IRON."' alt='".IRON."'>";
|
||||
$replace[57] = "<img src='img/x.gif' class='r4' title='".CROP."' alt='".CROP."'>";
|
||||
$replace[54] = "<img src='img/x.gif' class='r1' title='".LUMBER."' alt='".LUMBER."'>";
|
||||
$replace[55] = "<img src='img/x.gif' class='r2' title='".CLAY."' alt='".CLAY."'>";
|
||||
$replace[56] = "<img src='img/x.gif' class='r3' title='".IRON."' alt='".IRON."'>";
|
||||
$replace[57] = "<img src='img/x.gif' class='r4' title='".CROP."' alt='".CROP."'>";
|
||||
$replace[58] = "<img class='smiley aha' src='img/x.gif' alt='*aha*' title='*aha*'>";
|
||||
$replace[59] = "<img class='smiley angry' src='img/x.gif' alt='*angry*' title='*angry*'>";
|
||||
$replace[60] = "<img class='smiley cool' src='img/x.gif' alt='*cool*' title='*cool*'>";
|
||||
|
||||
@@ -40,7 +40,7 @@ class Battle {
|
||||
global $form;
|
||||
|
||||
// receive form and process
|
||||
if(isset($post['a1_v']) && (isset($post['a2_v1']) || isset($post['a2_v2']) || isset($post['a2_v3']) || isset($post['a2_v4']))){
|
||||
if(isset($post['a1_v']) && (isset($post['a2_v1']) || isset($post['a2_v2']) || isset($post['a2_v3']) || isset($post['a2_v4']) || isset($post['a2_v5']))){
|
||||
$_POST['mytribe'] = $post['a1_v'];
|
||||
|
||||
$target = [];
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename Chat.php ##
|
||||
## Developed by: TTMMTT ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename buidata.php ##
|
||||
## Developed by: Akakori ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2011. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename cel.php ##
|
||||
## Developed by: G3n3s!s & JimJam & LoppyLukas ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename cp.php ##
|
||||
## Developed by: G3n3s!s & JimJam & LoppyLukas ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename 404.tpl ##
|
||||
## Filename index.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
?>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename resdata.php ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename unitdata.php ##
|
||||
## Developed by: Akakori ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
+125
-279
@@ -785,19 +785,20 @@ class MYSQLi_DB implements IDbConnection {
|
||||
|
||||
// no need to cache this method
|
||||
public function hasBeginnerProtection($vid) {
|
||||
list($vid) = $this->escape_input((int) $vid);
|
||||
$q = "SELECT u.protect
|
||||
FROM ". TB_PREFIX ."users u
|
||||
JOIN ". TB_PREFIX ."vdata v ON u.id = v.owner
|
||||
JOIN ". TB_PREFIX ."odata o ON u.id = o.owner
|
||||
WHERE v.wref = ". $vid ." OR o.wref = ". $vid . "
|
||||
LIMIT 1";
|
||||
$result = mysqli_query($this->dblink,$q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
|
||||
if(!empty($dbarray)) return time() < $dbarray[0];
|
||||
else return false;
|
||||
list($vid) = $this->escape_input($vid);
|
||||
$q = "SELECT u.protect FROM ".TB_PREFIX."users u,".TB_PREFIX."vdata v WHERE u.id=v.owner AND v.wref=".(int) $vid." LIMIT 1";
|
||||
$result = mysqli_query($this->dblink,$q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
if(!empty($dbarray)) {
|
||||
if(time()<$dbarray[0]) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function updateUserField($ref, $field, $value, $switch) {
|
||||
list($ref) = $this->escape_input($ref);
|
||||
@@ -1356,6 +1357,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
}
|
||||
|
||||
function setFieldTaken($id) {
|
||||
if(empty($id)) return;
|
||||
if (!is_array($id)) {
|
||||
$id = [$id];
|
||||
}
|
||||
@@ -2994,7 +2996,7 @@ class MYSQLi_DB implements IDbConnection {
|
||||
$q = "SELECT $field FROM " . TB_PREFIX . "ali_permission where username = '$ref' LIMIT 1";
|
||||
}
|
||||
$result = mysqli_query($this->dblink,$q);
|
||||
$dbarray = mysqli_fetch_array($result);
|
||||
//$dbarray = mysqli_fetch_array($result); - some error in here !
|
||||
return $dbarray[$field];
|
||||
}
|
||||
|
||||
@@ -3016,6 +3018,8 @@ class MYSQLi_DB implements IDbConnection {
|
||||
|
||||
function setAlliName($aid, $name, $tag) {
|
||||
list($aid, $name, $tag) = $this->escape_input((int) $aid, $name, $tag);
|
||||
$name = $this->RemoveXSS($name);
|
||||
$tag = $this->RemoveXSS($tag);
|
||||
|
||||
$q = "UPDATE " . TB_PREFIX . "alidata set name = '$name', tag = '$tag' where id = $aid";
|
||||
return mysqli_query($this->dblink,$q);
|
||||
@@ -3109,6 +3113,8 @@ class MYSQLi_DB implements IDbConnection {
|
||||
*****************************************/
|
||||
function createAlliance($tag, $name, $uid, $max) {
|
||||
list($tag, $name, $uid, $max) = $this->escape_input($tag, $name, (int) $uid, (int) $max);
|
||||
$tag = $this->RemoveXSS($tag);
|
||||
$name = $this->RemoveXSS($name);
|
||||
|
||||
$q = "INSERT into " . TB_PREFIX . "alidata values (0,'$name','$tag',$uid,0,0,0,'','',$max,0,0,0,0,0,0,0,0,0)";
|
||||
mysqli_query($this->dblink,$q);
|
||||
@@ -3588,269 +3594,99 @@ class MYSQLi_DB implements IDbConnection {
|
||||
// please don't scream...
|
||||
// with the current table structure, there really IS NOT another way
|
||||
// (except for stored procedures, which we can't rely on to be allowed on the server)
|
||||
$result = mysqli_query($this->dblink,"
|
||||
SELECT
|
||||
IF(
|
||||
f1t IN ($fieldType),
|
||||
f1,
|
||||
IF(
|
||||
f2t IN ($fieldType),
|
||||
f2,
|
||||
IF(
|
||||
f3t IN ($fieldType),
|
||||
f3,
|
||||
IF(
|
||||
f4t IN ($fieldType),
|
||||
f4,
|
||||
IF(
|
||||
f5t IN ($fieldType),
|
||||
f5,
|
||||
IF(
|
||||
f6t IN ($fieldType),
|
||||
f6,
|
||||
IF(
|
||||
f7t IN ($fieldType),
|
||||
f7,
|
||||
IF(
|
||||
f8t IN ($fieldType),
|
||||
f8,
|
||||
IF(
|
||||
f9t IN ($fieldType),
|
||||
f9,
|
||||
IF(
|
||||
f10t IN ($fieldType),
|
||||
f10,
|
||||
IF(
|
||||
f11t IN ($fieldType),
|
||||
f11,
|
||||
IF(
|
||||
f12t IN ($fieldType),
|
||||
f12,
|
||||
IF(
|
||||
f13t IN ($fieldType),
|
||||
f13,
|
||||
IF(
|
||||
f14t IN ($fieldType),
|
||||
f14,
|
||||
IF(
|
||||
f15t IN ($fieldType),
|
||||
f15,
|
||||
IF(
|
||||
f16t IN ($fieldType),
|
||||
f16,
|
||||
IF(
|
||||
f17t IN ($fieldType),
|
||||
f17,
|
||||
IF(
|
||||
f18t IN ($fieldType),
|
||||
f18,
|
||||
IF(
|
||||
f19t IN ($fieldType),
|
||||
f19,
|
||||
IF(
|
||||
f20t IN ($fieldType),
|
||||
f20,
|
||||
IF(
|
||||
f20t IN ($fieldType),
|
||||
f20,
|
||||
IF(
|
||||
f21t IN ($fieldType),
|
||||
f21,
|
||||
IF(
|
||||
f22t IN ($fieldType),
|
||||
f22,
|
||||
IF(
|
||||
f23t IN ($fieldType),
|
||||
f23,
|
||||
IF(
|
||||
f24t IN ($fieldType),
|
||||
f24,
|
||||
IF(
|
||||
f25t IN ($fieldType),
|
||||
f25,
|
||||
IF(
|
||||
f26t IN ($fieldType),
|
||||
f26,
|
||||
IF(
|
||||
f27t IN ($fieldType),
|
||||
f27,
|
||||
IF(
|
||||
f28t IN ($fieldType),
|
||||
f28,
|
||||
IF(
|
||||
f29t IN ($fieldType),
|
||||
f29,
|
||||
IF(
|
||||
f30t IN ($fieldType),
|
||||
f30,
|
||||
IF(
|
||||
f31t IN ($fieldType),
|
||||
f31,
|
||||
IF(
|
||||
f32t IN ($fieldType),
|
||||
f32,
|
||||
IF(
|
||||
f33t IN ($fieldType),
|
||||
f33,
|
||||
IF(
|
||||
f34t IN ($fieldType),
|
||||
f34,
|
||||
IF(
|
||||
f35t IN ($fieldType),
|
||||
f35,
|
||||
IF(
|
||||
f36t IN ($fieldType),
|
||||
f36,
|
||||
IF(
|
||||
f37t IN ($fieldType),
|
||||
f37,
|
||||
IF(
|
||||
f38t IN ($fieldType),
|
||||
f38,
|
||||
IF(
|
||||
f39t IN ($fieldType),
|
||||
f39,
|
||||
IF(
|
||||
f40t IN ($fieldType),
|
||||
f40,
|
||||
IF(
|
||||
f99t IN ($fieldType),
|
||||
f99,
|
||||
0
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
) as level
|
||||
FROM
|
||||
".TB_PREFIX."fdata
|
||||
WHERE
|
||||
vref = $vid
|
||||
AND
|
||||
(f1t IN ($fieldType)
|
||||
OR
|
||||
f2t IN ($fieldType)
|
||||
OR
|
||||
f3t IN ($fieldType)
|
||||
OR
|
||||
f4t IN ($fieldType)
|
||||
OR
|
||||
f5t IN ($fieldType)
|
||||
OR
|
||||
f6t IN ($fieldType)
|
||||
OR
|
||||
f7t IN ($fieldType)
|
||||
OR
|
||||
f8t IN ($fieldType)
|
||||
OR
|
||||
f9t IN ($fieldType)
|
||||
OR
|
||||
f10t IN ($fieldType)
|
||||
OR
|
||||
f11t IN ($fieldType)
|
||||
OR
|
||||
f12t IN ($fieldType)
|
||||
OR
|
||||
f13t IN ($fieldType)
|
||||
OR
|
||||
f14t IN ($fieldType)
|
||||
OR
|
||||
f15t IN ($fieldType)
|
||||
OR
|
||||
f16t IN ($fieldType)
|
||||
OR
|
||||
f17t IN ($fieldType)
|
||||
OR
|
||||
f18t IN ($fieldType)
|
||||
OR
|
||||
f19t IN ($fieldType)
|
||||
OR
|
||||
f20t IN ($fieldType)
|
||||
OR
|
||||
f20t IN ($fieldType)
|
||||
OR
|
||||
f21t IN ($fieldType)
|
||||
OR
|
||||
f22t IN ($fieldType)
|
||||
OR
|
||||
f23t IN ($fieldType)
|
||||
OR
|
||||
f24t IN ($fieldType)
|
||||
OR
|
||||
f25t IN ($fieldType)
|
||||
OR
|
||||
f26t IN ($fieldType)
|
||||
OR
|
||||
f27t IN ($fieldType)
|
||||
OR
|
||||
f28t IN ($fieldType)
|
||||
OR
|
||||
f29t IN ($fieldType)
|
||||
OR
|
||||
f30t IN ($fieldType)
|
||||
OR
|
||||
f30t IN ($fieldType)
|
||||
OR
|
||||
f31t IN ($fieldType)
|
||||
OR
|
||||
f32t IN ($fieldType)
|
||||
OR
|
||||
f33t IN ($fieldType)
|
||||
OR
|
||||
f34t IN ($fieldType)
|
||||
OR
|
||||
f35t IN ($fieldType)
|
||||
OR
|
||||
f36t IN ($fieldType)
|
||||
OR
|
||||
f37t IN ($fieldType)
|
||||
OR
|
||||
f38t IN ($fieldType)
|
||||
OR
|
||||
f39t IN ($fieldType)
|
||||
OR
|
||||
f40t IN ($fieldType)
|
||||
OR
|
||||
f99t IN ($fieldType))
|
||||
LIMIT 1
|
||||
");
|
||||
$result = mysqli_query($this->dblink, 'SELECT '.
|
||||
'CASE '.
|
||||
'WHEN `f1t` IN ('.$fieldType.') THEN `f1` '.
|
||||
'WHEN `f2t` IN ('.$fieldType.') THEN `f2` '.
|
||||
'WHEN `f3t` IN ('.$fieldType.') THEN `f3` '.
|
||||
'WHEN `f4t` IN ('.$fieldType.') THEN `f4` '.
|
||||
'WHEN `f5t` IN ('.$fieldType.') THEN `f5` '.
|
||||
'WHEN `f6t` IN ('.$fieldType.') THEN `f6` '.
|
||||
'WHEN `f7t` IN ('.$fieldType.') THEN `f7` '.
|
||||
'WHEN `f8t` IN ('.$fieldType.') THEN `f8` '.
|
||||
'WHEN `f9t` IN ('.$fieldType.') THEN `f9` '.
|
||||
'WHEN `f10t` IN ('.$fieldType.') THEN `f10` '.
|
||||
'WHEN `f11t` IN ('.$fieldType.') THEN `f11` '.
|
||||
'WHEN `f12t` IN ('.$fieldType.') THEN `f12` '.
|
||||
'WHEN `f13t` IN ('.$fieldType.') THEN `f13` '.
|
||||
'WHEN `f14t` IN ('.$fieldType.') THEN `f14` '.
|
||||
'WHEN `f15t` IN ('.$fieldType.') THEN `f15` '.
|
||||
'WHEN `f16t` IN ('.$fieldType.') THEN `f16` '.
|
||||
'WHEN `f17t` IN ('.$fieldType.') THEN `f17` '.
|
||||
'WHEN `f18t` IN ('.$fieldType.') THEN `f18` '.
|
||||
'WHEN `f19t` IN ('.$fieldType.') THEN `f19` '.
|
||||
'WHEN `f20t` IN ('.$fieldType.') THEN `f20` '.
|
||||
'WHEN `f21t` IN ('.$fieldType.') THEN `f21` '.
|
||||
'WHEN `f22t` IN ('.$fieldType.') THEN `f22` '.
|
||||
'WHEN `f23t` IN ('.$fieldType.') THEN `f23` '.
|
||||
'WHEN `f24t` IN ('.$fieldType.') THEN `f24` '.
|
||||
'WHEN `f25t` IN ('.$fieldType.') THEN `f25` '.
|
||||
'WHEN `f26t` IN ('.$fieldType.') THEN `f26` '.
|
||||
'WHEN `f27t` IN ('.$fieldType.') THEN `f27` '.
|
||||
'WHEN `f28t` IN ('.$fieldType.') THEN `f28` '.
|
||||
'WHEN `f29t` IN ('.$fieldType.') THEN `f29` '.
|
||||
'WHEN `f30t` IN ('.$fieldType.') THEN `f30` '.
|
||||
'WHEN `f31t` IN ('.$fieldType.') THEN `f31` '.
|
||||
'WHEN `f32t` IN ('.$fieldType.') THEN `f32` '.
|
||||
'WHEN `f33t` IN ('.$fieldType.') THEN `f33` '.
|
||||
'WHEN `f34t` IN ('.$fieldType.') THEN `f34` '.
|
||||
'WHEN `f35t` IN ('.$fieldType.') THEN `f35` '.
|
||||
'WHEN `f36t` IN ('.$fieldType.') THEN `f36` '.
|
||||
'WHEN `f37t` IN ('.$fieldType.') THEN `f37` '.
|
||||
'WHEN `f38t` IN ('.$fieldType.') THEN `f38` '.
|
||||
'WHEN `f39t` IN ('.$fieldType.') THEN `f39` '.
|
||||
'WHEN `f40t` IN ('.$fieldType.') THEN `f40` '.
|
||||
'WHEN `f99t` IN ('.$fieldType.') THEN `f99` '.
|
||||
'ELSE 0 '.
|
||||
'END AS level '.
|
||||
'FROM `'.TB_PREFIX.'fdata` '.
|
||||
'WHERE '.
|
||||
'`vref` = '.$vid.' '.
|
||||
'AND ('.
|
||||
'`f1t` IN ('.$fieldType.') OR '.
|
||||
'`f2t` IN ('.$fieldType.') OR '.
|
||||
'`f3t` IN ('.$fieldType.') OR '.
|
||||
'`f4t` IN ('.$fieldType.') OR '.
|
||||
'`f5t` IN ('.$fieldType.') OR '.
|
||||
'`f6t` IN ('.$fieldType.') OR '.
|
||||
'`f7t` IN ('.$fieldType.') OR '.
|
||||
'`f8t` IN ('.$fieldType.') OR '.
|
||||
'`f9t` IN ('.$fieldType.') OR '.
|
||||
'`f10t` IN ('.$fieldType.') OR '.
|
||||
'`f11t` IN ('.$fieldType.') OR '.
|
||||
'`f12t` IN ('.$fieldType.') OR '.
|
||||
'`f13t` IN ('.$fieldType.') OR '.
|
||||
'`f14t` IN ('.$fieldType.') OR '.
|
||||
'`f15t` IN ('.$fieldType.') OR '.
|
||||
'`f16t` IN ('.$fieldType.') OR '.
|
||||
'`f17t` IN ('.$fieldType.') OR '.
|
||||
'`f18t` IN ('.$fieldType.') OR '.
|
||||
'`f19t` IN ('.$fieldType.') OR '.
|
||||
'`f20t` IN ('.$fieldType.') OR '.
|
||||
'`f20t` IN ('.$fieldType.') OR '.
|
||||
'`f21t` IN ('.$fieldType.') OR '.
|
||||
'`f22t` IN ('.$fieldType.') OR '.
|
||||
'`f23t` IN ('.$fieldType.') OR '.
|
||||
'`f24t` IN ('.$fieldType.') OR '.
|
||||
'`f25t` IN ('.$fieldType.') OR '.
|
||||
'`f26t` IN ('.$fieldType.') OR '.
|
||||
'`f27t` IN ('.$fieldType.') OR '.
|
||||
'`f28t` IN ('.$fieldType.') OR '.
|
||||
'`f29t` IN ('.$fieldType.') OR '.
|
||||
'`f30t` IN ('.$fieldType.') OR '.
|
||||
'`f30t` IN ('.$fieldType.') OR '.
|
||||
'`f31t` IN ('.$fieldType.') OR '.
|
||||
'`f32t` IN ('.$fieldType.') OR '.
|
||||
'`f33t` IN ('.$fieldType.') OR '.
|
||||
'`f34t` IN ('.$fieldType.') OR '.
|
||||
'`f35t` IN ('.$fieldType.') OR '.
|
||||
'`f36t` IN ('.$fieldType.') OR '.
|
||||
'`f37t` IN ('.$fieldType.') OR '.
|
||||
'`f38t` IN ('.$fieldType.') OR '.
|
||||
'`f39t` IN ('.$fieldType.') OR '.
|
||||
'`f40t` IN ('.$fieldType.') OR '.
|
||||
'`f99t` IN ('.$fieldType.')) '.
|
||||
'LIMIT 1');
|
||||
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
|
||||
|
||||
self::$fieldLevelsInVillageSearchCache[$vid.$fieldType] = $row['level'];
|
||||
@@ -5655,6 +5491,8 @@ References: User ID/Message ID, Mode
|
||||
list($moveid) = $this->escape_input($moveid);
|
||||
}
|
||||
|
||||
if(empty($moveid)) return;
|
||||
|
||||
// rather than re-selecting data and updating cache here, let's just
|
||||
// flush the cache and let it re-cach itself as neccessary
|
||||
self::$marketMovementCache = [];
|
||||
@@ -6012,6 +5850,7 @@ References: User ID/Message ID, Mode
|
||||
function addUnits($vid, $troopsArray = null) {
|
||||
list($vid, $type, $values) = $this->escape_input($vid, $type, $values);
|
||||
|
||||
if(empty($vid)) return;
|
||||
if (!is_array($vid)) $vid = [$vid];
|
||||
$types = $values = "";
|
||||
|
||||
@@ -6201,6 +6040,7 @@ References: User ID/Message ID, Mode
|
||||
}
|
||||
|
||||
function addTech($vid) {
|
||||
if(empty($vid)) return;
|
||||
if (!is_array($vid)) {
|
||||
$vid = [$vid];
|
||||
}
|
||||
@@ -6214,6 +6054,7 @@ References: User ID/Message ID, Mode
|
||||
}
|
||||
|
||||
function addABTech($vid) {
|
||||
if(empty($vid)) return;
|
||||
if (!is_array($vid)) {
|
||||
$vid = [$vid];
|
||||
}
|
||||
@@ -7056,9 +6897,13 @@ References: User ID/Message ID, Mode
|
||||
try {
|
||||
// check that we don't have the structure in place already
|
||||
// (we'd have at least 1 user present, since 4 are being created by default - Support, Nature, Multihunter & Taskmaster)
|
||||
$data_exist = $this->query_return("SELECT * FROM " . TB_PREFIX . "users LIMIT 1");
|
||||
if ($data_exist && count($data_exist)) {
|
||||
return false;
|
||||
try {
|
||||
$data_exist = $this->query_return("SELECT * FROM " . TB_PREFIX . "users LIMIT 1");
|
||||
if ($data_exist && count($data_exist)) {
|
||||
return false;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
|
||||
// load the DB structure SQL file
|
||||
@@ -7073,6 +6918,7 @@ References: User ID/Message ID, Mode
|
||||
return false;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
echo($e);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename Form.php ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename WorldWonderName.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename 404.tpl ##
|
||||
## Filename index.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
?>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename Generator.php ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
@@ -18,7 +18,7 @@ class MyGenerator {
|
||||
public function generateRandStr($length){
|
||||
$randstr = "";
|
||||
for($i = 0; $i < $length; $i++){
|
||||
$randnum = mt_rand(0, 61);
|
||||
$randnum = random_int(0, 61);
|
||||
if($randnum < 10) $randstr .= chr($randnum + 48);
|
||||
else if($randnum < 36) $randstr .= chr($randnum + 55);
|
||||
else $randstr .= chr($randnum + 61);
|
||||
|
||||
+1488
-1258
File diff suppressed because it is too large
Load Diff
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename 404.tpl ##
|
||||
## Filename index.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
?>
|
||||
|
||||
+1488
-1257
File diff suppressed because it is too large
Load Diff
@@ -4,8 +4,8 @@
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename Logging.php ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename Mailer.php ##
|
||||
## Developed by: Dixie ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
## Filename Market.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## Some fixes: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Credits: All the developers including the leaders: |
|
||||
| Advocaite & Dzoki & Donnchadh |
|
||||
| |
|
||||
| Copyright: TravianX Project All rights reserved |
|
||||
| Copyright: TravianZ Project All rights reserved |
|
||||
\** --------------------------------------------------- **/
|
||||
|
||||
class Message {
|
||||
@@ -407,7 +407,7 @@ class Message {
|
||||
$userally = $database->getUserField($session->uid,"alliance",0);
|
||||
$permission=mysqli_fetch_array(mysqli_query($database->dblink,"SELECT opt7 FROM ".TB_PREFIX."ali_permission WHERE uid='".$session->uid."'"));
|
||||
|
||||
if(WORD_CENSOR) {
|
||||
if(defined('WORD_CENSOR')) {
|
||||
$topic = $this->wordCensor($topic);
|
||||
$text = $this->wordCensor($text);
|
||||
}
|
||||
@@ -496,7 +496,7 @@ class Message {
|
||||
}
|
||||
|
||||
// Vulnerability closed by Shadow
|
||||
if(WORD_CENSOR) {
|
||||
if(defined('WORD_CENSOR')) {
|
||||
$topic = $this->wordCensor($topic);
|
||||
$text = $this->wordCensor($text);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename Multisort.php ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename Profile.php ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
## Filename Protection.php ##
|
||||
## Developed by: SlimShady ##
|
||||
## Edited by: Dzoki & Dixie ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
| Credits: All the developers including the leaders: |
|
||||
| Advocaite & Dzoki & Donnchadh |
|
||||
| |
|
||||
| Copyright: TravianX Project All rights reserved |
|
||||
| Copyright: TravianZ Project All rights reserved |
|
||||
\** --------------------------------------------------- **/
|
||||
|
||||
class Ranking {
|
||||
@@ -163,7 +163,7 @@
|
||||
private function getStart($search) {
|
||||
$multiplier = 1;
|
||||
if(!is_numeric($search)) {
|
||||
$_SESSION['search'] = $search;
|
||||
$_SESSION['search'] = htmlspecialchars($search);
|
||||
} else {
|
||||
if($search > count($this->rankarray)) {
|
||||
$search = count($this->rankarray) - 1;
|
||||
@@ -172,8 +172,8 @@
|
||||
$multiplier += 1;
|
||||
}
|
||||
$start = 20 * $multiplier - 19 - 1;
|
||||
$_SESSION['search'] = $search;
|
||||
$_SESSION['start'] = $start;
|
||||
$_SESSION['search'] = htmlspecialchars($search);
|
||||
$_SESSION['start'] = htmlspecialchars($start);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,9 @@ class Session {
|
||||
global $database; //TienTN fix
|
||||
|
||||
$this->time = time();
|
||||
if (!isset($_SESSION)) session_start();
|
||||
if (!isset($_SESSION)) {
|
||||
session_start();
|
||||
}
|
||||
|
||||
$this->logged_in = $this->checkLogin();
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename Technology.php ##
|
||||
## Developed by: Dzoki ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename Village.php ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2011. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
## ##
|
||||
## Test functions so far mini template parser ##
|
||||
## Author : Advocaite ##
|
||||
## Project : TravianX ##
|
||||
## Project : TravianZ ##
|
||||
## ##
|
||||
############################################################
|
||||
function addSub($subName, $sub)
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
#################################################################################
|
||||
## -= YOU MAY NOT REMOVE OR CHANGE THIS NOTICE =- ##
|
||||
## --------------------------------------------------------------------------- ##
|
||||
## Filename 404.tpl ##
|
||||
## Filename index.php ##
|
||||
## Developed by: aggenkeech ##
|
||||
## License: TravianX Project ##
|
||||
## Copyright: TravianX (c) 2010-2012. All rights reserved. ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2025. All rights reserved. ##
|
||||
## ##
|
||||
#################################################################################
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user