Пример #1
0
 	foreach ($opponentTeamsArray as $team => $valArray) { 
 		$games = $valArray[0];
		$wins = $valArray[1];
		$losses = $valArray[2];
		$draws = $valArray[3];
		
		if ($games > 2) {
			$valArray[0] = ($wins/$games)*100;
			$percArray[$team] = $valArray;
		}				
 	}
 	arsort($percArray);
	$i = 0; 	
 	foreach ($percArray as $team => $valArray) {
 		
 		$teamImg = $winnerImg = getImgForTeam($team);
		$teamName = getTeamNameForId($team);
 		
 		$percentage = $valArray[0];
		$wins = $valArray[1];
		$losses = $valArray[2];
 		$draws = $valArray[3];
		if ($percentage != $percentageTemp) {
			$posDisplay = $pos.".";
		} else {
			$posDisplay = ".";
		}		
		$percentageTemp = $percentage;
		$pos++;
 		?>
    <tr class="row">
Пример #2
0
	if (!empty($loser2)) {
		$loserlink .= "<br><span $loseClass><a $loseopts href='profile.php?name=".$loser2."'>".$loser2."</a></span>";
		$losepoints .= "<br>".$losepoints2;		
	}
  
  if ($winnerteam > 0) {
    $flagLeft = getImgForTeam($winnerteam);
  } else {
    $sql2 = "SELECT nationality FROM $playerstable where name='$winner'";
    $row2 = mysql_fetch_array(mysql_query($sql2));
    $nationalityLeft = $row2['nationality'];
    $flagLeft = '<img title="'.$nationalityLeft.'" style="opacity:0.4;" src="'.$directory.'/flags/'.$nationalityLeft.'.bmp" width="18" height="15" border="1">';
  }
  
  if ($loserteam > 0) {
    $flagRight = getImgForTeam($loserteam);
  } else {
    $sql2 = "SELECT nationality FROM $playerstable where name='$loser'";
    $row2 = mysql_fetch_array(mysql_query($sql2));
    $nationalityRight = $row2['nationality'];
    $flagRight = '<img title="'.$nationalityRight.'" style="opacity:0.4;" src="'.$directory.'/flags/'.$nationalityRight.'.bmp" width="18" height="15" border="1">';
  }
  
	?>
	<tr<? 
	if ($deleted == "yes") {
		echo " class='row_deleted'";
	}
	else if (!empty($gameId) && strcmp($gameId, $gameid) == 0) {
		 echo " class='row_active'";
	} else {
Пример #3
0
<?php 
echo getRankBoxTop($leagueShortName . " Games - List " . $status . $playedGames, $columnsArray);
?>
<?
	while ($row = mysql_fetch_array($result)) {
		$id = $row['id'];
		$winteam = $row['winteam'];
		$loseteam = $row['loseteam'];
		$winresult = $row['winresult'];
		$loseresult = $row['loseresult'];
		$reportDate = $row['reportDate'];
		
		$dateFormatted = formatLongDate($reportDate);
		$winnerImg = getImgForTeam($winteam);
		$loserImg = getImgForTeam($loseteam);	
		$winnerTeamname = getTeamNameForId($winteam);
		$loserTeamname = getTeamNameForId($loseteam);
		$gameResult = $winresult."&nbsp;-&nbsp;".$loseresult;
		$winner = $teamPlayerArray[$winteam];
		$loser = $teamPlayerArray[$loseteam];
		$winnerlink = "<a href='/profile.php?name=".$winner."'>".$winner."</a>";
		$loserlink = "<a href='/profile.php?name=".$loser."'>".$loser."</a>";
	?>
	<tr<? if (strcmp($cookie_name, $winner) == 0 
		|| strcmp($cookie_name, $loser) == 0) {
		echo " class='row_active'";
	} 
	else {
		echo " class='row'";
	}
Пример #4
0
          } else {
            $flagLeft = getImgForTeam($ladderTeamLeft);
            $teamNameLeft = getTeamNameForIdAdditionalInfo($ladderTeamLeft);
          }
          
          if (is_null($ladderTeamRight)) {
            $teamNameRight = "Unknown";
            $flagRight = '<img title="'.$nationalityRight.'" style="opacity:0.4;" src="'.$directory.'/flags/'.$nationalityRight.'.bmp" width="18" height="15" border="1">';
            if ($playerRight2 != "") {
              $flagRight .= '<div '.$topmargin.'><img title="'.$nationalityRight2.'" style="opacity:0.4;" src="'.$directory.'/flags/'.$nationalityRight2.'.bmp" width="18" height="15" border="1" style="margin-top:2px"></div>';
            }
            if ($playerRight3 != "") {
              $flagRight .= '<div '.$topmargin.'><img title="'.$nationalityRight3.'" style="opacity:0.4;" src="'.$directory.'/flags/'.$nationalityRight3.'.bmp" width="18" height="15" border="1" style="margin-top:2px"></div>';
            }
          } else {
            $flagRight = getImgForTeam($ladderTeamRight);
            $teamNameRight = getTeamNameForIdAdditionalInfo($ladderTeamRight);
          }
          ?>
        <tr class="<?php 
echo $rowclass;
?>
">
          <td style="white-space: nowrap" class="black-small" align="center"><?php 
echo $patchHome;
?>
</td>
          <td style="white-space: nowrap" align="center" class="darkgrey-small">
            <?php 
echo $ratingLeft;
?>
Пример #5
0
         	<td>Games</td>
	  		<td><?php 
echo getVersionsImages($versions);
?>
</td>
   		</tr>
	   <? if ($favteam1 != '0' || $favteam2 != '0') { ?>
		   <tr><td></td></tr>
		   <tr>
	         <td nowrap>Favorite team(s)</td>
	         <td colspan="3">
			 	<? if ($favteam1 != '0') {
			 	       echo getImgForTeam($favteam1);
			 	   }
				   if ($favteam2 != '0') {
			 	       echo "&nbsp;".getImgForTeam($favteam2);
			 	   }
				 ?>
			 </td>
	       </tr>
		<? } ?>       
	   <tr><td></td></tr>	   
	   <tr>
         <td>Nationality</td>
         <td colspan="3"><?php 
echo "<img src='{$directory}/flags/{$nationality}.bmp' align='absmiddle' border='1'> {$nationality}";
?>
</td>
       </tr>
	   <? if (!empty($country) && $country != $nationality) { ?>
		
Пример #6
0
			} else {
				$boxTitle = "Uncategorised Teams";
			}
			?>
			<?php 
echo getRankBoxTop($boxTitle, $columnTitlesArray);
?>
	
			<? // rank differences
				foreach ($teams as $teamArray) { ?>
				<tr class="row">
					<td width="50" align="center" title="#<?php 
echo $teamArray[1];
?>
"><?php 
echo getImgForTeam($teamArray[1]);
?>
</td>
					<td width="50"><?php 
echo $teamArray[4];
?>
</td>
          <td width="200"><?php 
echo $teamArray[2];
?>
</td>
					<td width="100"><?php 
echo $teamArray[3];
?>
</td>
					<td width="150"><?php 
Пример #7
0
else if ($gameTeams) {
		$teamsArray = array();
		while ($row = mysql_fetch_array($result)) {
			$team = $row["team"];
			$cnt = $row["cnt"];
			if (in_array($team, array_keys($teamsArray))) {
				$teamsArray[$team] = array($teamsArray[$team][0] + $cnt, $team);
			} else {
				$teamsArray[$team] = array($cnt, $team);
			}
		}	
		arsort($teamsArray);
		$cur = 1;
		foreach ($teamsArray as $teamArray) {
			$teamName = getTeamNameForId($teamArray[1]);
			$teamImg = getImgForTeam($teamArray[1]);
			$teamDisplay = $teamImg . "&nbsp;&nbsp;" . $teamName;
			$cnt = $teamArray[0];
			if ($cnt == $oldcnt) {
				$curDisplay = ".";
			} else {
				$curDisplay = $cur;
				$oldcnt = $cnt;
			}
			
			printRow($curDisplay, $teamDisplay, $cnt, false);
			$cur++;
	  }
}

else if ($fairness) {