X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Ffunctions.php;h=51fadbb73754d859657ef7f28416d916eab8db1a;hp=f693abc38ad018b83d82e027d919a59b40fac388;hb=ed0ffd0d14904b661622a29e95661fc03728c2c4;hpb=de0515836f4d26a2fae1ca04b5a4a7a399801e4a diff --git a/include/functions.php b/include/functions.php index f693abc..51fadbb 100644 --- a/include/functions.php +++ b/include/functions.php @@ -1070,39 +1070,60 @@ function format_score_table_html($score,$userid) if(sizeof($score)==0) return ""; - $output = "
No | "; + $header = ""; + $header.= " \n|||||||
---|---|---|---|---|---|---|---|
No | "; foreach($score[0]['players'] as $id=>$points) { $name = DB_get_name('userid',$id); /*TODO*/ - $output.= "".substr($name,0,2)." | "; + $header.= "".substr($name,0,2)." | "; } - $output.="P | \nP | \n \n \n"; + /* use the same as footer */ + $footer = ""; + $footer.= " \n|||
No | "; + foreach($score[0]['players'] as $id=>$points) + { + $name = DB_get_name('userid',$id); /*TODO*/ + $footer.= "".substr($name,0,2)." | "; + } + $footer.="P | \n|||||
$i | "; + $body.="$i | "; else - $output.="$i | "; + $body.="$i | "; foreach($game['players'] as $id=>$points) - $output.="".$points." | "; - $output.="".$game['points']; + $body.=" | ".$points." | "; + $body.="".$game['points']; /* check for solo */ if($game['solo']) - $output.= " S"; - $output.=" |