if (!$isPlayersTurn && !isBoardDisabled() && !$_SESSION['isSharedPC']) { 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";
} if ($_SESSION['isSharedPC']) { echo "<title>WebChess</title>\n"; } else { if ($isPlayersTurn) { echo "<title>WebChess - Your Move</title>\n"; } else { echo "<title>WebChess - Opponent's Move</title>\n"; } } ?> <script type="text/javascript"> <?php echo "var cfgImageExt = '{$CFG_IMAGE_EXT}';\n"; /* 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();
// if ($white == $_SESSION['player_id']) // $opponent = $black; // 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')\">";