<?php
include "./function.php";				//调用自定义函数文件
include "./conn/conn.php";				//连接数据源文件

$query = mysql_query("select * from tb_room where id = '".$_GET[roomid]."'");			//检索游戏房间号信息
if(!@mysql_num_rows($query)){			//如果没有检索到信息
	header("location:index.php");		//跳转到游戏首页
	exit;			//退出
}
$guest_win = mysql_result($query, 0, guest_win);		//获取黑旗的胜局次数
$host_win = mysql_result($query, 0, host_win);			//获取红旗的胜局次数

mysql_query("update tb_room set chess = '$c',flag = 'host',moved = '',eated = '', guest_win = '".$_GET[guest_win]."', host_win = '".$_GET[host_win]."' where id = '".$_GET[roomid]."'");				//更新数据表中的数据信息
?>