<?php

##############################################################################
# choisir-equipe-favorite.php3                                                                #
#                                                                            #
# Copyright ViralGames SARL 2000                                             #
##############################################################################


include("config.php3");
include($BIB."bib_generic.php3");
include($BIB."bib_tables.php3");

$sess = open_page($sessid, 1);

if ($sess->memberid == -1)
{
	$sess->reinit("Error: invalid access to member page");
	$sess->redirect($LOGIN_PAGE, "");
}

if( !isset( $modif ) && empty( $equipe ) )
{
	$page_courante="";
	$sub_header='subh_connecte.inc';

	$form_action = $sess->action($CHOOSE_MORETEAM_PAGE);
	$form_name = "modif";

	include("header.inc");
	include("form_header.inc");
	include("choisir-autre-equipe.inc");
	include("form_footer.inc");
	include("footer.inc");
}
else
{
	$player = getplayer($sess->memberid);
	main_db_query("UPDATE Players SET Fruit='".$equipe."' WHERE Id='".$player[Id]."'");

	$sess->redirect($MEMBER_PAGE, "");
}
close_page($sess);
?> 

