mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
General fixes
+Oases are now displayed in the players profile +Fixed a bug that showed a wrong localization in the Castle
This commit is contained in:
@@ -25,7 +25,7 @@ if(!empty($allMessages)){
|
||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/lang.css?f4b7d" rel="stylesheet" type="text/css">
|
||||
<link href="../<?php echo GP_LOCATE; ?>lang/en/compact.css?f4b7i" rel="stylesheet" type="text/css">
|
||||
<link href="../<?php echo GP_LOCATE; ?>travian.css?e21d2" rel="stylesheet" type="text/css">
|
||||
<h1>Players Messages</h1>
|
||||
<h1>Players Message</h1>
|
||||
<div id="content" class="messages" style="padding: 0;">
|
||||
<?php
|
||||
include("Message/inbox.tpl");
|
||||
|
||||
@@ -4,7 +4,7 @@ if(time() - (!empty($_SESSION['time_p']) ? $_SESSION['time_p'] : 0) > 5){
|
||||
$_SESSION['error_p'] = '';
|
||||
}
|
||||
|
||||
if($_POST and $_GET['action'] == 'change_capital'){
|
||||
if($_POST and $_GET['action'] == 'change_capital' && !$village->capital){
|
||||
$pass = mysqli_escape_string($database->dblink, $_POST['pass']);
|
||||
$query = mysqli_query($database->dblink, 'SELECT password FROM `'.TB_PREFIX.'users` WHERE `id` = '.(int)$session->uid);
|
||||
$data = mysqli_fetch_assoc($query);
|
||||
@@ -16,29 +16,31 @@ if($_POST and $_GET['action'] == 'change_capital'){
|
||||
if($data2['vref'] != $village->wid){
|
||||
for($i = 1; $i <= 18; ++$i){
|
||||
if($data2['f'.$i] > 10){
|
||||
$query2 = mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'` = 10 WHERE `vref` = '.(int)$data2['vref']) or die(mysqli_error($database->dblink));
|
||||
$query2 = mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'` = 10 WHERE `vref` = '.(int)$data2['vref']);
|
||||
}
|
||||
}
|
||||
for($i = 19; $i <= 40; ++$i){
|
||||
if($data2['f'.$i.'t'] == 34){
|
||||
$query3 = mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'t` = 0, `f'.$i.'` = 0 WHERE `vref` = '.(int)$data2['vref']) or die(mysqli_error($database->dblink));
|
||||
$query3 = mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'t` = 0, `f'.$i.'` = 0 WHERE `vref` = '.(int)$data2['vref']);
|
||||
}
|
||||
}
|
||||
|
||||
for($i = 19; $i <= 40; ++$i){
|
||||
if($data2['f'.$i.'t'] == 29 || $data2['f'.$i.'t'] == 30 || $data2['f'.$i.'t'] == 38 || $data2['f'.$i.'t'] == 39 || $data2['f'.$i.'t'] == 42){
|
||||
$query3 = mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'t` = 0, `f'.$i.'` = 0 WHERE `vref` = '.(int)$village->wid) or die(mysqli_error($database->dblink));
|
||||
$query3 = mysqli_query($database->dblink, 'UPDATE `'.TB_PREFIX.'fdata` SET `f'.$i.'t` = 0, `f'.$i.'` = 0 WHERE `vref` = '.(int)$village->wid);
|
||||
}
|
||||
}
|
||||
|
||||
$database->changeCapital((int)$data1['wref'], 0);
|
||||
$database->changeCapital($village->wid);
|
||||
header("location: build.php?gid=26");
|
||||
exit;
|
||||
}
|
||||
}else{
|
||||
$error = '<br /><font color="red">'.LOGIN_PW_ERROR.'</font><br />';
|
||||
$_SESSION['error_p'] = $error;
|
||||
$_SESSION['time_p'] = time();
|
||||
print '<script language="javascript">location.href="build.php?id='.$building->getTypeField(26).'&confirm=yes";</script>';
|
||||
echo '<script language="javascript">location.href="build.php?id='.$building->getTypeField(26).'&confirm=yes";</script>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -62,7 +64,7 @@ else echo '<div class="c">'.PALACE_TRAIN_DESC.'</div>';
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($village->capital == $village->wid) {
|
||||
if($village->capital == 1) {
|
||||
?>
|
||||
<p class="none"><?php echo CAPITAL; ?></p>
|
||||
<?php
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Copyright: Travianx Project */
|
||||
|
||||
$oasisarray = $database->getOasis($village->wid);
|
||||
if(isset($_GET['gid']) && $_GET['gid']==37 && isset($_GET['del']) && $database->getOasisField($_GET['del'], 'owner') == $session->uid){
|
||||
if(isset($_GET['gid']) && $_GET['gid'] == 37 && isset($_GET['del']) && $database->getOasisField($_GET['del'], 'owner') == $session->uid){
|
||||
if($session->access != BANNED){
|
||||
$database->removeOases($_GET['del']);
|
||||
header("Location: build.php?id=".$id."&land");
|
||||
|
||||
@@ -48,10 +48,12 @@ include("menu2.tpl");
|
||||
<tr>
|
||||
<th colspan="2">Player <?php echo $displayarray['username']; ?></th>
|
||||
</tr>
|
||||
<?php if($displayarray['access']==ADMIN){ echo "<tr><th colspan='2'><font color='Red'><center><b>This player is Admin.</b></font></center></th></tr>"; } ?>
|
||||
<?php if($displayarray['access']==MULTIHUNTER){ echo "<tr><th colspan='2'><font color='Blue'><center><b>This player is Multihunter.</b></font></center></th></tr>"; } ?>
|
||||
<?php if($displayarray['access']==BANNED){ echo "<tr><th colspan='2'><font color='Green'><center><b>This player is BANNED.</b></font></center></th></tr>"; } ?>
|
||||
<?php if($displayarray['vac_mode']==1){ echo "<tr><th colspan='2'><font color='Maroon'><center><b>This player is on VACATION.</b></font></center></th></tr>"; } ?>
|
||||
<?php
|
||||
if($displayarray['access'] == ADMIN) echo "<tr><th colspan='2'><font color='Red'><center><b>This player is Admin.</b></font></center></th></tr>";
|
||||
if($displayarray['access'] == MULTIHUNTER) echo "<tr><th colspan='2'><font color='Blue'><center><b>This player is Multihunter.</b></font></center></th></tr>";
|
||||
if($displayarray['access'] == BANNED) echo "<tr><th colspan='2'><font color='Green'><center><b>This player is BANNED.</b></font></center></th></tr>";
|
||||
if($displayarray['vac_mode'] == 1) echo "<tr><th colspan='2'><font color='Maroon'><center><b>This player is on VACATION.</b></font></center></th></tr>";
|
||||
?>
|
||||
<tr>
|
||||
<td>Details</td>
|
||||
<td>Description</td>
|
||||
@@ -65,7 +67,7 @@ include("menu2.tpl");
|
||||
<td class="details">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
|
||||
<?php if($displayarray['access']==BANNED){ echo "<tr><td colspan='2'><center><b>Banned</b></center></td></tr>"; } ?>
|
||||
<?php if($displayarray['access'] == BANNED){ echo "<tr><td colspan='2'><center><b>Banned</b></center></td></tr>"; } ?>
|
||||
|
||||
<tr>
|
||||
|
||||
@@ -75,29 +77,17 @@ include("menu2.tpl");
|
||||
<tr>
|
||||
<th>Tribe</th>
|
||||
<td><?php
|
||||
if($displayarray['tribe'] == 1) {
|
||||
echo "Roman";
|
||||
}
|
||||
else if($displayarray['tribe'] == 2) {
|
||||
echo "Teutons";
|
||||
}
|
||||
else if($displayarray['tribe'] == 3) {
|
||||
echo "Gauls";
|
||||
}
|
||||
else if($displayarray['tribe'] == 4) {
|
||||
echo "Nature";
|
||||
|
||||
}else if($displayarray['tribe'] == 5) {
|
||||
echo "Natars";
|
||||
} ?></td>
|
||||
$tribeArrays = [TRIBE1, TRIBE2, TRIBE3, TRIBE4, TRIBE5];
|
||||
echo $tribeArrays[$displayarray['tribe'] - 1];
|
||||
?></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>Alliance</th>
|
||||
<td><?php if($displayarray['alliance'] == 0) {
|
||||
echo "-";
|
||||
}
|
||||
else {
|
||||
<td><?php
|
||||
if($displayarray['alliance'] == 0) echo "-";
|
||||
else
|
||||
{
|
||||
$displayalliance = $database->getAllianceName($displayarray['alliance']);
|
||||
echo "<a href=\"allianz.php?aid=".$displayarray['alliance']."\">".$displayalliance."</a>";
|
||||
} ?></td>
|
||||
@@ -114,21 +104,21 @@ include("menu2.tpl");
|
||||
<?php
|
||||
//Date of Birth
|
||||
if(isset($displayarray['birthday']) && $displayarray['birthday'] != 0) {
|
||||
$age = date('Y') - substr($displayarray['birthday'],0,4);
|
||||
if ((date('m') - substr($displayarray['birthday'],5,2)) < 0){$age --;}
|
||||
elseif ((date('m') - substr($displayarray['birthday'],5,2)) == 0){
|
||||
if(date('d') < substr($displayarray['birthday'],8,2)){$age --;}
|
||||
$age = date('Y') - substr($displayarray['birthday'], 0, 4);
|
||||
if ((date('m') - substr($displayarray['birthday'], 5, 2)) < 0) $age --;
|
||||
elseif ((date('m') - substr($displayarray['birthday'], 5, 2)) == 0){
|
||||
if(date('d') < substr($displayarray['birthday'], 8, 2)) $age --;
|
||||
}
|
||||
echo "<tr><th>Age</th><td>$age</td></tr>";
|
||||
}
|
||||
//Gender
|
||||
if(isset($displayarray['gender']) && $displayarray['gender'] != 0) {
|
||||
$gender = ($displayarray['gender']== 1)? "Male" : "Female";
|
||||
echo "<tr><th>Gender</th><td>".$gender."</td></tr>";
|
||||
$gender = ($displayarray['gender']== 1)? "Male" : "Female";
|
||||
echo "<tr><th>Gender</th><td>".$gender."</td></tr>";
|
||||
}
|
||||
//Location
|
||||
if($displayarray['location'] != "") {
|
||||
echo "<tr><th>Location</th><td>".$displayarray['location']."</td></tr>";
|
||||
echo "<tr><th>Location</th><td>".$displayarray['location']."</td></tr>";
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
@@ -159,10 +149,7 @@ include("menu2.tpl");
|
||||
<div><?php echo nl2br($profiel[1]); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><table cellpadding="1" cellspacing="1" id="villages">
|
||||
@@ -181,48 +168,41 @@ include("menu2.tpl");
|
||||
foreach($varray as $vil) {
|
||||
$coor = $database->getCoor($vil['wref']);
|
||||
echo "<tr><td class=\"nam\"><a href=\"karte.php?d=".$vil['wref']."&c=".$generator->getMapCheck($vil['wref'])."\">".$vil['name']."</a>";
|
||||
if($vil['capital'] == 1) {
|
||||
echo "<span class=\"none3\"> (capital)</span>";
|
||||
if($vil['capital'] == 1) echo "<span class=\"none3\"> (capital)</span>";
|
||||
echo "<td class=\"oases\">";
|
||||
|
||||
// OASIS PART - must to be activated from install part
|
||||
|
||||
$oases = $database->getOasis($vil['wref']);
|
||||
foreach ($oases as $oasis){
|
||||
switch ($oasis['type']) {
|
||||
case 1:
|
||||
case 2:
|
||||
echo "<img class='r1' src='img/x.gif' title='+25% Lumber'> ";
|
||||
break;
|
||||
case 3:
|
||||
echo "<img class='r1' src='img/x.gif' title='+25% Lumber'><img class='r4' src='img/x.gif' title='+25% Crop'> ";
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
echo "<img class='r2' src='img/x.gif' title='+25% Clay'> ";
|
||||
break;
|
||||
case 6:
|
||||
echo "<img class='r2' src='img/x.gif' title='+25% Clay'><img class='r4' src='img/x.gif' title='+25% Crop'> ";
|
||||
case 7:
|
||||
case 8:
|
||||
echo "<img class='r3' src='img/x.gif' title='+25% Iron'> ";
|
||||
break;
|
||||
case 9:
|
||||
echo "<img class='r3' src='img/x.gif' title='+25% Iron'><img class='r4' src='img/x.gif' title='+25% Crop'> ";
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
echo "<img class='r4' src='img/x.gif' title='+50% Crop'> ";
|
||||
break;
|
||||
}
|
||||
}
|
||||
echo "<td class=\"oases\"></td>";
|
||||
|
||||
// OASIS PART - must to be activated from install part
|
||||
|
||||
$prefix = "".TB_PREFIX."odata";
|
||||
$uid = $_GET['uid']; $wref = $vil['wref'];
|
||||
$sql = mysqli_query("SELECT * FROM $prefix WHERE owner = $uid AND conqured = $wref");
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$type = $row["type"];
|
||||
switch($type) {
|
||||
case 1:
|
||||
case 2:
|
||||
echo "<img class='r1' src='img/x.gif' title='Lumber'>";
|
||||
break;
|
||||
case 3:
|
||||
echo "<img class='r1' src='img/x.gif' title='Lumber'> <img class='r4' src='img/x.gif' title='Crop'>";
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
echo "<img class='r2' src='img/x.gif' title='Clay'>";
|
||||
break;
|
||||
case 6:
|
||||
echo "<img class='r2' src='img/x.gif' title='Clay'> <img class='r4' src='img/x.gif' title='Crop'>";
|
||||
case 7:
|
||||
case 8:
|
||||
echo "<img class='r3' src='img/x.gif' title='Iron'>";
|
||||
break;
|
||||
case 9:
|
||||
echo "<img class='r3' src='img/x.gif' title='Iron'> <img class='r4' src='img/x.gif' title='Crop'>";
|
||||
break;
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
echo "<img class='r4' src='img/x.gif' title='Crop'>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// OASIS PART - must to be activated from install part
|
||||
|
||||
echo "</td>";
|
||||
echo "<td class=\"hab\">".$vil['pop']."</td><td class=\"aligned_coords\">";
|
||||
|
||||
+2
-2
@@ -17,10 +17,10 @@ font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
/* Fix */
|
||||
.online1, .online2, .online3, .online4, .online5 {width:12px; height:12px;}
|
||||
/* Oberer Layer mit Menue ohne Werbung */
|
||||
#ltop1 {position:relative; padding-left: 25%; width:100%; min-width:980px; height:100px; z-index:2; background-image:url(../un/l/mp.gif); background-repeat:repeat-x; left:0px; top:0px;}
|
||||
#ltop1 {position:relative; width:100%; min-width:980px; height:100px; z-index:2; background-image:url(../un/l/mp.gif); background-repeat:repeat-x; left:0px; top:0px;}
|
||||
|
||||
/* Oberer Layer mit Menue mit Werbung */
|
||||
#ltop2 {position:relative; padding-left: 25%; width:100%; min-width:980px; height:100px; z-index:2; background-image:url(../un/l/mw.gif); background-repeat:repeat-x; left:0px; top:0px;}
|
||||
#ltop2 {position:relative; width:100%; min-width:980px; height:100px; z-index:2; background-image:url(../un/l/mw.gif); background-repeat:repeat-x; left:0px; top:0px;}
|
||||
|
||||
/* - VERALTET - Oberer Layer mit Mindestbreite fuer IE6 */
|
||||
/*#ltop3 {width:777px;} */
|
||||
|
||||
Reference in New Issue
Block a user