< Previous Day
Next Day >
Yesterday >>
echo getMapNavigation($todaysScoreMaps); ?>
function getMapsPlayed($daysAgo) {
$sql = "
SELECT `mapID`, `code`, `mapType`
FROM `mapOfTheDay`
INNER JOIN `maps` ON `mapID` = maps.ID
WHERE DATE_ADD(CURDATE(), INTERVAL -$daysAgo DAY) =
mapDate AND
`mapType` IN (1, 2, 3, 4)
";
$result = mysql_query($sql) or die(mysql_error());
if (mysql_num_rows($result) == 0)
return -1;
global $mapNamesByType;
$r = array();
while($data = mysql_fetch_array($result)) {
$code = $data['code'];
$mapID = $data['mapID'];
$mapType = $data['mapType'];
$map = new map($code);
if ($map->name == '')
$map->name = $mapNamesByType[$mapType];
$r[$mapID] = $map;
}
return $r;
}
function getMapNavigation(&$maps) {
foreach ($maps as $mapID => &$map) {
$r .= "
";
$r .= $map->name;
$r .= DisplayMapThumbnail($map);
$r .= "
";;
}
return $r;
}
$time_start = microtime(true);
$special = 'Special';
if ($specialMapName != '')
$special = $specialMapName;
?>