first commit
This commit is contained in:
40
autoload/admin/controls/class.Layouts.php
Normal file
40
autoload/admin/controls/class.Layouts.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
namespace admin\controls;
|
||||
|
||||
class Layouts {
|
||||
|
||||
public static function getContent()
|
||||
{
|
||||
$rw = \System::formGet( 'rw' );
|
||||
|
||||
if ( $rw == 'del' && \admin\factory\Layouts::deleteLayout( \System::formGetInt( 'id' ) ) )
|
||||
{
|
||||
\System::setAlert( 'Szablon został usunięty.' );
|
||||
header( 'Location: ./' );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $rw == 'save_new' && \admin\factory\Layouts::addLayout() )
|
||||
{
|
||||
\System::setAlert( 'Szablon został dodany.' );
|
||||
header( 'Location: ./' );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $rw == 'save' && \admin\factory\Layouts::saveLayout() )
|
||||
{
|
||||
\System::setAlert( 'Szablon został zapisany.' );
|
||||
header( 'Location: ./' );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $rw == 'edit' )
|
||||
return \admin\view\Layouts::editLayout( \System::formGetInt( 'id' ) );
|
||||
|
||||
if ( $rw == 'add' )
|
||||
return \admin\view\Layouts::addLayout();
|
||||
|
||||
return \admin\view\Layouts::showLayouts();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user