Location: PHPKode > projects > Alliances Manager > vistas/modpermisos.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('HEAD17')); ?> 

<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 method="post" action="index.php?ctrl=Admin&mod=modpermisos">
	<input type="hidden" name="accion" value="goku"/>
      <table border="0" align="center" cellpadding="2" cellspacing="1" class="tabla2">
        <tr class="E1">
          <td width="160"><?=self::$texto->get('jugador')?></td>
          <td width="160"><?=self::$texto->get('p.tropas')?></td>
          <td width="160"><?=self::$texto->get('p.admin')?></td>
          <td width="160"><?=self::$texto->get('p.buscar')?></td>
		  <td width="160"><?=self::$texto->get('p.grupo')?></td>		  
		$alter = 0;
		while ( $usuarios = 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";
	   // verificamos las opciones seleccionamos
	   $aux1 = array ("","","");
	   $aux1[$usuarios['ver_tropas']] = "selected=\"selected\"";
	   $aux2 = array ("","","");
	   $aux2[$usuarios['gestion']] = "selected=\"selected\"";
	   $aux3 = array ("","");
	   $aux3[$usuarios['buscar']] = "selected=\"selected\"";
	   $aux4 = array ("","");
	   $aux4[$usuarios['grupo']] = "selected=\"selected\"";

          <td><input name="lista[<?=$alter?>][1]" align="middle" type="text" readonly="true" value="<?=$usuarios['usuario_nombre']?>"></td>
            <select name="lista[<?=$alter?>][2]">
              <option value="2" <?=$aux1[2]?>><?=self::$texto->get('p.tropas.2')?></option>
              <option value="1" <?=$aux1[1]?>><?=self::$texto->get('p.tropas.1')?></option>
              <option value="0" <?=$aux1[0]?>><?=self::$texto->get('p.tropas.0')?></option>
            <select name="lista[<?=$alter?>][3]">
              <option value="2" <?=$aux2[2]?>><?=self::$texto->get('p.admin.2')?></option>
              <option value="1" <?=$aux2[1]?>><?=self::$texto->get('p.admin.1')?></option>
              <option value="0" <?=$aux2[0]?>><?=self::$texto->get('p.admin.0')?></option>
            <select name="lista[<?=$alter?>][4]">
              <option value="1" <?=$aux3[1]?>><?=self::$texto->get('p.buscar.1')?></option>
              <option value="0" <?=$aux3[0]?>><?=self::$texto->get('p.buscar.0')?></option>
            <select name="lista[<?=$alter?>][5]">
              <option value="1" <?=$aux4[1]?>><?=self::$texto->get('p.grupo.1')?></option>
              <option value="0" <?=$aux4[0]?>><?=self::$texto->get('p.grupo.0')?></option>
<?php 	++$alter; } ?>
		 	<td colspan="5" nowrap="nowrap">
				<table width="200" border="0" align="center" cellpadding="2" cellspacing="0" class="encabezado1">
                <td><input type="submit" class="boton" value="<?=self::$texto->get('aceptar')?>" /></td>
			    <td><input type="button" class="boton" onClick="parent.location='?ctrl=Admin&mod=permisos'" value="<?=self::$texto->get('cancelar')?>" /></td>
Return current item: Alliances Manager