the banned hash
* 'reason' => why the hash was banned
* 'date' => when the ban started
* )
*/
public function display_image_hash_bans(Page $page, $page_number, $page_count, $bans)
{
$h_bans = "";
foreach ($bans as $ban) {
$h_bans .= "
".make_form(make_link("image_hash_ban/remove"))."
{$ban['hash']}
{$ban['reason']}
";
}
$html = "
";
$prev = $page_number - 1;
$next = $page_number + 1;
$h_prev = ($page_number <= 1) ? "Prev" : "Prev ";
$h_index = "Index ";
$h_next = ($page_number >= $page_count) ? "Next" : "Next ";
$nav = "$h_prev | $h_index | $h_next";
$page->set_title("Image Bans");
$page->set_heading("Image Bans");
$page->add_block(new Block("Edit Image Bans", $html));
$page->add_block(new Block("Navigation", $nav, "left", 0));
$this->display_paginator($page, "image_hash_ban/list", null, $page_number, $page_count);
}
/*
* Display a link to delete an image
*
* $image_id = the image to delete
*/
public function get_buttons_html(Image $image)
{
$html = "
".make_form(make_link("image_hash_ban/add"))."
";
return $html;
}
}