first commit
This commit is contained in:
27
autoload/admin/controls/class.Adverts.php
Normal file
27
autoload/admin/controls/class.Adverts.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
namespace admin\controls;
|
||||
|
||||
class Adverts {
|
||||
|
||||
public static function getContent()
|
||||
{
|
||||
$rw = \System::formGet( 'rw' );
|
||||
|
||||
if ( $rw == 'del' )
|
||||
{
|
||||
if ( \admin\factory\Adverts::deleteAdvert( \System::formGetInt( 'id' ) ) )
|
||||
\System::setAlert( 'Reklama została usunięta.' );
|
||||
header( 'Location: ./' );
|
||||
exit;
|
||||
}
|
||||
|
||||
if ( $rw == 'edit' )
|
||||
return \admin\view\Adverts::editAdvert( \System::formGetInt( 'id' ) );
|
||||
|
||||
if ( $rw == 'add' )
|
||||
return \admin\view\Adverts::editAdvert();
|
||||
|
||||
return \admin\view\Adverts::showAdverts();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user