$topLists[] = array("name" => "Top Faction Characters", "type" => "character", "data" => Stats::getTopPilots($topParameters, true)); $topLists[] = array("name" => "Top Faction Corporations", "type" => "corporation", "data" => Stats::getTopCorps($topParameters, true)); $topLists[] = array("name" => "Top Faction Allianes", "type" => "alliance", "data" => Stats::getTopAllis($topParameters, true)); } } $corpList = array(); if ($pageType == "api") { $corpList = Info::getCorps($id); } $corpStats = array(); if ($pageType == "corpstats") { $corpStats = Info::getCorpStats($id, $parameters); } $onlyHistory = array("character", "corporation", "alliance"); if ($pageType == "history" && in_array($key, $onlyHistory)) { $detail["history"] = Summary::getMonthlyHistory($columnName, $id); } else { $detail["history"] = array(); } // Figure out if the character or corporation has any API keys in the database $apiVerified = false; if (in_array($key, array("character", "corporation"))) { if ($key == "character") { $count = Db::queryField("SELECT count(1) count FROM zz_api_characters WHERE characterID = :characterID", "count", array(":characterID" => $id)); $apiVerified = $count > 0 ? 1 : 0; } else { $count = Db::queryField("select count(1) count from zz_api_characters where isDirector = 'T' and corporationID = :corpID", "count", array(":corpID" => $id)); $apiVerified = $count > 0 ? 1 : 0; } } $cnt = 0;