public static function GetSimpleAchievement($AchievementID, $JSONP) { $Statement = parent::$DBConnection->prepare('SELECT a.id, a.faction as factionID, a.name_loc0 as title, a.description_loc0 as description, a.points, a.reward_loc0 as reward, LOWER(si.iconname) as icon FROM freedomcore_achievement a LEFT JOIN freedomcore_spellicons si ON a.icon = si.id WHERE a.id = :aid'); $Statement->bindParam(':aid', $AchievementID); $Statement->execute(); $Result = $Statement->fetch(PDO::FETCH_ASSOC); if ($Statement->rowCount() > 0) { $GetAchievementCriterias = AchievementAPI::GetAchievementCriteria($AchievementID); foreach ($GetAchievementCriterias as $Criteria) { $Result['criteria'][] = $Criteria; } return parent::Encode($Result, $JSONP); } else { return parent::GenerateResponse(404, true); } }
case 'android': AccountAPI::Android($_REQUEST['username'], $_REQUEST['password'], $_REQUEST['jsonp']); break; case 'deauthorize': AccountAPI::Deauthorize($_REQUEST['username'], $_REQUEST['password'], $_REQUEST['jsonp']); break; case 'characters': AccountAPI::GetCharacters($_REQUEST['username'], $_REQUEST['password'], $_REQUEST['jsonp']); break; } break; case 'achievement': API::EnableAPIExtension('Achievement'); switch ($_REQUEST['method']) { case 'simple': AchievementAPI::GetSimpleAchievement($_REQUEST['datatype'], $_REQUEST['jsonp']); break; } break; case 'armory': API::EnableAPIExtension('Armory'); switch ($_REQUEST['method']) { case 'wsrt': ArmoryAPI::GetResetStatus($_REQUEST['jsonp']); break; } break; case 'auction': API::GenerateResponse(501, true); break; case 'character':