Location: PHPKode > projects > Alliances Manager > vistas/resumen_tropas.php
<?php
/*
 *  Alliances Manager (Gestionador de Alianzas) - Travian (C)
 *  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('HEAD23'));?>
</head>
<body>
<div id="top"><?php include("libs/top.php") ?></div>
<div id="contenido">
<div id="left"><?php $top = 'informes'; include("libs/menu.php") ?></div>
<div id="cuerpo">
    <table border="0" align="center" cellpadding="2" cellspacing="1" class="tabla2">
      <tr>
		<td class="E1" colspan="33"><?=self::$texto->get('titulo.rt')?></td>
	  </tr>
	  <tr>
        <td rowspan="2" class="E2"><?=self::$texto->get('jugador')?></td>
        <td colspan="10" class="E1"><?=self::$texto->get('R1U')?></td>
        <td width="0" rowspan="2" class="E2">&nbsp;</td>
        <td colspan="10" class="E1"><?=self::$texto->get('R2U')?></td>
        <td width="0" rowspan="2" class="E2">&nbsp;</td>
        <td colspan="10" class="E1"><?=self::$texto->get('R3U')?></td>
      </tr>
      <tr>
<?php 
foreach (self::$texto->get('romano') as $id => $nombre)
	  	echo "<td class=\"E2\" width=\"20\"><img src=\"imagenes/tropas/romano/".$id.".gif\" alt=\"".$nombre."\" width=\"16\" height=\"16\" title=\"".$nombre."\"/></td> \n\t\t ";		

foreach (self::$texto->get('germano') as $id => $nombre)
	  	echo "<td class=\"E2\" width=\"20\"><img src=\"imagenes/tropas/germano/".$id.".gif\" alt=\"".$nombre."\" width=\"16\" height=\"16\" title=\"".$nombre."\"/></td> \n\t\t ";		

foreach (self::$texto->get('galo') as $id => $nombre)
	  	echo "<td class=\"E2\" width=\"20\"><img src=\"imagenes/tropas/galo/".$id.".gif\" alt=\"".$nombre."\" width=\"16\" height=\"16\" title=\"".$nombre."\"/></td> \n\t\t ";		
?>
      </tr>
	  <tr>
	  <td height="4" colspan="33"></td>
	</tr>
<?php
$num = count($tropas); $cont = 0; $alter = 0;
while ($cont < $num)
{
    // Alternamos los colores de las filas
	 if ($alter%2 == 0) echo "<tr class=\"c1\">";
	 else echo "<tr class=\"c2\">";
	 ++$alter;
	 
	 echo "<td><a href=\"index.php?ctrl=Admin&mod=ver_datos&uname=".$tropas[$cont]['player']."\">".$tropas[$cont]['player']."</a></td>";
	 
	$nix = "";
  	for ($i=0; $i<10; $i++) {
  		$nix.="<td class=\"zero\">0</td>";
  	}
	
  	$trop = "";
  	for ($i=0; $i<10; $i++) {
  		$trop .= "<td>".$tropas[$cont]['t'.$i]."</td>";
  	}
		
	$t=array();
  	$t[1] = $nix;
  	$t[2] = $nix;
  	$t[3] = $nix;
	
	$t[$tropas[$cont]['raza']] = $trop;
	
	echo $t[1]."<td>&nbsp;</td>".$t[2]."<td>&nbsp;</td>".$t[3];
	echo "</tr>";
	
	$cont++;
}
?>
    </table>
  </div>
</div>
</body>
</html>
<?php unset($tropas);?>
Return current item: Alliances Manager