mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-30 17:58:59 +00:00
Add option to delete MGR posters
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
require_once './config.php';
|
||||
|
||||
|
||||
use nntmux\ReleasesMultiGroup;
|
||||
|
||||
$page = new AdminPage();
|
||||
|
||||
if (isset($_GET['id']))
|
||||
{
|
||||
$forum = new ReleasesMultiGroup();
|
||||
$forum->deletePoster($_GET['id']);
|
||||
}
|
||||
|
||||
if (isset($_GET['from']))
|
||||
$referrer = $_GET['from'];
|
||||
else
|
||||
$referrer = $_SERVER['HTTP_REFERER'];
|
||||
header("Location: " . $referrer);
|
||||
@@ -13,6 +13,11 @@
|
||||
<td>
|
||||
<a href="{$smarty.const.WWW_TOP}/posters-edit.php?id={$poster.id}&poster={$poster.poster}">{$poster.poster}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="confirm_action btn btn-sm btn-danger"
|
||||
href="{$smarty.const.WWW_TOP}/admin/poster_delete?id={$poster.id} from={$smarty.server.REQUEST_URI|escape:"url"}"
|
||||
title="Delete Topic">Delete Topic</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user