\n"; echo "\n"; echo " \n"; echo " Overview\n"; echo " \n"; echo "\n"; echo "\n"; } ### ### Head bar ------------------------------------------------------------------------ ### # This includes the "dvdisaster version ..." header. Depending on the mode we # - provide the link to the online version for local documentation, or # - create the language switch for the online publication. function lang_link($lang_name, $lang, $spacing) { global $script_file; global $script_lang; if($spacing) $space="   "; else $space=""; if(strcmp($lang, $script_lang)) echo " $lang_name $space\n"; else echo " $lang_name $space\n"; } function begin_page() { global $cooked_version; global $trans_to_hoster; global $trans_to_internet; global $trans_version; global $project_at_hoster; global $script_lang; global $mode; # Begin HTML file start_html(); # Write the title header echo "\n\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; echo " dvdisaster\n"; echo " $trans_version $cooked_version\n"; if(!strcmp($mode, "local")) { echo " \n"; echo "  $trans_to_internet\n"; lang_link("", "de", 0); # TODO: This is a quick hack lang_link("", "en", 0); # to produce all locales for lang_link("", "ru", 0); # Windows. Do it better! } echo "
\n"; # Write the language chooser depending on mode echo "\n\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; if(strcmp($mode, "local")) { echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; } # Both modes get the separator echo " \n"; echo "
\"\"
$trans_to_hoster\n"; # lang_link("Česky", "cs"); lang_link("Deutsch", "de", 1); lang_link("English", "en", 1); lang_link("Russian", "ru", 0); echo "
\"\"
\n"; echo " \"\"\n"; echo "
\n"; # Insert the navigation column create_navigation(); } ### ### Navigation column ---------------------------------------------------------------- ### # # Helper functions for creating the table of contents # function section($section_name) { global $toc_section; global $toc_mode; $toc_section = $section_name; $toc_mode = "section"; } function subsection($subsection_name) { global $toc_subsection; global $toc_mode; $toc_subsection = $subsection_name; $toc_mode = "subsection"; } function subsubsection($subsubsection_name) { global $toc_subsubsection; global $toc_mode; $toc_subsubsection = $subsubsection_name; $toc_mode = "subsubsection"; } function toc_link($msg, $lang) { static $separator=0; global $script_lang; global $script_name; global $toc_section; global $toc_subsection; global $toc_subsubsection; global $toc_mode; if(strcmp($lang, $script_lang)) return; # wrong locale # Decide whether this is the currently unfolded (sub)section # and render it accordingly if(!strcmp($toc_mode, "section")) { $target=$toc_section . ".php"; # Draw the separator between sections (except for the first one) if(!$separator) $separator=1; else echo " \n"; if(!strcmp($toc_section, $script_name)) echo " $msg\n"; else echo " $msg\n"; } if( !strcmp($toc_mode, "subsection") && !strncmp($toc_section, $script_name, strlen($toc_section))) { $target=$toc_subsection . ".php"; if(!strcmp($toc_subsection, $script_name)) echo " ·$msg\n"; else echo " ·$msg\n"; } # Using strlen($toc_section)+1 is inconvenient as it hardcodes the # section/subsection10/subsubsection11 scheme. Improve! if( !strcmp($toc_mode, "subsubsection") && !strncmp($toc_subsection, $script_name, strlen($toc_section)+1)) { $target=$toc_subsubsection . ".php"; if(!strcmp($toc_subsubsection, $script_name)) echo " -${msg}\n"; else echo " -$msg\n"; } } function de($msg) {toc_link($msg, "de"); }; function en($msg) {toc_link($msg, "en"); }; function ru($msg) {toc_link($msg, "ru"); }; # # Helper functions for creating the news pages and -flash # function news_headline($headline) { global $news_flash; if(!$news_flash) echo "

$headline

\n"; } function news_item($date, $headline, $body) { global $news_flash; global $news_counter; $news_counter++; if($news_flash) { echo " $date
\n"; echo " \n"; echo " $headline\n"; echo "

\n"; } else { echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
${headline}$date
\n"; ?>
\n"; echo " \n"; echo "$body\n"; echo " \n"; echo " \n"; echo "

 
\n"; } } # # Actual navigation assembly # function create_navigation() { global $trans_contents; global $script_file; global $mode; if(!strcmp($script_file, "index.php")) $body_width = "57%"; else $body_width = "77%"; ?> \n"; # body contents must be appended here from calling page } ### ### Footer ---------------------------------------------------------------------------- ### # Closes the body table. Optionally includes the news flash. # Appends the copyright and redistribution terms. # function end_page() { global $script_file; global $trans_copyright; global $trans_modified; global $trans_news; global $trans_fdl; global $trans_hosting; global $modified_source; global $news_flash; global $script_lang; /* for old version link */ global $trans_old_version; # Close the body table echo " \n"; # Insert news flash if(!strcmp($script_file, "index.php")) { ?> */ ?>
$trans_contents\n"; ?>

$trans_news\n"; ?>

$trans_hosting
\n"; ?> insider
$trans_old_version
\n"; ?>
$trans_copyright
\n"; echo " $trans_fdl\n"; ?>
\n"; echo "$headline\n"; echo "\n"; echo "$subtitle\n"; echo "

\n"; } ?>