X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Foutput.php;h=a5e49420072709ac5f1dd882c3a9de20e3dd7029;hp=b51f4396886ab3ec2e9f54cefa398d9f15f1ef49;hb=4681b437e331256dc70663f130ce2de57a03d099;hpb=51fcc71c971df1a1983ceff9d0e40ffff3ddeafe
diff --git a/include/output.php b/include/output.php
index b51f439..a5e4942 100644
--- a/include/output.php
+++ b/include/output.php
@@ -1,4 +1,23 @@
+ *
+ * This file is part of e-DoKo.
+ *
+ * e-DoKo is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * e-DoKo is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with e-DoKo. If not, see .
+ *
+ */
+
/* make sure that we are not called from outside the scripts,
* use a variable defined in config.php to check this
*/
@@ -7,21 +26,38 @@ if(!isset($HOST))
/* functions which only ouput html */
+function autoversion($file)
+{
+ /* changes the file name of e.g. css/style.css to css/style..css/js
+ * this way the browser can cache the file and will reload it if the file changed
+ * needs to have .htaccess set up correctly to link back to css/style.css */
+
+ /* only use it for file that have an absolut path */
+ if(!file_exists(dirname($_SERVER['SCRIPT_FILENAME']). '/' . $file))
+ return $file;
+
+ $md5 = md5_file(dirname($_SERVER['SCRIPT_FILENAME']). '/' . $file);
+ return preg_replace('{\\.([^./]+)$}', ".$md5.\$1", $file);
+}
+
+
function output_ask_for_new_game($playerA,$playerB,$playerC,$playerD,$oldgameid)
{
global $RULES;
echo "
\n\n
";
return;
}
@@ -32,86 +68,124 @@ function output_form_for_new_game($names)
* after we selected them to make sure that each name
* only shows up once
*/
-?>
- ';
+
}
function output_table($data,$caption="",$class="",$id="")
@@ -174,70 +248,92 @@ 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 = 'checked="checked"';
+
if( $card/2 - (int)($card/2) == 0.5)
- echo "\n";
+ echo "\n";
else
- echo "\n";
+ echo "\n";
return;
}
function output_check_for_sickness($me,$mycards)
{
- ?>
-
Thanks for joining the game...
-
- do you want to play solo?
-
-
-
- '._('Thanks for joining the game').'... ';
+ echo '';
+ echo ' '._('Do you want to play solo?').'';
+ echo ' ';
+ echo ' ';
+
if(check_wedding($mycards))
{
- echo " yes";
- echo " no \n";
+ echo _('Do you want to call Wedding?');
+ echo ' '._('yes')."";
+ echo ' '._('no')." \n";
}
else
{
- echo " no \n";
+ echo " \n";
};
- echo "Do you have poverty?";
if(count_trump($mycards)<4)
{
- echo " yes";
- echo " no \n";
+ echo _('Do you want to call poverty?');
+ echo ' '._('yes')."";
+ echo ' '._('no')." \n";
}
else
{
- echo " no \n";
+ echo " \n";
};
- echo "Do you have too many nines?";
if(count_nines($mycards)>4)
{
- echo " yes";
- echo " no \n";
+ echo _('Do you want to call too many nines?');
+ echo ' '._('yes')."";
+ echo ' '._('no')." \n";
}
else
{
- echo " no \n";
+ echo " \n";
};
+ if($RULES['lowtrump']=='cancel' || $RULES['lowtrump']=='poverty')
+ {
+ if(check_low_trump($mycards))
+ {
+ if($RULES['lowtrump']=='cancel')
+ echo _('Do you want to call low trump (cancel game)?');
+ else
+ echo _('Do you want to call low trump (poverty)?');
+
+ echo ' '._('yes')."";
+ echo ' '._('no')." \n";
+ }
+ else
+ {
+ echo " \n";
+ };
+ }
+ else
+ echo " ";
+
echo "\n";
- echo "\n";
+ echo " \n";
echo "
- Do you want to play a game of DoKo?
- yes
- no
-';
+ echo ' '._('Do you want to play a game of DoKo?').' ';
+ echo ' '._('yes').'';
+ echo ' '._('no').' ';
echo "\n";
echo "\n";
- echo "\n";
+ echo "\n";
echo "
";
@@ -323,22 +438,28 @@ function output_header()
function output_footer()
{
- global $REV,$PREF;
+ global $REV, $PREF, $INDEX;
echo "\n\n";
- echo "\n";
+ echo "
copyright 2006-2012 Arun Persaud, et al. \n".
+ " Verwendung der [deutschen] Kartenbilder mit Genehmigung der Spielkartenfabrik Altenburg GmbH,(c) ASS Altenburger \n".
+ " - ASS Altenburger Spielkarten - Spielkartenfabrik Altenburg GmbH \n".
+ " a Carta Mundi Company Email: info@spielkarten.com Internet: www.spielkarten.com