This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/rule34/theme.php

27 lines
698 B
PHP
Raw Normal View History

2021-12-14 18:32:47 +00:00
<?php
declare(strict_types=1);
namespace Shimmie2;
2020-01-26 23:12:48 +00:00
use function MicroHTML\INPUT;
use function MicroHTML\LABEL;
use function MicroHTML\BR;
2018-07-19 18:55:28 +00:00
class Rule34Theme extends Themelet
{
2019-05-28 19:27:23 +00:00
public function show_comic_changer(User $duser, bool $current_state): void
{
global $page;
2020-01-26 23:12:48 +00:00
$html = (string)SHM_SIMPLE_FORM(
2020-01-30 10:31:11 +00:00
"rule34/comic_admin",
2023-11-11 21:49:12 +00:00
INPUT(["type" => 'hidden', "name" => 'user_id', "value" => $duser->id]),
LABEL(INPUT(["type" => 'checkbox', "name" => 'is_admin', "checked" => $current_state]), "Comic Admin"),
2020-01-26 23:12:48 +00:00
BR(),
SHM_SUBMIT("Set")
);
$page->add_block(new Block("Rule34 Comic Options", $html));
}
2018-07-19 18:55:28 +00:00
}