summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--index.php47
-rw-r--r--output.php52
2 files changed, 55 insertions, 44 deletions
diff --git a/index.php b/index.php
index 20ca7fa..cf55680 100644
--- a/index.php
+++ b/index.php
@@ -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();
diff --git a/output.php b/output.php
index a2f91e4..68cfb28 100644
--- a/output.php
+++ b/output.php
@@ -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