X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=index.php;h=97028006cca1882ba7769b82d2ba8b6f4c70909d;hp=e86854cea5addfe466f243cd0d628f4f337af8ac;hb=c7a14bb90bb3ce1a8e49b27460217a49a1fd4720;hpb=d0237ebe9fa2aa6916b644766d97ff43ac4b945e diff --git a/index.php b/index.php index e86854c..9702800 100644 --- a/index.php +++ b/index.php @@ -1,1200 +1,99 @@ - - -
-no game in progress, please input 4 names and email addresses, please make sure that the addresses are correct!
- - - \n"; - } - } -/* *** - * * * - * *** - * * * - * *** - * yes? email him his hand, ask for solo, poverty, email every move or every card? - */ - if(isset($_REQUEST["b"])) - { - $b = $_REQUEST["b"]; - - if( ereg("s",$player[$b]["option"]) && $game["init"]<4) - { /* the player already filled out everything */ - echo "just wait for the game to start"; - } - else if( (!isset($_REQUEST["in"])|| !isset($_REQUEST["update"])) && !ereg("i",$player[$b]["option"])) - { /* the player didn't fill out the form at "a" correctly */ - echo "go back to "; - echo " here and fill out the formyour cards are:
\n";
- foreach($mycards as $card)
- display_card($card);
- echo "
aehm... at the moment poverty is not implented. so I guess you need to play a normal game, even if you have less than 3 trump :(...sorry
- - \n"; - } - } - } - - if(isset($_REQUEST["c"])) - { - $c = $_REQUEST["c"]; - - - if( ereg("s",$player[$c]["option"]) && $game["init"]<4 ) - { /* the player already filled out everything */ - echo "just wait for the game to start
\n"; - } - else if(!isset($_REQUEST["solo"]) || - !isset($_REQUEST["wedding"]) || - !isset($_REQUEST["poverty"]) || - !isset($_REQUEST["nines"]) ) - {/* player still needs to fill out the form */ - echo "go back to "; - echo " here and fill out the formThe game can start now, it's your turn, please use this link to play a card.
\n"; - } - else if($game["init"]==4) - { - $message = "The game can start now, it's your turn, please use this link to play a card:\n". - $host."?me=".$hash[$game["startplayer"]]."\n"; - mymail($player[$hash[$game["startplayer"]]]["email"],"[DoKo-debug] let's go",$message); - echo "The game has started. An email has been sent out to the first player.
\n"; - } - else - { - echo "You're in. Once everyone has filled out the form, ". - "the game will start and you'll get an eamil on your turn.
\n"; - } - } - } - /* END SETUP */ - - /* the game */ - if($game["init"]==4) - { - /* check for sickness, only would need to do this on the first trick really...*/ - /***** someone has 5 nines and no one is playing solo => cancel game */ - if($game["nines"]>=0 && $game["solo-who"]<0) - { - $message = $player[$hash[$game["poverty"]]]["nines"]." has more than 4 nines. Game aborted!\n"; - for($i=0;$i<4;$i++) - mymail($player[$hash[$i]]["email"],"[DoKo-debug] the game has been canceled",$message); - - $output = fopen("status.txt","w"); - if($output) - fclose($output); - else - echo "problem opening file"; - }; - - /* who is requesting this*/ - if(!isset($_REQUEST["me"])) - { - if(!isset($_REQUEST["recovery"])) - { - echo "A game is in progress and kibitzing is not allowed. Sorry!.An email with the game information has been sent.
\n"; - } - else - { - echo "can't find this email address, sorry.
\n"; - }; - } /* end recovery */ - } - else - { /* $me is set */ - $me = $_REQUEST["me"]; - - /* show history */ - /* old tricks as list */ - echo "