Location: PHPKode > projects > Alliances Manager > vistas/permisos.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 HTML
cabecera("",self::$texto->get('HEAD19'));
?>
</head>
<body>
<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">
<form action="index.php?ctrl=Admin&mod=modpermisos" method="post">
<input type="hidden" name="accion" value="pp"/>
<table border="0" align="center" cellpadding="2" cellspacing="1" class="tabla2">
  <tr class="E1">
    <?php if ($_SESSION['gestion'] == 2) echo "<td width=\"10\">&nbsp;</td>"; ?>
	<td width="170"><?=self::$texto->get('jugador')?></td>
    <td width="170"><?=self::$texto->get('p.tropas')?></td>
    <td width="170"><?=self::$texto->get('p.admin')?></td>
    <td width="170"><?=self::$texto->get('p.buscar')?></td>
	<td width="170"><?=self::$texto->get('p.grupo')?></td>
  </tr>
<?php
	
	$alter = 0;  
    while ($row = mysql_fetch_assoc($resultado))
    {
	   // Alternamos los colores de las filas
	   if ($alter%2 == 0) echo "<tr class=\"c1\">\n\t";
	   else echo "<tr class=\"c2\">\n\t";
	   ++$alter;
	   // llenamos las columnas con la info correspondiente
	   if ($row['ver_tropas'] == 0) $string_t = "S&oacute;lo Propias";
	   elseif ($row['ver_tropas'] == 1) $string_t = "S&oacute;lo Grupo";
	   elseif ($row['ver_tropas'] == 2) $string_t = "TODAS";
	   
	   if ($row['gestion'] == 0) $string_a = "Sin Acceso";
	   elseif ($row['gestion'] == 1) $string_a = "S&oacute;lo Lectura";
	   elseif ($row['gestion'] == 2) $string_a = "TOTAL";
	   
	   if ($row['buscar'] == 0) $string_b = "Bloqueado";
	   elseif ($row['buscar'] == 1) $string_b = "ACCESO";
	   
	   if ($row['grupo'] == 0) $string_g = "S&oacute;lo Nombres";
	   elseif ($row['grupo'] == 1) $string_g = "Nombre y Estado";
	   
	   if ($_SESSION['gestion'] == 2)
	   		echo "<td><input type=\"checkbox\" name=\"check[]\" value=\"".$row['usuario_nombre']."\"></td>\n\t";
	   echo "<td><a href=\"index.php?ctrl=Admin&mod=ver_datos&uname=".$row['usuario_nombre']."\">".$row['usuario_nombre']."</a></td>\n\t";
	   echo "<td>".self::$texto->get('p.tropas.'.$row['ver_tropas'])."</td>\n\t";
	   echo "<td>".self::$texto->get('p.admin.'.$row['gestion'])."</td>\n\t";
	   echo "<td>".self::$texto->get('p.buscar.'.$row['buscar'])."</td>\n\t";
	   echo "<td>".self::$texto->get('p.grupo.'.$row['grupo'])."</td>\n\t";
	   echo "</tr>\n";
    }
unset($row,$resultado);
?>
</table>
<br><center> <?php if ($_SESSION['gestion'] == 2) echo "<input type=\"submit\" class=\"boton\" value=\"".self::$texto->get('cambiar')."\">"; ?> </center>
</form>
</div>
</div>
</body>
</html>
Return current item: Alliances Manager