<?php

##############################################################################
# chat                                                                  #
#                                                                            #
# Copyright ViralGames SARL 2000                                             #
##############################################################################


include("config.php3");
include($BIB."bib_generic.php3");
include($BIB."bib_check_members.php3");
include($BIB."bib_showGames.php3");
include($BIB."bib_curl.php3");

$sess = open_page($sessid, 1);


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




$member = getmember($sess->memberid);
$player = getplayer($sess->memberid);

####################################
############## Black List ##########
####################################
$squeryBlack = "SELECT Id FROM Chat_BlackList WHERE Id='".$player['Id']."'";
$rowBlack = db_fetch_assoc(main_db_query($squeryBlack));
if($rowBlack)
{
	//main_db_query("DELETE FROM Chat WHERE PlayerId=".$IN_playerId);
	main_db_query("DELETE FROM Chat_Connected WHERE Id=".$player['Id']);
	$sess->redirect($CHAT_FORBIDDEN_PAGE,"");
	die();
}


# A passer au swf en args :
# IN_playerId : l'id du player
# IN_nickName : le pseudo du player

//$urlBoxSWF = "chatBox_02.swf?sessid=".$sessid."&playerid=".$player['Id']."&NickName=".$player['NickName']."&serverUrl=".$SERVER_URL."chat/";
//$urlConnectedSWF = "chatConnected_04.swf?sessid=".$sessid."&playerid=".$player['Id']."&NickName=".$player['NickName']."&serverUrl=".$SERVER_URL."chat/";
$urlBoxSWF = "Flash/full_chat.swf?sessid=".$sessid."&playerid=".$player['Id']."&NickName=".$player['NickName']."&serverUrl=".$SERVER_URL;
//$widthConnected = 120;
$widthChat = 560;
$heightChat = 370;

?>
<html>
<head>
<title><?php echo $GAME_NAME ?></title>
<META CONTENT="kestufoot, kestufoot.com, football, sport, pronostics sportifs, parier, mise, jeux, pronostics, matchs, championnat de France, équipes, L1" NAME="Keywords">
<link rel="stylesheet" href="<?php echo $SERVER_URL?>common.css">
<link rel="stylesheet" href="<?php echo $SERVER_URL?>links.css">
</head>
<body>
<table border=0 width=570 align=center cellpadding=0 cellspacing=0>
<tr>
<td align=center><img src="<?echo $IMAGES_DIR."header_kestuchat.jpg";?>" border=0></td>
</tr>
<tr>
<td align=center>
	

		<table border=0 width=570 align=center bgcolor="#2B6711">
		<tr>
			<td align=center valign=top bgcolor="#2B6711" >
				<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="<?php echo $widthChat; ?>" height="<?php echo $heightChat; ?>" id="chatMatch" align="middle">
				<param name="allowScriptAccess" value="sameDomain" />
				<param name="movie" value="<?php echo $urlBoxSWF; ?>" />
				<param name="quality" value="high" />
				<param name="bgcolor" value="#2B6711" />
				<embed src="<?php echo $urlBoxSWF; ?>" quality="high" bgcolor="#2B6711" width="<?php echo $widthChat; ?>" height="<?php echo $heightChat; ?>" name="chatMatch" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
				</object>
			</td>
		</tr>
		</table>

	</td>
</tr>
</table>
<table width=570 align=center>
<tr >
	<td class=smallDark>
	Un modérateur est susceptible d'interdire l'accès au chat à toute personne
	proférant des propos injurieux, ou dont la discussion ne serait pas en
	relation avec la ligne éditoriale du site, ou qui serait contraire à la loi.
	</td>
</tr>
<tr >
	<td align=right><img src="<?echo $IMAGES_DIR."/triangleorange.gif"?>">&nbsp;<a href="javascript:close()" class=smallDarkLink>fermer le chat</a></td>
</tr>
</table>
</body>
</html>
<?php
close_page($sess);
?>