From: arun Date: Wed, 13 Dec 2006 16:10:00 +0000 (+0000) Subject: fixed some small bugs from the validator X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=51312acc9682902810edee454471aae1ce59d80c;ds=sidebyside fixed some small bugs from the validator --- diff --git a/index.php b/index.php index ea5724a..689a8ce 100644 --- a/index.php +++ b/index.php @@ -37,6 +37,8 @@ "; - /*something like + /*something like need to modify for DB backend for($i=0;$i<4;$i++) { $message = "Hello ".$player[$hash[$i]]["name"].",\n\n". @@ -198,6 +196,7 @@ else if(isset($_REQUEST["me"])) mymail($player[$hash[$i]]["email"],"[DoKo-Debug] the game has been canceled",$message); } */ + /* delete everything from the dB */ DB_cancel_game($me); } else @@ -280,7 +279,7 @@ else if(isset($_REQUEST["me"])) break; case 'play': - case 'gameover': /* gameover and play, so that the tricks are visible for both */ + case 'gameover': /*both entries here, so that the tricks are visible for both in case of 'play' there is a break later that skips the last part*/ display_news(); display_status(); @@ -290,7 +289,7 @@ else if(isset($_REQUEST["me"])) echo "you need to wait for the others...
"; break; } - /* get trick ids */ + /* get everythin relevant to display the tricks */ $result = mysql_query("SELECT Hand_Card.card_id as card,". " User.fullname as name,". " Hand.position as position,". @@ -338,7 +337,7 @@ else if(isset($_REQUEST["me"])) /* start of a last trick? */ echo "
  • Current Trick\n". "
    \n". - " \"table\""; + " \"table\"\n"; } /* display card */ @@ -370,7 +369,8 @@ else if(isset($_REQUEST["me"])) echo "
    \n
  • \n"; /* end div table, end li table */ } } - if($seq!=4) + + if($seq!=4 && $trickNR>1) echo " \n \n"; /* end div table, end li table */ echo "\n"; @@ -543,8 +543,10 @@ else if(isset($_REQUEST["me"])) } exit(); } +/* user status page */ else if(isset($_REQUEST["email"]) && isset($_REQUEST["password"])) { + /* test id and password, should really be done in one step */ $ok=1; $uid = DB_get_userid_by_email($_REQUEST["email"]); if(!$uid) @@ -586,6 +588,7 @@ else if(isset($_REQUEST["me"])) } exit(); } +/* page for registration */ else if(isset($_REQUEST["register"]) ) { echo "TODO: convert timezone into a menu
    \n"; @@ -616,6 +619,7 @@ else if(isset($_REQUEST["register"]) )

    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 - + - +
    - -

    +