Location: PHPKode > projects > Alliances Manager > vistas/companieros.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('HEAD09'));
?>
</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">
	<center><?=self::$texto->get('pre.grupo')?><em><?=$NGrupo[0]?></em></center>
<?php if (!$_SESSION['ver_grupo']) {?>
	<table border="0" align="center" cellpadding="2" cellspacing="1" class="tabla2">
	  <tr class="E2">
	    <td colspan="3"><?=self::$texto->get('pre.compas')?></td>
	  </tr>
	  <tr class="E2">
	    <td width="150"><?=self::$texto->get('R1U')?></td>
		<td width="150"><?=self::$texto->get('R2U')?></td>
		<td width="150"><?=self::$texto->get('R3U')?></td>
	  </tr>
<?php 
$alter_aldea = 0; $i = 0; $num = count($Compas);
while ( $i < $num)
{
	$player = $Compas[$i]['player'];
	$idraza = $Compas[$i]['raza'];
	
	if ($alter_aldea%2 == 0) echo "<tr class=\"c1\">";
	else echo "<tr class=\"c2\">";
	++$alter_aldea;
	
	$cell[1] = "<td>&nbsp;</td>";
	$cell[2] = "<td>&nbsp;</td>";
	$cell[3] = "<td>&nbsp;</td>";
			
	$cell[$idraza] = "<td>".$player."</td>";
	
	echo $cell[1].$cell[2].$cell[3]."\n</tr>";
	
	++$i;
}
unset($Compas);
?>
</table>
<?php } else  {
$num = count($Compas);
?>
<center><?=self::$texto->get('pre.compas')?></center>

<table border="0" align="center" cellpadding="2" cellspacing="1" class="tabla2">
  <tr class="E1">
    <td colspan="12"><?=self::$texto->get('R1U')?></td>
  </tr>
  <tr class="E2">
    <td width="150"><?=self::$texto->get('jugador')?></td>
<?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 ";		
?>
	<td width="100"><?=self::$texto->get('ultima_actualizacion')?></td>
  </tr>
<?php 
$alter_aldea = 0; $i = 0;
while ( $i < $num)
{
	$player = $Compas[$i]['player'];
	$idraza = $Compas[$i]['raza'];
	$update = $Compas[$i]['actualizacion'];
		
	if ($idraza == 1) 
	{
		if ($alter_aldea%2 == 0) echo "<tr class=\"c1\">";
		else echo "<tr class=\"c2\">";
		++$alter_aldea;
		
		echo "<td>".$player."</td>";
    	for ($j=0; $j<10; $j++) {
			echo "<td>".$Compas[$i]['t'.$j]."</td>";
		 }
		echo "<td>".$update."</td>";
		  echo "</tr>";
	}
	++$i;
}
?>
</table>

<table border="0" align="center" cellpadding="2" cellspacing="1" class="tabla2">
  <tr class="E1">
    <td colspan="12"><?=self::$texto->get('R2U')?></td>
  </tr>
  <tr class="E2">
    <td width="150"><?=self::$texto->get('jugador')?></td>
<?php 
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 ";
?>
	<td width="100"><?=self::$texto->get('ultima_actualizacion')?></td>
  </tr>
<?php 
$alter_aldea = 0; $i = 0;
while ( $i < $num)
{
	$player = $Compas[$i]['player'];
	$idraza = $Compas[$i]['raza'];
	$update = $Compas[$i]['actualizacion'];
		
	if ($idraza == 2) 
	{
		if ($alter_aldea%2 == 0) echo "<tr class=\"c1\">";
		else echo "<tr class=\"c2\">";
		++$alter_aldea;
		
		echo "<td>".$player."</td>";
    	for ($j=0; $j<10; $j++) {
			echo "<td>".$Compas[$i]['t'.$j]."</td>";
		 }
		echo "<td>".$update."</td>";
		  echo "</tr>";
	}
	++$i;
}
?>
</table>

<table border="0" align="center" cellpadding="2" cellspacing="1" class="tabla2">
  <tr class="E1">
    <td colspan="12"><?=self::$texto->get('R3U')?></td>
  </tr>
  <tr class="E2">
    <td width="150"><?=self::$texto->get('jugador')?></td>
<?php 
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 ";
?>
	<td width="100"><?=self::$texto->get('ultima_actualizacion')?></td>
  </tr>
<?php 
$alter_aldea = 0; $i = 0; 
while ( $i < $num)
{
	$player = $Compas[$i]['player'];
	$idraza = $Compas[$i]['raza'];
	$update = $Compas[$i]['actualizacion'];
	
	if ($idraza == 3) 
	{
		if ($alter_aldea%2 == 0) echo "<tr class=\"c1\">";
		else echo "<tr class=\"c2\">";
		++$alter_aldea;
		
		echo "<td>".$player."</td>";
    	for ($j=0; $j<10; $j++) {
			echo "<td>".$Compas[$i]['t'.$j]."</td>";
		 }
		echo "<td>".$update."</td>";
		  echo "</tr>";
	}
	++$i;
}
unset($Compas);
?>
</table>
<?php }?>
  </div>
</div>
</body>
</html>
Return current item: Alliances Manager