12) $next = 1; $texts = $translate["page $id"]; $title = "{$translate['subject']}"; if (!empty($texts['header'])) $title .= " - {$texts['header']}"; $page_meta = array( 'title' => $title, 'author' => 'Jan van der Steen', 'editor' => 'editor@gobase.org', 'modified' => '2002-10-18', 'flag' => $ln, 'section_path' => array( $translate['section'], $translate['subject'], ), 'references' => array( 'home' => array( 'url' => "/", ), 'prev' => array( 'url' => "$index/?id=$prev&ln=$ln", ), 'index' => array( 'url' => "$index/?id=0&ln=$ln", ), 'next' => array( 'url' => "$index/?id=$next&ln=$ln", ), ), 'path' => array( array( 'txt' => 'home', 'url' => '/', ), array( 'txt' => $translate['subject'], 'url' => "$index/?id=0&ln=$ln", ), array( 'txt' => $texts['header'], ), ), ); if ($ln == 'pl') { $page_meta['content-type'] = 'text/html; charset=ISO-8859-2'; } if ($ln == 'ru') { $page_meta['content-type'] = 'text/html; charset=ISO-8859-5'; } if ($ln == 'bg') { $page_meta['content-type'] = 'text/html; charset=Windows-1251'; } if ($ln == 'tr') { $page_meta['content-type'] = 'text/html; charset=ISO-8859-9'; } if ($ln == 'r8') { $page_meta['content-type'] = 'text/html; charset=utf-8'; } if ($ln == 'gr') { $page_meta['content-type'] = 'text/html; charset=utf-8'; } $images['inturn'] = array( 'src' => "$imgdir/inturn.gif", 'vspace' => '5', 'w' => '161', 'h' => '161', ); $images['board'] = array( 'src' => "$imgdir/7x7.gif", 'vspace' => '5', 'w' => '161', 'h' => '161', ); $images['game1'] = array( 'src' => "$imgdir/game1.gif", 'vspace' => '5', 'w' => '161', 'h' => '161', ); $images['game2'] = array( 'src' => "$imgdir/game2.gif", 'vspace' => '5', 'w' => '161', 'h' => '161', ); $images['game3'] = array( 'src' => "$imgdir/game3.gif", 'vspace' => '5', 'w' => '161', 'h' => '161', ); $images['capture'] = array( 'src' => "$imgdir/capture.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['aftercap'] = array( 'src' => "$imgdir/aftercap.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['thecap'] = array( 'src' => "$imgdir/thecap.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['capture3'] = array( 'src' => "$imgdir/capture3.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['aftercap3'] = array( 'src' => "$imgdir/aftercap3.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['thecap3'] = array( 'src' => "$imgdir/thecap3.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['endgame'] = array( 'src' => "$imgdir/endgame.gif", 'vspace' => '5', 'w' => '161', 'h' => '161', ); $images['handicap3'] = array( 'src' => "$imgdir/handicap3.gif", 'vspace' => '5', 'w' => '161', 'h' => '161', ); $images['handicap9'] = array( 'src' => "$imgdir/handicap9.gif", 'vspace' => '5', 'w' => '161', 'h' => '161', ); $images['ko'] = array( 'src' => "$imgdir/ko.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['ko1'] = array( 'src' => "$imgdir/ko1.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['afterko1'] = array( 'src' => "$imgdir/afterko1.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['ko2'] = array( 'src' => "$imgdir/ko2.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['afterko2'] = array( 'src' => "$imgdir/afterko2.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); $images['theko'] = array( 'src' => "$imgdir/theko.gif", 'vspace' => '5', 'w' => '133', 'h' => '133', ); function emit_table($mode) { switch ($mode) { case 'open': print '' . "\n"; break; case 'close': print '
' . "\n"; break; } } function emit_row($mode) { switch ($mode) { case 'open' : print '' . "\n"; break; case 'close': print '' . "\n"; break; } } function emit_cell($mode, $class = '', $colspan = '') { switch ($mode) { case 'open' : print '' . "\n"; break; case 'close': print '' . "\n"; break; } } function emit_note($text) { print '

' . "\n"; print $text; } function emit_caption($caption = '') { if (!empty($caption)) { print '
'; print '' . $caption . '' . "\n"; print '
'; } } function cell_img($name, $class, $caption = '') { emit_cell('open', $class); img_emit($name); emit_caption($caption); emit_cell('close'); } function cell_txt($text, $class, $colspan = '') { emit_cell('open', $class, $colspan); print "$text"; emit_cell('close'); } function page_00() // // The index // { global $ln; global $index; global $texts; global $translate; emit_table('open'); emit_row ('open'); // // We build the cells manually due to the required // valign and nowrap properties. // print ''; print '

' . "\n"; print "{$texts['caption-2']}"; print '

' . "\n"; print "{$texts['text-1']}"; print '' . "\n"; print ''; print '

' . "\n"; print "{$texts['caption-1']}"; print '

' . "\n"; for ($n = 1; $n <= 12; $n++) { $texts = $translate["page $n"]; print ''; print "{$texts['header']}"; print '' . "\n"; print '
'; } print '' . "\n"; emit_row ('close'); emit_table('close'); print <<<__EOF
Fujitsu Please also read On the Rules of Go by Dr. Ikeda Toshio,
a former Fujitsu executive officer.
__EOF; } function page_01() // // The Go board // { global $texts; emit_table('open'); emit_row ('open'); cell_img('board', 'cknockout'); cell_txt("{$texts['text-1']}", 'knockout'); emit_row ('close'); emit_table('close'); } function page_02() // // Legal moves // { global $texts; emit_table('open'); emit_row ('open'); cell_img('inturn', 'cknockout'); cell_txt("{$texts['text-1']}", 'knockout'); emit_row ('close'); emit_table('close'); } function page_03() // // Capturing stones // { global $texts; emit_table('open'); emit_row ('open'); emit_cell('open', 'cknockout'); img_emit( 'capture'); emit_caption("{$texts['caption-1']}"); img_emit('aftercap'); emit_caption("{$texts['caption-2']}"); img_emit( 'thecap'); emit_caption("{$texts['caption-3']}"); emit_cell('close'); cell_txt("{$texts['text-1']}", 'knockout'); emit_cell('open', 'cknockout'); img_emit( 'capture3'); emit_caption("{$texts['caption-4']}"); img_emit('aftercap3'); emit_caption("{$texts['caption-5']}"); img_emit( 'thecap3'); emit_caption("{$texts['caption-6']}"); emit_cell('close'); emit_row ('close'); emit_table('close'); emit_note("{$texts['note-1']}"); } function page_04() // // Aim of the game // { global $texts; emit_table('open'); emit_row ('open'); cell_img('endgame', 'cknockout'); cell_txt("{$texts['text-1']}", 'knockout'); emit_row ('close'); emit_table('close'); } function page_05() // // An instruction game // { global $texts; emit_table('open'); emit_row ('open'); emit_cell('open', 'knockout', 3); emit_free_icon('/studying/rules/sgf/game.sgf'); print " {$texts['note-1']}"; emit_cell('close'); emit_row ('close'); emit_row ('open'); cell_img('game1', 'cknockout', "{$texts['caption-1']}"); cell_img('game2', 'cknockout', "{$texts['caption-2']}"); cell_img('game3', 'cknockout', "{$texts['caption-3']}"); emit_row ('close'); emit_row ('open'); cell_txt("{$texts['text-1']}", 'knockout', 3); emit_row ('close'); emit_table('close'); } function page_06() // // Komi // { global $texts; emit_table('open'); emit_row ('open'); cell_img('endgame', 'cknockout'); cell_txt("{$texts['text-1']}", 'knockout'); emit_row ('close'); emit_table('close'); emit_note("{$texts['note-1']}"); emit_note("{$texts['note-2']}"); } function page_07() // // Ko // { global $texts; emit_table('open'); emit_row ('open'); cell_img( 'ko', 'cknockout', "{$texts['caption-1']}"); cell_img( 'ko1', 'cknockout', "{$texts['caption-2']}"); cell_img('afterko1', 'cknockout', "{$texts['caption-3']}"); emit_row ('close'); emit_row ('open'); cell_txt("{$texts['caption-A']}", 'cknockout'); cell_img( 'ko2', 'cknockout', "{$texts['caption-4']}"); cell_img('afterko2', 'cknockout', "{$texts['caption-5']}"); emit_row ('close'); emit_row ('open'); cell_img('theko', 'cknockout', "{$texts['caption-6']}"); cell_txt("{$texts['text-1']}", 'knockout', 2); emit_row ('close'); emit_table('close'); emit_note("{$texts['note-1']}"); if (isset($texts['note-2'])) { emit_note("{$texts['note-2']}"); } } function page_08() // // Handicap // { global $texts; emit_table('open'); emit_row ('open'); cell_txt("{$texts['text-1']}", 'knockout'); cell_img('handicap3', 'cknockout'); emit_row ('close'); emit_row ('open'); cell_img('handicap9', 'cknockout'); cell_txt("{$texts['text-2']}", 'knockout'); emit_row ('close'); emit_table('close'); } function page_09() // // Start playing // { global $texts; print "{$texts['text-1']}"; } function page_10() // // PostScript and PDF documents // { global $texts; print "{$texts['text-1']}"; } function page_11() // // All rules on one page // { global $texts; global $translate; $rules = array(1, 2, 3, 4, 6, 7, 8); page_section_open($texts['header']); print '

' . "\n"; print "{$texts['text-1']}"; page_section_close('balanced'); reset($rules); while (list($key, $val) = each($rules)) { $texts = $translate["page $val"]; page_section_open($texts['header']); emit_page($val); page_section_close('balanced'); } } function page_12() // // Credits // { global $texts; print '

' . "\n"; print 'Thanks to the following translators:' . "\n"; print '

' . "\n"; img_emit('flag-gr'); print ' Andrea Roussou' . "\n"; print '

' . "\n"; img_emit('flag-bg'); print ' Boyan Alexandrov' . "\n"; print '

' . "\n"; img_emit('flag-ru'); print ' Sergey Alekseev' . "\n"; print '

' . "\n"; img_emit('flag-pt'); print ' Vasco Pimenta' . "\n"; print '

' . "\n"; img_emit('flag-ro'); print ' Ovidiu Gheorghies & Lucian Deaconu' . "\n"; print '

' . "\n"; img_emit('flag-tr'); print ' Utku Uzulmez & Mr. Mehmet Dardeniz' . "\n"; print '

' . "\n"; img_emit('flag-es'); print ' Dimas Cabré i Chacón' . "\n"; print '

' . "\n"; img_emit('flag-ct'); print ' Alfonso Madruga' . "\n"; print '

' . "\n"; img_emit('flag-uk'); print ' Jan van der Steen' . "\n"; print '

' . "\n"; img_emit('flag-it'); print ' Patrick De Marta' . "\n"; print '

' . "\n"; img_emit('flag-de'); print ' Thomas Redecker' . "\n"; print '

' . "\n"; img_emit('flag-fr'); print ' Remi Butaud' . "\n"; print '

' . "\n"; img_emit('flag-pl'); print ' Paweł O?ciak' . "\n"; print '

' . "\n"; img_emit('flag-no'); print ' Vidar Larsen' . "\n"; print '

' . "\n"; img_emit('flag-nl'); print ' Jan van der Steen' . "\n"; } function emit_page($n) { switch ($n) { case '0': page_00(); break; case '1': page_01(); break; case '2': page_02(); break; case '3': page_03(); break; case '4': page_04(); break; case '5': page_05(); break; case '6': page_06(); break; case '7': page_07(); break; case '8': page_08(); break; case '9': page_09(); break; case '10': page_10(); break; } } function page() { global $id; emit_page($id); } ?>