* * Main handler * Contains the principals menus and the possibility to access submenus * * @author Jader Fiegenbaum [jader@solis.coop.br] * * @version $Id$ * * \b Maintainers: \n * Eduardo Bonfandini [eduardo@solis.coop.br] * Jamiel Spezia [jamiel@solis.coop.br] * Luiz Gregory Filho [luiz@solis.coop.br] * Moises Heberle [moises@solis.coop.br] * * @since * Class created on 21/07/2008 * **/ function defaultHandler( $handler , $title , $form=null, $searchForm = null, $img = null) { global $navbar; global $module; global $MIOLO; global $theme; $subHandler = explode(':', $handler); $subHandler = $subHandler[2]; if ( !$form ) { $form = 'Frm'.ucfirst($subHandler); } if ( !$img ) { $img = $subHandler.'-16x16.png'; } $image = new MImage('icon', $title, $MIOLO->getUI()->getImage( $module, $img)); $navbar->addOption( $image->generate() . $title, $module, $handler); $function = MIOLO::_REQUEST('function'); $ui = $MIOLO->getUI(); if ( !$searchForm ) { $searchForm = $form . 'Search'; } if ( ( strlen( $function ) == 0 ) || ( $function == 'search' ) || ( $function == 'detail' ) || ($function == 'execute')) { $content = $ui->getForm($module,$searchForm); } else { $content = $ui->getForm( $module, $form ); } if ( $content->checkAccess() ) { $content->setIcon($ui->getImage($module, $img )); $theme->setContent($content); } } ?>