first commit
This commit is contained in:
26
autoload/admin/controls/class.GuestBook.php
Normal file
26
autoload/admin/controls/class.GuestBook.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?
|
||||
namespace admin\controls;
|
||||
|
||||
class GuestBook
|
||||
{
|
||||
public function getContent()
|
||||
{
|
||||
$rw = \System::formGet( 'rw' );
|
||||
|
||||
if ( $rw == 'del' && \admin\factory\GuestBook::deleteEntry( \System::formGetInt( 'id' ) ) )
|
||||
{
|
||||
\System::setAlert( 'Usunięto wpis z księgi gości.' );
|
||||
header( 'Location: ./' );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $rw == 'edit' )
|
||||
return \admin\view\GuestBook::editEntry( \System::formGetInt( 'id' ) );
|
||||
|
||||
if ( $rw == 'add' )
|
||||
return \admin\view\GuestBook::editEntry();
|
||||
|
||||
return \admin\view\GuestBook::showEntries();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user