diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-03-13 02:57:50 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-03-13 02:57:50 -0700 |
commit | d26206b8dfb2f6c9775c0a7f111e0d4caed53fe7 (patch) | |
tree | 03562ad8bd3a4b9efc89ecb49ccdd557f68ec57b /includes/datas.php | |
parent | 32cce4bee8a242f7a2e6d6a9e1c9e77b4af87728 (diff) | |
download | pathery-d26206b8dfb2f6c9775c0a7f111e0d4caed53fe7.tar.xz |
Insane speed achievement front end.
Diffstat (limited to 'includes/datas.php')
-rw-r--r-- | includes/datas.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/includes/datas.php b/includes/datas.php index 7e64732..83399c7 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -684,8 +684,9 @@ function getChampionPointsArray() { //TYPE 5 function getPerfectDayArray() { + //($required, $unlockType, $unlockValue, $unlockName, $unlockSubtype) //$cp[0] = array(requiredpoints, type, 'value', 'name'); - $r[1] = array(1, UNLOCK_EXTRAS, MISC_UNLOCK_INSANE_SPEED, 'Insane Speed'); + $r[1] = array(1, UNLOCK_EXTRAS, '5', 'Insane Speed', MISC_UNLOCK_INSANE_SPEED); //These numbers temporarly unreasonable $r[2] = array(9275, UNLOCK_WALL_EMBLEM, 'CircleSmall_W_I.png', 'Inverted Bright Small Circle', 0); $r[3] = array(10000, UNLOCK_WALL_EMBLEM, 'DiamondLarge_W_I.png', 'Inverted Light Large Diamond', 0); @@ -941,6 +942,20 @@ function hasCompletedTutorial($userID) { return (mysql_num_rows($result) >= 1); } +function hasExtrasUnlock($userID, $unlockType, $unlockSubtype) { + $userID = mysql_escape_string($userID); + $unlockType = mysql_escape_string($unlockType); + $unlockSubtype = mysql_escape_string($unlockSubtype); + + $sql = "SELECT `value` FROM `unlocks` + WHERE `userID` = '$userID' + AND `type` = '$unlockType' + AND `subtype` = '$unlockSubtype' + LIMIT 1"; + $result = mysql_query($sql); + return (mysql_num_rows($result) >= 1); +} + /** * Returns a MySQL resultset for all challenges for the given mapID * @param $mapIdUnsanitized The mapID to load. Assumed to be unsanitized. |