From: Arun Persaud Date: Fri, 7 Dec 2007 15:52:48 +0000 (+0100) Subject: NEW FEATURE: list game points in last email X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=6bbeb84075b302b51bed0e2d568c393363779041 NEW FEATURE: list game points in last email add a few lines to show the total amount of game points for this game in the email that gets send out --- diff --git a/index.php b/index.php index a0e2fb2..8acb871 100644 --- a/index.php +++ b/index.php @@ -1638,6 +1638,30 @@ else if(myisset("me")) } + /* add score points to email */ + $message .= "\n"; + $Tpoint = 0; + $message .= " Points Re: \n"; + $queryresult = mysql_query("SELECT score FROM Score ". + " WHERE game_id=$gameid AND party='re'". + " "); + while($r = mysql_fetch_array($queryresult,MYSQL_NUM) ) + { + $message .= " ".$r[0]."\n"; + $Tpoint ++; + } + $message .= " Points Contra: \n"; + $queryresult = mysql_query("SELECT score FROM Score ". + " WHERE game_id=$gameid AND party='contra'". + " "); + while($r = mysql_fetch_array($queryresult,MYSQL_NUM) ) + { + $message .= " ".$r[0]."\n"; + $Tpoint --; + } + $message .= " Total Points (from Re points of view): $Tpoint\n"; + $message .= "\n"; + /* send out final email */ $all = array();