MessageBox('这盘棋已经结束'); } $mcount = $gdata['mcount']; $gdata['moves'] = substr($gdata['moves'], 0, $mcount); $curside = ($mcount + 1) % 2; $names[0] = $gdata['w_name']; $names[1] = $gdata['b_name']; $draws[0] = $gdata['w_draw']; $draws[1] = $gdata['b_draw']; $undos[0] = $gdata['w_undo']; $undos[1] = $gdata['b_undo']; $times[0] = $gdata['w_time']; $times[1] = $gdata['b_time']; $turnside = GetTurnSide(); //超时检查 $timeinfo = GetTimeOutInfo(); if ($timeinfo === true) { header("Location: g_view.php?gid={$gid}"); exit; } $tremain = $timeinfo[0]; if (IsSameName($udata['u_name'], $gdata['b_name'])) { $myside = 1; } else { if (IsSameName($udata['u_name'], $gdata['w_name'])) { $myside = 0; } else { ErrorBox('这不是你的棋局'); } } //$myside = $turnside;//for debug
$times[1] = $gdata['b_time']; $draws[0] = $gdata['w_draw']; $draws[1] = $gdata['b_draw']; $undos[0] = $gdata['w_undo']; $undos[1] = $gdata['b_undo']; if (IsSameName($udata['u_name'], $gdata['b_name'])) { $myside = 1; } else { if (IsSameName($udata['u_name'], $gdata['w_name'])) { $myside = 0; } else { $myside = -1; } } $turnside = GetTurnSide(); if (($timeinfo = GetTimeOutInfo()) === true) { continue; } $gidtxt = $gdata['cp_id'] ? $gdata['startdate'] > $nowtime ? $gdata['gid'] . HLTxt('*') : HLTxt($gdata['gid']) : $gdata['gid']; $gidtxt = "<a href=\"g_view.php?gid={$gdata['gid']}\">{$gidtxt}</a>"; $grules = $cfg['rules'][$gdata['rules']]; $gblack = $gdata['b_name']; $gwhite = $gdata['w_name']; if ($gdata['status']) { $gturn = ''; $gtimelimit = 'finished'; switch ($gdata['status']) { case 2: $gblack = HLTxt($gblack, 1); $gwhite = HLTxt($gwhite, 1); break;