From f94dd2d6d58f37306d1da0f6bb12f5276883cd6b Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Tue, 21 Sep 2010 20:27:12 -0700 Subject: NEW FEATURE: pre select card to play if there is only one option --- include/output.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'include/output.php') diff --git a/include/output.php b/include/output.php index 3ad0552..0c2ff96 100644 --- a/include/output.php +++ b/include/output.php @@ -202,12 +202,15 @@ function display_card($card,$dir="english") return; } -function display_link_card($card,$dir="english",$type="card") +function display_link_card($card,$dir="english",$type="card", $selected=0) { + if($selected) + $selected = 'selected="selected"'; + if( $card/2 - (int)($card/2) == 0.5) - echo "
\"".DB_get_card_name($card)."\"
\n"; + echo "
\"".DB_get_card_name($card)."\"
\n"; else - echo "
\"".DB_get_card_name($card-1)."\"
\n"; + echo "
\"".DB_get_card_name($card-1)."\"
\n"; return; } -- cgit v1.2.3-18-g5258