From 4d12bf8c86b466aff0ba2252ecb42830478a1a8a Mon Sep 17 00:00:00 2001 From: arun Date: Fri, 15 Dec 2006 11:21:32 +0000 Subject: [PATCH 1/1] added a new php file for html output only --- functions.php | 136 --------------------------------------- index.php | 28 ++------- output.php | 171 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 175 insertions(+), 160 deletions(-) create mode 100644 output.php diff --git a/functions.php b/functions.php index f77f8ae..29ca96d 100644 --- a/functions.php +++ b/functions.php @@ -272,27 +272,6 @@ function card_value($card) } } -function display_card($card) -{ - /* cards are only availabl for the odd values, e.g. 1.png, 3.png, ... - * convert even cards to the matching odd value */ - - if( $card/2 - (int)($card/2) == 0.5) - echo "\"".card_to_name($card)."\"\n"; - else - echo "\"".card_to_name($card-1)."\"\n"; - - return; -} - -function display_link_card($card) -{ - if( $card/2 - (int)($card/2) == 0.5) - echo "\"\"\n"; - else - echo "\"\"\n"; - return; -} function create_array_of_random_numbers() { @@ -307,108 +286,8 @@ function create_array_of_random_numbers() return $r; } -function check_want_to_play($me) -{ - ?> -
- Do you want to play a game of DoKo? - yes - no
- Do you want to get an email for every card played or only if it your move? - every card - only on my turn
-\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - return; -} - -function check_for_sickness($me,$mycards) -{ - ?> -

nothing implemented so far, but give it a try anyway ;)

- -
- - do you want to play solo? - -
- - "; - echo " no
\n"; - } - else - { - echo " no
\n"; - }; - - echo "do you have poverty?"; - if(count_trump($mycards)<4) - { - echo " yes"; - echo " no
\n"; - } - else - { - echo " no
\n"; - }; - - echo "do you have too many nines?"; - if(count_nines($mycards)>4) - { - echo " yes"; - echo " no
\n"; - } - else - { - echo " no
\n"; - }; - - echo "\n"; - echo "\n"; - - echo "
\n"; - - return; -} - -function display_status() -{ - echo "
"; - echo " is someone playing solo, etc?"; - echo "
\n"; - - return; -} - -function display_news() -{ - global $wiki; - echo "
\n". - " Please hit shift+reload.

\n". - " added local time display, let me know what you think

\n". - " If you find more bugs, please list them in the wiki.\n
\n"; - return; -} function display_cards($me,$myturn) { @@ -435,19 +314,4 @@ function return_timezone($offset) return $zone; } -function output_form_for_new_game() -{ -?> -

Please add 4 names, please make sure that the names are correct!

-
- Name: - Name: - Name: - Name: - - -
- \ No newline at end of file diff --git a/index.php b/index.php index baa5cbd..20ca7fa 100644 --- a/index.php +++ b/index.php @@ -42,8 +42,9 @@ error_reporting(E_ALL); include_once("config.php"); -include_once("functions.php"); -include_once("db.php"); +include_once("output.php"); /* html output only */ +include_once("db.php"); /* database only */ +include_once("functions.php"); /* the rest */ DB_open(); @@ -682,28 +683,7 @@ else if(isset($_REQUEST["Rfullname"]) && /* default login page */ else { /* no new game, not in a game */ -?> -

If you want to play a game of Doppelkopf, you found the right place ;)

-

Please register, in case you haven't done yet
- or login with you email-address or name and password here: -

-
-
- Login - - - - - - - -
-
-
- - - - diff --git a/output.php b/output.php new file mode 100644 index 0000000..a2f91e4 --- /dev/null +++ b/output.php @@ -0,0 +1,171 @@ +"; + echo " is someone playing solo, etc?"; + echo "\n"; + + return; +} + +function display_news() +{ + global $wiki; + echo "
\n". + " Please hit shift+reload.

\n". + " added local time display, let me know what you think

\n". + " If you find more bugs, please list them in the wiki.\n
\n"; + return; +} + + +function output_form_for_new_game() +{ +?> +

Please add 4 names, please make sure that the names are correct!

+
+ Name: + Name: + Name: + Name: + + +
+\n"; + else + echo "\"".card_to_name($card-1)."\"\n"; + + return; +} + +function display_link_card($card) +{ + if( $card/2 - (int)($card/2) == 0.5) + echo "\"\"\n"; + else + echo "\"\"\n"; + return; +} + +function check_for_sickness($me,$mycards) +{ + ?> +

nothing implemented so far, but give it a try anyway ;)

+ +
+ + do you want to play solo? + +
+ + "; + echo " no
\n"; + } + else + { + echo " no
\n"; + }; + + echo "do you have poverty?"; + if(count_trump($mycards)<4) + { + echo " yes"; + echo " no
\n"; + } + else + { + echo " no
\n"; + }; + + echo "do you have too many nines?"; + if(count_nines($mycards)>4) + { + echo " yes"; + echo " no
\n"; + } + else + { + echo " no
\n"; + }; + + echo "\n"; + echo "\n"; + + echo "
\n"; + + return; +} + +function check_want_to_play($me) +{ + ?> +
+ Do you want to play a game of DoKo? + yes + no
+ + Do you want to get an email for every card played or only if it your move? + every card + only on my turn
+\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + + return; +} + +function home_page() +{ +?> +

If you want to play a game of Doppelkopf, you found the right place ;)

+

Please register, in case you haven't done yet
+ or login with you email-address or name and password here: +

+
+
+ Login + + + + + + + +
+
+
+ + \ No newline at end of file -- 2.17.1