X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Foutput.php;h=79e42c276f130c879ee10f06deb9af6392b40b09;hp=0b456276c988a8446462d9d354fe2fc8d992f06d;hb=c581cd05476d07f0fd17dab41cbb211a443fd57f;hpb=744ed663326973102580e1723e88eb74248eb16e diff --git a/include/output.php b/include/output.php index 0b45627..79e42c2 100644 --- a/include/output.php +++ b/include/output.php @@ -1,4 +1,23 @@ + * + * This file is part of e-DoKo. + * + * e-DoKo is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * e-DoKo is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with e-DoKo. If not, see . + * + */ + /* make sure that we are not called from outside the scripts, * use a variable defined in config.php to check this */ @@ -12,7 +31,7 @@ function output_ask_for_new_game($playerA,$playerB,$playerC,$playerD,$oldgameid) global $RULES; echo "
\n
\n"; - echo "Do you want to continue playing?(This will start a new game, with $playerD as dealer.)\n"; + echo "Do you want to continue playing?(This will start a new game, with $playerA starting the game.)\n"; echo " \n"; echo " \n"; echo " \n"; @@ -80,37 +99,47 @@ function output_form_for_new_game($names) ?>
-

Rules

-

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

-

Ten of hearts:

- -

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

- -

Call Re/Contra, etc.:

- - - +

Rules

+

Gameplay-related

+

Ten of hearts:

+

+ +

+

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

+

+ +

+

Call Re/Contra, etc.:

+

+ +

+

Low trump

+

+ Player can't trump a fox, that is none of his trump is higher than a fox. + +

+

Scoring-related

+

(not yet implemented)

+

+
Thanks for joining the game...
- do you want to play solo? + Do you want to play solo?
\n"; }; - echo "Do you have too many nines?"; + echo "Do you have too many nines?"; if(count_nines($mycards)>4) { echo " yes"; @@ -236,6 +266,26 @@ function output_check_for_sickness($me,$mycards) echo " no
\n"; }; + if($RULES['lowtrump']=='cancel' || $RULES['lowtrump']=='poverty') + { + if($RULES['lowtrump']=='cancel') + echo "Do you have low trump (cancel game)?"; + else + echo "Do you have low trump (poverty)?"; + + if(check_low_trump($mycards)) + { + echo " yes"; + echo " no
\n"; + } + else + { + echo " no
\n"; + }; + } + else + echo ""; + echo "\n"; echo "\n"; @@ -246,30 +296,61 @@ function output_check_for_sickness($me,$mycards) function output_form_calls($me,$myparty) { - if( can_call(120,$me) ) + $highstart = ""; + $highend = ""; + + $tmp = can_call(120,$me); + if( $tmp ) + { + if($tmp==2) echo $highstart; + if($myparty=='re') + echo "re (120):"; + else if ($myparty=='contra') + echo "contra (120):"; + else + echo " re/contra (120):"; + echo " "; + if($tmp==2) echo $highend; + echo "
\n"; + } + $tmp = can_call(90,$me); + if( $tmp ) { - if($myparty=='re') - echo "re (120):"; - else if ($myparty=='contra') - echo "contra (120):"; - else - echo " re/contra (120):"; - echo "
"; + if($tmp==2) echo $highstart; + echo " 90:". + " "; + if($tmp==2) echo $highend; + echo "
\n"; + } + $tmp = can_call(60,$me); + if( $tmp ) + { + if($tmp==2) echo $highstart; + echo " 60:". + " "; + if($tmp==2) echo $highend; + echo "
\n"; + } + $tmp = can_call(30,$me); + if( $tmp ) + { + if($tmp==2) echo $highstart; + echo " 30:". + " "; + if($tmp==2) echo $highend; + echo "
\n"; + } + $tmp = can_call(0,$me); + if( $tmp ) + { + if($tmp==2) echo $highstart; + echo " 0:". + " "; + if($tmp==2) echo $highend; + echo "
\n". + " no call:". + "
"; } - 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) @@ -300,7 +381,7 @@ function output_header() e-Doko - + @@ -313,7 +394,9 @@ function output_header()
-

Welcome to E-Doko

+ '._('Welcome to E-Doko').' '; +?>
\n\n"; echo "
\n"; - echo "

copyright 2006-2009 Arun Persaud, Lance Thornton(graphics), Jeff Zerger(database support)
\n". + echo "

copyright 2006,2007,2008,2009,2010 Arun Persaud, Lance Thornton(graphics), Jeff Zerger(database support)
\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"; @@ -348,39 +431,44 @@ function output_footer() function output_status() { - global $defaulttimezone,$INDEX,$WIKI; - if(isset($_SESSION["name"])) - { - $name = $_SESSION["name"]; - - /* logout info */ - echo "\n
\n"; - echo $name,"\n"; - echo " | mypage \n"; - echo " | settings\n"; - echo " | new game\n"; - echo " | statistics\n"; - echo " | wiki\n"; - echo " |    logout\n"; - 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"; - } - else - { - echo "\n
\n"; - echo "login\n"; - echo "
\n"; - } + global $defaulttimezone, $INDEX, $WIKI, $RSS; + + if(isset($_SESSION["name"])) + { + $name = $_SESSION["name"]; + + /* 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); + + /* rss token */ + $token = get_user_token($myid); + + /* logout info */ + echo "\n
\n"; + echo $name,"\n"; + echo " | mypage \n"; + echo " | settings\n"; + echo " | new game\n"; + echo " | statistics\n"; + echo " | wiki\n"; + echo " | rss\n"; + echo " |    logout\n"; + echo "
\n"; + + echo "
last login: ".date("r",$unixtime)."
\n"; + } + else + { + echo "\n
\n"; + echo "login\n"; + echo "
\n"; + } return; } @@ -430,6 +518,26 @@ function output_select_timezone($name,$timezone="") return; } +function output_select_language($name,$language="") +{ + $LOCALE = array ("English" => "en", + "Deutsch" => "de" ); + + echo " \n"; + + return; +} + + function output_password_recovery($email,$password) { ?> @@ -500,7 +608,7 @@ function output_exchanged_cards() */ /* need some information about the game */ - global $gameid,$mygametype, $PREF,$me,$mystatus; + global $gameid,$mygametype, $PREF,$me,$mystatus, $RULES; /* some variables to track where the people with poverty are sitting */ $partnerpos1 = 0; @@ -517,7 +625,7 @@ function output_exchanged_cards() for($mypos=1;$mypos<5;$mypos++) { $usersick = DB_get_sickness_by_pos_and_gameid($mypos,$gameid); - if($usersick == 'poverty') + if($usersick == 'poverty' || ($RULES['lowtrump']=='poverty' && $usersick=='lowtrump')) if($povertypos1) $povertypos2 = $mypos; else @@ -560,7 +668,7 @@ function output_exchanged_cards() if($povertypos2) foreach($povertycards1 as $card) { - if(is_trump($card)) + if(is_trump($card)) { $trump_back1=1; break; @@ -570,13 +678,13 @@ function output_exchanged_cards() if($povertypos2) foreach($povertycards2 as $card) { - if(is_trump($card)) + if(is_trump($card)) { $trump_back2=1; break; } } - + /* output vorbehalt */ echo "
Vorbehalt
\n"; if($show) @@ -640,4 +748,4 @@ function output_exchanged_cards() } -?> \ No newline at end of file +?>