Fix + Redesign
Fix some error programing code and redesign special medals, tribe medals, mh medals, taskmaster medals, natars medals, nature medals, protection medals, etc. Add some language code in Profile.php and preference.tpl. Change some description in struct database for Nature and Taskmaster
@@ -35,7 +35,7 @@ if(isset($id)) {
|
||||
.editAdd-head h2 a{color:#71D000;text-decoration:none;}
|
||||
.editAdd-head .uid{font-size:12px;color:#666;}
|
||||
|
||||
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
|
||||
.grid-2{display:grid;grid-template-columns:1fr;gap:12px;}
|
||||
@media(max-width:800px){.grid-2{grid-template-columns:1fr;}}
|
||||
|
||||
.card{background:#fff;border:1px solid #d4d4d4;border-radius:4px;overflow:hidden;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.04);}
|
||||
|
||||
@@ -282,7 +282,7 @@ if (!empty($_GET['p'])) {
|
||||
$village = $database->getVillage($did);
|
||||
if ($village) {
|
||||
$user = $database->getUserArray($village['owner'], 1);
|
||||
$subpage = 'Edit Village ('.$village['name'].' » '.($user['username'] ?? '?').')';
|
||||
$subpage = 'Edit Village ('.$village['name'].' » '.($user['username'] ?? '?').')';
|
||||
} else {
|
||||
$subpage = 'Edit Village (ID '.$did.' not found)';
|
||||
$village = null; // important, ca să nu crape template-ul mai jos
|
||||
@@ -297,7 +297,7 @@ if (!empty($_GET['p'])) {
|
||||
$village = $database->getVillage($_GET['did']);
|
||||
if ($village) {
|
||||
$user = $database->getUserArray($village['owner'], 1);
|
||||
$subpage = 'Edit Troops ('.$village['name'].' » '.$user['username'].')';
|
||||
$subpage = 'Edit Resources ('.$village['name'].' » '.$user['username'].')';
|
||||
} else {
|
||||
$subpage = 'Edit Resources (ID '.$did.' not found)';
|
||||
$village = null;
|
||||
@@ -311,7 +311,7 @@ if (!empty($_GET['p'])) {
|
||||
if (!empty($_GET['did'])) {
|
||||
$village = $database->getVillage($_GET['did']);
|
||||
$user = $database->getUserArray($village['owner'], 1);
|
||||
$subpage = 'Edit Troops ('.$village['name'].' » '.$user['username'].')';
|
||||
$subpage = 'Edit Troops ('.$village['name'].' » '.$user['username'].')';
|
||||
} else {
|
||||
$subpage = 'Edit Troops (no village)';
|
||||
}
|
||||
@@ -321,7 +321,7 @@ if (!empty($_GET['p'])) {
|
||||
if (!empty($_GET['did'])) {
|
||||
$village = $database->getVillage($_GET['did']);
|
||||
$user = $database->getUserArray($village['owner'],1);
|
||||
$subpage = 'Upgrade Troops ('.$village['name'].' » '.$user['username'].')';
|
||||
$subpage = 'Upgrade Troops ('.$village['name'].' » '.$user['username'].')';
|
||||
} else {
|
||||
$subpage = 'Upgrade Troops (no village)';
|
||||
}
|
||||
@@ -331,7 +331,7 @@ if (!empty($_GET['p'])) {
|
||||
if (!empty($_GET['did'])) {
|
||||
$village = $database->getVillage($_GET['did']);
|
||||
$user = $database->getUserArray($village['owner'],1);
|
||||
$subpage = 'Edit Village ('.$village['name'].' » '.$user['username'].')';
|
||||
$subpage = 'Edit Village ('.$village['name'].' » '.$user['username'].')';
|
||||
} else {
|
||||
$subpage = 'Edit Village (no village)';
|
||||
}
|
||||
@@ -341,7 +341,7 @@ if (!empty($_GET['p'])) {
|
||||
if (!empty($_GET['did'])) {
|
||||
$village = $database->getVillage($_GET['did']);
|
||||
$user = $database->getUserArray($village['owner'],1);
|
||||
$subpage = 'Build Log ('.$village['name'].' » '.$user['username'].')';
|
||||
$subpage = 'Build Log ('.$village['name'].' » '.$user['username'].')';
|
||||
} else {
|
||||
$subpage = 'Build Log (no village)';
|
||||
}
|
||||
@@ -351,7 +351,7 @@ if (!empty($_GET['p'])) {
|
||||
if (!empty($_GET['did'])) {
|
||||
$village = $database->getVillage($_GET['did']);
|
||||
$user = $database->getUserArray($village['owner'],1);
|
||||
$subpage = 'Research Log ('.$village['name'].' » '.$user['username'].')';
|
||||
$subpage = 'Research Log ('.$village['name'].' » '.$user['username'].')';
|
||||
} else {
|
||||
$subpage = 'Research Log (no village)';
|
||||
}
|
||||
|
||||
@@ -45,6 +45,14 @@ class Artifacts
|
||||
NATARS_DESC = "**************************
|
||||
[#natars]
|
||||
**************************",
|
||||
|
||||
/**
|
||||
* @var string Default Natars' description 2
|
||||
*/
|
||||
|
||||
NATARS_DESC2 = "**************************
|
||||
[#WW]
|
||||
**************************",
|
||||
|
||||
/**
|
||||
* @var array Possible Natars' capital locations
|
||||
@@ -204,7 +212,7 @@ class Artifacts
|
||||
|
||||
//Register the Natars account, the Natars' password is the same as the MH's one
|
||||
$password = $database->getUserField(5, 'password', 0);
|
||||
$database->register(TRIBE5, $password, self::NATARS_EMAIL, self::NATARS_TRIBE, null, self::NATARS_UID, self::NATARS_DESC);
|
||||
$database->register(TRIBE5, $password, self::NATARS_EMAIL, self::NATARS_TRIBE, null, self::NATARS_UID, self::NATARS_DESC, self::NATARS_DESC2);
|
||||
|
||||
//Convert from coordinates to village IDs
|
||||
$possibleWids = $database->getVilWrefs(self::NATARS_CAPITAL_COORDINATES);
|
||||
|
||||
@@ -219,6 +219,21 @@ class Profile {
|
||||
$form->addError("email", EMAIL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
// Language change
|
||||
if (!empty($post['sprache'])) {
|
||||
// whitelist – pune aici limbile pe care le ai în /lang/
|
||||
$allowed = ['en','ro','de','it','fr','es'];
|
||||
$lang = strtolower(trim($post['sprache']));
|
||||
|
||||
if (in_array($lang, $allowed, true)) {
|
||||
$database->updateUserField($session->uid, "language", $lang, 1);
|
||||
|
||||
// update sesiunea ca să se vadă imediat, fără relog
|
||||
$_SESSION['lang'] = $lang;
|
||||
$session->userinfo['language'] = $lang;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete request cancel
|
||||
if (!empty($post['del_pw']) && !empty($post['del'])) {
|
||||
|
||||
@@ -116,7 +116,7 @@ $inProgress =!empty($Demolition)? $Demolition[0] : null;
|
||||
|
||||
<label style="margin:0 10px;">
|
||||
<input type="checkbox" name="instant" value="1" id="instant_demolish" <?= $session->gold < 10 ? 'disabled' : ''?>>
|
||||
Demolare completă (10 <img src="img/x.gif" class="gold" style="vertical-align:middle">)
|
||||
Complete demolition (10 <img src="img/x.gif" class="gold" style="vertical-align:middle">)
|
||||
</label>
|
||||
|
||||
<input id="btn_demolish" name="demolish" class="dynamic_img" value="Demolish" type="image" src="img/x.gif" alt="Demolish" title="<?= DEMOLISH?>" onclick="return verify_demolition();">
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<h1><img class="unit ugeb" src="img/x.gif" alt="Special Medals" title="Special Medals" /> Special Medals</h1>
|
||||
|
||||
<div id="t_desc">The medal of which is awarded to players losing by the same email address of 10 or more years. Can be added to the profile description. This function was presented in Travian T4.</div>
|
||||
<br>
|
||||
|
||||
<div style="max-height:320px; overflow-y:auto; overflow-x:hidden; padding-right:4px;">
|
||||
<center><img src="gpack/travian_default/img/gloriamedals/artifact.png"></center>
|
||||
<center><img src="gpack/travian_default/img/gloriamedals/ww_builder.png"></center>
|
||||
<center><img src="gpack/travian_default/img/gloriamedals/ww_winner.png"></center>
|
||||
<center><img src="gpack/travian_default/img/gloriamedals/greatstore.png"></center>
|
||||
<center><img src="gpack/travian_default/img/gloriamedals/wallmaster.png"></center>
|
||||
<center><img src="gpack/travian_default/img/gloriamedals/hero.png"></center>
|
||||
</div>
|
||||
|
||||
<map id="nav" name="nav">
|
||||
<area href="manual.php?typ=11&s=24" title="back" coords="0,0,45,18" shape="rect" alt="" />
|
||||
<area href="manual.php?typ=13&s=31" title="new features" coords="46,0,70,18" shape="rect" alt="" />
|
||||
<area href="manual.php?typ=13&s=31" title="forward" coords="71,0,116,18" shape="rect" alt="" />
|
||||
</map>
|
||||
<img usemap="#nav" src="img/x.gif" class="navi" alt="" />
|
||||
@@ -16,7 +16,7 @@
|
||||
<li><a href="manual.php?typ=11&gid=23">Medal Veteran Player</a> <?php echo NEW_FUNCTIONS_MEDAL_3YEAR ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></li>
|
||||
<li><a href="manual.php?typ=11&gid=24">Medal Veteran Player 5a</a> <?php echo NEW_FUNCTIONS_MEDAL_5YEAR ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></li>
|
||||
<li><a href="manual.php?typ=11&gid=25">Medal Veteran Player 10a</a> <?php echo NEW_FUNCTIONS_MEDAL_10YEAR ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></li>
|
||||
|
||||
<li><a href="manual.php?typ=11&gid=26">Special Medals</a> <?php echo NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM ? "<b><font color='Green'>Enabled</font></b>" : "<b><font color='Red'>Disabled</font></b>"; ?></li>
|
||||
</ul>
|
||||
|
||||
<map id="nav" name="nav">
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
## Fixed by: Shadow / Skype : cata7007 ##
|
||||
## License: TravianZ Project ##
|
||||
## Copyright: TravianZ (c) 2010-2026. All rights reserved. ##
|
||||
## URLs: http://travianz.org ##
|
||||
## URLs: http://travianz.org ##
|
||||
## Source code: http://github.com/Shadowss/TravianZ-by-Shadow/ ##
|
||||
## ##
|
||||
#################################################################################
|
||||
@@ -38,12 +38,6 @@ $geregistreerd=date('d.m.Y', ($displayarray['regtime']));
|
||||
$profiel = preg_replace("/\[#0]/is",'<img src="'.$gpack.'img/t/tnd.gif" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>This player registered his account on '.$geregistreerd.'.</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
|
||||
//natar image
|
||||
if($displayarray['username'] == "Natars"){
|
||||
$profiel = preg_replace("/\[#natars]/is",'<img src="'.$gpack.'img/t/t10_2.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Official Natar account</td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#WW]/is",'<img src="'.$gpack.'img/t/g40_11-ltr.png" width="250" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Official World Wonder Village</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
|
||||
// Added by Shadow - cata7007@gmail.com / Skype : cata7007
|
||||
if(NEW_FUNCTIONS_TRIBE_IMAGES){
|
||||
if($displayarray['tribe'] == "1"){
|
||||
@@ -55,15 +49,6 @@ if(NEW_FUNCTIONS_TRIBE_IMAGES){
|
||||
}
|
||||
}
|
||||
|
||||
//Shadow image - 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("/\[#SHADOW]/is",'<img src="'.$gpack.'img/t/shadow.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Official Server Administrator</td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#MH]/is",'<img src="'.$gpack.'img/t/MH.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>The Multihunter is an official Travian position mainly used for enforcement of Travian rules within a server. Multihunters all use the account named Multihunter with its only village located in (0|0). A Multihunter may not play on the server on which they are the Multihunter, but be an active player on other servers. </td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#TEAM]/is",'<img src="'.$gpack.'img/t/team.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Travian is a persistent, browser-based, massively multiplayer, online real-time strategy game developed by the German software company Travian Games. It was originally written and released in June 2004 by Gerhard Müller. Set in classical antiquity, Travian is a predominantly militaristic real-time strategy game.</td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#EVENT]/is",'<img src="'.$gpack.'img/t/t10_1.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>You played on Travian Hammelburg Event. Congrats !</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
|
||||
// =========================
|
||||
// NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM - DYNAMIC
|
||||
// =========================
|
||||
@@ -195,7 +180,8 @@ if(defined('NEW_FUNCTIONS_SPECIAL_MEDALS_SYSTEM') && NEW_FUNCTIONS_SPECIAL_MEDAL
|
||||
|
||||
}
|
||||
|
||||
// Added by Shadow - cata7007@gmail.com / Skype : cata7007
|
||||
// METHOD CODED IN CONFIG
|
||||
// Added by Shadow - cata7007@gmail.com
|
||||
if(NEW_FUNCTIONS_MHS_IMAGES){
|
||||
if($displayarray['access'] == "9"){
|
||||
$profiel = preg_replace("/\[#MULTIHUNTER]/is",'<img src="'.$gpack.'img/t/t6_1.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Official Server Global Multihunter</td></tr></table>\')">', $profiel, 1);
|
||||
@@ -208,27 +194,46 @@ if(NEW_FUNCTIONS_MHS_IMAGES){
|
||||
}
|
||||
}
|
||||
|
||||
//NATURE image - MUST TO BE SET FROM ADMIN PANEL @iopietro must code
|
||||
// Added by Shadow - cata7007@gmail.com / Skype : cata7007
|
||||
if($displayarray['username'] == "Nature"){
|
||||
$profiel = preg_replace("/\[#NATURE]/is",'<img src="'.$gpack.'img/t/nature.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Natures troops are the animals living in unoccupied oases. You can use the combat simulator to see whether you have enough troops to defeat the animals in an oasis you want to conquer, but remember that you can only raid oasis. Keep in mind that all the animals above Bear can kill its contemporary max tier travian troop in single combat. </td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
|
||||
//Taskmaster image - MUST TO BE SET FROM ADMIN PANEL @iopietro must code
|
||||
// Added by Shadow - cata7007@gmail.com / Skype : cata7007
|
||||
if($displayarray['username'] == "Taskmaster"){
|
||||
$profiel = preg_replace("/\[#TASKMASTER]/is",'<img src="'.$gpack.'img/t/taskmaster.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Taskmaster Account</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
|
||||
//veteran & veteran_5a IMAGES
|
||||
// METHOD CODED IN CONFIG
|
||||
// VETERAN & VETERAN 5 YEARS & VETERAN 10 YEARS IMAGES
|
||||
if(NEW_FUNCTIONS_MEDAL_3YEAR){
|
||||
$profiel = preg_replace("/\[#g2300]/is",'<img src="'.$gpack.'img/t/Veteran_Medal.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Veteran Player<br><br>Medal achieved for playing 3 years of Travian.</td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#g2300]/is",'<img src="'.$gpack.'img/t/Veteran_Medal.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Veteran Player 3 Years<br><br>Medal achieved for playing 3 years of Travian.</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
if(NEW_FUNCTIONS_MEDAL_5YEAR){
|
||||
$profiel = preg_replace("/\[#g2301]/is",'<img src="'.$gpack.'img/t/5year_medal.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Veteran Player 5a<br><br>Medal achieved for playing 5 years of Travian.</td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#g2301]/is",'<img src="'.$gpack.'img/t/5year_medal.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Veteran Player 5 Years<br><br>Medal achieved for playing 5 years of Travian.</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
if(NEW_FUNCTIONS_MEDAL_10YEAR){
|
||||
$profiel = preg_replace("/\[#g2302]/is",'<img src="'.$gpack.'img/t/10_year_medal.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Veteran Player 10a<br><br>Medal achieved for playing 10 years of Travian.</td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#g2302]/is",'<img src="'.$gpack.'img/t/10_year_medal.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Veteran Player 10 Years<br><br>Medal achieved for playing 10 years of Travian.</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
|
||||
// NO NEED TO CODE THIS METHOD
|
||||
// Added by Shadow - cata7007@gmail.com
|
||||
if($displayarray['username'] == "Shadow"){
|
||||
$profiel = preg_replace("/\[#SHADOW]/is",'<img src="'.$gpack.'img/t/shadow.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Official Server Administrator of TravianZ Project</td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#MH]/is",'<img src="'.$gpack.'img/t/MH.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>The Multihunter is an official Travian position mainly used for enforcement of Travian rules within a server. Multihunters all use the account named Multihunter with its only village located in (0|0). A Multihunter may not play on the server on which they are the Multihunter, but be an active player on other servers. </td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#TEAM]/is",'<img src="'.$gpack.'img/t/team.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Travian is a persistent, browser-based, massively multiplayer, online real-time strategy game developed by the German software company Travian Games. It was originally written and released in June 2004 by Gerhard Müller. Set in classical antiquity, Travian is a predominantly militaristic real-time strategy game.</td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#EVENT]/is",'<img src="'.$gpack.'img/t/t10_1.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>You played on Travian Hammelburg Event. Congrats !</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
|
||||
// NO NEED TO CODE THIS METHOD NATARS
|
||||
// Added by Shadow - cata7007@gmail.com
|
||||
if($displayarray['username'] == "Natars"){
|
||||
$profiel = preg_replace("/\[#natars]/is",'<img src="'.$gpack.'img/t/t10_2.jpg" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Official Natar account</td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#WW]/is",'<img src="'.$gpack.'img/t/g40_11-ltr.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Official World Wonder Village</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
|
||||
// NO NEED TO CODE THIS METHOD NATURE
|
||||
// Added by Shadow - cata7007@gmail.com
|
||||
if($displayarray['username'] == "Nature"){
|
||||
$profiel = preg_replace("/\[#NATURE]/is",'<img src="'.$gpack.'img/t/nature.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Natures troops are the animals living in unoccupied oases. You can use the combat simulator to see whether you have enough troops to defeat the animals in an oasis you want to conquer, but remember that you can only raid oasis. Keep in mind that all the animals above Bear can kill its contemporary max tier travian troop in single combat. </td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#NATURE2]/is",'<img src="'.$gpack.'img/t/nature2.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Natures troops are the animals living in unoccupied oases. You can use the combat simulator to see whether you have enough troops to defeat the animals in an oasis you want to conquer, but remember that you can only raid oasis. Keep in mind that all the animals above Bear can kill its contemporary max tier travian troop in single combat. </td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
|
||||
// NO NEED TO CODE THIS METHOD TASKMASTER
|
||||
// Added by Shadow - cata7007@gmail.com
|
||||
if($displayarray['username'] == "Taskmaster"){
|
||||
$profiel = preg_replace("/\[#TASKMASTER]/is",'<img src="'.$gpack.'img/t/taskmaster.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Taskmaster Account</td></tr></table>\')">', $profiel, 1);
|
||||
$profiel = preg_replace("/\[#TASKMASTER2]/is",'<img src="'.$gpack.'img/t/taskmaster2.png" border="0" onmouseout="med_closeDescription()" onmousemove="med_mouseMoveHandler(arguments[0],\'<table><tr><td>Taskmaster Account</td></tr></table>\')">', $profiel, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -194,13 +194,10 @@ if (isset($_POST['v1']) || isset($_POST['v2']) || isset($_POST['timezone']) || i
|
||||
// =========================
|
||||
|
||||
$lang = LANG;
|
||||
|
||||
if(isset($_POST['lang']))
|
||||
{
|
||||
$allowedLangs = ['en','ro','de','fr','es','it','ru','tr'];
|
||||
|
||||
$selectedLang = strtolower(trim($_POST['lang']));
|
||||
|
||||
if(in_array($selectedLang, $allowedLangs))
|
||||
{
|
||||
$lang = $selectedLang;
|
||||
|
||||
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 140 KiB |
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 138 KiB |
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 118 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 37 KiB |
|
After Width: | Height: | Size: 85 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 38 KiB |
@@ -64,8 +64,8 @@
|
||||
strtolower($_POST['aname']) != 'multihunter' &&
|
||||
strtolower($_POST['aname']) != 'support'
|
||||
) {
|
||||
mysqli_query($database->dblink, "INSERT INTO " . TB_PREFIX . "users SET username = '".$database->escape($_POST['aname'])."', password = '" . password_hash($_POST['apass'], PASSWORD_BCRYPT, ['cost' => 12]) . "', email = '".$database->escape($_POST['aemail'])."', tribe = ".(int) $_POST['atribe'].", access = 9, is_bcrypt = 1") OR DIE (mysqli_error($database->dblink));
|
||||
$uid = mysqli_insert_id($database->dblink);
|
||||
mysqli_query($database->dblink, "INSERT INTO " . TB_PREFIX . "users SET username = '".$database->escape($_POST['aname'])."', password = '" . password_hash($_POST['apass'], PASSWORD_BCRYPT, ['cost' => 12]) . "', email = '".$database->escape($_POST['aemail'])."', tribe = ".(int) $_POST['atribe'].", access = 9, is_bcrypt = 1, desc1 = '[#MULTIHUNTER]', desc2 = '[#MH]\n[#TEAM]'") OR DIE (mysqli_error($database->dblink));
|
||||
$uid = mysqli_insert_id($database->dblink);
|
||||
$admin_village_created = false;
|
||||
$xcoor = round(WORLD_MAX / 2);
|
||||
$addUnitsWrefs = [];
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
// set up MultiHunter
|
||||
$password = $_POST['mhpw'];
|
||||
mysqli_query($database->dblink, "UPDATE " . TB_PREFIX . "users SET password = '" . password_hash($password, PASSWORD_BCRYPT,['cost' => 12]) . "' WHERE username = 'Multihunter'");
|
||||
mysqli_query($database->dblink, "UPDATE " . TB_PREFIX . "users SET password = '" . password_hash($password, PASSWORD_BCRYPT,['cost' => 12]) . "', desc1 = '[#MH]', desc2 = '[#MULTIHUNTER]' WHERE username = 'Multihunter'");
|
||||
$wid = $admin->getWref(0, 0);
|
||||
$uid = 5;
|
||||
$status = $database->getVillageState($wid);
|
||||
|
||||
@@ -1646,8 +1646,8 @@ CREATE TABLE IF NOT EXISTS `%PREFIX%users` (
|
||||
|
||||
INSERT INTO `%PREFIX%users` (`id`, `username`, `password`, `email`, `tribe`, `access`, `gold`, `gender`, `birthday`, `location`, `desc1`, `desc2`, `plus`, `b1`, `b2`, `b3`, `b4`, `sit1`, `sit2`, `alliance`, `sessid`, `act`, `timestamp`, `ap`, `apall`, `dp`, `dpall`, `protect`, `quest`, `gpack`, `cp`, `lastupdate`, `RR`, `Rc`, `ok`, `is_bcrypt`) VALUES
|
||||
(1, 'Support', '', 'support@travianz.game', 0, 8, 0, 0, '1970-01-01', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, '/gpack/travian_default/', 1, 0, 0, 0, 0, 1),
|
||||
(2, 'Nature', '', 'nature@travianz.game', 4, 2, 0, 0, '1970-01-01', '', '[#NATURE]', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, '/gpack/travian_default/', 1, 0, 0, 0, 0, 1),
|
||||
(4, 'Taskmaster', '', 'taskmaster@travianz.game', 0, 8, 0, 0, '1970-01-01', '', '[#TASKMASTER]', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, '/gpack/travian_default/', 1, 0, 0, 0, 0, 1),
|
||||
(2, 'Nature', '', 'nature@travianz.game', 4, 2, 0, 0, '1970-01-01', '', '[#NATURE]', '[#NATURE2]', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, '/gpack/travian_default/', 1, 0, 0, 0, 0, 1),
|
||||
(4, 'Taskmaster', '', 'taskmaster@travianz.game', 0, 8, 0, 0, '1970-01-01', '', '[#TASKMASTER]', '[#TASKMASTER2]', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, '/gpack/travian_default/', 1, 0, 0, 0, 0, 1),
|
||||
(5, 'Multihunter', '', 'multihunter@travianz.game', 1, 8, 0, 0, '1970-01-01', '', '[#MH]', '[#MULTIHUNTER]', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, '/gpack/travian_default/', 1, 0, 0, 0, 0, 1);
|
||||
|
||||
ALTER TABLE `%PREFIX%users` AUTO_INCREMENT=6;
|
||||
|
||||