<?php include($BIB."bib_tables.php3"); ?>
<link href="<?php echo $SERVER_URL."links.css" ?>" rel="stylesheet">
<link href="<?php echo $SERVER_URL."common.css" ?>" rel="stylesheet">
<br>
<?php
table_ktf_up( "<h1 class='h1table'>Fiche Joueur</h1>", '495px','green', 1, '14px', '#ffffff'  );
?>
<table cellpadding=0 cellspacing=0 border=0 width=100% height=425>
	<tr>
		<td valign=top class=smallDark>

<table border=0 cellpadding=4 cellspacing=0 width=100%>
	<tr>
		<td colspan=2 bgcolor=<?php echo $BG_COLOR_FOND_7 ?>>
			<table width=100% border=0 cellpadding=1 cellspacing=1>
				<tr>
					<td align=right width=25% class=smallboldDark><?php echo C_POPULATION?> :&nbsp;</td>
					<td bgcolor=white class=smallDark>&nbsp;<?php echo ($root[Offsprings]+1)." ".C_JOUEURS?></td>
					<td align=right class=smallboldDark><?php echo C_SCORETOTAL?> :&nbsp;</td>
					<td bgcolor=white class=smallDark>&nbsp;<?php echo $root_points[AllScores] ?> pts</td>
				</tr>
				<tr>
					<td align=right class=smallboldDark><?php echo C_AGE?> :&nbsp;</td>
					<td bgcolor=white class=smallDark>&nbsp;<?php echo $age ?> jours</td>
					<td align=right class=smallboldDark><?php echo C_SCOREMOYEN?> :&nbsp;</td>
					<td bgcolor=white class=smallDark>&nbsp;<?php echo $root_points[ScoreMoyen] ?> pts/joueurs</td>
				</tr>
			</table>
			
		</td>
	</tr>
</table>
<br>
<center><?php include( $ARCHIVES_DIR . "tag_468x60_text.html"); ?></center>
<br>
<?php
if ($rootTab)
{
	for($r=0;$r<count($rootTab);$r++)
	{
		if ($specialMember and $rootTab[$r]["Email"])
			echo "<A class=smallDarkLink HREF=\"".$sess->link3($TREE_PAGE, "id=".$rootTab[$r]["Id"])."\">".$rootTab[$r]["NickName"]."</A> <span class=small>- ".$rootTab[$r]["Email"]."</span>";
		else
			echo "<A class=smallDarkLink HREF=\"".$sess->link3($TREE_PAGE, "id=".$rootTab[$r]["Id"])."\">".$rootTab[$r]["NickName"]."</A>";
		echo "<br>\n";
	}

	//echo "<img src=\"".$IMAGES_DIR."fleche_popup.gif\" align=absmiddle><br>";
	echo "<img src=\"".$IMAGES_DIR."tree_vertline.gif\" align=top><br>";
	echo "<img src=\"".$IMAGES_DIR."tree_end.gif\" align=top>";
}

echo "<span class=bigBoldRed> ".$search_player[NickName]." [".$search_player[Score]." pts]</span>";

$total = db_num_rows($childs);

# s'il y a des filleuls
if ($total>0)
{
	echo "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src=\"".$IMAGES_DIR."tree_vertline.gif\" align=absmiddle>";
	$r=0;
	while($child=db_fetch_array($childs))
	{
		$r++;
		echo "<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
		echo "<img src=\"".$IMAGES_DIR;
		
		# si c'est le dernier filleul, la branche se ferme
		if ($r==$total)
			echo "tree_end.gif";
		else
			echo "tree_split.gif";
		
		echo "\" align=absmiddle>";
		echo "<a class=smallDarkLink href=\"".$sess->link3($TREE_PAGE, "id=".$child[Id])."\"><img align=bottom SRC=\"".$IMAGES_DIR;

		# s'il le filleul à un filleul, on met une icone différente
		if ($child[Sons]>0)
			echo "plus.gif\" ALT=\"+\"";
		else
			echo "void.gif\" ALT=\"pas de filleuls\"";

		echo " BORDER=0>";
		echo "&nbsp;".$child[NickName]." [".$child[Score]." pts]</a>";
		
		# si c'est le membre qui consulte (uniquement ses filleuls), on ajoute les mails
		if ($specialMember)
			echo " - <span class=small>".$child[Email]."</span>";
	}
}
?>
		</td>
	</tr>
</table>

<?php table_ktf_down( 'green', 1 ); ?>

