<?php
/*
* Alliances Manager (Gestionador de Alianzas) - Travian
* Copyright (C) 2008-12 Viva Mayer, Francisco MesÃas <hide@address.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
cabecera("", self::$texto->get('HEAD01'));
?>
</head>
<body>
<div id="top"><?php include("libs/top.php") ?></div>
<div id="contenido">
<div id="left"><?php $top = 'panel'; include("libs/menu.php") ?></div>
<div id="cuerpo">
<br>
<center> <input type="button" class="boton" onClick="parent.location='?ctrl=Aldeas&mod=nueva'" value="<?=self::$texto->get('nueva_aldea')?>" /> </center>
<table width="400" align="center" style="text-align:center">
<tr>
<td width="149" style="color: #FFFF00;font-size: 13px;"><?=self::$texto->get('cap_y_prin')?></td>
<td width="105" style="color: #CC33FF;font-size: 13px;"><?=self::$texto->get('capital')?></td>
<td width="124" style="color: #FFFFFF;font-size: 13px;"><?=self::$texto->get('principal')?></td>
</tr>
</table>
<table width="98%" border="0" cellspacing="1" cellpadding="2" class="tabla2" align="center">
<tr class="E2">
<td><?=self::$texto->get('nombre')?></td>
<td><?=self::$texto->get('coordenadas')?></td>
<td><?=self::$texto->get('tipo')?></td>
<td><?=self::$texto->get('capgranero')?></td>
<td><?=self::$texto->get('muralla')?></td>
<td><?=self::$texto->get('residencia')?></td>
<td><?=self::$texto->get('descripcion')?></td>
<td colspan="2" width="38"> </td>
</tr>
<?php
// Permite alterar los colores de las filas entre aldea y aldea
$alter_aldea = 0;
if ( mysql_num_rows($resultado) == 0 )
echo "<tr><td colspan=\"9\">".self::$texto->get('MBT06')."</td><tr>";
else
{
while ($aldea = mysql_fetch_assoc($resultado))
{
$estilo = "";
if ($aldea['es_capital'] and $aldea['es_principal'])
$estilo = "style=\"color: #FFFF00; font-weight: bold;\"";
elseif($aldea['es_capital']) $estilo = "style=\"color: #CC33FF; font-weight: bold;\"";
elseif($aldea['es_principal']) $estilo = "style=\"color: #FFFFFF; font-weight: bold;\"";
// Alternamos los colores de las filas
if ($alter_aldea%2 == 0) echo "<tr class=\"c1\" ".$estilo.">";
else echo "<tr class=\"c2\" ".$estilo.">";
++$alter_aldea;
echo "<td>".$aldea['nombre']."</td>
<td>( ".$aldea['x']." | ".$aldea['y']." )</td>
<td>".$aldea['tipo']."</td>
<td>".$aldea['granero']."</td>
<td>".$aldea['muralla']."</td>
<td>".$aldea['residencia']."</td>
<td>".$aldea['descripcion']."</td>
<td><a href=\"index.php?ctrl=Aldeas&mod=editar&x=".$aldea['x']."&y=".$aldea['y']."\"><img src=\"imagenes/botones/edit.png\" width=\"16\" height=\"16\" border=\"0\" /></a></td>
<td><a href=\"index.php?ctrl=Aldeas&mod=borrar&x=".$aldea['x']."&y=".$aldea['y']."\"><img src=\"imagenes/botones/del.png\" width=\"16\" height=\"16\" border=\"0\" onclick=\"return confirm('".self::$texto->get('MBT05')."( ".$aldea['x']." | ".$aldea['y']." )')\" /></a></td>
</tr>";
}
}
?>
</table>
<div style="font-size: 13px;"><?=self::$texto->get('MBT07')?><?=self::$texto->get('principal')?></div>
</div>
</div>
</body>
</html>