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
2020-01-26 23:23:15 +00:00

21 lines
674 B
PHP

<?php declare(strict_types=1);
use function MicroHTML\INPUT;
use function MicroHTML\LABEL;
use function MicroHTML\BR;
class Rule34Theme extends Themelet
{
public function show_comic_changer(User $duser, bool $current_state): void
{
global $page;
$html = (string)SHM_SIMPLE_FORM(
make_link("rule34/comic_admin"),
INPUT(["type"=>'hidden', "name"=>'user_id', "value"=>$duser->id]),
LABEL(INPUT(["type"=>'checkbox', "name"=>'is_admin', "checked"=>$current_state]), "Comic Admin"),
BR(),
SHM_SUBMIT("Set")
);
$page->add_block(new Block("Rule34 Comic Options", $html));
}
}