This repository has been archived on 2024-07-18. You can view files and clone it, but cannot push or open issues or pull requests.
lwb5/scripts/game/beta5/alliance/library/getRanks.inc

23 lines
429 B
PHP
Raw Normal View History

2016-01-10 11:01:49 +01:00
<?php
class beta5_alliance_getRanks {
function beta5_alliance_getRanks($lib) {
$this->lib = $lib;
$this->db = $this->lib->game->db;
}
// Reads the list of ranks associated with an alliance
function run($aid) {
$q = $this->db->query("SELECT id,name FROM alliance_grade WHERE alliance=$aid");
$rs = array();
while ($r = dbFetchArray($q)) {
$rs[$r[0]] = is_null($r[1]) ? "-" : $r[1];
}
return $rs;
}
}
?>