$next_action->addEvent(new \Innomatic\Wui\Dispatch\WuiEvent('action', 'setcountry', '')); $next_button = new WuiButton('nextbutton', array('label' => $innomaticLocale->getStr('next_button'), 'horiz' => 'true', 'formsubmit' => 'country', 'image' => $container->getBaseUrl(false) . '/shared/icons/subway/icons/arrowright.png', 'width' => '20', 'height' => '20', 'action' => $next_action->getEventsCallString())); $wui_vgroup2 = new WuiVertgroup('vgroup2'); $wui_vgroup2->addChild($wui_form); $wui_vgroup2->addChild(new WuiHorizBar('hr')); $wui_vgroup2->addChild($next_button); \Innomatic\Setup\InnomaticSetup::check_log($wui_vgroup2); $wuiMainFrame->addChild($wui_vgroup2); $wuiTitleBar->mArgs['title'] .= ' - ' . $innomaticLocale->getStr('rootcountry_title'); } else { $log->logEvent('innomatic.root.main_php', 'Unable to connect to root database during initialization', \Innomatic\Logging\Logger::ERROR); } } else { if (!file_exists($container->getHome() . 'core/temp/setup_languageset')) { @touch($container->getHome() . 'core/temp/setup_settinglanguage', time()); $pass_data = $actionDispatcher->getEventData(); $country = isset($pass_data['country']) ? $pass_data['country'] : ''; if (!strlen($country)) { $country = $container->getCountry(); } $args['dbname'] = $container->getConfig()->value('RootDatabaseName'); $args['dbhost'] = $container->getConfig()->value('RootDatabaseHost'); $args['dbport'] = $container->getConfig()->value('RootDatabasePort'); $args['dbuser'] = $container->getConfig()->value('RootDatabaseUser'); $args['dbpass'] = $container->getConfig()->value('RootDatabasePassword'); $args['dbtype'] = $container->getConfig()->value('RootDatabaseType'); $args['dblog'] = $container->getHome() . 'core/log/innomatic_root_db.log'; $dasn_string = $args['dbtype'] . '://' . $args['dbuser'] . ':' . $args['dbpass'] . '@' . $args['dbhost'] . ':' . $args['dbport'] . '/' . $args['dbname'] . '?' . 'logfile=' . $args['dblog']; $tmpdb = \Innomatic\Dataaccess\DataAccessFactory::getDataAccess(new \Innomatic\Dataaccess\DataAccessSourceName($dasn_string)); if ($tmpdb->Connect()) { $loc_country = new \Innomatic\Locale\LocaleCountry($country);
function methods_list_action_builder($pageNumber) { $tmpMainDisp = new WuiDispatcher('view'); $eventData = $tmpMainDisp->getEventData(); return WuiEventsCall::buildEventsCallString('', array(array('view', 'showmethods', array('methodspage' => $pageNumber, 'accountid' => $eventData['accountid'])))); }
public function viewlanguage($eventData) { $actionDispatcher = new WuiDispatcher('action'); $locCountry = new LocaleCountry(\Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getCountry()); $countryLanguage = $locCountry->Language(); $languageLocale = new LocaleCatalog('innomatic::localization', \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getLanguage()); $selectedLanguage = $actionDispatcher->getEventData(); if (isset($selectedLanguage['language'])) { $selectedLanguage = $selectedLanguage['language']; } $wuiVGroup = new WuiVertgroup('vgroup'); $languageQuery = \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getDataAccess()->execute('SELECT * FROM locale_languages'); while (!$languageQuery->eof) { $languages[$languageQuery->getFields('langshort')] = $languageLocale->getStr($languageQuery->getFields('langname')); $languageQuery->moveNext(); } $wuiLocaleGrid = new WuiGrid('localegrid', array('rows' => '1', 'cols' => '3')); $wuiLocaleGrid->addChild(new WuiLabel('languagelabel', array('label' => $this->localeCatalog->getStr('language_label'))), 0, 0); $wuiLocaleGrid->addChild(new WuiComboBox('language', array('disp' => 'action', 'elements' => $languages, 'default' => $selectedLanguage ? $selectedLanguage : \Innomatic\Core\InnomaticContainer::instance('\\Innomatic\\Core\\InnomaticContainer')->getCurrentUser()->getLanguage())), 0, 1); $wuiLocaleGrid->addChild(new WuiSubmit('submit1', array('caption' => $this->localeCatalog->getStr('language_submit'))), 0, 2); $wuiVGroup->addChild($wuiLocaleGrid); $wuiVGroup->addChild(new WuiHorizBar('horizbar1')); $wuiVGroup->addChild(new WuiLabel('deflanglabel', array('label' => sprintf($this->localeCatalog->getStr('countrylanguage_label'), $languages[$countryLanguage])))); $formEventsCall = new WuiEventsCall(); $formEventsCall->addEvent(new WuiEvent('action', 'setlanguage', '')); $formEventsCall->addEvent(new WuiEvent('view', 'language', '')); $wuiForm = new WuiForm('languageform', array('action' => $formEventsCall->getEventsCallString())); $wuiForm->addChild($wuiVGroup); $this->wuiMainframe->addChild($wuiForm); $this->wuiTitlebar->mArgs['title'] .= ' - ' . $this->localeCatalog->getStr('language_title'); }