Parties SGF
Jour 1 | Jour 2 | Jour 3 |
---|
Première ronde
Deuxième ronde
|
Troisième ronde
Quatrième ronde
|
Cinquième ronde
Sixième ronde
|
$xmlfile = $_SERVER['DOCUMENT_ROOT'] . "/pages/results/paris2008.xml";
//$xmlfile = './paris2008.xml';
function getLocalizedString($lang, $str) {
switch($lang) {
case 'fr':
switch($str) {
case 'rank': return "Classement";
case 'lastname': return "Nom";
case 'firstname': return "Prénom";
case 'rating': return "Niveau";
case 'country': return "Pays";
case 'club': return "Club";
case 'nbw': return "Nombre de victoires";
case 'goto': return "Aller à la page :";
case 'white': return "Blanc";
case 'black': return "Noir";
case 'table': return "Table";
case 'handicap': return "Handicap";
case 'separate_top': return "Séparer le Top Group";
case 'unseparate_top': return "Réunir le Top Group et les autres joueurs";
case 'player_result': return "Résultats par joueur";
case 'round': return "Ronde";
case 'team': return "Résultats par équipe";
case 'warning': return "Attention! Le classement donné correspond à la dernière ronde terminée.";
case 'blitz': return "Résultats du tournoi de blitz";
case 'blitz_rules': return "10 minutes par joueur. Handicap moins un.
Après 7 parties de sélections, voici le tableau final par élimination directe:";
default: return $str;
}
case 'en':
switch($str) {
case 'rank': return "Rank";
case 'lastname': return "Name";
case 'firstname': return "First name";
case 'rating': return "Level";
case 'country': return "Country";
case 'club': return "Club";
case 'nbw': return "Number of victories";
case 'goto': return "Go to page:";
case 'white': return "White";
case 'black': return "Black";
case 'table': return "Table";
case 'handicap': return "Handicap";
case 'separate_top': return "Separate Top Group";
case 'unseparate_top': return "Join Top Group with other players";
case 'player_result': return "Results by player";
case 'round': return "Round";
case 'team': return "Team results";
case 'warning': return "Attention! Given ranks are computed after the last finished round.";
case 'blitz': return "Blitz tournament results";
case 'blitz_rules': return "10 minutes per player. Handicap minus one.
After 7 games for selection, the elimation rounds standings are the followings:";
default: return $str;
}
}
return $str;
}
function isResultUnknown($match) {
switch((string)$match['result']) {
case 'WB-':
case 'B+':
case 'WB+':
case 'W+':
case '=': return false;
default: return true;
}
}
function whiteResultStr($match) {
$res = (int)$match['black'];
switch((string)$match['result']) {
case 'WB-':
case 'B+': $res .= "-"; break;
case 'WB+':
case 'W+': $res .= "+"; break;
case '=': $res .= "="; break;
default: $res .= "?";
}
return $res . "w" . (int)$match['handicap'];
}
function blackResultStr($match) {
$res = (int)$match['white'];
switch((string)$match['result']) {
case 'WB-':
case 'W+': $res .= "-"; break;
case 'WB+':
case 'B+': $res .= "+"; break;
case '=': $res .= "="; break;
default: $res .= "?";
}
return $res . "b" . (int)$match['handicap'];
}
function displayTableHeader($lang, $baseUrl, $c, $t, $limit, $page, $order, $orderDir) {
$orderStr = "res_order=$order&res_order_dir=$orderDir";
$maxPage = ceil($c/$limit);
echo getLocalizedString($lang, "goto");
?>
<<
if($page > 1) {
?>
-1
}
?>
resultat
if($limit * $page <= $c) {
?>
1
}
?>
>>
$baseUrl .= "res_page=$page&res_limit=$limit&res_order=";
foreach($t as $k => $v) {
if($k == $order)
$url = "$baseUrl$k&res_order_dir=" . ($orderDir == 'ASC' ? 'DESC' : 'ASC');
else
$url = "$baseUrl$k&res_order_dir=ASC"
?>
|