X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Foutput.php;h=0be920edb7e3fc9d59a4b287a39af65827d613c1;hp=92c301fff98f0bd8559d8d4c3accf3c57e39921a;hb=34745273b4e8935b4423a0db050dcd75bc672209;hpb=cc143e38299d3dd3981efd81972c0e0df4df1462 diff --git a/include/output.php b/include/output.php index 92c301f..0be920e 100644 --- a/include/output.php +++ b/include/output.php @@ -1,5 +1,5 @@ +/* Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Arun Persaud * * This file is part of e-DoKo. * @@ -26,6 +26,21 @@ 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; @@ -115,7 +130,6 @@ function output_form_for_new_game($names) echo ' '; $rand = $_SESSION["name"]; echo "
\n"; - $i++; echo " '; - echo ' '; + echo ' '; echo ' '; echo ' '; echo ' '; @@ -265,61 +279,61 @@ function output_check_for_sickness($me,$mycards) echo ' '; echo '
'; - echo _('Wedding?'); if(check_wedding($mycards)) { + 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 _('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 _('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($RULES['lowtrump']=='cancel') - echo _('Do you have low trump (cancel game)?'); - else - echo _('Do you have low trump (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 ' '._('no')."
\n"; + echo " \n"; }; } else - echo ""; + echo " "; echo "\n"; - echo "\n"; + echo "
\n"; echo "
\n"; @@ -389,7 +403,7 @@ function output_check_want_to_play($me) { echo '
'; echo ' '._('Do you want to play a game of DoKo?').'
'; - echo ' '._('yes').''; + echo ' '._('yes').''; echo ' '._('no').'
'; echo "\n"; echo "\n"; @@ -410,22 +424,16 @@ function output_header() - - - - - - - - + " /> + " /> + "/> + -
- '._('Welcome to E-Doko').' '; -?> -
"; @@ -438,30 +446,35 @@ function output_footer() 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

\n"; - echo "

See the latest changes \n". + echo "

copyright 2006-2013 Arun Persaud, et al.
\n"; + echo "

See the latest changes \n". " via git
or download the source via
\n'git clone http://nubati.net/git/e-DoKo.git'
\n". " \n". " \"Green\n". - "

\n"; + " src=\"pics/green1.gif\" height=\"32\" width=\"100\" />

\n"; echo "

\n\n"; + + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo "\n"; echo "\n"; return; } -function output_status() +function output_navbar() { global $defaulttimezone, $INDEX, $WIKI, $RSS; if(isset($_SESSION['name'])) { - $name = $_SESSION['name']; + $name = $_SESSION['name']; + $email = DB_get_email('name',$name); /* last logon time */ $myid = DB_get_userid('name',$name); @@ -476,16 +489,23 @@ function output_status() $token = get_user_token($myid); /* logout info */ - echo "\n
\n"; - echo $name,"\n"; - echo " | "._('mypage')."\n"; - echo " | "._('settings')."\n"; - echo " | "._('new game')."\n"; - echo " | "._('statistics')."\n"; - echo " | "._('wiki/bugs')."\n"; - echo " | "._('atom')."\n"; - echo " |    "._('logout')."\n"; - echo "
\n\n"; + echo "\n
\n"; + echo " E-DoKo\n"; + echo " \n"; + echo "
\n"; echo "
"._('last login').": ".date("r",$unixtime)."
\n\n"; }