<?php
namespace admin\controls;

class Adverts {

  public function getContent()
	{
		global $sys;

		$rw = $sys -> formGet( 'rw' );

		if ( $rw == 'edit' )
      return \admin\view\Adverts::edit( \System::formGetInt( 'id' ) );
		if ( $rw == 'add' )
      return \admin\view\Adverts::edit();
    if ( $rw == 'del' )
      \admin\factory\Adverts::delete( \System::formGetInt( 'id' ) );
    return \admin\view\Adverts::show();
	}
}
?>
