Merge pull request #19 from Fannybaws/farmlist

Farmlist
This commit is contained in:
Shadow
2013-12-07 02:03:09 -08:00
+11 -11
View File
@@ -40,7 +40,7 @@ while($row = mysql_fetch_array($sql)){
<tr> <tr>
<td class="checkbox edit"></td> <td class="checkbox edit"></td>
<td class="village sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'village');">Village</td> <td class="village sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'village');">Village</td>
<td class="ew sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'ew');">Ew</td> <td class="ew sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'ew');">Pop</td>
<td class="distance sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'distance');">Distance</td> <td class="distance sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'distance');">Distance</td>
<td class="troops sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'troops');">Troops</td> <td class="troops sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'troops');">Troops</td>
<td class="lastRaid sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'lastRaid');">LastRaid</td> <td class="lastRaid sortable" onclick="Travian.Game.RaidList.sort(<?php echo $lid; ?>, 'lastRaid');">LastRaid</td>
@@ -53,7 +53,7 @@ while($row = mysql_fetch_array($sql)){
$sql2 = mysql_query("SELECT * FROM ".TB_PREFIX."raidlist WHERE lid = $lid ORDER BY distance ASC"); $sql2 = mysql_query("SELECT * FROM ".TB_PREFIX."raidlist WHERE lid = $lid ORDER BY distance ASC");
$query2 = mysql_num_rows($sql2); $query2 = mysql_num_rows($sql2);
if($query2 == 0) { if($query2 == 0) {
echo '<td class="noData" colspan="7">There is no any raid list.</td>'; echo '<td class="noData" colspan="7">There is not any raid list.</td>';
}else{ }else{
while($row = mysql_fetch_array($sql2)){ while($row = mysql_fetch_array($sql2)){
$id= $row['id'];$lid = $row['lid'];$towref = $row['towref'];$x = $row['x'];$y = $row['y']; $id= $row['id'];$lid = $row['lid'];$towref = $row['towref'];$x = $row['x'];$y = $row['y'];
@@ -94,22 +94,22 @@ $vdata = $database->getVillage($towref);
?> ?>
<label for="slot<?php echo $id; ?>"> <label for="slot<?php echo $id; ?>">
<?php <?php
$type = $database->getVillageType2($towref); $oasistype = $database->getVillageType2($towref);
$oasistype = $type['oasistype'];
if($oasistype != 0){ if($oasistype != 0){
$thisVillageName = 'Oasis';
}
else
{
$thisVillageName = $vdata["name"];
}
?> ?>
<span class="coordinates coordinatesWithText"> <span class="coordinates coordinatesWithText">
<span class="coordText">Oasis</span> <span class="coordText"><?php echo $thisVillageName; ?></span>
<span class="coordinatesWrapper"> <span class="coordinatesWrapper">
<span class="coordinateY">(<?php echo $x; ?></span> <span class="coordinateY">(<?php echo $x; ?></span>
<span class="coordinatePipe">|</span> <span class="coordinatePipe">|</span>
<span class="coordinateX"><?php echo $y; ?>)</span> <span class="coordinateX"><?php echo $y; ?>)</span>
</span></span><?php;}else{?> </span></span>
<span class="coordinates coordinatesWithText">
<span class="coordText"><?php echo $vdata['name']; ?></span>
</span>
<?php } ?>
<span class="clear"></span> <span class="clear"></span>
</label> </label>
</td> </td>