Location: PHPKode > projects > Alliances Manager > vistas/grupos.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
 *  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('HEAD14')); ?>
<div id="top"><?php include("libs/top.php") ?></div>
<div id="contenido">
<div id="left"><?php $top = "admin"; include("libs/menu.php") ?></div>
<div id="cuerpo">
<?php if ($_SESSION['gestion']==2) { ?>
	<input type="button" class="boton" onClick="parent.location='?ctrl=Grupo&mod=nuevo'" value="<?=self::$texto->get('nuevo_grupo')?>" />
	<input type="button" class="boton" onClick="parent.location='?ctrl=Grupo&mod=procesar'" value="<?=self::$texto->get('procesar_grupos')?>" />
  // Permite alterar los colores de las filas
  $alter = 0; 
<table width="650" border="0" align="center" cellpadding="2" cellspacing="1" class="tabla2">
	<tr class="E2">
		<th scope="col" width="200" ><?=self::$texto->get('nombre_grupo')?></th>
		<th scope="col" width="150" ><?=self::$texto->get('cvsi')?></th>
		<th scope="col" width="150" ><?=self::$texto->get('cvid')?></th>
		<th scope="col" width="100" ><?=self::$texto->get('cant_miembros')?></th>
		<?php if ($_SESSION['gestion']==2) { ?> <th scope="col" colspan="2" width="40">&nbsp;</th><?php } ?>
$num = sizeof($resultado); $i = 0;
// Datos de cada grupo
while ($i < $num)
	// Alternamos los colores de las filas
	if ($alter%2 == 0) echo "<tr class=\"c1\">\n";
	else echo "<tr class=\"c2\">\n";
		echo "<td><a href=\"?ctrl=Grupo&mod=detalles&g=".$resultado[$i]['id']."\" title=\"".$resultado[$i]['descripcion']."\">".$resultado[$i]['nombre']."</a></td>\n";
		echo "<td>( ".$resultado[$i]['x1']." | ".$resultado[$i]['y1']." )</td>\n";
		echo "<td>( ".$resultado[$i]['x2']." | ".$resultado[$i]['y2']." )</td>\n";	
		echo "<td>".$resultado[$i]['cant']."</td>\n";
		if ($_SESSION['gestion']==2) {
			echo "<td><a href=\"index.php?ctrl=Grupo&mod=editar&g=".$resultado[$i]['id']."\"><img src=\"imagenes/botones/edit.png\" width=\"16\" height=\"16\" border=\"0\" /></a></td>\n";
			echo "<td><a href=\"index.php?ctrl=Grupo&mod=eliminar&g=".$resultado[$i]['id']."\"><img src=\"imagenes/botones/del.png\" width=\"16\" height=\"16\" border=\"0\" onclick=\"return confirm('".self::$texto->get('MBG02')."')\" /></a></td>\n";	
	echo "</tr>\n";
unset($resultado, $i, $num)
Return current item: Alliances Manager