{
		echo ("<META HTTP-EQUIV=Refresh CONTENT='");

		if ($_SESSION['pref_autoreload'] >= $CFG_MINAUTORELOAD)
			echo ($_SESSION['pref_autoreload']);
		else
			echo ($CFG_MINAUTORELOAD);

		echo ("; URL=chess.php?autoreload=yes'>\n");
	}
    */	
?>
<meta name="Keywords" content="chess,ajedrez,échecs,echecs,scacchi,schach,schachmatt, schachturnier, schachspiel, check,check mate,jaque,jaque mate,queenalice,queen alice,queen,alice,play,game,games,turn based,correspondence,correspondence chess,online chess,play chess online">
<script type="text/javascript">
<? writeJSboard(); ?>
<? writeJShistory(); ?>

if (DEBUG)
	alert("Game initilization complete!");

stopTimer = 0;
function refreshwindow(){
    if (stopTimer == 0)
        window.location='chess.php';
}
		function loadnextGame(gameID)
		{
			//if (document.allhisgames.rdoShare[0].checked)
			//	document.allhisgames.action = "opponentspassword.php";

			document.allhisgames.gameID.value = gameID;
Example #2
0
/* transfer board data to javacript */
writeJSboard();
/* if it's not the player's turn, enable auto-refresh */
$autoRefresh = !$isPlayersTurn && !isBoardDisabled() && !$_SESSION['isSharedPC'];
echo 'var autoreload = ';
if (!$autoRefresh) {
    echo '0';
} else {
    if ($_SESSION['pref_autoreload'] >= $CFG_MINAUTORELOAD) {
        echo $_SESSION['pref_autoreload'];
    } else {
        echo $CFG_MINAUTORELOAD;
    }
}
echo ";\n";
writeJShistory();
drawboard();
echo 'var gameId = ' . $_SESSION['gameID'] . ";\n";
echo 'var players = "' . $whiteNick . ' - ' . $blackNick . "\";\n";
echo 'var playersColor = "' . $playersColor . "\";\n";
echo 'var isPromoting = "' . $isPromoting . "\";\n";
echo 'var isKingInCheck = "' . $isInCheck . "\";\n";
echo 'var isGameOver = "' . $isGameOver . "\";\n";
echo 'var historyLayout = "' . $_SESSION['pref_historylayout'] . "\";\n";
writeStatus();
writeHistory();
// Captured pieces..
require 'capt.php';
?>
</script>
<script type="text/javascript" src="javascript/chessutils.js"></script>
Example #3
0
//        else $opponent = $white;
if ($_SESSION['isSharedPC']) {
    $smarty->assign('title', "FUN GAME");
} else {
    if ($isPlayersTurn) {
        $smarty->assign('title', "Chess - " . $MSG_LANG['yourturn']);
        $timer_switch = 0;
    } else {
        $smarty->assign('title', "Chess - " . $MSG_LANG['opponentturn']);
        $timer_switch = 1;
    }
}
$smarty->assign('javascript_start', "<script type=\"text/javascript\">");
$write_jsboard = writeJSboard();
$smarty->assign('javascript_write_board', $write_jsboard);
$write_jshistory = writeJShistory();
$smarty->assign('javascript_write_history', $write_jshistory);
$stop_timer = "var stopTimer=" . $timer_switch;
$smarty->assign('stop_timer', $stop_timer);
$smarty->assign('chessboard_refresh_rate', $_SESSION['pref_autoreload']);
$smarty->assign('template_set', $_SESSION['template_set']);
###BOOKMARK POINT
$p = mysql_query("SELECT username,player_id FROM {$db_prefix}players WHERE player_id='{$white}'");
$row = mysql_fetch_array($p);
$p = mysql_query("SELECT username,player_id FROM {$db_prefix}players WHERE player_id='{$black}'");
$row2 = mysql_fetch_array($p);
$row['username'] = $row['username'] . " (" . $MSG_LANG["white"] . ")";
$row2['username'] = $row2['username'] . " (" . $MSG_LANG["black"] . ")";
echo "<input type='button' name='btnWhiteUser' value='" . $row['username'] . "' onClick=\"window.open('stats_user.php?cod={$row['1']}&voltar=chess.php', '_self')\">";
echo " <B>X</B> ";
echo "<input type='button' name='btnBlackUser' value='" . $row2['username'] . "' onClick=\"window.open('stats_user.php?cod={$row2['1']}&voltar=chess.php', '_self')\">";