/** * [getAlliDetails description]. * * @param int $id * @param array $parameters * * @return array */ public static function getAlliDetails($id, $parameters = array()) { global $mdb; $data = $mdb->findDoc('information', ['cacheTime' => 1500, 'type' => 'allianceID', 'id' => (int) $id]); if ($data != null) { $data['allianceID'] = (int) $id; } if ($data != null) { $data['allianceName'] = @$data['name']; } if ($data != null) { $data['aticker'] = @$data['ticker']; } self::addInfo($data); $retValue = Summary::getAlliSummary($data, $id, $parameters); return $retValue; }
/** * [getAlliDetails description] * @param int $id * @param array $parameters * @return array */ public static function getAlliDetails($id, $parameters = array()) { $data = Db::queryRow("select allianceID, factionID from zz_participants where allianceID = :id and dttm >= date_sub(now(), interval 7 day) order by killID desc limit 1", array(":id" => $id), 3600); if (sizeof($data) == 0) { $data["allianceID"] = $id; } // Add membercount, etc. $moreData = Db::queryRow("select * from zz_alliances where allianceID = :id", array(":id" => $id), 3600); if ($moreData) { $data["memberCount"] = $moreData["memberCount"]; $data["aticker"] = $moreData["ticker"]; $data["executorCorpID"] = $moreData["executorCorpID"]; } self::addInfo($data); return Summary::getAlliSummary($data, $id, $parameters); }