diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/datas.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/includes/datas.php b/includes/datas.php index c64edd6..b029375 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -978,4 +978,20 @@ function loadChallengeMapCode($mapIdUnsanitized) } return NULL; } + + +function isCurrentMap($mapID) { + include_once('./includes/sqlEmbedded.php'); + $sql = "SELECT mapID + FROM `mapOfTheDay` + WHERE `mapID` = '$mapID' + AND mapExpireTime > NOW() + LIMIT 1 + "; + + $result = mysql_query($sql) or die(mysql_error()); + return (mysql_num_rows($result) != 0); +} + + ?> |