<?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/>.
*/
if (!isset($tropas)) {
$id_tropas = array_keys(self::$texto->get($_SESSION['raza']));
for ($i=0;$i<10;++$i)
$tropas[$id_tropas[$i]] = 0;
}
cabecera("",$titulo); ?>
</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">
<form name="<?=$accion ?>" id="<?=$accion ?>" method="post" action="<?=$direccion ?>">
<input name="accion" type="hidden" value="<?=$accion ?>" />
<table width="375" height="372" border="1" cellpadding="0" cellspacing="0" bordercolor="#FF0000" class="create_tabla" align="center">
<tr class="encabezado1">
<td colspan="3"><?=self::$texto->get('intro.new.troops')?></td>
</tr>
<tr>
<td><?=self::$texto->get('origen')?></td>
<td colspan="2"><input name="nombre" type="text" id="ox" size="15" maxlength="15" value="<?php echo ( (!empty($aldea)) ? $aldea['nombre'] : "" ); ?>"/>
( <input name="ox" id="ox" type="text" size="2" maxlength="4" value="<?php echo ((!empty($aldea)) ? $aldea['x'] : ""); ?>"/> |
<input name="oy" id="oy" type="text" size="2" maxlength="4" value="<?php echo ((!empty($aldea)) ? $aldea['y'] : ""); ?>"/> )</td>
</tr>
<?php
if ( (isset($_POST['refuerzo']) and $_POST['refuerzo']=='1') or
(isset($_GET['rx']) and isset($_GET['ry'])) )
{
?>
<tr>
<td><?=self::$texto->get('refuerzo.en')?></td>
<td colspan="2"> (
<input name="rx" type="text" id="rx" size="2" maxlength="4" value="<?php echo ( (isset($aldea['rx'])) ? $aldea['rx'] : "" ); ?>" /> | <input name="ry" type="text" id="ry" size="2" maxlength="4" value="<?php echo ( (isset($aldea['ry'])) ? $aldea['ry'] : "" ); ?>" /> )</td>
</tr>
<?php
}
foreach (self::$texto->get($_SESSION['raza']) as $id => $nombre)
{
echo "<tr>
<td width=\"123\"><img src=\"imagenes/tropas/".$_SESSION['raza']."/".$id.".gif\" width=\"16\" height=\"16\" /></td>
<td>".$nombre."</td>
<td><input name=\"".$id."\" id=\"".$id."\" type=\"text\" size=\"7\" value=\"".$tropas[$id]."\" /></td></tr>";
}
?>
<tr class="encabezado1">
<td colspan="3" nowrap="nowrap">
<table width="200" border="0" align="center" cellpadding="2" cellspacing="0">
<tr>
<td><input type="submit" class="boton" value="<?=self::$texto->get('aceptar')?>" /></td>
<td><input type="button" class="boton" onClick="parent.location='?ctrl=Tropas&mod=tropas'" value="<?=self::$texto->get('cancelar')?>" /></td>
</tr>
</table> </td>
</tr>
</table>
</form>
</div>
</div>
</body>
</html>