X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fgame.php;h=4f506f5b5b26eb5a19c557c12fe3935912769fa7;hp=3fbc451e1d83bd149af696c05eddbb028e95f8a9;hb=077ab356084fa26910200f28a9cd44a954f291eb;hpb=0049ad8507bb304c0f755dd156fd5f3082b1d6b5 diff --git a/include/game.php b/include/game.php index 3fbc451..4f506f5 100644 --- a/include/game.php +++ b/include/game.php @@ -112,18 +112,28 @@ echo "
\n"; /* output extra division in case this game is part of a session */ if($session) { - echo "
\n". - "This game is part of session $session: \n"; + echo "
\n"; + echo "
Rules (+icons fur rules) \n"; + echo "
\n"; + echo " 10ofhearts : ".$RULES["dullen"] ."
\n"; + echo " schweinchen: ".$RULES["schweinchen"] ."
\n"; + echo " call: ".$RULES["call"] ."
\n"; + echo "
\n
\n"; + echo "
Score \n"; + $score = generate_score_table($session); + echo format_score_table_html($score,$myid); + echo "
\n"; $hashes = DB_get_hashes_by_session($session,$myid); $i = 1; foreach($hashes as $hash) { - if($hash == $me) - echo "$i \n"; - else - echo "$i \n"; - $i++; + if($hash == $me) + $j=$i; + $i++; + $lasthash=$hash; } + $i--; + echo "This is game number $j of $i in session $session."; echo "
\n"; } @@ -1649,35 +1659,9 @@ switch($mystatus) $session = DB_get_session_by_gameid($gameid); $score = generate_score_table($session); - /* convert html to ascii */ - $score = str_replace("
\n\n \n","",$score); - $score = str_replace("
\n","",$score); - $score = str_replace("\n","",$score); - $score = str_replace(array("","","",""),array("","\n","","|"),$score); - $score = explode("\n",$score); - - $header = array_slice($score,0,1); - $header = explode("|",$header[0]); - for($i=0;$i5) $header.= " ... \n"; - - if(sizeof($score)>5) $score = array_slice($score,-5,5); - for($i=0;$i\n"; - echo "Insert note:\n"; + echo "\n"; echo "
\n"; $mycards = DB_get_hand($me); @@ -1869,15 +1853,6 @@ switch($mystatus) /* display rule set for this game */ echo "
\n"; - if($gamestatus != 'pre') - echo " Gametype: $GT
\n"; - - echo "Rules:
\n"; - echo "10ofhearts : ".$RULES["dullen"] ."
\n"; - echo "schweinchen: ".$RULES["schweinchen"] ."
\n"; - echo "call: ".$RULES["call"] ."
\n"; - - echo "
\n"; if($gamestatus == 'play' ) output_form_calls($me); @@ -1888,15 +1863,9 @@ switch($mystatus) if($gamestatus == 'play' || $gameend < 60*60*24*7) { echo "
\nA short comment:\n"; - echo "
"; } - echo "\n
\n"; - - $session = DB_get_session_by_gameid($gameid); - $score = generate_score_table($session); - - echo $score; + echo "\n"; echo "
\n";