From 09515348107d9aab7823a12d31b082a2ebb75555 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 26 Apr 2008 11:52:49 -0700 Subject: CLEANUP: make index.php very short and move everything in separate files created an include dir and almost everything that was in index.php is now in separate files and gets only included in index.php... makes index.php look a lot nicer ;) Signed-off-by: Arun Persaud --- include/output.php | 435 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 435 insertions(+) create mode 100644 include/output.php (limited to 'include/output.php') diff --git a/include/output.php b/include/output.php new file mode 100644 index 0000000..1637603 --- /dev/null +++ b/include/output.php @@ -0,0 +1,435 @@ +\n"; + echo "

Settings

\n"; + echo "Change password
"; + + echo "
Card set
\n"; + if( $PREF["cardset"] == "english" ) + echo "Change to German cards
"; + else + echo "Change to English cards
"; + + echo "
Email
\n"; + if( $PREF["email"] == "emailaddict" ) + echo "Change to non-addicted mode (emails for each move)
"; + else + echo "Change to addicted mode (minimal amount of emails)
"; + + echo "\n"; + + return; +} + +function output_ask_for_new_game($playerA,$playerB,$playerC,$playerD,$oldgameid) +{ + global $RULES; + + echo "Do you want to continue playing?(This will start a new game, with the next person as dealer.)\n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + echo " \n"; + + return; +} + +function output_form_for_new_game($names) +{ +?> +

Players

+

Please select four players (or use the randomly pre-selected names)

+

Remember: you need to be one of the players ;)

+
+ +
+ table +\n"; + $i++; + echo " Name: \n \n
\n"; + } +?> + +

Rules

+

Some areas are grayed out which means that the rule is not implemented yet and therefore cannot be selected

+

Ten of hearts: +

    +
  • just normal non-trump
  • +
  • first ten of hearts wins the trick
  • +
  • second ten of hearts wins the trick
  • +
+

+

Schweinchen (both foxes), only in normal games or silent solos: +

    +
  • none
  • +
  • + both become highest trump (automatic call at beginning of the game) +
  • +
  • + first one normal, second one becomes highest (call during the game)
  • +
  • + second one become highest only in case re/contra was announced (not working yet) +
  • +
+

+

Call Re/Contra, etc.: +

    +
  • + Can call re/contra on the first own card played, 90 on the second, etc.
  • +
  • + Can call re/contra until 5th card is played, 90 until 9th card is played, etc.
  • +
  • + Can call re/contra until 5th card is played, 90 if player still has 9 cards, etc.
  • +
+

+ +
+\n"; + else + echo "\"".DB_get_card_name($card-1)."\"\n"; + + return; +} + +function display_link_card($card,$dir="english",$type="card") +{ + if( $card/2 - (int)($card/2) == 0.5) + echo "
\"".DB_get_card_name($card)."\"
\n"; + else + echo "
\"".DB_get_card_name($card-1)."\"
\n"; + return; +} + +function output_check_for_sickness($me,$mycards) +{ + ?> +
Thanks for joining the game...
+ + 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 output_form_calls($me) +{ + if( can_call(120,$me) ) + echo " re/contra (120):". + "
"; + if( can_call(90,$me) ) + echo " 90:". + "
"; + if( can_call(60,$me) ) + echo " 60:". + "
"; + if( can_call(30,$me) ) + echo " 30:". + "
"; + if( can_call(0,$me) ) + echo " 0:". + "
". + " no call:". + "
"; +} + + +function output_check_want_to_play($me) +{ + ?> +
+ Do you want to play a game of DoKo?
+ yes + no
+\n"; + echo "\n"; + echo "\n"; + echo "
\n"; + + return; +} + +function output_home_page($pre,$game,$done,$avgtime) +{ + global $WIKI; + + echo"

If you want to play a game of Doppelkopf, you found the right place ;)". + " For more information please visit our wiki.

"; + + if($pre == 0) + echo "

At the moment there are no games that are being started "; + else if($pre==1) + echo "

At the moment there is one games that is being started "; + else + echo "

At the moment there are $pre games that are being started "; + + echo "and "; + + if($game==0) + echo "zero games that are ongoing. "; + else if($game==1) + echo "one game that is ongoing. "; + else + echo "$game games that are ongoing. "; + + echo "
\n"; + + if($done==0) + echo "No game has been completed on this server.

"; + else if($done==1) + echo "One game has been completed on this server.

"; + else + echo "$done games have been completed on this server. Average time of a game: $avgtime days

"; +?> + +

Please register, in case you have not done that yet
+ or login with you email-address or name and password here: +

+
+
+ Login + + + + + + + + + + + +
+
+
+ + + + + + e-Doko + + + + + + +
+

Welcome to E-Doko (beta)

+
+"; + return; +} + +function output_footer() +{ + global $REV,$PREF; + + echo "\n\n"; + echo "
\n"; + echo "

copyright 2006-2008 Arun Persaud, Lance Thornton
\n". + " Verwendung der [deutschen] Kartenbilder mit Genehmigung
der Spielkartenfabrik Altenburg GmbH,(c) ASS Altenburger
\n". + " - ASS Altenburger Spielkarten - Spielkartenfabrik Altenburg GmbH
\n". + " a Carta Mundi Company Email: info@spielkarten.com Internet: www.spielkarten.com

\n"; + echo "

See the latest changes \n". + " via git
or download the source via
\n'git clone http://nubati.net/git/e-DoKo.git'
\n". + " \n". + " \"Green\n". + "

\n"; + echo "\n"; + echo "
\n"; + + echo "\n"; + echo "\n"; + + return; +} + +function output_status() +{ + global $defaulttimezone; + if(isset($_SESSION["name"])) + { + $name = $_SESSION["name"]; + + /* logout info */ + echo "\n
"; + echo $name; + echo " logout"; + echo "
\n"; + + /* last logon time */ + $myid = DB_get_userid("name",$name); + $zone = DB_get_user_timezone($myid); + + $time = DB_get_user_timestamp($myid); + date_default_timezone_set($defaulttimezone); + $unixtime = strtotime($time); + date_default_timezone_set($zone); + + echo "
last login: ".date("r",$unixtime)."
\n"; + }; + return; +} + + +function output_password_recovery($email,$password) +{ +?> +
+\n"; + echo " \n"; + echo " \n"; +?> +
+ Password recovery + + + + + + + + + + + + + + +
+
+
+ + \ No newline at end of file -- cgit v1.2.3-18-g5258