2021-12-14 18:32:47 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
2007-06-30 01:19:11 +00:00
|
|
|
|
2023-01-10 22:44:09 +00:00
|
|
|
namespace Shimmie2;
|
|
|
|
|
2020-03-26 16:45:48 +00:00
|
|
|
use function MicroHTML\FORM;
|
|
|
|
use function MicroHTML\INPUT;
|
|
|
|
use function MicroHTML\P;
|
|
|
|
use function MicroHTML\TEXTAREA;
|
|
|
|
|
2019-05-28 16:59:38 +00:00
|
|
|
class ETTheme extends Themelet
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
* Create a page showing info
|
|
|
|
*/
|
2024-01-20 14:10:59 +00:00
|
|
|
public function display_info_page(string $yaml): void
|
2019-05-28 16:59:38 +00:00
|
|
|
{
|
|
|
|
global $page;
|
2012-01-27 16:52:12 +00:00
|
|
|
|
2019-05-28 16:59:38 +00:00
|
|
|
$page->set_title("System Info");
|
|
|
|
$page->set_heading("System Info");
|
|
|
|
$page->add_block(new NavBlock());
|
2020-03-26 16:45:48 +00:00
|
|
|
$page->add_block(new Block("Information:", $this->build_data_form($yaml)));
|
2019-05-28 16:59:38 +00:00
|
|
|
}
|
2009-01-04 19:18:37 +00:00
|
|
|
|
2024-01-20 14:10:59 +00:00
|
|
|
protected function build_data_form(string $yaml): \MicroHTML\HTMLElement
|
2019-05-28 16:59:38 +00:00
|
|
|
{
|
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"]),
|
2020-03-26 16:45:48 +00:00
|
|
|
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;"],
|
2020-03-26 16:45:48 +00:00
|
|
|
$yaml
|
|
|
|
)),
|
|
|
|
P(INPUT(
|
2023-11-11 21:49:12 +00:00
|
|
|
["type" => 'submit', "value" => 'Click to send to Shish', "style" => "width: 100%; padding: 1em;"]
|
2020-03-26 16:45:48 +00:00
|
|
|
)),
|
|
|
|
);
|
2019-05-28 16:59:38 +00:00
|
|
|
}
|
2007-06-30 01:19:11 +00:00
|
|
|
}
|