mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-15 09:06:08 +00:00
big update (details in comment)
This commit is contained in:
+106
-5
@@ -1,8 +1,14 @@
|
||||
<div id="content" class="map">
|
||||
<?php
|
||||
$basearray = $database->getMInfo($_GET['d']);
|
||||
$oasis1 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysql_escape_string($_GET['d']));
|
||||
$oasis = mysql_fetch_assoc($oasis1);
|
||||
?>
|
||||
<h1><?php echo !$basearray['occupied']? $basearray['fieldtype']? "Abandoned valley" : "Unoccupied oasis" : $basearray['name']; echo " (".$basearray['x']."|".$basearray['y'].")"; ?></h1>
|
||||
<h1><?php if($basearray['fieldtype']!=0){
|
||||
echo !$basearray['occupied']? $basearray['fieldtype']? "Abandoned valley" : "Unoccupied oasis" : $basearray['name']; echo " (".$basearray['x']."|".$basearray['y'].")";
|
||||
}else{
|
||||
echo $oasis['name']; echo " (".$basearray['x']."|".$basearray['y'].")";
|
||||
} ?></h1>
|
||||
<?php if($basearray['occupied'] && $basearray['capital']) { echo "<div id=\"dmain\">(capital)</div>"; } ?>
|
||||
|
||||
<img src="img/x.gif" id="detailed_map" class="<?php echo ($basearray['fieldtype'] == 0)? 'w'.$basearray['oasistype'] : 'f'.$basearray['fieldtype'] ?>" alt="<?php
|
||||
@@ -92,6 +98,7 @@ $landd = explode("-",$tt);?> />
|
||||
|
||||
<div id="map_details">
|
||||
<?php if($basearray['fieldtype'] == 0) {
|
||||
if($oasis['owner'] == 2){
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="bonus" class="tableNone bonus">
|
||||
<thead><tr>
|
||||
@@ -183,12 +190,102 @@ while($row = mysql_fetch_array($result)){
|
||||
<td>There is no
|
||||
<br>information available.</td>
|
||||
</tr>
|
||||
|
||||
<?php }} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}else if (!$basearray['occupied']) {
|
||||
}else{
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="village_info" class="tableNone">
|
||||
<?php
|
||||
$uinfo = $database->getUserArray($oasis['owner'],1); ?>
|
||||
<tbody><tr>
|
||||
<th>Tribe</th>
|
||||
<td><?php switch($uinfo['tribe']) { case 1: echo Romans; break; case 2: echo Teutons; break; case 3: echo Gauls; break; case 4: echo Nature; break; case 5: echo Natars; break;} ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Alliance</th>
|
||||
<?php if($uinfo['alliance'] == 0){
|
||||
echo '<td>-</td>';
|
||||
} else echo '
|
||||
<td><a href="allianz.php?aid='.$uinfo['alliance'].' ">'.$database->getUserAlliance($oasis['owner']).'</a></td>'; ?>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Owner</th>
|
||||
<td><a href="spieler.php?uid=<?php echo $oasis['owner']; ?>"><?php echo $database->getUserField($oasis['owner'],'username',0); ?></a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Village</th>
|
||||
<td><a href="karte.php?d=<?php echo $oasis['conqured'];?>&c=<?php echo $generator->getMapCheck($oasis['conqured']);?>"><?php echo $database->getVillageField($oasis['conqured'], "name");?> </a></td>
|
||||
</tr></tbody>
|
||||
</table>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="bonus" class="tableNone bonus">
|
||||
<thead><tr>
|
||||
<th>Bonus:</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
echo $ttt;
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<table cellpadding="1" cellspacing="1" id="troop_info" class="tableNone rep">
|
||||
<thead><tr>
|
||||
<th>Reports:</th>
|
||||
</tr></thead>
|
||||
<tbody>
|
||||
<?php
|
||||
if($session->uid == $database->getVillage($_GET['d'])){
|
||||
$limit = "ntype=0 and ntype=4 and ntype=5 and ntype=6 and ntype=7";
|
||||
}else{
|
||||
$limit = "ntype!=8 and ntype!=9 and ntype!=10 and ntype!=11 and ntype!=12 and ntype!=13 and ntype!=14";
|
||||
}
|
||||
$toWref = $_GET['d'];
|
||||
if($session->alliance!=0){
|
||||
$result = mysql_query("SELECT * FROM ".TB_PREFIX."ndata WHERE $limit AND ally = ".$session->alliance." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysql_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysql_fetch_array($result)){
|
||||
$dataarray = explode(",",$row['data']);
|
||||
$type = $row['ntype'];
|
||||
echo "<tr><td>";
|
||||
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
|
||||
$date = $generator->procMtime($row['time']);
|
||||
echo "<a href=\"berichte.php?id=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
}else{ ?>
|
||||
<tr>
|
||||
<td>There is no
|
||||
<br>information available.</td>
|
||||
</tr>
|
||||
|
||||
<?php }
|
||||
}else{
|
||||
$result = mysql_query("SELECT * FROM ".TB_PREFIX."ndata WHERE uid = ".$session->uid." AND toWref = ".$toWref." ORDER BY time DESC Limit 5");
|
||||
$query = mysql_num_rows($result);
|
||||
if($query != 0){
|
||||
while($row = mysql_fetch_array($result)){
|
||||
$dataarray = explode(",",$row['data']);
|
||||
$type = $row['ntype'];
|
||||
echo "<tr><td>";
|
||||
echo "<img src=\"img/x.gif\" class=\"iReport iReport".$row['ntype']."\" title=\"".$topic."\"> ";
|
||||
$date = $generator->procMtime($row['time']);
|
||||
echo "<a href=\"berichte.php?id=".$row['id']."\">".$date[0]." ".date('H:i',$row['time'])."</a> ";
|
||||
echo "</td></tr>";
|
||||
}
|
||||
}else{ ?>
|
||||
<tr>
|
||||
<td>There is no
|
||||
<br>information available.</td>
|
||||
</tr>
|
||||
<?php }} ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}}else if (!$basearray['occupied']) {
|
||||
?>
|
||||
<table cellpadding="1" cellspacing="1" id="distribution" class="tableNone">
|
||||
|
||||
@@ -358,7 +455,11 @@ while($row = mysql_fetch_array($result)){
|
||||
<tr>
|
||||
<td class="none">
|
||||
<?php
|
||||
if($basearray['fieldtype'] == 0){
|
||||
$query1 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'odata` WHERE `wref` = ' . mysql_escape_string($_GET['d']));
|
||||
}else{
|
||||
$query1 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'vdata` WHERE `wref` = ' . mysql_escape_string($_GET['d']));
|
||||
}
|
||||
$data1 = mysql_fetch_assoc($query1);
|
||||
$query2 = mysql_query('SELECT * FROM `' . TB_PREFIX . 'users` WHERE `id` = ' . $data1['owner']);
|
||||
$data2 = mysql_fetch_assoc($query2);
|
||||
|
||||
Reference in New Issue
Block a user