NEW FEATURE: only show re or contra for calls
authorArun Persaud <arun@nubati.net>
Fri, 16 Jan 2009 02:50:56 +0000 (18:50 -0800)
committerArun Persaud <arun@nubati.net>
Fri, 16 Jan 2009 02:50:56 +0000 (18:50 -0800)
makes it clear what you can call in a silent solo.

Fixes issue #41.

include/game.php
include/output.php

index fb807c74ed4533da18ccdc4da77e2f8c159e9e14..8d07b839f39042ff2fdf53c7c473f5facc9d695d 100644 (file)
@@ -1968,8 +1968,10 @@ else
 echo "<div class=\"gameinfo\">\n";
 
 if($gamestatus == 'play' )
 echo "<div class=\"gameinfo\">\n";
 
 if($gamestatus == 'play' )
-  output_form_calls($me);
-
+  {
+    $myparty = DB_get_party_by_hash($me);
+    output_form_calls($me,$myparty);
+  }
 /* get time from the last action of the game */
 $r = DB_query_array("SELECT mod_date from Game WHERE id='$gameid' " );
 $gameend = time() - strtotime($r[0]);
 /* get time from the last action of the game */
 $r = DB_query_array("SELECT mod_date from Game WHERE id='$gameid' " );
 $gameend = time() - strtotime($r[0]);
index dc6f793f92642c49d155aa1bb045ddbc4a4e85ca..f694c5b4d833a896e3251f32bd849682ce43b8c8 100644 (file)
@@ -221,11 +221,18 @@ function output_check_for_sickness($me,$mycards)
   return;
 }
 
   return;
 }
 
-function output_form_calls($me)
+function output_form_calls($me,$myparty)
 {
   if( can_call(120,$me) )
 {
   if( can_call(120,$me) )
-    echo " re/contra (120):".
-      " <input type=\"radio\" name=\"call\" value=\"120\" /> <br />";
+    {
+    if($myparty=='re')
+      echo "re (120):";
+    else if ($myparty=='contra')
+      echo "contra (120):";
+    else
+      echo " re/contra (120):";
+    echo " <input type=\"radio\" name=\"call\" value=\"120\" /> <br />";
+    }
   if( can_call(90,$me) )
     echo " 90:".
       " <input type=\"radio\" name=\"call\" value=\"90\" /> <br />";
   if( can_call(90,$me) )
     echo " 90:".
       " <input type=\"radio\" name=\"call\" value=\"90\" /> <br />";