From ec0c90f663240dcc2568741a1c3af0acc716bf25 Mon Sep 17 00:00:00 2001 From: arun Date: Sun, 26 Nov 2006 12:32:16 +0000 Subject: bugfix: the next player was set incorrectly after a new trick, hope it is fixed now --- index.php | 20 +++++++++++++------- standard.css | 7 +++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/index.php b/index.php index a7af6df..f4e323e 100644 --- a/index.php +++ b/index.php @@ -10,6 +10,7 @@

Welcome to E-Doko

+

(please hit shift-reload:))

"; + echo "something went wrong, please contact the admin. ErrorCode 2
"; return 0; } } @@ -390,7 +393,7 @@ function save_status() fclose($output); } else - echo "can't open file for writing, please inform the admin."; + echo "can't open file for writing, please inform the admin.errorcode3"; return; } @@ -816,7 +819,7 @@ else if($ok>=0) { $message = "Please try this link: ".$host."?me=".$hash[$ok]."\n". - "\n if this doesn't work, contact the admin.\n"; + "\n if this doesn't work, contact the admin.error4\n"; mymail($recovery,"[DoKo-Debug] recovery ",$message); echo "

An email with the game information has been sent.

\n"; } @@ -841,7 +844,6 @@ else { $trick = explode(":",$play); - $last=-2; /* found old trick, display it */ if(sizeof($trick)==5) echo "
\n"; @@ -850,6 +852,9 @@ else for($i=0;$i",$card)) { $tmp = explode("->",$card); @@ -879,7 +884,9 @@ else $next = $last + 1; if ($next>=4) $next -= 4 ; - if($last<0) + + /* if no one has played yet or we are at the start of a new trick */ + if(strlen($history[sizeof($history)-1])==3) $next = $history[sizeof($history)-1][0]; /* are we trying to play a card? */ @@ -926,7 +933,6 @@ else echo "
\n"; ?> -
A short comment: diff --git a/standard.css b/standard.css index 3a08cbf..346e0e5 100644 --- a/standard.css +++ b/standard.css @@ -1,4 +1,11 @@ +.header +{ + text-align:center; + border-bottom: 3px solid gray; +} + + .trick { position:relative; -- cgit v1.2.3-18-g5258