예제 #1
0
$wuiMainToolbar->addChild($wuiHomeButton);
// Help tool bar
//
$wuiHelpToolBar = new WuiToolBar('helpbar');
$viewDispatcher = new WuiDispatcher('view');
$eventName = $viewDispatcher->getEventName();
if (strcmp($eventName, 'help')) {
    $helpAction = new WuiEventsCall();
    $helpAction->addEvent(new WuiEvent('view', 'help', array('node' => $eventName)));
    $wuiHelpButton = new WuiButton('helpbutton', array('label' => $innomaticLocale->getStr('help_button'), 'themeimage' => 'info', 'horiz' => 'true', 'action' => $helpAction->getEventsCallString()));
    $wuiHelpToolBar->addChild($wuiHelpButton);
}
// Toolbar frame
//
$wuiToolBarFrame = new WuiHorizgroup('toolbarframe');
$wuiToolBarFrame->addChild($wuiMainToolbar);
$wuiToolBarFrame->addChild($wuiHelpToolBar);
$wuiMainVertGroup->addChild($wuiToolBarFrame);
$wuiMainFrame = new WuiHorizframe('mainframe');
$wuiMainStatus = new WuiStatusBar('mainstatusbar');
// Pass dispatcher
//
$actionDispatcher = new WuiDispatcher('action');
$actionDispatcher->addEvent('edit', 'pass_edit');
function pass_edit($eventData)
{
    global $wuiMainStatus, $innomaticLocale;
    if ($eventData['newpassworda'] == $eventData['newpasswordb']) {
        if (strlen($eventData['newpassworda'])) {
            $tempUser = new User(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->domaindata['id']);
            $tempUser->setUserIdByUsername(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getUserName());
예제 #2
0
$wuiAccountsToolBar->addChild($wuiNewAccountButton);
// Help tool bar
//
$wuiHelpToolBar = new WuiToolBar('helpbar');
$viewDispatcher = new WuiDispatcher('view');
$eventName = $viewDispatcher->getEventName();
if (strcmp($eventName, 'help')) {
    $helpAction = new \Innomatic\Wui\Dispatch\WuiEventsCall();
    $helpAction->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'help', array('node' => $eventName)));
    $wuiHelpButton = new WuiButton('helpbutton', array('label' => $innomaticLocale->getStr('help_button'), 'themeimage' => 'info', 'horiz' => 'true', 'action' => $helpAction->getEventsCallString()));
    $wuiHelpToolBar->addChild($wuiHelpButton);
}
// Toolbar frame
//
$wuiToolBarFrame = new WuiHorizgroup('toolbarframe');
$wuiToolBarFrame->addChild($wuiProfilesToolBar);
$wuiToolBarFrame->addChild($wuiUsersToolBar);
$wuiToolBarFrame->addChild($wuiAccountsToolBar);
$wuiToolBarFrame->addChild($wuiHelpToolBar);
$wuiMainVertGroup->addChild($wuiToolBarFrame);
$wuiMainFrame = new WuiHorizframe('mainframe');
$wuiMainStatus = new WuiStatusBar('mainstatusbar');
// Pass dispatcher
//
$actionDispatcher = new WuiDispatcher('action');
$actionDispatcher->addEvent('adduser', 'pass_adduser');
function pass_adduser($eventData)
{
    global $wuiMainStatus, $innomaticLocale;
    $result = false;
    $xuser = new \Innomatic\Webservices\WebServicesUser(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess());
 public static function doAuth($wrong = false, $reason = '')
 {
     $container = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer');
     $innomatic_locale = new \Innomatic\Locale\LocaleCatalog('innomatic::authentication', $container->getLanguage());
     $innomatic = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer');
     $wui = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui');
     $wui->loadWidget('button');
     $wui->loadWidget('empty');
     $wui->loadWidget('formarg');
     $wui->loadWidget('form');
     $wui->loadWidget('grid');
     $wui->loadWidget('horizbar');
     $wui->loadWidget('horizframe');
     $wui->loadWidget('horizgroup');
     $wui->loadWidget('image');
     $wui->loadWidget('label');
     $wui->loadWidget('link');
     $wui->loadWidget('page');
     $wui->loadWidget('sessionkey');
     $wui->loadWidget('statusbar');
     $wui->loadWidget('string');
     $wui->loadWidget('submit');
     $wui->loadWidget('titlebar');
     $wui->loadWidget('vertframe');
     $wui->loadWidget('vertgroup');
     $wui_page = new WuiPage('loginpage', array('title' => $innomatic_locale->getStr('rootlogin'), 'border' => 'false', 'align' => 'center', 'valign' => 'middle'));
     $wui_topgroup = new WuiVertgroup('topgroup', array('align' => 'center', 'groupalign' => 'center', 'groupvalign' => 'middle', 'height' => '100%', 'width' => '0%'));
     $wui_maingroup = new WuiVertgroup('maingroup', array('align' => 'center'));
     $wui_titlebar = new WuiTitleBar('titlebar', array('title' => $innomatic_locale->getStr('rootlogin')));
     $wui_mainbframe = new WuiVertframe('vframe', array('align' => 'center'));
     $wui_mainframe = new WuiHorizgroup('horizframe');
     $wui_mainstatus = new WuiStatusBar('mainstatusbar');
     // Main frame
     //
     $wui_grid = new WuiGrid('grid', array('rows' => '2', 'cols' => '2'));
     $wui_grid->addChild(new WuiLabel('usernamelabel', array('label' => $innomatic_locale->getStr('username'))), 0, 0);
     $wui_grid->addChild(new WuiString('username', array('disp' => 'login')), 0, 1);
     $wui_grid->addChild(new WuiLabel('passwordlabel', array('label' => $innomatic_locale->getStr('password'))), 1, 0);
     $wui_grid->addChild(new WuiString('password', array('disp' => 'login', 'password' => 'true')), 1, 1);
     $wui_vgroup = new WuiVertgroup('vertgroup', array('align' => 'center'));
     // $wui_vgroup->addChild( new WuiLabel( 'titlelabel', array( 'label' => $innomatic_locale->getStr( 'rootlogin' ) ) ) );
     $wui_vgroup->addChild($wui_grid);
     $wui_vgroup->addChild(new WuiSubmit('submit', array('caption' => $innomatic_locale->getStr('enter'))));
     $form_events_call = new \Innomatic\Wui\Dispatch\WuiEventsCall();
     $form_events_call->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('login', 'login', ''));
     $form_events_call->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'default', ''));
     $wui_form = new WuiForm('form', array('action' => $form_events_call->getEventsCallString()));
     $wui_hgroup = new WuiHorizgroup('horizgroup', array('align' => 'middle'));
     $wui_hgroup->addChild(new WuiButton('password', array('themeimage' => 'keyhole', 'themeimagetype' => 'big', 'action' => $innomatic->getBaseUrl() . '/', 'highlight' => false)));
     $wui_hgroup->addChild($wui_vgroup);
     $wui_form->addChild($wui_hgroup);
     $wui_mainframe->addChild($wui_form);
     // Wrong account check
     //
     $session = \Innomatic\Desktop\Controller\DesktopFrontController::instance('\\Innomatic\\Desktop\\Controller\\DesktopFrontController')->session;
     if ($wrong) {
         if ($innomatic->getConfig()->Value('SecurityAlertOnWrongLocalRootLogin') == '1') {
             $innomatic_security = new \Innomatic\Security\SecurityManager();
             $innomatic_security->sendAlert('Wrong root local login from remote address ' . $_SERVER['REMOTE_ADDR']);
             $innomatic_security->logFailedAccess('', true, $_SERVER['REMOTE_ADDR']);
             unset($innomatic_security);
         }
         $sleep_time = $innomatic->getConfig()->Value('WrongLoginDelay');
         if (!strlen($sleep_time)) {
             $sleep_time = 1;
         }
         $max_attempts = $innomatic->getConfig()->Value('MaxWrongLogins');
         if (!strlen($max_attempts)) {
             $max_attempts = 3;
         }
         sleep($sleep_time);
         if ($session->isValid('root_login_attempts')) {
             $session->put('root_login_attempts', $session->get('root_login_attempts') + 1);
             if ($session->get('root_login_attempts') >= $max_attempts) {
                 $innomatic->abort($innomatic_locale->getStr('wrongpwd'));
             }
         } else {
             $session->put('root_login_attempts', 1);
         }
         if ($reason) {
             $wui_mainstatus->mArgs['status'] = $innomatic_locale->getStr($reason);
         } else {
             $wui_mainstatus->mArgs['status'] = $innomatic_locale->getStr('wrongpwd');
         }
     } else {
         $session->put('domain_login_attempts', 0);
     }
     // Page render
     //
     $wui_maingroup->addChild($wui_titlebar);
     // $wui_maingroup->addChild( new WuiButton( 'innomaticlogo', array( 'image' => $innomatic->getBaseUrl(false).'/shared/styles/cleantheme/innomatic_big_asp.png', 'action' => $innomatic->getBaseUrl().'/' ) ) );
     $wui_mainbframe->addChild($wui_mainframe);
     $wui_mainbframe->addChild(new WuiHorizBar('hb'));
     $wui_mainbframe->addChild(new WuiLink('copyright', array('label' => $innomatic_locale->getStr('auth_copyright.label'), 'link' => 'http://www.innomatic.io/', 'target' => '_blank')));
     $wui_maingroup->addChild($wui_mainbframe);
     $wui_maingroup->addChild($wui_mainstatus);
     $wui_topgroup->addChild($wui_maingroup);
     $wui_page->addChild($wui_topgroup);
     $wui->addChild($wui_page);
     $wui->render();
     $innomatic->halt();
 }
 public function viewDeleteuser($eventData)
 {
     $userQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentDomain()->getDataAccess()->execute('SELECT * FROM domain_users WHERE id=' . $eventData['userid']);
     $userData = $userQuery->getFields();
     $wuiVGroup = new WuiVertgroup('removereqvgroup', array('halign' => 'center', 'groupalign' => 'center'));
     $wuiHGroup1 = new WuiHorizgroup('removereqhgroup', array('align' => 'middle', 'width' => '0%'));
     $wuiHGroup1->addChild(new WuiLabel('removereqlabel', array('label' => sprintf($this->localeCatalog->getStr('removeuserquestion_label'), $userData['username']))));
     $wuiVGroup->addChild($wuiHGroup1);
     $wuiHGroup2 = new WuiHorizgroup('removereqhgroup', array('align' => 'middle', 'groupalign' => 'center'));
     $removeAction = new WuiEventSCall();
     $removeAction->addEvent(new WuiEvent('view', 'default', ''));
     $removeAction->addEvent(new WuiEvent('action', 'removeuser', array('uid' => $eventData['userid'])));
     $removeButton = new WuiButton('removebutton', array('label' => $this->localeCatalog->getStr('okremoveuser_button'), 'horiz' => 'true', 'themeimage' => 'buttonok', 'action' => $removeAction->getEventsCallString()));
     $wuiHGroup2->addChild($removeButton);
     $dontRemoveAction = new WuiEventsCall();
     $dontRemoveAction->addEvent(new WuiEvent('view', 'default', ''));
     $dontRemoveButton = new WuiButton('dontremovebutton', array('label' => $this->localeCatalog->getStr('dontremoveuser_button'), 'horiz' => 'true', 'themeimage' => 'stop', 'action' => $dontRemoveAction->getEventsCallString()));
     $wuiHGroup2->addChild($dontRemoveButton);
     $okAction = new WuiEventsCall();
     $okAction->addEvent(new WuiEvent('view', 'profiles', ''));
     $wuiOkForm = new WuiForm('okform', array('action'));
     $wuiVGroup->addChild($wuiHGroup2);
     $this->wuiMainframe->addChild($wuiVGroup);
     $this->wuiTitlebar->mTitle .= ' - ' . $userData['username'] . ' - ' . $this->localeCatalog->getStr('removeuser_title');
 }
예제 #5
0
/**
 * Innomatic
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.
 *
 * @copyright  1999-2014 Innoteam Srl
 * @license    http://www.innomatic.io/license/ New BSD License
 * @link       http://www.innomatic.io
 * @since      Class available since Release 5.0
*/
function main_page()
{
    $innomatic_locale = new \Innomatic\Locale\LocaleCatalog('innomatic::root_menu', \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getLanguage());
    $app_cfg = new \Innomatic\Application\ApplicationSettings('innomatic');
    if (is_object(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()) and !(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getState() == \Innomatic\Core\InnomaticContainer::STATE_SETUP)) {
        $app_cfg = new \Innomatic\Application\ApplicationSettings('innomatic');
        $innomatic_logo_disabled = $app_cfg->getKey('innomatic-biglogo-disabled');
    } else {
        $innomatic_logo_disabled = 0;
    }
    $wui = \Innomatic\Wui\Wui::instance('\\Innomatic\\Wui\\Wui', true);
    $wui->loadWidget('page');
    $wui->loadWidget('vertgroup');
    $wui->loadWidget('button');
    $wui->loadWidget('horizbar');
    $wui->loadWidget('horizgroup');
    $wui->loadWidget('label');
    $page_params['title'] = 'Innomatic' . (strlen(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getPlatformName()) ? ' - ' . \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getPlatformName() . (strlen(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getPlatformGroup()) ? '.' . \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getPlatformGroup() : '') : '');
    $page_params['border'] = 'false';
    $wui_page = new WuiPage('page', $page_params);
    $wui_vertgroup = new WuiVertgroup('vertgroup', array('align' => 'center', 'groupalign' => 'center', 'groupvalign' => 'middle', 'height' => '100%', 'width' => '0%'));
    $wui_center_group = new WuiVertgroup('center_group', array('align' => 'center', 'groupalign' => 'center', 'groupvalign' => 'middle', 'height' => '0%'));
    $wui_buttons_group = new WuiHorizgroup('buttons', array('align' => 'middle', 'groupalign' => 'center', 'width' => '0%'));
    $query = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT count(id) AS domains FROM domains');
    if ($query->getFields('domains') > 0) {
        $wui_buttons_group->addChild(new WuiButton('domain', array('label' => $innomatic_locale->getStr('domainadmin'), 'image' => $wui_page->mThemeHandler->mStyle['domainaccess'], 'horiz' => 'true', 'action' => 'domain/', 'width' => 32, 'height' => 32)));
    }
    $wui_buttons_group->addChild(new WuiButton('root', array('label' => $innomatic_locale->getStr('rootadmin'), 'image' => $wui_page->mThemeHandler->mStyle['rootaccess'], 'horiz' => 'true', 'action' => 'root/', 'width' => 32, 'height' => 32)));
    if ($app_cfg->getKey('innomatic-link-disabled') != '1') {
        $wui_buttons_group->addChild(new WuiButton('innomaticlogo', array('label' => $innomatic_locale->getStr('innomatichome'), 'image' => $wui_page->mThemeHandler->mStyle['innomaticminilogo'], 'horiz' => 'true', 'action' => 'http://www.innomatic.io/', 'width' => 32, 'height' => 32)));
    }
    if ($app_cfg->getKey('serviceprovider-link-disabled') != '1') {
        $serviceprovider_link_filename = $app_cfg->getKey('serviceprovider-link-filename');
        if (strlen($serviceprovider_link_filename) and file_exists(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'shared/' . $serviceprovider_link_filename)) {
            $wui_buttons_group->addChild(new WuiButton('userlogo', array('label' => $app_cfg->getKey('serviceprovider-name'), 'image' => \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getBaseUrl(false) . '/shared/' . $serviceprovider_link_filename, 'horiz' => 'true', 'action' => $app_cfg->getKey('serviceprovider-url'))));
        }
    }
    $wui_logos_group = new WuiVertgroup('buttons_group', array('align' => 'center', 'groupalign' => 'center', 'groupvalign' => 'middle', 'height' => '0%'));
    if ($innomatic_logo_disabled != '1') {
        if (\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getEdition() == \Innomatic\Core\InnomaticContainer::EDITION_MULTITENANT) {
            $edition = '_asp';
        } else {
            $edition = '_enterprise';
        }
        if (isset($wui_page->mThemeHandler->mStyle['biglogo' . $edition])) {
            $biglogo_image = $wui_page->mThemeHandler->mStyle['biglogo' . $edition];
        } else {
            $biglogo_image = $wui_page->mThemeHandler->mStyle['biglogo'];
        }
        $wui_button = new WuiButton('button', array('action' => ' http://www.innomatic.io', 'target' => '_top', 'image' => $biglogo_image, 'highlight' => 'false'));
        $wui_logos_group->addChild($wui_button);
    }
    if (is_object(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()) and \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getState() != \Innomatic\Core\InnomaticContainer::STATE_SETUP) {
        // Service Provider personalization
        //
        $serviceprovider_biglogo_filename = $app_cfg->getKey('serviceprovider-biglogo-filename');
        $serviceprovider_url = $app_cfg->getKey('serviceprovider-url');
        if ($app_cfg->getKey('serviceprovider-biglogo-disabled') != '1') {
            if (strlen($serviceprovider_biglogo_filename) and file_exists(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getHome() . 'shared/' . $serviceprovider_biglogo_filename)) {
                $serviceprovider_button = new WuiButton('serviceproviderbutton', array('action' => strlen($serviceprovider_url) ? $serviceprovider_url : ' http://www.innomatic.io', 'target' => '_top', 'image' => \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getBaseUrl(false) . '/shared/' . $serviceprovider_biglogo_filename, 'highlight' => 'false'));
                $wui_logos_group->addChild($serviceprovider_button);
            }
        }
    }
    $wui_center_group->addChild($wui_buttons_group);
    $wui_center_group->addChild(new WuiHorizBar('hb'));
    $wui_center_group->addChild($wui_logos_group);
    $label_text = strlen(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getPlatformName()) ? \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getPlatformName() . (strlen(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getPlatformGroup()) ? '.' . \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getPlatformGroup() : '') : '';
    if (strlen($label_text)) {
        //$wui_center_group->addChild(new WuiHorizBar('hb'));
        $wui_center_group->addChild(new WuiLabel('label', array('label' => $label_text, 'color' => $wui_page->mThemeHandler->mColorsSet['buttons']['text'])));
    }
    $wui_vertgroup->addChild($wui_center_group);
    $wui_page->addChild($wui_vertgroup);
    $wui->addChild($wui_page);
    $wui->render();
}
예제 #6
0
                                            $wui_hgroup1 = new WuiHorizgroup('nexthgroup', array('align' => 'middle', 'groupalign' => 'center'));
                                            $wui_hgroup1->addChild(new WuiLabel('nextlabel', array('label' => $innomaticLocale->getStr('finish_label'))));
                                            $wui_vgroup->addChild($wui_hgroup1);
                                            $next_action = new \Innomatic\Wui\Dispatch\WuiEventsCall();
                                            $next_action->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('action', 'finish', ''));
                                            $next_button = new WuiButton('nextbutton', array('label' => $innomaticLocale->getStr('next_button'), 'horiz' => 'true', 'image' => $container->getBaseUrl(false) . '/shared/icons/subway/icons/arrowright.png', 'width' => '20', 'height' => '20', 'action' => $next_action->getEventsCallString()));
                                            $wui_vgroup->addChild(new WuiHorizBar('hr'));
                                            $wui_vgroup->addChild($next_button);
                                            \Innomatic\Setup\InnomaticSetup::check_log($wui_vgroup);
                                            $wuiMainFrame->addChild($wui_vgroup);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    // Page render
    //
    $wui_mainframe1->addChild($wuiMainFrame);
    $horiz_frame = new WuiHorizgroup('', array('groupvalign' => 'top'));
    $horiz_frame->addChild($progress_vert_group);
    $horiz_frame->addChild($wui_mainframe1);
    $wuiMainVertGroup->addChild($horiz_frame);
    $wuiPage->addChild($wuiMainVertGroup);
    $wui->addChild($wuiPage);
    $wui->render();
}
 public function beginHelper()
 {
     $this->_localeCatalog = new \Innomatic\Locale\LocaleCatalog('innomatic::root_domains', \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getLanguage());
     $this->wuiContainer->loadWidget('innomatictoolbar');
     $this->wuiContainer->loadWidget('button');
     $this->wuiContainer->loadWidget('checkbox');
     $this->wuiContainer->loadWidget('combobox');
     $this->wuiContainer->loadWidget('date');
     $this->wuiContainer->loadWidget('empty');
     $this->wuiContainer->loadWidget('file');
     $this->wuiContainer->loadWidget('formarg');
     $this->wuiContainer->loadWidget('form');
     $this->wuiContainer->loadWidget('grid');
     $this->wuiContainer->loadWidget('helpnode');
     $this->wuiContainer->loadWidget('horizbar');
     $this->wuiContainer->loadWidget('horizframe');
     $this->wuiContainer->loadWidget('horizgroup');
     $this->wuiContainer->loadWidget('image');
     $this->wuiContainer->loadWidget('label');
     $this->wuiContainer->loadWidget('link');
     $this->wuiContainer->loadWidget('listbox');
     $this->wuiContainer->loadWidget('menu');
     $this->wuiContainer->loadWidget('page');
     $this->wuiContainer->loadWidget('progressbar');
     $this->wuiContainer->loadWidget('radio');
     $this->wuiContainer->loadWidget('sessionkey');
     $this->wuiContainer->loadWidget('statusbar');
     $this->wuiContainer->loadWidget('string');
     $this->wuiContainer->loadWidget('submit');
     $this->wuiContainer->loadWidget('tab');
     $this->wuiContainer->loadWidget('table');
     $this->wuiContainer->loadWidget('text');
     $this->wuiContainer->loadWidget('titlebar');
     $this->wuiContainer->loadWidget('toolbar');
     $this->wuiContainer->loadWidget('treemenu');
     $this->wuiContainer->loadWidget('vertframe');
     $this->wuiContainer->loadWidget('vertgroup');
     $this->wuiContainer->loadWidget('xml');
     $this->wuiPage = new WuiPage('page', array('title' => $this->_localeCatalog->getStr('domains_title')));
     $this->wuiMainvertgroup = new WuiVertgroup('mainvertgroup');
     $this->wuiTitlebar = new WuiTitleBar('titlebar', array('title' => $this->_localeCatalog->getStr('domains_title'), 'icon' => 'stack1'));
     $this->wuiMainvertgroup->addChild($this->wuiTitlebar);
     // Main tool bar
     //
     $wuiMainToolBar = new WuiToolBar('maintoolbar');
     $homeAction = new \Innomatic\Wui\Dispatch\WuiEventsCall();
     $homeAction->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'default', ''));
     $wuiHomeButton = new WuiButton('homebutton', array('label' => $this->_localeCatalog->getStr('domains_button'), 'themeimage' => 'home', 'horiz' => 'true', 'action' => $homeAction->getEventsCallString()));
     $wuiMainToolBar->addChild($wuiHomeButton);
     if (\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getEdition() == \Innomatic\Core\InnomaticContainer::EDITION_SINGLETENANT) {
         $domainQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT count(*) AS domains FROM domains');
     }
     if (\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getEdition() == \Innomatic\Core\InnomaticContainer::EDITION_MULTITENANT or !$domainQuery->getFields('domains') > 0) {
         $newAction = new \Innomatic\Wui\Dispatch\WuiEventsCall();
         $newAction->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'newdomain', ''));
         $wuiNewButton = new WuiButton('newbutton', array('label' => $this->_localeCatalog->getStr('newdomain_button'), 'themeimage' => 'mathadd', 'horiz' => 'true', 'action' => $newAction->getEventsCallString()));
         $wuiMainToolBar->addChild($wuiNewButton);
     }
     // Situation tool bar
     //
     $wuiSitToolbar = new WuiToolBar('situation');
     $wuiSitButton = new WuiButton('sitbutton', array('label' => $this->_localeCatalog->getStr('situation.button'), 'themeimage' => 'listdetailed', 'horiz' => 'true', 'action' => \Innomatic\Wui\Dispatch\WuiEventsCall::buildEventsCallString('', array(array('view', 'situation')))));
     $wuiSitToolbar->addChild($wuiSitButton);
     // Help tool bar
     //
     $wuiHelpToolbar = new WuiToolBar('helpbar');
     $mainDisp = new WuiDispatcher('view');
     $eventName = $mainDisp->getEventName();
     if (strcmp($eventName, 'help')) {
         $helpAction = new \Innomatic\Wui\Dispatch\WuiEventsCall();
         $helpAction->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('view', 'help', array('node' => $eventName)));
         $wuiHelpButton = new WuiButton('helpbutton', array('label' => $this->_localeCatalog->getStr('help_button'), 'themeimage' => 'info', 'horiz' => 'true', 'action' => $helpAction->getEventsCallString()));
         $wuiHelpToolbar->addChild($wuiHelpButton);
     }
     // Toolbar frame
     //
     $wuiToolbarFrame = new WuiHorizgroup('toolbarframe');
     $wuiToolbarFrame->addChild($wuiMainToolBar);
     $wuiToolbarFrame->addChild($wuiSitToolbar);
     $wuiToolbarFrame->addChild($wuiHelpToolbar);
     $this->wuiMainvertgroup->addChild($wuiToolbarFrame);
     $this->wuiMainframe = new WuiHorizframe('mainframe');
     $this->wuiMainstatus = new WuiStatusBar('mainstatusbar');
 }
 public function beginHelper()
 {
     $this->localeCatalog = new LocaleCatalog('innomatic::domain_interface', \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getLanguage());
     $this->wuiContainer->loadWidget('button');
     $this->wuiContainer->loadWidget('checkbox');
     $this->wuiContainer->loadWidget('combobox');
     $this->wuiContainer->loadWidget('date');
     $this->wuiContainer->loadWidget('empty');
     $this->wuiContainer->loadWidget('file');
     $this->wuiContainer->loadWidget('formarg');
     $this->wuiContainer->loadWidget('form');
     $this->wuiContainer->loadWidget('grid');
     $this->wuiContainer->loadWidget('helpnode');
     $this->wuiContainer->loadWidget('horizbar');
     $this->wuiContainer->loadWidget('horizframe');
     $this->wuiContainer->loadWidget('horizgroup');
     $this->wuiContainer->loadWidget('image');
     $this->wuiContainer->loadWidget('label');
     $this->wuiContainer->loadWidget('link');
     $this->wuiContainer->loadWidget('listbox');
     $this->wuiContainer->loadWidget('menu');
     $this->wuiContainer->loadWidget('page');
     $this->wuiContainer->loadWidget('progressbar');
     $this->wuiContainer->loadWidget('radio');
     $this->wuiContainer->loadWidget('sessionkey');
     $this->wuiContainer->loadWidget('statusbar');
     $this->wuiContainer->loadWidget('string');
     $this->wuiContainer->loadWidget('submit');
     $this->wuiContainer->loadWidget('tab');
     $this->wuiContainer->loadWidget('table');
     $this->wuiContainer->loadWidget('text');
     $this->wuiContainer->loadWidget('titlebar');
     $this->wuiContainer->loadWidget('toolbar');
     $this->wuiContainer->loadWidget('treemenu');
     $this->wuiContainer->loadWidget('vertframe');
     $this->wuiContainer->loadWidget('vertgroup');
     $this->wuiContainer->loadWidget('xml');
     $this->wuiPage = new WuiPage('page', array('title' => $this->localeCatalog->getStr('interface_pagetitle')));
     $this->wuiMainvertgroup = new WuiVertgroup('mainvertgroup');
     $this->wuiTitlebar = new WuiTitleBar('titlebar', array('title' => $this->localeCatalog->getStr('interface_title'), 'icon' => 'picture'));
     $this->wuiMainvertgroup->addChild($this->wuiTitlebar);
     // Main tool bar
     //
     $wuiMainToolbar = new WuiToolBar('maintoolbar');
     $defaultAction = new WuiEventsCall();
     $defaultAction->addEvent(new WuiEvent('view', 'default', ''));
     $wuiDefaultButton = new WuiButton('defaultbutton', array('label' => $this->localeCatalog->getStr('default_button'), 'themeimage' => 'mask', 'horiz' => 'true', 'action' => $defaultAction->getEventsCallString()));
     $wuiMainToolbar->addChild($wuiDefaultButton);
     $countryAction = new WuiEventsCall();
     $countryAction->addEvent(new WuiEvent('view', 'localization', ''));
     $wuiCountryButton = new WuiButton('countrybutton', array('label' => $this->localeCatalog->getStr('localization_button'), 'themeimage' => 'globe2', 'horiz' => 'true', 'action' => $countryAction->getEventsCallString()));
     $wuiMainToolbar->addChild($wuiCountryButton);
     // Help tool bar
     //
     $wuiHelpToolBar = new WuiToolBar('helpbar');
     $viewDispatcher = new WuiDispatcher('view');
     $eventName = $viewDispatcher->getEventName();
     if (strcmp($eventName, 'help')) {
         $helpAction = new WuiEventsCall();
         $helpAction->addEvent(new WuiEvent('view', 'help', array('node' => $eventName)));
         $wuiHelpButton = new WuiButton('helpbutton', array('label' => $this->localeCatalog->getStr('help_button'), 'themeimage' => 'info', 'horiz' => 'true', 'action' => $helpAction->getEventsCallString()));
         $wuiHelpToolBar->addChild($wuiHelpButton);
     }
     // Toolbar frame
     //
     $wuiToolBarFrame = new WuiHorizgroup('toolbarframe');
     $wuiToolBarFrame->addChild($wuiMainToolbar);
     $wuiToolBarFrame->addChild($wuiHelpToolBar);
     $this->wuiMainvertgroup->addChild($wuiToolBarFrame);
     $this->wuiMainframe = new WuiVertframe('mainframe');
     $this->wuiMainstatus = new WuiStatusBar('mainstatusbar');
 }