forked from Cavemanon/cavepaintings
admin page themed
git-svn-id: file:///home/shish/svn/shimmie2/trunk@323 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
28
ext/admin/theme.php
Normal file
28
ext/admin/theme.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
class AdminPageTheme extends Themelet {
|
||||
public function display_not_admin($page) {
|
||||
$page->set_title("Error");
|
||||
$page->set_heading("Error");
|
||||
$page->add_block(new NavBlock());
|
||||
$page->add_block(new Block("Permission Denied", "This page is for admins only"));
|
||||
}
|
||||
|
||||
public function display_page($page) {
|
||||
$page->set_title("Admin Tools");
|
||||
$page->set_heading("Admin Tools");
|
||||
$page->add_block(new NavBlock());
|
||||
}
|
||||
|
||||
public function display_delete_block($image_id) {
|
||||
$i_image_id = int_escape($image_id);
|
||||
$html = "
|
||||
<form action='".make_link("admin/delete_image")."' method='POST'>
|
||||
<input type='hidden' name='image_id' value='$i_image_id'>
|
||||
<input type='submit' value='Delete'>
|
||||
</form>
|
||||
";
|
||||
$page->add_block(new Block("Admin", $html, "left"));
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user