lwb5-in-2025/scripts/game/beta5/alliance/library/setForumAccess.inc

24 lines
507 B
PHP
Raw Normal View History

2016-01-10 11:01:49 +01:00
<?php
class beta5_alliance_setForumAccess {
2024-12-31 10:42:58 +01:00
function __construct($lib) {
2016-01-10 11:01:49 +01:00
$this->lib = $lib;
$this->db = $this->lib->game->db;
}
// Modifies the access list for an alliance forum
function run($id, $readers, $mods) {
$this->db->query("DELETE FROM algr_forums WHERE forum=$id");
foreach ($readers as $rid) {
$this->db->query("INSERT INTO algr_forums VALUES($rid,$id,false)");
}
foreach ($mods as $rid) {
$this->db->query("INSERT INTO algr_forums VALUES($rid,$id,true)");
}
}
}
?>