Location: PHPKode > projects > Alliances Manager > vistas/resumen_aldeas.php
<?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('HEAD22'));?>
</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 width="80%" border="0" align="center" cellpadding="2" cellspacing="1" class="tabla2">
  <tr class="E1">
    <td colspan="8"><?=self::$texto->get('titulo.ra')?></td>
    </tr>
  <tr class="E2">
    <td width="150"><?=self::$texto->get('jugador')?></td>
    <td><?=self::$texto->get('15c')?></td>
    <td><?=self::$texto->get('9c')?></td>
    <td><?=self::$texto->get('normal')?></td>
    <td><?=self::$texto->get('barro')?></td>
    <td><?=self::$texto->get('hierro')?></td>
    <td><?=self::$texto->get('madera')?></td>
    <td><?=self::$texto->get('total')?></td>
    </tr>
<?php
$num = count($resumen); $cont = 0; $alter = 0;
$sum_15c = 0; 		$sum_9c = 0; 		$sum_Normal = 0;
$sum_Barro = 0; 	$sum_Madera = 0; 	$sum_Hierro = 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=".$resumen[$cont]['player']."\">".$resumen[$cont]['player']."</a></td>";
	 echo "<td>".$resumen[$cont]['15c']."</td>";
	 echo "<td>".$resumen[$cont]['9c']."</td>";
	 echo "<td>".$resumen[$cont]['Normal']."</td>";
	 echo "<td>".$resumen[$cont]['Barro']."</td>";
	 echo "<td>".$resumen[$cont]['Hierro']."</td>";
	 echo "<td>".$resumen[$cont]['Madera']."</td>";
	 
	 $sum_15c += $resumen[$cont]['15c'];
	 $sum_9c += $resumen[$cont]['9c'];
	 $sum_Normal += $resumen[$cont]['Normal'];
	 $sum_Barro += $resumen[$cont]['Barro'];
	 $sum_Madera += $resumen[$cont]['Hierro'];
	 $sum_Hierro += $resumen[$cont]['Madera'];
	 
	 echo "<td>".($resumen[$cont]['15c'] + $resumen[$cont]['9c']+
	 $resumen[$cont]['Normal'] + $resumen[$cont]['Barro'] +
	 $resumen[$cont]['Madera'] + $resumen[$cont]['Hierro'])."</td>";
	 
	 echo "</tr>";
	 
	 ++$cont;
	 
}

  echo "<tr class=\"E2\">";
    echo "<td>".self::$texto->get('total')."</td>";
    echo "<td>".$sum_15c."</td>";
    echo "<td>".$sum_9c."</td>";
    echo "<td>".$sum_Normal."</td>";
    echo "<td>".$sum_Barro."</td>";
    echo "<td>".$sum_Hierro."</td>";
    echo "<td>".$sum_Madera."</td>";
    echo "<td>".($sum_15c+$sum_9c+$sum_Normal+$sum_Barro+$sum_Madera+$sum_Hierro)."</td>";
?>
    </tr>
</table>

	</div>
</div>
</body>
</html>
Return current item: Alliances Manager