コード例 #1
0
ファイル: irc_games.php プロジェクト: kinj1987/evo-league
    $loser2 = $data->loser2;
    $losepoints = $data->losepoints;
    if (strlen($loser2) > 0) {
        $loserdisplay = $loser . "/" . $loser2;
        $losepoints2 = $data->losepoints2;
        $losepointsdisplay = $losepoints . "/" . $losepoints2;
    } else {
        $loserdisplay = $loser;
        $losepointsdisplay = $losepoints;
    }
    $titleRSS = "Game :: " . $winnerdisplay . "  " . $data->winnerresult . " - " . $data->loserresult . "  " . $loserdisplay;
    $winnerteam = getTeamNameForId($data->winnerteam);
    if (empty($winnerteam)) {
        $winnerteam = "Not specified";
    }
    $loserteam = getTeamNameForId($data->loserteam);
    if (empty($loserteam)) {
        $loserteam = "Not specified";
    }
    $ladder = getLadderForVersion($data->version);
    $description = "[" . $ladder . "] [" . $winabb . "] (+" . $data->winpoints . ") " . $winnerdisplay . " " . $data->winnerresult . " - " . $data->loserresult . " " . $loserdisplay . " (-" . $data->losepoints . ") [" . $loseabb . "] - " . $data->comment . "";
    $item = new FeedItem();
    $item->title = $titleRSS;
    $item->link = $directory . "/games.php#" . $data->game_id;
    $item->description = $description;
    $item->date = date('Y-m-d\\TH:m:s\\Z', $data->date);
    $item->source = "http://www.yoursite";
    $item->author = "yoursite";
    $rss->addItem($item);
}
$rss->saveFeed("RSS1.0", "feed_irc_games.xml");
コード例 #2
0
ファイル: teamstatssix.php プロジェクト: kinj1987/evo-league
 		$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">
      <td style="width:10%;text-align:right;"><?php 
コード例 #3
0
ファイル: functions.php プロジェクト: kinj1987/evo-league
function getTeamsOptionsForLeague($league)
{
    require 'variables.php';
    $teamsInstance = getTeamsArray();
    $resultString = "";
    $sql = "SELECT * FROM {$leaguestable} where league = '{$league}' order by player";
    $result = mysql_query($sql);
    while ($row = mysql_fetch_array($result)) {
        $team = $row['team'];
        $player = $row['player'];
        $teamName = getTeamNameForId($team);
        $resultString .= '<option value="' . $team . '">' . $player . ' (' . $teamName . ')</option>';
    }
    return $resultString;
}
コード例 #4
0
ファイル: league.php プロジェクト: kinj1987/evo-league
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'";
	}
	?>>
			<td width="5%" align="right"><?php 
コード例 #5
0
ファイル: statistics.php プロジェクト: kinj1987/evo-league
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++;
	  }
}