diff --git a/nntmux/ReleasesMultiGroup.php b/nntmux/ReleasesMultiGroup.php index 96618d363..1d55600bf 100644 --- a/nntmux/ReleasesMultiGroup.php +++ b/nntmux/ReleasesMultiGroup.php @@ -318,6 +318,8 @@ class ReleasesMultiGroup } /** + * Add multi group posters to database + * * @param $poster */ public function addPoster($poster) @@ -326,6 +328,8 @@ class ReleasesMultiGroup } /** + * Update multi group poster + * * @param $id * @param $poster */ @@ -335,6 +339,18 @@ class ReleasesMultiGroup } /** + * Delete multi group posters from database + * + * @param $id + */ + public function deletePoster($id) + { + $this->pdo->queryExec(sprintf('DELETE * FROM mgr_posters WHERE id = %d', $id)); + } + + /** + * Fetch all multi group posters from database + * * @return array|bool */ public function getAllPosters() diff --git a/www/admin/poster-delete.php b/www/admin/poster-delete.php new file mode 100644 index 000000000..099712694 --- /dev/null +++ b/www/admin/poster-delete.php @@ -0,0 +1,19 @@ +deletePoster($_GET['id']); +} + +if (isset($_GET['from'])) + $referrer = $_GET['from']; +else + $referrer = $_SERVER['HTTP_REFERER']; +header("Location: " . $referrer); diff --git a/www/themes/shared/templates/admin/posters-list.tpl b/www/themes/shared/templates/admin/posters-list.tpl index 8413ab3b6..a59dd2916 100644 --- a/www/themes/shared/templates/admin/posters-list.tpl +++ b/www/themes/shared/templates/admin/posters-list.tpl @@ -13,6 +13,11 @@ {$poster.poster} + + Delete Topic + {/foreach}