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/getForums.inc

27 lines
549 B
PHP

<?php
class beta5_alliance_getForums {
function beta5_alliance_getForums($lib) {
$this->lib = $lib;
$this->db = $this->lib->game->db;
}
// Reads the list of an alliance's forums
function run($aid) {
$q = $this->db->query("SELECT id,forder,title,description,user_post FROM af_forum WHERE alliance=$aid ORDER BY forder");
$rs = array();
while ($r = dbFetchArray($q)) {
$rs[$r[0]] = array(
"order" => $r[1],
"title" => $r[2],
"description" => $r[3],
"user_post" => ($r[4] == 't')
);
}
return $rs;
}
}
?>