snootpaintings/contrib/et/theme.php

53 lines
1.4 KiB
PHP
Raw Normal View History

<?php
class ETTheme extends Themelet {
/*
* Create a page showing info
*
* $info = an array of ($name => $value)
*/
2009-01-04 17:38:23 +00:00
public function display_info_page(Page $page, $info) {
$page->set_title("System Info");
$page->set_heading("System Info");
$page->add_block(new NavBlock());
2009-01-04 17:38:23 +00:00
$page->add_block(new Block("Information:", $this->build_data_form($info)));
}
2009-01-04 19:18:37 +00:00
protected function build_data_form($info) {
$data = <<<EOD
Optional:
Site title: {$info['site_title']}
Theme: {$info['site_theme']}
2009-07-20 03:27:21 +00:00
Genre: [describe your site here]
URL: {$info['site_url']}
System stats:
Shimmie: {$info['sys_shimmie']}
Schema: {$info['sys_schema']}
PHP: {$info['sys_php']}
OS: {$info['sys_os']}
Server: {$info['sys_server']}
2009-07-20 03:27:21 +00:00
Disk use: {$info['sys_disk']}
Shimmie stats:
Images: {$info['stat_images']}
Comments: {$info['stat_comments']}
Users: {$info['stat_users']}
Tags: {$info['stat_tags']}
Applications: {$info['stat_image_tags']}
2009-07-20 03:27:21 +00:00
Extensions: {$info['sys_extensions']}
EOD;
$html = <<<EOD
<form action='http://shimmie.shishnet.org/register.php' method='POST'>
<input type='hidden' name='registration_api' value='1'>
<textarea name='data' rows='20' cols='80'>$data</textarea>
<br><input type='submit' value='Click to send to Shish'>
<br>Your stats are useful so that I know which combinations
2009-01-04 17:38:23 +00:00
of web servers / databases / etc I need to support.
</form>
EOD;
return $html;
}
}
?>