<?php
include("../config.php3");
include($BIB."bib_generic.php3");
include($BIB."bib_cheat.php3");
?>
<html>
<head></head>
<link rel="stylesheet" href="admin.css">
<body rightmargin=0>
<div align=center class=trTitle>Séparation d'un filleul</div>
<br>

<?php

if ($un==1)
{
	# recup de l'id du pere
	$row = db_fetch_array(main_db_query("SELECT Id,FatherPId FROM Players WHERE NickName='".$NickName."'"));

	# recup du nick du pere
	$row2 = db_fetch_array(main_db_query("SELECT NickName FROM Players WHERE Id='".$row[FatherPId]."'"));
	$fatherNickName = $row2[NickName];
?>
	Parrain : <?php echo $fatherNickName ?><br>
	Filleul : <?php echo $NickName ?><br><br>
	Confirmer la séparation ?
<form>
	<input type=hidden name=sonId value="<?php echo $row[Id] ?>">
	<input type=hidden name=deux value=2>
	<input type=submit name=submit value="Valider">
</form>
<?php
}
else if ($deux==2)
{
	detachSon($sonId);
	echo "<br>Le filleul a été séparé de son parrain";
}
else
{
?>
<form>
	Pseudo du joueur à détacher : <input type=text name=NickName value="<?php echo $NickName ?>">
	<br><br>
	<input type=hidden name=un value=1>
	<input type=submit name=submit value="Valider">
</form>
<?php
}
?>