From 73a6f86691f53d8eb6339b5bb5e9156822cc7e54 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 1 Mar 2008 18:07:05 -0800 Subject: [PATCH] FEATURE: add score table to email at the end of the game the last 4 lines of the score table are now added to the email that is being send out at the end of a game. Signed-off-by: Arun Persaud --- index.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/index.php b/index.php index 0036433..4b5ca5c 100644 --- a/index.php +++ b/index.php @@ -1743,6 +1743,38 @@ else if(myisset("me")) $message .= " Total Points (from the Re point of view): $Tpoint\n"; $message .= "\n"; + $session = DB_get_session_by_gameid($gameid); + $score = generate_score_table($session); + /* convert html to ascii */ + $score = str_replace("
\n\n \n","",$score); + $score = str_replace("\n","",$score); + $score = str_replace(array("","",""),array("","\n","","|"),$score); + $score = str_replace("
","
\n","",$score); + $score = explode("\n",$score); + + $header = array_slice($score,0,1); + $header = explode("|",$header[0]); + for($i=0;$i5) $header.= " ... \n"; + + if(sizeof($score)>5) $score = array_slice($score,-5,5); + for($i=0;$i