first commit
This commit is contained in:
40
autoload/admin/controls/class.Banners.php
Normal file
40
autoload/admin/controls/class.Banners.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?
|
||||
namespace admin\controls;
|
||||
|
||||
class Banners
|
||||
{
|
||||
public function getContent()
|
||||
{
|
||||
$rw = \System::formGet( 'rw' );
|
||||
|
||||
if ( $rw == 'down' && \admin\factory\Banners::moveBannerDown( \System::formGetInt( 'id' ) ) )
|
||||
{
|
||||
\System::setAlert( 'Baner został przesunięty w dół.' );
|
||||
header( 'Location: ./' );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $rw == 'up' && \admin\factory\Banners::moveBannerUp( \System::formGetInt( 'id' ) ) )
|
||||
{
|
||||
\System::setAlert( 'Baner został przesunięty w górę' );
|
||||
header( 'Location: ./' );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $rw == 'del' && \admin\factory\Banners::deleteBanner( \System::formGetInt( 'id' ) ) )
|
||||
{
|
||||
\System::setAlert( 'Baner został usunięty.' );
|
||||
header( 'Location: ./' );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $rw == 'edit' )
|
||||
return \admin\view\Banners::editBanner( \System::formGetInt( 'id' ) );
|
||||
|
||||
if ( $rw == 'add' )
|
||||
return \admin\view\Banners::editBanner();
|
||||
|
||||
return \admin\view\Banners::showBanners();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user