<?php if(!defined('IN_GS')){ die('you cannot load this page directly.'); }
include('header.inc.php'); 
?>
      <div id="main">            
        <div class="content540">              
          <div class="visualpadding">                
            
                <?php $var= $_SESSION[utilizator][echipa_id];
					  $var2=$_SESSION[utilizator][echipa_id];
				if (!($result = sql("SELECT * FROM utilizator WHERE utilizator.echipa_id = '$var'"))) die('Cerere SQL gresita: '.mysql_error());
				if (!($result2 = sql("SELECT * FROM echipa WHERE echipa.echipa_id = '$var2' GROUP BY echipa.echipa_id"))) die('Cerere SQL gresita: '.mysql_error());
				if($row2=mysql_fetch_array($result2))echo '<h1>'.$row2['nume'].'</h1>';
				
				?>
				<?php get_page_content(); ?>
				
				<div id="pre_echipe">
				<table id="tabel_echipe">
				<tr>
					<th>User</th>
					<th>Nume</th>
					<th>Prenume</th>
					<th>Lider</th>
					<th></th>
				</tr>
				<?php
				while($row = mysql_fetch_array($result))
				{	
					//if($_SESSION['utilizator']['echipa_id'] = $row['echipa_id']){
					?>
					<tr id="bgn0">
						<td><?php echo $row['user']; ?></td>
						<td><?php echo $row['nume']; ?></td>
						<td><?php echo $row['prenume']; ?></td>
						<td><?php if($row['clanleader']=='1') echo 'Y'; ?></td>
						<?php if($_SESSION[utilizator][clanleader]==1)echo '<td>
						<a href="index.php?id=echipa&sterge_din_echipa='.$row['utilizator_id'].'">sterge</a></td>';
						?>
						</tr>					
				<?php
				//}
				}
				mysql_free_result($result);
				?>
				</table>
				</div>
          </div>            
        </div>            
          
        <div class="clear">
        </div>         
      </div>	

<?php include('footer.inc.php'); ?>

