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/et/theme.php

46 lines
1.3 KiB
PHP
Raw Normal View History

2021-12-14 18:32:47 +00:00
<?php
declare(strict_types=1);
namespace Shimmie2;
use function MicroHTML\FORM;
use function MicroHTML\INPUT;
use function MicroHTML\P;
use function MicroHTML\TEXTAREA;
class ETTheme extends Themelet
{
/*
* Create a page showing info
*/
public function display_info_page(string $yaml): void
{
global $page;
2012-01-27 16:52:12 +00:00
$page->set_title("System Info");
$page->set_heading("System Info");
$page->add_block(new NavBlock());
$page->add_block(new Block("Information:", $this->build_data_form($yaml)));
}
2009-01-04 19:18:37 +00:00
protected function build_data_form(string $yaml): \MicroHTML\HTMLElement
{
2022-10-28 00:45:35 +00:00
return FORM(
2023-11-11 21:49:12 +00:00
["action" => "https://shimmie.shishnet.org/register.php", "method" => "POST"],
INPUT(["type" => "hidden", "name" => "registration_api", "value" => "2"]),
P(
"Your stats are useful so that I know which combinations of ".
"web servers / databases / etc I need to support :)"
),
P(TEXTAREA(
2023-11-11 21:49:12 +00:00
["name" => 'data', "style" => "width: 100%; height: 20em;"],
$yaml
)),
P(INPUT(
2023-11-11 21:49:12 +00:00
["type" => 'submit', "value" => 'Click to send to Shish', "style" => "width: 100%; padding: 1em;"]
)),
);
}
}