Files
rm.rzeszow.pl/autoload/admin/controls/class.GuestBook.php
2023-09-04 21:59:34 +02:00

26 lines
572 B
PHP

<?
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();
}
}
?>