diff options
-rw-r--r-- | index.php | 47 | ||||
-rw-r--r-- | output.php | 52 |
2 files changed, 55 insertions, 44 deletions
@@ -1,44 +1,4 @@ -<!DOCTYPE html PUBLIC - "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" - "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> - <head> - <title>e-Doko</title> - <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" /> - <link rel="stylesheet" type="text/css" href="css/standard.css" /> - <script type="text/javascript"> - function hl(num) { - if(document.getElementById){ - var i; - for(i=1;i<13;i++){ - if(document.getElementById("trick"+i)) - document.getElementById("trick"+i).style.display = 'none'; - } - document.getElementById("trick"+num).style.display = 'block'; - } - } - function high_last(){ - if(document.getElementById){ - var i; - for(i=12;i>0;i--) { - if(document.getElementById("trick"+i)) - { - hl(i); - break; - } - } - } - } - </script> - </head> -<body onload="high_last();"> -<div class="header"> -<h1> Welcome to E-Doko </h1> -</div> - <?php -/* end header */ - error_reporting(E_ALL); include_once("config.php"); @@ -49,6 +9,8 @@ include_once("functions.php"); /* the rest */ DB_open(); /***************** M A I N **************************/ +output_header(); + /* check if we want to start a new game */ if(isset($_REQUEST["new"])) @@ -685,11 +647,8 @@ else { /* no new game, not in a game */ home_page(); } -?> -</body> -</html> -<?php +output_footer(); DB_close(); @@ -168,4 +168,56 @@ function home_page() return; } +function output_header() +{ +?> +<!DOCTYPE html PUBLIC + "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" + "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> + <head> + <title>e-Doko</title> + <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" /> + <link rel="stylesheet" type="text/css" href="css/standard.css" /> + <script type="text/javascript"> + function hl(num) { + if(document.getElementById){ + var i; + for(i=1;i<13;i++){ + if(document.getElementById("trick"+i)) + document.getElementById("trick"+i).style.display = 'none'; + } + document.getElementById("trick"+num).style.display = 'block'; + } + } + function high_last(){ + if(document.getElementById){ + var i; + for(i=12;i>0;i--) { + if(document.getElementById("trick"+i)) + { + hl(i); + break; + } + } + } + } + </script> + </head> +<body onload="high_last();"> +<div class="header"> +<h1> Welcome to E-Doko </h1> +</div> + +<?php + return; +} + +function output_footer() +{ + echo "</body>\n"; + echo "</html>\n"; + + return; +} ?>
\ No newline at end of file |