= $b["rank"]) ? -1 : 1; } function nonzero($a) { if ($a < 1) { return " "; }else{ return $a; } } function getGameInfo($leagueid, $team, $wl, $from) { //public $data; //---Needed --- //leagueid //team 1 or 2 //winner_loser //from1 or from2 $pdata = new data_access(); if ( $team > 0){ $tm = $pdata->getTeam($leagueid,$team); return $tm['name']; }else{ $gam = $pdata->getGameInfo($leagueid,$from); if ( $gam['final']==1 ){ if ($wl=="W"){ //get winner from "from1" if ( $gam['total1']>$gam['total2']){ $tm = $pdata->getTeam($leagueid,$gam['team1']); }else{ $tm = $pdata->getTeam($leagueid,$gam['team2']); } //endif return $tm['name']; }else{ //get loser from "from1" if ( $gam['total1']>$gam['total2']){ $tm = $pdata->getTeam($leagueid,$gam['team2']); }else{ $tm = $pdata->getTeam($leagueid,$gam['team1']); } //endif return $tm['name']; } //endif }else{ $df = $pdata->getMatchDisplayName($leagueid,$from); $s = ($wl == "W" ? "Winner from " : "Loser from "). $df ; // getclickcode($from); return $s; } //endif } //endif } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - - - - ?>