Files
rockowa.com/autoload/admin/controls/class.PageManager.php
2023-05-08 09:03:09 +02:00

51 lines
1.4 KiB
PHP

<?php
namespace admin\controls;
class PageManager {
public function getContent()
{
if ( \System::formGet( 'act' ) )
{
\System::setSessionVar( 'act' , \System::formGet( 'act' ) );
\System::setSessionVar( 'menu_id' , \System::formGet( 'id' ) );
}
$act = \System::getSessionVar( 'act' );
$rw = \System::formGet( 'rw' );
if ( $act == 'menu_page' )
{
if ( $rw == 'edit' )
return \admin\view\PageManager::edit( \System::formGet( 'id' ) );
if ( $rw == 'add' )
return \admin\view\PageManager::add();
if ( $rw == 'article_list' )
return \admin\view\PageManager::showAssignedArticles( \System::formGetInt( 'id' ) );
$menu_id = \System::getSessionVar( 'menu_id' );
if ( $rw == 'del' )
\admin\factory\PageManager::delete( \System::formGetInt( 'id' ) );
if ( $rw == 'down' )
\admin\factory\PageManager::moveDown( \System::formGetInt( 'id' ) , $menu_id );
if ( $rw == 'up' )
\admin\factory\PageManager::moveUp( \System::formGetInt( 'id' ) , $menu_id );
if ( $rw == 'save' )
\admin\factory\PageManager::save();
if ( $rw == 'add_new')
\admin\factory\PageManager::saveNew();
return \admin\view\PageManager::show( $menu_id );
}
else
return \admin\view\PageManager::showMenuList();
}
}
?>