2016-01-10 11:01:49 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class beta5_alliance_deleteForum {
|
|
|
|
|
2024-12-31 00:25:05 +01:00
|
|
|
public function __construct($lib) {
|
2016-01-10 11:01:49 +01:00
|
|
|
$this->lib = $lib;
|
|
|
|
$this->db = $this->lib->game->db;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Destroys an alliance forum
|
|
|
|
function run($id) {
|
|
|
|
$q = $this->db->query("SELECT alliance,forder FROM af_forum WHERE id=$id");
|
|
|
|
list($aid,$o) = dbFetchArray($q);
|
|
|
|
$this->db->query("DELETE FROM af_forum WHERE id=$id");
|
|
|
|
$this->db->query("UPDATE af_forum SET forder=forder-1 WHERE alliance=$aid AND forder>$o");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|